From: Tatu Saloranta <cowtowncoder@ya...> - 2007-07-03 06:42:31
----- Original Message ----
From: Michael Kay <mike@...>
To: Mailing list for SAXON XSLT queries <saxon-help@...>
Sent: Monday, July 2, 2007 9:31:46 AM
Subject: Re: [saxon] functions fn:id, fn:idref: the role of DTD declarations]
Recognition of a DTD-defined attribute is sensitive to the exact environment
you are running in, especially the choice of XML parser. For example under
.NET the Microsoft XML parser does not make this information available, and
the same is true IIRC of StAX parsers under Java.
Related to latter point: of Stax parsers, Woodstox does provide necessary attribute type information (in this case, return "ID" as attribute type if requested). There were some known problems regarding availability of this information if DTD validation was not enabled; this issue was addressed in version 2.9, so current 3.x versions always provide this information with the default parsing settings.
It is true that other Stax implementations (ref. impl., Sun's sjsxp) have incomplete DTD handling, as far as I know.
And I assume there are many other types of parsers that also might not provide complete DTD-based attribute type information. So suggestion to ensure that the underlying parser provides all the information necessary is valid.
-+ Tatu +-
Choose the right car based on your needs. Check out Yahoo! Autos new Car Finder tool.