forrest-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jeff Turner <je...@apache.org>
Subject Re: [VOTE] Usage of file.hint.ext convention
Date Mon, 02 Sep 2002 12:22:14 GMT
Sorry, I'm *way* behind :P Putting on my humble newbie hat..

I gather that (one of) the problems being addressed in this thread is the
where-to-link-to problem. Eg, in index.xml:

  Read our <link href="primer.html">Forrest Primer</link> ... 

And apparently that's bad. So my first question: why bad?

I'd guess the wrongness is that it introduces the assumption that the
*containing* XML file will be rendered to HTML. Eg, if index.xml ever
becomes part of a PDF, the link is broken. 

Any other reasons?

If that's the only reason, why not do "lazy resolution" of links. In the
XML, link to something abstract:

Read our <link href="primer">Forrest Primer</link> ...

And then in document2html.xsl, just append the ".html":

  <xsl:template match="link">
    <a><xsl:attribute name="href"><xsl:value-of select="concat(@href, '.html')"/></xsl:attribute>
      <xsl:apply-templates/>
    </a>

In document.fo.xsl, convert it to a <fo:basic-link>.

So say a user has a PDF saved alongside all the XML files. Then <link
href="mypdf.pdf"> works as expected.

All the world's problems solved by removing the extension instead of adding
extensions :)

Please someone tell me where I lost the plot..

thanks,

--Jeff

Mime
View raw message