Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
View | Details | Raw Unified | Return to bug 136399 | Differences between
and this patch

Collapse All | Expand All

(-)src-contentmodel/org/eclipse/wst/xml/core/internal/contentmodel/modelqueryimpl/CMDocumentManagerImpl.java (-3 / +11 lines)
Lines 51-56 Link Here
51
    this.cmDocumentReferenceProvider = cmDocumentReferenceProvider;
51
    this.cmDocumentReferenceProvider = cmDocumentReferenceProvider;
52
    setPropertyEnabled(PROPERTY_AUTO_LOAD, true);
52
    setPropertyEnabled(PROPERTY_AUTO_LOAD, true);
53
    setPropertyEnabled(PROPERTY_USE_CACHED_RESOLVED_URI, false);
53
    setPropertyEnabled(PROPERTY_USE_CACHED_RESOLVED_URI, false);
54
    setPropertyEnabled(PROPERTY_PERFORM_URI_RESOLUTION, true);
54
  }         
55
  }         
55
56
56
       
57
       
Lines 158-164 Link Here
158
159
159
    if (getPropertyEnabled(PROPERTY_AUTO_LOAD))
160
    if (getPropertyEnabled(PROPERTY_AUTO_LOAD))
160
    {
161
    {
161
      resolvedURI = lookupOrCreateResolvedURI(publicId, systemId);
162
      // See https://bugs.eclipse.org/bugs/show_bug.cgi?id=136399
163
164
      if (getPropertyEnabled(PROPERTY_PERFORM_URI_RESOLUTION))
165
      {
166
        resolvedURI = lookupOrCreateResolvedURI(publicId, systemId);
167
      }
168
      else
169
      {
170
        resolvedURI = systemId;
171
      }
162
    }    
172
    }    
163
    else
173
    else
164
    {
174
    {
Lines 252-259 Link Here
252
    cmDocumentCache.setStatus(resolvedURI, CMDocumentCache.STATUS_LOADING);
262
    cmDocumentCache.setStatus(resolvedURI, CMDocumentCache.STATUS_LOADING);
253
  
263
  
254
    CMDocument result = null;         
264
    CMDocument result = null;         
255
    int x = 1;
256
    x++;
257
    if (resolvedURI != null && resolvedURI.length() > 0)
265
    if (resolvedURI != null && resolvedURI.length() > 0)
258
    {
266
    {
259
      // try to get from cache
267
      // try to get from cache
(-)src-contentmodel/org/eclipse/wst/xml/core/internal/contentmodel/modelquery/CMDocumentManager.java (+8 lines)
Lines 59-64 Link Here
59
	public static final String PROPERTY_USE_CACHED_RESOLVED_URI = "useCachedResovledURI"; //$NON-NLS-1$
59
	public static final String PROPERTY_USE_CACHED_RESOLVED_URI = "useCachedResovledURI"; //$NON-NLS-1$
60
60
61
	/**
61
	/**
62
	 * See https://bugs.eclipse.org/bugs/show_bug.cgi?id=136399
63
	 * Allows a client to control whether the document manager attempts to resolve a
64
	 * CM document's URI. When set to false, the CM systemID will be assumed to point
65
	 * to an already resolved URI. By default this property is set to true.
66
	 */
67
	public static final String PROPERTY_PERFORM_URI_RESOLUTION = "performURIResolution"; //$NON-NLS-1$
68
	
69
	/**
62
	 * Set the enabled state of a property.
70
	 * Set the enabled state of a property.
63
	 */
71
	 */
64
	public void setPropertyEnabled(String propertyName, boolean enabled);
72
	public void setPropertyEnabled(String propertyName, boolean enabled);
(-)src/org/eclipse/wst/html/core/internal/modelquery/XHTMLAssociationProvider.java (+9 lines)
Lines 13-18 Link Here
13
13
14
import org.eclipse.wst.common.uriresolver.internal.provisional.URIResolver;
14
import org.eclipse.wst.common.uriresolver.internal.provisional.URIResolver;
15
import org.eclipse.wst.xml.core.internal.contentmodel.CMDocument;
15
import org.eclipse.wst.xml.core.internal.contentmodel.CMDocument;
16
import org.eclipse.wst.xml.core.internal.contentmodel.modelquery.CMDocumentManager;
16
import org.eclipse.wst.xml.core.internal.contentmodel.modelqueryimpl.XMLAssociationProvider;
17
import org.eclipse.wst.xml.core.internal.contentmodel.modelqueryimpl.XMLAssociationProvider;
17
import org.eclipse.wst.xml.core.internal.contentmodel.util.CMDocumentCache;
18
import org.eclipse.wst.xml.core.internal.contentmodel.util.CMDocumentCache;
18
import org.w3c.dom.Document;
19
import org.w3c.dom.Document;
Lines 39-44 Link Here
39
	public XHTMLAssociationProvider(CMDocumentCache cache, URIResolver idResolver) {
40
	public XHTMLAssociationProvider(CMDocumentCache cache, URIResolver idResolver) {
40
		super(cache);
41
		super(cache);
41
		this.idResolver = idResolver;
42
		this.idResolver = idResolver;
43
		   
44
		// See https://bugs.eclipse.org/bugs/show_bug.cgi?id=136399. If the CM document URI
45
		// is resolved and cached at this level instruct the CM model manager to avoid 
46
		// re-resolving the URI.
47
48
		if (USE_QUICK_CACHE) {
49
		  documentManager.setPropertyEnabled(CMDocumentManager.PROPERTY_PERFORM_URI_RESOLUTION, false);
50
		}
42
	}
51
	}
43
52
44
	/**
53
	/**

Return to bug 136399