[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

  • To: xml-dev@l...
  • Subject: RelaxNG problem about section 7.4. Restrictions on interleave
  • From: Daniel Veillard <veillard@r...>
  • Date: Mon, 17 Feb 2003 08:00:54 -0500
  • Reply-to: veillard@r...
  • User-agent: Mutt/1.2.5.1i

relaxng 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!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
 

Stylus Studio has published XML-DEV in RSS and ATOM formats, enabling users to easily subcribe to the list from their preferred news reader application.


Stylus Studio Sponsored Links are added links designed to provide related and additional information to the visitors of this website. they were not included by the author in the initial post. To view the content without the Sponsor Links please click here.

Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.