473,499 Members | 1,725 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

XSLT: Problem with WML the card title

Hi all,
i have a little problem.... in the XML i have a tag named "title",
where there is the text that i want to use for the title of the card
name in the resul WML. The problem is that i cant write
<card id="guest" title="<xsl:apply-templates select="//title"/>">
cause the tag will be bad-formed.

How can i solve this?

Thanks in advance,
Flyzone
Here the XSLT:
<xsl:template match="/guest">
<wml>
<card id="guest" title="Please Login">
<p><xsl:apply-templates select="//error"/></p>
</card>
</wml>
</xsl:template>

<xsl:template match="//title">
<xsl:value-of select="//title"/>
</xsl:template>


Here the XML:
<guest>
<title>Please Login</title>
<error>You'r not logged, please log </error>
<link>here</link>
</guest>

Jul 20 '05 #1
2 1372
On Sun, 23 Jan 2005 13:11:17 +0100, Flyzone <fl*****@technologist.com>
wrote:
How can i solve this?


I found the solution by myself... it was a simple {title}
:-/
Jul 20 '05 #2


Flyzone wrote:

in the XML i have a tag named "title",
where there is the text that i want to use for the title of the card
name in the resul WML. The problem is that i cant write
<card id="guest" title="<xsl:apply-templates select="//title"/>">
cause the tag will be bad-formed.


You can use so called attribute value templates to create the value of
an attribute from an XPath expression e.g.
<card title="{//title}"
The curly brackets indicate that the value is taken by evaluating the
XPath expression inside of the brackets.

--

Martin Honnen
http://JavaScript.FAQTs.com/
Jul 20 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
2140
by: Moogy | last post by:
I'm pulling my hair out here. First, I'm new to XML, so that doesn't help, but none of this makes any sense to me. All I'm trying to do is take a simple source XML file and translate it with an...
7
2825
by: Harolds | last post by:
The code below worked in VS 2003 & dotnet framework 1.1 but now in VS 2005 the pmID is evaluated to "" instead of what the value is set to: .... xmlItems.Document = pmXML // Add the pmID...
7
1267
by: One Handed Man \( OHM - Terry Burns \) | last post by:
I've been battling with this stupid problem for hours now. WebApp: Trying to do a simple transformation using XSLT to a Web Page, but it just failes without an error message ( In other words,...
2
2994
by: swethak | last post by:
hi , i write the code in .htm file. It is in cgi-bin/searches/one.htm.In that i write a form submitting and validations.But validations are not worked in that .htm file. I used the same code in my...
0
7128
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7169
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7215
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
7385
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
1
4917
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4597
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3096
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
1425
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
661
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.