123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384 |
- <?xml version="1.0" encoding="UTF-8"?>
- <!--
- Licensed Materials - Property of IBM
- IBM Cognos Products: CCS
- (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 xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:ccs="http://developer.cognos.com/rds/1" version="1.0">
- <xsl:output method="xml" omit-xml-declaration="yes" encoding="UTF-8" version="1.0"/>
- <xsl:param name="pagenum">1</xsl:param>
- <xsl:template match="/">
- <xsl:apply-templates select="Document/DATA/PAGE"/>
- </xsl:template>
- <!-- first the metadata templates -->
- <xsl:template match="LIST">
- <xsl:for-each select="DR/DRI/*">
- <xsl:apply-templates select="."/>
- </xsl:for-each>
- <xsl:for-each select="OTR/DRI/*">
- <xsl:apply-templates select="."/>
- </xsl:for-each>
- </xsl:template>
- <xsl:template match="FORM">
- <xsl:for-each select="*">
- <xsl:apply-templates select="."/>
- </xsl:for-each>
- </xsl:template>
- <xsl:template match="PAGE">
- <ccs:morePrompts>
- <xsl:value-of select="@canFinish='false'"/>
- </ccs:morePrompts>
- <xsl:apply-templates/>
- </xsl:template>
- <!-- Prompt types -->
- <!-- select value prompt -->
- <xsl:template match="selectValue">
- <ccs:prompts>
- <ccs:id/>
- <ccs:name/>
- <ccs:type>Prompt</ccs:type>
- <ccs:content>
- <ccs:prompt>
- <ccs:name>
- <xsl:value-of select="@parameter"/>
- </ccs:name>
- <ccs:type>selectValue</ccs:type>
- <ccs:required>
- <xsl:value-of select="@required"/>
- </ccs:required>
- <ccs:multiselect>
- <xsl:value-of select="@multiSelect"/>
- </ccs:multiselect>
- <ccs:range>
- <xsl:value-of select="@range"/>
- </ccs:range>
- <ccs:showAdornments>
- <xsl:value-of select="@hideAdornments='false'"/>
- </ccs:showAdornments>
- <ccs:promptInfo>
- <ccs:selectValue>
- <ccs:autoSubmit>
- <xsl:value-of select="@autoSubmit"/>
- </ccs:autoSubmit>
- <ccs:selectUI>
- <xsl:choose>
- <xsl:when test="@selectValueUI='dropdown'">dropDownList</xsl:when>
- <xsl:when test="@selectValueUI='listBox'">listBox</xsl:when>
- <xsl:when test="@selectValueUI='radioGroup'">radioButtonGroup</xsl:when>
- <xsl:otherwise>unknown</xsl:otherwise>
- </xsl:choose>
- </ccs:selectUI>
- <xsl:for-each select="selectOptions/selectOption">
- <ccs:options>
- <ccs:useValue>
- <xsl:value-of select="@useValue"/>
- </ccs:useValue>
- <ccs:displayValue>
- <xsl:value-of select="@displayValue"/>
- </ccs:displayValue>
- </ccs:options>
- </xsl:for-each>
- </ccs:selectValue>
- </ccs:promptInfo>
- </ccs:prompt>
- </ccs:content>
- </ccs:prompts>
- </xsl:template>
- <!--textbox prompt -->
- <xsl:template match="textBox">
- <ccs:prompts>
- <ccs:id/>
- <ccs:name/>
- <ccs:type>Prompt</ccs:type>
- <ccs:content>
- <ccs:prompt>
- <ccs:name>
- <xsl:value-of select="@parameter"/>
- </ccs:name>
- <ccs:type>textBox</ccs:type>
- <ccs:required>
- <xsl:value-of select="@required"/>
- </ccs:required>
- <ccs:multiselect>
- <xsl:value-of select="@multiSelect"/>
- </ccs:multiselect>
- <ccs:range>
- <xsl:value-of select="@range"/>
- </ccs:range>
- <ccs:showAdornments>
- <xsl:value-of select="@hideAdornments='false'"/>
- </ccs:showAdornments>
- <ccs:promptInfo>
- <ccs:textBox>
- <ccs:useThousandsSep>
- <xsl:value-of select="@showThousandSeparator"/>
- </ccs:useThousandsSep>
- <ccs:numbersOnly>
- <xsl:value-of select="@numbersOnly"/>
- </ccs:numbersOnly>
- <ccs:multiLine>
- <xsl:value-of select="@multiLine"/>
- </ccs:multiLine>
- <ccs:hideText>
- <xsl:value-of select="@hideText"/>
- </ccs:hideText>
- </ccs:textBox>
- </ccs:promptInfo>
- </ccs:prompt>
- </ccs:content>
- </ccs:prompts>
- </xsl:template>
- <!-- select and search prompt -->
- <xsl:template match="selectWithSearch">
- <ccs:prompts>
- <ccs:id/>
- <ccs:name/>
- <ccs:type>Prompt</ccs:type>
- <ccs:content>
- <ccs:prompt>
- <ccs:name>
- <xsl:value-of select="@parameter"/>
- </ccs:name>
- <ccs:type>selectSearch</ccs:type>
- <ccs:required>
- <xsl:value-of select="@required"/>
- </ccs:required>
- <ccs:multiselect>
- <xsl:value-of select="@multiSelect"/>
- </ccs:multiselect>
- <ccs:range>
- <xsl:value-of select="@range"/>
- </ccs:range>
- <ccs:showAdornments>
- <xsl:value-of select="@hideAdornments='false'"/>
- </ccs:showAdornments>
- <ccs:promptInfo>
- <ccs:selectSearch>
-
- </ccs:selectSearch>
- </ccs:promptInfo>
- </ccs:prompt>
- </ccs:content>
- </ccs:prompts>
- </xsl:template>
- <!-- dateTime prompt -->
- <xsl:template match="selectDateTime">
- <ccs:prompts>
- <ccs:id/>
- <ccs:name/>
- <ccs:type>Prompt</ccs:type>
- <ccs:content>
- <ccs:prompt>
- <ccs:name>
- <xsl:value-of select="@parameter"/>
- </ccs:name>
- <ccs:type>dateTime</ccs:type>
- <ccs:required>
- <xsl:value-of select="@required"/>
- </ccs:required>
- <ccs:multiselect>
- <xsl:value-of select="@multiSelect"/>
- </ccs:multiselect>
- <ccs:range>
- <xsl:value-of select="@range"/>
- </ccs:range>
- <ccs:showAdornments>
- <xsl:value-of select="@hideAdornments='false'"/>
- </ccs:showAdornments>
- <ccs:promptInfo>
- <ccs:dateTime>
- <ccs:selectUI>
- <xsl:choose>
- <xsl:when test="@selectDateTimeUI='calendar'">calendar</xsl:when>
- <xsl:when test="@selectDateTimeUI='editBox'">editBox</xsl:when>
- <xsl:otherwise>unknown</xsl:otherwise>
- </xsl:choose>
- </ccs:selectUI>
- <ccs:calendarType>
- <xsl:choose>
- <xsl:when test="@calendar='Gregorian'">gregorian</xsl:when>
- <xsl:when test="@calendar='Imperial'">japanImperial</xsl:when>
- <xsl:otherwise>unknown</xsl:otherwise>
- </xsl:choose>
- </ccs:calendarType>
- <ccs:isStatic>
- <xsl:choose>
- <xsl:when test="@mode='static'">true</xsl:when>
- <xsl:otherwise>false</xsl:otherwise>
- </xsl:choose>
- </ccs:isStatic>
- <ccs:firstDate>
- <xsl:choose>
- <xsl:when test="@firstDate">
- <xsl:value-of select="@firstDate"/>T00:00:00 </xsl:when>
- <xsl:otherwise>0001-01-01T00:00:00</xsl:otherwise>
- </xsl:choose>
- </ccs:firstDate>
- <ccs:lastDate>
- <xsl:choose>
- <xsl:when test="@lastDate">
- <xsl:value-of select="@lastDate"/>T23:59:59</xsl:when>
- <xsl:otherwise>9999-12-31T23:59:59</xsl:otherwise>
- </xsl:choose>
- </ccs:lastDate>
- <ccs:displaySeconds>
- <xsl:value-of select="@showSeconds"/>
- </ccs:displaySeconds>
- <ccs:displayMilliseconds>
- <xsl:value-of select="@showMilliseconds"/>
- </ccs:displayMilliseconds>
- </ccs:dateTime>
- </ccs:promptInfo>
- </ccs:prompt>
- </ccs:content>
- </ccs:prompts>
- </xsl:template>
- <!-- time prompt -->
- <xsl:template match="selectTime">
- <ccs:prompts>
- <ccs:id/>
- <ccs:name/>
- <ccs:type>Prompt</ccs:type>
- <ccs:content>
- <ccs:prompt>
- <ccs:name>
- <xsl:value-of select="@parameter"/>
- </ccs:name>
- <ccs:type>time</ccs:type>
- <ccs:required>
- <xsl:value-of select="@required"/>
- </ccs:required>
- <ccs:multiselect>
- <xsl:value-of select="@multiSelect"/>
- </ccs:multiselect>
- <ccs:range>
- <xsl:value-of select="@range"/>
- </ccs:range>
- <ccs:showAdornments>
- <xsl:value-of select="@hideAdornments='false'"/>
- </ccs:showAdornments>
- <ccs:promptInfo>
- <ccs:time>
- <ccs:isStatic>
- <xsl:choose>
- <xsl:when test="@mode='static'">true</xsl:when>
- <xsl:otherwise>false</xsl:otherwise>
- </xsl:choose>
- </ccs:isStatic>
- <ccs:displaySeconds>
- <xsl:value-of select="@showSeconds"/>
- </ccs:displaySeconds>
- <ccs:displayMilliseconds>
- <xsl:value-of select="@showMilliseconds"/>
- </ccs:displayMilliseconds>
- </ccs:time>
- </ccs:promptInfo>
- </ccs:prompt>
- </ccs:content>
- </ccs:prompts>
- </xsl:template>
- <!-- date prompt -->
- <xsl:template match="selectDate">
- <ccs:prompts>
- <ccs:id/>
- <ccs:name/>
- <ccs:type>Prompt</ccs:type>
- <ccs:content>
- <ccs:prompt>
- <ccs:name>
- <xsl:value-of select="@parameter"/>
- </ccs:name>
- <ccs:type>date</ccs:type>
- <ccs:required>
- <xsl:value-of select="@required"/>
- </ccs:required>
- <ccs:multiselect>
- <xsl:value-of select="@multiSelect"/>
- </ccs:multiselect>
- <ccs:range>
- <xsl:value-of select="@range"/>
- </ccs:range>
- <ccs:showAdornments>
- <xsl:value-of select="@hideAdornments='false'"/>
- </ccs:showAdornments>
- <ccs:promptInfo>
- <ccs:date>
- <ccs:selectUI>
- <xsl:choose>
- <xsl:when test="@selectDateUI='calendar'">calendar</xsl:when>
- <xsl:when test="@selectDateUI='editBox'">editBox</xsl:when>
- <xsl:otherwise>unknown</xsl:otherwise>
- </xsl:choose>
- </ccs:selectUI>
- <ccs:calendarType>
- <xsl:choose>
- <xsl:when test="@calendar='Gregorian'">gregorian</xsl:when>
- <xsl:when test="@calendar='Imperial'">japanImperial</xsl:when>
- <xsl:otherwise>unknown</xsl:otherwise>
- </xsl:choose>
- </ccs:calendarType>
- <ccs:firstDate>
- <xsl:choose>
- <xsl:when test="@firstDate">
- <xsl:value-of select="@firstDate"/>T00:00:00</xsl:when>
- <xsl:otherwise>9999-12-31T23:59:59</xsl:otherwise>
- </xsl:choose>
- </ccs:firstDate>
- <ccs:lastDate>
- <xsl:choose>
- <xsl:when test="@lastDate">
- <xsl:value-of select="@lastDate"/>T23:59:59</xsl:when>
- <xsl:otherwise>9999-12-31T23:59:59</xsl:otherwise>
- </xsl:choose>
- </ccs:lastDate>
- </ccs:date>
- </ccs:promptInfo>
- </ccs:prompt>
- </ccs:content>
- </ccs:prompts>
- </xsl:template>
- <!-- interval prompt -->
- <xsl:template match="selectInterval">
- <ccs:prompts>
- <ccs:id/>
- <ccs:name/>
- <ccs:type>Prompt</ccs:type>
- <ccs:content>
- <ccs:prompt>
- <ccs:name>
- <xsl:value-of select="@parameter"/>
- </ccs:name>
- <ccs:type>interval</ccs:type>
- <ccs:required>
- <xsl:value-of select="@required"/>
- </ccs:required>
- <ccs:multiselect>
- <xsl:value-of select="@multiSelect"/>
- </ccs:multiselect>
- <ccs:range>
- <xsl:value-of select="@range"/>
- </ccs:range>
- <ccs:showAdornments>
- <xsl:value-of select="@hideAdornments='false'"/>
- </ccs:showAdornments>
- <ccs:promptInfo>
- <ccs:interval>
- <ccs:displaySeconds>
- <xsl:value-of select="@showSeconds"/>
- </ccs:displaySeconds>
- <ccs:displayMilliseconds>
- <xsl:value-of select="@showMilliseconds"/>
- </ccs:displayMilliseconds>
- </ccs:interval>
- </ccs:promptInfo>
- </ccs:prompt>
- </ccs:content>
- </ccs:prompts>
- </xsl:template>
- <xsl:template match="OTI"/>
- <xsl:template match="OIMG"/>
- </xsl:stylesheet>
|