[xml] Regarding presence of any elements under group element having attribute other than id in the schema file



Hi Daniel,

         Can you please clarify the following doubt of mine. In the input schema file, is it valid for the presence of any element having the attribute other than “id” as the child of group element.

For ex:

<?xml version="1.0"?>

<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">

   <xs:group name="custGroup">

        <xs:choice maxOccurs="unbounded">

        <xs:element name="employee"/>

        <xs:element name="member"/>

        </xs:choice>

   </xs:group>

   <xs:element name="order" type="ordertype"/>

   <xs:complexType name="ordertype">

       <xs:group ref="custGroup"/>

       <xs:attribute name="status" type="xs:string"/>

   </xs:complexType>

</xs:schema>

 

         Because In the libxml code, in the function xmlSchemaParseModelGroup( ), if with “withParticle” is set, then check is done for the attributes, “id”, “maxOccurs” and “minOccurs”, but whereas when “withParticle” is not set, then the check is present only for the attribute “id”. Is it the expected behaviour?

 

Thanks in Advance,

 

Regards,

Nagesh.



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]