cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jeremy Quinn <>
Subject Re: latest xform
Date Tue, 14 Aug 2001 11:53:47 GMT
At 7:41 PM +0400 25/7/01, Piroumian, Konstantin wrote:
>I am trying to implement setValue() and addValue() and I'm faced a problem
>with XPath API. I am trying to find out is there a possibility for node
>insertion by an XPath expression. It seems that it's not possible with XPath
>Setting values is a simpler task: the node can be selected first then you
>can set its value by setNodeValue(). But what if the node is not present in
>the document? Say, you want to set a value by xpath 'a/b/c', but if you
>don't have 'a' and 'b' and 'c' node in your instance Document object then
>you have to parse XPath expression then iterate from root to the child and
>create every absend node.
>Maybe somebody knows an easier solution?

Just going back through all of this XForms stuff.

Piroumian, in the code for FP in Cocoon 1 at
org.apache.cocoon.processor.xsp.library.fp.fpResource there is a method

	Object sureNode(String XPath)

Albeit a bit untidy, but it does this job.

regards Jeremy

   Jeremy Quinn                                           Karma Divers
                                                       webSpace Design
                                            HyperMedia Research Centre

   <>     		 <>
    <phone:+44.[0].20.7737.6831>        <>

To unsubscribe, e-mail:
For additional commands, email:

View raw message