W3C home > Mailing lists > Public > www-dom@w3.org > April to June 2000

Re: DOM Parsers, Canonical XML

From: <johnd@derwentbs.com>
Date: Wed, 24 May 2000 18:53:22 +0100
To: www-dom@w3.org
Message-Id: <VPOP31.3.0b.20000524185526.388.21.1.34568a13@minas-ithil>
Joe,

> >Am I correct in assuming that all DOM parsers have the ability to
> >output the parsed XML in Canonical XML format?
> 
> A DOM parser outputs the parsed XML as a DOM, without performing any
> canonicalization upon it. At this time, the DOM has _no_ standardized
> ability to output the parsed document  XML text format, canonicalized or
> not.

So I think that I will have to get someone to write some c++ code 
for me that uses the DOM c++ routines to generate a text file 
format of my own design?
I was thinking along the lines of dumping the data structures from a 
c prog and loading them into my 4gl and writing my own DOM 
routines to manipulate the data.

My main problem is just getting at element and attribute data. If 
they contained straight forward data I would be ok, it's just when 
they have markers for data that is held elsewhere that I start to 
have nightmares :)

> Some parsers and some DOMs may have a canonicalize operation or option.
> But there's no portable way to make that request.
> 
> Routines which read data from a DOM and output canonical XML are
> available. For example, the Xerces/XML4J/XML4C parser comes with a sample
> program called DOMWriter which offers canonicalizing as an option. If you

Thx.

> care about portability, your best bet  for now is to incorporate that sort
> of code into your own application rather than assuming it will be provided
> for you.

Yes it has to be portable, ie Unix or NT. If we were just NT I could 
use MSXML.

> 
> As far as I know, canonicalizing in the DOM itself is not on the Open
> Issues list. Personally I'm inclined to consider it an operation upon the
> document rather than something that a document model should handle, but
> I'm open to arguments pro and con.

At the moment, Im pro :)

John
--

186,282 miles per second:

It isn't just a good idea, it's the law!
Received on Thursday, 25 May 2000 01:55:49 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Friday, 22 June 2012 06:13:47 GMT