[KLUG Members] Possible with XPATH/XSLT?
Adam Tauno Williams
members@kalamazoolinux.org
Wed, 5 Feb 2003 16:24:21 -0500
I've been making some pretty cool stuff with XML & XSLT, generating multiple
reports from the same root document, etc... But now I've bumped into something
my $9 XPATH/XSLT book from Bargain Books doesn't seem to cover. Maybe it isn't
possible (it feels like it might not be).
What I want is to "select" for the report (XML->XSLT->Document) each part where
there not a corresponding "part" (oem+native) from "vendor" 801. So for the
first "sku" 913397 I'd 'pick' both parts, but for the second "sku" 913304" I'd
only pick the last one since all the other oem+native combinations have a
matching part from vendor 801.
Possible?
<?xml version="1.0" standalone="yes"?>
<catalogreport>
<stockingunit sku="913397" crosscount="2" lowvendor="653" lownet="20.63"
v413list="0" v413net="0" v560list="0" v560net="0" v011list="0" v011net="0"
v100list="0" v100net="0">
<part oem="555" native="72900236" vendor="345" description="GASKET"
net_price="27.874" list_price="36.2"/>
<part oem="689" native="72900236" vendor="653" description="GASKET"
net_price="20.63" list_price="36.2"/>
</stockingunit>
<stockingunit sku="913304" crosscount="10" lowvendor="616" lownet="28.38"
v413list="0" v413net="0" v560list="0" v560net="0" v011list="79.7"
v011net="38.95" v100list="79.7" v100net="38.95">
<part oem="555" native="77700115" vendor="345" description="RUBBER-SQUEEGEE,
INNER" net_price="61.369" list_price="79.7"/>
<part oem="555" native="77700115" vendor="100" description="SQUEEGEE-RUBBER
INNER" net_price="38.95" list_price="79.7"/>
<part oem="555" native="77700115" vendor="011" description="SQUEEGEE-RUBBER
INNER" net_price="38.95" list_price="79.7"/>
<part oem="555" native="77700115" vendor="801" description="BLADE"
net_price="37.8" list_price="42.5"/>
<part oem="555" native="77700115" vendor="969" description="BLADE"
net_price="40.15" list_price="40.15"/>
<part oem="689" native="77700115" vendor="653" description="RUBBER-SQUEEGEE,
INNER" net_price="79.7" list_price="79.7"/>
<part oem="689" native="77700115" vendor="801" description="BLADE"
net_price="37.8" list_price="42.5"/>
<part oem="689" native="77700115" vendor="969" description="BLADE"
net_price="40.15" list_price="40.15"/>
<part oem="834" native="ALNSG83751URE" vendor="616" description="BLADE"
net_price="28.38" list_price="0.0"/>
</stockingunit>
</catalogreport>