-
Notifications
You must be signed in to change notification settings - Fork 22
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
XPath expression error in Schematron file for 5.2b10a5? #221
Comments
How odd. It certainly passes in the DocBook unit tests and I've just cut-and-pasted the expression into a stylesheet and it works fine. I'll investigate a bit further, but I wonder if this is an Oxygen bug. |
Thanks for investigating. For the record, I've used version 23.1, build 2021040908. I'll install a newer maintenance version and see how it goes. Maybe this "bug" will dissapear. |
I suppose it's possible that the |
Same with oXygen 23.1 build 2021061407.
I suspected that too, but had no proof. Could the expression be rewritten as XPath 2.0? Maybe the underlying validator only recognize 2.0 and not 3.0. I can try to report it to the oXygen crew, if you think this could be helpful. |
If I'm not mistaken, wasn't there an attribute for the Schematron schema to indicate which XPath version to use? Unfortunately, I hardly remember the name. There is a |
Found it: it's
You can choose from different languages, <s:schema xmlns:db="http://docbook.org/ns/docbook" queryBinding="xslt3" @ndw Would that be a useful addition? (For some unknown reason, |
Yes, that's probably the thing to do. Should test that what it means is that a processor incapable of providing an xslt3 binding simply ignores it and doesn't always report an error. |
Turns out On the one hand, I think all the significant Schematron implementations today support XSLT 2.0. On the other, this is going to disable all the Schematron assertions in environments where the older implementations are in use. Options:
I suspect the least worst answer is 2. I'm not sure the complexity of producing and explaining two different Schematron schemas is worth the effort. |
It's 2021 so might be we can try option 1 and see if there will be complaints... |
It's very tempting. If, as I expect, the overwhelming majority of users who are using the Schematron rules at all are doing so in Oxygen which will work just fine with an |
Problem
As version 5.2b10a5 is out, I've play a bit around with oXygen. For the sake of simplicity, I've configured my oXygen editor to use version 5.2b10a5 when I request "5.2". Whenever I write "5.2", I mean the latest version.
First, I've started with this structure for version 5.1:
This is a perfectly valid DocBook 5.1 structure. My oXygen editor reports a green light.
However, if I change the
<?xml-model?>
PI from 5.1 to 5.2, the latest version is loaded into oXygen but I get the following message (linebreaks by me to improve readability):It points to the file
sch/5.2/docbook.sch
and the following location (line 11):Possible solution
If I compare it with the previous version, there is no
db:callout[@arearefs]
pattern. This must be introduced in version 5.2.Unfortunately, I'm not familiar with XPath 2.0 so I cannot make any educated suggestion. Maybe review the above expression again?
The text was updated successfully, but these errors were encountered: