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
/
DROPDOWN.XCT
< prev
next >
Wrap
Extensible Markup Language
|
2010-03-29
|
6KB
|
1 lines
<?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:variable name="fConvert" select="xd:aj_getPropByName('fConvert')"></xsl:variable><xsl:variable name="fControlOnlyMode" select="xd:aj_getPropByName('fControlOnlyMode')"></xsl:variable><xsl:variable name="scriptingID" select="xd:aj_getComponentID()"></xsl:variable><xsl:variable name="xsdType" select="xd:aj_getPropByName('xsdType')"></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="fInsideDataTable" select="xd:aj_getPropByName('fInsideDataTable')"></xsl:variable><xsl:variable name="fInsideAnyTable" select="xd:aj_getPropByName('fInsideAnyTable')"></xsl:variable><xsl:variable name="componentName" select="xd:aj_getPropByName('componentName')"></xsl:variable><xsl:template match="*|@*"><xsl:variable name="defaultData" select="xd:aj_getPropByName('defaultData')"></xsl:variable><xsl:variable name="sampleData" select="."></xsl:variable><xsl:if test="$fLabelAutoGeneration and not($fAutoCMEMode) and not($fControlOnlyMode) and not($fConvert) and not($fInsideDataTable) and string($XPath) != ''"><xsl:value-of disable-output-escaping="yes" select="xd:aj_getLabelHTML('dropdown', .)"></xsl:value-of>:</xsl:if><SELECT CLASS="xdComboBox xdBehavior_Select" SIZE="1" TITLE="" xd:CtrlId="{$scriptingID}" xd:aj_bound0="value" xd:aj_if="selected" xd:aj_tabIndex="0" tabIndex="0"><xsl:attribute name="xd:xctname"><xsl:choose><xsl:when test="$componentName"><xsl:value-of select="$componentName"></xsl:value-of></xsl:when><xsl:otherwise>DropDown</xsl:otherwise></xsl:choose></xsl:attribute><xsl:attribute name="STYLE"><xsl:choose><xsl:when test="$fInsideAnyTable">width:100%;</xsl:when><xsl:otherwise>width:130px;</xsl:otherwise></xsl:choose></xsl:attribute><xsl:if test="$XPath"><xsl:attribute name="xd:aj_type">0</xsl:attribute><xsl:attribute name="xd:aj_attrtype_value">text</xsl:attribute><xsl:attribute name="xd:aj_uniqueid_value"><xsl:value-of select="xd:aj_getNodeID(.)"></xsl:value-of></xsl:attribute><xsl:attribute name="xd:aj_node_value"><xsl:value-of select="$XPath"></xsl:value-of></xsl:attribute><xsl:attribute name="value"><xsl:value-of select="$sampleData"></xsl:value-of></xsl:attribute><xsl:attribute name="xd:boundProp">value</xsl:attribute><xsl:attribute name="xd:binding"><xsl:value-of select="$XPath"></xsl:value-of></xsl:attribute><xsl:if test="$componentName = 'combobox'"><xsl:variable name="strDataFormatCategory" select="xd:aj_getPropByName('dataFormatCategory')"></xsl:variable><xsl:variable name="strDataFormatSpec" select="xd:aj_getPropByName('dataFormatSpec')"></xsl:variable><xsl:if test="$strDataFormatCategory != ''"><xsl:attribute name="xd:aj_helper">xdFormatting:formatString</xsl:attribute><xsl:attribute name="xd:aj_param">"<xsl:value-of select="$strDataFormatCategory"></xsl:value-of>","<xsl:value-of select="$strDataFormatSpec"></xsl:value-of>"</xsl:attribute><xsl:attribute name="xd:datafmt">"<xsl:value-of select="$strDataFormatCategory"></xsl:value-of>","<xsl:value-of select="$strDataFormatSpec"></xsl:value-of>"</xsl:attribute></xsl:if></xsl:if><xsl:variable name="fHasDataSourceInfo" select="xd:aj_getSecondaryDataSourceInfo(false(), .)"></xsl:variable><xsl:choose><xsl:when test="$fHasDataSourceInfo"><xsl:attribute name="xd:aj_node"><xsl:value-of select="xd:aj_getPropByName('dataSourceNodeValue')"></xsl:value-of></xsl:attribute><xsl:attribute name="xd:aj_unique">false</xsl:attribute><option><xsl:attribute name="value"></xsl:attribute><xsl:attribute name="selected">selected</xsl:attribute><xsl:attribute name="xd:aj_type">0</xsl:attribute><xsl:attribute name="xd:aj_node_value"><xsl:value-of select="xd:aj_getPropByName('valueField')"></xsl:value-of></xsl:attribute><xsl:attribute name="xd:aj_node_innerhtml"><xsl:value-of select="xd:aj_getPropByName('displayField')"></xsl:value-of></xsl:attribute></option></xsl:when><xsl:otherwise><xsl:variable name="enumValues" select="xd:aj_getEnumerationVals(.)"></xsl:variable><OPTION VALUE=""><xsl:choose><xsl:when test="$componentName='combobox'"><!-- _locID_text="BlankOptionDisplayTextWithoutSpaces" _locComment="{StringCategory=TXT}" -->Select or type...</xsl:when><xsl:otherwise><!-- _locID_text="BlankOptionDisplayTextWithoutSpaces" _locComment="{StringCategory=TXT}" -->Select...</xsl:otherwise></xsl:choose></OPTION><xsl:choose><xsl:when test="count($enumValues) > 0"><xsl:attribute name="xd:fixed">TRUE</xsl:attribute><xsl:for-each select="$enumValues"><OPTION><xsl:attribute name="VALUE"><xsl:value-of select="."></xsl:value-of></xsl:attribute><xsl:if test=". = $sampleData"><xsl:attribute name="SELECTED">SELECTED</xsl:attribute></xsl:if><xsl:value-of select="."></xsl:value-of></OPTION></xsl:for-each></xsl:when><xsl:when test="$xsdType = 'boolean'"><OPTION VALUE="true"><xsl:if test="$sampleData = 'true'"><xsl:attribute name="SELECTED">SELECTED</xsl:attribute></xsl:if><!-- _locID_text="Option_DisplayValue1" _locComment="{StringCategory=TXT}" -->true</OPTION><OPTION VALUE="false"><xsl:if test="$sampleData = 'false'"><xsl:attribute name="SELECTED">SELECTED</xsl:attribute></xsl:if><!-- _locID_text="Option_DisplayValue2" _locComment="{StringCategory=TXT}" -->false</OPTION><OPTION VALUE="1"><xsl:if test="$sampleData = '1'"><xsl:attribute name="SELECTED">SELECTED</xsl:attribute></xsl:if>1</OPTION><OPTION VALUE="0"><xsl:if test="$sampleData = '0'"><xsl:attribute name="SELECTED">SELECTED</xsl:attribute></xsl:if>0</OPTION></xsl:when><xsl:otherwise><xsl:if test="$defaultData != ''"><OPTION SELECTED="SELECTED"><xsl:attribute name="VALUE"><xsl:value-of select="$defaultData"></xsl:value-of></xsl:attribute><xsl:value-of select="$defaultData"></xsl:value-of></OPTION></xsl:if></xsl:otherwise></xsl:choose></xsl:otherwise></xsl:choose></xsl:if></SELECT></xsl:template></xsl:stylesheet>