EDN Admin
Well-known member
I have several XML input documents which all are in the default namespace and which transform as expected using XslCompiledTransform in code. But exactly the same files dont work under the XSLT debugger in Visual Studio. Why is VS-XSLT not using the default namespace of the input document for its XPath expressions? It works if I add an artificial explcit namespace, but thats not an option for all my documents.
Example:
<?xml version="1.0" encoding="utf-8" ?>
<foo>I am the input file</foo>
<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform
<xsl:template match="foo output OK for XslCompiledTransform but with XSLT in VS this does not match</xsl:template>
</xsl:stylesheet>
Thanks for your hints.
View the full article
Example:
<?xml version="1.0" encoding="utf-8" ?>
<foo>I am the input file</foo>
<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform
<xsl:template match="foo output OK for XslCompiledTransform but with XSLT in VS this does not match</xsl:template>
</xsl:stylesheet>
Thanks for your hints.
View the full article