[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

whitespace before the trailing slash

Subject: whitespace before the trailing slash
From: "Carole E. Mah" <carole@xxxxxxxxxxxxxxxxxx>
Date: Fri, 3 Mar 2000 09:56:45 -0500 (EST)
xml 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


Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.