You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Upayavira <uv...@upaya.co.uk> on 2003/12/10 22:12:36 UTC
Getting a node with JXPath
I'm using the jxpath #{./title} within <jx:for> in jxtemplate, and it is
returning <title>Some text</title>, instead of just 'Some text'. How do
I cause it to just return the text content, and not the whole node?
Thanks,
Upayavira
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org
Re: Getting a node with JXPath
Posted by Upayavira <uv...@upaya.co.uk>.
Marc Portier wrote:
>
>
> Upayavira wrote:
>
>> I'm using the jxpath #{./title} within <jx:for> in jxtemplate, and it
>> is returning <title>Some text</title>, instead of just 'Some text'.
>> How do I cause it to just return the text content, and not the whole
>> node?
>>
>
> not working with: "./title/text()" ?
What I should say is that the XML that I'm using is coming out of
XIndice. ./title/text() gives me a null pointer exception:
at org.apache.cocoon.generation.JXTemplateGenerator.execute(JXTemplateGenerator.java:3090)
at org.apache.cocoon.generation.JXTemplateGenerator.execute(JXTemplateGenerator.java:3285)
at org.apache.cocoon.generation.JXTemplateGenerator.generate(JXTemplateGenerator.java:2842)
at org.apache.cocoon.components.pipeline.AbstractProcessingPipeline.processXMLPipeline(AbstractProcessingPipeline.java:557)
Upayavira
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org
Re: Getting a node with JXPath
Posted by Marc Portier <mp...@outerthought.org>.
Upayavira wrote:
> I'm using the jxpath #{./title} within <jx:for> in jxtemplate, and it is
> returning <title>Some text</title>, instead of just 'Some text'. How do
> I cause it to just return the text content, and not the whole node?
>
not working with: "./title/text()" ?
regards,
-marc=
--
Marc Portier http://outerthought.org/
Outerthought - Open Source, Java & XML Competence Support Center
Read my weblog at http://blogs.cocoondev.org/mpo/
mpo@outerthought.org mpo@apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org