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

C

Chishun Kwong

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,995
Messages
2,570,233
Members
46,820
Latest member
GilbertoA5

Latest Threads

Top