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

1<comment class="example.output" id="generator">
2        <module cmlx:templateRef="generator">
3            <scalar dataType="xsd:string" dictRef="cc:program">vasp</scalar>
4            <scalar dataType="xsd:string" dictRef="cc:subversion">13Sep12 (build Apr  2 2013 11:33:10) complex</scalar>
5            <scalar dataType="xsd:string" dictRef="v:platform">LinuxIFC</scalar>
6            <scalar dataType="xsd:date" dictRef="cc:rundate">2014-03-06T12:09:30.000+01:00</scalar>
7            <scalar dataType="xsd:string" dictRef="cc:programVersion">5.3.2</scalar>
8        </module>
9    </comment>

Template definition

 1<record>\s*{A,cc:program}\.{I,x:programMajor}\.{I,x:programMinor}.{I,x:programMicro}[\.\s]{X,cc:subversion}</record>
 2<record repeat="1" />
 3<record>\s*executed\son{A,v:platform}date{X,x:date}</record>
 4<transform process="pullup" xpath=".//cml:scalar" repeat="2" />
 5<transform process="createDate" xpath=".//cml:scalar[@dictRef='x:date']" format="yyyy'.'MM'.'dd  HH:mm:ss" />
 6<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']))" />
 7<transform process="addAttribute" xpath=".//cml:scalar[@dictRef='cc:programVersion']" name="dataType" value="xsd:string" />
 8<transform process="addAttribute" xpath=".//cml:scalar[@dictRef='x:date']" name="dictRef" value="cc:rundate" />
 9<transform process="delete" xpath=".//cml:list" />
10<transform process="delete" xpath=".//cml:scalar[contains(@dictRef, 'x:program')]" />