You are viewing a plain text version of this content. The canonical link for it is here.
Posted to xap-dev@incubator.apache.org by James Margaris <jm...@nexaweb.com> on 2007/01/05 01:41:55 UTC

XML DOM checkins

I am performing some overdue cleanup of xap Element and Document.

Removing unused methods.

Changing null checks to other checks where appropriate. (This is a bit
tricky because in something like setAttribute() a value of "" is fine
but will pass !value)

Cleaning up ownerDocument and getOwnerDocument. The W3C ownerDocument is
strange in that if you simply create a node from a document the document
is that node's ownerDocument - but how can you tell if the node is
currently part of the document? You can't without a traversal.

getOwnerDocument() is called a lot right now. In our case we really
don't care too much what document the node was created from, what we
want to know is if the node is currently part of a document and if so
which one?

So I've changed it so that when a node is added to something in a
document the ownerDocument is set. When it is removed from something in
a document the ownerDocument is cleared. An element has an ownerDocument
IFF the element is currently part of that document.

We were already doing work when nodes were added/removed from documents
so the change is pretty minor.

James Margaris

RE: Mozilla Native Parsing

Posted by Coach Wei <co...@nexaweb.com>.
Great to have Mozilla native parsing! Good job. 

> -----Original Message-----
> From: James Margaris [mailto:jmargaris@nexaweb.com]
> Sent: Thursday, January 04, 2007 9:19 PM
> To: xap-dev@incubator.apache.org
> Subject: Mozilla Native Parsing
> 
> This was recently checked in. I've noticed it is stricter than the
> parser we wrote, for example the new parser barfs on:
> 
> <xal:freePane>
> 
> </freePane>
> 
> The old parser does not. (But should have) Just a heads up if you are
> seeing new parsing issues most likely these are real issues uncovered
by
> the recent checkin to use native xml parsing in Mozilla/FF.
> 
> James Margaris

Mozilla Native Parsing

Posted by James Margaris <jm...@nexaweb.com>.
This was recently checked in. I've noticed it is stricter than the
parser we wrote, for example the new parser barfs on:

<xal:freePane>

</freePane>

The old parser does not. (But should have) Just a heads up if you are
seeing new parsing issues most likely these are real issues uncovered by
the recent checkin to use native xml parsing in Mozilla/FF.

James Margaris