selected_languages.xslt 1.3 KB

1234567891011121314151617181920212223242526272829303132333435
  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"
  13. xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
  14. xmlns:cm="http://developer.cognos.com/schemas/xts-cm/1/"
  15. xmlns:xtsext="xalan://com.cognos.xts.ext.XTSExt"
  16. xmlns:xts="http://developer.cognos.com/schemas/xts/">
  17. <xsl:output method="xml" encoding="UTF-8" version="1.0" indent="no"/>
  18. <xsl:template match="/root">
  19. <xts:sequence>
  20. <xts:append>
  21. <SelectedLanguages>
  22. <xsl:for-each select="/root/env/param[starts-with(@name, 'm_mp_title_')]">
  23. <lang><xsl:value-of select="substring-after(@name, 'm_mp_title_')"/></lang>
  24. </xsl:for-each>
  25. <xsl:if test="/root/env/param[starts-with(@name, 'm_mp_mlt_title_')]">
  26. <lang><xsl:value-of select="substring-after(/root/env/param[starts-with(@name,'m_mp_mlt_title_')]/@name, 'm_mp_mlt_title_')"/></lang>
  27. </xsl:if>
  28. </SelectedLanguages>
  29. </xts:append>
  30. </xts:sequence>
  31. </xsl:template>
  32. </xsl:stylesheet>