[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] saxon xmlspy discrepancy in whitespace handling
Hi,
I write my xsl in xmlspy (version 2006 sp2) and use saxon 8804 to do the transformation in java code. I get the following discrepancy in the produced output, saxon seems to produce extra white space. I know that saxon is the more specification compliant of the two processors, but xmlspy does what I want. So I know that I am missing something fundamental here and I would be grateful for some help. The immediate question is, how do I get saxon to produce the output I want, shown by the xmlspy output? And secondly, what am I not understanding about whitespace handling in xsl? Thank you for your attention. Erwin Here is my example code that demostrates the problem: -- begin xml-- <?xml version="1.0" encoding="UTF-8"?> <top> <section name="AAA" /> <section name="BBB" /> </top> -- end xml -- -- begin xsl -- ?xml version="1.0" encoding="UTF-8"?> <?altova_samplexml C:\workspaces\rad\garuda\storage\example.xml?> <xsl:stylesheet version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:fo="http://www.w3.org/1999/XSL/Format" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:fn="http://www.w3.org/2005/xpath-functions" xmlns:xdt="http://www.w3.org/2005/xpath-datatypes"> <xsl:output method="text" version="1.0" encoding="iso-8859-1" /> <xsl:variable name="newline"><xsl:text> </xsl:text></xsl:variable> <xsl:template match="/"> <xsl:apply-templates /> </xsl:template> <xsl:template match="//section" > <xsl:call-template name="section-header" /> </xsl:template> <xsl:template name="section-header" > <xsl:value-of select="@name"/> <xsl:value-of select="$newline"/> </xsl:template> </xsl:stylesheet> -- end xsl -- -- begin xmlspy output -- AAA BBB -- end xmlspy output -- -- begin saxon output -- AAA BBB -- end saxon output -
|
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
|