You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Peter Kröpfl <pe...@groebi.com> on 2004/06/01 19:56:59 UTC

multiple attributes with xsp:attribute xsp:param

Hi,

i am trying to build a tag with multiple attributes like that:

<link id="page.category.snowboarder" href="snowboarder/start">snowboarder</link>

(for i18n stuff)


I tried it this way

---8<-----------

<link>
 <xsp:attribute>
   <xsp:param name="name">id</xsp:param>
   page.category.<esql:get-string column="NAME"/>
 </xsp:attribute>
 <xsp:attribute>
   <xsp:param name="name">href</xsp:param>
   <esql:get-string column="NAME"/>/start
 </xsp:attribute>
 <esql:get-string column="NAME"/>
</link>

------------>8--

However, it does not work.
I could only generate one attribute, but not two, or more.

What's the problem with this code?


thanks,
peter


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


Re: multiple attributes with xsp:attribute xsp:param

Posted by Joerg Heinicke <jo...@gmx.de>.
On 01.06.2004 19:56, Peter Kröpfl wrote:

> Hi,
> 
> i am trying to build a tag with multiple attributes like that:
> 
> <link id="page.category.snowboarder" href="snowboarder/start">snowboarder</link>
> 
> (for i18n stuff)
> 
> 
> I tried it this way
> 
> ---8<-----------
> 
> <link>
>  <xsp:attribute>
>    <xsp:param name="name">id</xsp:param>
>    page.category.<esql:get-string column="NAME"/>
>  </xsp:attribute>
>  <xsp:attribute>
>    <xsp:param name="name">href</xsp:param>
>    <esql:get-string column="NAME"/>/start
>  </xsp:attribute>
>  <esql:get-string column="NAME"/>
> </link>
> 
> ------------>8--
> 
> However, it does not work.
> I could only generate one attribute, but not two, or more.
> 
> What's the problem with this code?

I don't see one, it looks ok. But you never know what the XSP 
stylesheets do with this code and what Java code comes out at the end. 
You should have a look into that code to see what happens. It should be 
located in the servlet container's work dir.

Joerg

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


Re: multiple attributes with xsp:attribute xsp:param

Posted by Carlos Chávez <cc...@agsoftware.dnsalias.com>.
Peter Kr&#246;pfl Escribio :-)
> Carlos Chávez <cchavez <at> agsoftware.dnsalias.com>
> writes:
>
>>
>> Joerg Heinicke Escribio
>> > On 01.06.2004 22:13, Carlos Chávez wrote:
>> >
>> >>><link>
>> >>> <xsp:attribute>
>> >>>   <xsp:param name="name">id</xsp:param>
>> >>>   page.category.<esql:get-string column="NAME"/>
>> >>> </xsp:attribute>
>> >>> <xsp:attribute>
>> >>>   <xsp:param name="name">href</xsp:param>
>> >>>   <esql:get-string column="NAME"/>/start
>> >>> </xsp:attribute>
>> >>> <esql:get-string column="NAME"/>
>> >>></link>
>> >>
>>
>>   it work, i never used. maybe in the stylesheet is the problem.
>>
>
> Here is the code from the stylesheet
>
> <xsl:template match="link">
> <a class="textlink" href="{@href}">
>  <i18n:text i18n:key="{@id}"> <xsl:apply-templates/> </i18n:text>
> </a>
> </xsl:template>

  Hi,
  you want that "id" is a key i18n? if it is thus then

  <xsl:template match="link">
   <a class="textlink" href="{@href}" id="{@id}" i18n:attr="id">
       ...
   </a>
  </xsl:template>

  where i18n:attr say what attribute have to be translated too.

  is that correct ?

  Cheers,
  Carlos Chávez.

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


-- 
Carlos Chávez

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


Re: multiple attributes with xsp:attribute xsp:param

Posted by Joerg Heinicke <jo...@gmx.de>.
On 01.06.2004 23:05, Peter Kröpfl wrote:

>>>>><link>
>>>>><xsp:attribute>
>>>>>  <xsp:param name="name">id</xsp:param>
>>>>>  page.category.<esql:get-string column="NAME"/>
>>>>></xsp:attribute>
>>>>><xsp:attribute>
>>>>>  <xsp:param name="name">href</xsp:param>
>>>>>  <esql:get-string column="NAME"/>/start
>>>>></xsp:attribute>
>>>>><esql:get-string column="NAME"/>
>>>>></link>
>>>>
>>  
>>  it work, i never used. maybe in the stylesheet is the problem.
> 
> Here is the code from the stylesheet

At least I meant the XSP stylesheets aka logicsheets.

> <xsl:template match="link">
> <a class="textlink" href="{@href}">
>  <i18n:text i18n:key="{@id}"> <xsl:apply-templates/> </i18n:text>
> </a> 
> </xsl:template>

I guess you also had a look on the output of the XSP without any 
transformation steps by serializing to XML immediately after the 
generator step?

Joerg

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


Re: multiple attributes with xsp:attribute xsp:param

Posted by Peter Kröpfl <pe...@groebi.com>.
Carlos Ch=?iso-8859-1?Q?=E1vez?= <cchavez <at> agsoftware.dnsalias.com> writes:

> 
> Joerg Heinicke Escribio 
> > On 01.06.2004 22:13, Carlos Chávez wrote:
> >
> >>><link>
> >>> <xsp:attribute>
> >>>   <xsp:param name="name">id</xsp:param>
> >>>   page.category.<esql:get-string column="NAME"/>
> >>> </xsp:attribute>
> >>> <xsp:attribute>
> >>>   <xsp:param name="name">href</xsp:param>
> >>>   <esql:get-string column="NAME"/>/start
> >>> </xsp:attribute>
> >>> <esql:get-string column="NAME"/>
> >>></link>
> >>
>   
>   it work, i never used. maybe in the stylesheet is the problem.
> 

Here is the code from the stylesheet

<xsl:template match="link">
<a class="textlink" href="{@href}">
 <i18n:text i18n:key="{@id}"> <xsl:apply-templates/> </i18n:text>
</a> 
</xsl:template>





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


Re: multiple attributes with xsp:attribute xsp:param

Posted by Carlos Chávez <cc...@agsoftware.dnsalias.com>.
Joerg Heinicke Escribio :-)
> On 01.06.2004 22:13, Carlos Chávez wrote:
>
>>><link>
>>> <xsp:attribute>
>>>   <xsp:param name="name">id</xsp:param>
>>>   page.category.<esql:get-string column="NAME"/>
>>> </xsp:attribute>
>>> <xsp:attribute>
>>>   <xsp:param name="name">href</xsp:param>
>>>   <esql:get-string column="NAME"/>/start
>>> </xsp:attribute>
>>> <esql:get-string column="NAME"/>
>>></link>
>>
>>
>>   Hi,
>>
>>   you forget the name of each attribute (<xsp:attribute name="name">
>> ...)
>
> Therefore he used <xsp:param>. Does this not work?

  Hi,
  it work, i never used. maybe in the stylesheet is the problem.

  Cheers,
  Carlos Chávez.

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


-- 
Carlos Chávez

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


Re: multiple attributes with xsp:attribute xsp:param

Posted by Joerg Heinicke <jo...@gmx.de>.
On 01.06.2004 22:13, Carlos Chávez wrote:

>><link>
>> <xsp:attribute>
>>   <xsp:param name="name">id</xsp:param>
>>   page.category.<esql:get-string column="NAME"/>
>> </xsp:attribute>
>> <xsp:attribute>
>>   <xsp:param name="name">href</xsp:param>
>>   <esql:get-string column="NAME"/>/start
>> </xsp:attribute>
>> <esql:get-string column="NAME"/>
>></link>
> 
> 
>   Hi,
> 
>   you forget the name of each attribute (<xsp:attribute name="name"> ...)

Therefore he used <xsp:param>. Does this not work?

Joerg

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


Re: multiple attributes with xsp:attribute xsp:param

Posted by Carlos Chávez <cc...@agsoftware.dnsalias.com>.
Peter Kr&#246;pfl Escribio :-)
> Hi,
>
> i am trying to build a tag with multiple attributes like that:
>
> <link id="page.category.snowboarder"
> href="snowboarder/start">snowboarder</link>
>
> (for i18n stuff)
>
>
> I tried it this way
>
> ---8<-----------
>
> <link>
>  <xsp:attribute>
>    <xsp:param name="name">id</xsp:param>
>    page.category.<esql:get-string column="NAME"/>
>  </xsp:attribute>
>  <xsp:attribute>
>    <xsp:param name="name">href</xsp:param>
>    <esql:get-string column="NAME"/>/start
>  </xsp:attribute>
>  <esql:get-string column="NAME"/>
> </link>

  Hi,

  you forget the name of each attribute (<xsp:attribute name="name"> ...)

  Carlos Chávez.

>
> ------------>8--
>
> However, it does not work.
> I could only generate one attribute, but not two, or more.
>
> What's the problem with this code?
>
>
> thanks,
> peter
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
> For additional commands, e-mail: users-help@cocoon.apache.org
>


-- 
Carlos Chávez

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