Giter VIP home page Giter VIP logo

cellml1to2's Introduction

cellml1to2

Attempt at using XSLT to translate CellML 1.0 and 1.1 documents into the proposed CellML 2.0 format.

Note that it needs an XSLT 2 processor to handle namespace nodes nicely. Tested using the Saxon engine within oXygen XML and Saxon on the command line, e.g., saxon -s:test-models/cellml1.0.xml -xsl:cellml1to2.xsl.

This is primarily an effort to enable the production of a suite of test CellML 2.0 models for use in testing the functionality of libCellML.

cellml1to2's People

Contributors

agarny avatar hsorby avatar jonc125 avatar michaelclerx avatar nickerso avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

cellml1to2's Issues

Model with units defined in a component don't get properly converted

This model describes the following model:

def model van_der_pol_model_1928 as
    def comp main as
        def unit per_second as
            unit second {expo: -1};
        enddef;

        var time: second;
        var x: dimensionless {init: -2};
        var y: dimensionless {init: 0};
        var epsilon: dimensionless {init: 1};

        ode(x, time) = y*1{per_second};
        ode(y, time) = (epsilon*(1{dimensionless}-sqr(x))*y-x)*1{per_second};
    enddef;
enddef;

As we can see, per_second is defined within the main component. If you convert this model to CellML 2.0 using cellml1to2.xsl, you end up with this model, which also defines per_second in the main component. However, CellML 2.0 only allows units to be defined in the model element (see section 8 of https://www.cellml.org/specifications/cellml_2.0). So, here, we end up with an invalid CellML 2.0 file.

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.