- Joined
- Jan 27, 2010
- Messages
- 1
- Reaction score
- 0
hi
1) As far as I can tell, only elements can be declared inside <group>declaration, but not attributes. Thus the following text will cause Xml Schema validator to report an error:
Is there a particular reason why allowing attributes to be declared within <group>declaration would be a bad idea?
2) minOccurs and maxOccurs attributes are not permitted within global element declarations. Why is that?
3) Is the reason why we’re only able to refer ( using ref attribute ) to global elements but not local elements due to the fact that only they are guaranteed to have a unique name, while that is not the case with local elements?
4) An element declaration can’t use type attribute to refer to global type and at the same time create local type. But what if you want this element declaration to also have an attribute which isn’t declared within a global type?
thanx
1) As far as I can tell, only elements can be declared inside <group>declaration, but not attributes. Thus the following text will cause Xml Schema validator to report an error:
Code:
<group name="NameGroup">
<sequence>
<element name="first" type="string"></element>
<attribute name="title" type="string"/>
</sequence>
</group>
Is there a particular reason why allowing attributes to be declared within <group>declaration would be a bad idea?
2) minOccurs and maxOccurs attributes are not permitted within global element declarations. Why is that?
3) Is the reason why we’re only able to refer ( using ref attribute ) to global elements but not local elements due to the fact that only they are guaranteed to have a unique name, while that is not the case with local elements?
4) An element declaration can’t use type attribute to refer to global type and at the same time create local type. But what if you want this element declaration to also have an attribute which isn’t declared within a global type?
thanx