Re: Turn XML Schema into sample document using XSLT

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 UTC