I tried that one... but i got the

org.xml.sax.SAXParseException: The value of attribute "select" must not
contain the '<' character.

because, we are trying to include the element <request:get-parameter> before

closing the<fp:read>.

when tried with

    <xsp:element name="fp:read">
    <xsp:attribute
name="select">../document[child::type=<request:get-parameter
name='type'/>]</xsp:attribute>
    <xsp:attribute name="from">repository</xsp:attribute>
    <xsp:attribute name="as">node</xsp:attribute>
 </xsp:element>

We can get the fp:read tag with request-parameter's value, like

<fp:read as="node" from="repository"
select="../document[child::type=Internal]"
xmlns:fp="http://apache.org/cocoon/XSP/FP/1.0";>

 </fp:read>

Actually I need the result of this fp:read  tag  not the fp:read tag.


Kevin D'Allaird wrote:

> Thangadurai,
>
> try
> <fp:read select="../document[child::type='<request:get-parameter
> name="type"/>']" from="repository" as="node"/>
>
> Kevin
>
> -----Original Message-----
> From: Thangadurai [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, September 04, 2001 7:56 AM
> To: cocoon-users
> Subject: dynamic select clause in fp:read tag?
>
> Hi All,
> In my xsp page,  I am using the fp:read tag to read an element  from an
> input (xml) file.
>
> My input xml file has the following elements
> <root>
>         <document>
>                         <type>internal</type>
>         </document>
>         <docuement>
>                         <type>external</type>
>         </docuement>
>         .. and so on..
> </root>
>
> I am using the fp:read tag like,,
>
> <fp:read select="../document" from="repository" as="node"/>
>
> it will include all the document elements into my dynamic page.. I don't
> want all the elements.
> I need only a particular elements which are satisfying my search
> criteria ..
> I have received a request parameter "type", and I want to use the value
> in my select clause..
> How can we add a dynamic select clause in fp:read tag? or is there any
> other way to solve this problem?
> If you give a reply , it will very usefull to me...
> expecting reply,
> Thangadurai
>
> ---------------------------------------------------------------------
> Please check that your question has not already been answered in the
> FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>
>
> To unsubscribe, e-mail: <[EMAIL PROTECTED]>
> For additional commands, e-mail: <[EMAIL PROTECTED]>


---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>

To unsubscribe, e-mail: <[EMAIL PROTECTED]>
For additional commands, e-mail: <[EMAIL PROTECTED]>

Reply via email to