You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@xalan.apache.org by Arnaud Le Hors <le...@us.ibm.com> on 2000/08/01 04:17:23 UTC

Re: Problem building current XERCES / XALAN

The addition of the hasAttributes() method was decided by the W3C DOM WG
last week on my request. I implemented it right away and didn't realize
xalan depended on this interface and would break. Sorry about that.
It is trivial to fix though.
Note that the addition of this method was motivated by the fact that in
some implementations, such as Xerces, smaller memory footprint can be
achieved if instead of calling directly getAttributes(), you guard it
with a test of hasAttributes(). The point is that on an element without
any attributes you'll save the creation of a NamedNodeMap. I therefore
recommend everybody to update their code along those lines.
-- 
Arnaud  Le Hors - IBM Cupertino, XML Technology Group

PS: xerces-dev is dead. You should use xerces-j-dev instead.


Re: Problem building current XERCES / XALAN

Posted by Andreas Kasparz <an...@interface-business.de>.

Andreas Kasparz wrote:
> 
> 
> An interface **** I S  A  C O N T R A C T **** and I don't have the right
> to 'fix' them.

Sorry all back... DOM2 is a 'Candidate Recommendation' so changig interfaces
is ok...

--
************************************************************************
* Andreas Kasparz - andy@interface-business.de - +49 351 31809 0       *
* Interface-Business GmbH, Tolkewitzer Str. 49, 01277 Dresden, Germany *
************************************************************************

Re: Problem building current XERCES / XALAN

Posted by Andreas Kasparz <an...@interface-business.de>.
Arnaud Le Hors wrote:
> 
> The addition of the hasAttributes() method was decided by the W3C DOM WG
> last week on my request. I implemented it right away and didn't realize

This is a very, very bad solution I think. It would be better to extend
the W3-defined interface by your method and use the customized interface.

> xalan depended on this interface and would break. Sorry about that.

Only Xalan???
Suppose anyone have to develop a system which uses an XML parser and he
develops them based on Xerces. It will be impossible to use any other 
implementation. 

> It is trivial to fix though.

An interface **** I S  A  C O N T R A C T **** and I don't have the right
to 'fix' them.

> Note that the addition of this method was motivated by the fact that in
> some implementations, such as Xerces, smaller memory footprint can be
> achieved if instead of calling directly getAttributes(), you guard it
> with a test of hasAttributes(). The point is that on an element without
> any attributes you'll save the creation of a NamedNodeMap. I therefore
> recommend everybody to update their code along those lines.

Okay, may be this aspect of the interface is badly designed. But it is so.
It should be changed in the next official definition (DOM 2.x or whatever).

> --
> Arnaud  Le Hors - IBM Cupertino, XML Technology Group
> 
> PS: xerces-dev is dead. You should use xerces-j-dev instead.

--
************************************************************************
* Andreas Kasparz - andy@interface-business.de - +49 351 31809 0       *
* Interface-Business GmbH, Tolkewitzer Str. 49, 01277 Dresden, Germany *
************************************************************************