empty namespace
Posted: Mon Mar 20, 2006 6:57 pm
Hi,
Hope you can help me this...
I have the following XML:
and the following XSL:
the output looks like:
my questions:
why do i have the empty xmlns attribute?
and
how can i prevent this?
Thanks, Hans Scholte
Hope you can help me this...
I have the following XML:
Code: Select all
<?xml version="1.0"?>
<result>
<A ID="oai:ARNO:148242" DT="2005-03-02"/>
<A ID="oai:ARNO:148374" DT="2005-03-04"/>
</result>
Code: Select all
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<xsl:output method="xml" omit-xml-declaration="no"/>
<xsl:strip-space elements="*"/>
<xsl:template match="/">
<feed xmlns="http://www.w3.org/2005/Atom">
<xsl:apply-templates/>
</feed>
</xsl:template>
<!-- -->
<xsl:template match="result">
<xsl:apply-templates/>
</xsl:template>
<!-- -->
<xsl:template match="A">
<entry>
<xsl:apply-templates/>
</entry>
</xsl:template>
<!-- -->
<xsl:template match="* | @*"/>
<!-- -->
</xsl:stylesheet>
the output looks like:
Code: Select all
<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
<entry xmlns=""/>
<entry xmlns=""/>
</feed>
why do i have the empty xmlns attribute?
and
how can i prevent this?
Thanks, Hans Scholte