OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

docbook-apps message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]


Subject: how to output HTML entities?


I want <computeroutput> inside <programlisting> to be preceded with a
double right arrow (XHTML &rArr;) and a space for the first such element
and 3 spaces for all following elements.

here is my attempt:

<xsl:template match="programlisting/computeroutput">
 <xsl:choose>
  <xsl:when test="previous-sibling::computeroutput()">
   <xsl:text>&rArr;&nbsp;</xsl:text></xsl:when>
  <xsl:otherwise><xsl:text>&nbsp;&nbsp;&nbsp;</xsl:text>
 </xsl:otherwise></xsl:choose>
 <xsl:apply-imports/>
</xsl:template>

here is what I get:

common.xsl:63: parser error : Entity 'rArr' not defined
   <xsl:text>&rArr;&nbsp;</xsl:text></xsl:when>
                   ^
common.xsl:63: parser error : Entity 'nbsp' not defined
   <xsl:text>&rArr;&nbsp;</xsl:text></xsl:when>
                         ^
common.xsl:64: parser error : Entity 'nbsp' not defined
  <xsl:otherwise><xsl:text>&nbsp;&nbsp;&nbsp;</xsl:text>
                                 ^
common.xsl:64: parser error : Entity 'nbsp' not defined
  <xsl:otherwise><xsl:text>&nbsp;&nbsp;&nbsp;</xsl:text>
                                       ^
common.xsl:64: parser error : Entity 'nbsp' not defined
  <xsl:otherwise><xsl:text>&nbsp;&nbsp;&nbsp;</xsl:text>
                                             ^

when I replace "&rArr;" with "&amp;rArr;", the XHTML output contains
"&amp;rArr;" which is not what I want.

-- 
Sam Steingold (http://www.podval.org/~sds) running w2k
<http://www.camera.org> <http://www.iris.org.il> <http://www.memri.org/>
<http://www.mideasttruth.com/> <http://www.honestreporting.com>
Diplomacy is the art of saying "nice doggy" until you can find a rock.



[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]