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

Proposal: processing-instructions normalization feature for Document

From: Elliotte Rusty Harold <elharo@metalab.unc.edu>
Date: Wed, 23 Jan 2002 13:37:53 -0500
Message-ID: <3C4F0301.D0A7F7F5@metalab.unc.edu>
To: www-dom@w3.org
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: 


        [required] (default)
    Keep Processing instruction nodes in the document.
    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. 

| Elliotte Rusty Harold | elharo@metalab.unc.edu | Writer/Programmer |
|               Java I/O (O'Reilly & Associates, 1999)               |
|            http://www.ibiblio.org/javafaq/books/javaio/            |
|   http://www.amazon.com/exec/obidos/ISBN=1565924851/cafeaulaitA/   |
|  Read Cafe au Lait for Java News:  http://www.cafeaulait.org/      | 
|  Read Cafe con Leche for XML News: http://www.ibiblio.org/xml/     |
Received on Wednesday, 23 January 2002 13:37:44 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 20 October 2015 10:46:09 UTC