@@ -606,35 +606,54 @@ extension-element-prefixes="ixsl"
606606 <xsl : template match =" *[not($ldh:renderSystemResources)][@rdf:about = ac:absolute-path(ldh:base-uri(.)) and rdf:type/@rdf:resource = ('&def;Root', '&dh;Container', '&dh;Item')]" mode =" bs2:Row" priority =" 1" use-when =" system-property('xsl:product-name') = 'SAXON'" />
607607
608608 <!-- overriding template used to inject ldh:template blocks (server-side only) -->
609- <!-- <xsl:template match="*[*][@rdf:about] | *[*][@rdf:nodeID]" mode="bs2:Row" priority="0.7" use-when="system-property('xsl:product-name') = 'SAXON'">
610- TO-DO: use $ldh:requestUri to resolve URIs server-side
609+ <xsl : template match =" *[*][@rdf:about] | *[*][@rdf:nodeID]" mode =" bs2:Row" priority =" 0.7" use-when =" system-property('xsl:product-name') = 'SAXON'" >
610+ <!-- TO-DO: use $ldh:requestUri to resolve URIs server-side -->
611611 <xsl : param name =" id" select =" if (contains(@rdf:about, ac:absolute-path(ldh:base-uri(.)) || '#')) then substring-after(@rdf:about, ac:absolute-path(ldh:base-uri(.)) || '#') else generate-id()" as =" xs:string?" />
612612 <xsl : param name =" class" select =" 'row-fluid block'" as =" xs:string?" />
613613 <xsl : param name =" about" select =" @rdf:about" as =" xs:anyURI?" />
614614 <xsl : param name =" typeof" select =" rdf:type/@rdf:resource/xs:anyURI(.)" as =" xs:anyURI*" />
615615 <xsl : param name =" mode" as =" xs:anyURI?" />
616616 <xsl : param name =" style" as =" xs:string?" />
617- take care not to load unnecessary documents over HTTP when $typeof is empty
617+ <!-- take care not to load unnecessary documents over HTTP when $typeof is empty -->
618618 <xsl : variable name =" block-values" select =" if (exists($typeof)) then (if (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 $typeof return '< ' || $type || '> ', ' ') || ' }')//srx:binding[@name = 'block']/srx:uri/xs:anyURI(.)) else ()) else ()" as =" xs:anyURI*" use-when =" system-property('xsl:product-name') = 'SAXON'" />
619619
620620 <xsl : choose >
621621 <xsl : when test =" exists($block-values)" >
622- <div class="row-fluid">
622+ <div >
623+ <xsl : if test =" $id" >
624+ <xsl : attribute name =" id" select =" $id" />
625+ </xsl : if >
626+ <xsl : if test =" $class" >
627+ <xsl : attribute name =" class" select =" $class" />
628+ </xsl : if >
629+ <xsl : if test =" $about" >
630+ <xsl : attribute name =" about" select =" $about" />
631+ </xsl : if >
632+ <!-- <xsl:if test="exists($typeof)">
633+ <xsl:attribute name="typeof" select="string-join($typeof, ' ')"/>
634+ </xsl:if>-->
635+ <!-- <xsl:if test="$draggable = true()">
636+ <xsl:attribute name="draggable" select="'true'"/>
637+ </xsl:if>
638+ <xsl:if test="$draggable = false()">
639+ <xsl:attribute name="draggable" select="'false'"/>
640+ </xsl:if>-->
641+
623642 <div class =" span12" >
624643 <xsl : next-match >
625- <xsl:with-param name="id" select="()"/> unset @id
644+ <xsl : with-param name =" id" select =" ()" /> <!-- unset @id -->
626645 <xsl : with-param name =" class" select =" $class" />
627646 <xsl : with-param name =" about" select =" $about" />
628647 <xsl : with-param name =" typeof" select =" $typeof" />
629648 <xsl : with-param name =" mode" select =" $mode" />
630649 <xsl : with-param name =" style" select =" $style" />
631650 </xsl : next-match >
632651
633- render contents attached to the types of this resource using ldh:template
652+ <!-- render contents attached to the types of this resource using ldh:template -->
634653 <xsl : for-each select =" $block-values" use-when =" system-property('xsl:product-name') = 'SAXON'" >
635654 <xsl : if test =" doc-available(ac:document-uri(.))" >
636655 <xsl : apply-templates select =" key('resources', ., document(ac:document-uri(.)))" mode =" bs2:Row" >
637- <xsl:with-param name="about" select="()"/> unset the @about
656+ <xsl : with-param name =" about" select =" ()" /> <!-- unset the @about -->
638657 </xsl : apply-templates >
639658 </xsl : if >
640659 </xsl : for-each >
@@ -652,7 +671,7 @@ extension-element-prefixes="ixsl"
652671 </xsl : next-match >
653672 </xsl : otherwise >
654673 </xsl : choose >
655- </xsl:template>-->
674+ </xsl : template >
656675
657676 <xsl : template match =" *[*][@rdf:about] | *[*][@rdf:nodeID]" mode =" bs2:Row" >
658677 <!-- TO-DO: use $ldh:requestUri to resolve URIs server-side -->
@@ -663,8 +682,6 @@ extension-element-prefixes="ixsl"
663682 <xsl : param name =" mode" as =" xs:anyURI?" />
664683 <xsl : param name =" style" as =" xs:string?" />
665684 <xsl : param name =" main-class" select =" 'main span7'" as =" xs:string?" />
666- <!-- take care not to load unnecessary documents over HTTP when $typeof is empty -->
667- <xsl : variable name =" block-values" select =" if (exists($typeof)) then (if (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 $typeof return '< ' || $type || '> ', ' ') || ' }')//srx:binding[@name = 'block']/srx:uri/xs:anyURI(.)) else ()) else ()" as =" xs:anyURI*" use-when =" system-property('xsl:product-name') = 'SAXON'" />
668685
669686 <div >
670687 <xsl : if test =" $id" >
@@ -714,15 +731,6 @@ extension-element-prefixes="ixsl"
714731 <xsl : apply-templates select =" ." />
715732 </xsl : otherwise >
716733 </xsl : choose >
717-
718- <!-- render contents attached to the types of this resource using ldh:template -->
719- <xsl : for-each select =" $block-values" use-when =" system-property('xsl:product-name') = 'SAXON'" >
720- <xsl : if test =" doc-available(ac:document-uri(.))" >
721- <xsl : apply-templates select =" key('resources', ., document(ac:document-uri(.)))" mode =" bs2:Row" >
722- <xsl : with-param name =" about" select =" ()" /> <!-- unset the @about -->
723- </xsl : apply-templates >
724- </xsl : if >
725- </xsl : for-each >
726734 </div >
727735
728736 <xsl : apply-templates select =" ." mode =" bs2:Right" />
0 commit comments