1 |
29236
|
eri.katsar
|
<?xml version="1.0" encoding="UTF-8"?>
|
2 |
29459
|
eri.katsar
|
<xsl:stylesheet version="2.0" xmlns="http://www.w3.org/1999/XSL/Transform" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:str="http://exslt.org/strings" xmlns:set="http://exslt.org/sets">
|
3 |
|
|
<!-- eternal gratitude to stefania -->
|
4 |
|
|
|
5 |
|
|
<!--extension-element-prefixes="str set" -->
|
6 |
|
|
<output method="text" omit-xml-declaration="yes" />
|
7 |
29236
|
eri.katsar
|
<template match="/*">
|
8 |
29459
|
eri.katsar
|
<!--<text>COPY "shadow".context ("id", "name") FROM stdin; </text> -->
|
9 |
|
|
<!-- <text>COPY </text> -->
|
10 |
29236
|
eri.katsar
|
<for-each select="//context">
|
11 |
29459
|
eri.katsar
|
<variable name="id" select="./@id" />
|
12 |
29236
|
eri.katsar
|
<variable name="name" select="./@label" />
|
13 |
29459
|
eri.katsar
|
<value-of select="$id" />
|
14 |
|
|
<text>!</text>
|
15 |
|
|
<value-of select="$name" />
|
16 |
|
|
<text>! </text>
|
17 |
29236
|
eri.katsar
|
</for-each>
|
18 |
29459
|
eri.katsar
|
|
19 |
|
|
<!--<text>COPY "shadow".category ("id", "name", "context") FROM stdin; </text> -->
|
20 |
29236
|
eri.katsar
|
<text>COPY </text>
|
21 |
|
|
<for-each select="//context">
|
22 |
|
|
<variable name="contextid" select="./@id" />
|
23 |
|
|
<for-each select="./category">
|
24 |
|
|
<variable name="id" select="./@id" />
|
25 |
|
|
<variable name="name" select="./@label" />
|
26 |
29459
|
eri.katsar
|
<value-of select="$id" />
|
27 |
|
|
<text>!</text>
|
28 |
|
|
<value-of select="$name" />
|
29 |
|
|
<text>!</text>
|
30 |
|
|
<value-of select="$contextid" />
|
31 |
|
|
<text>! </text>
|
32 |
29236
|
eri.katsar
|
</for-each>
|
33 |
|
|
</for-each>
|
34 |
29459
|
eri.katsar
|
|
35 |
|
|
<!--<text>COPY "shadow".concept ("id", "name", "category") FROM stdin; </text> -->
|
36 |
|
|
<text>COPY </text>
|
37 |
29236
|
eri.katsar
|
<for-each select="//context">
|
38 |
|
|
<for-each select="./category">
|
39 |
|
|
<variable name="categoryid" select="./@id" />
|
40 |
|
|
<for-each select=".//concept">
|
41 |
|
|
<variable name="id" select="./@id" />
|
42 |
|
|
<variable name="name" select="./@label" />
|
43 |
29459
|
eri.katsar
|
<value-of select="$id" />
|
44 |
|
|
<text>!</text>
|
45 |
|
|
<value-of select="$name" />
|
46 |
|
|
<text>!</text>
|
47 |
|
|
<value-of select="$categoryid" />
|
48 |
|
|
<text>! </text>
|
49 |
29236
|
eri.katsar
|
</for-each>
|
50 |
|
|
</for-each>
|
51 |
|
|
</for-each>
|
52 |
29459
|
eri.katsar
|
|
53 |
29236
|
eri.katsar
|
</template>
|
54 |
|
|
</xsl:stylesheet>
|