Future of HTML

     Name         : David Richmond
     Contact      : david_richmond@nl.compuware.com
     Home Phone   : +31 20 690 1217
     Home Address : S. de Beauvoirstraat 20,
                    1102 AR  Amsterdam,
                    The Netherlands
     
     
     Data-Type Formatting
     --------------------
     
     I would like to see a formal HTML way of formatting data-type values, 
     such as dates and numbers. The raw value would be specified using USA 
     conventions, but can be reformatted to the user agent's conventions. 
     For example, an american date of 3/26/98 would be shown in a European 
     user agent as 26/3/98 or even as 26 March 1998.
     
     As for the best way of doing this I am not sure, but adding a 
     <DATATYPE> tag would be one way. The attributes of the tag would allow 
     refined formatting to be defined, for example:
     
     The markup
     
        <DATATYPE type=date format=full>3/26/98</DATATYPE>
        <DATATYPE type=date format=short>3/26/98</DATATYPE>
        <DATATYPE type=number>1000.00</DATATYPE>
        <DATATYPE type=currency unit=USD>1000.00</DATATYPE>
     
     could be shown as follows in a Dutch User Agent:
     
        26 Maart 1998
        26/3/98
        1000,00
        $ 1.000,00
     
     Of course the 'format' attribute should probably be a CSS setting and 
     not an HTML attribute.
     
     Datatype definitions should also work for <INPUT> elements, possibly 
     by extending the INPUT element to have additional attributes as above. 
     In the case of INPUT elements simple datatype validation could also be 
     performed by the user agent on any values modified by the user.
     
     Within the DOM associated native language data-types/classes could be 
     used to manipulate the raw values for DATATYPE and INPUT elements.
     
     
     CSS Aliases
     -----------
     
     This suggestion applies to those of us who write CSS by hand, as 
     opposed to via CSS editors. It would be useful to be able to define an 
     alias which can be used throughout the style-sheet, removing the need 
     to duplicate definitions. This could be done via a @alias definition, 
     for example:
     
        @alias MyClr { #FF00FF }
     
        H1  { color: MyClr )
        P   { background-color: MyClr }
     
     
     Now changing the single MyClr value changes all styles, instead of 
     having to manually modify all the styles individually.
     
     However, there are a few potential 'gotchas' in this, for example:
     
        @alias hidden { visible }
     
        H1 { visibility: hidden }
     
     As a C/C++ programmer used to '#define' definitions I would expect H1 
     tags to be visible, but of course not everyone is a C++ programmer and 
     it might be better to ignore such definitions (i.e. keywords take 
     priority over aliases).
     

Received on Thursday, 26 March 1998 08:07:13 UTC