[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: Newline problems
I made changes to apply normalize-space to text nodes as suggested but
output again has no data. Do you see any obvious mistakes? Simplified src
xml and xsl are as shown below:
----------------------------------------------XML------------------ <!DOCTYPE ABC [ ... ]><ABC> ... <info> <attr> <name> ponumber</name> <atomicValue> 12345</atomicValue> </attr> ... </info> ... </ABC> ----------------------------------------------XSL------------------ <?xml version = "1.0" encoding = "UTF-8"?> <xsl:transform xmlns:xsl = "http://www.w3.org/1999/XSL/Transform" version = "1.0"> <xsl:template match = "ABC"> <xsl:text disable-output-escaping="yes"><!DOCTYPE OrderProcessing></xsl:text> <xsl:element name = "Order"> <xsl:element name ="Info"> <xsl:apply-templates mode = "Attribs" select = "/ABC/info"/> </xsl:element> </xsl:element> </xsl:template> ... <xsl:template mode = "Attribs" match = "info"> <xsl:apply-templates mode = "stripNewline" select="text()"/> <xsl:element name = "PO_NUMBER"> <xsl:value-of select="attr/atomicValue[../name='ponumber']"/> </xsl:element> ... </xsl:template> <xsl:template mode = "stripNewline" match="text()"> <xsl:value-of select="normalize-space(.)"/> </xsl:template> ... </xsl:transform> ---------------------------------------------------------------- Thanks, Vishwajit. From: Mike Brown <mike@xxxxxxxx> Reply-To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx Subject: Re: Newline problems Date: Thu, 1 May 2003 18:46:59 -0600 (MDT) _________________________________________________________________ Tired of spam? Get advanced junk mail protection with MSN 8. http://join.msn.com/?page=features/junkmail 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
|