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

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Chishun Kwong

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

    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

Working...