I'm having trouble with the default namespace in the xml file I'm trying to reference. Does anyone know whey this default ns is causing me so much grief. I'm at my wits end!
InputXML
<?xml version="1.0" encoding="utf-8"?>
<contactBatchResponse version="1.0.3"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="/somelocation.xsd"
xmlns="http://www.somecompany.com">
<FileStatus>
<someStatus>get status</someStatus>
</FileStatus>
</contactBatchResponse>
My incorrect xslt :(
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="2.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="/somelocation.xsd"
xmlns="http://www.somecompany.com"
exclude-result-prefixes="#default xsi xsl ">
<xsl:output indent="yes" method="xml"/>
<xsl:template match="/">
<Foo>
<xsl:value-of select="//someStatus"/>
</Foo>
</xsl:template>
</xsl:stylesheet>
When I run this I get nothing returned for Foo however once I remove the default namespace everything is ok. What am I missing here????
Thanks