[oXygen-user] Run time xml validation with xml schema and embedded schematron rules
George Cristian Bina
Wed Jan 13 03:04:03 CST 2010
Hi Vincent,
To validate a file both with XML Schema and with the embedded Schematron
rules you need to have two schema associations specified
- one with the xsi:schemaLocation or xsi:noNamespaceSchemaLocation for
the XML Schema validation, something like
<root xmlns="http://www.example.com"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.example.com test.xsd">
or
<root xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="test.xsd">
- one with an "oxygen" processing instruction that specifies the XSD
file in the SCHSchema pseudo-attribute, something like
<?oxygen SCHSchema="test.xsd"?>
Then, the validate action will perform both validations.
As you mention that you get on validation:
***
[09:20:23] - SaxonSA Error Scanner - start scanning
file:/D:/wip/operators.xml
***
then I assume
1. you are not using version 11.1 as that includes the successor of
Saxon 9.1 SA, that is Saxon 9.2 Enterprise Edition (EE)
2.you have defined a validation scenario that specifies to validate with
Saxon SA
You need to either configure the validation scenario to go back to use
the default engine or add a validation step that uses the default engine.
Best Regards,
George
--
George Cristian Bina
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com
Vincent De Groote wrote:
> Hello,
>
>
> I have an xml schema grammar file (xsd) with embedded iso schematron rules.
>
> When I modify an instance file, the only way to get a full validation (xsd + embedded schematron) is to select "External Validation":
>
> *Information Window*:
>
> [09:18:18] - XMLSchema XML Error Scanner - start scanning file:/D:/wip/operators.xml with schema(s): file:/D:/wip/operators.xsd
> [09:18:18] - Found 0 problem(s)
> [09:18:18] - Schematron Error Scanner - start scanning file:/D:/wip/operators.xml with schema(s): file:/D:/wip/operators.xsd
> [09:18:18] - Found 0 problem(s)
>
>
> The standard validator (automatically running when I modify the instance document) seems to ignore embedded schematron rules:
>
> *Information Window*:
>
> [09:20:23] - SaxonSA Error Scanner - start scanning file:/D:/wip/operators.xml
> [09:20:23] - Ended
>
> I have tried to link the xml file and its schema by:
>
> - defining the schema in the instance file, with a {http://www.w3.org/2001/XMLSchema-instance}schemaLocation attribute
> - defining a document type association.
>
>
> I cannot find a way to configure oxygen to always use the full validation (xml schema + embedded schematron).
>
> Any idea ?
>
> Thanks for your replies
>
> Vincent De Groote
>
> _______________________________________________
> oXygen-user mailing list
>
> http://www.oxygenxml.com/mailman/listinfo/oxygen-user
More information about the oXygen-user
mailing list