home *** CD-ROM | disk | FTP | other *** search
/ ftp.tcs3.com / ftp.tcs3.com.tar / ftp.tcs3.com / DRIVERS / Audio / Office2010 / InfoPath.en-us / InfLR.cab / IPDSINTL.DLL_1033 / HTML / DATATABLE.XCT < prev    next >
Extensible Markup Language  |  2010-03-29  |  7KB  |  1 lines

  1. ∩╗┐<?xml version="1.0" encoding="UTF-8"?><!-- _lcid="1033" _version="" --><!-- _LocalBinding --><xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xd="http://schemas.microsoft.com/office/infopath/2003"><xsl:output method="html"></xsl:output><xsl:param name="XPath"></xsl:param><xsl:param name="NodeList"></xsl:param><xsl:param name="IsSecondaryDS"></xsl:param><xsl:param name="fInsertAsMaster"></xsl:param><xsl:param name="fInsertAsDetail"></xsl:param><xsl:variable name="fConvert" select="xd:aj_getPropByName('fConvert')"></xsl:variable><xsl:variable name="fLabelAutoGeneration" select="xd:aj_getPropByName('labelAutoGeneration')"></xsl:variable><xsl:variable name="fAutoCMEMode" select="xd:aj_getPropByName('fAutoCMEMode')"></xsl:variable><xsl:variable name="fSimpleContent" select="xd:aj_getPropByName('fIsSimpleContent')"></xsl:variable><xsl:variable name="fXHTMLContent" select="xd:aj_getPropByName('fXHTMLContent')"></xsl:variable><xsl:variable name="fLeafNode" select="xd:aj_getPropByName('fIsLeafNode')"></xsl:variable><xsl:variable name="cMasterColumnsToInsert" select="xd:aj_getPropByName('cMasterColumnsToInsert')"></xsl:variable><xsl:variable name="sMasterName" select="xd:aj_getPropByName('masterName')"></xsl:variable><xsl:variable name="MaxColumnCount" select="number(64)"></xsl:variable><xsl:variable name="AbsoluteMaximumColumns"><xsl:choose><xsl:when test="$fInsertAsMaster and not($fConvert)"><xsl:value-of select="$cMasterColumnsToInsert + 1"></xsl:value-of></xsl:when><xsl:otherwise><xsl:value-of select="$MaxColumnCount"></xsl:value-of></xsl:otherwise></xsl:choose></xsl:variable><xsl:template match="*"><xsl:if test="$XPath"><xsl:call-template name="BuildTable"><xsl:with-param name="Rows" select="$NodeList"></xsl:with-param></xsl:call-template></xsl:if></xsl:template><xsl:template name="BuildTable"><xsl:param name="Rows"></xsl:param><TABLE CLASS="xdRepeatingTable" BORDER="1" xd:aj_indocui_tabIndex="0" TITLE=""><xsl:attribute name="STYLE"><xsl:choose><xsl:when test="xd:aj_getPropByName('fTopLevelControl')">width:<xsl:value-of select="xd:aj_getPropByName('ViewWidth')"></xsl:value-of>;</xsl:when><xsl:otherwise>width:100%;</xsl:otherwise></xsl:choose></xsl:attribute><xsl:if test="not($IsSecondaryDS)"><xsl:attribute name="xd:aj_indocui_text"><!-- _locID_tags="DefaultRepeatingPlaceholderText" _locComment="The following text needs to be localized." -->Insert item</xsl:attribute></xsl:if><xsl:attribute name="xd:CtrlId"><xsl:choose><xsl:when test="$fInsertAsMaster"><xsl:value-of select="$sMasterName"></xsl:value-of></xsl:when><xsl:otherwise><xsl:value-of select="xd:aj_getComponentID()"></xsl:value-of></xsl:otherwise></xsl:choose></xsl:attribute><xsl:call-template name="BuildTableHeader"><xsl:with-param name="firstRow" select="$Rows[1]"></xsl:with-param></xsl:call-template><TBODY xd:aj_type="2" xd:xctname="RepeatingTable"><xsl:choose><xsl:when test="$fInsertAsMaster"><xsl:attribute name="xd:masterName"><xsl:value-of select="$sMasterName"></xsl:value-of></xsl:attribute></xsl:when><xsl:when test="$fInsertAsDetail and $fConvert"><xsl:attribute name="xd:linkedToMaster"><xsl:value-of select="$sMasterName"></xsl:value-of></xsl:attribute><xsl:attribute name="xd:aj_linkType"><xsl:value-of select="xd:aj_getPropByName('linkType')"></xsl:value-of></xsl:attribute><xsl:attribute name="xd:aj_masterIndex"><xsl:value-of select="xd:aj_getPropByName('MasterIndexXPath')"></xsl:value-of></xsl:attribute><xsl:attribute name="xd:aj_detailIndex"><xsl:value-of select="xd:aj_getPropByName('DetailIndexXPath')"></xsl:value-of></xsl:attribute></xsl:when></xsl:choose><xsl:attribute name="xd:aj_node"><xsl:value-of select="$XPath"></xsl:value-of></xsl:attribute><xsl:call-template name="BuildRow"><xsl:with-param name="Row" select="$Rows[1]"></xsl:with-param></xsl:call-template></TBODY></TABLE></xsl:template><xsl:template name="BuildTableHeader"><xsl:param name="firstRow"></xsl:param><TBODY CLASS="xdTableHeader"><TR><xsl:for-each select="$firstRow/@*[name() != 'xsi:type'] | $firstRow[not($fXHTMLContent)]/*"><xsl:if test="xd:aj_nodeCanBeRecursivelyApplied(.) and position() < $AbsoluteMaximumColumns"><TD style="Border-right: none; Border-left: none; text-align:center; padding: 1px 5px 1px 5px;"><DIV><h5 style="font-weight: normal"><strong><xsl:if test="$fLabelAutoGeneration and not($fAutoCMEMode)"><xsl:value-of disable-output-escaping="yes" select="xd:aj_getLabelHTML('plaintext', .)"></xsl:value-of></xsl:if></strong></h5></DIV></TD></xsl:if></xsl:for-each><xsl:if test="$fSimpleContent or $fXHTMLContent or $fLeafNode"><xsl:if test="(count($firstRow/@*[name() != 'xsi:type'] | $firstRow/*) + 1) < $AbsoluteMaximumColumns"><TD style="Border-right: none; Border-left: none; text-align:center; padding: 1px 5px 1px 5px;"><DIV><h5 style="font-weight: normal"><strong><xsl:if test="$fLabelAutoGeneration and not($fAutoCMEMode)"><xsl:value-of disable-output-escaping="yes" select="xd:aj_getLabelHTML('plaintext', .)"></xsl:value-of></xsl:if></strong></h5></DIV></TD></xsl:if></xsl:if></TR></TBODY></xsl:template><xsl:template name="BuildRow"><xsl:param name="Row"></xsl:param><TR xd:aj_type="3" xd:aj_uniqueid="{xd:aj_getNodeID($Row)}"><xsl:for-each select="$Row/@*[name() != 'xsi:type']"><xsl:if test="position() < $AbsoluteMaximumColumns"><xsl:call-template name="BuildCol"><xsl:with-param name="fAttribute" select="true()"></xsl:with-param></xsl:call-template></xsl:if></xsl:for-each><xsl:variable name="AttributesCount" select="count($Row/@*[name() != 'xsi:type'])"></xsl:variable><xsl:if test="not($fXHTMLContent)"><xsl:for-each select="$Row/*"><xsl:if test="xd:aj_nodeCanBeRecursivelyApplied(.) and (position() + $AttributesCount) < $AbsoluteMaximumColumns"><xsl:call-template name="BuildCol"><xsl:with-param name="fAttribute" select="false()"></xsl:with-param></xsl:call-template></xsl:if></xsl:for-each></xsl:if><xsl:variable name="ElementsCount" select="count($Row/*)"></xsl:variable><xsl:if test="$fSimpleContent or $fXHTMLContent or $fLeafNode"><xsl:if test="($AttributesCount + $ElementsCount + 1) < $AbsoluteMaximumColumns"><TD style="Border-right: none; Border-left: none; padding: 1px 5px 1px 5px;"><xsl:value-of disable-output-escaping="yes" select="xd:aj_getXHTMLforXMLNode($Row, '.', $NodeList)"></xsl:value-of></TD></xsl:if></xsl:if></TR></xsl:template><xsl:template name="BuildCol"><xsl:param name="fAttribute"></xsl:param><TD style="Border-right: none; Border-left: none; padding: 1px 5px 1px 5px;"><xsl:variable name="strSnifferSuggestion" select="xd:aj_getSuggestionForNode(., $NodeList)"></xsl:variable><xsl:if test="not($strSnifferSuggestion = 'digsig')"><xsl:choose><xsl:when test="$fAttribute"><xsl:value-of disable-output-escaping="yes" select="xd:aj_getXHTMLforComponent($strSnifferSuggestion, ., $NodeList, '')"></xsl:value-of></xsl:when><xsl:otherwise><xsl:variable name="nColumnCount" select="count(descendant::* | @*[name() != 'xsi:type'] | */@*[name() != 'xsi:type'])"></xsl:variable><xsl:choose><xsl:when test="$strSnifferSuggestion = 'repeatingtable' and  $nColumnCount > 5"><xsl:value-of disable-output-escaping="yes" select="xd:aj_getXHTMLforComponent('repeatingsectionfull', ., $NodeList, '')"></xsl:value-of></xsl:when><xsl:otherwise><xsl:value-of disable-output-escaping="yes" select="xd:aj_getXHTMLforComponent($strSnifferSuggestion, ., $NodeList, '')"></xsl:value-of></xsl:otherwise></xsl:choose></xsl:otherwise></xsl:choose></xsl:if></TD></xsl:template></xsl:stylesheet>