Unspecific schematron message with inconsistent schemaLocati

Having trouble installing Oxygen? Got a bug to report? Post it all here.
Patrik
Posts: 280
Joined: Thu Nov 28, 2013 9:32 am
Location: Hamburg/Germany
Contact:

Unspecific schematron message with inconsistent schemaLocati

Post by Patrik »

Following (invalid but still occuring) scenario:

Root.xml:

Code: Select all

<Root
xmlns:xsi = "http://www.w3.org/2001/XMLSchema-instance"
xmlns:xi = "http://www.w3.org/2001/XInclude"
xsi:noNamespaceSchemaLocation="Root.xsd">
<xi:include href="Child.xml"/>
</Root>
Child.xml:

Code: Select all

<Child
xmlns:xsi = "http://www.w3.org/2001/XMLSchema-instance"
xmlns:xi = "http://www.w3.org/2001/XInclude"
xsi:noNamespaceSchemaLocation="Child.xsd">
</Child>
Now this is obviously invalid since the Root and Child elements have different values for xsi:noNamespaceSchemaLocation. And when validating the Root.xml with Rood.xsd without(!) embedded schematron, I get a suitable error message:
"XTTE1515: xsi:noNamespaceSchemaLocation cannot appear after the first no-namespace element or attribute"
When changing the xsi:noNamespaceSchemaLocation in Child.xml to Root.xsd everything is fine.


Now when validating Root.xml with(!) embedded schematron I get only this somewhat unspecific error message:
"XTTE1515: One or more validation errors were reported"
(It took me quite a while to figure out the actual problem.)

When executing the xslt generated from the schematron rules manually, the missing (helpful) error message is shown. Thus, oxygen seems to hide it:
  • Child.xml: error, XTTE1515: xsi:noNamespaceSchemaLocation cannot appear after the first no-namespace element or attribute
  • Root.xml: fatal, XTTE1515: One or more validation errors were reported
  • Root.xml: error, XTTE1515: One or more validation errors were reported

Just for completeness of my test-case:
Root.xsd

Code: Select all

<xs:schema 
xmlns:xs = "http://www.w3.org/2001/XMLSchema"
xmlns:sch = "http://purl.oclc.org/dsdl/schematron"
elementFormDefault="qualified">
<xs:include schemaLocation="Child.xsd"/>
<xs:element name="Root">
<xs:annotation>
<xs:appinfo>
<sch:pattern>
<sch:rule context="Root">
<sch:report test="true()">Test</sch:report>
</sch:rule>
</sch:pattern>
</xs:appinfo>
</xs:annotation>
<xs:complexType>
<xs:sequence>
<xs:element ref="Child"/>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:schema>
Child.xsd:

Code: Select all

<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified">
<xs:element name="Child"/>
</xs:schema>
Regards,
Patrik
tavy
Posts: 364
Joined: Thu Jul 01, 2004 12:29 pm

Re: Unspecific schematron message with inconsistent schemaLo

Post by tavy »

Hi Patrik,

Unfortunately I couldn't reproduce the problem that you reported.
Can you tell me what oXygen version do you use, and the build number? Because some issues where fixed on the validation part.
Also please make sure that you don't have modification in the skeleton from builtin.

Best Regards,
Octavian
Patrik
Posts: 280
Joined: Thu Nov 28, 2013 9:32 am
Location: Hamburg/Germany
Contact:

Re: Unspecific schematron message with inconsistent schemaLo

Post by Patrik »

Hi Octavian,

the behavior occurs on both my installation: 16.0 (build 2014070913) and 16.1 (build 2014112517), but only with "Use Saxon EE (schema aware) for xslt2 query binding" enabled. Unchecking this setting the schematron validation is being executed successfully.

Thanks and regards,
Patrik
tavy
Posts: 364
Joined: Thu Jul 01, 2004 12:29 pm

Re: Unspecific schematron message with inconsistent schemaLo

Post by tavy »

Hi Patrick,

I reproduced the problem after I set the "Use Saxon EE (schema aware) for xslt2 query binding" option.
I also fixed it a few days ago, I noticed it but for other case. The fix will be available in the next released version.

Thank you for reporting it.

Best Regards,
Octavian
Patrik
Posts: 280
Joined: Thu Nov 28, 2013 9:32 am
Location: Hamburg/Germany
Contact:

Re: Unspecific schematron message with inconsistent schemaLo

Post by Patrik »

Thanks. :)
Post Reply