protected void setLocation(Object refObject, Element element)
{
try
{
ElementImpl elementImpl = (ElementImpl)element;
ElementLocation elementLocation = (ElementLocation)elementImpl.getUserData();
if (elementLocation != null)
{
elementLocations.put(
refObject,
new LocationHolder(elementLocation.getLineNumber(), elementLocation.getColumnNumber(), def.getDocumentBaseURI()));
}
}
catch (ClassCastException e)
{
}