In-reply-to-fr
De Mi caja de notas
Révision datée du 3 mars 2017 à 07:45 par Xtof (discussion | contributions) (Page créée avec « {{:iwc:in-reply-to}} »)
This article is a stub. You can help the IndieWeb wiki by expanding it.
in-reply-to is the h-entry property to use in a post that is a reply to another post. The reply post must hyperlink to the original post with class="u-in-reply-to"
.
The in-reply-to
property supersedes rel-in-reply-to. For more information, see rel-values.
Additionally:
- The in-reply-to link is typically inside the reply-context of a reply post
- The microformats2
u-in-reply-to h-cite
class names can also be used to embed a reply-context with more details beyond the URL
How to consume in-reply-to
Summary: collect an ordered list of unique in-reply-to URLs by checking and adding from:
- the first h-entry for "in-reply-to" URLs (including embedded)
algorithm
Given a URL of a post, to determine the URL(s) it’s in-reply-to:
- Let in-reply-to-urls be an empty list
- Parse the post's HTML for microformats2. If there are any h-entries, get the first one
- If the h-entry has an in-reply-to property, for each item in its array of values:
- If the item is a string, append it to in-reply-to-urls if not already there
- If the item is an embedded microformat, check if it has a url property. If it does, append the first url property value to in-reply-to-urls if not already there
- Otherwise ignore the item
- If the h-entry has an in-reply-to property, for each item in its array of values:
- in-reply-to-urls is now a list of all the URLs the parsed URL is in-reply-to
You may use a different algorithm if it produces exactly the same results. E.g. you could skip checking "if not already there" conditions, and instead at the end perform a step of "* Remove duplicate values from in-reply-to-urls" - as long as you removed latter duplicates, and kept first occurrences in the list.
Usage Examples
FAQ
Must an in-reply-to link be inside an h-entry
Q: Does an in-reply-to link have to be inside an h-entry?
A: Yes. An in-reply-to link must be inside the h-entry with class name of u-in-reply-to
so that it can be recognized as a URL property of the h-entry.
Past Research
See:
For the research and development of the u-in-reply-to
property and rel=in-reply-to
.
See Also