You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Murad Jura <mu...@asbt.uz> on 2003/02/01 13:15:41 UTC
Re: mapping to basepath in static content
Hello Robert,
there is the AugmentTransformer which augments all 'href' attributes
with the full path to the request. IMHO it is a good starting point for you.
Regards,
Murad Jura.
Robert Sösemann wrote:
> Hello,
>
> what I need is a centralized mechanism to change the paths in all my
> site-elements. (that means: Later when I switsch from development to
> production I just want to change pathname at one single point, not every
> single href, src ...)
>
> Inside elements handled by cocoon (XSP, Generators, Action) thats no
> problem, because they know their own context. Things I later add in my
> Transformers are also no problem. I use xsl:include to set a variable in
> very other xsl.
>
> BUT: I also use static html or xhtml pages. How can change path attributes
> an even javascript command in a similar centralized way?
>
> Who can help? Maybe I am on a totally wrong way.
>
> Rob
>
>
>
> ---------------------------------------------------------------------
> Please check that your question has not already been answered in the
> FAQ before posting. <http://xml.apache.org/cocoon/faq/index.html>
>
> To unsubscribe, e-mail: <co...@xml.apache.org>
> For additional commands, e-mail: <co...@xml.apache.org>
>
---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faq/index.html>
To unsubscribe, e-mail: <co...@xml.apache.org>
For additional commands, e-mail: <co...@xml.apache.org>
Re: mapping to basepath in static content
Posted by Murad Jura <mu...@asbt.uz>.
Hello Robert,
see the AugmentTransformer's startElement() method. You can extends this
class and modify the 'if (attrName.equals("href")) {' string to add your
attributes (src/value/action).
Regards,
Murad Jura.
Robert Sösemann wrote:
> Yes, thank you, it's better than nothing. But I need to replace URL in scr,
> value, action ... attributes as well. Sometimes even in javascript commands.
> I tried to write my own xsl, but then it really gets very slow.
>
> Any idea.
>
> Robert
> ----- Original Message -----
> From: "Murad Jura" <mu...@asbt.uz>
> To: <co...@xml.apache.org>
> Sent: Saturday, February 01, 2003 1:15 PM
> Subject: Re: mapping to basepath in static content
>
>
>
>>Hello Robert,
>>
>>there is the AugmentTransformer which augments all 'href' attributes
>>with the full path to the request. IMHO it is a good starting point for
>
> you.
>
>>Regards,
>>Murad Jura.
>>
>>Robert Sösemann wrote:
>>
>>>Hello,
>>>
>>>what I need is a centralized mechanism to change the paths in all my
>>>site-elements. (that means: Later when I switsch from development to
>>>production I just want to change pathname at one single point, not every
>>>single href, src ...)
>>>
>>>Inside elements handled by cocoon (XSP, Generators, Action) thats no
>>>problem, because they know their own context. Things I later add in my
>>>Transformers are also no problem. I use xsl:include to set a variable in
>>>very other xsl.
>>>
>>>BUT: I also use static html or xhtml pages. How can change path
>>
> attributes
>
>>>an even javascript command in a similar centralized way?
>>>
>>>Who can help? Maybe I am on a totally wrong way.
>>>
>>>Rob
>>>
>>>
>>>
>>>---------------------------------------------------------------------
>>>Please check that your question has not already been answered in the
>>>FAQ before posting. <http://xml.apache.org/cocoon/faq/index.html>
>>>
>>>To unsubscribe, e-mail: <co...@xml.apache.org>
>>>For additional commands, e-mail: <co...@xml.apache.org>
>>>
>>
>>
>>
>>---------------------------------------------------------------------
>>Please check that your question has not already been answered in the
>>FAQ before posting. <http://xml.apache.org/cocoon/faq/index.html>
>>
>>To unsubscribe, e-mail: <co...@xml.apache.org>
>>For additional commands, e-mail: <co...@xml.apache.org>
>>
>
>
> ---------------------------------------------------------------------
> Please check that your question has not already been answered in the
> FAQ before posting. <http://xml.apache.org/cocoon/faq/index.html>
>
> To unsubscribe, e-mail: <co...@xml.apache.org>
> For additional commands, e-mail: <co...@xml.apache.org>
>
---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faq/index.html>
To unsubscribe, e-mail: <co...@xml.apache.org>
For additional commands, e-mail: <co...@xml.apache.org>
Re: mapping to basepath in static content
Posted by Robert Sösemann <ro...@gmx.de>.
Yes, thank you, it's better than nothing. But I need to replace URL in scr,
value, action ... attributes as well. Sometimes even in javascript commands.
I tried to write my own xsl, but then it really gets very slow.
Any idea.
Robert
----- Original Message -----
From: "Murad Jura" <mu...@asbt.uz>
To: <co...@xml.apache.org>
Sent: Saturday, February 01, 2003 1:15 PM
Subject: Re: mapping to basepath in static content
> Hello Robert,
>
> there is the AugmentTransformer which augments all 'href' attributes
> with the full path to the request. IMHO it is a good starting point for
you.
>
> Regards,
> Murad Jura.
>
> Robert Sösemann wrote:
> > Hello,
> >
> > what I need is a centralized mechanism to change the paths in all my
> > site-elements. (that means: Later when I switsch from development to
> > production I just want to change pathname at one single point, not every
> > single href, src ...)
> >
> > Inside elements handled by cocoon (XSP, Generators, Action) thats no
> > problem, because they know their own context. Things I later add in my
> > Transformers are also no problem. I use xsl:include to set a variable in
> > very other xsl.
> >
> > BUT: I also use static html or xhtml pages. How can change path
attributes
> > an even javascript command in a similar centralized way?
> >
> > Who can help? Maybe I am on a totally wrong way.
> >
> > Rob
> >
> >
> >
> > ---------------------------------------------------------------------
> > Please check that your question has not already been answered in the
> > FAQ before posting. <http://xml.apache.org/cocoon/faq/index.html>
> >
> > To unsubscribe, e-mail: <co...@xml.apache.org>
> > For additional commands, e-mail: <co...@xml.apache.org>
> >
>
>
>
>
> ---------------------------------------------------------------------
> Please check that your question has not already been answered in the
> FAQ before posting. <http://xml.apache.org/cocoon/faq/index.html>
>
> To unsubscribe, e-mail: <co...@xml.apache.org>
> For additional commands, e-mail: <co...@xml.apache.org>
>
---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faq/index.html>
To unsubscribe, e-mail: <co...@xml.apache.org>
For additional commands, e-mail: <co...@xml.apache.org>