I have a nodeset based on a query for driver objects, no match,
returning one attribute acmeTriggerAttributeName.

I want to trim down this nodeset to only include those WITH
[@attr-name="acmeTriggerAttributeName"]

My XPATH is:
$DRIVER-TRIGGERS/not(attr[@attr-name="acmeTriggerAttributeName"])

Which did not even restart the driver, since it is invalid,

Then I tried:

$DRIVER-TRIGGERS/attr[(not@attr-name="acmeTriggerAttributeName")]

Which did not remove any nodes...

Then I tried:

$DRIVER-TRIGGERS/attr[@attr-name="twcTriggerAttributeName"]/not(value)

All these failed on driver restart, that it was expecting a node test...

Then I tried:

$DRIVER-TRIGGERS/attr[@attr-name="twcTriggerAttributeName"]/value=""

This returned: no type may be converted to a node-set

Ok, next try was:
$DRIVER-TRIGGERS/attr[@attr-name="twcTriggerAttributeName"]/value/text()=""

same converted to node-set error.

Then I tried:

not($DRIVER-TRIGGERS/attr[@attr-name="twcTriggerAttributeName"]/value)

Same basic problem... I am sure there is a way to see nodes that are
not extant, or equal to null... Reading through the RFC to try and
figure it out...

How about this one:
$DRIVER-TRIGGERS/not(node(attr[@attr-name="twcTriggerAttributeName"]/value))

Nope. No luck.

Well I can brute force it, since there are only 30 drivers, thus it is a
small nodeset, and I only want 6 of the nodes...

I can for-each through the nodeset, and set a new nodeset as the
DRIVER-TRIGGER2 + current-node, if the XPATH is true
$DRIVER-TRIGGER/attr[@attr-name="twcTriggerAttributeName"]/value

This worked for me, and I will use it for now...

I just want a more elegant approach. I post this to show what didn't
work, to help narrow down the options for others, but I would like to
know what the correct way to do it, via XPATH would be.