[356400] XML Content outline blocks Structured Editor (WebPage/XHTML/HTML/JSP editors) while retrieving DTDs using a wrong addresses or public Ids
diff --git a/bundles/org.eclipse.wst.dtd.core/saxparser/org/eclipse/wst/dtd/core/internal/saxparser/DTDParser.java b/bundles/org.eclipse.wst.dtd.core/saxparser/org/eclipse/wst/dtd/core/internal/saxparser/DTDParser.java
index 35bb54f..3666dad 100644
--- a/bundles/org.eclipse.wst.dtd.core/saxparser/org/eclipse/wst/dtd/core/internal/saxparser/DTDParser.java
+++ b/bundles/org.eclipse.wst.dtd.core/saxparser/org/eclipse/wst/dtd/core/internal/saxparser/DTDParser.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2001, 2010 IBM Corporation and others.
+ * Copyright (c) 2001, 2011 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -116,7 +116,7 @@
// CS ensure that the physical URI is considered where streams are required
// and the logicalURI is used as the DTD's baseLocation
String physicalURI = URIResolverPlugin.createResolver().resolvePhysicalLocation("", "", logicalURI); //$NON-NLS-1$ //$NON-NLS-2$
- boolean isReadable = URIHelper.isReadableURI(physicalURI, true);
+ boolean isReadable = URIHelper.isReadableURI(physicalURI, false);
if (!isReadable) {
throw new Exception("DTD parse error. Can not read the specified URI : " + logicalURI); //$NON-NLS-1$
}
diff --git a/bundles/org.eclipse.wst.xml.core/src-validation/org/eclipse/wst/xml/core/internal/validation/core/LazyURLInputStream.java b/bundles/org.eclipse.wst.xml.core/src-validation/org/eclipse/wst/xml/core/internal/validation/core/LazyURLInputStream.java
index 78fd207..015193b 100644
--- a/bundles/org.eclipse.wst.xml.core/src-validation/org/eclipse/wst/xml/core/internal/validation/core/LazyURLInputStream.java
+++ b/bundles/org.eclipse.wst.xml.core/src-validation/org/eclipse/wst/xml/core/internal/validation/core/LazyURLInputStream.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2001, 2010 IBM Corporation and others.
+ * Copyright (c) 2001, 2011 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -12,7 +12,8 @@
package org.eclipse.wst.xml.core.internal.validation.core;
import java.io.IOException;
import java.io.InputStream;
-import java.net.URL;
+
+import org.eclipse.wst.common.uriresolver.URIHelper;
/**
@@ -28,7 +29,6 @@
protected boolean error;
boolean hasMarks;
boolean pretendFileIsStillOpen;
-
public LazyURLInputStream(String url)
{
this.url = url;
@@ -44,7 +44,7 @@
try
{
- inner = new URL(url).openStream();
+ inner = URIHelper.getInputStream(url, 0);
pretendFileIsStillOpen = false;
hasMarks = false;
}