473,395 Members | 1,969 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

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

Concating string to Xpath Exprn.

<xsl:variable name= "xpath">
<xsl:for-each select="ancestor::*">
<xsl:value-of select="name()"/><xsl:text>-</xsl:text>
</xsl:for-each>
<xsl:value-of select="name()"/>
</xsl:variable>


Hi ,
The above code generates the Xpath exprn from the root node.NBUt I would like to concat a string like "AAA" to the genarated Xpath ..So the Xpath wouls be like AAA: root/node1/.......etc
How do I do this.

Thanks.
Nov 27 '07 #1
1 1233
jkmyoung
2,057 Expert 2GB
Just put AAA before the for-each loop.
Or, use <xsl:text>AAA</xsl:text>
Nov 27 '07 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: Alastair Cameron | last post by:
VB6, MSXML 3.2 installed: Q1. I am having a problem selecting nodes with XPATH expressions when an attribute values contain backslashes (\\) in as part of its value: For example the...
2
by: Robert Kattke | last post by:
I'm getting a TransformerException when running Tomcat and calling a Servlet that use XML to create DOM and XSL to create webpage. I'm posting just the snippet of XSL code and the Error here. ...
1
by: kurt hansen | last post by:
hi I thought that this would be easy, but maybe not so much. I want to: pass an xpath expression and a string value to a stylesheet and copy the source xml document, changing the value of...
1
by: Murtaza Tinwala | last post by:
Hi mates, I have the following problem in XSLT. I have following variables: ref-file = <path of XML document> eg "xmlDoc.xml" repeatpath = <a repeat path expressed in Xpath like /root/person >...
4
by: Son KwonNam | last post by:
In XSLT, is this possible to get value from xml using XPath which is in XSLT variable? I mean XPath strings can be dynamic while XSL Transforming. If possible, How?? Because I'm not a...
3
by: sshahin | last post by:
Is there a way to Convert a Node to a String using XPath 1.0? For example, consider the following xml doc: <?xml version="1.0" encoding="UTF-8"?> <FaultTo xmlns="http://blah.org"...
2
by: C# newbie | last post by:
Hi, I'm new to xml and sometimes gives me a hardtime. is there any xpah query that returns a particular string I'm looking for? I used: //*contains(text()="foo") the "foo" could be in any...
8
by: Alpha | last post by:
I created the following code in my C# program but it's giving me error message at run time of : XML.XPATH.XPATHEXCEPTION : Namespace Manager or XSLTContext needed. This query has a prefix,...
4
by: Muthu08 | last post by:
I'm trying to Xpath EXprn for a current node(name unknown).I tried using the below syntax,but it fails .Pls help. <xsl:variable name= "xpath" select ="name(ancestor-or-self::(.))"/>
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
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
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.