RE: Restricting attribute use from optional to required

> So basically you're telling me that I don't have to repeat 
> all attributes from attributeGroup in restriction and it is 
> sufficient to just list the changed ones, that is the 'label' 
> attribute in my case?
> 
> <xsd:complexType name="parentWithReqLabelAttr">  <xsd:complexContent>
>    <xsd:restriction base="parent">
>      <xsd:group ref="commonElements"/>
>      <xsd:attribute name="label" type="xsd:string" use="required"/>
>      <!-- no need to list all remaining attributes from 
> 'attributes' group -->
>    </xsd:restriction>
>  </xsd:complexContent>
> </xsd:complexType>
> 

Correct.

Regards,

Michael Kay
http://www.saxonica.com/
http://twitter.com/michaelhkay 

Received on Friday, 28 August 2009 09:06:03 UTC