[uf-dev] X2V parsing of #fragment-identifiers
Brian Suda
brian.suda at gmail.com
Thu Jun 28 15:42:55 PDT 2007
>From the hcard-parsing wiki page[1]:
"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."
Currently X2V (as i read this spec) does not implement this correctly.
I want to double check to see if i need to change my code and/or if
the wiki needs a better description.
As i read it, you should be able to point to an ID attribute and look
for a microformat at that ID and for any microformats that are
children of that ID.
For instance:
<h1>Staff</h1>
<ul id="staff-list">
<li class="vcard">...</li>
<li class="vcard">...</li>
</ul>
If i submit the URL http://example.org/index.html#staff-list to X2V i
SHOULD get 2 vCards as a result? At the moment X2V would fail because
it is looking for:
<div class="vcard" id="staff-list">...</div>
Which is ALSO valid according to the wiki page and would yield 1 vCard.
Currently X2V can only extract the FULL page or a SINGLE instance. As
i read the parsing-rules wiki page, the current implementation is not
correct.
This popped-up recently for myself with GEO, i have a page of various
GEO points. I wanted to generate a KML file of multiple GEO points,
but only a subset of the FULL list on my page.
So i am willing to update my XSLT code, but i'd like some feedback to
whether my implementation is in error, or the wiki page. (i think i
side with the wiki page at the moment and need to update my code)
Thoughts?
-brian
[1] - http://microformats.org/wiki/hcard-parsing#URL_handling
--
brian suda
http://suda.co.uk
More information about the microformats-dev
mailing list