text: /*
   * Nitobi Complete UI 1.0
   * Copyright(c) 2008, Nitobi
   * support@nitobi.com
   * 
   * http://www.nitobi.com/license
   */
  var mergeUpdateAttributesXslxslt='<?xml version="1.0" encoding="UTF-8"?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="yes"/> <x:t-x:n-xmlUpdate"> <update></update> </x:t-> <x:t- match="@*|node()"> <xsl:copy> <x:at-x:s-@*|node()"/> </xsl:copy> </x:t-> <x:t- match="//update//@*"> <xsl:copy> <x:at-x:s-node()|@*"/> </xsl:copy> </x:t-> <!-- update the number of rows does not account for inserts! --> <x:t- match="//metadata/@numrows"> <xsl:attributex:n-{name(.)}"><x:v-x:s-. - count((document(\'\')//data[@id=\'_default\']/e[@xac=\'d\']))" /></xsl:attribute> </x:t-> <!-- merge the updated attributes for each row --> <x:t- match="@*"> <x:va-x:n-currentXI"x:s-../@xi"/> <x:va-x:n-parentID"x:s-../../@id"/> <x:va-x:n-parentXI"x:s-../../@xi"/> <x:va-x:n-targetNode"x:s-(document(\'\')//'+'*[@id=$parentID or @xi=$parentXI]/'+'*[@xi=$currentXI and @xac=\'u\'])" /> <x:c-> <x:wh- test="($targetNode) and (name($targetNode)=name(..)) and (../@xi = $targetNode/@xi) and (name(../..) = name($targetNode/..))"> <xsl:copy> <x:at-x:s-node()|@*"/> </xsl:copy> <x:at-x:s-$targetNode/@*" /> </x:wh-> <x:o-> <xsl:copy> <x:at-x:s-node()|@*"/> </xsl:copy> </x:o-> </x:c-> </x:t-> <!-- delete rows --> <x:t- match="//root/'+'*'+'//node()"> <x:va-x:n-currentXI"x:s-@xi"/> <x:va-x:n-parentID"x:s-../@id"/> <x:va-x:n-parentXI"x:s-../@xi"/> <x:va-x:n-targetNode"x:s-(document(\'\')//'+'*[@id=$parentID or @xi=$parentXI]/'+'*[@xi=$currentXI and @xac=\'d\'])" /> <x:c-> <x:wh- test="($targetNode) and (name($targetNode/..)=name(..)) and (name() = name($targetNode))"> </x:wh-> <x:o-> <xsl:copy> <x:at-x:s-node()|@*"/> </xsl:copy> </x:o-> </x:c-> </x:t-> </xsl:stylesheet>';
  mergeUpdateAttributesXslxslt=mergeUpdateAttributesXslxslt.replace(/x:c-/g, 'xsl:choose').replace(/x\:wh\-/g, 'xsl:when').replace(/x\:o\-/g, 'xsl:otherwise').replace(/x\:n\-/g, ' name="').replace(/x\:s\-/g, ' select="').replace(/x\:va\-/g, 'xsl:variable').replace(/x\:v\-/g, 'xsl:value-of').replace(/x\:ct\-/g, 'xsl:call-template').replace(/x\:w\-/g, 'xsl:with-param').replace(/x\:p\-/g, 'xsl:param').replace(/x\:t\-/g, 'xsl:template').replace(/x\:at\-/g, 'xsl:apply-templates')