Re: jing: error: conflicting ID-types

Eric van der Vlist <[email protected]>
Newsgroups gmane.text.xml.relaxng.general
Organization Dyomedea (http://dyomedea.com)
Message-ID <1064928297.5216.45.camel@delleric>
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
------------------------------------------------------------------------
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.