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

Matching not only references via keys but also unique

Subject: Matching not only references via keys but also unique sets of child elements
From: "Young Matthew" <matthew.young@xxxxxxxxxxxxxxxxxxxx>
Date: Fri, 18 Feb 2005 08:14:35 +0100
via keys
Hej,

Got referencing nodes (defined by the presense of @reference-id
attribute) and referenced nodes (defined by the presense of @id) which
together to make a complete resource definition by their combined
instances a particular child (see below) and their shared reference id.
What I want is to find unique instances of "resource definitions" and be
able to bypass duplicates (using Xpath 1.0 and XSL 1.0 without extended
functions).  In other words, the second referencing node below is a
duplicate to the one above it since they have the exact same "set"
elements (i.e. same name and value values) plus the same reference id
(i.e. "xyz").  However, the third referencing node is completely unique
to the preceding nodes.

Right now I make a string footprint of the currently processed resources
node (i.e. "xyz,c1=c1,d1=d1") and match that against other nodes with
same reference-id.  Seems kind of a brute-force solution.



<resource id="xyz">
	<set name="a1" value="a1"/>
</resource>

<resource reference-id="xyz">
	<set name="c1" value="c1"/>
	<set name="d1" value="d1"/>
</resource>

<resource reference-id="xyz">
	<set name="c1" value="c1"/>
	<set name="d1" value="d1"/>
</resource>

<resource reference-id="xyz">
	<set name="c1" value="c1"/>
</resource>

/Matthew Young

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.