Project

General

Profile

« Previous | Next » 

Revision 10191

Added by Bryce Mecum about 7 years ago

If EML physical/size/@unit isn't specified, assume its bytes

Previously, if the unit attribute wasn't set on an EML physical size
element, the size showed up as just the number with no units. The EML
spec says that, if unit is omitted, bytes is the assumed unit.

View differences:

lib/style/skins/metacatui/eml-2/eml-physical.xsl
144 144
      <div class="control-group">
145 145
		<label class="control-label">Size</label>
146 146
        <div class="controls controls-well">
147
        <xsl:value-of select="."/><xsl:text> </xsl:text><xsl:value-of select="./@unit"/></div>
147
            <xsl:value-of select="."/><xsl:text> </xsl:text>
148
            <xsl:choose>
149
                <xsl:when test="./@unit">
150
                    <xsl:value-of select="./@unit"/>
151
                </xsl:when>
152
                <xsl:otherwise>
153
                    <xsl:text>bytes</xsl:text>
154
                </xsl:otherwise>
155
            </xsl:choose>
156
        </div>
148 157
      </div>
149 158
    </xsl:for-each>
150 159
  </xsl:template>

Also available in: Unified diff