I am evaluating using a low-level XML parser in a library. The first one I looked at was expat
, which says it supports "XML 1.0", or at least its Wikipedia does. Then, when I go to the W3 page to look up what "XML 1.0" is, it breaks things down into a few different sections:
So, my question is, could someone give me a high-level overview of where the various items fit into the XML standard? For example, if something says it supports "XML 1.0", does that mean it also supports XPath version X (1? 2? 3?), or how does "XML" translate to the support in all of its different components? Specifically, I was curious as to what version of XPath/XQuery various libraries support. Also, why is the query language defined separately from the 'storage' structure?
To support XML 1.0 is to be compliant with W3C's Extensible Markup Language (XML) 1.0
To support XML 1.1 is to be compliant with W3C's Extensible Markup Language (XML) 1.1
Supporting XML 1.0 or 1.1 does not also imply support for XSLT, XPath, XQuery, XSD, or any other related XML standard. If a library purports to support one of those related standards, it should specifically state which version of those standards it supports.
thanks, in looking around briefly, it seems like XPath 2 and 3 are very rarely supported (no mainstream browsers support it). Is this accurate, or does it seem like Xpath 2/3 are gaining traction at all?
It's accurate for browsers, Microsoft tools, and many open source libraries. Commercial tools such as those by Saxonica (creme de la creme) , Syncro Soft, and many others do support the latest versions of all/most of the related XML standards.
@David542, browser vendors would rather want to eliminate their XML stack but in other areas there are XPath 2 (e.g. nuget.org/packages/XPath2 for .NET) or 3.1 (BaseX implements XQuery 3.1 of which XPath 3.1 is basically a subset). And Saxon exists in an open-source HE edition for Java and .NET supporting XPath 3.1, XSLT 3.0 and XQuery 3.1 as well. For .NET you can find a more comprehensive list at github.com/maxtoroq/dotnet-xml
@David542 Indeed you are correct, many of the excellent (and usually free and/or open source) products that were delivered during the peak of the XML hype wave in 1998-2003 were never updated to support later standards. You can roughly divide XML users today into two categories: casual users using XML in a very simple way, for which the 20-year old standards and products are perfectly adequate, and serious users for whom XML is an important part of their business strategy, who are getting great value from the more recent standards and products.