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

The type of an element should depend also on the substitutionGroup attribute

           Summary: The type of an element should depend also on the
                    substitutionGroup attribute
           Product: Xerces-C++
           Version: 2.3.0
          Platform: PC
        OS/Version: Windows XP
            Status: NEW
          Severity: Normal
          Priority: Other
         Component: Validating Parser (Schema) (Xerces 1.5 or up only)
        AssignedTo: [EMAIL PROTECTED]
        ReportedBy: [EMAIL PROTECTED]


Xerces finds this schema fragment incorrect:

<xsd:element name="warranty" type="xsd:string"/>
<xsd:element name="guarantee" substitutionGroup="warranty"/>

because "Element guarantee has a type which does not derive from the type of 
the element at the head of the substitution group"
But, according to the � 3.3.2 of the XML Schema spec ("XML Representation of 
Element Declaration Schema Components"), the type definition for an element 
declaration is determined by:

"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�. "

In this case Xerces should take the "xsd:string" type name as the type for the 
element "guarantee", given that there is no anonymous type declaration nor 
a "type" attribute.

Alberto

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

Reply via email to