Re: [xsl] [XML namespaces]

Subject: Re: [xsl] [XML namespaces]
From: Pedro Henrique Marques <pedrohml@xxxxxxxxx>
Date: Tue, 24 Mar 2009 02:19:51 -0300
I did'nt acquire the desirable output. The xslt ommits the tag
<dc:source> in the process:



My xslt file (spinner2dml.xsl):

<?xml version="1.0" encoding="ISO-8859-1"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform";;
xmlns:dc="http://url.com";>
<xsl:output method="xml"/>
<xsl:template match="catalog">
        <xsl:for-each select="item">
                <Document>
                <xsl:for-each select="category">
                        <Category><xsl:value-of select="."/></Category>
                </xsl:for-each>
                <xsl:copy-of select="dc:source"/>
                </Document>
        </xsl:for-each>
</xsl:template>
</xsl:stylesheet>






My XML file:

<?xml version="1.0" encoding="ISO-8859-1"?>
<?xml-stylesheet type="text/xsl" href="spinner2dml.xsl"?>

<catalog
xmlns:dc="http://www.w3.org/";>

<item>
<title>~*Rainbow Guidance*~</title>
<link>http://blog.myspace.com/index.cfm?fuseaction=blog.view&amp;friendID=13345245&amp;blogID=420014399</link>
<guid>http://blog.myspace.com/index.cfm?fuseaction=blog.view&amp;friendID=13345245&amp;blogID=420014399</guid>
<pubDate>Fri, 01 Aug 2008 00:04:38 GMT</pubDate>
<dc:source>http://blog.myspace.com/kristindunngalbraith</dc:source>
<category>Dreams and the Supernatural</category>
</item>
</catalog>


My (processor) output:
   (xsltproc) "<Document><Category>Dreams and the
Supernatural</Category></Document>"
   (saxon) "<?xml version="1.0" encoding="utf-8"?><Document
xmlns:dc="http://url.com";><Category>Dreams and    the
Supernatural</Category></Document>"
   (xalan) "<?xml version="1.0" encoding="utf-8"?><Document
xmlns:dc="http://url.com";><Category>Dreams and  the
Supernatural</Category></Document>"

I need to get the value of <dc:source>. What can I do for it ?

Current Thread