[oXygen-user] Support for jar: URNs?

Eliot Kimber ekimber at reallysi.com
Tue Nov 15 08:50:51 CST 2011


Sweet--it didn't even occur to me to put the catalog in the Zip file.

My workaround yesterday was to use Ant to rewrite the catalog to add the
${base.dir} location since I know where the jar file will be relative to the
catalog in the source tree.

But having the catalog in the source is even easier.

I also wonder if zip:file://../../foo/catalog.xml would work? I guess I can
do that experiment.

Cheers,

E.

On 11/15/11 6:24 AM, "Radu Coravu" <radu_coravu at sync.ro> wrote:

> Hi Eliot,
> 
> If the catalog file is located directly on the local drive, relative
> references to it are interpreted as having the same protocol (which is
> the "file" protocol). I consider this to be correct.
> I understand that you would like relative references like this:
> "test.zip!/catalog.xml" to be expanded to absolute URLs having the
> protocol something like "zip:file" but this is not quite easy or correct
> to accomplish and would require some patches to the Xerces catalog resolver.
> 
> What I tested and could be used as a workaround:
> Have the catalog file located directly inside the zip (or jar).
> For example in the catalogs list I referenced it like this:
> 
>> 
zip:file:/D:/projects/eXml/samples/dita/flowers/concepts/test.zip!/catalog.xm>>
l
> 
> and it contained a relative reference like this:
> 
>>  <uri
>>         
>> name="http://test/res/plugin/dita4publishers/net.sourceforge.dita4publishers.
>> common.xslt/xsl/lib/relpath_util.xsl"
>>         uri="personal.xsl"/>
> 
> which got solved also inside the same zip.
> 
> Regards,
> Radu
> 
> Radu Coravu
> <oXygen/>  XML Editor, Schema Editor and XSLT Editor/Debugger
> http://www.oxygenxml.com
> 
> 
> On 11/14/2011 8:30 PM, Eliot Kimber wrote:
>> I'm trying to set up an entity resolution catalog that resolves to files in
>> a jar file.
>> 
>> I can get it to work as expected if the URL to the jar is absolute, e.g.:
>> 
>> <uri
>> name="rsuite:/res/plugin/dita4publishers/net.sourceforge.dita4publishers.com
>> mon.xslt/xsl/lib/relpath_util.xsl"
>> 
>> uri="jar:file:///Users/ekimber/workspace/rsuite-dita-support-quickfix/java/l
>> ib/dita4publishers-rsuite-plugin.jar!..."/>
>> 
>> However, a relative URL (relative to the catalog), does not work.
>> 
>> Is it possible for Oxygen to make a relative URL part of a jar: URN resolve
>> relative to the catalog?
>> 
>> This is to support development of XSLTs that import modules that, when
>> deployed into the RSuite CMS, will be referenced by an RSuite-specific URN.
>> The catalog allows the XSLTs to be developed without having to swap
>> different URNs in and out. I'm trying to set up a system whereby developers
>> can get the jar with the included modules from Ivy and then, by using an
>> invariant catalog, have the inclusions work.
>> 
>> I can't think of another way of doing it.
>> 
>> Thanks,
>> 
>> E.
>> 
>> 
> 
> 
> _______________________________________________
> oXygen-user mailing list
> oXygen-user at oxygenxml.com
> http://www.oxygenxml.com/mailman/listinfo/oxygen-user

-- 
Eliot Kimber
Senior Solutions Architect
"Bringing Strategy, Content, and Technology Together"
Main: 512.554.9368
www.reallysi.com
www.rsuitecms.com



More information about the oXygen-user mailing list