@@ -278,7 +278,7 @@ LIMIT 100
278278
279279 <!-- META -->
280280
281- <xsl : template match =" rdf:RDF" mode =" xhtml:Meta" >
281+ <xsl : template match =" rdf:RDF | srx:sparql " mode =" xhtml:Meta" >
282282 <meta name =" viewport" content =" width=device-width, initial-scale=1.0" />
283283
284284 <meta name =" og:url" content =" {ac:uri()}" />
@@ -317,7 +317,7 @@ LIMIT 100
317317
318318 <!-- STYLE -->
319319
320- <xsl : template match =" rdf:RDF" mode =" xhtml:Style" >
320+ <xsl : template match =" rdf:RDF | srx:sparql " mode =" xhtml:Style" >
321321 <xsl : param name =" load-wymeditor" select =" exists($foaf:Agent//@rdf:about)" as =" xs:boolean" />
322322 <xsl : param name =" load-yasqe" select =" true()" as =" xs:boolean" />
323323
@@ -334,7 +334,7 @@ LIMIT 100
334334
335335 <!-- SCRIPT -->
336336
337- <xsl : template match =" rdf:RDF" mode =" xhtml:Script" >
337+ <xsl : template match =" rdf:RDF | srx:sparql " mode =" xhtml:Script" >
338338 <xsl : param name =" client-stylesheet" select =" resolve-uri('static/com/atomgraph/linkeddatahub/xsl/client.xsl.sef.json', $ac:contextUri)" as =" xs:anyURI" />
339339 <xsl : param name =" saxon-js-log-level" select =" 10" as =" xs:integer" />
340340 <xsl : param name =" load-wymeditor" select =" not($ac:mode = ('∾ ModalMode', '&ldht; InfoWindowMode'))" as =" xs:boolean" />
@@ -473,7 +473,7 @@ LIMIT 100
473473
474474 <!-- NAVBAR -->
475475
476- <xsl : template match =" rdf:RDF" mode =" bs2:NavBar" >
476+ <xsl : template match =" rdf:RDF | srx:sparql " mode =" bs2:NavBar" >
477477 <div class =" navbar navbar-fixed-top" >
478478 <div class =" navbar-inner" >
479479 <div class =" container-fluid" >
@@ -505,7 +505,7 @@ LIMIT 100
505505 </div >
506506 </xsl : template >
507507
508- <xsl : template match =" rdf:RDF" mode =" bs2:Brand" >
508+ <xsl : template match =" rdf:RDF | srx:sparql " mode =" bs2:Brand" >
509509 <a class =" brand" href =" {$ldt:base}" >
510510 <xsl : if test =" $lapp:Application//*[ldt:base/@rdf:resource = $ldt:base]/rdf:type/@rdf:resource = '&lapp; AdminApplication'" >
511511 <xsl : attribute name =" class" select =" 'brand admin'" />
@@ -518,7 +518,7 @@ LIMIT 100
518518 </xsl : template >
519519
520520 <!-- check if agent has access to the user endpoint by executing a dummy query ASK {} -->
521- <xsl : template match =" rdf:RDF[doc-available(resolve-uri('sparql?query=ASK%20%7B%7D', $ldt:base))]" mode =" bs2:SearchBar" priority =" 1" >
521+ <xsl : template match =" rdf:RDF[doc-available(resolve-uri('sparql?query=ASK%20%7B%7D', $ldt:base))] | srx:sparql[doc-available(resolve-uri('sparql?query=ASK%20%7B%7D', $ldt:base))] " mode =" bs2:SearchBar" priority =" 1" >
522522 <form action =" " method =" get" class =" navbar-form pull-left" accept-charset =" UTF-8" title =" {ac:label(key('resources', 'search-title', document('translations.rdf')))}" >
523523 <div class =" input-append" >
524524 <select id =" search-service" name =" service" >
@@ -550,7 +550,7 @@ LIMIT 100
550550
551551 <xsl : template match =" *" mode =" bs2:SearchBar" />
552552
553- <xsl : template match =" rdf:RDF" mode =" bs2:ActionBarLeft" >
553+ <xsl : template match =" rdf:RDF | srx:sparql " mode =" bs2:ActionBarLeft" >
554554 <xsl : param name =" id" as =" xs:string?" />
555555 <xsl : param name =" class" select =" 'span2'" as =" xs:string?" />
556556 <xsl : param name =" classes" select =" for $class-uri in map:keys($default-classes) return key('resources', $class-uri, document(ac:document-uri($class-uri)))" as =" element()*" />
@@ -575,7 +575,7 @@ LIMIT 100
575575 </div >
576576 </xsl : template >
577577
578- <xsl : template match =" rdf:RDF" mode =" bs2:ActionBarMain" >
578+ <xsl : template match =" rdf:RDF | srx:sparql " mode =" bs2:ActionBarMain" >
579579 <xsl : param name =" id" as =" xs:string?" />
580580 <xsl : param name =" class" select =" 'span7'" as =" xs:string?" />
581581
@@ -597,7 +597,7 @@ LIMIT 100
597597 </div >
598598 </xsl : template >
599599
600- <xsl : template match =" rdf:RDF" mode =" bs2:ActionBarRight" >
600+ <xsl : template match =" rdf:RDF | srx:sparql " mode =" bs2:ActionBarRight" >
601601 <xsl : param name =" id" as =" xs:string?" />
602602 <xsl : param name =" class" select =" 'span3'" as =" xs:string?" />
603603
@@ -638,7 +638,9 @@ LIMIT 100
638638 </div >
639639 </xsl : template >
640640
641- <xsl : template match =" rdf:RDF" mode =" bs2:NavBarNavList" >
641+ <xsl : template match =" srx:sparql" mode =" bs2:BreadCrumbBar" />
642+
643+ <xsl : template match =" rdf:RDF | srx:sparql" mode =" bs2:NavBarNavList" >
642644 <xsl : if test =" $foaf:Agent//@rdf:about" >
643645 <ul class =" nav pull-right" >
644646 <li >
@@ -771,7 +773,7 @@ LIMIT 100
771773 </body >
772774 </xsl : template >
773775
774- <xsl : template match =" rdf:RDF" mode =" xhtml:Body" >
776+ <xsl : template match =" rdf:RDF | srx:sparql " mode =" xhtml:Body" >
775777 <body >
776778 <div id =" visible-body" >
777779 <xsl : apply-templates select =" ." mode =" bs2:NavBar" />
@@ -784,22 +786,26 @@ LIMIT 100
784786 <xsl : apply-templates select =" ." mode =" bs2:DocumentTree" />
785787 </body >
786788 </xsl : template >
787-
789+
788790 <xsl : template match =" rdf:RDF" mode =" bs2:ContentBody" >
789791 <xsl : param name =" id" select =" 'content-body'" as =" xs:string?" />
790792 <xsl : param name =" class" select =" 'container-fluid'" as =" xs:string?" />
793+ <xsl : param name =" about" select =" ac:uri()" as =" xs:anyURI?" />
791794 <xsl : param name =" classes" select =" for $class-uri in map:keys($default-classes) return key('resources', $class-uri, document(ac:document-uri($class-uri)))" as =" element()*" />
792795 <xsl : param name =" doc-types" select =" key('resources', ac:uri())/rdf:type/@rdf:resource[ . = ('&def; Root', '&dh; Container', '&dh; Item')]" as =" xs:anyURI*" />
793796 <xsl : param name =" content-values" select =" if (exists($doc-types) and doc-available(resolve-uri('ns?query=ASK%20%7B%7D', $ldt:base))) then (ldh:query-result(map{}, resolve-uri('ns', $ldt:base), $template-query || ' VALUES $Type { ' || string-join(for $type in $doc-types return '< ' || $type || '> ', ' ') || ' }')//srx:binding[@name = 'content']/srx:uri/xs:anyURI(.)) else ()" as =" xs:anyURI*" />
794797 <xsl : param name =" has-content" select =" key('resources', key('resources', ac:uri())/rdf:*[starts-with(local-name(), '_')]/@rdf:resource) or exists($content-values)" as =" xs:boolean" />
795798
796- <div about = " {ac:uri()} " >
799+ <div >
797800 <xsl : if test =" $id" >
798801 <xsl : attribute name =" id" select =" $id" />
799802 </xsl : if >
800803 <xsl : if test =" $class" >
801804 <xsl : attribute name =" class" select =" $class" />
802805 </xsl : if >
806+ <xsl : if test =" $about" >
807+ <xsl : attribute name =" about" select =" $about" />
808+ </xsl : if >
803809
804810 <xsl : apply-templates select =" ." mode =" bs2:ModeTabs" >
805811 <xsl : with-param name =" has-content" select =" $has-content" />
@@ -927,6 +933,26 @@ LIMIT 100
927933
928934 <!-- don't show document-level tabs if the response returned an error or if we're in EditMode -->
929935 <xsl : template match =" rdf:RDF[key('resources-by-type', '&http;Response')] | rdf:RDF[$ac:forClass or $ac:mode = '∾EditMode']" mode =" bs2:ModeTabs" priority =" 1" />
936+
937+ <xsl : template match =" srx:sparql" mode =" bs2:ContentBody" >
938+ <xsl : param name =" id" select =" 'content-body'" as =" xs:string?" />
939+ <xsl : param name =" class" select =" 'container-fluid'" as =" xs:string?" />
940+ <xsl : param name =" about" select =" ac:uri()" as =" xs:anyURI?" />
941+
942+ <div >
943+ <xsl : if test =" $id" >
944+ <xsl : attribute name =" id" select =" $id" />
945+ </xsl : if >
946+ <xsl : if test =" $class" >
947+ <xsl : attribute name =" class" select =" $class" />
948+ </xsl : if >
949+ <xsl : if test =" $about" >
950+ <xsl : attribute name =" about" select =" $about" />
951+ </xsl : if >
952+
953+ <xsl : apply-templates select =" ." mode =" xhtml:Table" />
954+ </div >
955+ </xsl : template >
930956
931957 <!-- only lookup resource locally using DESCRIBE if it's external (not relative to the app's base URI) and the agent is authenticated -->
932958 <xsl : template match =" *[*][@rdf:about = ac:uri()][not(starts-with(@rdf:about, $ldt:base))][$foaf:Agent//@rdf:about]" mode =" bs2:PropertyList" >
@@ -1104,7 +1130,7 @@ LIMIT 100
11041130
11051131 <!-- MEDIA TYPE LIST -->
11061132
1107- <xsl : template match =" rdf:RDF" mode =" bs2:MediaTypeList" priority =" 1" >
1133+ <xsl : template match =" rdf:RDF | srx:sparql " mode =" bs2:MediaTypeList" priority =" 1" >
11081134 <div class =" btn-group pull-right" >
11091135 <button type =" button" id =" export-rdf" title =" {ac:label(key('resources', 'nav-bar-action-export-rdf-title', document('translations.rdf')))}" >
11101136 <xsl : apply-templates select =" key('resources', '∾ Export', document(ac:document-uri('∾ ')))" mode =" ldh:logo" >
@@ -1298,7 +1324,7 @@ LIMIT 100
12981324
12991325 <!-- SETTINGS -->
13001326
1301- <xsl : template match =" rdf:RDF" mode =" bs2:Settings" priority =" 1" >
1327+ <xsl : template match =" rdf:RDF | srx:sparql " mode =" bs2:Settings" priority =" 1" >
13021328 <div class =" btn-group pull-right" >
13031329 <button type =" button" title =" {ac:label(key('resources', 'nav-bar-action-settings-title', document('translations.rdf')))}" >
13041330 <xsl : apply-templates select =" key('resources', 'settings', document('translations.rdf'))" mode =" ldh:logo" >
@@ -1437,7 +1463,7 @@ LIMIT 100
14371463
14381464 <!-- FOOTER -->
14391465
1440- <xsl : template match =" rdf:RDF" mode =" bs2:Footer" >
1466+ <xsl : template match =" rdf:RDF | srx:sparql " mode =" bs2:Footer" >
14411467 <div class =" footer container-fluid" >
14421468 <div class =" row-fluid" >
14431469 <div class =" offset2 span8" >
0 commit comments