simplecontent in a choice (xmlschema)

Discussion in 'XML' started by Thijs, May 28, 2008.

  1. Thijs

    Thijs Guest

    Hej,

    I want to achieve the following situation:
    <mytag>foo</mytag>

    or:
    <mytag><other ref="bar"/></mytag>

    So mytag contains either text (simplecontent) or the other element.

    How do I specify this in xmlschema?? I'm not able to add a
    simplecontent element into a choice element.

    Thanks in advance,
    Thys
     
    Thijs, May 28, 2008
    #1
    1. Advertising

  2. Thijs wrote:

    > I want to achieve the following situation:
    > <mytag>foo</mytag>
    >
    > or:
    > <mytag><other ref="bar"/></mytag>
    >
    > So mytag contains either text (simplecontent) or the other element.
    >
    > How do I specify this in xmlschema?? I'm not able to add a
    > simplecontent element into a choice element.


    I think the only way is by allowing mixed content, see
    http://www.w3.org/TR/xmlschema-0/#mixedContent


    --

    Martin Honnen
    http://JavaScript.FAQTs.com/
     
    Martin Honnen, May 28, 2008
    #2
    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. Random
    Replies:
    1
    Views:
    4,702
    Random
    Nov 19, 2004
  2. Mickey Segal
    Replies:
    0
    Views:
    925
    Mickey Segal
    Feb 2, 2004
  3. David Norman
    Replies:
    3
    Views:
    761
    Peter Flynn
    Aug 4, 2004
  4. Eric D
    Replies:
    2
    Views:
    449
    George Bina
    Jan 31, 2007
  5. Kai Schlamp
    Replies:
    3
    Views:
    540
    Pavel Lepin
    Nov 1, 2007
Loading...

Share This Page