The following XML Schema restrictions don’t make sense

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:

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,482
Members
44,901
Latest member
Noble71S45

Latest Threads

Top