PureAquatica / jing-trang

Automatically exported from code.google.com/p/jing-trang
0 stars 0 forks source link

conflicting ID-types in wildcard pattern #178

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
I suspect this the same as issue 36, but I'm not familiar enough with DTD 
requirements to say and wanted to report it in case it isn't.  I've verified 
this with both jing-trang 20091111-4ubuntu1 and the head of SVN trunk.

The attached RNG schema, reduced from a modified version of Jeni Tennison's 
xmlschema.rng, produces:

{{{
    llc[836]$ jing  any-bug.rng any-bug.xml
    /home/pab/RelaxNG/any-bug.rng:10:16: error: conflicting ID-types for attribute "id" of element "content" from namespace "urn:bug"
}}}

It does not emit a diagnostic so if the {urn:bug}content element is excluded 
from the anyContent pattern by an exceptNameClass.  (This was done in 
xmlschema.rng, but it is incorrect and causes some Open Geospatial Consortium 
documents to fail to validate.)

It appears to happen because relaxng.pattern.IdTypeMapBuilder makes the very 
conservative assumption that a wildcard attribute would have an ID type.

Using -i does fix this, but I'd prefer the default warning-instead-of-error 
diagnostic you mention at: 
http://blog.jclark.com/2009/01/relax-ng-and-xmlid.html

Original issue reported on code.google.com by pabi...@gmail.com on 9 Feb 2014 at 3:53

Attachments:

GoogleCodeExporter commented 8 years ago
A patch that I'm using to work around this is attached.

Original comment by pabi...@gmail.com on 9 Feb 2014 at 6:53

Attachments: