include-pattern-feedback: Difference between revisions

From Microformats Wiki
Jump to navigation Jump to search
m (→‎Include Pattern Feedback: link to parent page)
m (Reverted edits by RicvaRvard (Talk) to last version by Brian)
 
(63 intermediate revisions by 19 users not shown)
Line 1: Line 1:
= Include Pattern Feedback =
<h1> Include Pattern Feedback </h1>
{{TOC-right}}
Feedback about [[include-pattern]].


Feedback about [[include-pattern]].
== Removal of <object> as an instance of the include-pattern ==
<div class="vevent">
{{OpenIssue}} <span class="summary vcard"><span class="dtstart">2008-06-23</span> raised by <span class="fn">[[User:Csarven|Sarven Capadisli]]</span></span>
<div class="description">
http://www.w3.org/TR/html401/struct/objects.html#h-13.3 states:
"Most user agents have built-in mechanisms for rendering common data types such as text, GIF images, colors, fonts, and a handful of graphic elements. To render data types they don't support natively, user agents generally run external applications. The OBJECT element allows authors to control whether data should be rendered externally or by some program, specified by the author, that renders the data within the user agent."
 
The key being "to render data types" the user-agents "don't support natively" can be handled with <object> by running an external
application. In the case of the include-pattern, we are merely trying to "include" or "refer" to some text/html. The latter is done sufficiently with <a>.
 
+1 for removal --[[User:Csarven|Sarven Capadisli]] 16:34, 23 Jun 2008 (PDT)
 
</div>
</div>
* +1 for removal. On a tightly secured browser <nowiki><object></nowiki> elements are removed or filtered out or just not loaded at all (don't want arbitrary external applications launching from an <nowiki><object></nowiki> element on a malicious web page). [[User:Bob Jonkman|Bob Jonkman]] 14:27, 5 Jul 2008 (PDT)


== Objects and Browser Behavior ==
== Objects and Browser Behavior ==
{{OpenIssue}} <strong>This is still open: To close it we need to version numbers of the affected browsers to add to the main documentation. The issue itself is how handled by using the hyperlink pattern.</strong>
Over at Yahoo! Local, we were using the object include pattern for all our [[hreview|hReviews]] on business detail pages and review listings. That is, until we realized that Safari and Internet Explorer both try to embed the entire page with every OBJECT call.  (Firefox correctly recognizes that it's a local object and doesn't reload anything.)


Over at Yahoo! Local, we were using the object include pattern for all our hReviews on business detail pages and review listings. That is, until we realized that Safari and Internet Explorer both try to embed the entire page with every OBJECT call.  (Firefox correctly recognizes that it's a local object and doesn't reload anything.)
On a page with 20+ reviews, this means a substantial increase in load time and memory consumption. As a result of this (bad) browser behavior, we removed the objects entirely.


On a page with 20+ reviews, this means a substantial increase in load time and memory consumption.  As a result of this (bad) browser behavior, we removed the objects entirely.
-- AndyBaio 29 Jun 2006


Any suggestions for workarounds or modifications to the pattern?
:Based on this conversation http://krijnhoetmer.nl/irc-logs/whatwg/20080617#l-444 <object data="#foo" class="include" type="text/html"></object> will embed (making a separate request) all of the content from the current document, meanwhile pointing to the identifier. This is actually the proper way <object> is supposed to be handled by the user-agents. (Safari 3/Win, it turns out, is treating the <object> element properly.) --[[User:Csarven|Sarven Capadisli]] 16:34, 23 Jun 2008 (PDT)


-- AndyBaio 29 Jun 2006  
 
== Safari 2.x OBJECT element handling==
 
{{OpenIssue}} <strong>This issue needs clarification of the ‘major issues’ referred to, Safari version numbers involved, whether they are still present in later builds of Safari 2, or in builds of Safari 3</strong>.
 
My hResume page [http://robert.o-rourke.org seen here] caused Safari <ins>2.0</ins> some major issues. The page was jumping between object elements when a link was hovered eventually causing the browser to crash. You can follow the thread on the [http://www.mail-archive.com/listdad%40webstandardsgroup.org/msg06078.html WSG mail archive].
 
It seems that while the object element may be more semantically appropriate it <del>is not</del> <ins>may not be</ins> usable in lieu of the issues raised in Safari.
 
--[[User:SanchoTheFat|Robert O'Rourke]] 12:08, 3 Nov 2006 (PST)
 
Which version of Safari?  Please be specific as many Safari OBJECT bugs were fixed in Safari 2.x.
 
-- [[User:Tantek|Tantek]] 13:39, 3 Nov 2006 (PST)
 
The issues with OBJECT in Internet Explorer & Safari and the lack of a good workaround example are a show stopper for me using this. I am now commenting it out. Hope someone can think of a workaround!
 
--[[User:WizardIsHungry|Jon Williams]] 10:21, 7 Feb 2007 (PST)
 
== Hyperlink Include - issues for keyboard users (including Screen Reader users) ==
 
{{ClosedIssue}} <strong>Issue is now resolved, main documentation requires inner text for hyperlinks, disallows hiding of links with negative margins.</strong>
 
Although invisible in visual user agents, and (according to the JAWS 7.0 test below) not spoken by screen readers (at least not by JAWS 7.0), empty links are still contained in the normal tab cycle. Users navigating via keyboard (or equivalent, e.g. switch access, puff/blow devices, etc) will still need to tab through the empty links (tested in Firefox 2.0, IE 6, IE 7; Opera 9.2 seems to remove empty links from tab cycle).
 
This can be verified by modifying the test page below, adding a regular link at the end of the 5 variations of empty links. It takes a user 6 tabs to arrive at the "real" link. It would therefore be advisable to rethink the approach, or scrap it completely.
 
-- [[User:PatrickLauke|Patrick H. Lauke]] 28 Apr 2007


== Hyperlink Include - Screen Reader Testing ==
== Hyperlink Include - Screen Reader Testing ==
{{ClosedIssue}} <strong>The documentation has been updated to reflect this research</strong>


Some [http://microformats.org/discuss/mail/microformats-discuss/2006-July/004693.html concerns have been raised] over the implications using empty hyperlinks may have on assistive devices such as screen readers. One concern is that an empty link may be read out, partially read out or result in some other confusing scenario for the user.
Some [http://microformats.org/discuss/mail/microformats-discuss/2006-July/004693.html concerns have been raised] over the implications using empty hyperlinks may have on assistive devices such as screen readers. One concern is that an empty link may be read out, partially read out or result in some other confusing scenario for the user.


In response, a [http://allinthehead.com/demo/include.html test page] consisting of a number of empty hyperlinks in the style suggested by the pattern has been created. A 'good' result is that none of the links be read out.
In response, a [http://allinthehead.com/demo/include.html test page] consisting of a number of empty hyperlinks in the style suggested by the pattern has been created. A 'good' result is that none of the links be read out.
=== Test Results from Yahoo! Accessibility Stakeholders Group ===
Tests by Mike Davies and members of the Yahoo! Accessibility Stakeholders group can be found at [http://yuiblog.com/blog/2008/01/23/empty-links/ Empty Links and Screen Readers].
<blockquote>The conclusion is that the most accessible link is one that contains link text. Different techniques of hiding links, from no link text, through to hiding by CSS can cause an accessibility barrier to screen reader users. Each screen reader presented its user with a different set of problems and barriers.
</blockquote>
The article contains tables describing the behaviors of different screen readers in a number of scenarios.
(added by: [[User:VinceVeselosky|VinceVeselosky]] 05:46, 24 Jan 2008 (PST) )


=== Test Results: JAWS 7.0 with Firefox 1.5/Win ===
=== Test Results: JAWS 7.0 with Firefox 1.5/Win ===


Tested by [[User:Phae|Frances Berriman]] 2006-07-21.
Tested by [[User:Phae|Frances Berriman]] 2006-07-21.
Purpose of this test was to ascertain what JAWS 7.0 would verbally announce to a user visiting the test case.


* 31 dash include dash Mozilla Firefox
* 31 dash include dash Mozilla Firefox
Line 27: Line 87:
* 31 dash include
* 31 dash include


Conclusion: the hyperlink include pattern presented no usability issues for this screen reader.
Was keyboard access fully tested (see above)? This test is not conclusive, as JAWS 7.0's behavior may well differ from other access technology. Further testing with a wider range of readers is strongly recommended. -- [[User:PatrickLauke|Patrick H. Lauke]] 28 Apr 2007
 
The example above has been incorrectly stated, to be honest.  Conclusion was just a conclusion for that verbal test, not overall.  Therefore, removed "Conclusion" line so it's not misleading! I concur with additional tests are vital (by as many people/softwares/scenarios as possible!).  [[User:Phae|Phae]] 04:10, 2 May 2007 (PDT)
 
== Proprietary attribute ==
 
{{ClosedIssue}} <s>
HTML tidy on the [http://allinthehead.com/demo/include.html test page] gives:
:Warning: <a> proprietary attribute "data"


==Unclear status==
The [http://validator.w3.org/check?verbose=1&uri=http%3A%2F%2Fallinthehead.com%2Fdemo%2Finclude.html W3C validator is similarly unimpressed].
 
[[User:AndyMabbett|AndyMabbett]] 14:22, 22 Oct 2006 (PDT)
 
==== Use href ====
To clarify, links on the [http://allinthehead.com/demo/include.html test page] should be changed to use the <code>href</code> attribute as described at [[include-pattern]] (without <code>href</code> attributes, the elements probably won't register as hyperlinks, but anchors). Set <code>title=""</code> to fix empty link behavior for many assistive devices.  --[[User:RichHall|RichHall]] 23:31, 22 Oct 2006 (PDT)
</s>
 
==== Test page corrected ====
2006-10-25: This error has been corrected on the [http://allinthehead.com/demo/include.html test page]. Any tests should probably be re-run in light of this.
 
== Unclear status ==
 
{{ClosedIssue}} <strong>Resolved by explicitly stating that the include-pattern is a design pattern in the introduction, and the documentation itself now makes reference to which specifications the pattern applies to (and that specifications must explicitly cite the include-pattern, that it doesn't apply to everything.</strong>


It's not clear, either from the main Wiki page or [[include-pattern]], whether this is an agreed standard, a draft, or just a proposal. [[User:AndyMabbett|AndyMabbett]] 03:14, 18 Oct 2006 (PDT)
It's not clear, either from the main Wiki page or [[include-pattern]], whether this is an agreed standard, a draft, or just a proposal. [[User:AndyMabbett|AndyMabbett]] 03:14, 18 Oct 2006 (PDT)
* [[include-pattern]] is not its own proposal, draft, or spec.  It is a design pattern, as listed on the [[Main_Page|wiki home page]] that is included in other proposals, drafts. and specs.  ''Recommend for adding to the [[include-pattern-faq]].
**And that is not clear, either from the main Wiki page or [[include-pattern]]. [[User:AndyMabbett|AndyMabbett]] 16:40, 18 Oct 2006 (PDT)
***ACCEPTED.  Will further clarify relationship between patterns and formats. [[User:Tantek|Tantek]] 16:48, 18 Oct 2006 (PDT)
==Parsing for include-pattern==
{{ClosedIssue}} <strong>Note: this issue is obsolete.  On a [http://rbach.priv.at/Microformats-IRC/2007-01-03#T165528 IRC conversation 2007-01-03], Mike Kaply admitted that he figured this out, which is to apply all includes first into the parse tree before looking for any properties.</strong> -Tantek
''To be more specific, what finally occurred to me is that the object pattern is simply about grabbing nodes from another vcard and using them in this vcard. So the implementor responsibility is just to clone the dom node from the other vcard and replace the object with the corresponding nodes. Works great. (of course I also had to clone the entire vcard since I can't manipulate the DOM like that without changing the page) -mkaply''
In an [http://rbach.priv.at/Microformats-IRC/2007-01-02#T205847 IRC discussion] with [http://www.kaply.com/weblog/ Mike Kaply] (author of the [https://addons.mozilla.org/firefox/4106/ Operator] extension for Firefox) we discussed the difficulty of parsing for an [[include-pattern]] in [[hresume|hResume]].  Mike asks:
<blockquote>I'm really wondering why the <code>object</code> stuff doesn't point back to the entire vCard. I don't understand why the spec has it point to individual items.</blockquote>
The problem was thought to be a weakness in the specification, which doesn't specify what part of the data is in the content that is pointed to by the <code>object</code>.
Currently, to overcome this a parser needs to follow this logic:
::IF I don't find an <code>fn</code>, look for an <code>object</code>. IF there is an <code>object</code>, do a <code>getelementbyid</code> on that <code>ID</code>, but yet there was nothing about that <code>object</code> that said that the content I was looking for in the other card was an <code>fn</code>
Two things may help in overcoming this difficulty:
# Change the spec to have the include-pattern reference the entire vCard, with the intent that any data not found in this vCard use the other vCard
# Include the element of the reference, where the class attribute on <code><object></code> has "include" plus the element that needs to be included. For example:
<pre><nowiki><object
class="include fn" data="#vcard-name">myname</object> </nowiki></pre>
Additionally, I pointed out that using the <code><object></code> element to contain the reference makes Microsoft's Internet Explorer throw an error "Your current security settings prohibit ActiveX controls on this page. As a result, the page may not display correctly." Of course, there is no ActiveX content on an include-pattern.
[[User:Bob Jonkman|Bob Jonkman]] 21:15, 2 Jan 2007 (PST)#
== Concatenating values==
{{ClosedIssue}} <strong>This issue proposes a fragment URL structure that is incompatible with hyperlinks, and so cannot be integrated with the current include pattern mechanisms.</strong>
I feel that there should be a way to "include" data from two places, in one microformat property. For instance:
<pre><nowiki><span id="summaryA" class="summary">Kidderminster Branch Indoor Meeting</span></nowiki></pre>
<pre><nowiki><span id="summaryB>Janaury</span></nowiki></pre>
and later
<pre><nowiki><object data="#summaryB+#summaryA" class="include"></object></nowiki></pre>
would give a summary of:
:'''January Kidderminster Branch Indoor Meeting'''
It may even be possible to include extra data:
<pre><nowiki><span id="summaryC>Fred Smith</span></nowiki></pre>
<pre><nowiki><object data="#summaryA+ with +#summaryC" class="include"></object></nowiki></pre>
to give:
:'''Kidderminster Branch Indoor Meeting with Fred Smith'''
[[User:AndyMabbett|Andy Mabbett]] 14:33, 8 Jan 2007 (PST)
Why not use
<pre><nowiki><span class="value"><object data="#summaryA" class="include"></object> with <object data="#summaryB" class="include"></object></span></nowiki></pre>
to build
:'''Kidderminster Branch Indoor Meeting with Fred Smith'''
[[User:DerrickPallas|Derrick Pallas]] 11:15, 31 Jan 2007 (PST)
:Neat solution! Can anyone say whether current parsers accept this? [[User:AndyMabbett|Andy Mabbett]] 12:18, 31 Jan 2007 (PST)
:Fully disclosure: My XSLT transformer supports this implicitly because it does include-pattern first, then pulls values. My only question would be what to do with nested @class="value" elements that could result from this.  [[User:DerrickPallas|Derrick Pallas]] 12:35, 31 Jan 2007 (PST)
== Script for client-side processing of include-pattern==
{{ClosedIssue}} Can you use the hyperlink option with DHMTL/Ajax to perform replacements in advanced browsers? (Simon Willison's <code>[http://simon.incutio.com/archive/2003/03/25/getElementsBySelector getElementsBySelector()]</code> may be helpful)
  <a href="#id" class="include" title=""></a>
with something like:
  //Works only for linked include-pattern definition at microformats.org
  //Requires Simon Willison's getElementsBySelector()
  //  and normal IE workaround for addEventListener()
  addEventListener( window, 'load', function() {
    var myIncludes = document.getElementsBySelector( 'a[href].include' ), a, e;
    for( var i=0; a=myIncludes[i]; i++ ) if (a.href.charAt(0)=='#') {
      e = document.getElementsBySelector( a.href )[0].cloneNode( true );
      a.parentNode.replaceChild( e, a );
    }
  })
--[[User:RichHall|RichHall]] 00:51, 23 Oct 2006 (PDT)
It seems there is some confusion around this topic. I believe that the included data '''are not supposed to be actually included in the point of inclusion'''. I believe it is only meant to be a hint for the microformats parser; but the inclusion pattern should not affect how the page is rendered. If that is true, let's clear out this page:
* Remove the DHTML suggestion by Rich Hall.
* Change the IRC quote between Tantek and Kaply. Replace the quote ''"clone the dom node from the other vcard and replace the object with the corresponding nodes"'' with ''"look for objects in the vcard and check their corresponding nodes in the dom" [http://rbach.priv.at/Microformats-IRC/2007-01-03#T165941|IRC of 2007-01-03]'' or remove the IRC quote completely.
-- [[User:JiriKopsa]] 18 Mar 2007
:For clarification, it is true that the spec *does* call for a microformat include to be ignored (content-neutral) when its data isn't being accessed. My Ajax suggestion is valid for those of us extracting microformat data client-side, but feel free to use it from an XHR callback instead of a window load event. Also, it would seem that without adjusting the DOM by cloning the repeated nodes, implementers would have to roll their own smart traversal functions rather than using built-in or well-defined CSS, XPath, E4X, etc. My feedback is that it's usually easier/faster to complete the tree than leave it sparse and memory-efficient, but it would be nice if the spec could leave enough wiggle room for both alternatives.
:-- [[User:RichHall|RichHall]] 12:47, 17 Dec 2007 (PST)
==Template==
{{issues-format}}
==Related Pages==
{{include-pattern-related-pages}}

Latest revision as of 04:09, 7 January 2009

Include Pattern Feedback

Feedback about include-pattern.

Removal of <object> as an instance of the include-pattern

open issue! 2008-06-23 raised by Sarven Capadisli

http://www.w3.org/TR/html401/struct/objects.html#h-13.3 states: "Most user agents have built-in mechanisms for rendering common data types such as text, GIF images, colors, fonts, and a handful of graphic elements. To render data types they don't support natively, user agents generally run external applications. The OBJECT element allows authors to control whether data should be rendered externally or by some program, specified by the author, that renders the data within the user agent."

The key being "to render data types" the user-agents "don't support natively" can be handled with <object> by running an external application. In the case of the include-pattern, we are merely trying to "include" or "refer" to some text/html. The latter is done sufficiently with <a>.

+1 for removal --Sarven Capadisli 16:34, 23 Jun 2008 (PDT)

  • +1 for removal. On a tightly secured browser <object> elements are removed or filtered out or just not loaded at all (don't want arbitrary external applications launching from an <object> element on a malicious web page). Bob Jonkman 14:27, 5 Jul 2008 (PDT)

Objects and Browser Behavior

open issue! This is still open: To close it we need to version numbers of the affected browsers to add to the main documentation. The issue itself is how handled by using the hyperlink pattern.

Over at Yahoo! Local, we were using the object include pattern for all our hReviews on business detail pages and review listings. That is, until we realized that Safari and Internet Explorer both try to embed the entire page with every OBJECT call. (Firefox correctly recognizes that it's a local object and doesn't reload anything.)

On a page with 20+ reviews, this means a substantial increase in load time and memory consumption. As a result of this (bad) browser behavior, we removed the objects entirely.

-- AndyBaio 29 Jun 2006

Based on this conversation http://krijnhoetmer.nl/irc-logs/whatwg/20080617#l-444 <object data="#foo" class="include" type="text/html"></object> will embed (making a separate request) all of the content from the current document, meanwhile pointing to the identifier. This is actually the proper way <object> is supposed to be handled by the user-agents. (Safari 3/Win, it turns out, is treating the <object> element properly.) --Sarven Capadisli 16:34, 23 Jun 2008 (PDT)


Safari 2.x OBJECT element handling

open issue! This issue needs clarification of the ‘major issues’ referred to, Safari version numbers involved, whether they are still present in later builds of Safari 2, or in builds of Safari 3.

My hResume page seen here caused Safari 2.0 some major issues. The page was jumping between object elements when a link was hovered eventually causing the browser to crash. You can follow the thread on the WSG mail archive.

It seems that while the object element may be more semantically appropriate it is not may not be usable in lieu of the issues raised in Safari.

--Robert O'Rourke 12:08, 3 Nov 2006 (PST)

Which version of Safari? Please be specific as many Safari OBJECT bugs were fixed in Safari 2.x.

-- Tantek 13:39, 3 Nov 2006 (PST)

The issues with OBJECT in Internet Explorer & Safari and the lack of a good workaround example are a show stopper for me using this. I am now commenting it out. Hope someone can think of a workaround!

--Jon Williams 10:21, 7 Feb 2007 (PST)

Hyperlink Include - issues for keyboard users (including Screen Reader users)

closed issue Issue is now resolved, main documentation requires inner text for hyperlinks, disallows hiding of links with negative margins.

Although invisible in visual user agents, and (according to the JAWS 7.0 test below) not spoken by screen readers (at least not by JAWS 7.0), empty links are still contained in the normal tab cycle. Users navigating via keyboard (or equivalent, e.g. switch access, puff/blow devices, etc) will still need to tab through the empty links (tested in Firefox 2.0, IE 6, IE 7; Opera 9.2 seems to remove empty links from tab cycle).

This can be verified by modifying the test page below, adding a regular link at the end of the 5 variations of empty links. It takes a user 6 tabs to arrive at the "real" link. It would therefore be advisable to rethink the approach, or scrap it completely.

-- Patrick H. Lauke 28 Apr 2007

Hyperlink Include - Screen Reader Testing

closed issue The documentation has been updated to reflect this research

Some concerns have been raised over the implications using empty hyperlinks may have on assistive devices such as screen readers. One concern is that an empty link may be read out, partially read out or result in some other confusing scenario for the user.

In response, a test page consisting of a number of empty hyperlinks in the style suggested by the pattern has been created. A 'good' result is that none of the links be read out.

Test Results from Yahoo! Accessibility Stakeholders Group

Tests by Mike Davies and members of the Yahoo! Accessibility Stakeholders group can be found at Empty Links and Screen Readers.

The conclusion is that the most accessible link is one that contains link text. Different techniques of hiding links, from no link text, through to hiding by CSS can cause an accessibility barrier to screen reader users. Each screen reader presented its user with a different set of problems and barriers.

The article contains tables describing the behaviors of different screen readers in a number of scenarios.

(added by: VinceVeselosky 05:46, 24 Jan 2008 (PST) )

Test Results: JAWS 7.0 with Firefox 1.5/Win

Tested by Frances Berriman 2006-07-21.

Purpose of this test was to ascertain what JAWS 7.0 would verbally announce to a user visiting the test case.

  • 31 dash include dash Mozilla Firefox
  • Page has no links
  • 31 dash include

Was keyboard access fully tested (see above)? This test is not conclusive, as JAWS 7.0's behavior may well differ from other access technology. Further testing with a wider range of readers is strongly recommended. -- Patrick H. Lauke 28 Apr 2007

The example above has been incorrectly stated, to be honest. Conclusion was just a conclusion for that verbal test, not overall. Therefore, removed "Conclusion" line so it's not misleading! I concur with additional tests are vital (by as many people/softwares/scenarios as possible!). Phae 04:10, 2 May 2007 (PDT)

Proprietary attribute

closed issue HTML tidy on the test page gives:

Warning: <a> proprietary attribute "data"

The W3C validator is similarly unimpressed.

AndyMabbett 14:22, 22 Oct 2006 (PDT)

Use href

To clarify, links on the test page should be changed to use the href attribute as described at include-pattern (without href attributes, the elements probably won't register as hyperlinks, but anchors). Set title="" to fix empty link behavior for many assistive devices. --RichHall 23:31, 22 Oct 2006 (PDT)

Test page corrected

2006-10-25: This error has been corrected on the test page. Any tests should probably be re-run in light of this.

Unclear status

closed issue Resolved by explicitly stating that the include-pattern is a design pattern in the introduction, and the documentation itself now makes reference to which specifications the pattern applies to (and that specifications must explicitly cite the include-pattern, that it doesn't apply to everything.

It's not clear, either from the main Wiki page or include-pattern, whether this is an agreed standard, a draft, or just a proposal. AndyMabbett 03:14, 18 Oct 2006 (PDT)

  • include-pattern is not its own proposal, draft, or spec. It is a design pattern, as listed on the wiki home page that is included in other proposals, drafts. and specs. Recommend for adding to the include-pattern-faq.
    • And that is not clear, either from the main Wiki page or include-pattern. AndyMabbett 16:40, 18 Oct 2006 (PDT)
      • ACCEPTED. Will further clarify relationship between patterns and formats. Tantek 16:48, 18 Oct 2006 (PDT)

Parsing for include-pattern

closed issue Note: this issue is obsolete. On a IRC conversation 2007-01-03, Mike Kaply admitted that he figured this out, which is to apply all includes first into the parse tree before looking for any properties. -Tantek

To be more specific, what finally occurred to me is that the object pattern is simply about grabbing nodes from another vcard and using them in this vcard. So the implementor responsibility is just to clone the dom node from the other vcard and replace the object with the corresponding nodes. Works great. (of course I also had to clone the entire vcard since I can't manipulate the DOM like that without changing the page) -mkaply

In an IRC discussion with Mike Kaply (author of the Operator extension for Firefox) we discussed the difficulty of parsing for an include-pattern in hResume. Mike asks:

I'm really wondering why the object stuff doesn't point back to the entire vCard. I don't understand why the spec has it point to individual items.

The problem was thought to be a weakness in the specification, which doesn't specify what part of the data is in the content that is pointed to by the object.

Currently, to overcome this a parser needs to follow this logic:

IF I don't find an fn, look for an object. IF there is an object, do a getelementbyid on that ID, but yet there was nothing about that object that said that the content I was looking for in the other card was an fn

Two things may help in overcoming this difficulty:

  1. Change the spec to have the include-pattern reference the entire vCard, with the intent that any data not found in this vCard use the other vCard
  2. Include the element of the reference, where the class attribute on <object> has "include" plus the element that needs to be included. For example:
<object
class="include fn" data="#vcard-name">myname</object> 

Additionally, I pointed out that using the <object> element to contain the reference makes Microsoft's Internet Explorer throw an error "Your current security settings prohibit ActiveX controls on this page. As a result, the page may not display correctly." Of course, there is no ActiveX content on an include-pattern.

Bob Jonkman 21:15, 2 Jan 2007 (PST)#

Concatenating values

closed issue This issue proposes a fragment URL structure that is incompatible with hyperlinks, and so cannot be integrated with the current include pattern mechanisms.

I feel that there should be a way to "include" data from two places, in one microformat property. For instance:

<span id="summaryA" class="summary">Kidderminster Branch Indoor Meeting</span>
<span id="summaryB>Janaury</span>

and later

<object data="#summaryB+#summaryA" class="include"></object>

would give a summary of:

January Kidderminster Branch Indoor Meeting

It may even be possible to include extra data:

<span id="summaryC>Fred Smith</span>
<object data="#summaryA+ with +#summaryC" class="include"></object>

to give:

Kidderminster Branch Indoor Meeting with Fred Smith

Andy Mabbett 14:33, 8 Jan 2007 (PST)

Why not use

<span class="value"><object data="#summaryA" class="include"></object> with <object data="#summaryB" class="include"></object></span>

to build

Kidderminster Branch Indoor Meeting with Fred Smith

Derrick Pallas 11:15, 31 Jan 2007 (PST)

Neat solution! Can anyone say whether current parsers accept this? Andy Mabbett 12:18, 31 Jan 2007 (PST)
Fully disclosure: My XSLT transformer supports this implicitly because it does include-pattern first, then pulls values. My only question would be what to do with nested @class="value" elements that could result from this. Derrick Pallas 12:35, 31 Jan 2007 (PST)

Script for client-side processing of include-pattern

closed issue Can you use the hyperlink option with DHMTL/Ajax to perform replacements in advanced browsers? (Simon Willison's getElementsBySelector() may be helpful)

 <a href="#id" class="include" title=""></a>

with something like:

 //Works only for linked include-pattern definition at microformats.org
 //Requires Simon Willison's getElementsBySelector()
 //  and normal IE workaround for addEventListener()
 addEventListener( window, 'load', function() {
   var myIncludes = document.getElementsBySelector( 'a[href].include' ), a, e;
   for( var i=0; a=myIncludes[i]; i++ ) if (a.href.charAt(0)=='#') {
     e = document.getElementsBySelector( a.href )[0].cloneNode( true );
     a.parentNode.replaceChild( e, a );
   }
 })

--RichHall 00:51, 23 Oct 2006 (PDT)

It seems there is some confusion around this topic. I believe that the included data are not supposed to be actually included in the point of inclusion. I believe it is only meant to be a hint for the microformats parser; but the inclusion pattern should not affect how the page is rendered. If that is true, let's clear out this page:

  • Remove the DHTML suggestion by Rich Hall.
  • Change the IRC quote between Tantek and Kaply. Replace the quote "clone the dom node from the other vcard and replace the object with the corresponding nodes" with "look for objects in the vcard and check their corresponding nodes in the dom" of 2007-01-03 or remove the IRC quote completely.

-- User:JiriKopsa 18 Mar 2007

For clarification, it is true that the spec *does* call for a microformat include to be ignored (content-neutral) when its data isn't being accessed. My Ajax suggestion is valid for those of us extracting microformat data client-side, but feel free to use it from an XHR callback instead of a window load event. Also, it would seem that without adjusting the DOM by cloning the repeated nodes, implementers would have to roll their own smart traversal functions rather than using built-in or well-defined CSS, XPath, E4X, etc. My feedback is that it's usually easier/faster to complete the tree than leave it sparse and memory-efficient, but it would be nice if the spec could leave enough wiggle room for both alternatives.
-- RichHall 12:47, 17 Dec 2007 (PST)

Template

Consider using this format (copy and paste this to the end of the list to add your issues; replace ~~~ with an external link if preferred) to report issues or feedback, so that issues can show up in hAtom subscriptions of this issues page. If open issues lack this markup, please add it.

Please post one issue per entry, to make them easier to manage. Avoid combining multiple issues into single reports, as this can confuse or muddle feedback, and puts a burden of separating the discrete issues onto someone else who 1. may not have the time, and 2. may not understand the issue in the same way as the original reporter.

<div class="hentry">
{{OpenIssue}} 
<span class="entry-summary author vcard">
 <span class="published">2011-MM-DD</span> 
 raised by <span class="fn">~~~</span>
</span>
<div class="entry-content discussion issues">
* <strong class="entry-title">«Short title of issue»</strong>. «Description of Issue»
** Follow-up comment #1
** Follow-up comment #2
</div>
</div>

Related Pages