XPath expression:

```
'.//div/concat(@id, " - ", @class)'

```

fails with an error:

```none
The expression is not a legal expression.

```

in Firefox 25.0 (from a userscript).

Why, and how to fix?

For input:

```
<div id='id1' class='class1'>
  sample
</div>

<div id='id2' class='class2'>
  sample
</div>

```

I'd like to get two separate strings:

```none
id1 - class1
id2 - class2

```