[XML-SIG] Problem using schema instead of DTD

2005-01-14 Thread Tim van Erven
Dear all, I'm using pyxml to read an xml file from stdin, modify it a bit, and write it out again to stdout. In the process a doctype is added automatically. In the output a line is added. I'm using a schema to validate my output, but it won't validate when the !DOCTYPE is present, so I think I'd

[XML-SIG] Re: Re: Re: cElementTree 0.8 (january 11, 2005)

2005-01-14 Thread Fredrik Lundh
Daniel Veillard wrote: > Seriously, with respect to performances one of the trouble I have seen when > doing a bit of profiling is that interning strings, i.e. the process of > taking string coming from C and turning them into Python string objects, > to be extremely costly, I don't know if it's

Re: [XML-SIG] Re: Re: Re: cElementTree 0.8 (january 11, 2005)

2005-01-14 Thread Daniel Veillard
On Fri, Jan 14, 2005 at 11:43:04AM +0100, Fredrik Lundh wrote: > Daniel Veillard wrote: > > > Seriously, with respect to performances one of the trouble I have seen when > > doing a bit of profiling is that interning strings, i.e. the process of > > taking string coming from C and turning them in

Re: [XML-SIG] Problem using schema instead of DTD

2005-01-14 Thread Tim van Erven
On Fri, 14/01/2005 11:39 +0100, Tim van Erven wrote: > I'm using pyxml to read an xml file from stdin, modify it a bit, and > write it out again to stdout. In the process a doctype is added > automatically. In the output a line is added. I'm using a > schema to validate my output, but it won't val

Re: [XML-SIG] Problem using schema instead of DTD

2005-01-14 Thread Mike Brown
Tim van Erven wrote: > And the output of my program looks like this, which won't validate: > > > > http://www.example.org/info"; > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; > xsi:schemaLocation="http://www.example.org/info someschema.xsd"> > > This is some modified sample text. >

Re: [XML-SIG] Re: Re: Re: cElementTree 0.8 (january 11, 2005)

2005-01-14 Thread Martijn Faassen
Daniel Veillard wrote: On Fri, Jan 14, 2005 at 11:43:04AM +0100, Fredrik Lundh wrote: Daniel Veillard wrote: Seriously, with respect to performances one of the trouble I have seen when doing a bit of profiling is that interning strings, i.e. the process of taking string coming from C and turning th

Re: [XML-SIG] Re: XML for scientific data storage and search

2005-01-14 Thread Walter Underwood
Instead of inventing something from scratch, I'd recommend an existing, standard, flexible, free format, like NetCDF. It even has Python bindings. http://my.unidata.ucar.edu/content/software/netcdf/ If you must invent it yourself, use Python marshal format over HTTP. Works fine. XML is wonderful s

Re: [XML-SIG] Problem using schema instead of DTD

2005-01-14 Thread Andrew Clover
Tim van Erven <[EMAIL PROTECTED]> wrote: In the process a doctype is added automatically. Yeah, 4DOM will do that. A null doctype is added at parse-time, for some reason. You can throw the doctype node out after parsing or before printing: if document.doctype is not None: document.removeChi