The larger an application, the more difficult it is to keep track of configuration information. Since all configurations are in XML files, they can be easily managed through small XSLT scripts.
This subject will just be introduced here. For further details, refer to XSLT Programmer’s Reference by Michael Kay (2nd edition, 2001, Wrox Press, ISBN 1-861005-06-7).
Listing 13.13 shows an XSLT script which parses
struts-config.xml and outputs the forwards with names and paths.
<?xml version="1.0" encoding="ISO-8859-1"?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:output method="html" /> <xsl:variable name="server" select="’http://127.0.0.1:8080/shop8’"/> ...