checkExistingParameters.xslt 1.1 KB

1234567891011121314151617181920212223242526
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <!--
  3. Licensed Materials - Property of IBM
  4. IBM Cognos Products: AGS
  5. (C) Copyright IBM Corp. 2005, 2008
  6. US Government Users Restricted Rights - Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
  7. -->
  8. <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xts="http://developer.cognos.com/schemas/xts/" exclude-result-prefixes="xts xsl">
  9. <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="no"/>
  10. <xsl:template match="/">
  11. <xts:sequence>
  12. <xsl:if test="not(/root/agent_item/parameterData/parameterValues/*) and not(/root/agent_item/parameterData/parameterAssignments/*)">
  13. <xts:delete select="/root/agent_item/parameterData"/>
  14. <xts:append select="/root/agent_item">
  15. <parameterData>
  16. <parameterValues/>
  17. <parameterAssignments/>
  18. </parameterData>
  19. </xts:append>
  20. </xsl:if>
  21. </xts:sequence>
  22. </xsl:template>
  23. </xsl:stylesheet>