/[volute]/trunk/projects/theory/simdal/protocolToVOR.xslt
ViewVC logotype

Contents of /trunk/projects/theory/simdal/protocolToVOR.xslt

Parent Directory Parent Directory | Revision Log Revision Log


Revision 3239 - (show annotations)
Wed Feb 3 16:18:54 2016 UTC (5 years, 4 months ago) by msdemlei
File size: 2970 byte(s)
Adding a prototype XSLT to transform protocol XML to VOResource.


1 <?xml version="1.0" encoding="UTF-8"?>
2
3 <!-- A prototype stylesheet to turn datalink.xml documents into
4 VOResource records -->
5
6 <xsl:stylesheet
7 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
8 xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
9 xmlns:simdm="http://www.ivoa.net/xml/SimDM/v1.0"
10 xmlns:simdal="http://www.ivoa.net/xml/simdal/v1.0"
11 xmlns:vr="http://www.ivoa.net/xml/VOResource/v1.0"
12 version="1.0">
13
14 <xsl:template match="parameter">
15 <column>
16 <name><xsl:value-of select="name"/></name>
17 <description><xsl:value-of select="description"/></description>
18 <ucd><xsl:value-of select="label"/></ucd>
19 <dataType>FIXME<xsl:value-of select="datatype"/></dataType>
20 </column>
21 </xsl:template>
22
23 <xsl:template match="property">
24 <column>
25 <name><xsl:value-of select="name"/></name>
26 <description><xsl:value-of select="description"/></description>
27 <ucd><xsl:value-of select="label"/></ucd>
28 <dataType>FIXME<xsl:value-of select="datatype"/></dataType>
29 </column>
30 </xsl:template>
31
32 <xsl:template match="outputType">
33 <name><xsl:value-of select="name"/></name>
34 <description><xsl:value-of select="description"/></description>
35 <xsl:apply-templates/>
36 </xsl:template>
37
38 <xsl:template match="simdm:aSimulator">
39 <vr:Resource status="active" xsi:type="simdal:Protocol(FIXME)">
40 <xsl:attribute name="created">
41 <xsl:value-of select="created"/>
42 </xsl:attribute>
43 <xsl:attribute name="updated">
44 <xsl:value-of select="updated"/>
45 </xsl:attribute>
46 <title>FIXME: <xsl:value-of select="name"/></title>
47 <identifier><xsl:value-of select="identity/@publisherDID"/></identifier>
48 <curation>
49 <publisher>FIXME</publisher>
50 <contact>FIXME</contact>
51 </curation>
52
53 <content>
54 <subject>FIXME</subject>
55 <description><xsl:value-of select="description"/></description>
56 <source>FIXME</source>
57 <referenceURL><xsl:value-of select="referenceURL"/></referenceURL>
58 <relationship>
59 <relationshipType>computed-by</relationshipType>
60 <relatedResource ivo-id="ivo://example/FIXME">FIXME</relatedResource>
61 </relationship>
62 <relationship>
63 <relationshipType>derived-from</relationshipType>
64 <relatedResource ivo-id="ivo://example/CODE-FIME">CODE-FIXME</relatedResource>
65 </relationship>
66
67 </content>
68
69 <code>
70 <xsl:attribute name="ivo-id">
71 <xsl:value-of select="code"/>
72 </xsl:attribute>
73 <name><xsl:value-of select="name"/></name>
74 <version><xsl:value-of select="version"/></version>
75 </code>
76
77 <tableset>
78 <schema>
79 <name>input</name>
80 <description>The input parameters used by the protocol</description>
81 <table>
82 <xsl:apply-templates select="parameter"/>
83 </table>
84 </schema>
85
86 <schema>
87 <name>output</name>
88 <description>The output products of the protocol</description>
89 <xsl:apply-templates select="outputType"/>
90 </schema>
91 </tableset>
92 </vr:Resource>
93 </xsl:template>
94 </xsl:stylesheet>
95

msdemlei@ari.uni-heidelberg.de
ViewVC Help
Powered by ViewVC 1.1.26