Skip to content
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

Why is queryBinding default "xslt", instead of "xslt2" for 2.0 implementation? #288

Closed
GerbenAbbink opened this issue Sep 27, 2022 · 4 comments

Comments

@GerbenAbbink
Copy link

I am using the latest "Source Code" stylesheets.

My Schematron is like this (nothing special):

<?xml version="1.0" encoding="utf-8"?>
<schema xmlns="http://purl.oclc.org/dsdl/schematron">
	<pattern>
		<rule context="book">
			<assert test="count(chapter)&gt;=3">Book should have 3 chapters or more.</assert>
		</rule>
	</pattern>
</schema>

If I run the 1.0 XSLT stylesheet "compile-for-svrl.xsl" against my schematron everything works fine.
However, if I run the 2.0 version against my schematron i get this error message:

The query language 'xslt' is not supported.

If I add queryBinding="xslt2" to the schematron, there is no error.

My question is this: why am I forced to specify the optional attribute queryBinding for the 2.0 implementation, because the default value of queryBinding is "xslt", instead of "xslt2"?

@dmj
Copy link
Member

dmj commented Sep 27, 2022

The default value of the queryBinding attribute defined to be 'xslt'. SchXslt implements the ISO specification very strictly.

@GerbenAbbink
Copy link
Author

Does this mean that I should use the 1.0 stylesheets if there is no queryBinding attribute, or queryBinding="xslt"?
And use the 2.0 implementation if queryBinding="xslt2" or "xslt3"?

@dmj
Copy link
Member

dmj commented Sep 30, 2022

Yes, this is the way it should be done. See also #292 that when implemented would give you the option to specify a different default value.

There's also Schematron/schematron-enhancement-proposals#28 that discusses this in the wider context of a potential 4th revision of the specification.

@GerbenAbbink
Copy link
Author

GerbenAbbink commented Sep 30, 2022 via email

@dmj dmj closed this as completed Oct 2, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants