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

Re: DOM Parsers, Canonical XML

From: <keshlam@us.ibm.com>
Date: Wed, 24 May 2000 11:21:21 -0400
To: johnd@derwentbs.com
cc: www-dom@w3.org
Message-ID: <852568E9.005456B7.00@D51MTA03.pok.ibm.com>
>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.

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 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.

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.

______________________________________
Joe Kesselman  / IBM Research
Received on Wednesday, 24 May 2000 11:22:15 GMT

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