parsing

From Microformats Wiki
Revision as of 16:26, 11 September 2007 by Brian (talk | contribs) (started matrix for parsing rules, move this page if needed)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Parsing

This is a braindump, this page will need cleaning-up, take everything with a grain of salt at the moment.

By Element

This is a matrix of element and type. This should be describe under what circumstances each value and where that value comes from. The list of elements has been taken from http://www.w3.org/TR/html4/index/elements.html

data types

(this probably needs a better name) There are two types in microformats, protocol types and strings. Strings could be integers, such as ratings, strings, such as a note, or datetimes, such as dtstart. Protocol types are UIDs, URLs, email addresses, (sometimes Telephones and faxes)

If there is a comma list, then this is in order of availability. For instance, the ABBR element is @title,node-value. IF the @title is present then it is used, if not the stack is popped and node-value is looked at, if there is no node-value, then the value is NULL.

protocol string
A @href,node-value node-value
ABBR @title,node-value @title,node-value
ACRONYM @title,node-value @title,node-value
ADDRESS node-value node-value
APPLET ??? ???(node-value)
AREA @href,node-value node-value
B node-value node-value
BASE (valid?) @href
BASEFONT (valid?)
BDO (valid?)
BIG node-value node-value
BLOCKQUOTE @cite?,node-value node-value
BODY node-value node-value
BR (valid?)
BUTTON @value? @value?
CAPTION node-value node-value
CENTER node-value node-value
CITE node-value node-value
CODE node-value node-value
COL node-value node-value
COLGROUP node-value node-value
DD node-value node-value
DEL @cite,node-value node-value
DFN node-value node-value
DIR node-value node-value
DIV node-value node-value
DL node-value node-value
DT node-value node-value
EM node-value node-value
FIELDSET node-value node-value
FONT node-value node-value
FORM @action?,node-value node-value
FRAME @src?,node-value node-value
FRAMESET node-value node-value
H1 node-value node-value
H2 node-value node-value
H3 node-value node-value
H4 node-value node-value
H5 node-value node-value
H6 node-value node-value
HEAD (valid?) node-value node-value
HR (valid?) node-value node-value
HTML (valid?) node-value node-value
node-value node-value