Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > XML > XSLT: insert value inside of html-tag

Reply
Thread Tools

XSLT: insert value inside of html-tag

 
 
Angus Parvis
Guest
Posts: n/a
 
      08-06-2004
Greetings,

have a look at this HTML code:

<td colspan="2"><input type="submit" value="Submit"/></td>

I want to support internationalization. To do so, i define variables,
that contain the text in the appropriate language.

This works:

<title><xsl:value-of select="$text.title"/></title>

so I tried this:

<td colspan="2"><input type="submit" value="<xsl:value-of
select="$text.submit"/>"/></td>

But this does not work. How can I make it work?

Thanks for your help,

Angus
 
Reply With Quote
 
 
 
 
Martin Honnen
Guest
Posts: n/a
 
      08-06-2004


Angus Parvis wrote:


> have a look at this HTML code:
>
> <td colspan="2"><input type="submit" value="Submit"/></td>
>
> I want to support internationalization. To do so, i define variables,
> that contain the text in the appropriate language.
>
> This works:
>
> <title><xsl:value-of select="$text.title"/></title>
>
> so I tried this:
>
> <td colspan="2"><input type="submit" value="<xsl:value-of
> select="$text.submit"/>"/></td>
>
> But this does not work. How can I make it work?


Read up on attribute value templates in an XSLT tutorial of your choice:
<input value="{concat($text, '.submit')}" ... />
In a result element like that <input> element you can construct an
attribute value by using an XPath expression in curly braces {}.

--

Martin Honnen
http://JavaScript.FAQTs.com/

 
Reply With Quote
 
 
 
 
Angus Parvis
Guest
Posts: n/a
 
      08-06-2004
Martin Honnen wrote:
>
> Read up on attribute value templates in an XSLT tutorial of your choice:
> <input value="{concat($text, '.submit')}" ... />
> In a result element like that <input> element you can construct an
> attribute value by using an XPath expression in curly braces {}.


Thx

Angus
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Insert Multiple Records Using One Insert Statemen with MySQLdb module anton.ranieri.it@gmail.com Python 1 12-06-2008 12:47 PM
insert in std::map does not insert the object simon.elbaz@free.fr C++ 1 11-04-2007 11:42 PM
how to compare value of two fileds and based on that insert value into third fileds Tradeorganizer ASP General 5 01-31-2007 04:51 AM
Detailsview loses insert mode contents when Insert fails... cannontrodder ASP .Net 1 07-25-2006 08:38 AM
how do I get the value for the value in the radio buttons inside t Eskimo ASP .Net Web Controls 0 02-07-2005 05:07 PM



Advertisments