oship-dev team mailing list archive
-
oship-dev team
-
Mailing list archive
-
Message #00292
Re: Automatic Python code generation [Re: adl2py fundamentals]
Hi Roberto,
If you have time could you please install this app and then run it
against the blood pressure XML files[1] and then send me the Python
output so I can compare it to the ADL?
I used generateDS several years ago without much success.
[1] The schemas are here:
http://www.openehr.org/releases/1.0.2/its/XML-schema/index.html
The archetypes are:
openEHR-EHR-CLUSTER.device.v1.adl
openEHR-EHR-CLUSTER.level_of_exertion.v1.adl
openEHR-EHR-COMPOSITION.encounter.v1.adl
openEHR-EHR-OBSERVATION.blood_pressure.v1.adl
their XML representations can be found in their categories at:
http://www.openehr.org/svn/knowledge/archetypes/dev-uk-nhs/gen/xml/openehr/ehr/
Thanks,
Tim
On Mon, 2009-07-06 at 15:13 +0200, Roberto Siqueira wrote:
> Hi, all:
> I was checking the state-of-the-art of the OpenEHR XML representation
> (http://www.openehr.org/releases/1.0.1/its/XML-schema/index.html) and
> also reviewing the different XML modules available in Python to
> represent data (DOM, objectify, Elementtree, lxml etc) when I found
> this: http://www.rexx.com/~dkuhlman/generateDS.html -- a module that
> generates Python classes from XML schemas (XSD files). It's not exactly
> what we were looking for back then in April, but may be useful anyway.
> Please have a look at it when you have some time.
> Best regards,
> Roberto.
>
> Le 23.04.2009 21:55, Roberto Siqueira a écrit :
> > [...] By the way: generation of Python code using Python itself is
> > what is called metaprogramming
> > (http://en.wikipedia.org/wiki/Metaprogramming). It would be wonderful
> > to find some sort of Python "metaprogrammer" ("disassembler" or
> > "decompiler") library ready to use, don't you think? Unfortunately,
> > the only ones I've found (up to now) are "low level" bytecode
> > decompilers like: http://docs.python.org/library/dis.html , that are
> > not capable to decompile "high level" objects like classes, mixins
> > etc. In any case, I suppose that the small "helper class" described
> > in: http://effbot.org/zone/python-code-generator.htm will have some
> > utility here, as handling indentation can be very cumbersome,
> > sometimes. [...]
>
>
> _______________________________________________
> Mailing list: https://launchpad.net/~oship-dev
> Post to : oship-dev@xxxxxxxxxxxxxxxxxxx
> Unsubscribe : https://launchpad.net/~oship-dev
> More help : https://help.launchpad.net/ListHelp
--
Timothy Cook, MSc
Health Informatics Research & Development Services
LinkedIn Profile:http://www.linkedin.com/in/timothywaynecook
Skype ID == timothy.cook
**************************************************************
*You may get my Public GPG key from popular keyservers or *
*from this link http://timothywayne.cook.googlepages.com/home*
**************************************************************
Attachment:
signature.asc
Description: This is a digitally signed message part
Follow ups
References