Schematron error new to 15.2 - generate-id()

This should cover W3C XML Schema, Relax NG and DTD related problems.
DanP
Posts: 18
Joined: Wed Apr 06, 2011 12:19 pm

Schematron error new to 15.2 - generate-id()

Post by DanP »

Hi,

I have a schematron embedded in an XSD schema which has been validating content happily for some time. Following an upgrade to Oxygen 15.2, I now receive an error message: "A sequence of more than one item is not allowed as the first argument of generate-id() (<sch:ns/>, <sch:ns/>)".

I've run the ISO Schematron to XSLT scenario on the schematron, and cannot find anything wrong with the resulting XSLT. I'm really struggling to pinpoint the source of this issue.

Any ideas..?

Thanks in advance.
adrian
Posts: 2855
Joined: Tue May 17, 2005 4:01 pm

Re: Schematron error new to 15.2 - generate-id()

Post by adrian »

Hello,

In oXygen 15.2 before the validation of an XML document with a Schematron schema, the Schematron schema is itself validated. If the schema is valid, then the XML document is validated against the schema, otherwise you will obtain only the Schematron schema validation errors.
This is also true when the Schematron rules are embedded in XML Schema or RelaxNG schemas.

So, in your case, if the embedded Schematron has errors, the validation will stop at the Schematron schema validation stage.

Unfortunately, in v15.2 there is no way to disable the Schematron schema validation step or force the XML validation to continue if the schema validation fails. We've had a few requests for this, so we will consider it for a future version.

There is no workaround or quick fix for this. Obviously the best approach would be to fix the Schematron schema errors.
Alternatively, yould step back to v15.1 which did not enforce the Schematron schema validation.

Regards,
Adrian
Adrian Buza
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com
george
Site Admin
Posts: 2095
Joined: Thu Jan 09, 2003 2:58 pm

Re: Schematron error new to 15.2 - generate-id()

Post by george »

Hi Dan,

In addition to Adrian's reply - if you can post here or send to support@oxygenxml.com a sample that can be used to reproduce the problem we can try to help identifying the issue and suggesting how to fix that.

Thanks,
George
George Cristian Bina
DanP
Posts: 18
Joined: Wed Apr 06, 2011 12:19 pm

Re: Schematron error new to 15.2 - generate-id()

Post by DanP »

Thanks,

I've clearly got a conformance issue somewhere which has never been apparent. Do you know of any tool that will allow me to validate my schematron - considering that it's embedded within and spread across multiple included xsd schema files..?
george
Site Admin
Posts: 2095
Joined: Thu Jan 09, 2003 2:58 pm

Re: Schematron error new to 15.2 - generate-id()

Post by george »

oXygen should validate the schema, just click on the "Configure validation scenario" action (you find it next to the Validate action in the toolbar) and select the "Validate XML Schema with embedded Schematron".

The oXygen XSLT-based Schematron implementation is available on ${frameworks}/schematron/impl/ and you can apply the ${frameworks}/schematron/impl/schematronDispatcher.xsl stylesheet on the XSD schema to get the Schematron schema that is the first stage of Schematron processing - this extracts embedded schematron and replaces Schematron include elements with the actual Schematron content.

Best Regards,
George
George Cristian Bina
Post Reply