123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341 |
- <?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 version="1.0" xmlns="http://developer.cognos.com/schemas/rds/types/1" xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:rdsCM="http://developer.cognos.com/schemas/rds/contentmodel/1">
- <xsl:output method="xml" omit-xml-declaration="yes" encoding="UTF-8" version="1.0"/>
- <xsl:template match="/">
- <document>
- <xsl:apply-templates select="/report/layouts/layout/reportPages/*"/>
- </document>
- </xsl:template>
- <xsl:template priority="2" match="*[contains(style/CSS/@value, 'visibility:hidden') ]"/>
- <xsl:template match="pageSet">
- <xsl:apply-templates select="./pageOverallGroup/headerPages/*"/>
- <xsl:apply-templates select="./detailPages/*"/>
- <xsl:apply-templates select="./pageOverallGroup/footerPages/*"/>
- <xsl:for-each select="./pageGroups/pageGroup">
- <xsl:apply-templates select="headerPages/*"/>
- <xsl:apply-templates select="footerPages/*"/>
- </xsl:for-each>
- </xsl:template>
- <xsl:template match="page">
- <xsl:variable name="countType">
- <xsl:value-of select="count(../page)"/>
- </xsl:variable>
- <xsl:variable name="index">
- <xsl:value-of select="1 + count(preceding-sibling::page)"/>
- </xsl:variable>
- <page>
- <xsl:if test="@name">
- <rdsCM:id>
- <xsl:value-of select="@name"/>
- </rdsCM:id>
- </xsl:if>
- <posId>
- <xsl:choose>
- <xsl:when test="$countType > 1">
- <xsl:value-of select="concat('./layouts/layout/reportPages/page[',$index,']')"/>
- </xsl:when>
- <xsl:otherwise>./layouts/layout/reportPages/page</xsl:otherwise>
- </xsl:choose>
- </posId>
- <xsl:if test="pageHeader/contents/*">
- <header>
- <xsl:apply-templates select="pageHeader/contents/*">
- <xsl:with-param name="posId">
- <xsl:choose>
- <xsl:when test="$countType > 1">
- <xsl:value-of select="concat('./layouts/layout/reportPages/page[',$index,']/pageHeader/contents')"/>
- </xsl:when>
- <xsl:otherwise>./layouts/layout/reportPages/page/pageHeader/contents</xsl:otherwise>
- </xsl:choose>
- </xsl:with-param>
- <xsl:with-param name="conditional">false</xsl:with-param>
- </xsl:apply-templates>
- </header>
- </xsl:if>
- <xsl:if test="pageBody/contents/*">
- <body>
- <xsl:apply-templates select="pageBody/contents/*">
- <xsl:with-param name="posId">
- <xsl:choose>
- <xsl:when test="$countType > 1">
- <xsl:value-of select="concat('./layouts/layout/reportPages/page[',$index,']/pageBody/contents')"/>
- </xsl:when>
- <xsl:otherwise>./layouts/layout/reportPages/page/pageBody/contents</xsl:otherwise>
- </xsl:choose>
- </xsl:with-param>
- <xsl:with-param name="conditional">false</xsl:with-param>
- </xsl:apply-templates>
- </body>
- </xsl:if>
- <xsl:if test="pageFooter/contents/*">
- <footer>
- <xsl:apply-templates select="pageFooter/contents/*">
- <xsl:with-param name="posId">
- <xsl:choose>
- <xsl:when test="$countType > 1">
- <xsl:value-of select="concat('./layouts/layout/reportPages/page[',$index,']/pageFooter/contents')"/>
- </xsl:when>
- <xsl:otherwise>./layouts/layout/reportPages/page/pageFooter/contents</xsl:otherwise>
- </xsl:choose>
- </xsl:with-param>
- <xsl:with-param name="conditional">false</xsl:with-param>
- </xsl:apply-templates>
- </footer>
- </xsl:if>
- </page>
- </xsl:template>
- <xsl:template match="table">
- <xsl:param name="posId"/>
- <xsl:param name="conditional"/>
- <xsl:variable name="countType">
- <xsl:value-of select="count(../table)"/>
- </xsl:variable>
- <xsl:variable name="index">
- <xsl:value-of select="1 + count(preceding-sibling::table)"/>
- </xsl:variable>
- <xsl:apply-templates select="tableRows/tableRow">
- <xsl:with-param name="posId">
- <xsl:choose>
- <xsl:when test="$countType > 1">
- <xsl:value-of select="concat($posId,'/table[',$index,']')"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="concat($posId,'/table')"/>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:with-param>
- <xsl:with-param name="conditional">
- <xsl:value-of select="$conditional"/>
- </xsl:with-param>
- </xsl:apply-templates>
- </xsl:template>
- <xsl:template match="tableRow">
- <xsl:param name="posId"/>
- <xsl:param name="conditional"/>
- <xsl:variable name="countType">
- <xsl:value-of select="count(../tableRow)"/>
- </xsl:variable>
- <xsl:variable name="index">
- <xsl:value-of select="1 + count(preceding-sibling::tableRow)"/>
- </xsl:variable>
- <xsl:apply-templates select="tableCells/tableCell">
- <xsl:with-param name="posId">
- <xsl:choose>
- <xsl:when test="$countType > 1">
- <xsl:value-of select="concat($posId,'/tableRows/tableRow[',$index,']')"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="concat($posId,'/tableRows/tableRow')"/>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:with-param>
- <xsl:with-param name="conditional">
- <xsl:value-of select="$conditional"/>
- </xsl:with-param>
- </xsl:apply-templates>
- </xsl:template>
- <xsl:template match="tableCell">
- <xsl:param name="posId"/>
- <xsl:param name="conditional"/>
- <xsl:variable name="countType">
- <xsl:value-of select="count(../tableCell)"/>
- </xsl:variable>
- <xsl:variable name="index">
- <xsl:value-of select="1 + count(preceding-sibling::tableCell)"/>
- </xsl:variable>
- <xsl:apply-templates select="contents/*">
- <xsl:with-param name="posId">
- <xsl:choose>
- <xsl:when test="$countType > 1">
- <xsl:value-of select="concat($posId,'/tableCells/tableCell[',$index,']/contents')"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="concat($posId,'/tableCells/tableCell/contents')"/>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:with-param>
- <xsl:with-param name="conditional">
- <xsl:value-of select="$conditional"/>
- </xsl:with-param>
- </xsl:apply-templates>
- </xsl:template>
- <xsl:template match="block">
- <xsl:param name="posId"/>
- <xsl:param name="conditional"/>
- <xsl:variable name="countType">
- <xsl:value-of select="count(../block)"/>
- </xsl:variable>
- <xsl:variable name="index">
- <xsl:value-of select="1 + count(preceding-sibling::block)"/>
- </xsl:variable>
- <xsl:apply-templates select="contents/*">
- <xsl:with-param name="posId">
- <xsl:choose>
- <xsl:when test="$countType > 1">
- <xsl:value-of select="concat($posId,'/block[',$index,']/contents')"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="concat($posId,'/block/contents')"/>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:with-param>
- <xsl:with-param name="conditional">
- <xsl:value-of select="$conditional"/>
- </xsl:with-param>
- </xsl:apply-templates>
- </xsl:template>
- <xsl:template match="list">
- <xsl:param name="posId"/>
- <xsl:param name="conditional"/>
- <xsl:variable name="countType">
- <xsl:value-of select="count(../list)"/>
- </xsl:variable>
- <xsl:variable name="index">
- <xsl:value-of select="1 + count(preceding-sibling::list)"/>
- </xsl:variable>
- <item>
- <posId>
- <xsl:choose>
- <xsl:when test="$countType > 1">
- <xsl:value-of select="concat($posId,'/list[',$index,']')"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="concat($posId,'/list')"/>
- </xsl:otherwise>
- </xsl:choose>
- </posId>
- <conditional>
- <xsl:choose>
- <xsl:when test="./conditionalRender">true</xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="$conditional"/>
- </xsl:otherwise>
- </xsl:choose>
- </conditional>
- <MListFrame>
- <xsl:variable name="listId">
- <xsl:choose>
- <xsl:when test="$countType > 1">
- <xsl:value-of select="concat($posId,'/list[',$index,']')"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="concat($posId,'/list')"/>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:variable>
- <xsl:if test="@name">
- <rdsCM:id>
- <xsl:value-of select="@name"/>
- </rdsCM:id>
- </xsl:if>
- <columns>
- <xsl:for-each select="listColumns/listColumn">
- <column>
- <title>
- <xsl:choose>
- <xsl:when test="listColumnTitle/contents/*/dataSource/dataItemLabel/@refDataItem">
- <xsl:value-of select="listColumnTitle/contents/*/dataSource/dataItemLabel/@refDataItem"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="listColumnTitle/contents/textItem/dataSource/staticValue"/>
- </xsl:otherwise>
- </xsl:choose>
- </title>
- <contents>
- <xsl:apply-templates select="listColumnBody/contents/*">
- <xsl:with-param name="posId">
- <xsl:value-of select="concat($listId, '/listColumnBody/contents')"/>
- </xsl:with-param>
- <xsl:with-param name="conditional">
- <xsl:value-of select="$conditional"/>
- </xsl:with-param>
- </xsl:apply-templates>
- </contents>
- </column>
- </xsl:for-each>
- </columns>
- <xsl:apply-templates select="listGroups/*">
- <xsl:with-param name="posId">
- <xsl:value-of select="concat($listId, '/listGroups')"/>
- </xsl:with-param>
- <xsl:with-param name="conditional">
- <xsl:value-of select="$conditional"/>
- </xsl:with-param>
- </xsl:apply-templates>
- <xsl:apply-templates select="listOverallGroup/*">
- <xsl:with-param name="posId">
- <xsl:value-of select="$listId"/>
- </xsl:with-param>
- <xsl:with-param name="conditional">
- <xsl:value-of select="$conditional"/>
- </xsl:with-param>
- </xsl:apply-templates>
- </MListFrame>
- </item>
- </xsl:template>
- <xsl:template match="listGroup">
- <xsl:param name="posId"/>
- <xsl:param name="conditional"/>
- <xsl:variable name="countType">
- <xsl:value-of select="count(../list)"/>
- </xsl:variable>
- <xsl:variable name="index">
- <xsl:value-of select="1 + count(preceding-sibling::list)"/>
- </xsl:variable>
- <xsl:variable name="listGroupId">
- <xsl:choose>
- <xsl:when test="$countType > 1">
- <xsl:value-of select="concat($posId,'/list[',$index,']')"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="concat($posId,'/list')"/>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:variable>
- <listGroup>
- <key>
- <xsl:value-of select="@refDataItem"/>
- </key>
- <xsl:apply-templates select="*">
- <xsl:with-param name="posId">
- <xsl:value-of select="$listGroupId"/>
- </xsl:with-param>
- <xsl:with-param name="conditional">
- <xsl:value-of select="$conditional"/>
- </xsl:with-param>
- </xsl:apply-templates>
- </listGroup>
- </xsl:template>
- <xsl:template match="listHeader | listFooter">
- <xsl:param name="posId"/>
- <xsl:param name="conditional"/>
- <xsl:variable name="listSectionId">
- <xsl:value-of select="concat($posId,'/',name())"/>
- </xsl:variable>
- <xsl:element name="{name()}">
- <xsl:apply-templates select="listRows/listRow">
- <xsl:with-param name="posId">
- <xsl:value-of select="$listSectionId"/>
- </xsl:with-param>
- <xsl:with-param name="conditional">
- <xsl:value-of select="$conditional"/>
- </xsl:with-param>
- </xsl:apply-templates>
- </xsl:element>
- </xsl:template>
- <xsl:template match="listRow">
- <xsl:param name="posId"/>
- <xsl:param name="conditional"/>
- <xsl:variable name="listRowId">
- <xsl:value-of select="concat($posId,'/listRow')"/>
- </xsl:variable>
- <listRow>
- <xsl:apply-templates select="rowCells/rowCell">
- <xsl:with-param name="posId">
- <xsl:value-of select="$listRowId"/>
- </xsl:with-param>
- <xsl:with-param name="conditional">
- <xsl:value-of select="$conditional"/>
- </xsl:with-param>
- </xsl:apply-templates>
- </listRow>
- </xsl:template>
- <xsl:template match="rowCell">
- <xsl:param name="posId"/>
- <xsl:param name="conditional"/>
- <xsl:variable name="rowCellId">ll
- <xsl:value-of select="concat($posId,'/rowCell')"/>
- </xsl:variable>
- <rowCell>
- <xsl:choose>
- <xsl:when test="@colSpan">
- <xsl:attribute name="colSpan"><xsl:value-of select="@colSpan"/></xsl:attribute>
- </xsl:when>
- <xsl:otherwise>
- <xsl:attribute name="colSpan">1</xsl:attribute>
- </xsl:otherwise>
- </xsl:choose>
- <xsl:apply-templates select="contents/*">
- <xsl:with-param name="posId">
- <xsl:value-of select="$rowCellId"/>
- </xsl:with-param>
- <xsl:with-param name="conditional">
- <xsl:value-of select="$conditional"/>
- </xsl:with-param>
- </xsl:apply-templates>
- </rowCell>
- </xsl:template>
- <xsl:template match="TOC">
- <xsl:param name="posId"/>
- <xsl:param name="conditional"/>
- <xsl:variable name="countType">
- <xsl:value-of select="count(../TOC)"/>
- </xsl:variable>
- <xsl:variable name="index">
- <xsl:value-of select="1 + count(preceding-sibling::TOC)"/>
- </xsl:variable>
- <item>
- <posId>
- <xsl:choose>
- <xsl:when test="$countType > 1">
- <xsl:value-of select="concat($posId,'/TOC[',$index,']')"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="concat($posId,'/TOC')"/>
- </xsl:otherwise>
- </xsl:choose>
- </posId>
- <conditional>
- <xsl:choose>
- <xsl:when test="./conditionalRender">true</xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="$conditional"/>
- </xsl:otherwise>
- </xsl:choose>
- </conditional>
- <MTableOfContents>
- <xsl:if test="@tocName">
- <rdsCM:id>
- <xsl:value-of select="@tocName"/>
- </rdsCM:id>
- </xsl:if>
- </MTableOfContents>
- </item>
- </xsl:template>
- <xsl:template match="textItem">
- <xsl:param name="conditional"/>
- <xsl:param name="posId"/>
- <xsl:variable name="countType">
- <xsl:value-of select="count(../textItem)"/>
- </xsl:variable>
- <xsl:variable name="index">
- <xsl:value-of select="1 + count(preceding-sibling::textItem)"/>
- </xsl:variable>
- <item>
- <posId>
- <xsl:choose>
- <xsl:when test="$countType > 1">
- <xsl:value-of select="concat($posId,'/textItem[',$index,']')"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="concat($posId,'/textItem')"/>
- </xsl:otherwise>
- </xsl:choose>
- </posId>
- <conditional>
- <xsl:choose>
- <xsl:when test="./conditionalRender">true</xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="$conditional"/>
- </xsl:otherwise>
- </xsl:choose>
- </conditional>
- <MTextFrame>
- <xsl:if test="@name">
- <rdsCM:id>
- <xsl:value-of select="@name"/>
- </rdsCM:id>
- </xsl:if>
- </MTextFrame>
- </item>
- </xsl:template>
- <xsl:template match="image">
- <xsl:param name="posId"/>
- <xsl:param name="conditional"/>
- <xsl:variable name="countType">
- <xsl:value-of select="count(../image)"/>
- </xsl:variable>
- <xsl:variable name="index">
- <xsl:value-of select="1 + count(preceding-sibling::image)"/>
- </xsl:variable>
- <item>
- <posId>
- <xsl:choose>
- <xsl:when test="$countType > 1">
- <xsl:value-of select="concat($posId,'/image[',$index,']')"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="concat($posId,'/image')"/>
- </xsl:otherwise>
- </xsl:choose>
- </posId>
- <conditional>
- <xsl:choose>
- <xsl:when test="./conditionalRender">true</xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="$conditional"/>
- </xsl:otherwise>
- </xsl:choose>
- </conditional>
- <MImage>
- <xsl:if test="@name">
- <rdsCM:id>
- <xsl:value-of select="@name"/>
- </rdsCM:id>
- </xsl:if>
- </MImage>
- </item>
- </xsl:template>
- <xsl:template match="crosstab">
- <xsl:param name="posId"/>
- <xsl:param name="conditional"/>
- <xsl:variable name="countType">
- <xsl:value-of select="count(../crosstab)"/>
- </xsl:variable>
- <xsl:variable name="index">
- <xsl:value-of select="1 + count(preceding-sibling::crosstab)"/>
- </xsl:variable>
- <item>
- <xsl:variable name="xtabId">
- <xsl:choose>
- <xsl:when test="$countType > 1">
- <xsl:value-of select="concat($posId,'/crosstab[',$index,']')"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="concat($posId,'/crosstab')"/>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:variable>
- <posId>
- <xsl:value-of select="$xtabId"/>
- </posId>
- <conditional>
- <xsl:choose>
- <xsl:when test="./conditionalRender">true</xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="$conditional"/>
- </xsl:otherwise>
- </xsl:choose>
- </conditional>
- <MCrossTab>
- <xsl:if test="@name">
- <rdsCM:id>
- <xsl:value-of select="@name"/>
- </rdsCM:id>
- <corner>
- <xsl:apply-templates select="crosstabCorner/contents/*">
- <xsl:with-param name="posId">
- <xsl:value-of select="concat($xtabId, '/crosstabCorner/contents')"/>
- </xsl:with-param>
- <xsl:with-param name="conditional">
- <xsl:value-of select="$conditional"/>
- </xsl:with-param>
- </xsl:apply-templates>
- </corner>
- <columns>
- <xsl:apply-templates select="crosstabColumns/crosstabNode">
- <xsl:with-param name="posId">
- <xsl:value-of select="concat($xtabId, 'crosstabColumns/crosstabNode')"/>
- </xsl:with-param>
- <xsl:with-param name="conditional">
- <xsl:value-of select="$conditional"/>
- </xsl:with-param>
- </xsl:apply-templates>
- </columns>
- <rows>
- <xsl:apply-templates select="crosstabRows/crosstabNode">
- <xsl:with-param name="posId">
- <xsl:value-of select="concat($xtabId, 'crosstabRows/crosstabNode')"/>
- </xsl:with-param>
- <xsl:with-param name="conditional">
- <xsl:value-of select="$conditional"/>
- </xsl:with-param>
- </xsl:apply-templates>
- </rows>
- </xsl:if>
- </MCrossTab>
- </item>
- </xsl:template>
- <xsl:template match="crosstabNode">
- <xsl:param name="posId"/>
- <xsl:param name="conditional"/>
- <xsl:variable name="crosstabNodeId">
- <xsl:value-of select="concat($posId,'/crosstabNestedNodes')"/>
- </xsl:variable>
- <crosstabNode>
- <xsl:apply-templates select="*">
- <xsl:with-param name="posId">
- <xsl:value-of select="$crosstabNodeId"/>
- </xsl:with-param>
- <xsl:with-param name="conditional">
- <xsl:value-of select="$conditional"/>
- </xsl:with-param>
- </xsl:apply-templates>
- </crosstabNode>
- </xsl:template>
- <xsl:template match="crosstabNestedNodes">
- <xsl:param name="posId"/>
- <xsl:param name="conditional"/>
- <xsl:variable name="crosstabNestedNodesId">
- <xsl:value-of select="concat($posId,'/crosstabNestedNodes')"/>
- </xsl:variable>
- <nestedNodes>
- <xsl:apply-templates select="*">
- <xsl:with-param name="posId">
- <xsl:value-of select="$crosstabNestedNodesId"/>
- </xsl:with-param>
- <xsl:with-param name="conditional">
- <xsl:value-of select="$conditional"/>
- </xsl:with-param>
- </xsl:apply-templates>
- </nestedNodes>
- </xsl:template>
- <xsl:template match="crosstabNodeMembers">
- <xsl:param name="posId"/>
- <xsl:param name="conditional"/>
- <xsl:variable name="crosstabNodeMembersId">
- <xsl:value-of select="concat($posId,'/crosstabNodeMembers')"/>
- </xsl:variable>
- <members>
- <xsl:apply-templates select="*">
- <xsl:with-param name="posId">
- <xsl:value-of select="$crosstabNodeMembersId"/>
- </xsl:with-param>
- <xsl:with-param name="conditional">
- <xsl:value-of select="$conditional"/>
- </xsl:with-param>
- </xsl:apply-templates>
- </members>
- </xsl:template>
- <xsl:template match="crosstabNodeMember">
- <xsl:param name="posId"/>
- <xsl:param name="conditional"/>
- <xsl:variable name="crosstabNodeMemberId">
- <xsl:value-of select="concat($posId,'/crosstabNodeMember')"/>
- </xsl:variable>
- <member>
- <title>
- <xsl:value-of select="@refDataItem"/>
- </title>
- <contents>
- <xsl:apply-templates select="contents/*">
- <xsl:with-param name="posId">
- <xsl:value-of select="concat($crosstabNodeMemberId, 'contents')"/>
- </xsl:with-param>
- <xsl:with-param name="conditional">
- <xsl:value-of select="$conditional"/>
- </xsl:with-param>
- </xsl:apply-templates>
- </contents>
- </member>
- </xsl:template>
- <xsl:template match="crosstabSpacer">
- <xsl:param name="posId"/>
- <xsl:param name="conditional"/>
- <xsl:variable name="crosstabSpacerId">
- <xsl:value-of select="concat($posId,'/crosstabSpacer')"/>
- </xsl:variable>
- <spacer>
- <contents>
- <xsl:apply-templates select="contents/*">
- <xsl:with-param name="posId">
- <xsl:value-of select="concat($crosstabSpacerId, 'contents')"/>
- </xsl:with-param>
- <xsl:with-param name="conditional">
- <xsl:value-of select="$conditional"/>
- </xsl:with-param>
- </xsl:apply-templates>
- </contents>
- </spacer>
- </xsl:template>
- <xsl:template match="repeaterTable">
- <xsl:param name="posId"/>
- <xsl:param name="conditional"/>
- <xsl:variable name="countType">
- <xsl:value-of select="count(../repeaterTable)"/>
- </xsl:variable>
- <xsl:variable name="index">
- <xsl:value-of select="1 + count(preceding-sibling::repeaterTable)"/>
- </xsl:variable>
- <xsl:variable name="rptId">
- <xsl:choose>
- <xsl:when test="$countType > 1">
- <xsl:value-of select="concat($posId,'/repeaterTable[',$index,']')"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="concat($posId,'/repeaterTable')"/>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:variable>
- <item>
- <posId>
- <xsl:value-of select="$rptId"/>
- </posId>
- <conditional>
- <xsl:choose>
- <xsl:when test="./conditionalRender">true</xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="$conditional"/>
- </xsl:otherwise>
- </xsl:choose>
- </conditional>
- <MRepeaterTable>
- <xsl:if test="@name">
- <rdsCM:id>
- <xsl:value-of select="@name"/>
- </rdsCM:id>
- </xsl:if>
- <pref_columns>
- <xsl:value-of select="@across"/>
- </pref_columns>
- <pref_rows>
- <xsl:value-of select="@down"/>
- </pref_rows>
- <xsl:apply-templates select="repeaterTableCell/contents/*">
- <xsl:with-param name="posId">
- <xsl:value-of select="concat($rptId, '/repeaterTableCell/contents')"/>
- </xsl:with-param>
- <xsl:with-param name="conditional">
- <xsl:value-of select="$conditional"/>
- </xsl:with-param>
- </xsl:apply-templates>
- </MRepeaterTable>
- </item>
- </xsl:template>
- <xsl:template match="repeater">
- <xsl:param name="posId"/>
- <xsl:param name="conditional"/>
- <xsl:variable name="countType">
- <xsl:value-of select="count(../repeater)"/>
- </xsl:variable>
- <xsl:variable name="index">
- <xsl:value-of select="1 + count(preceding-sibling::repeater)"/>
- </xsl:variable>
- <xsl:variable name="rptId">
- <xsl:choose>
- <xsl:when test="$countType > 1">
- <xsl:value-of select="concat($posId,'/repeater[',$index,']')"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="concat($posId,'/repeater')"/>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:variable>
- <item>
- <posId>
- <xsl:value-of select="$rptId"/>
- </posId>
- <conditional>
- <xsl:choose>
- <xsl:when test="./conditionalRender">true</xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="$conditional"/>
- </xsl:otherwise>
- </xsl:choose>
- </conditional>
- <MRepeater>
- <xsl:if test="@name">
- <rdsCM:id>
- <xsl:value-of select="@name"/>
- </rdsCM:id>
- </xsl:if>
- <xsl:apply-templates select="contents/*">
- <xsl:with-param name="posId">
- <xsl:value-of select="concat($rptId, '/contents')"/>
- </xsl:with-param>
- <xsl:with-param name="conditional">
- <xsl:value-of select="$conditional"/>
- </xsl:with-param>
- </xsl:apply-templates>
- </MRepeater>
- </item>
- </xsl:template>
- <xsl:template match="hyperlink">
- <xsl:param name="posId"/>
- <xsl:param name="conditional"/>
- <xsl:variable name="countType">
- <xsl:value-of select="count(../hyperlink)"/>
- </xsl:variable>
- <xsl:variable name="index">
- <xsl:value-of select="1 + count(preceding-sibling::hyperlink)"/>
- </xsl:variable>
- <item>
- <posId>
- <xsl:choose>
- <xsl:when test="$countType > 1">
- <xsl:value-of select="concat($posId,'/hyperlink[',$index,']')"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="concat($posId,'/hyperlink')"/>
- </xsl:otherwise>
- </xsl:choose>
- </posId>
- <conditional>
- <xsl:choose>
- <xsl:when test="./conditionalRender">true</xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="$conditional"/>
- </xsl:otherwise>
- </xsl:choose>
- </conditional>
- <MHyperlink>
- <xsl:if test="@name">
- <rdsCM:id>
- <xsl:value-of select="@name"/>
- </rdsCM:id>
- </xsl:if>
- </MHyperlink>
- </item>
- </xsl:template>
- <xsl:template match="button">
- <!--Not yet handled-->
- </xsl:template>
- <xsl:template match="promptButton">
- <!--Not yet handled-->
- </xsl:template>
- <xsl:template match="HTMLItem">
- <xsl:param name="posId"/>
- <xsl:param name="conditional"/>
- <xsl:variable name="countType">
- <xsl:value-of select="count(../HTMLItem)"/>
- </xsl:variable>
- <xsl:variable name="index">
- <xsl:value-of select="1 + count(preceding-sibling::HTMLItem)"/>
- </xsl:variable>
- <item>
- <posId>
- <xsl:choose>
- <xsl:when test="$countType > 1">
- <xsl:value-of select="concat($posId,'/HTMLItem[',$index,']')"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="concat($posId,'/HTMLItem')"/>
- </xsl:otherwise>
- </xsl:choose>
- </posId>
- <conditional>
- <xsl:choose>
- <xsl:when test="./conditionalRender">true</xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="$conditional"/>
- </xsl:otherwise>
- </xsl:choose>
- </conditional>
- <MHTML>
- <xsl:if test="@name">
- <rdsCM:id>
- <xsl:value-of select="@name"/>
- </rdsCM:id>
- </xsl:if>
- </MHTML>
- </item>
- </xsl:template>
- <xsl:template match="richTextItem">
- <xsl:param name="posId"/>
- <xsl:param name="conditional"/>
- <xsl:variable name="countType">
- <xsl:value-of select="count(../richTextItem)"/>
- </xsl:variable>
- <xsl:variable name="index">
- <xsl:value-of select="1 + count(preceding-sibling::richTextItem)"/>
- </xsl:variable>
- <item>
- <posId>
- <xsl:choose>
- <xsl:when test="$countType > 1">
- <xsl:value-of select="concat($posId,'/richTextItem[',$index,']')"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="concat($posId,'/richTextItem')"/>
- </xsl:otherwise>
- </xsl:choose>
- </posId>
- <conditional>
- <xsl:choose>
- <xsl:when test="./conditionalRender">true</xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="$conditional"/>
- </xsl:otherwise>
- </xsl:choose>
- </conditional>
- <MRichText>
- <xsl:if test="@name">
- <rdsCM:id>
- <xsl:value-of select="@name"/>
- </rdsCM:id>
- </xsl:if>
- </MRichText>
- </item>
- </xsl:template>
- <xsl:template match="bookmark">
- <xsl:param name="posId"/>
- <xsl:param name="conditional"/>
- <xsl:variable name="countType">
- <xsl:value-of select="count(../bookmark)"/>
- </xsl:variable>
- <xsl:variable name="index">
- <xsl:value-of select="1 + count(preceding-sibling::bookmark)"/>
- </xsl:variable>
- <item>
- <posId>
- <xsl:choose>
- <xsl:when test="$countType > 1">
- <xsl:value-of select="concat($posId,'/bookmark[',$index,']')"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="concat($posId,'/bookmark')"/>
- </xsl:otherwise>
- </xsl:choose>
- </posId>
- <conditional>
- <xsl:choose>
- <xsl:when test="./conditionalRender">true</xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="$conditional"/>
- </xsl:otherwise>
- </xsl:choose>
- </conditional>
- <MBookmark>
- <xsl:if test="@name">
- <rdsCM:id>
- <xsl:value-of select="@name"/>
- </rdsCM:id>
- </xsl:if>
- </MBookmark>
- </item>
- </xsl:template>
- <xsl:template match="TOCEntry">
- <xsl:param name="posId"/>
- <xsl:param name="conditional"/>
- <xsl:variable name="countType">
- <xsl:value-of select="count(../TOCEntry)"/>
- </xsl:variable>
- <xsl:variable name="index">
- <xsl:value-of select="1 + count(preceding-sibling::TOCEntry)"/>
- </xsl:variable>
- <item>
- <posId>
- <xsl:choose>
- <xsl:when test="$countType > 1">
- <xsl:value-of select="concat($posId,'/TOCEntry[',$index,']')"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="concat($posId,'/TOCEntry')"/>
- </xsl:otherwise>
- </xsl:choose>
- </posId>
- <!-- TOCEntry items are also mapped to bookmark object -->
- <!-- Note: neither TOCEntry nor bookmark have name attrbitues, so id will be empty -->
- <conditional>
- <xsl:choose>
- <xsl:when test="./conditionalRender">true</xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="$conditional"/>
- </xsl:otherwise>
- </xsl:choose>
- </conditional>
- <MBookmark>
- <xsl:if test="@name">
- <rdsCM:id>
- <xsl:value-of select="@name"/>
- </rdsCM:id>
- </xsl:if>
- </MBookmark>
- </item>
- </xsl:template>
- <xsl:template match="fieldset">
- <xsl:param name="posId"/>
- <xsl:param name="conditional"/>
- <xsl:variable name="countType">
- <xsl:value-of select="count(../fieldset)"/>
- </xsl:variable>
- <xsl:variable name="index">
- <xsl:value-of select="1 + count(preceding-sibling::fieldset)"/>
- </xsl:variable>
- <xsl:apply-templates select="contents/*"/>
- </xsl:template>
- <xsl:template match="conditionalBlocks">
- <xsl:param name="posId"/>
- <xsl:variable name="countType">
- <xsl:value-of select="count(../conditionalBlocks)"/>
- </xsl:variable>
- <xsl:variable name="index">
- <xsl:value-of select="1 + count(preceding-sibling::conditionalBlocks)"/>
- </xsl:variable>
- <xsl:apply-templates select="./conditionalBlockDefault/contents/*">
- <xsl:with-param name="posId">
- <xsl:value-of select="concat($posId,'/conditionalBlockDefault/contents')"/>
- </xsl:with-param>
- <xsl:with-param name="conditional">true</xsl:with-param>
- </xsl:apply-templates>
- <xsl:for-each select="./conditionalBlockCases/conditionalBlock">
- <xsl:apply-templates select="./contents/*">
- <xsl:with-param name="posId">
- <xsl:choose>
- <xsl:when test="count(../conditionalBlock) > 1">
- <xsl:value-of select="concat($posId,'/conditionalBlockCases/conditionalBlock[',1 + count(preceding-sibling::conditionalBlock),'/contents')"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="concat($posId,'/conditionalBlockCases/conditionalBlock/contents')"/>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:with-param>
- <xsl:with-param name="conditional">true</xsl:with-param>
- </xsl:apply-templates>
- </xsl:for-each>
- </xsl:template>
- <xsl:template match="layoutComponentRef">
- <xsl:param name="conditional"/>
- <xsl:param name="posId"/>
- <xsl:variable name="countType">
- <xsl:value-of select="count(../layoutComponentRef)"/>
- </xsl:variable>
- <xsl:variable name="index">
- <xsl:value-of select="1 + count(preceding-sibling::layoutComponentRef)"/>
- </xsl:variable>
- <!-- LCR will be handled in next version -->
- </xsl:template>
- <xsl:template match="CMMMap">
- <xsl:param name="posId"/>
- <xsl:param name="conditional"/>
- <xsl:variable name="countType">
- <xsl:value-of select="count(../CMMMap)"/>
- </xsl:variable>
- <xsl:variable name="index">
- <xsl:value-of select="1 + count(preceding-sibling::CMMMap)"/>
- </xsl:variable>
- <item>
- <posId>
- <xsl:choose>
- <xsl:when test="$countType > 1">
- <xsl:value-of select="concat($posId,'/CMMMap[',$index,']')"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="concat($posId,'/CMMMap')"/>
- </xsl:otherwise>
- </xsl:choose>
- </posId>
- <conditional>
- <xsl:choose>
- <xsl:when test="./conditionalRender">true</xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="$conditional"/>
- </xsl:otherwise>
- </xsl:choose>
- </conditional>
- <MImage>
- <xsl:if test="@cmmID">
- <rdsCM:id>
- <xsl:value-of select="@cmmID"/>
- </rdsCM:id>
- </xsl:if>
- </MImage>
- </item>
- </xsl:template>
- <xsl:template match="asOfTime">
- <!--Not yet handled-->
- </xsl:template>
- <xsl:template match="pieChart | paretoChart | scatterChart | polarChart | radarChart | progressiveChart | combinationChart | bubbleChart | threeDCombinationChart | threeDScatterChart | gaugeChart | mapChart | metricsChart | marimekkoChart | winLossChart | v2_combinationChart | v2_scatterChart | v2_pieChart | v2_gaugeChart | v2_matrixChart | v2_progressiveChart | v2_paretoChart | v2_bubbleChart | v2_repeaterChart | v2_bulletChart">
- <xsl:param name="posId"/>
- <xsl:param name="conditional"/>
- <item>
- <posId>
- <xsl:choose>
- <xsl:when test="name() = 'pieChart'">
- <xsl:choose>
- <xsl:when test="count(../pieChart) > 1">
- <xsl:value-of select="concat($posId,'/pieChart[',1 + count(preceding-sibling::pieChart),']')"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="concat($posId,'/pieChart')"/>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:when>
- <xsl:when test="name() = 'paretoChart'">
- <xsl:choose>
- <xsl:when test="count(../paretoChart) > 1">
- <xsl:value-of select="concat($posId,'/paretoChart[',1 + count(preceding-sibling::paretoChart),']')"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="concat($posId,'/paretoChart')"/>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:when>
- <xsl:when test="name() = 'scatterChart'">
- <xsl:choose>
- <xsl:when test="count(../scatterChart) > 1">
- <xsl:value-of select="concat($posId,'/scatterChart[',1 + count(preceding-sibling::scatterChart),']')"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="concat($posId,'/scatterChart')"/>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:when>
- <xsl:when test="name() = 'polarChart'">
- <xsl:choose>
- <xsl:when test="count(../polarChart) > 1">
- <xsl:value-of select="concat($posId,'/polarChart[',1 + count(preceding-sibling::polarChart),']')"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="concat($posId,'/polarChart')"/>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:when>
- <xsl:when test="name() = 'radarChart'">
- <xsl:choose>
- <xsl:when test="count(../radarChart) > 1">
- <xsl:value-of select="concat($posId,'/radarChart[',1 + count(preceding-sibling::radarChart),']')"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="concat($posId,'/radarChart')"/>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:when>
- <xsl:when test="name() = 'progressiveChart'">
- <xsl:choose>
- <xsl:when test="count(../progressiveChart) > 1">
- <xsl:value-of select="concat($posId,'/progressiveChart[',1 + count(preceding-sibling::progressiveChart),']')"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="concat($posId,'/progressiveChart')"/>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:when>
- <xsl:when test="name() = 'combinationChart'">
- <xsl:choose>
- <xsl:when test="count(../combinationChart) > 1">
- <xsl:value-of select="concat($posId,'/combinationChart[',1 + count(preceding-sibling::combinationChart),']')"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="concat($posId,'/combinationChart')"/>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:when>
- <xsl:when test="name() = 'bubbleChart'">
- <xsl:choose>
- <xsl:when test="count(../bubbleChart) > 1">
- <xsl:value-of select="concat($posId,'/bubbleChart[',1 + count(preceding-sibling::bubbleChart),']')"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="concat($posId,'/bubbleChart')"/>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:when>
- <xsl:when test="name() = 'threeDCombinationChart'">
- <xsl:choose>
- <xsl:when test="count(../threeDCombinationChart) > 1">
- <xsl:value-of select="concat($posId,'/threeDCombinationChart[',1 + count(preceding-sibling::threeDCombinationChart),']')"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="concat($posId,'/threeDCombinationChart')"/>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:when>
- <xsl:when test="name() = 'threeDScatterChart'">
- <xsl:choose>
- <xsl:when test="count(../threeDScatterChart) > 1">
- <xsl:value-of select="concat($posId,'/threeDScatterChart[',1 + count(preceding-sibling::threeDScatterChart),']')"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="concat($posId,'/threeDScatterChart')"/>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:when>
- <xsl:when test="name() = 'gaugeChart'">
- <xsl:choose>
- <xsl:when test="count(../gaugeChart) > 1">
- <xsl:value-of select="concat($posId,'/gaugeChart[',1 + count(preceding-sibling::gaugeChart),']')"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="concat($posId,'/gaugeChart')"/>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:when>
- <xsl:when test="name() = 'mapChart'">
- <xsl:choose>
- <xsl:when test="count(../mapChart) > 1">
- <xsl:value-of select="concat($posId,'/mapChart[',1 + count(preceding-sibling::mapChart),']')"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="concat($posId,'/mapChart')"/>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:when>
- <xsl:when test="name() = 'metricsChart'">
- <xsl:choose>
- <xsl:when test="count(../metricsChart) > 1">
- <xsl:value-of select="concat($posId,'/metricsChart[',1 + count(preceding-sibling::metricsChart),']')"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="concat($posId,'/metricsChart')"/>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:when>
- <xsl:when test="name() = 'marimekkoChart'">
- <xsl:choose>
- <xsl:when test="count(../marimekkoChart) > 1">
- <xsl:value-of select="concat($posId,'/marimekkoChart[',1 + count(preceding-sibling::marimekkoChart),']')"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="concat($posId,'/marimekkoChart')"/>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:when>
- <xsl:when test="name() = 'winLossChart'">
- <xsl:choose>
- <xsl:when test="count(../winLossChart) > 1">
- <xsl:value-of select="concat($posId,'/winLossChart[',1 + count(preceding-sibling::winLossChart),']')"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="concat($posId,'/winLossChart')"/>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:when>
- <xsl:when test="name() = 'v2_combinationChart'">
- <xsl:choose>
- <xsl:when test="count(../v2_combinationChart) > 1">
- <xsl:value-of select="concat($posId,'/winLossChart[',1 + count(preceding-sibling::v2_combinationChart),']')"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="concat($posId,'/v2_combinationChart')"/>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:when>
- <xsl:when test="name() = 'v2_scatterChart'">
- <xsl:choose>
- <xsl:when test="count(../v2_scatterChart) > 1">
- <xsl:value-of select="concat($posId,'/v2_scatterChart[',1 + count(preceding-sibling::v2_scatterChart),']')"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="concat($posId,'/v2_schatterChart')"/>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:when>
- <xsl:when test="name() = 'v2_pieChart'">
- <xsl:choose>
- <xsl:when test="count(../v2_combinationChart) > 1">
- <xsl:value-of select="concat($posId,'/pieChart[',1 + count(preceding-sibling::v2_pieChart),']')"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="concat($posId,'/v2_pieChart')"/>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:when>
- <xsl:when test="name() = 'v2_guageChart'">
- <xsl:choose>
- <xsl:when test="count(../v2_guageChart) > 1">
- <xsl:value-of select="concat($posId,'/v2_guageChart[',1 + count(preceding-sibling::v2_guageChart),']')"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="concat($posId,'/v2_guageChart')"/>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:when>
- <xsl:when test="name() = 'v2_matrixChart'">
- <xsl:choose>
- <xsl:when test="count(../v2_matrixChart) > 1">
- <xsl:value-of select="concat($posId,'/v2_matrixChart[',1 + count(preceding-sibling::v2_matrixChart),']')"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="concat($posId,'/v2_matrixChart')"/>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:when>
- <xsl:when test="name() = 'v2_progressiveChart'">
- <xsl:choose>
- <xsl:when test="count(../v2_progressiveChart) > 1">
- <xsl:value-of select="concat($posId,'/v2_progressiveChart[',1 + count(preceding-sibling::v2_progressiveChart),']')"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="concat($posId,'/v2_progressiveChart')"/>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:when>
- <xsl:when test="name() = 'v2_paretoChart'">
- <xsl:choose>
- <xsl:when test="count(../v2_paretoChart) > 1">
- <xsl:value-of select="concat($posId,'/v2_paretoChart[',1 + count(preceding-sibling::v2_paretoChart),']')"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="concat($posId,'/v2_paretoChart')"/>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:when>
- <xsl:when test="name() = 'v2_bubbleChart'">
- <xsl:choose>
- <xsl:when test="count(../v2_bubbleChart) > 1">
- <xsl:value-of select="concat($posId,'/v2_bubbleChart[',1 + count(preceding-sibling::v2_bubbleChart),']')"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="concat($posId,'/v2_bubbleChart')"/>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:when>
- <xsl:when test="name() = 'v2_repeaterChart'">
- <xsl:choose>
- <xsl:when test="count(../v2_repeaterChart) > 1">
- <xsl:value-of select="concat($posId,'/v2_repeaterChart[',1 + count(preceding-sibling::v2_repeaterChart),']')"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="concat($posId,'/v2_repeaterChart')"/>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:when>
- <xsl:when test="name() = 'v2_bubbleChart'">
- <xsl:choose>
- <xsl:when test="count(../v2_bubbleChart) > 1">
- <xsl:value-of select="concat($posId,'/v2_bubbleChart[',1 + count(preceding-sibling::v2_repeaterChart),']')"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="concat($posId,'/v2_bubbleChart')"/>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="concat($posId,'/unknownChartType')"/>
- </xsl:otherwise>
- </xsl:choose>
- </posId>
- <conditional>
- <xsl:choose>
- <xsl:when test="./conditionalRender">true</xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="$conditional"/>
- </xsl:otherwise>
- </xsl:choose>
- </conditional>
- <MChart>
- <xsl:if test="@name">
- <rdsCM:id>
- <xsl:value-of select="@name"/>
- </rdsCM:id>
- </xsl:if>
- </MChart>
- </item>
- </xsl:template>
- <xsl:template match="singleton">
- <xsl:param name="posId"/>
- <xsl:param name="conditional"/>
- <xsl:variable name="countType">
- <xsl:value-of select="count(../singleton)"/>
- </xsl:variable>
- <xsl:variable name="index">
- <xsl:value-of select="1 + count(preceding-sibling::singleton)"/>
- </xsl:variable>
- <xsl:apply-templates select="contents/*">
- <xsl:with-param name="posId">
- <xsl:choose>
- <xsl:when test="$countType > 1">
- <xsl:value-of select="concat($posId,'/singleton[',$index,']/contents')"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="concat($posId,'/singleton/contents')"/>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:with-param>
- <xsl:with-param name="conditional"><xsl:value-of select="$conditional"/></xsl:with-param>
- </xsl:apply-templates>
- </xsl:template>
- <xsl:template match="*">
- <!--Unknown element. Ignore-->
- </xsl:template>
- </xsl:stylesheet>
|