org.w3c.mwi.mobileok.basic
Class ExtendedCatalogResolver

java.lang.Object
  extended by org.w3c.mwi.mobileok.basic.ExtendedCatalogResolver
All Implemented Interfaces:
org.xml.sax.EntityResolver

 class ExtendedCatalogResolver
extends java.lang.Object
implements org.xml.sax.EntityResolver

Catalog to entity resolver wrapper that makes it possible to use a CatalogResolver as an EntityResolver for XHTML validation purpose.

The entity resolver should be set before validating an XHTML resource using the XMLReader.setEntityResolver(EntityResolver) method.

The resolver also defines the static {#link getResourceFromAbsoluteFilename(String) method that converts a doctype System identifier to the full path of the corresponding resource in the catalog packaged with the mobileOK Checker library.

Version:
$Revision: 1.1 $
Author:
The W3C mobileOK Checker Task Force

Field Summary
private  org.apache.xml.resolver.tools.CatalogResolver delegate
           
 
Constructor Summary
ExtendedCatalogResolver(org.apache.xml.resolver.tools.CatalogResolver delegate)
           
 
Method Summary
private static int findEndOfSlashes(java.lang.String s)
           
(package private) static java.lang.String getResourceFromAbsoluteFilename(java.lang.String systemId)
           
 org.xml.sax.InputSource resolveEntity(java.lang.String publicId, java.lang.String systemId)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

delegate

private final org.apache.xml.resolver.tools.CatalogResolver delegate
Constructor Detail

ExtendedCatalogResolver

ExtendedCatalogResolver(org.apache.xml.resolver.tools.CatalogResolver delegate)
Method Detail

resolveEntity

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

getResourceFromAbsoluteFilename

static java.lang.String getResourceFromAbsoluteFilename(java.lang.String systemId)
                                                 throws java.net.MalformedURLException
Throws:
java.net.MalformedURLException

findEndOfSlashes

private static int findEndOfSlashes(java.lang.String s)