Skip to content
This repository has been archived by the owner on Nov 11, 2019. It is now read-only.

handle time elements like RDFa? #38

Closed
chaals opened this issue May 19, 2017 · 2 comments · Fixed by #40
Closed

handle time elements like RDFa? #38

chaals opened this issue May 19, 2017 · 2 comments · Fixed by #40
Assignees

Comments

@chaals
Copy link
Collaborator

chaals commented May 19, 2017

Google and SDL both do this already:

<div itemscope itemtype="http://schema.org/CreativeWork">
<time itemprop="name" content="time content attribute"
   datetime="2017-05-19T02:59">time element text content</time>
<time itemprop="name" datetime="2017-05-19T02:59">time element text content</time>
<time itemprop="name">time element only has text content</time>
</div>

gives 3 names:

time content attribute
2017-05-19T02:59
time element only has text content

I'm proposing to match this behaviour in the algorithm for determining values. @iherman ?

@chaals
Copy link
Collaborator Author

chaals commented May 19, 2017

Has anyone tested other parsers?

chaals pushed a commit that referenced this issue May 19, 2017
see #20, #38, #39

Note that if there is a `content` attribute is is selected **in
preference** to another specific attribute, including `src` and `href`
@iherman
Copy link
Member

iherman commented May 19, 2017

My tools (ie, the parser in RDFLib and the separate Microdata distiller) do not do this.

I would be in favour having this feature, though, just like HTML5+RDFa defines it (see HTML5+RDFa)

@chaals chaals self-assigned this May 19, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants