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

Re: duplicate problem..

Subject: Re: duplicate problem..
From: "J.Pietschmann" <j3322ptm@xxxxxxxx>
Date: Mon, 05 Jan 2004 02:24:28 +0100
not xpath following duplicate
Paul Tomsic wrote:

I'm looping across:
  <Chapter_group>
    <Chapter id="7" isbn="0-324-12175" name="Data And
Statistics" original_number="0" page_count="25" />
    <Chapter id="8" isbn="0-324-12175" name="Data And
Statistics" original_number="1" page_count="25" />
    <Chapter id="9" isbn="0-324-12175"
name="Descriptive Statistics: Tabular And Graphical
Methods" original_number="2" page_count="53" />
 </Chapter_group>

with this:
	<xsl:variable name="unique-chapter-name-list"
select="//Chapter_group/Chapter[not(./@name =
following::./@name)]"/>
            ^^
This is not legal XPath syntax, you should have gotten an
error message. The ./ is redundant too. Try
  <xsl:variable name="unique-chapter-name-list"
    select="//Chapter_group/Chapter[not(@name =
     following::Chapter/@name)]"/>

Depending on your source and context, the following might
perform better (no // in front of the Cahpter_Group, and
using following-sibling):
  <xsl:variable name="unique-chapter-name-list"
    select="Chapter_group/Chapter[not(@name =
     following-sibling::Chapter/@name)]"/>

J.Pietschmann


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.