forrest-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Nicola Ken Barozzi <>
Subject Re: [VOTE] Usage of file.hint.ext convention
Date Mon, 02 Sep 2002 12:31:25 GMT

Jeff Turner wrote:
> 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. 

Right, this is one reason, and a big one.

> Any other reasons?

Unfortunately yes.
It's also about having to specify in the output url the content type.

> 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> ...

Interesting, nobody removed the extension alltogether yet :-)

> And then in document2html.xsl, just append the ".html":
>   <xsl:template match="link">
>     <a><xsl:attribute name="href"><xsl:value-of select="concat(@href,
>       <xsl:apply-templates/>
>     </a>
> In, 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..

   I save the files on my hd with an extension usually.
   So I can have


What gets used by cocoon to generate myfile.pdf? The rule is not *that 


Also, when I link, I want sometimes to link to a specific content-type.

Is it bad?
As I said, go tell the doc writer he cannot state that he wants a pdf 
out of it ;-)

Part of the problem is in fact in wanting more outputs for one input.
You propose one input-one output.

Anyway, I like the no-extension link, as it's nearer to my uri proposal...

Then what about simply:

- I can have only one file with a certain name in the dir
- I can use extensions for my sake but they don't get used by Forrest
- Forrest looks inside the file to see what it contains
- I always link to the name without extension
- If I want a particular doctyle, the *link* URL is mypage/contenttyle
- The extensions are created by Cocoon; we leave the 1-1 mapping on 
extensions but keep them on the filename.

This seems to solve it, right? (fingers crossed)

Nicola Ken Barozzi         
             - verba volant, scripta manent -
    (discussions get forgotten, just code remains)

View raw message