OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

 


 

   Re: [xml-dev] Instance from Schema?

[ Lists Home | Date Index | Thread Index ]

Hi Stefan,

You can use XercesJ to parse the schema then you can get the element 
declaration for your root element, get its type and create the instance 
as you explore it (we do this on new XML based on a schema in oXygen).

With XSLT you can take a look at the XS3P [1] schema documentation 
stylesheet, it generates a schema instance representation that I think 
can be developed further to generate a full instance document.

[1] http://titanium.dstc.edu.au/xml/xs3p

Hope that helps,
George
--
George Cristian Bina
http://www.oxygenxml.com




Stefan Tilkov wrote:
> I know there are tools to create W3C XML Schemas from instance  
> documents. Is there something that does the same thing the other way  
> round, i.e. create a (sample) instance from a Schema? Preferably  
> implemented e.g. in XSLT or in some Java lib?
> 
> Thanks,
> Stefan
> 
> -- 
> Stefan Tilkov, stefan.tilkov@innoq.com, http://www.innoq.com
> innoQ Deutschland GmbH, Halskestr. 17, D-40880 Ratingen, Germany
> Phone: +49 170 471 2624  Fax: +49 2102 77160-1
> ICQ: 177869128, AIM: stefantilkov, Weblog: http://www.innoq.com/blog/st/
> 
>  
> 
> -----------------------------------------------------------------
> The xml-dev list is sponsored by XML.org <http://www.xml.org>, an
> initiative of OASIS <http://www.oasis-open.org>
> 
> The list archives are at http://lists.xml.org/archives/xml-dev/
> 
> To subscribe or unsubscribe from this list use the subscription
> manager: <http://www.oasis-open.org/mlmanage/index.php>
> 




 

News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 2001 XML.org. This site is hosted by OASIS