W3C home > Mailing lists > Public > public-multilingualweb-lt@w3.org > February 2013

RE: Query about StorageSize, lineBreakType

From: Fredrik Liden <fliden@enlaso.com>
Date: Fri, 22 Feb 2013 12:56:25 -0700
To: Philip <Philip.Oduffy@ul.ie>, "public-multilingualweb-lt@w3.org" <public-multilingualweb-lt@w3.org>
Message-ID: <4236658BB877A542A66660614300B18590011F7CA7@orion.helios.local>
Hi Philip,

8.21.2 Implementation:
An optional lineBreakType attribute. It indicates what type of line breaks the storage uses. The possible values are: cr for CARRIAGE RETURN (U+000D), lf for LINE FEED (U+000A), crlf for CARRIAGE RETURN (U+000D) followed by LINE FEED (U+000A), or nel for NEXT LINE (U+0085). The default value is lf.

lineBreakType is an example of a "secondary" attribute whereas storageSize is the primary. In the table http://www.w3.org/TR/its20/#datacategories-defaults-etc we only list the defaults for the primary attributes, the main category, less clutter, but maybe it's something we should reconsider.

Both lineBreakType and storageEncoding are optional attributes (storageEncoding/storageEncodingPointer  NONE or ONE) but they are both required for storageSize to be useful so that's reflected in the output file to be checked.

Cheers,
Fredrik


From: Philip [mailto:Philip.Oduffy@ul.ie]
Sent: Friday, February 22, 2013 4:43 AM
To: public-multilingualweb-lt@w3.org
Subject: Query about StorageSize, lineBreakType

Hey Guys,
   I just have a query about how to handle the StorageSize data category. The lineBreakType attribute is meant to be optional, but it seems to be expected by default in the expected output files, even if the input file has no mention of lineBreakType. Also, according to the table in http://www.w3.org/TR/its20/#datacategory-description there are not default values for "Storage Size"
Is this correct? Should I be trying to handle the default behavior in the datacategories-definition.xml file, like I do with other default attributes, or something else?

Input file (StorageSize2xml.xml):
<fields>
  <its:rules version="2.0" xmlns:its="http://www.w3.org/2005/11/its"<http://www.w3.org/2005/11/its>>
    <its:storageSizeRule selector="//field" storageEncodingPointer="@encoding" storageSizePointer="@max"/>
  </its:rules>
  <field encoding="ISO-8859-1" id="123" max="25" type="country">Papouasie-Nouvelle-Guinée</field>
  <field encoding="ISO-8859-1" id="139" max="25" type="country">République Dominicaine</field>
</fields>

Expected Output:
/fields
/fields/its:rules[1]
/fields/its:rules[1]/@version
/fields/its:rules[1]/its:storageSizeRule[1]
/fields/its:rules[1]/its:storageSizeRule[1]/@selector
/fields/its:rules[1]/its:storageSizeRule[1]/@storageEncodingPointer
/fields/its:rules[1]/its:storageSizeRule[1]/@storageSizePointer
/fields/field[1]    lineBreakType="lf"    storageEncoding="ISO-8859-1"    storageSize="25"
/fields/field[1]/@encoding
/fields/field[1]/@id
/fields/field[1]/@max
/fields/field[1]/@type
/fields/field[2]    lineBreakType="lf"    storageEncoding="ISO-8859-1"    storageSize="25"
/fields/field[2]/@encoding
/fields/field[2]/@id
/fields/field[2]/@max
/fields/field[2]/@type

Thanks,
Philip
Received on Friday, 22 February 2013 19:59:11 UTC

This archive was generated by hypermail 2.3.1 : Sunday, 9 June 2013 00:25:08 UTC