Modifying the XSL File

www.altova.com Print this Topic Previous Page Up One Level Next page

Home >  XMLSpy Tutorial > XSLT Transformations >

Modifying the XSL File

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 lime to yellow.

 

Do the following:

 

1.Click the CompanyLast.xml tab to make it the active document, and make sure you are in Grid View.
2.Select the menu option XSL/XQuery | Go to XSL.The command opens the Company.xsl file referenced in the XML document.

tut_59a

3.Find the line <table border="1" bgcolor="lime">, and change the entry bgcolor="lime" to bgcolor="yellow".
4.Select the menu option File | Save to save the changes made to the XSL file.
5.Click the CompanyLast.xml tab to make the XML file active, and select XSL/XQuery | XSL Transformation, or press F10. A new XSL Output.html file appears in the XMLSpy GUI in Browser View. The background color of the table is yellow.

tut_59b

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

 


© 2019 Altova GmbH