[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: new user xslt
Hi, > When I apply the template, I have tags with white space, and the xml > parser refuse that. The XSLT processor should give you an error when you try to create them. > How can I do to have proprely xml tags : > > <xsl:template match="row"> > <xsl:element name="{cell[1]}"> > <xsl:value-of select="cell[2]"/> > </xsl:element> > </xsl:template> You need to use the normalize-space() function to strip the whitespace: <xsl:element name="{normalize-space(cell[1])}"> <xsl:value-of select="normalize-space(cell[2])" /> </xsl:element> Cheers, Jeni --- Jeni Tennison http://www.jenitennison.com/ 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
|