[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] RelaxNG problem about section 7.4. Restrictions on interleave
Okay in the absence of an answer to my subscription request and mail to the RelaxNG list 2 weeks ago, I'm sorry to bounce this problem to XML-Dev, but I see no other channel to discuss this. If someone has the fortunate access to a RelaxNG list open for discussion feel free to act as a gateway :-\ To get to the core of the problem: Section 4.7 defines some restriction in the composition of interleaves: http://www.oasis-open.org/committees/relax-ng/spec-20011203.html#interleave-restrictions "there must not be a name that belongs to both the name class of an element pattern referenced by a ref pattern occurring in p1 and the name class of an element pattern referenced by a ref pattern occurring in p2" when p1 and p2 are two children of an interleave pattern. Now the name class definition is provided in the preceeding section 7.3 where name class equivalence is defined to detect duplicate attribute "there must not be a name that belongs to both the name class of an attribute pattern occurring in p1 and the name class of an attribute pattern occurring in p2. A pattern p1 is defined to occur in a pattern p2 if: - p1 is p2, or - p2 is a choice, interleave, group or oneOrMore element and p1 occurs in one or more children of p2." So one would expect identical name to be identical nameclasses. However, both the Relax NG tutorial and the test suite exhibit RelaxNG schemas like ----- <interleave> <text/> <optional> <element name="span"> <attribute name="class"> <value>givenName</value> </attribute> <text/> </element> </optional> <optional> <element name="span"> <attribute name="class"> <value>familyName</value> </attribute> <text/> </element> </optional> </interleave> ----- and ----- <element xmlns="http://relaxng.org/ns/structure/1.0" name="foo"> <mixed> <element name="bar"> <empty/> </element> <element name="bar"> <empty/> </element> <element name="bar"> <empty/> </element> </mixed> </element> ----- mixed being converted first to an interleave with <text/> and optional being converted first to a choice with <empty/> the rules expressed in 7.4 should apparently flag those as in error because reusing duplicate nameclasses for "span" and "bar" (without namespaces). And in the case fully qualified name can't be counted as nameclasses how does 7.3 prevents attribute duplication then ? If someone has an answer, I'm interested ! Daniel -- Daniel Veillard | Red Hat Network https://rhn.redhat.com/ veillard@r... | libxml GNOME XML XSLT toolkit http://xmlsoft.org/ http://veillard.com/ | Rpmfind RPM search engine http://rpmfind.net/
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|