Help Resolving XML Catalog URIs
Hi all -
I'm trying to add an XML Catalog to IDEA to resolve some `xsl:include href="..."` in an XSL stylesheet, but for some reason the references in the catalog are not being resolved correctly.
1. I have an XSLT that looks like this:
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
exclude-result-prefixes="xs"
version="2.0">
<xsl:include href="test-node.xsl"/>
<xsl:include href="name-node.xsl"/>
<xsl:output method="xml" indent="yes" encoding="UTF-8"/>
<xsl:strip-space elements="*"/>
<xsl:template match="@*|node()">
<xsl:copy>
<xsl:apply-templates select="@*|node()"/>
</xsl:copy>
</xsl:template>
</xsl:stylesheet>
2. I have an XML Catalog file that looks like so:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE catalog PUBLIC "-//OASIS//DTD XML Catalogs V1.1//EN" "http://www.oasis-open.org/committees/entity/release/1.1/catalog.dtd">
<catalog xmlns="urn:oasis:names:tc:entity:xmlns:xml:catalog">
<uriSuffix uriSuffix="test-node.xsl" uri="/tmp/catalog-test/library/test-node.xsl"/>
<uriSuffix uriSuffix="name-node.xsl" uri="/tmp/catalog-test/library/name-node.xsl"/>
</catalog>
3. I've created an XML Catalog properties file that looks like so:
catalogs=test-catalog-2.xml
relative-catalogs=yes
prefer=system
static-catalog=yes
allow-oasis-xml-catalog-pi=yes
verbosity=99
I've added the xml-catalog.properties file to Settings > Languages & Framewords > Schemas and DTDs > XML Catalog, but the editor still reports that it `Cannot resolve file 'test-node.xsl'`.
Is there something else I need to add to the .properties file, or is there another method for resolving these sorts of URIs in IDEA?
Thanks in advance for your help.
Edit: I do have a `test-node.xsl` and `name-node.xsl` file on the file system, under `/tmp/catalog-test/library/`; additionally, the catalog file is parsed correctly by other applications (allowing me to execute the XSL transform).
Please sign in to leave a comment.
Please report at https://youtrack.jetbrains.com/newIssue?project=IDEA with the sample files/project attached so that we can reproduce it locally.
https://youtrack.jetbrains.com/issue/IDEA-96049 may be related.
Hi Serge,
Thank you for the response. I'll create a ticket.
Best,
Bridger
Hi Serge, et al,
Apologies for resurrecting this old question, but I'm a bit confused about the status of the ticket I submitted in YouTrack (https://youtrack.jetbrains.com/issue/IDEA-229461). The status on the ticket (IDEA-229461) seems to imply that the problem has been addressed/fixed for 2019.3.3.
Unfortunately, I'm still seeing the same problem on 2019.3.3 (details below). Is there a syntax problem with my xml-catalog.properties file? It's the same as the included sample above.
Thanks for any insight you're able to share.
Best,
Bridger
IntelliJ IDEA 2019.3.3 (Ultimate Edition)
Build #IU-193.6494.35, built on February 10, 2020
Licensed to Bridger Dyson-Smith
Subscription is active until November 5, 2020
Runtime version: 11.0.5-internal+11-adhoc..jdk11u-jdk-11.0.510 amd64
VM: OpenJDK 64-Bit Server VM by Void
Linux 5.4.23_1
GC: ParNew, ConcurrentMarkSweep
Memory: 2014M
Cores: 4
Registry:
Non-Bundled Plugins: Unicode Browser, com.jetbrains.php, com.jetbrains.plugins.ini4idea, com.jetbrains.php.drupal, com.vladsch.idea.multimarkdown, mobi.hsz.idea.gitignore, org.jetbrains.kotlin, reasonml, sparql4idea, uk.co.reecedunn.intellij.plugin.xquery
Please also check with https://www.jetbrains.com/idea/nextversion/ .
If the issue persists, submit a new bug with more details/sample catalog/XML.
Serge,
thank you very much. I'll try that.
Best,
Bridger