|
Subject: whitespace before the trailing slash From: "Carole E. Mah" <carole@xxxxxxxxxxxxxxxxxx> Date: Fri, 3 Mar 2000 09:56:45 -0500 (EST) |
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
| Current Thread |
|---|
|
| <- Previous | Index | Next -> |
|---|---|---|
| Your Conclusions for Entity referen, Jonathan Asbell | Thread | Re: whitespace before the trailing , David Carlisle |
| RE: doctype decl problem, Pawson, David | Date | Re: whitespace before the trailing , David Carlisle |
| Month |