Code Monkey home page Code Monkey logo

Comments (6)

mbjones avatar mbjones commented on June 13, 2024

We have XSL stylesheets that translate EML to FGDC BDP and BDP to EML. Form SVN here:

https://code.ecoinformatics.org/code/eml/trunk/lib/eml2tonbii

There is also an EML to ISO19115 stylesheet I think as well, maybe started by GBIF. Can try to track it down if needed.

from eml.

cboettig avatar cboettig commented on June 13, 2024
  • Conversion from Biological Data Profile to EML: Added stylesheet: bdp2eml.xsl, yet not tested.
  • Conversion from EML to ISO19139: Stylesheet added. Conversion working with EML 2.1.0. reml extended to optionally write in this legacy format, but ideally the stylesheet should be updated to acknowledge 2.1.1.
library(Sxslt)
a = xsltApplyStyleSheet("inst/examples/hf205.xml", "inst/xsl/eml2iso19139.xsl")
  • Conversion from EML to BDP: added eml2tonbii.xsl, not working with Sxslt library yet. (xalan issue, see #53).
  • Conversion from ESRI to EML: not tested.

from eml.

mbjones avatar mbjones commented on June 13, 2024

@cboettig Note that we often have the issue of needing to convert from older versions of EML to newer ones. In Morpho, we've decided to always serialize the newest version, but to be able to read all of them. If a user wants to edit an EML document, we force them to forward-convert to the latest EML version, which reduces our maintenance load and makes it easier for tools to work together. To do that, we have XSLT stylesheets to convert from one version of EML to another:

https://code.ecoinformatics.org/code/eml/trunk/style/eml201to210.xsl
https://code.ecoinformatics.org/code/eml/trunk/style/eml201to211.xsl
https://code.ecoinformatics.org/code/eml/trunk/style/eml210to211.xsl

You may find these useful.

from eml.

cboettig avatar cboettig commented on June 13, 2024

Awesome. Given that reml / our S4 structure is built on 2.1.1, would you recommend that eml_read attempt to detect the version and apply the conversion into 2.1.1 if necessary/possible before parsing? Or is that likely to introduce more headache than gain? In my limited experiments I haven't had trouble reading 2.1.0 into reml, which currently doesn't have the full 2.1.1 schema implemented yet anyhow...

from eml.

mbjones avatar mbjones commented on June 13, 2024

You'll probably find that 2.0.x versions are essentially compatible, and 2.1.x versions are essentially compatible (only requiring a namespace change to the newer namespace), but that moving from 2.0.x to 2.1.x will require document transformations and may result in validation errors in some cases where the schema became more strict. An overview of the differences is available here:
http://knb.ecoinformatics.org/software/eml/eml-2.1.1/eml-210info.html

from eml.

cboettig avatar cboettig commented on June 13, 2024

Using existing XSLT stylesheets for conversion between standards is probably the way to go for this, but won't be wrapped into the EML package at this point. Such conversions can be done with R and omegahat SXSLT, but since SXSLT isn't on CRAN and this is a relatively straight-forward thing to do with other tools as well, will close this as out-of-scope for now. Certainly re-open if or when this should be revisited.

from eml.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.