value-class-pattern-brainstorming

(Difference between revisions)

Jump to: navigation, search
(disadvantages: invalid)
(modified object param to depend on name on param instead of class on param to handle XHTML validity)
Line 1: Line 1:
<h1>value excerption pattern brainstorming</h1>
<h1>value excerption pattern brainstorming</h1>
 +
{{TOC-right}}
The [[value-excerption-pattern]] is derived from [[hCard#Value_excerpting|value-excerpting]] in hCard. The precise parsing behavior is not yet finalized, so the pattern should be used only with extreme caution.
The [[value-excerption-pattern]] is derived from [[hCard#Value_excerpting|value-excerpting]] in hCard. The precise parsing behavior is not yet finalized, so the pattern should be used only with extreme caution.
Line 7: Line 8:
These are merely explorations for now, and should NOT be used in actual content publishing, nor implemented in any production code.
These are merely explorations for now, and should NOT be used in actual content publishing, nor implemented in any production code.
-
{{TOC-right}}
 
<div class="vcard">
<div class="vcard">
; <span class="role">Editor</span>  
; <span class="role">Editor</span>  
Line 14: Line 14:
== object param handling ==
== object param handling ==
-
2008-08-23 [[User:BenWard|Ben Ward]] and [[User:Tantek|Tantek Çelik]] brainstormed the following possible special case markup handling for the use of the [[value-excerption-pattern]] with the <nowiki><object></nowiki> element.
+
2008-08-23 [[User:BenWard|Ben Ward]] and [[User:Tantek|Tantek Çelik]] brainstormed the following possible special case markup handling for the use of the [[value-excerption-pattern]] with the <nowiki><object></nowiki> element.  Modified 2008-08-26.
The following markup example documents one way the [[hCard]] <code>tel</code> property's <code>type</code> subproperty could be specified with the enumerated value of "cell" while providing the UK English "mobile" as the human visible object text contents:
The following markup example documents one way the [[hCard]] <code>tel</code> property's <code>type</code> subproperty could be specified with the enumerated value of "cell" while providing the UK English "mobile" as the human visible object text contents:
Line 20: Line 20:
<pre><nowiki>
<pre><nowiki>
<object class="type" lang="en-GB">
<object class="type" lang="en-GB">
-
  <param class="value" name="value" value="cell" />
+
  <param name="value" value="cell" />
  mobile
  mobile
</object>
</object>
</nowiki></pre>
</nowiki></pre>
 +
 +
=== summary ===
 +
* '''object element special case handling of value excerption'''. When a microformat (sub)property class name is specified on an object element, then value excerption handling is modified as follows:
 +
* '''first param with name attribute value'''. if the first child of the object is a param element, and that param element has name attribute value of "value", then use the value attribute value for the value for the microformat (sub)property class name specified on the object.
 +
* '''continue'''. if not, continue with existing value excerption handling, and microformat (sub)property parsing rules as currently best specified by [[hcard-parsing]].
=== notes ===
=== 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 ====
==== advantages ====
* '''Greater semantic re-use.''' The use of the param element to specify a value for its object is in line with the param element's semantics.  The semantic association between the object and the param element is defined in the HTML4 specification.   
* '''Greater semantic re-use.''' The use of the param element to specify a value for its object is in line with the param element's semantics.  The semantic association between the object and the param element is defined in the HTML4 specification.   
Line 39: 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
-
* '''Invalid (X)HTML''' - although this pattern does make sense, it is worth noting that <code>&lt;param></code> is one of just a handful of HTML elements for which the <code>class</code> attribute is [http://www.w3.org/TR/REC-html40/struct/objects.html#h-13.3.2 not defined]. Use of this pattern will break validation unless a custom DTD is employed.
 
-
 
=== to do ===
=== to do ===
* Browser testing. This code sample must be tested in various browsers to determine how they process and handle pages with such code
* Browser testing. This code sample must be tested in various browsers to determine how they process and handle pages with such code
Line 52: Line 57:
** I've just added support for this. It took 19 bytes of code. [[User:TobyInk|TobyInk]] 01:24, 25 Aug 2008 (PDT)
** I've just added support for this. It took 19 bytes of code. [[User:TobyInk|TobyInk]] 01:24, 25 Aug 2008 (PDT)
* Document in more detail. Assuming browser tests of a simple example pass (proper visible text displayed, page efficiency not compromised by additional control creation), document how to handle/parse this pattern in more detail. Iterate.
* Document in more detail. Assuming browser tests of a simple example pass (proper visible text displayed, page efficiency not compromised by additional control creation), document how to handle/parse this pattern in more detail. Iterate.
 +
 +
=== previous iterations ===
 +
==== 20080823 ====
 +
<pre><nowiki>
 +
<object class="type" lang="en-GB">
 +
<param class="value" name="value" value="cell" />
 +
mobile
 +
</object>
 +
</nowiki></pre>
 +
===== disadvantages =====
 +
* '''Invalid (X)HTML''' - although this pattern does make sense, it is worth noting that <code>&lt;param></code> is one of just a handful of HTML elements for which the <code>class</code> attribute is [http://www.w3.org/TR/REC-html40/struct/objects.html#h-13.3.2 not defined]. Use of this pattern will break validation unless a custom DTD is employed.
== related pages ==
== related pages ==

Revision as of 18:30, 26 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

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