value-class-pattern-brainstorming

(Difference between revisions)

Jump to: navigation, search
(disadvantages: verbosity)
(noted misconception about comparison to machine data in class and data prefix. noted need for bug report on IE/Windows behavior. agreed w BenWard's conclusions.)
Line 46: Line 46:
*# require "value" attribute be the last attribute specified on the param element
*# require "value" attribute be the last attribute specified on the param element
*# require equivalent human visible text be placed immediately (allowing for whitespace) following the param
*# require equivalent human visible text be placed immediately (allowing for whitespace) following the param
-
* '''Verbose:''' not very hand-authoring friendly, compared to other suggestions such as:
 
-
** [[datetime-design-pattern#Machine-data_in_class|Machine data in class]]: <code>&lt;span class="type data-cell">Mobile:&lt;/span></code>
 
-
** [http://microformats.org/discuss/mail/microformats-discuss/2008-February/011583.html data prefix in titles]: <code>&lt;span class="type" title="data:cell">Mobile&lt;/span></code>
 
=== to do ===
=== to do ===
Line 63: Line 60:
=== Browser Testing ===
=== Browser Testing ===
-
 
Using the following simple, HTML4 hcard:
Using the following simple, HTML4 hcard:
Line 83: Line 79:
==== Results ====
==== Results ====
-
 
A pass is to display a heading level one ‘Ben Ward’ with hyperlink, followed by a paragraph displaying the text ‘Mobile: 415-123-567’
A pass is to display a heading level one ‘Ben Ward’ with hyperlink, followed by a paragraph displaying the text ‘Mobile: 415-123-567’
Browsers selected based on YUI Graded Browser Support (August 2008), plus some others.
Browsers selected based on YUI Graded Browser Support (August 2008), plus some others.
-
 
* Opera 9.5 - Pass
* Opera 9.5 - Pass
Line 97: Line 91:
* Safari 2 - *Fail* ††
* Safari 2 - *Fail* ††
-
† Internet Explorer 6–8 on Windows XP renders the correct text, but triggers an ActiveX security warning bar on the page load.
+
* † Internet Explorer 6–8 on Windows XP renders the correct text, but triggers an ActiveX security warning bar on the page load.
-
†† Safari 2 renders a default-sized white box (as if embedding an external control). It breaks layout and does not display the desired content.
+
** This is an error on behalf of IE/Windows. As the object has no type nor data attributes, it has nothing that would bind it to a specific ActiveX control, and therefore should not trigger a security warning bar. This bug should be reported, and the respective bug number referenced here.
 +
* †† Safari 2 renders a default-sized white box (as if embedding an external control). It breaks layout and does not display the desired content.
==== Safari 2 Tweak ====
==== Safari 2 Tweak ====
-
 
The example is tweaked as follows to affect Safari 2 rendering:
The example is tweaked as follows to affect Safari 2 rendering:
Line 129: Line 123:
==== Current Conclusion ====
==== Current Conclusion ====
-
 
* Safari 2 does not pass the test acceptably for this to be adopted as the only solution.
* Safari 2 does not pass the test acceptably for this to be adopted as the only solution.
* Internet Explorer's security warnings are irritating, but justifiably unacceptable.
* Internet Explorer's security warnings are irritating, but justifiably unacceptable.
--[[User:BenWard|BenWard]] 20:17, 26 Aug 2008 (PDT)
--[[User:BenWard|BenWard]] 20:17, 26 Aug 2008 (PDT)
 +
 +
* I concur. And while we can report a bug against IE/Windows in the hopes that it is fixed eventually (perhaps even in IE8 before it ships), as this problem has been fixed in Safari 3, it is doubtful that a bug report against Safari 2 would be fixed in an intermediate version.
 +
--[[User:Tantek|Tantek]] 03:07, 27 Aug 2008 (PDT)
 +
 +
=== misconceptions ===
 +
* ''not very hand-authoring friendly, compared to other proposals like: [[datetime-design-pattern#Machine-data_in_class|Machine data in class]]: <code>&lt;span class="type data-cell">Mobile:&lt;/span></code>, and [http://microformats.org/discuss/mail/microformats-discuss/2008-February/011583.html data prefix in titles]: <code>&lt;span class="type" title="data:cell">Mobile&lt;/span></code> ''
 +
** It is even more hand-authoring unfriendly to introduce a new syntax, as "Machine data in class" does, and to some extent as "data prefix in titles does". Additional (especially new) syntax introduces far greater cognitive load to the author than a little bit more markup.
=== previous iterations ===
=== previous iterations ===

Revision as of 10:07, 27 August 2008

value excerption pattern brainstorming

Contents


The value-excerption-pattern is derived from value-excerpting in hCard. The precise parsing behavior is not yet finalized, so the pattern should be used only with extreme caution.

This brainstorming page is for exploring ideas related to specifying the value-excerption-pattern in more detail and ideas for special case handling of the value-excerption-pattern in combination with specific semantic HTML elements per those elements' particular semantics.

These are merely explorations for now, and should NOT be used in actual content publishing, nor implemented in any production code.

Editor
Tantek Çelik

object param handling

2008-08-23 Ben Ward and Tantek Çelik brainstormed the following possible special case markup handling for the use of the value-excerption-pattern with the <object> element. Modified 2008-08-26.

The following markup example documents one way the hCard tel property's type subproperty could be specified with the enumerated value of "cell" while providing the UK English "mobile" as the human visible object text contents:

<object class="type" lang="en-GB">
 <param name="value" value="cell" />
 mobile
</object>

summary

notes

Note that the param element does not have a 'class' attribute and thus its 'name' attribute (which has a compatible semantic) is used instead to invoke the value excerption pattern.

advantages

neutral

disadvantages

to do

Browser Testing

Using the following simple, HTML4 hcard:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
    "http://www.w3.org/TR/html4/strict.dtd">

<title>&lt;object> value excerption pattern: hCard Telephone Type Test Case</title>

<body class="vcard">
    <h1 class="fn"><a class="url" href="http://ben-ward.co.uk">Ben Ward</a></h1>
    <p class="tel">
        <object class="type">
            <param name="value" value="cell">
            Mobile:
        </object>
        <span class="value">415-123-567</span>
    </p>
</body>

Results

A pass is to display a heading level one ‘Ben Ward’ with hyperlink, followed by a paragraph displaying the text ‘Mobile: 415-123-567’ Browsers selected based on YUI Graded Browser Support (August 2008), plus some others.

Safari 2 Tweak

The example is tweaked as follows to affect Safari 2 rendering:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
    "http://www.w3.org/TR/html4/strict.dtd">

<title>&lt;object> value excerption pattern: hCard Telephone Type Test Case</title>

<body class="vcard">
    <h1 class="fn"><a class="url" href="http://ben-ward.co.uk">Ben Ward</a></h1>
    <p class="tel">
        <object data="data://" class="type">
            <param name="value" value="cell">
            Mobile:
        </object>
        <span class="value">415-123-567</span>
    </p>
</body>

A data="data://" URL attribute is added to the object element.

Safari 2 Result

† Safari 2 renders the object correctly on first page load, *however*, upon using the browser ‘Refresh’ function, the object element reverts to the broken rendering described in the original test.

Current Conclusion

--BenWard 20:17, 26 Aug 2008 (PDT)

--Tantek 03:07, 27 Aug 2008 (PDT)

misconceptions

previous iterations

20080823

<object class="type" lang="en-GB">
 <param class="value" name="value" value="cell" />
 mobile
</object>
disadvantages

related pages

value-class-pattern-brainstorming was last modified: Wednesday, December 31st, 1969

Views