Skip to content
This repository has been archived by the owner on Mar 10, 2021. It is now read-only.

Commit

Permalink
Begin recognising elements and attributes (#1)
Browse files Browse the repository at this point in the history
* Begin recognising elements and attributes

* Not meant

* Might be needed

* New lines

* Reduce nesting

* Ignore line numbers when we have a node

* Simpler constraints

* Move source to src

* Add to README

* Tweaks

* Make warnings

* Update attributes
  • Loading branch information
thewilkybarkid authored Mar 6, 2019
1 parent d1531f2 commit 7b680e2
Show file tree
Hide file tree
Showing 288 changed files with 5,596 additions and 0 deletions.
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
/*.* export-ignore
/tests export-ignore
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
/.phpcs-cache
/phpcs.xml
/phpstan.neon
/phpunit.xml
/vendor/
42 changes: 42 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
language: php

php: 7.3

before_install:
- phpenv config-rm xdebug.ini || true

install:
- travis_retry composer install --classmap-authoritative --no-suggest --prefer-dist

jobs:
include:

- stage: Test
name: Tests
script:
- vendor/bin/phpunit

- stage: Code Quality
name: Coding standards
script:
- vendor/bin/phpcs -p

- stage: Code Quality
name: Static analysis
script:
- vendor/bin/phpstan analyse

stages:
- Test
- name: Code Quality
if: type = pull_request

cache:
directories:
- $HOME/.composer/cache/files

if: |
branch = master OR \
branch =~ /^(?:[0-9]|[1-9][0-9]*)\.(?:[0-9]|[1-9][0-9]*)$/ OR \
tag IS present OR \
type = pull_request
17 changes: 17 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,23 @@
Libero JATS support
===================

[![Build Status](https://travis-ci.com/libero/jats-support.svg?branch=master)](https://travis-ci.com/libero/jats-support)

The library contains [Schematron](http://schematron.com/) that can be applied to any [Journal Article Tag Suite
(JATS)](https://jats.nlm.nih.gov/) document to check for native support in [Libero](https://libero.pub).

It uses [XSLT 1.0](https://www.w3.org/TR/1999/REC-xslt-19991116) so that it is compatible with
[libxslt](http://xmlsoft.org/XSLT/intro.html), and so natively supported by languages such as PHP and Python.

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

Apply [`src/support.sch`](src/support.sch) to your document, using, for example:

- [Oxygen XML Editor](https://www.oxygenxml.com/demo/Schematron_Validation.html)
- [XML Validator library](https://github.com/libero/xml-validator) (PHP)
- [lxml](https://lxml.de/validation.html#id2) (Python)

Getting help
------------

Expand Down
43 changes: 43 additions & 0 deletions composer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
{
"type": "project",
"license": "MIT",
"autoload-dev": {
"psr-4": {
"tests\\Libero\\JatsSupport\\": "tests/"
}
},
"require-dev": {
"php": "^7.3",
"ext-dom": "*",
"ext-xsl": "*",
"fluentdom/fluentdom": "^7.1",
"jats/schema": "^1.1",
"libero/coding-standard": "^0.4",
"libero/xml-validator": "^0.2",
"lstrojny/functional-php": "^1.9",
"phpstan/phpstan": "^0.11",
"phpstan/phpstan-phpunit": "^0.11",
"phpunit/phpunit": "^8.0",
"symfony/finder": "^4.2"
},
"config": {
"platform": {
"php": "7.3.0"
},
"secure-http": false,
"sort-packages": true
},
"repositories": [
{
"type": "package",
"package": {
"name": "jats/schema",
"version": "1.1",
"dist": {
"url": "ftp://ftp.ncbi.nih.gov/pub/jats/archiving/1.1/rng/JATS-Archiving-1-1-MathML3-DTD-RNG.zip",
"type": "zip"
}
}
}
]
}
Loading

0 comments on commit 7b680e2

Please sign in to comment.