Talk:Requests for comment/Update our code to use RDFa 1.1 instead of RDFa 1.0

Jump to navigation Jump to search

About this board

Jdforrester (WMF) (talkcontribs)

You say "VisualEditor is using RDFa, it currently appears to be broken". In what way is it broken? VE is an RDFa consumer, not producer; we consume the RDFa from Parsoid, which outputs RDFa that W3C's tool claims in valid.

Dantman (talkcontribs)

Ok sorry, the line between Parsoid and VisualEditor is very blurred. Heck, the documentation on what RDFa Parsoid even outputs is part of the VisualEditor page.

Try opening up the VisualEditor on this page. If you open up the DOM you'll find that there is no prefix="mw ..." nor xmlns:mw="...". So the prefix that all the typeof="mw:..." items in the page are using is not defined. Double checking by opening the generated post-js source using the Web Developer Extension and putting it into that RDFa validator shows that this is correct and the RDFa output into the surface used by VE is illegal.

  • "[In element 'a'] Unusual URI scheme used in <mw:WikiLink>; may that be a mistake, e.g., resulting from using an undefined CURIE prefix or an incorrect CURIE?"
  • "[In element 'a'] Unusual URI scheme used in <mw:ExtLink>; may that be a mistake, e.g., resulting from using an undefined CURIE prefix or an incorrect CURIE?"
  • "[In element 'span'] Unusual URI scheme used in <mw:Placeholder>; may that be a mistake, e.g., resulting from using an undefined CURIE prefix or an incorrect CURIE?"
  • "[In element 'span'] Unusual URI scheme used in <mw:Nowiki>; may that be a mistake, e.g., resulting from using an undefined CURIE prefix or an incorrect CURIE?"
  • ...

I also notice this which seems messed up:

  • "[In element 'li'] 'paragraph' is used as a term, but has not been defined as such; ignored"

That one isn't the Parsoid created surface, it's the "Paragraph" dropdown item in VisualEditor's toolbar. I'm not sure why you're using rel="paragraph" on an

  • .
  • Jdforrester (WMF) (talkcontribs)
    Ok sorry, the line between Parsoid and VisualEditor is very blurred.

    No worries. :-)

    Heck, the documentation on what RDFa Parsoid even outputs is part of the VisualEditor page.

    The canonical source is Parsoid/MediaWiki DOM spec. There might be historical documents in other places - if so, please highlight so I can tag them as such!

    Try opening up the VisualEditor on this page. If you open up the DOM you'll find that there is no prefix="mw ..." nor xmlns:mw="...".

    Ah, yes, see my point above - the RDFa use inside VE is meant purely for our own internal use. We should probably clean it up a little, but it's not meant to be hinted for a user agent other than ourselves. :-) Longer-term, the HTML read-tab output from MW will be generated by Parsoid (rather than PHP parser), and so will have the appropriate prefix="mw …" set for the document anyway (whether or not VE is loaded), so this will be fixed that way. Not sure it's worth spinning cycles at VE level fixing this in the mean time…

    Dantman (talkcontribs)
    Heck, the documentation on what RDFa Parsoid even outputs is part of the VisualEditor page.
    The canonical source is Parsoid/MediaWiki DOM spec. There might be historical documents in other places - if so, please highlight so I can tag them as such!

    Oh whoops, sorry... the page wasn't part of VE. I just got confused by being linked from VisualEditor.

    Try opening up the VisualEditor on this page. If you open up the DOM you'll find that there is no prefix="mw ..." nor xmlns:mw="...".
    Ah, yes, see my point above - the RDFa use inside VE is meant purely for our own internal use. We should probably clean it up a little, but it's not meant to be hinted for a user agent other than ourselves. :-) Longer-term, the HTML read-tab output from MW will be generated by Parsoid (rather than PHP parser), and so will have the appropriate prefix="mw …" set for the document anyway (whether or not VE is loaded), so this will be fixed that way. Not sure it's worth spinning cycles at VE level fixing this in the mean time…

    Ok I tweaked the page.

    Reply to "VisualEditor"
    There are no older topics