You are viewing a plain text version of this content. The canonical link for it is here.
Posted to c-users@xalan.apache.org by Ashay Shende <as...@cisco.com> on 2003/03/27 06:42:31 UTC

RE: Xalan Transforming Xerces DOMDocument

Hi,

for transforming a Xerces DOMDocument, you can use the transform function of
the XalanTranformer class.

The general steps are as follows:
1. create a XSLTInputSource objetc with the Stylesheet.
2. Instantiate the XercesDOMWrapperParsedSource class which takes  the
Xerces DOMDocument, XercesParserLiaison object and a XercesDOMSupport
object.
3. create an XSLTResultTarget with the ouput file path.

The transform function takes in the above 3 as parameters.

You can also find this in one of the samples in Xalan.

Hope this helps you...

AS.
-----Original Message-----
From: Don Dehm [mailto:ddehm@edgenet.com]
Sent: Thursday, May 22, 2003 8:56 PM
To: xalan-c-users@xml.apache.org
Subject: Xalan Transforming Xerces DOMDocument


I have previously done some work with Xerces, and just recently added
Xalan to fulfill some additional requirements.  I am having difficulty
transforming a Xerces DOMDocument.  I have experimented with a variety
of things and could use a nudge if someone has one to offer.

What I have:
Xerces DOMDocument.
Stylesheet filename
Output filename

I need to write the transformed DOMDocument to [Output filename]
(without writing it to disk and reading it back in).  The trick seems to
lie in converting the DOMDocument to a Xalan type.  The published
patterns seem to leave a question or two unanswered for me.

Thanks in advance,
Don