[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: namespace issue with xalan? (xsl 1.0)

Subject: Re: namespace issue with xalan? (xsl 1.0)
From: Hermann Stamm-Wilbrandt <STAMMW@xxxxxxxxxx>
Date: Fri, 30 Mar 2012 16:19:41 +0200
Re:  namespace issue with xalan? (xsl 1.0)
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

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.