123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175 |
- <?xml version="1.0" encoding="UTF-8"?>
- <!--
- Licensed Materials - Property of IBM
- IBM Cognos Products: ASV
- (C) Copyright IBM Corp. 2005, 2010
- US Government Users Restricted Rights - Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
- -->
- <xsl:stylesheet version="1.0"
- xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
- xmlns:send="http://developer.cognos.com/schemas/xts/logic-sheet/xslt/brl/1/"
- xmlns:xtsext="xalan://com.cognos.xts.ext.XTSExt"
- xmlns:xts="http://developer.cognos.com/schemas/xts/"
- xmlns:pf="http://developer.cognos.com/schemas/xts/pf"
- exclude-result-prefixes="xtsext xts pf">
- <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="no"/>
- <pf:variables/>
- <xsl:template match="/">
- <xts:sequence>
- <xts:append>
- <xts:transform src="transforms/CM/post-process.xslt" processor="XSLT">
- <send:request provider="cm">
- <xts:transform src="transforms/CM/pre-process.xslt" processor="XSLT">
- <cm:query xmlns:cm="http://developer.cognos.com/schemas/xts-cm/1/">
- <cm:requests>
- <!-- get the subscription agent -->
- <cm:query xmlns:cm="http://developer.cognos.com/schemas/xts-cm/1/">
- <cm:search>
- <xsl:value-of select="/root/env/param[@name='m_obj']"/>
- </cm:search>
- <cm:properties>
- <cm:property name="defaultName"/>
- <cm:property name="defaultDescription"/>
- <cm:property name="defaultScreenTip"/>
- <cm:property name="report"/>
- <cm:property name="permissions"/>
- <cm:property name="storeID"/>
- <cm:property name="ancestors"/>
- </cm:properties>
- </cm:query>
- <!-- get the schedule - holds information about the periodical producer -->
- <cm:query xmlns:cm="http://developer.cognos.com/schemas/xts-cm/1/">
- <cm:search>
- <xsl:value-of select="concat(/root/env/param[@name='m_obj'], '/schedule')"/>
- </cm:search>
- <cm:properties>
- <cm:property name="defaultName"/>
- <cm:property name="defaultDescription"/>
- <cm:property name="defaultScreenTip"/>
- <cm:property name="permissions"/>
- <cm:property name="storeID"/>
- <cm:property name="periodicalProducer"/>
- <cm:property name="active"/>
- </cm:properties>
- <cm:options>
- <cm:refProps>
- <cm:refProp refPropName="periodicalProducer">
- <cm:properties>
- <cm:property name="ancestors"/>
- <cm:property name="defaultName"/>
- <cm:property name="searchPath"/>
- </cm:properties>
- </cm:refProp>
- </cm:refProps>
- </cm:options>
- </cm:query>
- <!-- get all the task definitions - and the objects which they point to -->
- <cm:query xmlns:cm="http://developer.cognos.com/schemas/xts-cm/1/">
- <cm:search>
- <xsl:value-of select="concat(/root/env/param[@name='m_obj'], '/agentTaskDefinition')"/>
- </cm:search>
- <cm:properties>
- <cm:property name="searchPath"/>
- <cm:property name="defaultName"/>
- <cm:property name="defaultDescription"/>
- <cm:property name="defaultScreenTip"/>
- <cm:property name="permissions"/>
- <cm:property name="storeID"/>
- <cm:property name="taskObject"/>
- <cm:property name="filterDataItemName"/>
- </cm:properties>
- <cm:options>
- <cm:refProps>
- <cm:refProp refPropName="taskObject">
- <cm:properties>
- <!-- want the combination of properties for newsitem and memo -->
- <cm:property name="searchPath"/>
- <cm:property name="defaultName"/>
- <cm:property name="defaultDescription"/>
- <cm:property name="defaultScreenTip"/>
- <cm:property name="options"/>
- <cm:property name="permissions"/>
- <cm:property name="storeID"/>
- <cm:property name="title"/>
- <cm:property name="channel"/>
- <cm:property name="parameters"/>
- </cm:properties>
- </cm:refProp>
- </cm:refProps>
- </cm:options>
- </cm:query>
- <!-- have to get information about the account -->
- <cm:query xmlns:cm="http://developer.cognos.com/schemas/xts-cm/1/">
- <cm:search>
- <xsl:value-of select="'~'"/>
- </cm:search>
- <cm:properties>
- <cm:property name="email"/>
- <cm:property name="notificationEMail"/>
- </cm:properties>
- </cm:query>
- </cm:requests>
- </cm:query>
- </xts:transform>
- </send:request>
- </xts:transform>
- </xts:append>
- <!-- need to fire another request - get the information on the parent of the periodical producer -->
- <xts:append>
- <periodicalProducerParent>
- <xts:transform src="transforms/CM/post-process.xslt" processor="XSLT">
- <send:request provider="cm">
- <xts:transform src="transforms/CM/pre-process.xslt" processor="XSLT">
- <cm:query xmlns:cm="http://developer.cognos.com/schemas/xts-cm/1/">
- <cm:search>
- <xts:function name="xmlencode">
- <xts:param name="source">
- <xts:queryValue select="/root/*[local-name()='queryResponse']/*[local-name()='queryReply']/*[local-name()='schedule']/*[local-name()='periodicalProducer']/*/*[local-name()='ancestors']/*[local-name()='ancestorInfo'][last()]/*[local-name()='searchPath']"/>
- </xts:param>
- </xts:function>
- </cm:search>
- <cm:properties>
- <cm:property name="searchPath"/>
- <cm:property name="permissions"/>
- </cm:properties>
- </cm:query>
- </xts:transform>
- </send:request>
- </xts:transform>
- </periodicalProducerParent>
- </xts:append>
- <!-- now can start building stuff -->
- <xts:append select="/root/env">
- <!-- need to get the selectionSpec -->
- <xts:transform src="subscribe/transforms/disassembleSelectionSpec.xslt" processor="XSLT">
- <xts:param name="logicsheet">logicsheets/portal.xsl</xts:param>
- <xts:queryValue select="/root/*[local-name()='queryResponse']/*[local-name()='queryReply']/*[local-name()='reportDataServiceAgentDefinition']/*[local-name()='report']"/>
- </xts:transform>
- <!-- need to the values for the delivery - delivery options themselves though is done separately -->
- <xts:transform src="subscribe/transforms/disassembleAgentTasks.xslt" processor="XSLT">
- <root>
- <xts:queryNode select="/root/*[local-name()='queryResponse']/*[local-name()='queryReply']/*[local-name()='agentTaskDefinition']"/>
- </root>
- </xts:transform>
- <!-- build variables from the schedule -->
- <xts:transform src="subscribe/transforms/disassembleAgentSchedule.xslt" processor="XSLT">
- <xts:param name="logicsheet">logicsheets/portal.xsl</xts:param>
- <xts:param name="logicsheet">logicsheets/presentation/controls/framework.xsl</xts:param>
- <xts:param name="logicsheet">logicsheets/presentation/controls/presentation.xsl</xts:param>
- <root>
- <xts:queryNode select="/root/*[local-name()='queryResponse']/*[local-name()='queryReply']/*[local-name()='schedule']"/>
- <periodicalProducerParent>
- <xts:queryNode select="/root/*[local-name()='periodicalProducerParent']/*[local-name()='queryResponse']/*"/>
- </periodicalProducerParent>
- </root>
- </xts:transform>
- </xts:append>
- </xts:sequence>
- </xsl:template>
- </xsl:stylesheet>
|