You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@xalan.apache.org by Dmitry Volpyansky <dv...@webstreetsecurities.com> on 2000/01/21 02:48:31 UTC

Extension Function: How to add an attribute

I didn't see anything in the extensions.html file to help me with this.

Is it possible to have the extension function modify the passed in nodes,
adding attributes, siblings, etc?

Before calling my Java extension function, the node looks like:

    <ND Attribute1="A1"/>

In my extension function, I want to add an attribute to the node, so that
after the function returns, the current Node is:

    <ND Attribute1="A1" Attribute2="A2"/>

and I can go on processing my stylesheet now having access to that
attribute.


I thought that I could create an Attribute node from the DTMProxy's
createAttribute() method, but that method throws "unimplemented".

How can I get access to the Document object that I am working on so that I
can call createElement(), createAttribute()?

Thank you for your help,

Dmitry Volpyansky