delete_links_attachments.xslt 1.0 KB

12345678910111213141516171819202122232425262728293031
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <!--
  3. Licensed Materials - Property of IBM
  4. IBM Cognos Products: ASV
  5. (C) Copyright IBM Corp. 2005, 2010
  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"
  9. xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
  10. xmlns:xts="http://developer.cognos.com/schemas/xts/"
  11. xmlns:xtsext="xalan://com.cognos.xts.ext.XTSExt"
  12. exclude-result-prefixes="xsl xts xtsext">
  13. <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="no"/>
  14. <xsl:template match="/root">
  15. <xsl:for-each select="/root/*[local-name()='item']">
  16. <xsl:variable name="position" select="position()"/>
  17. <!-- no changes were made to this item, so simply copy it -->
  18. <xsl:if test="not(/root/*[local-name()='deleted']/*[local-name()='param' and contains(concat(' ',@name,' '),concat('_',$position, ' '))])">
  19. <xsl:copy-of select="."/>
  20. </xsl:if>
  21. </xsl:for-each>
  22. </xsl:template>
  23. <xsl:template match="text()" priority="0"/>
  24. </xsl:stylesheet>