XML.orgXML.org
FOCUS AREAS |XML-DEV |XML.org DAILY NEWSLINK |REGISTRY |RESOURCES |ABOUT
OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index]
RE: [xml-dev] Generating XML from XSD

Ability to potentially generating all possible instances given a schema via an iterator that can be given a ``coordinate’’ (plus some guidelines) in the instance space and generate it, or be able to systematically or randomly generate valid instances is very useful for testing functionality.

 

I was unable to find such a tool neither in the open source nor a commercial one.

 

How do code XML products test for compliance and for functionality without such a tool or an alternative comprehensive method?

 

Shlomo.

 


From: matthew pickard [mailto:pickard.matthew@gmail.com]
Sent:
ה 28 יוני 2007 21:26
To: Carlo Innocenti
Cc: Shlomo Yona; xml-dev@lists.xml.org
Subject: Re: [xml-dev] Generating XML from XSD

 

Would such a tool really be that useful? 

I don't know your schema, but in general XSD can describe a pretty vast XML space (possible instances).  

Sometimes I have thought about this problem myself and contemplated writing such an application (java+xslt).  The last situation I was working on a regression testing tool.  But soon after thinking about THIS problem I realized the vast bulk of generated material would make absolutely know sense to the business whatsoever.  It's just that in general many real world business rules are too hard to describe with a XSD schema, they are to high level (strange co-occurence and value based constraints etc... ).  But if your XML world is very well described by your schema then I dare say your language is rather data orientated and regular.  In which case I reckon you stand a fair chance of crafting such a tool yourself, but if it is a narrative kind of vocabulary (with mixed content and irregular structures) then that's a harder nut to crack...

Matthew

On 28/06/07, Carlo Innocenti <minollo@minollo.com> wrote:

Well, at the cost of sounding a bit unpopular these days, I'll chime in...

We did a good amount of work in Stylus Studio to
make our XML Schema to XML functionality able to
generate valid XML fragments in most cases; we
also try to take into consideration facets
information to create sample data that is valid
against the restrictions specified in the schema.
I wouldn't claim that we *always* generate valid XML, though.

Give it a try, you can download it for free from
http://www.stylusstudio.com/download

You can do that through File > Document Wizards,
or opening a schema, right clicking on a schema
entry and selecting "View XML Sample".

Minollo


At 01:51 PM 6/28/2007, you wrote:
>Hello,
>
>Isn't there any alternative other than XML Spy
>and oXygen for this functionality?
>
>Shlomo.
>
>
>-----Original Message-----
>From: Anthony B. Coates (XML-Dev) [mailto:abcoatesecure-xmldev@yahoo.co.uk]
>Sent: ã 27 éåðé 2007 20:20
>To: xml-dev@lists.xml.org
>Subject: Re: [xml-dev] Generating XML from XSD
>
>It's already been mentioned that tools like XML Spy and oXygen have some
>capability to produce XML instances to match a Schema.  However, my own
>experience (mostly with users who had XML Spy) is that the tool often
>generated invalid instances, and the users then assumed that there was an
>error in the Schema that they had been given.
>
>In particular, I'm not sure if any tool will reliably generate valid
>instances if there are pattern restrictions in a Schema.  This may well be
>an intractable problem, to generate a valid string match a pattern for any
>arbitrary pattern.  Certainly it isn't a trivial problem.  It does mean,
>however, that you should never expect an XML instance generator to fully
>valid XML.  It may need editing to make it valid.
>
>Cheers, Tony.
>
>On Wed, 27 Jun 2007 06:55:46 +0100, Sagar Surana <sagar.surana@amdocs.com >
>wrote:
>
> > Hi,
> >
> >   I want some kind of API's which can help generate a random XML based
> > on XSD.
> >
> >
> >
> >
> > Can someone please help me regarding the same.
> >
> >
> >
> >
> > Keep Smiling,
> >
> > Sagar Surana
>--
>Anthony B. Coates
>Senior Partner
>Miley Watts LLP
>Experts In Data
>UK: +44 (20) 8816 7700, US: +1 (239) 344 7700
>Mobile/Cell: +44 (79) 0543 9026
>Data standards participant: genericode, ISO 20022 (ISO 15022 XML),
>UN/CEFACT, MDDL, FpML, UBL.
>http://www.mileywatts.com/
>
>_______________________________________________________________________
>
>XML-DEV is a publicly archived, unmoderated list hosted by OASIS
>to support XML implementation and development. To minimize
>spam in the archives, you must subscribe before posting.
>
>[Un]Subscribe/change address: http://www.oasis-open.org/mlmanage/
>Or unsubscribe: xml-dev-unsubscribe@lists.xml.org
>subscribe: xml-dev-subscribe@lists.xml.org
>List archive: http://lists.xml.org/archives/xml-dev/
>List Guidelines: http://www.oasis-open.org/maillists/guidelines.php
>
>
>_______________________________________________________________________
>
>XML-DEV is a publicly archived, unmoderated list hosted by OASIS
>to support XML implementation and development. To minimize
>spam in the archives, you must subscribe before posting.
>
>[Un]Subscribe/change address: http://www.oasis-open.org/mlmanage/
>Or unsubscribe: xml-dev-unsubscribe@lists.xml.org
>subscribe: xml-dev-subscribe@lists.xml.org
>List archive: http://lists.xml.org/archives/xml-dev/
>List Guidelines: http://www.oasis-open.org/maillists/guidelines.php



_______________________________________________________________________

XML-DEV is a publicly archived, unmoderated list hosted by OASIS
to support XML implementation and development. To minimize
spam in the archives, you must subscribe before posting.

[Un]Subscribe/change address: http://www.oasis-open.org/mlmanage/
Or unsubscribe: xml-dev-unsubscribe@lists.xml.org
subscribe: xml-dev-subscribe@lists.xml.org
List archive: http://lists.xml.org/archives/xml-dev/
List Guidelines: http://www.oasis-open.org/maillists/guidelines.php

 



[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index]


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

Copyright 1993-2007 XML.org. This site is hosted by OASIS