472,353 Members | 2,027 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,353 software developers and data experts.

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 5683


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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Stefan Siegl | last post by:
Hello, I am trying to learn XSLT to use it in another project. I start reading the book "Java and XSLT" and tried the examples and they are went...
5
by: Ruthless | last post by:
hello. All XML and XSLT are processed by preprocessor as a trees. How can i simply display my XML as some kind of tree. given xml: ...
3
by: Graham | last post by:
Hi, I am having trouble getting XSL to count the members of a group. What I am trying to do is group by <objectid.Contactid> and count the number...
12
by: gipsy boy | last post by:
Hello, I have sort of a big problem. I would really appreciate any help you could give me. I made a web service in C++ that throws XML to the...
4
by: Stephen | last post by:
I have the following that outputs an xml file to a div using ajax: <script type="text/javascript"> function ajaxXML(url,control_id){ if...
5
by: Patrick.O.Ige | last post by:
I have an xml and i'm trying to loop each node... When i do FOR EACH i seem not to get my desired result I want to loop through and get only the...
1
by: Nick | last post by:
I am working on a website for a client and one of their requirements was to have a mailing list. I decided to XSLT to transform "templates" to HTML...
2
by: Pathik | last post by:
Hi All, I am New to xml. Currently I am trying to transform one xml file to another file using xslt my xml file is as follows: <?xml...
4
by: mark4asp | last post by:
I have an element, report which contains tags which have been transformed. E.g. <pis &lt;p&gt <myXml> <report>This text has html tags in it.&lt;p&gt...
0
by: Naresh1 | last post by:
What is WebLogic Admin Training? WebLogic Admin Training is a specialized program designed to equip individuals with the skills and knowledge...
0
by: antdb | last post by:
Ⅰ. Advantage of AntDB: hyper-convergence + streaming processing engine In the overall architecture, a new "hyper-convergence" concept was...
0
by: AndyPSV | last post by:
HOW CAN I CREATE AN AI with an .executable file that would suck all files in the folder and on my computerHOW CAN I CREATE AN AI with an .executable...
0
by: Arjunsri | last post by:
I have a Redshift database that I need to use as an import data source. I have configured the DSN connection using the server, port, database, and...
0
by: Matthew3360 | last post by:
Hi, I have been trying to connect to a local host using php curl. But I am finding it hard to do this. I am doing the curl get request from my web...
0
Oralloy
by: Oralloy | last post by:
Hello Folks, I am trying to hook up a CPU which I designed using SystemC to I/O pins on an FPGA. My problem (spelled failure) is with the...
0
by: Carina712 | last post by:
Setting background colors for Excel documents can help to improve the visual appeal of the document and make it easier to read and understand....
0
BLUEPANDA
by: BLUEPANDA | last post by:
At BluePanda Dev, we're passionate about building high-quality software and sharing our knowledge with the community. That's why we've created a SaaS...
0
by: Rahul1995seven | last post by:
Introduction: In the realm of programming languages, Python has emerged as a powerhouse. With its simplicity, versatility, and robustness, Python...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.