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

Home Posts Topics Members FAQ

Id over multiple nodes

Is it possible to create an id over multiple nodes? I would like to
use generate-id which includes all of the Route nodes which has
a direction of 1.

So I don't want to for-each each Route node and run generate-id
on each on of them but bulk them all together and generate an id
for the nodes

<Routes>
<Route>
<City1>A</City1>
<City2>B</City2>
<DateTime1>10:00</DateTime1>
<DateTime2>11:15</DateTime2>
<Direction>1</Direction>
</Route>
<Route>
<City1>B</City1>
<City2>C</City2>
<DateTime1>12:00</DateTime1>
<DateTime2>14:00</DateTime2>
<Direction>1</Direction>
</Route>
<Route>
<City1>B</City1>
<City2>C</City2>
<DateTime1>12:00</DateTime1>
<DateTime2>14:00</DateTime2>
<Direction>2</Direction>
</Route>
</Routez>

I tired generate-id(Route[Direction=1]) but it stills only takes the
first Route element it encounters and I can't generate the id based
on the Routes node since it can contain both Route nodes which
contain Direction 1 and elements which cntain Direction 2.'

So what I want from the XML above is an ID which spans these
nodes at the same time

<Route>
<City1>A</City1>
<City2>B</City2>
<DateTime1>10:00</DateTime1>
<DateTime2>11:15</DateTime2>
<Direction>1</Direction>
</Route>
<Route>
<City1>B</City1>
<City2>C</City2>
<DateTime1>12:00</DateTime1>
<DateTime2>14:00</DateTime2>
<Direction>1</Direction>
</Route>

(This is me trying to break my problem into sub-problems =)

//Andreas
Nov 12 '05 #1
3 1219


Andreas Håkansson wrote:
Is it possible to create an id over multiple nodes? I would like to
use generate-id which includes all of the Route nodes which has
a direction of 1.


An id unique indentifies a node in an XML document, there is no id for
several nodes nor is there an id restricted to indentify a node in some
subset of the document.

--

Martin Honnen
http://JavaScript.FAQTs.com/
Nov 12 '05 #2
Martin,

Thank you for your reply. Perhaps you have thought you could
contribute to my earlier post with the subject

"Grouping over multiple nodes - possible?"

Thanks,

Andreas

"Martin Honnen" <ma*******@yahoo.de> skrev i meddelandet
news:O5**************@TK2MSFTNGP09.phx.gbl...


Andreas Håkansson wrote:
Is it possible to create an id over multiple nodes? I would like to
use generate-id which includes all of the Route nodes which has
a direction of 1.


An id unique indentifies a node in an XML document, there is no id for
several nodes nor is there an id restricted to indentify a node in some
subset of the document.

--

Martin Honnen
http://JavaScript.FAQTs.com/

Nov 12 '05 #3

Is it possible to create an id over multiple nodes? I would like to
use generate-id which includes all of the Route nodes which has
a direction of 1.

So I don't want to for-each each Route node and run generate-id
on each on of them but bulk them all together and generate an id
for the nodes

<Routes>
<Route>
<City1>A</City1>
<City2>B</City2>
<DateTime1>10:00</DateTime1>
<DateTime2>11:15</DateTime2>
<Direction>1</Direction>
</Route>
<Route>
<City1>B</City1>
<City2>C</City2>
<DateTime1>12:00</DateTime1>
<DateTime2>14:00</DateTime2>
<Direction>1</Direction>
</Route>
<Route>
<City1>B</City1>
<City2>C</City2>
<DateTime1>12:00</DateTime1>
<DateTime2>14:00</DateTime2>
<Direction>2</Direction>
</Route>
</Routez>

I tired generate-id(Route[Direction=1]) but it stills only takes the
first Route element it encounters and I can't generate the id based
on the Routes node since it can contain both Route nodes which
contain Direction 1 and elements which cntain Direction 2.'

So what I want from the XML above is an ID which spans these
nodes at the same time

<Route>
<City1>A</City1>
<City2>B</City2>
<DateTime1>10:00</DateTime1>
<DateTime2>11:15</DateTime2>
<Direction>1</Direction>
</Route>
<Route>
<City1>B</City1>
<City2>C</City2>
<DateTime1>12:00</DateTime1>
<DateTime2>14:00</DateTime2>
<Direction>1</Direction>
</Route>

(This is me trying to break my problem into sub-problems =)

//Andreas


User submitted from AEWNET (http://www.aewnet.com/)
Nov 12 '05 #4

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

Similar topics

3
7602
by: Michael | last post by:
Hello, I am creating an XSL that is going to create a report from XML we recieve from another system. The XML would look like: <report> <page> <header1> <data1>asdf</data1>...
2
3494
by: RIck Measham | last post by:
I have a dynamically generated table, filled from a database by a perl application. Each row represents a database record and has a 'status' and a unique 'id'. What I want to do is create...
0
1523
by: Eric Promislow | last post by:
Has anyone else run into this? The problem is that I'm loading one schema at a time, to be displayed in a TreeView. Each node in the tree points to an item in the schema via the Tag property. ...
2
1685
by: Andreas Håkansson | last post by:
Seeing how my previous post seem to have fallen between the cracks, I thought I would have a second, more direct, go at it. So my question is "Is it possible to group (Muenchian method) over...
3
2546
by: Hazz | last post by:
I am just beginning to design a Treeview display (winforms) for wine regions. Problem. Some wine growing regions belong to two counties. Eg. Carneros is in both Napa and Sonoma Counties. Although...
5
4440
by: Rothariger | last post by:
Hello.... i want to know if its posible to rename multiple files like windows does.. example: file zzzzzzz.doc file asdasd.doc file esfsefse.doc
0
1617
by: Nihar | last post by:
Hello all, I m just trying to add multiple nodes to an existing xml file. Here is my sample. <ADT> <IN1> <DG1> <GT1>
1
1957
by: icfai | last post by:
hi friends.... I have got a problem regarding loading of multiple assemblies, actually its required for an editor which implements the intellisenseas in vb or dotnet. for that it is required to...
1
2725
by: karthee | last post by:
I am creating a custom treeview with multiple selection, if i select multiple nodes and right click, the selection is disappearing, i tried with somany things like on mouse click my code is...
0
7130
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
7220
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
7386
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...
0
5468
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,...
1
4918
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
4599
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
3098
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
3090
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
295
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

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.