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 Cristian Bina
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger

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

This archive was generated by hypermail 2.3.1 : Wednesday, 7 January 2015 14:56:10 UTC