Hi Bryan,
 
I've checked that example. It works and you shouldn't have any problems if you use DOM 2 Level methods building the DOM: createElementNS, setAttributeNS, etc. You must specify correct namespace-uri, in the case of XSLT it's "http://www.w3.org/1999/XSL/Transform".
But I belive using DOMSource as templates source is not very good solutions in the case of Xalan because it uses implementation of TRAX Templates implementation, which can be created once and cached in your system, so you don't need any other objects (like DOM implementation) to cache it.
In the case of input document it's not very good idea to use DOM because Xalan uses DTM which is supposed to be much faster and smaller than Xerces DOM implementation. So Xalan will translate your DOM to DTM before processing it. Or it will probably will try to process DOM (I'm not sure exactly), but it will be much slower.
Thanks,
Dmitry
-----Original Message-----
From: Bryan Mulvihill [mailto:[EMAIL PROTECTED]]
Sent: Friday, August 03, 2001 13:56
To: [EMAIL PROTECTED]
Subject: Re: stylesheet requires attribute: version

I use it for both (although I'm thinking I shouldn't).  I am using the DOM2DOM sample as a test base.  I'll attach it in case you are missing it.
 
Bryan Mulvihill
Software Developer
AMCon Research Inc., Ottawa, Ontario, Canada
http://www.amconresearch.com
----- Original Message -----
Sent: Friday, August 03, 2001 4:33 PM
Subject: RE: stylesheet requires attribute: version

Hi Bryan,
 
Do you build tree for input document or stylesheet? In both cases stylesheet text would be helpful to find the problem. Can you send it or part of it?
 
Thanks,
Dmitry
-----Original Message-----
From: Bryan Mulvihill [mailto:[EMAIL PROTECTED]]
Sent: Friday, August 03, 2001 13:30
To: [EMAIL PROTECTED]
Subject: stylesheet requires attribute: version

I am trying to use Xalan with a parser that extends Xerces (sort of).  It builds a DOM tree, but when that tree is submitted to a transformer, it throws an exception saying:
 
"stylesheet requires attribute: version; Missing or incorrect XSLT Namespace."
 
although the version is set explicitly.
 
What does Xalan expect from a stylesheet before it can use it?
 
Attached is the stack trace.  Any help would be much appreciated.

Reply via email to