|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] whitespace before the trailing slash
Hello,
I'm hoping someone can help me here. I'm writing an xsl stylesheet and
so far have only installed XT to process it.
Whitespace before the trailing slash in an empty element is optional in
XML, e.g. <hr/> or <hr />. However, I always want to have that whitespace
there, and my source.xml or sourc.html documents may often already have
them (e.g. if you run your document through Tidy first, with -asxml as an
option, Tidy puts in the whitespace: e.g. <br />).
Since one cannot use <xsl:text> around elements, the following is
illegal:
<xsl:template match="foo">
<xsl:text><xsl:copy-of select="."/></xsl:text>
</xsl:template>
and the following is also illegal:
<xsl:template match="foo">
<xsl:text><foo /></xsl:text>
</xsl:template>
Furthermore, sine whitespace within an xsl stylesheet is considered
insignificant, this merely produces <foo/>, as the whitespace gets
stripped:
<xsl:templete match="foo">
<foo />
</xsl:template>
Any suggestions? Thanks,
-carole
- - - - - - - - - - - - - - - - - - - - - - - - - - -
Carole E. Mah Carole_Mah@xxxxxxxxx
Programmer/Analyst
Brown University
Scholarly Technology Group
phn 401-863-2669
fax 401-863-9313
http://www.wwp.brown.edu/
personal: http://www.wwp.brown.edu/~carolem/
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|

Cart








