469,269 Members | 1,006 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,269 developers. It's quick & easy.

XSLT: insert value inside of html-tag

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
Jul 20 '05 #1
2 5588


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/

Jul 20 '05 #2
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
Jul 20 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

1 post views Thread by Stefan Siegl | last post: by
5 posts views Thread by Ruthless | last post: by
3 posts views Thread by Graham | last post: by
4 posts views Thread by Stephen | last post: by
5 posts views Thread by Patrick.O.Ige | last post: by
1 post views Thread by Nick | last post: by
2 posts views Thread by Pathik | last post: by
reply views Thread by zhoujie | last post: by
reply views Thread by suresh191 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.