xsl-list
[Top] [All Lists]

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

2012-03-30 06:39:08
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

--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--

<Prev in Thread] Current Thread [Next in Thread>