Skip to content

Commit

Permalink
Merge pull request #3 from xproc/master
Browse files Browse the repository at this point in the history
catch up with xproc repo
  • Loading branch information
gimsieke authored Jul 31, 2019
2 parents de0033b + a672249 commit a816ad1
Show file tree
Hide file tree
Showing 51 changed files with 1,025 additions and 1,096 deletions.
3 changes: 2 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
dist: trusty
dist: xenial
language: java
jdk: openjdk12
install: true
script: ./gradlew --stacktrace

Expand Down
108 changes: 28 additions & 80 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ buildscript {
classpath group: 'org.docbook', name: 'docbook-schemas', version: '5.1-1'
classpath group: 'com.xmlcalabash', name: 'xmlcalabash1-print', version: '1.1.5'
classpath group: 'com.xmlcalabash', name: 'xmlcalabash1-gradle', version: '1.3.5'
classpath group: 'com.xmlcalabash', name: 'xmlcalabash', version: '1.1.23-98'
classpath group: 'org.xmlresolver', name: 'xmlresolver', version: '0.13.2'
classpath group: 'com.xmlcalabash', name: 'xmlcalabash', version: '1.1.27-99'
classpath group: 'org.xmlresolver', name: 'xmlresolver', version: '1.0.1'
}
}

Expand Down Expand Up @@ -81,7 +81,7 @@ def getenv(String name) {
}

def deltaxml() {
def dxml = new File("deltaxml")
def dxml = file("deltaxml")
if (dxml.exists() && dxml.isDirectory()) {
return "diff"
} else {
Expand All @@ -99,7 +99,7 @@ task make_etc() {
}

[ "steps", "step-file", "step-os", "step-paged-media",
"step-run", "step-text", "step-validation", "step-json" ].each { spec ->
"step-run", "step-text", "step-validation" ].each { spec ->
Task t = task "copy_${spec}_build"(dependsOn: [ "buildspecs" ], type: Copy) {
from "$spec/build/"
exclude "xinclude.xml", "examples/**", "graphics/**", "glossary.xml"
Expand All @@ -118,15 +118,15 @@ task xproc_schemas(dependsOn: [ "download_core30" ]) {

task download_core30(type: Download) {
src "$schemaBaseUri/core30.rng"
dest new File(buildDir, "core30.rng")
dest file("build/core30.rng")
}
download_core30.onlyIf { !file("$buildDir/core30.rng").exists() }

[ "rnc", "rng" ].each { ext ->
["xproc", "xproc10", "xproc30"].each { base ->
Task t = task "download_${base}_${ext}"(type: Download) {
src "$schemaBaseUri/$base.$ext"
dest new File(buildDir, "$base.$ext")
dest file("build/$base.$ext")
}
t.onlyIf { ! file("$buildDir/$base.$ext").exists () }
xproc_schemas.dependsOn t
Expand All @@ -139,7 +139,7 @@ download_core30.onlyIf { !file("$buildDir/core30.rng").exists() }

task download_xproc_toc(type: Download) {
src xprocTocUri
dest new File(buildDir, xprocToc)
dest file("build/$xprocToc")
}
download_xproc_toc.onlyIf { !file("$buildDir/$xprocToc").exists() }

Expand Down Expand Up @@ -184,7 +184,7 @@ task steps(dependsOn: [ "xproc_schemas", "spec_schemas",
input("source", "steps/build/source.xml")
output("result", "build/dist/steps/index.html")

param("schemaext.schema", new File("build/schema/dbspec.rng"))
param("schemaext.schema", file("build/schema/dbspec.rng"))
param("travis", getenv("TRAVIS"))
param("travis-commit", getenv("TRAVIS_COMMIT"))
param("travis-build-number", getenv("TRAVIS_BUILD_NUMBER"))
Expand All @@ -193,10 +193,10 @@ task steps(dependsOn: [ "xproc_schemas", "spec_schemas",
param("travis-branch", getenv("TRAVIS_BRANCH"))
param("travis-tag", getenv("TRAVIS_TAG"))

option("style", new File("tools/xsl/xproc-specs.xsl"))
option("style", file("tools/xsl/xproc-specs.xsl"))
option("diff", deltaxml())
option("specid", "steps")
option("diffloc", new File("build/dist/steps/diff.html").getAbsolutePath())
//option("diffloc", file("build/dist/steps/diff.html"))

pipeline "tools/xpl/formatspec.xpl"
}
Expand Down Expand Up @@ -236,7 +236,7 @@ task step_validation(type: DocBookTask,
input("source", "step-validation/build/source.xml")
output("result", "build/dist/validation/index.html")

param("schemaext.schema", new File("build/schema/dbspec.rng"))
param("schemaext.schema", file("build/schema/dbspec.rng"))
param("travis", getenv("TRAVIS"))
param("travis-commit", getenv("TRAVIS_COMMIT"))
param("travis-build-number", getenv("TRAVIS_BUILD_NUMBER"))
Expand All @@ -245,10 +245,10 @@ task step_validation(type: DocBookTask,
param("travis-branch", getenv("TRAVIS_BRANCH"))
param("travis-tag", getenv("TRAVIS_TAG"))

option("style", new File("tools/xsl/xproc-specs.xsl"))
option("style", file("tools/xsl/xproc-specs.xsl"))
option("diff", deltaxml())
option("specid", "validation")
option("diffloc", new File("build/dist/validation/diff.html").getAbsolutePath())
//option("diffloc", file("build/dist/validation/diff.html"))

pipeline "tools/xpl/formatspec.xpl"
}
Expand Down Expand Up @@ -288,7 +288,7 @@ task step_os(type: DocBookTask,
input("source", "step-os/build/source.xml")
output("result", "build/dist/os/index.html")

param("schemaext.schema", new File("build/schema/dbspec.rng"))
param("schemaext.schema", file("build/schema/dbspec.rng"))
param("travis", getenv("TRAVIS"))
param("travis-commit", getenv("TRAVIS_COMMIT"))
param("travis-build-number", getenv("TRAVIS_BUILD_NUMBER"))
Expand All @@ -297,10 +297,10 @@ task step_os(type: DocBookTask,
param("travis-branch", getenv("TRAVIS_BRANCH"))
param("travis-tag", getenv("TRAVIS_TAG"))

option("style", new File("tools/xsl/xproc-specs.xsl"))
option("style", file("tools/xsl/xproc-specs.xsl"))
option("diff", deltaxml())
option("specid", "os")
option("diffloc", new File("build/dist/os/diff.html").getAbsolutePath())
//option("diffloc", file("build/dist/os/diff.html"))

pipeline "tools/xpl/formatspec.xpl"
}
Expand All @@ -325,58 +325,6 @@ task step_os_xpl(dependsOn: ["step-os:library"], type: Copy) {
rename ("library.xml", "steps.xpl")
}

// ======================================================================
// step-json

task step_json(type: DocBookTask,
dependsOn: [ "download_xproc_toc",
"steps", "xproc_schemas", "spec_schemas",
"step-json:specification",
"step_json_assets",
"step_json_src", "step_json_xpl" ]) {
inputs.files fileTree(dir: "tools/xsl/")
inputs.files fileTree(dir: "tools/xpl/")
inputs.file "build/xproc_toc.xml"
input("source", "step-json/build/source.xml")
output("result", "build/dist/json/index.html")

param("schemaext.schema", new File("build/schema/dbspec.rng"))
param("travis", getenv("TRAVIS"))
param("travis-commit", getenv("TRAVIS_COMMIT"))
param("travis-build-number", getenv("TRAVIS_BUILD_NUMBER"))
param("travis-user", getenv("TRAVIS_USER"))
param("travis-repo", getenv("TRAVIS_REPO"))
param("travis-branch", getenv("TRAVIS_BRANCH"))
param("travis-tag", getenv("TRAVIS_TAG"))

option("style", new File("tools/xsl/xproc-specs.xsl"))
option("diff", deltaxml())
option("specid", "json")
option("diffloc", new File("build/dist/json/diff.html").getAbsolutePath())

pipeline "tools/xpl/formatspec.xpl"
}
buildspecs.dependsOn "step_json"

task step_json_assets(type: Copy) {
from "src/main/resources"
into "build/dist/json/"
}

task step_json_src(dependsOn: ["step-json:source"], type: Copy) {
from "step-json/build/"
into "build/dist/json/"
include "source.xml"
rename ("source.xml", "specification.xml")
}

task step_json_xpl(dependsOn: ["step-json:library"], type: Copy) {
from "step-json/build/"
into "build/dist/json/"
include "library.xml"
rename ("library.xml", "steps.xpl")
}

// ======================================================================
// step-run

Expand All @@ -392,7 +340,7 @@ task step_run(type: DocBookTask,
input("source", "step-run/build/source.xml")
output("result", "build/dist/run/index.html")

param("schemaext.schema", new File("build/schema/dbspec.rng"))
param("schemaext.schema", file("build/schema/dbspec.rng"))
param("travis", getenv("TRAVIS"))
param("travis-commit", getenv("TRAVIS_COMMIT"))
param("travis-build-number", getenv("TRAVIS_BUILD_NUMBER"))
Expand All @@ -401,10 +349,10 @@ task step_run(type: DocBookTask,
param("travis-branch", getenv("TRAVIS_BRANCH"))
param("travis-tag", getenv("TRAVIS_TAG"))

option("style", new File("tools/xsl/xproc-specs.xsl"))
option("style", file("tools/xsl/xproc-specs.xsl"))
option("diff", deltaxml())
option("specid", "run")
option("diffloc", new File("build/dist/run/diff.html").getAbsolutePath())
//option("diffloc", file("build/dist/run/diff.html"))

pipeline "tools/xpl/formatspec.xpl"
}
Expand Down Expand Up @@ -444,7 +392,7 @@ task step_paged_media(type: DocBookTask,
input("source", "step-paged-media/build/source.xml")
output("result", "build/dist/paged-media/index.html")

param("schemaext.schema", new File("build/schema/dbspec.rng"))
param("schemaext.schema", file("build/schema/dbspec.rng"))
param("travis", getenv("TRAVIS"))
param("travis-commit", getenv("TRAVIS_COMMIT"))
param("travis-build-number", getenv("TRAVIS_BUILD_NUMBER"))
Expand All @@ -453,10 +401,10 @@ task step_paged_media(type: DocBookTask,
param("travis-branch", getenv("TRAVIS_BRANCH"))
param("travis-tag", getenv("TRAVIS_TAG"))

option("style", new File("tools/xsl/xproc-specs.xsl"))
option("style", file("tools/xsl/xproc-specs.xsl"))
option("diff", deltaxml())
option("specid", "paged-media")
option("diffloc", new File("build/dist/paged-media/diff.html").getAbsolutePath())
//option("diffloc", file("build/dist/paged-media/diff.html"))

pipeline "tools/xpl/formatspec.xpl"
}
Expand Down Expand Up @@ -496,7 +444,7 @@ task step_file(type: DocBookTask,
input("source", "step-file/build/source.xml")
output("result", "build/dist/file/index.html")

param("schemaext.schema", new File("build/schema/dbspec.rng"))
param("schemaext.schema", file("build/schema/dbspec.rng"))
param("travis", getenv("TRAVIS"))
param("travis-commit", getenv("TRAVIS_COMMIT"))
param("travis-build-number", getenv("TRAVIS_BUILD_NUMBER"))
Expand All @@ -505,10 +453,10 @@ task step_file(type: DocBookTask,
param("travis-branch", getenv("TRAVIS_BRANCH"))
param("travis-tag", getenv("TRAVIS_TAG"))

option("style", new File("tools/xsl/xproc-specs.xsl"))
option("style", file("tools/xsl/xproc-specs.xsl"))
option("diff", deltaxml())
option("specid", "file")
option("diffloc", new File("build/dist/file/diff.html").getAbsolutePath())
//option("diffloc", file("build/dist/file/diff.html"))

pipeline "tools/xpl/formatspec.xpl"
}
Expand Down Expand Up @@ -548,7 +496,7 @@ task step_text(type: DocBookTask,
input("source", "step-text/build/source.xml")
output("result", "build/dist/text/index.html")

param("schemaext.schema", new File("build/schema/dbspec.rng"))
param("schemaext.schema", file("build/schema/dbspec.rng"))
param("travis", getenv("TRAVIS"))
param("travis-commit", getenv("TRAVIS_COMMIT"))
param("travis-build-number", getenv("TRAVIS_BUILD_NUMBER"))
Expand All @@ -557,10 +505,10 @@ task step_text(type: DocBookTask,
param("travis-branch", getenv("TRAVIS_BRANCH"))
param("travis-tag", getenv("TRAVIS_TAG"))

option("style", new File("tools/xsl/xproc-specs.xsl"))
option("style", file("tools/xsl/xproc-specs.xsl"))
option("diff", deltaxml())
option("specid", "text")
option("diffloc", new File("build/dist/text/diff.html").getAbsolutePath())
//option("diffloc", file("build/dist/text/diff.html"))

pipeline "tools/xpl/formatspec.xpl"
}
Expand Down
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-4.9-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-5.4.1-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
14 changes: 13 additions & 1 deletion src/main/schema/core30.rnc
Original file line number Diff line number Diff line change
Expand Up @@ -818,6 +818,8 @@ VocabParamSet =
VocabDirectory =
element c:directory {
attribute name { text },
xmlbase.attr,
file-info.attributes*,
((VocabFile|VocabDirectory|VocabOther)*)
}
[
Expand All @@ -826,7 +828,8 @@ VocabDirectory =
VocabFile =
element c:file {
attribute name { text },
content-types.attr?,
xmlbase.attr,
file-info.attributes*,
empty
}
[
Expand All @@ -835,8 +838,17 @@ VocabFile =
VocabOther =
element c:other {
attribute name { text },
xmlbase.attr,
file-info.attributes*,
empty
}
file-info.attributes = size.attr | readable.attr | writable.attr | last-modified.attr | hidden.attr
size.attr = attribute size { xsd:integer }
readable.attr = attribute readable { xsd:boolean }
writable.attr = attribute writable { xsd:boolean }
hidden.attr = attribute hidden { xsd:boolean }
last-modified.attr = attribute last-modified { xsd:dateTime }

[
sa:class = "step-vocabulary"
]
Expand Down
17 changes: 17 additions & 0 deletions src/main/xml/bibliography.xml
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,17 @@ Anders Berglund, editor. W3C Recommendation. 5 December 2006.</bibliomixed>
Query Language</citetitle>. Scott Boag, Don Chamberlin, Mary Fernández, et. al.,
editors. W3C Recommendation. 23 January 2007.</bibliomixed>

<bibliomixed xml:id="xvrl"><abbrev>XVRL</abbrev><citetitle xlink:href="http://spec.xproc.org/xvrl/">Extensible
Validation Reporting Language</citetitle>
2019.
</bibliomixed>

<bibliomixed xml:id="iso19757-4"><abbrev>NVDL</abbrev>ISO/IEC JTC 1/SC 34.
<citetitle>ISO/IEC 19757-4:2006(E) Document Schema Definition
Languages (DSDL) — Part 4: Namespace-based Validation Dispatching Language (NVDL)</citetitle>
2006.
</bibliomixed>

<bibliomixed xml:id="iso19757-2"><abbrev>RELAX NG</abbrev>ISO/IEC JTC 1/SC 34.
<citetitle xlink:href="http://www.iso.org/iso/iso_catalogue/catalogue_tc/catalogue_detail.htm?csnumber=52348">ISO/IEC 19757-2:2008(E)
Document Schema Definition Language (DSDL) -- Part 2:
Expand Down Expand Up @@ -164,6 +175,12 @@ OASIS Committee Specification.
Languages (DSDL) — Part 3: Rule-based validation — Schematron</citetitle>
2016.
</bibliomixed>

<bibliomixed xml:id="schematron-skeleton"><abbrev>Schematron Skeleton</abbrev>
<citetitle xlink:href="http://schematron.com/front-page/the-schematron-skeleton-implementation/">Schematron
“Skeleton” Implementation</citetitle>
2017.
</bibliomixed>

<bibliomixed xml:id="xmlschema-1"><abbrev>W3C XML Schema: Part 1</abbrev>
<citetitle xlink:href="http://www.w3.org/TR/xmlschema-1/">XML Schema Part 1:
Expand Down
Loading

0 comments on commit a816ad1

Please sign in to comment.