This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes XML and Related Technologies and the fly likes xml schema question Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Engineering » XML and Related Technologies
Bookmark "xml schema question" Watch "xml schema question" New topic
Author

xml schema question

Edmund Castermund
Ranch Hand

Joined: May 09, 2007
Posts: 82
This feels like it should be a basic question, but I can't come up with an answer.

I have a schema which has a <description> element that I want to be able to have any combination of headings and paras...no headings at all, or two headings in a row, followed by paras, whatever.

But my schema definition now is like this:



Currently I have a <text-element> tag that allows an optional heading followed by any number of paras....is there a way to not have to use the <text-element> tag?

If I add this, will it help?



my understanding is that using xs:choose allows one or the other, xs:all allows any order, but only one instance.
thanks,
Jason
Jimmy Clark
Ranch Hand

Joined: Apr 16, 2008
Posts: 2187
<treatise>
<ch no="1">
<sec-main no="2"><title>Check your private messages
<para>Basic sentence goes here...
Edmund Castermund
Ranch Hand

Joined: May 09, 2007
Posts: 82
OMG...I couldn't reply to your PM...btw, that car got stolen!
Jimmy Clark
Ranch Hand

Joined: Apr 16, 2008
Posts: 2187
lol...that was my brother's baby, it probably became a gypsy cab and was forced into hard labour.
Edmund Castermund
Ranch Hand

Joined: May 09, 2007
Posts: 82
LOL.... PM me your email, would be good to hear about what you're up to.
bp
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: xml schema question
 
Similar Threads
Help me for xsd creation
XML valiadation using schema
servlets and xml
[schema] Allow an element to have any content
How to define Schema for this xml?