473,327 Members | 2,118 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,327 software developers and data experts.

path to node as a string

Is it possible in XSLT to get the path to the current node as a string,
maybe change one element and then navigate to the new resulting string?

e.g.
I have two documents I want to merge. The root element has a different
name in each ("structure" and "values") but otherwise the trees -up to
the final leaf nodes- are the same.
I want to visit the nodes in "structure" and use the path to visit the
same nodes in "values", then insert the leaf nodes of values into
structure.

cheers

shaun
Jul 20 '05 #1
1 1354
In article <sh*****************************@sunnews.cern.ch >,
shaun <sh*******@cern.ch> wrote:
I want to visit the nodes in "structure" and use the path to visit the
same nodes in "values", then insert the leaf nodes of values into
structure.


Rather than constructing a complete xpath, I suggest that in each
template you maintain a variable pointing to the corresponding node in
the other document, which you pass as a parameter to the template.
Then use the position() of the current node to get the corresponding
child in the other document.

-- Richard
Jul 20 '05 #2

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

Similar topics

4
by: Sherman Willden | last post by:
I am trying to use Perl's XML::Twig to modify a version number in an XML document. At the very end of this posting is an excerpt from the xml document. Just before the xml excerpt is the Perl code...
4
by: The Clansman | last post by:
Hi, how do I get the path of an XML node? I have: Dim xmlNo As XmlNode = xml.SelectSingleNode("//Category") I want to get the path of the xmlNo: i.e.
1
by: orit | last post by:
I have the following xml file: <?xml version="1.0" encoding="utf-8" ?> <course id="2555" title="Developing Microsoft .NET Applications for Windows (Visual C# .NET)" length="5 days"...
4
by: Andy Gilman | last post by:
I want a method basically that tells me if a path is a file or directory, or any other possibilities. What do i need to do? I'm hoping I dont have to manually determine all these things with...
13
by: André Nogueira | last post by:
Hi there. I know you can view a node's fullpath property, but is it posible to select a node using its path? Like, tell the treeview that the node that should be selected is the node with the...
4
by: James L | last post by:
I have a tree view with a root, 3 noodes(1,2,3) each having one sub node. I drill down to a node. I get the path by saying treeView1.selectedNode.fullpath and assign it to a variable. If I...
2
by: James L | last post by:
I have finally developed some code that allows you to re populate a tree view and re select the last node that was clicked. However, you have to hard code it for the number of levels the tree view...
2
by: Christian Rühl | last post by:
heyho, guys! here's another question for you now: i built an iterator to get all the nodes with a certain attribute in an xml dom. it all looks like this (i'm using .NET framework 1.1) ...
5
by: Sharon | last post by:
How can I get the full XML path (as string) of a specific XmlNode ? -- Thanks Sharon
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

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.