Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   XML (http://www.velocityreviews.com/forums/f32-xml.html)
-   -   simplecontent in a choice (xmlschema) (http://www.velocityreviews.com/forums/t617275-simplecontent-in-a-choice-xmlschema.html)

Thijs 05-28-2008 02:19 PM

simplecontent in a choice (xmlschema)
 
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 05-28-2008 03:41 PM

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


All times are GMT. The time now is 12:11 PM.

Powered by vBulletin®. Copyright ©2000 - 2014, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.