W3C home > Mailing lists > Public > www-dom@w3.org > January to March 2002

Re: Proposal: processing-instructions normalization feature for Document

From: Ray Whitmer <rayw@netscape.com>
Date: Wed, 23 Jan 2002 11:30:24 -0800
Message-ID: <3C4F0F50.6000105@netscape.com>
To: Elliotte Rusty Harold <elharo@metalab.unc.edu>
CC: www-dom@w3.org
By the way, if a programmer wants to ignore processing instructions, 
another way to do this today (when it is not an issue of removing them) 
is to use the Treewalker API, which is part of the traversal API, and 
filter appropriately.

Ray Whitmer
rayw@netscape.com

Elliotte Rusty Harold wrote:

>I'd like to propose an additional normalization feature to remove
>processing instructions from the document. The syntax would be modeled
>after the comments feature and be roughly as follows: 
>
>"processing-instructions"
>
>    true
>        [required] (default)
>    Keep Processing instruction nodes in the document.
>    false
>        [required]
>    Discard Processing instruction nodes in the Document.
>
>This could be useful in many cases where programmer 
>know they aren't going to consider processing instructions.
>For example, SOAP explicitly forbids them. Imagine I have
>an existing document, parsed or built from some source I 
>don't control and I want to copy its root element into a
>SOAP request or response. It would be 
>convenient to throw away processing instructions 
>in one normalizeDocument() call rather than having 
>to walk the tree to get rid of them. 
>
Received on Wednesday, 23 January 2002 14:31:04 GMT

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