microdatajs:microdatajs.git
5 years agoMove to GitHub master
Philip Jägenstedt [Tue, 2 Jul 2013 15:16:38 +0000 (17:16 +0200)]
Move to GitHub

6 years agoUse encodeURIComponent for the "Download it!" links
Philip Jägenstedt [Sat, 26 May 2012 16:25:33 +0000 (18:25 +0200)]
Use encodeURIComponent for the "Download it!" links

Previously, a # in the data would cause all that followed to be
interpreted as the fragment identifier, which broke the download.

Thanks to Bill Palmer for reporting this issue!

6 years agoDrop itemid from vCard conversion
Philip Jägenstedt [Thu, 3 Nov 2011 21:20:06 +0000 (22:20 +0100)]
Drop itemid from vCard conversion

http://html5.org/r/6746

6 years agoLICENSE typo
Philip Jägenstedt [Mon, 12 Dec 2011 09:45:59 +0000 (10:45 +0100)]
LICENSE typo

Originally copied from somewhere...

6 years agoUse strict mode
Philip Jägenstedt [Tue, 1 Nov 2011 08:13:06 +0000 (09:13 +0100)]
Use strict mode

6 years ago'Consistency'
Philip Jägenstedt [Tue, 1 Nov 2011 07:54:21 +0000 (08:54 +0100)]
'Consistency'

6 years agoOops: itemValue support check
Philip Jägenstedt [Sun, 30 Oct 2011 14:43:58 +0000 (15:43 +0100)]
Oops: itemValue support check

The intention was to check that the <data> element was supported,
now do so by checking both .itemValue and .value.

6 years agoReplace <time> with <data>
Philip Jägenstedt [Sat, 29 Oct 2011 19:34:43 +0000 (21:34 +0200)]
Replace <time> with <data>

http://www.w3.org/Bugs/Public/show_bug.cgi?id=13240

6 years agoTest JSON extraction
Philip Jägenstedt [Sat, 29 Oct 2011 19:16:20 +0000 (21:16 +0200)]
Test JSON extraction

6 years agoQUnit s/equals/equal/ and s/same/deepEqual/
Philip Jägenstedt [Sat, 29 Oct 2011 18:30:19 +0000 (20:30 +0200)]
QUnit s/equals/equal/ and s/same/deepEqual/

6 years agoSupport .contains() on token lists (itemType, itemProp, itemRef)
Philip Jägenstedt [Sat, 29 Oct 2011 18:20:51 +0000 (20:20 +0200)]
Support .contains() on token lists (itemType, itemProp, itemRef)

6 years agoUpdate getItems to match all types given
Philip Jägenstedt [Sat, 29 Oct 2011 15:34:32 +0000 (17:34 +0200)]
Update getItems to match all types given

http://www.w3.org/Bugs/Public/show_bug.cgi?id=14444

6 years agoUpgrade to jQuery 1.6.4 and fix the IE6 breakage
Philip Jägenstedt [Sat, 29 Oct 2011 14:20:39 +0000 (16:20 +0200)]
Upgrade to jQuery 1.6.4 and fix the IE6 breakage

jQuery commit 8c2cb49917fc1082abac0a26298b992dcd6a5b6e caused
.attr('itemscope') to start returning undefined, so now use
.getAttribute('itemscope') directory to see if an attribute is present.
This has been fixed on jQuery master, but is present on 1.6.3 and 1.6.4.

See http://bugs.jquery.com/ticket/9980

6 years agoIE6 is my browser of choice, because it is awesome
Philip Jägenstedt [Sat, 29 Oct 2011 13:11:06 +0000 (15:11 +0200)]
IE6 is my browser of choice, because it is awesome

$('<span itemscope>')[0] is undefined in IE6

6 years agoHandle multiple types in itemType and JSON conversion
Philip Jägenstedt [Fri, 28 Oct 2011 15:19:49 +0000 (17:19 +0200)]
Handle multiple types in itemType and JSON conversion

http://www.w3.org/Bugs/Public/show_bug.cgi?id=14233

The JSON conversion does not check that the types are absolute URLs,
since that is a bit annoying. Spec bug filed:
http://www.w3.org/Bugs/Public/show_bug.cgi?id=14586

6 years agoQUnit 1.1.0
Philip Jägenstedt [Fri, 28 Oct 2011 14:08:36 +0000 (16:08 +0200)]
QUnit 1.1.0

6 years agoPunctuation
Philip Jägenstedt [Mon, 24 Oct 2011 09:24:09 +0000 (11:24 +0200)]
Punctuation

6 years agoHandle (ignore) security exception when resolving URLs in IE>6
Philip Jägenstedt [Mon, 22 Aug 2011 16:24:56 +0000 (18:24 +0200)]
Handle (ignore) security exception when resolving URLs in IE>6

Fixes the problem introduced with commit
31e7f07967f7562f47a4fad18a659f773184bc70

6 years agoInsert <base href> to make shorter/prettier URLs in output
Philip Jägenstedt [Mon, 22 Aug 2011 16:10:57 +0000 (18:10 +0200)]
Insert <base href> to make shorter/prettier URLs in output

6 years agoFix the styling of <footer> in IE6
Philip Jägenstedt [Mon, 22 Aug 2011 15:30:37 +0000 (17:30 +0200)]
Fix the styling of <footer> in IE6

7 years agoMake URL resolving work relative to the element
Philip Jägenstedt [Sat, 23 Jul 2011 10:13:01 +0000 (12:13 +0200)]
Make URL resolving work relative to the element

This doesn't actually work in IE...

7 years agoDrop RDF conversion algorithm
Philip Jägenstedt [Fri, 12 Aug 2011 16:09:18 +0000 (18:09 +0200)]
Drop RDF conversion algorithm

http://www.w3.org/Bugs/Public/show_bug.cgi?id=13314

7 years agoAdd <!doctype> and <title> for validator where possible
Philip Jägenstedt [Wed, 3 Aug 2011 14:20:25 +0000 (16:20 +0200)]
Add <!doctype> and <title> for validator where possible

7 years agoMissing itemscope in schema.org/Book example
Philip Jägenstedt [Wed, 3 Aug 2011 12:52:56 +0000 (14:52 +0200)]
Missing itemscope in schema.org/Book example

7 years agoDetect and warn about the <meta> parsing bug (and hypothetical <link> dito)
Philip Jägenstedt [Tue, 2 Aug 2011 13:15:32 +0000 (15:15 +0200)]
Detect and warn about the <meta> parsing bug (and hypothetical <link> dito)

7 years agoValidator.nu link in "toolbar"
Philip Jägenstedt [Sun, 31 Jul 2011 14:04:22 +0000 (16:04 +0200)]
Validator.nu link in "toolbar"

7 years agoDo fragment escaping for RDF as per spec
Philip Jägenstedt [Tue, 26 Jul 2011 20:15:31 +0000 (22:15 +0200)]
Do fragment escaping for RDF as per spec

7 years agopunctuation
Philip Jägenstedt [Fri, 22 Jul 2011 22:54:11 +0000 (00:54 +0200)]
punctuation

7 years agoMove the IE document.createElement trick to the preview iframe
Philip Jägenstedt [Fri, 22 Jul 2011 22:40:05 +0000 (00:40 +0200)]
Move the IE document.createElement trick to the preview iframe

7 years agoRefactor updateTabs to not switch on index
Philip Jägenstedt [Thu, 21 Jul 2011 22:18:25 +0000 (00:18 +0200)]
Refactor updateTabs to not switch on index

7 years agoDon't call $(document).attr('lang'), newer jQuery doesn't approve
Philip Jägenstedt [Thu, 21 Jul 2011 22:30:57 +0000 (00:30 +0200)]
Don't call $(document).attr('lang'), newer jQuery doesn't approve

7 years agoAdd <track> itemValue test
Philip Jägenstedt [Sat, 9 Jul 2011 20:34:06 +0000 (22:34 +0200)]
Add <track> itemValue test

7 years agoUpgrade to jQuery 1.4.4
Philip Jägenstedt [Sat, 9 Jul 2011 20:32:02 +0000 (22:32 +0200)]
Upgrade to jQuery 1.4.4

Fixes IE6 failures for the embed and object tests

7 years agoIE6 doesn't have Array.indexOf (it is silly)
Philip Jägenstedt [Sat, 9 Jul 2011 13:56:52 +0000 (15:56 +0200)]
IE6 doesn't have Array.indexOf (it is silly)

This reverts commit 9a0106edd8fc9387581733158668ab4b5a2c6be0 and
replaces other instances of Array.indexOf with $.inArray

7 years agoSync vCard itemref loop handling with spec
Philip Jägenstedt [Fri, 8 Jul 2011 11:32:48 +0000 (13:32 +0200)]
Sync vCard itemref loop handling with spec

7 years agoSync RDF itemref loop handling with spec
Philip Jägenstedt [Fri, 8 Jul 2011 10:48:01 +0000 (12:48 +0200)]
Sync RDF itemref loop handling with spec

7 years agoSync JSON itemref loop handling with spec
Philip Jägenstedt [Fri, 8 Jul 2011 10:13:02 +0000 (12:13 +0200)]
Sync JSON itemref loop handling with spec

7 years agoMerge updated .properties test from branch 'work/pedantic'
Philip Jägenstedt [Thu, 7 Jul 2011 20:51:29 +0000 (22:51 +0200)]
Merge updated .properties test from branch 'work/pedantic'

7 years agoPedantically implement property crawling (for verification)
Philip Jägenstedt [Thu, 7 Jul 2011 20:48:52 +0000 (22:48 +0200)]
Pedantically implement property crawling (for verification)

http://www.whatwg.org/specs/web-apps/current-work/complete.html#the-properties-of-an-item

The only bug is that itemprop="" adds to the collection.

7 years agoUpdate spec links
Philip Jägenstedt [Thu, 7 Jul 2011 16:20:27 +0000 (18:20 +0200)]
Update spec links

http://code.google.com/p/html5/source/detail?r=192

7 years agoHandle itemref loops in RDF conversion
Philip Jägenstedt [Thu, 7 Jul 2011 07:43:19 +0000 (09:43 +0200)]
Handle itemref loops in RDF conversion

7 years agoOops, pushed the wrong element for JSON itemref stack
Philip Jägenstedt [Thu, 7 Jul 2011 07:34:47 +0000 (09:34 +0200)]
Oops, pushed the wrong element for JSON itemref stack

7 years agoUse Array.indexOf instead of jQuery.inArray (it is silly)
Philip Jägenstedt [Wed, 6 Jul 2011 22:29:36 +0000 (00:29 +0200)]
Use Array.indexOf instead of jQuery.inArray (it is silly)

7 years agovar $ = jQuery internally, because it's easier to read
Philip Jägenstedt [Wed, 6 Jul 2011 22:23:15 +0000 (00:23 +0200)]
var $ = jQuery internally, because it's easier to read

7 years agoHandle itemref loops in JSON conversion
Philip Jägenstedt [Wed, 6 Jul 2011 22:11:14 +0000 (00:11 +0200)]
Handle itemref loops in JSON conversion

7 years agoRemove unnecessary sorting from property crawling algorithm
Philip Jägenstedt [Wed, 6 Jul 2011 19:47:47 +0000 (21:47 +0200)]
Remove unnecessary sorting from property crawling algorithm

7 years agoUse element.properties in $(element).properties()
Philip Jägenstedt [Wed, 6 Jul 2011 17:06:41 +0000 (19:06 +0200)]
Use element.properties in $(element).properties()

7 years agoRevamp the property crawling algorithm to not remove loops
Philip Jägenstedt [Wed, 6 Jul 2011 16:59:54 +0000 (18:59 +0200)]
Revamp the property crawling algorithm to not remove loops

After the implementation feedback in
<http://lists.whatwg.org/pipermail/whatwg-whatwg.org/2011-June/032257.html>
we're abandoning the idea of doing loop removal as part of the
.properties API and can simplify the crawling a fair bit. The algorithm
implemented here is black-box-testably the same as what Opera has
implemented and what I intend to suggest for the spec.

This will break at least JSON and RDF export, following commits will
explore how to deal with loops in those algorithms.

7 years agoUse element.itemId in $(element).itemId()
Philip Jägenstedt [Tue, 5 Jul 2011 08:04:26 +0000 (10:04 +0200)]
Use element.itemId in $(element).itemId()

7 years agoUse element.itemType in $(element).itemType()
Philip Jägenstedt [Tue, 5 Jul 2011 08:01:32 +0000 (10:01 +0200)]
Use element.itemType in $(element).itemType()

7 years agoUse element.itemScope in $(element).itemScope()
Philip Jägenstedt [Tue, 5 Jul 2011 08:00:11 +0000 (10:00 +0200)]
Use element.itemScope in $(element).itemScope()

7 years agoUse element.itemProp in $(element).itemProp()
Philip Jägenstedt [Tue, 5 Jul 2011 07:49:38 +0000 (09:49 +0200)]
Use element.itemProp in $(element).itemProp()

7 years agoUse element.itemRef in $(element).itemRef()
Philip Jägenstedt [Tue, 5 Jul 2011 07:46:34 +0000 (09:46 +0200)]
Use element.itemRef in $(element).itemRef()

7 years agoMake tokenList not remove duplicates
Philip Jägenstedt [Tue, 5 Jul 2011 07:42:15 +0000 (09:42 +0200)]
Make tokenList not remove duplicates

This was changed in the spec in http://html5.org/r/3479 but somehow I
never noticed until now.

7 years agoUse element.getValue in $(element).getValue()
Philip Jägenstedt [Tue, 5 Jul 2011 06:56:47 +0000 (08:56 +0200)]
Use element.getValue in $(element).getValue()

7 years agoUse document.getItems() in $(document).getItems()
Philip Jägenstedt [Mon, 4 Jul 2011 16:10:41 +0000 (18:10 +0200)]
Use document.getItems() in $(document).getItems()

7 years agoChange Emacs modeline to use js-mode
Philip Jägenstedt [Mon, 4 Jul 2011 15:50:35 +0000 (17:50 +0200)]
Change Emacs modeline to use js-mode

7 years agoUse [0] instead of .get(0)
Philip Jägenstedt [Mon, 4 Jul 2011 15:42:58 +0000 (17:42 +0200)]
Use [0] instead of .get(0)

http://stackoverflow.com/questions/4975716/jquery-array-zero-vs-function-get-zero-0-vs-get0

7 years agoMissing preload.html for the <iframe> rewrite
Philip Jägenstedt [Sun, 3 Jul 2011 22:13:44 +0000 (00:13 +0200)]
Missing preload.html for the <iframe> rewrite

7 years agoDrop the native API emulation
Philip Jägenstedt [Sun, 3 Jul 2011 22:09:03 +0000 (00:09 +0200)]
Drop the native API emulation

It's not possible to perfectly emulate live collections and even without
that, this is never going to work on older browsers. The plan going
forward is to only have the jQuery plugin and to use browser
implementations (where available) to make that faster, similar to how
jQuery will use querySelector iff available.

7 years agoZero-pad the DTSTAMP for iCal
Philip Jägenstedt [Sun, 3 Jul 2011 21:43:13 +0000 (23:43 +0200)]
Zero-pad the DTSTAMP for iCal

This was previously generating invalid timestamps.

7 years agoLook for itemref'd elements in the home subtree, as per the spec
Philip Jägenstedt [Sun, 3 Jul 2011 21:41:50 +0000 (23:41 +0200)]
Look for itemref'd elements in the home subtree, as per the spec

This broke with the previous commit, as itemref ids were being looked up
in the wrong document.

7 years agoUse an <iframe> for preview, for correctness and isolation
Philip Jägenstedt [Sun, 3 Jul 2011 21:28:53 +0000 (23:28 +0200)]
Use an <iframe> for preview, for correctness and isolation

Previously, innerHTML was used to show the preview in a <div>, but this
breaks down if the markup being tested has scripts, CSS, <body> elements
or other things that interfere with the tool itself.

Thanks to the reporters:
Dan Brickley: http://krijnhoetmer.nl/irc-logs/whatwg/20110609#l-284
Gregg Kellogg: https://twitter.com/#!/Gkellogg/status/84300519455203328

The technique of document.write()'ing in a same-origin iframe was stolen
from http://software.hixie.ch/utilities/js/live-dom-viewer/

7 years agoSupport a custom formatting function for JSON
Philip Jägenstedt [Thu, 16 Jun 2011 06:46:45 +0000 (08:46 +0200)]
Support a custom formatting function for JSON

7 years agoUpdate more WHATWG spec URLs
Philip Jägenstedt [Wed, 15 Jun 2011 21:32:37 +0000 (23:32 +0200)]
Update more WHATWG spec URLs

7 years agoRemove RDF prettification of http://www.w3.org/1999/xhtml/microdata#
Philip Jägenstedt [Wed, 15 Jun 2011 21:26:04 +0000 (23:26 +0200)]
Remove RDF prettification of w3.org/1999/xhtml/microdata#

Forgot the jQuery version...

7 years agoAdd schema.org/Person example
Philip Jägenstedt [Sat, 11 Jun 2011 12:55:11 +0000 (14:55 +0200)]
Add schema.org/Person example

7 years agoAdd schema.org/Product example
Philip Jägenstedt [Sat, 11 Jun 2011 12:47:19 +0000 (14:47 +0200)]
Add schema.org/Product example

7 years agoRemove RDF prettification of http://www.w3.org/1999/xhtml/microdata#
Philip Jägenstedt [Sat, 11 Jun 2011 09:55:17 +0000 (11:55 +0200)]
Remove RDF prettification of w3.org/1999/xhtml/microdata#

URIs with this prefix aren't made to be pretty. Perhaps the
prettification could be removed by something that automatically find the
longest common prefix and just calls them ns1, ns2, ...

7 years agoAdd schema.org/Book example
Philip Jägenstedt [Sat, 11 Jun 2011 09:51:35 +0000 (11:51 +0200)]
Add schema.org/Book example

7 years agoAdd <track> as a URL property element with itemprop reflecting src
Philip Jägenstedt [Wed, 8 Jun 2011 15:18:42 +0000 (17:18 +0200)]
Add <track> as a URL property element with itemprop reflecting src

DRY, yeah, yeah, yeah...

7 years agoUpdate spec links
Philip Jägenstedt [Wed, 8 Jun 2011 15:14:04 +0000 (17:14 +0200)]
Update spec links

7 years agoLink to Gitorious from Live Microdata
Philip Jägenstedt [Wed, 8 Jun 2011 15:09:15 +0000 (17:09 +0200)]
Link to Gitorious from Live Microdata

7 years agoREADME and LICENSE
Philip Jägenstedt [Wed, 9 Mar 2011 21:20:31 +0000 (22:20 +0100)]
README and LICENSE

8 years agoRemove broken name guessing from vCard
Philip Jägenstedt [Sun, 27 Jun 2010 19:49:05 +0000 (21:49 +0200)]
Remove broken name guessing from vCard

http://html5.org/tools/web-apps-tracker?from=4980&to=4981

8 years agofix same subStr typo in plain version
Philip Jägenstedt [Tue, 16 Feb 2010 07:03:51 +0000 (08:03 +0100)]
fix same subStr typo in plain version

8 years agotypo: subStr -> substr
Philip Jägenstedt [Tue, 16 Feb 2010 06:56:28 +0000 (07:56 +0100)]
typo: subStr -> substr

8 years agoRDF extraction: use parent itemtype as fallback type
Philip Jägenstedt [Tue, 2 Feb 2010 22:23:35 +0000 (23:23 +0100)]
RDF extraction: use parent itemtype as fallback type

8 years agodon't generate RDF triples for the document by default
Philip Jägenstedt [Mon, 1 Feb 2010 13:17:59 +0000 (14:17 +0100)]
don't generate RDF triples for the document by default

8 years agomake jQuery interface read-only
Philip Jägenstedt [Sun, 31 Jan 2010 23:56:22 +0000 (00:56 +0100)]
make jQuery interface read-only

8 years agoadd permalink to live microdata
Philip Jägenstedt [Tue, 2 Feb 2010 09:38:28 +0000 (10:38 +0100)]
add permalink to live microdata

8 years agouse charset=UTF-8 instead of encoding=utf-8 in download links
Philip Jägenstedt [Tue, 2 Feb 2010 12:07:41 +0000 (13:07 +0100)]
use charset=UTF-8 instead of encoding=utf-8 in download links

Reported by Lachy:
http://krijnhoetmer.nl/irc-logs/whatwg/20100202#l-531

8 years agomake .properties() more tolerant v0.1.0
Philip Jägenstedt [Sun, 31 Jan 2010 22:19:13 +0000 (23:19 +0100)]
make .properties() more tolerant

The idea is that only properties which are self-referring should be
excluded from the collection. This is as tolerant as possible
without causing e.g. JSON extraction to go into infinite recursion.
This is not in line with the current spec text.

8 years agoreplace demo/ with jQuery-based Live Microdata tool
Philip Jägenstedt [Sun, 31 Jan 2010 22:58:19 +0000 (23:58 +0100)]
replace demo/ with jQuery-based Live Microdata tool

8 years agojQuery microdata implementation
Philip Jägenstedt [Sun, 31 Jan 2010 22:48:36 +0000 (23:48 +0100)]
jQuery microdata implementation

8 years agoclean up file names
Philip Jägenstedt [Mon, 25 Jan 2010 02:10:01 +0000 (03:10 +0100)]
clean up file names

8 years agoMerge branch 'work/itemref-20100118'
Philip Jägenstedt [Sat, 30 Jan 2010 13:13:37 +0000 (14:13 +0100)]
Merge branch 'work/itemref-20100118'

Conflicts:
microdata.js

8 years agoimage gallery example from spec
Philip Jägenstedt [Sun, 24 Jan 2010 01:32:21 +0000 (02:32 +0100)]
image gallery example from spec

8 years agomake RDF conversion output OWL triples instead of rewriting triples
Philip Jägenstedt [Sun, 24 Jan 2010 01:18:29 +0000 (02:18 +0100)]
make RDF conversion output OWL triples instead of rewriting triples

http://html5.org/tools/web-apps-tracker?from=4612&to=4613

8 years agoitemRef is now a DOMSettableTokenList, fix usage accordingly
Philip Jägenstedt [Sun, 24 Jan 2010 00:50:54 +0000 (01:50 +0100)]
itemRef is now a DOMSettableTokenList, fix usage accordingly

8 years agotypo: itemprop -> itemtype
Philip Jägenstedt [Sat, 23 Jan 2010 19:24:28 +0000 (20:24 +0100)]
typo: itemprop -> itemtype

8 years agorename example file to match the others
Philip Jägenstedt [Sat, 23 Jan 2010 19:00:49 +0000 (20:00 +0100)]
rename example file to match the others

8 years agoDrop support for live collections
Philip Jägenstedt [Sat, 23 Jan 2010 18:16:05 +0000 (19:16 +0100)]
Drop support for live collections

As long as collections are kept up to date using DOM mofification,
events, the collections will never be garbage collected, as the
event listener holds a reference. Since this also doesn't work on
IE, I might instead add an explicit __update__ method.

8 years agoLive Microdata playground
Philip Jägenstedt [Fri, 22 Jan 2010 23:56:24 +0000 (00:56 +0100)]
Live Microdata playground

8 years agoimplement new algorithm for finding properties of an item
Philip Jägenstedt [Wed, 20 Jan 2010 06:27:14 +0000 (07:27 +0100)]
implement new algorithm for finding properties of an item

http://html5.org/tools/web-apps-tracker?from=4609&to=4610

8 years agoremove non-existant stylesheet
Philip Jägenstedt [Wed, 20 Jan 2010 23:05:39 +0000 (00:05 +0100)]
remove non-existant stylesheet

8 years agofix URL reflection when the content attribute isn't present
Philip Jägenstedt [Thu, 21 Jan 2010 00:05:16 +0000 (01:05 +0100)]
fix URL reflection when the content attribute isn't present

8 years agoSalvage useful test rewrite from branch 'work/getCorrespondingItem'
Philip Jägenstedt [Tue, 19 Jan 2010 01:18:49 +0000 (02:18 +0100)]
Salvage useful test rewrite from branch 'work/getCorrespondingItem'

Conflicts:
test/api.js

8 years agomake itemRef DOMSettableTokenList
Philip Jägenstedt [Tue, 19 Jan 2010 01:07:31 +0000 (02:07 +0100)]
make itemRef DOMSettableTokenList

refactor tests to work for both itemRef and itemProp

http://html5.org/tools/web-apps-tracker?from=4596&to=4597

8 years agoitemtype is relfected as an opaque string, not a URL
Philip Jägenstedt [Mon, 18 Jan 2010 22:25:39 +0000 (23:25 +0100)]
itemtype is relfected as an opaque string, not a URL

http://html5.org/tools/web-apps-tracker?from=4595&to=4596