medic-enketo-xslt
Version:
XSL stylesheets for the Enketo XForm transformation to be run client-side in a web browser
54 lines (53 loc) • 2.6 kB
text/xml
<h:html xmlns="http://www.w3.org/2002/xforms" xmlns:ev="http://www.w3.org/2001/xml-events" xmlns:h="http://www.w3.org/1999/xhtml" xmlns:jr="http://openrosa.org/javarosa" xmlns:orx="http://openrosa.org/xforms/" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<h:head>
<h:title>Pictorial Report</h:title>
<model>
<instance>
<data id="TR" version="2015-06-05">
<pregnancy_id tag="id" />
<meta>
<start tag="m_st" />
<end tag="m_et" />
<phonenumber tag="m_p" />
<deviceID tag="m_d" />
<subscriberID tag="m_s" />
<instanceID tag="m_i" />
<instanceName tag="m_n" />
</meta>
</data>
</instance>
<bind nodeset="/data/something" required="true()" type="string"/>
<bind nodeset="/data/another" required="true()" type="string"/>
<bind nodeset="/widgets/display_widgets/text_media" type="string"/>
<bind jr:preload="timestamp" jr:preloadParams="start" nodeset="/data/meta/start" type="dateTime"/>
<bind jr:preload="timestamp" jr:preloadParams="end" nodeset="/data/meta/end" type="dateTime"/>
<bind jr:preload="property" jr:preloadParams="uri:subscriberid" nodeset="/data/meta/subscriberID" type="string"/>
<bind jr:preload="property" jr:preloadParams="uri:deviceid" nodeset="/data/meta/deviceID" type="string"/>
<bind jr:preload="property" jr:preloadParams="phonenumber" nodeset="/data/meta/phonenumber" type="string"/>
<bind calculate="concat('uuid:', uuid())" nodeset="/data/meta/instanceID" readonly="true()" type="string"/>
<bind calculate="concat('Visit: ', /data/pregnancy_id )" nodeset="/data/meta/instanceName" type="string"/>
<itext>
<translation default="true()" lang="default">
<text id="/images/only-small">
<value form="image">jr://lonely.png</value>
</text>
<text id="/images/also-big">
<value form="image">jr://small.png</value>
<value form="big-image">jr://big.png</value>
</text>
</translation>
</itext>
</model>
</h:head>
<h:body>
<input appearance="numbers" ref="/data/something">
<label ref="jr:itext('/images/only-small')"/>
<hint>This is the 5 digit number associated to this woman's pregnancy</hint>
</input>
<input appearance="numbers" ref="/data/another">
<label ref="jr:itext('/images/also-big')"/>
<hint>This is the 5 digit number associated to this woman's pregnancy</hint>
</input>
</h:body>
</h:html>