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
/
CHECK_BOX.XCT
< prev
next >
Wrap
Extensible Markup Language
|
2010-03-29
|
5KB
|
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="xsdType" select="xd:aj_getPropByName('xsdType')"></xsl:variable><xsl:variable name="labelAutoGeneration" select="xd:aj_getPropByName('labelAutoGeneration')"></xsl:variable><xsl:variable name="scriptingID" select="xd:aj_getComponentID()"></xsl:variable><xsl:template match="*|@*"><xsl:variable name="typedOnValue"><xsl:choose><xsl:when test="$xsdType = 'string'"><!-- _locID_text="CheckBox_String_checkedvalue" _locComment="{StringCategory=TXT}" -->yes</xsl:when><xsl:when test="$xsdType = 'anyURI'"><!-- _locID_text="CheckBox_URI_checkedvalue" _locComment="{StringCategory=TXT}" -->http://checked</xsl:when><xsl:when test="$xsdType = 'boolean'"><xsl:choose><xsl:when test="(. = 'true') or (. = 'false') or (. = '')">true</xsl:when><xsl:when test="(. = '0') or (. = '1')">1</xsl:when></xsl:choose></xsl:when><xsl:when test="$xsdType = 'decimal' or $xsdType = 'float' or $xsdType = 'double' or $xsdType = 'integer'">1</xsl:when><xsl:otherwise></xsl:otherwise></xsl:choose></xsl:variable><xsl:variable name="typedOffValue"><xsl:choose><xsl:when test="$xsdType = 'string'"><!-- _locID_text="CheckBox_String_uncheckedvalue" _locComment="{StringCategory=TXT}" -->no</xsl:when><xsl:when test="$xsdType = 'anyURI'"><!-- _locID_text="CheckBox_URI_uncheckedvalue" _locComment="{StringCategory=TXT}" -->http://unchecked</xsl:when><xsl:when test="$xsdType = 'boolean'"><xsl:choose><xsl:when test="(. = 'true') or (. = 'false') or (. = '')">false</xsl:when><xsl:when test="(. = '0') or (. = '1')">0</xsl:when></xsl:choose></xsl:when><xsl:when test="$xsdType = 'decimal' or $xsdType = 'float' or $xsdType = 'double' or $xsdType = 'integer'">0</xsl:when><xsl:otherwise></xsl:otherwise></xsl:choose></xsl:variable><xsl:variable name="cenumValues"><xsl:choose><xsl:when test="$XPath"><xsl:value-of select="count(xd:aj_getEnumerationVals(.))"></xsl:value-of></xsl:when><xsl:otherwise><xsl:value-of select="number(0)"></xsl:value-of></xsl:otherwise></xsl:choose></xsl:variable><xsl:variable name="onValue"><xsl:choose><xsl:when test="$XPath = ''"><!-- _locID_text="CheckBox_Boolean_checkedvalue1" _locComment="{StringCategory=TXT}" -->true</xsl:when><xsl:when test="$cenumValues = 0"><xsl:value-of select="$typedOnValue"></xsl:value-of></xsl:when><xsl:otherwise><xsl:value-of select="xd:aj_getEnumerationVals(.)[1]"></xsl:value-of></xsl:otherwise></xsl:choose></xsl:variable><xsl:variable name="offValue"><xsl:choose><xsl:when test="$XPath = ''"><!-- _locID_text="CheckBox_Boolean_uncheckedvalue1" _locComment="{StringCategory=TXT}" -->false</xsl:when><xsl:when test="$cenumValues = 0"><xsl:value-of select="$typedOffValue"></xsl:value-of></xsl:when><xsl:when test="$cenumValues = 1"><xsl:value-of select="xd:aj_getEnumerationVals(.)[1]"></xsl:value-of></xsl:when><xsl:otherwise><xsl:value-of select="xd:aj_getEnumerationVals(.)[2]"></xsl:value-of></xsl:otherwise></xsl:choose></xsl:variable><INPUT TYPE="CheckBox" CLASS="xdBehavior_Boolean" TITLE="" xd:CtrlId="{$scriptingID}" xd:xctname="CheckBox" xd:aj_bound0="xd:value" xd:aj_if="CHECKED" xd:aj_tabIndex="0" tabIndex="0"><xsl:attribute name="xd:onValue"><xsl:value-of select="$onValue"></xsl:value-of></xsl:attribute><xsl:attribute name="xd:offValue"><xsl:value-of select="$offValue"></xsl:value-of></xsl:attribute><xsl:if test="$cenumValues > 0"><xsl:attribute name="xd:fixed">TRUE</xsl:attribute></xsl:if><xsl:choose><xsl:when test="$XPath"><xsl:attribute name="xd:aj_type">0</xsl:attribute><xsl:attribute name="xd:aj_attrtype_msovalue">text</xsl:attribute><xsl:attribute name="xd:aj_node_msovalue"><xsl:value-of select="$XPath"></xsl:value-of></xsl:attribute><xsl:attribute name="xd:aj_uniqueid_msovalue"><xsl:value-of select="xd:aj_getNodeID(.)"></xsl:value-of></xsl:attribute><xsl:attribute name="xd:value"><xsl:value-of select="."></xsl:value-of></xsl:attribute><xsl:attribute name="xd:boundProp">xd:value</xsl:attribute><xsl:attribute name="xd:binding"><xsl:value-of select="$XPath"></xsl:value-of></xsl:attribute><xsl:if test=". = $onValue"><xsl:attribute name="CHECKED">CHECKED</xsl:attribute></xsl:if></xsl:when><xsl:otherwise><xsl:attribute name="xd:value">false</xsl:attribute></xsl:otherwise></xsl:choose></INPUT><xsl:if test="$labelAutoGeneration and not($fConvert)"><xsl:text> </xsl:text><xsl:choose><xsl:when test="$XPath"><xsl:value-of disable-output-escaping="yes" select="xd:aj_getLabelHTML('checkbox', .)"></xsl:value-of></xsl:when><xsl:otherwise><!-- _locID_text="CompUnboundText" _locComment="{StringCategory=TXT}" -->Unbound Check Box</xsl:otherwise></xsl:choose></xsl:if></xsl:template></xsl:stylesheet>