[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]
Subject: Asynch: Conversions via XSL #2
Some more explanations / random notes: The example.zip contains all the stuff necessary to test xsl based conversions between units based on UnitsML. The demo should actually perform conversions instead of just outputting the formula to be applied, and thus a numeric value that is related to a unit is required. Given that in UnitsML itself there is no specific place for a numeric value, I have "invented" the "NVUnitsML" (NV=Numerical Value) which includes a subset of UnitsML (the UnitSet) and a values container which can contain value containers which then can contain (lists of) numerical values. An attribute (unitIDREF) establishes the link to the unit in question. The stylesheet (convertToTargetUnitSystem.xsl) builds on the NVUnitsML (i.e. it looks for the numerical values where nvunitsml would put them although it should be trivial to adopt the stylesheet for any other language including unitsml). It extracts the formulae necessary to convert from one unit to another, and applies this to the numerical values. The result document then contains an updated unit reference as well as updated numerical values. In UnitsML (for the linear float 64 conversion) only formula "from" another unit are stored, not "to" another unit. These are trivial to create though, which also is what the stylesheet is doing. There could be done even more when multiple conversions (e.g. seconds -> minutes -> hours -> days) are condensed (i.e. seconds -> minutes; seconds -> hours; seconds -> days), which is on cTTUS.xsl's TODO. The USCDL comes into play only to describe details of the conversion, i.e. the "how exactly" and "what to". I have a little presentation somewhere of how to use it, but it's not that important. I do not expect an end-user to create a USCD file; if, at all, this is going to be used 1:1, then I expect a web developer or someone like that to create a few files for "pre-defined, supported conversions" on their site/files/data. The schema should be adequately documented, and it's short. When looking at the example files, you should have a look at the values sections of each (time-nv.xml, Example1.xml, Example2.xml) and look at the units the values are in. Hmm, I think that's all I wanted to add for now.. -Martin
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]