[XSD] Schema for unknwn element names with known attribute value

Discussion in 'XML' started by smoother, Aug 2, 2006.

  1. smoother

    smoother Guest

    Hello, I'm new to XML Schema. I've already read the Schema tutorial at
    w3schools.com but I still have numerous questions:

    First, I want to let you know what my XML file looks like:

    <root template="rootpage">
    <page1 template="journal">
    <entry1027 template="entry" title="title for entry no.
    1027">...</entry1027>
    <entryAlpha template="entry" title="some other
    title">...</entryAlpha>
    </page1>
    <another-page template="a-template">...</another-page>
    <another-page-2nd template="a-template">...</another-page-2nd>
    ...
    </root>


    As you can see, the file is not strucutred by equal node names (<page
    /><page /><page />) but nodes with same structure have the same
    attribute "template".
    So instead of xs:element, I search for a possiblity to define a schema
    for any unspecfific nodes which have a specific attribute value in
    common (e.g. 'a-template' or 'entry').

    Can somone please give an example?

    - Thanks, S.R.
     
    smoother, Aug 2, 2006
    #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. Matthet
    Replies:
    2
    Views:
    697
    Matthet
    Sep 24, 2003
  2. Lewis G. Pringle, Jr.
    Replies:
    0
    Views:
    620
    Lewis G. Pringle, Jr.
    Sep 30, 2003
  3. Carl
    Replies:
    0
    Views:
    536
  4. Eric
    Replies:
    4
    Views:
    1,142
    Stan Kitsis [MSFT]
    Mar 7, 2007
  5. PeteOlcott
    Replies:
    1
    Views:
    964
    Mukul Gandhi
    Feb 5, 2009
Loading...

Share This Page