1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939 |
- <?xml version="1.0" encoding="UTF-8"?>
- <!--
- Licensed Materials - Property of IBM
- IBM Cognos Products: ps
- (C) Copyright IBM Corp. 2005, 2019
- US Government Users Restricted Rights - Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
- -->
- <xsl:stylesheet version="1.0"
- xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
- xmlns:dp="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/dialog/presentation/"
- xmlns:dt="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/dialog/templates/"
- xmlns:cp="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/controls/presentation/"
- xmlns:out="dummy-uri"
- xmlns:xtsext="xalan://com.cognos.xts.ext.XTSExt"
- xmlns:xts="http://developer.cognos.com/schemas/xts/"
- xmlns:utml="http://developer.cognos.com/schemas/xts/logicsheet/xslt/formlogic/"
- xmlns:cm="http://developer.cognos.com/schemas/xts-cm/1/" exclude-result-prefixes="xsl dp dt cp xtsext xts utml cm">
- <xsl:output method="xml" encoding="UTF-8" indent="no"/>
- <xsl:namespace-alias stylesheet-prefix="out" result-prefix="xsl"/>
- <!--
- dp:button
- dp:buttonGroup
- dp:buttonImage
- dp:choice
- dp:closeMarker
- dp:columnButton
- dp:columnButtonGroup
- dp:description
- dp:division
- dp:field
- dp:footer
- dp:group
- dp:groupItem
- dp:header
- dp:hint
- dp:inactiveText
- dp:input
- dp:label
- dp:list
- dp:message
- dp:page
- dp:script
- dp:section
- dp:section1
- dp:section2
- dp:section3
- dp:text
- dp:textarea
- -->
- <!--
- CODE WILL NOT PASS BETWEEN THE FOLLOWING TAGS
- <dp:input> and <dp:section*>
- <dp:section> and <dp:*> - in lists
- <dp:textarea> and <dp:section*>
- -->
- <xsl:variable name="dp-namespace-uri"
- select="'http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/dialog/presentation/'"/>
- <!--
- dp:box - provides side by side compartments with spacing between them.
- -->
- <xsl:template match="dp:box">
- <table border="0" cellspacing="0" cellpadding="1" role="presentation">
- <xsl:if test="@width">
- <xsl:attribute name="width">
- <xsl:value-of select="@width"/>
- </xsl:attribute>
- </xsl:if>
- <xsl:if test="@title">
- <tr>
- <td nowrap="nowrap" colspan="{2 * count(descendant::dp:section) - 1}" class="formLabel">
- <xts:string id="{@title}"/>
- </td>
- </tr>
- </xsl:if>
- <tr>
- <xsl:if test="@valign">
- <xsl:attribute name="valign"><xsl:value-of select="@valign"/></xsl:attribute>
- </xsl:if>
- <xsl:apply-templates/>
- </tr>
- <xsl:if test="not(@noSpace) or @noSpace = 'false'">
- <tr>
- <td nowrap="nowrap">
- </td>
- </tr>
- </xsl:if>
- </table>
- </xsl:template>
- <!--
- dp:boxSection - containers in a box.
- -->
- <xsl:template match="dp:boxSection">
- <td>
- <xsl:if test="not(@wrap)">
- <xsl:attribute name="nowrap">nowrap</xsl:attribute>
- </xsl:if>
- <xsl:if test="@width">
- <xsl:attribute name="width">
- <xsl:value-of select="@width"/>
- </xsl:attribute>
- </xsl:if>
- <xsl:if test="@height">
- <xsl:attribute name="height">
- <xsl:value-of select="@height"/>
- </xsl:attribute>
- </xsl:if>
- <xsl:if test="@align">
- <xsl:attribute name="align">
- <xsl:value-of select="@align"/>
- </xsl:attribute>
- </xsl:if>
- <xsl:if test="@valign">
- <xsl:attribute name="valign">
- <xsl:value-of select="@valign"/>
- </xsl:attribute>
- </xsl:if>
- <div>
- <xsl:attribute name="class">
- <xsl:choose>
- <xsl:when test="@type='label'">formLabel</xsl:when>
- <xsl:otherwise>formText</xsl:otherwise>
- </xsl:choose>
- </xsl:attribute>
- <xsl:apply-templates select="child::node()"/>
- </div>
- </td>
- <xsl:if test="@hgap">
- <td nowrap="nowrap">
- </td>
- </xsl:if>
- </xsl:template>
- <xsl:template match="dp:defaultKey">
- <xsl:if test=".='active'">
- <script type="text/javascript">
- var whatfocus='';
- function setfocus(type)
- {
- whatfocus=type;
- }
- <out:choose>
- <out:when test="$browser='ie' or $browser = 'safari'">
- document.onkeypress = keyhandler;
- function keyhandler() {
- var Key;
- Key = window.event.keyCode;
- if (Key==13)
- {
- if(whatfocus!='textarea')
- {
- <!-- the following condition check does NOT work if changed to == true -->
- <!-- must be some IE thing -->
- if (window.event.returnValue != false)
- {
- enterdfaultact();
- window.event.returnValue = false;
- return false;
- }
- <!-- The following IF condition is to stop IE from continuing to process the Enter event,
- even though we've trapped it and set everything (that needs to be set) to false! -->
- if (window.event.returnValue == false)
- {
- window.event.cancelBubble = true;
- return false;
- }
- window.event.returnValue = false;
- return false;
- }
- }
- }
- </out:when>
- <out:when test="$browser = 'moz'">
- <!--
- Order is essential to get this to work on NS versions 4.76/6.x/7.x
- 1. Enable event capturing for the window (Event.KEYPRESS).
- 2. Define the function that is to handle the event (keyhandler).
- 3. Register the function as the windows event handler (onkeypress).
- -->
- window.captureEvents(Event.KEYPRESS);
- function keyhandler(e) {
- var Key;
- Key = e.which;
- if (Key==13)
- {
- if (whatfocus!='textarea')
- return enterdfaultact();
- }
- }
- window.onkeypress = keyhandler;
- </out:when>
- </out:choose>
- </script>
- </xsl:if>
- </xsl:template>
- <xsl:template match="dp:defaultAct">
- <out:variable name="da">
- <xsl:copy-of select="."/>
- </out:variable>
- <script language="JavaScript">
- function enterdfaultact()
- {
- <out:value-of select="$da"/>
- return false;
- }
- </script>
- </xsl:template>
- <xsl:template match="dp:defaultBack">
- <out:variable name="hf">
- <xsl:copy-of select="."/>
- </out:variable>
- <script language="JavaScript">
- function enterdfaultact()
- {
- location.href='<out:value-of select="xtsext:javascriptencode(string($hf))"/>';
- return false;
- }
- </script>
- </xsl:template>
- <!-- ===== Creates a column of buttons (mostly for adding or deleting entries from a list) ===== -->
- <xsl:template match="dp:columnButtonGroup">
- <xsl:variable name="labelID">
- <xsl:value-of select="@label"/>
- <xsl:if test="@parentLabel">_<xsl:value-of select="@parentLabel"/><xsl:text> </xsl:text><xsl:value-of select="@parentLabel"/></xsl:if>
- </xsl:variable>
- <table border="0" cellpadding="1" cellspacing="5" role="toolbar" >
- <xsl:if test="not(@skipColumnButtons = 'true')">
- <xsl:attribute name="aria-controls"><xsl:text/><xsl:for-each select="dp:columnButton"><xsl:text>columnButton_</xsl:text><xsl:value-of select="generate-id()"/><xsl:if test="position() != last()"><xsl:text> </xsl:text></xsl:if></xsl:for-each><xsl:text/></xsl:attribute>
- </xsl:if>
- <xsl:attribute name="aria-labelledby"><xsl:value-of select="$labelID"/></xsl:attribute>
-
- <xsl:for-each select="dp:columnButton">
- <tr>
- <xsl:choose>
- <xsl:when test="../@skipColumnButtons = 'true'"><xsl:apply-templates select="./*/*"><xsl:with-param name="label"><xsl:value-of select="$labelID"/></xsl:with-param><xsl:with-param name="buttonId">columnButton_<xsl:value-of select="generate-id()"/></xsl:with-param></xsl:apply-templates></xsl:when>
- <xsl:otherwise><xsl:apply-templates select="."><xsl:with-param name="label"><xsl:value-of select="$labelID"/></xsl:with-param><xsl:with-param name="buttonId">columnButton_<xsl:value-of select="generate-id()"/></xsl:with-param></xsl:apply-templates></xsl:otherwise>
- </xsl:choose>
- </tr>
- </xsl:for-each>
- </table>
- </xsl:template>
- <xsl:template match="dp:columnButton">
- <xsl:param name="buttonId"/>
- <xsl:param name="label"/>
- <!--
- Creates a button in the column.
- Uses the toolbar images stuff.
- -->
- <xsl:choose>
- <xsl:when test="not(*[self::dp:button])">
- <td id="{$buttonId}" role="presentation">
- <xsl:choose>
- <xsl:when test="@style='commandButton'">
- <!-- need to give the table mouseover properties if the user did not supply dp:button -->
- <xsl:attribute name="class"><xsl:text>commandButton</xsl:text></xsl:attribute>
- <xsl:attribute name="onmouseover"><xsl:text>this.className = 'commandButtonOver'</xsl:text></xsl:attribute>
- <xsl:attribute name="onmousedown"><xsl:text>this.className = 'commandButtonDown'</xsl:text></xsl:attribute>
- <xsl:attribute name="onmouseout"><xsl:text>this.className = 'commandButton'</xsl:text></xsl:attribute>
- </xsl:when>
- <xsl:when test="not( dp:button )">
- <!-- need to give the table mouseover properties if the user did not supply dp:button -->
- <xsl:attribute name="class"><xsl:text>toolbarImageNormal</xsl:text></xsl:attribute>
- <xsl:attribute name="onmouseover"><xsl:text>this.className = 'toolbarImageOver'</xsl:text></xsl:attribute>
- <xsl:attribute name="onmouseout"><xsl:text>this.className = 'toolbarImageNormal'</xsl:text></xsl:attribute>
- </xsl:when>
- </xsl:choose>
- <xsl:apply-templates mode="colButton"><xsl:with-param name="id"><xsl:value-of select="$buttonId"/>_text</xsl:with-param></xsl:apply-templates>
- </td>
- </xsl:when>
- <xsl:otherwise>
- <xsl:apply-templates mode="colButton"><xsl:with-param name="id"><xsl:value-of select="$buttonId"/>_text</xsl:with-param></xsl:apply-templates>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:template>
- <xsl:template match="*" mode="colButton">
- <xsl:param name="id"/>
- <xsl:apply-templates select="."/>
- </xsl:template>
- <xsl:template match="a" mode="colButton">
- <xsl:param name="id"/>
- <a id="{$id}" role="button" aria-labelledby="{$id}">
- <xsl:copy-of select="@*"/>
- <xsl:copy-of select="./*"/>
- </a>
- </xsl:template>
- <!--
- dp:button - buttons, usually in the dp:footer
- -->
- <xsl:template match="dp:button">
- <td>
- <xsl:if test="@id">
- <script language="JavaScript">
- var <xsl:value-of select="@id"/>_enabled = true;
- function <xsl:value-of select="@id"/>_enable()
- {
- <xsl:value-of select="@id"/>_enabled = true;
- document.getElementById('<xsl:value-of select="@id"/>').className = "commandButtonActive";
- }
- function <xsl:value-of select="@id"/>_disable()
- {
- <xsl:value-of select="@id"/>_enabled = false;
- document.getElementById('<xsl:value-of select="@id"/>').className = "commandButtonInactive";
- }
- function <xsl:value-of select="@id"/>_isEnabled()
- {
- return <xsl:value-of select="@id"/>_enabled;
- }
- function <xsl:value-of select="@id"/>_mouseaction(obj, action)
- {
- var isEnabled = <xsl:value-of select="@id"/>_enabled;
- if (isEnabled)
- {
- switch (action)
- {
- case "over": obj.className = 'commandButtonOver'; break;
- case "out": obj.className = 'commandButton'; break;
- case "down": obj.className = 'commandButtonDown'; break;
- default:
- }
- }
- }
- </script>
- </xsl:if>
- <script language="JavaScript">
- function dispatchClickToChildAnchor(topElement){
- var anchorObjs = topElement.getElementsByTagName("A");
- if (anchorObjs.length == 0){
- return true;
- }
-
- var anchorObj = anchorObjs[0];
- if( document.createEvent )
- {
- var evt = document.createEvent('MouseEvents');
- evt.initMouseEvent('click', true, true, window, 0, 0, 0, 0, 0, false, false, false, false, 0, null);
- return anchorObj.dispatchEvent(evt);
- }
- else if( document.createEventObject )
- {
- return anchorObj.fireEvent('onClick');
- }
- }
-
- function handleButtonClickOutsideAnchor(event){
- var targetEl = event.target
- if (!targetEl){
- targetEl = event.srcElement;
- }
- //if the click came from the anchor then we want to just return
- if ((targetEl == null) || (targetEl.nodeName.toLowerCase() == 'a')){
- return true;
- }
- //if the click came from anywhere else then we want to pass that down to the
- //anchor
- return dispatchClickToChildAnchor(targetEl);
- }
- </script>
- <table cellpadding="0" cellspacing="0" summary="" role="presentation" onclick="javascript:handleButtonClickOutsideAnchor(event)">
- <!-- Add event handlers for "active buttons" -->
- <xsl:choose>
- <xsl:when test="@id">
- <xsl:attribute name="id"><xsl:value-of select="@id"/>_button</xsl:attribute>
- <xsl:attribute name="onmouseover"><xsl:value-of select="@id"/>_mouseaction(this, 'over')</xsl:attribute>
- <xsl:attribute name="onmouseout"><xsl:value-of select="@id"/>_mouseaction(this, 'out')</xsl:attribute>
- <xsl:attribute name="onmousedown"><xsl:value-of select="@id"/>_mouseaction(this, 'down')</xsl:attribute>
- </xsl:when>
- <xsl:when test="not(@id) and not(@state='inactive')">
- <xsl:attribute name="onmouseover">this.className = 'commandButtonOver'</xsl:attribute>
- <xsl:attribute name="onmouseout">this.className = 'commandButton'</xsl:attribute>
- <xsl:attribute name="onmousedown">this.className = 'commandButtonDown'</xsl:attribute>
- </xsl:when>
- </xsl:choose>
- <!-- Style the button according to state -->
- <xsl:choose>
- <xsl:when test="@state = 'inactive'">
- <xsl:attribute name="class">commandButtonInactive</xsl:attribute>
- <out:attribute name="style">padding-right:10px; padding-left:10px; </out:attribute>
- </xsl:when>
- <xsl:otherwise>
- <xsl:attribute name="class">commandButton</xsl:attribute>
- <out:attribute name="style">padding-right:10px; padding-left:10px;</out:attribute>
- </xsl:otherwise>
- </xsl:choose>
- <tr>
- <td valign="middle" align="center" nowrap="nowrap">
- <!--
- The OK button is a bit unique on none ie browsers.
- We like to add extra padding on anchors that wrap 'OK' to beef up the hot spot area.
- -->
- <xsl:if test="not(@id)">
- <out:variable name="produceId"><xsl:value-of select="string(.//dp:df_no_id)"/></out:variable>
- <out:if test="$produceId != 'true'">
- <out:variable name="OKButton">
- <xsl:copy-of select=".//dp:buttonText/child::node()"/>
- </out:variable>
- <out:attribute name="id">
- <out:choose>
- <out:when test="$browser = 'ie'">btnAnchorIE</out:when>
- <out:when test="$OKButton = 'OK'">btnAnchorWide</out:when>
- <out:otherwise>btnAnchor</out:otherwise>
- </out:choose>
- </out:attribute>
- </out:if>
- </xsl:if>
- <!-- minimum button width as specified by STAN -->
- <out:choose>
- <out:when test="$browser = 'ie'">
- <xsl:choose>
- <xsl:when test="@state = 'inactive'"> <!-- The width fixing image size depends on whether or not the button is active, as the 10px padding applies to different elements in each case -->
- <img style="float:left;" height="1" border="0" width="50" src="{'{$webcontent}'}/images/space.gif" alt=""/>
- </xsl:when>
- <xsl:otherwise>
- <img style="float:left;" height="1" border="0" width="70" src="{'{$webcontent}'}/images/space.gif" alt=""/>
- </xsl:otherwise>
- </xsl:choose>
- </out:when>
- <out:otherwise>
- <img style="float:left;" height="1" width="55" src="{'{$webcontent}'}/images/space.gif" alt=""/>
- </out:otherwise>
- </out:choose>
- <!-- Insert the button content text/images -->
- <div>
- <out:choose>
- <out:when test="$browser = 'ie'">
- <out:attribute name="style">float: left; width: 100%; padding-bottom: 1px; padding-top: 4px;</out:attribute>
- </out:when>
- <out:otherwise>
- <out:attribute name="style">float: left; width: 100%; padding-bottom: 1px; padding-top: 3px;</out:attribute>
- </out:otherwise>
- </out:choose>
- <xsl:apply-templates select="./*[local-name()!='df_no_id']"/>
- </div>
- </td>
- </tr>
- </table>
- </td>
- <td>
- <img height="1" width="10" src="{'{$webcontent}'}/images/space.gif" alt=""/>
- </td>
- </xsl:template>
- <!--
- dp:buttonGroup - button groups that aren't in the footer
- -->
- <xsl:template match="dp:buttonGroup">
- <table border="0" cellpadding="0" cellspacing="0" role="presentation">
- <tr>
- <!-- show the buttons -->
- <xsl:apply-templates/>
- </tr>
- </table>
- </xsl:template>
- <!--
- dp:buttonText
- -->
- <xsl:template match="dp:buttonText">
- <xsl:apply-templates/>
- </xsl:template>
- <!--
- dp:buttonImage
- -->
- <xsl:template match="dp:buttonImage">
- <xsl:param name="state" select="'active'"/>
-
- <xsl:choose>
- <!-- if the image if to the left of the text, then put right padding -->
- <xsl:when test="@dp:imagePosition = 'left'">
- <img style="position:relative; top:1px; right:2px;" align="top" border="0" src="{.}">
- <xsl:if test="@name">
- <xsl:attribute name="name"><xsl:value-of select="@name"/></xsl:attribute>
- </xsl:if>
- <xsl:if test="@role">
- <xsl:attribute name="role"><xsl:value-of select="@role"/></xsl:attribute>
- </xsl:if>
- <xsl:if test="@dp:tooltip and @dp:tooltip!=''">
- <out:attribute name="alt"><xts:string id="{@dp:tooltip}"/></out:attribute>
- </xsl:if>
- </img>
- </xsl:when>
- <xsl:otherwise>
- <img style="position:relative; top:1px; left:2px;" align="top" border="0" src="{.}">
- <xsl:if test="@name">
- <xsl:attribute name="name"><xsl:value-of select="@name"/></xsl:attribute>
- </xsl:if>
- <xsl:if test="@dp:tooltip and @dp:tooltip!=''">
- <out:attribute name="alt"><xts:string id="{@dp:tooltip}"/></out:attribute>
- </xsl:if>
- </img>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:template>
- <!--
- dp:choice -2 sections first for the radio button - second for the label
- -->
- <xsl:template match="dp:choice">
- <table border="0" cellspacing="0" cellpadding="1" role="presentation">
- <xsl:if test="@width">
- <xsl:attribute name="width"><xsl:value-of select="@width"/></xsl:attribute>
- </xsl:if>
- <xsl:if test="@tabindex">
- <xsl:attribute name="tabindex"><xsl:value-of select="@tabindex"/></xsl:attribute>
- </xsl:if>
- <xsl:if test="@title">
- <tr>
- <td nowrap="nowrap" class="formLabel">
- <xsl:if test="@id">
- <xsl:attribute name="id"><xsl:value-of select="@id"/></xsl:attribute>
- </xsl:if>
- <xsl:choose>
- <xsl:when test="@for != ''">
- <label for="{@for}"><xts:string id="{@title}"/></label>
- </xsl:when>
- <xsl:otherwise>
- <xts:string id="{@title}"/>
- </xsl:otherwise>
- </xsl:choose>
- </td>
- </tr>
- </xsl:if>
- <xsl:if test="@longTitle">
- <tr>
- <td nowrap="nowrap" class="formLabel">
- <xsl:if test="@id">
- <xsl:attribute name="id"><xsl:value-of select="@id"/></xsl:attribute>
- </xsl:if>
- <out:value-of select="{@longTitle}"/>
- </td>
- </tr>
- </xsl:if>
- <tr>
- <td>
- <xsl:choose>
- <xsl:when test="@aria-labelledby">
- <xsl:call-template name="dp:choice-emit-div-radiogroup">
- <xsl:with-param name="aria-labelledby-value" select="@aria-labelledby"/>
- <xsl:with-param name="role" select="@role"/>
- </xsl:call-template>
- </xsl:when>
- <xsl:when test="@id">
- <xsl:call-template name="dp:choice-emit-div-radiogroup">
- <xsl:with-param name="aria-labelledby-value" select="@id"/>
- <xsl:with-param name="role" select="@role"/>
- </xsl:call-template>
- </xsl:when>
- <xsl:otherwise>
- <table border="0" cellspacing="0" cellpadding="1" role="presentation">
- <xsl:apply-templates select="*[not(local-name() = 'lastSection')]" mode="choice"/>
- </table>
- </xsl:otherwise>
- </xsl:choose>
- <!-- Did not include dp:lastSection as part of radiogroup, because a radio button should not be implemented in dp:lastSection if it belongs to the radiogroup-->
- </td>
- </tr>
- <xsl:if test="dp:lastSection">
- <tr>
- <td>
- <xsl:apply-templates select="*[local-name()='lastSection']/*"/>
- </td>
- </tr>
- </xsl:if>
- <xsl:if test="not(@noSpace) or @noSpace = 'false'">
- <tr>
- <td nowrap="nowrap">
- </td>
- </tr>
- </xsl:if>
- </table>
- </xsl:template>
- <xsl:template name="dp:choice-emit-div-radiogroup">
- <xsl:param name="aria-labelledby-value"/>
- <xsl:param name="role"/>
-
- <xsl:variable name="aria-role">
- <xsl:choose>
- <xsl:when test="$role != ''"><xsl:value-of select="$role"/></xsl:when>
- <xsl:otherwise>radiogroup</xsl:otherwise>
- </xsl:choose>
- </xsl:variable>
- <div role="{$aria-role}">
- <xsl:if test="$aria-labelledby-value != ''">
- <xsl:attribute name="aria-labelledby">
- <xsl:value-of select="$aria-labelledby-value"/>
- </xsl:attribute>
- </xsl:if>
-
-
- <table border="0" cellspacing="0" cellpadding="1" role="presentation">
- <xsl:apply-templates select="*[not(local-name() = 'lastSection')]" mode="choice"/>
- </table>
- </div>
- </xsl:template>
- <!--
- dp:closeMarker -this will add the x for the close image in the dialog header
- -->
- <xsl:template match="dp:closeMarker">
- <img id="IDS_CLOSE_ICON" height="16" width="16" vspace="2" border="0" class="dialogClose" onmouseover="this.className = 'dialogCloseOver'" onmouseout="this.className = 'dialogClose'" onmouseup="this.className = 'dialogClose'" role="button">
- <xsl:attribute name="src"><xsl:value-of select="'{$skin_images}'"/>close.gif</xsl:attribute>
- <out:attribute name="title"><xts:string id="IDS_CLOSE"/></out:attribute>
- <out:attribute name="alt"><xts:string id="IDS_CLOSE"/></out:attribute>
- </img>
- </xsl:template>
- <!--
- dp:description - body of the dialog page
- -->
- <xsl:template match="dp:description">
- <table border="0" cellpadding="0" cellspacing="0" summary="" role="presentation">
- <xsl:choose>
- <xsl:when test="@aria-labelledby">
- <xsl:attribute name="aria-labelledby"><xsl:value-of select="@aria-labelledby"/></xsl:attribute>
- </xsl:when>
- <xsl:when test="@aria-label">
- <xsl:attribute name="aria-label"><xsl:value-of select="@aria-label"/></xsl:attribute>
- </xsl:when>
- <xsl:otherwise>
- <!-- do nothing -->
- </xsl:otherwise>
- </xsl:choose>
- <tr>
- <td width="10" valign="bottom">
- <img width="10" alt="">
- <xsl:attribute name="src"><xsl:value-of select="'{$webcontent}'"/>/images/space.gif</xsl:attribute>
- </img>
- </td>
- <td valign="middle" class="dialogHeaderText">
- <xsl:copy-of select="child::node()"/>
- </td>
- </tr>
- </table>
- <xsl:if test="not(//a[@id='maincontent']) and @mainContentHandled != 'true'">
- <div id="maincontent" role="main" tabindex="-1" style="position:absolute; margin-left: -9999px; margin-top:-9999px" >
- <out:attribute name="aria-label"><xts:string id="IDS_SECTION508_CONTENT" encode="html" /></out:attribute>
- </div>
- </xsl:if>
- </xsl:template>
- <!--
- dp:division - adds a division anywhere in the page
- -->
- <xsl:template match="dp:division">
- <table width="100%" border="0" cellpadding="0" cellspacing="0" role="presentation">
- <xsl:if test="(@style) and (@style = 'full')">
- <tr>
- <td height="10" width="100%" colspan="3">
- <img height="10" width="1" alt="">
- <xsl:attribute name="src"><xsl:value-of select="'{$webcontent}'"/>/images/space.gif</xsl:attribute>
- </img>
- </td>
- </tr>
- </xsl:if>
- <tr>
- <xsl:if test="(@style) and (@style = 'full')">
- <td height="1" width="8">
- <img height="1" width="8" alt="">
- <xsl:attribute name="src"><xsl:value-of select="'{$webcontent}'"/>/images/space.gif</xsl:attribute>
- </img>
- </td>
- </xsl:if>
- <td valign="middle" nowrap="nowrap" class="formLabel">
- <xsl:if test="@title">
- <span id="{@title}">
- <xts:string id="{@title}"/>
- </span>
- </xsl:if> 
- </td>
- <td width="100%" valign="middle">
- <table width="100%" height="1" border="0" cellpadding="0" cellspacing="0" role="presentation">
- <tr>
- <td class="dialogDivider">
- </td>
- </tr>
- </table>
- </td>
- </tr>
- <xsl:if test="(@style) and (@style = 'full')">
- <tr>
- <td height="5" width="1">
- </td>
- </tr>
- </xsl:if>
- </table>
- </xsl:template>
- <!--
- dp:field
- -->
- <xsl:template match="dp:field">
- <xsl:copy-of select="child::node()"/>  
- </xsl:template>
- <!--
- dp:emptyFooter
- -->
- <xsl:template match="dp:emptyFooter">
- <out:variable name="useDIVS_ef">
- <xsl:choose>
- <xsl:when test="dp:useDIVS">
- <xsl:copy-of select="dp:useDIVS/*"/>
- </xsl:when>
- <xsl:otherwise>
- <out:text>true</out:text>
- </xsl:otherwise>
- </xsl:choose>
- </out:variable>
- <out:variable name="divAttr_ef">
- <xsl:choose>
- <xsl:when test="string(@div)='div' ">
- <out:text>true</out:text>
- </xsl:when>
- <xsl:otherwise>
- <out:text>false</out:text>
- </xsl:otherwise>
- </xsl:choose>
- </out:variable>
- <out:if test="$divAttr_ef='true' and $useDIVS_ef='true' ">
- <out:choose>
- <out:when test="$browser='moz'">
- <out:text disable-output-escaping="yes"></div></out:text>
- </out:when>
- <out:otherwise>
- <out:text disable-output-escaping="yes"></div></out:text>
- <out:text disable-output-escaping="yes"></td></tr></table></out:text>
- </out:otherwise>
- </out:choose>
- </out:if>
- </xsl:template>
- <xsl:template match="dp:simpleFooter">
- <table width="100%" border="0" cellpadding="0" cellspacing="0" class="" summary="" role="presentation">
- <out:attribute name="class">
- <xsl:choose>
- <xsl:when test="@class"><xsl:value-of select="@class"/></xsl:when>
- <xsl:otherwise>dialogButtonBar</xsl:otherwise>
- </xsl:choose>
- </out:attribute>
- <!-- show the buttons -->
- <tr>
- <out:choose>
- <out:when test="$browser='moz'">
- <td width="2" valign="middle">
- <img width="2" alt="">
- <xsl:attribute name="src"><xsl:value-of select="'{$webcontent}'"/>/images/space.gif</xsl:attribute>
- </img>
- </td>
- </out:when>
- <out:otherwise>
- <td width="5" valign="middle">
- <img width="5" alt="">
- <xsl:attribute name="src"><xsl:value-of select="'{$webcontent}'"/>/images/space.gif</xsl:attribute>
- </img>
- </td>
- </out:otherwise>
- </out:choose>
- <td valign="middle">
- <table border="0" cellpadding="1" cellspacing="0" summary="" role="presentation">
- <tr>
- <xsl:apply-templates/>
- </tr>
- </table>
- </td>
- <td width="100%"> </td>
- </tr>
- </table>
- </xsl:template>
- <!--
- dp:footer
- -->
- <xsl:template match="dp:footer">
- <out:variable name="useDIVS_f">
- <xsl:choose>
- <xsl:when test="dp:useDIVS">
- <xsl:copy-of select="dp:useDIVS/*"/>
- </xsl:when>
- <xsl:otherwise>
- <out:text>true</out:text>
- </xsl:otherwise>
- </xsl:choose>
- </out:variable>
- <out:variable name="divAttr_f">
- <xsl:choose>
- <xsl:when test="string(@div)='div' ">
- <out:text>true</out:text>
- </xsl:when>
- <xsl:otherwise>
- <out:text>false</out:text>
- </xsl:otherwise>
- </xsl:choose>
- </out:variable>
- <out:choose>
- <out:when test="$divAttr_f='true' and $useDIVS_f='true' ">
- <out:choose>
- <out:when test="$browser='moz'">
- <out:text disable-output-escaping="yes"></div></out:text>
- <table width="100%" border="0" cellpadding="0" cellspacing="0" class="" summary="" role="presentation">
- <tr>
- <td width="1" valign="middle">
- </td>
- </tr>
- </table>
- </out:when>
- <out:otherwise>
- <out:text disable-output-escaping="yes"></div></out:text>
- <out:text disable-output-escaping="yes"></td></tr></table></out:text>
- </out:otherwise>
- </out:choose>
- </out:when>
- <out:otherwise>
- <table width="100%" border="0" cellpadding="0" cellspacing="0" class="" summary="" role="presentation">
- <tr>
- <td width="1" valign="middle">
- </td>
- </tr>
- </table>
- </out:otherwise>
- </out:choose>
- <table border="0" cellpadding="1" cellspacing="0" class="dialogButtonBar" summary="" role="presentation">
- <!-- show the buttons -->
- <tr>
- <td width="3" valign="middle">
- <img width="3" alt="">
- <xsl:attribute name="src"><xsl:value-of select="'{$webcontent}'"/>/images/space.gif</xsl:attribute>
- </img>
- </td>
- <td valign="middle">
- <!-- command buttons -->
- <table border="0" cellpadding="0" cellspacing="0" summary="" role="presentation">
- <tr>
- <xsl:apply-templates select="*[not(self::dp:useDIVS)]"/>
- </tr>
- </table>
- </td>
- <td width="100%"> </td>
- <xsl:if test="string(@copyright) = 'true'">
- <td valign="middle" align="right" class="copyright" nowrap="nowrap">
- <xts:string id="IDS_COPYRIGHT"/><br/>
- <xts:string id="IDS_TRADEMARK"/>
- </td>
- </xsl:if>
- </tr>
- </table>
- </xsl:template>
- <!--
- dp:group - simple one line layout, especially for images and text
- -->
- <xsl:template match="dp:group">
- <table border="0" cellpadding="0" cellspacing="0" summary="" role="presentation">
- <xsl:if test="@title">
- <tr>
- <td nowrap="nowrap" class="formLabel">
- <xts:string id="{@title}"/>
- </td>
- </tr>
- </xsl:if>
- <tr>
- <xsl:if test="@id">
- <xsl:attribute name="id"><xsl:value-of select="@id"/></xsl:attribute>
- </xsl:if>
- <xsl:apply-templates/>
- </tr>
- </table>
- </xsl:template>
- <!--
- dp:groupItem - each item in the group
- -->
- <xsl:template match="dp:groupItem">
- <td>
- <xsl:copy-of select="@*"/>
- <xsl:if test="@valign">
- <xsl:attribute name="valign"><xsl:value-of select="@valign"/></xsl:attribute>
- </xsl:if>
- <xsl:attribute name="class">
- <xsl:choose>
- <xsl:when test="@tdClass"><xsl:value-of select="@tdClass"/></xsl:when>
- <xsl:when test="self::dp:label">formLabel</xsl:when>
- <xsl:when test="self::dp:link">formLink</xsl:when>
- <xsl:otherwise>formText</xsl:otherwise>
- </xsl:choose>
- </xsl:attribute>
- <xsl:apply-templates/>
- </td>
- </xsl:template>
- <!--
- dp:header - this is a header for the dialog pages
- -->
- <xsl:template match="dp:header">
- <xsl:variable name="useKBA11y" select="string(@dp:kbA11y)='true'"/>
- <!--These variables must be declared here since they are required by cookie_jar.js-->
- <script type="text/javascript">
- var sParamDelimiter = "<out:value-of select="xtsext:javascriptencode(string(key('system-param', 'delimiters')/@d1))"/>";
- var sNameValueDelimiter = "<out:value-of select="xtsext:javascriptencode(string(key('system-param', 'delimiters')/@d2))"/>";
- var sCookiePath = "<out:value-of select="xtsext:javascriptencode(string($cookie_path))"/>";
- var sCookieDomain = "<out:value-of select="xtsext:javascriptencode(string($cookie_domain))"/>";
- var sCookieSecure = "<out:value-of select="xtsext:javascriptencode(string($cookie_secure))"/>";
- </script>
- <script type="text/javascript">
- <out:attribute name="src">
- <out:value-of select="$webcontent"/>/<out:value-of select="$app"/>/js/cookie_jar.js<out:text/>
- </out:attribute>
- </script>
-
- <!-- bidi -->
- <script type="text/javascript">
- <out:attribute name="src">
- <out:value-of select="$webcontent"/>/../ccl/i18n/bidi/BidiUtils.js<out:text/>
- </out:attribute>
- </script>
- <script language="javascript">
- var isBidiEnabled = <out:value-of select="boolean($isBidiEnabled='true')"/>;
- if (isBidiEnabled){
- var bidi = BidiUtils.getInstance();
- bidi.setProperties('<out:value-of select="xtsext:javascriptencode($baseTextDirection)"/>',
- '<out:value-of select="xtsext:getBTD('', $baseTextDirection, $productLocale)"/>',
- '<out:value-of select="xtsext:javascriptencode($productLocale)"/>');
- }
- </script>
- <out:variable name="useDIVS_h">
- <xsl:choose>
- <xsl:when test="dp:useDIVS">
- <xsl:copy-of select="dp:useDIVS/*"/>
- </xsl:when>
- <xsl:otherwise>
- <out:text>true</out:text>
- </xsl:otherwise>
- </xsl:choose>
- </out:variable>
- <out:variable name="divAttr_h">
- <xsl:choose>
- <xsl:when test="string(@div)='div' ">
- <out:text>true</out:text>
- </xsl:when>
- <xsl:otherwise>
- <out:text>false</out:text>
- </xsl:otherwise>
- </xsl:choose>
- </out:variable>
- <xsl:variable name="headerDisplayOptions">
- <xsl:choose>
- <xsl:when test="@headerDisplayOptions"><xsl:value-of select="@headerDisplayOptions"/></xsl:when>
- <xsl:otherwise>key('env-param', 'md.displayOptions')</xsl:otherwise>
- </xsl:choose>
- </xsl:variable>
- <out:variable name="showHeader" select="not({$headerDisplayOptions} and {$headerDisplayOptions} = 'h1')"/>
- <out:if test="$showHeader">
- <script type="text/javascript">
- function debug(e)
- {
- e = (e) ? e : ((window.event) ? window.event :"");
- if (e.altKey)
- {
- if (getSessionValue("debug") != "1") {
- setStateValue("debug", "1");
- } else {
- setStateValue("debug", "0");
- }
- location.reload();
- }
- }
- </script>
- <table border="0" width="100%" cellspacing="0" cellpadding="0" class="dialogHeader" summary="" role="presentation">
- <tr>
- <xsl:if test="dp:image">
- <td height="20" valign="middle" class="dialogHeaderTitle">
- <img alt="" height="10" width="3" border="0">
- <xsl:attribute name="src"><xsl:value-of select="'{$webcontent}'"/>/images/space.gif</xsl:attribute>
- </img>
- <xsl:copy-of select="dp:image/child::node()"/>
- <img alt="" height="10" width="5" border="0">
- <xsl:attribute name="src"><xsl:value-of select="'{$webcontent}'"/>/images/space.gif</xsl:attribute>
- </img>
- </td>
- </xsl:if>
- <td valign="top" class="dialogHeaderTitle" width="100%" nowrap="nowrap">
- <span onclick="debug(event)" role="presentation" id="dialogHeaderTitle"><xsl:copy-of select="dp:title/child::node()"/></span>
- </td>
- <!--xsl:if test="dp:headerLinks">
- <xsl:apply-templates select="dp:headerLinks" mode="links"/>
- </xsl:if-->
- <xsl:choose>
- <xsl:when test="not(./@help) or ./@help = string(true()) or ./@helpId or $useKBA11y">
- <td valign="middle" nowrap="nowrap" class="dialogHeaderLink">
- <out:variable name="s" select="concat(' ', /root/system/param[@name='ui_hide']/CC_DIALOG_HEADER_help/@show, ' ')"/>
- <out:if test="not(/root/system/param[@name='ui_hide']/CC_DIALOG_HEADER_help) or
- (/root/system/param[@name='ui_hide']/CC_DIALOG_HEADER_help[
- (contains($s , 'Administrators') and $isAdminUser) or
- (contains($s , 'QSUsers') and $hasFullQSCapability) or
- (contains($s , 'RSUsers') and $hasFullRSCapability) or
- (contains($s , 'Consumers') and $is-named='1') or
- (contains($s , 'Anonymous') and $is-named='0') or
- (key('system-param', 'ui_groups')/group[contains($s, concat(' ', @id, ' ')) and contains( key('session-param', 'uig'), concat(' ', @id, ' '))])
- ])">
- <a href="#" class="dialogHeaderLinkColor" onclick="javascript:help();">
- <xsl:if test="string(./@helpId)!='' or $useKBA11y">
- <xsl:if test="./@helpId">
- <out:if test="${./@helpId} != ''">
- <out:attribute name="id"><out:value-of select="${./@helpId}"/></out:attribute>
- </out:if>
- </xsl:if>
- <out:attribute name="onkeypress">javascript:if (event.keyCode==13 || event.keyCode==32 || event.charCode==32) <xsl:text>{ this.onclick(); return false; }</xsl:text> return true;</out:attribute>
- </xsl:if>
- <!-- Define onkeydown to trap the tab and shift+tab key since it does not fire the onkeypress (IE) -->
- <out:variable name="nextFocus"><xsl:copy-of select="./dp:focusidOnShiftTab"/></out:variable>
- <out:if test="$nextFocus !=''">
- <out:attribute name="onkeydown">javascript:if (event.keyCode==9 && event.shiftKey==true) <xsl:text>{</xsl:text> document.getElementById("<out:value-of select="$nextFocus"/>").focus(); return false; <xsl:text>}</xsl:text> return true;</out:attribute>
- </out:if>
- <xts:string id="IDS_HELP"/>
- </a>
- </out:if>
- </td>
- </xsl:when>
- <xsl:otherwise>
- <xsl:for-each select="./dp:newlink">
- <td valign="middle" class="dialogHeaderLink" nowrap="nowrap">
- <xsl:choose>
- <xsl:when test="@wrap"/>
- <xsl:otherwise><xsl:attribute name="nowrap">nowrap</xsl:attribute></xsl:otherwise>
- </xsl:choose>
- <xsl:text> </xsl:text><xsl:copy-of select="./child::node()"/>
- </td>
- </xsl:for-each>
- <xsl:if test="dp:newLinks">
- <xsl:apply-templates select="dp:newLinks/child::node()" mode="links"/>
- </xsl:if>
- </xsl:otherwise>
- </xsl:choose>
- <!-- Do not add and custom links to the log off dialog -->
- <out:if test="not(contains(/root/env/param[@name = 'm'], 'logoff.xts'))">
- <out:for-each select="key('system-param', 'ui_add')/CC_DIALOG_HEADER/item">
- <out:variable name="s" select="concat(' ', @show, ' ')"/>
- <out:if test="
- not(@show) or
- (contains($s , 'Administrators') and $isAdminUser) or
- (contains($s , 'QSUsers') and $userCanUseFullQS) or
- (contains($s , 'RSUsers') and $userCanUseFullRS) or
- (contains($s , 'Consumers') and $is-named='1') or
- (contains($s , 'Anonymous') and $is-named='0') or
- (key('system-param', 'ui_groups')/group[contains($s, concat(' ', @id, ' ')) and contains( key('session-param', 'uig'), concat(' ', @id, ' '))])
- ">
- <td valign="middle" nowrap="nowrap" class="dialogHeaderLink">
- <a class="dialogHeaderLinkColor" href="{'{url}'}">
- <out:if test="onclick">
- <out:attribute name="onclick"><out:value-of select="onclick"/></out:attribute>
- </out:if>
- <out:if test="target">
- <out:attribute name="target"><out:value-of select="target"/></out:attribute>
- </out:if>
- <out:value-of select="label[lang($productLocale)]"/>
- </a>
- </td>
- </out:if>
- </out:for-each>
- </out:if>
- <td align="right" valign="middle" style="padding-right:3px;">
- <xsl:if test="not(@close)">
- <xsl:choose>
- <xsl:when test="dp:close">
- <xsl:apply-templates select="dp:close/child::node()"/>
- </xsl:when>
- <xsl:otherwise>
- <!-- when a property dialog is read-only, we ALWAYS want to use the backURL -->
- <out:variable name="useBackURL">
- <xsl:choose>
- <xsl:when test="@useBackURL and @useBackURL != ''"><out:value-of select="{@useBackURL}"/></xsl:when>
- <xsl:otherwise><xsl:value-of select="false()"/></xsl:otherwise>
- </xsl:choose>
- </out:variable>
- <out:choose>
- <out:when test="$useBackURL='false' and (/root/env/param[@name = 'ps_nav_stack']) and not(/root/env/param[@name = 'ps_nav_stack'] = '') ">
- <utml:a utml:op="stack-down" id="IDS_CLOSE" utml:kbA11y="{$useKBA11y}" role="button">
- <img height="16" width="16" vspace="2" role="button" border="0" class="dialogClose" onmouseover="this.className = 'dialogCloseOver'" onmouseout="this.className = 'dialogClose'">
- <xsl:attribute name="src"><xsl:value-of select="'{$skin_images}'"/>close.gif</xsl:attribute>
- <out:attribute name="title"><xts:string id="IDS_CLOSE"/></out:attribute>
- <out:attribute name="alt"><xts:string id="IDS_CLOSE"/></out:attribute>
- </img>
- </utml:a>
- </out:when>
- <out:otherwise>
- <a id="headerIDS_CLOSE" role="button">
- <xsl:choose>
- <xsl:when test="$useKBA11y">
- <xsl:variable name="chkSpaceEnterKeyEvent">if (event.keyCode==13 || event.keyCode==32 || event.charCode==32)</xsl:variable>
- <out:attribute name="href">#</out:attribute>
- <out:attribute name="onclick">javascript:<out:text/>
- <out:choose>
- <!-- Handle modal mode scenarios -->
- <out:when test="/root/env/param[@name='md.callBack']">
- <out:choose>
- <out:when test="string(/root/env/param[@name='md.callBackMode']) = 'external'">
- <out:text/>window.external.ccModalCallBack('close', null);
- </out:when>
- <out:otherwise>
- <out:text/>window.opener && window.opener.ccModalCallBack ? window.opener.ccModalCallBack('close', null) : parent.ccModalCallBack('close', null);
- </out:otherwise>
- </out:choose>
- </out:when>
- <out:otherwise><out:text/>location.href="<out:value-of select="xtsext:javascriptencode(/root/env/param[@name = 'backURL'])"/>";</out:otherwise>
- </out:choose>
- </out:attribute>
- <out:attribute name="onkeypress">javascript:<xsl:value-of select="$chkSpaceEnterKeyEvent"/> <xsl:text>{</xsl:text> this.onclick(); return false;<xsl:text>}</xsl:text> return true;</out:attribute>
- </xsl:when>
- <xsl:otherwise>
- <out:attribute name="href">
- <out:choose>
- <!-- Handle modal mode scenarios -->
- <out:when test="/root/env/param[@name='md.callBack']">
- <out:choose>
- <out:when test="string(/root/env/param[@name='md.callBackMode']) = 'external'">
- <out:text/>javascript:window.external.ccModalCallBack('close', null)
- </out:when>
- <out:otherwise>
- <out:text/>javascript:window.opener && window.opener.ccModalCallBack ? window.opener.ccModalCallBack('close', null) : parent.ccModalCallBack('close', null)
- </out:otherwise>
- </out:choose>
- </out:when>
- <out:otherwise><out:value-of select="xtsext:htmlencode(/root/env/param[@name = 'backURL'])"/></out:otherwise>
- </out:choose>
- </out:attribute>
- </xsl:otherwise>
- </xsl:choose>
- <img height="16" width="16" vspace="2" border="0" class="dialogClose" onmouseover="this.className = 'dialogCloseOver'" onmouseout="this.className = 'dialogClose'" role="button">
- <xsl:attribute name="src"><xsl:value-of select="'{$skin_images}'"/>close.gif</xsl:attribute>
- <out:attribute name="title"><xts:string id="IDS_CLOSE"/></out:attribute>
- <out:attribute name="alt"><xts:string id="IDS_CLOSE"/></out:attribute>
- </img>
- </a>
- </out:otherwise>
- </out:choose>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:if>
- </td>
- </tr>
- </table>
- </out:if>
- <out:choose>
- <out:when test="$divAttr_h='true' and $useDIVS_h='true' ">
- <out:choose>
- <out:when test="$browser='moz'">
- <out:text disable-output-escaping="yes"><div id="dw" class="dialogScrollPaneOther"></out:text>
- </out:when>
- <out:otherwise>
- <out:text disable-output-escaping="yes"><table width="100%" height="80%" cellspacing="0" cellpadding="0"></out:text>
- <out:text disable-output-escaping="yes"><tr><td ></out:text>
- <out:choose>
- <out:when test="$browser = 'safari' ">
- <out:text disable-output-escaping="yes"><div id="dw" class="dialogScrollPaneSafari"></out:text>
- </out:when>
- <out:otherwise>
- <out:text disable-output-escaping="yes"><div id="dw" class="dialogScrollPane"></out:text>
- </out:otherwise>
- </out:choose>
- </out:otherwise>
- </out:choose>
- </out:when>
- <out:otherwise>
- </out:otherwise>
- </out:choose>
- <xsl:if test="dp:description or dp:headerLinks">
- <table border="0" width="100%" cellspacing="0" cellpadding="0" style="padding-left:5px;" summary="" role="presentation">
- <tr>
- <xsl:if test="dp:description ">
- <td class="dialogHeaderText">
- <xsl:if test="dp:description/@aria-labelledby">
- <xsl:attribute name="aria-labelledby"><xsl:value-of select="dp:description/@aria-labelledby"/></xsl:attribute>
- </xsl:if>
- <xsl:if test="dp:description/@nowrap"><xsl:attribute name="nowrap">nowrap</xsl:attribute></xsl:if>
- <xsl:choose>
- <xsl:when test="dp:description/dp:descriptionText">
- <div style="width: 100%">
- <div style="left: 10px; float: left; width: 50%;"><xsl:copy-of select="dp:description/dp:descriptionText/child::node()"/></div>
- <div style="right: 0px;float: right; width: 40%;text-align: right;padding-right: 5px">
- <xsl:copy-of select="dp:description/dp:descriptionLink/child::node()"/>
- </div>
- </div>
- </xsl:when>
- <xsl:otherwise><xsl:copy-of select="dp:description/child::node()"/></xsl:otherwise>
- </xsl:choose>
- </td>
- </xsl:if>
- <!-- ******** -->
- <!-- IF THE DESIGN CHANGES TO MOVE THE LINKS from the SCROLLABLE SECTION of the dialog TO the FIXED header bar SECTION -->
- <!-- REMOVE following section -->
- <xsl:if test="dp:headerLinks">
- <td width="10" valign="middle">
- <img width="10" alt="">
- <xsl:attribute name="src"><xsl:value-of select="'{$webcontent}'"/>/images/space.gif</xsl:attribute>
- </img>
- </td>
- <td align="right" valign="top">
- <table border="0" cellpadding="0" cellspacing="0" summary="" role="presentation">
- <tr>
- <xsl:apply-templates select="dp:headerLinks/child::node()" mode="links">
- <xsl:with-param name="va" select="'top'"/>
- </xsl:apply-templates>
- </tr>
- </table>
- </td>
- </xsl:if>
- <!-- REMOVE previous section -->
- <!-- IF THE DESIGN CHANGES TO MOVE THE LINKS from the SCROLLABLE SECTION of the dialog TO the FIXED header bar SECTION -->
- <!-- ******** -->
- </tr>
- </table>
- <xsl:if test="not(//a[@id='maincontent']) and @mainContentHandled != 'true'">
- <div id="maincontent" role="main" tabindex="-1" style="position:absolute; margin-left: -9999px; margin-top:-9999px" >
- <out:attribute name="aria-label"><xts:string id="IDS_SECTION508_CONTENT" encode="html" /></out:attribute>
- </div>
- </xsl:if>
- </xsl:if>
- </xsl:template>
- <xsl:template match="dp:headerLinkInactive" mode="links" priority="2">
- <xsl:param name="va" select="'middle'"/>
- <td valign="{$va}" nowrap="nowrap" class="dialogHeaderLink" align="right">
- <xsl:apply-templates select="./child::node()"/>
- </td>
- </xsl:template>
- <xsl:template match="dp:headerLink" mode="links" priority="2">
- <xsl:param name="va" select="'middle'"/>
- <td valign="{$va}" nowrap="nowrap" class="dialogSubHeaderAnchorContainer" align="right">
- <a>
- <xsl:apply-templates select="dp:hl_attribute" mode="links"/>
- </a>
- </td>
- </xsl:template>
- <xsl:template match="dp:hl_attribute" mode="links" priority="2">
- <xsl:variable name="att" select="@name"/>
- <xsl:choose>
- <xsl:when test="$att != 'label'">
- <out:attribute name="{$att}"><xsl:copy-of select="."/></out:attribute>
- </xsl:when>
- <xsl:otherwise>
- <xsl:copy-of select="child::node()"/>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:template>
- <!--
- dp:inactiveText - allows you to make any text inactive
- -->
- <xsl:template match="dp:inactiveText">
- <span class="inactiveText"><xsl:copy-of select="child::node()"/></span>
- </xsl:template>
- <!--
- dp:inactiveHRef - allows you to make any href text inactive
- -->
- <xsl:template match="dp:inactiveHRef">
- <span class="inactiveHRef"><xsl:copy-of select="child::node()"/></span>
- </xsl:template>
- <!--
- dp:input -2 sections first for the label - second for the input bax
- -->
- <xsl:template match="dp:input">
- <table summary="" border="0" cellspacing="0" cellpadding="1" role="presentation">
- <xsl:for-each select="*[self::dp:section1]">
- <tr>
- <xsl:if test="@aria-labelledby">
- <xsl:attribute name="aria-labelledby"><xsl:value-of select="@aria-labelledby"/></xsl:attribute>
- </xsl:if>
- <td nowrap="nowrap">
- <div class="formLabel">
- <xsl:if test="@id">
- <xsl:attribute name="id"><xsl:value-of select="@id"/></xsl:attribute>
- </xsl:if>
- <xsl:choose>
- <xsl:when test="@for">
- <label>
- <xsl:attribute name="for">
- <xsl:value-of select="@for"/>
- </xsl:attribute>
- <xsl:apply-templates select="child::node()"/>
- </label>
- </xsl:when>
- <xsl:otherwise>
- <xsl:apply-templates select="child::node()"/>
- </xsl:otherwise>
- </xsl:choose>
- </div>
- </td>
- </tr>
- <tr>
- <td>
- <xsl:apply-templates select="following-sibling::*[1]/child::node()"/>
- </td>
- <xsl:if test="count(following-sibling::*)>1">
- <xsl:apply-templates select="following-sibling::*[2]/child::node()"/>
- </xsl:if>
- </tr>
- <tr>
- <td nowrap="nowrap">
- </td>
- </tr>
- </xsl:for-each>
- </table>
- </xsl:template>
- <!--
- dp:label
- -->
- <xsl:template match="dp:label">
- <xsl:variable name="label">
- <xsl:copy-of select="child::node()"/><xsl:if test="not(@nospace)">   </xsl:if>
- </xsl:variable>
- <xsl:choose>
- <xsl:when test="@for">
- <label>
- <xsl:attribute name="for">
- <xsl:value-of select="@for"/>
- </xsl:attribute>
- <xsl:copy-of select="$label"/>
- </label>
- </xsl:when>
- <xsl:when test="@id">
- <span>
- <xsl:attribute name="id">
- <xsl:value-of select="@id"/>
- </xsl:attribute>
- <xsl:copy-of select="$label"/>
- </span>
- </xsl:when>
- <xsl:otherwise>
- <xsl:copy-of select="$label"/>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:template>
- <!--
- dp:tabs
- -->
- <xsl:template match="dp:tabs">
- <xsl:copy-of select="child::node()"/>
- </xsl:template>
- <!--
- dp:link
- -->
- <xsl:template match="dp:link">
- <xsl:apply-templates/>
- </xsl:template>
- <!--
- dp:list
- -1 section usually had text then a link to change the value
- -->
- <xsl:template match="dp:list">
- <table border="0" cellspacing="0">
- <xsl:attribute name="cellpadding">
- <xsl:choose>
- <xsl:when test="@padding"><xsl:value-of select="@padding"/></xsl:when>
- <xsl:otherwise>1</xsl:otherwise>
- </xsl:choose>
- </xsl:attribute>
- <xsl:attribute name="role">
- <xsl:choose>
- <xsl:when test="@role"><xsl:value-of select="@role"/></xsl:when>
- <xsl:when test="not(@role) and @title != ''">group</xsl:when>
- <xsl:otherwise>presentation</xsl:otherwise>
- </xsl:choose>
- </xsl:attribute>
- <xsl:if test="@width">
- <xsl:attribute name="width"><xsl:value-of select="@width"/></xsl:attribute>
- </xsl:if>
- <xsl:if test="@valign">
- <xsl:attribute name="valign"><xsl:value-of select="@valign"/></xsl:attribute>
- </xsl:if>
- <xsl:if test="@align">
- <xsl:attribute name="align"><xsl:value-of select="@align"/></xsl:attribute>
- </xsl:if>
- <xsl:if test="@tabindex">
- <xsl:attribute name="tabindex"><xsl:value-of select="@tabindex"/></xsl:attribute>
- </xsl:if>
- <xsl:if test="@id">
- <xsl:attribute name="id"><xsl:value-of select="@id"/></xsl:attribute>
- </xsl:if>
- <xsl:if test="not(@role) and @title != ''">
- <out:attribute name="aria-label"><xts:string id="{@title}" encode="html"/></out:attribute>
- </xsl:if>
- <xsl:if test="@title">
- <tr>
- <td nowrap="nowrap" colspan="2" class="formLabel">
- <xsl:if test="@title-id">
- <xsl:attribute name="id"><xsl:value-of select="@title-id"/></xsl:attribute>
- </xsl:if>
- <xsl:choose>
- <xsl:when test="@for">
- <label id="{@title}_{@parentTitle}">
- <xsl:attribute name="for">
- <xsl:value-of select="@for"/>
- </xsl:attribute>
- <xts:string id="{@title}"/>
- </label>
- </xsl:when>
- <xsl:otherwise>
- <xts:string id="{@title}"/>
- </xsl:otherwise>
- </xsl:choose>
- </td>
- </tr>
- </xsl:if>
- <xsl:apply-templates mode="list"/>
- </table>
- </xsl:template>
- <!--
- dp:message -2 sections first for the image - second for the message
- -->
- <xsl:template match="dp:message">
- <table border="0" cellspacing="0" cellpadding="1">
- <tr>
- <td nowrap="nowrap" valign="top">
- <xsl:copy-of select="dp:image/child::node()"/>
- </td>
- <td class="messageText">
- <xsl:copy-of select="dp:messageText/child::node()"/>
- </td>
- </tr>
- </table>
- </xsl:template>
- <!--
- dp:page - hold entire page from open body tag to close
- -->
- <xsl:template match="dp:page">
- <xsl:if test="@getRidOfDoctype = false()">
- <out:text disable-output-escaping='yes'><!DOCTYPE html></out:text>
- </xsl:if>
- <html>
- <out:attribute name="lang">
- <out:choose>
- <out:when test="/root/session">
- <out:value-of select="/root/session/param[@name='productLocale']"/>
- </out:when>
- <out:when test="/root/http">
- <out:value-of select="/root/http/param[@name='HTTP_ACCEPT_LANGUAGE']"/>
- </out:when>
- <out:otherwise>
- <out:value-of select="''"/>
- </out:otherwise>
- </out:choose>
- </out:attribute>
- <out:if test="$is-ui-rtl">
- <out:attribute name="class">rtl</out:attribute>
- </out:if>
- <head>
- <xsl:if test="dp:meta">
- <xsl:copy-of select="dp:meta/child::node()"/>
- </xsl:if>
- <!-- add caching prevention instructions as required -->
- <xsl:if test="@cache = 'false'">
- <meta http-equiv="expires" content="0"/>
- </xsl:if>
- <title>
- <xsl:if test="@title">
- <xts:string id="{@title}"/>
- </xsl:if>
- <xsl:if test="@longTitle">
- <out:value-of select="{@longTitle}"/>
- </xsl:if>
- </title>
- <link rel="stylesheet" type="text/css">
- <out:attribute name="href">
- <xsl:choose>
- <!-- a morphlet can specify its own stylesheet. @stylesheet must contain a full path to the desired stylesheet. -->
- <xsl:when test="@stylesheet">
- <out:value-of select="@stylesheet"/>
- </xsl:when>
- <xsl:otherwise>
- <out:value-of select="$skin_style"/>
- </xsl:otherwise>
- </xsl:choose>
- </out:attribute>
- </link>
- <link rel="stylesheet" type="text/css" href="{'{$skin_fonts}'}"/>
- <xsl:if test="dp:script">
- <xsl:copy-of select="dp:script/child::node()"/>
- </xsl:if>
- </head>
- <!-- temporary theme selector, this will go on all match thms to switch using a url parameter -->
- <!-- define a function to call other that init() if required -->
- <xsl:variable name="initFunction">
- <xsl:choose>
- <xsl:when test="@initFunction"><xsl:value-of select="@initFunction"/></xsl:when>
- <xsl:otherwise><xsl:text>init</xsl:text></xsl:otherwise>
- </xsl:choose>
- </xsl:variable>
- <out:variable name="headerTitle"><xsl:copy-of select=".//dp:header/dp:title/*"/></out:variable>
- <body onload="if (window.{$initFunction}) {$initFunction}();" >
- <xsl:attribute name="topmargin">3</xsl:attribute>
- <xsl:attribute name="bottommargin">0</xsl:attribute>
- <xsl:attribute name="marginheight">3</xsl:attribute>
- <xsl:attribute name="rightmargin">3</xsl:attribute>
- <xsl:attribute name="leftmargin">3</xsl:attribute>
- <xsl:attribute name="marginwidth">3</xsl:attribute>
- <!-- allows the template coder to explicitly specify the role -->
- <xsl:choose>
- <xsl:when test="@role">
- <xsl:attribute name="role"><xsl:value-of select="@role"/></xsl:attribute>
- </xsl:when>
- <xsl:otherwise>
- <xsl:attribute name="role">region</xsl:attribute>
- <out:if test="true()">
- <out:variable name="pageLabel"><xsl:copy-of select="dp:pageLabel/*"/></out:variable>
- <out:if test="($headerTitle != '' or '{@longTitle}' != '') and $pageLabel =''">
- <out:attribute name="aria-labelledby">dialogHeaderTitle</out:attribute>
- </out:if>
- </out:if>
- </xsl:otherwise>
- </xsl:choose>
- <out:if test="true()">
- <out:variable name="pageLabel"><xsl:copy-of select="dp:pageLabel/*"/></out:variable>
- <out:if test="$pageLabel !='' ">
- <out:attribute name="aria-labelledby">bodyRoleLabel</out:attribute>
- </out:if>
- </out:if>
- <out:if test="$browser = 'ie'">
- <out:attribute name="style">overflow:auto</out:attribute>
- </out:if>
- <out:attribute name="class">
- <xsl:if test="@class"><xsl:value-of select="concat(@class,' ')"/></xsl:if>
- <out:choose>
- <out:when test="/root/env/param[@name='md.callBack']">body_dialog_modal</out:when>
- <out:otherwise>dialogBody</out:otherwise>
- </out:choose>
- </out:attribute>
- <out:if test="$is-ui-rtl">
- <out:attribute name="dir">rtl</out:attribute>
- </out:if>
- <out:if test="true()">
- <out:variable name="pageLabel"><xsl:copy-of select="dp:pageLabel/*"/></out:variable>
- <out:if test="$pageLabel !=''">
- <span id="bodyRoleLabel" style="position: absolute;margin-left: -9999px; margin-top: -9999px; "><out:value-of select="$pageLabel"/></span>
- </out:if>
- </out:if>
- <!-- apply templates to whatever is in the page tag -->
- <a href="#maincontent" tabindex="0" class="showOnFocus"><xts:string id="IDS_SECTION508_JUMPTOMAIN"/></a>
- <xsl:if test=".//cp:tabset[@id='maintabs']">
- <a href="#maintabs" tabindex="0" class="showOnFocus"><xts:string id="IDS_SECTION508_JUMPTOTABS"/></a>
- </xsl:if>
-
- <xsl:apply-templates select="*[not(self::dp:meta) and not(self::dp:script) and not(self::dp:pageLabel)]"/>
- </body>
- </html>
- </xsl:template>
- <!--
- dp:section - list sections are rows
- -->
- <xsl:template match="dp:section" mode="list" priority="2">
- <xsl:variable name="useKBA11y" select="string(@dp:kbA11y)='true'"/>
- <tr>
- <xsl:if test="@role">
- <xsl:attribute name="role"><xsl:value-of select="@role"/></xsl:attribute>
- </xsl:if>
- <xsl:if test="@aria-labelledby">
- <xsl:attribute name="aria-labelledby"><xsl:value-of select="@aria-labelledby"/></xsl:attribute>
- </xsl:if>
- <xsl:if test="@id">
- <xsl:attribute name="id"><xsl:value-of select="@id"/></xsl:attribute>
- </xsl:if>
- <xsl:for-each select="*">
- <td>
- <xsl:if test="@aria-labelledby">
- <xsl:attribute name="aria-labelledby"><xsl:value-of select="@aria-labelledby"/></xsl:attribute>
- </xsl:if>
- <xsl:if test="@width">
- <xsl:attribute name="width"><xsl:value-of select="@width"/></xsl:attribute>
- </xsl:if>
- <xsl:if test="@height">
- <xsl:attribute name="height"><xsl:value-of select="@height"/></xsl:attribute>
- </xsl:if>
- <xsl:if test="@align">
- <xsl:attribute name="align"><xsl:value-of select="@align"/></xsl:attribute>
- </xsl:if>
- <xsl:if test="@valign">
- <xsl:attribute name="valign"><xsl:value-of select="@valign"/></xsl:attribute>
- </xsl:if>
- <xsl:if test="@colspan">
- <xsl:attribute name="colspan"><xsl:value-of select="@colspan"/></xsl:attribute>
- </xsl:if>
- <xsl:if test="@tabindex">
- <xsl:attribute name="tabindex"><xsl:value-of select="@tabindex"/></xsl:attribute>
- </xsl:if>
- <xsl:choose>
- <xsl:when test="@wrap"/>
- <xsl:otherwise>
- <xsl:attribute name="nowrap">nowrap</xsl:attribute>
- </xsl:otherwise>
- </xsl:choose>
- <xsl:attribute name="class">
- <xsl:choose>
- <xsl:when test="@tdClass"><xsl:value-of select="@tdClass"/></xsl:when>
- <xsl:when test="self::dp:label">formLabel</xsl:when>
- <xsl:when test="self::dp:link">formLink</xsl:when>
- <xsl:when test="self::dp:hint">dialogHintText</xsl:when>
- <xsl:otherwise>formText</xsl:otherwise>
- </xsl:choose>
- </xsl:attribute>
- <xsl:apply-templates select="self::*"/>
- </td>
- </xsl:for-each>
- </tr>
- </xsl:template>
- <!--
- dp:section1 - first and second part in a choice block
- -->
- <xsl:template match="dp:section1" mode="choice" priority="2">
- <xsl:variable name="section2" select="following-sibling::*[1]"/>
- <tr>
- <xsl:if test="@tabindex">
- <xsl:attribute name="tabindex"><xsl:value-of select="@tabindex"/></xsl:attribute>
- </xsl:if>
- <td style3="font-size: 100%;">
- <xsl:choose>
- <xsl:when test="@wrap"/>
- <xsl:otherwise>
- <xsl:attribute name="nowrap">nowrap</xsl:attribute>
- </xsl:otherwise>
- </xsl:choose>
- <xsl:if test="@valign">
- <xsl:attribute name="valign"><xsl:value-of select="@valign"/></xsl:attribute>
- </xsl:if>
- <xsl:attribute name="class">
- <xsl:choose>
- <xsl:when test="@tdClass"><xsl:value-of select="@tdClass"/></xsl:when>
- <xsl:when test="@type='label'">formLabel</xsl:when>
- <xsl:when test="@type='hint'">dialogHintText</xsl:when>
- <xsl:otherwise>formText</xsl:otherwise>
- </xsl:choose>
- </xsl:attribute>
- <xsl:choose>
- <xsl:when test="@for">
- <label>
- <xsl:attribute name="for">
- <xsl:value-of select="@for"/>
- </xsl:attribute>
- <xsl:apply-templates select="child::node()"/>
- </label>
- </xsl:when>
- <xsl:otherwise>
- <xsl:apply-templates select="child::node()"/>
- </xsl:otherwise>
- </xsl:choose>
- </td>
- <td>
- <xsl:choose>
- <xsl:when test="@wrap"/>
- <xsl:otherwise>
- <xsl:attribute name="nowrap">nowrap</xsl:attribute>
- </xsl:otherwise>
- </xsl:choose>
- <xsl:if test="@valign">
- <xsl:attribute name="valign"><xsl:value-of select="@valign"/></xsl:attribute>
- </xsl:if>
- <xsl:if test="$section2/@id">
- <xsl:attribute name="id"><xsl:value-of select="$section2/@id"/></xsl:attribute>
- </xsl:if>
- <xsl:attribute name="class">
- <xsl:choose>
- <xsl:when test="$section2/@type='label'">formLabel</xsl:when>
- <xsl:when test="$section2/@type='hint'">dialogHintText</xsl:when>
- <xsl:otherwise>formText</xsl:otherwise>
- </xsl:choose>
- </xsl:attribute>
- <xsl:choose>
- <xsl:when test="$section2/@for">
- <label>
- <xsl:attribute name="for">
- <xsl:value-of select="$section2/@for"/>
- </xsl:attribute>
- <xsl:apply-templates select="$section2/child::node()"/>
- </label>
- </xsl:when>
- <xsl:otherwise>
- <xsl:apply-templates select="$section2/child::node()"/>
- </xsl:otherwise>
- </xsl:choose>
- </td>
- </tr>
- </xsl:template>
- <!--
- dp:section2 - take out the section2 of a choice
- -->
- <xsl:template match="dp:section2" mode="choice" priority="2"/>
- <!--
- dp:section3 - third section in a choice
- -->
- <xsl:template match="dp:section3" mode="choice" priority="2">
- <tr>
- <xsl:if test="not(@nospace)">
- <td nowrap="nowrap">
- <img height="1" width="5" alt="">
- <xsl:attribute name="src"><xsl:value-of select="'{$webcontent}'"/>/images/space.gif</xsl:attribute>
- </img>
- </td>
- </xsl:if>
- <xsl:if test="(@nospace)"><td/></xsl:if>
- <td>
-
- <xsl:if test="@width">
- <xsl:attribute name="width"><xsl:value-of select="@width"/></xsl:attribute>
- </xsl:if>
- <xsl:attribute name="class">
- <xsl:choose>
- <xsl:when test="not(@tdClass)">formText</xsl:when>
- <xsl:otherwise><xsl:value-of select="@tdClass"/></xsl:otherwise>
- </xsl:choose>
- </xsl:attribute>
- <xsl:apply-templates select="child::*"/>
- </td>
- </tr>
- </xsl:template>
- <!--
- dp:script - take out the script, it was just for the header
- -->
- <xsl:template match="dp:script"/>
- <!--
- dp:text
- -->
- <xsl:template match="dp:text">
- <xsl:copy-of select="child::node()"/><xsl:if test="not(@nospace)">   </xsl:if>
- </xsl:template>
- <!--
- dp:hint
- -->
- <xsl:template match="dp:hint">
- <xsl:copy-of select="child::node()"/>
- </xsl:template>
- <!--
- dp:textarea
- -3 sections first for the label - second for the textarea - this is the bottom link
- -->
- <xsl:template match="dp:textarea">
- <xsl:variable name="section3_align">
- <xsl:choose>
- <xsl:when test="@section3_align">
- <xsl:value-of select="@section3_align"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="'right'"/>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:variable>
- <xsl:variable name="wrap">
- <xsl:choose>
- <xsl:when test="@wrap"><xsl:value-of select="'true'"/></xsl:when>
- <xsl:otherwise><xsl:value-of select="'false'"/></xsl:otherwise>
- </xsl:choose>
- </xsl:variable>
- <table border="0" cellspacing="0" cellpadding="1" role="presentation">
- <!-- If a class attribute exists then use it otherwise check for a style-->
- <xsl:choose>
- <xsl:when test="@class">
- <xsl:attribute name="class">
- <xsl:value-of select="@class"/>
- </xsl:attribute>
- </xsl:when>
- <xsl:when test="@style">
- <xsl:attribute name="style">
- <xsl:value-of select="@style"/>
- </xsl:attribute>
- </xsl:when>
- </xsl:choose>
- <xsl:for-each select="*[self::dp:section1]">
- <tr>
- <td nowrap="nowrap" class="formLabel">
- <xsl:choose>
- <xsl:when test="@for">
- <label>
- <xsl:attribute name="for">
- <xsl:value-of select="@for"/>
- </xsl:attribute>
- <xsl:apply-templates select="child::node()"/>
- </label>
- </xsl:when>
- <xsl:otherwise>
- <xsl:apply-templates select="child::node()"/>
- </xsl:otherwise>
- </xsl:choose>
- </td>
- </tr>
- <tr>
- <td class="formText">
- <xsl:if test="$wrap='false'">
- <xsl:attribute name="nowrap">nowrap</xsl:attribute>
- </xsl:if>
- <div>
- <xsl:apply-templates select="following-sibling::*[1]/child::node()"/>
- </div>
- </td>
- </tr>
- <tr>
- <td class="formLink" nowrap="nowrap">
- <xsl:attribute name="align">
- <xsl:value-of select="$section3_align"/>
- </xsl:attribute>
- <xsl:apply-templates select="following-sibling::*[2]/child::node()"/>
- </td>
- </tr>
- </xsl:for-each>
- </table>
- </xsl:template>
- <!-- create a template for making the links at the bottom of the text area -->
- <xsl:template match="dp:actions">
- <xsl:choose>
- <xsl:when test="count(dp:action) = 1">
- <img height="1" width="1" alt="">
- <xsl:attribute name="src"><xsl:value-of select="'{$webcontent}'"/>/images/space.gif</xsl:attribute>
- </img>
- <xsl:apply-templates select="dp:action/*"/>
- <img height="1" width="1" alt="">
- <xsl:attribute name="src"><xsl:value-of select="'{$webcontent}'"/>/images/space.gif</xsl:attribute>
- </img>
- </xsl:when>
- <xsl:otherwise>
- <img height="1" width="1" alt="">
- <xsl:attribute name="src"><xsl:value-of select="'{$webcontent}'"/>/images/space.gif</xsl:attribute>
- </img>
- <xsl:for-each select="dp:action">
- <xsl:if test="position()!=1">
- <img height="1" width="10" alt="">
- <out:attribute name="src"><out:value-of select="$webcontent"/>/images/space.gif</out:attribute>
- </img>
- </xsl:if>
- <xsl:apply-templates/>
- </xsl:for-each>
- <img height="1" width="1" alt="">
- <xsl:attribute name="src"><xsl:value-of select="'{$webcontent}'"/>/images/space.gif</xsl:attribute>
- </img>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:template>
- <!--
- * - This next template is required to copy all other elements into the result.
- -->
- <xsl:template match="*" mode="links" priority="1">
- <xsl:param name="va" select="'middle'"/>
- <xsl:copy>
- <xsl:copy-of select="@*"/>
- <xsl:apply-templates mode="links">
- <xsl:with-param name="va" select="$va"/>
- </xsl:apply-templates>
- </xsl:copy>
- </xsl:template>
- <!--
- * - This next template is required to copy all other elements into the result.
- -->
- <xsl:template match="*" mode="choice" priority="1">
- <xsl:copy>
- <xsl:copy-of select="@*"/>
- <xsl:apply-templates mode="choice"/>
- </xsl:copy>
- </xsl:template>
- <!--
- * - This next template is required to copy all other elements into the result.
- -->
- <xsl:template match="*" mode="list" priority="1">
- <xsl:copy>
- <xsl:copy-of select="@*"/>
- <xsl:apply-templates mode="list"/>
- </xsl:copy>
- </xsl:template>
- <!--
- * - This next template is required to copy all other elements into the result.
- -->
- <xsl:template match="*">
- <xsl:copy>
- <xsl:copy-of select="@*"/>
- <xsl:apply-templates/>
- </xsl:copy>
- </xsl:template>
- </xsl:stylesheet>
|