OSDN Git Service

New implementation for DOMConfiguration.
authorJesse Wilson <jessewilson@google.com>
Sat, 27 Feb 2010 08:00:54 +0000 (00:00 -0800)
committerJesse Wilson <jessewilson@google.com>
Mon, 1 Mar 2010 18:20:23 +0000 (10:20 -0800)
commit21d27c095fee51fd6eac6a68d50b79df4dc97d85
tree69c4345ccc4bdc3f67037549157231c506c23842
parentdd55f1bba1216e91206255f31de587062ed115b6
New implementation for DOMConfiguration.

This API is disgusting. Its not regular, not typesafe, sparsely
implemented and overly specific. I'm implementing the minimum I can
get away with - exactly the same route taken by the RI.

The Parameter stuff feels a little bit like overkill, but it allowed
me to group related chunks of code together and avoid long chains of
equalsIgnoreCase if statements.

This is necessary to implement Document.normalize(), one of the
last remaining APIs in DOMv3.

Also fixing our implementation of Node.normalize() and adding tests
to discover a bug in that code. Previously a document like this:
  "<foo>abc<br>def</foo>"
Would be normalized to this:
  "<foo>abcdef<br></foo>"
Which is a horrible bug! Yuck.

Implementation and tests for Document.normalize() are forthcoming.
libcore/xml/src/main/java/org/apache/harmony/xml/dom/DOMConfigurationImpl.java [new file with mode: 0644]
libcore/xml/src/main/java/org/apache/harmony/xml/dom/DocumentImpl.java
libcore/xml/src/main/java/org/apache/harmony/xml/dom/InnerNodeImpl.java
libcore/xml/src/test/java/tests/xml/AllTests.java
libcore/xml/src/test/java/tests/xml/NormalizeTest.java [new file with mode: 0644]