You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@xmlbeans.apache.org by joeweder <jo...@gmail.com> on 2008/03/14 16:32:08 UTC

How2 Generate XSD from XML that can have variable content

I am trying to generate XSDs for our project.

I have XML that comes from a search engine which, depending on the query
parameters and other variables, conditions, etc., may not contain certain
elements. 

Is there a way I can run through a bunch of sample XML documents and come up
with a super-set schema?

Example:
Only when an error occurs will the document contain the 'error' structure.
If I use the inst2xsd tool on a good sample XML (one that ran without
errors) the structure will not be there. So, I have to assemble the complete
structure by hand before I use the inst2xsd tool.

Any suggestions would be greatly appreciated.
-- 
View this message in context: http://www.nabble.com/How2-Generate-XSD-from-XML-that-can-have-variable-content-tp16048281p16048281.html
Sent from the Xml Beans - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@xmlbeans.apache.org
For additional commands, e-mail: user-help@xmlbeans.apache.org


Re: How2 Generate XSD from XML that can have variable content

Posted by Radu Preotiuc-Pietro <ra...@bea.com>.
That's an interesting problem to solve, but it is above and beyond what
XMLBeans has been designed for.

Radu

On Fri, 2008-03-14 at 08:32 -0700, joeweder wrote:
> 
> I am trying to generate XSDs for our project.
> 
> I have XML that comes from a search engine which, depending on the
> query
> parameters and other variables, conditions, etc., may not contain
> certain
> elements.
> 
> Is there a way I can run through a bunch of sample XML documents and
> come up
> with a super-set schema?
> 
> Example:
> Only when an error occurs will the document contain the 'error'
> structure.
> If I use the inst2xsd tool on a good sample XML (one that ran without
> errors) the structure will not be there. So, I have to assemble the
> complete
> structure by hand before I use the inst2xsd tool.
> 
> Any suggestions would be greatly appreciated.
> --
> View this message in context:
> http://www.nabble.com/How2-Generate-XSD-from-XML-that-can-have-variable-content-tp16048281p16048281.html
> Sent from the Xml Beans - User mailing list archive at Nabble.com.
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@xmlbeans.apache.org
> For additional commands, e-mail: user-help@xmlbeans.apache.org
> 
> 
> 

Notice:  This email message, together with any attachments, may contain information  of  BEA Systems,  Inc.,  its subsidiaries  and  affiliated entities,  that may be confidential,  proprietary,  copyrighted  and/or legally privileged, and is intended solely for the use of the individual or entity named in this message. If you are not the intended recipient, and have received this message in error, please immediately return this by email and then delete it.

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@xmlbeans.apache.org
For additional commands, e-mail: user-help@xmlbeans.apache.org