diff options
author | David Reveman <davidr@novell.com> | 2007-08-13 00:58:10 -0400 |
---|---|---|
committer | David Reveman <davidr@novell.com> | 2007-08-13 00:58:10 -0400 |
commit | c66bc2054022420750af41dbcfeaf6e4467ac59c (patch) | |
tree | e23bbfd9025f06ec653ba5225e69a9f1cbb63290 | |
parent | faf843eddc426899d1e804fd9a64f72eb69727f8 (diff) |
Default alpha value for color options is 1.0.
-rw-r--r-- | metadata/schemas.xslt | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/metadata/schemas.xslt b/metadata/schemas.xslt index 9aa0928b..0ad2ba94 100644 --- a/metadata/schemas.xslt +++ b/metadata/schemas.xslt @@ -172,13 +172,13 @@ <xsl:when test="@type = 'color'"> <default> <xsl:choose> - <xsl:when test="default/red/text() or default/green/text() or default/blue/text() or default/alpha/text()"> + <xsl:when test="default"> <xsl:for-each select="default[1]"> <xsl:call-template name="printColor"/> </xsl:for-each> </xsl:when> <xsl:otherwise> - <xsl:text>#00000000</xsl:text> + <xsl:text>#000000ff</xsl:text> </xsl:otherwise> </xsl:choose> </default> @@ -409,9 +409,16 @@ </xsl:call-template> </xsl:variable> <xsl:variable name="alpha"> - <xsl:call-template name="getHexNum"> - <xsl:with-param name="value" select="alpha/text()"/> - </xsl:call-template> + <xsl:choose> + <xsl:when test="alpha/text()"> + <xsl:call-template name="getHexNum"> + <xsl:with-param name="value" select="alpha/text()"/> + </xsl:call-template> + </xsl:when> + <xsl:otherwise> + <xsl:text>ff</xsl:text> + </xsl:otherwise> + </xsl:choose> </xsl:variable> <xsl:value-of select="concat('#',concat($red,concat($green,concat($blue,$alpha))))"/> </xsl:template> |