source: MDService2/trunk/MDService2/src/xsl/profile2VC.xsl @ 1431

Last change on this file since 1431 was 1431, checked in by vronk, 13 years ago

profile2VC.xsl generic object-select

File size: 3.5 KB
Line 
1<?xml version="1.0"?>
2<xsl:stylesheet version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
3
4<!--
5<purpose>html-view for static xml-files</purpose>
6<params>
7<param name=""></param>
8</params>
9<history>
10        <change on="2010-11-12" type="created" by="vr">based on xml2htmltable</change> 
11       
12</history>
13-->
14
15<xsl:param name="queryid" />
16
17
18       
19<!--<xsl:output method="html" encoding="UTF-8"/>-->
20
21<xsl:template match="/">
22
23<xsl:apply-templates select="//item[id=$queryid]" />
24
25</xsl:template>
26
27<xsl:template match="Queries/item" >
28<VirtualCollection xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="VirtualCollection.xsd">
29    <Type>intensional</Type>
30    <Name><xsl:value-of select="name" /></Name>
31    <Description>Collection published via CLARIN - MDService </Description>
32    <CreationDate><xsl:value-of select="current-date()" /></CreationDate>
33    <Creators>
34        <Creator>
35            <Person>MDService</Person>
36            <Email>cmdi@clarin.eu</Email>
37            <Organisation>CMDI </Organisation>
38        </Creator>
39    </Creators>
40    <Purpose>sample</Purpose>
41    <Reproducibility>untended</Reproducibility>
42    <ReproducibilityNotice>Unmaintaned test collection.</ReproducibilityNotice>
43    <!-- <Keywords>
44        <Keyword>test</Keyword>
45        <Keyword>unmaintained</Keyword>
46    </Keywords> -->
47    <GeneratedBy> 
48        <Description>GeneratedBy CLARIN MDService</Description>
49        <URI>urn:x-vcr:test-uri</URI>
50        <Query profile="sru-cql">
51        <xsl:text disable-output-escaping="yes">&lt;![CDATA[</xsl:text> 
52                <xsl:choose>
53                        <xsl:when test="squerystring = ''">
54                                        <xsl:value-of select ="querystring"/>
55                                </xsl:when>     
56                                <xsl:when test="querystring = ''">
57                                        <xsl:value-of select ="squerystring"/>
58                                </xsl:when>                     
59                                <xsl:otherwise><xsl:value-of select ="squerystring"/> and (<xsl:value-of select ="querystring"/>)</xsl:otherwise>
60                </xsl:choose>
61        <xsl:text disable-output-escaping="yes">]]&gt;</xsl:text>
62        </Query>
63        <!--
64        <Query profile="cmdservice"><xsl:copy-of select="querystring" />
65                                <xsl:copy-of select="squerystring" /><xsl:copy-of select="collections" />
66                </Query>
67         -->
68    </GeneratedBy>
69</VirtualCollection>
70       
71</xsl:template>
72
73<xsl:template match="Bookmarksets/item" >
74<VirtualCollection xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="VirtualCollection.xsd">
75    <Type>extensional</Type>
76    <Name><xsl:value-of select="name" /></Name>
77    <Description>Collection published via CLARIN - MDService </Description>
78    <CreationDate><xsl:value-of select="current-date()" /></CreationDate>
79    <Creators>
80        <Creator>
81            <Person>MDService</Person>
82            <Email>cmdi@clarin.eu</Email>
83            <Organisation>CMDI </Organisation>
84        </Creator>
85    </Creators>
86    <Purpose>sample</Purpose>
87    <Reproducibility>untended</Reproducibility>
88    <ReproducibilityNotice>Unmaintaned test collection.</ReproducibilityNotice>
89    <!-- <Keywords>
90        <Keyword>test</Keyword>
91        <Keyword>unmaintained</Keyword>
92    </Keywords> -->
93    <Resources>
94        <xsl:for-each select="Bookmarks/item" >
95                <Resource>       
96                    <ResourceType>Metadata</ResourceType>
97                    <ResourceRef><xsl:value-of select="querystring" /></ResourceRef>
98                </Resource>
99            </xsl:for-each>
100    </Resources>
101</VirtualCollection>
102       
103</xsl:template>
104
105
106</xsl:stylesheet>
Note: See TracBrowser for help on using the repository browser.