List Info

Thread: xsd and python




xsd and python
country flaguser name
Czech Republic
2007-09-12 02:13:32
hi,
could anybody point me to best documentation resource, where
I could
learn, how to work with XSD and python?

I hope, it would be possible to generate XML based on XSD or
maybe some
Python code according to to it. I have no clue, whether this
is possible
or if it is possible in general, but not with python yet.

Any related link is welcomed 

Jachym
-- 
Jachym Cepicky
e-mail: jachym.cepickygmail.com
URL: http://les-ejk.cz
GPG: http
://www.les-ejk.cz/pgp/jachym_cepicky-gpg.pub


_______________________________________________
XML-SIG maillist  -  XML-SIGpython.org
http:
//mail.python.org/mailman/listinfo/xml-sig

Re: xsd and python
country flaguser name
United Kingdom
2007-09-12 05:44:38
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Jachym Cepicky writes:

> hi,
> could anybody point me to best documentation resource,
where I could
> learn, how to work with XSD and python?

See http://ww
w.ltg.ed.ac.uk/~ht/xsv-status.html

ht
- -- 
 Henry S. Thompson, HCRC Language Technology Group,
University of Edinburgh
                     Half-time member of W3C Team
    2 Buccleuch Place, Edinburgh EH8 9LW, SCOTLAND -- (44)
131 650-4440
            Fax: (44) 131 650-4587, e-mail: htinf.ed.ac.uk
                   URL: http://www.ltg.ed.ac.uk/
~ht/
[mail really from me _always_ has this .sig -- mail without
it is forged spam]
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.6 (GNU/Linux)

iD8DBQFG58MXkjnJixAXWBoRAjtZAJ0Ru4B608NrM0tTFnXEu6tjY4fsBACd
HZva
rq/Q2rSe3hRiRsVSRc1tm2w=
=SiBo
-----END PGP SIGNATURE-----
_______________________________________________
XML-SIG maillist  -  XML-SIGpython.org
http:
//mail.python.org/mailman/listinfo/xml-sig

Re: xsd and python
user name
2007-09-12 06:35:37
Jachym Cepicky wrote:
> could anybody point me to best documentation resource,
where I could
> learn, how to work with XSD and python?
> 
> I hope, it would be possible to generate XML based on
XSD or maybe some
> Python code according to to it. I have no clue, whether
this is possible
> or if it is possible in general, but not with python
yet.

I'm not aware of any Python tool that "generates XML
based on XSD" (whatever
that means), but there are a couple of tools that support
validation with XML
Schema, such as lxml.etree.

http://codespeak.net/lxml/

http://code
speak.net/lxml/validation.html

Stefan
_______________________________________________
XML-SIG maillist  -  XML-SIGpython.org
http:
//mail.python.org/mailman/listinfo/xml-sig

Re: xsd and python
user name
2007-09-12 07:25:26
Wednesday 12 September 2007 skrev Stefan Behnel:
> 
> Jachym Cepicky wrote:
> > could anybody point me to best documentation
resource, where I could
> > learn, how to work with XSD and python?
> > 
> > I hope, it would be possible to generate XML based
on XSD or maybe some
> > Python code according to to it. I have no clue,
whether this is possible
> > or if it is possible in general, but not with
python yet.
> 
> I'm not aware of any Python tool that "generates
XML based on XSD" (whatever
> that means), but there are a couple of tools that
support validation with XML
> Schema, such as lxml.etree.
> 
> http://codespeak.net/lxml/

> http://code
speak.net/lxml/validation.html
> 
> Stefan
> _______________________________________________
> XML-SIG maillist  -  XML-SIGpython.org
> http:
//mail.python.org/mailman/listinfo/xml-sig
> 
> 

If you by "generate xml from xsd" mean to make an
xml instance of an xml schema, then trang[1] does that job.


[1]:http
://www.thaiopensource.com/relaxng/trang.html, also
available through dpkg for debian and ubuntu
-- 
Steen Manniche, Programmør.
Dansk BiblioteksCenter A/S
Tempovej 7-11
2750 Ballerup

_______________________________________________
XML-SIG maillist  -  XML-SIGpython.org
http:
//mail.python.org/mailman/listinfo/xml-sig

Re: xsd and python
country flaguser name
France
2007-09-12 07:58:57
On Wed, Sep 12, 2007 at 02:25:26PM +0200,
 Steen Manniche <stmdbc.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.

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 
  }

_______________________________________________
XML-SIG maillist  -  XML-SIGpython.org
http:
//mail.python.org/mailman/listinfo/xml-sig

Re: xsd and python
country flaguser name
France
2007-09-14 03:35:33
On Wed, Sep 12, 2007 at 07:41:05PM +0200,
 Steen Manniche <steenmanniche.net> wrote 
 a message of 50 lines which said:

> Inferring an xml instance from an xml schema is not
trivial, since
> an xml schema can contain infinite paths.

But this is possible. It is not different from generating a
program
according to a grammar (BNF grammars, like XML schemas, can
contain
infinite paths) and some programs do it:

http://www.quut.com/abnf
gen/
http://www.bortzmeyer.org/eusthatius-test-grammars.html

So, not trivial but a nice and useful project. Who
volunteers? 
_______________________________________________
XML-SIG maillist  -  XML-SIGpython.org
http:
//mail.python.org/mailman/listinfo/xml-sig

[1-6]

about | contact  Other archives ( Real Estate discussion Medical topics )