Wrox Programmer Forums
Go Back   Wrox Programmer Forums > XML > XSLT
|
XSLT General questions and answers about XSLT. For issues strictly specific to the book XSLT 1.1 Programmers Reference, please post to that forum instead.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the XSLT section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old October 30th, 2008, 11:59 AM
Authorized User
 
Join Date: Nov 2006
Posts: 28
Thanks: 0
Thanked 1 Time in 1 Post
Default Transformation not working with a specific xmlns

Hi,

Inside my xsl file, part of my stylesheet declaration contains the following namespace: "xmlns:UML="omg.org/UML13". The transformation of the input xml file works fine, but when I try to validate the output file (which is also xml), I get that "omg.org/UML13" is an illegal URI, which is true. I found the proper declaration for the UML namespace as being: "xmlns:UML="http://schema.omg.org/spec/UML/1.3/". But with this namespace, the transformation does not work, in the sense that there is almost no output written in my xml file (my xsl:apply-templates are never matched). Any idea why this happens?

I am using Saxon-B 9.1, XSLT 1.0 and XPath 2.0.

Thanks for any help!

Michael
 
Old October 30th, 2008, 12:12 PM
mhkay's Avatar
Wrox Author
 
Join Date: Apr 2004
Posts: 4,962
Thanks: 0
Thanked 292 Times in 287 Posts
Default

My guess would be that your input XML file is using the wrong namespace.

Michael Kay
http://www.saxonica.com/
Author, XSLT 2.0 and XPath 2.0 Programmer's Reference
 
Old October 30th, 2008, 12:13 PM
Friend of Wrox
 
Join Date: Nov 2007
Posts: 1,243
Thanks: 0
Thanked 245 Times in 244 Posts
Default

Can you show us the relevant code? It is hard to tell what goes wrong without seeing that.
If you have input elements in the namespace omg.org/UML13 then your stylesheet needs to match on that namespace obviously. You could then transform the elements to the other namespace you want.

--
  Martin Honnen
  Microsoft MVP - XML
 
Old October 30th, 2008, 12:14 PM
Authorized User
 
Join Date: Nov 2006
Posts: 28
Thanks: 0
Thanked 1 Time in 1 Post
Default

I was just about to write that I found the problem, which is exactly what you mentioned, namely my input xml file was using the wrong namespace.

Thank you!





Similar Threads
Thread Thread Starter Forum Replies Last Post
Search specific data from specific columns yogeshyl SQL Language 1 January 16th, 2008 11:12 AM
Copy specific data in specific cells of sheet2 yogeshyl Excel VBA 1 May 14th, 2007 07:40 AM
XMLNS mathias XML 0 February 20th, 2007 04:46 AM
identity transformation insist on outputting xmlns cbedford XSLT 1 May 21st, 2004 11:29 AM
XPathExpression.AddSort not working with xmlns mokka°logic Pro VB.NET 2002/2003 0 September 10th, 2003 01:31 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.