-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
parse HTML id attribute #44
Comments
spec change proposalExtend http://microformats.org/wiki/microformats2-parsing#parse_a_document_for_microformats with the new last bullet point:
EDIT: text clarified that |
Sounds like good reasoning and a reasonable spec update. I'm in favor and can implement in php-mf2 pretty easily. |
As a user of the php-mf2 parser in my Parse This library, I would find this useful. |
This could help out quite a bit with the Elixir implementation of Microformats2. I do see the potential issue with using |
I implemented some changes to my post-processing of parser output to take the id now in the PHP-MF2 master branch and use it to create a url with fragment for each feed, which allowed me to individually enumerate the feeds. That will assist me in letting them be parsed as individual elements should someone request a specific feed. |
Resolution: proposal accepted. No objections in above discussion, and positive opinions (👍) from a few implementors on the proposal. Proposal implementations in mf2py and phpmf2 parsers, and https://github.com/dshanske verification that phpmf2 implementation satisfies use-case for the issue is sufficient to demonstrate implementability and utility, all as noted/linked in issue thread. Editing specification accordingly. (Originally published at: http://tantek.com/2018/364/t3/) |
In a few places, being able to consume the HTML
id
attribute would be useful.use cases
output format
I'd propose a new 'id' attribute on the microformats object (not a property)
i.e.
would produce output like
This format should be completely backwards compatible.
imply
uid
?In the discussion in IRC and in microformats/php-mf2#206, it was also proposed to automatically imply a
uid
property based on the document URL and the id as a fragment.I don't think this is a good idea for a few reasons:
uid
, if redirects are involved. Feed consumers should follow HTTP 302/307, but not remember those URLs. As such, the correct thing to remember is not the URL of the resulting document + a fragment, but the URL the redirect was found at + the fragment. The parser can not construct this, since it isn't aware of that URL.uid
could be a problem if the author later adds one, e.g. because they added a dedicated for the feed that didn't exist beforeThe text was updated successfully, but these errors were encountered: