ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Craeg K. Strong" <>
Subject [PROPOSE] Enhancements to <style> and <xmlvalidate> for 1.5
Date Wed, 12 Sep 2001 18:57:42 GMT
For maximum flexibility in processing XML, I want to have all XML files 
included/imported/refered to
specified via lookup tables.    That way you can map things like the 

""  ==>   
""  ==> 

To enable this, I would like to have a way of specifying a URIResolver 
and/or EntityResolver for both
tasks that have to do with processing XML: <style> and <xmlvalidate>

JAXP provides an elegant way to do this:

For XSLT processing, one can specify:

- URIResolver,   via javax.xml.transform.Transformer.setURIResolver()

- SAXParserFactory,      via the property: 

For XML Parsing, one can specify:

- EntityResolver,      via  org.xml.sax.XMLReader.setEntityResolver()

OK, fine.  How?

First off, <style> and <xmlvalidate> could be upgraded to _only_ support 
TraX.  I proposed this already
for release 1.5 and it didn't seem too controversial.

Secondly, we could add optional hooks for resolvers.   Here is one 

   destdir  = "/mumble"
   style = "/foo/bar/transformer.xsl"
  uriresolver = "com.arielpartners.ade.URIResolver"
  entityresolver = "com.arielpartners.ade.EntityResolver"/>

    failonerror = "no"
    entityresolver = "com.arielpartners.ade.EntityResolver"/>

The implementation could use Class.forName() and make sure it is of the 
correct type.



View raw message