123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105 |
- <?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).
- -->
- <!-- $Header: //ps/main/prod/templates/ps/portal/cs.xts#3 $ -->
- <!-- $DateTime: 2010/04/01 10:04:17 $ -->
- <!-- $Change: 29055 $ -->
- <xts:morphlet version="1.0" xmlns:xts="http://developer.cognos.com/schemas/xts/">
- <xts:block id="request" type="exec" mode="interpret" processor="XSLT">
- <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xts="http://developer.cognos.com/schemas/xts/" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xtsext="xalan://com.cognos.xts.ext.XTSExt">
- <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="no"/>
- <xsl:template match="/">
- <xsl:variable name="terms" select="/root/env/param[@name='terms']"/>
- <xsl:variable name="node" select="/root/env/param[@name='node']"/>
- <xts:sequence>
- <xts:append>
- <xts:request protocol="BUS" target="bus://dispatcher" soapAction="http://developer.cognos.com/schemas/indexSearchService/1">
- <SOAP-ENV:Envelope 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/">
- <SOAP-ENV:Header>
- <xsl:copy-of select="/root/header/*"/>
- </SOAP-ENV:Header>
- <SOAP-ENV:Body>
- <ns:search xmlns:ns="http://developer.cognos.com/schemas/indexSearchService/1/" xmlns:bibus="http://developer.cognos.com/schemas/bibus/3/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 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">
- <cs:document xmlns:cs="http://developer.cognos.com/schemas/cs/">
- <cs:request>
- <cs:searchQuery>
- <cs:terms>
- <xsl:value-of select="$terms"/>
- </cs:terms>
- <cs:requestParameters>
- <cs:searchType>tree</cs:searchType>
- <cs:includeSearchQuery>true</cs:includeSearchQuery>
- <cs:includeSearchConversation>true</cs:includeSearchConversation>
- <cs:includeSecurityContext>false</cs:includeSecurityContext>
- <cs:treeQuery levels="1" expand="*">
- <xsl:if test="$node and $node!=''">
- <cs:subTree path="{$node}"/>
- </xsl:if>
- </cs:treeQuery>
- </cs:requestParameters>
- </cs:searchQuery>
- <cs:sourceContext/>
- </cs:request>
- </cs:document>
- </ns:search>
- </SOAP-ENV:Body>
- </SOAP-ENV:Envelope>
- </xts:request>
- </xts:append>
- </xts:sequence>
- </xsl:template>
- </xsl:stylesheet>
- </xts:block>
- <xts:block dependency="request" id="xmlresult" type="exec" mode="interpret" processor="XSLT">
- <xsl:stylesheet version="1.0" xmlns:cs="http://developer.cognos.com/schemas/cs" xmlns:ns="http://developer.cognos.com/schemas/indexSearchService/1/" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xts="http://developer.cognos.com/schemas/xts/" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
- <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="no"/>
- <xsl:variable name="node" select="/root/env/param[@name='node']"/>
- <xsl:template match="/">
- <xts:sequence>
- <xts:append select="/root/output">
- <xos:part xmlns:xos="http://developer.cognos.com/schemas/xts/output/">
- <xos:entityHeader>
- <xos:param name="Content-Type">text/xml</xos:param>
- <xos:param name="Cache-Control">max-age=3600</xos:param>
- </xos:entityHeader>
- <xos:entityBody>
- <xsl:choose>
- <xsl:when test="$node and $node!=''">
- <SubjectTree>
- <xsl:copy-of select="/root/ns:searchResponse/result/cs:document/cs:result/cs:extensions/cs:subjectTree/QueryDescription/SubjectTree/Subject/Subject"/>
- </SubjectTree>
- </xsl:when>
- <xsl:otherwise>
- <xsl:copy-of select="/root/ns:searchResponse/result/cs:document/cs:result/cs:extensions/cs:subjectTree/QueryDescription/SubjectTree"/>
- </xsl:otherwise>
- </xsl:choose>
- </xos:entityBody>
- </xos:part>
- </xts:append>
- </xts:sequence>
- </xsl:template>
- </xsl:stylesheet>
- </xts:block>
- <xts:block id="fault_request" type="fault" processor="XSLT">
- <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xts="http://developer.cognos.com/schemas/xts/" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
- <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="no"/>
- <xsl:template match="/">
- <error>
- <xsl:copy-of select="/root/fault"/>
- </error>
- </xsl:template>
- </xsl:stylesheet>
- </xts:block>
- </xts:morphlet>
|