cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ashish maurya <ashish.mau...@ttimail.com>
Subject RE: XPath with FP Taglib
Date Thu, 26 Oct 2000 22:37:56 GMT
> <fp:write> creates tags automatically, as required.
>
> If you look at the code, it calls a method called "sureNode" if the XPath
> in the "select" attribute cannot be found. This is why only simple paths
> can be used in an <fp:write>'s select attribute, if you are writing to
> non-existent nodes. (Or you could say it is because I am too lazy to parse
> out a complex XPath :)
>
> So if I use a tag like this:
>
>	<fp:write to="external" select="one/two/three/four">
>		<request:get-parameter name="blah"/>
>	</fp:write>
>
> and none of that lot exist, they will all be created in the external
document.

Is this behavior true for Cocoon 1.8. I modified the sample to create an
item like:

<item>
  <phone>
    <value>555-1212</value>
  </phone>
</item>

When I try to do

	<fp:write to="external" select="phone/value">
		<request:get-parameter name="value"/>
	</fp:write>

I get:

<item>
    <value>555-1212</value>
</item>

I was able to keep my phone tag by doing this:

	<fp:write to="external" select="phone"/>
	<fp:write to="external" select="phone/value">
		<request:get-parameter name="value"/>
	</fp:write>

Thanks,

Ash


**********************************************************************
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
the system manager.

This footnote also confirms that this email message has been swept by
MIMEsweeper for the presence of computer viruses.

www.inip.com
**********************************************************************

Mime
View raw message