On Fri, 2009-07-24 at 04:46 -0700, Frank Hamilton wrote:
>
>
> Thorsten Scherler-3 wrote:
> >
> >
> > Hmm, I have to admit I did not understand. As I understand the above
> > code the 2 alerts should be always the same, right?
> >
>
> Both should show the same alert, but not so.
>
> I try do that, and this is the result, root es : /pub-id/area/ , root2 es:
> pub-id/area and hack: pub-id/area
>
> var root2='<xsl:value-of select="$root"/>';
> var root='<xsl:value-of select="$root"/>';
>
> function obtener_comarcas(nomSupra){
> alert('root es :' +root);
> alert('root2 es :' +root2);
> alert('hack: <xsl:value-of select="concat($publication-id, '/',
> $area)"/>');
> }
>
> <![CDATA[
>
> Perhaps there is a problem to put the same variable name of the xsl and
> javascript.
>
Is worth a try, so instead of root use base for the jscript variable,
but actually that should not be the problem.
Do the following:
alert('XSL:ROOT es : <xsl:value-of select="$root"/>');
var root2='<xsl:value-of select="$root"/>';
alert('root2 es :' +root2);
alert('XSL:ROOT es : <xsl:value-of select="$root"/>');
var root='<xsl:value-of select="$root"/>';
alert('root es :' +root);
SALU2
> Thank Thor.
>
>
>
>
> Meaning the expected behavior is root=root2.
>
> So the error you see is the trailing slash on the end with alert('root
> en metodo: '+root);, right? I mean expected is '/pub-id/area' but it
> shows '/pub-id/area/'.
>
> Hmm, weird. Try the following for debug without the surrounding CDATA:
>
> function prueba(){
> alert('hack: <xsl:value-of select="concat($publication-id, '/',
> $area)"/>');
> alert('root en metodo: '+root);
>
>
> > you have any idea why this happens, thanks.
>
> Not really, really strange, are you sure that in between the call you
> are not adding a '/' somewhere which does not explain why the second
> call does not contain it anymore.
>
> salu2
> --
> Thorsten Scherler <thorsten.at.apache.org>
> Open Source Java <consulting, training and solutions>
>
> Sociedad Andaluza para el Desarrollo de la Sociedad
> de la Información, S.A.U. (SADESI)
>
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>
>
>
>
--
Thorsten Scherler <thorsten.at.apache.org>
Open Source Java <consulting, training and solutions>
Sociedad Andaluza para el Desarrollo de la Sociedad
de la Información, S.A.U. (SADESI)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]