You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@hivemind.apache.org by Norbert Sándor <de...@erinors.com> on 2005/10/04 23:35:34 UTC

config. q.

Hi,

I have the following configuration:

<configuration-point id="ConfigPoint">
<element name="resource" key-attribute="name">
<attribute name="name" required="true"/>
<attribute name="path" required="true" translator="resource"/>
<rules>
<push-attribute attribute="path"/>
<invoke-parent method="addElement"/>
</rules>
</element>
</schema>
</configuration-point>

My problem is that the resource is added as a FileResource which contains 
only the relative path to the module descriptor. But where I want to use it 
I must have an absolute path to be able to open the file.
How can I achieve this? Should I write my own translator?

Thanks,
Norbi 



---------------------------------------------------------------------
To unsubscribe, e-mail: hivemind-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: hivemind-user-help@jakarta.apache.org


Re: config. q.

Posted by Norbert Sándor <de...@erinors.com>.
I made a custom translator to solve my problem.

But if I'm right then ResourceTranslator creates relative resources which 
seems useless in case of file and context resources (because they store only 
the relative part of the path and their getResourceURL() return null). 
Classpath resources work as expected.

BR,
Norbi

----- Original Message ----- 
From: "Norbert Sándor" <de...@erinors.com>
To: "Users HiveMind" <hi...@jakarta.apache.org>
Sent: Tuesday, October 04, 2005 11:35 PM
Subject: config. q.


> Hi,
>
> I have the following configuration:
>
> <configuration-point id="ConfigPoint">
> <element name="resource" key-attribute="name">
> <attribute name="name" required="true"/>
> <attribute name="path" required="true" translator="resource"/>
> <rules>
> <push-attribute attribute="path"/>
> <invoke-parent method="addElement"/>
> </rules>
> </element>
> </schema>
> </configuration-point>
>
> My problem is that the resource is added as a FileResource which contains 
> only the relative path to the module descriptor. But where I want to use 
> it I must have an absolute path to be able to open the file.
> How can I achieve this? Should I write my own translator?
>
> Thanks,
> Norbi
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: hivemind-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: hivemind-user-help@jakarta.apache.org
>
>
>
> 



---------------------------------------------------------------------
To unsubscribe, e-mail: hivemind-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: hivemind-user-help@jakarta.apache.org