WARNING: THIS SITE IS A MIRROR OF GITHUB.COM / IT CANNOT LOGIN OR REGISTER ACCOUNTS / THE CONTENTS ARE PROVIDED AS-IS / THIS SITE ASSUMES NO RESPONSIBILITY FOR ANY DISPLAYED CONTENT OR LINKS / IF YOU FOUND SOMETHING MAY NOT GOOD FOR EVERYONE, CONTACT ADMIN AT ilovescratch@foxmail.com
Skip to content

handle itemref attributes #12

@jronallo

Description

@jronallo

The itemref attribute needs to be made part of the parsing algorithm. The use of itemref in the wild might be minimal, but microdata.py will currently give incorrect results when parsing a document that uses itemref.

You can use this example document extracted from the spec:
https://github.com/jronallo/microdata/blob/master/test/data/example_itemref.html
http://www.whatwg.org/specs/web-apps/current-work/multipage/microdata.html#the-basic-syntax

The results should look like this:

{
  "items": [
    {
      "properties": {
        "name": [
          "Amanda"
        ],
        "band": [
          {
            "properties": {
              "name": [
                "Jazz Band"
              ],
              "size": [
                "12"
              ]
            }
          }
        ]
      }
    }
  ]
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions