xml-commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 47720] New: Find Catalogs using Service Provider Interface
Date Fri, 21 Aug 2009 10:00:14 GMT
https://issues.apache.org/bugzilla/show_bug.cgi?id=47720

           Summary: Find Catalogs using Service Provider Interface
           Product: XmlCommons
           Version: 1.x
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: enhancement
          Priority: P2
         Component: Resolver
        AssignedTo: commons-dev@xml.apache.org
        ReportedBy: Martin.vGagern@gmx.net


--- Comment #0 from Martin von Gagern <Martin.vGagern@gmx.net> 2009-08-21 03:00:04 PDT
---
Developing apps would be greatly simplified if you could simply add some JAR to
the classpath, and a Catalog as generated by the default CatalogManager would
find the catalog within that JAR as well as the documents it references.

To achieve this, I believe a slightly modified version of the Service Provider
Interface would be most suitable.
http://java.sun.com/j2se/1.5.0/docs/guide/jar/jar.html#Service%20Provider
describes that a file under META-INF/services/package.interface.Name should
list qualified names of classes providing said interface.

To work with XML catalogs, you would specify a class name, but instead the name
of a resource. So I think that you should have a file called
"META-INF/services/org.apache.xml.resolver.catalog" which would contain lines
like "my/company/catalog.xml". That catalog could then be located as a
resource, auto-appended to the list of catalogs and parsed along with the
system catalogs.

One could consider placing the catalog itself in the META-INF directory. That,
however, would probably prevent it from being uniquely identified by its name
alone, which might be useful if you want to deal with the catalog yourself,
without using the full CatalogManager framework.

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

Mime
View raw message