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=26880>.
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=26880

Default type for a substituted element

           Summary: Default type for a substituted element
           Product: Xerces-C++
           Version: 2.4.0
          Platform: PC
        OS/Version: All
            Status: NEW
          Severity: Major
          Priority: Other
         Component: Validating Parser (Schema) (Xerces 1.5 or up only)
        AssignedTo: [EMAIL PROTECTED]
        ReportedBy: [EMAIL PROTECTED]


Hi, 

Xerces-C seems wrong in processing XSD element declarations. 

In an element declaration, if neither the "type" attribute 
nor enclosed anonymous type definition is present, 
we first need to look into the type of the element specified 
by "substitutionGroup" attribute.  I think Xerces-C is skipping this.

     XML Schema Part 1: Structure (3.3.2)

     {type definition} The type definition corresponding to the <simpleType> or 
<complexType> element information item in the [children], if either is present, 
otherwise the type definition ·resolved· to by the ·actual value· of the type 
[attribute], *otherwise the {type definition} of the element declaration 
·resolved· to by the ·actual value· of the substitutionGroup [attribute], if 
present*, otherwise the ·ur-type definition·. 

This is an example.  When I read the following XML Schema,  

<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"; 
elementFormDefault="qualified">
  <xs:element name="foo" abstract="true" type="xs:int"/>
  <xs:element name="bar1" substitutionGroup="foo"/>
  <xs:element name="bar2" substitutionGroup="foo"/>
</xs:schema>

I see the following error. 

Error at file f:\test.xsd, line 4, char 52
  Message: Element bar1 has a type which does not derive from the type of the 
element at the head of the substitution group

Error at file f:\test.xsd, line 5, char 52
  Message: Element bar2 has a type which does not derive from the type of the 
element at the head of the substitution group

Thanks,
Akihiko

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to