<?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=MicahDubinko</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=MicahDubinko"/>
	<link rel="alternate" type="text/html" href="https://microformats.org/wiki/Special:Contributions/MicahDubinko"/>
	<updated>2026-04-13T18:57:49Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.38.4</generator>
	<entry>
		<id>https://microformats.org/wiki/index.php?title=parsing-microformats&amp;diff=28305</id>
		<title>parsing-microformats</title>
		<link rel="alternate" type="text/html" href="https://microformats.org/wiki/index.php?title=parsing-microformats&amp;diff=28305"/>
		<updated>2007-10-02T03:34:31Z</updated>

		<summary type="html">&lt;p&gt;MicahDubinko: Still a bug in the XPath, cleaning it up and making the structure more evident&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Parsing Microformats =&lt;br /&gt;
&lt;br /&gt;
Microformat parsing mechanisms that depend on documents having even minimal xml properties like well-formedness may fail when consuming non-well-formed content.  [http://tidy.sourceforge.net/ Tidy] or even better [http://people.apache.org/~andyc/neko/doc/html/ CyberNeko] may be a useful work around.&lt;br /&gt;
In particular  [http://suda.co.uk/projects/X2V/ X2V] uses XSLT, and [http://tidy.sourceforge.net/ tidy] to clean any non-well-formed input before processing it.&lt;br /&gt;
&lt;br /&gt;
== Parsing class values ==&lt;br /&gt;
&lt;br /&gt;
When parsing class values care must be taken:&lt;br /&gt;
# Class attributes may contain multiple class names, e.g: &amp;lt;code&amp;gt;class=&amp;quot;foo vcard bar&amp;quot;&amp;lt;/code&amp;gt;&lt;br /&gt;
# Class attributes may contain class names which contain the class name used by a microformat, e.g: &amp;lt;code&amp;gt;class=&amp;quot;foo&amp;lt;strong&amp;gt;vcard&amp;lt;/strong&amp;gt;bar&amp;quot;&amp;lt;/code&amp;gt; &amp;lt;code&amp;gt;class=&amp;quot;foo&amp;lt;strong&amp;gt;vcard&amp;lt;/strong&amp;gt;&amp;quot;&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;class=&amp;quot;&amp;lt;strong&amp;gt;vcard&amp;lt;/strong&amp;gt;bar&amp;quot;&amp;lt;/code&amp;gt;.&lt;br /&gt;
# Multiple class names are seperated by one or more whitespace charchters. &lt;br /&gt;
# Class names are case sensitive.&lt;br /&gt;
 &lt;br /&gt;
See http://www.w3.org/TR/html401/struct/global.html#h-7.5.2.&lt;br /&gt;
&lt;br /&gt;
=== JavaScript example ===&lt;br /&gt;
The [http://www.robertnyman.com/2005/11/07/the-ultimate-getelementsbyclassname/ Ultimate getElementsByClassName] JavaScript function may be useful. Then you can do:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
var adrs = document.getElementsByClassName(document, &amp;quot;*&amp;quot;, &amp;quot;adr&amp;quot;);&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
or even:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
var cities = document.getElementsByClassName(document, &amp;quot;*&amp;quot;, &amp;quot;locality&amp;quot;);&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== XSLT example ===&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 &amp;amp;lt;xsl:if test=&amp;quot;contains(&lt;br /&gt;
    concat (' ', normalize-space(@class),' '),&lt;br /&gt;
    ' &amp;lt;strong&amp;gt;vcard&amp;lt;/strong&amp;gt; '&lt;br /&gt;
    )&amp;quot; &amp;amp;gt; ...&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[http://balloon.hobix.com/xpath-generator xpath generator], to help you generate those long ugly xpath queries. [link broken as of 8 August 2006]&lt;br /&gt;
&lt;br /&gt;
== Parsing rel/rev values ==&lt;br /&gt;
&lt;br /&gt;
Parsing rel and rev values is similar to parsing class values except for the following differences:&lt;br /&gt;
&lt;br /&gt;
# rel and rev values should be separated by one space.&lt;br /&gt;
# rel and rev values are case insensitive.&lt;br /&gt;
&lt;br /&gt;
See http://www.w3.org/TR/html401/types.html#type-links.&lt;br /&gt;
&lt;br /&gt;
== See Also ==&lt;br /&gt;
&lt;br /&gt;
* [[xmdp-brainstorming]]&lt;/div&gt;</summary>
		<author><name>MicahDubinko</name></author>
	</entry>
	<entry>
		<id>https://microformats.org/wiki/index.php?title=parsing-microformats&amp;diff=21725</id>
		<title>parsing-microformats</title>
		<link rel="alternate" type="text/html" href="https://microformats.org/wiki/index.php?title=parsing-microformats&amp;diff=21725"/>
		<updated>2007-08-24T06:25:53Z</updated>

		<summary type="html">&lt;p&gt;MicahDubinko: fixing bug and improving XSLT code&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Parsing Microformats =&lt;br /&gt;
&lt;br /&gt;
Microformat parsing mechanisms that depend on documents having even minimal xml properties like well-formedness may fail when consuming non-well-formed content.  [http://tidy.sourceforge.net/ Tidy] or even better [http://people.apache.org/~andyc/neko/doc/html/ CyberNeko] may be a useful work around.&lt;br /&gt;
In particular  [http://suda.co.uk/projects/X2V/ X2V] uses XSLT, and [http://tidy.sourceforge.net/ tidy] to clean any non-well-formed input before processing it.&lt;br /&gt;
&lt;br /&gt;
== Parsing class values ==&lt;br /&gt;
&lt;br /&gt;
When parsing class values care must be taken:&lt;br /&gt;
# Class attributes may contain multiple class names, e.g: &amp;lt;code&amp;gt;class=&amp;quot;foo vcard bar&amp;quot;&amp;lt;/code&amp;gt;&lt;br /&gt;
# Class attributes may contain class names which contain the class name used by a microformat, e.g: &amp;lt;code&amp;gt;class=&amp;quot;foo&amp;lt;strong&amp;gt;vcard&amp;lt;/strong&amp;gt;bar&amp;quot;&amp;lt;/code&amp;gt; &amp;lt;code&amp;gt;class=&amp;quot;foo&amp;lt;strong&amp;gt;vcard&amp;lt;/strong&amp;gt;&amp;quot;&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;class=&amp;quot;&amp;lt;strong&amp;gt;vcard&amp;lt;/strong&amp;gt;bar&amp;quot;&amp;lt;/code&amp;gt;.&lt;br /&gt;
# Multiple class names are seperated by one or more whitespace charchters. &lt;br /&gt;
# Class names are case sensitive.&lt;br /&gt;
 &lt;br /&gt;
See http://www.w3.org/TR/html401/struct/global.html#h-7.5.2.&lt;br /&gt;
&lt;br /&gt;
=== JavaScript example ===&lt;br /&gt;
The [http://www.robertnyman.com/2005/11/07/the-ultimate-getelementsbyclassname/ Ultimate getElementsByClassName] JavaScript function may be useful. Then you can do:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
var adrs = document.getElementsByClassName(document, &amp;quot;*&amp;quot;, &amp;quot;adr&amp;quot;);&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
or even:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
var cities = document.getElementsByClassName(document, &amp;quot;*&amp;quot;, &amp;quot;locality&amp;quot;);&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== XSLT example ===&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 &amp;amp;lt;xsl:if test=&amp;quot;contains(&lt;br /&gt;
    concat (&lt;br /&gt;
        ' ',&lt;br /&gt;
        normalize-space(@class),&lt;br /&gt;
        ' ')&lt;br /&gt;
    ),&lt;br /&gt;
    ' &amp;lt;strong&amp;gt;vcard&amp;lt;/strong&amp;gt; '&lt;br /&gt;
  )&amp;quot; &amp;amp;gt; ...&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[http://balloon.hobix.com/xpath-generator xpath generator], to help you generate those long ugly xpath queries. [link broken as of 8 August 2006]&lt;br /&gt;
&lt;br /&gt;
== Parsing rel/rev values ==&lt;br /&gt;
&lt;br /&gt;
Parsing rel and rev values is similar to parsing class values except for the following differences:&lt;br /&gt;
&lt;br /&gt;
# rel and rev values should be separated by one space.&lt;br /&gt;
# rel and rev values are case insensitive.&lt;br /&gt;
&lt;br /&gt;
See http://www.w3.org/TR/html401/types.html#type-links.&lt;br /&gt;
&lt;br /&gt;
== See Also ==&lt;br /&gt;
&lt;br /&gt;
* [[xmdp-brainstorming]]&lt;/div&gt;</summary>
		<author><name>MicahDubinko</name></author>
	</entry>
</feed>