Altova XMLSpy 2024 Professional Edition

You can change the output by modifying the XSL document. For example, let's change the background-color of the table in the HTML output from #ccccff to #99cc99. Do this as follows:

 

1.Click the CompanyLast.xml tab to make this document the active document.

2.Select the menu option XSL/XQuery | Go to XSL. The command opens the Company.xslt file that is referenced in the XML document.

3.Find the start tag of the table element and then the element's bgcolor attribute (shown highlighted in the screenshot below). Change the attribute's value from #ccccff to #99cc99.

TutXSLTModifyBG

4.Select the menu option File | Save to save the change.

5.Click the CompanyLast.xml tab to make the XML file active.

6.Run the menu command XSL/XQuery | XSL Transformation; alternatively, press F10. A new XSL Output.html file appears in Browser View, with a table that has the new background color (see screenshot below).

TutXSLTOutputNewBG

7.Select the menu option File | Save, and save the output document as Company.html.

 

 

© 2017-2023 Altova GmbH