Print

Print


Hi Eric,

Your question reminds me of https://www.dublincore.org/specifications/dublin-core/dcq-html/.
I'm not sure I agree with everything in it (specifically: using <meta> to specify RDF namespace prefixes used in other <meta> elements feels weird), but it did point to a more generally accepted HTML way of using URIs with types – the <link> element and `rel` attribute.

The IANA Link relations registry<https://www.iana.org/assignments/link-relations/link-relations.xhtml> contains relation names for `rel`, but you could use a URI as `rel` too. Signposting<https://signposting.org/> is based on typed links, for example.

Alternatively, you could include JSON-LD metadata in a <!cript> element, usually with Schema.org terms, for SEO and other purposes.

I'd be interested in what solution(s) you find useful.

Regards,
Ben

From: Code for Libraries <[log in to unmask]> on behalf of Eric Lease Morgan <[log in to unmask]>
Date: Friday, 29 March 2024 at 14:36
To: [log in to unmask] <[log in to unmask]>
Subject: [CODE4LIB] how do I specify uris as metadata values in xhtml
How do I specify URIs as metadata values in XHTML?

I have the following well-formed and valid XHTML:

  <?xml version="1.0" encoding="utf-8"?>
  <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
    "https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.w3.org%2FTR%2Fxhtml11%2FDTD%2Fxhtml11.dtd&data=05%7C02%7Cb.a.companjen%40LIBRARY.LEIDENUNIV.NL%7Ccf708ce6ee174b34645508dc4ff54762%7Cca2a7f76dbd74ec091086b3d524fb7c8%7C0%7C0%7C638473162079643089%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C0%7C%7C%7C&sdata=ij8NT4zPtb0jDrzmCFVXX7Re2nrIxyocJ50TmFIBEVw%3D&reserved=0<http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd>">
  <html xmlns="https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.w3.org%2F1999%2Fxhtml&data=05%7C02%7Cb.a.companjen%40LIBRARY.LEIDENUNIV.NL%7Ccf708ce6ee174b34645508dc4ff54762%7Cca2a7f76dbd74ec091086b3d524fb7c8%7C0%7C0%7C638473162079651024%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C0%7C%7C%7C&sdata=JIeQn%2Fp%2FtDaIDhBOYE0FnWpV8TNS9dnE%2FQs8lLSc67Y%3D&reserved=0<http://www.w3.org/1999/xhtml>"
        xmlns:terms="https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fpurl.org%2Fdc%2Fterms%2F&data=05%7C02%7Cb.a.companjen%40LIBRARY.LEIDENUNIV.NL%7Ccf708ce6ee174b34645508dc4ff54762%7Cca2a7f76dbd74ec091086b3d524fb7c8%7C0%7C0%7C638473162079656572%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C0%7C%7C%7C&sdata=oyfhbZ5SwbW8P3H5rqKP1zSz87dLwhQIVIpZvTVKAdc%3D&reserved=0<http://purl.org/dc/terms/>"
        xml:lang="en">
    <head>
      <title>Hello, World!</title>
      <meta name='terms.creator' content='Eric Lease Morgan' />
      <meta name='terms.title' content='Hello, World!' />
      <meta name='terms.date' content='2024-03-28' />
      <meta name='terms.abstract' content='Hello, World! It is nice to meet you.' />
      <meta name='terms.subject' content='yellow' />
      <meta name='terms.subject' content='red' />
      <meta name='terms.subject' content='blue' />
    </head>
    <body>
      <p>Hello, World!</p>
    </body>
  </html>


To make the value of terms.creator more useful, I'd like specify a URI instead of a literal. For example, instead of denoting "Eric Lease Morgan", I'd like to specify "https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.wikidata.org%2Fwiki%2FQ102275801&data=05%7C02%7Cb.a.companjen%40LIBRARY.LEIDENUNIV.NL%7Ccf708ce6ee174b34645508dc4ff54762%7Cca2a7f76dbd74ec091086b3d524fb7c8%7C0%7C0%7C638473162079660688%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C0%7C%7C%7C&sdata=IHL79uuksNvq8E1tnQ2gWuf91wcuc1kbMbm%2FeHnaGUk%3D&reserved=0<https://www.wikidata.org/wiki/Q102275801>", but if I simply put the URI in the content attribute, then how will an RDF processor know the value is a URI?

--
Eric Morgan <[log in to unmask]>