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 / FORMFIELDS.XCT < prev    next >
Extensible Markup Language  |  2010-03-29  |  4KB  |  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:variable name="fLabelAutoGeneration" select="xd:aj_getPropByName('labelAutoGeneration')"></xsl:variable><xsl:variable name="fIsSimpleContent" select="xd:aj_getPropByName('fIsSimpleContent')"></xsl:variable><xsl:variable name="fXHTMLContent" select="xd:aj_getPropByName('fXHTMLContent')"></xsl:variable><xsl:variable name="fIsLeafNode" select="xd:aj_getPropByName('fIsLeafNode')"></xsl:variable><xsl:template match="* | @*"><xsl:if test="$XPath"><TABLE BORDER="0"><COLGROUP><xsl:if test="$fLabelAutoGeneration"><COL></COL></xsl:if><COL STYLE="width:145px;"></COL></COLGROUP><TBODY><xsl:if test="$fIsSimpleContent"></xsl:if><xsl:if test="$fXHTMLContent"></xsl:if><xsl:if test="$fIsLeafNode"></xsl:if><xsl:for-each select="@*"><TR><xsl:apply-templates select="." mode="Build"></xsl:apply-templates></TR></xsl:for-each><xsl:choose><xsl:when test="$fIsSimpleContent or $fXHTMLContent or $fIsLeafNode"><xsl:variable name="strSnifferSuggestion" select="xd:aj_getSuggestionForNode(., $NodeList)"></xsl:variable><TR><xsl:call-template name="BuildLabel"><xsl:with-param name="componentName" select="$strSnifferSuggestion"></xsl:with-param></xsl:call-template><TD><DIV><xsl:value-of disable-output-escaping="yes" select="xd:aj_getXHTMLforComponent($strSnifferSuggestion, ., $NodeList, $XPath)"></xsl:value-of></DIV></TD></TR></xsl:when><xsl:otherwise><xsl:apply-templates select="*" mode="Build"></xsl:apply-templates></xsl:otherwise></xsl:choose></TBODY></TABLE></xsl:if></xsl:template><xsl:template match="*" mode="Build"><xsl:variable name="CurrentNodeName" select="name()"></xsl:variable><xsl:variable name="QualifiedXPath"><xsl:choose><xsl:when test="preceding-sibling::*[name() = $CurrentNodeName] or                                 following-sibling::*[name() = $CurrentNodeName]"><xsl:value-of select="concat($CurrentNodeName, '[', count(preceding-sibling::*[name() = $CurrentNodeName])+1, ']')"></xsl:value-of></xsl:when><xsl:otherwise><xsl:value-of select="$CurrentNodeName"></xsl:value-of></xsl:otherwise></xsl:choose></xsl:variable><xsl:variable name="strSnifferSuggestion" select="xd:aj_getSuggestionForNode(., $NodeList)"></xsl:variable><xsl:variable name="fIsParentElement" select="xd:aj_isParentElement(.)"></xsl:variable><xsl:if test="not($fIsParentElement) and $strSnifferSuggestion != 'digsig'"><TR><xsl:call-template name="BuildLabel"><xsl:with-param name="componentName" select="$strSnifferSuggestion"></xsl:with-param></xsl:call-template><TD><DIV><xsl:choose><xsl:when test="$XPath = '.'"><xsl:value-of disable-output-escaping="yes" select="xd:aj_getXHTMLforComponent($strSnifferSuggestion, ., $NodeList, string($QualifiedXPath))"></xsl:value-of></xsl:when><xsl:otherwise><xsl:value-of disable-output-escaping="yes" select="xd:aj_getXHTMLforComponent($strSnifferSuggestion, ., $NodeList, concat($XPath, '/', string($QualifiedXPath)))"></xsl:value-of></xsl:otherwise></xsl:choose></DIV></TD></TR></xsl:if></xsl:template><xsl:template match="@*" mode="Build"><xsl:variable name="strSnifferSuggestion" select="xd:aj_getSuggestionForNode(., $NodeList)"></xsl:variable><xsl:call-template name="BuildLabel"><xsl:with-param name="componentName" select="$strSnifferSuggestion"></xsl:with-param></xsl:call-template><TD><DIV><xsl:choose><xsl:when test="$XPath = '.'"><xsl:value-of disable-output-escaping="yes" select="xd:aj_getXHTMLforComponent($strSnifferSuggestion, ., $NodeList, concat('@', name()))"></xsl:value-of></xsl:when><xsl:otherwise><xsl:value-of disable-output-escaping="yes" select="xd:aj_getXHTMLforComponent($strSnifferSuggestion, ., $NodeList, concat($XPath, '/@', name()))"></xsl:value-of></xsl:otherwise></xsl:choose></DIV></TD></xsl:template><xsl:template name="BuildLabel"><xsl:param name="componentName"></xsl:param><xsl:if test="$fLabelAutoGeneration"><TD><DIV><xsl:value-of disable-output-escaping="yes" select="xd:aj_getLabelHTML($componentName, .)"></xsl:value-of></DIV></TD></xsl:if></xsl:template></xsl:stylesheet>