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 10:07 AM.

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


1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57