Hello,
Just "seconding" my own vote here for improved validation of Schematron
schemas in Oxygen.
Again today I ran into the problem where Oxygen says the schema is
valid, but in fact the XPath had a problem.
In this case, there were two problems:
1) an XPath expression used a namespace prefix which was included in an
xmlns: namespace declaration, but was not declared using <sch:ns>:
<sch:schema xmlns:sch=
"http://purl.oclc.org/dsdl/schematron"
xmlns:svrl=
"http://purl.oclc.org/dsdl/svrl">
...
<sch:assert test="$SVRL-results//svrl:failed-assert">
2) a rule/@context expression used a variable, which is not allowed (at
least the generated stylesheet is not valid XSLT):
<sch:rule context="$original-schema/sch:assert">
As before, in both cases, the problems were hard to debug because they
were reported at runtime, after the Schematron schema had been
transformed into transient XSLT. Strong validation of the schema,
catching them at schema-editing time, would have made things easier to
diagnose and fix. I don't suppose there's a Schematron implementation
out there that works without the XSLT-generation step, and reports
validation errors in direct reference to the Schematron schema? E.g.
Probatron4j (I haven't tried it)?
Thanks...
Lars
On 5/27/2010 3:58 AM, George Cristian Bina wrote:
Dear
Lars,
Thanks for your feedback!
You identified exactly the problem, tracing back the errors to the
original schema. Our implementation is based on skeleton, simplified a
little as we know the XSLT engine that we use and I also added support
for includes and abstract schemas - that means there are a couple of
XSLT stylesheets until we get the XSLT from Schematron. I will see what
we can do about that, I agree that better validation for Schematron
will be a nice thing to have in oXygen.
Best Regards,
George
_______________________________________________