[Does an XML complext type always have an associated namepace]

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • chandru4ni
    New Member
    • Mar 2008
    • 8

    [Does an XML complext type always have an associated namepace]

    Hello,

    I am going through a document in which is defined a XML complex type(EventType) for handling events.

    But the EventType does not have an associated namespace for it. All other complext types defined in the document have a namespace associated with them. So, I want to know whether is it mandatory to have the namespace associated with the complext type?

    The sample schema is given below.

    <xs:complexTy pe name="A">
    <xs:simpleConte nt>
    <xs:extension base="xs:string ">
    <xs:attribute name="Role" type="xs:string " use="required"/>
    </xs:extension>
    </xs:simpleConten t>
    </xs:complexType>

    <xs:complexTy pe name="B">
    <xs:sequence>
    <xs:element name="Thumbprin t" type="Thumbprin tType"/>
    </xs:sequence>
    </xs:complexType>

    <xs:complexType >
    <xs:element name="EventType ">
    <xs:sequence>
    <xs:element name="ClientCer tificate" type="ClientCer tificateType"/>
    </xs:sequence>
    </xs:complexType>

    Any help would be great.

    thankx & rgds,
    ChandruBN.
  • jkmyoung
    Recognized Expert Top Contributor
    • Mar 2006
    • 2057

    #2
    Does your schema have the elementFormDefa ult attribute set in the schema node?

    Sorry! We can't seem to find the resource you're looking for

    Comment

    • chandru4ni
      New Member
      • Mar 2008
      • 8

      #3
      Hi jkmyoung,

      The complete schema is the one I have listed in the query. It does not contain elementFormDefa ult in the schema.

      And from the link you have given, looks like the complex type need not be attached with namespace always...it is optional...

      If you have any pointers you can add...

      thankx & rgds,
      Chandra.

      Comment

      Working...