You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cocoon.apache.org by Felix Knecht <fe...@apache.org> on 2007/05/16 16:31:11 UTC

servletService / servletLinkRewriter

I'm not sure about this behaviour is correct (I thought to have read
somewhere in the migration guide that it's enough to put the
servletLinkRewriter transformer just before the html serialization, but
here I need to use it in between also.

If this is correct (I suppose so) then it's ok, otherwise I found a bug.

sitemap
<snip>

        <map:generate src="xmldb:xindice-embed:///db/{1}"/>
        <map:transform src="xmldb2samples.xsl"/>
        <map:transform type="servletLinkRewriter" />
        <!-- Make use of servlet services -->
        <map:serialize type="servletService" mime-type="text/html">
          <map:parameter name="service"
value="servlet:style-default:/service/common/simple-samples2html" />
        </map:serialize>



in xmldb2samples.xsl I have a constructs like:
  <xsl:import
href="servlet:style-default:/stylesheets/system/xml2html.xslt"/>
  <link href="servlet:style-default:/styles/prettycontent.css"
type="text/css" rel="stylesheet"/>
  <script src="servlet:style-default:/scripts/prettycontent.js"
type="text/javascript"/>



Felix

Re: servletService / servletLinkRewriter

Posted by Grzegorz Kossakowski <gk...@apache.org>.
Felix Knecht pisze:
> Grzegorz Kossakowski schrieb:
> 
> If it's logical possible to have it in between and in the end of a matcher.

Yes because this transformer just rewrites all "servlet:" links in SAX stream, so if called second time (and no more links were added 
somewhere in between) nothing will happen. You can call it at any stage of processing and any times you like but it's advised to do it at 
the end and only once just for sake of performance, nothing more.

-- 
Grzegorz Kossakowski
http://reflectingonthevicissitudes.wordpress.com/

Re: servletService / servletLinkRewriter

Posted by Felix Knecht <fe...@apache.org>.
Grzegorz Kossakowski schrieb:
> Felix Knecht pisze:
>> I'm not sure about this behaviour is correct (I thought to have read
>> somewhere in the migration guide that it's enough to put the
>> servletLinkRewriter transformer just before the html serialization, but
>> here I need to use it in between also.
>>
>> If this is correct (I suppose so) then it's ok, otherwise I found a bug.
>
> I'm not sure what is your concern? Are you wondering if
> servletLinkRewriter can be put in the pipeline twice or if some other
> transformers can be put after that one?
>

If it's logical possible to have it in between and in the end of a matcher.

Re: servletService / servletLinkRewriter

Posted by Grzegorz Kossakowski <gk...@apache.org>.
Felix Knecht pisze:
> I'm not sure about this behaviour is correct (I thought to have read
> somewhere in the migration guide that it's enough to put the
> servletLinkRewriter transformer just before the html serialization, but
> here I need to use it in between also.
> 
> If this is correct (I suppose so) then it's ok, otherwise I found a bug.

I'm not sure what is your concern? Are you wondering if servletLinkRewriter can be put in the pipeline twice or if some other transformers 
can be put after that one?

-- 
Grzegorz Kossakowski
http://reflectingonthevicissitudes.wordpress.com/