123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114 |
- <?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).
- -->
- <xts:morphlet xmlns:xts="http://developer.cognos.com/schemas/xts/" xmlns:cml="http://developer.cognos.com/schemas/xts/logic-sheet/xslt/cml/1/" xmlns:cm="http://developer.cognos.com/schemas/xts-cm/1/" xmlns:create="http://developer.cognos.com/schemas/xts/portal/iFrmCmd/1/" xmlns:cms="http://developer.cognos.com/schemas/xts/logic-sheet/xslt/cms/1/" requiredCapability="canUseAdministrationPortal">
- <xts:block id="doCopy" processor="XSLT" type="exec">
- <xts:logicsheet path="portal/iFrmCmd/logicsheets/cm-save.xsl"/>
- <xts:logicsheet path="logicsheets/buslogic.xslt"/>
- <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
- xmlns:xts="http://developer.cognos.com/schemas/xts/"
- xmlns:send="http://developer.cognos.com/schemas/xts/logic-sheet/xslt/brl/1/"
- xmlns:cm="http://developer.cognos.com/schemas/xts-cm/1/"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xmlns:xsd="http://www.w3.org/2001/XMLSchema"
- xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
- xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
- xmlns:form="http://developer.cognos.com/schemas/xts/portal/iFrmCmd/1/"
- xmlns:bus="http://developer.cognos.com/schemas/bibus/3/"
- xmlns:xtsext="xalan://com.cognos.xts.ext.XTSExt"
- exclude-result-prefixes="xtsext">
- <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="no"/>
- <xsl:template match="/">
- <xsl:apply-templates select="root/command/form:copyAccount"/>
- </xsl:template>
- <xsl:template match="form:env">
- <xts:sequence>
-
- <xts:append>
- <send:request provider="cm">
- <cm2:copyAccount xmlns:cm2="http://developer.cognos.com/schemas/contentManagerService/1">
- <sourceAccountPath xsi:type="bus:searchPathSingleObject">
- <xsl:value-of select="form:param[@name = 'm_obj']"/>
- </sourceAccountPath>
- <targetAccountPath xsi:type="bus:searchPathSingleObject">
- <xsl:value-of select="form:param[@name = 'target_account']"/>
- </targetAccountPath>
- <options xsi:type="bus:optionArray" SOAP-ENC:arrayType="bus:option[3]">
- <item xsi:type="bus:copyAccountOptionBoolean">
- <name xsi:type="bus:copyAccountOptionEnum">folders</name>
- <value xsi:type="xsd:boolean">
- <xsl:choose>
- <xsl:when test="form:param[@name = 'migrate_myfolder'] = 'true'">true</xsl:when>
- <xsl:otherwise>false</xsl:otherwise>
- </xsl:choose>
- </value>
- </item>
- <item xsi:type="bus:copyAccountOptionBoolean">
- <name xsi:type="bus:copyAccountOptionEnum">pages</name>
- <value xsi:type="xsd:boolean">
- <xsl:choose>
- <xsl:when test="form:param[@name = 'migrate_mypages'] = 'true'">true</xsl:when>
- <xsl:otherwise>false</xsl:otherwise>
- </xsl:choose>
- </value>
- </item>
- <item xsi:type="bus:copyAccountOptionBoolean">
- <name xsi:type="bus:copyAccountOptionEnum">preferences</name>
- <value xsi:type="xsd:boolean">
- <xsl:choose>
- <xsl:when test="form:param[@name = 'migrate_preferences'] = 'true'">true</xsl:when>
- <xsl:otherwise>false</xsl:otherwise>
- </xsl:choose>
- </value>
- </item>
- </options>
- </cm2:copyAccount>
- </send:request>
-
- <!-- do we delete the source account -->
- <xsl:if test="form:param[@name = 'delete_source_account'] = 'true'">
- <send:request provider="cm">
- <cm2:deleteAccount xmlns:cm2="http://developer.cognos.com/schemas/contentManagerService/1">
- <objectPath xsi:type="bus:searchPathSingleObject">
- <xsl:value-of select="form:param[@name = 'm_obj']"/>
- </objectPath>
- </cm2:deleteAccount>
- </send:request>
- </xsl:if>
- </xts:append>
- </xts:sequence>
- </xsl:template>
- </xsl:stylesheet>
- </xts:block>
-
- <xts:block id="result" processor="XSLT" type="exec" mode="output" mimeType="text/xml" dependency="doCopy">
- <xts:logicsheet path="logicsheets/cm-logic.xsl"/>
- <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xts="http://developer.cognos.com/schemas/xts/" xmlns:cml="http://developer.cognos.com/schemas/xts/logic-sheet/xslt/cml/1/" xmlns:cm="http://developer.cognos.com/schemas/xts-cm/1/" xmlns:bus="http://developer.cognos.com/schemas/bibus/3/" version="1.0">
- <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="no"/>
- <xsl:template match="/root">
- <xsl:choose>
- <xsl:when test="bus:response"><xsl:copy-of select="bus:response/child::*"/></xsl:when>
- <xsl:otherwise><error/></xsl:otherwise>
- </xsl:choose>
- </xsl:template>
- <xsl:template match="text()"/>
- </xsl:stylesheet>
- </xts:block>
- </xts:morphlet>
|