Sectie hymenoptera van de Nederlandse Entomologische Vereniging

Home>Taxonomie, XML & RDF

Taxonomie,
XML & RDF

Doelen

Veel van ons willen van de natuur genieten, daar iets van begrijpen en het ook een beetje behouden. Informatie dient al deze doelen, ook digitale informatie. Er zijn alleen veel verschillende vormen van digitale informatie in omloop op het moment.

Entomologen

Entomologen kunnen insecten vangen en determineren, de informatie ergens opslaan en beschikbaar maken. Desnoods conclusies trekken en theorieën verzinnen. Zij slaan vangsten op o.a. op spreadsheets, in een eigen database of in een database van een ander, zoals die van EIS.

De Middelen

"Screen readers," gebruikt door blinden om text van computerschermen te lezen, maken vaak woordensalade van tabellen in HTML. Dat komt doordat HTML niet strict gecodeerd is en doordat de makers van webpagina's ook niet erg strict zijn in het ontwerpen van tabellen. Vergelijk een stuk van ons tabel Naamlijst Wespen en Mieren met hetzelfde stukje als (goed gevormd) HTML:


<tr>
<td scope="row"><h5 class="nospace">GENUS</h5></td>
<td><h5 id="goniozus"><em>GONIOZUS</em> Förster, 1856</h5></td>
<td>spiegelplatkopwespen</td>
</tr>
<tr>
vtd scope="row"></td>
<td id="parasierola">=<em>Parasierola</em> Cameron, 1883</td>
<td></td>
</tr>

Het is zeer moeilijk om HTML te exporteren als (of te veranderen in) hoogwardige informatie. Met XML en RDF is dat juist de bedoeling.

XML & RDF

XML is een meta-opmaaktaal voor textdocumenten. RDF wordt gebruikt om informatiebronnen te omschrijven. Zij overlappen elkaar enigszins.

Dit zijn een paar voordelen van XML:

Met andere woorden, als ik even in mijn glazen bol mag kijken, XML is een taal van nu en van de toekomst.

XML en RDF zijn gemaakt voor logische, hiërarchische informatie. Misschien is dat ook een zwak punt, want niet alle belangrijke informatie is logisch of hierarchisch. Maar XML is juist bijzonder geschikt voor een taxonomie (van bijvoorbeeld hymenoptera), het bijhouden van een collectie insekten of het bijhouden van verspreidingsgegevens van bepaalde organismen over een of meerdere landen. (Het zou vrij eenvoudig zijn om verspreidingsgegevens uit verschillende landen, opgeslagen als XML of RDF, aan elkaar te koppelen.)

Advies

Als je zelf gegevens opslaat in een database, maak dan gebruik van een database warmee je gegevens kan exporteren als XML. Access kan dat, net als MySQL en andere SQL's. En overweeg die database te exporteren als XML.

Als je een database aanmaakt met slechts een tabel, dan zou je database "collectie" of "hymenoptera" kunnen noemen en de tabel "item." Dan maak je gebruik van velden die aanbevolen zijn bij Darwin Core. Het liefst in het oorspronkelijke Engels, maar desnoods in het Nederlands. Als je dat als XML exporteert (bijvoorbeeld met phpMyAdmin), dan krijg je XML die er ongeveer zo uitziet:


<item>
  <ScientificName>Bethylus dendrophilus</ScientificName>
  <Superfamily>CHRYSIDOIDEA</Superfamily>
  <Family>BETHYLIDAE</Family>
  <VernacularName lang="nl">PLATKOPWESPEN</VernacularName>
  <Genus>BETHYLUS</Genus>
  <AuthorOfGenus>Latreille</AuthorOfGenus>
  <YearOfGenus>1802</YearOfGenus>
  <VernacularName lang="nl">kielplatkopwespen</VernacularName>
  <SpecificEpithet>dendrophilus</SpecificEpithet>
  <AuthorOfScientificName>Richards</AuthorOfScientificName>
  <YearOfScientificName>1939</YearOfScientificName>
  <VernacularName lang="nl"></VernacularName>
  <Country>Netherlands</Country>
  <InfraspecificRank></InfraspecificRank>
  <InfraspecificEpithet></InfraspecificEpithet>
  <AuthorOfInfraspecificEpithet></AuthorOfInfraspecificEpithet>
  <YearOfInfraspecificEpithet></YearOfInfraspecificEpithet>
</item>

Als voorbeeld van een taxonomische lijst, kijk naar de XML-bestanden "Chrysidoidea" zonder opmaak en "Chrysidoidea" met opmaak. Kijk ook naar onze XSL stylesheet die voor de opmaak zorgt. Met hulp van XML Forum at Tek-Tips hebben wij ook een alternatief XSL stylesheet.

Als voorbeeld van een collectie insecten bijgehouden in een database, geëxporteerd als XML, kijk naar "Boktorren" zonder opmaak en "Boktorren" met opmaak. Kijk ook naar de bijhorende XSL stylesheet die afgeleid is van de Chrysidoidea stylesheet. Let op: de opmaak via XSL kan naar wens; de XML daarachter blijt toch "machine readable:" leesbaar voor een machine.

Taxonomie

Er zijn leuke discussies over de rollen van XML en RDF bij taxonomieën en collecties. Kijk naar een artikel over "taxonomics and the semantic web" en een artikel over "the life science identifier," een project om specifieke Web Resource namen te geven aan bekende organismen.

Een paar bijzondere websites die te maken hebben met Linnaean taxonomy zijn:

RDF

En als ik het toch over moeilijke dingen heb, dan kan ik nu het best afsluiten met RDF. RDF is lastig om met de hand te coderen of typen, en het is ook lastig om een lang RDF-document met het blote oog te begrijpen. Zie hier, een stukje taxonomische informatie:


<rdf:Description rdf:about="#chryignitasparse">
  <linnaeus:specificEpithet>ignita</linnaeus:specificEpithet>
  <linnaeus:infraspecificRank>var.</linnaeus:infraspecificRank>
  <linnaeus:infrEpithet>sparsepunctata</linnaeus:infrEpithet>
  <linnaeus:Name>Chrysis ignita sparsepunctata</linnaeus:Name>
  <linnaeus:authorYear>Zimmerman, 1944</linnaeus:authorYear>
  <linnaeus:country>
    <rdf:Bag>
	<rdf:li rdf:parseType='Literal'>Netherlands</rdf:li>
    </rdf:Bag>	
  </linnaeus:country>
  <linnaeus:synonym>
    <rdf:Bag>
	<rdf:li rdf:resource="#pseucarp" />
    </rdf:Bag>
  </linnaeus:synonym>
  <linnaeus:questionableSynonym>
    <rdf:Bag>
	<rdf:li rdf:resource="#bethpilo" />
    </rdf:Bag>	
  </linnaeus:questionableSynonym>
</rdf:Description>

Maar gooi dit door een parser zoals RDF Validator, en er komem een mooie grafiek en een lijst uit. Vul je de URL van deze pagina, http://www.nev.nl/hymenoptera/hymenoptera.rdf als URL in "TaxonGrab : Taxonomic Name Extraction Tool," dan worden alle geëncodeerde taxa in een lijst weergegeven. XML en RDF zijn een beetje de toekomst van hiërarchiseche kennis opslaan, verspreiden en compileren. Kijk naar de oorspronkelijke RDF-pagina (gebruik zonodig "bron weergeven") en naar het RDF-schema. Commentaar?.

XML & RDF (English version)

Goals

Many of us want to enjoy nature, understand it a bit and conserve it if possible. All information helps, including digital information. But of course there are many different forms of digital information in circulation at the moment.

Entomologists

Entomologists can collect and identify insects, place their data somewhere and make it available. And, if possible, come up with new theories based on their information. They place their information on paper, on spreadsheets, in a personal database or in a larger database, such as that of EIS in the Netherlands.

The Means

"Screen readers," used by the blind, turn most tables in HTML into word salad. This is because HTML is not only weakly coded (by design), but also often poorly coded (by its users). Take a look at a portion of our table Naamlijst Wespen en Mieren. And compare that with the relatively well-formed HTML, below, that a screen reader gets served.


<tr>
<td scope="row"><h5 class="nospace">GENUS</h5></td>
<td><h5 id="goniozus"><em>GONIOZUS</em> Förster, 1856</h5></td>
<td>spiegelplatkopwespen</td>
</tr>
<tr>
vtd scope="row"></td>
<td id="parasierola">=<em>Parasierola</em> Cameron, 1883</td>
<td></td>
</tr>

You could say that it's a question of entropy: the quality of information in a page of HTML is so poor that it would be very difficult to export it as (or change it into) high-quality information. Whereas that's exactly the strength of XML and RDF: high-quality information that you can export or translate as you please.

XML & RDF

XML is a metamarkup language for text documents. RDF is used to describe Web (or other) resources. The two overlap somewhat.

These are a few of the advantages of XML:

  • XML has a broad base. The language is not quite universal, but it's getting there.
  • XML holds data and holds data about data. This makes search functions work quite well.
  • XML is extensible: it can be customized to suit almost any need.
  • XML is based on strict rules. Much better than the "anything goes" of browsers that handle HTML.
  • XML can be automatically transferred to many different formats.
  • XML is "machine readable:" digitale machines understand it fairly easily.

In other words, XML is a language for now and for the future, however long that may last.

XML and RDF are ideal for logical, hierachical information. This is both a strong and a weak point, because not all important information is hierarchical. But XML is perfect for taxonomies (of, for example, hymenoptera), for recording collections of insects and for recording distributions of insects.

Advice

If you make use of a database to record insects, use a database that can export tables as XML. Access can do this, just as MySQL and other SQLs can. And consider exporting your data as XML. This is the best of both worlds: information in a database and as XML. If you were to create a database with merely one table, you could call the database "collection" or "hymenoptera" or whatever and you could call the table "item." You could use terms suggested by Darwin Core for the names of fields. If you export that as XML, using, for example, phpMyAdmin, then you get XML that would look something like this:


<item>
  <ScientificName>Bethylus dendrophilus</ScientificName>
  <Superfamily>CHRYSIDOIDEA</Superfamily>
  <Family>BETHYLIDAE</Family>
  <VernacularName lang="nl">PLATKOPWESPEN</VernacularName>
  <Genus>BETHYLUS</Genus>
  <AuthorOfGenus>Latreille</AuthorOfGenus>
  <YearOfGenus>1802</YearOfGenus>
  <VernacularName lang="nl">kielplatkopwespen</VernacularName>
  <SpecificEpithet>dendrophilus</SpecificEpithet>
  <AuthorOfScientificName>Richards</AuthorOfScientificName>
  <YearOfScientificName>1939</YearOfScientificName>
  <VernacularName lang="nl"></VernacularName>
  <Country>Netherlands</Country>
  <InfraspecificRank></InfraspecificRank>
  <InfraspecificEpithet></InfraspecificEpithet>
  <AuthorOfInfraspecificEpithet></AuthorOfInfraspecificEpithet>
  <YearOfInfraspecificEpithet></YearOfInfraspecificEpithet>
</item>

As an example of a taxonomic list, take a look at our XML file "Chrysidoidea" without markup and "Chrysidoidea" with markup. Also take a look at our XSL stylesheet. Thanks to XML Forum at Tek-Tips we also have an alternative XSL stylesheet.

As an example of an insect collection listed in a database, exported as XML, take a look at "Longhorn Beetles" without markup and "Longhorn Beetles" with markup. Also take a look at the related XSL stylesheet that stems from the Chrysidoidea stylesheet. NB: you can change the markup with XSL as you wish; the XML itself doesn't change and remains "machine readable."

A collection will need more fields than a taxonomy to provide information about where and how the insects were collected. Refer once again to Darwin Core. And please remember: you don't necessarily have to write any XML from scratch yourself. But you will have to design a database and provide the fields with names.

Taxonomy

There are interesting discussions about the role of XML and RDF in taxonomies and collections. See an article about "taxonomics and the semantic web" and another article about "the life science identifier," a project dsigned to give specific Web Resource names to known organisms.

Here are a few more websites devoted to Linnaean taxonomy:

RDF

And now for something completely different. Or at least more difficult. RDF. RDF is difficult to code by hand and it is also difficult to understand a long piece of code with the unaided eye. See, for example this piece of taxonomic information as RDF:


<rdf:Description rdf:about="#chryignitasparse">
  <linnaeus:specificEpithet>ignita</linnaeus:specificEpithet>
  <linnaeus:infraspecificRank>var.</linnaeus:infraspecificRank>
  <linnaeus:infrEpithet>sparsepunctata</linnaeus:infrEpithet>
  <linnaeus:Name>Chrysis ignita sparsepunctata</linnaeus:Name>
  <linnaeus:authorYear>Zimmerman, 1944</linnaeus:authorYear>
  <linnaeus:country>
    <rdf:Bag>
	<rdf:li rdf:parseType='Literal'>Netherlands</rdf:li>
    </rdf:Bag>	
  </linnaeus:country>
  <linnaeus:synonym>
    <rdf:Bag>
	<rdf:li rdf:resource="#pseucarp" />
    </rdf:Bag>
  </linnaeus:synonym>
  <linnaeus:questionableSynonym>
    <rdf:Bag>
	<rdf:li rdf:resource="#bethpilo" />
    </rdf:Bag>	
  </linnaeus:questionableSynonym>
</rdf:Description>

If you put this through a parser, such as RDF Validator, you get a nice table and graph of the page. Enter the URL of this page, http://www.nev.nl/hymenoptera/hymenoptera.rdf as an URL in TaxonGrab : Taxonomic Name Extraction Tool, then all of the encoded taxa get listed. I tend to believe that XML and RDF are the future of saving, spreading and compiling hierarchical knowledge. Take a look at the original RDF (use "view page source" if necessary) and at the RDF-schema. Comments?.