if(identifier == null)
{
String idMessage = (htmlAsset.assetLocation().assetContainer().isNamespaceEnforced()) ?
"a namespaced ID of '" + NamespaceUtility.convertToNamespace(htmlAsset.assetLocation().requirePrefix()) + ".*'" : "an ID";
throw new NamespaceException( "HTML template found without an identifier: '" +
startTag.toString() + "'. Root element should have " + idMessage + ".");
}
htmlAsset.assetLocation().assertIdentifierCorrectlyNamespaced(identifier);
Asset assetWithDuplicateId = identifiers.get(identifier);
if(assetWithDuplicateId == null){
identifiers.put(identifier, htmlAsset);
}else{
throw new NamespaceException("HTML template found with a duplicate identifier: '" +
identifier + "'. The same identifier is used for the file:\n'"
+ assetWithDuplicateId.getAssetPath()
+ "'.");
}
}