Re: Discrepancy recognizing entity in attribute

Joel Kalvesmaki <[email protected]> Thu, 5 Nov 2020 06:25:34 -0500
Newsgroups gmane.text.xml.saxon.help
Message-ID <CALPpAZ9Of2q9a+LEhtnB6+cHL-kYAd-RZD1Qjg7ZikJ6SEWydQ@mail.gmail.com>
The document-available() tests were performed in conjunction with doc(),
but I reported only on the former, after isolating the latter, which threw
fatal error FODC0002: Document has been marked not available: file: X.

Again, though, with either of the two modifications mentioned below, things
went fine.

jk

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 Thu, Nov 5, 2020 at 2:57 AM 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 "&#x23;">]>
> <a>
>    <works>&num;</works>
>    <works-not val="&num;"/>
> </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:
>
>    1. comment out the element <works-not> (so the entity works in the
>    element but not the attribute value)
>    2. 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
>


-- 
Joel Kalvesmaki
kalvesmaki.com

_______________________________________________
saxon-help mailing list archived at http://saxon.markmail.org/
[email protected]
https://lists.sourceforge.net/lists/listinfo/saxon-help