Subject: Re: [xsl] namespace issue with xalan? (xsl 1.0) From: Hermann Stamm-Wilbrandt <STAMMW@xxxxxxxxxx> Date: Fri, 30 Mar 2012 16:19:41 +0200 |
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: | |------------> >--------------------------------------------------------------------------------------------------------------------------------------------------| |[xsl] 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 |
---|
|
<- Previous | Index | Next -> |
---|---|---|
[xsl] namespace issue with xalan? (, Michel Hendriksen | Thread | [xsl] thoughts on design...., Chris Booth |
RE: [xsl] thoughts on design...., Chris Booth | Date | Re: [xsl] thoughts on design...., David Carlisle |
Month |