23. Saxon-JS: Querying the browser web page
The browser’s HTML object model isn’t quite the XDM object model.
The
ixsl:page()extension function shims things up:<xsl:template name="xsl:initial-template"><xsl:apply-templates select="ixsl:page()/html"/></xsl:template>Everything works the way you’d expect after you get into the XDM.