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

XSL: Unique elements

I have a xml file with a lot of repeting <title> tags, and I want to
show the content of <title> tags on a site. However I don't want to show
<title>C.S.I</title> many times.

E:G:
----xml-----
....
<program>
<time>23:15</time>
<title>C.S.I</title>
</program>
...other programs..
<program>
<time>21:10</time>
<title>C.S.I</title>
</program>
--------------------

---Output----
-Angel
-C.S.I
-Band of brothers
.....

You see I don't want C.S.I to appear twice just because it exists in two
different times in the xml file. How do I solve this?

Jørn T
Jul 20 '05 #1
1 3590
Jørn Tommy Kinderås wrote:
I have a xml file with a lot of repeting <title> tags, and I want to
show the content of <title> tags on a site. However I don't want to show
<title>C.S.I</title> many times.

E:G:
----xml-----
...
<program>
<time>23:15</time>
<title>C.S.I</title>
</program>
..other programs..
<program>
<time>21:10</time>
<title>C.S.I</title>
</program>
--------------------

---Output----
-Angel
-C.S.I
-Band of brothers
....

You see I don't want C.S.I to appear twice just because it exists in two
different times in the xml file. How do I solve this?

Jørn T


hi,

have a look at the muenchian method

for example :
http://www.jenitennison.com/xslt/gro...muenchian.html

--
Cordialement,

///
(. .)
-----ooO--(_)--Ooo-----
| Philippe Poulard |
-----------------------
Jul 20 '05 #2

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

Similar topics

5
by: Kasp | last post by:
Hi, I have an XSL here...and though I understand XML, I am having a hard time understanding what this XSL does? Any help will be appreciated. TIA <xsl:stylesheet...
4
by: Jean-Christophe Michel | last post by:
Hi, In a complex merging of two (non ordered) xml files i need to keep track of the elements of the second tree that were already merged with first tree, to copy only unused elements at the end....
4
by: Victor Engmark | last post by:
When looking for a method to fetch unique elements and counting the number of occurences of each of them, I found quite a lot of gross examples of complex XSL. But after realizing the subtle...
14
by: inquirydog | last post by:
Hi- One frusterating thing for me with xsl is that I don't know how to make xslt throw some sort of exception when a value-of path does not exist. For instance, suppose I have the following...
5
by: eric | last post by:
Hi,everyone: I have my xml data defined as xml data definition I: <?xml version="1.0"?> <parents> <parent> <id>1000</id>
8
by: mikea_59 | last post by:
I am having trouble combining similar elements. Elements can be combined if they have the same name and the same attribute values. I can handle single level elements but am having problems with...
4
by: JLP | last post by:
Hello, I have a couple of hundred books in TEI based XML. I want to output html and pdf documents. I started building my own style sheets to do this and I ran into a problem with footnotes. Many...
3
by: Sandy | last post by:
Hi, I have the follwing XML and XSL files, i want to do XSL transformation but its not working because of the presence of xmlns="Science" in the Envelope element, It works fine after removing it....
14
by: ajfish | last post by:
Hi, I am trying to allocate a unique ID to every instance of tag 'foo' in a large XML document. currently I'm doing this: <xsl:variable name="UniqueId"> <xsl:number count="foo" level="any"/>...
2
by: tschwartz | last post by:
I have an xml document in which elements are hierarchically related to eachother conceptually. Unfortunately, the hierarchical relationship is not modelled in the schema (i.e., the elements are...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
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: 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...
0
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: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
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.