1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374 |
- <?xml version="1.0" encoding="UTF-8"?>
- <!--
- Licensed Materials - Property of IBM
- IBM Cognos Products: ps
- (C) Copyright IBM Corp. 2005, 2011
- US Government Users Restricted Rights - Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
- -->
- <!--
- Copyright (C) 2008 Cognos ULC, an IBM Company. All rights reserved.
- Cognos (R) is a trademark of Cognos ULC, (formerly Cognos Incorporated).
- -->
- <xsl:stylesheet version="1.0"
- xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
- xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
- xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
- xmlns:xsd="http://www.w3.org/2001/XMLSchema"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xmlns:bus="http://developer.cognos.com/schemas/bibus/3/"
- xmlns:cm="http://developer.cognos.com/schemas/xts-cm/1/"
- exclude-result-prefixes="xsd xsi bus cm">
- <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="no"/>
- <!-- global variables -->
- <xsl:variable name="xtscm" select="'http://developer.cognos.com/schemas/xts-cm/1/'"/>
- <xsl:variable name="xsd-prefix" select="'xsd'"/>
- <!-- main entry point -->
- <xsl:template match="/">
- <xsl:apply-templates/>
- </xsl:template>
-
- <xsl:template match="cm:queryResponse" priority="1">
- <xsl:element name="queryResponse" namespace="{$xtscm}">
- <xsl:copy-of select="./cm:queryReply[1]"/>
- <xsl:copy-of select="./cm:queryReply[2]"/>
- <xsl:element name="queryReply" namespace="{$xtscm}">
- <xsl:apply-templates select="./cm:queryReply[3]/*"/>
- </xsl:element>
- <xsl:element name="queryReply" namespace="{$xtscm}">
- <xsl:apply-templates select="./cm:queryReply[4]/*" mode="type"/>
- </xsl:element>
- </xsl:element>
- </xsl:template>
-
- <xsl:template match="cm:schedule">
- <xsl:element name="reportDataServiceAgentDefinition" namespace="{$xtscm}">
- <xsl:element name="objectClass" namespace="{$xtscm}">reportDataServiceAgentDefinition</xsl:element>
- <xsl:copy-of select="./cm:parent/cm:reportDataServiceAgentDefinition/cm:searchPath"/>
- <xsl:copy-of select="./cm:parent/cm:reportDataServiceAgentDefinition/cm:defaultName"/>
- <xsl:copy-of select="./cm:parent/cm:reportDataServiceAgentDefinition/cm:permissions"/>
- <xsl:copy-of select="./cm:parent/cm:reportDataServiceAgentDefinition/cm:storeID"/>
- <xsl:copy-of select="./cm:parent/cm:reportDataServiceAgentDefinition/cm:defaultScreenTip"/>
- <xsl:copy-of select="./cm:periodicalProducer"/>
- <xsl:copy-of select="./cm:position"/>
- <xsl:copy-of select="./cm:active"/>
- <xsl:copy-of select="./cm:parent/cm:reportDataServiceAgentDefinition/cm:hidden"/>
- </xsl:element>
- </xsl:template>
-
- <xsl:template match="cm:subscriptionFolder">
- <xsl:copy-of select="."/>
- </xsl:template>
-
- <xsl:template match="cm:schedule" mode="type"/>
-
- <xsl:template match="*" mode="type">
- <xsl:if test="string(.//cm:objectClass) != 'agentTaskDefinition'">
- <xsl:copy-of select=".//cm:objectClass"/>
- </xsl:if>
- </xsl:template>
-
- </xsl:stylesheet>
|