David,
1 x = element x { attlist.x, any }
2 attlist.x &= attribute id { xsd:ID }?
3 start = x
4 any =
5 (element * {
6 attribute * { text }*,
7 any
8 }
9 | text)*
If you desire 'any attribute on element x', then you should probably
remove line 2, and delete 'attlist.x,' from line 1.
This should get rid of your Jing error, and grant your desire.
You may be able to get:
validate id attribute against ID rule
and
grant all other attributes
but you'd probably have to use some choice and except..not syntax...
that is outside my reach at the moment... :)
also, I think trang's conversion of <!ELEMENT x ANY> was a bit too loose in
that it
allowed any attribute as well as any element.
Tom
-----Original Message-----
From: David Carlisle [mailto:davidc at nag.co.uk]
Sent: Tuesday, September 30, 2003 9:02 AM
To: relaxng-user at relaxng.org
Subject: [relaxng-user] jing: error: conflicting ID-types
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"
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?
Thanks for any advice,
David
________________________________________________________________________
This e-mail has been scanned for all viruses by Star Internet. The
service is powered by MessageLabs. For more information on a proactive
anti-virus service working around the clock, around the globe, visit:
http://www.star.net.uk
________________________________________________________________________
_______________________________________________
relaxng-user mailing list
relaxng-user at relaxng.org
http://relaxng.org/mailman/listinfo/relaxng-user