You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Annik Schoenmann <an...@idbsoft.ch> on 2000/12/13 17:23:09 UTC
problem with the xslt transformation
Hi
I have a problem with the xslt transformation of Cocoon (I use jetspeed)
I try to generate a name for my different paragraph texte1, texte2, text3...
Actually the result is texteNaN?
my XML:
....
<LigneParagraphe id="1">
<PetitParagraphe id="1">
<titre>titre1</titre>
<text>text of titre1</text>
</PetitParagraphe>
<PetitParagraphe id="2">
<titre>titre1</titre>
<text>text of titre1</text>
</PetitParagraphe>
</LigneParagraphe>
....
my XSL:
<textarea name="titre{(((../@id)*2)+1)}" cols="30" rows="2">Insérer votre
titre
<xsl:apply-templates select="PetitParagraphe[@id=1]/titre"/>
</textarea>
the result name:
name="texteNaN"
Re: problem with the xslt transformation
Posted by Annik Schoenmann <an...@idbsoft.ch>.
Hi it's ok now,
I had a division by zero
Sorry thanks
Annik
Re: problem with the xslt transformation
Posted by "Piroumian, Konstantin" <KP...@flagship.ru>.
This is not correct:
select="concat('titre',(((../@id)*2)+1))"/>
you cannot use attribute without { and } in expressions.
You must change it like this:
select="concat('titre',((({../@id})*2)+1))"/>
I didn't test it, so if it doesn't work you can send me a simple XML and
your XSL and I will take a look at it.
----- Original Message -----
From: "Annik Schoenmann" <an...@idbsoft.ch>
To: <co...@xml.apache.org>
Sent: 14 ??????? 2000 ?., ??????? 11:16
Subject: Re: problem with the xslt transformation
Hi
I try you syntax and this one
<xsl:variable name="idtitre"
select="concat('titre',(((../@id)*2)+1))"/>
<textarea name="{$idtitre}" cols="30" rows="4">insérer votre titre
<xsl:apply-templates select="PetitParagraphe[@id=1]/titre"/>
</textarea>
but it still don't work!! like if cocoon couldn't read the number any idea?
Regards Annik Schoenmann
----- Original Message -----
From: "Piroumian, Konstantin" <KP...@flagship.ru>
To: <co...@xml.apache.org>
Sent: Wednesday, December 13, 2000 5:48 PM
Subject: Re: problem with the xslt transformation
> Try to change this line like this:
> <textarea name="titre{(((../@id)*2)+1)}" cols="30" rows="2">Insérer votre
> into:
> <textarea cols="30" rows="2">
> <xsl:attribute name="name" select="concat('titre',
((({../@id})*2)+1))"
> />
> Insérer votre
> ...
>
> Regards,
> Konstantin Piroumian
>
> ----- Original Message -----
> From: "Annik Schoenmann" <an...@idbsoft.ch>
> To: <co...@xml.apache.org>
> Sent: 13 ??????? 2000 ?., ????? 19:23
> Subject: problem with the xslt transformation
>
>
> Hi
> I have a problem with the xslt transformation of Cocoon (I use jetspeed)
> I try to generate a name for my different paragraph texte1, texte2,
text3...
> Actually the result is texteNaN?
>
> my XML:
> ....
> <LigneParagraphe id="1">
> <PetitParagraphe id="1">
> <titre>titre1</titre>
> <text>text of titre1</text>
> </PetitParagraphe>
> <PetitParagraphe id="2">
> <titre>titre1</titre>
> <text>text of titre1</text>
> </PetitParagraphe>
> </LigneParagraphe>
> ....
>
>
> my XSL:
> <textarea name="titre{(((../@id)*2)+1)}" cols="30" rows="2">Insérer votre
> titre
> <xsl:apply-templates select="PetitParagraphe[@id=1]/titre"/>
> </textarea>
>
>
> the result name:
> name="texteNaN"
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: cocoon-users-unsubscribe@xml.apache.org
> For additional commands, e-mail: cocoon-users-help@xml.apache.org
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: cocoon-users-unsubscribe@xml.apache.org
> For additional commands, e-mail: cocoon-users-help@xml.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-users-unsubscribe@xml.apache.org
For additional commands, e-mail: cocoon-users-help@xml.apache.org
Re: problem with the xslt transformation
Posted by Annik Schoenmann <an...@idbsoft.ch>.
Hi
I try you syntax and this one
<xsl:variable name="idtitre"
select="concat('titre',(((../@id)*2)+1))"/>
<textarea name="{$idtitre}" cols="30" rows="4">insérer votre titre
<xsl:apply-templates select="PetitParagraphe[@id=1]/titre"/>
</textarea>
but it still don't work!! like if cocoon couldn't read the number any idea?
Regards Annik Schoenmann
----- Original Message -----
From: "Piroumian, Konstantin" <KP...@flagship.ru>
To: <co...@xml.apache.org>
Sent: Wednesday, December 13, 2000 5:48 PM
Subject: Re: problem with the xslt transformation
> Try to change this line like this:
> <textarea name="titre{(((../@id)*2)+1)}" cols="30" rows="2">Insérer votre
> into:
> <textarea cols="30" rows="2">
> <xsl:attribute name="name" select="concat('titre',
((({../@id})*2)+1))"
> />
> Insérer votre
> ...
>
> Regards,
> Konstantin Piroumian
>
> ----- Original Message -----
> From: "Annik Schoenmann" <an...@idbsoft.ch>
> To: <co...@xml.apache.org>
> Sent: 13 ??????? 2000 ?., ????? 19:23
> Subject: problem with the xslt transformation
>
>
> Hi
> I have a problem with the xslt transformation of Cocoon (I use jetspeed)
> I try to generate a name for my different paragraph texte1, texte2,
text3...
> Actually the result is texteNaN?
>
> my XML:
> ....
> <LigneParagraphe id="1">
> <PetitParagraphe id="1">
> <titre>titre1</titre>
> <text>text of titre1</text>
> </PetitParagraphe>
> <PetitParagraphe id="2">
> <titre>titre1</titre>
> <text>text of titre1</text>
> </PetitParagraphe>
> </LigneParagraphe>
> ....
>
>
> my XSL:
> <textarea name="titre{(((../@id)*2)+1)}" cols="30" rows="2">Insérer votre
> titre
> <xsl:apply-templates select="PetitParagraphe[@id=1]/titre"/>
> </textarea>
>
>
> the result name:
> name="texteNaN"
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: cocoon-users-unsubscribe@xml.apache.org
> For additional commands, e-mail: cocoon-users-help@xml.apache.org
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: cocoon-users-unsubscribe@xml.apache.org
> For additional commands, e-mail: cocoon-users-help@xml.apache.org
>
Re: problem with the xslt transformation
Posted by "Piroumian, Konstantin" <KP...@flagship.ru>.
Try to change this line like this:
<textarea name="titre{(((../@id)*2)+1)}" cols="30" rows="2">Insérer votre
into:
<textarea cols="30" rows="2">
<xsl:attribute name="name" select="concat('titre', ((({../@id})*2)+1))"
/>
Insérer votre
...
Regards,
Konstantin Piroumian
----- Original Message -----
From: "Annik Schoenmann" <an...@idbsoft.ch>
To: <co...@xml.apache.org>
Sent: 13 ??????? 2000 ?., ????? 19:23
Subject: problem with the xslt transformation
Hi
I have a problem with the xslt transformation of Cocoon (I use jetspeed)
I try to generate a name for my different paragraph texte1, texte2, text3...
Actually the result is texteNaN?
my XML:
....
<LigneParagraphe id="1">
<PetitParagraphe id="1">
<titre>titre1</titre>
<text>text of titre1</text>
</PetitParagraphe>
<PetitParagraphe id="2">
<titre>titre1</titre>
<text>text of titre1</text>
</PetitParagraphe>
</LigneParagraphe>
....
my XSL:
<textarea name="titre{(((../@id)*2)+1)}" cols="30" rows="2">Insérer votre
titre
<xsl:apply-templates select="PetitParagraphe[@id=1]/titre"/>
</textarea>
the result name:
name="texteNaN"
---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-users-unsubscribe@xml.apache.org
For additional commands, e-mail: cocoon-users-help@xml.apache.org