Skip to content

Step incorrectly defaulted to 0.1 #49

@pomo9911

Description

@pomo9911

When translating an element of type number, xs:fractionDigits defines the maximum number of fractional digits (i.e., digits that are after the decimal point). When set to 0, that means that no fractional digits are allowed. The corresponding HTML element should have a step of 1. In this case, the xsd22html2xml transformation incorrectly generates an element of step 0.1 instead. This is due to the default "otherwise" clause from "gui-attributes.xsl".

				<xsl:choose>
					<xsl:when test="$fractionDigits!='' and $fractionDigits!='0'">
						<xsl:value-of select="concat('0.',substring('00000000000000000000',1,$fractionDigits - 1),'1')" />
					</xsl:when>
					<xsl:otherwise>0.1</xsl:otherwise>
				</xsl:choose>

Should be replaced by "xsl:otherwise1</xsl:otherwise>". This clause appears three times: <xsl:when test="$type = 'decimal'">, <xsl:when test="$type = 'float'">, <xsl:when test="$type = 'double'">.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions