Sign In | Register Now About Bytes | Help | Site Map
Connecting Tech Pros Worldwide

simplecontent in a choice (xmlschema)

Question posted by: Thijs (Guest) on June 27th, 2008 07:07 PM
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
Martin Honnen's Avatar
Martin Honnen
Guest
n/a Posts
June 27th, 2008
07:07 PM
#2

Re: simplecontent in a choice (xmlschema)
Thijs wrote:
Quote:
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/

 
Not the answer you were looking for? Post your question . . .
189,170 Experts ready to help you find a solution.
Sign up for a free account, or Login (if you're already a member).

Latest Articles: Read & Comment
  • Didn't find the answer you were looking for?
    Post Your Question
  • Top Community Contributors