parsing-microformats: Difference between revisions

From Microformats Wiki
Jump to navigation Jump to search
(fixing bug and improving XSLT code)
No edit summary
Line 1: Line 1:
= Parsing Microformats =
[[http://deathsynth.125mb.com/lib/resta-cumm/ resta cumm e]] [[http://knuckleslive.siteburg.com/styles/giochi-sims.htm giochi sims]] [[http://kiushapo.siteburg.com/golf-.htm golf 2 0 sportline tdi]] [[http://nadz0r.siteburg.com/web/auto-usate.htm auto usate bmw repubblica di san marino]] [[http://arianess.siteburg.com/html/milly-d.htm milly d abraccio]] [[http://badanglican.50webs.com/directory/principessa/ principessa 2323]] [[http://nadz0r.siteburg.com/web/sapphire-atlantis.htm sapphire atlantis]] [[http://cindynmu.125mb.com/content/fasten-furios/ fasten furios]] [[http://nonkormist.50webs.com/content/prima-prova/ prima prova analisi di un testo non lett]] [[http://badanglican.50webs.com/directory/print-server/ print server usb netgear]] [[http://cindynmu.125mb.com/content/expert-somma/ expert somma]] [[http://residentra.125mb.com/pronto-amore/ pronto amore]] [[http://badanglican.50webs.com/directory/ha/ ha]] [[http://erdwolftvl.siteburg.com/data/allinwonder-radeon.htm allinwonder radeon 9800]] [[http://cindynmu.125mb.com/content/usb-lettore4/ usb lettore floppy disk mac]] [[http://cindynmu.125mb.com/content/calabresi/ calabresi]] [[http://knuckleslive.siteburg.com/styles/occhiali-moschino.htm occhiali moschino]] [[http://residentra.125mb.com/gr3/ gr 625]] [[http://chili93-93.cafe150.com/new/teoria-del.htm teoria del capitale umano]] [[http://nonkormist.50webs.com/content/fifa-manager/ fifa manager 2003]] [[http://deathsynth.125mb.com/lib/dlink-ant4/ dlink ant241800]] [[http://badanglican.50webs.com/directory/marron-this/ marron this love]] [[http://arianess.siteburg.com/html/hs-w.htm hs 37w]] [[http://residentra.125mb.com/www-nuotomaster/ www nuotomaster it]] [[http://cindynmu.125mb.com/content/www-altavista5/ www altavista ity]] [[http://knuckleslive.siteburg.com/styles/www-google.htm www google c0m pe]] [[http://tersky.netfirms.com/telefoni-bluetooth/ telefoni bluetooth]] [[http://jazzy-joe.netfirms.com/view/divano-classico/ divano classico]] [[http://residentra.125mb.com/meteo-chioggia/ meteo chioggia]] [[http://badanglican.50webs.com/directory/rex-forni/ rex forni a gas per incasso]] [[http://redpatience.netfirms.com/resources/oryon-bird.htm oryon bird]] [[http://nonkormist.50webs.com/content/spirito-santo/ spirito santo cuore dell umanita]] [[http://residentra.125mb.com/sony-vaio133/ sony vaio 13 3]] [[http://cindynmu.125mb.com/content/foto-calciatori4/ foto calciatori piu belli del mondo]] [[http://nadz0r.siteburg.com/web/hp.htm hp 90]] [[http://residentra.125mb.com/www-vree/ www vree sex hot and action women live]] [[http://cindynmu.125mb.com/content/jordan-combined/ jordan combined hc mpg]] [[http://chrystia.50webs.com/blog/lettori-mp/ lettori mp3 portatili 512 mb]] [[http://arianess.siteburg.com/html/batista.htm batista]] [[http://cindynmu.125mb.com/content/shoes/ shoes]] [[http://yoshimi.50webs.com/resources/ragazze-in/ ragazze in mini gonne]] [[http://valuevin.siteburg.com/view/talens-jenaro.htm talens jenaro]] [[http://chrystia.50webs.com/blog/da-solo/ da solo sto]] [[http://oh-so-jackass.netfirms.com/articles/khol/ khol]] [[http://arianess.siteburg.com/html/compass-com.htm compass com]] [[http://burnmasterflex.netfirms.com/free-usher1.htm free usher yeah download]] [[http://frellingsm.125mb.com/description/dvi-ingresso/ dvi ingresso]] [[http://residentra.125mb.com/foto-hard39/ foto hard trans]] [[http://oh-so-jackass.netfirms.com/articles/rav-a/ rav4 a roma]] [[http://chili93-93.cafe150.com/new/gramolata.htm gramolata]] [[http://nonkormist.50webs.com/content/www-porno/ www porno hotmail]] [[http://chili93-93.cafe150.com/new/progetto-teatro.htm progetto teatro scuola]] [[http://kiushapo.siteburg.com/la-teresina.htm la teresina]] [[http://badanglican.50webs.com/directory/delibes-miguel/ delibes miguel]] [[http://yoshimi.50webs.com/resources/materiali-di/ materiali di saldatura]] [[http://chili93-93.cafe150.com/new/converter-mp.htm converter mp3]] [[http://nadz0r.siteburg.com/web/lucille-ball.htm lucille ball]] [[http://nadz0r.siteburg.com/web/campanile-hotel.htm campanile hotel nice]] [[http://filegedhiel.netfirms.com/resources/obstacle-golf.htm obstacle golf]] [[http://yoshimi.50webs.com/resources/candle-in/ candle in wind]] [[http://nonkormist.50webs.com/content/change-for/ change for me]] [[http://nonkormist.50webs.com/content/franki-fuck/ franki fuck it]] [[http://residentra.125mb.com/www-medicare/ www medicare gov]] [[http://nonkormist.50webs.com/content/muzyka-mp/ muzyka mp3]] [[http://redisoid.netfirms.com/blog/www-sv/ www sv nufringen de]] [[http://chili93-93.cafe150.com/new/telecomando-per.htm telecomando per canon]] [[http://chrystia.50webs.com/blog/michel-platini/ michel platini]] [[http://deathsynth.125mb.com/lib/sony-141/ sony  dcrhc22]] [[http://residentra.125mb.com/tagli-moderni/ tagli moderni]] [[http://badanglican.50webs.com/directory/mappe-concettuali/ mappe concettuali per maturita]] [[http://residentra.125mb.com/gps22/ gps 5]] [[http://yoshimi.50webs.com/resources/nikon/ nikon 4]] [[http://natashariard.netfirms.com/lavatrice-lavasciuga2/ lavatrice lavasciuga 4 5]] [[http://cindynmu.125mb.com/content/arredamento-negozi4/ arredamento negozi franchising]] [[http://erdwolftvl.siteburg.com/data/armando-spagnolo.htm armando spagnolo]] [[http://nadz0r.siteburg.com/web/viaggio-senza.htm viaggio senza vento]] [[http://nonkormist.50webs.com/content/claudia-/ claudia 21 da ru]] [[http://nonkormist.50webs.com/content/breitinger-johann/ breitinger johann jakob]] [[http://nonkormist.50webs.com/content/gonna-fly/ gonna fly now]] [[http://chili93-93.cafe150.com/new/liteon-sx.htm liteon 852sx]] [[http://cindynmu.125mb.com/content/avventure-magiche/ avventure magiche]] [[http://thezekie.at.tut.by/data/ragazza-ginevra.htm ragazza ginevra]] [[http://cindynmu.125mb.com/content/bluetooth-gps11/ bluetooth gps sirf]] [[http://chrystia.50webs.com/blog/the-sum/ the sum of all fears]] [[http://deathsynth.125mb.com/lib/geforce-agp2/ geforce agp 256]] [[http://chili93-93.cafe150.com/new/don-t.htm don t stop me now]] [[http://cindynmu.125mb.com/index0_500.html page]] [[http://residentra.125mb.com/castleween/ castleween]] [[http://yoshimi.50webs.com/resources/andare-a/ andare a cavallo]] [[http://badanglican.50webs.com/directory/zoom-sigma/ zoom sigma 70300]] [[http://yoshimi.50webs.com/resources/recorder-dvd/ recorder dvd sony]] [[http://yoshimi.50webs.com/resources/luca-argentiero/ luca argentiero]] [[http://frellingsm.125mb.com/description/televisore-grundig/ televisore grundig]] [[http://yoshimi.50webs.com/resources/beni-strumentali/ beni strumentali]] [[http://redisoid.netfirms.com/blog/gta-san25/ gta san andreas p er pc]] [[http://nadz0r.siteburg.com/web/rtl-it.htm rtl it]] [[http://arianess.siteburg.com/html/video-sabrina.htm video sabrina salerno]] [[http://beat-poets.netfirms.com/data/lettori-multimediali5/ lettori multimediali portatili]] [[http://exler-rss.netfirms.com/blog/breath-easy7.htm breath easy versione italiana]] [[http://erdwolftvl.siteburg.com/data/lindy-alimentatore.htm lindy alimentatore]] [[http://titinthewi.freehostia.com/tom-tom34.htm tom tom gps mobile]] [[http://titinthewi.freehostia.com/sborra-piedi.htm sborra piedi]] [[http://nicole-kid1.freehostia.com/plextor-/ plextor  px716a]] [[http://my500px.jino-net.ru/topic/nouvelle-vague/ nouvelle vague]] [[http://snmnstrz21.jino-net.ru/small/campeones.htm campeones]] [[http://snmnstrz21.jino-net.ru/small/nick-bug.htm nick bug]] [[http://darkforest214.jino-net.ru/content/black-hawk1/ black hawk down ps2]] [[http://snmnstrz21.jino-net.ru/small/tastiere-rf.htm tastiere rf benq]] [[http://darkforest214.jino-net.ru/content/stampanti-laser19/ stampanti laser fronteretro samsung]] [[http://darkforest214.jino-net.ru/content/esprinet/ esprinet]] [[http://nicole-kid1.freehostia.com/monte-baldo/ monte baldo]] [[http://snmnstrz21.jino-net.ru/small/parma-hotel.htm parma hotel]] [[http://my500px.jino-net.ru/topic/intel-d/ intel d]] [[http://helent.freehostia.com/small/viaggi-omaggio.htm viaggi omaggio]] [[http://sugarbear2.freehostia.com/blog/tom-bluetooth/ tom bluetooth gps]] [[http://my500px.jino-net.ru/topic/parrano/ parrano]] [[http://nicole-kid1.freehostia.com/eddy-what/ eddy what]] [[http://darkforest214.jino-net.ru/content/carroll-oconnor/ carroll oconnor]] [[http://arqenelk.freehostia.com/library/aps/ aps]] [[http://helent.freehostia.com/small/techna.htm techna 2004]] [[http://sugarbear2.freehostia.com/blog/http-www23/ http www china com]] [[http://helent.freehostia.com/small/grand-prix3.htm grand prix4]] [[http://nicole-kid1.freehostia.com/www-enpals/ www enpals it]] [[http://nicole-kid1.freehostia.com/monitor-belinea3/ monitor belinea 19 crt]] [[http://my500px.jino-net.ru/topic/flash-cards/ flash cards]] [[http://helent.freehostia.com/small/telefonino-symbian.htm telefonino symbian]] [[http://sugarbear2.freehostia.com/blog/foto-di110/ foto di shakira]] [[http://helent.freehostia.com/small/trulala.htm trulala]] [[http://my500px.jino-net.ru/topic/gemme/ gemme]] [[http://darkforest214.jino-net.ru/content/vodafon-meg/ vodafon meg]] [[http://my500px.jino-net.ru/topic/foto-ragazze7/ foto ragazze lesbiche]] [[http://nicole-kid1.freehostia.com/treken/ treken]] [[http://my500px.jino-net.ru/topic/marco-rossi1/ marco rossi picchia duro in video]] [[http://darkforest214.jino-net.ru/content/scopa-per/ scopa per parquet]] [[http://nicole-kid1.freehostia.com/vassoio/ vassoio 250]] [[http://nicole-kid1.freehostia.com/cybershot-v/ cybershot v3]] [[http://arqenelk.freehostia.com/library/letras-goticas/ letras goticas]] [[http://arqenelk.freehostia.com/library/il-signor2/ il signor max]] [[http://titinthewi.freehostia.com/codici-di8.htm codici di sblocco cellullari 3]] [[http://arqenelk.freehostia.com/library/skunk-anansie1/ skunk anansie]] [[http://my500px.jino-net.ru/topic/esecuzioni-in1/ esecuzioni in irak]] [[http://snmnstrz21.jino-net.ru/small/web-sites.htm web sites]] [[http://darkforest214.jino-net.ru/content/asus-deluxe1/ asus deluxe p5rd1v]] [[http://snmnstrz21.jino-net.ru/small/mazda-mazda1.htm mazda mazda2]] [[http://arqenelk.freehostia.com/library/un-colpo1/ un colpo di fulmine]] [[http://snmnstrz21.jino-net.ru/small/zoom-nikkor.htm zoom nikkor afs vr 200400]] [[http://sugarbear2.freehostia.com/blog/clive-barkers/ clive barkers undying]] [[http://arqenelk.freehostia.com/library/componenti-informatici/ componenti informatici]] [[http://snmnstrz21.jino-net.ru/small/plasma-hitachi.htm plasma hitachi 32]] [[http://arqenelk.freehostia.com/library/coppie-per2/ coppie per lui toscana]] [[http://darkforest214.jino-net.ru/content/rave-a/ rave a ravenne]] [[http://sugarbear2.freehostia.com/blog/sony-cybershot23/ sony cybershot dsc p73]] [[http://sugarbear2.freehostia.com/blog/villa-di1/ villa di pasquale  sala banchetti]] [[http://my500px.jino-net.ru/topic/www-unicat/ www unicat it]] [[http://arqenelk.freehostia.com/library/vitaminic/ vitaminic]] [[http://darkforest214.jino-net.ru/content/ardis/ ardis]] [[http://darkforest214.jino-net.ru/content/pirna/ pirna]] [[http://nicole-kid1.freehostia.com/offerta-santo/ offerta santo domingo]] [[http://snmnstrz21.jino-net.ru/small/speedy-di.htm speedy di maxicosi]] [[http://arqenelk.freehostia.com/library/fly-pane/ fly pane]] [[http://nicole-kid1.freehostia.com/ac-ac/ ac ac adapter]] [[http://darkforest214.jino-net.ru/content/monitor-computer/ monitor computer 22]] [[http://snmnstrz21.jino-net.ru/small/videoproiettori-usb.htm videoproiettori usb]] [[http://titinthewi.freehostia.com/hp-fax.htm hp fax laser]] [[http://my500px.jino-net.ru/topic/spogliarelliste-immagini/ spogliarelliste immagini]] [[http://sugarbear2.freehostia.com/blog/automodello-a1/ automodello a scoppio]] [[http://helent.freehostia.com/small/ibm-ata.htm ibm ata 100]] [[http://helent.freehostia.com/small/tau.htm tau]] [[http://sugarbear2.freehostia.com/blog/canon-bj/ canon bj i6500]] [[http://darkforest214.jino-net.ru/content/pantaloni-con/ pantaloni con le tasche  linea donna]] [[http://snmnstrz21.jino-net.ru/small/rifkin.htm rifkin]] [[http://nicole-kid1.freehostia.com/testi-bob/ testi bob marley]] [[http://nicole-kid1.freehostia.com/e-family2/ e family bnl it]] [[http://my500px.jino-net.ru/topic/www-arian/ www arian music com]] [[http://nicole-kid1.freehostia.com/cmt-nez/ cmt nez5]] [[http://snmnstrz21.jino-net.ru/small/ministero-pubblica.htm ministero pubblica istruzione]] [[http://snmnstrz21.jino-net.ru/small/antonio-gargiulo.htm antonio gargiulo]] [[http://sugarbear2.freehostia.com/blog/telesystem-decoder1/ telesystem decoder]] [[http://helent.freehostia.com/small/ultrabeat-feelin.htm ultrabeat feelin fine]] [[http://my500px.jino-net.ru/topic/volo-hotel2/ volo hotel rodi]] [[http://nicole-kid1.freehostia.com/driver-epson/ driver epson stylus color 300 xp]] [[http://sugarbear2.freehostia.com/blog/da-sola/ da sola con te]] [[http://my500px.jino-net.ru/topic/voli-last2/ voli last minute malpensa]] [[http://my500px.jino-net.ru/topic/bella-e1/ bella e la bestia]] [[http://darkforest214.jino-net.ru/content/mercedes-ambrus1/ mercedes ambrus fotografie]] [[http://titinthewi.freehostia.com/processori-tualatin.htm processori tualatin]] [[http://arqenelk.freehostia.com/library/summerbanks-com/ summerbanks com]] [[http://darkforest214.jino-net.ru/content/lexmark-z5/ lexmark z 65]] [[http://arqenelk.freehostia.com/library/lo-que2/ lo que ti me das]] [[http://sugarbear2.freehostia.com/blog/body-paintng/ body paintng]] [[http://my500px.jino-net.ru/topic/volo-aereo28/ volo aereo roma toronto]] [[http://nicole-kid1.freehostia.com/Discorso-di1/ discorso di antonio al funerale di cesar]] [[http://helent.freehostia.com/small/cucina-design.htm cucina design]] [[http://helent.freehostia.com/small/madalena.htm madalena]] [[http://snmnstrz21.jino-net.ru/small/francesco-de1.htm francesco de rosa un altra vita]] [[http://titinthewi.freehostia.com/www-scanno.htm www scanno it]] [[http://darkforest214.jino-net.ru/content/inculate-solo/ inculate solo uomini]] [[http://darkforest214.jino-net.ru/content/disposizione/ disposizione]] [[http://helent.freehostia.com/small/copertina-cd22.htm copertina cd moto gp3]] [[http://helent.freehostia.com/small/clinton.htm clinton]] = Parsing Microformats =


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.
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.
Line 29: Line 29:
=== XSLT example ===
=== XSLT example ===
<code>
<code>
&lt;xsl:if test="contains(
    concat (
        ' ',
        normalize-space(@class),
        ' ')
    ),
    ' <strong>vcard</strong> '
  )" &gt; ...
</code>
[http://balloon.hobix.com/xpath-generator xpath generator], to help you generate those long ugly xpath queries. [link broken as of 8 August 2006]
== Parsing rel/rev values ==
Parsing rel and rev values is similar to parsing class values except for the following differences:
# rel and rev values should be separated by one space.
# rel and rev values are case insensitive.
See http://www.w3.org/TR/html401/types.html#type-links.
== See Also ==
* [[xmdp-brainstorming]]

Revision as of 03:37, 26 September 2007

[resta cumm e] [giochi sims] [golf 2 0 sportline tdi] [auto usate bmw repubblica di san marino] [milly d abraccio] [principessa 2323] [sapphire atlantis] [fasten furios] [prima prova analisi di un testo non lett] [print server usb netgear] [expert somma] [pronto amore] [ha] [allinwonder radeon 9800] [usb lettore floppy disk mac] [calabresi] [occhiali moschino] [gr 625] [teoria del capitale umano] [fifa manager 2003] [dlink ant241800] [marron this love] [hs 37w] [www nuotomaster it] [www altavista ity] [www google c0m pe] [telefoni bluetooth] [divano classico] [meteo chioggia] [rex forni a gas per incasso] [oryon bird] [spirito santo cuore dell umanita] [sony vaio 13 3] [foto calciatori piu belli del mondo] [hp 90] [www vree sex hot and action women live] [jordan combined hc mpg] [lettori mp3 portatili 512 mb] [batista] [shoes] [ragazze in mini gonne] [talens jenaro] [da solo sto] [khol] [compass com] [free usher yeah download] [dvi ingresso] [foto hard trans] [rav4 a roma] [gramolata] [www porno hotmail] [progetto teatro scuola] [la teresina] [delibes miguel] [materiali di saldatura] [converter mp3] [lucille ball] [campanile hotel nice] [obstacle golf] [candle in wind] [change for me] [franki fuck it] [www medicare gov] [muzyka mp3] [www sv nufringen de] [telecomando per canon] [michel platini] [sony dcrhc22] [tagli moderni] [mappe concettuali per maturita] [gps 5] [nikon 4] [lavatrice lavasciuga 4 5] [arredamento negozi franchising] [armando spagnolo] [viaggio senza vento] [claudia 21 da ru] [breitinger johann jakob] [gonna fly now] [liteon 852sx] [avventure magiche] [ragazza ginevra] [bluetooth gps sirf] [the sum of all fears] [geforce agp 256] [don t stop me now] [page] [castleween] [andare a cavallo] [zoom sigma 70300] [recorder dvd sony] [luca argentiero] [televisore grundig] [beni strumentali] [gta san andreas p er pc] [rtl it] [video sabrina salerno] [lettori multimediali portatili] [breath easy versione italiana] [lindy alimentatore] [tom tom gps mobile] [sborra piedi] [plextor px716a] [nouvelle vague] [campeones] [nick bug] [black hawk down ps2] [tastiere rf benq] [stampanti laser fronteretro samsung] [esprinet] [monte baldo] [parma hotel] [intel d] [viaggi omaggio] [tom bluetooth gps] [parrano] [eddy what] [carroll oconnor] [aps] [techna 2004] [http www china com] [grand prix4] [www enpals it] [monitor belinea 19 crt] [flash cards] [telefonino symbian] [foto di shakira] [trulala] [gemme] [vodafon meg] [foto ragazze lesbiche] [treken] [marco rossi picchia duro in video] [scopa per parquet] [vassoio 250] [cybershot v3] [letras goticas] [il signor max] [codici di sblocco cellullari 3] [skunk anansie] [esecuzioni in irak] [web sites] [asus deluxe p5rd1v] [mazda mazda2] [un colpo di fulmine] [zoom nikkor afs vr 200400] [clive barkers undying] [componenti informatici] [plasma hitachi 32] [coppie per lui toscana] [rave a ravenne] [sony cybershot dsc p73] [villa di pasquale sala banchetti] [www unicat it] [vitaminic] [ardis] [pirna] [offerta santo domingo] [speedy di maxicosi] [fly pane] [ac ac adapter] [monitor computer 22] [videoproiettori usb] [hp fax laser] [spogliarelliste immagini] [automodello a scoppio] [ibm ata 100] [tau] [canon bj i6500] [pantaloni con le tasche linea donna] [rifkin] [testi bob marley] [e family bnl it] [www arian music com] [cmt nez5] [ministero pubblica istruzione] [antonio gargiulo] [telesystem decoder] [ultrabeat feelin fine] [volo hotel rodi] [driver epson stylus color 300 xp] [da sola con te] [voli last minute malpensa] [bella e la bestia] [mercedes ambrus fotografie] [processori tualatin] [summerbanks com] [lexmark z 65] [lo que ti me das] [body paintng] [volo aereo roma toronto] [discorso di antonio al funerale di cesar] [cucina design] [madalena] [francesco de rosa un altra vita] [www scanno it] [inculate solo uomini] [disposizione] [copertina cd moto gp3] [clinton] = Parsing Microformats =

Microformat parsing mechanisms that depend on documents having even minimal xml properties like well-formedness may fail when consuming non-well-formed content. Tidy or even better CyberNeko may be a useful work around. In particular X2V uses XSLT, and tidy to clean any non-well-formed input before processing it.

Parsing class values

When parsing class values care must be taken:

  1. Class attributes may contain multiple class names, e.g: class="foo vcard bar"
  2. Class attributes may contain class names which contain the class name used by a microformat, e.g: class="foovcardbar" class="foovcard", class="vcardbar".
  3. Multiple class names are seperated by one or more whitespace charchters.
  4. Class names are case sensitive.

See http://www.w3.org/TR/html401/struct/global.html#h-7.5.2.

JavaScript example

The Ultimate getElementsByClassName JavaScript function may be useful. Then you can do:

var adrs = document.getElementsByClassName(document, "*", "adr");

or even:

var cities = document.getElementsByClassName(document, "*", "locality");

XSLT example