xsl-list
[Top] [All Lists]

RE: i want no double xml records to be viewed

2003-07-21 02:09:47
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



<Prev in Thread] Current Thread [Next in Thread>