[XML-SIG] xsd and python

Steen Manniche steen at manniche.net
Wed Sep 12 19:41:05 CEST 2007


Wednesday 12 September 2007 skrev Stephane Bortzmeyer:
> On Wed, Sep 12, 2007 at 02:25:26PM +0200,
>  Steen Manniche <stm at dbc.dk> wrote 
>  a message of 37 lines which said:
> 
> > If you by "generate xml from xsd" mean to make an xml instance of an
> > xml schema, then trang[1] does that job.
> 
> Nothing in the Web page or in the manual suggests that trang has this
> ability.
Yes, I sorry. It is the other way around.

Inferring an xml instance from an xml schema is not trivial, since an xml schema can contain infinite paths.
And it is not possible to automatically infer this at a unmediated construction of an xml instance.

I have not seen any python tools that supports this action.
Sorry for the inconvenience and good luck in your search.

Regards,
Steen

> 
> trang can do the opposite, infer a schema from an instance, like
> Examplotron does:
> 
> % cat toto.xml 
> <toto>
> <foobar/>
> </toto>
> 
> % trang -Ixml -Ornc toto.xml toto.rnc
> 
> % cat toto.rnc
> default namespace = ""
> 
> start =
>   element toto {
>     element foobar { empty }
>   }
> 
> _______________________________________________
> XML-SIG maillist  -  XML-SIG at python.org
> http://mail.python.org/mailman/listinfo/xml-sig
> 
> 




More information about the XML-SIG mailing list