You are viewing a plain text version of this content. The canonical link for it is here.
Posted to xml-commons-dev@xerces.apache.org by "Kalakotia (Jira)" <ji...@apache.org> on 2021/09/25 18:58:00 UTC

[jira] [Commented] (XMLCOMMONS-58) sub catalogs not resolving public identifiers

    [ https://issues.apache.org/jira/browse/XMLCOMMONS-58?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17420150#comment-17420150 ] 

Kalakotia commented on XMLCOMMONS-58:
-------------------------------------

you have explained it much clearly. let's apply it to my [tennis blog|http://tennisunit.com].

> sub catalogs not resolving public identifiers
> ---------------------------------------------
>
>                 Key: XMLCOMMONS-58
>                 URL: https://issues.apache.org/jira/browse/XMLCOMMONS-58
>             Project: XML Commons
>          Issue Type: Bug
>          Components: XML Commons Resolver
>    Affects Versions: XML Commons Resolver 1.2.0
>         Environment: Operating System: Windows XP
> Platform: PC
>            Reporter: Simon Macneall
>
> I have a catalog that refer to another catalog using CATALOG catalog2
> If I try to call resolvePublic on an identifier that is in catalog2 I get a 
> catalog file not found problem.
> This didn't happen with 1.1, but appears in 1.2
> I tracked it down to Catalog.java, parseCatalogFile method. When it is lazy 
> loading the catalogs, it generates base, but the fileName may already be a 
> file: reference, so it ends up creating file:/foo/file:/foo/catalog, which 
> can't be found.
> I have fixed it locally by changing
>             base = new URL(catalogCwd, fixSlashes(fileName));
> to 
>         // this catalog may have been pointed to by another, so we need to 
> check if it already
>         // has the base prepended            
>         if (!fileName.startsWith("file:")) {
>             base = new URL(catalogCwd, fixSlashes(fileName));
>         } else {
>             base = new URL(fixSlashes(fileName));
>         }
> but I suspect that that isn't a very clean way of doing it.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

---------------------------------------------------------------------
To unsubscribe, e-mail: xml-commons-dev-unsubscribe@xerces.apache.org
For additional commands, e-mail: xml-commons-dev-help@xerces.apache.org