Topic on Talk:Parsoid/Parser Unification/Media structure/FAQ

SMcCandlish (talkcontribs)

What is this code, and what is accomplished by it? typeof="mw:File/Thumb" Never seen anything like that before.

Arlolra (talkcontribs)
SMcCandlish (talkcontribs)

Thanks, but it just says: "typeof: optional attribute that specifies the RDF type(s) of the subject or the partner resource (the resource that the metadata is about).", which doesn't really explain what this is doing. I'm curious what effect it has, what process it is invoking, what it is replacing.

Arlolra (talkcontribs)

Did you have a look at the media section of the spec? https://www.mediawiki.org/wiki/Specs/HTML/2.8.0#Media

RDFa is a way of embedding metadata in a document. The typeof mw:File indicates that the node was generated as a result of having parsed file syntax in the source wikitext. It's useful for editing clients, like Visual Editor, to be able to identify parts of the page and provide a rich editing experience. It's also useful for any machine reading the html to be used in its analysis.

SMcCandlish (talkcontribs)

Ah, okay. I do get it now. Thank you.