generator

Implementation level
Type Status
CML extraction template image1
HTML5 representation image2
Template attributes
Attribute Value
source VASP outcar
id generator
name Program version
pattern \s*vasp\.\d.*
endPattern \s*executed\son.*
endOffset 1
xml:base generator.xml
Input
vasp.5.3.2 13Sep12 (build Apr  2 2013 11:33:10) complex

executed on             LinuxIFC date 2014.03.06  12:09:30
Output text
<comment class="example.output" id="generator">
        <module cmlx:templateRef="generator">
            <scalar dataType="xsd:string" dictRef="cc:program">vasp</scalar>
            <scalar dataType="xsd:string" dictRef="cc:subversion">13Sep12 (build Apr  2 2013 11:33:10) complex</scalar>
            <scalar dataType="xsd:string" dictRef="v:platform">LinuxIFC</scalar>
            <scalar dataType="xsd:date" dictRef="cc:rundate">2014-03-06T12:09:30.000+01:00</scalar>
            <scalar dataType="xsd:string" dictRef="cc:programVersion">5.3.2</scalar>
        </module>
    </comment>
Template definition
<record>\s*{A,cc:program}\.{I,x:programMajor}\.{I,x:programMinor}.{I,x:programMicro}[\.\s]{X,cc:subversion}</record>
<record repeat="1" />
<record>\s*executed\son{A,v:platform}date{X,x:date}</record>
<transform process="pullup" xpath=".//cml:scalar" repeat="2" />
<transform process="createDate" xpath=".//cml:scalar[@dictRef='x:date']" format="yyyy'.'MM'.'dd  HH:mm:ss" />
<transform process="addChild" xpath="." elementName="cml:scalar" dictRef="cc:programVersion" value="$string(concat( //cml:scalar[@dictRef='x:programMajor'], '.' , //cml:scalar[@dictRef='x:programMinor'], '.' ,//cml:scalar[@dictRef='x:programMicro']))" />
<transform process="addAttribute" xpath=".//cml:scalar[@dictRef='cc:programVersion']" name="dataType" value="xsd:string" />
<transform process="addAttribute" xpath=".//cml:scalar[@dictRef='x:date']" name="dictRef" value="cc:rundate" />
<transform process="delete" xpath=".//cml:list" />
<transform process="delete" xpath=".//cml:scalar[contains(@dictRef, 'x:program')]" />