This is the mail archive of the docbook-apps@lists.oasis-open.org mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[docbook-apps] 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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]