Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Step incorrectly defaulted to 0.1 #49

Open
pomo9911 opened this issue May 2, 2022 · 0 comments
Open

Step incorrectly defaulted to 0.1 #49

pomo9911 opened this issue May 2, 2022 · 0 comments

Comments

@pomo9911
Copy link

pomo9911 commented May 2, 2022

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'">.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant