mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
IDEA-229461 Help Resolving XML Catalog URIs
support uri resolve GitOrigin-RevId: 18a655296ab46efc965c4f6682eb03b49df2e6c3
This commit is contained in:
committed by
intellij-monorepo-bot
parent
9aba3bf6bd
commit
e85ea16993
@@ -55,6 +55,12 @@ public class XMLCatalogManagerTest extends BasePlatformTestCase {
|
||||
assertTrue(resolve, resolve.endsWith("/catalog/xhtml1-strict.dtd"));
|
||||
}
|
||||
|
||||
public void testResolveUri() {
|
||||
String resolve = getManager().resolve("test-node.xsl");
|
||||
assertNotNull(resolve);
|
||||
assertEquals("file:/C:/temp/catalog-test/library/test-node.xsl", resolve);
|
||||
}
|
||||
|
||||
public void testHighlighting() {
|
||||
myFixture.configureByFile("policy.xml");
|
||||
List<HighlightInfo> infos = myFixture.doHighlighting();
|
||||
|
||||
@@ -8,4 +8,5 @@
|
||||
uri="xhtml1-strict.dtd"/>
|
||||
<system systemId="urn:oasis:names:tc:xacml:1.0:policy"
|
||||
uri="catalog/cs-xacml-schema-policy-01.xsd"/>
|
||||
<uriSuffix uriSuffix="test-node.xsl" uri="file:///C:/temp/catalog-test/library/test-node.xsl"/>
|
||||
</catalog>
|
||||
@@ -75,6 +75,8 @@ public class XMLCatalogManager {
|
||||
try {
|
||||
Catalog catalog = myManager.getCatalog();
|
||||
if (catalog == null) return null;
|
||||
String byUri = catalog.resolveURI(uri);
|
||||
if (byUri != null) return byUri;
|
||||
String resolved = catalog.resolveSystem(uri);
|
||||
return resolved == null ? catalog.resolvePublic(uri, null) : resolved;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user