public static CmsXmlContentDefinition unmarshal(Document document, String schemaLocation) throws CmsXmlException {

        schemaLocation = translateSchema(schemaLocation);
        EntityResolver resolver = document.getEntityResolver();
        CmsXmlContentDefinition result = getCachedContentDefinition(schemaLocation, resolver);
        if (result == null) {
            // content definition was not found in the cache, unmarshal the XML document
            result = unmarshalInternal(document, schemaLocation, resolver);
        }
        return result;
    }
public static CmsXmlContentDefinition unmarshal ( Document document , String schemaLocation ) throws CmsXmlException { schemaLocation = translateSchema ( schemaLocation ) ; EntityResolver resolver = document . getEntityResolver ( ) ; CmsXmlContentDefinition result = getCachedContentDefinition ( schemaLocation , resolver ) ; if ( result == null ) { result = unmarshalInternal ( document , schemaLocation , resolver ) ; } return result ; }
Factory method to unmarshal (read) a XML content definition instance from a XML document.<p>

This method does additional validation to ensure the document has the required
XML structure for a OpenCms content definition schema.<p>

@param document the XML document to generate a XML content definition from
@param schemaLocation the location from which the XML schema was read (system id)

@return a XML content definition instance unmarshalled from the XML document

@throws CmsXmlException if something goes wrong