You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@xalan.apache.org by Prajakt Deolasee <pd...@in.firstrain.com> on 2002/09/12 11:18:27 UTC

Xalan-Xerces using together

Hi All,

I am planning to use Xalan and Xerces both in my project.

As I understand, Xalan gives me a framework for XPath and XSLT processing
and Xerces is a XML parser. Now at first look I thought so that the Xalan should
have extended Xerces for it own purpose. That seems to be the most logical design
decesion. But from the code it seems that (I haven't seen it throughly) that it
has encapsulated Xerces Parser and implemented a bridge (wrapper) around it.

It would be really intersting to know, 

1. What am I saying, is it true?
2. If it is true, was this design decesion taken for some special reason?
3. If in my application I need to parse the XML and also aplly XPath and XSL on it
    should I use both Xalan and Xerces?


Thank you very much.

-Prajakt

Re: Xalan-Xerces using together

Posted by Joseph Kesselman <ke...@us.ibm.com>.
Xalan uses Xerces -- or any other JAXP-compliant parser, or any SAX or DOM 
source -- to read the XML files. It doesn't need to extend these. It just 
takes their output, stores/adapts it as necessary, and processes it.

I'm not sure what you're describing as a "bridge or wrapper".

______________________________________
Joe Kesselman  / IBM Research

Re: Xalan-Xerces using together

Posted by Nirmal TS <ni...@yahoo.com>.
Hi Prajakt,

I think you are referring to Xalan C++.

> 
> It would be really intersting to know, 
> 
> 1. What am I saying, is it true?

Yes, you are right. Xalan C does use a bridge to
access Xerces. This is because Xerces DOM is different
from Xalan DOM and Xalan can apply its transformations
only to Xalan DOM.

> 2. If it is true, was this design decesion taken for
> some special reason?

This is because Xerces DOM is not suited for applying
transformations

> 3. If in my application I need to parse the XML and
> also aplly XPath and XSL on it
>     should I use both Xalan and Xerces?

Yes, you need to use both. If you want to use another
parser then you need to implement you own bridge.

Regards
Nirmal

__________________________________________________
Do you Yahoo!?
Yahoo! News - Today's headlines
http://news.yahoo.com