Skip to content

Commit

Permalink
remove old references to xspec.googlecode.com expath#56
Browse files Browse the repository at this point in the history
  • Loading branch information
Sandro Cirulli committed Jan 13, 2017
1 parent ba5f97c commit a6bb235
Show file tree
Hide file tree
Showing 38 changed files with 556 additions and 874 deletions.
1 change: 0 additions & 1 deletion build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
<!-- ===================================================================== -->
<!-- File: build.xml -->
<!-- Author: Jeni Tennison -->
<!-- URI: http://xspec.googlecode.com/ -->
<!-- Tags: -->
<!-- Copyright (c) 2008, 2010 Jeni Tennison (see end of file.) -->
<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
Expand Down
6 changes: 0 additions & 6 deletions find-examples.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,12 @@
<!-- ===================================================================== -->
<!-- File: find-examples.xml -->
<!-- Author: Jeni Tennsion -->
<!-- URI: http://xspec.googlecode.com/ -->
<!-- Tags: -->
<!-- Copyright (c) 2008, 2010 Jeni Tennsion (see end of file.) -->
<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->


<?oxygen RNGSchema="find-examples.rnc" type="compact"?>
<x:scan xmlns:x="http://www.jenitennison.com/xslt/xspec">
<x:collection>?select=*.xml&amp;recurse=yes&amp;strip-space=yes</x:collection>
</x:scan>


<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
<!-- DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS COMMENT. -->
<!-- -->
Expand Down
1 change: 0 additions & 1 deletion find-examples.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
<!-- ===================================================================== -->
<!-- File: find-examples.xsl -->
<!-- Author: Jeni Tennsion -->
<!-- URI: http://xspec.googlecode.com/ -->
<!-- Tags: -->
<!-- Copyright (c) 2008, 2010 Jeni Tennsion (see end of file.) -->
<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
Expand Down
1 change: 0 additions & 1 deletion src/compiler/generate-common-tests.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
<!-- ===================================================================== -->
<!-- File: generate-common-tests.xsl -->
<!-- Author: Jeni Tennsion -->
<!-- URI: http://xspec.googlecode.com/ -->
<!-- Tags: -->
<!-- Copyright (c) 2008, 2010 Jeni Tennsion (see end of file.) -->
<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
Expand Down
1 change: 0 additions & 1 deletion src/compiler/generate-query-helper.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
<!-- ===================================================================== -->
<!-- File: generate-query-helper.xsl -->
<!-- Author: Jeni Tennsion -->
<!-- URI: http://xspec.googlecode.com/ -->
<!-- Tags: -->
<!-- Copyright (c) 2008, 2010 Jeni Tennsion (see end of file.) -->
<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
Expand Down
1 change: 0 additions & 1 deletion src/compiler/generate-query-tests.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
<!-- ===================================================================== -->
<!-- File: generate-query-tests.xsl -->
<!-- Author: Jeni Tennsion -->
<!-- URI: http://xspec.googlecode.com/ -->
<!-- Tags: -->
<!-- Copyright (c) 2008, 2010 Jeni Tennsion (see end of file.) -->
<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
Expand Down
1 change: 0 additions & 1 deletion src/compiler/generate-query-utils.xql
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ module namespace test = "http://www.jenitennison.com/xslt/unit-test";
(::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::)
(: File: generate-query-utils.xql :)
(: Author: Jeni Tennsion :)
(: URI: http://xspec.googlecode.com/ :)
(: Tags: :)
(: Copyright (c) 2008, 2010 Jeni Tennsion (see end of file.) :)
(: ------------------------------------------------------------------------ :)
Expand Down
1 change: 0 additions & 1 deletion src/compiler/generate-tests-helper.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
<!-- ===================================================================== -->
<!-- File: generate-tests-helper.xsl -->
<!-- Author: Jeni Tennsion -->
<!-- URI: http://xspec.googlecode.com/ -->
<!-- Tags: -->
<!-- Copyright (c) 2008, 2010 Jeni Tennsion (see end of file.) -->
<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
Expand Down
1 change: 0 additions & 1 deletion src/compiler/generate-tests-utils.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
<!-- ===================================================================== -->
<!-- File: generate-tests-utils.xsl -->
<!-- Author: Jeni Tennsion -->
<!-- URI: http://xspec.googlecode.com/ -->
<!-- Tags: -->
<!-- Copyright (c) 2008, 2010 Jeni Tennsion (see end of file.) -->
<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
Expand Down
1 change: 0 additions & 1 deletion src/compiler/generate-xspec-tests.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
<!-- ===================================================================== -->
<!-- File: generate-xspec-tests.xsl -->
<!-- Author: Jeni Tennsion -->
<!-- URI: http://xspec.googlecode.com/ -->
<!-- Tags: -->
<!-- Copyright (c) 2008, 2010 Jeni Tennsion (see end of file.) -->
<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
Expand Down
174 changes: 73 additions & 101 deletions src/harnesses/basex/basex-server-xquery-harness.xproc
Original file line number Diff line number Diff line change
Expand Up @@ -3,118 +3,90 @@
<!-- File: basex-server-xquery-harness.xproc -->
<!-- Author: Florent Georges -->
<!-- Date: 2011-08-30 -->
<!-- URI: http://xspec.googlecode.com/ -->
<!-- Tags: -->
<!-- Copyright (c) 2011 Florent Georges (see end of file.) -->
<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->


<p:pipeline xmlns:p="http://www.w3.org/ns/xproc"
xmlns:c="http://www.w3.org/ns/xproc-step"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:t="http://www.jenitennison.com/xslt/xspec"
xmlns:rest="http://www.basex.org/rest"
xmlns:pkg="http://expath.org/ns/pkg"
pkg:import-uri="http://www.jenitennison.com/xslt/xspec/basex/harness/server/xquery.xproc"
name="basex-server-xquery-harness"
type="t:basex-server-xquery-harness"
version="1.0">

<p:documentation>
<p>This pipeline executes an XSpec test suite on a BaseX server instance.</p>
<p><b>Primary input:</b> A XSpec test suite document.</p>
<p><b>Primary output:</b> A formatted HTML XSpec report.</p>
<p>The XQuery library module to test must already be on the BaseX instance
<p:pipeline xmlns:p="http://www.w3.org/ns/xproc" xmlns:c="http://www.w3.org/ns/xproc-step" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:t="http://www.jenitennison.com/xslt/xspec" xmlns:rest="http://www.basex.org/rest" xmlns:pkg="http://expath.org/ns/pkg" pkg:import-uri="http://www.jenitennison.com/xslt/xspec/basex/harness/server/xquery.xproc" name="basex-server-xquery-harness" type="t:basex-server-xquery-harness" version="1.0">
<p:documentation>
<p>This pipeline executes an XSpec test suite on a BaseX server instance.</p>
<p><b>Primary input:</b> A XSpec test suite document.</p>
<p><b>Primary output:</b> A formatted HTML XSpec report.</p>
<p>The XQuery library module to test must already be on the BaseX instance
(its URI is passed through the option 'query-at'). The instance endpoint
is passed in the option 'endpoint'. The runtime utils library (also known
as generate-query-utils.xql) must also be on the instance (its location
hint, that is the 'at' clause to use) is passed in the option 'utils-lib'.
The dir where you unzipped the XSpec archive on your filesystem is passed
in the option 'xspec-home'. User credentials are passed through options
'username' and 'password'.</p>
</p:documentation>

<p:serialization port="result" indent="true"/>

<p:import href="../harness-lib.xpl"/>

<t:parameters name="params"/>

<p:group>
<p:variable name="xspec-home" select="/c:param-set/c:param[@name eq 'xspec-home']/@value">
<p:pipe step="params" port="parameters"/>
</p:variable>
<p:variable name="query-at" select="/c:param-set/c:param[@name eq 'query-at']/@value">
<p:pipe step="params" port="parameters"/>
</p:variable>
<p:variable name="endpoint" select="/c:param-set/c:param[@name eq 'endpoint']/@value">
<p:pipe step="params" port="parameters"/>
</p:variable>
<p:variable name="username" select="/c:param-set/c:param[@name eq 'username']/@value">
<p:pipe step="params" port="parameters"/>
</p:variable>
<p:variable name="password" select="/c:param-set/c:param[@name eq 'password']/@value">
<p:pipe step="params" port="parameters"/>
</p:variable>
<p:variable name="auth-method" select="/c:param-set/c:param[@name eq 'auth-method']/@value">
<p:pipe step="params" port="parameters"/>
</p:variable>

<!-- compile the suite into a query -->
<t:compile-xquery/>

<!-- escape the query as text -->
<p:escape-markup/>

<!-- construct the BaseX REST query element around the query itself -->
<p:rename new-name="rest:text" match="/*"/>
<p:wrap wrapper="rest:query" match="/*"/>
<!-- construct the HTTP request following BaseX REST interface -->
<p:wrap wrapper="c:body" match="/*"/>
<p:add-attribute attribute-name="content-type" attribute-value="application/xml" match="/*"/>
<p:wrap wrapper="c:request" match="/*"/>
<p:add-attribute attribute-name="method" attribute-value="POST" match="/*"/>
<!-- inject variable values -->
<p:add-attribute attribute-name="href" match="/*">
<p:with-option name="attribute-value" select="$endpoint"/>
</p:add-attribute>
<p:add-attribute attribute-name="username" match="/*">
<p:with-option name="attribute-value" select="$username"/>
</p:add-attribute>
<p:add-attribute attribute-name="password" match="/*">
<p:with-option name="attribute-value" select="$password"/>
</p:add-attribute>
<p:add-attribute attribute-name="auth-method" match="/*">
<p:with-option name="attribute-value" select="$auth-method"/>
</p:add-attribute>

<!-- log the HTTP request ? -->
<t:log if-set="log-http-request">
<p:input port="parameters">
<p:pipe step="params" port="parameters"/>
</p:input>
</t:log>

<!-- TODO: Check HTTP return code, etc.? (using @detailed = true) -->
<p:http-request name="run"/>

<!-- log the HTTP request ? -->
<t:log if-set="log-http-response">
<p:input port="parameters">
<p:pipe step="params" port="parameters"/>
</p:input>
</t:log>

<!-- format the report -->
<t:format-report>
<p:with-option name="xspec-home" select="$xspec-home"/>
</t:format-report>
</p:group>

</p:documentation>
<p:serialization port="result" indent="true"/>
<p:import href="../harness-lib.xpl"/>
<t:parameters name="params"/>
<p:group>
<p:variable name="xspec-home" select="/c:param-set/c:param[@name eq 'xspec-home']/@value">
<p:pipe step="params" port="parameters"/>
</p:variable>
<p:variable name="query-at" select="/c:param-set/c:param[@name eq 'query-at']/@value">
<p:pipe step="params" port="parameters"/>
</p:variable>
<p:variable name="endpoint" select="/c:param-set/c:param[@name eq 'endpoint']/@value">
<p:pipe step="params" port="parameters"/>
</p:variable>
<p:variable name="username" select="/c:param-set/c:param[@name eq 'username']/@value">
<p:pipe step="params" port="parameters"/>
</p:variable>
<p:variable name="password" select="/c:param-set/c:param[@name eq 'password']/@value">
<p:pipe step="params" port="parameters"/>
</p:variable>
<p:variable name="auth-method" select="/c:param-set/c:param[@name eq 'auth-method']/@value">
<p:pipe step="params" port="parameters"/>
</p:variable>
<!-- compile the suite into a query -->
<t:compile-xquery/>
<!-- escape the query as text -->
<p:escape-markup/>
<!-- construct the BaseX REST query element around the query itself -->
<p:rename new-name="rest:text" match="/*"/>
<p:wrap wrapper="rest:query" match="/*"/>
<!-- construct the HTTP request following BaseX REST interface -->
<p:wrap wrapper="c:body" match="/*"/>
<p:add-attribute attribute-name="content-type" attribute-value="application/xml" match="/*"/>
<p:wrap wrapper="c:request" match="/*"/>
<p:add-attribute attribute-name="method" attribute-value="POST" match="/*"/>
<!-- inject variable values -->
<p:add-attribute attribute-name="href" match="/*">
<p:with-option name="attribute-value" select="$endpoint"/>
</p:add-attribute>
<p:add-attribute attribute-name="username" match="/*">
<p:with-option name="attribute-value" select="$username"/>
</p:add-attribute>
<p:add-attribute attribute-name="password" match="/*">
<p:with-option name="attribute-value" select="$password"/>
</p:add-attribute>
<p:add-attribute attribute-name="auth-method" match="/*">
<p:with-option name="attribute-value" select="$auth-method"/>
</p:add-attribute>
<!-- log the HTTP request ? -->
<t:log if-set="log-http-request">
<p:input port="parameters">
<p:pipe step="params" port="parameters"/>
</p:input>
</t:log>
<!-- TODO: Check HTTP return code, etc.? (using @detailed = true) -->
<p:http-request name="run"/>
<!-- log the HTTP request ? -->
<t:log if-set="log-http-response">
<p:input port="parameters">
<p:pipe step="params" port="parameters"/>
</p:input>
</t:log>
<!-- format the report -->
<t:format-report>
<p:with-option name="xspec-home" select="$xspec-home"/>
</t:format-report>
</p:group>
</p:pipeline>


<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
<!-- DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS COMMENT. -->
<!-- -->
Expand Down
Loading

0 comments on commit a6bb235

Please sign in to comment.