123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677 |
- <?xml version="1.0" encoding="UTF-8"?>
- <!--
- Licensed Materials - Property of IBM
- IBM Cognos Products: CCS
- (c) Copyright IBM Corp. 2005, 2013
- 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/2" xmlns:ccs="com.cognos.ccs.xslt.XSLTFunctions" xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:ldx="http://www.ibm.com/xmlns/prod/cognos/layoutData/200904">
- <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/*">
- <xsl:with-param name="posId">./layouts/layout/reportPages</xsl:with-param>
- </xsl:apply-templates>
- </document>
- </xsl:template>
- <xsl:template priority="2" match="*[contains(style/CSS/@value, 'visibility:hidden') ]"/>
- <xsl:template name="page">
- <xsl:param name="posId"/>
- <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">
- <ldx:id>
- <xsl:value-of select="@name"/>
- </ldx: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($posId, '/page[',$index,']/pageHeader/contents')"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="concat($posId,'/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($posId, '/page[',$index,']/pageBody/contents')"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="concat($posId,'/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($posId, '/page[',$index,']/pageFooter/contents')"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="concat($posId,'/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="page">
- <xsl:param name="posId"/>
- <xsl:call-template name="page">
- <xsl:with-param name="posId" select="$posId"/>
- </xsl:call-template>
- </xsl:template>
- <xsl:template match="page[pageSections]">
- <xsl:param name="posId"/>
- <xsl:variable name="countMembers" select="count(pageSections/pageSection/pageSectionDefinition/dmMembers/dmMember)"/>
- <pageGroup>
- <xsl:choose>
- <xsl:when test="$countMembers = 1">
- <ldx:id>
- <xsl:value-of select="concat('children(', pageSections/pageSection/pageSectionDefinition/dmMembers/dmMember/itemCaption, ')')"/>
- </ldx:id>
- </xsl:when>
- <xsl:otherwise>
- <ldx:id>
- <xsl:value-of select="concat(pageSections/pageSection/dmHierarchy/itemCaption, ' (list)')"/>
- </ldx:id>
- </xsl:otherwise>
- </xsl:choose>
- <xsl:call-template name="page">
- <xsl:with-param name="posId" select="$posId"/>
- </xsl:call-template>
- </pageGroup>
- </xsl:template>
- <xsl:template match="pageSet">
- <xsl:variable name="countType">
- <xsl:value-of select="count(../pageSet)"/>
- </xsl:variable>
- <xsl:variable name="index">
- <xsl:value-of select="1 + count(preceding-sibling::pageSet)"/>
- </xsl:variable>
- <xsl:apply-templates select="pageOverallGroup/headerPages/*">
- <xsl:with-param name="posId">
- <xsl:choose>
- <xsl:when test="$countType > 1">
- <xsl:value-of select="concat('./layouts/layout/reportPages/pageSet[',$index,']/pageOverallGroup/headerPages')"/>
- </xsl:when>
- <xsl:otherwise>./layouts/layout/reportPages/pageSet/pageOverallGroup/headerPages</xsl:otherwise>
- </xsl:choose>
- </xsl:with-param>
- <xsl:with-param name="conditional">false</xsl:with-param>
- </xsl:apply-templates>
- <xsl:if test="count(pageGroups) = 0">
- <xsl:apply-templates select="detailPages/*">
- <xsl:with-param name="posId">
- <xsl:choose>
- <xsl:when test="$countType > 1">
- <xsl:value-of select="concat('./layouts/layout/reportPages/pageSet[',$index,']/detailPages')"/>
- </xsl:when>
- <xsl:otherwise>./layouts/layout/reportPages/pageSet/detailPages</xsl:otherwise>
- </xsl:choose>
- </xsl:with-param>
- </xsl:apply-templates>
- </xsl:if>
- <xsl:apply-templates select="pageGroups/*">
- <xsl:with-param name="posId">
- <xsl:choose>
- <xsl:when test="$countType > 1">
- <xsl:value-of select="concat('./layouts/layout/reportPages/pageSet[',$index,']/pageGroups')"/>
- </xsl:when>
- <xsl:otherwise>./layouts/layout/reportPages/pageSet</xsl:otherwise>
- </xsl:choose>
- </xsl:with-param>
- <xsl:with-param name="conditional">false</xsl:with-param>
- <xsl:with-param name="detailPages" select="detailPages/*"/>
- </xsl:apply-templates>
- <xsl:apply-templates select="pageOverallGroup/footerPages/*">
- <xsl:with-param name="posId">
- <xsl:choose>
- <xsl:when test="$countType > 1">
- <xsl:value-of select="concat('./layouts/layout/reportPages/pageSet[',$index,']/pageOverallGroup/footerPages')"/>
- </xsl:when>
- <xsl:otherwise>./layouts/layout/reportPages/pageSet/pageOverallGroup/footerPages</xsl:otherwise>
- </xsl:choose>
- </xsl:with-param>
- <xsl:with-param name="conditional">false</xsl:with-param>
- </xsl:apply-templates>
- </xsl:template>
- <xsl:template match="pageGroup">
- <xsl:param name="posId"/>
- <xsl:param name="conditional"/>
- <xsl:param name="detailPages"/>
- <xsl:variable name="countType">
- <xsl:value-of select="count(../table)"/>
- </xsl:variable>
- <xsl:variable name="index">
- <xsl:value-of select="1 + count(preceding-sibling::pageGroup)"/>
- </xsl:variable>
- <pageGroup>
- <xsl:if test="@refDataItem">
- <ldx:id>
- <xsl:value-of select="@refDataItem"/>
- </ldx:id>
- </xsl:if>
- <xsl:apply-templates select="headerPages/*">
- <xsl:with-param name="posId">
- <xsl:choose>
- <xsl:when test="$countType > 1">
- <xsl:value-of select="concat($posId,'/headerPages[',$index,']')"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="concat($posId,'/headerPages')"/>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:with-param>
- <xsl:with-param name="conditional">
- <xsl:value-of select="$conditional"/>
- </xsl:with-param>
- </xsl:apply-templates>
- <xsl:apply-templates select="$detailPages">
- <xsl:with-param name="posId">
- <xsl:choose>
- <xsl:when test="$countType > 1">
- <xsl:value-of select="concat($posId,'/detailPages[',$index,']')"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="concat($posId,'/detailPages')"/>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:with-param>
- <xsl:with-param name="conditional">
- <xsl:value-of select="$conditional"/>
- </xsl:with-param>
- </xsl:apply-templates>
- <xsl:apply-templates select="footerPages/*">
- <xsl:with-param name="posId">
- <xsl:choose>
- <xsl:when test="$countType > 1">
- <xsl:value-of select="concat($posId,'/footerPages[',$index,']')"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="concat($posId,'/footerPages')"/>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:with-param>
- <xsl:with-param name="conditional">
- <xsl:value-of select="$conditional"/>
- </xsl:with-param>
- </xsl:apply-templates>
- </pageGroup>
- </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="refQuery">
- <xsl:value-of select="@refQuery"/>
- </xsl:variable>
- <xsl:variable name="index">
- <xsl:value-of select="1 + count(preceding-sibling::list)"/>
- </xsl:variable>
- <xsl:variable name="visibleColls">
- <xsl:value-of select="count(listColumns/listColumn/*[style/CSS[not(contains(@value,'display:none'))] or style[not(CSS)]])"/>
- </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">
- <ldx:id>
- <xsl:value-of select="@name"/>
- </ldx:id>
- </xsl:if>
- <xsl:if test="$visibleColls > 0">
- <columns>
- <xsl:choose>
- <xsl:when test="@showColumnTitles='hide'">
- <xsl:for-each select="listColumns/listColumn">
- <xsl:if test="*[not(contains(style/CSS/@value,'display:none'))]">
- <column>
- <title>
- <xsl:value-of select="concat('Column', position())"/>
- <!--<title>
- <xsl:variable name="refDataItem" select="listColumnTitle/contents/*/dataSource/dataItemLabel/@refDataItem"/>
- <xsl:variable name="label" select="/report/queries/query/selection/*[@name=$refDataItem and @label]/@label"/>
- <xsl:choose>
- <xsl:when test="$refDataItem">
- <xsl:choose>
- <xsl:when test="$label">
- <xsl:value-of select="$label"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="$refDataItem"/>
- </xsl:otherwise>
- </xsl:choose>
- </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:if>
- </xsl:for-each>
- </xsl:when>
- <xsl:otherwise>
- <xsl:for-each select="listColumns/listColumn">
- <xsl:if test="*[not(contains(style/CSS/@value,'display:none'))]">
- <column>
- <title>
- <xsl:variable name="refDataItem" select="listColumnTitle/contents/*/dataSource/dataItemLabel/@refDataItem"/>
- <xsl:variable name="label" select="/report/queries/query[@name=$refQuery]/selection/*[@name=$refDataItem and @label]/@label"/>
- <xsl:choose>
- <xsl:when test="$refDataItem">
- <xsl:choose>
- <xsl:when test="$label">
- <xsl:value-of select="$label"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="$refDataItem"/>
- </xsl:otherwise>
- </xsl:choose>
- </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:with-param name="refQuery">
- <xsl:value-of select="$refQuery"/>
- </xsl:with-param>
- </xsl:apply-templates>
- </contents>
- </column>
- </xsl:if>
- </xsl:for-each>
- </xsl:otherwise>
- </xsl:choose>
- </columns>
- </xsl:if>
- <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:param name="refQuery"/>
- <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,'/listGroup/list[',$index,']')"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="concat($posId,'/listGroup')"/>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:variable>
- <listGroup>
- <key>
- <xsl:variable name="refDataItem" select="@refDataItem"/>
- <xsl:variable name="label" select="/report/queries/query[@name=$refQuery]/selection/*[@name=$refDataItem and @label]/@label"/>
- <xsl:choose>
- <xsl:when test="$label">
- <xsl:value-of select="$label"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="$refDataItem"/>
- </xsl:otherwise>
- </xsl:choose>
- </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,'/listRows/listRow')"/>
- </xsl:variable>
- <xsl:variable name="visibleCells">
- <xsl:value-of select="count(rowCells/rowCell[style/CSS[not(contains(@value,'display:none'))] or style[not(CSS)] ])"/>
- </xsl:variable>
- <xsl:if test="$visibleCells > 0">
- <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:if>
- </xsl:template>
- <xsl:template match="rowCell">
- <xsl:param name="posId"/>
- <xsl:param name="conditional"/>
- <xsl:variable name="rowCellId"><xsl:value-of select="concat($posId,'/rowCells/rowCell/contents')"/></xsl:variable>
- <xsl:if test="not(contains(style/CSS/@value,'display:none'))">
- <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:if>
- </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">
- <ldx:id>
- <xsl:value-of select="@tocName"/>
- </ldx: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">
- <ldx:id>
- <xsl:value-of select="@name"/>
- </ldx: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">
- <ldx:id>
- <xsl:value-of select="@name"/>
- </ldx: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">
- <ldx:id>
- <xsl:choose>
- <xsl:when test="function-available('ccs:getInfoPartName')">
- <xsl:value-of select="ccs:getInfoPartName(@name,'Crosstab')"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="@name"/>
- </xsl:otherwise>
- </xsl:choose>
- </ldx: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:variable name="staticValue" select="contents/textItem/dataSource/staticValue"/>
- <xsl:choose>
- <xsl:when test="$staticValue">
- <xsl:value-of select="$staticValue"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="@refDataItem"/>
- </xsl:otherwise>
- </xsl:choose>
- </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>
- <member>
- <title>
- <xsl:variable name="staticValue" select="contents/textItem/dataSource/staticValue"/>
- <xsl:choose>
- <xsl:when test="$staticValue">
- <xsl:value-of select="$staticValue"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="@refDataItem"/>
- </xsl:otherwise>
- </xsl:choose>
- </title>
- <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>
- </member>
- </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">
- <ldx:id>
- <xsl:value-of select="@name"/>
- </ldx: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">
- <ldx:id>
- <xsl:value-of select="@name"/>
- </ldx: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">
- <ldx:id>
- <xsl:value-of select="@name"/>
- </ldx: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">
- <ldx:id>
- <xsl:value-of select="@name"/>
- </ldx:id>
- </xsl:if>
- </MHTML>
- </item>
- </xsl:template>
- <xsl:template match="customContent">
- <xsl:param name="posId"/>
- <xsl:param name="conditional"/>
- <xsl:variable name="countType">
- <xsl:value-of select="count(../customContent)"/>
- </xsl:variable>
- <xsl:variable name="index">
- <xsl:value-of select="1 + count(preceding-sibling::customContent)"/>
- </xsl:variable>
- <xsl:call-template name="richTextItem">
- <xsl:with-param name="posId" select="concat($posId,'/customContent')"/>
- <xsl:with-param name="conditional" select="$conditional"/>
- <xsl:with-param name="index" select="$index"/>
- <xsl:with-param name="countType" select="$countType"/>
- </xsl:call-template>
- </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>
- <xsl:call-template name="richTextItem">
- <xsl:with-param name="posId" select="concat($posId,'/richTextItem')"/>
- <xsl:with-param name="conditional" select="$conditional"/>
- <xsl:with-param name="index" select="$index"/>
- <xsl:with-param name="countType" select="$countType"/>
- </xsl:call-template>
- </xsl:template>
- <xsl:template name="richTextItem">
- <xsl:param name="posId"/>
- <xsl:param name="conditional"/>
- <xsl:param name="index"/>
- <xsl:param name="countType"/>
- <item>
- <posId>
- <xsl:choose>
- <xsl:when test="$countType > 1">
- <xsl:value-of select="concat($posId,'[',$index,']')"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="$posId"/>
- </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">
- <ldx:id>
- <xsl:value-of select="@name"/>
- </ldx: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:choose>
- <xsl:when test="@name">
- <ldx:id>
- <xsl:value-of select="@name"/>
- </ldx:id>
- </xsl:when>
- <xsl:otherwise>
- <xsl:if test="dataSource/staticValue">
- <ldx:id>
- <xsl:value-of select="dataSource/staticValue"/>
- </ldx:id>
- </xsl:if>
- </xsl:otherwise>
- </xsl:choose>
- </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">
- <ldx:id>
- <xsl:value-of select="@name"/>
- </ldx: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="fieldSetCaption/contents/*">
- <xsl:with-param name="posId">
- <xsl:choose>
- <xsl:when test="$countType > 1">
- <xsl:value-of select="concat($posId,'/fieldSet/fieldSetCaption[',$index,']/contents')"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="concat($posId,'/fieldSet/fieldSetCaption/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:apply-templates select="contents/*">
- <xsl:with-param name="posId">
- <xsl:choose>
- <xsl:when test="$countType > 1">
- <xsl:value-of select="concat($posId,'/fieldSet[',$index,']/contents')"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="concat($posId,'/fieldSet/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="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">
- <ldx:id>
- <xsl:value-of select="@cmmID"/>
- </ldx: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 | viz">
- <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_bulletChart'">
- <xsl:choose>
- <xsl:when test="count(../v2_bulletChart) > 1">
- <xsl:value-of select="concat($posId,'/v2_bulletChart[',1 + count(preceding-sibling::v2_repeaterChart),']')"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="concat($posId,'/v2_bulletChart')"/>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:when>
- <xsl:when test="name() = 'viz'">
- <xsl:choose>
- <xsl:when test="count(../viz) > 1">
- <xsl:value-of select="concat($posId,'/viz[',1 + count(preceding-sibling::viz),']')"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="concat($posId,'/viz')"/>
- </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>
-
- <xsl:variable name="chart-name">
- <xsl:choose>
- <xsl:when test="name() = 'viz'">MImage</xsl:when>
- <xsl:otherwise>MChart</xsl:otherwise>
- </xsl:choose>
- </xsl:variable>
- <xsl:element name="{$chart-name}">
- <xsl:if test="@name">
- <ldx:id>
- <xsl:choose>
- <xsl:when test="function-available('ccs:getInfoPartName')">
- <xsl:value-of select="ccs:getInfoPartName(@name,'Chart')"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="@name"/>
- </xsl:otherwise>
- </xsl:choose>
- </ldx:id>
- </xsl:if>
- </xsl:element>
- </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>
|