[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

RE: i want no double xml records to be viewed

Subject: RE: i want no double xml records to be viewed
From: Jarno.Elovirta@xxxxxxxxx
Date: Mon, 21 Jul 2003 12:09:47 +0300
xml one record
Hi,


> Please take a look at my problem. 
> 
> I have xml-records with a tag that have the same  content, like 
> this tag: 
> <PPN>12345</PPN>, I want just one record to be  shown in 
> my ie-explorer, is it possible to add a  line in my stylesheet to 
> prevent this? 
> 
> Nico Noordhoek
> 
> 
> --------------- 
> THIS IS A PART OF MY STYLESHEET 
> 
> <?xml version="1.0"?> 
> <xsl:stylesheet 
> xmlns:xsl="http://www.w3.org/TR/WD-xsl"> 

You're using Microsoft's XSL, not XSLT; see <http://www.netcrucible.com/xslt/msxml-faq.htm>. Rewrite your stylesheet as XSLT, and come back with it.

Anyhow, if you want to show only one record, then process only one record in your stylesheet instead of all of them. You can achieve this (with XSLT and XPath) using predicates and position() function, e.g.

  //record[position() = 1]

Cheers,

Jarno - Codec & Flexor: Black Diamonds

 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.