Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>You've made a good start. And now you've bumped your shins on a classic slip that happens to everyone sooner or later: You've written an XPath expression like <code>Xboxspellen/Spellen/Spel[14]/Spelnaam</code> and expect it to match an element in your document. But the elements in your document are not named <code>Xboxspellen</code>, etc.: they are namespace-qualified, and all of them have a default namespace declaration (<code>xmlns="..."</code>) in scope, so their full (expanded) name is not <code>Xboxspellen</code> etc., but <code>{http://www.w3schools.com}Xboxspellen</code>, <code>{http://www.w3schools.com}Spellen</code>, etc.</p> <p>Correct the situation by making your XPath expressions and your XML agree on the names of things. In the usual case, this means:</p> <ol> <li><p>Add a namespace declaration to your XSLT stylesheet, binding some prefix (it doesn't matter what prefix) to the namespace used in your XML: </p> <p>xmlns:w3s = "<a href="http://www.w3schools.com" rel="nofollow">http://www.w3schools.com</a>"</p></li> <li><p>Use that prefix in your XPath expressions:</p> <pre><code>&lt;td&gt;&lt;xsl:value-of select="w3s:Xboxspellen /w3s:Spellen /w3s:Spel[14] /w3s:Spelnaam" /&gt;&lt;/td&gt; &lt;td&gt;&lt;xsl:value-of select="w3s:Xboxspellen /w3s:Spellen /w3s:Spel[14] /w3s:Prijs"/&gt;&lt;/td&gt; </code></pre></li> </ol> <p>(I've broken lines in the XPath for legibility; white space is legal in XPath expressions, and it's a good thing, too.)</p> <p>Now the XPath expression will match.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload