[uf-discuss] Fragment identifiers in hCard links

Rickards, Julian (NDM) julian.rickards at ontario.ca
Mon Feb 11 06:33:36 PST 2008


 

> -----Original Message-----
> On Feb 7, 2008, at 1:19 PM, Rickards, Julian (NDM) wrote:
> > Hi:
> >
> > I have multiple hCards on one page
> > (http://www.mndm.gov.on.ca/mndm/mines/lands/pro/contact_e.asp
> > <blocked::http://www.mndm.gov.on.ca/mndm/mines/lands/pro/
> > contact_e.asp>
> > ). I created a unique ID for each <div class="vcard"> so 
> that the link 
> > beside each one 
> > 
> (http://suda.co.uk/projects/microformats/hcard/get-contact.php?uri=htt
> > p
> > :
> > //www.mndm.gov.on.ca/mndm/mines/lands/pro/contact_e.asp%23devosst
> > 
> <blocked::http://suda.co.uk/projects/microformats/hcard/get-co
> ntact.php?
> > 
> uri=http://www.mndm.gov.on.ca/mndm/mines/lands/pro/contact_e.asp#devos
> > st
> >> ) allows the visitor to add specific vcards to their 
> address book. I
> > tried this before (several months ago) and it seemed to work but I 
> > can't get this process to work again. I tried using a # in 
> the URI but 
> > the link only downloads the first hCard on the page. When I 
> checked my 
> > code, I noticed that I had used %23 in place of # so I presume that 
> > this was in response to a suggestion but when I use %23, 
> Suda's server 
> > response with "No vCards found".
> 
> Please make sure your page is at least well-formed:
> 
> http://validator.w3.org/check?uri=http%3A//www.mndm.gov.on.ca/
mndm/mines/lands/pro/contact_e.asp%23devosst



Ryan:

I fixed the page and now it is valid. However, that doesn't change the
result. Having done a bit of testing, it appears that in the URI link
where I use a fragment identifier (which would normally use the # as in
index.html#fragment), I have tried both # and %23 (where that comes
from, I don't know) but neither work properly. When I use #, only the
first contact is downloaded no matter which contact link I click.
However, when I use %23 in the URI, the only response I get is "No
vCards found" which is obviously not true because the hCard code meets
the specs.

Maybe Brian Suda has changed the code on his server because a test page
of mine that used to work doesn't work any longer.

Does anyone have any ideas as to how to put multiple hCards on one page
and have individual links download individual vCards to the client's
address book?

Jules



More information about the microformats-discuss mailing list