-
Notifications
You must be signed in to change notification settings - Fork 7
/
context.xsl
60 lines (54 loc) · 2.12 KB
/
context.xsl
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE xsl:stylesheet [
<!ENTITY a "https://w3id.org/atomgraph/core#">
<!ENTITY ap "https://w3id.org/atomgraph/processor#">
<!ENTITY ldt "https://www.w3.org/ns/ldt#">
<!ENTITY sd "http://www.w3.org/ns/sparql-service-description#">
]>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:a="&a;"
xmlns:ap="≈"
xmlns:ldt="&ldt;"
xmlns:sd="&sd;"
>
<xsl:output method="xml" indent="yes"/>
<xsl:param name="sd:endpoint"/>
<xsl:param name="a:graphStore"/>
<xsl:param name="ldt:ontology"/>
<xsl:param name="a:authUser"/>
<xsl:param name="a:authPwd"/>
<xsl:param name="a:preemptiveAuth"/>
<xsl:param name="ap:sitemapRules"/>
<xsl:template match="@*|node()">
<xsl:copy>
<xsl:apply-templates select="@*|node()"/>
</xsl:copy>
</xsl:template>
<xsl:template match="Context">
<xsl:copy>
<xsl:apply-templates select="@*|node()"/>
<xsl:if test="$sd:endpoint">
<Parameter name="&sd;endpoint" value="{$sd:endpoint}" override="false"/>
</xsl:if>
<xsl:if test="$a:graphStore">
<Parameter name="&a;graphStore" value="{$a:graphStore}" override="false"/>
</xsl:if>
<xsl:if test="$ldt:ontology">
<Parameter name="&ldt;ontology" value="{$ldt:ontology}" override="false"/>
</xsl:if>
<xsl:if test="$a:authUser">
<Parameter name="&a;authUser" value="{$a:authUser}" override="false"/>
</xsl:if>
<xsl:if test="$a:authPwd">
<Parameter name="&a;authPwd" value="{$a:authPwd}" override="false"/>
</xsl:if>
<xsl:if test="$a:preemptiveAuth">
<Parameter name="&a;preemptiveAuth" value="{$a:preemptiveAuth}" override="false"/>
</xsl:if>
<xsl:if test="$ap:sitemapRules">
<Parameter name="≈sitemapRules" value="{$ap:sitemapRules}" override="false"/>
</xsl:if>
</xsl:copy>
</xsl:template>
</xsl:stylesheet>