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 "Murali S (RBEI/ESD1)" <Mu...@in.bosch.com> on 2012/12/06 07:50:05 UTC

Output of Xalan transform in SAX2 and using multiple transformation

Hello,

I am a new user of xalan library xalan-c++-1.11. Below are my requirements:

1)      All of my xml files are handled by SAX2 parser of xerces and I have my own contentHandler for receiving SAX2 parsing events. My requirement is that both input and output of xalan transform should be of SAX2 parser so that my contenHandler handles the event. (I was able to find "TransformToXercerDOM" which transforms to DOM but not a single example for SAX2).

2)      Another requirement is multiple transformations. The output of one transformation should be the input of another transformation without any intermediate file creation and so on. (transferring from XSLTResultTarget to XSLTInputSource/XalanParsedSource)

Could you help me on above two topics?

Thanks and Regards,
Murali S


Re: Output of Xalan transform in SAX2 and using multiple transformation

Posted by sh...@e-z.net.
Murali,

I am writing this from experience without the code reference available.

It is possible to use Xalan Transformer to serialize output to
a memory buffer.  This memory buffer can then become the bitstream
for a Xerces reader to parse using SAX2.

Xalan also has a method that can save parsed XML documents for
multiple use.

Xalan has a method that can save compiled XSLT stylesheets for
multiple use.

Xalan can use the parsed XML documents as the item to be transformed,
and can use parsed XML documents as top-level nodeset parameters.
This capability allows a XSLT stylesheet to control the data
merge from multiple XML documents without re-parsing the XML sources.

Sincerely,
Steven J. Hathaway
Xalan Documentation Project

> Hello,
>
> I am a new user of xalan library xalan-c++-1.11. Below are my
> requirements:
>
> 1)      All of my xml files are handled by SAX2 parser of xerces and I
> have my own contentHandler for receiving SAX2 parsing events. My
> requirement is that both input and output of xalan transform should be of
> SAX2 parser so that my contenHandler handles the event. (I was able to
> find "TransformToXercerDOM" which transforms to DOM but not a single
> example for SAX2).
>
> 2)      Another requirement is multiple transformations. The output of one
> transformation should be the input of another transformation without any
> intermediate file creation and so on. (transferring from XSLTResultTarget
> to XSLTInputSource/XalanParsedSource)
>
> Could you help me on above two topics?
>
> Thanks and Regards,
> Murali S
>
>