ref2target.xml 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <!--
  3. Licensed Materials - Property of IBM
  4. IBM Cognos Products: ps
  5. (C) Copyright IBM Corp. 2005, 2011
  6. US Government Users Restricted Rights - Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
  7. -->
  8. <!--
  9. Copyright (C) 2008 Cognos ULC, an IBM Company. All rights reserved.
  10. Cognos (R) is a trademark of Cognos ULC, (formerly Cognos Incorporated).
  11. -->
  12. <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xts="http://developer.cognos.com/schemas/xts/">
  13. <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="no"/>
  14. <xsl:template match="/">
  15. <xts:sequence>
  16. <xsl:if test="/root/env/param[@name='sc_target_name']">
  17. <xts:replace select="/root/env/param[@name='m_name']">
  18. <param name="m_name"><xsl:value-of select="/root/env/param[@name='sc_target_name']"/></param>
  19. </xts:replace>
  20. <xts:delete select="/root/env/param[@name='sc_target_name']"/>
  21. </xsl:if>
  22. <xsl:if test="/root/env/param[@name='sc_target_class']">
  23. <xts:replace select="/root/env/param[@name='m_class']">
  24. <param name="m_class"><xsl:value-of select="/root/env/param[@name='sc_target_class']"/></param>
  25. </xts:replace>
  26. <xts:delete select="/root/env/param[@name='sc_target_class']"/>
  27. </xsl:if>
  28. <xsl:if test="/root/env/param[@name='sc_target_obj']">
  29. <xts:replace select="/root/env/param[@name='m_obj']">
  30. <param name="m_obj"><xsl:value-of select="/root/env/param[@name='sc_target_obj']"/></param>
  31. </xts:replace>
  32. <xts:delete select="/root/env/param[@name='sc_target_obj']"/>
  33. </xsl:if>
  34. </xts:sequence>
  35. </xsl:template>
  36. </xsl:stylesheet>