Re: Discrepancy recognizing entity in attribute
Michael Kay <mike-JkSD5nQpfvpWk0Htik3J/[email protected]> Thu, 5 Nov 2020 09:26:57 +0000
| Newsgroups | gmane.text.xml.saxon.help |
|---|---|
| Message-ID | <[email protected]> |
One difficulty here is that document-available() returns only true or false, with no explanation. What happens when you call document() instead? Does it give any helpful diagnostics as to why the XML parsing failed? Clearly there's some difference between the cases regarding what XML parser is being used and/or how it is configured. Michael Kay Saxonica > On 5 Nov 2020, at 07:57, Joel Kalvesmaki <[email protected]> wrote: > > Greetings, > > I have the following document at URI X: > > <?xml version="1.1" encoding="UTF-8"?> > <!DOCTYPE a [<!ENTITY num "#">]> > <a> > <works>#</works> > <works-not val="#"/> > </a> > > When I run Saxon from the command line (with -xmlversion:1.1) on an XSLT 3.0 stylesheet that outputs merely the result of document-available('X') I get the value false. But the same stylesheet returns the value true if I run it through Saxon in Oxygen. Or it works on the command line, provided I do one of the following two alterations: > comment out the element <works-not> (so the entity works in the element but not the attribute value) > change version in the XML declaration to 1.0 (both entities are recognized) > I've tested the above on multiple versions of Saxon: 9.8, 9.9, 10.3, HE and EE. Unfortunately I'm at about the limits of my diagnostic powers. Any ideas out there? > > Best wishes, > > jk > -- > Joel Kalvesmaki > kalvesmaki.com <http://kalvesmaki.com/>_______________________________________________ > saxon-help mailing list archived at http://saxon.markmail.org/ > [email protected] > https://lists.sourceforge.net/lists/listinfo/saxon-help _______________________________________________ saxon-help mailing list archived at http://saxon.markmail.org/ [email protected] https://lists.sourceforge.net/lists/listinfo/saxon-help