RE: [xsl] XML String as Parameter..

Subject: RE: [xsl] XML String as Parameter..
From: Ramesh B <ramesh_bhanu@xxxxxxxxx>
Date: Fri, 29 Mar 2002 22:43:22 -0800 (PST)
Hi All,
I will Explain my Requirement in Detail.
I am Using Xalan Processor.

Till Now i have on XML String build from Data Base as
Source 	and an XSL File for Transformation.This was
Working Fine.

But Now i Need One more XML String Created from
DataBase to Be Passed on to the XSL.This XML Deals
with display of some Related Information

So i thought i will pass my Second XML as a Parameter
to my XSL and Use it.
	
Now the Problem starts
The parameter is getting the XML Value Passed
But when i tried to refer the Parameter in XPath it
Gives the Error "Cannot convert string to NodeSet"

The i tried to load the Parameter to a variable using
document() function. 
<xsl:variable name="xmlvar"
 select="document(xalan:node-set($xmlparm))">
</xsl:variable>

Now it throws Error "For extension function, could not
find method
 java.lang.String.node-set([ExpressionContext,] ).

So i am in dilemma....

Can any body Give me a Solution for This or Suggest
any Alternatives.........
Hope my Requirement is Clear.

My Code is as follows.
I have Marked Errors raised for both of my options

<xsl:stylesheet
xmlns:xsl="http://www.w3.org/1999/XSL/Transform";
version="1.0"
xmlns:xalan="http://xml.apache.org/xslt/java";> 
 <xsl:output   method="html"/> 
  <xsl:param name="xmlparm"/>
   <xsl:variable name="xmlvar" 
	 select="document(xalan:nodeset($xmlparm))">
    </xsl:variable>

--This Throws Error
For extension function, could not find method
		java.lang.String.node-set([ExpressionContext,] ).
----
 <xsl:template match="/"> 
  <html>
	<body>	
		<xsl:value-of select="$xmlparm"/> 
--   This also Throws Error "Cannot convert String 			
to NodeSet"
				------Some More COde --------
	</body>
    </html>	
 </xsl:template> 
</xsl:stylesheet> 


Thanks a Lot for all the Help i Got,
Ramesh

__________________________________________________
Do You Yahoo!?
Yahoo! Greetings - send holiday greetings for Easter, Passover
http://greetings.yahoo.com/

 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread