|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: When is xsl:text relevant?
Would it make more sense to use : <p><xsl:text>Total Amount: </xsl:text></p> Instead of : <p>Total Amount: </p> These two are completely equivalent. There are two reasons for using xsl:text The first one is that people like to indent their stylesheets and if you go <p> <xsl:text>Total Amount: </xsl:text> </p> <p> Total Amount: </p> then the first one is still equivalent to the two above, but the second one has changed the content of the p element adding 2 newlines and some space characters. (Which in this case doesn't change the html rendering, but in general, it might) The other reason is that white space text nodes in a styelesheet are typically ignored, which is why <p> <xsl:text>Total Amount: </xsl:text> </p> is the same as <p><xsl:text>Total Amount: </xsl:text></p> so if you want to add some space then you can use xsl:text as a white space text node of xsl:text is not ignored. <p> </p> will produce <p/> <p><xsl:text> </xsl:text></p> will produce <p> </p> David ________________________________________________________________________ This e-mail has been scanned for all viruses by Star. The service is powered by MessageLabs. For more information on a proactive anti-virus service working around the clock, around the globe, visit: http://www.star.net.uk ________________________________________________________________________
|
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








