<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://microformats.org/wiki/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=JiriKopsa</id>
	<title>Microformats Wiki - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://microformats.org/wiki/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=JiriKopsa"/>
	<link rel="alternate" type="text/html" href="https://microformats.org/wiki/Special:Contributions/JiriKopsa"/>
	<updated>2026-05-03T16:16:46Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.38.4</generator>
	<entry>
		<id>https://microformats.org/wiki/index.php?title=User:JiriKopsa&amp;diff=20592</id>
		<title>User:JiriKopsa</title>
		<link rel="alternate" type="text/html" href="https://microformats.org/wiki/index.php?title=User:JiriKopsa&amp;diff=20592"/>
		<updated>2007-03-19T18:53:25Z</updated>

		<summary type="html">&lt;p&gt;JiriKopsa: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Jiri Kopsa&lt;br /&gt;
* http://blogs.sun.com&lt;/div&gt;</summary>
		<author><name>JiriKopsa</name></author>
	</entry>
	<entry>
		<id>https://microformats.org/wiki/index.php?title=hcard-parsing&amp;diff=15038</id>
		<title>hcard-parsing</title>
		<link rel="alternate" type="text/html" href="https://microformats.org/wiki/index.php?title=hcard-parsing&amp;diff=15038"/>
		<updated>2007-03-19T06:14:38Z</updated>

		<summary type="html">&lt;p&gt;JiriKopsa: /* Include Pattern and Table Headers */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;h1&amp;gt;hCard parsing&amp;lt;/h1&amp;gt;&lt;br /&gt;
&lt;br /&gt;
by [http://tantek.com/log/ Tantek Çelik]&lt;br /&gt;
&lt;br /&gt;
== introduction ==&lt;br /&gt;
&lt;br /&gt;
When I first conceived of [[hcard|hCard]], it was clear to me how to unambiguously parse both for the existence of hCards in arbitrary (X)HTML (and anywhere that arbitrary (X)HTML can be embedded, e.g. RSS, Atom, &amp;quot;generic XML&amp;quot;), and hCard  properties and values.&lt;br /&gt;
&lt;br /&gt;
I worked directly with Brian Suda to capture these thoughts in an implementation, and Brian wrote X2V, an XSLT script that converts hCards to vCards, thus simultaneously demonstrating the parsability of hCards, and the immediate utility of hCard content interoperating with widespread existing vCard applications.&lt;br /&gt;
&lt;br /&gt;
I am now documenting those thoughts directly here so that additional implementations, rather than having to reverse engineer X2V, can be built directly from these elementary concepts.&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
== scope ==&lt;br /&gt;
&lt;br /&gt;
Although this page is written specifically to explain how to parse [[hcard|hCard]], the concepts and algorithms contained therein serve as an example for how other [[compound-microformat|compound microformats]] are to be parsed.&lt;br /&gt;
&lt;br /&gt;
== URL handling ==&lt;br /&gt;
&lt;br /&gt;
An hCard parser may begin with a URL to retrieve.&lt;br /&gt;
&lt;br /&gt;
If the URL lacks a fragment identifier, then the parser should parse the entire retrieved resource for hCards.&lt;br /&gt;
&lt;br /&gt;
If the URL has a fragment identifier, then the parser should parse ''only'' the node indicated by the fragment identifier and its descendants, looking for hCards, starting with the indicated node, which may itself be a single hCard.&lt;br /&gt;
&lt;br /&gt;
== root class name ==&lt;br /&gt;
&lt;br /&gt;
Each compound microformat starts with a root element with a relatively unique class name.  By that I mean a class name which isn't simply  a common word, and is unlikely to have been used outside the context of the microformat.  By choosing such a root class name the microformat avoids (for all practical purposes) colliding with existing class names that may exist within the (X)HTML context.  This is essential to enabling such compound microformats to be ''embedded'' inside current, existing content, as well as future content.&lt;br /&gt;
&lt;br /&gt;
Fortunately this is not a new problem to solve.  The root object names chosen for vCard (RFC 2426) and iCalendar (RFC 2445) similarly had to avoid such collisions and did so by choosing names that were unlikely to have been introduced into a MIME object context.  The principle of ''reuse'' dictates that we should reuse the names for these root objects in those RFCs rather than invent our own.  Given the same semantics, a design should reuse the names, rather than inventing a second name for the same semantic (a common design mistake made in environments that require namespaces).&lt;br /&gt;
&lt;br /&gt;
In the vCard specification, the names are case-insensitive due to the (lack of) requirements of their context.  (X)HTML class names are case sensitive per those specifications.  Thus we are required to pick a canonical case for the class name equivalents of vCard object and property names.  All lowercase is chosen to follow the precedent (i.e. ''reuse'' the pattern) set by XHTML, which similarly had to canonicalize the case of element and attribute names that it took from HTML4, which itself was case-insensitive due to its context (SGML).  Additionally, reasons for avoiding mixed-case (e.g. camel case) in the context of class names may be found in the essay [http://tantek.com/log/2002/12.html#L20021216t2238 A Touch of Class], specifically, the section titled [http://tantek.com/log/2002/12.html#atoc_csensitivity Class sensitivity].&lt;br /&gt;
&lt;br /&gt;
Thus the root class name of an [[hcard|hCard]] is &amp;quot;vcard&amp;quot;.  &lt;br /&gt;
&lt;br /&gt;
== finding hCards ==&lt;br /&gt;
&lt;br /&gt;
An (X)HTML document indicates that it may contain hCards by referencing the [[hcard-profile|hCard XMDP profile]].  See [http://gmpg.org/xmdp/description XMDP] for more details.&lt;br /&gt;
&lt;br /&gt;
A parser finds hCards in an (X)HTML context by looking for elements with the root class name &amp;quot;vcard&amp;quot; just as the following CSS class selector does:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 .vcard&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For example, the following CSS style rule sets the background of all hCards to green:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 .vcard { background: green; }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note that the (X)HTML class attribute is a space separated set of class names.&lt;br /&gt;
&lt;br /&gt;
Thus all of the following are valid hCard root elements:&lt;br /&gt;
* &amp;lt;code&amp;gt;&amp;amp;lt;div class=&amp;quot;vcard&amp;quot;&amp;amp;gt; &amp;amp;lt;/div&amp;amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;&amp;amp;lt;span class=&amp;quot;attendee vcard&amp;quot;&amp;amp;gt; &amp;amp;lt;/span&amp;amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;&amp;amp;lt;address class=&amp;quot;vcard author&amp;quot;&amp;amp;gt; &amp;amp;lt;/address&amp;amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;&amp;amp;lt;li class=&amp;quot;reviewer vcard first&amp;quot;&amp;amp;gt; &amp;amp;lt;/li&amp;amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Once the root element of an hCard is found, that element and all its descendants are all that is needed to parse the hCard.&lt;br /&gt;
&lt;br /&gt;
Thus it is possible for a well-formed hCard to be extracted from an overall non well-formed context, if the parser has the ability to find elements by class name within that non well-formed context.&lt;br /&gt;
&lt;br /&gt;
== hCard properties ==&lt;br /&gt;
&lt;br /&gt;
The complete list of class names for hCard properties are documented in the [[hcard-profile|hCard profile]].&lt;br /&gt;
&lt;br /&gt;
=== forward compatible parsing ===&lt;br /&gt;
&lt;br /&gt;
When parsing the contents of an hCard, any unrecognized class names must be ignored.&lt;br /&gt;
&lt;br /&gt;
Similarly, unrecognized values for hCard properties must also be ignored.&lt;br /&gt;
&lt;br /&gt;
=== finding hCard properties ===&lt;br /&gt;
&lt;br /&gt;
To parse an hCard for an hCard property (e.g. &amp;quot;fn&amp;quot;), the parser simply looks for the first element with that class name inside the hCard.&lt;br /&gt;
&lt;br /&gt;
This can also be expressed as the first element that matches this CSS selector:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
.vcard .fn&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Some properties, like &amp;quot;fn&amp;quot;, should only appear once, and thus the parser stops looking for the property after it has found the first occurrence in document order.  Additional occurrences are ignored.&lt;br /&gt;
&lt;br /&gt;
Other properties, like &amp;quot;adr&amp;quot;, &amp;quot;email&amp;quot;, &amp;quot;url&amp;quot;, &amp;quot;tel&amp;quot;, etc., may (and often do) appear more than once, and thus the parser continues to look for each occurrence within the contents of the hCard.&lt;br /&gt;
&lt;br /&gt;
=== parsing hCard properties and values ===&lt;br /&gt;
&lt;br /&gt;
In general, once an element for a property is found, that element is used for the value.&lt;br /&gt;
&lt;br /&gt;
In particular, once an element for a property is found:&lt;br /&gt;
# first, look for [[hcard-parsing#class_value_handling|class value children]] and use them as [[hcard-parsing#class_value_handling|described below]]&lt;br /&gt;
# otherwise, if there is a [[hcard-parsing#more_semantic_exceptions|more semantic exception]], use that as [[hcard-parsing#more_semantic_exceptions|described below]]&lt;br /&gt;
# finally, always fallback to using the contents of the element for the value&lt;br /&gt;
&lt;br /&gt;
==== class value handling ====&lt;br /&gt;
&lt;br /&gt;
For all properties, if the element for a property has one or more children with a class name of &amp;quot;value&amp;quot;, then concatenate the node values for all those child elements with class name of &amp;quot;value&amp;quot;, in their document order, and use that concatenation as the value of the property.&lt;br /&gt;
&lt;br /&gt;
==== more semantic exceptions ====&lt;br /&gt;
&lt;br /&gt;
There are several exceptions to accomodate [http://microformats.org/wiki/hcard#Semantic_XHTML_Design_Principles semantic XHTML and more semantic equivalents].&lt;br /&gt;
&lt;br /&gt;
For the &amp;quot;email&amp;quot; property in particular, when the element is:&lt;br /&gt;
* &amp;lt;code&amp;gt;&amp;amp;lt;a href=&amp;quot;mailto:...&amp;quot;&amp;amp;gt;&amp;lt;/code&amp;gt; OR &amp;lt;code&amp;gt;&amp;amp;lt;area href=&amp;quot;mailto:...&amp;quot;&amp;amp;gt;&amp;lt;/code&amp;gt; : parse the value of the 'href' attribute, omitting the &amp;quot;mailto:&amp;quot; prefix and any &amp;quot;?&amp;quot; query suffix (if present), in the attribute. For details on the &amp;quot;mailto:&amp;quot; URL scheme, see RFC 2368.&lt;br /&gt;
&lt;br /&gt;
For properties that may take type URL or URI parsers MUST handle relative URLs/URIs and normalize them to their respective absolute URLs/URIs, following the containing document's language's rules for resolving relative URLs/URIs (e.g. &amp;amp;lt;base&amp;amp;gt; for HTML, xml:base for XML). &lt;br /&gt;
&lt;br /&gt;
For properties that may take type URL, URI, or UID, when the element for that property is:&lt;br /&gt;
* &amp;lt;code&amp;gt;&amp;amp;lt;a href&amp;amp;gt;&amp;lt;/code&amp;gt;  OR &amp;lt;code&amp;gt;&amp;amp;lt;area href&amp;amp;gt;&amp;lt;/code&amp;gt; : use the value of the 'href' attribute.&lt;br /&gt;
* &amp;lt;code&amp;gt;&amp;amp;lt;img src&amp;amp;gt;&amp;lt;/code&amp;gt; : use the value of the 'src' attribute.  If the 'src' is a &amp;quot;data:&amp;quot; URL, use the MIME type in that &amp;quot;data:&amp;quot; URL for the TYPE subproperty, otherwise if the  the 'type' attribute is present, us that for the TYPE subproperty.&lt;br /&gt;
* &amp;lt;code&amp;gt;&amp;amp;lt;object data&amp;amp;gt;&amp;lt;/code&amp;gt; : use the value of the 'data' attribute for the value. If the 'data' is a &amp;quot;data:&amp;quot; URL, use the MIME type in that &amp;quot;data:&amp;quot; URL for the TYPE subproperty, otherwise if the  the 'type' attribute is present, us that for the TYPE subproperty.&lt;br /&gt;
&lt;br /&gt;
For properties with values NOT of type URL, URI, or UID, when the element for a property is:&lt;br /&gt;
* &amp;lt;code&amp;gt;&amp;amp;lt;img alt&amp;amp;gt;&amp;lt;/code&amp;gt; OR &amp;lt;code&amp;gt;&amp;amp;lt;area alt&amp;amp;gt;&amp;lt;/code&amp;gt; : use the value of the 'alt' attribute.&lt;br /&gt;
&lt;br /&gt;
For all properties, when the element for a property is:&lt;br /&gt;
* &amp;lt;code&amp;gt;&amp;amp;lt;abbr title&amp;amp;gt;&amp;lt;/code&amp;gt;: use the value of the 'title' attribute.  If there is no 'title' attribute then use the contents of the element.&lt;br /&gt;
** For properties which take an ISO8601 datetime value, parsers *should* pad any necessary precision (e.g. seconds), and *should* normalize any datetimes with timezone offsets, (e.g. &amp;lt;code&amp;gt;20050814T2305-0700&amp;lt;/code&amp;gt;) into UTC (&amp;lt;code&amp;gt;20050815T060500Z&amp;lt;/code&amp;gt;).  Note that floating dates and times MUST NOT be made into UTC/Z absolute time zoned values.&lt;br /&gt;
* &amp;lt;code&amp;gt;&amp;amp;lt;br /&amp;amp;gt;&amp;lt;/code&amp;gt; OR &amp;lt;code&amp;gt;&amp;amp;lt;hr /&amp;amp;gt;&amp;lt;/code&amp;gt;: the value is the empty string.  These two elements do not represent any semantics and thus it is probably an error (at least an abuse) for an author to use them with microformats class names.  Nonetheless, if found, treat the value as empty.&lt;br /&gt;
&lt;br /&gt;
==== white-space handling ====&lt;br /&gt;
&lt;br /&gt;
hCard parsers should handle white-space parsing per XML white-space handling rules, with the following two additions:&lt;br /&gt;
&lt;br /&gt;
# &amp;lt;code&amp;gt;&amp;amp;lt;pre&amp;amp;gt;&amp;lt;/code&amp;gt; handling.  Any content parsed as part of an hCard property that is inside a &amp;amp;lt;pre&amp;amp;gt; element must preserve all white-space per XML white-space preservation rules.&lt;br /&gt;
# &amp;lt;code&amp;gt;&amp;amp;lt;br /&amp;amp;gt;&amp;lt;/code&amp;gt; handling.  Any occurrence of a &amp;lt;code&amp;gt;&amp;amp;lt;br /&amp;amp;gt;&amp;lt;/code&amp;gt; inside the element(s) for a value must be treated as a carriage-return (\n) in the respective location in the value.&lt;br /&gt;
&lt;br /&gt;
=== hCard sub-properties ===&lt;br /&gt;
&lt;br /&gt;
There are some hCard properties whose values themselves have structure (AKA structured type value) and are composed of multiple pieces, which we refer to as sub-properties.&lt;br /&gt;
&lt;br /&gt;
For example, the &amp;quot;n&amp;quot; property consists of the sub-properties &amp;quot;family-name&amp;quot;, &amp;quot;given-name&amp;quot;, &amp;quot;additional-name&amp;quot;, &amp;quot;honorific-prefix&amp;quot;, and &amp;quot;honorific-suffix&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
E.g. from section 3.1.2 of RFC 2426, modified to include Ph.D.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
N:Public;John;Quinlan;Mr.;Esq.,Ph.D.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In hCard this &amp;quot;n&amp;quot; property would be marked up as&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;span class=&amp;quot;n&amp;quot;&amp;gt;&lt;br /&gt;
 &amp;lt;span class=&amp;quot;honorific-prefix&amp;quot;&amp;gt;Mr.&amp;lt;/span&amp;gt;&lt;br /&gt;
 &amp;lt;span class=&amp;quot;given-name&amp;quot;&amp;gt;John&amp;lt;/span&amp;gt;&lt;br /&gt;
 &amp;lt;span class=&amp;quot;additional-name&amp;quot;&amp;gt;Quinlan&amp;lt;/span&amp;gt;&lt;br /&gt;
 &amp;lt;span class=&amp;quot;family-name&amp;quot;&amp;gt;Public&amp;lt;/span&amp;gt;,&lt;br /&gt;
 &amp;lt;span class=&amp;quot;honorific-suffix&amp;quot;&amp;gt;Esq.&amp;lt;/span&amp;gt;,&lt;br /&gt;
 &amp;lt;span class=&amp;quot;honorific-suffix&amp;quot;&amp;gt;Ph.D.&amp;lt;/span&amp;gt;&lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Which would be rendered as:&lt;br /&gt;
&lt;br /&gt;
Mr. John Quinlan Public, Esq., Ph.D.&lt;br /&gt;
&lt;br /&gt;
=== hCard property parameters ===&lt;br /&gt;
&lt;br /&gt;
Some hCard properties have one or more parameters, most often &amp;quot;type&amp;quot;, with an enumerated set of values.  We represent the specific ''value'' of the parameter as a class name on an element inside the element representing the property.&lt;br /&gt;
&lt;br /&gt;
For example, the &amp;quot;adr&amp;quot; property has a type parameter which takes the values: &amp;quot;dom&amp;quot;, &amp;quot;intl&amp;quot;, &amp;quot;post&amp;quot;, &amp;quot;parcel&amp;quot;, &amp;quot;home&amp;quot;, &amp;quot;work&amp;quot;, &amp;quot;pref&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
The &amp;quot;type&amp;quot; parameter is treated like a sub-property.&lt;br /&gt;
&lt;br /&gt;
To encode the &amp;quot;type&amp;quot; of an &amp;quot;adr&amp;quot; property, a nested element with class=&amp;quot;type&amp;quot; is used to markup the value of the type parameter.&lt;br /&gt;
&lt;br /&gt;
Example with the &amp;quot;tel&amp;quot; property with a value of type &amp;quot;work&amp;quot;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;span class=&amp;quot;tel&amp;quot;&amp;gt;&lt;br /&gt;
 &amp;lt;span class=&amp;quot;type&amp;quot;&amp;gt;work&amp;lt;/span&amp;gt;: &lt;br /&gt;
 &amp;lt;span class=&amp;quot;value&amp;quot;&amp;gt;+1.123.456.7890&amp;lt;/span&amp;gt;&lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Value excerpting ===&lt;br /&gt;
&lt;br /&gt;
Note the element with class=&amp;quot;value&amp;quot; used in the above example.&lt;br /&gt;
&lt;br /&gt;
Sometimes only part of an element which is the equivalent for a property should be used for the value of the property. This typically occurs when a property has a subtype, like TEL. For this purpose, the special class name &amp;quot;value&amp;quot; is introduced to excerpt out the subset of the element that is the value of the property.&lt;br /&gt;
&lt;br /&gt;
== Include Pattern and Table Headers ==&lt;br /&gt;
&lt;br /&gt;
When processing elements from the [[include-pattern]] or table headers inclusion methods, such elements should be processed as if they were inline.&lt;br /&gt;
&lt;br /&gt;
== Proposed Additions ==&lt;br /&gt;
These are proposed additions to hCard parsing.  Implementations MAY follow these conventions in order to gain implementation experience, and SHOULD report back on the results.&lt;br /&gt;
&lt;br /&gt;
=== DEL element handling ===&lt;br /&gt;
&lt;br /&gt;
When dealing with an HTML document that is hCard encoded, the parser SHOULD  honor the &amp;lt;code&amp;gt;&amp;amp;lt;del&amp;amp;gt;&amp;lt;/code&amp;gt; element.&lt;br /&gt;
&lt;br /&gt;
There are two possibilities here (adopting both may be possible):&lt;br /&gt;
&lt;br /&gt;
1. Skip any occurences of &amp;lt;code&amp;gt;&amp;amp;lt;del&amp;amp;gt;&amp;lt;/code&amp;gt; elements and their contents entirely inside the contents of a property.&lt;br /&gt;
&lt;br /&gt;
2. If the &amp;lt;code&amp;gt;&amp;amp;lt;del&amp;amp;gt;&amp;lt;/code&amp;gt; element is used for a property itself, it could be useful as a way communication the of tombstoning / obsoleting of that particular property value, and thus while a parser that is converting to a vCard SHOULD simply do what is indicated in (1), applications which parsed hCard directly (rather than only supporting vCard) COULD treat such occurences of &amp;lt;code&amp;gt;&amp;amp;lt;del&amp;amp;gt;&amp;lt;/code&amp;gt; elements as a way to remove obsolete information (with user confirmation of course) from a local contact information store.&lt;br /&gt;
&lt;br /&gt;
=== Plain Text Formatting of Structural/Semantic HTML ===&lt;br /&gt;
There are several structural/semantic elements in HTML which have useful default styling which could be converted into ASCII (AKA Plain Text) equivalents as a low resolution way of communicating that structure. Note that &amp;lt;code&amp;gt;&amp;amp;lt;br /&amp;amp;gt;&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;&amp;amp;lt;pre&amp;amp;gt;&amp;lt;/code&amp;gt; are already handled in the section above titled [http://microformats.org/wiki/hcard-parsing#white-space_handling White-space Handling].&lt;br /&gt;
&lt;br /&gt;
When parsing the DESCRIPTION property, hierarchically convert the following HTML tags into their plain text styling equivalents.&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;&amp;amp;lt;div&amp;amp;gt;&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;&amp;amp;lt;/div&amp;amp;gt;&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;&amp;amp;lt;dl&amp;amp;gt;&amp;lt;/code&amp;gt;,  &amp;lt;code&amp;gt;&amp;amp;lt;/dl&amp;amp;gt;&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;&amp;amp;lt;dt&amp;amp;gt;&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;&amp;amp;lt;/li&amp;amp;gt;&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;&amp;amp;lt;/dd&amp;amp;gt;&amp;lt;/code&amp;gt; - Append a soft &amp;lt;code&amp;gt;\n&amp;lt;/code&amp;gt; to the output. By &amp;quot;soft &amp;lt;code&amp;gt;\n&amp;lt;/code&amp;gt;&amp;quot;, we mean only do so if there isn't already a line break (in contrast to a &amp;quot;hard&amp;quot; (implied by default) &amp;lt;code&amp;gt;\n&amp;lt;/code&amp;gt;).  Two things in particular order to ensure that &amp;lt;code&amp;gt;&amp;amp;lt;div&amp;amp;gt; &amp;amp;lt;div&amp;amp;gt;&amp;lt;/code&amp;gt; does not result in two &amp;lt;code&amp;gt;\n&amp;lt;/code&amp;gt; characters in a row:&lt;br /&gt;
*# only output the &amp;lt;code&amp;gt;\n&amp;lt;/code&amp;gt; if something other than whitespace (including  &amp;lt;code&amp;gt;\n&amp;lt;/code&amp;gt;) was outputted immediately previously.&lt;br /&gt;
*# omit any immediately subsequent whitespace characters.&lt;br /&gt;
* &amp;lt;code&amp;gt;&amp;amp;lt;li&amp;amp;gt;&amp;lt;/code&amp;gt; - Append a soft &amp;lt;code&amp;gt;\n&amp;lt;/code&amp;gt; and then &amp;lt;/code&amp;gt; * &amp;lt;/code&amp;gt;. (Note: Indenting the contents of the list item is not particularly practical, since that would require line-breaking, and that would depend on knowing the width of when the plain text is rendered.  Wrapping to 70 characters may be a good assumption for plain text email, but is probably a very bad assumption for vCard output).&lt;br /&gt;
* &amp;lt;code&amp;gt;&amp;amp;lt;/dt&amp;amp;gt;&amp;lt;/code&amp;gt; - Append &amp;lt;code&amp;gt;:\n&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;&amp;amp;lt;dd&amp;amp;gt;&amp;lt;/code&amp;gt; - Append a soft &amp;lt;code&amp;gt;\n&amp;lt;/code&amp;gt; and then &amp;lt;/code&amp;gt;  &amp;lt;/code&amp;gt; (two space ASCII 32 characters).&lt;br /&gt;
* &amp;lt;code&amp;gt;&amp;amp;lt;h1&amp;amp;gt;&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;&amp;amp;lt;/h1&amp;amp;gt;&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;&amp;amp;lt;h2&amp;amp;gt;&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;&amp;amp;lt;/h2&amp;amp;gt;&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;&amp;amp;lt;h3&amp;amp;gt;&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;&amp;amp;lt;/h3&amp;amp;gt;&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;&amp;amp;lt;h4&amp;amp;gt;&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;&amp;amp;lt;/h4&amp;amp;gt;&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;&amp;amp;lt;h5&amp;amp;gt;&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;&amp;amp;lt;/h5&amp;amp;gt;&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;&amp;amp;lt;h6&amp;amp;gt;&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;&amp;amp;lt;/h6&amp;amp;gt;&amp;lt;/code&amp;gt; - Append a soft &amp;lt;code&amp;gt;\n&amp;lt;/code&amp;gt; followed by a hard &amp;lt;code&amp;gt;\n&amp;lt;/code&amp;gt;.  (Note: we may want to consider some conventions to indicate the heading level.  Perhaps only the relative heading level inside the property matters, e.g. whatever level HTML heading is seen first is treated as a first level heading, then any subsequent HTML heading elements are treated relative to that original heading (this is because it is likely that the property is embedded somewhere deep inside an HTML document following higher heading levels).  Any subsequent higher level headings should perhaps cause a warning, and then simply be treated as a first level heading.  Given that, the [http://microformats.org/wiki/wiki-formats#straw_proposals straw proposal for heading syntax] from Ian Hickson is one reasonable possibility, with the only issue being that for first and second level headings, how wide to make the line of '-'s or '='s, which is a similar problem to the line-breaking problem noted above when considering indenting the contents of list-items.  Thus perhaps it might be sufficient to simply set a first level heading in ALL CAPS (same as the third level heading in Ian's proposed syntax), and let second and deeper level headings be simply implied by the &amp;quot;one line of text with two line breaks both before and after&amp;quot; convention.  Rarely has there been more than one level of heading found within a DESCRIPTION property, and I've never seen more than two even if it is possible.)&lt;br /&gt;
* &amp;lt;code&amp;gt;&amp;amp;lt;p&amp;amp;gt;&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;&amp;amp;lt;/p&amp;amp;gt;&amp;lt;/code&amp;gt; - Append a soft &amp;lt;code&amp;gt;\n&amp;lt;/code&amp;gt; followed by a hard &amp;lt;code&amp;gt;\n&amp;lt;/code&amp;gt;. (Note: Typical books indent the start of a paragraph approximately three spaces &amp;quot;&amp;lt;code&amp;gt;   &amp;lt;/code&amp;gt;&amp;quot;, and implementations may wish to consider doing so as well. Keep in mind that on the Web, typical paragraphs do not start with a first line indent.)&lt;br /&gt;
* &amp;lt;code&amp;gt;&amp;amp;lt;q&amp;amp;gt;&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;&amp;amp;lt;/q&amp;amp;gt;&amp;lt;/code&amp;gt; - Append a double-quote '&amp;quot;' character.&lt;br /&gt;
* &amp;lt;code&amp;gt;&amp;amp;lt;sub&amp;amp;gt;&amp;lt;/code&amp;gt; - Append an open parenthesis &amp;quot;(&amp;quot;&lt;br /&gt;
* &amp;lt;code&amp;gt;&amp;amp;lt;/sub&amp;amp;gt;&amp;lt;/code&amp;gt; - Append a a close parenthesis &amp;quot;)&amp;quot;.&lt;br /&gt;
* &amp;lt;code&amp;gt;&amp;amp;lt;sup&amp;amp;gt;&amp;lt;/code&amp;gt; - Append an open bracket &amp;quot;[&amp;quot;&lt;br /&gt;
* &amp;lt;code&amp;gt;&amp;amp;lt;/sup&amp;amp;gt;&amp;lt;/code&amp;gt; - Append a a close bracket &amp;quot;[&amp;quot;.  &amp;lt;code&amp;gt;&amp;amp;lt;sup&amp;amp;gt;&amp;lt;/code&amp;gt; are often used for footnotes which in plain text are often formatted as bracketed numbers.&lt;br /&gt;
* &amp;lt;code&amp;gt;&amp;amp;lt;table&amp;amp;gt;&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;&amp;amp;lt;/table&amp;amp;gt;&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;&amp;amp;lt;tbodygt;&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;&amp;amp;lt;/tbody&amp;amp;gt;&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;&amp;amp;lt;thead&amp;amp;gt;&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;&amp;amp;lt;/thead&amp;amp;gt;&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;&amp;amp;lt;tfoot&amp;amp;gt;&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;&amp;amp;lt;/tfoot&amp;amp;gt;&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;&amp;amp;lt;tr&amp;amp;gt;&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;&amp;amp;lt;/tr&amp;amp;gt;&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;&amp;amp;lt;caption&amp;amp;gt;&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;&amp;amp;lt;/caption&amp;amp;gt;&amp;lt;/code&amp;gt; - Append a soft &amp;lt;code&amp;gt;\n&amp;lt;/code&amp;gt;.  Of course one could try to do a lot more with representing the structure of the table, but that is almost certainly more work than it is worth, nevermind the complexities introduced by COLSPAN, ROWSPAN etc.  At least by approximating the table sections and rows the table may be more readable.&lt;br /&gt;
* &amp;lt;code&amp;gt;&amp;amp;lt;/td&amp;amp;gt;&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;&amp;amp;lt;/th&amp;amp;gt;&amp;lt;/code&amp;gt; - Append a space and a tab character (ASCII 32, ASCII 9 respectively).  It's not clear that what subsequent application would be able to make use of this visually, but at least the tabular nature of the structure is indicated and it makes it possible to copy and paste the table into something that handles tabular content like a spreadsheet and have the tabular structure reflected.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== More challenging elements ====&lt;br /&gt;
* &amp;lt;code&amp;gt;&amp;amp;lt;ol&amp;amp;gt;&amp;lt;/code&amp;gt; - it would be nice to number list items inside an ordered list rather than bullet them, but keeping track of list item numbers/counts is a non-trivial piece of state information for the parser to deal with, and thus we are omitting this behavior for now.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Use of CSS computed styles instead of HTML default styles ====&lt;br /&gt;
Rather than assuming the default presentation for these elements, and using that for the basis of plain text formatting, a parser could use the respective equivalent computed style properties and use those instead.  However, requiring an hCard parser to also implement Cascading Style Sheets (e.g. CSS1) is out of scope.  Some environments (i.e. a browser DOM) may already provide this information, and in that case, it may be easy for an hCard parser (e.g. a clientside javascript parser) to use computed style properties.  E.g. instead of the elements above, the following computed styles could be used:&lt;br /&gt;
* display:block - Append a soft &amp;lt;code&amp;gt;\n&amp;lt;/code&amp;gt;&lt;br /&gt;
** text-indent (non-zero value, on an element with display:block or display:list-item) - Append a number of spaces equivalent to value of the text-ident property divided by the computed font-size property of the element.&lt;br /&gt;
** margin-top, margin-bottom (non-zero value, on an element with display:block or display:list-item) - Append a number of &amp;quot;\n&amp;quot; equivalent to the value divided by the computed font-size property of the element.  Obviously this won't properly collapse vertical margins. &lt;br /&gt;
* display:list-item - Append a soft &amp;lt;code&amp;gt;\n&amp;lt;/code&amp;gt; followed by &amp;quot; * &amp;quot;&lt;br /&gt;
* etc.  &lt;br /&gt;
This is enough extra work that I'm not sure it is worth spending the time documenting more equivalents.  The above are sufficient to illustrate the possibility.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Outstanding Issues ==&lt;br /&gt;
&lt;br /&gt;
=== Issues 3 ===&lt;br /&gt;
&lt;br /&gt;
Might be worth considering defining the parsing in terms of the DOM, so that it applies to HTML and XHTML equally without ambiguity.&lt;br /&gt;
&lt;br /&gt;
== Resolved Issues ==&lt;br /&gt;
&lt;br /&gt;
This section is informative.&lt;br /&gt;
&lt;br /&gt;
The following issues have been explored and resolved inline in the text of hcard-parsing above.&lt;br /&gt;
&lt;br /&gt;
=== Resolved as of 2005-09-16 ===&lt;br /&gt;
&lt;br /&gt;
==== ISSUE 1 ====&lt;br /&gt;
&lt;br /&gt;
Should we make plural sub-property names into singular versions and simply allow multiple instances?  I.e. the singular honorific prefix would make more sense if it was classed as such, and the list implied by the value for honorific-suffixes could be made more explicit (and thus more easily machine parseable):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;span class=&amp;quot;n&amp;quot;&amp;gt;&lt;br /&gt;
 &amp;lt;span class=&amp;quot;honorific-prefix&amp;quot;&amp;gt;Mr.&amp;lt;/span&amp;gt;&lt;br /&gt;
 &amp;lt;span class=&amp;quot;given-name&amp;quot;&amp;gt;John&amp;lt;/span&amp;gt;&lt;br /&gt;
 &amp;lt;span class=&amp;quot;additional-names&amp;quot;&amp;gt;Quinlan&amp;lt;/span&amp;gt;&lt;br /&gt;
 &amp;lt;span class=&amp;quot;family-name&amp;quot;&amp;gt;Public&amp;lt;/span&amp;gt;,&lt;br /&gt;
 &amp;lt;span class=&amp;quot;honorific-suffix&amp;quot;&amp;gt;Esq.&amp;lt;/span&amp;gt;,&lt;br /&gt;
 &amp;lt;span class=&amp;quot;honorific-suffix&amp;quot;&amp;gt;Ph.D.&amp;lt;/span&amp;gt;&lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
RESOLUTION: Adopt singular class name equivalents for plural property and sub-property names.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== ISSUE 2 ====&lt;br /&gt;
&lt;br /&gt;
Restricting the &amp;quot;type&amp;quot; sub-property values to being expressed in class names seems less than ideal.  It's taking a piece of information which is very often visible in the content, and forcing it to be invisible.&lt;br /&gt;
&lt;br /&gt;
Here is an example of an extensive bit of contact information on a web page:&lt;br /&gt;
&lt;br /&gt;
http://www.patchlink.com/company/contact.html&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Mailing Address&lt;br /&gt;
3370 N. Hayden Road, #123-175&lt;br /&gt;
Scottsdale, AZ 85251-6632&lt;br /&gt;
&lt;br /&gt;
Physical Address&lt;br /&gt;
8515 E Anderson&lt;br /&gt;
Scottsdale, AZ 85255&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note that the type information for each &amp;quot;adr&amp;quot; is explicit in the content.  This content could be marked up like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;adr&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;abbr style=&amp;quot;display:block&amp;quot; class=&amp;quot;type&amp;quot; title=&amp;quot;postal,parcel&amp;quot;&amp;gt;Mailing Address&amp;lt;/abbr&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;street-address&amp;quot;&amp;gt;3370 N. Hayden Road, #123-175&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;span class=&amp;quot;locality&amp;quot;&amp;gt;Scottsdale&amp;lt;/span&amp;gt;, &amp;lt;span class=&amp;quot;region&amp;quot;&amp;gt;AZ&amp;lt;/span&amp;gt;&lt;br /&gt;
&amp;lt;span class=&amp;quot;postal-code&amp;quot;&amp;gt;85251-6632&amp;lt;/span&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;adr&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;abbr style=&amp;quot;display:block&amp;quot; class=&amp;quot;type&amp;quot; title=&amp;quot;work,pref&amp;quot;&amp;gt;Physical Address&amp;lt;/abbr&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;street-address&amp;quot;&amp;gt;8515 E Anderson&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;span class=&amp;quot;locality&amp;quot;&amp;gt;Scottsdale&amp;lt;/span&amp;gt;, &amp;lt;span class=&amp;quot;region&amp;quot;&amp;gt;AZ&amp;lt;/span&amp;gt; &lt;br /&gt;
&amp;lt;span class=&amp;quot;postal-code&amp;quot;&amp;gt;85255&amp;lt;/span&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
RESOLUTION: The &amp;quot;type&amp;quot; parameter MUST be marked-up when content is available (like the above two examples).  We are ditching the type-value-as-another class name pattern.&lt;br /&gt;
&lt;br /&gt;
In addition since there are some potentical problems with the &amp;quot;type&amp;quot; parameter for TEL and EMAIL properties. Since there are no defined sub-properties (unlike ADR's post-code, locality, etc) the entire node-value of TEL is taken as the value. For example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;span class=&amp;quot;tel&amp;quot;&amp;gt;+1.123.456.7890 &amp;lt;abbr class=&amp;quot;type&amp;quot; title=&amp;quot;work&amp;quot;&amp;gt;(work)&amp;lt;/abbr&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
would be represented in vCard as:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
TEL;TYPE=work:+123.456.7890 (work)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We are introducing another sub-property class=&amp;quot;value&amp;quot; to enable excerpting of a the value of an element of for a property.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;span class=&amp;quot;tel&amp;quot;&amp;gt;&amp;lt;span class=&amp;quot;value&amp;quot;&amp;gt;+1.123.456.7890&amp;lt;/span&amp;gt; &amp;lt;abbr class=&amp;quot;type&amp;quot; title=&amp;quot;work&amp;quot;&amp;gt;(work)&amp;lt;/abbr&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then parsers would first need to look for class=&amp;quot;value&amp;quot; and take the node value of that if it exists rather than class=&amp;quot;tel&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
If one or more child elements with the class name of &amp;quot;value&amp;quot; are present inside the element for a property, then concatenate the node values of those child elements (in the order found) and use that as the value of the property.  This would be before using the node value of the element for a property itself.&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&lt;br /&gt;
=== Normative References ===&lt;br /&gt;
* [[hcard|hCard]]&lt;br /&gt;
* vCard (RFC 2426)&lt;br /&gt;
* [http://w3.org/TR/XHTML1 XHTML 1.0 Recommendation]&lt;br /&gt;
* [http://w3.org/TR/html401 HTML 4.01 Recommendation]&lt;br /&gt;
* [http://gmpg.org/xmdp/ XMDP]&lt;br /&gt;
&lt;br /&gt;
=== Informative References ===&lt;br /&gt;
* [http://w3.org/TR/REC-CSS1 CSS1 Recommendation]&lt;br /&gt;
&lt;br /&gt;
== Related Pages ==&lt;br /&gt;
{{hcard-related-pages}}&lt;/div&gt;</summary>
		<author><name>JiriKopsa</name></author>
	</entry>
	<entry>
		<id>https://microformats.org/wiki/index.php?title=User:JiriKopsa&amp;diff=14439</id>
		<title>User:JiriKopsa</title>
		<link rel="alternate" type="text/html" href="https://microformats.org/wiki/index.php?title=User:JiriKopsa&amp;diff=14439"/>
		<updated>2007-03-19T05:43:21Z</updated>

		<summary type="html">&lt;p&gt;JiriKopsa: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Jiri Kopsa&lt;br /&gt;
* [http://blogs.sun.com/rfe]&lt;/div&gt;</summary>
		<author><name>JiriKopsa</name></author>
	</entry>
	<entry>
		<id>https://microformats.org/wiki/index.php?title=include-pattern-feedback&amp;diff=14378</id>
		<title>include-pattern-feedback</title>
		<link rel="alternate" type="text/html" href="https://microformats.org/wiki/index.php?title=include-pattern-feedback&amp;diff=14378"/>
		<updated>2007-03-19T04:59:00Z</updated>

		<summary type="html">&lt;p&gt;JiriKopsa: /* Objects and Browser Behavior */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Include Pattern Feedback =&lt;br /&gt;
&lt;br /&gt;
Feedback about [[include-pattern]].&lt;br /&gt;
&lt;br /&gt;
== Objects and Browser Behavior ==&lt;br /&gt;
&lt;br /&gt;
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.) &lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
Any suggestions for workarounds or modifications to the pattern?&lt;br /&gt;
&lt;br /&gt;
-- AndyBaio 29 Jun 2006&lt;br /&gt;
&lt;br /&gt;
Can you use the hyperlink option with DHMTL/Ajax to perform replacements in advanced browsers? (Simon Willison's &amp;lt;code&amp;gt;[http://simon.incutio.com/archive/2003/03/25/getElementsBySelector getElementsBySelector()]&amp;lt;/code&amp;gt; may be helpful)&lt;br /&gt;
  &amp;lt;a href=&amp;quot;#id&amp;quot; class=&amp;quot;include&amp;quot; title=&amp;quot;&amp;quot;&amp;gt;&amp;lt;/a&amp;gt;&lt;br /&gt;
with something like:&lt;br /&gt;
  //Works only for linked include-pattern definition at microformats.org&lt;br /&gt;
  //Requires Simon Willison's getElementsBySelector()&lt;br /&gt;
  //  and normal IE workaround for addEventListener()&lt;br /&gt;
  addEventListener( window, 'load', function() {&lt;br /&gt;
    var myIncludes = document.getElementsBySelector( 'a[href].include' ), a, e;&lt;br /&gt;
    for( var i=0; a=myIncludes[i]; i++ ) if (a.href.charAt(0)=='#') {&lt;br /&gt;
      e = document.getElementsBySelector( a.href )[0].cloneNode( true );&lt;br /&gt;
      a.parentNode.replaceChild( e, a );&lt;br /&gt;
    }&lt;br /&gt;
  })&lt;br /&gt;
--[[User:RichHall|RichHall]] 00:51, 23 Oct 2006 (PDT)&lt;br /&gt;
&lt;br /&gt;
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:&lt;br /&gt;
* Remove the DHTML suggestion by Rich Hall.&lt;br /&gt;
* Change the IRC quote between Tantek and Kaply. Replace the quote ''&amp;quot;clone the dom node from the other vcard and replace the object with the corresponding nodes&amp;quot;'' with ''&amp;quot;look for objects in the vcard and check their corresponding nodes in the dom&amp;quot; [http://rbach.priv.at/Microformats-IRC/2007-01-03#T165941|IRC of 2007-01-03]'' or remove the IRC quote completely.&lt;br /&gt;
&lt;br /&gt;
-- [User:JiriKopsa] 18 Mar 2007&lt;br /&gt;
&lt;br /&gt;
My hResume page [http://robert.o-rourke.org seen here] caused Safari &amp;lt;ins&amp;gt;2.0&amp;lt;/ins&amp;gt; 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].&lt;br /&gt;
&lt;br /&gt;
It seems that while the object element may be more semantically appropriate it &amp;lt;del&amp;gt;is not&amp;lt;/del&amp;gt; &amp;lt;ins&amp;gt;may not be&amp;lt;/ins&amp;gt; usable in lieu of the issues raised in Safari.&lt;br /&gt;
&lt;br /&gt;
--[[User:SanchoTheFat|Robert O'Rourke]] 12:08, 3 Nov 2006 (PST)&lt;br /&gt;
&lt;br /&gt;
Which version of Safari?  Please be specific as many Safari OBJECT bugs were fixed in Safari 2.x.&lt;br /&gt;
&lt;br /&gt;
-- [[User:Tantek|Tantek]] 13:39, 3 Nov 2006 (PST)&lt;br /&gt;
&lt;br /&gt;
The issues with OBJECT in Internet Explorer &amp;amp; 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!&lt;br /&gt;
&lt;br /&gt;
--[[User:WizardIsHungry|Jon Williams]] 10:21, 7 Feb 2007 (PST)&lt;br /&gt;
&lt;br /&gt;
== Hyperlink Include - Screen Reader Testing ==&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
=== Test Results: JAWS 7.0 with Firefox 1.5/Win ===&lt;br /&gt;
&lt;br /&gt;
Tested by [[User:Phae|Frances Berriman]] 2006-07-21.&lt;br /&gt;
&lt;br /&gt;
* 31 dash include dash Mozilla Firefox&lt;br /&gt;
* Page has no links&lt;br /&gt;
* 31 dash include&lt;br /&gt;
&lt;br /&gt;
Conclusion: the hyperlink include pattern presented no usability issues for this screen reader.&lt;br /&gt;
&lt;br /&gt;
=== Proprietary attribute ===&lt;br /&gt;
HTML tidy on the [http://allinthehead.com/demo/include.html test page] gives:&lt;br /&gt;
:Warning: &amp;lt;a&amp;gt; proprietary attribute &amp;quot;data&amp;quot;&lt;br /&gt;
&lt;br /&gt;
The [http://validator.w3.org/check?verbose=1&amp;amp;uri=http%3A%2F%2Fallinthehead.com%2Fdemo%2Finclude.html W3C validator is similarly unimpressed].&lt;br /&gt;
&lt;br /&gt;
[[User:AndyMabbett|AndyMabbett]] 14:22, 22 Oct 2006 (PDT)&lt;br /&gt;
&lt;br /&gt;
==== Use href ====&lt;br /&gt;
To clarify, links on the [http://allinthehead.com/demo/include.html test page] should be changed to use the &amp;lt;code&amp;gt;href&amp;lt;/code&amp;gt; attribute as described at [[include-pattern]] (without &amp;lt;code&amp;gt;href&amp;lt;/code&amp;gt; attributes, the elements probably won't register as hyperlinks, but anchors). Set &amp;lt;code&amp;gt;title=&amp;quot;&amp;quot;&amp;lt;/code&amp;gt; to fix empty link behavior for many assistive devices.  --[[User:RichHall|RichHall]] 23:31, 22 Oct 2006 (PDT)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Test page corrected ====&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
== Unclear status ==&lt;br /&gt;
&lt;br /&gt;
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)&lt;br /&gt;
&lt;br /&gt;
* [[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]].&lt;br /&gt;
**And that is not clear, either from the main Wiki page or [[include-pattern]]. [[User:AndyMabbett|AndyMabbett]] 16:40, 18 Oct 2006 (PDT)&lt;br /&gt;
***ACCEPTED.  Will further clarify relationship between patterns and formats. [[User:Tantek|Tantek]] 16:48, 18 Oct 2006 (PDT)&lt;br /&gt;
&lt;br /&gt;
==Parsing for include-pattern==&lt;br /&gt;
&lt;br /&gt;
''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. -Tantek''&lt;br /&gt;
&lt;br /&gt;
''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''&lt;br /&gt;
&lt;br /&gt;
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:&lt;br /&gt;
&amp;lt;blockquote&amp;gt;I'm really wondering why the &amp;lt;code&amp;gt;object&amp;lt;/code&amp;gt; stuff doesn't point back to the entire vCard. I don't understand why the spec has it point to individual items.&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
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 &amp;lt;code&amp;gt;object&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Currently, to overcome this a parser needs to follow this logic: &lt;br /&gt;
::IF I don't find an &amp;lt;code&amp;gt;fn&amp;lt;/code&amp;gt;, look for an &amp;lt;code&amp;gt;object&amp;lt;/code&amp;gt;. IF there is an &amp;lt;code&amp;gt;object&amp;lt;/code&amp;gt;, do a &amp;lt;code&amp;gt;getelementbyid&amp;lt;/code&amp;gt; on that &amp;lt;code&amp;gt;ID&amp;lt;/code&amp;gt;, but yet there was nothing about that &amp;lt;code&amp;gt;object&amp;lt;/code&amp;gt; that said that the content I was looking for in the other card was an &amp;lt;code&amp;gt;fn&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Two things may help in overcoming this difficulty:&lt;br /&gt;
&lt;br /&gt;
# 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&lt;br /&gt;
# Include the element of the reference, where the class attribute on &amp;lt;code&amp;gt;&amp;lt;object&amp;gt;&amp;lt;/code&amp;gt; has &amp;quot;include&amp;quot; plus the element that needs to be included. For example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&amp;lt;object&lt;br /&gt;
class=&amp;quot;include fn&amp;quot; data=&amp;quot;#vcard-name&amp;quot;&amp;gt;myname&amp;lt;/object&amp;gt; &amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Additionally, I pointed out that using the &amp;lt;code&amp;gt;&amp;lt;object&amp;gt;&amp;lt;/code&amp;gt; element to contain the reference makes Microsoft's Internet Explorer throw an error &amp;quot;Your current security settings prohibit ActiveX controls on this page. As a result, the page may not display correctly.&amp;quot; Of course, there is no ActiveX content on an include-pattern. &lt;br /&gt;
&lt;br /&gt;
[[User:Bob Jonkman|Bob Jonkman]] 21:15, 2 Jan 2007 (PST)#&lt;br /&gt;
&lt;br /&gt;
==Concatenating values==&lt;br /&gt;
&lt;br /&gt;
I feel that there should be a way to &amp;quot;include&amp;quot; data from two places, in one microformat property. For instance:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&amp;lt;span id=&amp;quot;summaryA&amp;quot; class=&amp;quot;summary&amp;quot;&amp;gt;Kidderminster Branch Indoor Meeting&amp;lt;/span&amp;gt;&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&amp;lt;span id=&amp;quot;summaryB&amp;gt;Janaury&amp;lt;/span&amp;gt;&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and later&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&amp;lt;object data=&amp;quot;#summaryB+#summaryA&amp;quot; class=&amp;quot;include&amp;quot;&amp;gt;&amp;lt;/object&amp;gt;&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt; &lt;br /&gt;
&lt;br /&gt;
would give a summary of:&lt;br /&gt;
&lt;br /&gt;
:'''January Kidderminster Branch Indoor Meeting'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
It may even be possible to include extra data:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&amp;lt;span id=&amp;quot;summaryC&amp;gt;Fred Smith&amp;lt;/span&amp;gt;&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&amp;lt;object data=&amp;quot;#summaryA+ with +#summaryC&amp;quot; class=&amp;quot;include&amp;quot;&amp;gt;&amp;lt;/object&amp;gt;&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt; &lt;br /&gt;
&lt;br /&gt;
to give:&lt;br /&gt;
&lt;br /&gt;
:'''Kidderminster Branch Indoor Meeting with Fred Smith'''&lt;br /&gt;
&lt;br /&gt;
[[User:AndyMabbett|Andy Mabbett]] 14:33, 8 Jan 2007 (PST)&lt;br /&gt;
&lt;br /&gt;
Why not use&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&amp;lt;span class=&amp;quot;value&amp;quot;&amp;gt;&amp;lt;object data=&amp;quot;#summaryA&amp;quot; class=&amp;quot;include&amp;quot;&amp;gt;&amp;lt;/object&amp;gt; with &amp;lt;object data=&amp;quot;#summaryB&amp;quot; class=&amp;quot;include&amp;quot;&amp;gt;&amp;lt;/object&amp;gt;&amp;lt;/span&amp;gt;&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt; &lt;br /&gt;
&lt;br /&gt;
to build&lt;br /&gt;
&lt;br /&gt;
:'''Kidderminster Branch Indoor Meeting with Fred Smith'''&lt;br /&gt;
&lt;br /&gt;
[[User:DerrickPallas|Derrick Pallas]] 11:15, 31 Jan 2007 (PST)&lt;br /&gt;
&lt;br /&gt;
:Neat solution! Can anyone say whether current parsers accept this? [[User:AndyMabbett|Andy Mabbett]] 12:18, 31 Jan 2007 (PST)&lt;br /&gt;
&lt;br /&gt;
: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=&amp;quot;value&amp;quot; elements that could result from this.  [[User:DerrickPallas|Derrick Pallas]] 12:35, 31 Jan 2007 (PST)&lt;br /&gt;
&lt;br /&gt;
==Related Pages==&lt;br /&gt;
{{include-pattern-related-pages}}&lt;/div&gt;</summary>
		<author><name>JiriKopsa</name></author>
	</entry>
</feed>