You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cocoon.apache.org by Davanum Srinivas <di...@yahoo.com> on 2000/11/12 23:06:01 UTC
[C2][Xalan2J] SAXTransformerFactory's newXMLFilter
Scott,
SAXTransformerFactory needs a new method named newXMLFilter which takes in a Templates object as a
parameter. I know that there are other ways of getting an XMLFilter which contains a Transformer,
but the objective is to make it easy. For example there are two newTransformerHandler methods one
of which takes in a Source and another takes in a Templates object. So why not have an additional
newXMLFilter which takes in a Templates object?
Thanks,
dims
public XMLFilter newXMLFilter(Templates templates){
try {
return new TrAXFilter(templates);
} catch(TransformerConfigurationException tfe) {
return null;
}
}
=====
Davanum Srinivas, JNI-FAQ Manager
http://www.jGuru.com/faq/JNI
__________________________________________________
Do You Yahoo!?
Yahoo! Calendar - Get organized for the holidays!
http://calendar.yahoo.com/
Re: [C2][Xalan2J] SAXTransformerFactory's newXMLFilter
Posted by Gary L Peskin <ga...@firstech.com>.
Dims --
What happened to my previous idea?
private SAXTransformerFactory transformerFactory;
public XMLFilter getXMLFilter() throws TransformerConfigurationException
{
XMLFilter retFilter = new XMLFilterImpl();
TransformerHandler th =
transformerFactory.newTransformerHandler(templates);
retFilter.setContentHandler(th);
return retFilter;
}
I thought you had said that you decided you didn't need th XMLFiler
since you were switching to just using a TransformerHandler. Have you
decided that you do need the XMLFilter after all?
Gary
Davanum Srinivas wrote:
>
> Scott,
>
> SAXTransformerFactory needs a new method named newXMLFilter which takes in a Templates object as a
> parameter. I know that there are other ways of getting an XMLFilter which contains a Transformer,
> but the objective is to make it easy. For example there are two newTransformerHandler methods one
> of which takes in a Source and another takes in a Templates object. So why not have an additional
> newXMLFilter which takes in a Templates object?
>
> Thanks,
> dims
>
> public XMLFilter newXMLFilter(Templates templates){
> try {
> return new TrAXFilter(templates);
> } catch(TransformerConfigurationException tfe) {
> return null;
> }
> }
Re: [C2][Xalan2J] SAXTransformerFactory's newXMLFilter
Posted by Gary L Peskin <ga...@firstech.com>.
Dims --
What happened to my previous idea?
private SAXTransformerFactory transformerFactory;
public XMLFilter getXMLFilter() throws TransformerConfigurationException
{
XMLFilter retFilter = new XMLFilterImpl();
TransformerHandler th =
transformerFactory.newTransformerHandler(templates);
retFilter.setContentHandler(th);
return retFilter;
}
I thought you had said that you decided you didn't need th XMLFiler
since you were switching to just using a TransformerHandler. Have you
decided that you do need the XMLFilter after all?
Gary
Davanum Srinivas wrote:
>
> Scott,
>
> SAXTransformerFactory needs a new method named newXMLFilter which takes in a Templates object as a
> parameter. I know that there are other ways of getting an XMLFilter which contains a Transformer,
> but the objective is to make it easy. For example there are two newTransformerHandler methods one
> of which takes in a Source and another takes in a Templates object. So why not have an additional
> newXMLFilter which takes in a Templates object?
>
> Thanks,
> dims
>
> public XMLFilter newXMLFilter(Templates templates){
> try {
> return new TrAXFilter(templates);
> } catch(TransformerConfigurationException tfe) {
> return null;
> }
> }