Changeset 24886

Show
Ignore:
Timestamp:
13.12.2011 09:58:10 (8 years ago)
Author:
sjm84
Message:

A slight code clean-up

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • main/trunk/greenstone3/src/java/org/greenstone/gsdl3/util/GSXSLT.java

    r24864 r24886  
    3939    public static void mergeStylesheets(Document main_xsl, Element extra_xsl) 
    4040    { 
    41  
    4241        Element main = main_xsl.getDocumentElement(); 
    43  
    4442        NodeList children = extra_xsl.getElementsByTagNameNS("http://www.w3.org/1999/XSL/Transform", "template"); 
    4543        for (int i = 0; i < children.getLength(); i++) 
    4644        { 
    47             String name = ((Element) children.item(i)).getAttribute("name"); 
     45            Node node = children.item(i); 
     46            String name = ((Element) node).getAttribute("name"); 
    4847            if (!name.equals("")) 
    4948            { 
     
    5554            } 
    5655 
    57             main.appendChild(main_xsl.importNode(children.item(i), true)); 
     56            main.appendChild(main_xsl.importNode(node, true)); 
    5857        } 
    59  
    6058    } 
    6159