{
  "version": "https://jsonfeed.org/version/1.1",
  "title": "chem-bla-ics",
  "description": "Chemblaics (pronounced chem-bla-ics) is the science that uses open science and computers to solve problems in chemistry, biochemistry and related fields.",
  "home_page_url": "https://chem-bla-ics.linkedchemistry.info/",
  "feed_url": "https://chem-bla-ics.linkedchemistry.info/2007/06/27/chemical-rdfa-with-operator-in-firefox.json",
  "icon": "https://chem-bla-ics.linkedchemistry.info/assets/images/chem-bla-ics_logo.png",
  "language": "en",
  "authors": [
    {
      "name": "Egon Willighagen",
      "url": "https://orcid.org/0000-0001-7542-0286",
      "_orcid": "0000-0001-7542-0286"
    }
  ],
  "items": [

    {
      "id": "https://doi.org/10.59350/8hkrb-cb907",
      "url": "https://chem-bla-ics.linkedchemistry.info/2007/06/27/chemical-rdfa-with-operator-in-firefox.html",
      "title": "Chemical RDFa with Operator in the Firefox toolbar",
      "content_html": "<p>December last year <a href=\"https://chem-bla-ics.linkedchemistry.info/2006/12/10/including-smiles-cml-and-inchi-in.html\">I proposed the use of microformats and RDFa <i class=\"fa-solid fa-recycle fa-xs\"></i></a>\nfor simple semantic markup of molecular information. I linked that with the <a href=\"https://chem-bla-ics.linkedchemistry.info/2006/02/25/hacking-inchi-support-into.html\">InChI extension for the Postgenomic.com software <i class=\"fa-solid fa-recycle fa-xs\"></i></a>\nfor <a href=\"http://cb.openmolecules.net/\">Chemical blogspace</a> and wrote these tools to work with the markup:</p>\n\n<ul>\n  <li><a href=\"https://chem-bla-ics.linkedchemistry.info/2006/12/17/smiles-cas-and-inchi-in-blogs.html\">wrote a Greasemonkey script to automatically link to webservices <i class=\"fa-solid fa-recycle fa-xs\"></i></a>,</li>\n  <li><a href=\"https://chem-bla-ics.linkedchemistry.info/2007/01/02/chemistry-in-html-javascript-from.html\">explained how that script can be used on the server <i class=\"fa-solid fa-recycle fa-xs\"></i></a>, and</li>\n  <li><a href=\"https://chem-bla-ics.linkedchemistry.info/2007/05/05/cb-comments-for-inchis.html\">adapted a Greasemonkey script to show blog items related to molecules <i class=\"fa-solid fa-recycle fa-xs\"></i></a>.</li>\n</ul>\n\n<p>All using the new semantic markup.</p>\n\n<p>Of the two, I think RDFa has the best future. Then I <a href=\"https://chem-bla-ics.linkedchemistry.info/2007/05/11/added-my-hcard-to-my-blog.html\">discovered Operator <i class=\"fa-solid fa-recycle fa-xs\"></i></a>,\nwritten by <a href=\"http://www.kaply.com/weblog/\">Mike</a>. While the Greasemonkey scripts already allow me to link to, for example, PubChem and eMolecules,\nthe <a href=\"https://addons.mozilla.org/en-US/firefox/addon/4106\">Operator Firefox Addon</a> allowed me to open vCards incorporated in HTML pages directly\nto my address book client. Thus, I could open chemistry directly in <a href=\"http://bioclipse.net/\">Bioclipse</a> too!</p>\n\n<p>That was the idea, at least. I contacted Mike, and he asked me to wait until the first 0.8 releases, which he\n<a href=\"http://www.kaply.com/weblog/2007/06/04/operator-08a-is-available/\">announced earlier this month</a>.\nThis version allows user scripts to be written, which define how RDFa should be handled. And with his patience and help, this was the result:</p>\n\n<p><img src=\"/assets/images/pubchemRDFa.png\" alt=\"\" /></p>\n\n<p>The HTML is almost <a href=\"https://chem-bla-ics.linkedchemistry.info/2006/12/17/smiles-cas-and-inchi-in-blogs.html\">as explained before <i class=\"fa-solid fa-recycle fa-xs\"></i></a>, and looks like:</p>\n\n<div class=\"language-html highlighter-rouge\"><div class=\"highlight\"><pre class=\"highlight\"><code><span class=\"nt\">&lt;html</span> <span class=\"na\">xmlns=</span><span class=\"s\">\"http://www.w3.org/2002/06/xhtml2/\"</span><span class=\"nt\">&gt;</span>\n\n<span class=\"nt\">&lt;h1&gt;</span>Chemical RDFa with Operator<span class=\"nt\">&lt;/h1&gt;</span>\n\n<span class=\"nt\">&lt;div</span> <span class=\"na\">about=</span><span class=\"s\">\"#chem_123\"</span> <span class=\"na\">xmlns:chem=</span><span class=\"s\">\"http://www.blueobelisk.org/chemistryblogs/\"</span><span class=\"nt\">&gt;</span>\n  Methane has the following identifier: <span class=\"nt\">&lt;span</span> <span class=\"na\">property=</span><span class=\"s\">\"chem:inchi\"</span><span class=\"nt\">&gt;</span>InChI=1/CH4/h1H4<span class=\"nt\">&lt;/span&gt;</span>\n<span class=\"nt\">&lt;/div&gt;</span>\n\n<span class=\"nt\">&lt;/html&gt;</span>\n</code></pre></div></div>\n\n<p>It is important here to wrap the statement in a <code class=\"language-plaintext highlighter-rouge\">&lt;div&gt;</code> element and to add the <code class=\"language-plaintext highlighter-rouge\">@about</code> attribute to it, defining the Subject. Moreover,\nyou need to use the <code class=\"language-plaintext highlighter-rouge\">@property</code> attributes instead of <code class=\"language-plaintext highlighter-rouge\">@class</code>. The content of this attribute defined the Predicate, and the content of the\n<code class=\"language-plaintext highlighter-rouge\">&lt;span&gt;</code> element is the Object, completing the RDF triple.</p>\n\n<p>Operator detects these RDFa statements from the HTML, and creates a new menu item <em>Search in Pubchem</em> using this piece of code:</p>\n\n<div class=\"language-javascript highlighter-rouge\"><div class=\"highlight\"><pre class=\"highlight\"><code><span class=\"kd\">var</span> <span class=\"nx\">pubchem_inchi</span> <span class=\"o\">=</span> <span class=\"p\">{</span>\n  <span class=\"na\">description</span><span class=\"p\">:</span> <span class=\"dl\">\"</span><span class=\"s2\">Search in PubChem</span><span class=\"dl\">\"</span><span class=\"p\">,</span>\n  <span class=\"na\">short</span><span class=\"p\">:</span> <span class=\"dl\">\"</span><span class=\"s2\">PubChem</span><span class=\"dl\">\"</span><span class=\"p\">,</span>\n  <span class=\"na\">scope</span><span class=\"p\">:</span> <span class=\"p\">{</span>\n    <span class=\"na\">semantic</span><span class=\"p\">:</span> <span class=\"p\">{</span>\n      <span class=\"dl\">\"</span><span class=\"s2\">RDFa</span><span class=\"dl\">\"</span> <span class=\"p\">:</span>  <span class=\"p\">{</span>\n        <span class=\"na\">property</span> <span class=\"p\">:</span> <span class=\"dl\">\"</span><span class=\"s2\">http://www.blueobelisk.org/chemistryblogs/inchi</span><span class=\"dl\">\"</span><span class=\"p\">,</span>\n        <span class=\"na\">defaultNS</span> <span class=\"p\">:</span> <span class=\"dl\">\"</span><span class=\"s2\">http://www.blueobelisk.org/chemistryblogs/</span><span class=\"dl\">\"</span>\n      <span class=\"p\">}</span>\n    <span class=\"p\">}</span>\n  <span class=\"p\">},</span>\n  <span class=\"na\">doAction</span><span class=\"p\">:</span> <span class=\"kd\">function</span><span class=\"p\">(</span><span class=\"nx\">semanticObject</span><span class=\"p\">,</span> <span class=\"nx\">semanticObjectType</span><span class=\"p\">)</span> <span class=\"p\">{</span>\n    <span class=\"k\">if </span><span class=\"p\">(</span><span class=\"nx\">semanticObjectType</span> <span class=\"o\">==</span> <span class=\"dl\">\"</span><span class=\"s2\">RDFa</span><span class=\"dl\">\"</span><span class=\"p\">)</span> <span class=\"p\">{</span>\n      <span class=\"k\">return</span> <span class=\"dl\">\"</span><span class=\"s2\">http://www.ncbi.nlm.nih.gov/entrez/query.fcgi?CMD=search&amp;DB=pccompound&amp;term=%22</span><span class=\"dl\">\"</span> <span class=\"o\">+</span> <span class=\"nx\">semanticObject</span><span class=\"p\">.</span><span class=\"nx\">inchi</span> <span class=\"o\">+</span> <span class=\"dl\">\"</span><span class=\"s2\">%22[InChI]</span><span class=\"dl\">\"</span><span class=\"p\">;</span>\n    <span class=\"p\">}</span>\n  <span class=\"p\">}</span>\n<span class=\"p\">};</span>\n\n<span class=\"nx\">SemanticActions</span><span class=\"p\">.</span><span class=\"nf\">add</span><span class=\"p\">(</span><span class=\"dl\">\"</span><span class=\"s2\">pubchem_inchi</span><span class=\"dl\">\"</span><span class=\"p\">,</span> <span class=\"nx\">pubchem_inchi</span><span class=\"p\">);</span>\n</code></pre></div></div>\n\n<p>You can reproduce this by installing Operator 0.8a in Firefox, saving the script to a file in your home directory, and\nreading it via the Operator “Options” dialog. Make sure to also set the <em>Display Style</em> in the <em>General</em> tab of the dialog to\n<em>Data formats</em>. Only then will the RDFa magic kick in.</p>\n\n<p>Adding support for eMolecules, ChemSpider and whatever else we like is easy now. What I still need to explore (or ask Mike),\nis how I can trigger the <em>Open With/Save As</em> dialog of Firefox.</p>",
      "summary": "December last year I proposed the use of microformats and RDFa for simple semantic markup of molecular information. I linked that with the InChI extension for the Postgenomic.com software for Chemical blogspace and wrote these tools to work with the markup:",
      "image": "https://chem-bla-ics.linkedchemistry.info/assets/images/pubchemRDFa.png",
      "date_published": "2007-06-27T00:10:00+00:00",
      "date_modified": "2025-07-30T00:00:00+00:00",
      "tags": ["pubchem","rdf","userscript","inchi","rdfa"],
      
      
      
      
      
      
        "authors": [ { "name": "Egon Willighagen", "url": "https://orcid.org/0000-0001-7542-0286" } ]
      
    }

  ]
}
