[uf-discuss] Extension to hCard parsing to support forms

Rob Manson roBman at MobileOnlineBusiness.com.au
Fri Jul 13 09:03:30 PDT 2007


> Interestingly, re-reading what I wrote back then I seem to now  
> completely disagree with myself then.  To clarify what we're talking  
> about, I added examples of the markup proposed.  I'm not sure I  
> captured everything right, so please edit any mistakes you see and/or  
> confirm if it looks right.  


Some of my best disagreements are with myself 8)

The markup looks good to me...however I don't think the second one
should require the class to be in the <form> tag.  That's also why I
personally prefer the second option.  I think the following example
could be common too.  I also think we should add the value explicitly
since that's what we'd parse for.

<form ...>
<div class="vcard">
   <fieldset class="fn">
      <input type="text" class="given-name" name="first_name" value="Rob" />
      <input type="text" class="family-name" name="last_name" value="Manson" />
   </fieldset>
   ...
</div>
<div class="vcard">
   <fieldset class="fn">
      <input type="text" class="given-name" name="first_name" value="Scott" />
      <input type="text" class="family-name" name="last_name" value="Reynen" />
   </fieldset>
   ...
</div>
</form>


If there's no major complaints then I'll update the example markup...


> After that's clarified, I think it would  
> be good to use this markup to test the various claims made about how  
> these proposals would work in existing parsers.  I suspect some of  
> those claims (most likely those made by me) are demonstrably false,  
> and should therefor be removed from the discussion.


There are some other issues with the existing parsers in this model too
(see my issues list further down that wiki page -
http://microformats.org/wiki/hcard-brainstorming#Key_Issues.2Fdiscussion_points )

For example <textarea class="given-name"> style tags already appear to
parse ok.  However the parsers (for example operator) only ever pickup
the content values at load time.  The same behaviour limitation is
obvious if you just view source after you've updated a field but not
submitted the form.  This may not be a major problem depending upon your
application...but unless the parser dynamically interacts with the DOM
then it does add a real constraint.

Also, beyond the standard INPUT fields things get a lot messier.
Personally I'd be happy to work around that with javascript onChange
functions to update 

<input type="hidden" class="given-name" name="first_name"
value="NewName" /> 

style fields...but I'm not sure if everyone would be happy with that.




-- 
Rob Manson
Managing Director
http://paymentz.com.au
e: roBman at paymentz.com.au
m: 0423 215 731
t: 1300 662 857


Linked In Public Profile:
http://www.linkedin.com/pub/0/b54/328


See me speak at WebDirections South:
http://www.webdirections.org/program/#manson




More information about the microformats-discuss mailing list