I seem to be not getting the intended use of xsl:choice.
 
The following stylesheet segment causes fop to terminate with the message: ...; Line 78 Column 25; [ERROR]: null
 
          <fo:block font-family="Helvetica" font-size="18pt" text-align="end">
            <xsl:choice>
              <xsl:when test="//eraname">
                <xsl:value-of select="//eraname"/>
              </xsl:when>
              <xsl:when test="//conflictname">
                <xsl:value-of select="//conflictname"/>
              </xsl:when>
              <xsl:otherwise>
                <xsl:text>History of the World</xsl:text>
              </xsl:otherwise>
            <xsl:choice>
          </fo:block>
1st, a more verbose error message would be useful.
 
2nd, What I am trying to do is find out if the current element contains an element named "eraname", if it does I want to use the value of the element "eraname"
If it doesn't I want to check if the current element contains a child element named "conflictname", if it does I want to use the value of the element "conflictname".
If it doesn't I want to slap in some boiler plate text.
 
The xml file being processed when this fails does contain the child element "eraname".
 
I'd be more than happy to use a workaround here.
 
Thank you,
Ed

Reply via email to