Warning:
This wiki has been archived and is now read-only.

Data-in-html-crawl-design

From Data Driven Standards Community Group
Jump to: navigation, search

Detecting to see if the document is an RDFa Document

/<[^>]*(about|content|datatype|prefix|property|resource|typeof|vocab)\s*(=\s*['"][^'"]*['"])?[^>]*>/g

Detecting the Use of RDFa Attributes

/<[^>]*about\s*=\s*['"].*['"][^>]*>/g
/<[^>]*content\s*=\s*['"].*['"][^>]*>/g
/<[^>]*datatype\s*=\s*['"].*['"][^>]*>/g
/<[^>]*prefix\s*=\s*['"].*['"][^>]*>/g
/<[^>]*xmlns:[a-zA-Z0-9_-]+\s*=\s*['"].*['"][^>]*>/g
/<[^>]*property\s*=\s*['"].*['"][^>]*>/g
/<[^>]*resource\s*=\s*['"].*['"][^>]*>/g
/<[^>]*typeof\s*=\s*['"].*['"][^>]*>/g
/<[^>]*vocab\s*=\s*['"].*['"][^>]*>/g

Detecting the Use of @typeof and @property on the same element, but not any other RDFa property


Detecting the Use of @typeof, @property and @about on the same element, but not any other RDFa property


Detecting to see if the Document is a Microdata Document

/(\sitemscope\s|itemtype\s*=\s*['"].*?['"]|itemprop\s*=\s*['"].*?['"]|itemref\s*=\s*['"].*?['"])/g

Detecting the Use of Microdata Attributes

/\sitemscope\s/g
/itemtype\s*=\s*['"].*?['"]/g
/itemprop\s*=\s*['"].*?['"]/g
/itemref\s*=\s*['"].*?['"]/g