Return-Path: Mailing-List: contact xalan-dev-help@xml.apache.org; run by ezmlm Delivered-To: mailing list xalan-dev@xml.apache.org Received: (qmail 71624 invoked from network); 13 Aug 2000 13:00:03 -0000 Received: from prx2.livedoor.com (HELO smtp.livedoor.com) (203.104.131.4) by locus.apache.org with SMTP; 13 Aug 2000 13:00:03 -0000 Received: (qmail 15754 invoked from network); 13 Aug 2000 12:59:30 -0000 Received: from unknown (HELO ankur) (63.12.83.205) by prx2.livedoor.com with SMTP; 13 Aug 2000 12:59:30 -0000 Message-ID: <001b01c00571$f3498960$cd530c3f@netmatrix> From: "Ankur Chavda" To: Subject: mulit-stylesheet root transformations Date: Sun, 13 Aug 2000 22:00:40 -0000 MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_NextPart_000_0018_01C00571.EB222260" X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 5.00.2919.6600 X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2919.6600 X-Spam-Rating: locus.apache.org 1.6.2 0/1000/N This is a multi-part message in MIME format. ------=_NextPart_000_0018_01C00571.EB222260 Content-Type: text/plain; charset="Windows-1252" Content-Transfer-Encoding: quoted-printable I'm doing multiple transformations with pre-compiled StylesheetRoot = objects. I prefer using the process(...) method of the StylesheetRoot as = opposed to creating XSLTProcessors because the process(...) method is = inherently threadsafe and doesn't require a call to XSLTProcessorFactory = on every transformation. However, I'm having problems setting the result = target of the first transformation to be the second StylesheetRoot = object. So right now I'm creating an XSLTProcessor, setting the = stylesheet to the second StylesheetRoot object, and calling the first = StylesheetRoot's process(...) method with the XSLTProcessor as its = ResultTarget.=20 I was wondering if there is a simple way to do send the output of one: StylesheetRoot.process(...) method call directly to another : StylesheetRoot.process(...) method call. Thanks in advance for any help you might be able to provide. Ankur Chavda try { processor =3D XSLTProcessorFactory.getProcessor(); } catch (org.xml.sax.SAXException e) {...} processor.setStylesheet(srSecond); org.apache.xml.serialize.OutputFormat ofSecond =3D = srSecond.getOutputFormat(); ofSecond.setEncoding(p.getString(WC_LANGUAGE_ENCODING_KEY)); try { processor.setDocumentHandler(srSecond.makeSAXSerializer(baosOutput, = ofSecond)); } catch (java.io.UnsupportedEncodingException e) {...} try { srFirst.process(new XSLTInputSource(inputXML), new XSLTResultTarget(processor)); } catch (org.xml.sax.SAXException e) {...} ------=_NextPart_000_0018_01C00571.EB222260 Content-Type: text/html; charset="Windows-1252" Content-Transfer-Encoding: quoted-printable
I'm doing multiple transformations with pre-compiled = StylesheetRoot objects. I prefer using the = process(...)=20 method of the StylesheetRoot as opposed to creating XSLTProcessors = because the=20 process(...) method is inherently threadsafe and doesn't require a call = to=20 XSLTProcessorFactory on every transformation. However, I'm having = problems=20 setting the result target of the first transformation to be the second=20 StylesheetRoot object. So right now I'm creating an XSLTProcessor, = setting the=20 stylesheet to the second StylesheetRoot object, and calling the first=20 StylesheetRoot's process(...) method with the XSLTProcessor as its = ResultTarget.=20
 
I was wondering if there is a simple way = to do send=20 the output of one:
 
StylesheetRoot.process(...)
 
method call directly to another :
 
StylesheetRoot.process(...)
 
method call.
 
Thanks in advance for any help you might be able to=20 provide.
 
Ankur Chavda
 
try {
    processor =3D=20 XSLTProcessorFactory.getProcessor();
} catch = (org.xml.sax.SAXException=20 e) {...}
 
processor.setStylesheet(srSecond);
org.apache.xml.serialize.O= utputFormat=20 ofSecond =3D=20 srSecond.getOutputFormat();
ofSecond.setEncoding(p.getString(WC_LANGUA= GE_ENCODING_KEY));
try {
    =20 processor.setDocumentHandler(srSecond.makeSAXSerializer(baosOutput,=20 ofSecond));
} catch (java.io.UnsupportedEncodingException e)=20 {...}
 
try=20 {
      srFirst.process(new=20 XSLTInputSource(inputXML),
       &= nbsp;           &n= bsp;  =20 new XSLTResultTarget(processor));
} catch (org.xml.sax.SAXException e)=20 {...}
------=_NextPart_000_0018_01C00571.EB222260--