The following XML Schema restrictions don’t make sense

Discussion in 'XML' started by sqlsurfing, Jan 27, 2010.

  1. sqlsurfing

    sqlsurfing

    Joined:
    Jan 27, 2010
    Messages:
    1
    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
     
    sqlsurfing, Jan 27, 2010
    #1
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. mike
    Replies:
    0
    Views:
    366
  2. mike
    Replies:
    0
    Views:
    397
  3. mike
    Replies:
    0
    Views:
    411
  4. mike
    Replies:
    1
    Views:
    326
    Harlan Messinger
    Apr 20, 2005
  5. mike
    Replies:
    0
    Views:
    290
Loading...

Share This Page