Schematron schema with castable fails to compile
Posted: Wed Nov 28, 2012 12:24 pm
Hi,
I'm trying to validate a date by using castable in a schematron file:
I can transform this sch file to an XSLT with the ISO iso_svrl_for_xslt2.xsl stylesheet, and then use the result to validate a document. So it seems the above sch file is OK.
However, trying to apply the above .sch file directly to the same example XML document in Oxygen 11.2 Professional returns a warning:
It is a bit of a hassle to not be able to use Oxygen for quick debugging of sch files.
Any thoughts how to solve this?
I'm trying to validate a date by using castable in a schematron file:
Code: Select all
<?xml version="1.0" encoding="UTF-8"?>
<schema xmlns="http://purl.oclc.org/dsdl/schematron" xmlns:xs="http://www.w3.org/2001/XMLSchema">
<pattern>
<rule context="//meta[@name='OVERHEIDop.einddatum']">
<assert test="@content castable as xs:date">Geen juiste datum</assert>
</rule>
</pattern>
</schema>
However, trying to apply the above .sch file directly to the same example XML document in Oxygen 11.2 Professional returns a warning:
And ultimately a fatal error.SystemID: /Users/matthijs/Dropbox/werk/nieuwe_opzet/metadata/code/genereer_schematron/test_juni_2012/castable_test.sch
Engine-naam: ISO Schematron
Ernst: warning
Omschrijving: Error in expression @content castable as xsUnexpected token <name> beyond end of expression
It is a bit of a hassle to not be able to use Oxygen for quick debugging of sch files.
Any thoughts how to solve this?