Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


whitespace before the trailing slash

From: "Carole E. Mah" <carole@------------------>
To:
Date: 3/3/2000 4:57:00 AM
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


transparent
Print
Mail
Digg
delicious
Disclaimer
.

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.

.
.

transparent

transparent