uiobjects_roots.xslt 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  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:xtsext="xalan://com.cognos.xts.ext.XTSExt"
  15. xmlns:xts="http://developer.cognos.com/schemas/xts/"
  16. xmlns:nox="http://developer.cognos.com/schemas/navomx/1/"
  17. exclude-result-prefixes="xtsext xts xsl">
  18. <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="no"/>
  19. <xsl:template match="/">
  20. <xsl:element name="xts:block">
  21. <xsl:copy-of select="xts:block/@*"/>
  22. <xsl:element name="CMRootMap">
  23. <xsl:for-each select="xts:block/nox:uiMetadata/nox:classes/nox:class">
  24. <xsl:if test="nox:root">
  25. <xsl:element name="class">
  26. <xsl:attribute name="name"><xsl:value-of select="nox:name"/></xsl:attribute>
  27. <xsl:if test="nox:root/nox:fixedRoot">
  28. <xsl:choose>
  29. <xsl:when test="nox:root/nox:fixedRoot='true'">
  30. <xsl:attribute name="fixedRoot">T</xsl:attribute>
  31. </xsl:when>
  32. <xsl:otherwise>
  33. <xsl:attribute name="fixedRoot">F</xsl:attribute>
  34. </xsl:otherwise>
  35. </xsl:choose>
  36. </xsl:if>
  37. <xsl:attribute name="root"><xsl:value-of select="nox:root/nox:path"/></xsl:attribute>
  38. </xsl:element>
  39. </xsl:if>
  40. </xsl:for-each>
  41. </xsl:element>
  42. </xsl:element>
  43. </xsl:template>
  44. </xsl:stylesheet>