Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

SOLVED

How to rewrite XML response using SAX pipeline with right configuration

Avatar

Level 2

Hi,

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.

Could you plase let me know how to achieve?

1 Accepted Solution

Avatar

Correct answer by
Level 10

Just giving extension not sufficient. You need to specify transformer & serlizer for xml. For an example of oob for html & pdf refer /libs/cq/config/rewriter/*

Some additional questions answered at http://www.wemblog.com/2011/08/how-to-remove-html-extension-from-url.html

View solution in original post

6 Replies

Avatar

Level 2

I am little confused with the configuration as i have configured factory as global(currently  i do not have any configuration in place for html response rewrite), should i specify the generator and serializer since those are mandatory in the configuration or just can i give extesion and content is that suffice.

Could you please clarify on the configuration(configuration).

Avatar

Correct answer by
Level 10

Just giving extension not sufficient. You need to specify transformer & serlizer for xml. For an example of oob for html & pdf refer /libs/cq/config/rewriter/*

Some additional questions answered at http://www.wemblog.com/2011/08/how-to-remove-html-extension-from-url.html

Avatar

Level 2
    But what should be the right values for generatortype and serializer type for xml response What should be given for contenttype(app/xml ?)

Avatar

Employee

There aren't any generators or serializers ootb which handle plain XML. I'm in the process of adding a generator to ACS AEM Commons: https://github.com/Adobe-Consulting-Services/acs-aem-commons/pull/48, but it sounds like there would also be a use for a serializer.

Avatar

Level 2
        For now how to achieve the xml rewrite? Are there any examples?