searching xsd for certain types

Discussion in 'XML' started by vissuyk@yahoo.com, Nov 30, 2005.

  1. Guest

    Hi,

    I am new to xsd, any help is greatly appreciated. I will have
    customers define xsd. In there they will designate an attribute to be
    of certian type (e.g some:transid). When I see this in the xsd I have
    to create that attribute (if not already exists) and assign transaction
    id.

    XSD look something like :
    -------------------------------------
    <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
    xmlns:some="http://xmlns.something.com/something"
    elementFormDefault="qualified">
    <xs:element name="Item" >
    <xs:complexType>
    ..
    <xs:attribute name="transaction_id" type="some:transid"
    use="required"/>
    </xs:complexType>
    </xs:element>
    ...
    </xs:schema>

    customer defined xml looks like:
    -----------------------------------------------

    <Item name="whatever name">
    .....
    </Item>

    I add this attribute

    <Item name="whatever name" transaction_id="12345678">
    .....
    </Item>

    This is a made up example, but convey the point. The problem is I dont
    know how to search xsd for attributes of type some:transid. I can have
    them set type="some:transid". Customers can declare this at root node
    or any sub node. I can parse the DOM tree figuring out each attribute
    value of every node to see if there is a type=some:transid. But this
    will kill me when the document is large. I am assuming there is a
    better way to search xsd for attributes/element of certain type. Any
    better ways to do this ?.

    Thanks,

    Vissu
     
    , Nov 30, 2005
    #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. Replies:
    0
    Views:
    663
  2. Soren Kuula
    Replies:
    2
    Views:
    569
    Henry S. Thompson
    Dec 1, 2005
  3. rbt
    Replies:
    12
    Views:
    533
    Follower
    Feb 25, 2005
  4. Replies:
    2
    Views:
    532
    bruce barker
    Mar 25, 2008
  5. SAN CAZIANO
    Replies:
    8
    Views:
    180
    Dr John Stockton
    Oct 15, 2004
Loading...

Share This Page