You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@jena.apache.org by an...@apache.org on 2014/12/29 19:13:18 UTC
[1/2] jena git commit: Make run-fuseki more robust to clean'ed dev
enviroment
Repository: jena
Updated Branches:
refs/heads/master 6537629d8 -> 8ff809d00
Make run-fuseki more robust to clean'ed dev enviroment
Project: http://git-wip-us.apache.org/repos/asf/jena/repo
Commit: http://git-wip-us.apache.org/repos/asf/jena/commit/3814f6e9
Tree: http://git-wip-us.apache.org/repos/asf/jena/tree/3814f6e9
Diff: http://git-wip-us.apache.org/repos/asf/jena/diff/3814f6e9
Branch: refs/heads/master
Commit: 3814f6e9df734dff7ac98fb716181b4fab6fb2e5
Parents: 6537629
Author: Andy Seaborne <an...@apache.org>
Authored: Mon Dec 29 18:12:38 2014 +0000
Committer: Andy Seaborne <an...@apache.org>
Committed: Mon Dec 29 18:12:38 2014 +0000
----------------------------------------------------------------------
jena-fuseki/run-fuseki | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/jena/blob/3814f6e9/jena-fuseki/run-fuseki
----------------------------------------------------------------------
diff --git a/jena-fuseki/run-fuseki b/jena-fuseki/run-fuseki
index 96a73d4..98b0d45 100755
--- a/jena-fuseki/run-fuseki
+++ b/jena-fuseki/run-fuseki
@@ -39,6 +39,8 @@ then
elif [ -e "$FUSEKI_HOME/target/classes" ]
then
CP="$FUSEKI_HOME/target/classes:$CP"
+else
+ echo "No Fuseki1 classes" 2>&1
fi
# Prepend any development directories here
@@ -56,7 +58,7 @@ FUSEKI_LOG=${FUSEKI_LOG:-}
JVM_ARGS="${JVM_ARGS:--Xmx1200M}"
#JVM_ARGS="$JVM_ARGS -XX:MaxDirectMemorySize=1G"
-# echo $CP
+#echo $CP
exec java -cp "$CP" $JVM_ARGS $FUSEKI_LOG org.apache.jena.fuseki.FusekiCmd \
--home="$FUSEKI_HOME" "$@"
[2/2] jena git commit: Escape any # in URIs
Posted by an...@apache.org.
Escape any # in URIs
Project: http://git-wip-us.apache.org/repos/asf/jena/repo
Commit: http://git-wip-us.apache.org/repos/asf/jena/commit/8ff809d0
Tree: http://git-wip-us.apache.org/repos/asf/jena/tree/8ff809d0
Diff: http://git-wip-us.apache.org/repos/asf/jena/diff/8ff809d0
Branch: refs/heads/master
Commit: 8ff809d00346efbfe758af392d66057249040682
Parents: 3814f6e
Author: Andy Seaborne <an...@apache.org>
Authored: Mon Dec 29 18:13:09 2014 +0000
Committer: Andy Seaborne <an...@apache.org>
Committed: Mon Dec 29 18:13:09 2014 +0000
----------------------------------------------------------------------
jena-fuseki/pages/xml-to-html-links.xsl | 47 +++++++++++++++++++++++++---
1 file changed, 42 insertions(+), 5 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/jena/blob/8ff809d0/jena-fuseki/pages/xml-to-html-links.xsl
----------------------------------------------------------------------
diff --git a/jena-fuseki/pages/xml-to-html-links.xsl b/jena-fuseki/pages/xml-to-html-links.xsl
index 7b41a3d..66b04eb 100644
--- a/jena-fuseki/pages/xml-to-html-links.xsl
+++ b/jena-fuseki/pages/xml-to-html-links.xsl
@@ -112,19 +112,56 @@ URIs as hrefs in results : Bob DuCharme & Andy Seaborne
<xsl:value-of select="text()"/>
</xsl:template>
+ <xsl:template name="replace-string">
+ <xsl:param name="text"/>
+ <xsl:param name="replace"/>
+ <xsl:param name="with"/>
+ <xsl:choose>
+ <xsl:when test="contains($text,$replace)">
+ <xsl:value-of select="substring-before($text,$replace)"/>
+ <xsl:value-of select="$with"/>
+ <xsl:call-template name="replace-string">
+ <xsl:with-param name="text"
+ select="substring-after($text,$replace)"/>
+ <xsl:with-param name="replace" select="$replace"/>
+ <xsl:with-param name="with" select="$with"/>
+ </xsl:call-template>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:value-of select="$text"/>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:template>
+
+
<xsl:template match="res:uri">
+ <!-- MUST be XSLT 1.0 :-( -->
+
<!-- Roughly: SELECT ($uri AS ?subject) ?predicate ?object { $uri ?predicate ?object } -->
<!-- XSLT 2.0
<xsl:variable name="x"><xsl:value-of select="fn:encode-for-uri(.)"/></xsl:variable>
-->
+
<xsl:variable name="x"><xsl:value-of select="."/></xsl:variable>
- <!--
- <xsl:variable name="query">SELECT%20%28%3C<xsl:value-of select="."/>%3E%20AS%20%3Fsubject%29%20%3Fpredicate%20%3Fobject%20%7B%3C<xsl:value-of select="."/>%3E%20%3Fpredicate%20%3Fobject%20%7D</xsl:variable>
+ <xsl:variable name="q">SELECT%20%28%3C<xsl:value-of select="$x"/>%3E%20AS%20%3Fsubject%29%20%3Fpredicate%20%3Fobject%20%7B%3C<xsl:value-of select="$x"/>%3E%20%3Fpredicate%20%3Fobject%20%7D</xsl:variable>
+
+ <!-- Escape any # -->
+ <xsl:variable name="q2">
+ <xsl:call-template name="replace-string">
+ <xsl:with-param name="text" select="$q"/>
+ <xsl:with-param name="replace" select="'#'" />
+ <xsl:with-param name="with" select="'%23'"/>
+ </xsl:call-template>
+ </xsl:variable>
+
+ <!-- XSLT 2.0
+ <xsl:value-of select="fn:replace('$q','#','%25')"/>
-->
- <xsl:variable name="query">SELECT%20%28%3C<xsl:value-of select="$x"/>%3E%20AS%20%3Fsubject%29%20%3Fpredicate%20%3Fobject%20%7B%3C<xsl:value-of select="$x"/>%3E%20%3Fpredicate%20%3Fobject%20%7D</xsl:variable>
+
<xsl:text><</xsl:text>
- <a href="?query={$query}&output=xml&stylesheet=%2Fxml-to-html-links.xsl">
- <xsl:value-of select="."/>
+ <a href="?query={$q2}&output=xml&stylesheet=%2Fxml-to-html-links.xsl">
+ <xsl:text></xsl:text>
+ <xsl:value-of select="."/>
</a>
<xsl:text>></xsl:text>
</xsl:template>