wood burning stoves 2.0*
The moose likes XML and Related Technologies and the fly likes Need help with xml schema for the given XML Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » XML and Related Technologies
Bookmark "Need help with xml schema for the given XML" Watch "Need help with xml schema for the given XML" New topic
Author

Need help with xml schema for the given XML

Vlad Golodov
Ranch Hand

Joined: Jul 05, 2004
Posts: 50
Hi All!

I have an XML file like that:



How can I restrict special types in XML Schema for the special TYPE of the component?

For the ADDRESS type: picture, thumbnail, description.
For the BOOKMARK type: url, description.

At the moment I have a schema like that:



Thanks in advance.
[ February 16, 2005: Message edited by: Vlad Golodov ]

SCJP, SCJWSD prepairing<br /><a href="http://www.vladgolodov.com" target="_blank" rel="nofollow">http://www.vladgolodov.com</a>
Balaji Loganathan
author and deputy
Bartender

Joined: Jul 13, 2001
Posts: 3150
Guess no..
Vlad Golodov
Ranch Hand

Joined: Jul 05, 2004
Posts: 50
Thanks for the answer. My solution will be to put all the possible parameters into one node: <component>. Some of the parameters will be just minOccurs="0".

If you have better solution for the given problem, I would be very glad to here that.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Need help with xml schema for the given XML
 
Similar Threads
schema error : undefined value for 'type' encountered
wsimport command error --Undefined symbol or complex type
validate xml dom with schema
WSDL2Java Error
Error in xml schema