|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.backsource.utils.ant.XMLCatalogSystemIdAdapter
Adapts the ant XMLCatalog, so that it is possible to lookup also systemid.
The current implementation of XMLCatalog only handles public id for dtd:s and enitiys. Often it is necesarry to be able to also look up a systemId at another location than the one specifyed, for example when only SYSTEM is specifyed in an XML file. eq <!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">.
by specifying the last part of the systemid in the XMLCatalog data it is possible to lookup a systemid at another location than the one normaly resolved. for example, the following catalog definition would resolv the above SYSTEM to the log4j.jar file. *
<xmlcatalog id="jbosscatalog">
<classpath>
<pathelement location="${lib.dir}/log4j.jar"/>
</classpath>
<entity
publicId="log4j.dtd"
location="org/apache/log4j/xml/log4j.dtd"/>
</xmlcatalog>
Remember that this class is only possible to use from custom ant targets/helper classes.
| Field Summary | |
protected org.apache.tools.ant.types.XMLCatalog |
catalog
|
| Constructor Summary | |
XMLCatalogSystemIdAdapter()
|
|
XMLCatalogSystemIdAdapter(org.apache.tools.ant.types.XMLCatalog catalog)
|
|
| Method Summary | |
javax.xml.transform.Source |
resolve(java.lang.String href,
java.lang.String base)
Does nothing currently. |
org.xml.sax.InputSource |
resolveEntity(java.lang.String publicId,
java.lang.String systemId)
if publicId is null, translate systemId to a publicId thingy and call the real catalog. |
void |
setXMLCatalog(org.apache.tools.ant.types.XMLCatalog catalog)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
protected org.apache.tools.ant.types.XMLCatalog catalog
| Constructor Detail |
public XMLCatalogSystemIdAdapter()
public XMLCatalogSystemIdAdapter(org.apache.tools.ant.types.XMLCatalog catalog)
catalog - the XMLCatalog to delegate to.| Method Detail |
public void setXMLCatalog(org.apache.tools.ant.types.XMLCatalog catalog)
public org.xml.sax.InputSource resolveEntity(java.lang.String publicId,
java.lang.String systemId)
throws org.xml.sax.SAXException,
java.io.IOException
resolveEntity in interface org.xml.sax.EntityResolverorg.xml.sax.SAXException
java.io.IOException
public javax.xml.transform.Source resolve(java.lang.String href,
java.lang.String base)
throws javax.xml.transform.TransformerException
resolve in interface javax.xml.transform.URIResolverjavax.xml.transform.TransformerException
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||