How to Rewrite Plain text output not <HTML attribute> | Community
Skip to main content
Chandra_gupta
New Participant
October 16, 2015
Solved

How to Rewrite Plain text output not <HTML attribute>

  • October 16, 2015
  • 11 replies
  • 4575 views

com.day.cq.rewriter.pipeline.RequestRewriter or org.apache.sling.rewriter.Transformer helps to rewrite any html tag's attribute value that i am able to do it.

But I am trying to do rewrite plain text like {string.token) with any value.

for example :

Here is content in CRX when it would be rendered , {string.token} should be replaced with some dynamic value..... if i place that token as attribute in <p> i can do easily but i want that as plain text not as attribute of html tag. any thought?

<p> Hello world {string.token) , I am good<p>

Thanks Chandra

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by JustinEd3

Chandra-

I don't understand your reference to i18n in the second post.

But regarding the overall question, this is possible with a Transformer pipeline component. In SAX, characters are passed to the characters() method.

11 replies

New Participant
October 16, 2015

How to rewrite XML response with correct configuration?

i have custom transformer( that is global one name="pipeline.mode" value="global") which has the logic to rewrite public urls from html and xml respose but it is working for html now i want to extend this for xml as well how to do that?
I need right configuration.

I am overriding characters(), but i have to do configuration to trigger the handler then how?