How do I restrict the type of a text node in a mixed, complex-type element?

Discussion in 'XML' started by Chishun Kwong, Mar 3, 2005.

  1. Hi,

    I would like to use xsd to restrict the text in a mixed, complex-type
    element. My reading so far seems to say that it is not achievable, is
    this true? I find it hard to imagine.

    For example, in

    <foo>
    some text
    <bar>some more text</bar>
    </foo>

    I know I must define foo as an element with a complex type that is
    mixed. I also know that restricting the text of <bar/> is relatively
    easy, but I cannot find any reference that tells me how to restrict the
    text of <foo/>, in this case the current value is "some text".

    Thanks in advance,
    Chishun Kwong
    Chishun Kwong, Mar 3, 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:
    1,395
  2. Stanimir Stamenkov
    Replies:
    2
    Views:
    731
    Stanimir Stamenkov
    Oct 25, 2005
  3. Tjerk Wolterink
    Replies:
    2
    Views:
    1,398
    Dimitre Novatchev
    Aug 24, 2006
  4. Robert Mark Bram
    Replies:
    0
    Views:
    670
    Robert Mark Bram
    Feb 4, 2007
  5. HANM
    Replies:
    2
    Views:
    691
    Joseph Kesselman
    Jan 29, 2008
Loading...

Share This Page