[relaxng-user] jing: error: conflicting ID-types

Eric van der Vlist vdv at dyomedea.com
Tue Sep 30 15:24:58 ICT 2003


Hi David,


On Tue, 2003-09-30 at 15:01, David Carlisle wrote:
> I had a DTD 
> 
>     <!ELEMENT x ANY>
>     <!ATTLIST x id ID #IMPLIED>
> 
> that I wanted to convert to relax ng, trang produced
> 
>     x = element x { attlist.x, any }
>     attlist.x &= attribute id { xsd:ID }?
>     start = x
>     any =
>       (element * {
>          attribute * { text }*,
>          any
>        }
>        | text)*
> 
> 
> which seems plausible, but after converting to rng format and trying
> with any instance document, say
> 
>     <x/>
> I had a DTD 
> 
>     <!ELEMENT x ANY>
>     <!ATTLIST x id ID #IMPLIED>
> 
> that I wanted to convert to relax ng, trang produced
> 
>     x = element x { attlist.x, any }
>     attlist.x &= attribute id { xsd:ID }?
>     start = x
>     any =
>       (element * {
>          attribute * { text }*,
>          any
>        }
>        | text)*
> 
> 
> which seems plausible, but after converting to rng format and trying
> with any instance document, say
> 
>     <x/>
> 
> to be definite, I get
> 
>     $ jing id.rng id.xml
>     z:\relaxng\id.rng:22: error: conflicting ID-types for attribute "id" of element "x"
> 
> to be definite, I get
> 
>     $ jing id.rng id.xmlI had a DTD 
> 
>     <!ELEMENT x ANY>
>     <!ATTLIST x id ID #IMPLIED>
> 
> that I wanted to convert to relax ng, trang produced
> 
>     x = element x { attlist.x, any }
>     attlist.x &= attribute id { xsd:ID }?
>     start = x
>     any =
>       (element * {
>          attribute * { text }*,
>          any
>        }
>        | text)*
> 
> 
> which seems plausible, but after converting to rng format and trying
> with any instance document, say
> 
>     <x/>
> 
> to be definite, I get
> 
>     $ jing id.rng id.xml
>     z:\relaxng\id.rng:22: error: conflicting ID-types for attribute "id" of element "x"
> 
>     z:\relaxng\id.rng:22: error: conflicting ID-types for attribute "id" of element "x"
> 
> 
> Removing the  attribute * clause from the any pattern allows the file to
> validate, but I do want to allow any element with any attribute.
> 
> Am I confused or is Jing?

I think you are ;-) ...

I have tried to explain that in my book:

http://books.xmlschemata.org/relaxng/RngNamespaces.html

(search for "A couple of traps to avoid").

Basically, what's happening here is the the DTD compatibility feature
does emulate even its restrictions :-) ...

Hope this helps.

Eric
-- 
Freelance consulting and training.
                                            http://dyomedea.com/english/
Upcoming schema tutorial:
 - Philadelphia (7/12/2003)       http://makeashorterlink.com/?V28612FC5
Tutoriel XSLT:
 - Paris (25/11/2003)             http://makeashorterlink.com/?L2C623FC5
------------------------------------------------------------------------
Eric van der Vlist       http://xmlfr.org            http://dyomedea.com
(W3C) XML Schema ISBN:0-596-00252-1 http://oreilly.com/catalog/xmlschema
------------------------------------------------------------------------



More information about the relaxng-user mailing list