PHPackages                             lyquidity/xpath2-tests - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. lyquidity/xpath2-tests

ActiveLibrary

lyquidity/xpath2-tests
======================

Provides a harness to test XPath 2.0 statement execution library for PHP using the XQTS 1.0.3 conformance test suite

081PHP

Since May 4Pushed 4y ago1 watchersCompare

[ Source](https://github.com/bseddon/XPath20-tests)[ Packagist](https://packagist.org/packages/lyquidity/xpath2-tests)[ RSS](/packages/lyquidity-xpath2-tests/feed)WikiDiscussions develop Synced today

READMEChangelogDependenciesVersions (2)Used By (0)

Conformance testing for the XPath 2.0 processor for PHP project
===============================================================

[](#conformance-testing-for-the-xpath-20-processor-for-php-project)

**Table of contents**

- [About the project](#about-the-project)
- [Status](#status)
- [License](#license)
- [Contributing](#contributing)
- [Install](#install)
- [Getting started](#getting-started)

About the project
-----------------

[](#about-the-project)

This project provides a test harness to run the conformance suite test defined for XPath 2.0 in [XQTS 1.0.3 2010-09-17](https://dev.w3.org/2006/xquery-test-suite/PublicPagesStagingArea/XQTS_1_0_3.zip).

The [XPath 2.0](https://github.com/bseddon/XPath20) library implements the [XPath 2.0 specification](https://www.w3.org/TR/xpath20/) for PHP and is able to pass the 9,000 or so [XPath 2.0 conformance suite tests](https://dev.w3.org/2006/xquery-test-suite/PublicPagesStagingArea/).

Status
------

[](#status)

[![XPath 2.0 conformance](https://camo.githubusercontent.com/3cf4f307077502ebdd09e5662c52469b6f4cebe8a3d0b8e8a33fc3da53f84622/68747470733a2f2f7777772e7862726c71756572792e636f6d2f74657374732f7374617475732e7068703f746573743d636f6e666f726d616e63655f7870617468323026783d79 "XPath 2.0 conformance suite tests")](https://camo.githubusercontent.com/3cf4f307077502ebdd09e5662c52469b6f4cebe8a3d0b8e8a33fc3da53f84622/68747470733a2f2f7777772e7862726c71756572792e636f6d2f74657374732f7374617475732e7068703f746573743d636f6e666f726d616e63655f7870617468323026783d79)

The conformance suite used is [XQTS 1.0.3 2010-09-17](https://dev.w3.org/2006/xquery-test-suite/PublicPagesStagingArea/XQTS_1_0_3.zip). Not all the tests defined by the suite are used because many test XQuery. Instead the tests used are the ones in the test case documents that declare an attribute @is-XPath2 with a value of 'true'. There are about 9,000 such tests.

### Dependencies

[](#dependencies)

This project depends on [lyquidity/XPath20](https://github.com/bseddon/XPath20) and on the [XQTS 1.0.3 2010-09-17](https://dev.w3.org/2006/xquery-test-suite/PublicPagesStagingArea/XQTS_1_0_3.zip) zip file.

License
-------

[](#license)

This project is released under [GPL version 3.0](LICENCE)

**What does this mean?**

It means you can use the source code in any way you see fit. However, the source code for any changes you make must be made available to others and must be made available on the same terms as you receive the source code in this project: under a GPL v3.0 license. You must include the license of this project with any distribution of the source code whether the distribution includes all the source code or just part of it. For example, if you create a class that derives from one of the classes provided by this project - a new taxonomy class, perhaps - that is derivative.

**What does this not mean?**

It does *not* mean that any products you create that only *use* this source code must be released under GPL v3.0. If you create a budgeting application that uses the source code from this project to access data in instance documents, used by the budgeting application to transfer data, that is not derivative.

Contributing
------------

[](#contributing)

We welcome contributions. See our [contributions page](https://gist.github.com/bseddon/cfe04753192087c82766bee583f519aa) for more information. If you do choose to contribute we will ask you to agree to our [Contributor License Agreement (CLA)](https://gist.github.com/bseddon/cfe04753192087c82766bee583f519aa). We will ask you to agree to the terms in the CLA to assure other users that the code they use is not going to be encumbered by a labyrinth of different license and patent liabilities. You are also urged to review our [code of conduct](CODE_OF_CONDUCT.md).

Install
-------

[](#install)

The project can be installed by [composer](https://getcomposer.org/). First make sure the [XPath 2.0](https;//github.com/bseddon/XPath20) project is installed. Assuming Composer is installed and a shortcut to the program is called 'composer' then the command to install this project is:

```
composer require lyquidity/xpath2-tests:dev-master --prefer-dist

```

Or fork or download the repository. It will also be necessary to download and install the [XML](https://github.com/bseddon/XPath20) project.

You will then need to download the [XQTS 1.0.3 2010-09-17](https://dev.w3.org/2006/xquery-test-suite/PublicPagesStagingArea/XQTS_1_0_3.zip) zip file and unzip it to some location. In your application you will also need to add a define called 'CONFORMANCE\_SUITE\_BASE' and give it a value which is the location you used to unzip the conformance test suite zip file.

Getting started
---------------

[](#getting-started)

Assuming you have installed the library using composer then this PHP application will run the tests:

```
