Subject: Re: namespace issue with xalan? (xsl 1.0)
From: Michel Hendriksen <michel.hendriksen@xxxxx>
Date: Mon, 2 Apr 2012 09:48:24 +0200
|
Actually someone disabled namespace awareness in the code....
So everything is ok now, thnx for the help!
On Fri, Mar 30, 2012 at 4:19 PM, Hermann Stamm-Wilbrandt
<STAMMW@xxxxxxxxxx> wrote:
> Hi Michecl,
>
> which version ov xalan do you use?
> For me everything is fine with 2.7.1:
>
> $ java -jar ../xalan-j_2_7_1/xalan.jar -XSL xform.xsl -IN data.xml ; echo
> <?xml version="1.0" encoding="UTF-8"?><test>namespace</test>
> $
>
>
> Mit besten Gruessen / Best wishes,
>
> Hermann Stamm-Wilbrandt
> Level 3 support for XML Compiler team and Fixpack team lead
> WebSphere DataPower SOA Appliances
> https://www.ibm.com/developerworks/mydeveloperworks/blogs/HermannSW/
> ----------------------------------------------------------------------
> IBM Deutschland Research & Development GmbH
> Vorsitzende des Aufsichtsrats: Martina Koederitz
> Geschaeftsfuehrung: Dirk Wittkopp
> Sitz der Gesellschaft: Boeblingen
> Registergericht: Amtsgericht Stuttgart, HRB 243294
>
>
> |------------>
> | From: |
> |------------>
>
>---------------------------------------------------------------------------
-----------------------------------------------------------------------|
> |Michel Hendriksen <michel.hendriksen@xxxxx>
|
>
>---------------------------------------------------------------------------
-----------------------------------------------------------------------|
> |------------>
> | To: |
> |------------>
>
>---------------------------------------------------------------------------
-----------------------------------------------------------------------|
> |xsl-list@xxxxxxxxxxxxxxxxxxxxxx,
|
>
>---------------------------------------------------------------------------
-----------------------------------------------------------------------|
> |------------>
> | Date: |
> |------------>
>
>---------------------------------------------------------------------------
-----------------------------------------------------------------------|
> |03/30/2012 01:39 PM
|
>
>---------------------------------------------------------------------------
-----------------------------------------------------------------------|
> |------------>
> | Subject: |
> |------------>
>
>---------------------------------------------------------------------------
-----------------------------------------------------------------------|
> | namespace issue with xalan? (xsl 1.0)
|
>
>---------------------------------------------------------------------------
-----------------------------------------------------------------------|
>
>
>
>
>
> 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
|