forrest-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "J.Pietschmann" <>
Subject intra-FAQ links
Date Sun, 26 Jan 2003 23:12:45 GMT
Hi there,
we have some links within our FAQ, pointing to other questions.
Unfortunately, the links don't appear to work. I guess this is
because we use for example
   <faq id="postquestions">
   <link href="#postquestions">...

In faq2document.xsl, the relevant template seems to be
    <xsl:template match="faq">
     <anchor id="faq-{generate-id()}"/>
It is not obvious an anchor for the question's ID is

Q: Should't an anchor be generated for, well, basically
everything? In doc-v11.mod there is a comment:
    <!-- Common attributes
         Every element has an ID attribute (sometimes required,
         but usually optional) for links.
It's not of much use if the style sheets ignore it...

Are there other ways to make intra-FAQ links work?

And, well, the skinning of FAQs could use some improvement.
I'd like have the faqsections (damn, *parts*) numbered,
as well as the questions within the sections. Also, some
indendation would really help to keep track which text belongs
to which question.

Well, another flaw:
   <xsl:template match="faq">
     <anchor id="faq-{generate-id()}"/>
       <xsl:value-of select="question"/>
The DTD allows inline markup in questions, therefore it would
be appropriate to use xsl:apply-templates.

A patch for most of the above:
   <xsl:template match="faq">
     <anchor id="faq-{generate-id()}"/>
     <xsl:if test="@id">
       <anchor id="{@id}"/>
        <xsl:number level="multiple" count="faq|part" format="1.1. "/>
        <xsl:apply-templates select="question"/>

Well, the xsl:number part is completely untested...


View raw message