Re: [docbook-apps] using qandaentry

    Thanks a bunch Paul,

    Now that I see FOP is pretty much unsupported or unmaintained since 
it hasn't seen any new releases in nearly 2 years, I'll have to 
re-evaluate my reasons for using docbook in the first place ;-)

    Jason

Paul DuBois wrote:

>You're tickling a bug in FOP that has bitten many of us.  I get around it by
>running a preprocessing step that maps the qanda tags to something else:
>
><xsl:template match="qandaset">
>  <xsl:apply-templates
>select="qandadiv/qandaentry/question|qandaentry/question"/>
>  <para><emphasis>Answers to Exercises</emphasis></para>
>  <xsl:apply-templates
>select="qandadiv/qandaentry/answer|qandaentry/answer"/>
></xsl:template>
>    
><xsl:template match="question">
>  <para>Question <xsl:number count="qandaentry" from="qandaset"
>level="any"/>:</para>
>  <xsl:apply-templates/>
></xsl:template>
>
><xsl:template match="answer">
>  <para>Answer <xsl:number count="qandaentry" from="qandaset"
>level="any"/>:</para>
>  <xsl:apply-templates/>
></xsl:template> 
>
>This pulls out all the questions, followed by all the answers.
>(In my application, I don't want each answer to be immediately visible below
>it's question.)
>
>The numbering is done as it is to cause exercise numbering to reset for each
>chapter.
>
>
>On 6/14/05 18:59, "Jason Novotny" <novotny@aei.mpg.de> wrote:
>
>  
>
>>    I'm using Fop 0.20.5 (has anyone touched this code since 2003??) and
>>docbook-xsl-1.68.1
>>
>>    Thanks, Jason
>>
>>Jason Novotny wrote:
>>
>>    
>>
>>>Hi,
>>>
>>>  All I did was add a new qandaentry in my docbook in between some
>>>other qandaentry's-- the XML is fine and valid, but when using FOP I
>>>get this:
>>>
>>> [java] [INFO] [4]
>>>   [java] [ERROR]
>>>file:/Users/novotny/gridsphere-docs/docs/docbook/FAQ/html/FAQ.fop:135:219
>>>The id "N10095" already exists in this document
>>>   [java] org.apache.fop.apps.FOPException:
>>>file:/Users/novotny/gridsphere-docs/docs/docbook/FAQ/html/FAQ.fop:135:219
>>>The id "N10095" already exists in this document
>>>   [java]     at
>>>org.apache.fop.datatypes.IDReferences.createID(IDReferences.java:119)
>>>   [java]     at
>>>org.apache.fop.datatypes.IDReferences.initializeID(IDReferences.java:99)
>>>   [java]     at
>>>org.apache.fop.fo.flow.ListItemLabel.layout(ListItemLabel.java:99)
>>>
>>>
>>>  This is so weird since if I add the qandaentry as the very last one
>>>before /qandaset I don't get this error. Why should the ordering matter?
>>>
>>>  Thanks, Jason
>>>
>>>
>>>---------------------------------------------------------------------
>>>To unsubscribe, e-mail: docbook-apps-unsubscribe@lists.oasis-open.org
>>>For additional commands, e-mail: docbook-apps-help@lists.oasis-open.org
>>>
>>>      
>>>
>>---------------------------------------------------------------------
>>To unsubscribe, e-mail: docbook-apps-unsubscribe@lists.oasis-open.org
>>For additional commands, e-mail: docbook-apps-help@lists.oasis-open.org
>>
>>    
>>
>
>  
>

Received on Wednesday, 15 June 2005 01:59:20 UTC