xml-general mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Kelly Campbell <c...@channelpoint.com>
Subject RE: Pluggable components ( was: Volunteers: First Cut)
Date Tue, 06 Mar 2001 21:14:07 GMT
We've got some tools for pluggable Xalan1 or JAXP support in FOP. See
src/org/apache/fop/tools/xslt in cvs:xml-fop. There's also some ant tasks in
there that might be useful to others. One I added this weekend which I think
would be useful in the mainline Ant with some modifications. That is a
Manifest task for creating manifest files easily.

-Kelly

> -----Original Message-----
> From: Sam Ruby [mailto:rubys@us.ibm.com]
> Sent: Tuesday, March 06, 2001 1:28 PM
> To: general@xml.apache.org
> Subject: Pluggable components ( was: Volunteers: First Cut)
> 
> 
> Stephane Hillion wrote:
> >
> > Sorry to reference crimson in testing tools ;)
> 
> I didn't realize that it was a testing tool.  In any case, it 
> looks easy to
> fix.  Quick attempt at a patch below.  Hopefully someone here 
> will help you
> find a satisfactory way to resolve the runtime references.
> 
> Binding directly to the Xalan 1 interfaces is also a concern. 
>  The TraX
> interfaces in JAXP should let you become XSLT processor independent.
> 
> I'd also was wondering if you would consider replacing
> org.apache.batik.script with
> http://oss.software.ibm.com/developerworks/projects/bsf ?
> 
> - Sam Ruby
> 
> --- Main.java   2001/02/03 16:26:05     1.9
> +++ Main.java   2001/03/06 20:15:56
> @@ -49,8 +49,10 @@
>  import org.apache.batik.css.CSSDocumentHandler;
>  import org.apache.batik.dom.svg.SVGDOMImplementation;
> 
> -import org.apache.crimson.tree.*;
> -import org.apache.crimson.parser.*;
> +import javax.xml.parsers.DocumentBuilderFactory;
> +import javax.xml.parsers.DocumentBuilder;
> 
>  import org.xml.sax.InputSource;
> 
> @@ -286,23 +288,21 @@
>      public static String compileTestClass(String testFileName)
>      throws Exception{
>          //
> -        // Load xml test file, using crimson
> +        // Load xml test file
>          //
> 
> -        XMLReaderImpl parser = new XMLReaderImpl();
> -        XmlDocumentBuilder builder = new XmlDocumentBuilder();
> -        parser.setContentHandler(builder);
> +        DocumentBuilderFactory factory = 
> DocumentBuilderFactory.newInstance();
> +        DocumentBuilder builder = factory.newDocumentBuilder();
> +        Document testDoc;
> 
>          try {
> -            FileReader xmlReader = new FileReader(testFileName);
> -            InputSource is = new InputSource(xmlReader);
> -            parser.parse(is);
> +            testDoc = builder.parse(testFileName);
>          }
>          catch (Exception e){
>              display("Error: " + e.toString());
> +            throw e;
>          }
>          // Get document DOM
> -        Document testDoc = builder.getDocument();
> 
>          //
>          // Get Test Title
> 
> 
> ---------------------------------------------------------------------
> In case of troubles, e-mail:     webmaster@xml.apache.org
> To unsubscribe, e-mail:          general-unsubscribe@xml.apache.org
> For additional commands, e-mail: general-help@xml.apache.org
> 

Mime
View raw message