473,394 Members | 1,800 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,394 software developers and data experts.

Selecting nodes ith the same attribute name value

I would like to make a call to <xsl:apply-templates select="nodes with
the
same name"/>.

To understand this better, we could think about email. In an email box
there
are several emails from several users. When clicking in "Order by Date"
or
"Order by Name" all emails are grouped by that "attribute". I would
exactly
to do that:

If we have:
<email>
<name>N1</name>
....
</email>

<email>
<name>N1</name>
....
</email>

<email>
<name>N2</name>
....
</email>

<email>
<name>N2</name>
....
</email>

<email>
<name>N2</name>
....
</email>

<email>
<name>N3</name>
....
</email>

I would like to have the tree instantiated in

<xsl:template select=3D"inbox/emails/name">

</xsl:template>

to
2 emails of N1
3 of N1
1 of N3

Is that possible?

Thans in Advance,
David

Feb 9 '06 #1
1 1375


DiTieM wrote:
I would like to make a call to <xsl:apply-templates select="nodes with
the
same name"/>.


Learn about keys and using them for grouping in XSLT 1.0, see here for
example
<http://www.jenitennison.com/xslt/keys.xml>
<http://www.jenitennison.com/xslt/grouping/index.xml>


--

Martin Honnen
http://JavaScript.FAQTs.com/
Feb 9 '06 #2

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

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...
9
by: Rolf Kemper | last post by:
Dear Experts, I got stuck with the following problem and need your help. What I wnat to do is to get a set of distinct nodes. Before the distinct I have selected the multiple occourences...
9
by: Tjerk Wolterink | last post by:
Hello, suppose i have a dom like this: <a> - <b> - <b> - <d> - </b> - <c>
5
by: Axial | last post by:
Question: How to select columns from Excel-generated XML when some cells are empty. I've found examples where rows are to be selected, but I can't seem to extrapolate from that to selecting...
2
by: Greg | last post by:
Hi. I have a rather large xml document (object) that can have one or more nodes with a certain attribute throughout (at ANY depth, not at the same level necessarily). I need to find this...
2
by: Susan | last post by:
Does anyone know the notation of how to select XML nodes based on an attribute. I know that it will be something like: root.SelectNodes ("descendant::key....") Sample xml is <indexdata> <key...
0
by: ~~~ .NET Ed ~~~ | last post by:
Hi, I am reading the attached XML file into a DataSet and that is so far OK. The problem is that I need to select a tree by its attribute (the Country node tree whose code attribute is XYZ) so...
2
by: K B | last post by:
I bit new to this. My xml files contains the following nodes: <root> <WI Title="Test1"> <Role Name="Legal"/> <Role Name="PM"/> </WI> <WI Title="Test1"> <Role Name="Legal"/> <Role...
1
by: jdhcards | last post by:
Hello, I've been banging my head against a problem all day without a solution, and I'm hoping you all can help. I've got a piece of XML that defines a set of elements in a flat list. Each of...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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...
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
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
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

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.