Hi, Ambika. <[EMAIL PROTECTED]> wrote on 2006-09-01 04:26:44 AM: > 1. Compile the XSL files into .class files using XSLTC API and put > in the WEB-INF/classes directory of the web application. > 2. For each transformation, construct a transformer factory and set > use-classpath attribute to true. > 3. Construct a StreamSource object out of the translet name. > 4. Construct a transformer object out of the transformer factory by > passing the StreamSource object. > 5. Call transformer.transform() to perform the transformation. > > JDK 1.4.2 ships with a default JAXP implementation which conflicts with > Xalan 2.7.0. For this we have put the latest built jar files in > $JAJA_HOME/jre/endorsed directory. > > Please let us know if this approach is correct for multiple > transformations.
That approach seems reasonable, and wouldn't constitute a usage error, so far as I can tell. > The stack trace is as follows. > > ... 15 more > ERROR: 'Content is not allowed in prolog.' > ERROR: 'org.apache.xml.utils.WrappedRuntimeException: Content is not > allowed in > prolog.' > javax.xml.transform.TransformerException: > javax.xml.transform.TransformerExcepti > on: org.apache.xml.utils.WrappedRuntimeException: Content is not allowed > in prol > og. > at > org.apache.xalan.xsltc.trax.TransformerImpl.transform(TransformerImpl > .java:640) The error message that you're seeing is a Xerces error message. How is the input to the transform step being constructed? What kind of Source object is involved: StreamSource, SAXSource or DOMSource? > Some times we are also getting ArrayIndexOutOfBoundsException. We would need to see at least the traceback, if not a complete test case to be able to determine what is going on here. Thanks, Henry ------------------------------------------------------------------ Henry Zongaro XSLT Processors Development IBM SWS Toronto Lab T/L 969-6044; Phone +1 905 413-6044 mailto:[EMAIL PROTECTED]