This is a common problem, and there is no easy way to fix this.  Some
points:

1. The XMLDeclNode is a non-standard extension.  It is not part of the W3C
DOM which, in level 3, represens the information in the XML declaration as
fields of the Document.

2. Implementing this as a non-standard Node-derivative, and making this
node a child of the Document is broken.  Introducing this node type into
the infoset means that applications that are written assuming the standard
infoset (like Xalan) are confronted with an unexpected node type.  Also, it
means that users like you who are interested in this information are
writing their applications using this non-standard node type.  When the
standard way to do this becomes available, what will you do?

3. Writing code in Xalan as a work-around to this problem is possible, but
since level 3 compliance will make this node obsolete, I don't want to
waste the time to do it.

If your documents aren't too big, you might consider writing some code to
build an input source tree using the Xalan source tree, then transform
that.  You'd have more than one copy of the document at the same time, but
you won't have to worry about the XMLDeclNode.

Dave



                                                                                       
                            
                    Patrick                                                            
                            
                    Bronsard              To:     "'[EMAIL PROTECTED]'" 
<[EMAIL PROTECTED]>          
                    <pbronsard@cog        cc:     (bcc: David N Bertoni/CAM/Lotus)     
                            
                    nicase.fr>            Subject:     Little transformation problem   
                            
                                                                                       
                            
                    06/05/2001                                                         
                            
                    10:57 AM                                                           
                            
                    Please respond                                                     
                            
                    to xalan-dev                                                       
                            
                                                                                       
                            
                                                                                       
                            



HI,
I' trying to transform a Document with XSLTProcessor::process.
Since a have a Dom document, I first map it to a XalanDocument and then use
that one to initialise my InputSource.

Everything works fine if I don't have an XML Declaration Node in my Dom
document but if I do, and of course I would like to have one, the
transformation doesn't work.

Although I'm using Xalan 1.1, I still need the XercesParserLiaison to do
the
Xalan mapping, is there a better way to do this that would work with the
Declaration Node.

This is the code I use:

...

Thanks

Patrick


_____________________________
COGNICASE
Patrick Bronsard

Immeuble les Saisons
4 Place des Saisons - La d�fense 1
F-92036 Paris la D�fense Cedex
t�l : +33 (1) 41 02 34 80
E-mail <mailto:[EMAIL PROTECTED]>
www : www.cognicase.fr <http://www.cognicase.fr/>
_____________________________






Reply via email to