Subject: MSXML v. Saxon - whose bug? From: Francis Norton <francis@xxxxxxxxxxx> Date: Wed, 13 Sep 2000 12:50:54 +0100 |
The following XML and XSL produces one more output element in Saxon 5.4 than in MSXML3 July download - listings follow (with some removeal of blank lines): --- D:\bugs\333a>type t.xml <xw:wrapper xmlns:xw='http://www.workspot.net/~roundand/xml/xwrapper.xsd'> <itemStatus> <status>REFER</status> <applicationId>CCUK000000000604</applicationId> </itemStatus> </xw:wrapper> D:\bugs\333a>type t.xsl <?xml version="1.0"?> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"> <xsl:output method="xml" indent="yes"/> <!-- take a wrapper with a header and an appStatus --> <xsl:template match="/"> <header> <status><xsl:value-of select="//status"/></status> <!-- now the rest of the simple itemStatus elements --> <xsl:apply-templates select="*"/> </header> </xsl:template> <!-- kill the itemStatus/status since we've already output it --> <xsl:template match="status" /> <xsl:template match="itemStatus/status" /> <!-- and generate "attribute" elements with the rest... --> <xsl:template match="itemStatus/*"> <attribute name="{name(.)}"><xsl:value-of select="text()"/></attribute> </xsl:template> </xsl:stylesheet> D:\bugs\333a>\xmlschema\saxon t.xml t.xsl Cannot find ParserManager.properties - using built-in parser <?xml version="1.0" encoding="utf-8"?> <header> <status>REFER</status> <attribute name="applicationId">CCUK000000000604</attribute> </header> D:\bugs\333a>\xmlschema\xslproc t.xml t.xsl <?xml version="1.0" encoding="UTF-16"?> <header> <status>REFER</status> <attribute name="status">REFER</attribute> <attribute name="applicationId">CCUK000000000604</attribute> </header> --- The line "<attribute name="status">REFER</attribute>" appears only in the output from xslproc (a wrapper for MSXML3), not in the Saxon output. I've got to admit that I often sort out these template priority questions by testing it then against a good parser, but these two are giving me different results! Any thoughts as to who's got the spec on their side? Francis. -- Francis Norton. Defy Convention? Deify Convention! XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
RE: Improving performance for huge , Pawson, David | Thread | Re: MSXML v. Saxon - whose bug?, David Carlisle |
Re: Preceding: can't filter my node, Alexey Gokhberg | Date | RE: Preceding: can't filter my node, Pawson, David |
Month |