[XSL-LIST Mailing List Archive Home] [By Thread] [By Date]

[xsl] namespace issue with xalan? (xsl 1.0)


Subject: [xsl] namespace issue with xalan? (xsl 1.0)
From: Michel Hendriksen <michel.hendriksen@xxxxx>
Date: Fri, 30 Mar 2012 13:38:51 +0200

Hi all,

I'm doing a transform in Xalan but can't pull out a result when using
namespaces. Am I doing something wrong or is this a known issue?

XML

<?xml version="1.0" encoding="UTF-8"?>
<didl:DIDL xmlns:didl="urn:mpeg:mpeg21:2002:02-DIDL-NS">
    <didl:Item>
        <didl:Descriptor>
            <didl:Statement mimeType="application/xml">
                <dii:Identifier
xmlns:dii="urn:mpeg:mpeg21:2002:01-DII-NS">namespace</dii:Identifier>
            </didl:Statement>
        </didl:Descriptor>
    </didl:Item>
</didl:DIDL>

XSL

<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:dc="http://purl.org/dc/elements/1.1/"
  xmlns:dcterms="http://purl.org/dc/terms/"
xmlns:didl="urn:mpeg:mpeg21:2002:02-DIDL-NS"
  xmlns:dii="urn:mpeg:mpeg21:2002:01-DII-NS"
xmlns:dip="urn:mpeg:mpeg21:2005:01-DIP-NS"
  xmlns:oai_dc="http://www.openarchives.org/OAI/2.0/oai_dc/"
xmlns:mod="http://www.loc.gov/mods/v3"
  xmlns:dai2="info:eu-repo/dai"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
  xmlns:wmp="http://www.surfgroepen.nl/werkgroepmetadataplus"
  exclude-result-prefixes="mod dai2 didl dc oai_dc dcterms dii dip xsi rdf wmp">
  <xsl:output method="xml" encoding="UTF-8" indent="yes" />
  <xsl:template match="/">
    <test>
		<xsl:apply-templates
select="/didl:DIDL/didl:Item/didl:Descriptor/didl:Statement/dii:Identifier"
/>
    </test>
  </xsl:template>
</xsl:stylesheet>

This will only give me

<test/>

and not

<text>namespace</test>

Works under Saxon though.

Thnx Michel


Current Thread
Keywords