I have just started accepting some Word documents which have a different
namespace value for "w" and "v" from those documents I have used before.
I'd rather not try to maintain two parallel XSLT files. I tried creating
a "driver" XSLT for each set of namespaces, which then xsl:include'd my
original XSLT file (shorn of all except the required xsl namespace), but
this seems to have the effect of ignoring the namespaces declared in the
driver, so Saxon complains of an Undeclared namespace prefix.
testa.xml
---------
<?xml version="1.0"?>
<element xmlns:a="foo" xmlns:b="bar" a:value="blort" b:name="test"/>
testa.xsl
---------
<?xml version="1.0"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:a="foo" xmlns:b="bar" version="1.0">
<xsl:include href="test.xsl"/>
</xsl:stylesheet>
test.xsl
--------
<?xml version="1.0"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
version="1.0">
<xsl

utput method="text"/>
<xsl:template match="element">
<xsl:value-of select="@a:value"/>
<xsl:text>:</xsl:text>
<xsl:value-of select="@b:name"/>
<xsl:text>
</xsl:text>
</xsl:template>
</xsl:stylesheet>
Is there a way to do this right?
///Peter