Trang conversion and validation errors

This should cover W3C XML Schema, Relax NG and DTD related problems.
Posts: 2
Joined: Wed Oct 05, 2005 11:05 pm

Trang conversion and validation errors

Post by csjohnson » Wed Oct 05, 2005 11:28 pm


I've been experimenting with James Clark's XHTML Modularization:

I downloaded the relaxng schema and validated a *simple* xhtml document against it in Oxygen 6.2. It validates no problem. So far so good.

I then convert the relax ng schema to a W3C XML schema, and use the resulting schema to validate the same XHTML document. This time I get a bunch of errors:

Location: 7:34
Description: E cos-nonambig: "":del and "":del (or elements from their substitution group) violate "Unique Particle Attribution". During validation against this schema, ambiguity would be created for those two particles.

Any help on this greatly appreciated.


Site Admin
Posts: 2102
Joined: Thu Jan 09, 2003 2:58 pm

Post by george » Thu Oct 06, 2005 9:43 am

Hi Chris,

The XML Schema does not accept ambigous content as it is described in the URL reported in the error:

That means for instance that you cannot have something like
x --> (a, b) | (a,c)

In general these problems are solved by rewriting the schema in a non ambiguous way, the above model for instance can be rewritten as:


The rewriting is not always easy and TRANG does not do this automatically. Note that ambigous content is allowed in Relax NG.

You can configure oXygen not to perform UPA checks by disabling the full schema checking feature on the Options->Preferences / XML / XML Parser Options page but that will result in using only the first content rule when ambiguous content is present, in the above example the actual content model that will be used by the parser will be

and if you have <X><a/><c/></X> that will be reported as invalid.

Best regards,

Posts: 2
Joined: Wed Oct 05, 2005 11:05 pm

Post by csjohnson » Thu Oct 06, 2005 10:05 am

Thanks George,

I'll take a look at ... still trying to wrap my head around this stuff(!) I wanted to experiment with extending XHTML using Mr. Clark's modularization - if I have to go on an 'ambiguity hunt', I might end up (re)writing the entire schema : (

Thanks again for your help and for a great product!


Post Reply