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 March 9th, 2007, 05:14 PM
Authorized User
Join Date: Oct 2006
Posts: 34
Thanks: 0
Thanked 0 Times in 0 Posts
Default namespace issue

I'm using java Transformer, javax.xml.transformer.Transformer.

In my origional XSLT, I didn't have copy-namespace="no" and the Transformer works fine.
However, after I add copy-namespace="no", I'm getting TransformerException.

Please help.

Here is a snippet of my java code:

 Transformer transformer = null;
 File styleSheet = inputStyleSheet;
 try {
   TransformerFactory transFactory = TransformerFactory.newInstance();
   transformer = transFactory.newTransformer(new StreamSource(styleSheet.getAbsolutePath()));
  } catch (TransformerException e) {

Here is a snippet of my XSLT:
  This one works:
      <xsl:copy-of select="."/>

  This one causes the TransformerException to occur:
      <xsl:copy-of select="." copy-namespaces="no"/>

Please help.
Old March 9th, 2007, 05:32 PM
mhkay's Avatar
Wrox Author
Join Date: Apr 2004
Posts: 4,962
Thanks: 0
Thanked 292 Times in 287 Posts

That probably means you're using an XSLT processor that supports XSLT 1.0 rather than 2.0.

If you want to move forwards to 2.0, download Saxon from http://saxon.sf.net/

Michael Kay
Author, XSLT Programmer's Reference and XPath 2.0 Programmer's Reference

Similar Threads
Thread Thread Starter Forum Replies Last Post
BasePage and Namespace Issue Eric S. Smith BOOK: Beginning ASP.NET 3.5 : in C# and VB BOOK ISBN: 978-0-470-18759-3 1 May 28th, 2008 08:43 AM
What is ".Namespace" ?! Employee C# 2 May 14th, 2008 10:55 AM
About Namespace cfanllm C# 2005 5 April 13th, 2007 08:15 AM
Where Is NameSpace? reidcor BOOK: ASP.NET Website Programming Problem-Design-Solution 1 March 23rd, 2004 03:41 PM
namespace shortynelson C# 2 September 9th, 2003 03:14 AM

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