Changeset 26472 for main/trunk


Ignore:
Timestamp:
2012-11-19T23:21:46+13:00 (11 years ago)
Author:
davidb
Message:

For a group-by search results example, started to make use of xsl:key, however this was not looked for the the Greenstone mergeStylesheet pipeline, so extra block of code added for this.

File:
1 edited

Legend:

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

    r26458 r26472  
    153153        }
    154154
     155        // key -- xsl:key elements need to be defined at the top level
     156        children = GSXML.getChildrenByTagNameNS(extra_xsl, GSXML.XSL_NAMESPACE, "key");
     157        for (int i = 0; i < children.getLength(); i++)
     158        {
     159            Element node = (Element) children.item(i);
     160            // If the new xsl:key element is identical (in terms of name attr value)
     161            // to any in the merged document, don't copy it over
     162            if (GSXML.getNamedElementNS(main, GSXML.XSL_NAMESPACE, "key", "name", node.getAttribute("name")) == null)
     163            {
     164                main.appendChild(main_xsl.importNode(node, true));
     165            }
     166        }
     167
    155168        // templates
    156169        // append to end of document
Note: See TracChangeset for help on using the changeset viewer.