Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 9 additions & 7 deletions src/main/resources/com/linkeddatahub/packages/skos/layout.xsl
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE xsl:stylesheet [
<!ENTITY ldh "https://w3id.org/atomgraph/linkeddatahub#">
<!ENTITY lapp "https://w3id.org/atomgraph/linkeddatahub/apps#">
<!ENTITY ac "https://w3id.org/atomgraph/client#">
<!ENTITY rdf "http://www.w3.org/1999/02/22-rdf-syntax-ns#">
<!ENTITY rdfs "http://www.w3.org/2000/01/rdf-schema#">
Expand All @@ -15,6 +16,7 @@ xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:xhtml="http://www.w3.org/1999/xhtml"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:ldh="&ldh;"
xmlns:lapp="&lapp;"
xmlns:ac="&ac;"
xmlns:rdf="&rdf;"
xmlns:rdfs="&rdfs;"
Expand All @@ -31,29 +33,29 @@ exclude-result-prefixes="#all">

<xsl:param name="foaf:Agent" as="document-node()?"/>

<xsl:template match="rdf:RDF | srx:sparql" mode="xhtml:Style">
<xsl:template match="rdf:RDF[lapp:origin()] | srx:sparql[lapp:origin()]" mode="xhtml:Style">
<xsl:param name="load-wymeditor" select="exists($foaf:Agent//@rdf:about)" as="xs:boolean"/>
<xsl:param name="load-yasqe" select="true()" as="xs:boolean"/>

<xsl:apply-imports/>

<!-- inject custom Bootstrap theme that overrides the default one -->
<link href="{resolve-uri('static/com/linkeddatahub/demo/skos/css/bootstrap.css', $ac:contextUri)}" rel="stylesheet" type="text/css"/>
<link href="{resolve-uri('static/com/linkeddatahub/demo/skos/css/bootstrap.css', lapp:origin())}" rel="stylesheet" type="text/css"/>
<!-- re-apply LinkedDataHub's Bootstrap customizations -->
<link href="{resolve-uri('static/com/atomgraph/linkeddatahub/css/bootstrap.css', $ac:contextUri)}" rel="stylesheet" type="text/css"/>
<link href="{resolve-uri('static/com/atomgraph/linkeddatahub/css/bootstrap.css', lapp:origin())}" rel="stylesheet" type="text/css"/>

<xsl:if test="$load-wymeditor">
<link href="{resolve-uri('static/com/atomgraph/linkeddatahub/js/wymeditor/skins/default/skin.css', $ac:contextUri)}" rel="stylesheet" type="text/css"/>
<link href="{resolve-uri('static/com/atomgraph/linkeddatahub/js/wymeditor/skins/default/skin.css', lapp:origin())}" rel="stylesheet" type="text/css"/>
</xsl:if>
<xsl:if test="$load-yasqe">
<link href="{resolve-uri('static/css/yasqe.css', $ac:contextUri)}" rel="stylesheet" type="text/css"/>
<link href="{resolve-uri('static/css/yasqe.css', lapp:origin())}" rel="stylesheet" type="text/css"/>
</xsl:if>
</xsl:template>

<xsl:template match="rdf:RDF" mode="xhtml:Style">
<xsl:template match="rdf:RDF[lapp:origin()]" mode="xhtml:Style">
<xsl:next-match/>

<link href="{resolve-uri('static/com/linkeddatahub/demo/skos/css/bootstrap.css', $ac:contextUri)}" rel="stylesheet" type="text/css"/>
<link href="{resolve-uri('static/com/linkeddatahub/demo/skos/css/bootstrap.css', lapp:origin())}" rel="stylesheet" type="text/css"/>
</xsl:template>

<xsl:template match="skos:narrower | skos:broader | skos:related | skos:member" mode="bs2:PropertyList"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
<!DOCTYPE xsl:stylesheet [
<!ENTITY lacl "https://w3id.org/atomgraph/linkeddatahub/admin/acl#">
<!ENTITY ldh "https://w3id.org/atomgraph/linkeddatahub#">
<!ENTITY lapp "https://w3id.org/atomgraph/linkeddatahub/apps#">
<!ENTITY ac "https://w3id.org/atomgraph/client#">
<!ENTITY rdf "http://www.w3.org/1999/02/22-rdf-syntax-ns#">
<!ENTITY acl "http://www.w3.org/ns/auth/acl#">
Expand All @@ -15,6 +16,7 @@ xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:xhtml="http://www.w3.org/1999/xhtml"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:ldh="&ldh;"
xmlns:lapp="&lapp;"
xmlns:ac="&ac;"
xmlns:rdf="&rdf;"
xmlns:acl="&acl;"
Expand Down Expand Up @@ -71,8 +73,8 @@ WHERE
<xsl:if test="$notifications/rdf:RDF/*[@rdf:about]">
<li>
<div class="btn-group">
<button title="{ac:label(key('resources', 'notifications', document(resolve-uri('static/com/atomgraph/linkeddatahub/xsl/bootstrap/2.3.2/translations.rdf', $ac:contextUri))))}">
<xsl:apply-templates select="key('resources', 'notifications', document(resolve-uri('static/com/atomgraph/linkeddatahub/xsl/bootstrap/2.3.2/translations.rdf', $ac:contextUri)))" mode="ldh:logo">
<button title="{ac:label(key('resources', 'notifications', document(resolve-uri('static/com/atomgraph/linkeddatahub/xsl/bootstrap/2.3.2/translations.rdf', lapp:origin()))))}">
<xsl:apply-templates select="key('resources', 'notifications', document(resolve-uri('static/com/atomgraph/linkeddatahub/xsl/bootstrap/2.3.2/translations.rdf', lapp:origin())))" mode="ldh:logo">
<xsl:with-param name="class" select="'btn btn-primary dropdown-toggle'"/>
</xsl:apply-templates>
</button>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
<!ENTITY lacl "https://w3id.org/atomgraph/linkeddatahub/admin/acl#">
<!ENTITY adm "https://w3id.org/atomgraph/linkeddatahub/admin#">
<!ENTITY ldh "https://w3id.org/atomgraph/linkeddatahub#">
<!ENTITY lapp "https://w3id.org/atomgraph/linkeddatahub/apps#">
<!ENTITY ac "https://w3id.org/atomgraph/client#">
<!ENTITY a "https://w3id.org/atomgraph/core#">
<!ENTITY rdf "http://www.w3.org/1999/02/22-rdf-syntax-ns#">
Expand Down Expand Up @@ -30,6 +31,7 @@ xmlns:ac="&ac;"
xmlns:a="&a;"
xmlns:lacl="&lacl;"
xmlns:ldh="&ldh;"
xmlns:lapp="&lapp;"
xmlns:rdf="&rdf;"
xmlns:rdfs="&rdfs;"
xmlns:srx="&srx;"
Expand Down Expand Up @@ -139,7 +141,7 @@ exclude-result-prefixes="#all">
</xsl:if>

<xsl:variable name="selected" select="." as="xs:anyURI"/>
<xsl:for-each select="document(resolve-uri('static/com/atomgraph/linkeddatahub/xsl/bootstrap/2.3.2/admin/countries.rdf', $ac:contextUri))/rdf:RDF/*[@rdf:about]">
<xsl:for-each select="document(resolve-uri('static/com/atomgraph/linkeddatahub/xsl/bootstrap/2.3.2/admin/countries.rdf', lapp:origin()))/rdf:RDF/*[@rdf:about]">
<xsl:sort select="ac:label(.)" lang="{$ldt:lang}"/>
<xsl:apply-templates select="." mode="xhtml:Option">
<xsl:with-param name="selected" select="@rdf:about = $selected"/>
Expand Down Expand Up @@ -294,7 +296,7 @@ exclude-result-prefixes="#all">

<xsl:template match="*[@rdf:about = '&foaf;mbox'][ac:absolute-path(ldh:request-uri()) = resolve-uri(encode-for-uri('sign up'), ldt:base())]" mode="ac:label" priority="1">
<xsl:value-of>
<xsl:apply-templates select="key('resources', 'email', document(resolve-uri('static/com/atomgraph/linkeddatahub/xsl/bootstrap/2.3.2/translations.rdf', $ac:contextUri)))" mode="ac:label"/>
<xsl:apply-templates select="key('resources', 'email', document(resolve-uri('static/com/atomgraph/linkeddatahub/xsl/bootstrap/2.3.2/translations.rdf', lapp:origin())))" mode="ac:label"/>
</xsl:value-of>
</xsl:template>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
<!DOCTYPE xsl:stylesheet [
<!ENTITY def "https://w3id.org/atomgraph/linkeddatahub/default#">
<!ENTITY ldh "https://w3id.org/atomgraph/linkeddatahub#">
<!ENTITY lapp "https://w3id.org/atomgraph/linkeddatahub/apps#">
<!ENTITY ac "https://w3id.org/atomgraph/client#">
<!ENTITY rdf "http://www.w3.org/1999/02/22-rdf-syntax-ns#">
<!ENTITY rdfs "http://www.w3.org/2000/01/rdf-schema#">
Expand Down Expand Up @@ -30,6 +31,7 @@ xmlns:json="http://www.w3.org/2005/xpath-functions"
xmlns:array="http://www.w3.org/2005/xpath-functions/array"
xmlns:ac="&ac;"
xmlns:ldh="&ldh;"
xmlns:lapp="&lapp;"
xmlns:rdf="&rdf;"
xmlns:rdfs="&rdfs;"
xmlns:geo="&geo;"
Expand Down Expand Up @@ -360,7 +362,7 @@ exclude-result-prefixes="#all"
<!-- delete existing block -->
<xsl:when test="$block/@about">
<!-- show a confirmation prompt -->
<xsl:if test="ixsl:call(ixsl:window(), 'confirm', [ ac:label(key('resources', 'are-you-sure', document(resolve-uri('static/com/atomgraph/linkeddatahub/xsl/bootstrap/2.3.2/translations.rdf', $ac:contextUri)))) ])">
<xsl:if test="ixsl:call(ixsl:window(), 'confirm', [ ac:label(key('resources', 'are-you-sure', document(resolve-uri('static/com/atomgraph/linkeddatahub/xsl/bootstrap/2.3.2/translations.rdf', lapp:origin())))) ])">
<ixsl:set-style name="cursor" select="'progress'" object="ixsl:page()//body"/>

<xsl:variable name="block-uri" select="$block/@about" as="xs:anyURI"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
<!DOCTYPE xsl:stylesheet [
<!ENTITY def "https://w3id.org/atomgraph/linkeddatahub/default#">
<!ENTITY ldh "https://w3id.org/atomgraph/linkeddatahub#">
<!ENTITY lapp "https://w3id.org/atomgraph/linkeddatahub/apps#">
<!ENTITY ac "https://w3id.org/atomgraph/client#">
<!ENTITY rdf "http://www.w3.org/1999/02/22-rdf-syntax-ns#">
<!ENTITY xsd "http://www.w3.org/2001/XMLSchema#">
Expand All @@ -26,6 +27,7 @@ xmlns:json="http://www.w3.org/2005/xpath-functions"
xmlns:array="http://www.w3.org/2005/xpath-functions/array"
xmlns:ac="&ac;"
xmlns:ldh="&ldh;"
xmlns:lapp="&lapp;"
xmlns:rdf="&rdf;"
xmlns:srx="&srx;"
xmlns:acl="&acl;"
Expand Down Expand Up @@ -272,11 +274,11 @@ exclude-result-prefixes="#all"
<xsl:param name="form-actions" as="element()?">
<div class="form-actions">
<button class="btn btn-primary btn-save-chart" type="button">
<xsl:apply-templates select="key('resources', 'save', document(resolve-uri('static/com/atomgraph/linkeddatahub/xsl/bootstrap/2.3.2/translations.rdf', $ac:contextUri)))" mode="ldh:logo">
<xsl:apply-templates select="key('resources', 'save', document(resolve-uri('static/com/atomgraph/linkeddatahub/xsl/bootstrap/2.3.2/translations.rdf', lapp:origin())))" mode="ldh:logo">
<xsl:with-param name="class" select="'btn btn-primary btn-save-chart'"/>
</xsl:apply-templates>

<xsl:apply-templates select="key('resources', 'save', document(resolve-uri('static/com/atomgraph/linkeddatahub/xsl/bootstrap/2.3.2/translations.rdf', $ac:contextUri)))" mode="ac:label"/>
<xsl:apply-templates select="key('resources', 'save', document(resolve-uri('static/com/atomgraph/linkeddatahub/xsl/bootstrap/2.3.2/translations.rdf', lapp:origin())))" mode="ac:label"/>
</button>
</div>
</xsl:param>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
<!DOCTYPE xsl:stylesheet [
<!ENTITY def "https://w3id.org/atomgraph/linkeddatahub/default#">
<!ENTITY ldh "https://w3id.org/atomgraph/linkeddatahub#">
<!ENTITY lapp "https://w3id.org/atomgraph/linkeddatahub/apps#">
<!ENTITY ac "https://w3id.org/atomgraph/client#">
<!ENTITY rdf "http://www.w3.org/1999/02/22-rdf-syntax-ns#">
<!ENTITY xsd "http://www.w3.org/2001/XMLSchema#">
Expand All @@ -24,6 +25,7 @@ xmlns:json="http://www.w3.org/2005/xpath-functions"
xmlns:array="http://www.w3.org/2005/xpath-functions/array"
xmlns:ac="&ac;"
xmlns:ldh="&ldh;"
xmlns:lapp="&lapp;"
xmlns:rdf="&rdf;"
xmlns:srx="&srx;"
xmlns:ldt="&ldt;"
Expand Down Expand Up @@ -223,22 +225,22 @@ exclude-result-prefixes="#all"

<div class="form-actions">
<button type="submit">
<xsl:apply-templates select="key('resources', 'run', document(resolve-uri('static/com/atomgraph/linkeddatahub/xsl/bootstrap/2.3.2/translations.rdf', $ac:contextUri)))" mode="ldh:logo">
<xsl:apply-templates select="key('resources', 'run', document(resolve-uri('static/com/atomgraph/linkeddatahub/xsl/bootstrap/2.3.2/translations.rdf', lapp:origin())))" mode="ldh:logo">
<xsl:with-param name="class" select="'btn btn-primary btn-run-query'"/>
</xsl:apply-templates>

<xsl:value-of>
<xsl:apply-templates select="key('resources', 'run', document(resolve-uri('static/com/atomgraph/linkeddatahub/xsl/bootstrap/2.3.2/translations.rdf', $ac:contextUri)))" mode="ac:label"/>
<xsl:apply-templates select="key('resources', 'run', document(resolve-uri('static/com/atomgraph/linkeddatahub/xsl/bootstrap/2.3.2/translations.rdf', lapp:origin())))" mode="ac:label"/>
</xsl:value-of>
</button>
<button type="button" class="btn btn-primary btn-open-query">
<xsl:value-of>
<xsl:apply-templates select="key('resources', 'open', document(resolve-uri('static/com/atomgraph/linkeddatahub/xsl/bootstrap/2.3.2/translations.rdf', $ac:contextUri)))" mode="ac:label"/>
<xsl:apply-templates select="key('resources', 'open', document(resolve-uri('static/com/atomgraph/linkeddatahub/xsl/bootstrap/2.3.2/translations.rdf', lapp:origin())))" mode="ac:label"/>
</xsl:value-of>
</button>
<button type="button" class="btn btn-primary btn-save btn-save-query">
<xsl:value-of>
<xsl:apply-templates select="key('resources', 'save', document(resolve-uri('static/com/atomgraph/linkeddatahub/xsl/bootstrap/2.3.2/translations.rdf', $ac:contextUri)))" mode="ac:label"/>
<xsl:apply-templates select="key('resources', 'save', document(resolve-uri('static/com/atomgraph/linkeddatahub/xsl/bootstrap/2.3.2/translations.rdf', lapp:origin())))" mode="ac:label"/>
</xsl:value-of>
</button>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
<!DOCTYPE xsl:stylesheet [
<!ENTITY def "https://w3id.org/atomgraph/linkeddatahub/default#">
<!ENTITY ldh "https://w3id.org/atomgraph/linkeddatahub#">
<!ENTITY lapp "https://w3id.org/atomgraph/linkeddatahub/apps#">
<!ENTITY ac "https://w3id.org/atomgraph/client#">
<!ENTITY rdf "http://www.w3.org/1999/02/22-rdf-syntax-ns#">
<!ENTITY rdfs "http://www.w3.org/2000/01/rdf-schema#">
Expand All @@ -27,6 +28,7 @@ xmlns:json="http://www.w3.org/2005/xpath-functions"
xmlns:array="http://www.w3.org/2005/xpath-functions/array"
xmlns:ac="&ac;"
xmlns:ldh="&ldh;"
xmlns:lapp="&lapp;"
xmlns:rdf="&rdf;"
xmlns:rdfs="&rdfs;"
xmlns:srx="&srx;"
Expand Down Expand Up @@ -224,7 +226,7 @@ exclude-result-prefixes="#all"
<xsl:choose>
<xsl:when test="@name = $count-var-name">
<strong>
<xsl:apply-templates select="key('resources', 'total-results', document(resolve-uri('static/com/atomgraph/linkeddatahub/xsl/bootstrap/2.3.2/translations.rdf', $ac:contextUri)))" mode="ac:label"/>
<xsl:apply-templates select="key('resources', 'total-results', document(resolve-uri('static/com/atomgraph/linkeddatahub/xsl/bootstrap/2.3.2/translations.rdf', lapp:origin())))" mode="ac:label"/>
<xsl:text> </xsl:text>
<span class="badge badge-inverse">
<xsl:value-of select="srx:literal"/>
Expand Down Expand Up @@ -796,7 +798,7 @@ exclude-result-prefixes="#all"
<option>
<xsl:value-of>
<xsl:text>[</xsl:text>
<xsl:apply-templates select="key('resources', 'none', document(resolve-uri('static/com/atomgraph/linkeddatahub/xsl/bootstrap/2.3.2/translations.rdf', $ac:contextUri)))" mode="ac:label"/>
<xsl:apply-templates select="key('resources', 'none', document(resolve-uri('static/com/atomgraph/linkeddatahub/xsl/bootstrap/2.3.2/translations.rdf', lapp:origin())))" mode="ac:label"/>
<xsl:text>]</xsl:text>
</xsl:value-of>
</option>
Expand All @@ -820,14 +822,14 @@ exclude-result-prefixes="#all"
<xsl:when test="not($desc)">
<button type="button" class="btn btn-order-by">
<xsl:value-of>
<xsl:apply-templates select="key('resources', 'ascending', document(resolve-uri('static/com/atomgraph/linkeddatahub/xsl/bootstrap/2.3.2/translations.rdf', $ac:contextUri)))" mode="ac:label"/>
<xsl:apply-templates select="key('resources', 'ascending', document(resolve-uri('static/com/atomgraph/linkeddatahub/xsl/bootstrap/2.3.2/translations.rdf', lapp:origin())))" mode="ac:label"/>
</xsl:value-of>
</button>
</xsl:when>
<xsl:otherwise>
<button type="button" class="btn btn-order-by btn-order-by-desc">
<xsl:value-of>
<xsl:apply-templates select="key('resources', 'descending', document(resolve-uri('static/com/atomgraph/linkeddatahub/xsl/bootstrap/2.3.2/translations.rdf', $ac:contextUri)))" mode="ac:label"/>
<xsl:apply-templates select="key('resources', 'descending', document(resolve-uri('static/com/atomgraph/linkeddatahub/xsl/bootstrap/2.3.2/translations.rdf', lapp:origin())))" mode="ac:label"/>
</xsl:value-of>
</button>
</xsl:otherwise>
Expand Down Expand Up @@ -1148,7 +1150,7 @@ exclude-result-prefixes="#all"
</xsl:if>

<h2 class="nav-header btn">
<xsl:apply-templates select="key('resources', 'related-results', document(resolve-uri('static/com/atomgraph/linkeddatahub/xsl/bootstrap/2.3.2/translations.rdf', $ac:contextUri)))" mode="ac:label"/>
<xsl:apply-templates select="key('resources', 'related-results', document(resolve-uri('static/com/atomgraph/linkeddatahub/xsl/bootstrap/2.3.2/translations.rdf', lapp:origin())))" mode="ac:label"/>
</h2>

<ul id="{$properties-container-id}" class="well well-small nav nav-list">
Expand Down
Loading
Loading