View Single Post
 
Old March 29th, 2006, 05:41 PM
asap asap is offline
Authorized User
 
Join Date: Mar 2006
Location: , , .
Posts: 11
Thanks: 0
Thanked 0 Times in 0 Posts
Default pass DOM to XSL as parameter

Hi All,
I want to pass DOM as parameter to my XSL.Problem i am getting is node-set conversion.
Cann't i achieve the same functionality of xsl document function in my java code.
I am using eclipse to run my xsl code.Not sure about the XSLT processor.
transformer.setParameter("contents",doc);
my xsl is

<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:param name="contents"/>
  <xsl:template match="/">
    <xsl:element name="newRoot">
      <xsl:copy-of select="$contents/employee/name"/>
    </xsl:element>
  </xsl:template>
</xsl:stylesheet>