Why do I get an empty output? When I remove the xmlns part in the xml the output is as expected, but then intellisense doesn't work anymore.
warehouse.xml
<?xml version="1.0" encoding="utf-8"?>
<?xml-stylesheet type="text/xsl" href="warehouse.xsl"?>
<warehouse xmlns="http://schema.mynamespace.net">
<container>
<item>
<name>book</name>
<value>1.23</value>
</item>
<item>
<name>phone</name>
<value>45.6</value>
</item>
</container>
</warehouse>
warehouse.xsl
<xsl:stylesheet xmlns="http://schema.mynamespace.net" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<xsl:output method="text"/>
<xsl:template match="/">
<xsl:apply-templates select="warehouse/container" />"
</xsl:template>
<xsl:template match="container">
<xsl:apply-templates />"
</xsl:template>
</xsl:stylesheet>
Even if you specify a certain namespace as the default namespace for your XSL, XPaths without a namespace prefix are always in the null namespace. You'll need to do something like this: