[opencms-dev] x:out and XPath

Dwayne Kristjanson dwayne at realdecoy.com
Wed Dec 13 22:19:05 CET 2006


>From what I've read so far, no. The select uses Xpath variables, not JSP expressions. $dom is the value returned by pageContext.findAttribute("dom"). If I use ${dom} it will dump the DOM object into the string. My error might be in the Xpath expression itself, but I doubt it. I get the same kind of errors with the JSTL examples in /sites/default/alkacon-documentation/examples_jstl/xml/ as I do with my own code. So I must be missing something from my Tomcat install, but I don't know what. All I can say for sure is that I get a NullPointerException whenever I call code that uses the XPath features of the JSTL XML taglib.

--
Dwayne Kristjanson 

-----Original Message-----
From: opencms-dev-bounces at opencms.org [mailto:opencms-dev-bounces at opencms.org] On Behalf Of Fabian Huschka
Sent: Wednesday, December 13, 2006 3:56 PM
To: The OpenCms mailing list
Subject: Re: [opencms-dev] x:out and XPath

Hello,

Dwayne Kristjanson schrieb:
> I'm having some issues using x:out in opencms. I've loaded a an 
> element into a DOM object using x:parse and when I inspect that object 
> directly it has the structure I expect. However when I try to use 
> x:out to display a value I get a NullPointerException.
>
> <c:set var="xmlData"><root><cms:include attribute="file"
> cacheable="false" element="mainbox" /></root></c:set> <x:parse 
> var="dom" xml="${xmlData}" /> <x:out select="$dom//p[1]" />
>   
Shouldn´t it read ${dom} ?

\Fab

_______________________________________________
This mail is sent to you from the opencms-dev mailing list To change your list options, or to unsubscribe from the list, please visit http://lists.opencms.org/mailman/listinfo/opencms-dev



More information about the opencms-dev mailing list