I'm having an issue when attempting to include and access multiple XML documents in an XSL stylesheet. I'm assigning document nodes as variables and then attempting to access them in my xsl:template, similar to this:
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="xml" omit-xml-declaration="yes" />
<xsl:variable name="doc1" select="document('test.xml')" />
<xsl:template match="/">
<div>
<span id="id_total">
<xsl:value-of select="count($doc1//Root)"/>
</span>
</div>
</xsl:template>
</xsl:stylesheet>
I get the correct count when using IE & Firefox, however any WebKit browser (Safari, Chrome) gives me a count of 0. Any thoughts?