<?xml version="1.0" encoding="utf-8"?><feed xmlns="http://www.w3.org/2005/Atom" ><generator uri="https://jekyllrb.com/" version="4.3.4">Jekyll</generator><link href="https://chem-bla-ics.linkedchemistry.info/feed/by_tag/xml.xml" rel="self" type="application/atom+xml" /><link href="https://chem-bla-ics.linkedchemistry.info/" rel="alternate" type="text/html" /><updated>2026-04-11T11:30:50+00:00</updated><id>https://chem-bla-ics.linkedchemistry.info/feed/by_tag/xml.xml</id><title type="html">chem-bla-ics</title><subtitle>Chemblaics (pronounced chem-bla-ics) is the science that uses open science and computers to solve problems in chemistry, biochemistry and related fields.</subtitle><author><name>Egon Willighagen</name></author><entry><title type="html">CrossRef writes up RSS usage recommendations</title><link href="https://chem-bla-ics.linkedchemistry.info/2009/10/20/crossref-writes-up-rss-usage.html" rel="alternate" type="text/html" title="CrossRef writes up RSS usage recommendations" /><published>2009-10-20T00:00:00+00:00</published><updated>2009-10-20T00:00:00+00:00</updated><id>https://chem-bla-ics.linkedchemistry.info/2009/10/20/crossref-writes-up-rss-usage</id><content type="html" xml:base="https://chem-bla-ics.linkedchemistry.info/2009/10/20/crossref-writes-up-rss-usage.html"><![CDATA[<p><a href="http://www.crossref.org/CrossTech/2009/10/recommendations_on_rss_feeds_f.html">CrossTech announced</a> that a <a href="http://www.crossref.org/">CrossRef</a>
working group has written a <a href="http://oxford.crossref.org/best_practice/rss/">best practices</a> for the use of RSS feeds by publishers. Nice introduction
for anyone who is creating RSS feeds. Only comment I could make, is the lack of other modules. For example, a Chemistry module has been proposed by
us 5 years ago already (DOI:<a href="http://dx.doi.org/10.1021/ci034244p">10.1021/ci034244p</a>) and about which I blogged on
<a href="http://chem-bla-ics.blogspot.com/search?q=CMLRSS">several occasions</a>.</p>

<p>Below is the <a href="http://cb.openmolecules.net/atom.php?category=&amp;type=latest_inchis">CMLRSS feed</a> of <a href="http://cb.openmolecules.net/">Chemical blogspace</a>.</p>

<p><img src="/assets/images/cmlrss_Cb2.png" alt="" /></p>

<p>Of course, publishers can take advantage of such modules, using the <a href="http://www.w3.org/TR/xml-names/">XML Namespaces</a> technology. The <em>best practices</em>
uses that for a <a href="http://dublincore.org/">Dublin Core</a> and a <a href="http://purl.org/rss/1.0/modules/prism/">PRISM</a> extension. The here discussed CML
extension is another one, but the point is, that you can basically plug in any module.</p>]]></content><author><name>Egon Willighagen</name></author><category term="cml" /><category term="rss" /><category term="xml" /><category term="doi:10.1021/CI034244P" /><summary type="html"><![CDATA[CrossTech announced that a CrossRef working group has written a best practices for the use of RSS feeds by publishers. Nice introduction for anyone who is creating RSS feeds. Only comment I could make, is the lack of other modules. For example, a Chemistry module has been proposed by us 5 years ago already (DOI:10.1021/ci034244p) and about which I blogged on several occasions.]]></summary><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://chem-bla-ics.linkedchemistry.info/assets/images/cmlrss_Cb2.png" /><media:content medium="image" url="https://chem-bla-ics.linkedchemistry.info/assets/images/cmlrss_Cb2.png" xmlns:media="http://search.yahoo.com/mrss/" /></entry><entry><title type="html">Work in Progress: an Open DocCheck replacement</title><link href="https://chem-bla-ics.linkedchemistry.info/2009/10/17/work-in-progress-open-doccheck.html" rel="alternate" type="text/html" title="Work in Progress: an Open DocCheck replacement" /><published>2009-10-17T00:00:00+00:00</published><updated>2009-10-17T00:00:00+00:00</updated><id>https://chem-bla-ics.linkedchemistry.info/2009/10/17/work-in-progress-open-doccheck</id><content type="html" xml:base="https://chem-bla-ics.linkedchemistry.info/2009/10/17/work-in-progress-open-doccheck.html"><![CDATA[<p>While it is still very much in progress, I have already made more progress than I had hoped for. The <a href="http://java.sun.com/j2se/1.5.0/docs/guide/javadoc/doclet/spec/index.html">JavaDoc Doclet API</a>
is actually not too difficult to use, though my use will very likely improve more later. The <a href="http://cdk.sf.net/">CDK</a> has been using
<a href="http://java.sun.com/j2se/javadoc/doccheck/">Sun’s DocCheck</a> utility for testing the library’s JavaDoc quality, but the reports never
really satisfied me. Moreover, the most recent version is ancient and because it is <em>closed source</em>, no one can continue on those efforts.
DocCheck is <a href="http://en.wikipedia.org/wiki/Missing_In_Action">MIA</a>.</p>

<p>Instead, <a href="http://pmd.sf.net/">PMD</a> is given nice overviews of what it believes to be wrong with the CDK, and also provides a decent XML
format which allows extraction of information, which is used by, for example, <a href="http://pele.farmbio.uu.se/supernightly/">SuperNightly</a> as
showed yesterday in <a href="http://chem-bla-ics.blogspot.com/2009/10/pmd-245-installed-in-cdk-12x-branch.html">PMD 2.4.5 installed in the CDK 1.2.x branch</a>.</p>

<p>I have been pondering about it for a long time now, but writing a JavaDoc checking library is hardly core cheminformatics research;
at least, you would not get funding for it, despite everyone always complaining about good documentation. <em>Alas</em>.</p>

<p>Last week, I was reviewing some more code, and again saw the very common error of the missing period at the end of the first sentence
in JavaDoc. This one is sort of important for proper JavaDoc documentation generation, but the complexity of the current DocCheck
reporting, people are not familiar enough with it. Being tired of having to repeat myself, I decided to address the problen, but
creating better <a href="http://pele.farmbio.uu.se/nightly/javadoc/data/">Nightly error reporting for the CDK JavaDoc</a>.</p>

<p>So, I started <a href="http://github.com/egonw/ojdcheck">OpenJavaDocCheck</a>, or <em>ojdcheck</em>. As mentioned, I have made quite promising progress,
and the current version provides the ability to write custom tests (which I plan to use for validating content of
<a href="http://cdk.sourceforge.net/guides/devel/ch01.html">CDK taglet</a> content), and create XML as well as XHTML which can be saved to any file.
To give you a glimps of where things are going, here’s a screenshot of the current XHTML output:</p>

<p><img src="/assets/images/ojdcheckXHTML.png" alt="" /></p>

<p>The current list of tests is really small, and consists of a single test:</p>

<ul>
  <li>test if each class and method has JavaDoc</li>
</ul>]]></content><author><name>Egon Willighagen</name></author><category term="cdk" /><category term="javadoc" /><category term="java" /><category term="xml" /><summary type="html"><![CDATA[While it is still very much in progress, I have already made more progress than I had hoped for. The JavaDoc Doclet API is actually not too difficult to use, though my use will very likely improve more later. The CDK has been using Sun’s DocCheck utility for testing the library’s JavaDoc quality, but the reports never really satisfied me. Moreover, the most recent version is ancient and because it is closed source, no one can continue on those efforts. DocCheck is MIA.]]></summary><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://chem-bla-ics.linkedchemistry.info/assets/images/ojdcheckXHTML.png" /><media:content medium="image" url="https://chem-bla-ics.linkedchemistry.info/assets/images/ojdcheckXHTML.png" xmlns:media="http://search.yahoo.com/mrss/" /></entry><entry><title type="html">Autogenerating CML bindings for XMPP services with XMLBeans</title><link href="https://chem-bla-ics.linkedchemistry.info/2009/03/14/autogenerating-cml-bindings-for-xmpp.html" rel="alternate" type="text/html" title="Autogenerating CML bindings for XMPP services with XMLBeans" /><published>2009-03-14T00:00:00+00:00</published><updated>2009-03-14T00:00:00+00:00</updated><id>https://chem-bla-ics.linkedchemistry.info/2009/03/14/autogenerating-cml-bindings-for-xmpp</id><content type="html" xml:base="https://chem-bla-ics.linkedchemistry.info/2009/03/14/autogenerating-cml-bindings-for-xmpp.html"><![CDATA[<p>I blogged earlier about our efforts to create a better <a href="http://en.wikipedia.org/wiki/SOAP">SOAP</a>
service architecture, based on <a href="http://en.wikipedia.org/wiki/Jabber">XMPP</a>:</p>

<ul>
  <li><a href="https://chem-bla-ics.linkedchemistry.info/2009/01/21/details-behind-calling-xmpp-cloud.html">Details behind the “Calling XMPP cloud services from Taverna2” <i class="fa-solid fa-recycle fa-xs"></i></a></li>
  <li><a href="https://chem-bla-ics.linkedchemistry.info/2009/01/19/calling-xmpp-cloud-services-from.html">Calling XMPP cloud services from Taverna2 <i class="fa-solid fa-recycle fa-xs"></i></a></li>
  <li><a href="https://chem-bla-ics.linkedchemistry.info/2008/10/31/next-generation-asynchronous.html">Next generation asynchronous webservices <i class="fa-solid fa-recycle fa-xs"></i></a></li>
</ul>

<p>So, I set up XMPP services for QSAR descriptor calculation, 2D diagram and 3D geometry
calculations and a few more, using the <a href="http://cdk.sf.net/">CDK</a>.
<a href="http://en.wikipedia.org/wiki/Chemical_Markup_Language">Chemical Markup Language</a> has been my
primary choice for some 10 years now (see <a href="http://wwmm.ch.cam.ac.uk/blogs/murrayrust/?p=1241">Peter’s blog</a>)
as it allows me to do things I cannot do in other formats.</p>

<p>Now, our XMPP services publish themselves what data types the allow as input and what they output
in return. They do this by publishing XML Schema to describe the input and output types. My CDK
services use CML, so they return the CML schema. Johannes’ <a href="http://xws4j.sourceforge.net/">xws4j</a>
implementation of the <a href="http://xmpp.org/extensions/xep-0244.html">IO-DATA</a>
specification has an add on that can build bindings to the schema on the fly. Now, CML comes with
a good <a href="http://www.xom.nu/">XOM</a>-based binding (called <a href="http://wwmm.ch.cam.ac.uk/maven2/cml/cmlxom/">CMLXOM</a>)
so this is not strictly necessary, but for less common schemata it is worthwhile: you can always
create bindings for brand new schemata, for older versions, for whatever. Services can even
create their own local schemata, and people will still be able to easily use them. This is to me
a big plus for this architecture.</p>

<p>Anyway, while CMLXOM exists, we wanted to show that the on-the-fly creation of bindings works,
even for large schemata, such as CML. However, one of the older flavours had an small error in a
regular expression in a data type CML defines. Johannes therefore asked me to test building
bindings for the CML schema version used in my services. He adviced me to use scomp for this,
which is a command line utility around the <a href="http://xmlbeans.apache.org/">XMLBeans</a>
library used for the binding generation.</p>

<p>As I am running <a href="http://www.ubuntu.com/">Ubuntu</a>, I preferred installing
<a href="http://packages.ubuntu.com/jaunty/libxmlbeans-java">the packaged version</a> instead of installing
the binary provided by XMLBeans. Now, after I did this, I noticed that this .deb did not install
the scomp utility, so I filled a <a href="https://bugs.launchpad.net/ubuntu/+source/xmlbeans/+bug/342349">wishlist bug report</a>.
Earlier this week I already encountered another bug, but this package being Java, I had a good
idea on how to fix the bug.</p>

<p>And so I implemented my own wishlist. I’m sure there is room for improvement, as my .deb
packaging skills are a bit rusty (a very long time ago I have been in the Debian New Maintainers
queue, but by the time they solved the long queue delays, I was too occupied with other things.
Yes, this was a long time ago already :). Anyway, Ubuntu’s <a href="http://launchpad.net/">LaunchPad</a>
has a nice feature, called the <a href="http://launchpad.net/ubuntu/+ppas">Personal Package Archives</a>.
This service will, after I have finished hacking on the packaging specs in the famous <em>debian/</em>
folder and tested the <em>.debs</em> build from it, will rebuild it and put the resulting package up for
download.</p>

<p>Conclusion: a perfect opportunity to finally gives this a try. The learning curve was
surprisingly shallow, and the result can be seen in <a href="https://launchpad.net/~egonw/+archive/ppa">my personal package archive</a>:</p>

<p><img src="/assets/images/ppa.png" alt="" /></p>

<p>Now, you can easily imagine that I will soon work on packaging stuff I did in the past too, such
as update <a href="http://packages.ubuntu.com/jaunty/libcdk-java">libcdk-java</a> and now that OpenJDK in
main can run <a href="http://www.jmol.org/">Jmol</a> reasonably, finally package Jmol for main. I just hope
I remember my <a href="http://alioth.debian.org/">Alioth</a> account, so that I can properly contribute to
the <a href="http://alioth.debian.org/projects/debichem/">debichem</a> project.</p>

<p>Getting back to running <em>scomp</em> on the CML scheme, it works with one minor problem:</p>

<div class="language-shell highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nv">$ </span>scomp <span class="nt">-src</span> <span class="nb">.</span> <span class="nt">-d</span> <span class="nb">.</span>  cml.xsd
/home/egonw/tmp/cml/cml.xsd:10098:9: warning: p-props-correct.2.2: maxOccurs must be greater than or equal to 1.
Time to build schema <span class="nb">type </span>system: 1.792 seconds
Time to generate code: 3.297 seconds
Time to compile code: 9.658 seconds
</code></pre></div></div>

<p>The problem is reflected by line 10098 which goes like:</p>

<div class="language-xml highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nt">&lt;xsd:sequence</span> <span class="na">minOccurs=</span><span class="s">"0"</span> <span class="na">maxOccurs=</span><span class="s">"0"</span><span class="nt">&gt;</span>
</code></pre></div></div>

<p>which can be traced down to line 23 in <a href="http://cml.svn.sf.net/viewvc/cml/schema2/trunk/elements/tableHeaderCell.xsd?revision=161&amp;view=markup">schema2/trunk/elements/tableHeaderCell.xsd</a>.
I filled a <a href="https://sourceforge.net/tracker2/?func=detail&amp;aid=2686810&amp;group_id=51361&amp;atid=463005">bug report about this</a>.</p>]]></content><author><name>Egon Willighagen</name></author><category term="cml" /><category term="java" /><category term="ubuntu" /><category term="xml" /><category term="xmpp" /><summary type="html"><![CDATA[I blogged earlier about our efforts to create a better SOAP service architecture, based on XMPP:]]></summary><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://chem-bla-ics.linkedchemistry.info/assets/images/ppa.png" /><media:content medium="image" url="https://chem-bla-ics.linkedchemistry.info/assets/images/ppa.png" xmlns:media="http://search.yahoo.com/mrss/" /></entry><entry><title type="html">Editing and Validation of PubChem XML documents</title><link href="https://chem-bla-ics.linkedchemistry.info/2009/01/15/editing-and-validation-of-pubchem-xml.html" rel="alternate" type="text/html" title="Editing and Validation of PubChem XML documents" /><published>2009-01-15T00:00:00+00:00</published><updated>2009-01-15T00:00:00+00:00</updated><id>https://chem-bla-ics.linkedchemistry.info/2009/01/15/editing-and-validation-of-pubchem-xml</id><content type="html" xml:base="https://chem-bla-ics.linkedchemistry.info/2009/01/15/editing-and-validation-of-pubchem-xml.html"><![CDATA[<p>With the general framework set up for <a href="https://chem-bla-ics.linkedchemistry.info/2008/12/30/editing-and-validation-of-cml-documents.html">editing and validation of CML documents <i class="fa-solid fa-recycle fa-xs"></i></a>,
it was fairly easy to support the <a href="ftp://ftp.ncbi.nlm.nih.gov/pubchem/specifications/pubchem.xsd">PubChem XML file format schema too</a>.</p>

<p>With the upcoming Bioclipse2 beta (scheduled next Friday), all you need to install on top of the Bioclipse2 core is the new XML feature.</p>]]></content><author><name>Egon Willighagen</name></author><category term="pubchem" /><category term="xml" /><category term="bioclipse" /><summary type="html"><![CDATA[With the general framework set up for editing and validation of CML documents , it was fairly easy to support the PubChem XML file format schema too.]]></summary></entry><entry><title type="html">Editing and Validation of CML documents in Bioclipse</title><link href="https://chem-bla-ics.linkedchemistry.info/2008/12/30/editing-and-validation-of-cml-documents.html" rel="alternate" type="text/html" title="Editing and Validation of CML documents in Bioclipse" /><published>2008-12-30T00:10:00+00:00</published><updated>2008-12-30T00:10:00+00:00</updated><id>https://chem-bla-ics.linkedchemistry.info/2008/12/30/editing-and-validation-of-cml-documents</id><content type="html" xml:base="https://chem-bla-ics.linkedchemistry.info/2008/12/30/editing-and-validation-of-cml-documents.html"><![CDATA[<p>One advantage of using XML is that one can rely on good support in libraries for functionality. When
parsing XML, one does not have to take care of the syntax, and focus on the data and its semantics.
This comes at the expense of verbosity, though, but having the ability to express semantics explicitly
is a huge benefit for flexibility.</p>

<p>So, when <a href="http://wwmm.ch.cam.ac.uk/blogs/murrayrust/">Peter</a> and Henry put their first documents online about the Chemical Markup Language
(CML), I was thrilled, even though is actually was still SGML when I encountered it. The work predates the
<a href="http://www.w3.org/TR/1998/REC-xml-19980210">XML recommendation</a>. As I
<a href="https://chem-bla-ics.linkedchemistry.info/2008/10/02/jchempaint-history-cml-patches-in-1999.html">recently blogged <i class="fa-solid fa-recycle fa-xs"></i></a>, in ‘99
I wrote patches for Jmol and JChemPaint to support CML, which were published as preprint in the
<a href="http://www.sciencedirect.com/preprintarchive">Chemical Preprint Server</a> in a paper in 2000 in the
<a href="http://hackberry.trinity.edu/IJC/">Internet Journal of Chemistry</a>. Neither of the two has survived.</p>

<p>Anyway, the <a href="http://cdk.sf.net/">Chemistry Development Kit</a> makes heavy use of CML, and 
<a href="http://www.bioclipse.net/">Bioclipse</a> supports it too. Now, Bioclipse is based on the <a href="http://www.eclipse.org/">Eclipse</a>
<a href="http://wiki.eclipse.org/index.php/Rich_Client_Platform">Rich Client Platform</a> architecture, for which
there exist quite a few XML tools in the <a href="http://www.eclipse.org/webtools/">Web Tools Platform</a> (WTP).
Among these, a validation, content assisting XML editor. This means, I get red markings when I make my
XML document not-well-formed or invalid. Just a quick recap: well-formedness means that the XML document
has a proper syntax: one root node, properly closed tags, quotes around attribute values, etc. Validness,
however, means that the document is well-formed, but also hierarchically organized according to some specification.</p>

<p>Enter CML. CML is such a specification, first with DTDs, but after the introduction of XML Namespaces with
XML Schema (see <a href="http://cmlexplained.blogspot.com/2007/06/there-can-be-only-one-namespace.html">There can be only one (namespace)</a>).
The WTP can use this XML Schema for validation, and this is of great help learning the CML language.
Pressing Ctrl-space in Bioclipse will now show you what allowed content can be added at the current character
position.</p>

<p>Yes, Bioclipse can do this now (in SVN, at least). This has been on my wishlist for at least two years now, but
never really found the right information. Now, three days ago <a href="http://intellectualcramps.blogspot.com/">David</a>
wrote about <a href="http://intellectualcramps.blogspot.com/2008/12/end-of-year-cramps.html">End of Year Cramps</a>
in which he describes some of his work on the WTP for autocomplete for XPath queries. He <em>see[s] a brighter
future for XML at eclipse over the next year. I hope that those in the eclipse and XML community will help
to continue to improve the basic support, so that first class commercial quality applications that leverage
this support can continue to be built.</em></p>

<p>That was enough statement for me to <a href="http://intellectualcramps.blogspot.com/2008/12/end-of-year-cramps.html?showComment=1230451020000#c4332753586396921531">ask in the comments</a>
on how to make the WTP XML editor aware of the CML XML Schema. It already picked up XML Schema’s with
<code class="language-plaintext highlighter-rouge">xsi:schemaLocation</code>, but I needed something to worked without such statements in the XML document itself.
David explained that me that I could use the <a href="http://intellectualcramps.blogspot.com/2008/12/end-of-year-cramps.html?showComment=1230498780000#c4628316622126916885">org.eclipse.wst.xml.catalog extension</a>.
This was really easy, and <a href="http://bioclipse.svn.sourceforge.net/viewvc/bioclipse/bioclipse2/trunk/plugins/net.bioclipse.cml/plugin.xml?r1=8101&amp;r2=8100&amp;pathrev=8101">commited to Bioclipse SVN</a> as:</p>

<div class="language-xml highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nt">&lt;extension</span>
  <span class="na">point=</span><span class="s">"org.eclipse.wst.xml.core.catalogContributions"</span><span class="nt">&gt;</span>
  <span class="nt">&lt;catalogContribution&gt;</span>
    <span class="nt">&lt;uri</span> <span class="na">name=</span><span class="s">"http://www.xml-cml.org/schema"</span>
          <span class="na">uri=</span><span class="s">"schema24/schema.xsd"</span><span class="nt">/&gt;</span>
  <span class="nt">&lt;/catalogContribution&gt;</span>
<span class="nt">&lt;/extension&gt;</span>
</code></pre></div></div>

<p>However, that does not make the WTP XML editor available in the Bioclipse application yet. Not ever in
the “Open With”… So, I set up a <a href="http://bioclipse.svn.sourceforge.net/viewvc/bioclipse/bioclipse2/trunk/features/net.bioclipse.cml_feature/">CML Feature</a>.
After a follow up question, it turned out that the CML content type of Bioclipse was already a sub type of the
XML type (see ):</p>

<div class="language-xml highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nt">&lt;extension</span>
  <span class="na">point=</span><span class="s">"org.eclipse.core.runtime.contentTypes"</span><span class="nt">&gt;</span>
  <span class="nt">&lt;content-type</span>
    <span class="na">base-type=</span><span class="s">"org.eclipse.core.runtime.xml"</span>
    <span class="na">id=</span><span class="s">"net.bioclipse.contenttypes.cml"</span>
    <span class="na">name=</span><span class="s">"Chemical Markup Language (CML)"</span>
    <span class="na">file-extensions=</span><span class="s">"cml,xml"</span>
    <span class="na">priority=</span><span class="s">"normal"</span><span class="nt">&gt;</span>
  <span class="nt">&lt;/content-type&gt;</span>
<span class="nt">&lt;/extension&gt;</span>
</code></pre></div></div>

<p>So, the only remaining problem was to actually get the WTP XML editor as part of the Bioclipse application.
The new CML Feature takes care of that (I hope the export and building the update site work too, but
that’s yet untested), by important the relevant plugins and features. Last night, however, I ended up with
one stacktrace which gave me little clue on which plugin I was still missing.</p>

<p>Therefore, I headed to #eclipse and actually met David of the blog that started this again. He asked
<a href="http://nitind.blogspot.com/">nitind</a> to think about it too, and they helped me pin down the issue.
This relevant bit of the stacktrace turned out to be:</p>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>Caused by: java.lang.IllegalStateException
 at org.eclipse.core.runtime.Platform.getPluginRegistry(Platform.java:774)
 at org.eclipse.wst.common.componentcore.internal.impl.WTPResourceFactoryRegistry$ResourceFactoryRegistryReader.(WTPResourceFactoryRegistry.java:275)
 at org.eclipse.wst.common.componentcore.internal.impl.WTPResourceFactoryRegistry.(WTPResourceFactoryRegistry.java:61)
 at org.eclipse.wst.common.componentcore.internal.impl.WTPResourceFactoryRegistry.(WTPResourceFactoryRegistry.java:55)
 ... 37 more
</code></pre></div></div>

<p>This refered to this bit of code of Eclipse’ Platform.java:</p>

<div class="language-java highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nc">Bundle</span> <span class="n">compatibility</span> <span class="o">=</span> <span class="nc">InternalPlatform</span><span class="o">.</span><span class="na">getDefault</span><span class="o">()</span>
  <span class="o">.</span><span class="na">getBundle</span><span class="o">(</span><span class="nc">CompatibilityHelper</span><span class="o">.</span><span class="na">PI_RUNTIME_COMPATIBILITY</span><span class="o">);</span>
  <span class="k">if</span> <span class="o">(</span><span class="n">compatibility</span> <span class="o">==</span> <span class="kc">null</span><span class="o">)</span>
    <span class="k">throw</span> <span class="k">new</span> <span class="nf">IllegalStateException</span><span class="o">();</span>
</code></pre></div></div>

<p>So, the plugin I turned to to have missing was <em>org.eclipse.core.runtime.compatibility</em>. Apparently,
some parts of the WTP that the XMLEditor is using, still uses Eclipse2.x technology.</p>

<p><img src="/assets/images/cmlValid.png" alt="" /></p>

<p>This screenshot shows the WTP XMLEditor in action in Bioclipse on a CML file. It shows the document
contents with the ‘Design’ tab, which also shows allowed content, as derived from the XML Schema for
CML. Also, note that the Outline and Properties view automatically come for free, which allows more
detail and navigation of the content.</p>

<p><img src="/assets/images/cmlContentAssisting.png" alt="" /></p>

<p>This screenshot shows the ‘Source’ tab for the same file, where I deliberately changed the value of
the @id attribute of the first atom. The value does not validate against the regular expression defined
in the CML schema for @id attribute values. It also shows the content assisting in action. At any
location in the CML file, I can hit Ctrl-Space, and the editor will show me which content I can add
at that location.</p>

<p>This makes Bioclipse a perfect tool to craft CML documents and learn the language.</p>]]></content><author><name>Egon Willighagen</name></author><category term="cml" /><category term="bioclipse" /><category term="xml" /><category term="cdk" /><summary type="html"><![CDATA[One advantage of using XML is that one can rely on good support in libraries for functionality. When parsing XML, one does not have to take care of the syntax, and focus on the data and its semantics. This comes at the expense of verbosity, though, but having the ability to express semantics explicitly is a huge benefit for flexibility.]]></summary><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://chem-bla-ics.linkedchemistry.info/assets/images/cmlValid.png" /><media:content medium="image" url="https://chem-bla-ics.linkedchemistry.info/assets/images/cmlValid.png" xmlns:media="http://search.yahoo.com/mrss/" /></entry><entry><title type="html">MetWare screenshot: propagating XML Schema data types</title><link href="https://chem-bla-ics.linkedchemistry.info/2008/08/26/metware-screenshot-propagating-xml.html" rel="alternate" type="text/html" title="MetWare screenshot: propagating XML Schema data types" /><published>2008-08-26T00:00:00+00:00</published><updated>2008-08-26T00:00:00+00:00</updated><id>https://chem-bla-ics.linkedchemistry.info/2008/08/26/metware-screenshot-propagating-xml</id><content type="html" xml:base="https://chem-bla-ics.linkedchemistry.info/2008/08/26/metware-screenshot-propagating-xml.html"><![CDATA[<p>Just a quick screenshot. Remember our use of <a href="https://chem-bla-ics.linkedchemistry.info/2008/05/16/metware-status-report.html">SKOS in MetWare <i class="fa-solid fa-recycle fa-xs"></i></a>?
<a href="https://chem-bla-ics.linkedchemistry.info/2008/08/26/metware-screenshot-propagating-xml.html">Steffen <i class="fa-solid fa-recycle fa-xs"></i></a> has been working on creating integrated
<a href="http://en.wikipedia.org/wiki/JavaServer_Faces">JSF pages</a>, while I am focusing on autogeneration of blobs. The below screenshot is
such a blob, called a UI component in JSF, which allows easy embedding the the aggregations Steffen is working on.</p>

<p>Autogeneration of web content benefits greatly from well defined input, including data types.
<a href="http://www.metware.org/">MetWare</a> uses <a href="http://en.wikipedia.org/wiki/XML_Schema_(W3C)#Data_Types">XML Schema Data Types</a>
for this, as <a href="https://chem-bla-ics.linkedchemistry.info/2008/08/21/metware-screenshot-spectrum-support-2.html">mentioned ealier <i class="fa-solid fa-recycle fa-xs"></i></a> when I briefly
mentioned generation of search pages. That example showed the creation of range input on <code class="language-plaintext highlighter-rouge">xsd:integer</code> types. The below screenshot
shows the different output for <code class="language-plaintext highlighter-rouge">xsd:string</code> (input text box) and <code class="language-plaintext highlighter-rouge">xsd:boolean</code>:</p>

<p><img src="/assets/images/boolDataType.png" alt="" /></p>

<p>Now, this example is not really shocking, but MetWare defines additional types, for example an InChI data type:</p>

<div class="language-xml highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nt">&lt;simpleType</span> <span class="na">name=</span><span class="s">"inchi"</span><span class="nt">&gt;</span>
  <span class="nt">&lt;restriction</span> <span class="na">base=</span><span class="s">"string"</span><span class="nt">&gt;</span>
    <span class="nt">&lt;pattern</span> <span class="na">value=</span><span class="s">"InChI=1/.*"</span><span class="nt">/&gt;</span>
  <span class="nt">&lt;/restriction&gt;</span>
<span class="nt">&lt;/simpleType&gt;</span>
</code></pre></div></div>

<p>This allows me to tweak the HTML output created by the JSF pages to include <a href="http://microformats.org/">microformats</a> to support
the <a href="https://chem-bla-ics.linkedchemistry.info/2007/05/05/cb-comments-for-inchis.html">Sechemtic <i class="fa-solid fa-recycle fa-xs"></i></a> userscript (see also
doi:<a href="https://doi.org/10.1186/1471-2105-8-487">10.1186/1471-2105-8-487</a>).</p>

<p>Or, to provide a drop down box, listing the allowed values:</p>

<div class="language-xml highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nt">&lt;simpleType</span> <span class="na">name=</span><span class="s">"deviceVendor"</span><span class="nt">&gt;</span>
  <span class="nt">&lt;restriction</span> <span class="na">base=</span><span class="s">"string"</span><span class="nt">&gt;</span>
    <span class="nt">&lt;enumeration</span> <span class="na">value=</span><span class="s">"BioCrates"</span><span class="nt">/&gt;</span>
    <span class="nt">&lt;enumeration</span> <span class="na">value=</span><span class="s">"Bruecker"</span><span class="nt">/&gt;</span>
  <span class="nt">&lt;/restriction&gt;</span>
<span class="nt">&lt;/simpleType&gt;</span>
</code></pre></div></div>]]></content><author><name>Egon Willighagen</name></author><category term="metware" /><category term="xml" /><category term="skos" /><category term="doi:10.1186/1471-2105-8-487" /><summary type="html"><![CDATA[Just a quick screenshot. Remember our use of SKOS in MetWare ? Steffen has been working on creating integrated JSF pages, while I am focusing on autogeneration of blobs. The below screenshot is such a blob, called a UI component in JSF, which allows easy embedding the the aggregations Steffen is working on.]]></summary><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://chem-bla-ics.linkedchemistry.info/assets/images/boolDataType.png" /><media:content medium="image" url="https://chem-bla-ics.linkedchemistry.info/assets/images/boolDataType.png" xmlns:media="http://search.yahoo.com/mrss/" /></entry><entry><title type="html">MetWare screenshot: spectrum support #2</title><link href="https://chem-bla-ics.linkedchemistry.info/2008/08/21/metware-screenshot-spectrum-support-2.html" rel="alternate" type="text/html" title="MetWare screenshot: spectrum support #2" /><published>2008-08-21T00:00:00+00:00</published><updated>2008-08-21T00:00:00+00:00</updated><id>https://chem-bla-ics.linkedchemistry.info/2008/08/21/metware-screenshot-spectrum-support-2</id><content type="html" xml:base="https://chem-bla-ics.linkedchemistry.info/2008/08/21/metware-screenshot-spectrum-support-2.html"><![CDATA[<p>As <a href="https://chem-bla-ics.linkedchemistry.info/2008/08/20/metware-screenshot-spectrum-support.html">promised yesterday <i class="fa-solid fa-recycle fa-xs"></i></a>, here’s the pretty
visualization of the mass spectrum, using JavaScript from the <a href="http://www.ebi.ac.uk/pride/#soft">PRIDE project</a>:</p>

<p><img src="/assets/images/msGUI.png" alt="" /></p>

<p>Note the manual adding of peaks at 10 and 100 m/z to get the real peaks somewhere in the middle instead of on the left and right border of the graph.</p>

<p>Meanwhile, the search page is now autogenerated too, and the types of searches allowed (min, max in the picture) again depends on the
XML Scheme data type defined in the <a href="http://metware.svn.sourceforge.net/viewvc/metware/BigMet/trunk/src/main/onto/metware.skos?content-type=text%2Fxml&amp;revision=HEAD">MetWare SKOS</a>:</p>

<p><img src="/assets/images/mwSearch.png" alt="" /></p>]]></content><author><name>Egon Willighagen</name></author><category term="metware" /><category term="metabolomics" /><category term="xml" /><category term="skos" /><summary type="html"><![CDATA[As promised yesterday , here’s the pretty visualization of the mass spectrum, using JavaScript from the PRIDE project:]]></summary><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://chem-bla-ics.linkedchemistry.info/assets/images/msGUI.png" /><media:content medium="image" url="https://chem-bla-ics.linkedchemistry.info/assets/images/msGUI.png" xmlns:media="http://search.yahoo.com/mrss/" /></entry><entry><title type="html">MetWare screenshot: spectrum support</title><link href="https://chem-bla-ics.linkedchemistry.info/2008/08/20/metware-screenshot-spectrum-support.html" rel="alternate" type="text/html" title="MetWare screenshot: spectrum support" /><published>2008-08-20T00:00:00+00:00</published><updated>2008-08-20T00:00:00+00:00</updated><id>https://chem-bla-ics.linkedchemistry.info/2008/08/20/metware-screenshot-spectrum-support</id><content type="html" xml:base="https://chem-bla-ics.linkedchemistry.info/2008/08/20/metware-screenshot-spectrum-support.html"><![CDATA[<p>Not visually attractive, but that will be solved when Steffen gets his hands on it. For now, I’m happy with a table formatting.
Reason: it uses XML Schema to define a dataType, which is recognized by our code generators in <a href="http://www.metware.org/">MetWare</a>
(see also <a href="https://chem-bla-ics.linkedchemistry.info/2008/05/16/metware-status-report.html">this presentation <i class="fa-solid fa-recycle fa-xs"></i></a>), and used to create a easy to use Java API, which, in turn, can be used in this JSF snippet:</p>

<div class="language-xml highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nt">&lt;h:dataTable</span> <span class="na">value=</span><span class="s">"#{metobservCharacterizationMassspectrum.spectralPoints.points}"</span> <span class="na">var=</span><span class="s">"specpoint"</span><span class="nt">&gt;</span>
  <span class="nt">&lt;h:column&gt;</span>
    <span class="nt">&lt;f:facet</span> <span class="na">name=</span><span class="s">"header"</span><span class="nt">&gt;&lt;h:outputText</span> <span class="na">value=</span><span class="s">"m/z's"</span><span class="nt">/&gt;&lt;/f:facet&gt;</span>
    <span class="nt">&lt;h:outputText</span> <span class="na">value=</span><span class="s">"#{specpoint.mz}"</span><span class="nt">/&gt;</span>
  <span class="nt">&lt;/h:column&gt;</span>
  <span class="nt">&lt;h:column&gt;</span>
    <span class="nt">&lt;f:facet</span> <span class="na">name=</span><span class="s">"header"</span><span class="nt">&gt;&lt;h:outputText</span> <span class="na">value=</span><span class="s">"Intensities"</span><span class="nt">/&gt;&lt;/f:facet&gt;</span>
    <span class="nt">&lt;h:outputText</span> <span class="na">value=</span><span class="s">"#{specpoint.intensity}"</span><span class="nt">/&gt;</span>
  <span class="nt">&lt;/h:column&gt;</span>
<span class="nt">&lt;/h:dataTable&gt;</span>
</code></pre></div></div>

<p>The <code class="language-plaintext highlighter-rouge">&lt;dataTable&gt; @value</code> points (via the <code class="language-plaintext highlighter-rouge">faces-config.xml</code>) to the <code class="language-plaintext highlighter-rouge">MetobservCharacterizationMassspectrumBean</code>, which has a
<code class="language-plaintext highlighter-rouge">getSpectralPoints()</code> method (autocreated from the <code class="language-plaintext highlighter-rouge">&lt;skos:Concept&gt;</code> <code class="language-plaintext highlighter-rouge">SpectralPoints</code>, which has a convenience method
<code class="language-plaintext highlighter-rouge">List&lt;SpectralPoint&gt; getPoints()</code>.</p>

<p><code class="language-plaintext highlighter-rouge">SpectralPoint</code> in turn has the methods <code class="language-plaintext highlighter-rouge">getIntensity()</code> and <code class="language-plaintext highlighter-rouge">getMz()</code> also used in the above JSF snippet. For convenience,
<code class="language-plaintext highlighter-rouge">SpectralPointArray</code> also has two other methods: <code class="language-plaintext highlighter-rouge">double[] getIntensities()</code> and <code class="language-plaintext highlighter-rouge">double[] getMzs()</code> (which I’ll have to
rename to reuse the code for NMR support :).</p>

<p>So, here’s the outcome:</p>

<p><img src="/assets/images/msTable.png" alt="" /></p>

<p>Final note, given the dataType, the MetWare bean also has the logic to convert the data back and forth into a SQL serialization,
which may eventually use base64 encoding, but currently looks like <em>61.0,100.0;62.0,1.1</em>, as defined by the regular expression of
the XSD dataType for spectralPointArray.</p>]]></content><author><name>Egon Willighagen</name></author><category term="metware" /><category term="xml" /><category term="java" /><summary type="html"><![CDATA[Not visually attractive, but that will be solved when Steffen gets his hands on it. For now, I’m happy with a table formatting. Reason: it uses XML Schema to define a dataType, which is recognized by our code generators in MetWare (see also this presentation ), and used to create a easy to use Java API, which, in turn, can be used in this JSF snippet:]]></summary><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://chem-bla-ics.linkedchemistry.info/assets/images/msTable.png" /><media:content medium="image" url="https://chem-bla-ics.linkedchemistry.info/assets/images/msTable.png" xmlns:media="http://search.yahoo.com/mrss/" /></entry><entry><title type="html">Metabolomics Ontologies: SKOS-ified the ArMet specification</title><link href="https://chem-bla-ics.linkedchemistry.info/2008/03/03/metabolomics-ontologies-skos-ified.html" rel="alternate" type="text/html" title="Metabolomics Ontologies: SKOS-ified the ArMet specification" /><published>2008-03-03T00:00:00+00:00</published><updated>2008-03-03T00:00:00+00:00</updated><id>https://chem-bla-ics.linkedchemistry.info/2008/03/03/metabolomics-ontologies-skos-ified</id><content type="html" xml:base="https://chem-bla-ics.linkedchemistry.info/2008/03/03/metabolomics-ontologies-skos-ified.html"><![CDATA[<p>The <a href="https://chem-bla-ics.linkedchemistry.info/2007/11/22/metware-metabolomics-database-project.html">MetWare project <i class="fa-solid fa-recycle fa-xs"></i></a>
is going to make use of ontology
technologies to control the content of the database, and a first step is to convert <a href="http://metware.svn.sourceforge.net/viewvc/metware/trunk/metware/design/">our MetWare database design</a>
into something using a formal ontology language. I have played with <a href="http://en.wikipedia.org/wiki/Web_Ontology_Language">OWL</a>
in the past (see for example
<a href="https://chem-bla-ics.linkedchemistry.info/2007/04/24/bioclipse-now-allows-qsar-descriptor.html">its use in Bioclipse <i class="fa-solid fa-recycle fa-xs"></i></a>),
but was not overly happy with it in all situations.</p>

<p>Then I read about <a href="http://en.wikipedia.org/wiki/SKOS">SKOS</a>, Simplified Knowledge Organisation System. Unlike OWL, SKOS is less strict on relations
between concepts being marked up. Often these concepts are loosely bound, instead following a strict <em>is_a</em> hierarchy.
<a href="http://www.armet.org/">ArMet</a> is a Metabolomics knowledge system which does not have a strong hierarchy, and SKOS seemed to me to be the most
suitable markup candidate. So, I SKOS-ified the ArMet specification, resulting in <a href="http://metware.svn.sourceforge.net/viewvc/*checkout*/metware/trunk/metware/design/onto/armet.skos?revision=HEAD&amp;content-type=text%2Fxml">this rather simple document</a>.
The document is SKOS, but has an associated <a href="http://metware.svn.sourceforge.net/viewvc/*checkout*/metware/trunk/metware/design/onto/skos2html.xsl?revision=HEAD&amp;content-type=text%2Fxml">skos2html.xsl</a>
<a href="http://en.wikipedia.org/wiki/XSLT">XSLT stylesheet</a>, so that Firefox converts it to XHTML on the fly.</p>

<p>An entry looks like:</p>

<div class="language-xml highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nt">&lt;skos:Concept</span> <span class="na">rdf:about=</span><span class="s">"GenotypeID"</span><span class="nt">&gt;</span>
  <span class="nt">&lt;skos:prefLabel&gt;</span>genotypeID<span class="nt">&lt;/skos:prefLabel&gt;</span>

  <span class="nt">&lt;skos:definition&gt;</span>A unique identifier for the genotype.<span class="nt">&lt;/skos:definition&gt;</span>
  <span class="nt">&lt;skos:broader</span> <span class="na">rdf:about=</span><span class="s">"GenotypeProperty"</span><span class="nt">/&gt;</span>
<span class="nt">&lt;/skos:Concept&gt;</span>
</code></pre></div></div>

<p>The full SKOS specification allows capturing much of what we want to do, including i18n via the label system, loos hierarchical relations via
<em>skos:broader</em>, and the concepts of <em>skos:Collection</em> to aggregate concepts. Where needed, it allows borrowing from other languages. For example,
to link concepts from MetWare to the original ArMet specification <em>owl:sameAs</em> can be used.</p>]]></content><author><name>Egon Willighagen</name></author><category term="bioclipse" /><category term="metware" /><category term="ontology" /><category term="semweb" /><category term="owl" /><category term="xml" /><summary type="html"><![CDATA[The MetWare project is going to make use of ontology technologies to control the content of the database, and a first step is to convert our MetWare database design into something using a formal ontology language. I have played with OWL in the past (see for example its use in Bioclipse ), but was not overly happy with it in all situations.]]></summary></entry><entry><title type="html">XML validation on Eclipse with Web Tools Platform</title><link href="https://chem-bla-ics.linkedchemistry.info/2006/05/24/xml-validation-on-eclipse-with-web.html" rel="alternate" type="text/html" title="XML validation on Eclipse with Web Tools Platform" /><published>2006-05-24T00:00:00+00:00</published><updated>2006-05-24T00:00:00+00:00</updated><id>https://chem-bla-ics.linkedchemistry.info/2006/05/24/xml-validation-on-eclipse-with-web</id><content type="html" xml:base="https://chem-bla-ics.linkedchemistry.info/2006/05/24/xml-validation-on-eclipse-with-web.html"><![CDATA[<p>Yesterday I installed the <a href="http://www.eclipse.org/webtools/">Eclipse Web Tools Platform</a> again, and now
succesfully, using the Eclipse update mechanism, on my <a href="http://www.kubuntu.org/">Kubuntu dapper</a> eclipse
install. Because it has a validating XML editor, the one last thing I still needed
<a href="http://www.jedit.org/">jEdit</a> for. (I do miss the vertical selection feature of jEdit, though.) It
signals me of errors, and allows autocompletion.</p>

<p>Now I can validate all <a href="http://www.xml-cml.org/">Chemical Markup Langauge</a> files I have around, which is
very useful for those I use to make sure <a href="http://cdk.sf.net/">CDK</a> and <a href="http://www.bioclipse.net/">Bioclipse</a>
is working properly. I just need to make sure I use the <code class="language-plaintext highlighter-rouge">http://www.w3.org/2001/XMLSchema-instance namespace</code>,
for example as in this example from CDK SVN:</p>

<div class="language-xml highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nt">&lt;cml</span> <span class="na">title=</span><span class="s">"Regression tests for valid XML Schema documents for CML 2.3"</span>

  <span class="na">xmlns=</span><span class="s">"http://www.xml-cml.org/schema"</span>
  <span class="na">xmlns:xsi=</span><span class="s">"http://www.w3.org/2001/XMLSchema-instance"</span>
  <span class="na">xsi:schemaLocation=</span><span class="s">"http://www.xml-cml.org/schema ../../../io/cml/data/cml23.xsd"</span><span class="nt">&gt;</span>
</code></pre></div></div>

<p>Now, I do have some questions. Firstly, does WTP allow recycling of the XML editor? That is, can I use their validating XML editor in, for example, Bioclipse? Would I just depend on the right plugin jars from WTP, or is it more complicated? Alternatively, since in RCP all is a plugin, can WTP be installed as plugin in Bioclipse directly??</p>

<p>Secondly, does Kubuntu or Debian sid have binary packages for WTP? I think to remember having read something about this, in relation with splitting up the WTP into smaller, more specific plugins. Anyone?</p>]]></content><author><name>Egon Willighagen</name></author><category term="xml" /><category term="bioclipse" /><category term="cml" /><summary type="html"><![CDATA[Yesterday I installed the Eclipse Web Tools Platform again, and now succesfully, using the Eclipse update mechanism, on my Kubuntu dapper eclipse install. Because it has a validating XML editor, the one last thing I still needed jEdit for. (I do miss the vertical selection feature of jEdit, though.) It signals me of errors, and allows autocompletion.]]></summary></entry></feed>