[
https://issues.apache.org/jira/browse/COCOON3-54?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12847775#action_12847775
]
Francesco Chicchiriccò edited comment on COCOON3-54 at 3/20/10 4:10 PM:
------------------------------------------------------------------------
A possible implementation in the attached classes.
Once provided a LinkRewriter implementation (i.e. TestRewriter), the
transformer can be used in the following way:
Map<String, Set<String>> toBeRewritten = new HashMap<String,
Set<String>>();
toBeRewritten.put("a", Collections.singleton("href"));
toBeRewritten.put("img", Collections.singleton("src"));
Pipeline<SAXPipelineComponent> pipeline = new
NonCachingPipeline<SAXPipelineComponent>();
pipeline.addComponent(new XMLGenerator(new File("/tmp/file.html")));
pipeline.addComponent(new LinkRewriterTransformer(new TestRewriter(),
toBeRewritten));
pipeline.addComponent(serializer);
pipeline.setup(System.out);
pipeline.execute();
was (Author: ilgrosso):
A possible implementation
> LinkRewriterTransformer
> -----------------------
>
> Key: COCOON3-54
> URL: https://issues.apache.org/jira/browse/COCOON3-54
> Project: Cocoon 3
> Issue Type: New Feature
> Components: cocoon-sax
> Reporter: Francesco Chicchiriccò
> Assignee: Simone Tripodi
> Attachments: LinkRewriter.java, LinkRewriterTransformer.java,
> LinkRewritingException.java
>
>
> A LinkRewriterTransformer (like as the old one for Cocoon 2.1, see [1]) could
> be a very nice addendum to Cocoon 3.
> It could may even by an idea to have a LinkRewriterTransformer<T>, where T is
> the class performing the actual transformation on links.
> [1]
> http://cocoon.apache.org/2.1/apidocs/org/apache/cocoon/transformation/LinkRewriterTransformer.html
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.