How can I embed schema.org markup in SVG?

不想你离开。 提交于 2020-01-04 04:19:07

问题


I wish to add semantics to SVG files and would like to use schema.org terms. Does SVG have a syntax for doing this? My first attempt would be:

<svg:text xmlns:svg="xmlns="http://www.w3.org/2000/svg" x="100" y="200"   
       html:itemtype="http://schema.org/Person" xmlns:html="http://www.w3.org/1999/xhtml"
       >Joe Soap</svg:text>

Will this be valid SVG and display in conformant tools? and will the schema.org markup be recognized by search engines?


回答1:


I never tried it, but I guess it should be possible to use RDFa, as SVG Tiny 1.2 allows the attributes

  • about
  • content
  • datatype
  • property
  • rel
  • resource
  • rev
  • typeof

(You could use the metadata element with RDF/XML.)



来源:https://stackoverflow.com/questions/14615429/how-can-i-embed-schema-org-markup-in-svg

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!