[Dev] XML for cpia is dead! long live python for cpia!

Phillip J. Eby pje at telecommunity.com
Wed Aug 10 16:43:24 PDT 2005


At 04:16 PM 8/10/2005 -0700, Alec Flett wrote:
>ok, I've checked in an initial implementation of phillip's proposal, 
>complete with documentation... even faster than a 2-day xml parser :)
>
>documentation is in 
><http://svn.osafoundation.org/chandler/trunk/chandler/application/schema_api.txt>http://svn.osafoundation.org/chandler/trunk/chandler/application/schema_api.txt, 
>copied here below.

Hi Alec.  You need to format your examples so they'll work as doctests; 
right now they are not being executed. For example this:

>PersonT = Person.template

Should be:

    >>> PersonT = Person.template

And so on.


>Now you can create a person template like this:
>PersonT().install(parcel)

This of course will break since there's no name supplied.  When you change 
it to something like:

    >>> PersonT().install(parcel)
    <Person ...>

you'll then get an error when you run the tests (e.g. via run_tests 
application.tests.TestSchemaAPI) that will then show you what you did wrong 
here.  ;)

Some of your other examples have errors as well, but I'll leave them as an 
exercise for you to discover when you run them as tests.  :)

Let me know if you need any help converting any of the examples or getting 
them to work in the context of schema_api.txt.



More information about the Dev mailing list