XSLT Test whether any of keyed nodes exist
===

A variable `$rows` has a list of node ids that key into some source XML.

    <row>
       <node id="d0113" />
       <node id="d0237" />
       <node id="d0321" />
    </row>
    <row>
       <node id="c0278" />
       <node id="d0137" />
       <node id="e0021" />
    </row>

What is a good way to test, before processing each `<row>`, whether any of nodes keyed to exist in a node-set `$set`?

All I've come up with is 

    <xsl:for-each select="row">
      <xsl:variable name="test">  
        <xsl:for-each select="node">
          <xsl:value-of select="boolean($set//*[generate-id()=current()/@id]) * 1"/>
        </xsl:for-each>                  
      </xsl:variable>
      <xsl:if test="$test&gt;0">
        <!-- go ahead and process the row -->
      </xsl:if>
    </xsl:for-each>

