ccs.xml
Class XHtmlEntityResolver

java.lang.Object
  extended by ccs.xml.XHtmlEntityResolver
All Implemented Interfaces:
org.xml.sax.EntityResolver, org.xml.sax.ext.EntityResolver2

public class XHtmlEntityResolver
extends java.lang.Object
implements org.xml.sax.ext.EntityResolver2

Resolves entities defined in XHTML 1.1. This allows eg.   to appear in parsed XML (XHTML / XSLT) without the parse throwing.


Constructor Summary
XHtmlEntityResolver()
           
 
Method Summary
 org.xml.sax.InputSource getExternalSubset(java.lang.String name, java.lang.String baseURI)
           
static org.xml.sax.XMLReader newXMLReader()
          Returns an XMLReader which can resolve XHTML 1.1 entities.
 org.xml.sax.InputSource resolveEntity(java.lang.String publicId, java.lang.String systemId)
           
 org.xml.sax.InputSource resolveEntity(java.lang.String name, java.lang.String publicId, java.lang.String baseURI, java.lang.String systemId)
           
static void setBaseUrl(java.lang.String baseu)
          Sets the base URL which will be used to retrieve the necessary bits of DTD.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XHtmlEntityResolver

public XHtmlEntityResolver()
Method Detail

setBaseUrl

public static void setBaseUrl(java.lang.String baseu)
Sets the base URL which will be used to retrieve the necessary bits of DTD. In most cases, this should be a URL which accesses common.chrome.

Parameters:
baseu - The base URL. Eg. for Pasiphae apps, this will end in /cchrome/. NB. must end with a slash.

newXMLReader

public static org.xml.sax.XMLReader newXMLReader()
Returns an XMLReader which can resolve XHTML 1.1 entities. Most applications will use this utility method rather than instantiating one of these directly.


getExternalSubset

public org.xml.sax.InputSource getExternalSubset(java.lang.String name,
                                                 java.lang.String baseURI)
                                          throws org.xml.sax.SAXException,
                                                 java.io.IOException
Specified by:
getExternalSubset in interface org.xml.sax.ext.EntityResolver2
Throws:
org.xml.sax.SAXException
java.io.IOException

resolveEntity

public org.xml.sax.InputSource resolveEntity(java.lang.String name,
                                             java.lang.String publicId,
                                             java.lang.String baseURI,
                                             java.lang.String systemId)
                                      throws org.xml.sax.SAXException,
                                             java.io.IOException
Specified by:
resolveEntity in interface org.xml.sax.ext.EntityResolver2
Throws:
org.xml.sax.SAXException
java.io.IOException

resolveEntity

public org.xml.sax.InputSource resolveEntity(java.lang.String publicId,
                                             java.lang.String systemId)
                                      throws org.xml.sax.SAXException,
                                             java.io.IOException
Specified by:
resolveEntity in interface org.xml.sax.EntityResolver
Throws:
org.xml.sax.SAXException
java.io.IOException