http://microformats.org/wiki/api.php?action=feedcontributions&user=BrettZamir&feedformat=atomMicroformats Wiki - User contributions [en]2024-03-29T07:12:45ZUser contributionsMediaWiki 1.38.4http://microformats.org/wiki/index.php?title=firefox-extensions&diff=35000firefox-extensions2008-12-09T10:04:24Z<p>BrettZamir: /* XSL Results */</p>
<hr />
<div><h1>Firefox Extensions</h1><br />
{{TOC-right}}<br />
<br />
A list of extensions for the [http://www.mozilla.com/ FireFox web browser], which detect or extract microformats. <br />
<br />
See [[user-interface]] for ways in which extensions could or do handle microformats.<br />
<br />
==Current==<br />
<br />
===BlueOrganiser===<br />
* [http://www.adaptiveblue.com/ BlueOrganiser] BlueOrganizer Indigo Edition, released in Feb 2008 features support for hCard, hCal, adr, rel and locality. hReview is not supported yet. The support is implemented via contextual tips and menus, helping the users to lookup maps, movies, restaurants, people's profiles and more. [http://www.adaptiveblue.com/releases.html BlueOrganizer Features Page] contains description and interactive examples.<br />
<br />
===Operator===<br />
<br />
[https://addons.mozilla.org/firefox/4106/ Operator] has rapidly found favour with microformat developers (not least for its functions as a validator) and end-users. It provides an architecture for microformat parsing which is likely to be incorporated into the core of future versions of Firefox.<br />
<br />
Latest release: 0.9<br />
<br />
See also:<br />
*[http://labs.mozilla.com/2006/12/introducing-operator Mozilla Labs' Operator announcement]<br />
*[http://www.kaply.com/weblog/ Operator author's blog]<br />
*[http://www.kaply.com/weblog/operator-user-scripts/ Customise Operator with 'user scripts'] (needed to add hReview support)<br />
<br />
===Tails===<br />
*[http://blog.codeeg.com/tails-firefox-extension-03/ Tails]<br />
**[http://code.google.com/p/tails-firefox-extension/ Tails on Google Code]<br />
<br />
===Tails Export===<br />
*[https://addons.mozilla.org/firefox/2240/ Tails Export]<br />
<br />
===Web Cards===<br />
*[http://www.whymicroformats.com/webcards/index.html Web Cards]<br />
<br />
==Generic==<br />
While these extensions include no microformat-specific tools, the can be of use to microformat publishers (or advanced users).<br />
<br />
=== Glossary of Terms ===<br />
Gez Lemon's [http://juicystudio.com/article/glossary-terms-extension.php Glossary of Terms] displays values from <code>ABBR</code> (and <code>ACRONYM</code>) elements, by listing them at the foot of the page. This extension does not work with Firefox 3, as it does not provide secure updates.<br />
<br />
===Web Developer===<br />
The [http://chrispederick.com/work/webdeveloper/ Web Developer extension] has several features which greatly aid microformat publishers, not least the ability to display <code>class</code>, <code>ID</code>, <code>object</code> and <code>abbr</code> values in-line.<br />
<br />
=== XqUSEme ===<br />
Performs W3C-standard XQuery in Firefox. XQuery at its simplest is XPath, but allows more powerful reshaping of XML (cycling through, sorting, joining sources, etc.)--essentially SQL for XML (though also with some scripting power built in as well). [https://addons.mozilla.org/en-US/firefox/addon/5515 XqUSEme] uses Firefox's own parsing (and a few tricks) to clean up poorly-formed HTML in addition to XML.<br />
<br />
The newest version supports Greasemonkey-like application of XQueries to specific sites, enabling potential sharing and reuse.<br />
<br />
See also [[parsing-microformats#XQuery_example|an example of using XQuery]].<br />
<br />
==XSL Results==<br />
<br />
[https://addons.mozilla.org/en-US/firefox/addon/5023 XSL Results] allows one to apply XSLT stylesheets to a currently loaded webpage (which can be edited) or to a loaded file. Firefox's own parsing (and a few tricks) to clean up poorly-formed HTML in addition to XML.<br />
<br />
The newest version supports Greasemonkey-like application of XSLT stylesheets to specific sites, enabling potential sharing and reuse.<br />
<br />
See also [[parsing-microformats#XSLT_example|an example of using XSLT]].<br />
<br />
==Forthcoming==<br />
<br />
===LinkAlert===<br />
*[http://conlan89.googlepages.com/linkalert LinkAlert]<br />
**Will consider adding rel in a future update.<br />
<br />
===ReminderFox===<br />
*[http://reminderfox.mozdev.org/ ReminderFox] <br />
**Have hCalendar support on the [http://reminderfox.mozdev.org/userrequests.html ReminderFox "to do" list].<br />
<br />
===Firefox developments===<br />
<br />
Mozilla are "brainstorming" developments for Firefox 3.0 and beyond, and have [http://wiki.mozilla.org/Firefox/Feature_Brainstorming:Microformat_Handling a page on microformat handling]. See also [http://wiki.mozilla.org/Firefox3/Firefox_Requirements Firefox 3 Requirements].<br />
<br />
== Netscape Navigator ==<br />
* Version 9.0+ supports [[Firefox extensions]], e.g.<br />
** [http://notizblog.org/2007/10/21/operator-unter-navigator-90/ Operator unter Navigator 9.0]<br />
<br />
==See also==<br />
*[[bookmarklets]]<br />
*[[greasemonkey]] - a powerful tool for customizing Firefox.<br />
*[[operator-phone-tests]] - a page listing tests of Operator's "Send to Bluetooth device" options with results<br />
*[https://addons.mozilla.org/search.php?app=firefox&q=RSS RSS extensions] - for viewing hAtom feeds via third-party converters</div>BrettZamirhttp://microformats.org/wiki/index.php?title=firefox-extensions&diff=34999firefox-extensions2008-12-09T10:03:45Z<p>BrettZamir: /* XqUSEme */</p>
<hr />
<div><h1>Firefox Extensions</h1><br />
{{TOC-right}}<br />
<br />
A list of extensions for the [http://www.mozilla.com/ FireFox web browser], which detect or extract microformats. <br />
<br />
See [[user-interface]] for ways in which extensions could or do handle microformats.<br />
<br />
==Current==<br />
<br />
===BlueOrganiser===<br />
* [http://www.adaptiveblue.com/ BlueOrganiser] BlueOrganizer Indigo Edition, released in Feb 2008 features support for hCard, hCal, adr, rel and locality. hReview is not supported yet. The support is implemented via contextual tips and menus, helping the users to lookup maps, movies, restaurants, people's profiles and more. [http://www.adaptiveblue.com/releases.html BlueOrganizer Features Page] contains description and interactive examples.<br />
<br />
===Operator===<br />
<br />
[https://addons.mozilla.org/firefox/4106/ Operator] has rapidly found favour with microformat developers (not least for its functions as a validator) and end-users. It provides an architecture for microformat parsing which is likely to be incorporated into the core of future versions of Firefox.<br />
<br />
Latest release: 0.9<br />
<br />
See also:<br />
*[http://labs.mozilla.com/2006/12/introducing-operator Mozilla Labs' Operator announcement]<br />
*[http://www.kaply.com/weblog/ Operator author's blog]<br />
*[http://www.kaply.com/weblog/operator-user-scripts/ Customise Operator with 'user scripts'] (needed to add hReview support)<br />
<br />
===Tails===<br />
*[http://blog.codeeg.com/tails-firefox-extension-03/ Tails]<br />
**[http://code.google.com/p/tails-firefox-extension/ Tails on Google Code]<br />
<br />
===Tails Export===<br />
*[https://addons.mozilla.org/firefox/2240/ Tails Export]<br />
<br />
===Web Cards===<br />
*[http://www.whymicroformats.com/webcards/index.html Web Cards]<br />
<br />
==Generic==<br />
While these extensions include no microformat-specific tools, the can be of use to microformat publishers (or advanced users).<br />
<br />
=== Glossary of Terms ===<br />
Gez Lemon's [http://juicystudio.com/article/glossary-terms-extension.php Glossary of Terms] displays values from <code>ABBR</code> (and <code>ACRONYM</code>) elements, by listing them at the foot of the page. This extension does not work with Firefox 3, as it does not provide secure updates.<br />
<br />
===Web Developer===<br />
The [http://chrispederick.com/work/webdeveloper/ Web Developer extension] has several features which greatly aid microformat publishers, not least the ability to display <code>class</code>, <code>ID</code>, <code>object</code> and <code>abbr</code> values in-line.<br />
<br />
=== XqUSEme ===<br />
Performs W3C-standard XQuery in Firefox. XQuery at its simplest is XPath, but allows more powerful reshaping of XML (cycling through, sorting, joining sources, etc.)--essentially SQL for XML (though also with some scripting power built in as well). [https://addons.mozilla.org/en-US/firefox/addon/5515 XqUSEme] uses Firefox's own parsing (and a few tricks) to clean up poorly-formed HTML in addition to XML.<br />
<br />
The newest version supports Greasemonkey-like application of XQueries to specific sites, enabling potential sharing and reuse.<br />
<br />
See also [[parsing-microformats#XQuery_example|an example of using XQuery]].<br />
<br />
==XSL Results==<br />
<br />
[https://addons.mozilla.org/en-US/firefox/addon/5023 XSL Results] allows one to apply XSLT stylesheets to a currently loaded webpage (which can be edited) or to a loaded file. Firefox's own parsing (and a few tricks) to clean up poorly-formed HTML in addition to XML.<br />
<br />
The newest version (not out of the sandbox as of Aug. 21, 2008) supports Greasemonkey-like application of XSLT stylesheets to specific sites, enabling potential sharing and reuse.<br />
<br />
See also [[parsing-microformats#XSLT_example|an example of using XSLT]].<br />
<br />
==Forthcoming==<br />
<br />
===LinkAlert===<br />
*[http://conlan89.googlepages.com/linkalert LinkAlert]<br />
**Will consider adding rel in a future update.<br />
<br />
===ReminderFox===<br />
*[http://reminderfox.mozdev.org/ ReminderFox] <br />
**Have hCalendar support on the [http://reminderfox.mozdev.org/userrequests.html ReminderFox "to do" list].<br />
<br />
===Firefox developments===<br />
<br />
Mozilla are "brainstorming" developments for Firefox 3.0 and beyond, and have [http://wiki.mozilla.org/Firefox/Feature_Brainstorming:Microformat_Handling a page on microformat handling]. See also [http://wiki.mozilla.org/Firefox3/Firefox_Requirements Firefox 3 Requirements].<br />
<br />
== Netscape Navigator ==<br />
* Version 9.0+ supports [[Firefox extensions]], e.g.<br />
** [http://notizblog.org/2007/10/21/operator-unter-navigator-90/ Operator unter Navigator 9.0]<br />
<br />
==See also==<br />
*[[bookmarklets]]<br />
*[[greasemonkey]] - a powerful tool for customizing Firefox.<br />
*[[operator-phone-tests]] - a page listing tests of Operator's "Send to Bluetooth device" options with results<br />
*[https://addons.mozilla.org/search.php?app=firefox&q=RSS RSS extensions] - for viewing hAtom feeds via third-party converters</div>BrettZamirhttp://microformats.org/wiki/index.php?title=firefox-extensions&diff=32258firefox-extensions2008-08-21T02:08:17Z<p>BrettZamir: /* XSL Results */ sp.</p>
<hr />
<div><h1>Firefox Extensions</h1><br />
{{TOC-right}}<br />
<br />
A list of extensions for the [http://www.mozilla.com/ FireFox web browser], which detect or extract microformats. <br />
<br />
See [[user-interface]] for ways in which extensions could or do handle microformats.<br />
<br />
==Current==<br />
<br />
===BlueOrganiser===<br />
* [http://www.adaptiveblue.com/ BlueOrganiser] BlueOrganizer Indigo Edition, released in Feb 2008 features support for hCard, hCal, adr, rel and locality. hReview is not supported yet. The support is implemented via contextual tips and menus, helping the users to lookup maps, movies, restaurants, people's profiles and more. [http://www.adaptiveblue.com/releases.html BlueOrganizer Features Page] contains description and interactive examples.<br />
<br />
===Operator===<br />
<br />
[https://addons.mozilla.org/firefox/4106/ Operator] has rapidly found favour with microformat developers (not least for its functions as a validator) and end-users. It provides an architecture for microformat parsing which is likely to be incorporated into the core of future versions of Firefox.<br />
<br />
Latest release: 0.9<br />
<br />
See also:<br />
*[http://labs.mozilla.com/2006/12/introducing-operator Mozilla Labs' Operator announcement]<br />
*[http://www.kaply.com/weblog/ Operator author's blog]<br />
*[http://www.kaply.com/weblog/operator-user-scripts/ Customise Operator with 'user scripts'] (needed to add hReview support)<br />
<br />
===Tails===<br />
*[http://blog.codeeg.com/tails-firefox-extension-03/ Tails]<br />
**[http://code.google.com/p/tails-firefox-extension/ Tails on Google Code]<br />
<br />
===Tails Export===<br />
*[https://addons.mozilla.org/firefox/2240/ Tails Export]<br />
<br />
===Web Cards===<br />
*[http://www.whymicroformats.com/webcards/index.html Web Cards]<br />
<br />
==Generic==<br />
While these extensions include no microformat-specific tools, the can be of use to microformat publishers (or advanced users).<br />
<br />
=== Glossary of Terms ===<br />
Gez Lemon's [http://juicystudio.com/article/glossary-terms-extension.php Glossary of Terms] displays values from <code>ABBR</code> (and <code>ACRONYM</code>) elements, by listing them at the foot of the page. This extension does not work with Firefox 3, as it does not provide secure updates.<br />
<br />
===Web Developer===<br />
The [http://chrispederick.com/work/webdeveloper/ Web Developer extension] has several features which greatly aid microformat publishers, not least the ability to display <code>class</code>, <code>ID</code>, <code>object</code> and <code>abbr</code> values in-line.<br />
<br />
=== XqUSEme ===<br />
Performs W3C-standard XQuery in Firefox. XQuery at its simplest is XPath, but allows more powerful reshaping of XML (cycling through, sorting, joining sources, etc.)--essentially SQL for XML (though also with some scripting power built in as well). [https://addons.mozilla.org/en-US/firefox/addon/5515 XqUSEme] uses Firefox's own parsing (and a few tricks) to clean up poorly-formed HTML in addition to XML.<br />
<br />
The newest version (not out of the sandbox as of Aug. 21, 2008) supports Greasemonkey-like application of XQueries to specific sites, enabling potential sharing and reuse.<br />
<br />
See also [[parsing-microformats#XQuery_example|an example of using XQuery]].<br />
<br />
==XSL Results==<br />
<br />
[https://addons.mozilla.org/en-US/firefox/addon/5023 XSL Results] allows one to apply XSLT stylesheets to a currently loaded webpage (which can be edited) or to a loaded file. Firefox's own parsing (and a few tricks) to clean up poorly-formed HTML in addition to XML.<br />
<br />
The newest version (not out of the sandbox as of Aug. 21, 2008) supports Greasemonkey-like application of XSLT stylesheets to specific sites, enabling potential sharing and reuse.<br />
<br />
See also [[parsing-microformats#XSLT_example|an example of using XSLT]].<br />
<br />
==Forthcoming==<br />
<br />
===LinkAlert===<br />
*[http://conlan89.googlepages.com/linkalert LinkAlert]<br />
**Will consider adding rel in a future update.<br />
<br />
===ReminderFox===<br />
*[http://reminderfox.mozdev.org/ ReminderFox] <br />
**Have hCalendar support on the [http://reminderfox.mozdev.org/userrequests.html ReminderFox "to do" list].<br />
<br />
===Firefox developments===<br />
<br />
Mozilla are "brainstorming" developments for Firefox 3.0 and beyond, and have [http://wiki.mozilla.org/Firefox/Feature_Brainstorming:Microformat_Handling a page on microformat handling]. See also [http://wiki.mozilla.org/Firefox3/Firefox_Requirements Firefox 3 Requirements].<br />
<br />
== Netscape Navigator ==<br />
* Version 9.0+ supports [[Firefox extensions]], e.g.<br />
** [http://notizblog.org/2007/10/21/operator-unter-navigator-90/ Operator unter Navigator 9.0]<br />
<br />
==See also==<br />
*[[bookmarklets]]<br />
*[[greasemonkey]] - a powerful tool for customizing Firefox.<br />
*[[operator-phone-tests]] - a page listing tests of Operator's "Send to Bluetooth device" options with results<br />
*[https://addons.mozilla.org/search.php?app=firefox&q=RSS RSS extensions] - for viewing hAtom feeds via third-party converters</div>BrettZamirhttp://microformats.org/wiki/index.php?title=parsing-microformats&diff=31516parsing-microformats2008-08-21T02:07:32Z<p>BrettZamir: /* XSLT example */ +detail about JS</p>
<hr />
<div>= Parsing Microformats =<br />
<br />
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.<br />
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.<br />
<br />
== Parsing class values ==<br />
<br />
When parsing class values care must be taken:<br />
# Class attributes may contain multiple class names, e.g: <code>class="foo vcard bar"</code><br />
# Class attributes may contain class names which contain the class name used by a microformat, e.g: <code>class="foo<strong>vcard</strong>bar"</code> <code>class="foo<strong>vcard</strong>"</code>, <code>class="<strong>vcard</strong>bar"</code>.<br />
# Multiple class names are seperated by one or more whitespace charchters. <br />
# Class names are case sensitive.<br />
<br />
See http://www.w3.org/TR/html401/struct/global.html#h-7.5.2.<br />
<br />
=== JavaScript example ===<br />
The [http://www.robertnyman.com/2005/11/07/the-ultimate-getelementsbyclassname/ Ultimate getElementsByClassName] JavaScript function may be useful. Then you can do:<br />
<br />
<code><pre><br />
var adrs = document.getElementsByClassName(document, "*", "adr");<br />
</pre></code><br />
<br />
or even:<br />
<br />
<code><pre><br />
var cities = document.getElementsByClassName(document, "*", "locality");<br />
</pre></code><br />
<br />
=== XSLT example ===<br />
<code><br />
&lt;xsl:if test="contains(<br />
concat (' ', normalize-space(@class),' '),<br />
' <strong>vcard</strong> '<br />
)" &gt; ...<br />
</code><br />
<br />
JavaScript can also perform XSLT natively in browsers like Firefox. See [[firefox-extensions#XSL_Results|Firefox extensions]] for performing XSL transformations in Firefox without JavaScript.<br />
<br />
=== XQuery example ===<br />
<br />
Also using XPath...<br />
<pre>&lt;div style="background-color:yellow;"><br />
{<br />
for $a in doc()//div[@class='vcard']<br />
let $b := $a/div[@class='fn org' or @class='org fn']<br />
let $c := $a/div[@class='adr']<br />
return ($b, $c, &lt;br />)<br />
}<br />
&lt;/div><br />
</pre><br />
<br />
For example, this could be used against http://technorati.com/about/contact.html. See [[firefox-extensions#XqUSEme|Firefox extensions]] for getting XQuery in Firefox.<br />
<br />
Note that the 'class' tests above should really use the more complicated XPath expression used within the XSLT example (in order to allow for other classes to be used on the element, variations in whitespace, etc.), but it is simplified above for demonstration purposes.<br />
<br />
Simple XPath expressions can also be used, as these are considered to be valid XQueries.<br />
<br />
== Parsing rel/rev values ==<br />
<br />
Parsing rel and rev values is similar to parsing class values except for the following differences:<br />
<br />
# rel and rev values should be separated by one space.<br />
# rel and rev values are case insensitive.<br />
<br />
See http://www.w3.org/TR/html401/types.html#type-links.<br />
<br />
== See Also ==<br />
<br />
* [[xmdp-brainstorming]]</div>BrettZamirhttp://microformats.org/wiki/index.php?title=parsing-microformats&diff=28330parsing-microformats2008-08-21T02:04:39Z<p>BrettZamir: /* JavaScript example */ +pre</p>
<hr />
<div>= Parsing Microformats =<br />
<br />
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.<br />
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.<br />
<br />
== Parsing class values ==<br />
<br />
When parsing class values care must be taken:<br />
# Class attributes may contain multiple class names, e.g: <code>class="foo vcard bar"</code><br />
# Class attributes may contain class names which contain the class name used by a microformat, e.g: <code>class="foo<strong>vcard</strong>bar"</code> <code>class="foo<strong>vcard</strong>"</code>, <code>class="<strong>vcard</strong>bar"</code>.<br />
# Multiple class names are seperated by one or more whitespace charchters. <br />
# Class names are case sensitive.<br />
<br />
See http://www.w3.org/TR/html401/struct/global.html#h-7.5.2.<br />
<br />
=== JavaScript example ===<br />
The [http://www.robertnyman.com/2005/11/07/the-ultimate-getelementsbyclassname/ Ultimate getElementsByClassName] JavaScript function may be useful. Then you can do:<br />
<br />
<code><pre><br />
var adrs = document.getElementsByClassName(document, "*", "adr");<br />
</pre></code><br />
<br />
or even:<br />
<br />
<code><pre><br />
var cities = document.getElementsByClassName(document, "*", "locality");<br />
</pre></code><br />
<br />
=== XSLT example ===<br />
<code><br />
&lt;xsl:if test="contains(<br />
concat (' ', normalize-space(@class),' '),<br />
' <strong>vcard</strong> '<br />
)" &gt; ...<br />
</code><br />
<br />
See [[firefox-extensions#XSL_Results|Firefox extensions]] for getting XSL transformations in Firefox.<br />
<br />
=== XQuery example ===<br />
<br />
Also using XPath...<br />
<pre>&lt;div style="background-color:yellow;"><br />
{<br />
for $a in doc()//div[@class='vcard']<br />
let $b := $a/div[@class='fn org' or @class='org fn']<br />
let $c := $a/div[@class='adr']<br />
return ($b, $c, &lt;br />)<br />
}<br />
&lt;/div><br />
</pre><br />
<br />
For example, this could be used against http://technorati.com/about/contact.html. See [[firefox-extensions#XqUSEme|Firefox extensions]] for getting XQuery in Firefox.<br />
<br />
Note that the 'class' tests above should really use the more complicated XPath expression used within the XSLT example (in order to allow for other classes to be used on the element, variations in whitespace, etc.), but it is simplified above for demonstration purposes.<br />
<br />
Simple XPath expressions can also be used, as these are considered to be valid XQueries.<br />
<br />
== Parsing rel/rev values ==<br />
<br />
Parsing rel and rev values is similar to parsing class values except for the following differences:<br />
<br />
# rel and rev values should be separated by one space.<br />
# rel and rev values are case insensitive.<br />
<br />
See http://www.w3.org/TR/html401/types.html#type-links.<br />
<br />
== See Also ==<br />
<br />
* [[xmdp-brainstorming]]</div>BrettZamirhttp://microformats.org/wiki/index.php?title=parsing-microformats&diff=28329parsing-microformats2008-08-21T02:03:45Z<p>BrettZamir: /* XQuery example */ grammar</p>
<hr />
<div>= Parsing Microformats =<br />
<br />
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.<br />
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.<br />
<br />
== Parsing class values ==<br />
<br />
When parsing class values care must be taken:<br />
# Class attributes may contain multiple class names, e.g: <code>class="foo vcard bar"</code><br />
# Class attributes may contain class names which contain the class name used by a microformat, e.g: <code>class="foo<strong>vcard</strong>bar"</code> <code>class="foo<strong>vcard</strong>"</code>, <code>class="<strong>vcard</strong>bar"</code>.<br />
# Multiple class names are seperated by one or more whitespace charchters. <br />
# Class names are case sensitive.<br />
<br />
See http://www.w3.org/TR/html401/struct/global.html#h-7.5.2.<br />
<br />
=== JavaScript example ===<br />
The [http://www.robertnyman.com/2005/11/07/the-ultimate-getelementsbyclassname/ Ultimate getElementsByClassName] JavaScript function may be useful. Then you can do:<br />
<br />
<code><br />
var adrs = document.getElementsByClassName(document, "*", "adr");<br />
</code><br />
<br />
or even:<br />
<br />
<code><br />
var cities = document.getElementsByClassName(document, "*", "locality");<br />
</code><br />
<br />
=== XSLT example ===<br />
<code><br />
&lt;xsl:if test="contains(<br />
concat (' ', normalize-space(@class),' '),<br />
' <strong>vcard</strong> '<br />
)" &gt; ...<br />
</code><br />
<br />
See [[firefox-extensions#XSL_Results|Firefox extensions]] for getting XSL transformations in Firefox.<br />
<br />
=== XQuery example ===<br />
<br />
Also using XPath...<br />
<pre>&lt;div style="background-color:yellow;"><br />
{<br />
for $a in doc()//div[@class='vcard']<br />
let $b := $a/div[@class='fn org' or @class='org fn']<br />
let $c := $a/div[@class='adr']<br />
return ($b, $c, &lt;br />)<br />
}<br />
&lt;/div><br />
</pre><br />
<br />
For example, this could be used against http://technorati.com/about/contact.html. See [[firefox-extensions#XqUSEme|Firefox extensions]] for getting XQuery in Firefox.<br />
<br />
Note that the 'class' tests above should really use the more complicated XPath expression used within the XSLT example (in order to allow for other classes to be used on the element, variations in whitespace, etc.), but it is simplified above for demonstration purposes.<br />
<br />
Simple XPath expressions can also be used, as these are considered to be valid XQueries.<br />
<br />
== Parsing rel/rev values ==<br />
<br />
Parsing rel and rev values is similar to parsing class values except for the following differences:<br />
<br />
# rel and rev values should be separated by one space.<br />
# rel and rev values are case insensitive.<br />
<br />
See http://www.w3.org/TR/html401/types.html#type-links.<br />
<br />
== See Also ==<br />
<br />
* [[xmdp-brainstorming]]</div>BrettZamirhttp://microformats.org/wiki/index.php?title=parsing-microformats&diff=28328parsing-microformats2008-08-21T02:02:23Z<p>BrettZamir: clarification on XQuery and XSL cross-link</p>
<hr />
<div>= Parsing Microformats =<br />
<br />
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.<br />
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.<br />
<br />
== Parsing class values ==<br />
<br />
When parsing class values care must be taken:<br />
# Class attributes may contain multiple class names, e.g: <code>class="foo vcard bar"</code><br />
# Class attributes may contain class names which contain the class name used by a microformat, e.g: <code>class="foo<strong>vcard</strong>bar"</code> <code>class="foo<strong>vcard</strong>"</code>, <code>class="<strong>vcard</strong>bar"</code>.<br />
# Multiple class names are seperated by one or more whitespace charchters. <br />
# Class names are case sensitive.<br />
<br />
See http://www.w3.org/TR/html401/struct/global.html#h-7.5.2.<br />
<br />
=== JavaScript example ===<br />
The [http://www.robertnyman.com/2005/11/07/the-ultimate-getelementsbyclassname/ Ultimate getElementsByClassName] JavaScript function may be useful. Then you can do:<br />
<br />
<code><br />
var adrs = document.getElementsByClassName(document, "*", "adr");<br />
</code><br />
<br />
or even:<br />
<br />
<code><br />
var cities = document.getElementsByClassName(document, "*", "locality");<br />
</code><br />
<br />
=== XSLT example ===<br />
<code><br />
&lt;xsl:if test="contains(<br />
concat (' ', normalize-space(@class),' '),<br />
' <strong>vcard</strong> '<br />
)" &gt; ...<br />
</code><br />
<br />
See [[firefox-extensions#XSL_Results|Firefox extensions]] for getting XSL transformations in Firefox.<br />
<br />
=== XQuery example ===<br />
<br />
Also using XPath...<br />
<pre>&lt;div style="background-color:yellow;"><br />
{<br />
for $a in doc()//div[@class='vcard']<br />
let $b := $a/div[@class='fn org' or @class='org fn']<br />
let $c := $a/div[@class='adr']<br />
return ($b, $c, &lt;br />)<br />
}<br />
&lt;/div><br />
</pre><br />
<br />
For example, this could be used against http://technorati.com/about/contact.html. See [[firefox-extensions#XqUSEme|Firefox extensions]] for getting XQuery in Firefox.<br />
<br />
Note that the 'class' test above should really use the more complicated XPath expression used within the XSLT example (in order to allow for other classes to be used on the element, variations in whitespace, etc.), but it is simplified above for demonstration purposes.<br />
<br />
Simple XPath expressions can also be used, as these are considered to be valid XQueries.<br />
<br />
== Parsing rel/rev values ==<br />
<br />
Parsing rel and rev values is similar to parsing class values except for the following differences:<br />
<br />
# rel and rev values should be separated by one space.<br />
# rel and rev values are case insensitive.<br />
<br />
See http://www.w3.org/TR/html401/types.html#type-links.<br />
<br />
== See Also ==<br />
<br />
* [[xmdp-brainstorming]]</div>BrettZamirhttp://microformats.org/wiki/index.php?title=firefox-extensions&diff=28331firefox-extensions2008-08-21T01:55:17Z<p>BrettZamir: +XSL Results</p>
<hr />
<div><h1>Firefox Extensions</h1><br />
{{TOC-right}}<br />
<br />
A list of extensions for the [http://www.mozilla.com/ FireFox web browser], which detect or extract microformats. <br />
<br />
See [[user-interface]] for ways in which extensions could or do handle microformats.<br />
<br />
==Current==<br />
<br />
===BlueOrganiser===<br />
* [http://www.adaptiveblue.com/ BlueOrganiser] BlueOrganizer Indigo Edition, released in Feb 2008 features support for hCard, hCal, adr, rel and locality. hReview is not supported yet. The support is implemented via contextual tips and menus, helping the users to lookup maps, movies, restaurants, people's profiles and more. [http://www.adaptiveblue.com/releases.html BlueOrganizer Features Page] contains description and interactive examples.<br />
<br />
===Operator===<br />
<br />
[https://addons.mozilla.org/firefox/4106/ Operator] has rapidly found favour with microformat developers (not least for its functions as a validator) and end-users. It provides an architecture for microformat parsing which is likely to be incorporated into the core of future versions of Firefox.<br />
<br />
Latest release: 0.9<br />
<br />
See also:<br />
*[http://labs.mozilla.com/2006/12/introducing-operator Mozilla Labs' Operator announcement]<br />
*[http://www.kaply.com/weblog/ Operator author's blog]<br />
*[http://www.kaply.com/weblog/operator-user-scripts/ Customise Operator with 'user scripts'] (needed to add hReview support)<br />
<br />
===Tails===<br />
*[http://blog.codeeg.com/tails-firefox-extension-03/ Tails]<br />
**[http://code.google.com/p/tails-firefox-extension/ Tails on Google Code]<br />
<br />
===Tails Export===<br />
*[https://addons.mozilla.org/firefox/2240/ Tails Export]<br />
<br />
===Web Cards===<br />
*[http://www.whymicroformats.com/webcards/index.html Web Cards]<br />
<br />
==Generic==<br />
While these extensions include no microformat-specific tools, the can be of use to microformat publishers (or advanced users).<br />
<br />
=== Glossary of Terms ===<br />
Gez Lemon's [http://juicystudio.com/article/glossary-terms-extension.php Glossary of Terms] displays values from <code>ABBR</code> (and <code>ACRONYM</code>) elements, by listing them at the foot of the page. This extension does not work with Firefox 3, as it does not provide secure updates.<br />
<br />
===Web Developer===<br />
The [http://chrispederick.com/work/webdeveloper/ Web Developer extension] has several features which greatly aid microformat publishers, not least the ability to display <code>class</code>, <code>ID</code>, <code>object</code> and <code>abbr</code> values in-line.<br />
<br />
=== XqUSEme ===<br />
Performs W3C-standard XQuery in Firefox. XQuery at its simplest is XPath, but allows more powerful reshaping of XML (cycling through, sorting, joining sources, etc.)--essentially SQL for XML (though also with some scripting power built in as well). [https://addons.mozilla.org/en-US/firefox/addon/5515 XqUSEme] uses Firefox's own parsing (and a few tricks) to clean up poorly-formed HTML in addition to XML.<br />
<br />
The newest version (not out of the sandbox as of Aug. 21, 2008) supports Greasemonkey-like application of XQueries to specific sites, enabling potential sharing and reuse.<br />
<br />
See also [[parsing-microformats#XQuery_example|an example of using XQuery]].<br />
<br />
==XSL Results==<br />
<br />
[https://addons.mozilla.org/en-US/firefox/addon/5023 XSL Results] allows one to apply XSLT stylesheets to a currently loaded webpage (which can be edited) or to a loaded file. Firefox's own parsing (and a few tricks) to clean up poorly-formed HTML in addition to XML.<br />
<br />
The newest version (not out of the sandbox as of Aug. 21, 2008) supports Greasemonkey-like application of XSLT stylesheets to specific sites, enabling potential sharing and reuse.<br />
<br />
See also [[parsing-microformats#XSLT_example|an example of using XSLlT]].<br />
<br />
==Forthcoming==<br />
<br />
===LinkAlert===<br />
*[http://conlan89.googlepages.com/linkalert LinkAlert]<br />
**Will consider adding rel in a future update.<br />
<br />
===ReminderFox===<br />
*[http://reminderfox.mozdev.org/ ReminderFox] <br />
**Have hCalendar support on the [http://reminderfox.mozdev.org/userrequests.html ReminderFox "to do" list].<br />
<br />
===Firefox developments===<br />
<br />
Mozilla are "brainstorming" developments for Firefox 3.0 and beyond, and have [http://wiki.mozilla.org/Firefox/Feature_Brainstorming:Microformat_Handling a page on microformat handling]. See also [http://wiki.mozilla.org/Firefox3/Firefox_Requirements Firefox 3 Requirements].<br />
<br />
== Netscape Navigator ==<br />
* Version 9.0+ supports [[Firefox extensions]], e.g.<br />
** [http://notizblog.org/2007/10/21/operator-unter-navigator-90/ Operator unter Navigator 9.0]<br />
<br />
==See also==<br />
*[[bookmarklets]]<br />
*[[greasemonkey]] - a powerful tool for customizing Firefox.<br />
*[[operator-phone-tests]] - a page listing tests of Operator's "Send to Bluetooth device" options with results<br />
*[https://addons.mozilla.org/search.php?app=firefox&q=RSS RSS extensions] - for viewing hAtom feeds via third-party converters</div>BrettZamirhttp://microformats.org/wiki/index.php?title=parsing-microformats&diff=28327parsing-microformats2008-08-21T01:50:44Z<p>BrettZamir: /* XQuery example */ +xquery adjustment</p>
<hr />
<div>= Parsing Microformats =<br />
<br />
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.<br />
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.<br />
<br />
== Parsing class values ==<br />
<br />
When parsing class values care must be taken:<br />
# Class attributes may contain multiple class names, e.g: <code>class="foo vcard bar"</code><br />
# Class attributes may contain class names which contain the class name used by a microformat, e.g: <code>class="foo<strong>vcard</strong>bar"</code> <code>class="foo<strong>vcard</strong>"</code>, <code>class="<strong>vcard</strong>bar"</code>.<br />
# Multiple class names are seperated by one or more whitespace charchters. <br />
# Class names are case sensitive.<br />
<br />
See http://www.w3.org/TR/html401/struct/global.html#h-7.5.2.<br />
<br />
=== JavaScript example ===<br />
The [http://www.robertnyman.com/2005/11/07/the-ultimate-getelementsbyclassname/ Ultimate getElementsByClassName] JavaScript function may be useful. Then you can do:<br />
<br />
<code><br />
var adrs = document.getElementsByClassName(document, "*", "adr");<br />
</code><br />
<br />
or even:<br />
<br />
<code><br />
var cities = document.getElementsByClassName(document, "*", "locality");<br />
</code><br />
<br />
=== XSLT example ===<br />
<code><br />
&lt;xsl:if test="contains(<br />
concat (' ', normalize-space(@class),' '),<br />
' <strong>vcard</strong> '<br />
)" &gt; ...<br />
</code><br />
<br />
[http://balloon.hobix.com/xpath-generator xpath generator], to help you generate those long ugly xpath queries. [link broken as of 8 August 2006]<br />
<br />
=== XQuery example ===<br />
<br />
Also using XPath...<br />
<pre>&lt;div style="background-color:yellow;"><br />
{<br />
for $a in doc()//div[@class='vcard']<br />
let $b := $a/div[@class='fn org' or @class='org fn']<br />
let $c := $a/div[@class='adr']<br />
return ($b, $c, &lt;br />)<br />
}<br />
&lt;/div><br />
</pre><br />
<br />
For example, this could be used against http://technorati.com/about/contact.html. See [[firefox-extensions#XqUSEme|Firefox extensions]] for getting XQuery in Firefox.<br />
<br />
Simple XPath expressions can also be used.<br />
<br />
== Parsing rel/rev values ==<br />
<br />
Parsing rel and rev values is similar to parsing class values except for the following differences:<br />
<br />
# rel and rev values should be separated by one space.<br />
# rel and rev values are case insensitive.<br />
<br />
See http://www.w3.org/TR/html401/types.html#type-links.<br />
<br />
== See Also ==<br />
<br />
* [[xmdp-brainstorming]]</div>BrettZamirhttp://microformats.org/wiki/index.php?title=firefox-extensions&diff=28316firefox-extensions2008-08-20T13:31:58Z<p>BrettZamir: +example link</p>
<hr />
<div><h1>Firefox Extensions</h1><br />
{{TOC-right}}<br />
<br />
A list of extensions for the [http://www.mozilla.com/ FireFox web browser], which detect or extract microformats. <br />
<br />
See [[user-interface]] for ways in which extensions could or do handle microformats.<br />
<br />
==Current==<br />
<br />
===BlueOrganiser===<br />
* [http://www.adaptiveblue.com/ BlueOrganiser] BlueOrganizer Indigo Edition, released in Feb 2008 features support for hCard, hCal, adr, rel and locality. hReview is not supported yet. The support is implemented via contextual tips and menus, helping the users to lookup maps, movies, restaurants, people's profiles and more. [http://www.adaptiveblue.com/releases.html BlueOrganizer Features Page] contains description and interactive examples.<br />
<br />
===Operator===<br />
<br />
[https://addons.mozilla.org/firefox/4106/ Operator] has rapidly found favour with microformat developers (not least for its functions as a validator) and end-users. It provides an architecture for microformat parsing which is likely to be incorporated into the core of future versions of Firefox.<br />
<br />
Latest release: 0.9<br />
<br />
See also:<br />
*[http://labs.mozilla.com/2006/12/introducing-operator Mozilla Labs' Operator announcement]<br />
*[http://www.kaply.com/weblog/ Operator author's blog]<br />
*[http://www.kaply.com/weblog/operator-user-scripts/ Customise Operator with 'user scripts'] (needed to add hReview support)<br />
<br />
===Tails===<br />
*[http://blog.codeeg.com/tails-firefox-extension-03/ Tails]<br />
**[http://code.google.com/p/tails-firefox-extension/ Tails on Google Code]<br />
<br />
===Tails Export===<br />
*[https://addons.mozilla.org/firefox/2240/ Tails Export]<br />
<br />
===Web Cards===<br />
*[http://www.whymicroformats.com/webcards/index.html Web Cards]<br />
<br />
==Generic==<br />
While these extensions include no microformat-specific tools, the can be of use to microformat publishers (or advanced users).<br />
<br />
=== Glossary of Terms ===<br />
Gez Lemon's [http://juicystudio.com/article/glossary-terms-extension.php Glossary of Terms] displays values from <code>ABBR</code> (and <code>ACRONYM</code>) elements, by listing them at the foot of the page. This extension does not work with Firefox 3, as it does not provide secure updates.<br />
<br />
===Web Developer===<br />
The [http://chrispederick.com/work/webdeveloper/ Web Developer extension] has several features which greatly aid microformat publishers, not least the ability to display <code>class</code>, <code>ID</code>, <code>object</code> and <code>abbr</code> values in-line.<br />
<br />
=== XqUSEme ===<br />
Performs W3C-standard XQuery in Firefox. XQuery at its simplest is XPath, but allows more powerful reshaping of XML (cycling through, sorting, joining sources, etc.)--essentially SQL for XML (though also with some scripting power built in as well). [https://addons.mozilla.org/en-US/firefox/addon/5515 XqUSEme] uses Firefox's own parsing (and a few tricks) to clean up poorly-formed HTML in addition to XML.<br />
<br />
Newest version (not out of the sandbox as of Aug. 20) supports Greasemonkey-like application of XQueries to specific sites, enabling potential sharing and reuse.<br />
<br />
See also [[parsing-microformats#XQuery_example|an example of using XQuery]].<br />
<br />
===LinkAlert===<br />
*[http://conlan89.googlepages.com/linkalert LinkAlert]<br />
**Will consider adding rel in a future update.<br />
<br />
===ReminderFox===<br />
*[http://reminderfox.mozdev.org/ ReminderFox] <br />
**Have hCalendar support on the [http://reminderfox.mozdev.org/userrequests.html ReminderFox "to do" list].<br />
<br />
===Firefox developments===<br />
<br />
Mozilla are "brainstorming" developments for Firefox 3.0 and beyond, and have [http://wiki.mozilla.org/Firefox/Feature_Brainstorming:Microformat_Handling a page on microformat handling]. See also [http://wiki.mozilla.org/Firefox3/Firefox_Requirements Firefox 3 Requirements].<br />
<br />
== Netscape Navigator ==<br />
* Version 9.0+ supports [[Firefox extensions]], e.g.<br />
** [http://notizblog.org/2007/10/21/operator-unter-navigator-90/ Operator unter Navigator 9.0]<br />
<br />
==See also==<br />
*[[bookmarklets]]<br />
*[[greasemonkey]] - a powerful tool for customizing Firefox.<br />
*[[operator-phone-tests]] - a page listing tests of Operator's "Send to Bluetooth device" options with results<br />
*[https://addons.mozilla.org/search.php?app=firefox&q=RSS RSS extensions] - for viewing hAtom feeds via third-party converters</div>BrettZamirhttp://microformats.org/wiki/index.php?title=parsing-microformats&diff=28321parsing-microformats2008-08-20T13:30:52Z<p>BrettZamir: /* XQuery example */</p>
<hr />
<div>= Parsing Microformats =<br />
<br />
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.<br />
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.<br />
<br />
== Parsing class values ==<br />
<br />
When parsing class values care must be taken:<br />
# Class attributes may contain multiple class names, e.g: <code>class="foo vcard bar"</code><br />
# Class attributes may contain class names which contain the class name used by a microformat, e.g: <code>class="foo<strong>vcard</strong>bar"</code> <code>class="foo<strong>vcard</strong>"</code>, <code>class="<strong>vcard</strong>bar"</code>.<br />
# Multiple class names are seperated by one or more whitespace charchters. <br />
# Class names are case sensitive.<br />
<br />
See http://www.w3.org/TR/html401/struct/global.html#h-7.5.2.<br />
<br />
=== JavaScript example ===<br />
The [http://www.robertnyman.com/2005/11/07/the-ultimate-getelementsbyclassname/ Ultimate getElementsByClassName] JavaScript function may be useful. Then you can do:<br />
<br />
<code><br />
var adrs = document.getElementsByClassName(document, "*", "adr");<br />
</code><br />
<br />
or even:<br />
<br />
<code><br />
var cities = document.getElementsByClassName(document, "*", "locality");<br />
</code><br />
<br />
=== XSLT example ===<br />
<code><br />
&lt;xsl:if test="contains(<br />
concat (' ', normalize-space(@class),' '),<br />
' <strong>vcard</strong> '<br />
)" &gt; ...<br />
</code><br />
<br />
[http://balloon.hobix.com/xpath-generator xpath generator], to help you generate those long ugly xpath queries. [link broken as of 8 August 2006]<br />
<br />
=== XQuery example ===<br />
<br />
Also using XPath...<br />
<pre>&lt;div style="background-color:yellow;"><br />
{<br />
for $a in doc()//div[@class='vcard']<br />
let $b := $a/div[@class='fn org']<br />
let $c := $a/div[@class='adr']<br />
return ($b, $c, &lt;br />)<br />
}<br />
&lt;/div><br />
</pre><br />
<br />
For example, this could be used against http://technorati.com/about/contact.html. See [[firefox-extensions#XqUSEme|Firefox extensions]] for getting XQuery in Firefox.<br />
<br />
Simple XPath expressions can also be used.<br />
<br />
== Parsing rel/rev values ==<br />
<br />
Parsing rel and rev values is similar to parsing class values except for the following differences:<br />
<br />
# rel and rev values should be separated by one space.<br />
# rel and rev values are case insensitive.<br />
<br />
See http://www.w3.org/TR/html401/types.html#type-links.<br />
<br />
== See Also ==<br />
<br />
* [[xmdp-brainstorming]]</div>BrettZamirhttp://microformats.org/wiki/index.php?title=parsing-microformats&diff=28308parsing-microformats2008-08-20T13:29:29Z<p>BrettZamir: /* XQuery example */</p>
<hr />
<div>= Parsing Microformats =<br />
<br />
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.<br />
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.<br />
<br />
== Parsing class values ==<br />
<br />
When parsing class values care must be taken:<br />
# Class attributes may contain multiple class names, e.g: <code>class="foo vcard bar"</code><br />
# Class attributes may contain class names which contain the class name used by a microformat, e.g: <code>class="foo<strong>vcard</strong>bar"</code> <code>class="foo<strong>vcard</strong>"</code>, <code>class="<strong>vcard</strong>bar"</code>.<br />
# Multiple class names are seperated by one or more whitespace charchters. <br />
# Class names are case sensitive.<br />
<br />
See http://www.w3.org/TR/html401/struct/global.html#h-7.5.2.<br />
<br />
=== JavaScript example ===<br />
The [http://www.robertnyman.com/2005/11/07/the-ultimate-getelementsbyclassname/ Ultimate getElementsByClassName] JavaScript function may be useful. Then you can do:<br />
<br />
<code><br />
var adrs = document.getElementsByClassName(document, "*", "adr");<br />
</code><br />
<br />
or even:<br />
<br />
<code><br />
var cities = document.getElementsByClassName(document, "*", "locality");<br />
</code><br />
<br />
=== XSLT example ===<br />
<code><br />
&lt;xsl:if test="contains(<br />
concat (' ', normalize-space(@class),' '),<br />
' <strong>vcard</strong> '<br />
)" &gt; ...<br />
</code><br />
<br />
[http://balloon.hobix.com/xpath-generator xpath generator], to help you generate those long ugly xpath queries. [link broken as of 8 August 2006]<br />
<br />
=== XQuery example ===<br />
<br />
Also using XPath<br />
<code>&lt;div style="background-color:yellow;"><br />
{<br />
for $a in doc()//div[@class='vcard']<br />
let $b := $a/div[@class='fn org']<br />
let $c := $a/div[@class='adr']<br />
return ($b, $c, &lt;br />)<br />
}<br />
&lt;/div><br />
</code><br />
<br />
For example, this could be used against http://technorati.com/about/contact.html. See [[firefox-extensions#XqUSEme|Firefox extensions]] for getting XQuery in Firefox.<br />
<br />
Note that simple XPath expressions can also be used.<br />
<br />
== Parsing rel/rev values ==<br />
<br />
Parsing rel and rev values is similar to parsing class values except for the following differences:<br />
<br />
# rel and rev values should be separated by one space.<br />
# rel and rev values are case insensitive.<br />
<br />
See http://www.w3.org/TR/html401/types.html#type-links.<br />
<br />
== See Also ==<br />
<br />
* [[xmdp-brainstorming]]</div>BrettZamirhttp://microformats.org/wiki/index.php?title=parsing-microformats&diff=28307parsing-microformats2008-08-20T13:29:20Z<p>BrettZamir: /* XQuery example */</p>
<hr />
<div>= Parsing Microformats =<br />
<br />
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.<br />
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.<br />
<br />
== Parsing class values ==<br />
<br />
When parsing class values care must be taken:<br />
# Class attributes may contain multiple class names, e.g: <code>class="foo vcard bar"</code><br />
# Class attributes may contain class names which contain the class name used by a microformat, e.g: <code>class="foo<strong>vcard</strong>bar"</code> <code>class="foo<strong>vcard</strong>"</code>, <code>class="<strong>vcard</strong>bar"</code>.<br />
# Multiple class names are seperated by one or more whitespace charchters. <br />
# Class names are case sensitive.<br />
<br />
See http://www.w3.org/TR/html401/struct/global.html#h-7.5.2.<br />
<br />
=== JavaScript example ===<br />
The [http://www.robertnyman.com/2005/11/07/the-ultimate-getelementsbyclassname/ Ultimate getElementsByClassName] JavaScript function may be useful. Then you can do:<br />
<br />
<code><br />
var adrs = document.getElementsByClassName(document, "*", "adr");<br />
</code><br />
<br />
or even:<br />
<br />
<code><br />
var cities = document.getElementsByClassName(document, "*", "locality");<br />
</code><br />
<br />
=== XSLT example ===<br />
<code><br />
&lt;xsl:if test="contains(<br />
concat (' ', normalize-space(@class),' '),<br />
' <strong>vcard</strong> '<br />
)" &gt; ...<br />
</code><br />
<br />
[http://balloon.hobix.com/xpath-generator xpath generator], to help you generate those long ugly xpath queries. [link broken as of 8 August 2006]<br />
<br />
=== XQuery example ===<br />
<br />
Also using XPath<br />
<code>&lt;div style="background-color:yellow;"><br />
{<br />
for $a in doc()//div[@class='vcard']<br />
let $b := $a/div[@class='fn org']<br />
let $c := $a/div[@class='adr']<br />
return ($b, $c, <br />)<br />
}<br />
&lt;/div><br />
</code><br />
<br />
For example, this could be used against http://technorati.com/about/contact.html. See [[firefox-extensions#XqUSEme|Firefox extensions]] for getting XQuery in Firefox.<br />
<br />
Note that simple XPath expressions can also be used.<br />
<br />
== Parsing rel/rev values ==<br />
<br />
Parsing rel and rev values is similar to parsing class values except for the following differences:<br />
<br />
# rel and rev values should be separated by one space.<br />
# rel and rev values are case insensitive.<br />
<br />
See http://www.w3.org/TR/html401/types.html#type-links.<br />
<br />
== See Also ==<br />
<br />
* [[xmdp-brainstorming]]</div>BrettZamirhttp://microformats.org/wiki/index.php?title=parsing-microformats&diff=28306parsing-microformats2008-08-20T13:29:01Z<p>BrettZamir: +XQuery</p>
<hr />
<div>= Parsing Microformats =<br />
<br />
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.<br />
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.<br />
<br />
== Parsing class values ==<br />
<br />
When parsing class values care must be taken:<br />
# Class attributes may contain multiple class names, e.g: <code>class="foo vcard bar"</code><br />
# Class attributes may contain class names which contain the class name used by a microformat, e.g: <code>class="foo<strong>vcard</strong>bar"</code> <code>class="foo<strong>vcard</strong>"</code>, <code>class="<strong>vcard</strong>bar"</code>.<br />
# Multiple class names are seperated by one or more whitespace charchters. <br />
# Class names are case sensitive.<br />
<br />
See http://www.w3.org/TR/html401/struct/global.html#h-7.5.2.<br />
<br />
=== JavaScript example ===<br />
The [http://www.robertnyman.com/2005/11/07/the-ultimate-getelementsbyclassname/ Ultimate getElementsByClassName] JavaScript function may be useful. Then you can do:<br />
<br />
<code><br />
var adrs = document.getElementsByClassName(document, "*", "adr");<br />
</code><br />
<br />
or even:<br />
<br />
<code><br />
var cities = document.getElementsByClassName(document, "*", "locality");<br />
</code><br />
<br />
=== XSLT example ===<br />
<code><br />
&lt;xsl:if test="contains(<br />
concat (' ', normalize-space(@class),' '),<br />
' <strong>vcard</strong> '<br />
)" &gt; ...<br />
</code><br />
<br />
[http://balloon.hobix.com/xpath-generator xpath generator], to help you generate those long ugly xpath queries. [link broken as of 8 August 2006]<br />
<br />
=== XQuery example ===<br />
<br />
Also using XPath<br />
<code><div style="background-color:yellow;"><br />
{<br />
for $a in doc()//div[@class='vcard']<br />
let $b := $a/div[@class='fn org']<br />
let $c := $a/div[@class='adr']<br />
return ($b, $c, <br />)<br />
}<br />
</div><br />
</code><br />
<br />
For example, this could be used against http://technorati.com/about/contact.html. See [[firefox-extensions#XqUSEme|Firefox extensions]] for getting XQuery in Firefox.<br />
<br />
Note that simple XPath expressions can also be used.<br />
<br />
== Parsing rel/rev values ==<br />
<br />
Parsing rel and rev values is similar to parsing class values except for the following differences:<br />
<br />
# rel and rev values should be separated by one space.<br />
# rel and rev values are case insensitive.<br />
<br />
See http://www.w3.org/TR/html401/types.html#type-links.<br />
<br />
== See Also ==<br />
<br />
* [[xmdp-brainstorming]]</div>BrettZamirhttp://microformats.org/wiki/index.php?title=firefox-extensions&diff=28309firefox-extensions2008-08-20T13:06:31Z<p>BrettZamir: +XQuery extension</p>
<hr />
<div><h1>Firefox Extensions</h1><br />
{{TOC-right}}<br />
<br />
A list of extensions for the [http://www.mozilla.com/ FireFox web browser], which detect or extract microformats. <br />
<br />
See [[user-interface]] for ways in which extensions could or do handle microformats.<br />
<br />
==Current==<br />
<br />
===BlueOrganiser===<br />
* [http://www.adaptiveblue.com/ BlueOrganiser] BlueOrganizer Indigo Edition, released in Feb 2008 features support for hCard, hCal, adr, rel and locality. hReview is not supported yet. The support is implemented via contextual tips and menus, helping the users to lookup maps, movies, restaurants, people's profiles and more. [http://www.adaptiveblue.com/releases.html BlueOrganizer Features Page] contains description and interactive examples.<br />
<br />
===Operator===<br />
<br />
[https://addons.mozilla.org/firefox/4106/ Operator] has rapidly found favour with microformat developers (not least for its functions as a validator) and end-users. It provides an architecture for microformat parsing which is likely to be incorporated into the core of future versions of Firefox.<br />
<br />
Latest release: 0.9<br />
<br />
See also:<br />
*[http://labs.mozilla.com/2006/12/introducing-operator Mozilla Labs' Operator announcement]<br />
*[http://www.kaply.com/weblog/ Operator author's blog]<br />
*[http://www.kaply.com/weblog/operator-user-scripts/ Customise Operator with 'user scripts'] (needed to add hReview support)<br />
<br />
===Tails===<br />
*[http://blog.codeeg.com/tails-firefox-extension-03/ Tails]<br />
**[http://code.google.com/p/tails-firefox-extension/ Tails on Google Code]<br />
<br />
===Tails Export===<br />
*[https://addons.mozilla.org/firefox/2240/ Tails Export]<br />
<br />
===Web Cards===<br />
*[http://www.whymicroformats.com/webcards/index.html Web Cards]<br />
<br />
==Generic==<br />
While these extensions include no microformat-specific tools, the can be of use to microformat publishers (or advanced users).<br />
<br />
=== Glossary of Terms ===<br />
Gez Lemon's [http://juicystudio.com/article/glossary-terms-extension.php Glossary of Terms] displays values from <code>ABBR</code> (and <code>ACRONYM</code>) elements, by listing them at the foot of the page. This extension does not work with Firefox 3, as it does not provide secure updates.<br />
<br />
===Web Developer===<br />
The [http://chrispederick.com/work/webdeveloper/ Web Developer extension] has several features which greatly aid microformat publishers, not least the ability to display <code>class</code>, <code>ID</code>, <code>object</code> and <code>abbr</code> values in-line.<br />
<br />
=== XqUSEme ===<br />
Performs W3C-standard XQuery in Firefox. XQuery at its simplest is XPath, but allows more powerful reshaping of XML (cycling through, sorting, joining sources, etc.)--essentially SQL for XML (though also with some scripting power built in as well). [https://addons.mozilla.org/en-US/firefox/addon/5515 XqUSEme] uses Firefox's own parsing (and a few tricks) to clean up poorly-formed HTML in addition to XML.<br />
<br />
Newest version (not out of the sandbox as of Aug. 20) supports Greasemonkey-like application of XQueries to specific sites, enabling potential sharing and reuse.<br />
<br />
===LinkAlert===<br />
*[http://conlan89.googlepages.com/linkalert LinkAlert]<br />
**Will consider adding rel in a future update.<br />
<br />
===ReminderFox===<br />
*[http://reminderfox.mozdev.org/ ReminderFox] <br />
**Have hCalendar support on the [http://reminderfox.mozdev.org/userrequests.html ReminderFox "to do" list].<br />
<br />
===Firefox developments===<br />
<br />
Mozilla are "brainstorming" developments for Firefox 3.0 and beyond, and have [http://wiki.mozilla.org/Firefox/Feature_Brainstorming:Microformat_Handling a page on microformat handling]. See also [http://wiki.mozilla.org/Firefox3/Firefox_Requirements Firefox 3 Requirements].<br />
<br />
== Netscape Navigator ==<br />
* Version 9.0+ supports [[Firefox extensions]], e.g.<br />
** [http://notizblog.org/2007/10/21/operator-unter-navigator-90/ Operator unter Navigator 9.0]<br />
<br />
==See also==<br />
*[[bookmarklets]]<br />
*[[greasemonkey]] - a powerful tool for customizing Firefox.<br />
*[[operator-phone-tests]] - a page listing tests of Operator's "Send to Bluetooth device" options with results<br />
*[https://addons.mozilla.org/search.php?app=firefox&q=RSS RSS extensions] - for viewing hAtom feeds via third-party converters</div>BrettZamir