W3C home > Mailing lists > Public > xmlschema-dev@w3.org > July 2006

Re: Turn XML Schema into sample document using XSLT

From: George Cristian Bina <george@oxygenxml.com>
Date: Wed, 12 Jul 2006 15:54:57 +0300
Message-ID: <44B4F121.7010906@oxygenxml.com>
To: Mukul Gandhi <gandhi.mukul@gmail.com>
Cc: xmlschema-dev@w3c.org, "Lev S. Pliner" <pliner@sky.ru>

The XS3P schema documentation stylesheet generates sample instances for 
the schema elements/types. You may look into that and adapt that code, 
but you will need good XSLT experience for that.
There are also tools as Mukul suggested that can do that, in addition to 
Mukul suggestion you have oXygen and Stylus studio.
We implemented this in oXygen using Xerces XML Schema API [1] and I 
think it would be a lot easier to do that than to generate the instance 
with XSLT. Xerces gives you access to a schema model that has all the 
type derivations resolved for instance and you can just walk that model 
and emit to the output the sample instance.

[1] http://xerces.apache.org/xerces2-j/faq-xs.html#faq-3

Best Regards,
George
---------------------------------------------------------------------
George Cristian Bina
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com


Mukul Gandhi wrote:
> 
> After some googling, it seems there is no such project. But tools like
> XMLSpy can do this nicely.
> 
> Do you specifically need XSLT stylesheet only?
> 
> Regards,
> Mukul
> 
> On 7/12/06, Lev S. Pliner <pliner@sky.ru> wrote:
>>
>> Dear mail list members.
>>
>> Could you provide me with links on researches in the subject of
>> turning by means of XSLT a valid XML Schema (or perhaps some subset of
>> Schema) into sample document confirming the model?
>>
>> Thank you in advance.
>>
>> Lev Pliner.
> 
Received on Wednesday, 12 July 2006 12:52:32 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 11 January 2011 00:14:55 GMT