package org.greenstone.gsdl3.util; import org.w3c.dom.Node; import org.w3c.dom.Element; import org.w3c.dom.NodeList; import org.w3c.dom.Document; import org.w3c.dom.Text; import java.util.HashMap; import java.util.Vector; import java.util.ArrayList; /** various functions for manipulating Greenstone xslt */ public class GSXSLT { /** takes a stylesheet Document, and adds in any child nodes from extra_xsl * named templates overwrite any existing one, while match templates are just added to the end of teh stylesheet */ public static void mergeStylesheets(Document main_xsl, Element extra_xsl) { Element main = main_xsl.getDocumentElement(); NodeList children = extra_xsl.getElementsByTagNameNS("http://www.w3.org/1999/XSL/Transform", "template"); for (int i=0; i * inside this template it looks for any