XML/XSLT compatibility

XML is supposed to become popular because it has been standardized by the w3c , but how much are the parsers and xslt code compatible with each other?

I tried to write a xslt using msxml parser and try to run it with a xerces/xalan parser? I had numerous problems making it work and finally gave up. Anyone else having similar problems?

[363 byte] By [sudhirsrinivasan] at [2007-9-26 1:32:17]
# 1

Well, yes, there is the w3c - and then there's Microsoft. I'm not surprised that you run into problems converting from their XSLT. They still do not conform with the standard, although it's virtually unchanged since 2 years. They keep promising to be on day, ....

However, after moving to implementations much closer to the standard, you'll see that changing parser and XSLT processors in the future will be much easier.

Let me quote from the XML Bible by Elliotte R. Harold

"Not all software has caught up to the 1.0 Recommendation, however. In particular, Version 5.5 and earlier of Internet Exploer only implement a very old working draft of XSLT that looks almost nothing like the finished standard. (...) Both Microsoft's live presentations and the written documentation it posts on its Web site are notorious for teaching nonstandard Microsoft version of XSLT (and other languages) without clearly distinguishing which parts are real XSLT and which are Microsoft extensions to (some would say perversions of) standard XSLT."

So, welcome to the world of standards.

lk555 at 2007-6-29 1:33:04 > top of Java-index,Enterprise & Remote Computing,Enterprise Technologies...
# 2
Hello -In my experience with changing parsers, it's a painful process. Just because something adhere's to standards does not mean that the API's are going to look the same. You're generally going to have the same results, but a different way to get there. -Mike
mikepevans at 2007-6-29 1:33:04 > top of Java-index,Enterprise & Remote Computing,Enterprise Technologies...
# 3

<?xml version="1.0"?>

<xsl:stylesheet xmlns:xsl = "http://www.w3.org/1999/XSL/Transform" version = "1.0" >

<xsl:output method = "html" />

<xsl:template match = "/" >

<xsl:apply-templates select = "/transaction/data_xml/document/*" >

<xsl:sort select = "name()" />

</xsl:apply-templates>

</xsl:template>

<xsl:template match = "*" >

<xsl:value-of select = "name()" />

<xsl:text > </xsl:text>

<xsl:value-of select = "." />

<xsl:element name="p" >

</xsl:element>

</xsl:template>

</xsl:stylesheet>

This xsl works fine with MS Parser. However this one doesnot work with xalan. Any reason why this should not work. Xml data is simple. It has mutliple leaf node under /transaction/data_xml/document/. leaf nodes are sometimes cdata section.

d_dipankar at 2007-6-29 1:33:04 > top of Java-index,Enterprise & Remote Computing,Enterprise Technologies...
# 4

Hello,

I started with MSXML3... But experienced that it doesn't strictly conform to the XSLT recommendation. Then I jumped to Saxon. I think it's a product which very strictly conforms to the XSLT 1.0 recommendation (and has useful features from XSLT 1.1 working draft, but you can write purely in XSLT 1.0) . In any case, I feel comfortable with Saxon, since I started to learn XML/XSL from formal sources (ie, W3C recommendations).

Amartiros at 2007-6-29 1:33:04 > top of Java-index,Enterprise & Remote Computing,Enterprise Technologies...