Xpath does not recognise parameter values when run through Tomcat 2003-03-27 - By Foxy Shadis
Just as a suggestion, but have you tried immediately reassigning the param to a variable, or otherwise accessing it from the start, to make sure it gets in at all? If so, it might be losing its value somehow, which assigning it to a variable could help with until the behavior is fixed. I just tend to notice this in func:function and occasionally templates, so maybe it would happen globally too.
Foxy
Swiftpaw Foxyshadis, wildlife artist foxyshadis@(protected) | http://foxyshadis.dyndns.org/
>From: "Robinson Simon" <Simon_Robinson@(protected)> >To: <xalan-j-users@(protected)> >Subject: Xpath does not recognise parameter values when run through Tomcat >Date: Thu, 27 Mar 2003 04:35:58 -0500 > >I am having a problem when trying to get pass a value into a XSL >transformation. > >The parameters are recognised and I can display the values which I pass in, >but when I want to use the >values in Xpath such as <xsl:variable name="one" >select="//fullname[@(protected)=$attributeid]"/> nothing is produced, but when I do > ><xsl:variable name="one" select="//fullname[@(protected)='simon']"/> the exact >output I require is produced. > >This is only a problem when doing the transformn using Java to call the >transformation through Tomcat. > > if >(XMLSource.getClass().getName().compareTo("javax.xml.transform.stream .StreamSource") >== 0 ) { > >if(transformResult.getClass().getName().compareTo("javax.xml.transform.stream .StreamResult") >== 0 ) > { System.out.println("JT Got this far then 2.1" + >element_name_search); > >transformer.setParameter("attributeid","simon"); > transformer.transform((StreamSource) >XMLSource,(StreamResult)transformResult); } > System.out.println("The value of the attributeid parameter is before call >is" + element_name_search); > >When I do the tranform through the command line I get the expected output. > >Can anyone help me. I believe it maybe incompatibilities between versions >of Tomcat/JSP/Xalan. > >Has anyone else seen this problem. > >Regards > >Simon
_________________________________________________________________
|
|