问题
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