Can Adobe Experience Manager be used to make xsl files that convert xml into html?
If yes, please explain how to do it.

- 8,084
- 8
- 48
- 62

- 3
- 1
- 3
1 Answers
The short answer is yes Adobe Experience Manager (AEM) can be used to generate XSL and then use it to convert XML into HTML. Depending on what you are trying to accomplish, that may not be the best way to go about it.
From the question it's not clear but it sounds like you want to make an XSL with AEM. Typically a developer would create the XSL one time and then apply it to the XML to get your HTML. You can provide pretty elaborate XSL which should work for all cases. If did want to generate an XSL you would need to write custom code to accomplish this. The best way is to probably create a workflow task to create the XSL file in your AEM repository for later use.
The next step is to decide when you want to generate your HTML. Is it at request time which can be expensive or when you do a create or update on the XML? If it's when the request is made you would need to create a servlet using an XSLT library. Here's more information on how to do that from another thread XSLT processing with Java?. If you want to generate the HTML rendition whenever the XML is created or updated you'll need to create a workflow task and register it to launch each time a create or update happens on that file type. You'll also need to create a servlet to render the html you've generated.
You've asked a complex question without giving much information so I'm not sure either solution is the best scenario for goal. It might be easier to convert your xml into an AEM package and create nodes in the repository. Then you can render the HTML using Sightly
-
Well actually I needed to generate xsl templates for an email sending engine that receives email requests in xml and develops an html email using the xsl templates. What I need AEM to do is help people with no coding knowledge whatsoever, develop email templates that they can then trigger be sending xmls into the system. – Pranav Prem Apr 20 '16 at 09:54
-
Honestly it's the same way to prepare such XSL file as HTML. Use just different renderer with specific extension. – Dawid Pura Apr 15 '18 at 12:50