uri = uri.substring(0, n);
}
DocumentState state = (DocumentState)cacheMap.get(uri);
if (state == null) {
Document document = documentFactory.createDocument(uri);
DefaultSVGContext ctx
= (DefaultSVGContext)((SVGOMDocument)document).getSVGContext();
ctx.setUserStyleSheetURI(userAgent.getUserStyleSheetURI());
DocumentDescriptor desc = documentFactory.getDocumentDescriptor();
state = new DocumentState(uri, document, desc);
cacheMap.put(uri, state);
}