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

On Mon, Aug 20, 2007 at 02:07:17PM +0530, Nagesh S wrote:

   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.

  Honnestly I don't know XSD-1.0 enough to really answer this question.
And unfortunately the specification is too obtuse for me to try to find 
the answer in the spec either :-\

   For ex:

   <?xml version="1.0"?>

   <xs:schema xmlns:xs="";>

      <xs:group name="custGroup">

           <xs:choice maxOccurs="unbounded">

           <xs:element name="employee"/>

           <xs:element name="member"/>



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

      <xs:complexType name="ordertype">

          <xs:group ref="custGroup"/>

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



               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?

  I don't know, could be an error ... or not.


Red Hat Virtualization group
Daniel Veillard      | virtualization library
veillard redhat com  | libxml GNOME XML XSLT toolkit | Rpmfind RPM search engine

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