<p>Is there a way to find a node matched on part of a value.</p>

<p>If I have the following:</p>

<pre><code>&lt;competition id="100" name="Barclays Premier League"/&gt;
&lt;competition id="101" name="CocaCola Championship" /&gt;
&lt;competition id="102" name="CocaCola League 1" /&gt;
</code></pre>

<p>Given the string "Premier League" or even "Prem", how would I match the correct node and get id 100.</p>

<p>I have managed this using for-each and contains, but this is very inefficient and does not work fast enough for our requirements.</p>

String handling is not something XSLT is amazing at but there are a few options.
In this case you might try:
```
```
//competition[contains(@name,'Prem')]
```
```
see
here
for more options and details