You are viewing a plain text version of this content. The canonical link for it is here.
Posted to c-users@xerces.apache.org by rsmeenk <ro...@tno.nl> on 2009/02/02 17:25:23 UTC

Writing a SchemaGrammar to .xsd file

I would like to programmatically create a SchemaGrammar and then write it to
a .XSD file.
Is this possible? Any examples?

--
Roland
-- 
View this message in context: http://www.nabble.com/Writing-a-SchemaGrammar-to-.xsd-file-tp21792751p21792751.html
Sent from the Xerces - C - Users mailing list archive at Nabble.com.


Re: Writing a SchemaGrammar to .xsd file

Posted by rsmeenk <ro...@tno.nl>.


Boris Kolpackov-2 wrote:
> 
>> I would like to programmatically create a SchemaGrammar and then 
>> write it to a .XSD file. Is this possible? 
> 
> I don't think there is support for this. You can, however, traverse
> it yourself and write corresponding XML Schema, either directly or
> by creating a DOM document. Or you can create a DOM document
> corresponding to the schema without SchemaGrammar. I think most people
> do it this way.
> 

I was already afraid this would be the answer. Since other people seem to
have done this before is there any code available? A utility method that
creates a DOM tree from a SchemaGrammar or something like that?

--
Roland



-- 
View this message in context: http://www.nabble.com/Writing-a-SchemaGrammar-to-.xsd-file-tp21792751p21805946.html
Sent from the Xerces - C - Users mailing list archive at Nabble.com.


Re: Writing a SchemaGrammar to .xsd file

Posted by Boris Kolpackov <bo...@codesynthesis.com>.
Hi Roland,

rsmeenk <ro...@tno.nl> writes:

> I would like to programmatically create a SchemaGrammar and then 
> write it to a .XSD file. Is this possible? 

I don't think there is support for this. You can, however, traverse
it yourself and write corresponding XML Schema, either directly or
by creating a DOM document. Or you can create a DOM document
corresponding to the schema without SchemaGrammar. I think most people
do it this way.

Boris

-- 
Boris Kolpackov, Code Synthesis Tools   http://codesynthesis.com/~boris/blog
Open source XML data binding for C++:   http://codesynthesis.com/products/xsd
Mobile/embedded validating XML parsing: http://codesynthesis.com/products/xsde