Skip to content

Commit

Permalink
Lots of hacking to divide the XProc spec into two documents
Browse files Browse the repository at this point in the history
  • Loading branch information
ndw committed Nov 9, 2014
1 parent 847f299 commit f7ce232
Show file tree
Hide file tree
Showing 92 changed files with 229 additions and 10,312 deletions.
92 changes: 49 additions & 43 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,45 +1,51 @@
build/
langspec/,*
langspec/error-list.xml
langspec/examples/choose.txt
langspec/examples/exclude-pfx.txt
langspec/examples/exec-as1.txt
langspec/examples/exec-as2.txt
langspec/examples/file.txt
langspec/examples/filebin.txt
langspec/examples/for-each.txt
langspec/examples/group.txt
langspec/examples/identity.txt
langspec/examples/input-doc.txt
langspec/examples/input-port.txt
langspec/examples/input-select.txt
langspec/examples/pipeline-library.txt
langspec/examples/pipeline.txt
langspec/examples/simple-default.txt
langspec/examples/simple-explicit.txt
langspec/examples/trycatch.txt
langspec/examples/value-available.txt
langspec/examples/viewport.txt
langspec/examples/xinclude.txt
langspec/examples/xpathcontext.txt
langspec/examples/xquery.txt
langspec/examples/xslt-empty.txt
langspec/examples/xslt.txt
langspec/langspec.html
langspec/changelog.html
langspec/diff.html
langspec/ns-c/,*
langspec/ns-c/ns-xproc-c-incl.xml
langspec/ns-c/xproc-step.html
langspec/ns-err/,*
langspec/ns-err/error-list.xml
langspec/ns-err/tmpl-error-list.xml
langspec/ns-err/xproc-error.html
langspec/ns-p/,*
langspec/ns-p/ns-tmpl-p-incl.xml
langspec/ns-p/ns-xproc-p-incl.xml
langspec/ns-p/xproc.html
langspec/pipeline-library.xml
/build/

Overview.html
,*

langspec/xproc20/error-list.xml
langspec/xproc20/changelog.html
langspec/xproc20/diff.html
langspec/xproc20/pipeline-library.xml
langspec/xproc20/typed-pipeline-library.xml
langspec/xproc20/examples/choose.txt
langspec/xproc20/examples/exclude-pfx.txt
langspec/xproc20/examples/file.txt
langspec/xproc20/examples/filebin.txt
langspec/xproc20/examples/for-each.txt
langspec/xproc20/examples/group.txt
langspec/xproc20/examples/identity.txt
langspec/xproc20/examples/input-doc.txt
langspec/xproc20/examples/input-port.txt
langspec/xproc20/examples/input-select.txt
langspec/xproc20/examples/pipeline-library.txt
langspec/xproc20/examples/pipeline.txt
langspec/xproc20/examples/simple-default.txt
langspec/xproc20/examples/simple-explicit.txt
langspec/xproc20/examples/trycatch.txt
langspec/xproc20/examples/value-available.txt
langspec/xproc20/examples/viewport.txt
langspec/xproc20/examples/xinclude.txt
langspec/xproc20/examples/xpathcontext.txt
langspec/xproc20/examples/xslt-empty.txt
langspec/xproc20/examples/xslt.txt

langspec/xproc20-steps/changelog.html
langspec/xproc20-steps/diff.html
langspec/xproc20-steps/error-list.xml
langspec/xproc20-steps/examples/exec-as1.txt
langspec/xproc20-steps/examples/exec-as2.txt
langspec/xproc20-steps/examples/xquery.txt

langspec/ns-c/ns-xproc-c-incl-1.xml
langspec/ns-c/ns-xproc-c-incl-2.xml

langspec/ns-err/error-list-1.xml
langspec/ns-err/error-list-2.xml

langspec/ns-p/ns-xproc-p-incl-1.xml
langspec/ns-p/ns-xproc-p-incl-2.xml

langspec/schemas/steps.rnc
langspec/schemas/steps.rng
langspec/schemas/xproc.dtd
Expand All @@ -48,5 +54,5 @@ langspec/schemas/xproc.xsd
langspec/schemas/xproc_dtd_2.ent
langspec/schemas/xproc_dtd_4.ent
langspec/schemas/xproc_xsd_2.frag
langspec/typed-pipeline-library.xml

schema/*.rng
1 change: 0 additions & 1 deletion .travis/publish-spec.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ if [ "$TRAVIS_REPO_SLUG" == "$GIT_PUB_REPO" ]; then
echo -e "Setting up for publication...\n"

cp -R build/langspec $HOME/langspec
mv $HOME/langspec/Overview.html $HOME/langspec/index.html

cd $HOME
git config --global user.email ${GIT_EMAIL}
Expand Down
81 changes: 80 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,10 +1,84 @@
STYLES=$(wildcard style/*.xsl)

all: xproc20 req

xproc20:
$(MAKE) -C schema
$(MAKE) -C langspec
mkdir -p build/langspec/xproc20
mkdir -p build/langspec/xproc20-steps
mkdir -p build/langspec/ns-p
mkdir -p build/langspec/ns-c
mkdir -p build/langspec/ns-err
curl -s -o build/langspec/xproc20/base.css http://www.w3.org/StyleSheets/TR/base.css
cp langspec/xproc20/Overview.html build/langspec/xproc20/
cp langspec/xproc20/,xproc20.xml build/langspec/xproc20/xproc20.xml
cp langspec/xproc20/changelog.xml build/langspec/xproc20/
cp langspec/xproc20/changelog.html build/langspec/xproc20/
cp langspec/xproc20/.htaccess build/langspec/xproc20/
cd langspec/xproc20 && tar cf - graphics \
| (cd ../../build/langspec/xproc20; tar xf -)
cp style/xproc.css build/langspec/xproc20/
@echo ==================================================
cp build/langspec/xproc20/base.css build/langspec/xproc20-steps/
cp langspec/xproc20-steps/Overview.html build/langspec/xproc20-steps/
cp langspec/xproc20-steps/,steps.xml build/langspec/xproc20-steps/xproc20-steps.xml
cp langspec/xproc20-steps/changelog.xml build/langspec/xproc20-steps/
cp langspec/xproc20-steps/changelog.html build/langspec/xproc20-steps/
cp langspec/xproc20-steps/.htaccess build/langspec/xproc20-steps/
cp style/xproc.css build/langspec/xproc20-steps/

xxx:
cp langspec/ns-p/xproc.html build/xproc20/ns/
cp langspec/ns-c/xproc-step.html build/xproc20/ns/
cp langspec/ns-err/xproc-error.html build/xproc20/ns/
cp style/xproc.css build/xproc20/ns/
cp js/prism.js build/xproc20/
cp js/prism.js build/xproc20/ns/
cp build/xproc20/base.css build/xproc20/ns/
cp langspec/ns-p/xproc.html build/xproc20/ns/
cp langspec/ns-p/,xproc.xml build/xproc20/ns/xproc.xml
cp langspec/ns-c/xproc-step.html build/xproc20/ns/
cp langspec/ns-c/,xproc-step.xml build/xproc20/ns/xproc-step.xml
cp langspec/ns-err/xproc-error.html build/xproc20/ns/
cp langspec/ns-err/,xproc-error.xml build/xproc20/ns/xproc-error.xml
cp langspec/schemas/xproc.rng build/xproc20/schemas/
cp langspec/schemas/xproc.rnc build/xproc20/schemas/
cp langspec/schemas/xproc.xsd build/xproc20/schemas/
cp langspec/schemas/xproc.dtd build/xproc20/schemas/



spec: build/langspec/Overview.html

req: build/langreq/Overview.html

all: spec req

build/xproc20/Overview.html: langspec/xproc20.html
cp langspec/xproc20.html build/xproc20/
mv build/xproc20/xproc20.html $@
cp langspec/,xproc20.xml build/xproc20/xproc20.xml
cp langspec/changelog.xml build/xproc20/
cd langspec && tar cf - graphics | (cd ../build/xproc20; tar xf -)
cp langspec/ns-p/xproc.html build/xproc20/ns/
cp langspec/ns-c/xproc-step.html build/xproc20/ns/
cp langspec/ns-err/xproc-error.html build/xproc20/ns/
cp style/xproc.css build/xproc20/
cp style/xproc.css build/xproc20/ns/
cp js/prism.js build/xproc20/
cp js/prism.js build/xproc20/ns/
curl -s -o build/xproc20/base.css http://www.w3.org/StyleSheets/TR/base.css
cp build/xproc20/base.css build/xproc20/ns/
cp langspec/ns-p/xproc.html build/xproc20/ns/
cp langspec/ns-p/,xproc.xml build/xproc20/ns/xproc.xml
cp langspec/ns-c/xproc-step.html build/xproc20/ns/
cp langspec/ns-c/,xproc-step.xml build/xproc20/ns/xproc-step.xml
cp langspec/ns-err/xproc-error.html build/xproc20/ns/
cp langspec/ns-err/,xproc-error.xml build/xproc20/ns/xproc-error.xml
cp langspec/schemas/xproc.rng build/xproc20/schemas/
cp langspec/schemas/xproc.rnc build/xproc20/schemas/
cp langspec/schemas/xproc.xsd build/xproc20/schemas/
cp langspec/schemas/xproc.dtd build/xproc20/schemas/

build/langspec/Overview.html: langspec/langspec.html
cp langspec/*.html build/langspec/
Expand Down Expand Up @@ -47,6 +121,11 @@ LANGSPECSRC=langspec/conformance.xml langspec/error-codes.xml \
langspec/serialization-options-for-escape-markup.xml \
langspec/serialization-options.xml langspec/standard-components.xml

langspec/xproc20.html: $(LANGSPECSRC) $(STYLES)
mkdir -p build/xproc20 build/xproc20/schemas build/xproc20/ns
$(MAKE) -C schema
$(MAKE) -C langspec

langspec/langspec.html: $(LANGSPECSRC) $(STYLES)
mkdir -p build/langspec build/langspec/schemas build/langspec/ns
$(MAKE) -C schema
Expand Down
55 changes: 8 additions & 47 deletions langspec/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -5,59 +5,20 @@ CLASSPATH=$(subst $(space),:,$(wildcard ../lib/*.jar)):../lib
SAXON=java -cp $(CLASSPATH) -jar ../lib/saxon9he.jar
CALABASH=java -cp $(CLASSPATH) com.xmlcalabash.drivers.Main -c ../.calabash

TARGETS=langspec.html changelog.html diff.html error-list.xml \
pipeline-library.xml typed-pipeline-library.xml

all: $(TARGETS)
all:
$(MAKE) -C xproc20 ,xproc20.xml
$(MAKE) -C xproc20-steps ,steps.xml typed-pipeline-library.xml
$(MAKE) -C schemas
$(MAKE) -C xproc20
$(MAKE) -C xproc20-steps
$(MAKE) -C ns-p
$(MAKE) -C ns-c
$(MAKE) -C ns-err

diff.html: langspec.html
../lib/make-diff.sh

langspec.html: ,langspec.xml typed-pipeline-library.xml \
../style/docbook.xsl ../style/dbspec.xsl \
../style/xprocns.xsl ../style/rngsyntax.xsl
@echo Format spec: $@
@$(CALABASH) -isource=$< -oresult=$@ \
-pschemaext.schema=../../../../../schema/dbspec.rng \
../style/formatspec.xpl

changelog.html: changelog.xml
@echo Format changelog
@$(CALABASH) -isource=$< -oresult=$@ ../style/formatspec.xpl

,langspec.xml: langspec.xml conformance.xml error-codes.xml glossary.xml \
language-summary.xml mediatype.xml namespace-fixup.xml \
parallel.xml references.xml \
serialization-options-for-escape-markup.xml \
serialization-options.xml serialization-options.xml \
serialization-options.xml standard-components.xml
$(MAKE) -C examples
@echo Validate spec: $<
@$(CALABASH) -isource=$< -oresult=$@ \
../style/validate.xpl \
schema=../schema/dbspec.rng \
schematron=../schema/docbook.sch

error-list.xml: ,langspec.xml
@echo Extract error list: $@
@$(SAXON) -s:$< -xsl:../style/error-list.xsl -o:$@

pipeline-library.xml: ,langspec.xml
@echo Extract pipeline library: $@
@$(SAXON) -s:$< -xsl:../style/pipeline-library.xsl -o:$@

typed-pipeline-library.xml: ,langspec.xml
@echo Extract typed pipeline library: $@
@$(SAXON) -s:$< -xsl:../style/typed-pipeline-library.xsl -o:$@
@$(MAKE) -C schemas

clean:
rm -f $(TARGETS) ,langspec.xml
$(MAKE) -C xproc20 clean
$(MAKE) -C xproc20-steps clean
$(MAKE) -C schemas clean
$(MAKE) -C examples clean
$(MAKE) -C ns-c clean
$(MAKE) -C ns-err clean
$(MAKE) -C ns-p clean
100 changes: 0 additions & 100 deletions langspec/changelog.xml

This file was deleted.

Loading

0 comments on commit f7ce232

Please sign in to comment.