Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > XML > simplecontent in a choice (xmlschema)

Reply
Thread Tools

simplecontent in a choice (xmlschema)

 
 
Thijs
Guest
Posts: n/a
 
      05-28-2008
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
 
Reply With Quote
 
 
 
 
Martin Honnen
Guest
Posts: n/a
 
      05-28-2008
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/
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Schema: error with restriction in simpleContent Kai Schlamp XML 3 11-01-2007 11:26 AM
simplecontent that extends itself, is that valid?? Eric D XML 2 01-31-2007 11:55 AM
Cannot add a nested relation or an element column to a table containing a SimpleContent column. Random ASP .Net 1 11-19-2004 11:36 PM
XML Schema Q: Element with either simpleContent or complexContent David Norman XML 3 08-03-2004 11:37 PM
Choice of DHCP-server? Is the "IOS-one" a good choice? Fred Cisco 1 12-11-2003 06:25 AM



Advertisments