title: Check if string appears within node value in XSLT
body: <p>I have the following XML:</p>
  
  <pre><code>&lt;nodes&gt;
    &lt;node&gt;
      &lt;articles&gt;125,1,9027&lt;/articles&gt;
    &lt;/node&gt;
    &lt;node&gt;
      &lt;articles&gt;999,48,123&lt;/articles&gt;
    &lt;/node&gt;
    &lt;node&gt;
      &lt;articles&gt;123,1234,4345,567&lt;/articles&gt;
    &lt;/node&gt;
  &lt;/nodes&gt;
  </code></pre>
  
  <p>I need to write some XSLT which will return only nodes which have a paricular article id, so in the example above, only those nodes which contain article 123.</p>
  
  <p>My XSLT isn't great, so I'm struggling with this.  I'd like to do something like this, but I know of course there isn't an 'instring' extension method in XSLT:</p>
  
  <pre><code>&lt;xsl:variable name="currentNodeId" select="1234"/&gt;
  
  &lt;xsl:for-each select="$allNodes [instring(articles,$currentNodeId)]"&gt;
    &lt;!-- Output stuff --&gt;
  &lt;/xsl:for-each&gt;
  </code></pre>
  
  <p>I know this is hacky but not sure of the best approach to tackle this.  The node-set is likely to be huge, and the number of article ids inside the  nodes is likely to be huge too, so I'm pretty sure turning that splitting the value of the  node and turning it into a node-set isn't going to be very efficient, but I could be wrong!</p>
  
  <p>Any help as to the best way to do this would be much appreciated, thanks.</p>