dolfin team mailing list archive
-
dolfin team
-
Mailing list archive
-
Message #01962
Re: Version 0.6.0?
On Tue, Feb 14, 2006 at 01:32:36PM -0600, Anders Logg wrote:
> On Tue, Feb 14, 2006 at 07:31:29PM +0100, Johan Jansson wrote:
> > On Mon, Feb 13, 2006 at 07:39:31PM -0600, Anders Logg wrote:
> > ...
> > > Maybe we can just move the writing of the header to the constructor
> > > and the writing of the footer to the destructor of XMLFile?
> >
> > Hm, can we differentiate between reading and writing at that point?
>
> No, I didn't think about that. How about two new (private) functions
> in XMLFile: writeHeader() and writeFooter() and a bool
> header_written and just implement as
>
> void XMLFile::writeHeader()
> {
> if ( header_written )
> return;
>
> bla bla
>
> header_written = true;
> }
>
> void XMLFile::writeFooter()
> {
> if ( !header_written )
> return;
>
> bla bla
> }
>
> All the output operators then just need to call writeHeader() and
> writeFooter() is called by the destructor.
>
Ok, this is probably a good solution, I can't think of any better at least.
> ok. Do you know if libxml2 has a function you can call to verify against a
> schema before parsing (without first building the DOM tree which may
> not fit in memory)?
>
> /Anders
>
Hm, this appears to be a limitation of libxml2:
http://mail.gnome.org/archives/xml/2005-January/msg00059.html
There exists other XML parsers which can do schema validation with the
SAX model however, Xerces for example:
http://xml.apache.org/xerces-c/schema.html#usage
I guess the situation right now is that we cannot do schema validation
for very large data files.
Johan
Follow ups
References
-
Re: Version 0.6.0?
From: Garth N. Wells, 2006-02-13
-
Re: Version 0.6.0?
From: Anders Logg, 2006-02-13
-
Re: Version 0.6.0?
From: Garth N. Wells, 2006-02-13
-
Re: Version 0.6.0?
From: Anders Logg, 2006-02-13
-
Re: Version 0.6.0?
From: Garth N. Wells, 2006-02-13
-
Re: Version 0.6.0?
From: Anders Logg, 2006-02-13
-
Re: Version 0.6.0?
From: Johan Jansson, 2006-02-13
-
Re: Version 0.6.0?
From: Anders Logg, 2006-02-14
-
Re: Version 0.6.0?
From: Johan Jansson, 2006-02-14
-
Re: Version 0.6.0?
From: Anders Logg, 2006-02-14