You are viewing a plain text version of this content. The canonical link for it is here.
Posted to j-dev@xerces.apache.org by bu...@apache.org on 2003/03/27 22:32:19 UTC

DO NOT REPLY [Bug 18430] New: - NameAndTypeOK, Particle Derivation (Restriction)

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=18430>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=18430

NameAndTypeOK, Particle Derivation (Restriction)

           Summary: NameAndTypeOK, Particle Derivation (Restriction)
           Product: Xerces2-J
           Version: 2.3.0
          Platform: PC
        OS/Version: Windows NT/2K
            Status: NEW
          Severity: Normal
          Priority: Other
         Component: XML Schema Structures
        AssignedTo: xerces-j-dev@xml.apache.org
        ReportedBy: nmehrega@ca.ibm.com
                CC: nddelima@ca.ibm.com


The following two examples contradict section "3.9.6 Constraints on Particle
Schema Components" of schema-structures.  Specifically under "Schema Component
Constraint: Particle Restriction OK (Elt:Elt -- NameAndTypeOK)" condition #5,
which says:

"For an element declaration particle to be a �valid restriction� of another
element declaration particle all of the following must be true:
1) ...
.
.
5) R's declaration's {identity-constraint definitions} is a subset of B's
declaration's {identity-constraint definitions}, if any."

Both of these examples go undetected in Xerces-J:

======================= Example 1 ======================= 

<complexType name="baseType">
  <sequence>
    <element name="elem" type="integer"/>
  </sequence>
</complexType>

<complexType name="badType">
  <complexContent>
    <restriction base="si:baseType">
      <sequence>
	 <element name="elem" type="integer">
	   <!-- Invalid here -->
	   <unique name="uniqueKey">
	     <selector xpath="."/>
	     <field xpath="."/>
	   </unique>
	 </element>
      </sequence>
    </restriction>
  </complexContent>
</complexType>

======================= Example 2 ======================= 

<complexType name="baseType">
  <sequence>
    <element name="elem" type="integer">
      <key name="baseKey">
	<selector xpath="."/>
	<field xpath="."/>
      </key>
    </element>
  </sequence>
</complexType>

<complexType name="badType">
  <complexContent>
    <restriction base="si:baseType">
      <sequence>
	<element name="elem" type="integer">
           <!-- Invalid here -->
	   <unique name="derivedKey">
	     <selector xpath="."/>
	     <field xpath="elem"/>
	   </unique>
	</element>
      </sequence>
    </restriction>
  </complexContent>
</complexType>

======================= End =======================

---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-j-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-j-dev-help@xml.apache.org