Hello, although I am not familiar with forrest, I have used the 
LinkRewriterTransformer fairly often, so, if I do grasp the problem correctly, 
I think it is quite easily achieved with the LocationMapModule (I suppose it 
all works similar in forrest)

So, if I understand the problem correctly, you want to rewrite a link like:

site:/foo/bar#anchor, 

where foo/bar matches a xpath in an xml file, and the site: protocol refers to 
an XMLFileModule. Right? If I did not get it right, ignore the rest I suppose.

But if this is the problem, then it could be solved by having an extra  
protocol, site_lm, referring to a LocationMapModule. The link to be rewritten 
would become site_lm:/foo/bar#anchor, and in the locationmap.xml having a 
matcher:

<components>
    <matchers default="locationmap">
      <matcher name="locationmap" 
src="org.apache.cocoon.matching.WildcardLocationMapHintMatcher"/>
     </matchers>
</components>
<match pattern="*/*#*" type="WildcardLocationMapHintMatcher">
        <location src="{site:{1}/{2}}#{3}"/>
</match>

Hope this actually was the problem :-)

Regards Ard

-- 

Hippo
Oosteinde 11
1017WT Amsterdam
The Netherlands
Tel  +31 (0)20 5224466
-------------------------------------------------------------
[EMAIL PROTECTED] / http://www.hippo.nl
-------------------------------------------------------------- 




> Cameron McCormack wrote:
> > David Crossley:
> > > Please attach it to a new Issue at Cocoon's issue tracker
> > > http://issues.apache.org/jira/browse/COCOON
> > 
> > Ok, though perhaps a different solution would be better...
> > 
> > > Me either. Here are some tips, but i am not even sure
> > > if they are up-to-date.
> > > http://cocoon.zones.apache.org/daisy/documentation/g1/798.html
> > 
> > That seems to work, thanks.
> 
> Fantastic. It will be comforting for the cocoon-dev
> people to know that Cocoon-2.2 trunk is usable.
> 
> > So after thinking about it, I'm not sure if changing the
> > LinkRewriterTransformer is the right solution.  Perhaps you want to
> > have some schemes that don't include the fragment (e.g., site:) and
> > others that do (e.g., an rdf: scheme that identifies RDF literals,
> > where fragment identifiers are important).  You'd need two 
> linkrewriter
> > instances for that.
> >
> > So I think it's more that the SimpleMappingMetaModule is 
> insufficient to
> > describe the mapping of 'A#B' to 'concat(/site//A/@href, 
> "#B")' for the
> > key to the XMLFileModule.
> > 
> > What do you think the right solution to this should be?  A
> > MoreComplexMappingMetaModule that can construct such keys?  
> How general
> > should this be?  And where should it go, in Cocoon or Forrest?
> 
> It is beyond me, and nobody else has answered you.
> 
> Anyway, i think that it is a topic for [EMAIL PROTECTED]
> 
> -David
>