LOG.debug("Parsing " + location);
URL url = location.getResourceURL();
if (url == null)
throw new DocumentParseException(
Tapestry.format("AbstractDocumentParser.missing-resource", location),
location);
InputSource source = new InputSource(url.toExternalForm());
digester.setResourceLocation(location);
Object result = digester.parse(source);
if (LOG.isDebugEnabled())
LOG.debug("Result: " + result);
return result;
}
catch (SAXParseException ex)
{
throw new DocumentParseException(ex);
}
catch (DocumentParseException ex)
{
throw ex;
}
catch (Exception ex)
{
throw new DocumentParseException(
Tapestry.format(
"SpecificationParser.error-reading-resource",
location,
ex.getMessage()),
location,