40 Matching Annotations
  1. Jun 2023
  2. Apr 2023
  3. Mar 2023
    1. Microdata DOM API

      Warning: Microdata were implemented in some browsers for a long time. Nowadays, they have been abandoned and removed from all browsers and are therefore deprecated. You can't use them anymore and this document is kept as information only.

    1. The microdata becomes even more useful when scripts can use it to expose information to the user, for example offering it in a form that can be used by other applications.The document.getItems(typeNames) method provides access to the top-level microdata items. It returns a NodeList containing the items with the specified types, or all types if no argument is specified.Each item is represented in the DOM by the element on which the relevant itemscope attribute is found. These elements have their element.itemScope IDL attribute set to true.The type of items can be obtained using the element.itemType IDL attribute on the element with the itemscope attribute.

      ```js // This sample shows how the getItems() method can be used to obtain a list // of all the top-level microdata items of one type given in the document:

      var cats = document.getItems("http://example.com/feline"); ```

      ```js // This sample gets the first item of type "http://example.net/user" // and then pops up an alert using the "name" property from that item.

      var user = document.getItems('http://example.net/user')[0]; alert('Hello ' + user.properties['name'][0].content + '!'); ```

      ```js // The HTMLPropertiesCollection object, when indexed by name in this way, // actually returns a PropertyNodeList object with all the matching properties. // The PropertyNodeList object can be used to obtain all the values at once // using its values attribute, which returns an array of all the values.

      var cat = document.getItems('http://example.org/animals#cat')[0]; var colors = cat.properties['http://example.com/color'].values; var result; if (colors.length == 0) { result = 'Color unknown.'; } else if (colors.length == 1) { result = 'Color: ' + colors[0]; } else { result = 'Colors:'; for (var i = 0; i < colors.length; i += 1) result += ' ' + colors[i]; } ```

  4. Sep 2022
  5. Aug 2022
  6. Feb 2022
  7. Dec 2021
  8. Oct 2020
    1. Over the years, Google has gone from recommending uploading a text file, to parsing RDFa with a slightly modified Microformats vocabulary, to going all-in on Microdata, to then replacing Microdata with JSON-LD and the new Schema.org vocabulary. In the mean time, the Microformats hReview vocabulary hasn't changed, and has continued to be parsed by Google since it is so widely deployed. It would seem there is some advantage to using a format that was developed externally from Google, since they are unable to simply turn their backs on it and replace it with a new format whenever they want. For this reason, I'm sticking with publishing the Microformats 1 hReview markup for my reviews.
  9. Aug 2020
  10. Jul 2020
  11. Oct 2018
  12. Sep 2018
    1. RDF Translator is a multi-format conversion tool for structured markup. It provides translations between data formats ranging from RDF/XML to RDFa or Microdata. The service allows for conversions triggered either by URI or by direct text input. Furthermore it comes with a straightforward REST API for developers.
    1. This [html-extensions] specification defines new HTML attributes to embed simple machine-readable data in HTML documents.