You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by km <km...@o2.pl> on 2007/03/21 11:25:14 UTC

javascript and xpath

Hello

I have a problem, maybe someone can halp me to solve it.

I use javascript function for statistic. I need to give a name of document, that will be downloaded. I can send on function an ID (docId) of this document and I need to find a name.

I can find the way to the document.

I tried:

<xsl:value-of select="//download[@docId=" + docId + "]/docName"/>;

and other combinations. But I still have no result.

If I try: "//download[@docId=" + docId + "]/docName";

I get: //download[@docId=XXX]/docName -> XXX ist the value of docId.

I use Cocoon 2.1 and Apache 5.1

Thank for any help.

Kris




-- 
****************************
kmConsulting
Krzysztof Murmylo

Mobil: +49 179 31 53 791
eMail: info@kmconsulting.org
http://www.kmconsulting.org
****************************

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Re: Re: javascript and xpath

Posted by km <km...@o2.pl>.
Hallo

It does not work. But I found another solution. I send this name with other params to function.

Thanks anyway.

Kris


> Hi Kris,
> 
> I'm not sure if I caught your problem, but let me give it a try...
> 
> - I have no XSL docs at hand but does "+" really work? I'd try
> concat('//download[@docId=', docID, '/docName')
> - What about xsl:variable or xsl:param ? I doubt it works with just "docId".
> 
> Perhaps this link may help:
> http://www.cafeconleche.org/books/bible2/chapters/ch17.html
> 
> Bye,
> Florian
> 
> 
> km wrote:
> > Hello
> >
> > I have a problem, maybe someone can halp me to solve it.
> >
> > I use javascript function for statistic. I need to give a name of document, that will be downloaded. I can send on function an ID (docId) of this document and I need to find a name.
> >
> > I can find the way to the document.
> >
> > I tried:
> >
> > <xsl:value-of select="//download[@docId=" + docId + "]/docName"/>;
> >
> > and other combinations. But I still have no result.
> >
> > If I try: "//download[@docId=" + docId + "]/docName";
> >
> > I get: //download[@docId=XXX]/docName -> XXX ist the value of docId.
> >
> > I use Cocoon 2.1 and Apache 5.1
> >
> > Thank for any help.
> >
> > Kris
> >
> >
> >
> >
> >   
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
> For additional commands, e-mail: users-help@cocoon.apache.org
> 

-- 
****************************
kmConsulting
Krzysztof Murmylo

Mobil: +49 179 31 53 791
eMail: info@kmconsulting.org
http://www.kmconsulting.org
****************************

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Re: javascript and xpath

Posted by Dev at weitling <de...@weitling.net>.
Hi Kris,

I'm not sure if I caught your problem, but let me give it a try...

- I have no XSL docs at hand but does "+" really work? I'd try
concat('//download[@docId=', docID, '/docName')
- What about xsl:variable or xsl:param ? I doubt it works with just "docId".

Perhaps this link may help:
http://www.cafeconleche.org/books/bible2/chapters/ch17.html

Bye,
Florian


km wrote:
> Hello
>
> I have a problem, maybe someone can halp me to solve it.
>
> I use javascript function for statistic. I need to give a name of document, that will be downloaded. I can send on function an ID (docId) of this document and I need to find a name.
>
> I can find the way to the document.
>
> I tried:
>
> <xsl:value-of select="//download[@docId=" + docId + "]/docName"/>;
>
> and other combinations. But I still have no result.
>
> If I try: "//download[@docId=" + docId + "]/docName";
>
> I get: //download[@docId=XXX]/docName -> XXX ist the value of docId.
>
> I use Cocoon 2.1 and Apache 5.1
>
> Thank for any help.
>
> Kris
>
>
>
>
>   

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org