[xsl] Trying to match elements NOT found in external document
Subject: [xsl] Trying to match elements NOT found in external document|
From: "G. T. Stresen-Reuter" <tedmasterweb@xxxxxxxxx>
Date: Tue, 31 Mar 2009 20:04:55 +0100
It's been a while since I've written. I hope this email finds everyone
doing well... on to business...
I'm trying to match items in the source XML document that are NOT
present in an external XML document.
For example, Given the following XML documents I would like to match
the atom:entry element whose atom:id = xyz by virtue of the fact that
there is no corresponding email story with the same id.
I've tried the following and in spite of the fact that most
documentation states that keys include documents included via the
document() function, I've been unable to verify that this is true.
Here is the stylesheet I've tried to no avail:
<xsl:key name="emailedstories" match="id" use="normalize-space(.)" />
<!-- there are many references to emailedstories.xml prior to the line
below, for example -->
<!-- to select just the entry elements that are NOT in the
emailedstories.xml file, I've been trying this -->
atom:id)) = 0]" />
This doesn't work. I suspect I'm confused about what the context node
is and/or about comparing node sets vs. strings/numbers.
Does anyone have any suggestions on how to do what I'm trying to do?
Many thanks in advance!
G. T. Stresen-Reuter