Hi,
You can pass instance of org.w3c.dom.Node (or discendants) or NodeList in the
call javax.xml.transform.setParameter(String name, Object value). Two things to
note here:
a) you should be carefull with what you use to parse this xml tree, b/c Xalan
uses DTM inside and it might convert your tree to DTM tree if it's not
compatible (which might cause performance overhead).
b) often the same object implements both Node and NodeList interfaces. For
instance Xerces's NodeImpl implements NodeList for its children, thus call
NodeImpl.getChildNodes() returns "this" (NodeImpl). So if you'd call
t.setParameter("x", node.getChildNodes()) it'd be actually the same as to call
t.setParameter("x", node). Confusion about this is voiced often in this
mail-list.
Thanks,
Dimitry
-----Original Message-----
From: Bennett [mailto:[EMAIL PROTECTED]
Sent: Wednesday, July 23, 2003 09:06
To: [EMAIL PROTECTED]
Subject: <xsl:param/> value problem
Hi all,
I'm running into a situation where I need to pass an XML Tree into a
param in a stylesheet.
When the xml tree gets to the param something is converting the
brackets(< >) into entities (< > ).
Because of this I can't traverse the passed xml.
Is there way to either turn this conversion off or convert the entities
(<, > ) back into the brackets they represent?
TIA