diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml
new file mode 100644
index 00000000..14d9fbf9
--- /dev/null
+++ b/.github/workflows/deploy.yml
@@ -0,0 +1,84 @@
+# Deployment to Google Compute Engine
+name: Build
+
+on:
+ push:
+ branches:
+ - master
+ - develop
+ - feature**
+
+env:
+ PROJECT_NAME: opensiddur-client
+ BACKUP_BUCKET_BASE: opensiddur-database-backups
+ ZONE: us-west2-a
+ MACHINE_TYPE: n1-standard-1
+ IMAGE_PROJECT: ubuntu-os-cloud
+ IMAGE_VERSION: ubuntu-2204
+ BOOT_DISK_SIZE_GB: 20
+ EXIST_MEMORY: 3072
+ STACK_MEMORY: 512
+ SERVICE_ACCOUNT: opensiddur-deploy-1@opensiddur-client.iam.gserviceaccount.com
+ ADMIN_PASSWORD: ${{ secrets.ADMIN_PASSWORD }}
+ DYN_USERNAME: ${{ secrets.DYN_USERNAME }}
+ DYN_PASSWORD: ${{ secrets.DYN_PASSWORD }}
+ DYN_EMAIL: ${{ secrets.DYN_EMAIL }}
+
+jobs:
+ setup-build-publish-deploy:
+ name: Setup, Build, Publish, and Deploy
+ runs-on: ubuntu-latest
+
+ steps:
+ - name: Checkout
+ uses: actions/checkout@v2
+ - name: Set calculated vars
+ id: vars
+ run: |-
+ BRANCH=${GITHUB_REF#refs/heads/}
+ INSTANCE_BASE=$(echo ${{env.PROJECT_NAME}}-${BRANCH//[.\/]/-} | tr '[:upper:]' '[:lower:]' )
+ VERSION=$(git rev-parse --short=8 ${{ github.sha }})
+ echo ::set-output name=VERSION::${VERSION}
+ echo ::set-output name=BRANCH::${BRANCH}
+ echo ::set-output name=INSTANCE_BASE::${INSTANCE_BASE}
+ echo ::set-output name=INSTANCE_NAME::${INSTANCE_BASE}-${VERSION}
+ - uses: actions/setup-java@v2
+ with:
+ java-version: '8'
+ distribution: 'temurin'
+ # Setup gcloud CLI
+ - id: auth
+ uses: google-github-actions/auth@v0
+ with:
+ credentials_json: ${{ secrets.GCP_CREDENTIALS }}
+ - name: Set up Cloud SDK
+ uses: google-github-actions/setup-gcloud@v0.3.0
+ - name: Verify gcloud CLI
+ run: gcloud info
+ - name: Install packages
+ run: sudo apt-get install libxml2-utils python3-lxml
+
+ - name: Build
+ run: |-
+ ant test
+ - name: Deploy
+ run: |-
+ gcloud compute \
+ --project=${{env.PROJECT_NAME}} instances create ${{steps.vars.outputs.INSTANCE_NAME}} \
+ --zone=${{env.ZONE}} \
+ --machine-type=${{env.MACHINE_TYPE}} \
+ --network=default \
+ --network-tier=PREMIUM \
+ --maintenance-policy=MIGRATE \
+ --scopes=https://www.googleapis.com/auth/cloud-platform \
+ --tags=http-server,https-server \
+ --image=$(gcloud compute images list --filter=${{env.IMAGE_PROJECT}} --filter=${{env.IMAGE_VERSION}} | tail -n 1 | cut -f 1 -d " ") \
+ --image-project=${{env.IMAGE_PROJECT}} \
+ --boot-disk-size=${{env.BOOT_DISK_SIZE_GB}}GB \
+ --boot-disk-type=pd-standard \
+ --boot-disk-device-name=${{steps.vars.outputs.INSTANCE_NAME}} \
+ --service-account=${{env.SERVICE_ACCOUNT}} \
+ --metadata-from-file startup-script=setup/gcloud-startup-script.sh \
+ --metadata ADMIN_PASSWORD=${{env.ADMIN_PASSWORD}},EXIST_MEMORY=${{env.EXIST_MEMORY}},STACK_MEMORY=${{env.STACK_MEMORY}},BRANCH=${{steps.vars.outputs.BRANCH}},DYN_USERNAME=${{env.DYN_USERNAME}},DYN_PASSWORD=${{env.DYN_PASSWORD}},DYN_EMAIL=${{env.DYN_EMAIL}},BACKUP_BUCKET_BASE=${{env.BACKUP_BUCKET_BASE}},enable-oslogin=true
+
+
diff --git a/.gitignore b/.gitignore
index 95d92f5b..93da8bb0 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,12 +1,6 @@
# local mods to Makefile
Makefile.local
-
-# fake svn external directories
-lib/xsltforms/
-lib/xspec/
-lib/XSLTDoc/
-lib/tei/
-lib/exist/
+local.build.properties
# generated text directory
text/wlc/
@@ -15,13 +9,17 @@ text/wlc/
/doc/
# generated schema
-schema/build
+opensiddur-server/schema/build
+
+# generated dist dir
+build/
+dist/
+dependencies/
# generated files:
-/code/common/params.xsl2
-/code/transforms/format/xhtml/muxhtml.xsl2
-/setup/setup.xql
-/setup/eXist-installer.xml
+opensiddur-server/src/common/params.xsl2
+opensiddur-server/setup/setup.xql
+opensiddur-server/setup/eXist-installer.xml
# db directory except special
db/*
@@ -36,8 +34,7 @@ __contents__.xml
# backup files
*.bak
*.bkp
-*.swp
-*.swo
+*.sw?
*.tmp
*.temp
temp/
@@ -48,6 +45,7 @@ tmp/
*.pyc
# local files project
+.pydevproject
.buildpath
.project
.settings
@@ -56,3 +54,11 @@ private-scripts/
# patch rejects
*.rej
+
+#IntelliJ
+.idea/
+*.iml
+
+# client secret file
+credentials.tar.gz
+client-secret.json
diff --git a/.gitmodules b/.gitmodules
index 68f422bc..0c2b11e3 100644
--- a/.gitmodules
+++ b/.gitmodules
@@ -1,6 +1,10 @@
-[submodule "lib/hebmorph"]
- path = lib/hebmorph
- url = git://github.com/EfraimFeinstein/HebMorph.git
-[submodule "lib/aloha"]
- path = lib/aloha
- url = https://github.com/alohaeditor/Aloha-Editor.git
+[submodule "lib/tei/Roma"]
+ path = lib/tei/Roma
+ url = https://github.com/opensiddur/Roma.git
+[submodule "lib/tei/Stylesheets"]
+ path = lib/tei/Stylesheets
+ url = https://github.com/opensiddur/Stylesheets.git
+[submodule "lib/hebmorph-exist"]
+ path = lib/hebmorph-exist
+ url = https://github.com/opensiddur/hebmorph-exist.git
+ branch = 2.1.x
diff --git a/Dockerfile b/Dockerfile
new file mode 100644
index 00000000..2a6654b5
--- /dev/null
+++ b/Dockerfile
@@ -0,0 +1,29 @@
+FROM ubuntu:kinetic
+
+RUN useradd -c "eXist db" exist
+# install dependencies
+RUN apt-get update
+RUN apt-get install -y openjdk-8-jdk
+
+RUN mkdir -p /usr/local/opensiddur
+RUN chown exist:exist /usr/local/opensiddur
+
+USER exist:exist
+
+# copy the build
+COPY dependencies/exist-installer-*.jar /tmp/exist-installer.jar
+COPY setup/docker-install-options.conf /tmp/
+
+# run the installer
+RUN java -jar /tmp/exist-installer.jar -console -options /tmp/docker-install-options.conf
+COPY setup/docker-startup.sh /usr/local/opensiddur/bin/docker-startup.sh
+COPY lib/icu4j-* /usr/local/opensiddur/lib/user/
+COPY lib/hebmorph-exist/java/target/hebmorph-lucene.jar /usr/local/opensiddur/lib/user/
+COPY lib/hebmorph-exist/hspell-data-files/ /usr/local/opensiddur/etc/hspell-data-files/
+
+# copy autodeploy files
+COPY dist/opensiddur-server.xar /usr/local/opensiddur/autodeploy
+
+EXPOSE 8080 8443
+
+ENTRYPOINT /usr/local/opensiddur/bin/docker-startup.sh
diff --git a/LICENSE b/LICENSE
index 62b08b54..de2ac09c 100644
--- a/LICENSE
+++ b/LICENSE
@@ -1,11 +1,8 @@
The Open Siddur Project License file:
-All source code is stored on subversion, and may be obtained by following
-the instructions at http://jewishliturgy.googlecode.com/source/checkout
-
-The source code may be browsed directly at
-http://jewishliturgy.googlecode.com/svn/trunk
-All file and directory names in this file are relative to that path.
+All source code is stored on Github, and may be obtained by following
+the instructions at https://github.com/opensiddur/opensiddur ; source code may
+also be browsed there.
The project is distributed under the following licenses:
@@ -22,8 +19,7 @@ the rest of the project's.
See the *-LICENSE.txt and *-NOTICE.txt files and *-notices directories
in the lib/ directory for more information. It is accessible on the
-Internet at
-http://jewishliturgy.googlecode.com/svn/trunk/lib/
+Internet at https://github.com/opensiddur/opensiddur/tree/develop/lib
The BHebrew and BHebrewSR fonts are modified versions of the Ezra SIL
fonts from SIL International, and are released under the SIL Open Font License.
diff --git a/Makefile b/Makefile
deleted file mode 100755
index 933324cf..00000000
--- a/Makefile
+++ /dev/null
@@ -1,377 +0,0 @@
-# Global Makefile
-#
-# Sets up rules for building, and includes Makefiles from all targets
-#
-# Copyright 2008-2012 Efraim Feinstein
-#
-# This program is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Lesser General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU Lesser General Public License
-# along with this program. If not, see http://www.gnu.org/licenses/
-#
-#
-# Possibilities of targets:
-# all - makes code targets
-# schema - schema and schema documentation for the TEI extension (places results in doc/jlp by default)
-# odddoc - a synonym for schema
-# xsltdoc - documentation for the XSLT code (places result in doc/code)
-# dist - make a .tar.gz for distribution
-#
-# db-install - install database to $(EXIST_INSTALL_DIR)
-# db-uninstall - remove $(EXIST_INSTALL_DIR)
-# db-sync DBAPASS= - synchronize code, data, and common from the development working copy to a running database;
-# db-syncclean - clean the __contents__.xml files left by syncing the database
-#
-
-# Local changes to variables should go in Makefile.local
-# Any variable set in this file may be overridden by a setting in Makefile.local
--include Makefile.local
-
-# admin password: CHANGE IT(!) in Makefile.local
-ADMINPASSWORD ?= password
-
-# dependencies from make depend go in this file, which is generated by make depend
--include Makefile.depend
-
-# assumes the directory structure of the repository
-TOPDIR ?= .
-CODETAG ?= .
-DATATAG ?= .
-TEXTTAG ?= .
-ODDTAG ?= .
-COMMONTAG ?= .
-LIBTAG ?= .
-SETUPTAG ?= .
-
-CODEDIR ?= $(TOPDIR)/$(CODETAG)/code
-DATADIR ?= $(TOPDIR)/$(DATATAG)/data
-TEXTDIR ?= $(TOPDIR)/$(TEXTTAG)/text
-ODDDIR ?= $(TOPDIR)/$(ODDTAG)/schema
-LIBDIR ?= $(TOPDIR)/$(LIBTAG)/lib
-SETUPDIR ?= $(TOPDIR)/$(SETUPTAG)/setup
-COMMONDIR ?= $(TOPDIR)/$(COMMONTAG)/common
-DOCDIR ?= $(TOPDIR)/doc
-DBDIR ?= $(TOPDIR)/db
-TEMPDIR ?= $(TOPDIR)/tmp
-
-# java home... you will probably have to set this in Makefile.local
-JAVA_HOME ?= /usr/lib/jvm/java-6-openjdk/
-
-# everything that can be made depends on these files
-ALL_DEPEND=Makefile $(COMMONDIR)/catalog.xml
-
-# code documentation:
-# when you change this directory, you also need to change the path pointed to by
-# the TargetDirectory element in XSLTDocConfig.xml
-CODEDOCDIR ?= $(DOCDIR)/code
-# TEI extension documentation:
-TEIDOCDIR ?= $(DOCDIR)/jlp
-
-# root directory (used only for calls to Java from cygwin)
-ROOTDIR ?=
-
-# XSLT options:
-# for saxon v8.9, there are none. For version 9+, use -ext:on to allow creation of files
-XSLTLOCALOPTIONS ?=
-XSLTOPTIONS ?= -ext:on -x:org.apache.xml.resolver.tools.ResolvingXMLReader -y:org.apache.xml.resolver.tools.ResolvingXMLReader -r:org.apache.xml.resolver.tools.CatalogResolver $(XSLTLOCALOPTIONS)
-# TeXML options: -e utf8 allows utf-8 encoded input
-TEXMLOPTIONS ?= -e utf8
-# Roma options:
-# --doc makes TEI documentation,
-# --docpdf makes PDF documentation (broken!)
-# --dochtml makes HTML documentation
-ROMAOPTIONS ?= --xsl=$(LIBDIR)/tei/Stylesheets --localsource=`absolutize $(LIBDIR)/tei/P5/p5subset.xml` --doc --dochtml
-
-# XML validator options
-RELAXNGOPTIONS ?= $(TEIDOCDIR)/jlptei.rng
-
-# default eXist install directory
-EXIST_INSTALL_DIR ?= /usr/local/opensiddur
-
-# paths to programs:
-LOCALPATH ?= /usr/local
-EXIST_INSTALL_JAR ?= $(LIBDIR)/exist/installer/eXist-db-setup-2.1-dev.jar
-EXISTCLIENT ?= $(EXIST_INSTALL_DIR)/bin/client.sh
-EXISTBACKUP ?= java -Dexist.home=$(EXIST_INSTALL_DIR) -jar $(EXIST_INSTALL_DIR)/start.jar org.exist.backup.Main
-
-RESOLVERPATH ?= $(LIBDIR)/resolver-1.2.jar
-CP ?= /bin/cp
-JAVAOPTIONS ?=
-SAXONJAR ?= $(LIBDIR)/saxonhe-9.2.1.5.jar
-# CPSEP=classpath separator - : on Unix, ; on Windows
-JCLASSPATH ?= "$(RESOLVERPATH):$(SAXONJAR):$(LIBDIR)"
-SAXONCLASS ?= net.sf.saxon.Transform
-XSLT ?= java $(JAVAOPTIONS) -cp "$(JCLASSPATH)" -Dxml.catalog.files=$(LIBDIR)/catalog.xml -Dxml.catalog.verbosity=1 $(SAXONCLASS) $(XSLTOPTIONS)
-XSLTDOC ?= $(LIBDIR)/XSLTDoc/xsl/xsltdoc.xsl
-TEIROMA ?= $(LIBDIR)/tei/Roma/roma2.sh $(ROMAOPTIONS)
-RELAXNG ?= $(LIBDIR)/jing $(RELAXNGOPTIONS)
-
-# changes for Cygwin path (experimental, not necessarily maintained!)
--include Makefile.cygwin
-
-# directories for externals
-XSPECDIR = $(LIBDIR)/xspec
-XSPECREPO = http://xspec.googlecode.com/svn/trunk/
-
-XSLTFORMSDIR = $(LIBDIR)/xsltforms
-XSLTFORMSREPO = https://xsltforms.svn.sourceforge.net/svnroot/xsltforms
-XSLTFORMS_REVISION ?= -r 544
-
-XSLTDOCDIR = $(LIBDIR)/XSLTDoc
-XSLTDOCREPO = https://xsltdoc.svn.sourceforge.net/svnroot/xsltdoc/trunk/xsltdoc
-
-TEIDIR = $(LIBDIR)/tei
-TEIREPO = https://tei.svn.sourceforge.net/svnroot/tei/trunk
-
-EXISTSRCDIR = $(LIBDIR)/exist
-EXISTSRCREPO = https://exist.svn.sourceforge.net/svnroot/exist/trunk/eXist
-# lock eXist to a given revision
-EXIST_REVISION ?= -r 16647
-
-all: code input-conversion xsltdoc odddoc lib
-
-include $(TEXTDIR)/Makefile
-include $(CODEDIR)/Makefile
-include $(ODDDIR)/Makefile
-include $(LIBDIR)/Makefile
-include tests/Makefile
-
-XSLTDOC_CFGFILE ?= XSLTDocConfig.xml
-
-$(TEMPDIR):
- mkdir $(TEMPDIR)
-
-.PHONY: schema schema-clean
-schema: $(DBDIR)/schema jlptei-schema transliteration-schema contributor-schema bibliography-schema
- cp schema/build/jlptei.rnc $(DBDIR)/schema
- cp schema/build/contributor.rnc $(DBDIR)/schema
- cp schema/build/bibliography.rnc $(DBDIR)/schema
- cp schema/build/*.xsl2 $(DBDIR)/schema
- cp schema/transliteration.rnc $(DBDIR)/schema
- cp schema/access.rnc $(DBDIR)/schema
- cp schema/group.rnc $(DBDIR)/schema
-
-schema-clean: schema-build-clean
- rm -fr $(DBDIR)/schema
-
-.PHONY: clean
-clean: xsltdoc-clean schema-clean code-clean input-conversion-clean db-clean db-syncclean clean-hebmorph clean-hebmorph-lucene dist-clean-exist setup-clean
-
-$(DBDIR)/common: $(DBDIR)/code
-
-RSYNC_EXCLUDE=--exclude=.svn --exclude=~*
-
-$(DBDIR)/code: code
- #svn update $(DBDIR)
- find $(DBDIR) -name __contents__.xml | xargs rm -f
- rsync $(RSYNC_EXCLUDE) -a --delete group $(DBDIR)
- rsync $(RSYNC_EXCLUDE) -a --delete code $(DBDIR)
-
-
-$(DBDIR)/schema:
- mkdir -p $(DBDIR)/schema
-
-IZPACK:=$(shell $(LIBDIR)/absolutize $(LIBDIR)/IzPack)
-
-# build eXist (what dependencies should this have?)
-# made dependent on the Makefile because that is where the revision is set.
-# It will cause too many remakes, but better than not remaking at all
-$(EXIST_INSTALL_JAR): Makefile
- cp setup/exist-extensions-local.build.properties $(LIBDIR)/exist/extensions/local.build.properties
- cd $(LIBDIR)/exist && \
- JAVA_HOME=$(JAVA_HOME) \
- ./build.sh svn-download
- cd $(LIBDIR)/exist && \
- JAVA_HOME=$(JAVA_HOME) \
- ./build.sh installer -Dizpack.dir=$(IZPACK) -Dinclude.module.scheduler=true
-
-.PHONY: build-exist clean-exist dist-clean-exist
-build-exist: $(EXIST_INSTALL_JAR)
-
-clean-exist:
- rm -f $(EXIST_INSTALL_JAR)
-
-dist-clean-exist:
- cd $(LIBDIR)/exist && \
- JAVA_HOME=$(JAVA_HOME) \
- ./build.sh clean
-
-.PHONY: build-hebmorph build-hebmorph-lucene clean-hebmorph clean-hebmorph-lucene
-build-hebmorph: $(LIBDIR)/hebmorph/java/hebmorph/build/distribution/hebmorph.jar
-
-$(LIBDIR)/hebmorph/java/hebmorph/build/distribution/hebmorph.jar:
- cd $(LIBDIR)/hebmorph/java/hebmorph/ && \
- ant jar
-
-clean-hebmorph:
- cd $(LIBDIR)/hebmorph/java/hebmorph/ && \
- ant clean
-
-build-hebmorph-lucene: build-hebmorph $(LIBDIR)/hebmorph/java/lucene.hebrew/build/distribution/lucene.hebrew.jar
-
-$(LIBDIR)/hebmorph/java/lucene.hebrew/build/distribution/lucene.hebrew.jar:
- #cp $(LIBDIR)/exist/extensions/indexes/lucene/lucene*.jar $(LIBDIR)/hebmorph/java/lucene.hebrew/lib
- cd $(LIBDIR)/hebmorph/java/lucene.hebrew/ && ant jar
-
-clean-hebmorph-lucene:
- cd $(LIBDIR)/hebmorph/java/lucene.hebrew/ && ant clean
- rm -f $(LIBDIR)/hebmorph/java/lucene.hebrew/build/distribution/lucene.hebrew.jar
-
-# Install a copy of the eXist database
-.PHONY: db-install db-install-nonet db-install-wlc db-uninstall db-sync db-syncclean installer patches lucene-install copy-files copy-libs setup-password
-db-install: submodules svn-exist code $(EXIST_INSTALL_JAR) build-hebmorph-lucene installer patches lucene-install db setup-password copy-files copy-libs
-
-#installer that does not rely on the presence of a network.
-db-install-nonet: code $(EXIST_INSTALL_JAR) build-hebmorph-lucene installer patches lucene-install db-nonet setup-password copy-files copy-libs
- @echo "Done."
- touch $(EXIST_INSTALL_DIR)/EXIST.AUTOINSTALLED
-
-# copy libraries that are stored in the filesystem
-copy-libs:
- mkdir -p $(EXIST_INSTALL_DIR)/webapp/aloha
- cp -r $(LIBDIR)/aloha/src/* $(EXIST_INSTALL_DIR)/webapp/aloha
-
-installer: $(EXIST_INSTALL_JAR)
- $(XSLT) -s $(SETUPDIR)/eXist-installer.tmpl.xml -o $(SETUPDIR)/eXist-installer.xml $(SETUPDIR)/setup-installer.xsl2 JAVA_HOME=$(JAVA_HOME) EXIST_INSTALL_DIR=$(EXIST_INSTALL_DIR) ADMINPASSWORD=$(ADMINPASSWORD)
- java -jar $(EXIST_INSTALL_JAR) setup/eXist-installer.xml
- rm -f $(SETUPDIR)/eXist-installer.xml
-
-patches:
- $(XSLT) -s $(EXIST_INSTALL_DIR)/conf.xml -o $(EXIST_INSTALL_DIR)/conf.xml $(SETUPDIR)/setup-conf-xml.xsl2
- $(XSLT) -s $(EXIST_INSTALL_DIR)/mime-types.xml -o $(EXIST_INSTALL_DIR)/mime-types.xml $(SETUPDIR)/setup-mime-types.xsl2
- -patch -Nd $(EXIST_INSTALL_DIR)/webapp/WEB-INF < $(SETUPDIR)/controller-config.xml.patch
- -patch -Nd $(EXIST_INSTALL_DIR)/tools/jetty/etc < $(SETUPDIR)/jetty.xml.patch
-
-lucene-install: installer $(EXIST_INSTALL_DIR)/extensions/indexes/lucene/lib/lucene.hebrew.jar
-
-$(EXIST_INSTALL_DIR)/extensions/indexes/lucene/lib/lucene.hebrew.jar:
- cp $(LIBDIR)/hebmorph/java/lucene.hebrew/build/distribution/lucene.hebrew.jar $(EXIST_INSTALL_DIR)/extensions/indexes/lucene/lib
-
-copy-files:
- $(SETUPDIR)/makedb.py -h $(EXIST_INSTALL_DIR) -p 775 -d 775 -q 755 $(DBDIR)
- @echo "Copying files to database..."
- @#copy the transliteration DTD first so eXist will know where they are during restore
- cp $(SETUPDIR)/opensiddur-catalog.xml $(EXIST_INSTALL_DIR)/webapp/WEB-INF
- cp $(SETUPDIR)/hebrew.dtd $(EXIST_INSTALL_DIR)/webapp/WEB-INF/entities
- $(EXISTBACKUP) -r `pwd`/$(DBDIR)/__contents__.xml -ouri=xmldb:exist:// -p "$(ADMINPASSWORD)"
-
-.PHONY: setup-password setup-clean
-setup-password: $(SETUPDIR)/setup.xql
-
-setup-clean:
- rm -f $(SETUPDIR)/setup.xql
-
-$(SETUPDIR)/setup.xql:
- @echo "Setting admin password to the value in the Makefile. You did change it Makefile.local, right?..." && \
- cat $(SETUPDIR)/setup.tmpl.xql | sed "s/ADMINPASSWORD/$(ADMINPASSWORD)/g" > $(SETUPDIR)/setup.xql && \
- echo "done."
- $(EXISTCLIENT) -qls -u admin -P "$(ADMINPASSWORD)" -F $(SETUPDIR)/setup.xql
- rm -f $(SETUPDIR)/setup.xql
-
-#$(EXIST_INSTALL_DIR)/EXIST.AUTOINSTALLED:
-# make db-install
-
-# install the WLC files into $WLCDBDIR on the database and assure that they're
-# ready to be used (note: may overwrite existing files, use with caution)
-# reference index not being used yet, so ridx-disable/enable are disabled
-db-install-wlc: tanach tanach2db
-
-.PHONY: tanach2db
-tanach2db:
- $(SETUPDIR)/makedb.py -h $(EXIST_INSTALL_DIR) -p 774 -d 775 -c /db/data -u admin -g everyone $(TEXTDIR)/wlc
- $(EXISTBACKUP) -r `pwd`/$(WLC-OUTPUT-DIR)/__contents__.xml -u admin -p "$(ADMINPASSWORD)" -ouri=xmldb:exist://
-
-db-syncclean:
- for f in `find . -name __contents__.xml`; do rm "$$f"; done
-
-db-uninstall:
- @echo "WARNING: This will remove the copy of eXist in $(EXIST_INSTALL_DIR) within 10s. If you do not want to do that, cancel now with ctrl-c!!!!" && \
- sleep 10 && \
- echo "too late." && \
- rm -fr $(EXIST_INSTALL_DIR)
-
-# synchronize the contents of the development directories to a running db
-# (a bit of a misnomer, since it will not delete files from the db!)
-db-sync:
- $(SETUPDIR)/makedb.py -h $(EXIST_INSTALL_DIR) -p 755 -c /db/code $(CODEDIR)
- $(SETUPDIR)/makedb.py -h $(EXIST_INSTALL_DIR) -p 775 -g everyone -c /db/data $(DATADIR)
- $(SETUPDIR)/makedb.py -h $(EXIST_INSTALL_DIR) -p 755 -c /db/common $(COMMONDIR)
- $(EXISTBACKUP) -u admin -p $(DBAPASS) -r `pwd`/$(CODEDIR)/__contents__.xml -ouri=xmldb:exist://localhost:8080/xmlrpc
- $(EXISTBACKUP) -u admin -p $(DBAPASS) -r `pwd`/$(DATADIR)/__contents__.xml -ouri=xmldb:exist://localhost:8080/xmlrpc
- $(EXISTBACKUP) -u admin -p $(DBAPASS) -r `pwd`/$(COMMONDIR)/__contents__.xml -ouri=xmldb:exist://localhost:8080/xmlrpc
-
-.PHONY: db db-nonet
-db: externals db-nonet
-
-# patch error status ignored because it returns 1 if patches are already applied
-db-nonet: schema transforms $(DBDIR)/code $(DBDIR)/common db-tests
- mkdir -p $(DBDIR)/xforms
- rsync $(RSYNC_EXCLUDE) -a --delete $(LIBDIR)/xsltforms/trunk/build/ $(DBDIR)/xforms/xsltforms
- rsync $(RSYNC_EXCLUDE) -a --delete $(LIBDIR)/xspec $(DBDIR)/code/modules/resources
- rsync $(RSYNC_EXCLUDE) -a --delete data $(DBDIR)
- cp $(CODEDIR)/common/params.xsl2 $(DBDIR)/code/common
- -patch -p1 -Nr - < $(SETUPDIR)/generate-common-tests.xsl.patch
- -patch -p1 -Nr - < $(SETUPDIR)/generate-tests-utils.xsl.patch
- -patch -p1 -Nr - < $(SETUPDIR)/generate-xspec-tests.xsl.patch
-
-db-clean:
- rm -fr $(DBDIR)/schema $(DBDIR)/code $(DBDIR)/data $(DBDIR)/common $(DBDIR)/cache
-
-# equivalent of svn externals
-.PHONY: db-externals
-
-.PHONY: externals submodules
-externals: svn-xspec svn-xsltforms svn-xsltdoc svn-tei svn-exist
-
-submodules:
- git submodule init
- git submodule update
-
-.PHONY: svn-xspec svn-xsltforms svn-xsltdoc svn-tei svn-exist
-svn-xspec: $(XSPECDIR)
- svn update $(XSPECDIR)
-
-$(XSPECDIR):
- svn co $(XSPECREPO) $(XSPECDIR)
-
-svn-xsltforms: $(XSLTFORMSDIR)
- svn update $(XSLTFORMS_REVISION) $(XSLTFORMSDIR)
-
-$(XSLTFORMSDIR):
- svn co $(XSLTFORMS_REVISION) $(XSLTFORMSREPO) $(XSLTFORMSDIR)
-
-svn-xsltdoc: $(XSLTDOCDIR)
- svn update $(XSLTDOCDIR)
-
-$(XSLTDOCDIR):
- svn co $(XSLTDOCREPO) $(XSLTDOCDIR)
-
-svn-tei: $(TEIDIR)
- svn update $(TEIDIR)
-
-$(TEIDIR):
- svn co $(TEIREPO) $(TEIDIR)
-
-svn-exist: $(EXISTSRCDIR)
- svn update $(EXIST_REVISION) $(EXISTSRCDIR)
-
-$(EXISTSRCDIR):
- svn co $(EXIST_REVISION) $(EXISTSRCREPO) $(EXISTSRCDIR)
-
-.PHONY: ridx-enable ridx-disable
-ridx-enable:
- @echo Re-enabling the index and indexing database references. This may take a while...
- $(EXISTCLIENT) -u admin -P "$(ADMINPASSWORD)" -qls -F $(SETUPDIR)/enable-refindex.xql
- $(EXISTCLIENT) -qls -u admin -P "$(ADMINPASSWORD)" -F $(SETUPDIR)/reindex-refindex.xql
-
-ridx-disable:
- $(EXISTCLIENT) -u admin -P "$(ADMINPASSWORD)" -qls -F $(SETUPDIR)/disable-refindex.xql
-
diff --git a/Makefile.cygwin b/Makefile.cygwin
deleted file mode 100644
index 1328dae8..00000000
--- a/Makefile.cygwin
+++ /dev/null
@@ -1,22 +0,0 @@
-# Makefile for Cygwin
-# Changes paths to use Windows paths when we're running under Cygwin
-#
-# Open Siddur Project
-# Copyright 2010 Efraim Feinstein
-# Licensed under the GNU Lesser General Public License, version 3 or later.
-# $Id: Makefile.cygwin 687 2011-01-23 23:36:48Z efraim.feinstein $
-
-ifeq ($(findstring CYGWIN,$(shell uname)),CYGWIN)
- ISCYGWIN=true
-endif
-
-# EXISTBACKUP and EXISTCLIENT command lines are Unixy, so they have to be redefined immediately
-# before Windowsified EXIST_* paths
-ifdef ISCYGWIN
- EXISTBACKUP:=$(EXIST_INSTALL_DIR)/bin/backup.sh
- EXISTCLIENT:=$(EXIST_INSTALL_DIR)/bin/client.sh
- EXIST_INSTALL_DIR:=`cygpath -wm $(EXIST_INSTALL_DIR)`
- EXIST_INSTALL_JAR:=`cygpath -wm $(EXIST_INSTALL_JAR)`
- JCLASSPATH:=`cygpath -wpm $(JCLASSPATH)`
- XSLTDOC:=`cygpath -wm $(XSLTDOC)`
-endif
diff --git a/README b/README
deleted file mode 100644
index bdbfcdf4..00000000
--- a/README
+++ /dev/null
@@ -1,29 +0,0 @@
-This is the Open Siddur Project's git repository.
-
-The Open Siddur Project aims to produce a free software toolkit for making high-quality custom Jewish liturgical books such as haggadot, siddurim, and bentchers that can be displayed on screen or printed to paper. The project's goals include producing a reliable source text, enabling personalization and customization of the text for local rites and customs and selective inclusion of multilingual translations, transliterations, instructions, notes, and commentaries.
-
-To accomplish it, we are to creating a collaborative publishing platform built around a social network of individuals passionate about the siddur, some wanting to craft their own siddur, others wanting to use it as an educational tool, or for sharing prayers, translations, commentaries, art, and layout templates for new siddurim. The mission of the Open Siddur Project is further described in our Mission Statement (http://opensiddur.org/development/mission/) and encompasses the values of pluralism (acceptance for the diversity of Jewish cultural expression), historical awareness (the text of the siddur is an aggregate of thousands of years of creatively inspired works), and individual freedom.
-
-The coding project is divided into three major parts:
-* Schema: A defined XML format for storing liturgical materials, based on the Text Encoding Initiative (TEI) XML schema.
-* Back-end: A database and REST API for storing and accessing siddur data.
-* Front-end: The web-based editing application.
-Volunteer coders are always welcome. We are, in particular, looking for web/mobile user interface programmers.
-
-This site serves as the project's code repository, code documentation, and issue tracker.
-
-Current development progress is being tracked on the github wiki and in the issue tracker.
-
-Many of the texts that have been contributed to date are distributed at http://opensiddur.org
-
-Comments and bug reports from anyone are welcome.
-
-Please join our discussion lists:
-* Read-only announcements (low traffic): http://groups.google.com/group/opensiddur-announce
-* General discussion: http://groups.google.com/group/opensiddur-talk
-* Technical discussion: http://groups.google.com/group/opensiddur-tech
-* Commit logs: http://groups.google.com/group/opensiddur-dev
-
-You can also follow us on Twitter (@opensiddur) and Facebook (http://www.facebook.com/home.php#/group.php?gid=107922647745)
-
-For history prior to version 0.4.1, see our old Subversion repository at http://jewishliturgy.googlecode.com
diff --git a/README.md b/README.md
new file mode 100644
index 00000000..90c0c6c7
--- /dev/null
+++ b/README.md
@@ -0,0 +1,58 @@
+This is the Open Siddur Project's git repository.
+
+Build status:
+master: [](https://github.com/opensiddur/opensiddur/actions/workflows/deploy.yml)
+develop: [](https://github.com/opensiddur/opensiddur/actions/workflows/deploy.yml)
+
+The Open Siddur Project aims to produce a free software toolkit
+for making high-quality custom Jewish liturgical books such as
+haggadot, siddurim, and bentchers that can be displayed on screen
+or printed to paper. The project's goals include producing a
+reliable source text, enabling personalization and customization
+of the text for local rites and customs
+and selective inclusion of multilingual translations, transliterations,
+instructions, notes, and commentaries.
+
+To accomplish it, we are to creating a collaborative publishing platform
+built around a social network of individuals passionate about the siddur,
+some wanting to craft their own siddur,
+others wanting to use it as an educational tool,
+or for sharing prayers, translations, commentaries, art, and layout templates
+for new siddurim. The mission of the Open Siddur Project is further
+described in our [Mission Statement](http://opensiddur.org/development/mission/)
+and encompasses the values of pluralism (acceptance for the diversity of
+Jewish cultural expression),
+historical awareness (the text of the siddur is an aggregate of
+thousands of years of creatively inspired works),
+and individual freedom.
+
+The coding project is divided into three major parts:
+* Schema: A defined XML format for storing liturgical materials, based on the
+[Text Encoding Initiative (TEI)](http://www.tei-c.org) XML schema.
+* Back-end: A database and REST API for storing and accessing siddur data.
+* Front-end: The web-based editing application.
+
+Volunteer coders are always welcome. We are, in particular,
+looking for web/mobile user interface programmers.
+
+This site serves as the project's code repository,
+code documentation, and issue tracker.
+
+Current development progress is being tracked on the github wiki
+and in the issue tracker.
+
+Many of the texts that have been contributed to date are
+distributed at [opensiddur.org](http://opensiddur.org)
+
+Comments and bug reports from anyone are welcome.
+
+Please join our discussion lists:
+* Read-only announcements (low traffic): http://groups.google.com/group/opensiddur-announce
+* General discussion: http://groups.google.com/group/opensiddur-talk or, on Facebook: https://www.facebook.com/groups/opensiddur
+* Technical discussion: http://groups.google.com/group/opensiddur-tech
+* Commit logs: http://groups.google.com/group/opensiddur-dev
+
+You can also follow us on Twitter (@opensiddur), Google+ (https://plus.google.com/u/0/communities/106561535392892700238), and Facebook (https://www.facebook.com/opensiddur).
+
+For history prior to version 0.4.1, see our old Subversion repository at http://jewishliturgy.googlecode.com
+
diff --git a/build.Dockerfile b/build.Dockerfile
new file mode 100644
index 00000000..d650a24a
--- /dev/null
+++ b/build.Dockerfile
@@ -0,0 +1,23 @@
+# To build, we assume that lib is mounted to /usr/local/src
+FROM ubuntu:kinetic as base
+
+# install dependencies
+RUN apt-get update && apt-get install -y openjdk-8-jdk maven
+RUN update-java-alternatives -s java-1.8.0-openjdk-amd64
+ENV JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64
+
+FROM base as build-root
+USER root
+
+FROM base as build-user
+# this docker has to write files outside the docker container with the user id and group id of the current user
+ARG USER_ID
+ARG GROUP_ID
+
+# set up user/groups
+RUN addgroup --gid $GROUP_ID user
+RUN adduser --disabled-password --gecos '' --uid $USER_ID --gid $GROUP_ID user
+RUN adduser user sudo
+RUN echo '%sudo ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers
+
+USER user
\ No newline at end of file
diff --git a/build.properties b/build.properties
new file mode 100644
index 00000000..0b6554b5
--- /dev/null
+++ b/build.properties
@@ -0,0 +1,7 @@
+installdir=/usr/local/opensiddur
+max.memory=2048
+stack.memory=512
+cache.size=512
+adminpassword=password
+
+backup.directory=/tmp/exist-backup
diff --git a/build.xml b/build.xml
new file mode 100644
index 00000000..88164bf0
--- /dev/null
+++ b/build.xml
@@ -0,0 +1,453 @@
+
+
+ Build file for opensiddur
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+INSTALL_PATH=${installdir}
+dataDir=webapp/WEB-INF/data
+adminPasswd=${adminpassword}
+divider=
+space=
+MAX_MEMORY=${max.memory}
+cacheSize=${cache.size}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ JAVA_OPTS="-Xss${stack.memory}m -Xmx${max.memory}m"
+CLASSPATH_PREFIX=/usr/local/opensiddur/lib/*:/usr/local/opensiddur/lib/user/*
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ build docker image: ${build.docker.image}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Warning: About to delete everything in ${installdir}. If this not what you want to do, press ^C now! You have 5 seconds...
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ ^/db/apps
+ ^/db/cache
+ ^/db/refindex
+ ^/db/system/config
+ ^/db/system/security/exist/(accounts|groups)/removed
+ ^/db/system/security/exist/accounts/(admin|guest|testuser|testuser.)\.xml$
+ ^/db/system/security/exist/groups/(dba|testuser|testuser2|grouptests|grouptests.)\.xml$
+ ^/db/data/user/(testuser|testuser.)\.xml$
+ ^/db/data/tests
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/code/Makefile b/code/Makefile
deleted file mode 100755
index 7c5e7bcf..00000000
--- a/code/Makefile
+++ /dev/null
@@ -1,60 +0,0 @@
-# Makefile for the code directory.
-#
-# Sets up dependencies for the XSLT files
-# Assumes that it will be included after the definitions in the top level Makefile
-#
-# Copyright 2008-2011 Efraim Feinstein
-#
-# This program is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Lesser General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Lesser General Public License for more details.
-#
-# You should have received a copy of the GNU Lesser General Public License
-# along with this program. If not, see http://www.gnu.org/licenses/
-#
-include $(CODEDIR)/grammar-parser/Makefile
-include $(CODEDIR)/input-conversion/Makefile
-include $(CODEDIR)/transforms/Makefile
-include $(CODEDIR)/tests/Makefile
-
-XSLTDOC_CFGFILE = XSLTDocConfig.xml
-CODE_DEPEND=$(STAGE1_DEPEND) $(STAGE2_DEPEND) $(STAGE3_DEPEND)
-
-$(DOCDIR):
- mkdir -p $(DOCDIR)
-
-#$(CODEDOCDIR):
-# mkdir -p $(CODEDOCDIR)
-
-.PHONY: code
-code: transforms params.xsl2
-.PHONY: params.xsl2
-params.xsl2: $(CODEDIR)/common/params.xsl2
-
-.PHONY: code-depend
-
-.PHONY: xsltdoc xsltdoc-clean
-xsltdoc: code $(CODEDOCDIR)/index.html
-
-$(CODEDOCDIR)/index.html: $(CODE_DEPEND) $(CODEDIR)/$(XSLTDOC_CFGFILE) $(CODEDIR)/xmlverbatim.css $(CODEDIR)/XSLTdoc.css
- mkdir -p $(CODEDOCDIR)
- $(CP) $(CODEDIR)/xmlverbatim.css $(CODEDOCDIR)
- $(CP) $(CODEDIR)/XSLTdoc.css $(CODEDOCDIR)
- $(XSLT) -s $(CODEDIR)/$(XSLTDOC_CFGFILE) $(XSLTDOC)
-
-$(CODEDIR)/common/params.xsl2:
- $(CP) $(CODEDIR)/common/params.tmpl.xsl2 $(CODEDIR)/common/params.xsl2
-
-.PHONY: xsltdoc-clean
-xsltdoc-clean:
- rm -fr $(DOCDIR)
-
-.PHONY: code-clean
-code-clean:
-
diff --git a/code/XSLTDocConfig.xml b/code/XSLTDocConfig.xml
deleted file mode 100644
index 493e6677..00000000
--- a/code/XSLTDocConfig.xml
+++ /dev/null
@@ -1,103 +0,0 @@
-
-
-
-]>
-
-
- Open Siddur Project Transform Documentation
-
-
-
Introduction
-
Welcome to the XSLT transform documentation. This website documents the
- code used in:
-
-
transformations from JLPTEI to XHTML
-
one-time transformations from other formats to JLPTEI
-
- The documentation is automatically generated from specialized elements in the
- source code, which is available at
- our Google code subversion
- repository. Documentation generation is performed using a modified
- version of XSLTDoc.
-
-
-
-
Code organization
-
The main entry point to the transformation is stage1.xsl2, which
- includes the files that do the processing. In general, each XSLT stylesheet
- performs one part of the processing. The default mode is used exclusively to
- convert TEI to XHTML. The XHTML target is particularly simple, consisting
- only of a minimal HTML header and all content wrapped in html:div elements.
- This form of XHTML is referred to in the documentation as
- “muXHTML,” for “micro XHTML.”
- It is intended to be styled by CSS for rendering, or converted to other
- formats using additional stylesheets.
-
-
Intermediate processing is performed in non-default modes.
- Some of the more complex parts of the processing are the conversions of
- multiple concurrent hierarchies into a single combined hierarchy
- (concurrent.xsl2) and the processing of conditional inclusion instructions
- (conditionals.xsl2).
-
Some code is automatically generated. This includes:
-
-
the XPointer
- parsing code, which is generated by grammar.xsl2 from a grammatical description
- of the specification in grammar.xml.
-
the transforms of the most basic elements from JLPTEI to XHTML, all
- of which use generic templates generated by muxhtml-generator.xsl2
-
-
-};
-
-declare
- %rest:GET
- %rest:path("/api/data/OpenSearchDescription")
- %rest:query-param("source", "{$source}", "")
- %rest:produces("application/opensearchdescription+xml","application/xml","text/xml")
- function dindex:open-search(
- $source as xs:string
- ) as item()+ {
-
-
-
-
- ,
-
- Open Siddur Search
- Full text search of Open Siddur texts.
- siddur
- efraim@opensiddur.org
-
-
-};
diff --git a/code/api/data/original.xqm b/code/api/data/original.xqm
deleted file mode 100644
index dc6b0f99..00000000
--- a/code/api/data/original.xqm
+++ /dev/null
@@ -1,538 +0,0 @@
-xquery version "3.0";
-(: Copyright 2012 Efraim Feinstein
- : Licensed under the GNU Lesser General Public License, version 3 or later
- :)
-(:~ Original data API
- : @author Efraim Feinstein
- :)
-
-module namespace orig = 'http://jewishliturgy.org/api/data/original';
-
-declare namespace tei="http://www.tei-c.org/ns/1.0";
-declare namespace j="http://jewishliturgy.org/ns/jlptei/1.0";
-declare namespace rest="http://exquery.org/ns/rest/annotation/";
-declare namespace output="http://www.w3.org/2010/xslt-xquery-serialization";
-declare namespace o="http://a9.com/-/spec/opensearch/1.1/";
-
-import module namespace acc="http://jewishliturgy.org/modules/access"
- at "/code/api/modules/access.xqm";
-import module namespace api="http://jewishliturgy.org/modules/api"
- at "/code/api/modules/api.xqm";
-import module namespace app="http://jewishliturgy.org/modules/app"
- at "/code/modules/app.xqm";
-import module namespace data="http://jewishliturgy.org/modules/data"
- at "/code/api/modules/data.xqm";
-import module namespace jvalidate="http://jewishliturgy.org/modules/jvalidate"
- at "/code/modules/jvalidate.xqm";
-import module namespace user="http://jewishliturgy.org/api/user"
- at "/code/api/user.xqm";
-
-import module namespace magic="http://jewishliturgy.org/magic"
- at "/code/magic/magic.xqm";
-
-import module namespace kwic="http://exist-db.org/xquery/kwic";
-
-declare variable $orig:data-type := "original";
-declare variable $orig:schema := "/schema/jlptei.rnc";
-declare variable $orig:schematron := "/schema/jlptei.xsl2";
-declare variable $orig:path-base := concat($data:path-base, "/", $orig:data-type);
-
-(:~ record that a change occurred
- : @param $doc TEI document where the change should be recorded
- : @param $change-type the type of the change
- : @return On return, the document is updated.
- :
- : If the document has no existing revisionDesc, one is created
- : New changes are positioned as the first element in the revisionDesc
- :)
-declare function orig:record-change(
- $doc as document-node(),
- $change-type as xs:string
- ) as empty-sequence() {
- let $who := app:auth-user()
- let $who-uri := user:db-path($who)
- let $revisionDesc := $doc//tei:revisionDesc
- let $change :=
-
- return
- if ($revisionDesc and exists($revisionDesc/*))
- then
- update insert $change preceding $revisionDesc/*[1]
- else if ($revisionDesc)
- then
- update insert $change into $revisionDesc
- else
- update insert
- {
- $change
- }
- following $doc//tei:teiHeader/*[last()]
-};
-
-(:~ validate
- : @param $doc The document to be validated
- : @param $old-doc The document it is replacing, if any
- : @return true() if valid, false() if not
- : @see orig:validate-report
- :)
-declare function orig:validate(
- $doc as item(),
- $old-doc as document-node()?
- ) as xs:boolean {
- validation:jing($doc, xs:anyURI($orig:schema)) and
- jvalidate:validation-boolean(
- jvalidate:validate-iso-schematron-svrl($doc, xs:anyURI($orig:schematron))
- ) and (
- empty($old-doc) or
- jvalidate:validation-boolean(
- orig:validate-changes($doc, $old-doc)
- )
- )
-};
-
-(:~ validate, returning a validation report
- : @param $doc The document to be validated
- : @param $old-doc The document it is replacing, if any
- : @return true() if valid, false() if not
- : @see orig:validate
- :)
-declare function orig:validate-report(
- $doc as item(),
- $old-doc as document-node()?
- ) as element() {
- jvalidate:concatenate-reports((
- validation:jing-report($doc, xs:anyURI($orig:schema)),
- jvalidate:validate-iso-schematron-svrl($doc, doc($orig:schematron)),
- if (exists($old-doc))
- then orig:validate-changes($doc, $old-doc)
- else ()
- ))
-};
-
-(:~ determine if all the changes between an old version and
- : a new version of a document are legal
- : @param $doc new document
- : @param $old-doc old document
- : @return a report element, indicating whether the changes are valid or invalid
- :)
-declare function orig:validate-changes(
- $doc as document-node(),
- $old-doc as document-node()
- ) as element(report) {
- let $messages := (
- if (not(xmldiff:compare($doc//tei:revisionDesc, $old-doc//tei:revisionDesc)))
- then You may not alter the revision history
- else (),
- let $authors :=
- distinct-values(
- $old-doc//tei:change/@who/substring-after(., "/user/")
- )
- let $can-change-license :=
- (count($authors) = 1) and
- $authors = app:auth-user()
- return
- if (not(xmldiff:compare(
- {
- $doc//tei:publicationStmt/
- (* except (
- if ($can-change-license)
- then ()
- else tei:licence
- ))
- },
- {
- $old-doc//tei:publicationStmt/
- (* except (
- if ($can-change-license)
- then ()
- else tei:licence
- ))
- })
- ))
- then The information in the tei:publicationStmt is immutable and only the original author can change the text's license.
- else ()
- )
- let $is-valid := empty($messages)
- return
-
- {
- if ($is-valid)
- then "valid"
- else "invalid"
- }
- {$messages}
-
-};
-
-(: error message when access is not allowed :)
-declare function local:no-access(
- ) as item()+ {
- if (app:auth-user())
- then api:rest-error(403, "Forbidden")
- else api:rest-error(401, "Not authenticated")
-};
-
-(:~ Get an XML document by name
- : @param $name Document name as a string
- : @error HTTP 404 Not found (or not available)
- :)
-declare
- %rest:GET
- %rest:path("/api/data/original/{$name}")
- %rest:produces("application/xml", "text/xml", "application/tei+xml")
- function orig:get(
- $name as xs:string
- ) as item()+ {
- let $doc := data:doc($orig:data-type, $name)
- return
- if ($doc)
- then $doc
- else api:rest-error(404, "Not found", $name)
-};
-
-
-(:~ List or full-text query original data
- : @param $query text of the query, empty string for all
- : @param $start first document to list
- : @param $max-results number of documents to list
- : @return a list of documents that match the search. If the documents match a query, return the context.
- : @error HTTP 404 Not found
- :)
-declare
- %rest:GET
- %rest:path("/api/data/original")
- %rest:query-param("q", "{$query}", "")
- %rest:query-param("start", "{$start}", 1)
- %rest:query-param("max-results", "{$max-results}", 100)
- %rest:produces("application/xhtml+xml", "application/xml", "text/xml", "text/html")
- %output:method("html5")
- function orig:list(
- $query as xs:string?,
- $start as xs:integer,
- $count as xs:integer
- ) as item()+ {
-
-
-
-
- ,
- let $results as item()+ :=
- if ($query)
- then local:query($query, $start, $count)
- else local:list($start, $count)
- let $result-element := $results[1]
- let $max-results := $results[3]
- let $total := $results[4]
- return
-
-
- Original data API
-
-
-
-
-
-
- {
- $result-element
- }
-
-};
-
-(: @return (list, start, count, n-results) :)
-declare function local:query(
- $query as xs:string,
- $start as xs:integer,
- $count as xs:integer
- ) as item()+ {
- let $all-results :=
- for $doc in
- collection($orig:path-base)//(tei:title|j:streamText)[ft:query(.,$query)]
- order by $doc//tei:title[@type="main"] ascending
- return $doc
- let $listed-results :=
- {
- for $result in
- subsequence($all-results, $start, $count)
- let $document := root($result)
- group $result as $hit by $document as $doc
- order by max(for $h in $hit return ft:score($h))
- return
- let $api-name := replace(util:document-name($doc), "\.xml$", "")
- return
-
,
- $start,
- $count,
- count($all)
- )
-};
-
-
-(:~ Delete am original text
- : @param $name The name of the text
- : @return HTTP 204 (No data) if successful
- : @error HTTP 400 Cannot be deleted and a reason, including existing external references
- : @error HTTP 401 Not authorized
- : @error HTTP 403 Forbidden - logged in as a user who does not have write access to the document
- : @error HTTP 404 Not found
- :)
-declare
- %rest:DELETE
- %rest:path("/api/data/original/{$name}")
- function orig:delete(
- $name as xs:string
- ) as item()+ {
- let $doc := data:doc($orig:data-type, $name)
- return
- if ($doc)
- then
- let $path := document-uri($doc) cast as xs:anyURI
- let $collection := util:collection-name($doc)
- let $resource := util:document-name($doc)
- return
- if (
- (: for deletion,
- eXist requires write access to the collection.
- We need to require write access to the path
- :)
- sm:has-access(xs:anyURI($collection), "w") and
- sm:has-access($path, "w")
- )
- then (
- (: TODO: check for references! :)
- xmldb:remove($collection, $resource),
-
-
-
-
-
-
- )
- else
- local:no-access()
- else
- api:rest-error(404, "Not found", $name)
-};
-
-(:~ Post a new original document
- : @param $body The JLPTEI document
- : @return HTTP 201 if created successfully
- : @error HTTP 400 Invalid JLPTEI XML
- : @error HTTP 401 Not authorized
- : @error HTTP 500 Storage error
- :
- : Other effects:
- : * A change record is added to the resource
- : * The new resource is owned by the current user, group owner=current user, and mode is 664
- :)
-declare
- %rest:POST("{$body}")
- %rest:path("/api/data/original")
- %rest:consumes("application/xml", "application/tei+xml", "text/xml")
- function orig:post(
- $body as document-node()
- ) as item()+ {
- let $paths :=
- data:new-path-to-resource(
- concat($orig:data-type, "/", $body/tei:TEI/@xml:lang),
- $body//tei:title[@type="main" or not(@type)][1]
- )
- let $resource := $paths[2]
- let $collection := $paths[1]
- let $user := app:auth-user()
- return
- if (sm:has-access(xs:anyURI($orig:path-base), "w"))
- then
- if (orig:validate($body, ()))
- then (
- app:make-collection-path($collection, "/", sm:get-permissions(xs:anyURI($orig:path-base))),
- let $db-path := xmldb:store($collection, $resource, $body)
- return
- if ($db-path)
- then
-
-
-
-
-
- {
- let $uri := xs:anyURI($db-path)
- let $change-record := orig:record-change(doc($db-path), "created")
- return system:as-user("admin", $magic:password, (
- sm:chown($uri, $user),
- sm:chgrp($uri, $user),
- sm:chmod($uri, "rw-rw-r--")
- ))
- }
-
-
-
- else api:rest-error(500, "Cannot store the resource")
- )
- else
- api:rest-error(400, "Input document is not valid JLPTEI", orig:validate-report($body, ()))
- else local:no-access()
-};
-
-(:~ Edit/replace a document in the database
- : @param $name Name of the document to replace
- : @param $body New document
- : @return HTTP 204 If successful
- : @error HTTP 400 Invalid XML; Attempt to edit a read-only part of the document
- : @error HTTP 401 Unauthorized - not logged in
- : @error HTTP 403 Forbidden - the document can be found, but is not writable by you
- : @error HTTP 404 Not found
- : @error HTTP 500 Storage error
- :
- : A change record is added to the resource
- : TODO: add xml:id to required places too
- :)
-declare
- %rest:PUT("{$body}")
- %rest:path("/api/data/original/{$name}")
- %rest:consumes("application/xml", "text/xml")
- function orig:put(
- $name as xs:string,
- $body as document-node()
- ) as item()+ {
- let $doc := data:doc($orig:data-type, $name)
- return
- if ($doc)
- then
- let $resource := util:document-name($doc)
- let $collection := util:collection-name($doc)
- let $uri := document-uri($doc)
- return
- if (sm:has-access(xs:anyURI($uri), "w"))
- then
- if (orig:validate($body, $doc))
- then
- if (xmldb:store($collection, $resource, $body))
- then
-
- {
- orig:record-change(doc($uri), "edited")
- }
-
-
-
-
-
- else api:rest-error(500, "Cannot store the resource")
- else api:rest-error(400, "Input document is not valid JLPTEI", orig:validate-report($body, $doc))
- else local:no-access()
- else
- (: it is not clear that this is correct behavior for PUT.
- : If the user gives the document a name, maybe it should
- : just keep that resource name and create it?
- :)
- api:rest-error(404, "Not found", $name)
-};
-
-(:~ Get access/sharing data for a document
- : @param $name Name of document
- : @return HTTP 200 and an access structure (a:access)
- : @error HTTP 404 Document not found or inaccessible
- :)
-declare
- %rest:GET
- %rest:path("/api/data/original/{$name}/access")
- %rest:produces("application/xml")
- function orig:get-access(
- $name as xs:string
- ) as item()+ {
- let $doc := data:doc($orig:data-type, $name)
- return
- if ($doc)
- then acc:get-access($doc)
- else api:rest-error(404, "Not found", $name)
-};
-
-(:~ Set access/sharing data for a document
- : @param $name Name of document
- : @param $body New sharing rights, as an a:access structure
- : @return HTTP 204 No data, access rights changed
- : @error HTTP 400 Access structure is invalid
- : @error HTTP 401 Not authorized
- : @error HTTP 403 Forbidden
- : @error HTTP 404 Document not found or inaccessible
- :)
-declare
- %rest:PUT("{$body}")
- %rest:path("/api/data/original/{$name}/access")
- %rest:consumes("application/xml", "text/xml")
- function orig:put-access(
- $name as xs:string,
- $body as document-node()
- ) as item()+ {
- let $doc := data:doc($orig:data-type, $name)
- let $access := $body/*
- return
- if ($doc)
- then
- try {
- acc:set-access($doc, $access),
-
-
-
-
-
-
- }
- catch error:VALIDATION {
- api:rest-error(400, "Validation error in input", acc:validate-report($access))
- }
- catch error:UNAUTHORIZED {
- api:rest-error(401, "Not authenticated")
- }
- catch error:FORBIDDEN {
- api:rest-error(403, "Forbidden")
- }
- else api:rest-error(404, "Not found", $name)
-};
diff --git a/code/api/data/original/original.xqm b/code/api/data/original/original.xqm
deleted file mode 100644
index 9436b7fa..00000000
--- a/code/api/data/original/original.xqm
+++ /dev/null
@@ -1,131 +0,0 @@
-xquery version "1.0";
-(: API for POSTing new resources to original
- :
- : A title must be provided
- :
- : Open Siddur Project
- : Copyright 2011-2012 Efraim Feinstein
- : Licensed under the GNU Lesser General Public License, version 3 or later
- :
- :)
-module namespace orig="http://jewishliturgy.org/api/data/original";
-
-import module namespace api="http://jewishliturgy.org/modules/api"
- at "/code/api/modules/api.xqm";
-import module namespace app="http://jewishliturgy.org/modules/app"
- at "/code/modules/app.xqm";
-import module namespace nav="http://jewishliturgy.org/modules/nav"
- at "/code/api/modules/nav.xqm";
-
-declare default element namespace "http://www.w3.org/1999/xhtml";
-declare namespace tei="http://www.tei-c.org/ns/1.0";
-declare namespace err="http://jewishliturgy.org/errors";
-
-declare variable $orig:allowed-methods := ("GET", "POST");
-declare variable $orig:accept-content-type := (
- api:xml-content-type(),
- api:tei-content-type()
- );
-declare variable $orig:request-content-type := (
- api:tei-content-type(),
- api:xml-content-type()
- );
-declare variable $orig:test-source := "/code/tests/api/data/original/original.t.xml";
-
-declare function local:make-resource-name(
- $title as xs:string
- ) as xs:string {
- local:make-resource-name($title, 0)
-};
-
-declare function local:disallowed() {
- (: This probably needs no changes :)
- api:allowed-method($search:allowed-methods),
- api:error((), "Method not allowed")
-};
-
-declare function local:make-resource-name(
- $title as xs:string,
- $n as xs:integer
- ) as xs:string {
- let $proposed := concat(encode-for-uri($title),"_"[$n > 0],xs:string($n)[$n > 0], ".xml")
- return
- if (exists(collection("/group")[util:document-name(.) = $proposed]))
- then local:make-resource-name($title, $n + 1)
- else $proposed
-};
-
-
-declare function orig:get() {
- doc("/code/api/data/resources/template.xml")
-};
-
-declare function orig:put() {
- local:disallowed()
-};
-
-declare function orig:post() {
- if (api:require-authentication())
- then
- let $user := app:auth-user()
- let $data := api:get-data()
- let $title := $data/descendant-or-self::tei:title[@type="main"]
- return
- if (not($data instance of element(tei:TEI)
- or $data instance of element(tei:title)))
- then
- api:error(400, "You must post a valid JLPTEI document or a title")
- else if (empty($title))
- then
- api:error(400, "The document must contain a tei:title element", ($data, util:get-sequence-type($data), $title))
- else
- (: TODO: real validation here! :)
- let $uri := request:get-uri()
- let $resource := local:make-resource-name(string($title[1]))
- let $collection := concat("/group/", $user, "/original")
- let $make :=
- app:make-collection-path($collection, "/",
- $user, $user, sm:get-permissions(xs:anyURI(concat("/group/", $user)))/*/@mode/string())
- let $new-document-uri :=
- xmldb:store($collection, $resource,
- if ($data instance of element(tei:TEI))
- then $data
- else doc("/code/api/data/resources/template.xml"))
- return
- if ($new-document-uri)
- then (
- sm:chown(xs:anyURI($new-document-uri), $user),
- sm:chgrp(xs:anyURI($new-document-uri), $user),
- sm:chmod(xs:anyURI($new-document-uri), "rw-r-----"),
- if ($data instance of element(tei:title))
- then
- update replace
- doc($new-document-uri)//tei:title[@type="main"][1]
- with $title
- else (),
- response:set-status-code(201),
- response:set-header("Location", concat($uri, "/", replace($resource, "\.xml$", "")))
- )
- else
- api:error(500, "Cannot store the resource. Internal error?", $resource)
- else
- api:error((), "Authentication required")
-};
-
-declare function orig:delete() {
- local:disallowed()
-};
-
-declare function orig:go() {
- let $method := api:get-method()
- return
- if ($method = "GET")
- then orig:get()
- else if ($method = "PUT")
- then orig:put()
- else if ($method = "POST")
- then orig:post()
- else if ($method = "DELETE")
- then orig:delete()
- else local:disallowed()
-};
diff --git a/code/api/data/output/controller.xql b/code/api/data/output/controller.xql
deleted file mode 100644
index 312f94d9..00000000
--- a/code/api/data/output/controller.xql
+++ /dev/null
@@ -1,72 +0,0 @@
-xquery version "1.0";
-(: output text data api controller.
- :
- :)
-import module namespace api="http://jewishliturgy.org/modules/api"
- at "/code/api/modules/api.xqm";
-import module namespace app="http://jewishliturgy.org/modules/app"
- at "/code/modules/app.xqm";
-import module namespace data="http://jewishliturgy.org/modules/data"
- at "/code/api/modules/data.xqm";
-import module namespace debug="http://jewishliturgy.org/transform/debug"
- at "/code/modules/debug.xqm";
-
-declare namespace exist="http://exist.sourceforge.net/NS/exist";
-
-declare variable $exist:path external;
-declare variable $exist:resource external;
-declare variable $exist:controller external;
-declare variable $exist:prefix external;
-declare variable $exist:root external;
-
-(: queries that handle specific subresources :)
-declare variable $local:query-base := concat($exist:controller, '/../queries');
-
-
-debug:debug($debug:info,
-"/api/data",
-
- {app:auth-user()}:{app:auth-password()}
- {request:get-uri()}
- {$exist:path}
- {$exist:root}
- {$exist:controller}
- {$exist:prefix}
- {$exist:resource}
-
-),
-let $has-search-query := request:get-parameter('q', ())
-let $uri := request:get-uri()
-let $path-parts := data:path-to-parts($uri)
-let $path-parameters := data:path-to-parameters($path-parts)
-let $null :=
- util:log-system-out(("$path-parts for $uri=",$uri,"=", $path-parts, " $parameters=", $path-parameters))
-return
- if ($has-search-query)
- then
-
- {app:pass-credentials-xq()}
-
- {$path-parameters}
-
-
- else if ($path-parts/data:subresource = "status")
- then
-
- {app:pass-credentials-xq()}
-
- {$path-parameters}
-
-
-
- else
-
- {app:pass-credentials-xq()}
-
- {
- (: send all the normal parameters + the whole path :)
- $path-parameters
- }
-
-
-
diff --git a/code/api/data/output/output.xql b/code/api/data/output/output.xql
deleted file mode 100644
index c4507ba4..00000000
--- a/code/api/data/output/output.xql
+++ /dev/null
@@ -1,252 +0,0 @@
-xquery version "1.0";
-(: api for output data, if a resource is not given
- :
- : Parameters:
- : path = full path
- : owner = name of owner to limit listing to|()
- : If share-type is (), all accessible shares are shown
- : If owner is (), all accessible shares with the given share-type are shown
- :
- : Method: GET
- : Return:
- : 200 + menu (menu of available outputs),
- : 204 user exists but you are not logged in
- : 401 (you are not logged in and requested a resource that requires login)
- : 403 (you are logged in, but you can't access the resource),
- : 404 share type, group or user does not exist
- :
- : Method: POST
- : Input: Password
- : Create a new XML resource in the given collection
- : Return:
- : 201 Resource created, location header set
- : 401 Access to the resource requires authorization
- : 403 You are logged in, but you can't access the resource
- : 404 Share-type, user or group does not exist
- :
- :
- : Open Siddur Project
- : Copyright 2011 Efraim Feinstein
- : Licensed under the GNU Lesser General Public License, version 3 or later
- :
- :)
-import module namespace response="http://exist-db.org/xquery/response";
-import module namespace request="http://exist-db.org/xquery/request";
-import module namespace xmldb="http://exist-db.org/xquery/xmldb";
-
-import module namespace api="http://jewishliturgy.org/modules/api"
- at "/code/api/modules/api.xqm";
-import module namespace app="http://jewishliturgy.org/modules/app"
- at "/code/modules/app.xqm";
-import module namespace collab="http://jewishliturgy.org/modules/collab"
- at "/code/modules/collab.xqm";
-import module namespace paths="http://jewishliturgy.org/modules/paths"
- at "/code/modules/paths.xqm";
-import module namespace scache="http://jewishliturgy.org/modules/scache"
- at "/code/api/modules/scache.xqm";
-import module namespace data="http://jewishliturgy.org/modules/data"
- at "/code/api/modules/data.xqm";
-
-declare default element namespace "http://www.w3.org/1999/xhtml";
-declare namespace html="http://www.w3.org/1999/xhtml";
-declare namespace tei="http://www.tei-c.org/ns/1.0";
-declare namespace err="http://jewishliturgy.org/errors";
-
-declare option exist:serialize "method=xhtml media-type=text/html omit-xml-declaration=no indent=yes
- doctype-public=-//W3C//DTD XHTML 1.1//EN
- doctype-system=http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd";
-
-
-declare function local:get-menu(
- $share-type as xs:string?,
- $owner as xs:string?
- ) as element() {
- let $user := app:auth-user()
- let $uri := request:get-uri()
- let $collections :=
- let $top := data:top-collection($share-type, $owner)
- return
- if ($owner)
- then $top
- else
- if ($user)
- then
- for $group in xmldb:get-user-groups($user)
- return concat("/group/", $group)
- else ( (: TODO: allow public accessible outputs? :) )
- let $ignore-collections := '(/trash/)|(/cache/)'
- let $null :=
- util:log-system-out(("Output for $collection = ", string-join($collections, ","), " $share-type =", $share-type, " $owner=", $owner))
- let $list :=
- (
-
{
- if (not($share-type))
- then (
- api:list-item('Group output',
- '/code/api/data/output/group',
- "GET",
- api:html-content-type(),
- ())
- )
- else if (not($owner))
- then (
- if ($user)
- then (
- for $group in xmldb:get-user-groups($user)
- return
- api:list-item($group,
- concat('/code/api/data/output/group/', $group),
- "GET",
- api:html-content-type(),
- ())
- )
- else ( (:do not display data about not logged in users :) )
- )
- else
- ( (: share type and owner present:) )
- }
,
- if (exists($collections))
- then
- if (scache:is-up-to-date($collections, $uri, ""))
- then scache:get-request($uri, '')
- else scache:store($uri, '',
-
{
- for $collection in $collections
- let $output-collection := concat($collection, "/output")
- where xmldb:collection-available($output-collection)
- return
- for $subcollection in xmldb:get-child-collections($output-collection)
- let $collection-name := concat($output-collection, "/", $subcollection)
- let $title := collection($collection-name)//html:title
- let $doc-uri := concat($collection-name, "/", $subcollection, ".xhtml")
- (:document-uri(root($title)):)
- let $null :=
- util:log-system-out(("subcollection = ", $collection-name, " $doc-uri=", $doc-uri))
- let $doc-name-no-ext :=
- if ($title)
- then
- replace(util:document-name($doc-uri), '\.(xml|xhtml|html)$', '')
- else $subcollection
- let $share-type-owner :=
- string-join(subsequence(tokenize($collection-name, '/'), 2, 2), '/')
- let $link :=
- concat('/code/api/data/output/', $share-type-owner, '/',
- $doc-name-no-ext,
- '/'[exists($title)],
- $doc-name-no-ext[exists($title)])
- let $title-string :=
- if ($title)
- then normalize-space($title)
- else $doc-name-no-ext
- let $lang := $title/ancestor-or-self[@xml:lang][1]/@xml:lang
- let $null :=
- util:log-system-out((
- "$doc-uri=", $doc-uri,
- " available=", doc-available($doc-uri))
- )
- where not(matches($doc-uri, $ignore-collections))
- order by $title-string
- return
- api:list-item(
- {
- $lang,
- if ($lang) then attribute lang {string($lang)} else (),
- $title-string
- },
- $link, "GET", api:html-content-type(), (),
- (
- if (doc-available($doc-uri))
- then(
- "xhtml", concat($link, ".xhtml"),
- "css", concat($link, ".css"),
- "db", replace($doc-uri, "^/db", "")
- )
- else (),
- ("status", concat($link, "/status"))
- )
- )
- }
)
- else ( (: no collections to browse :) )
- )
- let $n-results := count(scache:get($uri, '')/li)
- return (
- if ($paths:debug)
- then
- util:log-system-out(('GET ', $uri, ': $n-results=', $n-results))
- else (),
- api:list(
- Open Siddur Output Data API,
- $list,
- $n-results,
- true(),
- "GET",
- (api:html-content-type()),
- ()
- )
- )
-};
-
-(: output can be xhtml or css :)
-declare function local:get(
- $path as xs:string,
- $format as xs:string
- ) as item() {
- let $original-format := $format
- let $format :=
- if (not($format) or $format = 'html')
- then 'xhtml'
- else $format
- let $db-path := data:api-path-to-db(concat($path, if ($original-format) then '' else '.xhtml'))
- return (
- util:log-system-out(("$db-path =", $db-path)),
- if ($format = 'xhtml')
- then
- if (doc-available($db-path))
- then (
- api:serialize-as('html'),
- doc($db-path)
- )
- else
- api:error(404, "Not found", $path)
- else
- if ($format = 'css')
- then
- let $collection := util:collection-name($db-path)
- let $css := xmldb:get-child-resources($collection)[ends-with(.,'css')][1]
- return
- if ($css)
- then (
- api:serialize-as('css'),
- util:binary-to-string(util:binary-doc(concat($collection, '/', $css)))
- )
- else
- api:error(404, "Not found", $path)
- else
- api:error(404, "Not found", $path)
- )
-};
-
-if (api:allowed-method('GET'))
-then
- let $auth := api:request-authentication() or true()
- let $share-type := request:get-parameter('share-type', ())
- let $owner := request:get-parameter('owner', ())
- let $resource := request:get-parameter('resource', ())
- let $format := request:get-parameter('format', ())
- let $path := request:get-parameter('path', ())
- let $null := util:log-system-out(("path =", $path))
- return
- if (data:is-valid-share-type($share-type))
- then
- if (data:is-valid-owner($share-type, $owner))
- then
- if ($resource)
- then local:get($path, $format)
- else local:get-menu($share-type, $owner)
- else
- api:error(404, concat("Invalid owner for the given share type ", $share-type), $owner)
- else
- api:error(404, "Invalid share type. Acceptable values are 'group'", $share-type)
-else
- (: disallowed method :)
- ()
diff --git a/code/api/data/output/status.xql b/code/api/data/output/status.xql
deleted file mode 100644
index c733625f..00000000
--- a/code/api/data/output/status.xql
+++ /dev/null
@@ -1,140 +0,0 @@
-xquery version "1.0";
-(: api for compilation status
- :
- : Parameters:
- : path = full path
- : standard path parameters
- :
- : Method: GET
- : Return:
- : 200 Status is returned
- : 401 you are not logged in and requested a resource that requires login
- : 403 you are logged in, but you can't access the requested resource
- : 404 share type, group, user, or compilation job does not exist
- :
- : Open Siddur Project
- : Copyright 2011 Efraim Feinstein
- : Licensed under the GNU Lesser General Public License, version 3 or later
- :
- :)
-import module namespace response="http://exist-db.org/xquery/response";
-import module namespace request="http://exist-db.org/xquery/request";
-import module namespace xmldb="http://exist-db.org/xquery/xmldb";
-
-import module namespace api="http://jewishliturgy.org/modules/api"
- at "/code/api/modules/api.xqm";
-import module namespace app="http://jewishliturgy.org/modules/app"
- at "/code/modules/app.xqm";
-import module namespace paths="http://jewishliturgy.org/modules/paths"
- at "/code/modules/paths.xqm";
-import module namespace data="http://jewishliturgy.org/modules/data"
- at "/code/api/modules/data.xqm";
-import module namespace format="http://jewishliturgy.org/modules/format"
- at "/code/modules/format.xqm";
-import module namespace jobs="http://jewishliturgy.org/apps/jobs"
- at "/code/apps/jobs/modules/jobs.xqm";
-
-declare default element namespace "http://www.w3.org/1999/xhtml";
-declare namespace html="http://www.w3.org/1999/xhtml";
-declare namespace tei="http://www.tei-c.org/ns/1.0";
-declare namespace err="http://jewishliturgy.org/errors";
-
-declare option exist:serialize "method=xhtml media-type=text/html omit-xml-declaration=no indent=yes
- doctype-public=-//W3C//DTD XHTML 1.1//EN
- doctype-system=http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd";
-
-(: output is xhtml :)
-declare function local:get(
- $path as xs:string
- ) as item() {
- let $resource := request:get-parameter("resource", ())
- let $api-path-wo-status := replace($path, "/status$", "")
- let $db-collection-path :=
- replace(data:api-path-to-db($api-path-wo-status), "/[^/]+$", "")
- let $db-status-path :=
- concat($db-collection-path, "/", format:status-xml($resource))
- let $db-error-path :=
- concat($db-collection-path, "/", $format:compile-error-resource)
- return
- if (doc-available($db-status-path))
- then
- let $status-doc := doc($db-status-path)/*
- (: TODO: there's a bug in eXist's query
- which prevents us from using a blank namespace
- :)
- let $error-doc := doc($db-error-path)
- let $current := $status-doc/*[name()="current"]/number()
- let $steps := $status-doc/*[name()="steps"]/number()
- let $completed := $status-doc/*[name()="completed"]/number()
- let $job := $status-doc/*[name()="job"]/number()
- let $done := $completed = $steps
- return
- api:list(
- element title {
- concat("Compile status for ", substring-before($path,"/status"))
- },
-
-
Current status: {
- if (exists($error-doc))
- then (
- Error,
-
- )
- else if ($done)
- then
- Complete
- else if ($current = 0)
- then (
- Queued,
- " with ",
- {jobs:wait-in-queue($job)},
- " jobs ahead in the queue."
- )
- else (
- {$completed},
- " of ",
- {$steps},
- " stages completed."
- )
- }
-
,
- 0,
- false(),
- ("GET"),
- api:html-content-type(),
- ()
- )
- else
- api:error(404, "Not found", $path)
-};
-
-if (api:allowed-method('GET'))
-then
- let $auth := api:request-authentication() or true()
- let $share-type := request:get-parameter('share-type', ())
- let $owner := request:get-parameter('owner', ())
- let $resource := request:get-parameter('resource', ())
- let $format := request:get-parameter('format', ())
- let $path := request:get-parameter('path', ())
- return
- (: require-authentication-as-group ? :)
- if (data:is-valid-share-type($share-type))
- then
- if (data:is-valid-owner($share-type, $owner))
- then
- if (api:require-authentication-as($share-type, $owner, true()))
- then
- local:get($path)
- else
- api:error((), "Access forbidden.")
- else
- api:error(404, concat("Invalid owner for the given share type ", $share-type), $owner)
- else
- api:error(404, "Invalid share type. Acceptable values are 'group'", $share-type)
-else
- (: disallowed method :)
- ()
diff --git a/code/api/data/queries/combine.xqm b/code/api/data/queries/combine.xqm
deleted file mode 100644
index a1190001..00000000
--- a/code/api/data/queries/combine.xqm
+++ /dev/null
@@ -1,232 +0,0 @@
-(:~
- : Serve the -combined activity, which GETs the cached version
- : of a given document or element (which must have an id!)
- : and PUTs back a combined version using the roundtrip transform
- : May GET/PUT in either XML or transformed XHTML.
- :
- : Copyright 2011-2012 Efraim Feinstein
- : Licensed under the GNU Lesser General Public License, version 3 or later
- :)
-module namespace combine = 'http://jewishliturgy.org/api/data/combine';
-
-import module namespace app="http://jewishliturgy.org/modules/app"
- at "/code/modules/app.xqm";
-import module namespace api="http://jewishliturgy.org/modules/api"
- at "/code/api/modules/api.xqm";
-import module namespace format="http://jewishliturgy.org/modules/format"
- at "/code/modules/format.xqm";
-import module namespace jcache="http://jewishliturgy.org/modules/cache"
- at "/code/modules/cache-controller.xqm";
-import module namespace nav="http://jewishliturgy.org/modules/nav"
- at "nav.xqm";
-import module namespace reverse="http://jewishliturgy.org/modules/reverse"
- at "/code/transforms/reverse-to-db/reverse.xqm";
-
-declare default element namespace "http://www.w3.org/1999/xhtml";
-declare namespace tei="http://www.tei-c.org/ns/1.0";
-declare namespace j="http://jewishliturgy.org/ns/jlptei/1.0";
-declare namespace jx="http://jewishliturgy.org/ns/jlp-processor";
-
-declare variable $combine:allowed-methods := ("GET", "PUT");
-declare variable $combine:accept-content-type := (
- api:html-content-type(true()),
- api:xml-content-type(),
- api:tei-content-type()
- );
-declare variable $combine:request-content-type := (
- api:html-content-type(true()),
- api:xml-content-type(),
- api:tei-content-type()
- );
-declare variable $combine:test-source := "/code/tests/api/data/original/combine.t.xml";
-
-declare function combine:title(
- $uri as xs:anyAtomicType
- ) as xs:string {
- "Combined mode"
-};
-
-declare function combine:allowed-methods(
- $uri as xs:anyAtomicType
- ) as xs:string* {
- $combine:allowed-methods
-};
-
-declare function combine:accept-content-type(
- $uri as xs:anyAtomicType
- ) as xs:string* {
- $combine:accept-content-type
-};
-
-declare function combine:request-content-type(
- $uri as xs:anyAtomicType
- ) as xs:string* {
- $combine:request-content-type
-};
-
-(:~ indicates if the selected URI or node can be represented
- : in the combine state
- :)
-declare function combine:is-combinable(
- $uri-or-node as item()
- ) as xs:boolean {
- let $item :=
- typeswitch($uri-or-node)
- case xs:anyAtomicType return nav:api-path-to-sequence($uri-or-node)
- default return $uri-or-node
- return (
- $item instance of document-node() or
- ($item instance of element() and exists($item/@xml:id))
- )
-};
-
-declare function combine:list-entry(
- $uri as xs:anyAtomicType
- ) as element(li) {
- (: this function probably does not have to change :)
- if (combine:is-combinable($uri))
- then
- api:list-item(
- element span {combine:title($uri)},
- $uri,
- combine:allowed-methods($uri),
- combine:accept-content-type($uri),
- combine:request-content-type($uri),
- ()
- )
- else ()
-};
-
-declare function local:disallowed() {
- (: This probably needs no changes :)
- let $d := api:allowed-method($combine:allowed-methods)
- where not($d)
- return api:error((), "Method not allowed")
-};
-
-declare function combine:get() {
- let $test-result := api:tests($combine:test-source)
- let $accepted := api:get-accept-format($combine:accept-content-type)
- let $uri := request:get-uri()
- return
- if (not($accepted instance of element(api:content-type)))
- then $accepted
- else if ($test-result)
- then $test-result
- else
- let $format := api:simplify-format($accepted, "none")
- let $sequence := nav:api-path-to-sequence($uri)
- let $doc-root := root($sequence)
- let $doc-uri := document-uri($doc-root)
- let $null :=
- (: make sure the cache is up to date :)
- jcache:cache-all($doc-uri, app:auth-user(), app:auth-password())
- let $cached-document-path := jcache:cached-document-path($doc-uri)
- let $cached-document := doc($cached-document-path)
- let $cached-xml :=
- let $cached-content :=
- typeswitch($sequence)
- case document-node() return $cached-document/*
- default return $cached-document//*[@jx:id=$sequence/@xml:id][1]
- return
- (: add @xml:base so the pointers will point to the right place
- : the likely URI for here is .../-id/***/-combined
- : the base URI is ...
- :)
- element { QName(namespace-uri($cached-content), name($cached-content) ) } {
- if ($cached-content/@xml:base)
- then ()
- else attribute xml:base { base-uri($cached-content) },
- if ($cached-content/@jx:document-uri)
- then ()
- else $cached-content/ancestor::*[@jx:document-uri][1]/@jx:document-uri,
- if ($cached-content/@xml:lang)
- then ()
- else $cached-content/ancestor::*[@xml:lang][1]/@xml:lang,
- $cached-content/(@*|*)
- }
- return (
- api:serialize-as($format, $accepted),
- if ($format = ("xml", "tei"))
- then $cached-xml
- else (
- (: html :)
- format:format-xhtml($cached-xml, ()),
- util:declare-option("exist:serialize", "indent=no")
- )
- )
-};
-
-(: check if the user has write access to a document :)
-declare function local:unauthorized-write(
- $uri as xs:string
- ) as element()? {
- let $element := nav:api-path-to-sequence($uri)
- where empty($element)
- return
- api:error(404, "Not found", $uri)
-};
-
-declare function combine:put() {
- let $accepted := api:get-request-format($combine:request-content-type)
- let $uri := request:get-uri()
- let $unauthorized := local:unauthorized-write($uri)
- let $data := api:get-data()
- return
- if (not($accepted instance of element(api:content-type)))
- then $accepted
- else if ($unauthorized)
- then $unauthorized
- else
- let $format := api:simplify-format($accepted, "none")
- let $tei-data :=
- if ($format = ("xhtml", "html"))
- then
- format:reverse-xhtml($data, app:auth-user(), app:auth-password())/*
- else $data
- return
- if (not($tei-data[@jx:document-uri]))
- then (
- api:error(400, "Combined data must make reference to its origin (@jx:document-uri) in the root element"),
- util:log-system-out(("Combined data: ", $tei-data))
- )
- else (
- reverse:merge(reverse:reverse($tei-data, $uri)),
- api:serialize-as("none"),
- response:set-status-code(204)
- )
-};
-
-declare function combine:post() {
- local:disallowed()
-};
-
-declare function combine:delete() {
- local:disallowed()
-};
-
-declare function combine:go(
- ) {
- combine:go(())
-};
-
-declare function combine:go(
- $sequence as item()*
- ) {
- let $method := api:get-method()
- let $uri := request:get-uri()
- let $combinable := combine:is-combinable(($sequence, $uri)[1])
- return
- if (not($combinable))
- then api:error(404, "Not found")
- else if ($method = "GET")
- then combine:get()
- else if ($method = "PUT")
- then combine:put()
- else if ($method = "POST")
- then combine:post()
- else if ($method = "DELETE")
- then combine:delete()
- else local:disallowed()
-};
-
diff --git a/code/api/data/queries/compile.xqm b/code/api/data/queries/compile.xqm
deleted file mode 100644
index f6e20b84..00000000
--- a/code/api/data/queries/compile.xqm
+++ /dev/null
@@ -1,226 +0,0 @@
-xquery version "1.0";
-(:~ Activity to format a document resource.
- : Required parameters:
- : to= format
- : output= group
- : style= location of style file
- :
- : Method: POST
- : Status:
- : 202 Accepted, request is queued for processing
- : 401, 403 Authentication
- : 404 Bad format
- : Returns Location header
- :
- : Open Siddur Project
- : Copyright 2011-2012 Efraim Feinstein
- : Licensed under the GNU Lesser General Public License, version 3 or later
- :)
-module namespace compile="http://jewishliturgy.org/api/data/compile";
-
-import module namespace api="http://jewishliturgy.org/modules/api"
- at "/code/api/modules/api.xqm";
-import module namespace app="http://jewishliturgy.org/modules/app"
- at "/code/modules/app.xqm";
-import module namespace data="http://jewishliturgy.org/modules/data"
- at "/code/api/modules/data.xqm";
-import module namespace format="http://jewishliturgy.org/modules/format"
- at "/code/modules/format.xqm";
-import module namespace jcache="http://jewishliturgy.org/modules/cache"
- at "/code/modules/cache-controller.xqm";
-import module namespace nav="http://jewishliturgy.org/modules/nav"
- at "/code/api/modules/nav.xqm";
-
-declare default element namespace "http://www.w3.org/1999/xhtml";
-declare namespace tei="http://www.tei-c.org/ns/1.0";
-
-declare variable $compile:valid-compile-targets := ('fragmentation', 'debug-data-compile', 'debug-list-compile', 'xhtml', 'html');
-
-declare variable $compile:allowed-methods := ("GET","POST");
-declare variable $compile:accept-content-type := api:html-content-type();
-declare variable $compile:request-content-type := api:html-content-type();
-declare variable $compile:test-source := "/code/tests/api/data/compile.t.xml";
-
-declare function compile:title(
- $uri as xs:anyAtomicType
- ) as xs:string {
- "Compilation"
-};
-
-declare function compile:allowed-methods(
- $uri as xs:anyAtomicType
- ) as xs:string* {
- $compile:allowed-methods
-};
-
-declare function compile:accept-content-type(
- $uri as xs:anyAtomicType
- ) as xs:string* {
- $compile:accept-content-type
-};
-
-declare function compile:request-content-type(
- $uri as xs:anyAtomicType
- ) as xs:string* {
- $compile:request-content-type
-};
-
-declare function compile:list-entry(
- $uri as xs:anyAtomicType
- ) as element(li) {
- (: this function probably does not have to change :)
- api:list-item(
- element span {compile:title($uri)},
- $uri,
- compile:allowed-methods($uri),
- compile:accept-content-type($uri),
- compile:request-content-type($uri),
- ()
- )
-};
-
-declare function local:disallowed() {
- let $d := api:allowed-method($compile:allowed-methods)
- where not($d)
- return api:error((), "Method not allowed")
-};
-
-declare function compile:get() {
- let $test-result := api:tests($compile:test-source)
- let $accepted := api:get-accept-format($compile:accept-content-type)
- let $uri := request:get-uri()
- return
- if (not($accepted instance of element(api:content-type)))
- then $accepted
- else if ($test-result)
- then $test-result
- else (
- api:serialize-as("xhtml", $accepted),
- let $list-body := (
-
{
-
POST to this URL starts the background compilation of the resource {replace($uri, "/-compiled$", "")}.
- The "to" parameter is required, indicating the output format, which may be one of:
-
- {
- for $format in $compile:valid-compile-targets
- return
-
{$format}
- }
-
-
- }
,
- (: insert results here :) ()
- )
- return
- api:list(
- {compile:title($uri)},
- $list-body,
- count($list-body/self::ul[@class="results"]/li),
- false(),
- compile:allowed-methods($uri),
- compile:accept-content-type($uri),
- compile:request-content-type($uri),
- $compile:test-source
- )
- )
-};
-
-declare function compile:put() {
- local:disallowed()
-};
-
-declare function local:setup-output-share(
- $doc as document-node(),
- $output-share as xs:string
- ) as xs:string {
- let $document-name := util:document-name($doc)
- let $group-collection := concat('/group/', $output-share)
- let $output-share-path := concat($group-collection, '/output/', replace($document-name, '\.xml$', ''))
- let $permissions := sm:get-permissions(xs:anyURI($group-collection))
- return (
- app:make-collection-path(
- $output-share-path,
- '/db',
- $permissions/*/@owner/string(),
- $permissions/*/@group/string(),
- $permissions/*/@mode/string()
- ),
- $output-share-path
- )
-};
-
-declare function compile:post() {
- if (api:require-authentication())
- then
- let $uri := request:get-uri()
- let $doc := nav:api-path-to-sequence($uri)
- let $compile := api:get-parameter("to", ())
- return
- if (exists($doc))
- then
- if ($compile = $compile:valid-compile-targets)
- then
- let $user := app:auth-user()
- let $document-uri := document-uri($doc)
- let $output-share-path := local:setup-output-share($doc, $user)
- let $collection-name := util:collection-name($doc)
- let $document-name := util:document-name($doc)
- let $output-api-path := replace($uri, "original", concat("output/", $user))
- let $status-path :=
- concat($output-api-path, "/status")
- let $style := request:get-parameter("style",())
- return (
- format:enqueue-compile(
- $collection-name,
- $document-name,
- $output-share-path,
- $compile,
- $style
- ),
- response:set-status-code(202),
- response:set-header('Location', $output-api-path),
- api:list(
- element title {concat("Compile ", substring-before(request:get-uri(),"/compile"))},
- element ul {
- api:list-item(
- "Compile status",
- $status-path,
- "GET",
- api:html-content-type(),
- ()
- )
- },
- 0,
- false(),
- "POST",
- (),
- api:form-content-type()
- )
- )
- else
- api:error(400, "Bad or missing compile target", $compile)
- else
- api:error(404, "Not found")
- else
- api:error((), "Authentication required")
-};
-
-declare function compile:delete() {
- local:disallowed()
-};
-
-declare function compile:go(
- $sequence as document-node()
- ) {
- let $method := api:get-method()
- return
- if ($method = "GET")
- then compile:get()
- else if ($method = "PUT")
- then compile:put()
- else if ($method = "POST")
- then compile:post()
- else if ($method = "DELETE")
- then compile:delete()
- else local:disallowed()
-};
diff --git a/code/api/data/queries/expanded.xqm b/code/api/data/queries/expanded.xqm
deleted file mode 100644
index a36ccfa0..00000000
--- a/code/api/data/queries/expanded.xqm
+++ /dev/null
@@ -1,188 +0,0 @@
-(:~
- : API module for expanded XML:
- : expanded XML is a view or concurrent section with local pointers
- : expanded
- :
- : Copyright 2011 Efraim Feinstein
- : Licensed under the GNU Lesser General Public License, version 3 or later
- :)
-module namespace expanded = 'http://jewishliturgy.org/api/data/expanded';
-
-import module namespace api="http://jewishliturgy.org/modules/api"
- at "/code/api/modules/api.xqm";
-import module namespace nav="http://jewishliturgy.org/modules/nav"
- at "nav.xqm";
-import module namespace uri="http://jewishliturgy.org/transform/uri"
- at "/code/modules/follow-uri.xqm";
-
-declare default element namespace "http://www.w3.org/1999/xhtml";
-declare namespace tei="http://www.tei-c.org/ns/1.0";
-declare namespace j="http://jewishliturgy.org/ns/jlptei/1.0";
-
-declare variable $expanded:allowed-methods := "GET";
-declare variable $expanded:accept-content-type := (
- api:html-content-type(),
- api:tei-content-type(),
- api:xml-content-type()
- );
-declare variable $expanded:request-content-type := ();
-declare variable $expanded:test-source := "/code/tests/api/data/expanded.t.xml";
-
-declare function expanded:title(
- $uri as xs:anyAtomicType
- ) as xs:string {
- "Expanded mode"
-};
-
-declare function expanded:allowed-methods(
- $uri as xs:anyAtomicType
- ) as xs:string* {
- $expanded:allowed-methods
-};
-
-declare function expanded:accept-content-type(
- $uri as xs:anyAtomicType
- ) as xs:string* {
- $expanded:accept-content-type
-};
-
-declare function expanded:request-content-type(
- $uri as xs:anyAtomicType
- ) as xs:string* {
- $expanded:request-content-type
-};
-
-declare function expanded:list-entry(
- $uri as xs:anyAtomicType
- ) as element(li) {
- api:list-item(
- element span {expanded:title($uri)},
- $uri,
- expanded:allowed-methods($uri),
- expanded:accept-content-type($uri),
- expanded:request-content-type($uri),
- ()
- )
-};
-
-declare function local:disallowed() {
- let $d := api:allowed-method($expanded:allowed-methods)
- where not($d)
- return api:error((), "Method not allowed")
-};
-
-declare function expanded:get() {
- let $test-result := api:tests($expanded:test-source)
- let $accepted := api:get-accept-format($expanded:accept-content-type)
- return
- if (not($accepted instance of element(api:content-type)))
- then $accepted
- else if ($test-result)
- then $test-result
- else
- let $uri := request:get-uri()
- let $element := nav:api-path-to-sequence($uri)
- let $format := api:simplify-format($accepted, "tei")
- return
- if ($format instance of element(error))
- then $format
- else if ($format = ("xml", "tei"))
- then (
- api:serialize-as($format, $accepted),
- expanded:expanded($element)
- )
- else (
- api:serialize-as("xhtml", $accepted),
- let $list-body := (
-
{
-
Provides a formatted XML representation of
- {replace($uri, "/-expanded$", "")} with all internal
- pointers expanded
- }
,
- (: insert results here :) ()
- )
- return
- api:list(
- {expanded:title($uri)},
- $list-body,
- count($list-body/self::ul[@class="results"]/li),
- false(),
- expanded:allowed-methods($uri),
- expanded:accept-content-type($uri),
- expanded:request-content-type($uri),
- $expanded:test-source
- )
- )
-};
-
-declare function expanded:put() {
- local:disallowed()
-};
-
-declare function expanded:post() {
- local:disallowed()
-};
-
-declare function expanded:delete() {
- local:disallowed()
-};
-
-declare function expanded:go(
- $sequence as element()
- ) {
- let $method := api:get-method()
- return
- if ($method = "GET")
- then expanded:get()
- else if ($method = "PUT")
- then expanded:put()
- else if ($method = "POST")
- then expanded:post()
- else if ($method = "DELETE")
- then expanded:delete()
- else local:disallowed()
-};
-
-(:~ run the expanded mode transformation :)
-declare function expanded:expanded(
- $node as node()*
- ) as node()* {
- for $n in $node
- return
- typeswitch($n)
- case document-node() return document { expanded:expanded($n/*) }
- case element(tei:ptr) return expanded:tei-ptr($n)
- case element() return expanded:element($n)
- case text() return $n
- default return $n
-};
-
-declare function expanded:element(
- $node as element()
- ) as element() {
- element { QName(namespace-uri($node), name($node)) }{
- $node/@*,
- expanded:expanded($node/*)
- }
-};
-
-declare function expanded:tei-ptr(
- $node as element(tei:ptr)
- ) as element() {
- let $targets := tokenize($node/@target, "\s+")
- return
- element tei:ptr {
- $node/@*,
- for $uri at $n in $targets
- let $target :=
- uri:fast-follow($node/@target, $node,
- uri:follow-steps($node))
- return
- if (every $t in $target satisfies root($t) is root($node))
- then expanded:expanded($target)
- else
- element tei:ptr {
- attribute target { $targets[$n] }
- }
- }
-};
\ No newline at end of file
diff --git a/code/api/data/queries/license.xqm b/code/api/data/queries/license.xqm
deleted file mode 100644
index 537bc920..00000000
--- a/code/api/data/queries/license.xqm
+++ /dev/null
@@ -1,164 +0,0 @@
-xquery version "1.0";
-(:~ Represents the URI of the license
- :
- : Open Siddur Project
- : Copyright 2011 Efraim Feinstein
- : Licensed under the GNU Lesser General Public License, version 3 or later
- :)
-module namespace lic="http://jewishliturgy.org/api/data/license";
-
-import module namespace api="http://jewishliturgy.org/modules/api"
- at "/code/api/modules/api.xqm";
-import module namespace app="http://jewishliturgy.org/modules/app"
- at "/code/modules/app.xqm";
-import module namespace nav="http://jewishliturgy.org/modules/nav"
- at "/code/api/modules/nav.xqm";
-import module namespace resp="http://jewishliturgy.org/modules/resp"
- at "/code/modules/resp.xqm";
-import module namespace debug="http://jewishliturgy.org/transform/debug"
- at "/code/modules/debug.xqm";
-
-declare default element namespace "http://www.w3.org/1999/xhtml";
-declare namespace tei="http://www.tei-c.org/ns/1.0";
-
-declare variable $lic:allowed-methods := ("GET","PUT");
-declare variable $lic:accept-content-type := (
- api:html-content-type(),
- api:text-content-type()
- );
-declare variable $lic:request-content-type := (
- api:text-content-type(),
- api:form-content-type()
- );
-declare variable $lic:test-source := "/code/tests/api/data/license.t.xml";
-
-declare function lic:title(
- $uri as xs:anyAtomicType
- ) as xs:string {
- "License"
-};
-
-declare function lic:allowed-methods(
- $uri as xs:anyAtomicType
- ) as xs:string* {
- $lic:allowed-methods
-};
-
-declare function lic:accept-content-type(
- $uri as xs:anyAtomicType
- ) as xs:string* {
- $lic:accept-content-type
-};
-
-declare function lic:request-content-type(
- $uri as xs:anyAtomicType
- ) as xs:string* {
- $lic:request-content-type
-};
-
-declare function lic:list-entry(
- $uri as xs:anyAtomicType
- ) as element(li) {
- api:list-item(
- element span {lic:title($uri)},
- $uri,
- lic:allowed-methods($uri),
- lic:accept-content-type($uri),
- lic:request-content-type($uri),
- ()
- )
-};
-
-declare function local:disallowed() {
- let $d := api:allowed-method($lic:allowed-methods)
- where not($d)
- return api:error((), "Method not allowed")
-};
-
-declare function lic:get() {
- let $test-result := api:tests($lic:test-source)
- let $accepted := api:get-accept-format($lic:accept-content-type)
- let $uri := request:get-uri()
- let $doc := nav:api-path-to-sequence($uri)
- let $license-uri := $doc//tei:ref[@type="license"]/@target/string()
- return
- if (not($accepted instance of element(api:content-type)))
- then $accepted
- else if ($test-result)
- then $test-result
- else
- (: TODO: determine write authorization... :)
- let $format := api:simplify-format($accepted, "txt")
- return
- if ($format="xhtml")
- then (
- api:serialize-as("xhtml", $accepted),
- let $list-body :=
-
{
-
{$license-uri}
- }
- return
- api:list(
- {lic:title($uri)},
- $list-body,
- 0,
- false(),
- lic:allowed-methods($uri),
- lic:accept-content-type($uri),
- lic:request-content-type($uri),
- $lic:test-source
- )
- )
- else (
- api:serialize-as("txt", $accepted),
- $license-uri
- )
-};
-
-declare function lic:put() {
- if (api:require-authentication())
- then
- let $uri := request:get-uri()
- let $license-templates := doc('/code/modules/code-tables/licenses.xml')/code-table
- let $data := api:get-parameter("license", (), true())
- let $new-lic := string($data)
- let $boilerplate :=
- $license-templates/license[id=$new-lic]/tei:availability
- let $doc := nav:api-path-to-sequence($uri)
- let $node := $doc//tei:availability
- return
- if (exists($boilerplate))
- then (
- response:set-status-code(204),
- resp:remove($node),
- update replace $node with $boilerplate,
- resp:add($doc//id($boilerplate/@xml:id), "editor", app:auth-user(), "value")
- )
- else
- api:error(400, "The given license URI is not allowed.", $new-lic)
- else api:error((), "Authentication required.")
-};
-
-declare function lic:post() {
- local:disallowed()
-};
-
-declare function lic:delete() {
- local:disallowed()
-};
-
-declare function lic:go(
- $d as document-node()
- ) {
- let $method := api:get-method()
- return
- if ($method = "GET")
- then lic:get()
- else if ($method = "PUT")
- then lic:put()
- else if ($method = "POST")
- then lic:post()
- else if ($method = "DELETE")
- then lic:delete()
- else local:disallowed()
-};
\ No newline at end of file
diff --git a/code/api/data/queries/nav.xql b/code/api/data/queries/nav.xql
deleted file mode 100644
index 5069c9e9..00000000
--- a/code/api/data/queries/nav.xql
+++ /dev/null
@@ -1,59 +0,0 @@
-xquery version "1.0";
-(:~ XML navigation API
- :
- : Open Siddur Project
- : Copyright 2011 Efraim Feinstein
- : Licensed under the GNU Lesser General Public License, version 3 or later
- :)
-import module namespace app="http://jewishliturgy.org/modules/app"
- at "/code/modules/app.xqm";
-import module namespace api="http://jewishliturgy.org/modules/api"
- at "/code/api/modules/api.xqm";
-import module namespace nav="http://jewishliturgy.org/modules/nav"
- at "/code/api/modules/nav.xqm";
-import module namespace navdoc="http://jewishliturgy.org/api/data/navdoc"
- at "/code/api/data/queries/navdoc.xqm";
-import module namespace navel="http://jewishliturgy.org/api/data/navel"
- at "/code/api/data/queries/navel.xqm";
-import module namespace navat="http://jewishliturgy.org/api/data/navat"
- at "/code/api/data/queries/navat.xqm";
-import module namespace compile = "http://jewishliturgy.org/api/data/compile"
- at "/code/api/data/queries/compile.xqm";
-import module namespace combine = "http://jewishliturgy.org/api/data/combine"
- at "/code/api/data/queries/combine.xqm";
-import module namespace lic = "http://jewishliturgy.org/api/data/license"
- at "/code/api/data/queries/license.xqm";
-import module namespace search="http://jewishliturgy.org/api/data/search"
- at "/code/api/data/queries/search.xqm";
-
-
-declare default element namespace "http://www.w3.org/1999/xhtml";
-declare namespace j="http://jewishliturgy.org/ns/jlptei/1.0";
-
-let $auth := app:authenticate()
-let $uri := request:get-uri()
-let $sequence := nav:api-path-to-sequence($uri)
-let $activity := nav:url-to-xpath($uri)/nav:activity/string()
-let $index-uri := "/code/api/data/original"
-return
- if (count($sequence) > 1 or
- request:get-parameter("q", ()) or
- $uri = $index-uri)
- then
- search:go($sequence)
- else
- typeswitch($sequence)
- case element() return
- if ($activity = "-combined")
- then combine:go($sequence)
- else navel:go($sequence)
- case document-node() return
- if ($activity = "-compiled")
- then compile:go($sequence)
- else if ($activity = "-combined")
- then combine:go($sequence)
- else if ($activity = "-license")
- then lic:go($sequence)
- else navdoc:go($sequence)
- case attribute() return navat:go($sequence)
- default return api:error(404, "Not found")
diff --git a/code/api/data/queries/navat.xqm b/code/api/data/queries/navat.xqm
deleted file mode 100644
index 0f769e77..00000000
--- a/code/api/data/queries/navat.xqm
+++ /dev/null
@@ -1,195 +0,0 @@
-(:~
- : navigation API for an attribute.
- :
- : Copyright 2011 Efraim Feinstein
- : Licensed under the GNU Lesser General Public License, version 3 or later
- :)
-module namespace navat = 'http://jewishliturgy.org/api/data/navat';
-
-import module namespace api="http://jewishliturgy.org/modules/api"
- at "/code/api/modules/api.xqm";
-import module namespace app="http://jewishliturgy.org/modules/app"
- at "/code/modules/app.xqm";
-import module namespace nav="http://jewishliturgy.org/modules/nav"
- at "nav.xqm";
-import module namespace resp="http://jewishliturgy.org/modules/resp"
- at "/code/modules/resp.xqm";
-
-declare default element namespace "http://www.w3.org/1999/xhtml";
-declare namespace tei="http://www.tei-c.org/ns/1.0";
-
-declare variable $navat:allowed-methods := ("GET","PUT","DELETE");
-declare variable $navat:accept-content-type := (
- api:html-content-type(),
- api:text-content-type()
- );
-declare variable $navat:request-content-type := (
- api:text-content-type()
- );
-declare variable $navat:test-source := "/code/tests/api/original/navat.t.xml";
-
-declare function navat:title(
- $uri as item()
- ) as xs:string {
- let $attr :=
- if ($uri instance of attribute())
- then $uri
- else nav:api-path-to-sequence($uri)
- return concat("@", name($attr))
-};
-
-declare function navat:allowed-methods(
- $uri as item()
- ) as xs:string* {
- $navat:allowed-methods
-};
-
-declare function navat:accept-content-type(
- $uri as item()
- ) as xs:string* {
- $navat:accept-content-type
-};
-
-declare function navat:request-content-type(
- $uri as item()
- ) as xs:string* {
- $navat:request-content-type
-};
-
-declare function navat:list-entry(
- $uri as item()
- ) as element(li) {
- api:list-item(
- element span {navat:title($uri)},
- if ($uri instance of attribute())
- then nav:sequence-to-api-path($uri)
- else $uri,
- navat:allowed-methods($uri),
- navat:accept-content-type($uri),
- navat:request-content-type($uri),
- ()
- )
-};
-
-declare function local:disallowed() {
- let $d := api:allowed-method($navdoc:allowed-methods)
- where not($d)
- return api:error((), "Method not allowed")
-};
-
-(: check if we have access to the document and if it exists
- : if it doesn't exist, use error 404. If we do not have access
- : send 401 (if not logged in) or 403 (if logged in as a different user)
- :)
-declare function local:unauthorized-read(
- $uri as xs:string
- ) as element()? {
- let $attribute := nav:api-path-to-sequence($uri)
- where empty($attribute)
- return
- api:error(404, "Attribute cannot be found", $uri)
-};
-
-(: check if the user has write access to a document :)
-declare function local:unauthorized-write(
- $uri as xs:string
- ) as element()? {
- let $attribute := nav:api-path-to-sequence($uri)
- where empty($attribute)
- return
- api:error(404, "Attribute cannot be found", $uri)
-};
-
-declare function navat:get() {
- let $test-result := api:tests($navat:test-source)
- let $uri := request:get-uri()
- let $accepted := api:get-accept-format(navat:accept-content-type($uri))
- let $format := api:simplify-format($accepted, "xhtml")
- let $unauthorized := local:unauthorized-read($uri)
- let $position := substring-after($uri, ";")
- return
- if (not($accepted instance of element(api:content-type)))
- then $accepted
- else if ($test-result)
- then $test-result
- else if ($unauthorized)
- then $unauthorized
- else
- let $value := nav:api-path-to-sequence($uri)/string()
- return
- if ($format = "txt")
- then $value
- else
- api:list(
- {navat:title($uri)},
-
-
{$value}
-
,
- 0,
- false(),
- navat:allowed-methods($uri),
- navat:accept-content-type($uri),
- navat:request-content-type($uri),
- $navat:test-source
- )
-};
-
-declare function navat:put() {
- let $uri := request:get-uri()
- let $unauthorized := local:unauthorized-write($uri)
- let $attribute := nav:api-path-to-sequence($uri)
- let $data := api:get-data()
- let $accepted := api:get-accept-format($navdoc:request-content-type)
- return
- if (not($accepted instance of element(api:content-type)))
- then $accepted
- else if ($unauthorized)
- then $unauthorized
- else
- (
- resp:remove($attribute),
- update value $attribute with $data,
- resp:add-attribute($attribute, "editor", app:auth-user(), "value")
- )
-};
-
-declare function navat:post() {
- local:disallowed()
-};
-
-declare function navat:delete() {
- let $uri := request:get-uri()
- let $unauthorized := local:unauthorized-write($uri)
- return
- if ($unauthorized)
- then $unauthorized
- else
- let $attribute := nav:api-path-to-sequence($uri)
- return (
- resp:remove($attribute),
- update delete $attribute,
- response:set-status-code(204)
- )
-};
-
-declare function navat:go(
- ) {
- navat:go(nav:api-path-to-sequence(request:get-uri()))
-};
-
-declare function navat:go(
- $attr as attribute()
- ) {
- let $method := api:get-method()
- return
- if ($method = "GET")
- then navat:get()
- else if ($method = "PUT")
- then navat:put()
- else if ($method = "POST")
- then navat:post()
- else if ($method = "DELETE")
- then navat:delete()
- else local:disallowed()
-};
-
diff --git a/code/api/data/queries/navdoc.xqm b/code/api/data/queries/navdoc.xqm
deleted file mode 100644
index 8e9ab236..00000000
--- a/code/api/data/queries/navdoc.xqm
+++ /dev/null
@@ -1,272 +0,0 @@
-(:~
- : navigation API for a document
- :
- : Copyright 2011 Efraim Feinstein
- : Licensed under the GNU Lesser General Public License, version 3 or later
- :)
-module namespace navdoc = 'http://jewishliturgy.org/api/data/navdoc';
-
-import module namespace api="http://jewishliturgy.org/modules/api"
- at "/code/api/modules/api.xqm";
-import module namespace ridx="http://jewishliturgy.org/modules/refindex"
- at "/code/modules/refindex.xqm";
-import module namespace nav="http://jewishliturgy.org/modules/nav"
- at "/code/api/modules/nav.xqm";
-import module namespace navel="http://jewishliturgy.org/api/data/navel"
- at "navel.xqm";
-import module namespace navat="http://jewishliturgy.org/api/data/navat"
- at "navat.xqm";
-import module namespace compile="http://jewishliturgy.org/api/data/compile"
- at "compile.xqm";
-import module namespace lic="http://jewishliturgy.org/api/data/license"
- at "license.xqm";
-
-declare default element namespace "http://www.w3.org/1999/xhtml";
-declare namespace tei="http://www.tei-c.org/ns/1.0";
-declare namespace j="http://jewishliturgy.org/ns/jlptei/1.0";
-
-declare variable $navdoc:allowed-methods := ("GET","PUT","DELETE");
-declare variable $navdoc:accept-content-type := (
- api:html-content-type(),
- api:xml-content-type(),
- api:tei-content-type()
- );
-declare variable $navdoc:request-content-type := (
- api:xml-content-type(),
- api:tei-content-type()
- );
-declare variable $navdoc:test-source := "/code/tests/api/data/original/navdoc.t.xml";
-
-declare function navdoc:title(
- $uri-or-doc-node as item()
- ) as xs:string {
- let $doc :=
- if ($uri-or-doc-node instance of document-node())
- then $uri-or-doc-node
- else nav:api-path-to-sequence($uri-or-doc-node)
- return
- string($doc//tei:title[@type="main"])
-};
-
-declare function navdoc:allowed-methods(
- $uri as item()
- ) as xs:string* {
- $navdoc:allowed-methods
-};
-
-declare function navdoc:accept-content-type(
- $uri as item()
- ) as xs:string* {
- $navdoc:accept-content-type
-};
-
-declare function navdoc:request-content-type(
- $uri as item()
- ) as xs:string* {
- $navdoc:request-content-type
-};
-
-declare function navdoc:list-entry(
- $uri as item()
- ) as element(li) {
- api:list-item(
- element span {navdoc:title($uri)},
- if ($uri instance of document-node())
- then nav:sequence-to-api-path($uri)
- else $uri,
- navdoc:allowed-methods($uri),
- navdoc:accept-content-type($uri),
- navdoc:request-content-type($uri),
- ()
- )
-};
-
-declare function local:disallowed() {
- let $d := api:allowed-method($navdoc:allowed-methods)
- where not($d)
- return api:error((), "Method not allowed")
-};
-
-(: check if we have access to the document and if it exists
- : if it doesn't exist, use error 404. If we do not have access
- : send 401 (if not logged in) or 403 (if logged in as a different user)
- :)
-declare function local:unauthorized-read(
- $uri as xs:string
- ) as element()? {
- let $document := nav:api-path-to-sequence($uri)
- where empty($document)
- return
- api:error(404, "Document cannot be found", $uri)
-};
-
-(: check if the user has write access to a document :)
-declare function local:unauthorized-write(
- $uri as xs:string
- ) as element()? {
- let $document := nav:api-path-to-sequence($uri)
- where empty($document)
- return
- api:error(404, "Document cannot be found", $uri)
-};
-
-declare function navdoc:get() {
- let $test-result := api:tests($navdoc:test-source)
- let $accepted := api:get-accept-format($navdoc:accept-content-type)
- let $format := api:simplify-format($accepted, "xhtml")
- let $uri := request:get-uri()
- let $doc := nav:api-path-to-sequence($uri)
- let $unauthorized := local:unauthorized-read($uri)
- return
- if (not($accepted instance of element(api:content-type)))
- then $accepted
- else if ($test-result)
- then $test-result
- else if ($unauthorized)
- then $unauthorized
- else if ($format = ("tei", "xml"))
- then (
- api:serialize-as("xml", $accepted),
- $doc
- )
- else (
- api:serialize-as("xhtml", $accepted),
- let $list-body := (
-
{
- for $entry-point in $nav:shortcuts/*[string(@to)]
- let $entry-point-uri := concat($uri, "/", $entry-point/@path)
- let $ep := nav:api-path-to-sequence($entry-point-uri)
- let $allowed-methods :=
- typeswitch($ep)
- case element() return navel:allowed-methods($ep)
- case element()+ return "GET"
- case attribute() return navat:allowed-methods($ep)
- default return ()
- let $accept-content-types :=
- typeswitch($ep)
- case element() return navel:accept-content-type($ep)
- case element()+ return (api:html-content-type(), api:xml-content-type(), api:tei-content-type())
- case attribute() return navat:accept-content-type($ep)
- default return ()
- let $request-content-types :=
- typeswitch($ep)
- case element() return navel:request-content-type($ep)
- case element()+ return ()
- case attribute() return navat:request-content-type($ep)
- default return ()
- return
- api:list-item(
- {$entry-point/nav:name/string()},
- $entry-point-uri,
- $allowed-methods,
- $accept-content-types,
- $request-content-types,
- ()
- ),
- let $compile-link := concat($uri, "/-compiled")
- let $license-link := concat($uri, "/-license")
- return (
- compile:list-entry($compile-link),
- lic:list-entry($license-link)
- )
- }
,
-
{
- navel:list-entry($doc/*)
- }
- )
- return
- api:list(
- {navdoc:title($uri)},
- $list-body,
- count($list-body/self::ul[@class="results"]/li),
- true(),
- navdoc:allowed-methods($uri),
- navdoc:accept-content-type($uri),
- navdoc:request-content-type($uri),
- $navdoc:test-source
- )
- )
-};
-
-declare function navdoc:put() {
- let $uri := request:get-uri()
- let $unauthorized := local:unauthorized-write($uri)
- let $doc := nav:api-path-to-sequence($uri)
- let $root := $doc/*
- let $replacement := api:get-data()
- let $accepted := api:get-accept-format($navdoc:request-content-type)
- return
- if (not($accepted instance of element(api:content-type)))
- then $accepted
- else if ($unauthorized)
- then $unauthorized
- else if (not(local-name($replacement)=local-name($root))
- and (namespace-uri($replacement)=namespace-uri($root)))
- then
- api:error(400, "The new document must have the same root element as the one it is replacing.", name($replacement))
- else
- if (xmldb:store(util:collection-name($doc), util:document-name($doc),
- $replacement))
- then (
- response:set-status-code(204)
- )
- else
- api:error(500, "The document could not be stored.")
-};
-
-declare function navdoc:post() {
- local:disallowed()
-};
-
-declare function navdoc:delete() {
- let $uri := request:get-uri()
- let $unauthorized := local:unauthorized-write($uri)
- return
- if ($unauthorized)
- then $unauthorized
- else
- let $doc := nav:api-path-to-sequence($uri)
- let $references := ridx:lookup-document($doc)
- let $collection := util:collection-name($doc)
- let $name := util:document-name($doc)
- return
- if (empty($references))
- then (
- xmldb:remove($collection, $name),
- response:set-status-code(204)
- )
- else
- api:error(400, "You cannot delete a document that other documents reference. The other documents are listed.",
- for $referencing-doc in
- distinct-values(
- for $ref in $references
- return document-uri(root($ref))
- )
- return
- {
- nav:sequence-to-api-path(doc($referencing-doc))
- }
- )
-};
-
-declare function navdoc:go(
- ) {
- navdoc:go(nav:api-path-to-sequence(request:get-uri()))
-};
-
-declare function navdoc:go(
- $doc as document-node()
- ) {
- let $method := api:get-method()
- return
- if ($method = "GET")
- then navdoc:get()
- else if ($method = "PUT")
- then navdoc:put()
- else if ($method = "POST")
- then navdoc:post()
- else if ($method = "DELETE")
- then navdoc:delete()
- else local:disallowed()
-};
-
diff --git a/code/api/data/queries/navel.xqm b/code/api/data/queries/navel.xqm
deleted file mode 100644
index 8d0e0996..00000000
--- a/code/api/data/queries/navel.xqm
+++ /dev/null
@@ -1,465 +0,0 @@
-(:~
- : navigation API for an element. Some elements may need special processing
- :
- : Copyright 2011 Efraim Feinstein
- : Licensed under the GNU Lesser General Public License, version 3 or later
- :)
-module namespace navel = 'http://jewishliturgy.org/api/data/navel';
-
-import module namespace api="http://jewishliturgy.org/modules/api"
- at "/code/api/modules/api.xqm";
-import module namespace app="http://jewishliturgy.org/modules/app"
- at "/code/modules/app.xqm";
-import module namespace nav="http://jewishliturgy.org/modules/nav"
- at "nav.xqm";
-import module namespace navat="http://jewishliturgy.org/api/data/navat"
- at "navat.xqm";
-import module namespace expanded="http://jewishliturgy.org/api/data/expanded"
- at "expanded.xqm";
-import module namespace resp="http://jewishliturgy.org/modules/resp"
- at "/code/modules/resp.xqm";
-
-declare default element namespace "http://www.w3.org/1999/xhtml";
-declare namespace tei="http://www.tei-c.org/ns/1.0";
-declare namespace err="http://jewishliturgy.org/errors";
-declare namespace j="http://jewishliturgy.org/ns/jlptei/1.0";
-
-declare variable $navel:allowed-methods := ("GET","PUT","POST","DELETE");
-declare variable $navel:accept-content-type := (
- api:html-content-type(),
- api:xml-content-type(),
- api:tei-content-type()
- );
-declare variable $navel:request-content-type := (
- api:xml-content-type(),
- api:tei-content-type(),
- api:text-content-type()
- );
-declare variable $navel:test-source := "/code/tests/api/data/original/navel.t.xml";
-
-(: the element can be given as an element() or a uri to the element :)
-declare function navel:title(
- $uri-or-element as item()
- ) as xs:string {
- let $element :=
- if ($uri-or-element instance of element())
- then $uri-or-element
- else nav:api-path-to-sequence($uri-or-element)
- let $type := $element/@type/string()
- let $name := name($element)
- let $n := count($element/preceding-sibling::*[name()=$name][if ($type) then (@type=$type) else true()]) + 1
- return string-join(($name, ("(", $type, ")")[$type], ("[", $n, "]")),"")
-};
-
-declare function navel:allowed-methods(
- $uri-or-element as item()
- ) as xs:string* {
- let $xpath :=
- if ($uri-or-element instance of element())
- then ()
- else nav:url-to-xpath($uri-or-element)
- let $position := $xpath/nav:position/string()
- return
- if ($position=("before","after"))
- then ("GET", "PUT")
- else $navel:allowed-methods
-};
-
-declare function navel:accept-content-type(
- $uri-or-element as item()
- ) as xs:string* {
- let $position :=
- if ($uri-or-element instance of element())
- then ()
- else substring-after($uri-or-element, ";")
- return
- if ($position=("before","after"))
- then api:html-content-type()
- else $navel:accept-content-type
-};
-
-declare function navel:request-content-type(
- $uri-or-element as item()
- ) as xs:string* {
- $navel:request-content-type
-};
-
-(:~ return if the given URI supports before/after :)
-declare function navel:supports-positional(
- $uri-or-element as item()
- ) as xs:boolean {
- let $element :=
- if ($uri-or-element instance of element())
- then $uri-or-element
- else nav:api-path-to-sequence($uri-or-element)
- return
- name($element)=("tei:ptr")
-};
-
-(:~ return true() if the element in question supports indexed
- : full text search :)
-declare function navel:supports-search(
- $item as item()
- ) as xs:boolean {
- let $element :=
- if ($item instance of element())
- then $item
- else nav:api-path-to-sequence($item)
- return
- typeswitch ($element)
- case element(tei:seg) return true()
- case element(j:repository) return true()
- case element(tei:title) return true()
- default return false()
-};
-
-
-declare function navel:list-entry(
- $uri-or-element as item()
- ) as element(li) {
- let $uri :=
- if ($uri-or-element instance of element())
- then nav:sequence-to-api-path($uri-or-element)
- else $uri-or-element
- return
- api:list-item(
- element span {navel:title($uri-or-element)},
- $uri,
- navel:allowed-methods($uri-or-element),
- navel:accept-content-type($uri-or-element),
- navel:request-content-type($uri-or-element),
- if (navel:supports-positional($uri-or-element))
- then (
- "before", concat($uri, ";before"),
- "after", concat($uri, ";after")
- )
- else ()
- )
-};
-
-declare function local:disallowed() {
- let $d := api:allowed-method($navdoc:allowed-methods)
- where not($d)
- return api:error((), "Method not allowed")
-};
-
-(: check if we have access to the document and if it exists
- : if it doesn't exist, use error 404. If we do not have access
- : send 401 (if not logged in) or 403 (if logged in as a different user)
- :)
-declare function local:unauthorized-read(
- $uri as xs:string
- ) as element()? {
- let $element := nav:api-path-to-sequence($uri)
- where empty($element)
- return
- api:error(404, "Element cannot be found", $uri)
-};
-
-(: check if the user has write access to a document :)
-declare function local:unauthorized-write(
- $uri as xs:string
- ) as element()? {
- let $element := nav:api-path-to-sequence($uri)
- where empty($element)
- return
- api:error(404, "Element cannot be found", $uri)
-};
-
-declare function local:get-position(
- $uri as xs:string,
- $position as xs:string,
- $accepted as element(),
- $format as xs:string
- ) {
- api:serialize-as("xhtml", $accepted),
- api:list(
- {navel:title($uri)},
-
-
Represents the position {$position} {navel:title(concat($uri, "/.."))}
-
,
- 0,
- false(),
- navel:allowed-methods($uri),
- navel:accept-content-type($uri),
- navel:request-content-type($uri),
- $navel:test-source
- )
-};
-
-declare function navel:position-links(
- $uri as xs:string
- ) as item()* {
- if (navel:supports-positional($uri))
- then
- for $position in ("before", "after")
- let $with-position := concat($uri, ";", $position)
- return
- api:list-item(
- {$position},
- $with-position,
- navel:allowed-methods($with-position),
- navel:accept-content-type($with-position),
- navel:request-content-type($with-position),
- ()
- )
- else ()
-};
-
-declare function local:get-noposition(
- $uri as xs:string,
- $accepted as element(),
- $format as xs:string
- ) {
- let $root := nav:api-path-to-sequence($uri)
- let $children := $root/*
- return
- if ($format = ("tei", "xml"))
- then (
- api:serialize-as("xml", $accepted),
- $root
- )
- else (
- api:serialize-as("xhtml", $accepted),
- let $results := ($root/@*, $children)
- let $list-body := (
-
{
- navel:position-links($uri),
- if ($root instance of element(j:view) or
- $root instance of element(j:concurrent))
- then expanded:list-entry(concat($uri, "/-expanded"))
- else ()
- }
,
- let $start := request:get-parameter("start", 1)
- let $max-results := request:get-parameter("max-results", $api:default-max-results)
- let $show := subsequence($results, $start, $max-results)
- return
- element ul {
- attribute class { "results" },
- for $result in $show
- return
- typeswitch($result)
- case attribute()
- return navat:list-entry(concat($uri, "/@", nav:xpath-to-url(name($result))))
- case element()
- return
- let $name := $result/name()
- let $type := $result/@type/string()
- let $n := count($result/preceding-sibling::*[name()=$name][if ($type) then (@type=$type) else true()]) + 1
- let $link :=
- concat($uri, "/",
- nav:xpath-to-url(
- string-join(($name,
- ("[@type='", $type, "']")[$type],
- "[", $n, "]"),"")
- )
- )
- return
- api:list-item(
- element span {
- attribute class {"service"},
- navel:title($result)
- },
- $link,
- navel:allowed-methods($result),
- navel:accept-content-type($result),
- navel:request-content-type($result),
- for $position in ("before", "after")
- let $position-link := concat($uri, ";", $position)
- return ($position, $position-link)
- )
- default return (),
- if (empty($children))
- then
- (element li { attribute class {"content"}, string($root) })
- [string($root)]
- else ()
- }
- )
- return
- api:list(
- {navel:title($uri)},
- $list-body,
- count($results),
- navel:supports-search($uri),
- navel:allowed-methods($uri),
- navel:accept-content-type($uri),
- navel:request-content-type($uri),
- $navel:test-source
- )
- )
-};
-
-declare function navel:get() {
- let $test-result := api:tests($navel:test-source)
- let $uri := request:get-uri()
- let $accepted := api:get-accept-format(navel:accept-content-type($uri))
- let $format := api:simplify-format($accepted, "xhtml")
- let $unauthorized := local:unauthorized-read($uri)
- let $position := substring-after($uri, ";")
- return
- if (not($accepted instance of element(api:content-type)))
- then $accepted
- else if ($test-result)
- then $test-result
- else if ($unauthorized)
- then $unauthorized
- else if ($position = ("before", "after"))
- then local:get-position($uri, $position, $accepted, $format)
- else local:get-noposition($uri, $accepted, $format)
-
-};
-
-declare function navel:put() {
- let $uri := request:get-uri()
- let $unauthorized := local:unauthorized-write($uri)
- let $element := nav:api-path-to-sequence($uri)
- let $data := api:get-data()
- let $new-id := (
- $data/@xml:id/string(),
- $element/@xml:id/string(),
- concat(local-name($data), "_", util:uuid())
- )[1]
- let $accepted := api:get-request-format($navel:request-content-type)
- let $position := substring-after($uri, ";")[.=("before", "after")]
- return
- if (not($accepted instance of element(api:content-type)))
- then $accepted
- else if ($unauthorized)
- then $unauthorized
- else if (count($element) >1)
- then
- api:error(400, "HTTP PUT can only be used on a single element.")
- else
- let $doc := root($element)
- let $data-with-id :=
- element { name($data) }{
- attribute xml:id { $new-id },
- $data/(@* except @xml:id),
- $data/*
- }
- let $return :=
- if ($doc/id($new-id)[not(. is $element) and not($position)])
- then
- api:error(400, "The chosen xml:id is not unique.", $new-id)
- else if ($position="before")
- then
- update insert $data-with-id preceding $element
- else if ($position="after")
- then
- update insert $data-with-id following $element
- else if (local-name($data)=local-name($element)
- and namespace-uri($data)=namespace-uri($element))
- then (
- resp:remove($element),
- update replace $element with $data-with-id
- )
- else
- api:error(400, "Content is not the same type as the document")
- return (
- if ($return instance of element(error))
- then ()
- else (
- resp:add($doc/id($new-id), "author", app:auth-user(), "location value"),
- response:set-status-code(201)
- ),
- $return
- )
-};
-
-declare function navel:post() {
- let $uri := request:get-uri()
- let $element := nav:api-path-to-sequence($uri)
- let $doc := root($element)
- let $requested := api:get-accept-format($navel:request-content-type)
- let $unauthorized := local:unauthorized-write($uri)
- return
- if (not($requested instance of element(api:content-type)))
- then $requested
- else if ($unauthorized)
- then $unauthorized
- else
- let $data := api:get-data()
- let $new-id :=
- if ($data instance of element())
- then
- (
- $data/@xml:id/string(),
- concat(local-name($data), "_", util:uuid())
- )[1]
- else ()
- return
- if (empty($doc/id($new-id)))
- then (
- update insert (
- typeswitch($data)
- case element() return
- element {QName(namespace-uri($data), name($data))} {
- ($data/@xml:id, attribute xml:id { $new-id })[1],
- $data/(@* except @xml:id),
- $data/node()
- }
- default return text { $data }
- ) into $element,
- let $data-id :=
- ($new-id,
- (: inserting text; use the id of the containing element :)
- $element/ancestor-or-self::*[@xml:id][1]/@xml:id/string()
- )[1]
- let $new-element := $doc/id($data-id)
- return (
- resp:add($new-element, "author", app:auth-user(), "value"),
- response:set-header("Location", nav:sequence-to-api-path($new-element)),
- response:set-status-code(201)
- )
- )
- else
- api:error(400, "The identifier cannot be repeated", $new-id)
-
-};
-
-declare function navel:delete() {
- let $uri := request:get-uri()
- let $unauthorized := local:unauthorized-write($uri)
- return
- if ($unauthorized)
- then $unauthorized
- else
- let $element := nav:api-path-to-sequence($uri)
- return (
- resp:remove($element),
- update delete $element,
- response:set-status-code(204)
- )
-};
-
-declare function navel:go(
- ) {
- navel:go(nav:api-path-to-sequence(request:get-uri()))
-};
-
-declare function navel:go(
- $e as element()
- ) {
- let $method := api:get-method()
- let $uri := request:get-uri()
- let $activity := nav:url-to-xpath($uri)/nav:activity/string()
- return
- if ($activity = "-expanded" and (
- $e instance of element(j:view) or
- $e instance of element(j:concurrent)
- ))
- then expanded:go($e)
- else if (not($method = navel:allowed-methods($uri)))
- then local:disallowed()
- else if ($method = "GET")
- then navel:get()
- else if ($method = "PUT")
- then navel:put()
- else if ($method = "POST")
- then navel:post()
- else if ($method = "DELETE")
- then navel:delete()
- else local:disallowed()
-};
-
diff --git a/code/api/data/queries/search.xql b/code/api/data/queries/search.xql
deleted file mode 100644
index e09d0616..00000000
--- a/code/api/data/queries/search.xql
+++ /dev/null
@@ -1,216 +0,0 @@
-xquery version "1.0";
-(:~ Search API for data
- :
- : Available formats: xhtml
- : Method: GET
- : Status:
- : 200 OK
- : 401, 403 Authentication
- : 404 Bad format
- :
- : Open Siddur Project
- : Copyright 2011 Efraim Feinstein
- : Licensed under the GNU Lesser General Public License, version 3 or later
- :)
-import module namespace request="http://exist-db.org/xquery/request";
-import module namespace response="http://exist-db.org/xquery/response";
-import module namespace kwic="http://exist-db.org/xquery/kwic";
-
-import module namespace api="http://jewishliturgy.org/modules/api"
- at "/code/api/modules/api.xqm";
-import module namespace app="http://jewishliturgy.org/modules/app"
- at "/code/modules/app.xqm";
-import module namespace data="http://jewishliturgy.org/modules/data"
- at "/code/api/modules/data.xqm";
-import module namespace scache="http://jewishliturgy.org/modules/scache"
- at "/code/api/modules/scache.xqm";
-
-declare default element namespace "http://www.w3.org/1999/xhtml";
-declare namespace html="http://www.w3.org/1999/xhtml";
-declare namespace tei="http://www.tei-c.org/ns/1.0";
-declare namespace j="http://jewishliturgy.org/ns/jlptei/1.0";
-declare namespace exist="http://exist.sourceforge.net/NS/exist";
-
-declare variable $local:valid-formats := ('xhtml', 'html');
-declare variable $local:valid-subresources := ('title', 'seg', 'repository');
-
-(:~ guess the language of a search result by the language of the match,
- : add to the hit
- : @param $hit the search result hit
- :)
-declare function local:result-with-lang(
- $hit as node()
- ) as element(p)* {
- let $expanded := kwic:expand($hit)
- let $summary := kwic:summarize($hit, element {QName('', 'config')}{attribute width {40}})
- let $lang := string($hit/ancestor::*[@xml:lang][1]/@xml:lang)
- for $p at $i in $summary
- let $match := ($expanded//exist:match)[$i]
- let $pre := $match/preceding-sibling::node()
- let $post := $match/following-sibling::node()
- (: results are sometimes returned with blank matches. Do not return them! :)
- where $p/span[@class='hi']/string()
- return
-
{
- attribute lang {$lang},
- attribute xml:lang {$lang},
- $p/span[@class='previous'],
- (: add something that collapses to a space if the match is not in the middle of a word :)
- {
- concat(if ($pre) then '' else ' ',
- $p/span[@class='hi'],
- if ($post) then '' else ' ')
- },
- $p/span[@class='following']
- }
-};
-
-declare function local:get(
- $path as xs:string
- ) as item() {
- let $path-parts := data:path-to-parts($path)
- let $db-path := data:api-path-to-db($path)
- let $top-level :=
- if (string($path-parts/data:resource))
- then
- if (doc-available($db-path))
- then doc($db-path)
- else api:error(404, "Document not found or inaccessible", $db-path)
- else if (string($path-parts/data:owner))
- then collection($db-path)
- else
- (: no owner, top identifiable level is share-type :)
- collection(concat('/',$path-parts/data:share-type))
- let $collection :=
- if ($top-level instance of document-node())
- then util:collection-name($top-level)
- else if (string($path-parts/data:owner))
- then $db-path
- else concat('/',$path-parts/data:share-type)
- return
- if ($top-level instance of element(error))
- then (
- api:serialize-as('xml'),
- $top-level
- )
- else if (string($path-parts/data:subresource) and not($path-parts/data:subresource = $local:valid-subresources))
- then (
- api:serialize-as('xml'),
- api:error(404, "Invalid subresource", string($path-parts/data:subresource))
- )
- else
- let $query := request:get-parameter('q', ())
- let $start := xs:integer(request:get-parameter('start', 1))
- let $max-results :=
- xs:integer(request:get-parameter('max-results', $api:default-max-results))
- let $subresource := $path-parts/data:subresource/string()
- let $uri := request:get-uri()
- let $results :=
- if (false() (:scache:is-up-to-date($collection, $uri, $query):))
- then
- scache:get-request($uri, $query)
- else
- scache:store($uri, $query,
-
{
- for $result in (
- if ($subresource)
- then
- (: subresources :)
- if ($subresource = 'title')
- then
- if ($path-parts/data:purpose = 'output')
- then $top-level//html:title[ft:query(.,$query)]
- else $top-level//tei:title[ft:query(.,$query)]
- else if ($subresource = 'repository')
- then $top-level//j:repository[ft:query(.,$query)]
- else $top-level//tei:seg[ft:query(.,$query)]
- else if ($path-parts/data:purpose = 'output')
- then
- (: HTML based -- TODO: what happens when we have non-HTML output? :)
- $top-level//html:body[ft:query(., $query)]
- else
- (: TEI-based :)
- $top-level//(j:repository|tei:title)[ft:query(., $query)]
- )
- let $root := root($result)
- let $doc-uri := document-uri($root)
- let $title := $root//(tei:title[@type='main' or not(@type)]|html:title)
- let $title-lang := string($title/ancestor-or-self::*[@xml:lang][1]/@xml:lang)
- let $formatted-result := local:result-with-lang($result)
- let $desc := (
- (: desc contains the document title and the context of the search result :)
- {
- if ($title-lang)
- then (
- attribute lang {$title-lang},
- attribute xml:lang {$title-lang}
- )
- else (),
- normalize-space($title)
- },
- $formatted-result
- )
- let $api-doc := data:db-path-to-api($doc-uri)
- let $link :=
- if ($subresource)
- then concat($api-doc, '/', if ($subresource='seg') then concat('id/', $result/@xml:id) else $subresource)
- else $api-doc
- let $alt := (
- if ($path-parts/data:purpose = "output")
- then (
- "xhtml", concat($api-doc, ".xhtml"),
- "css", concat($api-doc, ".css"),
- "status", concat($api-doc, "/status")
- )
- else (),
- ('db', $doc-uri)
- )
- let $supported-methods := (
- "GET",
- ("POST")[$subresource = ("repository")],
- ("PUT")[$subresource = ("seg", "title")],
- ("DELETE")[$subresource = ("seg", "title")]
- )
- let $request-content-types := (
- (api:html-content-type())[not($subresource)],
- (api:tei-content-type("tei:seg"))[$subresource = ("repository", "seg")],
- (api:tei-content-type("tei:title"))[$subresource = "title"],
- ("text/plain")[$subresource = ("title", "seg")]
- )
- let $accept-content-types := (
- (api:html-content-type())[not($subresource)],
- (api:tei-content-type())[$subresource = ("repository", "seg")],
- (api:tei-content-type())[$subresource = "title"],
- ("text/plain")[$subresource = ("title", "seg")]
- )
- where
- $formatted-result and (
- (: if there's no owner, then we've searched through everything. Need to filter for purpose:)
- if (string($path-parts/data:owner))
- then true()
- else data:path-to-parts($api-doc)/data:purpose/string() eq $path-parts/data:purpose/string()
- )
- order by ft:score($result) descending
- return
- api:list-item($desc, $link, $supported-methods, $accept-content-types, $request-content-types, $alt)
- }
)
- return (
- api:serialize-as('xhtml'),
- api:list(
- Search results for {$uri}?q={$query},
- $results,
- count(scache:get($uri, $query)/li),
- true(),
- "GET",
- api:html-content-type(),
- ()
- )
- )
-};
-
-if (api:allowed-method(('GET')))
-then
- local:get(request:get-uri())
-else
- (:disallowed method:)
- api:error-message("Method not allowed")
diff --git a/code/api/data/queries/search.xqm b/code/api/data/queries/search.xqm
deleted file mode 100644
index 8b4bf5f5..00000000
--- a/code/api/data/queries/search.xqm
+++ /dev/null
@@ -1,366 +0,0 @@
-(:~
- : Module to support search and search results
- :
- : Copyright 2011 Efraim Feinstein
- : Licensed under the GNU Lesser General Public License, version 3 or later
- :)
-module namespace search = 'http://jewishliturgy.org/api/data/search';
-
-import module namespace api="http://jewishliturgy.org/modules/api"
- at "/code/api/modules/api.xqm";
-import module namespace nav="http://jewishliturgy.org/modules/nav"
- at "nav.xqm";
-import module namespace navdoc="http://jewishliturgy.org/api/data/navdoc"
- at "navdoc.xqm";
-import module namespace navel="http://jewishliturgy.org/api/data/navel"
- at "navel.xqm";
-import module namespace navat="http://jewishliturgy.org/api/data/navat"
- at "navat.xqm";
-import module namespace orig="http://jewishliturgy.org/api/data/original"
- at "/code/api/data/original/original.xqm";
-import module namespace kwic="http://exist-db.org/xquery/kwic";
-
-declare default element namespace "http://www.w3.org/1999/xhtml";
-declare namespace tei="http://www.tei-c.org/ns/1.0";
-declare namespace jx="http://jewishliturgy.org/ns/jlp-processor";
-
-declare variable $search:allowed-methods := "GET";
-declare variable $search:accept-content-type := (
- api:html-content-type(),
- api:xml-content-type(),
- api:tei-content-type()
- );
-declare variable $search:request-content-type := ();
-declare variable $search:test-source :=
- let $uri := request:get-uri()
- return
- if ($uri = "/code/api/data/original")
- then $orig:test-source
- else "/code/api/data/search.t.xml";
-
-declare function search:title(
- $uri as xs:anyAtomicType
- ) as xs:string {
- let $q := request:get-parameter("q", ())
- return
- if ($q)
- then concat("Search results: ", $q)
- else $uri
-};
-
-(: the root can be used to POST to a new document :)
-declare function local:is-root(
- $uri as item()+
- ) as xs:boolean {
- $uri instance of xs:anyAtomicType
- and not(replace($uri, "^(/code/api/data)?/original(/)?", ""))
-};
-
-declare function search:allowed-methods(
- $uri as item()+
- ) as xs:string* {
- if (local:is-root($uri))
- then
- ("GET", "POST")
- else
- $search:allowed-methods
-};
-
-declare function search:accept-content-type(
- $uri as item()+
- ) as xs:string* {
- $search:accept-content-type
-};
-
-declare function search:request-content-type(
- $uri as item()+
- ) as xs:string* {
- if (local:is-root($uri))
- then
- (
- api:html-content-type(),
- api:xml-content-type(),
- api:tei-content-type()
- )
- else
- $search:request-content-type
-};
-
-declare function search:list-entry(
- $uri as xs:anyAtomicType
- ) as element(li) {
- api:list-item(
- element span {search:title($uri)},
- $uri,
- search:allowed-methods($uri),
- search:accept-content-type($uri),
- search:request-content-type($uri),
- ()
- )
-};
-
-declare function local:disallowed() {
- let $d := api:allowed-method($search:allowed-methods)
- where not($d)
- return api:error((), "Method not allowed")
-};
-
-declare function local:show-result-context(
- $list-entry as element(li),
- $context as item()
- ) as element(li) {
- element li {
- $list-entry/(@*|node()),
- let $c := $context
- where not($c instance of element(search:empty))
- return
- element { QName(namespace-uri($c), name($c)) }{
- attribute class { "result-context" },
- $c/(@*|node())
- }
- }
-};
-
-declare function local:show-element(
- $result as element(),
- $context as item(),
- $format as xs:string
- ) as element() {
- if ($format = ("xml", "tei"))
- then $result
- else local:show-result-context(
- navel:list-entry(nav:sequence-to-api-path($result)),
- $context
- )
-};
-
-declare function local:show-attribute(
- $result as attribute(),
- $context as item(),
- $format as xs:string
- ) as element() {
- if ($format = ("xml", "tei"))
- then element jx:attribute-result {$result}
- else local:show-result-context(
- navat:list-entry(nav:sequence-to-api-path($result)),
- $context
- )
-};
-
-declare function local:show-document(
- $result as document-node(),
- $context as item(),
- $format as xs:string
- ) as element() {
- let $api-path := nav:sequence-to-api-path($result)
- return
- if ($format = ("xml", "tei"))
- then
- element jx:document-ptr {
- attribute target { $api-path }
- }
- else local:show-result-context(
- navdoc:list-entry($api-path),
- $context
- )
-};
-
-(: show the document that the result came from.
- :
- :)
-declare function local:show-result-document(
- $result-item as element(),
- $result as item(),
- $format as xs:string
- ) {
- element {QName(namespace-uri($result-item), name($result-item))}{
- $result-item/(@*|node()),
- let $result-document := nav:db-path-to-api-path(document-uri(root($result)), ())
- return
- if ($format = ("xml", "tei"))
- then
- element jx:document-ptr {
- attribute target { $result-document }
- }
- else
- element ul {
- attribute class { "result-document" },
- navdoc:list-entry($result-document)
- }
- }
-};
-
-(:~ semi-internal function to display a set of search results
- : as 'xml', 'tei', or 'xhtml'
- : $seq is the uri of the search call or the sequence
- :)
-declare function search:show-results(
- $seq as item()*,
- $results as item()*,
- $format as xs:string
- ) {
- let $sequence :=
- if ($seq instance of xs:anyAtomicType)
- then nav:api-path-to-sequence($seq)
- else $seq
- for $result at $n in $results
- let $result-context := subsequence($results, $n + 1, 1)
- where ($n mod 2) = 1
- return
- let $result-entry :=
- typeswitch($result)
- case element() return local:show-element($result, $result-context, $format)
- case attribute() return local:show-attribute($result, $result-context, $format)
- case document-node() return local:show-document($result, $result-context, $format)
- default return ()
- where $result-entry
- return
- if ($sequence instance of document-node()+)
- then
- local:show-result-document($result-entry, $result, $format)
- else $result-entry
-};
-
-(: get the search results given the sequence pointed to by
- : the API's URI.
- : Return the results in the form:
- : (result1, context1, result2, context2...)
- : If no context is available, return as the context
- :)
-declare function local:get-search-results(
- $seq as item()*
- ) as item()* {
- let $q := request:get-parameter("q", ())
- let $sequence :=
- typeswitch($seq)
- case document-node()+ return
- if ($q)
- then $seq//(tei:title|tei:seg)
- else $seq
- default return $seq
- let $empty-result :=
- let $return-value :=
- if ($q)
- then
- let $owner := request:get-parameter("owner", ())
- let $group := request:get-parameter("group", ())
- for $result in $sequence[ft:query(., $q)]
- [if ($owner) then xmldb:get-owner(.)=$owner else true()]
- [ if ($group)
- then
- xmldb:get-group(util:collection-name(.), util:document-name(.))=$group
- else true()
- ][.]
- let $sum := kwic:summarize($result, )
- let $summary :=
- if (exists($sum))
- then
- (: kwic returns no-namespace! :)
- element p {
- for $span in $sum/*
- return element span { $span/(@*|node()) }
- }
- else $empty-result
- (: WARNING: order by results in *missing elements* -- requires investigation :)
- (:order by ft:score($result) descending:)
- return ($result, $summary)
- else
- for $result in $sequence
- (:
- order by (
- typeswitch ($result)
- case document-node() return string($result//tei:title[@type="main"])
- default return string($result)
- )
- :)
- return ($result, $empty-result)
- return (
- $return-value,
- util:log-system-out(("***Return value=", $return-value))
- )
-};
-
-declare function search:get() {
- let $test-result := api:tests($search:test-source)
- let $accepted := api:get-accept-format($search:accept-content-type)
- let $format := api:simplify-format($accepted, "xhtml")
- let $uri := request:get-uri()
- let $seq := nav:api-path-to-sequence($uri)
- return
- if (not($accepted instance of element(api:content-type)))
- then $accepted
- else if ($test-result)
- then $test-result
- else
- let $results := local:get-search-results($seq)
- let $start := xs:integer(request:get-parameter("start", 1))
- let $max-results :=
- xs:integer(request:get-parameter("max-results", $api:default-max-results))
- let $show := search:show-results(
- $seq,
- subsequence($results, ($start * 2) - 1, ($max-results * 2)),
- $format)
- return
- (
- api:serialize-as($format, $accepted),
- if ($format = ("xml", "tei"))
- then
- element tei:div {
- attribute type { "search-results" },
- attribute jx:start { $start},
- attribute jx:max-results { $max-results },
- attribute jx:n-results { count($results) div 2 },
- $show
- }
- else
- let $list-body := (
-
{
- $show
- }
- )
- return
- api:list(
- {search:title($uri)},
- $list-body,
- count($results) div 2,
- true(),
- search:allowed-methods($uri),
- search:accept-content-type($uri),
- search:request-content-type($uri),
- $search:test-source
- )
- )
-};
-
-declare function search:put() {
- local:disallowed()
-};
-
-declare function search:post() {
- let $uri := request:get-uri()
- return
- if (local:is-root($uri))
- then orig:post()
- else local:disallowed()
-};
-
-declare function search:delete() {
- local:disallowed()
-};
-
-declare function search:go(
- $sequence as item()*
- ) {
- let $method := api:get-method()
- return
- if ($method = "GET")
- then search:get()
- else if ($method = "PUT")
- then search:put()
- else if ($method = "POST")
- then search:post()
- else if ($method = "DELETE")
- then search:delete()
- else local:disallowed()
-};
-
diff --git a/code/api/data/queries/title.xql b/code/api/data/queries/title.xql
deleted file mode 100644
index 643c0967..00000000
--- a/code/api/data/queries/title.xql
+++ /dev/null
@@ -1,171 +0,0 @@
-xquery version "1.0";
-(:~ Title/subtitle: manages the information both in the front matter
- : and the header
- :
- : Available formats: xml, txt
- : Method: GET
- : Status:
- : 200 OK
- : 401, 403 Authentication
- : 404 Bad format
- :
- : Method: PUT
- : Status:
- : 204 Success
- : 401, 403 Authentication
- : 404 Bad format
- :
- : Open Siddur Project
- : Copyright 2011 Efraim Feinstein
- : Licensed under the GNU Lesser General Public License, version 3 or later
- : $Id: title.xql 769 2011-04-29 00:02:54Z efraim.feinstein $
- :)
-import module namespace request="http://exist-db.org/xquery/request";
-import module namespace response="http://exist-db.org/xquery/response";
-
-import module namespace api="http://jewishliturgy.org/modules/api"
- at "/code/api/modules/api.xqm";
-import module namespace data="http://jewishliturgy.org/modules/data"
- at "/code/api/modules/data.xqm";
-import module namespace paths="http://jewishliturgy.org/modules/paths"
- at "/code/modules/paths.xqm";
-
-declare namespace tei="http://www.tei-c.org/ns/1.0";
-
-declare variable $local:valid-formats := ('xml', 'txt');
-
-declare function local:get(
- $node as element(tei:title)?,
- $subresource as xs:string,
- $format as xs:string?
- ) as item() {
- if ($paths:debug)
- then
- util:log-system-out(('title: $subresource =', $subresource, ' $format=', $format))
- else (),
- if ($format = 'xml')
- then (
- api:serialize-as('xml'),
- ($node,
- {
- attribute type {
- if ($subresource = 'title')
- then 'main'
- else 'sub'
- }
- })[1]
- )
- else (
- api:serialize-as('txt'),
- text {string($node)}
- )
-};
-
-declare function local:put(
- $doc as document-node(),
- $node-main as element(tei:title)?,
- $node-front as element(tei:titlePart)?,
- $subresource as xs:string,
- $format as xs:string?
- ) as empty() {
- let $content := api:get-data()
- let $type :=
- if (not($content/@type))
- then
- attribute type {
- if ($subresource = 'title')
- then 'main'
- else 'sub'
- }
- else ()
- return (
- response:set-status-code(204),
- if ($format = 'xml')
- then (
- if (
- data:update-replace-or-insert(
- $node-main,
- $doc//tei:titleStmt,
- element tei:title {
- $content/@*,
- $type,
- $content/node()
- }
- ) or
- data:update-replace-or-insert(
- $node-front,
- $doc//tei:docTitle,
- element tei:titlePart {
- $content/@*,
- $type,
- $content/node()
- }
- )
- )
- then () else ()
- )
- else (
- if (
- data:update-value-or-insert(
- $node-main,
- $doc//tei:titleStmt,
- element tei:title {
- $content/@*,
- $type
- },
- string($content)
- )
- or
- data:update-value-or-insert(
- $node-front,
- $doc//tei:docTitle,
- {
- $content/@*,
- $type
- },
- string($content)
- )
- )
- then () else ()
- )
-
- )
-};
-
-if (api:allowed-method(('GET', 'PUT')))
-then
- let $auth := api:request-authentication() or true()
- (: $user-name the user name in the request URI :)
- let $purpose := request:get-parameter('purpose', ())
- let $share-type := request:get-parameter('share-type', ())
- let $owner := request:get-parameter('owner', ())
- let $resource := request:get-parameter('resource', ())
- let $subresource := request:get-parameter('subresource', ())
- let $format := (request:get-parameter('format', 'xml')[.], 'xml')[1]
- let $doc := data:doc($purpose, $share-type, $owner, $resource, 'xml', $local:valid-formats)
- let $method := api:get-method()
- return
- if ($doc instance of document-node())
- then
- let $node-main :=
- if ($subresource = 'title')
- then
- $doc//tei:title[not(@type) or @type='main']
- else
- $doc//tei:title[@type='sub']
- let $node-front :=
- if ($subresource = 'title')
- then
- $doc//tei:docTitle/tei:titlePart[not(@type) or @type='main']
- else
- $doc//tei:docTitle/tei:titlePart[@type='sub']
- return
- if ($method = 'GET')
- then local:get($node-main, $subresource, $format)
- else local:put($doc, $node-main, $node-front, $subresource, $format)
- else
- (: an error occurred and is in $doc :)
- $doc
-else
- (:disallowed method:)
- api:error-message("Method not allowed")
diff --git a/code/api/data/resources/template.xml b/code/api/data/resources/template.xml
deleted file mode 100644
index 48c1df44..00000000
--- a/code/api/data/resources/template.xml
+++ /dev/null
@@ -1,69 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
- To the extent possible under law, the contributors who associated
- Creative Commons Zero
-
- with this work have waived all copyright and related or neighboring rights to this work.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Open Siddur Builder application
-
-
-
-
-
-
-
-
-
-
-
-
-
- The Open Siddur Project
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/code/api/data/transliteration.xqm b/code/api/data/transliteration.xqm
deleted file mode 100644
index 40d975c6..00000000
--- a/code/api/data/transliteration.xqm
+++ /dev/null
@@ -1,344 +0,0 @@
-xquery version "3.0";
-(: Transliteration API module
- :
- : Functions assume that the following has already been done:
- : authentication,
- : content negotiation
- :
- : Copyright 2012 Efraim Feinstein
- : Open Siddur Project
- : Licensed Under the GNU Lesser General Public License, version 3 or later
- :)
-module namespace tran = 'http://jewishliturgy.org/api/transliteration';
-
-import module namespace acc="http://jewishliturgy.org/modules/access"
- at "/code/api/modules/access.xqm";
-import module namespace api="http://jewishliturgy.org/modules/api"
- at "/code/api/modules/api.xqm";
-import module namespace app="http://jewishliturgy.org/modules/app"
- at "/code/modules/app.xqm";
-import module namespace data="http://jewishliturgy.org/modules/data"
- at "/code/api/modules/data.xqm";
-import module namespace jvalidate="http://jewishliturgy.org/modules/jvalidate"
- at "/code/modules/jvalidate.xqm";
-
-import module namespace kwic="http://exist-db.org/xquery/kwic";
-
-declare namespace tr="http://jewishliturgy.org/ns/tr/1.0";
-
-declare namespace rest="http://exquery.org/ns/rest/annotation/";
-declare namespace output="http://www.w3.org/2010/xslt-xquery-serialization";
-declare namespace error="http://jewishliturgy.org/errors";
-
-declare variable $tran:data-type := "transliteration";
-declare variable $tran:schema := "/schema/transliteration.rnc";
-declare variable $tran:schematron := "/schema/transliteration.xsl2";
-declare variable $tran:path-base := concat($data:path-base, "/", $tran:data-type);
-
-declare function tran:validate(
- $tr as item()
- ) as xs:boolean {
- validation:jing($tr, xs:anyURI($tran:schema)) and
- jvalidate:validation-boolean(
- jvalidate:validate-iso-schematron-svrl($tr, xs:anyURI($tran:schematron))
- )
-};
-
-declare function tran:validate-report(
- $tr as item()
- ) as element() {
- jvalidate:concatenate-reports((
- validation:jing-report($tr, xs:anyURI($tran:schema)),
- jvalidate:validate-iso-schematron-svrl($tr, doc($tran:schematron))
- ))
-};
-
-(: error message when access is not allowed :)
-declare function local:no-access(
- ) as item()+ {
- if (app:auth-user())
- then api:rest-error(403, "Forbidden")
- else api:rest-error(401, "Not authenticated")
-};
-
-declare
- %rest:GET
- %rest:path("/api/data/transliteration/{$name}")
- %rest:produces("application/xml")
- function tran:get(
- $name as xs:string
- ) as item()+ {
- let $doc := data:doc($tran:data-type, $name)
- return
- if ($doc)
- then $doc
- else api:rest-error(404, "Not found", $name)
-};
-
-(:~ Discovery and query API:
- : list accessible transliterations
- : or search
- :)
-declare
- %rest:GET
- %rest:path("/api/data/transliteration")
- %rest:query-param("q", "{$query}", "")
- %rest:query-param("start", "{$start}", 1)
- %rest:query-param("max-results", "{$count}", 100)
- %rest:produces("application/xhtml+xml")
- function tran:list(
- $query as xs:string?,
- $start as xs:integer,
- $count as xs:integer
- ) as item()+ {
-
-
-
-
- ,
- let $results as item()+ :=
- if ($query)
- then local:query($query, $start, $count)
- else local:list($start, $count)
- let $result-element := $results[1]
- let $max-results := $results[3]
- let $total := $results[4]
- return
-
-
- Transliteration API
-
-
-
-
-
-
- {
- $result-element
- }
-
-};
-
-(: @return (list, start, count, n-results) :)
-declare function local:query(
- $query as xs:string,
- $start as xs:integer,
- $count as xs:integer
- ) as item()+ {
- let $all-results :=
- for $doc in collection($tran:path-base)//(tr:title|tr:description)[ft:query(.,$query)]
- order by $doc//tr:title ascending
- return $doc
- let $listed-results :=
- {
- for $result in
- subsequence($all-results, $start, $count)
- let $document := root($result)
- group $result as $hit by $document as $doc
- order by max(for $h in $hit return ft:score($h))
- return
- let $api-name := replace(util:document-name($doc), "\.xml$", "")
- return
-
-
-
-};
-
-(:~ list all available transliteration demos
- : @param $query Limit the search to a particular query
- : @param $start Start the list at the given item number
- : @param $max-results Show this many results
- : @return An HTML list of all transliteration demos that match the given query
- :)
-declare
- %rest:GET
- %rest:path("/api/demo/transliteration")
- %rest:query-param("q", "{$query}", "")
- %rest:query-param("start", "{$start}", 1)
- %rest:query-param("max-results", "{$count}", 100)
- %rest:produces("application/xhtml+xml", "application/xml", "text/html", "text/xml")
- %output:method("html5")
- function demo:transliteration-list(
- $query as xs:string,
- $start as xs:integer,
- $count as xs:integer
- ) as item()+ {
- let $list := tran:list($query, $start, $count)
- return
-
-
- Transliteration demo API
- {$list//head/(* except title)}
-
-
-
This API supports HTTP POST only.
-
If you POST some data to be transliterated to
- /api/demo/schema-name, where you can choose a schema from
- any transliteration schema,
- you will get back a transliterated version.
-
- {
- for $li in $list//li[@class="result"]
- return
-
-
-
-};
-
-
-(:~ post arbitrary XML for transliteration by a given schema
- : @param $schema The schema to transliterate using
- : @return XML of the same structure, containing transliterated text. Use @xml:lang to specify which table should be used.
- : @error HTTP 404 Transliteration schema not found
- :)
-declare
- %rest:POST("{$body}")
- %rest:path("/api/demo/transliteration/{$schema}")
- %rest:consumes("application/xml")
- %rest:produces("application/xml", "text/xml")
- function demo:transliterate-xml(
- $body as document-node(),
- $schema as xs:string
- ) as item()* {
- let $schema-exists := data:doc("transliteration", $schema)
- return
- if ($schema-exists)
- then
- let $transliterated := local:transliterate($body/*, $schema)
- return $transliterated
- else
- api:rest-error(404, "Schema cannot be found", $schema)
-};
-
-(:~ Transliterate plain text
- : @param $body The text to transliterate, which is assumed to be Hebrew
- : @return Transliterated plain text
- : @error HTTP 404 Transliteration schema not found
- :)
-declare
- %rest:POST("{$body}")
- %rest:path("/api/demo/transliteration/{$schema}")
- %rest:consumes("text/plain")
- %rest:produces("text/plain")
- function demo:transliterate-text(
- $body as item(),
- $schema as xs:string
- ) as item()+ {
- let $text :=
- typeswitch($body)
- case xs:base64Binary
- return util:binary-to-string($body)
- default return $body
- let $transliterated :=
- demo:transliterate-xml(
- document {
- {
- $text
- }
- },$schema)
- return
- if ($transliterated[2] instance of element(error))
- then $transliterated
- else (
-
-
-
-
- ,
- data($transliterated)
- )
-};
\ No newline at end of file
diff --git a/code/api/group.xqm b/code/api/group.xqm
deleted file mode 100644
index 48c0b580..00000000
--- a/code/api/group.xqm
+++ /dev/null
@@ -1,414 +0,0 @@
-xquery version "3.0";
-(:~ Group management API
- :
- : Copyright 2012 Efraim Feinstein
- : Licensed under the GNU Lesser General Public License, version 3 or later
- :
- : @author Efraim Feinstein
- :)
-module namespace grp = 'http://jewishliturgy.org/api/group';
-
-import module namespace api="http://jewishliturgy.org/modules/api"
- at "/code/api/modules/api.xqm";
-import module namespace app="http://jewishliturgy.org/modules/app"
- at "/code/modules/app.xqm";
-import module namespace debug="http://jewishliturgy.org/transform/debug"
- at "/code/modules/debug.xqm";
-import module namespace jvalidate="http://jewishliturgy.org/modules/jvalidate"
- at "/code/modules/jvalidate.xqm";
-import module namespace magic="http://jewishliturgy.org/magic"
- at "/code/magic/magic.xqm";
-
-declare namespace g="http://jewishliturgy.org/ns/group/1.0";
-declare namespace rest="http://exquery.org/ns/rest/annotation/";
-declare namespace output="http://www.w3.org/2010/xslt-xquery-serialization";
-declare namespace error="http://jewishliturgy.org/errors";
-
-declare variable $grp:path := "/group";
-
-(:~ List all groups
- : @param $start Begin listing at this item number
- : @param $max-results End listing after this many results
- : @return an HTML list of groups
- :)
-declare
- %rest:GET
- %rest:path("/group")
- %rest:query-param("start", "{$start}", 1)
- %rest:query-param("max-results", "{$max-results}", 100)
- %rest:produces("application/xhtml+xml", "application/xml", "text/html", "text/xml")
- %output:method("html5")
- function grp:list(
- $start as xs:integer,
- $max-results as xs:integer
- ) as item()+ {
- let $all :=
- (: for some reason, eXist considers group existence to be a secret.
- : I think it should be public.
- :)
- system:as-user("admin", $magic:password, sm:get-groups())
- let $total := count($all)
- return
-
-
- Group API index
-
-
-
-
-
-
-
{
- for $group in subsequence($all, $start, $max-results)
- let $api-name := encode-for-uri($group)
- return
-
-
-
-};
-
-(:~ list members of a group, in group XML
- : @param $name Group name
- : @return XML conforming to schema/group.rnc
- : @error HTTP 404 Not found If the group does not exist or is inaccessible
- : @error HTTP 401 Unauthorized If not logged in
- :)
-declare
- %rest:GET
- %rest:path("/group/{$name}")
- %rest:produces("application/xml", "text/xml")
- function grp:get-xml(
- $name as xs:string
- ) as item()+ {
- if (app:auth-user())
- then
- if (sm:get-groups() = $name)
- then
- let $members := sm:get-group-members($name)
- let $managers := sm:get-group-managers($name)
- return
- {
- for $member in $members
- order by $member ascending
- return
- {
- if ($member=$managers)
- then attribute manager { true() }
- else (),
- $member
- }
- }
- else api:rest-error(404, "Not found")
- else api:rest-error(401, "Not authenticated")
-};
-
-(:~ list members of a group, in HTML
- : @param $name The name of the group to list
- : @return an HTML list of group members
- : @error HTTP 401 Unauthorized If not logged in
- : @error HTTP 404 Not found If the group does not exist or is inaccessible
- :)
-declare
- %rest:GET
- %rest:path("/group/{$name}")
- %rest:produces("application/xhtml+xml", "text/html")
- function grp:get-html(
- $name as xs:string
- ) as item()+ {
- let $group := grp:get-xml($name)
- return
- if ($group[2] instance of element(error))
- then $group
- else
-
-
- {$name}
-
-
-
-
-
-};
-
-(:~ List the group memberships of a given user.
- : @return An HTML list of group memberships
- : @error HTTP 401 Unauthorized if not logged in
- : @error HTTP 404 Not found If the user does not exist
- :)
-declare
- %rest:GET
- %rest:path("/user/{$user}/groups")
- %rest:produces("application/xhtml+xml", "application/xml", "text/html", "text/xml")
- function grp:get-user-groups(
- $user as xs:string
- ) as item()+ {
- if (app:auth-user())
- then
- if (xmldb:exists-user($user))
- then
-
-
- {$user}
-
-
-
{
- (: TODO: this code is here because eXist r16512 returns deleted groups
- : until db restart
- :)
- let $all-groups := sm:get-groups()
- for $group in distinct-values(xmldb:get-user-groups($user))[.=$all-groups]
- order by $group
- return
-
-
-
- else api:rest-error(404, "Not found")
- else api:rest-error(401, "Not authorized")
-};
-
-(:~ validate group XML
- : @param $doc Document holding group XML
- : @param $group-name Group name of existing group this XML is intended to describe, empty for a new group
- : @return A boolean
- :)
-(: TODO: use document-node(element(g:group)) :)
-declare function grp:validate(
- $doc as document-node(),
- $group-name as xs:string?
- ) as xs:boolean {
- jvalidate:validation-boolean(
- grp:validate-report($doc, $group-name)
- )
-};
-
-declare function local:validate-existing-group(
- $doc as document-node(),
- $group-name as xs:string
- ) as element(message)* {
- ((: if there were any special validation for an
- : existing group, it would go here:))
-};
-
-(:~ validate a group XML structure
- : @param $doc Group XML
- : @param $group-name Name of existing group the XML is intending to change. If empty, assume it is for a new group.
- : @return A validation report. report/status indicates validity, report/message indicates reasons for invalidity.
- :)
-declare function grp:validate-report(
- $doc as document-node(),
- $group-name as xs:string?
- ) as element(report) {
- jvalidate:concatenate-reports((
- jvalidate:validate-relaxng($doc, xs:anyURI("/schema/group.rnc")),
- let $invalid-users := $doc//g:member/string()[not(xmldb:exists-user(.))]
- let $existing-group-validation :=
- if ($group-name)
- then
- local:validate-existing-group($doc, $group-name)
- else ()
- return
-
- {
- if (empty(($invalid-users, $existing-group-validation)))
- then "valid"
- else "invalid"
- }
- {
- for $user in $invalid-users
- return
- User {$user} does not exist.,
- $existing-group-validation
- }
-
- ))
-};
-
-(:~ Create a group or change membership of a group
- : @param $name Name of group to create or edit
- : @param $body Group XML, which describes the membership of the group
- : @return HTTP 201 successful, new group created
- : @return HTTP 204 successful, group edited
- : @error HTTP 400 if the input is invalid
- : @error HTTP 401 if not logged in
- : @error HTTP 403 if not a group manager
- :
- : Notes:
- : When a group is created, the creating user is a manager, independent of the XML.
- : admin cannot be removed as a group manager.
- : Because of a missing feature in eXist, group management cannot be changed after creation.
- :)
-declare
- %rest:PUT("{$body}")
- %rest:path("/group/{$name}")
- %rest:consumes("application/xml", "text/xml")
- function grp:put(
- $name as xs:string,
- $body as document-node()
- ) as item()+ {
- let $user := app:auth-user()
- return
- if ($user)
- then
- let $group-exists := sm:get-groups()=$name
- return
- if (grp:validate($body, $name[$group-exists]))
- then
- if ($group-exists)
- then
- (: group exists, this is an edit :)
- let $old-managers := sm:get-group-managers($name)
- return
- if ($old-managers=$user)
- then
- let $all-new-members := $body//g:member
- let $all-new-managers := $body//g:member[xs:boolean(@manager)]
- let $old-members := sm:get-group-members($name)
- let $members-to-add := $all-new-members[not(.=$old-members)]
- let $members-to-remove := $old-members[not(.=$all-new-members)][not(.="admin")]
- let $managers-to-add := $all-new-managers[not(.=$old-managers)]
- let $managers-to-remove := $old-managers[not(.=$all-new-managers)][not(.="admin")]
- let $errors := (
- for $member in distinct-values(($members-to-add, $managers-to-add))
- let $added := xmldb:add-user-to-group($member, $name)
- where not($added)
- return $member,
- for $member in $members-to-remove
- let $removed := xmldb:remove-user-from-group($member, $name)
- where not($removed)
- return $member
- )
- let $warnings :=
- let $managers-to-change := ($managers-to-add, $managers-to-remove)
- where exists($managers-to-change)
- return
- debug:debug(
- $debug:warn,
- "group",
- ("Managerial status cannot be changed for: ",
- string-join($managers-to-change, " ")
- )
- )
- return
- if (exists($errors))
- then
- api:rest-error(500, "Could not change group status of:",
- string-join($errors, " ")
- )
- else
-
-
-
-
-
-
- else
- (: not a group manager of an existing group :)
- api:rest-error(403, "Forbidden")
- else
- (: group does not exist, this is group creation :)
- let $members := distinct-values($body//g:member[not(xs:boolean(@manager))])
- let $managers := distinct-values(($body//g:member[xs:boolean(@manager)], "admin", $user))
- let $created :=
- system:as-user("admin", $magic:password,
- xmldb:create-group($name, $managers)
- )
- return
- if ($created)
- then
- let $errors :=
- for $member in $members
- let $added := xmldb:add-user-to-group($member, $name)
- where not($added)
- return $member
- return
- if (exists($errors))
- then
- api:rest-error(500,
- "Could not add users to group",
- string-join($errors, " ")
- )
- else
-
-
-
-
-
-
-
-
- else api:rest-error(500, "Could not create group " || $name)
- else api:rest-error(400, "Validation error", grp:validate-report($body, $name[$group-exists]))
- else api:rest-error(401, "Not authorized")
-};
-
-(:~ delete a group
- : @param $name Group to delete
- : @return HTTP 204 if successful
- : @error HTTP 401 if not logged in
- : @error HTTP 403 if not a group manager
- : @error HTTP 404 if the group does not exist
- :
- : Notes:
- : Resources owned by a deleted group become property of "everyone"
- : TODO: This code has some hacks to work around eXist deficiencies
- :)
-declare
- %rest:DELETE
- %rest:path("/group/{$name}")
- function grp:delete(
- $name as xs:string
- ) as item()+ {
- let $user := app:auth-user()
- return
- if ($user)
- then
- if (sm:get-groups()=$name)
- then
- if (sm:get-group-managers($name)=$user)
- then
-
-
-
-
- {
- (: members are not removed automatically from a deleted group :)
- let $all-group-members := sm:get-group-members($name)
- return system:as-user("admin", $magic:password, (
- for $member in $all-group-members
- let $removed := xmldb:remove-user-from-group($member, $name)
- where not($removed)
- return debug:debug($debug:warn, "group",
- ("Could not remove ", $member, " from ", $name)),
- sm:delete-group($name)
- ))
- }
-
-
- else api:rest-error(403, "Forbidden")
- else api:rest-error(404, "Not found")
- else api:rest-error(401, "Not authorized")
-};
diff --git a/code/api/index.xqm b/code/api/index.xqm
deleted file mode 100644
index 74a8dfd7..00000000
--- a/code/api/index.xqm
+++ /dev/null
@@ -1,66 +0,0 @@
-xquery version "3.0";
-(:~ API module for functions for index URIs
- :
- : Functions assume that the following has already been done:
- : authentication,
- : content negotiation
- :
- : Copyright 2012 Efraim Feinstein
- : Open Siddur Project
- : Licensed Under the GNU Lesser General Public License, version 3 or later
- :)
-module namespace index = 'http://jewishliturgy.org/api/index';
-
-declare namespace rest="http://exquery.org/ns/rest/annotation/";
-declare namespace output="http://www.w3.org/2010/xslt-xquery-serialization";
-declare namespace o="http://a9.com/-/spec/opensearch/1.1/";
-
-(:~ List all available APIs
- : @return An HTML list
- :)
-declare
- %rest:GET
- %rest:path("/api")
- %rest:produces("application/xhtml+xml", "text/html", "application/xml", "text/xml")
- function index:list(
- ) as item()+ {
-
-
-
-
- ,
-
-
- Open Siddur API Index
-
-
-
- {
- (: TODO: replace request:get-uri() with rest:get-absolute-uri()
- :)
- let $api-base := "/api"
- return (
-
-
-
-};
diff --git a/code/api/login.xqm b/code/api/login.xqm
deleted file mode 100644
index 97e7fd6f..00000000
--- a/code/api/login.xqm
+++ /dev/null
@@ -1,173 +0,0 @@
-xquery version "1.0";
-(:~ api login
- :
- : Open Siddur Project
- : Copyright 2011-2012 Efraim Feinstein
- : Licensed under the GNU Lesser General Public License, version 3 or later
- :
- :)
-module namespace login="http://jewishliturgy.org/api/login";
-
-import module namespace api="http://jewishliturgy.org/modules/api"
- at "/code/api/modules/api.xqm";
-import module namespace app="http://jewishliturgy.org/modules/app"
- at "/code/modules/app.xqm";
-import module namespace debug="http://jewishliturgy.org/transform/debug"
- at "/code/modules/debug.xqm";
-
-declare namespace rest="http://exquery.org/ns/rest/annotation/";
-declare namespace output="http://www.w3.org/2010/xslt-xquery-serialization";
-declare namespace error="http://jewishliturgy.org/errors";
-
-(:~ Query who is currently logged in.
- : @return HTTP 200 with an XML entity with the currently logged in user
- :)
-declare
- %rest:GET
- %rest:path("/api/login")
- %rest:produces("application/xml", "text/xml")
- function login:get-xml() {
- let $user := app:auth-user()
- return {$user}
-};
-
-(:~ GET HTML: usually, used as a who am I function,
- : but may also be used to log in by query params.
- : Please do not use it that way, except for debugging
- : @param $user User to log in via HTTP GET
- : @param $password Password of user to log in via HTTP GET
- : @return Who am I as HTML
- :)
-declare
- %rest:GET
- %rest:path("/api/login")
- %rest:query-param("user", "{$user}")
- %rest:query-param("password", "{$password}")
- %rest:produces("application/xhtml+xml", "text/html")
- function login:get-html(
- $user as xs:string?,
- $password as xs:string?
- ) as item()+ {
- let $did-login :=
- if ($user and $password)
- then
- login:post-form($user, $password)
- else ()
- return (
-
-
-
-
- ,
-
-
- Login: who am I?
-
-
-
{app:auth-user()}
-
-
- )
-};
-
-(:~ Log in a user using XML parameters
- : @param $body A document containing login/(user/string(), password/string())
- : @return HTTP 204 Login successful
- : @error HTTP 400 Wrong user name or password
- :)
-declare
- %rest:POST("{$body}")
- %rest:path("/api/login")
- %rest:consumes("application/xml", "text/xml")
- %rest:produces("text/plain")
- function login:post-xml(
- $body as document-node()
- ) as item()+ {
- login:post-form($body//user, $body//password)
-};
-
-(:~ Log in a user using a form
- : @param $user User name
- : @param $password Password
- : @return HTTP 204 Login successful
- : @error HTTP 400 Wrong user name or password
- :)
-declare
- %rest:POST
- %rest:path("/api/login")
- %rest:form-param("user", "{$user}")
- %rest:form-param("password", "{$password}")
- %rest:consumes("application/x-www-url-formencoded")
- %rest:produces("text/plain")
- function login:post-form(
- $user as xs:string?,
- $password as xs:string?
- ) as item()+ {
- if (not($user) or not($password))
- then
- api:rest-error(400, "User name and password are required")
- else
- if (xmldb:authenticate("/db", $user, $password))
- then (
- debug:debug($debug:info, "login",
- ('Logging in ', $user, ':', $password)),
- app:login-credentials($user, $password),
-
-
-
-
-
-
- )
- else (
- api:rest-error(400,"Wrong user name or password")
- )
-};
-
-(:~ log out
- : @return HTTP 204
- :)
-declare function local:logout(
- ) as element(rest:response) {
- app:logout-credentials(),
-
-
-
-
-
-
-};
-
-(:~ request to log out from session-based login
- : @return HTTP 204 on success
- :)
-declare
- %rest:DELETE
- %rest:path("/api/login")
- function login:delete(
- ) as item()+ {
- local:logout()
-};
-
-(:~ request to log out from session-based login
- : @see login:delete
- :)
-declare
- %rest:GET
- %rest:path("/api/logout")
- function login:get-logout(
- ) as item()+ {
- local:logout()
-};
-
-(:~ request to log out
- : @see login:delete
- :)
-declare
- %rest:POST
- %rest:path("/api/logout")
- function login:post-logout(
- ) as item()+ {
- local:logout()
-};
-
diff --git a/code/api/modules/access.xqm b/code/api/modules/access.xqm
deleted file mode 100644
index 5dae21c9..00000000
--- a/code/api/modules/access.xqm
+++ /dev/null
@@ -1,198 +0,0 @@
-xquery version "3.0";
-(:~ common module for reading/writing access (sharing) control
- : Not all types of access restrictions are supported!
- : See the access.rnc schema for details
- :
- : Open Siddur Project
- : Copyright 2012 Efraim Feinstein
- : Licensed under the GNU Lesser General Public License, version 3 or later
- :)
-module namespace acc="http://jewishliturgy.org/modules/access";
-
-import module namespace app="http://jewishliturgy.org/modules/app"
- at "xmldb:exist:///code/modules/app.xqm";
-import module namespace jvalidate="http://jewishliturgy.org/modules/jvalidate"
- at "xmldb:exist:///code/modules/jvalidate.xqm";
-import module namespace magic="http://jewishliturgy.org/magic"
- at "xmldb:exist:///code/magic/magic.xqm";
-
-declare namespace a="http://jewishliturgy.org/ns/access/1.0";
-declare namespace error="http://jewishliturgy.org/errors";
-
-declare variable $acc:schema := "/schema/access.rnc";
-
-declare function acc:validate(
- $access as element(a:access)
- ) as xs:boolean {
- jvalidate:validation-boolean(
- acc:validate-report($access)
- )
-};
-
-declare function local:validate-report(
- $access as element(a:access)
- ) as element(report) {
- let $bad-usernames :=
- $access/
- (a:owner, a:share-user, a:deny-user)
- [not(xmldb:exists-user(.))]
- let $all-groups := sm:get-groups()
- let $bad-groups :=
- $access/(a:group, a:share-group, a:deny-group)
- [not(.=$all-groups)]
- return
- element report {
- element status {
- ("valid"[empty(($bad-usernames, $bad-groups))], "invalid")[1]
- },
- for $bad in ($bad-usernames | $bad-groups)
- return
- element message {
- attribute level { "Error" },
- concat("In element ", name($bad),
- " the user or group ", $bad/string(),
- " does not exist")
- }
- }
-};
-
-declare function acc:validate-report(
- $access as element(a:access)
- ) as element(report) {
- jvalidate:concatenate-reports((
- jvalidate:validate-relaxng($access, xs:anyURI($acc:schema)),
- local:validate-report($access)
- ))
-};
-
-(:~ get access rights as an a:access structure
- : @param $doc A document
- :)
-declare function acc:get-access(
- $doc as document-node()
- ) as element(a:access) {
- let $permissions as element(sm:permissions) :=
- sm:get-permissions(xs:anyURI(document-uri($doc)))/*
- return
-
- {$permissions/@owner/string()}
- {
- $permissions/(
- attribute write { contains(substring(@mode, 4, 3), "w") },
- @group/string()
- )
- }
- {
- let $mode-world := substring($permissions/@mode, 7, 3)
- return (
- attribute read { contains($mode-world, "r") },
- attribute write { contains($mode-world, "w") }
- )
- }
- {
- for $group-share-ace in $permissions/sm:acl/sm:ace
- [@target="GROUP"][@access_type="ALLOWED"]
- return
- element a:share-group {
- attribute write { contains($group-share-ace/@mode, "w") },
- $group-share-ace/@who/string()
- },
- for $user-share-ace in $permissions/sm:acl/sm:ace
- [@target="USER"][@access_type="ALLOWED"]
- return
- element a:share-user {
- attribute write { contains($user-share-ace/@mode, "w") },
- $user-share-ace/@who/string()
- },
- for $group-deny-ace in $permissions/sm:acl/sm:ace
- [@target="GROUP"][@access_type="DENIED"]
- return
- element a:deny-group {
- attribute read { not(contains($group-deny-ace/@mode, "r")) },
- $group-deny-ace/@who/string()
- },
- for $user-deny-ace in $permissions/sm:acl/sm:ace
- [@target="USER"][@access_type="DENIED"]
- return
- element a:deny-user {
- attribute read { not(contains($user-deny-ace/@mode, "r")) },
- $user-deny-ace/@who/string()
- }
- }
-
-};
-
-(: @return true if the logged in user can set access permissions
- : on the given $doc
- :)
-declare function local:can-set-access(
- $doc as document-node()
- ) as xs:boolean {
- let $user := app:auth-user()
- let $doc-uri := xs:anyURI(document-uri($doc))
- let $permissions as element(sm:permissions) :=
- sm:get-permissions($doc-uri)/*
- return
- exists($user) and
- xmldb:is-admin-user($user) or (
- sm:has-access($doc-uri, "w") and
- $permissions/(
- @owner=$user or
- sm:get-group-members(@group)=$user
- )
- )
-};
-
-(:~ api helper for setting access.
- : @param $doc The document to change access to
- : @param $access The new access list
- : Only a document owner or owner-group member can change
- : access settings
- : Throws exceptions on error
- :)
-declare function acc:set-access(
- $doc as document-node(),
- $access as element(a:access)
- ) as empty-sequence() {
- if (local:can-set-access($doc))
- then
- if (acc:validate($access))
- then
- let $user := app:auth-user()
- let $doc-uri := xs:anyURI(document-uri($doc))
- return
- system:as-user("admin", $magic:password,(
- sm:chown($doc-uri, $access/a:owner),
- sm:chgrp($doc-uri, $access/a:group),
- sm:chmod($doc-uri,
- concat("rw-r", (: owner always has rw access, group always has r :)
- ("w"[xs:boolean($access/a:group/@write)], "-")[1],
- "-",
- ("r"[xs:boolean($access/a:world/@read)], "-")[1],
- ("w"[xs:boolean($access/a:world/@write)], "-")[1],
- "-"
- )
- ),
- sm:clear-acl($doc-uri),
- for $exception in $access/a:share-group
- return sm:add-group-ace($doc-uri, $exception, true(),
- "r" || ("w"[xs:boolean($exception/@write)], "-")[1] || "-"),
- for $exception in $access/a:share-user
- return sm:add-user-ace($doc-uri, $exception, true(),
- "r" || ("w"[xs:boolean($exception/@write)], "-")[1] || "-"),
- for $exception in $access/a:deny-group
- return sm:add-group-ace($doc-uri, $exception, false(),
- ("r"[not(xs:boolean($exception/@read))], "-")[1]||"w-"),
- for $exception in $access/a:deny-user
- return sm:add-user-ace($doc-uri, $exception, false(),
- ("r"[not(xs:boolean($exception/@read))], "-")[1]||"w-")
- )
- )
- else
- error(xs:QName("error:VALIDATION"),
- "The access description is invalid")
- else error(xs:QName(
- if (app:auth-user())
- then "error:FORBIDDEN"
- else "error:UNAUTHORIZED"), "Access denied.")
-};
\ No newline at end of file
diff --git a/code/api/modules/api.xqm b/code/api/modules/api.xqm
deleted file mode 100644
index 9a1a63e9..00000000
--- a/code/api/modules/api.xqm
+++ /dev/null
@@ -1,812 +0,0 @@
-xquery version "1.0";
-(:~ general support functions for the REST API
- :
- : Open Siddur Project
- : Copyright 2011-2012 Efraim Feinstein
- : Licensed under the GNU Lesser General Public License, version 3 or later
- :
- :)
-module namespace api="http://jewishliturgy.org/modules/api";
-
-import module namespace response="http://exist-db.org/xquery/response";
-import module namespace request="http://exist-db.org/xquery/request";
-
-import module namespace app="http://jewishliturgy.org/modules/app"
- at "/code/modules/app.xqm";
-import module namespace t="http://exist-db.org/xquery/testing/modified"
- at "/code/modules/test2.xqm";
-
-declare default element namespace "http://www.w3.org/1999/xhtml";
-
-declare namespace http="http://expath.org/ns/http-client";
-declare namespace rest="http://exquery.org/ns/rest/annotation/";
-declare namespace output="http://www.w3.org/2010/xslt-xquery-serialization";
-
-declare variable $api:default-max-results := 50;
-
-(:~ the API allows POST to be used instead of PUT and DELETE
- : if PUT and DELETE are not supported by the client. If so,
- : they are in the _method request parameter *or* in the X-HTTP-Method-Override header :)
-declare function api:get-method(
- ) as xs:string? {
- let $real-method as xs:string? := upper-case(request:get-method())
- let $alt-method as xs:string? := upper-case(
- (
- request:get-header('X-HTTP-Method-Override'),
- request:get-parameter('_method', ())
- )[1]
- )
- return
- (
- if ($real-method = 'POST' and $alt-method)
- then $alt-method
- else $real-method
- )
-};
-
-(:~ check if the calling method is allowed. If not, set the response error to 405.
- : Add an Allow header to the allowed methods
- : @param $methods A sequence of allowed methods
- :
- : This function is intended to be called early in the controller and no other consequential
- : calls should be made if it fails.
- :)
-declare function api:allowed-method(
- $methods as xs:string+
- ) as xs:boolean {
- let $umethods :=
- for $umethod in $methods
- return upper-case($umethod)
- return (
- if ($umethods = api:get-method())
- then true()
- else (
- false(),
- response:set-status-code(405)
- ),
- response:set-header('Allow', string-join($umethods, ', '))
- )
-};
-
-
-(:~ return true() is authenticated, false() if not :)
-declare function api:request-authentication(
- ) as xs:boolean {
- not(xmldb:get-current-user() = 'guest') or
- xmldb:login('/db', app:auth-user(), app:auth-password(), false())
-};
-
-(:~ set a requirement for authentication. Intended to be the condition of an if statement that
- : surrounds the query.
- : @return true() if authenticated, false() if not; also, set response to 401
- :)
-declare function api:require-authentication(
- ) as xs:boolean {
- if (api:request-authentication())
- then (
- true()
- )
- else (
- false(),
- response:set-status-code(401),
- response:set-header('WWW-Authenticate', 'Basic realm="opensiddur"')
- )
-};
-
-(:~ set a requirement that a query is authenticated as a given user *or*
- : a user within a group, depending on the share-type
- :)
-declare function api:require-authentication-as(
- $share-type as xs:string,
- $owner as xs:string,
- $can-tell-resource-exists as xs:boolean
- ) as xs:boolean {
- if ($share-type = 'user')
- then api:require-authentication-as($owner, $can-tell-resource-exists)
- else api:require-authentication-as-group($owner, $can-tell-resource-exists)
-};
-
-(:~ set a requirement that the query is authenticated as a given user.
- : if not authenticated, return status 401.
- : if authenticated as the wrong user,
- : set the response code to 403 (if $can-tell-resource-exists)
- : or 404 if not($can-tell-resource-exists).
- :)
-declare function api:require-authentication-as(
- $user as xs:string,
- $can-tell-resource-exists as xs:boolean
- ) as xs:boolean {
- if (api:require-authentication())
- then
- if (app:auth-user() = $user)
- then true()
- else (
- false(),
- response:set-status-code(
- if ($can-tell-resource-exists)
- then 403
- else 404
- )
- )
- else false()
-};
-
-(:~ set a requirement that the query is authenticated as a user who is a member of a given group.
- : if not authenticated, return status 401.
- : if authenticated as the wrong user,
- : set the response code to 403 (if $can-tell-resource-exists)
- : or 404 if not($can-tell-resource-exists).
- :)
-declare function api:require-authentication-as-group(
- $group as xs:string,
- $can-tell-resource-exists as xs:boolean
- ) as xs:boolean {
- if (api:require-authentication())
- then
- let $user := app:auth-user()
- return
- if (xmldb:get-user-groups($user) = $group)
- then true()
- else (
- false(),
- response:set-status-code(
- if ($can-tell-resource-exists)
- then 403
- else 404
- )
- )
- else false()
-};
-
-declare function local:content-type-priority(
- $base-value as xs:double,
- $mime-tokens as xs:string+,
- $param-tokens as xs:string*
- ) as xs:double {
- $base-value
- - .0001 * count($mime-tokens[. = "*"])
- + .00001 * count($param-tokens[not(matches(., "^\s*q"))])
-};
-
-declare function api:parse-content-types(
- $ct as xs:string
- ) {
- local:parse-content-types($ct)
-};
-
-(:~ construct a structure of content types sorted by request priority :)
-declare function local:parse-content-types(
- $ct-string as xs:string
- ) as element(api:content-type)* {
- for $content-type in tokenize($ct-string, ',')
- let $tokens := tokenize($content-type, ';')
- let $mime-tokens := tokenize(normalize-space($tokens[1]), '/')
- let $mime-type :=
- (
- {$mime-tokens[1]},
- {$mime-tokens[2]}
- )
- let $param-tokens := subsequence($tokens, 2)
- let $parameters :=
- for $param in $param-tokens
- let $ns := normalize-space($param)
- let $t := tokenize($ns, "=")
- let $name := $t[1]
- let $value := $t[2]
- return
- if ($name = "q")
- then
- {
- local:content-type-priority($value, $mime-tokens, $param-tokens)
- }
- else
- {$value}
- let $ct :=
- {
- $mime-type,
- $parameters,
- if (exists($parameters/self::api:priority))
- then ()
- else {local:content-type-priority(1.0, $mime-tokens, $param-tokens)}
- }
- order by $ct/api:priority descending
- return $ct
-};
-
-declare function api:get-accept-format(
- $accepted-formats as xs:string
- ) {
- api:get-accept-format($accepted-formats, request:get-header('Accept'))
-};
-
-declare function api:get-request-format(
- $accepted-formats as xs:string
- ) {
- api:get-accept-format($accepted-formats, request:get-header('Content-Type'))
-};
-
-(:~ perform content negotiation:
- : return the highest priority requested format of the data
- : If none can be found acceptable, return error 406 and an error message
- : @param $accepted-formats Formats that are acceptable, in order of priority.
- :)
-declare function api:get-accept-format(
- $accepted-formats as xs:string*,
- $accept-header as xs:string?
- ) as element() {
- let $requested-cts := local:parse-content-types($accept-header)
- let $accepted-cts :=
- for $format in $accepted-formats
- return local:parse-content-types($format)
- let $default-ct := $accepted-cts[1]
- let $negotiated-ct :=
- if (empty($requested-cts))
- then $default-ct
- else
- for $request in $requested-cts
- for $accept in $accepted-cts
- where
- $request/api:major = ($accept/api:major, "*") and
- $request/api:minor = ($accept/api:minor, "*") and
- (: additional parameters - like charset - can be ignored, not
- : actual requirements? - we just cannot contradict the request
- :)
- (every $param in $request/api:param satisfies
- not($accept/api:param[@name=$param/@name]!=string($param)))
- return $accept
- return
- if (empty($negotiated-ct))
- then api:error(406, "The requested format(s) cannot be served by this API call.", $accept-header)
- else $negotiated-ct[1]
-};
-
-(:~ simplify the format returned by api:get-accept-format()
- : return: 'tei' (request is specifically for tei), 'xml' (request is for generic xml),
- : 'xhtml' (request is for xhtml), 'none' (content negotiation failed)
- : subsequent strings include any parameters
- :)
-declare function api:simplify-format(
- $format as element(),
- $default-format as xs:string
- ) as xs:string+ {
- if ($format instance of element(api:error))
- then 'none'
- else (
- let $fmt-string := concat($format/api:major, "/", $format/api:minor)
- return
- if ($fmt-string = ("text/xml", "application/xml"))
- then "xml"
- else if ($fmt-string = ("application/xhtml+xml", "text/html"))
- then "xhtml"
- else if ($fmt-string = ("application/tei+xml"))
- then "tei"
- else if ($fmt-string = ("text/css"))
- then "css"
- else if ($fmt-string = ("text/plain"))
- then "txt"
- else if ($fmt-string = ("application/x-www-form-urlencoded"))
- then "form"
- else $default-format
- ,
- $format/api:param/@name/string()
- )
-};
-
-declare function api:list(
- $title as element(title),
- $list-body as element(ul)+,
- $n-results as xs:integer) {
- api:list($title, $list-body, $n-results, false(), (), (), ())
-};
-
-declare function api:list(
- $title as element(title),
- $list-body as element(ul)+,
- $n-results as xs:integer,
- $supports-search as xs:boolean,
- $supported-methods as xs:string*,
- $accept-content-types as xs:string*,
- $request-content-types as xs:string*
- ) as element(html) {
- api:list($title, $list-body, $n-results, $supports-search, $supported-methods,
- $accept-content-types, $request-content-types, ())
-
-};
-
-(:~ list-type API
- : @param $title API page title
- : @param $list-body Body of the list
- : @param $n-results Number of total results in the list
- : @param $supports-search true() if the URI is searchable (default false())
- : @param $supported-methods List of HTTP methods that this URI will support (default GET)
- : @param $accept-content-types List of content types for the Accept header in GET (default application/xhtml+xml, text/html)
- : @param $request-content-types List of Content-Type header in PUT or POST request (no default)
- : @param $test-source URL(s) to the test source(s) if this API supports the ?_test= parameter
- :)
-declare function api:list(
- $title as element(title),
- $list-body as element(ul)+,
- $n-results as xs:integer,
- $supports-search as xs:boolean,
- $supported-methods as xs:string*,
- $accept-content-types as xs:string*,
- $request-content-types as xs:string*,
- $test-source as xs:string*
- ) as element(html) {
- let $my-uri := request:get-uri()
- let $params := (
- let $params-string :=
- (: params string should include parameters that are not contained in the path :)
- for $p in request:get-parameter-names()[not(. = ('start', 'purpose', 'share-type', 'owner', 'resource', 'subresource', 'subsubresource', 'format'))]
- return concat($p, '=', request:get-parameter($p, ()))
- where exists($params-string)
- return
- concat('&', string-join($params-string, '&'))
- )
- let $start := xs:integer(request:get-parameter('start', 1))
- let $max-results := xs:integer(request:get-parameter('max-results', $api:default-max-results))
- return
-
-
- {string($title)}
- {
- (: add links to the tests, if available :)
- for $source in $test-source
- return (
- ,
-
- ),
- (: add first, previous, next, and last links :)
- if ($start > 1 and $n-results >= 1)
- then (
- let $prev-start := max((1,$start - $max-results))
- return (
- ,
-
- )
- )
- else (),
- if ($start + $max-results lt $n-results)
- then (
- ,
-
- )
- else (),
- (: add data about where this page is in the search, conformant to OpenSearch :)
- ,
- ,
- ,
- ,
- (: add metadata about supported methods and content types :)
- let $umethods :=
- distinct-values((
- for $method in $supported-methods
- return upper-case($method),
- 'GET'
- ))
- for $method in $umethods
- return
- ,
- for $type in distinct-values(($accept-content-types, "application/xhtml+xml", "text/html"))
- return
- ,
- for $type in distinct-values($request-content-types)
- return
- ,
- (: add a link to the search description if this is search capable :)
- if ($supports-search)
- then
-
- else ()
- }
- {
-
{$title/node()}
,
-
{
- (: add first, previous, next, and last links :)
- if ($start > 1)
- then (
-
,
- $list-body
- }
-
-};
-
-declare function api:list-item(
- $description as item(),
- $link as xs:string,
- $supported-methods as xs:string*,
- $accept-content-types as xs:string*,
- $request-content-types as xs:string*
- ) as element(li) {
- api:list-item($description, $link, $supported-methods, $accept-content-types, $request-content-types, ())
-};
-
-(:~ add a list item to a list
- : @param $description description: may be text or HTML
- : @param $link main link to the item,
- : @param $supported-methods What methods it supports
- : @param $accept-content-types what content types can be returned via GET
- : @param $request-content-types what content types can be sent via PUT or POST
- : @param $alt-links alternate descriptions and links, alternating (desc, link, desc, link,...)
- :)
-declare function api:list-item(
- $description as item()+,
- $link as xs:string,
- $supported-methods as xs:string*,
- $accept-content-types as xs:string*,
- $request-content-types as xs:string*,
- $alt-links as item()*
- ) as element(li) {
- let $methods :=
- for $m in distinct-values($supported-methods)
- return upper-case($m)
- return
-
- {$description}
- {
- for $alt-link-n in (1 to count($alt-links))[. mod 2 = 1]
- return ("(", {$alt-links[$alt-link-n]}, ")"),
- if (exists($supported-methods))
- then
-
{
- for $method in $methods
- return
-
{
- $method,
- if ($method = "GET" and exists($accept-content-types))
- then
-
{
- for $ct in distinct-values($accept-content-types)
- return
{$ct}
- }
- else if ($method = ("PUT", "POST") and exists($request-content-types))
- then
-
{
- for $ct in distinct-values($request-content-types)
- return
{$ct}
- }
- else ()
- }
- }
- else ()
- }
-
-};
-
-(:~ all requestable form content types.
- : If allow-text is true(), allow text/plain, which means
- : only 1 parameter is required
- :)
-declare function api:form-content-type(
- $allow-text as xs:boolean?
- ) as xs:string+ {
- ("application/xml",
- "text/xml",
- "application/x-www-form-urlencoded",
- if ($allow-text)
- then "text/plain"
- else ()
- )
-};
-
-declare function api:form-content-type(
- ) as xs:string+ {
- api:form-content-type(false())
-};
-
-(:~ return the HTML content types for use in accept/request header :)
-declare function api:html-content-type(
- ) as xs:string+ {
- api:html-content-type(())
-};
-
-
-(:~ return the HTML content types for use in accept/request header
- : if $reject-text is true, do not allow text/html
- :)
-declare function api:html-content-type(
- $reject-text as xs:boolean?
- ) as xs:string+ {
- ("application/xhtml+xml", ("text/html")[not($reject-text)])
-};
-
-declare function api:tei-content-type(
- ) as xs:string {
- api:tei-content-type(())
-};
-
-declare function api:tei-content-type(
- $element as xs:string?
- ) as xs:string {
- concat("application/tei+xml",
- if ($element)
- then concat("; type=", $element)
- else ""
- )
-};
-
-declare function api:xml-content-type(
- ) as xs:string+ {
- "text/xml", "application/xml"
-};
-
-declare function api:text-content-type(
- ) as xs:string+ {
- "text/plain"
-};
-
-(:~ output an API error and set the HTTP response code
- : for RESTXQ
- : @param $status-code return status
- : @param $message return message (text preferred, but may contain XML)
- : @param $object (optional) error object
- :)
-declare function api:rest-error(
- $status-code as xs:integer?,
- $message as item()*,
- $object as item()*
- ) as item()+ {
-
-
-
-
-
- ,
-
- {
- if (request:exists())
- then request:get-uri()
- else ()}
- {$message}
- {
- if (exists($object))
- then
-
- else ()
- }
-
-};
-
-declare function api:rest-error(
- $status-code as xs:integer?,
- $message as item()*
- ) as item()+ {
- api:rest-error($status-code, $message, ())
-};
-
-(:~ output an API error and set the HTTP response code
- : @param $status-code return status
- : @param $message return message (text preferred, but may contain XML)
- : @param $object (optional) error object
- :)
-declare function api:error(
- $status-code as xs:integer?,
- $message as item()*,
- $object as item()*
- ) as element() {
- if ($status-code)
- then response:set-status-code($status-code)
- else (),
- api:serialize-as('xml'),
-
- {request:get-uri()}
- {$message}
- {
- if (exists($object))
- then
-
- else ()
- }
-
-};
-
-declare function api:error(
- $status-code as xs:integer?,
- $message as item()*
- ) as element() {
- api:error($status-code, $message, ())
-};
-
-(:~ set the error message, without changing the response code
- : this function may be used when another api:* function already set the code
- :)
-declare function api:error-message(
- $message as item()
- ) as element() {
- api:error((), $message, ())
-};
-
-declare function api:error-message(
- $message as item(),
- $object as item()?
- ) as element() {
- api:error((), $message, $object)
-};
-
-declare function api:serialize-as(
- $serialization as xs:string
- ) {
- api:serialize-as($serialization, ())
-};
-
-(:~ dynamically declare serialization options as none, txt, tei, xml, xhtml, or html (xhtml w/o indent)
- : @param $serialization type of serialization
- : @param $accept-format result of api:get-accept-formats() - attempt to match content type to the requested one
- :)
-declare function api:serialize-as(
- $serialization as xs:string,
- $accept-format as element(api:content-type)?
- ) as empty() {
- let $ser := lower-case($serialization)
- let $accept-format-match :=
- api:simplify-format($accept-format, "none")=$ser
- let $media-type :=
- if ($accept-format-match)
- then concat($accept-format/api:major, "/", $accept-format/api:minor)
- else ()
- let $options :=
- if ($ser = ('none', 'txt', 'text'))
- then
- concat('method=text media-type=', ($media-type, 'text/plain')[1])
- else if ($ser = 'css')
- then
- concat('method=text media-type=', ($media-type, 'text/css')[1])
- else if ($ser = ('xml','tei'))
- then
- concat('method=xml omit-xml-declaration=no indent=yes media-type=',
- ($media-type,
- concat('application/', 'tei+'[$ser="tei"] ,'xml'))[1])
- else if ($ser = 'xhtml')
- then
- concat('method=xhtml omit-xml-declaration=no indent=yes media-type=',
- ($media-type, 'text/html')[1])
- (:
- doctype-public="-//W3C//DTD XHTML 1.1//EN"
- doctype-system="http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"'
- :)
- else if ($ser = 'html')
- then
- concat('method=xhtml omit-xml-declaration=no indent=no media-type=',
- ($media-type, 'text/html')[1])
- else if ($ser = 'html5')
- then 'method=html5'
- else
- error(xs:QName('err:INTERNAL'),concat('Undefined serialization option: ', $serialization))
- return
- util:declare-option('exist:serialize', $options)
-};
-
-(:~ get the request data. if it's text data, convert it to a string
- : instead of xs:base64Binary
- :)
-declare function api:get-data(
- ) as item()? {
- let $data := request:get-data()
- return
- if ($data instance of xs:base64Binary)
- then util:binary-to-string($data)
- else
- (: eXist switched from returning elements to document nodes
- : this wrapper changes back to the old behavior
- :)
- typeswitch($data)
- case document-node() return $data/node()
- default return $data
-};
-
-declare function api:get-parameter(
- $param as xs:string,
- $default as xs:string?
- ) as xs:string? {
- api:get-parameter($param, $default, false())
-};
-
-(:~ get a parameter from query parameters, form encoded parameters, xml, or text
- : @param $param parameter name
- : @param $default parameter default value
- : @param $allow-one-parameter If only one parameter can be given without a name (eg, text/plain), return it?
- :)
-declare function api:get-parameter(
- $param as xs:string,
- $default as xs:string?,
- $allow-one-parameter as xs:boolean?
- ) as xs:string? {
- (
- request:get-parameter($param, ()),
- let $method := api:get-method()
- let $data := api:get-data()
- where $method = ("POST", "PUT")
- return
- if ($data instance of xs:string and $allow-one-parameter)
- then $data
- else if ($data instance of node())
- then
- if ($allow-one-parameter)
- then $data/string()
- else $data//*[name() = $param]/string()
- else (),
- $default
- )[1]
-};
-
-
-(:~ run the given tests and return their results if the _test= query parameter is
- : given and the method is GET. If this is not a testing call, return ()
- :)
-declare function api:tests(
- $test-source as xs:string
- ) as element()? {
- let $test-param := request:get-parameter("_test", ())
- let $test-to-run := ($test-param[doc-available(.)], $test-source)[1]
- return
- if (api:get-method() = "GET" and $test-param)
- then (
- api:serialize-as("xhtml"),
- t:format-testResult(t:run-testSuite(doc($test-to-run)/*))
- )
- else ()
-};
-
-(:~ temporary function to handle rest:response elements
- : and convert them to response:* function calls
- : or simply pass on the return value.
- : will be obsoleted by RESTXQ
- : @param $r (element response{}, resource) or (resource)
- :)
-declare function api:rest-response(
- $r as item()*
- ) as item()* {
- if ($r[1] instance of element(rest:response))
- then (
- let $response := $r[1]
- let $serialization-default :=
- (: prevent parsing errors, particularly for 204 responses :)
- if (
- empty($response/output:serialiation-parameters/output:method) and
- $response instance of element(rest:response) and
- empty($r[2])
- )
- then api:serialize-as("txt")
- else ()
- for $element in $response/*
- return
- typeswitch($element)
- case element(http:response)
- return (
- response:set-status-code(($element/@status/number(), 200)[1]),
- for $header in $element/http:header
- return response:set-header($header/@name, $header/@value)
- )
- case element(output:serialization-parameters)
- return
- for $parameter in $element/*
- return
- typeswitch($parameter)
- case element(output:method)
- return
- if ($parameter/@value="text")
- then api:serialize-as("txt")
- else if ($parameter/@value=("xhtml", "html"))
- then api:serialize-as($parameter/@value,api:get-accept-format(api:html-content-type()))
- else if ($parameter/@value="html5")
- then api:serialize-as("html5")
- else ()
- default return ()
- default return ( (: don't know what to do :)),
- subsequence($r, 2)
- )
- else $r
-};
diff --git a/code/api/modules/data.xqm b/code/api/modules/data.xqm
deleted file mode 100644
index 679452fa..00000000
--- a/code/api/modules/data.xqm
+++ /dev/null
@@ -1,121 +0,0 @@
-xquery version "3.0";
-(:~ support functions for the REST API for data retrieval
- :
- : Open Siddur Project
- : Copyright 2011-2012 Efraim Feinstein
- : Licensed under the GNU Lesser General Public License, version 3 or later
- :
- :)
-module namespace data="http://jewishliturgy.org/modules/data";
-
-import module namespace xmldb="http://exist-db.org/xquery/xmldb";
-
-import module namespace api="http://jewishliturgy.org/modules/api"
- at "/code/api/modules/api.xqm";
-import module namespace app="http://jewishliturgy.org/modules/app"
- at "/code/modules/app.xqm";
-import module namespace paths="http://jewishliturgy.org/modules/paths"
- at "/code/modules/paths.xqm";
-import module namespace resp="http://jewishliturgy.org/modules/resp"
- at "/code/modules/resp.xqm";
-
-declare namespace tei="http://www.tei-c.org/ns/1.0";
-declare namespace j="http://jewishliturgy.org/ns/jlptei/1.0";
-declare namespace error="http://jewishliturgy.org/errors";
-declare namespace exist="http://exist.sourceforge.net/NS/exist";
-
-(:~ base of all data paths :)
-declare variable $data:path-base := "/data";
-
-(:~ convert a given path from an API path (may begin /code/api/data, /data or may be truncated) to a database path
- : works only to find the resource.
- : @param $api-path API path
- :)
-declare function data:api-path-to-db(
- $api-path as xs:string
- ) as xs:string {
- error(xs:QName("error:NOTIMPLEMENTED"), "Not implemented properly")
-};
-
-(:~ Convert a database path to a path in the API
- : @param $db-path database path to convert
- :)
-declare function data:db-path-to-api(
- $db-path as xs:string
- ) as xs:string {
- error(xs:QName("error:NOTIMPLEMENTED"), "Not implemented properly")
-};
-
-declare function local:resource-name-from-title-and-number(
- $title as xs:string,
- $number as xs:integer
- ) as xs:string {
- string-join(
- ( (: remove diacritics in resource names :)
- encode-for-uri(replace($title, "\p{M}", "")),
- if ($number)
- then ("-", string($number))
- else (), ".xml"
- ),
- "")
-};
-
-declare function local:find-duplicate-number(
- $type as xs:string,
- $title as xs:string,
- $n as xs:integer
- ) as xs:integer {
- if (exists(collection(concat($data:path-base, "/", $type))
- [util:document-name(.)=
- local:resource-name-from-title-and-number($title, $n)]
- ))
- then local:find-duplicate-number($type, $title, $n + 1)
- else $n
-};
-
-(:~ make the path of a new resource
- : @param $type The category of the resource (original|transliteration, eg)
- : @param $title The resource's human-readable title
- : @return (collection, resource)
- :)
-declare function data:new-path-to-resource(
- $type as xs:string,
- $title as xs:string
- ) as xs:string+ {
- let $date := current-date()
- let $resource-name :=
- local:resource-name-from-title-and-number($title,
- local:find-duplicate-number($type, $title, 0))
- return (
- (: WARNING: the format-date() function works differently
- : from the XSLT spec!
- : In the spec, the format string should be:
- : [Y0001]/[M01]
- :)
- app:concat-path(($data:path-base, $type, xsl:format-date($date, "YYYY/MM"))),
- $resource-name
- )
-};
-
-(:~ make the path of a new resource
- : @param $type The category of the resource (original|transliteration, eg)
- : @param $title The resource's human-readable title
- :)
-declare function data:new-path(
- $type as xs:string,
- $title as xs:string
- ) as xs:string {
- let $new-paths := data:new-path-to-resource($type, $title)
- return
- string-join($new-paths, "/")
-};
-
-(:~ return a document from the collection hierarchy for $type
- : given a resource name $name (without extension) :)
-declare function data:doc(
- $type as xs:string,
- $name as xs:string
- ) as document-node()? {
- collection(app:concat-path($data:path-base, $type))
- [replace(util:document-name(.), "\.([^.]+)$", "")=$name]
-};
\ No newline at end of file
diff --git a/code/api/modules/icompile.xqm b/code/api/modules/icompile.xqm
deleted file mode 100644
index 356b427d..00000000
--- a/code/api/modules/icompile.xqm
+++ /dev/null
@@ -1,142 +0,0 @@
-xquery version "1.0";
-(:~ "instant compilation" is compilation of only one file into XHTML
- : using the cached copy as a basis
- :
- : Copyright 2011 Efraim Feinstein
- : Licensed under the GNU Lesser General Public License, version 3 or later
- :)
-module namespace icompile="http://jewishliturgy.org/modules/icompile";
-
-import module namespace app="http://jewishliturgy.org/modules/app"
- at "/code/modules/app.xqm";
-import module namespace format="http://jewishliturgy.org/modules/format"
- at "/code/modules/format.xqm";
-import module namespace jcache="http://jewishliturgy.org/modules/cache"
- at "/code/modules/cache-controller.xqm";
-import module namespace uri="http://jewishliturgy.org/transform/uri"
- at "/code/modules/follow-uri.xqm";
-
-declare namespace err="http://jewishliturgy.org/errors";
-declare namespace tei="http://www.tei-c.org/ns/1.0";
-declare namespace j="http://jewishliturgy.org/ns/jlptei/1.0";
-declare namespace jx="http://jewishliturgy.org/ns/jlp-processor";
-
-(:~ perform the instant data compile operation on the given node :)
-declare function icompile:compile(
- $node as node(),
- $compile-externals as xs:boolean?,
- $format-xhtml as xs:boolean?
- ) as node()+ {
- let $doc := root($node)
- let $id := $node/@xml:id
- return
- if (exists($id) or $node instance of document-node())
- then
- let $user := app:auth-user()
- let $password := app:auth-password()
- let $uri := document-uri($doc)
- let $cache := jcache:cache-all($uri, $user, $password)
- let $cached-uri := jcache:cached-document-path($uri)
- let $cached-nodes := doc($cached-uri)//*[@jx:id=$id]
- let $icompiled := icompile:icompile($cached-nodes, $compile-externals)
- return
- if ($format-xhtml)
- then
- (: we may be looking at a fragment and the XHTML formatter,
- : which is XSLT, cannot read context. Add context here :)
- for $ic at $n in $icompiled
- let $elem :=
- typeswitch ($ic)
- case document-node() return $ic/*
- default return $ic
- let $icompiled-with-context :=
- element { QName(namespace-uri($elem), local-name($elem)) }{
- $elem/(@* except (@jx:document-uri, @xml:base)),
- ($elem/@xml:base, attribute xml:base { base-uri($cached-nodes[$n]) })[1],
- ($elem/@jx:document-uri, $cached-nodes[$n]/ancestor-or-self::*[@jx:document-uri][1]/@jx:document-uri)[1],
- $elem/node()
- }
- return
- format:format-xhtml($icompiled-with-context, (), $user, $password)
- else $icompiled
- else
- error(xs:QName("err:TYPE"), "The node passed to icompile:compile() must be a document node or have an @xml:id")
-};
-
-(:~ perform instant compilation :)
-declare function icompile:icompile(
- $node as node()*,
- $compile-externals as xs:boolean?
- ) as node()* {
- for $n in $node
- return
- typeswitch($n)
- case document-node() return document{ icompile:icompile($n/node(), $compile-externals)}
- case text() return $n
- case element(tei:ptr) return local:tei-ptr($n, $compile-externals)
- case element(tei:join) return local:tei-join($n, $compile-externals)
- case element() return local:element($n, $compile-externals)
- default return icompile:icompile($n/node(), $compile-externals)
-};
-
-declare function local:tei-ptr(
- $node as element(tei:ptr),
- $compile-externals as xs:boolean?
- ) as element()* {
- let $targets := $node/@target
- let $document-uri := base-uri($node)
- let $cached-document-uri := jcache:cached-document-path($document-uri)
- for $target in tokenize($targets, "\s+")
- let $abs := uri:absolutize-uri($target, $node)
- let $base := uri:uri-base-path($abs)
- return
- if ($compile-externals or $base = ($document-uri, $cached-document-uri))
- then (
- (: do follow the URI :)
- icompile:icompile(
- uri:follow-cached-uri($target, $node, uri:follow-steps($node),
- $uri:fragmentation-cache-type),
- $compile-externals
- )
- )
- else
- (: copy the external pointer :)
- element tei:ptr {
- $node/(@*|node()),
- util:log-system-out(("Rejecting: ", $node, " because: $base=", $base, " $document-uri=", $document-uri, " $c-d-u=", $cached-document-uri))
- }
-};
-
-declare function local:tei-join(
- $node as element(tei:join),
- $compile-externals as xs:boolean?
- ) as element()* {
- let $ptrs :=
- for $target in tokenize($node/(@targets|@target), "\s+")
- return
- element tei:ptr {
- attribute xml:base { base-uri($node) },
- attribute target { $target }
- }
- return
- icompile:icompile(
- if ($node/@result)
- then
- element { $node/@result/string() }{
- $node/@xml:base,
- $ptrs
- }
- else $ptrs,
- $compile-externals
- )
-};
-
-declare function local:element(
- $node as element(),
- $compile-externals as xs:boolean?
- ) as element() {
- element { QName(namespace-uri($node), local-name($node)) } {
- $node/@*,
- icompile:icompile($node/node(), $compile-externals)
- }
-};
\ No newline at end of file
diff --git a/code/api/modules/nav.xqm b/code/api/modules/nav.xqm
deleted file mode 100644
index cd72c047..00000000
--- a/code/api/modules/nav.xqm
+++ /dev/null
@@ -1,325 +0,0 @@
-(:~ navigation API helper module
- :
- : Copyright 2011 Efraim Feinstein
- : Licensed under the GNU Lesser General Public License, version 3 or later
- :)
-module namespace nav = 'http://jewishliturgy.org/modules/nav';
-
-import module namespace api="http://jewishliturgy.org/modules/api"
- at "api.xqm";
-import module namespace app="http://jewishliturgy.org/modules/app"
- at "xmldb:exist:///code/modules/app.xqm";
-import module namespace debug="http://jewishliturgy.org/transform/debug"
- at "xmldb:exist:///code/modules/debug.xqm";
-
-declare default element namespace "http://www.w3.org/1999/xhtml";
-
-declare namespace tei="http://www.tei-c.org/ns/1.0";
-declare namespace j="http://jewishliturgy.org/ns/jlptei/1.0";
-declare namespace jx="http://jewishliturgy.org/ns/jlp-processor";
-declare namespace rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#";
-declare namespace cc="http://web.resource.org/cc/";
-
-declare variable $nav:accept-content-types :=
- (
- api:html-content-type(),
- api:xml-content-type(),
- api:tei-content-type()
- );
-declare variable $nav:request-content-types :=
- (
- api:xml-content-type(),
- api:tei-content-type()
- );
-
-(: these are path shortcuts to specific places
- : note that they are expected to be in a string-join(*, "/")
- : so / => //
- :)
-declare variable $nav:shortcuts :=
-
-
-
- Selection
-
-
- Repository
-
-
- Concurrent
-
-
- Views
-
-
- Primary language
-
-
- Title
-
-
- Subtitle
-
- ;
-
-declare function nav:sequence-to-api-path(
- $node as node()*
- ) as xs:string* {
- for $n in $node
- let $doc := root($n)
- let $doc-uri := document-uri($doc)
- let $purpose := tokenize($doc-uri, "/")[5]
- let $doc-name := replace(util:document-name($doc), "\.[^.]+$", "")
- return
- concat("/code/api/data/", $purpose, "/", $doc-name,
- if ($n instance of document-node())
- then ""
- else concat("/", nav:xpath-to-url(app:xpath($n))))
-};
-
-(:~ given a complete navigation API URL, return a sequence :)
-declare function nav:api-path-to-sequence(
- $url as xs:string
- ) as node()* {
- let $excluded := "updated.xml"
- let $tokens := tokenize(replace($url, "^(/code/api)?(/data)?/", ""), "/")[.]
- let $purpose := $tokens[1]
- let $resource := concat($tokens[2], ".xml")[$tokens[2] != "..."]
- let $docs :=
- if ($resource)
- then collection("/group")
- (: the collection name is of the form (1)/db(2)/group(3)/[group](4)/[purpose](5) :)
- [util:document-name(.)=$resource]
- [tokenize(util:collection-name(.),"/")[5]=$purpose]
- else collection("/group")
- [tokenize(util:collection-name(.),"/")[5]=$purpose]
- [not(util:document-name(.)=$excluded)]
- let $xpath := nav:url-to-xpath(string-join(("",subsequence($tokens, 3)), "/"))/nav:path/string()
- where exists($docs)
- return
- if ($xpath)
- then util:eval(concat("$docs", $xpath))
- else $docs
-};
-
-(:~ convert a nav URL to an XPath expression
- : if the URL contains any illegal characters,
- : return an api:error
- :)
-declare function nav:url-to-xpath(
- $url as xs:string
- ) as element() {
- if (matches($url, "[()':]|(update\s)"))
- then
- api:error(404, "The given URL contains illegal characters", $url)
- else
- let $url-tokens := tokenize($url, "/")[.]
- let $activities := ("-combined", "-compiled", "-html", "-expanded", "-license")
- return
- element nav:xpath {
- element nav:path {
- string-join((
- if (starts-with($url, "/"))
- then ""
- else (),
- let $n-tokens := count($url-tokens)
- for $token at $n in $url-tokens
- let $regex :=
- concat("^(@)?(([^.]+)\.)?([^,;@]+)(@([^,;]+))?(,(\d+))?",
- if ($n = count($url-tokens))
- then "(;(\S+))?"
- else "")
- let $groups := text:groups($token, $regex)
- let $is-attribute := $groups[2]
- let $prefix := $groups[4]
- let $element := $groups[5]
- let $type := $groups[7]
- let $index := $groups[9]
- let $shortcut := $nav:shortcuts/*[@path=$token]/@to
- return
- if ($n = $n-tokens and $token = $activities)
- then ()
- else if ($token = "-id")
- then
- if ($n = $n-tokens)
- then "*[@xml:id]"
- else concat("id('", $url-tokens[$n + 1] ,"')")
- else if ($url-tokens[$n - 1] = "-id")
- then ()
- else
- if ($shortcut)
- then string($shortcut)
- else
- string-join((
- $is-attribute,
- $prefix, ":"[$prefix],
- if ($element castable as xs:integer)
- then ("*[", $element, "]")
- else $element, ("[@type='", $type, "']")[$type], ("[", $index, "]")[$index]
- ),"")
- ),
- "/"
- )
- },
- element nav:position {
- substring-after($url-tokens[last()], ";")
- },
- element nav:activity {
- (: last() should work here, but an eXist bug(?) is preventing it from doing so :)
- $url-tokens[count($url-tokens)][.=$activities]
- }
- }
-
-};
-
-declare function nav:xpath-to-url(
- $xpath as xs:string
- ) as xs:string {
- let $xpath-tokens := tokenize($xpath, "/")
- return
- string-join(
- (
- if (starts-with($xpath, "/"))
- then ""
- else (),
- for $token at $n in $xpath-tokens
- let $groups := text:groups($token, "^(@)?(([^:]+):)?(([^\[\*]+)|(\*\[(\d+)\]))(\[@type='(\S*)'\])?(\[(\d+)\])?")
- let $is-attribute := $groups[2]
- let $prefix := $groups[4]
- let $element := $groups[6]
- let $nelement := $groups[8]
- let $type := $groups[10]
- let $index := $groups[12]
- return
- if (not($token))
- then
- (: // tokenizes to an empty token, but at the beginning of the string,
- an empty token means the path began with / :)
- "..."[$n > 1]
- else if (starts-with($token, "*[@xml:id]"))
- then
- "-id"
- else if (matches($token, "^id\("))
- then
- let $id := text:groups($token, "id\('([^']+)'\)")
- return concat("-id/", $id[2])
- else
- string-join(($prefix, "."[$prefix], $element, $nelement, ("@", $type)[$type], (",", $index)[$index]), "")
- ),
- "/"
- )
-};
-
-(:~ return an XML hierarchy as an HTML navigation page
- : TODO: this needs to be reworked :)
-declare function nav:xml-to-navigation(
- $root as element()+,
- $position as xs:string?
- ) as element() {
- api:serialize-as("xhtml"),
- let $methods := ("GET", "POST", "DELETE")
- let $this-url := request:get-uri()
- return
- api:list(
- element title {
- string-join(($root[1]/name(), ("(", $root/@xml:id, ")")[count($root) = 1 and $root/@xml:id/string()]), "") },
- let $children :=
- if (count($root) = 1)
- then $root/*
- else $root
- return (
- element ul {
- attribute class { "common" },
- api:list-item(
- element span { attribute class {"service"}, "compile" },
- concat($this-url, "/-compile"),
- "GET",
- api:html-content-type(),
- (), ()
- )
- },
- element ul {
- if (empty($children))
- then
- (element li { attribute class {"literal-value"}, string($root) })
- [string($root)]
- else
- for $child in $children
- let $name := $child/name()
- let $type := $child/@type/string()
- let $n := count($child/preceding-sibling::*[name()=$name][if ($type) then (@type=$type) else true()]) + 1
- let $link :=
- concat($this-url, "/",
- nav:xpath-to-url(
- string-join(($name,
- ("[@type='", $type, "']")[$type],
- "[", $n, "]"),"")
- )
- )
- return
- api:list-item(
- element span { attribute class {"service"},
- string-join(($name, ("(", $type, ")")[$type], ("[", $n, "]")),"")
- },
- $link,
- $methods,
- $nav:accept-content-types,
- $nav:request-content-types,
- (
- "before",
- concat($link, ";before"),
- "after",
- concat($link, ";after")
- )
- )
- }),
- 0,
- false(),
- $methods,
- $nav:accept-content-types,
- $nav:request-content-types
- )
-};
-
-(:~ convert an API path to a path in the database :)
-declare function nav:api-path-to-db-path(
- $api-path as xs:anyAtomicType
- ) as xs:string {
- let $refto := nav:api-path-to-sequence($api-path)
- let $base-path := document-uri(root($refto))
- let $fragment := $refto/@xml:id/string()
- return
- string-join(($base-path, $fragment), "#")
-};
-
-declare function nav:db-path-to-api-path(
- $db-path as xs:anyAtomicType,
- $context as node()?
- ) as xs:string {
- nav:db-path-to-api-path($db-path,$context, true())
-};
-
-declare function nav:db-path-to-api-path(
- $db-path as xs:anyAtomicType,
- $context as node()?,
- $include-api-prefix as xs:boolean
- ) as xs:string {
- let $base :=
- if (contains($db-path, "#"))
- then substring-before($db-path, "#")
- else $db-path
- let $abs-base :=
- if (exists($context))
- then resolve-uri($base, base-uri($context))
- else $base
- let $fragment :=
- substring-after($db-path, "#")[.]
- let $api-path :=
- string-join((
- nav:sequence-to-api-path(doc($abs-base)), $fragment), "/-id/"
- )
- return
- if ($include-api-prefix)
- then $api-path
- else replace($api-path, "^/code/api", "")
-};
\ No newline at end of file
diff --git a/code/api/modules/scache.xqm b/code/api/modules/scache.xqm
deleted file mode 100644
index e674feb0..00000000
--- a/code/api/modules/scache.xqm
+++ /dev/null
@@ -1,125 +0,0 @@
-xquery version "1.0";
-(:~ search cache module
- :
- : Open Siddur Project
- : Copyright 2011 Efraim Feinstein
- : Licensed under the GNU Lesser General Public License, version 3 or later
- :
- : $Id: scache.xqm 720 2011-04-03 18:39:23Z efraim.feinstein $
- :)
-module namespace scache="http://jewishliturgy.org/modules/scache";
-
-import module namespace request="http://exist-db.org/xquery/request";
-import module namespace session="http://exist-db.org/xquery/session";
-import module namespace util="http://exist-db.org/xquery/util";
-
-import module namespace api="http://jewishliturgy.org/modules/api"
- at "/code/api/modules/api.xqm";
-
-declare variable $scache:prefix := 'cache.';
-
-(:~ return the session key associated with the uri and search parameters :)
-declare function local:key(
- $uri as xs:string,
- $search as xs:string
- ) as xs:string {
- concat($scache:prefix, util:hash(concat($uri, $search), 'md5'))
-};
-
-(:~ check if a set of collections or resources is up to date since the search
- : $uri, $search :)
-declare function scache:is-up-to-date(
- $collections as xs:string+,
- $uri as xs:string,
- $search as xs:string
- ) as xs:boolean {
- scache:is-cached($uri, $search)
- and (
- every $collection in $collections
- satisfies (
- let $search-time := session:get-attribute(concat(local:key($uri, $search), '-time')) cast as xs:dateTime
- return
- if (xmldb:collection-available($collection))
- then
- let $update-record := concat($collection, '/updated.xml')
- let $update-times := collection($collection)//updated
- return (
- (:
- util:log-system-out((
- 'scache:is-cached(',$uri,'): collection=', $collection,' empty = ', empty($update-times),
- ' ',
- for $u-t in $update-times
- return ($u-t, ' < ', $search-time, ' = ', $u-t < $search-time))),
- :)
- empty($update-times) or
- (every $update-time in $update-times
- satisfies xs:dateTime($update-time) < $search-time)
- )
- else
- (: is it a resource? :)
- if (doc-available($collection))
- then
- let $c-name := util:collection-name($collection)
- let $d-name := util:document-name($collection)
- let $update-time := xmldb:last-modified($c-name, $d-name)
- return
- xs:dateTime($update-time) < $search-time
- else ( (: do not know what to do - no contribution :) true() )
- )
- )
-};
-
-(:~ check if the given search is cached in the session :)
-declare function scache:is-cached(
- $uri as xs:string,
- $search as xs:string
- ) as xs:boolean {
- session:get-attribute-names() = local:key($uri, $search)
-};
-
-(:~ store the content into the cache and return it, with request parameters taken account of
- :)
-declare function scache:store(
- $uri as xs:string,
- $search as xs:string,
- $content as item()
- ) as item() {
- session:set-attribute(local:key($uri, $search), $content),
- session:set-attribute(concat(local:key($uri, $search), '-time'), current-dateTime()),
- scache:get-request($uri, $search)
-};
-
-(:~ retrieve an entire saved search from the cache :)
-declare function scache:get(
- $uri as xs:string,
- $search as xs:string
- ) as item()? {
- session:get-attribute(local:key($uri, $search))
-};
-
-(:~ return the parts of a saved search specified by the request parameters
- : start and max-results
- : Assumes a ul/li structure in the results
- :)
-declare function scache:get-request(
- $uri as xs:string,
- $search as xs:string
- ) as element()? {
- let $full-result := scache:get($uri, $search)
- let $start := request:get-parameter('start', 1)
- let $max-results := request:get-parameter('max-results', $api:default-max-results)
- where $full-result
- return
- element { node-name($full-result) }{
- $full-result/@*,
- subsequence($full-result/*, $start, $max-results)
- }
-};
-
-(:~ clear all session cached results :)
-declare function scache:clear(
- ) as empty() {
- for $a in session:get-attribute-names()
- where starts-with($a, $scache:prefix)
- return session:remove-attribute($a)
-};
\ No newline at end of file
diff --git a/code/api/template.xqm b/code/api/template.xqm
deleted file mode 100644
index e8bbfbdc..00000000
--- a/code/api/template.xqm
+++ /dev/null
@@ -1,120 +0,0 @@
-(:~
- : template for API modules
- :
- : Copyright 2011 Efraim Feinstein
- : Licensed under the GNU Lesser General Public License, version 3 or later
- :)
-module namespace apit = 'http://jewishliturgy.org/api/template';
-
-import module namespace api="http://jewishliturgy.org/modules/api"
- at "/code/api/modules/api.xqm";
-
-declare default element namespace "http://www.w3.org/1999/xhtml";
-
-declare variable $apit:allowed-methods := "GET";
-declare variable $apit:accept-content-type := api:html-content-type();
-declare variable $apit:request-content-type := ();
-declare variable $apit:test-source := "LINK TO TEST SOURCE HERE";
-
-declare function apit:title(
- $uri as xs:anyAtomicType
- ) as xs:string {
- "Insert title here. This function can check languages too."
-};
-
-declare function apit:allowed-methods(
- $uri as xs:anyAtomicType
- ) as xs:string* {
- $apit:allowed-methods
-};
-
-declare function apit:accept-content-type(
- $uri as xs:anyAtomicType
- ) as xs:string* {
- $apit:accept-content-type
-};
-
-declare function apit:request-content-type(
- $uri as xs:anyAtomicType
- ) as xs:string* {
- $apit:request-content-type
-};
-
-declare function apit:list-entry(
- $uri as xs:anyAtomicType
- ) as element(li) {
- (: this function probably does not have to change :)
- api:list-item(
- element span {apit:title($uri)},
- $uri,
- apit:allowed-methods($uri),
- apit:accept-content-type($uri),
- apit:request-content-type($uri),
- ()
- )
-};
-
-declare function local:disallowed() {
- (: This probably needs no changes :)
- let $d := api:allowed-method($apit:allowed-methods)
- where not($d)
- return api:error((), "Method not allowed")
-};
-
-declare function apit:get() {
- let $test-result := api:tests($apit:test-source)
- let $accepted := api:get-accept-format($apit:accept-content-type)
- let $uri := request:get-uri()
- return
- if (not($accepted instance of element(api:content-type)))
- then $accepted
- else if ($test-result)
- then $test-result
- else (
- api:serialize-as("xhtml", $accepted),
- let $list-body := (
-
{
- ((: insert common list items here :))
- }
,
- (: insert results here :) ()
- )
- return
- api:list(
- {apit:title($uri)},
- $list-body,
- count($list-body/self::ul[@class="results"]/li),
- false(),
- apit:allowed-methods($uri),
- apit:accept-content-type($uri),
- apit:request-content-type($uri),
- $apit:test-source
- )
- )
-};
-
-declare function apit:put() {
- local:disallowed()
-};
-
-declare function apit:post() {
- local:disallowed()
-};
-
-declare function apit:delete() {
- local:disallowed()
-};
-
-declare function apit:go() {
- let $method := api:get-method()
- return
- if ($method = "GET")
- then apit:get()
- else if ($method = "PUT")
- then apit:put()
- else if ($method = "POST")
- then apit:post()
- else if ($method = "DELETE")
- then apit:delete()
- else local:disallowed()
-};
-
diff --git a/code/api/user.xqm b/code/api/user.xqm
deleted file mode 100644
index b35b2269..00000000
--- a/code/api/user.xqm
+++ /dev/null
@@ -1,477 +0,0 @@
-xquery version "3.0";
-(:~ User management API
- :
- : Copyright 2012 Efraim Feinstein
- : Licensed under the GNU Lesser General Public License, version 3 or later
- :)
-module namespace user="http://jewishliturgy.org/api/user";
-
-import module namespace api="http://jewishliturgy.org/modules/api"
- at "/code/api/modules/api.xqm";
-import module namespace app="http://jewishliturgy.org/modules/app"
- at "/code/modules/app.xqm";
-import module namespace debug="http://jewishliturgy.org/transform/debug"
- at "/code/modules/debug.xqm";
-import module namespace jvalidate="http://jewishliturgy.org/modules/jvalidate"
- at "/code/modules/jvalidate.xqm";
-import module namespace magic="http://jewishliturgy.org/magic"
- at "/code/magic/magic.xqm";
-import module namespace name="http://jewishliturgy.org/modules/name"
- at "/code/modules/name.xqm";
-import module namespace kwic="http://exist-db.org/xquery/kwic";
-
-declare namespace html="http://www.w3.org/1999/xhtml";
-declare namespace tei="http://www.tei-c.org/ns/1.0";
-declare namespace j="http://jewishliturgy.org/ns/jlptei/1.0";
-declare namespace rest="http://exquery.org/ns/rest/annotation/";
-declare namespace output="http://www.w3.org/2010/xslt-xquery-serialization";
-declare namespace error="http://jewishliturgy.org/errors";
-
-(: path to user profile data :)
-declare variable $user:path := "/user";
-(: path to schema :)
-declare variable $user:schema := "/schema/contributor.rnc";
-
-(:~ Get the API path for a given user or profile
- : @param $name The user name
- : @return the API URI that references a user of a given name or empty-sequence()
- :)
-declare function user:api-path(
- $name as xs:string
- ) as xs:string? {
- let $doc := collection($user:path)//tei:idno[.=$name]/root(.)
- where $doc
- return
- concat("/api", $user:path, "/",
- encode-for-uri(
- replace(util:document-name($doc), "\.xml$", "")
- )
- )
-};
-
-declare function user:db-path(
- $name as xs:string
- ) as xs:string? {
- let $doc := collection($user:path)//tei:idno[.=$name]/root(.)
- where $doc
- return
- concat($user:path, "/",
- encode-for-uri(
- replace(util:document-name($doc), "\.xml$", "")
- )
- )
-};
-
-declare function local:result-title(
- $result as element(j:contributor)
- ) as xs:string {
- if (exists($result/tei:name))
- then name:name-to-string($result/tei:name)
- else $result/(tei:orgName, tei:idno)[1]/string()
-};
-
-(: @return (list, start, count, n-results) :)
-declare function local:query(
- $query as xs:string,
- $start as xs:integer,
- $count as xs:integer
- ) as item()+ {
- let $all-results :=
- collection($user:path)/j:contributor[ft:query(.,$query)]
- let $listed-results :=
- {
- for $result in
- subsequence($all-results, $start, $count)
- let $document := root($result)
- group $result as $hit by $document as $doc
- order by max(for $h in $hit return ft:score($h))
- return
- let $api-name := replace(util:document-name($doc), "\.xml$", "")
- return
-
,
- $start,
- $count,
- count($all)
- )
-};
-
-
-(:~ List or query users and contributors
- : @param $query text of the query, empty string for all
- : @param $start first user to list
- : @param $max-results number of users to list
- : @return a list of users whose full names or user names match the query
- :)
-declare
- %rest:GET
- %rest:path("/api/user")
- %rest:query-param("q", "{$query}", "")
- %rest:query-param("start", "{$start}", 1)
- %rest:query-param("max-results", "{$max-results}", 100)
- %rest:produces("application/xhtml+xml", "application/xml", "text/xml", "text/html")
- %output:method("html5")
- function user:list(
- $query as xs:string,
- $start as xs:integer,
- $max-results as xs:integer
- ) as item()+ {
-
-
-
-
- ,
- let $results as item()+ :=
- if ($query)
- then local:query($query, $start, $max-results)
- else local:list($start, $max-results)
- let $result-element := $results[1]
- let $start := $results[2]
- let $count := $results[3]
- let $total := $results[4]
- return
-
-
- User and contributor API
-
-
-
-
-
-
- {
- $result-element
- }
-
-
-};
-
-(:~ Get a user profile
- : @param $name Name of user to profile
- : @return The profile, if available. Otherwise, return error 404 (not found)
- :)
-declare
- %rest:GET
- %rest:path("/api/user/{$name}")
- %rest:produces("application/xml", "application/tei+xml", "text/xml")
- %output:method("xml")
- function user:get(
- $name as xs:string
- ) as item()+ {
- let $resource := concat($user:path, "/", encode-for-uri($name), ".xml")
- return
- if (doc-available($resource))
- then doc($resource)
- else api:rest-error(404, "Not found")
-};
-
-(:~ Create a new user or edit a user's password, using XML
- : @param $body The user XML, {name}{}
- : @return if available. Otherwise, return errors
- : 201 (created): A new user was created, a location link points to the profile
- : 400 (bad request): User or password missing
- : 401 (not authorized): Attempt to change a password for a user and you are not authenticated,
- : 403 (forbidden): Attempt to change a password for a user and you are authenticated as a different user
- :)
-declare
- %rest:POST("{$body}")
- %rest:path("/api/user")
- %rest:consumes("application/xml", "text/xml")
- function user:post-xml(
- $body as document-node()
- ) as item()+ {
- user:post-form($body//user, $body//password)
-};
-
-(:~ Create a new user or edit a user's password, using a web form
- : @param $name The user's name
- : @param $password The user's new password
- : @return if available. Otherwise, return errors
- : 201 (created): A new user was created, a location link points to the profile
- : 400 (bad request): User or password missing
- : 401 (not authorized): Attempt to change a password for a user and you are not authenticated,
- : 403 (forbidden): Attempt to change a password for a user and you are authenticated as a different user
- :)
-declare
- %rest:POST
- %rest:path("/api/user")
- %rest:form-param("user", "{$name}")
- %rest:form-param("password", "{$password}")
- function user:post-form(
- $name as xs:string?,
- $password as xs:string?
- ) as item()+ {
- if (not($name) or not($password))
- then api:rest-error(400, "Missing user or password")
- else
- let $user := app:auth-user()
- return
- if ($user = $name)
- then
- (: logged in as the user of the request.
- : this is a change password request
- :)
-
-
-
-
- {
- system:as-user("admin", $magic:password,
- xmldb:change-user($name, $password, (), ())
- )
- }
-
-
- else if (not($user))
- then
- (: not authenticated, this is a new user request :)
- if (xmldb:exists-user($name))
- then
- (: user already exists, need to be authenticated to change the password :)
- api:rest-error(401, "Not authorized")
- else if (collection($user:path)//tei:idno=$name)
- then
- (: profile already exists, but is not a user. No authorization will help :)
- api:rest-error(403, "Forbidden")
- else (
- (: the user can be created :)
- system:as-user("admin", $magic:password, (
- let $null := xmldb:create-user($name, $password, "everyone", ())
- let $grouped :=
- (: TODO: remove this code when using eXist r16453+ :)
- try {
- xmldb:create-group($name, ($name, "admin"))
- or true()
- }
- catch * {
- true(),
- debug:debug($debug:warn, "api", "While creating a user, the group already existed and passed me an NPE")
- }
- let $stored :=
- xmldb:store($user:path,
- concat(encode-for-uri($name), ".xml"),
-
- {$name}
-
- )
- let $uri := xs:anyURI($stored)
- return
- if ($stored and $grouped)
- then
-
-
-
-
- {
- sm:chmod($uri, "rw-r--r--"),
- sm:chown($uri, $name),
- sm:chgrp($uri, $name)
- }
-
-
-
-
- else
- api:rest-error(500, "Internal error in creating a group or storing a document",
- ("group creation: " || $grouped || " storage = " || $stored)
- )
- ))
- )
- else
- (: authenticated as a user who is not the one we're changing :)
- api:rest-error(403, "Attempt to change the password of a different user")
-};
-
-declare function user:validate(
- $doc as document-node(),
- $name as xs:string
- ) as xs:boolean {
- jvalidate:validation-boolean(
- user:validate-report($doc, $name)
- )
-};
-
-declare function user:validate-report(
- $doc as document-node(),
- $name as xs:string
- ) as element(report) {
- jvalidate:concatenate-reports((
- jvalidate:validate-relaxng($doc, xs:anyURI($user:schema)),
- let $name-ok := $name = $doc//tei:idno
- return
-
- {
- if (not($name-ok))
- then "invalid"
- else "valid"
- }
- {
- if (not($name-ok))
- then "tei:idno must be the same as the profile name."
- else ()
- }
-
- ))
-};
-
-(:~ Edit or create a user or contributor profile
- : @param $name The name to place the profile under
- : @param $body The user profile, which must validate against /schema/contributor.rnc
- : @return
- : 201 (created): A new contributor profile, which is not associated with a user, has been created
- : 204 (no data): The profile was successfully edited
- : 400 (bad request): The profile is invalid
- : 401 (not authorized): You are not authenticated,
- : 403 (forbidden): You are authenticated as a different user
- :)
-declare
- %rest:PUT("{$body}")
- %rest:path("/api/user/{$name}")
- %rest:consumes("application/tei+xml", "application/xml", "text/xml")
- function user:put(
- $name as xs:string,
- $body as document-node()
- ) as item()+ {
- let $user := app:auth-user()
- let $resource := concat($user:path, "/", encode-for-uri($name), ".xml")
- let $resource-exists := doc-available($resource)
- let $is-non-user-profile :=
- not($user = $name) and
- ($resource-exists and sm:has-access(xs:anyURI($resource), "w")) or
- not($resource-exists)
- return
- if (not($user))
- then api:rest-error(401, "Unauthorized")
- else if ($user = $name or $is-non-user-profile)
- then
- (: user editing his own profile, or a non-user profile :)
- if (user:validate($body, $name))
- then
- (: the profile is valid :)
- if (xmldb:store($user:path, $resource, $body))
- then (
- system:as-user("admin", $magic:password, (
- sm:chown(xs:anyURI($resource), $user),
- sm:chgrp(xs:anyURI($resource), if ($is-non-user-profile) then "everyone" else $user),
- sm:chmod(xs:anyURI($resource), if ($is-non-user-profile) then "rw-rw-r--" else "rw-r--r--")
- )),
-
-
-
-
- {
- if ($resource-exists)
- then
- else
-
-
-
- }
-
- )
- else api:rest-error(500, "Internal error: cannot store the profile")
- else api:rest-error(400, "Invalid", user:validate-report($body, $name))
- else api:rest-error(403, "Forbidden")
-};
-
-(:~ Delete a contributor or contributor profile
- : @param $name Profile to remove
- : @return
- : 204 (no data): The profile was successfully deleted
- : 400 (bad request): The profile is referenced elsewhere and cannot be deleted. A list of references is returned
- : 401 (not authorized): You are not authenticated
- : 403 (forbidden): You are authenticated as a different user
- :)
-declare
- %rest:DELETE
- %rest:path("/api/user/{$name}")
- function user:delete(
- $name as xs:string
- ) as item()+ {
- let $user := app:auth-user()
- let $resource-name := concat(encode-for-uri($name), ".xml")
- let $resource := concat($user:path, "/", $resource-name)
- let $resource-exists := doc-available($resource)
- let $is-non-user-profile :=
- not($user = $name) and
- ($resource-exists and sm:has-access(xs:anyURI($resource), "w"))
- let $return-success :=
-
-
-
-
-
-
- return
- if (not($resource-exists))
- then api:rest-error(404, "Not found")
- else if (not($user))
- then api:rest-error(401, "Unauthorized")
- else if ($user = $name)
- then (
- (: TODO: check for references!!! :)
- xmldb:remove($user:path, $resource-name),
- system:as-user("admin", $magic:password, (
- try {
- xmldb:delete-user($name),
- sm:delete-group($name, "everyone"),
- $return-success
- }
- catch * {
- api:rest-error(500, "Internal error: Cannot delete the user or group!",
- debug:print-exception("user",
- $err:line-number, $err:column-number,
- $err:code, $err:value, $err:description))
- }
- ))
- )
- else if ($is-non-user-profile)
- then (
- (: non-user profile -- check for references! :)
- xmldb:remove($user:path, $resource-name),
- $return-success
- )
- else
- (: must be another user's profile :)
- api:rest-error(403, "Forbidden")
-};
\ No newline at end of file
diff --git a/code/apps/bibliography/edit.xql b/code/apps/bibliography/edit.xql
deleted file mode 100644
index 8242cc57..00000000
--- a/code/apps/bibliography/edit.xql
+++ /dev/null
@@ -1,61 +0,0 @@
-xquery version "1.0";
-(: Bibliography editing UI
- : Copyright 2010 Efraim Feinstein
- : Licensed under the GNU Lesser General Public License, version 3 or later
- : $Id: edit.xql 687 2011-01-23 23:36:48Z efraim.feinstein $
- :)
-declare namespace xf="http://www.w3.org/2002/xforms";
-declare namespace tei="http://www.tei-c.org/ns/1.0";
-declare namespace ev="http://www.w3.org/2001/xml-events";
-declare namespace xs="http://www.w3.org/2001/XMLSchema";
-declare namespace xrx="http://jewishliturgy.org/ns/xrx";
-declare option exist:serialize "method=xhtml media-type=text/xml indent=no process-pi-xsl=no";
-
-import module namespace paths="http://jewishliturgy.org/apps/lib/paths"
- at "../lib/paths.xqm";
-import module namespace controls="http://jewishliturgy.org/apps/lib/controls"
- at "../lib/controls.xqm";
-import module namespace login="http://jewishliturgy.org/apps/lib/login"
- at "../lib/login.xqm";
-import module namespace bibliography="http://jewishliturgy.org/apps/lib/bibliography"
- at "../lib/bibliography.xqm";
-
-let $form :=
-
-
- Bibliography editor
-
- {bibliography:list-instance('items')}
-
-
-
- Save error. Fill in all required fields.
-
-
-
- {login:form-instance('login')}
-
-
-
-
-
Open Siddur Global Bibliography Editor
-
- {login:form-ui('login')}
-
-
- Save all records
-
-
- {bibliography:list-gui('items','items-gui')}
-
- Save all records
-
-
-
-
-return ($paths:xslt-pi,$paths:debug-pi,$form)
diff --git a/code/apps/bibliography/load.xql b/code/apps/bibliography/load.xql
deleted file mode 100644
index bddffb99..00000000
--- a/code/apps/bibliography/load.xql
+++ /dev/null
@@ -1,134 +0,0 @@
-xquery version "1.0";
-(: Bibliography loader
- : Copyright 2010 Efraim Feinstein
- : Licensed under the GNU Lesser General Public License, version 3 or later
- :)
-declare namespace xf="http://www.w3.org/2002/xforms";
-declare namespace tei="http://www.tei-c.org/ns/1.0";
-declare namespace ev="http://www.w3.org/2001/xml-events";
-declare namespace xs="http://www.w3.org/2001/XMLSchema";
-declare namespace xrx="http://jewishliturgy.org/ns/xrx";
-declare option exist:serialize "method=xml media-type=text/xml indent=yes process-pi-xsl=no";
-
-import module namespace paths="http://jewishliturgy.org/apps/lib/paths"
- at "../lib/paths.xqm";
-
-(: :)
-let $bibliography-file := '/group/everyone/bibliography/bibliography.xml'
-let $prototype :=
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-let $incoming-transform :=
-
-
-
-
-
-
- {
- let $prototype-xsl := concat($paths:rest-prefix, $paths:apps, '/lib/prototype.xsl2')
- return
- if (doc-available($prototype-xsl))
- then doc($prototype-xsl)/xsl:stylesheet/node()
- else error(xs:QName('xrx:WTF'),'Prototype doesnt exist')
- }
-
-
- {$prototype}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- biblStruct
-
-
-
-
-
-
-
-
-
-return
- {
- (
- if (doc-available($bibliography-file))
- then
- let $result :=
- transform:transform(
- doc($bibliography-file)//tei:div[@type='bibliography']/tei:listBibl, $incoming-transform, ())
- return ($result,
- util:log-system-out(('transform in:', $incoming-transform, 'using:', doc($bibliography-file)//tei:div[@type='bibliography']/tei:listBibl, 'transform result: ', $result)))
- else
- util:log-system-out('Loading unavailable bibliography file') (: not available :)
- )
- }
-
diff --git a/code/apps/bibliography/save.xql b/code/apps/bibliography/save.xql
deleted file mode 100644
index 153565a3..00000000
--- a/code/apps/bibliography/save.xql
+++ /dev/null
@@ -1,225 +0,0 @@
-xquery version "1.0";
-(: Bibliography saver
- : Copyright 2010 Efraim Feinstein
- : Licensed under the GNU Lesser General Public License, version 3 or later
- :)
-declare namespace xf="http://www.w3.org/2002/xforms";
-declare namespace tei="http://www.tei-c.org/ns/1.0";
-declare namespace rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#";
-declare namespace cc="http://web.resource.org/cc/";
-declare namespace err="http://jewishliturgy.org/apps/errors";
-declare option exist:serialize "method=xhtml media-type=text/xml indent=no process-pi-xsl=no";
-
-import module namespace app="http://jewishliturgy.org/ns/functions/app";
-
-let $debug := false()
-let $bibliography-collection := '/group/everyone/bibliography'
-let $bibliography-resource := 'bibliography.xml'
-let $bibliography-file := concat($bibliography-collection, '/', $bibliography-resource)
-let $clean-stylesheet :=
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-let $data as element(tei:listBibl) :=
- if ($debug)
- then (
-
-
-
- Rabbi Seligmann Baer
- Seder Avodat Yisrael
-
- Lehrenberger
- Rodelheim
-
-
-
-
- )
- else request:get-data()
-let $cleaned-data as element(tei:listBibl) := transform:transform($data, $clean-stylesheet, ())
-let $bibliography-template :=
-
-
-
-
- Global bibliography
-
-
-
-
- To the extent possible under law, the contributors who associated
- Creative Commons Zero
-
- with this work have waived all copyright and related or neighboring rights to this work.
-
-
-
-
-
-
-
-
-
-
-
- Born digital
-
-
-
-
-
-
- {$cleaned-data}
-
-
-
-
-return
- (app:make-collection-path(
- $bibliography-collection, '/db', 'admin', 'everyone', util:base-to-integer(0775, 8)),
- util:log-system-out(('Attempting to save bibliography...',
- 'Incoming data = ', $data, ' Cleaned data = ', $cleaned-data)),
- if (app:auth-user())
- then
- if (doc-available($bibliography-file))
- then (util:log-system-out('Found an existing bibliography.'),
- update replace doc($bibliography-file)//tei:div[@type='bibliography']/tei:listBibl with $cleaned-data,
- $data
- )
- else (util:log-system-out('No existing bibliography, making a new one.'),
- if (xmldb:store($bibliography-collection, $bibliography-resource, $bibliography-template))
- then (util:log-system-out('New bibliography created'),
- xmldb:set-resource-permissions($bibliography-collection, $bibliography-resource,
- app:auth-user(),
- 'everyone',
- util:base-to-integer(0775, 8)),
- $data)
- else (util:log-system-out('Cannot store bibliography.'),error(xs:QName('err:SAVE'),'Cannot store!'))
- )
- else (util:log-system-out('Cannot do it. Login issue.'),error(xs:QName('err:NOT_LOGGED_IN'),'Not logged in!'))
- )
diff --git a/code/apps/builder/compile.xql b/code/apps/builder/compile.xql
deleted file mode 100644
index b5f231f9..00000000
--- a/code/apps/builder/compile.xql
+++ /dev/null
@@ -1,105 +0,0 @@
-xquery version "1.0";
-(:~ set off the compiler and provide a waiting UI
- :
- : Open Siddur Project
- : Copyright 2011 Efraim Feinstein
- : Licensed under the GNU Lesser General Public License, version 3 or later
- :)
-import module namespace app="http://jewishliturgy.org/modules/app"
- at "/code/modules/app.xqm";
-import module namespace collab="http://jewishliturgy.org/modules/collab"
- at "/code/modules/collab.xqm";
-import module namespace controls="http://jewishliturgy.org/modules/controls"
- at "/code/modules/controls.xqm";
-import module namespace builder="http://jewishliturgy.org/apps/builder/controls"
- at "/code/apps/builder/modules/builder.xqm";
-import module namespace site="http://jewishliturgy.org/modules/site"
- at "/code/modules/site.xqm";
-import module namespace login="http://jewishliturgy.org/apps/user/login"
- at "/code/apps/user/modules/login.xqm";
-
-declare default element namespace "http://www.w3.org/1999/xhtml";
-declare namespace ev="http://www.w3.org/2001/xml-events";
-declare namespace html="http://www.w3.org/1999/xhtml";
-declare namespace tei="http://www.tei-c.org/ns/1.0";
-declare namespace xf="http://www.w3.org/2002/xforms";
-
-declare option exist:serialize "method=xhtml media-type=text/xml indent=yes omit-xml-declaration=no
- process-xsl-pi=no
- doctype-public=-//W3C//DTD XHTML 1.1//EN
- doctype-system=http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd";
-
-let $login-instance-id := 'login'
-let $builder-instance-id := 'builder'
-let $control-id := 'builder-control'
-let $error-instance := 'builder-error'
-return
- site:form(
- {
- login:login-instance($login-instance-id,
- (site:sidebar-login-actions-id(), 'model')
- ),
- builder:login-actions($builder-instance-id),
-
-
- ,
-
-
- {request:get-parameter('item', ())}
-
- ,
- {
-
-
-
- },
- controls:error-instance($error-instance),
-
-
- {
- controls:submission-response(
- $error-instance,
- (),
- (
- ,
-
- )
- )
- },
-
-
- ,
-
-
-
- },
- Open Siddur Builder,
- ,
- (site:css(), builder:css()),
- site:header(),
- (site:sidebar-with-login($login-instance-id),
- builder:sidebar()),
- site:footer(),
- builder:app-header($builder-instance-id, 'app-header', (), 'resource')
- )
diff --git a/code/apps/builder/controller.xql b/code/apps/builder/controller.xql
deleted file mode 100644
index af8ec05c..00000000
--- a/code/apps/builder/controller.xql
+++ /dev/null
@@ -1,86 +0,0 @@
-xquery version "1.0";
-(: controller for the builder application
- : check for login.
- : if logged in, forward, else return to the user application
- : TODO: forward instead to a welcome page!
- :
- : Copyright 2011 Efraim Feinstein
- : Open Siddur Project
- : Licensed under the GNU Lesser General Public License version 3 or later
- :)
-import module namespace app="http://jewishliturgy.org/modules/app"
- at "/code/modules/app.xqm";
-import module namespace data="http://jewishliturgy.org/modules/data"
- at "/code/api/modules/data.xqm";
-import module namespace paths="http://jewishliturgy.org/modules/paths"
- at "/code/modules/paths.xqm";
-
-declare namespace ex="http://exist.sourceforge.net/NS/exist";
-
-declare function local:redirect-nonexistent(
- $redirect-if-not-missing as element()
- ) {
- (: nonexistent resources :)
- let $normalized-resource := replace($exist:resource, '/', '')
- let $missing-resources := ('edit-style.xql')
- return
- if ($normalized-resource = $missing-resources)
- then
-
- {
- if ($paths:debug)
- then
- util:log-system-out(('redirect ', $exist:resource, ' to na' ))
- else ()
- }
-
-
- else (
- $redirect-if-not-missing,
- if ($paths:debug)
- then
- util:log-system-out(('redirect ', $exist:resource, ' to ', $redirect-if-not-missing ))
- else ()
- )
-};
-
-if (app:auth-user())
-then
- if (empty($exist:resource) or $exist:resource = ('', '/'))
- then
-
-
-
- else
- let $item := request:get-parameter('item', ())
- let $doc-exists-ok :=
- if ($item = '')
- then false()
- else if ($item)
- then
- let $doc := data:api-path-to-db($item)
- return
- not(util:is-binary-doc($doc)) and doc-available($doc)
- else
- let $no-item-ok := ('my-siddurim.xql', 'edit-metadata.xql', 'notfound.xql', 'welcome.xql', 'search.xql')
- return
- not(ends-with($exist:resource, '.xql')) or $exist:resource = $no-item-ok
- return
- if ($doc-exists-ok)
- then
- local:redirect-nonexistent(
-
- )
- else
- local:redirect-nonexistent(
-
-
-
- )
-else
- local:redirect-nonexistent(
-
-
-
- )
-
diff --git a/code/apps/builder/edit-content.xql b/code/apps/builder/edit-content.xql
deleted file mode 100644
index ba79f8b6..00000000
--- a/code/apps/builder/edit-content.xql
+++ /dev/null
@@ -1,363 +0,0 @@
-xquery version "1.0";
-(:~ Content editing
- : Editing of selection
- : Assumes you're authenticated (if not, the controller should push the user back to the auth page)
- :
- : Parameters:
- : item= (required)
- :
- : Open Siddur Project
- : Copyright 2011 Efraim Feinstein
- : Licensed under the GNU Lesser General Public License, version 3 or later
- :)
-import module namespace request="http://exist-db.org/xquery/request";
-
-import module namespace app="http://jewishliturgy.org/modules/app"
- at "/code/modules/app.xqm";
-import module namespace builder="http://jewishliturgy.org/apps/builder/controls"
- at "/code/apps/builder/modules/builder.xqm";
-import module namespace controls="http://jewishliturgy.org/modules/controls"
- at "/code/modules/controls.xqm";
-import module namespace collab="http://jewishliturgy.org/modules/collab"
- at "/code/modules/collab.xqm";
-import module namespace site="http://jewishliturgy.org/modules/site"
- at "/code/modules/site.xqm";
-import module namespace paths="http://jewishliturgy.org/modules/paths"
- at "/code/modules/paths.xqm";
-import module namespace login="http://jewishliturgy.org/apps/user/login"
- at "/code/apps/user/modules/login.xqm";
-
-declare default element namespace "http://www.w3.org/1999/xhtml";
-declare namespace ev="http://www.w3.org/2001/xml-events";
-declare namespace html="http://www.w3.org/1999/xhtml";
-declare namespace tei="http://www.tei-c.org/ns/1.0";
-declare namespace j="http://jewishliturgy.org/ns/jlptei/1.0";
-declare namespace xf="http://www.w3.org/2002/xforms";
-declare namespace xrx="http://jewishliturgy.org/xrx";
-
-declare option exist:serialize "method=xhtml media-type=text/xml indent=yes omit-xml-declaration=no
- process-xsl-pi=no
- doctype-public=-//W3C//DTD XHTML 1.1//EN
- doctype-system=http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd";
-
-let $authenticated := app:authenticate()
-let $login-instance-id := 'login'
-let $builder-instance-id := 'selection'
-let $submit-ref := "instance('selection')"
-let $error-instance-id := 'error'
-let $save-flag-instance-id := 'save-flag'
-let $document-chooser-id := 'document-chooser'
-let $control-id := 'builder-control'
-let $resource := request:get-parameter('item', ())
-return
- site:form(
- {
- login:login-instance($login-instance-id,
- (site:sidebar-login-actions-id(), 'model')
- ),
- controls:error-instance($error-instance-id),
- controls:save-flag-instance($save-flag-instance-id),
- builder:login-actions($builder-instance-id),
-
-
- ,
- (: get around Firefox bugs :)
-
-
- ,
- (: resource that's being edited :)
-
-
- {
- $resource
- }
-
- ,
- (: selection of resource that's being edited :)
-
-
- ,
- (: placeholder :)
-
- The next insert will be here
- ,
- (: document chooser :)
- builder:document-chooser-instance($document-chooser-id, true(), 'everyone', 'resource'),
- (: initial load :)
-
-
- {
- controls:submission-response($error-instance-id, (),
- (
-
- )
- )
- },
- (: title load: supports 2 modes:
- : (1) dispatch load-all to model so all the titles can be reloaded
- : (2) set title-index/index to the item whose title should be loaded, dispatch load-one
- :)
-
-
-
-
- ,
- ,
-
-
-
-
- ,
-
-
- ,
-
- { ( (: entry point for loading all titles in a loop :) )}
-
-
- ,
-
- { ( (: load the title of title-index/index :) )}
-
-
- ,
-
- { ( (: load all titles in a loop :) )}
-
-
- ,
-
-
- {
- controls:submission-response($error-instance-id, (), (
-
- ))
- },
- (: selection submit to get one item :)
-
-
-
-
- ,
-
-
- ,
-
-
- {
- controls:submission-response($error-instance-id, (), ())
- }
- ,
- (: selection post position holds the position where the next item should be added
- : or empty if top
- :)
-
-
-
-
- ,
-
- {attribute xml:id {''}}
- ,
- (: selection item post holds the item that should be inserted :)
-
-
- {
- controls:submission-response($error-instance-id, (), (
- (: read the new item and insert it :)
- ,
- ,
- (: if post was to the beginning of the selection... :)
- ,
- ,
- (: if post was to somewhere inside the selection... :)
- ,
- (: the new one's index does not appear, so I'm using the old index + 2 :)
- ,
- ,
- controls:set-save-flag($save-flag-instance-id, true())
- )
- )
- }
- ,
- (: deletion item is the id of the selection item up for deletion :)
-
-
-
-
- ,
-
- {
- controls:submission-response($error-instance-id, (),
- controls:set-save-flag($save-flag-instance-id, true()))
- }
- ,
-
-
-
- },
- Open Siddur Builder,
- ,
- (site:css(), builder:css(),
- controls:faketable-style(
- concat('control-', $document-chooser-id),
- 100,
- 3)
- ),
- site:header(),
- (site:sidebar-with-login($login-instance-id),
- builder:sidebar()),
- site:footer(),
- builder:app-header($builder-instance-id, 'app-header',
- controls:save-status-ui($save-flag-instance-id, 'control-save-status', ),
- 'resource')
- )
diff --git a/code/apps/builder/edit-metadata.xql b/code/apps/builder/edit-metadata.xql
deleted file mode 100644
index 2e68fac1..00000000
--- a/code/apps/builder/edit-metadata.xql
+++ /dev/null
@@ -1,354 +0,0 @@
-xquery version "1.0";
-(:~ Metadata editing
- : Metadata includes resource name, all information on the title page, primary license
- :
- : ?new=true
- : ?resource=resource-path
- :
- : Open Siddur Project
- : Copyright 2011 Efraim Feinstein
- : Licensed under the GNU Lesser General Public License, version 3 or later
- :)
-import module namespace request="http://exist-db.org/xquery/request";
-
-import module namespace app="http://jewishliturgy.org/modules/app"
- at "/code/modules/app.xqm";
-import module namespace builder="http://jewishliturgy.org/apps/builder/controls"
- at "/code/apps/builder/modules/builder.xqm";
-import module namespace collab="http://jewishliturgy.org/modules/collab"
- at "/code/modules/collab.xqm";
-import module namespace controls="http://jewishliturgy.org/modules/controls"
- at "/code/modules/controls.xqm";
-import module namespace site="http://jewishliturgy.org/modules/site"
- at "/code/modules/site.xqm";
-import module namespace paths="http://jewishliturgy.org/modules/paths"
- at "/code/modules/paths.xqm";
-import module namespace login="http://jewishliturgy.org/apps/user/login"
- at "/code/apps/user/modules/login.xqm";
-
-declare default element namespace "http://www.w3.org/1999/xhtml";
-declare namespace ev="http://www.w3.org/2001/xml-events";
-declare namespace html="http://www.w3.org/1999/xhtml";
-declare namespace tei="http://www.tei-c.org/ns/1.0";
-declare namespace xf="http://www.w3.org/2002/xforms";
-declare namespace xrx="http://jewishliturgy.org/xrx";
-
-declare option exist:serialize "method=xhtml media-type=text/xml indent=yes omit-xml-declaration=no
- process-xsl-pi=no
- doctype-public=-//W3C//DTD XHTML 1.1//EN
- doctype-system=http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd";
-
-let $authenticated := app:authenticate()
-let $resource := request:get-parameter('item', ())
-let $new :=
- request:get-parameter('new',
- if (exists($resource))
- then 'false'
- else 'true')
-let $login-instance-id := 'login'
-let $builder-instance-id := 'builder'
-let $save-flag-instance-id := concat($builder-instance-id, '-save-flag')
-let $error-instance-id := 'error'
-let $language-selector-instance-id := 'language-selector'
-let $license-chooser-id := 'license-chooser'
-let $control-id := 'builder-control'
-let $share-options-instance-id := 'share-options'
-return
- site:form(
- {
- login:login-instance($login-instance-id,
- (site:sidebar-login-actions-id(), 'model')
- ),
- controls:language-selector-instance($language-selector-instance-id),
- controls:license-chooser-instance($license-chooser-id, true()),
- builder:share-options-instance($share-options-instance-id),
- controls:save-flag-instance($save-flag-instance-id),
-
-
-
-
-
-
-
-
-
-
-
-
- The Open Siddur Project
-
-
-
-
-
- en
-
- ,
- ,
- ,
- ,
- ,
- ,
- ,
- ,
- ,
- ,
- ,
- ,
- ,
- ,
- ,
- builder:login-actions($builder-instance-id),
- controls:error-instance($error-instance-id),
-
-
- ,
-
-
- {
- $resource
- }
-
- ,
-
-
- {
- controls:submission-response(
- $error-instance-id, (),
- (:success actions = submit all the individual parts :)
- (
- ,
- {
- attribute submission { controls:rt-submission-set("title") }
- },
- {
- attribute submission { controls:rt-submission-set("subtitle") }
- },
- {
- attribute submission { controls:rt-submission-set("front") }
- },
- {
- attribute submission { controls:rt-submission-set("lang") }
- },
- {
- attribute submission { controls:rt-submission-set("license") }
- },
- controls:set-save-flag($save-flag-instance-id, true())
- )
- )
- }
- ,
- controls:rt-submission(
- attribute bind { "title" },
- ,
- ,
- attribute replace { 'instance' },
- attribute targetref { "instance('metadata')/tei:title[@type='main']" },
- $error-instance-id,
- attribute if { "instance('resource')/item != ''" }
- ),
- controls:rt-submission(
- attribute bind { "subtitle" },
- ,
- ,
- attribute replace { 'instance' },
- attribute targetref { "instance('metadata')/tei:title[@type='sub']" },
- $error-instance-id,
- attribute if { "instance('resource')/item != ''" }
- ),
- controls:rt-submission(
- attribute bind { "front" },
- ,
- ,
- attribute replace { 'instance' },
- attribute targetref { "instance('metadata')/tei:front" },
- $error-instance-id,
- attribute if { "instance('resource')/item != ''" }
- ),
- controls:rt-submission(
- attribute bind { "lang" },
- ,
- ,
- attribute replace { 'text' },
- attribute targetref { "instance('metadata')/lang" },
- $error-instance-id,
- attribute if { "instance('resource')/item != ''" }
- ),
- controls:rt-submission(
- (:attribute ref { controls:instance-to-ref($license-chooser-id) }:)
- attribute bind { "license" },
- ,
- ,
- attribute replace { 'instance' },
- attribute instance { $license-chooser-id },
- $error-instance-id,
- attribute if { "instance('resource')/item != ''" }
- )
- },
- Open Siddur Builder,
- ,
- (site:css(), builder:css()),
- site:header(),
- (site:sidebar-with-login($login-instance-id),
- builder:sidebar()),
- site:footer(),
- builder:app-header($builder-instance-id, 'app-header',
-
-
- {
- controls:save-status-ui(
- $save-flag-instance-id,
- concat($control-id, '-status'),
- ( (: DOMFocusout will result in the save, so, no additional action is necessary :) )
- )
- }
-
-
- Unsaved
-
- ,
- 'resource'
- )
- )
diff --git a/code/apps/builder/modules/builder.xqm b/code/apps/builder/modules/builder.xqm
deleted file mode 100644
index e853259b..00000000
--- a/code/apps/builder/modules/builder.xqm
+++ /dev/null
@@ -1,856 +0,0 @@
-xquery version "1.0";
-(: common controls for builder applications
- :
- : Copyright 2011 Efraim Feinstein
- : Open Siddur Project
- : Licensed under the GNU Lesser General Public License version 3 or later
- :)
-module namespace builder="http://jewishliturgy.org/apps/builder/controls";
-
-import module namespace xmldb="http://exist-db.org/xquery/xmldb";
-
-import module namespace app="http://jewishliturgy.org/modules/app"
- at "/code/modules/app.xqm";
-import module namespace controls="http://jewishliturgy.org/modules/controls"
- at "/code/modules/controls.xqm";
-import module namespace login="http://jewishliturgy.org/apps/user/login"
- at "/code/apps/user/modules/login.xqm";
-import module namespace site="http://jewishliturgy.org/modules/site"
- at "/code/modules/site.xqm";
-
-declare default element namespace "http://www.w3.org/1999/xhtml";
-declare namespace ev="http://www.w3.org/2001/xml-events";
-declare namespace html="http://www.w3.org/1999/xhtml";
-declare namespace tei="http://www.tei-c.org/ns/1.0";
-declare namespace j="http://jewishliturgy.org/ns/jlptei/1.0";
-declare namespace xrx="http://jewishliturgy.org/xrx";
-declare namespace xf="http://www.w3.org/2002/xforms";
-
-declare variable $builder:app-location := '/code/apps/builder';
-
-(:~ output login-dependent sidebar for builder
- : login dependence requires sending login actions here
- :)
-declare function builder:sidebar(
- ) as element(xf:group) {
-
-
-
-
-
-
-
-
-
-
-};
-
-(:~ login action id for builder sidebar :)
-declare function builder:sidebar-login-actions-id(
- ) as xs:string {
- 'builder-sidebar'
-};
-
-declare function builder:app-header(
- $builder-instance-id as xs:string,
- $control-id as xs:string,
- $save-button-control as element()?
- ) {
- builder:app-header($builder-instance-id, $control-id, $save-button-control, ())
-};
-
-(:~ builder application header
- : @param $builder-instance-id base instance id of builder information
- : @param $control-id control id of the application header
- : @param $save-button-control Save button control. Use controls:save-status-ui() for the default.
- : @param $resource-instance-id Idenitifier of instance that holds /resource, the resource being edited
- :)
-declare function builder:app-header(
- $builder-instance-id as xs:string,
- $control-id as xs:string,
- $save-button-control as element()?,
- $resource-instance-id as xs:string?
- ) as element()+ {
- let $uri := string(request:get-uri())
- let $active-tab-id := replace(substring-after($uri, concat(util:collection-name($uri), '/')), '.xql$', '')
- let $resource-param :=
- if ($resource-instance-id)
- then concat("'?item=',", controls:instance-to-ref($resource-instance-id, '/item'))
- else "''"
- let $resource-ref :=
- if ($resource-instance-id)
- then attribute ref {controls:instance-to-ref($resource-instance-id, "/item[. != '']")}
- else ()
- return
-
-
-
-
-
- {
- if ($active-tab-id = 'my-siddurim')
- then attribute class {'nav-active'}
- else ()
- }
-
- My siddurim
-
-
-
-
-
-
- {
- if ($active-tab-id = 'edit-metadata')
- then attribute class {'nav-active'}
- else ()
- }
-
- About this Siddur
-
-
-
-
-
-
-
-
- {
- if ($active-tab-id = 'edit-content')
- then attribute class {'nav-active'}
- else ()
- }
-
- {$resource-ref}
- Edit Content
-
-
-
-
-
-
-
- {
- if ($active-tab-id = 'edit-style')
- then attribute class {'nav-active'}
- else ()
- }
-
- {$resource-ref}
- Edit style
-
-
-
-
-
-
-
-
- {
- if ($active-tab-id = 'compile')
- then attribute class {'nav-active'}
- else ()
- }
-
- {$resource-ref}
- Compile
-
-
-
-
-
-
-
-
-
-
{
- $save-button-control
- }
-
-
-};
-
-declare function builder:css(
- ) as element(link)+ {
- ,
- builder:keyboard-css()
-};
-
-(:~ output CSS and js links for virtual keyboard :)
-declare function builder:keyboard-css(
- ) as element()+ {
- ,
-
-};
-
-(:~ output login actions id from builder:login-actions
- : WARNING: do not use!
- :)
-declare function builder:login-actions-id(
- $instance-id as xs:string
- ) as xs:string {
- concat($instance-id, '-login-actions')
-};
-
-(:~ output a logout action element that resets the page to the welcome page
- : NOTE: this is intended to go in the model, and in XSLTForms, the action
- : will not be referenced properly by id. Use the model's id as the referencing id,
- : not builder:login-actions-id
- :)
-declare function builder:login-actions(
- $instance-id as xs:string
- ) as element() {
-
-
-
-};
-
-declare function builder:document-chooser-instance(
- $instance-id as xs:string
- ) as element()+ {
- builder:document-chooser-instance($instance-id, true(), (), (), ())
-};
-
-declare function builder:document-chooser-instance(
- $instance-id as xs:string,
- $allow-change-share-group as xs:boolean,
- $default-share-group as xs:string?
- ) as element()+ {
- builder:document-chooser-instance($instance-id, $allow-change-share-group, $default-share-group, (), ())
-};
-
-declare function builder:document-chooser-instance(
- $instance-id as xs:string,
- $allow-change-share-group as xs:boolean,
- $default-share-group as xs:string?,
- $resource-instance-id as xs:string?
- ) as element()+ {
- builder:document-chooser-instance(
- $instance-id, $allow-change-share-group,
- $default-share-group, $resource-instance-id, ())
-};
-
-(:~ document chooser instance.
- : offers a number of options, including making the share group changable or unchangable
- : if a $resource-instance-id is given, the current document listed in it is not shown in the UI.
- :)
-declare function builder:document-chooser-instance(
- $instance-id as xs:string,
- $allow-change-share-group as xs:boolean,
- $default-share-group as xs:string?,
- $resource-instance-id as xs:string?,
- $default-purpose as xs:string?
- ) as element()+ {
- let $error-instance-id := concat($instance-id, '-error')
- let $share-options-id := concat($instance-id, '-share')
- return (
- builder:share-options-instance($share-options-id, not($allow-change-share-group), $default-share-group),
-
-
- ,
-
-
-
- 1
- 50
-
- ,
-
-
-
-
- ,
- if ($resource-instance-id)
- then
- (: exclude the current document :)
-
- else (),
-
-
- {($default-purpose, 'original')[1]}
- group
-
-
-
- ,
- (: the saved-search and saved-action are used
- : to save the user submission while we update
- : the previous submission
- :)
-
-
- ,
-
-
- ,
- ,
- (: set the search scope using a checkbox :)
-
-
- false
-
- ,
- ,
- ,
-
-
- 25
- 50
- 100
- 250
- 500
- 1000
-
- ,
-
-
-
-
-
- 1
-
-
-
-
-
-
-
-
-
- 1
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 1
-
-
-
-
-
-
-
- ,
- ,
- ,
- ,
- ,
- ,
- ,
- ,
- ,
- controls:error-instance($error-instance-id),
-
-
- ,
-
-
- {
- controls:submission-response(
- $error-instance-id,
- (),
- ()
- )
- },
-
-
- {
- controls:submission-response(
- $error-instance-id,
- (),
- ()
- )
- }
- )
-};
-
-(:~ status instance is an addition to the document-chooser
- : instance that activates after the document-chooser
- : finishes
- :)
-declare function builder:status-instance(
- $status-instance-id as xs:string,
- $document-chooser-instance-id as xs:string,
- $error-instance-id as xs:string
- ) as element()+ {
-
-
- 1
-
- ,
-
-
- ,
-
-
- Compiled
-
- ,
-
-
- Queued: jobs ahead
-
- ,
-
-
- Compiling: / complete
-
- ,
-
-
- Not compiled
-
- ,
-
-
- Error
-
- ,
-
-
-
- {((: delete the previous status :))}
- ,
- {((: insert not compiled :))}
-
- {((: go to the next one :))}
-
-
-
-
- {((: delete the previous status :))}
- ,
- {((: if an error occurred during compile :))}
-
- {((: if complete :))}
-
- {((: if queued :))}
-
-
- {((: if compiling :))}
-
-
-
- {((: go to the next one :))}
-
-
-
- ,
-
-
-
- ,
-
-
-
-
-};
-
-(:~ return the id of the repeat control in the document chooser,
- : given its control id :)
-declare function builder:document-chooser-ui-repeat(
- $control-id as xs:string
- ) as xs:string {
- concat($control-id, '-repeat')
-};
-
-declare function builder:document-chooser-ui(
- $instance-id as xs:string,
- $control-id as xs:string,
- $actions as element()+) {
- builder:document-chooser-ui($instance-id, $control-id, $actions, false())
-};
-
-declare function builder:document-chooser-ui(
- $instance-id as xs:string,
- $control-id as xs:string,
- $actions as element()+,
- $allow-change-sharing as xs:boolean
- ) as element()+ {
- builder:document-chooser-ui($instance-id, $control-id, $actions, false(), false(), 'Status', 'N/A')
-};
-
-declare function builder:document-chooser-ui(
- $instance-id as xs:string,
- $control-id as xs:string,
- $actions as element()+,
- $allow-change-sharing as xs:boolean,
- $allow-search as xs:boolean,
- $results-column-title as item()+,
- $results-column-content as item()+
- ) as element()+ {
- builder:document-chooser-ui($instance-id,
- $control-id,
- $actions,
- $allow-change-sharing,
- $allow-search,
- $results-column-title,
- $results-column-content,
- ())
-};
-
-(:~ command set to save the current search :)
-declare function builder:save-document-chooser-search(
- $instance-id as xs:string
- ) as element()+ {
- ,
- ,
- ,
-
-};
-
-(:~
- : in the style section, you need to add a faketable control style for this control.
- : the table's control id is {$control-id}-table, and it has 4 columns
- : @param $actions actions that can be done with each document
- : @param $allow-change-sharing Allow the sharing parameters to be changed by the user (default false)
- : @param $allow-search Whether to have a search box
- : @param $results-column-title title of middle column
- : @param $results-column-content content of middle column
- : @param $nodeset-restriction an XPath that evaluates to a boolean and restricts the nodeset of html:li in the repeat
- :)
-declare function builder:document-chooser-ui(
- $instance-id as xs:string,
- $control-id as xs:string,
- $actions as element()+,
- $allow-change-sharing as xs:boolean,
- $allow-search as xs:boolean,
- $results-column-title as item()+,
- $results-column-content as item()+,
- $nodeset-restriction as xs:string?
- ) as element()+ {
-
-
-
-
-};
-
-declare function builder:share-options-instance(
- $instance-id as xs:string
- ) {
- builder:share-options-instance($instance-id, true(), ())
-};
-
-declare function local:direction-by-lang(
- $lang as xs:string?
- ) as xs:string {
- if ($lang = ('he','arc' (: TODO: add other rtl languages here :) ))
- then 'rtl'
- else 'ltr'
-};
-
-(: search results block by language
- : there should be a better way to do this. :)
-declare function local:search-result-lang(
- $lang as xs:string
- ) {
-
-
- {
- let $dir := local:direction-by-lang($lang)
- where $dir = 'rtl'
- return attribute dir {$dir}
- }
-
-
-
-
-
-
-
-};
-
-(:~ block of search results to appear in the context of a repeat on
- : html:a/html:p :)
-declare function builder:search-results-block(
- ) {
- for $lang in ('en','he')
- return
- local:search-result-lang($lang)
-};
-
-declare function builder:share-options-instance(
- $instance-id as xs:string,
- $disable-share-types as xs:boolean?) {
- builder:share-options-instance($instance-id, $disable-share-types, ())
-};
-
-declare function builder:share-options-instance(
- $instance-id as xs:string,
- $disable-share-types as xs:boolean?,
- $default-share-group as xs:string?
- ) as element()+ {
- let $user := app:auth-user()
- return (
-
- {
- for $group in xmldb:get-user-groups($user)
- return {$group}
- }
- ,
-
-
- group
- {($default-share-group, app:auth-user())[1]}
-
- ,
- (: temporarily set to readonly because it's not implemented! :)
-
- )
-};
-
-declare function builder:share-options-ui(
- $instance-id as xs:string,
- $control-id as xs:string,
- $label as xs:string
- ) as element()+ {
-
-
- {$label}
-
-
-
-
-
-
-};
diff --git a/code/apps/builder/my-siddurim.xql b/code/apps/builder/my-siddurim.xql
deleted file mode 100644
index 86ee2be7..00000000
--- a/code/apps/builder/my-siddurim.xql
+++ /dev/null
@@ -1,277 +0,0 @@
-xquery version "1.0";
-(:~ Builder front page
- :
- : ?new=true&item=username (make a new user called username)
- : ?item=username (edit the profile of the existing user called username)
- :
- : Open Siddur Project
- : Copyright 2011 Efraim Feinstein
- : Licensed under the GNU Lesser General Public License, version 3 or later
- :)
-import module namespace request="http://exist-db.org/xquery/request";
-
-import module namespace app="http://jewishliturgy.org/modules/app"
- at "/code/modules/app.xqm";
-import module namespace builder="http://jewishliturgy.org/apps/builder/controls"
- at "modules/builder.xqm";
-import module namespace controls="http://jewishliturgy.org/modules/controls"
- at "/code/modules/controls.xqm";
-import module namespace site="http://jewishliturgy.org/modules/site"
- at "/code/modules/site.xqm";
-import module namespace paths="http://jewishliturgy.org/modules/paths"
- at "/code/modules/paths.xqm";
-import module namespace login="http://jewishliturgy.org/apps/user/login"
- at "/code/apps/user/modules/login.xqm";
-
-declare default element namespace "http://www.w3.org/1999/xhtml";
-declare namespace ev="http://www.w3.org/2001/xml-events";
-declare namespace html="http://www.w3.org/1999/xhtml";
-declare namespace tei="http://www.tei-c.org/ns/1.0";
-declare namespace j="http://jewishliturgy.org/ns/jlptei/1.0";
-declare namespace xf="http://www.w3.org/2002/xforms";
-declare namespace xrx="http://jewishliturgy.org/xrx";
-
-declare option exist:serialize "method=xhtml media-type=text/xml indent=yes omit-xml-declaration=no
- process-xsl-pi=no
- doctype-public=-//W3C//DTD XHTML 1.1//EN
- doctype-system=http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd";
-
-
-(: delay between updates to (reloads of) the document instances :)
-declare variable $local:update-delay-ms := 30000;
-
-(:~ instance for the confirm delete dialog
- : the instance holds the resource that will be deleted
- :
- : to submit, submit instance($instance-id)/instance
- :)
-declare function local:confirm-delete-instance(
- $instance-id as xs:string,
- $control-id as xs:string
- ) as element()+ {
- let $error-instance-id := concat($instance-id, '-error')
- return (
-
-
-
-
- ,
-
-
- ,
- controls:error-instance($error-instance-id),
-
-
- {
- controls:submission-response(
- $error-instance-id,
- (),
- (
-
- )
- )
- }
- )
-};
-
-(:~ delete button.
- : @param $ref reference to resource that will be deleted
- : @param $ref-to-resource-name human-readable name reference to string that can be used to reference the resource
- : @param $ref-to-uri reference to URI of resource to be deleted
- :)
-declare function local:confirm-delete-dialog(
- $control-id as xs:string,
- $instance-id as xs:string,
- $ref as xs:string,
- $ref-to-resource-name as xs:string,
- $ref-to-uri as xs:string,
- $event-target as xs:string*
- ) as element()+ {
- (: TODO: this really should be an xf:dialog :)
- controls:ok-cancel-dialog-ui(
- $control-id,
- (
Welcome to the Open Siddur Project Builder v.{app:get-version()}
-
-
To get started immediately, create an account or log in and press My Siddurim.
-
Security notice: This version sends usernames, passwords, and all other
- information in clear text over the Internet. Do not enter any information you would not want
- to be public!
As an early demo, it is by no means feature-complete, nor is it expected to be. Most of the
- technology being demonstrated is under the hood. Other demos, for example, the
- builder demo include more interactive features.
-
For the purposes of the demo, all users are logged in to the database with the username demouser and a transparent password.
To use the demo, select a book or chapter of the Tanach from the index below.
- A new window or tab will open. The transform may take anywhere from a few seconds to about 10 minutes,
- depending on the length of the book. A new feature of the code is a
- cache, which pre-calculates the most complicated part of
- the transform for each file (in this case, by chapter) the first time it is needed. Because of this feature,
- while the transform may take a long time the first time any chapter is used, subsequent uses of the
- same book or chapter will be many times faster. Compiling the entire Tanach will take a very long time
- the first time it is done. After it is done once, all compilations will be relatively fast.
- ,
- (
- site:css(), builder:css(),
- controls:faketable-style(concat('control-', $document-chooser-id), 90, 4)
- )
-)
\ No newline at end of file
diff --git a/code/apps/compiler/controller.xql b/code/apps/compiler/controller.xql
deleted file mode 100644
index 55a7eb21..00000000
--- a/code/apps/compiler/controller.xql
+++ /dev/null
@@ -1,30 +0,0 @@
-xquery version "1.0";
-(: controller for compiler.
- : logs in the demo user and passes on to compiler.xql
- : $Id: controller.xql 765 2011-04-27 21:32:17Z efraim.feinstein $
- :)
-import module namespace app="http://jewishliturgy.org/modules/app"
- at "/code/modules/app.xqm";
-
-declare variable $local:demouser := 'demouser';
-declare variable $local:demopassword := 'resuomed';
-
-let $x :=
- if (app:auth-user())
- then ()
- else (
- xmldb:login('/db', $local:demouser, $local:demopassword, true()),
- app:login-credentials($local:demouser, $local:demopassword)
- )
-return
- if (not($exist:resource) or $exist:resource = 'compiler.xql')
- then (
-
-
-
-
-
- )
- else (
-
- )
\ No newline at end of file
diff --git a/code/apps/compiler/resources/BHebrewSR.eot b/code/apps/compiler/resources/BHebrewSR.eot
deleted file mode 100644
index d73f5f37..00000000
Binary files a/code/apps/compiler/resources/BHebrewSR.eot and /dev/null differ
diff --git a/code/apps/compiler/resources/BHebrewSR.woff b/code/apps/compiler/resources/BHebrewSR.woff
deleted file mode 100644
index 135f5d8e..00000000
Binary files a/code/apps/compiler/resources/BHebrewSR.woff and /dev/null differ
diff --git a/code/apps/compiler/resources/EzraSILSR.ttf b/code/apps/compiler/resources/EzraSILSR.ttf
deleted file mode 100644
index 9ac142a9..00000000
Binary files a/code/apps/compiler/resources/EzraSILSR.ttf and /dev/null differ
diff --git a/code/apps/compiler/resources/compiler.css b/code/apps/compiler/resources/compiler.css
deleted file mode 100644
index 493055de..00000000
--- a/code/apps/compiler/resources/compiler.css
+++ /dev/null
@@ -1,51 +0,0 @@
-/* style.css
- * CSS for the Open Siddur Project Compiler Demo Application
- * Copyright 2009 Azriel Fasten, 2011 Efraim Feinstein
- * Licensed under the GNU Lesser GPL, version 3 or later
- * $Id: compiler.css 687 2011-01-23 23:36:48Z efraim.feinstein $
- */
-
-/*
- * General CSS
- */
-
-body{
- /*background-color:#F0F8FF;*/
- margin:3em;
- margin-left:25%;
-}
-
-@font-face {
- font-family: 'BHebrew-SR';
- src: url('BHebrewSR.eot');
- src: local('☺'), url('BHebrewSR.woff') format('woff'), url('EzraSILSR.ttf') format('truetype');
-}
-
-lang(he)
-{
- font-family: 'BHebrewSR', 'Ezra SIL SR', 'Ezra SIL', 'SBL Hebrew', 'Arial Unicode', 'Lucida Grande', 'Times New Roman', serif;
- direction:rtl;
-}
-
-
-/*
- * Menu page
- */
-#menu {
- text-align:right;
- width:90%;
-}
-
-#menu li{
- float:right;
- width:25%;
- list-style: none;
-}
-
-#menu a:link{
- text-decoration:none;
-}
-
-#authentication {
- display:none;
-}
\ No newline at end of file
diff --git a/code/apps/contributors/app-info.xml b/code/apps/contributors/app-info.xml
deleted file mode 100644
index 7cb95c8a..00000000
--- a/code/apps/contributors/app-info.xml
+++ /dev/null
@@ -1,13 +0,0 @@
-
-
- Contributor list editor
- $Rev: 687 $
-
- Efraim Feinstein
-
- LGPL 3+
-
-
-
-
-
diff --git a/code/apps/contributors/controller.xql b/code/apps/contributors/controller.xql
deleted file mode 100644
index dda49e56..00000000
--- a/code/apps/contributors/controller.xql
+++ /dev/null
@@ -1,38 +0,0 @@
-xquery version "1.0";
-(:~ controller.xql
- : Copyright 2010 Efraim Feinstein
- : Licensed under the GNU Lesser General Public License, version 3
- :
- : This controller is used this to redirect or forward paths, by default, it directs no
- : resource to index.xql
- :)
-declare namespace ex="http://exist.sourceforge.net/NS/exist";
-
-import module namespace request="http://exist-db.org/xquery/request";
-import module namespace xdb = "http://exist-db.org/xquery/xmldb";
-
-if ($exist:path = ("/","")) then
-
-
-
-(:
-else if (starts-with($exist:path, "/edit"))
-then
-
-
-
-else if (starts-with($exist:path, "/view"))
-then
-
-
-
-else if (starts-with($exist:path, "/search"))
-then
-
-
-
-:)
-else
-
-
-
diff --git a/code/apps/contributors/edit/delete.xql b/code/apps/contributors/edit/delete.xql
deleted file mode 100644
index 9438ca89..00000000
--- a/code/apps/contributors/edit/delete.xql
+++ /dev/null
@@ -1,58 +0,0 @@
-xquery version "1.0";
-(:~ delete.xql
- : delete a contributor from the list (be careful!)
- : Open Siddur Project
- : Copyright 2010 Efraim Feinstein
- : Licensed under the GNU Lesser General Public License, version 3 or later
- :
- : $Id: delete.xql 687 2011-01-23 23:36:48Z efraim.feinstein $
- :)
-
-import module namespace app="http://jewishliturgy.org/modules/app"
- at "../../../modules/app.xqm";
-import module namespace common="http://jewishliturgy.org/apps/contributors/common"
- at "../modules/common.xqm";
-
-declare namespace tei="http://www.tei-c.org/ns/1.0";
-declare namespace err="http://jewishliturgy.org/errors";
-
-(:~ find references to the given id. If any are found, return them.
- : TODO: find references within the text
- :)
-declare function local:find-references(
- $id as xs:string)
- as element(tei:item)* {
- let $contrib-list := doc($common:list)//tei:div[@type='contributors']/tei:list
- return
- for $item in $contrib-list/tei:item[ft:query(tei:affiliation/tei:ptr/@target, $id)]
- order by ft:score($item) descending
- return $item
-};
-
-util:catch('*',
- let $id := request:get-parameter('id','')
- let $logged-in := app:authenticate() or
- error(xs:QName('err:LOGIN'), 'Not logged in.')
- let $contrib-list := doc($common:list)//tei:div[@type='contributors']/tei:list
- return (
- if ($id)
- then (
- let $references := local:find-references($id)
- return
- if (empty($references))
- then (
- update delete $contrib-list/id($id),
-
- )
- else
- error(xs:QName('err:REFERENCED'),
- concat('Cannot delete "', $id, '" because it is referenced by other contributor entries: ',
- string-join(for $xid in $references/@xml:id return concat('"',string($xid),'"'), ',')))
- )
- else
- error(xs:QName('err:INVALID'), concat('Invalid parameter id="',$id,'".'))
- ),
- {
- app:error-message()
- }
-)
diff --git a/code/apps/contributors/edit/edit-item.xql b/code/apps/contributors/edit/edit-item.xql
deleted file mode 100644
index 7ca2493a..00000000
--- a/code/apps/contributors/edit/edit-item.xql
+++ /dev/null
@@ -1,58 +0,0 @@
-xquery version "1.0";
-(: Contributors list UI
- : Copyright 2010 Efraim Feinstein
- : Licensed under the GNU Lesser General Public License, version 3 or later
- : $Id: edit-item.xql 687 2011-01-23 23:36:48Z efraim.feinstein $
- :)
-declare namespace xf="http://www.w3.org/2002/xforms";
-declare namespace ev="http://www.w3.org/2001/xml-events";
-declare namespace xs="http://www.w3.org/2001/XMLSchema";
-declare namespace tei="http://www.tei-c.org/ns/1.0";
-declare namespace html="http://www.w3.org/1999/xhtml";
-declare option exist:serialize "method=xhtml media-type=text/xml indent=yes process-xsl-pi=no";
-
-import module namespace controls="http://jewishliturgy.org/modules/controls"
- at "../../../modules/controls.xqm";
-import module namespace paths="http://jewishliturgy.org/modules/paths"
- at "../../../modules/paths.xqm";
-import module namespace site="http://jewishliturgy.org/modules/site"
- at "../../../modules/site.xqm";
-
-import module namespace login="http://jewishliturgy.org/apps/user"
- at "../../user/modules/login.xqm";
-import module namespace contributors="http://jewishliturgy.org/apps/contributors/controls"
- at "../modules/controls.xqm";
-
-let $id := request:get-parameter('id','')
-let $data-source :=
- if ($id)
- then concat('load.xql?id=', $id)
- else 'load.xql'
-let $new := request:get-parameter('new','')
-return
-site:form(
- {
- (:login:login-instance('login'),:)
- contributors:list-instance('contributorlist'),
- contributors:individual-entry-instance('contributor', 'contributorlist',
- $id, $new, 'reporter')
- },
- Contributor list item editor,
- {
- (:login:login-ui('login','control-login'),:)
- contributors:individual-entry-ui('contributor','contributorlist',
- 'control-contributor', $id),
- (: this section reports success or failure :)
- {
- controls:reporter(
- "reporter",
-
- Item {$id} {if ($new) then 'added' else 'updated'} successfully.
- ,
-
- An error occurred {if ($new) then 'adding' else 'updating'} {$id}.
-
- )
- }
- }
-)
diff --git a/code/apps/contributors/edit/edit.xql b/code/apps/contributors/edit/edit.xql
deleted file mode 100644
index ee748f69..00000000
--- a/code/apps/contributors/edit/edit.xql
+++ /dev/null
@@ -1,58 +0,0 @@
-xquery version "1.0";
-
-(:~ Editable list of contributor list items
- : Open Siddur Project
- : Copyright 2010 Efraim Feinstein
- : Licensed under the GNU Lesser General Public License, version 3
- : $Id: edit.xql 687 2011-01-23 23:36:48Z efraim.feinstein $
- :)
-import module namespace app="http://jewishliturgy.org/modules/app"
- at "../../../modules/app.xqm";
-import module namespace common="http://jewishliturgy.org/apps/contributors/common"
- at "../modules/common.xqm";
-import module namespace contributors="http://jewishliturgy.org/apps/contributors/controls"
- at "../modules/controls.xqm";
-import module namespace login="http://jewishliturgy.org/apps/user"
- at "../../../apps/user/modules/login.xqm";
-import module namespace site="http://jewishliturgy.org/modules/site"
- at "../../../modules/site.xqm";
-import module namespace paths="http://jewishliturgy.org/modules/paths"
- at "../../../modules/paths.xqm";
-
-declare namespace tei="http://www.tei-c.org/ns/1.0";
-declare namespace xf="http://www.w3.org/2002/xforms";
-declare namespace ev="http://www.w3.org/2001/xml-events";
-declare namespace xs="http://www.w3.org/2001/XMLSchema";
-declare namespace html="http://www.w3.org/1999/xhtml";
-
-declare option exist:serialize "method=xhtml media-type=text/xml";
-
-site:form(
- {
- login:login-instance('login', 'list-editor'),
- contributors:list-instance('contributorlist'),
- contributors:individual-entry-instance('contributor','contributorlist',
- (), (), 'editor', true(), 'login')
- },
- (Contributors List),
- (Contributors list,
- login:login-ui('login','control-login'),
-
-
-
-
-
- You must be logged in to edit the contributor list.
-
- {
- contributors:list-table-ui('contributorlist','control-contributorlist', true(),"editor"),
- contributors:editor-ui('contributor', 'contributorlist', 'editor', 'control-contributorlist')
- }
-
-
- ),
- (site:css(),contributors:css()),
- site:header(),
- (site:sidebar(), contributors:sidebar()),
- site:footer()
-)
diff --git a/code/apps/contributors/edit/new-instance.xml b/code/apps/contributors/edit/new-instance.xml
deleted file mode 100644
index 9e24e80d..00000000
--- a/code/apps/contributors/edit/new-instance.xml
+++ /dev/null
@@ -1,11 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/code/apps/contributors/edit/save-new.xql b/code/apps/contributors/edit/save-new.xql
deleted file mode 100644
index e69de29b..00000000
diff --git a/code/apps/contributors/edit/save.xql b/code/apps/contributors/edit/save.xql
deleted file mode 100644
index 4cdbc13d..00000000
--- a/code/apps/contributors/edit/save.xql
+++ /dev/null
@@ -1,117 +0,0 @@
-xquery version "1.0";
-(: Contributors list saver
- : Copyright 2010 Efraim Feinstein
- : Licensed under the GNU Lesser General Public License, version 3 or later
- : $Id: save.xql 709 2011-02-24 06:37:44Z efraim.feinstein $
- :)
-import module namespace app="http://jewishliturgy.org/modules/app"
- at "../../../modules/app.xqm";
-import module namespace paths="http://jewishliturgy.org/modules/paths"
- at "../../../modules/paths.xqm";
-import module namespace common="http://jewishliturgy.org/apps/contributors/common"
- at "../modules/common.xqm";
-
-declare namespace xf="http://www.w3.org/2002/xforms";
-declare namespace tei="http://www.tei-c.org/ns/1.0";
-declare namespace rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#";
-declare namespace cc="http://web.resource.org/cc/";
-declare namespace err="http://jewishliturgy.org/errors";
-
-declare option exist:serialize "method=xhtml media-type=text/xml indent=no process-pi-xsl=no";
-
-let $original-data := request:get-data()
-return
-util:catch('*',
- let $edit-id as xs:string? := request:get-parameter('id','')
- let $data as element(tei:list) :=
- app:contract-data($original-data, true())
- let $expanded as element(tei:list) :=
- {
- app:expand-prototype($data, $common:prototype, true())
- }
- let $user := app:auth-user()
- let $contrib-template as element(tei:TEI) :=
-
-
-
-
- Global contributors list
-
-
-
-
- To the extent possible under law, the contributors who associated
- Creative Commons Zero
-
- with this work have waived all copyright and related or neighboring rights to this work.
-
-
-
-
-
-
-
-
-
-
-
- Born digital
-
-
-
-
-
-
- {$data}
-
-
-
-
- return (
- if ($edit-id and count($data/tei:item) > 1)
- then
- error(xs:QName('err:INVALID'), 'You may only provide a $id parameter if you are changing the identifier of a single item.')
- else if (not($user))
- then
- error(xs:QName('err:LOGIN'), concat('Not logged in. $user=', $user))
- else if (doc-available($common:list))
- then
- let $contrib-doc := doc($common:list)
- return
- (: save is an update of an existing file :)
- for $item in $data/tei:item
- let $replace-item :=
- if ($edit-id)
- then $contrib-doc/id($edit-id)
- else $contrib-doc/id($item/@xml:id)
- let $list := $contrib-doc//tei:div[@type='contributors']/tei:list
- return
- if ($replace-item)
- then update replace $replace-item with $item
- else update insert $item into $list
- else ( (: save means creating a new contributor list :)
- app:make-collection-path(
- $common:collection, '/db', 'admin', 'everyone', util:base-to-integer(0775,8)),
- if (xmldb:store($common:collection, $common:resource, $contrib-template))
- then (
- xmldb:set-resource-permissions(
- $common:collection, $common:resource,
- $user,
- 'everyone',
- util:base-to-integer(0775, 8)),
- $data)
- else error(xs:QName('err:SAVE'), 'Cannot store!')
- ),
- util:log-system-out(('original id = ', $edit-id,' incoming data = ', $data, ' outgoing data=', $expanded )),
- $expanded
- )
- ,
- (: on error, return back what we got in with an error message :)
- (
- {
- app:expand-prototype($original-data, $common:prototype, true()),
- app:error-message()
- }
- )
-)
diff --git a/code/apps/contributors/edit/unique-id.xql b/code/apps/contributors/edit/unique-id.xql
deleted file mode 100644
index b8c691ec..00000000
--- a/code/apps/contributors/edit/unique-id.xql
+++ /dev/null
@@ -1,28 +0,0 @@
-(:~ unique-id.xql
- : Determine if the parameter 'id' refers to a unique xml:id in the contributor list
- : return true|false
- :
- : Open Siddur Project
- : Copyright 2010 Efraim Feinstein
- : Licensed under the GNU Lesser General Public License, version 3
- : $Id: unique-id.xql 687 2011-01-23 23:36:48Z efraim.feinstein $
- :)
-xquery version "1.0";
-
-import module namespace common="http://jewishliturgy.org/apps/contributors/common"
- at "../modules/common.xqm";
-
-declare namespace tei="http://www.tei-c.org/ns/1.0";
-
-let $data := request:get-data()
-let $contrib-list :=
- if (doc-available($common:list))
- then doc($common:list)//tei:div[@type='contributors']/tei:list
- else ()
-let $found := $contrib-list/id($data/current-id)
-let $is-unique :=
- string(empty($found) or (not($data/is-new = 'true') and ($data/current-id = $data/original-id)))
-return
- {
- $is-unique
- }
diff --git a/code/apps/contributors/edit/update.xql b/code/apps/contributors/edit/update.xql
deleted file mode 100644
index e69de29b..00000000
diff --git a/code/apps/contributors/index.xql b/code/apps/contributors/index.xql
deleted file mode 100644
index e69de29b..00000000
diff --git a/code/apps/contributors/load-idref-instance.xql b/code/apps/contributors/load-idref-instance.xql
deleted file mode 100644
index df516f56..00000000
--- a/code/apps/contributors/load-idref-instance.xql
+++ /dev/null
@@ -1,27 +0,0 @@
-xquery version "1.0";
-(: Contributors list id reference loader
- : only needed for a kluge to work aroun broken xf:value in betterFORM and XSLTForms
- : Copyright 2010 Efraim Feinstein
- : Licensed under the GNU Lesser General Public License, version 3 or later
- : $Id: load-idref-instance.xql 687 2011-01-23 23:36:48Z efraim.feinstein $
- :)
-
-declare namespace tei="http://www.tei-c.org/ns/1.0";
-
-import module namespace request="http://exist-db.org/xquery/request";
-import module namespace paths="http://jewishliturgy.org/modules/paths"
- at "../../modules/paths.xqm";
-import module namespace common="http://jewishliturgy.org/apps/contributors/common"
- at "modules/common.xqm";
-
-let $contrib-org-items :=
- if (doc-available($common:list))
- then doc($common:list)//tei:div[@type='contributors']/tei:list/tei:item[tei:orgName]
- else ()
-return
- {
- ,
- for $item in $contrib-org-items
- return
-
- }
diff --git a/code/apps/contributors/load.xql b/code/apps/contributors/load.xql
deleted file mode 100644
index 3e6e4e6a..00000000
--- a/code/apps/contributors/load.xql
+++ /dev/null
@@ -1,62 +0,0 @@
-xquery version "1.0";
-(: Contributors list loader
- : Copyright 2010 Efraim Feinstein
- : Licensed under the GNU Lesser General Public License, version 3 or later
- : $Id: load.xql 687 2011-01-23 23:36:48Z efraim.feinstein $
- :)
-
-declare namespace tei="http://www.tei-c.org/ns/1.0";
-
-import module namespace request="http://exist-db.org/xquery/request";
-import module namespace paths="http://jewishliturgy.org/modules/paths"
- at "../../modules/paths.xqm";
-import module namespace common="http://jewishliturgy.org/apps/contributors/common"
- at "modules/common.xqm";
-
-(: this XSLT transform converts an active contributor list into something that fits the prototype :)
-let $transform :=
-
-
-
-
-
-
-
- {$common:prototype}
-
-
-
-
-
-
-
-
-
-
-
-
-
-let $contrib-list-items :=
- if (doc-available($common:list))
- then transform:transform(
- doc($common:list)//tei:div[@type='contributors']/tei:list,
- $transform, ())
- else ()
-let $id := request:get-parameter('id','')
-let $items as element(tei:item)* :=
- if ($id)
- then ($contrib-list-items[@xml:id=$id], $common:prototype)[1]
- else $contrib-list-items
-return (
- {
- ($items)
- }
- )
-
diff --git a/code/apps/contributors/modules/common.xqm b/code/apps/contributors/modules/common.xqm
deleted file mode 100644
index 7de493d9..00000000
--- a/code/apps/contributors/modules/common.xqm
+++ /dev/null
@@ -1,33 +0,0 @@
-xquery version "1.0";
-
-(:~ contributor list common variables
- :
- : The Open Siddur Project
- : Copyright 2010 Efraim Feinstein
- : Licensed under the GNU Lesser General Public License, version 3 or later
- : $Id: common.xqm 709 2011-02-24 06:37:44Z efraim.feinstein $
- :)
-
-module namespace contributors="http://jewishliturgy.org/apps/contributors/common";
-
-import module namespace paths="http://jewishliturgy.org/modules/paths"
- at "../../../modules/paths.xqm";
-
-declare namespace xs="http://www.w3.org/2001/XMLSchema";
-declare namespace err="http://jewishliturgy.org/errors";
-declare namespace tei="http://www.tei-c.org/ns/1.0";
-
-declare variable $contributors:collection := '/group/everyone/contributors';
-declare variable $contributors:resource := 'contributors.xml';
-declare variable $contributors:list := concat($contributors:collection, '/', $contributors:resource);
-
-declare variable $contributors:loader := concat($paths:prefix, $paths:apps, '/contributors/load.xql');
-declare variable $contributors:saver := concat($paths:prefix, $paths:apps, '/contributors/edit/save.xql');
-declare variable $contributors:deleter := concat($paths:prefix, $paths:apps, '/contributors/edit/delete.xql');
-declare variable $contributors:searcher := concat($paths:prefix, $paths:apps, '/contributors/search/search.xql');
-
-declare variable $contributors:prototype-path := concat($paths:apps, '/contributors/edit/new-instance.xml');
-declare variable $contributors:prototype as element(tei:item)? :=
- if (doc-available($contributors:prototype-path))
- then doc($contributors:prototype-path)/tei:list/tei:item
- else error(xs:QName('err:NOT_FOUND'), concat('Resource "', $contributors:prototype-path,'" not found.'));
diff --git a/code/apps/contributors/modules/controls.xqm b/code/apps/contributors/modules/controls.xqm
deleted file mode 100644
index c76b8bb9..00000000
--- a/code/apps/contributors/modules/controls.xqm
+++ /dev/null
@@ -1,692 +0,0 @@
-xquery version "1.0";
-
-(:~ contributor list related controls
- :
- : The Open Siddur Project
- : Copyright 2010 Efraim Feinstein
- : Licensed under the GNU Lesser General Public License, version 3 or later
- : $Id: controls.xqm 687 2011-01-23 23:36:48Z efraim.feinstein $
- :)
-
-module namespace contributors="http://jewishliturgy.org/apps/contributors/controls";
-
-import module namespace common="http://jewishliturgy.org/apps/contributors/common"
- at "common.xqm";
-import module namespace controls="http://jewishliturgy.org/modules/controls"
- at "../../../modules/controls.xqm";
-import module namespace login="http://jewishliturgy.org/apps/user"
- at "../../user/modules/login.xqm";
-
-(: only used for a kluge :)
-import module namespace paths="http://jewishliturgy.org/modules/paths"
- at "../../../modules/paths.xqm";
-
-declare namespace xf="http://www.w3.org/2002/xforms";
-declare namespace ev="http://www.w3.org/2001/xml-events";
-declare namespace xs="http://www.w3.org/2001/XMLSchema";
-declare namespace tei="http://www.tei-c.org/ns/1.0";
-declare namespace xrx="http://jewishliturgy.org/ns/xrx";
-declare namespace html="http://www.w3.org/1999/xhtml";
-
-(:~ whether to use a real table or fake table in the output
- : depends on support for xf:repeat-*, which is currently not good in XSLTForms and betterFORM
- :)
-declare variable $contributors:use-real-table := false();
-
-(:~ sidebar for the contributors :)
-declare function contributors:sidebar()
- as element() {
-
- Contributors list
-
- View
- Edit (requires login)
- Search
-
-
-};
-
-(:~ css link for contributors :)
-declare function contributors:css()
- as element() {
-
-};
-
-(:~ instance for an individual contributor list entry
- : required to use individual-entry-ui()
- :
- : @param $instance-id Instance id of single contributor list entry
- : @param $list-instance-id Instance id of contributor list
- : @param $id Identifier of entry
- : @param $new Contains text if the entry is new
- : @param $event-target Where to send xforms-submit-done and xforms-submit-error
- :)
-declare function contributors:individual-entry-instance(
- $instance-id as xs:string,
- $list-instance-id as xs:string,
- $id as xs:string?,
- $new as xs:string?,
- $event-target as xs:string?)
- as element()+ {
- contributors:individual-entry-instance(
- $instance-id, $list-instance-id, $id, $new, $event-target, false(), ()
- )
-};
-
-(:~
- : @param $writable If false(), makes the instance read-only
- : @param $login-instance-id Instance Id where login information is held; required if $writable is true()
- :)
-declare function contributors:individual-entry-instance(
- $instance-id as xs:string,
- $list-instance-id as xs:string,
- $id as xs:string?,
- $new as xs:string?,
- $event-target as xs:string?,
- $writable as xs:boolean,
- $login-instance-id as xs:string?)
- as element()+ {
- (
-
-
- ,
-
- ,
-
-
-
-
- None
-
-
- ,
-
-
- Please check that all required (bold) fields are filled in and that all fields have the correct information.
-
- ,
-
-
- {
- if ($writable)
- then
- else
- }
-
-
-
-
-
-
-
-
-
-
-
-
- ,
- controls:error-instance(concat($instance-id, '-error')),
- (: save submission :)
-
- {(: if this save replaces a pre-existing element, use save.xql?id=original-id :)()}
-
- {if ($writable) then login:login-headers($login-instance-id) else (),
- controls:submission-response(
- $instance-id,
- concat($instance-id, '-error'),
- concat($instance-id, '-validation-error'),
- concat("instance('",$instance-id,"')"),
- $event-target, (
- (: if an item is old, place it right after the item with its original id :)
- ,
- ,
- (: if an item is new, insert it at the end of the list :)
- ,
- (: if the list instance is empty ... :)
- ,
-
- )) }
- ,
- (: delete :)
-
- {if ($writable) then login:login-headers($login-instance-id) else (),
- controls:submission-response(
- $instance-id,
- concat($instance-id, '-error'),
- concat($instance-id, '-validation-error'),
- "instance('null')",
- $event-target, (
- (: delete the item on success :)
- ,
- (: reload idrefs :)
-
- )) }
- ,
-
- ,
- contributors:bindings($instance-id, ($list-instance-id, $instance-id)[1], $id, $writable)
- )
-
-};
-
-(:~ instance which holds all of the entries in the contributor list
- :)
-declare function contributors:list-instance(
- $instance-id as xs:string)
- as element()+ {
- (
-
- ,
-
- ,
- (: cause entire page to reload :)
-
-
- ,
- (: kluge instance containing idreferences (=#id) for organizational entities :)
-
- ,
-
-
- )
-};
-
-declare function contributors:bindings(
- $instance-id as xs:string,
- $list-instance-id as xs:string,
- $id as xs:string?,
- $writable as xs:boolean)
- as element(xf:bind)+ {
- let $readonly :=
- if ($writable)
- then ()
- else attribute {'readonly'}{'true()'}
- return
- (
- {
- if ($id or not($writable))
- then attribute readonly {"true()"}
- else ()
- },
- {$readonly},
- {
- $readonly
- },
- {
- $readonly
- },
- {
- $readonly
- },
- {
- $readonly
- }
- )
-};
-
-(:~ search query instance
- : events: xforms-submit-done, xforms-submit-error
- :)
-declare function contributors:search-instance(
- $instance-id as xs:string,
- $results-instance-id as xs:string,
- $event-target as xs:string?)
- as element()+ {
- (
-
-
-
-
- ,
-
-
-
-
- ,
- controls:error-instance(concat($instance-id,'-error')),
- ,
-
- {
- controls:submission-response(
- $instance-id,
- concat($instance-id, '-error'),
- '', (: I don't think a validation error can happen here :)
- concat("instance('",$instance-id,"')"),
- $event-target, ()
- )
- }
-
- )
-};
-
-(:~ User interface for a single contributor entry.
- : Buttons are: {$control-id}-save and {$control-id}-cancel
- : @param $instance-id Instance that holds contributor list
- : @param $control-id Identifier of this control
- : @param $ref reference (defaults to instance('{$instance-id}'))
- : @param $id Identifier of contributor that the entry identifies (optional)
- :)
-declare function contributors:individual-entry-ui(
- $instance-id as xs:string,
- $list-instance-id as xs:string,
- $control-id as xs:string,
- $id as xs:string?)
- as element()+ {
-
- {if ($id)
- then
-
- Login ID:
-
- else (
-
- Login ID:
- The login ID must begin with a letter. It may contain numbers, letters, and periods and it must be unique in the contributor list.
-
-
-
-
-
- )
- }
-
-
- Real name or pseudonym (for a person; include relevant titles and full name):
-
-
-
- Organization name (for a company, non-profit, etc.):
-
-
-
- Website address (URL):
-
-
-
- Public email address:
-
-
-
- Organizational affiliation:
-
-
-
-
-
-
-
-
-
- Save
-
-
- Cancel
- {(: By default, the cancel button does nothing! You need to catch its event! :) ()}
-
-
- {controls:error-report(concat($instance-id, '-error'))}
-
-};
-
-(:~ read-only table UI
- : @param $list-instance-id Instance id from list-instance()
- : @param $control-id Name of control
- :)
-declare function contributors:list-table-ui(
- $list-instance-id as xs:string,
- $control-id as xs:string)
- as element()+ {
- contributors:list-table-ui($list-instance-id, $control-id, false(), ())
-};
-
-(:~ table UI.
- : @param $editable true() if editing is allowed, false() if not
- : @param $event-target The control that receives events
- :)
-declare function contributors:list-table-ui(
- $list-instance-id as xs:string,
- $control-id as xs:string,
- $editable as xs:boolean,
- $event-target as xs:string?)
- as element()+ {
- (
- {
- if ($contributors:use-real-table)
- then
-
-
- Wiki name
- Real name
- Affiliation
- Email
- Web page
- {
- if ($editable)
- then
- Editing
- else ()
- }
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- {
- if ($editable and false())
- then (
-
-
- Edit
-
-
-
- Delete
-
-
-
-
-
- )
- else ()
- }
-
-
-
- else (: don't use real table :)
- (
- controls:faketable-style($control-id, 100, if ($editable) then 6 else 5),
- if ($editable)
- then
-
- Add new contributor entry
-
-
- else (),
-
-
- Wiki name
- Real name
- Affiliation
- Email
- Web page
- {
- if ($editable)
- then
- Editing
- else ()
- }
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- {
- if ($editable)
- then
-
-
-
- Edit
-
-
-
- Delete
-
-
-
-
-
-
- else ()
- }
-
-
-
- )
- }
- )
-};
-
-(:~ editor UI.
- : Accepts events: new, edit, delete, off, xforms-submit-done, xforms-submit-error
- : @param $repeat-control-id control that has the repeat that
- : determines which id is edited
- :)
-declare function contributors:editor-ui(
- $instance-id as xs:string,
- $list-instance-id as xs:string,
- $control-id as xs:string,
- $repeat-control-id as xs:string)
- as element(xf:group) {
-
-
-
- {controls:clear-error(concat($instance-id,'-error'))}
- true
- new
- new
- false
-
-
-
-
-
-
-
- {controls:clear-error(concat($instance-id,'-error'))}
-
-
-
- false
-
-
- true
-
-
-
-
-
-
- {controls:clear-error(concat($instance-id,'-error'))}
-
-
-
-
-
-
-
- {controls:clear-error(concat($instance-id,'-error'))}
-
-
-
-
-
- {controls:clear-error(concat($instance-id,'-error'))}
-
-
-
-
-
-
-
-
- {
- contributors:individual-entry-ui(
- $instance-id, $list-instance-id,
- concat($control-id,'-ui'), ())
- (: if the cancel button is pressed, turn off the control :)
- }
-
-
-
-
-
-
-
- Confirm deletion of contributor record for: ()?
-
-
- Delete
-
-
-
- Cancel
-
-
-
-
- {controls:error-report(concat($instance-id, '-error'))}
-
-
-
-
-};
-
-(:~ user interface for searching :)
-declare function contributors:search-ui(
- $query-instance-id as xs:string,
- $results-instance-id as xs:string,
- $control-id as xs:string)
- as element(xf:group) {
-
-
-
- Search term:
-
-
- Search
-
-
- {controls:error-report(concat($query-instance-id, '-error'))}
-
- Search results
- {contributors:list-table-ui($results-instance-id, concat($control-id, '-results'))}
-
-
-
-};
diff --git a/code/apps/contributors/modules/save.xqm b/code/apps/contributors/modules/save.xqm
deleted file mode 100644
index 8bd98194..00000000
--- a/code/apps/contributors/modules/save.xqm
+++ /dev/null
@@ -1,152 +0,0 @@
-xquery version "1.0";
-(: Contributors list saver module
- : Copyright 2010 Efraim Feinstein
- : Licensed under the GNU Lesser General Public License, version 3 or later
- : $Id: save.xqm 709 2011-02-24 06:37:44Z efraim.feinstein $
- :)
-module namespace savecontrib="http://jewishliturgy.org/apps/contributors/save";
-
-declare namespace xf="http://www.w3.org/2002/xforms";
-declare namespace tei="http://www.tei-c.org/ns/1.0";
-declare namespace rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#";
-declare namespace cc="http://web.resource.org/cc/";
-declare namespace err="http://jewishliturgy.org/apps/errors";
-declare option exist:serialize "method=xhtml media-type=text/xml indent=no process-pi-xsl=no";
-
-import module namespace app = 'http://jewishliturgy.org/ns/functions/app';
-import module namespace contributors = 'http://jewishliturgy.org/apps/lib/contributors'
- at '../lib/contributors.xqm';
-import module namespace paths = 'http://jewishliturgy.org/apps/lib/paths'
- at '../lib/paths.xqm';
-
-(:~ perform the work for save.xql; return back the data if successful,
- : flag an error if not
- :)
-declare function savecontrib:save(
- $data as element(tei:list),
- $action as xs:string?)
- as element(tei:list) {
- let $debug := false()
- let $clean-stylesheet :=
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- let $cleaned-data as element(tei:list) :=
- transform:transform($data, $clean-stylesheet, ())
- let $contrib-template :=
-
-
-
-
- Global contributors list
-
-
-
-
- To the extent possible under law, the contributors who associated
- Creative Commons Zero
-
- with this work have waived all copyright and related or neighboring rights to this work.
-
-
-
-
-
-
-
-
-
-
-
- Born digital
-
-
-
-
-
-
- {$cleaned-data}
-
-
-
-
- return
- (
- app:make-collection-path(
- $contributors:collection, '/db', 'admin', 'everyone', util:base-to-integer(0775, 8)),
- util:log-system-out(('INCOMING : ', $data, ' CLEANED-DATA: ', $cleaned-data)),
- if (app:auth-user())
- then
- if (doc-available($contributors:list))
- then
- if ($action = 'append')
- then (
- update insert $cleaned-data/tei:item into doc($contributors:list)//tei:div[@type='contributors']/tei:list,
- $data
- )
- else (
- update replace doc($contributors:list)//tei:div[@type='contributors']/tei:list with $cleaned-data,
- $data
- )
- else (
- if (xmldb:store($contributors:collection, $contributors:resource, $contrib-template))
- then (
- xmldb:set-resource-permissions(
- $contributors:collection, $contributors:resource,
- app:auth-user(),
- 'everyone',
- util:base-to-integer(0775, 8)),
- $data)
- else error(xs:QName('err:SAVE'), 'Cannot store!')
- )
- else error(xs:QName('err:NOT_LOGGED_IN'), 'Not logged in')
- )
-};
diff --git a/code/apps/contributors/search/search.xql b/code/apps/contributors/search/search.xql
deleted file mode 100644
index 1c4d8c3c..00000000
--- a/code/apps/contributors/search/search.xql
+++ /dev/null
@@ -1,77 +0,0 @@
-xquery version "1.0";
-
-(:~ contributors list search interface
- : with no parameters: display a search interface
- : q=term : return search term results as tei:list
- :
- : Open Siddur Project
- : Copyright 2010 Efraim Feinstein
- : Licensed under the GNU Lesser General Public License, version 3 or later
- :
- : $Id: search.xql 687 2011-01-23 23:36:48Z efraim.feinstein $
- :)
-
-import module namespace contributors="http://jewishliturgy.org/apps/contributors/controls"
- at "../modules/controls.xqm";
-import module namespace common="http://jewishliturgy.org/apps/contributors/common"
- at "../modules/common.xqm";
-import module namespace controls="http://jewishliturgy.org/modules/controls"
- at "../../../modules/controls.xqm";
-import module namespace site="http://jewishliturgy.org/modules/site"
- at "../../../modules/site.xqm";
-
-declare namespace html="http://www.w3.org/1999/xhtml";
-declare namespace xf="http://www.w3.org/2002/xforms";
-declare namespace tei="http://www.tei-c.org/ns/1.0";
-declare option exist:serialize "method=xhtml media-type=text/xml indent=yes process-xsl-pi=no";
-
-(:~ return a list instance containing the results of the query :)
-declare function local:do-search(
- $query as xs:string)
- as element(tei:list) {
- {
- let $doc := doc($common:list)
- return
- $doc//tei:item[ft:query(., $query) or ft:query(@xml:id, $query) or
- (
- let $context := .
- let $org-target := $context/tei:affiliation/tei:ptr/@target
- return
- ft:query($doc//id(substring-after(string($org-target),'#'))/tei:orgName, $query) or
- ft:query($org-target, $query)
- )]
- }
-};
-
-declare function local:show-interface()
- as element()+ {
- site:form(
- {
- contributors:search-instance('search', 'results', 'reporter')
- },
- (Contributor search interface),
- (
- Contributor search,
- contributors:search-ui('search','results','control-search'),
- controls:reporter('reporter',
- Search completed successfully.,
- An error occurred during search.)
- ),
- (site:css(), contributors:css()),
- site:header(),
- (site:sidebar(), contributors:sidebar()),
- site:footer()
- )
-};
-
-(: This can be called either by POST or GET. If GET, the parameter is a string, if POST, it's a nodeset :)
-let $query-string as xs:string? :=
- if (lower-case(request:get-method()) = 'get')
- then request:get-parameter('q','')
- else if (lower-case(request:get-method()) = 'post')
- then string(request:get-data()/q)
- else ()
-return
- if ($query-string)
- then local:do-search($query-string)
- else local:show-interface()
diff --git a/code/apps/contributors/styles/contributors.css b/code/apps/contributors/styles/contributors.css
deleted file mode 100644
index 10d71a6b..00000000
--- a/code/apps/contributors/styles/contributors.css
+++ /dev/null
@@ -1,37 +0,0 @@
-/* CSS for contributor list editor
- * Open Siddur Project
- * Copyright 2010 Efraim Feinstein
- * Licensed under the GNU Lesser General Public License, version 3 or later
- * $Id: contributors.css 687 2011-01-23 23:36:48Z efraim.feinstein $
- */
-
-/* this is for the main table */
-.control-contributorlist-table {
- height:300px;
- width:99%;
- overflow-y:auto;
- overflow-x:hidden;
-}
-
-/* this is for the editor
- * it would be better to do with xf:dialog, but that doesn't seem to be supported yet in betterFORM
- */
-#editor-ui, #editor-delete-ui {
- background:white;
- position:fixed;
- z-index:3;
- left:25%;
- top:25%;
- height:50%;
- width:50%;
- padding:1em;
- overflow:auto;
- border-width:2px;
- border-style:solid;
-}
-
-.error-report {
- display:block;
- border:1px red;
- background-color:#FF6666;
-};
diff --git a/code/apps/contributors/views/list-items.xql b/code/apps/contributors/views/list-items.xql
deleted file mode 100644
index baf065c6..00000000
--- a/code/apps/contributors/views/list-items.xql
+++ /dev/null
@@ -1,38 +0,0 @@
-xquery version "1.0";
-
-(:~ Viewable list of contributor list items
- : Open Siddur Project
- : Copyright 2010 Efraim Feinstein
- : Licensed under the GNU Lesser General Public License, version 3
- : $Id: list-items.xql 687 2011-01-23 23:36:48Z efraim.feinstein $
- :)
-import module namespace app="http://jewishliturgy.org/modules/app"
- at "../../../modules/app.xqm";
-import module namespace common="http://jewishliturgy.org/apps/contributors/common"
- at "../modules/common.xqm";
-import module namespace contributors="http://jewishliturgy.org/apps/contributors/controls"
- at "../modules/controls.xqm";
-import module namespace site="http://jewishliturgy.org/modules/site"
- at "../../../modules/site.xqm";
-
-declare namespace tei="http://www.tei-c.org/ns/1.0";
-declare namespace xf="http://www.w3.org/2002/xforms";
-declare namespace ev="http://www.w3.org/2001/xml-events";
-declare namespace xs="http://www.w3.org/2001/XMLSchema";
-declare namespace h="http://www.w3.org/1999/xhtml";
-
-declare option exist:serialize "method=xhtml media-type=text/xml";
-
-site:form(
- {
- contributors:list-instance('contributors')
- },
- (Contributors List),
- (Contributors list,
- contributors:list-table-ui('contributors','control-contributors')
- ),
- (site:css(), contributors:css()),
- site:header(),
- (site:sidebar(), contributors:sidebar()),
- site:footer()
-)
diff --git a/code/apps/contributors/views/view-item.xql b/code/apps/contributors/views/view-item.xql
deleted file mode 100644
index 40239b07..00000000
--- a/code/apps/contributors/views/view-item.xql
+++ /dev/null
@@ -1,39 +0,0 @@
-xquery version "1.0";
-(:~ view-item.xql
- : Contributor list editor
- : Open Siddur Project
- : Copyright 2010 Efraim Feinstein
- : Licensed under the GNU Lesser General Public License version 3 or later
- :)
-import module namespace controls="http://jewishliturgy.org/modules/controls"
- at "../../../modules/controls.xqm";
-import module namespace contributors="http://jewishliturgy.org/apps/contributors/controls"
- at "../modules/controls.xqm";
-import module namespace site="http://jewishliturgy.org/modules/site"
- at "../../../modules/site.xqm";
-
-declare namespace xf="http://www.w3.org/2002/xforms";
-declare namespace ev="http://www.w3.org/2001/xml-events";
-declare namespace html="http://www.w3.org/1999/xhtml";
-
-declare option exist:serialize "method=xhtml media-type=text/xml indent=yes process-xsl-pi=no";
-
-let $id := request:get-parameter('id','')
-return
- site:form(
- {
- contributors:list-instance('contributorlist'),
- contributors:individual-entry-instance(
- 'contributor',
- 'contributorlist',
- $id,
- (), (), false(), ())
- },
- View contributor,
- (
- View contributor,
- contributors:individual-entry-ui(
- 'contributor', 'contributorlist',
- 'control-contributor', $id)
- )
- )
diff --git a/code/apps/editor/editor.xhtml b/code/apps/editor/editor.xhtml
deleted file mode 100644
index aea50e78..00000000
--- a/code/apps/editor/editor.xhtml
+++ /dev/null
@@ -1,76 +0,0 @@
-
-
-
-
- Open Siddur Editor
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Insert content here
-
-
\ No newline at end of file
diff --git a/code/apps/editor/javascript/README.base64 b/code/apps/editor/javascript/README.base64
deleted file mode 100644
index 9c511871..00000000
--- a/code/apps/editor/javascript/README.base64
+++ /dev/null
@@ -1,28 +0,0 @@
-Base 64 is a way of representing any data as text. The idea is simple:
-
-1) All data is binary, so treat it as bits
-
-2) Writing out each bit individually would be incredibly inefficient, so group them into sextuplets (6-bit numbers)
-
-3) Grouping 6 bits gives one "digit" in base 64
-
-4) Choose some arbitrary symbols to represent all 64 possibilities. For example, in hexadecimal we use "ABCDEF" as the extra symbols
-
-5) Since most data comes in 8-bit bytes, there may be 2 or 4 bits left over at the end. Just multiply by 10 or 100 to make 6 bits
-
-6) Write out your base 64 number, using your chosen symbols
-
-7) If you multiplied by 10 in step 5, put another (arbitrary) symbol at the end
-
-8) If you multiplied by 100 in step 5, put 2 such symbols at the end
-
-The symbols are indeed arbitrary, but a standardised set is used in the base 64 standards (in the same way that we standardise on "0123456789" in decimal).
-This simple library provides a "Base64" object with "encode" and "decode" functions. It's Public Domain, because I was so annoyed that I couldn't find
-such an obvious and useful bit of code under a permissive-enough license.
-
-Contributions are welcome. Note that I value simplicity over efficiency, so I may choose not to include patches that just increase the speed while making
-it harder to understand. With that said, the simplicity is already compromised a bit since I opted to make the encode/decode functions use a single pass
-(otherwise the RAM usage would be unacceptable). You're completely free to fork the code if you want to though.
-
-- Chris Warburton
-
diff --git a/code/apps/editor/javascript/base64.js b/code/apps/editor/javascript/base64.js
deleted file mode 100644
index 1a1a0a72..00000000
--- a/code/apps/editor/javascript/base64.js
+++ /dev/null
@@ -1,100 +0,0 @@
-// Simple Base64 encoder/decoder
-// Public Domain
-
-Base64 = {
-
- encode : function (input) {
- // Converts each character in the input to its Unicode number, then writes
- // out the Unicode numbers in binary, one after another, into a string.
- // This string is then split up at every 6th character, these substrings
- // are then converted back into binary integers and are used to subscript
- // the "swaps" array.
- // Since this would create HUGE strings of 1s and 0s, the distinct steps
- // above are actually interleaved in the code below (ie. the long binary
- // string, called "input_binary", gets processed while it is still being
- // created, so that it never gets too big (in fact, it stays under 13
- // characters long no matter what).
-
- // The indices of this array provide the map from numbers to base 64
- var swaps = ["A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z","a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z","0","1","2","3","4","5","6","7","8","9","+","/"];
- var input_binary = ""; // The input string, converted to Unicode numbers and written out in binary
- var output = ""; // The base 64 output
- var temp_binary; // Used to ensure the binary numbers have 8 bits
- var index; // Loop variable, for looping through input
- for (index=0; index < input.length; index++)
- {
- // Turn the next character of input into astring of 8-bit binary
- temp_binary = input.charCodeAt(index).toString(2);
- while (temp_binary.length < 8)
- {
- temp_binary = "0"+temp_binary;
- }
- // Stick this string on the end of the previous 8-bit binary strings to
- // get one big concatenated binary representation
- input_binary = input_binary + temp_binary;
- // Remove all 6-bit sequences from the start of the concatenated binary
- // string, convert them to a base 64 character and append to output.
- // Doing this here prevents input_binary from getting massive
- while (input_binary.length >= 6)
- {
- output = output + swaps[parseInt(input_binary.substring(0,6),2)];
- input_binary = input_binary.substring(6);
- }
- }
- // Handle any necessary padding
- if (input_binary.length == 4)
- {
- temp_binary = input_binary + "00";
- output = output + swaps[parseInt(temp_binary,2)];
- output = output + "=";
- }
- if (input_binary.length == 2)
- {
- temp_binary = input_binary + "0000";
- output = output + swaps[parseInt(temp_binary,2)];
- output = output + "==";
- }
- // Output now contains the input in base 64
- return output;
- },
-
- decode : function (input) {
- // Takes a base 64 encoded string "input", strips any "=" or "==" padding
- // off it and converts its base 64 numerals into regular integers (using a
- // string as a lookup table). These are then written out as 6-bit binary
- // numbers and concatenated together. The result is split into 8-bit
- // sequences and these are converted to string characters, which are
- // concatenated and output.
- input = input.replace("=",""); // Padding characters are redundant
- // The index/character relationship in the following string acts as a
- // lookup table to convert from base 64 numerals to Javascript integers
- var swaps = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
- var output_binary = "";
- var output = "";
- var temp_bin = "";
- var index;
- for (index=0; index < input.length; index++)
- {
- temp_bin = swaps.indexOf(input.charAt(index)).toString(2);
- while (temp_bin.length < 6)
- {
- // Add significant zeroes
- temp_bin = "0"+temp_bin;
- }
- while (temp_bin.length > 6)
- {
- // Remove significant bits
- temp_bin = temp_bin.substring(1);
- }
- output_binary = output_binary + temp_bin;
- while (output_binary.length >= 8)
- {
- output = output + String.fromCharCode(parseInt(output_binary.substring(0,8),2));
- output_binary = output_binary.substring(8);
- }
- }
- return output;
- }
-
-};
-
diff --git a/code/apps/editor/styles/editor.css b/code/apps/editor/styles/editor.css
deleted file mode 100644
index 77df0a01..00000000
--- a/code/apps/editor/styles/editor.css
+++ /dev/null
@@ -1,38 +0,0 @@
-/*
- * CSS specifically for the editor
- *
- * Copyright 2012 Efraim Feinstein
- * Licensed under the GNU Lesser General Public License, version 3 or later
- */
-@CHARSET "UTF-8";
-
-.tei-lg {
- border: 1px solid goldenrod;
-}
-
-.tei-l {
- border: 1px solid brown;
-}
-
-.tei-p {
- border: 1px solid green;
-}
-
-.tei-seg {
- border: 1px solid blue;
-}
-
-.tei-w {
- border: 1px solid red;
-}
-
-.external {
- border: 1px solid green;
- display:block;
-}
-
-.external a {
- /* this isn't really a semantic thing, it's a display thing */
- direction:ltr;
- display:block;
-}
\ No newline at end of file
diff --git a/code/apps/index.xql b/code/apps/index.xql
deleted file mode 100644
index bdf47137..00000000
--- a/code/apps/index.xql
+++ /dev/null
@@ -1,52 +0,0 @@
-xquery version "1.0";
-(: index.xql
- : Copyright 2010 Efraim Feinstein
- : Licensed under the GNU Lesser General Public License, version 3 or later
- : $Id: index.xql 522 2010-06-24 18:35:25Z efraim.feinstein $
- :)
-import module namespace login="http://jewishliturgy.org/apps/lib/login" at "lib/login.xqm";
-
-declare namespace xf="http://www.w3.org/2002/xforms";
-declare namespace ev="http://www.w3.org/2001/xml-events";
-declare namespace xs="http://www.w3.org/2001/XMLSchema";
-declare option exist:serialize "method=xhtml media-type=text/xml indent=no process-pi-xsl=no";
-
-let $xslt-pi := processing-instruction xml-stylesheet {'type="text/xsl" href="/exist/rest/db/xforms/xsltforms/xsltforms.xsl"'}
-let $debug := processing-instruction xsltforms-options {'debug="yes"'}
-let $form :=
-
-
- Open Siddur Apps index
- {login:form-model()}
-
-
-
-
-
-return
- ($xslt-pi, $form)
\ No newline at end of file
diff --git a/code/apps/jobs/data/__override__.xml b/code/apps/jobs/data/__override__.xml
deleted file mode 100644
index 1352f0fb..00000000
--- a/code/apps/jobs/data/__override__.xml
+++ /dev/null
@@ -1,2 +0,0 @@
-
-
diff --git a/code/apps/jobs/modules/jobs.xqm b/code/apps/jobs/modules/jobs.xqm
deleted file mode 100644
index 916ccfb7..00000000
--- a/code/apps/jobs/modules/jobs.xqm
+++ /dev/null
@@ -1,504 +0,0 @@
-xquery version "3.0";
-(:~ Job queue control functions
- :
- : The job control structure looks like:
- :
- :
- :
- :
- :
- :
- :
- : +
- :
- :
- :
- :
- : +
- :
- :
- :
- :
- :
- :
- :
- :
- :
- : Copyright 2011 Efraim Feinstein
- : Licensed under the GNU Lesser General Public License, version 3 or later
- :)
-module namespace jobs="http://jewishliturgy.org/apps/jobs";
-
-import module namespace debug="http://jewishliturgy.org/transform/debug"
- at "xmldb:exist:///code/modules/debug.xqm";
-import module namespace paths="http://jewishliturgy.org/modules/paths"
- at "xmldb:exist:///code/modules/paths.xqm";
-import module namespace magic="http://jewishliturgy.org/magic"
- at "xmldb:exist:///code/magic/magic.xqm";
-import module namespace app="http://jewishliturgy.org/modules/app"
- at "xmldb:exist:///code/modules/app.xqm";
-
-declare namespace err="http://jewishliturgy.org/errors";
-
-(:declare option exist:optimize "enable=no";:)
-
-declare variable $jobs:queue-collection := '/code/apps/jobs/data';
-declare variable $jobs:queue-resource := "queue.xml";
-declare variable $jobs:users-resource := "users.xml";
-declare variable $jobs:next-id-resource := "next-id.xml";
-declare variable $jobs:queue-path :=
- concat($jobs:queue-collection, '/', $jobs:queue-resource);
-declare variable $jobs:users-path :=
- concat($jobs:queue-collection, '/', $jobs:users-resource);
-
-declare function local:make-signature(
- $job as element(jobs:job)
- ) as xs:string {
- let $us :=
- string-join((
- $job/jobs:run/jobs:query,
- for $param in $job/jobs:run/jobs:param
- return ('P:', $param/jobs:name, 'V:', $param/jobs:value)
- ), ' ')
- return string(util:hash($us, 'md5', true()))
-};
-
-(: return the next viable job id
- : expects to be run as admin
- :)
-declare function local:next-job-id(
- $queue as document-node()
- ) as xs:integer {
- let $max-job-id as xs:integer := 2147483647
- let $job-id-path :=
- concat($jobs:queue-collection, "/", $jobs:next-id-resource)
- let $create-jobs-id-path :=
- if (doc-available($job-id-path))
- then ()
- else
- if (xmldb:store($jobs:queue-collection, $jobs:next-id-resource,
- element jobs:next-id {1}
- ))
- then
- xmldb:set-resource-permissions(
- $jobs:queue-collection, $jobs:next-id-resource,
- "admin", "dba", util:base-to-integer(0770, 8)
- )
- else
- error(xs:QName("err:STORE"), "Cannot store the next job id. This is bad.")
- let $next-id-element :=
- doc($job-id-path)//jobs:next-id
- let $this-id :=
- $next-id-element/number()
- return (
- update value $next-id-element with (
- if ($this-id = $max-job-id)
- then 1
- else ($this-id + 1)
- ),
- if ($queue//jobs:job-id=$this-id)
- then (
- (: try again to avoid conflict, which is only possible
- if we have wrapped around :)
- local:next-job-id($queue)
- )
- else
- $this-id
- )
-};
-
-(: set up a task to be enqueued.
- : expects to be run as admin
- :)
-declare function local:set-job-defaults(
- $jobs as element(jobs:job)+,
- $user as xs:string?
- ) as element(jobs:job)+ {
- let $queue := doc($jobs:queue-path)
- for $job in $jobs
- return
- element jobs:job {
- $job/(* except (jobs:id, jobs:running, jobs:runas, jobs:signature)),
- element jobs:runas { ($user[.], 'guest')[1] },
- if ($job/jobs:priority)
- then ()
- else element jobs:priority { 0 },
- element jobs:id { local:next-job-id($queue) },
- element jobs:signature { local:make-signature($job) }
- }
-};
-
-(: remove a user from the user list if no more jobs (except
- : $exclude-job-id will run as that user
- :)
-declare function local:delete-jobs-user(
- $user as xs:string,
- $exclude-job-id as xs:integer?
- ) as empty() {
- system:as-user('admin', $magic:password,
- let $jobs := doc($jobs:queue-path)
- let $users := doc($jobs:users-path)
- where empty($jobs//(jobs:job[jobs:runas=$user][not(jobs:id=$exclude-job-id)]))
- return update delete $users//jobs:user[jobs:name=$user]
- )
-};
-
-(:~ add a user to the jobs user list :)
-declare function local:add-jobs-user(
- $user as xs:string,
- $password as xs:string?
- ) as empty() {
- let $newuser := element jobs:user {
- element jobs:name { $user },
- element jobs:password { $password }
- }
- where not($user='guest')
- return
- system:as-user('admin', $magic:password,
- if (doc-available($jobs:users-path))
- then
- let $users := doc($jobs:users-path)/jobs:users
- where empty($users//jobs:name=$user)
- return update insert $newuser into $users
- else
- if (xmldb:store($jobs:queue-collection, $jobs:users-resource,
- element jobs:users {
- $newuser
- }))
- then
- xmldb:set-resource-permissions(
- $jobs:queue-collection, $jobs:users-resource,
- 'admin', 'dba',
- util:base-to-integer(0770, 8)
- )
- else
- error(xs:QName('err:INTERNAL'), "Cannot store users file.")
- )
-};
-
-(:~ schedule a job in the queue, return its job ids
- : @param $jobs jobs structures of jobs to add
- : @param $user runas user
- : @param $password password of runas user
- :)
-declare function jobs:enqueue(
- $jobs as element(jobs:job)+,
- $user as xs:string,
- $password as xs:string?
- ) as element(jobs:id)+ {
- for $job in $jobs[not(matches(normalize-space(.//jobs:query), '^(xmldb:exist://)?(/db)?/code'))]
- return
- error(xs:QName('err:SECURITY'), concat("For security reasons, all scheduled tasks must be in the /db/code collection in the database, offender: ", $job//jobs:query))
- ,
- system:as-user('admin', $magic:password,
- let $defaulted := local:set-job-defaults($jobs, $user)
- let $queue := doc($jobs:queue-path)/jobs:jobs
- return (
- local:add-jobs-user($user, $password),
- if ($queue)
- then
- update insert $defaulted into $queue
- else
- if (xmldb:store($jobs:queue-collection, $jobs:queue-resource,
- element jobs:jobs {
- $defaulted
- }))
- then (
- xmldb:set-resource-permissions(
- $jobs:queue-collection, $jobs:queue-resource,
- 'admin', 'dba',
- util:base-to-integer(0770, 8)
- )
- )
- else
- error(xs:QName('err:INTERNAL'),
- "Internal error. Cannot store the job queue"),
- $defaulted//jobs:id
- )
- )
-};
-
-(:~ enqueue the listed jobs if there are not already-enqueued
- : jobs with the same query and parameter values
- : return the job ids of all the enqueued jobs
- :)
-declare function jobs:enqueue-unique(
- $jobs as element(jobs:job)+,
- $user as xs:string,
- $password as xs:string
- ) as element(jobs:id)* {
- let $queue :=
- system:as-user('admin', $magic:password, doc($jobs:queue-path))
- for $job in $jobs
- let $signature := local:make-signature($job)
- let $identical-job := $queue//jobs:signature[. = $signature]
- return
- if (exists($identical-job))
- then
- $identical-job/../jobs:id
- else
- jobs:enqueue($job, $user, $password)
-};
-
-(:~ mark a job completed :)
-declare function jobs:complete(
- $job-id as xs:integer
- ) as empty() {
- system:as-user('admin', $magic:password,
- let $queue := doc($jobs:queue-path)/jobs:jobs
- let $this-job := $queue/jobs:job[jobs:id=$job-id]
- return (
- local:delete-jobs-user($this-job/jobs:runas, $this-job/jobs:id),
- update delete $this-job
- )
- )
-};
-
-(:~ mark a job incomplete-- run, but an error encountered, so it must be run again
- :)
-declare function jobs:incomplete(
- $job-id as xs:integer
- ) as empty() {
- system:as-user('admin', $magic:password,
- let $this-job := doc($jobs:queue-path)//jobs:job[jobs:id=$job-id]
- return (
- update delete $this-job/jobs:running
- )
- )
-};
-
-(:~ find all downstream dependencies of a given job :)
-declare function local:dependencies(
- $job-ids as xs:integer+
- ) as element(jobs:job)* {
- let $all-jobs :=
- system:as-user("admin", $magic:password,
- doc($jobs:queue-path)//jobs:job
- )
- for $job-id in $job-ids
- let $dependencies := $all-jobs[jobs:depends=$job-id]
- where exists($dependencies)
- return (
- $dependencies,
- local:dependencies($dependencies/jobs:id/number())
- )
-};
-
-(:~ cancel a job and all its dependent jobs because of a given error
- : note: a running job cannot be canceled, but dependent jobs will be
- :)
-declare function jobs:cancel(
- $job-id as xs:integer
- ) as empty() {
- let $queue :=
- system:as-user('admin', $magic:password,
- doc($jobs:queue-path))/jobs:jobs
- let $job := $queue//jobs:job[jobs:id=$job-id]
- where exists($job)
- return
- let $current-user := xmldb:get-current-user()
- let $can-cancel :=
- ($job/jobs:runas=$current-user or
- xmldb:is-admin-user($current-user))
- or
- error(xs:QName("err:AUTHORIZATION"), concat("The user ", $current-user,
- " is not authorized to cancel job#", string($job-id), " which is owned by ",
- $job/jobs:runas))
- let $dependencies := local:dependencies($job-id)
- return (
- (: try to cancel the current job :)
- if ($job/jobs:running)
- then
- error(xs:QName("err:RUNNING"), concat("The jobs module attempted to cancel a running job ", $job-id, ", an illegal operation. It should have called jobs:incomplete() first. This is a bug."))
- else
- system:as-user('admin', $magic:password,
- update delete ($job, $dependencies)
- )
- )
-};
-
-
-(:~ mark a job as running by the given $task-id :)
-declare function jobs:running(
- $job-id as xs:integer,
- $task-id as xs:integer?
- ) as empty() {
- system:as-user('admin', $magic:password,
- let $queue := doc($jobs:queue-path)/jobs:jobs
- return
- update insert element jobs:running { $task-id } into
- $queue/jobs:job[jobs:id=$job-id]
- )
-};
-
-(:~ find the next job that should be run and return its job structure :)
-declare function jobs:pop(
- ) as element(jobs:job)? {
- let $queue :=
- system:as-user('admin', $magic:password,
- doc($jobs:queue-path))/jobs:jobs
- let $max-priority := max($queue//jobs:priority[not(../jobs:running)])
- let $job-ids := $queue//jobs:id
- return
- $queue/jobs:job[not(jobs:running)]
- [jobs:priority=$max-priority]
- [not(jobs:depends=$job-ids)][1]
-
-};
-
-(:~ run the next job as the given task id
- : return the job id of the job that runs or empty if no job runs
- :)
-declare function jobs:run(
- $task-id as xs:integer
- ) as xs:integer? {
- let $next-job := jobs:pop()
- where exists($next-job)
- return
- let $runas := $next-job/jobs:runas/string()
- let $job-id := $next-job/jobs:id/number()
- let $run := $next-job/jobs:run
- let $null :=
- debug:debug($debug:info,
- "jobs",
- ("Jobs module: Next job: ", $next-job,
- " runas=", $runas, " $id=", $job-id,
- " run=", $run, " exist=", exists($next-job)))
- let $password :=
- if ($runas='admin')
- then $magic:password
- else
- string(
- system:as-user('admin', $magic:password,
- doc($jobs:users-path)//jobs:user[jobs:name=$runas]/jobs:password
- ))
- return (
- jobs:running($job-id, $task-id),
- system:as-user($runas, $password,
- (
- let $completed-job :=
- try {
- debug:debug($debug:info,
- "jobs",
- ("Jobs module attempting to run: ", $run)),
- let $query := util:binary-to-string(util:binary-doc($run/jobs:query))
- return
- (
- util:eval($query , false(),
- (
- xs:QName('local:user'), $runas,
- xs:QName('local:password'), $password,
- xs:QName("local:job-id"), $job-id,
- for $param in $run/jobs:param
- let $qname := xs:QName(concat('local:', $param/jobs:name))
- let $value := string($param/jobs:value)
- return ($qname, $value)
- )
- )
- ),
- jobs:complete($job-id),
- xs:integer($job-id)
- }
- catch * {
- debug:debug($debug:info,
- "jobs",
- ("Caught an exception while running job: ", $job-id, " Exception:",
- debug:print-exception($err:module, $err:line-number, $err:column-number, $err:code, $err:value, $err:description))),
- local:record-exception($job-id, $err:code, $err:description, $err:value),
- jobs:incomplete($job-id)
- }
- return
- (: this odd coding is necessary because this code
- : will cause a stack overflow
- : if it is inside a catch clause
- :)
- if ($completed-job instance of xs:integer)
- then $completed-job
- else jobs:cancel($job-id)
- )
- )
- )
-};
-
-(:~ determine if any task is running that has the given task id :)
-declare function jobs:is-task-running(
- $task-id as xs:integer
- ) as xs:boolean {
- system:as-user('admin', $magic:password,
- exists(doc($jobs:queue-path)//jobs:running[.=$task-id])
- )
-};
-
-(:~ record an exception according to the jobs:error description in the given job :)
-declare function local:record-exception(
- $job-id as xs:integer,
- $code as xs:string,
- $description as xs:string,
- $value as xs:string
- ) as empty() {
- let $job :=
- system:as-user("admin", $magic:password,
- doc($jobs:queue-path)//jobs:job[jobs:id=$job-id]
- )
- let $error-element := $job/jobs:error
- where exists($error-element)
- return
- let $runas as xs:string := $job/jobs:runas/string()
- let $collection := string($error-element/jobs:collection)
- let $resource := string($error-element/jobs:resource)
- return
- if (xmldb:store($collection, $resource,
-
- {$job}
- {$code}
- {$description}
- {$value}
-
- ))
- then
- xmldb:set-resource-permissions($collection, $resource, $runas, $runas,
- util:base-to-integer(0770,8))
- else
- error(xs:QName("err:STORE"), "Cannot store the error output. This is very bad!")
-};
-
-(:~ return how many jobs are ahead of a given job in the queue
- : returns empty if the job doesn't exist
- :)
-declare function jobs:wait-in-queue(
- $job-id as xs:integer
- ) as xs:integer? {
- let $job :=
- system:as-user('admin', $magic:password,
- doc($jobs:queue-path)//jobs:job[jobs:id=$job-id]
- )
- let $priority := $job/jobs:priority/number()
- where exists($job)
- return
- count(
- $job/preceding-sibling::jobs:job
- [not(jobs:running) and jobs:priority >= $priority] |
- $job/following-sibling::jobs:job
- [not(jobs:running) and jobs:priority > $priority]
- )
-};
-
-(:~ run this when a user changes password.
- : You must be dba or the user in question to make this work
- :)
-declare function jobs:change-password(
- $user as xs:string,
- $new-password as xs:string
- ) as empty() {
- let $logged-in-user := app:auth-user()
- return
- if (xmldb:is-admin-user($logged-in-user) or $user=$logged-in-user)
- then
- system:as-user("admin", $magic:password,
- update value
- doc($jobs:users-path)//jobs:user[jobs:name=$user]/jobs:password
- with $new-password
- )
- else
- error(xs:QName("err:AUTHORIZATION"), "To change a password, you must be admin or the user whose password you are changing.")
-};
\ No newline at end of file
diff --git a/code/apps/jobs/queries/bg-cache.xql b/code/apps/jobs/queries/bg-cache.xql
deleted file mode 100644
index 2357f66e..00000000
--- a/code/apps/jobs/queries/bg-cache.xql
+++ /dev/null
@@ -1,33 +0,0 @@
-xquery version "3.0";
-(:~ cache a single resource and its dependencies from the background
- :
- : Copyright 2011 Efraim Feinstein
- : Licensed under the GNU Lesser General Public License, version 3 or later
- :)
-import module namespace debug="http://jewishliturgy.org/transform/debug"
- at "xmldb:exist:///code/modules/debug.xqm";
-import module namespace jcache="http://jewishliturgy.org/modules/cache"
- at "xmldb:exist:///code/modules/cache-controller.xqm";
-
-(:
-declare variable $local:resource external;
-declare variable $local:user external;
-declare variable $local:password external;
-:)
-
-try {
- debug:debug(
- $debug:info,
- "jobs",
- concat('Background caching ', $local:resource)
- ),
- jcache:cache-all($local:resource, $local:user, $local:password)
-}
-catch * {
- debug:debug(
- $debug:warn,
- "jobs",
- ("Error during background caching: ",
- debug:print-exception($err:module, $err:line-number, $err:column-number, $err:code, $err:value, $err:description))
- )
-}
diff --git a/code/apps/jobs/queries/bg-cleanup.xql b/code/apps/jobs/queries/bg-cleanup.xql
deleted file mode 100644
index 6af50a03..00000000
--- a/code/apps/jobs/queries/bg-cleanup.xql
+++ /dev/null
@@ -1,20 +0,0 @@
-xquery version "3.0";
-(:~ remove a resource in the background
- :
- : Copyright 2011 Efraim Feinstein
- : Licensed under the GNU Lesser General Public License, version 3 or later
- :)
-import module namespace debug="http://jewishliturgy.org/transform/debug"
- at "xmldb:exist:///code/modules/debug.xqm";
-(:
-declare variable $local:resource external;
-:)
-
-
-debug:debug($debug:info, "jobs",
- concat('Background cleanup ', $local:resource)
- ),
-if (doc-available(concat($local:collection, "/", $local:resource)))
-then
- xmldb:remove($local:collection, $local:resource)
-else ()
diff --git a/code/apps/jobs/queries/bg-compile-cache.xql b/code/apps/jobs/queries/bg-compile-cache.xql
deleted file mode 100644
index 36e0fa7a..00000000
--- a/code/apps/jobs/queries/bg-compile-cache.xql
+++ /dev/null
@@ -1,42 +0,0 @@
-xquery version "3.0";
-(:~ cache a single resource and its dependencies from the background,
- : store the cached copy in $local:dest-collection/$local:dest-resource
- :
- : Copyright 2011-2012 Efraim Feinstein
- : Licensed under the GNU Lesser General Public License, version 3 or later
- :)
-import module namespace app="http://jewishliturgy.org/modules/app"
- at "xmldb:exist:///code/modules/app.xqm";
-import module namespace format="http://jewishliturgy.org/modules/format"
- at "xmldb:exist:///code/modules/format.xqm";
-import module namespace debug="http://jewishliturgy.org/transform/debug"
- at "xmldb:exist:///code/modules/debug.xqm";
-import module namespace jcache="http://jewishliturgy.org/modules/cache"
- at "xmldb:exist:///code/modules/cache-controller.xqm";
-
-declare namespace err="http://jewishliturgy.org/errors";
-
-(:
-declare variable $local:source-resource external;
-declare variable $local:user external;
-declare variable $local:password external;
-:)
-
-debug:debug(
- $debug:info,
- "jobs",
- concat("Background caching for compile: ", $local:source-collection, "/", $local:source-resource, " as ", $local:user, ":", $local:password)
- ),
-format:update-status($local:dest-collection, $local:source-resource, $format:caching, $local:job-id),
-let $doc-path := concat($local:source-collection, "/", $local:source-resource)
-let $dest-path := concat($local:dest-collection, "/", $local:dest-resource)
-return (
- jcache:cache-all($doc-path, $local:user, $local:password),
- if (xmldb:store($local:dest-collection, $local:dest-resource, doc(jcache:cached-document-path($doc-path))))
- then
- app:mirror-permissions($doc-path, $dest-path)
- else
- error(xs:QName("err:STORE"), concat("Cannot store ", $local:dest-collection, "/", $local:dest-resource))
-),
-format:complete-status($local:dest-collection, $local:source-resource)
-
diff --git a/code/apps/jobs/queries/bg-compile-data.xql b/code/apps/jobs/queries/bg-compile-data.xql
deleted file mode 100644
index 31791f6e..00000000
--- a/code/apps/jobs/queries/bg-compile-data.xql
+++ /dev/null
@@ -1,39 +0,0 @@
-xquery version "3.0";
-(:~ perform the data compilation stage in the background
- :
- : Copyright 2011-2012 Efraim Feinstein
- : Licensed under the GNU Lesser General Public License, version 3 or later
- :)
-import module namespace app="http://jewishliturgy.org/modules/app"
- at "xmldb:exist:///code/modules/app.xqm";
-import module namespace debug="http://jewishliturgy.org/transform/debug"
- at "xmldb:exist:///code/modules/debug.xqm";
-import module namespace format="http://jewishliturgy.org/modules/format"
- at "xmldb:exist:///code/modules/format.xqm";
-
-declare namespace err="http://jewishliturgy.org/errors";
-
-(:
-declare variable $local:source-collection external; source collection of data to be compiled (cache!)
-declare variable $local:source-resource external; source resource name
-declare variable $local:dest-collection external; destination collection for data to be compiled
-declare variable $local:dest-resource external; destination resource name
-:)
-
-debug:debug(
- $debug:info,
- "jobs",
- concat("Data compilation phase for ", $local:source-collection, "/", $local:source-resource)
- ),
-format:update-status($local:dest-collection, $local:source-resource, $format:data, $local:job-id),
-let $source-path := concat($local:source-collection, "/", $local:source-resource)
-let $dest-path := concat($local:dest-collection, "/", $local:dest-resource)
-let $compiled := format:data-compile($source-path, $local:user, $local:password)
-return
- if (xmldb:store($local:dest-collection, $local:dest-resource, $compiled))
- then
- app:mirror-permissions($source-path, $dest-path)
- else
- error(xs:QName("err:STORE"), concat("Cannot store ", $dest-path)),
-format:complete-status($local:dest-collection, $local:source-resource)
-
diff --git a/code/apps/jobs/queries/bg-compile-format.xql b/code/apps/jobs/queries/bg-compile-format.xql
deleted file mode 100644
index e9952ffc..00000000
--- a/code/apps/jobs/queries/bg-compile-format.xql
+++ /dev/null
@@ -1,55 +0,0 @@
-xquery version "3.0";
-(:~ perform the format compilation stage in the background
- :
- : Copyright 2011 Efraim Feinstein
- : Licensed under the GNU Lesser General Public License, version 3 or later
- :)
-import module namespace app="http://jewishliturgy.org/modules/app"
- at "xmldb:exist:///code/api/modules/app.xqm";
-import module namespace data="http://jewishliturgy.org/modules/data"
- at "xmldb:exist:///code/api/modules/data.xqm";
-import module namespace debug="http://jewishliturgy.org/transform/debug"
- at "xmldb:exist:///code/modules/debug.xqm";
-import module namespace format="http://jewishliturgy.org/modules/format"
- at "xmldb:exist:///code/modules/format.xqm";
-
-declare namespace err="http://jewishliturgy.org/errors";
-
-(:
-declare variable $local:source-collection external; source collection of data to be compiled (cache!)
-declare variable $local:source-resource external; source resource name
-declare variable $local:dest-collection external; destination collection for data to be compiled
-declare variable $local:dest-resource external; destination resource name
-declare variable $local:style external; style CSS @href
-:)
-
-debug:debug(
- $debug:info,
- "jobs",
- concat("Format compilation phase for ", $local:source-collection, "/", $local:source-resource)
- ),
-format:update-status($local:dest-collection, $local:source-resource, $format:format, $local:job-id),
-let $source-path := concat($local:source-collection, "/", $local:source-resource)
-let $dest-path := concat($local:dest-collection, "/", $local:dest-resource)
-let $style-dest-resource := replace($local:dest-resource, "(\.[^.]+)$", ".css")
-let $dest-css-path := concat($local:dest-collection, "/", $style-dest-resource)
-let $compiled := format:format-xhtml($source-path, $style-dest-resource, $local:user, $local:password)
-let $style-css :=
- util:binary-to-string(util:binary-doc(
- if ($local:style)
- then data:api-path-to-db($local:style)
- else "/db/code/transforms/format/xhtml/style.css"
- ))
-return (
- if (xmldb:store($local:dest-collection, $local:dest-resource, $compiled))
- then
- app:mirror-permissions($source-path, $dest-path)
- else
- error(xs:QName("err:STORE"), concat("Cannot store ", $dest-path)),
- if (xmldb:store($local:dest-collection, $style-dest-resource, $style-css, "text/css"))
- then
- app:mirror-permissions($source-path, $dest-css-path)
- else
- error(xs:QName("err:STORE"), concat("Cannot store ", $dest-css-path))
-),
-format:complete-status($local:dest-collection, $local:dest-resource)
diff --git a/code/apps/jobs/queries/bg-compile-list.xql b/code/apps/jobs/queries/bg-compile-list.xql
deleted file mode 100644
index 530a6a6c..00000000
--- a/code/apps/jobs/queries/bg-compile-list.xql
+++ /dev/null
@@ -1,39 +0,0 @@
-xquery version "3.0";
-(:~ perform the list compilation stage in the background
- :
- : Copyright 2011 Efraim Feinstein
- : Licensed under the GNU Lesser General Public License, version 3 or later
- :)
-import module namespace app="http://jewishliturgy.org/modules/app"
- at "xmldb:exist:///code/modules/app.xqm";
-import module namespace debug="http://jewishliturgy.org/transform/debug"
- at "xmldb:exist:///code/modules/debug.xqm";
-import module namespace format="http://jewishliturgy.org/modules/format"
- at "xmldb:exist:///code/modules/format.xqm";
-
-declare namespace err="http://jewishliturgy.org/errors";
-
-(:
-declare variable $local:source-collection external; source collection of data to be compiled (cache!)
-declare variable $local:source-resource external; source resource name
-declare variable $local:dest-collection external; destination collection for data to be compiled
-declare variable $local:dest-resource external; destination resource name
-:)
-
-debug:debug(
- $debug:info,
- "jobs",
- concat("List compilation phase for ", $local:source-collection, "/", $local:source-resource)
- ),
-format:update-status($local:dest-collection, $local:source-resource, $format:list, $local:job-id),
-let $source-path := concat($local:source-collection, "/", $local:source-resource)
-let $dest-path := concat($local:dest-collection, "/", $local:dest-resource)
-let $compiled := format:list-compile($source-path, $local:user, $local:password)
-return
- if (xmldb:store($local:dest-collection, $local:dest-resource, $compiled))
- then
- app:mirror-permissions($source-path, $dest-path)
- else
- error(xs:QName("err:STORE"), concat("Cannot store ", $dest-path)),
-format:complete-status($local:dest-collection, $local:source-resource)
-
diff --git a/code/apps/jobs/queries/bg-compile-translit.xql b/code/apps/jobs/queries/bg-compile-translit.xql
deleted file mode 100644
index 5147140c..00000000
--- a/code/apps/jobs/queries/bg-compile-translit.xql
+++ /dev/null
@@ -1,49 +0,0 @@
-xquery version "3.0";
-(:~ perform the transliteration stage in the background
- :
- : Copyright 2011 Efraim Feinstein
- : Licensed under the GNU Lesser General Public License, version 3 or later
- :)
-import module namespace debug="http://jewishliturgy.org/transform/debug"
- at "xmldb:exist:///code/modules/debug.xqm";
-import module namespace format="http://jewishliturgy.org/modules/format"
- at "xmldb:exist:///code/modules/format.xqm";
-
-declare namespace tei="http://www.tei-c.org/ns/1.0";
-declare namespace err="http://jewishliturgy.org/errors";
-
-(:
-declare variable $local:source-collection external; source collection of data to be compiled (cache!)
-declare variable $local:source-resource external; source resource name
-declare variable $local:dest-collection external; destination collection for data to be compiled
-declare variable $local:dest-resource external; destination resource name
-:)
-
-
-debug:debug($debug:info,
- "compilation",
- concat("Transliteration phase for ", $local:source-collection, "/", $local:source-resource)
- ),
-format:update-status($local:dest-collection, $local:source-resource, $format:transliterate, $local:job-id),
-let $source-path := concat($local:source-collection, "/", $local:source-resource)
-let $dest-path := concat($local:dest-collection, "/", $local:dest-resource)
-let $source-doc := doc($source-path)
-let $transliterated :=
- if (exists($source-doc//tei:fs[@type="Transliterate"]))
- then
- format:transliterate($source-path, $local:user, $local:password)
- else $source-doc
-return
- if (xmldb:store($local:dest-collection, $local:dest-resource, $transliterated))
- then
- let $owner := xmldb:get-owner($local:source-collection, $local:source-resource)
- let $group := xmldb:get-group($local:source-collection, $local:source-resource)
- let $mode := xmldb:get-permissions($local:source-collection, $local:source-resource)
- return
- xmldb:set-resource-permissions(
- $local:dest-collection, $local:dest-resource,
- $owner, $group, $mode)
- else
- error(xs:QName("err:STORE"), concat("Cannot store ", $dest-path)),
-format:complete-status($local:dest-collection, $local:source-resource)
-
diff --git a/code/apps/jobs/queries/bg-run-task.xql b/code/apps/jobs/queries/bg-run-task.xql
deleted file mode 100644
index 4791b12a..00000000
--- a/code/apps/jobs/queries/bg-run-task.xql
+++ /dev/null
@@ -1,41 +0,0 @@
-xquery version "3.0";
-(:~ background task executive
- :
- : Copyright 2011 Efraim Feinstein
- : Licensed under the GNU Lesser General Public License, version 3 or later
- :)
-import module namespace debug="http://jewishliturgy.org/transform/debug"
- at "xmldb:exist:///code/modules/debug.xqm";
-import module namespace jobs="http://jewishliturgy.org/apps/jobs"
- at "xmldb:exist:///code/apps/jobs/modules/jobs.xqm";
-
-declare variable $local:task-id external;
-
-declare function local:run-next-task(
- ) {
- if (not(jobs:is-task-running($local:task-id)))
- then
- if (jobs:run($local:task-id))
- then local:run-next-task()
- else ()
- else ()
-};
-
-try {
- debug:debug(
- $debug:info,
- "jobs",
- concat('In background task executive id ', $local:task-id, ' at ', string(current-dateTime()))
- ),
- local:run-next-task()
-}
-catch * {
- debug:debug(
- $debug:warn,
- "jobs",
- (
- 'EXCEPTION IN BG-RUN-TASK: ',
- debug:print-exception($err:module, $err:line-number, $err:column-number, $err:code, $err:value, $err:description)
- )
- )
-}
diff --git a/code/apps/jobs/queries/bg-schedule-cache.xql b/code/apps/jobs/queries/bg-schedule-cache.xql
deleted file mode 100644
index acda993c..00000000
--- a/code/apps/jobs/queries/bg-schedule-cache.xql
+++ /dev/null
@@ -1,63 +0,0 @@
-xquery version "3.0";
-(:~ task to find uncached resources and schedule the background
- : task to execute them
- :
- : Copyright 2011-2012 Efraim Feinstein
- : Licensed under the GNU Lesser General Public License, version 3 or later
- :)
-import module namespace jcache="http://jewishliturgy.org/modules/cache"
- at "xmldb:exist:///code/modules/cache-controller.xqm";
-import module namespace jobs="http://jewishliturgy.org/apps/jobs"
- at "xmldb:exist:///code/apps/jobs/modules/jobs.xqm";
-import module namespace magic="http://jewishliturgy.org/magic"
- at "xmldb:exist:///code/magic/magic.xqm";
-import module namespace debug="http://jewishliturgy.org/transform/debug"
- at "xmldb:exist:///code/modules/debug.xqm";
-
-declare namespace tei="http://www.tei-c.org/ns/1.0";
-
-declare variable $local:task-id external;
-
-declare variable $local:excluded-collections := concat("(",
- string-join(
- ("/output/","/trash/","/template.xml$"),
- ")|("),
- ")");
-
-try {
- debug:debug(
- $debug:info,
- "jobs",
- concat('In uncached resource scheduler at ', string(current-dateTime()))
- ),
- let $documents :=
- system:as-user('admin', $magic:password,
- (collection('/group')|collection('/code'))/tei:TEI/document-uri(root(.))
- )
- for $document in $documents
- let $doc := replace($doc, '^http://localhost(:\d+)?(/db)?','/db')
- where
- not(matches($doc, $local:excluded-collections)) and
- not(system:as-user('admin', $magic:password, jcache:is-up-to-date($doc)))
- return
- jobs:enqueue-unique(
- element jobs:job {
- element jobs:run {
- element jobs:query { 'xmldb:exist:///code/apps/jobs/queries/bg-cache.xql' },
- element jobs:param {
- element jobs:name { 'resource' },
- element jobs:value { $doc }
- }
- }
- },
- 'admin', $magic:password
- )
-}
-catch * {
- debug:debug($debug:warn,
- "jobs",
- ('Error in cache scheduler: ',
- debug:print-exception($err:module, $err:line-number, $err:column-number, $err:code, $err:value, $err:description)
- )
- )
-}
diff --git a/code/apps/jobs/queries/nothing.xql b/code/apps/jobs/queries/nothing.xql
deleted file mode 100644
index 2129bbe3..00000000
--- a/code/apps/jobs/queries/nothing.xql
+++ /dev/null
@@ -1,5 +0,0 @@
-xquery version "1.0";
-
-declare variable $local:task-id external;
-
-util:log-system-out(("Testing scheduler at ", current-dateTime(), " id=", $local:task-id))
diff --git a/code/apps/lib/bibliography.xqm b/code/apps/lib/bibliography.xqm
deleted file mode 100644
index 152496ec..00000000
--- a/code/apps/lib/bibliography.xqm
+++ /dev/null
@@ -1,340 +0,0 @@
-(: Bibliography controls
- : Open Siddur Project
- : Copyright 2010 Efraim Feinstein
- : Released under the GNU Lesser General Public License, ver 3 or later
- : $Id: bibliography.xqm 687 2011-01-23 23:36:48Z efraim.feinstein $
- :)
-xquery version "1.0";
-module namespace bibliography="http://jewishliturgy.org/apps/lib/bibliography";
-
-declare namespace xf="http://www.w3.org/2002/xforms";
-declare namespace tei="http://www.tei-c.org/ns/1.0";
-declare namespace ev="http://www.w3.org/2001/xml-events";
-declare namespace xs="http://www.w3.org/2001/XMLSchema";
-declare namespace xrx="http://jewishliturgy.org/ns/xrx";
-
-import module namespace controls="http://jewishliturgy.org/apps/lib/controls"
- at "../lib/controls.xqm";
-import module namespace paths="http://jewishliturgy.org/apps/lib/paths"
- at "../lib/paths.xqm";
-
-declare variable $bibliography:prototype :=
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- ;
-
-(:~ Entry for a single bibliography instance :)
-declare function bibliography:individual-entry-instance(
- $instance-id as xs:string)
- as element()+ {
- (
-
- {
- $bibliography:prototype
- }
- ,
- controls:ordered-list-instance(concat($instance-id,'-author'), ),
- controls:ordered-list-instance(concat($instance-id,'-editor'), ),
- controls:ordered-list-instance(concat($instance-id,'-title'),
-
-
-
- )
- )
-};
-
-(:~ bindings for when the list and individual entries are the same :)
-declare function bibliography:individual-entry-bindings(
- $instance-id as xs:string,
- $conditions as xs:string)
- as element(xf:bind)+ {
- bibliography:individual-entry-bindings($instance-id, $instance-id, $conditions)
-};
-
-(:~ bindings for an individual bibliography entry
- : @param $instance-id instance where individual entry is stored (may be the same as $list-instance-id)
- : @param $list-instance-id instance where list of entries is stored
- : @param $conditions predicate indicating what entries should be included :)
-declare function bibliography:individual-entry-bindings(
- $instance-id as xs:string,
- $list-instance-id as xs:string,
- $conditions as xs:string)
- as element(xf:bind)+ {
- (
- ,
- ,
- ,
- ,
- ,
- ,
- ,
- ,
- ,
-
- )
-};
-
-(:~ Individual entry GUI
- : @param $instance-id Instance that this entry will represent
- : @param $control-id control identifier
- : @param $ref Reference to what this entry will fill in (empty if current context) :)
-declare function bibliography:individual-entry-gui(
- $instance-id as xs:string,
- $control-id as xs:string,
- $ref as xs:string?
- )
- as element(xf:group) {
-
- {if ($ref)
- then attribute ref {$ref}
- else () }
-
- The convention for record IDs is to use the name of the first author or editor
- followed by the year of publication (eg, Baer1901).
- If the publisher is better known or the work is anonymous, use the publisher's name
- followed by publication year (eg, JPS1917).
- If the above are not possible, use all or part of the book's main title, followed by publication year.
- Must begin with an alphabetic letter.
- Spaces are not allowed, and should be replaced with underscores (_).
-
-
- Record id:
- The record ID is required and must be unique among all other record IDs. See hint.
-
-
-
- {controls:ordered-list-ui(
- concat($instance-id,'-author'),
- concat($control-id,'-author'),
- 'Authors',"tei:monogr/tei:author",
-
- Author:
- Author of the book, including roles followed by first names then surname (eg, Rabbi Bahya ibn Pekuda).
- ,
- "self::tei:author")
- }
-
-
- {controls:ordered-list-ui(
- concat($instance-id, '-editor'),
- concat($control-id,'-editor'),
- 'Editors',
- "tei:monogr/tei:editor",
-
- Editor:
- Editor of the book, roles followed by first names then surname (eg, Rabbi Dr. Seligmann Baer).
- ,
- "self::tei:editor"
- )
- }
-
-
-
-
-
-
-};
-
-let $form :=
-
-
- Open Siddur Transliterator Demo
-
- {local:translit-instance('translit')}
- {((: force Firefox to include namespace nodes :))}
-
-
-
-
-
-
-
-
-
-
-
-
- Transliteration error. Make sure all required fields are filled in.
- Error code:
- Error message:
-
-
-
-
-
-
-
-
-
Open Siddur Transliteration Demo
-
-
This is a demo of the Open Siddur automated transliterator.
-
-
Be aware of the following known issues:
-
-
All Hebrew text must be in Unicode encoding and all vowels must be written correctly.
- The transliterator is not tolerant of spelling mistakes.
-
The transliterator is sensitive to the presence of the Unicode qamats qatan:
- כָּל will transliterate incorrectly,
- כׇּל will transliterate correctly.
-
The transliterator is sensitive to the presence of the Unicode holam haser for vav:
- מִצְוֹת will transliterate incorrectly,
- מִצְוֺת will transliterate correctly.
- {bibliography:list-gui(
- concat($instance-id,'-bibliography-list'),
- concat($instance-id,'-bibliography-list-gui'))}
-
- Save changes to bibliography
-
-
-
-
-
-};
\ No newline at end of file
diff --git a/code/apps/upload/categorize-gui.xqm b/code/apps/upload/categorize-gui.xqm
deleted file mode 100644
index 89417d9d..00000000
--- a/code/apps/upload/categorize-gui.xqm
+++ /dev/null
@@ -1,84 +0,0 @@
-xquery version "1.0";
-(: cat-gui.xqm
- : Categorization forms and GUI controls
- : Copyright 2010 Efraim Feinstein
- : Licensed under the GNU Lesser General Public License, version 3 or later
- : $Id: categorize-gui.xqm 687 2011-01-23 23:36:48Z efraim.feinstein $
- :)
-module namespace catgui="http://jewishliturgy.org/apps/upload/catgui";
-
-declare namespace tei="http://www.tei-c.org/ns/1.0";
-declare namespace xrx="http://jewishliturgy.org/ns/xrx";
-declare namespace xf="http://www.w3.org/2002/xforms";
-declare namespace ev="http://www.w3.org/2001/xml-events";
-declare namespace xs="http://www.w3.org/2001/XMLSchema";
-declare option exist:serialize "method=xhtml media-type=text/xml indent=no process-pi-xsl=no";
-
-import module namespace controls="http://jewishliturgy.org/apps/lib/controls"
- at "../lib/controls.xqm";
-import module namespace paths="http://jewishliturgy.org/apps/lib/paths"
- at "../lib/paths.xqm";
-
-declare variable $catgui:prototype :=
-
-
-
-
-
- ;
- (: also includes written-files :)
-
-declare function catgui:cat-instance(
- $instance-id as xs:string)
- as element()+ {
- (
-
- {$catgui:prototype}
- ,
-
- ,
-
-
-
- START NEW TRANSLATION
-
-
- ,
- ,
- ,
- ,
-
- )
-};
-
-declare function catgui:cat-gui(
- $instance-id as xs:string,
- $control-id as xs:string)
- as element()+ {
-
-
- Check this box if the transcription is an original text (not a translation)
-
-
- {controls:language-selector-ui("transcription-language",
- "Main language of the transcription: ", "language")}
-
-
- What is the name of the translation?
-
-
-
-
-
-
- New translation name:
-
-
-
-};
\ No newline at end of file
diff --git a/code/apps/upload/contrib-gui.xqm b/code/apps/upload/contrib-gui.xqm
deleted file mode 100644
index 6a7cf4f5..00000000
--- a/code/apps/upload/contrib-gui.xqm
+++ /dev/null
@@ -1,74 +0,0 @@
-xquery version "1.0";
-(: contrib-gui.xqm
- : Contributor addition GUI controls
- : Copyright 2010 Efraim Feinstein
- : Licensed under the GNU Lesser General Public License, version 3 or later
- : $Id: contrib-gui.xqm 687 2011-01-23 23:36:48Z efraim.feinstein $
- :)
-module namespace contribgui="http://jewishliturgy.org/apps/upload/contribgui";
-
-declare namespace tei="http://www.tei-c.org/ns/1.0";
-declare namespace xrx="http://jewishliturgy.org/ns/xrx";
-declare namespace xf="http://www.w3.org/2002/xforms";
-declare namespace ev="http://www.w3.org/2001/xml-events";
-declare namespace xs="http://www.w3.org/2001/XMLSchema";
-declare option exist:serialize "method=xhtml media-type=text/xml indent=no process-pi-xsl=no";
-
-import module namespace controls="http://jewishliturgy.org/apps/lib/controls"
- at "../lib/controls.xqm";
-import module namespace contributors="http://jewishliturgy.org/apps/lib/contributors"
- at "../lib/contributors.xqm";
-import module namespace paths="http://jewishliturgy.org/apps/lib/paths"
- at "../lib/paths.xqm";
-
-
-declare function contribgui:contrib-instance(
- $instance-id as xs:string)
- as element()+ {
- (
-
-
-
-
-
- ,
- contributors:list-instance('contributors-list'),
- ,
- ,
- ,
- ,
-
- )
-};
-
-declare function contribgui:contrib-gui(
- $instance-id as xs:string,
- $control-id as xs:string)
- as element()+ {
-
-
Written files
-
The following files were successfully generated:
-
-
-
-
-
-
-
Unknown contributors
-
The following identifiers identify unknown contributors.
- Before entering data into the database, all contributors must be
- properly identified, either by a real name (preferable) or by an
- Internet pseudonym.
-
-};
\ No newline at end of file
diff --git a/code/apps/upload/correction-gui.xqm b/code/apps/upload/correction-gui.xqm
deleted file mode 100644
index 6ad27fee..00000000
--- a/code/apps/upload/correction-gui.xqm
+++ /dev/null
@@ -1,81 +0,0 @@
-xquery version "1.0";
-(: correction-gui.xqm
- : Correction GUI controls
- : Copyright 2010 Efraim Feinstein
- : Licensed under the GNU Lesser General Public License, version 3 or later
- : $Id: correction-gui.xqm 687 2011-01-23 23:36:48Z efraim.feinstein $
- :)
-module namespace corrgui="http://jewishliturgy.org/apps/upload/corrgui";
-
-declare namespace tei="http://www.tei-c.org/ns/1.0";
-declare namespace xrx="http://jewishliturgy.org/ns/xrx";
-declare namespace xf="http://www.w3.org/2002/xforms";
-declare namespace ev="http://www.w3.org/2001/xml-events";
-declare namespace xs="http://www.w3.org/2001/XMLSchema";
-declare option exist:serialize "method=xhtml media-type=text/xml indent=no process-pi-xsl=no";
-
-import module namespace controls="http://jewishliturgy.org/apps/lib/controls"
- at "../lib/controls.xqm";
-import module namespace licensegui="http://jewishliturgy.org/apps/upload/licensegui"
- at "license-gui.xqm";
-import module namespace namegui="http://jewishliturgy.org/apps/upload/namegui"
- at "name-gui.xqm";
-import module namespace paths="http://jewishliturgy.org/apps/lib/paths"
- at "../lib/paths.xqm";
-import module namespace scangui="http://jewishliturgy.org/apps/upload/scangui"
- at "scangui.xqm";
-
-declare function corrgui:correction-css()
- as xs:string {
- '.textarea textarea {
- font-family: Courier, sans-serif;
- height: 20em;
- width: 90%;
- }'
-};
-
-declare function corrgui:correction-instance(
- $instance-id as xs:string,
- $initial-text as xs:string)
- as element()+ {
- (
-
-
-
-
- {$licensegui:default-license}
- {$namegui:default-index-name}
-
- true
-
-
- {$initial-text}
-
-
- ,
- ,
-
- )
-};
-
-declare function corrgui:correction-ui(
- $instance-id as xs:string,
- $control-id as xs:string)
- as element()+ {
-
-
Correct and enhance the text
-
-
Remove all text that should not be in this file.
-
Do not remove {{contrib}} and {{page}} tags that come before pages that
- contain text for your new files.
-
Add {{file "Title" "Filename.xml"}} tags wherever the XML should be split
- into multiple files. If the file split occurs at a page boundary, place the new
- file tag before the {{p. NNN}} and {{contrib ...}} tags.
-
-
-
- Correct text:
-
-
-
-};
\ No newline at end of file
diff --git a/code/apps/upload/do-convert-to-xml.xql b/code/apps/upload/do-convert-to-xml.xql
deleted file mode 100644
index 87403948..00000000
--- a/code/apps/upload/do-convert-to-xml.xql
+++ /dev/null
@@ -1,168 +0,0 @@
-xquery version "1.0";
-(: do-wiki-import.xql
- : Take a corrected imported text and convert it to first-pass XML
- : Requires login
- : Open Siddur Project
- : Copyright 2010 Efraim Feinstein
- : Licensed under the GNU Lesser General Public License, version 3 or later
- : $Id: do-convert-to-xml.xql 709 2011-02-24 06:37:44Z efraim.feinstein $
- :)
-declare namespace tei="http://www.tei-c.org/ns/1.0";
-declare namespace xs="http://www.w3.org/2001/XMLSchema";
-declare namespace err="http://jewishliturgy.org/apps/errors";
-declare option exist:serialize "method=xml media-type=text/xml";
-declare option exist:output-size-limit "500000"; (: 50x larger than default :)
-
-import module namespace app="http://jewishliturgy.org/ns/functions/app";
-import module namespace contributors="http://jewishliturgy.org/apps/lib/contributors"
- at "../lib/contributors.xqm";
-import module namespace paths="http://jewishliturgy.org/apps/lib/paths"
- at "../lib/paths.xqm";
-
-declare function local:write-output-files(
- $output-files as element(result-document)+) as element(written-files) {
- let $user := app:auth-user()
- let $user-collection := xmldb:get-user-home($user)
- return
- {
- for $output in $output-files
- return
- let $fname := string($output/@href)
- return
- if(xmldb:store($user-collection, $fname, $output/*))
- then {$fname}
- else error(xs:QName('err:STORAGE'),concat('Cannot store ', $fname))
- }
-};
-
-declare function local:unknown-contributors(
- $contributors-index as element(result-document))
- as element(unknown-contributors) {
- let $contributors-file := '/db/group/everyone/contributors/contributors.xml'
- let $contributors :=
- if (doc-available($contributors-file))
- then doc($contributors-file)
- else ()
- return (
- util:log-system-out(('unknown-contributors', $contributors-index)),
- {
- for $contributor in $contributors-index//@xml:id
- return (
- util:log-system-out(('contributor: ', string($contributor))),
- (
- if ($contributors/id(string($contributor)))
- then ()
- else
- {(
- attribute xml:id {string($contributor)},
- $contributors:prototype/*)
- }
- )
- )
- }
- )
-};
-
-let $logged-in := app:authenticate() or
- error(xs:QName('err:NOT_LOGGED_IN'), 'You must be logged in.')
-let $user-collection :=
- if ($logged-in)
- then xmldb:get-user-home(app:auth-user())
- else ''
-let $resource-name := 'upload.txt'
-let $upload-path :=
- concat($paths:rest-prefix, $user-collection, '/', $resource-name)
-let $path-to-grammar-xslt :=
- concat(
- $paths:rest-prefix,
- '/db/code/input-conversion/rawtext/rt-grammar.xsl2'
- )
-let $path-to-xslt := concat(
- $paths:rest-prefix,
- '/db/code/input-conversion/rawtext/rawtext.xsl2'
- )
-let $data := request:get-data()
-let $text := string($data/text)
-let $bibl-name := string($data/bibliography)
-let $index-name := concat(string(($data/index-name,'index')[1]),'.xml')
-let $facsimile-prefix := '/scans/'
-let $facsimile-extension := '.jpg'
-let $grammar-xslt :=
-
-
-
-
-
-
-
-
-
-
-let $xslt :=
- (: eXist's parameters function does not know about parameter types,
- : and makes them all strings. This XSLT passes parameters with types :)
-
-
-
-
-
-
-
-
-
- {if ($data/has-facsimile = 'true')
- then (
- ,
-
- )
- else
-
- }
-
-
-
-
-
-
-let $stored :=
- (
- xmldb:store($user-collection, $resource-name, $text, 'text/plain')
- )
-let $grammar-transformed :=
- if ($stored)
- then
- (
- util:log-system-out(('Document stored.')) ,
- transform:transform(, $grammar-xslt, ())
- )
- else
- error(xs:QName('err:STORAGE'), 'Cannot store the text.')
-let $transformed :=
- if ($grammar-transformed/r:remainder)
- then
- error(xs:QName('err:GRAMMAR'), 'Error in grammar parsing.')
- else (
- util:log-system-out('Grammar parsed successfully'),
- transform:transform($grammar-transformed, $xslt, ())
- )
-return (
- if (exists($transformed))
- then
- {(
- local:write-output-files($transformed),
- local:unknown-contributors($transformed[@href=concat($user-collection,'/contributors.xml')])
- )}
- else error(xs:QName('err:TRANSFORM'), 'Error transforming text.')
- )
diff --git a/code/apps/upload/do-submit-contributors.xql b/code/apps/upload/do-submit-contributors.xql
deleted file mode 100644
index b0348644..00000000
--- a/code/apps/upload/do-submit-contributors.xql
+++ /dev/null
@@ -1,51 +0,0 @@
-xquery version "1.0";
-(: do-submit-contributors.xql
- : Submit the corrections to the contributor list, return
- : a template for the categorization step
- : Requires login
- : Open Siddur Project
- : Copyright 2010 Efraim Feinstein
- : Licensed under the GNU Lesser General Public License, version 3 or later
- : $Id: do-submit-contributors.xql 687 2011-01-23 23:36:48Z efraim.feinstein $
- :)
-declare namespace tei="http://www.tei-c.org/ns/1.0";
-declare namespace xs="http://www.w3.org/2001/XMLSchema";
-declare namespace err="http://jewishliturgy.org/apps/errors";
-declare option exist:serialize "method=xml media-type=text/xml";
-declare option exist:output-size-limit "500000"; (: 50x larger than default :)
-
-import module namespace app="http://jewishliturgy.org/ns/functions/app";
-import module namespace catgui="http://jewishliturgy.org/apps/upload/catgui"
- at "categorize-gui.xqm";
-import module namespace contributors="http://jewishliturgy.org/apps/lib/contributors"
- at "../lib/contributors.xqm";
-import module namespace paths="http://jewishliturgy.org/apps/lib/paths"
- at "../lib/paths.xqm";
-import module namespace savecontrib="http://jewishliturgy.org/apps/contributors/save"
- at "../contributors/save.xqm";
-
-let $logged-in := app:authenticate() or
- error(xs:QName('err:NOT_LOGGED_IN'), 'You must be logged in.')
-let $data := request:get-data()
-let $unknown-contribs := $data/unknown-contributors/tei:item
-let $mini-contributor-list :=
- if ($unknown-contribs)
- then
- {
- $unknown-contribs
- }
- else ()
-let $saved :=
- empty($unknown-contribs) or
- savecontrib:save($mini-contributor-list, 'append')
-return (
- if ($saved)
- then (
- {
- $catgui:prototype/*,
- $data/written-files
- }
- )
- else
- error(xs:QName('err:SAVING'), 'Error saving new contributors.')
- )
\ No newline at end of file
diff --git a/code/apps/upload/do-upload.xql b/code/apps/upload/do-upload.xql
deleted file mode 100644
index 5c07cafc..00000000
--- a/code/apps/upload/do-upload.xql
+++ /dev/null
@@ -1,48 +0,0 @@
-xquery version "1.0";
-(: do-upload.xql
- : Enter data into db /data hierarchy
- : Open Siddur Project
- : Copyright 2010 Efraim Feinstein
- : Licensed under the GNU Lesser General Public License, version 3 or later
- : $Id: do-upload.xql 709 2011-02-24 06:37:44Z efraim.feinstein $
- :)
-import module namespace app="http://jewishliturgy.org/ns/functions/app";
-
-declare namespace xs="http://www.w3.org/2001/XMLSchema";
-declare namespace err="http://jewishliturgy.org/apps/errors";
-
-declare option exist:serialize "method=xml media-type=text/xml";
-
-let $logged-in := app:authenticate() or
- error(xs:QName('err:NOT_LOGGED_IN'),'You must be logged in.')
-let $user-name := app:auth-user()
-let $data := request:get-data()
-let $translation-name :=
- if (starts-with($data/translation-name, 'START NEW'))
- then $data/new-translation-name
- else $data/translation-name
-let $dest-collection := string-join((
- '/db/data/incoming/',
- $data/language,
- if ($data/is-original = 'true')
- then '/original'
- else (
- '/translation/',
- $translation-name
- )
- ),'')
-let $file-list := $data/written-files/file
-return (
- util:log-system-out(('file-list = ', $file-list)),
- app:make-collection-path($dest-collection, '/', 'admin','everyone',util:base-to-integer(0775,8)),
- for $file in $file-list
- let $collection := util:collection-name(string($file))
- let $resource := util:document-name(string($file))
- where not($resource = ('index.xml','contributors.xml'))
- return (
- util:log-system-out(('data = ', $data, ' collection = ', $collection, ' resource = ', $resource, ' dest-collection=', $dest-collection)),
- xmldb:copy($collection, $dest-collection, $resource),
- xmldb:set-resource-permissions($dest-collection, $resource, 'admin', 'everyone', util:base-to-integer(0775,8))
- ),
- $data
-)
diff --git a/code/apps/upload/do-wiki-import.xql b/code/apps/upload/do-wiki-import.xql
deleted file mode 100644
index 62afbcbc..00000000
--- a/code/apps/upload/do-wiki-import.xql
+++ /dev/null
@@ -1,50 +0,0 @@
-xquery version "1.0";
-(: do-wiki-import.xql
- : Import text from the wiki
- : Open Siddur Project
- : Copyright 2010 Efraim Feinstein
- : Licensed under the GNU Lesser General Public License, version 3 or later
- : $Id: do-wiki-import.xql 687 2011-01-23 23:36:48Z efraim.feinstein $
- :)
-declare option exist:serialize "method=xml media-type=text/xml";
-declare option exist:output-size-limit "500000"; (: 10x larger than default :)
-
-import module namespace wiki="http://jewishliturgy.org/apps/lib/wiki"
- at "../lib/wiki.xqm";
-import module namespace namegui="http://jewishliturgy.org/apps/upload/namegui"
- at "name-gui.xqm";
-import module namespace scangui="http://jewishliturgy.org/apps/upload/scangui"
- at "scangui.xqm";
-
-let $incoming-text as xs:string := wiki:from-post()
-return
- let $return-val :=
-
-
- {
- (: try to guess the primary language of the text :)
- let $en-chars := string-length(replace($incoming-text, '[\P{IsBasicLatin}]','','s'))
- let $he-chars := string-length(replace($incoming-text, '[\P{IsHebrew}]','','s'))
- return
- if ($en-chars > $he-chars)
- then 'en'
- else 'he'
- }
- {
- (: try to guess the license, default to cc0 :)
- if (matches($incoming-text, 'ShareAlike', 's'))
- then 'cc-by-sa'
- else if (matches($incoming-text, 'Attribution', 's'))
- then 'cc-by'
- else 'cc0'
- }
- {$namegui:default-index-name}
-
- true
-
-
- {$incoming-text}
-
-
- return
- (util:log-system-out($return-val), $return-val)
\ No newline at end of file
diff --git a/code/apps/upload/license-gui.xqm b/code/apps/upload/license-gui.xqm
deleted file mode 100644
index 01b996dd..00000000
--- a/code/apps/upload/license-gui.xqm
+++ /dev/null
@@ -1,54 +0,0 @@
-xquery version "1.0";
-(: license-gui.xqm
- : License chooser GUI. Assumes the existence of an instance with a license element.
- : Copyright 2010 Efraim Feinstein
- : Licensed under the GNU Lesser General Public License, version 3 or later
- : $Id: license-gui.xqm 687 2011-01-23 23:36:48Z efraim.feinstein $
- :)
-module namespace licensegui="http://jewishliturgy.org/apps/upload/licensegui";
-
-declare namespace tei="http://www.tei-c.org/ns/1.0";
-declare namespace xrx="http://jewishliturgy.org/ns/xrx";
-declare namespace xf="http://www.w3.org/2002/xforms";
-declare namespace ev="http://www.w3.org/2001/xml-events";
-declare namespace xs="http://www.w3.org/2001/XMLSchema";
-declare option exist:serialize "method=xhtml media-type=text/xml indent=no process-pi-xsl=no";
-
-declare variable $licensegui:default-license := 'cc0';
-declare variable $licensegui:supported-licenses
- as element(xf:item)+ := (
-
- Creative Commons Zero/Public Domain
- cc0
- ,
-
- Creative Commons Attribution 3.0 Unported
- cc-by
- ,
-
- Creative Commons Attribution-ShareAlike 3.0 Unported
- cc-by-sa
-
- );
-
-declare function licensegui:license-instance(
- $instance-id as xs:string)
- as element()+ {
- (
-
- )
-};
-
-declare function licensegui:license-ui(
- $instance-id as xs:string,
- $control-id as xs:string)
- as element()+ {
-
-
- Choose the license that the text is released under.
- If the license requires attribution,
- make sure that the {{contrib}} tags reflect the correct attributions in the next step.
- {$licensegui:supported-licenses}
-
-
-};
\ No newline at end of file
diff --git a/code/apps/upload/list-translations.xql b/code/apps/upload/list-translations.xql
deleted file mode 100644
index eaae9e65..00000000
--- a/code/apps/upload/list-translations.xql
+++ /dev/null
@@ -1,15 +0,0 @@
-xquery version "1.0";
-(: list-translations.xql
- : List available translations
- : Open Siddur Project
- : Copyright 2010 Efraim Feinstein
- : Licensed under the GNU Lesser General Public License, version 3 or later
- : $Id: list-translations.xql 687 2011-01-23 23:36:48Z efraim.feinstein $
- :)
-import module namespace dataman="http://jewishliturgy.org/ns/functions/dataman";
-
-declare namespace tei="http://www.tei-c.org/ns/1.0";
-
-declare option exist:serialize "method=xml media-type=text/xml";
-
-(dataman:list-translations(), )[1]
\ No newline at end of file
diff --git a/code/apps/upload/name-gui.xqm b/code/apps/upload/name-gui.xqm
deleted file mode 100644
index da477117..00000000
--- a/code/apps/upload/name-gui.xqm
+++ /dev/null
@@ -1,53 +0,0 @@
-xquery version "1.0";
-(: correction-gui.xqm
- : Correction GUI controls
- : Copyright 2010 Efraim Feinstein
- : Licensed under the GNU Lesser General Public License, version 3 or later
- : $Id: name-gui.xqm 687 2011-01-23 23:36:48Z efraim.feinstein $
- :)
-module namespace namegui="http://jewishliturgy.org/apps/upload/namegui";
-
-declare namespace tei="http://www.tei-c.org/ns/1.0";
-declare namespace xrx="http://jewishliturgy.org/ns/xrx";
-declare namespace xf="http://www.w3.org/2002/xforms";
-declare namespace ev="http://www.w3.org/2001/xml-events";
-declare namespace xs="http://www.w3.org/2001/XMLSchema";
-declare option exist:serialize "method=xhtml media-type=text/xml indent=no process-pi-xsl=no";
-
-
-declare variable $namegui:default-index-name := 'index';
-
-declare function namegui:name-instance(
- $instance-id as xs:string)
- as element()+ {
- (
- ,
-
- )
-};
-
-declare function namegui:name-ui(
- $instance-id as xs:string,
- $control-id as xs:string)
- as element()+ {
-
-
If this entry includes data that will be split into multiple XML files,
- a single file that represents the entire content will also be generated.
- This "index" file should have a name that represents the content well,
- and is readable to a human. For entire books, it should be the name of the book.
- A .xml extension will be added to it automatically. Please do not use
- spaces in the book file name. Underscores (_) may be substituted for spaces.
- will contain pointers to all of them.
-
- Index file name:
- .xml
-
-
The index title is a human-readable title for all the content.
- It may contain any characters, including spaces. For entire books, it should be
- the name of the book. For sections of the prayer service, the incipit or
- a well-known section name (eg, "Amidah") may be used.
-
- Index title:
-
-
-};
\ No newline at end of file
diff --git a/code/apps/upload/scangui.xqm b/code/apps/upload/scangui.xqm
deleted file mode 100644
index 87171b11..00000000
--- a/code/apps/upload/scangui.xqm
+++ /dev/null
@@ -1,107 +0,0 @@
-xquery version "1.0";
-(: scangui.xqm
- : Scan selection GUI controls
- : Copyright 2010 Efraim Feinstein
- : Licensed under the GNU Lesser General Public License, version 3 or later
- : $Id: scangui.xqm 687 2011-01-23 23:36:48Z efraim.feinstein $
- :)
-module namespace scangui="http://jewishliturgy.org/apps/upload/scangui";
-
-import module namespace paths="http://jewishliturgy.org/apps/lib/paths"
- at "../lib/paths.xqm";
-
-declare namespace tei="http://www.tei-c.org/ns/1.0";
-declare namespace xrx="http://jewishliturgy.org/ns/xrx";
-declare namespace xf="http://www.w3.org/2002/xforms";
-declare namespace ev="http://www.w3.org/2001/xml-events";
-declare namespace xs="http://www.w3.org/2001/XMLSchema";
-declare option exist:serialize "method=xhtml media-type=text/xml indent=no process-pi-xsl=no";
-
-
-declare variable $scangui:default-facsimile-prefix := '/scans/';
-declare variable $scangui:default-facsimile-suffix := '.jpg';
-
-declare function scangui:_get-scan-directory()
- as element(xf:item)* {
- scangui:_get-scan-directory($scangui:default-facsimile-prefix)
-};
-
-declare function scangui:_get-scan-directory(
- $prefix as xs:string)
- as element(xf:item)* {
- let $index-list :=
- httpclient:get(xs:anyURI(
- concat('http://',
- request:get-server-name(), ':', request:get-server-port(),
- $prefix)),
- false(), ())//table/tr[position() > 3]//a[../../td/img/@alt='[DIR]']
- return
- for $dir in $index-list
- let $dir-sl := substring-before($dir, '/')
- let $subdirs := scangui:_get-scan-directory(concat($prefix, '/', $dir))
- return
- (
- for $subdir in $subdirs//xf:value
- let $subdir-str :=
- concat($dir, $subdir)
- return (
-
- {$subdir-str}
- {$subdir-str}
-
- ),
-
- {$dir-sl}
- {$dir-sl}
-
- )
-};
-
-(:~ Instance for scan information. The instance ID should be the same as
- : for the corrections :)
-declare function scangui:scan-instance(
- $instance-id as xs:string)
- as element()+ {
- (
- ,
-
- )
-};
-
-declare function scangui:scan-ui(
- $instance-id as xs:string,
- $control-id as xs:string,
- $next-case as xs:string)
- as element()+ {
-
-
Scan information
-
This section makes the linkage between scan sequence numbers
- and the page numbers in the text.
- If no scans exist because the text was born digital,
-
- click here to skip this step. >>
-
- false
-
-
- .
-
-
-
- If scans do exist, check this box.
-
-
-
-
- Select the directory where scans of the imported content are stored:
- {scangui:_get-scan-directory()}
-
-
-
-
-};
\ No newline at end of file
diff --git a/code/apps/upload/wiki-import.xql b/code/apps/upload/wiki-import.xql
deleted file mode 100644
index 3c9e4983..00000000
--- a/code/apps/upload/wiki-import.xql
+++ /dev/null
@@ -1,350 +0,0 @@
-xquery version "1.0";
-(: wiki-import.xql
- : Wiki import GUI
- : accepts one parameter: ?step=n to specify where to start
- : Copyright 2010 Efraim Feinstein
- : Licensed under the GNU Lesser General Public License, version 3 or later
- : $Id: wiki-import.xql 687 2011-01-23 23:36:48Z efraim.feinstein $
- :)
-import module namespace app="http://jewishliturgy.org/ns/functions/app";
-import module namespace paths="http://jewishliturgy.org/apps/lib/paths"
- at "../lib/paths.xqm";
-import module namespace bibgui="http://jewishliturgy.org/apps/upload/bibgui"
- at "bibgui.xqm";
-import module namespace catgui="http://jewishliturgy.org/apps/upload/catgui"
- at "categorize-gui.xqm";
-import module namespace corrgui="http://jewishliturgy.org/apps/upload/corrgui"
- at "correction-gui.xqm";
-import module namespace contribgui="http://jewishliturgy.org/apps/upload/contribgui"
- at "contrib-gui.xqm";
-import module namespace controls="http://jewishliturgy.org/apps/lib/controls"
- at "../lib/controls.xqm";
-import module namespace licensegui="http://jewishliturgy.org/apps/upload/licensegui"
- at "license-gui.xqm";
-import module namespace login="http://jewishliturgy.org/apps/lib/login"
- at "../lib/login.xqm";
-import module namespace namegui="http://jewishliturgy.org/apps/upload/namegui"
- at "name-gui.xqm";
-import module namespace scangui="http://jewishliturgy.org/apps/upload/scangui"
- at "scangui.xqm";
-import module namespace wiki="http://jewishliturgy.org/apps/lib/wiki"
- at "../lib/wiki.xqm";
-import module namespace wikigui="http://jewishliturgy.org/apps/upload/wikigui"
- at "wikigui.xqm";
-
-declare namespace xf="http://www.w3.org/2002/xforms";
-declare namespace ev="http://www.w3.org/2001/xml-events";
-declare namespace xs="http://www.w3.org/2001/XMLSchema";
-declare option exist:serialize "method=xhtml media-type=text/xml indent=no process-pi-xsl=no";
-
-let $default-start := if (app:auth-user()) then '1' else '0'
-let $start-step :=
- if (request:exists())
- then
- let $asked-for := request:get-parameter('step', $default-start)
- return
- if ($asked-for castable as xs:integer and
- xs:integer($asked-for) >= 1 and xs:integer($asked-for) <= 8)
- then $asked-for
- else $default-start
- else $default-start
-let $form :=
-
-
- Wiki import
-
- {
- wikigui:imports-instance('imports'),
- corrgui:correction-instance('corrections',
- let $user := app:auth-user()
- let $upload-txt :=
- if ($user)
- then concat(xmldb:get-user-home($user), '/upload.txt')
- else ()
- return
- if ($start-step='7' and $upload-txt and util:binary-doc-available($upload-txt) )
- then util:binary-to-string(util:binary-doc($upload-txt))
- else 'Initial text'
- ),
- scangui:scan-instance('corrections'),
- bibgui:bib-instance('corrections'),
- namegui:name-instance('corrections'),
- licensegui:license-instance('corrections'),
- contribgui:contrib-instance('contributors'),
- catgui:cat-instance('categorize')
- }
-
-
-
-
-
-
-
-
- {controls:submit-error-handler-action()}
-
-
-
-
-
-
-
-
- {controls:submit-error-handler-action()}
-
-
-
-
-
-
-
-
- {controls:submit-error-handler-action()}
-
-
-
-
-
-
-
-
- {controls:submit-error-handler-action()}
-
-
-
-
-
-
- {login:form-instance('login')}
-
-
-
-
-
-
-
Wiki import
-
This form provides a GUI for converting transcriptions from the wiki
- to XML in the database. It is a five step process
- {login:form-ui('login')}
-
-
-
-
You must be logged in to import. After you log in successfully, press Next.
-
- Next >>
-
-
-
-
-
-
-
Step 1: Import from wiki
-
-
At this step, you specify what text you want to import from the wiki.
- There are two types of imports:
-
-
Import a single page
-
Import a group of pages that are stored on the wiki in a numbered sequence.
-
-
-
- Choose which type of import you intend to use, and enter all of the information below.
-
-
- If the page you want to import points to a redirect on the wiki, enter the destination of the redirect. The importer will not
- follow a redirect automatically.
-
-
- For imports of numbered sequences, an example URL is shown just below the data entry boxes and
- is updated as you type. This URL should match the URL of the first page on the wiki that you intend to import.
-
-
-
If the imported section is composed of either more than one numbered sequence or more
- than one page, you may insert additional pages by pressing the + button.
- Additional pages may be deleted by pressing -, and their order changed using the
- ▲ and ▼ buttons.
- ),
- (
- site:css(),
-
- ),
- site:header(),
- site:sidebar-with-login($login-instance-id),
- site:footer(),
- uctrl:app-header('app-header', controls:save-status-ui($save-status-instance-id, 'control-save-status', ())))
-)
diff --git a/code/apps/user/index.xql b/code/apps/user/index.xql
deleted file mode 100644
index 8266040c..00000000
--- a/code/apps/user/index.xql
+++ /dev/null
@@ -1,32 +0,0 @@
-xquery version "1.0";
-(: Login UI (mostly a test form for login.xqm)
- : Copyright 2010 Efraim Feinstein
- : Licensed under the GNU Lesser General Public License, version 3 or later
- : $Id: index.xql 688 2011-01-28 20:24:16Z efraim.feinstein $
- :)
-declare namespace xf="http://www.w3.org/2002/xforms";
-declare namespace tei="http://www.tei-c.org/ns/1.0";
-declare namespace ev="http://www.w3.org/2001/xml-events";
-declare namespace xs="http://www.w3.org/2001/XMLSchema";
-declare namespace err="http://jewishliturgy.org/apps/errors";
-declare option exist:serialize "method=xhtml media-type=text/xml indent=no process-pi-xsl=no";
-
-import module namespace user="http://jewishliturgy.org/apps/user"
- at "/code/apps/user/modules/login.xqm";
-import module namespace paths="http://jewishliturgy.org/modules/paths"
- at "../../modules/paths.xqm";
-import module namespace site="http://jewishliturgy.org/modules/site"
- at "../../modules/site.xqm";
-
-let $form :=
- site:form(
-
- {user:login-instance('login')}
- ,
- Login form control,
- (
-
Login form control test
,
- user:login-ui('login','control-login')
- )
- )
-return ($paths:xslt-pi,$paths:debug-pi,$form)
diff --git a/code/apps/user/login.xql b/code/apps/user/login.xql
deleted file mode 100644
index 258728d4..00000000
--- a/code/apps/user/login.xql
+++ /dev/null
@@ -1,80 +0,0 @@
-xquery version "1.0";
-(: login.xql
- : Perform a login or logout action
- : accepts a parameter action=login or action=logout.
- : If a user doesn't exist on the db, but does on the wiki, create the db user
- : Return a login instance for XForms.
- : Licensed under the GNU Lesser General Public License, version 3 or later
- : $Id: login.xql 708 2011-02-24 05:40:58Z efraim.feinstein $
- :)
-declare namespace xs="http://www.w3.org/2001/XMLSchema";
-declare namespace err="http://jewishliturgy.org/apps/errors";
-
-import module namespace util="http://exist-db.org/xquery/util";
-import module namespace xmldb="http://exist-db.org/xquery/xmldb";
-
-import module namespace app="http://jewishliturgy.org/modules/app"
- at "../../modules/app.xqm";
-import module namespace user="http://jewishliturgy.org/modules/user"
- at "../../modules/user.xqm";
-import module namespace wiki="http://jewishliturgy.org/modules/wiki"
- at "../../modules/wiki.xqm";
-
-let $data := request:get-data()
-return
- util:catch('*',
- let $action := request:get-parameter('action','')
- return (
- {
- if ($action = 'login')
- then
- let $name := $data/name
- let $password := $data/password
- let $db-user-exists := xmldb:exists-user($name)
- let $wiki-user-exists := $db-user-exists or wiki:valid-user($name, $password)
- let $user-exists-or-created :=
- $db-user-exists or (
- if (not($db-user-exists) and $wiki-user-exists)
- then user:create($name, $password)='ok'
- else false()
- )
- return
- if ($user-exists-or-created and xmldb:login('/db', $name, $password, true() ))
- then (
- {string($name)},
- {string($name)},
- {string($password)},
- )
- else error(xs:QName('err:LOGIN'), 'Invalid login on wiki and database')
- else if ($action = 'logout')
- then (
- session:invalidate(),
- let $loggedout := xmldb:login('/db','guest','guest', true())
- or error(xs:QName('err:INTERNAL'), 'Cannot log you out by logging in as guest.')
- return (
- ,
- ,
-
- )
- )
- else ((: no action, just copy what we got in or query current login. :)
- let $name := app:auth-user()
- let $password := ()
- return (
- {$name},
- {$name},
- {$password}
- )
- )
- }
-
- ),
- (: result if error :)
-
-
- {string($data/name)}
- {string($data/password)}
- {app:error-message()}
-
-
- )
diff --git a/code/apps/user/modules/login.xqm b/code/apps/user/modules/login.xqm
deleted file mode 100644
index f0bf7adc..00000000
--- a/code/apps/user/modules/login.xqm
+++ /dev/null
@@ -1,187 +0,0 @@
-xquery version "1.0";
-(: Login controls module
- :
- :
- : Copyright 2010-2011 Efraim Feinstein
- : Licensed under the GNU Lesser General Public License, version 3 or later
- : $Id: login.xqm 767 2011-04-28 18:15:42Z efraim.feinstein $
- :)
-module namespace login="http://jewishliturgy.org/apps/user/login";
-
-declare default element namespace "http://www.w3.org/1999/xhtml";
-declare namespace html="http://www.w3.org/1999/xhtml";
-declare namespace xf="http://www.w3.org/2002/xforms";
-declare namespace tei="http://www.tei-c.org/ns/1.0";
-declare namespace ev="http://www.w3.org/2001/xml-events";
-declare namespace xs="http://www.w3.org/2001/XMLSchema";
-
-import module namespace request="http://exist-db.org/xquery/request";
-import module namespace util="http://exist-db.org/xquery/util";
-
-import module namespace app="http://jewishliturgy.org/modules/app" at
- "../../../modules/app.xqm";
-import module namespace paths="http://jewishliturgy.org/modules/paths" at
- "../../../modules/paths.xqm";
-import module namespace controls="http://jewishliturgy.org/modules/controls" at
- "../../../modules/controls.xqm";
-
-
-declare variable $login:view-path := app:concat-path(($paths:prefix, $paths:apps, '/user/login.xql'));
-declare variable $login:login-path := app:concat-path(($paths:prefix, $paths:apps, '/user/login.xql'));
-
-(:~ login instance with no event target :)
-declare function login:login-instance(
- $instance-id as xs:string) {
- login:login-instance($instance-id, ())
-};
-
-(:~ add the login form as an instance in an existing model.
- : The instance will dispatch 'login', 'logout', 'xforms-submit-done' and 'xforms-submit-error'
- : events to the target control(s) $event-target
- :)
-declare function login:login-instance(
- $instance-id as xs:string,
- $event-target as xs:string*)
- as element()+ {
- let $error-instance-id := concat($instance-id, '-error')
- let $validation-error-instance-id := concat($instance-id, '-validation-error')
- let $result-instance-id := concat($instance-id, '-result')
- let $blank-instance-id := concat($instance-id, '-blank')
- let $login-user := app:auth-user()
- return (
-
-
- {$login-user}
- {$login-user}
-
-
- ,
-
-
- ,
-
-
- ,
- controls:error-instance($error-instance-id,
- Login name and password must be filled in.
- ),
- ,
- ,
-
-
- {
- controls:submission-response(
- $error-instance-id,
- $event-target, (
- ,
- ,
- for $e-target in ($event-target)
- return
- ))}
- ,
-
- {
- controls:submission-response(
- $error-instance-id,
- $event-target, (
- ,
- ,
- ,
- ,
- for $e-target in ($event-target)
- return
- ))}
- ,
-
-
- {
- for $e-target in $event-target
- return
-
- }
-
- )
-};
-
-(:~ login form ui, long form
- :)
-declare function login:login-ui(
- $instance-id as xs:string,
- $control-id as xs:string)
- as element() {
- login:login-ui($instance-id, $control-id, true())
-};
-
-(:~ login form UI
- : The short form has fewer explanatory notes, so it is usable in sidebars
- : @param $instance-id Name of the instance
- : @param $control-id Name of the control
- : @param $long-form Use the long form of the login UI (default is true())
- :)
-declare function login:login-ui(
- $instance-id as xs:string,
- $control-id as xs:string,
- $long-form as xs:boolean)
- as element() {
-
- {
- if ($long-form)
- then
- Database login
- else ()
- }
-
-
-
- {
- if ($long-form)
- then (
-
Log in to the database with your user name and password from the
- Open Siddur Project wiki. If you do not yet have a user name, please
- create one and come back here.
-
- ),
- (
- site:css(),
-
- ),
- site:header(),
- site:sidebar-with-login($login-instance-id),
- site:footer())
-)
\ No newline at end of file
diff --git a/code/apps/user/styles/user.css b/code/apps/user/styles/user.css
deleted file mode 100644
index 20301772..00000000
--- a/code/apps/user/styles/user.css
+++ /dev/null
@@ -1,30 +0,0 @@
-/* user profile applications/controls CSS
- * $Id: user.css 696 2011-02-07 02:53:44Z efraim.feinstein $
- */
-@namespace xf url("http://www.w3.org/2002/xforms");
-
-/* formatting rule for all XForms controls elements within a block form. Each input control is on a separate line */
-.block-form .xforms-input,
-.block-form .xforms-secret {
- display: block;
- margin: 1ex;
- clear:right;
- padding-top:0.5ex; /* leave lots of space*/
- padding-bottom:0.5ex; /* leave lots of space*/
-}
-
-/* formatting rule for all labels in a block form */
-.block-form .xforms-label {
- display: inline-block;
- width: 30ex; /* fix the width of all the labels in the block form */
- height: 3ex; /* leave enough room for 2 lines of text in the label */
- float: left;
- text-align: right;
- margin-right: 1ex; /* margin to the right of the label */
-}
-
-.block-form .xforms-submit .xforms-label {
- width:auto;
- text-align:center;
- float:right;
-}
diff --git a/code/apps/version.xml b/code/apps/version.xml
deleted file mode 100644
index 8515b9ad..00000000
--- a/code/apps/version.xml
+++ /dev/null
@@ -1,4 +0,0 @@
-
-
-0.4.5
diff --git a/code/depend.xsl2 b/code/depend.xsl2
deleted file mode 100644
index 3a13dfae..00000000
--- a/code/depend.xsl2
+++ /dev/null
@@ -1,94 +0,0 @@
-
-
-
-
- Processes a stylesheet or a JLPTEI file and finds dependencies.
- $Author: efraim.feinstein $
- $Id: depend.xsl2 189 2009-06-17 00:42:40Z efraim.feinstein $
- Copyright 2008-2009 Efraim Feinstein (LGPL 3+)
-
-
This program is free software: you can redistribute it and/or modify
-it under the terms of the GNU Lesser General Public License as published by
-the Free Software Foundation, either version 3 of the License, or
-(at your option) any later version.
-
This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU Lesser General Public License for more details.
-
You should have received a copy of the GNU Lesser General Public License
- along with this program. If not, see http://www.gnu.org/licenses/.
-
-
-
-
-
-
-
- Follow links to find additional dependencies in TEI files. Returns a sequence of strings
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Find explicitly included files, returns a sequence of strings.
-
-
-
-
-
-
-
-
-
-
-
- Ignore text in depend mode
-
-
-
-
- Process root elements in depend mode (or at start of the file)
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/code/grammar-parser/Makefile b/code/grammar-parser/Makefile
deleted file mode 100755
index d4d07166..00000000
--- a/code/grammar-parser/Makefile
+++ /dev/null
@@ -1,22 +0,0 @@
-# Makefile for documents generated by the grammar parser
-#
-# Assumes that it will be included after the definitions in the top level Makefile
-#
-# Copyright 2008-2010 Efraim Feinstein
-#
-# This program is free software: you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program. If not, see http://www.gnu.org/licenses/
-#
-# $Id: Makefile 687 2011-01-23 23:36:48Z efraim.feinstein $
-GRAMMAR-PARSER-DIR ?= $(CODEDIR)/grammar-parser
-
diff --git a/code/grammar-parser/grammar.xsl2 b/code/grammar-parser/grammar.xsl2
deleted file mode 100644
index a85e956a..00000000
--- a/code/grammar-parser/grammar.xsl2
+++ /dev/null
@@ -1,522 +0,0 @@
-
-
-
-
-
-
- Implements a grammar parser in XSLT 2.0.
- Copyright 2009 Efraim Feinstein (LGPL 3+)
-
-
A "DTD" for grammars is as follows:
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- ]>
- ]]>
-
How it works:
- p:grammar elements generate an XSLT stylesheet.
- p:term elements generate one function each, named by the name of
- the term.
- p:exp, p:expAnon, p:termRef, p:termRefAnon, p:end are the basic
- tests. The templates for these generate tests for the given terms
- or regular expressions, by calling the appropriate function.
- All functions return either:
- (r:{term-name}, r:remainder) if a match is found to the term.
- (r:no-match, r:remainder) if no match is found.
- r:{term name} contains
- Terms may be referenced in grammars by name or anonymously.
- Anonymous references (p:termRefAnon, p:expAnon) create r:anonymous
- instead of r:{term-name}, which can be cleaned from the result
- by r:clean().
-
-
-
This program is free software: you can redistribute it and/or modify
- it under the terms of the GNU Lesser General Public License as published by
- the Free Software Foundation, either version 3 of the License, or
- (at your option) any later version.
-
-
This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU Lesser General Public License for more details.
-
-
You should have received a copy of the GNU Lesser General Public License
- along with this program. If not, see
- http://www.gnu.org/licenses/.
-
-
- $Id: grammar.xsl2 501 2010-05-02 21:25:30Z efraim.feinstein $
-
-
-
- Root element: make a new stylesheet
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- ^{$regex}
-
-
- r:{$result-name}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Call evaluate-group. Leave a set of variables:
- $group-result containing the entire group result,
- $match containing the matching part,
- $no-match containing result of no match,
- $remainder containing the remainder
-
-
-
-
-
-
-
-
-
-
-
- Create a randomly named function for each occurrence of
- zeroOrMore and oneOrMore
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Manage the $previous-remainder, $failed variables,
- return with
- $function-result,
- $match,
- $no-match,
- and $remainder in scope
-
-
-
-
-
-
-
-
-
-
-
-
- Testing ()=[]
-
-
-
-
-
-
-
- Update $remaining-string and $failed,
- add r:remainder term to template return value
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- zeroOrOne is syntactic sugar for
- choice/(empty,*)
-
-
-
-
-
-
-
-
-
-
-
-
- Test a named term. Return:
- r:{term-name}|r:anonymous, r:remainder?
- r:no-match, r:remainder?
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Test an expression. Return either:
- r:{expression-name}|r:anonymous, r:remainder?
- r:no-match, r:remainder?
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Evaluate a group of p:*.
- Return: (r:{term-names}, r:remainder?) or
- (r:no-match, r:remainder?)
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Each term produces a function in the 'r'
- namespace that tests whether the term matches the given string.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/code/grammar-parser/stml-grammar.xml b/code/grammar-parser/stml-grammar.xml
deleted file mode 100644
index 0c7751a6..00000000
--- a/code/grammar-parser/stml-grammar.xml
+++ /dev/null
@@ -1,438 +0,0 @@
-
-
-
-
-
-
- \s+
-
-
-
-
-
-
-
-
-
-
-
- \{
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- \s*\}\s*
-
-
-
-
-
-
-
-
- section\s+
-
-
-
- rem\s+
- [^}]+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- poetry
-
-
- prose
-
-
-
-
-
-
-
-
-
-
-
- \{
-
-
-
-
-
-
-
-
- \s*\}[ \t]*
-
-
-
-
-
- \{
-
-
-
-
- \s*\}
-
-
-
-
-
-
- named\s+["]
- [^"]+
- ["]\s+
-
-
-
-
-
- \{
-
-
-
-
-
-
-
-
-
-
-
-
-
- \s*\}[ \t]*
-
-
- \{
- [^\s\.]+
- \.?\s+
-
- \s*\}
-
-
- title\s+
-
-
-
- file\s+["]
- [^"]+
- ["]
-
- \s+["]
- [^"]+
- ["]
-
-
-
- translit\s+
- \S+
- \s+["]
- [^"]+
- ["]\s*
-
- ["]
- [^"]+
- ["]\s*
-
-
-
- dn\s+
-
-
-
-
- parallel\s+
- ["]
- [^"]
- ["]\s+["]
- [^"]
- ["]\s*
-
-
-
-
-
- \{\s*
-
- ["]
- [^"]+
- ["]\s*
-
- \}\s*=\s*\{
-
- ["]
- [^"]+
- ["]\s*
-
- \}\s*
-
-
- contrib\s+
-
-
- (scanner|author|transcriber|proofreader|editor|encoder)
- \s+
-
-
- ["]
- [^"]+
- ["]\s*
-
-
-
-
- include\s+["]
- [^"]+
- ["]
-
-
- include\s?block\s+["]
- [^"]+
- ["]
-
-
- bible\s+["]
- [^"]+
- ["]
-
-
- bible\s?block\s+["]
- [^"]+
- ["]
-
-
- sic\s+["]
-
- [^"]+
-
- ["]\s+["]
-
- [^"]+
-
- ["]
-
-
- p\.\s+
- [^}]+
-
-
-
- pr[r]?
- \.\s+
- [^}]+
-
-
- ref\s+["]
- [^"]+
- ["]\s+["]
- [^"]+
- ["]\s*
-
-
- (f|footnote\s)p\.\s+
- [^}]+
-
-
- fr\.\s+
- [^}]+
-
-
- fn\.\s+
- [^.]+
- .\s+
-
-
-
-
-
-
-
-
-
- instruct\s+
-
-
-
- note\s+
-
-
-
-
-
-
-
-
-
- (he|hbw|hb)\s+
-
-
-
- cont
-
-
-
-
-
-
-
-
-
-
- [']
-
-
- [ \t]+
-
-
-
-
-
-
-
- [']
-
-
- [ \t]+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- [-]?[^-{}\r\n/:.;,\?<>$|~\\]+
-
-
-
-
-
-
-
- ([.]\s?[.]\s?[.])|[.;,:\?!]|([-][-])
-
-
- [ ]
-
-
-
- \r?\n
-
-
- /
- \d+
- :
- \d+
- \s+
-
-
- \\[\{\}/<>$~|]
-
-
-
-
-
-
-
-
-
-
-
-
- [$]
-
- /[$]
-
-
- [<]
-
- [>]
-
-
- [~]
-
- /[~]
-
-
- [|]
-
- /[|]
-
-
- [<][iI][>]
-
- [<]/[Ii][>]
-
-
- emph\s+
-
-
-
- ~hr
-
-
diff --git a/code/input-conversion/Makefile b/code/input-conversion/Makefile
deleted file mode 100644
index 1a036faf..00000000
--- a/code/input-conversion/Makefile
+++ /dev/null
@@ -1,58 +0,0 @@
-# Makefile for the input-conversion directory.
-#
-# Should have 1 target for each type of input conversion.
-# Assumes that it will be included after the definitions in the top level Makefile
-#
-# Copyright 2008-2012 Efraim Feinstein
-#
-# This program is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Lesser General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Lesser General Public License for more details.
-#
-# You should have received a copy of the GNU Lesser General Public License
-# along with this program. If not, see http://www.gnu.org/licenses/
-#
-
-INPUT-CONVERSION-DIR ?= $(CODEDIR)/input-conversion
-WLC-CONVERSION-DIR ?= $(CODEDIR)/input-conversion/wlc
-WLC-OUTPUT-DIR ?= $(TEXTDIR)/wlc
-STRONGS-CONVERSION-DIR ?= $(CODEDIR)/input-conversion/strongs
-STRONGS-OUTPUT-DIR ?= $(TEXTDIR)/strongs
-
-PATH-TO-SOURCES ?= .
-TANACH-SOURCE-DIR ?= `$(LIBDIR)/absolutize $(TOPDIR)/$(PATH-TO-SOURCES)/sources/tanach/WLC/Books`
-STRONGS-SOURCE ?= $(TOPDIR)/$(PATH-TO-SOURCES)/sources/StrongsDictionary/StrongHebrewG.xml
-
-input-conversion: tanach strongs
-
-input-conversion-clean: tanach-clean strongs-clean
-
-# note: the output file is phony because it goes into a YYYY/MM directory
-tanach: $(WLC-OUTPUT-DIR)/תנ״ך.xml
-
-$(WLC-OUTPUT-DIR)/joined-wlc.xml: $(WLC-CONVERSION-DIR)/join-wlc.xsl2
- $(XSLT) -it main $(WLC-CONVERSION-DIR)/join-wlc.xsl2 input-directory=$(TANACH-SOURCE-DIR) output-file=$(WLC-OUTPUT-DIR)/joined-wlc.xml
-
-$(WLC-OUTPUT-DIR)/תנ״ך.xml: $(WLC-CONVERSION-DIR)/wlc2jlptei.xsl2 $(WLC-OUTPUT-DIR)/joined-wlc.xml $(TANACH-SOURCE)
- $(XSLT) -it main $(WLC-CONVERSION-DIR)/wlc2jlptei.xsl2 input-file=`$(LIBDIR)/absolutize $(WLC-OUTPUT-DIR)/joined-wlc.xml` result-directory=`$(LIBDIR)/absolutize $(WLC-OUTPUT-DIR)`
- rm -f $(WLC-OUTPUT-DIR)/joined-wlc.xml
-
-tanach-clean:
- rm -fr $(WLC-OUTPUT-DIR)
-
-strongs: $(STRONGS-OUTPUT-DIR)/strongs.xml $(STRONGS-OUTPUT-DIR)/strongs-xlit.xml
-
-$(STRONGS-OUTPUT-DIR)/strongs.xml: $(STRONGS-CONVERSION-DIR)/strongs2jlptei.xsl2 $(STRONGS-SOURCE)
- $(XSLT) -s:$(STRONGS-SOURCE) -xsl:$(STRONGS-CONVERSION-DIR)/strongs2jlptei.xsl2 -o:$(STRONGS-OUTPUT-DIR)/strongs.xml
-
-$(STRONGS-OUTPUT-DIR)/strongs-xlit.xml: $(STRONGS-CONVERSION-DIR)/strongs2xlittest.xsl2 $(STRONGS-SOURCE)
- $(XSLT) -s:$(STRONGS-SOURCE) -xsl:$(STRONGS-CONVERSION-DIR)/strongs2xlittest.xsl2 -o:$(STRONGS-OUTPUT-DIR)/strongs-xlit.xml
-
-strongs-clean:
- rm -fr $(STRONGS-OUTPUT-DIR)
diff --git a/code/modules/admin.xqm b/code/modules/admin.xqm
deleted file mode 100644
index 75f55bb7..00000000
--- a/code/modules/admin.xqm
+++ /dev/null
@@ -1,94 +0,0 @@
-xquery version "1.0";
-(: Administrative functions that require the admin password
- : This file should be stored securely and the source containing
- : the correct password should not be released.
- :
- : Copyright 2010-2011 Efraim Feinstein
- : Open Siddur Project
- : Licensed under the GNU Lesser General Public License, version 3 or later
- :
- :)
-
-module namespace admin="http://jewishliturgy.org/modules/admin";
-
-import module namespace magic="http://jewishliturgy.org/magic"
- at "xmldb:exist:///code/magic/magic.xqm";
-
-(: This is fscked up insecure! :)
-declare variable $admin:admin-user as xs:string := 'userman';
-
-(:~ Create a new user in the database :)
-declare function admin:new-user(
- $new-user as xs:string,
- $new-password as xs:string)
- as xs:boolean {
- if (xmldb:exists-user($new-user) or
- string-length($new-user) eq 0)
- then false()
- else
- let $home-collection := concat('/db/group/', $new-user)
- return
- (system:as-user($admin:admin-user, $magic:password, (
- xmldb:create-group($new-user),
- xmldb:create-user($new-user, $new-password,
- ($new-user, 'everyone'), $home-collection),
- xmldb:set-collection-permissions($home-collection, $new-user, $new-user,
- util:base-to-integer(0770, 8))
- )) and true())
-};
-
-(:~ change a user's password :)
-declare function admin:change-password(
- $user-name as xs:string,
- $old-password as xs:string,
- $new-password as xs:string)
- as xs:boolean {
- if (xmldb:authenticate('/db', $user-name, $old-password))
- then (system:as-user($admin:admin-user, $magic:password,
- xmldb:change-user($user-name, $new-password, (), ())), true())
- else false()
-};
-
-(:~ change a user's group memberships. For this function to work:
- : the logged-in user must be a member of all the groups in $new-groups.
- : the user can't be removed from his/her own group
- : $add-groups and $remove-groups can't contradict each other
- : The function either succeeds or fails wholesale
- :
- : @param user-name user whose groups will be changed
- : @param add-groups groups to add
- : @param remove-groups groups to remove membership from
- :)
-declare function admin:change-groups(
- $user-name as xs:string,
- $add-groups as xs:string*,
- $remove-groups as xs:string*)
- as xs:boolean {
- let $user-groups := xmldb:get-user-groups($user-name)
- let $logged-in-user := xmldb:get-current-user()
- let $logged-in-groups := xmldb:get-user-groups($logged-in-user)
- let $allow-add :=
- not(($add-groups, $remove-groups)!=$logged-in-groups)
- and not($add-groups=$remove-groups)
- and not($remove-groups=$user-name)
- return
- if ($allow-add)
- then system:as-user($admin:admin-user, $magic:password,
- xmldb:change-user($user-name, (),
- for $group in ($user-groups,$add-groups[not(.=$user-groups)])
- return if ($group=$remove-groups) then () else $group, ())
- )
- else false()
-};
-
-(:~ reindex the given collection
- : NOTE: this API may not be exposed in future versions.
- : @param $collection collection to reindex
- : @return whether the collection was reindexed successfully.
- :)
-declare function admin:reindex(
- $collection as xs:string
- ) as xs:boolean {
- system:as-user($admin:admin-user, $magic:password,
- xmldb:reindex($collection))
-};
diff --git a/code/modules/app.xqm b/code/modules/app.xqm
deleted file mode 100644
index 110ddb41..00000000
--- a/code/modules/app.xqm
+++ /dev/null
@@ -1,728 +0,0 @@
-xquery version "1.0";
-
-(:~ application-global functions
- :
- : mostly authentication issues.
- :
- : Open Siddur Project
- : Copyright 2010-2012 Efraim Feinstein
- : Licensed under the GNU Lesser General Public License, version 3 or later
- :)
-module namespace app="http://jewishliturgy.org/modules/app";
-
-import module namespace debug="http://jewishliturgy.org/transform/debug"
- at "xmldb:exist:///code/modules/debug.xqm";
-import module namespace paths="http://jewishliturgy.org/modules/paths"
- at "xmldb:exist:///code/modules/paths.xqm";
-import module namespace magic="http://jewishliturgy.org/magic"
- at "xmldb:exist:///code/magic/magic.xqm";
-
-declare namespace exist="http://exist.sourceforge.net/NS/exist";
-declare namespace xsl="http://www.w3.org/1999/XSL/Transform";
-declare namespace err="http://jewishliturgy.org/errors";
-declare namespace tei="http://www.tei-c.org/ns/1.0";
-declare namespace jx="http://jewishliturgy.org/ns/jlp-processor";
-
-(:~ return application version as a string :)
-declare function app:get-version(
- ) as xs:string {
- string(doc('/code/apps/version.xml')/version)
-};
-
-(:~ return decoded authorization string (username, password) or empty
- : This will probe (in the following order)for:
- : HTTP Basic authentication information
- : 'Authorization' session attribute (containing the HTTP-basic like auth string)
- : 'Authorization' session cookie (containing the HTTP-basic-like auth string)
- : 'user' and 'password' request parameters
- : 'Username' and 'password' headers
- :)
-declare function local:get-auth-string() as xs:string* {
- if (request:exists())
- then
- let $authorization := (substring-after(request:get-header('Authorization'),'Basic '))[.]
- cast as xs:base64Binary?
- let $user-name-attribute := session:get-attribute('app.user')[.]
- let $password-attribute := session:get-attribute('app.password')[.]
- let $auth-cookie := request:get-cookie-value('Authorization')[.]
- let $user-name-basic := substring-before(
- util:binary-to-string(($authorization, $auth-cookie)[1]),
- ':')[.]
- let $password-basic := substring-after(
- util:binary-to-string(($authorization, $auth-cookie)[1]),
- ':')[.]
- (: user name and password from the header. BUG workaround: to get around a bug in betterform 3.1, need to take the last
- : comma separated value :)
- let $user-name-hdr := tokenize(request:get-header('Username'),',')[last()][.]
- let $password-hdr := tokenize(request:get-header('Password'),',')[last()][.]
- (: last resort: user name and password from parameters user= and password= :)
- let $user-name-param := request:get-parameter('user',())
- let $password-param := request:get-parameter('password',())
- (: return values :)
- let $username := ($user-name-basic, $user-name-hdr, $user-name-attribute, $user-name-param)[1]
- let $password := ($password-basic, $password-hdr, $password-attribute, $password-param)[1]
- return (
- debug:debug(
- $debug:info,
- "app",
-
- {request:get-uri()}
- {$authorization, exists($authorization)}
- {$user-name-attribute, exists($user-name-attribute)}
- {$auth-cookie, exists($auth-cookie)}
- {$user-name-hdr, $password-hdr, exists($user-name-hdr)}
- {$user-name-param, $password-param, exists($user-name-param)}
-
- {$username}
- {$password}
-
-
- ),
- $username, $password)
- else ()
-};
-
-(:~ generate a uuid that is guaranteed not to collide with any of the
- : strings in $collisions
- : @param $prefix prefix to add before the proposed uuid to make an xml:id
- : @param $root document node from which we need to make the xml:ids unique
- :)
-declare function app:unique-xmlid(
- $prefix as xs:string,
- $root as document-node()
- ) as xs:string {
- let $proposal := concat($prefix, util:uuid())
- let $collisions :=
- for $xmlid in $root//@xml:id
- return string($xmlid)
- return
- if ($proposal = $collisions)
- then app:unique-xmlid($prefix, $root)
- else $proposal
-};
-
-(:~ Authenticate and return authenticated user.
- : HTTP Basic authentication and Username/Password in header takes priority
- : over the logged in user. :)
-declare function app:auth-user()
- as xs:string? {
- (session:get-attribute('app.user'), xmldb:get-current-user()[not(. = 'guest')], local:get-auth-string()[1])[1]
-};
-
-(:~ Return authenticated user's password; only works for HTTP Basic authentication :)
-declare function app:auth-password()
- as xs:string? {
- (session:get-attribute('app.password'), local:get-auth-string()[2])[1]
-};
-
-(:~ Read HTTP headers to determine if the user can be logged in or is already logged in.
- : If so, log in to the resource
- : @return true() on success, false() on failure
- :)
-declare function app:authenticate()
- as xs:boolean {
- let $authorization as xs:string* := local:get-auth-string()
- let $user-name as xs:string? := $authorization[1]
- let $password as xs:string? := $authorization[2]
- let $logged-in as xs:boolean := boolean(xmldb:get-current-user()[not(. = 'guest')])
- return (
- debug:debug(
- $debug:info,
- "app",
- ('authenticate() : get-auth-string is ', $authorization)
- ),
- $logged-in or (
- if ($user-name and $password)
- then (
- xmldb:login('/db', $user-name, $password),
- debug:debug(
- $debug:info,
- "app",
- ('logging you in as :', $user-name)
- )
- )
- else false() )
- )
-};
-
-(:~ specify that authentication (aside from guest) is required
- : to perform any following operations.
- : if the user is not authenticated, return status code 401 with a request for HTTP basic
- : authentication
- :)
-declare function app:require-authentication(
- ) as xs:boolean {
- app:authenticate() or (
- false(),
- if (request:exists())
- then (
- response:set-status-code(401),
- response:set-header('WWW-Authenticate', 'Basic')
- )
- else ()
- )
-};
-
-(: return the db-relative path of the called URI context :)
-declare function app:context-path()
- as xs:string? {
- substring-after(request:get-uri(),
- string-join((request:get-context-path(),request:get-servlet-path()),''))
-};
-
-(: Return the resource in the URI context :)
-declare function app:context-resource()
- as document-node()? {
- let $path := app:context-path()
- return
- if (doc-available($path))
- then doc($path)
- else ()
-};
-
-(:~ make a collection path that does not exist; (like mkdir -p)
- : create new collections with the given mode, owner and group
- : @param $path directory path
- : @param $origin path begins at
- : @param $owner owner user of any new collections
- : @param $group owner group of any new collections
- : @param $mode permissions mode of any new collections
- : @deprecated Replaced by app:make-collection-path(..., $permissions)
- :)
-declare function app:make-collection-path(
- $path as xs:string,
- $origin as xs:string,
- $owner as xs:string,
- $group as xs:string,
- $mode as xs:string)
- as empty() {
- let $origin-sl :=
- if (ends-with($origin, '/'))
- then $origin
- else concat($origin, '/')
- let $path-no-sl :=
- if (starts-with($path, '/'))
- then substring($path, 2)
- else $path
- let $first-part := substring-before($path-no-sl, '/')
- let $second-part := substring-after($path-no-sl, '/')
- let $to-create :=
- if ($first-part)
- then $first-part
- else $path-no-sl
- return
- if ($to-create)
- then
- let $current-col := concat($origin-sl, $to-create)
- return (
- if (xmldb:collection-available($current-col))
- then (
- if ($paths:debug)
- then
- util:log-system-out(($current-col, ' already exists'))
- else ()
- )
- else (
- if ($paths:debug)
- then
- util:log-system-out(($origin-sl, $to-create, ' creating'))
- else (),
- if (xmldb:create-collection($origin-sl, $to-create))
- then (
- sm:chown(xs:anyURI($current-col), $owner),
- sm:chgrp(xs:anyURI($current-col), $group),
- sm:chmod(xs:anyURI($current-col), $mode)
- )
- else error(xs:QName('err:CREATE'), concat('Cannot create collection', $origin-sl, $to-create))
- ),
- if ($second-part)
- then app:make-collection-path($second-part, $current-col, $owner, $group, $mode)
- else ()
- )
- else ()
-};
-
-(:~ make a collection path that does not exist; (like mkdir -p)
- : create new collections with the given mode, owner and group
- : @param $path directory path
- : @param $origin path begins at
- : @param $permissions an sm:permissions document
- :)
-declare function app:make-collection-path(
- $path as xs:string,
- $origin as xs:string,
- $permissions as document-node(element((:sm:permissions:)))
- ) as empty-sequence() {
- let $origin-sl :=
- if (ends-with($origin, '/'))
- then $origin
- else concat($origin, '/')
- let $path-no-sl :=
- if (starts-with($path, '/'))
- then substring($path, 2)
- else $path
- let $first-part := substring-before($path-no-sl, '/')
- let $second-part := substring-after($path-no-sl, '/')
- let $to-create :=
- if ($first-part)
- then $first-part
- else $path-no-sl
- return
- if ($to-create)
- then
- let $current-col := concat($origin-sl, $to-create)
- return (
- if (xmldb:collection-available($current-col))
- then
- debug:debug($debug:detail, "app", ($current-col, ' already exists'))
- else (
- debug:debug($debug:detail, "app", ($origin-sl, $to-create, ' creating')),
- let $path := xmldb:create-collection($origin-sl, $to-create)
- return
- if ($path)
- then app:copy-permissions(xs:anyURI($path),$permissions)
- else error(xs:QName('err:CREATE'), concat('Cannot create collection', $origin-sl, $to-create))
- ),
- if ($second-part)
- then app:make-collection-path($second-part, $current-col, $permissions)
- else ()
- )
- else ()
-};
-
-
-(:~ obfuscate an email address if the user is not logged in
- : @param $address Address to obfuscate
- :)
-declare function app:obfuscate-email-address(
- $address as xs:string)
- as xs:string {
- if (app:auth-user())
- then $address
- else string-join(
- (substring($address, 1, 2),
- substring($address, string-length($address)-1, 2))
- ,'...')
-};
-
-(:~ expand a given data set so it covers prototype
- : all of the elements and attributes in a prototype.
- : The xml:id "new" is special.
- : tei:name will be collapsed unless $collapse-names is false
- :)
-declare function app:expand-prototype(
- $data as element(),
- $prototype as element(),
- $collapse-names as xs:boolean)
- as element() {
- let $transform :=
-
-
-
-
-
-
- {$prototype}
-
-
-
-
-
-
-
-
-
-
-
- return
- transform:transform($data, $transform,
-
-
- )
-};
-
-(:~ contract a given data set so it doesn't include empty attributes
- :)
-declare function app:contract-data(
- $data as element(),
- $expand-names as xs:boolean)
- as element() {
- let $transform :=
-
- {
- if ($expand-names)
- then
-
- else ()
- }
-
-
-
-
-
-
- {
- if ($expand-names)
- then (
-
-
-
- )
- else ()
- }
-
-
-
-
-
-
-
-
- return
- transform:transform($data, $transform, ())
-};
-
-
-(:~ return a formatted error message, assuming an error occurred :)
-declare function app:error-message()
- as element(error) {
-
- Error: {$util:exception-message}
-
-};
-
-(:~ return a formatted error message, infixed in the original data element :)
-declare function app:error-message(
- $original-data as element()?
- )
- as element() {
- if ($original-data)
- then
- element {QName(namespace-uri($original-data), name($original-data))} {
- $original-data/@*,
- $original-data/*,
- app:error-message()
- }
- else app:error-message()
-};
-
-(:~ concatenate two components together as a path, making sure that the result
- : is separated by a / :)
-declare function app:concat-path(
- $a as xs:string,
- $b as xs:string
- ) as xs:string {
- let $a-s :=
- if (ends-with($a,'/'))
- then $a
- else concat($a, '/')
- let $b-s :=
- if (starts-with($b, '/'))
- then substring($b, 2)
- else $b
- return
- concat($a-s, $b-s)
-};
-
-(:~ concatenate a sequence of strings together as a path :)
-declare function app:concat-path(
- $a as xs:string+
- ) as xs:string {
- let $n := count($a)
- return
- if ($n = 1)
- then $a
- else if ($n = 2)
- then app:concat-path($a[1], $a[2])
- else app:concat-path((subsequence($a,1,$n - 2), app:concat-path($a[$n - 1], $a[$n])))
-};
-
-
-
-(:~ perform an XSLT transformation stored in the database on a document stored in the database
- : This function is a kluge
- : @param $document-uri Pointer to the document in the database, *must* be absolute relative to db
- : Alternatively, if $document-uri contains a node(), the node() is transformed
- : @param $xslt-uri Pointer to the XSLT in the database, *must* be absolute relative to db
- : @param $parameters Parameters to pass to the XSLT (user and password parameters can be passed here)
- : @param $mode mode to execute; use empty sequence or blank string for #default
- :)
-declare function app:transform-xslt(
- $document-uri as item(),
- $xslt-uri as xs:string,
- $parameters as element(param)*,
- $mode as xs:string?
- ) as item()* {
- let $xslt-uri-abs :=
- if (contains($xslt-uri,':'))
- then (: already an absolute path with protocol :) $xslt-uri
- else app:concat-path($paths:rest-prefix, $xslt-uri)
- let $user := (app:auth-user(), $parameters[@name='user']/@value/string())[1]
- let $password := (app:auth-password(), $parameters[@name='password']/@value)[1]
- let $absolute-uri :=
- if ($document-uri instance of xs:anyAtomicType)
- then
- concat('xmldb:exist://',
- if ($user)
- then concat($user,':',$password,'@')
- else '',
- $document-uri)
- else ()
- let $xslt :=
-
-
-
-
- {
- let $user-password :=
- if ($user)
- then concat($user, ":", $password, "@")
- else ""
- for $document in collection(("/data","/code"))
- [namespace-uri(*)="http://www.tei-c.org/ns/1.0"]
- [not(contains(document-uri(.), "/output/"))]
- let $doc-uri := document-uri($document)
- return
-
- }
-
-
-
-
- {
- if ($document-uri instance of node())
- then
- {$document-uri}
- else
- attribute {'select'}{concat('doc("', $absolute-uri, '")')}
- }
-
- {
- if ($mode)
- then attribute {'mode'}{$mode}
- else ()
- }
-
-
-
- return (
- debug:debug($debug:detail,
- "app",
- string-join(("Running XSLT (as ", $user, ":", $password, "=",
- xmldb:get-current-user(), ") ",
- $xslt-uri-abs, " on ",
- if ($document-uri instance of node())
- then "node"
- else $absolute-uri), "")),
- transform:transform(, $xslt, (
- if ($parameters or $user)
- then
- {
- $parameters,
- if ($user)
- then (
- ,
-
- )
- else ()
- }
- else ()
- )
- )
- )
-};
-
-(:~ store login credentials in the session
- : @param $user login username
- : @param $password login password
- :)
-declare function app:login-credentials(
- $user as xs:string,
- $password as xs:string
- ) as empty-sequence() {
- if (session:exists())
- then (
- session:set-attribute('app.user', $user),
- session:set-attribute('app.password', $password)
- )
- else ()
-};
-
-(:~ remove login credentials from the session :)
-declare function app:logout-credentials(
- ) as empty-sequence() {
- if (session:exists())
- then
- let $guest-login := xmldb:login("/db", "guest", "guest")
- return session:invalidate()
- else ()
-};
-
-(:~ pass login credentials from the session to an XQuery
- : This function should be used inside
- :)
-declare function app:pass-credentials-xq(
- ) as element()+ {
- local:pass-credentials('xquery')
-};
-
-(:~ pass login credentials from the session to an XSLT
- : This function should be used inside
- :)
-declare function app:pass-credentials-xsl(
- ) as element()+ {
- local:pass-credentials('xslt')
-};
-
-(:~ pass credentials to next xquery or xslt, depending on $type
- : @param $type either 'xquery' or 'xslt'
- :)
-declare function local:pass-credentials(
- $type as xs:string
- ) as element()+ {
- let $user := session:get-attribute('app.user')
- let $password := session:get-attribute('app.password')
- return (
- ,
-
- )
-};
-
-(:~ forward from a controller to an identity view to display protected XML
- : Use within as the last view
- :)
-declare function app:identity-view(
- ) as element() {
- app:identity-view(())
-};
-
-(:~ forward from a controller to an identity view to display protected XML
- : Use within as the last view
- :)
-declare function app:identity-view(
- $uri as xs:string?
- ) as element() {
-
- {
- if ($uri)
- then
-
- else ()
- }
-
-};
-
-(: return an XPath that points to the given node :)
-declare function app:xpath(
- $node as node()?
- ) as xs:string? {
- string-join((
- let $p := $node/parent::node()
- where exists($p)
- return
- if (not($p instance of document-node()))
- then app:xpath($p)
- else "",
- typeswitch ($node)
- case document-node()
- return "/"
- case element()
- return
- let $nn := node-name($node)
- return concat(
- $nn,
- let $ctp := count($node/preceding-sibling::element()[node-name(.)=$nn])
- let $ctf := count($node/following-sibling::element()[node-name(.)=$nn])
- where ($ctp + $ctf) > 0
- return concat("[", $ctp + 1, "]")
- )
- case text()
- return concat(
- "text()",
- let $ctp := count($node/preceding-sibling::text())
- let $ctf := count($node/following-sibling::text())
- where ($ctp + $ctf) > 0
- return concat("[", $ctp + 1, "]")
- )
- case attribute() return concat("@", node-name($node))
- case comment()
- return concat(
- "comment()",
- let $ctp := count($node/preceding-sibling::comment())
- let $ctf := count($node/following-sibling::comment())
- where ($ctp + $ctf) > 0
- return concat("[", $ctp + 1, "]")
- )
- case processing-instruction()
- return
- let $nn := node-name($node)
- return
- concat(
- "processing-instruction(", $nn, ")",
- let $ctp := count($node/preceding-sibling::processing-instruction()[node-name(.)=$nn])
- let $ctf := count($node/following-sibling::processing-instruction()[node-name(.)=$nn])
- where ($ctp + $ctf) > 0
- return concat("[", $ctp + 1, "]")
- )
- default return ()
- ), "/"
- )
-};
-
-(:~ copy permissions from $permissions to $dest :)
-declare function app:copy-permissions(
- $dest as xs:anyAtomicType,
- $permissions as document-node(element((:sm:permissions:)))
- ) as empty-sequence() {
- let $dest := $dest cast as xs:anyURI
- let $owner := $permissions/*/@owner/string()
- let $group := $permissions/*/@group/string()
- let $mode := $permissions/*/@mode/string()
- return
- system:as-user("admin", $magic:password,
- (
- sm:chmod($dest, $mode),
- sm:chgrp($dest, $group),
- sm:chown($dest, $owner),
- sm:clear-acl($dest), (: clear ACE, so we can just copy everything :)
- for
- $acl in $permissions/*/sm:acl,
- $ace in $acl/sm:ace
- let $who := $ace/@who/string()
- let $allowed := $ace/@access_type = "ALLOWED"
- let $mode := $ace/@mode/string()
- order by $ace/@index/number()
- return
- if ($ace/@target="USER")
- then sm:add-user-ace($dest, $who, $allowed, $mode)
- else sm:add-group-ace($dest, $who, $allowed, $mode)
- )
- )
-};
-
-(:~ set the permissions of the path $dest to
- : be equivalent to the permissions of the path $source
- :)
-declare function app:mirror-permissions(
- $source as xs:anyAtomicType,
- $dest as xs:anyAtomicType
- ) as empty-sequence() {
- let $source := $source cast as xs:anyURI
- let $permissions := sm:get-permissions($source)
- return app:copy-permissions($dest, $permissions)
-};
\ No newline at end of file
diff --git a/code/modules/cache-controller.xqm b/code/modules/cache-controller.xqm
deleted file mode 100644
index 81ffa10b..00000000
--- a/code/modules/cache-controller.xqm
+++ /dev/null
@@ -1,384 +0,0 @@
-xquery version "3.0";
-(:
- : Caching controller module
- : All the functions of the caching controller.
- : Intended to be called directly from controller.xql
- :
- : Note: the jcache prefix is used to avoid a conflict with
- : eXist's cache module
- :
- : Copyright 2010-2012 Efraim Feinstein
- : Open Siddur Project
- : Licensed under the GNU Lesser General Public License, version 3 or later
- :)
-
-module namespace jcache="http://jewishliturgy.org/modules/cache";
-
-import module namespace app="http://jewishliturgy.org/modules/app"
- at "xmldb:exist:///code/modules/app.xqm";
-import module namespace debug="http://jewishliturgy.org/transform/debug"
- at "xmldb:exist:///code/modules/debug.xqm";
-import module namespace paths="http://jewishliturgy.org/modules/paths"
- at "xmldb:exist:///code/modules/paths.xqm";
-import module namespace nav="http://jewishliturgy.org/modules/nav"
- at "xmldb:exist:///code/api/modules/nav.xqm";
-
-declare namespace jx="http://jewishliturgy.org/ns/jlp-processor";
-declare namespace exist="http://exist.sourceforge.net/NS/exist";
-declare namespace err="http://jewishliturgy.org/errors";
-
-(: the default cache is under this directory :)
-declare variable $jcache:cache-collection := 'cache';
-
-(:~ return the path to a flag for a given collection and resource as (cache-collection, resource) :)
-declare function local:get-flag-path(
- $collection as xs:string,
- $resource as xs:string)
- as xs:string+ {
- (
- jcache:cached-document-path($collection),
- replace($resource,'.xml$','.in-progress.xml')
- )
-
-};
-
-(:~ set in-progress flag for the given collection and resource :)
-declare function local:set-flag(
- $collection as xs:string,
- $resource as xs:string)
- as empty() {
- let $in-progress-path := local:get-flag-path($collection, $resource)
- let $in-progress-collection := $in-progress-path[1]
- let $in-progress-resource := $in-progress-path[2]
- return
- if (xmldb:store($in-progress-collection, $in-progress-resource, ))
- then
- app:mirror-permissions(
- concat($collection, "/", $resource),
- concat($in-progress-collection, "/", $in-progress-resource)
- )
- else error(xs:QName('err:STORE'), concat('Cannot store progress indicator ', $in-progress-path))
-};
-
-(:~ remove in-progress flag for the given collection and resource :)
-declare function local:remove-flag(
- $collection as xs:string,
- $resource as xs:string)
- as empty() {
- let $in-progress-path := local:get-flag-path($collection, $resource)
- let $in-progress-collection := $in-progress-path[1]
- let $in-progress-resource := $in-progress-path[2]
- where doc-available(concat($in-progress-collection, "/", $in-progress-resource))
- return
- xmldb:remove($in-progress-collection, $in-progress-resource)
-};
-
-(:~ return true if an active in progress flag exists.
- : if an inactive flag exists, remove it and return false.
- : if no flag exists, return false.
- :)
-declare function local:flag-is-active(
- $collection as xs:string,
- $resource as xs:string
- ) as xs:boolean {
- let $in-progress-path := local:get-flag-path($collection, $resource)
- let $cache-collection := $in-progress-path[1]
- let $in-progress-resource := $in-progress-path[2]
- let $caching-in-progress := doc-available(concat($cache-collection, "/", $in-progress-resource))
- let $caching-too-long := $caching-in-progress and
- xmldb:last-modified($cache-collection, $in-progress-resource) gt (xs:dayTimeDuration("P0DT0H5M0S") + current-dateTime())
- return
- if ($caching-too-long)
- then (local:remove-flag($collection, $resource), false())
- else $caching-in-progress
-};
-
-(:~ set appropriate resource permissions for a resource in the cache.
- : which are the same as the original file.
- : @param $collection The original resource collection
- : @param $resource The resource
- :)
-declare function local:set-cache-permissions(
- $collection as xs:string,
- $resource as xs:string
- ) as empty() {
- let $cache := jcache:cached-document-path($collection)
- return
- app:mirror-permissions(
- concat($collection, "/", $resource),
- concat($cache, "/", $resource)
- )
-};
-
-
-(:~ make a cache collection path that mirrors the same path in
- : the normal /db hierarchy
- : @param $path the path
- :)
-declare function local:make-cache-collection-path(
- $path as xs:string
- ) as empty() {
- let $steps := tokenize(replace($path, '^(/db)', ''), '/')[.]
- for $step in 1 to count($steps)
- let $this-step := concat('/', string-join(subsequence($steps, 1, $step), '/'))
- let $cache-this-step := jcache:cached-document-path($this-step)
- where not(xmldb:collection-available($cache-this-step))
- return
- let $cache-previous-step := jcache:cached-document-path(concat('/', string-join(subsequence($steps, 1, $step - 1), '/')))
- let $new-collection := $steps[$step]
- return (
- debug:debug($debug:info,
- "cache",
- ('creating new cache collection: ', $cache-this-step, ' mirroring permissions of ', $this-step)
- )
- ,
- if (xmldb:create-collection($cache-previous-step, $new-collection))
- then
- app:mirror-permissions($this-step, $cache-this-step)
- else error(xs:QName('err:CREATE'), concat('Cannot create cache collection ', $this-step))
- )
-};
-
-(:~ commit a given resource to the cache
- : @param $collection collection, must end with /
- : @param $resource resource name
- : @param $user If provided, the user to run the XSLT as (who you're logged in as!).
- : Else, use the session to figure it out
- : @param $password Password for user, if provided
- :)
-declare function local:commit-cache(
- $collection as xs:string,
- $resource as xs:string,
- $user as xs:string?,
- $password as xs:string?)
- as empty() {
- let $cache := jcache:cached-document-path($collection)
- where (app:require-authentication())
- return (
- (: make the cache collection if it does not already exist :)
- if (xmldb:collection-available($cache))
- then ()
- else local:make-cache-collection-path($collection),
- local:set-flag($collection, $resource),
- let $transform-result :=
- try {
- app:transform-xslt(
- app:concat-path($collection, $resource),
- app:concat-path(
- if (request:exists())
- then
- (: if we're coming from HTTP, no need to insert anything :)
- ''
- else $paths:internal-rest-prefix,
- '/db/code/transforms/concurrent/concurrent.xsl2'
- ),
- (,
- if ($user)
- then (
- ,
-
- )
- else ()
- ), ())
- }
- catch * {
- (: make sure the flag is removed if app:transform-xslt fails :)
- local:remove-flag($collection, $resource),
- debug:debug($debug:warn,
- "cache",
- ("Error during transform-xslt in cache-controller: ",
- debug:print-exception(
- $err:module, $err:line-number, $err:column-number,
- $err:code, $err:value, $err:description
- )
- )
- ),
- error(
- if ($err:code castable as xs:QName)
- then $err:code cast as xs:QName
- else xs:QName("err:TRANSFORM"), $err:description, $err:value
- )
- }
- return (
- if (xmldb:store($cache, $resource, $transform-result))
- then (
- local:set-cache-permissions($collection, $resource)
- )
- else (
- local:remove-flag($collection, $resource),
- error(xs:QName('err:STORE'), concat('Cannot store resource ', $collection, $resource, ' in cache ', $cache))
- )
- ),
- local:remove-flag($collection, $resource)
- )
-};
-
-declare function jcache:is-up-to-date(
- $document-path as xs:string
- ) as xs:boolean {
- jcache:is-up-to-date($document-path, $jcache:cache-collection)
-};
-
-(:~ determine if a given document is up to date in the given cache, including dependencies
- : @param $document-path db or api path to document in the database (assumed to be a document!)
- : @param $cache Subdirectory name of the cache to use
- :)
-declare function jcache:is-up-to-date(
- $document-path as xs:string,
- $cache as xs:string)
- as xs:boolean? {
- let $sanitized-document :=
- if (doc-available($document-path))
- then doc($document-path)
- else (: api path :)
- nav:api-path-to-sequence($document-path)
- let $collection := util:collection-name($sanitized-document)
- let $resource := util:document-name($sanitized-document)
- let $cache-collection := jcache:cached-document-path($collection)
- let $cached-document-path := jcache:cached-document-path(document-uri($sanitized-document))
- (: in some tests, collection and/or resource are empty :)
- where $collection and $resource
- return
- xmldb:collection-available($cache-collection) and
- doc-available($cached-document-path) and
- (xmldb:last-modified($cache-collection, $resource) gt xmldb:last-modified($collection, $resource))
- and (
- (: these paths can be absolute with http:// etc. Need to make them in-db paths
- The correct way to do it is probably with resolve-uri() :)
- every $path in doc($cached-document-path)//jx:cache-depend/@path
- satisfies jcache:is-up-to-date(string($path), $cache)
- )
-};
-
-(:~ clear caches from a given collection, recurse down directories if $recurse is true()
- : @param $collection The collection whose caches should be removed
- : @param $recurse true() if recurse down directories
- :)
-declare function jcache:clear-cache-collection(
- $collection as xs:string,
- $recurse as xs:boolean)
- as empty() {
- let $ccollection := jcache:cached-document-path($collection)
- where (app:require-authentication() and xmldb:collection-available($ccollection))
- return (
- if ($paths:debug)
- then
- util:log-system-out(('In clear-cache-collection(',$ccollection,')'))
- else (),
- for $res in xmldb:get-child-resources($ccollection)
- return
- jcache:clear-cache-resource($ccollection, $res),
- if ($recurse)
- then
- for $child in xmldb:get-child-collections($collection)
- return
- jcache:clear-cache-collection(app:concat-path($collection, $child), $recurse)
- else ()
- )
-};
-
-(:~ clear a single resource from the cache and any expired flags
- : @param $collection The collection where the original resource resides
- : @param $resource The resource whose cache entry should be removed
- :)
-declare function jcache:clear-cache-resource(
- $collection as xs:string,
- $resource as xs:string)
- as empty() {
- let $ccollection :=
- if (starts-with(replace($collection, '^(/db)?/',''), $jcache:cache-collection))
- then $collection
- else jcache:cached-document-path($collection)
- where (
- app:require-authentication() and
- exists(local:flag-is-active($collection, $resource)) and (: this is just to call it... :)
- doc-available(concat($ccollection, "/", $resource))
- )
- return xmldb:remove($ccollection, $resource)
-};
-
-(:~ cache all while logged in as the current user (generally from the session) :)
-declare function jcache:cache-all(
- $path as xs:string
- ) as empty() {
- jcache:cache-all($path, (), ())
-};
-
-(:~ bring all of the resources referenced from a given resource
- : up to date in the cache
- : @param $path Resource to be tested
- : @param $user If not provided, use the session
- : @param $password If not provided, use the session
- :)
-declare function jcache:cache-all(
- $path as xs:string,
- $user as xs:string?,
- $password as xs:string?
- ) as empty() {
- for $resource in jcache:find-dependent-resources($path, ())
- let $collection := util:collection-name($resource)
- let $document := util:document-name($resource)
- let $dbcollection :=
- if (starts-with($collection, '/db'))
- then $collection
- else app:concat-path('/db', $collection)
- where not(jcache:is-up-to-date($resource, $jcache:cache-collection))
- and not(local:flag-is-active($dbcollection, $document))
- return
- local:commit-cache($dbcollection, $document, $user, $password)
-};
-
-(:~ find resources dependent on a given path :)
-declare function jcache:find-dependent-resources(
- $path as xs:string,
- $resources-checked as xs:string*
- ) as xs:string* {
- let $doc :=
- (: the given path may be an API path or a database path :)
- let $api := nav:api-path-to-sequence($path)
- return
- if ($api)
- then $api
- else doc($path)
- where not(document-uri($doc) = $resources-checked)
- return
- let $this-resources-checked := (
- $resources-checked,
- document-uri($doc)
- )
- let $has-target-attributes := $doc//*[@target|@targets|@resp]
- let $new-targets := (
- distinct-values(
- for $has-target-attribute in $has-target-attributes
- let $targets :=
- for $t in tokenize(string-join(($has-target-attribute/(@targets,@target,@resp)),' '), '\s+')
- return
- if (contains($t, '#'))
- then substring-before($t, '#')[.]
- else $t
- return (
- for $target in $targets
- let $abs-uri := resolve-uri($target, base-uri($has-target-attribute))[not(. = $this-resources-checked)]
- where (not(starts-with($abs-uri, 'http')) or starts-with($abs-uri, 'http://localhost'))
- return
- replace($abs-uri, '^http://localhost(:\d+)?(/db)?','/db')
- )
- )
- )
- let $recurse :=
- for $new-target in $new-targets
- return jcache:find-dependent-resources($new-target, $this-resources-checked)
- return
- distinct-values(($this-resources-checked, $recurse))
-};
-
-(:~ return a path to a cached document - whether it exists or not -
- : given the original's path
- : @param $path path to original document
- :)
-declare function jcache:cached-document-path(
- $path as xs:string
- ) {
- replace($path, concat('^(/db)?(/', $jcache:cache-collection, ')?/'), concat('$1/', $jcache:cache-collection, '/'))
-};
-
diff --git a/code/modules/clear-cache.xql b/code/modules/clear-cache.xql
deleted file mode 100644
index 844c93d3..00000000
--- a/code/modules/clear-cache.xql
+++ /dev/null
@@ -1,53 +0,0 @@
-(:
- : Clear cache query
- :
- : You must be logged in to use it, otherwise, expect a 401
- : Accepts parameters:
- : clear=yes|all
- : path=?
- : Other parameters ignored
- :
- : Copyright 2010 Efraim Feinstein
- : The Open Siddur Project
- : Licensed under the GNU Lesser General Public License, version 3 or later
- : $Id: clear-cache.xql 769 2011-04-29 00:02:54Z efraim.feinstein $
- :)
-
-import module namespace xmldb="http://exist-db.org/xquery/xmldb";
-import module namespace request="http://exist-db.org/xquery/request";
-import module namespace app="http://jewishliturgy.org/modules/app" at "/db/code/modules/app.xqm";
-import module namespace jcache="http://jewishliturgy.org/modules/cache" at "/db/code/modules/cache-controller.xqm";
-import module namespace paths="http://jewishliturgy.org/modules/paths"
- at "/code/modules/paths.xqm";
-
-declare namespace exist="http://exist.sourceforge.net/NS/exist";
-declare namespace err="http://jewishliturgy.org/errors";
-
-
-let $clear := request:get-parameter('clear','')
-let $recurse := ($clear = 'all')
-let $path := request:get-parameter('path','')
-where (app:require-authentication())
-return (
- if ($paths:debug)
- then
- util:log-system-out('IN CLEAR-CACHE')
- else (),
- if (not($clear = ('yes','all')))
- then
- error(xs:QName('err:INVALID'), ('An invalid clear parameter "', $clear, '" was received. It must be "yes" or "all".'))
- else
- if (doc-available($path))
- then
- (: the path references a document :)
- let $collection := util:collection-name($path)
- let $resource := util:document-name($path)
- return
- jcache:clear-cache-resource($collection, $resource)
- else if (xmldb:collection-available($path))
- then (
- jcache:clear-cache-collection($path, $recurse)
- )
- else
- error(xs:QName('err:INVALID'), concat('The given path "', $path, '" is not an accessible document or collection'))
-)
diff --git a/code/modules/code-tables/languages.xml b/code/modules/code-tables/languages.xml
deleted file mode 100644
index ca0d6a8e..00000000
--- a/code/modules/code-tables/languages.xml
+++ /dev/null
@@ -1,19 +0,0 @@
-
-
-
-
- arc
- rtl
- Aramaic
-
-
- en
- ltr
- English
-
-
- he
- rtl
- Hebrew
-
-
\ No newline at end of file
diff --git a/code/modules/code-tables/licenses.xml b/code/modules/code-tables/licenses.xml
deleted file mode 100644
index 17909bb8..00000000
--- a/code/modules/code-tables/licenses.xml
+++ /dev/null
@@ -1,75 +0,0 @@
-
-
-
-
- Creative Commons Zero
- http://www.creativecommons.org/publicdomain/zero/1.0
-
-
- To the extent possible under law, the contributors who associated
- Creative Commons Zero
-
- with this work have waived all copyright and related or neighboring rights to this work.
-
-
-
-
-
-
-
-
-
-
-
- Creative Commons Attribution 3.0 Unported
- http://creativecommons.org/licenses/by/3.0
-
- Copyright by the Contributors to the Open Siddur Project.
- This file is available under the
- Creative Commons Attribution 3.0 Unported license.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Creative Commons Attribution-ShareAlike 3.0 Unported
- http://creativecommons.org/licenses/by-sa/3.0
-
- Copyright by the Contributors to the Open Siddur Project.
- This file is available under the
- Creative Commons Attribution-ShareAlike 3.0 Unported
- license.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/code/modules/code-tables/non-unicode-combining-classes.xml b/code/modules/code-tables/non-unicode-combining-classes.xml
deleted file mode 100644
index d24461bb..00000000
--- a/code/modules/code-tables/non-unicode-combining-classes.xml
+++ /dev/null
@@ -1,527 +0,0 @@
-
-
-
- 230
- 230
- 230
- 230
- 230
- 230
- 230
- 230
- 230
- 230
- 230
- 230
- 230
- 230
- 230
- 230
- 230
- 230
- 230
- 230
- 230
- 232
- 220
- 220
- 220
- 220
- 232
- 216
- 220
- 220
- 220
- 220
- 220
- 202
- 202
- 220
- 220
- 220
- 220
- 202
- 202
- 220
- 220
- 220
- 220
- 220
- 220
- 220
- 220
- 220
- 220
- 220
- 1
- 1
- 1
- 1
- 1
- 220
- 220
- 220
- 220
- 230
- 230
- 230
- 230
- 230
- 230
- 230
- 230
- 240
- 230
- 220
- 220
- 220
- 230
- 230
- 230
- 220
- 220
- 230
- 230
- 230
- 220
- 220
- 220
- 220
- 230
- 232
- 220
- 220
- 230
- 233
- 234
- 234
- 233
- 234
- 234
- 233
- 230
- 230
- 230
- 230
- 230
- 230
- 230
- 230
- 230
- 230
- 230
- 230
- 230
- 230
- 230
- 230
- 230
- 230
- 220
- 230
- 230
- 230
- 230
- 220
- 230
- 230
- 232
- 222
- 220
- 230
- 230
- 230
- 230
- 230
- 230
- 220
- 220
- 220
- 220
- 220
- 220
- 230
- 232
- 220
- 230
- 230
- 222
- 232
- 230
- 220
- 220
- 220
- 220
- 220
- 220
- 220
- 220
- 220
- 27
- 27
- 220
- 21
- 220
- 23
- 10
- 11
- 230
- 220
- 220
- 230
- 230
- 230
- 230
- 230
- 230
- 230
- 230
- 30
- 31
- 32
- 27
- 28
- 29
- 30
- 31
- 32
- 33
- 34
- 230
- 230
- 220
- 220
- 230
- 230
- 230
- 230
- 230
- 220
- 230
- 230
- 35
- 230
- 230
- 230
- 230
- 230
- 230
- 230
- 230
- 230
- 230
- 230
- 220
- 230
- 230
- 230
- 220
- 230
- 230
- 220
- 36
- 230
- 220
- 230
- 230
- 220
- 230
- 230
- 220
- 220
- 220
- 230
- 220
- 220
- 230
- 220
- 230
- 230
- 230
- 220
- 230
- 220
- 230
- 220
- 230
- 220
- 230
- 230
- 230
- 230
- 230
- 230
- 230
- 230
- 230
- 220
- 230
- 7
- 9
- 230
- 220
- 230
- 230
- 7
- 9
- 7
- 9
- 7
- 9
- 7
- 9
- 9
- 9
- 84
- 91
- 7
- 9
- 9
- 9
- 103
- 103
- 9
- 107
- 107
- 107
- 107
- 118
- 118
- 122
- 122
- 122
- 122
- 220
- 220
- 220
- 220
- 216
- 129
- 130
- 132
- 130
- 130
- 130
- 130
- 130
- 230
- 230
- 9
- 230
- 230
- 220
- 7
- 9
- 9
- 220
- 230
- 9
- 9
- 9
- 230
- 228
- 222
- 230
- 220
- 230
- 220
- 7
- 9
- 230
- 220
- 230
- 230
- 230
- 230
- 230
- 230
- 230
- 9
- 7
- 230
- 230
- 220
- 230
- 230
- 230
- 230
- 230
- 230
- 230
- 220
- 230
- 230
- 234
- 214
- 220
- 202
- 230
- 230
- 230
- 230
- 230
- 230
- 230
- 230
- 230
- 230
- 230
- 230
- 230
- 230
- 230
- 230
- 230
- 230
- 230
- 230
- 230
- 230
- 230
- 220
- 230
- 230
- 1
- 1
- 230
- 230
- 230
- 230
- 1
- 1
- 1
- 230
- 230
- 230
- 1
- 1
- 230
- 220
- 230
- 1
- 1
- 220
- 220
- 220
- 220
- 230
- 230
- 230
- 230
- 230
- 230
- 230
- 230
- 230
- 230
- 230
- 230
- 230
- 230
- 230
- 230
- 230
- 230
- 230
- 230
- 230
- 230
- 230
- 230
- 230
- 230
- 230
- 230
- 230
- 230
- 230
- 230
- 230
- 218
- 228
- 232
- 222
- 224
- 224
- 8
- 8
- 230
- 230
- 230
- 9
- 9
- 220
- 220
- 220
- 9
- 26
- 230
- 230
- 230
- 230
- 230
- 230
- 230
- 220
- 220
- 230
- 230
- 1
- 220
- 9
- 216
- 216
- 1
- 1
- 1
- 226
- 216
- 216
- 216
- 216
- 216
- 220
- 220
- 220
- 220
- 220
- 220
- 220
- 220
- 230
- 230
- 230
- 230
- 230
- 220
- 220
- 230
- 230
- 230
- 230
- 230
- 230
- 230
-
\ No newline at end of file
diff --git a/code/modules/collab.xqm b/code/modules/collab.xqm
deleted file mode 100644
index e8b16fc6..00000000
--- a/code/modules/collab.xqm
+++ /dev/null
@@ -1,406 +0,0 @@
-xquery version "1.0";
-(:~ collaboration groups functions
- :
- : Open Siddur Project
- : Copyright 2011-2012 Efraim Feinstein
- : Licensed under the GNU Lesser General Public License, version 3 or later
- :
- :)
-module namespace collab="http://jewishliturgy.org/modules/collab";
-
-import module namespace app="http://jewishliturgy.org/modules/app"
- at "app.xqm";
-
-declare namespace xrx="http://jewishliturgy.org/xrx";
-declare namespace tei="http://www.tei-c.org/ns/1.0";
-
-
-(:~ given privacy settings, find the collection path
- : @param $sharing privacy settings: 'private', 'public', 'group'
- : @param $group if the privacy setting is 'group', specifies which group
- : @param $purpose purpose ('original', 'translation')
- : @param $language language code of primary language
- :)
-declare function collab:collection-by-collab(
- $sharing as xs:string,
- $group as xs:string?,
- $purpose as xs:string?,
- $language as xs:string?
- ) as xs:string {
- let $user := app:auth-user()
- return
- app:concat-path((
- if ($sharing = 'private')
- then
- (xmldb:get-user-home($user), 'data')
- else if ($sharing = 'public')
- then
- '/data/incoming'
- else if ($sharing = 'group')
- then
- if (not($group))
- then
- error(xs:QName('err:INVALID'), 'Group sharing must also specify a group parameter')
- else if (not(xmldb:get-user-groups($user) = $group))
- then
- error(xs:QName('err:INVALID'), 'You can only share with a group you are a member of')
- else
- ('/group', $group, 'data')
- else
- error(xs:QName('err:INVALID'), 'The sharing parameter must be one of public, private, or group')
- ,
- $purpose, $language))
-};
-
-(:~ return a path given all collaboration information :)
-declare function collab:path-by-collab(
- $resource as xs:string?,
- $sharing as xs:string,
- $group as xs:string?,
- $purpose as xs:string,
- $language as xs:string
- ) as xs:string {
- let $collection :=
- collab:collection-by-collab(
- $sharing, $group, $purpose, $language
- )
- return
- if ($resource)
- then
- app:concat-path(
- $collection,
- if (ends-with($resource, '.xml'))
- then $resource
- else
- (: add default extension:)
- concat($resource, '.xml')
- )
- else $collection
-};
-
-
-(:~ return a path given a document metadata structure :)
-declare function collab:path-by-metadata(
- $meta as element(xrx:document)
- ) as xs:string {
- ($meta/xrx:ptr,
- collab:path-by-collab(
- string($meta/xrx:resource),
- string($meta/xrx:sharing), string($meta/xrx:group),
- string($meta/xrx:purpose), string($meta/xrx:language)
- )
- )[1]
-
-};
-
-(: return a metadata structure, given a full database path
- : to the document
- :)
-declare function collab:metadata-by-path(
- $path as xs:string
- ) as element(xrx:document) {
- {
- let $path-parts := tokenize(replace($path, '^(http[s]?://[^/]+)?(/db)?[/]?',''), '/')
- let $document-name := util:document-name($path)
- let $sharing :=
- if ($path-parts[1] = 'home')
- then (
- (: home directories, it's private :)
- 'private'
- )
- else if ($path-parts[1] = 'data')
- then (
- (: data directory, it's global :)
- 'public'
- )
- else if ($path-parts[1] = 'group')
- then
- (: group :)
- 'group'
- else
- error(xs:QName('err:INVALID'), concat('Invalid path: ', $path, ': Is it really a data file?'))
- return (
- {$document-name},
- {$sharing},
- if ($sharing = 'group')
- then
- {$path-parts[2]}
- else ,
- {$path-parts[if ($document-name) then (last() - 2) else (last() - 1)]},
- {$path-parts[if ($document-name) then (last() - 1) else last()]},
- {$path},
- if (doc-available($path))
- then doc($path)/tei:TEI/tei:teiHeader//tei:title
- else
- )
- }
-};
-
-(:~ derive a metadata structure from request parameters
- :
- :)
-declare function collab:metadata-by-request(
- ) as element(xrx:document) {
- let $resource := (
- request:get-parameter('resource', ()),
- request:get-parameter('xrx:resource', ())
- )[1]
- let $sharing := (
- request:get-parameter('sharing', ()),
- request:get-parameter('xrx:sharing', 'private')
- )[1]
- let $group := (
- request:get-parameter('group', ()),
- request:get-parameter('xrx:group', ())
- )[1]
- let $purpose := (
- request:get-parameter('purpose', ()),
- request:get-parameter('xrx:purpose', 'original')
- )[1]
- let $language := (
- request:get-parameter('language', ()),
- request:get-parameter('xrx:language', 'he')
- )[1]
- let $ptr := collab:path-by-collab($resource, $sharing, $group, $purpose, $language)
- return
-
- {replace($resource, '\.xml$', '')}
- {$sharing}
- {$group}
- {$purpose}
- {$language}
- {$ptr}
- {
- if (doc-available($ptr))
- then
- doc($ptr)/tei:TEI/tei:teiHeader//tei:title
- else
-
- }
-
-};
-
-(:~ find who should be the owner of a collection or resource, given current login
- :)
-declare function collab:get-owner(
- $sharing as xs:string,
- $group as xs:string?
- ) as xs:string {
- if ($sharing = ('private','group'))
- then app:auth-user()
- else 'admin'
-};
-
-(:~ find what group should own a collection or resource, given current login and sharing properties :)
-declare function collab:get-group(
- $sharing as xs:string,
- $group as xs:string?
- ) as xs:string {
- if ($sharing = 'private')
- then app:auth-user()
- else if ($sharing = 'group')
- then $group
- else 'everyone'
-};
-
-(:~ find what mode should be given to a collection or resource, given login and sharing properties :)
-declare function collab:get-mode(
- $sharing as xs:string,
- $group as xs:string?
- ) as xs:string {
- "rwxrwx---"
-};
-
-(:~ store a resource in the right collection with the right permissions,
- : return the path if successful
- :)
-declare function collab:store(
- $meta as element(xrx:document),
- $data as node()
- ) as xs:string? {
- collab:store(
- let $res := string($meta/xrx:resource)
- return
- if (ends-with($res, '.xml'))
- then $res
- else concat($res, '.xml'),
- string($meta/xrx:sharing),
- string($meta/xrx:group),
- string($meta/xrx:purpose),
- string($meta/xrx:language),
- $data)
-};
-
-(:~ store a resource given the path to it :)
-declare function collab:store-path(
- $path as xs:string,
- $data as node()
- ) as xs:string? {
- let $path-tokens := tokenize(replace($path, '^/db', ''), '/')
- let $collection := string-join(subsequence($path-tokens, 1, count($path-tokens) - 1), '/')
- let $resource := $path-tokens[last()]
- let $user-owner := app:auth-user()
- let $group-owner := $path-tokens[3] (: ('', 'group|home', '') :)
- let $mode := "rwxrwx---"
- return (
- app:make-collection-path(
- $collection, '/', $user-owner, $group-owner, $mode
- ),
- let $store := xmldb:store($collection, $resource, $data)
- return
- if ($store)
- then (
- sm:chown(xs:anyURI($path), $user-owner),
- sm:chgrp(xs:anyURI($path), $group-owner),
- sm:chmod(xs:anyURI($path), $mode),
- $store
- )
- else ()
- )
-};
-
-(:~ store a resource in the right collection with the right permissions,
- : return the path if successful
- :)
-declare function collab:store(
- $resource-name as xs:string,
- $sharing as xs:string,
- $group as xs:string?,
- $purpose as xs:string,
- $language as xs:string,
- $data as node()
- ) as xs:string? {
- let $collection :=
- collab:collection-by-collab($sharing, $group, $purpose, $language)
- let $permissions-user :=
- collab:get-owner($sharing, $group)
- let $permissions-group :=
- collab:get-group($sharing, $group)
- let $mode :=
- collab:get-mode($sharing, $group)
- return (
- app:make-collection-path(
- $collection, '/', $permissions-user, $permissions-group, $mode
- ),
- let $return-name := xmldb:store($collection, $resource-name, $data)
- return
- if ($return-name)
- then (
- xmldb:set-resource-permissions($collection, $resource-name,
- $permissions-user, $permissions-group, $mode),
- $return-name
- )
- else ()
- )
-};
-
-(:~ list xml resources in a given collection and its non-cache/non-trash subcollections
- : return a document metadata structure
- :)
-declare function collab:list-resources(
- $top-level-collection as xs:string
- ) as element(xrx:document)* {
- if (xmldb:collection-available($top-level-collection))
- then (
- let $collections := tokenize(replace($top-level-collection, '^/(db/)?', ''), '/')
- return
- for $resource in xmldb:get-child-resources($top-level-collection)[ends-with(., '.xml')]
- let $ptr := app:concat-path($top-level-collection, $resource)
- return
-
- {replace($resource, '\.xml$', '')}
- {
- if ($collections[1] = 'group')
- then 'group'
- else if ($collections[1] = 'data')
- then 'public'
- else 'private'
- }
- {
- if ($collections[1] = 'group')
- then
- {xmldb:get-group($top-level-collection, $resource)}
- else ()
- }
- {$collections[last() - 1]}
- {$collections[last()]}
- {doc($ptr)/tei:TEI/tei:teiHeader//tei:title}
- {$ptr}
-
- ,
- for $subcollection in xmldb:get-child-collections($top-level-collection)[not(.=('cache','trash'))]
- return collab:list-resources(app:concat-path($top-level-collection, $subcollection))
- )
- else ()
-};
-
-(: given a base collection, filter the subcollect :)
-declare function collab:filter-subcollections(
- $collection as xs:string,
- $filter as xs:string?
- ) as xs:string* {
- if (xmldb:collection-available($collection))
- then
- for $subcollection in xmldb:get-child-collections($collection)[not(.=('cache','trash'))]
- where (
- if ($filter)
- then $subcollection = $filter
- else true()
- )
- return app:concat-path($collection, $subcollection)
- else ()
-};
-
-(:~ list the documents that are accessible to the current user
- : according to the set of filters
- : @param $sharings may be any or all of 'private', 'public', 'group'; if 'group', $groups may be used to filter by group
- : @param $groups list of groups to filter by (empty for no filter)
- : @param $purposes may be 'original', 'translation' (empty for no filter)
- : @param $languages primary language (empty for no filter)
- :)
-declare function collab:list-accessible-documents(
- $sharings as xs:string*,
- $groups as xs:string*,
- $purposes as xs:string*,
- $languages as xs:string*
- ) as element(xrx:documents) {
- {
- let $user := app:auth-user()
- let $home := xmldb:get-user-home($user)
- let $user-groups := xmldb:get-user-groups($user)
- let $use-sharings :=
- if (exists($sharings))
- then $sharings
- else ('private','public','group')
- let $collection-bases as xs:string* :=
- (: collection base without purpose, language :)
- for $sharing in $use-sharings
- return
- if ($sharing = 'group')
- then (
- for $group in (
- if (exists($groups))
- then $groups
- else $user-groups
- )
- return collab:collection-by-collab($sharing, $group, (), ())
- )
- else (
- (: looking for public or private, group does not matter :)
- collab:collection-by-collab($sharing, (), (), ())
- )
- let $collection-bases-with-purpose :=
- for $collection-base in $collection-bases
- return collab:filter-subcollections($collection-base, $purposes)
- let $collection-bases-with-language :=
- for $purpose-base in $collection-bases-with-purpose
- return collab:filter-subcollections($purpose-base, $languages)
- let $resource-list :=
- for $language-base in $collection-bases-with-language
- return collab:list-resources($language-base)
- return
- for $resource in $resource-list
- order by string-join(($resource/tei:title, $resource/xrx:resource), ' ')
- return $resource
- }
-};
diff --git a/code/modules/controls.xqm b/code/modules/controls.xqm
deleted file mode 100644
index db1d5787..00000000
--- a/code/modules/controls.xqm
+++ /dev/null
@@ -1,1332 +0,0 @@
-(: XForms common controls library
- :
- : Open Siddur Project
- : Copyright 2010-2011 Efraim Feinstein
- : Released under the GNU Lesser General Public License, ver 3 or later
- :)
-xquery version "1.0";
-module namespace controls="http://jewishliturgy.org/modules/controls";
-
-import module namespace app="http://jewishliturgy.org/modules/app"
- at "app.xqm";
-import module namespace paths="http://jewishliturgy.org/modules/paths"
- at "paths.xqm";
-
-declare default element namespace "http://www.w3.org/1999/xhtml";
-declare namespace xf="http://www.w3.org/2002/xforms";
-declare namespace tei="http://www.tei-c.org/ns/1.0";
-declare namespace html="http://www.w3.org/1999/xhtml";
-declare namespace ev="http://www.w3.org/2001/xml-events";
-declare namespace xs="http://www.w3.org/2001/XMLSchema";
-declare namespace xrx="http://jewishliturgy.org/ns/xrx";
-declare namespace err="http://jewishliturgy.org/errors";
-
-declare variable $controls:code-tables-path := '/code/modules/code-tables';
-
-(:~ error control for handling errors that come from fn:error()
- : This should be placed inside an xf:action that handles the error :)
-declare function controls:submit-error-handler-action()
- as element(xf:message) {
-
-An error occurred while submitting. Check that all required values are entered.
-Type: HTTP status code: ()
-Error message:
-
-};
-
-(:~ output a language selector instance :)
-declare function controls:language-selector-instance(
- $instance-id as xs:string
- ) as element()+ {
-
-};
-
-(:~ Language selector control
- : @param $control-id File-unique control identifier
- : @param $code-table-instance-id id of language-selector-instance()
- : @param $label Text to show to user
- : @param $ref XPath to instance needing language selection (relative to current group)
- : @param $bind If true(), the $ref is a bind, otherwise, it's a ref
- :)
-declare function controls:language-selector-ui(
- $control-id as xs:string,
- $code-table-instance-id as xs:string,
- $label as item()?,
- $ref as xs:string,
- $bind as xs:boolean)
- as element() {
-
-};
-
-(:~ string input with language selector
- : @param $label Label for the control
- : @param $lang-label Label for language entry
- : @param $lang-bind if this parameter is nonempty, both $ref and $lang-bind are
- : interpreted as binds instead of refs, otherwise the language is assumed to be $ref/@xml:lang
- :)
-declare function controls:string-input-with-language-ui(
- $control-id as xs:string,
- $language-code-table-instance-id as xs:string,
- $label as item()?,
- $lang-label as item()?,
- $ref as xs:string,
- $lang-bind as xs:string?
- ) as element()+ {
-
-};
-
-(: ordered list control with +/-/up/down buttons :)
-(:~ This function goes in the xf:model section for each control and generates a prototype
- : instance
- : @param $instance-id instance that holds the actual list content
- : @param $instance-container container element of the prototype
- :)
-declare function controls:ordered-list-instance(
- $instance-id as xs:string,
- $instance-container as element())
- as element()+ {
- (
-
- {$instance-container}
-
- )
-};
-
-(:~ insert actions to insert a new item from a prototype into an empty ordered list
- : @param $instance-id the instance given to ordered-list-instance()
- : @param $ref reference to containing element of ordered list (same level as the prototype)
- :)
-declare function controls:ordered-list-insert-empty(
- $instance-id as xs:string,
- $ref as xs:string
- ) as element()+ {
- ,
-
-};
-
-declare function controls:ordered-list-ui(
- $instance-id as xs:string,
- $control-id as xs:string,
- $legend as xs:string,
- $ref as xs:string,
- $individual-ui as item()+) as
- element(fieldset) {
- controls:ordered-list-ui($instance-id, $control-id, $legend, $ref,
- $individual-ui, (), (), ())
-};
-
-declare function controls:ordered-list-ui(
- $instance-id as xs:string,
- $control-id as xs:string,
- $legend as xs:string,
- $ref as xs:string,
- $individual-ui as item()+,
- $self-ref as xs:string?)
- as element() {
- controls:ordered-list-ui($instance-id, $control-id, $legend, $ref,
- $individual-ui, $self-ref, (), ())
-};
-
-(:~ return the repeat id of a given ordered list control :)
-declare function controls:ordered-list-repeat-id(
- $control-id as xs:string
- ) as xs:string {
- concat($control-id, '-repeat')
-};
-
-
-(:~ This function is called in place of the UI
- : @param $instance-id Identifier of instance the control is a list of (same as in ordered-list-instance)
- : @param $control-id Unique identifier of the control
- : @param $legend UI-visible title of the control (empty for none)
- : @param $ref [relative] XPath to the elements the control represents
- : @param $individual-ui UI elements that make up each control
- : @param $self-ref XPath that defines the nodes in the node set relative
- : to themselves; only needed when the nodeset is not in its own instance
- : @param $allow-remove-last if true(), allow the last element of the nodeset to be removed
- : (default is false)
- : @param $event-target Target for up, down, plus, and minus events, which occur when the
- : buttons are pressed. If given, the default actions do not occur.
- :)
-declare function controls:ordered-list-ui(
- $instance-id as xs:string,
- $control-id as xs:string,
- $legend as xs:string,
- $ref as xs:string,
- $individual-ui as item()+,
- $self-ref as xs:string?,
- $allow-remove-last as xs:boolean?,
- $event-target as xs:string*
- ) as element(fieldset) {
-
- let $self-ref-string :=
- if ($self-ref)
- then concat('[', $self-ref, ']')
- else ''
- return
-
- {if ($legend)
- then
- else ()}
-
-
-
- {$individual-ui}
-
-
-
-
- +
-
- {
- if (exists($event-target))
- then
- for $et in $event-target
- return
- else
-
- }
-
-
-
-
-
- -
-
- {
- if (exists($event-target))
- then
- for $et in $event-target
- return
- else
-
- }
-
-
-
-
-
- ▲
-
- {
- if (exists($event-target))
- then
- for $et in $event-target
- return
- else (
- ,
-
- )
- }
-
-
-
-
-
- ▼
-
- {
- if (exists($event-target))
- then
- for $et in $event-target
- return
- else (
- ,
-
- )
- }
-
-
-
-
-
-
-
-};
-
-
-(:~ make a control collapsible
- : @param $control-id The control's name
- : @param $case-if-deselected Control content when closed/collapsed
- : @param $case-if-selected Control content when opened
- :)
-declare function controls:collapsible(
- $control-id as xs:string,
- $case-if-deselected as item()+,
- $case-if-selected as item()+
- ) as element(xf:switch) {
-
-
-
- Expand >>
-
-
-
-
- {$case-if-deselected}
-
-
-
- << Collapse
-
-
-
-
- {$case-if-selected}
-
- << Collapse
-
-
-
-
-
-
-
-};
-
-(:~ Instance to hold the input value for an open selection :)
-declare function controls:open-selection-instance(
- $instance-id as xs:string,
- $ref as xs:string,
- $required as xs:boolean,
- $relevant as xs:string?)
- as element()+ {
- let $relevant-attribute :=
- if ($relevant) then attribute relevant {$relevant} else ()
- return
- (
- {
- element {$instance-id}{}
- },
- if ($required)
- then (
- {
- $relevant-attribute
- },
- {
- $relevant-attribute
- }
- )
- else ()
- )
-};
-
-(:~ open selection control, useful until XSLTForms supports
- : xf:select1/@selection='open'
- : @param $instance-id Identifier of temporary instance used to hold the input value
- : @param $control-id Identifier of the control
- : @param $ref Reference to what element the control fills in, relative
- : to the current context.
- : @param $label Global label
- : @param $label-if-new Label for the input entry
- : @param $label-if-listed Label for the selection entry
- : @param $selection-items xf:item or xf:itemset of items for the selection
- :)
-declare function controls:open-selection-ui(
- $instance-id as xs:string,
- $control-id as xs:string,
- $ref as xs:string,
- $label as xs:string,
- $label-if-new as item()+,
- $label-if-listed as item()+,
- $selection-items as node()+
- ) as element(xf:group) {
-
-
-
-};
-
-(:~ Create a wizard. Each item contains one step in
- : the wizard.
- : @param $control-id Identifier of wizard
- : @param $steps Content of each step, in order of appearance.
- : @param $step-actions Additional actions to do on pressing Next or Finish.
- : Use a blank as a placeholder.
- : @param $step-next-refs references for the relative to the context of the wizard.
- : Use a blank string as a placeholder
- : @param $step-ids Identifiers of the steps.
- : If a given identifier is not present or an empty string, {$control-id}-stepN is used, where
- : N is a one-based integer.
- : @param $start-step First step to show. Defaults to step1
- :)
-declare function controls:wizard(
- $control-id as xs:string,
- $steps as element()+,
- $step-actions as element()*,
- $step-next-refs as xs:string*,
- $step-ids as xs:string*,
- $start-step as xs:string?)
- as element()+ {
- (
- let $control-step-ids :=
- for $step at $pos in $steps
- return
- if ($step-ids[$pos]) (: catch both empty string and empty sequence :)
- then $step-ids[$pos]
- else concat($control-id, '-', 'step', string($pos))
- return
- {
- for $step at $pos in $steps
- return
- {
- if ($start-step eq $control-step-ids[$pos])
- then attribute selected {'true'}
- else (),
- $step,
- ,
- if ($pos gt 1)
- then
-
- << Prev
-
-
-
-
- else (),
- {
- if ($step-next-refs[$pos])
- then attribute ref {$step-next-refs[$pos]}
- else ()}
- {
- if ($pos eq count($steps))
- then 'Finish'
- else 'Next >>'
- }
-
- {if ($step-actions[$pos] and not($step-actions[$pos][self::null]))
- then $step-actions[$pos]
- else (),
- if ($pos eq count($steps))
- then ()
- else
-
- }
-
-
- }
- }
- )
-};
-
-(:~ generate reporter section to report submission errors
- : @param $control-id Identifier of control, used as $event-target in
- : instances
- : @param $if-success XML to show if successful
- : @param $if-fail XML to show if failed
- :)
-declare function controls:reporter(
- $control-id as xs:string,
- $if-success as item()+,
- $if-fail as item()+
- ) as element(xf:group) {
-
-
-
-
-
- {$if-success}
- {$if-fail}
-
-
-};
-
-(:~ insert declaration that checks for returned errors in a submission
- : @param $instance-id reply instance from the submission
- : @param $error-actions actions that should be done on error return
- : @param $success-actions actions that should be done on successful return
- :)
-declare function controls:return-action(
- $instance-id as xs:string,
- $error-actions as element()*,
- $success-actions as element()*
- ) as element()+ {
- if (exists($error-actions))
- then
-
- {$error-actions}
-
- else (),
- if (exists($success-actions))
- then
- (: need an xpath 1.0 compatible way to say exists() :)
-
- {$success-actions}
-
- else ()
-};
-
-(:~ add the CSS code for a fake table being used in the given control
- : fake tables code based on http://css-lab.com/demos/4col/4col-table.html
- : @param $control-id Identifier of the control where the table is
- : @param $width-pct total width of the table in percent of the available area
- : @param $number-of-columns number of columns in the table
- :)
-declare function controls:faketable-style(
- $control-id as xs:string,
- $width-pct as xs:integer,
- $number-of-columns as xs:integer)
- as element(style) {
-
-};
-
-declare function controls:error-instance(
- $instance-id as xs:string
- ) as element()+ {
- controls:error-instance($instance-id, ())
-};
-
-(:~ instance intended to accept error reports
- : @param $instance-id The instance id of the error
- : @param $invalid-error What to do when the data is invalid. If not specified, a default
- : message is used.
- :)
-declare function controls:error-instance(
- $instance-id as xs:string,
- $invalid-error as element(exception)?
- ) as element()+ {
- (
-
-
- ,
-
-
-
-
-
-
-
-
- An unknown error occurred during submission. Most likely a bug.
-
-
- ,
-
- {
- ($invalid-error,
- Some form data is invalid. Make sure all required elements are filled out and there are no error hints shown.
- )[1]
- }
-
- )
-};
-
-(:~ convert an instance and path into a reference string
- : @param $instance-id instance id
- : @param $ref Reference within the instance
- :)
-declare function controls:instance-to-ref(
- $instance-id as xs:string,
- $ref as xs:string?
- ) as xs:string {
- let $instance-path := concat("instance('", $instance-id, "')")
- return
- concat($instance-path,
- if (not($ref) or starts-with($ref, '/'))
- then ''
- else '/',
- $ref
- )
-};
-
-declare function controls:instance-to-ref(
- $instance-id as xs:string
- ) as xs:string {
- controls:instance-to-ref($instance-id, ())
-};
-
-
-(:~ action to clear an error instance :)
-declare function controls:clear-error(
- $error-instance-id as xs:string
- ) as element() {
-
-};
-
-(:~ common responses to a submissions.
- : Check for errors. If an error occurred, move it to $error-instance-id, and convert the form response
- : @param $error-instance-id Instance id of instance that holds errors
- : @param $event-target Id(s) of target that should receive events
- : @param $success-actions Additional actions that should be done on success
- :)
-declare function controls:submission-response(
- $error-instance-id as xs:string,
- $event-target as xs:string*,
- $success-actions as element()*
- ) as element()+ {
- (
- (: delete any errors before submitting :)
- ,
- (: no errors. clear error reporting instance, do success actions, and dispatch to the event target :)
-
-
- {$success-actions,
- for $e-target in $event-target
- return
- }
- ,
- (: validation error, if treated separately :)
-
-
-
- {
- for $e-target in $event-target
- return
- }
-
- ,
- (: other submission error :)
-
-
-
-
-
-
-
-
-
- {
- for $e-target in $event-target
- return
- }
-
- )
-};
-
-(:~ error display from an error instance :)
-declare function controls:error-report(
- $error-instance-id as xs:string
- ) as element() {
-
-
- : (:)
-
-
-
-};
-
-declare function controls:validator-instance-id(
- $control-id as xs:string
- ) as xs:string {
- concat($control-id, '-validator')
-};
-
-(:~ validator instance with no target :)
-declare function controls:validator-instance(
- $control-id as xs:string,
- $instance-ref as xs:string,
- $validator-url as xs:anyURI
- ) as element()+ {
- controls:validator-instance($control-id, $instance-ref, $validator-url, ())
-};
-
-(:~ make a validator instance for a given control
- : @param $control-id Control that is being validated
- : @param $instance-ref Reference to instance that is being validated
- : @param $validator-url Path to the query that checks validity
- : @param $event-target identifier(s) of the control that receives the event
- :
- : The control dispatches the following events: validator-ok, validator-warning,
- : validator-error, xforms-submit-error (eg, error in path or XQuery)
- :)
-declare function controls:validator-instance(
- $control-id as xs:string,
- $instance-ref as xs:string,
- $validator-url as xs:anyURI,
- $event-target as xs:string*
- ) as element()+ {
- (: the validator instance holds the result of the validation:
- : according to the validator protocol, it may be:
- :
- : warning text
- : error text
- :)
- let $validator-instance := controls:validator-instance-id($control-id)
- let $validator-result := concat($validator-instance, '-result')
- let $validator-input := concat($validator-instance, '-input')
- return (
-
-
- ,
-
-
- true
-
- ,
-
-
-
- {
- for $e-target in $event-target
- return
-
- }
-
-
-
- {
- for $e-target in $event-target
- return
-
- }
-
-
-
- {
- for $e-target in $event-target
- return
-
- }
-
-
-
- {
- for $e-target in $event-target
- return
-
- }
-
-
- )
-};
-
-(:~ constraint attribute for binding
- :)
-declare function controls:validator-constraint(
- $control-id as xs:string
- ) as attribute() {
- attribute {'constraint'}{ concat('instance("', $control-id, '-validator-flag")/valid = "true"') }
-};
-
-(:~ make a validator instance for a given control that uses GET which either returns
- : 2?? or 4??
- : @param $control-id Control that is being validated
- : @param $instance-ref Reference to instance that is being validated
- : @param $validator-action Action that checks validitity (@action, xf:resource)
- : @param $validation-direction If true() then, 4?? indicates error and 2?? indicates success. if false(), the opposite
- : @param $event-target identifier(s) of the control that receives the event
- :
- : The control dispatches the following events: validator-ok, validator-warning,
- : validator-error, xforms-submit-error (eg, error in path or XQuery)
- :)
-declare function controls:validator-instance-get(
- $control-id as xs:string,
- $instance-ref as xs:string,
- $validator-action as node(),
- $validation-direction as xs:boolean,
- $event-target as xs:string*
- ) as element()+ {
- (: the validator instance may hold an error
- :)
- let $validator-instance := controls:validator-instance-id($control-id)
- let $validator-result := concat($validator-instance, '-result')
- let $validator-input := concat($validator-instance, '-input')
- let $positive-validation :=
- attribute ev:event { 'xforms-submit-done' }
- let $negative-validation := (
- attribute ev:event { 'xforms-submit-error'},
- attribute { 'if' }{ "number(event('response-status-code')) >= 400 and number(event('response-status-code')) < 500"}
- )
- return (
-
-
- ,
-
-
- true
-
- ,
-
- {$validator-action}
-
-
- {
- for $e-target in $event-target
- return
-
- }
-
-
- {
- if ($validation-direction)
- then $positive-validation
- else $negative-validation
- }
-
- {
- for $e-target in $event-target
- return
-
- }
-
-
- {
- if ($validation-direction)
- then $negative-validation
- else $positive-validation
- }
-
- {
- for $e-target in $event-target
- return
-
- }
-
-
- )
-};
-
-declare function controls:validator-instance-get(
- $control-id as xs:string,
- $instance-ref as xs:string,
- $validator-action as node(),
- $validation-direction as xs:boolean
- ) {
- controls:validator-instance-get($control-id, $instance-ref, $validator-action,
- $validation-direction, ())
-};
-
-(:~ Allow server side validation of a control
- : @param $control-id Control that is being validated
- : @param $instance-ref Reference into the instance that is being validated
- : @param $incremental true() if control is incremental=true
- :)
-declare function controls:validate-action(
- $control-id as xs:string,
- $instance-ref as xs:string,
- $incremental as xs:boolean
- ) as element()+ {
- if ($incremental)
- then
-
-
-
- else (),
-
-
-
-};
-
-(:~ license chooser instance
- : @param $required true() if the license selection is required
- :)
-declare function controls:license-chooser-instance(
- $instance-id as xs:string,
- $required as xs:boolean
- ) as element()+ {
- ,
- (: XSLTForms doesn't support xf:copy correctly, so we have to use a workaround :)
-
-
- ,
-
-};
-
-declare function controls:license-chooser-ui(
- $control-id as xs:string,
- $chooser-instance-id as xs:string,
- $label as xs:string,
- $appearance as xs:string?
- ) as element()+ {
- controls:license-chooser-ui(
- $control-id, $chooser-instance-id, $label, $appearance, ()
- )
-};
-
-declare function controls:license-chooser-ui(
- $control-id as xs:string,
- $chooser-instance-id as xs:string,
- $label as xs:string,
- $appearance as xs:string?,
- $event-target as xs:string?
- ) as element()+ {
- controls:license-chooser-ui($control-id, $chooser-instance-id, $label, $appearance, $event-target, false())
-};
-
-(:~ license chooser UI
- : @param $label Label text
- : @param $appearance 'droplist' (drop down list, default),
- : 'list' (list that shows all), 'radio' (radio buttons), ''
- : @param $event-target target for xforms-value-changed events, to work around a bug in XSLTForms r501
- : @param $changed-value-save value changed event is the equivalent of focus out (both save)
- :)
-declare function controls:license-chooser-ui(
- $control-id as xs:string,
- $chooser-instance-id as xs:string,
- $label as xs:string,
- $appearance as xs:string?,
- $event-target as xs:string?,
- $changed-value-save as xs:boolean?
- ) as element()+ {
-
- {
- attribute {'ref'}{controls:instance-to-ref($chooser-instance-id,'self::tei:ptr/@target')},
- (:attribute {if ($bind) then 'bind' else 'ref'}{$ref}:)
- attribute {'appearance'}{
- if ($appearance = 'list')
- then 'compact'
- else if ($appearance = 'radio')
- then 'full'
- else 'minimal'
- }
- }
- {$label}
-
-
-
-
- {
- for $et in $event-target
- return (
- ,
-
- )
- }
-
-};
-
-(:~ set a value on the license chooser from an existing value
- : @param $instance-id instance id of license chooser
- : @param $ref reference to parent of tei:availability that contains the license
- :)
-declare function controls:set-license-chooser-value(
- $instance-id as xs:string,
- $ref as xs:string)
- as element()+ {
-
-};
-
-(:~ ok/cancel dialog. sends ok and cancel events to event-target,
- : send the control the show event to show the dialog, send it hide to hide it.
- : note: the ok button won't hide the dialog automatically
- :)
-declare function controls:ok-cancel-dialog-ui(
- $control-id as xs:string,
- $content as element()+,
- $event-target as xs:string*
- ) as element()+ {
-
-
-
-
-
-
-
- {$content}
-
-
-
- OK
-
- {
- for $et in $event-target
- return
- }
-
-
-
- Cancel
-
-
- {
- for $et in $event-target
- return
- }
-
-
-
-
-
-
-
-
-
-};
-
-(:~ return a submission id based on a binding :)
-declare function controls:rt-submission-id(
- $binding as xs:string
- ) as xs:string {
- concat('rt-', util:hash($binding,'md5'), '-submit')
-};
-
-declare function controls:rt-submission-get(
- $binding as xs:string
- ) as xs:string {
- concat(controls:rt-submission-id($binding), '-get')
-};
-
-declare function controls:rt-submission-set(
- $binding as xs:string
- ) as xs:string {
- concat(controls:rt-submission-id($binding), '-set')
-};
-
-(: XSLTForms supports @targetref as of r507:
-declare function local:simulate-targetref(
- $result-instance-id as xs:string,
- $replace as xs:string,
- $targetref as xs:string
- ) as node()+ {
- if ($replace = 'instance')
- then
- {
- ,
- ,
-
- )
- }
- else ()
-};
-:)
-
-declare function controls:rt-submission(
- $binding as attribute(),
- $get-action as node(),
- $put-action as node()?,
- $replace as attribute()?,
- $targetref as attribute()?,
- $error-instance-id as xs:string?
- ) {
- controls:rt-submission(
- $binding,
- $get-action,
- $put-action,
- $replace,
- $targetref,
- $error-instance-id,
- ()
- )
-};
-
-(:~
- : submissions for real-time data
- : creates a get and set submission with ids {$binding}-submit-{get|set}
- :
- : @param $binding data that is transferred. May be @ref or @bind
- : @param $get-action may be @action, @resource or xf:resource
- : @param $put-action may be @action, @resource or xf:resource (if empty, get-action is used)
- : @param $replace replace 'all', 'instance', 'text', or 'none'
- : @param $targetref may be @targetref or @instance
- : @param $error-instance-id where to put submission errors
- : @param $rt-condition XPath expression that evaluates true() if should get on xforms-ready, false() if not.
- :)
-declare function controls:rt-submission(
- $binding as attribute(),
- $get-action as node(),
- $put-action as node()?,
- $replace as attribute()?,
- $targetref as attribute()?,
- $error-instance-id as xs:string?,
- $rt-condition as xs:string?
- ) as element()+ {
- let $submission-id := controls:rt-submission-id(string($binding))
- let $result-instance-id := concat($submission-id, '-result')
- return (
- (:controls:error-instance($error-instance-id), :)
-
-
- ,
- {
- ($replace, attribute replace { 'instance'} )[1],
- ($targetref, attribute instance { $result-instance-id })[1],
- $get-action
- },
- {
- if ($rt-condition)
- then
- attribute if {$rt-condition}
- else ()
- },
-
- {
- $binding,
- ($put-action, $get-action)[1],
- controls:submission-response(
- $error-instance-id,
- (), ()
- )
- }
-
- )
-};
-
-declare function controls:rt-control(
- $control-id as xs:string?,
- $submission-id as xs:string
- ) as element()+ {
- controls:rt-control($control-id, $submission-id, (), (), ())
-};
-
-declare function controls:rt-control(
- $control-id as xs:string?,
- $submission-id as xs:string,
- $set-actions as element()*,
- $other-actions as element()*
- ) as element()+ {
- controls:rt-control($control-id, $submission-id, $set-actions, $other-actions, ())
-};
-
-(:~ retrofit an existing control to update in real time.
- : The control *must* send DOMFocusOut events
- : @param $control-id control identifier (empty for current control)
- : @param $submission-id Submission identified from controls:rt-submission-id()
- : @param $set-actions additional actions when saving
- : @param $other-actions Other actions associated with the control, such as catching changes for the save flag
- : @param $condition optional XPath condition to determine when to go real-time
- :)
-declare function controls:rt-control(
- $control-id as xs:string?,
- $submission-id as xs:string,
- $set-actions as element()*,
- $other-actions as element()*,
- $condition as xs:string?
- ) as element()+ {
-
- {
- if ($control-id)
- then attribute ev:observer { $control-id }
- else (),
- if ($condition)
- then attribute if { $condition }
- else ()
- }
-
- {$set-actions}
- ,
- $other-actions
-};
-
-(:~ button to show the content of a given instance if we're in debug mode :)
-declare function controls:debug-show-instance(
- $instance-id as xs:string
- ) as element()? {
- if ($paths:debug)
- then
-
- DEBUG: Show {$instance-id}
-
-
-
-
- else ()
-};
-
-(:~ instance to control a flag that indicates whether the data is saved :)
-declare function controls:save-flag-instance(
- $instance-id as xs:string
- ) as element()+ {
- (: hold the status, which may have the values: saved, unsaved, unchanged
- : an additional save flag indicates whether the last event was just a save
- :)
-
-
- unchanged
- 0
-
- ,
- (: control a save button by binding it to here :)
-
-};
-
-(:~ set a saved flag to the saved state
- : @param $instance-id save flag instance
- : @param $status new flag status: true() = saved, false() = unsaved
- :)
-declare function controls:set-save-flag(
- $instance-id as xs:string,
- $status as xs:boolean
- ) as element()+ {
- ,
- if ($status)
- then
- (: last event was a save event :)
-
- else ()
-};
-
-declare function controls:unsave-save-flag(
- $save-flag-instance-id as xs:string
- ) as element()+ {
- controls:unsave-save-flag($save-flag-instance-id, ())
-};
-
-(:~ set the save flag to unsave in response to the given control
- : (or current control if $control-id is empty)
- : becoming changed, for this to work, the control must be incremental.
- : @param $control-id Control that affects save status
- : @param $save-flag-instance-id Instance of save flag :)
-declare function controls:unsave-save-flag(
- $save-flag-instance-id as xs:string,
- $control-id as xs:string?
- ) {
-
- {
- if ($control-id)
- then attribute ev:observer { $control-id }
- else (),
- controls:set-save-flag($save-flag-instance-id, false())
- }
-
-};
-
-(:~ UI to show save status or a save button
- : @param $instance-id save-flag-instance
- : @param $actions What to do when the save button is pressed and the data is unsaved
- :)
-declare function controls:save-status-ui(
- $instance-id as xs:string,
- $control-id as xs:string,
- $actions as element()*
- ) as element() {
-
-
-
- Save
-
- {$actions}
-
-
-
-};
diff --git a/code/modules/dbg.xqm b/code/modules/dbg.xqm
deleted file mode 100644
index 6c90a885..00000000
--- a/code/modules/dbg.xqm
+++ /dev/null
@@ -1,46 +0,0 @@
-xquery version "1.0";
-(: dbg.xqm
- : Debugging helper functions
- : Open Siddur Project
- : Copyright 2010 Efraim Feinstein
- : Licensed under the GNU Lesser General Public License, version 3 or later
- : $Id: dbg.xqm 775 2011-05-01 06:46:55Z efraim.feinstein $
- :)
-module namespace dbg="http://jewishliturgy.org/apps/lib/dbg";
-
-declare variable $dbg:QMSG := xs:QName('dbg:MESSAGE');
-
-declare variable $dbg:ERROR := 1;
-declare variable $dbg:WARNING := 2;
-declare variable $dbg:INFO := 3;
-declare variable $dbg:DETAIL := 4;
-declare variable $dbg:TRACE := 5;
-
-declare function dbg:error($qname as xs:QName, $messages as item()*) {
- dbg:message($qname, $messages, $dbg:ERROR)
-};
-
-(:~ output an error message :)
-declare function dbg:message($qname as xs:QName, $messages as item()*, $level as xs:integer) {
- let $msg-type :=
- if ($level = $dbg:ERROR)
- then 'ERROR'
- else if ($level = $dbg:WARNING)
- then 'WARNING'
- else if ($level = $dbg:INFO)
- then 'INFO'
- else if ($level = $dbg:DETAIL)
- then 'DETAIL'
- else if ($level = $dbg:TRACE)
- then 'TRACE'
- else 'GREAT DETAIL'
- let $msg-items := ($msg-type, ': ', $messages)
- let $error-message := string-join(
- for $m in $msg-items return string($m), '')
- return (
- util:log-system-out($msg-items),
- if ($level le $dbg:ERROR)
- then error($qname, $error-message)
- else ()
- )
-};
\ No newline at end of file
diff --git a/code/modules/debug.xqm b/code/modules/debug.xqm
deleted file mode 100644
index 14eaead9..00000000
--- a/code/modules/debug.xqm
+++ /dev/null
@@ -1,103 +0,0 @@
-xquery version "1.0";
-(:~
- : debug functions
- :
- : Open Siddur Project
- : Copyright 2011 Efraim Feinstein
- : Licensed under the GNU Lesser General Public License, version 3 or later
- :
- :)
-module namespace debug="http://jewishliturgy.org/transform/debug";
-
-declare variable $debug:error := 1;
-declare variable $debug:warn := 2;
-declare variable $debug:info := 3;
-declare variable $debug:detail := 4;
-declare variable $debug:level := $debug:detail;
-
-declare variable $debug:settings-file := "/db/code/debug.xml";
-declare variable $debug:settings := doc($debug:settings-file);
-
-(:~ debugging output function
- : if the source is listed in /db/code/debug.xm
- :)
-declare function debug:debug(
- $level as xs:integer,
- $source as item()*,
- $message as item()*
- ) as empty() {
- let $level-strings := ('error', 'warning', 'info', 'detail', 'trace')
- let $xmsg :=
- element { $level-strings[min(($level, count($level-strings)))] } {
- element source { $source},
- element message {
- for $m in $message
- return
- if ($m instance of attribute())
- then concat("attribute(", $m/name(), ")=", $m/string())
- else $m
- }
- }
- let $source-level :=
- (
- $debug:settings//debug:settings/@override/number(),
- if ($source castable as xs:string)
- then
- $debug:settings//debug:module[@name=string($source)]/@level/number()
- else (),
- $debug:settings//debug:settings/@level/number(),
- $debug:level
- )[1]
- return
- if ($level = $debug:error)
- then error(xs:QName('debug:ERROR'), $xmsg)
- else if ($level <= $source-level)
- then util:log-system-out($xmsg) (: TODO: this should replace with a custom logger :)
- else ()
-};
-
-(:~ Debugging function to turn a long string into a short one :)
-declare function debug:abbr-string(
- $string as xs:string?
- ) as xs:string {
- let $strlen := string-length($string)
- let $quote := "`"
- return
- string-join(
- ($quote,
- if ($strlen < 25)
- then $string
- else ( substring($string, 1, 10), '...',
- substring($string, $strlen - 10, 10)),
- $quote),
- '')
-};
-
-declare function debug:list-attributes(
- $attrs as attribute()*
- ) as xs:string {
- string(
- string-join(
- for $a in $attrs
- return ($a/name(), '=', string($a)),
- ' '
- )
- )
-};
-
-(:~ write an error message for a given exception :)
-declare function debug:print-exception(
- $module as xs:string?,
- $line-number as xs:integer?,
- $column-number as xs:integer?,
- $code as xs:string?,
- $value as xs:string?,
- $description as xs:string?
- ) as xs:string {
- concat(
- $module, ":", $line-number, ":",
- $column-number, ","[$code], $code, ":"[$value], $value, ": "[$description],
- $description,
- ";"
- )
-};
\ No newline at end of file
diff --git a/code/modules/follow-uri.xqm b/code/modules/follow-uri.xqm
deleted file mode 100644
index d0ef1a24..00000000
--- a/code/modules/follow-uri.xqm
+++ /dev/null
@@ -1,499 +0,0 @@
-xquery version "1.0";
-(:~
- : follow-uri function and mode
- :
- : Open Siddur Project
- : Copyright 2009-2011 Efraim Feinstein
- : Licensed under the GNU Lesser General Public License, version 3 or later
- :
- :)
-module namespace uri="http://jewishliturgy.org/transform/uri";
-
-import module namespace debug="http://jewishliturgy.org/transform/debug"
- at "/code/modules/debug.xqm";
-import module namespace grammar="http://jewishliturgy.org/transform/grammar"
- at "/code/grammar-parser/grammar2.xqm";
-import module namespace jcache="http://jewishliturgy.org/modules/cache"
- at "/code/modules/cache-controller.xqm";
-import module namespace nav="http://jewishliturgy.org/modules/nav"
- at "/code/api/modules/nav.xqm";
-
-declare namespace tei="http://www.tei-c.org/ns/1.0";
-declare namespace jx="http://jewishliturgy.org/ns/jlp-processor";
-declare namespace p="http://jewishliturgy.org/ns/parser";
-declare namespace r="http://jewishliturgy.org/ns/parser-result";
-
-declare variable $uri:xpointer-grammar :=
- document {
- {
- doc('/code/grammar-parser/xpointer.xml')/p:grammar |
- doc('/code/grammar-parser/xptr-tei.xml')/p:grammar
- }
- };
-declare variable $uri:fragmentation-cache-type := 'fragmentation';
-
-(:~ return an element by id, relative to a node :)
-declare function uri:id(
- $id as xs:string,
- $root as node()
- ) as element()? {
- ($root/id($id), $root//*[@jx:id = $id])[1]
-};
-
-(:~ Given a relative URI and a context,
- : resolve the relative URI into an absolute URI
- : @param $uri contains the URI to make absolute
- : @param $context The URI is absolute relative to this context.
- :)
-declare function uri:absolutize-uri(
- $uri as xs:string,
- $context as node()?
- ) as xs:anyURI {
- let $base-path as xs:anyURI := uri:uri-base-path($uri)
- return
- xs:anyURI(
- if ($base-path and (matches($uri, "^http[s]?://") or doc-available($base-path)))
- then $uri
- else resolve-uri($uri,base-uri($context) )
- )
-};
-
-(:~ Returns the base path part of an absolute URI
- : @param $uri An absolute URI
- :)
-declare function uri:uri-base-path(
- $uri as xs:string
- ) as xs:anyURI {
- xs:anyURI(
- if (contains($uri,'#'))
- then substring-before($uri,'#')
- else $uri
- )
-};
-
-(:~ Base resource of a URI (not including the fragment or query string)
- : @param $uri A URI
- :)
-declare function uri:uri-base-resource(
- $uri as xs:string
- ) as xs:anyURI {
- let $base-path as xs:string := string(uri:uri-base-path($uri))
- return
- xs:anyURI(
- if (contains($base-path, '?'))
- then substring-before($base-path, '?')
- else $base-path
- )
-};
-
-(:~ Returns the fragment portion of an absolute URI.
- : The return value excludes the #
- : @param $uri An absolute URI
- :)
-declare function uri:uri-fragment(
- $uri as xs:string
- ) as xs:anyURI {
- xs:anyURI(
- if (contains($uri, '#'))
- then substring-after($uri, '#')
- else ''
- )
-};
-
-(:----------- follow parsed XPointer --------:)
-(:~ Get nodes, given $document and $fragment :)
-declare function uri:node-from-pointer(
- $document as document-node()?,
- $fragment as xs:anyURI
- ) as node()* {
- debug:debug($debug:detail + 1,
- 'func:node-from-pointer: document',
- $document),
- debug:debug($debug:detail + 1,
- 'func:node-from-pointer: fragment',
- ($fragment)
- ),
- if ($document)
- then
- uri:follow-parsed-xpointer(
- grammar:clean(
- grammar:parse(string($fragment), 'Pointer', $uri:xpointer-grammar)
- ),
- $document
- )
- else ()
-};
-
-(:~ follow a parsed xpointer within a given document :)
-declare function uri:follow-parsed-xpointer(
- $node as node()*,
- $doc as document-node()
- ) as node()* {
- for $n in $node
- return
- typeswitch($n)
- case element(r:Shorthand) return uri:r-Shorthand($n, $doc)
- case element(r:PointerPart) return uri:r-PointerPart($n, $doc)
- default
- (: pass-through. Including r:Pointer, r:SchemeBased :)
- return uri:follow-parsed-xpointer($n/node(), $doc)
-};
-
-(: Follow a pointer one step
- r:Pointer -- pass-through
- r:SchemeBased -- pass-through
-:)
-
-(:~ Follow a shorthand pointer (aka, id) :)
-declare function uri:r-Shorthand(
- $context as element(),
- $doc as document-node()
- ) as node()* {
- uri:id(string($context), $doc)
-};
-
-(:~ Follow a scheme-based pointer.
- : Send out a debug warning if the scheme is unsupported.
- :
- :)
-declare function uri:r-PointerPart(
- $context as element(),
- $doc as document-node()
- ) as node()* {
- if ($context/r:SchemeName='range')
- then
- let $pointers as element(r:Pointer)+ :=
- grammar:clean(grammar:parse(string($context/r:SchemeData), 'RangeData', $uri:xpointer-grammar))/r:Pointer
- let $left-pointer as node() :=
- uri:follow-parsed-xpointer($pointers[1], $doc)
- let $right-pointer as node() :=
- uri:follow-parsed-xpointer($pointers[2], $doc)
- return (
- debug:debug($debug:detail, 'r:PointerPart:pointers', $pointers),
- (: pointers[1] contains the beginning,
- : pointers[2] contains the end. It is an error for:
- : (1) pointers[2] to be before pointers[1] in document order
- : (2) pointers[1] or pointers[2] to be empty
- :)
- if (empty($left-pointer) or empty($right-pointer))
- then
- debug:debug(
- $debug:error,
- 'r:PointerPart',
- 'In a pointer range expression, both pointers must resolve to a location'
- )
- else if ($left-pointer >> $right-pointer)
- then
- debug:debug(
- $debug:error,
- 'r:PointerPart',
- ('In a pointer range expression, the second pointer must follow ',
- 'the first in document order. ',
- '[1] = ', $left-pointer, ' [2] = ', $right-pointer)
- )
- else
- (:util:get-fragment-between($left-pointer, $right-pointer, false()),$right-pointer:)
- $left-pointer|
- ($left-pointer/following-sibling::node() intersect
- $right-pointer/preceding-sibling::node())|
- $right-pointer
- )
- else
- debug:debug($debug:warn,
- 'r:PointerPart',
- ('Unsupported scheme: ', r:SchemeName, ' in ', $context)
- )
-};
-
-(: ----------- following TEI pointers -----:)
-(:~ Follow a given pointer $uri,
- : including any subsequent pointers or links (such as tei:join).
- : The $steps parameter indicates the number of pointer steps to follow if
- : another pointer is pointed to by $uri.
- : If $steps is negative, the chain is followed infinitely (or
- : until another pointer limits it).
- :)
-declare function uri:follow-uri(
- $uri as xs:string,
- $context as node(),
- $steps as xs:integer
- ) as node()* {
- uri:follow-cached-uri($uri, $context, $steps, ())
-};
-
-(:~ Given the full path to a document, return its cached version path
- :)
-declare function uri:cached-document-path(
- $path as xs:string
- ) as xs:string {
- jcache:cached-document-path($path)
-};
-
-declare function uri:follow-cached-uri(
- $uri as xs:string,
- $context as node(),
- $steps as xs:integer,
- $cache-type as xs:string?
- ) as node()* {
- uri:follow-cached-uri($uri, $context, $steps, $cache-type, ())
-};
-
-(:~ Extended uri:follow-uri() to allow caching.
- : @param $cache-type Which cache to use
- :)
-declare function uri:follow-cached-uri(
- $uri as xs:string,
- $context as node(),
- $steps as xs:integer,
- $cache-type as xs:string?,
- $intermediate-ptrs as xs:boolean?
- ) as node()* {
- let $full-uri as xs:anyURI :=
- uri:absolutize-uri($uri, $context)
- let $base-path := uri:uri-base-path($full-uri)
- let $fragment as xs:anyURI :=
- uri:uri-fragment(string($full-uri))
- let $document as document-node()? :=
- let $doc := nav:api-path-to-sequence($base-path)
- return
- if ($cache-type=$uri:fragmentation-cache-type)
- then doc(uri:cached-document-path(document-uri($doc)))
- else $doc
- let $pointer-destination as node()* :=
- uri:follow(
- if ($fragment)
- then uri:node-from-pointer($document, $fragment)
- else $document,
- $steps,
- $cache-type,
- false(),
- $intermediate-ptrs)
- return (
- debug:debug($debug:detail + 1,
- 'func:follow-uri',
- ('uri =', $uri,
- ' full-uri =', $full-uri,
- ' base-path =', $base-path,
- ' fragment =', $fragment,
- ' cache-type = ', $cache-type)),
- debug:debug($debug:detail, ($fragment, $steps, $pointer-destination),
- string-join(('func:follow-pointer(): $fragment, $steps, $pointer-destination for ',
- $base-path,'#',$fragment), '')),
- $pointer-destination
- )
-};
-
-declare function uri:fast-follow(
- $uri as xs:string,
- $context as node(),
- $steps as xs:integer
- ) as node()* {
- uri:fast-follow($uri, $context, $steps, ())
-};
-
-(:~ faster routine to follow a pointer one step
- : Only works with shorthand pointers and #range() and
- : does not support caching
- :)
-declare function uri:fast-follow(
- $uri as xs:string,
- $context as node(),
- $steps as xs:integer,
- $intermediate-ptrs as xs:boolean?
- ) as node()* {
- let $full-uri as xs:anyURI :=
- uri:absolutize-uri($uri, $context)
- let $base-path as xs:anyURI :=
- uri:uri-base-path($full-uri)
- let $fragment as xs:anyURI :=
- uri:uri-fragment(string($full-uri))
- let $document as document-node()? :=
- nav:api-path-to-sequence($base-path)
- let $pointer-destination as node()* :=
- if ($fragment)
- then
- uri:follow(
- if (starts-with($fragment, "range("))
- then
- let $left :=
- $document//id(substring-before(substring-after($fragment, "("), ","))
- let $right :=
- $document//id(substring-before(substring-after($fragment, ","), ")"))
- return ($left | ($left/following::* intersect $right/preceding::*) | $right)
- else $document//id($fragment),
- $steps, (), true(),
- $intermediate-ptrs
- )
- else $document
- return $pointer-destination
-};
-
-declare function uri:follow-tei-link(
- $context as element()
- ) as node()* {
- uri:follow-tei-link($context, -1, (), ())
-};
-
-declare function uri:follow-tei-link(
- $context as element(),
- $steps as xs:integer
- ) as node()* {
- uri:follow-tei-link($context, $steps, (), ())
-};
-
-declare function uri:follow-tei-link(
- $context as element(),
- $steps as xs:integer,
- $cache-type as xs:string?
- ) as node()* {
- uri:follow-tei-link($context, $steps, $cache-type, ())
-};
-
-declare function uri:follow-tei-link(
- $context as element(),
- $steps as xs:integer,
- $cache-type as xs:string?,
- $fast as xs:boolean?
- ) as node()* {
- uri:follow-tei-link($context, $steps, $cache-type, $fast, ())
-};
-
-(:~ Handle the common processing involved in following TEI links
- : @param $context Link to follow
- : @param $steps Specifies the maximum number of steps to evaluate. Negative for infinity (default)
- : @param $cache-type Specifies the cache type to use (eg, fragmentation). Empty for none (default)
- : @param $fast use the fast follow algorithm (default false())
- : @param $intermediate-ptrs return all intermediate pointers, not just the final result (default false())
- :)
-declare function uri:follow-tei-link(
- $context as element(),
- $steps as xs:integer,
- $cache-type as xs:string?,
- $fast as xs:boolean?,
- $intermediate-ptrs as xs:boolean?
- ) as node()* {
- let $targets as xs:string+ :=
- tokenize(string($context/(@target|@targets)),'\s+')
- return
- for $t in $targets
- return
- if ($steps = 0)
- then $context
- else
- if ($fast)
- then
- uri:fast-follow($t, $context,
- uri:follow-steps($context, $steps),
- $intermediate-ptrs)
- else
- uri:follow-cached-uri(
- $t, $context,
- uri:follow-steps($context, $steps),
- $cache-type,
- $intermediate-ptrs)
-};
-
-(:~ calculate the number of steps to pass to follow-cached-uri()
- : given a pointer or link element
- :)
-declare function uri:follow-steps(
- $context as element()
- ) as xs:integer {
- uri:follow-steps($context, -1)
-};
-
-(:~ calculate the number of steps to pass to follow-cached-uri()
- : given a pointer or link element and a number already followed
- :)
-declare function uri:follow-steps(
- $context as element(),
- $steps as xs:integer
- ) as xs:integer {
- let $evaluate as xs:string? :=
- ($context/(@evaluate,../(tei:linkGrp|../tei:joinGrp)/@evaluate)[1])/string()
- return
- if ($evaluate='none')
- then 0
- else if ($evaluate='one')
- then 1
- else $steps - 1
-};
-
-(:----------- follow a pointer mode -------------:)
-
-declare function uri:follow(
- $node as node()*,
- $steps as xs:integer,
- $cache-type as xs:string?
- ) as node()* {
- uri:follow($node, $steps, $cache-type, (), ())
-};
-
-
-(:~
- : @param $fast use uri:fast-follow()
- : @param $intermediate-ptrs return all intermediates in addition
- : to the end result of following the pointer
- :)
-declare function uri:follow(
- $node as node()*,
- $steps as xs:integer,
- $cache-type as xs:string?,
- $fast as xs:boolean?,
- $intermediate-ptrs as xs:boolean?
- ) as node()* {
- for $n in $node
- return
- typeswitch($n)
- case element(tei:join) return uri:tei-join($n, $steps, $cache-type, $fast, $intermediate-ptrs)
- case element(tei:ptr) return uri:tei-ptr($n, $steps, $cache-type, $fast, $intermediate-ptrs)
- default return $n
-};
-
-(:~ follow tei:ptr, except tei:ptr[@type=url] :)
-declare function uri:tei-ptr(
- $context as element(),
- $steps as xs:integer,
- $cache-type as xs:string?,
- $fast as xs:boolean?,
- $intermediate-ptrs as xs:boolean?
- ) as node()* {
- if ($context/@type = 'url')
- then $context
- else (
- $context[$intermediate-ptrs],
- if ($context/parent::tei:joinGrp)
- then uri:tei-join($context, $steps, $cache-type, $fast, $intermediate-ptrs)
- else uri:follow-tei-link($context, $steps, $cache-type, $fast, $intermediate-ptrs)
- )
-};
-
-(:~ tei:join or tei:ptr acting as a join being followed.
- : If @result is present, produce an element with the namespace URI
- : the same as that of the context node
- :)
-declare function uri:tei-join(
- $context as element(),
- $steps as xs:integer,
- $cache-type as xs:string?,
- $fast as xs:boolean?,
- $intermediate-ptrs as xs:boolean?
- ) as node()* {
- $context[$intermediate-ptrs],
- let $joined-elements as element()* :=
- for $pj in uri:follow-tei-link($context, $steps, $cache-type, $fast, $intermediate-ptrs)
- return
- if ($pj/@scope='branches')
- then $pj/node()
- else $pj
- let $result as xs:string? :=
- string($context/(@result, parent::tei:joinGrp/@result)[1])
- return
- if ($result)
- then
- element { QName($context/namespace-uri(), $result)} {
- $joined-elements
- }
- else
- $joined-elements
-};
diff --git a/code/modules/format.xqm b/code/modules/format.xqm
deleted file mode 100644
index 81b42f17..00000000
--- a/code/modules/format.xqm
+++ /dev/null
@@ -1,590 +0,0 @@
-(:~
- : XQuery functions to output a given XML file in a format.
- :
- : Copyright 2011-2012 Efraim Feinstein
- : Open Siddur Project
- : Licensed under the GNU Lesser General Public License, version 3 or later
- :)
-module namespace format="http://jewishliturgy.org/modules/format";
-
-declare namespace exist="http://exist.sourceforge.net/NS/exist";
-declare namespace err="http://jewishliturgy.org/errors";
-declare namespace tr="http://jewishliturgy.org/ns/tr/1.0";
-
-import module namespace app="http://jewishliturgy.org/modules/app"
- at "xmldb:exist:///code/modules/app.xqm";
-import module namespace jcache="http://jewishliturgy.org/modules/cache"
- at "xmldb:exist:///code/modules/cache-controller.xqm";
-import module namespace paths="http://jewishliturgy.org/modules/paths"
- at "xmldb:exist:///code/modules/paths.xqm";
-import module namespace jobs="http://jewishliturgy.org/apps/jobs"
- at "xmldb:exist:///code/apps/jobs/modules/jobs.xqm";
-
-declare variable $format:temp-dir := '.format';
-declare variable $format:path-to-xslt := '/db/code/transforms';
-declare variable $format:rest-path-to-xslt := app:concat-path($paths:internal-rest-prefix, $format:path-to-xslt);
-
-(: resource where compilation errors are stored :)
-declare variable $format:compile-error-resource := "compile-error.xml";
-
-(: stage numbers for compilation :)
-declare variable $format:queued := 0;
-declare variable $format:caching := 1;
-declare variable $format:data := 2;
-declare variable $format:transliterate := 3;
-declare variable $format:list := 4;
-declare variable $format:format := 5;
-
-
-declare function local:wrap-document(
- $node as node()
- ) as document-node() {
- if ($node instance of document-node())
- then $node
- else document {$node}
-};
-
-declare function format:data-compile(
- $jlptei-uri-or-node as item()
- ) as document-node() {
- format:data-compile($jlptei-uri-or-node, (), ())
-};
-
-declare function format:data-compile(
- $jlptei-uri-or-node as item(),
- $user as xs:string?,
- $password as xs:string?
- ) as document-node() {
- local:wrap-document(
- let $uri-or-node :=
- if ($jlptei-uri-or-node instance of xs:string)
- then (
- jcache:cache-all($jlptei-uri-or-node, $user, $password),
- jcache:cached-document-path($jlptei-uri-or-node) (:concat($jlptei-uri-or-node, '?format=fragmentation'):)
- )
- else (
- jcache:cache-all(document-uri(root($jlptei-uri-or-node)), $user, $password),
- $jlptei-uri-or-node
- )
- return
- app:transform-xslt($uri-or-node,
- app:concat-path($format:rest-path-to-xslt, 'data-compiler/data-compiler.xsl2'),
- if ($user)
- then (
- ,
-
- )
- else (), ())
- )
-};
-
-declare function format:transliterate(
- $uri-or-node as item(),
- $user as xs:string?,
- $password as xs:string?
- ) as document-node() {
- local:wrap-document(
- app:transform-xslt($uri-or-node,
- app:concat-path($format:rest-path-to-xslt, 'translit/translit-main.xsl2'),
- (
- if ($user)
- then (
- ,
-
- )
- else (),
-
- ), ()
- )
- )
-};
-
-
-declare function format:list-compile(
- $data-compiled-node as item()
- ) as document-node() {
- format:list-compile($data-compiled-node, (), ())
-};
-
-declare function format:list-compile(
- $data-compiled-node as item(),
- $user as xs:string?,
- $password as xs:string?
- ) as document-node() {
- local:wrap-document(
- app:transform-xslt($data-compiled-node,
- app:concat-path($format:rest-path-to-xslt, 'list-compiler/list-compiler.xsl2'),
- if ($user)
- then (
- ,
-
- )
- else (), ())
- )
-};
-
-declare function format:format-xhtml(
- $list-compiled-node as item(),
- $style-href as xs:string?
- ) as document-node() {
- format:format-xhtml($list-compiled-node, $style-href, (), ())
-};
-
-declare function format:format-xhtml(
- $list-compiled-node as item(),
- $style-href as xs:string?,
- $user as xs:string?,
- $password as xs:string?
- ) as document-node() {
- local:wrap-document(
- app:transform-xslt($list-compiled-node,
- app:concat-path($format:rest-path-to-xslt, 'format/xhtml/xhtml.xsl2'),
- (
- if ($style-href)
- then
- else (),
- if ($user)
- then (
- ,
-
- )
- else ()
- )
- , ())
- )
-};
-
-declare function format:format-xhtml(
- $list-compiled-node as item()
- ) as document-node() {
- format:format-xhtml($list-compiled-node, (), (), ())
-};
-
-(:~ compile XHTML to intermediate TEI :)
-declare function format:reverse-xhtml(
- $node as item(),
- $user as xs:string?,
- $password as xs:string?
- ) as document-node() {
- local:wrap-document(
- app:transform-xslt($node,
- app:concat-path($format:rest-path-to-xslt, 'format/reverse-xhtml/reverse.xsl2'),
- (
- if ($user)
- then (
- ,
-
- )
- else ()
- )
- , ())
- )
-};
-
-declare function format:compile(
- $jlptei-uri as xs:string,
- $final-format as xs:string
- ) as document-node()? {
- format:compile($jlptei-uri, $final-format, ())
-};
-
-declare function format:enqueue-compile(
- $source-collection as xs:string,
- $source-resource as xs:string,
- $dest-collection as xs:string,
- $final-format as xs:string,
- $style-href as xs:string?) {
- format:enqueue-compile(
- $source-collection, $source-resource,
- $dest-collection, $final-format,
- $style-href, (), ())
-};
-
-
-(:~ set up a compile operation in the job queue :)
-declare function format:enqueue-compile(
- $source-collection as xs:string,
- $source-resource as xs:string,
- $dest-collection as xs:string,
- $final-format as xs:string,
- $style-href as xs:string?,
- $user as xs:string?,
- $password as xs:string?
- ) {
- let $user := ($user, app:auth-user())[1]
- let $password := ($password, app:auth-password())[1]
- let $total-steps :=
- if ($final-format = "fragmentation")
- then $format:caching
- else if ($final-format = "debug-data-compile")
- then $format:data
- else if ($final-format = "debug-data-translit")
- then $format:transliterate
- else if ($final-format = "debug-list-compile")
- then $format:list
- else if ($final-format = ("html","xhtml"))
- then $format:format
- else
- (: unknown format :)
- error(xs:QName("err:FORMAT"), concat("Unknown format: ", $final-format))
- let $dest-resource :=
- (: make a list of resource names for each step in the transformation :)
- for $i in (1 to $total-steps)
- return
- replace(
- $source-resource, "\.xml$",
- if ($i = $format:caching)
- then ".frag.xml"
- else if ($i = $format:data)
- then ".data.xml"
- else if ($i = $format:transliterate)
- then ".trans.xml"
- else if ($i = $format:list)
- then ".list.xml"
- else ".xhtml"
- )
- let $error-element :=
-
- {$dest-collection}
- {$format:compile-error-resource}
-
- let $priority-element :=
- 10
- return (
- let $frag-job :=
- jobs:enqueue(
-
-
- /code/apps/jobs/queries/bg-compile-cache.xql
-
- source-collection
- {$source-collection}
-
-
- source-resource
- {$source-resource}
-
-
- dest-collection
- {$dest-collection}
-
-
- dest-resource
- {$dest-resource[$format:caching]}
-
-
- {$error-element, $priority-element}
- , $user, $password)
- let $data-job :=
- if ($total-steps >= $format:data)
- then
- jobs:enqueue(
-
-
- /code/apps/jobs/queries/bg-compile-data.xql
-
- source-collection
- {jcache:cached-document-path($source-collection)}
-
-
- source-resource
- {$source-resource}
-
-
- dest-collection
- {$dest-collection}
-
-
- dest-resource
- {$dest-resource[$format:data]}
-
-
- {string($frag-job)}
- {$error-element, $priority-element}
- , $user, $password)
- else ()
- let $translit-job :=
- if ($total-steps >= $format:transliterate)
- then
- jobs:enqueue(
-
-
- /code/apps/jobs/queries/bg-compile-translit.xql
-
- source-collection
- {$dest-collection}
-
-
- source-resource
- {$dest-resource[$format:transliterate - 1]}
-
-
- dest-collection
- {$dest-collection}
-
-
- dest-resource
- {$dest-resource[$format:transliterate]}
-
-
- {string($frag-job)}
- {$error-element, $priority-element}
- , $user, $password)
- else ()
- let $list-job :=
- if ($total-steps >= $format:list)
- then
- jobs:enqueue(
-
-
- /code/apps/jobs/queries/bg-compile-list.xql
-
- source-collection
- {$dest-collection}
-
-
- source-resource
- {$dest-resource[$format:list - 1]}
-
-
- dest-collection
- {$dest-collection}
-
-
- dest-resource
- {$dest-resource[$format:list]}
-
-
- {string($translit-job)}
- {$error-element, $priority-element}
- , $user, $password)
- else ()
- let $format-job :=
- if ($total-steps >= $format:format)
- then
- jobs:enqueue(
-
-
- /code/apps/jobs/queries/bg-compile-format.xql
-
- source-collection
- {$dest-collection}
-
-
- source-resource
- {$dest-resource[$format:format - 1]}
-
-
- dest-collection
- {$dest-collection}
-
-
- dest-resource
- {$dest-resource[$format:format]}
-
-
- style
- {$style-href}
-
-
- {string($list-job)}
- {$error-element, $priority-element}
- , $user, $password)
- else ()
- let $cleanup-job :=
- for $d in 1 to (count($dest-resource) - 1 )
- let $dp1 := $d + 1
- return
- (: cleanup job :)
- jobs:enqueue(
-
-
- /code/apps/jobs/queries/bg-cleanup.xql
-
- collection
- {$dest-collection}
-
-
- resource
- {$dest-resource[$d]}
-
-
- {(
- $frag-job, $data-job, $translit-job, $list-job, $format-job)[$dp1]/string()
- }
- {$error-element, $priority-element}
- , $user, $password
- )
- return (
- if (doc-available(concat($dest-collection, "/", $format:compile-error-resource)))
- then
- xmldb:remove($dest-collection, $format:compile-error-resource)
- else (),
- format:new-status($dest-collection,
- $source-resource,
- $source-collection, $source-resource,
- $total-steps, xs:integer($frag-job))
- )
- )
-};
-
-declare function format:compile(
- $jlptei-uri as xs:string,
- $final-format as xs:string,
- $style-href as xs:string?
- ) as document-node()? {
- let $data-compiled as document-node() := format:data-compile($jlptei-uri)
- return
- if ($final-format = 'debug-data-compile')
- then $data-compiled
- else
- let $list-compiled as document-node() := format:list-compile($data-compiled)
- return
- if ($final-format = 'debug-list-compile')
- then $list-compiled
- else
- let $html-compiled as document-node() := format:format-xhtml($list-compiled, $style-href)
- return
- if ($final-format = ('html','xhtml'))
- then $html-compiled
- else error(xs:QName('err:UNKNOWN'), concat('Unknown format ', $final-format))
-};
-
-(:~ Equivalent of the main query.
- : Accepts the controller's exist:* external variables as parameters
- : request parameters format and clear may also be used
- : returns an element in the exist namespace
- :)
-declare function format:format-query(
- $path as xs:string,
- $resource as xs:string,
- $controller as xs:string,
- $prefix as xs:string,
- $root as xs:string)
- as element()? {
- let $user := app:auth-user()
- let $password := app:auth-password()
- let $document-path :=
- app:concat-path($controller, $path)
- let $collection :=
- (: collection name, always ends with / :)
- let $step1 := util:collection-name($document-path)
- return
- if (ends-with($step1, '/')) then $step1 else concat($step1, '/')
- let $format := request:get-parameter('format', '')
- let $output := request:get-parameter('output', '')
- let $output-collection := util:collection-name($output)
- (: util:document-name() won't return a nonexistent document's name :)
- let $output-resource := tokenize($output,'/')[last()]
- where (app:require-authentication())
- return
- if (xmldb:store($output-collection, $output-resource, format:compile($document-path, $format)) )
- then (
- if ($format = ('html', 'xhtml'))
- then xmldb:copy(app:concat-path($format:path-to-xslt, 'format/xhtml'), $output-collection, 'style.css')
- else (),
-
-
-
-
-
- )
- else
- error(xs:QName('err:STORE'), concat('Could not store ', $document-path))
-};
-
-declare function format:status-xml(
- $resource as xs:string
- ) as xs:string {
- "status.xml"
-};
-
-(:~ make a new status file for the given collection and resource.
- : the status file will generally be in the destination collection
- : and have the same permissions as the destination collection
- :)
-declare function format:new-status(
- $collection as xs:string,
- $resource as xs:string,
- $source-collection as xs:string,
- $source-resource as xs:string,
- $total-steps as xs:integer,
- $job-id as xs:integer
- ) {
- let $status-xml := format:status-xml($resource)
- return
- if (xmldb:store($collection, $status-xml,
-
- {$total-steps}
- 0
- 0
- {$job-id}
-
-
- ))
- then
- app:mirror-permissions($collection, concat($collection, "/", $status-xml))
- else
- error(xs:QName("err:STORE"), concat("Cannot store status file ", $status-xml))
-};
-
-(:~ return the status document,
- : which is a structure that looks like:
- :
- : total number of steps
- : current step
- : last step that was finished
- : job id of running or next job
- : location of the completed resource
- :
- :
- :)
-declare function format:get-status(
- $collection as xs:string,
- $resource as xs:string
- ) as document-node() {
- doc(concat($collection, "/", format:status-xml($resource)))
-};
-
-declare function format:update-status(
- $collection as xs:string,
- $resource as xs:string,
- $new-stage as xs:integer,
- $new-job as xs:integer
- ) {
- let $status-doc := doc(concat($collection, "/", format:status-xml($resource)))
- let $current := $status-doc//current
- let $job := $status-doc//job
- return (# exist:batch-transaction #) {
- update value $current with $new-stage,
- update value $job with $new-job
- }
-};
-
-(:~ Complete the current processing stage. If the processing is entirely complete,
- : set location with the final resource location :)
-declare function format:complete-status(
- $collection as xs:string,
- $resource as xs:string
- ) {
- let $status-doc := doc(concat($collection, "/", format:status-xml($resource)))
- let $current := $status-doc//current
- let $completed := $status-doc//completed
- let $location := $status-doc//location
- let $steps := $status-doc//steps
- let $job := $status-doc//job
- let $update-location := $current = $steps
- return (# exist:batch-transaction #) {
- update value $completed with string($current),
- update value $current with "",
- update value $job with "",
- if ($update-location)
- then
- update value $location with concat($collection, "/", $resource)
- else ()
- }
-};
diff --git a/code/modules/jvalidate.xqm b/code/modules/jvalidate.xqm
deleted file mode 100644
index 17f62a0b..00000000
--- a/code/modules/jvalidate.xqm
+++ /dev/null
@@ -1,166 +0,0 @@
-xquery version "3.0";
-(:
-: Module Name: Validation API
-: Date: August 19, 2009
-: Copyright: 2009,2012 Efraim Feinstein .
-: Licensed under the GNU Lesser General Public License, version 3 or later
-: Module Overview: Provides the vendor-specific interfaces to validation.
-: Return values come as report elements. status can be:
-: "ok",
-: "invalid",
-: "valid",
-: "not available"
-:)
-(:~
- :
- : @author Efraim Feinstein
- :)
-module namespace jvalidate="http://jewishliturgy.org/modules/jvalidate";
-
-declare namespace tei="http://www.tei-c.org/ns/1.0";
-declare namespace j="http://jewishliturgy.org/ns/jlptei/1.0";
-declare namespace sch="http://purl.oclc.org/dsdl/schematron";
-declare namespace svrl="http://purl.oclc.org/dsdl/svrl";
-declare namespace error="http://jewishliturgy.org/errors";
-
-declare variable $jvalidate:not-available := (
-
- not available
-
-);
-
-declare variable $jvalidate:schema-location :=
- '/db/schema/';
-
-declare function jvalidate:validate-relaxng(
- $content as item(), $grammar as item())
- as element(report) {
- validation:jing-report($content, $grammar)
-};
-
-(:~ Validate $content using the ISO Schematron schema $grammar
- : Assumes all failed assertions and activated reports are invalid.
- : @param $content The content to validate
- : @param $grammar XSLT-transformed schematron grammar (an XSLT stylesheet)
- : @return The result of the validation as:
- :
- : valid|invalid
- :
- :
- :)
-declare function jvalidate:validate-iso-schematron-svrl(
- $content as item(), $grammar as item())
- as element(report) {
- let $grammar-doc :=
- typeswitch($grammar)
- case xs:anyAtomicType
- return doc($grammar)
- default
- return $grammar
- let $result-transform :=
- transform:transform($content, $grammar-doc,
-
-
- )
- return (
-
- {
- if ($result-transform/svrl:failed-assert |
- $result-transform/svrl:successful-report)
- then 'invalid'
- else 'valid'
- }
- {
- $result-transform
- }
-
- )
-};
-
-(:~ Validate content against an XML Schema :)
-declare function jvalidate:validate-xsd(
- $content as item(), $grammar as item())
- as element(report) {
- validation:jing-report($content, $grammar)
-};
-
-(:~ Convert the result of a validation performed by one of the other
- : jvalidate functions to a boolean
- :)
-declare function jvalidate:validation-boolean(
- $validation-result as element(report))
- as xs:boolean {
- $validation-result/status = ('valid', 'ok')
-};
-
-
-(:~ Validate the document containing the given node as
- : JLPTEI. Attempt to determine if it is a special type of file.
- : If it is, validate its additional components.
- : @param $node-or-uri An xs:string or xs:anyURI pointing to a document,
- : or a node in a document.
- : @return a validation report.
- :)
-declare function jvalidate:validate-jlptei(
- $node-or-uri as item(),
- $additional-grammars as xs:string*)
- as element(report) {
- let $doc :=
- typeswitch($node-or-uri)
- case $u as xs:string
- return doc($u)
- case $u as xs:anyURI
- return doc($u)
- case $u as node()
- return root($u)
- default
- return error('jvalidate:validate-jlptei' cast as xs:QName,
- '$node-or-uri must be a URI or a node in a document.', $node-or-uri)
- let $rng-report :=
- jvalidate:validate-relaxng($doc, $jvalidate:path-to-relaxng-schema)
- return
- jvalidate:concatenate-reports(
- ($rng-report,
- let $grammars as xs:string* :=
- for $schema-ptr in $jvalidate:special-schemas
- return
- if ($doc//tei:div[@type=$schema-ptr/@key] or
- $additional-grammars=$schema-ptr/@key)
- then concat($jvalidate:schema-location, $schema-ptr/@value)
- else ()
- return
- for $grammar in $grammars
- return
- jvalidate:validate-iso-schematron-svrl($doc, $grammar cast as xs:anyURI)
- )
- )
-};
-
-(: jvalidate:validate-jlptei with 1 argument :)
-declare function jvalidate:validate-jlptei(
- $node-or-uri as item())
- as element(report) {
- jvalidate:validate-jlptei($node-or-uri, ())
-};
-
-(:~ Concatenate a number of validation reports into a single-
- : result report
- :)
-declare function jvalidate:concatenate-reports(
- $reports as element(report)*)
- as element(report) {
-
- {
- let $texts := $reports/status/text()
- return
- if ($texts='invalid')
- then 'invalid'
- else if ($texts='not available')
- then 'not available'
- else if ($texts=('ok', 'valid'))
- then 'valid'
- else 'not available'
- }
- {$reports/(* except status)}
-
-};
diff --git a/code/modules/mirror.xqm b/code/modules/mirror.xqm
deleted file mode 100644
index 0cdbe06d..00000000
--- a/code/modules/mirror.xqm
+++ /dev/null
@@ -1,228 +0,0 @@
-xquery version "3.0";
-(:~ mirror collections
- :
- : A mirror collection is a collection intended to cache some
- : aspect of another collection, maintaining the same directory
- : structure and permissions
- :
- : Open Siddur Project
- : Copyright 2011-2012 Efraim Feinstein
- : Licensed under the GNU Lesser General Public License, version 3 or later
- :)
-module namespace mirror = 'http://jewishliturgy.org/modules/mirror';
-
-import module namespace app="http://jewishliturgy.org/modules/app"
- at "xmldb:exist:///code/modules/app.xqm";
-import module namespace debug="http://jewishliturgy.org/transform/debug"
- at "xmldb:exist:///code/modules/debug.xqm";
-import module namespace magic="http://jewishliturgy.org/magic"
- at "xmldb:exist:///code/magic/magic.xqm";
-
-declare namespace error="http://jewishliturgy.org/errors";
-declare namespace tei="http://www.tei-c.org/ns/1.0";
-
-(:~ given a path, return the mirror path :)
-declare function mirror:mirror-path(
- $mirror as xs:string,
- $path as xs:string
- ) as xs:string {
- let $mirror-no-db := replace($mirror, "^/db", "")
- let $path-no-db := replace($path, "^/db", "")
- let $base-paths := tokenize($mirror-no-db,"/")
- let $base-path := string-join(subsequence($base-paths, 1, count($base-paths) - 1), "/")
- return app:concat-path(("/", $mirror-no-db, replace($path-no-db,
- concat("^(", $base-path, ")?"),
- ""))[.])
-};
-
-declare function mirror:unmirror-path(
- $mirror as xs:string,
- $mirrored-path as xs:string
- ) as xs:string {
- let $mirror-no-db := replace($mirror, "^/db", "")
- let $tokens := tokenize($mirror-no-db, "/")
- let $mirrored-path-no-db := replace($mirrored-path, "^/db", "")
- let $unmirror := string-join(subsequence($tokens, 1, count($tokens) - 1), "/")
- return
- app:concat-path(("/", $unmirror, substring-after($mirrored-path-no-db, $mirror-no-db))[.])
-};
-
-(:~ make a mirror collection path that mirrors the same path in
- : the normal /db hierarchy
- : @param $mirror the location of the mirror
- : @param $path the path that should be mirrored (relative to /db)
- :)
-declare function mirror:make-collection-path(
- $mirror as xs:string,
- $path as xs:string
- ) as empty-sequence() {
- let $unmirror-base := mirror:unmirror-path($mirror, $mirror)
- let $mirrored-path := mirror:mirror-path($mirror, $path)
- let $steps := tokenize(substring-after($mirrored-path, $unmirror-base), '/')[.]
- for $step in 1 to count($steps)
- let $this-step :=
- app:concat-path(($unmirror-base, subsequence($steps, 2, $step - 1)))
- let $mirror-this-step := mirror:mirror-path($mirror,$this-step)
- let $mirror-previous-step := app:concat-path(($unmirror-base, subsequence($steps, 1, $step - 1)))
- where not(xmldb:collection-available($mirror-this-step))
- return
- let $new-collection := $steps[$step]
- let $null :=
- debug:debug(
- $debug:info,
- "mirror",
- (("step ", $step, ":", $this-step, " new-collection=",$new-collection, " from ", $mirror-previous-step))
- )
- return (
- debug:debug(
- $debug:info,
- "mirror",
- ('creating new mirror collection: ',
- $mirror-this-step, ' from ',
- $mirror-previous-step, ' to ',
- $new-collection)
- ),
- if (xmldb:create-collection($mirror-previous-step, $new-collection))
- then
- mirror:mirror-permissions($this-step, $mirror-this-step)
- else error(xs:QName('error:CREATE'), concat('Cannot create index collection ', $this-step))
- )
-};
-
-declare function mirror:mirror-permissions(
- $source as xs:anyAtomicType,
- $dest as xs:anyAtomicType
- ) as empty-sequence() {
- app:mirror-permissions($source, $dest)
-};
-
-(: determine if a path or original document is up to date
- : @param $mirror the name of the mirror collection
- : @param $original original document as document-node() or path
- : @param $up-to-date-function A function that determines additional
- : up to date information and returns an xs:boolean
- :)
-declare function mirror:is-up-to-date(
- $mirror as xs:string,
- $original as item(),
- $up-to-date-function as function(xs:string, item()) as xs:boolean??
- ) as xs:boolean {
- let $original-doc :=
- typeswitch($original)
- case document-node() return $original
- default return doc($original)
- let $collection := util:collection-name($original-doc)
- let $resource := util:document-name($original-doc)
- let $mirror-collection := mirror:mirror-path($mirror, $collection)
- let $last-modified := xmldb:last-modified($collection, $resource)
- let $mirror-last-modified := xmldb:last-modified($mirror-collection, $resource)
- return
- (
- if (exists($up-to-date-function))
- then boolean($up-to-date-function($mirror, $original))
- else true()
- ) and
- not(
- empty($last-modified) or
- empty($mirror-last-modified) or
- ($last-modified > $mirror-last-modified)
- )
-};
-
-declare function mirror:is-up-to-date(
- $mirror as xs:string,
- $original as item()
- ) as xs:boolean {
- mirror:is-up-to-date($mirror, $original, ())
-};
-
-(:~ store data in a mirror collection :)
-declare function mirror:store(
- $mirror as xs:string,
- $collection as xs:string,
- $resource as xs:string,
- $data as item()+
- ) as xs:string? {
- let $mirror-collection := mirror:mirror-path($mirror, $collection)
- let $make :=
- system:as-user("admin", $magic:password,
- mirror:make-collection-path($mirror, $collection)
- )
- let $mirror-path := concat($mirror-collection, "/", $resource)
- return
- if (xmldb:store($mirror-collection, $resource, $data))
- then (
- mirror:mirror-permissions(
- concat($collection, "/", $resource),
- $mirror-path
- ),
- $mirror-path
- )
- else ()
-};
-
-declare function mirror:remove(
- $mirror as xs:string,
- $collection as xs:string,
- $resource as xs:string?
- ) as empty-sequence() {
- let $mirror-collection := mirror:mirror-path($mirror,$collection)
- return
- if (not($resource))
- then
- (: remove a collection :)
- let $exists := xmldb:collection-available($mirror-collection)
- where $exists
- return xmldb:remove($mirror-collection)
- else
- (: remove a resource :)
- let $mirror-path := concat($mirror-collection, "/", $resource)
- let $exists :=
- util:binary-doc-available($mirror-path) or
- doc-available($mirror-path)
- where $exists
- return xmldb:remove($mirror-collection, $resource)
-};
-
-declare function mirror:remove(
- $mirror as xs:string,
- $collection as xs:string
- ) as empty-sequence() {
- mirror:remove($mirror, $collection, ())
-};
-
-declare function mirror:collection-available(
- $mirror as xs:string,
- $collection as xs:string
- ) as xs:boolean {
- xmldb:collection-available(mirror:mirror-path($mirror, $collection))
-};
-
-declare function mirror:doc-available(
- $mirror as xs:string,
- $path as xs:string
- ) as xs:boolean {
- doc-available(mirror:mirror-path($mirror, $path))
-};
-
-(:~ get a document from a mirror :)
-declare function mirror:doc(
- $mirror as xs:string,
- $path as xs:string
- ) as document-node()? {
- doc(mirror:mirror-path($mirror, $path))
-};
-
-declare function mirror:binary-doc-available(
- $mirror as xs:string,
- $path as xs:string
- ) as xs:boolean {
- util:binary-doc-available(mirror:mirror-path($mirror, $path))
-};
-
-declare function mirror:binary-doc(
- $mirror as xs:string,
- $path as xs:string
- ) as xs:base64Binary? {
- util:binary-doc(mirror:mirror-path($mirror, $path))
-};
\ No newline at end of file
diff --git a/code/modules/passthrough.xql b/code/modules/passthrough.xql
deleted file mode 100644
index dbba1736..00000000
--- a/code/modules/passthrough.xql
+++ /dev/null
@@ -1,15 +0,0 @@
-xquery version "1.0";
-(: passthrough kluge to avoid an eXist bug where an XML resource
- : won't be loaded if it's protected through authentication
- : unless via XQuery
- :
- : $Id: passthrough.xql 706 2011-02-21 01:18:10Z efraim.feinstein $
- :)
-
-declare option exist:serialize "method=xml";
-
-let $doc := request:get-parameter('doc',())
-return (
- util:log-system-out(('passthrough for ', $doc, ' as ', xmldb:get-current-user())),
- doc($doc)
-)
diff --git a/code/modules/paths.xqm b/code/modules/paths.xqm
deleted file mode 100644
index 5621472f..00000000
--- a/code/modules/paths.xqm
+++ /dev/null
@@ -1,70 +0,0 @@
-(: Path mnemonics
- : Open Siddur Project
- : Copyright 2010-2011 Efraim Feinstein
- : Released under the GNU Lesser General Public License, ver 3 or later
- : $Id: paths.xqm 771 2011-04-29 04:24:30Z efraim.feinstein $
- :)
-xquery version "1.0";
-
-module namespace paths="http://jewishliturgy.org/modules/paths";
-
-(: requires "/rest" in the uri or not? :)
-declare variable $paths:requires-rest := false();
-(:~ Choice of XForms processor: for now, may be 'betterform' or 'xsltforms' :)
-declare variable $paths:xforms-processor := 'xsltforms';
-(:~ path to web application context, relative to server root
- : either '' or 'exist' :)
-declare variable $paths:exist-prefix :=
- if (request:exists())
- then substring-after(request:get-context-path(),'/')
- else '';
-(:~ path to db rest interface, relative to server root :)
-declare variable $paths:prefix := concat('/', $paths:exist-prefix,
- if ($paths:exist-prefix and $paths:requires-rest) then '/' else '',
- if ($paths:requires-rest) then 'rest' else '');
-(:~ constant beginning part of REST URL :)
-declare variable $paths:internal-rest-prefix :=
- concat(
- 'http://localhost:8080',
- $paths:prefix);
-declare variable $paths:rest-prefix :=
- if (request:exists())
- then $paths:internal-rest-prefix
- else '';
-(:~ absolute REST URL prefix as seen from the outside the server:)
-declare variable $paths:external-rest-prefix :=
- if (request:exists())
- then
- concat(
- 'http://', request:get-server-name(), ':', request:get-server-port(),
- $paths:prefix)
- else '';
-
-declare variable $paths:webapp := '/webapp'; (: server local hdd :)
-(:~ db path to apps. concat to $paths:prefix or $paths:rest-prefix :)
-declare variable $paths:apps := '/db/code/apps';
-(:~ absolute db path to modules. Concat to $paths:prefix for an absolute path :)
-declare variable $paths:modules := '/db/code/modules';
-declare variable $paths:xforms := concat($paths:external-rest-prefix, 'db/xforms/xsltforms/xsltforms.xsl');
-declare variable $paths:xslt-pi :=
- if ($paths:xforms-processor = 'xsltforms')
- then (
- processing-instruction xml-stylesheet {
- concat('type="text/xsl" href="',
- $paths:xforms,
- '"')},
- processing-instruction css-conversion {'no'}
- )
- else ();
-(:~ when to debug: when not on the primary server :)
-declare variable $paths:debug as xs:boolean :=
- if (request:exists())
- then request:get-server-name()='localhost'
- else true();
-declare variable $paths:debug-pi :=
- if ($paths:xforms-processor = 'xsltforms')
- then
- if (request:exists() and not(request:get-server-name()='localhost'))
- then ()
- else processing-instruction xsltforms-options {'debug="yes"'}
- else ();
diff --git a/code/modules/prototype.xsl2 b/code/modules/prototype.xsl2
deleted file mode 100644
index f7710262..00000000
--- a/code/modules/prototype.xsl2
+++ /dev/null
@@ -1,107 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/code/modules/refindex.xqm b/code/modules/refindex.xqm
deleted file mode 100644
index fcd9f166..00000000
--- a/code/modules/refindex.xqm
+++ /dev/null
@@ -1,349 +0,0 @@
-xquery version "3.0";
-
-(:~ reference index module
- :
- : Manage an index of references in the /db/refindex collection
- : In this index, the keys are the referenced URI or a node
- : and the type of reference. The index stores node id's of
- : the linking elements that make the references
- :
- : Open Siddur Project
- : Copyright 2011-2012 Efraim Feinstein
- : Licensed under the GNU Lesser General Public License, version 3 or later
- :)
-module namespace ridx = 'http://jewishliturgy.org/modules/refindex';
-
-import module namespace app="http://jewishliturgy.org/modules/app"
- at "xmldb:exist:///code/modules/app.xqm";
-import module namespace debug="http://jewishliturgy.org/transform/debug"
- at "xmldb:exist:///code/modules/debug.xqm";
-import module namespace uri="http://jewishliturgy.org/transform/uri"
- at "xmldb:exist:///code/modules/follow-uri.xqm";
-import module namespace magic="http://jewishliturgy.org/magic"
- at "xmldb:exist:///code/magic/magic.xqm";
-
-declare namespace err="http://jewishliturgy.org/errors";
-declare namespace tei="http://www.tei-c.org/ns/1.0";
-
-(: the default cache is under this directory :)
-declare variable $ridx:ridx-collection := "refindex";
-
-(: if this file exists, reference indexing should be skipped.
- :)
-declare variable $ridx:disable-flag := "disabled.xml";
-
-(:~ given a collection, return its index :)
-declare function ridx:index-collection(
- $collection as xs:string
- ) as xs:string {
- app:concat-path(("/", $ridx:ridx-collection, $collection))
-};
-
-(:~ make an index collection path that mirrors the same path in
- : the normal /db hierarchy
- : @param $path-base the constant base at the start of the path
- : @param $path the path to mirror
- :)
-declare function local:make-mirror-collection-path(
- $path-base as xs:string,
- $path as xs:string
- ) as empty() {
- let $steps := tokenize(replace($path, '^(/db)?/', concat($path-base,"/")), '/')[.]
- for $step in 1 to count($steps)
- let $this-step := concat('/', string-join(subsequence($steps, 1, $step), '/'))
- where not(xmldb:collection-available($this-step))
- return
- let $mirror-this-step := concat("/",string-join(subsequence($steps, 2, $step - 1),"/"))
- let $previous-step := concat('/', string-join(subsequence($steps, 1, $step - 1), '/'))
- let $new-collection := $steps[$step]
- let $null :=
- debug:debug(
- $debug:info,
- "refindex",
- (("step ", $step, ":", $this-step, " new-collection=",$new-collection, " from ", $previous-step))
- )
- return (
- debug:debug(
- $debug:info,
- "refindex",
- ('creating new index collection: ',
- $this-step, ' from ',
- $previous-step, ' to ',
- $new-collection)
- ),
- if (xmldb:create-collection($previous-step, $new-collection))
- then
- app:mirror-permissions(
- if ($step = 1)
- then "/db"
- else $mirror-this-step, $this-step)
- else error(xs:QName('err:CREATE'), concat('Cannot create index collection ', $this-step))
- )
-};
-
-(:~ index or reindex a document given its location by collection
- : and resource name :)
-declare function ridx:reindex(
- $collection as xs:string,
- $resource as xs:string
- ) {
- ridx:reindex(doc(app:concat-path($collection, $resource)))
-};
-
-(:~ index or reindex a document from the given document node
- : which may be specified as a node or an xs:anyURI or xs:string
- :)
-declare function ridx:reindex(
- $doc-items as item()*
- ) as empty() {
- let $disabled := doc-available(concat("/", $ridx:ridx-collection, "/", $ridx:disable-flag))
- where not($disabled)
- return
- for $doc-item in $doc-items
- let $doc :=
- typeswitch($doc-item)
- case document-node()
- return
- $doc-item
- [not(util:is-binary-doc(document-uri(.)))]
- default
- return
- if (util:is-binary-doc($doc-item))
- then ()
- else doc($doc-item)
- (: do not index binary documents :)
- where exists($doc)
- return
- let $collection := replace(util:collection-name($doc), "^/db", "")
- let $resource := util:document-name($doc)
- let $make-mirror-collection :=
- (: TODO: this should not have to be admin-ed. really, it should
- be setuid! :)
- try {
- system:as-user("admin", $magic:password,
- local:make-mirror-collection-path($ridx:ridx-collection, $collection)
- )
- }
- catch * {
- (: TODO: this code is here to account for a bug where, in the
- : restore process, the admin password is considered to be blank
- : even though it had been set. It affects eXist r14669 under
- : circumstances that I can't figure out. Hopefully, it will not
- : affect future versions, but if it does, we need this code
- : to work around it. A warning will be displayed when this code
- : executes. The warning is irrelevant to a user.
- :)
- debug:debug($debug:warn, "refindex", "The admin password is blank. This is a bug in eXist, I think."),
- system:as-user("admin", "",
- local:make-mirror-collection-path($ridx:ridx-collection, $collection)
- )
- }
- let $mirror-collection :=
- app:concat-path(("/", $ridx:ridx-collection, $collection))
- let $original-path := concat($collection, "/", $resource)
- let $mirror-path := concat($mirror-collection, "/", $resource)
- let $last-modified := xmldb:last-modified($collection, $resource)
- let $idx-last-modified := xmldb:last-modified($mirror-collection, $resource)
- where empty($last-modified) or empty($idx-last-modified) or ($last-modified > $idx-last-modified)
- return
- let $stored :=
- if (xmldb:store($mirror-collection, $resource,
- element ridx:index {
- ridx:make-index-entries($doc//@target|$doc//@targets)
- }
- ))
- then
- app:mirror-permissions($original-path, $mirror-path)
- else ()
- return ()
-};
-
-declare function ridx:make-index-entries(
- $reference-attributes as attribute()*
- ) as element()* {
- for $rattr in $reference-attributes
- let $element := $rattr/parent::element()
- let $ptr-node-id := util:node-id($element)
- let $type := ($element, $element/(ancestor::tei:linkGrp|ancestor::tei:joinGrp)[1])[1]/@type/string()
- for $follow at $n in tokenize($rattr/string(), "\s+")
- let $returned :=
- if (matches($follow, "^http[s]?://"))
- then ()
- else uri:fast-follow($follow, $element, uri:follow-steps($element), true())
- for $followed in $returned
- where $followed/@xml:id
- return
- element ridx:entry {
- attribute ref { uri:absolutize-uri(concat("#", $followed/@xml:id/string()), $followed) },
- attribute ns { namespace-uri($element) },
- attribute local-name { local-name($element) },
- attribute n { $n },
- attribute type { $type },
- attribute node { $ptr-node-id }
- }
-};
-
-declare function ridx:lookup(
- $node as node(),
- $context as document-node()*,
- $ns as xs:string*,
- $local-name as xs:string*
- ) as node()* {
- ridx:lookup($node,$context,$ns,$local-name,(),(),())
-};
-
-declare function ridx:lookup-document(
- $docs as item()*
- ) as node()* {
- ridx:lookup-document($docs, false())
-};
-
-(:~ return all references to a document
- : @param $accept-same if true(), include all references that
- : are in the same document. Default false()
- :)
-declare function ridx:lookup-document(
- $docs as item()*,
- $accept-same as xs:boolean
- ) as node()* {
- for $doc in $docs
- let $doc-uri :=
- typeswitch ($doc)
- case node() return document-uri(root($doc))
- default return
- (: this code will normalize the URI to the same as the document-uri
- function will return :)
- document-uri(doc($doc))
- let $mirror-uri :=
- app:concat-path(("/", $ridx:ridx-collection, replace($doc-uri, "^/db", "")))
- let $mirror-doc := doc($mirror-uri)
- let $idx-collection := ridx:index-collection("/")
- let $db-idx-collection := concat("^/db/", $ridx:ridx-collection)
- for $entry in
- collection($idx-collection)//ridx:entry
- [starts-with(@ref, $doc-uri)]
- [$accept-same or not(root(.) is $mirror-doc)]
- let $original-doc := doc(replace(document-uri(root($entry)), $db-idx-collection, ""))
- return
- try {
- util:node-by-id($original-doc, $entry/@node)
- }
- catch * {
- debug:debug($debug:info,
- "refindex",
- ("A query could not find a node in ", $original-doc, " - is the index expired?")
- )
- }
-};
-
-(:~ Look up if the current node specifically or, including any
- : of its ancestors (default true() unless $without-ancestors is set)
- : is referenced in a reference of type $ns:$local-name/@type,
- : in the $n-th position
- : If any of the optional parameters are not found, do not limit
- : based on them.
- : The search is performed for nodes only within $context, which may be
- : a collection or a document-node()
- :)
-declare function ridx:lookup(
- $node as node(),
- $context as document-node()*,
- $ns as xs:string*,
- $local-name as xs:string*,
- $type as xs:string*,
- $n as xs:integer*,
- $without-ancestors as xs:boolean?
- ) as node()* {
- let $defaulted-context :=
- if (exists($context))
- then
- for $c in $context
- return
- doc(
- replace(document-uri($c), "^(/db)?/",
- concat("/", $ridx:ridx-collection, "/")
- )
- )
- else collection(concat("/db/", $ridx:ridx-collection))
- let $nodes :=
- if ($without-ancestors)
- then $node[@xml:id]
- else $node/ancestor-or-self::*[@xml:id]
- where exists($nodes)
- return
- let $uris :=
- for $nd in $nodes
- return
- uri:absolutize-uri(
- concat("#", $nd/@xml:id/string()), $nd
- )
- for $entry in $defaulted-context//ridx:entry
- [@ref=$uris]
- [
- if (exists($ns))
- then @ns=$ns
- else true()
- ]
- [
- if (exists($local-name))
- then @local-name=$local-name
- else true()
- ]
- [
- if (exists($n))
- then @n=$n
- else true()
- ]
- let $original-doc := doc(
- replace(document-uri(root($entry)), concat("/", $ridx:ridx-collection), "")
- )
- return
- try {
- util:node-by-id($original-doc, $entry/@node)
- }
- catch * {
- debug:debug($debug:warn,"refindex", ("A query for ", $node, " failed on util:node-by-id. ", " The entry was: ", $entry))(:,
- ridx:reindex(root($entry)),
- ridx:lookup($node, $context, $ns, $local-name, $type, $n, $without-ancestors):)
- }
-};
-
-(:~ disable the reference index: you must be admin! :)
-declare function ridx:disable(
- ) as xs:boolean {
- let $user := xmldb:get-current-user()
- let $idx-collection := concat("/",$ridx:ridx-collection)
- let $idx-flag := xs:anyURI(concat($idx-collection, "/", $ridx:disable-flag))
- return
- xmldb:is-admin-user($user)
- and (
- local:make-mirror-collection-path($ridx:ridx-collection, "/"),
- if (xmldb:store(
- $idx-collection,
- $ridx:disable-flag,
-
- ))
- then (
- sm:chown($idx-flag, $user),
- sm:chgrp($idx-flag, "dba"),
- sm:chmod($idx-flag, "rwxrwxr--"),
- true()
- )
- else false()
- )
-};
-
-(:~ re-enable the reference index: you must be admin to run! :)
-declare function ridx:enable(
- ) as xs:boolean {
- let $idx-collection := concat("/", $ridx:ridx-collection)
- return
- if (xmldb:is-admin-user(xmldb:get-current-user())
- and doc-available(concat($idx-collection, "/", $ridx:disable-flag))
- )
- then (
- xmldb:remove($idx-collection, $ridx:disable-flag),
- true()
- )
- else false()
-};
\ No newline at end of file
diff --git a/code/modules/resp.xqm b/code/modules/resp.xqm
deleted file mode 100644
index 40c0c007..00000000
--- a/code/modules/resp.xqm
+++ /dev/null
@@ -1,397 +0,0 @@
-xquery version "3.0";
-(:~ module to handle attribution of responsibility within the database
- :
- : Open Siddur Project
- : Copyright 2011 Efraim Feinstein
- : Licensed under the GNU Lesser General Public License, version 3 or later
- :)
-module namespace resp = "http://jewishliturgy.org/modules/resp";
-
-import module namespace app="http://jewishliturgy.org/modules/app"
- at "xmldb:exist:///code/modules/app.xqm";
-import module namespace ridx="http://jewishliturgy.org/modules/refindex"
- at "xmldb:exist:///code/modules/refindex.xqm";
-import module namespace uri="http://jewishliturgy.org/transform/uri"
- at "xmldb:exist:///code/modules/follow-uri.xqm";
-
-declare namespace tei="http://www.tei-c.org/ns/1.0";
-declare namespace j="http://jewishliturgy.org/ns/jlptei/1.0";
-declare namespace err="http://jewishliturgy.org/errors";
-
-declare variable $resp:tei-ns := "http://www.tei-c.org/ns/1.0";
-declare variable $resp:valid-responsibility-types :=
- (: TODO: ideally, we'd read this directly from the schema... :)
- ("transcriber", "proofreader", "scanner", "editor", "author");
-
-(:~ retrieve the full public contributor entry
- : for a given string identifier
- :)
-declare function resp:contributor-entry(
- $resp-element as element(tei:respons)*
- ) as element()* {
- for $e in $resp-element
- return
- uri:follow-uri($e/@resp, $e, uri:follow-steps($e))
-};
-
-(:~ find who is declared responsible for all aspects of a
- : given node.
- :)
-declare function resp:query(
- $node as node()
- ) as node()* {
- ridx:lookup($node, collection("/group"),
- $resp:tei-ns, "respons")
-};
-
-(:~ find who is declared responsible for a given aspect
- : of a given node
- :)
-declare function resp:query(
- $node as node(),
- $resp-type as xs:string
- ) as node()* {
- ridx:lookup($node, collection("/group"),
- $resp:tei-ns, "respons", (), (), ())[@j:role=$resp-type]
-};
-
-(:~ retrieve the relative URI to the public profile of a user
- : with identifier $id, relative to the document in $node
- : if the public profile cannot be found, return empty()
- :)
-declare function local:public-profile-by-id(
- $node as node(),
- $id as xs:string
- ) as xs:string? {
- (: the profile is at /group/$group/contributors/$id.xml
- : if the current document is at
- :)
- let $public-profile-uri := concat(
- "/group/everyone/contributors/", $id, ".xml")
- let $doc-uri := replace(document-uri(root($node)), "^(/db)?/", "")
- let $path-tokens := tokenize($doc-uri, "/")
- let $n-tokens := count($path-tokens)
- let $doc-in-group-hierarchy := $path-tokens[1] = "group"
- let $group :=
- if ($doc-in-group-hierarchy)
- then $path-tokens[2]
- else "everyone"
- let $profile-with-id :=
- collection(concat("/group/", $group, "/contributors"))//id($id)
- let $profile-root := root($profile-with-id)
- where exists($profile-with-id)
- return
- concat(
- if (not($doc-in-group-hierarchy))
- then
- (: an absolute URI is required :)
- concat(
- replace(util:collection-name($profile-root), "^/db", ""), "/",
- util:document-name($profile-root)
- )
- else
- string-join((
- for $i in 1 to ($n-tokens - 3)
- return "..",
- "contributors",
- util:document-name($profile-root)
- ),
- "/"),
- "#", $id)
-};
-
-(: if a public profile does not already exist accessibly at a given
- : node, make one accessible
- : if a profile is found that fits the parameters, use it and return
- : the relative path to the profile,
- : otherwise, return empty()
- :)
-declare function local:make-public-profile(
- $node as node(),
- $identifier as xs:string
- ) as xs:string? {
- let $has-identifier := collection("/group")//id($identifier)[ends-with(document-uri(root(.)), "profile.xml")]
- where ($has-identifier)
- return
- let $group := replace(document-uri(root($node)), "(^.*/group/)|(/.*$)", "")
- let $group-collection := concat("/group/", $group)
- let $group-profile-collection := "contributors"
- let $profile-collection :=
- let $pc := concat($group-collection, "/", $group-profile-collection)
- return (
- if (xmldb:collection-available($pc))
- then ()
- else
- if (xmldb:create-collection($group-collection, $group-profile-collection))
- then (
- sm:chown(xs:anyURI($pc), $group),
- sm:chgrp(xs:anyURI($pc), $group),
- sm:chmod(xs:anyURI($pc), "rwxrwxr-x")
- )
- else error(xs:QName('err:CREATE'), concat("Cannot create collection", $group-collection, "/", $group-profile-collection)),
- $pc
- )
- let $resource-name := concat($identifier, ".xml")
- let $resource-path := concat($profile-collection, "/", $resource-name)
- return (
- if (xmldb:store($profile-collection, $resource-name,
- element tei:ptr {
- attribute xml:id { $identifier },
- attribute target {
- replace(document-uri(root($has-identifier)), "^/db", "")
- }
- } ))
- then (
- sm:chown(xs:anyURI($resource-path), $group),
- sm:chgrp(xs:anyURI($resource-path), $group),
- sm:chmod(xs:anyURI($resource-path), "rwxrwx---")
- )
- else
- error(xs:QName("err:CREATE"), concat("Cannot create public profile for ", $identifier)),
- local:public-profile-by-id($node, $identifier)
- )
-};
-
-declare function local:write-respons-element(
- $begin-element as element()?,
- $end-element as element()?,
- $resp-type as xs:string,
- $locus as xs:string,
- $profile-id as xs:string
- ) as element(tei:respons)? {
- if (exists($end-element))
- then
- element tei:respons {
- attribute locus { $locus },
- attribute resp { $profile-id },
- attribute j:role { $resp-type },
- attribute target {
- if (($begin-element is $end-element) or empty($begin-element))
- then
- concat("#", $end-element/@xml:id/string())
- else
- concat("#range(", $begin-element/@xml:id/string(),
- ",", $end-element/@xml:id/string() ,")")
- }
- }
- else ()
-};
-
-declare function local:make-ranges(
- $targets as element()*,
- $begin-element as element()?,
- $previous-element as element()?,
- $resp-type as xs:string,
- $locus as xs:string,
- $profile-id as xs:string,
- $ignore-nodes as node()*
- ) as element(tei:respons)* {
- if (empty($targets))
- then
- if (empty($previous-element))
- then ((: nothing to do... :))
- else local:write-respons-element($begin-element, $previous-element, $resp-type, $locus, $profile-id)
- else
- let $this := $targets[1]
- let $preceding := $this/preceding-sibling::*[@xml:id][not(. is $ignore-nodes)][1]
- return
- if ((empty($previous-element)) or ($preceding is $previous-element))
- then
- local:make-ranges(
- subsequence($targets,2), ($begin-element, $this)[1], $this,
- $resp-type, $locus, $profile-id, $ignore-nodes)
- else (
- local:write-respons-element($begin-element,$previous-element, $resp-type, $locus, $profile-id),
- local:make-ranges(subsequence($targets,2), $this, $this,
- $resp-type, $locus, $profile-id, $ignore-nodes)
- )
-};
-
-(: collapse the responsibilities of $profile-id in a given document
- : into ranges; ignore $ignore-nodes, which will be subsequently deleted
- :)
-declare function local:collapse-ranges(
- $doc as document-node(),
- $profile-ids as xs:string+,
- $resp-types as xs:string+,
- $ignore-nodes as node()*
- ) {
- (# exist:batch-transaction #) {
- for $profile-id in $profile-ids
- for $resp-type in $resp-types
- let $all-respons := $doc//tei:respons[@j:role=$resp-type][@resp=$profile-id]
- [@target] (: reject uncollapsable @match responsibilities :)
- return (
- for $respons-locus in $all-respons
- group $respons-locus as $l-respons by $respons-locus/@locus as $locus
- return
- let $all-targets := (
- for $respons in $l-respons
- return uri:follow-tei-link($respons, 1)
- ) | ((: sort into document order:))
- let $new-ranges :=
- local:make-ranges($all-targets, (), (), $resp-type, $locus, $profile-id, $ignore-nodes)
- where exists($new-ranges)
- return
- update insert $new-ranges into $doc//j:respList,
- update delete $all-respons
- )
- }
-};
-
-declare function resp:add(
- $node as element(),
- $resp-type as xs:string,
- $identifier as xs:string
- ) {
- resp:add($node,$resp-type,$identifier, "location value")
-};
-
-(:~ get a relative link to the profile; if it doesn't exist, make one :)
-declare function local:get-public-profile(
- $node as node(),
- $identifier as xs:string
- ) as xs:string? {
- let $existing := local:public-profile-by-id($node, $identifier)
- return
- if ($existing)
- then $existing
- else
- let $new := local:make-public-profile($node, $identifier)
- return
- if ($new)
- then $new
- else error(xs:QName("err:NOPROFILE"),
- concat("The user ", $identifier, " has no profile and there is no way to make one. Upload a profile manually"))
-};
-
-
-(:~ declare that the user with the given $identifier is
- : responsible for $resp-type on node(). The responsibility extends
- : to $locus (default "value")
- :)
-declare function resp:add(
- $node as element(),
- $resp-type as xs:string,
- $identifier as xs:string,
- $locus as xs:string
- ) {
- (: does the element have @xml:id? if not, error :)
- if (not($node/@xml:id))
- then
- error(xs:QName("err:INPUT"), "The node must have an @xml:id attribute.")
- else if (not($resp-type=$resp:valid-responsibility-types))
- then
- (: is the resp-type valid? if not, error :)
- error(xs:QName("err:INPUT"), concat(
- "The responsibility type must be selected from: ",
- string-join($resp:valid-responsibility-types, ",")))
- else
- let $profile-id := local:get-public-profile($node, $identifier)
- let $doc := root($node)
- return (
- update insert
- local:write-respons-element((),$node,$resp-type,$locus,$profile-id)
- into $doc//j:respList,
- local:collapse-ranges($doc,$profile-id,$resp-type, ())
- )
-};
-
-(:~ declare that $identifier is responsible for $attribute
- : with responsibility type $resp-type and locus $locus
- : Note that these are not indexed properly.
- :)
-declare function resp:add-attribute(
- $attribute as attribute(),
- $resp-type as xs:string,
- $identifier as xs:string,
- $locus as xs:string
- ) {
- (: does the element have @xml:id? if not, error :)
- if (not($resp-type=$resp:valid-responsibility-types))
- then
- (: is the resp-type valid? if not, error :)
- error(xs:QName("err:INPUT"), concat(
- "The responsibility type must be selected from: ",
- string-join($resp:valid-responsibility-types, ",")))
- else
- let $profile-id :=
- local:get-public-profile($attribute/parent::*, $identifier)
- let $doc := root($attribute)
- return (
- update insert
- element tei:respons {
- attribute locus { $locus },
- attribute resp { $profile-id },
- attribute j:role { $resp-type },
- attribute match {
- app:xpath($attribute)
- }
- }
- into $doc//j:respList
- (: , this kind of resp is not indexed yet, but could be
- local:collapse-ranges($doc,$profile-id,$resp-type):)
- )
-};
-
-
-(:~ declare that $identifier is no longer considered responsible
- : for $resp-type on $node
- :)
-declare function resp:remove(
- $node as element(),
- $resp-type as xs:string?,
- $identifier as xs:string
- ) {
- let $doc := root($node)
- where $node/@xml:id
- return
- let $profile-id := local:public-profile-by-id($node, $identifier)
- let $resp-to-remove := resp:query($node, $resp-type)[@resp=$profile-id]
- where exists($resp-to-remove)
- return (
- (#exist:batch-transaction#) {
- for $resp in $resp-to-remove
- let $targets :=
- uri:follow-uri($resp/@target/string(), $resp, uri:follow-steps($resp))
- except $node
- return (
- update insert
- local:make-ranges($targets, (), (),
- $resp-type, $resp/@locus/string(), $profile-id, ())
- into $doc//j:respList
- ),
- update delete $resp-to-remove
- },
- local:collapse-ranges($doc, $profile-id, $resp-type, ())
- )
-};
-
-(:~ remove all responsibility references to a node
- :)
-declare function resp:remove(
- $node as element()
- ) {
- let $doc := root($node)
- where $node/@xml:id
- return
- let $resp-to-remove := resp:query($node)
- let $profile-ids := $resp-to-remove/@resp/string()
- let $resp-types := $resp-to-remove/@j:role/string()
- return (
- (# exist:batch-transaction #) {
- for $resp in $resp-to-remove
- let $targets :=
- uri:follow-uri($resp/@target/string(), $resp, uri:follow-steps($resp))
- except $node
- return
- update insert local:make-ranges($targets, (), (),
- $resp/@j:role/string(), $resp/@locus/string(),
- $resp/@resp/string(), $node) into $doc//j:respList,
- update delete $resp-to-remove
- },
- if (exists($resp-to-remove))
- then local:collapse-ranges($doc, $profile-ids, $resp-types, $node)
- else ()
- )
-};
diff --git a/code/modules/run-xslt.xql b/code/modules/run-xslt.xql
deleted file mode 100644
index f10ffcf3..00000000
--- a/code/modules/run-xslt.xql
+++ /dev/null
@@ -1,43 +0,0 @@
-xquery version "1.0";
-(: run an xslt script, relative to /code/transforms
- : The existence of this XQuery is a kluge because you have to start XSLT through xsl:import
- : The script accepts one parameter script=, which points to the script
- : document= points to the document you run the script on *or* post the document to the script
- :
- : The Open Siddur Project
- : Copyright 2010 Efraim Feinstein
- : Licensed under the GNU Lesser General Public License, version 3 or later
- :
- : $Id: run-xslt.xql 769 2011-04-29 00:02:54Z efraim.feinstein $
- :)
-
-import module namespace xmldb="http://exist-db.org/xquery/xmldb";
-import module namespace request="http://exist-db.org/xquery/request";
-import module namespace transform="http://exist-db.org/xquery/transform";
-
-import module namespace app="http://jewishliturgy.org/modules/app" at "/code/modules/app.xqm";
-import module namespace paths="http://jewishliturgy.org/modules/paths" at "/code/modules/paths.xqm";
-
-
-
-declare namespace xsl="http://www.w3.org/1999/XSL/Transform";
-
-let $authenticated := app:authenticate()
-let $script := request:get-parameter('script', '')
-let $document-param := request:get-parameter('document','')
-let $document :=
- if ($document-param)
- then doc($document-param)
- else request:get-data()
-return (
- if ($paths:debug)
- then
- util:log-system-out(
-
-
- {$document-param}
- {app:auth-user()}
- )
- else (),
- app:transform-xslt($document-param, app:concat-path('/db/code/transforms/', $script),(), ())
-)
diff --git a/code/modules/site.xqm b/code/modules/site.xqm
deleted file mode 100644
index 143c9633..00000000
--- a/code/modules/site.xqm
+++ /dev/null
@@ -1,243 +0,0 @@
-xquery version "1.0";
-
-(: site.xqm
- : Copyright 2010-2011 Efraim Feinstein
- : Licensed under the GNU Lesser General Public License, version 3 or later
- :
- : $Id: site.xqm 767 2011-04-28 18:15:42Z efraim.feinstein $
- :)
-module namespace site="http://jewishliturgy.org/modules/site";
-
-import module namespace app="http://jewishliturgy.org/modules/app"
- at "app.xqm";
-import module namespace controls="http://jewishliturgy.org/modules/controls"
- at "controls.xqm";
-import module namespace paths="http://jewishliturgy.org/modules/paths"
- at "paths.xqm";
-import module namespace login="http://jewishliturgy.org/apps/user/login"
- at "/code/apps/user/modules/login.xqm";
-
-declare default element namespace "http://www.w3.org/1999/xhtml";
-declare namespace ev="http://www.w3.org/2001/xml-events";
-declare namespace xf="http://www.w3.org/2002/xforms";
-declare namespace html="http://www.w3.org/1999/xhtml";
-
-declare option exist:serialize "method=xhtml media-type=text/xml indent=yes omit-xml-declaration=no
- doctype-public=-//W3C//DTD XHTML 1.1//EN
- doctype-system=http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd";
-
-
-declare variable $site:resource-path := 'resources';
-declare variable $site:templates-path := app:concat-path(($paths:prefix, $paths:modules, $site:resource-path));
-
-(:~ write a form
- :
- : @param $model the XForms model
- : @param $head-content the content of the page under the head element
- : @param $body-content the content of the page under the body element
- :)
-declare function site:form(
- $model as element(xf:model)?,
- $head-content as element()+,
- $body-content as element()+
- ) as node()+ {
-
- site:form($model, $head-content, $body-content,
- site:css(), site:header(), site:sidebar(), site:footer())
-};
-
-(:~ write a form with custom CSS link or style element
- : Use site:css() to get the default value
- :)
-declare function site:form(
- $model as element(xf:model)?,
- $head-content as element()+,
- $body-content as element()+,
- $css as element()*
- ) as node()+ {
-
- site:form($model, $head-content, $body-content, $css,
- site:header(), site:sidebar(), site:footer())
-};
-
-(:~ form with defaulted app-header :)
-declare function site:form(
- $model as element(xf:model)?,
- $head-content as element()+,
- $body-content as element()+,
- $css as element()*,
- $header as element()*,
- $sidebar as element()*,
- $footer as element()*)
- as node()+ {
- site:form($model, $head-content, $body-content, $css, $header, $sidebar, $footer,
- site:app-header())
-};
-
-
-(:~ write a form, long version that allows custom CSS, header, sidebar, footer, application header :)
-declare function site:form(
- $model as element(xf:model)?,
- $head-content as element()+,
- $body-content as element()+,
- $css as element()*,
- $header as element()*,
- $sidebar as element()*,
- $footer as element()*,
- $app-header as element()*)
- as node()+ {
- (
- $paths:xslt-pi, $paths:debug-pi,
-
-
- {
- $css,
- $head-content,
- (: favicon :)
- ,
- if ($paths:xforms-processor = 'xsltforms')
- then $model
- else ()
- }
-
-
- {
- if ($paths:xforms-processor = 'xsltforms')
- then ()
- else
-
- { $model }
-
- }
-
-
{
- $header
- }
-
{
- $sidebar
- }
- {
- if (exists($app-header))
- then
-
{
- $app-header
- }
- else ()
- }
-
{
- $body-content
- }
-
-
-
-
- )
-};
-
-(:~ site wide styling pointers (link, style) :)
-declare function site:css()
- as element()* {
-
-};
-
-(:~ site-wide header :)
-declare function site:header()
- as element()* {
- (
-
- )
-};
-
-(:~ show sidebar logo :)
-declare function site:_sidebar-logo(
- ) as element()+ {
-
-
-
The Open Siddur
-
-};
-
-(:~ return an id for a link submission given its target xql :)
-declare function site:_link-submission-id(
- $target-xql as xs:string
- ) as xs:string {
- concat('sidebar-',
- replace(
- replace($target-xql, '\.xql', '-submit'),
- '[/=?]', '-'
- )
- )
-};
-
-(:~ site-wide sidebar :)
-declare function site:sidebar()
- as element()* {
- (
- site:_sidebar-logo()
- )
-};
-
-(:~ return sidebar login actions :)
-declare function site:sidebar-login-actions-id(
- ) as xs:string {
- 'sidebar-login-actions'
-};
-
-(:~ sidebar menu, whose content is dependent on the login state :)
-declare function site:_sidebar-menu-ui(
- $login-instance-id as xs:string
- ) as element()+ {
-
-
-
- ,
-
-
-
-
-
-};
-
-(:~ standardized sidebar showing a login control
- : attached to the given instance (which must be in the form's model
- : @param $login-instance-id login instance id
- : The control id is {$login-instance-id}-control
- :)
-declare function site:sidebar-with-login(
- $login-instance-id as xs:string
- ) as element()* {
- (
- site:_sidebar-logo(),
- login:login-ui($login-instance-id, concat($login-instance-id, '-control'), false()),
- site:_sidebar-menu-ui($login-instance-id)
- )
-};
-
-(:~ site-wide footer :)
-declare function site:footer()
- as element()* {
- (
-
This site powered by eXist native XML database and {
- if ($paths:xforms-processor eq 'betterform')
- then BetterFORM
- else XSLTForms} XForms processor. The software is free and open source. See the source code for details.
- )
-};
-
-(: the app-header is a header that goes inside the applet's space :)
-declare function site:app-header()
- as element()* {
- ()
-};
diff --git a/code/modules/test2.xqm b/code/modules/test2.xqm
deleted file mode 100644
index ed293d73..00000000
--- a/code/modules/test2.xqm
+++ /dev/null
@@ -1,1064 +0,0 @@
-xquery version "3.0";
-(: Testing module
- : Original author: Wolfgang Meier (eXist db)
- :
- : Modified by Efraim Feinstein, 2011-2012
- :
- : Licensed under the GNU Lesser General Public License, version 2.1 or later
- :)
-(:
- :
- : Modifications from the original version:
- : * namespace change to avoid conflict with the original version
- :
- : * allow setup to be optional (not all tests require a setup)
- : ** allow setup to include code
- :
- : * add a top-level TestSuite element to contain multiple TestSet elements
- : and a function t:run-testSuite()
- : ** add setup and teardown for the entire suite
- : ** each TestSuite or TestSet can have asUser/password elements, indicating
- : the priviliges that the tests should run under. Higher depth
- : asUser overrides lower depth, and blank asUser resets to unauthenticated
- :
- : * add a element for tests with no code that can be
- : included into other TestSets with
- :
- : * allow each test to include any of:
- : ** at most 1 error element
- : ** 1 or _more_ xpath elements to perform tests on the (the xpath
- : element is a useful undocumented feature!); I changed the context of the
- : XPath evaluation so it always explicitly occurs in the context of the
- : output.
- : ** 1 or _more_ expected elements
- : ** combinations of xpath and expected elements, so multiple assertions
- : can be tested on the same code.
- :
- : * error, xpath, and expected elements can have an @desc attribute to
- : document the expected result in natural language
- :
- : * expected elements can have an @xpath attribute to limit the
- : expectation to a subset of the returned value
- :
- : * when literal XML is given as an output (through expected elements):
- : ** Attribute and element content can be specified to exist with any
- : value by replacing the expectation value with an elipsis ... (I borrowed
- : this idea from XSpec)
- : ** Attributes in the xml namespace can be aliased to
- : http://www.w3.org/1998/namespace/alias . That would allow multiple
- : expectations that use the same @xml:id attribute to coexist in the same
- : xml file.
- :
- : * add a namespace element to declare namespaces used in tests (the
- : current code uses in-scope-prefixes(), which sometimes behaves in
- : "unexpected" ways when XML is stored in the database: the prefixes are
- : only in-scope at the point they're used)
- :
- : * add an @as parameter to the variable element to specify the variable's
- : type (I don't know if this is ever necessary for XQuery)
- :
- : * run multiple test suites using t:run-testSuites(), format results using t:format-testResults()
- :
- : * XPath tests and internal functions can be run using XQuery 3.0
- :
- : * Many improvements to the html visualization in t:format-testResult()
- :
- : * Testing for XSLT in addition to XQuery:
- : ** XSLT tests have xslt elements instead of code, which also accept @href
- : ** node context can be set using the context element, which also accepts @href
- : ** stylesheets and parameters can be included using xsl:include and xsl:param
- : ** stylesheet-global parameters can be sent using parameters/param[@name,@value] elements
- : *** parameters with the same name are passed at the greatest depth
- :
- :)
-module namespace t="http://exist-db.org/xquery/testing/modified";
-
-import module namespace xdb="http://exist-db.org/xquery/xmldb";
-
-declare function local:error(
- $activity as xs:string,
- $line as xs:string,
- $column as xs:string,
- $code as xs:string,
- $description as xs:string,
- $value as xs:string,
- $error-data as item()*
- ) as element(error) {
-
- {$value}
-
{
- $description
- }
- {$error-data}
-
-};
-
-declare function t:setup-action($action) {
- typeswitch ($action)
- case element(code) return
- t:setup-run($action)
- case element(create-collection) return
- xdb:create-collection($action/@parent, $action/@name)
- case element(store) return
- t:store($action)
- case element(store-files) return
- t:store-files($action)
- case element(remove-collection) return
- if (xdb:collection-available($action/@collection))
- then
- xdb:remove($action/@collection)
- else ()
- case element(remove-document) return
- if (doc-available(concat($action/@collection, "/", $action/@name)))
- then xdb:remove($action/@collection, $action/@name)
- else ()
- case element(copy) return
- t:copy($action)
- default return
- ()
-};
-
-declare function t:setup-run($action as element(code)) {
- util:eval(concat(t:init-prolog($action), $action/string()))
-};
-
-(: return whether a test should run
- : false() = run, true() = do not run
- : element(error) = do not run, the condition has an error
- :)
-declare function t:if(
- $condition as element(if)*
- ) as item() {
- try {
- not(
- empty($condition) or (
- every $cond in $condition
- satisfies (
- not(normalize-space($cond)) or
- boolean(util:eval(concat(t:init-prolog($cond), $cond/string())))
- )
- )
- )
- }
- catch * {
- local:error("condition", $err:line-number, $err:column-number,
- $err:code, $err:description, $err:value,
- $condition)
- }
-};
-
-declare function t:store($action as element(store)) {
- let $type :=
- if ($action/@type)
- then $action/@type/string()
- else "application/xml"
- let $data :=
- if ($action/*)
- then $action/*[1]
- else $action/string()
- return
- xdb:store($action/@collection, $action/@name, $data, $type)
-};
-
-declare function t:store-files($action as element(store-files)) {
- let $type := if ($action/@type) then $action/@type/string() else "application/xml"
- return
- xdb:store-files-from-pattern($action/@collection, $action/@dir, $action/@pattern, $type)
-};
-
-declare function t:setup(
- $setup as element(setup)?
- ) as empty-sequence() {
- for $action in $setup/*
- let $null := t:setup-action($action)
- return ()
-};
-
-declare function t:tearDown(
- $tearDown as element(tearDown)?
- ) as empty-sequence() {
- for $action in $tearDown/*
- let $null := t:setup-action($action)
- return ()
-};
-
-declare function t:copy(
- $copy as element(copy)
- ) as empty-sequence() {
- if ($copy/@destination-name)
- then
- let $uri := concat($copy/@source, "/", $copy/@name)
- let $null :=
- xmldb:store($copy/@destination, $copy/@destination-name,
- try { doc($uri) }
- catch err:FODC0005 { util:binary-doc($uri) }
- )
- return ()
- else
- xmldb:copy($copy/@source, $copy/@destination, $copy/@name)
-};
-
-declare function t:declare-variable($var as element(variable)) as item()? {
- let $children := $var/*
- return
- if (empty($children)) then
- string-join($var/node(), '')
- else
- util:serialize($children, ())
-};
-
-declare function t:init-prolog($test as element()) {
- let $imports := $test/ancestor::*/imports
- let $vars :=
- string-join(
- (
- for $ns in $test/ancestor::*/namespace
- return
- concat("declare namespace ", $ns/@prefix, " = '", string($ns), "';"),
- for $var in $test/ancestor::*/variable
- return
- string-join(("declare variable $", $var/@name,
- if ($var/@as)
- then (" as ", $var/@as)
- else (),
- " := ", t:declare-variable($var), ";"), '')
- ), "
"
- )
- return
- string-join(("xquery version '3.0';
", $imports, $vars, $test/ancestor::*/functions), '')
-};
-
-declare function t:test($result as item()*) {
- typeswitch($result)
- case xs:boolean return $result
- case xs:boolean+ return $result=true() (: any? :)
- default return exists($result)
-};
-
-declare function t:run-test(
- $test as element(test),
- $count as xs:integer
- ) {
- if (exists($test/code))
- then local:run-xquery-test($test, $count)
- else if (exists($test/(xslt|context)))
- then local:run-xslt-test($test, $count)
- else ( (: skip tests that dont have any code to run :) )
-};
-
-declare function local:evaluate-assertions(
- $test as element(test),
- $output as item()*,
- $count as xs:integer
- ) as element(test) {
- let $highlight-option :=
- concat("highlight-matches=",
- if ($test/expected//@*[matches(., '^(\|{3}).*\1$')]
- and $test/expected//exist:match)
- then "both"
- else if ($test/expected//@*[matches(., '^(\|{3}).*\1$')])
- then "attributes"
- else if ($test/expected//exist:match)
- then "elements"
- else "none"
- )
- let $serialize-options :=
- let $decls := ($test/../*[name() ne 'test']|$test/code)[matches(., 'declare[\- ]option(\(("|')|\s+)exist:serialize(\2,)?\s+("|').*?\4[;)]')]
- let $ops1 := $decls/replace(., "declare[\- ]option(\(("|')|\s+)exist:serialize(\2,)?\s+("|')(.*?)\4[;)]", "_|$5_")
- let $ops2 :=
- for $a in $ops1
- for $b in tokenize($a, '_')[starts-with(., '|')]
- return tokenize(substring-after($b, '|'), '\s+')
- return if (count($ops2[matches(., 'highlight-matches')]))
- then string-join($ops2, ' ')
- else string-join(($ops2, $highlight-option), ' ')
- let $expanded :=
- if ($output instance of element(error))
- then $output
- else if ($test/@serialize)
- then
- let $options := $test/@serialize
- let $serialized :=
- try {
- for $x in $output
- return
- util:serialize($x, $options)
- }
- catch * {
- local:error("serialization", $err:line-number,
- $err:column-number, $err:code, $err:description, $err:value, ())
- }
- return
- if ($serialized instance of element(error))
- then $serialized
- else
- normalize-space(string-join($serialized, ' '))
- else if ($output instance of node())
- then
- let $exp := util:expand($output, $serialize-options)
- return
- (: util:expand() kills document nodes :)
- typeswitch($output)
- case document-node()
- return document { $exp }
- default
- return $exp
- else $output
- let $OK :=
- for $assert in $test/(error|xpath|expected|t:expand-class(class))
- return
- try {
- if ($assert instance of element(error))
- then
- let $pass :=
- $expanded instance of element(error)
- and
- ( (: the assertion is that the err:* parameters
- : in the assertion match those in the returned
- : error :)
- every $err-attribute in $assert/@*
- satisfies $expanded/@*[name()=$err-attribute/name()]=$err-attribute
- )
- return
- {
- $assert/@desc,
- if (not($pass))
- then $assert
- else ()
- }
- else if ($assert instance of element(xpath))
- then
- let $pass := t:test(t:xpath($output, $assert))
- return
- {
- $assert/@desc,
- if (not($pass))
- then $assert
- else ()
- }
- else
- (: $assert is expected :)
- let $expected :=
- if ($assert/@href)
- then
- if ($test/@output eq "text")
- then util:binary-doc(resolve-uri($assert/@href, base-uri($assert)))
- else
- let $d := doc(resolve-uri($assert/@href, base-uri($assert)))
- return
- (: transform:transform() returns element()|node(), not document-node() :)
- if ($test/(xslt|context))
- then $d/*
- else $d
- else
- if ($test/@output eq "text")
- then data($assert)
- else $assert/node()
- return
- if ($test/@output eq 'text') then
- let $asString :=
- if ($test/@serialize)
- then $expanded
- else
- normalize-space(
- string-join(
- for $x in $output
- return string($x),
- ' '
- )
- )
- let $pass := $asString eq normalize-space($expected)
- return
- {
- $assert/@desc,
- if (not($pass))
- then $expected
- else ()
- }
- else
- let $xn := t:normalize($expanded)
- let $en := t:normalize($expected)
- let $xp :=
- if ($assert/@xpath)
- then t:xpath($xn, $assert/@xpath)
- else $xn
- let $pass := t:deep-equal-wildcard($xp, $en)
- return
- {
- $assert/(@desc, @xpath),
- if (not($pass))
- then $en
- else ()
- }
- }
- catch * {
- element { name($assert) }{
- attribute pass { false() },
- $assert/(@desc, @xpath),
- local:error("assertion",
- $err:line-number, $err:column-number,
- $err:code, $err:description, $err:value,
- $assert)
- }
- }
- let $all-OK := empty($OK[@pass='false'])
- return
- {
- attribute desc { $test/task },
- $OK,
- if (not($all-OK))
- then
- {
- if ($OK/error/@during = "assertion")
- then $OK/error[@during="assertion"]
- else $expanded
- }
- else ()
- }
-};
-
-(:~ run a single test and record the results of its assertions
- : @param $test Test to run
- : @param $count A number to assign to the test
- :)
-declare function local:run-xquery-test(
- $test as element(test),
- $count as xs:integer
- ) {
- let $context := t:init-prolog($test)
- let $null :=
- if ($test/@trace eq 'yes') then
- (system:clear-trace(), system:enable-tracing(true(), false()))
- else ()
- let $full-code := concat($context, $test/code/string())
- let $queryOutput :=
- try {
- util:eval($full-code)
- }
- catch * {
- local:error("evaluation",
- $err:line-number, $err:column-number,
- $err:code, $err:description, $err:value,
- $full-code)
- }
- let $output :=
- if ($test/@trace eq 'yes')
- then system:trace()
- else $queryOutput
- return
- local:evaluate-assertions($test, $output, $count)
-};
-
-declare function local:run-xslt-test(
- $test as element(test),
- $count as xs:integer
- ) as element(test) {
- let $output :=
- try {
- transform:transform(
- let $context :=
- $test/ancestor-or-self::*[context][1]/context
- return
- if ($context/@href)
- then doc(resolve-uri($context/@href,base-uri($context)))
- else $context/node(),
- if ($test/xslt/@href)
- then doc(resolve-uri($test/xslt/@href, base-uri($test/xslt)))
- else
-
- {
- $test/ancestor-or-self::*/xsl:*,
- $test/xslt/node()
- }
- ,
- (: the parameters are not passed without util:expand().
- : I don't know why. eXist 2.0.x r16344
- :)
- util:expand(
-
-
- {
- for $param in $test/ancestor-or-self::*/parameters/param
- group $param as $p by $param/@name as $n
- return
- ($p/.)[last()]
- }
-
- )
- )
- }
- catch * {
- local:error("transform",
- $err:line-number, $err:column-number,
- $err:code, $err:description, $err:value,
- $test)
- }
- return
- local:evaluate-assertions($test, $output, $count)
-};
-
-(: expand abstract test class references :)
-declare function t:expand-class(
- $classes as element(class)*
- ) as element()* {
- for $class in $classes
- let $base := substring-before($class/@href, '#')
- let $fragment := substring-after($class/@href, '#')
- let $doc :=
- if ($base)
- then doc(resolve-uri($base, base-uri($class)))
- else root($class)
- let $testClass as element(TestClass) := $doc/id($fragment)
- return
- $testClass/(error|xpath|expected|t:expand-class(class))
-};
-
-declare function t:normalize($nodes as node()*) {
- for $node in $nodes return t:normalize-node($node)
-};
-
-declare function t:normalize-node($node as node()) {
- typeswitch ($node)
- case element() return
- element { node-name($node) } {
- $node/@*, for $child in $node/node() return t:normalize-node($child)
- }
- case text() return
- let $norm := normalize-space($node)
- return
- if (string-length($norm) eq 0) then () else $node
- default return
- $node
-};
-
-declare function t:xpath($output as item()*, $xpath as node()) {
- let $xpath-element :=
- if ($xpath instance of element())
- then $xpath
- else $xpath/..
- let $prolog := t:init-prolog($xpath-element)
- let $expr := $xpath/string()
- let $test-element := $xpath/ancestor::test
- let $code :=
- concat($prolog,
- if ($test-element/@output=("text", "mixed"))
- then "("
- else " $output/(",
- $expr, ")")
- return
- util:eval($code)
-};
-
-(:~ run a number of test suites and return a single element
- : with all the results
- : @param $suites List of test suites, as paths, document-node()s or element(TestSuite)
- :)
-declare function t:run-testSuite(
- $suites as item()+,
- $run-user as xs:string?,
- $run-password as xs:string?
- ) as element() {
- {
- for $suite in $suites
- return
- t:run-testSuite(
- typeswitch($suite)
- case xs:anyAtomicType
- return doc($suite)/TestSuite
- case document-node()
- return $suite/TestSuite
- default return $suite,
- $run-user,
- $run-password
- )
- }
-};
-
-(:~ Front-end to run a test suite :)
-declare function t:run-testSuite(
- $suite as element(TestSuite),
- $run-user as xs:string?,
- $run-password as xs:string?
- ) as element() {
- let $copy := util:expand($suite)
- let $if := t:if($copy/if)
- return
-
- {$copy/suiteName}
- {$copy/description/p}
- {
- for $set in $suite/TestSet
- return
- if (not($if) or $set/(empty(@ignore) or @ignore = "no"))
- then t:run-testSet($set, $run-user, $run-password)
- else if ($if instance of element(error))
- then t:fail-testSet($set, $if)
- else t:ignore-testSet($set)
- }
-
-};
-
-declare function t:ignore-testSet(
- $set as element(TestSet)
- ) as element(TestSet) {
- {
- $set/testName,
- $set/description/p,
- for $test at $p in $set/test
- return t:ignore-test($test, $p)
- }
-};
-
-declare function t:fail-testSet(
- $set as element(TestSet),
- $error as element(error)+
- ) as element(TestSet) {
- {
- $set/testName,
- $set/description/p,
- for $test at $p in $set/test
- return t:fail-test($test, $p, $error)
- }
-};
-
-declare function t:fail-test(
- $test as element(test),
- $p as xs:integer,
- $error as element(error)+
- ) as element(test) {
- {
- attribute desc {$test/task},
- for $condition in $test/(expected|xpath|error|t:expand-class(class))
- return
- element { name($condition) }{
- $condition/@desc,
- attribute pass { "false" },
- $condition
- },
- {$error}
- }
-};
-
-
-declare function t:run-testSuite(
- $suite as element(TestSuite)
- ) as element() {
- t:run-testSuite($suite, (), ())
-};
-
-declare function local:run-tests-helper(
- $copy as element(TestSet),
- $suite as element(TestSuite),
- $run-user as xs:string?,
- $run-password as xs:string?
- ) as element(TestSet) {
- let $suite-user := ($suite/asUser/string(), $run-user)[1]
- let $suite-password := ($suite/password/string(), $run-password)[1]
- let $test-user := ($copy/asUser/string(), $suite-user, $run-user)[1]
- let $test-password := ($copy/password/string(), $suite-password, $run-password)[1]
- return
- util:expand(
- {
- $copy/testName,
- $copy/description/p,
- for $test at $p in $copy/test
- let $if := t:if($test/if)
- return
- if ($test/((empty(@ignore) or @ignore = "no") and not($if)))
- then
- let $setup as element(error)* := (
- try {
- if ($suite-user)
- then
- system:as-user($suite-user, $suite-password, t:setup($suite/setup))
- else t:setup($suite/setup)
- }
- catch * {
- local:error("setup",
- $err:line-number, $err:column-number,
- $err:code, $err:description, $err:value,
- $suite/setup)
- },
- try {
- if ($test-user)
- then
- system:as-user($test-user, $test-password, t:setup($copy/setup))
- else t:setup($copy/setup)
- }
- catch * {
- local:error("setup",
- $err:line-number, $err:column-number,
- $err:code, $err:description, $err:value,
- $copy/setup)
- }
- )
- let $result :=
- if ($setup instance of element(error))
- then ( (: setup failed, do nothing, but do try to tear down :) )
- else
- if ($test-user)
- then system:as-user($test-user, $test-password, t:run-test($test, $p))
- else t:run-test($test, $p)
- let $teardown as element(error)* := (
- try {
- if ($test-user)
- then
- system:as-user($test-user, $test-password, t:tearDown($copy/tearDown))
- else t:tearDown($copy/tearDown)
- }
- catch * {
- local:error("tearDown",
- $err:line-number, $err:column-number,
- $err:code, $err:description, $err:value,
- $copy/tearDown)
- },
- try {
- if ($suite-user)
- then
- system:as-user($suite-user, $suite-password, t:tearDown($suite/tearDown))
- else t:tearDown($suite/tearDown)
- }
- catch * {
- local:error("tearDown",
- $err:line-number, $err:column-number,
- $err:code, $err:description, $err:value,
- $suite/tearDown)
- }
- )
- return
- if (exists($setup))
- then t:fail-test($test,$p,$setup)
- else if (exists($teardown))
- then t:fail-test($test,$p,$teardown)
- else $result
- else if ($if instance of element(error))
- then t:fail-test($test, $p, $if)
- else t:ignore-test($test, $p)
- }
- )
-};
-
-(:~ Front-end to run a single test set :)
-declare function t:run-testSet(
- $set as element(TestSet),
- $run-user as xs:string?,
- $run-password as xs:string?
- ) as element(TestSet)? {
- let $suite := $set/parent::TestSuite
- let $copy :=
- if ($suite)
- then $set
- else util:expand($set)
- let $if := t:if($copy/if)
- return
- if (not($if))
- then local:run-tests-helper($copy, $suite, $run-user, $run-password)
- else if ($if instance of element(error))
- then t:fail-testSet($copy, $if)
- else t:ignore-testSet($copy)
-};
-
-declare function t:ignore-test(
- $test as element(test),
- $count as xs:integer
- ) as element(test) {
- {
- attribute desc {$test/task},
- for $condition in $test/(expected|xpath|error|t:expand-class(class))
- return
- element { name($condition) }{
- attribute pass { "ignore" },
- $condition/@desc
- }
- }
-};
-
-declare function t:run-testSet(
- $set as element(TestSet)
- ) {
- t:run-testSet($set, (), ())
-};
-
-declare function local:pass-string(
- $pass as xs:string
- ) {
- switch ($pass)
- case "true"
- return "PASS"
- case "false"
- return "FAIL"
- default
- return "IGNORE"
-};
-
-declare function local:result-summary-table(
- $result as element(TestSet)*
- ) as element(table) {
-
-
-
Tests
-
Passed
-
Failed
-
Ignored
-
-
-
{count($result//test/*[@pass])}
-
{
- let $ct := count($result//test/*[@pass='true'])
- return (
- if ($ct)
- then
- attribute class {'PASS'}
- else (),
- $ct
- )
- }
-
{
- let $ct := count($result//test/*[@pass='false'])
- return (
- if ($ct)
- then
- attribute class {'FAIL'}
- else (),
- $ct
- )
- }
-
{
- let $ct := count($result//test/*[@pass='ignore'])
- return (
- if ($ct)
- then
- attribute class {'IGNORE'}
- else (),
- $ct
- )
- }
-
-
-};
-
-declare function local:result-summaries(
- $result as element()
- ) {
-
Summary
,
- if ($result instance of element(TestSuites))
- then (
-
All
,
- local:result-summary-table($result//TestSet)
- )
- else (),
- for $testSuite in $result/(self::TestSuite|TestSuite|self::TestSet)
- return (
- element {
- if ($result instance of element(TestSuites))
- then "h3"
- else "h2"
- }{
- if ($testSuite instance of element(TestSuite))
- then
- {$testSuite/suiteName/node()}
- else $testSuite/testName/node()
- },
- local:result-summary-table($testSuite/(self::TestSet|TestSet))
- )
-};
-
-declare function local:result-details(
- $result as element()
- ) {
-
Details
,
- for $suite in $result/(self::TestSet|TestSuite|self::TestSuite)
- return (
- if ($suite instance of element(TestSuite))
- then (
-
{$suite/suiteName/node()}
,
- $suite/description/p
- )
- else (),
-
{
- for $set in $suite//TestSet
- return (
-
-
{
- if ($set/description)
- then ()
- else attribute colspan { 5 },
- $set/testName/node()
- }
- {
- if ($set/description)
- then
-
{$set/description/p/node()}
- else ()
- }
-
,
- for $test in $set//test
- let $pass := local:pass-string($test/@pass)
- let $subtests := $test/(* except (code, task, result))
- let $n-subtests := count($subtests)
- return (
- for $subtest at $pos in $subtests
- let $subpass := local:pass-string($subtest/@pass)
- return
-
- )
-};
-
-(:~ Format a test result as HTML :)
-declare function t:format-testResult($result as element()) {
- (: This should be namespaced, but it isn't.
- : Using xmlns is impractical because the referenced elements would be html ns
- : and we can't declare a blank namespace prefix.
- : Using a prefix is impractical because browsers don't like it.
- :)
-
-
- {
- if ($result instance of element(TestSuite)
- or $result instance of element(TestSet)
- )
- then
- $result/(testName|suiteName)/node()
- else "Test Results"
- }
-
-
- {
- local:result-summaries($result),
- local:result-details($result)
- }
-
-};
-
-(:~ determine if two nodes are deep-equal, allowing for the string ... to be a wildcard
- : and the namespace http://www.w3.org/1998/xml/namespace/alias to be equivalent to the
- : xml namespace
- : @param $node1 The original node
- : @param $node2 The expectation node, which may include aliased namespaces and wildcards
- :)
-declare function t:deep-equal-wildcard(
- $node1 as node()*,
- $node2 as node()*
- ) as xs:boolean {
- let $counts := count($node1) = count($node2)
- let $subordinates :=
- (every $result in
- (
- for $n at $pos in $node1
- return
- typeswitch ($n)
- case document-node() return t:deep-docnode($n, $node2[$pos])
- case comment() return t:deep-comment($n, $node2[$pos])
- case text() return t:deep-text($n, $node2[$pos])
- case attribute() return t:deep-attribute($n, $node2)
- case element() return t:deep-element($n, $node2[$pos])
- default return false()
- )
- satisfies $result
- )
- return (
- $counts and $subordinates
- )
-};
-
-declare function t:deep-docnode(
- $node1 as document-node(),
- $node2 as node()
- ) as xs:boolean {
- ($node2 instance of document-node()) and
- t:deep-equal-wildcard($node1/node(), $node2/node())
-};
-
-declare function t:deep-comment(
- $node1 as comment(),
- $node2 as node()
- ) as xs:boolean {
- ($node2 instance of comment()) and (
- string($node1) = string($node2)
- or string($node2) = '...'
- )
-};
-
-declare function t:deep-text(
- $node1 as text(),
- $node2 as node()
- ) as xs:boolean {
- ($node2 instance of text()) and (
- string($node1) = string($node2)
- or string($node2) = '...'
- )
-};
-
-declare function t:deep-attribute(
- $node1 as attribute(),
- $node2 as attribute()*
- ) as xs:boolean {
- let $equivalent :=
- $node2[
- (
- namespace-uri(.) = namespace-uri($node1)
- or
- namespace-uri(.) = 'http://www.w3.org/1998/xml/namespace/alias' and
- namespace-uri($node1) = 'http://www.w3.org/1998/xml/namespace'
- )
- and local-name(.) = local-name($node1)
- ]
- return exists($equivalent) and (
- string($equivalent) = (string($node1), '...')
- )
-};
-
-declare function t:deep-element(
- $node1 as element(),
- $node2 as node()
- ) as xs:boolean {
- ($node2 instance of element()) and
- namespace-uri($node1) = namespace-uri($node2) and
- local-name($node1) = local-name($node2) and
- t:deep-equal-wildcard($node1/@*, $node2/@*) and
- (
- (count($node2/node()) = 1 and string($node2) = '...') or
- t:deep-equal-wildcard($node1/node(), $node2/node())
- )
-};
diff --git a/code/modules/view-html.xql b/code/modules/view-html.xql
deleted file mode 100644
index de6d0037..00000000
--- a/code/modules/view-html.xql
+++ /dev/null
@@ -1,84 +0,0 @@
-(: view-html.xql
- : Accepts one required parameter ?doc=
- : Attempt to read the html file it points to, run a small XSLT script to
- : set a base URI, and set its doctype.
- :
- : Open Siddur Project
- : Copyright 2011 Efraim Feinstein
- : Licensed under the GNU Lesser General Public License version 3 or later
- : $Id: view-html.xql 706 2011-02-21 01:18:10Z efraim.feinstein $
- :)
-xquery version "1.0";
-
-import module namespace transform="http://exist-db.org/xquery/transform";
-import module namespace xsl="http://www.w3.org/1999/XSL/Transform";
-
-import module namespace app="http://jewishliturgy.org/modules/app"
- at "/db/code/modules/app.xqm";
-import module namespace paths="http://jewishliturgy.org/modules/paths"
- at "/db/code/modules/paths.xqm";
-
-declare default element namespace "http://www.w3.org/1999/xhtml";
-
-declare option exist:serialize "method=xhtml media-type=text/html omit-xml-declaration=no indent=no
- doctype-public=-//W3C//DTD XHTML 1.1//EN
- doctype-system=http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd";
-
-(: transform to convert link elements into inline style
- : to avoid authentication issues :)
-declare function local:identity(
- $data as node()
- ) as node() {
- typeswitch ($data)
- case element() return (
- element { node-name($data) }{
- $data/@*, local:transform($data/node())
- }
- )
- default return $data
-};
-
-declare function local:transform-link(
- $data as element(link)
- ) as element(style) {
- if ($data/@type='text/css' and $data/@rel='stylesheet')
- then (
-
- )
- else local:identity($data)
-};
-
-declare function local:doc-node(
- $data as document-node()
- ) as document-node() {
- document {
- local:transform($data/node())
- }
-};
-
-declare function local:transform(
- $data as node()*
- ) {
- for $node in $data
- return (
- typeswitch ($node)
- case text() return $node
- case document-node() return local:doc-node($node)
- case element(link) return local:transform-link($node)
- default return local:identity($node)
- )
-};
-
-
-let $authentication := app:authenticate()
-let $src := request:get-parameter('doc','')
-let $doc := doc($src)
-let $base := resolve-uri($src, $paths:external-rest-prefix)
-return
- local:transform($doc)
diff --git a/code/modules/wiki.xqm b/code/modules/wiki.xqm
deleted file mode 100644
index 6ae82f3e..00000000
--- a/code/modules/wiki.xqm
+++ /dev/null
@@ -1,38 +0,0 @@
-xquery version "1.0";
-(: wiki.xqm
- : General wiki interface
- :
- : Open Siddur Project
- : Copyright 2010 Efraim Feinstein
- : Licensed under the GNU Lesser General Public License, version 3 or later
- : $Id: wiki.xqm 687 2011-01-23 23:36:48Z efraim.feinstein $
- :)
-module namespace wiki="http://jewishliturgy.org/modules/wiki";
-
-declare namespace html="http://www.w3.org/1999/xhtml";
-declare namespace xf="http://www.w3.org/2002/xforms";
-declare namespace ev="http://www.w3.org/2001/xml-events";
-declare namespace xs="http://www.w3.org/2001/XMLSchema";
-
-declare option exist:serialize "method=text media-type=text/plain indent=no process-pi-xsl=no";
-
-declare variable $wiki:server := 'http://wiki.jewishliturgy.org';
-declare variable $wiki:path := '/w/index.php?title=';
-
-(:~ Determine if a wiki user's login and password are correct
- : @param $user-name Name of the wiki user
- : @param $password Password
- :)
-declare function wiki:valid-user(
- $user-name as xs:string,
- $password as xs:string)
- as xs:boolean {
-
- let $mediawiki-login := xs:anyURI(concat(
- 'http://wiki.jewishliturgy.org/w/api.php?action=login&lgname=', $user-name,
- '&lgpassword=', $password,
- '&format=xml'))
- let $mediawiki-response := httpclient:post($mediawiki-login, '', false(), ())
- let $mediawiki-answer := $mediawiki-response//@result
- return xs:boolean($mediawiki-answer = 'Success')
-};
diff --git a/code/modules/xspec.xqm b/code/modules/xspec.xqm
deleted file mode 100644
index bbd2fab5..00000000
--- a/code/modules/xspec.xqm
+++ /dev/null
@@ -1,235 +0,0 @@
-xquery version "1.0";
-(: Run the XSpec test suite. All tests can be run except the
- : coverage test, because it requires a special Java class.
- : Assumes the xspec XSLTs are in $xspec:collection
- :
- : Copyright 2010-2011 Efraim Feinstein
- : Licensed under the GNU Lesser General Public License, version 3 or later
- :)
-
-module namespace xspec="http://jewishliturgy.org/modules/xspec";
-
-import module namespace app="http://jewishliturgy.org/modules/app"
- at "app.xqm";
-import module namespace paths="http://jewishliturgy.org/modules/paths"
- at "paths.xqm";
-
-declare namespace t="http://www.jenitennison.com/xslt/xspec";
-declare namespace xsl="http://www.w3.org/1999/XSL/Transform";
-declare namespace err="http://jewishliturgy.org/errors";
-(:declare namespace xxml="http://jewishliturgy.org/ns/xml-alias";:)
-
-declare variable $xspec:collection as xs:string :=
- '/code/modules/resources/xspec/src';
-(:
-declare variable $xspec:xxml-namespace-uri :=
- 'http://jewishliturgy.org/ns/xml-alias';
-:)
-
-(:~ Load a document or flag an err:NOTFOUND error if the document cannot be loaded. :)
-declare function xspec:_doc-or-error(
- $doc as xs:anyURI
- ) as document-node() {
- if (doc-available($doc))
- then doc($doc)
- else error(xs:QName('err:NOTFOUND'), concat('Document ', $doc, ' not found.'))
-};
-
-(:~ load an xml root element, given an item() pointing to it, which may be a URI, document node, string, or element
- : @param $item The item to load
- :)
-declare function xspec:_load-xml-from-item(
- $item as item()
- ) as element() {
- typeswitch ($item)
- case $t as xs:string
- return xspec:_doc-or-error($t cast as xs:anyURI)/*
- case $t as xs:anyURI
- return xspec:_doc-or-error($t)/*
- case $t as element()
- return $t
- case $t as document-node()
- return $t/*
- default
- return error(xs:QName('err:INVALID'), concat('Cannot load ', $item, ': it is of unknown type.'))
-
-};
-
-(:~ Absolutize a URI in an attribute, assuming it's pointing to a location in the database :)
-declare function xspec:_relative-to-absolute(
- $attribute as attribute()*
- ) as attribute()* {
- for $attr in $attribute
- let $element := $attr/..
- return
- attribute {node-name($attr)}{
- let $str-val := string($attr)
- let $resolved := resolve-uri($str-val, document-uri(root($attr)))
- let $value :=
- if (matches($resolved,'^(http|xmldb:exist)://'))
- then $resolved
- else string-join((
- if (namespace-uri($element) = 'http://www.jenitennison.com/xslt/xspec' and
- local-name($element) = ('description','import'))
- then 'http://localhost:8080'
- else 'xmldb:exist://',
- if (starts-with($resolved, '/')) then '' else '/',
- $resolved), '')
- return (
- $value,
- util:log-system-out(('resolving ', $resolved, ' into ', $value))
- )
- }
-};
-
-(:~ find attributes from xxml namespace, translate to xml namespace :)
-(:
-declare function xspec:_xxml-to-xml(
- $attribute as attribute()*
- ) as attribute()* {
- for $attr in $attribute
- return
- if (namespace-uri($attr) = $xspec:xxml-namespace-uri)
- then
- attribute {concat('xml:', local-name($attr))} {string($attr)}
- else
- $attr
-};
-:)
-
-(:~ Find all instances of @stylesheet and @href elements and make them absolute URIs pointing into the db
- : Find all instances of @xxml:* and turn them into @xml:*
- : @param $xspec An element from an XSpec file
- :)
-declare function xspec:_transform-attributes(
- $xspec as element()
- ) as element() {
- element {node-name($xspec)}
- {
- $xspec/(@* except (@stylesheet,@href (:, @xxml:* :))),
- xspec:_relative-to-absolute(($xspec/@stylesheet, $xspec/@href)),
- for $child in $xspec/node()
- return
- if ($child instance of element())
- then xspec:_transform-attributes($child)
- else $child
- }
-};
-
-(:~ Convert XSpec XML to a stylesheet.
- : @param $xspec-xml The XSpec file: either a pointer or a node()
- : @return The compiled stylesheet
- :)
-declare function xspec:create-test-stylesheet(
- $xspec-xml as item()
- ) as element() {
- let $xspec-doc :=
- xspec:_load-xml-from-item($xspec-xml)
- let $absolutize-transformed :=
- (: Convert @stylesheet and @href to absolute URIs :)
- xspec:_transform-attributes($xspec-doc)
- let $xspec-transform := (: http://localhost:8080 changed to xmldb: :)
-
-
-
- return (
- transform:transform($absolutize-transformed, $xspec-transform, ())
-
- )
-};
-
-(:~ Run XSpec tests on a compiled stylesheet
- : @param $compiled-test The stylesheet as compiled by create-test-stylesheet()
- :)
-declare function xspec:run-tests(
- $compiled-test as item()
- ) as document-node() {
- let $test-doc as element(xsl:stylesheet) :=
- xspec:_load-xml-from-item($compiled-test)
- let $xslt :=
- (: add a matched template that duplicates x:main without xsl:result-document :)
- transform:transform(
- $compiled-test,
-
-
-
-
- {attribute {'copy-namespaces'}{'yes'}}
-
-
-
-
-
-
-
-
-
- ,
- ())
- return
- document {
- transform:transform(, $xslt, ())
- }
-};
-
-(:~ format an XSpec report
- : @param $report The report from run-tests()
- :)
-declare function xspec:format-report(
- $report as item())
- as element() {
- let $report-doc as element() :=
- xspec:_load-xml-from-item($report)
- return
- transform:transform($report-doc,
- doc(concat($xspec:collection, '/reporter/format-xspec-report.xsl')),
- ())
-};
-
-
-(:~ front end to all XSpec tests. Run the tests and generate an HTML
- : report.
- : @param $tests The test scenario file
- :)
-declare function xspec:test(
- $tests as item()
- ) as document-node() {
- let $formatted-report :=
- xspec:format-report(
- xspec:run-tests(
- xspec:create-test-stylesheet($tests)
- )
- )
- return
- document {
- transform:transform($formatted-report,
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- ,
- ())
- }
-};
diff --git a/code/queries/biblio.xqm b/code/queries/biblio.xqm
deleted file mode 100644
index d036a9f5..00000000
--- a/code/queries/biblio.xqm
+++ /dev/null
@@ -1,136 +0,0 @@
-xquery version "1.0";
-(:
-: Module Name: Bibliography API
-: Module Version: $Id: biblio.xqm 258 2009-09-02 01:46:07Z efraim.feinstein $
-: Date: August 12, 2009
-: Copyright: 2009 Efraim Feinstein . LGPL 3+
-: Proprietary XQuery Extensions Used:
-: XQuery Specification: January 2007
-: Module Overview: Provides an API to a bibliography list.
-: Requires that the context be set to a valid bibliography file.
-:)
-(:~
- :
- : @author Efraim Feinstein
- :)
-module namespace
- biblio="http://jewishliturgy.org/ns/functions/biblio";
-
-import module namespace
- jvalidation="http://jewishliturgy.org/ns/functions/nonportable/validation";
-
-declare namespace tei="http://www.tei-c.org/ns/1.0";
-
-declare variable $biblio:listBibl :=
- //tei:TEI/tei:text/tei:body/tei:div[@type='bibliography']/tei:listBibl;
-
-declare variable $biblio:SCHEMATRON :=
- '/queries/biblio.sch' cast as xs:anyURI;
-
-declare variable $biblio:RELAXNG :=
- '/schema/jlptei.rng' cast as xs:anyURI;
-
-(:~ @return whether the context is a bibliographic file
- :)
-declare function biblio:is-valid-file()
- as xs:boolean {
- validation:jing(root(), $biblio:SCHEMATRON)
-};
-
-(:~ @return why the context is an (in)valid bibliography :)
-declare function biblio:why-invalid-file()
- as element(report) {
- jvalidation:validate-schematron(root(), $biblio:SCHEMATRON)
-};
-
-(:~ Determine if a given item is a valid bibliographic item
- : @return whether the file is valid :)
-declare function biblio:is-valid-item($content as element(tei:biblStruct))
- as xs:boolean {
- validate:jing($content, $biblio:SCHEMATRON)
-};
-
-(:~ Determine why a given item is an (in)valid bibliographic item
- : @return a report of the book entry's status :)
-declare function biblio:why-invalid-item($content as element(tei:biblStruct))
- as element(report) {
- validate:jing-report($content, $biblio:SCHEMATRON)
-};
-
-(:~ Add an item to the bibliography
- : @return a report element indicating success or failure :)
-declare function biblio:add($content as element(tei:biblStruct))
- as element(report) {
- if biblio:is-valid-item($content)
- then
-
- ok
- {update insert $content into $biblio:listBibl}
-
- else
- biblio:why-invalid-item($content)
-};
-
-(:~ edit an existing bibliographic entry
- : @param $content the new content, where @xml:id identifies
- : which element is being edited
- : @return report with ok status or error
- :)
-declare function biblio:edit($content)
- as element() {
- let $contentToEdit :=
- biblio:get-by-id($content/@xml:id) |
- let $numberOfContents := count($contentToEdit)
- return
- if ($numberOfContents eq 0)
- then
- (: this is an add operation :)
- biblio:add($content)
- else
- (: this is an edit operation :)
- if (biblio:is-valid-item($content)
- then
-
- ok
- {update replace $contentToEdit with $content}
-
- else
- biblio:why-invalid-item($content)
-};
-
-
-(: Remove an item from the bibliography (referenced by its xml:id).
- : TODO: do not remove it if it's referenced
- :)
-declare function biblio:remove($xmlid as xs:string)
- as element(report) {
-
- ok
- {update delete $biblio:listBibl/tei:biblStruct[@xml:id=$xmlid]}
-
-}
-
-(:~ get a bibliographic entry by xml:id
- : @param $xmlid the xml:id
- : @return the item, or empty
- :)
-declare function biblio:get-by-id($xmlid as xs:string)
- as element(tei:biblStruct)? {
- $biblio:listBibl/tei:biblStruct[@xml:id eq $xmlid]
-};
-
-(:~ search the bibliography by string information
- : (eg, author, editor, title, publisher)
- : @param $regex is a regular expression defining the search term
- : @return the tei:item(s) that match
- :)
-declare function biblio:get-by-string($regex as xs:string)
- as element(tei:biblStruct)* {
- $biblio:listBibl/tei:biblStruct[matches(.,$regex)]
-};
-
-(:~ @return all items :)
-declare function biblio:get-all()
- as element(tei:biblStruct)* {
- $biblio:listBibl/tei:biblStruct
-};
diff --git a/code/queries/contrib.xqm b/code/queries/contrib.xqm
deleted file mode 100644
index 6ea0cc6d..00000000
--- a/code/queries/contrib.xqm
+++ /dev/null
@@ -1,206 +0,0 @@
-xquery version "1.0";
-(:
-: Module Name: Contributor List API
-: Module Version: $Id: contrib.xqm 258 2009-09-02 01:46:07Z efraim.feinstein $
-: Date: August 10, 2009
-: Copyright: 2009 Efraim Feinstein . LGPL 3+
-: Proprietary XQuery Extensions Used:
-: XQuery Specification: January 2007
-: Module Overview: Provides an API to a contributor list.
-: Requires that the context be set to a valid contributor list.
-: Functions return
-: valid|invalid|ok|error explanation...
-:)
-(:~
- : @author Efraim Feinstein
- :)
-module namespace
- contrib="http://jewishliturgy.org/ns/functions/contrib";
-
-import module namespace
- jvalidate="http://jewishliturgy.org/ns/functions/nonportable/validation";
-import module namespace
- jupdate="http://jewishliturgy.org/ns/functions/nonportable/update";
-
-declare namespace tei="http://www.tei-c.org/ns/1.0";
-
-declare variable $contrib:contributor-list :=
- //tei:TEI/tei:text/tei:body/tei:div[@type='contributors']/tei:list;
-
-declare variable $contrib:SCHEMATRON :=
- '/queries/contrib.sch' cast as xs:anyURI;
-
-(:~ @return whether the context has a contributor list,
- : making no statement about its validity.
- :)
-declare function contrib:is-a() as xs:boolean {
- boolean($contrib:contributor-list)
-};
-
-(:~ @return whether the context is a contributor list :)
-declare function contrib:is-valid-file() as xs:boolean {
- jvalidate:validation-boolean(
- jvalidate:validate-iso-schematron-svrl(root(), $contrib:SCHEMATRON))
-};
-
-(:~ @return why the context is an (in)valid contributor list :)
-declare function contrib:why-invalid-file()
- as element(report) {
- jvalidate:validate-iso-schematron-svrl(root(), $contrib:SCHEMATRON)
-};
-
-(:~
- : @param $content The complete tei:item, including @xml:id
- : @param $toadd If true, specifies that the content is to be
- : added. If false, that it is to be replaced.
- : @return whether a given tei:item can be added or edited in
- : this contributor list
- :)
-declare function contrib:is-valid-item($content as element(tei:item),
- $toadd as xs:boolean)
- as xs:boolean {
- (: check for duplicate xml:id or duplicate OpenID :)
- if ($toadd and (
- $contrib:contributor-list/id($content/@xml:id) or
- $contrib:contributor-list/tei:item/tei:ptr[@type='openid']/@target
- eq $content/tei:ptr[@type='openid']/@target))
- then false()
- else
- jvalidate:validation-boolean(
- jvalidate:validate-iso-schematron-svrl($content, $contrib:SCHEMATRON))
-};
-
-(:~ @return a report indicating why a contributor list item is (in)valid :)
-declare function contrib:why-invalid-item($content as element(tei:item))
- as element(report) {
- jvalidate:validate-iso-schematron-svrl($content, $contrib:SCHEMATRON)
-};
-
-(:~ @return a file-unique xml:id based on $content :)
-declare function contrib:generate-xmlid($content as element(tei:item))
- as xs:string {
- let $nameBase := lower-case(
- string-join(($content/tei:forename, $content/tei:surname, $content/tei:genName),'.'))
- let $idRegex := string-join(('^', $nameBase, '(\.[0-9]+)?'), '')
- let $allIds :=
- for $xmlid in $contrib:contributor-list/tei:item/@xml:id[matches(.,
- $idRegex)] return string($xmlid)
- let $allIdSuffixes :=
- if (count($allIds) eq 0)
- then ()
- else
- for $suffix in replace($allIds, $idRegex, '$1')
- return
- if (string-length($suffix) eq 0) then 0
- else xs:integer($suffix)
- return
- if (count($allIdSuffixes) > 0)
- then string-join(($nameBase, string(max($allIdSuffixes) + 1)), '.')
- else $nameBase
-
-};
-
-(:~ add $content to the contributor list
- : if $content doesn't have an @xml:id, it is autogenerated and added.
- : @param $content the item to be added
- : @return report/status/"ok" or report
- :)
-declare function contrib:add($content as element(tei:item)) as element() {
- let $content :=
- if (string-length($content/@xml:id)=0)
- then (
-
- {$content/@*}
- {$content/*}
-
- )
- else $content
- return
- let $validation := contrib:why-invalid-file()
- return
- if (not($validation))
- then $validation
- else
- if (contrib:is-valid-item($content, true()))
- then
-
- ok
- {jupdate:insert($content, 'into', $contrib:contributor-list)}
-
- else
- contrib:why-invalid-item($content)
-};
-
-(:~ edit an existing entry in the contributor list
- : @param $content the new content, where @xml:id identifies
- : which element is being edited
- : @return report with ok status or error
- :)
-declare function contrib:edit($content)
- as element() {
- let $contentToEdit :=
- contrib:get-by-id($content/@xml:id) |
- contrib:get-by-openid($content/tei:ptr[@type='openid']/@target)
- let $numberOfContents := count($contentToEdit)
- return
- if ($numberOfContents eq 0)
- then
- (: this is an add operation :)
- contrib:add($content)
- else
- (: this is an edit operation :)
- if (contrib:is-valid-item($content, false()))
- then
-
- ok
- {jupdate:replace($contentToEdit, $content)}
-
- else
- contrib:why-invalid-item($content)
-};
-
-(:~ remove a contributor.
- : TODO: check if the contributor has contributed anything.
- : If so, he/she can't be removed.
- :)
-declare function contrib:remove($xmlid as xs:string)
- as element() {
-
- ok
- {jupdate:delete($contrib:contributor-list/tei:item[@xml:id eq $xmlid])}
-
-};
-
-(:~ get a contributor's information by xml:id
- : @param $xmlid the xml:id
- : @return the item, or empty
- :)
-declare function contrib:get-by-id($xmlid as xs:string)
- as element(tei:item)? {
- $contrib:contributor-list/tei:item[@xml:id eq $xmlid]
-};
-
-(:~ get a contributor's information by an OpenID,
- : which is referenced by tei:ptr[@type=openid]/@target
- :)
-declare function contrib:get-by-openid($openid as xs:string)
- as element(tei:item)? {
- $contrib:contributor-list/tei:item[tei:ptr[@type='openid']/@target eq $openid]
-};
-
-(:~ get a contributor's information by string information
- : (eg, name or email)
- : @param $regex is a regular expression defining the search term
- : @return the tei:item(s) that match
- :)
-declare function contrib:get-by-string($regex as xs:string)
- as element(tei:item)* {
- $contrib:contributor-list/tei:item[matches(.,$regex)]
-};
-
-(:~ @return all items :)
-declare function contrib:get-all()
- as element(tei:item)* {
- $contrib:contributor-list/tei:item
-};
\ No newline at end of file
diff --git a/code/queries/edit.xqm b/code/queries/edit.xqm
deleted file mode 100644
index 25837c92..00000000
--- a/code/queries/edit.xqm
+++ /dev/null
@@ -1,335 +0,0 @@
-xquery version '1.0';
-(:~
- : Editing API
- : Copyright 2010 Efraim Feinstein
- : Released under the GNU Lesser General Public License version 3 or later
- : $Id: edit.xqm 491 2010-03-28 03:40:29Z efraim.feinstein $
- :)
-module namespace edit = 'http://jewishliturgy.org/ns/functions/edit';
-
-import module namespace xmldb="http://exist-db.org/xquery/xmldb";
-import module namespace util="http://exist-db.org/xquery/util";
-
-import module namespace app="http://jewishliturgy.org/ns/functions/app";
-import module namespace jvalidate="http://jewishliturgy.org/ns/functions/validation";
-
-declare namespace edit='http://jewishliturgy.org/ns/functions/edit';
-
-(: Pointer to a resource that holds the active contexts as XML like:
- :
- :
- : ...
- : ...
- : ...
- : ...
- : +
- : :)
-declare variable $edit:active-contexts := '/db/opensiddur/__contexts__.xml';
-
-(: pointer to a JLPTEI template :)
-declare variable $edit:new-file-template := '/db/opensiddur/template.xml';
-
-(: How much time an edit context is allowed before it expires :)
-declare variable $edit:expiry-timeout := xs:dayTimeDuration("P0DT0H5M0S");
-
-(:~ return the record of the current editing context, or empty if none :)
-declare function edit:_current_edit_context()
- as element(edit:context)? {
- let $document := document-uri(root(.))
- return
- doc($edit:active-contexts)//edit:context[string(edit:ref)=$document]
-};
-
-(:~ determine if the current user has edit permissions :)
-declare function edit:_has_permissions()
- as xs:boolean {
- let $document := root(.)
- let $collection := util:collection-name($document)
- let $resource := util:document-name($document)
- let $owner := xmldb:get-owner($collection, $resource)
- let $group := xmldb:get-group($collection, $resource)
- let $current-user := xmldb:get-current-user()
- let $current-groups := xmldb:get-user-groups($current-user)
- return
- ($current-user eq $owner) or ($current-groups = $group)
-};
-
-(:~ edit:source for current context :)
-declare function edit:source()
- as element(edit:context)? {
- string(edit:_current_edit_context()/edit:ref)
-};
-
-(:~ Open an editing context for a new document :)
-declare function edit:new(
- $uri as xs:string)
- as element(report) {
- let $authenticated := app:authenticate()
- or error(xs:QName('edit:ERR_NOT_AUTHORIZED'),'Authentication failed.')
- let $auth-user := app:auth-user()
- let $collection := util:collection-name($uri)
- let $collection-owner := xmldb:get-owner($collection)
- let $collection-group := xmldb:get-group($collection)
- let $current-groups := xmldb:get-user-groups($auth-user)
- let $collection-permissions := xmldb:permissions-to-string(xmldb:get-permissions($collection))
- let $has-collection-permissions :=
- (($auth-user = $collection-owner) and contains(substring($collection-permissions,1,3),'w'))
- or
- (($current-groups = $collection-group) and contains(substring($collection-permissions,4,3),'w'))
- or
- (contains(substring($collection-permissions,7,3),'w'))
- or
- error(xs:QName('edit:ERR_NOT_AUTHORIZED'),'No write permission to the collection.')
- let $resource := util:document-name($uri)
- let $user-collection := xmldb:get-user-home($auth-user)
- let $active-contexts := doc($edit:active-contexts)/edit:contexts
- let $context-for-this as element(edit:context)* :=
- $active-contexts/edit:context[string(edit:source)=$uri]
- let $cleaned-context :=
- for $c-f-t in $context-for-this
- return
- if (xs:time($c-f-t/edit:expiry) gt current-time())
- then error(xs:QName('edit:ERR_CONFLICT'),
- string-join(('Document ', $uri, ' is being edited by ',
- string($c-f-t/edit:owner), ' until ',
- string($c-f-t/edit:expiry), '.'),''))
- else edit:clean($c-f-t)
- return
- if (doc-available($uri))
- then error(xs:QName('edit:ERR_EXISTS'), 'Document exists')
- else
- let $new-context-uri-collection := concat($user-collection, '/contexts')
- let $new-context-uri-collection-exists :=
- xmldb:collection-available($new-context-uri-collection)
- or
- boolean(
- (xmldb:create-collection($user-collection, 'contexts'),
- xmldb:set-collection-permissions($new-context-uri-collection,
- $auth-user, $auth-user, util:base-to-integer(0700,8))))
- let $new-context-uri-resource := concat(util:uuid(),'.xml')
- let $new-context-uri :=
- if ($new-context-uri-collection-exists)
- then
- (
- xmldb:store($new-context-uri-collection, $new-context-uri-resource, doc($edit:new-file-template)),
- xmldb:chmod-resource($new-context-uri-collection, $new-context-uri-resource,
- util:base-to-integer(0700,8)))
- else
- error(xs:QName('edit:ERR_NEW'), 'Collection error')
- return
- if (not($new-context-uri))
- then error(xs:QName('edit:ERR_NEW'), 'New file error')
- else (
- update insert
-
- {$uri}
- {$new-context-uri}
- {$auth-user}
- {current-time() + $edit:expiry-timeout}
-
- into $active-contexts,
-
- ok
- {$new-context-uri}
-
- )
-};
-
-(:~ Open the context document for editing.
- : @return A report element with the message containing status='ok' and return/xs:anyURI
- : or message/failure message
- :)
-declare function edit:open()
- as element(report) {
- let $auth-ok := app:authenticate()
- or error(xs:QName('edit:ERR_NOT_AUTHORIZED'),'You must be logged in to edit.')
- let $user-name := app:auth-user()
- let $user-collection := xmldb:get-user-home($user-name)
- let $edit-permission := edit:_has_permissions() or
- error (xs:QName('edit:ERR_PERMISSION'),'You do not have edit permissions for this file')
- let $active-contexts := doc($edit:active-contexts)
- let $current-context-uri := document-uri(root(.))
- let $source-context := $active-contexts//edit:context[string(edit:source)=$current-context-uri]
- let $now := current-time()
- return
- if (xs:time($source-context/edit:expiry) gt $now)
- then
- error(xs:QName('edit:ERR_BUSY'),
- string-join(($current-context-uri,
- ' is opened for editing by ',
- string($source-context/edit:owner),
- ' until ',
- string($source-context/edit:expiry),
- '.'),''))
- else (
- if ($source-context)
- then
- (: remove expired source context :)
- let $ref := string($source-context/edit:ref)
- let $collection := util:collection-name($ref)
- let $resource := util:document-name($ref)
- return (
- xmldb:remove($collection, $resource),
- update delete $source-context
- )
- else (),
- (: add new source context :)
- let $new-context-uri-collection := concat($user-collection, '/contexts')
- let $new-context-uri-resource := concat(util:uuid(),'.xml')
- let $new-context-uri :=
- (xmldb:store($new-context-uri-collection, $new-context-uri-resource, root(.)),
- xmldb:chmod-resource($new-context-uri-collection, $new-context-uri-resource,
- util:base-to-integer(0700,8)))
- return
- if (not($new-context-uri))
- then error(xs:QName('edit:ERR_COPY'), 'Copying error')
- else (
- update insert
-
- {$current-context-uri}
- {$new-context-uri}
- {$user-name}
- {$now + $edit:expiry-timeout}
-
- into $active-contexts/edit:contexts,
-
- ok
- {$new-context-uri}
-
- )
- )
-};
-
-(: renew a context to prevent its expiration :)
-declare function edit:renew()
- as element(report) {
- let $context := edit:_current_edit_context()
- let $authenticated := app:authenticate()
- let $auth-user :=
- if ($authenticated)
- then app:auth-user()
- else error(xs:QName('edit:ERR_NOT_AUTHORIZED'), 'Authentication required.')
- let $owner := string($context/edit:owner)
- let $owner-is-authed :=
- if (not($context))
- then
- (error(xs:QName('edit:ERR_NOT_CONTEXT'),'The URI is not an editing context.'), false())
- else ($auth-user = $owner)
- or error(xs:QName('edit:ERR_NOT_AUTHORIZED'),
- string-join(('Not authorized. The context is owned by ',$owner,' and you are ', $auth-user,'.'),''))
- let $new-expiry := current-time() + $edit:expiry-timeout
- return
- if ($owner-is-authed)
- then
- (update value $context/edit:expiry with $new-expiry,
-
- ok
- )
- else
- (: we should never get here :)
-
- error
-
-};
-
-(:~ Commit the changes to the context document [an edit context] to
- : its original source document :)
-declare function edit:commit()
- as element(report) {
- let $doc-node := root(.)
- let $context := $doc-node/edit:_current_edit_context()
- let $authenticated := app:authenticate() or
- error(xs:QName('edit:ERR_NOT_AUTHORIZED'),'Not authenticated.')
- let $auth-user := app:auth-user()
- let $owner := string($context/edit:owner)
- let $source := string($context/edit:source)
- let $report := jvalidate:validate-jlptei($doc-node)
- let $collection := util:collection-name($source)
- let $resource := substring-after($source, concat($collection,'/')) (: FAIL: util:document-name($source) :)
- return
- if (not($context))
- then error(xs:QName('edit:ERR_NOT_CONTEXT'),'Not a context.')
- else if (not($owner = $auth-user))
- then error(xs:QName('edit:ERR_NOT_AUTHORIZED'),'Context is not owned by you.')
- else if (not(jvalidate:validation-boolean($report)))
- then error(xs:QName('edit:ERR_INVALID'),$report)
- else (util:log-system-out(('COMMIT: ', $source, ' ', $collection, ' ', $resource, ' ')),
- if (
- not((
- (if (doc-available($source))
- then xmldb:chmod-resource($collection, $resource, util:base-to-integer(0700, 8))
- else () (: committing a new document :) ),
- xmldb:store($collection, $resource, $doc-node),
- xmldb:chmod-resource($collection, $resource, util:base-to-integer(0444, 8))))
- )
- then
- error(xs:QName('edit:ERR_SAVE'),'Cannot save resource.')
- else
- $doc-node/edit:renew()
- )
-};
-
-
-(:~ close $context without committing :)
-declare function edit:close()
- as element(report) {
- let $context-record := edit:_current_edit_context()
- let $collection := util:collection-name(string($context-record/edit:ref))
- let $resource := util:document-name(string($context-record/edit:ref))
- let $authenticated := app:authenticate()
- let $user := app:auth-user()
- let $owner := string($context-record/edit:owner)
- return
- if (not($context-record))
- then
- error(xs:QName('edit:ERR_NOT_CONTEXT'),'Not an editing context.')
- else if (not($authenticated) or
- (not(xmldb:is-admin-user($user)) and not($user = $owner)))
- then
- error(xs:QName('edit:ERR_NOT_AUTHORIZED'),
- string-join(('The context is owned by ', $owner, '. You are ', $user, '.'),''))
- else (
- xmldb:remove($collection, $resource),
- update delete $context-record,
-
- ok
-
- )
-};
-
-(:~ remove expired edit contexts owned by the active user :)
-declare function edit:clean()
- as xs:boolean {
- let $authenticated := app:authenticate() or
- error(xs:QName('err:NOT_AUTHORIZED'),'Not authenticated.')
- let $my-expired-contexts := doc($edit:active-contexts)//edit:context
- [edit:owner=app:auth-user() and (xs:time(edit:expiry) lt current-time())]
- return ((
- for $expired in $my-expired-contexts
- return
- edit:clean($expired)
- ), true())
-};
-
-(:~ clean a specific expired context :)
-declare function edit:clean(
- $context as element(edit:context))
- as xs:boolean {
- let $authenticated := app:authenticate() or
- error(xs:QName('err:NOT_AUTHORIZED'),'Not authenticated.')
- return (
- if (xs:time($context/edit:expiry) lt current-time())
- then
- let $ref := string($context/edit:ref)
- let $collection := util:collection-name($ref)
- let $resource := util:document-name($ref)
- return (
- xmldb:remove($collection, $resource),
- update delete $context,
- true()
- )
- else
- false()
- )
-
-};
\ No newline at end of file
diff --git a/code/queries/identity.xql b/code/queries/identity.xql
deleted file mode 100644
index 8bd33865..00000000
--- a/code/queries/identity.xql
+++ /dev/null
@@ -1,17 +0,0 @@
-xquery version "1.0";
-(:~ identity query
- :
- :
- : $Id: identity.xql 714 2011-03-13 21:56:57Z efraim.feinstein $
- :)
-import module namespace request="http://exist-db.org/xquery/request";
-
-declare option exist:serialize "method=xml";
-
-let $uri := request:get-parameter('uri', ())
-return
- if ($uri)
- then
- doc($uri)
- else
- request:get-data()
\ No newline at end of file
diff --git a/code/queries/pre-release-testing.xql b/code/queries/pre-release-testing.xql
deleted file mode 100644
index cf655b8d..00000000
--- a/code/queries/pre-release-testing.xql
+++ /dev/null
@@ -1,39 +0,0 @@
-xquery version "3.0";
-(: run all pre-release tests :)
-import module namespace magic="http://jewishliturgy.org/magic"
- at "xmldb:exist:///code/magic/magic.xqm";
-import module namespace t="http://exist-db.org/xquery/testing/modified"
- at "xmldb:exist:///code/modules/test2.xqm";
-import module namespace api="http://jewishliturgy.org/modules/api"
- at "/code/api/modules/api.xqm";
-
-let $tests-to-run :=
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-return (
- api:serialize-as("xhtml"),
- t:format-testResult(
- {
- for $test in $tests-to-run/test
- let $as-admin := boolean($test/@admin)
- let $testSuite :=
- doc($test/@module)/TestSuite
- return
- if ($as-admin)
- then t:run-testSuite($testSuite, "admin", $magic:password)
- else t:run-testSuite($testSuite)
- }
- )
-)
diff --git a/code/queries/testsuite.xql b/code/queries/testsuite.xql
deleted file mode 100644
index ae722c69..00000000
--- a/code/queries/testsuite.xql
+++ /dev/null
@@ -1,29 +0,0 @@
-xquery version "1.0";
-(:~ Run a given test suite, given by the suite parameter.
- : Format in HTML if format=html parameter is given
- : User and password parameters can be given to force a
- : given user and password
- :
- : Open Siddur Project
- : Copyright 2011 Efraim Feinstein
- : Licensed under the GNU Lesser General Public License, version 3 or later
- :)
-import module namespace request="http://exist-db.org/xquery/request";
-import module namespace test2="http://exist-db.org/xquery/testing/modified"
- at "/code/modules/test2.xqm";
-import module namespace api="http://jewishliturgy.org/modules/api"
- at "/code/api/modules/api.xqm";
-
-let $suite := request:get-parameter('suite', ())
-let $format := request:get-parameter('format', ())
-let $user := request:get-parameter('user', ())
-let $password := request:get-parameter('password', ())
-let $results := test2:run-testSuite(doc($suite)//TestSuite, $user, $password)
-return
- if ($format = 'html')
- then (
- api:serialize-as('xhtml'),
- test2:format-testResult($results)
- )
- else $results
-
\ No newline at end of file
diff --git a/code/reindex.xql b/code/reindex.xql
deleted file mode 100644
index 3094f7ba..00000000
--- a/code/reindex.xql
+++ /dev/null
@@ -1,20 +0,0 @@
-xquery version "1.0";
-(: reindex.xql
- :
- : call as reindex.xql?collection=X
- :
- : Open Siddur Project
- : Copyright 2010 Efraim Feinstein
- : Licensed under the GNU Lesser General Public License, version 3 or later
- : $Id: reindex.xql 687 2011-01-23 23:36:48Z efraim.feinstein $
- :)
-import module namespace admin="http://jewishliturgy.org/modules/admin"
- at "xmldb:exist:///code/modules/admin.xqm";
-
-let $collection := request:get-parameter('collection','')
-return
- {
- if ($collection)
- then admin:reindex($collection)
- else 'false'
- }
diff --git a/code/revision.xml.sh b/code/revision.xml.sh
deleted file mode 100755
index 9044e508..00000000
--- a/code/revision.xml.sh
+++ /dev/null
@@ -1,12 +0,0 @@
-#!/bin/bash
-# revision.xml.sh
-# output the revision.xml file, which contains the revision that this working copy is using
-# under the @xml:id="CurrentRevision"
-# Takes two parameters - the name of the file and the top level directory
-# $Id: revision.xml.sh 99 2008-12-26 05:33:44Z efraim.feinstein $
-cat > "$1" << EOF
-
-
- $(svnversion -n "$2")
-
-EOF
\ No newline at end of file
diff --git a/code/tests/Makefile b/code/tests/Makefile
deleted file mode 100644
index 610bca2c..00000000
--- a/code/tests/Makefile
+++ /dev/null
@@ -1,76 +0,0 @@
-# Makefile for the tests directory.
-#
-# Allows make tests to run all the available automated tests, independent of where they are located
-#
-# Copyright 2010-2011 Efraim Feinstein
-#
-# This program is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Lesser General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Lesser General Public License for more details.
-#
-# You should have received a copy of the GNU Lesser General Public License
-# along with this program. If not, see http://www.gnu.org/licenses/
-#
-# $Id: Makefile 775 2011-05-01 06:46:55Z efraim.feinstein $
-
-XSPEC=$(LIBDIR)/xspec.sh
-
-# add to the Python path to allow tests
-NEWPYTHONPATH := $(CODEDIR)/tests
-ifneq ($(PYTHONPATH),)
-PYTHONPATH := $(PYTHONPATH):$(NEWPYTHONPATH)
-else
-PYTHONPATH := $(NEWPYTHONPATH)
-endif
-export PYTHONPATH := $(PYTHONPATH)
-
-.PHONY: prepare-tests
-prepare-tests: test-db-running
- curl -u testuser:testuser http://localhost:8080/code/tests/setup-test-cache.xql
-
-.PHONY: test-api
-test-api: test-db-running
- python $(CODEDIR)/tests/api/user/user.py -v
-
-.PHONY: test-triggers
-test-triggers: test-db-running
- python $(CODEDIR)/triggers/tests/test_document_uri_trigger.py -v
-
-.PHONY: test-special-uri
-test-special-uri: test-db-running
- python $(CODEDIR)/tests/test_special_uri.py -v
-
-.PHONY: test-concurrent
-test-concurrent:
- $(XSPEC) $(CODEDIR)/transforms/concurrent/tests/concurrent.xspec
-
-.PHONY: test-follow-uri
-test-follow-uri:
- $(XSPEC) $(CODEDIR)/transforms/tests/follow-uri.xspec
-
-.PHONY: test-xslt
-test-xslt: test-concurrent test-follow-uri
-
-.PHONY: test-modules
-test-modules: test-db-running
- python $(CODEDIR)/tests/test_app_module.py -v
-
-.PHONY: tests
-tests: test-triggers test-special-uri test-xslt test-modules
-
-.PHONY: test-concurrent-clean
-test-concurrent-clean:
- rm -fr $(CODEDIR)/transforms/concurrent/tests/xspec
-
-.PHONY: test-db-running
-test-db-running:
- python $(CODEDIR)/tests/is-db-running.py
-
-.PHONY: tests-clean
-tests-clean: test-concurrent-clean
diff --git a/code/tests/api/access.t.xml b/code/tests/api/access.t.xml
deleted file mode 100644
index 583f6b56..00000000
--- a/code/tests/api/access.t.xml
+++ /dev/null
@@ -1,442 +0,0 @@
-
-
- Access Module
-
-
Access module function calls
- Efraim Feinstein
- Copyright 2012 Efraim Feinstein,
- Licensed under the GNU Lesser General Public License, version 3 or later
-
-
- import module namespace magic="http://jewishliturgy.org/magic"
- at "xmldb:exist:///code/magic/magic.xqm";
- import module namespace acc="http://jewishliturgy.org/modules/access"
- at "xmldb:exist:///code/api/modules/access.xqm";
-
- testuser
- testuser
- http://jewishliturgy.org/ns/access/1.0
- http://www.w3.org/1999/xhtml
- http://exquery.org/ns/rest/annotation/
- http://www.w3.org/2010/xslt-xquery-serialization
-
- "/db/data/tests/Test1.xml"
-
-
-
-
-
-
-
-
-
-
- access:get-access(): Basic permissions
-
-
-
- Basic owner/group/mode
-
-
-
- testuser
- dba
-
-
-
-
-
-
- access:get-access(): Shared with a group, r/w
-
-
-
- Return a:share-group
-
-
- everyone
-
-
-
-
- access:get-access(): Shared with a group, r/o
-
-
-
- Return a:share-group
-
-
- everyone
-
-
-
-
- access:get-access(): Shared with a user, r/w
-
-
-
- Return a:share-user
-
-
- testuser2
-
-
-
-
- access:get-access(): Shared with a user, r/o
-
-
-
- Return a:share-user
-
-
- testuser2
-
-
-
-
- access:get-access(): Denied r/w access to a group
-
-
-
- Return a:deny-group
-
-
- guest
-
-
-
-
- access:get-access(): Denied o/w access to a group
-
-
-
- Return a:deny-group
-
-
- guest
-
-
-
-
- access:get-access(): Denied r/w access to a user
-
-
-
- Return a:deny-group
-
-
- testuser2
-
-
-
-
- access:get-access(): Denied o/w access to a user
-
-
-
- Return a:deny-group
-
-
- testuser2
-
-
-
-
- acc:set-access(): general parameters
-
-
-
- Set general parameters
-
- testuser
- everyone
-
- )
- ]]>
- sm:get-permissions(xs:anyURI($resource))/*/@owner="testuser"
- sm:get-permissions(xs:anyURI($resource))/*/@group="everyone"
- sm:get-permissions(xs:anyURI($resource))/*/@mode="rw-rw-r--"
-
-
-
- acc:set-access(): share with a group
-
- Share with a group r/w
-
- testuser
- everyone
-
- guest
- )
- ]]>
- sm:get-permissions(xs:anyURI($resource))//sm:ace
- [@target="GROUP"][@who="guest"][@access_type="ALLOWED"]/@mode="rw-"
-
-
- Share with a group r/o
-
- testuser
- everyone
-
- guest
- )
- ]]>
- sm:get-permissions(xs:anyURI($resource))//sm:ace
- [@target="GROUP"][@who="guest"][@access_type="ALLOWED"]/@mode="r--"
-
-
-
- acc:set-access(): share with a user
-
- Share with a user r/w
-
- testuser
- everyone
-
- guest
- )
- ]]>
- sm:get-permissions(xs:anyURI($resource))//sm:ace
- [@target="USER"][@who="guest"][@access_type="ALLOWED"]/@mode="rw-"
-
-
- Share with a user r/o
-
- testuser
- everyone
-
- guest
- )
- ]]>
- sm:get-permissions(xs:anyURI($resource))//sm:ace
- [@target="USER"][@who="guest"][@access_type="ALLOWED"]/@mode="r--"
-
-
-
- acc:set-access(): deny a group
-
- Deny a group r/w access
-
- testuser
- everyone
-
- guest
- )
- ]]>
- sm:get-permissions(xs:anyURI($resource))//sm:ace
- [@target="GROUP"][@who="guest"][@access_type="DENIED"]/@mode="rw-"
-
-
- Deny with a group write only
-
- testuser
- everyone
-
- guest
- )
- ]]>
- sm:get-permissions(xs:anyURI($resource))//sm:ace
- [@target="GROUP"][@who="guest"][@access_type="DENIED"]/@mode="-w-"
-
-
-
- acc:set-access(): deny a user
-
- Deny a user r/w access
-
- testuser
- everyone
-
- guest
- )
- ]]>
- sm:get-permissions(xs:anyURI($resource))//sm:ace
- [@target="USER"][@who="guest"][@access_type="DENIED"]/@mode="rw-"
-
-
- Deny with a user write only
-
- testuser
- everyone
-
- guest
- )
- ]]>
- sm:get-permissions(xs:anyURI($resource))//sm:ace
- [@target="USER"][@who="guest"][@access_type="DENIED"]/@mode="-w-"
-
-
-
- acc:set-access(): unauthenticated access
-
-
-
- Without any authorization
-
- testuser
- everyone
-
- )
- ]]>
-
-
-
-
- acc:set-access(): badly authenticated access
- testuser2
- testuser2
-
- With authorization from a non-owner
-
- testuser
- everyone
-
- )
- ]]>
-
-
-
-
- acc:set-access(): invalid access structures
-
- Not an access structure
-
-
- )
- ]]>
-
-
-
-
- functional test: get-access() following set-access()
-
- get-access following set-access
-
- testuser
- dba
-
- everyone
- testuser2
- guest
- guest
- ),
- acc:get-access(doc($resource))
- ]]>
- count(*)=7
- testuser
- dba
-
- everyone
- testuser2
- guest
- guest
-
-
-
\ No newline at end of file
diff --git a/code/tests/api/apitest.xqm b/code/tests/api/apitest.xqm
deleted file mode 100644
index 93070f4d..00000000
--- a/code/tests/api/apitest.xqm
+++ /dev/null
@@ -1,125 +0,0 @@
-xquery version "1.0";
-(: API testing helper functions
- :
- : Copyright 2011 Efraim Feinstein
- : Licensed under the GNU Lesser General Public License, version 3 or later
- :)
-
-module namespace apitest="http://jewishliturgy.org/modules/apitest";
-
-declare namespace t="http://exist-db.org/xquery/testing/modified";
-
-declare variable $apitest:server := concat('http://', request:get-server-name(), ':', request:get-server-port());
-declare variable $apitest:user-name := "testuser";
-declare variable $apitest:password := "testuser";
-
-
-declare function apitest:clear() {
- httpclient:clear-all()
-};
-
-declare function apitest:auth-header(
- ) as element(header) {
- apitest:auth-header($apitest:user-name, $apitest:password)
-};
-
-declare function apitest:auth-header(
- $user as xs:string,
- $password as xs:string
- ) as element(header) {
- element header {
- attribute name { "Authorization" },
- attribute value { concat("Basic ", util:base64-encode(concat($user, ":", $password))) }
- }
-};
-
-declare function apitest:get($uri as xs:string, $headers as element()*) {
- httpclient:get(xs:anyURI(concat($apitest:server, $uri)), true(),
- element headers { $headers })
-};
-
-declare function apitest:post($uri as xs:string, $headers as element()*, $content as item()) {
- httpclient:post(xs:anyURI(concat($apitest:server, $uri)), $content, true(),
- {$headers})
-};
-
-declare function apitest:put($uri as xs:string, $headers as element()*, $content as item()) {
- httpclient:post(xs:anyURI(concat($apitest:server, $uri)), $content, true(),
-
- {$headers}
-
- )
-};
-
-(: $content is in :)
-declare function apitest:post-form(
- $uri as xs:string,
- $headers as element()*,
- $content as element()*
- ) {
- httpclient:post-form(xs:anyURI(concat($apitest:server, $uri)),
- {
- $content
- },
- true(),
-
- {$headers}
-
- )
-};
-
-(: $content is in :)
-declare function apitest:put-form(
- $uri as xs:string,
- $headers as element()*,
- $content as element()*
- ) {
- httpclient:post-form(xs:anyURI(concat($apitest:server, $uri)),
- element httpclient:fields { $content },
- true(),
-
- {$headers}
-
-
- )
-};
-
-
-declare function apitest:delete($uri as xs:string, $headers as element()*) {
- httpclient:post(xs:anyURI(concat($apitest:server, $uri)), "",
- true(),
-
- {$headers}
-
- )
-};
-
-(:~ give a password (or an empty sequence) from the "magicpassword"
- : request parameter if it can be found.
- :)
-declare function apitest:magicpassword(
- ) as xs:string? {
- if (request:exists())
- then request:get-parameter("magicpassword", ())
- else ()
-};
-
-(:~ report back whether the magicpassword exists
- :)
-declare function apitest:if-magicpassword(
- ) as xs:boolean? {
- boolean(apitest:magicpassword())
-};
-
-declare function apitest:login(
- ) {
- apitest:login($apitest:user-name, $apitest:password)
-};
-
-(:~ log in under the testuser account :)
-declare function apitest:login(
- $user-name as xs:string,
- $password as xs:string
- ) {
- apitest:put(concat("/code/api/user/login/", $user-name),(),$password)
-};
\ No newline at end of file
diff --git a/code/tests/api/common.t.xml b/code/tests/api/common.t.xml
deleted file mode 100644
index 20767719..00000000
--- a/code/tests/api/common.t.xml
+++ /dev/null
@@ -1,68 +0,0 @@
-
-
-
-
-
Common test classes for RESTXQ functions in the Open Siddur API
- Efraim Feinstein
- Copyright 2012 Efraim Feinstein,
- Licensed under the GNU Lesser General Public License, version 3 or later
-
- http://www.w3.org/1999/xhtml
- http://exquery.org/ns/rest/annotation/
- http://www.w3.org/2010/xslt-xquery-serialization
-
-
- self::rest:response/http:response/@status = 201
- exists(self::rest:response/http:response/http:header[@name="Location"][@value])
-
-
- self::rest:response/http:response/@status = 204
- self::rest:response/output:serialization-parameters/output:method/@value = "text"
-
-
- self::rest:response/http:response/@status = 400
-
-
- self::rest:response/http:response/@status = 401
-
-
- self::rest:response/http:response/@status = 403
-
-
- self::rest:response/http:response/@status = 404
-
-
-
- self::rest:response/output:serialization-parameters/output:method/@value="html5"
-
-
-
- self::rest:response/output:serialization-parameters/output:method/@value="html5"
- .//html:head[@profile="http://a9.com/-/spec/opensearch/1.1/"]
- count(.//html:meta[@name='startIndex'])=1
- count(.//html:meta[@name='endIndex'])=1
- count(.//html:meta[@name='totalResults'])=1
- count(.//html:meta[@name='itemsPerPage'])=1
-
- let $start := number($output//html:meta[@name='startIndex']/@content)
- let $end := number($output//html:meta[@name='endIndex']/@content)
- let $to-count :=
- if ($output//html:ul[@class="results"])
- then $output//html:li[@class="result"]
- else $output//html:li[@class="context"]
- return ((if ($start) then 1 else 0) + $end - $start eq count($to-count)
- )
-
-
- number(.//html:meta[@name='endIndex']/@content) <= number(.//html:meta[@name='totalResults']/@content)
-
-
-
-
- .//html:html/html:body/*[@class="apis"]/html:li[@class="api"]/html:a[@class="discovery"]
-
-
\ No newline at end of file
diff --git a/code/tests/api/data.t.xml b/code/tests/api/data.t.xml
deleted file mode 100644
index 9464d48e..00000000
--- a/code/tests/api/data.t.xml
+++ /dev/null
@@ -1,67 +0,0 @@
-
-
- Data module
-
-
Test the data module
- Efraim Feinstein
-
-
-
-
-
-
-
-
- import module namespace data="http://jewishliturgy.org/modules/data"
- at "xmldb:exist:///code/api/modules/data.xqm";
-
- xsl:format-number(year-from-date(current-date()), "0000")
- xsl:format-number(month-from-date(current-date()), "00")
-
- data:new-path(): no resource with the same title
-
- No other resource with the same title
-
- $output=concat("/data/test/", $year, "/", $month, "/Test%20Title.xml")
-
-
-
- data:new-path(): one resource with the same title
-
-
-
-
-
-
- One other resource with the same title
-
- $output=concat("/data/test/", $year, "/", $month, "/Test%20Title-1.xml")
-
-
-
- data:new-path(): two resources with the same title
-
-
- 1
-
-
- 2
-
-
-
- Two other resource with the same title
-
- $output=concat("/data/test/", $year, "/", $month, "/Test%20Title-2.xml")
-
-
-
\ No newline at end of file
diff --git a/code/tests/api/data/dindex.t.xml b/code/tests/api/data/dindex.t.xml
deleted file mode 100644
index 94f18486..00000000
--- a/code/tests/api/data/dindex.t.xml
+++ /dev/null
@@ -1,43 +0,0 @@
-
-
- Data API index test
-
-
Test the data API index
- Efraim Feinstein
- Copyright 2012 Efraim Feinstein,
- Licensed under the GNU Lesser General Public License, version 3 or later
-
-
- http://www.w3.org/1999/xhtml
- http://a9.com/-/spec/opensearch/1.1/
-
- import module namespace dindex="http://jewishliturgy.org/api/data/index"
- at "xmldb:exist:///code/api/data/dindex.xqm";
-
-
- dindex:list()
-
- GET
-
-
-
-
-
-
- dindex:open-search()
-
- GET, no source
-
- self::o:OpenSearchDescription
-
-
-
\ No newline at end of file
diff --git a/code/tests/api/data/original.t.xml b/code/tests/api/data/original.t.xml
deleted file mode 100644
index 84d1493f..00000000
--- a/code/tests/api/data/original.t.xml
+++ /dev/null
@@ -1,460 +0,0 @@
-
-
- Original text data API
-
-
Test original data API
- Efraim Feinstein
- Copyright 2012 Efraim Feinstein,
- Licensed under the GNU Lesser General Public License, version 3 or later
-
- testuser
- testuser
-
-
-
-
-
-
-
- testuser
- Test User
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- http://www.w3.org/1999/xhtml
- http://www.tei-c.org/ns/1.0
- http://jewishliturgy.org/ns/access/1.0
- http://jewishliturgy.org/ns/jlptei/1.0
-
- import module namespace orig="http://jewishliturgy.org/api/data/original"
- at "xmldb:exist:///code/api/data/original.xqm";
- import module namespace magic="http://jewishliturgy.org/magic"
- at "xmldb:exist:///code/magic/magic.xqm";
-
-
- orig:get()
-
- Get an existing resource
-
- exists(./tei:TEI)
-
-
- Get a nonexisting resource
-
-
-
-
- Get a resource with no read access
-
-
-
-
-
- orig:list()
-
- List all resources
-
- count(.//html:li[@class="result"])>=1
-
- every $li in .//html:li[@class="result"]
- satisfies exists($li/html:a[@class="alt"][@property="access"])
-
-
-
-
- List some resources
-
- count(.//html:li[@class="result"])=2
-
-
-
- Respond to a query
-
- count(.//html:ol[@class="results"]/html:li)=1
-
-
-
-
- orig:delete()
-
- Remove an existing resource
-
-
-
-
- Remove a nonexisting resource
-
-
-
-
- Remove a resource without write access
-
-
-
-
- Remove a resource that has external references
-
-
-
-
-
- orig:post()
-
-
-
-
- Post a valid resource
-
-
-
-
-
-
-
- Post an invalid resource
-
-
-
-
-
- orig:put()
-
- Put a valid resource to an existing resource
-
-
-
-
-
-
-
- Put a valid resource to a nonexisting resource
-
-
-
- Put an invalid resource
-
-
-
-
- Put a valid resource that is invalidated by an illegal change
-
-
-
-
- Unauthenticated
-
-
-
- orig:get(): Get an existing resource
-
- exists(./tei:TEI)
-
-
- orig:get(): Get an existing resource with no read access
-
-
-
-
- orig:get(): Get a nonexisting resource
-
-
-
-
- orig:list(): Get a list of all resources
-
- count(.//html:ul[@class="results"]/html:li)>=1
- empty(.//html:li[@class="result"]/html:a[@class="document"]/@href[contains(., "NoAccess")])
-
-
-
- orig:delete(): Remove an existing resource
-
-
-
-
- orig:delete(): Remove a nonexisting resource
-
-
-
-
- orig:post(): Post a resource
-
-
-
-
- orig:put(): Put an existing resource
-
-
-
-
- orig:put(): Put a nonexisting resource
-
-
-
-
- orig:get-access()
-
- self::a:access
-
-
- orig:put-access()
-
- testuser
- everyone
-
-
- })
- ]]>
-
-
-
-
- orig:get-access()
-
- For an existing resource
-
- exists(./self::a:access)
-
-
- For a nonexistent resource
-
-
-
-
-
- orig:put-access()
-
- Set with a valid access structure
-
- testuser
- everyone
-
-
- })
- ]]>
-
-
-
- With an invalid access structure
-
-
-
- })
- ]]>
-
-
-
- For a resource with no write access
-
- testuser
- testuser
-
-
- })
- ]]>
-
-
-
- For a nonexistent resource
-
- testuser
- testuser
-
-
- })
- ]]>
-
-
-
-
- orig:record-change()
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- add an edit record with revisionDesc and existing change
-
-
-
-
-
-
- add an edit record with empty revisionDesc
-
-
-
-
-
-
-
-
- add an edit record with no revisionDesc
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/code/tests/api/data/original/Existing-After-Put.xml b/code/tests/api/data/original/Existing-After-Put.xml
deleted file mode 100644
index 96bf9798..00000000
--- a/code/tests/api/data/original/Existing-After-Put.xml
+++ /dev/null
@@ -1,58 +0,0 @@
-
-
-
-
-
- Existing
-
-
-
-
-
-
-
-
-
- Open Siddur Project
-
- 2012-06-08
-
-
-
-
-
-
- Document created from template
-
-
-
-
-
- This
- is
- a
- valid
- segment
- .
-
-
- This
- is
- too
- .
-
-
-
-
-
- Valid data
-
-
-
-
-
-
-
-
diff --git a/code/tests/api/data/original/Existing.xml b/code/tests/api/data/original/Existing.xml
deleted file mode 100644
index 7189c9c8..00000000
--- a/code/tests/api/data/original/Existing.xml
+++ /dev/null
@@ -1,52 +0,0 @@
-
-
-
-
-
- Existing
-
-
-
-
-
-
-
-
-
- Open Siddur Project
-
- 2012-06-08
-
-
-
-
-
-
- Document created from template
-
-
-
-
-
- This
- is
- a
- valid
- segment
- .
-
-
-
-
-
- Valid data
-
-
-
-
-
-
-
-
diff --git a/code/tests/api/data/original/Invalid-After-Put-Illegal-RevisionDesc.xml b/code/tests/api/data/original/Invalid-After-Put-Illegal-RevisionDesc.xml
deleted file mode 100644
index 82d5e330..00000000
--- a/code/tests/api/data/original/Invalid-After-Put-Illegal-RevisionDesc.xml
+++ /dev/null
@@ -1,53 +0,0 @@
-
-
-
-
-
- Existing
-
-
-
-
-
-
-
-
-
- Open Siddur Project
-
- 2012-06-08
-
-
-
-
-
-
-
- Document created from template
-
-
-
-
-
- This
- is
- a
- valid
- segment
- .
-
-
-
-
-
- Valid data
-
-
-
-
-
-
-
-
diff --git a/code/tests/api/data/original/Invalid.xml b/code/tests/api/data/original/Invalid.xml
deleted file mode 100644
index 7d28c7ca..00000000
--- a/code/tests/api/data/original/Invalid.xml
+++ /dev/null
@@ -1,55 +0,0 @@
-
-
-
-
-
-
- Valid
-
-
-
-
-
-
-
-
-
- Open Siddur Project
-
- 2012-06-08
-
-
-
-
-
-
- Document created from template
-
-
-
-
-
-
- This
- is
- an
- invalid
- segment
- .
-
-
-
-
-
- Valid data
-
-
-
-
-
-
-
-
-
diff --git a/code/tests/api/data/original/QueryResult.xml b/code/tests/api/data/original/QueryResult.xml
deleted file mode 100644
index 685fe799..00000000
--- a/code/tests/api/data/original/QueryResult.xml
+++ /dev/null
@@ -1,58 +0,0 @@
-
-
-
-
-
- Query Result
-
-
-
-
-
-
-
-
-
- Open Siddur Project
-
- 2012-06-08
-
-
-
-
-
-
- Document created from template
-
-
-
-
-
- This
- is
- a
- query
- result
- .
-
-
- This
- is
- not
- .
-
-
-
-
-
- Valid data
-
-
-
-
-
-
-
-
diff --git a/code/tests/api/data/original/Valid.xml b/code/tests/api/data/original/Valid.xml
deleted file mode 100644
index 93df9c38..00000000
--- a/code/tests/api/data/original/Valid.xml
+++ /dev/null
@@ -1,49 +0,0 @@
-
-
-
-
-
- Valid
-
-
-
-
-
-
-
-
-
- Open Siddur Project
-
- 2012-06-08
-
-
-
-
-
-
-
-
-
- This
- is
- a
- valid
- segment
- .
-
-
-
-
-
- Valid data
-
-
-
-
-
-
-
-
diff --git a/code/tests/api/data/transliteration.t.xml b/code/tests/api/data/transliteration.t.xml
deleted file mode 100644
index 9631a629..00000000
--- a/code/tests/api/data/transliteration.t.xml
+++ /dev/null
@@ -1,464 +0,0 @@
-
-
- Transliteration API
-
-
Test transliteration API function calls
- Efraim Feinstein
- Copyright 2012 Efraim Feinstein,
- Licensed under the GNU Lesser General Public License, version 3 or later
-
- testuser
- testuser
-
- import module namespace tran="http://jewishliturgy.org/api/transliteration"
- at "xmldb:exist:///code/api/data/transliteration.xqm";
- import module namespace data="http://jewishliturgy.org/modules/data"
- at "xmldb:exist:///code/api/modules/data.xqm";
- import module namespace magic="http://jewishliturgy.org/magic"
- at "xmldb:exist:///code/magic/magic.xqm";
-
- http://jewishliturgy.org/ns/tr/1.0
- http://exquery.org/ns/rest/annotation/
- http://www.w3.org/2010/xslt-xquery-serialization
- http://www.w3.org/1999/xhtml
- http://jewishliturgy.org/ns/access/1.0
-
- Valid
- A minimal valid transliteration table for testing
-
- Nobody
-
-
-
-
-
- }]]>
-
- }]]>
-
- Invalid
- An invalid transliteration table for testing, invalid because it has two duplicate langs
-
- Nobody
-
-
-
-
-
-
-
-
-
- }
- ]]>
-
-
-
-
-
- Test
- A test
-
- Nobody
-
-
-
-
-
-
-
-
- Test 2
- Another test
-
- Nobody
-
-
-
-
-
-
-
-
- Mivchan
- Test in Hebrew
-
- Nobody
-
-
-
-
-
-
-
-
- Garbage
- Just some garbage
-
- Nobody
-
-
-
-
-
-
-
-
- NoWrite
- No write access
-
- Nobody
-
-
-
-
-
-
-
-
-
-
-
-
- tran:get()
- testuser
- testuser
-
- Get an existing resource
-
- tr:schema
-
-
- Get a non-existing resource
-
- self::rest:response/http:response/@status=404
-
-
-
- tran:list()
-
- List all resources
-
- count(.//html:li[@class="result"])>=3
-
- every $li in .//html:li[@class="result"]
- satisfies exists($li/html:a[@class="alt"][@property="access"])
-
-
-
-
- List some resources
-
- count(.//html:li[@class="result"])=2
-
-
-
- Respond to a query
-
- count(.//html:ol[@class="results"]/html:li)=3
-
-
-
-
- tran:delete()
- testuser
- testuser
-
-
-
-
- Delete a transliteration that does exist
-
- self::rest:response/http:response/@status=204
- not(doc-available("/data/transliteration/1900/01/Garbage.xml"))
-
-
- Delete a transliteration that does not exist
-
- self::rest:response/http:response/@status=404
-
-
- Delete where no access is granted and user is logged in
-
- self::rest:response/http:response/@status=403
-
-
- Delete a transliteration that is referenced from elsewhere
-
- self::rest:response/http:response/@status=400
-
-
-
- tran:post()
- testuser
- testuser
-
-
-
-
-
-
-
-
- Post a valid transliteration
-
- self::rest:response/http:response/@status=201
- exists(self::rest:response/http:response/http:header[@name="Location"])
- exists(data:doc("transliteration", "Valid"))
-
-
- Post an invalid transliteration
-
- self::rest:response/http:response/@status=400
-
-
- Post an invalid transliteration that is invalid because of the Schematron
-
- self::rest:response/http:response/@status=400
-
-
- Post a valid transliteration as an unauthorized user
-
- self::rest:response/http:response/@status=403
-
-
-
- tran:put()
-
-
-
-
- Put valid data to an existing resource
-
- self::rest:response/http:response/@status=204
- data:doc("transliteration", "Garbage")//tr:title="Valid"
-
-
- Put data to a non-existing resource
- Put valid data to an existing resource
-
- self::rest:response/http:response/@status=404
-
-
- Put invalid data to an existing resource
-
- self::rest:response/http:response/@status=400
-
-
- Put an invalid transliteration that is invalid because of the Schematron
-
- self::rest:response/http:response/@status=400
-
-
- Put valid data to an existing resource as an unauthorized user
-
- self::rest:response/http:response/@status=403
-
-
-
- Actions as an unauthenticated user
-
-
-
- tran:get()
-
- tr:schema
-
-
- tran:list()
-
- count(.//html:ul[@class="results"]/html:li)>=1
-
-
-
- tran:post()
-
-
-
-
- tran:delete()
-
-
-
-
- tran:put()
-
-
-
-
- tran:get-access()
-
- self::a:access
-
-
- tran:put-access()
-
- testuser
- everyone
-
-
- })
- ]]>
-
-
-
-
- tran:get-access()
-
- For an existing resource
-
- exists(./self::a:access)
-
-
- For a nonexistent resource
-
-
-
-
-
- tran:put-access()
-
- Set with a valid access structure
-
- testuser
- everyone
-
-
- })
- ]]>
-
-
-
- With an invalid access structure
-
-
-
- })
- ]]>
-
-
-
- For a resource with no write access
-
- testuser
- testuser
-
-
- })
- ]]>
-
-
-
- For a nonexistent resource
-
- testuser
- testuser
-
-
- })
- ]]>
-
-
-
-
\ No newline at end of file
diff --git a/code/tests/api/demo.t.xml b/code/tests/api/demo.t.xml
deleted file mode 100644
index 55ff71a9..00000000
--- a/code/tests/api/demo.t.xml
+++ /dev/null
@@ -1,130 +0,0 @@
-
-
- Demo API
-
-
Test demo API function calls
- Efraim Feinstein
- Copyright 2012 Efraim Feinstein,
- Licensed under the GNU Lesser General Public License, version 3 or later
-
- testuser
- testuser
-
- import module namespace demo="http://jewishliturgy.org/api/demo"
- at "xmldb:exist:///code/api/demo.xqm";
-
- http://jewishliturgy.org/ns/tr/1.0
- http://exquery.org/ns/rest/annotation/
- http://www.w3.org/2010/xslt-xquery-serialization
- http://www.w3.org/1999/xhtml
-
-
-
-
-
- Test
- A test
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- demo index APIs
-
- demo:list()
-
-
-
-
- demo:transliteration-list()
-
- self::html:html/html:body/html:ul[@class="results"]/html:li[@class="result"]/html:a[contains(@href, "/demo/")]
-
-
-
- demo:transliterate-xml()
-
-
-
-
- Post XML and a valid transliteration schema
- אבגדה וזח
- },
- "Test")
- ]]>
-
- abcde fgh
-
-
-
- Post XML and a nonexistent transliteration schema
- אבגדה וזח
- },
- "NotExistent")
- ]]>
- self::rest:response/http:response/@status=404
-
-
-
- demo:transliterate-text()
-
-
-
- Post text and a valid transliteration schema
-
- $output[1]/self::rest:response/output:serialization-parameters/output:method/@value="text"
- $output[2]="abcde fgh"
-
-
- Post text and a nonexistent transliteration schema
-
- $output[1]/self::rest:response/http:response/@status=404
-
-
-
\ No newline at end of file
diff --git a/code/tests/api/group.t.xml b/code/tests/api/group.t.xml
deleted file mode 100644
index 95140ea9..00000000
--- a/code/tests/api/group.t.xml
+++ /dev/null
@@ -1,370 +0,0 @@
-
-
- Group API
-
-
Test the sharing group API
- Efraim Feinstein
- Copyright 2012 Efraim Feinstein,
- Licensed under the GNU Lesser General Public License, version 3 or later
-
- testuser
- testuser
-
-
-
-
-
-
-
- http://www.w3.org/1999/xhtml
- http://jewishliturgy.org/ns/group/1.0
-
- import module namespace grp="http://jewishliturgy.org/api/group"
- at "xmldb:exist:///code/api/group.xqm";
- import module namespace magic="http://jewishliturgy.org/magic"
- at "xmldb:exist:///code/magic/magic.xqm";
-
-
-
- testuser
- testuser3
- testuser4
- testuser5
- testuser6
-
- }]]>
-
-
-
- }]]>
-
- grp:list()
-
- List all groups
-
- count(.//*[@class="results"]/html:li[@class="result"])>=7
-
-
- List only 2 groups
-
- count(.//*[@class="results"]/html:li[@class="result"])=2
-
-
-
- grp:get-xml()
-
- Get members of an existing group
-
-
-
- admin
- testuser
- testuser3
- testuser4
- testuser5
-
-
-
-
- Get members of a non-existing group
-
-
-
-
-
- grp:get-html(): authenticated
-
- Get members of an existing group
-
- self::html:html/html:body/*[@class="results"]/html:li[@class="result"]/html:a[@class="document"]
- count(.//html:a[@property="manager"]) = 2
-
-
- Get members of a non-existing group
-
-
-
-
-
- grp:get-user-groups(): authenticated
-
- For an existing user
-
- self::html:html/html:body/*[@class="results"]/html:li[@class="result"]/html:a[@class="document"]
- exists(.//html:a[@property="manager"])
- count(.//html:li[@class="result"]) = 2
-
-
- For a non-existing user
-
-
-
-
-
- grp:put()
-
-
-
-
- For a new group
-
-
- sm:get-groups()="grouptestsnew"
-
- every $m in $valid//g:member[xs:boolean(@manager)] satisfies sm:get-group-managers("grouptestsnew")=$m
-
- every $m in $valid//g:member satisfies sm:get-group-members("grouptestsnew")=$m
-
- sm:get-group-managers("grouptestsnew")="admin"
-
-
- For an existing group, addition of a member
-
- {$valid//g:member}
- testuser6
-
- })
- ]]>
-
- sm:get-group-members("grouptests")="testuser6"
-
-
- For an existing group, removal of a member
-
- {$valid//g:member[not(.="testuser5")]}
-
- })
- ]]>
-
- not(sm:get-group-members("grouptests")="testuser5")
-
-
- For an existing group, addition of a manager
-
- {$valid//g:member[not(.="testuser5")]}
- testuser5
-
- })
- ]]>
-
- sm:get-group-managers("grouptests")="testuser5"
-
-
- For an existing group, removal of a manager
-
- {$valid//g:member[not(.="testuser")]}
- testuser
-
- })
- ]]>
-
- not(sm:get-group-managers("grouptests")="testuser")
- sm:get-group-members("grouptests")="testuser"
-
-
- For an existing group, removal of admin
-
-
- sm:get-group-managers("grouptests")="admin"
-
-
- With invalid group XML
-
-
-
-
- For an existing group of which user is not a manager
-
-
-
-
-
- grp:delete()
-
- For an existing group
-
-
- not(sm:get-groups()="grouptests")
- not(xmldb:get-user-groups("testuser")="grouptests")
-
-
- For an existing group, but not a manager
-
-
-
-
- For a non-existent group
-
-
-
-
-
-
-
- Unauthenticated
-
- grp:list()
-
- self::html:html/html:body/*[@class="results"]/html:li[@class="result"]
-
-
- grp:get-xml() for an existing group
-
-
-
-
- grp:get-xml() for a non-existing group
-
-
-
-
- grp:get-html() for members of an existing group
-
-
-
-
- grp:get-html() for members of a non-existing group
-
-
-
-
- grp:get-user-groups() for an existing user
-
-
-
-
- grp:get-user-groups() for a non-existing user
-
-
-
-
- grp:put() for an existing group
-
-
-
-
- grp:put() for a nonexisting group
-
-
-
-
- grp:delete() for an existing group
-
-
-
-
- grp:delete() for a nonexisting group
-
-
-
-
-
\ No newline at end of file
diff --git a/code/tests/api/index.t.xml b/code/tests/api/index.t.xml
deleted file mode 100644
index 0d14c7ce..00000000
--- a/code/tests/api/index.t.xml
+++ /dev/null
@@ -1,30 +0,0 @@
-
-
- Index API Module
-
-
Index module APIs
- Efraim Feinstein
- Copyright 2012 Efraim Feinstein,
- Licensed under the GNU Lesser General Public License, version 3 or later
-
-
- import module namespace index="http://jewishliturgy.org/api/index"
- at "xmldb:exist:///code/api/index.xqm";
-
- testuser
- testuser
- http://jewishliturgy.org/ns/access/1.0
- http://www.w3.org/1999/xhtml
- http://exquery.org/ns/rest/annotation/
- http://www.w3.org/2010/xslt-xquery-serialization
-
- Main index API
-
- List available APIs
-
-
-
-
-
\ No newline at end of file
diff --git a/code/tests/api/login.t.xml b/code/tests/api/login.t.xml
deleted file mode 100644
index a5e20f1c..00000000
--- a/code/tests/api/login.t.xml
+++ /dev/null
@@ -1,243 +0,0 @@
-
-
- Login API
-
-
Tests for the login API
- Efraim Feinstein
- Copyright 2012 Efraim Feinstein,
- Licensed under the GNU Lesser General Public License, version 3 or later
-
-
-
- http://www.w3.org/1999/xhtml
- http://www.tei-c.org/ns/1.0
- http://jewishliturgy.org/ns/jlptei/1.0
- http://jewishliturgy.org/ns/jlp-processor
-
- import module namespace login="http://jewishliturgy.org/api/login"
- at "xmldb:exist:///code/api/login.xqm";
- import module namespace app="http://jewishliturgy.org/modules/app"
- at "xmldb:exist:///code/modules/app.xqm";
-
-
-
- empty(app:auth-user())
- empty(app:auth-password())
-
-
-
- empty(app:auth-user())
- empty(app:auth-password())
-
-
- login:get-*() when not logged in
-
-
-
- login:get-xml()
-
-
-
-
- login:get-html()
-
-
-
-
-
-
- login:get-*() when logged in
- testuser
- testuser
-
-
-
- testuser
-
-
- login:get-html()
-
-
- testuser
-
-
-
- login:post-xml()
- session:exists()
-
-
-
-
- session:invalidate()
-
-
- with valid user and password
-
- testuser
- testuser
-
- })
- ]]>
-
- app:auth-user()="testuser"
- app:auth-password()="testuser"
-
-
- with valid user and invalid password
-
- testuser
- wrong
-
- })
- ]]>
-
-
-
- with invalid user
-
- wrong
- wrong
-
- })
- ]]>
-
-
-
- missing user
-
- testuser
-
- })
- ]]>
-
-
-
- missing password
-
- testuser
-
- })
- ]]>
-
-
-
-
- login:post-form()
- session:exists()
-
-
-
-
- session:invalidate()
-
-
- with valid user and password
-
-
- app:auth-user()="testuser"
- app:auth-password()="testuser"
-
-
- with valid user and invalid password
-
-
-
-
- with invalid user
-
-
-
-
- missing user
-
-
-
-
- missing password
-
-
-
-
-
- logout
- session:exists()
-
-
-
-
-
-
-
- login:delete()
-
-
-
-
- login:get-logout()
-
-
-
-
- login:post-logout()
-
-
-
-
-
\ No newline at end of file
diff --git a/code/tests/api/template.t.xml b/code/tests/api/template.t.xml
deleted file mode 100644
index cf81036c..00000000
--- a/code/tests/api/template.t.xml
+++ /dev/null
@@ -1,39 +0,0 @@
-
-
- NAME ME
-
-
Test SOMETHING
- Efraim Feinstein
- Copyright 2012 Efraim Feinstein,
- Licensed under the GNU Lesser General Public License, version 3 or later
-
-
-
- http://www.w3.org/1999/xhtml
- http://www.tei-c.org/ns/1.0
- http://jewishliturgy.org/ns/jlptei/1.0
- http://jewishliturgy.org/ns/jlp-processor
-
- import module namespace {NS}="http://jewishliturgy.org/{MODULE}"
- at "xmldb:exist:///code/{PATH}.xqm";
-
-
- {NAME}
-
-
-
-
-
-
-
- PUT
-
-
-
-
\ No newline at end of file
diff --git a/code/tests/api/user.t.xml b/code/tests/api/user.t.xml
deleted file mode 100644
index 4a28134b..00000000
--- a/code/tests/api/user.t.xml
+++ /dev/null
@@ -1,573 +0,0 @@
-
-
- User API
-
-
Test the user and contributor profile API
- Efraim Feinstein
- Copyright 2012 Efraim Feinstein,
- Licensed under the GNU Lesser General Public License, version 3 or later
-
- testuser
- testuser
-
-
-
- testuser
- Spike Tester
-
-
-
-
- notauser
- Not a spike user
-
-
-
-
- testuser2
-
-
-
-
-
- TestProfile
- A Tester
-
-
-
-
-
-
-
-
-
-
- http://www.w3.org/1999/xhtml
- http://www.tei-c.org/ns/1.0
- http://jewishliturgy.org/ns/jlptei/1.0
- http://jewishliturgy.org/ns/jlp-processor
-
- import module namespace user="http://jewishliturgy.org/api/user"
- at "xmldb:exist:///code/api/user.xqm";
- import module namespace magic="http://jewishliturgy.org/magic"
- at "xmldb:exist:///code/magic/magic.xqm";
-
-
- user:list()
-
- List all users
-
-
- count(.//html:*[@class="result"])>=4
-
- every $d in .//html:li[@class="result"]/html:a[@class=document]
- satisfies exists($d/following-sibling::html:a[@class="alt"][@property="groups"])
-
-
- Query all users
-
-
- count(.//html:*[@class="result"])>=2
-
-
-
- user:get(): authenticated
-
- Get existing user profile
-
-
-
-
- testuser2
-
-
-
-
- Get non-existing user profile
-
-
-
-
-
- user:get(): unauthenticated
-
- Get existing user profile
-
-
-
- Get non-existing user profile
-
-
-
-
-
- user:post-xml(): unauthenticated
-
-
-
-
-
-
-
- Create a new user
-
- testuser3
- testuser3
-
- })
- ]]>
-
- xmldb:exists-user("testuser3")
- system:as-user("admin", $magic:password, xmldb:group-exists("testuser3"))
- doc-available("/user/testuser3.xml")
- doc("/user/testuser3.xml")/j:contributor/tei:idno="testuser3"
-
- doc-available("/user/testuser3.xml") and
- sm:get-permissions(xs:anyURI("/user/testuser3.xml"))/*/(
- @owner = "testuser3" and @group="testuser3" and @mode="rw-r--r--"
- )
-
-
- Create a new user with blank username
-
- testuser3
-
- })
- ]]>
-
-
-
- Create a new user with blank password
-
- testuser3
-
-
- })
- ]]>
-
-
-
- Create a new user when the user already exists
-
- testuser
- xxxxxx
-
- })
- ]]>
-
-
-
- Create a new user when no user exists, but a profile exists
-
- TestProfile
- xxxxxx
-
- })
- ]]>
-
-
-
-
- user:post-xml(): authenticated
-
-
-
-
-
- Change a password
-
- testuser2
- testusernewpassword
-
- })
- )
- ]]>
-
- xmldb:authenticate("/db", "testuser2", "testusernewpassword")
-
-
- Change password of another user
-
- testuser2
- testuser
-
- })
- ]]>
-
-
-
- Missing username
-
- testuser
-
- })
- ]]>
-
-
-
- Missing password
-
- testuser
-
- })
- ]]>
-
-
-
- Attempt to change a username
-
- testusernoexist
- testuser
-
- })
- ]]>
-
-
-
-
-
- user:put() authenticated
-
- Edit your own profile
-
- testuser
- Test User
-
- })
- ]]>
-
- doc("/user/testuser.xml")/j:contributor/tei:name="Test User"
-
-
- Edit your own profile, changing tei:idno
-
- testuserdifferent
- Test User
-
- })
- ]]>
-
-
-
- Edit your own profile, with invalid contributor data
-
- testuser
-
-
- })
- ]]>
-
-
-
- Edit another user's profile
-
- testuser2
- Test User
-
- })
- ]]>
-
-
-
- Create a non-user profile
-
- not_a_real_contributors_profile
- Not Real
-
- })
- ]]>
-
- doc-available("/user/not_a_real_contributors_profile.xml")
- sm:get-permissions(xs:anyURI("/user/not_a_real_contributors_profile.xml"))/*/(
- @owner="testuser" and @group="everyone" and @mode="rw-rw-r--"
- )
-
-
- Edit a non-user profile
-
- notauser
- Not A User
-
- })
- ]]>
-
- doc("/user/notauser.xml")/j:contributor/tei:name="Not A User"
- sm:get-permissions(xs:anyURI("/user/notauser.xml"))/*/(
- @owner="testuser" and @group="everyone" and @mode="rw-rw-r--"
- )
-
-
-
- user:put() not authenticated
-
-
-
-
- notauser
-
- ),
- let $uri := xs:anyURI("/user/notauser.xml")
- return (
- sm:chmod($uri, "rw-rw-r--"),
- sm:chown($uri, "testuser"),
- sm:chgrp($uri, "everyone")
- )
- ))
- ]]>
-
-
-
-
-
- Edit a user profile
-
- testuser
- Test User
-
- })
- ]]>
-
-
-
- Edit a non-user profile
-
- nonuser
- Is Not A User
-
- })
- ]]>
-
-
-
- Create a profile
-
- there_is_no_user_with_that_name
- Is Not A User
-
- })
- ]]>
-
-
-
-
- user:delete(): authenticated
-
-
- testuser3
-
- )
- let $uri := xs:anyURI("/user/testuser3.xml")
- let $ch := (
- sm:chown($uri, "testuser3"),
- sm:chgrp($uri, "testuser3"),
- sm:chmod($uri, "rw-r--r--")
- )
- return ()
- ))
- ]]>
-
-
-
-
-
- Delete your own profile
-
-
- not(xmldb:exists-user("testuser3"))
- not(sm:get-groups()="testuser3")
- not(doc-available("/user/testuser3.xml"))
-
-
- Delete another user's profile
-
-
-
-
- Delete a non-existent profile
-
-
-
-
- Delete a non-user profile
-
- not(doc-available("/user/notauser.xml"))
-
-
- Delete a profile that has a reference elsewhere
-
-
-
-
-
- user:delete(): not authenticated
-
-
-
- Delete a user profile
-
-
-
-
- Delete a non-user profile
-
-
-
-
- Delete a non-existent profile
-
-
-
-
-
\ No newline at end of file
diff --git a/code/tests/apidb.py b/code/tests/apidb.py
deleted file mode 100644
index 4c4e96fd..00000000
--- a/code/tests/apidb.py
+++ /dev/null
@@ -1,213 +0,0 @@
-'''
- Library for testing API functions
-
- Copyright 2011 Efraim Feinstein
- Open Siddur Project
- Licensed under the GNU Lesser General Public License, version 3 or later
-
-'''
-import StringIO
-import lxml.etree as etree
-import unittest
-import getopt
-import sys
-
-import existdb
-
-# store the admin password for when run as a test suite
-adminPassword = None
-
-class ApiDB(existdb.Existdb):
- ''' abstraction of the database for API testing '''
- def __init__(self, **kwargs):
- ''' initialize: be sure to set either forceHTTPBasic or useSession '''
- existdb.Existdb.__init__(self ,**kwargs)
-
- def __addMethod(self, location, method):
- if '?' in location:
- divider = '&'
- else:
- divider = '?'
- return location + divider + '_method=' + method
-
- def put(self, location, document, contentType='text/xml'):
- return existdb.Existdb.post(self, self.__addMethod(location, 'PUT'), document, contentType)
-
- def delete(self, location):
- return existdb.Existdb.post(self, self.__addMethod(location, 'DELETE'),'')
-
-class BaseAPITest(object):
- ''' All API tests derive from here. based on BaseDBTest, which is being deprecated '''
- NS_HTML = 'http://www.w3.org/1999/xhtml'
- NS_TEI = 'http://www.tei-c.org/ns/1.0'
- NS_EXIST = 'http://exist.sourceforge.net/NS/exist'
- NS_XML = 'http://www.w3.org/XML/1998/namespace'
- NS_J = 'http://jewishliturgy.org/ns/jlptei/1.0'
- NS_JX = 'http://jewishliturgy.org/ns/jlp-processor'
-
- # default prefixes
- prefixes = {'tei':NS_TEI, 'exist':NS_EXIST, 'j':NS_J, 'jx':NS_JX, 'html':NS_HTML}
-
- def setUp(self, **kwargs):
- ''' set up. keyword args are passed on to ApiDB '''
- settings = {
- 'server':'localhost',
- 'port':8080,
- 'user':'',
- 'password':'',
- 'restPrefix':'',
- 'debuglevel':0,
- 'useHTTPBasic':False,
- 'forceHTTPBasic':False,
- 'useSession':False}
-
- for k, v in settings.iteritems():
- kwargs.setdefault(k, v)
-
- self.database = ApiDB(**kwargs)
-
-
- def assertStatusError(self, actualStatus, expectedStatus, responseString = '', activity = 'Set up', documentPath = ''):
- """ assert that a returned status is the same as an expected status. If it isn't display a configurable error and fail.
- This function is intended to be used in setUp() and tearDown() to cause a testing error, as opposed to a test failure.
- expectedStatus may include a list of possible statuses.
- """
- if (len(responseString) > 0):
- reasonString = 'Reason: %s' % responseString
- else:
- reasonString = ''
-
- if documentPath:
- documentPath = 'for ' + documentPath
-
- assert actualStatus in (expectedStatus,), '%s returning HTTP %d%s. This is bad. %s' % (activity, actualStatus, documentPath, reasonString)
-
- @classmethod
- def qname(cls, ns, local):
- ''' make a qualified name out of a local name and namespace '''
- return '{%s}%s' % (ns, local)
-
- @classmethod
- def toTree(cls, data):
- """ Return an etree, given some data """
- return etree.parse(StringIO.StringIO(data))
-
- def addDocumentUriToTree(self, tree, documentPath):
- """ add the @jx:document-uri/@xml:base to a tree. documentPath is relative to / (do include /db).
- Return the modified tree. """
- root = tree.getroot()
- root.set('{%s}document-uri' % (self.NS_JX), documentPath )
- root.set('{%s}base' % (self.NS_XML), documentPath)
- return tree
-
- def removeDocumentUriAndXmlBaseFromTreeRoot(self, tree):
- """ Remove the @jx:document-uri/@xml:base from the tree root. Return the modified tree. """
- root = tree.getroot()
- try:
- del root.attrib['{%s}document-uri' % (self.NS_JX)]
- except KeyError:
- pass
- try:
- del root.attrib['{%s}base' % (self.NS_XML)]
- except KeyError:
- pass
- return tree
-
- @classmethod
- def elementsEqual(cls, e1, e2, stripped = True):
- """ determine if e1 and e2 (ElementTree elements) are equal in value (including subelements) """
- children1 = e1.getchildren()
- children2 = e2.getchildren()
-
- if stripped:
- text1 = None
- text2 = None
- tail1 = None
- tail2 = None
- if e1.text:
- text1 = e1.text.strip()
- if e2.text:
- text2 = e2.text.strip()
- if e1.tail:
- tail1 = e1.tail.strip()
- if e2.tail:
- tail2 = e2.tail.strip()
- else:
- text1 = e1.text
- text2 = e2.text
- tail1 = e1.tail
- tail2 = e2.tail
-
- result = (
- e1.tag == e2.tag and
- len(children1) == len(children2) and
- text1 == text2 and
- e1.attrib == e2.attrib and
- tail1 == tail2 and
- all([cls.elementsEqual(children1[n], children2[n]) for n in xrange(len(children1))])
- )
- #if not result:
- # print "elementEquals FAILS AT: ", lxml.etree.toString(e1)
- return result
-
- @classmethod
- def treesEqual(cls, tree1, tree2, stripped = True):
- """ compare trees for equality. Return True or False """
- return cls.elementsEqual(tree1.getroot(), tree2.getroot(), stripped)
-
- def assertResponse(self, status, expectedStatus, reason, data, message = ''):
- """ Assert a given network response for inside tests """
- self.assertTrue(status == expectedStatus, '%s Reason = %s data = %s' % (message, reason, data))
-
- def assertXPath(self, data, xpath):
- """ Assert the truth of a given xpath expression """
- self.assertTrue(
- self.toTree(self.data).xpath(xpath, namespaces=self.prefixes)
- )
-
-class DefaultUser:
- user = 'testuser'
- password = 'testuser'
-
-class BaseAPITestWithHTTPBasic(BaseAPITest):
- def setUp(self, user=DefaultUser.user, password=DefaultUser.password, **kwargs):
- kwargs.setdefault('user', user)
- kwargs.setdefault('password', password)
- kwargs.setdefault('useSession', True)
- kwargs['forceHTTPBasic'] = True
- super(BaseAPITestWithHTTPBasic, self).setUp(**kwargs)
-
-class BaseAPITestWithSession(BaseAPITest):
- def setUp(self, **kwargs):
- super(BaseAPITestWithSession, self).setUp(useSession=True, **kwargs)
-
-def usage():
- print "Unit testing framework. %s [-p admin-password] [-v]" % sys.argv[0]
-
-def testMain():
- global adminPassword
-
- try:
- opts, args = getopt.getopt(sys.argv[1:], "hp:v", ["help", "password=","verbose"])
- except getopt.GetoptError, err:
- # print help information and exit:
- print str(err) # will print something like "option -a not recognized"
- usage()
- sys.exit(2)
-
- for o, a in opts:
- if o in ("-h", "--help"):
- usage()
- sys.exit()
- elif o in ("-p", "--password"):
- adminPassword = a
- elif o in ("-v", "--verbose"):
- pass
- else:
- usage()
- sys.exit()
- if adminPassword is None:
- adminPassword = raw_input('Enter the database admin password (for user tests): ')
-
- unittest.main()
-
diff --git a/code/tests/basedbtest.py b/code/tests/basedbtest.py
deleted file mode 100644
index 4ed62c15..00000000
--- a/code/tests/basedbtest.py
+++ /dev/null
@@ -1,121 +0,0 @@
-#!/usr/bin/env python
-#
-# Object-derived base class for tests, which includes a database object and common functions
-#
-# Copyright 2010 Efraim Feinstein
-# Open Siddur Project
-# Licensed under the GNU Lesser General Public License version 3 or later
-#
-# $Id: basedbtest.py 687 2011-01-23 23:36:48Z efraim.feinstein $
-import StringIO
-import lxml.etree
-
-import existdb
-
-class BaseDBTest(object):
- """ This class serves as a base class for all kinds of database-requiring tests
- and provides them with a database object with overridable, but sane, default values and
- some miscellaneous common, reused functions
- """
- server = 'localhost'
- port = 8080
- user = 'testuser'
- password = 'testuser'
- restPrefix = ''
- debugLevel = 0
- useHTTPBasic = True
-
- database = existdb.Existdb(server, port, restPrefix, user, password, debugLevel, useHTTPBasic)
-
- NS_TEI = 'http://www.tei-c.org/ns/1.0'
- NS_EXIST = 'http://exist.sourceforge.net/NS/exist'
- NS_XML = 'http://www.w3.org/XML/1998/namespace'
- NS_J = 'http://jewishliturgy.org/ns/jlptei/1.0'
- NS_JX = 'http://jewishliturgy.org/ns/jlp-processor'
-
- def assertStatus(self, actualStatus, expectedStatus, responseString = '', activity = 'Set up', documentPath = ''):
- """ assert that a returned status is the same as an expected status. If it isn't display a configurable error and fail.
- This function is intended to be used in setUp() and tearDown() to cause a testing error, as opposed to a test failure.
- expectedStatus may include a list of possible statuses.
- """
- if (len(responseString) > 0):
- reasonString = 'Reason: %s' % responseString
- else:
- reasonString = ''
-
- if documentPath:
- documentPath = 'for ' + documentPath
-
- assert actualStatus in (expectedStatus,), '%s returning HTTP %d%s. This is bad. %s' % (activity, actualStatus, documentPath, reasonString)
-
- @classmethod
- def toTree(cls, data):
- """ Return an lxml.etree, given some data """
- return lxml.etree.parse(StringIO.StringIO(data))
-
- def addDocumentUriToTree(self, tree, documentPath):
- """ add the @jx:document-uri/@xml:base to a tree. documentPath is relative to / (do include /db).
- Return the modified tree. """
- root = tree.getroot()
- root.set('{%s}document-uri' % (self.NS_JX), 'http://%s:%s%s' % (self.server, self.port, documentPath) )
- root.set('{%s}base' % (self.NS_XML), 'http://%s:%s%s' % (self.server, self.port, documentPath) )
- return tree
-
- def removeDocumentUriAndXmlBaseFromTreeRoot(self, tree):
- """ Remove the @jx:document-uri/@xml:base from the tree root. Return the modified tree. """
- root = tree.getroot()
- try:
- del root.attrib['{%s}document-uri' % (self.NS_JX)]
- except KeyError:
- pass
- try:
- del root.attrib['{%s}base' % (self.NS_XML)]
- except KeyError:
- pass
- return tree
-
- @classmethod
- def elementsEqual(cls, e1, e2, stripped = True):
- """ determine if e1 and e2 (ElementTree elements) are equal in value (including subelements) """
- children1 = e1.getchildren()
- children2 = e2.getchildren()
-
- if stripped:
- text1 = None
- text2 = None
- tail1 = None
- tail2 = None
- if e1.text:
- text1 = e1.text.strip()
- if e2.text:
- text2 = e2.text.strip()
- if e1.tail:
- tail1 = e1.tail.strip()
- if e2.tail:
- tail2 = e2.tail.strip()
- else:
- text1 = e1.text
- text2 = e2.text
- tail1 = e1.tail
- tail2 = e2.tail
-
- result = (
- e1.tag == e2.tag and
- len(children1) == len(children2) and
- text1 == text2 and
- e1.attrib == e2.attrib and
- tail1 == tail2 and
- all([cls.elementsEqual(children1[n], children2[n]) for n in xrange(len(children1))])
- )
- #if not result:
- # print "elementEquals FAILS AT: ", lxml.etree.toString(e1)
- return result
-
- @classmethod
- def treesEqual(cls, tree1, tree2, stripped = True):
- """ compare trees for equality. Return True or False """
- return cls.elementsEqual(tree1.getroot(), tree2.getroot(), stripped)
-
- def assertResponse(self, status, expectedStatus, reason, data, message = ''):
- """ Assert a given network response for inside tests """
- self.assertTrue(status == expectedStatus, '%s Reason = %s data = %s' % (message, reason, data))
diff --git a/code/tests/contributors.xml b/code/tests/contributors.xml
deleted file mode 100644
index f938fe5d..00000000
--- a/code/tests/contributors.xml
+++ /dev/null
@@ -1,84 +0,0 @@
-
-
-
-
- Fake contributor list for database unit tests
-
-
-
- To the extent possible under law,
- the contributors who associated
- Creative Commons Zero
- with this work have waived all copyright and related or
- neighboring rights to this work.
- A list of contributors is available at
- http://jewishliturgy.org/base/text/contributors.
-
-
-
-
-
-
-
-
-
- $Id: contributors.xml 411 2010-01-03 06:58:09Z efraim.feinstein $
-
-
-
- Born digital.
-
-
-
-
-
-
-
-
-
-
- Efraim
- Feinstein,
- efraim.feinstein@gmail.com
-
-
- Azriel
- Fasten
- fst911@gmail.com
-
-
- Mister
- Samuel
- Test
- test@example.com
-
-
-
- Toby
- Replaced
- toby@replac.edu
-
-
- Toby
- Deleted
- toby@delet.edu
-
-
- Toby
- Peppered
- toby@prepar.edu
-
-
-
-
-
-
diff --git a/code/tests/existdb.py b/code/tests/existdb.py
deleted file mode 100644
index f19374e7..00000000
--- a/code/tests/existdb.py
+++ /dev/null
@@ -1,213 +0,0 @@
-'''
- Library to run basic operations on eXist database through its REST interface
-
- Copyright 2009-2011 Efraim Feinstein
- Open Siddur Project
- Licensed under the GNU Lesser General Public License, version 3 or later
-
-'''
-import sys
-import lxml.etree
-import urllib2
-import cookielib
-import base64
-import BaseHTTPServer
-
-# This short bit of code from Benjamin Smedberg :
-class RequestWithMethod(urllib2.Request):
- def __init__(self, method, *args, **kwargs):
- self._method = method
- urllib2.Request.__init__(self, *args, **kwargs)
-
- def get_method(self):
- return self._method
-
-class Existdb:
- def __init__(self, server='localhost', port=8080, restPrefix = '', user = '', password = '', debuglevel = 0, useHTTPBasic = True, forceHTTPBasic = True, useSession = False):
- ''' Initialize an eXist REST client. restPrefix is what comes after the port in the URL, eg, /exist/rest ...
- Use forceHTTPBasic to force send the HTTP Basic header even if the server didn't request it.
- '''
- if user == '' and password == '':
- # change the default for HTTP Basic if no passwords are given
- useHTTPBasic = False
- forceHTTPBasic = False
-
- self.server = 'http://%s:%d' % (server, port)
- self.restPrefix = restPrefix
- self.user = user
- self.password = password
- self.debuglevel = debuglevel
- self.useHTTPBasic = useHTTPBasic
- self.forceHTTPBasic = forceHTTPBasic
- self.useSession = useSession
-
- handlers = tuple()
- if useHTTPBasic and not forceHTTPBasic:
- passwd = urllib2.HTTPPasswordMgrWithDefaultRealm()
- passwd.add_password(None, self.server, self.user, self.password)
- handlers = handlers + (urllib2.HTTPBasicAuthHandler(passwd),)
-
- if useSession:
- self.cookieJar = cookielib.LWPCookieJar()
- handlers = handlers + (urllib2.HTTPCookieProcessor(self.cookieJar),)
- else:
- self.cookieJar = None
-
- handlers = handlers + (urllib2.HTTPHandler(debuglevel=debuglevel),)
-
- self.urlOpener = urllib2.build_opener(*handlers)
-
- # return (code, reason, data as string)
- def openUrl(self, request):
- if self.forceHTTPBasic:
- enc = base64.encodestring('%s:%s' % (self.user, self.password))
- request.add_header("Authorization", "Basic %s" % enc)
- try:
- response = self.urlOpener.open(request)
- except urllib2.HTTPError, err:
- response = err
- except urllib2.URLError, err:
- response = err
- response.getcode = lambda : 0
- response.close = lambda : ()
- response.read = lambda : str(err)
- finally:
- code = response.getcode()
- data = response.read()
- response.close()
- reason = BaseHTTPServer.BaseHTTPRequestHandler.responses[code][0]
- return (code, reason, data)
-
- def get(self, location):
- ''' send a get request for a location
- Return (status, reason, data).
- '''
- url = self.server + self.restPrefix + location
- req = RequestWithMethod('GET', url)
- return self.openUrl(req)
-
- def put(self, location, document, contentType='text/xml'):
- ''' put a document to a given database location.
- Return status, reason, headers
- '''
- url = self.server + self.restPrefix + location
- req = RequestWithMethod('PUT', url, data=document,
- headers={'Content-Type':contentType})
- return self.openUrl(req)
-
- def delete(self, location):
- ''' delete a location
- Return (status, reason, data)
- '''
- url = self.server + self.restPrefix + location
- req = RequestWithMethod('DELETE', url)
- return self.openUrl(req)
-
- def createCollection(self, collection, base = '/db'):
- ''' make a collection (requires appropriate priveleges) '''
- return self.postQuery('xquery version "1.0";' +
- 'xmldb:create-collection("' + base + '", "' + collection + '")')
-
- def removeCollection(self, collection):
- ''' remove a collection (requires appropriate priveleges) '''
- return self.postQuery('xquery version "1.0";' +
- 'xmldb:remove("' + collection + '")')
-
- def post(self, location, document, contentType='text/xml'):
- ''' Post data to the database.
- location holds the database location (eg, starting with /db)
- Return (status, reason, data)
- '''
- url = self.server + self.restPrefix + location
- req = RequestWithMethod('POST', url, data=document, headers={'Content-type':contentType})
- return self.openUrl(req)
-
- def postQuery(self, queryString, postLocation='/db',
- contentType='application/xml'):
- ''' Post a query to the database.
- postLocation holds the database location (eg, starting with /db)
- queryString holds the full query
- Return (status, reason, data)
- '''
- body = ('\n' +
- '\n'
- '\n' +
- '\n' +
- '\n' +
- ''
- )
- return self.post(postLocation, body, contentType)
-
- def postQueryFile(self, queryFile, postLocation='/db',
- contentType='application/xml'):
- ''' Post a query from a file instead of a string '''
- f=file(queryFile, 'r')
- queryString=f.read()
- f.close()
- return self.postQuery(queryString, postLocation, contentType)
-
- def getPermissions(self, location):
- ''' get permissions (status, reason, user, group, mode) for a given location
- user, group, and mode are all strings. mode returns an octal number (as a string)
- '''
- (status, reason, data) = self.postQuery(
- '''xquery version "1.0";
- import module namespace xmldb="http://exist-db.org/xquery/xmldb";
- import module namespace util="http://exist-db.org/xquery/util";
-
- let $location := "'''+location+'''"
- return
- if (xmldb:collection-available($location))
- then
-
- {xmldb:get-owner($location)}
- {xmldb:get-group($location)}
- {xmldb:get-permissions($location)}
-
- else if (doc-available($location) or util:binary-doc-available($location))
- then
- let $collection := util:collection-name($location)
- let $resource := util:document-name($location)
- return
-
- {xmldb:get-owner($collection, $resource)}
- {xmldb:get-group($collection, $resource)}
- {xmldb:get-permissions($collection, $resource)}
-
- else
-
-
-
-
-
- ''')
- if (status == 200):
- parsedData = lxml.etree.fromstring(data)
- user = parsedData[0][0].text
- group = parsedData[0][1].text
- mode = parsedData[0][2].text
- return (status, reason, user, group, '%o' % int(mode))
- else:
- return (status, reason, '','','')
-
-if __name__ == "__main__":
- ''' The default thing to do is to pass a query '''
- server = 'localhost'
- port = 8080
- if len(sys.argv) >= 2:
- print len(sys.argv), sys.argv
- queryFile = sys.argv[1]
- if len(sys.argv) >= 3:
- server = sys.argv[2]
- if len(sys.argv) >= 4:
- port = int(sys.argv[3])
- else:
- print 'Usage: %s query-file [server [port]]' % sys.argv[0]
- exit(0)
- e = Existdb(server, port)
- (status, response, data) = e.postQueryFile(queryFile)
- print status, ' ', response, '\n'
- print data
-
diff --git a/code/tests/is-db-running.py b/code/tests/is-db-running.py
deleted file mode 100644
index 39dac12d..00000000
--- a/code/tests/is-db-running.py
+++ /dev/null
@@ -1,67 +0,0 @@
-#!/usr/bin/env python
-# Usage: is-db-running [options]
-# options:
-# -s server
-# -p port
-#
-# Return 0 if yes, nonzero if no.
-#
-# Copyright 2010 Efraim Feinstein
-# Open Siddur Project
-# Licensed under the GNU Lesser General Public License version 3 or later
-#
-# $Id: is-db-running.py 687 2011-01-23 23:36:48Z efraim.feinstein $
-import sys
-import getopt
-import existdb
-
-def usage():
- message = """usage: %s [options]
- options:
- -s server server address (default: localhost)
- -p port port (default: 8080)
- -q quiet (supporess error message)
- -h this help message
- returns status code 0 if database is running, status code 1 and an error message if not
- """ % sys.argv[0]
-
-def main():
- try:
- opts, args = getopt.getopt(sys.argv[1:], "hs:p:q", ["help", "server=", "port=", "quiet"])
- except getopt.GetoptError, err:
- # print help information and exit:
- print str(err) # will print something like "option -a not recognized"
- usage()
- return 2
- server = 'localhost'
- port = 8080
- quiet = False
- for o, a in opts:
- if o in ("-h", "--help"):
- usage()
- return 0
- elif o in ("-s", "--server"):
- server = a
- elif o in ("-p", "--port"):
- port = int(a) # make sure it's an integer
- elif o in ("-q", "--quiet"):
- quiet = True
- else:
- assert False, "Unknown option"
-
- db = existdb.Existdb(server=server, port=port)
- try:
- (status, reason, data) = db.get("/db")
- except Exception, e:
- status = 0
- reason = str(e)
-
- if status == 200:
- return 0
- else:
- if not quiet:
- print >> sys.stderr, "Database access returned: %s (code %d). It is probably not running or there is something wrong." % (reason, status)
- return 1
-
-if __name__ == '__main__':
- sys.exit(main())
diff --git a/code/tests/jtestcase.py b/code/tests/jtestcase.py
deleted file mode 100644
index 27d269b5..00000000
--- a/code/tests/jtestcase.py
+++ /dev/null
@@ -1,49 +0,0 @@
-#!/usr/bin/env python
-# -*- coding: utf-8 -*-
-# Base class for test cases
-#
-# Copyright 2009 Efraim Feinstein
-# Licensed under the GNU Lesser General Public License, version 3 or later
-# $Id: jtestcase.py 687 2011-01-23 23:36:48Z efraim.feinstein $
-import StringIO
-import lxml.etree
-
-import unittest
-import existdb
-
-class JTestCase(unittest.TestCase):
- # namespaces:
- XML = 'http://www.w3.org/1998/namespace'
- TEI = 'http://www.tei-c.org/ns/1.0'
- J = 'http://jewishliturgy.org/ns/jlptei/1.0'
- JX = 'http://jewishliturgy.org/ns/jlp-processor'
- EXIST = 'http://exist.sourceforge.net/NS/exist'
- namespaces = {'tei':TEI,
- 'exist':EXIST,
- 'j':J,
- 'jx':JX}
-
- def __init__(self, server='localhost', port=8080, user='tests', password='tests'):
- self.database=existdb.Existdb(server, port, user, password)
- unittest.TestCase.__init__(self)
-
- def toTree(self, data):
- """ Convenience function. Return an lxml.etree from XML data """
- return lxml.etree.parse(StringIO.StringIO(data))
-
-
- def upload(self, documentFile, documentLocation):
- """ Upload a document to the db """
- document = file(documentFile, 'r')
- (status, reason, data) = self.database.put(
- documentLocation, document.read())
- document.close()
- self.assertEqual(status, 201, self.serverErrorMsg(
- 'cannot load %s to database' % (documentFile),
- status, reason, data))
-
- def serverErrorMsg(self, msg, status, reason, data):
- return ('%s\n' % (msg) +
- 'status: %s %s\n' % (status, reason) +
- '%s' % (data))
-
diff --git a/code/tests/minimal-invalid.xml b/code/tests/minimal-invalid.xml
deleted file mode 100644
index 07c392e9..00000000
--- a/code/tests/minimal-invalid.xml
+++ /dev/null
@@ -1,18 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
- Shortest document ever
- Yay!
-
-
-
-
diff --git a/code/tests/minimal-valid.xml b/code/tests/minimal-valid.xml
deleted file mode 100644
index 376589bd..00000000
--- a/code/tests/minimal-valid.xml
+++ /dev/null
@@ -1,40 +0,0 @@
-
-
-
-
- Minimal valid JLPTEI
-
-
-
- To the extent possible under law,
- the contributors who associated
- Creative Commons Zero
- with this work have waived all copyright and related or
- neighboring rights to this work.
- A list of contributors is available at
- http://jewishliturgy.org/base/text/contributors.
-
-
-
-
-
-
-
-
-
- $Id: minimal-valid.xml 411 2010-01-03 06:58:09Z efraim.feinstein $
-
-
- Born digital.
-
-
-
-
-
-
- Shortest document ever
- Yay!
-
-
-
-
diff --git a/code/tests/modules/mirror.t.xml b/code/tests/modules/mirror.t.xml
deleted file mode 100644
index 3cd73e81..00000000
--- a/code/tests/modules/mirror.t.xml
+++ /dev/null
@@ -1,269 +0,0 @@
-
-
-
- Mirror module
-
-
Test the mirror collection module
- Efraim Feinstein
-
-
-
- import module namespace mirror="http://jewishliturgy.org/modules/mirror"
- at "xmldb:exist:///code/modules/mirror.xqm";
-
- '/group/testuser'
- '/group/testuser/mirror'
-
-
- mirror:mirror-path()
-
- Returns the path concatenated
-
- /mirror/original/path
-
-
- Handles / prefixes in first parameter
-
- /mirror/original/path
-
-
- Handles / prefixes in second parameter
-
- /mirror/original/path
-
-
- Handles /db prefixes in second parameter
-
- /mirror/original/path
-
-
- Handles /db in second parameter
-
- /mirror
-
-
- Handles /db prefix in first parameter
-
- /mirror/group/testuser
-
-
- Handles non-/db prefix in second parameter
-
- /group/testuser/mirror
-
-
-
- mirror:unmirror-path()
-
- /db in both parameters, self
-
- /
-
-
- /group/testuser/mirror's base
-
- /group/testuser
-
-
- mirror with further collections
-
- /group/testuser/one/two
-
-
-
- mirror:make-collection-path()
-
-
-
-
-
-
-
-
-
-
-
-
- Make a collection hierarchy
-
- xmldb:collection-available("/group/testuser/mirror")
- xmldb:collection-available("/group/testuser/mirror/one")
- xmldb:collection-available("/group/testuser/mirror/one/two")
- xmldb:collection-available("/group/testuser/mirror/one/two/three")
- xmldb:collection-available("/group/testuser/mirror/one/two/three/four")
- local:same-permissions("/group/testuser/mirror","/group/testuser")
- local:same-permissions("/group/testuser/mirror/one","/group/testuser/one")
- local:same-permissions("/group/testuser/mirror/one/two","/group/testuser/one/two")
- local:same-permissions("/group/testuser/mirror/one/two/three","/group/testuser/one/two/three")
- local:same-permissions("/group/testuser/mirror/one/two/three/four","/group/testuser/one/two/three/four")
-
-
-
- mirror:is-up-to-date() where resource is newer
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- with no function
-
- true
-
-
- with an additional function that returns true()
-
- true
-
-
- with an additional function that returns false()
-
- false
-
-
-
- mirror:is-up-to-date() where resource is older
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- without an additional function
-
- false
-
-
- with an additional function that returns true()
-
- false
-
-
-
- mirror:store()
-
-
-
-
-
-
-
-
-
-
- Store a resource
- )
- ]]>
- /group/testuser/mirror/test.xml
- xmldb:collection-available("/group/testuser/mirror")
- doc-available("/group/testuser/mirror/test.xml")
- local:same-permissions("/group/testuser/test.xml", "/group/testuser/mirror/test.xml")
-
-
-
- mirror:remove()
-
-
-
-
-
-
-
-
-
-
-
- Remove a resource
-
- not(doc-available("/group/testuser/mirror/group/testuser/one/test.xml"))
-
-
- Remove a collection
-
- not(xmldb:collection-available("/group/testuser/mirror/one"))
-
-
-
\ No newline at end of file
diff --git a/code/tests/run-db-tests.xql b/code/tests/run-db-tests.xql
deleted file mode 100644
index 31382ac6..00000000
--- a/code/tests/run-db-tests.xql
+++ /dev/null
@@ -1,20 +0,0 @@
-(: Simple script to run tests from the database. To run, use a ?test=xspec_file parameter
-
-Copyright 2010 Efraim Feinstein
-Open Siddur Project
-Licensed under the GNU Lesser General Public License, version 3 or later
-
-$Id: run-db-tests.xql 687 2011-01-23 23:36:48Z efraim.feinstein $
-
-:)
-import module namespace xspec="http://jewishliturgy.org/modules/xspec" at "/code/modules/xspec.xqm";
-
-declare option exist:serialize "method=xhtml media-type=text/html omit-xml-declaration=no indent=yes";
-
-let $test := request:get-parameter('test','')
-let $xspec :=
- if ($test)
- then concat('/code/transforms/', $test)
- else '/code/tests/identity.xspec'
-return
- xspec:test($xspec)
diff --git a/code/tests/setup-test-cache.xql b/code/tests/setup-test-cache.xql
deleted file mode 100644
index 71f4bab1..00000000
--- a/code/tests/setup-test-cache.xql
+++ /dev/null
@@ -1,27 +0,0 @@
-xquery version "1.0";
-(: Set up cache for testing directories
- :
- : Copyright 2011 Efraim Feinstein
- : Licensed under the GNU Lesser General Public License, version 3 or later
- : $Id: setup-test-cache.xql 745 2011-04-17 17:43:50Z efraim.feinstein $
- :)
-import module namespace jcache="http://jewishliturgy.org/modules/cache"
- at "xmldb:exist:///code/modules/cache-controller.xqm";
-
-declare namespace tei="http://www.tei-c.org/ns/1.0";
-declare namespace j="http://jewishliturgy.org/ns/jlptei/1.0";
-
-for $resource in collection('/code/transforms')//tei:TEI
-let $uri := trace(document-uri(root($resource)), 'trying ')
-where matches($uri, '/test') and not(matches($uri, '/cache/'))
-return (
-util:log-system-out($uri),
-jcache:cache-all($uri)),
-
-
- Caching test suite complete
-
-
-
- Efraim Feinstein
- Copyright 2011-2012 Efraim Feinstein
- Licensed under the GNU Lesser General Public License, version 3 or later
-
-
-
-
-
-
-
- No table
-
- no transliteration table specified
-
-
-
-
-
-
- with specified transliteration table and default alignment...
-
- j:segGen
-
-
-
-
-
- tei:seg
-
-
-
-
-
- pre-existing j:parallelGrp
-
-
-
-
-
-
- with specified transliteration table and alignment at paragraphs...
-
- tei:p and tei:seg
-
-
-
-
-
- tei:p and pre-existing j:parallelGrp
-
-
-
-
-
-
\ No newline at end of file
diff --git a/code/transforms/Makefile b/code/transforms/Makefile
deleted file mode 100644
index c15c95bc..00000000
--- a/code/transforms/Makefile
+++ /dev/null
@@ -1,26 +0,0 @@
-# Makefile for the transforms directory.
-#
-# Build transforms that are generated
-# Assumes that it will be included after the definitions in the top level Makefile
-#
-# Copyright 2008-2011 Efraim Feinstein
-#
-# This program is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Lesser General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Lesser General Public License for more details.
-#
-# You should have received a copy of the GNU Lesser General Public License
-# along with this program. If not, see http://www.gnu.org/licenses/
-#
-TRANSFORMS-DIR ?= $(CODEDIR)/transforms
-
-TRANSFORM-OUTPUTS = $(TEXTDIR)/Tanach.html
-
-transforms:
- @echo
diff --git a/code/transforms/concurrent/concurrent.xsl2 b/code/transforms/concurrent/concurrent.xsl2
deleted file mode 100644
index 8b8a2684..00000000
--- a/code/transforms/concurrent/concurrent.xsl2
+++ /dev/null
@@ -1,1121 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Standalone transform to convert concurrent hierarchies (as specified by j:concurrent) to
- inline hierarchies. The result is valid XML but invalid TEI.
-
- Copyright 2009-2011 Efraim Feinstein (LGPL 3+)
-
-
This program is free software: you can redistribute it and/or modify
- it under the terms of the GNU Lesser General Public License as published by
- the Free Software Foundation, either version 3 of the License, or
- (at your option) any later version.
-
-
This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU Lesser General Public License for more details.
-
-
You should have received a copy of the GNU Lesser General Public License
- along with this program. If not, see
- http://www.gnu.org/licenses/.
-
-
-
-
-
- Document URI, which is REQUIRED to be provided if the system's
- document-uri() function does not work (eg, Saxon through eXist).
-
-
-
-
- Catch tei:TEI, add a j:links section and run intermediate-links mode, if necessary
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Catch j:links, switch into intermediate-links mode
-
-
-
-
-
-
- mark cache dependencies with a jx:cache-depend element
-
-
-
-
-
-
-
-
- Find @xml:id and convert it to @jx:id in default mode
- Low priority; higher priority templates will have to convert on their own
-
-
-
-
-
-
-
-
-
-
- Match concurrent hierarchies. Return a parsed forms of the
- hierarchies joined together
- Leaves attributes @jx:document-uri and @xml:base so pointers
- and the document source can be resolved.
- additional views to process as if
- they were part of the current hierarchy
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Perform most of the concurrent processing operations
- This is a helper template
- Result of mode=resolve-internal
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- j:concurrent for parallel texts
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Select the right parallel or original for each element
- The processed parallel hierarchy that is
- concurrent to this one.
-
-
-
-
-
-
-
- Every element that is not j:parallel|j:original is
- identity transformed.
-
-
-
-
-
-
- Form a merged-selection element
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Copy only one copy of a starting element, removing
- attributes added in the concurrent.xsl2 process
- After this mode:
-
-
Each *[@jx:uid] only has one @jx:start and
-
@jx:parents and @jx:ancestors reflect the parents and ancestors from both views
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Copy only one copy of an ending element, removing
- attributes added in the concurrent.xsl2 process
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Copy only one copy of an element containing no start or end
- marker, removing attributes added in the concurrent.xsl2 process
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Copy a single element, removing unnecessary attributes added
- during the concurrent.xsl2 processing (@jx:selection)
-
-
-
-
-
-
-
-
-
- The "meat" of the merge-concurrent operation.
- Combine and dump all of the flat hierarchies,
- avoid duplicates
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Merge view to the given selection.
- The view is already flattened.
- Return a jx:merged-view element
-
- A flattened view to be merged with
- the given selection.
-
-
-
-
-
-
-
-
-
-
-
- Clobber text nodes
-
-
-
-
- Catch tei:ptr in merge-view-to-selection mode.
- The expected context is a selection, all views to be incorporated
- are included in parameter $view. The output is a merged entity,
- with the following properties:
-
-
All pointers contained in the selection are present and in the
- correct position with respect to the contents of the view.
-
If a view skips any selection pointers, any open tags at the
- point of the skip are "closed" with an element with @jx:suspend.
- They are reopened with @jx:continue after the skip.
-
At a suspend, all elements up to the last end element are
- considered to be before the suspension.
- After it are after the suspension.
-
If any views duplicate each other, the duplicates are present
-
The pointers coming from all the views are unsorted.
element()[@jx:end|@jx:suspend] can't be placed before last entry that has itself as parent or ancestor
-
element()[@jx:start|@jx:continue] can't be placed after first entry that has self as parent or ancestor
-
element()[not(@jx:start|@jx:end|...) must be placed after element()[@jx:start] of all parent|ancestor and
- before element()[@jx:end] of all parent|ancestor
-
-
- remaining unsorted elements (as a document node so it can be indexed by keys)
- already sorted elements (as a document node so it can be indexed by keys)
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Sort a flat hierarchy by priority, assuming that:
-
-
tei:ptr[@jx:selection] never moves from its relative position
-
blocks of starting and ending elements can be moved
-
other elements do not move relative to those blocks
-
-
- The sequence to sort.
- Identifier of the selection
- currently being processed
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Simple helper function to convolve an existing xml:id to a
- part-unique generated ID for multipart elements
- The element for which to generate the ID
-
-
-
-
-
-
-
- Clean up after unflatten by replacing @jx:part with
- @next and @prev and assigning a new @xml:id; keep the old @xml:id
- in @jx:id
- BUG? Will break if the element already had @next/@prev
- (I don't think this should ever happen)
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Clean up after unflatten by removing added attributes
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Do not copy the jx:unflattened element
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Expand internal pointers in the selection with their content
- External pointers in parallel groups are treated like internal pointers
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/code/transforms/concurrent/flatten.xsl2 b/code/transforms/concurrent/flatten.xsl2
deleted file mode 100644
index 2ff5c018..00000000
--- a/code/transforms/concurrent/flatten.xsl2
+++ /dev/null
@@ -1,333 +0,0 @@
-
-
-
-
-
- Modes to flatten and unflatten a hierarchy.
- Copyright 2009-2010 Efraim Feinstein
-
-
This program is free software: you can redistribute it and/or modify
- it under the terms of the GNU Lesser General Public License as published by
- the Free Software Foundation, either version 3 of the License, or
- (at your option) any later version.
-
-
This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU Lesser General Public License for more details.
-
-
You should have received a copy of the GNU Lesser General Public License
- along with this program. If not, see http://www.gnu.org/licenses/.
-
- $Id: flatten.xsl2 687 2011-01-23 23:36:48Z efraim.feinstein $
-
-
-
-
-
-
- Given a sequence of elements from a flattened hierarchy,
- produce equivalent open or closed tags.
-
- If activity is suspend, the tags become suspend tags,
- if it is continue, they become continue tags.
-
- Sequence of opening elements
- May be one of 'suspend' or 'continue'
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Find the tags that are closed, but not opened,
- in a group of flattened hierarchy.
-
- Group of tags to search within.
-
-
-
-
-
-
-
- Find tags that are opened, but not closed, in a flattened
- hierarchy
- Group of tags to search within.
-
-
-
-
-
-
-
-
- set the @parents and @ancestors attributes of elements in
- a flat hierarchy to the xml:ids of the parent and ancestor elements,
- using the $parent-id and $ancestor-ids tunneled parameters
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- copy a childless element in flatten mode
-
-
-
-
-
-
-
-
-
-
- flatten an element with children in flatten mode
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- copy text
-
-
-
-
-
-
- if the context is or has a child containing pointer, flatten it. Otherwise, leave it as-is.
-
-
- After enhanced flatten mode, each view contains a flattened hierarchy
- for any parts of the hierarchy that contain elements from the selection.
- All other child hierarchies are maintained unflattened.
-
-
-
-
-
-
-
-
-
-
- Convert j:view (which may be a root element) to jx:flat-view
-
-
-
-
-
-
-
-
-
- Turn a root element of any type into a root element of a flat
- hierarchy too.
-
-
-
-
-
-
-
-
-
-
-
- Copy and apply templates to
- an element that is not flattened in unflatten mode.
-
-
-
-
-
-
-
-
-
-
- Build a hierarchy out of a start element in unflatten
- mode.
- Important note: unflatten mode is called by applying templates
- to the first node of the flat sequence, not by applying
- templates to the whole sequence!
- If either a start or end node doesn't exist at this point,
- it's the result of a sorting error.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Ignore end tags in unflatten mode if there was a start tag
-
- This processing is only necessary because of a kluge
- that allows parallelGrp/parallel to accept lone start and end
- elements from the wrong hierarchy
-
-
-
-
-
-
-
-
-
- Text is copied and templates applied to next node (mixed content!)
-
-
-
-
-
-
-
diff --git a/code/transforms/concurrent/intermediate-links.xsl2 b/code/transforms/concurrent/intermediate-links.xsl2
deleted file mode 100644
index cd4e03ed..00000000
--- a/code/transforms/concurrent/intermediate-links.xsl2
+++ /dev/null
@@ -1,123 +0,0 @@
-
-
-
-
-
- intermediate-links mode: finds tei:ptr inside j:concurrent that would get "lost" if the links were followed.
- Insert them in the j:links section as tei:ptr's
-
- Copyright 2010-2011 Efraim Feinstein (LGPL 3+)
-
-
This program is free software: you can redistribute it and/or modify
- it under the terms of the GNU Lesser General Public License as published by
- the Free Software Foundation, either version 3 of the License, or
- (at your option) any later version.
-
-
This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU Lesser General Public License for more details.
-
-
You should have received a copy of the GNU Lesser General Public License
- along with this program. If not, see
- http://www.gnu.org/licenses/.
-
-
-
-
-
- Add a j:links section if the document does not already have one
- This template will probably only run if the mode is executed independently
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- If a j:links section exists, copy it exactly, then run the mode for j:concurrent
- This template will probably only run if the mode is executed independently
-
-
-
-
-
-
-
-
-
- Ignore text nodes inside the selection.
-
-
-
-
- Copy a tei:ptr for intermediate link
-
-
-
-
-
-
-
-
-
-
-
- views disappear in the concurrency process, make them
- point the something resembling a view
-
-
-
-
-
-
-
-
-
-
-
-
- Only copy an intermediate pointer in the selection
- if it's an internal pointer
-
-
-
-
-
-
-
-
- Find pointers not in the selection. Copy them
-
-
-
-
-
diff --git a/code/transforms/concurrent/parallel.xsl2 b/code/transforms/concurrent/parallel.xsl2
deleted file mode 100644
index e513a429..00000000
--- a/code/transforms/concurrent/parallel.xsl2
+++ /dev/null
@@ -1,277 +0,0 @@
-
-
-
-
-
-
-
-
-
- Provides templates for working with parallel texts, as described
- in the JLPTEI guidelines section on translations.
-
- This file must be included, not imported, to work properly.
-
- Copyright 2009 Efraim Feinstein
-
-
-
This program is free software: you can redistribute it and/or modify
- it under the terms of the GNU Lesser General Public License as published by
- the Free Software Foundation, either version 3 of the License, or
- (at your option) any later version.
-
-
This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU Lesser General Public License for more details.
-
-
You should have received a copy of the GNU Lesser General Public License
- along with this program. If not, see
- http://www.gnu.org/licenses/.
-
-
- $Id: parallel.xsl2 687 2011-01-23 23:36:48Z efraim.feinstein $
-
-
- Parallel links referenced in $available-links, indexed by the
- document URI of the original file
-
-
-
- Check for parallel files and if a parallel file exists,
- find parallel concurrencies to this one
- As defined in
- conditionals.xsl2
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Ready a flattened hierarchy for parallel processing.
- A flat hierarchy is readied as follows: Any time a
- j:parallelGrp is found, all open tags are suspended. The tags are
- reopened in both the original and parallel sections of the parallelGrp,
- and, if still open at the end, are suspended again. All suspended tags
- are continued on the other side of the parallelGrp.
-
-
-
-
-
-
-
-
-
-
-
- Make a parallelGrp into a hierarchical organization from
- a flat organization, to allow flattened hierarchies to
- undergo parallel-text processing
- Keeps track of tags that have been opened
-
- Keeps track of tags that have been
- suspended
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Do nothing when reaching the end of a parallelGrp.
- The @jx:start|@jx:continue template handles it.
-
-
-
-
- Continue suspended tags for the current-selection
- parallel text, simply copy the other.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Suspend tags that are still open at the end of
- the current-selection parallel text, do nothing for the other.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- process the start of an original or parallel group
- as it would be processed for the active selection
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- process the end of an original or parallel group
- as it would be processed for the active selection
-
-
-
-
-
-
-
-
- process the start of an original or parallel group
- as it would be processed for an inactive selection
-
-
-
-
-
-
-
-
-
diff --git a/code/transforms/concurrent/resolve-internal.xsl2 b/code/transforms/concurrent/resolve-internal.xsl2
deleted file mode 100644
index 5ab70dd5..00000000
--- a/code/transforms/concurrent/resolve-internal.xsl2
+++ /dev/null
@@ -1,219 +0,0 @@
-
-
-
-
-
-
-
- The resolve-internal mode: Follow pointers within a j:view until they point into a selection.
- Return a j:view containing the resolved pointers. The $full-context tunneled boolean flag
- determines whether the full context should be copied if not changed (default false())
- Copyright 2009-2010 Efraim Feinstein (LGPL 3+)
-
-
This program is free software: you can redistribute it and/or modify
- it under the terms of the GNU Lesser General Public License as published by
- the Free Software Foundation, either version 3 of the License, or
- (at your option) any later version.
-
-
This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU Lesser General Public License for more details.
-
-
You should have received a copy of the GNU Lesser General Public License
- along with this program. If not, see
- http://www.gnu.org/licenses/.
-
-
- $Id: resolve-internal.xsl2 687 2011-01-23 23:36:48Z efraim.feinstein $
-
-
-
- Resolve internal pointers until a dead end or a pointer
- within the selection is found. Copy pointers from the selection
- and mark them with @jx:selection="{uid of selection}"
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- view in resolve-internal mode is like element()
- but doesn't call attach-copy, so it always has its context.
- Send a tunneled parameter to children indicating the id of the view
- being processed.
- Maintains @jx:uid and @jx:document-uri for views.
- The latter is necessary in order to tell what to do with
- overlapping @xml:id between parallel documents
- Holds the document URI, usually of the element processed just before the current element
- Holds the language, usually of the element processed just before the current element
- If true(), the entire context is copied for every element
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Element in resolve-internal mode. Copy the element and
- return it with new attributes:
-
-
@jx:uid containing the attribute's original node ID
-
@jx:id containing any original @xml:id
-
-
-
- @jx:uid can be used later to find which resolved elements
- refer to the same node. "uid" means "unique identifier."
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Mark the selection(s) that the parallel group is
- derived from with an @jx:selection-origin attribute
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Copy the full context if $full-context is true(), otherwise only copy if it changed.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/code/transforms/concurrent/set-priorities.xsl2 b/code/transforms/concurrent/set-priorities.xsl2
deleted file mode 100644
index 4f6767ea..00000000
--- a/code/transforms/concurrent/set-priorities.xsl2
+++ /dev/null
@@ -1,138 +0,0 @@
-
-
-
-
-
-
- Set-priorities mode: give each element in a hierarchy a numeric priority. Higher numbers
- indicate more likelihood of being an outer hierarchy when combined with others.
- Copyright 2009-2010 Efraim Feinstein (LGPL 3+)
-
-
This program is free software: you can redistribute it and/or modify
- it under the terms of the GNU Lesser General Public License as published by
- the Free Software Foundation, either version 3 of the License, or
- (at your option) any later version.
-
-
This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU Lesser General Public License for more details.
-
-
You should have received a copy of the GNU Lesser General Public License
- along with this program. If not, see
- http://www.gnu.org/licenses/.
-
-
- $Id: set-priorities.xsl2 687 2011-01-23 23:36:48Z efraim.feinstein $
-
-
-
-
-
- Increase in priority if the element has descendants in the selection
- but no children in the selection
-
-
-
- Return the sorting priority of an element in multiple hierarchies
-
-
-
Elements involved in parallelism have $maximum-priority
-
Elements in the selection have empty priority
-
Elements that have no descendants in the selection have
- a priority
-
Elements not in the selection that have children in the selection
- have a priority equal to the total number of descendants in the selection.
-
Elements not in the selection that have no children in the selection
- have a priority equal to the total number of descendants in the selection +
- $priority-boost * max(number of descendants with )
-
-
- The element
-
-
-
-
-
-
-
-
-
-
-
- Return the largest number of hierarchic levels required to get from
- $context to an element that is a direct parent of a selection element
-
-
-
-
-
-
-
-
- Do identity transform for elements within a selection.
- Elements in selections are unmovable and don't have priorities.
-
-
-
-
-
-
-
-
-
- Set an element priority, if the element is not already in a selection
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/code/transforms/concurrent/standoff-views.xsl2 b/code/transforms/concurrent/standoff-views.xsl2
deleted file mode 100644
index 6dc67cfa..00000000
--- a/code/transforms/concurrent/standoff-views.xsl2
+++ /dev/null
@@ -1,315 +0,0 @@
-
-
-
-
-
-
-
- Provides templates for handling stand-off markup links that result in virtual
- views.
-
- Copyright 2007-2011 Efraim Feinstein
-
-
This program is free software: you can redistribute it and/or modify
- it under the terms of the GNU Lesser General Public License as published by
- the Free Software Foundation, either version 3 of the License, or
- (at your option) any later version.
-
-
This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU Lesser General Public License for more details.
-
-
You should have received a copy of the GNU Lesser General Public License
- along with this program. If not, see
- http://www.gnu.org/licenses/.
-
Active links are stored in a tunneled variable called $active-association-links.
- $available-links *must* be updated every time the context
- switches documents (at the start of processing and at tei:ptr).
- Active selections are stored in a tunneled variable called
- $active-selections. Active selections switch when an @xml:id in-context
- is referenced in $available-links.
-
- Copyright 2007-2011 Efraim Feinstein
-
-
-
This program is free software: you can redistribute it and/or modify
- it under the terms of the GNU Lesser General Public License as published by
- the Free Software Foundation, either version 3 of the License, or
- (at your option) any later version.
-
-
This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU Lesser General Public License for more details.
-
-
You should have received a copy of the GNU Lesser General Public License
- along with this program. If not, see
- http://www.gnu.org/licenses/.
-
-
-
-
-
- Indexes conditional associations within available-links
- by the xml:id that sets them off.
-
-
-
-
- Indexes conditional settings by the xml:id
- that sets them off.
-
-
-
-
- Indexes which documents' associations are currently
- stored so they will not be stored more than once
-
-
-
-
-
- Use the debug output-conditionals processing instruction to cause the output of the current-settings structure in the output stream
-
-
-
-
-
-
-
-
-
-
-
-
-
- Catch @xml:id with high priority for new set links.
- If the @xml:id includes new sets, put them in
- $current-settings (tunneled parameter).
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Combines $old-settings and
- $new-settings into a form suitable for the
- $current-settings tunneled parameter. Returns
- a document containing the combined selections under a
- jx:current-settings root.
-
- Any duplication in fs[@type]/f[@name] between
- $new-settings and $old-settings results in the version from
- $new-settings replacing the one from $old-settings.
-
- current settings before incorporation
- of the new ones
- New settings to incorporate (see details).
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Add a feature structure declaration to the current context,
- do not add if the type has already been declared (as shown by
- $feature-declarations)
-
-
-
-
-
-
-
-
-
-
- Add a feature structure declaration via link
-
-
-
-
-
-
- process-conditionals mode is intended to process
- conditionals and do nothing else, so, if all else passes,
- it's an identity transform
-
-
-
-
-
-
-
-
-
- Builds a feature structure of the same type and content as the
- original feature structure, with the following exceptions:
- if any features are expressed in @feats parameters,
- they are converted to child <f/> elements.
- Assumes the input is valid TEI.
-
-
-
-
-
-
-
-
-
-
-
-
- Like standardize-features, but also adds default values for nonexistent features
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Like tei:fs,
- converts tei:f into a consistent format,
- where all values are referenced by inline elements (removes @fVal)
-
-
-
-
-
-
-
-
-
-
-
-
-
- Elements that are ignored, but their content is kept
-
-
-
-
-
-
- Hold vLabels that can be referenced by name
-
-
-
-
- vLabel without element content copies the content of the vLabel
-
-
-
-
-
-
-
-
-
- copies element and contents *unless* the immediate parent is a vColl of the same type, in which case, only the contents are copied.
- Assumes default @org='set'
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Turns whatever is directly descending from it into one collection of the given @org type.
-
-
-
-
-
-
-
-
- Look up the declared default value of the given feature
-
-
-
-
-
-
-
-
-
-
-
- Set default value. If more than one result comes up, combine them by or logic.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Conditional feature value: evaluate the condition, if it evaluates to something equivalent to true, use the given value
-
-
-
-
-
-
-
-
-
-
-
- Literally copy all text.
-
-
-
-
-
-
-
-
- Default is identity template
-
-
-
-
-
-
-
-
-
-
- Get the value of a selected feature, given its name, type, and the current selections.
- If it is not selected, get its default value
-
- Extends func:get-selection-value() in standardize-features.xsl2
- Document containing currently active features
- The name of the feature to look up
- The type of the feature to look up
- The processing context
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Indexes conditional associations within available-links
- by the xml:id that sets them off.
-
-
-
-
- Index conditionals by their type and name separated by the string '->'.
- If the tei:fs has no type, it is represented by the empty string.
-
-
-
-
-
- Get the value of a selected feature,
- given its name, type, and the current selections.
-
- Document containing currently active features
- The name of the feature to look up
- The type of the feature to look up
-
-
-
-
-
-
-
-
-
- Catch *[@xml:id] with high priority to check for association
- links. If an association link is found, check the associated
- condition, evaluate it and determine how to continue.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Evaluate a conditional feature given the current settings, return 'YES', 'NO', 'MAYBE', 'ON', or 'OFF'
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- When run against the conditional being tested, returns
- the result of the conditional evaluation
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Special operators
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- kill text in evaluate-conditionals mode
-
-
-
-
- Match @xml:id elements with high priority,
- convert @xml:id to @jx:id
-
-
-
-
-
-
- The default operation for an attribute is identity
-
-
-
-
-
-
diff --git a/code/transforms/data-compiler/data-compiler.xsl2 b/code/transforms/data-compiler/data-compiler.xsl2
deleted file mode 100644
index 75a10a9d..00000000
--- a/code/transforms/data-compiler/data-compiler.xsl2
+++ /dev/null
@@ -1,199 +0,0 @@
-
-
-
-
-
-
-
-
-
-
- Main stylesheet for data compiler stage.
- Copyright 2010-2011 Efraim Feinstein
-
-
-
This program is free software: you can redistribute it
- and/or modify
- it under the terms of the GNU Lesser General Public License as
- published by
- the Free Software Foundation, either version 3 of the License, or
- (at your option) any later version.
-
-
This program is distributed in the hope that it will be
- useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU Lesser General Public License for more details.
-
-
- You should have received a copy of the GNU Lesser General Public
- License along with this program. If not, see
- http://www.gnu.org/licenses/
-
- .
-
-
- $Id: data-compiler.xsl2 687 2011-01-23 23:36:48Z efraim.feinstein $
-
-
-
-
-
- Start of processing, update links and apply, begin in data-compiler mode
-
-
-
-
-
-
- Elements that should be skipped
-
-
-
-
-
-
- Resolve all unresolved pointers.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Update the links at high priority, go back to data-compiler mode
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Default operation is identity. Mark an element with @jx:document-uri and/or @xml:base if it comes from a different context
- than $from-context, continue applying templates in data-compiler mode
- Non-empty if this text is coming from a different context
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Remove ignored elements
-
-
-
-
- List of document sources in current settings
-
-
-
-
- Return the current settings as updated for a new context
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Write a copy of the tei:link with base uri and type explicit
-
-
-
-
-
-
-
-
-
diff --git a/code/transforms/data-compiler/feature-declarations.xsl2 b/code/transforms/data-compiler/feature-declarations.xsl2
deleted file mode 100644
index 4441ae9d..00000000
--- a/code/transforms/data-compiler/feature-declarations.xsl2
+++ /dev/null
@@ -1,81 +0,0 @@
-
-
-
-
-
-
-
-
- Functions to use for feature declarations during a transform
-
- Copyright 2010 Efraim Feinstein
-
-
-
This program is free software: you can redistribute it and/or modify
- it under the terms of the GNU Lesser General Public License as published by
- the Free Software Foundation, either version 3 of the License, or
- (at your option) any later version.
-
-
This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU Lesser General Public License for more details.
-
-
You should have received a copy of the GNU Lesser General Public License
- along with this program. If not, see
- http://www.gnu.org/licenses/.
-
-
- $Id: feature-declarations.xsl2 687 2011-01-23 23:36:48Z efraim.feinstein $
-
-
- Search for all declarations
-
-
- Search for all named features
-
-
-
- Return the declaration of the given feature structure
- Feature structure type
- Context
-
-
-
-
-
-
-
-
-
- Return the declaration of a given feature
- This will run into trouble if the fsDecl uses @baseTypes
- Feature structure type
- Feature name
- Context
-
-
-
-
-
-
-
-
-
-
diff --git a/code/transforms/data-compiler/ptr.xsl2 b/code/transforms/data-compiler/ptr.xsl2
deleted file mode 100644
index 4806e3f8..00000000
--- a/code/transforms/data-compiler/ptr.xsl2
+++ /dev/null
@@ -1,42 +0,0 @@
-
-
-
- Catch tei:ptr in data-compiler mode.
- Copyright 2009,2011 Efraim Feinstein (LGPL 3+)
-
-
This program is free software: you can redistribute it and/or modify
- it under the terms of the GNU Lesser General Public License as published by
- the Free Software Foundation, either version 3 of the License, or
- (at your option) any later version.
-
-
This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU Lesser General Public License for more details.
-
-
You should have received a copy of the GNU Lesser General Public License
- along with this program. If not, see
- http://www.gnu.org/licenses/.
-
-
- $Id: ptr.xsl2 687 2011-01-23 23:36:48Z efraim.feinstein $
-
-
-
- Copy URL-type pointer
-
-
-
-
-
-
\ No newline at end of file
diff --git a/code/transforms/data-compiler/standoff.xsl2 b/code/transforms/data-compiler/standoff.xsl2
deleted file mode 100644
index 1c802855..00000000
--- a/code/transforms/data-compiler/standoff.xsl2
+++ /dev/null
@@ -1,299 +0,0 @@
-
-
-
-
-
-
-
-
- Provides templates for handling stand-off markup links of all types
- and storing the active links in a globally passed tunneled parameter
- $available-links. $available-links is stored with a document node at the root
- so it can be indexed by key. Its root element is jx:active-links.
- The xml:base is maintained so id references can be used from any context.
-
- Copyright 2007-2011 Efraim Feinstein
-
-
This file cannot be used standalone, because it and data-compiler.xsl2
- both need conditionals.xsl2 to work with priorities. It should be included
- in data-compiler.xsl2
-
-
This program is free software: you can redistribute it and/or modify
- it under the terms of the GNU Lesser General Public License as published by
- the Free Software Foundation, either version 3 of the License, or
- (at your option) any later version.
-
-
This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU Lesser General Public License for more details.
-
-
You should have received a copy of the GNU Lesser General Public License
- along with this program. If not, see
- http://www.gnu.org/licenses/.
-
This program is free software: you can redistribute it and/or modify
- it under the terms of the GNU Lesser General Public License as published by
- the Free Software Foundation, either version 3 of the License, or
- (at your option) any later version.
-
-
This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU Lesser General Public License for more details.
-
-
You should have received a copy of the GNU Lesser General Public License
- along with this program. If not, see http://www.gnu.org/licenses/.
This program is free software: you can redistribute it
- and/or modify
- it under the terms of the GNU Lesser General Public License as
- published by
- the Free Software Foundation, either version 3 of the License, or
- (at your option) any later version.
-
-
This program is distributed in the hope that it will be
- useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU Lesser General Public License for more details.
-
-
- You should have received a copy of the GNU Lesser General Public
- License along with this program. If not, see
- http://www.gnu.org/licenses/
-
- .
-
-
-
-
-
-
-
diff --git a/code/transforms/format/xhtml/bibliography-xhtml.xsl2 b/code/transforms/format/xhtml/bibliography-xhtml.xsl2
deleted file mode 100644
index 4aeee533..00000000
--- a/code/transforms/format/xhtml/bibliography-xhtml.xsl2
+++ /dev/null
@@ -1,391 +0,0 @@
-
-
-
-
-
-
- Render bibliography in XHTML
- This code is heavily based on the TEI XSLT code in
- common/core.xsl and xhtml/core.xsl
- Copyright 2010-2011 Efraim Feinstein (LGPL 3+),
- Copyright 2008 TEI Consortium
-
-
This program is free software: you can redistribute it and/or modify
- it under the terms of the GNU Lesser General Public License as published by
- the Free Software Foundation, either version 3 of the License, or
- (at your option) any later version.
-
-
This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU Lesser General Public License for more details.
-
-
You should have received a copy of the GNU Lesser General Public License
- along with this program. If not, see
- http://www.gnu.org/licenses/.
-
-
-
-
-
-
-
-
- Process elements tei:listBibl
-
-
-
-
-
-
-
-
-
-
-
-
-
- Default for bibliography mode is pass
-
-
-
-
-
-
- Send elements for regular processing
-
-
-
-
-
-
- Process elements tei:edition
-
-
-
-
-
-
-
- .
-
-
-
-
- Process elements tei:imprint
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Process author/editor names
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- .
-
-
-
- (
-
-
-
-
- )
-
-
-
-
-
-
-
- Accessed
-
-
-
-
-
-
-
- .
-
-
-
-
-
-
-
-
-
-
- ,
-
-
- :
-
-
- .
-
-
-
-
-
-
-
-
-
- .
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- chapter
-
-
-
-
-
-
- (
-
-
-
-
- )
-
-
-
-
- pp.
-
-
- pp.
-
-
- pp.
-
-
- p.
-
-
-
-
-
-
- Treat text as default mode, unless it shouldn't receive
- additional spaces
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/code/transforms/format/xhtml/credits-list.xsl2 b/code/transforms/format/xhtml/credits-list.xsl2
deleted file mode 100644
index 7abdfa18..00000000
--- a/code/transforms/format/xhtml/credits-list.xsl2
+++ /dev/null
@@ -1,66 +0,0 @@
-
-
-
-
-
- Render a credits list in XHTML.
- Copyright 2010-2011 Efraim Feinstein
-
-
-
This program is free software: you can redistribute it
- and/or modify
- it under the terms of the GNU Lesser General Public License as
- published by
- the Free Software Foundation, either version 3 of the License, or
- (at your option) any later version.
-
-
This program is distributed in the hope that it will be
- useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU Lesser General Public License for more details.
-
-
- You should have received a copy of the GNU Lesser General Public
- License along with this program. If not, see
- http://www.gnu.org/licenses/
-
- .
-
-
-
-
-
- Catch tei:item from a contributor list
-
-
-
This program is free software: you can redistribute it
- and/or modify
- it under the terms of the GNU Lesser General Public License as
- published by
- the Free Software Foundation, either version 3 of the License, or
- (at your option) any later version.
-
-
This program is distributed in the hope that it will be
- useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU Lesser General Public License for more details.
-
-
- You should have received a copy of the GNU Lesser General Public
- License along with this program. If not, see
- http://www.gnu.org/licenses/
-
- .
-
This program is free software: you can redistribute it
- and/or modify
- it under the terms of the GNU Lesser General Public License as
- published by
- the Free Software Foundation, either version 3 of the License, or
- (at your option) any later version.
-
-
This program is distributed in the hope that it will be
- useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU Lesser General Public License for more details.
-
-
- You should have received a copy of the GNU Lesser General Public
- License along with this program. If not, see
- http://www.gnu.org/licenses/
-
- .
-
-
-
-
-
- Browsers don't separate text nodes, so I have to
-
-
-
-
-
-
-
-
-
- Text not within a tei:w, add space unless the next text node begins with punctuation
-
-
-
-
-
-
-
-
-
- Add whitespace after and before certain punctuation
-
-
-
-
-
-
-
-
- Connecting punctuation does not get added space
-
-
-
-
-
-
- Verse and chapter labels don't have added text
-
-
-
-
-
-
- Move chapter/verse labels to the first seg in a verse ab
-
-
-
-
-
-
-
-
-
-
- Chapter and verse labels require special handling as a workaround for a Firefox bug.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/code/transforms/format/xhtml/ref.xsl2 b/code/transforms/format/xhtml/ref.xsl2
deleted file mode 100644
index 2a27e1a3..00000000
--- a/code/transforms/format/xhtml/ref.xsl2
+++ /dev/null
@@ -1,76 +0,0 @@
-
-
-
-
-
-
- tei:ref and tei:ptr to xhtml
- Copyright 2010-2011 Efraim Feinstein
-
-
-
This program is free software: you can redistribute it
- and/or modify
- it under the terms of the GNU Lesser General Public License as
- published by
- the Free Software Foundation, either version 3 of the License, or
- (at your option) any later version.
-
-
This program is distributed in the hope that it will be
- useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU Lesser General Public License for more details.
-
-
- You should have received a copy of the GNU Lesser General Public
- License along with this program. If not, see
- http://www.gnu.org/licenses/
-
- .
-
-
-
-
-
-
- References become hyperlinks
-
-
-
-
-
-
-
-
-
-
- URL and offline-resource pointers become hyperlinks
-
-
-
-
-
-
-
- Pointers that have not been expanded
-
-
This program is free software: you can redistribute it
- and/or modify
- it under the terms of the GNU Lesser General Public License as
- published by
- the Free Software Foundation, either version 3 of the License, or
- (at your option) any later version.
-
-
This program is distributed in the hope that it will be
- useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU Lesser General Public License for more details.
-
-
- You should have received a copy of the GNU Lesser General Public
- License along with this program. If not, see
- http://www.gnu.org/licenses/
-
- .
-
This program is free software: you can redistribute it and/or modify
- it under the terms of the GNU Lesser General Public License as published by
- the Free Software Foundation, either version 3 of the License, or
- (at your option) any later version.
-
-
This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU Lesser General Public License for more details.
-
-
You should have received a copy of the GNU Lesser General Public License
- along with this program. If not, see http://www.gnu.org/licenses/.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/code/transforms/format/xhtml/xhtml.xsl2 b/code/transforms/format/xhtml/xhtml.xsl2
deleted file mode 100644
index f171967d..00000000
--- a/code/transforms/format/xhtml/xhtml.xsl2
+++ /dev/null
@@ -1,56 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
- Main entry point for intermediate format from list-compiler to XHTML transform.
- Include other stylesheets that do the work.
- Copyright 2009-2011 Efraim Feinstein
-
-
-
This program is free software: you can redistribute it
- and/or modify
- it under the terms of the GNU Lesser General Public License as
- published by
- the Free Software Foundation, either version 3 of the License, or
- (at your option) any later version.
-
-
This program is distributed in the hope that it will be
- useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU Lesser General Public License for more details.
-
-
- You should have received a copy of the GNU Lesser General Public
- License along with this program. If not, see
- http://www.gnu.org/licenses/
-
- .
-
This program is free software: you can redistribute it and/or modify
- it under the terms of the GNU Lesser General Public License as published by
- the Free Software Foundation, either version 3 of the License, or
- (at your option) any later version.
-
-
This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU Lesser General Public License for more details.
-
-
You should have received a copy of the GNU Lesser General Public License
- along with this program. If not, see
- http://www.gnu.org/licenses/.
-
-
- $Id: bibliography.xsl2 687 2011-01-23 23:36:48Z efraim.feinstein $
-
-
-
-
-
- Generate a bibliography
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Helper function to make a bibliography list, given
- one of the jx:* elements that has pointers to bibliography URIs
-
-
-
-
-
-
-
-
-
-
-
-
-
- A bibliography containing a pointer should not be copied
-
-
-
-
-
-
- tei:bibl inside a bibliography probably contains a biblStruct that was a pointer.
- If it doesn't, I have no idea what to do with it.
-
-
-
-
-
-
diff --git a/code/transforms/list-compiler/credits.xsl2 b/code/transforms/list-compiler/credits.xsl2
deleted file mode 100644
index 36e52596..00000000
--- a/code/transforms/list-compiler/credits.xsl2
+++ /dev/null
@@ -1,102 +0,0 @@
-
-
-
-
-
-
-
-
- Given a completed document, and all its credit attributions
- (jx:credits), find all unique contributors and apply templates to them.
-
- Copyright 2010-2011 Efraim Feinstein (LGPL 3+)
-
-
This program is free software: you can redistribute it and/or modify
- it under the terms of the GNU Lesser General Public License as published by
- the Free Software Foundation, either version 3 of the License, or
- (at your option) any later version.
-
-
This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU Lesser General Public License for more details.
-
-
You should have received a copy of the GNU Lesser General Public License
- along with this program. If not, see
- http://www.gnu.org/licenses/.
-
-
-
-
-
-
- Generate a credits list, under tei:div[@type='credits-list']
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Credits mode does basic formatting for credits, for now, just identity template them
-
-
-
-
-
-
- Skip tei:item and contributor type div in credits entries
-
-
-
-
-
-
diff --git a/code/transforms/list-compiler/lc-common.xsl2 b/code/transforms/list-compiler/lc-common.xsl2
deleted file mode 100644
index 66d0d9c8..00000000
--- a/code/transforms/list-compiler/lc-common.xsl2
+++ /dev/null
@@ -1,65 +0,0 @@
-
-
-
- Definitions of entities common to list compiler operations (keys, eg)
- Copyright 2011 Efraim Feinstein
-
-
-
This program is free software: you can redistribute it
- and/or modify
- it under the terms of the GNU Lesser General Public License as
- published by
- the Free Software Foundation, either version 3 of the License, or
- (at your option) any later version.
-
-
This program is distributed in the hope that it will be
- useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU Lesser General Public License for more details.
-
-
- You should have received a copy of the GNU Lesser General Public
- License along with this program. If not, see
- http://www.gnu.org/licenses/
-
- .
-
-
- $Id: lc-common.xsl2 687 2011-01-23 23:36:48Z efraim.feinstein $
-
-
- Points to the table of strings used for messages.
-
-
- Primary language of the document
-
-
- $string-table loaded as a document
-
-
-
- Index all relationships by type
-
-
-
-
- Given a tei:name, find its alphabetic sort key
- The name, a tei:name/(tei:forename, surname, etc.) or tei:orgname
- (otherwise, the string value of the element is used)
-
-
-
-
-
-
-
-
diff --git a/code/transforms/list-compiler/licensing.xsl2 b/code/transforms/list-compiler/licensing.xsl2
deleted file mode 100644
index 438c5cef..00000000
--- a/code/transforms/list-compiler/licensing.xsl2
+++ /dev/null
@@ -1,123 +0,0 @@
-
-
-
-
-
-
- Given a completed document, and all its sources
- (//jx:relationship), find all unique licensing statements
- and apply templates to them.
- Copyright 2010-2011 Efraim Feinstein (LGPL 3+)
-
-
This program is free software: you can redistribute it and/or modify
- it under the terms of the GNU Lesser General Public License as published by
- the Free Software Foundation, either version 3 of the License, or
- (at your option) any later version.
-
-
This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU Lesser General Public License for more details.
-
-
You should have received a copy of the GNU Lesser General Public License
- along with this program. If not, see
- http://www.gnu.org/licenses/.
-
-
- $Id: licensing.xsl2 706 2011-02-21 01:18:10Z efraim.feinstein $
-
-
-
-
-
-
- Language code for primary document language
-
-
-
- Generate a license list. The context can be anywhere in the document
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Convert availability to tei:ab
-
-
-
-
-
-
-
-
diff --git a/code/transforms/list-compiler/list-compiler.xsl2 b/code/transforms/list-compiler/list-compiler.xsl2
deleted file mode 100644
index 723dd6a4..00000000
--- a/code/transforms/list-compiler/list-compiler.xsl2
+++ /dev/null
@@ -1,99 +0,0 @@
-
-
-
-
-
-
-
- Include other stylesheets that do the work for the list compiler,
- which does all processing that requires knowledge of the whole
- document.
- Copyright 2009-2011 Efraim Feinstein
-
-
-
This program is free software: you can redistribute it
- and/or modify
- it under the terms of the GNU Lesser General Public License as
- published by
- the Free Software Foundation, either version 3 of the License, or
- (at your option) any later version.
-
-
This program is distributed in the hope that it will be
- useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU Lesser General Public License for more details.
-
-
- You should have received a copy of the GNU Lesser General Public
- License along with this program. If not, see
- http://www.gnu.org/licenses/
-
- .
-
-
- $Id: list-compiler.xsl2 687 2011-01-23 23:36:48Z efraim.feinstein $
-
-
-
-
- This is primarily an identity transform that runs generators
- for lists as back matter.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Helper template to make the back matter. If a tei:back element exists,
- it should be the context. Otherwise, it will make a new back matter section.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Identity template for everything else
-
-
-
-
-
-
-
-
diff --git a/code/transforms/list-compiler/strings.xml b/code/transforms/list-compiler/strings.xml
deleted file mode 100644
index 0b12c696..00000000
--- a/code/transforms/list-compiler/strings.xml
+++ /dev/null
@@ -1,73 +0,0 @@
-
-
-
-
- License
-
-
- The material contained in this document is
- released under the following licenses:
-
-
- Some material that is included in this document requires the
- following additional statements:
-
-
- Some material requires the following additional attributions:
-
-
-
- Sources
-
-
- References
-
-
-
- Contributors
-
-
- We would like to acknowledge the following people and organizations for
- contributing material:
-
-
- Encoders
-
-
- Transcribers
-
-
- Scanners
-
-
- Authors
-
-
- Editors
-
-
-
- and
-
-
diff --git a/code/transforms/list-compiler/tests/__override__.xml b/code/transforms/list-compiler/tests/__override__.xml
deleted file mode 100644
index b086b1b5..00000000
--- a/code/transforms/list-compiler/tests/__override__.xml
+++ /dev/null
@@ -1,3 +0,0 @@
-
-
-
diff --git a/code/transforms/list-compiler/tests/bibliography-context.xml b/code/transforms/list-compiler/tests/bibliography-context.xml
deleted file mode 100644
index 6bcfe1dc..00000000
--- a/code/transforms/list-compiler/tests/bibliography-context.xml
+++ /dev/null
@@ -1,123 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
- Echad
- One
-
-
- First book
-
-
-
-
-
-
-
-
-
-
- Echad
- One
-
-
- First book
-
-
-
-
-
-
-
-
-
- Echad
- One
-
-
- Second book by same author
-
-
-
-
-
- segment 1.
-
-
-
-
-
-
-
-
-
-
- Shtayim
- Two
-
-
- Book by a different author
-
-
-
-
-
-
-
- Anonymous work
-
-
-
-
-
- segment 2.
-
-
-
-
-
- segment 3.
-
-
-
-
- segment 4.
-
-
-
-
-
-
-
-
-
- Shalosh
- Three
-
-
- Reference work
-
-
-
-
-
- segment 5.
-
-
-
-
-
-
-
-
diff --git a/code/transforms/list-compiler/tests/credits-context.xml b/code/transforms/list-compiler/tests/credits-context.xml
deleted file mode 100644
index f0107e80..00000000
--- a/code/transforms/list-compiler/tests/credits-context.xml
+++ /dev/null
@@ -1,67 +0,0 @@
-
-
-
-
-
-
- Encoders, Inc.
-
-
-
- TranscriberOne
-
-
-
- TranscriberFour
-
-
-
- segment 1.
-
-
-
-
-
-
- TranscriberTwo
-
-
-
- ThirdvonTranscriber
-
-
-
- segment 2.
-
-
-
-
-
- segment 3.
-
-
-
-
- segment 4.
-
-
-
-
-
- TranscriberOne
-
-
-
- segment 5.
-
-
-
-
-
-
-
-
diff --git a/code/transforms/list-compiler/tests/licensing-cc-by-attribution.xml b/code/transforms/list-compiler/tests/licensing-cc-by-attribution.xml
deleted file mode 100644
index fe72d12f..00000000
--- a/code/transforms/list-compiler/tests/licensing-cc-by-attribution.xml
+++ /dev/null
@@ -1,48 +0,0 @@
-
-
-
-
-
- Copyright 2011 by the Contributors to the Open Siddur Project.
- This file is available under the
- Creative Commons Attribution 3.0 Unported license.
- A list of contributors is available at
-
-
-
-
-
-
-
-
-
-
-
- Based on work originally found at http://example.com.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- segment 4
-
-
diff --git a/code/transforms/list-compiler/tests/licensing-cc-by-sa.xml b/code/transforms/list-compiler/tests/licensing-cc-by-sa.xml
deleted file mode 100644
index c7d9854e..00000000
--- a/code/transforms/list-compiler/tests/licensing-cc-by-sa.xml
+++ /dev/null
@@ -1,47 +0,0 @@
-
-
-
-
-
- Copyright 2010 by the Contributors to the Open Siddur Project.
- This file is available under the
- Creative Commons Attribution-ShareAlike 3.0 Unported
- license.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- segment 3
-
-
diff --git a/code/transforms/list-compiler/tests/licensing-cc-by.xml b/code/transforms/list-compiler/tests/licensing-cc-by.xml
deleted file mode 100644
index 12e44ee3..00000000
--- a/code/transforms/list-compiler/tests/licensing-cc-by.xml
+++ /dev/null
@@ -1,47 +0,0 @@
-
-
-
-
-
- Copyright 2011 by the Contributors to the Open Siddur Project.
- This file is available under the
- Creative Commons Attribution 3.0 Unported license.
- A list of contributors is available at
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- segment 2
-
-
diff --git a/code/transforms/list-compiler/tests/licensing-cc0.xml b/code/transforms/list-compiler/tests/licensing-cc0.xml
deleted file mode 100644
index ac09f630..00000000
--- a/code/transforms/list-compiler/tests/licensing-cc0.xml
+++ /dev/null
@@ -1,44 +0,0 @@
-
-
-
-
-
- To the extent possible under law,
- the contributors who associated
- Creative Commons Zero
- with this work have waived all copyright and related or neighboring rights to this work.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- segment 1
-
-
diff --git a/code/transforms/list-compiler/tests/licensing-context.xml b/code/transforms/list-compiler/tests/licensing-context.xml
deleted file mode 100644
index fd176316..00000000
--- a/code/transforms/list-compiler/tests/licensing-context.xml
+++ /dev/null
@@ -1,32 +0,0 @@
-
-
-
-
-
-
- segment 1.
-
-
-
-
- segment 2.
-
-
-
-
- segment 3.
-
-
-
-
- segment 4.
-
-
-
-
-
-
diff --git a/code/transforms/list-compiler/tests/list-compiler.xspec b/code/transforms/list-compiler/tests/list-compiler.xspec
deleted file mode 100644
index 24352e7c..00000000
--- a/code/transforms/list-compiler/tests/list-compiler.xspec
+++ /dev/null
@@ -1,71 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/code/transforms/reverse-to-db/reverse.xqm b/code/transforms/reverse-to-db/reverse.xqm
deleted file mode 100644
index 1a90dc30..00000000
--- a/code/transforms/reverse-to-db/reverse.xqm
+++ /dev/null
@@ -1,651 +0,0 @@
-xquery version "1.0";
-(:~
- : Roundtrip fragmentation markup TEI to JLPTEI and save it to the
- : database
- :
- : Debugging code: reverse
- :
- : Open Siddur Project
- : Copyright 2011-2012 Efraim Feinstein
- : Licensed under the GNU Lesser General Public License, version 3 or later
- :)
-module namespace reverse = 'http://jewishliturgy.org/modules/reverse';
-
-import module namespace debug="http://jewishliturgy.org/transform/debug"
- at "xmldb:exist:///code/modules/debug.xqm";
-import module namespace nav="http://jewishliturgy.org/modules/nav"
- at "xmldb:exist:///code/api/modules/nav.xqm";
-
-declare namespace tei="http://www.tei-c.org/ns/1.0";
-declare namespace j="http://jewishliturgy.org/ns/jlptei/1.0";
-declare namespace jx="http://jewishliturgy.org/ns/jlp-processor";
-
-(: map j:view/@type to the elements it's intended to hold :)
-declare variable $reverse:view-type-map :=
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- ;
-
-declare function reverse:generate-id(
- $node as node()
- ) as xs:string {
- reverse:generate-id(
- $node,
- $node/descendant::node())
-};
-
-(: generate a unique id for a given node
- :)
-declare function reverse:generate-id(
- $node as node(),
- $context-descendants as node()*
- ) as xs:string {
- concat(
- local-name($node),
- "_",
- util:hash(
- util:serialize(
- if (exists($context-descendants))
- then
- element { QName(namespace-uri($node), name($node)) }{
- $node/@*,
- $context-descendants
- }
- else $node, ()
- ), "sha1")
- )
-};
-
-declare function local:recurse-find-views(
- $snippets as element()*,
- $from-document as xs:string,
- $parent-names as xs:QName*
- ) as xs:string* {
- for $snippet in $snippets[not(@jx:document-uri != $from-document)]
- let $snippet-qname := QName(namespace-uri($snippet), local-name($snippet))
- let $my-view-type :=
- $reverse:view-type-map/view-type/descendant-or-self::*
- [local-name(.)=local-name($snippet)]
- [namespace-uri(.)=namespace-uri($snippet)]
- [not(@type) or (@type=$snippet/@type)]
- [
- let $p := parent::* except parent::view-type
- return
- if ($p)
- then $parent-names=$snippet-qname
- else true()
- ]/../@type/string()
- return
- ($my-view-type,
- local:recurse-find-views($snippet/*, $from-document, ($parent-names, $snippet-qname))
- )
-};
-
-(:~ return back which view types exist in the given snippet :)
-declare function reverse:find-views(
- $snippet as element()
- ) as xs:string* {
- distinct-values(local:recurse-find-views($snippet, $snippet/@jx:document-uri, ()))
-};
-
-(: find a starting point for view processing :)
-declare function reverse:reverse-views(
- $intermed-snippet as element()+,
- $doc as document-node()
- ) as element(reverse:view)* {
- for $snippet in $intermed-snippet
- let $view-types := reverse:find-views($snippet)
-(:
- let $null :=
- util:log-system-out(
- ("**** view-types for snippet ", $snippet, " are: ", string-join($view-types, ","))
- )
-:)
- for $view-type in $view-types
- return
- element reverse:view {
- attribute document {$snippet/@jx:document-uri},
- attribute type { $view-type },
- let $result := reverse:rebuild-view($snippet, $doc, $view-type, ())
- return (
-(:
- util:log-system-out(("rebuild-view:", $result )),
-:)
- $result
- )
- }
-};
-
-(:~ main entry point for reversal operations.
- : @param @intermed the fragmentation TEI
- : @param $start-resource the resource which the TEI is POSTed to
- :)
-declare function reverse:reverse(
- $intermed as element(),
- $start-resource as xs:string
- ) as element(reverse:rebuild) {
- element reverse:rebuild {
- reverse:rebuild-repository($intermed),
- (: find and process all snippets (views and selections) :)
- let $snippets := $intermed/descendant-or-self::*[@jx:document-uri]
- for $snippet at $n in $snippets
- let $doc := nav:api-path-to-sequence($snippet/@jx:document-uri)
- return (
- element reverse:selection {
- attribute document { $snippet/@jx:document-uri },
- reverse:rebuild-selection($snippet, $doc//j:selection)
- },
- reverse:reverse-views($snippet, $doc)
- )
- }
-
-};
-
-declare function local:is-in-other-view(
- $snippet-equivalent as element(),
- $ancestor-view as element()
- ) as xs:boolean {
- let $other-views := $ancestor-view/parent::*/(j:view except $ancestor-view)
- let $my-ancestor-view := $snippet-equivalent/ancestor::j:view
- return not($my-ancestor-view) or $my-ancestor-view is $other-views
-};
-
-declare function local:is-correct-type(
- $snippet as element(),
- $view-type as xs:string,
- $parent-names as xs:QName*
- ) as xs:boolean {
- let $ln := local-name($snippet)
- let $ns := namespace-uri($snippet)
- let $type := $snippet/@type
- return
- exists(
- $reverse:view-type-map/view-type
- [@type=$view-type]/descendant-or-self::*
- [$ln = local-name(.)]
- [$ns = namespace-uri(.)]
- [
- not(@type) or @type=$type
- ]
- [
- if ($type)
- then @type = $type
- else true()
- ]
- [
- let $p := parent::* except parent::view-type
- return
- if ($p)
- then $parent-names=QName(namespace-uri($p), local-name($p))
- else true()
- ]
- )
-};
-
-declare function local:split-words(
- $string as xs:string
- ) as element()* {
- local:split-words($string, ())
-};
-
-
-(:~ split a string into multiple words (tei:w/tei:pc)
- :
- : This code is derived from split-word.xsl2
- :)
-declare function local:split-words(
- $string as xs:string,
- $first-xmlid as xs:string?
- ) as element()* {
- (: need to split into characters & control characters, punctuation, spaces :)
- let $text-groups := text:groups($string, "(\s*(([\p{L}\p{M}\p{N}\p{S}\p{C}]+)|(\p{P}))\s*)")
- let $remainder := substring-after($string, $text-groups[2])
- let $word-chars := $text-groups[4]
- let $punct-chars := $text-groups[5]
- return (
- if ($word-chars)
- then
- element tei:w {
- attribute xml:id {
- ($first-xmlid, concat("w-", util:random(1000000)))[1]
- },
- reverse:normalize-nonunicode($word-chars)
- }
- else if ($punct-chars)
- then
- element tei:pc {
- attribute xml:id {
- concat("pc-", util:random(1000000))
- },
- $punct-chars
- }
- else (),
- if ($remainder)
- then local:split-words($remainder, ())
- else ()
- )
-};
-
-(: possibilities for transforming nodes in tei:w:
- : 1. text() -> split into w/pc
- : 2. text()[spc]element()[spc]text() -> split text()s into w/pc, pass through element()
- : 3. text()element()[spc]text() -> split text(), last incorporated into text() element()
- :)
-declare function local:transform-w-child(
- $nodes as node()*
- ) as node()* {
- let $this-xmlid := ($nodes[1]/../(@xml:id, @jx:id)[1])[empty($nodes[1]/preceding-sibling::node())]
- return
- typeswitch($nodes[1])
- case empty() return ()
- case element() return (
- let $this := local:reverse-transform($nodes[1])
- let $next := local:transform-w-child(subsequence($nodes, 2))
- return
- if (
- $next and
- ($nodes[2] instance of element() or
- not(matches($nodes[2], "^\s")))
- )
- then (
- element tei:w {
- (
- $this-xmlid,
- $next[1]/@*,
- attribute xml:id {concat("w-", util:random(1000000))}
- )[1],
- $this,
- $next[1]/node()
- },
- subsequence($next, 2)
- )
- else (
- element tei:w {
- ($this-xmlid, attribute xml:id {concat("w-", util:random(1000000))})[1],
- $this
- },
- $next
- )
- )
- case $n1 as text() return
- if ($n1/following-sibling::element() and not(matches($n1, "\s$")))
- then
- let $this := local:split-words($n1, $this-xmlid)
- let $next := local:transform-w-child(subsequence($nodes,2))
- return (
- subsequence($this, 1, count($this) - 1),
- element tei:w {
- $this[last()]/(@*|node()),
- $next[1]/node()
- },
- subsequence($next,2)
- )
- else (
- local:split-words($n1, $this-xmlid),
- local:transform-w-child(subsequence($nodes, 2))
- )
- default return
- ($nodes[1], local:transform-w-child(subsequence($nodes, 2)))
-};
-
-declare function local:transform-w(
- $w as element(tei:w)
- ) as element(tei:w)+ {
- local:transform-w-child($w/node()[1])
-};
-
-(:~ transform that copies everything,
- : performs nonunicode normalization,
- : corrects tei:w/tei:pc to contain one word/punct character
- : removes @jx:* attributes,
- : assigns xml:ids
- :)
-declare function local:reverse-transform(
- $nodes as node()*
- ) as node()* {
- for $n in $nodes
- return
- typeswitch ($n)
- case element(tei:w) return
- local:transform-w($n)
- case text() return
- if ($n/(ancestor::tei:w|ancestor::tei:c|ancestor::tei:g|ancestor::tei:pc))
- then $n
- else local:split-words($n)
- case element() return
- element { QName(namespace-uri($n), name($n)) }{
- $n/(@* except @jx:*),
- if ($n/@jx:id)
- then
- attribute xml:id {
- $n/@jx:id
- }
- else (),
- local:reverse-transform($n/node())
- }
- default return $n
-};
-
-(:~ build text repository entries :)
-declare function reverse:rebuild-repository(
- $full as element()
- ) as element(reverse:repository)* {
- for $segment in $full//tei:seg
- group
- $segment as $seg
- by $segment/ancestor::*[@jx:document-uri][1]/@jx:document-uri/string() as $document-source
- return
- element reverse:repository {
- attribute document { $document-source },
- for $document-segment in $seg
- group
- $document-segment as $doc-seg
- by $document-segment/@jx:id as $id
- return
- local:reverse-transform($doc-seg)
- }
-};
-
-declare function reverse:rebuild-selection(
- $snippet as element(),
- $selection as element(j:selection)
- ) {
- let $doc-uri := $snippet/ancestor-or-self::*[@jx:document-uri][1]/@jx:document-uri/string()
- let $doc := nav:api-path-to-sequence($doc-uri)
- return
- if ($snippet instance of element(tei:ptr) and not($snippet/@type="url"))
- then
- let $snippet-equivalent := $doc/id($snippet/@jx:id)
- return
- if ($snippet-equivalent/ancestor::j:selection is $selection)
- then
- element tei:ptr {
- attribute xml:id { $snippet/@jx:id },
- $snippet/(@* except @jx:*)
- }
- else ()
- else (
- for $element in $snippet/element()
- return
- reverse:rebuild-selection($element, $selection)
- )
-};
-
-declare function reverse:identify-ancestor-view(
- $snippet as element()
- ) as element(j:view)? {
- let $doc-uri := $snippet/ancestor-or-self::*[@jx:document-uri][1]/@jx:document-uri/string()
- let $doc := nav:api-path-to-sequence($doc-uri)
- let $snippet-equivalent := $doc/id($snippet/@jx:id)
- where exists($snippet-equivalent)
- return $snippet-equivalent/ancestor::j:view
-};
-
-declare function local:recurse-rebuild-view(
- $snippet as element(),
- $doc as document-node(),
- $view-type as xs:string,
- $parent-names as xs:QName*
- ) as node()* {
- for $node in $snippet/node()
- return
- typeswitch($node)
- case text() return
- text { reverse:normalize-nonunicode($node) }
- case element() return
- reverse:rebuild-view($node, $doc, $view-type, $parent-names)
- default return $node
-};
-
-(:~ recursively rebuild a view from a parent. If no parent is given,
- : find it
- :)
-declare function reverse:rebuild-view(
- $snippet as element(),
- $doc as document-node(),
- $view-type as xs:string,
- $parent-names as xs:QName*
- ) {
- let $equivalent := $doc/id($snippet/@jx:id)
- let $snippet-from-view :=
- $equivalent/(ancestor::j:view|ancestor::j:repository|ancestor::j:selection)
- return
- if (local:is-correct-type($snippet, $view-type, $parent-names))
- then
- (: element is from the view that is currently being processed.
- : or it is the correct type for it
- : copy it.
- :)
- let $my-qname := QName(namespace-uri($snippet), name($snippet))
- let $my-local-qname := QName(namespace-uri($snippet), local-name($snippet))
- return
- element { $my-qname }{
- $snippet/(@* except (@jx:id, @jx:document-uri)),
- if ($snippet/@jx:id)
- then
- attribute xml:id { $snippet/@jx:id }
- else (),
- local:recurse-rebuild-view($snippet,$doc,$view-type, ($parent-names, $my-local-qname))
- }
- else if ($snippet instance of element(tei:ptr))
- then
- element tei:ptr {
- attribute target {
- concat("#",
- if ($snippet-from-view instance of element(j:selection))
- then
- (: from the selection. generate a new pointer that points
- : into the selection
- :)
- $snippet/@jx:id
- else
- (: not from the selection: new pointer in the selection :)
- reverse:generate-id($snippet)
- )
- }
- }
- else
- (: not in the current ancestor view, not a pointer.
- : skip it
- :)
- if ($snippet/descendant::tei:ptr)
- then local:recurse-rebuild-view($snippet,$doc,$view-type, $parent-names)
- else ()
-};
-
-(:~ merge all repositories in the rebuild set :)
-declare function reverse:merge-repositories(
- $reverse-data as element(reverse:rebuild)
- ) {
- for $repository in $reverse-data/reverse:repository
- return reverse:merge-repository($repository)
-};
-
-(:~ merge a single repository :)
-declare function reverse:merge-repository(
- $additions as element(reverse:repository)
- ) {
- let $doc := nav:api-path-to-sequence($additions/@document)
- let $repository := $doc//j:repository
- for $segment in $additions/tei:seg
- let $replaces := $doc/id($segment/@xml:id)
- return
- if (exists($replaces))
- then
- (: possible optimization: is $segment different than $replaces? :)
- update replace $replaces with $segment
- else
- update insert $segment into $repository
-};
-
-declare function reverse:merge-selection(
- $additions as element(reverse:selection)
- ) {
- let $doc := nav:api-path-to-sequence($additions/@document)
- let $selection := $doc//j:selection
- let $selection-ptrs := $selection/tei:ptr
- let $first-common-ptr := $selection-ptrs[@xml:id=$additions/tei:ptr/@xml:id][1]
- let $additions-first-common := $additions/tei:ptr[@xml:id=$first-common-ptr/@xml:id]
- let $last-common-ptr := $selection-ptrs[@xml:id=$additions/tei:ptr/@xml:id][last()]
- let $additions-last-common := $additions/tei:ptr[@xml:id=$last-common-ptr/@xml:id]
- let $new-selection := (
- $first-common-ptr/preceding-sibling::*,
- $additions-first-common/preceding-sibling::*,
- $first-common-ptr,
- $additions-first-common/following-sibling::*[. << $additions-last-common],
- $last-common-ptr[not(. is $first-common-ptr)],
- $additions-last-common/following-sibling::*,
- $last-common-ptr/following-sibling::*
- )
- return
- update replace $selection with
- element j:selection {
- $selection/@*,
- $new-selection
- }
-};
-
-declare function reverse:merge-view(
- $additions as element(reverse:view)
- ) {
- let $doc := nav:api-path-to-sequence($additions/@document)
- let $equivalent-view := $doc//j:view[@type=$additions/@type]
- let $first-common-element := $equivalent-view/*[@xml:id=$additions/*/@xml:id][1]
- let $last-common-element := $equivalent-view/*[@xml:id=$additions/*/@xml:id][last()]
- let $additions-first-common := $additions/*[@xml:id=$first-common-element/@xml:id]
- let $additions-last-common := $additions/*[@xml:id=$last-common-element/@xml:id]
- let $new-view :=
- element j:view {
- if ($equivalent-view)
- then $equivalent-view/@*
- else $additions/(@* except @document),
- $first-common-element/preceding-sibling::*,
- $additions-first-common/preceding-sibling::*,
- $additions-first-common, (: the new version should be used :)
- $additions-first-common/following-sibling::*[. << $additions-last-common],
- $additions-last-common[not(. is $additions-first-common)],
- $additions-last-common/following-sibling::*,
- $last-common-element/following-sibling::*
- }
-(:
- let $null := util:log-system-out((
- "****Merging view: ",
- "equivalent=", $equivalent-view,
- " ^^^^ additions=", $additions,
- " $$$$ new-view =", $new-view,
- " first-common-element =", $first-common-element,
- " additions-first-common = ", $additions-first-common,
- " last-common-element =", $last-common-element,
- " additions-last-common =", $additions-last-common,
- " middle elements = ", $additions-first-common/following-sibling::*[. << $additions-last-common]
- ))
-:)
- return
- if (exists($equivalent-view))
- then update replace $equivalent-view with $new-view
- else update insert $new-view into $doc//j:concurrent
-};
-
-declare function reverse:merge-selections(
- $reverse-data as element(reverse:rebuild)
- ) {
- for $selection in $reverse-data/reverse:selection
- return reverse:merge-selection($selection)
-};
-
-declare function reverse:merge-views(
- $reverse-data as element(reverse:rebuild)
- ) {
- (:
- let $null := util:log-system-out(("***merge-views from", $reverse-data))
- :)
- for $view in $reverse-data/reverse:view
- return reverse:merge-view($view)
-};
-
-declare function reverse:merge(
- $reverse-data as element(reverse:rebuild)
- ) {
- (#exist:batch-transaction#) {
- debug:debug($debug:info, "reverse", "merge-repositories..."),
- reverse:merge-repositories($reverse-data),
- debug:debug($debug:info, "reverse", "merge-selections..."),
- reverse:merge-selections($reverse-data),
- debug:debug($debug:info, "reverse", "merge-views..."),
- reverse:merge-views($reverse-data),
- debug:debug($debug:info, "reverse", "done")
- }
-};
-
-declare variable $reverse:nonunicode-data :=
- doc("/code/modules/code-tables/non-unicode-combining-classes.xml")/*;
-
-(:~ Normalize a string based on non-Unicode combining classes, used by
- : some reverse formatters
- : @param original-string The string to convert
- :)
-declare function reverse:normalize-nonunicode(
- $original-string as xs:string
- ) as xs:string {
- let $tokenized-string-xml :=
- element string {
- for $cp at $n in string-to-codepoints($original-string)
- let $comb-class as xs:integer :=
- xs:integer(($reverse:nonunicode-data/*[@from=$cp], 0)[1])
- return element ch { attribute cp { $cp }, attribute cc { $comb-class }, attribute n { $n } }
- }
- return
- string-join(
- let $last-char := count($tokenized-string-xml/*) + 1
- for $ch0 in $tokenized-string-xml/ch[@cc = 0]
- let $next-ch0 := xs:integer(($ch0/following-sibling::*[@cc = 0][1]/@n, $last-char)[1])
- return
- for $ch in ($ch0, $ch0/following-sibling::*[@n < $next-ch0])
- order by $ch/@cc/number()
- return
- codepoints-to-string($ch/@cp),
- ""
- )
-};
-
-
\ No newline at end of file
diff --git a/code/transforms/style.css b/code/transforms/style.css
deleted file mode 100644
index 6932c080..00000000
--- a/code/transforms/style.css
+++ /dev/null
@@ -1,55 +0,0 @@
-/* style.css
- * CSS for the Open Siddur Project muXHTML
- * $Id: style.css 299 2009-11-12 18:20:16Z efraim.feinstein $
- */
-
-
-:lang(he) {
- direction:rtl;
- font-family:Ezra SIL, Ezra SIL SR, SBL Hebrew;
-}
-
-.divineName {
- display:inline;
-}
-
-.head {
- font-size:200%;
- font-weight:bold;
- display:block;
-}
-
-.l {
- display:block;
- padding-top:0.25ex;
- padding-bottom:0.25ex;
-}
-
-.lg {
- display:block;
- padding-top:0.5ex;
- padding-bottom:0.5ex;
-}
-
-.read {
- display:inline;
-}
-
-.p {
- display:block;
- padding-top:0.25ex;
- padding-bottom:0.25ex;
-}
-
-.written {
- color:red;
- display:inline;
-}
-
-.s {
- display:inline;
-}
-
-.seg {
- display:inline;
-}
diff --git a/code/transforms/tests/cache-test.xml b/code/transforms/tests/cache-test.xml
deleted file mode 100644
index 563ff3fb..00000000
--- a/code/transforms/tests/cache-test.xml
+++ /dev/null
@@ -1,4 +0,0 @@
-
- Uncached with jx:id
- Uncached with xml:id
-
diff --git a/code/transforms/tests/cache/cache-test.xml b/code/transforms/tests/cache/cache-test.xml
deleted file mode 100644
index 0aedee5f..00000000
--- a/code/transforms/tests/cache/cache-test.xml
+++ /dev/null
@@ -1,4 +0,0 @@
-
- Cached with jx:id
- Cached with xml:id
-
diff --git a/code/transforms/tests/follow-uri-cached-context.xml b/code/transforms/tests/follow-uri-cached-context.xml
deleted file mode 100644
index 695fca11..00000000
--- a/code/transforms/tests/follow-uri-cached-context.xml
+++ /dev/null
@@ -1,19 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/code/transforms/tests/follow-uri-context-1.xml b/code/transforms/tests/follow-uri-context-1.xml
deleted file mode 100644
index 26cb2dbb..00000000
--- a/code/transforms/tests/follow-uri-context-1.xml
+++ /dev/null
@@ -1,30 +0,0 @@
-
-
-
-
-
-
- Final destination
- Second destination
-
-
-
-
-
-
-
-
-
-
- 1
- 2
- 3
- You should not be here
-
-
-
-
-
-
-
diff --git a/code/transforms/tests/follow-uri-context-2.xml b/code/transforms/tests/follow-uri-context-2.xml
deleted file mode 100644
index 995b198b..00000000
--- a/code/transforms/tests/follow-uri-context-2.xml
+++ /dev/null
@@ -1,14 +0,0 @@
-
-
-
-
-
-
- Final destination in file 2
-
-
-
-
-
-
-
diff --git a/code/transforms/tests/follow-uri.xspec b/code/transforms/tests/follow-uri.xspec
deleted file mode 100644
index 6f1f71c5..00000000
--- a/code/transforms/tests/follow-uri.xspec
+++ /dev/null
@@ -1,163 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 1
- 2
- 3
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/code/transforms/translit/translit-main.xsl2 b/code/transforms/translit/translit-main.xsl2
deleted file mode 100644
index fad5dac0..00000000
--- a/code/transforms/translit/translit-main.xsl2
+++ /dev/null
@@ -1,283 +0,0 @@
-
-
-
-
-
-
-
- Main entry point to the transliterator as a stage in the
- transform pipeline.
-
-
- Requires two settings: (1) Transliteration table (default is none)
- (2) alignment (default is j:parallelGrp/j:original|j:parallel if it exists and tei:seg
- if it does not)
-
- Copyright 2011-2012 Efraim Feinstein
-
-
This program is free software: you can redistribute it and/or
- modify
- it under the terms of the GNU Lesser General Public License as
- published by
- the Free Software Foundation, either version 3 of the License, or
- (at your option) any later version.
-
-
-
This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU Lesser General Public License for more details.
-
-
-
- You should have received a copy of the GNU Lesser General Public
- License
- along with this program. If not, see
- http://www.gnu.org/licenses/
- .
-
-
-
-
-
-
-
- This is a required parameter containing a list of in-database paths
- accessible transliteration tables as a space-separated string.
- This is required because collection('group') is not accessible
- from XSLT. When we use eXist's native XSLT, this will be unnecessary.
-
-
-
-
- Login user
-
-
-
-
- Login password
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Elements that if an element is a descendant of them and not inside
- a parallelGrp, will not cause the transliterator to form
- a new parallelGrp
-
-
-
-
- Return a transliteration schema by its short name
-
-
-
-
-
-
-
-
-
-
- Given a transliteration schema and language, return the right table
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- If a transliteration is called for and we are not in a
- parallelGrp
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Replace transliteration-calls by @xml:lang with
- the transliteration, if one is set
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/code/transforms/translit/translit.xsl2 b/code/transforms/translit/translit.xsl2
deleted file mode 100644
index f0a0667d..00000000
--- a/code/transforms/translit/translit.xsl2
+++ /dev/null
@@ -1,793 +0,0 @@
-
-
-%hebrewent;
-]>
-
-
-
-
-
- Automated transliterator for Hebrew to Roman (or any other alphabet)
- text.
-
-
-
Implementation details:
- After substituting the Tetragrammaton for the appropriate pronunciation, a word is
- split into independent characters, which are represented in XML as <tr:cc/> elements,
- which are contained in tr:w elements. Each tr:w element should contain a grammatical word.
- cc stands for "complex character."
- This transliterator is a 6 pass processor:
-
-
The "zeroth" pass assembles the shin and shin/sin dots and marks first,
- last letters of orthographic words and punctuation, and assembles the hiriq male-dagesh
-
The first pass assembles multicharacter vowels, such as shuruq, holam male, qamats-he
-
The second pass removes vowel letters that are ignored in transliteration
-
The third pass marks degeshim as hazak or kal; virtually doubles dagesh hazak
-
The fourth pass marks sheva as sheva na or sheva nach, using characters in the private use area
-
The fifth pass transliterates using a given table
-
-
-
Partial words that are broken up between elements must be enclosed
- in tei:w elements, with a chain of @next attributes
- pointing from the first part to the last.
- (Partial words are not supported in standalone mode)
-
- Copyright 2008-2010 Efraim Feinstein
-
-
-
This program is free software: you can redistribute it and/or modify
- it under the terms of the GNU Lesser General Public License as published by
- the Free Software Foundation, either version 3 of the License, or
- (at your option) any later version.
-
-
This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU Lesser General Public License for more details.
-
-
You should have received a copy of the GNU Lesser General Public License
- along with this program. If not, see
- http://www.gnu.org/licenses/.
-
-
-
-
-
-
-
- Input filename when run in standalone mode
-
-
-
-
- Output filename when run in standalone mode
-
-
-
-
- Transliteration table to use when in standalone mode (no extension)
-
-
-
-
- Check if the given context item has a vowel or sheva (include shuruq and holam male)
-
-
-
-
-
-
-
-
-
-
-
- Find a whole word, reversing through the @next pointers.
- When the first part is found, go into assemble-word mode.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Find a whole word, going forward through the @next
- pointers.
-
-
- tei:w(mode=assemble-word):
-
-
-
-
-
-
-
-
- Finds the textual part of a whole word; If it's from the context we're looking for, don't wrap it. If it isn't, wrap it in tr:ignore tags.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Replaces appearances of the Tetragrammaton with their pronounced versions. Returns an xs:string. Will only work if the Tetragrammaton is a not broken up.
-
-
-
-
- replace-tetragrammaton: word=
-
-
-
-
-
- matching:
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- non-matching:
-
-
-
-
-
-
-
-
-
- Make a tr:w word filled with tr:cc "complex characters."
- The result must be processed further to make all of these correct.
- A set of complex characters consists of the following elements in the "urn:transliterator" namespace:
-
-
cons: consonant
-
s: sheva
-
vu: ultrashort vowel
-
vs: short vowel
-
vl: long vowel
-
d: dagesh or rafe
-
dot:shin/sin dot
-
m: meteg
-
al: lower accent
-
am: "mid accent" - Unicode character class between 220 and 230, exclusive
-
ah: high accent
-
-
- The content of the Hebrew word to be converted, which is a Unicode string inside tr:w
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Encountered a character (""=#) in your Hebrew text in the word that doesn't match any known pattern in Hebrew. This is either a typo or a bug in the transliterator.
-
-
-
-
-
-
-
- continue...
-
-
-
-
-
-
- Check for suppressed virtual doubling
-
-
-
-
-
-
-
-
-
-
-
- If a dagesh letter requires a different transliteration
- because it has a dagesh, transliterate it here
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- silent letter: use @silent instead of @to
-
-
-
-
-
-
-
-
- Transliterate non-ignored text from the table
-
-
-
-
-
-
-
-
-
-
-
- Ignore text under tr:ignore/tr:suppress
-
-
-
-
- transliterates raw text
- A set of tr:tr elements that form a table for converting characters to their transliterated equivalents.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Mark first and last in word with @first or @last; punctuation is marked with @punct; combine shin/sin dot
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Furtive patah. Reverses the vowel and consonant order.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Complex character preceding a holam male. Adds the holam male.
-
-
-
-
- &vav;&holam;
-
-
-
-
-
-
-
-
-
- vav with holam - remove (it's a typographic convention for holam male). For vav haluma use HEBREW VOWEL HOLAM FOR VAV instead
-
-
-
-
- Complex character preceding a shuruq; adds the shuruq; ignore two "possible" shuruqs in a row - first is not a shuruq
-
-
-
-
- &vav;&dageshormapiq;
-
-
-
-
-
-
-
-
-
- vav with dagesh.
- At beginning of word - replace the current cc with a shuruq vowel only;
- if the preceding consonant has no vowel, it's a shuruq and should be ignored;
- otherwise, it gets copied wholesale because it's a vav with dagesh; ignores first vav-dagesh
-
-
-
-
-
-
-
- &vav;&dageshormapiq;
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Hiriq male or long versions of tsere and segol
-
-
-
-
-
-
- &yod;
-
- &dageshormapiq;
-
-
-
-
-
-
-
-
-
-
- Hiriq male and similar, remove the yod (but not when it has a dagesh)
-
-
-
-
- Check if a qamats is a vowel letter.
- Removed @last condition on following tr:cc.
- Has to prevent next letter from having a vowel itself or shuruq/holam male
-
-
-
-
-
-
-
-
-
-
-
-
-
- Remove the vowel letter he
-
-
-
-
-
-
- Put a vowel on the preceding letter when a silent letter is
- about to be removed.
-
-
-
-
-
-
-
-
-
-
-
- Remove silent letters in the second pass.
- The silent letter may actually have a vowel after the first pass (HOW!?),
- which should be moved (by another template) to the preceding letter
-
-
-
-
-
-
-
-
- Try to find whether a dagesh is a kal or hazak.
- If hazak, double the letter by adding a "virtual" complex
- character before the current one, otherwise join the dagesh
- to the consonant.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- &shevanach;
-
-
-
-
-
-
-
-
-
-
- Determine if an indeterminate sheva is na or nach.
-
-
- Rules:
-
-
First letter in word
-
Preceding letter had a long vowel or sheva and not last
- letter in word
-
Next letter is not last and with sheva (not the first in a
- doubly closed syllable)
-
First consonant in a sequence of two identical consonants
-
Redistribution and use in source and binary forms, with
+ or without modification, are permitted provided that the
+ following conditions are met:
+
+ Redistributions of source code must retain the
+ above copyright notice, this list of conditions and the
+ following disclaimer.
+ Redistributions in binary form must reproduce the
+ above copyright notice, this list of conditions and the
+ following disclaimer in the documentation and/or other
+ materials provided with the distribution.
+
+
This software is provided by the copyright holders and
+ contributors "as is" and any express or implied
+ warranties, including, but not limited to, the implied
+ warranties of merchantability and fitness for a particular
+ purpose are disclaimed. In no event shall the copyright
+ holder or contributors be liable for any direct, indirect,
+ incidental, special, exemplary, or consequential damages
+ (including, but not limited to, procurement of substitute
+ goods or services; loss of use, data, or profits; or
+ business interruption) however caused and on any theory of
+ liability, whether in contract, strict liability, or tort
+ (including negligence or otherwise) arising in any way out
+ of the use of this software, even if advised of the
+ possibility of such damage.
+
+
TEI material can be licensed differently depending on the
+ use you intend to make of it. Hence it is made available
+ under both the CC+BY and BSD-2 licences. The CC+BY licence
+ is generally appropriate for usages which treat TEI content
+ as data or documentation. The BSD-2 licence is generally
+ appropriate for usage of TEI content in a software
+ environment. For further information or clarification,
+ please contact the TEI
+ Consortium.
+
+
+
+
A long history from P2 onwards. See further
+
+
+
+ $Date$.
+ $Id$
+ $Id$
+
+
+
Releases of the TEI Guidelines
Dedication
Preface and Acknowledgments
About These Guidelines
Structure and Notational
+Conventions of this Document
TEI Naming Conventions
Element and Attribute Names
Class, Macro, and Datatype Names
Design Principles
Intended Use
Use in Text Capture and Text Creation
Use for Interchange
Use for Local Processing
Historical Background
Future Developments and Version Numbers
A Gentle Introduction to XML
What's Special about XML?
Descriptive Markup
Types of Document
Data Independence
Textual Structures
XML Structures
Elements
Content Models: an Example
Validating a Document's Structure
An Example Schema
Generic Identifier
Content Model
Occurrence Indicators
Connectors
Groups
Complicating the Issue
Attributes
Declaring Attributes
Identifiers and Indicators
Other Components of an XML Document
Character References
Processing Instructions
Namespaces
Marked Sections
Putting It All Together
Associating Entity Definitions with a Document
+Instance
Associating a Document Instance with Its Schema
Assembling Multiple Resources into a Single Document
Stylesheet Association and Processing
Content Validation
Languages and Character Sets
Language Identification
Characters and Character Sets
Historical Considerations
Terminology and Key
+ Concepts
Abstract Characters, Glyphs and Encoding Scheme
+ Design
Entry of Characters.
Output of Characters
Unicode and
+ XML
Non-Unicode Character Sets and XML Processors
Non-Unicode Characters in XML Documents
Special Aspects of Unicode Character Definitions
Compatibility Characters
Precomposed and Combining Characters and
+ Normalization
Character Semantics
Character Entities in Non-validated Documents
Issues Arising from the Internal Representations of
+ Unicode
Encoding Errors Related to UTF-8
Encoding
+ Errors Related to UTF-16
The TEI Infrastructure
TEI Modules
Defining a TEI Schema
A Simple Customization
A Larger Customization
The TEI Class System
Attribute Classes
Global Attributes
Element Identifiers and Labels
Language Indicators
Rendition Indicators
Evaluation of Links
XML Whitespace
+ provides attributes for elements representing speech or action that can be ascribed to a
+ specific individual.
+ 특정 개인의 대화 또는 행위를 표시하는 요소에 대한 속성을 제공한다.
+ 提供的元素屬性代表言詞或行為,可出自某一特定個人。
+ 特定個人に帰する発話や行動を示すを示す要素に付随する.
+ fournit des attributs pour des éléments transcrivant la
+ parole ou l'action qui peuvent être attribuées à un individu en particulier.
+ proporciona atributos para los elementos que representan
+ palabras o acciones atribuibles a individuos determinados.
+ assegna degli attributi agli elementi che rappresentano
+ parole o azioni attribuibili a singoli individui
+
+
+ indicates the person, or group of people, to whom the element content is ascribed.
+ 요소 내용이 속하는 사람 또는 사람의 그룹을 나타낸다.
+ 指出該元素內容所歸屬的個人或團體。
+ 当該要素の内容が示す人物を示す.
+ indique la personne ou le groupe de personnes à qui
+ le contenu de l'élément est attribué.
+ indica la persona o grupo de personas a las que se
+ refiere el contenido del elemento.
+ indica la persona o gruppo di persone alle quali
+ viene attribuito il contenuto dell'elemento
+
+
+
In the following example from Hamlet, speeches (sp) in the body of the play
+ are linked to castItem elements in the castList using the who
+ attribute.
+
+
+ Bernardo
+
+
+ Francisco
+ a soldier
+
+
+
+ Bernardo
+ Who's there?
+
+
+ Francisco
+ Nay, answer me: stand, and unfold yourself.
+
+
+
+
For transcribed speech, this will typically identify a participant or participant
+ group; in other contexts, it will point to any identified person element.
+
Pour un discours transcrit, identifiera typiquement un participant ou
+ un groupe participant ; dans d'autres contextes, pointera vers n'importe quel élément
+ person identifié.
+
+
+
+
+
+
+
+ provides attributes which can be used to associate a representation such as a name or title
+ with canonical information about the object being named or referenced.
+ fournit des attributs qui peuvent être utilisés pour
+ associer une représentation telle qu'un nom ou un titre à l'information canonique concernant
+ l'objet nommé ou auquel il est fait référence.
+
+
+ provides an externally-defined means of identifying the entity (or entities) being
+ named, using a coded value of some kind.
+ fournit un moyen, défini de façon externe,
+ d'identifier l'entité (ou les entités) nommé(es), en utilisant une valeur codée
+ d'un certain type.
+
+
+
+
+ [New Zealand Parliament, Legislative Council]
+
+
+
+
+
+
+ Victor Hugo
+
+
+
+
+
The value may be a unique identifier from a database, or any other externally-defined
+ string identifying the referent.
+
No particular syntax is proposed for the values of the key attribute, since
+ its form will depend entirely on practice within a given project. For the same reason, this
+ attribute is not recommended in data interchange, since there is no way of ensuring
+ that the values used by one project are distinct from those used by another. In such
+ a situation, a preferable approach for magic tokens which follows standard practice
+ on the Web is to use a ref attribute whose value is a tag URI as defined in
+ RFC 4151.
+
+
+
La valeur peut être un identifiant unique dans une base de données, ou toute autre chaîne
+ définie de façon externe identifiant le référent.
+
+
+
+ reference
+ référence
+ provides an explicit means of locating a full definition or identity for the entity being named by
+ means of one or more URIs.
+ fournit un moyen explicite de localiser une
+ définition complète de l'entité nommée au moyen d'un ou plusieurs URIs.
+
+
+
+ Seamus Heaney
+
+
+
+
The value must point directly to one or more XML elements or other resources by means of one or more URIs, separated by whitespace. If more than one is supplied the implication is that the name identifies several distinct entities.
+
+
+
La valeur doit pointer directement vers un ou plusieurs éléments XML au moyen d'un ou plusieurs URIs, séparés par un espace. Si plus d'un URI est fourni, cela implique que le nom identifie plusieurs entités distinctes.
+
+
+
+
+ provides attributes for describing numerical ranges.
+
+
+ gives a minimum estimated value for the approximate measurement.
+ donne une estimation de la valeur minimum pour la
+ mesure.
+
+
+
+ gives a maximum estimated value for the approximate measurement.
+ donne une estimation de la valeur maximum pour la
+ mesure.
+
+
+
+ where the measurement summarizes more than one observation
+ or a range, supplies the minimum value
+ observed.
+ lorsque la mesure résume plus d'une observation,
+ fournit la valeur minimum observée.
+
+
+
+ where the measurement summarizes more than one observation
+ or a range, supplies the maximum value
+ observed.
+ lorsque la mesure résume plus d'une observation,
+ fournit la valeur maximum observée.
+
+
+
+ specifies the degree of statistical confidence (between zero and one) that a value falls within the range
+ specified by min and max, or the proportion of observed values that fall within that range.
+
+
+
+
+
+The MS. was lost in transmission by mail from Philadelphia to the Graphic office, New York.
+
+
+
+ provides attributes for describing the size of physical objects.
+ 물리적 대상의 크기를 기술하는 속성을 제공한다.
+ 提供符合某種度量值的屬性值。
+ 物理的対象の大きさを表す属性を示す.
+ fournit des attributs
+ pour décrire la taille des objets physiques
+ assegna degli attributi che descrivono la grandezza di
+ oggetti fisici
+ proporciona atributos que califican una determinata
+ medición.
+
+
+
+
+
+ names the unit used for the measurement
+ 측정 단위의 이름을 기술한다.
+ 度量單位的名稱。
+ 当該大きさの単位を示す.
+ noms des unités utilisées pour la mesure.
+ especifica las unidades usadas para la medición.
+ specifica le unità usate per la misurazione
+
+
+
+ centimetres
+ centimètres
+ centímetros
+ centimetri
+
+
+ millimetres
+ millimètres
+ milímetros
+ millimetri
+
+
+ inches
+ pouces
+ pulgadas
+ pollici
+
+
+ lines of text
+ 텍스트의 행
+ líneas de texto
+ テキスト行
+ lignes de texte
+ righe di testo
+
+
+ characters
+ 문자
+ caracteres
+ caratteri
+ characters of text
+ 텍스트의 문자
+ caracteres del texto
+ 文字列
+ caractères du texte
+ caratteri di testo
+
+
+
+
+ specifies the length in the units specified
+ 명시된 단위의 길이를 명시한다.
+ especifica la longitud en las unidades especificadas
+ 当該単位の大きさを示す.
+ spécifie la longueur dans les unités indiquées
+ specifica la lunghezza nelle unità indicate
+
+
+
+ indicates the size of the object concerned using a project-specific vocabulary combining
+ quantity and units in a single string of words.
+ indique la dimension de l'objet en utilisant
+ un vocabulaire spécifique à un projet qui combine la quantité et
+ l'unité dans une chaîne seule de mots.
+
+
+
+
+
+
+
+
+
+
+
+
+
+ characterizes the precision of the values specified by the other attributes.
+ caractérise la précision des valeurs spécifiées par les autres attributs.
+
+
+
+ where the measurement summarizes more than one observation, specifies the applicability
+ of this measurement.
+ 측정의 적용가능성을 명시하며, 하나 이상의 대상이 측정된다.
+ 測量多個物件時,標明此度量的可應用範圍。
+ 対象物が複数あった場合に,当該数値の適応範囲を示す.
+ spécifie l'applicabilité de cette mesure, là où plus
+ d'un objet est mesuré.
+ especifica la aplicabilidad de esta medición, en los
+ casos en que se mida más de un objeto.
+ indica l'applicabilità della misurazione, laddove
+ venga misurato più di un oggetto
+
+
+
+ measurement applies to all instances.
+ 측정은 모두 사례에 적용된다.
+ 度量可應用於所有實例。
+ la medida se aplica a todos los casos.
+ 全インスタンスに当てはまる単位.
+ la mesure s'applique à tous les cas.
+ la misurazione fa riferimento a tutti i
+ casi
+
+
+ measurement applies to most of the instances inspected.
+ 측정은 대부분의 사례에 적용된다.
+ 度量可應用於大部分實例。
+ la medida se aplica a la mayoría de los casos
+ examinados.
+ 計測インスタンスの殆どに当てはまる単位.
+ la mesure s'applique à la plupart des cas
+ examinés
+ la misurazione fa riferimento alla maggior parte
+ dei casi esaminati
+
+
+ measurement applies to only the specified range of instances.
+ 측정이 사례의 명시적 범위에 한정하여 적용된다.
+ 度量僅應用於特定範圍的實例。
+ la medida se aplica solamente a los casos
+ especificados
+ 特定インスタンスにのみ当てはまる単位.
+ la mesure s'applique seulement à l'ensemble des
+ exemples indiqués.
+ la misurazione fa riferimento solo ai casi
+ specificati
+
+
+
+
+
+ provides an attribute to indicate the hand in which
+ the textual content of an element was written in the source being transcribed.
+
+
+
+ points to a handNote element describing the hand considered responsible for the
+ textual content of the element concerned.
+
+
+
+
+ 간섭을 만든 당사자의 필적을 나타낸다.
+
+ 当該調整を行った主体の筆致を特定する.
+
+ signale la main de celui qui est intervenue.
+ indica il responsabile dell'aggiunta o della cancellazione
+ indica el responsable de la adición o de la omisión.
+
+
+
+
+
+
+
+
+
+
+ provides attributes describing the nature of any physical damage affecting a reading.
+ 독법에 영향을 미치는 물리적 손상의 특성을 기술하는 속성을 제공한다.
+ 読みに影響を与える物理的損傷の性格を示す属性を示す.
+ proporciona los atributos que describen la naturaleza de
+ cualquier daño físico que afecta a una lectura.
+ fournit des attributs décrivant la nature de tout dommage
+ physique affectant la lecture.
+ fornisce attributi che descrivono la natura di eventuali
+ danni fisici che influenzano una lettura
+
+
+
+
+
+
+
+ categorizes the cause of the damage, if it can be identified.
+ 식별될 수 있다면 그 손상의 원인을 분류한다.
+ 当該損傷の原因の分類を示す.
+ caractérise la raison des dommages, lorsqu'elle peut
+ être identifiée
+ classifica la causa del danneggiamento, se
+ rintracciabile
+ categoriza la causa del daño, si esta puede ser
+ identificada.
+
+
+
+ damage results from rubbing of the leaf edges
+ 손상의 원인이 페이지 모서리의 마모이다.
+ 紙の端の擦り切れによる損傷.
+ le dommage résulte d'un frottement sur les bords
+ du feuillet
+ dannegiamento per sfregamento dei margini del
+ foglio
+ el daño se deriva por el roce de los márgenes de
+ los folios
+
+
+ damage results from mildew on the leaf surface
+ 훼손 원인이 페이지 표면의 곰팡이이다.
+ 紙上の白カビによる損傷.
+ le dommage résulte de moisissure sur la surface
+ du feuillet
+ danneggiamento per muffa sulla superficie del
+ foglio
+ daño resultante de la presencia de moho en la
+ superficie del folio
+
+
+ damage results from smoke
+ 훼손의 원인이 연기이다.
+ 煙による損傷.
+ le dommage résulte de la fumée
+ danneggiamento per fumo
+ daños provocados por el humo
+
+
+
+
+ provides a coded representation of the degree of damage, either as
+ a number between 0 (undamaged) and 1 (very extensively damaged), or
+ as one of the codes high, medium, low,
+ or unknown. The damage element
+ with the degree attribute should only be used where the text may be read with
+ some confidence; text supplied from other sources should be tagged as supplied.
+ 다양한 척도에 따라 손상 정도를 나타낸다. degree 속성과 함께
+ damage 태그는 텍스트가 확인 가능한 곳에서만 사용되어야 한다; 다른 원본에서 가져온 텍스트는 supplied를 부착한다.
+ 当該損傷部分の程度を示す.要素damageの属性
+ degreeは,当該損傷部分のテキストが確認できる場合にの み使用されるべきである.他の資料から補われたテキストの場合には,
+ 要素suppliedで示されるべきである.
+ indique le degré (la gravité) du dommage subi, selon
+ une grille appropriée. L'attribut degree doit être utilisé dans le seul cas où le
+ texte peut être lu avec certitude ; le texte restitué en utilisant d'autres sources doit
+ être encodé au moyen de l'élément supplied.
+ indica l'entità del danneggiamento misurato in base a
+ una scala funzionale; il marcatore damage con l'attributo degree
+ dovranno essere utilizzati solo se il testo può essere letto con una certa sicurezza; i
+ testi derivanti da altre fonti andranno marcati come supplied
+
+ >indica el grado del daño medido en base a una
+ escala funcional; la etiqueta damage (daño) con el atributo degree
+ (grado) deberán utilizarse sólo si el texto puede ser leído con una cierta certeza; los
+ textos proporcionados por otras fuentes serán etiquetados como supplied (suplente)
+
+
+
The damage element is appropriate where it is
+ desired to record the fact of damage although this has not affected the readability of the
+ text, for example a weathered inscription. Where the damage has
+ rendered the text more or less illegible either the unclear tag (for partial
+ illegibility) or the gap tag (for complete illegibility, with no text supplied)
+ should be used, with the information concerning the damage given in the attribute values
+ of these tags. See section for discussion of the use of these tags
+ in particular circumstances.
+
+
+
La balise damage avec l'attribut degreene doit être utilisée qu'à
+ l'endroit où le texte peut être lu avec certitude malgré le dommage. Elle convient
+ lorsqu'on désire faire état du dommage bien que cela n'affecte en rien la lisibilité du
+ texte (comme cela peut être le cas avec des vestiges de matériaux gravés). Là où les
+ dommages ont rendu le texte plus ou moins illisible, les balises unclear (pour
+ l'illisibilité partielle) ou gap (pour l'illisibilité complète, sans restitution
+ de texte) sont à employer, l'information relative aux dommages étant donnée par les
+ valeurs d'attributs de ces balises. Voir au sujet de l'utilisation
+ de ces balises dans des cas particuliers.
La etiqueta damage (daño) con el atributo
+ degree (grado) debe ser utilizado solamente
+ donde el texto se puede leer con certeza a pesar del daño. Es apropiada donde se desee
+ registrar el daño, aunque éste no haya afectado a la legibilidad del texto (como puede ser
+ el caso de materiales desgastados). Donde el daño ha provocado que el texto sea más o
+ menos ilegible conviene usar la etiqueta unclear (ilegible) (para la ilegibilidad parcial)
+ o la etiqueta gap (agujero) (para la ilegibilidad completa, carente del texto
+ suministrado), con la información referente al daño en los valores de atributo de estas
+ etiquetas. Ver la sección para la discusión sobre el uso de estas
+ etiquetas en circunstancias particulares.
+
+
+
+ assigns an arbitrary number to each stretch of damage regarded as forming part of the
+ same physical phenomenon.
+ 동일 물리적 현상의 부분을 형성하는 것으로 간주되는 손상에 대해 각각 임의적 숫자를 할당한다.
+ 各損傷部分に,物理的状況を示す,任意の数値を付与する.
+ asigna un número arbitrario a cada fragmento del daño
+ considerado como parte del mismo fenómeno físico.
+ permet d'assigner un numéro quelconque à chaque
+ fragment endommagé considéré comme faisant partie d'un ensemble résultant du même phénomène
+ physique
+ assegna un numero arbitrario a ognuna delle porzioni
+ di danneggiamento considerate parte dello stesso fenomeno fisico
+
+
+
+
+
+
+
+
+ provides an attribute to indicate whether or not the element
+ concerned is considered to mark the end of an orthographic token in the same way
+ as whitespace.
+ fournit un attribut pour indiquer si un élément est
+consideré ou pas comme marquant la fin d'un mot orthographique, comme
+le fait une espace.
+
+
+ indicates whether or not the element
+ bearing this attribute should be considered to mark the end of
+ an orthographic token in the same way as whitespace.
+ indique si l'élément qui porte cet attribut
+ peut être considéré comme une espace blanc indiquant la fin d'un mot
+ orthographique.
+
+
+
+ the element bearing this attribute is considered
+to mark the end of any adjacent orthographic token irrespective of the presence
+of any adjacent whitespace
+ l'élément qui porte cet attribut
+ peut être considéré comme indiquant la fin d'un mot
+ orthographique
+
+
+ the element bearing this attribute is considered
+not to mark the end of any adjacent orthographic token irrespective of the presence
+of any adjacent whitespace
+ l'élément qui porte cet attribut
+ ne peut être pas considéré comme indiquant la fin d'un mot
+ orthographique
+
+
+ the encoding does not take any position on this issue.
+ l'encodage ne prends aucune position sur la question.
+
+
+
+
In the following lines from the
Dream of the Rood,
+ linebreaks occur in the middle of the words lāðost
+ and reord-berendum.
+
+
+
+ ...eƿesa tome iu icƿæs ȝeƿorden ƿita heardoſt .
+ leodum la ðost ærþan ichim lifes
+ ƿeȝ rihtne ȝerymde reord be
+ rendum hƿæt me þaȝeƿeorðode ƿuldres ealdor ofer...
+
+
+
+
+
+
+
+
+
+
+
+
+ provides an attribute which may be used to supply a
+ canonical reference as a means of identifying the
+ target of a pointer.
+
+
+ canonical reference
+ 표준 참조
+ referencia canónica
+ référence canonique
+ riferimento canonico
+ specifies the destination of the pointer by supplying a canonical reference expressed using the
+ scheme defined in a refsDecl element in the TEI header
+ TEI 헤더의 refsDecl 요소에서 정의된 체계의 표준 참조를 이용하여
+ 포인터의 목적지를 명시한다.
+ 用元素refsDecl在TEI標頭內所定義的標準參照來說明指標所指位置。
+ TEIヘダー内の要素refsDeclで定義されているスキームにある,
+ 標準的な参照により,当該ポインタの参照場所を示す.
+ précise la cible du pointeur en fournissant une
+ référence canonique issue d'un modèle défini par un élément refsDecldans l'En-tête
+ TEI.
+ especifica la destinación de un señalizador
+ proporcionando una referencia canónica de un esquema definido en un elemento
+ refsDecl en el encabezado TEI.
+ specifica la destinazione di un puntatore usando un
+ riferimento canonico a partire da uno schema definito in un elemento refsDecl
+ nell'intestazione TEI
+
+
+
The value of cRef should be constructed so
+ that when the algorithm for the resolution of canonical
+ references (described in section ) is
+ applied to it the result is a valid URI reference to the
+ intended target
+
The refsDecl to use may be indicated with the decls attribute.
+
Currently these Guidelines only provide for a single canonical reference to be encoded on
+ any given ptr element.
+
+
+
Le résultat de l’application de l'algorithme pour la résolution des
+ références canoniques (décrit à la section ). Ce sera une référence URI
+ valide pour la cible prévue.
La refsDecl à utiliser peut être indiquée à l'aide
+ de l'attribut decls. Actuellement ces Principes
+ directeurs ne permettent que l'encodage d'une unique référence
+ canonique pour tout élément ptr donné.
+
+
+
要素refsDeclは,属性declsを伴い,使用され るだろう.
+
現行ガイドラインでは,要素ptrは,ひつとの標準的な参照 をとることを想定している.
+
+
+
+
+ provides attributes for normalization of elements that contain datable events to a custom dating system
+ (i.e. other than the Gregorian used by W3 and ISO).
+
+
+ supplies the value of a date or time in some custom standard form.
+
+
+
The following are examples of custom date or time formats that are not valid ISO or W3C format
+ normalizations, normalized to a different dating system
+
+
Alhazen died in Cairo on the
+
+ 12th day of Jumada t-Tania, 430 AH
+ .
+
The current world will end at the
+ end of B'ak'tun 13.
+
The Battle of Meggidu
+ (23rd year of reign of Thutmose III).
+
Esidorus bixit in pace annos LXX plus minus sub
+ die XI mensis Octobris indictione IIII
+
+
+
Not all custom date formulations will have Gregorian equivalents.
+
The when-custom attribute and other custom dating are not contrained to a datatype by the TEI, but
+ individual projects are recommended to regularize and document their dating formats.
+
+
+
+ specifies the earliest possible date for the event in some custom standard form.
+
+
+
+ specifies the latest possible date for the event in some custom standard form.
+
+
+
+ indicates the starting point of the period in some custom standard form.
+
+
+
+
+ The Great Fire of London
+
The Great Fire of London burned through a large part
+ of the city of London.
+
+
+
+
+
+ indicates the ending point of the period in some custom standard form.
+
+
+
+ supplies a pointer to some location defining a named point in time with reference to which the datable item is understood to have occurred
+
+
+
+ supplies a pointer to a calendar element or other
+ means of interpreting the values of the custom dating attributes.
+
+
+ Contayning the Originall, Antiquity, Increaſe, Moderne
+ eſtate, and deſcription of that Citie, written in the yeare
+ 1598. by Iohn Stow
+ Citizen of London.
+
In this example, the calendar attribute points to a calendar element for the
+ Julian calendar, specifying that the text content of the date element is a
+ Julian date, and the datingMethod attribute also points to the Julian calendar
+ to indicate that the content of the when-custom attribute value is Julian too.
+
+
+
+
+ μηνὶ Ἰουνίου εἰς κ ἔτους ςωϞ
+
+
+
In this example, a date is given in a Mediaeval text measured "from the creation of the world", which is normalised
+ (in when) to the Gregorian date, but is also normalized (in when-custom) to a
+ machine-actionable, numeric version of the date from the Creation.
+
+
Note that the datingMethod attribute (unlike
+ calendar defined in att.datable) defines
+ the calendar or dating system to which the date described by the parent element is normalized (i.e. in the
+ when-custom or other X-custom attributes), not the calendar of the
+ original date in the element.
+
+
+
+
+
+
+ provides attributes for normalization of elements that contain
+ datable events conforming to the W3C
+ XML Schema Part 2: Datatypes Second Edition.
+ W3C 데이터 유형을 사용하여 날짜가 명기된 사건을 포함하는 요소의 규격화를 위한 속성을 제공한다.
+ 提供用於元素規格化的屬性,這些元素包含以W3C datatypes所定義的日期明確之事件。
+ W3Cに従い,時間事象の正規化方法を示す属性を示す.
+ fournit des attributs
+ pour la normalisation d'éléments qui contiennent des mentions
+ d'événements datés ou susceptibles de l'être
+ indica degli attributi per la normalizzazione di elementi che contengono eventi databili utilizzando i tipi di dati del W3C
+ proporciona atributos para la normalización de elementos que contienen eventos datables.
+
+
+
+ The @when attribute cannot be used with any other att.datable.w3c attributes.
+
+
+
+
+
+
+ The @from and @notBefore attributes cannot be used together.
+
+
+
+
+
+
+ The @to and @notAfter attributes cannot be used together.
+
+
+
+
+
+ supplies the value of the date or time in a standard form,
+ e.g. yyyy-mm-dd.
+ 표준형식으로 날짜 또는 시간의 값을 제공한다.
+ 日付や時間を,標準形式で示す.
+ spécifie une date exacte pour un événement sous
+ une forme normalisée, par ex. aaaa-mm-jj.
+ indica il valore di una data o di un orario in un formato standard
+ proporciona el valor de una fecha o una hora en un formato estandard.
+
+
+
Examples of W3C date, time, and date & time formats.
+
+
+ 24 Oct 45
+ September 24th, 1996 at 3:25 in the morning
+
+
+ October of 1962
+ June 12th
+ the first of the month
+ August
+ MMVI
+ AD 56
+ 56 BC
+
+
+
+
+
+
+ 24 Oct 45
+ 24 septembre 1996 à 3h 25 du matin
+
+
+ octobre 1962
+ 12 juin
+ premier du mois
+ Août
+ MMVI
+ 56 ap. J.-C.
+ 56 av. J.-C.
+
+
+
+
+ Shakespeare meurt dix jours plus tard, à Stratford-on-Avon,
+ Warwickshire, dans l'Angleterre protestante et dans le
+ calendrier julien, le
+ mardi 23 avril ancien style,
+ c'est-à-dire le
+ 3 mai dans
+ le calendrier grégorien.
+
+
+ This list begins in
+ the year 1632, more precisely on Trinity Sunday, i.e. the Sunday after
+ Pentecost, in that year the
+ 27th of May (old style).
+
+
+
+ Dorchester, Village,March 2d. 1828.To
+ Mrs. Cornell, Sunday
+
+
+
+
+
+ specifies the earliest possible date for the event in
+ standard form, e.g. yyyy-mm-dd.
+ yyyy-mm-dd와 같은 표준 형식으로 사건의 가능한 한 이른 날짜를 명시한다.
+ 以標準格式說明該事件可能發生的最早日期,例如年-月-日。
+ 当該事象の一番古い日付を,標準形式で示す.例えば,yyyy-mm-dd.
+ spécifie la date la plus ancienne pour
+ l'événement sous une forme normalisée, par ex. aaaa-mm-jj
+ specifica la prima data possibile per un evento nel formato standard aaaa-mm-gg
+ especifica la fecha más temprana posible para un evento en un formato estándard, p.ej. aaaa-mm-dd.
+
+
+
+ specifies the latest possible date for the event in
+ standard form, e.g. yyyy-mm-dd.
+ yyyy-mm-dd와 같은 표준 형식으로 사건의 가능한 한 나중 날짜를 명시한다.
+ 以標準形式標明該事件可能的最晚日期,例如年-月-日。
+ 当該事象の一番新しい日付を,標準形式で示す.例えば,yyyy-mm-dd.
+ spécifie la date la plus récente possible pour
+ l'événement sous une forme normalisée, par ex. aaaa-mm-jj
+ specifica l'ultima data possibile per un evento nel formato standard aaaa-mm-gg
+ especifica la fecha más tardana posible para un evento en un formato estándard, p.ej. aaaa-mm-dd.
+
+
+
+ indicates the starting point of the period in standard form, e.g. yyyy-mm-dd.
+ 표준 형식으로 기간의 시작 지점을 표시한다.
+ 以標準格式表示該段時間的起始點。
+ 標準形で当該時間幅の始点を示す.
+ indique le point de départ d'une période sous une
+ forme normalisée, par ex. aaaa-mm-jj
+ indica l'inizio del periodo nel formato standard
+ indica el punto de inicio del período en el formato estándard.
+
+
+
+ indicates the ending point of the period in standard
+ form, e.g. yyyy-mm-dd.
+ 표준 형식으로 기간의 종료 지점을 나타낸다.
+ 以標準格式表示該段時間的結束點。
+ 標準形で当該時間幅の終点を示す.
+ indique le terme de la période sous une forme
+ normalisée, par ex. aaaa-mm-jj
+ indica la fine del periodo nel formato standard
+ indica el punto final de un periodo en formato estándard.
+
+
+
+
+
+
+ 28 May through 1 June 1863
+
+
+
+
The value of these attributes should be a normalized
+ representation of the date, time, or combined date & time
+ intended, in any of the standard formats specified by
XML Schema Part 2: Datatypes Second
+ Edition, using the Gregorian calendar.
+
The most commonly-encountered format for the date portion of
+ a temporal attribute is yyyy-mm-dd, but
+ yyyy, --mm, ---dd,
+ yyyy-mm, or --mm-dd may also be
+ used. For the time part, the form hh:mm:ss is
+ used.
+
Note that this format does not currently permit use of the
+ value 0000 to represent the year 1 BCE; instead the
+ value -0001 should be used.
+
+
+
La valeur de l'attribut when doit être une représentation normalisée de la date ou de l'heure, ou des deux, dans l'un des formats spécifiés par le
XML Schema Part 2: Datatypes Second Edition, selon le calendrier grégorien.
+
Pour la date, le format le plus courant est yyyy-mm-dd, mais on trouve aussi yyyy, --mm, ---dd, yyyy-mm, ou --mm-dd. Pour l'heure, on utilise le format hh:mm:ss.
+
Il faut noter qu'actuellement ce format ne permet pas d'utiliser la valeur 0000 pour représenter l'année précédant le début de l'ère chrétienne ; on doit utiliser la valeur -0001.
+
+
+
El valor del atributo cuando es una serie que representa una fecha o una hora, o ambas, en cualquiera de los siguientes formatos:
+ una fecha en los formatos estándares descritos por la XML Schema Part 2: Datatypes Second Edition, p.ej. en el formato más común aaaa-mm-dd, pero también
+ aaaa, --mm, ---dd,
+ aaaa-mm, o --mm-dd
+ ; una hora en el formato estándar descrito en
+ XML Schema Part 2: Datatypes Second
+ Edition, es decir. hh: mm: ss
+ ; o una fecha y una hora combinadas en los formatos estándares descritos en XML Schema Part 2: Datatypes Second
+ Edition, es decir. aaaa-mm-ddThh: mm: ss
+ .
+
Obligatoriamente el valor de cuando aparecerá en un formato de fecha, tiempo, o ambos formatos combinados, de los reconocidos por W3C
XML Schema Part 2: Datatypes Second Edition. Esto se dará si el componente de la fecha (eventualmente) es una fecha gregoriana o proléptica gregoriana.
+
A la hora de esta escritura, W3C no permite el año 0000, que sería utilizado normalmente para representar el año 1 antes de nuestra era. Usando el sistema actual de W3C, el año 1 a.C. se indica con -0001, el año 2 a.C. con -0002, etc. Es la intención del grupo de trabajo del esquema de XML permitir 0000 como la representación léxica de 1 a.C. (que es un año bisiesto),
+ -0001 se convertiria en la representación léxica de 2 a.C., -0002 de 3 a.C., etc. Así en algunos casos puede ser ventajoso utilizar en su lugar el atributo cuando-ISO
+ para indicar los años anteriores a nuestra era.
+
+
+
+ 属性whenの値は,日付や時間またはその組み合わせによ
+ り,以下のような形式の文字列になる.
+ XML Schema Part 2: Datatypes Second Editionに
+ ある標準形式で示された日付.例えば,
+ yyyy-mm-dd, yyyy, --mm,
+ ---dd, yyyy-mm, --mm-dd
+ など.
+ XML Schema Part 2: Datatypes Second Editionに
+ ある標準形式で示された時間.例えば,
+ hh:mm:ss.
+ XML Schema Part 2: Datatypes Second Editionに
+ ある標準形式で示された日付と時間.例えば,
+ yyyy-mm-ddThh:mm:ss.
+
+
+
+ 属性whenの値は,日付や時間またはその組み合わを,
+
XML Schema Part 2: Datatypes Second Editionに従って示される.
+ 当該日付の値が,グレゴリオ暦またはそれ以前の前グレゴリオ暦シス
+ テムの場合に真となる.
+
+
+
+
+
+
+
+
+ provides attributes for normalization of elements that contain
+ dates, times, or datable events.
+ 날짜, 시간 또는 날짜 명기
+ 사건을 포함하는 요소의 규격화에 대한 속성을 제공한다.
+ 提供用於元素規格化的屬性,
+ 這些元素包含日期明確的事件。
+ 日付や時間または時間事象を含む要素の正規化手法を示す属性を示す.
+ fournit des attributs
+ pour la normalisation d'éléments qui contiennent des mentions
+ d'événements datés ou susceptibles de l'être
+ atributos para registrar expresiones temporales normalizadas.
+ assegna attributi per la normalizzazione di elementi che contengono eventi databili
+
+
+
+
+
+
+
+ indicates the system or calendar to which the date represented by the content of this
+ element belongs.
+ 날짜 표현 시스템 또는 달력 표시 형식을 표시한다.
+ 指明該日期表示所使用的曆法計算系統。
+ 当該日付の歴システムを示す.
+ indique le système ou le calendrier auquel appartient
+ la date exprimée dans le contenu de l'élément.
+ indica el sistema o calendario en que se muestra una
+ fecha.
+ indica il sistema o calendario al quale la data
+ appartiene.
+
+
+
+
+
+@calendar indicates the system or calendar to which the date represented by the content of this element
+belongs, but this element has no textual content.
+
+
+
+
+ He was born on Feb. 22, 1732
+ ( Feb. 11, 1731/32, O.S.).
+
+
+ L'année
+ 1960 fut, en vertu du calendrier grégorien, bissextile ; le 22 juin tomba ainsi le jour
+ de l'été, le 22 juin.
+
+
+
Note that the calendar attribute (unlike
+ datingMethod defined in att.datable.custom) defines
+ the calendar system of the date in the original material defined by the parent element, not
+ the calendar to which the date is normalized.
+
+
+ supplies a pointer to some location defining a named
+ period of time within which the datable item is understood to
+ have occurred.
+ 시간을 명시할 수 있는 항목이 일어난 시간의 기간명을 정의하는 특정 위치로의 포인터를 제공한다.
+ suministra un indicador a una localización concreta que define un periodo de tiempo conocido dentro del cual el item datable se ha producido.
+ 時間事象の名前付き時間幅を定義する時点を示す.
+ fournit un pointeur vers un emplacement donné
+ définissant une période de temps nommée durant laquelle l'item
+ concerné s'inscrit.
+ fornisce un puntatore a una data posizione definendo un determinato periodo di tempo entro il quale l'oggetto da datare è collocabile
+
+
+
+
+
This superclass provides attributes that
+ can be used to provide normalized values of temporal information.
+ By default, the attributes from the att.datable.w3c class are provided. If the
+ module for names & dates is loaded, this class also provides
+ attributes from the att.datable.iso and
+ att.datable.custom classes. In general, the possible values of attributes restricted to
+ the W3C datatypes form a subset of those values available via the
+ ISO 8601 standard. However, the greater expressiveness of the ISO
+ datatypes may not be needed, and there exists much greater
+ software support for the W3C datatypes.
+
+
+
Cettesuperclasse fournit des attributs qui peuvent être employés
+ pour donner des valeurs normalisées à des informations relatives au temps. Par
+ défaut, les attributs de la classe att.datable.w3c sont
+ fournis. Si le module pour les noms et les dates est chargé, cette classe fournit
+ également des attributs de la classe att.datable.iso. En
+ général, les valeurs possibles des attributs, limitées aux types de données W3C,
+ forment un sous-ensemble des valeurs que l'on trouve dans la norme ISO 8601.
+ Cependant, il n'est peut-être pas nécessaire de recourir aux possibilités très
+ étendues des types de données de l'ISO. Il existe en effet une bien plus grande
+ offre logicielle pour le traitement des types de données W3C.
+
+
+
Esta superclase proporciona atributos que pueden ser utilizados para proporcionar valores normalizados de información temporal.
+ Por defecto, los atributos de la clase att.datable.w3c son proporcionados. Si el módulo para los nombres y las fechas se acciona, esta clase también proporciona atributos de att.datable.iso. En general, los valores posibles de los atributos son los restringidos por la forma de los datatypes de W3C, un subconjunto de esos valores disponibles vía el estándar de ISO 8601. Sin embargo, la mayoría de expresiones de los datatypes de ISO pueden no ser necesarios, y existe software de soporte para los datatypes de W3C.
+
+
+
+
+
+
+ provides the dcr:datacat and
+ dcr:ValueDatacat attributes which are used to
+ align XML elements or attributes with the appropriate Data Categories (DCs) defined by the ISO 12620:2009
+ standard and stored in the Web repository called ISOCat at http://www.isocat.org/.
+
+
+ contains a PID (persistent identifier) that aligns the given element with the appropriate
+ Data Category (or categories) in ISOcat.
+
+
+
+ contains a PID (persistent identifier) that aligns the content of the given
+ element or the value of the given attribute with the appropriate simple Data
+ Category (or categories) in ISOcat.
+
+
+
+
+
In this example dcr:datcat relates the feature name to the data category
+ "partOfSpeech" and dcr:valueDatcat the feature value to the data category
+ "commonNoun". Both these data categories reside in the ISOcat DCR at www.isocat.org, which is the DCR used by ISO
+ TC37 and hosted by its registration authority, the MPI for Psycholinguistics in
+ Nijmegen.
+
+
+
+
+
+
+
+
ISO 12620:2009 is a standard describing the data model and procedures for a Data
+ Category Registry (DCR). Data categories are defined as elementary descriptors in a
+ linguistic structure. In the DCR data model each data category gets assigned a
+ unique Peristent IDentifier (PID), i.e., an URI. Linguistic resources or preferably
+ their schemas that make use of data categories from a DCR should refer to them using
+ this PID. For XML-based resources, like TEI documents, ISO 12620:2009 normative
+ Annex A gives a small Data Category Reference XML vocabulary (also available online
+ at http://www.isocat.org/12620/),
+ which provides two attributes, dcr:datcat and
+ dcr:valueDatcat.
+
+
+
+
+
+
+ provides attributes for those elements in the TEI header which
+ may be independently selected by means of the special purpose decls attribute.
+ 특별한 목적의 decls 속성을 통해서 독립적으로 선택될 수 있는 TEI 헤더의 요소에 대한 속성을 제공한다.
+ 提供屬性,用於TEI標頭內可單獨以特殊目的的屬性decls選出的元素。
+ 特定の働きを持つ属性declsで独自に選択されたTEIヘダー中の
+ 要素に関する属性を示す.
+ fournit des attributs pour ces éléments de
+ l'en-tête TEI qui peuvent être choisis indépendamment au moyen de l'attribut
+ decls.
+ proporciona atributos para los elementos contenidos en el encabezado que pueden ser seleccionados autónomamente mediante el atributo decls adecuado.
+ individua attributi per gli elementi contenuti nell'intestazione che possono essere selezionati autonomamente grazie all'apposito attributo decls
+
+
+
+ indicates whether or not this element is selected by default when
+its parent is selected.
+ 그 부모가 선택될 때 기본값으로 이 요소가 선택되었는지를 표시한다.
+ 當父元素被選擇時,指出此元素是否會被選擇。
+ 親要素が選択された場合に,当該要素がデフォルトとして選択されるか
+ どうかを示す.
+
+ Indique si oui ou non cet élément est affecté par
+ défaut quand son élément parent a été sélectionné.
+ indica si el elemento es seleccionado automáticamente o no cuando es seleccionado el padre
+ indica se l'elemento è selezionato automaticamente quando è selezionato il genitore
+
+ false
+
+
+ This element is selected if its parent is selected
+ 그 부모가 선택된다면 이 요소가 선택된다.
+ 若父元素被選擇,則此元素會被選擇。
+ Este elemento se selecciona si sus padres son seleccionados
+ 親要素が選択された場合,当該要素が選択される.
+ cet élément est choisi si son parent
+est choisi
+ l'elemento è selezionato se è selezionato il genitore
+
+
+ This element can only be selected explicitly, unless it is the
+only one of its kind, in which case it is selected if its parent is selected.
+ 이런 유형 중 유일한 경우가 아니라면, 이 요소는 명시적으로만 선택될 수 있다. 유일한 경우에는, 그 부모가 선택된다면 이 요소가 선택된다.
+ 此元素僅能被明確選擇,若此元素為其類別中之唯一,則父元素被選擇時,此元素會被選擇。
+ Este elemento sólo se puede seleccionar explícitamente, a menos que sea el único de su clase, en este caso se selecciona si su padre es seleccionado.
+ 当該要素は,明示的にのみ選択される.または,親要素が選択され,
+ これが唯一の選択肢であるときのみに,これは選択される.
+ cet élément ne peut être sélectionné
+qu'explicitement, à moins qu'il ne soit le seul de ce type, auquel cas
+il est sélectionné si son parent a été choisi
+ l'elemento deve essere esplicitamente selezionato, a meno che non sia l'unico del suo genere, nel qual caso è selezionato se è selezionato il genitore
+
+
+
+
+
+
The rules governing the association of declarable elements with
+ individual parts of a TEI text are fully defined in chapter . Only one element of a particular type may have a
+ default attribute with a value of true.
+
+
+
Les règles régissant l'association d'éléments déclarables avec des parties
+ individuelles d'un texte TEI sont entièrement définies
+ au chap1itre . Un seul élément
+ d'un type particulier peut avoir un attribut default avec une valeur
+ true.
+
+
+
Las reglas que gobiernan la asociación de los elementos declarables con las partes individuales de un texto de TEI se definen completamente en el capítulo . Solamente un elemento de un tipo determinado puede tener algún atributo de default con un valor de verdad.
+
+
+
+
+
+ provides attributes for elements which may be independently associated with a particular declarable element within the header, thus overriding the inherited default for that element.
+ 헤더에서 선언 가능한 어떤 요소와 독립적으로 연관될 수 있는 속성을 제공한다. 이를 통해 그 요소의 상속된 기본값은 무효가 된다.
+ 提供元素屬性,這些元素可單獨與標頭中一特定可宣告元素相關連,因此超越該特定元素本身的預設值。
+ TEIヘダーにある特定の宣言可能要素向けの属性を示す.これにより,当該
+ 要素の継承値を上書きすることになる.
+ fournit des attributs pour les éléments qui peuvent
+ être associés indépendamment à un élément particulier déclarable dans l'en-tête TEI, ignorant
+ ainsi la valeur dont cet élément devrait hériter par défaut
+ proporciona atributos a los elementos que pueden ser asociados autonomamente a un elemento determinado declarado en el encabezado, no teniendo en cuenta el default heredato por aquel elemento.
+ assegna attributi agli elementi che possono essere autonomamente associati a un determinato elemento dichiarato nell'intestazione, non tenendo conto del default ereditato per quell'elemento
+
+
+ identifies one or more declarable elements within the
+header, which are understood to apply to the element bearing this
+attribute and its content.
+ 헤더 내의 하나 이상의 declarable elements을 식별하며, 이 속성과 내용을 포함하는 요소에 적용되는 것으로 간주된다.
+ 指明標頭內一個或多個可宣告元素,可應用於帶有此屬性與內容的元素上。
+ TEIヘダーにある,1つ以上の宣言可能要素を示す.
+ 当該属性を持つ要素や内容に適応されると解釈される.
+ identifie un ou plusieurséléments
+ déclarables dans l'en-tête TEI, qui sont destinés à s'appliquer à l'élément
+ portant cet attribut et à son contenu.
+ identifica uno o más elementos declarables al interno del encabezado, los cuales son válidos para el elemento al cual es adscrito el atributo en cuestión y su contenido.
+ identifica uno o più elementi dichiarabili all'interno dell'intestazione,
+i quali sono validi per l'elemento a cui è assegnato l'attributo in questione e il suo contenuto
+
+
+
+
+
The rules governing the association of declarable elements
+with individual parts of a TEI text are fully defined in chapter .
+
+
+
Les règles régissant l'association d'éléments déclarables avec des parties
+ individuelles d'un texte TEI sont entièrement définies au chapitre .
+
+
+
Las reglas que gobiernan la asociación de los elementos declarables con las partes individuales de un texto de TEI se definen completamente en el capítulo .
+
+
+
+ 宣言可能要素の関連性を決める規則については,
+ を参照のこと.
+
+
+
+
+
+
+ provides an attribute for representing
+ fragmentation of a structural element, typically as
+ a consequence of some overlapping hierarchy.
+
+
+ specifies whether or not its parent element is fragmented
+ in some way, typically by some other overlapping structure: for
+ example a speech which is divided between two or more verse
+ stanzas, a paragraph which is split across a page division, a
+ verse line which is divided between two speakers.
+
+
+
+ N
+
+
+ yes
+ the element is fragmented in some (unspecified) respect
+
+
+ no
+ the element is not fragmented, or no claim is made as to its completeness
+
+
+ initial
+ this is the initial part of a fragmented element
+
+
+ medial
+ this is a medial part of a fragmented element
+
+
+ final
+ this is the final part of a fragmented element
+
+
+
+
The values I, M, or F
+ should be used only where it is clear how the element may be
+ be reconstituted.
+
+
+
+
+ provides attributes common to all elements which behave in the same way as divisions.
+ 구역과 동일한 방식으로 처리되는 모든 요소에 공통적인 속성을 제공한다.
+ 提供一組屬性,通用於所有與區段作用相
+ 同的元素。
+ 区分(div, division)に相当する全要素に共通の属性を示す.
+ fournit un jeu d'attributs communs à tous les
+ éléments qui offrent les mêmes caractéristiques que des divisions
+ proporciona un conjunto de atributos comunes a todos los elementos que se comportan como particiones textuales.
+ identifica un insieme di attributi comuni a tutti gli elementi che si comportano come partizioni testuali
+
+
+
+
+
+
+ organization
+ 조직
+ organización
+ organisation
+ organizzazione
+ specifies how the content of the division is organized.
+ 구역 내용이 조직된 방법에 대해 명시한다.
+ 說明該區段內容的組合方式。
+ 当該区分の内容がどのように構成されているかを示す.
+ précise l'organisation du contenu de la division
+ especifica cómo está organizado el contenido de una división textual.
+ specifica come è organizzato il contenuto della partizione testuale
+
+ uniform
+
+
+ no claim is made about the
+ sequence in which the immediate contents of this division
+ are to be processed, or their inter-relationships.
+ 혼합 내용: 즉, 이 구역의 직접적 내용이 처리되는 순서 또는 상호 관련성에 관해 어떠한 주장도 없다.
+ 複合內容:未說明此區段目前內容的處理順序或相互關係。
+ contenido compuesto: es decir no se hace ninguna solicitud sobre la secuencia en la cual el contenido inmediato de esta división debe ser procesado, o en sus interrelaciones.
+ 合成内容.当該区分の内容が処理される順番,すなわち内部関
+ 係には制約がない.
+ aucune déclaration n'est faite quant à l'ordre dans lequel les
+composants de cette division doivent être traités ou bien quant à leurs
+corrélations
+ non viene specificato quale sia l'ordine in cui debbano essere elaborati i contenuti della partizione, né viene indicato il rapporto in cui questi si trovano tra loro
+
+
+ the immediate contents of this
+ element are regarded as forming a logical unit, to be
+ processed in sequence.
+ 통일 내용: 즉, 이 요소의 직접적 내용이 차례대로 처리되는 논리적 단위를 형성하는 것으로 간주된다.
+ 一致內容:此區段目前的內容形成一個邏輯單位,且會依序處理。
+ es decir el contenido inmediato de este elemento se considera integrante de una unidad lógica, para ser procesado en la secuencia.
+ 統一内容.当該区分の内容が処理される際,ひとつの論理的単位を
+ 構成していると見なす.
+
+ contenu uniforme : c'est-à-dire que
+les composants de cet élément sont à considérer comme formant une unité
+logique et doivent être traités dans l'ordre séquentiel
+ contenuto uniforme: i contenuti dell'elemento costituiscono un'unità logica che va elaborata in sequenza
+
+
+
+
+ indicates whether this division is a sample of the
+ original source and if so, from which part.
+ 이 구역이 원본의 표본이며 어떤 부분인지를 나타낸다.
+ 指出此區段是否為來源文件的樣本,若為樣本,則說明出自哪一部分。
+ 当該区分が,元資料のものを含むかどうか,そうであればその場所はど
+ こかを示す.
+
+ indique si cette division est un échantillon de
+ la source originale et dans ce cas, de quelle partie.
+ indica si la división es una muestra de la fuente original y, en ese caso, de que parte de este se trata
+ indica se la partizione è un campione del testo originario e, in tal caso, da quale parte di questo è tratta
+
+ complete
+
+
+ division lacks material present at end in source.
+ 구역이 원본의 후반부에서 제시된 자료가 부족하다.
+ 區段的末端無資料
+ la división falta el material presente en el extremo en la fuente.
+ 当該区分は,元資料の終わりの部分が欠けている.
+
+ par rapport à la source, lacune à la
+fin de la division
+ alla partizione testuale manca del materiale nella parte finale presente nell'originale
+
+
+ division lacks material at start and end.
+ 구역이 초반부와 후반부 자료가 부족하다.
+ 區段的起始與末端無資料
+ el fragmento carece de material al comienzo y al final.
+ 当該区分は,元資料の始めと終わりの部分が欠けている.
+
+ par rapport à la source, lacune au
+début et à la fin de la division
+ alla partizione testuale manca del materiale nella parte iniziale e in quella finale
+
+
+ division lacks material at start.
+ 구역이 초반부 자료가 부족하다.
+ 區段的起始部分無資料
+ el fragmento carece de material en el comienzo.
+ 当該区分は,元資料の始めの部分が欠けている.
+
+ par rapport à la source, lacune au
+début de la division
+ alla partizione manca del materiale nella parte iniziale
+
+
+ position of sampled material within original unknown.
+ 표본 자료의 원본 내의 위치를 알 수 없다.
+ 來源文件中的樣本資料位置不明
+ ubicación del material de muestra dentro del original desconocido.
+ 元資料のどの部分かは不明.
+
+ par rapport à la source, position de
+l'échantillon inconnue
+ la posizione del materiale prelevato dall'originale all'interno di quest'ultimo è sconosciuta
+
+
+ division is not a sample.
+ 구역이 표본이 아니다.
+ 區段非樣本
+ el fragmento no es una muestra.
+ 当該領域は,元資料の一部ではない.
+
+ la division n'est pas un échantillon
+ la partizione testuale non è stata prelevata da alcun originale
+
+
+
+
+
+
+
+
+ provides attributes for use on metadata elements
+ describing the status of a document.
+
+
+ describes the status of a document either currently or, when
+associated with a dated element, at the time indicated.
+
+ draft
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ provides attributes for recording normalized temporal durations.
+ 시간적 지속을 규격화한 녹음에 대한 속성
+ 用於記錄時間長度規格化的屬性
+
+ 正規化された時間幅を示す属性.
+
+ attributs pour enregistrer des durées de temps
+ normalisées
+ attributi per la registrazione di durate temporali normalizzate
+ atributos para registrar un periodo temporal normalizado
+
+
+ duration
+ 지속
+ 時間長度
+ durée
+ durata
+ duración
+ indicates the length of this element in time.
+ 시간선상에서 이 요소의 길이를 나타낸다.
+ 指明此元素的時間長度。
+
+
+ 時間幅を示す.
+
+ indique la longueur de cet élément dans le
+ temps
+ indica la durata nel tempo di tale elemento
+ indica la longitud de este elemento en el tiempo.
+
+
+
+
+
If both when and dur are specified, the
+ values should be interpreted as indicating a span of time by its
+ starting time (or date) and duration. In order to represent a time
+ range by a duration and its ending time the when-iso
+ attribute must be used.
+
In providing a regularized form, no claim
+ is made that the form in the source text is incorrect; the
+ regularized form is simply that chosen as the main form for
+ purposes of unifying variant forms under a single heading.
+
+
+
Si when et dur sont indiqués en même temps, leurs valeurs
+ doivent être interprétées comme indiquant un espace de temps à partir de son heure
+ (ou date) de départ et de sa durée. Afin de représenter une fourchette de temps par
+ une durée et sa fin, l'attribut when-iso doit être employé.
+
En fournissant une forme regularized, il n'est rien affrimé sur
+ la correction ou l'incorrection de la forme dans le texte source ; la forme
+ régularisée est simplement celle qui est choisie comme forme principale afin
+ d'unifier les variantes de forme sous une seule rubrique .
+
+
+
Si ambos, cuando y dur, se especifican, los valores se deben interpretar como indicación de un intervalo de tiempo emtre su hora de salida (o fecha) y la duración. Para representar un intervalo de tiempo por su duración y su conlusión se debe emplear atributo cuando-ISO.
+ el atributo debe ser utilizado.
+
Para proporcionar una forma regularizada, no se hace ninguna declaración sobre que la forma en el texto original sea incorrecta; la forma regularizada es simplemente elegida como la forma principal con el fin de la unificación de las formas variables bajo el título.
+
+
+
+
+
+
+ provides attributes for recording normalized temporal durations.
+ 규격화된 시간적 지속을 기록하기 위한 속성
+ 記錄時間長度規格化的屬性
+ 正規化された時間幅を記す属性.
+ attributs pour l'enregistrement de durées temporelles normalisées.
+ attributi per registrare durate temporali normalizzate
+ atributos para registrar duraciones de tiempo normalizadas.
+
+
+ duration
+ 지속 기간
+ 時間長度
+ durée
+ durata
+ duración
+ indicates the length of this element in time.
+ 시간에서 이 요소의 길이를 나타낸다.
+ 指出此元素的時間長度。
+ 当該時間の長さを示す.
+ indique la longueur de cet élément dans le temps
+ indica la durata nel tempo dell'elemento
+ indica la longitud de este elemento en el tiempo.
+
+
+
+
+
If both when and dur or dur-iso are specified, the values should be interpreted as indicating a span of
+ time by its starting time (or date) and duration. In order to represent a time range by a duration and its ending time the
+ when-iso attribute must be used.
+
In providing a regularized form, no claim is made that the form in the source text is incorrect; the regularized form
+ is simply that chosen as the main form for purposes of unifying variant forms under a single heading.
+
+
+
Si les attributs when-iso et dur ou dur-iso sont tous les deux spécifiés, les valeurs doivent être
+ interprétées comme indiquant un intervalle de temps au moyen de son point de départ (ou date) et de sa durée. Afin de représenter une
+ étendue temporelle par sa durée et sa fin on doit utiliser l'attribut when-iso.
+
En fournissant une forme "régularisée", il n'est rien affirmé sur la correction ou l'incorrection de la forme dans le
+ texte source ; la forme régularisée est simplement celle qui est choisie comme forme principale afin de réunir les variantes de forme sous
+ une seule rubrique.
+
+
+
+
+
+
+
+ provides attributes for normalization of elements that contain datable events.
+ 날짜를 정할 수 있는 사건을 포함하는 요소의 규격화를 위한 속성을 제공한다.
+ 提供用於元素規格化的屬性,這些元素包含日期明確的事件。
+
+ 時間事象を含む要素の正規化手法を表す属性を示す.
+
+ fournit des attributs pour la normalisation des
+ éléments qui contiennent des mentions d'événements datables
+ indica degli attributi per la normalizzazione di elementi che contengono eventi databili
+ proporciona atributos para la normalización de elementos que contienen eventos datables
+
+
+
+
+
+
This superclass provides attributes that
+ can be used to provide normalized values of temporal information.
+ By default, the attributes from the att.duration.w3c class are provided. If the
+ module for names & dates is loaded, this class also provides
+ attributes from the att.duration.iso
+ class. In general, the possible values of attributes restricted to
+ the W3C datatypes form a subset of those values available via the
+ ISO 8601 standard. However, the greater expressiveness of the ISO
+ datatypes is rarely needed, and there exists much greater software
+ support for the W3C datatypes.
+
+
+
Cettesuperclasse fournit des attributs qui peuvent être employés
+ pour fournir des valeurs normalisées d'information relative au temps. Par défaut,
+ les attributs de la classe att.duration.w3c sont
+ fournis. Si le module pour les noms et dates est chargé, cette classe fournit
+ également des attributs de la classeatt.duration.iso. En
+ général, les valeurs possibles des attributs limitées aux types de données W3C
+ forment un sous-ensemble des valeurs que l'on trouve dans la norme ISO 8601.
+ Cependant, il est rarement nécessaire de recourir aux possibilités très étendues des
+ types de données de l'ISO, il existe en effet une bien plus grande offre logicielle
+ pour le traitement des types de données W3C.
+
+
+
Esta superclase proporciona atributos que se pueden utilizar para proporcionar los valores normalizados de la información temporal.
+ Por defecto, los atributos de la clase att.duration.w3c son proporcionados. Si el módulo para los nombres y las fechas se activa, esta clase también proporciona atributos para la clase att.duration.iso
+. En general, los valores posibles de los atributos son los restringidos por la forma de los datatypes de W3C, un subconjunto de esos valores disponibles vía el estándar de ISO 8601. Sin embargo, la mayoría de expresiones de los datatypes de ISO se necesitan raramente, y existe software de soporte para los datatypes de W3C.
+
+
+ provides attributes indicating the agent
+ responsible for some aspect of the text, the markup or
+ something asserted by the markup, and the degree of certainty
+ associated with it.
+
+
+
+
+
+ certainty
+ 확실성
+ certeza
+ certitude
+ certezza
+ signifies the degree of certainty associated with the intervention or interpretation.
+ 간섭 또는 해석과 연관된 확실성의 정도를 나타낸다.
+ 表示該更動或詮釋的相關正確度。
+ 当該解釈や調整の確信度を示す.
+ donne le degré de certitude associée à l'intervention
+ ou à l'interprétation.
+ significa el grado de certeza asociado con la
+ intervención o la interpretación.
+ corrisponde al grado di certezza associato
+ all'intervento o interpretazione
+
+
+
+
+
+ responsible party
+ 책임 당사자
+ parte responsable
+ responsable
+ responsabile
+ indicates the agency responsible for the intervention or interpretation, for example an
+ editor or transcriber.
+ 편집자 또는 전사자와 같이 또는 해석에 대한 책임이 있는 대리인을 나타낸다.
+ 指出負責該更動或詮釋的代理者,例如編輯或轉錄者。
+ 当該解釈や調整の責任者を示す.例えば,編集者,翻訳者など.
+ indique l'agent responsable de l'intervention ou de
+ l'interprétation, par exemple un éditeur ou un transcripteur.
+ indica el agente responsable de la intervención o la
+ interpretación, p.ej. un editor o un transcriptor.
+ indica il responsabile dell'intervento o
+ interpretazione, per esempio un curatore o trascrittore
+
+
+
Note that a simple resp pointing to a person or
+ organization is likely to be somewhat ambiguous with regard
+ to the nature of the responsibility. For this reason, we
+ recommend that resp be used to point not to an agent
+ (person or org) but to a respStmt,
+ author, editor or similar
+ element which clarifies the exact role played by the agent.
+ Pointing to multiple respStmts allows the encoder to specify
+ clearly each of the roles played in part of a TEI file (creating,
+ transcribing, encoding, editing, proofing etc.).
+
+
+
+
+
+ Blessed are the
+ placemakerspeacemakers: for they shall be called the children of God.
+
+
+
+
+
+
+ Punkes, Panders, baſe extortionizing
+ slanues,
+
+
+
+
+
+ Transcriber
+ Janelle Jenstad
+
+
+
+
+
+
+
+
+
+
+
+
+ provides attributes describing the nature of an encoded scholarly intervention or
+ interpretation of any kind.
+ 어떤 유형의 부호화된 학문적 간섭 또는 해석의 특성을 기술하는 속성을 제공한다.
+ 提供屬性,描述任何已標記的學者更正或詮釋的性質。
+ 学術的調整・解釈の性質を表す属性を示す.
+ fournit des attributs décrivant la nature d'une
+ intervention savante encodée ou de tout autre interprétation.
+ proporciona atributos que describen la naturaleza de una
+ intervención crítica codificada o una interpretación de cualquier tipo.
+ assegna degli attributi che descrivono il carattere di un
+ intervento critico codificato o interpretazione di altro tipo
+
+
+
+
+
+
+ indicates the nature of the evidence supporting the reliability or accuracy of the
+ intervention or interpretation.
+ 간섭 또는 해석의 신뢰성 또는 정확성을 지지하는 증거의 특성을 나타낸다.
+ 指出支持該更動或詮釋可信度或正確性的證明
+ 当該解釈や調整の信頼度や正確さを判断する証拠を示す.
+ indique la nature de la preuve attestant la fiabilité
+ ou la justesse de l'intervention ou de l'interprétation.
+ indica la naturaleza de las pruebas que sostienen la
+ fiabilidad o precisión de la intervención o interpretación.
+ indica il carattere delle prove a sostegno
+ dell'affidabilità o accuratezza dell'intervento o interpretazione
+
+
+
+ there is internal evidence to support the intervention.
+ 간섭을 지지하는 내부 증거가 있다.
+ 有內部證明得以支持
+ 当該調整を判断する内部証拠を示す.
+ l'intervention est justifiée par une preuve
+ interne
+ existen pruebas internas que sostienen la
+ intervención.
+ esistono prove interne a sostegno
+ dell'intervento
+
+
+ there is external evidence to support the intervention.
+ 간섭을 지지하는 외부 증거가 있다.
+ 有外部證明得以支持
+ 当該調整を判断する外部証拠を示す.
+ l'intervention est justifiée par une preuve
+ externe
+ existen pruebas externas que sostienen la
+ intervención.
+ esistono prove interne a sostegno
+ dell'intervento
+
+
+ the intervention or interpretation has been made by the editor, cataloguer, or
+ scholar on the basis of their expertise.
+ 간섭 또는 해석이 편집자, 또는 전문성에 근거한 학자에 의해 수행되었다.
+ 編輯、編目者或學者根據自身的專業來執行該更動或詮釋。
+ 編集者,カタログ作成者,研究者による解釈や調整.
+ l'intervention ou l'interprétation a été faite
+ par le rédacteur, le catalogueur, ou le chercheur sur la base de leur expertise.
+ la intervención o interpretación ha sido hecho
+ por el editor, catalogador o crítico en base a su experiencia.
+ l'intervento o interpretazione è stata effettuata
+ dal curatore, catalogatore o critico in base alla loro esperienza
+
+
+
+
+ indicates whether this is an instant revision or not.
+
+ false
+
+
+
+
The members of this attribute class are typically used to represent any kind of editorial
+ intervention in a text, for example a correction or interpretation, or to date or localize
+ manuscripts etc.
+
+
Each pointer on the source (if present)
+ corresponding to a witness or witness group should reference a bibliographic citation such as a witness, msDesc, or bibl element, or another external bibliographic citation, documenting the source concerned.
+
+
Les membres de cette classe d'attributs sont couramment employés pour représenter tout type
+ d'intervention éditoriale dans un texte, par exemple une correction ou une interprétation, ou
+ bien une datation ou une localisation de manuscrit, etc.
+
+
+
los miembros de esta clase de atributo se usan normalmente para representar cualquier tipo de
+ intervención editorial en un texto, por ejemplo una corrección, una interpretación, la fecha o
+ incluso la signatura de los manuscritos etc.
+
+
+
+
+
+
+
+
+ provides rendering attributes common to all elements in the TEI encoding scheme.
+
+
+
+
+
+
+
+
+
+ rendition
+ 번역
+ interpretación
+ interprétation
+ resa
+ indicates how the element in question was rendered or presented in the source text.
+ 문제의 요소가 원본 텍스트에 제시된 방법을 나타낸다.
+ 指出該元素如何呈現於來源文件中
+ 当該要素が,元資料でどのように表示されていたかを示す.
+ indique comment l'élément en question a été rendu ou
+ présenté dans le texte source
+ indica cómo el elemento en cuestión ha sido dado o
+ proporcionado en el texto fuente.
+ indica come l'elemento in questione è stato reso o
+ rappresentato nel testo originario
+
+
+
+ To The Duchesse of Newcastle,
+ On Her New Blazing-World.
+
+
+
+
+
+ épître dédicatoireà Monsieur de Coucy
+ .
+
+
+
+
These Guidelines make no binding recommendations for the values of the rend
+ attribute; the characteristics of visual presentation vary too much from text to text and
+ the decision to record or ignore individual characteristics varies too much from project
+ to project. Some potentially useful conventions are noted from time to time at appropriate
+ points in the Guidelines. The values of the rend attribute are a set of
+ sequence-indeterminate individual tokens separated by whitespace.
+
+
+
Ces Principes directeurs ne font aucune recommandation contraignante pour les valeurs de
+ l'attribut rend; les caractéristiques de la présentation visuelle changent trop
+ d'un texte à l'autre et la décision d'enregistrer ou d'ignorer des caractéristiques
+ individuelles est trop variable d'un projet à l'autre. Quelques conventions
+ potentiellement utiles sont notées de temps en temps à des points appropriés dans ces
+ Principes directeurs.
+
+
+
Estas guías de consulta no hacen ninguna recomendación obligatoria para los valores del
+ atributo rend; las características de la presentación visual varían demasiado
+ de texto a texto y la decisión para registrar o para omitir características individuales
+ varía demasiado de proyecto a proyecto. Observar algunas convenciones que puedan resultar
+ útiles en los puntos indicados en las guías de consulta.
+
+
+
+ contains an expression in some formal style definition language
+which defines the rendering or presentation
+used for this element in the source text
+
+
+
+ To The Duchesse of Newcastle, On Her
+ New Blazing-World.
+
+
+
+
Unlike the attribute values of rend, which uses whitespace as a separator, the style attribute may contain whitespace. This attribute is intended for recording inline stylistic information concerning the
+source, not any particular output.
+
The formal language in which values for this attribute are expressed may be specified using the styleDefDecl element in
+the TEI header.
+
+
+
+ points to a description of the rendering or presentation used for this element in the
+ source text.
+ 원본 텍스트에서 이 요소에 대해 사용된 모양과 제시에 대한 기술을 가리킨다.
+ indica una descripción de la representación o de la
+ presentación empleada para este elemento en el texto original.
+ 当該要素が示す表現が現れている,元資料のテキスト部分を示す.
+ pointe vers une description du rendu ou de la
+ présentation utilisés pour cet élément dans le texte source
+ indica una descrizione della resa o della
+ presentazione utilizzate per tale elemento nel testo di partenza
+
+
+
+ To The Duchesse of Newcastle, On Her
+ New Blazing-World.
+
+ font-variant: small-caps
+ font-variant: normal
+ text-align: center
+
+
+
+
+ épître dédicatoire à Monsieur de Coucy
+
+ font-variant: uppercase
+ text-align: center
+
+
+
+
The rendition attribute is used in a very similar way to the class
+ attribute defined for XHTML but with the important distinction that its function is to
+ describe the appearance of the source text, not necessarily to determine how that text
+ should be presented on screen or paper.
+
Where both rendition and rend are supplied, the latter is
+ understood to override or complement the former.
+
Each URI provided should indicate a rendition element defining the intended
+ rendition in terms of some appropriate style language, as indicated by the
+ scheme attribute.
+
+
+
L'attribut rendition est employé à peu près de la même manière que l'attribut
+ class défini pour XHTML mais avec cette sérieuse différence que sa fonction
+ est de décrire la présentation du texte source mais pas nécessairement de déterminer
+ comment ce texte doit être représenté à l'écran ou sur le papier.
+
Où rendition et rend sont donnés ensembles, il faut comprendre que
+ le dernier remplace ou complète le premier.
+
Chaque URI fourni doit indiquer un élément rendition définissant le rendu prévu
+ dans les termes d'un langage approprié pour définir les styles, comme indiqué par
+ l'attribut scheme.
+
+
+
El atributo rendition (interpretación) se utiliza en una manera muy similar al
+ atributo clase definido por XHTML pero con una diferencia importante: que su
+ función es describir el aspecto del texto original, no necesariamente para determinar la
+ presentación visual de ese texto en la pantalla o el papel.
+
Donde ambos interpretación y rend se dan, este último se emplea
+ para reemplazar o para complementar el anterior.
+
Cada URI proporcionado debe indicar al elemento interpretación que define la
+ interpretación prevista en términos de cualquier lenguaje apropiado del estilo, según lo
+ indicado por el atributo scheme (esquema).
+
+
+
+
+
+
+
+
+
+ provides attributes common to all elements in the TEI encoding scheme.
+ TEI 부호화 스키마의 모든 요소에 공통 속성을 제공한다.
+ 提供一組屬性,通用於TEI編碼標準中的所有元素。
+ TEI符号化スキーム中の全要素に共通する属性を示す.
+ fournit un jeu d'attributs communs à tous les éléments
+ dans le système de codage TEI.
+ proporciona un conjunto de atributos común a todos los
+ elementos del esquema de codificación TEI.
+ stabilisce un insieme di attributi comuni a tutti gli
+ elementi dello schema di codifica TEI
+
+
+
+
+
+
+
+
+
+
+ identifier
+ 확인소
+ identificador
+ identifiant
+ identificatore
+ provides a unique identifier for the element bearing the attribute.
+ 속성을 포함하는 요소에 대한 고유한 확인소를 제공한다.
+ 提供一個獨特識別符碼,識別帶有該屬性的元素。
+ 当該要素にユニークな識別子を示す.
+ fournit un identifiant unique pour l'élément qui
+ porte l'attribut
+ proporciona un identificador único para el elemento
+ al cual se asocia el atributo.
+ assegna un identificatore unico all'elemento a cui è
+ associato l'attributo
+
+
+
The xml:id attribute may be used to specify a canonical reference for an
+ element; see section .
+
+
+
L'attribut xml:id peut être employé pour indiquer une référence canonique pour
+ un élément ; voir la section.
+
+
+
El atributo xml:id se puede utilizar para especificar una referencia canónica
+ para un elemento; ver la sección .
+
+
+
当該属性xml:idは,属性の指示対象を示している.詳細 はを参照のこと.
+
+
+
+ number
+ 수
+ número
+ nombre
+ numero
+ gives a number (or other label) for an element, which is not necessarily unique within
+ the document.
+ 요소의 번호(또는 다른 표지)를 제시하며, 문서 내에서 반드시 고유값일 필요는 없다.
+ 將元素標上一個數字 (或其他標號),該標號在文件中未必是獨特的。
+ 要素に数値やラベルを与える.これは当該文書中でユニークである必要 はない.
+ donne un nombre (ou une autre étiquette) pour un
+ élément, qui n'est pas nécessairement unique dans le document TEI.
+ proporciona un número (u otra etiqueta) a un elemento
+ que no es necesariamente único en el documento.
+ assegna un numero (o altra etichetta) a un elemento
+ che non è necessariamente unico all'interno del documento
+
+
+
The value of this attribute is always understood to be a single token, even if it contains space or other punctuation characters, and need not be composed of numbers only. It is typically used to specify the numbering of chapters, sections,
+ list items, etc.; it may also be used in the specification of a standard reference system
+ for the text.
+
+
+
L'attribut n peut être employé pour indiquer la numérotation de chapitres,
+ sections, items de liste, etc. ; il peut également être employé dans les spécifications
+ d'un système standard de référence pour le texte.
+
+
+
El atributo n se puede utilizar para especificar la enumeración de los
+ capítulos, de las secciones, de los items de una lista, etc.; puede también ser utilizado
+ en la especificación de un sistema de referencia estándar para el texto.
+
+
+
+ language
+ 언어
+ lengua
+ langue
+ lingua
+ indicates the language of the element content using a tag generated
+ according to BCP 47.
+ BCP 47에 따라 생성된
+ tag를 사용하는 요소 내용의 언어를 나타낸다.
+ 使用RFC3066的代碼,指出該元素內容的使用語言
+ 当該要素の内容で使用されている言語を, BCP 47
+ に準拠して作られたタグで示す.
+ indique la langue du contenu de l'élément en
+ utilisant les codes du RFC 3066
+
+ indica la lengua del contenido del elemento
+ utilizando los códigos extraídos de RFC
+ 3066
+
+ indica la lingua del contenuto dell'elemento
+ utilizzando i codici tratti da RFC
+ 3066
+
+
+
+
+
… The consequences of
+ this rapid depopulation were the loss of the last
+ ariki or chief
+ (Routledge 1920:205,210) and their connections to
+ ancestral territorial organization.
+
+
+
+
The xml:lang value will be inherited from the immediately
+enclosing element, or from its parent, and so on up the document hierarchy.
+It is generally good practice to specify xml:lang at the highest
+appropriate level, noticing that a different default may be needed for the
+teiHeader from that needed for the associated resource element or elements,
+and that a single TEI document may contain texts in many languages.
+
The authoritative list of registered language subtags is maintained by IANA and
+ is available at .
+ For a good general overview of the construction of language tags, see
+ , and for
+ a practical step-by-step guide, see
+ .
+
The value used must conform with BCP 47. If the value is a
+ private use code (i.e., starts with x- or contains
+ -x-), a language element with a matching
+ value for its ident attribute should be supplied in
+ the TEI header to document this value. Such documentation may
+ also optionally be supplied for non-private-use codes, though
+ these must remain consistent with their
+ IETFInternet Engineering Task
+ Force definitions.
+
+
+
Si aucune valeur n'est indiquée pour xml:lang, la valeur de
+ l'attributxml:lang de l'élément immédiatement supérieur est héritée ; c'est
+ pour cette raison qu'une valeur devrait toujours être attribuée à l'élément du plus haut
+ niveau hiérarchique (TEI).
+
La valeur doit être conforme au BCP 47. Si la
+ valeur est un code d'usage privé (c'est-à-dire commence par x- ou contient
+ -x-), il devrait correspondre à la valeur d'un attribut ident d'un élément language fourni dans l'en-tête TEI du document courant.
+
+
+
Si no se especifica ningún valor para xml:lang, el valor de xml:lang para el elemento inmediatamente englobado, se hereda; por esta razón, un valor
+ se debe especificar siempre en el elemento exterior (TEI).
+
+
+
+
+
+
+ provides a base URI reference with which applications can resolve relative URI
+ references into absolute URI references.
+ 애플리케이션이 상대 URI 참조를 절대 URI 참조로 해결할 수 있게 해 주는 기본 URI
+ 참조를 제공한다.
+ 提供一個基礎統一資源識別符 (URI)
+ 參照,可將相對統一資源識別符參照轉變為絕對統一資源識別符參照。
+ 相対URIから絶対URIを構成する際に必要なベースURIを示す.
+ donne une référence URI de base au moyen de laquelle
+ les applications peuvent résoudre des références d'URI relatives en références d'URI
+ absolues
+ proporciona una referencia URI de base gracias a la
+ aplicación eventual de la cual pueden analizarse tanto referencias URI relativas como
+ referencias URI absolutas.
+ assegna un riferimento URI di base grazie al quale
+ eventuali applicazioni possono analizzare riferimenti URI relativi come riferimenti URI
+ assoluti
+
+
+
+
+ Bibliography
+
+
+
+ Landon, Letitia Elizabeth
+
+
+ The Vow of the Peacock
+
+
+
+
+ Compton, Margaret Clephane
+
+
+ Irene, a Poem in Six Cantos
+
+
+
+
+ Taylor, Jane
+
+
+ Essays in Rhyme on Morals and Manners
+
+
+
+
+
+
+
+
+
+ La Renaissance italienne, bibliographie sélective
+
+
+
+ Michel Hochmann, ...
+
+
+ L’Abcdaire de la Renaissance italienne
+
+
+
+
+ Thames et Hudson,
+
+
+ Dictionnaire de la Renaissance
+
+
+
+
+ Hervé Loilier
+
+
+ Florence : voyage dans la Renaissance italienne du XVe siècle
+
+
+
+
+ Linda Murray
+ La Haute Renaissance et le Maniérisme
+
+
+
+
+
+
+
+
+ signals an intention about how white space should be
+ managed by applications.
+ signale que les applications doivent préserver
+ l'espace blanc
+ señala la voluntad de hacer que el espaciado sea preservado por cualquier aplicación.
+ segnala la volontà di far sì che la spaziatura sia mantenuta da qualsivoglia applicazione.
+ 空白文字類をアプリケーションがどう解釈するかを示す.
+
+
+
+ signals that the application's default white-space processing modes are acceptable
+
+
+ indicates the intent that applications preserve all white space
+
+
+
+
The XML
+ specification provides further guidance on the use of this
+ attribute. Note that many parsers may not handle xml:space correctly.
+
+
+
+
+
+
+
+ provides attributes describing aspects of the hand in which a
+ manuscript is written.
+ 원고가 쓰여진 필적의 측면을 기술하는 속성을 제공한다.
+ proporciona atributos que describen los aspectos de la mano que ha escrito un manuscrito.
+
+ 手書き資料の筆致に関する情報を表す情報を示す.
+
+ fournit des attributs décrivant les caractéristiques
+de la main par laquelle un manuscrit est écrit.
+ indica degli attributi che descrivono aspetti delle mano utilizzata per la scrittura del manoscritto
+
+
+ gives a name or other identifier for the scribe
+believed to be responsible for this hand.
+ 이 필적에 대한 책임이 있다고 간주되는 필기사에 대한 표준명 또는 다른 확인소를 제시한다.
+
+ 当該筆致に対応すると十分に信じられる筆写者の一般的な名前または識
+ 別子を示す.
+
+ donne un nom normalisé ou un autre
+identifiant pour le scribe reconnu comme responsable de cette main.
+ assegna un nome o altro identificatore standard al trascrittore che si ritiene corrisponda alla mano in questione
+ asigna un nombre u otro identificador estándard para el transcriptor que se identifica con la mano en cuestión.
+
+
+
+
+ points to a full description of the scribe concerned, typically supplied by a person element
+ elsewhere in the description.
+
+
+
+ characterizes the particular script or writing style used by
+this hand, for example secretary, copperplate, Chancery, Italian, etc.
+ secretary, copperplate, Chancery, Italian 등과 같이 이 필적으로 사용된 특별한 필사본 또는 글쓰기 스타일의 특성을 기술한다.
+
+ 当該筆致で使用されている特定の筆体や書記スタイルの特徴を示す.例
+ えば,secretary(書記官スタイル),
+ copperplate(銅板スタイル),
+ Chancery(公文書スタイル),
+ Italian(イタリアスタイル)など.
+
+ caractérise la calligraphie ou le style
+ d'écriture particuliers utilisés par cette main, par exemple écriture anglaise,
+ de chancellerie, italienne, etc.
+ caratterizza un determinato stile di scrittura utilizzato dalla mano in questione, per esempio
+segretario, incisione su rame, Chancery, italiano, ecc.
+ caracteriza un determinado estilo de escritura utilizado por la mano en cuestión, p.ej.
+secretario, grabado sobre cobre, cancelleresco, italiano, etc.
+
+
+
+ points to a full description of the script or writing style used by
+this hand, typically supplied by a scriptNote element
+ elsewhere in the description.
+
+
+
+ describes the tint or type of ink, e.g. brown, or other
+writing medium, e.g. pencil
+
+ brown와 같이 잉크의 색 또는 유형, 또는 pencil와 같이 글쓰기 방식 기술한다.
+
+ インクの種類や色合い,例えば,茶色
+ や,筆記具の種類,例えば,鉛筆など.
+
+ décrit la teinte ou le type d'encre, par
+ exemple brune, ou un autre outil d'écriture, par exemple un crayon.
+ descrive la tinta o il tipo di inchiostro, per esempio marrone, o altri strumenti di scrittura, per esempio matita
+
+ describe la tinta o el tipo de tinta, p.ej. marrón, u otros instrumentos de escritura, p.ej. lápiz.
+
+
+
+ specifies how widely this hand is used in the manuscript.
+ 이 필적이 원고에서 사용된 범위를 명시한다.
+
+ 当該筆致が,当該手書き資料中で,どの程度出現しているかを示す.
+
+ Spécifie la fréquence d'apparition de cette
+main dans le manuscrit.
+ specifica in quale misura è utilizzata la mano in questione nel manoscritto
+ especifica en qué medida es utilizada la mano en el manuscrito.
+
+
+
+ only this hand is used throughout the manuscript
+ 이 필적만이 원고 전체에 사용되었다.
+
+ 当該筆致だけで全てが書かれている.
+
+ il n'y a que cette main dans le
+manuscrit.
+ unica mano utilizzata nel manoscritto
+ al interno del manuscrito se utiliza sólo esta mano.
+
+
+ this hand is used through most of the manuscript
+ 이 필적이 원고 대부분에서 사용되었다.
+
+ 当該筆致で,殆どが書かれている.
+
+ cette main est utilisée dans la
+majeure partie du manuscrit.
+ mano utilizzata nella maggior parte del manoscritto
+ esta es la mano que se utiliza en la mayor parte del manuscrito.
+
+
+ this hand is used occasionally in the manuscript
+ 이 필적이 원고에서 가끔 사용되었다.
+
+ 当該筆致で,所々が書かれている.
+
+ cette main est utilisée
+occasionnellement dans le manuscrit.
+ mano utilizzata solo di rado nel manoscritto
+ esta mano se usa sólo ocasionalmente en el manuscrito.
+
+
+
+
+
+
Usually either script or scriptRef,
+and similarly, either scribe or
+scribeRef, will be supplied.
+
+
+
+
+
+ provides attributes for specifying the type of a computer
+ resource using a standard taxonomy.
+ 표준 분류법을 사용하는 컴퓨터 자원의 유형을 명시하는 속성을 제시한다.
+
+ 標準的な用語による計算機資源の種類を表す属性を示す.
+
+ fournit des attributs pour spécifier le type de
+ressource informatique selon une taxinomie normalisée.
+ indica degli attributi che specificano il tipo di risorsa informatica utilizzando una tassonomia standard
+ atributos para registrar un periodo temporal normalizado
+
+
+ MIME media type
+ MIME 매체 유형
+ Tipo de media del MIME
+ type de média MIME
+ specifies the applicable multimedia internet mail extension (MIME) media type
+ 적용 가능한 다중매체 인터넷 메일 확장자(MIME) 매체 유형을 명시한다.
+
+ 当該データのMIMEタイプ.
+ spécifie le type MIME (multipurpose internet mail extension) applicable.
+ specifica il tipo MIME appropriato
+ El tipo de MIME
+ MIME協定種類
+
+
+
+
+
In this example mimeType is used to indicate that the URL points to a TEI XML file encoded in UTF-8.
+
+
+
+
+
+
This attribute class provides an attribute for describing a
+ computer resource, typically available over the internet,
+ using a value taken from a standard taxonomy. At present only a single
+ taxonomy is supported, the Multipurpose Internet Mail Extensions
+ (MIME) Media Type system. This typology of media types is
+ defined by the Internet Engineering Task Force in RFC 2046. The
+ list of
+ types is maintained by the Internet Assigned Numbers
+ Authority (IANA). The mimeType attribute must have a value taken from this list.
+
+
+
Cette classe d'attributs fournit des attributs pour décrire une ressource
+ informatique, en général disponible sur internet, selon les taxinomies normalisées.
+ Actuellement une seule taxinomie est reconnue : le système "Multipurpose Internet
+ Mail Extensions Media Type". Ce système de typologie des types de média est définie
+ par l'Internet Engineering Task Force dansRFC 2046. La liste des types
+ est maintenue par l'Internet Assigned Numbers Authority.
+
+
+
Esta clase de atributo proporciona los atributos para describir un recurso del ordenador, típicamente disponibles en Internet, según las taxonomías estándar. Solamente una única taxonomía se utiliza actualmente, el sistema Multipurpose Internet Mail Extensions
+ Media Type. Este sistema de tipología de los tipos de media es definido por el Internet Engineering Task Force RFC 2046.
+ . La lista de tipos es mantenida por el Internet Assigned Numbers Authority.
+
+
+ provides attributes for specifying display and related properties of
+ external media.
+
+
+
+
+
+ Where the media are displayed, indicates the display width
+
+
+
+ Where the media are displayed, indicates the display height
+
+
+
+ Where the media are displayed, indicates a scale factor to
+ be applied when generating the desired display size
+
+
+
+
+ provides attributes by which a resource (such as an externally
+ held media file) may be located.
+
+
+ uniform resource locator
+ 표준 원본 위치 지정소
+ localizador de recurso uniforme
+ adresse URL
+ URL (localizzatore universale di risorse)
+ specifies the URL from which the media concerned may be obtained.
+
+
+
+
+ provides attributes for elements which represent a formal analysis or interpretation.
+ 형식적 분석 또는 해석을 표상하는 요소의 속성을 제공한다.
+ 提供元素的屬性,這些元素代表一正式分析或詮釋。
+ 形式的分析や解釈を示す要素に付与される属性を示す.
+ fournit les attributs pour des éléments qui exposent une
+ analyse ou une interprétation formelles.
+ proporciona atributos para elementos que represental un análisis o interpretación formal.
+ assegna degli attributi agli elementi che rappresentano un'analisi o un'interpretazione formali
+
+
+
+
+
+ indicates what kind of phenomenon is being noted in the passage.
+ 현 단락에 표기되고 있는 현상의 종류를 나타낸다.
+ 指出段落中所註解的現象類別。
+ 当該部分で,どのような面が指摘されているのかを示す.
+ indique quel genre de phénomène est noté dans le
+ passage.
+ indica que tipo de fenómeno está siendo anotado en el pasaje.
+ indica quale sia il fenomeno osservato nella porzione di testo in questione
+
+
+
+ identifies an image in the passage.
+ 단락에서 이미지를 식별한다.
+ 標明段落中的影像。
+ identifica una imagen en el pasaje.
+ 当該部分の画像を指示する.
+ identifie une image dans le passage.
+ identifica un'immagine all'interno della porzione di testo
+
+
+ identifies a character associated with the passage.
+ 단락과 연관된 문자를 식별한다.
+ 標明與段落相關聯的人物。
+ identifica un carácter asociado al pasaje.
+ 当該部分に関連する文字を指示する.
+ identifie un personnage associé au
+passage.
+ identifica un personaggio associato al brano in questione
+
+
+ identifies a theme in the passage.
+ 단락에서 주제를 식별한다.
+ 標明段落中的主題。
+ identifica un tema en el pasaje.
+ 当該部分にあるテーマを指示する.
+ identifie un thème dans le passage.
+ identifica un tema rispetto al brano in questione
+
+
+ identifies an allusion to another text.
+ 다른 텍스트에 대한 언급을 식별한다.
+ 標明另一個文本的引用。
+ identifica una alusión a otro texto.
+ 別テキストへの言及.
+ identifie une allusion à un autre
+texte.
+ identifica un'allusione a un altro testo
+
+
+
+
+ instances
+ 실례
+ ejemplos
+ cas
+ casi
+ points to instances of the analysis or interpretation represented
+by the current element.
+ 현 요소에 의해 표상된 분석 또는 해석의 실례를 가리킨다.
+ 連結到目前元素所代表的分析或解釋。
+ 当該要素で示されている分析や解釈の実体を示す.
+ pointe vers les instances de l'analyse ou de
+ l'interprétation représentées par l'élément courant.
+ indica ejemplos de análisis o interpretaciones representadas por el elemento corriente
+ indica esempi di analisi o interpretazione rappresentati dall'elemento corrente
+
+
+
The current element should be an analytic one. The element
+ pointed at should be a textual one.
+
+
+
L'élément courant doit être analytique. L'élément pointé doit être textuel.
+
+
+
+
El elemento actual debe ser analítico. El elemento señalado debe ser textual.
+
+
+
当該要素は,分析的なものであるべき.参照されている要素は,
+ テキストであるべき.
+
+
+
+
+
+
+
+
+ provides attributes to represent a regularized or normalized measurement.
+ 정상화 또는 규격화된 측정 방식을 표상하는 속성을 제시한다.
+ 提供屬性,代表一般化或規格化的度量。
+ 正規化単位を表す属性を示す.
+
+ donne des attributs pour représenter une mesure
+ régularisée ou normalisée.
+ proporciona atributos que representen una medición regularizada o normalizada.
+ assegna degli attributi che rappresentano una misurazione regolarizzata o normalizzata
+
+
+ unité
+ indicates the units used for the measurement, usually
+ using the standard symbol for the desired units.
+ 측정에 사용된 단위를 나타내며, 일반적으로 요구 단위에 대한 표준 기호를 사용한다.
+ 指出度量單位,通常以標準符號表示
+ 一般には標準記号により,計測単位を示す.
+ indique les unités de mesure utilisées ; il
+ s'agit en général du symbole normalisé pour les unités dont on a besoin.
+ indica las unidades usadas para la medición, normalmente utilizando el símbolo estándard para la unidad de medición en cuestión.
+ indica le unità impiegate per la misurazione, generalmente utilizzando il simbolo standard per l'unità di misura in questione
+
+
+
+
+ metre
+ 미터
+ 公尺
+ mètre
+ metro
+ metro
+ SI base unit of length
+ 길이의 SI 기본 단위
+ SI基礎長度單位
+ メータ.長さを示す国際単位系.
+ unité SI (système international) de longueur
+ unidad de medida de la longitud
+ unità di misura della lunghezza
+
+
+ kilogram
+ 킬로그램
+ 公斤
+ kilogramme
+ chilogrammo
+ kilogramo
+ SI base unit of mass
+ 분량의 SI 기본 단위
+ SI基礎質量單位
+ キログラム.重さを示す国際単位系.
+ unité SI de masse
+ unidad de medida de la masa
+ unità di misura della massa
+
+
+ second
+ 초
+ 秒
+ seconde
+ secondo
+ segundo
+ SI base unit of time
+ 시간의 SI 기본 단위
+ SI基礎時間單位
+ 秒.時間を示す国際単位系.
+ unité SI de temps
+ unidad de medida del tiempo
+ unità di misura del tempo
+
+
+
+
+
+
+
+
+
+ hertz
+ 헤르츠
+ 赫茲
+ hérzio
+ SI unit of frequency
+ 주파수의 SI 단위
+ SI頻率單位
+ ヘルツ.周波数を示す国際単位系.
+ unité SI de fréquence
+ unidad de medida de la frecuencia
+ unità di misura della frequenza
+
+
+
+ pascal
+ 파스칼
+ Pascal
+ PASCAL
+ SI unit of pressure or stress
+ 압력 또는 강도의 SI 단위
+ SI壓力單位
+ パスカル.気圧を示す国際単位系.
+ unité SI de pression
+ unidad de medida de la presión
+ unità di misura della pressione
+
+
+
+
+
+
+
+ ohm
+ 옴
+ 歐姆
+ ohmio
+ SI unit of electric resistance
+ 전기 저항의 SI 단위
+ SI 電阻單位
+ オーム.抵抗を示す国際単位系.
+ unité SI de résistance électrique
+ unidad de medida de la resistencia eléctrica
+ unità di misurà della resistenza elettrica
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ litre
+ 리터
+ 公升
+ litro
+ litro
+ 1 dm³
+ 1dm³
+ リッター.体積を示す.
+ 1 dm³
+
+
+ tonne
+ 톤
+ 公噸
+ tonnellata
+ tonelada
+ 10³ kg
+ 10³ 公斤
+ トン.重さを示す.
+ 10³ kg
+
+
+
+
+
+
+
+
+ hectare
+ 헥타르
+ 公頃
+ ettaro
+ hectárea
+ 1 hm²
+ 1² hm
+ ヘクタール.広さを示す.
+ 1 hm²
+
+
+
+ ångström
+ 옹스트롱
+ 埃格斯特朗 (單位)
+ angstrom
+ 10⁻¹⁰ m
+ 10⁻¹⁰ 公尺
+ オングストローム.長さの単位.
+ 10⁻¹⁰ m
+
+
+
+
+ millilitre
+ millilitro
+ mililitro
+
+
+ centimetre
+ centimètre
+ centimetro
+ centímetro
+
+
+ decibel
+ 데시벨
+ décibel
+ decibelio
+ see remarks, below
+ 아래 언급 참조
+ 分貝
+ デシベル.エネルギーの強さを示す.
+ Voir remarques, ci-dessous.
+ ver las notas a continuación
+ vedi note di seguito
+
+
+
+
+ kilobit
+ 킬로비트
+ 10³ or 1000 bits
+ 10³ 또는 1000 비트
+ 10³或1000 位元
+ キロビット.1000ビット(10の3乗bits)のこと.
+ 10³ ou 1000 bits
+ >10³ or 1000 bits
+ 10³ or 1000 bit
+
+
+ kibibit
+ 킬로바이비트
+ 2¹⁰ or 1024 bits
+ 2¹⁰ 또는 1024 비트
+ 2¹⁰或1024 位元
+ 2¹⁰ o 1024 bits
+ キビビット.1024ビット(2の10乗bits)のこと.
+ 2¹⁰ ou 1024 bits
+ 2¹⁰ or 1024 bit
+
+
+
+ kilobyte
+ kilo-octet
+ 킬로바이트
+ 10³ or 1000 bytes
+ 10³ 또는 1000 바이트
+ 10³或1000位元組
+ 10 ³ o 1000 bytes
+ キロバイト.1000バイト(10の3乗bytes)のこと.
+ 10³ ou 1000 octets
+ 10³ or 1000 byte
+
+
+ kibibyte
+
+ kibioctet
+ 킬로바이바이트
+ 2¹⁰ or 1024 bytes
+ 2¹⁰ 또는 1024 바이트
+ 2¹⁰或1024位元組
+ 2¹⁰ o 1024 bytes
+ キビバイト.1024バイト(2の10乗bytes)のこと.
+ 2¹⁰ ou 1024 octets
+ 2¹⁰ or 1024 byte
+
+
+ megabyte
+ mégaoctet
+ 메가바이트
+ 10⁶ or 1 000 000 bytes
+ 10⁶ 또는 1 000 000 바이트
+ 10⁶或1 000 000位元組
+ 10 ⁶ o 1 000 000 bytes
+ メガバイト.1,000,000バイト(10の6乗bytes)のこと.
+ 10⁶ ou 1 000 000 octets
+ 10⁶ or 1 000 000 byte
+
+
+ mebibyte
+ 메가바이바이트
+ mébioctet
+ 2²⁰ or 1 048 576 bytes
+ 2²⁰ 또는 1 048 576 바이트
+ 2²⁰或1 048 576位元組
+ 2²⁰ o 1 048 576 bytes
+ メビバイト.1,048,576バイト(2の20乗bytes)のこと.
+ 2²⁰ ou 1 048 576 octets
+ 2²⁰ o 1 048 576 byte
+
+
+
+
+
If the measurement being represented is not expressed in a
+ particular unit, but rather is a number of discrete items, the
+ unit count should be used, or the unit
+ attribute may be left unspecified.
+
Wherever appropriate, a recognized SI unit name should be
+ used (see further ; ). The list above is
+ indicative rather than exhaustive.
+
+
+
+
Si la mesure représentée n'est pas exprimée dans une unité particulière mais
+ plutôt comme un certain nombre d'items distincts, l'unité count
+ doit être employée ou l'attribut unit peut être laissé comme non
+ spécifié.
+
Partout où c'est approprié, un nom d'unité reconnu par le SI (système international) doit être
+ employé (voir plus loin ; ). La liste ci-dessus est plus indicative qu'exhaustive.
+
+
+
Si la medida que se representa no se expresa con una unidad determinada, pero constituye un número de elementos discretos, se debe utilizar la unidad cuenta, o el atributo unidad
+ se puede dejar sin especificar.
+
Dondequiera que sea apropiado, un nombre de la unidad SI reconocido debe ser utilizado (véase ; ).
+ La lista mencionada serà más indicativa que exhaustiva.
+
+
+
+
+ quantité
+ specifies the number of the specified units that
+ comprise the measurement
+ 측정을 구성하는 명시적 단위의 수를 명시한다.
+ 標明包含該度量的特定單位數目
+ 計測単位の数を示す.
+ spécifie le nombre des unités indiquées que comprend la mesure.
+ especifica el número de las unidades que costituyen la medición
+ indica il numero delle unità che costituiscono la misurazione
+
+
+
+ article
+ indicates the substance that is being measured
+ 측정되고 있는 물질을 나타낸다.
+ 指出所度量的物品。
+ 計測される対象を示す.
+ indique ce qui est mesuré.
+ indica la substancia que está siendo medida.
+ identifica la sostanza misurata
+
+
+
In general, when the commodity is made of discrete
+ entities, the plural form should be used, even when the
+ measurement is of only one of them.
+
+
+
En général, si l'article est composé d'entités distinctes, la forme plurielle doit être employée, même si la mesure ne s'applique qu'à l'une d'entre elles.
+
+
+
Generalmente cuando el material se compone de entidades discretas, se debe usar la forma plural, incluso cuando la medida se refiere solamente a una de ellas.
This attribute class provides a triplet of attributes that may
+ be used either to regularize the values of the measurement being
+ encoded, or to normalize them with respect to a standard
+ measurement system.
+
+
+So weren't you gonna buy half
+a gallon, baby
+So won't you go and buy half
+a gallon, baby?
+
+
+
+
+
+
+
+
+
+
Cette classe d'attributs fournit un ensemble de trois attributs qui peuvent être
+ employés soit pour régulariser les valeurs de la mesure encodée, soit pour les
+ normaliser en conformité avec un système de mesure normalisé.
+
+
+
Esta clase de atributo proporciona un trío de atributos que se pueden utilizar para regularizar los valores de medida que se codifican, o normalizarlos en un sistema de medida estándar.
+
+
+
+
+
La unidad debe ser nombrada normalmente usando la abreviatura estándar para una unidad SI (véase ; ).
+ Sin embargo, los codificadores pueden también especificar las medidas usando unidades definidas informalmente, por ejemplo como líneas o caracteres.
+
+
+
+ 当該属性クラスは,3つ組属性を規定している.これは,標準計測システ
+ ムの計測値を正規化するものである.
+
+So weren't you gonna buy half a gallon, babySo won't you go and buy half a gallon,
+baby?
+
+
+
+
+
+
+
The unit should normally be named using the standard
+ abbreviation for an SI unit (see further ; ). However, encoders
+ may also specify measurements using informally defined units such
+ as lines or characters.
+
+
+
L'unité doit normalement être nommée avec une abréviation normalisée issue d'une unité SI (voir plus loin ; ).
+ Cependant les encodeurs peuvent aussi spécifier des mesures avec des unités définies de manière informelle, telles que lines ou characters.
+
+
+ provides an attribute to indicate the type of section which is changing at a specific milestone.
+
+
+ provides a conventional name for the kind of section changing at this milestone.
+ 이 이정표에서 단락 변경을 위한 관례적 이름을 제공한다.
+ 提供此分界段落所使用的通用單位名稱。
+ 当該標石要素がある,変化が起きるセクションの種類の名前を示す.
+ fournit un nom conventionnel pour le type de section
+ qui change à partir de cette balise de bornage
+ proporciona un nombre convencional para el tipo de
+ sección que cambia en este hito.
+ fornisce un nome convenzionale per il tipo di sezione
+ che cambia con l'elemento milestone.
+
+
+
+ physical page breaks (synonymous with the pb element).
+ 물리적 페이지 바꿈
+ 分頁 (和元素pb同義) 。
+ cambio físico de página (sinónimo del elemento
+ Pb).
+ 物理的な改ページ(要素pbと同義).
+ sauts de page matériels (synonymes de l'élément
+ pb)
+ interruzione di pagina (sininimo dell'elemento
+ pb)
+
+
+ column breaks.
+ 열 바꿈
+ 分段。
+ cambio de columna.
+ 段替え.
+ sauts de colonnes
+ interruzione di colonna
+
+
+ line breaks (synonymous with the lb element).
+ 행 바꿈
+ 分行 (和元素lb同義) 。
+ salto de línea (sinónimo del elemento
+ libra).
+ 改行(要素lbと同義).
+ sauts de ligne (synonymes de
+ l'élémentlb)
+ interruzione di colonna (sininimo dell'elemento
+ lb)
+
+
+ any units termed book, liber, etc.
+ 책, 서책 등의 구분 단위
+ 所有稱為書、冊、或函等的單位。
+ cualquier unidad llamada libro, pliego, etc.
+ 冊子などの単位.
+ n'importe quel
+ unité désignée par les termes livre,
+ liber, etc.
+ qualsiasi unità indicata come libro, libretto,
+ ecc.
+
+
+ individual poems in a collection.
+ 모음집에서 각각의 시
+ 詩集中的單首詩。
+ poemas individuales de una colección.
+ 叢書にある独立した詩.
+ poèmes séparés dans une collection
+ singole poesie di una raccolta.
+
+
+ cantos or other major sections of a poem.
+ 시의 편 또는 다른 주요 단락
+ 長詩的詩篇,或詩的大段落。
+ cantos u otras secciones importantes de un poema.
+ 韻文の編や節.
+ chants ou autres parties principales dans une
+ poésie
+ canti o altre sezioni principali di una
+ poesia.
+
+
+ changes of speaker or narrator.
+ changement de locuteur ou de narrateur
+
+
+ stanzas within a poem, book, or canto.
+ 시, 책, 또는 시편에서 연
+ 一首詩、一本書、或一詩篇中的詩節。
+ estrofas dentro de un poema, de un libro, o de un
+ canto.
+ 詩,冊子,編中にある連.
+ strophes dans une poésie, livre, ou chant
+ stanze di una poesia, libro o canti.
+
+
+ acts within a play.
+ 희곡에서 막
+ 劇本中的幕。
+ actos dentro de un drama.
+ 芝居中の幕.
+ actes dans une pièce
+ atti di un'opera teatrale
+
+
+ scenes within a play or act.
+ 희곡 또는 막에서 장
+ 劇本中的景。
+ escenas dentro de un drama o de un acto.
+ 芝居または幕中の場.
+ scènes dans une pièce ou dans un acte
+ scene di un'opera teatrale o di un atto.
+
+
+ sections of any kind.
+ 어떤 종류에서 절
+ 任何種類的段落。
+ secciones de cualquier tipo.
+ 各種のセクション.
+ parties de toute catégorie.
+ sezioni di qualsiasi natura.
+
+
+ passages not present in the reference edition.
+ 참조 판에 단락이 표시되어 있지 않다.
+ 該段文字未在參照版本中出現。
+ pasajes no presentes en la edición de referencia.
+ 参照版中にはない一節.
+ passages qui ne sont pas présents dans l'édition
+ de référence.
+ passaggi non presenti nell'edizione di
+ riferimento.
+
+
+ passages present in the text, but not to be included as part of the reference.
+ passages figurant dans le texte, mais qui ne sont
+ pas destinés à être inclus comme élément de référence.
+
+
+
+
+ ... ...
+
+
+ ...
+ ...
+
+
+ ...
+ ...
+
+
+
If the milestone marks the beginning of a piece of text not present in the reference
+ edition, the special value absent may be used as the value of
+ unit. The normal interpretation is that the reference edition does not contain
+ the text which follows, until the next milestone tag for the edition in question
+ is encountered.
+
In addition to the values suggested, other terms may be appropriate (e.g.
+ Stephanus for the Stephanus numbers in Plato).
+
+
+
Si l'élément milestone marque le début d'un fragment de texte qui n'est pas
+ présent dans l'édition de référence, la valeur absent peut être donnée à
+ l'attribut unit. On comprendra alors que l'édition de référence ne contient pas
+ le fragment de texte qui suit et qui s'achève à la balise milestone suivante dans
+ le texte.
+
En plus des valeurs proposées pour cet attribut, d'autres termes peuvent être appropriés
+ (par ex. Stephanus pour les numéros dits de Henri Estienne dans les éditions
+ de Platon).
The type attribute may be used to characterize the unit boundary in any
+ respect other than simply identifying the type of unit, for example as word-breaking or
+ not.
+
+
+
L'attribut type sera utilisé pour caractériser l’unité de bornage sans autre
+ précaution d’emploi que celle de l'identification du type d'unité, par exemple s’il s’agit
+ d’un mot coupé ou pas.
+
+
+
+
+
+
+
+
+
+ provides attributes common to elements which refer to named persons, places, organizations etc.
+ 사람, 장소, 조직 등의 이름을 지시하는 요소에 공통적 속성을 제공한다.
+ 提供屬性,通用於參照到人物、地點、組織等的元素。
+ 名前,人物,場所,組織を示す要素に付与される属性を示す.
+ fournit des attributs communs aux éléments qui font référence à des personnes, lieux, organismes, etc., nommés.
+ identifica los atributos comunes a los elementos que se refieren a personas, lugares, organizaciones, etc. indicados por nombre
+ identifica degli attributi comuni a elementi che si riferiscono a persone, luoghi, organizzazioni, ecc. indicati per nome
+
+
+
+
+
+ may be used to specify further information about the entity referenced by
+this name in the form of a set of whitespace-separated values, for example the occupation of a person, or the status of a place.
+
+
+
+ reference to the canonical name
+ 표준 이름에 대한 참조
+ referencia al nombre canónico
+ référence au nom canonique
+ riferimento al nome canonico
+ provides a means of locating the canonical form
+ (nym) of the names associated with the object
+ named by
+ the element bearing it.
+ URI를 포함하는 요소에 의해 명명된 대상과 연관된 이름의 표준형식 (nym)의 위치를 가리키는 방법을 제공한다.
+ proporciona los medios para localizar la forma canónica (nym) de los nombres asociados al objeto nombrado por el elemento que lo contiene.
+ 当該要素で名前が付与されている対象に関連する規範的な名前
+ (nym)の場所を示す.
+ indique comment localiser la forme canonique
+ (nym) des noms qui sont associés à l'objet nommé par l'élément qui le contient.
+ indica un modo di localizzare la forma canonica (nym) dei nomi associati all'oggetto definito dall'elemento che lo contiene
+
+
+
The value must point directly to one or more XML elements
+ by means of one or more URIs, separated by whitespace. If more
+ than one is supplied, the implication is that the name
+ is associated with several distinct canonical names.
+
+
+
La valeur doit pointer directement vers un ou plusieurs
+ éléments XML au moyen d'un ou plusieurs URIs, séparés par un
+ espace blanc. Si plus d'un URI est fourni, alors le nom est
+ associé à plusieurs noms canoniques distincts.
+
+
+
El valor debe señalar directamente a uno o más elementos XML mediante uno o más URIs, separado por espacios en blanco.
+ Si se suministra más de uno, la implicación es que el nombre está asociado a varios nombres canónicos distintos.
+
+
+
+
+
+
+
+
+ provides an attribute to indicate any specialised notation used for element content.
+
+
+
+ names the notation used for the content of the element.
+ 요소 내용으로 사용되어 앞서 정의된 표기법 이름을 제시한다.
+ 提供先前已定義過、適用於該元素內容的記號名稱。
+ 当該要素の内容にある既定表記法の名前を示す.
+ précise le nom d'une notation définie précédemment,
+ utilisée dans le contenu de l'élément.
+ indica el nombre de una anotación definida
+ previamente y usada para el contenido de un elemento.
+ fornisce il nome di un'annotazione definita
+ precedentemente utilizzata come contenuto dell'elemento.
+
+
+
+
+ provides attributes for describing where on the source page or
+ object a textual element appears.
+ 원본 페이지 또는 대상에서 텍스트 요소가 나타나는 위치를 기술하기 위한 속성을 제공한다.
+ 提供屬性,描述文件元素在來源頁面或物件上出現的位置。
+ テキスト要素が出現する元資料中のページやオブジェクトを表す属性を示す.
+ fournit des attributs pour décrire l'emplacement où apparaît un élément textuel dans la page ou l'objet source.
+ proporciona atributos para
+ describir en que página u objeto de la fuente aparece el elemento
+ textual.
+ identifica degli attributi
+ che descrivono la collocazione di un elemento testuale all'interno
+ della pagina o dell'oggetto di origine
+
+
+ specifies where this item is placed.
+ specifie où cet item se trouve.
+
+
+
+ below the line
+ 행 아래
+ 行底
+ 当該線の下.
+ debajo de la línea
+ au-dessous de la ligne
+ al di sotto della linea
+
+
+ at the foot of the page
+ 아래 여백
+ dans la marge inférieure
+ margine inferiore
+ en el margen inferior
+ 頁尾空白處
+ 下の余白.
+
+
+ in the margin (left, right, or both)
+ dans la marge (gauche, droite ou les deux en même temps)
+
+
+ at the top of the page
+ 위쪽 여백에 있음
+ 頁首空白處
+ 上の余白.
+ en el margen superior
+ nel margine superiore
+ dans la marge supérieure
+
+
+ on the opposite, i.e. facing, page
+ 맞쪽, 즉 마주보는 페이지
+ 對頁頁面
+ 反対側.例えば,見返しや,向かいのページなど.
+ en el opuesto,es decir en el anverso, reverso, etc.
+ sur la page opposée
+ nella pagina accanto
+
+
+ on the other side of the leaf
+ 장의 반대쪽에 있음
+ 書頁反頁頁面
+ 裏面.
+ en la otra cara de
+ la página
+ de l'autre côté de la feuille
+ dall'altro lato del
+ foglio
+
+
+ above the line
+ 행 위에 있음
+ 行上方
+ 当該線の上.
+ sobre la línea
+ au-dessus de la ligne
+ al di sopra della linea
+
+
+ at the end of e.g. chapter or volume.
+ 주석이 장 또는 책 뒤에 나타난다.
+ 註解出現於章節或書冊的結尾
+ 章末や巻末に注釈がある.
+ al final del capítulo o del volumen.
+ à la fin, par exemple d'un chapitre ou d'un volume
+ alla fine del capitolo o del volume
+
+
+ within the body of the text.
+ dans le corps du texte
+
+
+ in a predefined space, for example left by an earlier scribe.
+ dans un espace prédéfini, par exemple à gauche d'un scripteur précédent
+
+
+
+
+ [An addition written in the margin]
+ [An addition written at the
+ foot of the current page and also on the facing page]
+
+
+
+
+ Ibid, p.7
+
+
+
+
+
+
+
+
+
+ provides attributes which can be used to classify or subclassify elements in any way.
+ 요소의 분류 또는 하위분류에서 사용될 수 있는 속성을 제공한다.
+ 提供可依任何方法將元素分類或次要分類的一般屬性。
+ 要素を分類するための属性を示す.
+
+ fournit des attributs qui peuvent être
+ utilisés pour classer ou interclasser des éléments de n'importe quelle façon.
+ proporciona atributos genéricos utilizables para cualquier clasificación o subclasificación de elementos.
+ assegna degli attributi generici utilizzabili per qualsiasi classificazione e sottoclassificazione di elementi
+
+
+
+ The element should not be categorized in detail with @subtype unless also categorized in general with @type
+
+
+
+
+
+ characterizes the element in some sense, using any convenient
+ classification scheme or typology.
+ 다양한 분류 스키마 또는 유형을 사용해서 요소의 특성을 기술한다.
+ 用合適的分類標準或類型來描述該元素。
+ 当該要素の分類を示す.
+ caractérise l'élément en utilisant n'importe quel système ou typologie de classification approprié.
+ caracteriza el elemento utilizando una clasificación o tipología funcional.
+ caratterizza l'elemento utilizzando una classificazione o tipologia funzionale
+
+
+
+
+ Night in Tarras
+
+ At evening tramping on the hot white road
+ …
+
+
+ A wind sprang up from nowhere as the sky
+ …
+
+
+
+
+
+
The type attribute is present on a number of
+ elements, not all of which are members of att.typed, usually because these elements
+ restrict the possible values for the attribute in a specific way.
+
+
+
+ sous-type
+ provides a sub-categorization of the element, if needed
+ 필요하다면 요소의 하위범주를 제시한다.
+ 若有需要,提供該元素的次要分類
+ 必要であれば,当該要素の下位分類を示す.
+ fournit une sous-catégorisation de l'élément, si
+ c'est nécessaire.
+ proporciona, si es necesario, una subcategorización del elemento.
+ stabilisce, se necessario, una sottocategorizzazione dell'elemento
+
+
+
The subtype attribute may be used to provide any
+sub-classification for the element additional to that provided by its
+type attribute.
+
+
+
L'attribut subtype peut être employé pour fournir une
+ sous-classification pour cet élément, en plus de celle fournie par son
+ propre attribut type.
+
+
+
El atributo subtype (subtipo) se puede utilizar para proporcionar cualquier subclasificación para el elemento, adicional a ésa proporcionada por su
+type (tipo) de atributo.
+
+
+
+ 属性subtypeは,属性typeに加えて,当該要
+ 素の下位分類を示すために使われる.
+
+
+
+
+
+
When appropriate, values from an established typology should be
+ used. Alternatively a typology may be defined in the associated
+ TEI header. If values are to be taken from a project-specific
+ list, this should be defined using the valList element in
+ the project-specific schema description, as described in .
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ provides a set of attributes used by all elements which point
+ to other elements by means of one or more URI references.
+ 하나 이상의 URI 참조를 통해서 다른 요소를 가리키는 모든 요소에 의해 사용된 속성 집합을 정의한다.
+ 定義一組與其他元素相連結的所有元素皆使用的屬性,連結是使用ㄧ個或多個統一資源識別符 (URI) 參照。
+ URIにより要素を参照する要素に共通して付与される属性を定義する.
+ fournit un ensemble d'attributs utilisés par tous les éléments qui pointent vers d'autres éléments au moyen d'une ou de plusieurs références URI.
+ define un conjunto de atributos usados por todos los elementos que señalan a otros elementos a través de uno o más URI.
+ definisce un insieme di attributi usati da tutti gli elementi che puntano ad altri elementi tramite uno o più URI
+
+
+ specifies the language of the content to be found at the destination referenced by target, using a language tag generated
+ according to BCP 47.
+
+
+
+
+ @targetLang should only be used on if @target is specified.
+
+
+
+
+
+
+
+
+
+
+
In the example above, the linkGrp combines
+ pointers at parallel fragments of the
Universal
+ Declaration of Human Rights: one of them is in Polish,
+ the other in Swahili.
+
+
The value must conform to BCP 47. If the value is a
+ private use code (i.e., starts with x- or contains
+ -x-), a language element with a matching
+ value for its ident attribute should be supplied in
+ the TEI header to document this value. Such documentation may
+ also optionally be supplied for non-private-use codes, though
+ these must remain consistent with their
+ IETFInternet Engineering Task
+ Force definitions.
+
+
+ specifies the destination of the reference by supplying one or more URI References
+ 하나 혹은 다수의 URI 참조를 제시하여 참조의 목적지를 명시한다.
+ 用一個或多個統一資源識別符參照 (URI References) 來說明參照所指位置。
+ ひとつ以上のURIで,参照先を特定する.
+ précise la cible de la référence en donnant une ou
+ plusieurs références URI
+ especifica la destinación de una referencia
+ proporcionando una o más referencias URI.
+ specifica la destinazione di un riferimento, fornendo
+ uno o più riferimenti URI
+
+
One or more syntactically valid URI references, separated by whitespace. Because
+ whitespace is used to separate URIs, no whitespace is permitted inside a single URI. If a
+ whitespace character is required in a URI, it should be escaped with the normal mechanism,
+ e.g. TEI%20Consortium.
+
Une ou plusieurs références URI syntaxiquement valables, séparée par
+ un espace. Puisqu'un espace est employé pour séparer des URIs, aucun espace
+ n’est autorisé à l'intérieur d'un URI. Si un espace est requis dans un URI, il
+ faut le représenter avec une séquence d'échappement, comme par exemple
+ TEI%20Consortium.
+
+
+ évalué
+ specifies the intended meaning when the target of a
+ pointer is itself a pointer.
+ 포인터의 대상이 포인터일 때 의도된 의미를 명시한다.
+ 若指標的目標本身為指標,則在此說明其用意。
+ 当該ポインタの参照先がポインタである場合,その意図を示す.
+ détermine le sens attendu, si la cible d'un pointeur est elle-même un pointeur.
+ indica el significado previsto cuando la meta de un indicador es también un indicador.
+ indica il significato previsto quando la destinazione di un puntatore è essa stessa un puntatore
+
+
+
+ if the element pointed to is itself a pointer, then
+ the target of that pointer will be taken, and so on, until
+ an element is found which is not a pointer.
+ 만약 지시되는 요소가 포인터라면, 포인터의 대상은 포인터가 아닌 요소가 발견될 때까지 계속 연결된다.
+ 若指向的元素本身為指標,則該指標的目標會被移除,依此類推,直到找到一個非指標的元素為止。
+ si el elemento que señala a sí mismo es un indicador, entonces el target de ese indicador será tomado, y así sucesivamente, hasta que se encuentre un elemento que no sea un indicador.
+ 参照先の要素がポインターである場合,そのポインターの参照先へ
+ と展開する.これを,参照先がポインターでなくなるまで続ける.
+
+ si l'élément pointé est lui-même un pointeur, alors on prendra la cible de ce pointeur, et ainsi de suite jusqu'à trouver un élément qui n'est pas un pointeur.
+ se l'elemento puntato è esso stesso un puntatore, allora sarà presa la destinazione di quel puntatore e così via fino a trovare un elemento che non è un puntatore
+
+
+ if the element pointed to is itself a pointer, then
+ its target (whether a pointer or not) is taken as the target
+ of this pointer.
+ 지시된 요소가 포인터라면, 그 대상(포인터이든지 아니든지)은 이 포인터의 대상으로 취급된다.
+ 若指向的元素本身為指標,則該指標的目標(無論是否為指標)會作為這項指標的目標。
+ si el elemento que señala a sí mismo es un puntero, entonces el target (puntero o no) se toma como el target de este puntero.
+ 参照先の要素がポインターである場合,(そのポインターの参照先
+ がどうであれ)そのポインターが参照先になる.
+
+ si l'élément pointé est lui-même un pointeur, alors sa cible (qui est ou non un pointeur) devient la cible retenue.
+ se l'elemento puntato è esso stesso un puntatore, allora la sua destinazione (che sia un puntatore o meno) è presa come destinazione del puntatore
+
+
+ no further evaluation of targets is carried out
+ beyond that needed to find the element specified in the
+ pointer's target.
+ 포인터의 대상에서 명시된 요소를 발견할 필요가 없을 때 더 이상의 대상에 대한 평가는 수행되지 않는다.
+ 尋找指標的目標元素時,未對目標進行不必要的延伸評估。
+ no se realiza ninguna otra evaluación de los targets más allá de la necesaria para encontrar el elemento especificado en el target del puntero.
+ 当該ポインターの参照先から先にあるリンクへの展開は行わない.
+
+ aucune évaluation ultérieure des cibles n'est menée au-delà de la recherche de l'élément désigné dans la cible du pointeur.
+ non viene condotta altra valutazione delle destinazioni se non quella necessaria a rintracciare l'elemento specificato nella destinazione del puntatore
+
+
+
+
If no value is given, the application program is
+ responsible for deciding (possibly on the basis of user
+ input) how far to trace a chain of pointers.
+
+
+
Si aucune valeur n'est fournie, c'est au programme d'application de décider
+ (éventuellement à partir d'une donnée entrée par l'utilisateur) jusqu'où
+ retracer une chaîne de pointeurs.
+
+
+
+
+
+
+
+
+ provides a set of attributes common to all elements which
+ enclose groups of pointer elements.
+ 포인터 요소군을 포함하는 모든 요소에 공통적인 속성 집합을 정의한다.
+ 定義一組屬性,通用於所有包含指標元素群組的元素。
+ ポインタとなる要素に共通の属性を示す.
+ fournit un ensemble d'attributs communs à tous les éléments qui contiennent des groupes d'éléments pointeurs.
+ define un conjunto de atributos comunes a todos los elementos que incluyen grupos de indicadores.
+ definisce un insieme di attributi comuni a tutti gli elementi che includono gruppi di puntatori
+
+
+
+
+
+
+ optionally specifies the identifiers of the elements
+ within which all elements indicated by the contents of this
+ element lie.
+ 이 요소 내용에 의해 지시된 모든 요소에 대한 확인소를 수의적으로 명시한다.
+ 標明元素的識別符碼 (但非必備) ,此元素內容所指明的元素皆包含於這些元素當中。
+ 当該要素の中にある全要素を対象とした識別子を選択的に指定する.
+ spécifie, facultativement, les identifiants des éléments englobant tous les éléments indiqués par le contenu de cet élément.
+ establece facultativamente los identificadores de elementos al interno de los cuales se encuentran todos los elementos indicados de los contenidos del elemento en cuestión.
+ stabilisce facoltativamente gli identificatori di elementi all'interno dei quali si trovano tutti gli elementi indicati dai contenuti dell'elemento in questione
+
+
+
If this attribute is supplied every element specified as a
+ target must be contained within the element or elements
+ named by it. An application may choose whether or not to
+ report failures to satisfy this constraint as errors, but may
+ not access an element of the right identifier but in the wrong
+ context. If this attribute is not supplied, then target
+ elements may appear anywhere within the target document.
+
+
+
Si cet attribut est utilisé, tout élément spécifié comme étant une cible doit
+ être contenu dans l'élément ou les éléments qu'il nomme. Une application
+ peut choisir de faire apparaître en erreur, ou non, les entorses à cette
+ contrainte mais ne peut pas accéder à un élément qui aurait le bon
+ identifiant mais se trouverait dans le mauvais contexte. Si cet attribut
+ n'est pas utilisé, les éléments cibles peuvent apparaître n'importe où dans
+ le document cible.
+
+
+
+ target function
+ 대상 기능
+ función meta
+ fonction cible
+ funzione obiettivo
+ describes the function of each of the values of the
+ target attribute of the enclosed link,
+ join, or alt tags.
+ link, join 또는 alt 태그의 속성 값 각각에 대한 기능을 기술한다.
+ 描述每個元素標籤link、join、或alt當中的屬性target的屬性值功能。
+ 要素link, join, altに付与された属性
+ targetの値の機能を示す.
+ décrit la fonction de chacune des valeurs de
+ l'attribut target pour les balises incluses link, join, ou
+ alt.
+ describe la función de cada uno de los valores del atributo target (metas) de los marcadores correspondientes link, join, o alt.
+ descrive la funzione di ognuno dei valori dell'attributo target dei marcatori corrispondenti link,
+ join, o alt
+
+
+
+
The number of separate values must match the number of
+ values in the target attribute in the enclosed
+ link, join, or alt tags (an
+ intermediate ptr element may be needed to accomplish
+ this). It should also match the number of values in the
+ domains attribute, of the current element, if one
+ has been specified.
+
+
+
Le nombre de valeurs distinctes doit correspondre au nombre de valeurs dans
+ l'attribut target des balises incluses link,
+ join ou alt (un élément intermédiaire ptr peut
+ être nécessaire dans ce cas). Il devrait également correspondre au nombre de
+ valeurs se trouvant dans l'attribut domains de l'élément en
+ question, si un tel attribut a été spécifié.
+
+
+
+
+
+
+
+ provides an attribute used by specification elements which derive components from
+ some external source.
+
+
+ specifies the source from which declarations and definitions for
+the components of the object being defined may be obtained.
+
+
+
The context indicated must provide a set of TEI-conformant
+specifications in a form directly usable by an ODD processor. By
+default, this will be the location of the current release of the TEI
+Guidelines.
+
The source may be specified in the form of a private URI, for which
+the form recommended is tei:x.y.z, where
+x.y.z indicates the version number,
+e.g. tei:1.5.1 for 1.5.1 release of TEI P5
+or (as a special case) tei:current for whatever is the
+latest release.
+
+
+
+
+ provides attributes for selecting particular elements
+ within a document.
+
+
+ points at one or several elements or sets of
+ elements by means of one or more data pointers, using the URI syntax.
+
+
+ Elizabeth went to Essex
+
+
+
+
+
+
+ supplies an arbitrary XPath expression using the
+ syntax defined in which identifies a set of nodes, selected within
+ the context identified by the target attribute if this is supplied, or within the
+ context of the parent element if it is not.
+
+
+
+
+
+
+
+
+
+
+
The expression of certainty applies to the nodeset identified by the value of the
+ target attribute, possibly modified additionally by the value of the
+ match attribute. If more than one identifier is given, the implication is
+ that all elements (or nodesets) are intended. The match attribute may also be
+ used as a means of identifying groups of elements.
+
If target and match are present, target selects an
+ element and the XPath expression in match is evaluated in the context of that
+ element. If neither attribute is present, the expression applies to its parent element. If
+ only target is given, the expression refers to the selected element or nodeset.
+ If only match is given, the XPath expression is evaluated in the context of the
+ parent element of the bearing element.
+
Note that the value of the target attribute may include an XPointer expression
+ including an XPath expression (see ).
+
+
+
+
+
+
+ provides attributes for elements used for arbitrary segmentation.
+ 임의적 분할을 위해 사용된 요소의 값을 제공한다.
+ 提供屬性,用於有隨機分割功用的元素。
+ 任意の部分に使用される要素向けの属性を示す.
+ fournit des attributs pour des éléments utilisés pour une segmentation arbitraire.
+ proporciona atributos a los elementos usados para una segmentación arbitraria.
+ assegna degli attributi agli elementi usati per una segmentazione arbitraria
+
+
+
+
+
+
+
+ fonction
+ characterizes the function of the segment.
+ 분절 기능의 특성을 기술한다.
+ 描述該分割的功能。
+ 当該部分の役割を示す.
+ caractérise la fonction du segment.
+ caracteriza la función de un segmento.
+ caratterizza la funzione del segmento
+
+
Attribute values will often vary depending on the type of element to which they are attached. For example, a cl, may take values such as
+coordinate, subject, adverbial etc. For a phr, such values as
+subject, predicate etc. may be more appropriate. Such constraints will typically be implemented by a project-defined customization.
+
+
+
+
+
+
+
+
+ provides attributes for elements in lists or groups that are sortable, but whose sorting key cannot be derived mechanically from the element content.
+
+
+ supplies the sort key for this element in an index, list or group which contains it.
+
+
+ David's other principal backer, Josiah
+ ha-Kohen Josiah ha-Kohen b. Azarya b. Azarya, son of one of the last gaons of Sura was David's own first
+ cousin.
+
+
+ Je me suis
+ procuré une clef anglaise pour dévisser les écrous qui attachent le canot à
+ la coque du Nautilus. Ainsi tout est prêt.
+
+
+
The sort key is used to determine the sequence and grouping of entries in an index. It provides a sequence of characters which, when sorted with the other values, will produced
+ the desired order; specifics of sort key construction are application-dependent
+
Dictionary order often differs from the collation sequence of machine-readable character
+ sets; in English-language dictionaries, an entry for 4-H will often
+ appear alphabetized under fourh, and McCoy may be
+ alphabetized under maccoy, while A1,
+ A4, and A5 may all appear in numeric order
+ alphabetized between a- and AA. The sort key is
+ required if the orthography of the dictionary entry does not suffice to determine its
+ location.
+
+
+
La clé de tri est utilisée pour déterminer la séquence et le groupement d'entrées dans un
+ index. Elle fournit une séquence de caractères qui, lorsqu'ils sont triés avec les autres valeurs, produisent l'ordre souhaité ; les détails de construction d'une clé de tri
+ dépendent des applications.
+.
+
La structure d'un dictionnaire diffère souvent de l'ordre de collation des jeux de
+ caractères lisibles par la machine ; dans des dictionnaires de langue anglaise, une entrée
+ pour 4-H apparaîtra souvent alphabétiquement sous fourh, et
+ McCoypeut être classé alphabétiquement sous maccoy, tandis que A1, A4 et A5
+ apparaîtront tous dans un ordre alphanumérique entre a- et AA. La clef de
+ tri est exigée si l'orthographe de l'entrée du dictionnaire n'est pas suffisante pour
+ déterminer son emplacement.
+
+
+
La clave de ordenación se utiliza para determinar la secuencia y agrupar las entradas en
+ un índice.
+
+
+
+
+
+
+
+ provides attributes identifying the source edition from which
+ some encoded feature derives.
+ fournit des attributs identifiant l'édition source dont provient une quelconque caractéristique encodée.
+
+
+ edition
+ édition
+ supplies a sigil or other arbitrary identifier for the source edition in which
+ the associated feature (for example, a page, column, or line
+ break) occurs at this point in the text.
+ fournit un identifiant arbitraire pour l'édition source dans laquelle la caractéristique associée
+ (par exemple, une page, une colonne ou un saut de ligne) apparaît à ce point du texte.
+
+
+
+ edition reference
+ provides a pointer to the source edition in which
+ the associated feature (for example, a page, column, or line
+ break) occurs at this point in the text.
+
+
+
+
+
+ Of Mans First Disobedience, and the Fruit
+ Of that Forbidden Tree, whose mortal tast
+ Brought Death into the World, and all our woe,
+
+
+
+
+
+ Olaf Stapledon,
+ Starmaker, Methuen, 1937
+ Olaf Stapledon,
+ Starmaker, Dover, 1968
+
+
+
Looking into the future aeons from the supreme moment of
+ the cosmos, I saw the populations still with all their
+ strength maintaining theessentials of their ancient culture,
+ still living their personal lives in zest and endless
+ novelty of action, … I saw myself still
+ preserving, though with increasing difficulty, my lucid
+ con-sciousness;
+
+
+
+ provides attributes for elements which delimit a span of text by pointing mechanisms rather than by enclosing it.
+ 포함보다는 포인터 메카니즘을 통하여 구분된 텍스트 구간을 나타내는 요소의 속성을 제공한다.
+ 提供元素的屬性,這些元素使用參照機制來限定某一文字段,而非包含此文字段。
+ テキスト幅の範囲を内容としてではなく参照機能を使って示す要素に付与さ
+ れる属性を示す.
+ fournit des attributs pour les éléments qui délimitent un passage de texte par des mécanismes de pointage plutôt qu'en entourant le passage.
+ proporciona atributos para elementos que delimitan un fragmento de texto utilizando los señalizadores en lugar de cerrando el texto.
+ assegna degli attributi agli elementi che delimitano una porzione di testo utilizzando dei puntatori invece di racchiudere il testo stesso
+
+
+ indicates the end of a span initiated by the element
+ bearing this attribute.
+ 이 속성을 포함하는 요소에 의해 시작된 구간의 끝을 나타낸다.
+ 指出文字段的結尾,該文字段以帶有此屬性的元素開頭。
+ 当該要素が示す範囲の終点を示す.
+ indique la fin d'un passage introduit par l'élément portant cet attribut.
+ indica el final de un fragmento de texto iniciado con el elemento al cual es asignaado el atributo.
+ indica la fine della porzione di testo che ha inizio con l'elemento a cui è assegnato l'attributo
+
+
+ The @spanTo attribute must point to an element following the
+ current element
+
+
+
+The element indicated by @spanTo () must follow the current element
+
+
+
+
+
+
+
+
The span is defined as running in document order from the start
+ of the content of the pointing element to the end of the
+ content of the element pointed to by the spanTo attribute (if
+ any). If no value is supplied for the attribute, the assumption is that the span is
+ coextensive with the pointing element. If no content is present,
+ the assumption is that the starting point of the span is
+ immediately following the element itself.
+
+
+
Le passage est défini comme courant depuis le début du contenu de l'élément pointeur (s'il y en a un) jusqu'à la fin du contenu de l'élément
+ pointé par l'attribut spanTo (s'il y en a un), dans l'ordre du document. Si aucune valeur n'est fournie pour l'attribut, il est entendu
+ que le passage est de même étendue que l'élément pointeur.
+
+
+
El span se define como ejecutándose en la orden del documento des del comienzo del contenido del elemento indicado (si lo hay) al extremo del contenido del elemento señalado por el atributo del spanTo (si lo hay).
+ Si no se suministra ningún valor para el atributo, la asunción es que el span es coextensivo con el elemento indicado.
+
+
+
+
+
+ provides attributes to specify the name of a formal definition
+ language used to provide formatting or rendition information.
+
+
+ identifies the language used to describe the rendition.
+ 모양을 기술하는 언어를 식별한다.
+ identifica el lenguaje usado para describir la
+ interpretación.
+ 当該描出を解説する言語を特定する.
+ identifie la langue employée pour décrire le rendu
+ identifica la lingua utilizzata per descrivere la
+ resa
+
+
+
+ Cascading Stylesheet Language
+ 연속식 스타일시트 언어
+ Lenguaje de CSS
+ CSS
+ langage CSS (Cascading Stylesheet )
+ linguaggio CSS
+
+
+ Extensible Stylesheet Language Formatting Objects
+ 확장가능 스타일시트 언어
+ Objetos extensibles del formato del lenguaje de
+ Stylesheet
+ XSL-FO
+ Langage XSL (Extensible Stylesheet )Formatting
+ Objects
+ linguaggio XSL-FO
+
+
+ Informal free text description
+ 격식이 자유로운 텍스트 기술
+ Descripción informal y libre del texto
+ 自由記述.
+ description en texte libre non structuré.
+ descrizione informale testo libero
+
+
+ A user-defined rendition description language
+ 사용자 정의 해석 기술 언어
+ Un idioma descriptivo de interpretación definido
+ por el usario.
+ 利用者が決めた,描出記述言語.
+ langue de description de l'interprétation définie
+ par l'utilisateur
+ linguaggio di descrizione della resa definito
+ dall'utente
+
+
+
+
+If no value for the @scheme attribute is provided, then the default assumption should be that CSS is in use.
+
+
+
+ supplies a version number for the style language provided in scheme.
+
+
+
+
+
+ @schemeVersion can only be used if @scheme is specified.
+
+
+
+
+
+
If schemeVersion is used, then scheme should also appear, with a value
+ other than free.
+
+
+
+
+ provides attributes used to decorate rows or cells of a table.
+ 테이블의 행 또는 셀을 장식하는 속성을 제공한다.
+ 提供屬性,用以裝飾表格內的儲存格或列。
+
+ 表の行またはセルを修飾する属性を示す.
+
+ fournit des attributs pour mettre en forme les lignes ou les cellules d'un tableau.
+ proporciona atributos usados para decorar filas o celdas de una tabla.
+ assegna degli attributi utilizzati per decorare righe e celle di una tabella
+
+
+ rôle
+ indicates the kind of information held in this cell or
+in each cell of this row.
+ 이 셀에 또는 이 행의 각 셀에 나타난 정보의 종류를 제시한다.
+ 指出此儲存格或列當中,各儲存格所包含的資訊類型。
+
+ 当該セル,または当該行中のセルにある情報の種類を示す.
+
+ indique le type des
+ informations contenues dans cette cellule ou dans chaque cellule de cette ligne.
+ especifica el tipo de información contenida en la celda en cuestión o en cada una de las celdas de la fila.
+ specifica il tipo di informazione contenuta nela cella in questione o in ciascuna delle celle della riga presa in esame
+
+ data
+
+
+ labelling or descriptive information only.
+ 표지 또는 기술적 정보만 허용
+ 僅為標號或描述性資訊。
+ etiquetado o información descriptiva solamente.
+
+ 記述的情報またはラベルのみ.
+
+ uniquement des informations relatives au codage ou à la description
+ informazione esclusivamente descrittiva o del tipo etichetta
+
+
+ data values.
+ 데이터 값
+ 數據值。
+ valores de datos.
+
+ 日付情報.
+
+ valeurs de données
+ valori di dati
+
+
+
+
When this attribute is specified on a row, its value is the
+ default for all cells in this row. When specified on a cell,
+ its value overrides any default specified by the
+role attribute of the parent row element.
+
+
+
Quand cet attribut est appliqué à une ligne de tableau, sa valeur est
+ transmise comme valeur par défaut à toutes les cellules de cette ligne.
+ Quand il est spécifié sur une cellule, sa valeur annule et remplace toute
+ valeur spécifiée par défaut dans l'attribut role de l'élément
+ parent row.
+
+
+
Cuando este atributo se especifica en una fila, su valor es el valor por defecto para todas las celdas de esta fila. Cuando está especificado en una celda, su valor reemplaza cualquier valor por defecto especificado por
+el atributo role (papel) del elemento padre row (fila).
+
+
+
+ lignes
+ indicates the number of rows occupied by this cell or row.
+ 이 셀 또는 행에 의해 사용된 행의 수를 나타낸다.
+ 指出此儲存格或列所占的列數。
+
+ 当該セルまたは行を含む行の数を示す.
+
+ indique le nombre de lignes occupées par la cellule ou la ligne en question.
+ indica el número de filas ocupado por una celda o por la fila en cuestión.
+ indica il numero di righe occupate dalla cella o riga in questione
+
+ 1
+
+
A value greater than one indicates that this
+ cell
+ spans several rows. Where several cells span multiple rows, it may be more convenient
+to use nested tables.
+
+
+
Lorsque plusieurs cellules s'étendent sur plusieurs lignes, il peut être plus pratique d'employer des tableaux inclus.
+
+
+
Donde varias celdas atraviesan varias filas, puede ser más conveniente utilizar los vectores jerarquizados.
+
+
+
+ 複数のセルが複数行に渡る場合には,入れ子の表を使った方が便利で
+ ある.
+
+
+
+
+ columns
+ 열
+ columnas
+ colonnes
+ colonne
+ indicates the number of columns occupied by this cell or
+ row.
+ 이 셀 또는 행에 의해 사용된 열의 수를 나타낸다.
+ 指出此儲存格或列所佔的欄位數。
+
+ 当該セルまたは行を含む列の数を示す.
+
+ indique le nombre de colonnes occupées par cette cellule ou cette ligne.
+ indica el número de columnas que abraza una celda o fila.
+ indica il numero di colonne occupate dalla cella o riga
+
+ 1
+
+
A value greater than one indicates that this cell or row
+ spans several columns. Where an initial cell spans an entire
+ row, it may be better treated as a heading.
+
+
+
Une valeur plus grande que 1 indique que cette cellule (ou cette ligne)
+ occupe plusieurs colonnes. Lorsqu'une première cellule s'étend sur une ligne entière, il peut être préférable de la considérer comme un titre.
+
+
+
Donde una celda inicial atraviesa una fila entera, puede ser tratada como título.
+
+
+
+ 始めのセルが行全体である場合には,見出しとして扱った方がよい.
+
+
+
+
+
+
+
+
+ provides attributes common to those elements which
+ have a duration in time, expressed either absolutely or by reference
+ to an alignment map.
+ 절대적 또는 배열 지도에 대한 참조에 의해 표현된 시간의 지속을 나타내는 요소들 사이에 공통적 속성을 제공한다.
+ 提供一組屬性,通用於帶有時間長度的元素,這些元素以絕對方式表明,或是參照到組序表。
+ 時間幅を持つ要素に共通する属性を示す.絶対的または関連図への参照で示
+ される.
+ fournit des attributs communs aux éléments qui
+ expriment une durée dans le temps, soit de manière absolue, soit en se référant à une carte d'alignement.
+ proporciona un conjunto de atributos comunes a los elementos que tienen una duración en el tiempo expresada en términs absolutos o por referencia a un esquema de alineamiento
+ assegna un insieme di attributi comuni agli elementi che hanno una durata nel tempo espressa in termini assoluti o rispetto a uno schema di allineamento
+
+
+
+
+
+ indicates the location within a temporal alignment at
+ which this element begins.
+ 이 요소가 시작된 시간 배열 내의 위치를 제시한다.
+ 指出時間組序中此元素的起始位置。
+ 時間関連図上で,当該要素が始まることを示す時間点を示す.
+ indique dans un alignement temporel (un ordre chronologique) l'endroit où commence cet élément.
+ indica el punto en el ámbito de un alineamiento temporal en el cual comienza el elemento
+ indica il punto nell'ambito di un allineamento temporale in cui comincia l'elemento
+
+
+
If no value is supplied, the element is assumed to follow
+ the immediately preceding element at the same hierarchic
+ level.
+
+
+
Si aucune valeur n'est donnée, il est entendu que l'élément suit l'élément immédiatement précédent au même niveau hiérarchique.
+
+
+
Si no se suministra ningún valor, el elemento es asumido para seguir el elemento inmediatament anterior en el mismo nivel jerárquico.
+
+
+
+ 値がない場合は,当該要素は同じ構造レベル上の直前の要素の後に続
+ くものとされる.
+
+
+
+
+ indicates the location within a temporal alignment at
+ which this element ends.
+ 이 요소가 종료된 시간 배열 내의 위치를 제시한다.
+ 指出時間組序 (順序點) 中此元素的結尾位置。
+ 時間関連図上で,当該要素が終わることを示す時間点を示す.
+ indique l'endroit où se termine cet élément dans un alignement temporel.
+ indica el punto en el ámbito de un alineamiento temporal en el cual comienza el elemento
+ indica il punto nell'ambito di un allineamento temporale in cui termina l'elemento
+
+
+
If no value is supplied, the element is assumed to precede
+ the immediately following element at the same hierarchic
+ level.
+
+
+
Si aucune valeur n'est donnée, il est entendu que l'élément précède l'élément immédiatement suivant au même niveau hiérarchique.
+
+
+
Si no se suministra ningún valor, el elemento es asumido para preceder el elemento inmediatamente posterior en el mismo nivel jerárquico.
+
+
+
+ 値がない場合は,当該要素は同じ構造レベル上の直前の要素の後に続
+ くものとされる.
+
+
+
+
+
+
+
+
+ provides attributes specific to elements encoding authorial or
+ scribal intervention in a text when
+ transcribing manuscript or similar sources.
+ 원고 또는 유사 원본을 전사할 때 텍스트의 저작 또는 필사 간섭을 부호화하는 요소에 특징적으로 사용되는 속성을 제시한다.
+ proporciona a los atributos específicos a los elementos que codifican la intervención authorial o scribal en un texto al transcribir el manuscrito o las fuentes similares.
+
+ 手書き資料や同様の資料を転記する場合,著者や筆写者に関する調整を記録
+ する要素に付与される属性を示す.
+
+ fournit des attributs spécifiques au codage d'éléments
+relatifs à l'intervention de l'auteur ou du copiste dans un texte lors de la
+transcription de sources manuscrites ou assimilées.
+ assegna degli attributi propri degli elementi che descrivono il carattere di un intervento dell'autore o del trascrittore di un testo nella redazione di un manoscritto o di altra fonte simile
+
+
+
+
+
+
+
+
+ indicates the effect of the intervention, for example in
+ the case of a deletion, strikeouts
+ which include too much or too little text, or in the case of an
+ addition, an insertion which duplicates some of the text
+ already present.
+ 간섭의 효과를 나타낸다. 예를 들어, 삭제의 경우 너무 많은 또는 너무 적은 텍스트를 포함한 지우기, 또는 추가의 경우, 이미 존재하는 텍스트 일부의 중복 삽입 등.
+ indica el resultado de una intervención, por ejemplo en el caso de una cancelación, una tachadura que incluyen demasiado o demasiado poco texto, o en el caso de una adición o una inserción que duplica información ya presente en el texto.
+
+ 当該調整の影響を示す.例えば,削除の際,取消線の範囲が多すぎた
+ り少なすぎたりする場合や,追加の際,既にあるテキストの部分をコピー
+ して挿入したりする場合.
+
+ indique la conséquence de l'intervention, par
+exemple dans le cas d'un effacement, une biffure, qui inclut trop ou pas assez de
+texte, ou dans le cas d'un ajout, une insertion, qui reproduit une portion du
+texte déjà présent.
+ indica l'effetto dell'intervento, per esempio in caso di cancellazione, quando questa comprenda troppo testo o troppo poco, o in caso di aggiunta, quando questa riproduce parte del testo già presente
+
+ unremarkable
+
+
+
+ all of the text indicated as an addition duplicates
+ some text that is in the original, whether the duplication
+ is word-for-word or less exact.
+ 중복이 단어 대 단어로 된 것이지, 아니면 중복이 비교적 덜 정확하게 된 것인지 간에, 삽입으로 표시된 모든 텍스트는 원본의 일부 텍스트를 중복한 것임.
+ todo el texto indicado como adición duplica un fragmento de texto presente en el original, siendo la duplicación palabra por palabra o algo menos exacta.
+
+ 当該テキストは全て,元資料にあるテキストのコピーを追加するも
+ のである.その程度は,語単位であったりそれより小さいこともある.
+
+ tout le texte indiqué comme étant une addition reprend le texte de l'original, que la duplication soit identique mot pour mot ou moins exacte.
+ l'intero testo identificato come aggiunta riproduce parte del testo già presente nell'originale, indipendentemente dal fatto che la riproduzione sia esatta (parola per parola) o meno
+
+
+ part of the text indicated as an addition duplicates
+ some text that is in the original
+ 일부 텍스트가 원본의 일부 텍스트를 중복
+ la parte del texto marcado como adición duplica un fragmento de texto presente en el original
+
+ 当該テキストの部分は,元資料にあるテキストのコピーを追加する
+ ものである.
+
+ la partie du texte indiquée comme
+étant un ajout est redondante avec un texte présent dans l'original.
+ una parte del testo identificato come aggiunta riproduce parte del testo già presente nell'originale
+
+
+ some text at the beginning of the deletion is marked
+ as deleted even though it clearly should not be
+ deleted.
+ 분명히 그렇게 되어 있지 않았어야 하는데도, 삭제부의 시작에 있는 어떤 텍스트가 삭제된 것으로 표지되어 있다.
+ un fragmento de texto del principio de una cancelación se marca como suprimido aunque este no lo haya sido claramente.
+
+ 当該削除部分の始点は,例えそれが明白な削除ではなくとも,マー
+ クされている.
+
+ un passage du texte situé au début de la supression est indiqué comme supprimé bien qu'à l'évidence il ne devrait pas l'être.
+ una parte del testo all'inizio della cancellazione è identificata come cancellata anche se chiaramente non dovrebbe esserlo
+
+
+ some text at the end of the deletion is marked as
+ deleted even though it clearly should not be
+ deleted.
+ 분명히 그렇게 되어 있지 않았어야 하는데도, 삭제부의 끝에 있는 어떤 텍스트가 삭제된 것으로 표지되어 있다.
+ un fragmento de texto del final de una cancelación se marca como suprimido aunque este no lo haya sido claramente.
+
+ 当該削除部分の終点は,例えそれが明白な削除ではなくとも,マー
+ クされている.
+
+ un passage du texte situé à la fin de la supression est indiqué comme supprimé bien qu'à l'évidence il ne devrait pas l'être.
+ una parte del testo alla fine della cancellazione è identificata come cancellata anche se chiaramente non dovrebbe esserlo
+
+
+ some text at the beginning of the deletion is not
+ marked as deleted even though it clearly should be.
+ 분명히 그렇게 되어 있어야 하는데도, 삭제부의 시작에 있는 어떤 텍스트가 삭제된 것으로 표지되어 있지 않다.
+ un fragmento de texto del inicio de la cancelación no se marca como suprimido aunque claramente haya sido suprimido.
+
+ 当該削除部分の始点は,例えそれが明白な削除ではなくとも,マー
+ クされていない.
+
+ un passage du texte situé au début de la supression n'est pas indiqué comme supprimé bien qu'à l'évidence il devrait l'être.
+ una parte del testo all'inizio della cancellazione non è identificata come cancellata anche se chiaramente dovrebbe esserlo
+
+
+ some text at the end of the deletion is not marked as
+ deleted even though it clearly should be.
+ 분명히 그렇게 되어 있어야 하는데도, 삭제부의 끝에 있는 어떤 텍스트가 삭제된 것으로 표지되어 있지 않다.
+ un fragmento de texto del final de la cancelación no se marca como suprimido aunque claramente haya sido suprimido.
+
+ 当該削除部分の終点は,例えそれが明白な削除ではなくとも,マー
+ クされていない.
+
+ un passage du texte situé à la fin de la supression n'est pas indiqué comme supprimé bien qu'à l'évidence il devrait l'être.
+ una parte del testo alla fine della cancellazione non è identificata come cancellata anche se chiaramente dovrebbe esserlo
+
+
+ some text in the deletion is not marked as deleted
+ even though it clearly should be.
+ 분명히 그렇게 되어 있어야 하는데도, 삭제부에 있는 어떤 텍스트가 삭제된 것으로 표지되어 있지 않다.
+ un fragmento de texto de la cancelación no se marca como suprimido aunque claramente haya sido suprimido.
+
+ 当該削除部分は,例えそれが明白な削除ではなくとも,マークされ
+ ていない.
+
+ un passage du texte dans la supression n'est pas indiqué comme disparu bien qu'à l'évidence il devrait l'être.
+ una parte del testo all'interno della cancellazione non è identificata come cancellata anche se chiaramente dovrebbe esserlo
+
+
+ the deletion is not faulty.
+ 삭제가 잘못된 것이 아니다.
+ la cancelación no es defectuosa.
+
+ 当該削除部分は,間違いではない.
+
+ l'indication de suppression n'est pas
+erronée.
+ la cancellazione non è erronea
+
+
+
+
Status information on each deletion is needed rather rarely
+ except in critical editions from authorial manuscripts; status
+ information on additions is even less common.
+
Marking a deletion or addition as faulty is inescapably an
+ interpretive act; the usual test applied in practice is the
+ linguistic acceptability of the text with and without the
+ letters or words in question.
+
+
+
Il est rarement nécessaire de donner de l'information sur le statut de chaque
+ suppression sauf dans le cas des éditions critiques de manuscrits d'auteur,
+ l'information sur le statut des additions étant encore plus rare.
+
L'indication d'une suppression ou d'une addition comme erronée est indéniablement un acte
+ d'interprétation ; le test habituel appliqué dans la pratique est
+ l'acceptabilité linguistique du texte avec et sans les lettres ou mots en
+ question.
+
+
+
La información del estado de cada cancelación se necesita raramente, excepto en las ediciones críticas de los manuscritos de autor; la información del estado sobre las adiciones es incluso menos común.
+
El marcaje de una cancelación o una adición como defectuoso es ineludible en un acto interpretativo; el test generalmente aplicado en la práctica es la aceptabilidad lingüística del texto con y sin las letras o las palabras en cuestión.
+
+
+
+ documents the presumed cause for the intervention.
+
+
+
+ repeated for the purpose of fixation
+
+
+ repeated to clarify a previously illegible or badly written text
+ or mark
+
+
+
+
+
+ sequence
+ 연쇄
+ secuencia
+ séquence
+ sequenza
+ assigns a sequence number related to the order in which
+ the encoded features carrying this attribute are believed to have occurred.
+ 이 속성을 포함하는 부호화된 자질이 발생했다고 가정되는 순서와 관련된 번호를 할당한다.
+ asigna un número de serie relacionado con el orden en el cual se cree que se han sucedido las características codificadas que llevan este atributo.
+
+ 当該属性が示す素性が出現すると想定されている順番の,番号を示す.
+
+ assigne un numéro séquentiel relatif à l'ordre
+dans lequel les traits encodés portant cet attribut sont supposés être apparus.
+ stabilisce un numero sequenziale relativo all'ordine in cui si ritiene che ricorrano i tratti codificati ai quali è assegnato tale attributo
+
+
+
+
+
+
+
+
+
+ provides attributes used to indicate the status of a translatable
+portion of an ODD document.
+ ODD 문서의 번역 가능 부분의 상태를 나타내는 속성을 제시한다.
+ 提供的屬性指出ODD文件中可翻譯部分的狀態。
+
+ ODD文書中の翻訳可能部分の状態を表す属性を示す.
+
+ fournit les attributs utilisés pour indiquer le statut
+ d'une partie traduisible d'un document ODD.
+ proporciona atributos utilizados para indicar el estatus de un fragmento traducibile de un documento aislado.
+ assegna degli attributi utilizzati per indicare lo status di una porzione traducibile di un documento isolato
+
+
+ specifies the date on which the source text was extracted and sent to the translator
+ 번역 버전이 도출된 원본의 버전 이름 또는 수를 명시한다.
+ 說明該翻譯版本來源的版本名稱或版本數
+
+ 翻訳対象となった元資料のバージョンを示す.
+
+ spécifie le nom de la version ou le numéro de la
+ source dont la version traduite a été tirée.
+ indica nombre o número de versión del original del cual deriva la versione traducida
+ indica nome o numero di versione dell'originale da cui deriva la versione tradotta
+
+
+
The versionDate attribute can be used to
+ determine whether a translation might
+ need to be revisited, by comparing the modification date on the
+ containing file with the versionDate value on the translation. If the
+ file has changed, changelogs can be checked to see whether the source
+ text has been modified since the translation was made.
+
+
+
+
+ provides attributes for specifying the specific part of a bibliographic item being cited.
+
+
+
+ identifie le type d'information
+ que transmet l'élément, par exemple colonnes, pages, volume, etc.
+ identifies the unit of information conveyed by the element, e.g. columns, pages, volume.
+
+
+
+ 권
+ el elemento contiene el número de un volumen.
+ the element contains a volume number.
+ 권수를 포함한다.
+ 該元素標記的內容為冊號。
+ el elemento contiene el número de volumen.
+ 当該要素の巻番号を示す.
+ l'élément contient un numéro de volume.
+ l'elemento contiene il numero del volume.
+
+
+ the element contains an issue number, or volume and
+ issue numbers.
+ 호, 또는 권과 호를 포함한다.
+ 該元素標記的內容為一期刊號或冊號與期刊號。
+ el elemento contiene el número de la edición, o los números del volumen y de la edición.
+ 当該要素は,発行番号,巻番と号番を示す.
+ l'élément contient un numéro de
+ livraison ou bien un numéro de volume et de livraison.
+ l'elemento contiene l'indicazione del numero della pubblicazione
+
+
+ 페이지
+ pagine
+ el elemento contiene un número de página o el intervalo de páginas.
+ the element contains a page number or page range.
+ 페이지 번호 또는 페이지 범위를 포함한다.
+ 該元素標記的內容為一頁數或頁數範圍。
+ el elemento contiene una página o un intervalo de páginas.
+
+ 当該要素は,ページ番号またはページ範囲を示す.
+ l'élément contient un nombre de pages
+ ou l'étendue de sélection des pages.
+ l'elemento contiene l'indicazione di pagina o pagine
+
+
+ the element contains a line number or line range.
+
+
+ 장
+ capítulo
+ chapitre
+ capitolo
+ the element contains a chapter indication (number
+ and/or title)
+ 장 표시(숫자와/또는 제목)를 포함한다.
+ el elemento contiene la indicación del capítulo (número y/o el título)
+ 当該要素は,章の識別子(番号や名前)を示す.
+ l'élément contient une indication de
+ chapitre (le numéro et/ou le titre)
+ l'elemento contiene un'indicazione di capitolo (numero e/o titolo
+
+
+ the element identifies a part of a book or collection.
+ 책 또는 모음집의 부분을 식별한다.
+ 該元素標明的內容為單書或集合作品的一部份。
+ el elemento identifica una parte de un libro o de una colección.
+ 当該要素は,書籍や叢書の部分を特定する.
+ l'élément identifie une partie d'un
+ livre ou une anthologie.
+ l'elemento identifica una parte di un libro o di una raccolta
+
+
+ the element identifies a column.
+
+
+
+
+ specifies the starting point of the range of units indicated by the unit attribute.
+
+
+
+ specifies the end-point of the range of units indicated by the unit attribute.
+
+
+
+
+
+
+
Model Classes
Informal Element Classifications
+ groups elements which contain names of individuals
+or corporate bodies.
+ 개인 또는 기업체의 이름을 포함하는 요소를 모아 놓는다.
+ 匯集包含個人或團體名稱的元素。
+ 個人や団体の名前を含む要素をまとめる.
+ regroupe des éléments qui contiennent des noms
+ d'individus ou de personnes morales.
+ agrupa elementos que contienen nombres de individuos o de agrupaciones o sociedades.
+ raggruppa elementi che contengono nomi di individui o enti societari
+
+
+
+
+
This class is used in the content model of elements which
+ reference names of people or organizations.
+
+
+
Cette classe est utilisée dans le modèle de contenu des éléments qui référencent des
+ noms de personnes ou d'organisations.
+
+
+
Esta clase se utiliza en el modelo de elementos cuyos nombres se refieren a gente o a organizaciones.
+
+
+
+ 当該クラスは,人物や団体の名前を参照する要素の内容モデル中で使用さ
+ れる.
+
+
+
+
+
+
+ groups elements used for arbitrary segmentation.
+ 임의적 분할에 사용되는 요소를 모아 놓는다.
+ 匯集用於隨機分割的元素。
+ 任意の区分で使用される要素をまとめる.
+ regroupe des éléments utilisés pour une segmentation
+ arbitraire.
+ agrupa elementos usados por una segmentación arbitraria.
+ raggruppa elementi utilizzati per una segmentazione
+ arbitraria
+
+
+
+
+
+
The principles on which segmentation is carried out, and any special codes or attribute
+ values used, should be defined explicitly in the segmentation element of the
+ encodingDesc within the associated TEI header.
+
+
+
Les principes sur lesquels repose la segmentation, ainsi que tout code particulier ou valeur
+ d'attribut utilisée, doivent être définis explicitement dans l'élément segmentation de
+ l'élément encodingDesc situé dans l'En-tête TEI associé.
+
+
+
Los principios en los cuales se realiza la segmentación, y cualesquiera sean los códigos o
+ valores de atributo especiales usados, se deben definir explícitamente en el elemento
+ segmentación del encodingDesc dentro del encabezado TEI asociado.
+
+
+
+
+
+
+ groups phrase-level elements which are typographically distinct but to which no specific
+ function can be attributed.
+ 인쇄상 구분되나 특정 기능이 없는 구 층위 요소를 모아 놓는다.
+ 匯集的詞組層次元素與顯目標示相關,且無特定語義
+ 印刷上他とは異なるが,特別な機能は付与されていない,句レベルの要素を まとめる.
+ regroupe des éléments du niveau de l’expression qui sont
+ typographiquement distincts mais auxquels aucune fonction spécifique ne peut être attribuée.
+ agrupa elementos de nivel sintagmático para subrayar que
+ no tienen una semántica específica.
+ raggruppa elementi a livello sintagmatico relativi a
+ evidenziatura
+
+
+
+
+
+
+
+
+
+ groups phrase-level elements which are typographically
+ distinct and to which a specific function can be attributed.
+ 인쇄상 구분되며 특정 기능을 수행하는 구-층위 요소를 모아 놓는다.
+ 匯集語義上的詞組層次元素
+ 印刷上他とは異なり,特定の機能が付与されている,句レベルの要素をまと
+ める.
+ regroupe des éléments qui sont distingués visuellement, et auxquels on peut attribuer une signification sémantique.
+ raggruppa elementi a livello di sintagma tipograficamente distinti e ai quali è attribuibile una funzione specifica
+ agrupa elementos sintagmáticos semánticos.
+
+
+
+
+
+
+
+
+ groups phrase-level elements which are typographically distinct.
+ 인쇄상 구분되는 구-층위 요소를 모아 놓는다.
+ 匯集與顯目標示相關的詞組層次元素。
+ 印刷上他とは異なる,句レベルの要素をまとめる.
+ regroupe des éléments du niveau de l'expression qui sont
+ typographiquement distincts.
+ raggruppa elementi a livello di sintagma tipograficamente
+ distinti
+ agrupa elementos de nivel sintagmático relativos al
+ énfasis.
+
+
+
+
+
+
+
+ groups elements containing temporal expressions.
+ 시간 표현을 포함하는 요소를 모아 놓는다.
+ 匯集包含時間格式的元素。
+ 時間表現用の要素をまとめる.
+ regroupe des éléments contenant des expressions relatives
+ au temps.
+ agrupa elementos que contienen expresiones temporales.
+ raggruppa elementi che contengono indicazioni relative a
+ date
+
+
+
+
+
+
+
+
+
+
+ groups elements which describe a measurement forming part of
+ the physical dimensions of some object.
+
+ groups elements which denote a number, a quantity, a measurement, or similar piece of text
+ that conveys some numerical meaning.
+ 숫자, 양, 측정값 등 수치적 의미를 드러내는 텍스트 부분을 가리키는 요소를 모아 놓는다.
+ 匯集的元素代表一個數字、數量、度量,或類似的文字,傳達某些數值上的意義
+ 数値,量,計測値など,数値的意味を示すテキストを示す要素をまとめる.
+ regroupe des éléments qui indiquent un nombre, une
+ quantité, une mesure ou un extrait d'un texte qui porte une signification numérique.
+ agrupa elementos que contienen un número, una cantidad,
+ una medida, o un fragmento de texto similar que refleja algún significado numérico.
+ raggruppa elementi riferiti a numeri, quantità,
+ misurazioni o altra porzione di testo che veicola un significato di tipo numerico
+
+
+
+
+
+
+
+ groups elements containing examples or illustrations.
+ 예 또는 실례를 포함하는 요소를 모아 놓는다.
+ 匯集包含範例的元素
+ 例または挿絵を示す要素をまとめる.
+ regroupe des éléments contenant des exemples ou des
+ illustrations.
+ raggruppa elementi che contengono esempi o illustrazioni
+ agrupa elementos que contienen ejemplos.
+
+
+
+
+
+
+
+
+ groups elements containing images, formulae, and
+ similar objects.
+ 이미지, 수식, 그리고 유사 대상을 포함하는 요소를 모아 놓는다.
+ 匯集的元素包含影像、方程式和類似物件
+ 画像や式などを含む要素をまとめる.
+ regroupe des éléments contenant des images, des
+ formules et d'autres objets semblables.
+ agrupa elementos que contienen imágenes, fórmulas u objetos similares.
+ raggruppa elementi che contengono immagini, formule, esempi, e oggetti simili
+
+
+
+
+
+
+
+ groups elements which can appear only as part of a place name.
+ 장소명의 부분으로서만 나타날 수 있는 요소를 모아 놓는다.
+ agrupa los elementos que pueden aparecer solamente como
+ parte de un topónimo.
+ 場所名の部分として出現可能な要素をまとめる.
+ regroupe des éléments qui ne peuvent apparaître que sous la forme d'une partie d'un toponyme.
+ raggruppa elementi che risultano solo come parte di un
+ nome di luogo
+
+
+
+
+
+
+
+ groups phrase-level elements used in manuscript description.
+ 원고 기술에서 사용되는 구-층위 요소를 모아 놓는다.
+ 匯集描述寫本的元素
+ 手書き資料における,句レベルの要素をまとめる.
+ regroupe des éléments de niveau expression utilisés pour décrire
+ des manuscrits
+ agrupa les elementos empleados en la descripción de
+ manuscritos.
+ raggruppa gli elementi utilizzati per descrivere
+ manoscritti
+
+
+
+
+
+
+
+
+ groups phrase-level elements for simple editorial interventions that may be useful both
+in transcribing and in authoring.
+ 전사와 저작 모두에서 유용할 수 있는 간단한 편집 간섭에 대한 구-층위 요소를 모아 놓는다.
+ 匯集的詞組層次元素用於簡單的編輯更正,且有助於轉錄和編寫
+
+ 転記や編集の両方で使用される,単純な編集上の調整を示す,句レベルの要
+ 素をまとめる.
+ regroupe des éléments de niveau expression, utilisés pour de
+ simples interventions éditoriales utiles dans la transcription comme dans la rédaction.
+ raggruppa elementi a livello di sintagma per semplici interventi editoriali, utili sia per il trascrittore che per l'autore
+ agrupa elementos a nivel sintagmático utilizados para simples intervenciones editoriales que pueden ser útiles tanto en la transcripción como para autoría.
+
+
+
+
+
+
+
+
+ groups phrase-level elements used for editorial transcription of pre-existing source
+ materials.
+ 앞서 존재하는 원본 자료의 편집상 전사에 사용되는 구-층위 요소를 모아 놓는다.
+ 僅匯集用於簡單的編輯更正和轉錄、而未能助於編寫的詞組層次元素
+ 現存している資料に,編集を加えて転記する際に使う,句レベルの要素をま とめる.
+ regroupe des éléments de niveau expression, utilisés pour
+ des transcriptions éditoriales de sources pré-existantes
+ raggruppa elementi a livello di sintagma utilizzati per
+ la trascrizione di fonti preesistenti
+ agrupa solo elementos sintagmáticos utilizados para
+ simples correcciones y transcripciones editoriales que no parecen ser útiles para la autoría.
+
+
+
+
+
+
+
+
+ groups phrase-level elements for simple editorial correction and transcription.
+ 간단한 편집상 수정과 전사에 대한 구-층위 요소를 모아 놓는다.
+ 匯集的詞組層次元素用於簡單的編輯更正或轉錄
+ 単純な編集上の修正や転記を示す,句レベルの要素をまとめる.
+ regroupe des éléments de niveau expression, utilisés pour de simples interventions éditoriales de
+ corrections et de transcriptions.
+ agrupa elementos de nivel sintagmático utilizados para
+ simples correcciones o transcripciones editoriales.
+ raggruppa elementi a livello sintagmatico utilizzati per
+ semplici interventi editoriali di correzione e trascrizione
+
+
+
+
+
+
+
+ groups transcriptional elements which appear within lines or
+ zones of a source-oriented transcription within a sourceDoc
+ element.
+ regroupe des éléments qui peuvent figurer dans les zones d'une transcription orientée source dans un élément sourceDoc.
+
+ groups elements used for purposes of location and reference.
+ 위치 및 참조에 대한 요소를 모아 놓는다.
+ 匯集的元素用於位置和參照
+ 場所や参照を示すための要素をまとめる.
+ regroupe des éléments utilisés pour localiser et faire référence à quelque chose.
+ agrupa elementos usados para establecer localizaciones y
+ referencias.
+ raggruppa elementi utilizzati per stabilire collocazioni
+ e riferimenti
+
+
+
+
+
+
+
+
+
+ groups phrase-level elements which may appear within verse only.
+ 운문 내에서만 나타날 수 있는 구-층위 요소를 모아 놓는다.
+ 匯集僅可能出現於韻文內的詞組層次元素。
+ 韻文内にのみある,句レベルの要素をまとめる.
+ regroupe des éléments du niveau de l'expression qui ne
+ peuvent apparaître que dans des vers.
+ agrupa elementos de nivel sintagmático utilizados sólo
+ para los versos.
+ raggruppa elementi a livello sintagmatico utilizzati solo
+ per i versi
+
+
+
+
+
+
+
+ groups globally available elements which describe the status of other elements.
+ 다른 요소의 상태를 기술하며, 전체적으로 이용가능한 요소를 모아 놓는다.
+ 匯集描述其他元素狀態的空白元素,例如連結或抽象詮釋,或者提供正確度等,且空白元素可能出現於文件任一處。
+ 他の要素の状態を示す,どこでも使える要素をまとめる.
+ regroupe des éléments disponibles globalement qui
+ décrivent le statut d'autres éléments.
+ agrupa elementos vacíos que describen el estatus de otros
+ elementos, p.ej. estableciendo grupos de relaciones o interpretaciones abstractas, o bien
+ proporcionando indicaciones de certeza, etc., y que pueden aparecer en cualquier punto de un
+ documento.
+ raggruppa elementi vuoti che descrivono lo status di
+ altri elementi, per esempio stabilendo gruppi di collegamenti o interpretazioni astratte, oppure
+ fornendo indicazioni di certezza, ecc., e che possono apparire in qualsiasi punto all'interno di
+ un documento
+
+
+
+
+
Elements in this class are typically used to hold groups of links or of abstract
+ interpretations, or by provide indications of certainty etc. It may find be convenient to
+ localize all metadata elements, for example to contain them within the same divison as the
+ elements that they relate to; or to locate them all to a division of their own. They may
+ however appear at any point in a TEI text.
+
+
+
Les éléments de cette classe sont utilisés pour contenir des groupes de liens ou
+ d'interprétations abstraites, ou pour fournir des indications quant à la certitude, etc. Il
+ peut être commode de situer tous les éléments contenant des métadonnées, par exemple de les
+ rassembler dans la même divison que les éléments auxquels ils sont reliés ; ou de les
+ retrouver tous dans la division qui leur est propre. Ils peuvent cependant apparaître à un
+ point quelconque d'un texte TEI.
+
+
+
Los elementos en esta clase se utilizan típicamente para llevar a cabo los grupos de
+ conexiones o de interpretaciones abstractas, o bien para proporcionar indicaciones de la
+ certeza etc. Puede ser conveniente localizar todos los elementos de los metadatos, por ejemplo
+ para contenerlos dentro de la misma división que los elementos con los cuales se relacionan; o
+ para localizarlos todos en la división que les es propia. Sin embargo pueden aparecer en
+ cualquier momento en un texto de TEI.
+
+
+
+
+
+ groups milestone-style
+elements used to represent reference systems.
+ 참조 체계를 표상하는 이정표 유형의 요소를 모아 놓는다.
+ 匯集用於呈現參照系統的類似分界點元素
+ 参照システムを示すための,標石要素相当の要素をまとめる.
+ regroupe des éléments de type borne utilisés pour
+ représenter des systèmes de référence
+ agrupa elementos del tipo frontera (milestone) utilizados para representar sistemas de referencia.
+ raggruppa elementi del tipo milestone utilizzati per rappresentare sistemi di riferimento
+
+
+
+
+
+
+
+
+
+ groups elements used to represent individual non-Unicode characters or glyphs.
+ 개별 비유니코드 문자 또는 그림문자를 표상하는 요소를 모아 놓는다.
+ 匯集的元素穿插於正規文本中,代表非統一碼項目。
+ ユニコードになる文字やグリフを示す要素をまとめる.
+ regroupe des éléments utilisés pour représenter
+ différents caractères non-Unicode ou différents glyphes.
+ agrupa elementos que son
+ raggruppa elementi di cui è inframmezzato il testo che
+ rapresentano oggetti non Unicode
+
+
+
+ groups elements which generate declarations in some markup language in ODD documents.
+ ODD 문서에서 마크업 언어로 선언을 생성하는 요소를 모아 놓는다.
+ 匯集的元素使ODD文件內某些標記語言中產生宣告。
+ ODD文書で使用される要素の宣言を生成する要素をまとめる.
+ regroupe les éléments qui, dans des documents ODD,
+ génèrent des déclarations dans un langage d'encodage.
+ agrupa elementos que generan declaraciones en un lenguaje
+ de codificación dado en documentos aislados
+ raggruppa elementi che generano dichiarazioni in un dato
+ linguaggio di codifica in documenti isolati
+
+
+
+
+
+ groups elements which reference declarations in some markup language in ODD documents.
+ ODD 문서에서 마크업 언어로 선언을 참조하는 요소를 모아 놓는다.
+ 匯集的元素參照到ODD文件中某些標記語言的宣告。
+ ODD文書中で使用される要素の宣言を参照する要素をまとめる.
+ regroupe les éléments qui, dans des documents ODD, font
+ référence aux déclarations dans un langage d'encodage.
+ agrupa elementos que hacen referencia a declaraciones en
+ un lenguaje dado de codificación en documentos aislados.
+ raggruppa elementi che fanno riferimento a dichiarazioni
+ in un dato linguaggio di codifica in documenti isolati
+
+ groups phrase-level elements used to encode XML constructs such as element names, attribute
+ names, and attribute values
+ 요소명, 속성명, 그리고 속성값과 같이 XML 구성물을 부호화하는 구-층위 요소를 모아 놓는다.
+ XML要素を符号化する,句レベルの要素をまとめる.例えば,要素名,属性 名,属性値など.
+ regroupe des éléments de niveau expression utilisés pour
+ encoder des constructions XML telles que des noms d'éléments, des noms d'attributs ou des
+ valeurs d'attributs
+ raggruppa elementi a livello di sintagma utilizzati per
+ codificare costrutti XML quali nomi di elementi e nomi e valori di attributi
+ agrupa elementos usados para codificar construcciones en
+ XML en el nivel sintagmático, p.ej. nombre de elemento, nombres de atributo, y valores de
+ atributo.
+
+
+
+
+
+
+
+
+ groups elements for referring to specification elements.
+ 명시 요소를 참조하는 요소를 모아 놓는다.
+ 匯集的元素參照到細節元素
+ 特定の要素を参照する要素をまとめる.
+ regroupe les éléments pour se référer aux éléments de
+ spécification
+ raggruppa elementi indicanti i componenti di una data specifica
+ agrupa elementos para referir elementos de especificación
+
+
+
+
+
+
+
+ groups elements containing a bibliographic description.
+ 서지 기술을 포함하는 요소를 모아 놓는다.
+ 匯集包含書目描述的元素。
+ 書誌情報を含む要素をまとめる.
+ regroupe des éléments contenant une description
+ bibliographique.
+ agrupa elementos que contienen una descripción bibliográfica.
+ raggruppa elementi che contengono una descrizione bibliografica
+
+
+
+
+
+
+
+
+
+ groups elements used to provide a title or heading at the start of a text
+ division.
+ 텍스트 구역의 시작부에서 제목 또는 표제를 제시하는 요소를 모아 놓는다.
+ agrupa los elementos usados para proporcionar un título o un encabezadoa al principio de una división textual.
+ テキスト部分の始まりにあるタイトルや見出しを示す要素をまとめる.
+ regroupe des éléments employés pour donner un titre ou
+un intitulé au début d'une division de texte
+ raggruppa elementi utilizzati per fornire un titolo all'inizio di una partizione testuale
+
+
+
+
+ groups elements used to gloss or explain other parts of a document.
+ 문서의 다른 부분을 해설 또는 설명하는 요소를 모아 놓는다.
+ agrupa los elementos usados para glosar o para explicar otras partes de un documento.
+ 文書中の他の部分をまとめたり説明するために使われる要素をまとめる.
+ regroupe des éléments employés pour gloser ou
+expliquer d'autres parties d'un document.
+ raggruppa elementi utilizzati per spiegare o illustrare altre parti di un documento
+
+
+
+
+ groups list-like elements.
+ 목록 같은 요소를 모아 놓는다.
+ 匯集所有類似列表的元素
+ リスト相当の要素をまとめる.
+ regroupe les éléments de type liste.
+ agrupa todos los elementos del tipo de lista.
+ raggruppa tutti gli elementi del tipo lista
+
+
+
+
+
+
+
+
+ groups globally-available note-like elements.
+ 전체적으로 이용 가능한 주석 같은 요소를 모아 놓는다.
+ 匯集所有類似註解的元素。
+ どこでも出現可能な,注釈相当の要素をまとめる.
+ regroupe tous les éléments globaux de type
+ note
+ agrupa todos los elementos del tipo de nota.
+ raggruppa tutti gli elementi del tipo nota
+
+
+
+
+
+
+
+
+ groups elements representing metrical components such as verse lines.
+ 운문 행 같이 운율적 성분을 표상하는 요소를 모아 놓는다.
+ 匯集代表韻律組件的元素,例如詩行。
+ 韻文の行のような,韻律的構成要素となる要素をまとめる.
+ regroupe des éléments représentant des composants
+ de la métrique comme des vers.
+ agrupa elementos que representan componentes métricos como los versos.
+ raggruppa elementi che rappresentano componenti metriche come i versi
+
+
+
+
+ groups paragraph-like elements.
+ 문단 같은 요소를 모아 놓는다.
+ 該元素集是以交換資料為目的段落。
+ 段落相当の要素をまとめる.
+ regroupe des éléments de type paragraphe.
+ la clase de elementos de tipo párrafa con la finalidad de
+ intercambio.
+ classe di elementi di tipo paragrafo a scopo di
+ interscambio.
+
+
+
+
+
+ groups elements containing stage directions or similar things defined by the module for
+ performance texts.
+ 공연 텍스트의 모듈에 의해 정의된 무대 지시 또는 유사 내용을 포함하는 요소를 모아 놓는다.
+ 匯集的元素包含特殊的舞台指示,定義於劇本的附加標籤組中。
+ 舞台芸術モジュールで定義されている,ト書きなどを示す要素をまとめる.
+ regroupe des éléments contenant des indications scéniques
+ ou des indications de même nature, définies par le module relatif aux textes de théâtre
+ aggrupa elementos que contienen indicaciones específicas
+ de escena definidas en el conjunto adicional de marcadores de textos teatrales.
+ raggruppa elementi che contengono specifiche indicazioni
+ di scena definite nell'insieme aggiuntivo di marcatori per testi teatrali
+
+
+
+
+
+
Stage directions are members of class inter: that is, they can appear between or
+ within component-level elements.
+
+
+
Les indications scéniques appartiennent à la classe inter : cela signifie
+ qu'elles peuvent apparaître à l'intérieur d'éléments de niveau composant ou bien entre ces éléments.
+
+
+
Las direcciones de etapa son miembros de la clase inter: es decir, pueden
+ aparecer entre o dentro de los elementos del componente-nivel.
+
+
+
+
+
+ groups elements which express complex feature values in feature
+structures.
+ 자질구조에서 복잡한 자질값을 표현하는 요소를 모아 놓는다.
+ 匯集的元素表示功能結構中的複合功能值。
+ 素性構造中の複雑な素性値を表す要素をまとめる.
+ regroupe des éléments qui expriment des valeurs de
+traits complexes dans des structures de traits
+ raggruppa elementi che esprimono valori di tratti complessi in strutture di tratti
+ agrupa elementos que exprimen valores de rasgos complejos en estructuras de rasgos.
+
+
+
+
+ group elements used to represent atomic feature values in feature structures.
+ 자질구조에서 원자 자질 값을 표상하는 요소를 모아 놓는다.
+ 匯集的元素代表功能結構中的原子功能值。
+ 素性構造中の,原子的素性値を表す要素をまとめる.
+ regroupe des éléments employés pour représenter des
+valeurs de traits atomiques dans des structures de traits
+ raggruppa elementi utilizzati per descrivere valori di tratti atomici in strutture di tratti
+ agrupa elementos utilizados para describir valores de rasgos aislados en estructuras de rasgos.
+
+
+
+
+ groups non-morphological elements appearing within a dictionary entry.
+ 사전 표제어 내의 어떤 층위에서도 나타날 수 있는 요소를 모아 놓는다.
+ 匯集所有專為字典所定義的元素。
+ 辞書項目中の,どのレベルにも現れる要素をまとめる.
+ regroupe des éléments qui peuvent apparaître à tout
+niveau dans une entrée de dictionnaire.
+ raggruppa tutti gli elementi specificatamente definiti per i dizionari.
+ agrupa todos los elementos definidos específicamente para diccionarios.
+
+
+
+
+ groups high level elements within a structured dictionary entry
+ 구조화된 사전 표제어 내의 고급 층위 요소를 모아 놓는다.
+ 匯集一個字典辭條的相關部分,構成一致的分支區段,例如一個特殊字義、同音異義字等。
+ 構造化されている辞書項目中にある,上位レベルの要素をまとめる.
+ regroupe des éléments de la macrostructure d'un
+dictionnaire structuré
+ raggruppa le parti di una voce di dizionario che costituiscono una suddivisione coerente, per esempio un dato significato, omonimo, ecc.
+ agrupa las partes de una entrada de diccionario que constituyen una subdivisión coherente, p.ej, un significado dado, homónimo, etc.
+
+
Members of this class typically contain related parts of a
+dictionary entry which form a coherent
+subdivision, for example a particular sense, homonym, etc.
+
+
+
+
Les membres de cette classe contiennent typiquement des parties d'une entrée de
+ dictionnaire liées et formant une subdivision cohérente, par exemple un sens
+ particulier, un homonyme etc.
+
+
+
Los miembros de esta clase contienen normalmente partes relativas a entrada de diccionario y que forman una subdivisión coherente, por ejemplo un significado particular, un homónimo, etc.
+
+
+
+
+
+
+ groups elements which describe events.
+
+
+
+
+
+ groups globally available elements which perform a specifically editorial function.
+ 명확한 편집 기능을 수행하며, 전체적으로 이용 가능한 요소를 모아 놓는다.
+ 匯集的空白元素有特殊的編輯功能,例如指出來源文件中一個文字段的附加、刪除、或缺漏的起始點。
+ 特に編集機能を担い,どこでも使用できる要素をまとめる.
+ regroupe des éléments globalement disponibles qui
+ exécutent une fonction spécifiquement éditoriale.
+ agrupa elementos vacíos con funciones editoriales
+ específicas, p.ej. la indicación del comienzo de un fragmento de texto añadido, omitido o
+ perdido en el original.
+ raggruppa elementi vuoti con funzioni editoriali
+ specifiche, per esempio l'indicazione dell'inizio di una porzione di testo aggiunto, rimosso o
+ mancante nell'originale
+
+
+
+
+
+
+
+ groups elements
+which may appear globally within spoken texts.
+ 구어 텍스트 전체에 나타날 수 있는 요소들을 모아 놓는다.
+ 発話テキスト内のどこにでも使える要素をまとめる.
+ regroupe des éléments qui peuvent apparaître
+généralement dans des textes oraux
+ comprende gli elementi a livello di componente specifici dei testi parlati
+ agrupa los elementos que aparecen a nivel de componente específicamente en los textos dialogados.
+
+
+
+
+
This class groups elements which can appear anywhere within
+ transcribed speech.
+
+
+
Cette classe regroupe des éléments pouvant se situer n'importe où dans une
+ transcription de la parole.
+
+
+
Esta clase agrupa elementos que pueden aparecer dondequiera dentro del discurso transcrito.
+
+
+
+ 当該クラスは,転記された発話内でどこにでも出現可能な要素をまとめる.
+
+
+
+
+
+
+ groups paragraph-level elements appearing directly within divisions.
+ 구역 내에서 직접적으로 나타나는 문단-층위 요소를 모아 놓는다.
+ 匯集可出現於段落與其他區塊之間,而非出現於兩者之內的元素。
+ テキスト部分中にある段落レベルの要素をまとめる.
+ regroupe des éléments de niveau paragraphe apparaissant
+ directement dans des divisions
+ agrupa elementos que pueden aparecer entre párrafos u
+ otras divisiones, pero no dentro de estos.
+ raggruppa elementi che compaiono tra paragrafi e altre
+ porzioni di testo ma non al loro interno
+
+
+
+
+
Note that this element class does not include members of the model.inter class, which can appear either within or between paragraph-level items.
+
+
+
+
Noter que cette classe d'éléments ne comprend pas les membres de la classe model.inter, qui peuvent apparaître soit à l'intérieur, soit entre des
+ items de niveau paragraphe.
+
+
+
Observa que esta clase de elemento no incluye a los miembros de la clase model.inter, que puede aparecer dentro o entre los items del nivel-párrafo.
+
+
+
+
+
+ groups elements describing changeable characteristics of a person which have a definite
+ duration, for example occupation, residence, or name.
+ 직업, 거주지, 이름과 같이 일정 기간 유지되는 변화가능한 사람의 특성을 기술하는 요소를 모아 놓는다.
+ 該元素集描述人物的可改變特性,有明確的時間長度,例如職業、居所、姓名等。這些特性通常是個人或他人行為的結果。
+ 一定期間で変容する,個人の特性を示す要素をまとめる.例えば,仕事,住 所,名前など.
+ regroupe des éléments décrivant les caractéristiques
+ d'une personne, variables mais définies dans le temps, par exemple sa profession, son lieu de
+ résidence ou son nom.
+ clase de elementos que describen las características
+ mutables o con una duración determinada en una persona, p.ej. ocupación, residencia, nombre,
+ etc.; tales características de un individuo representan generalmente una consecuencia de sus
+ acciones o de las de otros.
+ classe di elementi che descrivono le caratteristiche
+ mutevoli e con una determinata durata di una persona, per esempio occupazione, residenza, nome,
+ ecc.; tali caratteristiche di un individuo rappresentano in genere una conseguenza delle sue
+ azioni o di quelle degli altri
+
+
+
+
+
These characteristics of an individual are typically a consequence of their own action or
+ that of others.
+
+
+
Il s'agit en général des caractéristiques d'un individu résultant de sa propre action ou de
+ celle d'autrui.
+
+
+
Estas características de un individuo son típicamente una consecuencia de su propia acción o
+ de la de otros.
+
+
+
当該個人の特性は,自らの行動などによる結果である.
+
+
+ groups elements which provide information about people and their relationships.
+ 사람과 그들의 친족관계에 관한 정보를 제공하는 요소를 모아 놓는다.
+ 該元素集提供人物及人物關係的資訊。
+ 人々やその関係を表す情報を示す要素をまとめる.
+ regroupe des éléments qui donnent des informations
+ sur des personnes et leurs relations.
+ clase de elementos utilizados para proporcionar
+ informaciones relativas a personas y a las relaciones entre estas.
+ classe di elementi utilizzati per fornire informazioni
+ relative a persone e relazioni tra le stesse
+
+
+
+ groups elements which form part of the description of a person.
+ 개인에 대한 기술의 부분을 형성하는 요소를 모아 놓는다.
+ 匯集的元素描述由文本所參照、或參與語言互動的人物特性。
+ 個人の説明する部分となる要素をまとめる.
+ regroupe des éléments qui font partie de la description
+ d'une personne
+ agrupa elementos que describen determinadas
+ características de las personas a las cuales se hace referencia en el texto o que participan en
+ una interacción verbal.
+ raggruppa elementi che descrivono determinate
+ caratteristiche delle persone a cui si fa riferimento nel testo o che partecipano a
+ un'interazione verbale
+
+
+
+
+ groups elements which form part of a place name.
+ 장소명의 부분을 형성하는 요소를 모아 놓는다.
+ 匯集構成地點名稱部分的元素。
+ 場所名の部分となる要素をまとめる.
+ regroupe des éléments qui font partie d'un nom de lieu.
+ agrupa los elementos que forman parte del nombre de un
+ lugar
+ raggruppa gli elementi che fanno parte del nome di un
+ luogo
+
+
+
+
+
+
+
+
+ groups elements which describe changing states of a place.
+ 장소의 변화하는 상태를 기술하는 요소를 모아 놓는다.
+ agrupa los elementos que describen aspectos variables de
+ un lugar.
+ 場所の変容を示す要素をまとめる.
+ regroupe des éléments qui décrivent les transformations d'un lieu
+ raggruppa elementi che descrivono stati mutevoli di un
+ luogo
+
+
+
+
+ groups elements which form part of the description of an
+ organization.
+
+ groups the child
+ elements of a publicationStmt element of the TEI header
+ that indicate an authorising agent.
+ TEI 헤더의 publicationStmt 요소 내에 나타날 수 있는 요소를 모아
+ 놓는다.
+ 匯集元素publicationStmt的子元素
+ TEIヘダーの要素publicationStmt内に出現する要素をまとめる.
+ regroupe des éléments qui peuvent apparaître à
+ l'intérieur de l'élément publicationStmt de l'En-tête TEI
+ agrupa los hijos de publicationStmt.
+ raggruppa i figli di publicationStmt
+
+
The agency child elements, while not
+ required, are required if one of the detail
+ child elements is to be used. It is not valid to have a
+ detail child element without a
+ preceding agency child element.
+
See also model.publicationStmtPart.detail.
+
+
+
+
+
+ groups the agency-specific child elements of the publicationStmt element of the TEI header.
+ TEI 헤더의 publicationStmt 요소 내에 나타날 수 있는 요소를 모아
+ 놓는다.
+ 匯集元素publicationStmt的子元素
+ TEIヘダーの要素publicationStmt内に出現する要素をまとめる.
+ regroupe des éléments qui peuvent apparaître à
+ l'intérieur de l'élément publicationStmt de l'En-tête TEI
+ agrupa los hijos de publicationStmt.
+ raggruppa i figli di publicationStmt
+
+
A detail child element may not occur
+ unless an agency child element precedes
+ it.
+
See also model.publicationStmtPart.agency.
+
+
+
+
+
+ groups elements such as licences and paragraphs of text which may appear as part of an
+ availability statement
+ regroupe des éléments tels que les licences ou les paragraphes indiquant la disponibilité d'un ouvrage.
+
+
+
+
+ groups elements which are used to indicate uncertainty or
+ precision of other elements.
+
+
+
+
+ groups elements which contain a description of their function.
+ regroupe des éléments qui contiennent une description de la fonction d'un élément.
+
+ groups elements which provide an alternative name, explanation, or description for any
+ markup construct.
+ 마크업 구성에 대한 대체명, 설명 또는 기술을 제시하는 요소를 모아 놓는다.
+ 匯集的元素提供某一標籤的替代名稱、解釋或描述。
+ 代替名またはマークアップ構造を示す要素をまとめる.
+ regroupe des éléments qui proposent un nom alternatif,
+ une explication, ou une description pour n'importe quelle structure de codage
+ agrupa los elementos que proporcionan un nombre,
+ descripción o explicación alternativa a elementos de codificación.
+ raggruppa elementi che assegnano un nome, descrizione o
+ spiegazione alternativi a elementi di codifica
+
+ groups elements used to directly contain quotations.
+ 인용을 직접 포함하는 요소를 모아 놓는다.
+ 匯集直接包含引言的元素。
+ 引用を示すために使われる要素をまとめる.
+ regroupe des éléments employés pour contenir directement
+ des citations
+ agrupa los elementos que contienen directamente las citas
+ raggruppa elementi che contengono direttamente le
+ citazioni
+
+
+
+
+
+ groups elements related to highlighting which can appear either within or between
+ chunk-level elements.
+ 덩어리 층위 요소 내에서 또는 그 사이에서 나타날 수 있는 주요 부분과 관련된 요소를 모아 놓는다.
+ 匯集和顯目標示相關、且出現於方塊性層次元素內或之間的元素。
+ 塊レベル要素内または間で出現可能な,強調部分と関連する要素をまとめる.
+ regroupe des éléments destinés à la mise en valeur, qui
+ peuvent apparaître à l'intérieur ou entre des éléments de niveau fragment.
+ agrupa elementos relativos al evidenciado que aparece al
+ interno de o entre elementos a nivel de fragmentos de texto.
+ raggruppa elementi relativi all'evidenziatura che
+ appaiono all'interno di o tra elementi a livello di porzioni di testo
+
+
+
+
+
+
+
+ groups elements which contain a single reading, other than the lemma, within a textual
+ variation.
+ 텍스트 변이형 내에서 레마 외에 단일 독법을 포함하는 요소를 모아 놓는다.
+ 所匯集的元素包含在原文變異中除了主題之外的對應本。
+ テキスト中の異なりにおいて,対象語ではなく,ひとつの解釈を示す要素を まとめる.
+ regroupe des éléments qui contiennent une seule leçon,
+ autre que le lemme, à l'intérieur d'une version du texte
+ agrupa los elementos que contienen una única lectura, a
+ excepción del lema, dentro de una variante textual.
+ raggruppa gli elementi che contengono un'unica lettura,
+ ad esclusione del lemma, entro una variante testuale
+
+
+
This class allows for variants of the rdg element to be easily created via TEI
+ customizations.
+
+
+
Cette classe permet de créer facilement des variantes de l'élément rdg, par le biais
+ de personnalisations de la TEI.
+
+
+
Esta clase permite que las variantes del elemento rdg se creen fácilmente mediante
+ las personalizaciones particulares de TEI.
+
+
+
当該クラスは,TEIのカスタマイズ機能により簡単に作られる,各種の要 素rdgをとる.
+
+
+
+
+
+ groups elements which are used to indicate intellectual or other significant responsibility,
+ for example within a bibliographic element.
+ 예를 들어 서지 요소 내에서 지적 책임을 나타내는 요소를 모아 놓는다.
+ 匯集指出智慧責任的元素,例如在書目元素內。
+ 知的責任を示す要素をまとめる.例えば,書誌情報要素内にあるもの.
+ regroupe des éléments qui sont utilisés pour indiquer une
+ responsabilité intellectuelle ou une autre responsabilité significative, par exemple dans un
+ élément bibliographique.
+ aggrupa elementos utilizados para indicar responsabilidad
+ intelectual, p.ej. dentro de un elemento bibliográfico.
+ raggruppa elementi utilizzati per indicare responsabilità
+ intellettuale, per esempio all'interno di un elemento bibliografico
+
+
+
+
+
+ groups elements which can appear at either top or bottom of a
+ textual division.
+ 텍스트 구역 상단 또는 하단에 나타날 수 있는 요소를 모아 놓는다.
+ 匯集可出現於任何區段集元素起始或結尾的元素。
+ テキスト部分の上部また下部に現れる要素をまとめる.
+ regroupe des éléments qui peuvent être placés au
+ début ou à la fin de n'importe quelle division de texte.
+ agrupa elementos que pueden aparecer al principio o al final de cualquier elemento de clase de división.
+ raggruppa gli elementi che appaiono all'inizio di una partizione testuale
+
+
+
+
+
+
+
+
+ groups elements which can occur only at the beginning of a text division.
+ 텍스트 구역의 시작부에만 나타날 수 있는 요소를 모아 놓는다.
+ agrupa los elementos que pueden aparecer solamente al
+ principio de una división textual.
+ テキスト部分の始まりにのみ現れる要素をまとめる.
+ regroupe des éléments qu'on ne trouve qu'au début d'une
+ division de texte.
+ raggruppa elementi che possono presentarsi solo
+ all'inizio di una partizione testuale
+
+
+
+
+
+
+
+ groups elements appearing at the beginning of a
+ text division.
+ 텍스트 구역 시작에 나타나는 요소를 모아 놓는다.
+ agrupa los elementos que aparecen al principio de una división textual.
+ テキスト部分の始まりに現れる要素をまとめる.
+
+
+ regroupe des éléments apparaissant au début d'une
+division de texte.
+ raggruppa elementi che si presentano all'inizio di una partizione testuale
+
+
+
+
+ groups elements which appear at the level of divisions within front or back matter of
+ performance texts only.
+ 단지 공연 텍스트 앞쪽 자료 또는 뒤쪽 자료 내의 구역 층위에서 나타나는 요소를 모아 놓는다.
+ 匯集的元素僅出現於劇本正文前或後資訊內的區段層次。
+ 演技テキストにおける前付,後付の部分レベルに現れる要素をまとめる.
+ regroupe des éléments qui n'apparaissent comme des
+ divisions que dans les parties liminaires ou finales des textes de théâtre.
+ agrupa elementos que aparecen a nivel de partición
+ textual al interno del paratexto inicial o final.
+ raggruppa elementi che appaiono a livello di partizioni
+ testuali all'interno del peritesto iniziale o del peritesto finale solo in testi di tipo
+ teatrale
+
+
+
+
+
+
+
+ groups paragraph-like elements which can occur as direct constituents of front matter.
+ 앞쪽 자료의 직접 구성성분으로 나타날 수 있는 문단 같은 요소를 모아 놓는다.
+ 未提供完整標題頁時,匯集的元素可顯示為正文前資訊的直接組成要素。
+ 前付の構成要素として出現可能な,段落相当の要素をまとめる.
+ regroupe des éléments de type paragraphe qui peuvent
+ apparaître comme des constituants directs des parties liminaires.
+ agrupa los elementos que aparecen como componentes
+ directos del paratexto inicial cuando no se da un encabezamiento electrónico.
+ raggruppa gli elementi che appaiono come componenti
+ diretti del peritesto iniziale quando non è dato un frontespizio elettronico.
+
+
+
+
+ groups elements which can occur only at the end of a text
+ division.
+ 텍스트 구역의 종료부에만 나타날 수 있는 요소를 모아 놓는다.
+ agrupa los elementos que pueden aparecer solamente al final de una división textual.
+ テキスト部分の終わりにのみ出現できる要素をまとめる.
+ regroupe des éléments qu'on ne peut trouver qu'à la
+fin d'une division de texte.
+ raggruppa elementi che possono presentarsi solo alla fine di una partizione testuale
+
+
+
+
+
+
+
+ groups elements appearing at the end of a text
+ division.
+ 텍스트 구역의 종료부에 나타타는 요소를 모아 놓는다.
+ 匯集僅可出現於文本區段結尾的元素,例如結尾題名。
+ テキストの終わりに現れる要素をまとめる.
+
+ regroupe des éléments placés à la fin d'une division de
+ texte.
+ agrupa elementos que pueden aparecer sólo al final de una
+ división textual, p.ej. un tráiler.
+ raggruppa gli elementi che appaiono alla fine di una
+ partizione testuale, per esempio trailer, byline, ecc.
+
+
+
+
+ groups elements which can occur as direct constituents of a title page, such as
+ docTitle, docAuthor, docImprint, or epigraph.
+ docTitle, docAuthor,
+ docImprint, 또는 epigraph와 같이 제목 페이지의 직접 구성성분으로 나타날 수 있는 요소를 모아 놓는다.
+ 匯集的元素可成為標題頁的直接組成要素 (元素docTitle,
+ docAuth, docImprint, epigraph等。)
+ タイトルページの構成要素となる要素をまとめる.例えば,要素 docTitle,
+ docAuth, docImprint, epigraphなど.
+ regroupe des éléments qui peuvent apparaître comme
+ constituants directs d'une page de titre (docTitle,
+ docAuth,docImprint ou epigraph)
+ agrupa los elementos que aparecen como componentes
+ directos del frontispicio electrónico (docTitle, docAuthor,
+ docImprint, epigraph, etc.)
+ raggruppa gli elementi che appaiono come componenti
+ dirette del frontespizio elettronico (docTitle, docAuthor,
+ docImprint, epigraph, ecc.)
+
+
+
+
+ groups elements which represent passages such as titles quoted from a manuscript as a part
+ of its description.
+ regroupe des éléments qui représentent des passages d'un manuscrit, tels que
+ des titres cités comme une partie de sa description
+
+
+
+
+ groups elements which can appear within a manuscript item description.
+ 원고 항목 기술 내에서 나타날 수 있는 요소를 모아 놓는다.
+ 該元素集可出現於寫本項目描述中。
+ 手書き資料の記述項目内で出現可能な要素をまとめる.
+ regroupe des éléments qui peuvent apparaître dans une
+ description de manuscrit
+ la clase de elementos que pueden aparecer dentro de la
+ descripción de un manuscrito.
+ classe di elementi che appaiono all'interno della
+ descrizione di un manoscritto
+
+ groups elements (other than choice itself) which can be used within a
+ choice alternation.
+ choice 대체 내에서 사용될 수 있는 (choice 외의) 요소를
+ 모아 놓는다.
+ 匯集的元素 (而非選擇本身) 可用於元素choice之替換
+ 要素choice中に現れる(要素choice以外の)要素をまとめ る.
+ regroupe des éléments (autres que choice) qui
+ peuvent être utilisés en alternance avec choice
+
+ agrupa los elementos (excluída el propio elemento
+ "choice") que pueden ser usados en alternancia con choice.
+ raggruppa gli elementi (escluso l'elemento choice) che
+ possono essere usati in alternanza con choice
+
+
+
+
+
+
+ groups elements used to describe details of an audio or video recording.
+ 오디오 또는 비디오 녹음에 대한 상세 항목을 기술하는 요소들을 모아 놓는다.
+ 匯集的元素用來描述聲音或影像的錄製細節
+ 録音,録画の詳細を示す要素をまとめる.
+ regroupe des éléments utilisés pour décrire les détails
+ d'un enregistrement audio ou vidéo
+ agrupa los elementos utilizados para describir los
+ detalles de una grabación de audio o video
+ raggruppa gli elementi utilizzati per descrivere i
+ dettagli di una registrazione audio o video
+
+
+
+
+ groups the bibliographic elements which occur inside imprints.
+ 간기 내에 나타날 수 있는 서지 요소를 모아 놓는다.
+ 匯集出現於版本說明內的書目元素。
+ 刊記にある書誌情報要素をまとめる.
+ regoupe les éléments bibliographiques qui apparaissent à
+ l'intérieur de documents imprimés.
+ agrupa los elementos bibliográficos que aparecen al
+ interno de las siglas editoriales.
+ raggruppa gli elementi bibliografici che appaiono
+ all'interno delle sigle editoriali
+
+
+
+
+
+
+
+ groups component elements of the TEI header Category Description.
+ regroupe des éléments composants de l'élément
+ catDesc dans l'en-tête TEI.
+ TEI 헤더 범주 기술의 성분 요소를 모아 놓는다.
+ 匯集可用於元素catDesc內、並多次出現的元素
+ TEIヘダーの要素をまとめる.
+ agrupa elementos que pueden usarse dentro de
+ catDesc y que aparecen en numerosas ocasiones.
+ raggruppa gli elementi utilizzati all'interno di
+ catDesc e che appaiono più volte
+
+ groups elements used to describe the setting of a linguistic interaction.
+ 언어 상호작용의 배경을 기술하는 요소를 모아 놓는다.
+ 用於描述語言互動背景的元素。
+ 言語交流を示す要素をまとめる.
+ regroupe des éléments utilisés pour décrire la structure d'une
+ interaction linguistique
+ elementos usados para describir el escenario de una
+ interacción lingüística
+ elementi utilizzati per descrivere lo scenario di
+ un'interazione linguistica
+
+
+
+ groups elements used to categorize a text for example in terms of its situational
+ parameters.
+ 예를 들어, 상황적 변인을 통해, 텍스트를 범주화하는 요소를 모아 놓는다.
+ 將文本分類的元素,例如以文本的狀況參數來分類。
+ テキストを分類するための要素をまとめる.例えば,状況パラメータの項目 など.
+ regroupe des éléments destinés à attribuer une catégorie à un texte, par exemple
+ en utilisant des termes qui caractérisent sa situation.
+ elementos usados para categorizar un texto, por ejemplo
+ en términos relativos a parámetros situcionales.
+ elementi utilizzati per categorizzare un testo, per
+ esempio in termini di relativi parametri situazionali
+
+
+ groups component elements of an entry in a cast list, such as dramatic role or actor's name.
+ 극에서 역할 또는 배우의 이름과 같이 등장인물 목록에서 항목의 성분 요소를 모아 놓는다.
+ 用於角色列表中一個項目內的元素,如戲劇角色或演員名稱
+ 芝居中の役や役者名などの,配役中の項目要素をまとめる.
+ regroupe des éléments composants utilisés comme entrée
+ dans une distribution, comme le nom d'un rôle ou le nom d'un acteur.
+ elementos usados dentro de una entrada en una lista de
+ personajes, por ejemplo los roles dramáticos o los nombres de actores.
+ elementi utilizzati all'interno di una voce in una lista
+ di personaggi, per esempio ruolo o nome dell'attore
+
+
+
+ groups specialized elements forming part of the physical description of a manuscript or
+ similar written source.
+ 원고 또는 유사 문어 원본의 물리적 기술 부분을 형성하는 특별한 요소를 모아 놓는다.
+ 特殊的描述性元素,包含寫本或相似書寫來源的外觀描述。
+ 手書き資料などの物理的解説を構成する要素をまとめる.
+ regroupe des éléments spécialisés constituant
+ la description physique d'un manuscrit ou d'une source écrite de même nature
+ elementos descriptivos específicos que constituyen la
+ descripción física de un manuscrito o de una fuente escrita similar.
+ elementi descrittivi specifici che costituiscono la
+ descrizione fisica di un manoscritto o di una fonte scritta simile
+
+
+ groups elements used to represent a postal or email address.
+ 우편 또는 전자메일 주소를 나타내는 요소를 모아 놓는다.
+ 匯集的詞組層次元素代表郵寄或電子郵件地址。
+ 郵便におけるまたはeメールにおけるアドレスを表す要素をまとめる.
+ regroupe des éléments employés pour représenter des
+ adresses postales ou électroniques.
+ raggruppa elementi utilizzati per rappresentare un
+ indirizzo postale o di posta elettronica
+ agrupa elementos sintagmáticos usados para representar
+ una dirección postal o electrónica.
+
+
+
+
+
+
+
+
+ groups elements which name or refer to a person, place, or organization.
+ 인물, 장소, 또는 조직의 이름 또는 지시를 나타내는 요소를 모아 놓는다.
+ 匯集的空白元素可出現於TEI文件內的任何位置。
+ 人物,場所,団体に名前を付与する,または参照する要素をまとめる.
+ regroupe des éléments qui nomment une
+ personne, un lieu ou une organisation, ou qui y font référence à.
+ agrupa los elementos que nombran o indican a una persona,
+ un lugar (construido por el hombre o geográfico), o una organización.
+ raggruppa gli elementi che nominano o indicano una
+ persona, un luogo (costruito dall'uomo o geografico), o un'organizzazione
+
+
+
+
+
+
+
A superset of the naming elements that may appear in datelines, addresses, statements of
+ responsibility, etc.
+
+
+
Un ensemble de niveau supérieur regroupant les éléments d'appellation qui peuvent apparaître
+ dans les dates, les adresses, les mentions de responsabilité, etc.
+
+
+
Un superconjunto de elementos de nombramiento que pueden aparecer en las líneas de fecha, de
+ dirección, de declaración de esponsabilidad,l etc.
+
+
+
日付欄,住所情報,責任表示等に現れる,名前を示す要素の親集合.
+
+
+ groups elements which form part of a personal name.
+ regroupe des éléments qui font partie d'un nom de
+ personne
+ 사람 이름의 부분을 형성하는 요소를 모아놓는다.
+ 匯集構成部分個人名稱的元素。
+ 個人名の部分を構成する要素をまとめる.
+ agrupa los elementos que componen un nombre propio de
+ persona.
+ raggruppa gli elementi che compongono un nome proprio
+ di persona
+
+
+
+
+
+
+
+ groups elements which may appear at any point within a TEI text.
+ TEI 텍스트 내의 어떤 지점에서 나타날 수 있는 요소를 모아 놓는다.
+ TEIデータ内のどこでも出現可能な要素をまとめる.
+ regroupe des éléments qui peuvent apparaître à un point
+ quelconque dans un texte TEI.
+ agrupa elementos vacíos que pueden aparecer en cualquier
+ punto de un texto TEI
+ raggruppa elementi vuoti che possono apparire in
+ qualsiasi punto di un testo TEI
+
+
+
+
+ groups elements which represent feature values in feature structures.
+ 자질구조에서 자질 값을 표상하는 요소를 모아 놓는다.
+ 匯集的所有元素代表功能結構中的功能值。
+ 素性構造中の素性値を表す要素をまとめる.
+ regroupe tous les éléments qui représentent des valeurs
+ de trait dans des structures de trait.
+ agrupa todos los elementos que representan valores de
+ rasgos en estructuras de rasgos
+ raggruppa tutti gli elementi che rappresentano valori di
+ tratti in strutture di tratti
+
+ groups elements which represent components of a bibliographic description.
+ 서지 기술의 성분을 표상하는 요소를 모아 놓는다.
+ 匯集可出現於書目引用元素內的元素。
+ 書誌情報の項目を表す要素をまとめる.
+ regroupe des éléments qui sont des composantes d’une
+ description bibliographique.
+ agrupa los elementos que pueden aparecer al interno citas
+ bibliográficas.
+ raggruppa gli elementi che possono apparire all'interno
+ di elementi di citazioni bibliografiche
+
+
+
+
+ groups elements which appear at the level of divisions within front or back matter.
+ 전면부 또는 후면부 자료 내에서 구역 층위에 나타나는 요소를 모아 놓는다.
+ 匯集的元素出現於正文前或後資訊內的區段層次中。
+ 前付,後付の部分レベルに現れる要素をまとめる.
+ regroupe les éléments
+ du niveau des divisions qui peuvent apparaître
+ dans un front ou un back.
+ agrupa elementos que aparecen a nivel de particiones
+ textuales al interno del paratexto inicial o final.
+ raggruppa gli elementi che appaiono a livello di
+ partizioni testuali all'interno del peritesto iniziale o finale
+
+
+
+
+ groups elements such as names or postal codes which may appear as part of a
+ postal address.
+ 우편 주소의 부분으로 나타날 수 있는 이름 또는 우편 번호와 같은 요소를 모아 놓는다.
+ 可能出現於郵寄地址部份的元素,如名稱或郵遞區號。
+ 郵便情報としてある名前や郵便番号等の要素をまとめる.
+ regroupe des éléments comme des noms ou des codes postaux
+ qui peuvent apparaître dans une adresse postale
+ agrupa los elementos que constituyen una dirección postal
+ o de cualquier otro tipo.
+ raggruppa elementi che costituiscono un indirizzo postale
+ o altro tipo di indirizzo
+
+
+
+
+ groups phrase-level elements containing names, dates, numbers, measures, and similar data.
+ 이름, 날짜, 수, 측정, 그리고 유사 데이터를 포함하는 구-층위 요소를 모아 놓는다.
+ 匯集包含名稱、日期、數字、度量和類似數據的詞組層次元素。
+ 名前,日付,数値,大きさなどを示す,句レベルの要素をまとめる.
+ regroupe des éléments de niveau expression contenant
+ des noms, des dates, des nombres, des mesures et d'autres données semblables
+ agrupa los elementos a nivel sintagmàtico que contienen
+ nombres, fechas, medidas o datos similares.
+ raggruppa elementi a livello sintagmatico che contengono
+ nomi, date, numeri, misurazioni, e dati simili
+
+
+
+
+
+
+
+
+ groups elements which can appear either within or between paragraph-like elements.
+ 문단 같은 요소 내에서 또는 그 사이에서 나타날 수 있는 요소를 모아 놓는다.
+ 匯集中間層次的元素:可出現於段落內與段落之間,或方塊性層次內與層次間。
+ 句相当レベルの要素内または間に出現可能な要素をまとめる.
+ regroupe des éléments qui peuvent apparaître à l’intérieur ou entre des
+ composants semblables au paragraphe.
+ agrupa elementos de la clase intermedia (internivel):
+ tales elementos pueden aparecer bien al interno bien entre párrafos u entre otros elementos de
+ tipo división de texto.
+ raggruppa elementi della classe intermedia
+ (interlivello): tali elementi possono apparire sia all'interno che tra paragrafi e altri
+ elementi del tipo porzione di testo
+
+
+
+
+
+
+
+
+
+ groups common chunk- and inter-level elements.
+ 공통적인 덩어리 및 상호 층위 요소를 모아 놓는다.
+ 匯集通用的方塊性與中間層次元素。
+ 塊レベルと挿入レベルの要素をまとめる.
+ regroupe des éléments de niveau fragment - et des
+ éléments de niveau intermédiaire.
+ agrupa elementos comunes a nivel de fragmentos de texto o
+ internivel.
+ raggruppa elementi comuni a livello di porzioni di testo
+ o interlivello
+
+
This class defines the set of chunk- and inter-level elements; it is used in many content
+ models, including those for textual divisions.
+
+
+
Cette classe définit l'ensemble des éléments de niveau fragment et de niveau intermédiaire ;
+ de nombreux modèles de contenu y font appel, y compris ceux qui sont relatifs aux divisions
+ textuelles.
+
+
+
Esta clase define el conjunto de los elementos de fragmento e inter-nivel; se utiliza en
+ muchos modelos de contención, incluyendo aquellos para las divisiones textuales.
+
+
+
+
+
+ groups elements which can occur at the level of individual words or phrases.
+ 개별 단어 또는 구 층위에서 나타날 수 있는 요소를 모아 놓는다.
+ 匯集的元素可出現於個人字詞層次上。
+ 独立した語句レベルに出現する要素をまとめる.
+ regroupe des éléments qui apparaissent au niveau des
+ mots isolés ou des groupes de mots.
+ agrupa los elementos que pueden aparecer en el nivel de
+ palabras o sintagmas.
+ raggruppa gli elementi che appaiono a livello di singole
+ parole o sintagmi
+
+
This class of elements can occur within paragraphs, list items, lines of verse, etc.
+
+
+
Cette classe d'éléments peut se trouver dans des paragraphes, des entrées de
+ listes, des vers, etc.
+
+
+
Esta clase de elementos puede aparecer dentro de párrafos, en los elementos de una lista, en las líneas de verso, etc.
+
+
+
+
+
+ groups phrase-level elements excluding those elements primarily intended for transcription
+ of existing sources.
+ 존재하는 원본의 전사의 주요 목적에 해당하는 요소를 배제한 구 층위 요소를 모아 놓는다.
+ 匯集的元素可出現於個人字詞層次,不包含預定用於轉錄的元素。
+ 現存する元資料から転記するために使用される要素を除く,句レベルの要素 をまとめる.
+ regroupe des éléments du niveau de l'expression excluant ceux
+ qui sont principalement destinés à la transcription des sources existantes.
+ raggruppa elementi a livello di sintagma ad eccezione
+ degli elementi intesi principalmente per la trascrizione di fonti esistenti
+ agrupa los elementos que pueden aparecer a nivel de
+ palabras o sintagmas, excluyendo los elementos destinados a la transcripción.
+
+
+
+
+ groups elements used to represent un-numbered generic structural divisions.
+ 숫자화되지 않은 일반 구조 구역을 표상하는 요소를 모아 놓는다.
+ 匯集的元素代表未編號的一般結構性區段。
+ 番号づけられていない,共通構造部分を示す要素をまとめる.
+ regroupe des éléments utilisés pour représenter des
+ divisions structurelles génériques non numérotées.
+ raggruppa elementi utilizzati per rappresentare
+ partizioni testuali generiche non numerate
+ agrupa los elementos usados para representar divisiones
+ estructurales recursivamente.
+
+ groups elements used to represent a structural division which is generated rather than
+ explicitly present in the source.
+ 원본에 분명하게 나타났다기보다 생성된 구조적 구역을 표상하는 요소를 모아 놓는다.
+ 匯集的元素代表一個結構性區段,產生於來源文本中,而非明確存在。
+ 元資料に明示的にはなく,生成された構造部分を示すための要素をまとめる.
+ regroupe des éléments utilisés pour représenter une
+ division structurelle qui est générée plutôt que présente de manière explicite dans la source
+ raggruppa elementi utilizzati per rappresentare una
+ partizione testuale generata piuttosto che esplicitamente presente nella fonte
+ agrupa elementos usados para representar divisiones
+ estructurales que se generan explícitamente porque estan presentes en la fuente.
+
+ groups top-level structural divisions.
+ 최상위 층위 구조 구역을 모아 놓는다.
+ 匯集頂端層次的結構性區段。
+ 最上位レベルの構造部分をまとめる.
+ regroupe des divisions structurelles du niveau le plus
+ haut.
+ raggruppa partizioni testuali di primo livello
+ agrupa divisiones estructurales de nivel superior.
+
+ groups second-level structural divisions.
+ 이차 층위 구조 구역을 모아 놓는다.
+ 匯集第二層次的結構性區段。
+ 第2位レベルの構造部分をまとめる.
+ regroupe des divisions structurelles de deuxième niveau.
+ raggruppa partizioni testuali di secondo livello
+ agrupa divisiones estructurales de segundo nivel.
+
+ groups third-level structural divisions.
+ 삼차 층위 구조 구역을 모아 놓는다.
+ 匯集第三層次的結構性區段。
+ 第3位レベルの構造部分をまとめる.
+ regroupe des divisions structurelles de troisième niveau.
+ raggruppa partizioni testuali di terzo livello
+ agrupa divisiones estructurales de tercer nivel
+
+ groups fourth-level structural divisions.
+ 사차 층위 구조 구역을 모아 놓는다.
+ 匯集第四層次的結構性區段。
+ 第4位レベルの構造部分をまとめる.
+ regroupe des divisions structurelles de quatrième niveau.
+ raggruppa partizioni testuali di quarto livello
+ agrupa divisiones estructurales de cuarto nivel
+
+ groups fifth-level structural divisions.
+ 오차 층위 구조 구역을 모아 놓는다.
+ 匯集第五層次的結構性區段。
+ 第5位レベルの構造部分をまとめる.
+ regroupe des divisions structurelles de cinquième niveau.
+ raggruppa partizioni testuali di quinto livello
+ agrupa divisiones estructurales de quinto nivel
+
+ groups sixth-level structural divisions.
+ 육차 층위 구조 구역을 모아 놓는다.
+ 匯集第六層次的結構性區段。
+ 第6位レベルの構造部分をまとめる.
+ regroupe des divisions structurelles de sixième niveau.
+ raggruppa partizioni testuali di sesto livello
+ agrupa divisiones estructurales de sexto nivel
+
+ groups seventh-level structural divisions.
+ 칠차 층위 구조 구역을 모아 놓는다.
+ 匯集第七層次的結構性區段。
+ 第7位レベルの構造部分をまとめる.
+ regroupe des divisions structurelles de septième niveau.
+ raggruppa partizioni testuali di settimo livello
+ agrupa divisiones estructurales de séptimo nivel
+
+ groups elements used to record application-specific information about a document in its
+ header.
+ 문서에 관한 애플리케이션 명시 정보를 헤더에 기록하는 요소를 모아 놓는다.
+ agrupa en el encabezado los elementos usados para
+ registrar la información específica de la aplicación de un documento.
+ ヘダー中で,ソフトウェア固有の情報を記録する要素をまとめる.
+ regroupe des éléments utilisés pour enregistrer dans
+ l'en-tête TEI d'un document des informations d'applications spécifiques.
+ raggruppa elementi utilizzati per registrare informazioni
+ specifiche di un'applicazione e relative a un documento nell'intestazione corrispondente
+
+ groups high level elements which may appear more than once in a TEI header.
+ TEI 헤더에 한번 이상 출현하는 상위 층위 요소들을 모아 놓는다.
+ 匯集可在teiHeader中使用並且可多次出現的元素
+ TEIヘダー内で高々1回出現する,上位レベルの要素をまとめる.
+ regroupe des éléments de macrostructure qui peuvent
+ apparaître plus d'une fois dans l’en-tête TEI.
+ umfasst Elemente, die innerhalb von TEI Header benutzt
+ werden dürfen und mehrmals auftreten können.
+ agrupa elementos que pueden usarse al interno del
+ teiHeader y aparecen en diversas ocasiones.
+ raggruppa gli elementi utilizzati all'interno di
+ teiHeader e che appaiono più volte.
+
+ groups elements which may be used inside sourceDesc and appear multiple times.
+ regroupe des éléments que l'on peut utiliser plusieurs fois dans l'élément sourceDesc.
+ sourceDesc 내부에 사용되어 여러 번 출현할 수 있는 요소들을 모아 놓는다.
+ 匯集可在sourceDesc中使用並且可多次出現的元素
+ 要素sourceDesc内で,複数回出現可能な要素をまとめる.
+ umfasst Elemente, die innerhalb von sourceDesc
+ verwendet werden und mehrfach auftreten können.
+ agrupa los elementos que pueden usarse al interno de
+ sourceDesc (descripción de la fuente) y que aparecen en diversas ocasiones.
+ raggruppa gli elementi utilizzati all'interno di
+ sourceDesc e che appaiono più volte.
+
+ groups elements which may be used inside encodingDesc and appear multiple times.
+ regroupe des éléments
+ qui peuvent apparaître plusieurs fois dans
+ l'élément encodingDesc.
+
+ encodingDesc 내부에 사용되어 여러 번 출현될 수 있는 요소들을 모아 놓는다.
+ 匯集可在encodingDesc中使用並且可多次出現的元素
+ 要素encodingDesc内で使われ,複数回出現可能な要素をまとめる.
+ umfasst Elemente, die in encodingDesc verwendet
+ werden und mehrfach auftreten können.
+ agrupa elementos que pueden aparecer al interno de
+ encodingDesc (Descripción de la codificación) y que aparecen en diversas ocasiones.
+ raggruppa gli elementi utilizzati all'interno di
+ encodingDesc e che appaiono più volte.
+
+ groups elements which may be used inside editorialDecl and appear multiple times.
+ regroupe des éléments qui peuvent être employés dans
+ l'élément editorialDecl et souvent à de nombreuses reprises.
+
+ editorialDecl 내부에 사용되어 여러 번 출현될 수 있는 요소들을 모아
+ 놓는다.
+ 匯集可在editorialDecl中使用並且可多次出現的元素
+ 要素editorialDecl中で使われ,複数回出現可能な要素をまとめる.
+ umfasst Elemente, die in editorialDecl
+ verwendet werden und mehrfach auftreten können.
+ agrupa elementos que pueden aparecer al interno de
+ editorialDecl (declaración editorial) y que aparecen en diversas ocasiones.
+ raggruppa gli elementi utilizzati all'interno di
+ editorialDecl e che appaiono più volte.
+
+ groups elements which may be used inside profileDesc
+and appear multiple times.
+ regroupe des éléments que l'on peut utiliser plusieurs fois dans l'élément profileDesc.
+ profileDesc 내부에 사용되어 여러 번 출현할 수 있는 요소를 모아 놓는다.
+ 匯集可用於元素profileDesc內,且多次出現的元素
+ 要素profileDesc内で使われ,複数回出現可能な要素をまとめる.
+ umfasst Elemente die in derprofileDesc genutzt werden und mehrfach auftreten
+ können.
+ agrupa los elementos que pueden ser usados al interno de profileDesc y que aparecen en diversas ocasiones.
+ raggruppa gli elementi utilizzati all'interno di profileDesc e che appaiono più volte.
+
Macros
Standard Content Models
+ paragraph content
+ 문단 내용
+ 段落內容
+ contenu de paragraphe.
+ contenido del párrafo
+ contenuto di paragrafo
+ defines the content of paragraphs and similar elements.
+ 문단과 유사 요소 내용을 정의한다.
+ 定義段落與類似元素的內容。
+ 段落やそれ相当の要素の内容を定義する.
+ définit le contenu de paragraphes et d' éléments
+ semblables.
+ define el contenido de párrafos y elementos similares.
+ definisce il contenuto di paragrafi ed elementi simili
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ paragraph content
+ 문단 내용
+ 段落內容
+ contenu du paragraphe
+ contenido del párrafo
+ defines the content of prose elements that are not used for transcription of extant materials.
+ 현존 자료의 전사에 사용되지 않은 산문적 요소 내용을 정의한다.
+ 定義散文元素的內容,該元素未用於轉錄現存資料
+ 現存する資料の転記で使われるものではない散文要素の内容を定義する.
+ définit le contenu des éléments textuels qui ne sont
+ pas utilisés pour la transcription des contenus existants.
+ define el contenido de elementos de prosa que no se usan para la transcripción de materiales existentes.
+
+
+
+
+
+
+
+
+
+
+
+
+
+ phrase sequence
+ 구 연쇄
+ 詞組序列
+ suite de syntagmes.
+ secuencia sintagmática
+ sequenza sintagmatica
+ defines a sequence of character data and phrase-level elements.
+ 문자 데이터 및 구층위 요소의 연쇄를 정의한다.
+ 定義一連串文字資料與詞組層次元素。
+ 一連の文字列と句レベル要素を定義する.
+ définit un ordre de données et d'éléments syntagmatiques.
+ >defince una secuencia de caracteres y elementos
+ de tipo sintagmático.
+ definisce una sequenza di caratteri ed elementi di tipo
+ sintagmatico
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ limited phrase sequence
+ 한정된 구 연쇄
+ 限定詞組序列
+ séquence d'expression délimitée
+ secuencia de sintagma limitada
+ defines a sequence of character data and those phrase-level elements that are not typically
+used for transcribing extant documents.
+ 현존 문서의 전사에 전형적으로 사용되지 않은 문자 테이터 및 구 층위 요소의 연쇄를 정의한다.
+ 定義一連串文字資料與詞組層次元素,通常不用於轉錄現存文件。
+ 一般には,現存資料の転記に使われることはない,一連の文字列と句レベル
+ の要素を定義する.
+ définit un ordre de données de caractère et ces
+ éléments de niveau d'expression qui ne sont pas typiquement utilisées pour transcrire des
+ documents existants.
+ define una secuencia de caracteres y elementos de tipo sintagmático que no se usan normalmente para transcribir.
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 'special' paragraph content
+ 특별 문단 내용
+ 「特殊」段落內容
+ contenu "spécial" de paragraphe
+ contenido de párrafo 'especial'
+ contenuto di paragrafo "speciale"
+ defines the content model of elements such as notes or list items, which either contain a
+ series of component-level elements or else have the same structure as a paragraph, containing a
+ series of phrase-level and inter-level elements.
+ 일련의 성분층위 요소를 포함하거나 아니면 문단과 동일 구조를 갖는 주석 또는 목록 항목과 같은 요소의
+ 내용 모델을 정의하며, 이것은 일련의 구 층위 및 상호층위 요소를 포함한다.
+ 定義元素的內容模型,如註解或列表項目,這些內容模型包含一系列組合性層次元素,或與一個段落有相同的結構,包含一系列的詞組層次或inter-層次元素。
+ 一連の句レベルまたは挿入レベルの要素と共に,一連の構成要素レベルの要
+ 素,または段落相当の構造を持つ,注釈やリスト項目となる要素の内容モデ ルを定義する.
+ définit le modèle de contenu des éléments tels que des
+ notes ou des items de liste, contenant soit une suite d'éléments de niveau composant soit qui
+ ont la même structure qu'un paragraphe, contenant une suite d’éléments du niveau de l’expression
+ et de niveau intermédiaire.
+ define el modelo de contenido de elementos tipo notas o
+ entradas de lista que contienen una serie de elementos a nivel de componentes que tienen la
+ misma estructura de un párrafo con una serie de elementos a nivel sintagmático y inter-nivel.
+ definisce il modello di contenuto di elementi quali note
+ o voci di lista che contiene una serie di elementi a livello di componenti aventi la stessa
+ struttura di un paragrafo con una serie di elementi a livello sintagmatico e interlivello
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ extended text
+ 확장 텍스트
+ 擴充文件
+ texte étendu
+ el texto
+ testo esteso
+ defines a sequence of character data and gaiji elements.
+ 문자 데이터 및 외부 문자 요소의 연쇄를 정의한다.
+ 定義一連串文字資料與缺字元素。
+ 一連の文字列や外字要素を定義する.
+ définit une suite de caractères et d'éléments
+ gaiji
+ define una secuencia de caracteres y elementos gaiji.
+ definisce una sequenza di caratteri ed elementi gaiji
+
+
+
+
+
+
+
+
+
+ defines a content model within which any XML elements are
+ permitted
+ définit un modèle de contenu dans lequel tous les
+ éléments XML sont autorisés.
+
+
+
+
+
+ egXML
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Datatype Specifications
+ defines the range of attribute values expressing a degree of certainty.
+ 확실성 정도를 표현하는 속성 값의 범위를 정의한다.
+ 定義表示正確度的屬性值範圍
+ 確信度を示す属性値の程度を示す.
+ Définit la gamme des valeurs d'attribut exprimant un
+ degré de certitude
+ define la gama de valores de atributos que exprimen un
+ grado de certeza.
+ definisce la gamma di valori di attributi che esprimono
+ un grado di certezza
+
+
+
+
+
+
+
+
+
+
Certainty may be expressed by one of the predefined symbolic values high,
+ medium, or low. The value
+ unknown should be used in cases where the encoder
+ does not wish to assert an opinion about the matter. For more precise indication, data.probability may be used instead or in addition.
Le degré de certitude peut être exprimé par l'une des valeurs symboliques prédéfinies
+ high, medium, ou low. Pour une indication précise, data.probability peut être utilisé en remplacement ou en complément.
+
+
+ defines the range of attribute values expressing a probability.
+ 확률을 표현하는 속성 값의 범위를 정의한다.
+ 定義表示可能性的屬性值範圍
+ 出現度を示す属性値の範囲を定義する.
+ définit la gamme des valeurs d'attributs exprimant une
+ probabilité.
+ define la gama de valores de atributos que exprimen un
+ grado de probabilida.d
+ definisce la gamma di valori di attributi che esprimono
+ una probabilità
+
+
+
+
+
Probability is expressed
+ as a real number between 0 and 1; 0 representing certainly false and 1 representing certainly
+ true.
+
+
+
出現度は,0から1までの実数で表現される.0は 確実に偽,1は, 確実に真を示す.
+
+
+
Le degré de probabilité est exprimé
+ par un nombre réel entre 0 et 1 ;
+ 0 représentant certainement faux et 1 certainement
+ vrai.
+
+
+ defines the range of attribute values used for numeric values.
+ 수치에 사용되는 속성 값의 범위를 정의한다.
+ 定義用於數值的屬性值範圍
+ 数値をとる属性値の範囲を定義する.
+ définit la gamme des valeurs d'attributs utilisées pour
+ des valeurs numériques
+ define la gama de valores de atributos para valores
+ numéricos.
+ definisce la gamma di valori di attributi usati per
+ valori numerici
+
+
+
+
+
+
+
+
+
Any numeric value, represented as a decimal number, in floating point format, or as a ratio.
+
To represent a floating point number, expressed in scientific notation, E
+ notation, a variant of exponential notation, may be used. In
+ this format, the value is expressed as two numbers separated by the letter E. The first
+ number, the significand (sometimes called the mantissa) is given in decimal format, while the
+ second is an integer. The value is obtained by multiplying the mantissa by 10 the number of
+ times indicated by the integer. Thus the value represented in decimal notation as 1000.0 might
+ be represented in scientific notation as 10E3.
+
A value expressed as a ratio is represented by two integer values separated by a solidus (/)
+ character. Thus, the value represented in decimal notation as 0.5 might be represented as a
+ ratio by the string 1/2.
Toute valeur numérique, représentée en nombre décimal, notée en virgule flottante ou
+ en fraction.
+
Pour représenter un nombre en virgule flottante, exprimé en notation scientifique,
+ E notation, une variante de la notation
+ exponentielle peut être utilisée. Dans ce format, la valeur est exprimée par deux
+ nombres séparés par la lettre E. Le premier facteur, le significande (parfois appelé mantisse)
+ est donné sous forme décimale, tandis que le second est un entier. La valeur est obtenue en
+ multipliant la mantisse par 10 fois le nombre indiqué par l'entier. Ainsi la valeur
+ représentée en notation décimale 1000.0 pourrait être représentée en notation
+ scientifique 10E3.
+
Une valeur exprimée en fraction est représentée par deux nombres entiers séparés par une
+ barre oblique (/). Ainsi, la valeur représentée en notation décimale 0.5 pourrait être
+ représentée en fraction par la chaîne de caractères 1/2.
+
+
+ defines attribute values used to express an interval value.
+
+
+
+
+
+
+
+
+
+
+
+
Any value greater than zero or any one of the values
+ regular, irregular, unknown.
+
+
+ defines attribute values used to express a percentage value.
+
+
+
+
+
Any non-negative integer value less than 100.
+
+
+ defines the range of attribute values used for a non-negative
+integer value used as a count.
+ 계산으로 사용된 음이 아닌 정수 값의 속성 값 범위를 정의한다.
+ 定義的屬性值範圍,用於作為總數的非負整數值
+
+ 非負整数値を採る属性値の範囲を定義する.
+ définit la gamme des
+ valeurs des attributs exprimant une valeur entière et non négative utilisé pour des calculs.
+ define la gama de valores de atributos para números enteros no negativos usados como un cálculo.
+ definisce la gamma di valori di attributi usati per un numero intero non negativo impiegato come computo
+
+
+
+
+
Only positive integer values (including zero) are permitted
+
+
+
非負整数値のみが許される.
+
+
+
Seules des valeurs positives entières sont autorisées.
+
+
+ defines the range of attribute values expressing a temporal
+ expression such as a date, a time, or a combination of them, that
+ conform to the W3C XML Schema Part 2: Datatypes Second Edition
+ specification.
+ 날짜, 시간 또는 이들의 조합과 같은 시간 표현을 나타내는 속성 값 범위를 정의하며, 이는 W3C XML Schema Part 2: Datatypes Second Edition 명시를 따른다.
+ 定義表示時間的屬性值範圍,如日期、時間或兩者的結合,依照W3CXML Schema Part 2: Datatypes Second Editionspecification標準所定義。
+ 日付や時間などの時間表現をとる属性値の範囲を定義する.これは,W3Cの
+ XML Schema Part 2: Datatypes Second Editionに従ったものになる.
+ définit la gamme des valeurs d'attributs propre à
+ exprimer une valeur temporelle comme une date, une période, ou une combinaison des deux
+ conformément aux spécifications XML Schema Part 2:
+ Datatypes Second Edition du W3C.
+ define la gama de valores de atributos que expresan un valor temporal del tipo fecha, hora, o combinación de ambas, de acuerdo con la especificación de W3C XML Schema Part 2: Datatypes Second Edition.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
If it is likely that the value used is to be compared with
+ another, then a time zone indicator should always be included, and
+ only the dateTime representation should be used.
S'il est probable que la valeur utilisée doive être comparée à
+ d’autres, alors une indication de fuseau horaire sera toujours incluse, et
+ seule la représentation de dateTime sera employée.
+
+
+
+ defines the range of attribute values available for representation of a duration in time
+ using ISO 8601 standard formats
+ ISO 8601 표준 형식을 사용하여 시간의 지속을 나타내는 속성 값 범위를 정의한다.
+ 以ISO 8601標準格式定義表示一段持續性時間的屬性值範圍
+ ISO 8601にある標準形式を使い,時間幅を表現する当該属性値の範囲を定義 する.
+ définit la gamme de valeurs d'attributs exprimant une durée temporaraire utilisant le norme ISO 8601.
+ define la gama de valores de atributos posibles para
+ representar la duración en el tiempo usando formatos estàndards ISO 8601.
+
+
+
+
+
+
+
+
+
+
+ a day and a half
+
+
+
+
+ a fortnight
+
+
+
+
+
+
+
+
+
+ une journee et demie
+
+
+
+
+ une quinzaine
+
+
+
+
+
+
+
+
+
A duration is expressed as a sequence of number-letter pairs, preceded by the letter P; the
+ letter gives the unit and may be Y (year), M (month), D (day), H (hour), M (minute), or S
+ (second), in that order. The numbers are all unsigned integers, except for the last, which may
+ have a decimal component (using either . or , as the decimal point;
+ the latter is preferred). If any number is 0, then that number-letter
+ pair may be omitted. If any of the H (hour), M (minute), or S (second) number-letter pairs are
+ present, then the separator T must precede the first time
+ number-letter pair.
+
For complete details, see ISO 8601
Data elements and interchange formats — Information
+ interchange — Representation of dates and times.
+
+
+
Data elements and interchange formats - Information interchange -
+ Representation of dates and timesを参照のこと.
+
+
+
Une durée est exprimée par une suite de paires alphanumériques, précédée par la lettre P ;
+ la lettre donne l'unité et peut être Y (année), M (mois), D (jour), H (heure), M (minute), ou
+ S (seconde), dans cet ordre. Les nombres sont des entiers sans
+ signe, à l'exception du dernier,
+ qui peut comporter une décimale (en utilisant soit . soit , pour la
+ virgule ; la dernière possibilité est préférable). Si un nombre est 0,
+ alors la paire alphanumérique peut être omise. Si les paires alphanumériques H (heure), M
+ (minute), ou S (seconde) sont présentes, alors le séparateur T doit précéder la
+ première paire alphanumérique time.
+
Pour des détails complets, voir ISO 8601
Data elements and interchange formats —
+ Information interchange — Representation of dates and times.
+
+
+ defines the range of attribute values expressing a temporal expression such as a date, a
+ time, or a combination of them, that conform to the international standard Data elements
+ and interchange formats – Information interchange – Representation of dates and times.
+ 날짜, 시간, 또는 이들의 조합과 같은 시간 표현의 속성 값 범위를 정의하며, 이는 국제 표준
+ Data elements and interchange formats – Information interchange – Representation of
+ dates and times을 따른다.
+ 定義該系列表示時間的屬性值,例如日期、時間或兩者的組合,需符合國際標準 Data elements and
+ interchange formats – Information interchange – Representation of dates and times
+ 日付や時間などの時間表現をとる属性値の範囲を定義する.これは,国際標 準であるData
+ elements and interchange formats - Information interchange - Representation of dates and
+ timesに準拠したも のになる.
+ définit la gamme des valeurs d'attribut qui sont capables
+ d''exprimer une valeur temporelle comme une date, une période, ou une combinaison des deux qui
+ se conforment au standard international Data elements and interchange formats –
+ Information interchange – Representation of dates and times
+
+ define la gama de valores de atributos que expresan una
+ expresión temporal como una fecha, una hora, o una combinación de estas, de acuerdo a un
+ estándard internacional Elementos de datos y formatos de intercambio - Intercambio de
+ información – Representación de fechas y horas.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
If it is likely that the value used is to be compared with another, then a time zone
+ indicator should always be included, and only the dateTime representation should be used.
+
For all representations for which ISO 8601 describes both a basic and an
+ extended format, these Guidelines recommend use of the extended format.
+
While ISO 8601 permits the use of both 00:00 and 24:00 to represent
+ midnight, these Guidelines strongly recommend against the use of 24:00.
+
ISO 8601では,深夜の12時を示す方法として, 00:00と24:00の両方を認めているが,
+ 本ガイドラインでは,24:00とは表記しないことを強く推奨 している.
+
+
+
+
+
S'il est vraisemblable que la valeur utilisée soit destinée à être comparer à d’autres
+ valeurs, alors une indication du fuseau horaire devrait toujours être incluse, et seule la
+ représentation dateTime devrait être employée.
+
Pour toutes les représentations pour lesquelles l’ISO 8601 décrit à la fois un format
+ basique et un format étendu , ce guide d’encodage recommandande
+ l’emploi du format étendu .
+
Même si l’ ISO 8601 permet d’écrire à la fois 00:00 et 24:00 pour
+ minuit, ce guide d’encodage déconseille vivement d’écrire 24:00.
+
+
+
+ defines the range of attribute values available for representation of a duration in time using W3C datatypes.
+ W3C 데이터 유형을 사용해서 시간 지속을 나타내는 속성 값 범위를 정의한다.
+ 以W3C datatypes標準格式來定義表示一段持續性時間的屬性值範圍
+ W3Cのデータ型を使い,時間幅を表現する当該属性値の範囲を定義する.
+ définit la gamme des
+ valeurs d'attributs exprimant une durée temporaraire utilisant les types de données W3C
+ define la gama de valores de atributos disponibles para la representación de un periodo de tiempo usando tipos de datos W3C
+
+
+
+
+
+
+
+
+
+
+ a day and a half
+
+
+
+
+ a week
+
+
+
+
+
+
+
+
+
+ une journée et demie
+
+
+
+
+ une semaine
+
+
+
+
+
+
+
+
+
A duration is expressed as a sequence of number-letter pairs,
+ preceded by the letter P; the letter gives the unit and may be Y
+ (year), M (month), D (day), H (hour), M (minute), or S (second),
+ in that order. The numbers are all unsigned integers, except for
+ the S number, which may have a decimal component
+ (using . as the decimal point). If any number is
+ 0, then that number-letter pair may be
+ omitted. If any of the H (hour), M (minute), or S (second)
+ number-letter pairs are present, then the separator T
+ must precede the first time number-letter
+ pair.
+
For complete details, see the W3C
+ specification.
Une durée est exprimée par une suite de paires alphanumériques, précédée par la lettre P ; la lettre donne l'unité et peut être Y
+ (année), M (mois), D (jour), H (heure), M (minute), ou S (seconde),
+ dans cet ordre. Les nombres sont des entiers non signés à l'exception du dernier, qui peut comporter une décimale (en utilisant soit
+ . soit , pour la virgule ; la dernière possibilité est préférable). Si un nombre est 0, alors
+ la paire alphanumérique peut être omise. Si les paires alphanumériques H (heure), M
+ (minute), ou S (seconde) sont présentes, alors le séparateur
+ T doit précéder la première paire alphanumérique
+ time.
+
Pour des détails complets, voir W3C
+ specification.
+
+
+ defines the range of attribute values used to express a truth
+value.
+ 진리값을 표현하는 속성 값 범위를 정의한다.
+ 定義的屬性值範圍表示一個可能未知的真實值
+ 真偽値を示す属性値の範囲を定義する.
+ définit la gamme des
+ valeurs d'attributs exprimant la vérité d'une proposition.
+ define la gama de valores de atributos usados para expresar un valor cierto.
+ definisce la gamma di valori di attributi usati per esprimere un valore di verità
+
+
+
+
+
The possible values of this datatype are 1 or
+ true, or 0 or false.
+
This datatype applies only for cases where uncertainty is
+ inappropriate; if the attribute concerned may have a value other
+ than true or false, e.g. unknown, or
+ inapplicable, it should have the extended version of
+ this datatype: data.xTruthValue.
Ce type de données ne s'applique que dans les cas où l'incertitude est
+ inappropriée ; c’est-à-dire si l'attribut concerné peut avoir une valeur autre
+ que vrai ou faux, par ex. inconnu, ou inapplicable, il devrait alors y
+ avoir la version étendue de ce type de données : data.xTruthValue.
+
+
+
+ extended truth value
+ 확장 진리값
+
+ defines the range of attribute values used to express a truth value which may be unknown.
+ 알려지지 않을 수 있는 진리값을 표현하는 속성 값 범위를 정의한다.
+ 定義的屬性值範圍表示一個可能未知的真實值
+ 不明の場合もある真偽値をとる属性値の範囲を定義する.
+ définit la gamme des
+ valeurs d'attributs exprimant une vérité potentiellement inconnue.
+ define la gama de valores de atributos usados para
+ expresar un valor cierto potencialmente desconocido.
+ definisce la gamma di valori di attributi usati per
+ esprimere un valore di verità potenzialmente sconosciuto
+
+
+
+
+
+
+
+
+
+
+
In cases where where uncertainty is inappropriate, use the
+ datatype data.TruthValue.
+
+
+
不明な場合がなければ,データ型data.TruthValueを使用する.
+
+
+
Dans le cas où l'incertitude n’est pas adaptée, employer plutot
+ le type de données data.TruthValue.
+
+
+ defines the range of attribute values used to identify a particular combination of human
+ language and writing system.
+ 인간의 언어와 문자 체계의 특별한 조합을 식별하는 속성 값 범위를 정의한다.
+ 定義的屬性值範圍標明人類語言與寫作系統的特殊結合
+ 自然言語を示す属性値の範囲を定義する.
+ définit la gamme des
+ valeurs d'attributs exprimant
+ une combinaison particulière du langage humain avec un système d'écriture.
+ define la gama de valores de atributos usados para
+ identificar una combinación determinada de lenguaje y escritura humanos.
+ definisce la gamma di valori di attributi usati per
+ identificare una determinata combinazione di linguaggio e sistema di scrittura umani
+
+
+
+
+
+
+
+
+
+
The values for this attribute are language tags as defined in BCP 47. Currently BCP 47 comprises RFC 5646
+ and RFC 4647; over time, other IETF documents may succeed these as the best current practice.
+
A language tag, per BCP 47, is assembled from a sequence of components
+ or subtags separated by the hyphen character (-, U+002D).
+ The tag is made of the following subtags, in the following order. Every subtag except the
+ first is optional. If present, each occurs only once, except the fourth and fifth components
+ (variant and extension), which are repeatable.
+
+ The IANA-registered code for the language. This is almost always the same as the ISO
+ 639 2-letter language code if there is one. The list of available registered language
+ subtags can be found at . It is recommended
+ that this code be written in lower case.
+
+ The ISO 15924 code for the script. These codes consist of 4 letters, and it is
+ recommended they be written with an initial capital, the other three letters in lower
+ case. The canonical list of codes is maintained by the Unicode Consortium, and is
+ available at . The IETF
+ recommends this code be omitted unless it is necessary to make a distinction you need.
+
+ Either an ISO 3166 country code or a UN M.49 region code that is registered with IANA
+ (not all such codes are registered, e.g. UN codes for economic groupings or codes for
+ countries for which there is already an ISO 3166 2-letter code are not registered). The
+ former consist of 2 letters, and it is recommended they be written in upper case; the list
+ of codes can be searched or browsed at . The latter consist of 3 digits; the list of codes can be found at .
+
+ An IANA-registered variation. These codes are used to indicate
+ additional, well-recognized variations that define a language or its dialects that are
+ not covered by other available subtags.
+
+ An extension has the format of a single letter followed by a hyphen followed by
+ additional subtags. These exist to allow for future extension to BCP 47, but as of this
+ writing no such extensions are in use.
+
+ An extension that uses the initial subtag of the single letter
+ x (i.e., starts with x-) has no meaning except as
+ negotiated among the parties involved. These should be used with great care, since they
+ interfere with the interoperability that use of RFC 4646 is intended to promote. In order
+ for a document that makes use of these subtags to be TEI-conformant, a corresponding
+ language element must be present in the TEI header.
+
+
+
There are two exceptions to the above format. First, there are language tags in the IANA registry that
+ do not match the above syntax, but are present because they have been
+ grandfathered from previous specifications.
+
Second, an entire language tag can consist of only a private use subtag. These tags start
+ with x-, and do not need to follow any further rules established by the IETF and
+ endorsed by these Guidelines. Like all language tags that make use of private use subtags, the
+ language in question must be documented in a corresponding language element in the
+ TEI header.
+
Examples include
+
+ Shona
+
+ Taiwanese
+
+ Chinese written in traditional script as used in Hong Kong
+
+ English as spoken in Sierra Leone
+
+ Polish
+
+ Spanish as spoken in Mexico
+
+ Spanish as spoken in Latin America
+
+
+
The W3C Internationalization Activity has published a useful introduction to BCP 47, Language
+ tags in HTML and XML.
Les valeurs pour cet attribut sont les étiquettes de langue définies
+ dans la norme BCP 47. Actuellement, la norme BCP 47
+ intègre les normes RFC 4646 et RFC 4647 ; à l'avenir, d'autres documents de l'IETF pourront leur succéder en
+ tant que meilleure pratique.
+
Une étiquette de langue, pour la norme BCP 47, est formée par l'assemblage d'une
+ suite de composants ou de sous-étiquettes reliés par un trait d'union
+ (-, U+002D). L'étiquette est composée des sous-étiquettes suivantes,
+ dans l'ordre indiqué. Chaque sous-étiquette est facultative, à l'exception de la première.
+ Chacune ne peut avoir qu'une occurrence, sauf les quatrième et cinquième (variante
+ et extension), qui sont répétables.
+
+ Code de langue enregistré par l'IANA. Il est presque toujours identique au code
+ de langue alphabétique ISO 639-2, s'il y en a un. La liste des sous-étiquettes de langue
+ enregistrées est disponible à : Il est recommandé
+ d'écrire ce code en minuscules.
+
+ Code ISO 15924 pour l'écriture. Ces codes sont constitués de 4 lettres, et il est
+ recommandé d'écrire la première lettre en majuscule, les trois autres en minuscules. La
+ liste canonique des codes est maintenue par le Consortium Unicode, et elle est disponible
+ à : . L'IETF recommande
+ d'omettre ce code, sauf s'il est nécessaire pour établir une distinction.
+
+ Soit un code de pays ISO 3166, soit un code de région UN M.49 enregistré par
+ l'IANA (tous les codes de ce type ne sont pas enregistrés : par exemple, ne sont pas
+ enregistrés les codes UN pour des regroupements économiques ou les codes de pays pour
+ lesquels il existe déjà un code de pays alphabétique ISO 3166-2). Le premier est constitué de
+ 2 lettres, et il est recommandé de l'écrire en majuscules. La liste des codes est
+ disponible à : . Le second est constitué de 3 chiffres ; la liste des codes est disponible à : .
+
+ Variante enregistrée par l'IANA. Ces codes sont utilisés
+ pour indiquer des variantes additionnelles et bien établies, qui définissent une langue
+ ou ses dialectes et qui ne sont pas couverts par d'autres sous-étiquettes
+ existantes.
+
+ Une extension a la forme d'une lettre unique, suivie d'un trait d'union, lui-même suivi de sous-étiquettes additionnelles. Ces dernières existent pour tenir compte d'une future extension
+ de la norme BCP 47, mais à l'heure actuelle de telles extensions ne sont pas utilisées.
+
+ Une extension utilisant la sous-étiquette initiale de la lettre
+ x (i.e., commençant par x-) n'a pas d'autre signification
+ que celle négociée entre les parties impliquées. Ces sous-étiquettes doivent être utilisées avec
+ beaucoup de prudence, car elles interfèrent avec l'interopérabilité que l'utilisation de
+ la norme RFC 4646 vise à promouvoir. Pour qu'un document qui utilise ces sous-étiquettes soit
+ conforme à la TEI, un élément language correspondant doit être présent dans
+ l'en-tête TEI.
+
+
+
Il y a deux exceptions au format ci-dessus. Premièrement, il y a des codes de langue dans
+ le registre de l'IANA
+ qui ne correspondent pas à la syntaxe ci-dessus, mais qui sont présents car ils ont été
+ hérités de spécifications antérieures.
+
En second lieu, une étiquette complète de langue peut consister seulement en une sous-étiquette d'usage privé. Ces étiquettes commencent par x- ; il n'est pas
+ nécessaire qu'elles suivent les autres règles établies par l'IETF et acceptées par les présents
+ Principes directeurs. Comme toutes les étiquettes de langue qui utilisent des sous-étiquettes d'usage
+ privé, la langue en question doit être documentée dans un élément correspondant language dans l'en-tête TEI.
+
Les exemples incluent :
+
+ Shona
+
+ Taïwanais
+
+ Chinois de Hong Kong écrit dans l'écriture traditionnelle
+
+ Anglais parlé au Sierra Leone
+
+ Polonais
+
+ Espagnol parlé au Mexique
+
+ Espagnol parlé en Amérique latine
+
+
+
La W3C Internationalization Activity a publié une introduction à la norme BCP 47 dont la lecture peut être utile : Language
+ tags in HTML and XML.
+
+
+
+
+
+
+ defines the range of attribute values used to indicate XML namespaces as defined by the W3C
+ Namespaces in XML
+ Technical Recommendation.
+ W3C Namespaces in XML 기술적 권고안에 의해
+ 정의된 XML 이름공간을 나타내는 속성 값 범위를 정의한다.
+ 定義的屬性值範圍指出XML名稱空間,由XML technical
+ recommendation中的W3C名稱空間所定義。
+ W3Cの
+ XML名前空間で定義されている名前空間を示す属性値の範囲を示す.
+ définit la gamme des
+ valeurs d'attributs exprimant une espace de noms XML tels qu'ils
+ sont définis par le
+ W3C.
+ define la gama de valores de atributos usados para
+ indicar los nombres de los espacios en XML como establecen las recomendaciones técnicas del W3C
+ para los
+
+ definisce la gamma di valori di attributi usati per
+ indicare i nomi degli spazi in XML come stabilito dalle raccomandazioni tecniche del W3C per gli
+ spazi dei nomi in XML.
+
+
+
+
+
The range of syntactically valid values is defined by RFC 3986 Uniform Resource Identifier
+ (URI): Generic Syntax
+
+
La gamme des valeurs syntaxiquement valides est définie par RFC 3986 Uniform Resource Identifier
+ (URI): Generic Syntax
+ .
+
+
+
+ defines a range of values for use in specifying the size of an object that is intended for
+ display.
+ 웹에서 디스플레이 목적의 대상 크기를 명시하는 값의 범위를 정의한다.
+ 定義的屬性值範圍說明預定呈現在網路上之物件大小
+ webページ上で表示する際の大きさを定義する値の範囲を定義する.
+ définit la gamme de valeurs exprimant
+ les dimensions d'un objet destiné à être affiché
+ define una gama de valores para emplearlos en la
+ especificación de las dimensiones de un objeto que se ha de incluir in la red.
+ definisce una gamma di valori da impiegare nello
+ specificare le dimensioni di un oggetto da inserire in rete
+
+
+
+
+
+
+ The TEI Logo
+ Stylized yellow angle brackets with the letters TEI in
+ between and text encoding initiative underneath, all on a white
+ background.
+
+
+
+
+
+
+
+ Le logo TEI
+
+
+
+
+
+
These values map directly onto the values used by XSL-FO and CSS. For definitions of the
+ units see those specifications; at the time of this writing the most complete list is in the
+ CSS3 working
+ draft.
+
+
+
当該値は,XSLFOやCSSで使用される値になる.詳細は各規格を参照のこと. 現時点で一番詳細なリストは, CSS3 working
+ draftになる.
+
+
+
Ces valeurs peuvent être reportées directement sur des valeurs utilisées par XSL-FO et CSS. Pour les
+ définitions des unités, voir ces spécifications ; à ce jour la
+ liste la plus complète est dans un
+ CSS3 working
+ draft.
+
+
+
+
+ defines attribute values which
+ are expressed as a regular expression.
+ 정규표현으로 표시된 속성 값을 정의한다.
+ 定義的屬性值範圍以固定方法表示
+ 正規表現を属性値として定義する.
+ définit la gamme des valeurs
+ d'attributs exprimant une expression régulière
+ define una gama de valores de
+ atributos expresados como una expresión regular.
+ definisce una gamma di valori di
+ attributi rappresentati come espressione regolare
+
+
+
+
+
+
+ A regular expression, often called a pattern, is an
+ expression that describes a set of strings. They are usually used to
+ give a concise description of a set, without having to list all
+ elements. For example, the set containing the three strings
+ Handel, Händel, and
+ Haendel can be described by the pattern
+ H(ä|ae?)ndel (or alternatively, it is said that the
+ pattern H(ä|ae?)ndel
+ matches each of the three strings)
+ Wikipedia
+
+
+
This TEI datatype is mapped to the XSD token datatype, and may therefore
+ contain any string of characters. However, it is recommended that the
+ value used conform to the particular flavour of regular expression syntax
+ supported by XSD Schema.
+
+ Une expression régulière, souvent appelée modèle,
+ est une expression qui décrit un jeu de chaînes de caractères. Elles
+ sont généralement utilisées pour donner une brève description d'un
+ jeu, sans avoir à en lister tous les éléments. Par exemple, le jeu
+ contenant les trois chaînes de caractères
+ Handel, Händel, et
+ Haendel peut être décrit comme le modèle
+ H(ä|ae?)ndel (ou on peut dire que
+ H(ä|ae?)ndel
+ équivaut à chacune des trois chaînes)
+ wikipedia
+ wikipedia
+
+
+
+
+ defines the data type used to express a point in cartesian space.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
A point is defined by two numeric values, which may be expressed in any notation permitted.
+
+
+ defines the range of attribute values used to provide a single
+ URI, absolute or relative, pointing to some other
+resource, either within the current document or elsewhere.
+ 현 문서 또는 다른 곳 어디서든 다른 자원에 대한 단일 포인터를 제공하는 속성 값 범위를 정의한다.
+ 定義的屬性值範圍提供單一指標,連結到其他位於目前文件或他處的資源
+ 他の資源へのポインタをとる属性値の範囲を定義する.
+ définit la gamme des valeurs d'attributs utilisées
+ pour fournir un pointeur URI unique sur une autre ressource, soit dans le document courant, soit
+ dans un autre document
+ define una gama de valores de atributos usados para proporcionar un indicador de cualquier recurso, bien en el documento corriente o en otro.
+ definisce la gamma di valori di attributi usati per indicare un unico puntatore rispetto a qualsiasi altra risorsa all'interno del documento corrente o altrove
+
+
+
+
+
The range of syntactically valid values is defined by
+ RFC 3986
+
Uniform Resource Identifier (URI): Generic
+ Syntax. Note that the values themselves are encoded using
+ RFC
+ 3987
+ Internationalized Resource Identifiers (IRIs) mapping
+ to URIs. For example,
+ https://secure.wikimedia.org/wikipedia/en/wiki/% is encoded
+ as https://secure.wikimedia.org/wikipedia/en/wiki/%25
+ while http://موقع.وزارة-الاتصالات.مصر/ is encoded as
+ http://xn--4gbrim.xn----rmckbbajlc6dj7bxne2c.xn--wgbh1c/
+
+
+
+
La gamme des valeurs valides syntaxiquement est définie parRFC 3986
+ Uniform Resource Identifier (URI): Generic
+ Syntax
+
+
+
+
+ defines the range of attribute values which may be used to
+ specify a TEI or Unicode version number.
+ définit la gamme des valeurs d'attribut
+ exprimant un numéro de version TEI.
+
+
+
+
+
The value of this attribute follows the pattern specified by
+ the Unicode consortium for its version number (). A version number
+ contains digits and fullstop characters only. The first number
+ supplied identifies the major version number. A second and third
+ number, for minor and sub-minor version numbers, may also be
+ supplied.
+
+
+
+
La valeur de cet attribut devrait suivre le format proposé par
+ le Consortium Unicode pour identifier les versions (). Un numéro de version
+ ne contient que des chiffres et des points. Le numéro
+ initiale identifie le numéro majeur de la version. Un deuxième et
+ un troisième numéro sont aussi disponibles pour la numérotation
+ facultative des versions mineures ou sous-mineurs.
+
+
+
+ defines the range of attribute values used for version numbers.
+
+
+
+
+
+
+
+ defines attribute values which contain a replacement template.
+
+
+
+
+
+
+
+ defines attribute values which contain an XPath expression.
+
+
+
+
+
Any XPath expression using the syntax
+defined in
+
+
+
+ defines the range of attribute values expressed as a single
+ word or token.
+ 단일 단어 또는 토큰으로 표현된 속성 값 범위를 정의한다.
+ 定義的屬性值範圍表示一個單字或代號
+ いち単語またはトークンをとる属性値の範囲を定義する.
+ définit la gamme des
+ valeurs d'attributs exprimant un seul mot ou signe
+ define una gama de valores de atributos expresados como una única palabra o señal.
+ definisce la gamma di valori di attributi espressi come singola parola o singolo token
+
+
+
+
+
Attributes using this datatype must contain a single
+ word which contains only letters, digits,
+ punctuation characters, or symbols: thus it cannot include
+ whitespace.
Les attributs employant ce type de données doivent contenir un
+ mot simple ne contenant que des lettres, des chiffres,
+ des signes de ponctuation, ou des symboles : ils ne peuvent donc pas inclure
+ d’espace.
+
+
+
+ defines the range of attribute values used to identify human or animal sex.
+ 인간 또는 동물의 성을 식별하는 속성 값 범위를 정의한다.
+ 定義的屬性值範圍用以識別人類或動物的性別
+ 人間または動物の性を示す属性値の範囲を定義する.
+ définit la gamme des valeurs d'attributs employés pour
+ identifier le sexe humain ou animal.
+ define la gama de valores de atributos usados para
+ identificar el género humano o animal.
+ definisce una gamma di valori di attributi usati per
+ identificare il sesso umano o animale
+
+
+
+
+
Values for attributes using this datatype may be locally defined by a project, or may refer to an external standard, such as
+ vCard's sex property
+ (in which M indicates male, F female, O other, N none or not applicable, U unknown),
+ or the often used ISO 5218:2004
Representation of Human Sexes
+ (in which 0
+ indicates unknown; 1 male; 2 female; and 9 not applicable,
+ although the ISO standard is widely considered inadequate);
+ cf. CETH's Recommendations for Inclusive Data Collection of Trans People
+ .
+
+
+
当該属性値は,ISO 5218:2004
Representation of Human Sexesにあるものとなる.
+ 0は不明,1は男性,2は女性,9は当てはまらないことを意味する.
+
+
+
des valeurs sont celle de l' SO 5218:2004
identification des sexes humains.; 0
+ : inconnu ; 1 : homme ; 2 : femme ; et 9 : non applicable.
+
+
+ defines the range of attribute values used to express some
+ kind of identifying string as a single sequence
+ of unicode characters possibly including whitespace.
+ définit la gamme des valeurs d'attributs
+ exprimant une chaine de caracteres Unicode, y compris des
+ espaces blancs.
+
+
+
+
+
Attributes using this datatype must contain a single
+ token in which whitespace and other
+ punctuation characters are permitted.
+
+
+ defines the range of attribute values expressed as an XML Name.
+ XML 이름으로 표현되는 속성 값 범위를 정의한다.
+ 定義的屬性值範圍以XML名稱或識別符碼表示
+ XML名前としてある属性値の範囲を定義する.
+ définit la gamme des valeurs d'attribut exprimant
+ un nom XML
+ define la gama de valores de atributos expresados como
+ identificador o un nombre en XML.
+ definisce la gamma di valori di attributi espressi come
+ identificatore o nome XML
+
+
+
+
+
Attributes using this datatype must contain a single word which follows the rules defining a
+ legal XML name (see ): for example they
+ cannot include whitespace or begin with digits.
Les attributs utilisant ce type de données doivent contenir un seul mot, qui suit les règles
+ de définition d'un nom XML valide (voir ) :
+ par exemple ils ne peuvent contenir de blancs ou commencer par des chiffres.
+
+
+ defines attribute values which contain an XML name.
+
+
+
+
+
The rules defining an XML name form a part of the XML Specification.
+
+
+ defines the range of attribute values expressed as a single XML name taken from a list of
+ documented possibilities.
+ 기록된 확률의 목록으로부터 얻어진 단일 XML 이름으로 표현된 속성 값 범위를 정의한다.
+ 定義的屬性值範圍以單字或代號呈現,該單字或代號出自於一份紀錄所有可能性的列表
+ 符号化されている記述にある,ひつとのXML名前を示す属性値の範囲を定義する.
+ définit la gamme de
+ valeurs des attributs exprimant un nom XML
+ extrait d'une liste de possibilités documentées
+ define la gama de valores de atributos expresados como
+ una única palabra o señal tomada de una lista de posibilidades documentadas.
+ definisce la gamma di valori di attributi espressi come
+ singola parola o token tratto da una lista di possibilità attestate
+
+
+
+
+
Attributes using this datatype must contain a single word matching the pattern defined for this datatype: for example it cannot
+ include whitespace but may begin with digits.
+
Typically, the list of documented possibilities will be provided (or exemplified) by a value
+ list in the associated attribute specification, expressed with a valList element.
Les attributs utilisant ce type de données doivent contenir un mot qui suit les règles de
+ définition d'un nom XML valide (voir ):
+ par exemple ils ne peuvent pas contenir des blancs ni commencer par des chiffres.
+
Normalement, la liste des possibilités documentées est fournie (ou exemplifiée) par une liste
+ de valeurs dans la spécification de l'attribut associé, exprimée par un élément
+ valList.
+
+
+ defines a range of attribute values which can be expressed either as a numeric probability or as a coded certainty value.
+
+
+
+
+
+
+
+ defines an attribute value which can be either any non-negative
+integer or the string "unbounded".
+
+
+
+
+
+ defines attribute values which contain either the null string or an XML name.
+
+
+
+
+
+
+
+
The rules defining an XML name form a part of the XML Specification.
+
+
The TEI Infrastructure Module
+ TEI Infrastructure
+ Declarations for classes, datatypes, and macros available to all TEI modules
+ Infrastructure de la TEI
+ 所有TEI模組可用的元素集、資料類型、巨集指令之宣告
+ Dichiarazione di classi, tipi di dati (datatype)e macro disponibili in
+ tutti i moduli TEI
+ Declaraçoes de classes, tipos de dados, e macros disponíveis em todos os
+ módulos TEI
+ 全TEIモジュールで使用可能なデータ型,クラス,マクロ.
+
Deprecated datatype macros
+ defines the range of attribute values expressing a degree of certainty.
+ 확실성 정도를 표현하는 속성 값의 범위를 정의한다.
+ 定義表示正確度的屬性值範圍
+ 確信度を示す属性値の程度を示す.
+ Définit la gamme des valeurs d'attribut exprimant un
+ degré de certitude
+ define la gama de valores de atributos que exprimen un
+ grado de certeza.
+ definisce la gamma di valori di attributi che esprimono
+ un grado di certezza
+
+
+ high
+ medium
+ low
+ unknown
+
+
+
+
Certainty may be expressed by one of the predefined symbolic values high,
+ medium, or low. The value
+ unknown should be used in cases where the encoder
+ does not wish to assert an opinion about the matter. For more precise indication, data.probability may be used instead or in addition.
Le degré de certitude peut être exprimé par l'une des valeurs symboliques prédéfinies
+ high, medium, ou low. Pour une indication précise, data.probability peut être utilisé en remplacement ou en complément.
+
+
+ defines the range of attribute values expressing a probability.
+ 확률을 표현하는 속성 값의 범위를 정의한다.
+ 定義表示可能性的屬性值範圍
+ 出現度を示す属性値の範囲を定義する.
+ définit la gamme des valeurs d'attributs exprimant une
+ probabilité.
+ define la gama de valores de atributos que exprimen un
+ grado de probabilida.d
+ definisce la gamma di valori di attributi che esprimono
+ una probabilità
+
+
+ 0
+ 1
+
+
+
+
Probability is expressed
+ as a real number between 0 and 1; 0 representing certainly false and 1 representing certainly
+ true.
+
+
+
出現度は,0から1までの実数で表現される.0は 確実に偽,1は, 確実に真を示す.
+
+
+
Le degré de probabilité est exprimé
+ par un nombre réel entre 0 et 1 ;
+ 0 représentant certainement faux et 1 certainement
+ vrai.
+
+
+ defines the range of attribute values used for numeric values.
+ 수치에 사용되는 속성 값의 범위를 정의한다.
+ 定義用於數值的屬性值範圍
+ 数値をとる属性値の範囲を定義する.
+ définit la gamme des valeurs d'attributs utilisées pour
+ des valeurs numériques
+ define la gama de valores de atributos para valores
+ numéricos.
+ definisce la gamma di valori di attributi usati per
+ valori numerici
+
+
+
+
+ (\-?[\d]+/\-?[\d]+)
+
+
+
+
+
+
Any numeric value, represented as a decimal number, in floating point format, or as a ratio.
+
To represent a floating point number, expressed in scientific notation, E
+ notation, a variant of exponential notation, may be used. In
+ this format, the value is expressed as two numbers separated by the letter E. The first
+ number, the significand (sometimes called the mantissa) is given in decimal format, while the
+ second is an integer. The value is obtained by multiplying the mantissa by 10 the number of
+ times indicated by the integer. Thus the value represented in decimal notation as 1000.0 might
+ be represented in scientific notation as 10E3.
+
A value expressed as a ratio is represented by two integer values separated by a solidus (/)
+ character. Thus, the value represented in decimal notation as 0.5 might be represented as a
+ ratio by the string 1/2.
Toute valeur numérique, représentée en nombre décimal, notée en virgule flottante ou
+ en fraction.
+
Pour représenter un nombre en virgule flottante, exprimé en notation scientifique,
+ E notation, une variante de la notation
+ exponentielle peut être utilisée. Dans ce format, la valeur est exprimée par deux
+ nombres séparés par la lettre E. Le premier facteur, le significande (parfois appelé mantisse)
+ est donné sous forme décimale, tandis que le second est un entier. La valeur est obtenue en
+ multipliant la mantisse par 10 fois le nombre indiqué par l'entier. Ainsi la valeur
+ représentée en notation décimale 1000.0 pourrait être représentée en notation
+ scientifique 10E3.
+
Une valeur exprimée en fraction est représentée par deux nombres entiers séparés par une
+ barre oblique (/). Ainsi, la valeur représentée en notation décimale 0.5 pourrait être
+ représentée en fraction par la chaîne de caractères 1/2.
+
+
+ defines attribute values used to express an interval value.
+
+
+
+ 0
+
+ regular
+ irregular
+ unknown
+
+
+
+
Any value greater than zero or any one of the values
+ regular, irregular, unknown.
+
+
+ defines attribute values used to express a percentage value.
+
+
+ 100
+
+
+
+
Any non-negative integer value less than 100.
+
+
+ defines the range of attribute values used for a non-negative
+integer value used as a count.
+ 계산으로 사용된 음이 아닌 정수 값의 속성 값 범위를 정의한다.
+ 定義的屬性值範圍,用於作為總數的非負整數值
+
+ 非負整数値を採る属性値の範囲を定義する.
+ définit la gamme des
+ valeurs des attributs exprimant une valeur entière et non négative utilisé pour des calculs.
+ define la gama de valores de atributos para números enteros no negativos usados como un cálculo.
+ definisce la gamma di valori di attributi usati per un numero intero non negativo impiegato come computo
+
+
+
+
+
Only positive integer values (including zero) are permitted
+
+
+
非負整数値のみが許される.
+
+
+
Seules des valeurs positives entières sont autorisées.
+
+
+ defines the range of attribute values expressing a temporal
+ expression such as a date, a time, or a combination of them, that
+ conform to the W3C XML Schema Part 2: Datatypes Second Edition
+ specification.
+ 날짜, 시간 또는 이들의 조합과 같은 시간 표현을 나타내는 속성 값 범위를 정의하며, 이는 W3C XML Schema Part 2: Datatypes Second Edition 명시를 따른다.
+ 定義表示時間的屬性值範圍,如日期、時間或兩者的結合,依照W3CXML Schema Part 2: Datatypes Second Editionspecification標準所定義。
+ 日付や時間などの時間表現をとる属性値の範囲を定義する.これは,W3Cの
+ XML Schema Part 2: Datatypes Second Editionに従ったものになる.
+ définit la gamme des valeurs d'attributs propre à
+ exprimer une valeur temporelle comme une date, une période, ou une combinaison des deux
+ conformément aux spécifications XML Schema Part 2:
+ Datatypes Second Edition du W3C.
+ define la gama de valores de atributos que expresan un valor temporal del tipo fecha, hora, o combinación de ambas, de acuerdo con la especificación de W3C XML Schema Part 2: Datatypes Second Edition.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
If it is likely that the value used is to be compared with
+ another, then a time zone indicator should always be included, and
+ only the dateTime representation should be used.
S'il est probable que la valeur utilisée doive être comparée à
+ d’autres, alors une indication de fuseau horaire sera toujours incluse, et
+ seule la représentation de dateTime sera employée.
+
+
+
+ defines the range of attribute values available for representation of a duration in time using W3C datatypes.
+ W3C 데이터 유형을 사용해서 시간 지속을 나타내는 속성 값 범위를 정의한다.
+ 以W3C datatypes標準格式來定義表示一段持續性時間的屬性值範圍
+ W3Cのデータ型を使い,時間幅を表現する当該属性値の範囲を定義する.
+ définit la gamme des
+ valeurs d'attributs exprimant une durée temporaraire utilisant les types de données W3C
+ define la gama de valores de atributos disponibles para la representación de un periodo de tiempo usando tipos de datos W3C
+
+
+
+
+
+
+
+
+
+
+ a day and a half
+
+
+
+
+ a week
+
+
+
+
+
+
+
+
+
+ une journée et demie
+
+
+
+
+ une semaine
+
+
+
+
+
+
+
+
+
A duration is expressed as a sequence of number-letter pairs,
+ preceded by the letter P; the letter gives the unit and may be Y
+ (year), M (month), D (day), H (hour), M (minute), or S (second),
+ in that order. The numbers are all unsigned integers, except for
+ the S number, which may have a decimal component
+ (using . as the decimal point). If any number is
+ 0, then that number-letter pair may be
+ omitted. If any of the H (hour), M (minute), or S (second)
+ number-letter pairs are present, then the separator T
+ must precede the first time number-letter
+ pair.
+
For complete details, see the W3C
+ specification.
Une durée est exprimée par une suite de paires alphanumériques, précédée par la lettre P ; la lettre donne l'unité et peut être Y
+ (année), M (mois), D (jour), H (heure), M (minute), ou S (seconde),
+ dans cet ordre. Les nombres sont des entiers non signés à l'exception du dernier, qui peut comporter une décimale (en utilisant soit
+ . soit , pour la virgule ; la dernière possibilité est préférable). Si un nombre est 0, alors
+ la paire alphanumérique peut être omise. Si les paires alphanumériques H (heure), M
+ (minute), ou S (seconde) sont présentes, alors le séparateur
+ T doit précéder la première paire alphanumérique
+ time.
+
Pour des détails complets, voir W3C
+ specification.
+
+
+ defines the range of attribute values used to express a truth
+value.
+ 진리값을 표현하는 속성 값 범위를 정의한다.
+ 定義的屬性值範圍表示一個可能未知的真實值
+ 真偽値を示す属性値の範囲を定義する.
+ définit la gamme des
+ valeurs d'attributs exprimant la vérité d'une proposition.
+ define la gama de valores de atributos usados para expresar un valor cierto.
+ definisce la gamma di valori di attributi usati per esprimere un valore di verità
+
+
+
+
+
The possible values of this datatype are 1 or
+ true, or 0 or false.
+
This datatype applies only for cases where uncertainty is
+ inappropriate; if the attribute concerned may have a value other
+ than true or false, e.g. unknown, or
+ inapplicable, it should have the extended version of
+ this datatype: data.xTruthValue.
Ce type de données ne s'applique que dans les cas où l'incertitude est
+ inappropriée ; c’est-à-dire si l'attribut concerné peut avoir une valeur autre
+ que vrai ou faux, par ex. inconnu, ou inapplicable, il devrait alors y
+ avoir la version étendue de ce type de données : data.xTruthValue.
+
+
+
+ extended truth value
+ 확장 진리값
+
+ defines the range of attribute values used to express a truth value which may be unknown.
+ 알려지지 않을 수 있는 진리값을 표현하는 속성 값 범위를 정의한다.
+ 定義的屬性值範圍表示一個可能未知的真實值
+ 不明の場合もある真偽値をとる属性値の範囲を定義する.
+ définit la gamme des
+ valeurs d'attributs exprimant une vérité potentiellement inconnue.
+ define la gama de valores de atributos usados para
+ expresar un valor cierto potencialmente desconocido.
+ definisce la gamma di valori di attributi usati per
+ esprimere un valore di verità potenzialmente sconosciuto
+
+
+
+ unknown
+ inapplicable
+
+
+
+
In cases where where uncertainty is inappropriate, use the
+ datatype data.TruthValue.
+
+
+
不明な場合がなければ,データ型data.TruthValueを使用する.
+
+
+
Dans le cas où l'incertitude n’est pas adaptée, employer plutot
+ le type de données data.TruthValue.
+
+
+ defines the range of attribute values used to identify a particular combination of human
+ language and writing system.
+ 인간의 언어와 문자 체계의 특별한 조합을 식별하는 속성 값 범위를 정의한다.
+ 定義的屬性值範圍標明人類語言與寫作系統的特殊結合
+ 自然言語を示す属性値の範囲を定義する.
+ définit la gamme des
+ valeurs d'attributs exprimant
+ une combinaison particulière du langage humain avec un système d'écriture.
+ define la gama de valores de atributos usados para
+ identificar una combinación determinada de lenguaje y escritura humanos.
+ definisce la gamma di valori di attributi usati per
+ identificare una determinata combinazione di linguaggio e sistema di scrittura umani
+
+
+
+
+
+
+
+
The values for this attribute are language tags as defined in BCP 47. Currently BCP 47 comprises RFC 5646
+ and RFC 4647; over time, other IETF documents may succeed these as the best current practice.
+
A language tag, per BCP 47, is assembled from a sequence of components
+ or subtags separated by the hyphen character (-, U+002D).
+ The tag is made of the following subtags, in the following order. Every subtag except the
+ first is optional. If present, each occurs only once, except the fourth and fifth components
+ (variant and extension), which are repeatable. The IANA-registered code for the language. This is almost always the same as the ISO
+ 639 2-letter language code if there is one. The list of available registered language
+ subtags can be found at . It is recommended
+ that this code be written in lower case.The ISO 15924 code for the script. These codes consist of 4 letters, and it is
+ recommended they be written with an initial capital, the other three letters in lower
+ case. The canonical list of codes is maintained by the Unicode Consortium, and is
+ available at . The IETF
+ recommends this code be omitted unless it is necessary to make a distinction you need.Either an ISO 3166 country code or a UN M.49 region code that is registered with IANA
+ (not all such codes are registered, e.g. UN codes for economic groupings or codes for
+ countries for which there is already an ISO 3166 2-letter code are not registered). The
+ former consist of 2 letters, and it is recommended they be written in upper case; the list
+ of codes can be searched or browsed at . The latter consist of 3 digits; the list of codes can be found at .An IANA-registered variation. These codes are used to indicate
+ additional, well-recognized variations that define a language or its dialects that are
+ not covered by other available subtags.An extension has the format of a single letter followed by a hyphen followed by
+ additional subtags. These exist to allow for future extension to BCP 47, but as of this
+ writing no such extensions are in use.An extension that uses the initial subtag of the single letter
+ x (i.e., starts with x-) has no meaning except as
+ negotiated among the parties involved. These should be used with great care, since they
+ interfere with the interoperability that use of RFC 4646 is intended to promote. In order
+ for a document that makes use of these subtags to be TEI-conformant, a corresponding
+ language element must be present in the TEI header.
+
+
There are two exceptions to the above format. First, there are language tags in the IANA registry that
+ do not match the above syntax, but are present because they have been
+ grandfathered from previous specifications.
+
Second, an entire language tag can consist of only a private use subtag. These tags start
+ with x-, and do not need to follow any further rules established by the IETF and
+ endorsed by these Guidelines. Like all language tags that make use of private use subtags, the
+ language in question must be documented in a corresponding language element in the
+ TEI header.
+
Examples include ShonaTaiwaneseChinese written in traditional script as used in Hong KongEnglish as spoken in Sierra LeonePolishSpanish as spoken in MexicoSpanish as spoken in Latin America
+
+
The W3C Internationalization Activity has published a useful introduction to BCP 47, Language
+ tags in HTML and XML.
Les valeurs pour cet attribut sont les étiquettes de langue définies
+ dans la norme BCP 47. Actuellement, la norme BCP 47
+ intègre les normes RFC 4646 et RFC 4647 ; à l'avenir, d'autres documents de l'IETF pourront leur succéder en
+ tant que meilleure pratique.
+
Une étiquette de langue, pour la norme BCP 47, est formée par l'assemblage d'une
+ suite de composants ou de sous-étiquettes reliés par un trait d'union
+ (-, U+002D). L'étiquette est composée des sous-étiquettes suivantes,
+ dans l'ordre indiqué. Chaque sous-étiquette est facultative, à l'exception de la première.
+ Chacune ne peut avoir qu'une occurrence, sauf les quatrième et cinquième (variante
+ et extension), qui sont répétables. Code de langue enregistré par l'IANA. Il est presque toujours identique au code
+ de langue alphabétique ISO 639-2, s'il y en a un. La liste des sous-étiquettes de langue
+ enregistrées est disponible à : Il est recommandé
+ d'écrire ce code en minuscules.Code ISO 15924 pour l'écriture. Ces codes sont constitués de 4 lettres, et il est
+ recommandé d'écrire la première lettre en majuscule, les trois autres en minuscules. La
+ liste canonique des codes est maintenue par le Consortium Unicode, et elle est disponible
+ à : . L'IETF recommande
+ d'omettre ce code, sauf s'il est nécessaire pour établir une distinction.Soit un code de pays ISO 3166, soit un code de région UN M.49 enregistré par
+ l'IANA (tous les codes de ce type ne sont pas enregistrés : par exemple, ne sont pas
+ enregistrés les codes UN pour des regroupements économiques ou les codes de pays pour
+ lesquels il existe déjà un code de pays alphabétique ISO 3166-2). Le premier est constitué de
+ 2 lettres, et il est recommandé de l'écrire en majuscules. La liste des codes est
+ disponible à : . Le second est constitué de 3 chiffres ; la liste des codes est disponible à : .Variante enregistrée par l'IANA. Ces codes sont utilisés
+ pour indiquer des variantes additionnelles et bien établies, qui définissent une langue
+ ou ses dialectes et qui ne sont pas couverts par d'autres sous-étiquettes
+ existantes.Une extension a la forme d'une lettre unique, suivie d'un trait d'union, lui-même suivi de sous-étiquettes additionnelles. Ces dernières existent pour tenir compte d'une future extension
+ de la norme BCP 47, mais à l'heure actuelle de telles extensions ne sont pas utilisées.Une extension utilisant la sous-étiquette initiale de la lettre
+ x (i.e., commençant par x-) n'a pas d'autre signification
+ que celle négociée entre les parties impliquées. Ces sous-étiquettes doivent être utilisées avec
+ beaucoup de prudence, car elles interfèrent avec l'interopérabilité que l'utilisation de
+ la norme RFC 4646 vise à promouvoir. Pour qu'un document qui utilise ces sous-étiquettes soit
+ conforme à la TEI, un élément language correspondant doit être présent dans
+ l'en-tête TEI.
+
+
Il y a deux exceptions au format ci-dessus. Premièrement, il y a des codes de langue dans
+ le registre de l'IANA
+ qui ne correspondent pas à la syntaxe ci-dessus, mais qui sont présents car ils ont été
+ hérités de spécifications antérieures.
+
En second lieu, une étiquette complète de langue peut consister seulement en une sous-étiquette d'usage privé. Ces étiquettes commencent par x- ; il n'est pas
+ nécessaire qu'elles suivent les autres règles établies par l'IETF et acceptées par les présents
+ Principes directeurs. Comme toutes les étiquettes de langue qui utilisent des sous-étiquettes d'usage
+ privé, la langue en question doit être documentée dans un élément correspondant language dans l'en-tête TEI.
+
Les exemples incluent :ShonaTaïwanaisChinois de Hong Kong écrit dans l'écriture traditionnelleAnglais parlé au Sierra LeonePolonaisEspagnol parlé au MexiqueEspagnol parlé en Amérique latine
+
+
La W3C Internationalization Activity a publié une introduction à la norme BCP 47 dont la lecture peut être utile : Language
+ tags in HTML and XML.
+
+
+
+
+
+
+ defines the range of attribute values used to indicate XML namespaces as defined by the W3C
+ Namespaces in XML
+ Technical Recommendation.
+ W3C Namespaces in XML 기술적 권고안에 의해
+ 정의된 XML 이름공간을 나타내는 속성 값 범위를 정의한다.
+ 定義的屬性值範圍指出XML名稱空間,由XML technical
+ recommendation中的W3C名稱空間所定義。
+ W3Cの
+ XML名前空間で定義されている名前空間を示す属性値の範囲を示す.
+ définit la gamme des
+ valeurs d'attributs exprimant une espace de noms XML tels qu'ils
+ sont définis par le
+ W3C.
+ define la gama de valores de atributos usados para
+ indicar los nombres de los espacios en XML como establecen las recomendaciones técnicas del W3C
+ para los
+
+ definisce la gamma di valori di attributi usati per
+ indicare i nomi degli spazi in XML come stabilito dalle raccomandazioni tecniche del W3C per gli
+ spazi dei nomi in XML.
+
+
+
+
+
The range of syntactically valid values is defined by RFC 3986 Uniform Resource Identifier
+ (URI): Generic Syntax
+
+
La gamme des valeurs syntaxiquement valides est définie par RFC 3986 Uniform Resource Identifier
+ (URI): Generic Syntax
+ .
+
+
+
+ defines a range of values for use in specifying the size of an object that is intended for
+ display.
+ 웹에서 디스플레이 목적의 대상 크기를 명시하는 값의 범위를 정의한다.
+ 定義的屬性值範圍說明預定呈現在網路上之物件大小
+ webページ上で表示する際の大きさを定義する値の範囲を定義する.
+ définit la gamme de valeurs exprimant
+ les dimensions d'un objet destiné à être affiché
+ define una gama de valores para emplearlos en la
+ especificación de las dimensiones de un objeto que se ha de incluir in la red.
+ definisce una gamma di valori da impiegare nello
+ specificare le dimensioni di un oggetto da inserire in rete
+
+
+ [\-+]?\d+(\.\d+)?(%|cm|mm|in|pt|pc|px|em|ex|gd|rem|vw|vh|vm)
+
+
+
+
+
+ The TEI Logo
+ Stylized yellow angle brackets with the letters TEI in
+ between and text encoding initiative underneath, all on a white
+ background.
+
+
+
+
+
+
+
+ Le logo TEI
+
+
+
+
+
+
These values map directly onto the values used by XSL-FO and CSS. For definitions of the
+ units see those specifications; at the time of this writing the most complete list is in the
+ CSS3 working
+ draft.
+
+
+
当該値は,XSLFOやCSSで使用される値になる.詳細は各規格を参照のこと. 現時点で一番詳細なリストは, CSS3 working
+ draftになる.
+
+
+
Ces valeurs peuvent être reportées directement sur des valeurs utilisées par XSL-FO et CSS. Pour les
+ définitions des unités, voir ces spécifications ; à ce jour la
+ liste la plus complète est dans un
+ CSS3 working
+ draft.
+
+
+
+ regular expression pattern
+ 정규표현 유형
+ defines attribute values which are expressed as a regular expression.
+ 정규표현으로 표시된 속성 값을 정의한다.
+ 定義的屬性值範圍以固定方法表示
+ 正規表現を属性値として定義する.
+ définit la gamme des valeurs d'attributs exprimant
+ une expression régulière
+ define una gama de valores de atributos expresados como
+ una expresión regular.
+ definisce una gamma di valori di attributi rappresentati
+ come espressione regolare
+
+
+
+
+
+
+ A regular expression, often called a pattern, is an expression that
+ describes a set of strings. They are usually used to give a concise description of a set,
+ without having to list all elements. For example, the set containing the three strings
+ Handel, Händel, and
+ Haendel can be described by the pattern H(ä|ae?)ndel
+ (or alternatively, it is said that the pattern H(ä|ae?)ndel
+ matches each of the three strings)
+ Wikipedia
+
+
+
+
+ Une expression régulière, souvent appelée modèle, est une expression
+ qui décrit un jeu de chaînes de caractères. Elles sont généralement utilisées pour donner une brève
+ description d'un jeu, sans avoir à en lister tous les éléments. Par exemple, le jeu contenant
+ les trois chaînes de caractères Handel, Händel, et
+ Haendel peut être décrit comme le modèle
+ H(ä|ae?)ndel (ou on peut dire que H(ä|ae?)ndel
+ équivaut à chacune des trois chaînes)
+ wikipedia
+ wikipedia
+
+
+
+
+ defines the data type used to express a point in cartesian space.
+
+
+ (\-?[0-9]+\.?[0-9]*,\-?[0-9]+\.?[0-9]*)
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
A point is defined by two numeric values, which may be expressed in any notation permitted.
+
+
+ defines the range of attribute values used to provide a single
+ URI, absolute or relative, pointing to some other
+resource, either within the current document or elsewhere.
+ 현 문서 또는 다른 곳 어디서든 다른 자원에 대한 단일 포인터를 제공하는 속성 값 범위를 정의한다.
+ 定義的屬性值範圍提供單一指標,連結到其他位於目前文件或他處的資源
+ 他の資源へのポインタをとる属性値の範囲を定義する.
+ définit la gamme des valeurs d'attributs utilisées
+ pour fournir un pointeur URI unique sur une autre ressource, soit dans le document courant, soit
+ dans un autre document
+ define una gama de valores de atributos usados para proporcionar un indicador de cualquier recurso, bien en el documento corriente o en otro.
+ definisce la gamma di valori di attributi usati per indicare un unico puntatore rispetto a qualsiasi altra risorsa all'interno del documento corrente o altrove
+
+
+
+
+
The range of syntactically valid values is defined by
+ RFC 3986
+
Uniform Resource Identifier (URI): Generic
+ Syntax. Note that the values themselves are encoded using
+ RFC
+ 3987
+ Internationalized Resource Identifiers (IRIs) mapping
+ to URIs. For example,
+ https://secure.wikimedia.org/wikipedia/en/wiki/% is encoded
+ as https://secure.wikimedia.org/wikipedia/en/wiki/%25
+ while http://موقع.وزارة-الاتصالات.مصر/ is encoded as
+ http://xn--4gbrim.xn----rmckbbajlc6dj7bxne2c.xn--wgbh1c/
+
+
+
+
La gamme des valeurs valides syntaxiquement est définie parRFC 3986
+ Uniform Resource Identifier (URI): Generic
+ Syntax
+
+
+
+
+ defines the range of attribute values which may be used to
+ specify a TEI or Unicode version number.
+ définit la gamme des valeurs d'attribut
+ exprimant un numéro de version TEI.
+
+
+ [\d]+(\.[\d]+){0,2}
+
+
+
+
The value of this attribute follows the pattern specified by
+ the Unicode consortium for its version number (). A version number
+ contains digits and fullstop characters only. The first number
+ supplied identifies the major version number. A second and third
+ number, for minor and sub-minor version numbers, may also be
+ supplied.
+
+
+
+
La valeur de cet attribut devrait suivre le format proposé par
+ le Consortium Unicode pour identifier les versions (). Un numéro de version
+ ne contient que des chiffres et des points. Le numéro
+ initiale identifie le numéro majeur de la version. Un deuxième et
+ un troisième numéro sont aussi disponibles pour la numérotation
+ facultative des versions mineures ou sous-mineurs.
+
+
+
+ defines the range of attribute values used for version numbers.
+
+
+ [\d]+[a-z]*[\d]*(\.[\d]+[a-z]*[\d]*){0,3}
+
+
+
+
+
+
+
+ defines attribute values which contain a replacement template.
+
+
+
+
+
+
+
+ defines attribute values which contain an XPath expression.
+
+
+
+
+
Any XPath expression using the syntax
+defined in
+
+
+
+ defines the range of attribute values expressed as a single
+ word or token.
+ 단일 단어 또는 토큰으로 표현된 속성 값 범위를 정의한다.
+ 定義的屬性值範圍表示一個單字或代號
+ いち単語またはトークンをとる属性値の範囲を定義する.
+ définit la gamme des
+ valeurs d'attributs exprimant un seul mot ou signe
+ define una gama de valores de atributos expresados como una única palabra o señal.
+ definisce la gamma di valori di attributi espressi come singola parola o singolo token
+
+
+ (\p{L}|\p{N}|\p{P}|\p{S})+
+
+
+
+
Attributes using this datatype must contain a single
+ word which contains only letters, digits,
+ punctuation characters, or symbols: thus it cannot include
+ whitespace.
Les attributs employant ce type de données doivent contenir un
+ mot simple ne contenant que des lettres, des chiffres,
+ des signes de ponctuation, ou des symboles : ils ne peuvent donc pas inclure
+ d’espace.
+
+
+
+ defines the range of attribute values used to identify human or animal sex.
+ 인간 또는 동물의 성을 식별하는 속성 값 범위를 정의한다.
+ 定義的屬性值範圍用以識別人類或動物的性別
+ 人間または動物の性を示す属性値の範囲を定義する.
+ définit la gamme des valeurs d'attributs employés pour
+ identifier le sexe humain ou animal.
+ define la gama de valores de atributos usados para
+ identificar el género humano o animal.
+ definisce una gamma di valori di attributi usati per
+ identificare il sesso umano o animale
+
+
+
+
+
Values for attributes using this datatype may be locally defined by a project, or may refer to an external standard, such as
+ vCard's sex property
+ (in which M indicates male, F female, O other, N none or not applicable, U unknown),
+ or the often used ISO 5218:2004
Representation of Human Sexes
+ (in which 0
+ indicates unknown; 1 male; 2 female; and 9 not applicable,
+ although the ISO standard is widely considered inadequate);
+ cf. CETH's Recommendations for Inclusive Data Collection of Trans People
+ .
+
+
+
当該属性値は,ISO 5218:2004
Representation of Human Sexesにあるものとなる.
+ 0は不明,1は男性,2は女性,9は当てはまらないことを意味する.
+
+
+
des valeurs sont celle de l' SO 5218:2004
identification des sexes humains.; 0
+ : inconnu ; 1 : homme ; 2 : femme ; et 9 : non applicable.
+
+
+ defines the range of attribute values used to express some
+ kind of identifying string as a single sequence
+ of unicode characters possibly including whitespace.
+ définit la gamme des valeurs d'attributs
+ exprimant une chaine de caracteres Unicode, y compris des
+ espaces blancs.
+
+
+
+
+
Attributes using this datatype must contain a single
+ token in which whitespace and other
+ punctuation characters are permitted.
+
+
+ defines the range of attribute values expressed as an XML Name.
+ XML 이름으로 표현되는 속성 값 범위를 정의한다.
+ 定義的屬性值範圍以XML名稱或識別符碼表示
+ XML名前としてある属性値の範囲を定義する.
+ définit la gamme des valeurs d'attribut exprimant
+ un nom XML
+ define la gama de valores de atributos expresados como
+ identificador o un nombre en XML.
+ definisce la gamma di valori di attributi espressi come
+ identificatore o nome XML
+
+
+
+
+
Attributes using this datatype must contain a single word which follows the rules defining a
+ legal XML name (see ): for example they
+ cannot include whitespace or begin with digits.
Les attributs utilisant ce type de données doivent contenir un seul mot, qui suit les règles
+ de définition d'un nom XML valide (voir ) :
+ par exemple ils ne peuvent contenir de blancs ou commencer par des chiffres.
+
+
+ defines attribute values which contain an XML name.
+
+
+
+
+
The rules defining an XML name form a part of the XML Specification.
+
+
+ defines the range of attribute values expressed as a single XML name taken from a list of
+ documented possibilities.
+ 기록된 확률의 목록으로부터 얻어진 단일 XML 이름으로 표현된 속성 값 범위를 정의한다.
+ 定義的屬性值範圍以單字或代號呈現,該單字或代號出自於一份紀錄所有可能性的列表
+ 符号化されている記述にある,ひつとのXML名前を示す属性値の範囲を定義する.
+ définit la gamme de
+ valeurs des attributs exprimant un nom XML
+ extrait d'une liste de possibilités documentées
+ define la gama de valores de atributos expresados como
+ una única palabra o señal tomada de una lista de posibilidades documentadas.
+ definisce la gamma di valori di attributi espressi come
+ singola parola o token tratto da una lista di possibilità attestate
+
+
+
+
+
Attributes using this datatype must contain a single word matching the pattern defined for this datatype: for example it cannot
+ include whitespace but may begin with digits.
+
Typically, the list of documented possibilities will be provided (or exemplified) by a value
+ list in the associated attribute specification, expressed with a valList element.
Les attributs utilisant ce type de données doivent contenir un mot qui suit les règles de
+ définition d'un nom XML valide (voir ):
+ par exemple ils ne peuvent pas contenir des blancs ni commencer par des chiffres.
+
Normalement, la liste des possibilités documentées est fournie (ou exemplifiée) par une liste
+ de valeurs dans la spécification de l'attribut associé, exprimée par un élément
+ valList.
+
+
The TEI Header
Organization of the TEI Header
The TEI Header and Its Components
+ TEI header
+ en-tête TEI
+ TEI 헤더
+ TEI標頭
+ TEI-Header (elektronische Titelseite)
+ Encabezado TEI
+ intestazione
+ supplies descriptive and
+ declarative metadata associated with a digital resource or set of
+ resources.
+ fournit des informations descriptives et déclaratives qui
+ constituent une page de titre électronique au début de tout texte conforme à la TEI.
+ 모든 TEI 구조의 텍스트 서두에 위치하는 전자 제목 페이지를 구성하는 기술적이고 선언적인 정보를
+ 제공한다.
+ 在所有符合TEI標準的文本起始的電子題名頁當中提供敘述性以及宣告性的資訊。
+ 全てのTEI準拠テキストが伴う,電子版のタイトルページを構成する,記述 的・宣言的情報を示す.
+ Beschreibungen und Erklärungen, die eine elektronische
+ Titelseite für ein TEI-konformes Dokument ergeben.
+ proporciona información descriptiva y declarativa de una
+ página de título electrónico prefijada como un texto conforme a TEI.
+ fornisce informazioni descrittive e dichiarative che
+ costituiscono un frontespizio elettronico che precede qualsiasi testo TEI-conforme.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ specifies the kind of document to which the header is attached, for example whether it
+ is a corpus or individual text.
+ spécifie le type de document auquel l'en-tête TEI se
+ rapporte.
+ 헤더가 부착된 문서의 종류를 명시한다. 예를 들어 코퍼스 또는 개별 텍스트.
+ 標明標頭所附屬於的文件類型,例如文集或單一文本。
+ 当該ヘダーが付与される文書の種類を特定する.例えば,コーパス,ま たは独立テキスト.
+ beschreibt die Art des Dokuments, zu dem der Header
+ gehört
+ especifica el tipo de documento al cual el encabezado
+ se refiere, por ejemplo si este es un corpus o un texto individual.
+ specifica il tipo di documento al quale è legata
+ l'intestazione.
+
+ text
+
+
+ the header is attached to a single text.
+ L'en-tête se rapporte à un texte unique.
+ 헤더가 단일 텍스트에 부착된다.
+ 標頭附屬於單一文本中。
+ la cabecera se asocia a un solo texto.
+ 当該ヘダーは,独立テキストに付与される.
+ l'intestazione è allegata ad un singolo
+ testo.
+
+
+ the header is attached to a corpus.
+ L'en-tête se rapporte à un corpus.
+ 헤더가 코퍼스에 부착된다.
+ 標頭附屬於文集中。
+ la cabecera se asocia a un corpus de textos.
+ 当該ヘダーは,コーパスに付与される.
+ l'intestazione è allegata ad un corpus.
+
+
+
+
+
+
+
+
+
+ Shakespeare: the first folio (1623) in electronic form
+ Shakespeare, William (1564–1616)
+
+ Originally prepared by
+ Trevor Howard-Hill
+
+
+ Revised and edited by
+ Christine Avern-Carr
+
+
+
+ Oxford Text Archive
+
+ 13 Banbury Road, Oxford OX2 6NN, UK
+
+ 119
+
+
Freely available on a non-commercial basis.
+
+ 1968
+
+
+ The first folio of Shakespeare, prepared by Charlton Hinman (The Norton Facsimile,
+ 1968)
+
+
+
+
+
Originally prepared for use in the production of a series of old-spelling
+ concordances in 1968, this text was extensively checked and revised for use during the
+ editing of the new Oxford Shakespeare (Wells and Taylor, 1989).
+
+
+
+
Turned letters are silently corrected.
+
+
+
Original spelling and typography is retained, except that long s and ligatured
+ forms are not encoded.
+
+
+
+
+
A reference is created by assembling the following, in the reverse order as that
+ listed here: the n value of the preceding lb
+ a periodthe n value of the ancestor div2
+ a spacethe n value of the parent div1
+
+
+
+
+
+
+
+ 12 Apr 89 Last checked by CAC
+ 1 Mar 89 LB made new file
+
+
+
+
+
+
+
+
+
+
+ La Parisienne
+ Henry BECQUE
+
+
+ ATILF (Analyse et Traitement Informatique de la Langue Française)
+ L434
+
+ 44, avenue de la Libération
+ BP 30687
+ 54063 Nancy Cedex
+ FRANCE
+
+
+
One of the few elements unconditionally required in any TEI
+ document.
+
+
+
Un des seuls éléments obligatoires dans tout document TEI.
+
+
+
+
Uno de los pocos elementos incondicionalmente requeridos en cualquier documento de TEI.
+
+
+
当該要素は,TEI文書中で無条件に必要となる要素の1つである.
+
+
+
+
+
+
+
Types of Content in the TEI Header
Model Classes in the TEI Header
The File Description
+ file description
+ description bibliographique du fichier
+ 파일 기술
+ 檔案描述
+ Dateibeschreibung
+ Descripción del archivo.
+ descrizione del file
+ contains a full bibliographic description of an electronic file.
+ contient une description bibliographique complète du
+ fichier électronique.
+ 전자 파일에 관한 완전한 서지 정보의 기술을 포함한다.
+ 包含對電子檔案的完整書目敘述。
+ 電子ファイルに関する完全な書誌情報を示す.
+ enthält die detaillierte bibliografische Beschreibung
+ einer elektronischen Datei.
+ contiene una descripción bibliográfica completa del
+ archivo electrónico.
+ contiene una descrizione bibliografica completa di un
+ file elettronico.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ The shortest possible TEI document
+
+
+
Distributed as part of TEI P5
+
+
+
No print source exists: this is an original digital text
+
+
+
+
+
+
+
+
+
+ Le document TEI minimal
+
+
+
Distribué comme partie de TEI P5
+
+
+
Aucune source : ce document est né numérique
+
+
+
+
+
+
+
The major source of information for those seeking to create a catalogue entry or
+ bibliographic citation for an electronic file. As such, it provides a title and statements of
+ responsibility together with details of the publication or distribution of the file, of any
+ series to which it belongs, and detailed bibliographic notes for matters not addressed
+ elsewhere in the header. It also contains a full bibliographic description for the source or
+ sources from which the electronic text was derived.
+
+
+
Cet élément est la source d'information principale pour créer une notice de catalogage ou
+ une référence bibliographique destinée à un fichier électronique. Il fournit le titre et les
+ mentions de responsabilité, ainsi que des informations sur la publication ou la distribution
+ du fichier, sur la collection à laquelle il appartient le cas échéant, ainsi que des notes
+ détaillées sur des informations qui n'apparaissent pas ailleurs dans l'en-tête. Il contient
+ également une description bibliographique complète de la ou des sources du texte produit.
+
+
+
La fuente de información principal para intentar crear una entrada de catálogo o una citación
+ bibliográfica para un fichero electrónico. Como tal, proporciona un título y las declaraciones
+ de responsabilidad junto con los detalles de la publicación o de la distribución del fichero,
+ de cualquier serie a la que pertenezca, y las notas bibliográficas detalladas de las materias
+ no abordadas en el encabezado. También contiene una descripción bibliográfica completa para la
+ fuente o las fuentes de las cuales el texto electrónico se deriva.
The Title Statement
+ title statement
+ mention de titre
+ 제목 진술
+ 題名陳述
+ Titelinformation
+ declaración del título
+ dichiarazione sul titolo
+ groups information about the title of a work and those responsible for its content.
+ regroupe les informations sur le titre d’une œuvre et
+ les personnes ou institutions responsables de son contenu intellectuel.
+ 저작의 제목 그리고 지적 내용에 대한 책임에 관한 정보를 모아 놓는다.
+ 匯集關於作品標題與作品智慧內容責任歸屬的資訊。
+ 作品や知的内容に責任のあるもののタイトルに関する情報をまとめる.
+ umfasst Angaben zum Titel eines Werks und zu den für
+ seinen Inhalt Verantwortlichen
+ agrupa la información referente al título de una obra y a
+ los responsables de su contenido intelectual.
+ raggruppa le informazioni sul titolo di un'opera e sulle
+ responsabilità del suo contenuto intellettuale.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Capgrave's Life of St. John Norbert: a machine-readable transcription
+
+ compiled by
+ P.J. Lucas
+
+
+
+
+
+
+
+ Le sanctoral du lectionnaire de l'office dominicain (1254-1256)
+ 2008—..., École nationale des chartes
+ Anne-Élisabeth Urfels-Capot
+
+ responsable des publications
+ Olivier Canteaut (École nationale des chartes)
+
+
+ 2009—..., Éditeur électronique : du TEI à l'écran
+ Vincent Jolivet (École nationale
+ des chartes)
+
+
+ 2009, Éditeur scientifique
+ Pascale Bourgain (École
+ nationale des chartes)
+
+
+ 2008, Conversion du document bureautique vers TEI
+ Frédéric Glorieux (École
+ nationale des chartes)
+
+
+
+
+
+
+
+ Taisho Tripitaka, Electronic version, No. 251 般若波羅蜜多心經
+
+ 電子化
+ 中華電子佛典協會
+
+
+
+
+
+
+
+
+
+ commanditaire
+ specifies the name of a sponsoring organization or institution.
+ indique le nom d’une institution ou d’un organisme
+ partenaires.
+ 후원 조직 또는 기관의 이름을 명시한다.
+ 標明贊助的組織或機構名稱。
+ 支援を行う組織や団体の名前を示す.
+ gibt den Namen einer Organisation oder Institution an,
+ die als finanzieller Förderer auftritt
+ especifica el nombre de la organización o institución
+ responsable.
+ indica il nome di un'organizzazione o istituzzione
+ finanziatrice.
+
+
+
+
+
+
+
+
+
+
+ Association for Computers and the Humanities
+ Association for Computational Linguistics
+ Association for Literary and Linguistic Computing
+
+
+
+
+ Centre national de la recherche scientifique
+
+
+
+
+ 香港影評人協會
+ 香港教育專業人員協會
+ 香港青年協會
+
+
+
+
Sponsors give their intellectual authority to a project; they are to be distinguished from
+ funders, who provide the funding but do not necessarily take intellectual
+ responsibility.
+
+
+
Les commanditaires apportent leur caution intellectuelle à un projet ; ils doivent être
+ distingués des financeurs, qui apportent de financement mais n'ont pas
+ nécessairement une responsabilité intellectuelle.
+
+
+
Los patrocinadores dan su autoridad intelectual a un proyecto; deben ser distinguidos de los
+ proveedores de fondos, que proporcionan la financiación pero no asumen
+ necesariamente la responsabilidad intelectual.
+
+
+
+
+
+ funding body
+ financeur
+ 재정 지원 조직체
+ 資助者
+ Finanzier
+ responsable de la financiación
+ finanziatore
+ specifies the name of an individual, institution, or organization responsible for the
+ funding of a project or text.
+ désigne le nom d’une personne ou d’un organisme
+ responsable du financement d’un projet ou d’un texte.
+ 프로젝트 또는 텍스트의 재정 지원 책임을 지는 개인, 기관, 조직의 이름을 명시한다.
+ 標明負責資助一項計畫或文件製作的個人、機構或組織名稱。
+ テキストやプロジェクトの資金提供に責任を持つ個人,団体,組織の名前を 示す.
+ gibt den Namen einer Einzelperson, Institution oder
+ Organisation an, die für die Finanzierung eines Projects oder Textes verantwortlich ist.
+ proporciona el nombre del individuo, la institución o la
+ organización responsable de la financiación de un proyecto o de un texto.
+ indica il nome di un individuo, istituzione o
+ organizzazione responsabile del finanziamento di un progetto o testo.
+
+
+
+
+
+
+
+
+
+
+ The National Endowment for the Humanities, an independent federal agency
+ Directorate General XIII of the Commission of the European Communities
+ The Andrew W. Mellon Foundation
+ The Social Sciences and Humanities Research Council of Canada
+
+
+
+
+ Ministère de l'Enseignement supérieur et de la Recherche
+ Conseil général de Meurthe-et-Moselle
+
+
+
+
+ 行政院國家科學委員會
+ 國家圖書館
+ 國立故宮博物院
+ 國立自然科學博物館
+
+
+
+
Funders provide financial support for a project; they are distinct from
+ sponsors, who provide intellectual support and authority.
+
+
+
Les financeurs apportent un soutien financier au projet ; ils se distinguent des
+ commanditaires, qui apportent une caution , une autorité intellectuelle.
+
+
+
Los proveedores de fondos proporcionan la ayuda financiera para un proyecto; son distintos de
+ los patrocinadores, que proporciona la ayuda y la autoridad intelectual.
+
+
+
+
+
+ principal researcher
+ chercheur principal
+ 책임 연구자
+ 主導研究者
+ Projektleiter
+ investigador principal
+ ricercatore principale
+ supplies the name of the principal researcher responsible for the
+creation of an electronic text.
+ contient le nom du chercheur qui est principalement responsable de la création d’un texte électronique.
+ 전자 텍스트 생성에 대한 책임을 지는 책임 연구자의 이름을 제시한다.
+ 提供負責電子文件製作的主導研究者的姓名。
+ 電子テキストの生成に責任のある中心的な研究者の名前を示す.
+ gibt den Namen des
+ Mitarbeiters an, der hauptsächlich für die Herstellung eines
+ elektronischen Textes verantwortlich ist.
+ proporciona el nombre del investigador principal de la creación de un texto electrónico.
+ fornisce il nome del ricercatore principale responsabile della creazione di un documento elettronico.
+
+
+
+
+
+
+
+
+
+
+ Gary Taylor
+
+
+
+
+ Anne-Élisabeth Urfels-Capot
+
+
+
+
+ 蔡元培
+
+
+
+
+
+
The Edition Statement
+ edition statement
+ mention d'édition
+ 편집 진술
+ 版本陳述
+ Erklärung zur Edition
+ declaración de la edición
+ dichiarazione sull'edizione
+ groups information relating to one edition of a text.
+ regroupe les informations relatives à l’édition d’un texte.
+ 텍스트의 한 판에 관련된 정보를 모아 놓는다.
+ 匯集文件某一版本的相關資訊。
+ 版に関する情報をまとめる.
+ umfasst die Angaben zu
+ einer Edition eines Textes.
+ agrupa la información relativa a la edición de un texto.
+ raggruppa le informazioni riguardo una edizione di un testo.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Students' edition
+
+ Adapted by
+ Elizabeth Kirk
+
+
+
+
+
+
+
+ Deuxième édition
+
+ réalisée par
+ L. F.
+
+
+
+
+
+
+
+
Première édition électronique, Nancy, 2002, réalisée dans le cadre de la
+ base FRANTEXT .
+
+
+
+
+
+
+
+
+ édition
+ 편집, 판
+ 版本
+ Edition
+ edición
+ Edizione
+ describes the particularities of one edition of a text.
+ décrit les particularités de l’édition d’un texte.
+ 텍스트의 한 판의 특성을 기술한다.
+ 描述文件某一版本的特質。
+ テキストの版の詳細を示す.
+ beschreibt die
+ Besonderheiten einer Edition eines Textes.
+ describe las particularidades de la edición de un texto.
+ descrive le peculiarità di una edizione del testo.
+
+
+
+
+
+
+
+
+
+ First edition Oct 1990
+
+ Students' edition
+
+
+
+
+ Première édition électronique, Nancy 2002
+
+
+
+
+
+ 初版1990年10月
+
+ 學生版
+
+
+
+
+
+
Type and Extent of File
+ étendue
+ describes the approximate size of a text stored on some carrier medium or of some other object, digital or non-digital, specified in any convenient units.
+ décrit la taille approximative d’un texte stocké sur son
+ support, numérique ou non numérique, exprimé dans une unité quelconque appropriée.
+ 전달 매체, 즉, 디지털 또는 비디지털로 저장된 텍스트의, 다양한 단위로 명시되는, 대략적 규모를
+ 기술한다.
+ 描述電子文件儲存在某一承載媒介時的約略大小,標以任何適用的單位。
+ 電子・非電子テキストのおよその大きさを任意の単位で示す.
+ beschreibt die ungefähre Größe des elektronischen Texts,
+ die er auf einem Datenträger einnimmt (Angabe in entsprechenden Maßeinheiten).
+ describe el tamaño aproximado de un texto almacenado en
+ algún medio, digital o no, especificándolo en alguna unidad funcional.
+ descrive la grandezza approssimativa di un documento
+ elettronico così come immagazzinata su supporto, secondo una qualsiasi unità funzionale.
+
+
+
+
+
+
+
+
+
+ 3200 sentences
+ between 10 and 20 Mb
+ ten 3.5 inch high density diskettes
+
+
+
+
The measure element may be used to supplied normalised
+or machine tractable versions of the size or sizes concerned.
+
+
+ About four megabytes
+ 245 pages of source
+material
+
+
+
+
+
+ 198 pages
+ 90 195 mots
+ 1 Mo
+
+
+
+
+ 3200個句子
+ 介於10 到20 Mb
+ 10片3.5吋磁碟片
+
+
+
+
+
+
+
+
+
Publication, Distribution, Licensing, etc.
+ publication statement
+ mention de publication
+ 출판 진술
+ 出版陳述
+ Erklärung zum Status der Veröffentlichung
+ declaración de la publicación
+ dichiarazione sulla pubblicazione
+ groups information concerning the publication or distribution of an electronic or other text.
+ regroupe des informations concernant la publication ou
+ la diffusion d’un texte électronique ou d’un autre type de texte.
+ 전자 또는 기타 텍스트의 출판 또는 배포에 관한 정보를 모아 놓는다.
+ 匯集電子文件或其他類型文件的出版或發行相關資訊。
+ 電子テキストなどの出版や頒布に関する情報をまとめる.
+ umfasst Angaben zu Veröffentlichung oder Vertrieb eines
+ elektronischen oder sonstigen Texts.
+ agrupa la información concerniente a la publicación o
+ distribución de un texto electrónico u otro texto.
+ raggruppa le informazioni riguardo la pubblicazione o la
+ distribuzione di un documento elettronico o di altra natua.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ C. Muquardt
+ Bruxelles & Leipzig
+
+
+
+
+
+
+
+ ATILF (Analyse et Traitement Informatique de la Langue Française)
+ L434
+
+ 44, avenue de la Libération
+ BP 30687
+ 54063 Nancy Cedex
+ FRANCE
+
+
+
Where a publication statement contains several members of the
+ model.publicationStmtPart classes rather than one or
+ more paragraphs or anonymous blocks, care should be taken to
+ ensure that the repeated elements are presented in a meaningful
+ order. It is a conformance requirement that elements supplying
+ information about publication place, address, identifier,
+ availability, and date be given following the name of the
+ publisher, distributor, or authority concerned, and preferably in
+ that order.
+
+
+
Bien que non imposé par les schémas, un document conforme à la TEI doit donner des
+ informations sur le lieu de publication, l'adresse, l'identifiant, les droits de diffusion et la date
+ dans cet ordre, après le nom de l'éditeur, du distributeur, ou de l'autorité concernée.
+
+
+
Aunque no sea hecho obligatorio por los esquemas, es un requisito para la conformidad de TEI
+ que la información sobre el lugar de publicación, la dirección, el identificador, la
+ disponibilidad, y la fecha de publicación. se dé en ese orden, después del nombre del editor,
+ del distribuidor, o de la autoridad referida
+
+
+
+
+
+
+ diffuseur
+ supplies the name of a person or other agency responsible for the
+distribution of a text.
+ donne le nom d’une personne ou d’un organisme responsable de la diffusion d’un texte.
+ 텍스트 배포 권한을 갖는 개인 또는 기관의 이름을 제시한다.
+ 提供負責發行文件的個人或其他經銷商的名稱。
+ テキストの頒布に責任を持つ人物または団体の名前を示す.
+ gibt die Person oder
+ Stelle an, die für den Vertrieb des Texts verantwortlich ist.
+ proporciona el nombre de la persona o agente responsable de la distribución de un texto.
+ fornisce il nome di una persona o di un'organizzazione responsabile della distribuzione di un testo.
+
+
+
+
+
+
+
+
+
+
+
+ Oxford Text Archive
+ Redwood and Burn Ltd
+
+
+
+
+ Laboratoire : Analyse et Traitement Informatique de la Langue Française)
+ Centre National de la Recherche Scientifique
+
+
+
+
+ 中央研究院
+ 中華電子佛典協會
+
+
+
+
+
+
+ release authority
+ responsable de la publication.
+ 배포권자
+ 供應機構
+ Freigabeinstanz
+ responsable de la presentación
+ autorità di pubblicazione
+ supplies the name of a person or other agency responsible for
+ making a work available, other than a publisher or
+ distributor.
+ donne le nom de la personne ou de l'organisme responsable de la publication d’un fichier électronique, autre qu’un éditeur ou un distributeur.
+ 출판사 또는 배포자 외에 전자 파일 사용 허가에 대한 권한을 갖는 개인 또는 기관의 이름을 제시한다.
+ 說明除了出版者或發行者之外,負責提供電子檔案的個人或其他經銷商的名稱。
+ 電子データの作成に責任のある個人または団体の名前を示す.出版者や頒布
+ 者ではない.
+ gibt die Person oder
+ Stelle (außer Verlag oder Vertrieb) an, die für die Zugang zu einer
+ elektronischen Datei verantwortlich ist.
+ proporciona el nombre de la persona o agente responsable que ha hecho disponible un archivo electrónico, que no es ni el editor ni el distribudor.
+ fornisce il nome di una persona o di un'organizzazione responsabile della messa a disposizione di un file elettronico, diversa dalll'editore o dal distributore.
+
+
+
+
+
+
+
+
+
+ John Smith
+
+
+
+
+ A. D.
+
+
+
+
+ 高行健
+
+
+
+
+
+
+ identifier
+ identifiant
+ 식별 숫자
+ 識別代碼
+ Identifikationsnummer
+ número identificativo
+ numero identificatore
+ supplies any form of identifier used to identify some object,
+ such as a bibliographic item, a person, a title, an organization,
+ etc. in a standardized way.
+ donne un numéro normalisé ou non qui peut être utilisé
+ pour identifier une référence bibliographique.
+ 서지 정보 항목을 식별하기 위해 사용되는 표준 또는 비표준 숫자를 제시한다.
+ 提供任何用來識別書目項目的標準或非標準編碼。
+ 書誌項目を特定する標準的・非標準的数値を示す.
+ gibt eine standardisierte oder nicht standardisierte
+ Nummer an, die genutzt wird um einen Text bibliografisch eindeutig zu identifizieren
+ proporciona un número, estándard o no, usado para la
+ identificación de un elemento bibliográfico.
+ fornisce un identificatore, standard o meno, usato per
+ identificare un'unità bibliografica
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ categorizes the identifier, for example as an ISBN, Social
+ Security number, etc.
+ classe un numéro dans une catégorie, par exemple
+ comme étant un numéro ISBN ou comme appartenant une autre série normalisée.
+ 예를 들어 ISBN 또는 기타 표준 일련번호로, 숫자를 범주화한다.
+ 表明編碼的種類,例如國際標準書號 (ISBN) 或其他標準系列編碼。
+ 当該数値の分類を示す.例えば,ISBNなど.
+ bestimmt die Nummer, zum Beispiel als ISBN-Nummer
+ oder als eine andere Standardseriennummer.
+ clasifica el número, por ejemplo como un ISBN o
+ cualquier otro número estándard.
+ classifica l'identificatore, ad esempio come codice
+ ISBN o altri generi di identificatori standard.
+
+
+
+
+
+ 978-1-906964-22-1
+ 0143-3385
+ 10.1000/123
+ http://www.worldcat.org/oclc/185922478
+ http://authority.nzetc.org/463/
+ Thomason Tract E.537(17)
+ C695
+ 345
+
+
In the last case, the identifier includes a non-Unicode character
+which is defined elsewhere by
+means of a glyph or char element referenced here as #sym.
+
+
+
+ 0143-3385
+ 116
+ 1-896016-00-6
+
+
+
+
idno should be used for labels which identify an
+ object or concept in a formal cataloguing system such as a
+ database or an RDF store, or in a distributed system such as the
+ World Wide Web. Some suggested values for type on idno
+ are ISBN, ISSN, DOI, and
+ URI.
+
+
+
+
+
+
+
+ disponibilité
+ supplies information about the availability of a text, for example any restrictions on its
+ use or distribution, its copyright status, any licence applying to it, etc.
+ renseigne sur la disponibilité du texte, par exemple sur
+ toutes restrictions quant à son usage ou sa diffusion, son copyright, etc.
+ 텍스트 이용에 관한 정보를 제시한다. 예를 들어 사용 또는 배포의 제한, 저작권 상태 등.
+ 提供關於文件可利用性的資訊,例如使用或發行上的任何限制、版權狀態等。
+ テキストの利用可能性に関する情報を示す.例えば,その使用や頒布, 著作権に関する制限など.
+ beschreibt die Nutzbarkeit eines Textes, zum Beispiel
+ Einschränkungen den Gebrauch oder die Weitergabe betreffend, den Copyright-Status usw.
+ proporciona información sobre la disponibilidad de un
+ texto, por ejemplo cualquier restricción en cuanto a su uso o distribución, su copyright, etc.
+ fornisce informazioni sulla disponibilità di un testo,
+ per esempio su qualsiasi restrizione che si applica alla sua utilizzazione o distribuzione, il
+ suo statuto in merito al copyright, etc.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ supplies a code identifying the current availability of the text.
+ donne un code caractérisant la disponibilité
+ actuelle d’un texte.
+ 텍스트의 현재 이용 가능성을 식별하는 부호를 제공한다.
+ 提供一個代號,用來確認文件目前的可利用性。
+ 当該テキストの,現在の利用可能性を表すコードを示す.
+ gibt einen Kode an, der die derzeitige Nutzbarkeit
+ eines Textes festlegt.
+ proporciona un código identificativo de la
+ disponibilidad actual del texto.
+ fornisce un codice che identifica l'attuale
+ disponibilità del testo.
+
+ unknown
+
+
+ the text is freely available.
+ Le texte est libre de droits.
+ 텍스트를 자유롭게 이용할 수 있음.
+ 文件的可利用性不受限。
+ el texto está libremente disponible.
+ 当該テキストは,自由に使用できる.
+ il testo è disponibile gratuitamente.
+
+
+ the status of the text is unknown.
+ Le statut du texte est inconnu.
+ 텍스트의 상태를 알 수 없다.
+ 文件狀態不明。
+ el estatus del texto es desconocido.
+ 当該テキストの利用可能性は不明.
+ la disponibilità del testo non è nota
+
+
+ the text is not freely available.
+ le texte est sous droits.
+ 텍스트를 자유롭게 사용할 수 없음.
+ 文件的可利用性受限制。
+ el texto no está libremente disponible.
+ 当該テキストは,自由に使用できない.
+ il testo non è disponibile gratuitamente.
+
+
+
+
+
+
+
+
Available for academic research purposes only.
+
+
+
In the public domain
+
+
+
Available under licence from the publishers.
+
+
+
+
+
+
+
L' ABES a adopté le système Créative Commons pour permettre à tous ceux qui le
+ souhaitent, de reproduire tout ou partie des rubriques du site de l'ABES sur support
+ papier ou support électronique.
+
+
+
+
+
+
+
僅供學術研究使用
+
+
+
用於公共領域
+
+
+
需徵求出版商授權
+
+
+
+
+
+
+
+
The MIT License
+ applies to this document.
+
Copyright (C) 2011 by The University of Victoria
+
Permission is hereby granted, free of charge, to any person obtaining a copy
+ of this software and associated documentation files (the "Software"), to deal
+ in the Software without restriction, including without limitation the rights
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ copies of the Software, and to permit persons to whom the Software is
+ furnished to do so, subject to the following conditions:
+
The above copyright notice and this permission notice shall be included in
+ all copies or substantial portions of the Software.
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ THE SOFTWARE.
+
+
+
+
+
+
A consistent format should be adopted
+
+
+
On devrait adopter un format de codage reconnu.
+
+
+
Se debe adoptar un formato constante
+
+
+
永続的な形式で示されるべきである.
+
+
+
+
+
+ contains information about a licence or other legal agreement
+ applicable to the text.
+ contient des informations
+légales applicables au texte, notamment le contrat de licence
+définissant les droits d'utilisation.
+
+
+
+
+
+
+
+
+
+
+
+
+ Licence: Creative Commons Attribution-Share Alike 3.0 New Zealand Licence
+
+
+
+
+
+
+ Creative Commons Attribution 3.0 non transposé (CC BY 3.0)
+
+
+
+
+
+ Ce document
+ est publié librement sur le web à destination de la communauté scientifique
+ dans le cadre de la licence Creative Commons « Paternité-Pas d’Utilisation
+ Commerciale-Partage des Conditions Initiales à l’Identique 2.0 France ».
+
+
+
+
+
+
+
+
The Creative Commons Attribution 3.0 Unported (CC BY 3.0) Licence
+ applies to this document.
+
The licence was added on January 1, 2013.
+
+
+
+
+
+
A licence element should be supplied for each licence
+ agreement applicable to the text in question. The
+ target attribute may be used to reference a full
+ version of the licence. The when, notBefore,
+ notAfter, from or to attributes
+ may be used in combination to indicate the date or dates of
+ applicability of the licence.
+
+
+
+
+
The Series Statement
+ series statement
+ mention de collection
+ 연속간행물 진술
+ 集叢陳述
+ Erklärung zu einer Publikationsreihe
+ declaración de serie
+ dichiarazione sulla serie
+ groups information about the series, if any, to which a publication belongs.
+ regroupe toute information relative à la collection (si
+ elle existe) à laquelle appartient une publication.
+ 연속 간행물에 대한 정보를 모아 놓는다.
+ 若出版品隸屬於某叢書,則在此匯集該叢書的相關資訊。
+ 出版されたシリーズの情報をまとめる.
+ umfasst (wenn nötig) Angaben zu einer Reihe, zu der eine
+ Veröffentlichung gehört
+ agrupa información sobre la serie, si la hay, a la que
+ pertenece una publicación.
+ raggruppa le informazioni circa la serie alla quale
+ eventualmente la pubblicazione appartiene.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Machine-Readable Texts for the Study of Indian Literature
+
+ ed. by
+ Jan Gonda
+
+ 1.2
+ 0 345 6789
+
+
+
+
+
+
+ Babel
+
+ directeur de collection
+ Jacques Dubois
+
+
+ directeur de collection
+ Hubert Nyssen
+
+ 1140-3853
+
+
+
+
+
+
+ 《印度文學研究》的電腦可讀文件
+
+ 編者
+ 珍.崗妲
+
+ 0 345 6789
+ 1.2
+
+
+
+
+
+
+
+
The Notes Statement
+ notes statement
+ mention de notes
+ 주석 진술
+ 附註陳述
+ Erklärung zu Anmerkungen
+ declaración de notas
+ dichiarazione sulle note
+ collects together any notes providing information about a text additional to that recorded
+ in other parts of the bibliographic description.
+ rassemble toutes les notes fournissant des informations
+ sur un texte, en plus des informations mentionnées dans d'autres parties de la description
+ bibliographique.
+ 서지 정보 기술의 다른 부분에 기록된 것들 이외에, 텍스트에 관한 정보를 제공하는 주석들을 모아
+ 놓는다.
+ 收集其他部分的書目描述中所未記載的任何文件相關附註。
+ 当該書誌情報の他の場所に記録されているテキストに関する注釈をまとめる.
+ fasst weitere Anmerkungen mit Informationen über den
+ Text zusammen, zusätzlich zu den Informationen, die in anderen Teilen der bibliografischen
+ Beschreibung bereits festgehalten sind.
+ agrupa algunas notas que proporcionan información sobre
+ un texto adicional referido en otras partes de la descripción bibliográfica.
+ raggruppa tutte le note sul testo in aggiunta a quelle
+ registrate nelle altre parti della descrizione bibliografica.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Historical commentary provided by Mark Cohen
+ OCR scanning done at University of Toronto
+
+
+
+
+
+
+ Les photographies, héliogravures et cartes postales colorisées signées Lehnert
+ & Landrock, de techniques novatrices, sont réellement des œuvres d'art ; elles
+ apportent en outre une documentation considérable sur la Tunisie du début du XXe
+ siècle.
+
+
+
+
+
+
+ 歷史評論由馬克.可漢提共
+ OCR光學辨識掃描於多倫多大學
+
+
+
+
+
Information of different kinds should not be grouped together into the same note.
+
+
+
des informations hétérogènes ne doivent pas être regroupées dans une même note.
+
+
+
La información de diversos tipos no se debe agrupar junta en la misma nota.
+
+
+
種類が異なる情報は,同じ注釈としてまとめるべきではない.
+
+
+
+
+
+
The Source Description
+ source description
+ description de la source
+ 원전 기술
+
+ descripción de la fuente
+ descrizione della fonte
+ describes the source from which an electronic text was derived or generated, typically a
+ bibliographic description in the case of a digitized text, or a phrase such as "born digital"
+ for a text which has no previous existence.
+ décrit la source à partir de laquelle un texte électronique a été
+ dérivé ou produit, habituellement une description bibliographique pour un texte numérisé, ou une
+ expression comme "document numérique natif " pour un texte qui n'a aucune existence précédente.
+ 전자 파일을 생성하거나 도출한 원전 텍스트에 대한 기술을 제시한다.
+ 提供所製電子文件的一個或數個來源文件的書目描述。
+ 電子テキストが作られた元テキストの情報を示す.
+ beschreibt den (die) Quelltext(e), von dem (denen) der
+ elektronische Text abstammt oder erzeugt wurde.
+ proporciona una descripción del texto (o textos) fuente
+ del que un texto electrónico deriva o ha sido generado.
+ fornisce una descrizionei relativa alla o alle fonti da
+ cui è derivato o generato un documento elettronico.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ The Interesting story of the Children in the Wood. In
+ Victor E Neuberg, The Penny Histories.
+ OUP1968.
+
+
+
+
+
+
+
Texte original : le texte a été créé sous sa forme électronique.
+
+
+
+
+
+
+
無來源:以電腦可讀格式建立
+
+
+
+
+
+
+
Born digital: no previous source exists.
+
+
+
+
+
+
+
+ fully-structured bibliographic citation
+ 완전히 구조화된 서지 인용 정보
+
+ citación bibliográfica estructurada completa
+ référence bibliographique totalement structurée
+ citazione bibliografica strutturata
+ contains a fully-structured bibliographic citation, in which all components of the TEI file
+ description are present.
+ 완전히 구조화된 서지 정보를 포함하며, 그 안에 TEI 파일 기술의 모든 성분이 제시된다.
+ 包含結構完整的書目資料,其中呈現出TEI檔案描述內的所有元件。
+ 厳密な構造を持つ書誌情報を示す..TEIのファイル記述の全要素は,ここ に記述される.
+ contient une référence bibliographique totalement
+ structurée : tous les composants de la description du fichier TEI y sont présents.
+ contiene una cita bibliográfica completamente
+ estructurada, en la cual están presentes todos los componentes de la descripción del archivo
+ TEI.
+ contiene una citazione bibliografica interamente
+ strutturata nella quale sono presenti tutti i componenti di descrizione di un file TEI.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ The Feminist Companion to Literature in English: women writers from the middle ages
+ to the present
+ Blain, Virginia
+ Clements, Patricia
+ Grundy, Isobel
+
+
+ UK edition
+
+ 1231 pp
+
+ Yale University Press
+ New Haven and London
+ 1990
+
+
+
No source: this is an original work
+
+
+
+
+
+
+
+
+ Hydraulique fluviale. Tome 16, Écoulement et phénomènes de transport dans les
+ canaux à géométrie simple
+ Mustafa Siddik Altinakar
+ René Walther
+
+
+ 2e édition corrigée
+
+ 627 p.
+
+ Presses polytechniques et universitaires romandes
+ Lausanne
+ 2008
+
+
+
The Encoding Description
+ encoding description
+ description de l'encodage
+ 부호화 기술
+ 編碼描述
+ Beschreibung der Kodierung
+ Descripción de la codificación
+ descrizione della codifica
+ documents the relationship between an electronic text and the
+source or sources from which it was derived.
+ documente la relation d'un texte électronique avec sa ou ses sources.
+ 전자 텍스트와 그것의 원전 텍스트 혹은 텍스트들 사이의 관련성을 기록한다.
+ 記錄電子文件和其ㄧ個或多個文件來源之間的關係。
+ 電子テキストとその元資料との関係を示す.
+ dokumentiert das
+ Verhältnis zwischen dem elektronischen Text und seiner Quelle oder
+ den Quellen, von der oder von denen er abstammt
+ documenta la relación entre un texto electrónico y la fuente o fuentes de las que este deriva.
+ documenta la relazione fra un documento elettronico e la o le fonti da cui è derivato.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Basic encoding, capturing lexical information only. All
+hyphenation, punctuation, and variant spellings normalized. No
+formatting or layout information preserved.
+
+
+
+
+
+
+
+
Corpus de
+ textes sélectionnés pour la formation MISAT, Frejus,
+ juillet 2010.
+
+
+
+
Corpus
+ d'échantillons de 2000 mots pris au début de chaque texte.
+
+
+
+
+
+
+
+
+
The Project Description
+ project description
+ description du projet
+ 프로젝트 기술
+ 計畫描述
+ Beschreibung des Projekts
+ descripción del proyecto
+ descrizione del progetto
+ describes in detail the aim or purpose for which an electronic file was encoded, together
+ with any other relevant information concerning the process by which it was assembled or
+ collected.
+ décrit en détail le but ou l’objectif visé dans
+ l’encodage d’un fichier électronique, ainsi que toute autre information pertinente sur la
+ manière dont il a été construit ou recueilli.
+ 전자 파일이 부호화된 목적을 상세히 기술하며, 아울러 그것이 수집된 절차에 관한 기타 관련 정보를
+ 기술한다, .
+ 詳述將電子檔案編碼的目標或目的,以及其他關於檔案匯集或收集程序的任何資訊。
+ 制作過程に関する情報も含めて,電子ファイルが作られた目的の詳細を示す.
+ beschreibt detailliert Ziel bzw. Zweck, für den eine
+ Datei kodiert wurde, zusammen mit weiteren relevanten Informationen, die das Verfahren
+ betreffen, nach dem die Daten zusammengestellt oder gesammelt wurden
+ describe con detalle el objetivo o propósito para el que
+ un archivo electrónico ha sido codificado, junto a cualquier otra información relevante sobre el
+ proceso de codificación.
+ descrive in dettaglio lo scopo per il quale un documento
+ elettronico è sato codigicato, insieme a qualsiasi altra informazione rilevante riguardo le
+ procedure di raccolta.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Texts collected for use in the Claremont Shakespeare Clinic, June 1990
+
+
+
+
+
+
+
La saisie a été effectuée par notre partenaire Datactivity. Le texte saisi a été
+ ensuite converti et remis en forme selon les normes du format XML, standard d’échange ou
+ d’affichage de documents permettant de séparer la forme et le contenu et offrant une
+ déclinaison d’outils qui donnent la possibilité d’exploiter un texte comme une véritable
+ base de données. La norme adoptée (DTD) est le TEI (Text Encoding Initiative).
+
Affichage et manipulation du texte (mise au format, filtrage, réorganisation) se font
+ sur un serveur Apache à l'aide de l'infrastructure Axkit.
+
Le moteur logiciel du site a été développé en Xpathscript et s'appuie sur les travaux
+ de Dominique Quatravaux (Alliance Francophone Pour l'Avancement d'XPathScript) et de
+ Yanick Champoux (support de Libxml via YPathScript).
+
Les programmes développés pour le site sont mis à la disposition en open-source sur
+ demande (contacter Alexandre Gefen).
+
Les fonctions de recherche plein texte sont fournies par Philologic dans le cadre du
+ partenariat du projet avec ARTFL.
+
L’architecture de travail, sous Linux, est destinée à garantir une haute disponibilité
+ et des performances optimales. La liaison avec Internet est assurée par les services
+ informatiques de l’Université de Neuchâtel (SITEL).
+
+
+
+
+
+
+
文件收集於1990年7月,杭州杜甫詩作研討會使用
+
+
+
+
+
+
+
+
+
The Sampling Declaration
+ sampling declaration
+ déclaration d'échantillonnage
+ 표본 추출 선언
+ 取樣宣告
+ Beschreibung des Auswahlverfahrens
+ declaración de muestra
+ dichiarazione di campionatura
+ contains a prose description of the rationale and methods used in sampling texts in the
+ creation of a corpus or collection.
+ contient une description en texte libre du raisonnement
+ et des méthodes utilisés pour l'échantillonnage des textes dans la création d’un corpus ou
+ d’une collection.
+ 코퍼스 또는 텍스트 집단 구축에서 표본 추출에 사용된 원리와 방법에 대한 산문체 기술을 포함한다.
+ 以篇章描述的方式說明建立文集或文選時文件取樣的原理與方法。
+ コーパス等を作成する際,テキストを標本化する原理や手法に関する,散文 による解説を含む.
+ enthält eine Beschreibung der Kriterien und Methoden,
+ nach denen die Textsamples für ein Korpus oder eine Sammlung ausgewählt wurden.
+ contiene una descripción en prosa sobre los fundamentos y
+ métodos usados en textos de muestra en la creación de un corpus o una selección de textos.
+ contiene una descrizione dei metodi e dei principi usati
+ nella campionatura dei testi nella creazione o raccolta del corpus.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Samples of up to 2000 words taken at random from the beginning, middle, or end of each
+ text identified as relevant by respondents.
+
+
+
+
+
+
+
Corpus
+ d'échantillons de 2000 mots pris au début de chaque texte.
+
+
+
+
+
This element records all information about systematic inclusion or omission of portions of
+ the text, whether a reflection of sampling procedures in the pure sense or of systematic
+ omission of material deemed either too difficult to transcribe or not of sufficient
+ interest.
+
+
+
Cet élément rassemble toute information sur l'inclusion ou l'omission systématique de
+ segments du texte, quel que soit le résultat des procédures d'échantillonnage au sens strict,
+ ou de l'omission systématique d'éléments jugés soit trop difficiles à transcrire, soit sans
+ intérêt.
+
+
+
Este elemento registra toda la información sobre la inclusión sistemática o la omisión de
+ fragmentos de texto, si los procedimientos de muestra en el sentido estricto o la omisión
+ sistemática del material se consideran demasiado difíciles de transcribir o no de suficiente
+ interés.
The Editorial Practices Declaration
+ editorial practice declaration
+ déclaration des pratiques éditoriales
+ 편집 실행 선언
+ 編輯實行宣告
+ Beschreibung der Editionsprinzipien
+ declaración de la edición
+ dichiarazione sulle pratiche editoriali
+ provides details of editorial principles and practices applied
+during the encoding of a text.
+ donne des précisions sur les pratiques et les principes éditoriaux appliqués au cours de l’encodage du texte.
+ 텍스트 부호화에서 적용된 편집 원리 및 기준의 상세 항목을 제시한다.
+ 提供文件編碼時使用的編輯原則與實行方法的細節。
+ テキストを符号化する際に適用される編集方針や編集方法の詳細を示す.
+ beschreibt Einzelheiten
+ der Editionsprinzipien und Verfahren, die bei der Kodierung des
+ Textes angewandt wurden.
+ proporciona detalles de principios editoriales y prácticas aplicadas en la codificación de un texto.
+ fornisce dettagli su principi e pratiche editoriali seguite nella codifica di un testo.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
All words converted to Modern American spelling using
+ Websters 9th Collegiate dictionary
+
+
+
+
All opening quotation marks converted to “ all closing
+ quotation marks converted to &cdq;.
+
+
+
+
+
+
+
+
+
Certains mots coupés par accident typographique en fin de ligne ont été réassemblés
+ sans commentaire.
+
+
+
Les "guillements français" ont été remplacée par des "guillemets droits" (sans
+ symétrie)
+
+
+
+
+
+
+
+
+
所有字皆轉換為源自Websters 9th Collegiate字典的現代美語拼法
+
+
+
所有的前括號都改成" 後括號都改成 "
+
+
+
+
+
+
+
+
+
+
+ correction principles
+ règles de correction
+ 수정 원리
+ 更正原則
+ Korrekturverfahren
+ principios de corrección
+ principi di correzione
+ states how and under what circumstances corrections have been made in the text.
+ établit comment et dans quelles circonstances des
+ corrections ont été apportées au texte.
+ 텍스트의 수정의 상황과 방법에 대해 설명한다.
+ 說明文本中的更正是在什麼情況下、如何產生的。
+ テキスト中に施された修正の状況や方法を示す.
+ gibt an, wie und unter welchen Bedingungen Korrekturen an
+ dem Text vorgenommen wurden.
+ describe cómo y en qué casos se han hecho correcciones en
+ el texto.
+ dichiara quante correzioni sono state apportate al testo
+ e in quali circostanze.
+
+
+
+
+
+
+
+
+
+
+
+
+ indicates the degree of correction applied to the text.
+ indique le degré de correction apporté au texte.
+ 텍스트에 적용된 수정의 정도를 표시한다.
+ 指出文本更正的程度。
+ 当該テキストに施された修正の実行状況を示す.
+ gibt Auskunft über das Ausmaß von Korrekturen, die an
+ dem Text vorgenommen wurden.
+ indica el grado de corrección aplicado al texto
+ indica il gradi di corrzione apportata al testo.
+
+ unknown
+
+
+ the text has been thoroughly checked and proofread.
+ le texte a été entièrement vérifié et corrigé.
+ 텍스트가 철저하게 검사되고 교정되었다.
+ 該文本以被徹底檢查校對過。
+ el texto se ha revisado y se ha corregido
+ minuciosamente.
+ 当該テキストは,十分に検査・校正されている.
+ il testo è stato controllato accuratamente
+
+
+ the text has been checked at least once.
+ le texte a au moins été vérifié une fois.
+ 텍스트가 적어도 한번 검사되었다.
+ 該文本被檢查過至少一次。
+ el texto se ha revisado por lo menos una vez.
+ 当該テキストは,少なくとも一度は検査されている.
+ il testo è stato controllato almeno una
+ volta.
+
+
+ the text has not been checked.
+ le texte n’a pas été vérifié.
+ 텍스트가 검사되지 않았다.
+ 該文本從未被檢查過。
+ el texto no se ha revisado.
+ 当該テキストは,検査されていない.
+ il testo non è stato controllato.
+
+
+ the correction status of the text is unknown.
+ le niveau de correction du texte est inconnu.
+ 텍스트의 교정 상태를 알 수 없다.
+ 更正狀態不明
+ el estatus de la corrección del texto es
+ desconocido.
+ 当該テキストに施された修正の精度は,不明である.
+ lo stadio di correzione non è noto.
+
+
+
+
+ indicates the method adopted to indicate corrections within the text.
+ indique la méthode adoptée pour signaler les
+ corrections dans le texte.
+ 텍스트의 수정사항을 표시하기 위해 채택한 방법을 나타낸다.
+ 說明標示更正所採取的方法。
+ 当該テキストに施された修正の方法を示す.
+ Bezeichnet die Methode, die angewandt wurde um
+ Korrekturen im Text zu kennzeichnen.
+ indica el método seguido para indicar las
+ correcciones al interno del texto.
+ indica il metodo adottato per indicare le correzioni
+ all'interno di un testo.
+
+ silent
+
+
+ corrections have been made silently
+ les corrections ont été faites sans être
+ marquées.
+ 수정사항이 표시되지 않았다.
+ 直接在文本中更正
+ las correcciones se han hecho silenciosamente.
+ 修正の跡は残されていない.
+ le correzioni sono state apportate
+ silenziosamente
+
+
+ corrections have been represented using markup
+ 수정사항이 마크업을 사용해 표사되었다.
+ las correcciones se han representado mediante el
+ marcado
+ 修正箇所は,タグで示されている.
+ les corrections ont été notées par un codage
+ sono state rappresentate delle correzioni tramite
+ annotazione
+
+
+
+
+
+
+
+
Errors in transcription controlled by using the WordPerfect spelling checker, with a user
+ defined dictionary of 500 extra words taken from Chambers Twentieth Century
+ Dictionary.
+
+
+
+
+
+
+
Les erreurs de transcriptions ont été détectées et corrigées à l'aide du correcteur
+ Cordial 2006 - Synapse
+
+
+
+
+
+
+
抄寫錯誤由WordPerfect拼寫檢查系統控制,該系統使用Chambers Twentieth Century Dictionary裡內含之使用者自訂的500個詞條。
+
+
+
+
+
May be used to note the results of proof reading the text against its original, indicating
+ (for example) whether discrepancies have been silently rectified, or recorded using the
+ editorial tags described in section .
+
+
+
Utilisé pour noter le résultat de la comparaison du texte et de l'original en indiquant par
+ exemple si les différences ont été faites sans être marquées, ou si elles ont été marquées en
+ utilisant les balises éditoriales décrites dans la section .
+
+
+
Puede ser utilizado para observar los resultados de la corrección de las lecturas del texto
+ en contraposición con su original, indicando (por ejemplo) si las discrepancias se han
+ rectificado silenciosamente, o se han registrado usando las etiquetas editoriales descritas en
+ la sección .
+
+
+
+
+
+
+ normalisation
+ indicates the extent of normalization or regularization of the original source carried out
+ in converting it to electronic form.
+ indique l'extension de la normalisation ou de la
+ régularisation effectuée sur le texte source dans sa conversion vers sa forme électronique.
+ 전자 형식으로 변환할 때 수행된 원본 텍스트의 표준화 또는 규칙화의 정도를 표시한다.
+ 指出來源文件轉換成電子文本時規格化或標準化的程度。
+ 元資料が電子形式に変換される施される正規化の程度を示す.
+ gibt an, in welchem Ausmaß das Original bei der
+ Umwandlung in elektronische Form normalisiert und vereinheitlicht wurde.
+ indica el grado de normalización o de regularización
+ aplicado a la fuente original en el proceso de conversión a formato electrónico.
+ indica il grado di normalizzazione o regolarizzazione
+ della fonte effettuato nella conversione a documento elettronico.
+
+
+
+
+
+
+
+
+
+
+
+
+
+ indicates a bibliographic description or other resource documenting the principles
+ underlying the normalization carried out.
+ indique l’autorité pour toute normalisation
+ effectuée.
+ 수행된 표준화를 행한 기준 을 표시한다.
+ 指出任何規格化所實行的依據。
+ 正規化を施した責任者を示す.
+ nennt die für die Normalisierung verantwortliche
+ Instanz
+ indica la autoridad de cualquier normalización
+ llevada a cabo.
+ indica l'autorità per ogni normalizzazione eseguita.
+
+
+
+ indicates the method adopted to indicate normalizations within the text.
+ indique la méthode adoptée pour signaler les
+ normalisations dans le texte.
+ 텍스트의 표준화를 표시하기 위해 채택한 방법론을 제시한다.
+ 指出標示規格化所採取的方法。
+ 当該テキストに施された正規化の方法を示す.
+ bezeichnet die Methode, die angewandt wurde um
+ Normalisierungen im Text kenntlich zu machen.
+ indica el método adoptado para indicar
+ normalizaciones al interno del texto.
+ indica il metodo adottato per indicare le
+ normalizzazioni all'interno di un testo.
+
+ silent
+
+
+ normalization made silently
+ normalisation effectuée sans être mentionnée.
+ 표준화가 드러나게 표시되지 않았다.
+ 直接在文本中實行規格化
+ normalización hecha silenciosamente
+ 正規化は,何も記さずに施された.
+ la normalizzazione è stata apportata
+ silenziosamente
+
+
+ normalization represented using markup
+ 표준화가 마크업을 사용하여 표시되었다.
+ normalización representada mediante el marcado
+ 正規化は,マークアップで示されている.
+ la normalisation a été décrite en employant un
+ codage
+ la normalizzazione è stata rappresentata mediante
+ marcatori editoriali
+
+
+
+
+
+
+
+
+
Where both upper- and lower-case i, j, u, v, and vv have been normalized, to modern
+ 20th century typographical practice, the choice element has been used to
+ enclose orig and reg elements giving the original and new values
+ respectively. ...
+
+
+
Spacing between words and following punctuation has been regularized to zero spaces;
+ spacing between words has been regularized to one space.
+
+
+
Spelling converted throughout to Modern American usage, based on Websters 9th
+ Collegiate dictionary.
+
+
+
+
+
+
+
+
+
Là où les majuscules et les minuscules i, j, u, v et vv ont été normalisées selon la
+ pratique typographique moderne, l'élément choice a été employé en association
+ avec orig et regpour fournir à la fois les formes originales et les
+ formes nouvelles , respectivement ...
+
+
+
L'espace entre chaque mot a été régularisé à un espace. Un signe de ponctuation
+ simple est suivi d'un espace, un signe de ponctuation double est précédé et suivi d'un
+ espace.
+
+
+
Normalisation effectuée selon le Rapport Du Conseil Supérieur De La Langue Française
+ publié dans les documents administratifs du Journal officiel du 6 décembre 1990
+
+
+
+
+
+
+
+
+
當大寫與小寫的 i, j, u, v, 以及vv已經標準化,符合二十世紀現代印刷術,choice元素就用來包含 orig 還有
+ reg 兩個元素,並賦予新的意義。…
+
+
+
字與字後的標點符號之間規定沒有空格;字與字間規定留一個空格。
+
+
+
拼字源於Websters 9th Collegiate字典的現代美語用法
+
+
+
+
+
+
+
+
+
+ citation
+ specifies editorial practice adopted with respect to quotation marks in the original.
+ décrit la pratique éditoriale adoptée par rapport aux
+ guillements dans l’original.
+ 원본 인용 부호에 관해 채택한 편집 방식을 명시한다.
+ 說明在編輯上是如何處理來源文件中的引文符號。
+ 元資料にあった引用をどのように編集したのかを示す.
+ beschreibt die editorische Praxis bezüglich der
+ Anführungszeichen im Originaltext.
+ indica las prácticas editoriales adoptadas respecto al
+ entrecomillado en el original.
+ specifica le pratiche editoriali rispetto all'uso delle
+ virgolette nell'originale
+
+
+
+
+
+
+
+
+
+
+
+
+
+On , either the @marks attribute should be used, or a paragraph of description provided
+
+
+
+
+ quotation marks
+ 인용 부호
+ comillas
+ guillemets
+ punti interrogativi
+ indicates whether or not quotation marks have been retained as content within the text.
+ indique si les guillemets ont été retenus ou non
+ comme faisant partie du texte.
+ 인용 부호가 텍스트에 유지되었는지 여부를 표시한다.
+ 指出引文符號是否在文本中被保留為內容的一部份。
+ テキスト中の内容として,引用符をそのまま残したかどうかを示す.
+ gibt an, ob Anführungszeichen als Bestandteil des
+ Textes beibehalten wurden.
+ indica si se ha mantenido o no el entrecomillado en
+ el texto.
+ indica se le virglotette siano state mantenute o meno
+ all'interno del testo.
+
+
+
+ no quotation marks have been retained
+ aucun guillemet n’a été retenu.
+ 인용 부호가 유지되지 않았다.
+ 不保留任何引文符號
+ no se ha conservado ningún uso de las comillas
+ 引用符は残っていない.
+ le virgolette non sono state mantenute
+
+
+ some quotation marks have been retained
+ quelques guillemetsont été retenues.
+ 일부의 인용 부호가 유지되었다.
+ 保留部分引文符號
+ se han conservado algunas comillas
+ いくつかの引用符は残っている.
+ alcune virgolette sono state mantenute
+
+
+ all quotation marks have been retained
+ tous les guillemets ont été conservés.
+ 모든 인용 부호가 유지되었다.
+ 保留所有引文符號
+ se han conservado todas las comillas
+ 全ての引用符が残っている.
+ tutte le virgolette sono state mantenute
+
+
+
+
+
+
+
+
+
+
No quotation marks have been retained. Instead, the rend attribute on the
+ q element is used to specify what kinds of quotation mark was used, according
+ to the following list: double quotes, open and closesingle quotes, open and closelong dash open, no closedouble guillemets, open and close
+
+
+
+
+
+
+
+
Aucun guillemet n'a été conservé. Au lieu de cela, on a utilisé l'attribut
+ rend pour l'élément q afin de spécifier quel type de guillemet a été
+ utilisé, selon la liste suivante : guillemet allemandguillemet anglais ou guillemet dactylographique guillemet français
+
+
+
+
+
+
+
+
Tous les guillemets sont maintenus dans le texte et sont représentés par les caractères
+ Unicode appropriés.
All quotation marks are retained in the text and are represented by appropriate Unicode
+ characters.
+
+
+
+
+
+
+
+
+ césurage
+ summarizes the way in which hyphenation in a source text has been treated in an encoded
+ version of it.
+ résume la façon dont les traits d'union sécants de fin de
+ ligne d’un texte source ont été traités dans sa version encodée.
+ 원본 텍스트의 하이픈이 부호화된 버전에서 처리된 방법을 요약한다.
+ 概述來源文件裡的連字符號在電子化的版本中是如何被處理的。
+ 元資料にあるハイフンが,符号化される場合にどのように扱われたかを示す.
+ fasst zusammen, wie die Silbentrennung des Quelltextes in
+ der kodierten Fassung behandelt wurde.
+ indica el modo en que han sido tratados el uso del guión
+ presente en el texto fuente en la versión codificada de este.
+ riassume il modo in cui il trattino nell'originale sia
+ stato trattato nella versione codificata dello stesso testo.
+
+
+
+
+
+
+
+
+
+
+
+
+ end-of-line
+ 행의 끝
+ fin de línea
+ fin de ligne
+ fine riga
+ indicates whether or not end-of-line hyphenation has been retained in a text.
+ indique si des traits d'union sécants de fin de ligne
+ ont été conservés ou non dans un texte.
+ 텍스트에서 행의 끝 하이픈이 포함되었는지의 여부를 표시한다.
+ 指出行末連字符號是否在文本中被保留。
+ 行末のハイフンをそのまま残したかどうかを示す.
+ gibt an, ob die Silbentrennung am Zeilenende im Text
+ beibehalten wurde.
+ indica si el uso del guión al final de la línea se ha
+ conservado en un texto.
+ indica se il trattino a fine riga sia stato mantenuto
+ o meno.
+
+ some
+
+
+ all end-of-line hyphenation has been retained, even though the lineation of the
+ original may not have been.
+ tous les traits d'union sécants de fin de ligne ont été
+ conservés, même si la largeur des lignes de l’original peut ne pas l’avoir été.
+ 원본에는 없을 수도 있지만, 모든 행 끝 하이픈이 유지되었다.
+ 保留所有行末連字符號,即使原文中的不被保留。
+ se ha conservado la separación de corte de
+ palabras mediante el guión al final de la línea, incluso cuando la lineación del
+ original puede que no se haya mantenido.
+ 元資料では改行がなかったが,行末にあるハイフンは残した.
+ tutti i trattini di fine riga sono stati
+ mantenuti, anche se l'allineamento dell'originale potrebbe non essere stato
+ conservato.
+
+
+ end-of-line hyphenation has been retained in some cases.
+ des traits d'union sécants de fin de ligne ont été
+ conservés dans certains cas.
+ 일부의 경우에 행 끝 하이픈이 유지되었다.
+ 行末連字符號在某些情況下被保留。
+ la separación silábica mediante el guión al final
+ de línea se ha conservado en algunos casos.
+ 行末にあるハイフンは,場合によっては残した.
+ i trattini di fine riga sono stati mantenuti in
+ alcuni casi.
+
+
+ all soft end-of-line hyphenation has been removed: any remaining end-of-line
+ hyphenation should be retained.
+ tous les traits d’union sécants générés par le césurage
+ en fin de ligne ont été supprimés : tout trait d’union sécant subsistant en fin de ligne doit
+ être conservé.
+ 복합어 표시아 아닌 행 끝 하이픈이 제거되었다: 남아있는 어떤 행 끝 하이픈은 유지되어야
+ 한다.
+ 所有軟音的行末連字符號皆被移除:任何剩下的行末連字符號應該被保留。
+ se ha suprimido todo el corte de sílabas mediante
+ guión al final de línea; pero se ha conservado cualquier otro corte de sílabas.
+ 行末にあるハイフンの殆どは除いた.いくらかは残した.
+ tutti i trattini deboli di fine riga sono stati
+ eliminati: i restanti trattini di fine riga dovrebbero essere conservati.
+
+
+ all end-of-line hyphenation has been removed: any remaining hyphenation occurred
+ within the line.
+ tous les traits d’union sécants en fin de ligne ont été
+ supprimés : tout trait d’union sécant présent se trouvait à l’intérieur d’une ligne.
+ 모든 행 끝 하이픈이 제거되었다: 남아있는 어떤 하이픈은 행 내부에 나타나는 것들이다.
+ 所有行末連字符號皆被移除:剩下的是行中出現的行末連字符號。
+ se ha suprimido toda la separación silábica al
+ final de línea; cualquier separación de sílabas conservada ocurrió dentro de la línea.
+ 行末にあるハイフンは全て除いた.行中にはハイフンが残っている.
+ tutti i trattini di fine riga sono stati
+ eliminati: i restanti trattini si trovano all'interno di una riga.
+
+
+
+
+
+
+
+
End-of-line hyphenation silently removed where appropriate
+
+
+
+
+
+
+
Le cas échéant, suppression du tiret de coupure de mot en de fin de ligne.
+
+
+
+
+
+
+
行末連字符號,必要時可以移除。
+
+
+
+
+
+
+
+
+ segmentation
+ describes the principles according to which the text has been segmented, for example into
+ sentences, tone-units, graphemic strata, etc.
+ décrit les principes selon lesquels le texte a été
+ segmenté, par exemple en phrases, en intonèmes (unités tonales), en strates graphématiques
+ (niveaux superposés de signes graphiques), etc.
+ 예를 들어 문장, 음성 단위, 문자적 층위로 텍스트가 분절되는 원리를 기술한다.
+ 描述文件分割的原理方法,例如分割成句子、音調單位、字形層次等。
+ 当該テキストを分割した基準を示す.例えば,文,音単位,書記層など.
+ gibt an, nach welchen Prinzipien ein Text segmentiert
+ wurde, zum Beispiel in Sätze, Tonsequenzen, graphemische Einheiten, usw.
+ describe los principios aplicados en la fragmentación del
+ texto, p.ej. en las oraciones, sintagmas, morfemas, etc.
+ descrive il modo in cui è stato segmentato il testo, ad
+ esempio in frasi, unità toniche, strati grafemici, ecc.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
s elements mark orthographic sentences and are numbered sequentially within
+ their parent div element
+
+
+
+
+
+
seg elements are used to mark functional constituents of various types within each
+ s; the typology used is defined by a taxonomy element in the corpus
+ header classDecl
+
+
+
+
+
+
+
+
+ standard values
+ valeurs normalisées
+ 표준 값
+ 標準值
+ Standardwerte
+ valores estándard
+ valori standard
+ specifies the format used when standardized date or number values are supplied.
+ précise le format utilisé pour exprimer une date ou une
+ valeur numérique de manière normalisée .
+ 표준화된 날짜 또는 숫자 값이 제시될 때 사용되는 형식을 명시한다.
+ 明確說明文本中標準化日期或數值所使用的格式。
+ 標準的な日付や数値を示す形式を特定する.
+ beschreibt das Format, das für Standard-Datumsangaben
+ oder Zahlenwerte genutzt wird.
+ indica el formato usado cuando aparecen fechas
+ estandarizadas o valores numéricos.
+ specidica il formato usato quando vengono fornite date e
+ altri valori numerici standardizzati.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
All integer numbers are left-filled with zeroes to 8 digits.
+
+
+
+
+
+
+
Les nombres entiers sont précédés de 0 à 8 chiffres.
+
+
+
+
+
+
+
所有數字四捨五入至小數點第二位
+
+
+
+
+
+
+
+
+ Interprétation
+ describes the scope of any analytic or interpretive information added to the text in
+ addition to the transcription.
+ décrit le champ d’application de toute information
+ analytique ou interprétative ajoutée à la transcription du texte.
+ 전사본에 덧붙여 텍스트에 부착된 분석적 또는 해석적 정보의 범위를 기술한다.
+ 指出除了轉錄之外,文件中加入哪些分析性或詮釋性的資訊。
+ 転記されたテキストに付加された,分析または解釈情報の範囲を示す.
+ beschreibt den Umfang von Analyse oder Interpretation,
+ die zusätzlich zur Transkription dem Text hinzugefügt wurde.
+ describe la finalidad de cualquier información analítica
+ o descriptiva añadida al texto en la transcripción.
+ descrive l'estenione di qualsiasi informazione analitica
+ o interpretativa inserita nel testo, in aggiunta alla trascrizione
+
+
+
+
+
+
+
+
+
+
+
+
+
+
The part of speech analysis applied throughout section 4 was added by hand and has not
+ been checked
+
+
+
+
+
+
+
La partie concernant l'analyse de discours qui a été appliquée partout dans la section
+ 4 a été ajoutée à la main et n'a pas été vérifiée.
+
+
+
+
+
+
+
第四節部份言說分析是手寫加上去的,尚未檢查。
+
+
+
+
+
+
+
+ specifies editorial practice adopted with respect to punctuation marks in the original.
+
+
+
+
+
+
+
+
+
+
+
+
+ indicates whether or not punctation marks have been retained as content within the text.
+
+
+
+ no punctuation marks have been retained
+
+
+ some punctuation marks have been retained
+
+
+ all punctuation marks have been retained
+
+
+
+
+ indicates whether punctation marks have been captured inside or outside of an adjacent
+ element.
+
+
+
+ punctuation marks are captured inside adjacent elements
+
+
+ punctuation marks are captured outside adjacent elements
+
+
+
+
+
+
+
+
All punctuation marks in the source text have been retained and represented using the
+ appropriate Unicode code point. In cases where a punctuation mark and nearby markup convey
+ the same information (for example, a sentence ends with a question mark and is also tagged
+ as s) the punctuation mark is captured as content within the element.
+
+
+
+
+
+
+
+
+
The Tagging Declaration
Rendition
Tag Usage
+ tagging declaration
+ déclaration de balisage
+ 태깅 선언
+ 標誌宣告
+ Beschreibung des Tag-Gebrauchs
+ declaración del etiquetado
+ dighiarazione sulla marcatura
+ provides detailed information about the tagging applied to a document.
+ donne l’information détaillée sur le balisage appliqué à un document .
+ 문서에 적용된 태깅에 관한 정보를 상세하게 제공한다.
+ 提供關於應用在XML文件中的標誌的詳細資訊。
+ タグ付けに関する詳細な情報を示す.
+ liefert detaillierte
+ Angaben zum Gebrauch von Tags in einem SGML- oder
+ XML-Dokument.
+ proporciona información pormenorizada sobre el etiquetado aplicado a un documento.
+ fornisce informazioni dettagliate sulla mercatura applicata ad un documento SGML o XML.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ indicates whether
+ the element types listed exhaustively include all those found
+ within text, or represent only a subset.
+
+
+
TEI recommended practice is to specify this attribute. When
+ the tagUsage elements inside tagsDecl are
+ used to list each of the element types in the associated
+ text, the value should be given as false.
+ When the tagUsage elements inside tagsDecl
+ are used to provide usage information or default renditions
+ for only a subset of the elements types within the associated
+ text, the value should be true.
+
+
+
+
+
+
+ to be rendered in italic font
+
+
+
+
+
+
+
+
+
+
+
+
+
+ restitué à l'affichage en caractères italiques
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 用於斜體字
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ usage des balises.
+ documents the usage of a specific element within a specified document.
+ donne des informations sur l’utilisation d’un élément
+ spécifique dans un texte.
+ 텍스트에서 특정 요소의 사용에 관한 정보를 제공한다.
+ 提供文件中某個特定元素的使用資訊。
+ テキスト中にある特定要素の使い方に関する情報を示す.
+ beschreibt den Gebrauch eines speziellen Elements in
+ einem Text.
+ proporciona información sobre el uso de un elemento
+ específico al interno del texto.
+ fornisce informazioni circa l'uso di uno specifico
+ elemento all'interno di un testo.
+
+
+
+
+
+
+
+
+ generic identifier
+ 요소 이름
+ nombre de elemento
+ nom de l'élément
+ nome di elemento
+ specifies the name
+ (generic identifier) of the element indicated by the tag, within the namespace indicated by the parent
+ namespace element.
+ nom (identifiant générique) de l’élément indiqué par
+ la balise.
+ 태그로 제시된 요소의 이름(일반적 확인소)
+ 該標籤所指明的元素名稱 (通用識別符碼)。
+ 当該タグで示された要素の名前(GI, 共通識別子).
+ die Bezeichnung (generischer Bezeichner) des durch
+ das Tag gekennzeichneten Elements.
+ el nombre (identificador genérico) de un elemento
+ indicado mediante una etiqueta.
+ il nome (identificatore generico) dell'elemento
+ indicato dal marcatore.
+
+
+
+ specifies the number of occurrences of this element within the text.
+ spécifie le nombre d’occurrences de cet élément dans
+ le texte.
+ 텍스트 내부에 이 요소가 출현 횟수를 명시한다.
+ 指出該元素在文本中出現的次數。
+ 当該要素が,テキスト中で出現する回数を示す.
+ gibt an, wie oft das Element im Text vorkommt
+ especifica el número de veces que un elemento
+ determinado aparece en el texto.
+ specifica il numero di occorrenze dell'elemento nel
+ testo.
+
+
+
+ with unique identifier
+ 고유한 확인소를 가진
+ con identificador único
+ avec identificateur unique
+ con identificatore unico
+ specifies the number of occurrences of this element within the text which bear a
+ distinct value for the global xml:id attribute.
+ spécifie le nombre d’occurrences de cet élément dans
+ le texte qui porte une valeur donnée pour l’attribut global xml:id.
+ 전반적 xml:id 속성에 대한 분별 값을 포함하는 텍스트 내의 이 요소에
+ 대한 출현 횟수를 명시한다.
+ 指出帶有明確全域屬性xml:id屬性值的元素在文本中的出現次數。
+ グローバル属性xml:idを持つテキスト中にある当該要素の 出現回数を示す.
+ gibt an, wie oft dieses Element mit einem bestimmten
+ Wert für das globale Attribut xml:id im Text vorkommt.
+ indica el número de veces que este elemento aparece
+ en el texto con un valor distintivo apara el atributo global xml:id.
+ specifica il numero di occorrenze dell'elemento nel
+ testo e che reca un valore distinto dall'attributo globale xml:id.
+
+
+
+ specifies the identifier of a rendition element which defines how this element was rendered in the source text.
+ spécifie l’identifiant d’un élément
+ rendition qui définit comment cet élément doit être restitué.
+ 이 요소가 실행되는 방법을 정의한 rendition 요소의 확인소를 명시한다.
+ 標明元素rendition的識別符號,該符號定義此元素的呈現方法。
+ 当該要素の描出法を定義する要素renditionの識別子を示す.
+ beschreibt den Bezeichner für ein rendition
+ -Element, das festlegt, wie dieses Element wiedergegeben werden soll.
+ especifica el identificador de un elemento
+ rendition que define cómo este elemento ha de ser interpretado.
+ indica l'identificatore di un elemento
+ rendition che definisce in che modo è stato reso l'elemento
+
+
The recommended way of specifying a default rendition for a set of elements is to use the
+ selector attribute on the rendition element.
+
+
+
+
+
+ Render using a slant or italic variant on the current font
+
+
+ Used to mark English words
+ italicized in the copy text.
+ Used to mark non-English words in the copy text.
+
+
+
+
+
+
+
+
+ A noter l'emploi d'une variante penchée ou italique dans la fonte
+ actuelle.
+
+ Les abréviations étant très courantes et de type
+ brevigraph (voir le manuel TEI), l'attribut "type" a cette valeur par
+ défaut. Dans les autres cas, ("Sénécial" abrégé par "Sénat") , l'attribut "type " a
+ explicitement la valeur "contraction" et l'attribut "expan" contient la forme
+ développée.
+ Chaque ligne est numérotée depuis le début du corps de la lettre (sauf
+ le titre).
+ Chaque page est numérotée sous la forme d'un numéro de folio suivi de
+ "recto" ou "verso". Dans certains cas, le foliotage réel n'est pas celui qui est
+ indiqué sur le registre. Dans ce cas, les deux numérotations sont gardées.
+ Mots difficiles à lire
+ Phrase(s) d'introduction de la lettre.
+ Signature du copiste.
+
+
+
+
+
+
+
+ 將斜體用於通用的字型
+
+
+ 用來標示副本裡的斜體英文字。
+ 用來標示副本裡的非英文字。
+
+
+
+
+
+
+
+
+
+ espace de noms
+ supplies the formal name of the namespace to which the elements documented by its children
+ belong.
+ fournit le nom formel de l'espace de noms auquel
+ appartiennent les éléments documentés par ses éléments fils.
+ 그 자식이 기술한 요소가 속하는 네임스페이스의 공식적 이름을 제공한다.
+ 提供其子元素所描述的元素所屬的名稱空間之正式名稱。
+ 当該要素が属する名前空間の形式名を示す.
+ liefert die formale Bezeichnung des Namensraums an, zu
+ dem die Elemente als Kind-Elemente gehören.
+ proporciona el nombre formal del namespace al cual
+ pertenecen los elementos documentados por sus hijos.
+ fornisce il nome formale del namespace a cui appartengono
+ gli elementi documentati dai suoi figli.
+
+
+
+
+
+
+
+
+
+
+ specifies the full formal name of the namespace concerned.
+ le nom formel complet de l'espace de noms concerné.
+ 관련된 네임스페이스의 공식적 전체 이름
+ 名稱空間的正式完整名稱。
+ 名前空間の全形式名.
+ die vollständige formale Bezeichnung des betreffenden
+ Namensraums.
+ el nombre formal completo del namespace concerniente.
+ l'intero nome formale del namespace in questione.
+
+
+
+
+
+
+ Used only to mark English words
+ italicized in the copy text
+
+
+
+
+
+
+ Employé pour marquer des mots non-français dans le
+ texte.
+
+
+
+
+
+
+ 僅用於標示副本上的斜體英文字
+
+
+
+
+
+
+
+ rendu
+ supplies information about the rendition or appearance of one or more elements in the source
+ text.
+ donne des informations sur le rendu ou sur l'apparence
+ d'un ou de plusieurs éléments dans le texte source.
+ 원본 텍스트에서 요소의 모양에 대한 정보를 제공한다.
+ 提供關於一個或多個元素預定呈現方式的資訊。
+ 元資料テキスト中にある,ひとつ以上の要素の描出や現れ方に関する情報を 示す.
+ gibt an, wie ein oder mehrere Elemente wiedergegeben
+ werden sollen.
+ proporciona información sobre la interpretación ideada
+ para uno o más elementos.
+ fornisce informazioni circa la resa prevista di uno o più
+ elementi.
+
+
+
+
+
+
+
+
+
+ where CSS is used, provides a way of defining
+pseudo-elements, that is, styling rules
+applicable to specific sub-portions of an element.
+
+
+
+ styling applies to the first line of
+the target element
+
+
+ styling applies to the first letter of
+the target element
+
+
+ styling should be applied immediately before
+the content of the target element
+
+
+ styling should be applied immediately after
+the content of
+the target element
+
+
+
+
+
+ contains a selector or series of selectors specifying the elements to which the contained style
+ description applies, expressed in the language specified in the scheme attribute.
+
+
+
+
+
+ display: block;
+
+
+
+
+
+
+ font-style: italic;
+
+
+
+
+
Since the default value of the scheme attribute is assumed to be CSS, the default
+ expectation for this attribute, in the absence of scheme, is that CSS selector
+ syntax will be used.
+
+
+
While rendition is used to point from an element in the transcribed source to a
+ rendition element in the header which describes how it appears, the selector
+ attribute allows the encoder to point in the other direction: from a rendition in the
+ header to a collection of elements which all share the same renditional features. In both cases,
+ the intention is to record the appearance of the source text, not to prescribe any particular
+ output rendering.
The present release of these Guidelines does not specify the content of this element in any
+ further detail. It may be used to hold a description of the default rendition to be associated
+ with the specified element, expressed in running prose, or in some more formal language such
+ as CSS.
+
+
+
+
La présente édition de ces Principes directeurs ne donne pas de spécifications détaillées sur
+ le contenu de cet élément. On peut l'utiliser pour donner une description du rendu devant être
+ associé par défaut à l'élément indiqué, rédigé en texte libre ou dans un langage plus formel
+ tel que CSS.
+
+
+
la actual versión de estas guías de consulta no especifica el contenido de este elemento con
+ más detalle. Puede ser utilizado para llevar a cabo una descripción de la interpretación del
+ valor por defecto que se asociará al elemento especificado, expresado en prosa, o en un
+ lenguaje formal tal como CSS.
+
+
+
+
+
+
+ style definition language declaration
+ specifies the name of the formal language in which style or
+ renditional information is supplied elsewhere in the document. The
+ specific version of the scheme may also be supplied.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ font-weight: bold;
+ font-style: italic;
+
+
+
+
+
+
+
The Default Style Definition Language Declaration
The Reference System Declaration
Prose Method
Search-and-Replace Method
Milestone Method
+ references declaration
+ Déclaration du système de références
+ 참조 선언
+ 參照宣告
+ Beschreibung der Referenzstruktur
+ declaración de referencias
+ dichiarazione sui riferimenti
+ specifies how canonical references are constructed for this
+ text.
+ précise la manière dont les références canoniques ont été construites pour ce texte.
+ 표준 참조가 이러한 텍스트에 대해 어떻게 구성되는가를 명시한다.
+ 標明本文件與某一個權威參照標準的關係。
+ 標準的な参照の作られ方を示す.
+ beschreibt, wie
+ Standard-Referenzen für den Text erstellt werden.
+ indica cómo se han formado las referencias canónicas para este texto.
+ specifica in che modo siano costruiti i riferimenti canonici per il testo.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
This example is a formal representation for the referencing
+ scheme described informally in the following example.
+
+
+
+
+
+
Une référence a été créée en assemblant les éléments suivants dans l'ordre inverse de
+ la liste qui suit : la valeur n du précédent lb
+ une périodela valeur n de l'ancêtre div2
+ un espacela valeurn du parent div1
+
+
References are made up by concatenating the value for the
+ n attribute on the highest level div
+ element, followed by a space, followed by the sequential
+ number of the next level div followed by a colon
+ followed by the sequential number of the next (and lowest)
+ level div.
+
+
+
+
+
+
+
+
+
+ canonical reference pattern
+ Modèle de référence canonique
+ 표준 참조 유형
+ 定義如何將標準參照轉換成統一資源識別符 (URI) 。
+ legt fest, wie eine Standardreferenz in eine URI
+ umgewandelt werden kann.
+ define cómo convertir una referncia canónica en un URI
+ definisce in che modo convertire un riferimento canonico
+ in un URI
+ specifies an expression and replacement pattern for transforming a canonical reference into
+ a URI.
+ spécifie un modèle d’expression et des règles de
+ remplacement pour transformer une référence canonique en URI.
+ 표준 참조를 URI로 변환하기 위한 표현 및 대체 유형을 명시한다.
+ 標明將標準參照轉換成統一資源識別符的表示方法與取代模式。
+ URIへの標準的参照を変形する,表現・変形パタンを示す.
+ legt einen Ausdruck und ein Ersetzungsmuster für die
+ Umwandlung einer Standardreferenz in eine URI fest.
+ indica una expresión y un patrón de remplazamiento para
+ transformar una referencia canónica en un URI.
+ specifica un espressione o un pattern di sostituzione per
+ convertire convertire un riferimento canonico in un URI
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
The result of the substitution may be either an absolute or a relative URI reference. In the
+ latter case it is combined with the value of xml:base in force at the place where
+ the cRef attribute occurs to form an absolute URI in the usual manner as prescribed
+ by XML Base.
+
+
+
Le résultat de la substitution peut être la référence à une URI relative ou absolue.
+ Dans ce dernier cas, il est combiné avec la valeur de l'attribut xml:base en
+ vigueur à la place où apparaît l'attribut cRef pour former une URI absolue selon
+ l'usage habituel indiqué par XML Base.
+
+
+
El resultado de la substitución puede ser una referencia URI absoluta o relativa. En el
+ último caso se combina con el valor de xml:base en vigor en el lugar donde el
+ atributo cRef aparece para formar un URI absoluto de manera común según lo
+ prescrito por Base de XML.
+
+
+
置換による結果は,絶対・相対URIであるかもしれない.相対URIの場合, XML
+ Baseに示され ているように,属性xml:baseの値と共に,属性 cRefが絶対URIを示す場所で使用される.
+
+
+
+
+
+
+
+ provides attributes for regular-expression matching and replacement.
+
+
+ specifies a regular expression against which the values of other attributes
+ can be matched.
+
+
+
+
+
The syntax used should follow that defined by W3C XPath syntax. Note that parenthesized groups are used not only for establishing order of precedence and atoms for
+ quantification, but also for creating subpatterns to be referenced by the
+ replacementPattern attribute.
+
+
+
Les groupes parenthésés ne sont pas seulement utilisés pour établir un ordre de priorité
+ et des unités de quantification, mais aussi pour créer des sous-modèles référencés par
+ l'attribut replacementPattern.
+
+
+
Utilizan a los grupos de Parenthesised no sólo para establecer el orden de la precedencia
+ y los átomos para la cuantificación, sino también para crear los subpatterns que se
+ referirán por el atributo replacementPattern.
+
+
+
+ specifies a replacement pattern, that is, the skeleton of a relative or absolute URI containing references to groups in
+ the matchPattern which, once subpattern substitution
+ has been performed, complete the URI.
+ spécifie une règle de
+ remplacement qui, après avoir opéré les substitutions prévues à chaque nœud,
+ génère une URI.
+ 하위 유형 대치가 실행되면, URI를 제공하는 replacement
+ pattern를 명시한다.
+ 標明一個取代模式,一旦進行次要模式的替換,會自動提供統一資源識別符 (URI) 。
+ 変形パタンを示す.下位の置換パタンが実行さ
+ れれば,これはURIになる.
+ beschreibt ein replacement pattern
+ (Ersetzungsmuster), das eine URI erstellt, sobald der Austausch der
+ untergeordneten Ersetzungsmuster durchgeführt wurde.
+ especifica un replacement pattern (patrón
+ de remplazamiento), el cual, una vez se ha ejecutado el subpatrón de
+ sustitución, proporciona un URI.
+ specifica un replacement pattern
+ che, una volta applicato un sub-pattern di sostituzione, fornisce un URI.
+
+
+
The strings $1, $2 etc. are references to the corresponding group in the
+ regular expression specified by matchPattern (counting open parenthesis, left
+ to right). Processors are expected to replace them with whatever matched the corresponding
+ group in the regular expression.
+
If a digit preceded by a dollar sign is needed in the actual replacement pattern (as
+ opposed to being used as a back reference), the dollar sign must be written as
+ %24.
+
+
+
Les chaînes $1 à $9 sont des références au groupe correspondant dans
+ l'expression régulière spécifiée par l'attribut matchPattern (en incluant la parenthèse
+ ouvrante, de gauche à droite). Les processeurs devraient remplacer ces groupes par les
+ valeurs correspondant aux groupes dans l'expression régulière.
+
Si un chiffre précédé par un dollar est nécessaire dans le modèle de remplacement actuel
+ (en opposition à ce qui a été utilisé comme référence antérieure), le signe dollar doit
+ être encodé %24.
+
+
+
Las series $1a través $9 son referencias al grupo correspondiente en la
+ expresión regular especificada por el matchPattern (contando paréntesis
+ abiertos, de izquierda a derecha). Se espera que los procesadores las substituyan por el
+ grupo correspondiente en la expresión regular.
+
Si un dígito precedido por el signo del dólar se necesita en el modelo actual de
+ substitución (en contraposición a ser utilizado como una referencia posterior), el signo
+ de dólar se debe escribir como %24.
+
+
+
+
+
+
+
+
+
+
+ prefixing scheme used in data.pointer values
+ defines a prefixing scheme used in data.pointer values,
+ showing how abbreviated URIs using the scheme may be expanded into full URIs.
+
+
+
+
+
+
+
+
+
+
+
+ supplies a name which functions as the prefix for an abbreviated
+ pointing scheme such as a private URI scheme. The prefix constitutes the
+ text preceding the first colon.
+
+
+
+
+
+
+
+ In the context of this project, private URIs with
+ the prefix "ref" point to div elements in
+ the project's global references.xml file.
+
+
+
+
+
+
The abbreviated pointer may be dereferenced to produce either
+ an absolute or a relative URI reference. In the latter case it is
+ combined with the value of xml:base in force at the
+ place where the pointing attribute occurs to form an absolute URI
+ in the usual manner as prescribed by XML Base.
+
+
+
+
+
+ list of prefix definitions
+ contains a list of definitions of prefixing schemes used in data.pointer values, showing how abbreviated URIs using each scheme may be expanded into full URIs.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
In this example, two private URI scheme prefixes are defined and patterns are provided
+ for dereferencing them. Each prefix is also supplied with a human-readable explanation in a
+ p element.
+
+
+
+
+ Private URIs using the psn
+ prefix are pointers to person
+ elements in the personography.xml file.
+ For example, psn:MDH
+ dereferences to personography.xml#MDH.
+
+
+
+
+ Private URIs using the bibl prefix can be
+ expanded to form URIs which retrieve the relevant
+ bibliographical reference from www.example.com.
+
+
+
+
+
+
+
+
+
+ reference state
+ 참조 상태
+ estado de la referencia
+ état de la référence
+ stato del riferimento
+ 分界狀態
+ specifies one component of a canonical reference defined by the milestone method.
+ 이정표 방법으로 정의된 표준 참조의 한 성분을 명시한다.
+ especifica un componente de una referencia canónica
+ definida por el método milestone
+ 標石要素の手法として定義されている標準的な参照の構成要素をひとつ示す.
+ spécifie un composant d’une référence canonique définie
+ par la méthode du bornage.
+ specifica una componente di un riferimento canonico
+ definito dal metodo milestone
+ 標明分界方法所定義的權威參照標準裡其中一個組件。
+
+
+
+
+
+
+
+
+
+
+
+ specifies the fixed length of the reference component.
+ 참조 성분의 고정 길이를 명시한다.
+ especifica la longitud fija del componente de
+ referencia.
+ 参照構成要素の固定長を示す.
+ spécifie la longueur fixe du composant de la
+ référence.
+ specifica la lunghezza stabilita della componente di
+ riferimento
+
+
+
When constructing a reference, if the reference component found is of numeric type, the
+ length is made up by inserting leading zeros; if it is not, by inserting trailing blanks.
+ In either case, reference components are truncated if necessary at the right hand side.
+
When seeking a reference, the length indicates the number of characters which should be
+ compared. Values longer than this will be regarded as matching, if they start correctly. If no value is provided, the length is unlimited and
+ goes to the next delimiter or to the end of the value.
+
+
+
+
Lorsqu'une référence est construite, si le composant de cette référence est de type
+ numérique, la longueur est obtenue en ajoutant au début des 0 ; sinon, en ajoutant en fin
+ de chaîne des blancs. Dans les deux cas, les composants des références sont tronqués sur
+ la droite si c'est nécessaire.
+
Lorsqu'on cherche une référence, la longueur indique le nombre des caractères devant être
+ comparés. Des valeurs plus longues seront considérées comme correspondant au modèle, si
+ elles commencent de façon identique. Si aucune valeur n'est fournie,
+ la longueur est illimitée et va jusqu'au prochain délimiteur ou jusqu'à la fin de la valeur.
+
+
+
Al construir una referencia, si el componente de la referencia es de tipo numérico, la
+ longitud es compuesta insertando ceros; si no lo es, insertando espacios a la derecha. En
+ cualquier caso, los componentes de la referencia se truncan en caso de necesidad por el
+ lado derecho.
+
En una referencia, la longitud indica el número de caracteres que deban ser comparados.
+ Los valores más largos a estos se considerarán puntualmente acceptado si comienzan
+ correctamente.
+
+
+
+ delimiter
+ 구분 문자
+ delimitador
+ délimiteur
+ delimitatore
+ supplies a delimiting string following the reference component.
+ 참조 성분 뒤에 구분 문자열을 제공한다.
+ suministra la cadena de delimitación que sigue el
+ componente de referencia.
+ 参照構成要素の開始を表すデリミタを示す.
+ Fournit une suite de caractères de délimitation après
+ le composant de référence.
+ fornisce una stringa di delimitazione in base alla
+ componente di riferimento
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
The Classification Declaration
+ classification declarations
+ déclaration de classification
+ 분류 선언
+ 分類宣告
+ Erklärung zur Klassifikation
+ declaraciones de clasificación
+ dichiarazioni sulla ckassificazione
+ contains one or more taxonomies defining any classificatory
+codes used elsewhere in the text.
+ contient une ou plusieurs taxinomies définissant les codes de classification utilisés n’importe où dans le texte.
+ 텍스트 내 어디서든 사용될 수 있는 분류 부호를 정의하는 분류법을 포함한다.
+ 包含一個或多個分類法,用來定義在文件中他處所使用之任何分類碼。
+ 当該テキスト中で使用されている分類コードを定義する,ひとつ以上の分類
+ 法を示す.
+ enthält eine oder mehrere
+ Taxonomien, die Klassifikationen innerhalb des Textes
+ definieren.
+ contiene una o más taxonomías que definen cualquier código usado en algún punto del texto.
+ contiene una o più tassonomie che definiscono un qualsiasi codice classificatorio usato in un'altra porzione del testo.
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Library of Congress Subject Headings
+
+
+
+
+
+ Political science
+ United States -- Politics and government —
+ Revolution, 1775-1783
+
+
+
+
+
+
+
+
+ Répertoire d'autorité-matière encyclopédique et alphabétique unifié
+ (RAMEAU) de la Bibliothèque nationale de France.
+
+
+
+
+
+
+ Bien et mal -- Enseignement coranique
+
+
+
+
+
+
+
+
+
+ taxinomie
+ defines a typology either implicitly, by means of a bibliographic
+ citation, or explicitly by a structured taxonomy.
+ définit une typologie
+ soit implicitement au moyen d’une référence bibliographique, soit explicitement au moyen d’une
+ taxinomie structurée.
+ 서지 정보 인용으로 비명시적으로 또는 구조화된 분류법으로 명시적으로 텍스트를 분류하는 유형을 정의한다.
+ 定義文件分類的類型學,可以是潛在地以書目資料的方式,或是明確地以結構分類法的方式來分類。
+ テキストの分類法を,書誌情報を参照したり,または構造化された分類法を 示すことで,定義する.
+ Typologie, die Texte entweder implizit durch einen
+ bibliografischen Verweis oder explizit durch eine strukturierte Taxonomie klassifiziert.
+ define una tipología o
+ implícitamente, mediante una cita bibliográfica, o explícitamente, mediante una taxonomía
+ estructurada.
+ definisce una tipologia o
+ in modo implicito, usando una citazione bibliograficha, o in modo esplicito attraverso una
+ tassonomia strutturata.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Brown Corpus
+
+ Press Reportage
+
+ Daily
+
+
+ Sunday
+
+
+ National
+
+
+ Provincial
+
+
+ Political
+
+
+ Sports
+
+
+
+ Religion
+
+ Books
+
+
+ Periodicals and tracts
+
+
+
+
+
+
+
+
+
+ littérature
+
+
+ Drame bourgeois
+
+
+ Comédie larmoyante
+
+
+ Correspondance
+
+
+ Dernières lettres
+
+
+ Littérature européenne -- 16e siècle
+
+
+ Satire de la Renaissance
+
+
+ Récits de voyage
+
+
+ Récits de la mer
+
+
+ indexation selon le système d'indexation RAMEAU, géré par la Bibliothèque nationale de
+ France
+
+
+
+
+
+ 布朗集
+
+ 媒體採訪報導
+
+ 日報
+
+
+ 週日
+
+
+ 全國性
+
+
+ 地方性
+
+
+ 政治
+
+
+ 體育
+
+
+
+ 宗教
+
+ 藝文
+
+
+ 期刊與短文
+
+
+
+
+
+
+
+
+
+ Literature
+
+ Poetry
+
+ Sonnet
+
+ Shakespearean Sonnet
+
+
+ Petrarchan Sonnet
+
+
+
+ Haiku
+
+
+
+ Drama
+
+
+
+ Metrical Categories
+
+ Metrical Feet
+
+ Iambic
+
+
+ trochaic
+
+
+
+ Number of feet
+
+ >Pentameter
+
+
+ >Tetrameter
+
+
+
+
+
+
+
+
+ Shall I compare thee to a summer's day
+
+
+
+
+
+
+
Nested taxonomies are common in many fields, so the taxonomy
+ element can be nested.
+
+
+
+
+
+ catégorie
+ contains an individual descriptive category, possibly nested within a superordinate
+ category, within a user-defined taxonomy.
+ contient une catégorie descriptive particulière,
+ éventuellement intégrée dans une catégorie de niveau supérieur, à l’intérieur d’une taxinomie
+ définie par l’utilisateur.
+ 사용자가 정의한 분류법 안의 개별 기술 범주를 포함한다. 상위 범주 내에 포함될 수 있다.
+ 在使用者定義之分類法當中,此元素包含一項個別的描述性類目,該類目可能位於一個更上層的類目之中。
+ 記述的な分類項目を示す.利用者が定義した分類法の元に上位分類項目中に 入れ子にしてもよい.
+ enthält eine eigenständige deskriptive Kategorie,
+ gegebenenfalls eingebettet in einer übergeordneten Kategorie, in einer benutzerdefinierten
+ Taxonomie.
+ contiene una categoría descriptiva individual,
+ posiblemente anidada dentro de una categoría superior, dentro de una taxonomía definida por el
+ usuario.
+ contiene una sola categoria descrittiva, possibilmente
+ innestata in una categoria più generale, all'interno di una tassonomia definita dall'utente.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Prose reportage
+
+
+
+
+
+
+ Récits de voyage
+
+ indexation selon le système d'indexation RAMEAU, géré par la Bibliothèque nationale de
+ France
+
+
+
+
+
+ Devinettes et énigmes
+
+ Anagrammes
+
+
+
+
+
+
+
+ 報導文學
+
+
+
+
+
+
+ 散文
+
+ 報導性質
+
+
+ 虛構
+
+
+
+
+
+
+
+ Prose
+
+ journalism
+
+
+ fiction
+
+
+
+
+
+
+
+ literatura piękna
+ fiction
+
+ proza
+ prose
+
+
+ poezja
+ poetry
+
+
+ dramat
+ drama
+
+
+
+
+
+
+
+
+ category description
+ Description de la catégorie
+ 범주 기술
+ 類目描述
+ Beschreibung der Kategorie
+ descripción de una categoría
+ descrizione della categoria
+ describes some category within a taxonomy or text typology, either in the form of a brief
+ prose description or in terms of the situational parameters used by the TEI formal textDesc.
+ décrit une catégorie particulière à l’intérieur d’une
+ taxinomie ou d’une typologie de texte, sous forme d’un court texte descriptif suivi ou dans les
+ termes des paramètres contextuels utilisés dans l’élément Description du texte
+ textDesc.
+ 간단한 산문체 기술 형식 또는 TEI의 형식적 텍스트 기술에 의해 사용된 상황 매개변수를 통해 분류법
+ 또는 텍스트 유형 내에서 어떤 범주를 기술한다.
+ 描述分類法中或文件類型學中的某些類目,可用短文描述的型式,或是用TEI正式元素textDesc所使用的狀況參數。
+ テキスト分類や分類法における分類項目を示す.簡単な散文形式またはTEI
+ のtextDescで使用される状況パラメータで示される.
+ Kategorie innerhalb einer Taxonomie oder Texttypologie,
+ entweder als einfache Beschreibung oder über situative Parameter, wie im TEI-Format textDesc
+ dargestellt.
+ describe alguna categoría dentro de una taxonomía o
+ tipología textual, a través de una breve e descripción en prosa o en términos de parámetros
+ situacionales usados por el textDesc formal de TEI.
+ descrive una categoria all'interno di una tassonomia o
+ tipologia di testo, sotto forma di una breve descrizione in prosa o secondo i parametri
+ situazionali usati in modo formale dall'elemento TEI testDesc.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Prose reportage
+
+
+
+
+ Texte documentaire
+
+
+
+
+
+ genre
+
+ Géneral
+
+
+ Journal
+
+
+ Manuel technique
+
+
+
+
+
+
+ 報導文學
+
+
+
+
+
+
+ 出版品;專輯
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ print; part issues
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
The Geographic Coordinates Declaration
+ geographic coordinates declaration
+ 지리적 좌표 선언
+ declaración de las coordenadas geográficas
+ déclaration de coordonnées géographiques.
+ dichiarazione di coordinate geografiche
+ documents the notation and the datum used for geographic coordinates expressed as content of
+ the geo element elsewhere within the document.
+ 문서 내 어디서든지 geo 요소의 내용으로 표현된 지리적 좌표로 사용된 표기법과 자료를
+ 기재한다.
+ documenta la anotación y los datos usados para los
+ coordenadas geográficas expresadas como contenido del elemento geo en qualquier parte
+ del documento.
+ 当該文書中にある要素geoの内容が表す座標の表記法を示す.
+ documente la notation et les données utilisées pour
+ exprimer les coordonnées géographiques dans l'élément geoailleurs dans le document.
+ documenta la notazione e il dato utilizzati per le
+ coordinate geografiche espressi come contenuto di un elemento geo collocato altrove all'interno
+ del documento
+
+
+
+
+
+
+
+
+
+
+ supplies a commonly used code name for the datum employed.
+ 사용된 자료의 일반적 부호명을 제시한다.
+ proporciona un nombre de código de uso general para
+ los datos empleados.
+ データを示す,一般に使われている符号名を示す.
+ donne un nom de code d'usage général pour les données
+ employées.
+ indica un nome in codice comunemente impiegato per il
+ dato utilizzato
+
+ WGS84
+
+
+ World Geodetic System
+ 세계 측지 시스템
+ Sistema Geodésico Mundial
+ Système Géodésique Mondial
+ sistema geodetico mondiale
+ a pair of numbers to be interpreted as latitude followed by longitude according to
+ the World Geodetic System.
+ 세계 측지 시스템에 따라 한 쌍의 숫자는 위도, 경도를 나타낸다.
+ couple de nombres destinés à être interprétés
+ comme la latitude suivie de la longitude selon le Système Géodésique Mondial.
+ un par de números que se interpretarán como
+ latitud siguió por la longitud según el sistema geodésico del mundo.
+ 世界測地システムに従った,緯度,経度とされる数値組.
+ coppia numeri da interpretare come latitudine
+ seguita da longitudine secondo il sistema geodetico mondiale
+
+
+ Military Grid Reference System
+ 군사 좌표 참조 시스템
+ Sistema de Coordenadas MGRS
+ Système de Référence du Réseau Militaire,
+ (MGRS).
+ sistema di riferimento delle coordinate MGRS
+ the values supplied are geospatial entity object codes, based on
+ 값은 만국 횡메르카토르 시스템 좌표에 기초하여 지리공간적 개체 부호를 제시한다.
+ Les valeurs fournies sont des codes objet
+ d'entités geospatiales, fondées sur les coordonnées de la grille de projection
+ transversale universelle de Mercator, (UTM).
+ los valores proporcionados son códigos objeto de
+ entidades geospaciales, basados en las coordenadas Universal Transverse Mercator
+ ユニバーサル横メルカトル座標による,地理空間実体の値.
+ i valori indicati sono codici di entità
+ geospaziali basati su coordinate UTM (Universale Trasverso di Mercatore)
+
+
+ ordnance survey great britain
+ 영국 육지 측량부
+ Système de coordonnées de Grande-Bretagne (OSGB)
+ sistema di riferimento a reticolato OSGB36
+ the value supplied is to be interpreted as a British National Grid Reference.
+ 제시된 값은 영국 측량 참조로 해석된다.
+ el valor proporcionado debe ser interpretado como
+ una referencia British National Grid.
+ 英国グリッド参照による値.
+ la valeur fournie est à interpréter selon le
+ système "British national grid reference".
+ il valore indicato va interpretato come
+ riferimento dell'OSGB36
+
+
+ European Datum coordinate system
+ 유럽 자료 좌표 시스템
+ Sistema de coordinadas European Datum
+ système de coordonnées de données européen.
+ sistema di riferimento ED50
+ the value supplied is to be interpreted as latitude followed by longitude according
+ to the European Datum coordinate system.
+ 값은 유럽 자료 좌표 시스템에 따라 위도, 경도를 나타낸다.
+ La valeur fournie doit être interprétée comme la
+ latitude suivie de la longitude selon le système de coordonnées de données européen.
+ el valor suministrado debe ser interpretado como
+ latitud seguida por la longitud según el sistema de coordenadas del European Datum.
+ 欧州測地基準座標システムによる,緯度,軽度となる値.
+ il valore indicato va interpretato come
+ latitudine seguita da longitudine secondo il sistema di coordinate ED50
+
+
+
+
+
+
+
+
+
+
+
+
+
The Schema Specification
The Application Information Element
+ application information
+ 애플리케이션 정보
+ información de la aplicación
+ informations d'application
+ informazioni su applicazione
+ records information about an application which has
+ edited the TEI file.
+ TEI 파일을 편집한 애플리케이션에 관한 정보를 기록한다.
+ recoge información sobre la aplicación que ha editado el fichero de TEI.
+ TEIファイルを編集したソフトウェアに関する情報を示す.
+ enregistre des informations sur l'application qui a
+été utilisée pour traiter le fichier TEI.
+ registra informazioni relative a un'applicazione che ha modificato il contenuto del file TEI
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ provides information about an application which has acted upon the document.
+ 문서에 사용한 애플리케이션에 관한 정보를 제시한다.
+ proporciona información sobre la aplicación que ha
+ actuado sobre el documento.
+ 当該文書に作用するソフトウェアに関する情報を示す.
+ fournit des informations sur une application qui a été
+ utilisée pour le traitement du document.
+ registra informazioni relative a un'applicazione che ha
+ agito sul documento
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ supplies an identifier for the application, independent of its version number or display
+ name.
+ 버전 또는 표시명과 상관없이 애플리케이션의 확인소를 제공한다.
+ proporciona un identificador para la aplicación,
+ independientemente de su número de versión o el nombre de la visualización.
+ 当該ソフトウェアの識別子を示す.これは,版番号や表示名とは異なる.
+ fournit un identifiant pour l'application,
+ indépendamment de son numéro de version ou du nom affiché.
+ indica un identificatore per l'applicazione,
+ indipendentemente dal numero di versione o dal nome visualizzato
+
+
+
+ supplies a version number for the application, independent of its identifier or display
+ name.
+ 확인소 또는 표시명과 상관없이 애플리케이션의 버전을 제공한다.
+ Suministra un número de versión para la aplicación,
+ independientemente de su identificador o el nombre de la visualización.
+ 当該ソフトウェアの版番号を示す.識別子や表示名とは異なる.
+ fournit un numéro de version pour l'application,
+ indépendamment de son identifiant ou du nom affiché.
+ indica un numero di versione per l'applicazione,
+ indipendentemente dall'identificatore o dal nome visualizzato
+
+
+
+
+
+
+
+
+
+
+
+
+
+
This example shows an appInfo element documenting the fact that version 1.5 of the Image
+ Markup Tool1 application has an interest in two parts of a document which was last saved on
+ June 6 2006. The parts concerned are accessible at the URLs given as target for the two
+ ptr elements.
The Profile Description
+ text-profile description
+ description du profil
+ 텍스트-개요 기술
+ 文件背景描述
+ Beschreibung des Textprofils
+ descripción del perfil del texto.
+ descrizione del profilo del testo
+ provides a detailed description of non-bibliographic aspects of a text, specifically the
+ languages and sublanguages used, the situation in which it was produced, the participants and
+ their setting.
+ fournit une description détaillée des aspects
+ non bibliographiques du texte, notamment les langues utilisées et leurs variantes, les
+ circonstances de sa production, les collaborateurs et leur statut.
+ 분명하게 언어와 특수 언어가 사용된 텍스트, 텍스트가 생산된 상황, 참여자, 배경에 관한 비서지적
+ 측면을 상세히 기술한다.
+ 提供文件非書目性方面的細節描述,特別是所使用的語言及次要語言、在何種情況下製作、參與人員及其環境背景。
+ 書誌情報的ではない詳細な解説を示す.例えば,言語や特殊言語,生成され たときの状況,参加者など.
+ enthält eine genaue Beschreibung der nicht
+ bibliografischen Kennzeichnungen des Texts, besonders der verwendeten Sprachen und Subsprachen,
+ der Entstehungsbedingungen, der Teilnehmer und ihres Umfelds.
+ proporciona una descripción detallada de los aspectos no
+ bibliográficos de un texto, especialmente las lenguas y jergas usadas, la situación en que se
+ aparecen, los participantes que intervienen, etc.
+ fornisce una descrizione dettagliata degli aspetti non
+ bibliografici di un testo, in modo particolare le lingue e i linguaggi secondari utilizzati, la
+ situazione in cui è stato prodotto il testo, i partecipanti e la relativa ambientazione
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ French
+
+
+ print; part issues
+
+
+
+
+
+
+
+
+
+
+
+ Paris, France
+
+
+
+
+
+
+
+
+
+
+ français
+
+
+ copie; extraits
+
+
+
+
+
+
+
+
+
+
+
+ Paris, France
+
+
+
+
+
+
+
+
+
+
+ 法文
+
+
+ 出版品;專題輯
+
+
+
+
+
+
+
+
+
+
+
+ 法國巴黎
+
+
+
+
+
+
+
+
Although the content model permits it, it is rarely
+meaningful to supply multiple occurrences for any of the child
+elements of profileDesc unless these are documenting multiple texts.
+
In earlier versions of these Guidelines, it was required that the
+creation element appear first.
+
+
+
+
+
+
+ note on hand
+ 기법에 관한 설명
+ 書寫特徵
+ note sur une main
+ notas sobre la mano
+ nota sulla mano
+ describes a particular style or hand distinguished within a manuscript.
+ 원고 내에서 구분되는 특별한 문체 또는 기법을 기술한다.
+ 描述在手稿中可明顯辨識出的特殊風格或書寫手法。
+ 手書き資料中にある特定のスタイルまたは筆致を示す.
+ décrit un style d'écriture ou une main qui sont
+ reconnus dans un manuscrit.
+ describe un determinado estilo o una determinada mano
+ al interno de un manuscrito.
+ descrive un determinato stile o una determinata mano
+ all'interno di un manoscritto
+
+
+
+
+
+
+
+
+
+
+
Written in insular
+ phase II half-uncial with interlinear Old English gloss in an Anglo-Saxon pointed
+ minuscule.
+
+
+
+
+
+
+
+ contains a summary or formal
+ abstract prefixed to an existing source document by the encoder.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Good database design involves the acquisition and deployment of
+ skills which have a wider relevance to the educational process. From
+ a set of more or less instinctive rules of thumb a formal discipline
+ or "methodology" of database design has evolved. Applying that
+ methodology can be of great benefit to a very wide range of academic
+ subjects: it requires fundamental skills of abstraction and
+ generalisation and it provides a simple mechanism whereby complex
+ ideas and information structures can be represented and manipulated,
+ even without the use of a computer.
+
+
+
+
+
+
This element is intended only for cases where no abstract is available in the
+ original source. Any abstract already present in the source document
+ should be encoded as a div within the front, as it
+ should for a born-digital document.
+
+
+
+
+
Creation
+ création
+ contains information about the creation of a text.
+ contient des informations concernant la création d’un
+ texte.
+ 텍스트 생성에 관한 정보를 포함한다.
+ 包含關於文件建置的資訊。
+ テキストの作成に関する情報を示す.
+ Informationen über die Entstehungsbedingungen des Textes.
+ contiene información sobre la creación del texto.
+ contiene informazioni riguardanti la creazione di un
+ testo.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Before 1987
+
+
+
+
+
+
+ Avant 1987
+
+
+
+
+
+
+ 10 Juillet 1988
+
+
+
+
+
+
+ 1987年之前
+
+
+
+
+
+
+ 1988年7月10日
+
+
+
+
+
+
+ 10 July 1988
+
+
+
+
+
The creation element may be used to record details of
+ a text's creation, e.g. the date and place it was composed, if
+ these are of interest.
+
It may also contain a more structured account of the various
+ stages or revisions associated with the evolution of a text; this
+ should be encoded using the listChange element. It
+ should not be confused with the publicationStmt element,
+ which records date and place of publication.
+
+
+
L’élément creation peut être utilisé pour détailler des éléments concernant l’origine du
+ texte, c’est-à-dire sa date et son lieu de composition ; on ne doit pas le confondre avec
+ l'élément publicationStmt qui contient la date et le lieu de publication.
+
+
+
El elemento creación se puede utilizar para registrar los detalles de la creación
+ de un texto, p.ej. la fecha y el lugar en el que fue compuesto, si éstos son de interés; no
+ debe ser confundido con el elemento publicationStmt, que registra la fecha y el lugar
+ de la publicación.
Language Usage
+ language usage
+ langue utilisée
+ 언어 사용
+ 語言使用
+ Sprachgebrauch
+ lengua empleada
+ lingua utilizzata
+ describes the languages, sublanguages, registers, dialects, etc.
+represented within a text.
+ décrit les langues, variétés de
+langues, registres, dialectes, etc. présents à l’intérieur d’un texte.
+ 텍스트 내에 나타나는 언어, 특수 언어, 레지스터, 방언 등을 기술한다.
+ 描述文件中使用的語言、次要語言、語域、方言等。
+ テキスト中にある言語,特殊言語,社会的方言,方言などを示す.
+ beschreibt Sprachen,
+ Subsprachen, Register, Dialekte usw., die innerhalb eines Textes
+ vorkommen.
+ describe las lenguas, jergas, registros, dialectos, etc. presentes en el texto.
+ descrive le lingue, i linguaggi secondari, i registri, i dialetti ecc. rappresentati all'interno di un testo.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Québecois
+ Canadian business English
+ British English
+
+
+
+
+
+
+ Québecois
+ Anglais canadien des affaires
+ Anglais de Grande-Bretagne
+
+
+
+
+
+
+ 加拿大魁北克省法語
+ 加拿大商用英語
+ 英式英語
+
+
+
+
+
+
+
+
+
+ langue
+ characterizes a single language or sublanguage used within a text.
+ caractérise une langue ou une variété de langue utilisée
+ dans un texte.
+ 텍스트 내에서 사용되는 언어 또는 특수 언어의 특징을 기술한다.
+ 個別敘述文本中使用的語言或次要語言。
+ テキスト中にあるひとつの言語または特殊言語を示す.
+ bestimmt eine einzelne Sprache oder Subsprache in einem
+ Text.
+ caracteriza una lengua o jerga empleada en un texto.
+ indica una lingua o un linguaggio secondario utilizzato
+ all'interno di un testo.
+
+
+
+
+
+
+
+
+ identifier
+ 확인소
+ identificador
+ identificateur
+ identificatore
+ Supplies a language code constructed as defined in BCP 47 which is used to identify the
+ language documented by this element, and which is referenced by the global
+ xml:lang attribute.
+ fournit un code de langue issu de la recommandation
+ RFC 3066 RFC 3066 (ou son
+ successeur) utilisé pour identifier la langue précisée par cet élément, référencé par
+ l’attribut global xml:lang s’appliquant à l’élément considéré.
+ 요소로 기록된 언어를 식별하고기 위해 사용되는, 전체 xml:lang 속성에
+ 의해 참조되는 BCP 47에서 정의된 방식대로 구축된 언어 부호를
+ 제시한다.
+ 提供一語言代碼,其編碼方式定義在RFC 3066中 (或其系列中)
+ ,用來識別此元素所紀錄的語言,並由全域屬性xml:lang所參照。
+ 当該要素で記録される言語を特定するために, BCP 47 で定義されている言語コードを示す.また, BCP 47
+ は,グローバル属性xml:langでも使用される.
+ gibt einen Sprachschlüssel an, aufgebaut nach RFC 3066 (oder dessen Fortsetzung), der
+ zur Angabe der im Element festgehaltenen Sprache benutzt wird, und auf den das globale
+ xml:lang -Attribut verweist.
+ proporciona un código de lengua construido según se
+ define en RFC 3066 (o en su sucesor)
+ que se utiliza para identificar la lengua documentada por este elemento, y a la cual se hace
+ referencia mediante el atributo globlal xml:lang.
+ fornisce un codice per la lingua costruito come
+ definito in RFC 3066 (o nei sui
+ successori), utilizzato per identificare la lingua documentata da questo elemento e che è
+ indicato dall'attributo globale xml:lang.
+
+
+
+ specifies the approximate percentage (by volume) of the text which uses this language.
+ précise approximativement le pourcentage du volume de
+ texte utilisant cette langue.
+ 이 언어를 사용하는 텍스트의 대략적 백분율(분량)을 명시한다.
+ 標明該文本使用此語言的大約比例 (以冊計) 。
+ 当該言語がテキスト中で使用されているおよその割合を示す.
+ gibt den ungefähren Prozentsatz (nach Umfang) für die
+ Verwendung dieser Sprache im Text an.
+ especifica el porcentaje (de volumen) aproximado de
+ texto que usa esa lengua.
+ specifica la percentuale approsimativa (per volume)
+ di testo che usa questa lingua.
+
+
+
+
+
+
+ modern American English
+ Azerbaijani in Arabic script
+ Pig Latin
+
+
+
+
+
+
+ Anglais américain moderne
+ Azerbaijanais en caractères arabes
+ verlan
+
+
+
+
+
+
+ 現代美語
+ 阿拉伯文手寫的亞塞拜然語
+ 一種行話,將字頭的子音調至字尾,再多加一個音節
+
+
+
+
+
Particularly for sublanguages, an informal prose characterization should be
+ supplied as content for the element.
+
+
+
Dans le cas particulier des variétés de langues, l'élément contiendra un
+ texte caractérisant mais non structuré.
+
+
+
Determinado para los sublenguajes, se debe suministrar una caracterización
+ informal de la prosa como contenido del elemento.
+
+
+
特殊言語の場合には,非公式の散文による記述にすべきである.
+
+
+
+
+
The Text Classification
+ text classification
+ classification du texte
+ 텍스트 분류
+ 文件分類
+ Textklassifikation
+ clasificación de texto
+ classificazione del testo
+ groups information which describes the nature or topic of a text in terms of a standard
+ classification scheme, thesaurus, etc.
+ regroupe des informations décrivant la nature ou le sujet
+ d’un texte selon des termes issus d’un système de classification standardisé, d’un thésaurus,
+ etc.
+ 표준 분류 스키마, 시소러스 등을 통해서 텍스트의 특성 또는 주제를 기술하는 정보를 모아 놓는다.
+ 匯集以標準分類架構、索引典等來描述文件性質或主題的資訊。
+ 標準的な分類スキーム,分類語彙などにより,テキストの性格や話題を示す 情報をまとめる.
+ umfasst Informationen über Art oder Thematik eines Texts
+ unter Bezug auf ein Standard-Klassifikationsschema, einen Thesaurus, usw.
+ agrupa información que describe la naturaleza o la
+ temática de un texto en términos de un esquema de clasificación estándard.
+ raggruppa le informazioni che descrivono la natura o
+ l'argomento di un testo secondo uno schema di classificazione standard, un dizionario i
+ sinonimi, ecc.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Academic prose
+
+
+
+
+
+
+ 001.9
+
+
+ End of the world
+ History - philosophy
+
+
+
+
+
+
+
+
+
+
+ Littérature française -- 20ème siècle -- Histoire et critique
+ Littérature française -- Histoire et critique -- Théorie, etc.
+ Français (langue) -- Style -- Bases de données.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 中國文學
+
+
+
+
+
+
+ 820
+
+
+ 傷痕文學
+ 語文類
+
+
+
+
+
+
+
+
+
+ mot clé
+ contains a list of keywords or phrases identifying the topic or nature of a text.
+ contient une liste de mots clés ou d’expressions
+ décrivant la nature ou le sujet d’un texte.
+ 텍스트의 주제 또는 특성을 식별하는 주제어 또는 구의 목록을 포함한다.
+ 包含標明文件主題或性質的關鍵詞或字詞列表。
+ テキストの話題や性格を特定するキーワードや句のリストを示す.
+ enthält Zusammenstellung von Schlüsselwörtern oder
+ –phrasen zu Art und Thematik des Textes.
+ contiene una lista de palabras clave o sintagmas que
+ identifican la temática o la naturaleza del texto.
+ contiene una lista delle parole chiave o frasi che
+ identificano l'argomento o la natura di un testo.
+
+
+
+
+
+
+
+
+
+
+
+
+
+ identifies the controlled vocabulary within which the set of keywords concerned is
+ defined identifies the classification scheme within which the set of categories concerned is
+ defined, for example by a taxonomy element, or by
+ some other resource.
+ désigne la liste close de mots dans lequel l'ensemble
+ des mots-clés concernés est défini.
+ 관련 키워드 집합이 정의된 통제 어휘를 식별하며, 이 정의는 통제 어휘 내에서 수행된다.
+ 標明相關關鍵詞所使用到的詞彙範圍。
+ 当該キーワードリストが定義されている統制語彙を示す.
+ gibt das festgesetzte Vokabular an, mit dem die
+ zusammengestellten Schlüsselwörter definiert sind.
+ identifican el vocabulario con el que se define el
+ conjunto de palabras clave referidas.
+ identifica il vocabolario controllato all'interno del
+ quale sono definite le parole chiave.
+
+
+
+
+
+
+ Babbage, Charles
+ Mathematicians - Great Britain - Biography
+
+
+
+
+
+
+ Fermented beverages
+ Central Andes
+ Schinus molle
+ Molle beer
+ Indigenous peoples
+ Ethnography
+ Archaeology
+
+
+
+
+
+
+ Littérature française -- 20ème siècle -- Histoire et critique
+ Littérature française -- Histoire et critique -- Théorie, etc.
+ Français (langue) -- Style -- Bases de données.
+
+
+
+
+
+
+ 李白
+ 詩人 - 唐代 - 傳記
+
+
+
+
+
Each individual keyword (including compound subject headings) should
+be supplied as a term element directly within the
+keywords element. An alternative usage, in which each
+term appears within a item inside a list is
+permitted for backwards compatibility, but is deprecated.
+
If no control list exists for the keywords used, then no value
+should be supplied for the scheme attribute.
+
+
+
+
+
+ classification code
+ code de classification
+ 분류 부호
+ código de clasificación
+ Klassifizierungsschlüssel
+ codice di clasificazione
+ contains the classification code used for this text in some standard classification system.
+ contient le code de classification attribué à ce texte en
+ référence à un système standard de classification.
+ 표준 분류 체계에서 이 텍스트에 대하여 사용된 분류 부호를 포함한다.
+ 包含文件在某標準分類系統中所屬的分類代碼。
+ 当該テキストで使用されている,ある規格に従った分類コードを示す.
+ enthält den Klassifizierungsschlüssel entsprechend einem
+ Standard-Klassifizierungssystems.
+ indica el código de clasificación empleado para este
+ texto en algún sistema de clasificación estándard.
+ contiene il codice di classificazione utilizzato per
+ questo testo in un sistema di calssificazione standard.
+
+
+
+
+
+
+
+
+ identifies the
+ classification system in use, as defined by for example by a taxonomy element, or
+ some other resource.
+ identifie le système de classification ou la
+ taxinomie utilisée.
+ 사용하고 있는 분류 체계 또는 분류법을 표시한다.
+ 說明使用中的分類系統或分類法。
+ 当該分類法を定義する.
+ Gibt an welches Klassifizierungssystem oder welche
+ Taxonomie benutzt wird.
+ identifica el sistema de clasificación o taxonomía en
+ uso.
+ idantifica il sistema di classificazione o la
+ tassonomia utilizzati.
+
+
+
+
+
+ 410
+
+
+
+
+ 801
+ classification Dewey
+
+
+
+
+
+
+ category reference
+ référence à la catégorie
+ 범주 참조
+ 類目參照
+ Verweis auf eine Kategorie
+ referencia de categoría
+ riferimento alla categoria
+ specifies one or more defined categories within some taxonomy or text typology.
+ spécifie une ou plusieurs catégories définies dans une
+ taxinomie ou une typologie textuelle.
+ 분류법 또는 텍스트 유형 내에서 하나 이상의 정의된 범주를 명시한다.
+ 標明在某分類法或文件類型學中,一個或多個已定義之類目。
+ 分類法やテキスト分類中の,ひとつ以上の分類項目を定義する.
+ gibt eine oder mehrere Kategorien an, die innerhalb einer
+ Taxonomie oder Texttypologie definiert sind.
+ indica una o más categorías definidas al interno de una
+ taxonomía o tipología textual.
+ specifica una o più categorie definite all'interno di una
+ tassonomia o tipologia di testo
+
+
+
+
+
+
+
+
+
+ identifies the classification scheme within which the set of categories concerned is
+ defined, for example by a taxonomy element, or by
+ some other resource.
+ identifie le schéma de classification dans lequel est
+ défini le jeu de catégories concerné.
+ 관련 범주 집합이 정의된 분류 스키마를 표시한다.
+ 標明該分類架構,其中相關的類目群組已被定義
+ 当該分類項目が定義されている分類スキームを示す.
+ gibt das Klassifikationsschema an, in dem die
+ entsprechenden Kategorien definiert sind.
+ indica el esquema de clasificación al interno del
+ cual se define una serie de categorias referidas.
+ identifica lo schema di classificazione all'interno
+ del quale sono definite le categorie interessate.
+
+
+
+
+
+
+
+
+
+ Newspapers
+
+
+ Provincial
+
+
+ Low to average annual sales
+
+
+
+
+
+
+
+
+
+
+ Lexique
+
+
+ Dictionnaire
+
+
+ Glossaire
+
+
+
+
+
+
+
+
+
+
+ 報紙
+
+
+ 全省的
+
+
+ 低於每年平均銷售額
+
+
+
+
+
+
The scheme attribute need be supplied only if more than one
+ taxonomy has been declared.
+
+
+
L'attribut scheme n'est donné que si plus d'une taxinomie a été déclarée.
+
+
+
El atributo del esquema necesita ser suministrado solamente si se ha declarado más de una
+ taxonomía
+
+
+
当該属性sdchemeは,複数の分類法が宣言されている場合にのみ,必要と なる.
+
+
+
+
+
Abstracts
Calendar Description
+ calendar description
+ descripción de las calendarios
+ description des calendriers
+ descrizione delle calendari
+ contains a description of the calendar system used in any
+ dating expression found in the text.
+ contient la description des différents calendriers
+ utilisés dans des dates écrits dans un manuscrit.
+ contiene una descripción de todos los diferentes
+ calendarios usados en un manuscrito.
+ contiene una descrizione dei diversi calendari usati in
+ un manoscritto
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Anno Domini (Christian Era)
+
+
+
Anno Hegirae (Muhammedan Era)
+
+
+
Mauludi Era (solar years since Mohammed's birth)
+
+
+
Anno Mundi (Jewish Calendar)
+
+
+
Anno Persici
+
+
+
Aji Saka Era (Java)
+
+
+
Buddhist Era
+
+
+
Cooch Behar Era
+
+
+
Common Era
+
+
+
Chinese Lunar Era
+
+
+
Chula Sakarat Era
+
+
+
Ethiopian Era
+
+
+
Fasli Era
+
+
+
ISO 8601 calendar
+
+
+
Japanese Calendar
+
+
+
Khalsa Era (Sikh calendar)
+
+
+
Kali Yuga
+
+
+
Malabar Era
+
+
+
Monarchic Solar Era
+
+
+
Nepal Samwat Era
+
+
+
Old Style (Julian Calendar)
+
+
+
Rattanakosin (Bangkok) Era
+
+
+
Saka Era
+
+
+
Mohammedan Solar Era (Iran)
+
+
+
Saka Samvat
+
+
+
Tripurabda Era
+
+
+
Vikrama Era
+
+
+
Vikrama Samvat Era
+
+
+
+
+
+
+
+
+
Gregorian calendar
+
+
+
Julian calendar
+
+
+
Islamic or Muslim (hijri) lunar calendar
+
+
+
Hebrew or Jewish lunisolar calendar
+
+
+
French Revolutionary calendar
+
+
+
Iranian or Persian (Jalaali) solar calendar
+
+
+
Coptic or Alexandrian calendar
+
+
+
Chinese lunisolar calendar
+
+
+
+
+
+
+
+
+
Egyptian calendar (as defined by Wikipedia)
+
+
+
+
+
+
In the first example above, calendars and short codes for
+ xml:ids are from W3 guidelines at
+ http://www.w3.org/TR/xpath-functions-11/#lang-cal-country
+
+
+
+
+
+
+
+ calendrier
+ calendario
+ calendario
+ describes a calendar or dating system used in a dating formula in the text.
+
+
+
+
+
+
+
+
+
+
+
+
Julian Calendar (including proleptic)
+
+
+
+
+
+
+
+
+
Egyptian calendar (as defined by Wikipedia)
+
+
+
+
+
+
+
+
Correspondence Description
+ correspondence
+ description
+ contains a description
+ of the actions related to one act of correspondence.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Carl Maria von Weber
+ Dresden
+ 23 June 1817
+
+
+ Caroline Brandt
+ Prag
+
+
+ Previous letter of
+ Carl Maria von Weber
+ to Caroline Brandt:
+ June 19/20, 1817
+
+ Next letter of
+ Carl Maria von Weber to
+ Caroline Brandt:
+ June 27, 1817
+
+
+
+
+
+
+
+
+
+ contains a structured description of the place,
+ the name of a person/organization and the date related to the sending/receiving of a message or any other action related to the correspondence
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ describes the nature of the action.
+
+
+
+ information concerning the sending or dispatch of a message
+
+
+ information concerning the receipt of a message
+
+
+ information concerning the transmission of a message, i.e. between the dispatch and the next receipt, redirect or forwarding
+
+
+ information concerning the
+ redirection of an unread message.
+
+
+ information concerning the
+ forwarding of a message.
+
+
+
+
+
+
+
+
+ Adelbert von Chamisso
+ Vertus
+
+
+
+
+
+
+
+
+ correspondence context
+ Korrespondenzstelle
+
+ provides references to
+ preceding or following correspondence related to this piece of
+ correspondence.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Previous letter of
+ Carl Maria von Weber to
+ Caroline Brandt:
+ December 30, 1816
+
+
+ Next letter of
+ Carl Maria von Weber to
+ Caroline Brandt:
+ January 5, 1817
+
+
+
+
+
+
+
+
+ groups elements which define the
+ parts (usually names, dates and places) of one action related to the correspondence.
+
+ groups elements which may
+ appear as part of the correspContext element
+
+ groups together metadata
+ elements for describing correspondence
+
Non-TEI Metadata
+ outside metadata
+ provides a container
+ element into which metadata in non-TEI formats may be
+ placed.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
This example presumes that the prefix dc has been bound to the namespace
+ http://purl.org/dc/elements/1.1/ and the prefix rdf is bound to
+ the namespace http://www.w3.org/1999/02/22-rdf-syntax-ns#. Note: The
+ about attribute on the rdf:Description in this example gives a URI
+ indicating the resource to which the metadata contained therein refer. The
+ rdf:Description in the second xenoData block has a blank
+ about, meaning it is pointing at the current document, so
+ the RDF is about the document within which it is contained, i.e. the TEI document containing
+ the xenoData block. Similarly, any kind of relative URI may be used, including
+ fragment identifiers (see ). Do note, however, that if the contents of
+ the xenoData block are to be extracted and used elsewhere, any relative URIs will
+ have to be resolved accordingly.
+
+
+ The description of a new world, called the blazing-world
+ The Duchess of Newcastle
+ 1667
+ British Library, 8407.h.10
+ utopian fiction
+
+
+ The Description of a New World, Called the Blazing-World, 1668
+ Cavendish, Margaret (Lucas), Duchess of Newcastle
+ Women Writers Project
+ 2002-02-12
+ utopian fiction
+
+
+
+
+
+
+
+
+
+
+
In this example, the prefix
+ rdf is bound to the namespace http://www.w3.org/1999/02/22-rdf-syntax-ns#, the prefix
+ dc is bound to the namespace http://purl.org/dc/elements/1.1/, and the prefix
+ cc is bound to the namespace http://web.resource.org/cc/.
In this example, the prefix
+ dc is again bound to the namespace
+ http://www.openarchives.org/OAI/2.0/oai_dc/, and the prefix
+ oai_dc is bound to the namespace http://www.openarchives.org/OAI/2.0/oai_dc/.
+
+
+ The colonial despatches of Vancouver Island and British
+ Columbia 1846-1871: 11566, CO 60/2, p. 291; received 13 November.
+ Trevelyan to Merivale (Permanent Under-Secretary)
+ 1858-11-12
+ Trevelyan
+ University of Victoria Humanities Computing and Media
+ Centre, and UVic Libraries
+ InteractiveResource
+ application/xhtml+xml
+ text
+ http://bcgenesis.uvic.ca/getDoc.htm?id=B585TE13.scx
+ This document is licensed under a Creative Commons …
+ (SCHEME=ISO639) en
+ Transcribed from microfilm and/or original documents, and
+ marked up in TEI P5 XML. The interactive XHTML resource is generated
+ from the XHTML using XQuery and XSLT.
+ repository: CO
+ coNumber: 60
+ coVol: 2
+ page: 291
+ coRegistration: 11566
+ received: received 13 November
+ Trevelyan, Sir Charles Edward
+ Merivale, Herman
+ Elliot, T. Frederick
+ Moody, Colonel Richard Clement
+ Lytton, Sir Edward George Earle Bulwer
+ Jadis, Vane
+ Carnarvon, Earl
+ British Columbia
+ British Columbia correspondence: Public Offices
+ document (normally correspondence between government
+ departments)
+
+
+
+
+
+
In this example, the prefix mods is bound to the
+ namespace http://www.loc.gov/mods/v3.
+
+
+
+
+ Academic adaptation and cross-cultural
+ learning experiences of Chinese students at American
+ universities
+ a narrative inquiry
+
+
+
+
+ Author
+
+ Northeastern University
+ Hong
+ Zhang
+
+
+
+
+ Advisor
+
+ Liliana
+ Meneses
+
+
+ text
+ doctoral theses
+
+
+ Boston (Mass.)
+
+ Northeastern University
+ 2013
+
+
+ eng
+
+
+ electronic
+ born digital
+
+
+
+
+
+
+
+
+
+
The Revision Description
+ revision description
+ descriptif des révisions
+ 수정 기술
+ 修訂描述
+ Beschreibung der Textrevision
+ descripción de la revisión
+ descirzione della revisione
+ summarizes the revision history for a file.
+ fournit un résumé de l’historique des révisions d’un
+ fichier.
+ 하나의 파일에 대한 수정 이력을 요약한다.
+ 概述檔案的修訂歷史。
+ ファイルの改訂履歴を示す.
+ enthällt alle Revisionsschritte, die an der Datei
+ vorgenommen wurden.
+ resume el historial de la revisión de un archivo.
+ sintetizza la storia delle revisioni di un file
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ deleted chapter 10
+
+
+
+
+
+
+
+ 12 avril 03Dernière révision par F. B.
+ 1 mars 03 F.B a fait le nouveau fichier.
+
+
+
+
+
+
+
+ 王大明刪除第十章
+
+
+
+
+
If present on this element, the status attribute
+ should indicate the current status of the document. The same
+ attribute may appear on any change to record the status
+ at the time of that change. Conventionally change elements should
+ be given in reverse date order, with the most recent change at the
+ start of the list.
+
+
+
Les changements les plus récents apparaissent en début de liste
+
+
+
Registran los cambios más recientes en el top de la lista.
+
+
+
直近の変更をリストの先頭に記録する.
+
+
+
+
+
+
+ documents a change or set of changes made during the production
+ of a source document, or during the revision of an electronic file.
+ résume une modification ou une correction apportée à une
+ version particulière d’un texte électronique partagé entre plusieurs chercheurs.
+ 몇몇 연구자들 사이에 공유된 전자 텍스트의 특정 버전에 대한 특정 변경 또는 수정 사항을 요약한다.
+ 概述多位研究者共享的某版本電子文本當中,某特定的內容變更或修正。
+ 研究者間で共有されている電子テキストの特定の版に対して施された変更や 修正を示す.
+ gibt eine bestimmte Veränderung oder Korrektur an einer
+ bestimmten Version eines elektronischen Textes an, an der verschiedene Bearbeiter beteiligt
+ sind.
+ resume un cambio o corrección determinada llevada a cabo
+ en una versión dada de un texto electrónico en el que trabajan diversos investigadores.
+ sintetizza un particolare cambiamento o correzione
+ effettuato ad una particolare versione di un documento elettronico, condivisa da più
+ ricercatori.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ points to one or more elements that belong to this change.
+
+
+
+
+
+
+ ...
+ Lou Burnard
+
+ copy editing
+ Brett Zamir
+
+
+
+
+ Finished chapter 23
+ Finished chapter 2
+ Added examples to section 3
+ Deleted chapter 10
+
+
+
+
+
+
+
+
+ First draft in pencil
+ First revision, mostly
+using green ink
+ Final corrections as
+supplied to printer.
+
+
+
+
+
+
+
+
+ ...
+ G.K.
+
+ copie
+ R.T.
+
+
+
+ Fin du chapitre 23
+ FIn du chapitre 2
+ Ajout d'exemples dans la section 3
+ Suppression du chapitre 10
+
+
+
+
+
+ 張三新增範例於第三節
+ 李四刪除第十章
+
+
+
+
The who attribute may be used to point to any other element, but will typically
+ specify a respStmt or person element elsewhere in the header, identifying
+ the person responsible for the change and their role in making it.
+
It is recommended that changes be recorded with the most recent
+ first. The status attribute may be used to indicate the
+ status of a document following the change documented.
+
+
+
Les modifications doivent être enregistrées dans l'ordre, par exemple la plus récente en
+ premier.
+
+
+
El atributo quién (who) se puede utilizar para señalar a cualquier otro elemento,
+ pero especificará típicamente a respStmt o al elemento persona de cualquier
+ parte del encabezado, identificando a la persona responsable del cambio y de su papel en la
+ producciónl.
+
Se recomienda que los cambios se registren con el primero más reciente.
+
+
+
修正は一貫した並びで記録されるべきである.例えば,最新のものが 最初に書かれる,など.
+
+
+
+
+
+
+
Minimal and Recommended Headers
+
Note for Library Cataloguers
The TEI Header Module
+ Common Metadata
+ The TEI Header
+ En-tête TEI
+ TEI標頭
+ L'intestazione TEI (TEI Header)
+ O cabeçalho TEI
+ ヘダーモジュール
+
Elements Available in All TEI Documents
Paragraphs
+ paragraph
+ 문단
+ 段落
+ paragraphe
+ párrafo
+ paragrafo
+ marks paragraphs in prose.
+ 산문에서 문단을 표시한다.
+ 標記散文的段落。
+ 散文の段落を示す.
+ marque les paragraphes dans un texte en prose.
+ marca párrafos en prosa.
+ indica i paragrafi in prosa
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Abstract model violation: Paragraphs may not contain other paragraphs or ab elements.
+
+
+
+
+
+
+ Abstract model violation: Lines may not contain higher-level structural elements such as div, p, or ab.
+
+
+
+
+
+
Hallgerd was outside. There is blood on your axe, she said. What have you
+ done?
+
+
I have now arranged that you can be married a second time, replied Thjostolf.
+
Then you must mean that Thorvald is dead, she said.
+
Yes, said Thjostolf. And now you must think up some plan for me.
+
+
+
+
+
+
+
C'était à Mégara, faubourg de Carthage, dans les jardins d'Hamilcar.
+
Les soldats qu'il avait commandés en Sicile se donnaient un grand festin pour célébrer
+ le jour anniversaire de la bataille d'Eryx, et comme le maître était absent et qu'ils se
+ trouvaient nombreux, ils mangeaient et ils buvaient en pleine liberté.
+
+
+
+
+
我抬起頭,他打開了一扇窗戶,探出頭來。先生?
+
你要去哪。葛里葉?
去藥劑師那裡,先生。太太要我去,替男孩拿點東西。
你能不能也替我拿點東西?
ㄒㄒ
+
當然能,先生。 忽然間風好像沒那麼刺骨了。 等一下,我把它寫下來。
+
+
+
+
+
+
+
+
Treatment of Punctuation
Functions of Punctuation
Hyphenation
Highlighting and Quotation
What Is Highlighting?
Emphasis, Foreign Words, and Unusual Language
Foreign Words or Expressions
+ 외국어
+ 外文
+ étranger
+ extranjero
+ straniero
+ identifies a word or phrase as belonging to some language other than that of the
+ surrounding text.
+ 주변 텍스트와 다른 언어로 사용된 단어나 구를 표시한다.
+ 標明所屬語言不同於週遭文字的字詞。
+ 記述のベースで使われている言語と異なる言語による語句を定義する.
+ reconnaît un mot ou une expression comme
+ appartenant à une langue différente de celle du contexte.
+ identidica una palabra o frase perteneciente a otra
+ lengua distinta de la del resto del texto en que se incluye.
+ identifica una parola o un sintagma appartenente ad
+ una lingua diversa da quella del testo circostante.
+
+
+
+
+
+
+
+
+ This is
+ heathen Greek to you still? Your lapis
+ philosophicus?
+
+
+ Et vobis messieurs,
+Ce ne seroyt que bon que nous rendissiez noz cloches...
+
+
+
+
Pendant ce temps-là, dans le bureau du rez- de-chaussée, les secrétaires faisaient du
+ hulla-hoop.
+
+
+
+ 整天窩在家裏看卡通打電動,你是御宅族嗎?
+
+
+
The global xml:lang attribute should be supplied for this element to
+ identify the language of the word or phrase marked. As elsewhere, its value
+ should be a language tag as defined in .
+
This element is intended for use only where no other element is available to mark
+ the phrase or words concerned. The global xml:lang attribute
+ should be used in preference to this element where it is intended to mark
+ the language of the whole of some text element.
+
The distinct element may be used to identify phrases belonging to
+ sublanguages or registers not generally regarded as true languages.
+
+
+
L'attribut global xml:lang doit être fourni dans cet élément pour
+ identifier la langue à laquelle appartiennent le mot ou l'expression
+ balisée. Comme ailleurs, sa valeur devrait être une balise de langue définie
+ dans .
+
Cet élément n'est utilisé que lorsqu'il n'y a pas d'autre élément disponible pour
+ baliser l'expression ou les mots concernés. L'attribut global
+ xml:lang doit être préféré à cet élément lorsqu'il s'agit de
+ caractériser la langue de l'ensemble d'un élément textuel.
+
L'élément distinct peut être utilisé pour identifier des expressions
+ appartenant à des variétés de langue ou à des registres qui ne sont pas
+ généralement considérés comme de vraies langues.
+
+
+
El atributo global xml:lang se debe suministrar para que este
+ elemento identifique la lengua de la palabra o de la frase marcada. Como en
+ otras partes, su valor debe ser una etiqueta de lengua según lo definido en
+ .
+
Este elemento se reserva para los casos en que no hay disponible otro elemento
+ para marcar la frase o las palabras referidas. Es preferente el uso del
+ atributo global xml:lang a este elemento donde se quiere marcar
+ la lengua del conjunto de un cierto elemento del texto.
+
El elemento distinto se puede utilizar para identificar las frases que
+ pertenecen a sublenguajes o a registros no considerados generalmente como
+ lenguas verdaderas.
Emphatic Words and Phrases
+ emphasized
+ 강조
+ 強調
+ mis en valeur
+ enfatizado
+ enfatizzato
+ marks words or phrases which are stressed or emphasized for
+ linguistic or rhetorical effect.
+ 언어적 또는 수사적 효과를 위해 강세가 붙거나 강조된 단어 또는 구를 표시한다.
+ 為了語言上或修辭上的效果而加重語氣或特別強調的字句。
+
+ 言語学的,修辞学的に強調されるべき語句を示す.
+ marque des mots ou des expressions qui sont
+ accentués ou mis en valeur pour un motif linguistique ou rhétorique.
+ marca palabras o frases que se destacan o enfatizan por causas lingüísticas o retóricas.
+ codifica parole o sintagmi che sono messe in risalto o enfatizzate per un effetto linguistico o retorico.
+
+
+
+
+
+
+
+
+ You took the car and did what?!!
+
+
+
+
+
«Mes amis, dit-il, mes amis, je... je... »
+
Mais quelque chose l'étouffait. Il ne pouvait pas achever sa phrase.
+
Alors il se tourna vers le tableau, prit un morceau de craie, et, en appuyant de
+ toutes ses forces, il écrivit aussi gros qu'il put :
+
+ «vive la France !"»
+
+
Puis il resta là, la tête appuyée au mur, et, sans parler, avec sa main il nous
+ faisait signe:
+
«C'est fini...allez-vous-en.»
+
+
+
+
+
+
Tu sais quoi ? On l'aurait proposé pourla médaille !
+
+
+
+ 昨天晚上你去了哪裡?!!
+
+
+
+ 寶玉含羞央告道:好姐姐,千萬別告訴人。襲人亦含羞笑問道: 你夢見什麼故事了?是那里流出來的那些髒東西?
+
+
+
+
+ What it all comes to is this, he said. What
+ does Christopher Robin do in the morning nowadays?
+
+
+
+
+
+
+
+ highlighted
+ 강조체
+ 顯目標示
+ mis en évidence
+ subrayado
+ evidenziato
+ marks a word or phrase as graphically distinct from the
+ surrounding text, for reasons concerning which no claim is
+ made.
+ 어떤 이유인지는 명세하지 않고, 주변 텍스트와 시각적으로 구별된 단어나 구를 표시한다.
+ 標誌其字型外觀上和週遭文字有所區別的字詞,但不指出顯目原因。
+
+ 周囲のテキストとは見た目が異なっている語句を示す.
+ distingue un mot ou une expression comme
+ graphiquement distincte du texte environnant, sans en donner la raison.
+ marca una palabra o frase gráficamente diferente del resto del texto que la circunda, por causas sobre las que no se hace ninguna declaracion.
+ codifica una parola o sintagma in quanto graficamente distinta dal testo circostante, senza che vengano specificate le ragioni dell'evidenziazione.
+
+
+
+
+
+
+
+
+
+ And this Indenture further witnesseth
+ that the said Walter Shandy, merchant,
+ in consideration of the said intended marriage ...
+
+
+
+
Au fronton, on lit cette inscription : attends. Tu verras. Le
+ notaire encore prétend qu' elle ne saurait être antérieure au XVIII siècle, car, sinon, l'
+ on eût écrit --tu voiras--.
Other Linguistically Distinct Material
+ identifies any word or phrase which is regarded as linguistically distinct, for example as
+ archaic, technical, dialectal, non-preferred, etc., or as forming part of a sublanguage.
+ 고어, 전문어, 방언, 비선호 단어 등과 같이 언어적으로 구분되거나 하위언어의 부분을 형성하는
+ 것으로 간주되는 임의의 단어 또는 구를 표시한다.
+ 標明被視為特殊用語的字詞,例如:古語、專業用語、方言、非推薦用語等,或標明形成部分次要語言的字詞
+ 言語上,異なる語句を示す.例えば,古語,技術語,方言,忌諱語など.ま
+ た,特定グループでしか通用しない特殊言語など.
+ identifie tout mot ou toute expression en la considérérant comme
+ linguistiquement spécifique, par exemple comme étant archaïque, technique, dialectale,
+ inusitée, ou comme appartenant à une langue spécifique.
+ identifica alguna palabra o locución que se aprecia
+ lingüísticamente distinta, por ejemplo como arcaica, técnica, dialectal, forma no
+ prioritaria, etc. o como integrante de un registro específico o de una jerga.
+ identifica qualsiasi parola o sintagma ritenuto
+ linguisticamente distinto, per esempio come arcaico, tecnico, dialettale, non preferito,
+ ecc., o come parte di una lingua secondaria.
+
+
+
+
+
+
+
+
+
+ specifies the sublanguage or register to which the word or phrase is being
+ assigned
+ 단어나 구가 속하는 하위언어 또는 레지스터를 명시한다.
+ 指明所標記的字詞屬於哪一種次要語言或語體層次
+ 当該特殊言語または語句の種類を示す.
+ précise la variété de langue ou le registre de langue
+ auquels appartiennent le mot ou l'expression.
+ especifica la jerga o registro al cual se
+ asigna una palabra, locución o sintagma.
+ indica la lingua secondaria o il registro al
+ quale la parola o il sintagma è ricondotto
+
+
+
+ specifies how the phrase is distinct diachronically
+ 구가 통시적으로 구분되는 방식을 명시한다.
+ 指明該字詞是屬於哪一種時間上的特殊用語
+ 当該語句の通時的特徴を示す.
+ précise comment l'expression est diachroniquement distincte.
+ especifica como el sintagma es distinto
+ diacrónicamente
+ indica come il sintagma sia distinto
+ diacronicamente
+
+
+
+ specifies how the phrase is distinct diatopically
+ 구가 지역적으로 구분되는 방식을 명시한다.
+ 指明該字詞是屬於哪一種區域上的特殊用語
+ 当該語句の共時的特徴を示す.
+ précise comment l'expression se caractérise de
+ façon diatopique.
+ especifica como la locución es distinta
+ diatópicamente
+ indica come il sintagma sia distinto in modo
+ diatopico
+
+
+
+ specifies how the phrase is distinct diastatically
+ 구가 사회적으로 구분되는 방식을 명시한다.
+ 指明該字詞是屬於哪一種社會層次分類上的特殊用語
+ 当該語句の社会的特徴を示す.
+ précise comment l'expression se caractérise de
+ façon diastatique.
+ especifica como la locución es distinta
+ diastáticamente.
+ indica come il sintagma sia distinto in modo
+ diastratico
+
+
+
+
+ Next morning a boy
+ in that dormitory confided to his bosom friend, a fag of
+ Macrea's, that there was trouble in their midst which King would fain
+ keep secret.
+
+
+
+
+
- Elle fait chier, cette meuf. Tu confonds amour et
+ piquouse. Tu l'auras, ton shoot, merde !
Quotation
+ speech or thought
+ 대화 또는 사고
+ parlamento, discurso o pensamiento
+ Parole ou pensée.
+ parlato o pensiero
+ indicates passages thought or spoken aloud, whether explicitly indicated in the source or
+ not, whether directly or indirectly reported, whether by real people or fictional characters.
+ 원본에 명시적으로 표시되었든지 않았든지, 직접적으로 또는 간접적으로 보고되었든지 않았든지, 그리고 실제
+ 인물 또는 가공의 인물에 의해 생성되었는지 간에, 생각 혹은 소리 내어 말한 단락을 표시한다.
+ indica los pasajes pensados o hablados en voz alta, si
+ está indicado explícitamente en la fuente o no, si señalado directamente o indirectamente, sean
+ de gente real o de personajes ficticios.
+ 考えたり声に出されたりした一節を示す.元資料中に明示されているかどう
+ か,間接的な伝聞かどうか,実在の人物に依るものかどうか,などは問わな い.
+ indique que les passages sont pensés ou qu'ils sont
+ prononcés à haute voix, que cela soit indiqué explicitement ou non dans la source , que ces
+ passages soient directement ou indirectement rapportés par des personnages réels ou fictifs.
+ indica brani pensati o pronunciati, siano essi
+ esplicitamente indicati nella fonte o meno, in discorso diretto o indiretto e attribuibili a
+ persone realmente esistenti o personaggi di fantasia
+
+
+
+
+
+
+
+
+
+
+ may be used to indicate whether the quoted matter is regarded as having been vocalized
+ or signed.
+ 인용부가 발화된 것으로 또는 신호된 것으로 볼 수 있는지를 표시할 때 사용할 수 있다.
+ puede ser utilizado para indicar si el material
+ marcado ha sido verbalizado o firmado.
+ 引用内容が言語または記号化されているかどうかを示す.
+ peut être utilisé pour indiquer si l'on estime que
+ l'objet cité est dit oralement ou par signes.
+ può essere utilizzato per indicare se la citazione in
+ questione è stata pronunciata o firmata
+
+ unknown
+
+
+
+ Celia thought privately, Dorothea quite despises Sir James Chettam;
+ I believe she would not accept him. Celia felt that this was a pity.
+
+
+
+
+
+
The value true indicates the encoded passage was expressed outwardly (whether
+ spoken, signed, sung, screamed, chanted, etc.); the value false indicates that
+ the encoded passage was thought, but not outwardly expressed.
+
+
+
La valeur true indique que le passage encodé a été prononcé de manière
+ explicite (qu'il ait été dit, exprimé par geste, chanté, crié, déclamé etc.) ; la valeur
+ false indique que le passage encodé a été pensé, mais pas prononcé.
+
+
+
El valor verdad indica que el pasaje codificado fue expresado exteriormente
+ (si fue hablado, cantado, gritado, etc.); el valor falso indica que el pasaje
+ codificado era un pensamiento, pero no expresado exteriormente.
+
+
+
+ may be used to indicate whether the quoted matter is regarded as direct or indirect
+ speech.
+ 인용부가 직접 대화로 또는 간접 대화로 간주할 수 있는지를 표시할 때 사용할 수 있다.
+ puede ser utilizado para indicar si el material
+ marcado está considerado como discurso directo o indirecto.
+ 引用内容が,直接または間接的な話(法)かどうかを示す.
+ peut être utilisé pour indiquer si le sujet cité est
+ à considérer comme comme étant du discours direct ou du discours indirect.
+ può essere utilizzato per indicare se la citazione in
+ questione è considerata come discorso diretto o indiretto
+
+ true
+
+
+
+
+
+
+
+
+ Tantripp had brought a card, and said that there was a gentleman waiting in the lobby.
+ The courier had told him that only Mrs. Casaubon was at home,
+ but he said he was a relation of Mr. Casaubon's: would she see him?
+
+
+
+
+
The value true indicates the speech or thought is represented directly; the
+ value false that speech or thought is represented indirectly, e.g. by use of a
+ marked verbal aspect.
+
+
+
La valeur true indique que la parole ou la pensée est représentée directement
+ ; la valeur false, qu'elle est représentée indirectement , par exemple marquée
+ par une forme verbale.
+
+
+
El valor verdad indica que el discurso o el pensamiento está representado
+ directamente; el valor falso que el discurso o el pensamiento está representado
+ indirectamente, p.ej. por medio de un aspecto verbal marcado.
"Our minstrel here will warm the old man's heart with song, dazzle him with jewels and
+ gold", a troublemaker simpered. "He'll trample on the Duke's camellias, spill
+ his wine, and blunt his sword, and say his name begins with X, and in the end the Duke
+ will say, 'Take Saralinda, with my blessing, O lordly Prince of Rags and Tags, O
+ rider of the sun!'"
+
+
+
+
+
+
Ils l'entendaient murmurer : Morts ! Tous morts ! Vous ne viendrez plus obéissant
+ à ma voix, quand, assise sur le bord du lac, je vous jetais dans la gueule des pépins de
+ pastèques ! Le mystère de Tanit roulait au fond de vos yeux, plus limpides que les
+ globules des fleuves. Et elle les appelait par leurs noms, qui étaient les noms
+ des mois.Siv ! Sivan ! Tammouz, Eloul, Tischri, Schebar ! Ah ! pitié pour moi,
+ Déesse !
+
+
+
+
+
+
On veut donc plaire à sa petite fille ?...
+ , dit Caroline en mettant sa tête sur l'épaule d'Adolphe, qui la baise au front en
+ pensant : Dieu merci, je la tiens! .
Hmmm, said a small voice in his ear.
+ Difficult. Very difficult. Plenty of courage, I see.
+ Not a bad mind either. there's talent, oh my goodness, yes — and a nice thirst to prove
+ yourself, now that's interesting. … So where shall I put you?
+
Harry gripped the edges of the stool and thought, Not
+ Slytherin, not Slytherin.
+
+
+
+
+
+
+
+ quotation
+ 인용
+ 引文
+ citation
+ cita
+ citazione
+ contains a phrase or passage attributed by the narrator or author to some agency external
+ to the text.
+ 해설자 또는 저자에 의해, 텍스트의 외부 주체에 의해 생성된 것이라 밝혀진 구 또는 단락을
+ 포함한다.
+ 包含敘述者或作者引用自文本以外來源的字 (句) 詞或段落。
+ 語り手や著者が,当該テキスト外にあるものに向けた,一節を示す.
+ contient une expression ou un passage que le
+ narrateur ou l'auteur attribue à une origine extérieure au texte.
+ contiene una frase o pasaje atribuido por el narrador o
+ autor a un agente externo al texto.
+ contiene una frase o un brano attribuito dall'autore o
+ dal narratore a soggetti esterni al testo
+
+
+
+
+
+
+
+
+
+
+
+ Lexicography has shown little sign of being affected by the
+ work of followers of J.R. Firth, probably best summarized in his
+ slogan, You shall know a word by the company it
+ keeps
+ (Firth, 1957)
+
+
+
+ C'est sûrement ça
+ qu'on appelle la glorieuse liberté des enfants de Dieu. Aime et fais tout ce que tu
+ voudras.Mais moi, ça me démolit.
+
+
+
+ 孟懿子問孝。子曰:無違。
+ (論語:卷一:為政第二)
+
+
+
+
If a bibliographic citation is supplied for the source of a quotation, the two may be
+ grouped using the cit element.
+
+
+
Si une référence bibliographique est donnée comme source de la citation,
+ on peut les regrouper dans l'élément cit.
+
+
+
Si una citación bibliográfica es proporcionada como fuente de una cita, las dos se pueden
+ agrupar usando el elemento CIT
+
+
+
+
引用部分に書誌情報の引用がある場合,この2つの部分は,要素 citでまとめられる.
+
+
+
+
+
+
+ quoted
+ 인용 부호로 주변 텍스트와 구분됨.
+ 引用的言詞、思想、或文字
+ séparé du texte environnant par des guillemets
+ discurso citado, pensado o escrito
+ citazione di discorso, pensiero o testo scritto
+ contains material which is distinguished from the
+ surrounding text using quotation marks or a similar method, for any one of a variety of reasons including, but not limited to: direct
+ speech or thought, technical terms or jargon, authorial distance, quotations from elsewhere, and
+ passages that are mentioned but not used.
+ 직접 대화 또는 사고, 전문 용어 또는 은어, 작가의 거리두기, 외부로부터의 인용문, 그리고 사용되지
+ 않고 언급된 단락 등의 이유로, 그리고 그 밖의 다른 이유로, 주변 텍스트와 어떤 방식으로든 차이가 있다고 (명시적으로) 표시된 부분을 포함한다.
+ 包含標記為 (看似)
+ 引用自他處的內容;在敘述文中,此元素用來標記直接或間接敘述;在字典中,用來標記實例或編者設計的範例;在寫本描述或其他上層資訊中,用來標記由來源文本中所摘錄的引文。
+ 周りのテキストとは(表面上)異なっているようにマークアップされている部
+ 分を示す.例えば,直接話法や思考,技術用語や専門語,著者による区別, 引用,言及されているが使われていない一節など.
+ contient un fragment qui est marqué (visiblement) comme
+ étant d’une manière ou d'une autre différent du texte environnant, pour diverses raisons telles
+ que, par exemple, un discours direct ou une pensée, des termes techniques ou du jargon, une mise
+ à distance par rapport à l’auteur, des citations empruntées et des passages qui sont mentionnés
+ mais non employés.
+ contiene material que se marca como (ostensiblemente)
+ citado de cualquier otro sitio: en la narrativa, este elemento se usa para marcar discursos en
+ estilo directo o indirecto; en diccionarios puede usarse para marcar ejemplos reales o ideados
+ de uso; en descripciones de manuscritos u otros metadatos, para marcar extractos citados de la
+ fuente que se documenta.
+ contiene una citazione codificata come se fosse
+ (formalmente) espressa da qualcun altro; in narrativa, l'elemento è usato per codificare
+ discorso diretto o indiretto; nei dizionari, può essere usato per indicare esempi, reali o
+ inventati, dell'uso di un termine; nelle descrizioni dei manoscritti o altre metainformazioni
+ per codificare estratti citati da fonti documentate.
+
+
+
+
+
+
+
+
+
+
+
+ may be used to indicate whether the offset passage is spoken or thought, or to
+ characterize it more finely.
+ 표시된 단락이 대화인지 사고인지를 나타내거나, 더 자세하게 규정하는 데 사용될 수 있다.
+ 可用來指出引文內容為言詞或思想,或者做更詳細的引文描述。
+ 当該部分が,発話されたものか,思考されたものかを示すため,または
+ より詳細に性質を示すために使われるかもしれない.
+ peut être utilisé pour indiquer si le passage cité
+ correspond à une parole ou à une pensée ou encore pour le caractériser plus finement.
+ Puede usarse para indicar si el material citado es
+ hablado o pensado, o para caracterizarlo con más precisión.
+ può essere usato per indicare se il brano citato è
+ parlato o pensato, oppure per caratterizzarlo con maggior precisione.
+
+
+
+ representation of speech
+ 대화의 표상
+ 表示直接敘述,通常會標上引號。
+ 発話.
+ notation du discours direct
+ representación del estilo directo, normalmente
+ marcado mediante comillas.
+ rappresentazione del discorso diretto, di solito
+ segnalato dalle virgolette.
+
+
+ representation of thought, e.g. internal monologue
+ 사고의 표상, 예를 들어, 내적 독백
+ 表示思考內容,例如內心獨白。
+ 思考.例えば,内的独白.
+ représentation de la pensée, par exemple un
+ monologue intérieur.
+ representación de un pensamiento o reflexión,
+ p.ej. un monólogo interno.
+ rappresentazione del pensiero, ad esempio il
+ monologo interiore.
+
+
+ quotation from a written source
+ 문어 원본으로부터 인용
+ 引用自一份書面來源文件。
+ 書かれた資料の引用.
+ citation d'une source écrite
+ cita de una fuente escrita.
+ citazione da una fonte scritta.
+
+
+ authorial distance
+ 작가의 거리두기
+ distancia autorial
+ 著者による区別.
+ distance prise par rapport à l'auteur
+ distanza dell'autore
+
+
+ palabras extranjeras
+ mots étrangers
+ parole straniere
+
+
+ linguistically distinct
+ lingüisticamente distinto
+ linguistiquement distinct
+ linguisticamente distinto
+
+
+ technical term
+ término técnico
+ terme technique
+ termine tecnico
+
+
+ rhetorically emphasized
+ énfasis retórico
+ mis en valeur par un procédé rhétorique.
+ retoricamente marcato
+
+
+ refering to itself, not its normal referent
+ 일반적인 지시체가 아니라 그 자체를 가리킴
+ se refiere a sí mismo, no a su referente habitual
+ 一般的な指示対象ではないもの.
+ métalinguistic, i.e. faisant référence à lui-même et non à son
+ référent habituel.
+ che si riferisce a se stesso e non al suo
+ referente abituale
+
+
+
+
+
+ It is spelled Tübingen — to enter the
+ letter u with an umlaut hold down the option key and press 0 0 f c
+
+
+
+
+
Si quelque serrure allait mal, il l'avait bientôt démontée, rafistolée, huilée, limée,
+ remontée, en disant :ça me connaît.
+
+
+
+
+
Enfin je me rappelai le pis-aller d’une grande princesse à
+ qui l’on disait que les paysans n’avaient pas de pain, et qui
+ répondit : Qu’ils mangent de la brioche.
+
May be used to indicate that a passage is distinguished from the surrounding text for reasons concerning which no claim is made. When used in this manner,
+ q may be thought of as syntactic sugar for hi with a value of
+ rend that indicates the use of such mechanisms as quotation marks.
+
+
+
Peut être utilisé pour indiquer qu'un passage est distingué du texte environnant par des
+ guillemets, pour des raisons non explicitées. Lorsqu'il est utilisé ainsi, q peut
+ être considéré comme un encodage plus lisible (sucre syntaxique) pour hi avec une
+ valeur de rend indiquant la fonction des guillemets.
+
+
+
Puede ser utilizado para indicar que un pasaje es distinguido del texto circundante mediante
+ las comillas por las razones que sean sobre las cuales no se hace ninguna declaración. Cuando
+ se utiliza de este modo, q puede ser considerado como una marca sintáctica para
+ hi con un valor de rend, lo que indica el uso de las comillas.
+
+
+
+
+
+ provides attributes for pointing to the source of a bibliographic reference.
+
+
+
+
+ provides a pointer to the bibliographical source from which a quotation or citation is drawn.
+
+
+
+
+
+
+ As Willard McCarty (2012, p.2)
+ tells us, ‘Collaboration’ is a
+ problematic and should be a contested term.
+
+
+
+
+
+
+
+
+ Grammatical theories
+ are in flux, and the more we learn, the less we
+ seem to know.
+
+
+
+ The Chicago Manual of Style,
+ 15th edition.
+ Chicago:
+ University of Chicago Press
+ (2003),
+ p.147.
+
+
+
+
+
+
+
+
+ cited quotation
+ 참조 인용
+
+ cita
+ citation
+ citazione
+ contains a quotation from some other document, together with a bibliographic reference to
+ its source. In a dictionary it may contain an example text with at least one occurrence of the
+ word form, used in the sense being described, or a translation of the headword, or an example.
+ 원문 참고문헌과 함께 제시된 다른 문서로부터의 인용을 포함한다. 사전에서는 기술된 의미로 사용된 어형이
+ 들어간 용례, 또는 표제어의 번역어 또는 예문을 포함할 수 있다.
+ 從其他文件中引用的內容,並包含引用來源的書目參照資料。
+ 書誌参照を伴い,他の文書からの引用を示す.例えば,辞書の場合には,
+ 当該単語形が出現する例文を示したり,当該見出し語の翻訳や用例を示した りする.
+ citation provenant d'un autre document comprenant la
+ référence bibliographique de sa source. Dans un dictionnaire il peut contenir un exemple avec au
+ moins une occurrence du mot employé dans l’acception qui est décrite, ou une traduction du
+ mot-clé, ou un exemple.
+ Una cita de algún otro documento junto a la referencia
+ bibliográfica a la fuente.
+ Un acitazione da un altro documento accompagnata da
+ riferimenti bibliografici alla fonte.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ and the breath of the whale is frequently attended with such an insupportable smell,
+ as to bring on disorder of the brain.
+ Ulloa's South America
+
+
+
+
+
+
+ Regarde de tous tes yeux, regarde
+ Jules Verne, Michel Strogof
+
+
+
+
+
+
+
+
+ horrifier
+
+
+ she was horrified at the expense.
+
+ elle était horrifiée par la dépense.
+
+
+
+
+
+
+
+
+ 棋開始了。上千人不再出聲兒。只有自願服務的人一會兒緊一會兒慢地用話傳出棋步,外邊兒自願服務的人就變動著棋子兒。
+ 阿城,《棋王》。
+
+
+
+
+
+
+
+
+ 使驚嚇
+
+
+ elle était horrifiée par la dépense
+
+ 成本把她嚇呆了。
+
+
+
+
+
+
+
+
+
+
+ to horrify
+
+
+ elle était horrifiée par la dépense
+
+ she was horrified at the expense.
+
+
+
+
+
+
+
+
+
+
+
+
+ mentionné
+ 指涉
+ marks words or phrases mentioned, not used.
+ marque des mots ou des expressions employés métalinguistiquement
+ marca palabras o locuciones mencionadas, no usadas.
+ 標誌被提到的但意義上不被使用的字句。
+ codifica parole o sintagmi citati o riportati, non
+ usati.
+ 言及された語句を示す.
+
+
+
+
+
+
+
+
+ There is thus a
+ striking accentual difference between a verbal form like eluthemen
+ we were released, accented on the second syllable of the
+ word, and its participial derivative lutheis
+ released, accented on the last.
+
+
+ Aucune ville ne répond mieux à
+ l'expressioin sortie de terre que New York
+ (ou faudrait-il plutôt dire jaillie) :
+
+
+ L’harmonisation
+ vocalique régressive empêche que agwêdê puisse être interprété comme
+ un dérivé de gwada, qui pourtant est de même racine.
+
+
+ 憂鬱的鬱字很難寫。
+
+
+
+
+
+ contains a word or phrase for which the author or narrator indicates a disclaiming of
+ responsibility, for example by the use of scare quotes or italics.
+ contient une expression ou un mot pour lesquels l'auteur
+ ou le narrateur renonce à toute responsabilité, par exemple en utilisant de l'italique ou des
+ guillemets.
+ contiene una palabra o frase de la que el autor o
+ narrador declina la responsabilidad, p.ej. mediante el uso de comillas o cursiva.
+ 作者或敘述者使用的字句在意義上另有所指的表現,例如:諷刺所使用的引號或斜體標示。
+ contiene una parola o sintagma per cui l'autore o il
+ narratore non assume la responsabilità intelletuale, segnalati ad esempio tramite l'uso di
+ virgolette o corsivi.
+ 著者や語り手が,責任を持ちたくない語句を示す.例えば,英語
+ 文化圏では,引用符号で囲んだり,イタリック体で示される部分.
+
+
+
+
+
+
+
+
+ To edge his way along
+ the crowded paths of life, warning all human sympathy to keep its distance, was what the
+ knowing ones call nuts to Scrooge.
+
+
+
+ - On ne
+ bouge pas, on ne touche à rien, il faut que je prévienne la Maison.
+ C'est ainsi qu'il appelait le Quai des Orfèvres.
+
+
+
+
Mais, après tout, les propos auxquels on mêlait son nom n'étaient que des propos ; du
+ bruit, des mots, des paroles, moins que des paroles, despalabres,
+ comme dit l'énergique langue du midi.
Terms, Glosses, Equivalents, and Descriptions
+ description
+ 기술
+ 描述
+
+ descripción
+ descrizione
+ description
+ contains a brief description of the object documented by its parent element, including its
+ intended usage, purpose, or application where this is appropriate.
+ 요소, 속성, 또는 속성 값의 목적과 적용에 대한 간단한 기술을 포함한다.
+ 包含一段簡短描述,說明一元素、屬性、或屬性值的應用與目的。
+ 当該要素,属性,属性値を採用した目的の簡単な解説を示す.
+ contient une courte description de l'objet documenté par
+ son élément parent, qui comprend son utilisation prévue, son but, ou son application là où c'est
+ approprié.
+ contiene una breve descripción del objetivo y la
+ aplicación de un elemento, atributo o valor de un atributo.
+ contiene una breve descrizione dello scopo o
+ dell'applicazione di un elemento, attributo, o valore di attributo.
+
+
+
+
+
+
+
+
+
+
+
+
+ contains a brief description of the purpose and application for an element, attribute,
+ attribute value, class, or entity.
+
+
+
+
+ contient une description brève de la raison d'être et du champ d'application d'un
+ élément, d'un attribut ou de la valeur d'un attribut, d'une classe ou une entité.
+
+
+
+
+ 包含某個元素或屬性之定義與用法的簡短描述。
+
+
+
+
TEI convention requires that this be expressed as a finite clause, begining
+ with an active verb.
+
+
+
La convention TEI exige que cela soit exprimé sous la forme d'une proposition finie,
+ introduite par un verbe actif.
+
+
+
La convención de TEI requiere que esto esté expresado como cláusula finita,
+ comenzando con un verbo activo.
+
+
+
TEIの慣習では,動詞を先頭にした文で表現される(訳注:英語で表現する 場合のこと).
+
+
+
+
+
+ glose
+ identifies a phrase or word used to provide a gloss or definition for some other word or
+ phrase.
+ 다른 단어나 구에 대한 해설 또는 정의를 제공할 때 사용되는 구나 단어를 표시한다.
+ 標明用來為另一個字詞下定義或提供註解的字詞。
+ 語句の説明や定義を示す.
+ identifie une expression ou un mot utilisé pour fournir
+ une glose ou une définition à quelque autre mot ou expression.
+ identifica una locución o palabra usada para proporcionar
+ una glosa o definición sobre otra palabra o frase.
+ identifica un sintagma o una parola che fornisce una
+ glossa o definizione per qualche altra parola o sintagma.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ We may define discoursal point of view as the relationship, expressed
+ through discourse structure, between the implied author or some other addresser, and the
+ fiction.
+
+
+
+ Les
+ embrayeurs sont une classe de mots dont le sens varie avec la situation; ces
+ mots, n'ayant pas de référence propre dans la langue, ne reçoivent un référent que
+ lorsqu'ils sont inclus dans un message.
+
+
+
+ 我們可以定義 戀母情結 為 佛洛伊德心理分析理論中的重要觀念,指三至六歲大的男孩在性慾上有一種戀母情結的階段,這情結更進一步發展成對父親的忌妒仇視,甚至亟欲除之而後快。
+
+
+
+
The target and cRef attributes are mutually exclusive.
+
+
+
Les attributs target et cRef sont exclusifs l'un de l'autre.
+
+
+
Los atributos blanco y cRef son mutuamente exclusivos.
+
+
+
属性targetとcRefは,排他的に使用される.
+
+
+
+
+
+
+ terme
+ contains a single-word, multi-word, or symbolic
+ designation which is regarded as a technical term.
+ 전문용어로 간주되는 단일어, 복합어, 기호적 명칭을 포함한다.
+ 包含作為專有名詞的一個單字、詞彙、或是表示符號。
+ 技術用語とされる単一語,複数語,記号表示を示す.
+ contient un mot simple, un mot composé ou un symbole,
+ qui est considéré comme un terme technique.
+ contiene una palabra simple, multipalabra o
+ designación simbólica que se considera como un término técnico.
+ contiene una parola singola, un'unità formata da più
+ parole, o una designazione simbolica che è considerata come un termine tecnico
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ A computational device that infers structure
+ from grammatical strings of words is known as a parser, and much of the history
+ of NLP over the last 20 years has been occupied with the design of parsers.
+
+
+
+
SGANARELLE.
+
Qui est causée par l'âcreté des humeurs engendrées dans la concavité du
+ diaphragme, il arrive que ces vapeurs... Ossabandus, nequeys,
+ nequer, potarinum, quipsa milus. Voilà justement ce qui fait que votre fille est muette.
+
+
+
+ D'après la
+ théorie d'Austin, les verbes performatifs seraient ceux qui non seulement
+ décrivent l'action de celui qui les utilise, mais aussi, et en même temps, qui impliqueraient
+ cette action elle-même.
+
+
+ 蜀漢後主劉禪 ,初名斗,字升之,後改名禪,字公嗣,蜀漢昭烈帝劉備之子,蜀漢末代皇帝,也是漢朝末代皇帝。
+
+
+ 在可攜式的裝置如數位相機、手持式電腦,及MP3播放機上,快閃記憶體(Flash
+ Memory)可以說是最普遍的儲存類型。
+
+
+ 賣空的對稱,買空亦稱多頭交易,是指交易者利用借入資金,在市場上買入期貨,以期將來價格上漲時,再高價拋出,從中獲利的投票活動。
+
+
+
+ We may define discoursal point of view as the relationship, expressed
+ through discourse structure, between the implied author or some other addresser, and the
+ fiction.
+
+
+
+ We may define discoursal point of view as the relationship, expressed
+ through discourse structure, between the implied author or some other addresser, and the
+ fiction.
+
+
+
+ We discuss Leech's concept of discoursal point of view below.
+
+
+
When this element appears within an index element, it is understood to supply the
+ form under which an index entry is to be made for that location. Elsewhere, it is understood
+ simply to indicate that its content is to be regarded as a technical or specialised term. It
+ may be associated with a gloss element by means of its ref attribute;
+ alternatively a gloss element may point to a term element by means of its
+ target attribute.
+
In formal terminological work, there is frequently discussion over whether terms must be
+ atomic or may include multi-word lexical items, symbolic designations, or phraseological
+ units. The term element may be used to mark any of these. No position is taken on the
+ philosophical issue of what a term can be; the looser definition simply allows the
+ term element to be used by practitioners of any persuasion.
+
As with other members of the att.canonical class, instances of
+ this element occuring in a text may be associated with a canonical definition, either by means
+ of a URI (using the ref attribute), or by means of some system-specific code value
+ (using the key attribute). Because the mutually exclusive target and
+ cRef attributes overlap with the function of the ref attribute, they
+ are deprecated and may be removed at a subsequent release.
+
+
+
+
+
+
+
Some Further Examples
Simple Editorial Changes
Apparent Errors
+ Latin for thus or so
+
+ du latin, ainsi
+
+ 原文照錄
+ contains text reproduced although apparently incorrect or inaccurate.
+ contient du texte reproduit quoiqu'il est apparemment
+ incorrect ou inexact
+ contiene texto reproducido aparentemente icorrecto o
+ inexacto.
+ 包含看似錯誤但仍照實轉錄的文字 。
+ contiene un frammento di testo riprodotto anche se
+ apparentemente errato o impreciso.
+ 明らかに間違い,不正確ではあるが,そのまま収録してあるテキスト.
+
+
+
+
+
+
+
+
+
+
+
+ for his nose was as sharp as
+ a pen, and a Table of green fields.
+
+
+ Des nuages, des
+ cyrrhus, des nimbus, des cumulus, tant qu'on en veut, et assurément plus que
+ n'en voulaient le maître et le serviteur.
+
+
+
Si on veut seulement attirer l'attention sur ce qui paraît être un problème dans la copie
+ du texte, sic est utilisé seul :
+ Tel est le
+ chat Rutterkin des sorcières Margaret et Filippa Flower, qui furent
+ prûléesbrûlées à Lincoln, le 11 mars 1619, pour avoir envoûté un parent du comte
+ de Rutland.
+
+
+
Il est également possible, en utilisant les éléments choice et corr, de
+ proposer une lecture corrigée :
+ Tel est le
+ chat Rutterkin des sorcières Margaret et Filippa Flower, qui furentprûléesbrûlées à Lincoln, le 11 mars 1619, pour avoir envoûté un parent du comte de
+ Rutland.
+
+
+ Ouvrage très
+ véridique et mirifique du Sieur Marcus Publius Dataficus du digne fils du seigneur comte,
+ vicomte, duc et archiduc Johannus de Bessinguya PercepteurPrecepteur du digne fils du seigneur comte, vicomte, duc et archiduc Johannus de
+ Bessinguya.
+
+
+
+ 賣饅頭的老頭,背著木箱子,裡邊裝著熱鰻魚,太陽一出來,就在街上叫喚。
+
+
+ 人們走起路來是快的,嘴裡邊的呼吸,一遇到了嚴肅好像冒著煙似的。
+
+
+
+ 人們走起路來是快的,嘴裡邊的呼吸,一遇到了嚴肅嚴寒 好像冒著煙似的。
+
+
+ 賣饅頭的老頭,背著木箱子,裡邊裝著熱鰻魚饅頭,太陽一出來,就在街上叫喚。
+
+
+
If all that is desired is to call attention to the apparent problem in the copy text,
+ sic may be used alone:
+ I don't know, Juan. It's so far in the past now
+ — how we can prove or disprove anyone's theories?
+
+
+
It is also possible, using the choice and corr elements, to provide a
+ corrected reading:
+ I don't know, Juan. It's so far in the past now
+ — how we cancan we prove or disprove anyone's theories?
+
+
+ for his nose was as sharp as
+ a pen, and a Tablea' babbld of green fields.
+
+
+
+
+
+ correction
+ 정정
+ 更正
+ corrección
+ correzione
+ contains the correct form of a passage apparently erroneous in the copy text.
+ 복사된 텍스트에서 오류로 보이는 단락의 정정 형식을 포함한다.
+ 包含文本中看似錯誤並加以更正過後的文字。
+ 元資料中の明らかな間違いを正したものを示す.
+ contient la forme correcte d'un passage
+ qui est considéré erroné dans la copie du texte.
+ contiene la forma correcta de un pasaje aparentemente erróneo en el texto de copia.
+ contiene la forma corretta di un brano apparentemente erroneo nel testo copia.
+
+
+
+
+
+
+
+
+
+
+
+
If all that is desired is to call attention to the
+ fact that the copy text has been corrected, corr may be used alone:
+ I don't know,
+ Juan. It's so far in the past now — how can we prove
+ or disprove anyone's theories?
+
+
+
Si l'on veut mettre l'accent sur le fait que le texte a été corrigé, corr seul
+ sera employé:
+ Tel est le
+ chat Rutterkin des sorcières Margaret et Filippa Flower, qui
+ furent brûlées à Lincoln, le 11 mars 1619, pour avoir envoûté un parent du comte de
+ Rutland.
+
+
+
Il est aussi possible d'associer choice etsic, pour donner une lecture
+ incorrecte :
+ Tel est le
+ chat Rutterkin des sorcières Margaret et Filippa Flower, qui furentprûléesbrûlées à Lincoln, le 11 mars 1619, pour avoir envoûté un parent du comte de
+ Rutland.
+
+
+
+ 不怨天,不尤人。下學而上達。知我 者,其天乎!
+
+
+
+ 不怨天,不尤人。下學而上達。我知知我者,其天乎!
+
+
+
It is also possible, using the choice and
+ sic elements, to provide an uncorrected reading:
+ I don't know, Juan. It's so far in the past now —
+ how we cancan we prove or
+ disprove anyone's theories?
+
+
+
+
+
+ choix
+ groups a number of alternative encodings for the same point in
+ a text.
+ 텍스트 동일 지점에서 대체 가능한 부호화를 모아 놓는다.
+ 匯集文件中對於同一部分文字所有可供替換的不同標記。
+
+ テキスト中の同じ場所で,異なる符号化記述をまとめる.
+ regroupe un certain nombre de balisages alternatifs possibles
+ pour un même endroit dans un texte.
+ agrupa un número de codificaciones alternativas para el mismo punto en un texto.
+ raggruppa un numero di codifiche alternative per la stessa porzione di testo.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
An American encoding of
Gulliver's Travels which
+ retains the British spelling but also provides a version
+ regularized to American spelling might be encoded as follows.
+
+
Lastly, That, upon his solemn oath to observe all the above
+ articles, the said man-mountain shall have a daily allowance of
+ meat and drink sufficient for the support of 17241728 of our subjects,
+ with free access to our royal person, and other marks of our
+ favourfavor.
+
+
+
+
+
L'encodage d'une édition des
Essais pourra faire état à la fois des formes
+ originales et des formes modernisées correspondantes:.
+
+
Ainsi lecteur, je suismoy-mesmesmoi-même la matière de mon livre : ce n'est pas raison que tu emploies ton loisir en un subjectsujetsi frivole et si vain.
Because the children of a choice element all
+ represent alternative ways of encoding the same sequence, it is
+ natural to think of them as mutually exclusive. However, there may
+ be cases where a full representation of a text requires the
+ alternative encodings to be considered as parallel.
+
Note also that choice elements may self-nest.
+
Where the purpose of an encoding is to record multiple
+ witnesses of a single work, rather than to identify
+ multiple possible encoding decisions at a given point, the
+ app element and associated elements discussed in section
+ should be preferred.
+
+
+
Parce que les éléments contenus par un élément choice correspondent tous à des solutions
+ possibles pour encoder la même séquence, il est naturel de les envisager comme
+ exclusifs les uns des autres. Toutefois il peut y avoir des cas où la pleine
+ représentation d'un texte requiert de considérer ces encodages alternatifs comme
+ parallèles.
+
A Noter aussi que les choice peuvent s'imbriquer.
+
Pour une version de choice spécialisée pour l'encodage de témoins multiples
+ d'une même oeuvre, l'élément app peut etre préférable : voir la section .
+
+
+
Porque los niños de un elemento opción representan las maneras alternativas de codificar la misma secuencia, es natural pensar en ellas como mutuamente exclusivas.
+ Sin embargo, puede haber casos donde una representación completa de un texto requiera que las codificaciones alternativas sean consideradas como paralelas.
+
Se Observa también que los elementos opción pueden ser uno mismo-jerarquía.
+
Para una versión especializada de la opción para codificar los testimonios múltiples de un único trabajo, ver la sección .
Regularization and
+Normalization
+ regularization
+ 정규화
+ 一般化
+
+ régularisation
+ regularización
+ regolarizzazione
+ contains a reading which has been regularized or normalized in some sense.
+ 어떤 면에서 정규화 또는 표준화된 해석을 포함한다.
+ 標誌一般化或規格化處理過的文字。
+ 正規化された読みを示す.
+ contient une partie qui a été régularisée ou normalisée
+ de façon quelconque
+ contiene una lectura que ha sido regularizada o
+ normalizada en algún sentido.
+ contiene una lettura è stata regolarizzata o
+ normalizzata in qualche modo.
+
+
+
+
+
+
+
+
+
+
+
+
+
If all that is desired is to call attention to the fact that the copy text has been
+ regularized, reg may be used alone:
+
+ Please knock if an answer is required
+
+
+
+
+
+
Si on veut attirer l'attention sur le fait que le texte a été régularisé, reg est
+ utilisé seul :
+
+ Maître Corbeau sur un arbre perché,
+ Tenait en son bec un fromage.
+
+
+
+
Il est également possible d'identifier l'auteur de la régularisation, et avec les éléments
+ choice etorig, donner à la fois la lecture originale et la lecture
+ régularisée.:
+
+ MaistreMaîtreCorbeau sur un arbre perché,
+ TenoitTenait en son bec un fromage.
+
+
+
+
+ 你已經計劃我們下週旅遊的計畫了嗎?
+
+
+
+
+ 你已經 計劃計畫 我們 下週下周 旅遊的 計畫計劃了嗎?
+
+
+
+
+
It is also possible to identify the individual responsible for the regularization, and,
+ using the choice and orig elements, to provide both the original and
+ regularized readings:
+
+ Please knockcnk if an answernsr is requiredreqd
+
+
+
+
+
+
+
+
+ original form
+ 원형식
+ 原文格式
+ forme originale
+ forma original
+ forma orininaria
+ contains a reading which is marked as following the original, rather than being normalized
+ or corrected.
+ 표준화 또는 수정된 것이 아닌 원형식을 따르는 해석을 포함한다.
+ 標誌原文中呈現的文字,並且未經過任何修改或規格化處理。
+ 正規化または校正は施されていない,元の形のまま符号化されている読みを 示す.
+ contient une partie notée comme étant fidèle à
+ l'original et non pas normalisée ou corrigée.
+ contiene una lectura que se marca como fiel al
+ original.
+ contiene una lettura codificata come conforme
+ all'originale piuttosto che ad una versione normalizzata o corretta
+
+
+
+
+
+
+
+
+
+
+
+
If all that is desired is to call attention to the original version in the copy text,
+ orig may be used alone:
+
+ But this will be a meere confusion
+ And hardly shall we all be vnderstoode
+
+
+
+
+
Si on veut privilégier la version originale du texte, orig sera utilisé seul:
+
+
si mes pensées se sont entretenues des occurences estrangieres quelque
+ partie du temps, quelque autre partie je les rameine à la promenade, au
+ vergier, à la douceur de cette solitude et à moy.
+
+
+
+
Généralement, orig sera associé à la forme corrigée dans un élément
+ choice.
+
+ Un bienfait perd sa grâce à le trop oublierpublier ;
+ Qui veut qu'on s'en souvienne, il le faut publieroublier.
+
+
+
+
+ 妹子是被大哥喫了,母親知道沒有,我可不得而知。
+ 母親想也知道;不過哭的時候,卻并沒有說明,大約也以為應當的了。
+
+
+
+
+ 妹子是被大哥喫吃 了,母親知道沒有,我可不得而知。
+ 母親想也知道;不過哭的時候,卻 并並沒有說明,大約也以為應當的了。
+
+
+
+
More usually, an orig will be combined with a regularized form within a
+ choice element:
+
+ But this will be a meeremere confusion
+ And hardly shall we all be vnderstoodeunderstood
+
+
+
+
+
+
+
+
Additions, Deletions, and Omissions
+ omission
+ indicates a point where material has been omitted in a transcription, whether for editorial
+ reasons described in the TEI header, as part of sampling practice, or because the material is
+ illegible, invisible, or inaudible.
+ 텍스트 선정 시 TEI 헤더에 기술된 편집 기준 때문에, 또는 읽고 듣기 어렵기 때문에 사본에서 누락된
+ 지점을 가리킨다.
+ 指出轉錄時被省略部分的位置,省略也許是出於
+ TEI標頭裡描述的編輯上的理由、也許是因為抽樣轉錄而省略、或是因為資料不明難以辨認或聽懂。
+ TEIヘダーにある編集上の理由,または当該資料が判読できない・聞こえな
+ いことを理由に,転記の際に省略された部分の場所を示す.
+ indique une omission dans une transcription, soit pour
+ des raisons éditoriales décrites dans l'en-tête TEI au cours d’un échantillonnage, soit parce
+ que le matériau est illisible ou inaudible.
+ indicada un punto donde algún material ha sido omitido en
+ una transcripción, bien por criterios de edición descritos en el cabezado TEI, bien como parte
+ de una práctica habitual, o bien porqué el material es ilegible o incomprensible.
+ indica un punto in cui del materiale è stato omesso dalla
+ trascrizione, sia per ragioni editoriali descritte nell'intestazione TEI, come pratica di
+ campionatura, sia perché il materiale è illegibile o incomprensibile.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ gives the reason for omission. Sample values include sampling,
+ inaudible, irrelevant, cancelled.
+ 누락의 이유를 제시한다. 그 값의 예들은 다음과 같다: sampling,
+ illegible, inaudible, irrelevant, cancelled,
+ cancelled and illegible.
+ 說明省略的原因。屬性值的例子有sampling、、inaudible、irrelevant、cancelled、cancelled
+ and illegible。
+ 省略の理由を示す.例えば, 見本, 聞こえない,
+ 無関係, 取り消し, 取り消しがありかつ判読できない,など.
+ donne la raison de l'omission. Les valeurs
+ d'échantillon comprennent échantillonnage, illisible,
+ inaudible, non pertinent, biffé, biffé et
+ illisible.
+
+ declara la causa de la omisión. Los valores de
+ muestra incluyen sampling (ejemplificación), inaudible (inaudible),
+ irrelevant (irrelevante), cancelled (cancelado), cancelled and
+ illegible (cancelado e ilegible).
+ indica il motivo dell'omisione. Fra i valori
+ possibili ci sono campionatura, incomprensibile,
+ irrilevante, cancellato, cancellato e illegibile.
+
+
+
+ in the case of text omitted from the transcription because of deliberate deletion by an
+ identifiable hand, indicates the hand which made the deletion.
+ 어떤 특정 수작업자가 의도적으로 전사본에서 생략된 텍스트의 경우, 그 생략의 장본인을 표시한다.
+ 若省略的內容是被身分明確的抄寫員由轉錄當中刻意刪除,則在此表明抄寫員的身分。
+ 特定可能な筆致による熟慮した削除の場合,転記の際にその筆致を示す.
+ lorsque du texte est omis de la transcription en
+ raison d'une suppression volontaire par une main identifiable, indique quelle est cette
+ main.
+ en el caso de texto omitido en la transcripción a
+ causa de una supresión deliberada por una mano identidicada, indica la mano que ha ejecutado
+ la omisión.
+ nel caso in cui il testo sia stato volontariamente
+ omesso dalla trascrizione da una mano identificabile, indica la mano autrice dell'omissione
+
+
The hand responsible for the deletion
+ should be specified on a surrounding del element rather than directly on the
+ gap element.
+
+
+
+ in the case of text omitted because of damage, categorizes the cause of the damage, if
+ it can be identified.
+ 훼손으로 인해 누락된 텍스트의 경우, 확인이 가능하다면 그 훼손 원인을 분류하여 기술한다.
+ 若省略是由於內容遭受損毀,且可識別損毀原因,則針對損毀原因加以分類。
+ 損傷が原因のテキスト省略の場合,特定可能であれば当該損傷を分類する.
+ lorsque du texte est omis de la transcription en
+ raison d'un dommage, catégorise la cause du dommage, si celle-ci peut être identifiée.
+ En el caso de texto omitido a causa de algún daño,
+ identifica (si es posible) la causa de tal daño.
+ nel caso in cui il testo sia stato omesse a causa di
+ danneggiamento, indica la causa del danno qualora possa essere identificata.
+
+
+
+ damage results from rubbing of the leaf edges
+ 책장 모서리 마모로 인한 훼손
+ 損毀起因於書頁邊緣摩擦受損
+ daños resultantes del frotamiento de los bordes
+ de la hoja
+ 葉のこすれによる損傷.
+ dégâts provoqués par le frottement des bords de
+ la feuille.
+ il danno è causato da segni di strofinamento sui
+ bordi del foglio
+
+
+ damage results from mildew on the leaf surface
+ 곰팡이로 인한 책장 표면의 훼손
+ 損毀起因於書頁表面發霉
+ daños resultantes de la acción del moho en la
+ superficie de la hoja
+ 葉の表面に付いた白カビによる損傷.
+ dégâts provoqués par de la moisissure sur la
+ surface de feuille.
+ il danno è causato da macchie di umido sulla
+ superficie del foglio
+
+
+ damage results from smoke
+ 연기로 그을린 훼손
+ 損毀起因於煙燻
+ daños provocados porl humo
+ 煙による損傷.
+ dégâts provoqués par de la fumée.
+ il danno è causato dal fumo
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
The gap, unclear, and del core tag elements may be closely allied
+ in use with the damage and supplied elements, available when using the
+ additional tagset for transcription of primary sources. See section
+ for discussion of which element is appropriate for which circumstance.
+
The gap tag simply signals the editors decision to omit or inability to transcribe a span of
+ text. Other information, such as the interpretation that text was deliberately erased or covered, should be
+ indicated using the relevant tags, such as del in the case of deliberate deletion.
+
+
+
Les éléments du jeu de balises de base gap, unclear, et del
+ peuvent être étroitement associés avec l'utilisation des éléments damage et
+ supplied qui sont disponibles si l'on utilise le jeu de balises additionnel pour la
+ transcription des sources primaires. Voir la section pour plus de
+ détails sur l'élément le plus pertinent suivant les circonstances.
+
+
+
El gap, unclear, y los elementos de la etiqueta base pueden funcionar
+ con los elementos de daño y elementos de supresión, disponibles al usar el
+ conjunto de etiquetas adicional para la transcripción de las fuentes primarias. Ver la sección
+ para la discusión cuyo el elemento es apropiado para qué
+ circunstancia.
+
+
+
+
+
+ addition
+ 삽입, 첨가
+ 插入
+ ajout
+ adición
+ aggiunta
+ contains letters, words, or phrases inserted in the source
+ text by an author, scribe, or a previous annotator or corrector.
+ 저자, 전사자, 부호화 작업자 또는 수정작업자에 의해 텍스트에 삽입된 문자, 단어, 또는 구를 포함한다.
+ 包含由作者、抄寫者、註解者、或更正者在文本中插入的字母、單字或詞彙。
+ 著者,筆写者,注釈者,校正者による,文字,単語,句レベルでのテキスト
+ 挿入を示す.
+ contient des lettres,
+ des mots ou des phrases insérés dans le texte par un auteur, un
+ copiste, un annotateur ou un correcteur.
+ contiene letras,
+ palabras o frases introducidas en el texto por el autor,
+ transcriptor, glosador o corrector.
+ contiene lettere,
+ parole o frasi inserite in un testo da un autore, copista,
+ commentatore o correttore.
+
+
+
+
+
+
+
+
+
+
+
+ The story I am
+ going to relate is true as to its main facts, and as to the
+ consequences of these facts from which
+ this tale takes its title.
+
+
+
In a diplomatic edition attempting to represent an original
+ source, the add element should not be used for additions
+ to the current TEI electronic edition made by editors or encoders.
+ In these cases, either the corr or supplied
+ element are recommended.
+
In a TEI edition of a historical text with previous editorial
+ emendations in which such additions or reconstructions are
+ considered part of the source text, the use of add may be
+ appropriate, dependent on the editorial philosophy of the
+ project.
+
+
+
Dans une édition diplomatique souhaitant representer une source
+ originalle, l'élément add ne sera pas utilisé pour les
+ ajouts effectués par les éditeurs ou les encodeurs. Dans ce cas, on
+ va préféra soit l'élément corr soit l'élément
+ supplied.
+
+
+
El elemento addición no se debe utilizar para las
+ adiciones hechas por los editores o los codificadores. En estos
+ casos, cualquiera de los elementos corr o supplied
+ son más convenientes.
+
+
+
+
+
+ deletion
+ 삭제
+ 刪除
+ suppression
+ cancelación
+ cancellatura
+ contains a letter, word, or passage deleted, marked as deleted, or otherwise indicated as
+ superfluous or spurious in the copy text by an author, scribe, or a previous annotator or corrector.
+ 삭제된 것으로 표시되었거나, 저자, 전사자, 부호화자 또는 수정작업자에 의해 사본 텍스트에서
+ 불필요하거나 위조된 것으로 표시되어 삭제된 문자, 단어, 단락을 포함한다.
+ 標記在文本中,由作者、抄寫者、註解者、或更正者刪除、標上刪除記號、或者標明為多餘或偽造的字母或單字。
+ 著者・筆写者・注釈者・校正者により,削除または削除として符号化または
+ 余分なものまたは間違いとして示されている,文字,単語,句を示す.
+ contient une lettre, un mot ou un passage supprimé,
+ marqué comme supprimé, sinon indiqué comme superflu ou erroné dans le texte par un auteur, un
+ copiste, un annotateur ou un correcteur.
+ contiene una letra, palabra o pasaje cancelado, marcado
+ como omitido o bien como supérfluo o espurio en el texto por el autor, transcriptor, glosador o
+ corrector.
+ contiene un carattere, parola o brano cancellati,
+ codificati come cancellati, o altrimenti indicati come superflui o spuri, nella copia originale
+ da parte di un autore, copista, commentatore o correttore.
+
+
+
+
+
+
+
+
+
+
+
+ Mein Frisch schwebt
+ weht der Wind
+
+
+
+
+
+
+
+
+
+
+
+
[...] mais il y reste quelque chose de mystérieux, de furtif. Je On cesse un instant d'y penser; les mes yeux se
+ ferment ou s'attardent sur se détournent sur un livre... On
+ relève la tête: il est là
+
+
+
+
+ 雨 風 飄 吹來涼爽。
+
+
+
+
This element should be used for deletion of shorter sequences of text, typically single words
+ or phrases. The delSpan element should be used for longer sequences of text, for
+ those containing structural subdivisions, and for those containing overlapping additions and
+ deletions.
+
The text deleted must be at least partially legible in order for the encoder to be able to
+ transcribe it (unless it is restored in a supplied tag). Illegible or lost text within a
+ deletion may be marked using the gap tag to signal that text is present but has not
+ been transcribed, or is no longer visible. Attributes on the gap
+ element may be used to indicate how much text is omitted, the reason for omitting it, etc. If
+ text is not fully legible, the unclear element (available when using the additional
+ tagset for transcription of primary sources) should be used to signal the areas of text which
+ cannot be read with confidence in a similar way.
+
Degrees of uncertainty over what can still be read, or whether a deletion was intended may be
+ indicated by use of the certainty element (see ).
+
There is a clear distinction in the TEI between del
+ and surplus on the one hand and gap or
+ unclear on the other. del indicates a
+ deletion present in the source being transcribed, which states
+ the author's or a later scribe's intent to cancel or remove
+ text. surplus indicates material present in the source
+ being transcribed which should have been so
+ deleted, but which is not in fact. gap or unclear, by contrast, signal an
+ editor's or encoder's decision to omit something or their
+ inability to read the source text.
+ See sections and for the relationship between these and other
+ related elements used in detailed transcription.
+
+
+
Cf. gap.
+
Les degrés d'incertitude sur ce qui est encore lisible peuvent être indiqués par l'emploi de
+ l'élément certainty (voir ).
+
Cet élément doit être utilisé pour la suppression de courtes séquences de texte, généralement
+ des mots ou des expressions. Il faut utiliser l'élément delSpan pour les séquences de
+ texte plus longues, celles qui contiennent des divisions structurelles, et celles qui
+ contiennent un chevauchement d'ajouts et de suppressions.
+
Le texte supprimé doit être au moins partiellement lisible, afin que l'encodeur soit en
+ mesure de le transcrire. La partie illisible du texte à l'intérieur d'une suppression peut être
+ marquée au moyen de la balise gap pour signaler la présence de texte non transcrit.
+ La quantité de texte omise, la raison de l'omission, etc., peuvent être indiquées au moyen des
+ attributs de l'élément gap. Si le texte n'est pas entièrement lisible, l'élément
+ unclear (disponible avec le jeu additionnel de balises pour la transcription des
+ sources primaires) doit être utilisé pour signaler les zones de texte ne pouvant pas être lues
+ de manière fiable. Voir les sections suivantes et, pour l'association
+ étroite entre les balises del et gap, damage, unclear et
+ supplied (ces trois dernières balises étant disponibles avec le jeu additionnel de
+ balises pour la transcription de sources primaires), voir la section .
+
La balise del ne doit pas être utilisée pour les suppressions par des éditeurs
+ scientifiques ou des encodeurs. Dans ce cas, il faut utiliser soit la balise corr,
+ soit la balise gap.
+
+
+
+
+
+ incertain
+ contains a word, phrase, or passage which cannot be transcribed with certainty because it
+ is illegible or inaudible in the source.
+ 원본에서 읽거나 듣기 어려워서 분명하게 전사할 수 없는 단어, 구, 단락들을 포함한다.
+ 在來源文本中難以辨認或聽懂而無法確實轉錄的單字、詞組、或段落。
+ 元資料からは判読できないまたは聞こえないという理由で,確実に転記でき ない語句や一節を示す.
+ contient un mot, une expression ou bien un passage qui
+ ne peut être transcrit avec certitude parce qu'il est illisible ou inaudible dans la source.
+ contiene una palabra, frase o pasaje que no puede ser
+ transcita con certeza, ya que en la fuente es ilegible o incomprensible.
+ contiene una parola, una frase o un brano che non può
+ essere trascritto con certezza perché è parzialmente illeggibile o incomprensibile
+ nell'originale.
+
+
+
+
+
+
+
+
+
+
+
+ indicates why the material is hard to transcribe.
+ 전사하기 어려운 이유를 표시한다.
+ 指出資料難以轉錄的原因。
+ 当該資料から転記が困難である理由を示す.
+ indique pourquoi il est difficile de transcrire
+ le document
+ indica por qué el material es difícl de
+ transcribir.
+ indica la ragione per la quale è difficile
+ trascrivere il brano.
+
+
+
+
+ Rx
+
500 mg placebo
+
+
+
+
+
One or more words may be used to describe the reason;
+usually each word will refer to a single cause. Typical examples might
+thus include faded, illegible, eccentric_ductus
+ background_noise, passing_truck,etc.
+
+
+
+ Where the difficulty in transcription arises from action (partial deletion, etc.)
+ assignable to an identifiable hand, signifies the hand responsible for the action.
+ 알려진 인물의 부분적 삭제 등의 작업으로 인하여 전사가 어려운 경우, 그 행위에
+ 책임이 있는 인물을 표시한다.
+ 若轉錄困難是由身分明確的執行者所造成 (例如部分刪除),則在此表明執行者的身分。
+ ある行為(例えば部分的削除など)により転記が困難である時,その筆致
+ が特定可能である場合,当該行為に責任のある筆致を特定する.
+ lorsque la difficulté de transcription vient
+ d'une action attribuable à une main identifiable (suppression partielle, etc.),
+ indique quelle est cette main
+ donde surge la dificultat en la transcripción
+ por una acción (cancelación parcial, etc.) que se puede asignar a una mano
+ identificable, significa la mano responsable de dicha acción.
+ qualora la difficoltà nella trascrizione emerga
+ dall'azione (parziale cancellazione, ecc.) ascrivibile ad una mano identificabile,
+ indica la mano responsabile dell'azione.
+
+
The hand causing the difficulty in reading the transcription
+ should be specified on a surrounding del element rather than directly on the
+ unclear element.
+
+
+
+ Where the difficulty in transcription arises from damage, categorizes the cause of
+ the damage, if it can be identified.
+ 훼손으로 인해서 전사가 어려운 경우, 식별 가능하다면 훼손 원인을 분류하여 기술한다.
+ 若因為內容遭受損毀而引起轉錄困難,且可辨別出損毀的導因,則在此加以說明。
+ 損傷により転記が困難である時,その損傷の理由が分類できる場合には, それを特定する.
+ lorsque la difficulté de transcription vient
+ d'un dommage, catégorise la cause du dommage si celle-ci peut être identifiée
+ donde surge la dificultad en la transcripción a
+ causa de un daño, categoriza, si puede ser identificada, la causa de tal daño.
+ qualora la difficoltà nella trascrizione emerga
+ da danneggiamento, indica la causa del danno qualora possa essere identificata.
+
+
+
+ damage results from rubbing of the leaf edges
+ 책장 모서리의 마모로 인한 훼손
+ 損毀起因於書頁邊緣摩擦受損
+ daños resultantes del frotamiento de
+ los bordes de la hoja
+ 葉の端がこすれたことによる損傷.
+ des dommages résultent du frottement
+ des bords de la feuille
+ il danno è causato da segni di
+ strofinamento sui bordi del foglio
+
+
+ damage results from mildew on the leaf surface
+ 곰팡이로 인한 책장의 훼손
+ 損毀起因於書頁表面發霉
+ daños provocados por el moho existente
+ en la superficie de la hoja
+ 葉の表面に白カビがあることによる損傷.
+ des dégâts résultent de la moisissure
+ sur la surface de la feuille
+ il danno è causato da macchie di umido
+ sulla superficie del foglio
+
+
+ damage results from smoke
+ 연기로 그을린 훼손
+ 損毀起因於煙燻
+ daños provocados por el humo
+ 煙による損傷.
+ des dégâts résultent de la fumée
+ il danno è causato dal fumo
+
+
+
+
+
+
+ Envoyez-moi une épreuve W
+
+
+
+
+
+ and from time to time invited in like manner
+his attention
+
+
Dans ce cas, les lettres à la fin du mot sont difficiles à lire.
+
+
+
+ ...and then Nathalie said ...
+
+
+
+
The same element is used for all cases of uncertainty in the transcription of element
+ content, whether for written or spoken material. For other aspects of certainty,
+ uncertainty, and reliability of tagging and transcription, see chapter .
+
The damage, gap, del, unclear and supplied
+ elements may be closely allied in use. See section for
+ discussion of which element is appropriate for which
+ circumstance.
+
The hand attribute points to a definition of the hand
+concerned, as further discussed in section .
+
+
+
+
Le même élément est utilisé pour tous les cas d'incertitude portant sur la transcription
+ du contenu d'éléments, qu'il s'agisse de documents écrits ou oraux. Pour les autres
+ aspects concernant la certitude, l'incertitude, et la fiabilité du balisage et de la
+ transcription, voir le chapitre .
+
Les éléments damage, gap, del, unclear et
+ supplied peuvent être utilisés en étroite conjonction. Voir la section pour
+ plus de détails sur l'élément le plus pertinent en fonction des circonstances.
要素damage, gap, del, unclear,
+ suppliedは,同時に使用されるかもしれない.どの場合にどの 要素が適切であるかについては,を参照のこと.
+
+
+
+
+
+
+
Names, Numbers, Dates, Abbreviations, and Addresses
Referring Strings
+ name, proper noun
+ 이름, 고유명사
+ 名稱,特定名稱
+ nom, nom propre
+ nombre, nombre propio
+ nome, nome proprio
+ contains a proper noun or noun phrase.
+ 고유명사 또는 명사구를 포함한다.
+ 包含一個特定名稱 或名詞詞組。
+ 固有名詞.
+ contient un nom propre ou un syntagme nominal.
+ contiene un nombre propio o un sintagma nominal
+ contiene un nome proprio o un sintagma nominale.
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Thomas Hoccleve
+ Villingaholt
+ Vetus Latina Institut
+ Occleve
+
+
+
+
Proper nouns referring to people, places, and organizations may be tagged instead with
+ persName, placeName, or orgName, when the TEI module for
+ names and dates is included.
+
+
+
Les noms propres relatifs aux personnes, aux lieux et aux organismes peuvent également
+ être balisés à l'aide de persName, placeName, ou orgName,
+ lorsque le module TEI concernant les noms et dates est inclus.
+
+
+
+
+
+ referencing string
+ chaîne de référence
+ serie referencial
+ 參照字串
+ stringa di riferimento
+ 参照文字列
+ contains a general purpose name or referring string.
+ contient un nom générique ou une chaîne permettant de
+ s'y référer.
+ contiene un nombre de intención general o una serie
+ referencial.
+ 包含一般名稱或參照字串。
+ contiene un nome generico o una stringa di riferimento
+ 一般的な意味での名前や参照文字列.
+
+
+
+
+
+
+
+
+
+
+
+ My dear Mr. Bennet, said his lady
+ to him one day, have you heard that Netherfield Park is let at
+ last?
+
+
+
+
+
La famille s'était alors retirée en banlieue, à Villemomble, mais
+ Alfred aimait se rendre à Paris et un jour de 1917 alors qu'il sortait de la maison des
+ Arts et Métiers il était tombé inanimé dans la rue.
Addresses
+ electronic mail address
+ 전자우편 주소
+
+ dirección de correo electrónico
+ adresse de courrier électronique
+ indirizzo di posta elettronica
+ contains an email address identifying a location to which
+ email messages can be delivered.
+ 전자우편 메시지가 전달되는 위치를 식별하는 전자우편 주소를 포함한다.
+ 包含一個電子郵件位址,標明電子郵件訊息可傳送的位置。
+ eメールを届けるeメールアドレスを示す.
+ contient l'adresse de courriel identifiant un
+ emplacement où un courriel peut être envoyé.
+ localizza un indirizzo di posta elettronica al quale possono essere inviati dei messaggi di posta elettronica
+ contiene una dirección de correo electrónico indentificando el lugar dónde los mensajes electrónicos pueden ser enviados.
+
+
+
+
+
+
+
+
+
+ membership@tei-c.org
+
+
+
+
+ membership@tei-c.org
+
+
+
+
The format of a modern Internet email address is defined in
+ RFC 2822
+
+
+
+
Le format d'une adresse de courrier électronique internet moderne est défini dans la
+ RFC 2822
+
+
+
+
+
+
+ contains a postal address, for example of a publisher, an organization, or an
+ individual.
+ 예를 들어, 출판사, 기관, 개인의 우편 주소를 포함한다.
+ 包含出版者、機構、或是個人的郵寄地址或其他地址。
+ 郵便配達情報を示す.例えば,出版者,組織,個人の住所など.
+ contient une adresse postale ou d'un autre type, par exemple l'adresse d'un
+ éditeur, d'un organisme ou d'une personne.
+ contiene una dirección postal, por ejemplo de un editor, una institución,
+ etc.
+ contiene un indirizzo (postale), ad esempio di un editore, di un'organizzazione, di
+ un individuo.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ via Marsala 24
+ 40126
+ Bologna
+ Italy
+
+
+
+
+
+
+ Centre d'Études Supérieures de la Renaissance
+ 59, rue Néricault-Destouches
+ 37013
+TOURS
+ France
+
+
+
+
+
+
+ 邯郸路220号
+ 200433
+ 上海市
+ 中華人民共和國
+
+
+
+
+
+
+ 沙田
+ 新界
+ 香港特別行政區
+ 中華人民共和國
+
+
+
+
+
+
+ Computing Center, MC 135
+ P.O. Box 6998
+ Chicago, IL 60680
+ USA
+
+
+
+
+
+
+
+ Lyon
+ 69002
+ IIème
+ Perrache
+ 30, Cours de Verdun
+
+
+
+
+
This element should be used for postal addresses only. Within it, the generic element addrLine may
+ be used as an alternative to any of the more specialized elements available from the model.addrPart class, such as street, postCode etc.
+
+
+
Cet élément ne doit être utilisé que pour donner une adresse postale. A l'intérieur de cet élément,
+ l'élément générique addrLine peut être utilisé comme élément alternatif aux éléments plus spécialisés de la classe
+ model.addrPart class, tels que street, postCode etc.
+
+
+
+
+
+
+
+ address line
+ 주소 행
+
+ dirección
+ ligne d'adresse
+ riga dell'indirizzo
+ contains one line of a postal address.
+ 우편 주소의 한 행을 포함한다.
+ 包含郵寄地址或其他地址其的一行。
+ 住所情報を記述する行を示す.
+ contient une ligne d'adresse postale.
+ contiene una línea de la dirección postal.
+ contiene una riga di un indirizzo (postale).
+
+
+
+
+
+
+
+
+
+
+ Computing Center, MC 135
+ P.O. Box 6998
+ Chicago, IL
+ 60680 USA
+
+
+
+
+
+
+ (201) 555 0123
+
+
+
+
+
+
+ 44, avenue de la Libération
+ B.P. 30687
+ F 54063 NANCY CEDEX
+ FRANCE
+
+
+
+
+
+
+ 276號4樓
+ 光明路
+ 北投區,台北市11246
+ 台灣,中華民國
+
+
+
+
+
Addresses may be encoded either as a sequence of lines, or
+ using any sequence of component elements from the model.addrPart class. Other non-postal forms
+ of address, such as telephone numbers or email, should not be
+ included within an address element directly but may be
+ wrapped within an addrLine if they form part of the
+ printed address in some source text.
+
+
+
Les adresses peuvent être encodées soit comme une suite de
+ lignes, soit en utilisant un jeu d'éléments de la classe model.addrPart. Les types d'adresses autres
+ que l'adresse postale, tels que les numéros de téléphone, les
+ courriels, ne doivent pas être inclus directement à l'intérieur
+ d'un élément address mais peuvent être contenus dans un
+ élément addrLine s'ils font partie de l'adresse imprimée
+ dans un texte source.
+
+
+
+
+
+
+
+ contains a full street address including any name or number identifying a
+ building as well as the name of the street or route on which it is
+ located.
+ 거리 또는 도로 이름을 비롯하여 건물을 식별할 수 있는 이름 및 번지를 포함하는 전체 주소.
+ 完整的街道地址,包含任何名稱或數字,用以識別一棟建築物以及所在街道名稱。
+ 住所情報としての,通りを表す完全情報を示す.建物の名前や番号,通りの
+ 名前など.
+ adresse complète d'une rue comprenant un nom
+ ou un numéro identifiant un bâtiment ainsi que le nom de la rue ou du chemin sur laquelle
+ il est situé.
+ una dirección postal completa, incluyendo cualquier nombre o número identificativo para identificar el edifio, como el nombre de la calle o carretera.
+ indirizzo postale completo, incluso il nome o il numero che identifica l'edificio, così come il nome della strada dove è situato.
+
+
+
+
+
+
+
+
+
+ via della Faggiola, 36
+
+
+
+
+ 110, rue de Grenelle
+
+
+
+
+ 36, quai des Orfèvres
+
+
+
+
+ 天津街25號
+
+
+
+
+ 皇后大道東123號灣仔大廈
+
+
+
+
+
+ Duntaggin, 110 Southmoor Road
+
+
+
+
The order and presentation of house names and numbers and
+ street names, etc., may vary considerably in different countries. The
+ encoding should reflect the order which is appropriate in the country
+ concerned.
+
+
+
L'ordre et la présentation des noms et numéros de maisons et des noms de rues, etc.
+ L'encodage peut varier considérablement selon les pays ; il devrait reprendre la disposition
+ propre au pays concerné.
+
+
+
+
+
+ postal code
+ 우편 번호
+ 郵遞區號
+ code postal
+ Código postal
+ Codice di Avviamento Postale
+ contains a numerical or alphanumeric code used as part of a postal address to simplify
+ sorting or delivery of mail.
+ 우편의 분류 및 배달을 용이하도록 우편 주소의 일부로 사용되는 숫자 또는 문자와 숫자가 혼용된
+ 기호.
+ 包含一個數字或字母加數字的區域代碼,屬於郵寄地址的一部分,用以簡化郵件的分類及寄送工作。
+ 郵便の配達や区分けを簡単にするための,郵便の宛名情報の部分となる数値 または文字を含む.
+ contient un code numérique ou alphanumérique qui fait
+ partie de l'adresse postale et sert à simplifier le tri ou la distribution du courrier.
+ Contiene un código numérico o alfabético usado como
+ parte de la dirección postal para simplificar la clasificación o entrega de correo.
+ contiene il codice alfanumerico utilizzato
+ nell'indirizzo postale per semplificare l'ordine e la distribuzione della posta.
+
+
+
+
+
+
+
+
+
+ HR1 3LR
+
+
+
+
+ 84000
+
+
+
+
+ 60142-7
+
+
+
+
+ 310
+
+
+
+
+ 310-51
+
+
+
+
+ 60142-7
+
+
+
+
The position and nature of postal codes is highly country-specific; the conventions
+ appropriate to the country concerned should be used.
+
+
+
La disposition et la nature des codes postaux est spécifique à chaque pays ; on utilise les
+ conventions qui leur sont propres .
+
+
+
郵便番号の位置づけや性質は,国家に強く依存する.国の事情にあった方 式が採用されるべきである.
+
+
+
+
+
+ postal box or post office box
+ 우편함 또는 사서함
+ 郵政信箱
+ boîte postale
+ buzón
+ Casella postale
+ contains a number or other identifier for some postal delivery point other than a street
+ address.
+ 주소 이외의 우편 배달 지점을 위한 숫자 또는 다른 확인소를 포함한다.
+ 包含一個數字或其他識別名稱,標示街道地址之外的郵件寄送點。
+ 郵便配達で識別子となる,通り名以外の,数値などを示す.
+ contient un numéro ou un autre identifiant d'un lieu de
+ distribution du courrier autre qu'un nom de rue.
+ contiene un número u otro identificador para algún punto
+ de entrega postal distinto a una dirección postal.
+ contiene il numero o altro identificatore per un luogo di
+ consegna della posta diverso da un indirizzo postale.
+
+
+
+
+
+
+
+
+
+ P.O. Box 280
+
+
+
+
+ B.P. 4232
+
+
+
+
+ BP 3317
+
+
+
+
+ 廣州郵局第280號信箱
+
+
+
+
+ Postbus 532
+
+
+
+
The position and nature of postal codes is highly country-specific; the conventions
+ appropriate to the country concerned should be used.
+
+
+
La disposition et la nature des codes postaux est spécifique à chaque pays ; on utilise les
+ conventions qui leur sont propres .
+
+
+
郵便番号の位置づけや性質は,国家に強く依存する.国の事情にあった方 式が採用されるべきである.
+
+
+
+
+
Numbers and
+Measures
+ number
+ 숫자
+ 數字
+ numéral
+ número
+ numero
+ contains a number, written in any form.
+ 다양한 형식의 숫자를 포함한다.
+ 包含一個以任何形式呈現的數字。
+ 各種形式による数値を示す.
+ contient un nombre écrit sous une forme quelconque.
+ contiene un número, escrito en cualquier forma.
+ contiene un numero in qualsiasi forma.
+
+
+
+
+
+
+
+
+
+
+ indicates the type of numeric value.
+ 수치의 유형을 나타낸다.
+ 指出數值的種類。
+ 数値の種類を示す.
+ indique le type de valeur numérique
+ indica el tipo de valor numérico.
+ indica il tipo di valore numerico
+
+
+
+ absolute number, e.g. 21, 21.5
+ 예를 들어, 21, 21.5와 같은 절대값
+ 絕對數,例如21、21.5
+ número absoluto, p.ej. 21, 21,5
+ 基数.例えば,21, 21.5など.
+ nombre entier ou décimal, par exemple 21, 21.5
+ numero assoluto, ad esempio 21 o
+ 21,5
+
+
+ ordinal number, e.g. 21st
+ 예를 들어, 21번째와 같은 서수
+ 序數,例如第21
+ número ordinal, p.ej. 21º
+ 序数.例えば,21番など.
+ nombre ordinal, par exemple 21ème
+ numero ordinale, ad esempio 21°
+
+
+ fraction, e.g. one half or three-quarters
+ 예를 들어, 1/2 또는 3/4와 같은 분수
+ 分數,例如二分之一或是四分之三
+ fracción,p.ej. una mitad o tres cuartos
+ 割合.例えば,1/2, 3/4など.
+ fraction, par exemple une moitié ou
+ trois-quarts
+ frazione, ad esempio un terzo o tre
+ quarti
+
+
+ a percentage
+ 백분율
+ 百分比
+ un porcentaje
+ パーセント.百分率.
+ un pourcentage
+ percentuale
+
+
+
+
If a different typology is desired, other values can be used for this
+ attribute.
+
+
+
Si une autre typologie est souhaitée, d'autres valeurs peuvent être utilisées
+ pour cet attribut.
+
+
+
上記とは別の分類が必要であれば,それを使うことができる.
+
+
+
+ supplies the value of the number in standard form.
+ 표준형의 숫자 값을 제시한다.
+ 用標準形式來說明該數字所代表的值。
+ 標準的な形式で数値を示す.
+ fournit la valeur d'un nombre sous une forme
+ normalisée.
+ proporciona el valor del número de forma
+ estándard.
+ indica il valore del numero in formato standard
+
+ a numeric value.
+ une valeur numérique.
+
+
The standard form used is defined by the TEI datatype data.numeric.
+
+
+
La forme normalisée utilisée est définie par le type de données TEI
+ qui concerne les données numériques.
+
+
+
標準的な形式は,TEIデータ型data.numericで定義されている.
+
+
+
+
+
+
I reached twenty-one on
+my twenty-first birthday
+
Light travels at 3×1010
+ cm per second.
+
+
+
+
+
Pierre eut dixans le jour de monvingtième anniversaire.
+
+
+
+
+
在第二十一歲的生日那天,我變成二十一歲了... 光以每秒1010
+ 公分移動。
+
+
+
+
Detailed analyses of quantities and units of measure in historical documents may also use
+ the feature structure mechanism described in chapter . The
+ num element is intended for use in simple applications.
+
+
+
Les analyses détaillées des quantités et unités de mesure dans les textes historiques
+ peuvent aussi utiliser le mécanisme de structure de traits décrit au chapitre.
+ L'élément num est conçu pour un usage dans des applications simples.
+
+
+
+
+
+ mesure
+ contains a word or phrase referring to some quantity of an object or commodity, usually
+ comprising a number, a unit, and a commodity name.
+ 개체 또는 물체의 수량을 지시하는 단어 또는 구를 포함한다. 이들은 숫자, 단위, 물체명으로
+ 구성되어 있다.
+ 包含用來表示某物品數量的字詞,通常是由數字、單位和物品名稱所組成。
+ ある対象や商品の大きさを表す語句を示す.一般には,数値,単位,商品名 を含む.
+ contient un mot ou une expression faisant référence à
+ la quantité d'un objet ou d'un produit, comprenant en général un nombre, une unité et le nom
+ d'un produit.
+ contiene una palabra o sintagma referido a alguna
+ cantidad de un objeto o producto, normalmente incluye un número, una unidad y un nombre de
+ producto.
+ contiene una parola o sintagma che fa riferimento alla
+ quantità di un oggetto o bene, contenente di solito il numero, l'unità e il nome del bene.
+
+
+
+
+
+
+
+
+
+
+ specifies the type of measurement in any convenient typology.
+ 편리한 방식으로 측정 유형을 명시한다.
+ 用任何適合的分類方法來說明度量的種類。
+ 当該計測種類を示す.
+ précise le type de mesure exprimée dans la
+ typologie adaptée.
+ especifica el tipo de medición en cualquier
+ tipología funcional.
+ specifica il tipo di misurazione in una
+ tipologia funzionale.
+
+
+
+
+
+ 2 pounds of flesh
+ £10-11-6d
+ 2 merks of old extent
+
+
+
+
+ 2 kilos de sucre
+ 16,99 €
+ 5 hectares
+
+
+
+
+ un hectolitre de vin
+ 1 douzaine de roses
+ un litre de moules
+
+
+
+
+ 1市斤豬肉
+ 人民幣20元
+ 一個巴掌大小
+
+
+
+
+ 一台斤青菜
+ 一打玫瑰
+ 一朵黃色鬱金香
+
+
+
+
+ 2 score hh rum
+ 1 doz. roses
+ a yellow tulip
+
+
+
+
+
+
+ measure group
+ 측정 그룹
+ grupo de medida
+ groupe de mesures
+ gruppo di misure
+ contains a group of dimensional specifications which relate to the same object, for example
+ the height and width of a manuscript page.
+ 예를 들어, 원고지 페이지의 가로 세로 크기와 같이 동일 개체에 관련된 여러 종류의 측량값의 그룹을
+ 포함한다.
+ contiene un grupo de especificaciones dimensionales que
+ se relacionan con un mismo objeto, por ejemplo la altura y la anchura de una página de
+ manuscrito.
+ 大きさに関する規格を示す.例えば,手書き資料のページの高さや幅などを 示すためのもの.
+ contient un groupe de spécifications des dimensions qui
+ concernent un même objet, par exemple la hauteur et la largeur d'une page d'un manuscrit.
+ contiene un gruppo di indicazioni dimensionali relative
+ allo stesso oggetto, per esempio altezza e larghezza di una pagina di manoscritto
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 157-160
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 157-160
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 157-160
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Dates and Times
+ date
+ contains a date in any format.
+ 다양한 형식의 날짜를 포함한다.
+ 包含任何格式的日期表示。
+ 日付を示す.
+ contient une date exprimée dans n'importe quel format.
+ contiene una fecha en cualquier formato.
+ contiene una data in qualsiasi foemato
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ early February 1980
+
+
+
+
+ au début de février 1980
+
+
+
+
+ L'an de grâce 1654, Lundi, 23 novembre, jour de saint Clément,
+ pape et martyr et autres au martyrologe, Veille de saint Chrysogone, martyr, et
+ autres, Depuis environ dix heures et demie du soir jusques environ minuit et
+ demi.
+
+
+
+
+ septembre
+ mcmxc
+ septembre
+ 11
+ septembre, neuf heures moins douze GMT
+
+
+
+ 他出生於西元2007年12月24日 ( 丁亥年11月15日).
+
+
+
+ 西元1980年2月初
+
+
+
+ 貞觀十一年十一月,唐太宗聽說年輕的武則天長得妖媚嬌艷,楚楚動人,便將她納入宮中,封為四品才人,賜號「武媚」。
+
+
+
+ 西元1990年9月
+
+
+
+ Given on the Twelfth Day
+ of June in the Year of Our Lord One Thousand Nine Hundred and Seventy-seven of the Republic
+ the Two Hundredth and first and of the University the Eighty-Sixth.
+
+
+
+
+ September 1990
+
+
+
+
+
+
+
+
+
+
+
+ temps
+ contains a phrase defining a time of day in any format.
+ 어떤 형식의, 하루의 시간을 정의하는 구를 포함한다.
+ 包含一組字詞,以任何形式定義時間
+ 時間を表す語句を示す.
+ contient une expression qui précise un moment de la
+ journée sous n'importe quelle forme.
+ contiene un sintagma que define un momento del día en
+ cualquier formato.
+ contiene un sintagma che si riferisce ad un ora del
+ giorno in qualsiasi formato.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ As he sat smiling, the
+ quarter struck — .
+
+
+
+ Bonsoir, il est ici, l'heure de dormir, et chez vous
+ à Paris, il est seulement Je te
+ rapporterai plein de souvenirs pour te faire partager cette
+ expérience unique.
+
+
+ 下班火車將於 出發。
+
+
+
+
+
Abbreviations and Their Expansions
+ abbreviation
+ 약어
+ 縮寫
+ abréviation
+ abreviatura
+ abbreviazione
+ contains an abbreviation of any sort.
+ 어떤 종류의 약어를 포함한다.
+ 包含任何形式的縮寫。
+ 名称の省略
+ contient une abréviation quelconque.
+ contiene una abreviatura de cualquier clase.
+ contiene un'abbreviazione di qualsiasi genere.
+
+
+
+
+
+
+
+
+
+
+
+
+ allows the encoder to classify the abbreviation according to some convenient
+ typology.
+ 적절한 방식에 따른 약어를 분류하는 것을 가능하게 한다.
+ 標記者可以用合宜的分類方法將縮寫形式分類。
+ 符号化する人の分類に従って省略名称を付与することができる.
+ permet à l'encodeur de caractériser
+ l'abréviation selon une typologie adéquate
+ permite al codificador clasificar la
+ abreviatura según la tipología conveniente.
+ pemette al codificatore di classificare
+ l'abbreviazione secondo una tipologia funzionale.
+
+
+
+ the abbreviation provides the first letter(s) of the word or phrase,
+ omitting the remainder.
+ 단어 또는 구의 첫 문자(들)로 제시된 약어
+ 僅提供字詞開端的一個或一個以上的字母,並省略其他部分的縮寫形式。
+ la abreviatura proporciona a las
+ primeras letras de la palabra o de la frase, omitiendo el resto.
+ 語頭文字(列)を使い,省略形とする.
+ l'abréviation donne la première lettre
+ lettre du mot ou de l'expression et omet le reste.
+ l'abbreviazione consiste delle prime
+ lettere di una parola o sintagma, omettendo il restante.
+
+
+ the abbreviation omits some letter(s) in the middle.
+ 중간의 몇 개 문자들이 생략된 약어
+ 省略單字當中某些字母的縮寫形式。
+ la abreviatura omite algunas letras en
+ el centro.
+ 語中の文字(列)を省略して作る.
+ l'abréviation omet une ou plusieurs
+ lettres au milieu.
+ l'abbreviazione omette alcune lettere
+ nella parte centrale.
+
+
+ the abbreviation comprises a special symbol or mark.
+ 약어가 특별한 기호 또는 부호로 구성된다.
+ 包含特殊符號或標記的縮寫形式。
+ la abreviatura refiere un símbolo
+ especial o una marca.
+ 特別な記号や印が使われている.
+ l'abréviation comprend un symbole
+ spécial ou une marque.
+ l'abbreviazione consiste di un simbolo
+ o segno speciale.
+
+
+ the abbreviation includes writing above the line.
+ 약어가 행 위에 기록된 것을 포함한다.
+ 包含上標文字的縮寫形式。
+ la abreviatura incluye la escritura
+ sobre la línea.
+ 当該省略形上に,文字列が乗っている.
+ l'abréviation inclut ce qui est écrit
+ au-dessus de la ligne.
+ l'abbreviazione include testo scritto
+ al di sopra della linea.
+
+
+ the abbreviation comprises the initial letters of the words of a phrase.
+ 약어가 구를 구성하는 각 단어의 시작 문자로 구성된 것이다.
+ 僅包含一詞組當中字首字母的縮寫形式。
+ la abreviatura abarca las letras
+ iniciales de las palabras de una frase.
+ 省略形は,語頭字でできている.
+ l'abréviation comprend les initiales
+ des mots d'une expression.
+ l'abbreviazione consiste delle lettere
+ iniziali delle una parola di una frase.
+
+
+ the abbreviation is for a title of address (Dr, Ms, Mr, …)
+ 호칭에 대한 약어(Dr, Ms, Mr 등)
+ 用於頭銜稱呼的縮寫 (Dr, Ms, Mr, …)。
+ la abreviatura se emplea para un
+ tratamiento en la dirección (el Dr.,, Sr.,…)
+ 宛名に使用する肩書きの省略形(Dr, Ms, Mr,etc.).
+ l'abréviation recouvre une identité
+ sociale (Dr., Mme, M., …)
+ labbreviazione si riferisce al titolo
+ (Sig., Sig.ra ecc.)
+
+
+ the abbreviation is for the name of an organization.
+ 약어가 기관명에 대한 것이다.
+ 用於機構團體名稱的縮寫。
+ la abreviatura se emplea en el nombre
+ de una organización.
+ 組織名の省略形.
+ l'abréviation recouvre le nom d'un
+ organisme.
+ l'abbreviazione si riferisce al nome di
+ un organizzazione.
+
+
+ the abbreviation is for a geographic name.
+ 약어가 지명에 대한 것이다.
+ 用於地理名稱的縮寫。
+ la abreviatura se usa para un nombre
+ geográfico.
+ 地名の省略形.
+ l'abréviation recouvre un nom
+ géographique.
+ l'abbreviazione si riferisce ad un
+ toponimo
+
+
+
+
The type attribute is provided for the sake of those who wish to
+ classify abbreviations at their point of occurrence; this may be useful in some
+ circumstances, though usually the same abbreviation will have the same type in
+ all occurrences. As the sample values make clear, abbreviations may be
+ classified by the method used to construct them, the method of writing them, or
+ the referent of the term abbreviated; the typology used is up to the encoder and
+ should be carefully planned to meet the needs of the expected use. For a
+ typology of Middle English abbreviations, see
+
+
+
+
L'attribut type est donné si on souhaite typer les abréviations à
+ l'endroit où elles apparaissent ; cela peut être utile dans certaines
+ circonstances bien qu'une abréviation conserve la même signification dans toutes
+ ses occurrences. Comme les échantillons des valeurs le montrent, les
+ abréviations peuvent être typées selon la méthode utilisée pour leur
+ construction, pour leur écriture, ou le référent du terme abrégé ; la typologie
+ utilisée dépend de l'encodeur et doit être pensée soigneusement afin de
+ correspondre aux attentes. Pour une typologie des abréviations concernant le
+ Moyen Anglais, voir .
The abbr tag is not required; if appropriate, the encoder may transcribe
+ abbreviations in the source text silently, without tagging them. If abbreviations are
+ not transcribed directly but expanded silently, then the TEI header should
+ so indicate.
+
+
+
La balise abbr n'est pas obligatoire. Si c'est pertinent, l'encodeur peut
+ transcrire les abréviations du texte source sans les commenter ni les baliser. Si les
+ abréviations ne sont pas transcrites directement mais développées sans
+ commentaires, alors l'en-tête TEI doit le mentionner.
+
+
+
+
+
+ expansion
+ 확장 표기
+ 縮寫還原
+ expansion
+ expansión
+ espansione
+ contains the expansion of an abbreviation.
+ 약어의 확장(비약어) 표기
+ 包含一個縮寫詞的還原形式。
+ 省略形の元の表現を示す.
+ contient l'expansion d'une abréviation.
+ contiene la expansión de una abreviatura.
+ contiene l'esapnsione di un'abbreviazione.
+
+
+
+
+
+
+
+
+
+
+ The address is Southmoor RoadRd
+
+
+
+ Il habiteAvenueAv.de la Paix
+
+
+
+
+ 歐洲聯盟
+ 歐盟
+
+
+
+
+
+
+ Imp
+ erator
+
+
+
+
+
The content of this element should usually be a complete word or phrase. The ex
+ element provided by the transcr module may be used to mark up
+ sequences of letters supplied within such an expansion.
+
+
+
En général, le contenu de cet élément doit être une expression ou un mot complet. L'élément
+ ex fourni par le module transcr peut être utilisé pour
+ baliser des suites de lettres données dans une expansion de ce type.
Simple Links and Cross-References
+ pointer
+ 포인터
+
+ puntero
+ pointeur
+ puntatore
+ defines a pointer to another location.
+ 다른 위치로의 포인터를 정의한다.
+ 標明一個與其他位置相連結的指標。
+ 他の場所を示すポインターを定義する.
+ définit un pointeur vers un autre emplacement.
+ define un señalizador a otra localización.
+ definisce un puntatore ad un'altra posizione.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Only one of the
+attributes @target and @cRef may be supplied on .
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ reference
+ 참조
+
+ referencia
+ référence
+ riferimento
+ defines a reference to another location, possibly modified by additional text or comment.
+ 부가적인 텍스트 또는 해설로 수정될 수 있는, 다른 위치로 참조를 정의한다.
+ 標明與其他位置互相參照的符號,或許包含附加的文字或註解。
+ 他の場所への参照を定義する.多くは,追加テキストまたはコメントを含む.
+ définit une référence vers un autre emplacement, la référence étant éventuellement modifiée ou complétée par un texte ou un commentaire.
+ define una referencia a otra localización, posiblemente
+ modificada por un texto o comentario adicional.
+ definisce un riferimento ad un'altra posizione, può
+ essere modificata da un commento o testo ulteriore
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Only one of the
+ attributes @target' and @cRef' may be supplied on
+
+
+
+
+ See especially the second
+ sentence
+
+
+
+ See also s.v. locution
+ .
+
+
+ Cf. tout particulièrement la section 12, page 34.
+
+
+ Cf. tout particulièrement
+ le vers 234 du Livre I
+
+
+
+ 關於第二行, 請參考 下列
+ 慣用語
+ .
+
+
+
The target and cRef attributes are mutually exclusive.
+
+
+
Les attributs target et cRef sont exclusifs l'un de l'autre.
+
+
+
属性targetとcRefは,排他的に使用される.
+
+
+
+
+
+
Lists
+ liste
+ contains any sequence of items organized as a list.
+ 목록의 형태로 정리된 항목을 포함한다.
+ 包含以列表方式呈現的任何連續項目。
+ リストのような,項目列を示す.
+ contient une suite d'items ordonnés dans une liste.
+ contiene cualquier secuencia de ítems o elementos
+ organizados en una lista.
+ contiene una qualsiasi sequenza di voci organizzate in
+ una lista.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ The content of a "gloss" list should include a sequence of one or more pairs of a label element followed by an item element
+
+
+
+
+
+
+
+ describes the nature of the items in the list.
+
+
+
+ each list item glosses some term or concept, which is given by a label element
+ preceding the list item.
+ 목록의 각 항목은 선행하는 요소에서 제시된 용어 또는 개념에 대한 설명이다.
+ 各列表項目為一些字詞或概念下註解,每個項目之前並帶有標籤元素。
+ cada item de la lista glosa algun término o
+ concepto de los que han sido dados por un elemento de la lista de la etiqueta que
+ precede.
+ リスト項目は,当該リスト項目に先行してあるラベル要素で示され
+ たある用語や意義をまとめたものである.
+ chaque item de la liste commente un terme ou un
+ concept qui est donné par un élément label précédant l'item de la liste.
+ ogni voce dell'elenco è la glossa di un termine o
+ concetto dato da un elemento legenda che precede la voce stessa
+
+
+ each list item is an entry in an index such as the alphabetical topical index
+ at the back of a print volume.
+
+
+ each list item is a step in a sequence of instructions, as in a
+ recipe.
+
+
+ each list item is one of a sequence of petitions, supplications
+ or invocations, typically in a religious ritual.
+
+
+ each list item is part of an argument consisting of two or more propositions
+ and a final conclusion derived from them.
+
+
+
+
Previous versions of these Guidelines recommended the use
+ of type on list to encode the rendering or
+ appearance of a list (whether it was bulleted, numbered,
+ etc.). The current recommendation is to use the
+ rend or style attributes for these
+ aspects of a list, while using type for the more
+ appropriate task of characterizing the nature of the content
+ of a list.
+
+
+
The formal syntax of the element declarations allows
+ label tags to be omitted from lists tagged list
+ type="gloss"; this is however a semantic error.
+
+
+
La syntaxe formelle des déclarations d'élément permet d'omettre les étiquettes de balises
+ des listes balisées par list type="gloss" mais c'est une erreur sémantique.
+
+
+
+
+
+
+ a butcher
+ a baker
+ a candlestick maker, with
+ rings on his fingersbells on his toes
+
+
+
+
+
+
+
+ All Cretans are liars.
+ Epimenides is a Cretan.
+ ERGO Epimenides is a liar.
+
+
+
+
+
+
+ God save us from drought.
+ God save us from pestilence.
+ God save us from wickedness in high places.
+ Praise be to God.
+
+
+
+
+
+
+ Thé sans sucre et sans lait
+ Un jus d'ananas
+ Un yaourt
+ Trois biscuits de seigle
+ Carottes râpées
+ Côtelettes d'agneau (deux)
+ Courgettes
+ Chèvre frais
+ Coings
+
+
+
+
+
+
+
Selon des critères qui n'appartiennent qu'à lui, Rémi Plassaert a classé ses buvards
+ en huit tas respectivement surmontés par :
+
+ un toréador chantant (dentifrice émail Diamant)
+ un tapis d'Orient du XVIIe siècle, provenant d'une basilique de Transylvanie
+ (Kalium-Sedaph, soluté de propionate de potassium)
+ Le Renard et la Cicogne (sic), gravure de Jean-Baptiste Oudry (Papeteries
+ Marquaize, Stencyl, Reprographie)
+
+
+
+
+
+
+
+
[...] et tout autour, la longue cohorte de ses personnages, avec leur histoire, leur
+ passé, leurs légendes :
+
+ Pélage vainqueur d'Alkhamah se faisant couronner à Covadonga
+ La cantatrice exilée de Russie suivant Schönberg à Amsterdam
+ Le petit chat sourd aux yeux vairons vivant au dernier étage
+ Le crétin chef d'îlot faisant préparer des tonneaux de sable
+
+
The following example treats the short numbered clauses of Anglo-Saxon legal codes as lists
+ of items. The text is from an ordinance of King Athelstan (924–939):
+
+
+ Athelstan's Ordinance
+
+ Concerning thieves. First, that no thief is to be spared who is caught with
+ the stolen goods, [if he is] over twelve years and [if the value of the goods is] over
+ eightpence.
+ And if anyone does spare one, he is to pay for the thief with his
+ wergild — and the thief is to be no nearer a settlement on that account — or to
+ clear himself by an oath of that amount.If, however, he [the thief] wishes to defend himself or to escape, he is
+ not to be spared [whether younger or older than twelve].If a thief is put into prison, he is to be in prison 40 days, and he may
+ then be redeemed with 120 shillings; and the kindred are to stand surety for him
+ that he will desist for ever.And if he steals after that, they are to pay for him with his wergild,
+ or to bring him back there.And if he steals after that, they are to pay for him with his wergild,
+ whether to the king or to him to whom it rightly belongs; and everyone of those who
+ supported him is to pay 120 shillings to the king as a fine.
+
+ Concerning lordless men. And we pronounced about these lordless men, from whom
+ no justice can be obtained, that one should order their kindred to fetch back such a
+ person to justice and to find him a lord in public meeting.
+ And if they then will not, or cannot, produce him on that appointed day,
+ he is then to be a fugitive afterwards, and he who encounters him is to strike him
+ down as a thief.And he who harbours him after that, is to pay for him with his wergild
+ or to clear himself by an oath of that amount.
+
+ Concerning the refusal of justice. The lord who refuses justice and upholds
+ his guilty man, so that the king is appealed to, is to repay the value of the goods and
+ 120 shillings to the king; and he who appeals to the king before he demands justice as
+ often as he ought, is to pay the same fine as the other would have done, if he had
+ refused him justice.
+ And the lord who is an accessory to a theft by his slave, and it becomes
+ known about him, is to forfeit the slave and be liable to his wergild on the first
+ occasionp if he does it more often, he is to be liable to pay all that he owns.And likewise any of the king's treasurers or of our reeves, who has been
+ an accessory of thieves who have committed theft, is to liable to the same.
+
+ Concerning treachery to a lord. And we have pronounced concerning treachery to
+ a lord, that he [who is accused] is to forfeit his life if he cannot deny it or is
+ afterwards convicted at the three-fold ordeal.
+
+
+
+
Note that nested lists have been used so the tagging mirrors the structure indicated by the
+ two-level numbering of the clauses. The clauses could have been treated as a one-level list
+ with irregular numbering, if desired.
+
+
+
+
These decrees, most blessed Pope Hadrian, we propounded in the public council ... and they
+ confirmed them in our hand in your stead with the sign of the Holy Cross, and afterwards
+ inscribed with a careful pen on the paper of this page, affixing thus the sign of the Holy
+ Cross.
+ I, Eanbald, by the grace of God archbishop of the holy church of York, have
+ subscribed to the pious and catholic validity of this document with the sign of the Holy
+ Cross.I, Ælfwold, king of the people across the Humber, consenting have subscribed with
+ the sign of the Holy Cross.I, Tilberht, prelate of the church of Hexham, rejoicing have subscribed with the
+ sign of the Holy Cross.I, Higbald, bishop of the church of Lindisfarne, obeying have subscribed with the
+ sign of the Holy Cross.I, Ethelbert, bishop of Candida Casa, suppliant, have subscribed with thef sign of
+ the Holy Cross.I, Ealdwulf, bishop of the church of Mayo, have subscribed with devout will.I, Æthelwine, bishop, have subscribed through delegates.I, Sicga, patrician, have subscribed with serene mind with the sign of the Holy
+ Cross.
+
+
+
+
+
May contain an optional heading followed by a series of items, or a series of
+ label and item pairs, the latter being optionally preceded by one or two specialized
+ headings.
+
+
+
Peut contenir un titre facultatif suivi d'une succession d'items ou d'une
+ succession de couples constitués d'une étiquette et d'un item, ce dernier type pouvant être
+ précédé par un ou deux titres spécifiques.
+
+
+
+
+
+ contains one component of a list.
+ 목록에서 하나의 성분을 포함한다.
+ 包含列表中的一個項目。
+ リストのいち項目を示す.
+ contient un composant d'une liste.
+ contiene un componente de una lista.
+ contiene un componente di una lista
+
+
+
+
+
+
+
+
+
+
+ Here begin the chapter headings of Book IV
+ The death of Queen Clotild.
+ How King Lothar wanted to appropriate one third of the Church revenues.
+ The wives and children of Lothar.
+ The Counts of the Bretons.
+ Saint Gall the Bishop.
+ The priest Cato.
+ ...
+
+
+
+
+
+
+ Tentative d'inventaire de quelques-unes des choses qui ont été trouvées dans
+ les escaliers au fil des ans.
+ Plusieurs photos, dont celle d'une jeune fille de quinze ans vêtue d'un slip
+ de bain noir et d'un chandail blanc, agenouillée sur une plage,
+ un réveil radio de toute évidence destiné à un réparateur, dans un sac plastique
+ des établissements Nicolas,
+ un soulier noir orné de brillants,
+ une mule en chevreau doré,
+ une boîte de pastilles Géraudel contre la toux.
+
+
+
+
+
+
+ 以下為第三部份的各個章節標題
+ 人物的鑑賞
+ 情節的鑑賞
+ 環境的鑑賞
+ 主題的鑑賞
+ 語言的鑑賞
+ ...
+
+
+
+
+
May contain simple prose or a sequence of chunks.
+
Whatever string of characters is used to label a list item in the copy text may be used as
+ the value of the global n attribute, but it is not required that numbering be
+ recorded explicitly. In ordered lists, the n attribute on the item element
+ is by definition synonymous with the use of the label element to record the
+ enumerator of the list item. In glossary lists, however, the term being defined should be
+ given with the label element, not n.
+
+
+
Peut contenir un texte ou une succession d'extraits.
+
Toute chaîne de caractères utilisée pour étiqueter un item de liste dans le texte peut être
+ utilisée comme valeur de l'attribut global n, mais il n'est pas obligatoire de
+ noter explicitement cette numérotation. Dans les listes ordonnées, l'attribut n de
+ l'élément item est par définition synonyme de l'utilisation de l'élément
+ label pour noter le numéro de l'item de la liste. Pour les glossaires toutefois, le
+ terme défini doit être donné avec l'élément label, et non pas n.
+
+
+
+
+
+
+ étiquette
+ contains any label or heading used to identify part of a text,
+ typically but not exclusively in a list or glossary.
+ 목록의 항목과 관련된 표지를 포함한다; 용어집에서는 정의되고 있는 용어를 표지한다.
+ 包含和列表中某項目相關聯的標號;在詞彙表中則用來標記被定義的字詞。
+ リスト中の項目に関連するラベルを示す.用語集においては,定義される用 語を示す.
+ contient l'étiquette attachée à un item dans une liste ;
+ dans les glossaires, il marque le terme qui est défini.
+ contiene un concepto o enunciado asociado con un ítem en
+ una lista; en un glosario marca el término que se define.
+ contiene l'etichetta associata ad una voce in una lista;
+ nei glossari indica il dermine che viene definito
+
+
+
+
+
+
+
+
+
+
+
+
Labels are commonly used for the headwords in glossary
+ lists; note the use of the global xml:lang attribute to
+ set the default language of the glossary list to Middle English,
+ and identify the glosses and headings as modern English or
+ Latin:
+
+
+ Vocabulary
+ Middle English
+ New English
+
+ now
+
+ loudly
+
+ blooms
+
+ meadow
+
+ wood
+
+ ewe
+
+ lows
+
+ bounds, frisks (cf. Chaucer, K.T.644a courser, stertingas the fyr
+
+
+ pedit
+
+ merrily
+
+ cease
+
+ never
+
+
+
+
+
label est souvent employé pour identifier les mots dans des listes de glossaire ;
+ on note l'utilisation de l’attribut global xml:lang : l'ancien français est la
+ langue par défaut du glossaire
+
+
+ Vocabulaire
+ Ancien français
+ Français moderne
+
+ amertume
+
+ conduire une barque
+
+ goulot d'un vase.
+
+ jeune boeuf
+
+ celui-ci
+
+ captivité
+
+ conduire
+
+ puissance, pouvoir
+
+ singularis
+
+ tombée du jour (cf. Lexique de Godefroyde hautes vespres : tard dans la soirée.)
+
+
+
+
+
On emploie aussi label pour enregistrer le classement alphanumérique d'items dans
+ des listes ordonnées.
+ L’unité mixte de
+ recherche ATILF (Analyse et Traitement Informatique de la Langue Française) propose 3 types
+ de ressources : Des ressources linguistiques publiées.Des ressources linguistiques informatisées.Des ressources linguistiques logicielles.
+
+
+
+
On emploie aussi label dans d'autres listes structurées, comme dans cet extrait du
+ journal de Jules Renard.
+
+
+
+ L'esprit inquiet mais clairvoyant, c'est-à-dire actif et sain, de l'homme qui ne
+ travaille pas.
+
+ On parle de Syveton. Elle aussi se rappelle avoir été, petite fille, poursuivie par
+ un homme tout décolleté du bas et qu'on appelait l'homme au nez rouge.
+
+ Jaurès dit que Syveton n'avait aucun intérêt à se tuer mais, à y regarder de près,
+ oui, en cherchant bien, on trouve que nous avons tous un intérêt quelconque à nous tuer.
+
+ Dans mon coeur froid, quelques rares jolis sentiments, comme des oiseaux aux petites
+ pattes sur de la neige.
+
+
+
+
+
+
+ 字彙
+ 簡體中文
+ 繁體中文
+
+ 塵
+
+ 業
+
+ 處
+
+ 個
+
+ 與
+
+ 軍隊
+
+ 疏遠
+
+ 後漢出師表亲近小人,疏远贤臣,这是后汉所以倾覆衰败的原因
+
+
+ 嘆息
+
+ 認為
+
+ 誠實
+
+ 獲得
+
+
+
+
+ 有關本書的版權問題,我做出以下兩點聲明。未經授權許可,請勿擅自複印。歡迎學術引用本文,然請詳細標明出處。
+
+
+
+
+
+
+ 今天晚上,很好的月光。 我不見他,已是三十多年;今天見了,精神分外爽快。...
+
+ 今天全沒月光,我知道不妙。早上小心出門,趙貴翁的眼色便怪:似乎怕我,似乎想害我。還有七八個人,交頭接耳的議論我,...
+
+ ...我翻開歷史一查,這歷史沒有年代,歪歪斜斜的每葉上都寫著“仁義道德”几個字。我橫豎睡不著,仔細看了半夜,才從字縫里看出字來,滿本都寫著兩個字是喫人!書上寫著這許多字,佃戶說了這許多話,卻都笑吟吟的睜著怪眼看我。我也是人,他們想要吃我了!
+
+ 黑漆漆的,不知是日是夜。趙家的狗又叫起來了。 獅子似的凶心,兔子的怯弱,狐狸的狡猾,……
+
+
+
+
+
Labels may also be used to record explicitly the numbers or letters which mark list items in
+ ordered lists, as in this extract from Gibbon's
Autobiography. In this usage
+ the label element is synonymous with the n attribute on the item
+ element:
+ I will add two facts, which have seldom occurred
+ in the composition of six, or at least of five quartos. My first rough manuscript, without any intermediate copy, has been sent to the press.Not a sheet has been seen by any human eyes, excepting those of the author and the
+ printer: the faults and the merits are exclusively my own.
+
+
+
+
Labels may also be used for other structured list items, as in this extract from the journal
+ of Edward Gibbon:
+
+
+
+ I wrote some critical observations upon Plautus.
+
+ I wrote a long dissertation upon some lines of Virgil.
+
+ I saw Mademoiselle Curchod — Omnia vincit amor, et nos cedamus
+ amori.
+
+
+ I went to Crassy, and staid two days.
+
+
+
Note that the label might also appear within the
+item rather than as its sibling. Though syntactically valid,
+this usage is not recommended TEI practice.
+
+
+
Labels may also be used to represent a label or heading attached to
+a paragraph or sequence of paragraphs not treated as a structural
+division, or to a group of verse lines. Note that, in this case, the
+label element appears within the p or
+lg element, rather than as a preceding sibling of it.
+
+
[...]
+& n’entrer en mauuais & mal-heu-
+ré meſnage. Or des que le conſente-
+ment des parties y eſt le mariage eſt
+ arreſté, quoy que de faict il ne ſoit
+
+ conſommé. Depuis la conſomma-
+tion du mariage la femme eſt ſoubs
+ la puiſſance du mary, s’il n’eſt eſcla-
+ue ou enfant de famille : car en ce
+ cas, la femme, qui a eſpouſé vn en-
+fant de famille, eſt ſous la puiſſance
+[...]
+
+
In this example the text of the label appears in the right hand
+ margin of the original source, next to the paragraph it describes, but
+ approximately in the middle of it.
+
+
If so desired the type attribute may be used to
+ distinguish different categories of label.
+
+
+
+
+
+ heading
+ 표제부
+ 標題
+ en-tête
+ encabezamiento
+ titolo
+ contains any type of heading, for example the title of a section, or the heading of a list,
+ glossary, manuscript description, etc.
+ 예를 들어 절의 제목 또는 용어집, 원고 기술의 제목 등과 같이 표제부 유형을 포함한다.
+ 包含任何種類的標題,如章節、列表、詞彙表、寫本描述等的標題。
+ 各種の見出しを示す.例えば,節のタイトル,リストや用語集,手書き資料 の解説などにある見出し.
+ contient tout type d'en-tête, par exemple le titre d'une
+ section, ou l'intitulé d'une liste, d'un glossaire, d'une description de manuscrit, etc.
+ contiene cualquier tipo de encabezamiento, por ejemplo el
+ título de una sección o el encabezado de una lista, glosario, descripción de un manuscrito, etc.
+ contiene qualsiasi tipo di titolo, per esempio il titolo
+ di una sezione, di una lista, di un glossario, di una descrizione di manoscritto, ecc.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
The most common use for the head element is to mark the headings of sections. In
+ older writings, the headings or incipits may be rather longer than usual in
+ modern works. If a section has an explicit ending as well as a heading, it should be marked as
+ a trailer, as in this example:
+
+
+ In the name of Christ here begins the first book of the ecclesiastical history of
+ Georgius Florentinus, known as Gregory, Bishop of Tours.
+
+ In the name of Christ here begins Book I of the history.
+
Proposing as I do ...
+
From the Passion of our Lord until the death of Saint Martin four hundred and twelve
+ years passed.
+ Here ends the first Book, which covers five thousand, five hundred and ninety-six
+ years from the beginning of the world down to the death of Saint Martin.
+
+
+
+
+
+
L'élémentheadest employé habituellement pour marquer les titres de sections. Dans
+ d'anciens textes , les titres des textes conclusifs seront précédés de l'élément
+ trailer, comme dans cet exemple :
+
+
+ Les Mille et une Nuits
+
LES chroniques des Sassaniens, anciens rois de Perse, qui avaient étendu leur empire
+ dans les Indes, [...]
+
+ Histoire du Vizir puni
+
IL était autrefois un roi, poursuivit-il, qui avait un fils qui aimait
+ passionnément la chasse. Il lui permettait de prendre souvent ce divertissement ;
+ [...]
+
+
+
+ fin du tome premier.
+
+
+
+
+
L'élément head est aussi employé pour donner un titre à d'autres éléments, dans
+ une liste par exemple :
+ Les déictiques
+ sont des termes qui ne prennent leur sens que dans le cadre de la situation d'énonciation.
+ déictiquesicihierlàjetunousvous
+
+
+
+
+
+ 三國演義
+
+ 第一回 宴桃園豪杰三結義 斬黃巾英雄首立功
+
The head element is also used to mark headings of other units, such as lists:
+ With a few exceptions, connectives are equally
+ useful in all kinds of discourse: description, narration, exposition, argument. Connectivesaboveaccordinglyacross fromadjacent toagain
+
+
+
+
The head element is used for headings at all levels; software which treats (e.g.)
+ chapter headings, section headings, and list titles differently must determine the proper
+ processing of a head element based on its structural position. A head
+ occurring as the first element of a list is the title of that list; one occurring as the first
+ element of a div1 is the title of that chapter or section.
+
+
+
L'élément head est utilisé pour les titres de tous niveaux ; un logiciel qui
+ traitera différemment, par exemple, les titres de chapitres, les titres de sections et les
+ titres de listes, devra déterminer le traitement approprié de l'élément head
+ rencontré en fonction de sa position dans la structure XML. Un élément head qui est
+ le premier élément d'une liste est le titre de cette liste ; si l'élément head
+ apparaît comme le premier élément d'un élément div1, il sera considéré comme le titre
+ de ce chapitre ou de cette section.
+
+
+
+
+
+
+ heading for list labels
+ intitulé d'une liste d'étiquettes
+ encabezamiento para una lista de conceptos.
+ 列表標籤的標題
+ titolo per le etichette della lista
+ リストラベルの表題
+ contains the heading for the label or term column in a glossary list or similar structured
+ list.
+ contient l'intitulé pour la colonne d'étiquettes ou de
+ termes dans un glossaire ou dans une liste structurée de la même manière.
+ contiene el encabezamiento para la columna de términos
+ o conceptos en una lista de un glosario u otra lista de estructura similar.
+ 包含詞彙列表或結構類似的列表中標籤或專有名詞欄位的標題。
+ contiene il titolo per l'etichetta o la colonna termine
+ in un glossario o un'altra lista strutturata in modo simile.
+ リストなどにおけるラベルや,用語集などにおけ る語彙を示す.
+
+
+
+
+
+
+
+ The simple, straightforward statement of an
+ idea is preferable to the use of a worn-out expression. TRITESIMPLE, STRAIGHTFORWARDstop fighting, make peacedisorganizedfriendlycompletely honestnear death
+
+
+
+ Parlez-vous
+ anglosnob? Liste de quelques mots franglais et des propositions pour les remplacer : Ne dites pasMais dites... résumé, abrégé printemps démographique dévoituration (comme défenestration), dévoiturage(comme cambriolage, braquage) erreur, défaut, insecte, ("bogue" est inutile) mélanger (sauf si c'est avec un mixeur)
+
+
+
+
The headLabel element may appear only if each item in the list is preceded by a
+ label.
+
+
+
L'élément headLabel ne peut apparaître que si chaque item de la liste est
+ précédé d'un label.
+
+
+
+
+
+ heading for list items
+ 목록의 항목에 대한 표제부
+ 列表項目的標題
+ intitulé d'une liste d'items
+ encabezamiento de los ítems de una lista.
+ titolo per le voci della lista
+ contains the heading for the item or gloss column in a glossary list or similar structured
+ list.
+ 용어집 목록 또는 유사 구조의 목록에서 항목 또는 해설에 대한 표제부를 포함한다.
+ 包含詞彙列表或結構類似的列表中項目或註解欄位的標題。
+ 用語集などのリスト構造における各項目の見出しを示す.
+ contient l'intitulé pour la colonne d'items ou de
+ gloses dans un glossaire ou dans une liste semblablement structurée.
+ contiene el encabezamiento de una columna de ítems o
+ glosas en una lista de un glosario u otra lista de estructura similar.
+ contiene il titolo per l'a voce o la colonna glossa in
+ un glossario o un'altra lista strutturata in modo simile.
+
+
+
+
+
+
+
+ The simple, straightforward statement of an
+ idea is preferable to the use of a worn-out expression. TRITESIMPLE, STRAIGHTFORWARDstop fighting, make peacedisorganizedfriendlycompletely honestnear death
+
+
+
+ Parlez-vous
+ anglosnob? Liste de quelques mots franglais et des propositions pour les remplacer : : Ne dites pasMais dites... résumé, abrégé printemps démographique dévoituration (comme défenestration), dévoiturage(comme cambriolage, braquage) erreur, défaut, insecte, ("bogue" est inutile) mélanger (sauf si c'est avec un mixeur)
+
+
+
+
+ 經過五四運動,中國文學自文言文發展為白話文。 文言文白話文 你我他你們我們
+
+
+
+
The headItem element may appear only if each item in the list is preceded by a
+ label.
+
+
+
L'élément headItem est utilisé uniquement si chacun des items d'une liste est
+ précédé d'un élément label.
+
+
+
要素headItemは,子要素itemが要素labelを 伴う時にのみ使用されるだろう.
+
+
+
+
+
Notes, Annotation, and Indexing
Notes and Simple Annotation
Index Entries
Pre-existing Indexes
Auto-generated Indexes
+ contains a note or annotation.
+ contient une note ou une annotation
+ contiene una nota o aclaración
+ 包含附註或註釋。
+ contiene una nota o un'annotazione
+ 注釈・コメント.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ indicates whether the copy text shows the exact place of reference for the note.
+ indique si l'exemplaire du texte montre l'emplacement
+ de référence exact pour la note
+ indica si el texto de copia muestra el lugar exacto
+ de referencia para una nota.
+ 說明來源文件是否指出附註的確切參照位置。
+ indica se il testo copia mostra l'esatta posizione di
+ riferimento della nota.
+ 当該注釈がある場所への参照は,正確にその場所を示しているかどうか.
+
+ true
+
+
In modern texts, notes are usually anchored by means of explicit footnote or endnote
+ symbols. An explicit indication of the phrase or line annotated may however be used
+ instead (e.g. page 218, lines 3–4). The anchored attribute indicates
+ whether any explicit location is given, whether by symbol or by prose cross-reference. The
+ value true indicates that such an explicit location is indicated in the copy
+ text; the value false indicates that the copy text does not indicate a specific
+ place of attachment for the note. If the specific symbols used in the copy text at the
+ location the note is anchored are to be recorded, use the n attribute.
+
+
+
Dans des textes modernes, les notes sont habituellement ancrées au moyen d’appels de
+ notes explicites (pour des notes de bas de page ou des notes de fin de texte). A la place, une indication explicite de
+ l'expression ou de la ligne annotée peut cependant être employée (par exemple page 218,
+ lignes 3–4). L'attribut anchored indique si un emplacement est donné
+ explicitement ou s'il est exprimé par un symbole ou par un renvoi. La valeur
+ true indique qu'un endroit explicite est indiqué dans le texte ; la valeur
+ false indique que le texte n'indique pas un endroit spécifique d'attachement
+ pour la note. Si des symboles spécifiques utilisés dans le texte à l'endroit où la note
+ est ancrée doivent être enregistrés, l'attribut n sera utilisé.
+
+
+
+ points to the end of the span to which the note is attached, if the note is not embedded
+ in the text at that point.
+ pointe vers la fin d'un passage auquel la note est
+ attachée, si la note n'est pas enchâssée dans le texte à cet endroit
+ indica el final de un periodo al cual una nota está
+ enlazada, si la nota no está insertada en ese punto del texto.
+ 如果附註不是嵌在正文中,則用以標明附註所註段落的終點。
+ rimanda alla fine della porzione di testo a cui la
+ nota è allegata nel caso in cui la nota non sia inclusa nel testo in quel punto.
+ 当該注釈・コメントの終了点を示す.(当該注釈が注釈先の場所に埋め込 まれていない場合)
+
+
+
This attribute is retained for backwards compatibility; it may be removed at a subsequent
+ release of the Guidelines. The recommended way of pointing to a span of elements is by
+ means of the range function of XPointer, as further described in .
+
+
+
Cet attribut est conservé pour assurer un arrière-plan compatible ; il sera supprimé dans la
+ prochaine mise à jour des Recommandations. La procédure recommandée pour pointer en
+ direction d'une expansion des éléments est de le faire au moyen de la fonction
+ range de XPointer, telle que la description en est faite à .
+
+
+
+
+
In the following example, the translator has supplied a footnote
+containing an explanation of the term translated as "painterly":
+And yet it is not only
+in the great line of Italian renaissance art, but even in the
+painterly Malerisch. This word has, in the German, two
+distinct meanings, one objective, a quality residing in the object,
+the other subjective, a mode of apprehension and creation. To avoid
+confusion, they have been distinguished in English as
+picturesque and
+painterly respectively. style of the
+Dutch genre painters of the seventeenth century that drapery has this
+psychological significance.
+
+
For this example to be valid, the
+code MDMH must be defined elsewhere, for example by
+means of a responsibility statement in the associated TEI header:
+
+
+ translation from German to English
+ Hottinger, Marie Donald Mackie
+
+
+
+
+
+
J'écris dans la marge... Je vais à la ligne. Je renvoie à une
+ note J'aime beaucoup les renvois en bas de page, même si
+ je n'ai rien de particulier à y préciser.en bas de page.
The global n attribute may be used to supply the symbol or number used to mark the
+ note's point of attachment in the source text, as in the
+ following example:
+ Mevorakh b. Saadya's mother, the matriarch of the
+ family during the second half of the eleventh century, The
+ alleged mention of Judah Nagid's mother in a letter from 1071 is, in fact, a reference to
+ Judah's children; cf. above, nn. 111 and 54. is well known from Geniza documents
+ published by Jacob Mann.
+
However, if notes are numbered in sequence and their
+ numbering can be reconstructed automatically by processing software, it may well be considered
+ unnecessary to record the note numbers.
+
+
+
L'attribut globaln indique le
+ symbole ou le nombre utilisé pour marquer le point d'insertion
+ dans le texte source, comme dans l'exemple suivant :
+Mevorakh b. Saadya's
+ mother, the matriarch of the family during the second half of the
+ eleventh century, The alleged
+ mention of Judah Nagid's mother in a letter from 1071 is, in fact,
+ a reference to Judah's children; cf. above, nn. 111 and
+ 54. is well known from Geniza documents published by Jacob
+ Mann. Cependant, si les notes sont ordonnées et numérotées
+ et qu’on veuille reconstruire automatiquement leur numérotation
+ par un traitement informatique, il est inutile d’enregistrer le
+ numéro des notes.
+
+
+
+
+
+
+
+
+ index entry
+ 색인 표제 항목
+ 索引項目
+ entrée d'index
+ entrada de un índice.
+ voce di indice
+ marks a location to be indexed for whatever purpose.
+ 어떤 목적으로 사용할 수 있도록, 색인된 위치를 표지한다.
+ 標誌一個因某種目的而被索引的位置。
+ 索引項目化されたものの場所を示す.
+ marque un emplacement à indexer dans un but quelconque.
+ marca un punto para ser indexado por cualquier criterio.
+ segna la posizione da indicizzare per qualsiasi scopo.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ a single word which follows the rules defining a
+ legal XML name (see ), supplying a name to specify which index (of several) the index entry belongs to.
+ 색인 표제 항목의 색인을 명시하기 위한 이름을 제시한다.
+ 提供該索引項目所屬索引名稱。
+ 索引項目となったものを特定する名前を示す.
+ donne un nom pour préciser à quel index (parmi
+ plusieurs) appartient l'entrée d'index.
+ proporciona un nombre para especificar a qué índice
+ (de entre varios) pertence la entrada de íncide.
+ fornisce un nome per specificare a quale indice (o
+ indici) la voce di indice appartiene.
+
+
+
This attribute makes it possible to create multiple indexes for a text.
+
+
+
Cet attribut permet de créer plusieurs index pour un texte donné.
+
+
+
当該属性は,複数の索引を作ることができる.
+
+
+
+
+ David's other principal backer, Josiah ha-Kohen
+ Josiah ha-Kohen b. Azarya b. Azarya, son of one of the last gaons of Sura Sura was David's own first cousin.
+
+
+ Ils [les
+ onagres] me venaient de mon grand-père maternel, l'empereur Saharil, fils d'Iakhschab, fils d'Iaarab, fils de Kastan
+
+
+
+ 道家思想的主要代表家為老子。 老子姓李名耳,字伯陽,有人說又稱老聃。在傳說中,老子一生下來時,就具有白色的眉毛及鬍子,所以被後來稱為老子。相傳生活在春秋時期。春秋時期 著有《道德經》,是中國古代著名思想家。
+
+
+
+
+
Graphics and Other Non-textual Components
+ indicates the location of any form of external media such as
+ an audio or video clip etc.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Figure One: The View from the Bridge
+ A Whistleresque view showing four or five sailing boats in the foreground, and a
+ series of buoys strung out between them.
+
+
+
+
+
+
+ Ten seconds of bellringing sound
+
+
+
+
+
+
+ A 45 minute video clip to be displayed in a window 500
+ px wide
+
+
+
+
+
+
+
+ 維納斯
+ 波提且利 1484-1486年 畫布、蛋彩 佛羅倫斯,烏菲滋美術館
+
+
+
+
+
The attributes available for this element are not appropriate in
+all cases. For example, it makes no sense to specify the temporal duration of a
+graphic. Such errors are not
+currently detected.
+
The mimeType attribute must be used to specify the MIME media type of
+the resource specified by the url attribute.
+
+
+
+
+
+ indicates the location of a graphic or illustration, either forming
+ part of a text, or providing an image of it.
+ 인라인 그래픽, 삽화, 또는 도형의 위치를 표시한다.
+ 指出文字文件中內含的圖形、插圖、或圖表的位置。
+ テキスト列中にある図,絵,図表の場所を示す.
+ indique l'emplacement d'une image, d'une illustration ou
+ d'un schéma intégrés.
+ indica la localización de un gráfico, ilustración o
+ figura.
+ indica la posizione di un grafico, di una illustrazione o
+ immagine.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Figure One: The View from the Bridge
+ A Whistleresque view showing four or five sailing boats in the foreground, and a
+ series of buoys strung out between them.
+
+
+
+
+
+
+
+ Figure Une : Jan van Eyck, La Vierge du chancelier Rolin
+
Si, attiré par la curiosité, on a l'imprudence de l'approcher d'un peu trop prés, c'est fini, on est pris pour tout le temps que peut durer l'effort d'une attention soutenue ; on s'extasie devant la finesse du détail ... il va toujours plus loin, franchit une à une les croupes des collines verdoyantes ; se repose un moment sur une ligne lointaine de montagnes neigeuses; pour se perdre ensuite dans l'infini d'un ciel à peine bleu, où s'estompent de flottantes nuées.
The mimeType attribute should be used to supply the MIME media type of the image
+ specified by the url attribute.
Within the body of a text, a graphic element indicates the
+ presence of a graphic component in the source itself. Within the context of a facsimile or sourceDoc element, however,
+ a graphic element provides an additional digital representation of some part of the source being encoded.
+
+
+
+
L'attribut mimeType doit être utilisé pour spécifier le type MIME de l'image
+ référencée par l'attribut url.
+
+
+
属性mimeTypeは,属性urlが指定する画像のMIME タイプを示すために使われるべきである.
+
+
+
+
+
+
+
+ provides encoded binary data representing an inline graphic,
+ audio, video or other object.
+ 인라인 그래픽 또는 다른 개체를 표상하는 부호화된 이진 데이터를 제시한다.
+ 標記用來表示文本中圖檔或其他檔案的二進位資料。
+ 行中の画像やその他のオブジェクトを示す,符号化されたバイナリデータを 示す.
+ fournit des données binaires encodées qui représentent
+ une image ou un autre objet insérés dans le texte ou dans un autre objet.
+ proporciona datos binarios codificados que representan un
+ objeto gráfico u otro tipo de objeto inserido en el texto.
+ assegna dati binary codificati che rappresentano un
+ grafico o altro oggetto
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ The encoding used to encode the binary data. If not specified, this is assumed to be
+ Base64.
+ 부호화는 이진 데이터의 부호 변환 방식이다. 별도로 명시되어 있지 않다면, Base64로 간주된다.
+ 標記該二進位資料時所使用到的編碼。若未特別指明,則假定為使用Base64編碼
+ 当該バイナリデータの符号化方式.指定がなければ, Base64 と想定する.
+ l'encodage utilisé pour encoder les données binaires.
+ Sans autre spécification il est supposé s'agir de Base64.
+ La codificación usada para codificar los datos
+ binarios. Si no se espeficica, se supone que es Base64.
+ Codifica utilizzata per codificare dati binari. Se
+ non specificata si presume che sia Base64
+
+
+
+
+
+
+ R0lGODdhMAAwAPAAAAAAAP///ywAAAAAMAAwAAAC8IyPqcvt3wCcDkiLc7C0qwy
+ GHhSWpjQu5yqmCYsapyuvUUlvONmOZtfzgFzByTB10QgxOR0TqBQejhRNzOfkVJ
+ +5YiUqrXF5Y5lKh/DeuNcP5yLWGsEbtLiOSpa/TPg7JpJHxyendzWTBfX0cxOnK
+ PjgBzi4diinWGdkF8kjdfnycQZXZeYGejmJlZeGl9i2icVqaNVailT6F5iJ90m6
+ mvuTS4OK05M0vDk0Q4XUtwvKOzrcd3iq9uisF81M1OIcR7lEewwcLp7tuNNkM3u
+ Nna3F2JQFo97Vriy/Xl4/f1cf5VWzXyym7PH hhx4dbgYKAAA7
+
+
+
+
+
+
Reference Systems
Using the xml:id and n Attributes
Creating New Reference Systems
Referencing system derived from markup
Referencing systems based on project conventions
Milestone
+Elements
+ borne
+ marks a boundary point separating any kind of section of a text, typically but not
+ necessarily indicating a point at which some part of a standard reference system changes, where
+ the change is not represented by a structural element.
+ 텍스트의 절을 분할하는 경계점을 표지한다. 이는 표준 참조 시스템에서의 변화로 표시되며, 구조적 요소에
+ 의해서는 표시되지 않는다.
+ 標明文本中由標準參照系統變更所指示的任何區塊分界點,並且該章節未以任何結構性元素標記。
+ 当該セクションが,構造要素により表現することができない場合に,標準的
+ な参照機能により,テキストの各種セクション間にある境界点を示す.
+ marque un point
+ permettant de délimiter les sections d'un
+ texte selon un autre systeme que les éléments de structure ; une
+ balise de ce type marque une frontière.
+ marca un punto de frontera que separa cada tipo de
+ sección de un texto, indicado por cambios en el sistema de referencia estándard, donde la
+ sección no es representada por un elemento estructural.
+ segnala il limite che separa ogni tipo di sezione di un
+ testo, come indicato da cambiamenti nel sistema di riferimento standard, qualora la sezione non
+ sia rappresentata da un elemento strutturale.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ ... ...
+
+
+ ...
+ ...
+
+
+ ...
+ ...
+
+
+
For this element, the global n attribute indicates the new number or other value
+ for the unit which changes at this milestone. The special value
+ unnumbered should be used in passages which fall outside the normal
+ numbering scheme, such as chapter or other headings, poem numbers or titles, etc.
+
The order in which milestone elements are given at a given point is not normally significant.
+
+
+
+
+
Pour cet élément, l'attribut global n affecte un nouveau numéro ou une autre
+ valeur à l'unité qui change à partir de l'élément milestone. La valeur
+ unnumbered doit être utilisée pour les passages qui sortent du
+ système normal de numérotation (par ex. titres de chapitres, numéros ou titres de poèmes, ou
+ noms des personnages qui prennent la parole dans une pièce de théâtre).
+
L'ordre dans lequel apparaissent les éléments milestone à un endroit donné n'est en
+ principe pas signifiant.
+
+
+
+
+
+ gathering begins
+ marks the point in a transcribed codex at which a new
+ gathering or quire begins.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
By convention, gb elements should appear at the start
+ of the first page in the gathering. The global n
+ attribute indicates the number or other value used to identify
+ this gathering in a collation.
+
The type attribute may be used to further
+ characterize the gathering in any respect.
+
+
+
+
+
+ page break
+ 페이지 바꿈
+ 分頁
+ saut de page
+ cambio de página
+ interruzione di pagina
+ marks the start of a new page in a paginated document.
+ 표준 참조 시스템에서 텍스트 페이지와 다음 페이지 사이의 경계를 표지한다.
+ 以標準參照系統來標記頁與頁之間的分界線。
+ テキストのページ境界を,標準的な参照システム示す.
+ marque le début d'une
+ page de texte dans un document paginé.
+ marca la frontera entre una página de un texto y la
+ siguiente en un sistema de referencia estándard.
+ indica il limite tra una pagina di un testo e la
+ successiva in un sistema di riferimento standard
+
+
+
+
+
+
+
+
+
+
+
+
+
Page numbers may vary in different editions of a text.
+
+
...
+ ...
+ ...
+
+
+
+
A page break may be associated with a facsimile image of the page it introduces by means of
+ the facs attribute
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
A pb element should appear at the start of the page
+ which it identifies. The global n attribute indicates
+ the number or other value associated with this page. This will
+ normally be the page number or signature printed on it, since the
+ physical sequence number is implicit in the presence of the
+ pb element itself.
+
The type attribute may be used to characterize the
+ page break in any respect, for example as word-breaking or
+ not.
+
+
+
Un élément pb apparaît au début de la page à laquelle
+ il se rapporte. L'attribut global n donne un numéro ou
+ une autre valeur associée à cette page. Ce sera normalement le
+ numéro de page ou la signature qui y est imprimée, puisque le
+ numéro d'ordre matériel est implicite avec l'élément pb
+ lui-même.
+
L' attribut type sera employé pour indiquer toutes ses
+ caractéristiques du saut de page, par exemple comme coupure de mot ou non.
+
+
+
+
+
+ line break
+ 행 바꿈
+ 分行
+ saut de ligne
+ salto de línea
+ interruzione di riga
+ marks the start of a new (typographic) line in some edition or version of a text.
+ 텍스트의 편집 또는 버전에서 새로운 (인쇄상의) 행 시작을 표지한다.
+ 標記某版本文本裡 (在印刷上) 的新起行。
+ ある版における新しい(印刷上の)行の始まりを示す.
+ marque le début d'une nouvelle ligne (typographique) dans
+ une édition ou dans une version d'un texte.
+ marca el comienzo de una nueva línea (topográfica) en
+ alguna edición o versión del texto.
+ segna l'inizio di una nuova riga (tipografica) in qualche
+ edizione o versione di un testo.
+
+
+
+
+
+
+
+
+
+
+
+
+
This example shows typographical line breaks within metrical lines, where they occur at different
+ places in different editions:
+
+ Of Mans First Disobedience, and the Fruit
+ Of that Forbidden Tree, whose mortal tast
+ Brought Death into the World, and all our woe,
+
+
+
+
Cet exemple montre les sauts de ligne dans des vers, qui apparaissent à différents endroits selon les éditions.
+
+ Of Mans First Disobedience, and the Fruit
+ Of that Forbidden Tree, whose mortal tast
+ Brought Death into the World, and all our woe,
+
+
+
+
This example encodes typographical line breaks as a means of
+preserving the visual appearance of a title page. The break
+attribute is used to show that the line break does not (as elsewhere)
+mark the start of a new word.
+
+ With Additions, ne-ver before Printed.
+
+
+
+
Cet exemple encode les sauts de ligne pour montre l'apparence visuelle d'une page titre. L'attribut break est utilisé pour montrer que le saut de ligne ne marque pas le début d'un nouveau mot.
+
+
+ L'auteur susdict supplie les Lecteurs
+benevoles, soy reserver à rire au
+soi-xante & dixhuytiesme livre.
+
+
+
+
+
By convention, lb elements should appear at the point in the text where a new line
+ starts. The n attribute, if used, indicates the number or other value associated
+ with the text between this point and the next lb element, typically the sequence
+ number of the line within the page, or other appropriate unit. This element is intended to be
+ used for marking actual line breaks on a manuscript or printed page, at the point where they
+ occur; it should not be used to tag structural units such as lines of verse (for which the
+ l element is available) except in circumstances where structural units cannot
+ otherwise be marked.
+
The type attribute may be used to characterize the
+ line break in any respect. The more specialized attributes
+ break, ed, or edRef should be preferred when the
+ intent is to indicate whether or not the line
+ break is word-breaking, or to note the source from which it
+ derives.
+
+
+
Par convention, l'élément lb apparaît à l’endroit du texte où commence une nouvelle
+ ligne. L'attribut n, s’il est utilisé, donne un nombre ou une autre valeur associée
+ au texte entre ce point et l’élément suivant lb, spécifiquement le numéro de la ligne
+ dans la page, ou une autre unité de mesure appropriée. Cet élément est prévu pour être employé
+ pour marquer un saut de ligne sur un manuscrit ou sur une page imprimée, à l’endroit où il se
+ survient; on n’utilisera pas de balisage structurel comme une succession de vers (pour lequel
+ l’élément l est disponible) sauf dans le cas où des blocs structurés ne peuvent pas
+ être marqués autrement.
+
L'attribut type sera employé pour caractériser toute espèce de caractéristiques
+ du saut de ligne, sauf la coupure des mots (indique par
+ l'attribut break) ou la source concernée.
+
+
+
+
+
+
+ column break
+ 열 바꿈
+ 分段
+ saut de colonne
+ cambio de columna
+ interruzione di colonna
+ marks the beginning of a new column of a text on a
+ multi-column page.
+ 표준 참조 시스템에서 텍스트의 한 열과 다음 열 사이의 경계를 표지한다.
+ 用標準參照系統來標明文本段落之間的分界。
+
+ テキストの段と段の境界を,標準的な参照システムにより示す.
+ marque le
+ début d'une nouvelle colonne de texte sur une page multi-colonne.
+ indica la frontera entre una columna de un texto y la siguiente en un sistema de referencia estándard.
+ indica il limite tra una colonna di un testo e la successiva in un sistema di riferimento standard
+
+
+
+
+
+
+
+
+
+
+
+
+
Markup of an early English dictionary printed in two columns:
+
+
+
+ , a Pit to hold Spring-Water:
+ In the Art of War, a Depth the Miner
+ sinks into the Ground, to find out and disappoint the Enemies Mines,
+ or to prepare one.
+ To , to wallow, or
+ lie groveling.
+
+
+ , the greatest Measure for dry Things,
+ containing five Chaldron.
+ , the greatest of
+ Sea-Fishes.
+
+
+
+
On this element, the global n attribute indicates the number or other value associated with the column
+ which follows the point of insertion of this cb element. Encoders should adopt a clear and consistent policy as to
+ whether the numbers associated with column breaks relate to the physical
+ sequence number of the column in the whole text, or whether columns are
+ numbered within the page.
+ The cb element is placed at the head of the
+ column to which it refers.
+
+
+
L'attribut global n donne un nouveau numéro ou une autre valeur à la
+ colonne qui suit l'élément cb. Les encodeurs doivent faire un choix clair,
+ et s'y tenir, entre l'option consistant à se fonder sur la séquence physique des
+ colonnes dans le texte entier, et celle qui consiste à se fonder sur la numérotation
+ des colonnes à l'intérieur de la page. L'élément cb
+ apparaît en haut de la colonne à laquelle il se rapporte.
Methods of Encoding Bibliographic References and Lists of References
Components of Bibliographic References
Analytic, Monographic, and Series Levels
+ analytic level
+ 분석적 층위
+ 分析層書目
+ niveau analytique
+ nivel analítico.
+ livello analitico
+ contains bibliographic elements describing an item (e.g. an article or poem) published
+ within a monograph or journal and not as an independent publication.
+ 독립 출판이 아닌, 단행본 또는 학술지 내에 포함되어 출판된 항목(예를 들어, 논문 또는 시)을
+ 기술하는 참고문헌 요소를 포함한다.
+ 包含某一項目 (例如詩或文章) 的書目元素,該項目並非獨立出版品,而是刊登在專題著作或是期刊當中。
+ 独立した出版物ではなく,書籍や雑誌に収録されている作品の書誌情報を記 述する.
+ contient des éléments descriptifs qui décrivent la
+ bibliographie d'une ressource (par exemple un poème ou un article de revue) publiée à
+ l'intérieur d'une monographie ou d'une ressource et non publiée de façon indépendante.
+ contiene los elementos bibliográficos que describen un
+ ítem (p.ej. un artículo o un poema) publicado dentro de una monografía o revista y no como una
+ publicación independiente.
+ contiene elementi bilbiografici che descrivono un'opera
+ (ad esempio un articolo a una poesia) pubblicata in una monografia o una rivista e non come
+ pubblicazione indipendente.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Chesnutt, David
+ Historical Editions in the States
+
+
+ Computers and the Humanities
+
+ 25.6
+ (December, 1991):
+ 377–380
+
+
+
+
+
+
+
May contain titles and statements of responsibility (author, editor, or
+ other), in any order.
+
The analytic element may only occur within a biblStruct, where its use
+ is mandatory for the description of an analytic level bibliographic item.
+
+
+
Cet élément peut contenir des titres et des mentions de responsabilité
+ (auteur, éditeur scientifique, ou autre), et cela dans n'importe quel ordre.
+
L'élément analytic n'est disponible qu'à l'intérieur de l'élément
+ biblStruct, où il faut l'utiliser pour encoder la description bibliographique d'une
+ partie composante.
+
+
+
+
+
+ monographic level
+ 단행본 층위
+ 專題層書目
+ niveau monographique
+ nivel monográfico.
+ monografia
+ contains bibliographic elements describing an item (e.g. a book or journal) published as an
+ independent item (i.e. as a separate physical object).
+ 독립 항목(즉, 독립된 물리적 개체)으로 출판된 항목(예를 들어 단행본 또는 학술지)을 기술하는
+ 참고문헌 요소를 포함한다.
+ 包含某一項目 (例如書或期刊) 的書目元素, 該項目為一獨立出版品 (即未附屬於其他出版品) 。
+ 独立したもの(例えば,物理的に独立したもの)として出版された対象(例え ば,書籍や雑誌)の書誌情報項目を示す.
+ contient des données bibliographiques décrivant un objet
+ (par exemple une monographie ou une revue) publié comme un élément indépendant (i.e.
+ matériellement séparé.
+ contiene los elementos bibliográficos que describen un
+ ítem (p.ej. un libro o revista) publicado independientemente (es decir, como un objeto físico
+ separado).
+ contiene elementi bilbiografici che descrivono un'opera
+ (ad esempio un libro o una rivista) pubblicanti indipendentemente (cioè come un singolo
+ oggetto).
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Chesnutt, David
+ Historical Editions in the States
+
+
+ Computers and the Humanities
+
+ (December, 1991):
+
+ 25.6
+ 377–380
+
+
+
+
+
+
+
+
+
+
+ Leo Joachim
+ Frachtenberg
+
+
+ Lower Umpqua Texts
+
+ New York
+ Columbia University Press
+ 1914
+
+
+
+ Columbia University Contributions to
+ Anthropology
+ 4
+
+
+
+
+
+
May contain specialized bibliographic elements, in a prescribed order.
+
The monogr element may only occur only within a biblStruct, where its use
+ is mandatory for the description of a monographic-level bibliographic item.
+
+
+
Cet élément contient des éléments de description bibliographique spécialisés,
+ dans un ordre prescrit.
+
L'élément monogr n'est disponible que dans l'élément biblStruct, où il faut
+ l'utiliser pour encoder la description bibliographique d'une monographie.
+
+
+
+
+
+ series information
+ 연간물 정보
+ 叢書資訊
+ informations sur la série
+ series de información
+ informazioni sulla collana
+ contains information about the series in which a book or other bibliographic item has
+ appeared.
+ 책 또는 다른 참고문헌 항목이 나타나는 연간물 정보를 포함한다.
+ 包含某書目項目所屬的叢書資訊。
+ 書籍または他の書誌項目のシリーズに関する情報を示す.
+ contient une information sur la série dans laquelle une
+ monographie ou un autre élément bibliographique ont paru.
+ contiene información sobre las series en que un libro u
+ otro elemento bibliográfico ha aparecido.
+ contiene indicazioni sulla collana in cui un libro o
+ un'altra unità bibliografica sono stati pubblicati.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Halbgraue Reihe zur Historischen Fachinformatik
+
+ Herausgegeben von
+ Manfred Thaller
+ Max-Planck-Institut für Geschichte
+
+ Serie A: Historische Quellenkunden
+ Band 11
+
+
+
+
+
+
+
Titles, Authors, and Editors
+ auteur
+ in a bibliographic reference, contains the name(s) of an
+ author, personal or corporate, of a work; for example in the same
+ form as that provided by a recognized bibliographic name authority.
+ 참고문헌에 작가, 단독 저자, 공동 저자의 이름을 포함한다; 서지 항목의 책임에 관한 1차적 진술.
+ 在書目參照中,包含一件作品的作者 (群) 姓名,無論是個人或是團體性質;這也是書目項目責任歸屬的主要陳述。
+ 書誌情報における,著作者(個人・団体)の名前を示す.書誌項目における歴 任者を示す第一位の記述を示す.
+ dans une référence bibliographique contient le nom de la
+ (des) personne(s) physique(s) ou du collectif, auteur(s) d'une oeuvre ; par exemple dans la même forme que celle utilisée par une référence bibliographique reconnue.
+ en una referencia bibliográfica, contiene el nombre del
+ autor/es, personal o empresa de una obra; la declaración esencial de responsabilidad para
+ cualquier ítem bibliográfico.
+ in un riferimento bibliografico contiene il nome
+ dell'autore (o degli autori), personale o collettivo, di un'opera; è la dichiarazione di
+ responsabilità primaria di ciascuna unità bibliografica.
+
+
+
+
+
+
+
+
+
+
+ British Broadcasting Corporation
+ La Fayette, Marie Madeleine Pioche de la Vergne, comtesse de (1634–1693)
+ Anonymous
+ Bill and Melinda Gates Foundation
+ Beaumont, Francis and
+ John Fletcher
+
+ British Broadcasting
+ Corporation: Radio 3 Network
+
+
+
+
+ La Fayette, Marie Madeleine Pioche de la Vergne, comtesse de (1634–1693)
+ Anonyme
+ Erckmann-Chatrian
+
+ Association relative à la télévision européenne
+
+
+
+
+
+ 中央日報
+ 中央通訊社董事長馬星野
+
+
+
+
Particularly where cataloguing is likely to be based on the
+ content of the header, it is advisable to use a generally recognized
+ name authority file to supply the content for this element. The
+ attributes key or ref may also be used to
+ reference canonical information about the author(s) intended from any
+ appropriate authority, such as a library catalogue or online
+ resource.
+
In the case of a broadcast, use this element for the name of
+ the company or network responsible for making the broadcast.
+
Where an author is unknown or unspecified, this element may contain
+text such as Unknown or
+Anonymous. When the appropriate TEI modules are
+in use, it may also contain detailed tagging of the names used for people, organizations or
+places, in particular where multiple names are given.
+
+
+
Il est conseillé d'utiliser des listes d'autorité reconnues
+ pour trouver la forme exacte des noms de personnes, en particulier
+ lorsque le catalogage repose sur le contenu de l'en-tête TEI. Les
+ attributs key ou ref seront aussi employés
+ pour donner une référence canonique documentant l'auteur concerné
+ grâce à une autorité appropriée, comme le catalogue d'une
+ bibliothèque ou une ressource en ligne.
+
Dans le cas d'une émission, cet élément sert à encoder le nom de la société ou du
+ réseau qui diffuse le programme.
+
+
+
+
+
+
+
+ contains a secondary statement of responsibility for a bibliographic item, for example the name of an
+ individual, institution or organization, (or of several such) acting as editor, compiler,
+ translator, etc.
+ 서지 항목의 책임에 관한 2차적 진술, 예를 들어, 편집, 번역 등의 작업을 한 편집, 개인, 기관,
+ 또는 기구의 이름
+ 書目項目的次要責任歸屬,例如扮演編輯、編譯、翻譯等角色的個人、機構或組織 (或其他類似者) 的名稱。
+ 書誌情報における,第二位の責任者を示す.個人,団体,組織, 編集者,編 纂者,翻訳者の名前など.
+ mention de responsabilité secondaire pour un item
+ bibliographique, par exemple le nom d'une personne, d'une institution ou d'un organisme (ou de
+ plusieurs d'entre eux) comme éditeur scientifique, compilateur, traducteur, etc.
+ declaración secundaria de responsabilidad para un ítem
+ bibliográfico, por ejemplo un nombre particular, o institucional (o cualquier otro) que ha
+ actuado como editor, compilador, traductor, etc.
+ è la dichiarazione di responsabilità secondaria di
+ ciascuna unità bibliografica, ad esempio il nome di un individuo, di un'istituzione o
+ organizzazione che agisce come curatore, compilatore, traduttore, ecc.
+
+
+
+
+
+
+
+
+
+
+
+ Eric Johnson
+ John Tenniel
+
+
+
+
+ Pierre-Jules Hetzel
+ George Roux
+
+
+
+
+ 王大明
+ 陳紅
+
+
+
+
A consistent format should be adopted.
+
Particularly where cataloguing is likely to be based on the content of the header, it is
+ advisable to use generally recognized authority lists for the exact form of personal names.
+
+
+
+
Il est conseillé d'adopter un format cohérent.
+
Particulièrement lorsque le catalogage repose sur le contenu de l'en-tête TEI, il est
+ conseillé d'utiliser des listes d'autorité reconnues pour trouver la forme exacte des noms de
+ personnes.
+
+
+
一貫した形式で記述されるべきである.
+
特に,書誌情報をヘダー内容に依存する際には,個人名の正確な形のリス トを使用した方がよい.
+
+
+
+
+
+ statement of responsibility
+ 책임성 진술
+ 責任陳述
+ mention de responsabilité
+ declaración de responsabilidad
+ dichiarazione di responsabilità
+ supplies a statement of responsibility for the intellectual content of a text, edition,
+ recording, or series, where the specialized elements for authors, editors, etc. do not suffice
+ or do not apply. May also be used to encode information about individuals or organizations
+ which have played a role in the production or distribution of a bibliographic work.
+ 텍스트, 편집, 녹음 또는 총서의 지적 내용에 대한 책임성 진술을 제시한다. 여기에서 작가, 편집자
+ 등에 대한 특별한 요소는 충분치 않거나 적용되지 않는다.
+ 當未使用作者、編輯者等特定元素,或元素內容不足時,在此補充說明文件、版本、記錄、或是叢書的智慧內容所屬負責人的責任陳述。
+ 著者や編集者など特定の役割を示す要素が充分ではない場合に,テキスト, 版,記録などの知的内容に関する責任を示す.
+ indique la responsabilité quant au contenu
+ intellectuel d'un texte, d'une édition, d'un enregistrement ou d'une publication en série,
+ lorsque les éléments spécifiques relatifs aux auteurs, éditeurs, etc. ne suffisent pas ou ne
+ s'appliquent pas.
+ proporciona la declaración de la responsabilidad para el
+ contenido intelectual de un texto, edición, grabación o serie, donde no basten o no se apliquen
+ los elementos especializados para autores, editores, etc.
+ fornisce una dichiarazione di responsabilità per qualcuno
+ responsabile del contenuto intelletuale di un testo, curatela, registrazione o collana, nel caso
+ in cui gli elementi specifici per autore, curatore ecc. non sono sufficienti o non applicabili.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ transcribed from original ms
+ Claus Huitfeldt
+
+
+
+
+
+
+ Nouvelle édition originale
+ Geneviève Hasenohr
+
+
+
+
+
+
+ converti en langage SGML
+ Alan Morrison
+
+
+
+
+
+
+ 謄寫自原始手稿
+ 徐大明
+
+
+
+
+
+
+ 轉換成SGML編碼
+ 許雁
+
+
+
+
+
+
+ converted to XML encoding
+ Alan Morrison
+
+
+
+
+
+
+
+
+
+
+ responsibility
+ 책임성
+
+ responsabilidad
+ responsabilité
+ responsabilità
+ contains a phrase describing the nature of a person's intellectual responsibility, or an organization's role
+ in the production or distribution of a work.
+ 개인의 지적 책임성에 관한 특성을 기술하는 구를 포함한다.
+ 包含一個詞彙,來描述個人智慧責任的類型。
+ 人物の知的責任の性質を表す一節を示す.
+ contient une expression décrivant la nature de la
+ responsabilité intellectuelle d'une personne.
+ contiene un sintagma que describe la naturaleza de la
+ responsabilidad intelectual de una persona.
+ contiene una frase che descrive la natura della
+ responsabilità intellettuale di una persona.
+
+
+
+
+
+
+
+
+
+
+
+ compiler
+ Edward Child
+
+
+
+
+
+
+ compilateur
+ Edward Child
+
+
+
+
+
+
+ 編輯
+ 林偉
+
+
+
+
+
The attributes key or ref, inherited from the class att.canonical may be used to indicate the kind of responsibility in a normalized
+ form, by referring directly (using ref) or indirectly (using key) to a
+ standardized list of responsibility types, such as that maintained by a naming authority, for
+ example the list maintained at
+ for bibliographic usage.
+
+
+
Les attributs key or ref, issus de la classe att.canonical, peuvent être utilisés pour indiquer le type de responsabilité sous
+ une forme normalisée, en faisant référence directement (par l'utilisation de ref)
+ ou indirectement (par l'utilisation de key) à une liste normalisée contenant des types de
+ responsabilité, comme celle qui est maintenue par une autorité de nommage, par exemple la
+ liste à usage bibliographique.
+
+
+
+
+
+
+
+
+
+ titre
+ contains a title for any kind of work.
+ 다양한 종류의 작업에 대한 전체 제목을 제공한다.
+ 包含任何種類作品的完整題名
+ 。
+ 作品の完全なタイトルを示す.
+ contient le titre complet d'une oeuvre quelconque
+ contiene el título completo de una obra de
+ cualquier tipo.
+ contiene il titolo completo di una qualsiaisi opera.
+
+
+
+
+
+
+
+
+
+
+
+
+ indicates the bibliographic level for a title, that is, whether
+ it identifies an article, book, journal, series, or
+ unpublished material.
+ 제목에 대한 서지적 층위를 나타내어, 논문, 책,
+ 학술지, 총서, 미간행의 여부를 식별한다.
+ 指出題名的書目層次,即該題名之所指可以是文章、書籍、期刊、叢書或未出版的項目。
+ タイトルの書誌情報のレベルを示す.例えば,論文,書籍,雑誌,叢書, 非刊行物など.
+ indique le niveau
+ bibliographique d'un titre, c'est-à-dire si ce titre
+ identifie un article, un livre, une revue, une collection,
+ ou un document non publié
+ indica el tipo bibliográfico
+ para un título, si este se identifica como un artículo,
+ libro, revista, colección o material inédito.
+ indica il livello
+ bibliografico di un titolo, ovvero se indentifica un
+ articolo, un libro, una rivista, una collana, o materiale
+ non pubblicato.
+
+
+
+ analytic
+ 분석적
+ analytique
+ analitico
+ analítico
+ the title applies to an analytic item, such as an
+ article, poem, or other work published as part of a larger item.
+ 분석적 제목(보다
+ 큰 항목의 일부로 출판된 논문, 시, 또는 기타 항목)
+ 分析層題名
+ (文章、詩、或其他隸屬於一個較大作品的項目)
+ título
+ analítico (de artículo, de poema, o de
+ otro elemento publicado como parte de un
+ elemento más grande)
+ 分析的タイトル(例えば,論文や詩など,大きめの刊行物の部分と なるもの).
+ titre
+ analytique (article, poème ou autre,
+ publié comme partie d'un ensemble plus
+ grand)
+ titolo
+ analitico (articolo, poesia o altra
+ unità bibliografica pubblicata come
+ parte di un'unità più grande)
+
+
+ monographic
+ 단행본
+ monographique
+ monografico
+ monográfico
+ the title applies to a monograph such as a book or
+ other item considered to be a distinct publication, including single
+ volumes of multi-volume works
+ 단행본 제목(여러
+ 권 중 한 권으로 출판된 경우를 포함하여, 독립된 항목으로 출판된 책,
+ 모음집, 또는 기타 항목)
+ 專題層題名
+ (書、選集、或其他獨立出版的項目,包含多冊作品的其中一冊)
+ título
+ monográfico (libro, colección, u otro
+ elemento publicado como elemento
+ distinto, incluído los volúmenes
+ individuales de trabajos multivolúmenes)
+ 単行物のタイトル(例えば,書籍や叢書など,複数の巻に別れる作
+ 品のうちのひとつや,独立してある出版物).
+ titre de
+ monographie (livre, ensemble ou autre,
+ publié comme un document distinct, y
+ compris les volumes isolés d'ouvrages en
+ plusieurs volumes)
+ titolo
+ della monografia (libro, raccolta o
+ altra unità bibliografica pubblicata
+ indipendentemente, inculso il singolo
+ volume di opere a più volumi)
+
+
+ journal
+ 학술지
+ rivista
+ título
+ de revista.
+ the title applies to any serial or periodical
+ publication such as a journal, magazine, or newspaper
+ 학술지 제목
+ 期刊層題名
+ título de
+ diario, periódico o revista
+ 雑誌のタイトル.
+ titre de
+ revue
+ titolo di
+ rivista
+
+
+ series
+ 연간물
+ série
+ serie
+ series
+ the title applies to a series of otherwise distinct
+ publications such as a collection
+ 연간물 제목
+ 叢書層題名
+ título de
+ serie
+ 叢書のタイトル.
+ titre de
+ publication en série
+ titolo di
+ collana
+
+
+ unpublished
+ 미간행
+ the title applies to any unpublished material (including
+ theses and dissertations unless
+ published by a commercial press)
+ 미간행물(출판사에서 출판되지 않은 석박사 논문을 포함하여)의 제목
+ 未出版的項目題名 (包括未經商業刊物發表的專題論文)
+ título de
+ un material inédito (incluidas tesis y
+ disertaciones que no sean publicadas por
+ una editorial comercial)
+ 非刊行物のタイトル(未刊の学位論文など).
+ titre de
+ matéria non publié (thèses et
+ dissertations comprises, à l'exception
+ de leurs éditions commerciales)
+ titolo di
+ materiale non pubblicato (incluse tesi
+ non pubblicate da case editrici)
+
+
+
+
The level of a title is sometimes implied by its context:
+ for example, a title appearing directly within an
+ analytic element is ipso facto of
+ level a, and one appearing within a series
+ element of level s. For this reason, the
+ level attribute is not required in contexts where
+ its value can be unambiguously inferred. Where it is supplied
+ in such contexts,
+ its value should not contradict the value implied by its
+ parent element.
+
+
+
+
+
Si le titre apparaît comme fils de l'élément
+analytic, l'attribut level,
+s'il est renseigné, doit avoir la valeur a
+; si le titre apparaît comme fils de l'élément
+monogr, l'attribut
+level doit avoir la valeur m,
+j ou u ; si le titre
+apparaît comme fils de l'élément series,
+l'attribut level doit avoir la valeur
+s. Si le titre apparaît dans
+l'élément msItem, l'attribut level ne
+doit pas être utilisé.
+
+
+
+ classifies the title according to some convenient typology.
+ 어떤 편의적 유형에 따른 제목 분류
+ 用合適的分類方法將題名分類。
+ 当該タイトルを分類する.
+ caractérise le titre selon
+ une typologie adaptée.
+ clasifica el título de
+ acuerdo con alguna tipología funcional.
+ classifica il titolo seguendo
+ una tipologia conveniente.
+
+
+
+ main title
+ (주)제목
+ 主要題名
+ título
+principal
+ 主タイトル.
+ titre
+principal
+ titolo
+
+
+ subordinate
+ 부
+ titre de
+niveau inférieur, titre de partie
+ subordinato
+ subtítulo, título de una parte
+ subtitle, title of part
+ 부분의 제목인
+부제목
+ 副題名、部分題名
+ subtítulo, título de una parte
+ 副タイトル,部分タイトル.
+ sous-titre, titre de partie.
+ sottotitolo, titolo di una parte
+
+
+ alternate
+ 이명
+ titre
+alternatif, souvent dans une autre
+langue, par lequel l'oeuvre est
+également connu
+ alternativo
+ título
+alternativo, a menudo en otra lengua por
+la cual la obra es también conocida.
+ alternate title, often in another language,
+by which the work is also known
+ 다른 언어에서
+알려진 작품의 다른 이름
+ 替代題名,通常以該作品著名的另一種語言呈現
+ título
+alternativo, a menudo en otro idioma,
+por el cual el trabajo también es
+conocido
+ 別タイトル.多くは他言語によるタイトル.当該作品は,このタイ
+トルで知られている.
+ autre
+titre, souvent exprimé dans une autre
+langue, par lequel l'ouvrage est aussi
+connu
+ titolo
+alternativo, spesso in altra lingua, con
+il quale è anche conosciuta
+l'opera
+
+
+ abbreviated form of title
+ 제목의 축약형
+ 題名的縮寫形式
+ forma
+abreviada del título
+ タイトルの省略形.
+ forme
+abrégée du titre
+ abbreviazione del titolo
+
+
+ descriptive
+ 기술적
+ paraphrase descriptive de l'oeuvre
+ayant les fonctions d'un titre
+ descrittivo
+ paráfrasis descriptiva que funciona
+como el título de una obra.
+ descriptive paraphrase of the work
+functioning as a title
+ 제목으로 기능하는
+작품의 기술적 바꿔쓰기
+ 該作品的描述性改述,可作為題名
+ paráfrasis descriptiva del trabajo que
+funciona como título
+ タイトルのように当該作品を解説する言い換え.
+ paraphrase descriptive de l'oeuvre
+fonctionnant comme un titre
+ parafrasi
+descrittiva dell'opera che funge da
+titolo
+
+
+
+
This attribute is provided for convenience in analysing
+titles and processing them according to their
+type; where such specialized processing is not
+necessary, there is no need for such analysis, and
+the entire title, including subtitles and any
+parallel titles, may be enclosed within a single
+title element.
+
+
+
Cet attribut est utile pour analyser les titres et les
+traiter en fonction de leur type ; lorsqu'un tel
+traitement spécifique n'est pas nécessaire, il
+n'est pas utile de donner une telle analyse, et le
+titre entier, sous-titres et titres parallèles
+inclus, peuvent être encodés dans un élément
+title.
+
+
+
+
+
+ Information Technology and the Research Process: Proceedings of
+ a conference held at Cranfield Institute of Technology, UK,
+ 18–21 July 1989
+
+
+
+
+ La vie mode d'emploi. Romans.
+
+
+
+
+ Analyser les textes de communication
+
+
+
+
+ Mélanges de linguistique française et de philologie et littérature médiévales
+ offerts à Monsieur Paul Imbs.
+
+
+
+
+ Les fleurs du Mal de Charles Baudelaire : une édition électronique
+
+
+
+
+
quand il rentre de ses chantiers de maçonnerie il dit rien, il pose son cul sur une
+ chaise, toujours au même endroit, et il lit
l'Humanité.
+
+
+
+
+
+ 毛語錄
+
+
+
+
+ 嚐書:視界與舌尖之外
+
+
+
+
+ 蒼天有淚—無語問蒼天,台北,1997年12月1日。
+
+
+
+
+ 大般若波羅蜜多經:OCR辨識版本
+
+
+
+
+ Hardy's Tess of the D'Urbervilles: a machine readable
+ edition
+
+
+
+
+
+ Synthèse
+ an international journal for
+epistemology, methodology and history of
+ science
+
+
+
+
+
The attributes key and ref, inherited from the class
+ att.canonical may be used to
+ indicate the canonical form for the title; the former, by supplying
+ (for example) the identifier of a record in some external library
+ system; the latter by pointing to an XML element somewhere containing
+ the canonical form of the title.
+
+
+
Les attributs key et ref, hérités de la classe att.canonical sont utilisés pour
+ indiquer la forme canonique du titre ; le premier donne (par exemple)
+ l’identifiant d’un enregistrement dans un système externe de
+ bibliothèque ; le second pointe vers un élément XML contenant la forme
+ canonique du titre.
+
+
+
+
+
+
+
+ contains the formalized descriptive title for a meeting or conference, for use in a
+ bibliographic description for an item derived from such a meeting, or as a heading or preamble
+ to publications emanating from it.
+ 회의에서 배포된 항목 또는 회의에서 산출된 출판물의 표제 및 서문에 대한 서지적 설명으로 사용된 경우
+ 회의 또는 학술회의의 공식적 설명을 포함한다.
+ 在書目參照當中,標記該書目項目來源的會議相關描述。
+ 会議中の項目を書誌情報で記述する際や,発行物の見出しや序文に現れる,
+ 会合や会議を表す,形式化された記述的タイトルを示す.
+ contient le titre descriptif formalisé d’une réunion ou
+ d’une conférence, employé dans une description bibliographique pour un article provenant d'une
+ telle réunion, ou comme le titre ou le préambule aux publications qui en émanent.
+ en referencias bibliográficas, contiene una descripción
+ del encuentro o conferencia del que deriva el elemento bibliográfico.
+ nei riferimenti biliografici, contiene una descrizione di
+ un incontro o convegno dal quale deriva l'unità bibliografica.
+
+
+
+
+
+
+
+
+
+
+
+
+ Ninth International Conference on Middle High German Textual Criticism, Aachen,
+ June 1998.
+
+ List of Participants
+
+ ...
+
+
+ ...
+
+
+
+
...
+
+
+
+
+
+
+ Colloque international : Duras, marges et transgressions, Nancy, 1er et 2 avril
+ 2005
+
+ liste des participants
+
+ ...
+
+
+ ...
+
+
+
Imprint, Size of a Document, and Reprint Information
Scopes and Ranges in Bibliographic Citations
+
+ 版本說明
+ groups information relating to the publication or distribution
+ of a bibliographic item.
+ regroupe des informations relatives à la
+ publication ou à la distribution d'un élément bibliographique.
+ información de grupos acerca de la publicación o distribución de un elemento bibliográfico.
+ 匯集書目項目的出版或發行相關資訊。
+ raggruppa le informazioni riguardo la pubblicazione o distribuzione di un'unità bibliograica.
+ 書誌情報の対象となるものの,出版に関する情報.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Oxford
+ Clarendon Press
+ 1987
+
+
+
+
+
+
+ Paris
+ Les Éd. de Minuit
+ 2001
+
+
+
+
+
+
+ 香港
+ 皇冠
+ 2005
+
+
+
+
+
+
+
+ éditeur
+ provides the name of the organization responsible for the publication or distribution of a
+ bibliographic item.
+ 서지 항목의 출판이나 배포에 책임이 있는 기구명을 제시한다.
+ 提供負責出版或發行書目項目的機構名稱。
+ 書誌項目の出版や頒布に責任のある団体の名前を示す.
+ donne le nom de l'organisme responsable de la
+ publication ou de la distribution d'un élément de la bibliographie.
+ proporciona el nombre de la organización responsable de
+ la publicación o la distribución de un elemento bibliográfico.
+ fornisce il nome
+
+
+
+
+
+
+
+
+
+
+
+ Oxford
+ Clarendon Press
+ 1987
+
+
+
+
+
+
+ Paris
+ Les Éditions de Minuit
+ 2001
+
+
+
+
+
+
+ 上海
+ 上海古籍出版社
+ 2008
+
+
+
+
+
Use the full form of the name by which a company is usually referred to,
+ rather than any abbreviation of it which may appear on a title page
+
+
+
Utiliser la forme développée du nom au moyen duquel l'organisme est
+ habituellement cité, plutôt qu'une abréviation, cette dernière pouvant apparaître sur
+ une page de titre.
+
+
+
会社を示す,タイトルページにある省略名ではなく,正式な名前を使う.
+
+
+
+
+
+
+ scope of bibliographic reference
+ 인용 범위
+ 書目引用範圍
+ extension d'une référence bibliographique
+ extensión de una cita
+ estensione del riferimento bibliografico
+ defines the scope of a bibliographic reference, for example as a
+ list of page numbers, or a named subdivision of a larger work.
+ 예를 들어 페이지수의 목록 또는 작품의 이름 붙은 하위 성분으로, 문헌 참조의 범위를 정의한다.
+ 標明書目參照資訊的範圍,例如標示頁碼列表、或是某著作的分支作品名稱。
+
+ 書誌情報の参照範囲を示す.例えば,ページ番号,下部単位の名前など.
+ définit l'extension d'une référence
+ bibliographique, comme par exemple une liste de numéros de page, ou le nom
+ d'une subdivision d'une oeuvre plus grande.
+ define la extensión de una referencia bibliográfica, como por ejemplo los números de página u otra subdivisión numerada en la obra mayor.
+ definisce l'estensione di un riferimento bibliografico, per esempio mediante una lista di numeri di pagina, o il titolo di una parte di un'opera più ampia.
+
+
+
+
+
+
+
+
+
+
+
+ pp 12–34
+
+ II
+ 12
+
+
+
+
+ pp 12–34
+
+ II
+ 12
+
+
+
+
+ 頁數 12–34
+
+ II
+ 12
+
+
+
+
When a single page is being cited, use
+ the from and to attributes with an identical
+ value. When no clear endpoint is provided, the from attribute
+ should be used without to. For example, if the citation has p. 3ff as a page reference.
+
+
+
+
+
+ cited range
+ defines the range of cited content, often represented by pages or other units
+
+
+
+
+
+
+
+
+
+
+
+ pp 12–13
+
+ II
+ 12
+
+
+
+
+ , vol. 3, pp.
+ 4-5
+
+
+
+
When the range cited consists of a single page or other unit, use
+ the from and to attributes with an identical
+ value. When no clear endpoint is given the from attribute
+ should be used without to. For example, if the citation has p. 3ff as a page reference.
+
+
+
+
+ publication place
+ 출판지
+
+ lugar de la publicación
+ lieu de publication
+ luogo di pubblicazione
+ contains the name of the place where a bibliographic item was published.
+ 서지 대상이 출판된 장소명을 포함한다.
+ 包含書目項目的出版地名稱。
+ 書誌項目が出版された場所の名前を示す.
+ contient le nom du lieu d'une publication.
+ contiene el nombre del lugar de publicación de un
+ elemento bibliográfico.
+ contiene il nome del luogo in cui un'unità
+ bibliografica è stata pubblicata
+
+
+
+
+
+
+
+
+
+
+
+
+ Oxford University Press
+ Oxford
+ 1989
+
+
+
+
+
+
+ Editions Denoëll
+ Paris
+ 1975
+
+
+
+
+
+
+
Series Information
Related Items
+ bibliographic citation
+ 서지 인용
+ 書目資料
+ référence bibliographique.
+ cita bibliográfica.
+ citazione bibliografica
+ contains a loosely-structured bibliographic citation of which the sub-components may or may
+ not be explicitly tagged.
+ 하위 성분이 명시적으로 구분된 또는 그렇지 않은 덜 구조화된 서지 인용을 포함한다.
+ 包含結構零散的書目資料,其中次要元件不一定會明確標記。
+ 厳密でない構造を持つ書誌情報の引用を含む.下位要素で明示されていたり, いなかったりする.
+ contient une référence bibliographique faiblement
+ structurée dans laquelle les sous-composants peuvent ou non être explicitement balisés.
+ contiene una cita bibliográfica estructurada libremente,
+ los componentes de la cual pueden nohaber sido etiquetados explícitamente.
+ contiene una citazione bibliografica strutturata
+ liberamente i cui componeneti potrebbero o meno essere codificati esplicitamente.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Blain, Clements and Grundy: Feminist Companion to Literature in English (Yale,
+ 1990)
+
+
+
+
+ Mazelier, Roger : Gérard de Nerval et l’Humour divin, Le Mesnil Saint-Denis,
+ 1995.
+
+
+
+
+ L'EnracinementSimone Weil, Prélude à une déclaration des devoirs envers l'être
+ humain . Gallimard1968.
+
+
+
+
+ 蕭兵,《神話學引論》。台北:文津,2001。
+
+
+
+
+ 我的從影經過。收錄於 王漢倫,中國無聲電影.
+ 北京:中國電影
+ 1996。
+
+
+
+
+ The Interesting story of the Children in the Wood. In
+ Victor E Neuberg, The Penny Histories.
+ OUP1968.
+
+
+
+
+ Carlin
+ (Claire),
+ The Staging of Impotence : France’s last
+ congrès dans
+ Theatrum mundi : studies in honor of Ronald W.
+ Tobin, éd.
+ ClaireCarlin et
+ KathleenWine,
+ Charlottesville, Va.,
+ Rookwood Press,
+ 2003.
+
+
+
+
+
+
Contains phrase-level elements, together with any combination of elements
+ from the biblPart class
+
+
+
Cet élément contient des éléments de type expression, ainsi qu'un jeu
+ d'éléments de la classe biblPart.
+
+
+
biblPartで規定された要素と共に,句レベルの要素を示す.
+
+
+
+
+
+
+
+ structured bibliographic citation
+ 구조화된 서지 인용
+ 結構次要書目
+ référence bibliographique structurée
+ cita bibliográfica estructurada.
+ citazione bibliografica strutturata
+ contains a structured bibliographic citation, in which only bibliographic sub-elements
+ appear and in a specified order.
+ 서지의 하위 요소만이 나타나는, 명시적 순서로 구성되는 구조화된 서지 인용을 포함한다.
+ 包含僅出現子節點的結構書目資料,並以特定順序呈現。
+ 構造を持った書誌情報を示す.下位要素として,書誌情報を示す要素が,決 められた順番で出現する.
+ contient une référence bibliographique dans laquelle
+ seuls des sous-éléments bibliographiques apparaissent et cela, selon un ordre déterminé.
+ contiene una cita bibliográfica estructurada, en la cual
+ sólo aparecen los subelementos bibliográficos y en un orden especificado.
+ contiene una citazione bibliografica strutturata che può
+ contenere solo altri elemento nell'ordine specificato.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ The use of an idno element as a direct child of
+ biblStruct is deprecated. Rather, idno should
+ appear as a child of a monogr, analytic, or
+ series.
+
+ WARNING: use of deprecated method — the use of the idno element as a direct child of the biblStruct element will be removed from the TEI on 2016-09-18
+
+
+
+
+
+
+ Blain, Virginia
+ Clements, Patricia
+ Grundy, Isobel
+ The Feminist Companion to Literature in English: women writers from the middle ages
+ to the present
+ first edition
+
+ Yale University Press
+ New Haven and London
+ 1990
+
+
+
+
+
+
+
+
+
+ Anouilh, Jean
+ Antigone
+ première édition
+
+ in Nouvelles pièces noires, La Table ronde
+ Paris
+ 1955
+
+
+
+
+
+
+
+
+
+ 王大明
+ 文天行
+ 廖全京
+ 抗戰文藝報刊編目彙編
+ 初版
+
+ 四川省社會科學院
+ 成都
+ 1984
+
+
+
+
+
+
+
+
+
+
+
+ citation list
+ 인용 목록
+ 書目列表
+ liste de références bibliographiques
+ lista de cita
+ lista di citazioni
+ contains a list of bibliographic citations of any kind.
+ 여러 종류의 서지 인용 목록을 포함한다.
+ 包含任何種類的書目資料列表。
+
+ 書誌項目引用のリストを示す.
+ contient une liste de références
+ bibliographiques de toute nature.
+ contiene una lista de citas bibliográficas de cualquier tipo.
+ contiene una lista di citazioni bibliografiche di qualsiasi natura.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Works consulted
+ Blain, Clements and Grundy: Feminist Companion to
+ Literature in English (Yale, 1990)
+
+
+
+ The Interesting story of the Children in the Wood
+
+
+ The Penny Histories
+ Victor E Neuberg
+
+ OUP
+ 1968
+
+
+
+
+
+
+
+
+
+ Liste des ouvrages cités
+ Les Petits Romantiques
+
+
+ La poésie en prose
+
+
+ Aloysius Bertrand, "inventeur" du poème en prose
+ Bert Guégand
+
+ PUN
+ 2000
+
+
+
+
+
+
+
+
+
+ 參考書籍
+ 潘定衡、楊朝文: 蚩尤的傳說 (貴陽:貴州民族出版社,1989 )
+
+
+ 中國古史的傳說時代
+
+
+ 苗族蚩尤神话,與逐鹿之戰。
+ 吳曉東
+
+ 北京:民族文學研究
+ 1998
+
+
+
+
+
+
+
+
+
+
+
+
+ contains or references some other bibliographic item which is related to the present one in
+ some specified manner, for example as a constituent or alternative version of it.
+ 구성물이나 대체 버전과 같이 현 항목과 특정 방식으로 관련된 다른 서지 항목을 명시적 방식에 따라
+ 포함하거나 지시한다.
+ 包含或參照到其他書目項目,該些項目與目前的書目項目在某種程度上相關,例如作為其組成或者替代項目。
+ 当該内容と関連する書誌情報項目を示す,または参照する.例えば,構成要 素または他の版など.
+ contient ou référe à un autre élément bibliographique
+ ayant une relation quelconque avec l'objet décrit, par exemple comme faisant partie d'une version alternative de celui-ci, ou bien en étant une version alternative.
+ contiene o si riferisce ad altra entità bibliografica
+ legata alla presente tramite una relazione specificata quale, per esempio, versione costitutiva
+ o alternativa
+ contiene o refiere algún otro elemento bibliográfico que
+ se relaciona con el actual de alguna manera, por ejemplo como un versión complementaria o
+ alternativa de este.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+If the @target attribute on is used, the
+relatedItem element must be empty
+ A relatedItem element should have either a 'target' attribute
+ or a child element to indicate the related bibliographic item
+
+
+
+
+ points to the related bibliographic element by means of an
+ absolute or relative URI reference
+
+
+
+
+
+
+
+ Shirley, James
+ The gentlemen of Venice
+
+ New York
+ Readex Microprint
+ 1953
+
+ 1 microprint card, 23 x 15 cm.
+
+
+ Three centuries of drama: English, 1642–1700
+
+
+
+
+ Shirley, James
+ The gentlemen of Venice
+ a tragi-comedie presented at the private house in Salisbury
+ Court by Her Majesties servants
+
+ London
+ H. Moseley
+ 1655
+
+ 78 p.
+
+
+
+
+
+
+
+
If the target attribute is used to reference
+ the related bibliographic item, the element should be
+ empty.
+
+
+
+
+
Notes and Statement of Language
Order of Components within References
Bibliographic Pointers
Relationship to Other Bibliographic Schemes
Passages of Verse or Drama
Core Tags for Verse
+ verse line
+ 운문 시행
+ 詩行
+ vers
+ verso
+ verso
+ contains a single, possibly incomplete, line of verse.
+ 미완성일 수도 있지만 운문의 하나의 시행을 포함한다.
+ 包含詩文的一行,也許是不完整的詩行。
+ 韻文中の1行を示す.行として完全でない場合もある.
+ contient un seul vers, éventuellement incomplet.
+ contiene un único verso, posiblemente incompleto.
+ contiene un singolo verso, anche incompleto.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Abstract model violation: Lines may not contain lines or lg elements.
+
+
+
+
+
+ Shall I compare thee to a summer's day?
+
+
+
+
+ Que toujours, dans vos vers, le sens coupant les mots
+ Suspende l'hémistiche, en marque le repos.
+
+
+
+
+
+
+
+
+
+
+
+
+
+ line group
+ 시행군
+ 行組
+ groupe de vers
+ grupo de versos
+ un gruppo di versi
+ contains one or more verse lines functioning as a formal unit, e.g. a stanza, refrain,
+ verse paragraph, etc.
+ 예를 들어, 연, 후렴구, 운문 단락과 같이 형식적 단위로 기능하는 운문 행군을 포함한다.
+ 包含形式上視為一組的詩行,例如詩節、疊句、韻文段落等。
+ 形式単位としてある,ある韻文の行をまとまりを示す.例えば,連,リフレ イン,詩節など.
+ contient un groupe de vers fonctionnant comme une unité
+ formelle, par exemple une strophe, un refrain, un paragraphe en vers, etc.
+ contiene un grupo de versos que funcionan como una
+ unidad formal, p.ej. una estrofa, un refrán, un estribillo, etc.
+ contiene un gruppo di versi che costituiscono un'unità
+ formale, per esempio una stanza, un refrain, un paragrafo in versi, ecc.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ An lg element
+ must contain at least one child l, lg or gap element.
+
+
+
+
+
+ Abstract model violation: Lines may not contain line groups.
+
+
+
+
+
+
+ Let me be my own fool
+ of my own making, the sum of it
+
+
+ is equivocal.
+ One says of the drunken farmer:
+
+
+ leave him lay off it. And this is
+ the explanation.
+
+
+
+
+
+
+
+ Les amoureux fervents et les savants austères
+ Aiment également, dans leur mûre saison,
+ Les chats puissants et doux, orgueil de la maison,
+ Qui comme eux sont frileux et comme eux sédentaires.
+
+
+ Amis de la science et de la volupté
+ Ils cherchent le silence et l'horreur des ténèbres ;
+ L'Erèbe les eût pris pour ses coursiers funèbres,
+ S'ils pouvaient au servage incliner leur fierté.
+
+
+ Ils prennent en songeant les nobles attitudes
+ Des grands sphinx allongés au fond des solitudes,
+ Qui semblent s'endormir dans un rêve sans fin ;
+
+
+ Leurs reins féconds sont pleins d'étincelles magiques,
+ Et des parcelles d'or, ainsi qu'un sable fin,
+ Etoilent vaguement leurs prunelles mystiques.
+
+
contains verse lines or nested line groups only, possibly prefixed by a
+ heading.
+
+
+
ne contient que des vers ou des groupes de vers enchâssés,
+ éventuellement précédés d'un titre.
+
+
+
韻文の行または(普通は見出しが付く)入れ子化された行グループのみを示 す.
+
+
+
+
+
+
+
Core Tags for Drama
+ speech
+ 대화
+ 演說
+
+ langue orale
+ discurso
+ battuta
+ contains an individual speech in a performance text, or a passage presented as such in a prose or
+ verse text.
+ 공연 텍스트에서 개별 대화 또는 산문이나 운문 텍스트에서 공연적 텍스트로 제시된 단락
+ 劇本中的個人台詞,或散文、韻文中的個人演說。
+ 演技テキストまたは韻文・散文中にある個々の発話を示す.
+ monologue dans un texte écrit pour la scène ou un passage
+ présenté sous cette forme dans un texte en prose ou en vers.
+ Un discurso individual de un texto dramático, o un pasaje
+ en prosa o en verso presentado como tal.
+ Una singola battuta in un testo drammatico, o un brano
+ presentato come tale in un testo in prosa o in versi
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ The reverend Doctor Opimian
+
I do not think I have named a single unpresentable fish.
+
+
+ Mr Gryll
+
Bream, Doctor: there is not much to be said for bream.
+
+
+ The Reverend Doctor Opimian
+
On the contrary, sir, I think there is much to be said for him. In the first place [...]
+
Fish, Miss Gryll — I could discourse to you on fish by the hour: but for the present I
+ will forbear [...]
+
+
+
+
+
+
+
+ Valère.
+
Hé bien ! Sabine, quel conseil me donneras-tu ?
+
+
+ Sabine.
+
Vraiment, il y a bien des nouvelles. Mon oncle veut résolûment que ma cousine épouse
+ Villebrequin, et les affaires sont tellement avancées, que je crois qu'ils eussent été
+ mariés dès aujourd'hui, si vous n'étiez aimé ... Le bonhomme ne manquera pas
+ de faire loger ma cousine à ce pavillon qui est au bout de notre jardin, et par ce moyen
+ vous pourriez l'entretenir à l'insu de notre vieillard, l'épouser, et le laisser pester
+ tout son soûl avec Villebrequin.
+
+
+
+
+
+
+ 祝英台
+
我就是英台。三年前我想出外求學,故而改扮男裝,不期与梁兄相遇,三載同窗多蒙照顧,英台感激不盡。
+
+
+ 梁山伯
+
賢弟,哦,念書的時候,咱們是兄弟相稱,如今你這樣的打扮,我該稱你賢弟呢,還是……
+
+
+ 祝英台
+
讀書時節我是女扮男裝,理該兄弟相稱,如今不妨改稱兄妹。
+
+
+
+
+
The who attribute on this element may be used either in addition to the
+ speaker element or as an alternative.
+
+
+
L'attribut who peut être utilisé soit en complément de l'élément speaker,
+ soit comme une alternative à cet élément.
+
+
+
行または段落,ト書き,句レベル要素になる.
+
属性whoは,要素speakerなどと共に使用されるかも しれない.
+
+
+
+
+
+
+
+
+ locuteur
+ 講者
+ contains a specialized form of heading or label, giving the name of one or more speakers in a
+ dramatic text or fragment.
+ forme particulière de titre ou de marque qui donne le
+ nom d'un ou de plusieurs locuteurs dans un texte ou dans un fragment de texte écrit pour le
+ théâtre.
+ una forma especializada de encabezamiento o etiqueta,
+ que da nombre a uno o más interlocutores de un texto o fragmento dramático.
+ 特殊的標題或標籤形式,用來表明劇本中ㄧ位或多位講者名稱。
+ Forma specializzata di intestazione o etichetta che
+ fornisce i nomi di uno o più parlanti in un testo o frammento drammatico.
+ 舞台関連の文章に出てくる1人以上の発話者の名前を示す.見出しやラベル として書かれる.
+
+
+
+
+
+
+
+
+
+ Nancy and Robert
+ (speaking simultaneously)
+
The future? ...
+
+
+
+
+
+
+
+
+
+
+ Koch.
+
Ne risquez rien du tout, Monique ; rentrez.
+
+
+ Monique.
+
Rentrer ? comment voulez-vous que je rentre ? J'ai les clés de la voiture.
+
+
+ Koch.
+
Je rentrerai par mes propres moyens.
+
+
+ Monique.
+
Vous ? vos moyens ? quels moyens ? Seigneur ! Vous ne savez même pas conduire, vous ne
+ savez pas reconnaître votre gauche de votre droite, vous auriez été incapable de
+ retrouver ce fichu quartier tout seul, vous ne savez absolument rien faire tout seul. Je
+ me demande bien comment vous pourriez rentrer.
+
+
+ Koch.
+
J'appellerai un taxi.
+
+
+
+
+
+
+
+
+
+
+ 梁山伯與祝英台t
+ (同時)
+
梁山伯與祝英台,生不成雙死不分,生不成雙死不分。
+
+
+
+
+
+
+
+
+
Cet élément est utilisé pour indiquer quel personnage prend la parole dans une pièce de
+ théâtre ; l'attribut who est utilisé pour pointer vers un autre élément qui fournit des
+ informations sur ce personnage. L'un et ou l'autre peuvent être utilisés.
+
+
+
+
+
+ stage direction
+ 무대지시
+ 舞台指示
+ indication scénique
+ acotación
+ direttiva di scena
+ contains any kind of stage direction within a dramatic text or fragment.
+ 극적 텍스트나 부분 내에 무대지시를 포함한다.
+ 包含劇本中任何一種舞台場景或演出動作指示。
+ 舞台芸術テキスト中にある,ト書き相当を示す.
+ contient tout type d'indication scénique à l'intérieur
+ d'un texte ou fragment de texte écrit pour le théâtre.
+ contiene cualquier tipo de acotación que aparece en un
+ texto o fragmento dramático.
+ contiene qualsiasi tipo di didascalie e direttive di
+ scena all'interno di un testo o di un frammento di testo drammatico.
+
+
+
+
+
+
+
+
+
+
+
+ indicates the kind of stage direction.
+ 무대지시의 유형을 나타낸다.
+ 指出舞台指示的種類。
+ ト書きの種類を示す.
+ indique le type d'indication scénique
+ indica el tipo de acotación.
+ indica il tipo di direttiva di scena
+
+
+
+ describes a setting.
+ 배경을 기술한다.
+ 描述舞台佈景。
+ describe una configuración.
+ 舞台設定を示す.
+ décrit une mise en scène
+ descrive l'ambientazione.
+
+
+ describes an entrance.
+ 등장을 기술한다.
+ 描述角色進場。
+ describe una entrada.
+ 出方を示す.
+ décrit une entrée
+ descrive un ingresso.
+
+
+ describes an exit.
+ 퇴장을 기술한다.
+ 描述角色退場。
+ describe una salida.
+ はけ方を示す.
+ décrit une sortie
+ descrive un'uscita.
+
+
+ describes stage business.
+ 동작을 기술한다.
+ 描述演員動作。
+ describe la realización de un
+ fragmento.
+ 所作を示す.
+ décrit une
+ action sur scène
+ descrive attività sul palco.
+
+
+ is a narrative, motivating stage direction.
+ 이야기체의, 그리고 흥미유발적인 무대지시이다.
+ 敘述性的,積極性的舞台指示。
+ es una acotación narrativa, o de
+ dirección de escena
+ ト書きの意図を解説する.
+ texte explicatif de la direction de scène.
+ testo narrativo che indica le direzioni
+ di scena.
+
+
+ describes how a character speaks.
+ 등장인물이 어떻게 대사를 말하는지를 기술한다.
+ 描述演員說話方式。
+ describe cómo habla un personaje.
+ 登場人物の話し方を示す.
+ décrit la façon dont parle un
+ personnage
+ descrive il modo in cui un personaggio
+ parla.
+
+
+ gives some detail about a character.
+ 등장인물에 관한 상세한 정보를 제시한다.
+ 提供一個角色的某些細節資訊。
+ proporciona algun detalle sobre un
+ personaje.
+ 登場人物の詳細を示す.
+ donne certains détails à propos d'un
+ personnage
+ fornisce dettagli sul
+ personaggio
+
+
+ describes a location.
+ 장소를 기술한다.
+ 描述場景位置。
+ describe una localización.
+ 場所を示す.
+ décrit un lieu
+ descrive l'ambientazione
+
+
+ more than one of the above
+ 앞에서 제시된 것들의 여러 가지를 혼용
+ 包含兩種以上的舞台指示類型。
+ más de uno de lo mencionado
+ 上記の内容を複数示す.
+ plusieurs des indications précédentes
+ più di uno dei valori descritti.
+
+
+
If the value mixed is used, it must be the only value. Multiple values may however be supplied
+ if a single stage direction performs multiple functions, for example is both an entrance and a modifier.
+
+
+
+
+ A curtain being drawn.
+ Music
+ Enter Husband as being thrown off his horse and falls.
+ Exit pursued by a bear.
+ He quickly takes the stone out.
+ To Lussurioso.
+ Having had enough, and embarrassed for the family.
+ Disguised as Ansaldo.
+ Enter Latrocinio disguised as an empiric
+ At a window.
+ Aside.
+
+
+
+
+
+ Behold. Here the vpper part of the Scene open'd; when
+ straight appear'd a Heauen, and all the Pure Artes sitting on
+ two semicircular benches, one aboue another: who sate thus till the rest of the
+ Prologue was spoken, which being ended, they descended in
+ order within the Scene, whiles the Musicke plaid Our
+ Poet knowing our free hearts
+
+
+
+ La scène est dans une place de ville.
+ , s'en allant.
+ (Arnolphe ôte par trois fois le chapeau de dessus la tête d'Alain.)
+ , à Georgette.
+ (Tous étant rentrés.)
+ , riant.
+ , lui montrant le logis d'AGNÈS.
+ , à part.
+ (Frappant à la porte.)
+ , assis.
+ (Il se lève.)
+
+
+
+
+ 電梯開門
+ 指揮聲
+ 小陳和小王騎車回來
+ 搬家工人把家具搬進電梯
+ 小玉清點家具數量
+ 將簽收單交給搬家工人
+ 家具佔去出入口,小玉顯得有些不好意思。
+ 小陳眼睛為之一亮
+ 電梯口
+ 悄悄話
+
+
+
+
The who attribute may be used to indicate more
+precisely the person or persons participating in the action described
+by the stage direction.
+
+
+
+
+
+
+
Overview of the Core Module
+Common Core
+Elements common to all TEI documents
+Éléments disponibles pour tous les documents
+TEI
+所有TEI文件所通用的元素
+Elementi comuni a tutti i documenti TEIElementos comuns a todos os documentos TEIコアモジュール
Default Text Structure
+ TEI document
+ TEI 문서
+ TEI文件
+ document TEI
+ TEI-Dokument
+ documento TEI
+ documento TEI
+ contains a single TEI-conformant document, combining
+ a single TEI header with one or more members of the model.resourceLike class. Multiple TEI
+ elements may be combined to form a teiCorpus element.
+ TEI 헤더와 텍스트로 구성된 단일 TEI 구조 문서를 포함한다. 독립 요소 또는 teiCorpus 요소의 부분.
+ 包含符合TEI標準的單一文件,由一個TEI標頭及一份文本組成,可單獨出現或是作為元素teiCorpus的一部分。
+ TEIに準拠する文書
+ contient un seul document conforme à la TEI, qui
+ comprend un en-tête TEI et un texte, soit de façon isolée, soit comme partie d’un
+ élément teiCorpus.
+
+enthält ein einzelnes TEI-konformes Dokument, das aus TEI-Header (Dateikopf) und Text besteht, entweder als eigenständige Datei oder als Teil eines Elements teiCorpus.
+
+ contiene un único documento TEI-conforme, que comprende un encabezado y un texto, sea este aislado o parte de un elemento teiCorpus
+
+ contiene un documento TEI-conforme, comprendente un'intestazione e un testo, sia esso isolato o parte di un elemento teiCorpus
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ specifies the major version number of the TEI Guidelines against
+ which this document is valid.
+ TEI 스키마의 버전
+ TEI架構的版本
+ TEIスキームの版を示す.
+ la version majeure du schéma TEI
+ Version des TEI-Schemas
+ Versión del esquema TEI
+ versione dello schema TEI
+
+
+
The major version number is historically prefixed by a P
+(for Proposal), and is distinct from the version number
+used for individual releases of the Guidelines, as used by (for
+example) the source of the schemaSpec element. The current version is
+P5.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Le document TEI le plus court possible.
+
+
+
D'abord publié comme faisant partie de la TEI P2.
+
+
+
Aucune source : il s'agit d'un document original.
+
+
+
+
+
+
A peu pres, le document TEI le plus court envisageable.
+
+
+
+
+
+
+
+
+
+
+
+ TEI中文指引
+
+
+
將與TEI 中文在地化計劃等文件一同出版
+
+
+
譯自TEI P5 英文指引
+
+
+
+
+
+
這是TEI P5的中文指引...
+
+
+
+
+
+
+
This element is required. It is customary to specify the
+TEI namespace http://www.tei-c.org/ns/1.0 on it, using
+ the xmlns attribute.
+
+
+
Cet élément est obligatoire.
+
+
+
+ 当該要素は必須である.
+
+
+
+
+
+
+
+ contains the whole of a TEI encoded corpus, comprising a single corpus header and one or
+ more TEI elements, each containing a single text header and a text.
+ 하나의 코퍼스 헤더와 몇 개의 TEI 요소로 구성된, 그리고 하나의 텍스트 헤더와 하나의 텍스트로
+ 구성된 TEI로 부호화된 코퍼스 전체를 포함한다.
+ 包含一套用TEI編碼的文件集,由單一文集標頭以及一個 (或多個)
+ TEI元素所組成,各TEI元素包含單一文本標頭和一個文本。
+ TEI準拠のコーパス全体を示す.ヘダーが1つと,ひとつ以上の要素TEIから
+ 成る.各要素TEIには,テキストヘダーと要素textが1つある.
+ contient la totalité d'un corpus encodé selon la TEI,
+ comprenant un seul en-tête de corpus et un ou plusieurs éléments TEI dont chacun contient un
+ seul en-tête textuel et un texte.
+ contiene la totalidad de un corpus TEI codificado,
+ comprendiendo un único encabezado y uno o más elementos TEI, cada uno de los cuales tiene a su
+ vez un único encabezado y un texto.
+ contiene un intero corpus codificato TEI, comprende un
+ intestazione del corpus e uno o più elementi TEI, ciascuno contenente un un singolo testo e la
+ relatica intestazione.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ The version of the TEI scheme
+ TEI 스키마의 버전
+ TEI架構的版本
+ 当該TEIスキームの版.
+ la version du modèle TEI
+ La versión del esquema TEI
+ La versione dello schema TEI
+
+ 5.0
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Must contain one TEI header for the corpus, and a series of TEI
+ elements, one for each text.
+
This element is mandatory when applicable.
+
+
+
Cet élément doit contenir un en-tête TEI pour le corpus, et une suite
+ d'éléments TEI, correspondant à autant de textes.
+
Cet élément est obligatoire quand il est applicable.
+
+
+
コーパス全体にはひとつのTEIヘダーが,要素TEIにはひとつの 要素textがある.
+
当該要素素は,適応できる場合,必須である.
+
+
+
+
+
+
+ texte
+ contains a single text of any kind, whether unitary or composite, for example a poem or
+ drama, a collection of essays, a novel, a dictionary, or a corpus sample.
+ 어떤 종류의 단일 텍스트를 포함한다. 예를 들어, 시 또는 드라마, 수필선, 소설, 사전 또는 코퍼스
+ 표본과 같은 단일 텍스트 또는 혼합 텍스트.
+ 包含一份任何種類的文本,無論是單一或複合的,例如詩詞或戲劇、散文集、小說、字典、或是文集範例。
+ ひとつのテキストを示す.単体でも複合体でもよい.例えば,詩,舞台芸術, 随筆,小説,辞書,コーパスなど.
+ contient un seul texte quelconque, simple ou composite,
+ par exemple un poème ou une pièce de théâtre, un recueil d’essais, un roman, un dictionnaire ou
+ un échantillon de corpus.
+ enthält eigenständigen oder aus mehreren Teilen
+ bestehenden Text, zum Beispiel ein Gedicht oder Drama, eine Sammlung von Aufsätzen, einen Roman,
+ ein Wörterbuch oder eine Auswahl aus einem Korpus
+ contiene un único texto de cualquier tipo, sea este
+ unitario o combinado, p.ej. un texto en verso o teatral, una recopilación de ensayos, una
+ novela, un diccionario, o una fragmento de corpus.
+ contiene un unico testo di qualsiasi tipo, sia esso
+ unitario o composito, per esempio un testo in versi o teatrale, una raccolta di saggi, un
+ romanzo, un dizionario, o una porzione di corpus
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Autumn Haze
+
+
+
+ Is it a dragonfly or a maple leaf
+ That settles softly down upon the water?
+
+
+
+
+
+
+
+
+
+ Souvenir de la nuit du 4
+
+
+
+ Il avait dans sa poche une toupie en buis.
+
+
+
+
+
+
Le body d'un texte peut être remplacé par un groupe de textes enchâssés, comme
+ dans la structure suivante :
The body of a text may be replaced by a group of nested texts, as in the following schematic:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
This element should not be used to represent a text which is inserted at an arbitrary point
+ within the structure of another, for example as in an embedded or quoted narrative; the
+ floatingText is provided for this purpose.
+
+
+
Cet élément ne devrait pas être utilisé pour encoder un texte inséré à un endroit non
+ prévisible à l'intérieur de la structure d'un autre texte, comme par exemple dans un récit qui est enchâssé
+ ou cité dans un autre ; c'est l'élément floatingText qui doit être utilisé à
+ cet effet.
+
+
+
+
+
+
+ text body
+ 텍스트 본문
+ 正文
+ corps du texte
+ Kerntext (text body)
+ cuerpo del texto
+ corpo del testo
+ contains the whole body of a single unitary text, excluding any front or back matter.
+ 전면부 또는 후면부 자료를 배제한 단일 텍스트의 전체 본문을 포함한다.
+ 單篇文章的整體部分,不包含正文前及正文後資訊。
+ 前付,後付を除いた,単一の作品の本文全体を示す.
+ contient la totalité du corps d’un seul texte simple, à
+ l’exclusion de toute partie pré- ou post-liminaire.
+ enthält den gesamten, eigenständigen Text, außer
+ Vorspann (front) und Nachspann (back).
+ contiene el cuerpo completo de un texto unitario,
+ excluyendo los eventuales añadidos paratextuales (prólogos, dedicatorias, apéndices, etc.) al
+ inicio o fin de un texto.
+ contiene l'intero corpo di un testo unitario, esclusi
+ eventuale peritesto iniziale e finale
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Nu scylun hergan hefaenricaes uard
+ metudæs maecti end his modgidanc
+ uerc uuldurfadur sue he uundra gihuaes
+ eci dryctin or astelidæ
+ he aerist scop aelda barnum
+ heben til hrofe haleg scepen.
+ tha middungeard moncynnæs uard
+ eci dryctin æfter tiadæ
+ firum foldu frea allmectig
+ primo cantauit Cædmon istud carmen.
+
+
+
+
+
+
+
+ groupe
+ contains the body of a composite text, grouping together a sequence of distinct texts (or
+ groups of such texts) which are regarded as a unit for some purpose, for example the collected
+ works of an author, a sequence of prose essays, etc.
+ 어떤 목적의 단위로 간주되는 일련의 서로 다른 텍스트(또는 그러한 텍스트군)를 모아 놓은 혼합 텍스트의
+ 본문을 포함한다. 예를 들어, 한 작가의 선집, 일련의 수필 등.
+ 包含複合文本的正文,所匯集的一連串單一文件 (或文件群組)
+ ,因為某特殊目的被視為一個整體,例如一個作者的作品集合、一連串的散文集等。
+ ある単位として独立している個別テキストをまとめた複合テキストを示す. 例えば,ある著者の作品集やエッセイ集など.
+ contient un ensemble de textes distincts (ou des groupes de textes de ce type), considérés comme formant une
+ unité, par exemple pour présenter les œuvres complètes d’un auteur, une
+ suite d’essais en prose, etc.
+ enthält den Kerntext eines aus mehreren Einzeltexten
+ bestehenden Textes, (oder eine Reihe solcher Texte), die zusammen als Einheit gesehen werden,
+ zum Beispiel die gesammelten Werke eines Autors, eine Reihe von Prosastücken etc.
+ contiene el cuerpo de un texto compuesto, es decir, que
+ agrupa un conjunto de textos distintos (o grupos de textos) considerados como una unidad por
+ criterios determinados, por ejemplo la obra completa de un autor, una serie de ensayos, etc.
+ contiene il corpo di un testo composito, che raggruppa
+ cioè un insieme di testi distinti (o più insiemi di testi) considerati come unità per
+ determinati scopi, per esempio l'opera completa di un autore, una serie di saggi, ecc.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ texte mobile
+ contains a single text of any kind, whether unitary or composite, which interrupts the text
+ containing it at any point and after which the surrounding text resumes.
+ 단일 또는 혼합이든지 간에, 어떤 지점에서 그것을 포함한 텍스트를 중단시키고 그 이후 주변 텍스트가
+ 다시 시작하는 텍스트.
+ 包含一份任何種類的文本,無論是單一或複合的,該份文本任意穿插於整體文本中,而週遭文字則接續其後。
+ ひとつのテキストを示す.下位構造はあってもよい.当該部分はテキスト中 のどこにでも出現できる.自在テキスト.
+ contiene un unico testo di qualsiasi tipo, sia esso
+ unitario o composito, che interrompe il testo che lo contiene in un qualsiasi punto e dopo il
+ quale il testo circostante riprende
+ contient un texte quelconque, homogène ou composite, qui
+ interrompt le texte le contenant à n’importe quel endroit et après lequel le texte environnant
+ reprend.
+ contiene un texto de cualquier tipo, unitario o
+ compuesto, que se insiere en algún punto en un texto que lo contiene interrumpiéndolo.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Hush, the players begin...
+
+
+
+
+
+ In Athens our tale takes place [...]
+
+
+
+
+
+
+
Now that the play is finished ...
+
+
+
+
+
+
+
+
+
+
+
Chut ! Les acteurs commencent...
+
+
+
+
+
+ Notre histoire se passe à Athènes [...]
+
+
+
+
+
+
+
La pièce est maintenant finie ...
+
+
+
+
+
+
+
+
+
+
+
快點,演員開始了...
+
+
+
+
+
+ 故事開始於雅典...
+
+
+
+
+
+
+
戲劇結束...
+
+
+
+
+
+
+
A floating text has the same content as any other text
+ and may thus be interrupted by another floating text, or contain a
+ group of tesselated texts.
+
+
+
Un texte "flottant" a le même contenu que tout autre texte : il peut donc être interrompu par
+ un autre texte "flottant" ou contenir un groupe de textes composites.
Un-numbered Divisions
+ text division
+ 텍스트 구역
+ 文本區段
+ division du texte
+ Textgliederung
+ división de texto
+ partizione testuale
+ contains a subdivision of the front, body, or back of a text.
+ 텍스트의 전면부, 본문, 후면부의 하위 구역을 포함한다.
+ 文本的正文前資訊、正文、及正文後資訊的分段。
+ 前付,本文,後付中のテキスト部分を示す.
+ contient une subdivision dans le texte préliminaire, dans le
+ corps d’un texte ou dans le texte postliminaire.
+ enthält eine Untergliederung von Vorspann (front),
+ Kerntext oder Nachspann (back) eines Textes.
+ contiene una subdivisión del paratexto inicial, del
+ cuerpo del texto o del paratexto final.
+ contiene una suddivisione del peritesto iniziale, del
+ corpo del testo, o del peritesto finale
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Abstract model violation: Lines may not contain higher-level structural elements such as div.
+
+
+
+
+
+
+ Abstract model violation: p and ab may not contain higher-level structural elements such as div.
+
+
+
+
+
+
+
+ Fallacies of Authority
+
The subject of which is Authority in various shapes, and the object, to repress all
+ exercise of the reasoning faculty.
+
+ The Nature of Authority
+
With reference to any proposed measures having for their object the greatest
+ happiness of the greatest number [...]
+
+ Analysis of Authority
+
What on any given occasion is the legitimate weight or influence to be attached to
+ authority [...]
+
+
+ Appeal to Authority, in What Cases Fallacious.
+
Reference to authority is open to the charge of fallacy when [...]
+
+
+
+
+
+
+
+
+
+
+ Les Chouans
+
+ Première partie
+ L'embuscade
+
+ Chapitre premier
+
+ I
+
Dans les premiers jours de l'an VIII, au commencement de vendémiaire, ou, pour
+ se conformer au calendrier actuel, vers la fin du mois de septembre 1799, une
+ centaine de paysans et un assez grand nombre de bourgeois, partis le matin de
+ Fougères pour se rendre à Mayenne, gravissaient la montagne de la Pèlerine,
+ située à mi-chemin environ de Fougères à Ernée, petite ville où les voyageurs
+ ont coutume de se reposer.
Numbered Divisions
+ level-1 text division
+ 1 층위 텍스트 구역
+ 區段層次一
+ division du texte de niveau 1
+ Textgliederungsebene -1
+ división textual de primer nivel
+ partizione testuale di livello 1
+ contains a first-level subdivision of the front, body, or back of a text.
+ 텍스트의 전면부, 본문 또는 후면부의 첫 번째 층위 하위 구역을 포함한다.
+ 文本的正文前資訊、正文及正文後資訊的第一層分段
+ (若未使用區段層次零,區段層次一是最高層的分段。若使用區段層次零,則區段層次一為第二層分段) 。
+ 前付,本文,後付中の第1位のテキスト部分を示す.
+ contient une subdivision de premier niveau dans
+ le texte préliminaire, dans le corps d’un texte ou dans le texte postliminaire.
+ enthält die erste Gliederungsebene von Vorspann (front),
+ Kerntext oder Nachspann (back) eines Textes, (gilt als die größte Ebene, sofern div0 nicht
+ benutzt wird. Wird div0 benutzt, ist es die zweitgrößte).
+ contiene una subdivisión del primer nivel en el paratexto
+ inicial, en el cuerpo del texto o en el paratexto final.
+ contiene una sezione di primo livello del peritesto
+ iniziale, del corpo del testo, o del peritesto finale (la più ampia, se div0 non è usato,
+ altrimenti la seconda in ordine gerarchico)
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Part I: Of Man
+
+ Chap. I. Of Sense
+
Concerning the Thoughts of man...
+
+
+
+ Part II: Of Common-Wealth
+
+
+
+
+
+
+ livre premier
+
+ La Grand'salle
+
Il y a aujourd'hui trois cent quarante-huit ans six mois et dix-neuf jours que les
+ parisiens s'éveillèrent au bruit de toutes les cloches sonnant à grande volée dans la
+ triple enceinte de la Cité, de l'Université et de la Ville.
+
+
+
+ livre deuxième
+
+ De Charybde en Scylla
+
La nuit arrive de bonne heure en janvier. Les rues étaient déjà sombres quand
+ Gringoire sortit du Palais.
+
+
+
+
+
+
+
+ 第一部:陰錯陽差
+
+ 第一章
+
乾隆年間,北京。紫薇帶著丫頭金瑣,來到北京已經快一個月了。..
+
+
+
+ 第二部: 水深火熱
+
+
+
+
+
any sequence of low-level structural elements, possibly grouped into lower
+ subdivisions.
+
+
+
Cet élément contient une séquence d'éléments structurels de bas niveau,
+ éventuellement groupés en subdivisions.
+
+
+
下位区分と成りうる一連の構造単位.
+
+
+
+
+
+ level-2 text division
+ 2 층위 텍스트 구역
+ 區段層次二
+ division du texte de niveau 2
+ Textgliederungsebene -2
+ división textual de segundo nivel
+ partizione testuale di livello 2
+ contains a second-level subdivision of the front, body, or back of a
+ text.
+ 텍스트의 전면부, 본문 또는 후면부의 두 번째 층위 하위 구역을 포함한다.
+ 文本的正文前資訊、正文及正文後資訊的第二層分段。
+ 前付,本文,後付中の第2位のテキスト部分を示す.
+ contient une subdivision de deuxième niveau dans
+ le texte prélimaire, dans le corps d’un texte ou dans le texte postliminaire.
+ enthält die zweite Gliederungsebene von Vorspann (front), Kerntext oder Nachspann (back) eines Textes.
+ contiene una subdivisión del segundo nivel en el paratexto inicial, en el cuerpo del texto o en el paratexto final.
+ contiene una sezione di secondo livello del peritesto iniziale, del corpo del testo, o del peritesto finale
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ The Second Partition:
+ The Cure of Melancholy
+
+
+
+ Unlawful Cures rejected.
+
Inveterate melancholy, howsoever it may seem to
+ be a continuate, inexorable disease, hard to be
+ cured, accompanying them to their graves most part
+ (as Montanus observes), yet many
+ times it may be helped...
+
+
+
+
+
+
+ Sect. II. Memb. I
+
+
+
+
+
+
+ Sect. III. Memb. I
+
+
+
+
+
+
+
+
+
+
+
+ Chapitre II. Traitement électronique des données en histoire de la littérature
+ française : bilan provisoire
+
+
+
+ Les objectifs
+
Chaque étudiant est convié à parcourir la banque à partir des différentes entrées
+ liées au cours magistral qu'il suit en amphithéâtre...
+
+
+
+
+
+ Sect. II. Subsection I. Exploitation pédagogique de la BDHL
+
Pour la plupart des étudiants en Lettres des générations précédentes, un
+ enseignement de l'histoire de la littérature allait de soi...
+
+
+
+
+ Sect. III. Subsection I. Etudes permises par la BDHL
+
L'existence d'une banque de données, quelle qu'elle soit, permet d'envisager des
+ traitements statistiques.
any sequence of low-level structural elements, possibly grouped
+into lower subdivisions.
+
+
+
Cet élément contient une séquence d'éléments structurels de bas
+ niveau, éventuellement groupés en subdivisions.
+
+
+
+ 下位区分と成りうる一連の構造単位.
+
+
+
+
+
+
+ level-3 text division
+ 3 층위 텍스트 구역
+ 區段層次三
+ division du texte de niveau 3
+ Textgliederungsebene -3
+ división textual de tercer nivel
+ partizione testuale di livello 3
+ contains a third-level subdivision of the front, body, or back of a text.
+ 텍스트의 전면부, 본문 또는 후면부의 세 번째 층위 하위 구역을 포함한다.
+ 文本的正文前資訊、正文及正文後資訊的第三層分段。
+ 前付,本文,後付中の第3位のテキスト部分を示す.
+ contient une subdivision de troisième niveau dans
+ le texte préliminaire, dans le corps d’un texte ou dans le texte postliminaire.
+ enthält die dritte Gliederungsebene von Vorspann
+ (front), Kerntext oder Nachspann (back) eines Textes.
+ contiene una subdivisión de tercer nivel en el paratexto
+ inicial, en el cuerpo del texto o en el paratexto final.
+ contiene una sezione di terzo livello del peritesto
+ iniziale, del corpo del testo, o del peritesto finale
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Sect. II. Memb. I
+
+
+
+ Memb. II Retention and Evacuation rectified.
+
+
+
+ Memb. III Ayr rectified. With a digression of the Ayr.
+
+
+
+
+
+
+
+
+
+ Sect. II. Subsect. I Dictionnaires.
+
C'est un recueil de mots rangés dans un ordre convenu...
+
+
+ Sect. II. Subsect. II. Qu'est-ce qu'un dictionnaire de langue ? .
+
Un dictionnaire de langue est un dictionnaire donnant les mots d'une langue et leurs
+ emplois...
+
+
+ Sect. II. Subsect. III. Qu'est-ce qu'un dictionnaire encyclopédique ?
+
Un dictionnaire encyclopédique est un dictionnaire qui contient des renseignements
+ sur les choses, sur les idées
+
+
+
+
+
+
+
+
+ 打破內在/外在、主觀/客觀的二元對立
+
在二○年代的蘇聯文藝界,...
+
+
+ 交流:藝術話語與生活話語的共性
+
林林總總的文理理論圍繞著作者、作品和讀者的關係問題,...
+
+
+ 言談和音調
+
在這裡,巴赫汀為言談做了一個大膽的定義:...
+
+
+
+
+
+
any sequence of low-level structural elements, possibly grouped into lower
+ subdivisions.
+
+
+
Cet élément contient une séquence d'éléments structurels de bas niveau,
+ éventuellement groupés en subdivisions.
+
+
+
下位区分と成りうる一連の構造単位.
+
+
+
+
+
+ level-4 text division
+ 4 층위 텍스트 구역
+ 區段層次四
+ division du texte de niveau 4
+ Textgliederungsebene -4
+ división textual de cuarto nivel
+ partizione testuale di livello 4
+ contains a fourth-level subdivision of the front, body, or back of a text.
+ 텍스트의 전면부, 본문 또는 후면부의 네 번째 층위 하위 구역을 포함한다.
+ 文本的正文前資訊、正文及正文後資訊的第四層分段。
+ 前付,本文,後付中の第4位のテキスト部分を示す.
+ contient une subdivision de quatrième niveau dans
+ le texte préliminaire, dans le corps d’un texte ou dans le texte postliminaire.
+ "> enthält die vierte Gliederungsebene von
+ Vorspann (front), Kerntext oder Nachspann (back) eines Textes.
+ contiene una subdivisión del cuarto nivel en el paratexto
+ inicial, en el cuerpo del texto o en el paratexto final.
+ contiene una sezione di quarto livello del peritesto
+ iniziale, del corpo del testo, o del peritesto finale
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Sect. II. Memb. I
+
+ Subsect I. — Dyet rectified in substance.
+
Diet, diaitotiku, victus or
+ living
+
+
+ Subsect II. — Dyet rectified in quantity.
+
Man alone, saith Cardan, eates and drinks without appetite, and useth all his pleasures
+ without necessity
+
+
+
+
+
+
+
+ Sect. II. Subsect. I
+
+ Alinéa I. HorlogerieLame de ressort.
+
Bande d'acier enroulée formant le ressort d'une montre, d'une pendule. (Dict. XIXe
+ et XXe s.).
+
+
+ Alinéa II. — MenuiserieLame de parquet
+
Lame de parquet. Chacune des bandes de bois qui, emboîtées, constituent le
+ parquet
any sequence of low-level structural elements, possibly grouped into lower
+ subdivisions.
+
+
+
Cet élément contient une séquence d'éléments structurels de bas niveau,
+ éventuellement groupés en subdivisions.
+
+
+
下位区分と成りうる一連の構造単位.
+
+
+
+
+
+ level-5 text division
+ 5 층위 텍스트 구역
+ 區段層次五
+ division du texte de niveau 5
+ Textgliederungsebene -5
+ división textual de quinto nivel
+ partizione testuale di livello 5
+ contains a fifth-level subdivision of the front, body, or back of a text.
+ 텍스트의 전면부, 본문 또는 후면부의 다섯 번째 층위 하위 구역을 포함한다.
+ 文本的正文前資訊、正文及正文後資訊的第五層分段。
+ 前付,本文,後付中の第5位のテキスト部分を示す.
+ contient une subdivision de cinquième niveau dans le
+ texte préliminaire, dans le corps d’un texte ou dans le texte postliminaire.
+ "> enthält die fünfte Gliederungsebene von
+ Vorspann (front), Kerntext oder Nachspann (back) eines Textes.
+ contiene una subdivisión del quinto nivel en el paratexto
+ inicial, en el cuerpo del texto o en el paratexto final.
+ contiene una sezione di quinto livello del peritesto
+ iniziale, del corpo del testo, o del peritesto finale
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Recipes
+ Chapter VI.
+
+ Fruit and vegetable soups
+
...
+
+ Stocks for all kinds of soups
+
+ Rich strong stock
+
+
+
+ Medium Stock
+
+
+
+
+ Apple soup
+
+ Ingredients
+
+ 2 lbs. of good boiling apples,
+ 3/4 teaspoonful of white pepper,
+ 6 cloves,
+ cayenne or ginger to taste,
+ 3 quarts of medium stock
+
+
+
+ Mode
+
Peel and quarter the apples taking out their cores; put them into
+the stock, stew them gently till tender, Rub the whole through a
+strainer, add the seasoning. give it one boil up, and serve.
+
+
+ Time
+
1 hour.
+
+
+ Average cost
+
per quart, 1s.
+
+
+ Seasonable
+
from September to December.
+
+
+ Sufficient
+
for 10 persons
+
+
+ The apple
+
This useful fruit is mentioned in Holy Writ; and Homer describes it
+as valuable in his time... As a food, the apple cannot be considered
+to rank high, as more than the half of it consists of water, and
+the rest of its properties are not the most nourishing. It is
+however a useful adjunct to other kinds of food, and, when cooked, is
+esteemed as slightly laxative.
+
+
+
+ Artichoke (Jerusalem) soup
+
...
+
+
+
+
+
+
+
+
+
+
+
any sequence of low-level structural elements, possibly grouped into lower
+ subdivisions.
+
+
+
Cet élément contient une séquence d'éléments structurels de bas niveau,
+ éventuellement groupés en subdivisions.
+
+
+
下位区分と成りうる一連の構造単位.
+
+
+
+
+
+ level-6 text division
+ 6 층위 텍스트 구역
+ 區段層次六
+ division du texte de niveau 6
+ Textgliederungsebene -6
+ división textual de sexto nivel
+ partizione testuale di livello 6
+ contains a sixth-level subdivision of the front, body, or back of a text.
+ 텍스트의 전면부, 본문 또는 후면부의 여섯 번째 층위 하위 구역을 포함한다.
+ 文本的正文前資訊、正文及正文後資訊的第六層分段。
+ 前付,本文,後付中の第6位のテキスト部分を示す.
+ contient une subdivision de sixième niveau dans le texte
+ préliminaire, dans le corps d’un texte ou dans le texte postliminaire.
+ enthält die sechste Gliederungsebene von Vorspann
+ (front), Kerntext oder Nachspann (back) eines Textes.
+ contiene una subdivisión del sexto nivel en el paratexto
+ inicial, en el cuerpo del texto o en el paratexto final.
+ contiene una sezione di sesto livello del peritesto
+ iniziale, del corpo del testo, o del peritesto finale
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Recipes
+ Chapter VI.
+
+ Fruit and vegetable soups
+
...
+
+ Stocks for all kinds of soups
+
+ Rich strong stock
+
+ Ingredients
+
+ 4 lbs of shin of beef,
+ 4 lbs of knuckle of veal,
+
+ 4 quarts of water
+
+
+
+ Mode
+
Line a delicately clean stewpan... Strain through a very
+fine hair sieve, or tammy, and it will be fit for use
+
+
+ Time
+
5 hours.
+
+
+ Average cost
+
1s 3d. per quart
+
+
+
+ Medium Stock
+
+
+
+
+
+
+
+
+
+
+
+
+
any sequence of low-level structural elements, possibly grouped into lower
+ subdivisions.
+
+
+
Cet élément contient une séquence d'éléments structurels de bas niveau,
+ éventuellement groupés en subdivisions.
+
+
+
下位区分と成りうる一連の構造単位.
+
+
+
+
+
+ level-7 text division
+ 7 층위 텍스트 구역
+ 區段層次七
+ division du texte de niveau 7
+ Textgliederungsebene -7
+ división textual de nivel séptimo
+ partizione testuale di livello 7
+ contains the smallest possible subdivision of the front, body or back of a text, larger than
+ a paragraph.
+ 텍스트의 전면부, 본문 또는 후면부의, 문단보다 큰 가능한 한 가장 작은 하위 구역을 포함한다.
+ 文本的正文前資訊、正文及正文後資訊的最低層分段,分段層級高於段落。
+ 前付,本文,後付中の一番小さいレベルのテキスト部分を示す.
+ contient la plus petite subdivision possible dans le
+ texte préliminaire, dans le corps d’un texte ou dans le texte postliminaire, plus grande
+ néanmoins qu’un paragraphe.
+ enthält die kleinste mögliche Untergliederung von
+ Vorspann (front), Kerntext oder Nachspann (back) eines Textes, die größer als ein Absatz ist.
+ contiene la subdivisión más pequeña, pero más grande que
+ un párrafo, del paratexto inicial, del cuerpo del texto o del paratexto final.
+ contiene la sezione più ristretta, ma più ampia di un
+ paragrafo, del peritesto iniziale, del corpo del testo, o del peritesto finale
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Recipes
+ Chapter VI.
+
+ Fruit and vegetable soups
+
...
+
+ Stocks for all kinds of soups
+
+ Asparagus soup
+
+ I.
+
+ Ingredients
+
+ ...
+
+
+
+ Mode
+
Put the beef, cut into pieces and rolled in flour, into a
+stewpan...
Boil the peas, and rub them through a sieve; add the gravy...
+
+
+
+
+
+
+
+
+
+
+
+
+
any sequence of low-level structural elements, e.g., paragraphs (p),
+ lists (list), or examples (eg or egXML).
+
+
+
Cet élément contient une séquence d'éléments structurels de bas niveau, par
+ exemple des paragraphes (p), des listes (list), ou des exemples (eg
+ ou egXML).
+
+
+
+
+
+ automatically generated text division
+ 자동적으로 생성된 텍스트 구역
+ 自動產生的文字區段
+ division de texte générée automatiquement
+ división de texto generada automáticamente
+ partizione testuale generata automaticamente
+ indicates the location at which a textual division generated
+ automatically by a text-processing application is to appear.
+ 텍스트 처리 애플리케이션에 의해 자동적으로 생성된 텍스트 구역이 나타나는 위치를 표시한다.
+ 指出文件處理軟體運作下自動產生的文字區段所出現的位置。
+
+ ソフトウェアで自動生成されたテキスト部分の場所を示す.
+ indique l'emplacement où doit apparaître une
+ division du texte générée automatiquement par une application de traitement de
+ texte.
+ indica la localización en la cual aparece una división textual generada automáticamente por la aplicación de un procesamiento de texto.
+ indica la posizione in cui deve apparire una partizione testuale generata automaticamente da un'applicazione che elabora testi
+
+
+
+
+
+
+
+
+
+
+
+
+ specifies what type of generated text division (e.g. index,
+ table of contents, etc.) is to appear.
+ 생성된 텍스트 구역의 유형(예, 색인, 목차 등)을 명시한다.
+ 具體指明何種文字區段 (如索引、目錄等) 會出現。
+ 生成されたテキスト部分の種類を示す.例えば,索引,目次など.
+ précise le type de section de
+ texte qui apparaîtra par génération automatique (par exemple : index,
+ table des matières, etc.)
+ especifica que tipo de divisón de texto generada aparece (p.ej. índice, tabla de contenidos, etc.)
+ specifica quale tipo di partizione testuale generata (ad esempio indice, sommario, ecc.) apparirà
+
+
+
+ an index is to be generated and inserted at this point.
+ 색인은 이 지점에서 생성되고 삽입된다.
+ 索引會產生並置入於此處
+ se debe generar e insertar un índice en este punto.
+ 当該の場所に生成された索引.
+ un index doit être généré et inséré à
+ cet endroit.
+ un indice sarà generato e inserito in questo punto.
+
+
+ una tabla de contenidos.
+ a table of contents
+ 목차
+ 目錄
+ 目次.
+ une table des matières
+ sommario
+
+
+ a list of figures
+ 그림 목록
+ 圖表列表
+ una lista de figuras
+ 図目次.
+ une liste des figures
+ una lista di immagini
+
+
+ a list of tables
+ 표 목록
+ 表格列表
+ una lista de tablas
+ 表目次.
+ une liste des tableaux
+ una lista di tabelle
+
+
+
+
Valid values are application-dependent; those shown are of
+ obvious utility in document production, but are by no means
+ exhaustive.
+
+
+
Les valeurs de cet attribut dépendent de l'application utilisée ; celles qui
+ sont données ci-dessus sont utiles dans le processus de production du
+ document XML, mais leur liste n'est en aucun cas exhaustive.
One use for this element is to allow document preparation
+ software to generate an index and insert it in the appropriate place in
+ the output. The example below assumes that the indexName
+ attribute on index elements in the text has been used to specify index
+ entries for the two generated indexes, named NAMES and THINGS:
Une utilisation de cet élément est de permettre au logiciel de traiter des documents afin
+ de générer en sortie un index et de l' insérer à l'endroit approprié. L'exemple ci-dessous
+ suppose que l'attribut indexName sur les éléments index dans le texte a
+ été employé pour spécifier des entrées d'index pour deux index produits, nommés NAMES and
+ THINGS:
Another use for divGen is to specify the
+ location of an automatically produced table of contents:
+
+
+
+
+
+ Preface
+
...
+
+
+
+
+
+
This element is intended primarily for use in document
+ production or manipulation, rather than in the transcription of
+ pre-existing materials; it makes it easier to specify the location of
+ indices, tables of contents, etc., to be generated by text preparation
+ or word processing software.
+
+
+
+
Cet élément est plutôt utilisé pendant la production ou la manipulation du document
+ TEI, que dans le processus de transcription de documents préexistants ; il
+ permet de spécifier à quel endroit du document les index, tables des matières, etc.,
+ devront être générés par programme.
Content of Textual Divisions
+ contains a closing title or footer appearing at the end of a division of a text.
+ 텍스트 구역의 종료부에 나타나는 마지막 제목 또는 꼬리말을 포함한다.
+ 包含文本中一個區段結束時的結尾題名或尾錄。
+ テキスト部分の最後にある,結びのタイトルや脚注を示す.
+ contient un titre de fin ou de bas de page à la fin d’une
+ division du texte.
+ enthält Schlusstitel oder Fußzeile am Ende einer
+ Untergliederung des Textes.
+ contiene una fórmula de clausura o un elemento a pie de
+ página que aparece al final de una sección de texto
+ contiene una formula di chiusura o un elemento a piè di
+ pagina che compare alla fine di una sezione di testo
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Explicit pars tertia
+
+
+
+
+
+ In stead of FINIS this advice I send,
+ Let Rogues and Thieves beware of
+ Hamans END.
+
+
+
From EEBO A87070
+
+
+
+ Explicit pars tertia
+
+
+
+
+ 畢竟董卓性命如何,且聽下文分解。
+
+
+
+
+
+
+
+ mention de responsabilité
+ contains the primary statement of responsibility given for a work
+on its title page or at the head or end of the work.
+ 제목 페이지 또는 작품의 시작부 또는 종료부에서 작품 책임성에 대한 주요 진술을 포함한다.
+ 包含作品的主要責任陳述,出現在題名頁或作品開頭或結尾處。
+ タイトルページや作品の冒頭や最後にある,作品の責任者を表す第一位の記
+ 述.
+ indique la responsabilité principale
+ pour une œuvre donnée sur la page de titre ou au début ou à la fin de
+ l’œuvre.
+ enthält Angaben zur Autorisation eines Werks, entweder auf der Titelseite oder am Anfang oder Ende des Werks.
+
+ contiene la declaración principal de responsabilidad para una obra, así como aparece en su título correspondiente, o al inicio o fin de la obra.
+ contiene la principale dichiarazione di responsabilità per un'opera così come appare sul corrispondente frontespizio oppure all'inizio o alla fine dell'opera stessa
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Written by a CITIZEN who continued all the
+while in London. Never made publick before.
+
+
+
+
+ écrit par Costals sur le feuillet blanc de cette lettre : " cette correspondance n'
+ était pour vous qu' un jeu. "
+
+
+
+
+ extraits de Villoison et de Schlegel. Commencé la rédaction du quatrième
+ livre.
+
+
+
+
+ Reportage céleste de notre envoyé spécial au paradis
+
+
+
+
+ Zagreb :
+ de notre envoyé spécial.
+
+
+
+
+ Par le docteurMartin Becanus, au tome troisiesme de ses
+ opuscules
+
+
+
+
+ 由一個倫敦土生土長的市民撰寫,先前未曾出版過。
+
+
+
+
+ 錄自她自己的回憶錄
+
+
+
+
+ 來自華盛頓的政治編輯喬治.瓊斯
+
+
+
+
+ 重慶:
+ 外交使節專用
+
+
+
+
+ 源自美國哥倫比亞大學博士胡適
+
+
+
+
+
+ Written from her own MEMORANDUMS
+
+
+
+
+ By George Jones, Political Editor, in Washington
+
+
+
+
+ BY
+THOMAS PHILIPOTT,
+Master of Arts,
+(Somtimes)
+Of Clare-Hall in Cambridge.
+
+
+
+
The byline on a title page may include either the name
+or a description for the document's author. Where the name is included,
+it may optionally be tagged using the docAuthor element.
+
+
+
La mention de reponsabilité sur une page de titre peut inclure, soit le nom, soit la description de
+ l'auteur d'un document. Lorsque le nom y est donné, on peut éventuellement l'encoder
+ au moyen de l'élément docAuthor.
+
+
+
+
+
+
+ mention de date
+ contains a brief description of the place, date, time, etc. of production of a letter,
+ newspaper story, or other work, prefixed or suffixed to it as a kind of heading or trailer.
+ 편지, 신문 기사 또는 다른 작품에 제목부 또는 종료 요약부로서, 앞에 또는 뒤에 부착되어 있는,
+ 그것이 생성된 장소, 날짜, 시간 등의 간단한 기술.
+ 包含簡短的地點、日期及時間等的描述,通常出現在信件、報紙文章、或其他作品中的開頭或結尾,作為一種標頭或結尾。
+ 手紙や新聞記事などの前後に付加されている,場所,日付,時間などを簡易 に示す.
+ contient une brève description des lieux, date, heure,
+ etc. concernant la production d’une lettre, d’un article de journal ou d’un autre texte qui,
+ placée au début ou à la fin, lui est associée comme en-tête ou annonce de fin.
+ enthält Angaben zu Entstehungsort, -datum, -zeit, usw.
+ eines Briefs, Zeitungsartikels, oder anderen Werks, die als Überschrift oder Teil des Nachspanns
+ dem Text voran- bzw. nachgestellt sind.
+ contiene una breve descripción de lugar, fecha, hora,
+ etc. de producción de una carta, un artículo periodístico u otro tipo de texto; viene antepuesto
+ o pospuesto a este como elemento de abertura o clausura.
+ contiene una breve descrizione di luogo, data, ora, ecc.
+ di produzione di una lettera, un articolo di giornale o altro tipo di testo; viene anteposto o
+ posposto a mo' di elemento di apertura o chiusura
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Walden, this 29. of August 1592
+
+
+
+
+ Avignon, le 11 février.
+
+
+
+
+
+
Et, sur cet océan bourdonnant de mille vaguelettes, se leva l'armée caressante et si
+ tendre des merveilleuses sirènes blondes aux seins durs comme ça.
+
+ Thionne-Paris, 1950-1951.
+
+
+
+
+
+
+ 2008年7月3日,香港。
+
+
+
+
+
+
自己想吃人,又怕被別人吃了,都用著疑心极深的眼光,面面相覷。……
+
+
+ 南京
+ 1918–1919
+
+
+
+
+
+
+
+
+
and his heart was going like mad and yes I said yes I will Yes.
+
+
+ Trieste-Zürich-Paris,
+ 1914–1921
+
+
+
+
+
+
+
+
+
+
+ argument
+ contains a formal list or prose description of the topics addressed by
+ a subdivision of a text.
+ 텍스트의 하위 구역에서 서술된 주제에 대한 형식적 목록 또는 산문체 기술
+ 規則列表或文字敘述,說明文本分段內容包含的主題。
+ 下位部分にあるテキストのトピックを整形のリストまたは散文で示す.
+ liste formelle ou description en texte libre
+ des sujets traités dans une subdivision d’un texte
+ Eine systematische Aufzählung oder Prosabeschreibung der Themen, die in einem Unterabschnitt des Textes behandelt werden.
+ lista formal o descripción de los argumentos contenidos en una sección de texto.
+ lista formale o descrizione degli argomenti contenuti in una sezione di testo
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Monte Video — Maldonado — Excursion
+to R Polanco — Lazo and Bolas — Partridges —
+Absence of Trees — Deer — Capybara, or River Hog —
+Tucutuco — Molothrus, cuckoo-like habits — Tyrant
+Flycatcher — Mocking-bird — Carrion Hawks —
+Tubes formed by Lightning — House struck
+
+
+
+
+
+
+
28 janvier. J’ai le plus grand mal à me réatteler aux Faux-Monnayeurs — La Bastide. Fin mars. Besoin de couper mon travail. — Cuverville . Fin mai. Mise au net et dactylographie de cinq chapitres des Faux-Monnayeurs. — 8 juin. Achevé les Faux- Monnayeurs. — 14 juillet. Départ pour le Congo.
Cet élément contient souvent soit une liste, soit un paragraphe de
+ texte.
+
+
+
+ リストか段落のいずれかを含む場合が多い.
+
+
+
+
+
+
+
+ contains a quotation, anonymous or attributed, appearing at
+ the start or end of a section or on a title page.
+ 절 또는 장의 시작, 또는 제목 페이지에 나타나는 인용, 작자미상, 또는 추정을 포함한다.
+ 包含一段匿名或署名引文,出現在段落或章節的開頭,或在題名頁中。
+ 章や節の始め,タイトルページなどにある引用(題辞)を示す.
+ contient une citation, anonyme ou attribuée et qui apparaît au
+ début d’une section ou d’un chapitre ou sur une page de titre.
+ enthält ein anonymes oder jemandem zugeschriebenes Zitat,
+ das am Beginn eines Abschnitts, Kapitels oder auf einer Titelseite steht.
+ contiene una cita, anónima o atribuida, que aparece al
+ inicio de una sección o capítulo, o en el frontispicio.
+ contiene una citazione, anonima o attribuita, che appare
+ all'inizio di una sezione o capitolo, o sul frontespizio
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Lucret.
+
+ petere inde coronam,
+ Vnde prius nulli velarint tempora Musae.
+
+
+
+
+
+
+
+
+
+ 俞平伯
+
+ 小燕子其實也無所愛,
+ 只是沉浸在朦朧而飄忽的夏夜夢里罷了。
+
+
+
+
+
+
+
+
+
+
+
+ formule de début
+ groups together dateline, byline, salutation, and similar phrases appearing as a preliminary
+ group at the start of a division, especially of a letter.
+ 구역, 특히 편지의 시작부에 서문군으로 나타나는 날짜 표시란, 필자명 행, 인사말, 그리고 유사 구를
+ 합하여 모아 놓는다.
+ 匯集日期地點、署名、稱呼語及其他在區段開端出現的類似措辭,尤指信件開頭。
+ テキスト部分の始まりに,日付欄,署名欄,挨拶文言など,前置き的な部分
+ としてあるものをまとめる.典型例は,手紙の場合である.
+ regroupe la date, la mention de responsabilité, la
+ formule de politesse et d'autres expressions de ce type dans un groupe préliminaire au début
+ d’une division, en particulier au commencement d’une lettre.
+ fasst Datumszeile, Verfasserangabe, Anredeformeln und
+ ähnliche Angaben zusammen, die einleitend zu Beginn eines Abschnitts stehen, vor allem bei
+ Briefen.
+ agrupa la fecha, autoria, fórmula introductiva o de
+ saludo o expresiones similares utilizades al inicio de una división textual, especialmente en
+ una carta.
+ raggruppa dateline, byline, formule introduttive o di
+ saluto ed espressioni simili utilizzate all'inizio di una partizione testuale, soprattutto in
+ una lettera
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Walden, this 29. of August 1592
+
+
+
+
+
+
+ Avignon, le 11 février.
+
+
+
+
+
+
+ à Paris , le 2 septembre 1769
+
+
Mais non, ma bonne amie, vous n' aviez pas raison de vous plaindre...
+
+
+
+
+
+
+ Great Marlborough Street
+ November 11, 1848
+
+ My dear Sir,
+
+
I am sorry to say that absence from town and other circumstances have prevented me from
+ earlier enquiring...
+
+
+
+
+
+
+
+ formule finale
+ groups together salutations, datelines, and similar phrases appearing as a final group at
+ the end of a division, especially of a letter.
+ 구역의 마지막, 특히 편지의 종료부에 발문으로 나타나는 인사말, 날짜 표시란, 그리고 유사 구를 합하여
+ 모아 놓는다.
+ 匯集日期地點、署名、稱呼語、及其他在區段結尾出現的類似措辭,尤指信件結尾。
+ 挨拶文言,日付欄など,ある区分の終わり,特に手紙の終わりにある一連の 文言をまとめる.
+ regroupe une formule de politesse, une indication d'une
+ date et d'autres expressions semblables figurant comme expression à la fin d’une division, en
+ particulier à la fin d’une lettre.
+ fasst Datumszeile, Verfasserangabe, Grußformeln und
+ ähnliche Angaben zusammen, die abschließend am Ende eines Abschnitts stehen, vor allem bei
+ Briefen.
+ agrupa saludos, fechas, y expresiones similares que
+ aparecen al final de una división textual, especialmente en una letra.
+ raggruppa dateline, byline, formule conclusive o di
+ saluto ed espressioni simili utilizzate alla fine di una partizione, soprattutto in una lettera
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
perhaps you will favour me with a sight of it when convenient.
+
+ I remain, &c. &c.
+ H. Colburn
+
+
+
+
+
+
+
+
N'y voyez que le signe de l'intérêt que je que je porte à une profession qui fut la
+ mienne. Je désire en effet, insérer votre article dans un ouvrage sur la presse
+ française contemporaine.
+
+ Veuillez agréer, je vous prie, Monsieur, l'assurance de mes sentiments les
+ meilleurs.
+ Françoise Giroud
+
+
+
+
+
+
+
+
Voilà, cher Rhedi, ce que j' appelle le droit public. Voilà le droit des gens, ou
+ plutôt celui de la raison.
+
+ à Paris , le 4 de la lune de Zilhagé, 1716.
+
+
+
+
+
+
+
+
不久,我們就能再見面。
+
+ 祝事事順心
+ 謝甯
+
+
+
+
+
+
+
+
自己想吃人,又怕被別人吃了,都用著疑心极深的眼光,面面相覷。……
+
+
+ 南京
+ 1918–1919
+
+
+
+
+
+
+
+
+
and his heart was going like mad and yes I said yes I will Yes.
+
+
+ Trieste-Zürich-Paris,
+ 1914–1921
+
+
+
+
+
+
+
+
+
+
+
+
+
+ salutation
+ 인사말
+ 稱呼語
+ formule de politesse
+ Anrede- / Grußformel
+ saludo
+ formula di saluto
+ contains a salutation or greeting prefixed to a foreword, dedicatory epistle, or other
+ division of a text, or the salutation in the closing of a letter, preface, etc.
+ 머리말, 헌정 서한, 또는 텍스트의 다른 구역 앞에 첨부되는 인사말 또는 환영사, 아니면 편지, 서문
+ 등의 결문의 인사말.
+ 包含在序言、獻詞、或其他文本區段開頭的稱呼語或問候語,或是信件、引言等結尾處的致意詞。
+ (著者以外の)序文や献呈書簡などのテキスト部分に附属する挨拶文言または
+ 挨拶,または書簡や(著者による)序文の大和にある挨拶文言を示す.
+ contient un dédicace ou une formule de salut qui précède
+ un avant-propos ou autre division du texte; ou bien encore la formule de
+ politesse qui conclut une lettre, une préface, etc.
+ enthält eine Anrede oder Grußformel, die einem Vorwort,
+ einer Widmung oder einem anderen Abschnitt des Textes vorangestellt ist oder die Grußformel am
+ Ende eines Briefes, eines Vorworts, usw.
+ contiene una fórmula introductiva o de saludo previa a un
+ prefacio, a una dedicatoria o a atra división textual, o bien una fórmula conclusiva o de saludo
+ al final de una carta, prefacio, etc.
+ contiene una formula introduttiva o di saluto anteposta
+ rispetto a una prefazione, una lettera di dedica o altra partizione testuale, oppure una formula
+ conclusiva o di saluto alla fine di una lettera, prefazione, ecc
+
+
+
+
+
+
+
+
+
+
+ To all courteous mindes, that will voutchsafe the readinge.
+
+
+
+
+ Faites toutes mes amitiés à votre femme et recevez, mon cher ami, l'expression de
+ mes sentiments affectueux et dévoués.
+
+
+
+
+ 致敬啟者
+
+
+
+
+
+
+ signature
+ 서명
+ 簽名
+ Signatur
+ firma
+ firma
+ contains the closing salutation, etc., appended to a foreword,
+dedicatory epistle, or other division of a text.
+ 머리말, 헌정 서한 또는 텍스트의 다른 구역에 첨부되는 결문 인사.
+ contient la dernière salutation, ajoutée à un avant-propos,
+ à une dédicace ou à une autre division du texte.
+ 包含結尾致意詞等,附加在序言、獻詞、或其他文本區段中。
+ (著者以外の)序文や献呈書簡などのテキスト部分にある,結びの挨拶などを
+ 示す.
+ enthält die abschließende Grußformel o.Ä. die ein Vorwort, eine Widmung oder einen anderen Abschnitt des Textes beendet.
+ contiene una fórmula conclusiva o de saludo pospuesta a un prefacio, dedicatoria, u otro tipo de división textual.
+ contiene una formula conclusiva o di saluto posposta rispetto a una prefazione, lettera di dedica, o altra partizione testuale.
+
+
+
+
+
+
+
+
+
+
+ Thine to command Humph. Moseley
+
+
+
+
+
+
+ Sign'd and Seal'd,
+ John Bull,Nic. Frog.
+
+
+
+
+
+
+ votre fidèle amante, Manon Lescaut.
+
+
+
+
+
+ 李敖,于台北。
+
+
+
+
+
+
+
+ contains a postscript, e.g. to a letter.
+ 예를 들어 편지의, 추신.
+ contiene una posdata, p.ej. en una carta.
+ 追伸を示す.例えば,手紙の場合など.
+ contient un post-scriptum, par exemple au bas d' une
+lettre.
+ contiene un post scriptum, come nel caso di una lettera
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Rimaone
+ 21 Nov 06
+
+ Dear Susan,
+
+
Thank you very much for the assistance splitting those
+ logs. I'm sorry about the misunderstanding as to the size of
+ the task. I really was not asking for help, only to borrow the
+ axe. Hope you had fun in any case.
+
+ Sincerely yours,
+ Seymour
+
+
+
+
The collision occured on 06 Jul 01.
+
+
+
+
+
+
+
+
+
+ Printemps 1942
+
+ Cher ami,
+
+
Le printemps vient maintenant. J'espère que là où tu es le climat à cette saison n'est
+ pas encore pénible. C'est le moment des travaux des champs ; peut-être arrivera-t-on à
+ quelque chose pour toi. S'il n'y a pas moyen de te faire venir en France, faut-il faire
+ des démarches pour essayer de te faire quitter l'Europe ? Écris-le-moi.
+
[...]
+
+ Crois à mon amitié fraternelle.
+ Simone Weil
+
+
+
+
Voici la traduction de quelques vers grecs d'Eschyle. Ils sont prononcés par
+ Prométhée, le dieu qui, d'après les croyances des Grecs, avait sauvé les hommes de la
+ destruction, avait volé le feu pour le leur donner et leur avait appris le langage, le
+ nombre, l'astronomie, les métiers et les arts. Il en fut puni et fut cloué sur un
+ rocher. La tragédie d'Eschyle commence par la scène où on le cloue ; il se tait
+ pendant ce temps, puis, quand ses bourreaux sont partis, il dit : [...]
Title Pages
+ title page
+ 제목 페이지
+ 題名頁
+ page de titre
+ Titelseite
+ frontispicio
+ frontespizio
+ contains the title page of a text, appearing within the front or back matter.
+ 전면부 또는 후면부 자료 내에서 나타나는 텍스트의 제목 페이지를 포함한다.
+ 包含文本的題名頁,出現在正文前資訊或正文後資訊之中。
+ 前付や後付中にある,テキストのタイトルページを示す.
+ contient la page de titre d’un texte qui figure dans
+ les parties liminaires.
+ enthält die Titelseite eines Textes, die entweder im
+ Vorspann (front) oder Nachspann (back) steht.
+ contiene el frontispicio de un texto incluido en el
+ paratexto inicial o final
+ contiene il frontespizio di un testo compreso nel
+ peritesto iniziale o finale
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ classifies the title page according to any convenient typology.
+ 다양한 유형에 따라서 제목 페이지를 분류한다.
+ 將題名頁分類。
+ タイトルページを分類する.
+ classe la page de titre selon la typologie
+ appropriée.
+ bestimmt die Titelseite entsprechend einer geeigneten
+ Typologie
+ clasifica el frontispicio de acuerdo con una
+ tipología funcional.
+ classifica il frontespizio in base a una tipologia
+ funzionale
+
+
+
This attribute allows the same element to be used for volume title pages, series title
+ pages, etc., as well as for themain
+ title page of a work.
+
+
+
+
Cet attribut est utile parce que c'est le même élément titlePage qui est utilisé
+ pour les pages de titre de volumes, de collections, etc., et pour la page de titre
+ principale d'un ouvrage.
+
+
+
+
+
+
+
+ THOMAS OF Reading.
+ OR, The sixe worthy yeomen of the West.
+
+ Now the fourth time corrected and enlarged
+ By T.D.
+
+ TP
+
Thou shalt labor till thou returne to duste
+ Printers Ornament used by TP
+
+ Printed at London for T.P.
+ 1612.
+
+
+
+
+
+
+
+
+ Histoire du Roi de Bohême
+ et de ses sept châteaux
+
+ Pastiche.
+ Par Charles Nodier
+
+
+ O imitatores, servum pecus!
+ Horat., Epist. I. XIX, 19.
+
+ PARIS, Delangle Frères Éditeurs-libraires,
+ Place de la Bourse
+
+ MDCCCXXX
+
+
+
+
+
+
+
+ 紅樓夢
+ 又名石頭記
+
+ 清乾隆四十九年甲辰(1784年)夢覺主人序本正式題為《紅樓夢》,在此之前,此書一般都題為《石頭記》。
+ 曹雪芹
+
+ HL
+
紅樓夢圖詠
+ 清光緒刊本的《紅樓夢》插圖,改琦畫。
+
+ 最早的抄本出現於清朝乾隆中期的 甲戌年(1754年)。
+
+
+
+
+
+
+
+
+ document title
+ 문서 제목
+ 文件題名
+ titre du document
+ Dokumenttitel
+ título del documento
+ titolo del documento
+ contains the title of a document, including all its
+constituents, as given on a title page.
+ 제목 페이지에 제시되는 모든 구성성분을 포함한 문서의 제목을 제시한다.
+ 包含文件題名,包含所有組成部分,同於題名頁上所顯示的題名。
+ 当該文書のタイトルを示す.タイトルページにあるタイトルの全情報を含む.
+ contient le titre d’un document, incluant la
+ totalité de ses composants tels qu’ils sont donnés sur la page de titre.
+ enthält den Titel eines Dokuments, einschließlich aller seiner auf dem Titelblatt angegebenen Bestandteile.
+ contiene el título del documento incluyendo todos sus elementos constitutivos, como especificado en el frontispicio.
+ contiene il titolo del documento in tutti i suoi elementi costitutivi, come specificato nel frontespizio
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ The DUNCIAD, VARIOURVM.
+ WITH THE PROLEGOMENA of SCRIBLERUS.
+
+
+
+
+
+
+ LES CHOSES
+ Une histoire des années soixante.
+
+
+
+
+
+
+ 食物的歷史
+ 透視人類的飲食與文明
+
+
+
+
+
+
+
+ contains a subsection or division of the title of a work, as
+indicated on a title page.
+ 제목 페이지에 제시되는 작품 제목의 소절 또는 구역을 포함한다.
+ 包含作品題名的部分或區段,同於題名頁上所標示的題名。
+ タイトルページに示されている,作品タイトルの下位部分を示す.
+ contient une section ou division du titre d’un
+ ouvrage telle qu’elle est indiquée sur la page de titre.
+ enthält einen Untertitel oder einen Teil eines Titels, wie er auf der Titelseite angegeben ist.
+ contiene una subsección o división del título de una obra, como se indica en el frontispicio.
+ contiene una sezione o partizione del titolo di un'opera, come specificato nel frontespizio
+
+
+
+
+
+
+
+
+
+
+ specifies the role of this subdivision of the title.
+ 제목의 하위 구역에 대한 역할을 명시한다.
+ 說明該題名部分的作用。
+ 当該タイトルにおける,当該下位部分の役割を示す.
+ précise le rôle de cette subdivision du
+ titre.
+ beschreibt die Funktion dieses Titelteils näher.
+ especifica la función de tal subdivisión del título.
+ specifica il ruolo di tale sezione o partizione all'interno del titolo
+
+ main
+
+
+ main title of the work
+ 작품의 주요 제목
+ 作品主要題名
+ título principal del trabajo
+ 主タイトル.
+ titre principal de l'oeuvre.
+ titolo principale dell'opera
+
+
+ subordinate
+ 부수적
+ subordinato
+ sous-titre de l’ouvrage.
+ Untertitel des Werks
+ subtítulo de una obra
+ subtitle of the work
+ 작품의 부제
+ 作品次要題名
+ subtítulo del trabajo
+ 副タイトル.
+ sous-titre de l'oeuvre.
+ sottotitolo dell'opera
+
+
+ alternate
+ 이명
+ alternativo
+ titre alternatif de
+ l’ouvrage.
+ Alternativer Titel des Werks
+ título alternativo de una obra
+ alternative title of the work
+ 작품의 다른 제목
+ 作品代換題名
+ título alternativo del trabajo
+ 別タイトル.
+ autre titre de l'oeuvre.
+ titolo alternativo dell'opera
+
+
+ abbreviated form of title
+ 제목의 축약형
+ 題名的縮寫形式
+ forma abreviada del título
+ タイトルの省略形.
+ forme abrégée du titre.
+ forma abbreviata del titolo
+
+
+ descriptive
+ 기술적
+ descrittivo
+ description paraphrastique de
+ l’ouvrage.
+ Kurzbeschreibung des Werks
+ paráfrasis descriptiva de la obra
+ descriptive paraphrase of the work
+ 작품의 기술적 설명적 환문
+ 作品的描述性改述
+ paráfrasis descriptiva del trabajo
+ 説明的な言い換え.
+ texte qui paraphrase l'oeuvre.
+ parafrasi descrittiva dell'opera
+
+
+
+
+
+
+
+ THE FORTUNES
+ AND MISFORTUNES Of the FAMOUS
+ Moll Flanders, &c.
+
+ Who was BORN in NEWGATE,
+ And during a Life of continu'd Variety for
+ Threescore Years, besides her Childhood, was
+ Twelve Year a Whore, five times a Wife (wherof
+ once to her own Brother) Twelve Year a Thief,
+ Eight Year a Transported Felon in Virginia,
+ at last grew Rich, liv'd Honest, and died a
+ Penitent.
+
+
+
+
+
+
+ Cinq semaines en ballon.
+ Voyage de découvertes en Afrique par 3 anglais.
+
+
+
+
+
+
+ 千年一嘆
+ 這是一份真實的考察日記,記錄余秋雨在 20 世紀最後幾個月的數萬里行程。余秋雨與鳳凰電視台一行於 1999 年 9 月 27 日啟程,尋訪世界的古老文明。旅程開始時,5 輛吉普車從香港海運至埃及亞歷山大港,人員乘坐飛機至希臘雅典,考察完希臘本土和克利特島後至開羅,與吉普車會合,然後由吉普車走完全程,直至返回香港。
+
+
+
+
+
+
+
+ document author
+ 문서 저자
+ 文件作者
+ auteur du document
+ Verfasser des Dokuments
+ autor del documento
+ autore del documento
+ contains the name of the author of the document, as given on the
+title page (often but not always contained in a byline).
+ 제목 페이지에 제시되는 문서의 작가명을 포함한다(그러나 종종 작자명 행에 포함되는 것은 아니다.)
+ 包含文件作者名稱,同於題名頁上顯示的作者名 (經常但不一定出現在署名當中) 。
+ タイトルページにある(一般には署名欄にある)当該文書の著者名を示す.
+ contient le nom de l’auteur du document tel qu’il
+ est donné sur la page de titre (ce nom est le plus souvent contenu dans une mention de
+ responsabilité) .
+ enthält den Namen des Verfassers des Dokuments, wie auf dem Titelblatt angegeben (häufig, jedoch nicht immer mit eigener Zeile)
+ contiene el nombre del autor del documento, como se indica en el frontispicio (a menudo, pero no siempre, contenido al interno del elemento byline (autoria).
+ contiene il nome dell'autore del documento, come indicato nel frontespizio (spesso ma non sempre contenuto all'interno dell'elemento byline)
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Travels into Several Remote Nations of the World, in Four
+Parts.
+
+ By Lemuel Gulliver, First a Surgeon,
+and then a Captain of several Ships
+
+
+
+
+
+
+
+ Le quart livre de faicts et dict Heroiques du bon
+ Pantagruel
+
+ Composé par M. François Rabelais docteur en Medicine.
+
+
+
+
+
The document author's name often occurs within a byline, but
+ the docAuthor element may be used whether the
+ byline element is used or not. It should be used only for
+ the author(s) of the entire document, not for author(s) of any
+ subset or part of it. (Attributions of authorship of a subset or
+ part of the document, for example of a chapter in a textbook or an
+ article in a newspaper, may be encoded with byline
+ without docAuthor.)
+
+
+
Le nom de l'auteur d'un document apparaît souvent au sein d'un élément
+ byline, mais l'élément docAuthor peut être utilisé même si
+ l'élément byline n'est pas présent.
+
+
+
+
+
+ contains a formal statement authorizing the publication of a work, sometimes required to
+ appear on a title page or its verso.
+ 작품 출판을 인가하는 공식적 진술. 이는 제목 페이지 또는 그 이면에 나타나도록 종종 요구된다.
+ 包含作品出版的正式授權聲明,有時必須出現在題名頁或反頁上。
+ 作品の出版に関する公式の情報を示す.場合によっては,タイトルページや その左ページに出現する必要がある.
+ contient une mention formalisée autorisant la publication
+ d’un ouvrage, parfois exigée sur une page de titre ou à son verso.
+ enthält eine formelle Erklärung zur Autorisation der
+ Veröffentlichung, die manchmal auf der Titel- oder Rückseite erscheinen muss.
+ contiene una declaración formal que autoriza la
+ publicazione de una obra, normalmente contenida en el recto o en el verso del frontispicio.
+ contiene una dichiarazione formale che autorizza la
+ pubblicazione di un'opera, di solito riportata sul recto o sul verso del frontespizio
+
+
+
+
+
+
+
+
+
+ Licensed and entred acording to Order.
+
+
+
+
+ Paris, 20 juin 1968; E. Berrat, Vicaire général.
+
+
+
+
+ 版權所有 翻印必究
+
+
+
+
+
+
+ document edition
+ 문서 편집
+ 文件版本
+ édition du document
+ Ausgabe des Dokuments
+ edición del documento
+ edizione del documento
+ contains an edition statement as presented on a title page of a
+document.
+ 문서의 제목 페이지에 제시되는 편집 진술을 포함한다.
+ 包含一份版本陳述,與文件題名頁所顯示的相同。
+ タイトルページにある当該文書の版を示す.
+ contient une mention d’édition telle qu’elle
+ figure sur la page de titre d’un document.
+ enthält eine Erklärung zur Ausgabe, entsprechend der Angabe auf dem Titelblatt des Dokuments.
+ contiene una declaración editorial como la contiene el frontispicio de un documento.
+ contiene una dichiarazione editoriale così come riportata nel frontespizio di un documento
+
+
+
+
+
+
+
+
+
+
+ The Third edition Corrected
+
+
+
+
+ 3e Edition Augmentée
+
+
+
+
+ 修訂第三版
+
+
+
+
Cf. the edition element of bibliographic
+citation. As usual, the shorter name has been given to the
+more frequent element.
+
+
+
Voir l'élément edition dans une citation bibliographique. Comme d'habitude,
+ un nom abrégé a été donné à l'élément le plus fréquent.
+
+
+
+
+
+ document imprint
+ 문서 간기
+ 文件出版說明
+ mention d'impression
+ Impressum des Dokuments
+ declaración de imprenta
+ sigla editoriale del documento
+ contains the imprint statement (place and date of publication,
+publisher name), as given
+(usually) at the foot of a title page.
+ 대개 제목 페이지 아래에 제시되는 인쇄 판 진술(출판 장소와 날짜, 출판사명)을 포함한다.
+ 包含文件出版陳述 (出版日期、地點以及出版公司名稱) ,同於 (通常) 題名頁尾所顯示的出版資訊。
+ 刊記にある出版関連情報を示す.例えば,出版日,出版者名など.一般には
+ タイトルページの下にある.
+ contient la mention d'impression
+ de l'éditeur (lieu et date de publication, nom de l’éditeur), telle qu’elle est
+ généralement donnée au bas de la page de titre.
+ enthält das Impressum (Erscheinungsort und –datum, Verlag), das (üblicherweise) unten auf der Titelseite steht.
+ contiene la declaración de la publicación (lugar y fecha de publicación, casa editorial) tal y como consta al pie del frontispicio.
+ contiene la dichiarazione di pubblicazione (luogo e data di pubblicazione, casa editrice) così come riportata di norma in fondo al frontespizio
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Oxford, Clarendon Press, 1987
+
+
Imprints may be somewhat more complex:
+London
+Printed for E. Nutt,
+at
+Royal Exchange;
+J. Roberts in
+wick-Lane;
+A. Dodd without
+Temple-Bar;
+and J. Graves in
+St. James's-street.
+ 1722.
+
+
Cf. the imprint element of bibliographic
+citations. As with title, author, and editions, the shorter name is
+reserved for the element likely to be used more often.
+
+
+
Voir l'élément imprint dans une citation bibliographique. Comme pour le
+ titre, l'auteur, et la mention d'édition, le nom le plus court est réservé à
+ l'élément le plus fréquemment utilisé.
+
+
+
+
+
+ document date
+ 문서 날짜
+ 文件日期
+ date du document
+ Datierung des Dokuments
+ fecha del documento
+ data del documento
+ contains the date of a document, as given
+on a title page or in a dateline.
+ 대개 제목 페이지에 제시되는 문서의 날짜를 포함한다.
+ 包含文件日期, 同於 (通常) 在題名頁上顯示的日期。
+ 文書の日付を示す.一般にはタイトルページに書かれている.
+ contient la date d’un document telle qu’elle est
+ (généralement ) donnée sur une page de titre.
+ enthält die Datierung des Dokuments, die (üblicherweise) auf der Titelseite vermerkt ist
+ contiene la fecha del documento, tal y como, normalmente, aparece en el frontispicio.
+ contiene la data del documento così come riportata di norma nel frontespizio
+
+
+
+
+
+
+
+
+
+
+
+ gives the value of the date in standard form, i.e. YYYY-MM-DD.
+ 표준형식으로 날짜의 값을 제시한다. 예, YYYY-MM-DD.
+ proporciona el valor de una fecha en el formato estándar, es decir AAAA-MM-DD.
+ 当該日付を標準形式,例えば,YYYY-MM-DDで示す.
+ donne la date dans une forme standard,
+c'est-à-dire. YYYY-MM-DD.
+ assegna un valore alla data nel formato standard aaaa-mm-gg
+
+
+
For simple dates, the when attribute should give
+ the Gregorian or proleptic Gregorian date in one of the formats specified in
XML
+ Schema Part 2: Datatypes Second Edition.
+
+
+
Pour les dates dont la forme est simple, il est recommandé que l'attribut
+ when donne la date dans le calendrier grégorien ou grégorien
+ proleptique au format AAAA-MM-JJ spécifié par le standard
Cf. the general date element in the core tag set.
+This specialized element is provided for convenience in marking and
+processing the date of the documents, since it is likely to require
+specialized handling for many applications. It should be used only for
+the date of the entire document, not for any subset or part of it.
+
+
+
Voir l'élément générique date dans le module core. L'élément
+ spécifique docDate est fourni à toutes fins utiles pour encoder et traiter
+ la date des documents, puisque celle-ci requiert une gestion particulière pour de
+ nombreux besoins.
+
+
+
+
+
+ front matter
+ 전면부 내용
+ 正文前資訊
+ texte préliminaire
+ Vorspann (front)
+ paratexto inicial
+ peritesto iniziale
+ contains any prefatory matter
+ (headers, abstracts, title page, prefaces, dedications, etc.) found at the
+ start of a document, before the main body.
+ 주 본문 앞에 나타나는 문서의 시작부에서 발견되는 서문
+ 자료(헤더, 제목 페이지, 머리말, 헌정사 등)를 포함한다.
+ 包含位於文件最前端、正文之前的項目
+ (標頭、題名頁、前言、獻詞等) 。
+ 本文より前,文書の始めにある序文としてあるもの(標題,タイトル,序文, 献辞など).
+ contient tout ce qui est au début
+ du document, avant le corps du texte : page de titre, dédicaces, préfaces,
+ etc.
+ enthält alle dem Kerntext
+ vorangestellten Texte (Überschriften, Titelseite, Vorworte, Widmungen, usw.)
+ zu Beginn eines Dokuments.
+ contiene cualquier material
+ paratextual (encabezamiento, frontispicio, prefacio, dedicatoria, etc.) que
+ aparece delante del inicio del texto.
+ contiene qualsiasi materiale
+ peritestuale (intestazioni, frontespizio, prefazioni, dediche, etc.) che si
+ trovi prima dell'inizio del testo vero e proprio
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Nam Sibyllam quidem Cumis ego ipse oculis meis vidi in ampulla
+ pendere, et cum illi pueri dicerent: Σίβυλλα τί
+ θέλεις; respondebat illa: ὰποθανεῖν θέλω.
+
+
+
+
For Ezra Pound il miglior fabbro.
+
+
+
+
+
+
+
+
+
+
à la mémoire de Raymond Queneau
+
+
+
L'amitié, l'histoire et la littérature m'ont fourni quelques-uns
+ des.personnages de ce livre. Toute autre ressemblance avec des
+ individus vivants ou ayant réellement ou fictivement existé ne
+ saurait être que coïncidence.
+
+ Regarde de tous tes yeux, regarde (Jules Verne, Michel
+ Strogoff )
+
+
+
+
+ PRÉAMBULE
+
+
+ L'œil suit les chemins qui lui ont été ménagés dans l'oeuvre
+ (Paul Klee, Pädagosisches Skizzenbuch)
+
+
+
+
Au départ, l'art du puzzle semble un art bref, un art mince, tout
+ entier contenu dans un maigre enseignement de la Gestalttheorie :
+ ...
+
+
+
+
+
+
+
+
+ Préface
+
Tant qu'il existera, par le fait des lois et des moeurs, une
+ damnation sociale créant artificiellement, en pleine civilisation,
+ des enfers, et compliquant d'une fatalité humaine la destinée qui
+ est divine ; tant que les trois problèmes du siècle, la dégradation
+ de l'homme par le prolétariat, la déchéance de la femme par la faim,
+ l'atrophie de l'enfant par la nuit, ne seront pas résolus; tant que,
+ dans certaines régions, l'asphyxie sociale sera possible; en
+ d'autres termes, et à un point de vue plus étendu encore, tant qu'il
+ aura sur la terre ignorance et misère, des livres de la nature de
+ celui-ci pourront ne pas être inutiles.
+
+
+ Hauteville-House
+ 1er janvier 1862
+
+
+
+
+
+
+
+
+
+
+ 小燕子其實也無所愛,只是沉浸在朦朧而飄忽的夏夜夢里罷了。
+
+
+
《憶》第三十五首
+
+
+
+
+
+
+
+
+
聲明啟事
+
+
+ 作者聲明
+
書中所有情節內容皆為虛構,若有雷同,純屬巧合。
+
+
+
+
+
+
+
+
+
To our three selves
+
+
+ Author's Note
+
All the characters in this book are purely imaginary, and if the
+ author has used names that may suggest a reference to living persons
+ she has done so inadvertently. ...
+
+
+
+
+
+
+
+
+
+ BACKGROUND:
+
Food insecurity can put children at greater risk of obesity because
+ of altered food choices and nonuniform consumption patterns.
+
+
+ OBJECTIVE:
+
We examined the association between obesity and both child-level
+ food insecurity and personal food insecurity in US children.
+
+
+ DESIGN:
+
Data from 9,701 participants in the National Health and Nutrition
+ Examination Survey, 2001-2010, aged 2 to 11 years were analyzed.
+ Child-level food insecurity was assessed with the US Department of
+ Agriculture's Food Security Survey Module based on eight
+ child-specific questions. Personal food insecurity was assessed with
+ five additional questions. Obesity was defined, using physical
+ measurements, as body mass index (calculated as kg/m2) greater than
+ or equal to the age- and sex-specific 95th percentile of the Centers
+ for Disease Control and Prevention growth charts. Logistic
+ regressions adjusted for sex, race/ethnic group, poverty level, and
+ survey year were conducted to describe associations between obesity
+ and food insecurity.
+
+
+ RESULTS:
+
Obesity was significantly associated with personal food insecurity
+ for children aged 6 to 11 years (odds ratio=1.81; 95% CI 1.33 to
+ 2.48), but not in children aged 2 to 5 years (odds ratio=0.88; 95%
+ CI 0.51 to 1.51). Child-level food insecurity was not associated
+ with obesity among 2- to 5-year-olds or 6- to 11-year-olds.
+
+
+ CONCLUSIONS:
+
Personal food insecurity is associated with an increased risk of
+ obesity only in children aged 6 to 11 years. Personal
+ food-insecurity measures may give different results than aggregate
+ food-insecurity measures in children.
+
+
+
+
Because cultural conventions differ as to which elements are grouped as
+ front matter and which as back matter, the content models for the
+ front and back elements are identical.
+
+
+
+
+
+
Back Matter
+ back matter
+ 후면부 내용
+ 正文後資訊
+ texte annexe
+ Nachspann (back)
+ paratexto final
+ peritesto finale
+ contains any appendixes, etc. following the main part of a text.
+ 텍스트의 주요부 뒤에 오는 부록 등을 포함한다.
+ 在正文之後,包含附錄等。
+ 後付.本文の後に続く付録などを示す.
+ contient tout supplément placé après la partie principale
+ d'un texte : appendice, etc.
+ enthält Anhänge jeglicher Art, die auf den Hauptteil
+ eines Textes folgen
+ contiene cualquier tipo de apéndice, etc. que aparece
+ detrás del texto.
+ contiene qualsiasi appendice che segua il testo vero e
+ proprio
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ The Golden Dream or, the Ingenuous Confession
+
To shew the Depravity of human Nature
+
+
+ A letter from the Printer, which he desires may be inserted
+ Sir.
+
I have done with your Copy, so you may return it to the Vatican, if you please
+
+
+ The Books usually read by the Scholars of Mrs Two-Shoes are these and are sold at Mr
+ Newbery's at the Bible and Sun in St Paul's Church-yard.
+
+ The Christmas Box, Price 1d.
+ The History of Giles Gingerbread, 1d.
+ A Curious Collection of Travels, selected from the Writers of all Nations,
+ 10 Vol, Pr. bound 1l.
+
+
+
+ By the KING's Royal Patent, Are sold by J. NEWBERY, at the
+ Bible and Sun in St. Paul's Church-Yard.
+
+ Dr. James's Powders for Fevers, the Small-Pox, Measles, Colds, &c.
+ 2s. 6d
+ Dr. Hooper's Female Pills, 1s.
+
+
+
+
+
+
+
+
+
+ APPENDICE I
+ CHAPITRE XV bis
+
Des cruautez exercées par les Turcs, et autres peuples : et nommément par les Espagnols, beaucoup plus barbares que les
+ Sauvages mesmes
+
Premierement Chalcondile en son histoire de la decadence de l'Empire des Grecs,
+ ...
+
+
+ Appendice 2
+ Advertissement de l'autheur
+
Outre les augmentations bien amples, et la revision beaucoup plus exacte que je
+ n'avoye fait és precedentes Editions, j'ai pour le contentement des Lecteurs,
+ plusieurs endroits de ceste quatrieme et derniere monstré ...
Because cultural conventions differ as to which elements are
+ grouped as back matter and which as front matter, the content
+ models for the back and front elements are
+ identical.
+
+
+
Le modèle de contenu de l'élément back est identique à
+ celui de l'élément front, ce qui permet de rendre compte
+ de pratiques éditoriales qui ont évolué avec l'histoire
+ culturelle.
+
+
+
後付の内容モデルは,文化的背景によっては,前付に相当するものになる.
+
+
+
+
+
+
Module for Default Text Structure
+Default Text StructureDefault
+text structure
+Structure textuelle par défaut
+預設文件結構
+Struttura standard del testoEstrutura do texto por defeitoテキスト構造モジュール
Characters, Glyphs, and Writing Modes
Is Your Journey Really Necessary?
Markup Constructs for Representation of Characters and Glyphs
Character Properties
Annotating Characters
Adding New Characters
How to Use Code Points from the Private Use Area
+ Writing Modes
Examples of Different Writing Modes
Vertical Writing Modes
Vertical Text with Embedded Horizontal Text
Vertical Orientation in Horizontal Scripts
Bottom-to-top Writing
Mixed Horizontal Directionality
+ Summary
+ Text Rotation
Caveat
Formal Definition
+Character and Glyph
+DocumentationCharacter and glyph documentation
+Représentation des caractères et des glyphes non standard
+ 文字與字體說明
+Documentazione di caratteri non standard e glifiDocumentação dos carateres外字モジュール
+ character or glyph
+ 문자 또는 그림문자
+ 文字或字體
+ caractère ou glyphe
+ carácter o pictograma
+ carattere o glifo
+ represents a glyph, or a non-standard character.
+ 비표준 문자 또는 그림문자를 표시한다.
+ 非標準的文字或字體。
+ 非標準的な文字やグリフを示す.
+ représente un glyphe,
+ ou un caractère non standard
+ representa un carácter no estándard o un pictograma.
+ rapperesenta un carattere o glifo non standard.
+
+
+
+
+
+
+
+
+
+
+ points to a description of the character or glyph intended.
+ 連結到該文字或字體的描述。
+ 当該文字やグリフの解説を参照する.
+ pointe vers la description du caractère ou du glyphe
+ visé
+ indica la descripción del carácter o pictograma dado.
+ punta a una descrizione del carattere o glifo.
+
+
+
+
+
+ ct
+
+
This example points to a glyph element with the identifier ctlig like
+ the following:
+
+
+
+
+ fl
+
+
Cet exemple pointe vers un élémentglyphà l'aide du code
+ identifiantflig comme dans l'exemple suivant :
+
+
+
+
+ fl
+
+
+
+
+
+
+
+
+
+
+
+ per
+
+
The medieval brevigraph per could similarly be considered as an individual glyph, defined in
+ a glyph element with the identifier per like the following:
+
+
+
+
The name g is short for gaiji, which is the Japanese term for a
+ non-standardized character or glyph.
+
+
+
Le nom g de cet élément est une abréviation pour gaiji, qui
+ désigne en Japonais un caractère ou un glyphe non standard.
+
+
+
要素gの要素名は,日本語の「外字」を語源とする gaijiの頭文字である.
+
+
+
+
+
+ character
+ 문자
+ 文字
+ caractère
+ carácter
+ carattere
+ provides descriptive information about a character.
+ 문자에 관한 기술 정보를 제공한다.
+ 提供一個文字的描述性資訊。
+ 文字に関する情報を示す.
+ fournit des informations descriptives sur un
+ caractère
+ proporciona información descriptiva sobre un carácter.
+ fornisce informazioni descrittive su di un carattere.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ CIRCLED IDEOGRAPH 4EBA
+
+ character-decomposition-mapping
+ circle
+
+
+ daikanwa
+ 36
+
+ 人
+
+
+
+
+
+
+ IDEOGRAMME ENCADRE 4EBA
+
+ table de correspondance qui donne la composition des caractères.
+ encadrement
+
+
+ daikanwa
+ 36
+
+ 人
+
+
+
+
+
+
+
+ character name
+ 문자명
+ 文字名稱
+ nom de caractère
+ nombre de carácter
+ nome del carattere.
+ contains the name of a character, expressed following Unicode conventions.
+ 유니코드로 표현된 문자명을 포함한다.
+ 包含一文字名稱,其表示法根據統一碼協定 (Unicode)。
+ 当該文字の名前をユニコードに従って示す.
+ contient le nom d'un caractère exprimé selon les
+ conventions de l'Unicode
+ contiene el nombre de un carácter, expresado según las
+ convenciones Unicode.
+ contiene il nome di un carattere, espresso secondo le
+ convenzioni Unicode.
+
+
+
+
+
+
+
+
+
+ CIRCLED IDEOGRAPH 4EBA
+
+
+
+
+ IDEOGRAMME ENCADRE 4EBA
+
+
+
+
The name must follow Unicode conventions for character naming. Projects working in similar
+ fields are recommended to coordinate and publish their list of charNames to
+ facilitate data exchange.
+
+
+
Le nom doit respecter les conventions Unicode pour le nommage des caractères. Il est
+ recommandé, pour des projets portant sur des champs similaires, de coordonner et de publier leur
+ liste de charNames pour faciliter l'échange de données.
+
+
+
+
+
+ character property
+ 문자 특성
+ 文字性質
+ propriété d'un caractère
+ propiedad de carácter
+ proprietà del carattere.
+ provides a name and value for some property of the parent character or glyph.
+ 상위 문자 또는 그림문자의 특성에 대한 이름과 값을 제시한다.
+ 提供父文字或字體的性質名稱與性質值。
+ 当該字またはグリフの特性に関する名前や値を示す.
+ fournit un nom et une valeur pour une propriété
+ quelconque d'un caractère ou d'un glyphe défini dans l'élément parent
+ proporciona un nombre y un valor para alguna propiedad
+ del carácter o pictograma del padre.
+ fornisce un nome e un valore per alcune proprietà di un
+ carattere o glifo parente.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ character-decomposition-mapping
+ circle
+
+
+ daikanwa
+ 36
+
+
+
+
+
+
+ table de correspondance qui donne la composition des caractères
+ encadrement
+
+
+ daikanwa
+ 36
+
+
+
+
+
If the property is a Unicode Normative Property, then its unicodeName must be
+ supplied. Otherwise, its name must be specied by means of a localName.
+
At a later release, additional constraints will be defined on possible value/name
+ combinations using Schematron rules
+
+
+
Si la propriété est une propriété normative Unicode (Unicode Normative Property), alors son
+ unicodeName doit être donné. Sinon son nom devra être précisé par un élément
+ localName.
+
Dans une mise à jour ultérieure, des contraintes additionnelles seront définies sur les
+ combinaisons possibles valeur/nom, en utilisant des règles Schematron.
+
+
+
+
+
+ character declarations
+ 문자 선언
+ 文字描述
+ description de caractère
+ descripción del carácter
+ descrizione del carattere
+ provides information about nonstandard characters and glyphs.
+ 비표준 문자와 그림문자에 대한 정보를 제공한다.
+ 提供文字或字體的描述性資訊。
+ 規格にない文字やグリフに関する情報を示す.
+ fournit des informations sur des caractères
+ ou des glyphes sortant de l'ordinaire
+ proporciona información descriptiva sobre los carácteres
+ o pictogramas.
+ fornisce informazioni descrittive su un caratteri o
+ glifi.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ LATIN LETTER ENLARGED SMALL A
+ a
+
+
+
+
+
+
+
+
+ character glyph
+ 그림 문자
+ 文字的形體
+ glyphe d'un caractère
+ pictograma
+ glifo
+ provides descriptive information about a character glyph.
+ 그림 문자에 관한 기술적 정보를 제공한다.
+ 提供一種字體的描述性資訊。
+ グリフの解説を示す.
+ fournit des informations descriptives sur un
+ glyphe
+ proporciona información descriptiva sobre un pictograma.
+ fornisce informazioni descrittive su di un glifo.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ LATIN SMALL LETTER R WITH A FUNNY STROKE
+
+ entity
+ rstroke
+
+
+
+
+
+
+
+
+
+
+ N latin minuscule précédé d'une apostrophe
+
+ entity
+ napos
+
+
+
+
+
+
+
+
+
+ character glyph name
+ 그림문자명
+ 字體名稱
+ nom du glyphe d'un caractère
+ nombre del pictograma
+ nome del glifo
+ contains the name of a glyph, expressed following Unicode conventions for character names.
+ 문자명에 대한 유니코드 방식에 따라 표현된 그림 문자명을 포함한다.
+ 包含一字體名稱,其表示法根據統一碼協定 (Unicode)。
+ ユニコードに従った文字名で,グリフを示す.
+ contient le nom d'un glyphe, exprimé selon les
+ conventions de l'Unicode pour les noms de caractère
+ contiene el nombre de un pictograma, expresado según las
+ convenciones Unicode para los nombres de carácteres.
+ contiene il nome di un glifo, espresso secondo le
+ convenzioni Unicode per i nome dei caratteri.
+
+
+
+
+
+
+
+
+ CIRCLED IDEOGRAPH 4EBA
+
+
+
+
+ IDEOGRAMME ENCADRE 4EBA
+
+
+
+
For characters of non-ideographic scripts, a name following the conventions for Unicode names
+ should be chosen. For ideographic scripts, an Ideographic Description Sequence
+ (IDS) as described in Chapter 10.1 of the Unicode Standard is recommended where possible.
+ Projects working in similar fields are recommended to coordinate and publish their list of
+ glyphNames to facilitate data exchange.
+
+
+
Le nom du glyphe doit respecter les conventions Unicode pour le nommage des caractères dans
+ les écritures non idéographiques. Dans le cas des écritures idéographiques, il est recommandé
+ de saisir, si possible, une séquence de description idéographique (SDI) décrite
+ dans le chapitre 10.1 du standard Unicode. Il est recommandé, pour les projets portant sur des
+ champs similaires, de coordonner et de publier leur liste d'éléments glyphName pour
+ faciliter l'échange de données.
+
+
+
+
+
+ locally-defined property name
+ 국부적으로 정의된 특성명
+ 當地定義的性質名稱
+ nom de propriété défini localement
+ Nombre de propiedad definido localmente
+ nome di una proprietà localmente definito
+ contains a locally defined name for some property.
+ 어떤 특성에 대해 국부적으로 정의된 이름을 포함한다.
+ 包含某性質的地方性定義名稱。
+ ユーザが定義した,ある素性の名前を示す.
+ contient un nom défini localement pour une propriété
+ contiene un nombre definido localmente para alguna
+ propiedad.
+ contiene il nome localmente definito di una qualche
+ proprietà.
+
+
+
+
+
+
+
+
+
+ daikanwa
+ entity
+
+
+
+
+ daikanwa
+ entité
+
+
+
+
No definitive list of local names is proposed. However, the name entity is
+ recommended as a means of naming the property identifying the recommended character entity
+ name for this character or glyph.
+
+
+
Il n'est pas proposé de liste fermée de noms locaux de propriétés. Cependant, la
+ dénomination entity (entité) est recommandée pour la propriété donnant le nom
+ de l'entité caractère conseillée pour le caractère ou le glyphe en cours de description.
+
+
+
+
+
+ character mapping
+ 문자 사상
+ 文字對應
+ caractères associés
+ representación del carácter
+ mappatura di carattreri
+ contains one or more
+ characters which are related to the parent character or glyph
+ in some respect, as specified by the type
+ attribute.
+
+ type 상위 문자 또는 그림 문자와 관련된 하나 이상의 문자들을 포함한다. 속성으로 명시된다.
+ 包含與父文字或字體在某方面有所關聯的一個或多個文字,在屬性type中加以說明。
+ 属性typeで示される,親文字またはグリフと関連する,ひとつ
+ 以上の文字を示す.
+ contient un ou plusieurs caractères reliés par
+ certains aspects (spécifiés par l'attribut type) au glyphe ou au caractère
+ défini dans l'élément parent
+ contiene uno o más caracteres que se relacionan en algún sentido con el carácter o pictograma del padre, como se especifica por el atributo de type.
+ contiene uno u più caratteri in una qualche relazione con il carattere o glifo parente, come specificato dall'attributo type.
+
+
+
+
+
+
+
+
+
+ r
+ 人
+
+
+
+
+ r
+ 人
+
+
+
+
Suggested values for the type attribute include
+exact for exact equivalences, uppercase
+for uppercase equivalences, lowercase for lowercase equivalences,
+and simplified for simplified characters. The
+ g elements contained by this element can point to either another
+ char or glyphelement or contain a character
+ that is intended to be the target of this mapping.
+
+
+
Les valeurs conseillées de l'attribut type sont : exact pour
+ une relation d'équivalence, uppercase pour spécifier une correspondance
+ avec un caractère en majuscules, lowercase pour spécifier une
+ correspondance avec un caractère en minuscules, et simplified pour
+ spécifier une correspondance avec un caractère simplifié. Les éléments g
+ contenus par l'élément mapping peuvent, soit pointer vers un autre élément
+ char ou glyph, soit contenir un caractère, cible de la
+ relation de correspondance.
+
+
+
+
+
+ unicode property name
+ 유니코드 특성명
+ 統一碼性質名稱
+ nom de propriété Unicode
+ Nombre de Propiedad Unicode
+ nome della proprietà Unicode
+ contains the name of a registered Unicode normative or informative property.
+ 등록된 유니코드의 규범적 또는 제보적 특성의 이름을 포함한다.
+ 包含一個統一碼規範性質之註冊名稱。
+ 登録されているユニコード基準素性または参考素性の名前を示す.
+ contient le nom d'une propriété normative ou informative enregistré
+ en Unicode
+ contiene el nombre de una normativa o propiedad
+ informativa registrada en Unicode.
+ contiene il nome di una proprietà Unicode registrata
+ normativa o informativa.
+
+
+
+
+
+
+
+
+
+ specifies the version number of the Unicode Standard in which this property name is
+ defined.
+ 특성명이 정의된 표준 유니코드의 버전 숫자를 명시한다.
+ 說明該性質名稱是定義在哪一版本的統一碼標準 (Unicode Standard) 中。
+ 当該素性名が定義されているユニコードの版番号を示す.
+ spécifie le numéro de version de la norme Unicode
+ où se trouve défini ce nom de propriété
+ especifica el número de versión del Estándar de
+ Unicode en que este nombre de propiedad se ha definido.
+ specifica il numero della versione dello standard
+ Unicode nel quale è definito il nome della proprietà.
+
+
+
+
+
+ character-decomposition-mapping
+ general-category
+
+
+
+
+ table de correspondance qui donne la composition des caractères
+ catégorie générale
+
+
+
+
A definitive list of current Unicode property names is provided in The Unicode Standard.
+
+
+
Une liste fermée des noms de propriétés Unicode est donnée dans la norme Unicode.
+
+
+
現行のユニコード基準名のリストは,ユニコード規格にある.
+
+
+
+
+
+ 값
+ 性質值
+ valeur
+ valor
+ valore
+ contains a single value for some property, attribute, or other
+ analysis.
+ 어떤 특성, 속성, 또는 기타 분석에 대한 단일 값을 포함한다.
+ 包含一個性質值、屬性值、或其他分析值。
+ 特性,属性,分析向けの値をひとつ示す.
+ contient une valeur unique pour une propriété,
+ pour un attribut ou pour tout autre élément d'analyse
+ contiene un valor único para alguna propiedad, un atributo u otro análisis.
+ contiene un unico valore di qualche proprietà, attributo o altra analisi.
+
+
+
+
+
+
+
+
+ unknown
+
+
+
+
+ inconnu
+
+
+
+
+ 未知
+
+
+
+
+
+
Verse
Structural Divisions of Verse Texts
Components of the Verse Line
Encoding Textual Structures Across Verses
Rhyme and Metrical Analysis
Sample Metrical Analyses
Segment-Level versus Line-level Tagging
Metrical Analysis of Stanzaic Verse
Rhyme
Metrical Notation Declaration
+ metrical notation declaration
+ déclaration sur la métrique
+ 운율적 표기법 선언
+
+ declaración de notación métrica
+ dichiarazione di notazione metrica
+ documents the notation employed to represent a metrical pattern when this is specified as
+ the value of a met, real, or rhyme attribute on any structural
+ element of a metrical text (e.g. lg, l, or seg).
+ documente la notation utilisée pour noter un modèle
+ métrique lorsque celui-ci est spécifié comme la valeur des attributs met ,
+ real, ou rhyme, qui s’appliquent à tout élément de la structure d’un texte
+ versifié (par exemple lg, l, ou seg).
+ 운율적 텍스트에서 구조적 요소(예, lg, l, 또는
+ seg)에 대한 met, real, 또는 rhyme 속성 값으로 명시할 때 운율적 유형을 표시하는
+ 표기법을 기록한다.
+ 在標記韻文時所用到的結構性元素
+ (例如lg、l、或seg)
+ 當中,若使用met、real、或rhyme等屬性的屬性值來表示文章的韻律模式,則在此宣告標記韻律模式的方法。
+ 韻律パタンを表す表記法を示す.韻文のための要素(例えば,lg, l,
+ segなど)にある属性met, real, rhymeの値として定義される.
+ Notation eines metrischen Musters, sofern dies als Wert
+ eines Attributs met, real, oder rhyme angegeben ist, für ein
+ beliebiges Strukturelement eines metrischen Textes (z.B. lg, l, oder
+ seg).
+ documenta la notación empleada para representar un patrón
+ métrico cuando éste se especifica como el valor de un atributo met, real,
+ o rhyme en cualquier elemento estructural de un texto métrico (p.ej. lg,
+ l, or seg).
+ documenta l'annotazione adottata nella rappresentazione
+ di uno schema metrico, specificato come valore di un attributo met, real,
+ o rhyme su un qualsiasi elemento strutturale di un testo metrico (ad esempio
+ lg, l, or seg).
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ indicates whether the notation conveys the abstract metrical form, its actual prosodic
+ realization, or the rhyme scheme, or some combination thereof.
+ indique si la notation traduit la forme métrique
+ abstraite, sa réalisation prosodique, le schéma des rimes, ou une combinaison de ces
+ différents éléments.
+ 표기법이 추상적 운율 형식, 그 실제 운율적 실현, 또는 운 스키마, 아니면 그것에 관련한
+ 결합을 포함하는지를 표시한다.
+ 指出該標記所傳達的為抽象韻律形式、實際韻律實踐、或者押韻形式,或任幾項之結合。
+ 当該表記法が抽象的韻律形式,実際の韻律形式,押韻スキーム,これら の組み合わせを表すかどうかを示す.
+ zeigt an, ob die Notation die abstrakte metrische
+ Form, die tatsächliche prosodische Realisierung oder das Reimschema oder eine Kombination
+ dessen wiedergibt.
+ indica si la notación indica la forma métrica
+ abstracta, su realización prosódica real, el esquema rítmico o alguna combinación de todo
+ ello.
+ indica se l'annotazione fornisce la forma metrica
+ estratta, la sua realizzazione prosodica,lo schema delle rime o un loro combinazione
+
+ met real
+
+
+ met attribute
+ met 속성
+ 屬性met
+
+ attribut met
+
+ attributo met
+ atributo met
+
+ declaration applies to the abstract metrical form recorded on the met
+ attribute
+ 선언은 met 속성에 기록된 추상적 운율 형식에 적용한다.
+ 屬性 met宣告適用於該屬性所紀錄的抽象韻律形式。
+ 属性metにある,抽象的韻律形式に該当する.
+ la déclaration s'applique à la structure métrique
+ abstraite notée par l'attribut met.
+ la dichiarazione si riferisce alla forma metrica
+ astratta contenuta nell'attributo met
+ declaración aplicada a la forma métrica abstracta
+ codificada en el atributo met.
+
+
+ real attribute
+ real 속성
+ 屬性real
+
+ attribut real
+
+ attributo real
+ atributo real
+
+ declaration applies to the actual realization of the conventional metrical structure
+ recorded on the real attribute
+ 선언은 real 속성에 기록된 관례적 운율 구조의 실제 실현에
+ 적용한다.
+ 屬性real宣告適用於該屬性所紀錄的通用韻律結構之實際實踐
+ 属性realにある実際の韻律形式に該当する.
+ la déclaration s'applique à la réalisation réelle
+ de la structure métrique conventionnelle notée par l'attribut real .
+ la dichiarazione si riferisce all'effettiva
+ realizzazione della struttura metrica convenzionale contenuta nell'attributo real
+ declaración aplicada a la realización concreta de
+ una estructura métrica convencional codificada en el atributo real.
+
+
+
+
+
+ declaration applies to the rhyme scheme recorded on the rhyme attribute
+ 선언은 rhyme 속성에 기록된 운 스키마에 적용한다.
+ la declaración se aplica al esquema de rima
+ registrado en el atributo rima
+
+ 属性rhymeにある押韻スキームに該当する.
+ la déclaration s'applique à la structure métrique
+ abstraite notée par l'attribut
+ rhyme.
+ la dichiarazione si riferisce allo schema rimico
+ contenuto nell'attributo rhyme
+
+
+
+
By default, the metDecl element documents the notation used for metrical pattern
+ and realization. It may also be used to document the notation used for rhyme scheme
+ information; if not otherwise documented, the rhyme scheme notation defaults to the
+ traditional abab notation.
+
+
+
Par défaut, l'élément metDecl documente la notation utilisée pour le modèle
+ métrique et sa réalisation. Il peut aussi être utilisé pour la notation du schéma de rimes
+ ; s'il n'est pas documenté d'une autre manière, la notation du schéma de rimes pourra
+ l'être par défaut sous la forme traditionnelle abab.
+
+
+
+ regular expression pattern
+ 정규표현 유형
+ modelo de expresión regular
+ modèle d'expression régulière
+ schema di espressioni regolari
+ specifies a regular expression defining any value that is legal for this notation.
+ indique une expression régulière définissant toute
+ valeur permise dans cette notation.
+ 이 표기법에 적법한 임의의 값을 정의하는 정규표현을 명시한다.
+ 標明一種固定表示法,用來定義任何合用於此標記的屬性值。
+ 当該表記法に叶う値を正規表現で示す.
+ definiert einen regulären Ausdruck, der einen
+ zulässigen Wert für diese Notation vorgibt.
+ indica una expresión regular que define cualquier
+ valor válido para esta notación.
+ specifica un'espressione regolare che definisce
+ qualsiasi valore legale per l'annotazione
+
+
The value must be a valid regular expression per the World Wide Web Consortium's
+
XML Schema Part 2: Datatypes Second Edition,
+ Appendix F
+
+
La valeur doit être une expression régulière valide pour le Consortium
+ du World Wide Web
XML Schema Part 2: Datatypes Second Edition, Appendix F
+
+
+
+
+
+
+ stressed syllable
+ unstressed syllable
+ metrical line boundary
+
+
+
This example is intended for the far more restricted case typified by the Shakespearean
+ iambic pentameter. Only metrical patterns containing exactly ten syllables, alternately
+ stressed and unstressed, (except for the first two which may be in either order) to each
+ metrical line can be expressed using this notation.
Cette notation décrit ici la division en groupes rythmiques d'un vers composé de douze
+ syllabes (alexandrin) comme dans ce vers de Baudelaire :
+ J'ai longtemps habité sous de vastes portiques
+
+
+
+
+
+ 仄聲
+ 平聲
+ 詩行分界線
+
+
+
+
+
The encoder may choose whether to define the notation formally or informally.
+ However, the two methods may not be mixed. That is, metDecl may contain either a
+ sequence of metSym elements or, alternately, a series of paragraphs or other
+ components. If the pattern attribute is specified and metSym elements are
+ used, then all the codes appearing within the pattern attribute should be
+ documented.
+
Only usable within the header if the verse module is used.
+
+
+
L'encodeur peut choisir de définir la notation de manière formelle ou pas.
+ Toutefois, les deux méthodes ne peuvent pas être combinées. C'est-à-dire, que metDeclpeut
+ contenir soit une suite d'éléments metSym, soit une succession de paragraphes ou
+ d'autres composants. Si l'attribut pattern est spécifié et que des éléments
+ metSym sont employés, alors tous les codes qui apparaitront dans l'attribut
+ patterndevront être documentés.
+
Ne peut être utilisé dans l'en-tête que si le jeu d'éléments pour la poésie est activé.
+
+
+
+
+
+
+ metrical notation symbol
+ Symbole de notation métrique.
+ 운율 표기법 기호
+
+ símbolo métrico de la notación
+ simbolo di notazione metrica
+ documents the intended significance of a particular character or character sequence within a
+ metrical notation, either explicitly or in terms of other symbol elements in the same metDecl.
+ documente le sens propre à un caractère particulier ou à
+ une suite de caractères dans une notation métrique, exprimés soit explicitement, soit dans les
+ termes d’autres éléments inclus dans le même élément metDecl.
+ 직접적으로 또는 동일 metDecl에서 다른 기호 요소로, 운율 표기법 내에서 특별한 문자 또는
+ 문자열의 의도된 의미를 기록한다.
+ 說明在標記韻律模式時使用的特定符號或符號序列所代表的意義,可以是明確的文字闡釋,或是加以解釋同ㄧ個韻律宣告中其他韻律符號元素的內容。
+ 明示的に,または要素metDecl中の他の記号要素により,韻律表記法の中に
+ ある重要な特定文字または文字列を記録する.
+ gibt die beabsichtigte Kennzeichnung durch ein bestimmtes
+ Zeichen oder eine Zeichenfolge innerhalb einer metrischen Notation an, entweder explizit oder
+ über Symbole innerhalb der gleichen metDecl.
+ documenta la significación ideada para un carácter
+ concreto o secuencia de caracteres al interno de una anotación métrica, o explícitamente o en
+ términos de otros elementos simbólicos de la metDecl.
+ documenta il valore previsto di un particolare carattere
+ o sequenza di caratteri all'interno di una annotazione metrica, in modo eslpicito o secondo
+ altri elementi all'interno di metDecl.
+
+
+
+
+
+
+
+
+ specifies the character or character sequence being documented.
+ indique le caractère ou l'ordre des caractères
+ documentés.
+ 기록된 문자 또는 문자열을 명시한다.
+ 標明所紀錄的符號或符號序列。
+ 記録される文字または文字列を示す.
+ dokumentiert die spezifizierten Zeichen oder
+ Zeichenfolgen.
+ indica el caracter o serie de caracteres que se está
+ documentando.
+ specifica il carattere o la sequenza di caratteri
+ documentata.
+
+
+
+ specifies whether the symbol is defined in terms of other symbols (terminal
+ is set to false) or in prose (terminal is set to true).
+ indique si le symbole est défini à l’aide d’autres
+ symboles, (l'attribut terminal a pour valeur false), ou rédigé en
+ texte libre, (l'attribut terminal a pour valeur true).
+ 기호가 다른 기호(terminal은 false로 설정)
+ 또는 산문체(terminal은 true로 설정)로 정의되는지 아닌지를 명시한다.
+ 標明該符號是否以其他符號來定義
+ (terminal為false) 或以散文描述 (terminal為true)
+ 当該記号が,他の記号,または散文で定義されているかどうかを示す.
+ 前者の場合には,属性terminalに値falseが,
+ 後者の場合には,属性terminalに値trueが付与 される.
+ gibt an, ob das Symbol definiert mittels anderer
+ Symbole (terminal gesetzt ist auf false) oder in Prosa
+ (terminal auf true).
+ especifica si el símbolo se define mediante otros
+ símbolos (terminal es false) o en prosa (terminal es
+ true).
+ indica se il simbolo è definito con altri simboli
+ (terminal definito dal valore false) o con una descrizione
+ (terminal definito dal valore true).
+
+ true
+
+
The value true indicates that the element contains a prose definition of its
+ meaning; the value false indicates that the element contains a definition of
+ its meaning given using symbols defined elsewhere in the same metDecl
+ element.
+
+
+
La valeur true indique que l'élément contient une définition de son sens
+ rédigée en texte libre ; la valeur false indique que l'élément contient une
+ définition du sens donné qui utilise des symboles définis ailleurs dans le même élément
+ metDecl.
Module for Verse
+ Verse
+ Verse structures
+ Poésie
+ 韻文結構
+ Strutture poetiche
+ Estrutura dos versos
+ 韻文モジュール
+
+ defines a set of attributes which certain elements may use to
+represent metrical information.
+ 운율 정보를 표시하기 위하여 특정 요소들이 사용할 수 있는 속성 집합을 정의한다.
+ 定義一組特定元素所使用、表示詩行韻律的屬性。
+ 特性の要素が韻律情報を示す属性を定義する.
+ définit un ensemble d'attributs que certains
+ éléments peuvent utiliser pour représenter de l'information métrique.
+ define un grupo de atributos utilizados dentro de determinados elementos para representar información métrica
+ definisce un insieme di attributi utilizzati entro determinati elementi per rappresentare informazioni relative alla metrica
+
+
+ metrical structure, conventional
+ 관례적 운율 구조
+ estructura métrica, convencional
+ structure métrique, canonique
+ struttura metrica, convenzionale
+ contains a user-specified encoding for the conventional
+metrical structure of the element.
+ 요소의 관례적 운율 구조에 대하여 사용자가 명시한 부호화를 포함한다.
+ 包含使用者定義的標記,用於一般韻律結構。
+ 当該要素の通常韻律構造を示す,ユーザ定義のデータを含む.
+ contient un encodage spécifié par l'utilisateur pour la structure métrique conventionnelle de l'élément.
+ contiene una codificación definida por el usuario de la estructura métrica convencional del elemento.
+ contiene una codifica, definita dall'utente, della struttura metrica convenzionale dell'elemento
+
+
+
The pattern may be specified by means of either a standard term for
+the kind of metrical unit (e.g. hexameter) or
+an encoded representation for the metrical pattern
+(e.g. +--+-+-+-+-). In either case, the
+notation used should be documented by a metDecl element
+within the encodingDesc of the associated header.
+
Where this attribute is not specified, the metrical
+pattern for the element concerned is understood to be inherited
+from its parent.
+
+
+
Lorsque l'attribut met n'est pas présent, le modèle métrique de
+ l'élément courant est considéré comme hérité de l'élément parent.
+
+
+
+ metrical structure, realized
+ 실현된 운율 구조
+ estructura métrica, realizada
+ structure métrique réelle
+ struttura metrica, attuata
+ contains a user-specified encoding for the actual realization
+of the conventional metrical structure applicable to the element.
+ 요소에 적용 가능한 관례적 운율 구조의 실제 실현에 대하여 사용자가 명시한 부호화를 포함한다.
+ 包含使用者定義的標記,適用於一般標記結構的實際表現情形。
+ 当該要素に当てはまる通常韻律構造の実現形を,ユーザーの定義で示す.
+ contient un encodage, spécifié par l'utilisateur, de la réalisation effective de la structure métrique conventionnelle applicable à l'élément.
+ contiene un codificación definida por el usuario para la realización efectiva de la estructura métrica convencional aplicable al elemento.
+ contiene una codifica, definita dall'utente, dell'effettiva realizzazione della struttura metrica convenzionale applicabile all'elemento
+
+
+
The pattern may be specified by means of either a standard term for
+the kind of metrical unit (e.g. hexameter) or
+an encoded representation for the metrical pattern
+(e.g. +--+-+-+-+-). In either case, the
+notation used should be documented by a metDecl element
+within the encodingDesc of the associated header.
+
Where this attribute is not specified, the metrical
+realization for the element concerned is understood to be identical
+to that specified or implied for the met attribute.
+
+
+
Lorsque l'attribut real n'est pas présent, la réalisation métrique
+ de l'élément concerné est considérée comme identique à celle spécifiée de
+ manière explicite ou implicite au moyen de l'attribut met.
+
+
+
+ rhyme scheme
+ 운 스키마
+ esquema de la rima
+ schéma rimique
+ schema rimico
+ specifies the rhyme scheme applicable to a group of verse lines.
+ 시행 군집에 적용 가능한 운 스키마를 명시한다.
+ 標明適用於一詩行組的押韻組合。
+ 韻文の行集合に当てはまる韻構造を示す.
+ spécifie quel schéma de rimes a été appliqué à un
+ groupe de lignes versifiées.
+ especifica el esquema de la rima de un grupo de versos.
+ specifica lo schema rimico di un gruppo di versi
+
+
+
By default, the rhyme scheme is expressed as a string of
+ alphabetic characters each corresponding with a rhyming line.
+ Any non-rhyming lines should be represented by a hyphen or an
+ X. Alternative notations may be defined as for met
+ by use of the metDecl element in the TEI header.
+
When the default notation is used, it does not make sense to
+specify this attribute on any unit smaller than a line. Nor does the
+default notation provide any way to record internal rhyme, or to specify
+non-conventional rhyming practice. These extensions would require
+user-defined alternative notations.
+
+
+
Par défaut, le schéma de rimes est exprimé sous la forme
+ d'une chaîne de caractères alphabétiques correspondant chacun
+ à une ligne rimée. Toute ligne non rimée doit être repésentée
+ par un tiret ou un X. Des notations alternatives peuvent être
+ définies comme pour l'attribut met en utilisant
+ l'élément metDecl dans l'en-tête TEI.
Lorsque
+ la notation par défaut est utilisée, cela n'a pas de sens de
+ renseigner l'attribut rhyme pour une unité plus
+ petite qu'une ligne de vers. La notation par défaut ne donne
+ aucun moyen de noter une rime interne, non plus que de
+ spécifier une utilisation non conventionnelle des rimes. Ces
+ extensions requièrent des notations différentes définies par
+ l'utilisateur de la TEI.
+
+
+
+
+
+
+
+ enjambement
+ 시행 또는 시구의 뜻의 연속
+ 詩句跨行
+ encabalgamiento
+ enjambement
+ provides an attribute which may be used to indicate
+ enjambement of the parent element.
+ enjamb 속성을 포함하는 요소를 모아놓는다.
+ regroupe les éléments portant l'attribut enjamb
+
+ 匯集帶有屬性enjamb的元素。
+ 句跨りを示す属性enjambを持つ要素をまとめる.
+ >comprende los elementos definidos por el atributo enjamb
+
+ comprende gli elementi definiti dall'attributo enjamb
+
+
+
+ enjambement
+ 시행 또는 시구의 뜻의 연속
+ encabalgamiento
+ enjambement
+ indicates that the end of a verse line is marked by enjambement.
+ 시행 또는 시구의 뜻 연속에 의해 표지된 시행의 끝을 표시한다.
+ indique que la fin d'un vers est marqué par un enjambement.
+ 指出詩行末端帶有詩句跨行的標記。
+ 句跨りが起こる行末を示す.
+ indica que el final de un verso está caracterizada por un encabalgamiento.
+ indica che la fine di un verso è caratterizzata da un enjambement
+
+
+
+ the line is end-stopped
+ 행이 끝을 맺는다.
+ 該詩句在行尾結束
+ el verso contiene un punto y final.
+ 当該行が,最終である.
+
+ le vers se termine à la fin de la
+ligne
+ il verso finisce a fine riga
+
+
+ the line in question runs on into the next
+ 문제의 행이 다음으로 계속 지속된다.
+ 該詩句延續到下一詩行
+ el verso se encabalga con el siguiente
+ 当該行は,次の行へと跨る.
+
+ le vers en question continue dans le
+suivant
+ il verso continua alla riga seguente
+
+
+ the line is weakly enjambed
+ 행이 약하게 그 뜻이 이어진다.
+ 詩句弱跨行
+ el verso contiene un encabalgamiento suave
+ 当該行は,緩く跨られている.
+
+ le vers forme un enjambement faible
+ enjambement lieve
+
+
+ the line is strongly enjambed
+ 행이 강하게 그 뜻이 이어진다.
+ 詩句強跨行
+ el verso contiene un encabalgamiento abrupto
+ 当該行は,強く跨られている.
+
+ le vers forme un enjambement fort
+ enjambement forte
+
+
+
+
The usual practice will be to give the value yes to
+this attribute when enjambement is being marked, or the values
+weak and strong if degrees of enjambement are of interest;
+if no value is given, however, the attribute does not default to a value
+of no; this allows the attribute to be omitted entirely when
+enjambement is not of particular interest.
+
+
+
La pratique courante consiste à donner la valeur yes à cet attribut
+ lorsqu'il existe un enjambement, ou les valeurs weak ou strong
+ s'il est intéressant de noter des degrés d'enjambement. Il n'existe pas de
+ valeur par défaut no ; ceci permet d'omettre totalement l'attribut
+ s'il n'est pas intéressant de noter un enjambement.
+
+
+
+
+
+
+
+ marks the point at which a metrical line may be divided.
+ 운율 행이 분리될 수 있는 지점을 표시한다.
+ 標記韻律詩行可能被截斷的位置。
+ 韻律行が分割されている場所を示す.
+ signale une coupe rythmique à l'intérieur d'un vers.
+ señala una interrupción rítmica en el interior de un verso.
+ segnala un'interruzione ritmica all'interno di un verso
+
+
+
+
+
+
+
+
+
+ Hwæt we Gar-Dena in gear-dagum
+ þeod-cyninga þrym gefrunon,
+ hy ða æþelingas ellen fremedon.
+
+
+
+
+
+ Souvent sur la montagne, à l'ombre du vieux chêne,
+ Au coucher du soleil, tristement je m'assieds ;
+
+
+
+
+ 枯藤老樹昏鴉
+ 小橋流水人家
+ 古道西風瘦馬
+ 夕陽西下斷腸人在天涯
+
+
+
+
+
+
+ marks the rhyming part of a metrical line.
+ 운율 행의 운 부분을 표시한다.
+ 標記韻律詩行的押韻部分。
+ 韻文行の押韻部分を示す.
+ Marque la partie rimante d'une ligne métrique.
+ señala una parte del esquema rítmico de un verso
+ segnala la stringa in rima all'interno di un verso
+
+
+
+
+
+
+
+
+
+
+ provides a label
+ (usually a single letter) to identify which part of a rhyme scheme this rhyming string
+ instantiates.
+ 운 문자열이 예시된 운 스키마 부분을 식별하는 표지를 제시한다.
+ 提供一個標籤,識別此韻腳為押韻組合的哪一部份。
+ 当該押韻が起こる韻スキーム部分を特定するラベルを示す.
+ Donne une étiquette pour identifier à quelle shéma
+ métrique correspond cette alternance de rimes.
+ proporciona una etiqueta que identifica que parte del
+ esquema rítmico representa la serie de caracteres en cuestión.
+ fornisce un'etichetta che identifica quale parte
+ dello schema rimico è rappresentata dalla stringa in questione
+
+
+
Within a particular scope, all rhyme elements with the same value for their
+ label attribute are assumed to rhyme with each other. The scope is defined by
+ the nearest ancestor element for which the rhyme attribute has been
+ supplied.
+
+
+
Dans un cadre délimité, tous les éléments rhyme avec la même valeur pour leur
+ attribut label sont présumés rimer l'un avec l'autre. Ce cadre est défini par
+ l'élément ancêtre le plus proche pour lequel l'attribut rhyme a été fourni.
+
+
+
+
+
+
+
+ 'Tis pity learned virgins ever wed
+
+ With persons of no sort of education,
+ Or gentlemen, who, though well born and bred,
+ Grow tired of scientific conversation:
+ I don't choose to say much on this head,
+ I'm a plain man, and in a single station,
+ But — Oh! ye lords of ladies intellectual,
+ Inform us truly, have they not hen-peck'd you all?
+
+
+
+
+
+
+
+ Les étoiles, points d'or, percent les branches noires ;
+ Le flot huileux et lourd décompose ses moires
+
+ Sur l'océan blêmi ;
+ Les nuages ont l'air d'oiseaux prenant la fuite,
+ Par moments le vent parle, et dit des mots sans suite
+
+ Comme un homme endormi.
+
+
+
+
+
+
+ 故人西辭黃鶴 樓,
+ 煙花三月下揚州;
+ 孤帆遠影碧山盡,
+ 唯見長江天際流sation。
+
+
+
+
+
+
+
Performance Texts
Front and Back Matter
+
The Set Element
+ setting
+ 배경
+
+ determinación
+ contexte
+ scénario
+ contains a description of the setting, time, locale, appearance, etc., of the action of a
+ play, typically found in the front matter of a printed performance text (not a stage direction).
+ (무대 지시가 아닌) 인쇄된 공연 텍스트의 전반부 자료에서 전형적으로 나타나는 희곡 이야기 전개에서
+ 배경, 시대, 장소, 상황 등에 관한 기술을 포함한다.
+ 包含一段演出的場景描述,像是佈景、時間、地點、景象等,這段描述通常出現在劇本中的前頁部分
+ (並非舞台動作指示) 。
+ contiene la descripción de la configuración, del tiempo,
+ de la escena, de la apariencia, etc., de la acción de una obra teatral, situada normalmente en
+ el inicio de un texto dramático impreso (no en la dirección de escena).
+ 一般には,印刷された舞台テキストの前付にある,芝居の設定,時間,場所, 現れ方などの情報を示す.
+ contient une description du décor, du temps, du lieu, de
+ l'ordre d'entrée en scène, etc., de l'action de la pièce, qu'on trouve généralement dans les
+ préliminaires d’un texte imprimé d'une pièce de théâtre. (Ce n'est pas une indication scénique).
+ contiene una descrizione dell'ambientazione, dell'orario,
+ della scena, dell'aspetto, ecc. dell'azione di un'opera teatrale, di solito inserita nel
+ peritesto iniziale di una testo per la rappresentazione pubblicato (non nelle direttive di
+ scena).
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
The action takes place on February 7th between the hours of noon and six in the
+ afternoon, close to the Trenartha Tin Plate Works, on the borders of England and Wales,
+ where a strike has been in progress throughout the winter.
+
+
+
+
+
+
+
+
Bel après-midi de printemps en 1899. Madame Claire Roc est assise dans un fauteuil en
+ osier et feuillette un magazine [...], on peut entendre des cris joyeux d'enfants.
+
+
+
+
+
+
+ Une représentation à l'hôtel de Bourgogne
+
La salle de l'Hôtel de Bourgogne, en 1640. Sorte de hangar de jeu de paume aménagé et
+ embelli pour des représentations.
+
La salle est un carré long ; on la voit en biais, de sorte qu'un de ses côtés forme le
+ fond qui part du premier plan, à droite, et va au dernier plan, à gauche, faire angle
+ avec la scène qu'on aperçoit en pan coupé.
+
+
+
+
+
+
+
+
+
+ 1640
+
+ La salle de l'Hôtel de Bourgogne
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 1907
+
+ East Coast village in England
+
+
+
+
+
+
+
Contains paragraphs or phrase level tags.
+
This element should not be used outside the front matter; for similar contextual descriptions
+ within the body of the text, use the stage element.
+
+
+
Contient des paragraphes ou des éléments de niveau phrase.
+
Cet élément ne doit pas être utilisé ailleurs que dans les sections préliminaires. Pour
+ encoder des descriptions de même nature dans le corps du texte, on utilise l'élément
+ stage.
Prologues and Epilogues
+ prologue
+ contains the prologue to a drama, typically spoken by an actor out of character, possibly in
+ association with a particular performance or venue.
+ 전형적으로 등장인물들 중 하나가 말하는, 때로는 특정 공연 또는 행위의 현장과 관련된, 드라마의
+ 개막사.
+ 包含戲劇開場白,可能和特定演出或故事場景相關,一般是由一個演員脫離劇中身份來朗讀。
+ contiene el prólogo a un drama, pronunciado normalmente
+ por un actor a parte del reparto, posiblemente asociado a una puesta en escena determinada.
+ 舞台における前口上を示す.例えば,配役以外の人物により発話されるもの. 特定の演技や開催地と関連することもある.
+ contient le prologue d’une pièce de théâtre, généralement
+ récité par un acteur hors rôle, éventuellement associé à une représentation ou à un lieu
+ particulier.
+ contiene il prologo ad un'opera teatrale, di solito
+ pronunciato da un attore al di fuori del ruolo teatrale, possibilmente inn relazione ad una
+ particolare messa in scena o luogo di rappresentazione.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Wits, like physicians never can agree,
+ When of a different society.
+ New plays are stuffed with wits, and with deboches,
+ That crowd and sweat like cits in May-Day coaches.
+
+ Written by a person of quality
+
+
+
+
+
+
+
+ Prologue
+
+ Le Prologue.
+
Voilà. Ces personnages vont vous jouer l' histoire d' Antigone. Antigone, c' est la
+ petite maigre qui est assise là-bas, et qui ne dit rien. Elle regarde droit devant
+ elle. Elle pense. Elle pense qu' elle va être Antigone tout à l' heure, qu' elle va
+ surgir soudain de la maigre jeune fille noiraude et renfermée que personne ne prenait
+ au sérieux dans la famille et se dresser seule en face du monde, seule en face de
+ Créon, son oncle, qui est le roi. Elle pense qu' elle va mourir, qu' elle est jeune et
+ qu' elle aussi, elle aurait bien aimé vivre. Mais il n' y a rien à faire. Elle s'
+ appelle Antigone et il va falloir qu' elle joue son rôle jusqu' au bout...
+
+
+
+
+
+
+
+
+ 何時姊妹再相逢,雷電轟轟雨蒙蒙?
+ 且等烽煙靜四陲,敗軍高奏凱歌回。
+ 半山夕照尚含輝。
+ 何處相逢?
+ 在荒原。
+ 共同去見麥克白。
+ 我來了,狸貓精。
+ 癩蛤蟆叫我了。
+ 來也。
+ 美即丑惡丑即美,翱翔毒霧妖云里。
+
+ 三女巫同下
+
+
+
+
+
+
+
+
+ épilogue
+ contains the epilogue to a drama, typically spoken by an actor out of character, possibly in
+ association with a particular performance or venue.
+ 전형적으로 등장인물들 중 하나가 말하는, 때로는 특정 공연 또는 행위의 현장과 관련된, 드라마의
+ 페막사.
+ 包含戲劇收場白,可能和特定演出或故事場景相關,一般是由一個演員脫離劇中身份來朗讀。
+ contiene el epílogo a un drama, pronunciado normalmente
+ por un actor a parte del reparto, posiblemente asociado a una puesta en escena determinada..
+ 舞台芸術における納め口上を示す.例えば,特定の演目や場所と関連している かもしれない,役者からの発話.
+ contient l'épilogue d’une pièce de théâtre, généralement
+ récité par un acteur qui n'a pas de rôle, éventuellement associé à une représentation ou un lieu
+ particulier
+ contiene l'epilogo ad un'opera teatrale, di solito
+ pronunciato da un attore al di fuori del ruolo teatrale, possibilmente inn relazione ad una
+ particolare messa in scena o luogo di rappresentazione.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Written by Colley Cibber, Esq and spoken by Mrs. Cibber
+
+
+
+ Since Fate has robb'd me of the hapless Youth,
+ For whom my heart had hoarded up its truth;
+
+
+ By all the Laws of Love and Honour, now,
+ I'm free again to chuse, — and one of you
+
+
+ Suppose I search the sober Gallery; — No,
+ There's none but Prentices — & Cuckolds all a row:
+ And these, I doubt, are those that make 'em so.
+
+ Pointing to the Boxes.
+
+ 'Tis very well, enjoy the jest:
+
+
+
+
+
+
+
+
+
+ Stances en forme d'épilogue.
+
+ Alidor.
+
+ Que par cette retraite elle me favorise !
+ Alors que mes desseins cedent à mes amours,
+ Et qu'ils ne sçauroient plus defendre ma franchise
+ Sa haine, et ses refus viennent à leur secours.
+ J'avois beau la trahir, une secrette amorce
+ R'allumoit dans mon coeur l'amour par la pitié,
+ Mes feux en recevoient une nouvelle force,
+ Et tousjours leur ardeur en croissoit de moitié.
+
+
+
+
+
+
+
+
+ 收場詩
+ 飾國王者向觀眾致辭
+
+
+ 袍笏登場本是虛,
+ 王侯卿相總堪嗤,
+ 但能博得觀眾喜,
+ 便是功成圓滿時。
+
+
+
+
+
+
+
Contains optional headings, a sequence of one or more component-level
+ elements, and an optional sequence of closing material.
+
+
+
+
Contient des titres optionnels, une série d'un ou de plusieurs éléments de
+ niveau composant et éventuellement une série d'éléments de fin.
+
+
+
選択的にヘダー,ひとつ以上の構成要素,選択的に終末部を示す.
+
+
+
+
+
+
+
Records of Performances
+ représentation
+ contains a section of front or back matter describing how a dramatic piece is to be
+ performed in general or how it was performed on some specific occasion.
+ 드라마가 일반적으로 공연되는 방법 또는 특정 상황에서 공연되었던 방식을 기술하는, 앞부분 또는 뒷부분의
+ 절.
+ 包含前頁或後頁部分,描述戲劇作品的一般演出方式、或曾經在某些特定場合的演出方式。
+ contiene una sección del encabezado o de la conclusión
+ que describe cómo un fragmento dramático debe ser realizado en general o cómo fue realizado en
+ una función determinada.
+ 芝居の部分が,一般にどのように演技されるのか,特定の場面でどのように 演技されるのかを示す.
+ contient une partie de la préface ou de la postface
+ décrivant comment la pièce de théâtre doit être jouée normalement ou comment elle a été jouée à
+ telle ou telle occasion particulière.
+ contiene una sezione del peritesto iniziale o finale che
+ descrive come mettere in scena l'opera teatrale, o come è stata messa in scena in qualche
+ occasione particolare.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Gateway Theatre, Edinburgh, 6 September 1948Anath BithiahAthene SeylerShendiRobert Rietty
+
Directed by E. Martin Browne
+
+
+
+
+
+
+
+
Théâtre national du Petit-Odéon, Paris, du 10 Décembre 1974
+ au 12 Janvier 1975Paul ValéryMichel DuchaussoyJosephGérad CaillaudM. TestePierre DuxMme TesteClaude WinterL'abbé MossonJacques Toja
+
Adaptation et mise en scène de Pierre Franck
+
+
+
+
+
+
+
+
Distribution Comédie des Champs-Elysées, Paris,
+ 1923(par ordre d'entrée en scène) Knock : Louis Jouvet
+
+
+
+
+
+
+
+
新竹市文化局演藝廳, 2008年3月14日劉福春陳忠義劉麗月陳慧如
+
監製: 李永得
+
+
+
+
+
+
+
+
首演假台北國家劇院於 2007年10月12日
+ 劉麗君: 徐堰鈴飾
+
+
+
+
+
+
+
+
Cast of the original production at the Savoy Theatre, London, on
+ September 24, 1907
+ Colonel Hope : Mr A.E.George
+
+
+
+
+
+
contains paragraphs and an optional cast list only.
+
+
+
+
contient des paragraphes et éventuellement, un élément castList.
+
+
+
段落と選択的な配役リストのみを含む.
+
+
+
+
+
+
+
Cast Lists
+ cast list
+ 배역 목록
+ 角色清單
+ reparto
+ distribution
+ elenco dei personaggi
+ contains a single cast list or dramatis personae.
+ 하나의 배역 목록 또는 드라마 등장인물을 포함한다.
+ 包含單一角色名單或出場人物列表。
+ contiene una única lista con los personajes del reparto.
+ ひとつの配役リストまたは配役表を示す.
+ contient la distribution ou la liste des
+ personnages.
+ contiene un unico elenco dei personaggio le dramatis personae.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Mendicants
+
+ Aafaa
+ Femi Johnson
+
+
+ Blindman
+ Femi Osofisan
+
+
+ Goyi
+ Wale Ogunyemi
+
+
+ Cripple
+ Tunji Oyelana
+
+
+
+ Si Bero
+ Sister to Dr Bero
+ Deolo Adedoyin
+
+
+ Two old women
+
+ Iya Agba
+ Nguba Agolia
+
+
+ Iya Mate
+ Bopo George
+
+
+
+ Dr Bero
+ Specialist
+ Nat Okoro
+
+
+ Priest
+ Gbenga Sonuga
+
+
+ The old man
+ Bero's father
+ Dapo Adelugba
+
+
+ The action takes place in and around the home surgery of
+Dr Bero, lately returned from the wars.
+
+
+
+
+
+ T.N.P. 1963
+ A la création au Festivai d'Avignon en juillet 1962, la
+ distribution était légèrement différente : dans l'ordre ci-dessus : Hécube (Annie
+ Monnier) ; Iris (Paule Noël) ; Hector (Daniel lvernel) ; Pâris (Jean-Louis Trintignant)
+ ; Troïus (Bernard Laïk).
+
+
+ Andromaque
+ MARIA MAUBAN
+
+
+ Hélène
+ CHRISTIANE MINAZZOLLI
+
+
+ Hécube
+ ALINE BERTRAND
+
+ Cassandre JUDITH MAGRE ANNE
+
+ La Paix
+ DOMINIQUE VILAR
+
+
+ Iris
+ NOELLE VINCENT
+
+
+ La petite Polyxène
+ CLAUDINE MAUGEY
+
+
+ Hector
+ PIERRE VANECK
+
+
+ Ulysse
+ JEAN VILAR
+
+
+ Demokos
+ PASCAL MAZZOTTI
+
+
+ Priam
+ JEAN-FRANÇOIS REMY
+
+
+ Pâris
+ ROBERT ETCHEVERRY
+
+
+ Oiax
+ MARIO PILAR
+
+
+ Le Gabier
+ GEORGES GERET
+
+
+ Le Géomètre
+ PHILIPPE AVRON
+
+
+ Abnéos
+ LUCIEN ARNAUD
+
+
+ Troïlus
+ MICHEL GONZALES
+
+
+ Olpidès
+ MAURICE COUSSONNEAU
+
+
+ Busiris
+ GEORGES RIQUIER
+
+
+ Premier Vieillard
+ JEAN MONDAIN
+
+
+ Deuxième Vieillard
+ LUCIEN ARNAUD
+
+
+ Messagers
+ Bernard Laïk, Jean-Pierre Maurin.
+
+
+ Servantes troyennes
+ Christiane Oscar, Noëlle Vincent.
+
+
+ Notables
+
+ Jean-Daniel Ehrrnann
+ Bernard Wawer
+ Bernard Klein
+
+
+
+ Gardes grecs
+ Jean Dufau, Alain Deny, Jean-Jacques LeconteRichard Rein
+
+
+
+
+ Théâtre de la Ville 1971
+ La pièce a été reprise au Théâtre de la Ville le 22 janvier 1971
+ dans une nouvelle mise en scène de Jean Mercure, musique de Marc Wilkinson, scénographie
+ et costumes Yannis Kokkos. Elle a été ensuite donnée à partir du 12 juillet dans le
+ cadre du 25e Festival d'Avignon, et continuera sa carrière au Théâtre de la Ville à
+ partir du 5 novembre 1971 (avec quelques modifications de distribution).
+
+
+ Andromaque
+ FRANCINE BERGE
+
+
+ Hélène
+ ANNIE DUPEREY
+
+
+ Hécube
+ LOUISE CONTE
+
+
+ Cassandre
+ ANNE DOAT
+
+
+ La Paix
+ JANDELINE
+
+
+ Iris
+ ISA MERCURE
+
+ La petite PolyxèneCHRISTIANE SELLAM ou VANINA VINITZKY
+
+
+ Hector
+ JOSE-MARIA FLOTATS
+
+
+ Ulysse
+ MICHEL DE RE
+
+
+ Demokos
+ MAURICE CHEVIT
+
+
+ Priam
+ ANDRE VALTIER
+
+
+ Pâris
+ DOMINIQUE MAURIN
+
+
+ Oiax
+ MARCO-PERRIN
+
+
+ Le Gabier
+ LAFLEUR
+
+
+ Le Géomètre
+ BERNARD VERON
+
+
+ Abnéos
+ ANGELO BARDI
+
+
+ Troïlus
+ PHILIPPE NORMAND
+
+
+ Olpidès
+ COUSSONNEAU
+
+
+ Busiris
+ JEAN MERCURE
+
+
+ Premier Vieillard
+ JEAN-MARIE BON
+
+
+ Deuxième Vieillard
+ EUGENE BERTHIER
+
+
+ Messagers
+ Jean-Claude Islert, Michel Sausin.
+
+
+ Servantes troyennes
+ Dominique Jayr, Annie Seurat, Hélène
+ Augier
+
+
+ Gardes grecs
+ Jacques Gaffuri, Georges Joannon
+
+
+ Suivant de Busiris
+ Charles Capezzali
+
+
+ Un marin
+ Henry Courseaux
+
+
+
+
+
+
+
+
+
+ 楊延輝
+
+ 少年楊延輝
+ 李少春
+
+
+ 中年楊延輝
+ 周信芳
+
+
+ 中年楊延輝
+ 譚富英
+
+
+ 老年楊延輝
+ 馬連良
+
+
+
+ 鐵鏡公主
+ 遼國公主,嫁楊延輝為妻
+ 梅蘭芳
+
+
+ 楊家兄弟
+
+ 楊延昭
+ 馬盛龍
+
+
+ 楊宗保
+ 姜妙香
+
+
+
+ 蕭太后
+ 遼景宗耶律賢的皇后
+ 芙蓉草
+
+
+ 四夫人
+ 高玉倩
+
+
+ 佘太君
+ 楊延輝的母親
+ 馬富祿
+
+
+ 場景交換於遼國廷內與飛虎峽宋營之間。
+
+
+
+
+
+
+
+ cast list grouping
+ 배역 목록 모아 놓기
+ 角色群組
+ grupo de reparto
+ liste de personnages
+ raggruppamento della lista dei personaggi
+ groups one or more individual castItem
+elements within a cast list.
+ 배역 목록 내의 몇 개의 개별 castItem 요소를 모아 놓는다.
+ 匯集角色清單中一個或多個角色項目元素。
+ agrupa uno o más elementos individuales del reparto (castItem).
+ 配役リストにある,ひとつ以上の要素castItemをまとめるもの.
+ dans une distribution, catégorie qui rassemble un ou
+ plusieurs personnages.
+ raggruppa uno o più elementi individuali castItem in una lista dei personaggi.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Walter
+ Mr Frank Hall
+
+
+ Hans
+ Mr F.W. Irish
+
+ friends of Mathias
+
+
+
+
+
+
+ Messagers
+ Jean-Claude Islert, Michel Sausin.
+
+
+ Servantes troyennes
+ Dominique Jayr, Annie Seurat, Hélène
+ Augier
+
+
+
+
+
+
+
+ 程蝶衣
+ 張國榮
+
+
+ 菊仙
+ 鞏俐
+
+ 原是妓女,後嫁段小樓為妻
+
+
+
+
+
The rend attribute may be used, as here, to indicate
+whether the grouping is indicated by a brace, whitespace, font change,
+etc.
+
Note that in this example the role description friends of
+Mathias is understood to apply to both roles equally.
+
+
+
L'attribut rend peut être utilisé comme ici pour indiquer si le
+ regroupement est indiqué par une parenthèse, un espace, un changement de police de caractère,
+ etc.
+
À noter que dans cet exemple il est entendu que la description du rôle friends of
+ Mathias (amis de Mathias) s'applique de la même façon aux deux rôles.
+
+
+
+ 属性rendは,当該グループが括弧,空白,字形の違いなどで
+ 示されていることを示す.
+
+
+ この例では,役に関する情報friends of Mathiasは,2つの役に同
+ じく当てはまると理解される.
+
+
+
+
+
+
+ cast list item
+ 배역 목록 항목
+ 角色項目
+ elemento del reparto
+ personnage
+ oggetto della lista dei personaggi
+ contains a single entry within a cast list, describing
+either a single role or a list of non-speaking roles.
+ 배역 목록에서 하나의 배역, 또는 대사가 없는 배역 목록을 기술하는 하나의 항목을 포함한다.
+ 包含角色清單中的一個項目,描述單一角色或無台詞角色的列表。
+ contiene una sola entrada dentro de la lista del reparto, describiendo un solo papel o una lista de papeles sin diálogo.
+ 配役リスト中の各項目を示す.ひとつの役,または台詞のない役のリスト
+ になる.
+ dans une liste de personnages, entrée décrivant un
+ rôle en particulier ou une liste de rôles muets.
+ contiene una singola voce all'interno della lista dei personaggi, descrive o un ruolo o una lista di ruoli privi di battute.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ characterizes the cast item.
+ 배역 항목의 특성 기술
+ 說明角色項目的特性。
+ caracteriza el elemento del reparto.
+ 当該項目の種類を示す.
+ caractérise le personnage.
+ indica la voce della lista dei personaggi
+
+ role
+
+
+ the item describes a single role.
+ 항목이 하나의 배역을 기술한다.
+ 該項目為單一角色
+ el elemeto describe un único papel.
+ ひとつ役を示す.
+
+ l'item décrit un simple rôle.
+ l'oggetto descrive un solo ruolo.
+
+
+ the item describes a list of non-speaking roles.
+ 항목이 대사 없는 배역 목록을 기술한다.
+ 該項目為無台詞角色的列表
+ el item describe una lista de papeles sin diálogo.
+ 科白がない役のリストを示す.
+
+ l'item décrit une liste de rôles muets
+ l'oggetto descrive una lista di ruoli privi di battute.
+
+
+
+
+
+
+
+ Player
+ Mr Milward
+
+
+
+
+
+
+ Un marin
+ Henry Courseaux
+
+
+
+
+
+ Agent de police, dessinateur, serrurier, etc.
+
+
+
+
+
+ 段小樓
+ 張豐毅
+
+
+
+
+
+ 張國榮、張豐毅、鞏俐…等等
+
+
+
+
+ Constables, Drawer, Turnkey, etc.
+
+
+
+
+
+
+ rôle
+ contains the name of a dramatic role, as given in a cast list.
+ 배역 목록에 제시되는 드라마 배역의 이름
+ 角色名單所列的劇中角色名稱。
+ el nombre de un papel dramático, según los dados en el
+ reparto.
+ 配役リスト中にある,役名を示す.
+ le nom d'un rôle au théâtre tel qu’il est donné dans la
+ distribution.
+ il nome di un ruolo teatrale, secondo la lista dei
+ personaggi.
+
+
+
+
+
+
+
+
+
+ Joan Trash
+ A Ginger-bread-woman
+
+
+
+
+ Le professeur Rubeck
+ sculpteur
+
+
+
+
+ 鄧肯
+ 蘇格蘭國王
+
+
+
+
It is important to assign a meaningful ID attribute to the role element, since this
+ ID is referred to by who attributes on many other elements.
+
+
+
Il est important de fournir un identifiant signifiant pour
+ l'attribut xml:id de l'élément role :
+ l'identifiant donné sera utilisé pour renseigner l'attribut
+ who de nombreux autres éléments, et faire ainsi
+ référence à l'élément role.
+
+
+
+
+
+ role description
+ 배역 기술
+ 角色描述
+ descripción del rol
+ description du rôle
+ descrizione del ruolo
+ describes a character's role in a drama.
+ 드라마에서 등장인물의 배역을 기술한다.
+ 描述劇中人物所扮演的角色。
+ describe el papel de un personaje en un drama.
+ 舞台芸術における登場人物の役を示す.
+ décrit le rôle d'un personnage dans une pièce de
+ théâtre.
+ descrive il ruolo di un personaggio in un'opera teatrale.
+
+
+
+
+
+
+
+
+
+ gentlemen of leisure
+
+
+
+
+ valet de chasse
+
+
+
+
+ 悠閒的紳士
+
+
+
+
+
+
+ contains the name of an actor appearing within a cast list.
+ 배역 목록에 나타나는 배우의 이름
+ 角色名單中的演員姓名。
+ Nombre de un actor que aparece dentro de la lista del reparto.
+ 登場人物リスト中にある役者名を示す.
+ Nom d'un acteur apparaissant dans une
+ distribution.
+ nome di un attore che appare nella lista dei personaggi.
+
+
+
+
+
+
+
+
+
+
+ Mathias
+ the Burgomaster
+ Mr. Henry Irving
+
+
+
+
+
+
+ Mrs Saunders
+ la logeuse
+ Sylvia Maryott
+
+
+
+
+
+
+ 梁山伯
+ 窮書生
+ 凌波
+
+
+
+
+
This element should be used only to mark the name of the actor as
+ given in the source. Chapter discusses ways of
+ marking the components of names, and also of associating names with
+ biographical information about a person.
+
+
+
Cet élément ne devrait être utilisé que pour encoder le nom de l'acteur tel qu'il est donné
+ dans la source. Le chapitre
+ traite des différentes manières d'encoder les composants des noms, et aussi celui d'associer des
+ noms à des informations biographiques concernant une personne.
Stage Directions
+ speech group
+ contains a group of speeches or songs in a performance text presented
+ in a source as constituting a single unit or
+ number.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ FRAULEIN SCHNEIDER:
+
Herr Schultz! Can I believe what I see? (HERR SCHULTZ nods
+proudly) But this is — too much to accept. So rare — so costly —
+so luxurious.
+
+ (She sings)
+
+
+ If you bought me diamonds, If you bought me pearls,
+ If you bought me roses like some other gents
+ Might bring to other girls,
+ It couldn't please me more
+ Than the gift I see -
+ (She takes a large pineapple out of the bag)
+ A pineapple for me!
+
+
+ SCHULTZ:
+ (Singing)
+ If, in your emotion,
+ You began to sway,
+ Went to get some air,
+ Or grabbed a chair
+ To keep from fainting dead away,
+ It couldn't please me more
+ Than to see you cling
+ To the pineapple I bring.
+
+
+
+BOTH:
+ Ah, ah, ah, ah, ah, ah, ah, ah
+
+
+ (They dance)
+
+
+ FRAULEIN SCHNEIDER:
+
But you must not bring me
+any more pineapples! Do you hear? It is not proper. It is a gift a
+young man would present to his lady love. It makes me blush!
+
+
+
+
+
+
+
+
+ movement
+ 이동
+ 動作
+ movimiento
+ mouvement
+ movimento
+ marks the actual entrance or exit of one or more characters on stage.
+ 무대에서 하나 이상의 등장 인물들의 실제적 입장과 퇴장을 표시한다.
+ 標記舞台上人物的實際進場或退場。
+ marca la entrada o salida real de uno o más personajes en
+ una escena.
+ 舞台上で,ひとり以上の登場人物の出やはけを示す.
+ signale l'entrée ou la sortie d'un ou de plusieurs
+ personnages sur la scène.
+ segnala l'entrata o uscita in scena di uno o più
+ personaggi.
+
+
+
+
+
+
+
+
+
+
+ characterizes the movement, for example as an entrance or exit.
+ 예를 들어 입장 또는 퇴장과 같은, 이동의 특성을 기술한다.
+ 說明舞台動作,例如進場或退場。
+ caracteriza el movimiento, por ejemplo de una entrada
+ o de una salida.
+ 当該動きの分類を示す.例えば,出,はけ,など.
+ caractérise un mouvement , par exemple une entrée ou
+ une sortie.
+ indica il tipo di movimento, ad esempio come entrata
+ o uscita.
+
+
+
+ character is entering the stage.
+ 등장인물이 무대에 등장하고 있다.
+ 角色進場
+ el personaje se incorpora a la escena.
+ 登場人物が舞台に出る.
+ le personnage entre en scène.
+ il personaggio entra in scena.
+
+
+ character is exiting the stage.
+ 등장인물이 무대에서 퇴장하고 있다.
+ 角色退場
+ el personaje sale de la escena.
+ 登場人物が舞台からはける.
+ le personnage sort de scène.
+ il personaggio lascia la scena.
+
+
+ character moves on stage
+ 등장인물이 무대에서 이동한다.
+ el personaje se mueve en la escena
+ 登場人物が舞台上で移動する.
+ le personnage se déplace sur scène.
+ il personaggio si muove sulla scena
+
+
+
+
+ specifies the direction of a stage movement.
+ 무대 이동의 방향을 명시한다.
+ 說明舞台動作的方向。
+ especifica la dirección de un movimiento en el
+ escenario.
+ 舞台上の動きの方向を示す.
+ indique la direction d'un mouvement sur scène.
+ specifica la direzione di un movimento in scena.
+
+
+
+ left
+ 왼쪽
+ izquierdo
+ à gauche
+ sinistra
+ stage left
+ 무대 왼쪽
+ 舞台左側
+ izquierda del escenario
+ 上手.
+ côté cour (à gauche).
+ lato sinistro della scena
+
+
+ right
+ 오른쪽
+ derecha
+ à droite.
+ destra
+ stage right
+ 무대 오른쪽
+ 舞台右側
+ la derecha del escenario
+ 下手.
+ côté jardin (à droite).
+ lato destro della scena
+
+
+ center
+ 중앙
+ centro
+ au centre
+ centro
+ centre stage
+ 무대 중앙
+ 舞台中央
+ centro del escenario
+ 舞台中央.
+ milieu de scène
+ centro della scena
+
+
+
+
Full blocking information will normally require combinations of values, (for example
+ UL for upper stage left) and may also require more detailed encoding of
+ speed, direction etc. Full documentation of any coding system used should be provided in
+ the header.
+
+
+
Donner une information complète de mise en place requiert normalement une combinaison de
+ valeurs (par ex. : FG pour au fond à gauche de la scène) et peut aussi
+ nécessiter d'encoder de façon plus précise la vitesse, la direction, etc. La documentation
+ complète de toute règle de codage doit être fournie dans l'en-tête TEI.
+
+
+
+ performance
+ 연기
+ función
+ jeu
+ rappresentazione
+ identifies the
+ performance or performances in which this movement occurred as
+ specified by pointing to one or more performance elements.
+ 명시된 대로 이동할 때의 연기를 명시한다.
+ 指明這項舞台動作出現在哪些演出中。
+ identifica la puesta en escena en la cual este
+ movimiento se produjo según lo especificado.
+ 当該動きの演技を示す.
+ identifie la ou les représentations au cours
+ desquelles s'est effectué le déplacement décrit.
+ indica la rappresentazione o le rappresentazioni in
+ cui il movimento è stato eseguito così come specificato.
+
+
+
+
+
+
+
Technical Information
+ vue
+ describes the visual context of some part of a screen play in
+terms of what the spectator sees, generally independent of any
+dialogue.
+ 일반적으로 어떤 대화와도 무관하게 관객의 관점에서 시나리오의 일부인 시각적 맥락을 기술한다.
+ 劇本中描述觀眾所看到的景象,一般不包含任何對話內容。
+ describe el contexto visual de una cierta parte del escenario en los términos en los que el espectador lo percibe, generalmente independientemente de cualquier diálogo.
+ 脚本中における視覚状況の部分を示す.観客が見る部分で,一般には,台詞
+ から独立してある.
+ décrit le contexte visuel d'une partie d'un scénario
+ selon la vision du spectateur, généralement indépendamment de tout dialogue.
+ descrive il contenuto visivo di una parte della sceneggiatura, rispetto a ciò che lo spettatore vede, di solito indipendentemente dai dialoghi.
+
+
+
+
+
+
+
+
+
+ Max joins his daughter
+at the window. Rain sprays his
+face--
+ Max's POV He sees occasional
+windows open, and just across from his apartment
+house, a man opens the front door of
+a brownstone--
+
+
+
+
+
+
Plan d'ensemble des fillettes qui regardent Mouchette. Plan
+ rapproché de la main de l'institutrice pianotant nerveusement.
+ Retour sur les fillettes qui ricanent. Mouchette, face à nous, ne peut retenir
+ ses larmes. N'y tenant plus, elle prend son visage dans ses mains et hoquète de
+ sanglots. Fondu enchaîné.
+
+
+
+
+
+
+
+ Préfecture - bureau fonctionnaire - intérieur jour Plan américain
+ d'un fonctionnaire assis derrière un bureau (il est vu de profil), consultant un fichier
+ dans une boîte ouverte devant lui. Il sort une fiche et lève la tête. C'est un homme
+ d'une quarantaine d'années, un aspect solide, concret, et un air relativement bon
+ enfant. Dans son regard, pourtant, on voit passer par moments une lueur froide,
+ inquiétante.
+
+ FONCTIONNAIRE
+
Monty Python's Flying Circus tonight comes to you live
+ from the Grillomat Snack Bar, Paignton.
+
+
+
+ Interior of a nasty snack bar. Customers around, preferably
+ real people. Linkman sitting at one of the plastic tables.
+
+ Linkman
+
Hello to you live from the Grillomat Snack Bar.
+
+
+
+
+
+
+
A view is a particular form of stage direction.
+
+
+
Un élément view peut être considéré comme une forme particulière
+ d'indication scénique.
+
+
+
+ 当該要素は,ト書きにある独特の形式である.
+
+
+
+
+
+
+
+ angle de prise de vue
+ describes a particular camera angle or viewpoint in a screen play.
+ 시나리오에서 특정 카메라 각도 또는 관점을 기술한다.
+ 描述電影視劇本中攝影機的某特定視角或觀看角度。
+ describe un ángulo de cámara o un punto de vista determinado en un escenario.
+ 撮影時の,カメラアングルや視点を示す.
+ décrit un angle de prise de vue ou un plan dans un
+ scénario.
+ descrive un particolare angolatura o punto di vista in una sceneggiatura.
+
+
+
+
+
+
+
+
+
+
+ George glances at the window—and freezes.
+New angle—shock cut
+Out the window the body of a dead man suddenly slams into frame
+
+
+
+
+
+ Plan américain (très légère plongée) de la plate-forme
+ bondée. Pano sur Klein qui se glisse dans le couloir
+ intérieur du véhicule, jusqu'à une jeune femme qui se tient debout.
+
+
+
+
+ 喬治望向窗戶,凍住。 新角度—shock
+ cut(凝住) 窗外一具屍體突然砰向畫面
+
+
+
+
+
+
+
+ son
+ describes a sound effect or musical sequence specified within a screen play or radio script.
+ 시나리오 또는 라디오 스크립트에서 지정된 효과음 또는 음악을 기술한다.
+ 描述電影或廣播劇本中的音效或配樂。
+ describe un efecto sonoro o una secuencia musical
+ especificada dentro de una obra teatral o de un programa radiofónico.
+ 音響効果,すなわち脚本や台本で指定されている一連の音を示す.
+ décrit un effet sonore ou un morceau de musique indiqué
+ dans un scénario pour le cinéma ou la radio.
+ descrive un effetto sonoro o una sequenza musicale
+ descritti in una sceneggiatura o di un copione radiofonico.
+
+
+
+
+
+
+
+
+
+ categorizes the sound in some respect, e.g. as music, special effect, etc.
+ 어떤 측면에서 음향을 분류한다. 예, 음악, 특수 효과음 등.
+ 將聲音從某方面來分類,例如音樂,特殊音效等。
+ categoriza el sonido en algún aspecto, p.ej. como
+ música, efecto especial, etc.
+ 当該音を分類する.例えば,音楽,特殊効果など.
+ caractérise le son, par exemple : musique, effets
+ spéciaux, etc.
+ classifica il tipo di suono, ad esempio musica,
+ effetto speciale, ecc.
+
+
+
+ indicates whether the sound overlaps the surrounding speeches or interrupts them.
+ 음향이 주변 대사와 겹치거나 이를 방해하는지를 표시한다.
+ 指出該聲音是否和週遭說話聲音重疊或單獨穿插於其間。
+ indica si el sonido solapa los discursos circundantes
+ o los interrumpe.
+ 当該音が周囲の発話にかぶっているか,または会話を遮っているかを示 す.
+ indique si le son couvre les dialogues ou les
+ interrompt.
+ indica se il suono si accavalla con le battute o se
+ le interrompe
+
+ unknown
+
+
The value true indicates that the sound is heard between the surrounding
+ speeches; the value false indicates that the sound overlaps one or more of the
+ surrounding speeches.
+
+
+
La valeur true indique que le son est entendu entre les dialogues ; la valeur
+ false indique que le son se superpose à un ou à plusieurs de ces
+ dialogues.
+
+
+
+
+
+ Plan américain serré de Zazie, en chemise de nuit, dans les vécés,
+ tout carrelés de clair. Au vasistas, passe un rayon de soleil matinal. Zazie réfléchit et
+ colle son oreille sur la cloison. La maison est tellement silencieuse qu'elle doit se
+ demander si elle va tirer la chasse d'eau ou non. Elle sourit et imagine qu'elle entend le
+ bruit de métro (bruit off), puis, suivie en court
+ panoramique, elle va tirer la chasse d'eau. Bruit de démarrage
+ d'une automobile, grincement de changement de vitesse. [Etonnée, Zazie
+ recommence. Cette fois, bruit du chariot d'une machine à écrire qui revient
+ à la ligne. Encore une fois : sirène de brume]. Ecœurée ou déçue, Zazie
+ sort des vécés.
+
+
+
+
+
+ 班吉
+
現在,說到我們的事業。
+
+
+ 福特和薩豐
+
敬我們的事業。
+
+ 玻璃杯敲擊聲
+
+ 班吉
+
抱歉,您說什麼?
+
+
+ 福特
+
不好意思,我以為你說乾杯。
+
+
+
+
+
A specialized form of stage direction.
+
+
+
Une forme particulière d'indication scénique.
+
+
+
ト書きにある専門形.
+
+
+
+
+
+
+ sous-titre
+ contains the text of a caption or other text displayed as part of
+a film script or screenplay.
+ 영화 스크립트 또는 시나리오의 일부로서 제시되는 자막 또는 다른 텍스트를 포함한다.
+ 包含呈現在對白本或電影視劇本中的字幕或其他文字。
+ contiene el texto de un encabezamiento u otro texto dispuesto como parte de una obra o de un guión de película.
+ 見出しや脚本のテキストを示す.
+ texte d'une légende ou tout autre texte affiché,
+ qui fait partie du script ou du scénario
+ contiene il testo di una leggenda o altro testo facente parte di un copione o di una sceneggiatura.
+
+
+
+
+
+
+
+
+
+ Zoom in to overlay showing some stock film of hansom cabs
+galloping past
+
London, 1895.
+
The residence of Mr Oscar Wilde.
+ Suitably classy music starts.
+ Mix through to Wilde's drawing room. A crowd of suitably
+dressed folk are engaged in typically brilliant conversation,
+laughing affectedly and drinking champagne.
+
+ Prince of Wales
+
My congratulations, Wilde. Your latest play is a great success.
+
+
+
+
+
+
+ Plongée générale de la cage d'escalier (en colimaçon). Deux lycéens,
+ Eric et Serge, âgés de 16 ans, en manteaux noirs, montent. En surimpression sur
+ cette image, passent successivement trois cartons de générique
+ Le générique complet se déroule à la fin du film. Reprise de
+ la musique leitmotiv. Coup de sonnette.
+
+
+
+
+
+
+
+ technical stage direction
+ 전문적 무대 지시
+ 技術性舞台指示
+ dirección técnica de escena
+ indication technique de mise en scène
+ Indicazioni i scena tecniche
+ describes a special-purpose stage direction that is not
+meant for the actors.
+ 배우들에 지시하는 것이 아니라, 특별한 목적의 무대 지시를 기술한다.
+ 描述一個具有特殊目的,但並非針對演員的舞台指示。
+ describe una indicación de escena particular que no se menciona para los personajes.
+ 役者以外に向けた,特別なト書きを示す.
+ indication technique particulière de mise en scène qui n'est pas
+ destinée aux acteurs.
+ descrive particolari indicazioni di scena non indirizzate agli attori.
+
+
+
+
+
+
+
+
+
+ categorizes the technical stage direction.
+ 전문적 무대 지시를 분류한다.
+ 技術性舞台指示類型
+ categoriza la dirección técnica de escena
+ 当該ト書きを分類する.
+ catégorise l'indication technique de mise en
+ scène.
+ classifica l'indicazione di scena tecnica.
+
+
+
+ a lighting cue
+ 조명 신호
+ 燈光提示
+ una señal de iluminación
+ 照明への指示.
+ signal lumineux.
+ un segnale luminoso
+
+
+ a sound cue
+ 음향 신호
+ 音效提示
+ una señal de sonido
+ 音響効果への指示.
+ signal sonore
+ un segnale sonoro
+
+
+ a prop cue
+ 소품 신호
+ 道具提示
+ una señal de apoyo
+ 小道具への指示.
+ indication d'accessoires
+ un battuta d'entrata
+
+
+ a blocking instruction
+ 연출 지시
+ 舞台調度指示
+ una instrucción de bloqueo
+ 振り付けの指示.
+ indication des marques.
+ un indicazione di arresto
+
+
+
+
+ performance
+ 연기
+ función
+ jeu
+ rappresentazione
+ points to one or
+ more performance elements documenting the performance or performances to which this
+technical direction applies.
+ 이러한 전문적 지시를 적용하는 연기를 명시한다.
+ 指出該技術性舞台指示適用於哪些演出中。
+ identifica la función o funciones para las cuales se aplica esta dirección técnica.
+ 当該ト書きの対象となる演技を特定する.
+ identifie la ou les représentations auxquelles
+ s'appliquent ces indications techniques.
+ identifica la messa in scena o le messe in scena a cui si applicano le indicazioni tecniche.
+
+
+
+
+
+
+ Red spot on his face
+
+
+
+
+ lumière rouge sur son visage
+
+
+
+
+ 紅光打在他臉上
+
+
+
+
+
+
Module for Performance TextsPerformance
+TextsPerformance texts
+Théâtre
+劇本
+Testi per performanceTextos de actuação舞台芸術モジュール
Transcriptions of Speech
General Considerations and Overview
Documenting the Source of Transcribed Speech
+ script statement
+ déclaration du script
+ 스크립트 진술
+ 腳本陳述
+ Erklärung zum Skript
+ declaración del guión
+ dichiarazione sul copione
+ contains a citation giving details of the script used for
+a spoken text.
+ contient une citation donnant des détails sur le script à l’origine de la parole. [le terme script est entendu au sens large dans ce document comme tout texte préparatoire à une prise de parole (discours politique, sermon, interview, allocution, conférence, émission, etc.)].
+ 구어 텍스트에 사용되는 스크립트의 상세 항목을 제시하는 인용을 포함한다.
+ 包含口說文本的來源腳本相關細節。
+ 発話テキストで使われている台本の詳細に関する引用を示す.
+ enthält einen Zitatbeleg
+ mit Angaben zum Skript, das für die Aufnahme eines gesprochenen
+ Texts genutzt wurde
+ contiene una citación que indica las peculariedades del guión usado en un texto hablado.
+ contiene una citazione con i dettagli del copione utilizzato per un testo orale
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Craig Warner
+ Strangers on a Train
+ Based on the novel by Patricia Highsmith
+ French's acting edition
+ 978 0 573 01972 2
+ Samuel French Ltd
+
+
+
+
+
+
+
+
+
+
+ recording statement
+ déclaration d'enregistrements
+ 녹음 진술
+ 影音陳述
+ Erklärung zur Aufnahme
+ declaración de grabación
+ dichiarazione sulla registrazione
+ describes a set of recordings used as the basis for transcription of a
+spoken text.
+ décrit un ensemble d’enregistrements utilisés pour la transcription de la parole.
+ 구어 텍스트 전사의 기반으로 사용된 녹음 집합을 기술한다.
+ 當所轉錄的口說文本來源為影音檔案時,在此描述影音錄製的相關資訊。
+ 発話テキストの転記の元になる録音,録画されたものを示す.
+ beschreibt einen Satz von
+ Aufnahmen, die für die Transkription eines gesprochenen Texts
+ verwendet wurden.
+ describe la serie de grabaciones utilizadas como la base de transcripción de un texto hablado.
+ descrive l'insieme delle registrazioni usate nella trascrizione di un testo orale.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Location recording by
+ Sound Services Ltd.
+
+
+
Multiple close microphones mixed down to stereo Digital
+ Audio Tape, standard play, 44.1 KHz sampling frequency
+
+ 12 Jan 1987
+
+
+
+
+
+
+
+
Three
+distinct recordings made by hidden microphone in early February
+2001.
+
+
+
+
+
+
+
+
+ recording event
+ enregistrement
+ 녹음 사건
+ 影音錄製
+ Aufnahmevorgang
+ acontecimiento de grabación
+ registrazione
+ provides details of an audio or video recording event
+used as the source of a spoken text, either directly or from
+a public broadcast.
+ décrit en détail l’événement audio ou vidéo utilisé comme source de la parole transcrite, que ce soit un enregistrement direct ou une émission diffusée.
+ 구어 텍스트 원본으로 사용된 ,직접 또는 공공 방송에서 입수한 오디오 또는 비디오 녹음 사건에 대한 상세 항목.
+ 包含口說文本的影像或聲音來源錄製細節,該來源可以是直接錄製或是經由公開播放的管道取得。
+ 発話テキストの元資料として使われる,直接または放送から事象を録音,録
+ 画したものの詳細を示す.
+ Angaben zur Ton- oder
+ Videoaufnahme, die als Quelle eines gesprochenen Textes dient und
+ entweder direkt aufgenommen wurde oder von einem öffentlichen Sender
+ stammt.
+ detalla un acontecimiento de audio o video registrado usado como fuente de un texto hablado, no obtenido directamente ni de una emisión pública.
+ fornisce i dettagli di una registrazione audio o video usata come fonte di un testo orale, sia diretta sia da messa in onda pubblica.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ the kind of recording.
+ type de l’enregistrement.
+ 녹음 종류
+ 錄製類型
+ 録音,録画の種類.
+ Art der Aufnahme
+ tipo de grabación
+ tipo di registrazione.
+
+ audio
+
+
+ audio recording
+ enregistrement audio
+ 오디오 녹음
+ 聲音錄製
+ grabación de audio
+ 録音.
+ registrazione audio
+
+
+ audio and video recording
+ enregistrement audio et vidéo
+ 오디오와 비디오 녹화
+ 聲音及影像錄製
+ grabación de audio y video
+ 録音,録画.
+ registrazione audio e video
+
+
+
+
+
+
+
+
+
Recorded on a Sony TR444 walkman by unknown participants; remastered
+ to digital tape at Borehamwood Studios by
+ Transcription Services Inc.
+
+
+
+
+
+
+
+
Harmonia Mundi S.A., enregistré à Boughton Aluph Saints
+ Church, septembre 1977.
+
+
+
+
+
+
+
+
podcast
+
+
+
+ Questions sur la souffrance et la santé au travail : pénibilité, stress,
+ dépression, harcèlement, maladies et accidents...
+ France Inter
+
+ Présentateur
+ Alain Bédouet
+
+
+ Personne interrogée
+ Marie Pezé, Docteur en psychologie, psychanalyste, expert judiciaire ; dirige
+ la consultation « souffrance et travail » à l’Hôpital de Nanterre (92), auteure de
+ ils ne mourraient pas tous mais tous étaient frappés, Editions
+ Pearson.
+
+
+ Le Téléphone sonne
+
+ Première diffusion le mercredi 24 septembre
+ 2008
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Interview on foreign policy
+ BBC Radio 5
+
+ interviewer
+ Robin Day
+
+
+ interviewee
+ Margaret Thatcher
+
+
+ The World Tonight
+
+ First broadcast on
+ 27 Nov 89
+
+
+
+
+
+
+
+
The dur attribute is used to indicate the original
+ duration of the recording.
+
+
+
+
L'attribut dur est employé pour indiquer la durée originale de
+ l'enregistrement.
+
+
+
+ 属性durは,当該録音,録画の,元の長さを示すために使用さ
+ れる.
+
+
+
+
+
+
+
+
+ matériel
+ provides technical details of the equipment and media used for
+an audio or video recording used as the source for a spoken text.
+ fournit des détails techniques sur les appareils et les supports servant à l’enregistrement audio ou vidéo utilisé comme source de la parole transcrite.
+ 구어 텍스트의 원본으로 사용된 오디오 또는 비디오 녹음에 동원된 장비 및 매체에 대한 기술적인 상세 항목을 제공한다.
+ 提供錄製設備及媒介的技術性細節,該設備及媒介用於口說文本來源之影像或聲音錄製。
+ 発話テキストを録音・録画する際に使用された機器や媒体の技術的詳細を示
+ す.
+ gibt die technischen
+ Details zu Geräteausstattung und Medien an, welche für die Ton- oder
+ Videoaufnahme als Quelle des gesprochenen Textes benutzt wurden
+
+ proporciona detalles técnicos sobre el equipo y los medios empleados para la grabación de un audio o video usados como fuente de un texto hablado.
+ fornisce dettagli tecnici sull'attrezzatura per una registrazione audio o video utilizzata quale fonte di un testo orale.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
"Hi-8" 8 mm NTSC camcorder with integral directional
+ microphone and windshield and stereo digital sound
+ recording channel.
+
+
+
+
+
+
+
+
Enregistreur numérique avec connexion USB et 512 Mo de mémoire intégrée
+
+
+
+
+
+
+
enregistreur numérique 16 pistes
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
內建麥克風、立體聲音響以及數位錄音聲道的"Hi-8" 的8釐米NTSC攝錄像機。
+
+
+
+
+
+
+
8-track analogue transfer mixed down to 19 cm/sec audio
+ tape for cassette mastering
+
+
+
+
+
+
+
+
+ diffusion
+ describes a broadcast used as the source of a spoken text.
+ décrit une émission utilisée comme source de la parole transcrite.
+ 구어 텍스트의 원본으로 사용된 방송에 대해 기술한다.
+ 描述口說文本的公開播送影音來源相關資訊。
+ 発話されたテキストの元となる放送を示す.
+
+ beschreibt eine Sendung,
+ die als Quelle eines gesprochenen Textes genutzt wird
+ describe la emisión usada como fuente de un texto escrito.
+ descrive una messa in onda utilizzata quale fonte di un testo orale.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Radio Trent
+ Gone Tomorrow
+
+ Presenter
+ Tim Maby
+
+
+ Producer
+ Mary Kerr
+
+ 12 June 89, 1230 pm
+
+
+
+
+
+
+
+
+ 中國廣播公司
+ 司馬中原說鬼故事
+
+ 主持人
+ 司馬中原
+
+
+ 主持人
+ 常勤芬
+
+ 1989年6月12日1230 pm
+
+
+
+
+
+
+
+
+
+ describes the set of transcription conventions used, particularly for spoken material.
+
+
+
+
+
+
+
+
+
+
+
+
+
+ supplies an identifier for the encoding convention, independent of any version number.
+
+
+
+
+
+ supplies a version number for the encoding conventions
+ used, if any.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Elements Unique to Spoken Texts
Utterances
Pausing
Vocal, Kinesic, Incident
Writing
Temporal Information
Shifts
+ utterance
+ 발화
+ 話語
+ énonciation
+ enunciado
+ enunciato
+ contains a stretch of speech usually preceded and followed by
+silence or by a change of speaker.
+ 일반적으로 침묵 또는 화자 바뀜에 의해 구분되는, 말의 연속체.
+ 一段言詞,通常在說話前後是一段沉默、或是另一個人的說話。
+ 一般に沈黙または話者交替が前後する,発話の時間.
+ partie de discours généralement précédée et
+ suivie d'un silence ou d'un changement de locuteur.
+ fragmento de texto hablado precedido y seguido normalmente de un silencio o de un cambio de hablante
+ porzione di parlato solitamente preceduta e seguita da un silenzio o da un cambio di parlante
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ transition
+ 전이
+ transición
+ transizione
+ indicates the nature of the transition between this utterance
+ and the previous one.
+ 발화 사이의 전이적 특성을 나타낸다.
+ transition
+ 指出此段話語和前段話語之間轉變過程的特性。
+ 前の発話から当該発話への遷移(交替)の性質を示す.
+ indica la naturaleza de la transición entre un enunciado y el precedente.
+ indica la natura del passaggio tra questo enunciato e il precedente
+
+ smooth
+
+
+ this utterance begins without unusual pause or rapidity.
+ 발화가 일상적 휴지 또는 신속함 없이 시작된다.
+ 此段話語的開頭並無異常停頓或異常迅速。
+ esta elocución comienza sin la pausa inicial o con una rapidez inusual.
+ 当該発話は,変な間や急ぐことなく,始まる.
+ cette intervention commence avec une pause dont la durée n'est pas inhabituelle
+ l'enunciato comincia senza pause o accelerazioni insolite
+
+
+ this utterance begins with a markedly shorter pause than normal.
+ 발화가 평소보다 두드러지게 짧은 휴지와 더불어 시작한다.
+ 此段話語開頭的停頓明顯比平常要短。
+ esta elocución comienza con una pausa marcada más corta de lo normal.
+ 当該発話は,普通より短い間に続けて,始まる.
+ Cette intervention commence par une
+pause manifestement plus courte que la normale
+ l'enunciato comincia con una pausa nettamente più breve del normale
+
+
+ this utterance begins before the previous one has finished.
+ 이전 발화가 끝나기 전에 발화가 시작한다.
+ 此段話語在前一段還未結束前就開始。
+ esta elocución comienza antes de que la anterior haya acabado.
+ 当該発話は,以前の発話が終わる前に,始まる.
+ Cette intervention commence avant que
+la précédente ne soit finie
+ l'enunciato comincia prima che sia terminato quello precedente
+
+
+ this utterance begins after a noticeable pause.
+ 현저한 휴지 이후에 발화가 시작한다.
+ 此段話語在一段明顯的停頓之後開始。
+ esta elocución comienza después de una pausa notable.
+ 当該発話は,目立った間に続けて,始まる.
+ cette intervention commence après une
+pause considérable
+ l'enunciato comincia con una pausa notevolmente lunga
+
+
+
+
+
+
+ if did you set
+ well Joe and I set it between us
+
+
+
+
+
+
+
+
+ si tu te déplaçais
+ Joe et moi l'aurions mis entre nous
+
+
+
+
+
+
+
+
+ 假如你真的決定
+ ...我和小文會在我們之間做個決定
+
+
+
+
+
+
+
+
Prose and a mixture of speech
+elements
+
Although individual transcriptions may consistently use
+u elements for turns or other units, and although in most
+cases a u will be delimited by pause or change of speaker,
+u is not required to represent a turn or any communicative
+event, nor to be bounded by pauses or change of speaker. At a minimum,
+a u is some phonetic production by a given speaker.
+
+
+
Prose et combinaison d'éléments pour la transcription de l'oral
+
Bien que certaines transcriptions emploient systématiquement des éléments u
+ dans le cas de tours de parole ou pour d'autres unités linguistiques, et bien que dans la
+ plupart des cas un élément u soit délimité par une pause ou par un
+ changement de locuteur, l’élément u ne représente pas obligatoirement un tour de parole ou tout autre événement de communication, et n'est pas nécessairement
+ limité par des pauses ou par un changement de locuteur. A minima,
+ l’élémentu peut être un phonème émis par un locuteur donné.
+
+
+
+
+
+ pause
+ marks a pause either between or within utterances.
+ 발화들 사이 또는 발화들 내에서의 휴지
+ 說話之間或說話時的停頓。
+ 発話にある間を示す.
+ une pause entre énonciations ou bien à
+ l'intérieur d'énonciations.
+ una pausa al interno de un enunciado o entre un enunciado y otro.
+ pausa all'interno di un enuciatiato o tra un enuciato e l'altro
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ élément vocal
+ marks any vocalized but not necessarily lexical phenomenon, for
+ example voiced pauses, non-lexical backchannels, etc.
+ 예를 들어 목소리가 담긴 휴지, 비어휘적 비정규적 경로 등과 같이 목소리는 나지만 어휘적 현상은 아닌 것.
+ 發出聲音但未必是詞彙的話語,例如有聲的停頓、非詞彙的附應等。
+ 音声化されているが,必ずしも単語化される必要はない現象を示す.例えば,
+ 有声の間,単語化されない相づち,など.
+ tout phénomène vocalisé mais pas nécessairement
+ lexical, par exemple des pauses vocales, des réactions non lexicales, etc.
+ cualquier fenómeno vocal pero no necesariamente verbal, como pausa plena, backchannel no verbales, etc.
+ qualsiasi fenomeno vocale ma non necessariamente verbale, come pause piene, backchannel non verbali, ecc.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ indicates whether or not the phenomenon is repeated.
+ 반복 현상 여부를 나타낸다.
+ 指出該現象是否重複發生。
+ 当該現象は繰り返されるものかどうかを示す.
+ indique si le phénomène est ou non
+ répété.
+ indica si el fenómeno es eventual o si se repite.
+ indica l'eventuale ripetizione del fenomeno
+
+ false
+
+
The value true indicates that the vocal effect
+ is repeated several times rather than just occurring once.
+
+
+
La valeur true signale que l'effet vocal est répété plutôt
+ qu'unique.
+
+
+
+ 値trueは,音声が複数回繰り返されることを示す.
+
+
+
+
+
+
+
+ whistles
+
+
+ whistles intermittently
+
+
+
+
+
+
+ sifflements
+
+
+ sifflements intermittents
+
+
+
+
+
+
+ 吹口哨
+
+
+ 斷斷續續地吹口哨
+
+
+
+
+
+
+
+ mouvement
+ marks any communicative phenomenon, not necessarily vocalized, for
+ example a gesture, frown, etc.
+ 예를 들어 제스처, 찡그림 등과 같이 의사소통적 현상이지만 반드시 목소리를 통한 것이 아닌 경우
+ 任何溝通現象,未必是口說表達,例如手勢、皺眉等。
+ コミュニケーション現象を示す.必ずしも言語化されている必要はない.例
+ えば,身振り,眉をひそめるなど.
+ tout phénomène de communication non
+ nécessairement vocalisé, par exemple un geste, une grimace, etc.
+ cualquier fenómeno comunicativo no necesariamente vocal, como gestos, mímica facial, etc.
+ qualsiasi fenomeno comunicativo non necessariamente vocale, come gesti, mimica facciale, ecc.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ indicates whether or not the phenomenon is
+ repeated.
+ 반복 현상 여부를 나타낸다.
+ 指出該現象是否重複發生。
+ 当該現象が繰り返されるかどうかを示す.
+ indique si le phénomène est ou non
+ répété.
+ indica si el fenómeno es eventual o si se repite.
+ indica l'eventuale ripetizione del fenomeno
+
+ false
+
+
The value true indicates that the kinesic is
+ repeated several times rather than occurring only once.
+
+
+
La valeur true indique que les éléments de communication non
+ verbaux sont répétés plutôt qu'uniques.
+
+
+
+ 値trueは,当該動作が,1回ではなく,何回か繰り返され
+ ることを示す.
+
+
+
+
+
+
+
+ nodding head vigorously
+
+
+
+
+
+
+ hochant la tête vigoureusement
+
+
+
+
+
+
+ 精力旺盛地點頭
+
+
+
+
+
+
+
+ incident
+ marks any phenomenon or occurrence, not necessarily vocalized or
+communicative, for example incidental noises or other events affecting
+communication.
+ 예를 들어 일시적인 소음 또는 의사소통에 영향을 미치는 다른 사건과 같이, 현상 또는 발생이지만 반드시 목소리나 의사소통을 수반하지는 않는다.
+
+ 必ずしも言語化またはコミュニケーションには上らない現象や出来事を示す.
+ 例えば,偶発的な雑音またはコミュニケーションに影響を与える他の事象な
+ ど.
+
+ tout phénomène ou événement, non nécessairement
+ vocalisé ou destiné à la communication, par exemple des bruits fortuits ou d'autres
+ événements affectant la communication
+ cualquier fenómeno o evento no necesariamente vocal o comunicativo, como ruidos accidentales u otros fenómenos que inciden en la comunicación en acto.
+ qualsiasi fenomeno o evento non necessariamente vocale o comunicativo, come rumori accidentali o altri fenomeni che incidano sulla comunicazione in atto
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ ceiling collapses
+
+
+
+
+
+
+ La vitrine s'écroule dans un grand fracas.
+
+
+
+
+
+
+ 天花板崩塌
+
+
+
+
+
+
+
+ texte écrit
+ contains a passage of written text revealed to participants in the
+ course of a spoken text.
+ 구어 텍스트의 진행과정에서 참여자에게 제공되는 문어 텍스트 단락
+ 在口說的過程中,參與者可觀看的一段書面文字。
+ 発話テキストで参加している表す,書き起こしテキストの一節を示す.
+ fragment d'un texte écrit communiqué aux
+ participants au cours du discours objet de la transcription.
+ pasaje escrito hecho disponible para los participantes durante un texto dialogado.
+ testo scritto reso disponibile durante un testo parlato
+
+
+
+
+
+
+
+
+
+
+
+
+
+ indicates whether the writing is revealed all at once or
+ gradually.
+ 글이 동시에 또는 점차적으로 드러나는지를 나타낸다.
+ 指出該書面文字是一次全部出現或逐步出現
+ 当該書き起こしは一度に見られるか,または少しずつ見られるものかを示す.
+ indique si l'écrit est communiqué en une
+ fois ou progressivement.
+ indica si el texto escrito aparece de repente o gradualmente.
+ indica se il testo scritto appare in un'unica soluzione o gradualmente
+
+
+
The value true indicates the writing is
+ revealed gradually; the value false that the
+ writing is revealed all at once.
+
+
+
La valeur true indique que le texte écrit est transmis
+ progressivement, la valeur false que le texte écrit est transmis
+ en une fois.
+
+
+
+
+
+
+ man in a coonskin cap
+ coonskin
+ in a pig pen
+ pig pen
+ wants eleven dollar bills
+ 20 dollar bills
+ you only got ten
+ 10
+
+
+
+
+
+
The writing element will usually be short
+ and most simply transcribed as a character string; the content
+ model also allows a sequence of paragraphs and paragraph-level
+ elements, in case the writing has enough internal structure to
+ warrant such markup. In either case the usual phrase-level
+ tags for written text are available.
+
+
+
l'élément writing sera habituellement court et transcrit simplement comme
+ une chaîne de caractères ; le modèle de contenu autorise aussi une suite de
+ paragraphes et d'éléments de niveau paragraphe, dans le cas où la structure du texte écrit
+ justifie un tel codage. Dans l'un ou l'autre
+ cas, les balises du niveau expression utilisables pour le texte écrit sont
+ disponibles.
+
+
+
+
+
+ changement
+ marks the point at which some paralinguistic feature of a series of
+utterances by any one speaker changes.
+ 한 화자의 일련의 발화의 준언어적 특성이 변화는 시점을 표시한다.
+ 所標記的位置表示任一說話者在一連串說話中,某些附屬語言特性的改變。
+ 発話者による一連の発話(パラ言語)素性が変化する場所を示す.
+ indique le point où une caractéristique
+ paralinguistique change dans la série d'énonciations d'un même locuteur.
+ señala el punto en que un fenómeno paralingüístico de una serie de enunciados producidos por uno de los hablantes cambia estado.
+ segnala il punto in cui un fenomeno paralinguistico di una serie di enunciati prodotti da uno dei parlanti cambia stato
+
+
+
+
+
+
+
+
+
+The @new attribute should always be supplied; use the special value
+"normal" to indicate that the feature concerned ceases to be
+remarkable at this point.
+
+
+
+
+ a
+paralinguistic feature.
+ 준언어적 자질
+ 附屬語言特性
+ 発話(パラ言語)素性.
+ caractéristique paralinguistique.
+ enunciado paralingüístico
+ fenomeno paralinguistico
+
+
+
+ speed of utterance.
+ 발화 속도
+ 說話速度
+ velocidad de elocución.
+ 発話の速さ.
+ vitesse d'énonciation
+ velocità di elocuzione
+
+
+ loudness.
+ 소리 크기
+ 音量
+ intensidad.
+ 大きさ.
+ volume
+ volume
+
+
+ pitch range.
+ 음 높이 범위
+ 音調範圍
+ entonación
+ 音の高さ.
+ hauteur de ton
+ tono
+
+
+ tension or stress pattern.
+ 긴장 또는 강세 유형
+ 張力或強調模式
+ tensión o estrés.
+ 声の張りやアクセントパタン.
+ intensité ou accentuation
+ accento
+
+
+ rhythmic qualities.
+ 억양 특성
+ 節奏品質
+ calidades rítmicas.
+ リズム性.
+ qualité du rythme
+ ritmo
+
+
+ voice quality.
+ 목소리 특성
+ 聲音品質
+ calidad de voz.
+ 声質.
+ qualité de voix
+ qualità della voce
+
+
+
+
+ specifies the new state of the paralinguistic feature specified.
+ 명시된 준언어적 자질의 새로운 상태를 명시한다.
+ 說明改變後的附屬語言特性狀況。
+ 発話(パラ言語)素性の,新しい状態を示す.
+ précise le nouvel état de la
+ caractéristique paralinguistique en question.
+ especifica el nuevo estado del fenómeno paralingüístico especificado.
+ specifica il nuovo stato del fenomeno paralinguistico specificato
+
+ normal
+
+
Some possible values for this attribute are provided in section . The special value normal should be used to
+ indicate that the feature concerned ceases to be remarkable at this point. In earlier versions of these Guidelines, a null value for this attribute was understood to have the same effect: this practice is now deprecated and will be removed at a future release.
+
+
+
+
Si aucune valeur n'est spécifiée, on suppose que le trait concerné cesse
+ d'être remarquable. La valeur normal a le même effet.
+
+
+
+
+
+
+ Elizabeth
+ Yes
+ Come and try this
+ come on
+
+
+
+
+
+
+
The word Elizabeth is spoken loudly, the words Yes and
+Come and try this with normal volume, and the words come on
+very loudly.
+
+
+
+ Non ! ... Ne bougez pas. N'allumez pas !
+ Florence ?
+ Oui, ... n'allumez pas surtout ! Ma lettre, ... ça vous ennuie de me la restituer ?
+
+
+
+
+
+
+
+
+ 伊莉莎白
+ 是的
+ 來把這穿上
+ 好嘛
+
+
+
+
+
+
+
+
+
+
+
Elements Defined Elsewhere
Segmentation
Synchronization and Overlap
Regularization of Word Forms
Prosody
Speech Management
Analytic Coding
Module for Transcribed Speech
+Transcribed Speech
+Transcribed Speech
+Transcriptions de la parole
+轉錄的言詞
+Trascrizione del parlatoTranscrição do discurso発話モジュール
+ groups elements structurally analogous to paragraphs within spoken texts.
+ 구어 텍스트 내의 문단과 구조적으로 유사한 요소를 모아 놓는다.
+ 所匯集的元素僅出現在口說文件的組成層次。
+ 発話テキスト中にある,構造上段落と類似する要素をまとめる.
+ regroupe des éléments structurellement analogues aux
+ paragraphes dans des textes contenant de la parole transcrite.
+ agrupa los elementos que aparecen a nivel de componente
+ específicamente en los textos dialogados.
+ comprende gli elementi a livello di componente specifici
+ dei testi parlati
+
+
+
+
+
Spoken texts may be structured in many ways; elements in this class are typically larger
+ units such as turns or utterances.
+
+
+
Les textes contenant de la parole transcrite peuvent être structurés de plusieurs façons; les
+ éléments de cette classe sont habituellement des unités plus grandes, comme des tournures ou
+ des énoncés.
+
+
+
+
+
+
+ groups together various annotations, e.g.
+ for parallel interpretations of a spoken segment.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Yeah
+
+
+
+
+
+
+ Mhm
+
+
+
+
+
+
+
+
+
Dictionaries
Dictionary Body and Overall Structure
+ groups elements structurally analogous to paragraphs within dictionaries.
+ 사전 내에서 문단과 구조적으로 유사한 요소들을 모아 놓는다.
+ 匯集字典的基礎標籤組所獨有的元件層次元素。
+ 辞書において,構造上段落に相当する要素をまとめる.
+ regroupe des éléments structurellement analogues aux
+ paragraphes dans des dictionnaires.
+ agrupa los elementos componentes de nivel que son
+ exclusivos del conjunto de la etiqueta base para diccionarios.
+ raggruppa quegli elementi a livello di componenti
+ esclusivi per l'insieme di marcatori per dizionari.
+
+
+
+
+
+
+
+
+ provides an attribute used to distinguish
+ different styles of dictionary entries.
+ 사전 표제 항목의 다른 형식을 모아 놓는다.
+ 匯集不同格式的字典辭條
+ 辞書項目,各種スタイルをまとめる.
+ regroupe les différents types d’entrées de dictionnaire.
+ agrupa las diferentes modalidades de entradas de
+ diccionarios
+ raggruppa differenti stili di voci di dizionario.
+
+
+ indicates type of entry, in dictionaries with multiple types.
+ 다중 유형을 포함하는 사전에서, 표제 항목 유형을 나타낸다.
+ 指出複合類型字典中的辭條類型。
+ 辞書項目の種類を示す.
+ dans des dictionnaires multi-types, indique le type
+ d'entrée
+ indica el tipo de entrada en diccionarios que
+ contienen de diferentes tipos.
+ indica il tipo di voce, nei dizionari con tipi
+ multipli.
+
+ main
+
+
+ a main entry (default).
+ 주 표제 항목 (기본값).
+ 主要辭條 (預設) 。
+ una entrada principal (valor por defecto).
+ 主項目(デフォルト値).
+ une entrée principale (par défaut)
+ una voce principale (valore predefinito).
+
+
+ homograph
+ 동형이의어
+ homographe.
+ omografo
+ un homógrafo con una entrada separada
+ groups information relating to one homograph within an entry.
+ 표제 항목 내에 하나의 동형이의어와 관련된 정보를 모아 놓는다.
+ 個別的同形義異字辭條。
+ agrupa la información referente a un homógrafo
+ dentro de una entrada.
+ 同綴異義語に関する情報をまとめる.
+ regroupe des informations relatifs à un
+ homographe dans une entrée.
+ un omografo con una voce separata.
+
+
+ cross reference
+ 교차 참조
+ référence croisée
+ riferimento incrociato
+ una breve entrada cuya única función es apuntar
+ a otra entrada principal (p.ej. para formas de un verbo irregular o para otras variantes
+ ortográficas: was señala a be, o
+ esthete a aesthete).
+ a reduced entry whose only function is to point to another main
+ entry (e.g. for forms of an irregular verb or for variant spellings:
+ was pointing to be, or
+ esthete to aesthete).
+ 다른 주 표제 항목을 지시하는 기능만을 수행하도록 제한된 표제 항목(예를 들어, 불규칙
+ 동사형 또는 다양한 철자법; be를 지시하는 was, 또는
+ aesthete를 지시하는 esthete
+
+ 縮減的辭條,其唯一作用為指向另一個主要辭條 (例如不規則動辭形式或不同拼法的字)
+ una entrada reducida cuya única función es la de
+ señalar otra entrada principal (p.ej. para las formas de un verbo irregular o para los
+ deletreos variables: era señala a es, o
+ esthete a esteta).
+ 相互参照.主項目への参照.例えば,不規則変化動詞の場合には,
+ wasからbeを参照
+ したり,異なる綴りの場合には,estheteか らaestheteを参照する.
+ courte entrée qui ne sert qu’à pointer vers une entrée principale (par exemple, pour les formes d'un verbe irrégulier ou pour des variantes orthographiques :
+ était pointant vers être, ou
+ clef pointant vers clé).
+ una voce ridotta la cui sola funzione è di
+ indirizzare ad una voce principale (ad esempio per le forme di un verbo irregolare o per
+ varianti ortografiche: was che indirizza a
+ be, o esthete per
+ aesthete).
+
+
+ an entry for a prefix, infix, or suffix.
+ 접미사, 접요사, 또는 접미사 표제 항목
+ 字首、字中或字尾的辭條
+ una entrada para un prefijo, un infijo, o un
+ sufijo.
+ 接頭辞,接中辞,接尾辞を示す.
+ entrée pour un préfixe, un infixe ou un suffixe.
+ una voce per un prefisso, infisso o
+ suffisso.
+
+
+ abbreviation
+ 생략형
+ abréviation.
+ abbreviazione
+ una entrada para una abreviatura
+ an entry for an abbreviation.
+ 생략형에 대한 표제 항목
+ 縮寫辭條
+ una entrada para una abreviatura.
+ 省略を示す.
+ entrée pour une abréviation.
+ una voce per un'abbreviazione.
+
+
+ a supplemental entry (for use in dictionaries which issue supplements to their main
+ work in which they include updated information about entries).
+ (표제 항목들에 대한 업데이트 정보를 포함하는 보충판을 발행하는 사전에서 사용되는) 보충
+ 표제 항목
+ 補充辭條 ()
+ una entrada suplementaria (para el uso en
+ diccionarios que presentan una edición complementaria al trabajo principal, en el cual
+ la cual se incluye la información actualizada sobre las entradas).
+ 補遺を示す.例えば,項目情報を更新するような補遺が出されてい た場合に使用する.
+ entrée supplémentaire (utilisée dans les
+ dictionnaires qui publient des suppléments contenant des informations mises à jour sur
+ des entrées).
+ una voce supplementare (in uso nei dizionari che
+ pubblicano supplementi alle opere principali in cui includono informazioni aggiornate
+ sulle voci).)
+
+
+ an entry for a foreign word in a monolingual dictionary.
+ 단일어 사전에서 외래어 표제 항목
+ 單語字典中的外來語辭條。
+ una entrada para una palabra extranjera en un
+ diccionario monolingüe.
+ 単一言語による辞書において,外国語を示す.
+ entrée pour un mot étranger dans un dictionnaire
+ monolingue.
+ una voce per una parola starniera in un
+ dizionario monolingue.
+
+
+
+
+
+
The global n attribute may be used to encode the homograph numbers attached to
+ entries for homographs.
+
+
+
Pour des homographes, l'attribut global npeut être utilisé pour encoder des
+ numéros d'homographes attachés aux entrées.
+
+
+
グローバル属性nを使い,同綴異義語の番号としてもよい.
+
+
+
+
+
+
+ provides a set of attributes common to all elements in the dictionary module.
+ 사전용 기본 태그 세트의 요소에서 이용 가능한 전반적 속성들의 집합을 정의한다.
+ 定義一組全域屬性值,可用於字典的基礎標籤組之元素上。
+ 辞書向けのタグ集合にある要素に付与可能な,グローバル属性を定義する.
+ définit un ensemble d'attributs globaux disponibles pour les éléments appartenant à l'ensemble des balises de base dédié aux dictionnaires.
+ define el conjunto de atributos globales posibles para los elementos del conjunto de etiquetas base para diccionarios
+ definisce un insieme di attributi globali disponibili per gli elementi dell'insieme base di marcatori per i dizionari.
+
+
+
+
+
+ développé
+ gives an expanded form of information presented more concisely in the dictionary
+ 사전에서 더 간결하게 제시된 정보의 확장형을 제시한다.
+ 提供一形式擴充的資訊,其以較簡潔的方式呈現於字典中
+ 辞書中では簡易表記されているものの完全記述を示す.
+ donne une forme développée de l'information présentée de manière plus concise dans le dictionnaire.
+ proporciona de manera expandida la información presentada brevemente en el diccionario
+ fornisce la forma estesa dellel informazioni presentate in modo più coinciso nel dizionario.
+
+
+
+
+ n
+
+
+
+
+
+
+ n.
+
+
+
+
+
+ normalized
+ 표준화
+ normalizado
+ normalisé
+ normalizzato
+ gives a normalized form of information given by the source text in a
+ non-normalized form
+ 비표준형으로 원본 텍스트에서 제시된 정보의 표준형을 제시한다.
+ 提供一規格化形式的資訊,其來源文件為非規格化形式
+ 当該テキストを,正規形を示す.
+ donne une forme normalisée de
+ l'information fournie par le texte source sous une forme non normalisée.
+ proprorciona de manera normalizada información dada en el texto fuente de manera no normalizada
+ fornisce la forma normalizzata delle informazioni contenute nel testo di origine in forma non normalizzata.
+
+
+
+
+ n
+
+
+
+
+
+
+ n.
+
+
+
+
+
+ graphies distinctes
+ gives the list of split values for a merged form
+ 통합형에 대한 분리 값의 목록을 제시한다.
+ 提供一合併形式的split值列表
+ 構成部分をリストで示す.
+ donne la liste des valeurs distinctes d'une forme fusionnée.
+ proporciona una lista de valores de abertura para una forma fusionada
+ fornisce la lista dei valori suddivisi di una forma unita.
+
+
+
+ valeur
+ gives a value which lacks any realization in the printed source text.
+ 인쇄된 원본 텍스트에서 누락된 값을 제시한다.
+ 提供一個尚未在書面來源文件中呈現的屬性值
+ 印刷されているテキスト上では欠如している情報を示す.
+ indique une valeur qui manque à un quelconque fragment du texte source imprimé.
+ proporciona un valor que carece de cualquier realización en el texto fuente impreso
+ fornisce un valore privo di qualsiasi realizzazione nel testo di origine a mezzo stampa.
+
+
+
+ original
+ 원본
+ originale
+ gives the original string or is the empty string when the element does not appear
+ in the source text.
+ 원본 문자열을 제시하거나 요소가 원본텍스트에 나타나지 않을 때는 공백 문자열을 제시한다.
+ indique la chaîne originale ou contient une chaîne vide si l'élément n'apparaît pas dans le texte source.
+ 當該元素未出現於來源文件中,提供其原文字串或空白字串。
+ 元の文字列を示す.当該要素が元資料に無い場合には空になる.
+ da la serie original o la serie vacía cuando el elemento no aparece en el texto fuente
+ fornisce la stringa originale o la srtinga vuota quando l'elemento non compare nel testo di origine.
+
+
+
+ localisation
+ indicates an anchor element typically elsewhere in the document, but possibly in another document,
+ which is the original location of this component.
+ 문서의 다른 위치에서 이 성분의 원본 위치를 지시하는 anchor 요소에 대한 참조를 제공한다.
+ 參照到文件中的元素anchor,指出此元件的原文位置。
+ 当該要素の元の場所を特定する要素anchorへの参照を示す.
+ fournit une référence à un élément anchor se trouvant ailleurs dans le document TEI, pour indiquer la localisation de ce composant.
+ proporciona una referencia a un elemento anchor que aparece en algún punto del documento indicando la localización original de ese componente.
+ fornisce un riferimento per un elemento anchor in una altra porzione del documento indicando la localizzazione origiraria del componente.
+
+
+
+ fusionné
+ gives a reference to another element, where the original appears as a merged form.
+ 다른 요소에 대한 참조를 제시하며, 여기서 원본은 통합형이다.
+ proporciona una referencia a otro elemento, donde el original aparece como una forma combinada.
+ 元データが統合されて出現している,ある要素への参照を示す.
+ donne une référence à un autre élément, où
+l'original apparaît comme une forme fusionnée.
+ fa riferimento a un altro elemento, laddove quello originale si presenti come forma risultanteda una fusione
+
+
+
+ optional
+ 수의적
+ facultativo
+ facultatif
+ facoltativo
+ indicates whether the element is optional or not
+ 요소가 수의적인지 아닌지를 나타낸다.
+ 指出該元素是否必備
+ 当該要素が選択的かどうかを示す.
+ indique si l'élément est facultatif ou pas.
+ indica si el elemento es opcional o no.
+ indica se l'elemento è opzionale o meno.
+
+ false
+
+
+
+
+
+
The Structure of Dictionary Entries
Hierarchical Levels
+ groupe d'entrées
+ groups a sequence of entries within any kind of lexical resource, such
+ as a dictionary or lexicon which function as a single unit, for
+ example a set of homographs.
+ 동형이의어 집합의 연속된 표제 항목을 모아 놓는다.
+ 匯集一組同形異義字的連續辭條。
+ 同形異義語の集合にある,一連の項目をまとめる.
+ regroupe des entrées successives pour un ensemble
+ d'homographes.
+ agrupa las entradas sucesivas para una serie de homógrafos.
+ raggruppa voci successive per una serie di omografi.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ v
+ T1
+
+
+ to leave completely and for ever ...
+
+
+
+
+
+ n
+ U
+
+ the state when one's feelings and actions are uncontrolled; freedom from
+ control
+
+
+
+
+
+
+
+
+
+
+ n.
+
+
+ Etre appartenant à l'espèce animale la plus évoluée de la Terre
+
+
+
+
+
+ n.
+
+ Etre humain mâle et (le plus souvent) adulte.
+
+
+
+
+
+
+
+
+
+
+ 動詞
+ 及物
+
+
+ 輔助;矯正過失
+
+
+
+
+
+ 名詞
+ 可數
+
+ 古時矯正弓的器具
+
+
+
+
+
+
+
+
+ entrée
+ contains a single structured entry in any kind of lexical resource, such
+ as a dictionary or lexicon.
+ 합리적으로 체계화된 사전 표제 항목을 포함한다.
+ 包含字典中一個結構完善的辭條項目。
+ それなりに構造化されている辞書項目を示す.
+ contient une entrée structurée de dictionnaire.
+ contiene una entrada razonablemente bien estructurada.
+ contiene una voce di dizionario ragionevolmente ben
+ strutturata.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ n
+
+
+ facts that disprove something.
+
+
+ the act of disproving.
+
+
+
+
+
+
+
+
+
+ n.
+ m.
+
+ Jeune poulet, nouvellement sorti de l'oeuf, encore couvert de duvet. La poule
+ et ses poussins.
+ Zool. Jeune oiseau (par rapport aux adultes, aux parents).
+ (êtres humains) Fam. Terme d'affection (enfant).
+ Sports. Catégorie d'âge (9 ans) qui précède celle des benjamins.
+ Elève de première année dans certaines écoles (Air,
+ Aéronautique).
+
+
+
+
+
+
+
+
+
+ 名詞
+
+
+ 可靠的證據或事實
+
+
+ 用可靠的證據或事實來表明或斷定人或事物的真實性。
+
+
+
+
+
+
Like all elements, entry inherits an xml:id attribute from the class
+ global. No restrictions are placed on the method used to construct
+ xml:ids; one convenient method is to use the orthographic form of the headword,
+ appending a disambiguating number where necessary. Identification codes are sometimes included
+ on machine-readable tapes of dictionaries for in-house use.
+
It is recommended to use the sense element even for an entry that has only one sense
+ to group together all parts of the definition relating to the word sense since this leads to
+ more consistent encoding across entries.
+
+
+
Comme tous les éléments, entry hérite d'un attribut xml:id issu de la
+ classe global. Aucune restriction n'est donnée quant à la méthode utilisée pour
+ construire les xml:id ; une méthode commode consiste à utiliser la forme
+ orthographique de l'entrée en y ajoutant un nombre si nécessaire, pour éviter toute ambiguïté.
+ Pour un usage interne, des codes d'identification sont parfois inclus sur les enregistements
+ électroniques des dictionnaires.
+
+
+
+
+
+
+ unstructured entry
+ 구조화되지 않은 표제 항목
+
+ entrada no estructurada
+ entrée libre
+ voce non strutturata
+ contains a single unstructured entry in any kind of lexical
+ resource, such as a dictionary or lexicon.
+ entry 요소에 의해 부과된 제약에 반드시 부합할 필요 없는 사전 표제 항목을 포함한다.
+ 所包含的辭條項目未必符合元素entry該有的限制條件。
+ 要素entryにある制約に必ずしも従わない辞書項目を示す.
+ contient une entrée de dictionnaire qui ne se
+ conforme pas nécessairement aux contraintes imposées par l’élément
+ entry.
+ contiene una entrada de diccionario no necesariamente conforme con las restricciones impuestas por el elemento entry (entrada).
+ contiene una voce di dizionario non necessariamente conforme ai vincoli imposti dall'elemento entry.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ biryani or biriani
+ (%bIrI"A:nI)
+ any of a variety of Indian dishes ...
+ [from Urdu]
+
+
+
+
+
+
+
+ n.
+ f.
+ Grand crustacé marin (Décapodes macroures) aux pattes antérieures dépourvues
+ de pinces, aux antennes longues et fortes, et dont la chair est très appréciée.
+ Fig. et fam. (vulg.). Femme, maîtresse.
+ XIIIe ; languste, v. 1120, «sauterelle»; encore dans Corneille (Hymnes, 7) ; anc.
+ provençal langosta, altér. du lat. class. locusta «sauterelle».
+
+
+
+
+
+ 折羅 或 遮羅
+ zhe2 luo2
+ Cālā (人名)
+ 音譯自 梵文
+
+
+
+
+
+
May contain any dictionary elements in any combination.
+
+
+
Peut contenir n'importe quels éléments du dictionnaire dans n'importe
+ quel ordre.
+
+
+
+ あらゆる組み合わせの辞書要素が含まれる.
+
+
+
+
+
+
+
+ homograph
+ 동형이의어
+ 同形義異字
+ homographe
+ homógrafo
+ omografo
+ groups information relating to one homograph within an entry.
+ 하나의 표제 항목 내에서 하나의 동형이의어와 관련된 정보들을 모아 놓는다.
+ 匯集辭條中一個同形義異字的相關資訊。
+ 項目中にあるひとつの同綴異義語に関する情報をまとめる.
+ regroupe les informations relatives à un
+ homographe dans une entrée.
+ agrupa información relativa a un homógrafo dentro de una entrada.
+ raggruppa le informazioni attinenti a un omografo all'interno di una voce.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ n
+
+ cry of an ass; sound of a trumpet.
+
+
+
+ vt
+ VP2A
+
+ make a cry or sound of this kind.
+
+
+
+
+
+
+
+
+
+
+ n
+ m.
+
+ Pièce d'artillerie servant à lancer des projectiles lourds.
+
+
+
+ n.
+ m.
+
+ Théol. Loi ecclésiastique.
+
+
+
+
+
+
+
+
+
+
+ 名
+
+ 軍階名;技藝優良的人。
+
+
+
+ 動詞
+ 及物
+
+ 統率軍隊
+
+
+
+
+
+
+
+
+ groups together all information relating to one word sense in a dictionary entry, for
+ example definitions, examples, and translation equivalents.
+ 하나의 사전 표제 항목에서 하나의 단어 의미와 관련된 모든 정보를 모아 놓는다. 예를 들어 정의,
+ 예문, 번역어
+ 匯集辭條中一個字義的所有相關資訊(定義、範例、翻譯等)。
+ 辞書項目にある単語の意味と関連する情報をまとめる.例えば,定義,用例, 翻訳など.
+ regroupe toutes les informations relatives à un des sens
+ d’un mot dans une entrée de dictionnaire (définitions, exemples, équivalents linguistiques,
+ etc.).
+ agrupa toda la información relativa al significado de una
+ palabra en una entrada de diccionario (definiciones, ejemplos, sinónimos, etc.)
+ raggruppa tutte le informazioni attinenti al senso di una
+ parola in una voce di dizionario (definizioni, esempi, equivalente traduttivo, ecc.)
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ gives the nesting depth of this sense.
+ 의미의 층위를 제시한다.
+ 說明該字義在辭條中的層次。
+ 当該意味情報の構造の深さを示す.
+ indique le niveau de ce sens dans la hiérarchie.
+ la profundidad de anidamiente
+ fornisce il grado di nidificazione del senso
+
+
+
+
+
+
+ Vx.
+ Vaillance, bravoure (spécial., au combat)
+
+ La valeur n'attend pas le nombre des années
+
+ Corneille
+
+
+
+
+
+
+
+
+ Vx.
+ Vaillance, bravoure (spécial., au combat)
+
+ La valeur n'attend pas le nombre des années.
+
+ Corneille
+ Le Cid
+
+
+
+
+
+
+
+
+ 現代
+ 胭脂和香粉,舊時借指婦女
+
+ 那一年頌蓮留著齊耳的短髮,用一條天藍色的緞帶箍住,她的臉是圓圓的,不施脂粉,但顯得有點蒼白。
+
+ 蘇童
+
+
+
+
+
+
+
May contain character data mixed with any other elements defined in the
+ dictionary tag set.
+
+
+
Peut contenir des caractères combinés avec tout autre élément défini dans le
+ jeu de balises du dictionnaire.
+
+
+
辞書向けタグ集合で定義されている他の要素と文字データが混在するかも しれない.
+
+
+
+
+
+ dictionary scrap
+ 사전 발췌부
+
+ fragmento de diccionario
+ bloc d'informations
+ frammento di dizionario
+ encloses a part of a dictionary entry in which other phrase-level dictionary elements are
+ freely combined.
+ 다른 구-층위 사전 요소들이 자유롭게 결합된 사전 표제 항목의 부분을 포함한다.
+ 字典辭條的片段,包含自由組合的詞組層次字典元素。
+ 句レベルの辞書要素をとる辞書項目を示す.
+ contient la partie d'une entrée de dictionnaire
+ dans laquelle d'autres éléments de niveau "expression" sont librement associés.
+ engloba una parte de la entrada del diccionario en la que otros elementos de nivel sintagmático del diccionario se combinan de forma libre.
+ include una parte di una voce di dizionario in cui sono combinati liberamente altri elementi di dizionario a livello sintagmatico
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ biryani or biriani
+ (%bIrI"A:nI)
+ any of a variety of Indian dishes ...
+ [from Urdu]
+
+
+
+
+
+
+
+ cattleya ou catleya
+ [katleja]
+ Orchidée épiphyte, originaire d'Amérique tropicale, et dont l'espèce la plus connue
+ est très recherchée pour l'élégance de ses fleurs mauves à grand labelle en cornet
+ onduleux.
+ 1845 cattleye (BESCH.); 1893 cattleya (Gde Encyclop.). Lat. sc. cattleya, nom
+ donné par John Lindley, botaniste angl. (1799-1865) à un genre d'orchidées en hommage
+ au botaniste angl. W. Cattley (NED. Suppl.; DEI et Gde Encyclop.)
+
+
+
+
+
+
+
+ 折羅 或 遮羅
+ zhe2 luo2
+ Cālā (人名)
+ 音譯自 梵文
+
+
+
+
+
+
+
May contain any dictionary elements in any combination.
+
This element is used to mark part of a dictionary entry in which lower level dictionary
+ elements appear, but which does not itself form an identifiable structural unit.
+
+
+
peut contenir n'importe quels éléments de dictionnaire dans n'importe
+ quelle combinaison.
+
Cet élément est utilisé pour marquer la partie d'une entrée de dictionnaire dans
+ laquelle les éléments de dictionnaire de niveau inférieur apparaissent sans former
+ toutefois d'unité structurelle identifiable.
Information on Written and Spoken Forms
+ form information group
+ 형태 정보군
+ 形式資訊群
+ groupe d'informations sur une forme dans une entrée
+ grupo de información de forma
+ gruppo di informazioni sulla form
+ groups all the information on the written and spoken forms of one headword.
+ 하나의 표제어에 대한 문어와 구어 형태에 관한 모든 정보군
+ 匯集一個標題字在書寫及發音形式方面的所有資訊。
+ ひとつの見出し語の書記または発話形式の情報を全てまとめる.
+ regroupe toutes les informations relatives à la
+ morphologie et à la prononciation d'une entrée
+ agrupa toda la información relativa a la forma oral y
+ escrita de una palabra.
+ raggruppa tutte le informazioni sulle form scritte e
+ orali di un lemma
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ classifies form as simple, compound, etc.
+ 단일어, 복합어 등으로 형태를 분류한다.
+ 形式的類型有單一字彙、複合字等。
+ 単純形,複合形などに分類する.
+ qualifie la forme comme simple, composée, etc.
+ clasifica la forma como simple, compuesta, etc.
+ classifica la forma in simplice, composta, ecc.
+
+
+
+ single free lexical item
+ 단일 자립 어휘 항목
+ 單一字彙項目
+ elemento léxico libre
+ ひとつの語彙項目.
+ item lexical simple
+ una singola unità lessicale libera
+
+
+ the headword itself
+ 표제어 자체
+ 標題字本身
+ lema
+ 見出し語.
+ l'entrée proprement dite
+ il lemma
+
+
+ a variant form
+ 변이형
+ 變體形式
+ una variante de la forma principal
+ 異形.
+ variante
+ una variante
+
+
+ word formed from simple lexical items
+ 단일 어휘 항목들로 형성된 단어
+ 由不同單一字彙項目組成的複合字
+ palabra formada por elementos léxicos simples
+ ひとつの語彙項目から作られた単語.
+ mot formé d'items lexicaux simples
+ parola formata a partire da un'unità lessicale
+ semplice
+
+
+ word derived from headword
+ 표제어로부터 파생된 단어
+ 由標題字衍生出的派生詞
+ palabra derivada del lema
+ 見出し語から派生した単語.
+ mot dérivé de l'entrée
+ parola derivata da un lemma
+
+
+ word in other than usual dictionary form
+ 일반적 사전형과 다른 형태의 단어
+ 字尾有屈折變化的形式
+ palabra que aparece con una forma distinta de la
+ habitual en los diccionarios
+ 一般的な辞書の形式にはない単語.
+ mot dans une autre forme que la forme habituelle
+ du dictionnaire
+ parola in una forma diversa da quella solita del
+ dizionario
+
+
+ multiple-word lexical item
+ 다중어 어휘 항목
+ 多重字彙項目組成的片語
+ elemento léxico de palabras combinadas
+ 複合語である語彙項目.
+ item lexical à plusieurs mots
+ unità lessicale formata da più parole
+
+
+
+
+
+
+
+
+
(from TLFi)
+
+
+
+
+
+ Gendarme ottoman
+
+
+
+
+
+
+
+
+
+
+
+
+ orthographic form
+ 철자 형식
+ 拼字形式
+ forme orthographique
+ forma ortográfica
+ forma ortografica
+ gives the orthographic form of a dictionary headword.
+ 사전 표제어의 철자 형식을 제시한다.
+ 提供字典標題字的拼字形式。
+ 辞書の見出し語の正書形を示す.
+ donne l’orthographe d'un mot-vedette de dictionnaire
+ proporciona la forma ortográfica del lema de la entrada
+ del diccionario
+ fornisce la forma ortografica di un lemma.
+
+
+
+
+
+
+
+
+
+
+
+ gives the type of spelling.
+ 철자 유형을 제시한다.
+ 提供拼字的類型。
+ 当該綴りの種類を示す.
+ donne le type d’orthographe
+ indica el tipo de ortografía.
+ fornisce il tipo di trascrizione ortografica.
+
+
+
+ gives the extent of the orthographic information provided.
+ 제공된 철자 정보의 범위를 제시한다.
+ 顯示拼字資訊的完整程度。
+ 当該正書法の対象範囲を示す.
+ donne l'étendue des informations fournies sur
+ l'orthographe.
+ indica la extensión de la información ortográfica
+ proporcionada.
+ fornisce l'ampiezza di informazioni ortografiche
+ fornite.
+
+ full
+
+
+ full form
+ forme pleine
+ forma completa
+ forma completa
+
+
+ prefix
+ préfixe
+ prefisso
+ prefijo
+
+
+ suffix
+ suffixe
+ suffisso
+ sufijo
+
+
+ partial
+ partiel
+ parziale
+ parcial
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ pronunciation
+ 발음
+ 發音
+ prononciation
+ pronunciación
+ pronuncia
+ contains the pronunciation(s) of the word.
+ 단어의 발음을 포함한다.
+ 包含該字的一種或多種發音方法。
+ 当該語の発音を示す.
+ contient la/les prononciation(s) du mot
+ indica la pronunciación de la palabra.
+ contiene la pronuncia (le pronunicie) di una parola.
+
+
+
+
+
+
+
+
+
+
+
+
+ indicates whether the pronunciation is for whole word or part.
+ 발음이 전체 단어 또는 부분에 대한 것인지를 표시한다.
+ 指出該發音為完整或部分發音。
+ 当該発音が,語全体のものか,一部のものかを示す.
+ indique si la prononciation se rapporte au mot entier ou seulement à une partie
+ indica si se trata de la pronunciación de la palabra completa o de una parte.
+ indica se la pronuncia riguarda l'intera parola o una sua parte.
+
+ full
+
+
+ full form
+ forme pleine
+ forma completa
+ forma completa
+
+
+ prefix
+ préfixe
+ prefisso
+ prefijo
+
+
+ suffix
+ suffixe
+ suffisso
+ sufijo
+
+
+ partial
+ partiel
+ parziale
+ parcial
+
+
+
+
The values used to
+specify the notation may be taken from any appropriate project-defined
+list of values. Typical values might be IPA,
+Murray, for example.
+
+
+
+
+
+ hyphenation
+ 하이픈으로 연결하기
+ 連字符號
+ syllabation
+ uso del guión
+ utilizzo del trattino
+ contains a hyphenated form of a dictionary headword, or hyphenation information in some
+ other form.
+ 사전표제어의 하이픈 연결 형식 또는 다른 형식의 하이픈연결 정보를 포함한다.
+ 包含一個標題字的連字符號形式,或者以其他形式呈現的連字符號資訊。
+ 辞書の見出しにあるハイフン付き語形,または他の語形にあるハイフン情報 を示す.
+ contient une entrée de dictionnaire comportant des
+ marques de césure sous forme de traits d'union ou sous d'autres formes.
+ contiene alguna forma de uso del guión en el lema de una
+ entrada de diccionario, o información relativa al usa del guión.
+ contiene una forma del lemma separata da un trattino, o
+ informazioni sull'uso del trattino in qualche altra forma.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ syllabification
+ 음절 분리
+ 音節劃分
+ syllabisation
+ silabación
+ divisione in sillabe
+ contains the syllabification of the headword.
+ 표제어의 음절 분리 정보를 포함한다.
+ 包含標題字的音節劃分。
+ 見出し語の分節法を示す.
+ contient la syllabisation du mot-vedette.
+ contiene la silabación de un lema
+ contiene la divisione in sillabe del lemma
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 因漢字為一字一音節,故無法提供範例
+
+
+
+
+
+
+ accentuation
+ contains the stress pattern for a dictionary headword, if given separately.
+ 독립적으로 제시된다면, 사전 표제어에 대한 강세 유형을 포함한다.
+ 包含個別標明的標題字重音模式。
+ 切り出しが可能であれば,辞書の見出し語のアクセントパタンを示す.
+ contient le modèle d’accentuation d'une entrée de
+ dictionnaire, s’il est donné à part
+ contiene la entonación de un lema del diccionario, si se
+ da separadamente.
+ contiene la marcatura d'accento per un lemma, qualora sia
+ fornito separatamente
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Usually stress information is included within pronunciation information.
+
+
+
En règle générale les informations sur l'accentuation sont comprises dans les informations sur la prononciation.
+
+
+
+
+
+ grammatical information
+ 문법 정보
+ 文法資訊
+ information grammaticale
+ información gramatical
+ informazioni grammaticali
+ within an entry in a dictionary or a terminological data file, contains grammatical
+ information relating to a term, word, or form.
+ 사전 또는 전문용어 데이터 파일의 표제 항목 내부에 용어, 단어 또는 형태와 관련된 문법 정보를
+ 포함한다.
+ 在字典辭條或專有名詞檔案中,包含某一術語、單字或字彙形式的相關文法資訊。
+ 辞書や用語集のデータ中にある,用語,単語,形式に関する文法情報を示す.
+ contient de l'information grammaticale relative à un
+ terme, un mot ou une forme dans une entrée de dictionnaire ou dans un fichier de données
+ terminologiques.
+ dentro de una entrada de un diccionario, o en un archivo
+ de datos terminológicos, contiene información gramatical relativa al término, palabra o forma.
+ all'interno di una voce in un dizionario o di un file
+ terminologico, contiene informazioni relative a un termine, una parola o una forma.
+
+
+
+
+
+
+
+
+
+
+ classifies the grammatical information given according to some convenient typology—in
+ the case of terminological information, preferably the dictionary of data element types
+ specified in ISO 12620.
+ 다양한 유형에 따라 문법 정보를 분류한다. - 전문용어 정보의 경우 가급적 ISO WD 12
+ 620에서 명시한 데이터 요소 유형의 사전을 따른다.
+ 用合適的分類方法將不同的文法資訊加以分類-若是專門術語,可參照 ISO 12620
+ 所指定資料元素類別。
+ 当該文法情報の分類を示す.用語を示す場合,ISO 12620に従うこ とが望ましい.
+ classe l'information grammaticale fournie selon une
+ typologie particulière : dans le cas d'informations terminologiques, de préférence au moyen
+ du dictionnaire des types d'éléments de données spécifiés dans la norme ISO 12620.
+ clasifica la información gramatical dada de acuerdo a
+ una tipología funcional — en el caso de información terminológica, preferiblemente el
+ diccionario de tipos de elemento de datos se especifica en ISO 12620.
+ classifica le informazioni grammaticali secondo
+ un'appropriata tipologia - nel caso di informazioni terminologiche, preferibilmente il
+ dizionario di degli elementi specificati in ISO 12620.
+
+
+
+ part of speech
+ 품사
+ partie du discours (chacune des classes de mot
+ auxquelles un mot peut appartenir dans une langue donnée, en fonction de la forme, du
+ sens ou d'une combinaison de caractéristiques, par exemple nom, verbe, adjectif, etc.)
+ parte del discorso
+ parte del discurso (cualquiera de las categorías
+ de palabras que se puede encontrar en una lengua dada, basándose en la forma,
+ significado, o combinación de rasgos, p.ej. nombre, verbo, adjetivo, etc.)
+ any of the word classes to which a word may be assigned in a given language, based
+ on form, meaning, or a combination of features, e.g. noun, verb, adjective, etc.
+ 형식, 의미, 또는 자질 결합에 근거하여 단어가 제시된 언어에서 할당될 수 있는 단어
+ 부류, 예, 명사, 동사, 형용사 등
+ 詞性
+ (在已知語言中的詞性分類,根據字詞的形式、意義或特性組合而有所不同。例如名詞、動詞、形容詞等。)
+ cualquier clase de palabras a las que se puede
+ asignar una palabra en una lengua dada, basándose en la forma, significado, o una
+ combinación de las características, p.ej. sustantivo, verbo, adjetivo, etc.
+ 当該語に関する分類.形,意味,素性の組み合わせなどによる. 例えば,名詞,動詞,形容詞など.
+ toute catégorie grammaticale à laquelle un mot
+ peut être assigné dans une langue donnée, qui repose sur la morphologie, la sémantique,
+ ou une combinaison de mots du discours, par exemple le nom, le verbe, l'adjectif, etc.
+ parte del discorso (una qualsiasi delle classi a
+ cui una parola può essere assegnata in una data lingua, basata sulla forma, il
+ significato o una combinazione di tratti, ad esempio nome, verbo, aggettivo,
+ ecc.)
+
+
+ gender
+ 성
+ genre (classification formelle selon laquelle
+ les noms et pronoms et souvent les qualificatifs associés sont groupés et fléchis, ou
+ prennent une autre forme afin d'exprimer certaines relations syntaxiques)
+ genere
+ género (clasificación formal para nombres y
+ pronombres, y a menudo para modificadores que los acompañan, aparecen agrupados y
+ flexionan o cambian de forma del mismo modo, y permiten controlar las relaciones
+ sintácticas)
+ formal classification by which nouns and pronouns, and often accompanying modifiers,
+ are grouped and inflected, or changed in form, so as to control certain syntactic
+ relationships
+ 특정 통사적 관련성을 통제하기 위해, 명사와 대명사, 그리고 종종 동반 수식어의 그룹을
+ 나누는, 굴절 또는 형태 변화에 따른 형식적 분류
+ 性別
+ (名詞、代名詞、或伴隨的修飾詞透過這樣的規則系統在表現形式上被加以分組、或產生屈折變化,以展現特定的語法關係。)
+ clasificación formal para la cual los sustantivos
+ y los pronombres, y a menudo sus modificantes, son agrupados y jerarquiados, o variados
+ en la forma, para controlar enlaces sintácticos
+ 文法上の性.時に修飾詞を伴う名詞や代名詞がまとまり,屈折,す
+ なわち語形変形が行われ,ある統語的関係が示される.
+ classification formelle par lequel des noms et
+ des pronoms souvent avec des modificateurs, est groupée et conjuguée, ou changée
+ morphologiquement, afin de contrôler certaines relations syntaxiques
+ genere (classificazione formale secondo cui i
+ nomi e i pronomi, e spesso i modificatori che li accompagnano, sono raggruppati e
+ flessi, o cambiati di forma in modo da controllarne alcune relazioni sintattiche)
+
+
+ number
+ 수
+ nombre (par exemple singulier, pluriel, duel,
+ etc.)
+ numero
+ número (p.ej. individual, plural, dual, ...)
+ grammatical number, e.g. singular, plural, dual, …
+ 문법적 수. 예, 단수, 복수, 이중, …
+ 單複數 (例如單數、複數、雙數詞等)
+ número gramatical, p.ej. singular, plural, dual,…
+ 文法上の数.単数,複数,双数など.
+ nombre grammatical, par exemple singulier,
+ pluriel, duel, …
+ numero (ad esempio singolare, plurale, duale,
+ ecc.)
+
+
+ animate or inanimate
+ 유정 또는 무정
+ 活的或非活的
+ animado o inanimado
+ 生物,無生物.
+ animé ou inanimé
+ animato o inanimato
+
+
+ proper noun or common noun
+ 고유명사 또는 보통명사
+ 特定名稱或一般名詞
+ nombre propio o común
+ 固有名詞,一般名詞.
+ nom propre ou nom commun
+ nome proprio o nome comune
+
+
+
+
A much fuller list of values for the type
+ attribute may be generated from the data category registry
+ accessible from http://www.isocat.org and
+ maintained by ISO technical committee 37.
+
+
+
Une liste de valeurs beaucoup plus complète pour l'attribut type peut être
+ produite à partir du dictionnaire des types d'éléments de données en préparation sous la
+ référence ISO TC 37/SC 3/WD 12 620, Computational Aids in Terminology. Voir l'ISO 12620
+ pour plus de détails.
+
+
+
属性typeに付与される値の全リストは, ISO TC 37/SC 3が策定したWD 12620 Computational Aids in
+ Terminologyにあるデータ要素型から得られるだろう. 詳細は,ISO 12620 Computer applications in terminology -- Data
+ categoriews --を参照のこと.
+
+
+
+
+
+
+
+
+ noun
+ masculine
+
+
+
+
+
+
+
+
+
+ nom
+ masculin
+
+
+
+
+
+
+
+
+
+ 名詞
+ 陽性
+
+
+
+
+
+
+
+
+
+
+
+
+
+ gender
+ 성
+ 性別
+ genre
+ género
+ genere
+ identifies the morphological gender of a lexical item, as given in the dictionary.
+ 사전에 제시된 어휘항목의 형태론적 성을 표시한다.
+ 說明字彙項目的性別。
+ 辞書中の語彙項目にある文法形態素の性を示す.
+ identifie le genre morphologique d'un élément
+ lexical, tel qu'il est donné par le dictionnaire.
+ identifica el género morfológico de un elemento léxico, como viene dado en el diccionario.
+ identifica il genere morfologico di un'unità lessicale, secondo la modalità del dizionario.
+
+
+
+
+
+
+
+
+
+
+
+
+
+ noun
+ masculine
+
+
+
+
+
+
+
+
+
+ nom
+ masculin
+
+
+
+
+
+
+
+
+
+ 名詞
+ 陽性
+
+
+
+
+
+
May contain character data and phrase-level elements. Typical content
+ will be masculine, feminine,
+ neuter etc.
+
This element is synonymous with gram type="gender".
+
+
+
Contient des caractères et des éléments du niveau expression. Le
+ contenu type sera : masculin,
+ féminin, neutre, etc.
+
+
+
+
+
+
+ nombre
+ indicates grammatical number associated with a form, as given in a dictionary.
+ 사전에 제시된 형태와 관련된 문법적 수를 표시한다.
+ 指出單複數形式。
+ 辞書において,語形と関連する文法上の数を示す.
+ indique le nombre grammatical associé à une forme, telle
+ qu'elle est donnée par le dictionnaire.
+ indica el número gramatical asociado a una palabra, como
+ viene dado en el diccionario.
+ indica il numero grammaticale associato ad una forma,
+ secondo la modalità del dizionario.
+
+
+
+
+
+
+
+
+
+
+
+
+
+ pl
+ n
+
+
+
+
+
+
+
+
+
+ pl.
+ n.
+
+
+
+
+
+
+
+
+
+ 複數
+ 名詞
+
+
+
+
+
+
This element is synonymous with gram type="num".
+
+
+
Cet élément est synonyme de gram type="num".
+
+
+
当該要素は,gram type="num"と同義である.
+
+
+
+
+
+
+ cas
+ contains grammatical case information given by a dictionary for a given form.
+ 주어진 형식에 대하여 사전에 제시된 문법적 격 정보를 포함한다.
+ 包含文法上格的資訊。
+ 辞書中における格情報を示す.
+ contient des informations sur le cas grammatical
+ présenté par le dictionnaire pour une forme donnée.
+ contiene la información del caso gramatical.
+ contiene informazioni grammaticali sul caso fornite dal dizionario per una determinata froma.
+
+
+
+
+
+
+
+
+
+
Taken from Wörterbuch der Deutschen Sprache. Veranstaltet und herausgegeben von
+ Joachim Heinrich Campe. Erster Theil. A - bis - E. (Braunschweig 1807. In der
+ Schulbuchhandlung): Das Evangelium, des Evangelii, ...
+
+
+
+
+
+
+
+ person
+ 인칭
+ 人稱
+ personne
+ persona
+ persona
+ contains an indication of the grammatical person (1st, 2nd, 3rd, etc.) associated with a
+ given inflected form in a dictionary.
+ 사전에 제시된 굴절형과 관련된 문법적 인칭(1인칭, 2인칭, 3인칭 등)의 표시를 포함한다.
+ 包含字典中有屈折變化單字的人稱形式 (第一、第二、第三等) 。
+ 辞書にある屈折形と関連する,文法上の人称(1人称,2人称, 3人称など)を
+ 示す.
+ contient des indications sur la personne
+ grammaticale (1re, 2e, 3e, etc.) liée à une forme fléchie donnée dans un
+ dictionnaire.
+ indica la persona gramatical (1ª, 2ª, 3ª, etc.) asociada con una forma flexiva en un diccionario.
+ in un dizionario, contiene una indicazione della persona grammaticale (prima, seconda, terza, ecc.) associata ad una determinata forma flessa.
+
+
+
+
+
+
+
+
+
+
Taken from Wörterbuch der Deutschen Sprache. Veranstaltet und herausgegeben von
+ Joachim Heinrich Campe. Vierter Theil. S - bis - T. (Braunschweig 1810. In der
+ Schulbuchhandlung): Treffen, v. unregelm. ... du triffst, ...
+
This element is synonymous with gram type="person".
+
+
+
Cet élément est synonyme de gram type="person".
+
+
+
+ 当該要素は,gram type="person"と同義である.
+
+
+
+
+
+
+
+ tense
+ 시제
+ 時態
+ temps
+ tiempo
+ tempo
+ indicates the grammatical tense associated with a given inflected form in a dictionary.
+ 사전에 제시된 굴절형과 관련된 문법적 시제를 표시한다.
+ 說明某屈折形式的時態。
+ 辞書にある屈折形と関連する文法上の時制を示す.
+ indique le temps grammatical lié à une forme
+ fléchie donnée dans un dictionnaire
+ indica el tiempo gramatical asociado con con una forma flexiva dada en un diccionario
+ in un dizionario, indica il tempo grammaticale associato ad una determinata forma flessa.
+
+
+
+
+
+
+
+
+
+
Taken from Wörterbuch der Deutschen Sprache. Veranstaltet und herausgegeben von
+ Joachim Heinrich Campe. Vierter Theil. S - bis - T. (Braunschweig 1810. In der
+ Schulbuchhandlung): Treffen, v. unregelm. ... du triffst, ...
+
This element is synonymous with gram type="tense".
+
+
+
Cet élément est synonyme de gram type="tense".
+
+
+
+ 当該要素は,gram type="tense"と同義である.
+
+
+
+
+
+
+ mode
+ contains information about the grammatical mood of verbs (e.g. indicative, subjunctive,
+ imperative).
+ 동사의 문법적 서법에 관한 정보를 포함한다.(예, 직설법, 가정법, 명령법)
+ 包含動詞語氣資訊 (例如直述、假設、祈使語氣等) 。
+ 文法上の動詞の法に関する情報を示す.例えば,直説法,仮定法,命令法な
+ ど.
+ contient des informations sur le mode grammatical
+ des verbes (par exemple l’indicatif, le subjonctif, l’impératif)
+ contiene información sobre el modo gramatical de los verbos (p.ej. indicativo, subjuntivo, imperativo).
+ contiene le informazioni circa il modo dei verbi (ad esempio indicativo, congiuntivo, imperativo)
+
+
+
+
+
+
+
+
+
+
Taken from Wörterbuch der Deutschen Sprache. Veranstaltet und herausgegeben von
+ Joachim Heinrich Campe. Vierter Theil. S - bis - T. (Braunschweig 1810. In der
+ Schulbuchhandlung): Treffen, v. unregelm. ... du triffst, ...
+
+
+
+
+
+
+ inflectional class
+ 굴절 부류
+ 屈折變化種類
+ classe flexionnelle
+ categoría no flexiva
+ tipologia di flessione
+ indicates the inflectional class associated with a lexical item.
+ 어휘 항목과 관련된 굴절 부류를 표시한다.
+ 指明單字的屈折變化種類。
+ 語彙項目の屈折の種類を示す.
+ indique la classe flexionnelle à laquelle appartient un
+ item lexical.
+ indica la categoría no flexiva de un elemento léxico.
+ indica la tipologia di flessione associata ad un'unità
+ lessicale
+
+
+
+
+
+
+
+
+
+
+ indicates the type of indicator used to specify the inflection class, when it is
+ necessary to distinguish between the usual abbreviated indications (e.g.
+ inv) and other kinds of indicators, such as special codes referring
+ to conjugation patterns, etc.
+ 어형변화 등을 가리키는 특별한 부호와 같이 다른 종류의 지시자와 일반적 축약표시(예,
+ inv)를 구별할 필요가 있을 때, 굴절 부류를 명시하는 지시자의 유형을 나타낸다.
+ 若需要區別曲折變化種類的一般縮寫指標 (例:inv)
+ 以及其他指標,像是詞形變化模式的特殊代碼等,則在此說明指示標記類型。
+ 一般的な省略形とは異なる指標,例えば活用パタンを表す特別な記号を
+ 分ける必要がある場合に,屈折の種類を示す指標の種類を示す.
+ donne le type d'indicateur employé pour indiquer la
+ classe flexionnelle, quand on a besoin de distinguer entre les abréviations usuelles (par
+ exemple inv) et d'autres types d'indicateurs tels que des codes
+ spéciifiques faisant référence à des modèles de conjugaison, etc.
+ señala el tipo de indicador usado para especificar la
+ categoría flexiva, cuando es necesario distinguir entre los indicadores abreviados
+ habituales (p.ej. inv) y otros tipos de indicadores, como códigos
+ especiales para referir modelos de conjugación, etc.
+ indica il tipo di indicatore utilizzato per
+ specificare la tipologia di flessione, qualora sia necessario distinguere tra le indicazioni
+ abbreviate solite (ad esempio inv)e altri tipi di indicatori, quali
+ codici speciali per fare riferimento al tipo di coniugazione, ecc.
+
+
+
+ abbreviated indicator
+ 축약 지시자
+ 縮寫指標
+ indicador abreviado
+ 省略指標.
+ indicateur abrégé
+ indicatore abbreviato
+
+
+ coded reference to a table of verbs
+ 동사 테이블에 대한 부호화 참조.
+ 動詞表的編碼參照
+ referencia cifrada a una tabla de verbos
+ 動詞一覧へのコード付き参照.
+ référence codée à un tableau de conjugaison
+ riferimento codificato ad una tavola di
+ verbi
+
+
+
+
This element is synonymous with gram type='inflectional type'.
+
+
+
Cet élément est synonyme de gram type='inflectional type'.
May contain character data and phrase-level elements. Typical content will be
+ invariant, n 3 etc.
+
+
+
Peut contenir des caractères et des éléments du niveau expression. Le contenu
+ type sera invariant, n 3 etc.
+
+
+
文字データと句レベル要素を示すかもしれない.例えば, invariant, n
+ 3など.
+
+
+
+
+
+ groups elements which provide morphological information within a dictionary entry.
+ 사전 표제 항목 내의 형태론적 정보를 제공하는 요소들을 모아 놓는다.
+ 匯集字典標籤組中提供型態資訊的元素。
+ 辞書項目内にある,形態素情報を示す要素をまとめる.
+ regroupe des éléments qui donnent des informations
+ morphologiques dans une entrée de dictionnaire
+ agrupa los elementos que proporcionan información
+ morfológica al interno de un conjunto de etiquetas de diccionario.
+ raggruppa elementi che forniscono informazioni
+ morfologiche all'interno dell'insieme di marcatori del dizionario.
+
+
+
+
+
+
+
+ elements adding further precision to the lexico-grammatical information
+ provided for a dictionary entry.
+
+
+
+
+ groups elements allowed within a gramGrp element in a dictionary.
+ 사전의gramGrp 요소 내에서 허용된 요소를 모아 놓는다.
+ 匯集字典中元素gramGrp內的有效元素。
+ 辞書の要素gramGrpの中で使える要素をまとめる.
+ regroupe des élements autorisés dans l'élément
+ gramGrp.
+ agrupa los elementos permitidos al interno del elemento
+ gramGrp en un diccionario.
+ in un dizionario, raggruppa quegli elementi ammessi
+ all'interno di un elemento gramGrp.
+
+
+
+
+
+
+
+ groups elements allowed within a form element in a dictionary.
+ 사전의 form 요소 내에서 허용된 요소를 모아 놓는다.
+ 匯集字典中元素form內的有效元素。
+ 辞書の要素form中にある要素をまとめる.
+ regroupe des éléments autorisés sous un élément
+ form dans un dictionnaire
+ agrupa los elementos permitidos al interno de un elemento
+ form en un diccionario.
+ in un dizionario, raggruppa gli elementi ammesi
+ all'inerno di un elemento form
+
+
+
+
+
+
+
Grammatical Information
+ grammatical information group
+ 문법 정보군
+ 文法資訊群
+ groupe d'informations grammaticales
+ grupo de información gramatical
+ gruppo di informazioni grammaticali
+ groups morpho-syntactic information about a lexical item, e.g. pos, gen, number, case, or
+ iType (inflectional class).
+ 어휘 항목에 관한 형태-통사적 정보를 모아 놓는다. 예, pos, gen, number, case, 또는
+ iType (굴절 부류)
+ 匯集文字的型態及句法資訊,例如詞性、性別、單複數、格、或屈折變化種類。
+ 語彙項目,の形態統語情報,例えば,gen, number,
+ case, iTypeをまとめる.
+ regroupe des informations morphosyntaxiques sur
+ un item lexical, par exemple Partie du discours pos, Genre gen, Nombre
+ number, Cas case, ou Classe flexionnelle iType.
+ agrupa la información morfosintáctica sobre un elemento léxico, p.ej. pos,
+ gen, number, case, o iType (categoría no flexiva).
+ raggruppa le informazioni morfo-sintattiche di un'unità lessicale, ad esempio pos,
+ gen, number, case, or iType (tipologie flessive).
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ verb
+ intransitive
+
+
+
+
+
+
+
+
+
+ verbe
+ intransitif
+
+
+
+
+
+
+
+
+
+ 動詞
+ 不及物的
+
+
+
+
+
+
+
+
+ part of speech
+ 품사
+ 詞性
+ partie du discours
+ parte de un discurso
+ parte del discorso
+ indicates the part of speech assigned to a dictionary
+headword such as noun, verb, or adjective.
+ 명사, 동사, 또는 형용사와 같이 사전 표제어에 할당된 품사를 표시한다.
+ 指明標題字的詞性 (名詞、動詞、形容詞等)
+ 辞書の見出し語の品詞を示す.例えば,名詞,動詞,形容詞など.
+ indique la partie du discours attribuée à une
+ entrée de dictionnaire telle que nom, verbe, adjectif.
+ indica la parte del
+ discurso asignado a un lema de diccionario (nombre, verbo, adjetivo,
+ etc.)
+ indica la parte del discorso assegnata a un lemma (nome, verbo, aggettivo, ecc.)
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ adj
+
+
+
+
+
+
+
+
+
+ adj.
+
+
+
+
+
+
+
+
+
+ 形容詞
+
+
+
+
+
+
+
+
+ subcategorization
+ 하위범주화
+ 次要分類
+ sous-catégorisation
+ subcategorización
+ sottocategorizzazione
+ contains subcategorization information (transitive/intransitive, countable/non-countable,
+ etc.)
+ 하위범주화 정보를 포함한다(타동사/자동사, 가산/불가산, 등).
+ 包含次要分類資訊 (及物 / 不及物、可數 / 不可數等)
+ 下位範疇情報を示す.例えば,自動詞・他動詞,可算・非可算など.
+ contient des informations de sous-catégorie
+ (transitif/intransitif, dénombrable/indénombrable, etc.)
+ contiene información sobre la subcategorización (transitivo/intransitivo, contable/no contable, etc.)
+ contiene informazioni circa la sottocategorizzazione (transitivo/intransitivo, numerabile/non numerabile, ecc.)
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ t ind
+
+
+
+
+
+
+
+
+
+ trans. ind.
+
+
+
+
+
+
+
+
+
+ 不可數
+
+
+
+
+
+
+
+
+ collocate
+ 연어
+ 組合字
+ collocation
+ colocación
+ collocato
+ contains any sequence of words that co-occur with the headword with significant frequency.
+ 표제어의 연어를 포함한다.
+ 包含標題字的組合字。
+ 見出し語の連語関係を示す.
+ contient une collocation de l'entrée.
+ indica la colocación de un lema
+ contiene il collocato di un lemma.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ de
+
+
+
+
+
+
+
+
+
+ de
+
+
+
+
+
+
+
+
+
+ 到
+
+
+
+
+
+
+
+
Sense Information
Definitions
+ definition
+ 정의
+ 定義
+ définition
+ definición
+ definizione
+ contains definition text in a dictionary entry.
+ 사전 표제 항목의 정의 텍스트를 포함한다.
+ 包含詞條中的定義文。
+ 辞書項目における定義を示す.
+ contient le texte de la définition dans une entrée de
+ dictionnaire
+ contiene el texto de definición en una entrada de
+ diccionario.
+ contiene una definizione in una voce di dizionario.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ n
+
+ person who competes.
+
+
+
+
+
+
+
+
+ n
+
+ Personne qui entre en compétition.
+
+
+
+
+
+
+
+
+ 名詞
+
+ 物體受振動所發出的聲響;人口裡發出的聲響或腔調。
+
+
+
+
+
+
+
Translation Equivalents
Etymological Information
+ etymology
+ 어원
+ 詞源
+ étymologie
+ etimología
+ etimologia
+ encloses the etymological information in a dictionary entry.
+ 사전 표제 항목의 어원 정보를 포함한다.
+ 包含詞源學資訊。
+ 辞書項目の語源情報を示す.
+ contient les informations sur l'étymologie de l'entrée
+ engloba la información etimológica en una entrada de
+ diccionario.
+ comprende informazioni etimologiche in una voce di
+ dizionario.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ ME.publisshen,
+ F.publier, L.publicare,
+ publicatum. See public; cf. 2d -ish. (From: Webster's Second International)
+
+
+
+
+
+ Emprunté au latin
+ publicare
+ mettre à la disposition du public ; montrer au public ; publier (un livre) ,
+
+ publicus, v.
+ public1
+ . La forme puplier, poplier
+
+ anc. fr.
+ (v. supra, Grand
+ dictionnaire de la langue française. et.
+ Tobler-Lommatzsch
+ .) à côté de publier,
+ que l'on trouve à partir de la 2e moitié du XIIIe s.
+ [ms. de la fin XIIIe s.]
+ (Légende de Girart de
+ Roussillon, 64 dans Tobler-Lommatzsch), est une
+ peuple.
+
+
+
+
+
+
+
+ 從梵語
+ buddha傳入的中古漢語音譯;
+
+
+
+
+
May contain character data mixed with any other elements defined in the
+ dictionary tag set.
+
There is no consensus on the internal structure of etymologies, or even on whether such a
+ structure is appropriate. The etym element accordingly simply contains prose, within
+ which names of languages, cited words, or parts of words, glosses, and examples will typically
+ be prominent. The tagging of such internal objects is optional.
+
+
+
Peut contenir des caractères combinés avec n'importe quels autres éléments
+ définis dans le jeu de balises propre aux dictionnaires.
+
Il n'y a aucun consensus sur la structure interne propre à une étymologie, ou même sur le
+ fait qu'une telle structure soit appropriée. L'élément etym ne contient donc que du
+ texte non structuré, dans lequel les noms de langues, les mots cités, ou les parties de mots,
+ les gloses et les exemples seront mis en valeur. L'encodage de tels objets internes est
+ facultatif.
+
+
+
+
+
+ language name
+ 언어명
+ 語言名稱
+ nom de la langue
+ nombre de lengua
+ nome di un alingua
+ contains the name of a language mentioned in etymological or other linguistic discussion.
+ 어원적 또는 기타 언어적 논의에서 언급된 언어의 이름
+ 在詞源學或其他語言學相關訊息中所提到的語言。
+ 語源学または他の言語学上の論議で現れる言語名を示す.
+ nom de la langue mentionnée des informations de nature
+ linguistique (étymologique ou autre)
+ el nombre de una lengua mencionada en una información
+ etimológica o lingüística de cualquier tipo.
+ il nome di una lingua menzionata nell'etimologia o in
+ altra discussione linguistica.
+
+
+
+
+
+
+
+
+
+
+
+
+ ME.publisshen,
+ F.publier, L.publicare,
+ publicatum. See public; cf. 2d -ish.
+
+
+
+
+
+
+
+ Emprunté au latin
+ publicare
+ mettre à la disposition du public ; montrer au public ; publier (un livre) ,
+
+ publicus, v.
+ public1
+ . La forme puplier, poplier
+
+ anc. fr.
+ (v. supra, Grand
+ dictionnaire de la langue française. et.
+ Tobler-Lommatzsch
+ .) à côté de publier,
+ que l'on trouve à partir de la 2e moitié du XIIIe s.
+ [ms. de la fin XIIIe s.]
+ (Légende de Girart de
+ Roussillon, 64 dans Tobler-Lommatzsch), est une
+ peuple.
+
+
+
+
+
+
+
+ 從梵語
+ buddha傳入的中古漢語音譯;
+
+
+
+
+
May contain character data mixed with phrase-level elements.
+
+
+
Peut contenir des caractères combinés avec des éléments du niveau
+ expression.
+
+
+
句レベル要素と共に文字データを含むかもしれない.
+
+
+
+
+
Other Information
Examples
Usage Information and Other Labels
+ usage
+ usage
+ 용법
+ 字詞使用資訊
+ uso
+ uso
+ contains usage information in a dictionary entry.
+ contient, dans une entrée de dictionnaire, les informations sur son usage
+ 사전 표제 항목에 용법 정보를 포함한다.
+ 包含辭條中的使用資訊。
+ 辞書項目中にある用例情報を示す.
+ contiene la información sobre el uso en la entrada de un
+ diccionario.
+ in una voce di dizionario, contiene informazioni
+ sull'uso.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ classifies the usage information using any convenient typology.
+ 다양한 종류의 유형을 사용하여 용례 정보를 분류한다.
+ 用合適的分類方法將不同的使用資訊分類。
+ 当該用例情報を分類する.
+ classe les informations sur l'usage en utilisant
+ n'importe quelle typologie adaptée
+ clasifica la información sobre el uso aplicando una
+ tipología funcional.
+ classifica le informazioni sull'uso secondo una
+ tipologia funzionale.
+
+
+
+ geographic
+ 지리적
+ zone géographique
+ geografico
+ área geográfica
+ geographic area
+ 지리적 지역
+ 地理範圍
+ área geográfica
+ 地理的範囲.
+ secteur géographique
+ area geografica
+
+
+ temporal, historical era (archaic, old, etc.)
+ 시간적, 역사적 연대(고어, 옛말, 등)
+ 不同時期、歷史年代 (古體、老式等。)
+ era temporal o histórica (arcaica, antigua, etc.)
+ 時代(古代,昔,など).
+ ère temporelle, historique (archaïque, vieux,
+ etc.)
+ epoca storica (arcaica, vecchia, ecc.)
+
+
+ domain
+ 영역
+ domaine
+ ambito
+ dominio
+ domain or subject matter (e.g. scientific, literary etc.)
+ 영역 또는 주제 내용(예, 과학, 문학 등)
+ 地域
+ ámbito o tema principal (p.ej. científico,
+ literario)
+ 分野,主題(科学,文学,など).
+ domaine ou sujet (par exemple scientifique,
+ littéraire, etc.)
+ ambito
+
+
+ 레지스터
+ registre
+ registro
+ registro
+ 語域
+
+
+ style (figurative, literal, etc.)
+ 문체(비유적, 사실적, 등)
+ 語體 (象徵性、字面原義等)
+ estilo (figurado, literal, etc.)
+ スタイル(比喩的,字義的,など).
+ style (figuratif, littéral, etc.)
+ stile (figurativo, letterale, ecc.)
+
+
+ preference level
+ 선호 층위
+ niveau d’usage (principalement, habituellement,
+ etc.)
+ livello di preferenza
+ nivel de preferencia (principal, habitual)
+ preference level (chiefly, usually, etc.)
+ 선호 층위(주로, 일반적으로, 등)(
+ 優先程度 (主要、慣用等)
+ nivel de preferencia (principalmente,
+ generalmente, etc.)
+ 使用度(主たる,通常,など).
+ niveau de sens (principal, courant, etc.)
+ livello di preferenza (principalmente, di solito,
+ ecc.)
+
+
+ language
+ 언어
+ langue
+ lingua
+ lang (lengua para palabras extranjeras,
+ pronunciación de la ortografía, etc.)
+ name of a language mentioned in etymological or other
+ linguistic discussion.
+ 어원적 또는 기타 언어적 논의에서 언급된 언어의 이름
+ 語言 (外來文字、拼音、發音等的語言)
+ nombre de una lengua mencionada en una discusión
+ etimológica o lingüística.
+ 語源や他の言語学的解説に出てくる言語の名前.
+ nom d'une langue mentionnée dans une discussion
+ linguistique étymologique ou autre.
+ lang (lingua per parole straniere, ortografia,
+ pronuncie, ecc.)
+
+
+ grammatical
+ 문법적
+ emploi grammatical
+ grammaticale
+ uso gramatical
+ grammatical usage
+ 문법적 용법
+ 文法上的使用
+ uso gramatical
+ 文法上の用法.
+ utilisation grammaticale
+ uso grammaticale
+
+
+ synonym
+ 유의어
+ synonyme
+ sinonimo
+ sinónimo dado para ilustrar el uso
+ synonym given to show use
+ 용법을 제시하기 위해 사용된 유의어
+ 同義詞
+ sinónimo dado para ejemplificar el uso
+ 同義語.
+ synonyme donné pour montrer l'usage du terme
+ sinonimo fonito per mostrane l'uso
+
+
+ hypernym
+ 상위어
+ hyperonyme
+ iperonimo
+ hiperónimo dado para ilustrar el uso
+ hypernym given to show usage
+ 용법을 제시하기 위해 사용된 상위어
+ 上層文字
+ hiperónimo dado para ejemplificar el uso
+ 上位語.
+ hyperonyme donné pour montrer l'usage du terme
+ iperonimo fonito per mostrane l'uso
+
+
+ collocation
+ 연어
+ collocation
+ collocazione
+ colocación dada para ilustrar el uso
+ typical collocate of the headword.
+ 표제어의 연어를 포함한다.
+ 組合字
+ indica la colocación del lema
+ 見出し語の連語関係.
+ contient une collocation du mot-vedette
+ collocazione fonita per mostrane l'uso
+
+
+ complement
+ 보어
+ complément
+ complemento
+ complemento habitual
+ typical complement
+ 전형적 보어
+ 典型補語
+ complemento habitual
+ 一般的な補語.
+ complément usuel
+ complemento tipico
+
+
+ object
+ 목적어
+ objet
+ oggetto
+ objeto habitual
+ typical object
+ 전형적 목적어
+ 典型受詞
+ objeto habitual
+ 一般的な目的語.
+ objet caractéristique
+ oggetto tipico
+
+
+ subject
+ 주어
+ sujet
+ soggetto
+ sujeto habitual
+ typical subject
+ 전형적 주어
+ 典型主詞
+ tema típico
+ 一般的な主語.
+ sujet usuel
+ soggetto tipico
+
+
+ typical verb
+ 전형적 동사
+ 典型動詞
+ verbo típico
+ 一般的な動詞.
+ verbe caractéristique
+ verbo tipico
+
+
+ unclassifiable piece of information to guide sense choice
+ 의미 선택을 안내하는 미분류 정보
+ 無法分類的釋義資訊
+ fragmento de información inclasificable para la
+ obtención del sentido
+ 分類できない,意味を選択するための情報,
+ renseignement hors catégorie fourni pour guider le
+ choix d'un sens
+ informazione non classificabile per guidare nella
+ scelta del senso
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ label
+ 분류 표시
+ 標籤
+ étiquette
+ etiqueta
+ etichetta
+ contains a label for a form, example, translation, or other piece of information, e.g.
+ abbreviation for, contraction of, literally, approximately, synonyms:, etc.
+ 형태, 예문, 번역, 또는 기타 정보에 대한 분류 표시를 포함한다. 예, 약어, 단축형, 축어적,
+ 대체적, 유의어
+ 包含字詞形式、範例、翻譯、或其他資訊的標籤,例如縮寫、省略、字面、約略、同義等。
+ 語形のラベルを示す.例えば,翻訳,短縮形などの各種省略形など.
+ étiquette pour la forme d’un mot, pour un exemple, pour
+ une traduction, ou pour tout autre type d’information, par exemple "abréviation pour",
+ "contraction de", "littéralement", "approximativement", "synonymes", etc.
+ en diccionarios, contiene una etiqueta para una forma,
+ ejemplo, traducción u otra información, p.ej. abreviatura para, contracción de, literal.,
+ aproximadamente, sinónimo, etc.
+ nei dizionari, contiene un'etichetta per una forma,
+ esempio, traduzione, o altra informazione, ad esempio abbreviazione di, contrazzione di,
+ letteralmente, approssimativamente, sinonimi, ecc.
+
+
+
+
+
+
+
+
+
+
+
+
+
+ classifies the label using any convenient typology.
+ 편리한 방식으로 분류 표시를 분류한다.
+ 用合適的分類方法將標籤分類。
+ 当該ラベルの分類を示す.
+ classe l'étiquette en utilisant toute typologie
+ adaptée
+ clasifica la etiqueta usada según una tipología
+ funcional
+ classifica le etichette secondo una tipologia
+ funzionale
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Labels specifically relating to usage should be tagged with the special-purpose usg
+ element rather than with the genericlbl element.
+
+
+
Les étiquettes qui se rapportent spécifiquement aux usages devraient être balisées avec
+ l'élément particulier usgplutôt qu'avec l'élément générique lbl.
+
+
+
用法に関するラベルには,一般的な要素lblではなく,要素 usgを使うべきである.
+
+
+
+
+
+
+
Cross-References to Other Entries
+ cross-reference phrase
+ 교차 참조 구
+ 交互參照
+ renvoi
+ sintagma de referencia cruzada
+ frase di riferimento incrociato
+ contains a phrase, sentence, or icon referring the reader to some other location in this or
+ another text.
+ 현재 또는 다른 텍스트에서 다른 위치를 지시하는 구, 문장, 또는 아이콘을 포함한다.
+ 包含一字詞、句子、或圖象,用以參照到相同文本或不同文本中的其他位置。
+ 利用者に,他の場所を表す句,文,図形を示す.
+ contient une expression, une phrase ou une icône qui
+ invite le lecteur à se référer à un autre endroit, dans le même texte ou dans un autre texte
+ contiene un sintagma, oración o icono referido al lector
+ hacia alguna otro punto de este u otro texto.
+ contiene un sintagma, una frase o un'icona che rimanda il
+ lettore ad un altra porzione di questo o altro testo.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ indicates the type of cross reference, using any convenient typology.
+ 다양한 유형으로 교차 참조 유형을 나타낸다.
+ 用合適的分類方法指出交互參照的種類。
+ 相互参照の種類を示す.
+ indique le type de renvoi, en utilisant n'importe
+ quelle typologie adaptée
+ indica el tipo de referencia cruzada aplicando una
+ tipología funcional.
+ indica il tipo di riferimento incrociato secondo una
+ tipologia funzionale
+
+
+
+ synonym
+ 유의어
+ synonyme
+ sinonimo
+ referencia cruzada a información sinónima
+ cross reference for synonym information
+ 유의어 정보에 대한 교차 참조
+ 用合適的分類方法指出交互參照的種類。
+ referencia cruzada para la información de un
+ sinónimo
+ 同義情報向けの相互参照.
+ renvoi à des informations concernant un synonyme
+ riferimento incrociato per informazione sui
+ sinomimi
+
+
+ etymological
+ 어원적
+ étymologique
+ etimologico
+ información etimológica
+ etymological information
+ 어원 정보
+ 詞源資訊
+ información etimológica
+ 語源情報.
+ informations étymologiques
+ informazione etimologica
+
+
+ compare or consult
+ 비교 또는 참고
+ comparer ou consulter
+ confronta o consulta
+ término relativo o similar
+ related or similar term
+ 관련된 또는 유사한 용어
+ 相關或相似的字詞
+ término relacionado o similar
+ 関連語または似た言葉.
+ terme connexe ou semblable
+ termine collegato o simile
+
+
+ illustration
+ 그림
+ illustration
+ illustrazione
+ ilustración de un objeto
+ illustration of an object
+ 물체의 그림
+ 物體圖像
+ ilustración de un objeto
+ 対象の絵.
+ illustration d'un objet
+ illustrazione di un oggetto
+
+
+
+
+
+
+
+
+ [Fr. < laver; L. lavare, to wash;
+ see lather
+ ].
+
+
+
+
+
+
+
+ Emprunté au latin
+ publicare
+ mettre à la disposition du public ; montrer au public ; publier (un livre) ,
+
+ publicus, v.
+ public1
+ . La forme puplier, poplier
+
+ anc. fr.
+ (v. supra, Grand
+ dictionnaire de la langue française. et.
+ Tobler-Lommatzsch
+ .) à côté de publier,
+ que l'on trouve à partir de la 2e moitié du XIIIe s.
+ [ms. de la fin XIIIe s.]
+ (Légende de Girart de
+ Roussillon, 64 dans Tobler-Lommatzsch), est une
+ peuple.
+
+
+
+
+
+
+
+ SYN. clé
+
+
+
+
+
+
+
+
+ 詩經.大雅.雲漢:瘨,病、使困苦; 參見 癲
+ 。
+
+
+
+
+
+
+
+ 同義詞:請見 legal
+
+
+
+
+
+
+
+
+ SYN. see legal
+
+
+
+
+
+
May contain character data and phrase-level elements; usually contains a
+ ref or a ptr element.
+
This element encloses both the actual indication of the location referred to, which may be
+ tagged using the ref or ptr elements, and any accompanying material which
+ gives more information about why the reader is being referred there.
+
+
+
Peut contenir des caractères et des éléments de niveau expression ;
+ habituellement un élément ref ou un élémentptr.
+
Cet élément contient à la fois l'indication réelle de l'emplacement mentionné, qui peut être
+ balisée par les éléments ref ouptr, et tous types d'indications
+ complémentaires explicitant la raison pour laquelle le lecteur est renvoyé à cet endroit.
Related Entries
+ related entry
+ 관련 표제 항목
+ 相關辭條
+ sous-entrée
+ entrada relativa
+ voce corregata
+ contains a dictionary entry for a lexical item related to the headword, such as a compound
+ phrase or derived form, embedded inside a larger entry.
+ 복합어, 또는 큰 표제 항목 내부에 포함된 파생 형태와 같이 표제 항목과 관련된 어휘 항목을 포함한다.
+ 和標題字相關聯的字典辭條,像是包括在一個更大辭條中的複合片語或衍生字。
+ 見出し語と関連する語彙項目を表す辞書項目を示す.例えば,より上位の項 目を持つ複合句,派生形など.
+ contient une entrée relative à un item lexical lié au
+ mot-vedette, tel qu'un composé ou un dérivé, inclus dans une entrée plus large.
+ contiene una entrada de diccionario para un elemento
+ léxico relativo al lema, como p.ej. un sintagma compuesto o una forma derivada, y que se incluye
+ en un entrada mayor.
+ contiene una voce di dizionario per un'unità lessicale
+ collegata al lemma, quale un sintagma composto o una forma derivata, inclusa in una voce più
+ ampia.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
The following example from Webster's New Collegiate Dictionary
+ (Springfield, Mass.: G. & C. Merriam Company, 1975) shows a single related
+ entry for which no definition is given, since its meaning is held to be readily derivable from
+ the root entry:
+
+
+
+
+ adj
+
+
+ of, relating to, or affecting a nerve or the nervous system
+
+ ...
+
+
+
+ adv
+
+
+
+
+
+
+
+
+
+
+ v.
+
+
+ Faire fonctionner un siphon, transvaser (un liquide) au moyen d'un siphon.
+
+
+
+
+ n.
+
+
+
+
+
+
+
+
+
+
+ n.
+ f.
+
+ Art de conduire les affaires de l'Etat ;
+ Ligne de conduite raisonnée ;
+
+ Habileté manifestée dans les rapports avec les autres et qui consiste
+ essentiellement à amener autrui à faire ce que l'on désire, sans pour autant dévoiler
+ ses propres intentions.
+
+
+
+ théorie selon laquelle les événements et les transformations historiques sont dus
+ essentiellement à la politique et à ses évolutions ;
+
+
+
+ qui relève du politicisme ou lui est propre ;
+
+
+
+ manie de la politique ;
+
+
+
+ politique envisagée sous un angle déprécié ou méprisable.
+
+
+
+
+
+
+
+
+
+ élém. formant
+
+ entrant dans la constr. de subst. désignant des unités de mesure, dans tous les
+ domaines de la phys., valant mille fois l'unité de base ; v.
+ kilogramme, kilogrammètre, kilomètre, kilotonne, kilowatt et aussi :
+
+
+
+
+
+ unité de mesure de quantité de chaleur valant mille calories (symb. kcal) ;
+
+
+
+ Unité de mesure de fréquence valant mille hertz (kHz ) ;
+
+
+
+ unité de mesure de travail valant mille joules (kJ)
+ ;
+
+
+
+ unité de mesure de longueur astronomique valant mille parsecs ;
+
+
+
+
+ unité de mesure de différences de potentiel, valant mille volts (kv).
+
+
+
+
+
+
+
+
+
+ 形容詞
+
+
+ 不馴順;狡猾不易對付。
+
+ ...
+
+
+
+ 副詞
+
+
+
+
+
+
+
+
+
+
+ 陰性
+
+ 昆蟲學, 蜜蜂 .
+ 忙碌的蜜蜂,工作狂 。
+ 天文學 , 蒼蠅座 —
+
+
+ 石巢蜂 ;
+
+
+
+ 木匠蜂 ;
+
+
+
+ 女王蜂;
+
+
+
+ 工蜂 。
+
+
+
+
+
+
The following example from Diccionario de la Universidad de Chicago
+ Inglés-Español y Español-Inglés / The University of Chicago Spanish
+ Dictionary, Fourth Edition, compiled by Carlos Castillo and Otto F. Bond (Chicago:
+ University of Chicago Press, 1987) shows a number of related entries embedded in the
+ main entry. The original entry resembles the following:abeja [a·bé·xa]f. bee;abejera [a·be·xé·ra]f. beehive;abejón [a·be·xóon]m.
+ drone; bumblebee;abejorro [a·be·xó·rro]m. bumble
+ bee. One encoding for this entry would be:
In the much larger Simon & Schuster Spanish-English
+ dictionary (Tana de Gámez, ed., Simon and Schuster's
+ International Dictionary (New York: Simon and Schuster,
+ 1973).) these derived forms of abeja
+ are treated as separate main entries, but there are other embedded
+ phrases shown asres in its main entry for
+ abeja:abeja,
+ f. 1. (ento.) bee. 2. busy bee, hard worker. 3. (astron.) A.,
+ Musca. — a. albanila, mason bee; a. carpintera, carpenter bee; a.
+ reina or maestra, queen bee; a. neutra or obrera, worker bee.
+ This entry may be encoded thus:
May contain character data mixed with any other elements defined in the
+ dictionary tag set.
+
Identical in sub-elements to an entry tag, and used where a dictionary has embedded
+ information inside one entry which could have formed a separate entry. Some authorities
+ distinguish related entries, run-on entries, and various other types of degenerate entries; no
+ such typology is attempted here.
+
+
+
Peut contenir des caractères et d'autres éléments définis dans le jeu de
+ balises propre aux dictionnaires.
+
Dans les sous-éléments, il est identique à un élémententry, et utilisé là où un
+ dictionnaire a enchâssé dans une entrée des informations qui auraient pu donner lieu à une
+ entrée séparée. Quelques-uns font une distinction entre les sous-entrées, les entrées en
+ continu et différents autres types d'entrées dérivées ; aucune de ces typologies n'a été utilisée
+ ici.
Headword and Pronunciation References
+ groups elements used for purposes of location of particular orthographic or pronunciation
+ forms within a dictionary entry.
+ 사전 표제 항목 내의 특정한 철자 또는 발음 형태의 위치를 지정하는 요소들을 모아 놓는다.
+ 匯集該字典中的元素,這些元素指向標題字的拼字或發音形式。
+ 辞書項目内で,特定の正書法や発音形式の場所を示す要素をまとめる.
+ regroupe des éléments utilisés pour localiser
+ des formes orthographiques ou phonétiques particulières dans une entrée de dictionnaire.
+ agrupa los elementos de la base del diccionario que
+ indican las forma ortográfica o la pronunciación del lema.
+ in un dizionario raggruppa gli elementi che indirizzano a
+ frome ortografiche o pronuncie di un lemma.
+
+
+
+
+
+
+
+ orthographic-form reference
+ 철자-형태 참조
+ 拼字參照
+ référence à la forme orthographique
+ referencia ortografía
+ riferimento alla forma ortografica
+ in a dictionary example, indicates a reference to the orthographic form(s) of the headword.
+ 사전 예문에서 표제어의 철자 형식에 대한 참조를 나타낸다.
+ 在字典範例中,參照出標題字的拼字形式。
+ 辞書の用例において,見出し語の正書形式への参照を示す.
+ dans un exemple de dictionnaire, indique une référence à
+ la/aux forme(s) orthographique(s) du mot-vedette.
+ en un diccionario, indica la forma ortográfica de un
+ lema.
+ nell'esempio in un dizionario, indica un riferimento alla
+ forma (forme) ortografica del lemma.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ indicates the kind of typographic modification made to the headword in the reference.
+ 참조에서 표제어에 대한 인쇄상 변화의 종류를 표시한다.
+ 指出為參照出標題字所做的印刷修飾。
+ 参照中,見出し語に施された印刷上の修飾の種類を示す.
+ indique le type de modification typographique
+ apportée au mot-vedette dans la référence.
+ indica el tipo de modificación tipográfica hecha en
+ el lema en la referencia.
+ indica il tipo di modifica tipografica del lemma in
+ un riferimento.
+
+
+
+ capital
+ 대문자
+ capitale
+ maiuscola
+ indicates first letter is given as capital
+ 첫 문자가 대문자임을 표시한다.
+ 首字母大寫
+ 冒頭文字が大文字化されている.
+ indique que la première lettre est donnée en
+ majuscule
+ indica la primera letra dada como mayúscula
+ indica che la prima lettera è data come
+ maiuscola.
+
+
+ no hyphen
+ 하이픈 없음
+ ningún guión
+ pas de trait d'union
+ nessun trattino
+ indica che il lemma, sebbene prefisso o suffisso,
+ perde il trattino
+ indicates that the headword, though a prefix or suffix, loses its hyphen
+ 접두사 또는 접미사일지라도 표제어의 하이픈이 소실되었음을 표시한다.
+ indica que el lema, aunque sea un prefijo o un
+ sufijo, no contiene su guión
+ 見出し語には接頭辞,接尾辞が付いているが,ハイフンが外されて いる.
+ indique que le mot-vedette perd son trait d'union, bien
+ que ce mot-vedette soit un préfixe ou un suffixe.
+
+
+
+
+
+
+
+
+
+ The Royal of Arts
+
+
+
+
+
+
+
+
+
+
+ Des casseroles et des "faitouts" pour les ménagères.
+
+
+
+
+
+
+
+
+
+
+ 皇家藝術
+
+
+
+
+
+
+
+
+
+ orthographic-variant reference
+ 철자-변이 참조
+ 拼字變化參照
+ référence de variante orthographique
+ referencia de variante ortográfica
+ riferimento alla variante ortografica
+ in a dictionary example, indicates a reference to variant orthographic form(s) of the
+ headword.
+ 사전 예제에서 표제어의 변이 철자 형식에 대한 참조를 표시한다.
+ 在字典範例中,參照出標題字的拼字變化形式。
+ 辞書の用例で,見出し語の複数ある正書形式への参照を示す.
+ dans un exemple de dictionnaire, indique une référence à
+ une/des variante(s) orthographique(s) du mot-vedette.
+ en un diccionario, indica una referencia a una forma/s de
+ variante ortográfica del lema.
+ nell'esempio in un dizionario, indica un riferimento alla
+ variante (varianti) ortografica del lemma.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ indicates the kind of variant involved.
+ 관련된 변이 종류를 표시한다.
+ 指出變化種類。
+ 示された変化形の種類を示す.
+ indique le type de variante impliquée
+ indica el tipo de variante implicada
+ indica il tipo di variante.
+
+
+
+ past tense
+ passé
+ pasado
+
+
+ past participle
+ participe passé
+ participio passato
+ participio pasado
+
+
+ present participle
+ participe présent
+ participio presente
+ participio presente
+
+
+ feminine
+ féminin
+ femminile
+ femenino
+
+
+ plural
+ pluriel
+ plurale
+
+
+
+
+
+
+
+
+
+ Mr Burton took us for French
+
+
+
+
+
+
+
+
+
+ Les sopranos piaillent avec conviction. là-bas au
+ lointain, l' hymne du matin s' élève en un doux murmure...
+
+
+
+
+
+
+
+
+
+ 感我此言良久立,却 坐促弦弦轉急
+
+
+
+
+
+
This element is deprecated: the oRef element should be used in its place.
+
+
+
Caractères ouoRef.
+
+
+
文字データまたは要素oRef.
+
+
+
+
+
+ pronunciation reference
+ 발음 참조
+ 發音參照
+ référence à une prononciation
+ referencia a la pronunciación
+ riferimento per la pronuncia
+ in a dictionary example, indicates a reference to the pronunciation(s) of the headword.
+ 사전의 예에서 표제어의 발음에 대한 참조를 표시한다.
+ 在字典範例中,參照出標題字的發音形式。
+ 辞書の用例中で,見出し語の発音への参照を示す.
+ dans un exemple de dictionnaire, indique une référence à
+ la/aux prononciation(s) du mot-vedette
+ en un diccionario, indica la pronunciación de un lema.
+ in un esempio in un dizionario, indica un riferimento
+ alla pronuncia del lemma
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Paul musste die Pfütze , wenn er nicht nass werden wollte.
+
+
+ Paul wollte das Schild nicht absichtlich und beschädigen.
+
+
+
+
+
+
+
+
+ pronunciation-variant reference
+ 발음-변이 참조
+ 發音變化參照
+ référence à une variante de prononciation
+ referencia a una variante en la pronunciación
+ riferimento alla variante della pronuncia
+ in a dictionary example, indicates a reference to variant pronunciation(s) of the headword.
+ 사전의 예에서 표제어의 변이 발음 참조를 표시한다.
+ 在字典範例中,參照出標題字的發音變化形式。
+ 辞書の用例中で,見出し語の,異なる発音への参照を示す.
+ dans un exemple de dictionnaire, indique une référence à
+ une ou des variante(s) de prononciation du mot-vedette.
+ en un diccionario, indica una referencia a una variante
+ de pronunciación del lema.
+ in un esempio in un dizionario, indica un riferimento a
+ una o più varianti della pronuncia del lemma.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Weil Paul die Pfütze um'fuhr, blieb er trocken.
+
+
+ Weil Paul das Schild 'umfuhr, ging es kaputt.
+
+
+
+
+
+
This element is deprecated: the pRef element should be used in its place.
+
+
+
Caractères ou pRef.
+
+
+
文字列または要素pRef.
+
+
+
+
+
Typographic and Lexical Information in Dictionary Data
Editorial View
Lexical View
Retaining Both Views
Using Attribute Values to Capture Alternate Views
Recording Original Locations of Transposed Elements
Unstructured Entries
The Dictionary Module
+Dictionaries
+Dictionaries
+Dictionnaires
+紙本字典
+Dizionari a stampaDicionários impressos辞書モジュール
Manuscript Description
Overview
The Manuscript Description Element
+ manuscript description
+ 원고 기술
+
+ descripción del manuscrito
+ description d'un manuscrit
+ decrizione del manoscritto
+ contains a description of a single identifiable
+ manuscript or other text-bearing object.
+ 하나의 식별가능한 원고에 대한 기술을 포함한다.
+ 包含單一份可識別手稿的描述。
+ 単一の識別可能な手書き資料の解説を示す.
+ contient la description d'un manuscrit individuel
+ contiene la definición de un único manuscrito.
+ contiene la descrizione di un unico manoscritto
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Oxford
+ Bodleian Library
+ MS Poet. Rawl. D. 169.
+
+
+
+ Geoffrey Chaucer
+ The Canterbury Tales
+
+
+
+
+
A parchment codex of 136 folios, measuring approx
+ 28 by 19 inches, and containing 24 quires.
+
The pages are margined and ruled throughout.
+
Four hands have been identified in the manuscript: the first 44
+ folios being written in two cursive anglicana scripts, while the
+ remainder is for the most part in a mixed secretary hand.
+
+
+
+
+
+
+
+
+
+ France
+ Paris
+ Bibliothèque nationale de France. Réserve des livres rares>
+ RES P- YC- 1275
+
+
+ Y. 1341
+ Cote de la Bibliothèque royale au XVIIIe s. (Catalogue de 1750).
+
+
+
+
+
+
+ Juvénal
+
+
+ Perse
+
+
+
+
+
+
+ Venise
+ F. Torresani
+
+ G.-F. Torresani
+
+ 1535
+ In-8°.
+
+ Exemplaire avec rehauts peints en argent, or et bleu.
+
+ Notice bibliographique
+ dans le Catalogue général
+
+
+
+
+
+ Image de la reliure dans l'iconothèque
+
+
+
+
+
+
+ 170
+ 98
+ 15
+
+
+
+
+
+
+
Reliure à décorEntrelacs géométriques Reliure en maroquin brun jaspé
+ à décor d’entrelacs géométriques (structure de losange et
+ rectangle) complété de fers évidés.
+ Titre ivvenalis. persivs et ex-libris de Jean
+ Grolier io. grolierii et amicorvm. dorés respectivement au centre et au bas
+ du plat supérieur.
+ Devise de Jean Grolierportio mea sit in terra
+ viventivm dorée au centre du plat inférieur.
+ Dos à cinq nerfs, sans décor ; simple filet doré sur chaque
+ nerf et en encadrement des caissons ; passages de chaînette marqués de même.
+ Tranchefiles simples unicolores, vert foncé.
+ Filet doré sur les coupes.
+
+ Tranches dorées.
+ Contreplats en vélin.
+ Filet doré sur les chasses.
+
+ Gardes en papier et vélin (2+1+2 / 2+1+2) ; filigrane au
+ pot.Briquet N° XX
+
+
+ Defet manuscrit utilisé comme claie au contreplat
+ inférieur (visible par transparence, sous la contregarde en vélin).
+ Traces de mouillures anciennes plus ou moins importantes au bas des
+ feuillets, qui n'ont pas affecté la reliure ; éraflure en tête du plat
+ inférieur.
+
+
+
+
+
+
Reliure exécutée pour Jean Grolier par Jean Picard, Paris, entre 1540 et 1547.
+
+
+
+
+ Estampille n° 1, utilisée de
+ la fin du XVIIe siècle à 1724 (page de titre).
+
+
+
+
+ Notice établie à partir du document original
+ Description mise à jour le 5 octobre 2009 en vue de l'encodage en TEI des descriptions des reliure
+ de la Réserve des livres rares
+ Description revue le 1er
+ juin 2009 par Fabienne Le Bars
+ Description validée le25
+ juin 2009par Fabienne Le Bars
+
+
+
+
+
+
+
+
+
+
+ 台北
+ CBETA
+ Taisho Tripitaka Vol. T08, No. 230
+
+
+
+ 唐玄奘
+ 大般若波羅蜜多經電子版本
+
+
+
+
+
總共有600卷
+
亦收錄於高麗藏、嘉興藏、永樂北藏、永樂南藏、乾隆藏、佛教大藏經、中華藏...等。
+
唯獨新纂卍續藏未收錄此經
+
+
+
+
+
+
+
+
+
Phrase-level Elements
Origination
Material and Object Type
Watermarks and Stamps
Dimensions
References to Locations within a Manuscript
Identifying a Location
Linking a Location to a Transcription or an Image
Using Multiple Location Schemes
Names of Persons, Places, and Organizations
Catchwords, Signatures, Secundo Folio
Heraldry
+ réclames
+ describes the system used to ensure
+correct ordering of the quires making up a codex or incunable,
+typically by means of annotations at the foot of the page.
+ 일반적으로 페이지의 밑에 표시되며, 제본되지 않은 원고 또는 고판본의 정확한 순서를 보장하는 체계를 기술한다.
+ 描述一疊書頁裝訂成手抄本或書冊時,確保書頁順序無誤的方法,通常是利用頁腳的註記。
+ 古典籍において,冊子や初期刊本の折丁の順番を正しくするために使用され
+ るシステムを示す.一般には,ページの脚に注釈(つなぎことば)を記す.
+ décrit le système utilisé pour s'assurer que les
+ cahiers formant un manuscrit ou un incunable sont dans le bon ordre, typiquement au moyen
+ d'annotations en bas de page.
+ describe el sistema utilizado para garantizar la ordenación correcta de los cuadernos que constituyen un códex o un incunable, obtenido normalmente por medio de anotaciones a pie de página.
+ descrive il sistema utilizzato per garantire l'ordinamento corretto dei quaderni che costituiscono un codice o incunabolo, ottenuto solitamente tramite annotazioni a piè di pagina
+
+
+
+
+
+
+
+
+
+ Vertical catchwords in the hand of the scribe placed along
+the inner bounding line, reading from top to bottom.
+
+
+
+
+
+
+ dimensions
+ contains a dimensional specification.
+ 어떤 차원의 명세를 포함한다.
+ 尺寸的詳細說明。
+ 大きさ・程度を示す.
+ contient une spécification des dimensions.
+ contiene cualquier tipo de especificación referente a las dimensiones.
+ contiene una qualsiasi indicazione relativa alle dimensioni
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+The element may appear once only
+
+
+The element may appear once only
+
+
+The element may appear once only
+
+
+
+
+
+ indicates which aspect of the object is being measured.
+ 대상의 어떤 측면이 측정되고 있는지를 나타낸다.
+ 指出物件被測量的部分。
+ 当該計測対象を示す.
+ indique quel aspect de l'objet est mesuré.
+ indica que aspecto del objeto se mide.
+ indica quale aspetto dell'oggetto viene misurato
+
+
+
+ dimensions relate to one or more leaves (e.g. a single leaf, a
+gathering, or a separately bound part)
+ 하나 이상의 종이의 장과 관련된 차원(예, 한 장, 접지 모음, 또는 각각 분리되어 엮여진 부분)
+ 一張或多張頁面的尺寸大小 (例如單一頁面、聚集頁面、或分開裝訂的部份)
+ las dimensiones se relacionan con una o más hojas (p.ej. una sola hoja, un conjunto, o un intervalo)
+ 葉の状態を示す.例えば,一葉,葉の丁合(折丁),独立した一枚を
+ まとめたもの,など.
+ Les dimensions concernent une ou
+plusieurs feuilles (par exemple une feuille unique, un ensemble de
+feuilles ou une partie reliée séparément).
+ le dimensioni si riferiscono a uno o più fogli (per esempio un foglio, una raccolta, o una parte rilegata separatamente)
+
+
+ dimensions relate to the area of a leaf which has been ruled in
+preparation for writing.
+ 글쓰기를 준비하기 위해 줄 그은 종이 부분과 관련된 차원
+ 頁面上劃好線以備書寫的範圍大小。
+ las dimensiones se refieren al área de una hoja que se ha preparado para la escritura.
+ 書記の準備として罫が引かれている領域を示す.
+
+ Les dimensions concernent la zone de
+la réglure d'une feuille.
+ le dimensioni si riferiscono alla porzione di un foglio sulla quale sono state disegnate delle righe al fine di scriverci
+
+
+ dimensions relate to the area of a leaf which has been pricked
+out in preparation for ruling (used where this differs significantly
+from the ruled area, or where the ruling is not measurable).
+ (줄 그은 영역과 다르거나 영역 구분이 측정되지 않은 곳에서 사용되는) 줄을 긋기 위한 준비 과정에서 구멍 뚫은 영역과 관련된 차원
+ 頁面上刺好記號以備劃線的範圍大小 (用在和畫線範圍不同的位置,或是畫線無法測量的位置) 。
+ las dimensiones se refieren al área de una hoja que ha sido agujereada en la preparación para la escritura (utilizado donde esto difiere significativamente del área lineada, o donde la lineación no es mensurable).
+ 罫を引く準備として開けられた穴がある領域を示す.これは,罫付
+ き領域とも,罫が読み取れない領域とも異なる.
+ Les dimensions concernent la zone
+d'une feuille qui a été piquée pour préparer la réglure (à utiliser
+lorsqu'elle diffère significativement de la zone réglée ou lorsque la
+réglure n'est pas mesurable).
+ le dimensioni si riferiscono alla porzione di un foglio sulla quale è stata indicata la posizione dei fori da praticare al fine di imprimervi delle righe (si usa quando la porzione da rigare è molto diversa da quella già rigata o quando la rigatura non è misurabile)
+
+
+ dimensions relate to the area of a leaf which has been written,
+with the height measured from the top of the minims on the top line of
+writing, to the bottom of the minims on the bottom line of writing.
+ 글의 첫 번째 줄 상단부터 마지막 줄 하단까지 측정된 높이를 통해 한 장의 글 쓴 영역과 관련된 차원
+ 頁面上已書寫文字的範圍大小,高度由最頂行文字的頂端測量至最底行文字的底端。
+ las dimensiones se refiere al área de una hoja que ha sido escrita, con la altura medida desde la línea superior de escritura a la parte inferior de la última línea de la escritura.
+ 書記領域を示す.先頭文字行から最終文字行までの高さ.
+
+ Les dimensions concernent la zone
+écrite de la feuille, dont la hauteur est mesurée depuis le haut des
+blancs sur la ligne d'écriture supérieure jusqu'au dernier des blancs
+sur la dernière ligne écrite.
+ le dimensioni si riferiscono ad un'area del foglio su cui è stato scritto e la cui altezza è misurata dalla cima degli uncini sulla prima riga scritta fino al fondo degli uncini sull'ultima riga scritta
+
+
+ dimensions relate to the miniatures within the manuscript
+ 원고의 축소형과 관련된 차원
+ 手稿中圖畫的尺寸大小
+ las dimensiones relativas a las miniaturas del manuscrito
+ 当該手書き資料の彩飾図の大きさを示す.
+
+ Les dimensions concernent les
+miniatures contenues dans le manuscrit.
+ le dimensioni si riferiscono alle miniature contenute nel manoscritto
+
+
+ dimensions relate to the binding in which the codex or manuscript is contained
+ 미제본 원고 또는 원고를 포함하는 제본과 관련된 차원
+ 手抄本或手稿裝訂的尺寸大小
+ las dimensiones se refieren a la encuadernación que contiene el códice o el manuscrito
+ 冊子や写本全体の大きさを示す.
+
+ Les dimensions concernent la reliure
+qui contient le codex ou le manuscrit.
+ le dimensioni si riferiscono alla rilegatura nella quale è contenuto il codice o manoscritto
+
+
+ dimensions relate to the box or other container in which the
+manuscript is stored.
+ 원고가 보관된 박스 또는 용기와 관련된 차원
+ 手稿所儲存的箱子或其他容器的尺寸大小
+ las dimensiones se refieren a la caja o a cualquier otro contenedor en qué se conserva el manuscrito.
+ 当該写本を入れるケースの大きさを示す.
+
+ Les dimensions concernent la boîte ou
+autre conteneur dans lequel le manuscrit est conservé.
+ le dimensioni si riferiscono alla scatola o ad altro contenitore nel quale è custodito il manoscritto
+
+
+
+
+
+
+
+ 157-160
+ 105
+
+
+ 90
+ 48
+
+
+ 12
+ 10
+
+
+
+
+
+
+ 328 (336)
+ 203
+ 74
+
+
+
+
+
Quand de simples quantités numériques sont impliquées, elles peuvent être exprimées par
+ l'attribut quantity sur chaque ou sur tous les éléments enfants, comme dans
+ l'exemple suivant :
This element may be used to record the dimensions of any
+text-bearing object, not necessarily a codex. For example:
+
+
+ 7004
+ 1803
+ 345
+
+
+
This might be used to show that the inscribed panels on some (imaginary)
+monument are all the same size (7004 by 1803 cm) and stand out from
+the rest of the monument by 345 mm.
+
+
+
+
When simple numeric quantities are involved, they may be
+ expressed on the quantity attribute of any or all of
+ the child elements, as in the following example:
+
+
+ 157-160
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Contains no more than one of each of the specialized elements
+ used to express a three-dimensional object's height, width, and
+ depth, combined with any number of other kinds of dimensional
+ specification.
+
+
+
Contient la mesure de la hauteur, de la largeur et de la profondeur d'un objet à 1,
+ 2 ou 3 dimensions.
+
+
+
+ 対象物の高さ,幅,奥行きの大きさを示す.
+
+
+
+
+
+
+ contains any single measurement forming part of a dimensional
+specification of some sort.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
The specific elements width, height, and
+depth should be used in preference to this generic element
+wherever appropriate.
+
+
+
+
+
+ hauteur
+ contains a measurement measured along the
+ axis at right angles to the bottom of the written surface,
+ i.e. parallel to the spine for a codex or book.
+ 책의 높이 치수를 포함한다.
+ 沿著與書脊平行的軸線所量出的測量值。
+ 背に沿って計測された大きさを示す.
+ contient une dimension prise sur l'axe parallèle au
+ dos du manuscrit.
+ refiere la medida tomada del largo del eje paralelo del dorso.***
+ si riferisce a una misurazione presa lungo l'asse parallelo al dorso
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
If used to specify the height of a non text-bearing
+portion of some object, for example a monument, this element
+conventionally refers to the axis
+perpendicular to the surface of the earth.
+
+
+
+
+
+ épaisseur
+ contains a measurement measured across the
+ spine of a book or codex, or (for other text-bearing objects) perpendicular to the measurement given by the
+ width element.
+ 책의 등(두께) 치수를 명시한다.
+ 橫跨書脊的測量值。
+ 冊子の背と平行した深さを示す.
+ contient une dimension mesurée sur le dos du
+ manuscrit.
+ refiere la medida tomada del ancho del dorso.***
+ si riferisce a una misurazione presa lungo la larghezza del dorso
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 64
+
+
+
+
If used to specify the width of a non text-bearing
+portion of some object, for example a monument, this element
+conventionally refers to the axis
+facing the observer, and perpendicular to that indicated by the
+width axis.
+
+
+
+
+
+ largeur
+ contains a measurement measured along the
+ axis parallel to the bottom of the written surface, i.e.
+perpendicular to the spine of a book or codex.
+ 책의 너비 치수를 명시한다.
+ 沿著與書脊垂直的軸線所量出的測量值
+ 背に対して直角に計測される計測値を示す.
+ contient une dimension mesurée sur l'axe
+ perpendiculaire au dos du manuscrit.
+ contiene la medida tomada al largo del eje perpendicular del dorso.***
+ si riferisce a una misurazione presa lungo l'asse perpendicolare al dorso
+
+
+
+
+
+
+
+
+
+
+
+ 4
+
+
+
+
+ 240
+
+
+
+
If used to specify the depth of a non text-bearing
+portion of some object, for example a monument, this element
+conventionally refers to the axis
+facing the observer, and perpendicular to that indicated by the
+depth axis.
+
+
+
+
+
+ héraldique
+ contains a heraldic formula
+or phrase, typically found as part of a blazon, coat of arms, etc.
+
+ 보통 문장이 새겨진 방패의 일부로 사용되는 문장 형식 또는 구를 포함한다.
+ 包含一個紋章學的常規或詞彙,通常是裝飾、或盾形紋章等的一部分。
+ 紋章学的記述を含む.例えば,紋章記述や紋章など.
+ contient une devise ou une formule d'héraldique,
+ comme celles qu'on trouve sur un blason, des armoiries, etc.
+ contiene una fórmula o frade heráldica, normalmente parte de un escudo de armas, blasón, etc.
+ contiene una formula araldica di solito parte di uno stemma, blasone, ecc.
+
+
+
+
+
+
+
+
+
+
Ownership stamp (xvii cent.) on i recto with the arms
+A bull passant within a bordure bezanty,
+in chief a crescent for difference [Cole],
+crest, and the legend Cole Deum.
+
+
+
+
+
Barbey, en Normandie : d'azur, à deux bars adossés d'argent ; au chef cousu de
+ gueules, chargé de trois tourteaux d'or..
+
+
+
+
+
+
+ locus
+ defines a location within a manuscript or manuscript part, usually as a
+ (possibly discontinuous) sequence of folio references.
+ 원고 또는 원고의 일부 내에서 위치를 정의한다.
+ 定義一個手稿或手稿部分裡的位置,通常是用一系列的 (可能不連續的) 頁面參照。
+ 手書き資料中の場所を定義する.一般には,(多くの場合不連続の)一連の折 丁参照による.
+ définit un emplacement au sein d'un manuscrit ou d'une
+ partie de manuscrit, souvent une séquence, éventuellement discontinue, de références de
+ feuillets.
+ define una posición al interno de un manuscrito o de una
+ de sus partes, generalmente como secuencia (no necesariamete contínua) de referencias de
+ folios.
+ definisce una posizione all'interno di un manoscritto o
+ di una sua parte, generalmente come sequenza (non necessariamete continua) di riferimenti di
+ fogli
+
+
+
+
+
+
+
+
+
+
+ système
+ identifies the foliation scheme in terms of which the location is being
+ specified by pointing to some foliation element
+ defining it, or to some other equivalent resource.
+ 명시된 위치를 정해 주는 책의 장 수 매김 방식을 규정한다.
+ 說明所指出位置的編頁架構。
+ 当該場所を指定するための折丁スキームを特定する.
+ désigne le système de foliotation utilisé pour
+ localiser la subdivision du manuscrit qui est en cours de description.
+ identifica la foliación en base a la posición
+ especificada.
+ identifica la foliazione in base alla posizione
+ specificata
+
+
+
+ depuis
+ specifies the
+ starting point of the location in a normalized form, typically a
+ page number.
+ 표준화된 형식의 위치에서 시작 지점을 명시한다.
+ 用正規格式指明該位置的起始點。
+ 正規化された形で,当該場所の始点を示す.
+ Spécifie, sous une forme normalisée, le point de
+ départ de la localisation.
+ indica el punto de inicio de una localización en una
+ forma estándard.
+ specifica l'inizio della posizione in forma
+ normalizzata
+
+
+
+ jusqu'à
+ specifies the
+ end-point of the location in a normalized form, typically as a
+ page number.
+ 표준화된 형식으로 종료 지점을 명시한다.
+ 用正規格式指明該位置的結束點。
+ 正規化された形で,当該場所の終点を示す.
+ Spécifie, sous une forme normalisée, la borne de fin
+ pour la localisation.
+ indica el punto final de una localización en una
+ forma estándard.
+ specifica il termine della posizione in forma
+ normalizzata
+
+
+
+
+
+
+
+ ff. 1r-2r
+ Ben Jonson
+ Ode to himself
+ An Ode to him selfe.
+ Com leaue the loathed stage
+ And see his chariot triumph ore his wayne.
+ Beal, Index 1450-1625, JnB 380
+
+
+
+
+
+
+
+
+
+
+
+
+
+ ff. 1r-2r
+ Ben Jonson
+ Ode to himself
+ An Ode to him selfe.
+ Com leaue the loathed stage
+ And see his chariot triumph ore his wayne.
+ Beal, Index 1450-1625, JnB 380
+
+
+
+
+
+
+
+
The facs attribute is available globally when the transcr module is included in a schema. It may be used to point directly to an
+ image file, as in the following example:
The facs attribute is available globally when the transcr module is included in a schema. It may be used to point directly to an
+ image file, as in the following example:
The target attribute should only be used to point to elements that contain or
+ indicate a transcription of the locus being described, as in the first example above. To
+ associate a locus element with a page image or other comparable representation, the
+ global facs attribute should be used instead, as shown in the second example. Use
+ of the target attribute to indicate an image is strongly deprecated. The
+ facs attribute may be used to indicate one or more image files, as above, or
+ alternatively it may point to one or more appropriate XML elements, such as the
+ surface, zone element, graphic, or binaryObject
+ elements.
+
+
+
L'attribut target doit être utilisé uniquement pour pointer vers des éléments contenant ou référençant une transcription de la partie du manuscrit ainsi localisée, comme dans le premier exemple ci-dessus. Pour associer un élément locus avec l'image d'une page ou avec une autre représentation similaire, on doit utiliser l'attribut global facs, comme le montre le deuxième exemple. L'attribut target est déprécié pour établir un lien vers une image. On utilise l'attribut facs, soit pour établir un lien vers un ou plusieurs fichiers image, comme ci-dessus, soit pour pointer vers un ou plusieurs éléments dédiés, tels que
+ surface, zone, graphic ou binaryObject.
+
+
+
When the location being defined consists of a single page, use
+ the from and to attributes with an identical
+ value. When no clear endpoint is given the from attribute
+ should be used without to. For example, if the manuscript
+ description being transcribed has p. 3ff as the locus.
+
+
+
+
+
+ groupe d'emplacements
+ groups a number of locations which together form a
+ distinct but discontinuous item within a manuscript or manuscript
+ part, according to a specific foliation.
+
+ regroupe un certain nombre d'emplacements qui forment ensemble un item identifiable bien que discontinu dans un manuscrit ou une partie de manuscrit selon une foliotation spécifique.
+
+
+
+
+
+
+
+
+
+
+
+ système
+ identifies the foliation scheme in terms of which all the
+ locations contained by the group are specified by pointing to some foliation element
+ defining it, or to some other equivalent resource.
+ désigne le système de foliotation selon lequel les emplacements contenus dans le groupe sont définis.
+
+
+
+
+
+
+
+ Bl. 13--26
+ 37--58
+ 82--96
+
+ Stücke von Daniel Ecklin’s Reise ins h. Land
+
+
+
+
+
+
+
+
+
+
+ matériau
+ contains a word or phrase describing the
+ material of which the object being described is composed.
+ 원고(또는 원고의 일부)를 구성하는 자료를 기술하는 단어 또는 구를 포함한다.
+ 用一個字詞描述手稿 (或手稿部分) 的組成材料。
+ 手書き資料を構成する素材を表す語句を示す.
+ Contient un mot ou une expression décrivant le ou les matériau(x)
+ utilisé(s) pour fabriquer un manuscrit (ou une partie d'un manuscrit).
+ contiene una palabra o sintagma que describe el material del que se compone un manuscrito (o parte del manuscrito).
+ contiene una parola o un'espressione che descrive il materiale di cui è composto un manoscritto (o una sua parte)
+
+
+
+
+
+
+
+
+
+
+
+
+
Parchment leaves with a
+sharkskin binding.
+
+
+
+
+
+
Entrelacs géométriques Reliure en maroquin brun jaspé
+
+
+
+
+
+
羊皮 頁面用
+ 鯊魚皮
+ 捆綁
+
+
+
+
+
The ref attribute may be used to point to one
+or more items within a
+taxonomy of types of material, defined either internally or
+externally.
+
+
+
+
+
+ type d'objet
+ contains a word or phrase describing the type of object being referred to.
+ contient un mot ou une expression qui décrit le type de l'objet consideré.
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Paper and vellum codex in modern cloth binding.
+
+
+
+
+
+
+
Fragment of a re-used marble funerary stele.
+
+
+
+
+
+
+
+
Codex avec feuilles de parchemin colorées avec la pourpre du murex.
+
+
+
+
+
+
+
+
Socle fragmentaire d'Aphrodite Anadyomène en terre cuite.
+
+
+
+
+
The ref attribute may be used to point to one
+or more items within a taxonomy of types of object, defined either internally or
+externally.
+
+
+
+
+
+ origin date
+ 생성 날짜
+
+ fecha origen
+ date de la création
+ data di origine
+ contains any form of date, used to
+ identify the date of origin for a manuscript or manuscript part.
+ 원고 또는 원고의 일부의 생산 날짜를 식별하는 날짜 형식을 포함한다.
+ 包含任何格式的日期,用以確認手稿或手稿部分的來源日期。
+ 手書き資料が生まれた日付を特定するたための日付を示す.
+ Contient une date, dans une forme libre, utilisée
+ pour dater la création d'un manuscrit ou d'une partie d'un manuscrit.
+ contiene cualquier tipo de fecha utilizada para indicar la fecha de origen de un manuscrito o de una de sus partes.
+ contiene una data espressa in una forma qualsiasi utilizzata per indicare la data di origine di un manoscritto o di una sua parte
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 3rd century BCE
+
+
+
+
+ 3rd century BCE
+
+
+
+
+ 西元前三世紀
+
+
+
+
+
+
+ origin place
+ 생산 장소
+
+ lugar de origen
+ lieu de création
+ luogo di origine
+ contains any form of place name, used to identify the
+place of origin for a manuscript or manuscript part.
+ 원고 또는 원고의 일부를 생산한 장소를 식별하는 장소 이름 형식을 포함한다.
+ 包含任何格式的地名,用以確認手稿或手稿部分的來源地點。
+ 手書き資料が生まれた場所を特定するための場所を示す.
+ Contient un nom de lieu, dans une forme libre,
+ utilisé pour désigner l'endroit où a été produit un manuscrit ou une partie d'un
+ manuscrit.
+ contiene cualquier tipo de nombre de lugar utilizado para indicar el lugar de origen de un manuscrito o de una de sus partes.
+ contiene un qualsiasi nome di luogo utilizzato per indicare il luogo di origine di un manoscritto o di una sua parte
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Birmingham
+
+
+
+
+ Birmingham
+
+
+
+
+ 伯明罕
+
+
+
+
The type attribute may be used to distinguish
+different kinds of origin, for example original
+place of publication, as opposed to original place of
+printing.
+
+
+
+
+
+ second folio
+ 두 번째 장
+
+ segundo folio
+ deuxième folio
+ secondo foglio
+ marks the word or words taken from a fixed point
+in a codex (typically the beginning of the
+second leaf) in order
+to provide a unique identifier for it.
+
+
+ 고유한 확인소를 제공하기 위해 미제본 원고의 고정 위치(일반적으로 두 번째 장의 시작)에서 얻어진 단어 또는 단어군
+ 從手抄本中固定位置所拿開的一個或多個字 (通常在第二張書頁的開頭) ,目的是提供一個專有的識別符號。
+ ユニークな識別子を示すために,冊子中の特定点にある単語を示す.
+ Le mot ou les mots repris d'un point précisément
+ connu d'un codex (comme le début du second feuillet) pour identifier celui-ci de façon
+ univoque.
+ la palabra o palabras extraídas de un punto preciso de un códex (normalmente el inicio del segundo folio) con el fin de identificar lo mismo en modo unívoco.
+ la parola o le parole estratte da un punto preciso di un codice (di solito l'inizio del secondo foglio) al fine di identificare lo stesso in modo univoco
+
+
+
+
+
+
+
+
+
+ (con-)versio morum
+
+
+
+
+ (con-)versio morum
+
+
+
+
+ 当臥遊適
+
+
+
+
+
+
+ signatures
+ contains discussion of the leaf or quire signatures found within a codex.
+ 미제본 원고 내의 장 또는 절 표시를 포함한다.
+ 包含手抄本中一張或一疊書頁內簽名的敘述。
+ 冊子における葉または折丁の記号に関する情報を示す.
+ Contient une étude des signatures trouvées sur un
+ feuillet ou sur un cahier dans un manuscrit.
+ contiene el registro de las signaturas del folio o del cuaderno pertenecientes al códex.
+ contiene il registro delle segnature del foglio o del quaderno appartenenti al codice
+
+
+
+
+
+
+
+
+
+ Quire and leaf signatures in letters, [b]-v, and roman
+numerals; those in quires 10 (1) and 17 (s) in red ink and different
+from others; every third quire also signed with red crayon in arabic
+numerals in the center lower margin of the first leaf recto: "2" for
+quire 4 (f. 19), "3" for quire 7 (f. 43); "4," barely visible, for
+quire 10 (f. 65), "5," in a later hand, for quire 13 (f. 89), "6," in
+a later hand, for quire 16 (f. 113).
+
+
+
+
+ Quire and leaf signatures in letters, [b]-v, and roman numerals; those in quires
+ 10 (1) and 17 (s) in red ink and different from others; every third quire also signed with
+ red crayon in arabic numerals in the center lower margin of the first leaf recto: "2" for
+ quire 4 (f. 19), "3" for quire 7 (f. 43); "4," barely visible, for quire 10 (f. 65), "5,"
+ in a later hand, for quire 13 (f. 89), "6," in a later hand, for quire 16 (f.
+ 113).
+
+
+
+
+ 正文前有朱紅藏印: 「武陵人」朱文橢圓印、「國立中央圖/書館收藏」朱文長方印、「奕/修」朱文方印、「約/齋」朱文雙{234245}方印。
+
+
+
+
+
+
+ cachet
+ contains a word or phrase describing a
+stamp or similar device.
+ 스탬프 또는 유사한 도구를 기술하는 단어 또는 구를 포함한다.
+ 包含一個字詞,描述一個印記或是類似圖案。
+ 印などにある語句を示す.
+ Contient un mot ou une expression décrivant un cachet ou
+ une marque du même genre.
+ contiene una parola o un sintagma che descrive un timbro o simile
+ contiene una palabra o sintagma que describe un sello o una técnica similar.
+
+
+
+
+
+
+
+
+
+
+
+ Apologyticu TTVLLIANI AC IGNORATIA IN XPO IHV
+SI NON LICET
+NOBIS RO
+manii imperii Bodleian stamp
+
+
+
+
+
+
+ Apologyticu TTVLLIANI AC IGNORATIA IN XPO IHV SI NON LICET NOBIS RO
+ manii imperii Bodleian stamp
+
+
+
+
+
+
+ 乾隆御覽之寶清乾隆玉璽
+
+
+
+
+
+
+
+
+ filigrane
+ contains a word or phrase describing a
+watermark or similar device.
+ 워터마크 또는 유사 도구를 기술하는 단어 또는 구를 포함한다.
+ 包含一個字詞,描述一個浮水印或是類似圖案。
+ すかし模様などを表す語句を示す.
+ Contient un mot ou une expression décrivant un filigrane
+ ou une marque du même genre.
+ contiene una palabra o sintagma que describe una filigrana o una técnica similar.
+ contiene una parola o espressione che descrive la filigrana o una tecnica simile
+
+
+
+
+
+
+
+
+
+
+
+
The Manuscript Identifier
+ manuscript identifier
+ 원고 확인소
+
+ identificador del manuscrito
+ identifiant du manuscrit
+ identificatore del manoscritto
+ contains the information required to identify
+the manuscript being described.
+ 기술되고 있는 원고를 식별하기 위해 필요한 정보를 포함한다.
+ 包含識別敘述中的手稿所需要的資訊。
+ 解説されている手書き資料を特定するために必要な情報を示す.
+ Contient les informations requises pour identifier le
+ manuscrit en cours de description.
+ contiene la información necesaria para identificar el manuscrito que se examina.
+ contiene l'informazione necessaria a identificare il manoscritto esaminato
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ An msIdentifier must contain either a repository or location of some type, or a manuscript name
+
+
+
+
+
+ San Marino
+ Huntington Library
+ MS.El.26.C.9
+
+
+
+
+
+
+ France
+ Paris
+ Bibliothèque nationale de France. Réserve des livres rares>
+ B- 73
+
+
+ B-121
+ Cote de la bibliothèque royale au XVIIIe siècle (inscrite à l'encre, sur la
+ doublure de tabis).
+
+
+ Double de B. 274. A (Réserve)
+ Cote inscrite face à la page de titre, en remplacement de la cote "1541",
+ barrée
+
+
+
+
+
+
+
+ 台北
+ 故宮博物院
+ MS.El.26.C.9
+
+
+
+
+
+
+
+ institution
+ contains the name of an organization such as a university or
+ library, with which a manuscript is identified, generally its
+ holding institution.
+ 식별된 원고를 보유하고 있는 대학교 또는 대학 도서관과 같은 조직의 이름을 포함한다.
+ 包含一個組織名稱,例如大學或圖書館,手稿屬於該組織,通常是手稿所在地。
+ 手書き資料を特定する,一般にはそれを所蔵する大学や図書館といった組織
+ の名前を示す.
+ Contient le nom d'un organisme (comme une université
+ ou une bibliothèque), avec lequel un manuscrit est identifié ; en général c'est le nom de
+ l'institution qui conserve ce manuscrit.
+ contiene el nombre de una organización (una universidad o una biblioteca por ejemplo) donde se encuentra el manuscrito.***
+ contiene il nome di un'organizzazione (per esempio un'università o una biblioteca) nella quale si trova il deposito del manoscritto
+
+
+
+
+
+
+
+
+
+
+
+ Oxford
+ University of Oxford
+ Bodleian Library
+ MS. Bodley 406
+
+
+
+
+
+
+
+
+
+
+ lieu de conservation
+ contains the name of a repository within which manuscripts are stored, possibly forming part of an institution.
+ 기관의 부분을 형성하며, 원고를 보유하고 있는 보유 서고명을 포함한다.
+ 包含該手稿收藏所在地的名稱,可能是某機構的一部分。
+ 手書き資料が収められている収蔵館の名前を示す.恐らく,団体の名前の一
+ 部である.
+ Contient le nom d'un dépôt dans lequel des manuscrits
+ sont entreposés, et qui peut faire partie d'une institution.
+ contiene el nombre de un depósito, parte o no de una institución, en el que se conservan los manuscritos.
+ contiene il nome di un deposito, parte o meno di un'istituzione, nel quale sono conservati i manoscritti
+
+
+
+
+
+
+
+
+
+
+
+ Oxford
+ University of Oxford
+ Bodleian Library
+ MS. Bodley 406
+
+
+
+
+
+
+
+ collection
+ contains the name of a collection of
+manuscripts, not necessarily located within a single repository.
+ 하나의 장서고 내에 반드시 위치할 필요는 없지만 원고의 모음집 이름을 포함한다.
+ 包含手稿集合的名稱,手稿未必皆位於單一收藏點。
+ 手書き資料のコレクション名を示す.必ずしも一ヶ所に保管されている必要
+ はない.
+ Contient le nom d'une collection de manuscrits,
+ ceux-ci ne se trouvant pas nécessairement dans le même lieu de conservation.
+ contiene el nombre de una colección de manuscritos, no necesariamente colocados en un único depósito.
+ contiene il nome di una raccolta di manoscritti non necessariamente collocati in un unico deposito
+
+
+
+
+
+
+
+
+
+
+
+ USA
+ California
+ San Marino
+ Huntington Library
+ Ellesmere
+ El 26 C 9
+ The Ellesmere Chaucer
+
+
+
+
+
+
+
+ alternative identifier
+ 대체 확인소
+ 替換識別符碼
+ autre identifiant
+ identificador alternativo
+ identificatore alternativo.
+
+ contains an alternative or former structured identifier used for a manuscript, such as a former catalogue number.
+ 이전의 카탈로그의 번호와 같이 원고에 사용된 대체 또는 이전에 구조화된 확인소를 포함한다.
+ 包含手稿中的一個替換或先前使用的識別符碼,例如先前的分類碼。
+ 当該手書き資料を示す,代わりとなるIDまたは昔のIDを示す.例えば,昔の
+ カタログ番号など.
+ Contient un autre ou un ancien identifiant pour un
+ manuscrit, par exemple un numéro anciennement utilisé dans un catalogue.
+ contiene un identificador estructurado, alternativo o precedente, utilizado para un manuscrito, p.ej. un número antiguo de catalogación.
+ contiene un identificatore strutturato alternativo o precedente utilizzato per un manoscritto, per esempio un precedente numero di catalogazione
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ San Marino
+ Huntington Library
+ MS.El.26.C.9
+
+
+
+
+
+
+ B 106
+ Cote de la Bibliothèque royale au XVIIIe siècle.
+
+
+
+
+
+
+ 台北市中正區
+ 國立歷史博物館
+ MS.El.26.C.9
+
+
+
+
+
Un numéro identifiant quelconque doit être fourni s'il est connu ; si on ne le
+ connaît pas, cela devrait être signalé.
+
+
+ 識別番号が判る場合は,示す必要がある.判らない場合は,そのことを示
+ すべきである.
+
+
+
+
An identifying number of some kind must be supplied if
+ known; if it is not known, this should be stated.
+
+
+
+
+
+ alternative name
+ 이명
+ 替換名稱
+ autre nom
+ nombre alternativo.
+ nome alternativo
+ contains any form of unstructured alternative
+name used for a manuscript, such as an ocellus
+nominum, or nickname.
+ ocellus nominum 또는 별명처럼 원고에 사용된 어떤 형식의 구조화되지 않은 이명(대체명)을 포함한다.
+ 包含手稿無特定結構的任何形式替換名稱,像是ocellus nominum或是暱稱。
+ 手書き資料を示す構造化されていない別名の形式を示す.例えば,
+ ocellus nominumなどの愛称など.
+ contient un autre nom, dans une forme libre, utilisé pour désigner le manuscrit, tel qu'un surnom ou un ocellus nominum.
+ contiene cualquier forma de nombre alternativo no estructurado usado para un manuscrito, como por ejemplo ocellus nominum, o sobranombre.
+ contiene un qualsiasi nome alternativo non strutturato utilizzato per un manoscritto, per esempio ocellus
+nominum, o soprannome
+
+
+
+
+
+
+
+
+
+ The Vercelli Book
+
+
+
+
+ The Vercelli Book
+
+
+
+
+
+ 心經
+
+
+
+
+
+
The Manuscript Heading
Intellectual Content
The msItem and msItemStruct Elements
Authors and Titles
Rubrics, Incipits, Explicits, and Other Quotations from the Text
Filiation
Text Classification
Languages and Writing Systems
+ colophon
+ contains the colophon
+of a manuscript item: that is, a statement providing information regarding the date, place, agency, or reason for production of the manuscript.
+ 원고의 colophon(판권 표지 장)를 포함한다; 즉, 원고 생산에 대한 날짜, 장소, 대리권, 또는 이유와 관련한 정보를 제공하는 서술
+ 包含一個手稿項目的 版權頁標記:即提供日期、地點、代理機構、或手稿產生原因等資訊的聲明。
+ 当該手書き資料のコロフォン(奥付情報)を示す.例えば,制
+ 作の日時,場所,主体,制作主体,制作理由など.
+ contient le colophon d'une section d'un
+ manuscrit, c'est-à-dire la transcription des informations relatives à la date, au lieu, à
+ l'organisme commanditaire ou aux raisons de la production du manuscrit.
+ contiene el colophon de un manuscrito, es decir, una declaración que contiene informaciones relativas a fecha, lugar, agente, o finalidad de la producción del manuscrito.
+ contiene il colophon
+di un manoscritto, ovvero una dichiarazione contenente informazioni relative a data, luogo, committente, o motivo della produzione del manoscritto
+
+
+
+
+
+
+
+
+
+ Ricardus Franciscus Scripsit Anno Domini
+ 1447.
+
+
+
+
+ Orate pro scriba que scripsit hunc librum : Nomen ejus Elisabeth.
+
+
+
+
+ Explicit expliceat/scriptor ludere eat.
+
+
+
+
+ Explicit venenum viciorum domini illius, qui comparavit Anno domini Millessimo
+ Trecentesimo nonagesimo primo, Sabbato in festo sancte Marthe virginis gloriose. Laus tibi
+ criste quia finitur libellus iste.
+
+
+
+
+ 大明萬曆甲寅夏季月。西蜀輔慈沙門明昱書
+
+
+
+
+ 宋咸淳五年歲在己巳八月上日。四明福泉沙門志磐寓東湖月波山。謹序。
+
+
+
+
+
+
+
+
+
+ Explicit expliceat/scriptor ludere eat.
+
+
+
+
+ Explicit venenum viciorum domini illius, qui comparavit Anno
+domini Millessimo Trecentesimo nonagesimo primo, Sabbato in festo
+sancte Marthe virginis gloriose. Laus tibi criste quia finitur
+libellus iste.
+
+
+
+
+
+
+ explicit
+ contains the explicit of a
+manuscript item, that is, the closing words of the text proper,
+exclusive of any rubric or colophon which might follow it.
+ 원고의 explicit(끝 말)을 포함한다, 즉, 이어 나타날 수 있는 주서 또는 판권 페이지를 제외한 텍스트의 마무리 단어
+ 包含手稿項目中的 結尾語,即文本完成時的結尾語,不包含可能出現在其後的按語或版權頁標記。
+ 手書き資料の巻末語句(explicit)を示す.すなわち,当該テ
+ キストの終了を示す語句のことである.これは,朱書き部分(rubric)やコロ
+ フォン(奥付情報)とは異なる.
+ contient l'explicit d'une section d'un
+ manuscrit, c'est-à-dire les mots terminant le texte proprement dit, à l'exclusion de toute
+ rubrique ou colophon qui pourraient le suivre.
+ contiene el explicit de un manuscrito, es decir, las palabras de clausura del texto como tal, a excepción de las eventuales rúbricas o colofón sucesivos.
+ contiene l' explicit di un manoscritto, ovvero le parole di chiusura del testo vero e proprio, a esclusione di eventuali titoli in rosso o colophon successivi
+
+
+
+
+
+
+
+
+
+
+
+ sed libera nos a malo.
+ Hic explicit oratio qui dicitur dominica.
+ ex materia quasi et forma sibi
+proporti
+
+ saued be shulle that doome of day the at
+
+
+
+
+
+ sed libera nos a malo.
+ Hic explicit oratio qui dicitur dominica.
+ ex materia quasi et forma sibi proporti
+
+ saued be shulle that doome of day the at
+
+
+
+
+ 佛說是經已。諸比丘聞佛所說。歡喜奉行。
+
+
+
+
+
+
+ filiation
+ contains information concerning the manuscript's filiation, i.e. its relationship to other surviving manuscripts of the same text, its protographs, antigraphs and apographs.
+ 원고의 filiation(내력)에 관한 정보를 포함한다, 즉, protographs, antigraphs, apographs과 같이 동일 텍스트에 대한 다른 잔존 원고의 관계.
+ 包含手稿的來歷相關資訊,例如該手稿和其他相同文字內容的現存手稿之間的關係、以及該手稿的原稿、 抄本、以及謄本。
+ 手書き資料の親子関係,すなわち,同じテキストを持つ現存
+ する手書き資料と,その原本(protographs),
+ 異本(antigraphs), 転写本(apographs)との関係.
+ contient les informations sur la
+ filiation du manuscrit, c'est-à-dire sur ses relations avec d'autres manuscrits
+ connus du même texte, ses protographes, antigraphes et
+ apographes.
+ contiene información referente a la filiación de un manuscrito, p.ej. su relación con otros manuscritos supervivientes del mismo texto, es decir, sus protógrafos, antígrafos y apógrafos.
+ contiene informazioni relative alla filiazione del manoscritto, cioè la sua relazione con altri manoscritti sopravvissuti per lo stesso testo, cioè i suoi protografi, antigrafi e apografi
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Beljakovski sbornik
+ Bulgarian
+ Middle Bulgarian
+
+ Dujchev N 17
+
+
+
+
+
+
+ Faraway
+
+
+
+
+
In this example, the reference to Dujchev N17 includes a
+link to some other manuscript description which has the identifier DN17.
The "Guan-ben" was widely current among mathematicians in the
+ Qing dynasty, and "Zhao Qimei version" was also read. It is
+ therefore difficult to know the correct filiation path to follow.
+ The study of this era is much indebted to Li Di. We explain the
+ outline of his conclusion here. Kong Guangsen
+ (1752-1786)(17) was from the same town as Dai Zhen, so he obtained
+ "Guan-ben" from him and studied it(18). Li Huang (d. 1811)
+ (19) took part in editing Si Ku Quan Shu, so he must have had
+ "Guan-ben". Then Zhang Dunren (1754-1834) obtained this version,
+ and studied "Da Yan Zong Shu Shu" (The General Dayan
+ Computation). He wrote Jiu Yi Suan Shu (Mathematics
+ Searching for One, 1803) based on this version of Shu Xue Jiu
+ Zhang (20).
+
One of the most important persons in restoring our knowledge
+ concerning the filiation of these books was Li Rui (1768(21)
+ -1817)(see his biography). ... only two volumes remain of this
+ manuscript, as far as chapter 6 (chapter 3 part 2) p.13, that is,
+ question 2 of "Huan Tian San Ji" (square of three loops),
+ which later has been lost.
+
+
+
+
+
+
+
+
+
+ rubrique de fin
+ contains the string of words that denotes the end of a text division, often with an assertion as to its author and title, usually set off from the text itself by red ink, by a different size or type of script, or by some other such visual device.
+ 종종 저자와 제목에 대한 언급을 하며, 적색의 잉크, 스크립트의 다양한 크기 또는 유형, 또는 어떤 시각적 도구로 표시된 텍스트로 시작되는 텍스트 부분의 끝을 표시하는 단어 열을 포함한다.
+ 包含表示該文字區段結尾的字串,常有作者及標題的聲明,通常使用紅墨水、不同的字型與大小、或用其他不同視覺效果的圖案,來與文件本身作區別。
+ テキスト部分の終わりを示す文字列を示す.その著者やタイトルを含むこと
+ がある.一般には,テキスト中にある朱書きや,大きさや種類の異なる字体
+ など,異なる視覚効果で示されている.
+ Contient les derniers mots d'une section de texte,
+ qui incluent souvent la mention de son auteur et de son titre, et sont généralement
+ différenciés du texte lui-même par l'utilisation d'une encre rouge, par une taille ou un style
+ d'écriture particuliers, ou par tout autre moyen visuel.
+ contiene una serie de palabras que señala el fin de una división textual; a menudo declara el autor y el título, y dicha serie normalmente es evidenciada del resto mediante tinta roja, un estilo distinto o una dimensión distinta de los caracteres, u otro rasgo gráfico visible.
+ contiene una stringa di parole che segnala la fine di una partizione testuale e spesso ne dichiara autore e titolo; tale stringa è solitamente evidenziata rispetto al resto tramite inchiostro rosso, diverso stile o diversa dimensione del carattere, o altro espediente grafico
+
+
+
+
+
+
+
+
+
+
+ Explicit le romans de la Rose ou l'art
+d'amours est toute enclose.
+ ok lúkv ver þar Brennu-Nials savgv
+
+
+
+
+ Explicit le romans de la Rose ou l'art d'amours est toute enclose.
+ Ci falt la geste que Turoldus declinet.
+
+
+
+
+ 黃幼莘貢俚
+
+
+
+
+
+
+ contains the incipit of a manuscript item, that is the opening words of the text proper, exclusive of any rubric which might precede it, of sufficient length to identify the work uniquely; such incipits were, in former times, frequently used a means of reference to a work, in place of a title.
+ 원고 항목의 incipit(시작 말)을 포함한다. 선행하는 rubric를 제외한 텍스트의 시작 단어이며, 그 작품을 고유하게 식별할 수 있는 충분한 방식이다; 이러한 시작은 제목 대신 작품 참조의 수단으로 예전에 사용되었다.
+ 包含手稿項目中的起始語,即文本開端的起始語,不包括可能出現在之前的按語,並以充分的文字來獨家識別該作品;早期,這種起始語常用為作品的參照工具,出現在標題部份。
+ 手書き資料の冒頭語句(incipit)を示す.冒頭語句とは,テキ
+ ストの書き出しにある語句で,これに先行してある朱書き部分を除いた,当
+ 該作品を特定するに充分な文量の部分である.
+ 冒頭語句は,タイトル部分において,作品への参照を示す手段としてよく使
+ 用されていた.
+
+ contient l'incipit d'une section d'un
+ manuscrit, c'est-à-dire les mots commençant le texte proprement dit, à l'exclusion de toute
+ rubrique qui pourrait les précéder, la transcription étant de longueur
+ suffisante pour permettre l'identification de l'œuvre. De tels incipit étaient autrefois
+ souvent utilisés à la place du titre de l'œuvre, pour l'identifier.
+ contiene el incipit de un manuscrito, es decir, las primeras palabras del texto propriamente dicho, a excepción de eventuales títulos en rojo que lo preceden; los incipit tienen una longitud a deteminar según de que obra se trate y, antiguamente, eran utilizados a menudo para referirse a las obras mismas en lugar de títulos eventuales.
+ contiene l' incipit di un manoscritto, cioè le prime parole del testo propriamente detto, a eccezione di eventuali titoli in rosso che lo precedono; gli incipit hanno una lunghezza sufficiente a deteminare di quale opera si tratti e, anticamente, erano spesso utilizzati per riferirsi alle opere stesse al posto di eventuali titoli
+
+
+
+
+
+
+
+
+
+
+
+ Pater noster qui es in celis
+ tatem dedit hominibus alleluia.
+ Ghif ons huden onse dagelix broet
+ O ongehoerde gewerdighe christi
+ Firmiter
+ Ideo dicit firmiter quia ordo fidei nostre probari non potest
+
+
+
+
+ Pater noster qui es in celis
+ tatem dedit hominibus alleluia.
+ Ghif ons huden onse dagelix broet
+ O ongehoerde gewerdighe christi
+ Firmiter
+ Ideo dicit firmiter quia ordo fidei nostre probari non potest
+
+
+
+
+ 大學之道在明明德
+
+
+
+
+
+
+ manuscript contents
+ 원고 내용
+ contenido del manuscrito
+ contenu du manuscrit
+ contenuto del manoscritto
+ describes the intellectual content of a manuscript or manuscript
+ part, either as a series of paragraphs or as a series of structured manuscript items.
+ 일련의 문단으로 또는 일련의 구조화된 원고 항목으로 원고 또는 원고 일부의 지적 내용을 기술한다.
+ 描述手稿或手稿部分的智慧內容,可以是一系列的文字段落,或是一系列有組織的手稿項目。
+ 手書き資料の知的内容を,一連の段落または一連の構造化された手書き資料 項目として示す.
+ décrit le contenu intellectuel d'un manuscrit ou d'une
+ partie d'un manuscrit, soit en une série de paragraphes p, soit sous la forme d'une
+ série d'éléments structurés msItem concernant les items du manuscrit.
+ describe el contenido intelectual de un manuscrito o
+ parte de un manuscrito, a través de párrafos o fragemtos del manuscrito.
+ descrive il contenuto intellettuale di un manoscritto o
+ di una sua parte tramite una serie di paragrafi o brani del manoscritto
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ identifies the text
+ types or classifications applicable to this object by pointing to other elements or resources defining the
+ classification concerned.
+ 이 대상에 적용할 수 있는 텍스트 유형 또는 분류를 표시한다.
+ 標明適合的文字類型或分類。
+ 当該テキストの種類を示す.
+ spécifie la ou les catégories ou classes auxquelles
+ le manuscrit appartient.
+ dentifica la tipología textual u otras
+ clasificaciones aplicables al objeto en cuestión.
+ identifica la tipologia testuale o altre
+ classificazioni applicabili all'oggetto in questione
+
+
+
+
+
+
+
A collection of Lollard sermons
+
+
+
+
+
+
+
+
+
+ Guillaume de Lorris
+
+
+ Jean de Meung
+
+
+ Le Rommant de la rose
+
+
+
+ Paris
+ Antoine Vérard
+
+ 1497 ou 1498
+
+
+
+ in-2°.
+
+ Exemplaire sur vélin, enluminé, « vraisemblablement dans l’atelier d’Antoine
+ Vérard » (Charon 1988, n° 3)
+
+
+ Notice bibliographique
+ dans le Catalogue général
+
+
+
+
+
+
+
+
+
+
+
+ Longus
+
+
+ Les amours pastorales de Daphnis et Chloé
+
+
+ Paris
+ [Jacques Quillau]
+
+ 1718
+ in-8°.
+
+ Exemplaire réglé.
+
+ Notice bibliographique
+ dans le Catalogue général
+
+
+
+
+
+
+
+
+
Unless it contains a simple prose description, this element should contain at least one of
+ the elements summary, msItem, or msItemStruct. This constraint is
+ not currently enforced by the schema.
+
+
+
A moins qu'il ne contienne une description en texte libre, cet élément doit contenir au moins
+ l'un des éléments summary, msItem ou msItemStruct. Actuellement le schéma ne rend pas obligatoire cette contrainte.
+
+
+
+
+
+ manuscript item
+ 원고 항목
+
+ elemento del manuscrito
+ item de manuscrit
+ parte di manoscritto
+ describes an individual work or item within the intellectual
+ content of a manuscript or manuscript part.
+ 원고 또는 원고 일부의 지적 내용 내에서 개별 작품 또는 항목을 기술한다.
+ 描述手稿或手稿部分的智慧內容中所包含的單一作品或項目。
+ 手書き資料の知的内容の中に出現する,独立した作品または項目を示す.
+ décrit une œuvre ou un item individualisés dans le
+ contenu intellectuel d'un manuscrit ou d'une partie de manuscrit.
+ describe una obra individual o un elemento al interno del contenido intelectual de un manuscrito o de una de sus partes.
+ descrive una singola opera o oggetto all'interno del contenuto intellettuale di un manoscritto o di una sua parte
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ identifies the text types or classifications applicable to this
+item by pointing to other elements or resources defining the
+ classification concerned.
+ 이 항목에 적용할 수 있는 텍스트 유형 또는 분류를 식별한다.
+ 標明適合的文字類型或分類。
+ 当該項目のテキストの種類を示す.
+ spécifie la ou les catégories ou classes
+ auxquelles l'item appartient.
+ identifica la tipología textual u otras clasificaciones aplicables al objeto en cuestión.
+ identifica la tipologia testuale o altre classificazioni applicabili all'oggetto in questione
+
+
+
+
+
+
+ ff. 1r-24v
+ Agrip af Noregs konunga sögum
+ regi oc hann setiho
+sc
+heim sem þio
+ hon hever
+ ocþa buit hesta .ij. aNan viþ
+fé enhonom aNan til
+reiþar
+
+ Old Norse/Icelandic
+
+
+
+
+
+
+
+
+
+ Longus
+
+
+ Les amours pastorales de Daphnis et Chloé
+
+
+ Paris
+ [Jacques Quillau]
+
+ 1718
+ in-8°.
+
+ Exemplaire réglé.
+
+ Notice bibliographique
+ dans le Catalogue général
+
+
+
+
+
+
+
+
+ f.495
+ 台灣隨筆
+ 幾荷蘭人由洋中來,假地日本,久而不帰,遂築城而有之。
+ 惟商舶可以航海,凡使節往來咸藉之。
+ 繁體中文
+
+
+
+
+
+
+
+
+ structured manuscript item
+ 구조화된 원고 항목
+
+ elemento estructurado del manuscrito
+ description structurée d'un item de manuscrit
+ parte strutturata di manoscritto
+ contains a structured description for an
+ individual work or item within the intellectual content of a
+ manuscript or manuscript part.
+ 원고 또는 원고 일부의 지적 내용 내에서 개별 작품 또는 항목에 대한 구조화된 기술을 포함한다.
+ 包含某單一作品或項目的結構性描述,該作品或項目存在於手稿或手稿部分的智慧內容中。
+ 手書き資料の知的内容の中に出現する,独立した作品または項目の構造的解
+ 説を示す.
+ contient la description structurée d'un item ou d'une
+ œuvre, dans le contenu intellectuel d'un manuscrit ou d'une partie d'un manuscrit.
+ contiene una descripción estructurada de una obra individual o de un objeto al interno del contenido intelectual de un manuscrito o de una de sus partes.
+ contiene una descrizione strutturata di una singola opera o oggetto all'interno del contenuto intellettuale di un manoscritto o di una sua parte
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ classe
+ identifies the text types or classifications applicable to
+ this item by pointing to other elements or resources defining the
+ classification concerned.
+ 이 항목에 적용 가능한 텍스트 유형 또는 분류를 표시한다.
+ 標明適合的文字類型或分類。
+ 当該テキストの種類を示す.
+ spécifie la ou les catégories ou classes
+ auxquelles l'item appartient.
+ identifica la tipología textual u otras clasificaciones aplicables al objeto en cuestión.
+ identifica la tipologia testuale o altre classificazioni applicabili all'oggetto in questione
+
+
+
+
+
+
+ 24v-97v
+ Apringius de Beja
+ Tractatus in Apocalypsin
+ Incipit Tractatus
+in apokalipsin eruditissimi uiri Apringi episcopi
+Pacensis ecclesie
+ EXPLICIT EXPOSITIO APOCALIPSIS
+QVAM EXPOSVIT DOMNVS APRINGIUS EPISCOPUS.
+DEO GRACIAS AGO. FINITO LABORE ISTO.
+ Apringius, ed. Férotin
+ Latin
+
+
+
+
+
+
+ 24v-97v
+ Apringius de Beja
+ Tractatus in Apocalypsin
+ Incipit Tractatus in apokalipsin
+ eruditissimi uiri Apringi episcopi Pacensis ecclesie
+ EXPLICIT EXPOSITIO APOCALIPSIS QVAM
+ EXPOSVIT DOMNVS APRINGIUS EPISCOPUS. DEO GRACIAS AGO.
+ FINITO LABORE ISTO.
+ Apringius, ed. Férotin
+ Latin
+
+
+
+
+
+
+ pp.1-4
+ 不詳
+ 麻薯舊社屯外委潘清章等立招給墾批總約字
+ 4號,第九例。
+ 代筆社記
+ 數位典藏聯合目錄,國立臺灣大學圖書館管理
+ 繁體中文
+
+
+
+
+
+
+
+ rubrique
+ contains the text of any rubric or heading attached to a particular manuscript item, that is, a string of words through which a
+manuscript signals the beginning of a text division, often with an assertion as to its author and title, which is in some way set off from the text itself, usually in red ink, or by use of different size or type of script, or some other such visual device.
+ rubric(주서, 불게 인쇄한 것) 또는 특별한 원고 항목에 첨부된 표제의 텍스트를 포함한다. 즉, 종종 저자와 제목에 대한 언급으로 시작되며, 일반적으로 적색 잉크로, 스크립트의 다양한 크기 또는 유형의 사용으로, 또는 다른 시각적 도구로 텍스트가 시작되어 원고가 텍스트 구역의 시작이라는 표시를 하는 단어 문자열.
+ 包含任何按語的文字或是附在特殊手稿項目的標題,即手稿用來指示文字區段開始的字串,常有作者及標題的聲明,通常使用紅墨水、不同的字型與大小、或用其他不同視覺效果的圖案,來跟文件本身作區別。
+ 朱書き部分,すなわち,手書き資料の見出し部分のテキスト
+ を示す.手書き資料中にあるあるテキスト部分の始点を示すもので,よく著
+ 者やタイトルが記されている.テキストとは異なって示されており,一般に
+ は赤いインクで書かれている.または,異なる大きさや種類の字体が使われ
+ るなど,ある視覚効果が使われている.
+ contient le texte d'une rubrique ou d'un
+ intitulé propres à un item, c'est-à-dire des mots qui signalent le début du texte, qui
+ incluent souvent la mention de son auteur et de son titre, et qui sont différenciés du texte
+ lui-même, généralement à l'encre rouge, par une taille ou un style d'écriture particuliers, ou
+ par tout autre procédé de ce genre.
+ contiene el texto de eventuales rúbricas o títulos asignados a un determinado fragmento del manuscrito; se trata de series de palabras que señalan el inicio de una división textual, a menudo tales series contienen información sobre el autor o el título, y se evidencian del resto mediante tinta roja, un estilo distinto o una dimensión distinta del carácter, u otro rasgo gráfico visible.
+ contiene il testo di eventuali titoli in rosso o titoli assegnati a una determinata porzione di manoscritto; si tratta di stringhe di parole che segnalano l'inizio di una partizione testuale; tali stringhe sono solitamente evidenziate rispetto al resto tramite inchiostro rosso, diverso stile o diversa dimensione del carattere, o altro espediente grafico
+
+
+
+
+
+
+
+
+
+
+ Nu koma Skyckiu Rymur.
+ Incipit liber de consciencia humana a beatissimo Bernardo editus.
+ 16. f. 28v in margin: Dicta Cassiodori
+
+
+
+
+ Nu koma Skyckiu Rymur.
+ Incipit liber de consciencia humana a beatissimo Bernardo editus.
+ 16. f. 28v in margin: Dicta Cassiodori
+
+
+
+
+ 華亭徐懷祖燕公著
+ 代筆社記
+ 第一頁右緣空白:4號 第九例
+
+
+
+
+
+
+ contains an overview of the available
+ information concerning some aspect of an item (for example, its
+intellectual content, history, layout, typography etc.) as a
+complement or alternative to the more detailed information carried by
+ more specific elements.
+
+
+
+
+
+
+
+
+
+This item consists of three books with a prologue and an epilogue.
+
+
+
+
+
+ Cet item est formé de trois livres, d'un prologue et d'un épilogue.
+
+
+
+
+ 此物件包含三冊以及序與跋。
+
+
+
+
+
+ Uses a mixture of Roman and Black Letter types.
+ Antiqua typeface, showing influence of Jenson's Venetian
+fonts.
+ The black letter face is a variant of Schwabacher.
+
+
+
+
+
+
+
+ text language
+ 텍스트 언어
+
+ lengua del texto
+ langues du texte
+ lingua del testo
+ describes the languages and writing systems identified within the bibliographic work
+ being described, rather than its description.
+ (langUsage에 기술된 기술과 반대로) 원고에서 사용된 언어와 글 체계를
+ 기술한다.
+ 描述手稿中所使用的語言和書寫系統 (相對於其描述時使用的語言使用元素) 。
+ 手書き資料中の言語や書記システムを示す.(要素langUsageにあ る情報と対位する)
+ décrit les langues et systèmes d'écriture utilisés dans
+ un manuscrit (et non dans la description du manuscrit, dont les langues et systèmes d'écriture
+ sont décrits dans l'élément langUsage).
+ describe las lenguas y los sistemas de escritura usados
+ en un manuscrito (no se ha de confundir con la descripción contenida en el elemento
+ langUsage. ****
+ descrive le lingue e i sistemi di scrittura usati da un
+ manoscritto (da non confondere con la descrizione contenuta nell'elemento langUsage
+
+
+
+
+
+
+
+
+
+
+
+ main language
+ 주요 언어
+
+ lengua principal
+ langue principale
+ lingua principale
+ supplies a code which identifies the chief language used in the bibliographic work.
+ 원고에 사용된 주요 언어를 식별하는 부호를 제공한다.
+ 提供一代碼,識別手稿中使用的主要語言。
+ 当該手書き資料中で主に使用される言語を特定するコードを示す.
+ contient un code identifiant la langue principale du
+ manuscrit.
+ proporciona un código que identifica la lengua
+ principal utilizada en el manuscrito.
+ assegna un codice che identifica la lingua principale
+ utilizzata nel manoscritto
+
+
+
+ other languages
+ 다른 언어
+
+ otras lenguas
+ autres langues
+ altre lingue
+ one or more codes identifying any other languages used in the bibliographic work.
+ 원고에 사용된 다른 언어를 식별하는 하나 이상의 부호
+ 一個或多個代碼識別手稿中使用的任何其他語言。
+ 当該手書き資料中で使用されている他の言語を特定する,ひとつ以上の コード.
+ contient un ou plusieurs codes identifiant toute
+ autre langue utilisée dans le manuscrit.
+ uno o más códigos que identifican otras eventuales
+ lenguas utilizadas en el manuscrito.
+ uno o più codici che identificano eventuali altre
+ lingue utilizzate nel manoscritto
+
+
+
+
+
+ Predominantly in English with Latin
+ glosses
+
+
+
+
+ En français essentiellement, avec des gloses en
+ latin.
+
+
+
+
+ 主要為英文,摻以拉丁字彙。
+
+
+
+
This element should not be used to document the
+languages or writing systems used for the bibliographic or manuscript description itself: as for
+all other TEI elements, such information should be provided by means of the
+global xml:lang attribute attached to the element
+containing the description.
+
In all cases, languages should be identified by means of a standardized
+language tag generated according to BCP 47. Additional
+documentation for the language may be provided by a language
+element in the TEI Header.
+
+
+
+
+
+
+
+ manuscript excerpt
+ 원고 발췌
+ 手稿摘錄
+ extrait d'un manuscrit
+ estratto di manoscritto
+ extracto de manuscrito
+ provides attributes used to describe excerpts from a manuscript placed in a description thereof.
+ 원고의 발췌본을 기술하는 속성을 제시한다.
+ 提供用來描述關於手稿摘錄的屬性
+
+ 手書き資料からの引用を記述するための属性を示す.
+
+ fournit des attributs pour décrire les extraits d'un manuscrit.
+ assegna degli attributi utilizzati per descrivere estratti di un manoscritto inseriti in una descrizione dello stesso
+ proporciona atributos usados para describir extractos de un manuscrito ******
+
+
+ indicates whether the passage being quoted is defective,
+ i.e. incomplete through loss or damage.
+ 인용 어구의 결합 여부를 표시한다. 즉, 손실 또는 손상을 통한 불완전성
+ 指出所引用的段落是否不完全,例如因遺失或損毀而不完全。
+
+ 当該部分に問題があるかどうかを示す.例えば,欠損や損傷による不完
+ 全さなど.
+
+ indique si le passage décrit est fautif, i.e. incomplet en raison d'une lacune ou d'une détérioration.
+ indica se il brano citato sia o meno incompleto a causa di perdite o danni
+ indica si el pasaje que se describe es completo o no, p.ej. si ha sufrido pérdidas o daños.
+
+ false
+
+
+
+
In the case of an incipit, indicates whether the incipit as
+ given is defective, i.e. the first words of the text as preserved,
+ as opposed to the first words of the work itself. In the case of
+ an explicit, indicates whether the explicit as given is defective,
+ i.e. the final words of the text as preserved, as opposed to what
+ the closing words would have been had the text of the work been
+ whole.
+
+
+
Dans le cas d'un incipit, indique si l'incipit est considéré comme fautif, c'est-à-dire qu'il
+ présente les premiers mots du texte tels qu'ils ont été conservés, et non pas les
+ premiers mots de l'oeuvre elle-même.
+ Dans le cas d'un explicit, indique si l'explicit est considéré comme fautif, c'est-à-dire qu'il présente les mots
+ finaux du texte tels qu'ils ont été préservés, et non pas ce qu'auraient été ces mots si le texte de l'oeuvre avait été complet.
Accompanying Material
+ physical description
+ 물리적 기술
+
+ descripción física
+ description physique
+ descrizione fisica
+ contains a full physical description of a
+manuscript or manuscript part, optionally subdivided using more
+specialized elements from the model.physDescPart class.
+ model.physDescPart 클래스에서 더 특별화된 요소로 사용하기 위해 수의적으로 더 세분화한 원고 또는 원고 일부에 대한 완전한 물리적 기술을 포함한다.
+ 包含一個手稿或手稿部分的完整材質描述,可以利用model.physDescPart class中的專門元素選擇性地再分類。
+ 手書き資料の物理的な解説を示す.選択的に,クラスmodel.physDescPartに
+ ある要素に下位分解される.
+ contient la description physique complète d'un
+ manuscrit ou d'une partie d'un manuscrit, éventuellement structurée en utilisant les éléments
+ plus spécialisés appartenant à la classe model.physDescPart.
+ contiene una descripción física completa de un manuscrito o de una de sus partes que puede ser ulteriormente subdividida utilizando elementos específicos de la clase model.physDescPart.
+ contiene una descrizione fisica completa di un manoscritto o di una sua parte che può essere ulteriormente suddivisa utilizzando elementi specifici della classe .physDescPart.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Parchment.
+ i + 55 leaves
+ 7¼5⅜
+
+
+
+ In double columns.
+
+
+
+
Written in more than one hand.
+
+
+
With a few coloured capitals.
+
+
+
+
+
+
+
+
+ description d'objet
+ contains a description of the physical
+ components making up the object which is being described.
+ 기술되고 있는 대상을 구성하는 물리적 성분에 대한 기술을 포함한다.
+ 包含討論中物件的材質組成成分描述。
+ 当該対象の物理的構成要素の解説を示す.
+ contient la description des composants matériels de
+ l'objet en cours de traitement
+ contiene una descripción de los componentes físicos que constituyen el objeto descrito.
+ contiene una descrizione delle componenti fisiche che costituiscono l'oggetto descritto
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ forme
+ a short project-specific name identifying the physical form of
+ the carrier, for example as a codex, roll, fragment, partial leaf,
+ cutting etc.
+ 미제본 원고, 명부, 부분, 부분적 장, 잘라낸 것 등과 같이 물리적 형태를 식별하는, 프로젝트에서 사용하는 간단한 이름
+ 一個簡短的用途專用名稱,表示該媒介的物質外形,例如手抄本、名冊、斷片、部分頁面、剪報等。
+ 当該キャリアの物理的な形を示す,プロジェクト固有の短い名前.例え
+ ば,冊子,巻子,断片,切れ端など.
+ contient un nom abrégé spécifique au projet,
+ désignant la forme physique du support, par exemple : codex, rouleau, fragment, fragment
+ de feuillet, découpe, etc.
+ un nombre breve específico de un proyecto que identifica la forma física del documento, por ejemplo códex, rollo, fragmento, folio parcial, recorte, etc.
+ un nome breve specifico di un progetto che identifica la forma fisica del documento, per esempio codice, rotolo, frammento, foglio parziale, ritaglio, ecc.
+
+
Definitions for the
+terms used may typically be provided by a
+ valList element in the project schema
+specification.
+
+
+
+
+
+
+
+
+
+
+
+ support description
+ 보충 기술
+
+ descripción de ayuda
+ description du support
+ descrizione del supporto
+ groups elements describing the physical support for the written part of a manuscript.
+ 원고의 텍스트 부분에 대한 물리적 서류를 기술하는 요소를 모아 놓는다.
+ 匯集描述手稿書寫部分的物質載體元素。
+ 手書き資料のテキスト部分を作る物理的な素材を示す要素をまとめる.
+ Regroupe les éléments décrivant le support physique
+ du texte du manuscrit.
+ agrupa los elementos que describen el soporte físico de la parte escrita de un manuscrito.
+ raggruppa gli elementi che descrivono il supporto fisico della parte scritta di un manoscritto
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ matériau
+ a short project-defined name for the material composing
+ the majority of the support
+ 대부분의 서류를 구성하는 재질에 때한 프로젝트에서 정의한 간단한 이름
+ 載體主要組成材料的簡短用途定義名稱
+ プロジェクトで定義した,素材を示す短い名前.
+ contient un nom abrégé propre au projet désignant
+ le matériau qui a principalement servi pour fabriquer le support.
+ un nombre breve definido en el ámbito de un proyecto y referente al material que costituye la mayor parte del suporte.
+ un nome breve definito nell'ambito di un progetto e riferito al materiale che costituisce la maggior parte del supporto
+
+
+
+
+ parchment
+ parchemin
+ pergamena
+ pergamino
+
+
+
+
+
+
+
+
+ Parchment roll with silk ribbons.
+
+
+
+
+
+
+
+
+ support
+ contains a description of the materials
+etc. which make up the physical support for the written part of a manuscript.
+ 원고의 텍스트 부분의 물리적 서류를 구성하는 재질 등에 대한 기술을 포함한다.
+ 描述對於手稿書寫部分的物質載體所使用的材料等。
+ 手書き資料でテキストが書かれている部分を作る物理的な素材に関する説明
+ を示す.
+ contient la description des matériaux, techniques,
+ etc., qui ont servi à fabriquer le support physique du texte du manuscrit.
+ contiene una descripción de los materiales, etc. que constituyen el soporte físico de la parte escrita de un manuscrito.
+ contiene una descrizione dei materiali, ecc. che costituiscono il supporto fisico della parte scritta di un manoscritto
+
+
+
+
+
+
+
+
+
+
+
+ Parchment roll with silk ribbons.
+
+
+
+
+
+
+
+
+
+ Rouleau de parchemin avec des rubans desoie.
+
+
+ 155
+ 95
+ 31
+
+
+
+
+
+
+
+
+
+
+ 羊毛紙以絲質緞帶捆綁。
+
+
+
+
+
+
+
+
+ collation
+ contains a description of how the leaves or bifolia are physically
+arranged.
+ 장 또는 두 장이 물리적으로 배열된 방법에 대한 기술을 포함한다.
+ 描述頁面紙張的排列組成。
+ 当該の葉または一度折られた折丁が,物理的にどのように構成されているか
+ を示す.
+ contient la description de l'organisation des
+ feuillets ou bifeuillets d'un manuscrit
+ contiene una descripción de cómo los folios o bifolios están físicamente dispuestos.
+ contiene una descrizione di come i fogli o bifolia siano fisicamente disposti
+
+
+
+
+
+
+
+
+ The written leaves preceded by an original flyleaf,
+conjoint with the pastedown.
+
+
+
+
+ The written leaves preceded by an original flyleaf, conjoint with the
+ pastedown.
+
+
+
+
+
+
+ 1-5.8 6.6 (catchword, f. 46, does not match following text) 7-8.8 9.10, 11.2
+ (through f. 82) 12-14.8 15.8(-7)
+ Catchwords are written horizontally in center or towards the right lower
+ margin in various manners: in red ink for quires 1-6 (which are also signed in red ink
+ with letters of the alphabet and arabic numerals); quires 7-9 in ink of text within
+ yellow decorated frames; quire 10 in red decorated frame; quire 12 in ink of text;
+ quire 13 with red decorative slashes; quire 14 added in cursive hand.
+
+ 1-5.8 6.6 (catchword, f. 46, does not match following text)
+7-8.8 9.10, 11.2 (through f. 82) 12-14.8 15.8(-7)
+ Catchwords are written horizontally in center
+or towards the right lower margin in various manners:
+in red ink for quires 1-6 (which are also signed in red
+ink with letters of the alphabet and arabic numerals);
+quires 7-9 in ink of text within yellow decorated frames;
+quire 10 in red decorated frame; quire 12 in ink of text;
+quire 13 with red decorative slashes; quire 14 added in
+cursive hand.
+
+
+
+
+
+
+
+
+ foliotation
+ describes the numbering system or systems used to
+count the leaves or pages in a codex.
+ 미제본 원고의 장 또는 페이지를 세는 시스템을 기술한다.
+ 描述計算手抄本紙張頁數的一種或多種編號系統。
+ 冊子における葉やページを数える付番システムを示す.
+ décrit le ou les systèmes de numérotation des
+ feuillets ou pages d'un codex
+ describe el sistema o sistemas de numeración usados para contar los fólios o las páginas de un códex.
+ descrive il sistema o i sistemi di numerazione usati per contare i fogli o le pagine di un codice
+
+
+
+
+
+
+
+
+ Contemporary foliation in red
+roman numerals in the centre
+of the outer margin.
+
+
+
+
+ Contemporary foliation in red roman numerals in the centre of the outer
+ margin.
+
+
+
+
+ 頁邊空白的中心有以紅色羅馬數字標示的當代編張數號
+
+
+
+
+
+
+ état matériel
+ contains a description of the physical
+condition of the manuscript.
+ 원고의 물리적 상태에 대한 기술을 포함한다.
+ 包含手稿材質狀況的描述。
+ 当該手書き資料の,物理的な状態を示す.
+ contient la description de l'état matériel du
+ manuscrit.
+ contiene una descripción de la condición física de un manuscrito.
+ contiene una descrizione della condizione fisica del manoscritto
+
+
+
+
+
+
+
+
+
+
There are lacunae in three places in this
+manuscript. After 14v two
+leaves has been cut out and narrow strips leaves remains in the spine. After
+68v one gathering is missing and after 101v at least one gathering of 8 leaves
+has been lost.
+
Several leaves are damaged with tears or holes or have a
+irregular shape. Some of the damages do not allow the lines to be of full
+length and they are apparently older than the script. There are tears on fol.
+2r-v, 9r-v, 10r-v, 15r-18v, 19r-v, 20r-22v, 23r-v, 24r-28v, 30r-v, 32r-35v,
+37r-v, 38r-v, 40r-43v, 45r-47v, 49r-v, 51r-v, 53r-60v, 67r-v, 68r-v, 70r-v,
+74r-80v, 82r-v, 86r-v, 88r-v, 89r-v, 95r-v, 97r-98v 99r-v, 100r-v. On fol. 98
+the corner has been torn off. Several leaves are in a bad condition due to
+moist and wear, and have become dark, bleached or
+wrinkled.
+
The script has been
+touched up in the 17th century with black ink. The touching up on the following
+fols. was done by
+Bishop Brynjólf Sveinsson: 1v, 3r, 4r, 5r,
+6v, 8v,9r, 10r, 14r, 14v, 22r,30v, 36r-52v, 72v, 77r,78r,103r, 104r,. An
+AM-note says according to the lawman
+Sigurður Björnsson that the rest of the
+touching up was done by himself and another lawman
+Sigurður Jónsson.
+Sigurður Björnsson did the touching up
+on the following fols.: 46v, 47r, 48r, 49r-v, 50r, 52r-v.
+Sigurður Jónsson did the rest of the
+touching up in the section 36r-59r containing
+
Bretasögur
+
+
+
+
+
+
+ Traces de mouillures anciennes plus ou moins importantes au bas des feuillets,
+ qui n'ont pas affecté la reliure ; éraflure en tête du plat inférieur.
+ Eraflures sur les deux plats, tache d'humidité dans la partie supérieure du plat
+ inférieur ; mors fendus en tête et en queue avec zones restaurées (minces bandes de
+ maroquin).
+
+
+
+
+
+
輕度破損,本案第27至30頁缺頁。
+
+
+
+
+
+
+
+ layout description
+ 레이아웃 기술
+
+ descripción de la disposición
+ description de la mise en page
+ descrizione dell'impaginazione
+ collects the set of layout descriptions applicable to a manuscript.
+ 원고에 적용가능한 레이아웃 기술 집합을 모아 놓는다.
+ 收集一組適當的手稿外觀編排描述。
+ 手書き資料のレイアウト情報をまとめる.
+ rassemble les descriptions des mises en page d' un
+ manuscrit.
+ agrupa el conjunto de las descripciones de la distribución aplicable a un manuscrito.
+ raggruppa l'insieme delle descrizioni dell'impaginazione relative a un manoscritto
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Most pages have between 25 and 32 long lines ruled in lead.
+
+
+
+
+
+
+
Most pages have between 25 and 32 long lines ruled in lead.
+
+
+
+
+
+
+
+
2 columns of 42 lines pricked and ruled in ink, with
+ central rule between the columns.
+
+
+
Prickings for three columns are visible.
+
+
+
+
+
+
+
+
每頁14行,每行40到43字不等;有 註文小字雙行,字數不等。
+
+
+
+
+
+
+
+
兩欄共42行以墨水圈選、標誌,欄間有直線分隔。
+
+
+
Prickings for three columns are visible.
+
+
+
+
+
+
+
+
+
+ 2 columns of 42 lines pricked and ruled in ink, with
+ central rule between the columns.
+
+
+
小孔的三欄可見.
+
+
+
+
+
+
+
+
+ mise en page
+ describes how text is laid out on the
+ page, including information about any ruling, pricking, or other
+ evidence of page-preparation techniques.
+ 괘선, 윤곽 또는 페이지 준비 기술의 다른 증거에 관한 정보를 포함하여 텍스트의 페이지 레이아웃 방식을 기술한다.
+ 描述文字在頁面上的編排,包括任何橫隔線、刺痕、或其他的頁面準備技術的資訊。
+ 当該ページ上でテキストがどのようにレイアウトされているかを示す.例え
+ ば,罫線,穴,などの書記支度技法.
+ décrit comment le texte est disposé sur la page, ce
+ qui inclut les informations sur d'éventuels systèmes de réglure, de piqûre ou d'autres
+ techniques de préparation de la page.
+ describe la disposición del texto en la página, comprendiendo eventuales informaciones sobre la lineación***, indicaciones de agujereado***, u otras señales de técnicas de preparación de la página utilizadas.
+ descrive la disposizione del testo sulla pagina, ivi comprese eventuali informazioni su rigatura, applicazione di indicazioni per foratura, o altri segni di tecniche di preparazione della pagina
+
+
+
+
+
+
+
+
+ colonnes
+ specifies the number of columns per page
+ 페이지 당 열의 수를 명시한다.
+ 說明每頁的欄數
+ ページ中の段数を示す.
+ spécifie le nombre de colonnes présentes sur une
+ page
+ indica el número de columnas por página.
+ specifica il numero di colonne per pagina
+
+
If a single
+ number is given, all pages have this number of columns. If two
+ numbers are given, the number of columns per page varies between
+ the values supplied.
+
+
+ lignes de réglure
+ specifies the number of ruled lines per column
+ 열 당 줄친 행의 수를 명시한다.
+ 說明每欄的橫隔線數
+ 1段中の罫の数を示す.
+ spécifie le nombre de lignes de réglure présentes
+ par colonne
+ especifica el número de líneas delineadas por columna.
+ specifica il numero di righe per colonna
+
+
If a single
+ number is given, all columns have this number of ruled lines. If two
+ numbers are given, the number of ruled lines per column varies between
+ the values supplied.
+
+
+ lignes d'écriture
+ specifies the number of written lines per
+ column
+ 열 당 쓰인 행의 수를 명시한다.
+ 說明每欄的書寫行數
+ 1段中の行数を示す.
+ spécifie le nombre de lignes écrites par colonne
+ especifica el número de líneas escritas por columna.
+ specifica il numero di righe scritte per colonna
+
+
If a single
+ number is given, all columns have this number of written lines. If two
+ numbers are given, the number of written lines per column varies between
+ the values supplied.
+
+
+
+
+
+Most pages have between 25 and 32 long lines ruled in lead.
+
+
+
+
+ Most pages have between 25 and 32 long lines ruled
+ in lead.
+
+
+
+
+
+
2 columns of 42 lines ruled in ink, with central rule between the columns.
+
+
+
+
+
+
+
Some pages have 2 columns, with central rule between the columns; each column with
+ between 40 and 50 lines of writing.
+
+
+
+
+
+ 頁面大多有25到32行的鉛字橫線。
+
+
+
+
+
+
兩欄共42行油墨橫線,欄間有直線分隔。
+
+
+
+
+
+
+
有些頁面有兩欄,欄間有直線分隔;每欄有40至50行的字。
+
+
+
+
+
+
+
2 columns of 42 lines ruled in ink, with central rule
+between the columns.
+
+
+
+
+
+
+
Some pages have 2 columns, with central rule
+between the columns; each column with between 40 and 50 lines of writing.
+
+
+
+
+
+
+
+ description of hands
+ 기법 기술
+
+ descripción de las manos
+ description des écritures
+ descrizione delle mani
+ contains a description of all the different kinds of writing used in a manuscript.
+ 원고에 사용된 모든 종류의 기법 기술을 포함한다.
+ 手稿中使用的所有不同書寫種類的描述。
+ 手書き資料にある異なる書記全てについての解説を示す.
+ contient la description des différents types
+ d'écriture utilisés dans un manuscrit.
+ contiene una descripción de todos los diferentes tipos de escritura usados en un manuscrito.
+ contiene una descrizione dei diversi tipi di scrittura usati in un manoscritto
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ mains
+ specifies the number of distinct hands identified within the manuscript
+ 원고 내에서 식별되는 필적 수를 명시한다.
+ 說明在手稿中可清楚識別的書寫者人數。
+ 当該手書き資料中で特定可能な筆致の数を示す.
+ spécifie le nombre de mains différentes qui ont
+ pu être identifiées dans le manuscrit
+ especifica el número de manos distintas identificadas al interno de un manuscrito.
+ specifica il numero delle diverse mani identificate all'interno del manoscritto
+
+
+
+
+
+
+ Written throughout in angelicana formata.
+
+
+
+
+
+
+ Written throughout in angelicana formata.
+
+
+
+
+
+
+
The manuscript is written in two contemporary hands, otherwise unknown, but clearly
+ those of practised scribes. Hand I writes ff. 1r-22v and hand II ff. 23 and 24. Some
+ scholars, notably Verner Dahlerup and Hreinn Benediktsson, have argued for a third hand
+ on f. 24, but the evidence for this is insubstantial.
The manuscript is written in two contemporary hands, otherwise
+unknown, but clearly those of practised scribes. Hand I writes
+ff. 1r-22v and hand II ff. 23 and 24. Some scholars, notably
+Verner Dahlerup and Hreinn Benediktsson, have argued for a third hand
+on f. 24, but the evidence for this is insubstantial.
+
+
+
+
+
+
+
+ description des styles de caractère
+ contains a description of the typefaces or other aspects of
+ the printing of an incunable or other printed source.
+ contient la description des styles de caractères ou d'autres aspects de l'impression d'un incunable ou d'une autre source imprimée.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Uses an unidentified black letter font, probably from the
+ 15th century
+
+
+
+
+
+
+ Contains a mixture of blackletter and Roman (antiqua) typefaces
+ Blackletter face, showing
+ similarities to those produced in Wuerzburg after 1470.
+ Roman face of Venetian origins.
+
+
+
+
+
+
+
+ note sur les caractères typographiques.
+ describes a particular font or other significant typographic feature distinguished within
+ the description of a printed resource.
+ décrit une police particulière ou un autre trait
+ typographique significatif que l’on note dans la description d'une ressource imprimée.
+
+
+
+
+
+
+
+
+
+ Printed in an Antiqua typeface showing strong Italianate influence.
+
+
+
+
+
+
+
+ contains a description of the scripts used in a manuscript or similar source.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Contains two distinct styles of scripts
+ .
+ .
+
+
+
+
+
+
+
+ describes a particular script distinguished within
+ the description of a manuscript or similar resource.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ notation musicale
+ contains description of type of musical notation.
+ 악보 표기 유형 기술을 포함한다.
+ 包含樂譜種類的描述。
+ 記譜法の種類を示す.
+ contient la description d'un type de notation
+ musicale.
+ contiene la descripción de un tipo de anotación musical.
+ contiene una descrizione del tipo di annotazione musicale
+
+
+
+
+
+
+
+
+
+
+
Square notation of 4-line red staves.
+
+
+
+
+
+
+
Les clés se placent au commencement de la portée. Elles servent à fixer le nom des
+ notes et à indiquer en même temps la place que celles-ci occupent dans l'échelle
+ musicale.
+
+
+
+
+
+ Même, si l'on voulait démontrer que les livres de chants ont été
+ neumés dés le IXe siècle, il ne faudrait pas oublier que des livres de chants
+ sans neumes ont été écrits jusqu'au Xe siècle.
+
+
+
+
+
+
紅色四線譜記號法
+
+
+
+
+
+ St. Gall式的campo aperto記譜法。
+
+
+
+
+ Neumes in campo aperto of the St. Gall type.
+
+
+
+
+
+
+
+ decoration description
+ 장식 기술
+
+ descripción de la decoración
+ description de la décoration
+ descrizione della decorazione
+ contains a description of the decoration of a manuscript, either as a sequence of paragraphs, or as a sequence of topically organized decoNote elements.
+ 일련의 문단 또는 주제별로 조직된 일련의 decoNote 요소로 원고의 장식 기술을 포함한다.
+ 包含手稿的裝飾描述,可以是連續性的文字段落、或是一連串依主題排列的裝飾附註元素。
+ 当該手書き資料の装飾を,一連の散文段落,または一連の要素
+ decoNoteで示す.
+ contient la description de la décoration du
+ manuscrit, soit en une série de paragraphes p, soit sous la forme d'une série
+ d'éléments thématiques decoNote
+
+ contiene una descripción de la decoración de un manuscrito en forma de secuencia de párrafos o de secuencia de elementos decoNote organizados por el argumento.
+ contiene una descrizione della decorazione di un manoscritto in forma di sequenza di paragrafi oppure di sequenza di elementi decoNote organizzati per argomento
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
The start of each book of the Bible with a 10-line historiated
+illuminated initial; prefaces decorated with 6-line blue initials with red
+penwork flourishing; chapters marked by 3-line plain red initials; verses
+with 1-line initials, alternately blue or red.
+
+
+
+
+
+
+
Les miracles de la Vierge, par Gautier de Coinci ; un volume in-fol. de 285 feuilles,
+ orné d'initiales en or et en couleur,...
+
+
+
+
+
+
+
+ note on decoration
+ 장식에 관한 설명
+
+ observaciones de la decoración
+ note sur un élément de décoration
+ nota sulla decorazione
+ contains a note describing either a
+decorative component of a manuscript, or a fairly homogenous class of
+such components.
+ 원고의 장식 성분 또는 동일 부류의 성분을 기술하는 설명을 포함한다.
+ 包含一個附註,描述手稿的裝飾性要素、或是該類要素的同等分類。
+ 当該手書き資料の装飾要素またはそのようなものを示す.
+ contient une note décrivant soit un élément de
+ décoration du mansucrit, soit une catégorie relativement homogène de tels éléments.
+ contiene una nota que describe un componente decorativo de un manuscrito o una clase razonablemente homogénea de tales componentes.
+ contiene una nota che descrive una componente decorativa di un manoscritto o una classe ragionevolmente omogenea di tali componenti
+
+
+
+
+
+
+
+
+
+
+
+
+
The start of each book of the Bible with
+a 10-line historiated illuminated initial;
+prefaces decorated with 6-line blue initials
+with red penwork flourishing; chapters marked by
+3-line plain red initials; verses with 1-line initials,
+alternately blue or red.
+
+
+
+
+
+
+
+ à décor d’entrelacs géométriques (structure de losange et
+ rectangle) complété de fers évidés.
+ Titre ivvenalis. persivs et ex-libris de Jean Grolier
+ io. grolierii et amicorvm. dorés respectivement au centre et au bas du plat
+ supérieur.
+ Devise de Jean Grolierportio mea sit in terra viventivm
+ dorée au centre du plat inférieur.
+ Dos à cinq nerfs, sans décor ; simple filet doré sur chaque nerf et
+ en encadrement des caissons ; passages de chaînette marqués de même.
+ Tranchefiles simples unicolores, vert foncé.
+ Filet doré sur les coupes.
+
+ Tranches dorées.
+ Contreplats en vélin.
+ Filet doré sur les chasses.
+
+ Gardes en papier et vélin (2+1+2 / 2+1+2) ; filigrane au
+ pot.Briquet N° XX
+
+
+ Defet manuscrit utilisé comme claie au contreplat inférieur
+ (visible par transparence, sous la contregarde en vélin).
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ ajouts
+ contains a description of any significant additions found
+within a manuscript, such as marginalia or other annotations.
+ 방주 또는 기타 주석과 같이 원고 내의 중요한 부가정보의 기술을 포함한다.
+ 包含手稿中任何重要增添文字的描述,例如旁註或其他註釋。
+ 当該手書き資料中にある,重要な付加物を示す.例えば,欄外の書き込みや
+ 注釈など.
+ contient la description des ajouts significatifs
+ trouvés dans un manuscrit, tels que gloses marginales ou autres annotations.
+ contiene una descripción de cualquier adición significativa encontrada al interno de un manuscrito como notas al márgen u otras anotaciones.
+ contiene un descrizione di qualsiasi aggiunta significativa trovata all'interno di un manoscritto come note a margine o altre annotazioni
+
+
+
+
+
+
+
+
+
+
+
There are several marginalia in this manuscript. Some consist of
+single characters and others are figurative. On 8v is to be found a drawing of
+a mans head wearing a hat. At times sentences occurs: On 5v:
+Her er skrif andres isslendin,
+on 19r: þeim go,
+on 21r: amen med aund ok munn halla rei knar hofud summu all huad
+batar þad mælgi ok mal,
+On 21v: some runic letters and the sentence aue maria gracia plena dominus.
+
+
+
+
+
+
+
There are several marginalia in this manuscript. Some consist of single characters and
+ others are figurative. On 8v is to be found a drawing of a mans head wearing a hat. At
+ times sentences occurs: On 5v:Her er skrif andres isslendin, on
+ 19r: þeim go, on 21r: amen med aund ok munn halla
+ rei knar hofud summu all huad batar þad mælgi ok mal, On 21v: some runic letters
+ and the sentence aue maria gracia plena dominus.
+
+
+
+
+
+
+
+ binding description
+ 제본 기술
+
+ descripción obligatoria
+ description de la reliure
+ descrizione della rilegatura
+ describes the present and former bindings of a manuscript, either
+as a series of paragraphs or as a series of distinct binding elements,
+one for each binding of the manuscript.
+ 원고의 각 제본에 대해 일련의 문단 또는 일련의 binding 요소로 원고의 현재 그리고 이전 제본 상태에 대해 기술한다.
+ 描述手稿現在與之前的裝訂,可以是連續性的文字段落、或是一連串專用的binding元素,每個手稿裝訂使用一個元素。
+ 手書き資料の現行または以前の装訂に関する情報を示す.一連の段落または
+ 一連の要素bindingで示される.各単位が当該手書き資料の各装訂
+ に対応する.
+
+ décrit les reliures actuelles et anciennes d'un
+ manuscrit, soit en une série de paragraphes p, soit sous la forme d'une série
+ d'éléments binding, un pour chaque reliure
+ describe la encuadernación actual y precedente de un manuscrito en forma de una serie de párrafos o de una serie de diversos elementos binding (encuadernación), uno para cada encuadernación del manuscrito.
+ descrive la legatura attuale e precedente di un manoscritto sotto forma di una serie di paragrafi o di una serie di diversi elementi binding,
+uno per ogni legatura del manoscritto
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Sewing not visible; tightly rebound over
+19th-cent. pasteboards, reusing panels of 16th-cent. brown leather with
+gilt tooling à la fanfare, Paris c. 1580-90, the centre of each
+cover inlaid with a 17th-cent. oval medallion of red morocco tooled in
+gilt (perhaps replacing the identifying mark of a previous owner); the
+spine similarly tooled, without raised bands or title-piece; coloured
+endbands; the edges of the leaves and boards gilt.Boxed.
+
+
+
+
+
+
+
+
Reliure à décorDécor mosaïqué, avec formes géométriques à répétition Reliure en maroquin citron
+ à décor mosaïqué dit à répétition, dont l’effet de dallage est
+ obtenu par des pièces polylobées de maroquin noir, ornée chacune d’une composition de
+ petits fers plein or, cantonnées de petits disques de maroquin rouge ponctué chacun
+ d’un cercle plein or, le tout serti de filets dorés courbes.
+
+
+ Dos à 5 nerfs à décor analogue (pièce polylobée de maroquin noir
+ avec composition identique, cantonnée de quatre disques rouges, ponctués du même
+ cercle plein or) ; filets dorés sur les nerfs ; pièce de titre rouge dans le 2e
+ caisson, soulignée de deux lignes de points dorés identiques à celle portée en tête et
+ queue du dos, sur une bande de maroquin noir.
+ Tranchefiles simples droites, tricolores (noir, bleu et
+ rose).
+ Coupes dorées, proposant en alternance un filet simple et une
+ succession de traits obliques.
+ Signet de soie rose.
+ Tranches dorées sur marbrure à motif caillouté, dans les tons
+ bleu et rose.
+
+ Chasses ornées d’une roulette à motif de zigzag.
+
+ Gardes en papier plein or et gardes blanches (1 + 1), sans
+ filigrane.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ reliure
+ contains a description of one binding, i.e. type of covering, boards,
+ etc. applied to a manuscript.
+ 하나의 제본에 대한 기술을 포함한다. 즉, 원고에 적용된 커버, 표지 등의 유형
+ 一個裝訂的描述,例如使用於該手稿的封面類型、封面等。
+ 1つの装訂に関する情報を示す.例えば,手書き資料でいうカバーの種類, 表紙など.
+ contient la description d'une reliure, i.e. du type de
+ couverture, d'ais, etc., rencontrés.
+ contiene la descripción de una encuadernación, p.ej. tipo
+ de cubiertas, tablas, etc. presentes en un manuscrito.
+ contiene la descrizione di una legatura, cioè del tipo di
+ copertine, tavole, ecc. utilizzate per il manoscritto
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ contemporaine
+ specifies whether or not the binding is contemporary with the majority of its
+ contents
+ 제본이 텍스트의 대부분 내용과 동시에 이루어졌는가의 여부를 명시한다.
+ 說明裝訂和其大部分內容是否出於同一時期。
+ 当該装訂が,当該内容の大部分と同年代のものかどうかを示す.
+ spécifie si la reliure est contemporaine ou non de
+ l'essentiel du contenu du manuscrit.
+ especifica si la encuardenación es coetánea o no a la
+ mayoría del contenido del manuscrito.
+ specifica se la legatura è coeva o meno rispetto alla
+ maggior parte del suo contenuto
+
+
+
The value true indicates that the binding is contemporaneous with its
+ contents; the value false that it is not. The value unknown should
+ be used when the date of either binding or manuscript is unknown
+
+
+
La valeur true indique que la reliure est contemporaine de son contenu ; la
+ valeur false qu'elle ne l'est pas. La valeur unknown est employée
+ quand la date de la reliure ou du manuscrit est inconnue.
Contemporary blind stamped leather over wooden boards with evidence of a fore edge clasp
+ closing to the back cover.
+
+
+
+
+
+
+
Reliure à la grecque, sur aisDécor de rinceaux Reliure à la grecque en maroquin orange
+ aux armes de Henri II dorées sur une pièce de maroquin olive
+ découpée à la forme exacte des armes (104 mm), mosaïquée dans un rectangle central aux
+ angles orné d'un léger motif de rinceaux peints en noir, le tout encadré d'une large
+ bordure mosaïquée de maroquin rouge, à plein décor de rinceaux dorés (incluant un
+ croissant dans les angles) dessinés en réserve sur un fond pointillé doré.
+ Au plat supérieur, titre i • schonerii • opera • doré
+ au-dessus du bloc armorial.
+
+ Dos long à décor analogue avec pièces losangées de maroquin rouge et
+ brun mosaïquées, respectivement au centre et aux deux extrémités du dos, ornées d'un
+ décor de rinceaux doré en réserve sur un fond doré pointillé, avec fer azuré au chapeau
+ à chaque extrémité ; chaque pièce de maroquin est redessinée par un encadrement argenté,
+ lui-même complété de rinceaux sur les côtés et relevé par des traits tracés de plume à
+ effet de rayures.
+ Tranchefiles doubles bicolores : points droits sur chevrons,
+ bleus et jaunes.
+ Chants des ais rainurés.
+ Traces de petits boulons aux angles du rectangle intérieur ;
+ traces des quatre lanières tressées d'origine sur les deux plats ; pas de traces de
+ sabots.
+ Tranches dorées, ciselées et peintes (teinte rosée), à décor de
+ rinceaux incluant des éléments de l'héraldique royale : triple croissant en tête, grand
+ H couronné associé à un croissant en gouttière, chiffre HH en queue.
+
+ Absence de chasses.
+
+ Gardes (3+2), filigrane B.
+
+
+
+
+
+
+
+
+
+
+
Reliure à décorCompartiments espacés Reliure en maroquin rouge sombre
+ aux armes du chancelier Pierre Séguier, à décor de compartiments
+ complétés de fers filigranés, parmi lesquels un fer à la petite tête (type B).
+
+
+ Dos à 6 nerfs, à décor filigrané analogue ; palette ornée sur les
+ nerfs et en tête et queue du dos ; titrage dans le 2e caisson.
+ Tranchefiles à chapiteau tricolore (bleu, blanc et rose).
+ Coupes ornées.
+
+ Tranches dorées.
+ Contregardes en papier marbré à petit peigne, dans les tons
+ bleu, blanc, jaune, rouge et blanc.
+ Chasses ornées.
+
+
+
+
+
+
+ Quelques taches sombres sur le plat supérieur et larges
+ éraflures du cuir au plat inférieur. Restauration en queue du mors inférieur (bande de
+ cuir).
+
+
+
+
+
+
+
+
使用與內容物同時代的皮革包覆木版,背面有以前緣扣子扣住的跡象。
+
+
+
+
+
+
+
+
使用與書寫的貝葉非同時代的樹條捆住
+
+
+
以十九世紀的不知名棉繩重綁;裁切邊緣並鍍金
+
+
+
+
+
+
+
+
+
Quarter bound by the Phillipps' binder, Bretherton, with his sticker on the front
+ pastedown.
+
+
+
Rebound by an unknown 19th c. company; edges cropped and gilt.
+
+
+
+
+
+
+
+
+ seal description
+ 봉인 기술
+
+ descripción del sello
+ description des sceaux
+ descrizione dei sigilli
+ describes the seals or other external items attached to a manuscript, either
+as a series of paragraphs or as a series of distinct seal elements,
+possibly with additional decoNotes.
+ 일련의 문단 혹은 또는 일련의 seal 요소(부가적인 decoNote 요소와 함께)로 원고에 부착된 봉인 또는 기타 외부 항목을 기술한다.
+ 描述章印或其他附於手稿的外部項目,可以是連續性的文字段落、或是一連串專用的印章元素,也許附上一些裝飾附註元素。
+ 手書き資料に付属するシールや他の付着物について,一連の段落や,一連の
+ 要素sealにより,可能であれば要素decoNoteと共に示す.
+ décrit les sceaux ou autres objets attachés au
+ manuscrit, soit en une série de paragraphes p, soit sous la forme d'une série
+ d'éléments seal, complétés éventuellement par des éléments decoNote.
+ describe los sellos u otros objetos externos aplicados a un manuscrito mediante una serie de párrafos o una serie de diversos elementos seal (sellos), eventualmente con ulteriores elementos decoNote.
+ descrive i sigilli o altri oggetti esterni applicati a un manoscritto sotto forma di una sequenza di paragrafi o una serie di diversi elementi seal,
+eventualmente con ulteriori elementi decoNote
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Green wax vertical oval seal attached at base.
+
+
+
+
+
+
+
+
Parchment strip for seal in place; seal missing.
+
+
+
+
+
+
+
+ sceau
+ contains a description of one seal or similar
+ attachment applied to a manuscript.
+ 원고에 적용된 봉인 또는 유사 부착물 기술을 포함한다.
+ 描述一個章印或其他附於手稿的類似項目
+ 手書き資料にあるシールや付着物を示す.
+ contient la description d'un sceau ou d'un objet
+ similaire, attaché au manuscrit.
+ contiene la descripción de un sello o de un elemento externo aplicado a un manuscrito.
+ contiene la descrizione di un sigillo o altro oggetto applicato al manoscritto
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ contemporain
+ specifies whether or not the seal is contemporary with the
+ item to which it is affixed
+ 봉인이 그것이 첨부된 항목과 동시에 만들어졌는가를 명시한다.
+ 說明該章印和其附著的項目是否出於同一時期。
+ 当該シールが,当該資料と同時代のものかを示す.
+ spécifie si le sceau est ou non contemporain du
+ manuscrit auquel il est attaché.
+ especifica si el sello es o no contemporáneo al objeto al que se ha aplicado.
+ specifica se il sigillo è coevo o meno rispetto all'oggetto al quale è applicato
+
+
+
+
+
+
+
The seal of Jens Olufsen in black wax.
+(DAS 1061). Legend: S IOHANNES OLAVI.
+Parchment tag on which is written: Woldorp Iohanne G.
+
+
+
+
+
+
+
The seal of Jens Olufsen in black wax. (DAS 1061). Legend: S
+ IOHANNES OLAVI. Parchment tag on which is written: Woldorp Iohanne G.
+
+
+
+
+
+
+
+ accompanying material
+ 동봉 자료
+ 伴隨資料
+ matériel d'accompagnement
+ material adicional
+ materiale allegato
+ contains details of any significant additional
+material which may be closely associated with the manuscript being
+described, such as non-contemporaneous documents or fragments bound in
+with the manuscript at some earlier historical period.
+ 기술하고 있는 원고와 밀접히 관련된 중요한 부가적 자료를 세밀하게 기술한다. 예를 들어, 어떤 이전 시기에 원고와 함께 제본된 비동시대의 문서 또는 문서 일부.
+ 包含可能與該手稿關係密切的重要附加資料之細節,例如非同時期的文件或是在早期與手稿裝訂一起的片段。
+ 当該手書き資料と関連する情
+ 報の詳細を記述するための要素.例えば,当該手書き資料が書かれた時代と
+ は異なる時期の文書や断片についてについての詳細を示す.例えば,当該手
+ 書き資料が作成された以前に書かれた文書やその断片であったりするものに
+ ついて.
+
+ donne des détails sur tout matériel d'accompagnement
+ étroitement associé au manuscrit, tel que documents non contemporains ou fragments reliés avec
+ le manuscrit à une époque antérieure.
+ contiene eventuales detalles que conciernen a materiales añadidos estrechamente relacionados con el manuscrito examinado, p.ej. documentos no actuales o fragmentos cosidos junto al manuscrito en un período histórico precedente al actual.
+ contiene eventuali dettagli riguardanti maeriale aggiuntivo strettamente collegato al manoscritto in esame, per esempio documenti non attali o frammenti rilegati insieme al manoscritto in un periodo storico precedente a quello attuale
+
+
+
+
+
+
+
+
+
+
+ A copy of a tax form from 1947 is included in the envelope
+with the letter. It is not catalogued separately.
+
+
+
+
+ A copy of a tax form from 1947 is included in the envelope with the letter. It is
+ not catalogued separately.
+
+
+
+
+ 有張1947年的稅單一同與此信件放於信封裡,不單獨分類。
+
+
+
+
+
+
History
+ histoire
+ groups elements
+describing the full history of a manuscript or manuscript part.
+ 원고 또는 원고 일부의 전체 이력을 기술하는 요소를 모아 놓는다.
+ 匯集描述手稿或手稿部分完整歷史的元素。
+ 手書き資料の歴史を表す要素をまとめる.
+ rassemble les éléments servant à donner un historique
+ complet du manuscrit ou d'une partie du manuscrit.
+ agrupa elementos que describen la historia completa de un manuscrito o de una de sus partes.
+ raggruppa gli elementi che descrivono la storia completa di un manoscritto o di una sua parte
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Written in Durham during the mid twelfth
+century.
+
+
+
Recorded in two medieval
+catalogues of the books belonging to Durham Priory, made in 1391 and
+1405.
+
+
+
Given to W. Olleyf by William Ebchester, Prior (1446-56)
+and later belonged to Henry Dalton, Prior of Holy Island (Lindisfarne)
+according to inscriptions on ff. 4v and 5.
+
+
+
Presented to Trinity College in 1738 by
+Thomas Gale and his son Roger.
+
+
+
+
+
+
+
+
+
+
+
最早由迦葉尊者以梵文手寫。
+
+
+
後由菩提達摩傳給慧思禪師,再經由小野妹子於推古天皇十七年(西元609年)傳入日本。
+
淨嚴和尚於1694年以梵文悉曇體手寫抄錄。
+
穆勒(Max Muller)於1884年轉寫成天城體及羅馬拼音,傳至歐美國家。
+
+
+
現收藏於東京博物館。
+
+
+
+
+
+
+
+
+ origine
+ contains any descriptive or other information
+concerning the origin of a manuscript or manuscript part.
+ 원고 또는 원고 일부의 기원에 관한 기술적 또는 그 외의 정보를 포함한다.
+ 包含關於手稿或手稿部分的來源之任何描述性或其他資訊。
+ 手書き資料の出自に関する解説や情報を示す.
+ contient des informations sur l'origine du manuscrit
+ ou de la partie de manuscrit.
+ contiene informaciones relativas al orígen de un manuscrito o de una de sus partes.
+ contiene informazioni relative all'origine di un manoscritto o di una sua parte
+
+
+
+
+
+
+
+
+
+
+
+Copied in Derby, probably from an
+old Flemish original, between 1802 and 1845, according to Anne-Mette Hansen.
+
+
+
+
+
+ Copied in Derby, probably from an old Flemish original, between 1802 and
+ 1845, according to Anne-Mette Hansen.
+
+
+
+
+ 抄寫於 印度,可能源自巴利文,時間介於1802至1845年間,由黃大鳴提供。
+
+
+
+
+
+
+ provenance
+ contains any descriptive or other information
+concerning a single identifiable episode during the history of a manuscript
+or manuscript part, after its creation but before its acquisition.
+ 생성된 후부터 획득되기 전까지 원고 또는 원고 일부의 이력에 대해 확인가능한 에피소드에 관련한 기술적 또는 기타 정보를 포함한다.
+ 包含任何描述性或其他資訊,關於手稿或手稿部分的歷史中單一可確認的事件,發生在手稿產生之後、取得之前。
+ 手書き資料を入手するまでの歴史に関する,特定可能なエピソードに関する
+ 情報を示す.
+ contient des informations sur un épisode précis de
+ l'histoire du manuscrit ou de la partie du manuscrit, après sa création et avant son
+ acquisition
+ contiene descripciones o informaciones relativas a un único episodio identificable en la historia de un manuscrito o de una de sus partes que sea posterior al momento de su creación pero anterior al momento de su adquisición.
+ contiene informazioni relative a un unico episodio rintracciabile nella storia di un manoscritto o di una sua parte che sia posteriore alla sua creazione ma anteriore rispetto alla sua acquisizione
+
+
+
+
+
+
+
+
+
+
+
+ Listed as the property of Lawrence Sterne in 1788.
+ Sold at Sothebys in 1899.
+
+
+
+
+ Listed as the property of Lawrence Sterne in 1788.
+ Sold at Sothebys in 1899.
+
+
+
+
+ 1020年列為范寬的財產。
+ 1024年於洛陽賣出。
+
+
+
+
+
+
+ acquisition
+ contains any descriptive or other information
+concerning the process by which a manuscript or manuscript part entered the holding
+institution.
+ 원고 또는 그 일부가 현 보유 기관에 입수된 과정에 관련한 기술적 또는 기타 정보를 포함한다.
+ 包含任何描述性或其他資訊,關於手稿或手稿部分進入保管機構的過程。
+ 当該手書き資料が入手された経緯についての情報を示す.
+ contient des informations sur les modalités et
+ circonstances de l'entrée du manuscrit ou de la partie du manuscrit dans l'institution qui le
+ détient
+ contiene cualquier descripción u otra información concerniente al proceso de adquisición del manuscrito o de una de sus partes.
+ contiene informazioni relative al processo di acquisizione di un manoscritto o di una sua parte
+
+
+
+
+
+
+
+
+
+ Left to the Bodleian by
+Richard Rawlinson in 1755.
+
+
+
+
+
+ Left to the Bodleian byRichard
+ Rawlinson in 1755.
+
+
+
+
+ 1998年9 月30 日,CBETA 與日本大藏出版株式會社簽約授權使用。
+
+
+
+
+
+
Additional Information
+ informations complémentaires
+ groups additional information, combining
+bibliographic information about a manuscript, or surrogate copies of
+it with curatorial or administrative information.
+ 원고 또는 원고의 사본에 관한 서지 정보와 관리 정보를 결합한 부가적 정보를 모아 놓는다.
+ 匯集附加資訊,結合手稿的書目資訊、或是手稿的代替副本,包含管理或行政資訊。
+ 当該手書き資料に関する書誌情報などの付随情報まとめる.または当該資料
+ の複製に関する管理情報をまとめる.
+
+ regroupe les informations complémentaires sur le
+ manuscrit, incluant une bibliographie, des indications sur ses reproductions, ou des
+ informations sur sa conservation et sur sa gestion
+ agrupa información adicional, combinando informaciones bibliográficas relativas al manuscrito o a copias adicionales del mismo con informaciones de carácter conservacional o administrativo.
+ raggruppa ulteriori informazioni combinando informazioni bibliografiche relative al manoscritto o a copie surrogate dello stesso con informazioni di carattere curatoriale o amministrativo
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Administrative Information
Record History
Availability and Custodial History
+ administrative information
+ 관리 정보
+ 行政資訊
+ informations administratives
+ información administrativa.
+ informazioni amministrative
+ contains information about the present
+custody and availability of the manuscript, and also about the record
+description itself.
+ 원고의 현재 보관과 이용가능성, 그리고 기록 기술에 관한 정보를 포함한다.
+ 包含手稿現在的保管與可利用性資訊,也包含本身的紀錄描述。
+ 当該手書き資料,またはその記録文書そのものの管理・利用形態についての情
+ 報を示す.
+ contient, pour le manuscrit en cours de description, les informations sur son détenteur actuel, sur ses conditions d'accès et sur les modalités de sa description.
+ contiene información relativa a la gestión y a la disponibilidad del manuscrito y a la descripción misma de la documentación.
+ contiene informazioni relative alla gestione e disponibilità del manoscritto e alla descrizione stessa della documentazione
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Record created 1 Aug 2004
+
+
+
+
Until 2015 permission to photocopy some materials from this
+collection has been limited at the request of the donor. Please ask repository staff for details
+if you are interested in obtaining photocopies from Series 1:
+Correspondence.
+
+
+
Collection donated to the Manuscript Library by the Estate of
+Edgar Holden in 1993. Donor number: 1993-034.
+
+
+
+
+
+
+
+
+ Notice établie à partir du document original
+ Description mise à jour le 5
+ octobre 2009 en vue de l'encodage en TEI des descriptions des reliure de la
+ Réserve des livres rares
+ Description revue le 1er juin
+ 2009 par Fabienne Le Bars
+ Description validée le25
+ juin 2009par Fabienne Le Bars
+
+
+
+
+
+
+
+
+ 紀錄建立於2004年8月1日
+
+
+
+
2015年以前,非經贈與此書者同意,不得翻印。若對內容有興趣,請洽藏書單位。
+
+
+
此收藏1993年捐贈於故宮博物院。贈與編號:1993-034。
+
+
+
+
+
+
+
+
+ recorded history
+ 기록 이력
+
+ historia registrada
+ histoire de la description
+ storia registrata
+ provides information about the source and
+revision status of the parent manuscript description itself.
+ 그 원전에 관한 정보 그리고 원고의 기술 자체의 수정 이력에 관한 정보를 제공한다.
+ 提供父手稿本身說明的出處與修訂狀態相關資訊。
+ 元になった手書き資料の,元や改訂に関する情報を示す.
+ donne des informations sur la source de la
+ description et sur les modifications apportées à la description précédente.
+ proporciona información relativa a la fuente y sobre el estatus de revisión de la descripción del manuscrito del que deriva.
+ contiene informazioni relative alla fonte e alla revisione della descrizione stessa del manoscritto genitore
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Derived from IMEV 123 with additional research
+ by P.M.W.Robinson
+
+ LDB (editor)
+ checked examples against DTD version 3.6
+
+
+
+
+
+
+
+
+
Derived from IMEV 123 with additional research by
+ P.M.W.Robinson
+
+ LDB (editor) checked examples against DTD version
+ 3.6
+
+
+
+
+
+
+
+
源自IMEV 123及P.M.W.羅賓森的附加研究。
+
+ LDB (編輯) 檢查不符DTD 3.6版本的範例
+
+
+
+
+
+
+
+ source
+ describes the original source for the information contained with a manuscript description.
+ 원고 기술에 포함된 정보에 대한 최초 원본을 기술한다.
+ 描述關於手稿說明資訊的原始出處。
+ 手書き資料にある,元資料に関する情報を示す.
+ décrit la source des informations contenues dans la
+ description du manuscrit.
+ describe la fuente original que contiene las informaciones sobre la descripción del manuscrito.
+ descrive la fonte delle informazioni contenute nella descrizione del manoscritto
+
+
+
+
+
+
+
+
+ Derived from Stanley (1960)
+
+
+
+
+
+ Derived from Stanley (1960)
+
+
+
+
+
+ 來自 Stanley (1960)
+
+
+
+
+
+
+
+ custodial history
+ 보관 이력
+
+ historial de la custodia
+ histoire de la conservation
+ storia della conservazione
+ contains a description of a manuscript's custodial history, either
+as running prose or as a series of dated custodial events.
+ 연속적 산문체 또는 일련의 날짜가 표시된 보관 관련 사건을 통해서 원고의 보관 이력에 대한 기술을 포함한다.
+ 包含手稿保管歷史的描述,可以是篇章、或是一連串註明日期的保管事件。
+ 手書き資料の管理履歴を示す.散文形式または一連の日付つき履歴で示す.
+ contient des informations sur l'histoire de la
+ conservation, soit en texte libre, soit sous la forme d'une série d'éléments
+ custEvent.
+ contiene una descripción de la historia de la conservación del manuscrito en forma de prosa o come serie de eventos fechados relativos a la gestión del manuscrito.
+ contiene una descrizione della storia della conservazione del manoscritto sotto forma di prosa o come serie di eventi datati relativi alla gestione del manoscritto stesso
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Conserved between March 1961 and February 1963 at
+Birgitte Dalls Konserveringsværksted.
+
+Photographed in
+May 1988 by AMI/FA.
+
+Dispatched to Iceland
+13 November 1989.
+
+
+
+
+
+
+ Conserved between
+ March 1961 and February 1963 at Birgitte Dalls Konserveringsværksted.
+ Photographed
+ in May 1988 by AMI/FA.
+
+ Dispatched to Iceland 13 November 1989.
+
+
+
+
+
+
+ 1961年3月至1963年2月保存於北京國家文物典藏館
+ 1988年5月由國家攝影協會攝製
+ 1989年11月13日發送至冰島
+
+
+
+
+
+
+
+ custodial event
+ 보관 사건
+
+ acontecimiento de la custodia
+ événement dans la conservation
+ evento legato alla conservazione
+ describes a single event during the custodial history of a manuscript.
+ 원고의 보관 이력 중 단일 사건에 대하여 기술한다.
+ 描述手稿保管歷史中的單一事件。
+ 手書き資料の管理履歴における,ひとつの事象を示す.
+ décrit un événement dans l'histoire de la
+ conservation du manuscrit.
+ describe un único evento en la historia de la conservación de un manuscrito.
+ descrive un singolo evento nella storia della conservazione di un manoscritto
+
+
+
+
+
+
+
+
+
+
+ Photographed by David Cooper on 12 Dec 1964
+
+
+
+
+
+ Photographed by David Cooper on 12 Dec
+ 1964
+
+
+
+
+
+ 大衛.庫柏攝於1964年12月12日
+
+
+
+
+
+
+
Surrogates
+ reproductions
+ contains information about any representations of the manuscript being described which
+may exist in the holding institution or elsewhere.
+ 보유 기관 또는 다른 곳에서 있을 수 있는 원고의 디지털 또는 사진 표시에 관한 정보를 포함한다.
+ 包含關於任何手稿的數位化或攝影呈現的資訊,可能存在於保管機構或是其他地方。
+ 手書き資料が電子化されたものまたは写真の表現に関する情報を示す.
+ contient des informations sur toute reproduction
+ numérique ou photographique du manuscrit en cours de description, qu'elle soit détenue par
+ l'institution de conservation ou ailleurs.
+ contiene informaciones relativas a eventuales representaciones digitales o gráficas del manuscrito en exámen eventualmente existentes en la institución depositaria o en cualquier otro lugar.
+ contiene informazioni relative a eventuali rappresentazioni digitali o grafiche del manoscritto in esame eventualmente esistenti nell'istituzione depositaria o altrove
+
+
+
+
+
+
+
+
+
+
+ diapositive
+ AM 74 a, fol.
+ May 1984
+
+
+ b/w prints
+ AM 75 a, fol.
+ 1972
+
+
+
+
+
+
+
+
+
+ diapositive
+ AM 74 a, fol.
+ May 1984
+
+
+ b/w prints
+ AM 75 a, fol.
+ 1972
+
+
+
+
+
+
+
+
+
+ 透明正片
+ AM 74 a, fol.
+ May 1984
+
+
+ 黑白輸出
+ AM 75 a, fol.
+ 1972
+
+
+
+
+
+
+
+
Manuscript Parts
+ manuscript part
+ Handschriftenteil (kodikologische Einheit)
+ 원고 부분
+
+ parte del manuscrito
+ unité codicologique d'un manuscrit
+ parte di un manoscritto
+ contains information about an originally
+ distinct manuscript or part of a manuscript, which is now part of a composite manuscript.
+ enthält Informationen zu einer kodikologischen Einheit innerhalb einer Handschrift
+ 원고 원본 또는 혼합 원고의 부분을 형성하는 원고의 부분에 관한 정보를 포함한다.
+ 包含原為單一、現為複合手稿一部份的手稿或手稿部分的相關資訊。
+ 元々は別のものであったものを,新しくひとつにまとめ直された手書き資料
+ の情報を示す.
+ contient des informations sur un manuscrit ou sur une partie d'un manuscrit, distinct à l'origine, qui fait aujourd'hui partie d'un manuscrit composite.
+ contiene información relativas a un manuscrito o a parte de un manuscrito originariamente distintas pero actualmente parte de un manuscrito compuesto.
+ contiene informazioni relative a un manoscritto o parte di manoscritto originariamente distinti ma attualmente parte di un manoscritto composito
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ The msIdentifier element is now allowed as a child
+ of msPart, and it (with its altIdentifier
+ children if needed) should be used instead of an
+ altIdentifier directly within msPart.
+
+ WARNING: use of deprecated method — the use of the altIdentifier element as a direct child of the msPart element will be removed from the TEI on 2016-09-09
+
+
+
+
+
+
+ A
+
+ Becker
+ 48, Nr. 145
+
+
+ Wiener Liste
+ 4°5
+
+
+
+ Gregorius: Homiliae in Ezechielem
+ Weissenburg (?)
+ IX. Jh., Anfang
+
+
+
+
+
+
+
+
+ Amiens
+ Bibliothèque Municipale
+ MS 3
+ Maurdramnus Bible
+
+ Miscellany of various texts; Prudentius, Psychomachia; Physiologus de natura animantium
+ Latin
+
+
+
+
+
+ ms. 10066-77 ff. 140r-156v
+
+ Physiologus
+ Latin
+
+
+
+
+ MS 6
+
+
+
+
+
+
+
+
+
As this last example shows, for compatibility reasons the identifier of a manuscript part may
+be supplied as a simple altIdentifier rather than using the
+more structured msIdentifier element. This usage is however
+deprecated.
+
+
+
+
+
+
Manuscript Fragments
+ manuscript fragment
+
+
+ Fragment einer Handschrift
+ fragmento del manuscrito
+ fragment d'un manuscrit
+ frammento di un manoscritto
+ contains information about a fragment of a scattered manuscript now held as a single unit or bound into a larger manuscript.
+
+ contient des informations sur un fragment d'un manuscrit dispersé, aujourd'hui conservé séparément ou incorporé dans un autre manuscrit.
+ enthält Informationen zu einem Handschriftenfragment einer fragmentierten Handschrift, das heute als Einzeldokument oder eingebunden in eine Handschrift aufbewahrt wird.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Codex Suprasliensis
+
+
+
+ Ljubljana
+ Narodna in univerzitetna knjiznica
+ MS Kopitar 2
+
+
+ Contains ff. 10 to 42 only
+
+
+
+
+ Warszawa
+ Biblioteka Narodowa
+ BO 3.201
+
+
+
+
+ Sankt-Peterburg
+ Rossiiskaia natsional'naia biblioteka
+ Q.p.I.72
+
+
+
+
+
+
+
+
+
+ Letter of Carl Maria von Weber to Caroline Brandt. Dresden, 21st to 23rd May 1817
+
+
+
The second part of the letter (Weberiana Cl.II A a 2, 9) was given to Friedrich Jähns by Caroline von Weber,
+ the widow of Carl Maria von Weber. Jähns then handed this fragment over to the Berlin state library in 1881,
+ whereas the first part (Mus.ep. Weber, C. M. v. 96) remained with the family estate and found its way into the library not until 1956.
+ Yet, the identification was already obvious to Jähns who noted Zu No. 50. 21. Mai 1817 gehörig
+ at the top of his fragment.
+
+
+
+ D
+ Berlin
+ Staatsbibliothek zu Berlin Preußischer Kulturbesitz
+ Mus.ep. Weber, C. M. v. 96
+
+
+
+
+
One double leaf, four written pages without address.
+
+
+
+
+
+
+ D
+ Berlin
+ Staatsbibliothek zu Berlin Preußischer Kulturbesitz
+ Weberiana Cl.II A a 2, 9
+
+
+
+
+
One leaf, two written pages including address.
+
+
+
+
+
+
+
source: http://www.weber-gesamtausgabe.de/A041180
+
+
+
+
+
Module for Manuscript Description
+Manuscript Description
+Manuscript Description
+Description de manuscrits
+寫本描述
+Descrizione di manoscrittiDescrição do manuscrito手書きモジュール
Representation of Primary Sources
Digital Facsimiles
Combining Transcription with Facsimile
Parallel Transcription
+ contains a representation of some written source in the form of
+a set of images rather than as transcribed or encoded text.
+ 전사 또는 부호화된 텍스트 형태보다는 이미지 집합의 형태로 기록 원본의 표상을 포함한다.
+ contiene una representación de una cierta fuente escrita bajo la forma de conjunto de las imágenes algo que como texto transcrito o codificado.
+
+転記または符号化されたテキストではなく,画像データ中にある,書記資料の
+表現を示す.
+
+ contient une représentation d'une source écrite
+quelconque sous la forme d'un ensemble d'images plutôt que sous la forme d'un texte transcrit
+ou encodé.
+ contiene una rappresentazione di una qualche fonte scritta sotto forma di una serie di immagini piuttosto che di testo trascritto o codificato
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ contains a transcription or other representation of a single
+ source document potentially forming part of a dossier
+ génétique or collection of sources.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ All the writing on page 1
+
+
+
+
+
+ A line of writing on page 2
+ Another line of writing on page 2
+
+
+
+
+
+
+
+
This element may be used as an alternative to
+facsimile for TEI documents containing only page images, or
+for documents containing both images and
+transcriptions. Transcriptions may be provided within the
+surface elements making up a source document, in parallel
+with them as part of a text element, or in both places if
+the encoder wishes to distinguish these two modes of transcription.
+
+
+
+
+
+
+ provides an attribute used to express correspondence
+ between an element containing transcribed text and all or part of an image representing that text.
+ facsimile 요소 내에서 이미지 또는 표면부와 관련될 수 있는 요소
+ los elementos que se pueden asociar a una imagen o a una
+ superficie dentro de un facsímil.
+ 要素facsimileに含まれる画像や紙面に関する要素.
+ attributs utilisables pour les éléments correspondant à tout ou partie d'une image, parce qu'ils contiennent une représentation alternative de cette image, généralement mais
+ pas nécessairement, une transcription.
+ elementi che possono essere associati a un'immagine o una
+ superficie all'interno dell'elemento facsimile
+
+
+ facsimile
+ 모사
+ facsímil
+ fac-similé
+ points to all or part of an image which corresponds with the content of the element.
+ 이미지 또는 이 요소와 일치하는 facsimile 요소의 부분을 직접 가리킨다.
+ indica directamente a la imagen, o a la parte de un
+ facsímil que se corresponde con este elemento.
+ 当該要素に対応する要素facsimileにある画像やその部分への 参照.
+ pointe directement vers une image ou vers une partie
+ d'une image correspondant au contenu de l'élément.
+ indica direttamente un'immagine o una parte di un
+ elemento facsimile corrispondente a tale elemento
+
+
+
+
+
+
+
+ supplies the change attribute, allowing its member
+elements to specify one or more states or revision campaigns with which they are
+associated.
+
+
+ points to one or more change elements documenting
+ a state or revision campaign to which the element bearing this
+ attribute and its children have been assigned by the encoder.
+
+
+
+
+
+ defines a written surface as a two-dimensional
+coordinate space, optionally grouping one or more graphic representations of
+that space, zones of interest within that space, and transcriptions of the
+ writing within them.
+ 직사각형의 좌표 공간과 그 내부에서 기록 표면부를 정의한다. 수의적으로 그 공간의 하나 이상의 그림 표상과 관심 있는 직사각형 공간을 모아놓는다.
+ define una superficie escrita en coordinadas rectangulares, agrupando opcionalmente una o más representaciones gráficas de ese espacio, y las zonas rectangulares de interés dentro de él.
+ 矩形の座標により,書記の表面を定義する.選択的に,空間や矩形範囲中のひ
+とつ以上の図表表現をまとめる.
+
+ définit une surface écrite comme un rectangle décrit par ses coordonnées spatiales, en regroupant éventuellement une ou plusieurs représentations
+graphiques de cet espace et des zones rectangulaires intéressantes à l'intérieur de
+celui-ci.
+ definisce una superficie scritta in termini di uno spazio rettangolare di coordinate, eventualmente che raggruppi una o più rappresentazioni grafiche di tale spazio, e delle zone rettangolari di interesse all'interno di questo
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ describes the method by which this surface is or was
+ connected to the main surface
+
+
+
+ glued in place
+
+
+ pinned or stapled in place
+
+
+ sewn in place
+
+
+
+
+ indicates whether the
+ surface is attached and folded in such a way as to provide two
+ writing surfaces
+
+
+
+
+
+
+
+
+
+
+
+
+
+
The surface element represents any two-dimensional space on
+some physical surface forming part of the source material, such as a piece of
+paper, a face of a monument, a billboard, a scroll, a leaf etc.
+
The coordinate space defined by this element may be thought of
+ as a grid lrx - ulx units wide and
+ uly - lry units high.
+
The surface element may contain graphic representations
+or transcriptions of written zones, or both. The coordinate values used by every
+ zone element contained by this element are to be
+ understood with reference to the same grid.
+
Where it is useful or meaningful to do so, any grouping of multiple
+surface elements may be indicated using the
+surfaceGrp elements.
+
+
+
L'élément surface représente un secteur rectangulaire d’une surface physique faisant partie du matériau source. Ce peut être une feuille du papier, la façade d'un monument, un panneau publicitaire, un rouleau de papyrus ou en fait toute surface à deux dimensions.
+
L'espace de coordonnées défini par cet élément peut être considéré comme une grille d'unités horizontaleslrx - ulx et verticales uly - lry. Cette grille se superpose à la totalité de toute image directement contenue par l'élément surface. Les coordonnées employées par chaque élément zonecontenu par cette surface doivent être interprétées en référence à la même grille.
+
+
+
+
+
+
+ defines any kind of useful grouping of written surfaces, for
+ example the recto and verso of a single leaf, which the encoder
+ wishes to treat as a single unit.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Where it is useful or meaningful to do so, any grouping of multiple
+surface elements may be indicated using the
+surfaceGrp elements.
+
+
+
+
+
+ provides attributes which can be used to position their parent
+ element within a two dimensional coordinate system.
+ 이차원 좌표 체계 내에서 위치될 수 있는 요소
+ los elementos se pueden colocar dentro de un sistema de coordenadas bidimensional.
+
+2次元座標システムによる,場所を示す要素.
+
+ attributs utilisables pour les éléments pouvant être positionnés dans un système de coordonnées à deux dimensions.
+ elementi posizionabili all'interno di un sistema di coordinate bidimensionale
+
+
+ indicates the element within a transcription of the text
+containing at least the start of the writing represented by this zone
+or surface.
+ désigne l'élément qui, dans la transcription du texte, contient au moins le début de la section de texte représentée dans la zone ou surface.
+
+
+
+ gives the x coordinate value for the upper left corner of a
+rectangular space.
+ 직사각형 공간의 좌측 상단에 대한 x 좌표 값을 제시한다.
+ proporciona el valor de la coordinada X para el ángulo superior izquierdo de un espacio rectangular.
+
+矩形における左上点のX軸の値を示す.
+
+ donne la valeur x de l'abscisse du
+ coin supérieur gauche d'un rectangle.
+ assegna il valore x all'angolo superiore sinistro di uno spazio rettangolare
+
+
+
+ gives the y coordinate value for the upper left corner of a
+rectangular space.
+ 직사각형 공간의 좌측 상단에 대한 y 좌표 값을 제시한다.
+ proporciona el valor de la coordinada Y para el ángulo superior izquierdo de un espacio rectangular.
+
+矩形における左上点のY軸の値を示す.
+
+ donne la valeur y de l'ordonnée du coin supérieur gauche d'un rectangle.
+ assegna il valore y all'angolo superiore sinistro di uno spazio rettangolare
+
+
+
+ gives the x coordinate value for the lower right corner of a
+rectangular space.
+ 직사각형 공간의 오른쪽 하단에 대한 x 좌표 값을 제시한다.
+ proporciona el valor de la coordinada X para el ángulo inferior derecho de un espacio rectangular
+
+矩形における右下点のX軸の値を示す.
+
+ donne la valeur x de l'abscisse du coin inférieur droit d'un rectangle.
+ assegna il valore x all'angolo inferiore destro di uno spazio rettangolare
+
+
+
+ gives the y coordinate value for the lower right corner of a
+rectangular space.
+ 직사각형 공간의 오른쪽 하단에 대한 y 좌표 값을 제시한다.
+ proporciona el valor de la coordinada Y para el ángulo inferior izquierdo de un espacio rectangular
+
+矩形における右下点のY軸の値を示す.
+
+ donne la valeur y de l'ordonnée du coin inférieur droit d'un rectangle.
+ assegna il valore y all'angolo inferiore destro di uno spazio rettangolare
+
+
+
+ identifies a two dimensional area within the bounding box
+ specified by the other attributes by means of
+ a series of pairs of numbers, each of which gives the x,y coordinates
+ of a point on a line enclosing the area.
+
+
+
+
+ defines any two-dimensional area within a surface
+element.
+ surface 요소 내에 포함된 직사각형 영역을 정의한다.
+ define el área rectangular de la superficie.
+ 要素surfaceにある表面上の矩形範囲を定義する.
+ définit une zone rectangulaire contenue dans un élément surface.
+ definisce un'area rettangolare contenuta all'interno di un lemento surface
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ indicates the amount by which this zone has been
+ rotated clockwise, with respect to the normal orientation of
+ the parent surface element as implied by the
+ dimensions given in the msDesc element or by the
+ coordinates of the surface itself. The orientation
+ is expressed in arc degrees.
+
+ 0
+
+
+
+
+
+
+
+
+
+
This example defines a non-rectangular zone: see the illustration
+in section .
+
+
+
+
+
+
+
+
+
+
+
+
This example defines a zone which has been defined as larger than its parent
+surface in order to match the dimensions of the graphic it contains.
+
+
+
The position of every zone for a given surface is always
+defined by reference to the coordinate system defined for that
+surface.
+
A graphic element contained by a zone represents the whole
+of the zone.
+
A zone may be of any shape. The attribute points may be
+used to define a polygonal zone, using the coordinate system defined
+by its parent surface.
+
+
+
La position de chaque zone pour une surface donnée est toujours définie par rapport au système de coordonnées défini pour cette surface. Tout élément graphique contenu par une zone se représente par toute la zone.
+
+
+
+
+
+
+ groups separate elements
+ which constitute the content of a digital resource, as opposed to its
+ metadata.
+ TEI 문서를 구성하는 헤더 및 텍스트와 함께 나타날 수 있는 비테스트적 요소를 모아 놓는다.
+ agrupa los elementos no-textuales que pueden aparecer junto al encabezado y un texto para constituir un documento de TEI.
+ ヘダーやTEI文書を構成するテキストと共に出現する,非テキスト要素をま
+ とめる.
+ regroupe des éléments non-textuels qui, avec un
+en-tête et un texte, constitue un document TEI.
+ raggruppa elementi non testuali che possono costituire un documento TEI insieme a un'intestazione e a un testo
+
+
+
+
Embedded Transcription
Scope of Transcriptions
Altered, Corrected, and Erroneous Texts
Core Elements for Transcriptional Work
Abbreviation and Expansion
Correction and Conjecture
Additions and Deletions
Substitutions
Cancellation of Deletions and Other Markings
Text Omitted from or Supplied in the Transcription
Hands and Responsibility
Document Hands
Hand, Responsibility, and Certainty Attributes
Damage and Conjecture
Damage, Illegibility, and Supplied Text
Use of the gap, del, damage, unclear, and
+ supplied Elements in Combination
Marking up the Writing Process
Generic Modification
Metamarks
Fixation and Clarification
Confirmation, Cancellation, and Reinstatement of Modifications
Transpositions
Alternative Readings
Instant Corrections
Advanced Uses of surface and zone
Aspects of Layout
Space
Lines
Headers, Footers, and Similar Matter
Identifying Changes and Revisions
Other Primary Source Features not Covered in these Guidelines
Module for Transcription of Primary Sources
+ Transcription of Primary Sources
+ Transcription of primary sources
+ 原文轉錄
+ Représentation de sources primaires
+ Trascrizione di fonti primarie
+ Transcrição de fontes primárias
+ 転記モジュール
+
+ added span of text
+ 텍스트 추가 구간
+ 加入的文字段
+ partie de texte ajoutée
+ fragmento de texto añadido
+ porzione di testo aggiunta
+ marks the beginning of a longer sequence of text added by an
+ author, scribe, annotator or corrector (see also add).
+ 저자, 필기사, 주석자, 또는 교정자에 의해 추가된 긴 연쇄의 텍스트 시작부를 표시한다.(add 참조)
+ 標記由作者、抄寫者、註解者或更正者所加入的較長連續文字之開端 (參照add) 。
+ 著者,筆写者,注釈者,校正者の手による長めの追加テキストを挿入する始
+ 点を示す(addも参照のこと).
+ marque le début d'une longue partie de texte ajoutée par un auteur, un copiste, un annotateur ou
+ un correcteur (voir aussi add).
+ señala el inicio de un fragmento largo de texto añadido por un autor, un transcriptor, un comentarista o un corrector (ver también add).
+ segnala l'inizio di una porzione di testo più lunga aggiunta
+ da un autore, un trascrittore, un annotatore o un correttore (vedi anche add)
+
+
+
+
+
+
+
+
+
+
+
+
+
+ The @spanTo attribute of is required.
+
+
+
+
+ L'attribut spanTo est requis.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Both the beginning and the end of the added material must be
+ marked; the beginning by the addSpan element itself, the
+ end by the spanTo attribute.
+
+
+
Le début et la fin de la partie de texte ajoutée doivent être marqués ; le début, par l'élément
+ addSpan lui-même, la fin, par l'attribut spanTo.
+
+
+
+
+
+ dommage
+ contains an area of damage to the text witness.
+ 비교 대상 텍스트의 손상 영역을 포함한다.
+ 包含文件中一塊損毀區域。
+ 当該文献におけるテキストの損傷部分を示す.
+ sert à encoder une zone qui a subi des dommages dans le manuscrit témoin du texte.
+ contiene una área dañada del testimonio.
+ contiene l'area visibile del danneggiamento al testimone
+
+
+
+
+
+
+
+
+
+
+
+ The Moving Finger wries; and having writ,
+ Moves on: nor all your Piety nor Wit
+
+
+
+
Since damage to text witnesses frequently makes them harder to
+ read, the damage element will often contain an
+ unclear element. If the damaged area is not continuous
+ (e.g. a stain affecting several strings of text), the
+ group attribute may be used to group together several
+ related damage elements; alternatively the join
+ element may be used to indicate which damage and
+ unclear elements are part of the same physical
+ phenomenon.
+
The damage, gap, del, unclear
+and supplied elements may be closely allied in use. See
+section for discussion of which element is
+appropriate for which circumstance.
+
+
+
Puisque les dégâts causés aux témoins du texte les rendent fréquemment plus difficiles à
+ lire, l'élémentdamage contiendra souvent un élément unclear. Si la
+ zone endommagée n'est pas continue (par exemple une tache affectant plusieurs
+ morceaux de texte), on utilisera l'attributgroup pour regrouper plusieurs
+ éléments damage ; alternativement, on utilisera l'élément
+ joinpour indiquer quels éléments damage et unclear sont
+ liés au même phénomène physique.
+
Les éléments damage, gap, del, unclear
+ etsupplied peuvent être utilisés en étroite association. Voir la section pour savoir en quelle circonstance chacun de ces éléments est approprié.
+ 要素damage, gap, del, unclear,
+ suppliedは,このような使用をされる.これらのどの要素が相
+ 応しいかについての詳細はを参照のこと.
+
+
+
+
+
+
+ damaged span of text
+ 텍스트의 손상 구간
+ fragmento de texto dañado
+ partie de texte endommagée
+ porzione di testo danneggiata
+ marks the beginning of a longer sequence of text which is
+ damaged in some way but still legible.
+ 어떤 방식으로 손상되었지만 여전히 읽을 수 있는 긴 텍스트 연쇄 시작부를 표시한다.
+ marca el inicio de una secuencia de texto larga dañada de alguna manera pero aún legible.
+
+ 読める程度の損傷がある,一連のテキストの始点を示す.
+
+ marque le début d'une longue partie de texte,
+endommagée d'une manière quelconque mais toujours lisible.
+ segnala l'inizio di una sequenza più estesa di testo danneggiata ma ancora leggibile
+
+
+
+
+
+
+
+
+
+
+
+
+
+The @spanTo attribute of is required.
+
+
+
+
+
+ L'attribut spanTo est requis.
+
+
+
+
+
Paragraph partially damaged. This is the undamaged
+portion and this the damaged
+portion of the paragraph.
+
This paragraph is entirely damaged.
+
Paragraph partially damaged; in the middle of this
+paragraph the damage ends and the anchor point marks
+the start of the undamaged part of the text. ...
+
+
+
+
+
Paragraph partially damaged. This is the undamaged portion and
+ this the damaged portion of the paragraph.
+
This paragraph is entirely damaged.
+
Paragraph partially damaged; in the middle of this paragraph the damage ends and the
+ anchor point marks the start of the undamaged part of the text.
+ ...
+
+
+
+
+
此段部份毀損。這裡是完好的部份,而此為毀損的部份。
+
此段全部毀損。
+
段落有部份毀損,損壞處止於段落的中間,以屬性anchor標示未損內文的重新出現處。
+
+
+
+
Both the beginning and ending of the damaged sequence must be
+ marked: the beginning by the damageSpan element, the ending
+ by the target of the spanTo attribute: if no other
+ element available, the anchor element may be used for
+ this purpose.
+
The damaged text must be at least partially legible, in order
+ for the encoder to be able to transcribe it. If it is not legible
+ at all, the damageSpan element should not be used. Rather, the
+ gap or unclear element should be employed, with the value of the reason attribute
+ giving the cause. See further sections and
+ .
+
+
+
Le début et la fin de la partie de texte endommagée doivent être marqués : le début, par l'élément damageSpan, la fin au moyen de la cible de l'attribut spanTo :
+ si aucun autre élément n'est disponible, l'élément anchor est utilisé à cette fin.
+
Le texte endommagé doit être au moins partiellement lisible, afin que l'encodeur soit
+ capable de le transcrire. S'il n'est pas lisible du tout, l'élément
+ damageSpan ne devrait pas être utilisé. L'élément gap ou
+ unclear devrait être plutôt employé, avec un attribut reason
+ dont la valeur donnerait la cause de cette lecture impossible. Voir les autres sections et .
+
+
+
+
+
+ deleted span of text
+ 텍스트의 삭제 구간
+ 刪除的文字段
+ partie de texte supprimée
+ fragmento de texto omitido
+ porzione di testo cancellata
+ marks the beginning of a longer sequence of text deleted,
+marked as deleted, or otherwise signaled as superfluous or spurious by an
+author, scribe, annotator, or corrector.
+ 작가, 필기사, 주석자 또는 교정자에 의해 삭제되었다고 표시되었거나, 잉여적으로 추가되거나 위조된 것으로 표시된 긴 연쇄의 텍스트 시작부를 표시한다.
+ 標記一較長連續性文字之開端,該文字由作者、抄寫者、註解者、或更正者刪除、標上刪除記號、或者標明為多餘或偽造。
+ 著者・筆写者・注釈者・校正者により,削除または削除として符号化または
+ 余分なものまたは間違いとして示されている,長めのテキスト部分の始点を
+ 示す.
+ marque le début d'une longue partie de texte supprimée, signalée comme supprimée ou bien signalée comme superflue ou fausse par un auteur, un copiste, un annotateur ou un correcteur.
+ señala el inicio de un fragmento largo de texto omitido, o marcado como cancelado o como supérfluo o espurio, por un autor, un transcriptor, un comentarista o un corrector.
+ segnala l'inizio di una porzione di testo più lunga cancellata, indicata come cancellata, o indicata come superflua o spuria da un autore, un trascrittore, un annotatore o un correttore
+
+
+
+
+
+
+
+
+
+
+
+
+ The @spanTo attribute of is required.
+
+
+
+
+
+ L'attribut spanTo est requis.
+
+
+
+
+
Paragraph partially deleted. This is the undeleted
+portion and this the deleted
+portion of the paragraph.
+
Paragraph deleted together with adjacent material.
+
Second fully deleted paragraph.
+
Paragraph partially deleted; in the middle of this
+paragraph the deletion ends and the anchor point marks
+the resumption of the text. ...
+
+
+
+
+
Paragraph partially deleted. This is the undeleted portion and
+ this the deleted portion of the paragraph.
+
Paragraph deleted together with adjacent material.
+
Second fully deleted paragraph.
+
Paragraph partially deleted; in the middle of this paragraph the deletion ends and the
+ anchor point marks the resumption of the text. ...
+
+
+
+
+
此段部份刪除。這裡是保留的, 而此為刪除的部份。
+
此段落以及與它相關的資料一同被刪除。
+
第二個完全刪除的段落。
+
段落有部份被刪除,刪去處止於段落的中間,以屬性anchor標示 內文重新出現的位置。
+
+
+
+
Both the beginning and ending of the deleted sequence must be
+ marked: the beginning by the delSpan element, the ending
+ by the target of the spanTo attribute.
+
The text deleted must be at least partially legible, in order
+ for the encoder to be able to transcribe it. If it is not legible
+ at all, the delSpan tag should not be used. Rather, the
+ gap tag should be employed to signal that text cannot be
+ transcribed, with the value of the reason attribute
+ giving the cause for the omission from the transcription as
+ deletion. If it is not fully legible, the unclear element
+ should be used to signal the areas of text which cannot be read
+ with confidence. See further sections and,
+ for the close association of the delSpan tag with the
+ gap, damage, unclear and
+ supplied elements, .
+
The delSpan tag should not be used for deletions made
+ by editors or encoders. In these cases, either the corr
+ tag or the gap tag should be used.
+
+
+
Le début et la fin de la partie de texte supprimée doivent être marqués : le début, par
+ l'élément delSpan, la fin par la cible de l'attribut spanTo.
+
Le texte supprimé doit être au moins partiellement lisible, afin que l'encodeur soit
+ capable de le transcrire. S'il n'est pas lisible du tout, la balisedelSpan
+ ne doit pas être utilisée. Pour signaler qu'un texte ne peut être transcrit, il
+ vaut mieux utiliser la balise gap avec un attribut reason dont la valeur indique la raison pour laquelle la transcription du texte supprimé est impossible. S'il n'est pas entièrement lisible, l'élément unclear doit être utilisé pour signaler les parties du texte qui ne peuvent pas être lues avec certitude. Voir plus loin les sections et, à propos de l'association étroite qui existe entre delSpan et les éléments gap, damage, unclear et supplied, la section .
+
La balise delSpan ne doit pas être utilisée pour des suppressions opérées par des éditeurs scientifiques ou des encodeurs. Dans ces cas, on emploiera soit la balise corr, soit la balise gap.
+
+
+
+
+
+ editorial expansion
+ 편집 상술
+ développement éditorial
+ espansione
+ expansión
+ 縮寫還原
+ contains a sequence of letters added by an editor or
+ transcriber when expanding an abbreviation.
+ 축약을 확장할 때 편집자 또는 전사자에 의해 추가된 문자열을 포함한다.
+ contiene una secuencia de letras añadidas por un editor o transcriptor al expandir una abreviatura.
+ 編集者や転記者が,省略形を元に戻した結果の文字列を示す.
+ contient une succession de lettres ajoutées par un éditeur ou un transcripteur pour développer une abréviation.
+ contiene una sequenza di lettere aggiunte da un revisore o trascrittore in fase di espansione di un'abbreviazione
+
+
+
+
+
+
+
+
+
+
+ The address is Southmoor RoadRd
+
+
+
+ Il habite au 15 boulevarddbdClemenceau.
+
+
+
+ 這裡是清華大學
+ 清大
+
+
+
+
+
+
+ forme work
+ 조판 작업
+ 印版文字
+ élément de mise en page
+ convenciones gráficas.
+ convenzioni grafiche
+ contains a running head (e.g. a header, footer), catchword, or
+ similar material appearing on the current page.
+ 현 페이지에 나타나는 현 표제부(예, 머리말, 꼬리말), 색인어, 또는 유사 자료를 포함한다.
+ 包含一個欄外標題 (例如頁眉、頁腳) 、標語、或出現在所標記頁面的類似文字。
+ 版面の周りにある柱やノンブルを示す.
+ permet d'encoder un titre courant (en haut ou en bas de la page), une réclame ou une autre information comparable, qui apparaît sur la page courante.
+ contiene un encabezamiento, pie de página, reclamo o similar relativo a la página corriente
+ contiene intestazione, piè di pagina, reclamo o simili relativi alla pagina corrente
+
+
+
+
+
+
+
+
+
+
+
+ classifies the material encoded according to some useful typology.
+ 유용한 유형에 따라 부호화된 자료를 분류한다.
+ 用合適的分類方法將所標記的內容分類。
+ 符号化された当該部分を分類する.
+ caractérise l'information encodée conformément à une typologie appropriée.
+ clasifica las convenciones usadas según una tipología funcional.
+ classifica le convenzioni usate secondo una tipologia funzionale
+
+
+
+ a running title at the top of the page
+ 페이지 상단의 현 제목
+ 頁面頂端的欄外標題
+ 天にタイトル.
+
+ un titre courant en haut de la page
+ título o asunto en el encabezamiento de la página
+ titolo nell'intestazione di pagina
+
+
+ a running title at the bottom of the page
+ 페이지 하단의 제목
+ 頁面底端的欄外標題
+ 地にあるタイトル.
+
+ un titre courant en bas de la page
+ título o asunto a pie de página
+ titolo nel piè di pagina
+
+
+ page number
+ 페이지 숫자
+ página
+ numéro de page
+ numero di pagina
+ a page number or foliation symbol
+ 페이지 숫자 또는 페이지 기호
+ 編頁數號或是編張符號
+ ノンブル.
+
+ un numéro de page ou un symbole de foliotation
+ numero di pagina o simbolo di foliazione
+ número de página o símbolo de la foliación
+
+
+ line number
+ 행 수
+ número de línea
+ numéro de ligne
+ numero di riga
+ a line number, either of prose or poetry
+ 산문 또는 시에서 행 번호
+ un número de línea, en prosa o verso
+ 韻文・散文における行番号.
+
+ numéro d'une ligne en prose ou en vers
+ numero di riga di testo in prosa o componimento poetico
+
+
+ signature
+ 서명
+ signatura
+ firma
+ a signature or gathering symbol
+ 서명 혹은 서명 기호
+ signature ou marque de cahier
+ 簽名或是聚集符號
+ 折丁記号.
+
+ firma o símbolo común
+ firma o simbolo comune
+
+
+ catchword
+ 색인어
+ lema
+ réclame
+ reclamo
+ a catch-word
+ 색인어
+ 標語
+ 柱.
+
+ une réclame
+ reclamo
+ reclamo
+
+
+
+
+
+
+ C3
+
+
+
+
+ C3
+
+
+
+
+ 徐閱
+
+
+
+
Where running heads are consistent throughout a chapter or
+ section, it is usually more convenient to relate them to the
+ chapter or section, e.g. by use of the rend attribute.
+ The fw element is intended for cases where the running
+ head changes from page to page, or where details of page layout
+ and the internal structure of the running heads are of paramount
+ importance.
+
+
+
Quand le titre courant s'applique à tout un chapitre ou une section, il est habituellement plus commode de le relier au chapitre ou à la section, par exemple en utilisant l'attribut rend. L'élément fw est utilisé pour des cas où le titre courant change de page en page ou quand il est primordial de relever des détails de mise en page ou la structure interne des titres courants.
+
+
+
+
+
+ contains one or more handNote elements documenting the
+different hands identified within the source texts.
+ 원본 텍스트 내에서 식별되는 필적을 기록하는 하나 이상의 handNote 요소를 포함한다.
+ 包含一系列書寫者元素,列出來源文件中不同的書寫者。
+ 元資料にある特定可能な筆致を記録する,ひとつ以上の要素
+ handNoteを示す.
+ contient un ou plusieurs éléments handNote qui documentent les différentes mains identifiées dans les textes source.
+ contiene una serie di elementi che elencano le diverse mani della fonte
+ contiene una serie de elementos que indexa las diversas manos de la fuente.
+
+
+
+
+
+
+
+
+
+
+
+
+ Carefully written with regular descenders
+ Unschooled scrawl
+
+
+
+
+
+
+
+ reprise de main
+ marks the beginning of a sequence of text written in a new
+hand, or the beginning of a scribal stint.
+ 새로운 필적으로 기록된 텍스트 연쇄의 시작 또는 필기 부분의 시작을 표시한다.
+ 標記連續文字中轉換書寫者的開始,或是一個抄寫工作的開始。
+ テキストにおける新しい筆致の始まり,または筆写者の仕事の開始を示す.
+ marque le début d'une section du texte écrite par une nouvelle main ou le début d'une nouvelle séance d'écriture.
+ marca el principio de un fragmento de texto atribuible a otra mano distinta o a un cambio de redactor, estilo de escritura, tinta o letra.
+ segnala l'inizio di una porzione di testo attribuibile ad un'altra mano o riconducibile a un cambio di redattore, stile di scrittura, inchiostro o carattere
+
+
+
+
+
+
+
+
+
+
+
+ indicates a
+ handNote element describing the hand
+ concerned.
+ 새 필적을 식별한다.
+ 表示新的書寫者。
+ 当該新しい筆致を特定する.
+ donne l'identifiant de la nouvelle main.
+ identifica una nueva mano.
+ indica la nuova mano
+
+
+
This attribute serves the same function as the
+hand attribute provided for those elements which are members of the
+att.transcriptional class. It may be
+renamed at a subsequent major release.
+
+
+
+
+
+ When wolde the cat dwelle in his ynne
+
+ And if the cattes skynne be slyk and gaye
+
+
+
+
The handShift element may be used either to
+denote a shift in the document hand (as from one scribe to another,
+on one writing style to another). Or, it may indicate a shift within
+a document hand, as a change of writing style, character or ink. Like
+ other milestone elements, it should appear at the point of
+ transition from some other state to the state which it describes.
+
+
+
L'élément handShiftpeut être utilisé soit pour noter un changement de main
+dans le document (comme le passage d'un scribe à un autre, d'un style d'écriture à un
+autre), soit pour indiquer un changement dans la main, comme un changement d'écriture, de caractère ou d'encre.
+
+
+
+
+
+ abbreviation marker
+ 축약 표지
+ marcador de la abreviatura
+ marqueur d'abréviation
+ marcatore di abbreviazione
+ contains a sequence of letters or signs present in an
+ abbreviation which are omitted or replaced in the expanded form of
+ the abbreviation.
+ 축약의 확장형에서 생략되거나 대체된 축약형으로, 제시된 문자열 또는 기호열을 포함한다.
+ contiene una secuencia de letras o símbolos presentes en una abreviatura que han sido omitidos o substituidos en la forma extendida de la abreviatura.
+
+ 当該省略形が,原形を省略またはそれに代わったことを示す文字列または記
+ 号列.
+
+ contient une succession de lettres ou de signes
+présents dans une abréviation mais omis ou remplacés dans la forme développée de
+l'abréviation
+ contiene una sequenza di lettere o segni presenti in un'abbreviazione e omessi o sostituiti nella forma estesa dell'abreviazione stessa
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ do you Mr.
+ Jones?
+
+
+
+
+
+ Augg
+
+ ustorum duo
+
+
+
+
+
+ Le Dr.
+
+ Pasquier se prit à marcher de long en large, les mains glissées dans la
+ ceinture de sa blouse.
+
+
+
+
+ 因漢語無字母的縮寫,故無法提供縮寫符號的範例
+
+
+
+
+
+
+ rétablissement
+ indicates restoration of text to an earlier state by
+cancellation of an editorial or authorial marking or instruction.
+ 편집 또는 저작 표지 또는 지시의 취소를 통해서 초기 상태로 텍스트 복구를 나타낸다.
+ 經由取消編輯或作者所做的記號或指示,復原文件到之前的狀況。
+ 編集者や著者による指示を覆し,以前の状態のテキストを復元することを示
+ す.
+ indique le rétablissement d'un état antérieur du texte par suppression d'une marque ou d'une instruction de l'éditeur ou de l'auteur.
+ indica la reconstrucción del texto a un estado precedente por la cancelación de una anotación o instrucción del autor o el editor.
+ segnala il ripristino del testo a uno stato precedente in virtù della rimozione di un'annotazione o istruzione a opera dell'autore o curatore
+
+
+
+
+
+
+
+
+
+
+
+For I hate this
+my body
+
+
+
On this element, the type attribute categorizes the
+ way that the cancelled intervention has been indicated in some
+ way, for example by means of a marginal note, over-inking,
+ additional markup, etc.
+
+
+
L'attribut type de cet élément caractérise la manière dont l'intervention supprimée a été mentionnée, par exemple par une note marginale, par une surcharge de l'écriture, par un balisage additionnel, etc.
+
+
+
+
+
+ espace
+ indicates the location of a significant space in the text.
+ 복사본에서 중요한 공간의 위치를 표시한다.
+ 指出來源文件中出現大片空白的位置。
+ 元資料にある重要な空白の場所を示す.
+ permet de situer un espace significatif dans le texte édité.
+ indica la localización de un espacio significativo en el texto de copia.
+ indica la posizione di uno spazio significativo nel testo copia
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ dimension
+ 차원
+ dimensión
+ dimensione
+ dimension
+ indicates whether the space is horizontal or vertical.
+ 공간의 수직 또는 수평에 대한 정보를 제시한다.
+ 指出該空白是水平的或垂直的。
+ 当該空白は,縦長か横長かを示す.
+ indique si l'espace est vertical ou horizontal.
+ indica si el espacio es vertical u horizontal.
+ indica se lo spazio è orizzontale o verticale
+
+
+
+ the space is horizontal.
+ 공간이 수평이다.
+ 空白是水平的。
+ el espacio es horizontal.
+ 当該空白は,横長.
+ l'espace est horizontal.
+ spazio orizzontale
+
+
+ the space is vertical.
+ 공간이 수직이다.
+ l'espace est vertical.
+ 空白是垂直的。
+ el espacio es vertical.
+ 当該空白は,縦長.
+ spazio verticale
+
+
+
+
For irregular shapes in two dimensions, the value for
+this attribute should reflect the more important of the two dimensions.
+In conventional left-right scripts, a space with both vertical and
+horizontal components should be classed as vertical.
+
+
+
Pour des formes irrégulières à deux dimensions, la valeur de cet attribut doit refléter la plus importante des deux dimensions. Dans les textes
+écrits conventionnellement de gauche à droite, un espace composé de parties horizontales et verticales doit être considéré comme vertical.
+
+
+
+ (responsible party) indicates the individual responsible for identifying and measuring the space
+
+
+
+ By god if wommen had writen storyes
+ As han within her oratoryes
+
+
+ στρατηλάτου
+
+
+ Lettre à lettre,
+ un texte se forme, s'affirme, s'affermit, se fixe, se fige : une ligne assez strictement
+ horizontale se dépose sur la feuille blanche.
+
+
+
+ 夕陽西下斷腸人在天涯
+
+
+
This element should be used wherever it is desired to record
+an unusual space in the source text, e.g. space left for a word to be
+filled in later, for later rubrication, etc. It is not intended to be
+used to mark normal inter-word space or the like.
+
+
+
Cet élément devrait être utilisé partout où l'on désire signaler un espace inhabituel dans le texte source, par exemple un espace réservé pour un mot à écrire plus tard, pour une rubrication ultérieure, etc. Il n'est pas destiné à être utilisé pour marquer l'espace normal entre des mots par exemple.
+
+
+
+
+
+ substitution
+ 대체
+ substitución
+ sostituzione
+ substitution
+ groups one or more deletions with one or more additions when
+ the combination is to be regarded as a single intervention in the text.
+ 결합이 텍스트에서 단일 조작으로 간주될 때 하나 이상의 삭제를 하나 이상의 추가 사항으로 대체한다.
+ regroupe une ou plusieurs parties de texte supprimées et une ou plusieurs parties de texte ajoutées, lorsque cette combinaison peut être considérée comme une intervention unique sur le texte.
+ agrupa una o más cancelaciones con una o más adiciones cuando la combinación riguarda a una sola intervención en el texto.
+ 追加と削除が一連の調整と考えられる場合,そのひとつ以上の追加部分や削
+ 除部分をまとめる.
+ raggruppa ona o più cancellazioni insieme a una o più aggiunte quando la combinazione va considerata come singolo intervento sul testo
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ must have at least one child add and at least one child del
+
+
+
+
+... are all included. It is
+ Tthe expressed
+
+
+
+
+ that he and his Sister Miſs D — who always lived with him, wd. be veryprincipally remembered in her Will.
+
+
+
+
+ τῶνα
+ συνκυρόντωνα
+ ἐργαστηρίωνα
+
+
+
+
+
+
+
+
+
+ apple
+
+
+
+
+
+
+
+ substitution join
+ jointure de substitution
+ identifies a series of possibly fragmented additions, deletions or other revisions on a manuscript that combine to make up a single intervention in the text
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ While pondering thus she mus'd, her pinions fann'd
+
+
+
+
+
+
+ texte restitué
+ signifies text supplied by the transcriber or editor for any
+ reason; for example because the original cannot be read due to
+ physical damage, or because of an obvious omission by the author or scribe.
+ 일반적으로 원본은 물리적 손상 또는 손실로 인해 읽을 수 없기 때문에 전사자 또는 편집자에 의해 제공된 텍스트를 표시한다.
+ 指出一段由轉錄者或編者添加的補充文字,添加的原因是該位置的文字無法被辨認,也許是因為來源文件的損壞或內容遺失、或是任何其他原因導致難以辨認。
+ 転記者や編集者にひょって付加されたテキストを示す.例えば,元のテキス
+ トが物理的損傷や欠損から判読できない場合などに付加されるもの.
+ permet d'encoder du texte restitué par l'auteur de la transcription ou par l'éditeur pour une raison quelconque, le plus souvent parce que le texte du document original ne peut être lu, par suite de dommages matériels ou de lacunes.
+ indica fragmentos de texto añadidos por el transcriptor o por el revisor en el lugar donde el original es ilegible, porqué presenta daños físicos, lagunas o por otros motivos.
+ indica porzioni di testo inserite dal trascrittore o dal revisore al posto di porzioni di testo illegibili per danneggiamento, lacune nell'originale o altri motivi
+
+
+
+
+
+
+
+
+
+
+ one or more words indicating why the text has had to be supplied, e.g.
+ overbinding, faded-ink, lost-folio, omitted-in-original.
+ 그 텍스트가 제시된 이유를 표시한다.
+ 說明該文件當時必須補充的原因。
+ 該テキストが付加された理由を示す.
+ donne la raison pour laquelle on a dû restituer le texte.
+
+ explica los motivos de dicha inserción.
+ spiega i motivi di tale inserimento
+
+
+
+
+ I am dr Sr yr
+very humble Servt
+Sydney Smith
+
+
+ Je reste votre ts he de svt très humble et très dévoué serviteur
+ Jean Martin
+
+
+
+ 回首向來蕭瑟處,歸去,
+ 也無風雨也無晴。
+
+
+ Dedication to the duke of Bejar
+
+
+
The damage, gap, del,
+unclear and supplied elements may be closely allied
+in use. See section for discussion of which
+element is appropriate for which circumstance.
+
+
+
Les éléments damage, gap, del, unclear et supplied peuvent être étroitement associés. Voir la section pour savoir quel élément est approprié à chaque circonstance.
+
+
+
+ 要素damage, gap, del, unclear,
+ suppliedと共に使用されるかもしれない.これらのどの要素を
+ 使用するかについての詳細は,を参照のこと.
+
+
+
+
+
+
+ Texte superflu
+ marks text present in the source which the editor believes to
+ be superfluous or redundant.
+ permet d'encoder une partie de texte présente dans la source lorsque l'éditeur la considère superflue ou redondante.
+
+
+
+
+
+
+
+
+
+
+ one or more words indicating why this text is believed to be superfluous, e.g.
+repeated,
+ interpolated etc.
+ indique les raisons pour lesquelles on considère cette partie de texte comme superflue.
+
+
+
+
+ I am dr Sr yrs
+yrs
+Sydney Smith
+
+
+
+
+
+ secluded text
+ Secluded. Marks text present in the source which the editor believes to be genuine but out of its original place (which is unknown).
+
+
+
+
+
+
+
+
+
+
+ one or more words indicating why this text has been secluded, e.g.
+ interpolated etc.
+
+
+
+
+
+
+ Alphesiboea suos ulta est pro coniuge fratres,
+ sanguinis et cari vincula rupit amor.
+
+ secl. Pescani
+
+
+
+
+
+ contains the transcription of a topographic line in the source
+ document
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Poem
+ As in Visions of — at
+ night —
+ All sorts of fancies running through
+ the head
+
+
+
+
+
+
+
+
+ Hope you enjoyed
+ Wales, as they
+said
+ to Mrs FitzHerbert
+ Mama
+
+
+ Printed in England
+
+
+
+
+
+
This element should be used only to mark up writing which
+is topographically organized as a series of lines, horizontal or
+vertical. It should not be used to mark lines of verse (for which use
+l) nor to mark linebreaks within text which has been encoded
+using structural elements such as p (for which use
+lb).
+
+
+
+
+
+ groups a number of change descriptions associated
+with either the creation of a source text or the revision of an encoded text.
+
+
+
+
+
+
+
+
+
+
+
+
+
+ indicates whether the ordering of its child change
+elements is to be considered significant or not
+
+ true
+
+
+
+
+
+
+ deleted chapter 10
+ completed first draft
+
+
+
+
+
+
+
+
+
+ First stage, written in ink by a writer
+ Second stage, written in Goethe's hand using pencil
+ Fixation of the revised passages and further revisions by
+Goethe using ink
+ Addition of another stanza in a different hand,
+probably at a later stage
+
+
+
+
+
+
+
When this element appears within the creation
+element it documents the set of revision campaigns or stages
+identified during the evolution of the original text. When it appears within
+the revisionDesc element, it documents only changes made
+during the evolution of the encoded representation of that text.
+
+
+
+
+
+
+ supplies a list of transpositions, each of which is indicated at some point in
+ a document typically by means of metamarks.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
This example might be used for a source document which indicates in
+some way that the elements identified by ib02 and code
+ib01 should be read in that order (ib02 followed by
+ib01), rather than in the reading order in which they are presented in the
+source.
+
+
+
+
+
+ contains or describes any kind of graphic or written signal
+ within a document the function of which is to determine how it
+ should be read rather than forming part of the actual content of
+ the document.
+
+
+
+
+
+
+
+
+
+
+
+
+ describes the function (for example status, insertion,
+ deletion, transposition) of the metamark.
+
+
+
+ identifies one or more elements to which the metamark applies.
+
+
+
+
+
+ bör2.
+ og hör
+ 1.
+
+
+
+
+
+
+
+ represents any kind of modification identified within a single document.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ pleasing
+ agreable
+
+
+
+
+
+
+
+ indicates one or more cancelled interventions in a
+ document which have subsequently been
+ marked as reaffirmed or repeated.
+
+
+
+
+
+
+
+
+
+
+
+ points to one or more elements representing the
+ interventions which are being reasserted.
+
+
+
+
+
+ Ihr hagren, triſten, krummgezognenener Nacken
+ Wenn ihr nur piepſet iſt die Welt ſchon matt.
+
+
+
This encoding represents the following sequence of events:
+"Ihr hagren, triſten, krummgezog nenener Nacken/ Wenn ihr
+nur piepſet iſt die Welt ſchon matt." is written the redundant letters "nen" in "nenener" are deletedthe whole passage is deleted by hand g_bl using strikethroughthe deletion is reasserted by another hand (identified here as g_t)
+
+
+
+
+
+
+ contains a sequence of writing which has been retraced, for
+ example by over-inking, to clarify or fix it.
+
+
+
+
+
+
+
+
+
+
+
+ ... Skuldren
+
+
+
+
Multiple retraces are indicated by nesting one
+ retrace within another. In principle, a retrace
+ differs from a substitution in that second and subsequent
+ rewrites do not materially alter the content of an
+ element. Where minor changes have been made during the retracing action
+ however these may be marked up using del, add,
+ etc. with an appropriate value for the change
+ attribute.
+
+
+
+
+
+
+ describes a single textual transposition as an ordered list
+ of at least two pointers specifying the order in which the elements
+ indicated should be re-combined.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
The transposition recorded here indicates that the content of the element with
+identifier ib02 should appear before the content of the
+element with identifier ib01.
+
+
+
Transposition is usually indicated in a document by a
+metamark such as a wavy line or numbering.
+
The order in which ptr elements appear within a
+transpose element should correspond with the desired order,
+as indicated by the metamark.
+
+
+
+
+
+ indicates one or more marked-up interventions in a document
+ which have subsequently been marked for cancellation.
+
+
+
+
+
+
+
+
+
+
+
+ points to one or more elements representing the
+ interventions which are to be reverted or undone.
+
+
+
+
+
+ This is just some
+sample text,
+we need
+ not
+a real example.
+
+
+
This encoding represents the following sequence of events:
+"This is just some sample text, we need a real example" is writtenAt stage s2, "just some sample text, we need" is deleted by
+overstriking, and "not" is added At stage s3, parts of the deletion are cancelled by
+underdotting, thus reinstating the words "just some" and
+"text".
+
+
+
+
+
+
Critical Apparatus
The Apparatus Entry, Readings, and Witnesses
The Apparatus Entry
+ apparatus entry
+ 참조 도구 표제 항목
+ 學術編輯註解項目
+ entrée d'apparat critique
+ entrada de aparato crítico
+ voce dell'apparato
+ contains one entry in a critical apparatus, with an optional
+lemma and usually one or more readings or notes on the relevant passage.
+ 수의적 레마와 적어도 하나의 독법을 포함하여 비평적 참조 도구에서 하나의 표제 항목을 포함한다.
+ 一項學術編輯註解,內含一個不必備主題以及至少一個對應本。
+ 校勘資料中のいち対象で,内容として少なくとも1つの読みと,選択的に見
+ 出し(lemma)をとる.
+ contient une entrée dans un apparat critique,
+ constituée d'un lemme facultatif et d'au moins une leçon.
+ contiene una entrada en el aparato crítico, con un lema opcional y, al menos, una lectura.
+ contiene una singola voce in un apparato critico, con un lemma facoltativo e almeno una lettura
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ classifies the variation contained in this element according to
+some convenient typology.
+ 다양한 유형에 따라 이 요소에 포함된 변이형을 분류한다.
+ 利用合適的分類法將此元素所標記的變異分類。
+ 当該要素で示される対象を分類する.
+ classifie la variation contenue dans cet
+ élément selon toute typologie adéquate.
+ clasifica la variación contenida en tal elemento según una tipología funcional
+ classifica la variazione contenuta in tale elemento secondo una tipologia funzionale
+
+
+
+ identifies the beginning of the lemma in the base text.
+ 필요하다면 기본 텍스트에서 레마의 시작을 식별한다.
+ 必要情況下,指出基礎文件中該主題的開端。
+ 必要であれば,元テキストにおける対象語(lemma)の開始点を示す.
+ identifie, si nécessaire, le début du
+ lemme dans le texte de base.
+ identifica, si es necesario, el inicio del lema en el texto base
+ identifica, se necessario, l'inizio del lemma nel testo base
+
+
+
This attribute should be used when either the
+ double-end point method of apparatus markup, or the location-referenced
+ method with a URL rather than canonical reference, are used.
+
+
+
Cet attribut n'est utilisé que si l'on emploie la méthode de balisage de
+ l'apparat critique dite "double-end point", c'est-à-dire que l'on indique le
+ début et la fin du bloc de texte balisé.
+
+
+
+ 当該属性は,校勘資料中で,両端ポイントの手法が使用されてい
+ る場合に使われる.
+
+
+
+
+ identifies the endpoint of the lemma in the base text.
+ 필요하다면 기본 텍스트에서 레마의 종료지점을 식별한다.
+ 必要情況下,指出基礎文件中該主題的結尾。
+ 必要であれば,元テキストにおける対象語(lemma)語の終点を示す.
+ identifie, si nécessaire, la fin du lemme
+ dans le texte de base.
+ identifica, si es necesario, el final del lema en el texto base
+ identifica, se necessario, la fine del lemma nel testo base
+
+
+
This attribute is only used when the double-end point
+ method of apparatus markup is used, when the encoded apparatus is not
+ embedded in-line in the base-text.
+
+
+
Cet attribut n'est utilisé que si l'on emploie la méthode de balisage de
+ l'apparat critique dite "double-end point", avec l'apparat encodé enregistré
+ dans un fichier séparé plutôt qu'incorporé au fil du texte
+ (in-line) dans le fichier du texte de base.
+
+
+
+ location
+ 위치
+ localización
+ emplacement
+ posizione
+ indicates the location of the variation, when the
+location-referenced method of apparatus markup is used.
+ 참조 도구 마크업의 위치 참조 방법이 사용될 때 변이형 위치를 나타낸다.
+ 使用學術編輯註解標記的位置參照辦法時,指出變異的位置。
+ 校勘資料で場所参照の手法が採られている場合,該当する異なりの場所
+ を示す.
+ indique la localisation de la variante
+ lorsqu'on utilise dans l'encodage de l'apparat critique une méthode de
+ référencement des localisations.
+ indica la posición de la variante en caso de usar el método de señalización de la posición de la variante en la codificación del aparato.
+ indica la posizione della variante in caso di utilizzo del metodo di indicazione della posizione della variante nella codifica dell'apparato
+
+
+
This attribute is used only when the location-referenced
+encoding method is used. It supplies a string containing a canonical reference for the passage
+ to which the variation applies.
+
+
+
Cet attribut n'est utilisé que si l'on emploie la méthode de codage par
+ référence à un emplacement ("location-referenced").
+
+
+
+ 当該属性は,場所参照手法が採られている場合にのみ使用される.
+
+
+
+
+
+
+
+
+ Experience
+ Experiment
+ Eryment
+
+
+
+
+
+
+
+ Experience
+ Experiens
+
+
+ Experiment
+ Eximent
+
+
+ Eriment
+ Eryment
+
+
+
+
+
+
+
+ TIMΩΔA
+
+
+
+
+
+
+ Too badly worn to yield a text
+
+
+
+
+
+
+ σύμπαντα
+ ΣΙΝΠΑΤΑΝ
+
+
+
+ Mommsen's fanciful normalization, reproduced here, has not been accepted by all recent editions
+
+
+
+
+
+
+
+
+ list of apparatus entries
+ liste d'entrées dans un apparat critique
+ contains a list of apparatus entries.
+ contient une liste d'entrées dans un apparat critique.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
In the following example from the exegetical Yasna, the base text is encoded in the body of
+ the document, and two separate listApp elements are used in the back, containing
+ variant readings written in different scripts.
+
+ Variants from witnesses in Avestan script
+
+ ahiiā
+
+
+ ϑβā
+
+
+ āϑrō
+ āϑrōi
+
+
+
+
+ Variants from witnesses written in Pahlavi script
+
+ ʾytwnˈ
+
+
+ ʾwˈ
+
+
+ ḤNʾ
+
+
+
+
+
+
+
+
+
listApp elements would normally be located in the back part of a document,
+ but they may appear elsewhere.
+
+
+
+
+
Readings
+ lemma
+ 레마
+ 主題
+ lemme
+ lema
+ contains the lemma, or base text, of a textual variation.
+ 텍스트 변이형의 레마 또는 기본 텍스트를 포함한다.
+ 包含一個原文變異的主題或基礎文件。
+ 異なるテキストにおける対象語,すなわち基底テキスト(base text)を示す.
+ contient le lemme ou le texte de base d'une
+ variante textuelle
+ contiene el lema, o texto base, de una variante textuale
+ contiene il lemma, o testo base, di una variante testuale
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Experience
+ Experiment
+ Eryment
+
+
+
+
+
The term lemma is used in text criticism to
+describe the reading in the text itself (as opposed to those in the
+apparatus); this usage is distinct from that of mathematics (where a
+lemma is a major step in a proof) and natural-language processing
+(where a lemma is the dictionary form associated with an inflected
+form in the running text).
+
+
+
Le terme lemma est utilisé dans la critique textuelle pour décrire la
+ leçon dans le texte lui-même (par opposition à l'apparat) ; cette acception est
+ différente du sens en mathématiques (où un lemme est une étape majeure dans une
+ démonstration) et du sens dans le domaine du traitement du langage naturel (où un
+ lemme est la forme du dictionnaire associée à une forme fléchie dans le texte
+ courant).
+
+
+
+
+
+ reading
+ 독법
+ 對應本
+ leçon
+ lectura
+ lettura
+ contains a single reading within a textual variation.
+ 텍스트 변이형 내에서 단일 독법을 포함한다.
+ 包含原文變異中的一個對應本。
+ 異なるテキスト中で,ひとつの読みを示す.
+ contient une leçon à l'intérieur d'une variante
+ du texte.
+ contiene una única lectura dentro de una variante textual.
+ contiene un'unica lettura entro una variante testuale
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Eryment
+
+
+
+
+ cuens
+
+
+
+
+
+
Indicating Subvariation in Apparatus Entries
+ reading group
+ 독법군
+ 對應本群組
+ groupe de leçons
+ grupo de lecturas
+ gruppo di letture
+ within a textual variation,
+groups two or more readings perceived to have a genetic
+relationship or other affinity.
+ 텍스트 변이형 내에서 계통 관계 또는 유사 관계로 이해되는 둘 이상의 독법을 모아 놓는다.
+ 原文變異中,匯集兩個或多個認為具有根源關係或於其他方面性質類似的對應本。
+ 異なるテキストで,系統関係や類縁性があるとされる,二つ以上の読みをま
+ とめる.
+ regroupe deux leçons ou plus qui sont perçues
+ comme ayant une relation génétique ou une autre affinité.
+ agrupa al interno de una variante textual dos o más lecturas consideradas emparentadas o afines.
+ all'interno di una variante testuale raggruppa due o più letture considerate imparentate o affini
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Only one <lem> element may appear within a <rdgGrp>
+
+
+
+
+
+ though
+
+ thogh
+ thouhe
+
+
+
+
+
+
+
+ comte
+
+ cante
+ contes
+
+
+
+
+
+
+
+ 壓
+
+ 壓
+ 压
+
+
+
+
+
+
May
+contain readings and nested reading groups.
+
Note that only one lem element may appear within
+a single apparatus entry, whether it appears outside a rdgGrp
+element or within it.
+
+
+
Contient des leçons et des groupes de leçons emboîtées.
+
Notez qu'un seul élément lem peut apparaître dans une seule entrée d'apparat,
+ qu'il se trouve à l'intérieur ou à l'extérieur d'un élément rdgGrp.
Witness Detail Information
+ witness detail
+ 비교 대상 텍스트 세목
+
+ detalle del testimonio
+ informations détaillées sur le témoin
+ dettagli del testimone
+ gives further information about a particular witness, or
+witnesses, to a particular reading.
+ 특별한 비교 대상 텍스트에 관한 상세한 정보를 특별한 독법에 제공한다.
+ 進一步提供一個特殊對應本的特殊版本資訊。
+ 特定の解釈に関連する,特定の文献について詳細な情報を示す.
+ donne des renseignements supplémentaires sur un
+ témoin particulier ou sur des témoins, pour une leçon particulière.
+ proporciona ulteriores detalles sobre uno o más testimonios relativos a una lectura dada.
+ fornisce ulteriori dettagli in merito a un testimone o più testimoni relativi a una data lettura
+
+
+
+
+
+
+
+
+
+
+
+
+ witnesses
+ 비교 대상 텍스트
+ testimonios
+ témoins
+ testimoni
+ indicates the sigil
+ or sigla identifying the witness or witnesses to which the
+detail refers.
+ 세목이 참조하는 비교 대상 텍스트에 대한 변항 기호 또는 기호일람표를 표시한다.
+ 標明細節資訊所指版本的一個或多個印記。
+ 細目が参照する当該文献の印や文献記号を示す.
+ contient le ou les code(s) identifiant le ou le(s) témoin(s) auxquels fait référence l'élément
+ witDetail.
+ indica la sigla o siglas relativas a los testimonios a los cuales se refieren los detalles
+ indica la sigla o le sigle relative ai testimoni ai quali si riferiscono i dettagli
+
+
+
+ describes the type of information given about the witness.
+ 비교 대상 텍스트에 관해 제시된 정보의 유형을 기술한다.
+ 版本的資訊種類。
+ 当該文献に関する情報の種類を示す.
+ décrit le type de renseignement donné sur
+ le témoin.
+ describe el tipo de información dada sobre los testimonios.
+ descrive il tipo di informazione fornita in merito al testimone
+
+
+
+
+
+
+
+ Experience
+ Experiens
+
+
+ Ornamental capital.
+
+
+
+
The witDetail element should be regarded as a
+ specialized type of note element; it is synonymous with
+ note type='witnessDetail', but differs in the omission of some attributes
+ seldom applicable to notes within critical apparatus, and in the
+ provision of the wit attribute, which permits an
+ application to extract all annotation concerning a particular
+ witness or witnesses from the apparatus. It also differs in that
+ the location of a witDetail element is not significant
+ and may not be used to imply the point of attachment for the
+ annotation; this must be explicitly given by means of the
+ target attribute.
+
+
+
+
L'élément witDetail devrait être considéré comme un type spécifique de
+ l'élément note ; il est synonyme de note type='witnessDetail'.
+ Il diffère de la note note générale par l'omission d'attributs rarement
+ applicables aux notes d'apparat critique et par la présence de l'attribut
+ wit qui permet à une application d'extraire de l'apparat toute annotation
+ concernant un ou des témoins particuliers.
Witness Information in the Source
+ témoin
+ contains a list of one or more sigla of witnesses attesting a
+given reading, in a textual variation.
+ 텍스트 변이형에서 주어진 독법을 입증하는 비교 대상 텍스트에 대한 하나 이상의 기호일람표 목록을 포함한다.
+ 原文變異中,表明已知對應本版本的一個或多個印記的列表。
+ 読みの元となる文献を表すひとつ以上の文献記号のリストを示す.
+ contient une liste d'une ou plusieurs
+ abréviation(s) désignant des témoins attestant d'une leçon donnée, pour une version du
+ texte.
+ contiene una lista de una o más siglas de testimonios que atestiguan una lectura dada de una variante textual.
+ contiene una lista di una o più sigle di testimoni che attestano una data lettura di una variante testuale
+
+
+
+
+
+
+
+
+
+
+ Experience
+ Ellesmere, Hengwryt
+
+
+
+
+ Experience
+ Ellesmere, Hengwryt
+
+
+
+
+
+ 經驗
+ 郝仁
+
+
+
+
This element represents the same information as that provided by the
+wit attribute of the reading; it may be used to record the
+exact form of the sigla given in the source edition, when that is of
+interest.
+
+
+
Cet élément représente la même information que celle fournie par l'attribut
+ wit de la leçon ; on peut l'utiliser pour noter la forme exacte des
+ abréviations de témoins données dans l'édition source, lorsque cela présente un
+ intérêt.
The Witness List
+ witness list
+ 비교 대상 텍스트 목록
+ liste de témoins
+ lista dei testimoni
+ lista de testimonios
+ lists definitions for all the witnesses referred to by a critical
+ apparatus, optionally grouped hierarchically.
+ 비평적 참조 도구에 의해 참조된 모든 비교 대상 텍스트에 대한 정의 목록. 그리고 이는 계층적 그룹으로 수의적으로 구성된다.
+ 校勘資料中で参照されている文献の定義のリストを示す.選択的に,グルー
+ プとして構造化されている.
+ donne une liste de définitions pour tous les
+témoignages cités dans un apparat critique, pouvant être groupées de façon hiérarchique.
+ contiene una lista di tutti i testimoni a cui si fa riferimento negli elementi e attributi relativi ai testimoni nell'apparato critico
+ contiene la lista con todos los testimonios a los cuales se hace referencia en los elementos y atributos relativos a los testimonios en el aparato crítico
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Ellesmere, Huntingdon Library 26.C.9
+ Hengwrt, National Library of Wales,
+ Aberystwyth, Peniarth 392D
+ Bodleian Library Rawlinson Poetic 149
+ (see further )
+
+
+
+
+
May contain
+a series of witness or listWit elements.
+
+
The provision of a listWit element simplifies
+the automatic processing of the apparatus, e.g. the reconstruction
+of the readings for all witnesses from an exhaustive apparatus.
+
Situations commonly arise where there are many more or less
+fragmentary witnesses, such that there may be quite distinct groups
+of witnesses for different parts of a text or collection of
+texts. Such groups may be given separately, or nested within a single
+listWit element at the beginning of the file listing all the
+witnesses, partial and complete, for the text, with the attestation
+of fragmentary witnesses indicated within the apparatus by use of the
+witStart and witEnd elements described in section
+.
+
Note however that a given witness can only be defined once, and can
+therefore only appear within a single listWit element.
+
+
+
Peut contenir une série d'éléments witness ou
+ listWit.
+
Fournir un élément listWit simplifie le traitement automatique de l'apparat,
+ comme par exemple la reconstitution des leçons pour tous les témoins d'un apparat
+ exhaustif.
+
C'est un cas qui se produit communément lorsqu'il existe de nombreux témoins plus ou
+ moins fragmentaires, de sorte qu'il peut y avoir des groupes pratiquement distincts
+ de témoins pour différentes parties d'un texte ou d'une collection de textes. On
+ peut donner ces groupes séparément ou bien les réunir à l'intérieur d'un seul
+ élément listWit au début du fichier listant tous les témoins (parcellaires
+ ou complets) pour le texte, accompagnés de l'attestation des témoins fragmentaires
+ signalés dans l'apparat par l'utilisation des éléments witStart et
+ witEnd décrits dans la section .
+
Noter cependant qu'un témoin donné ne peut être défini qu'une seule fois et ne peut
+ donc figurer que dans un seul élément listWit.
+
+
+
+
+
+ témoin
+ contains either a description of a single witness referred to
+within the critical apparatus, or a list of witnesses which is to be
+referred to by a single sigil.
+ 비평적 참조 도구 내에서 참조된 단일 비교 대상 텍스트의 기술 또는 단일 변항 기호에 의해 참조된 비교 대상 텍스트 목록
+ 包含學術編輯註解中所指的單一版本描述,或由一個印記所參照的版本列表。
+ 校勘資料で参照されている文献ひとつの情報,またはひとつの印が参照して
+ いる文献のリストを示す.
+ contient soit la description d'un seul témoin
+ auquel il est fait référence à l'intérieur de l'apparat critique, soit une liste de
+ témoins, à laquelle on doit faire référence par une seule abréviation
+ puede contener bien la descripción de un único testimonio indicado en el aparato crítico, o una lista de testimonios indicada por una única sigla.
+ può contenere la descrizione di un unico testimone indicato nell'apparato critico, oppure una lista di testimoni indicata da un'unica sigla
+
+
+
+
+
+
+
+
+
+
+ Ellesmere, Huntingdon Library 26.C.9
+ Hengwrt, National Library of Wales,
+ Aberystwyth, Peniarth 392D
+ Bodleian Library Rawlinson Poetic 149
+ (see further )
+
+
+
+
+
The content of the witness element may give
+bibliographic information about the witness or witness group, or it
+may be empty.
+
+
+
Le contenu de l'élément witness peut donner une information bibliographique
+ sur le témoin ou le groupe de témoins ou bien il peut rester vide.
Fragmentary Witnesses
+ fragmented witness start
+ 파편화된 비교 대상 텍스트 시작
+
+ comienzo del testimonio fragmentado
+ début d'un témoin fragmentaire
+ inizio di testimone frammentario
+ indicates the beginning, or resumption, of the text of a
+fragmentary witness.
+ 파편화된 비교 대상 텍스트의 시작부 또는 재시작부를 표시한다.
+ 指明零散版本文字的開端或重新開始。
+ 断片的な文献のテキストの始点または再開点を示す.
+ indique le début, ou la reprise du texte, d'un
+ témoin fragmentaire
+ indica el inicio o la continuación del texto de un testimonio fragmentario.
+ indica l'inizio o la ripresa del testo di un testimone frammentario
+
+
+
+
+
+
+
+
+
+
+
+ Auctoritee
+ auctorite
+ auctorite
+
+
+
+
+
+
+
+ fragmented witness end
+ 파편화된 비교 대상 텍스트의 종료부
+
+ fin del testimonio fragmentado
+ fin d'un témoin fragmentaire
+ fine di testimone frammentario
+ indicates the end, or suspension, of the text of a fragmentary
+witness.
+ 파편화된 비교 대상 텍스트의 종료부 또는 중지부를 나타낸다.
+ 指明零散版本文字的結尾或中止。
+ 断片的な文献のテキストの終わりまたは停止点を示す.
+ indique la fin ou l'arrêt du texte d'un témoin
+ fragmentaire
+ indica el inicio o la continuación del texto de un testimonio fragmentario
+ indica la fine o l'interruzione del testo di un testimone frammentario
+
+
+
+
+
+
+
+
+
+
+
+ Experience
+ Ex
+
+
+
+
+
+
+
+
+
+ début d'une lacune
+ indicates the beginning of a lacuna in the text of a mostly
+complete textual witness.
+ 거의 완성된 비교 대상 텍스트의 공백부 시작을 표시한다.
+ 指出於大致完整的文字版本中,一個缺文的開始。
+ 殆ど完全である文献にある脱文の始めを示す.
+ indique le début d'une lacune dans le texte d'un
+ témoin textuel quasiment complet.
+ indica el principio de una laguna en el texto casi completo
+ indica l'inizio di una lacuna nel testo di un testimone quasi completo
+
+
+
+
+
+
+
+
+
+
+
+ Experience
+ Ex
+
+
+
+
+
+
+
+
+
+ fin d'une lacune
+ indicates the end of a lacuna in a mostly complete textual
+witness.
+ 거의 완성된 비교 대상 텍스트의 공백부 종료를 표시한다.
+ 指出於大致完整的文字版本中,一個缺文的結束。
+ 殆ど完全である文献中にある脱文の終わりを示す.
+ indique la fin d'une lacune dans le texte d'un
+ témoin textuel quasiment complet
+ indica el fin de una laguna en un texto casi completo.
+ indica la fine di una lacuna nel testo di un testimone quasi completo
+
+
+
+
+
+
+
+
+
+
+ auctorite
+
+
+
+
+ auctorite
+
+
+
+
+ 傀
+
+
+
+
+
+
Linking the Apparatus to the Text
The Location-referenced Method
The Double End-Point Attachment Method
The Parallel Segmentation Method
Other Linking Methods
Using Apparatus Elements in Transcriptions
Strategies for Encoding Variation
Module for Critical Apparatus
+ Text Criticism
+ Critical Apparatus
+ Apparat critique
+ 學術編輯註解
+ Apparato critico
+ Critical Apparatus
+ 校勘モジュール
+
+ Méthode d'encodage des variantes
+ declares the method used to encode text-critical variants.
+ sert à déclarer la méthode utilisée pour encoder les variantes critiques du texte.
+ 텍스트 비평 이문을 부호화하는 방법을 선언한다.
+ 宣告在標記不同版本中的變異字體時所使用的方法。
+ 校勘対象を符号化する手法を示す.
+ gibt die Methode an, nach
+ der die textkritischen Varianten kodiert sind.
+ declara el método empleado para codificar las variantes del aparato crítico.
+ indica il metodo adottato per codificare varianti critiche del testo.
+
+
+
+
+
+
+
+
+
+ indicates which method is used to encode the apparatus of
+variants.
+ indique quelle méthode est utilisée pour encoder des variantes dans l’apparat critique.
+ 이문의 참조 도구를 부화하는 방법을 제시한다.
+ 指明標記變異的學術編輯註解時所使用的方法。
+ 異なる校勘資料を符号化する手法を示す.
+ gibt die Methode an, nach
+ der textkritische Apparat kodiert ist.
+ indica el método seguido para codificar el aparato crítico de las variantes.
+ indica il metodo adottato per codificare l'apparato di varianti.
+
+
+
+ apparatus uses line numbers or other canonical reference scheme
+referenced in a base text.
+ l’apparat critique se réfère aux numéros de ligne ou à tout autre schéma de référence canonique contenu dans le texte de base.
+ 참조 도구는 기본 텍스트에서 참조된 행 수 또는 다른 표준 참조 스키마를 사용한다.
+ 學術編輯註解使用基礎文件中被參照的行數或其他標準參照架構。
+ el aparato emplea números de línea u otro esquema canónico de referencia referidos en el texto base.
+ 校勘資料の基底テキスト中には,参照される行番号または標準的
+ な参照スキームがある.
+ l'apparato utilizza righe numerate o un altro schema di riferimento canonico indicato in un testo base.
+
+
+ apparatus indicates the precise locations of the beginning and
+ending of each lemma relative to a base text.
+ l’apparat critique indique la localisation précise du début et de la fin de chaque lemme dans le texte de base.
+ 참조 도구는 기본 텍스트에 관하여 각 레마의 시작부와 종료부의 정확한 위치를 나타낸다.
+ 學術編輯註解指出與基礎文件相關的各主題起始與結束的確切位置
+ el aparato indica las localizaciones exactas del principio y de la conclusión de cada lema concerniente a un texto base.
+ 校勘資料の基底テキスト上にある各校合部分の始点と終点の正確な
+ 場所が示されている.
+ l'apparato indica la localizzazione precisa dell'inizio e delle fine di ciascun lemma relativo a un testo base.
+
+
+ alternate readings of a passage are given in parallel in the
+text; no notion of a base text is necessary.
+ différentes leçons d’un passage sont données en parallèle dans le texte ; la notion de texte de base n’est pas nécessaire.
+ 단락의 교대식 독법은 텍스트에서 병렬로 제시된다. 기본 텍스트의 어떤 개념도 필요하지 않다.
+ 文件中一個段落的多個替代讀本以平行方式呈現;不需要基礎文件
+ las lecturas alternativs de un pasaje se dan paralelamente en el texto; no es necesaria ninguna noción sobre un texto base necesaria.
+ ある一節の別の解釈が,当該テキスト中に併置されている.基底テ
+ キストという視点は必要なくなる.
+ letture alternative di un brano sono fornite in parallelo nel testo; non è necessaria alcune nozione di un testo base.
+
+
+
+
The value parallel-segmentation requires in-line
+encoding of the apparatus.
+
+
+
La valeur parallel-segmentation nécessite un encodage de l'apparat incorporé au texte.
+
+
+
+ indicates whether the apparatus appears within the running text
+or external to it.
+ indique si l’apparat critique est intérieur ou extérieur au texte.
+ 참조 도구가 현 텍스트 내에서 또는 그 외부에서 나타나는가를 표시한다.
+ 指出該學術編輯註解出現在連續文字內部或其外部。
+ 校合の情報が,本文中,または外部にあるかを示す.
+ gibt an, ob der Apparat
+ innerhalb oder außerhalb des Textes erscheint.
+ indica si el aparato aparece al interno o al externo del texto.
+ indica se l'apparato compare all'interno del testo, o esternamente.
+
+
+
+
+
+ The @location value "external" is inconsistent with the
+ parallel-segmentation method of apparatus markup.
+
+
+
+
+
+ apparatus appears within the running text.
+ l’apparat critique est intérieur au texte.
+ 참조 도구가 현 텍스트 내에서 나타난다.
+ 學術編輯註解出現在連續文字內部
+ el aparato aparece dentro del texto.
+ 校合の情報は,本文中にある.
+ l'apparato compare all'interno del testo.
+
+
+ apparatus appears outside the base text.
+ l’apparat critique est extérieur au texte.
+ 참조 도구가 기본 텍스트 밖에 나타난다.
+ 學術編輯註解出現在基礎文件外部
+ el aparato aparece fuera del texto base.
+ 校合の情報は,本文外,すなわち基底テキスト外にある.
+ l'apparato compare esternamente al testo.
+
+
+
+
The value external is inconsistent with the
+parallel-segmentation method of apparatus markup.
+
+
+
La valeur external n'est pas compatible avec la méthode de segmentation parallèle.
+
+
+
+ 値externalは,校勘資料のマークアップがインラインである
+ 場合と矛盾する.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ groups elements which mark the beginning or ending of a fragmentary manuscript or other
+ witness.
+ 파편화된 원고 또는 다른 비교 대상 텍스트의 시작부 또는 종료부를 표지하는 요소를 모아 놓는다.
+ 所匯集的元素標記出零散手稿的起始或結尾,或其他版本。
+ 手書き資料や文献の断片の,始まりや終わりを示す要素をまとめる.
+ regroupe des éléments qui marquent le début ou la fin
+ d'un manuscrit fragmentaire ou d'un autre témoin.
+ agrupa los elementos que señalan el inicio o el final de
+ un manuscrito fragmentario o de otro testimonio.
+ raggruppa gli elementi che segnalano l'inizio o la fine
+ di un manoscritto frammentario o di altro testimone
+
+
These elements may appear anywhere within the elements lem and rdg, and
+ also within any of their constituent elements.
+
+
+
Ces éléments peuvent figurer n'importe où à l'intérieur des éléments lem et
+ rdg ou dans tout élément qui les compose.
+
+
+
当該要素は,要素lemやrdg,自身の構成要素の内部で, 自由に出現できる.
+
+
+
+
+
+ provides attributes to mark the beginning or ending of a fragmentary
+manuscript or other witness.
+ 파편화된 원고 또는 다른 비교 대상 텍스트의 시작부 또는 종료부를 표지하는 요소의 속성
+ 提供元素的屬性,這些元素標記岀零散手稿的起始、結尾或其他版本。
+ 手書き資料や文献の断片について,その初めと終わりを示す要素向けの
+ 属性.
+ attributs d'éléments qui marquent le début ou la fin d'un manuscrit fragmentaire ou d'un autre témoin.
+ atributos para elementos que señalan el inicio o el fin de un manuscrito fragmentario o de otro testimonio
+ attributi per elementi che segnalano l'inizio o la fine di un manoscritto frammentario o di altro testimone
+
+
+ witness or witnesses
+ 비교 대상 텍스트
+ testimonio o testimonios
+ témoin ou témoins
+ testimone o testimoni
+ contains a space-delimited list of one or more sigla indicating the witnesses
+to this reading beginning or ending at this point.
+ 이 지점에서 시작 또는 종료하는 비교 대상 텍스트를 표시하는 하나 이상의 기호 일람표 목록을 포함한다.
+ 一個或多個印記列表,指出於此處開始或結束的版本。
+ ひとつ以上の文献記号のリストを含む.
+ 当該ポインタにより文献記号で示された文献の始めまたは終わりが示さ
+ れている.
+ contient une liste d'une ou plusieurs abréviations désignant les témoins qui commencent ou finissent à ce point.
+ contiene una lista de una o más siglas que indican los testimonios que inician o acaban en ese punto.
+ contiene una lista di una o più sigle indicanti i testimoni che cominciano o finiscono in questo punto
+
+
+
+
+
These elements may appear anywhere within the elements lem
+and rdg, and also within any of their constituent elements.
+
+
+
Ces éléments peuvent figurer n'importe où à l'intérieur des éléments lem et
+ rdg, ainsi que dans tout élément qui les compose.
+
+
+
+
+
+ supplies the attribute used to identify the witnesses
+ supporting a particular reading in a critical apparatus.
+
+
+
+ witness or witnesses
+ 비교 대상 텍스트
+ testimonio o testimonios
+ témoin ou témoins
+ testimone o testimoni
+ contains a space-delimited list of one or more pointers indicating the witnesses
+which attest to a given reading.
+ 제시된 독법을 증명하는 비교 대상 텍스트를 나타내는 하나 이상의 포인터 목록을 포함한다.
+ 包含一個或多個指標的一份列表,連結到已知對應本的版本。
+
+ 当該解釈を証す文献を示す1つ以上のポインタのリストを示す.
+
+ contient une liste comprenant un ou plusieurs pointeurs qui désignent
+ les témoins attestant d'une leçon donnée.
+ contiene una lista de uno o más indicadores que muestran los testimonios que presentan una determinada lectura.
+ contiene una lista di uno o più puntatori indicanti i testimoni che attestano una determinata lettura
+
+
+
If the apparatus contains readings only for a single
+witness, this attribute may be consistently omitted.
+
This attribute may occur both within an apparatus
+gathering variant readings in the transcription of an individual
+witness and within an apparatus gathering readings from different
+witnesses.
+
Additional descriptions or alternative versions of the sigla referenced may be
+supplied as the content of a child wit element.
+
+
+
Si l'apparat ne contient que des leçons relatives à un seul témoin, cet attribut peut être systématiquement omis.
+
Cet attribut peut figurer à la fois dans un apparat qui réunit des variantes de leçons dans la transcription d'un témoin isolé et à l'intérieur d'un apparat qui réunit des leçons provenant de différents témoins.
+
On peut donner des descriptions supplémentaires ou des versions alternatives d'abréviations référencées de témoins comme contenu d'un élément enfant wit.
+
+
+
+
+
+
+
+ defines a set of attributes common to all elements representing variant readings in text critical work.
+ 텍스트 비평 작품에서 이문 독법을 나타내는 모든 요소에 공통된 속성 집합을 정의한다.
+ 定義在文件評論作品中,所有標記變異對應本的元素可用的一套屬性。
+ 校勘資料における解釈を示す要素全てに付与される属性を定義する.
+ définit un ensemble d'attributs communs à tous
+ les éléments présentant différentes leçons dans l'analyse critique d'un texte.
+ define un conjunto de atributos comunes a todos los elementos que presentan lecturas de variantes en la lectura crítica de una obra
+ definisce un insieme di attributi comuni a tutti gli elementi che rappresentano letture di varianti nella lettura critica di un'opera
+
+
+
+
+
+
+ classifies the reading according to some useful typology.
+ 유용한 유형에 따라 독법을 분류한다.
+ 用合宜的分類法將對應本分類。
+ 当該解釈の分類を示す.
+ établit une classification de la leçon selon une typologie utile.
+ clasifica la lectura según alguna tipología funcional.
+ classifica la lettura secondo una tipologia funzionale
+
+
+
+ substantif
+ the reading offers a substantive variant.
+ 독법은 내용적 이문을 제공한다.
+ 對應本提供一個獨立變異。
+ la lectura ofrece una variante substancial.
+ 当該解釈は,実質的な異形を示す.
+ la leçon offre une variante nominale.
+ la lettura offre una variante sostanziale
+
+
+ orthographique
+ the reading differs only orthographically, not in substance,
+from other readings.
+ 독법은 다른 독법과 내용이 아니라, 철자상 차이가 있다.
+ 該對應本僅於拼字法上與其他對應本不同,大致上維持不變。
+ la lectura difiere de otras lecturas sólo ortograficamente, no de forma substancial.
+ 当該解釈は,実質的なものではないが,他の解釈の正書法と異なる.
+ la leçon ne diffère que par l'orthographe, mais non en substance, des autres leçons.
+ la lettura differisce solo in senso ortografico, e non in modo sostanziale, rispetto ad altre letture
+
+
+
+
+ classifies the cause for the variant reading, according to
+any appropriate typology of possible origins.
+ 가능한 원본의 적절한 유형에 따라 이문 독본의 이유를 분류한다.
+ 利用可能來源的任何適當分類法,將變異對應本的產生原因分類。
+ 解釈が異なる原因を分類する.
+ établit une classification de la cause d'une variante de leçon, selon une typologie appropriée aux origines possibles de cette variation.
+ clasifica la causa de una lectura alternativa según cualquier tipología adecuada de posibles orígenes.
+ classifica le ragioni di una lettura alternativa secondo una qualsiasi tipologia adeguata di origini possibili
+
+
+
+
+
+
+
+
+
+
+
+ variant sequence
+ 이문 연쇄
+ secuencia variable
+ position de la variante dans une séquence
+ sequenza variante
+ provides a number indicating the position of this reading in a
+sequence, when there is reason to presume a sequence to the variants.
+
+ 어떤 연쇄를 임의의 레마에 관한 이문으로 추정하는 이유가 있을 때, 어떤 연쇄에서 이 독본의 위치를 나타내는 수를 제공한다.
+ 當有理由假設任一主題的一系列變異對應本時,則提供一個數字,指出此對應本於連續系列中的位置。
+ 1つの対象語に対する一連の異形を想定する理由がある場合,当該解釈
+ がある場所を番号で示す.
+
+ fournit un nombre indiquant la position
+ de la leçon dans une séquence, lorsqu'on peut supposer un ordre pour les
+ variantes de chaque lemme.
+ proporciona un número que indica la posición de tal lectura dentro de una secuencia, cuando se de el caso de suponer una secuencia respecto a las variantes de un lema dado
+ fornisce un numero che indica la posizione di tale lettura all'interno di una sequenza, qualora ci sia motivo di supporre una sequenza rispetto alle varianti per un dato lemma
+
+
+
Different variant sequences could be coded with distinct
+number trails: 1-2-3 for one sequence, 5-6-7 for another. More
+complex variant sequences, with (for example) multiple branchings
+from single readings, may be expressed through the join
+element.
+
+
+
On peut coder différentes séquences de variantes avec des séries de numéros distincts : 1-2-3 pour une séquence, 5-6-7 pour une autre. On peut exprimer
+des séquences de variantes plus complexes (par exemple comportant de multiples ramifications à partir de leçons uniques) par l'élément join.
Organizational Names
+ organization name
+ 조직명
+ 組織名稱
+ nom d'organisation
+ nombre de una organización
+ nome di organizzazione
+ contains an organizational name.
+ 조직명을 포함한다.
+ 包含一個組織名稱。
+ 組織の名前を示す.
+ contient le nom d'une organisation.
+ contiene el nombre de una organización.
+ contiene il nome proprio di un'organizzazione
+
+
+
+
+
+
+
+
+
+
+
+
+ About a year back, a question of considerable interest was agitated in the Pennsyla. Abolition Society [...]
+
+
+
+ Société savoisienne de Grenoble
+
+
+
+
+ 大約一年前,在賓州的廢止黑奴協會,有一場轟動的激辯。
+
+
+
+
+
+ personal name
+ 개인 이름
+ 個人名稱
+ nom de personne
+ nombre propio de persona
+ nome proprio di persona
+ contains a proper noun or proper-noun phrase referring to a
+ person, possibly including one or more of
+ the person's forenames, surnames, honorifics, added names, etc.
+ 개인의 이름, 성, 존칭어, 추가 명 등의 하나 또는 전부를 사용하여 개인을 지칭하는, 고유명사 또는
+ 고유명사구를 포함한다.
+ 包含一個人名,可能是任何或全部屬於該人物的名字、姓氏、敬稱、或附加名等。
+ 人物の固有名詞を示す.例えば,名,姓,敬称,追加名など.
+ contient un nom propre ou une expression nominale se
+ référant à une personne, pouvant inclure tout ou partie de ses prénoms, noms de famille, titres
+ honorifiques, noms ajoutés, etc.
+ contiene un nombre propio o un sintagma identificable
+ como un nombre propio, que se refiere a una persona y puede incluir cualquier o todos los
+ nombres de pila, apellidos, títulos honoríficos, o nombres añadidos de la persona en cuestión.
+ contiene un nome proprio o un sintagma identificabile
+ come nome proprio, che si riferisce a una persona e può includere qualsiasi o tutti i prenomi,
+ cognomi, titoli onorifici, o nomi aggiunti della persona in questione
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ EdwardGeorgeBulwer-Lytton, Baron Lytton of
+ Knebworth
+
+
+
+
+
+ GarcíaMaría-Felicità la Malibran, Desdemona
+
+
+
+
+ 夏爾皮耶波特萊爾,法國象徵派詩人
+
+
+
+
+
+
+
+ nom de famille
+ contains a family (inherited) name, as opposed to a given, baptismal, or nick name.
+ contient un nom de famille (hérité) par opposition à un nom donné, nom de baptême ou surnom.
+ 이름, 세례명, 또는 별명에 반대되는 것으로 (물려받은) 성을 포함한다.
+ 包含一個家族姓氏,並非名字、教名、或綽號。
+ (継承される)苗字を示す.姓名中の名,洗礼名,愛称,別称とは異なる.
+ contiene el apellido o nombre de família (heredado), en oposicion a un nombre asignado, un nombre de
+ bautismo o un sobranombre.
+ contiene un nome di famiglia (ereditato) piuttosto che un nome assegnato, un nome di battesimo o un
+ soprannome
+
+
+
+
+
+
+
+
+
+
+
+ St John Stevas
+
+
+
+
+ Sidonie Gabrielle Colette
+
+
+
+
+ 歐陽
+
+
+
+
+
+
+ prénom
+ contains a forename, given or baptismal name.
+ 이름 또는 세례명을 포함한다.
+ 包含名字或教名。
+ 人物に与えられた名前のうち,名の部分,すなわち個人を表す部分を示す.
+ contient un prénom, qu'il soit donné ou un nom de baptême.
+ contiene el nombre de pila asignado en el bautismo.
+ contiene un prenome assegnato o un nome di battesimo
+
+
+
+
+
+
+
+
+
+
+
+
+ Ex-President
+ George
+ Bush
+
+
+
+
+
+
+ Ex-Président
+ George
+ Bush
+
+
+
+
+
+
+ 先總統
+ 中正
+ 蔣
+
+
+
+
+
+
+
+ generational name component
+ 세대명 성분
+
+ componente de nombre generacional
+ qualificatif générationnel de nom
+ componente generazionale del nome
+ contains a name component used to distinguish otherwise similar names on the basis of the relative ages or generations of the persons
+ named.
+ 개인의 상대적 나이 또는 세대에 기반하여 유사 이름을 다른 방식으로 구분하는 이름 성분을 포함한다.
+ 該名稱用來和其他相似名稱做區別,以個人的相對年紀或隸屬世代作依據。
+ 似た名前を区別する為に,相対的な年齢関係,世代関係などの情報を示す.
+ contient une composante de nom utilisée pour distinguer des noms, par ailleurs similaires, sur la base de
+ l'âge ou de la génération des personnes concernées.
+ contiene un componente del nombre utilizado para distinguir nombre similares entre ellos atendiendo a la
+ diferencia de edad o de pertenencia a generaciones distintas que se establece entre las personas nombradas.
+ contiene una componente del nome utilizzata per distinguere nomi simili tra loro sulla base della
+ differenza di età o dell'appartenenza a generazioni diverse delle persone nominate
+
+
+
+
+
+
+
+
+
+
+
+
+ Charles
+ II
+
+
+
+
+
+
+ Louis
+ XIV
+
+
+
+
+
+
+ Louis X
+ Le Hutin
+
+
+
+
+
+
+ 查爾斯
+ 二世
+
+
+
+
+
+
+ 彼特
+ 小的
+
+
+
+
+
+
+ Pitt
+ the Younger
+
+
+
+
+
+
+
+ name link
+ lien entre les composants d'un nom
+ contains a connecting phrase or link used within a name but not regarded as part of it, such as van der or
+ of.
+ van der 또는 of와 같이 이름의 부분으로 간주되지 않는 이름 내의 연결 구 또는 연결을
+ 포함한다.
+ 包含一個名稱中的連結字彙,但不屬於該名稱的一部份,例如 van der 或是 of。
+ 名前の中で使われているが,その一部としては見られない,関連する句やリ ンクを示す.例えば,van derや
+ ofなど.
+ contient une particule ou une expression exprimant un lien, utilisés dans un nom mais considérés comme
+ n'en faisant pas partie, comme "van der" ou "de".
+ contiene un afijo de conexión al interno del nombre no considerado parte del nombre, como p.ej. Van Der,
+ o De Las.
+ contiene un affisso di connessione all'interno del nome non considerato parte del nome, come van der
+ oppure of
+
+
+
+
+
+
+
+
+
+
+
+ Frederick
+ van der
+ Tronck
+
+
+
+
+
+
+ Frederick
+ van der
+ Tronck
+
+
+
+
+
+
+ Alfred
+ de
+ Musset
+
+
+
+
+ 因漢文無姓名連結,故無法提供範例
+
+
+ 因漢文無姓名連結,故無法提供範例
+
+
+
+
+ Alfred
+ de
+ Musset
+
+
+
+
+
+
+
+ additional name
+ 부가명
+ 附加名稱
+ nom additionnel
+ nombre adicional
+ nome aggiuntivo
+ contains an additional name component, such as a nickname, epithet, or alias, or any other descriptive phrase used within a personal
+ name.
+ 별명, 통명, 가명, 또는 개인 이름 내에서 사용되는 다른 기술적 구와 같이 부가적 이름 성분을 포함한다.
+ 附加的名稱,例如綽號、稱號、或別名,或是在人名中出現的其他描述性措辭。
+ 付加的な名前要素を示す.例えば,愛称,渾名,別名などの個人名.
+ contient une composante de nom additionnelle, comme un surnom, une épithète, un alias ou toute autre
+ expression descriptive utilisée dans un nom de personne.
+ contiene un componente añadido al nombre, como un sobrenombre, un epíteto, alias u otras eventuales
+ expresiones utilizadas al interno de un nombre propio de persona.
+ contiene una componente aggiuntiva del nome, come un soprannome, un epiteto, o eventuali altre
+ espressioni utilizzate all'interno di un nome proprio di persona
+
+
+
+
+
+
+
+
+
+
+
+
+ Frederick
+ the Great
+ Emperor of Prussia
+
+
+
+
+
+ CatherineII, la
+ Grande, impératrice de Russie
+
+
+
+
+
+ 政
+ 嬴
+ 趙政
+ 秦始皇
+
+
+
+
+
+
+
+ rôle
+ contains a name component which indicates that the referent has a particular role or position in society, such as an official title or
+ rank.
+ 공식적 직함 또는 서열과 같이 사회에서 특별한 역할 또는 지위를 나타내는 이름 성분을 포함한다.
+ 包含一個身份名稱,代表個人在社會上所扮演的特殊角色或所處地位,例如官方頭銜或地位。
+ 参照されるものの,社会的な役割や地位,例えば,公式な役職名や地位など を示す,名前要素を示す
+ contient un composant du nom d'une personne, indiquant que celle-ci a un rôle ou une position
+ particulière dans la société, comme un titre ou un rang officiel.
+ contiene un componente del nombre que indica un rol o una posición específica a nivel social, como en el
+ caso de títulos oficiales o de grado militar.
+ contiene una componente del nome che indica un ruolo o una posizione specifici a livello sociale, come
+ nel caso di titoli ufficiali o grado militare
+
+
+
+
+
+
+
+
+
+
+
+
+ William
+ Poulteny
+ Earl of Bath
+
+
+
+
+
+ JoachimMurat, roi de Naples
+
+
+
+
+
+ 溥儀
+ 愛新覺羅
+ 滿清末代皇帝
+
+
+
+
+
A roleName may be distinguished from an addName by virtue of the fact that, like a title, it typically exists
+ independently of its holder.
+
+
+
Un élément roleName peut être distingué d'un élément addName du fait que, à l'instar d'un titre, il existe en général
+ indépendamment de la personne qui le porte.
Relative Place Names
+ nom de lieu
+
+ contains an absolute or relative place name.
+ 절대적 또는 상대적 위치명을 포함한다.
+ 包含一個確切位置或相對位置的名稱。
+ 絶対的,相対的場所名を示す.
+ contient un nom de lieu absolu ou relatif.
+ contiene la indicación absoluta o relativa de un nombre de lugar.
+ contiene l'indicazione assoluta o relativa di un nome di luogo
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Rochester
+ New York
+
+
+
+
+
+
+ Bordeaux
+ Gironde
+
+
+
+
+
+
+ Le Massif Armoricain
+ Bretagne
+
+
+
+
+
+
+ 2,5 milles
+ à l'ouest de la
+ Pointe du Raz
+
+
+
+
+
+
+ 曼徹斯特
+ 紐約
+
+
+
+
+
+
+ 天池
+ 新疆
+
+
+
+
+
+
+ 烏魯木齊
+ 北邊
+ 十哩
+
+
+
+
+
+
+ Arrochar Alps
+ Argylshire
+
+
+
+
+
+
+ 10 miles
+ Northeast of
+ Attica
+
+
+
+
+
+
+
+ bloc
+ contains the name of a geo-political unit consisting of two or more nation states or
+ countries.
+ 둘 이상의 민족국가 또는 국가로 구성된 지리-정치적 단위의 이름을 포함한다.
+ 包含一個地理政治區域名稱,由一個或多個國家所組成。
+ 複数の国や地域を跨ぐ地政学的な名前を示す.
+ contient le nom d'une unité géo-politique composée d'au
+ moins deux états ou pays
+ contiene el nombre de una unidad geopolítica que
+ comprende uno o más estados nacionales o países.
+ contiene il nome di un'unità geopolitica comprendente uno
+ o più stati nazione o paesi
+
+
+
+
+
+
+
+
+
+
+
+
+ the European Union
+ Africa
+
+
+
+
+ Pays Baltes
+ Europe
+
+
+
+
+ 歐盟
+ 非洲
+
+
+
+
+
+
+ pays
+ contains the name of a geo-political unit, such as a nation, country, colony, or
+ commonwealth, larger than or administratively superior to a region and smaller than a bloc.
+ 하나의 블록보다 큰 국가, 지역, 식민지, 또는 공화국, 또는 하나의 블록보다 작은 지역의 상급
+ 행정기관과 같은, 지리-정치 단위명을 포함한다.
+ 包含一個地理政治區域名稱,例如民族、國家、殖民地、或聯邦區域,範圍大於一般地區或行政地位較高,但小於國家聯盟性的地理政治區。
+ contiene el nombre de una unidad geopolítica, como una
+ nación, país, colonia, etc. más grande o administrativamente superior que una región y más
+ pequeño que un bloque.
+ 1つの国家に相当する地政学的な単位名を示す.国家,植民地,共同体・連
+ 邦を含む.これは,行政単位上の地域よりも大きい単位で,連合より小さな 単位である.
+ contient le nom d'une unité géo-politique, comme une
+ nation, un pays, une colonie ou une communauté, plus grande ou administrativement supérieure à
+ une région et plus petite qu'un bloc.
+ contiene il nome di un'unità geopolitica, come una
+ nazione, un paese, una colonia, o un'unione di stati, che sia più ampia o amministrativamente
+ superiore rispetto a una regione ma di dimensioni inferiori rispetto a un blocco
+
+
+
+
+
+
+
+
+
+
+
+
+ Denmark
+
+
+
+
+ Danemark
+
+
+
+
+ 丹麥
+
+
+
+
The recommended source for codes to represent coded country names is ISO 3166.
+
+
+
La source recommandée des codes pour représenter les noms de pays est ISO 3166.
+
+
+
当該国家相当地域を示すコードは,ISO3166にあるコードを使うことが推 奨される.
+
+
+
+
+
+ région
+ contains the name of an administrative unit such as a state, province, or county, larger
+ than a settlement, but smaller than a country.
+ 도보다는 작고 정착지보다는 큰 주, 성, 도와 같은 행정단위명을 포함한다.
+ 包含行政單位的名稱,例如州、省、或郡,範圍大於主政區,但小於國家。
+ 行政上の単位の名前を示す.例えば,地方,郡,居住地など.居住地よりも 広く,国家より狭い地域.
+ contient le nom d'une unité administrative comme un état,
+ une province ou un comté, plus grande qu'un lieu de peuplement, mais plus petite qu'un pays.
+ >contiene el nombre de una unidad administrativa,
+ como un estado, una región o una província, que sea mayor que un pequeño asentamiento, pero
+ menor a un país.
+ contiene il nome di un'unità amministrativa, come uno
+ stato o una provincia, che sia più ampia di un piccolo insediamento ma più piccola di un paese
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Illinois
+
+
+
+
+
+
+ Illinois
+
+
+
+
+
+
+ 依利諾
+
+
+
+
+
+
+
+ district
+ contains the name of any kind of subdivision of a settlement, such as a parish, ward, or other administrative or geographic unit.
+ 교구, 구 또는 다른 행정 지리적 단위와 같이 거주지의 하위 구분명을 포함한다.
+ 包含任何次行政區名稱,例如教區、選區、或其他行政或地理單元。
+ 場所を示す要素として,集落より小さい名前を示す.例えば,小教区や区な ど,行政上・地勢上の単位.
+ contient le nom d'une subdivision quelconque d'une ville, comme une paroisse, une circonscription
+ électorale ou toute autre unité administrative ou géographique.
+ contiene el nombre de cualquier subdivisión al interno de un asentamiento, como una circunscripción, un
+ barrio u otras unidades administrativas o geográficas.
+ contiene il nome di una qualsiasi suddivisione all'interno di un insediamento, come una circoscrizione,
+ un quartiere o altre unità amministrative o geografiche
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Jericho
+ Oxford
+
+
+
+
+
+
+ La Castellane
+ Marseille
+
+
+
+
+
+
+ Rive gauche
+ Paris
+
+
+
+
+
+
+ 中環
+ 香港
+
+
+
+
+
+
+ 南邊
+ 廣州
+
+
+
+
+
+
+ South Side
+ Chicago
+
+
+
+
+
+
+
+ lieu de peuplement
+ contains the name of a settlement such as a city, town, or village identified as a single geo-political or administrative unit.
+ 하나의 지리-정치 또는 행정 단위로 식별되는 시, 읍, 마을과 같이 거주지명을 포함한다.
+ 包含主行政區的名稱,例如城市、鄉鎮、村莊等單一地理政治或行政單位。
+ 地政学上または行政上の単位としてある市,街,村などの居住地の名前を示 す.
+ contient le nom d'un lieu de peuplement comme une cité, une ville ou un village, identifié comme une
+ unité géo-politique ou administrative unique.
+ contiene el nombre de un asentamiento, del tipo ciudad, pueblo, villa etc. identificado como una unidad
+ geopolítica o administrativa.
+ contiene il nome di un insediamento quale una città o un comune considerati come unità geopolitica o
+ amministrativa
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Glasgow
+ Scotland
+
+
+
+
+
+
+ Brest
+ Bretagne
+
+
+
+
+
+
+ 淡水
+ 台北縣
+
+
+
+
+
+
+
+ distance relative
+ marks that part of a relative temporal or spatial expression which indicates the direction of the offset between the two place names, dates, or
+ times involved in the expression.
+ 표현에 포함된 두 장소명, 날짜, 또는 시간 사이의 차이 방향을 표시하는 상대적 시간 또는 공간 표현의 부분
+ 在時間或空間差距的表示中,該部分指出兩個地名、日期、或時間之間差距的方向性。
+ 当該表現に含まれている2つの場所名,日付,時間のオフセットの方向を示 す,相対的な時空表現の部分を示す.
+ la partie d'une expression temporelle ou spatiale qui indique la distance et/ou la direction entre les
+ deux lieux, dates ou heures sur lesquels porte l'expression.
+ la parte de una expresión temporal o espacial relativa que indica la dirección del desfase entre dos
+ nombres de lugar, fecha u horario al interno de la expresión.
+ la parte di un'espressione temporale o spaziale relativa che indica la direzione dello sfasamento tra due
+ nomi di luogo, date o orari all'interno dell'espressione
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 50 metres below the summit of
+
+ Mount
+ Sinai
+
+
+
+
+
+
+
+
+ geographical name
+ 지리명
+ 地理名稱
+ nom de lieu géographique
+ nombre geográfico
+ nome proprio geografico
+ identifies a name associated with some geographical feature such as Windrush Valley or Mount Sinai.
+ 윈드러시 계곡 또는 시나이 산과 같이 지리적 특성과 관련된 이름
+ 與地形名稱結合的地名,例如威拉索溪谷、西奈山等。
+ ウィンドラッシュ峡谷,シナイ山などの地理的特性に関する名前.
+ un nom associé à une caractéristique géographique comme Windrush Valley ou le Mont Sinaï.
+ un nombre asociado a un un elemento geográfico, como valle Windrush o Monte Sinaí.
+ nome associato a un elemento geografico, come valle Windrush o Monte Sinai
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Mount
+ Sinai
+
+
+
+
+
+ Dunedu Pilat
+
+
+
+
+
+ 山峰
+ 廬山
+
+
+
+
+
+
+
+ geographical feature name
+ 지리적 특성명
+ nom de caractéristique géographique
+ nombre de un elemento geográfico.
+ nome di elemento geografico
+ contains a common noun identifying some geographical feature contained within a geographic
+ name, such as valley, mount, etc.
+ 계곡 산 등과 같이 지리적명에 포함된 지리적 특성을 식별하는 일반명사를 포함한다.
+ 地理上の名前,例えば,谷,山などに含まれている地物を特定する名前を示 す.
+ contient un nom commun identifiant une caractéristique
+ géographique contenue dans un nom de lieu, comme vallée, mont, etc.
+ contiene un nombre común que identifica elementos
+ geográficos incluidos en un nombre propio geográfico, como valle, monte, etc.
+ contiene un nome comune che identifica elementi
+ geografici inclusi in un nome proprio geografico, come valle, monte, ecc.
+
+
+
+
+
+
+
+
+
+
+
+
+
+ The vale of White Horse
+
+
+
+
+ le delta du Rhône
+
+
+
+
+ 玉山山腳
+
+
+
+
+
+
+
Biographical and Prosopographical Data
Basic Principles
The Person Element
Personal Characteristics
Personal Events
Personal Relationships
Organizational Data
Places
Varieties of Location
Multiple Places
States, Traits, and Events
Relations Between Places
+ affiliation
+ contains an informal description of a person's present or past affiliation with some
+ organization, for example an employer or sponsor.
+ 고용주 또는 후원자와 같이 개인의 현재 또는 과거 소속 조직에 대한 비공식적 기술을 포함한다.
+ 包含非正式性的描述,關於個人現在或過去隸屬的團體,例如雇主或贊助者。
+ 人物が所属している,またはしていた団体に関する情報を示す.例えば,雇 い主や出資者など.
+ contient une description non formalisée portant sur
+ l'affiliation présente ou passée d'une personne à une organisation, par exemple un employeur
+ ou un sponsor.
+ contiene una descripción informal de la afiliación
+ presente o pasada de una persona a una determinada organización, p.ej. un empleado o un
+ patrocinador.
+ contiene una descrizione informale dell'appartenenza
+ presente o passata di una persona a una determinata organizzazione, per esempio un'azienda o
+ un ente finanziatore
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Junior project officer for the US National Endowment for
+ the Humanities
+
+ Paid up member of the
+ Australian Journalists Association
+
+
+
+
+
+ associé étranger de l'Académie des Inscriptions et
+ Belles-Lettres
+
+ Chargé de cours, puis professeur
+ d’archéologie (1949-1981) et doyen (1958-1961) à la Faculté des lettres
+ d’Ankara.
+
+
+
+
+ 國際獅子會台灣區理監事
+
+ 澳洲記者協會的付費會員
+
+
+
+
If included, the name of an organization may be tagged using either the name
+ element as above, or the more specific orgName element.
+
+
+
S'il est présent, le nom d'une organisation peut être balisé en utilisant soit l'élément
+ name comme ci-dessus, soit l'élément plus spécifique
+ orgName.
+
+
+
組織名は,要素nameまたは,より特化した要素 orgNameでマークアップした方がよい.
+
+
+
+
+
+ âge
+ specifies the age of a person.
+ 개인의 나이를 명시한다.
+ 標明個人的年齡。
+ 人物の年齢を示す.
+ précise l'âge d'une personne
+ especifica la edad de una persona.
+ indica l'età della persona
+
+
+
+
+
+
+
+
+
+
+
+ supplies a numeric code representing the age or age group
+ 나이 또는 연령대를 표시하는 수치 부호를 제시한다.
+ 提供一個代表該年齡或年齡層的數字代碼
+ 年齢または年齢層を数値で示す.
+ fournit un code numérique représentant l'âge ou la
+ tranche d'âge.
+ proporciona un código numérico que representa la edad
+ o el intervalo de edad.
+ assegna un codice numerco che rappresenta l'età o la
+ fascia di età
+
+
+
This attribute may be used to complement a more detailed discussion of a person's age in
+ the content of the element
+
+
+
Cet attribut peut être utilisé pour compléter les détails sur l'âge d'une personne donnés
+ dans l'élément.
+
+
+
当該属性は,要素中の内容に既にある,年齢に関する記述をより詳細 に示すために使ってもよい.
+
+
+
+
+
+ under 20 in the early eighties
+
+
+
+
+ ayant une vingtaine d'années au début des années 70
+
+
+
+
+ 在八○年代早期不到二十歲
+
+
+
+
As with other culturally-constructed traits such as
+ sex, the way in which this concept is described in different
+ cultural contexts may vary. The normalizing attributes are
+ provided as a means of simplifying that variety to Western
+ European norms and should not be used where that is
+ inappropriate. The content of the element may be used to describe
+ the intended concept in more detail, using plain text.
+
+
+
+
+
+ naissance
+ contains information about a person's birth, such as its date and place.
+ 날짜, 장소와 같이 개인의 출생에 관한 정보를 포함한다.
+ 包含個人的出生資訊,例如日期及地點等。
+ 人物の出生に関する情報を示す.例えば,日時や場所など.
+ contient des informations sur la naissance d'une
+ personne, comme la date et le lieu
+ contiene información relativa al nacimiento de una
+ persona, p.ej. fecha y lugar de nacimiento.
+ contiene informazioni relative al luogo e alla data di
+ nascita di una persona
+
+
+
+
+
+
+
+
+
+
+
+
+ Before 1920, Midlands region.
+
+
+
+
+ Années 20, dans les Pouilles.
+
+
+
+
+ Elle est née le 16 janvier 1901 à Louvres, alors commune de Seine-et-Oise (aujourd'hui
+ dans le Val-d'Oise), au nord-ouest de l'actuel aéroport de Roissy.
+
+
+
+
+ 早於1920的上海租界
+
+
+
+
+ 1960年12月10日早晨,在一個靠近龍山寺的小平房裡
+
+
+
+
+ In a small cottage near Aix-la-Chapelle,
+ early in the morning of 10 Dec 1960
+
+
+
+
+
+
+
+ climat
+ contains information about the physical climate of a place.
+ 장소의 기후에 관한 정보를 포함한다.
+ contiene información sobre el clima físico de un lugar.
+ ある場所の天候に関する情報を示す.
+ contient des informations sur le climat physique d'un
+ lieu.
+ contiene informazioni relative al clima fisico di un
+ luogo
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Rome
+
+
+
+
+ 24-hr Average Temperature
+
+
+ Jan
+ Jun
+ Dec
+
+
+ °C
+ 7.1
+ 21.7
+ 8.3
+
+
+ °F
+ 44.8
+ 71.1
+ 46.9
+
+
+
+ Taken from GHCN 2 Beta: The Global Historical Climatology Network,
+ version 2 beta, 1904 months between 1811 and 1980.
+
+
+
+
+
+
+
+
+
+ décès
+ contains information about a person's death, such as its date and place.
+ 날짜, 장소와 같이 개인의 죽음과 관련된 정보를 포함한다.
+ 包含個人的死亡資訊,例如日期及地點等。
+ 人物の死亡に関する情報を示す.例えば,日付や場所など.
+ contient des informations sur le décès d'une personne, comme la date et le lieu.
+ contiene informaciones relativas a la defunción de una persona, del tipo lugar y fecha.
+ contiene informazioni relative al luogo e alla data di morte di una persona
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Ma mère est morte le 7 avril.
+
+
+
+
+ 在北大教堂附近死於腦性麻痺
+
+
+
+
+ Passed away near Aix-la-Chapelle, after suffering from cerebral palsy.
+
+
+
+
+
+
+ éducation
+ contains a description of the educational experience of a person.
+ 개인의 학력에 대한 기술을 포함한다.
+ 包含個人教育經歷的描述。
+ 人物の学歴を示す.
+ contient la description du parcours scolaire d'une personne.
+ contiene una descripción sobre la experiencia formativa de una persona
+ contiene una descrizione relativa all'istruzione di una persona
+
+
+
+
+
+
+
+
+
+
+
+
+ Left school at age 16
+
+
+
+
+ Attended Cherwell School
+
+
+
+
+ Anthony Hammond
+ smuggled her into the University of Cambridge, where she was
+ disguised as his male cousin, Jack. She remained there for some
+ months learning grammar, logic, rhetoric, and ethics
+
+
+
+
+ quitte l'école à 16 ans
+ intègre la Cherwell School
+
+
+
+
+
+ 16歲離開學校
+ 就讀清華大學
+
+
+
+
+
+
+ évènement
+ contains data relating to any kind of significant event associated with a person, place, or organization.
+ 개인, 장소, 또는 조직과 관련된 중요한 사건에 해당하는 데이터를 포함한다.
+ 任何未必是口說的或溝通上的現象或發生情況,例如偶然的噪音或其他影響溝通的事件。
+ 人生における特定の重要事象の解説を示す.
+ contient des données liées à tout type d'évènement significatif dans l'existence d'une personne, d'un
+ lieu ou d'une organisation.
+ cualquier fenómeno o evento no necesariamente vocal o comunicativo, como ruidos accidentales u otros
+ fenómenos que inciden en la comunicación en acto.
+ qualsiasi fenomeno o evento non necessariamente vocale o comunicativo, come rumori accidentali o altri
+ fenomeni che incidano sulla comunicazione in atto
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ indicates the location of an event by pointing to a place element
+ place 요소를 지시함으로써 사건의 위치를 나타낸다.
+ indica la localización de un acontecimiento señalando un elemento lugar
+
+ indique la localisation d'un évènement en pointant vers un élément place
+
+ indica la posizione di un evento facendo riferimento a un elemento place
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ religion
+ specifies the faith, religion, or belief set of a person.
+ 개인의 신념, 종교 또는 믿음을 명시한다.
+ 標明個人的宗教信仰或其他信念。
+ 人物の信仰・宗教を示す.
+ précise la foi, la religion ou les croyances d'une personne.
+ indica la fe, religión, o creencias de una persona.
+ indica fede, religione, o credo di una persona
+
+
+
+
+
+
+
+
+
+
+
+
+ protestant
+
+
+
+
+ Manichaeism
+
+
+
+
+ protestant
+
+
+
+
+ 清教徒
+
+
+
+
+
+
+ période d'activité
+ contains information about a person's period of activity.
+ 개인의 활동 기간에 대한 정보를 포함한다.
+ 包含個人活動時期的相關資訊。
+ 人物が活躍した時期に関する情報を示す.
+ contient des informations sur la période d'activité d'une personne.
+ contiene información relativa al periodo de actividad de una persona.
+ contiene informazioni relative al periodod di attività di una persona
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ François Villon
+
+
+
+
+
+
+
+
+ geographical coordinates
+ 지리적 좌표
+ coordenadas geográficas
+ coordonnées géographiques
+ coordinate geografiche
+ contains any expression of a set of geographic coordinates, representing a point, line, or area on the surface of the earth in some
+ notation.
+ 특정 표기법으로 지표상 지점, 선, 영역을 표시하는 지리적 좌표의 집합 표현을 포함한다.
+ contiene cualquier expresión de un conjunto de coordenadas geográficas, representando un punto, línea o
+ área en la superficie de la tierra en alguna anotación.
+ 地球上の一点,線,領域を表すための,地理上の座標を示す.
+ contient toute expression, dans un système de notation, d'un ensemble de coordonnées géographiques
+ représentant un point, une ligne ou une zone sur la surface de la Terre.
+ contiene una qualsiasi espressione di una serie di coordinate geografiche che rappresenti un punto, una
+ linea o un'area sulla superficie della terra in una data notazione
+
+
+
+
+
+
+
+
+
+
+
+ World Geodetic System
+ Ordnance Survey
+
+
+ A tombstone plus six lines of
+ Anglo-Saxon text, built into the west tower (on the south side
+ of the archway, at 8 ft. above the ground) of the
+ Church of St. Mary-le-Wigford in Lincoln.
+ 53.226658 -0.541254
+ SK 97481 70947
+
+
+
+
+
+ 41.687142 -74.870109
+
+
+
+
+ W 8°37'--W 6°00'/N 34°00'--N 31°57'
+
+
+
+
Uses of geo can be associated with a coordinate
+ system, defined by a geoDecl element supplied in the TEI
+ header, using the decls attribute. If no such link is
+ made, the assumption is that the content of each geo
+ element will be a pair of numbers separated by whitespace, to be
+ interpreted as latitude followed by longitude according to the
+ World Geodetic System.
+
+
+
+
+
+ language knowledge
+ 언어 지식
+ conocimiento del lenguaje
+ connaissances linguistiques
+ conoscenza della lingua
+ summarizes the state of a person's linguistic knowledge, either as prose or by a list of langKnown elements.
+ 산문체 또는 langKnown 요소 목록으로 개인의 언어 지식 상태를 요약한다.
+ 包含個人的語言認知狀態,可用敘述的方式或元素langKnown的條列形式來表達。
+ 個人の言語学的知識を散文または要素langKnownのリストでまとめ る.
+ synthétise l'état des connaissances linguistiques d'une personne, soit en texte libre soit par une liste
+ d'éléments langKnown.
+ resume los conocimientos lingüísticos de una persona de forma descriptiva o a través de una lista de
+ elementos langKnown
+
+ riassume la conoscenza linguistica di una persona in forma descrittiva o tramite una lista di elementi
+ langKnown
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ supplies one or more valid language tags for the languages specified
+ 명시된 언어의 하나 이상의 유효한 언어 태그를 제시한다.
+ 提供一個或多個有效的所指語言標籤
+ ひとつ以上の言語を示す.
+ fournit un ou plusieurs codes de langue valides pour les langues spécifiées.
+ asigna uno o más marcadores válidos a las lenguas indicadas.
+ assegna uno o più marcatori validi alle lingue indicate
+
+
+
This attribute should be supplied only if the element contains no langKnown children. Its values are language
+ tags as defined in RFC 4646 or its
+ successor
+
+
+
Cet attribut ne doit être utilisé que si l'élément ne contient pas d'enfants langKnown. Ses valeurs sont des
+ codes de langues tels qu'ils sont définis par RFC
+ 4646 ou ses successeurs.
+
+
+
+
+
+
+ 英式英文
+ 法文
+
+
+
+
+
+
+ British English
+ French
+
+
+
+
+
+
+
+ language known
+ 언어 능력
+ 語言能力
+ compétence linguistique
+ competencia lingüística
+ competenza linguistica
+ summarizes the state of a person's linguistic competence, i.e., knowledge of a single language.
+ 개인의 언어 능력 상태를 요약한다. 즉, 한 언어에 대한 지식
+ 個人對於某單一語言的認知狀態。
+ 個人の言語能力を示す.すなわち,単一言語の知識を示す.
+ synthétise l'état des connaissances d'une personne relativement à une langue particulière.
+ resume la competencia de una persona en la lengua indicada.
+ riassume la competenza di una persona in una determinata lingua
+
+
+
+
+
+
+
+
+
+
+ supplies a valid language tag for the language concerned.
+ 관련 언어에 대한 유효한 언어 태그를 제공한다.
+ 用有效的語言標籤來表示所指語言。
+ 当該言語を,言語コードで示す.
+ fournit un code de langue valide pour la langue concernée.
+ asigna un marcador válido a las lengua referida.
+ assegna un marcatore valido alla lingua in questione
+
+
+
The value for this attribute should be a language tag as defined in BCP 47.
+
+
+
La valeur de cet attribut doit être un code tel que défini par BCP 47.
+
+
+
当該属性値は, BCP 47 で定義されている言語タグであるべきである.
+
+
+
+ a code indicating the person's level of knowledge for this language
+ 이 언어에 대한 개인의 지식 수준을 표시하는 부호
+ 用代號來表示個人對該語言的認知程度。
+ 個人レベルの知識を示す言語コード.
+ un code indiquant le niveau de connaissance qu'une personne a de cette langue.
+ código indicativo del nivel de competencia de una persona en una lengua.
+ codice che indica il livello di competenza della persona in una determinata lingua
+
+
+
+
+
+ British English
+ French
+
+
+
+
+ Anglais britannique
+ Français
+
+
+
+
+ 英式英文
+ 法文
+
+
+
+
+
+
+ list of organizations
+ 조직 목록
+ lista de organizaciones
+ liste d'organisations
+ elenco delle organizzazioni
+ contains a list of elements, each of which provides information about an identifiable
+ organization.
+ 식별 가능한 조직에 관한 정보를 제공하며, 각각에 대한 기술 목록을 포함한다.
+ contiene una lista de descripciones, que proporciona a
+ la información sobre una organización identificable.
+ 特定可能な団体に関する情報を示す解説のリストを示す.
+ contient une liste d'éléments, chacun d'eux fournissant
+ des informations sur une organisation identifiable.
+ contiene una lista di descrizioni, ognuna delle quali
+ fornisce informazioni relative a una determinata organizzazione
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Libyans
+
+ Adyrmachidae
+ These people have, in most points, the same customs as the Egyptians, but
+ use the costume of the Libyans. Their women wear on each leg a ring made of
+ bronze [...]
+
+
+ Nasamonians
+ In summer they leave their flocks and herds upon the sea-shore, and go up
+ the country to a place called Augila, where they gather the dates from the
+ palms [...]
+
+
+ Garamantians
+ [...] avoid all society or intercourse with their fellow-men, have no
+ weapon of war, and do not know how to defend themselves. [...]
+
+
+
+
+
+
+
+
The type attribute may be used to distinguish lists of organizations of a
+ particular type if convenient.
+
+
+
L'attribut type peut être utilisé pour établir des listes par type
+ d'organisation si cela présente un intérêt.
+
+
+
属性typeは,特別な種類の組織を区別するために使われるかもしれない.
+
+
+
+
+
+ list of events
+ liste d'événements
+ contains a list of descriptions, each of which provides information
+ about an identifiable event.
+ contient une liste de descriptions, chacune d'entre elles fournissant des informations sur un événement connu.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Battles of the American Civil War: Kentucky
+
+
+ The Battle of Barbourville was one of the early engagements of
+the American Civil War. It occurred September 19, 1861, in Knox
+County, Kentucky during the campaign known as the Kentucky Confederate
+Offensive. The battle is considered the first Confederate victory in
+the commonwealth, and threw a scare into Federal commanders, who
+rushed troops to central Kentucky in an effort to repel the invasion,
+which was finally thwarted at the Battle of
+Camp Wildcat in October.
+
+
+
+
+The Battle of Camp Wildcat (also known as Wildcat Mountain and Camp
+Wild Cat) was one of the early engagements of the American Civil
+War. It occurred October 21, 1861, in northern Laurel County, Kentucky
+during the campaign known as the Kentucky Confederate Offensive. The
+battle is considered one of the very first Union victories, and marked
+the first engagement of troops in the commonwealth of Kentucky.
+
+
+
+ The Battle of Cynthiana (or Kellar’s Bridge) was an engagement
+during the American Civil War that was fought on June 11 and 12, 1864,
+in Harrison County, Kentucky, near the town of Cynthiana. A part of
+Confederate Brigadier General John Hunt Morgan's 1864 Raid into
+Kentucky, the battle resulted in a victory by Union forces over the
+raiders and saved the town from capture.
+
+
+
+
+
+
+
+
+
+ list of persons
+ 개인 목록
+ lista de personas
+ liste de personnes
+ elenco delle persone
+
+ contains a list of descriptions, each of which provides information about an identifiable
+ person or a group of people, for example the participants in a language interaction, or the
+ people referred to in a historical source.
+ 기술 목록을 포함하며, 그 개별 기술 각각은, 언어 상호작용 참여자 또는 역사적 원전에서 언급되는
+ 사람과 같이, 식별 가능한 사람 또는 사람군에 관한 정보를 제공한다.
+ 人物描述清單,其中每個項目包含一個已知人物的相關資料,例如語言互動中的參與者、或是歷史來源中提及的人物。
+ 特定可能な個人やグループに関する情報のリストを示す.例えば,言語交流
+ の参加者や,歴史資料中で参照される人物など.
+ contient une liste d'éléments, chacun d'entre eux
+ apportant des informations sur une personne précise ou sur un groupe de personnes, par exemple
+ les participants à une interaction linguistique, ou les personnes citées dans une source
+ historique.
+ contiene una lista de descripciones, y cada una de las
+ cuales proporciona información relativa a una persona específica o a un grupo de personas, p.ej,
+ los participantes de una interacción verbal o las personas referidas en una fuente histórica.
+ contiene una lista di descrizioni, ciascuna delle quali
+ fornisce informazioni relative a una persona specifica o a un gruppo di persone, per esempio i
+ partecipanti a un'interazione verbale o le persone identificate da una fonte storica
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
The type attribute may be used to distinguish lists of people of a particular
+ type if convenient.
+
+
+
L'attribut type peut être utilisé pour établir des listes par type de
+ personne si cela présente un intérêt.
+
+
+
属性typeは,特別な種類の人物を区別するために使われるかもしれない.
+
+
+
+
+
+
+
+
+ list of places
+ 장소 목록
+ lista de lugares
+ liste de lieux
+ elenco dei luoghi
+ contains a list of places, optionally followed by a list of relationships (other than
+ containment) defined amongst them.
+ 장소 목록을 포함하며, 그 뒤에 수의적으로 그들 사이에 정의된 (포함 외의) 관련성 목록을
+ 제시한다.
+ contiene una lista de lugares, seguida opcionalmente
+ por una lista de interelaciones (a excepción de la inclusión) definidas entre ellos.
+ 場所のリストを示す.選択的に,場所間の(包含関係ではなく)関連性を 示すリストが続く.
+ contient une liste de lieux, qui peut être suivie d'une
+ liste de relations définies entre les lieux (autres que la relation d'inclusion).
+ contiene una lista di luoghi, eventualmente seguita da
+ una lista di relazioni tra questi (ad eccezione di quella contenete-contenuto)
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ La roche qui pleure
+
+
+ Ile aux cerfs
+
+
+
+
+
+
+
+
+
+ localisation
+ defines the location of a place as a set of geographical coordinates, in terms of other named geo-political entities, or as an
+ address.
+ 다른 이름의 지리-정치적 개체를 통하여 지리적 좌표의 집합으로, 또는 주소로 장소의 위치를 정의한다.
+ define la localización de un lugar como conjunto de coordenadas geográficas, en términos de alguna
+ entidades geopolítica dada, o como dirección.
+ 地理上の座標集合,地政学上の名前付き実体,アドレスなどにより場所を定 義する.
+ définit l'emplacement d'un lieu par des coordonnées géographiques, en termes d'entités nommées dites
+ géopolitiques, ou par une adresse.
+ definisce la posizione di un luogo tramite una serie di coordinate geografiche, in termini di entità
+ geopolitiche definite da altri o sotto forma di indirizzo
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Abbey Dore
+
+ 51.969604 -2.893146
+
+
+
+
+
+
+
+ Brasserie Georges
+
+
+ Lyon
+ IIème
+ Perrache
+ 30, Cours de Verdun
+
+
+
+
+
+
+
+ Atlantis
+
+ beyond
+ The Pillars of Hercules
+
+
+
+
+
+
+
+
+
+ nationalité
+ contains an informal description of a person's present or past nationality or citizenship.
+ contient une description non formalisée de la nationalité ou citoyenneté présente ou passée d'une
+ personne.
+ 개인의 현재 또는 과거의 국적 또는 시민권에 대한 비공식적 기술을 포함한다.
+ 包含一非正式的敘述,表示個人現在或過去擁有的國籍或公民身分。
+ 人物の国籍や市民権の形式的でない解説を示す.
+ contiene una descripción informal de la nacionalidad o ciudadanía presente o pasada de una
+ persona.
+ contiene una descrizione informale della nazionalità o cittadinanza presente o passata di una
+ persona
+
+
+
+
+
+
+
+
+
+
+
+
+ Obtained US Citizenship in 1966
+
+
+
+
+ Citoyenneté américaine obtenue en 1966
+
+
+
+
+ 1966年得到美國公民身份
+
+
+
+
+
+
+ activité
+ contains an informal description of a person's trade, profession or occupation.
+ 개인의 직업에 대한 비공식적 기술을 포함한다.
+ 包含非正式的敘述,表示個人所從事的行業或所屬的專業。
+ 人物の仕事や職業の,形式的でない説明を示す.
+ contient une description non formalisée de l'activité, de la profession ou de l'occupation d'une
+ personne.
+ contiene una descripción informal de las actividades, la profesión o la ocupación de una persona.
+ contiene una descrizione informale dell'attività, professione o occupazione di una persona
+
+
+
+
+
+
+
+
+
+
+
+
+ indicates the
+ classification system or taxonomy in use, for example by
+ supplying the identifier of a taxonomy element, or
+ pointing to some other resource.
+ 헤더에 taxonomy 요소의 확인소를 제공하여 분류 체계 또는 분류법을 식별한다.
+ 提供標頭中元素taxonomy的識別符號,來標明所使用的分類系統或分類法。
+ ヘダー内にある要素taxonomyの識別子により,使われている 分類システムを示す.
+ identifie le système de classification ou la taxinomie utilisés, en fournissant l'identifiant
+ d'un élément taxonomy déclaré ailleurs dans l'en-tête.
+ identifica el sistema de clasificación o la taxonomía utilizada para la identificación de un
+ elemento taxonomy colocado en el encabezado.
+ identifica il sistema di classificazione o la tassonomia utilizzate tramite l'identificatore di
+ un elemento taxonomy collocato nell'intestazione
+
+
+
+ identifies an occupation code defined within the classification system or taxonomy defined by the scheme
+ attribute.
+ scheme 속성에 의해 정의된 분류 체계 또는 분류법 내에서 정의된 직업 부호를 식별한다.
+ 標明分類系統或分類法中所定義的職業代碼,該分類系統或分類法由屬性scheme所定義。
+ 属性schemeで定義されている分類システムの中で定義され る仕事コードを示す.
+ contient un code d'activité défini dans le système de classification ou dans la taxonomie déclaré
+ dans l'attribut scheme.
+ identifica un código relativo a la ocupación definido en el sistema de clasificación o taxonomía
+ establecido por el atributo scheme.
+ corrisponde a un codice relativo all'occupazione definito nel sistema di classificazione o
+ tassonomia stabiliti dall'attributo scheme
+
+
+
+
+
+
+ accountant
+
+
+
+
+ Comptable
+
+
+
+
+ Comptable
+
+
+
+
+ Comptable spécialisé dans l'industrie
+ pétrolière
+
+
+
+
+ 會計師
+
+
+
+
+ 擅長油業的會計師
+
+
+
+
+ accountant
+
+
+
+
The content of this element may be used as an alternative to the more formal specification made possible by its attributes; it may also be
+ used to supplement the formal specification with commentary or clarification.
+
+
+
Le contenu de cet élément peut être utilisé à la place d'une caractérisation plus formelle que ses attributs permettent ; il peut aussi
+ être utilisé pour compléter cette caractérisation formelle par un commentaire ou une explication.
+
+
+
+
+
+ organization
+ 조직
+ organización
+ organisation
+ organizzazione
+ provides information about an identifiable organization such as a business, a tribe, or
+ any other grouping of people.
+ 업무, 종족, 또는 사람들의 다른 종류의 그룹과 같은 식별 가능한 조직에 대한 정보를 제공한다.
+ proporciona a la información sobre una organización
+ identificable tal como un negocio, una tribu, o cualquier otro grupo de personas.
+ 特定可能な団体の情報を示す.例えば,会社,集団など,人の集まり.
+ fournit des informations sur une organisation
+ identifiable, telle qu'une entreprise, une tribu ou tout autre groupement de personnes.
+ fornisce informazioni relative a un'organizzazione
+ identificate come società, tribù, o qualsiasi altro raggruppamento di persone
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ specifies a primary role or classification for the organization.
+ 조직에 대한 주요 역할 또는 분류를 명시한다.
+ 当該組織の,第一位の役割または分類を示す.
+ spécifie le rôle principal ou la catégorie
+ d'une organisation.
+ establece el rol o la clasificación primaria de
+ una persona.
+ stabilisce il ruolo o la classificazione
+ primaria di una persona
+
+
+
Values for this attribute may be locally defined by a
+ project, using arbitrary keywords such as artist,
+ employer, family group, or
+ political party, each of which should be associated with a
+ definition. Such local definitions will typically be provided by a
+ valList element in the project schema
+specification.
+
+
+
+
+
+
+ Justified Ancients of Mummu
+ An underground anarchist collective spearheaded by Hagbard
+ Celine, who fight the Illuminati from a golden submarine, the
+ Leif Ericson
+
+
+ Robert Shea
+ Robert Anton Wilson
+ The Illuminatus! Trilogy
+
+
+
+
+
+
+
+
+ donne des informations sur les relations qui existent
+ entre des personnes, des lieux, ou des organisations, soit de manière informelle en prose, soit
+ de manière formelle.
+ provides information about relationships identified amongst people, places, and
+ organizations, either informally as prose or as formally expressed relation links.
+ 비공식적으로 산문체 또는 공식적으로 표현된 관계 연결을 통하여 사람, 장소, 그리고 조직 사이에
+ 식별되는 관련성에 관한 정보를 제공한다.
+ 描述一項語言互動中參與者之間的關係或社交關聯。
+ 人,場所,組織間の関係に関する情報を,散文またはリンクによる形式的表 現で示す.
+ fornisce informazioni relative alle relazioni
+ identificate tra persone, luoghi e organizzazioni, a livello informale discorsivo o sotto forma
+ di legami formalmente espressi
+ describe las relaciones o los lazos sociales entre los
+ participantes de una interacción verbal.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
The persons with identifiers pp1 and p2 are the parents of pp3 and pp4; they are also married to
+ each other; pp1 is the employer of pp3, pp5, pp6, and pp7.
+
+
+
+
+
Tous les locuteurs sont membres de la famille Ceruli, et sont nés à Naples.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
所有說話者都是林家的人,生於台北板橋。
+
+
+
+
+
+
+
All speakers are members of the Ceruli family, born in Naples.
+
+
+
+
+
May contain a prose description organized as paragraphs, or a sequence of
+ relation elements.
+
+
+
Peut contenir soit une description en prose organisée en paragraphes, soit
+ une suite d'éléments relation.
+
+
+
段落または一連の要素relationによる散文を含むかもしれない.
+
+
+
+
+
+
+
+ personne
+ provides information about an identifiable individual, for example a participant in a language interaction, or a person referred to in a
+ historical source.
+ 예를 들어 언어 상호작용의 참여자 또는 역사적 문헌에서 언급된 사람과 같이 식별가능한 개인에 관한 정보를 제공한다.
+ 提供一個已知人物的相關資料,例如語言互動中的參與者、或是歷史來源中提及的人物。
+ 特定可能な個人の情報を示す.例えば,言語交流の参加者,歴史資料中で参 照される人物など.
+ fournit des informations sur un individu identifiable, par exemple un participant à une interaction
+ linguistique, ou une personne citée dans une source historique.
+ proporciona información relativa a un individuo específico, p.ej. un participante de una interacción
+ verbal o una persona identificada por una fuente histórica.
+ fornisce informazioni relative a un soggetto specifico, come i partecipanti a un'interazione verbale o le
+ persone identificate da una fonte storica
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ specifies a primary role or classification for the person.
+ 사람에 대한 주요 역할 또는 분류를 명시한다.
+ 說明該人物的主要角色或分類。
+ 当該人物の第一位の役割や分類を示す.
+ précise un rôle principal ou une classification principale pour cette personne.
+ establece el rol o la clasificación primaria de una persona.
+ stabilisce il ruolo o la classificazione primaria di una persona
+
+
+
Values for this attribute may be locally defined by a
+ project, using arbitrary keywords such as artist,
+ employer, author, relative, or
+ servant, each of which should be associated with a
+ definition. Such local definitions will typically be provided by a
+ valList element in the project schema
+specification.
+
+
+ specifies the sex of the person.
+ 사람의 성을 명시한다.
+ 指出該人物的性別。
+ 当該人物の性別を示す.
+ précise le sexe de la personne.
+ especifica el sexo de una persona.
+ indica il sesso di una persona
+
+
+
Values for this attribute may be locally defined by a project, or may refer to an external standard, such as
+ vCard's sex property
+ (in which M indicates male, F female, O other, N none or not applicable, U unknown),
+ or the often used ISO 5218:2004
Representation of Human Sexes
+ (in which 0
+ indicates unknown; 1 male; 2 female; and 9 not applicable,
+ although the ISO standard is widely considered inadequate);
+ cf. CETH's Recommendations for Inclusive Data Collection of Trans People
+ .
+
+
+
+ specifies an age group for the person.
+ 사람의 연령군을 명시한다.
+ 指出該人物所屬的年齡層。
+ 当該人物の年齢層を示す.
+ précise une tranche d'âge pour la personne.
+ especifica un intervalo de edad para una persona.
+ indica la fascia di età di una persona
+
+
+
Values for this attribute may be locally defined by a
+ project, using arbitrary keywords such as infant,
+ child, teen, adult, or
+ senior, each of which should be associated with a
+ definition. Such local definitions will typically be provided by a
+ valList element in the project schema
+specification.
+
+
+
+
+
+
Female respondent, well-educated, born in Shropshire UK, 12 Jan 1950, of unknown occupation. Speaks French fluently. Socio-Economic
+ status B2.
Personne interrogée, de sexe féminin, instruite, née à Shropshire, au ROYAUME-UNI le 12
+ Janvier 1950, d'occupation inconnue. Parle le français couramment. Statut
+ socio-économique B2.
+
+
+
+
+
+
+ Ovid
+ 奧維德
+ 西元前43年3月20日Sulmona義大利
+
+ 西元後17或18年Tomis (Constanta)羅馬尼亞
+
+
+
+
+
+
+
+ Ovid
+ Publius Ovidius Naso
+ 20 March 43 BC SulmonaItaly
+
+ 17 or 18 AD Tomis (Constanta)Romania
+
+
+
+
+
+
May contain either a prose description organized as paragraphs, or a sequence of more specific demographic elements drawn
+ from the model.personPart class.
+
+
+
Peut contenir soit une description en prose organisée en paragraphes, soit une suite d'éléments spécifiques relatifs à la
+ démographie extraits de la classe model.personPart.
+
+
+
+
+
+
+ personal group
+ 개인군
+ 人物團體
+ groupe de personnes
+ grupo de personas
+ gruppo di persone
+ describes a group of individuals treated as a single person for analytic purposes.
+ 분석적 목적을 위해 하나의 개인으로 처리된 개인군을 기술한다.
+ 描述一個為分析目的而被視為單一個人的團體。
+ 分析上,ひとりの人物として扱われる,個人のグループを示す.
+ décrit un groupe d'individus traité comme une personne unique à des fins d'analyse.
+ describe a un grupo de individuos considerados como una única persona para fines analíticos.
+ descrive un gruppo di soggetti considerati come unica persona a fini analitici
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ specifies the role of this group of participants in the interaction.
+ 상호작용에서 참여자군의 역할을 명시한다.
+ 說明該團體在互動中所扮演的角色。
+ 交流の参加者から成る当該グループの役割を示す.
+ précise le rôle joué par ce groupe de personnes dans l'interaction.
+ especifica el role de ese grupo de participantes en la interacción.
+ specifica il ruolo del gruppo di partecipanti all'interazione
+
+
+
+
Values for this attribute may be locally defined by a
+ project, using arbitrary keywords such as movement,
+ employers, relatives, or
+ servants, each of which should be associated with a
+ definition. Such local definitions will typically be provided by a
+ valList element in the project schema
+specification.
+
+
+ specifies the sex of the participant group.
+ 참여자군의 성을 명시한다.
+ 指出該參與團體的性別。
+ 参加者グループの性別を示す.
+ précise le sexe du groupe participant.
+ especifica el sexo del grupo de participantes.
+ indica il sesso del gruppo di partecipanti
+
+
+
Values for this attribute may be locally defined by a project, or may refer to an external standard, such as
+ vCard's sex property
+ (in which M indicates male, F female, O other, N none or not applicable, U unknown),
+ or the often used ISO 5218:2004
Representation of Human Sexes
+ (in which 0
+ indicates unknown; 1 male; 2 female; and 9 not applicable,
+ although the ISO standard is widely considered inadequate);
+ cf. CETH's Recommendations for Inclusive Data Collection of Trans People
+ .
+ For a mixed group, a value such as "mixed" may also be supplied.
+
+
+
+ specifies the age group of the participants.
+ 참여자의 연령군을 명시한다.
+ 指出該參與者所屬的年齡層。
+ 当該参加者の年齢層を示す.
+ précise la tranche d'âge des participants.
+ especifica el intervalo de edad del grupo de partecipantes.
+ indica la fascia di età del gruppo di partecipanti
+
+
+
Values for this attribute may be locally defined by a
+ project, using arbitrary keywords such as infant,
+ child, teen, adult, or
+ senior, each of which should be associated with a
+ definition. Such local definitions will typically be provided by a
+ valList element in the project schema
+specification.
+
+
+ describes
+ informally the size or approximate size of the group for example
+ by means of a number and an indication of accuracy e.g. approx 200.
+ 해당 그룹의 크기 또는 대략적 크기를 명시한다.
+ 提供該團體的 (約略) 大小。
+ 当該グループのおよその大きさを示す.
+ précise la taille exacte ou approximative du groupe.
+ especifica la dimensión o dimensiones aproximadas del grupo.
+ indica le dimensioni (anche approssimative) del gruppo
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
May contain a prose description organized as paragraphs, or any sequence of demographic elements in any combination.
+
The global xml:id attribute should be used to identify each speaking participant in a spoken text if the who
+ attribute is specified on individual utterances.
+
+
+
Peut contenir une description en texte libre organisée en paragraphes, ou une suite quelconque d'éléments relatifs à la
+ démographie.
+
Il faut utiliser l'attribut global xml:id pour identifier chaque locuteur dans une transcription de paroles si l'attribut
+ who est présent pour chaque prise de parole.
+
+
+
+
+
+ lieu
+ contains data about a geographic location
+ 지리적 위치에 관한 데이터를 포함한다.
+ contiene los datos sobre una localización geográfica
+ 地理上の場所のデータを示す.
+ contient des informations sur un lieu géographique.
+ contiene informazioni relative a un luogo geografico
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Lithuania
+ Lietuva
+
+ Vilnius
+
+
+ Kaunas
+
+
+
+
+
+
+
+
+ population
+ contains information about the population of a place.
+ contient des informations sur la population d'un lieu.
+ 장소의 인구에 관한 정보를 포함한다.
+ contiene la información sobre la población de un lugar.
+ ある場所の人口に関する情報を示す.
+ contiene informazioni relative alla popolazione di un
+ dato luogo
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 54153898
+
+
+ 11811423
+
+
+ 1148738
+
+
+ 677117
+
+
+ 247403
+
+
+ 230615
+
+
+
+
+
+
+
+
+ relationship
+ 관련성
+ 人際關係
+ relation
+ relación
+ relazione
+ describes any kind of relationship or linkage amongst a
+ specified group of places, events, persons, objects or other items.
+ 명시된 참여자군 사이에 관련성 또는 연결 종류를 기술한다.
+ 描述在特定團體中,參與者彼此之間的關係或關聯。
+ 指定された参加者グループ間の関連性の種類を示す.
+ décrit tout type de relation ou de lien à l'intérieur d'un groupe donné de participants.
+ describe cualquier tipo de relación o vínculo entre un determinato grupo de personas.
+ descrive una qualsiasi relazione o legame all'interno di un determinato gruppo di persone
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ One of the attributes 'name', 'ref' or 'key' must be supplied
+
+
+
+
+
+ Only one of the attributes
+@active and @mutual may be supplied
+
+
+
+
+ the attribute 'passive'
+ may be supplied only if the attribute 'active' is
+ supplied
+
+
+
+
+
+
+
+ supplies a name for the kind of relationship of which this is an instance.
+ 이것이 실례인 관련성 종류에 대한 이름을 제공한다.
+ 提供該關係的確切名稱。
+ 当該関係の種類名を示す.
+ fournit un nom pour le type de relation dont elle est une instance.
+ proporciona un nombre para elipo de relación que representan.
+ assegna un nome al tipo di relazione che rappresenta
+
+
+
+
+ identifies the active participants in a non-mutual relationship, or all the participants in a mutual
+ one.
+ identifica los participantes activos en una relación no-mutua, o todos los participantes de
+ una mutua.
+ identifie les participants actifs dans une relation à sens unique, ou tous les participants
+ dans une relation réciproque.
+ identifica i partecipanti attivi in una relazione di non reciprocità, oppure tutti i
+ partecipanti in una relazione di reciprocità
+
+
+
+ supplies a list of participants amongst all of whom the relationship holds equally.
+ proporciona una lista de participantes entre los cuales se establece una idéntica
+ relación
+ fournit une liste de participants entre lesquels la relation est réciproque.
+ fornisce una lista di partecipanti tra i quali c'è una relazione paritaria
+
+
+
+
+ identifies the passive participants in a non-mutual relationship.
+ 비상호적 관련성에서 passive 참여자를 식별한다.
+ 指出非對等關係中的被動關係人。
+ 一方向の関係における受動的な参加者を指定す る.
+ identifie les participants passifs dans une relation non mutuelle.
+ identifica los participantes pasivos en una relación de no reciprocidad.
+ identifica i partecipanti passiviall'interno di una relazione di non reciprocità.
+
+
+
+
+
+
+
+
This indicates that the person with identifier p1 is supervisor of persons p2, p3, and p4.
+
+
+
+
+
+
Cela indique que la personne avec l'identifiant p1 est le superviseur des personnes p2, p3
+ et p4.
+
+
+
+
+
+
Cela indique que p2, p3 et p4 sont tous amis.
+
+
+
+
+
+
This indicates that p2, p3, and p4 are all friends.
+
+
+
+
+
+
This indicates that there is a relation, defined by CIDOC CRM,
+ between two resources identified by URLs.
+
+
+
+
+
+
This example records a relationship, defined by the SAWS ontology, between a passage of text
+ identified by a CTS URN, and a variant passage of text in the Perseus Digital Library, and assigns
+ the identification of the relationship to a particular editor (all using resolvable URIs).
+
+
+
Only one of the attributes active and mutual may be supplied; the attribute passive may be supplied only
+ if the attribute active is supplied. Not all of these constraints can be enforced in all schema languages.
+
+
+
Un seul des attributs active et mutual peut être fourni ; l'attribut passive ne peut être utilisé que si
+ l'attribut active est fourni. Tous les langages de schéma ne sont pas capables d'exprimer la totalité de ces contraintes.
+
+
+
+
+
+
+
+ 거주
+ 住所
+ résidence
+ residencia
+ residenza
+ describes a person's present or past places of residence.
+ 개인의 현재 또는 과거의 거주지를 기술한다.
+ 描述個人過去或現在的住所。
+ 人物の,現在または過去の住居を示す.
+ décrit les lieux de résidence présents ou passés d'une personne.
+ describe el lugar de residencia presente o pasado de una persona.
+ descrive il luogo di residenza presente o passato di una persona
+
+
+
+
+
+
+
+
+
+
+
+
+ Childhood in East Africa and long term resident of Glasgow, Scotland.
+
+
+
+
+ Enfance passée en Afrique orientale, résidant longtemps à Glasgow en
+ Ecosse.
+
+
+
+
+ Mbeni estate, Dzukumura region, Matabele land
+
+
+ Glasgow
+ Ecosse
+
+
+
+
+
+
+ 童年生活於中亞,長期居留在中國青島。
+
+
+
+
+ 台北東區帝寶大廈
+
+
+ 沙鹿
+ 台中
+
+
+
+
+
+
+ Mbeni estate, Dzukumura region, Matabele land
+
+
+ Glasgow
+ Scotland
+
+
+
+
+
+
+
+
+ sexe
+ specifies the sex of a person.
+ précise le sexe d'une personne.
+ 개인의 성을 명시한다.
+ 指明個人性別。
+ 人物の性別を示す.
+ especifica el sexo de una persona.
+ specifica il sesso di una persona
+
+
+
+
+
+
+
+
+
+
+
+ supplies a coded value for sex
+
+
+
Values for this attribute may be locally defined by a project, or may refer to an external standard, such as
+ vCard's sex property
+ (in which M indicates male, F female, O other, N none or not applicable, U unknown),
+ or the often used ISO 5218:2004
Representation of Human Sexes
+ (in which 0
+ indicates unknown; 1 male; 2 female; and 9 not applicable,
+ although the ISO standard is widely considered inadequate);
+ cf. CETH's Recommendations for Inclusive Data Collection of Trans People
+ .
+
+
+
Les valeurs de cet attribut sont tirées de la norme ISO 5218:1977
As with other culturally-constructed traits such as
+ age, the way in which this concept is described in different
+ cultural contexts may vary. The normalizing attributes are
+ provided only as an optional means of simplifying that variety to
+ one or more external standards for purposes of interoperability,
+ or project-internal taxonomies for consistency, and should not be used where that is
+ inappropriate or unhelpful. The content of the element may be used to describe
+ the intended concept in more detail, using plain text.
+
+
+
+
+
+ socio-economic status
+ statut socio-économique
+ 사회-경제적 지위
+ 社會經濟地位
+ estatus socio-económico
+ condizione socio-economica
+ contains an informal description of a person's perceived social or economic status.
+ contient une description non formalisée du statut social ou économique d'une personne.
+ 개인의 사회 또는 경제적 지위에 대한 비공식적 기술을 포함한다.
+ 包含個人的社會或經濟地位的非正式描述。
+ ある個人の,社会的・経済的状態を示す,形式的でない解説を示す.
+ contiene una descripción informal sobre el estatus socio-económico de una persona.
+ contiene una descrizione informale della condizione socio-economica percepita di una persona
+
+
+
+
+
+
+
+
+
+
+
+
+ identifies the classification system or taxonomy in use, for example by pointing to a locally-defined taxonomy element or by supplying a URI for an externally-defined system.
+ identifie le système de classification ou la taxinomie utilisés.
+ 사용 중인 분류 체계 또는 분류법을 식별한다.
+ 指出所使用的分類系統或分類法。
+ 使われた分類システムを示す.
+ identifica el sistema de clasificación o de taxonomía empleado.
+ identifica il sistema di classificazione o la tassonomia utilizzati
+
+
+
+ identifies a status code defined within the classification system or taxonomy defined by the scheme attribute.
+ contient un code de statut existant dans le système de classification ou dans la taxonomie
+ déclarés au moyen de l'attribut source.
+ source 속성에 의해 정의된 분류 체계 또는 분류법 내에서 정의된 지위 부호를 식별한다.
+ 所標明的地位代號被定義在由屬性source所規定的分類系統或分類法當中。
+ 属性sourceで定義された分類システムにある,状態コード を特定する.
+ identifica un código relativo a la condición socio-económica definido en el sistema de
+ clasificación o taxonomía establecidos por el attributo source.
+ corrisponde a un codice relativo alla condizione socio-economica definito nel sistema di
+ classificazione o tassonomia stabiliti dall'attributo source
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Code 17 dans la PCS ( Professions et catégories
+ socioprofessionnelles)
+
+
+
+
+ 印度教種姓制度下的賤民階級
+
+
+
+
+ Status AB1 in the RG Classification scheme
+
+
+
+
The content of this element may be used as an alternative to the more formal specification made possible by its attributes; it may also be
+ used to supplement the formal specification with commentary or clarification.
+
+
+
Le contenu de cet élément peut être utilisé à la place d'une caractérisation plus formelle que ses attributs permettent ; il peut aussi
+ être utilisé pour compléter cette caractérisation formelle par un commentaire ou une explication.
+
+
+
+
+
+ statut
+ contains a description of some status or quality attributed to a person, place, or organization often at some specific time or for a specific date range.
+ contient la description d'un statut ou d'une qualité actuels attribués à une personne, un lieu ou une
+ organisation.
+ 개인, 장소, 또는 조직에 관련한 현재 지위 또는 특성 기술을 포함한다.
+ 標明分界方法所定義的權威參照標準裡其中ㄧ個組件。
+ 人物,場所,組織などの,現在の社会的状態や地位を示す.
+ beschreibt einen Bestandteil einer Standardreferenz mittels der Milestone-Methode.
+ especifica un componente de una referencia canónica definida por el método milestone (hito).
+ specifica un componente di un riferimento canonico definito dal metodo milestone.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ The Silver Beetles
+ The Beatles
+
+
+ John Lennon
+ Paul McCartney
+ George Harrison
+ Stuart Sutcliffe
+ Pete Best
+
+
+
+
+ John Lennon
+ Paul McCartney
+ George Harrison
+ Ringo Starr
+
+
+
+
+
+
+
+
+
+ Entre 1987 et 1997a bénéficié du statut de citoyen naturalisé du ROYAUME-UNI
+
+
+
+
+
+
+
+
+
+
+
+
Where there is confusion between trait and state the more general purpose
+ element state should be used even for unchanging characteristics. If you wish to
+ distinguish between characteristics that are generally perceived to be time-bound states and
+ those assumed to be fixed traits, then trait is available for the more static of
+ these. The state element encodes characteristics which are sometimes assumed to
+ change, often at specific times or over a date range, whereas the trait elements are
+ used to record characteristics, such as eye-colour, which are less subject to change. Traits are typically, but not necessarily,
+ independent of the volition or action of the holder.
+
+
+
+
+
+
+ terrain
+ contains information about the physical terrain of a place.
+ contient des informations sur le terrain physique d'un lieu.
+ 장소의 물리적 지역에 대한 정보를 포함한다.
+ contiene información sobre el terreno físico de un lugar.
+ 場所の地形情報を示す.
+ contiene informazioni relative al terreno fisico di un luogo
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Kerguelen Islands
+
+
+ antarctic tundra
+
+
+
+
+
+
+
+
+
+ trait distinctif
+ contains a description of some status or quality attributed to a person, place, or organization typically, but not necessarily,
+ independent of the volition or action of the holder and usually not at some specific time or for a specific date range.
+ contient la description d'une caractéristique culturelle
+ et en principe permanente, attribuée à une personne ou à un lieu.
+ 사람 또는 장소에 관한, 문화적으로 결정된 특성 기술을 포함한다.
+ 人物や場所の文化的な特性を示す.
+ contiene la descripción de una característica personal o
+ cultural determinada atribuida a una persona.
+ contiene la descrizione di una caratteristica personale o
+ legata alla cultura di appartenenza di una determinata persona
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 藍色
+
+
+
+
+
+
+
+ bleu
+
+
+
+
+
+
+
+ Blue
+
+
+
+
+
Where there is confusion between trait and state the more general purpose
+ element state should be used even for unchanging characteristics. If you wish to
+ distinguish between characteristics that are generally perceived to be time-bound states and
+ those assumed to be fixed traits, then trait is available for the more static of
+ these. The state element encodes characteristics which are sometimes assumed to
+ change, often at specific times or over a date range, whereas the trait elements are
+ used to record characteristics, such as eye-colour, which are less subject to change. Traits are typically, but not necessarily,
+ independent of the volition or action of the holder.
+
+
+
+
+
+
Names and Nyms
+ canonical name
+ 표준 이름
+ nombre canónico
+ nome canonico
+ nom canonique
+ contient la définition de tout nom ou partie de nom dans leur forme canonique.
+ contains the definition for a canonical name or name component of any kind.
+ 표준 이름 또는 어떤 종류의 이름부 정의를 포함한다.
+ 包含一標準名稱或任何部分名稱的定義。
+ 各種名前の,標準的な名前または名前の部分の定義を示す.
+ contiene la definizione di un nome o di una parte di nome canonici di qualsiasi tipo
+ contiene la definición para un nombre canónico o parte de nombre de cualquier tipo.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ points to constituent nyms
+ 구성성분 이름을 가리킨다.
+ 連結到組成的正式名稱
+ 構成別名を参照する.
+ pointe vers des éléments constituants canoniques.
+ indica nym costitutivi
+ señala un componente nyms.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ list of canonical names
+ 표준 이름 목록
+ lista de nombres canónicos
+ liste de noms canoniques
+ elenco di nomi canonici
+ contains a list of nyms, that is, standardized names for any thing.
+ 어떤 사물에 대한 표준화된 이름 목록을 포함한다.
+ 包含一正式名稱列表,即任何事物的標準名稱。
+ 別名,すなわち,一般的に使われている名前のリストを示す.
+ contient une liste de noms normalisés pour tous types d'objets.
+ contiene una lista di nym, cioè nomi standard per qualsiasi cosa
+ contiene una lista de nyms, es decir, nombres estándard para cualquier cosa.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Contraction of day's eye
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ contraction de day's eye
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 多年生草本植物,葉細長而尖,春天開花,味清香。
+
+
+
+
+
+
+
+
+
The type attribute may be used to distinguish lists of names of a particular type if convenient.
+
+
+
L'attribut type peut être utilisé pour établir des listes par type de nom si cela présente un intérêt.
+
+
+
属性typeは,特別な種類の名前を区別する際に使用されるかもしれない.
+
+
+
+
+
Dates and Times
Relative Dates and Times
+
Absolute Dates and Times
More Expressive Normalizations
+ groups elements describing changeable characteristics of an organization which have a
+ definite duration.
+ 한정된 기간 동안 지속되는 조직의 변화 가능한 특성을 기술하는 요소를 모아 놓는다.
+ agrupa los elementos que describen las características
+ mutables de una organización que tienen una duración definida.
+ 一定期間で変容する,組織の性格を示す要素をまとめる.
+ regroupe des éléments qui décrivent des caractéristiques variables et définies dans le temps d'une organisation.
+ raggruppa elementi che descrivono caratteristiche
+ mutevoli di un'organizzazione che hanno una durata definita
+
+ attributes for components of names usually, but not necessarily, personal names
+ 사람 이름의 성분에 대한 속성
+ 用於個人名稱元件的屬性
+ attributs des composantes des noms de personnes
+ atributos para los componentes de nombres propios de persona
+ attributi per componenti di nomi propri di persona
+ common attributes for those elements which form part of a name usually, but not necessarily, a personal name.
+ 사람 이름의 부분을 형성하는 요소에 대한 공통 속성
+ 構成部分個人名稱的元素所用之通用屬性
+ 個人名の構成要素となる要素に付与される属性.
+ attributs communs des éléments qui composent un nom de personne
+ atributos comunes para los elementos que forman parte de un nombre propio de persona.
+ attributi comuni agli
+ elementi che compongono un nome proprio di persona
+
+
+
+
+
+ indicates whether the name component is given in full, as an
+abbreviation or simply as an initial.
+ 축약 또는 이니셜로 간단하게 이름 성분이 완전히 제시된 것인지의 여부를 나타낸다.
+ 指出所提供的名稱元件是否完整,為一縮寫或僅為一字首字母。
+ 当該名前要素は省略がないか,省略形か,イニシャルのような簡単なも
+ のか示す.
+ indique si la composante du nom est donnée en intégralité, sous forme d'abréviation ou simplement d'initiale.
+ indica si el componente del nombre aparece por completo, como una abreviatura o como una inicial.
+ indica se la componente del nome compare per esteso, come abbreviazione o come iniziale
+
+ yes
+
+
+ complet
+ the name component is spelled out in full.
+ 이름 성분이 완전히 제시된다.
+ 該名稱元件的拼字完整。
+ el componente nombre se deletrea por completo.
+ 当該名前要素は,省略無く示されている.
+ la composante du nom est orthographiée en intégralité.
+ la componente del nome compare per esteso
+
+
+ abbreviated
+ 축약된
+ abrégé
+ abbreviato
+ el componente del nombre aparece como forma abreviada.
+ the name component is given in an abbreviated form.
+ 이름 성분이 축약형으로 제시된다.
+ 該名稱元件為縮寫形式。
+ el componente conocido se da en una forma abreviada.
+ 当該名前要素には,省略がある.
+ la composante du nom est donnée sous forme abrégée.
+ la componente del nome compare in forma abbreviata
+
+
+ initial letter
+ 이니셜 문자
+ initiale
+ lettera iniziale
+ el componente del nombre aparece mediante la inicial.
+ the name component is indicated only by
+one initial.
+ 이름 성분이 하나의 이니셜(첫글자)로 제시되었다.
+ 該名稱元件僅以一字首字母表示。
+ el componente conocido es indicado solamente por una inicial.
+ 当該名前要素は,イニシャルだけで示されている.
+ la composante du nom n'est indiquée que par sa lettre initiale.
+ la componente del nome è indicata da una sola iniziale
+
+
+
+
+ ordre
+ specifies the sort order of the name component in relation to others within the name.
+ 사람 이름 내에 다른 것과 관련된 이름 성분의 정렬 순서를 명시한다.
+ 指明個人名稱中該名稱元件與其他元件之間的排列順序。
+ 個人名間で並び替えをする際の順番を示す.
+ précise dans quel ordre est placé la composante par rapport aux autres dans le nom d'une personne.
+ especifica la posición del componente al interno del nombre propio de persona en relación con los otros componentes.
+ specifica la posizione della componente all'interno del nome proprio di persona in relazione alle altre componenti
+
+
+
+
+
+
+
+ groups elements used to provide information about places and their relationships.
+ 장소와 그 관계에 관한 정보를 제공하는 요소를 모아 놓는다.
+ elementos de los grupos usados para proporcionar a la
+ información sobre los lugares y sus lazos.
+ 場所やそれらの関連性に関する情報を示す要素をまとめる.
+ regroupe des éléments qui donne des informations sur des lieux et leurs relations.
+ raggruppa elementi utilizzati per fornire informazioni
+ relative a luoghi e relazioni corrispondenti
+
+ provides attributes for normalization of elements that contain datable events using the ISO 8601 standard.
+ ISO 8601 표준을 사용해서 날짜를 추정할 수 있는 사건을 포함하는 요소의 규격화를 위한 속성을 제공한다.
+ 用於紀錄規格化時間的屬性,該規格使用ISO 8601標準
+ ISO8601に従い,時間事象の正規的方法を示す属性を示す.
+ fournit des attributs pour la normalisation, selon la norme ISO 8601, d'éléments contenant des évènements
+ datables.
+ indica attributi per la normalizzazione tramite lo standard ISO 8601 di elementi che contengono eventi
+ databili
+ proporciona atributos para la normalización de elementos que contienen eventos datables usando el
+ estándard ISO 8601.
+
+
+
+ supplies the value of a date or time in a standard form.
+ 표준형의 날짜 또는 시간 값을 제시한다.
+ proporciona el valor de fecha o de tiempo en una forma estándar.
+ 日付や時間を,標準形式で示す.
+ précise une date exacte pour l'évènement selon la forme normalisée ISO 8601, c'est-à-dire
+ aaaa-mm-jj.
+ indica il valore di una data o di un orario in un formato standard
+
+
+
The following are examples of ISO date, time, and date & time formats that are not valid W3C format
+ normalizations.
+
+ Sept. 24th, 1996 at 3:25 in the morning
+ Sept. 24th, 1996 at 3:25 in the morning
+
+
+ a few minutes after ten in the morning on Thu 18 May
+
+
+
+
+
All of the examples of the when attribute in the att.datable.w3c class are also valid with
+ respect to this attribute.
+
+
+
Les exemples qui suivent sont des mentions de date, d'heure, de temps au format ISO qui
+ ne sont pas normalisées au format W3C
+
+ le 24 sept. 1996, à 3 h 25 du matin.
+ le 24 sept. 1996, à 3 h 25 du matin.
+
+
+ quelques minutes après 10 heures du matin, le mardi 18
+ mai.
+
+
+
+
+
Tous les exemples de l’attribut when dans la classe att.datable.w3c sont également valides en ce qui concerne cet attribut
+
+
+ Il aime à être ponctuel . J'ai dit, et il est apparu à à l'heure pile.
+
La deuxième occurence de time a pu être encodée avec l'attribut
+ when , puisque12:00:00 est une marque de temps en accord avec la
+ spécification du W3C
XML Schema Part 2: Datatypes Second
+ Edition. La première occurence
+ ne l'est pas.
+
+
+ He likes to be punctual. I said , and he showed up at on the dot.
+
The second occurence of time could have been encoded with the when attribute, as 12:00:00 is a valid
+ time with respect to the W3C
XML Schema Part 2: Datatypes Second Edition specification. The first occurence could not.
+
+
+
+
+ specifies the earliest possible date for the event in standard form, e.g. yyyy-mm-dd.
+ yyyy-mm-dd 같은 표준형으로 사건의 시작 날짜를 명시한다.
+ 以標準格式標明該事件可能發生的最早日期,例如年-月-日。
+ 当該事象の一番古い日付を,標準形式で示す.例えば,yyyy-mm-dd.
+ précise la première date possible pour l'évènement selon la forme normalisée, c'est-à-dire
+ aaaa-mm-jj.
+ specifica la prima data possibile per un evento nel formato standard aaaa-mm-gg
+ indica la fecha más temprana posible para un evento en un formato estándard, p.ej.
+ aaaa-mm-dd.
+
+
+
+ specifies the latest possible date for the event in standard form, e.g. yyyy-mm-dd.
+ yyyy-mm-dd 같은 표준형으로 사건의 종료 날짜를 명시한다.
+ 以標準格式標明該事件可能發生的最晚日期,例如年-月-日。
+ 当該事象の一番新しい日付を,標準形式で示す.例えば,yyyy-mm-dd.
+ précise la dernière date possible pour l'évènement selon la forme normalisée, c'est-à-dire
+ aaaa-mm-jj.
+ specifica l'ultima data possibile per un evento nel formato standard aaaa-mm-gg
+ indica la fecha más tardana posible para un evento en un formato estándard, p.ej.
+ aaaa-mm-dd.
+
+
+
+ indicates the starting point of the period in standard form.
+ 표준형으로 기간의 시작 지점을 나타낸다.
+ 以標準格式表示該段時間的起始點。
+ 当該時間幅の,始点を標準形で示す.
+ Indique le point de départ de la période sous une forme normalisée
+ indica l'inizio del periodo nel formato standard
+ indica el punto de inicio de un periodo de tiempo en formato estándard.
+
+
+
+ indicates the ending point of the period in standard form.
+ 표준형으로 기간의 종료 지점을 나타낸다.
+ 以標準格式表示該段時間的結束點。
+ indica en forma estándard el punto de conclusión de un período.
+ 当該時間幅の,終点を標準形で示す.
+ Indique le point final de la période sous une forme normalisée
+ indica la fine del periodo nel formato standard
+
+
+
+
+
+
The value of these attributes should be a normalized
+ representation of the date, time, or combined date & time
+ intended, in any of the standard formats specified by ISO 8601,
+ using the Gregorian calendar.
+
+
+
La valeur de when-iso doit être une représentation normalisée de la date, de la durée ou d'une combinaison de date et de
+ durée, dans l'un des formats spécifiés dans ISO 8601, selon le calendrier grégorien.
If both when-iso and dur-iso are specified, the values should be interpreted as indicating a span of time by its
+ starting time (or date) and duration. That is, indicates the same time period as
+
+
In providing a regularized form, no claim is made that the form in the source text is incorrect; the regularized form
+ is simply that chosen as the main form for purposes of unifying variant forms under a single heading.
+
+
+
Si les attributs when-iso et dur-iso sont tous les deux spécifiés, les valeurs doivent être interprétées comme
+ indiquant un intervalle de temps au moyen de son point de départ (ou date) et de sa durée. C'est à dire, indique la même période temporelle que
+
+
En fournissant une forme dite "régularisée", il n'est rien affirmé sur la correction ou l'incorrection de la forme dans le texte source ;
+ la forme régularisée est simplement celle qui est choisie comme forme principale afin de réunir les variantes de forme sous une seule
+ rubrique.
+
+
+
+
+
+
+ defines the range of attribute values expressing a temporal expression such as a date, a
+ time, or a combination of them, that conform to the international standard Data elements
+ and interchange formats – Information interchange – Representation of dates and times.
+ 날짜, 시간, 또는 이들의 조합과 같은 시간 표현의 속성 값 범위를 정의하며, 이는 국제 표준
+ Data elements and interchange formats – Information interchange – Representation of
+ dates and times을 따른다.
+ 定義該系列表示時間的屬性值,例如日期、時間或兩者的組合,需符合國際標準 Data elements and
+ interchange formats – Information interchange – Representation of dates and times
+ 日付や時間などの時間表現をとる属性値の範囲を定義する.これは,国際標 準であるData
+ elements and interchange formats - Information interchange - Representation of dates and
+ timesに準拠したも のになる.
+ définit la gamme des valeurs d'attribut qui sont capables
+ d''exprimer une valeur temporelle comme une date, une période, ou une combinaison des deux qui
+ se conforment au standard international Data elements and interchange formats –
+ Information interchange – Representation of dates and times
+
+ define la gama de valores de atributos que expresan una
+ expresión temporal como una fecha, una hora, o una combinación de estas, de acuerdo a un
+ estándard internacional Elementos de datos y formatos de intercambio - Intercambio de
+ información – Representación de fechas y horas.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ [0-9.,DHMPRSTWYZ/:+\-]+
+
+
+
+
+
If it is likely that the value used is to be compared with another, then a time zone
+ indicator should always be included, and only the dateTime representation should be used.
+
For all representations for which ISO 8601 describes both a basic and an
+ extended format, these Guidelines recommend use of the extended format.
+
While ISO 8601 permits the use of both 00:00 and 24:00 to represent
+ midnight, these Guidelines strongly recommend against the use of 24:00.
+
ISO 8601では,深夜の12時を示す方法として, 00:00と24:00の両方を認めているが,
+ 本ガイドラインでは,24:00とは表記しないことを強く推奨 している.
+
+
+
+
+
S'il est vraisemblable que la valeur utilisée soit destinée à être comparer à d’autres
+ valeurs, alors une indication du fuseau horaire devrait toujours être incluse, et seule la
+ représentation dateTime devrait être employée.
+
Pour toutes les représentations pour lesquelles l’ISO 8601 décrit à la fois un format
+ basique et un format étendu , ce guide d’encodage recommandande
+ l’emploi du format étendu .
+
Même si l’ ISO 8601 permet d’écrire à la fois 00:00 et 24:00 pour
+ minuit, ce guide d’encodage déconseille vivement d’écrire 24:00.
+
+
+
+ defines the range of attribute values available for representation of a duration in time
+ using ISO 8601 standard formats
+ ISO 8601 표준 형식을 사용하여 시간의 지속을 나타내는 속성 값 범위를 정의한다.
+ 以ISO 8601標準格式定義表示一段持續性時間的屬性值範圍
+ ISO 8601にある標準形式を使い,時間幅を表現する当該属性値の範囲を定義 する.
+ définit la gamme de valeurs d'attributs exprimant une durée temporaraire utilisant le norme ISO 8601.
+ define la gama de valores de atributos posibles para
+ representar la duración en el tiempo usando formatos estàndards ISO 8601.
+
+
+
+ [0-9.,DHMPRSTWYZ/:+\-]+
+
+
+
+
+
+
+
+
+
+ a day and a half
+
+
+
+
+ a fortnight
+
+
+
+
+
+
+
+
+
+ une journee et demie
+
+
+
+
+ une quinzaine
+
+
+
+
+
+
+
+
+
A duration is expressed as a sequence of number-letter pairs, preceded by the letter P; the
+ letter gives the unit and may be Y (year), M (month), D (day), H (hour), M (minute), or S
+ (second), in that order. The numbers are all unsigned integers, except for the last, which may
+ have a decimal component (using either . or , as the decimal point;
+ the latter is preferred). If any number is 0, then that number-letter
+ pair may be omitted. If any of the H (hour), M (minute), or S (second) number-letter pairs are
+ present, then the separator T must precede the first time
+ number-letter pair.
+
For complete details, see ISO 8601
Data elements and interchange formats — Information
+ interchange — Representation of dates and times.
+
+
+
Data elements and interchange formats - Information interchange -
+ Representation of dates and timesを参照のこと.
+
+
+
Une durée est exprimée par une suite de paires alphanumériques, précédée par la lettre P ;
+ la lettre donne l'unité et peut être Y (année), M (mois), D (jour), H (heure), M (minute), ou
+ S (seconde), dans cet ordre. Les nombres sont des entiers sans
+ signe, à l'exception du dernier,
+ qui peut comporter une décimale (en utilisant soit . soit , pour la
+ virgule ; la dernière possibilité est préférable). Si un nombre est 0,
+ alors la paire alphanumérique peut être omise. Si les paires alphanumériques H (heure), M
+ (minute), ou S (seconde) sont présentes, alors le séparateur T doit précéder la
+ première paire alphanumérique time.
+
Pour des détails complets, voir ISO 8601
Data elements and interchange formats —
+ Information interchange — Representation of dates and times.
+
+
Using Non-Gregorian Calendars
Module for Names and Dates
+ Names, dates, persons and places
+ Names and dates
+ Noms, dates, personnes et lieux
+ 名稱與日期
+Nomi e dateNomes e datas名前モジュール
Tables, Formulæ, Graphics and Notated Music
Tables
TEI Tables
+ tableau
+ contains text displayed in tabular form, in rows and columns.
+ 행과 열의 테이블 형식으로 제시된 텍스트를 포함한다.
+ 以表格形式呈現、包含在直行橫列中的文字內容。
+ 表形式で示されるテキストを,行と列で示す.
+ contient du texte affiché sous forme de tableau, en
+ rangées et colonnes.
+ contiene texto dispuedto en forma de tabla, con filas y
+ columnas.
+ contiene testo visualizzato in forma di tabella, in righe
+ e colonne.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ indicates the number of rows in the table.
+ 테이블의 행의 수를 표시한다.
+ 指出表格中的列數。
+ 当該表中の行数を示す.
+ indique le nombre de rangées dans le tableau.
+ indica el número de filas en una tabla.
+ indica il numero di righe della tabella.
+
+
+
If no number is supplied, an application must calculate the
+ number of rows.
+
Rows should be presented from top to bottom.
+
+
+
Les rangées sont ordonnées de haut en bas
+
+
+
行は,上から下の順番で示される.
+
+
+
+ columns
+ 열
+ columnas
+ colonnes
+ colonne
+ indicates the number of columns in each row of the table.
+ 테이블의 각 행별 열의 수를 표시한다.
+ 指出表格中每一列所包含的行數。
+ 当該表中の列数を示す.
+ indique le nombre de colonnes dans chaque rangée du
+ tableau.
+ indica el número de columnas por cada fila de la
+ tabla.
+ indica il numero di colonne in ciascuna riga della
+ tabella-
+
+
+
If no number is supplied, an application must calculate the
+ number of columns.
+
Within each row, columns should be presented left to right.
+
+
+
Si aucun nombre n'est fourni, une application doit calculer le nombre de colonnes.
Dans chaque rangée, les colonnes sont ordonnées de gauche à droite.
+ Persistance de la neige dans les Alpes suisses (Denzler).
+
+ A l'altitude de
+ 650 m.
+ 1300m.
+ 1950m.
+ 2700m.
+
+
+ la neige reste
+ 77 jours.
+ 200 jours.
+ 245 jours.
+ 365 jours.
+
+
Contains an optional heading and a series of rows.
+
Any rendition information should be supplied using the global rend attribute, at
+ the table, row, or cell level as appropriate.
+
+
+
Contient un titre facultatif et une suite de rangées.
+
Toute information relative à la restitution sera exprimée avec l'attribut global
+ rend appliqué au tableau, à la rangée, ou à la cellule selon le cas.
+
+
+
+
+
+ rangée
+ contains one row of a table.
+ 하나의 테이블의 한 행을 포함한다.
+ 包含表格中的一列。
+ 表の1行を示す.
+ contient une rangée d'un tableau.
+ contiene una fila de la tabla.
+ contiene una riga di una tabella.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Classics
+ Idle listless and unimproving
+
+
+
+
+
+
+ Etudes classiques
+ Inoccupé indolent et sans amélioration
+
+
+
+
+
+
+ 古文
+ 漫無目的且無精進的
+
+
+
+
+
+
+
+ cellule
+ contains one cell of a table.
+ 하나의 테이블의 하나의 셀을 포함한다.
+ 包含表格中的一個儲存格。
+ 表中のひとつのセルを示す.
+ contient une cellule d'un tableau.
+ contiene una celda de una tabla.
+ contiene una cella di una tabella.
+
+
+
+
+
+
+
+
+
+
+ General conduct
+ Not satisfactory, on account of his great unpunctuality
+ and inattention to duties
+
+
+
+
+
+
+ Comportement général
+ Non satisfaisant, à cause de son inexactitude et de son
+ inconséquence
+
+
+
+
+
+
+ 工作評價
+ 不滿意;因為工作拖延、粗心。
+
+
+
+
+
+
+
Other Table Schemas
Formulæ and Mathematical Expressions
+ formule
+ contains a mathematical or other formula.
+ 수식 또는 다른 식을 포함한다.
+ 包含數學或其他方程式。
+ 数式を示す.
+ contient une formule mathématique ou tout autre type de
+ formule
+ contiene una fórmula matemática o de otro tipo.
+ contiene una formula matematica o di altra natura.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ $E=mc^2$
+
+
+
+
+ E=mc2
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Notated Music in Written Text
+ encodes the presence of music notation in a text
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ First bar of Chopin's Scherzo No.3 Op.39
+
+
+
+
+
It is possible to describe
+ the content of the notation using elements from the model.labelLike class and it is possible
+ to point to an external representation using elements from model.ptrLike. It is possible to
+ specify the location of digital objects representing the notated music in other media such
+ as images or audio-visual files. The encoder's interpretation of the correspondence between
+ the notated music and these digital objects is not encoded explicitly. We recommend the use
+ of graphic and binaryObject mainly as a fallback mechanism when the notated music format is
+ not displayable by the application using the encoding. The alignment of encoded notated
+ music, images carrying the notation, and audio files is a complex matter for which we refer
+ the encoder to other formats and specifications such as MPEG-SMR.
+
+
+
+
+
Specific Elements for Graphic Images
+ figure
+ groups elements representing or containing graphic information
+ such as an illustration, formula, or figure.
+ 삽화 또는 그림과 같은 시각 정보를 표시하거나 포함하는 요소를 모아 놓는다.
+ 所標記的區塊包含圖示、插圖、或圖表。
+ 図表を示すまたは含む要素をまとめる.
+ regroupe des éléments représentant ou contenant une
+ information graphique comme une illustration ou une figure.
+ indica un bloque que contiene gráficos, ilustraciones o
+ figuras.
+ contiene una porzione di testo costituita da grafici,
+ illustrazioni o figure.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ The View from the Bridge
+ A Whistleresque view showing four or five sailing boats in the foreground, and a
+ series of buoys strung out between them.
+
+
+
+
+
+
+
+ La tour rouge, de Giorgio De Chirico
+ Le tableau représente un donjon au pied duquel s'étend un espace quasiment vide,
+ hormis quelques détails
+
+
+
+
+
+
+
+ 圖一: 橋上的視野
+ 前景有四五隻風帆,中間一堆救生圈串連。
+
+
+
+
+
+
+
+
+ description of figure
+ 그림 기술
+ 圖表描述
+ description d'une figure
+ descripción de una figura
+ Descrizione di una figura
+ contains a brief prose description of the appearance or content
+of a graphic figure, for use when documenting an image without
+displaying it.
+
+ 包含圖表內容的簡短文字描述,用於紀錄圖像但未呈現圖像的情況。
+ 図表の内容や現れ方について簡単な散文で解説を示す.当該図表を示さない
+ で記録する場合に使用される.
+ contient une brève description de l'apparence ou
+ du contenu d'une représentation graphique, pour documenter une image sans avoir à
+ l'afficher
+ contiene una breve descripción de la apariencia o del contenido de una figura gráfica, para utilizarla al documentar una imagen sin mostrarla.
+ contiene una breve descrizione dell'aspetto o del contenuto di una figura, da utilizzare quando si vuole documentare un'immagine senza mostrarla.
+
+
+
+
+
+
+
+
+
+
+ Emblemi d'Amore
+ A pair of naked winged cupids, each holding a
+ flaming torch, in a rural setting.
+
+
+
+
+
+
+
+ Dick Kennedy
+ Gravure de E. Riou représentant un jeune homme assis sur une chaise, les
+ pieds sur une autre et tenant à la main une canne. En arrière plan, une théière, et
+ l'inscription Map of Africa .
+
+
+
+
+
This element is intended for use as an alternative to the
+content of its parent figure element ; for example, to display
+when the image is required but the equipment in use cannot display
+graphic images. It may also be used for indexing or documentary
+purposes.
+
+
+
Cet élément est prévu pour être utilisé comme alternative au contenu de son élément
+ parent figure; par exemple, pour montrer que l'image est exigée mais que
+ le matériel en service ne peut pas montrer des documents graphiques. Il peut également
+ être employé pour l'indexation ou dans un but documentaire.
Module for Tables, Formulæ, Notated Music, and Graphics
+ Tables, Formulæ, Notated Music, Figures
+ Tables, formulæ, notated music, and figures
+ Tableaux, formules et graphiques
+ 表格、方程式與圖表
+ Tabelle, formule e figure
+ Tabelas, fórmulas, e figuras
+ 図表式モジュール
+
Language Corpora
Varieties of Composite Text
Contextual Information
+ text description
+ 텍스트 기술
+ 文本描述
+ description de texte
+ descripción del texto
+ descrizione del testo
+ provides a description of a text in terms of its
+situational parameters.
+ 장면적 매개변수를 통해 텍스트에 대해 기술한다.
+ 提供文本在情境特徵方面的相關描述。
+ 状況パラメータにより,テキストの情報を示す.
+ fournit la description d'un texte sous l'angle du
+ contexte situationnel
+ proporciona una descripción de un texto en términos de sus parámetros situacionales
+ fornisce la descrizione di un testo in termini di paramentri situazionali
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ participation description
+ 참여 기술
+ 參與描述
+ description des participants
+ descripción de participación
+ descrizione dei partecipanti
+ describes the identifiable speakers, voices, or
+ other participants in any kind of text or other persons named or otherwise referred to in a
+ text, edition, or metadata.
+ 언어적 상호작용에서 식별가능한 화자, 음성, 또는 기타 참여자를 기술한다.
+ 描述在一個語言互動中可辨識的說話者、聲音或其他參與者。
+ 言語交流における,特定可能な発話者,声,その他の参加者を示す.
+ décrit les locuteurs, voix ou autres participants
+ identifiables d'une interaction linguistique.
+ describe los hablantes identificables, voces u
+ otros participantes de una interacción lingüística.
+ descrive parlanti, voci o altri parlanti
+ identificabili in una interazione linguistica.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Female informant, well-educated, born in
+ Shropshire UK, 12 Jan 1950, of unknown occupation. Speaks French fluently.
+ Socio-Economic status B2.
+ HancockAntonyAloysius
+ St John
+
+ Railway Cuttings
+ East Cheam
+
+ comedian
+
+
This example shows both a very simple person description, and a very detailed one, using
+ some of the more specialized elements from the module for Names and Dates.
+
+
+
informateur, sexe féminin, bonne éducation, née
+ à Shropshire UK, 12 Jan 1950, commerçante parle français couramment., Statut
+ socio-économique (SSE) : commerçant.
+ DelaunayLiliane
+ AndréeAlberte
+
+ rue de Falaise
+ la Guérinière, Caen
+
+ serveuse
+
+
Cet exemple montre une description très
+ simple d'une personne et une description très détaillée, utilisant quelques éléments
+ plus spécialisés du module pour les noms et les dates.
May contain a prose description organized as paragraphs, or a structured
+ list of persons and person groups, with an optional formal specification of any
+ relationships amongst them.
+
+
+
Peut contenir un texte organisé en paragraphes ou une liste structurée de
+ personnes, ou encore de groupes de personne, avec facultativement des spécifications
+ formelles des rapports qui les unissent.
+
+
+
+
+
+
+ setting description
+ 무대 기술
+ 背景描述
+ description du contexte
+ descripción de realización
+ descrizione dello scenario
+ describes the setting or settings within which a
+ language interaction takes place, or other places otherwise referred to in a text, edition,
+ or metadata.
+ 언어적 상호작용이 발생하는 무대 또는 배경을 산문적 기술로서 또는 일련의 무대 요소로서
+ 기술한다.
+ 描述語言互動所發生的一個或多個背景,可用一段散文描述或是一系列的背景元素來表達。
+ 言語交流が行われた状況設定を,散文または一連の要素settingに
+ より示す.
+ décrit le(s) contexte(s) dans lesquels se situe une
+ interaction linguistique, soit sous la forme d'une description en prose, soit sous celle
+ d'une série d'éléments décrivant le contexte.
+ describe en prosa, o mediante una serie de
+ elementos de realización, la realización o realizaciones dentro de las cuales una
+ interacción lingüística tiene lugar.
+ descrive lo scenario o gli scenari nei quali si
+ svolge l'interazione linuistica, sia in forma di prosa descrittiva sia con elementi di
+ scenario.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Texts recorded in the
+ Canadian Parliament building in Ottawa, between April and November 1988
+
+
+
+
Pierre Mendès France,
+ Entretiens avec Jean Lacouture (1980-1981 )
+
+
+
+
文本錄於渥太華的加拿大國會大廈,介於1988年4月至11月間
+
+
+
May contain a prose description organized as paragraphs, or a series of
+ setting elements. If used to record not settings of language interactions, but
+ other places mentioned in the text, then place optionally grouped by
+ listPlace should be preferred.
+
+
+
Peut contenir un texte organisé en paragraphes ou une série d'éléments
+ setting.
+
+
+
段落レベルの散文,または一連の要素settingを含むかもしれない.
+
+
+
+
+
+
The Text Description
+ primary channel
+ 주요 경로
+ 主要途徑
+ canal principal
+ canal principal
+ canale primaio
+ describes the medium or channel by which a text is delivered or
+experienced. For a written text, this might be print, manuscript, email, etc.;
+for a spoken one, radio, telephone, face-to-face, etc.
+ 텍스트가 전달되거나 경험되어지는 매체나 경로를 기술한다. 문어 텍스트의 경우는 인쇄본, 원고, 전자메일 등일 수 있고, 구어 텍스트의 경우는 라디오, 전화, 대면 대화 등이 해당될 수 있다.
+ 描述文本傳達的媒介或途徑。書面文本的途徑可能是印製、手稿、寫本、電子郵件等;口說文本則有廣播、電話、面對面交談等。
+ テキストが収録・伝搬されている媒体を示す.例えば,書かれてあるテキス
+ トであれば,印刷本,原稿,eメールなどで,発話されたテキストであれば,
+ ラジオ,電話,直接会話など.
+ décrit le médium ou le canal par le biais duquel un
+ texte est délivré ou reçu. Pour un texte écrit, cela peut être un imprimé, un manuscrit, un
+ courriel, etc. ; pour un texte parlé, la radio, le téléphone, un face à face, etc.
+ describe el medio o el canal en el que un texto se produce; en el caso de ser un texto escrito podría ser a través de un texto impreso, manuscrito, electrónico, etc.; en el caso de un texto hablado, podría ser a través de la radio, el teléfono, cara a cara, etc.
+ descrive il mezzo o canale attraverso cui un testo è trasmesso o vissuto. Per un testo scritto potrebbe essere stampa, manoscritto, email, ecc.; per un testo parlato potrebbe essere radio, telefono, faccia a faccia, ecc.
+
+
+
+
+
+
+
+
+
+ specifies the mode of this channel with respect to speech and
+ writing.
+ 문어 및 구어와 관련한 경로의 방식을 명시한다.
+ 說明該途徑為口說或書面模式。
+ 発話や書記の伝搬経路の種類を示す.
+ précise le mode de ce canal relatif à l'oral et à l'écrit.
+ especifica el modo del canal respecto al texto hablado y escrito.
+ specifica il modo del canale rispetto a parlato e scritto.
+
+ x
+
+
+ spoken
+ oral
+ parlato
+ hablado
+
+
+ written
+ écrit
+ scritto
+ escrito
+
+
+ spoken to be written
+ 글로 쓰기 위해 말해진
+ oral, destiné à être écrit (par exemple une
+ dictée)
+ parlato per essere scritto
+ hablado para ser escrito (p.ej. dictado)
+ e.g. dictation
+ 예, 받아쓰기
+ 為寫而說 (例如聽寫)
+ p.ej. dictado
+ 発話されたものを書いたもの.例えば書き起こしなど.
+ une dictée par exemple.
+ parlato per essere scritto (ad esempio dettato)
+
+
+ written to be spoken
+ 말하기 위해 글로 쓰인
+ écrit, destiné à l'oral (par exemple un
+ script)
+ scritto per essere parlato
+ escrito para ser hablado (p.ej. guión)
+ e.g. a script
+ 예, 스크립트
+ 為說而寫 (例如稿子)
+ p.ej. un guión
+ 書かれたものを発話したもの.例えば,台本など.
+ un script par exemple.
+ scritto per essere parlato (ad esempio una sceneggiatura)
+
+
+ mixed
+ modes mixtes
+ misto
+ mixto
+
+
+ unknown or inapplicable
+ inconnu ou non applicable
+ sconosciuto o non rilevante
+ desconocido
+
+
+
+
+
+
+ face-to-face conversation
+
+
+
+
+ Conversation face à face
+
+
+
+
+ 面對面交談
+
+
+
+
+
+
+ composition
+ describes the internal composition of a text or text sample,
+for example
+as fragmentary, complete, etc.
+ 예를 들어 미완, 완성 등의 텍스트 또는 텍스트 샘플의 내부적 구성을 기술한다.
+ 描述文本或文本樣本的內部結構,例如零碎的或完整的結構。
+ テキストの内部構造を示す.例えば,部分的,完全など.
+ décrit la composition interne d'un texte ou d'une partie de texte, par exemple : fragmentaire, complet, etc.
+ describe la composición interna de un texto o de un texto de muestra, por ejemplo como fragmentario, completo, etc.
+ descrive la composizione interna di un testo o di un campione di testo, ad esempio frammentario, completo, ecc.
+
+
+
+
+
+
+
+
+
+ specifies how the text was constituted.
+ 텍스트의 구성 방식을 명시한다.
+ 說明文本構成方式。
+ 当該テキストの構成状況を示す.
+ précise comment le texte a été constitué.
+ indica cómo el texto fue constituido
+ specifica come era costituito il testo.
+
+ single
+
+
+ a single complete text
+ 단일 완전 텍스트
+ 單一完整的文本
+ un texto individual completo
+ 完全な1つのテキスト.
+ un texte complet et unique.
+ un unico testo completo
+
+
+ a text made by combining several smaller
+ items, each individually complete
+ 텍스트가 각각 완성된 몇몇의 작은 항목들로 구성되어 있다.
+ 文本由許多小項目所組成,每個個別項目都是完整的
+ un texto compuesto por la combinación de varios elementos más pequeños, cada uno individualmente completo
+ 個々に完全である幾つかのテキストを部分テキストとして構成され
+ ているテキスト.
+ un texte composé de plusieurs petits
+items, individuellement complets.
+ un testo fatto di una serie di più piccole unità bibliografiche, ciscuna individualmente completa
+
+
+ fragments
+ 단편
+ un texte constitué de la combinaison de
+ plusieurs items plus petits, pas nécessairement complets.
+ frammenti
+ un texto construido a partir de la combinación de varios pequeños, no necesariamenteelementos completos.
+ a text made by combining several smaller, not
+ necessarily complete, items
+ 텍스트가 몇몇의 작은 항목으로 구성되어 있으나, 이 항목들은 반드시 완성된 것들은 아니다.
+ 文本由許多小項目所組成,每個項目不一定完整
+ un texto compuesto por la combinación de varios más pequeños, no necesariamente elementos completos
+ 個々には完全である必要はない幾つかのテキストから構成されてい
+ るテキスト.
+ un texte composé de plusieurs petits
+items, chacun d'eux n'étant pas nécessairement complet.
+ un testo fatto di unità bibliografiche più piccole, non necessariamente complete
+
+
+ composition unknown or unspecified
+ 알 수 없거나 명시되지 않은 구성
+ 文本結構未知或未加以說明
+ composición desconocida o inespecificada
+ 構成状況は不明または不定.
+ composition inconnue ou non spécifiée.
+ composizione sconosciuta o non specificata
+
+
+
+
+
+
+ Prologues only.
+
+
+
+
+ Prologues seulement.
+
+
+
+
+ 只有開場白
+
+
+
+
The function of this element seems to overlap with both
+the org attribute on div and the
+samplingDecl
+ in the encodingDesc.
+
+
+
La fonction de cet élément s’applique à la fois à l’attribut org dans
+ l'élément div et à l’élémentsamplingDecl
+ dans l'élément encodingDesc.
+
+
+
+
+
+ dérivation
+ describes the nature and extent of originality of this text.
+ 텍스트의 원본성에 대한 특성과 범위를 기술한다.
+ 描述文本的特性與原創性的程度。
+ 当該テキストの真性度を示す.
+ décrit la nature et le degré d'originalité de ce
+ texte.
+ describe la naturaleza y la originalidad de este texto.
+ descrive la natura ed il grado di originalità del testo.
+
+
+
+
+
+
+
+
+
+ categorizes the derivation of the text.
+ 텍스트의 유래를 범주화한다.
+ 將文本來歷分類。
+ 当該テキストの起源の分類を示す.
+ catégorise la dérivation du texte.
+ caracteriza la derivación del texto
+ classifica la provenienza del testo.
+
+
+
+ text is original
+ 텍스트가 원본이다.
+ 該文本為原創文本
+ el texto es original
+ 当該テキストはオリジナルである.
+
+ le texte est un texte original.
+ il testo è originale
+
+
+ text is a revision of some other text
+ 텍스트가 다른 텍스트의 수정본이다.
+ 該文本為另一文本的修訂版
+ el texto es una revisión de algún otro texto
+ 当該テキストは,他のテキストを元にした改訂である.
+
+ le texte est une révision d'un autre
+texte.
+ il testo è una revisione di qualche altro testo
+
+
+ text is a translation of some other text
+ 텍스트가 다른 텍스트의 번역본이다.
+ 該文本為另一文本的翻譯版
+ el texto es una traducción de algún otro texto
+ 当該テキストは,他のテキストを翻訳したものである.
+
+ le texte est une traduction d'un autre
+texte.
+ il testo è la traduzione di qualche altro testo
+
+
+ text is an abridged version of some other text
+ 텍스가 다른 텍스트의 요약본이다.
+ 該文本為另一文本的刪節版
+ el texto es una versión abreviada de algún otro texto
+ 当該テキストは,他のテキストを簡約したものである.
+
+ le texte est une version abrégée d'un
+autre texte.
+ il testo è una versione ridotta di qualche altro testo
+
+
+ text is plagiarized from some other text
+ 텍스트가 다른 텍스트의 표절본이다.
+ 該文本抄襲自另一文本
+ el texto es un plagio de algún otro texto
+ 当該テキストは,他のテキストを剽窃したものである.
+
+ le texte est un plagiat d'un autre
+texte.
+ il testo è un plagio di qualche altro testo
+
+
+ text has no obvious source but is one of a
+ number derived from some common ancestor
+ 텍스트가 분명한 원본은 없으나, 어떤 공통 텍스트에서 도출된 텍스트들 중 하나이다.
+ 該文本無明確來源,但和其他文本有共同的衍生來歷
+ el texto no tiene ninguna fuente obvia, pero es uno de los derivados de algún antepasado común
+ 当該テキストは,元資料が不明であるが,何かしらを元にたテキス
+ トである.
+
+ le texte n'a pas de source évidente mais
+est l'un des nombreux textes dérivés d'un ancêtre commun.
+ il testo è privo di una specifica fonte, ma è uno dei testi derivati da una fonte comune
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
For derivative texts, details of the ancestor
+may be included in the source description.
+
+
+
Pour les textes dérivés, des détails concernant le texte "ancêtre" peuvent être
+ inclus dans la description de la source.
+
+
+
+ 伝本が依る元資料の詳細は,ヘダー部分の元資料記述に示されかもしれな
+ い.
+
+
+
+
+
+
+ domain of use
+ 사용 영역
+ 應用領域
+ domaine d'usage
+ campo de uso
+ ambito di uso
+ describes the most important social context in which the text was
+realized or for which it is intended, for example private vs. public,
+education, religion, etc.
+ 텍스트가 실현되거나 사용되는 가장 중요한 사회적 맥락을 기술한다. 예를 들어 공적 대 사적, 교육, 종교 등.
+ 描述該文本最重要的應用領域或是社會用途所在,例如私人與公共、教育、宗教等。
+ 当該テキストの出現に関する最も重要な社会的状況を示す.例えば,私的,
+ 公的,教育上,宗教上など.
+ décrit le contexte social principal dans lequel le
+ texte a été réalisé ou pour lequel il est conçu, par exemple : sphère privée ou publique,
+ contexte éducatif, religieux, etc.
+ describle el contexto social más importante en el que el texto fue realizado o para el que se destina, p.ej. privado o público, educacional, religioso, etc.
+ descrive il più importantecontesto sociale nel quale il testo è stato realizzato, ad esempio privato o pubblico, scolastico, religioso, ecc.
+
+
+
+
+
+
+
+
+
+ categorizes the domain of use.
+ 사용 영역을 범주화한다.
+ 將應用領域分類。
+ 当該社会的状況の分類を示す.
+ catégorise le domaine d'usage
+ clasifica el campo de uso.
+ classifica l'ambito di uso.
+
+
+
+ art and entertainment
+ 예술과 연예
+ 藝術和娛樂
+ arte y entretenimiento
+ 芸術,娯楽.
+
+ art et loisirs
+ arte e intrattenimento
+
+
+ domestic and private
+ 가정과 개인
+ 家庭和私人
+ doméstico y privado
+ 家庭内,私的.
+
+ domestique et privé
+ domestico e privato
+
+
+ religious and ceremonial
+ 종교와 의식
+ 宗教和儀式
+ religioso y ceremonial
+ 宗教,儀式.
+
+ religieux et rituel
+ religioso e cerimoniale
+
+
+ business and work place
+ 사업과 사무 공간
+ 商業和工作場所
+ negocio y lugar de trabajo
+ 仕事,職場.
+
+ entreprise et lieu de travail
+ lavorativo e di affari
+
+
+ education
+ 교육
+ 教育
+ educación
+ 教育.
+
+ éducation
+ scolastico
+
+
+ government
+ 정부
+ gouvernement
+ governativo
+ gubernamental y legal
+ government and law
+ 정부와 법률
+ 政府和法律
+ gobierno y ley
+ 政府,法律.
+
+ gouvernement et loi
+ governativo e legislativo
+
+
+ other forms of public context
+ 공적 맥락의 기타 형식
+ 其他公共領域
+ otras formas de contexto público
+ その他の公的なもの.
+
+ autres formes de contexte public
+ altre forme di contesto pubblico
+
+
+
+
+
+
+
+ religious broadcast
+
+
+
+
+
+ Émission religieuse
+
+
+
+
+
+ 宗教廣播
+
+
+
+
Usually empty, unless some further clarification of the type
+attribute is needed, in which case it may contain running
+prose.
+
The list presented here is primarily for illustrative
+purposes.
+
+
+
Habituellement vide, sauf si une clarification complémentaire sur le
+ type de l’attribut est nécessaire : dans ce cas il peut contenir du texte non
+ structuré.
+
La liste est présentée ici dans un but d’illustration.
+
+
+
+
+
+ degré de réalité
+ describes the extent to which the text may be regarded as
+imaginative or non-imaginative, that is, as describing a fictional
+or a non-fictional world.
+ 텍스트가 상상적 또는 비상상적, 즉, 허구적 또는 사실적 세계를 기술하는 것으로 간주될 수 있는 범위를 기술한다.
+ 描述該文本內容可能被認定為想像的程度、所描繪的為虛構或真實的世界。
+ 当該テキストの現実度を示す.例えば,フィクション,ノンフィクションなど.
+ décrit le degré de fiction ou de réalité caractérisant un texte,
+ c'est-à-dire s'il décrit un monde imaginaire ou réel.
+ indica la posibilidad de ver un texto como ficcional o no, es decir atendiendo a si describle un mundo ficticio o no.
+ quantifica quanto il testo possa essere considerato di invenzione o meno, in quanto descrive un mondo immaginato o meno.
+
+
+
+
+
+
+
+
+
+ categorizes the factuality of the text.
+ 텍스트의 사실성을 유형화한다.
+ 將文本的真實性分類。
+ 当該現実度の分類を示す.
+ détermine le caractère factuel ou non du texte.
+ clasifica la objetividad de un texto
+ classifica la fattualità del testo.
+
+
+
+ the text is to be regarded as entirely imaginative
+ 텍스트가 전적으로 상상적이라 간주된다.
+ 文本為完全虛構
+ el texto debe ser considerado como enteramente imaginativo
+ 当該テキストは,想像の産物である.
+
+ le texte est à considérer comme
+purement imaginaire.
+ il testo deve essere considerato interamente fittizio
+
+
+ the text is to be regarded as entirely informative or factual
+ 텍스트가 전적으로 정보적이거나 사실적이라고 간주된다.
+ 文本完全根據事實
+ el texto debe ser considerado como enteramente informativo o efectivo
+ 当該テキストは,事実的なものである.
+
+ le texte est à considérer comme
+entièrement informatif ou basé sur des faits.
+ il testo deve essere considerato interamente informativo e basato su fatti
+
+
+ the text contains a mixture of fact and fiction
+ 텍스트가 사실과 허구의 혼합이다.
+ 文本內容部分虛構、部分根據事實
+ el texto contiene una mezcla de realidad y de ficción
+ 当該テキストは,フィクション,ノンフィクションが混在している.
+
+ le texte contient un mélange de faits
+et de fiction.
+ il testo contiene un misto di fatti e finzione
+
+
+ the fiction/fact distinction is not regarded
+ as helpful or appropriate to this text
+ 사실과 허구의 구별은 이 텍스트에 적절치 않은 것으로 간주된다.
+ 該文本不適宜使用虛構/真實的區分方法
+ la distinción ficción/realidad no se considera útil o apropiada para este texto
+ フィクション,ノンフィクションの区別は問題にならない.
+
+ la distinction entre faits et fiction
+n'est pas considérée comme utile ou appropriée pour ce texte.
+ la distinzione fittivo reale non è considerata utile o appropriata per il testo
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ contient un ensemble de bavardages et de spéculations sur des
+ personnes et des événements réels.
+
+
+
+
+
+
+
+
+
+
+ 結合文言文與白話文
+
+
+
+
+ contains a mixture of gossip and
+ speculation about real people and events
+
+
+
+
Usually empty, unless some further clarification of the type
+attribute is needed, in which case it may contain running prose
+
For many literary texts, a simple binary opposition between
+ fiction
+and fact is naïve in the extreme; this parameter is not intended
+for purposes of subtle literary analysis, but as a simple means of
+characterizing the claimed fictiveness of a given text. No claim is made
+that works characterized as fact are in any sense true.
+
+
+
Habituellement vide, sauf si une clarification complémentaire sur le
+ type de l’attribut est nécessaire : dans ce cas il peut contenir du texte non
+ structuré.
+
Dans de nombreux de textes littéraires, une opposition binaire entre fiction et
+ faits est extrêmement naïve ; ce paramètre n'est pas adapté
+ à des fins d’une analyse littéraire fine, mais comme simple moyen de caractériser
+ le degré de fiction d'un texte. Il n'est pas obligatoire que
+ des oeuvres décrites comme faits soient nécessairement vraies.
+
+
+
+
+
+ interaction
+ describes the extent, cardinality and nature of any interaction
+among those producing and experiencing the text, for example in the
+form of response or interjection, commentary, etc.
+ 예를 들어 대답 또는 감탄, 논평 등의 형식으로 텍스트를 생산하고 경험하는 대상들 사이의 상호작용의 범위, 기준, 그리고 특성을 기술한다.
+ 描述文本創作者與體驗者之間互動關係的規範、基數和特性,例如回應或感嘆、評論等。
+ 当該テキストの生成に関わった人たちによる相互作用の程度,濃度,性質を
+ 示す.例えば,応答,合いの手,コメントなど.
+ décrit l'étendue, la cardinalité et la nature de
+ toute interaction entre ceux qui produisent et ceux qui reçoivent le texte, par exemple sous
+ forme d'une réponse ou d'une interjection, d'un commentaire, etc.
+ describe la existencia, localización y naturaleza de cualquier interacción entre los participantes de un texto, por ejemplo en forma de respuesta o interjección, comentario, etc.
+ descrive la natura, la centralità e il grado di ogni interazione fra coloro che producono e coloro che sperimentano il testo, ad esempio sotto forma di risposta intromissione, commento, ecc.
+
+
+
+
+
+
+
+
+
+
+ specifies the degree of interaction between
+ active and passive participants in the text.
+ 텍스트의 능동적 그리고 수동적 참여자들 사이의 상호작용 정도를 명시한다.
+ 說明文本中主動與被動參與者之間的互動程度。
+ 当該テキストにおける参加者間の相互作用の程度を示す.
+ précise le degré d'interaction entre les
+ participants actifs et passifs au sein du texte
+ describe el grado de interacción entre los participantes activos y pasivos en un texto.
+ specifica il grado di interazione tra partecipanti attivi e passivi all'interno del testo.
+
+
+
+ no interaction of any kind, e.g. a monologue
+ 종류의 상호작용이 없다. 예, 독백.
+ 無任何互動,例如獨白
+ no hay ninguna interacción de ningún tipo, p.ej. un monólogo
+ 相互作用ではない.例えば,独白など.
+
+ pas la moindre interaction, un
+monologue par exemple.
+ mancanza di qualsiasi interazione, ad esempio un monologo
+
+
+ some degree of interaction, e.g. a monologue with set responses
+ 어느 정도의 상호작용, 예, 고정된 반응을 유발하는 독백
+ 某種程度上的互動,例如具有背景回應的獨白
+ cierto grado de interacción, p.ej. un monólogo con las respuestas de grupo
+ ある程度の相互作用.例えば,反応する人がいる状況での独白など.
+
+ un certain degré d'interaction, par
+exemple un monologue avec une série de réponses.
+ qualche grado di interazione, ad esempio un monologo con risposte stabilite
+
+
+ complete interaction, e.g. a face to face conversation
+ 완전한 상호작용, 예, 대면 대화
+ 完全性的互動,例如面對面交談
+ interacción completa, p.ej. una conversación cara a cara
+ 完全なる相互作用.例えば,直接対話など.
+
+ une interaction complète, par exemple
+une conversation en tête-à-tête.
+ interazione completa. ad esempio conversazione faccia a faccia
+
+
+ this parameter is inappropriate or inapplicable in this case
+ 이 매개변인은 이 경우에 부적절하거나 적용불가능하다.
+ 這項特性在此不適當或不適用
+ este parámetro es inadecuado o inaplicable en este caso
+ 当該パラメータは,不適切,または使用が相応しくない.
+
+ ce paramètre est inapproprié ou
+inapplicable dans ce cas.
+ il parametro è inappropriato o inapplicabile in questo caso
+
+
+
+
+ specifies the number of active participants
+ (or addressors) producing parts of the text.
+ 텍스트의 일부를 생산하는 능동적 참여자(또는 addressors)의 수를 명시한다.
+ 說明創作文本部份內容的主動參與者 (或傳達者) 的人數。
+ 当該テキストの生成に関わる能動的参加者の人数を示す.
+ précise le nombre de participants actifs (ou
+ émetteurs) qui produisent des parties du texte
+ especifica el número de participantes activos (o emisores) que producen partes del texto.
+ specifica il numero di partecipanti attivi (o addressor) che producono parti del testo.
+
+
+
+ a single addressor
+ 단일 화자
+ 一位傳達者
+ un solo interlocutor
+ 個人の参加者.
+
+ un seul émetteur.
+ un singolo partecipante attivo
+
+
+ many addressors
+ 다수의 화자
+ 多位傳達者
+ muchos interlocutores
+ 複数の参加者.
+
+ plusieurs émetteurs.
+ molti partecipanti attivi
+
+
+ a corporate addressor
+ 집단적 화자
+ 集體傳達者
+ un interlocutor colectivo
+ 団体としての参加者.
+
+ un émetteur collectif.
+ un partecipante attivo collettivo
+
+
+ number of addressors unknown or unspecifiable
+ 미지의 또는 미명시된 화자의 수
+ 傳達人數未知或未指明
+ número de interlocutores desconocidos o inespecificables
+ 参加者は不明または特定不可能.
+
+ un nombre d'émetteurs inconnu ou
+impossible à spécifier.
+ un numero di partecipanti attivi sconosciuto o non specificabile
+
+
+
+
+ specifies the number of passive participants
+ (or addressees) to whom a text is directed
+ or in whose presence it is created or performed.
+ 텍스트가 전달되는 또는 면전에서 생산 또는 수행되는 수동적 참여자(또는 addressees)의 수를 명시한다.
+ 說明文本內容的被動參與者 (或接收者) 的人數,被動參與者即為文本產生或呈現的對象。
+ 当該テキストの生成に関わる受動的参加者の人数を示す.
+ précise le nombre de participants passifs (ou
+ récepteurs) à qui un texte est destiné ou en la présence de qui il est créé
+ ou représenté
+ specifica il numero dei partecipanti o destinatari passivi ai quali il testo è diretto o alla presenza dei quali viene prodotto o recitato
+ especifica el nombre de participantes pasivos (o receptores) a quienes se dirige el texto, o en cuya presencia se creó o representó el texto.
+
+
+
+ text is addressed to the originator e.g. a diary
+ 텍스트가 창작자에게 전달된다. 예, 일기.
+ 文本內容傳遞給原創作者,例如日記
+ el texto se dirige a su creador, p.ej. un diario
+ テキストは作成者に向けられたもの.例えば,日記など.
+
+ le texte est adressé à soi-même, comme
+un journal intime par exemple.
+ il testo è indirizzato a colui chè l'ha prodotto, ad esempio un diario
+
+
+ text is addressed to one other person e.g. a personal letter
+ 텍스트가 다른 한 사람에게 전달된다. 예, 개인적 편지
+ 文本內容傳遞給另一個人,例如私人信件
+ el texto se dirige a cualquier otra persona, p.ej. una carta personal
+ テキストは他の人物に向けられたもの.例えば,個人書簡など.
+
+ le texte est adressé à une seule autre
+personne, comme une lettre personnelle par exemple.
+ il testo è indirizzato ad una sola altra persona, ad esempio una lettera privata
+
+
+ text is addressed to a countable number of others
+ e.g. a conversation in which all participants are identified
+ 텍스트가 셀 수 있을 만큼의 수의 다른 사람들에게 전달된다. 예, 모든 참여자를 일일이 식별할 수 있는 대화
+ 文本內容傳遞給一群人數可計的對象,例如參與者身分皆明確的一場對話
+ el texto se dirige a un número contable de receptores, p.ej. una conversación en la cual se identifiquen todos los participantes
+ テキストは可算のその他のもの.例えば,全参加者が特定できる会
+ 話など.
+ le texte est adressé à un ensemble
+défini de personnes, comme une conversation où tous les participants
+sont identifiés.
+ il testo è indirizzato ad uno specifico numero di persone, ad esempio una conversazione in cui tutti i partecipanti sono identificati
+
+
+ text is addressed to an undefined but fixed
+ number of participants e.g. a lecture
+ 텍스트가 규정할 수 없지만 고정된 수의 참여자들에게 전달된다. 예, 강의
+ 文本內容傳遞給一群身分不明確但人數固定的參與者,例如授課
+ el texto se dirige a un número indefinido pero concreto de participantes, p.ej. una conferencia
+ テキストは人数が特定数である参加者に向けられたもの.例えば,
+ 講義など.
+ le texte est adressé à un ensemble
+indéfini mais limité de personnes, comme une conférence par exemple.
+ il testo è indirizzato ad un numero indefinito, ma limitato di partecipanti, ad esempio una lezione
+
+
+ text is addressed to an undefined and indeterminately
+ large number e.g. a published book
+ 텍스트가 규정할 수 없고 무한한 수의 사람들에게 전달된다. 예, 출판된 책
+ 文本內容傳遞給眾多身分不明確、數量亦不固定的參與者,例如出版的書籍
+ el texto se dirige a un número indefinido e indeterminado de receptores, p.ej. un libro publicado
+ テキストは,その規模が判らない程の多数に向けられたもの.例え
+ ば,出版書籍など.
+ le texte est adressé à un ensemble
+indéfini et illimité de personnes, comme un livre publié par exemple.
+ il testo è indirizzato ad un numero indefinito e indeterminato di destinatari, ad esempio un libro pubblicato.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ degré de préparation
+ describes the extent to which a text may be regarded as
+prepared or spontaneous.
+ 텍스트가 준비된 것 또는 자발적인 것으로 간주될 수 있는지의 범위를 기술한다.
+ 描述文本可能被視為經過準備或自然呈現的程度。
+ テキストが準備されたものか,即興的なものかの程度を示す.
+ décrit le degré de préparation ou de spontanéité d'un
+ texte
+ describe la posibilidad de considerar un texto como preparado o espontáneo.
+ descrive quanto un testo possa essere considerato preparato o spontaneo
+
+
+
+
+
+
+
+
+
+ a keyword characterizing the type of preparedness.
+ 준비성의 유형의 특성을 기술하는 키워드
+ 說明準備程度的類型。
+ 即興度の種類を示すキーワード.
+ un mot clé caractérisant le type de préparation
+ una palabra clave que caracteriza el tipo de preparación.
+ una parola chiava che caratterizza il grado di spontaneità
+
+
+
+ spontaneous or unprepared
+ 자발적 또는 준비되지 않은
+ 自然呈現或未經準備
+ espontáneo o sin preparación
+ 即興または準備されていない.
+ spontané ou non préparé.
+ spontaneo o non preparato
+
+
+ follows a script
+ 스크립트를 따른다.
+ 依照稿子
+ sigue un guión
+ 台本に従う.
+ suit un script.
+ segue un copione
+
+
+ follows a predefined set of conventions
+ 미리 규정된 관례를 따른다.
+ 依照一套事先定義的常規
+ sigue un conjunto predefinido de convenciones
+ 事前の打ち合わせに従う.
+ suit un ensemble de conventions
+prédéfini.
+ segue una serie di convenzioni predefinite
+
+
+ polished or revised before presentation
+ 제시되기 전 다듬거나 수정된
+ 文本呈現前事先經過潤飾或修訂
+ revisado antes de la presentación
+ 事前の準備が練り直しまたは修正されている.
+ affiné ou révisé avant la
+présentation.
+ materiale pulito o revisionato prima della presentazione
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ characterizes a single purpose or communicative function of the
+text.
+ 텍스트의 단일 목적 또는 의사소통 기능의 특성을 기술한다.
+ 描述該文本的一項目的或溝通功能
+ 当該テキストの目的や伝達に関する機能の性質を示す.
+ caractérise une intention ou une fonction de
+ communication uniques du texte.
+ caracteriza una única finalidad o función comunicatica del texto.
+ ndica un singolo scopo o funzione comunicativa del testo.
+
+
+
+
+
+
+
+
+ specifies a particular kind of purpose.
+ 특별한 종류의 목적을 명시한다.
+ 說明一項特定類型的目的。
+ 目的の種類を示す.
+ précise une intention particulière
+ especifica un tipo particular de finalidad
+ specifica un tipo particolare di scopo.
+
+
+
+ didactic, advertising, propaganda, etc.
+ 설교, 광고, 선전 등
+ 教導、廣告、宣傳等
+ didáctico, publicidad, propaganda, etc.
+ 教育,広報,宣伝など.
+ didactique, publicité, propagande,
+etc.
+ didattico pubblicitario, propagandistico, ecc.
+
+
+ self expression, confessional, etc.
+ 자기 표현, 신앙 고백 등
+ 自我表達、自白等
+ expresión de uno mismo, confesonario, etc.
+ 自己表現,独白など.
+ expression personnelle, confessionnel, etc.
+ autobiografico, confessionale, ecc.
+
+
+ convey information, educate, etc.
+ 제보, 교육 등
+ 傳達訊息、教育等
+ informativo, educativo, etc.
+ 情報伝達,教育など.
+ informatif, éducatif,
+etc.
+ informativo, educativo, ecc.
+
+
+ amuse, entertain, etc.
+ 여흥, 오락 등
+ 消遣、娛樂等
+ divertimento, entretenimiento, etc.
+ 娯楽,エンターテイメントなど.
+ amusement, divertissement, etc.
+ di intrattenimento, ricreativo, ecc.
+
+
+
+
+ specifies the extent to which this purpose predominates.
+ 이 목적이 유효한 범위를 명시한다.
+ 說明該目的所佔的重要性程度。
+ 当該目的が及ぶ範囲を示す.
+ précise à quel degré cette intention
+ prédomine.
+ especifica el alcance en que predomina este propósito.
+ specifica il grado in cui lo scopo predomina.
+
+
+
Values should be interpreted as follows.
+ this purpose is predominantthis purpose is intermediatethis purpose is weakextent unknown
+
+
+
+
Ces valeurs peuvent être interprêtées ainsi : ce but est prédominantce but est intermédiairece but est faibledegré inconnu
+
+
+
+
+ 以下の値をとるべきである.
+ 主要.中間.弱い.不明.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Usually empty, unless some further clarification of the type
+attribute is needed, in which case it may contain running prose
+
+
+
Habituellement vide, sauf si une clarification complémentaire sur le
+ type de l'attribut est nécessaire : dans ce cas il peut contenir du texte non
+ structuré.
The Setting Description
+ describes one particular setting in which a language
+ interaction takes place.
+ 언어 상호작용이 발생하는 특정 무대를 기술한다.
+ 描述語言互動發生的一個特定背景。
+ 言語交流が行われたひとつの状況設定を示す.
+ précise un contexte particulier dans lequel a lieu
+ une interaction linguistique.
+ describe una realización particular en la que una interacción lingüística tiene lugar.
+ descrive la particolare ambientazione di una interazione linguistica.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ New York City, US
+ 1989
+ on a park bench
+ feeding birds
+
+
+
+
+
+
+ Clermont-Ferrand
+ Mi-décembre
+ Ceyrat
+ mise en marche de la voiture
+
+
+
+
+
+
+ 台灣,台北
+ 1970
+ -新公園的長凳上
+ 躺臥
+
+
+
+
+
If the who attribute is not supplied, the setting is
+ assumed to be that of all participants in the language
+ interaction.
+
+
+
Si l'attribut who n'est pas fourni, le cadre est celui construit par
+ l’échange entre les interlocuteurs en présence.
+
+
+
+
+
+
+ contains a brief informal description of the kind of
+place concerned, for example: a room, a restaurant, a park bench, etc.
+ 예를 들어 방, 음식점, 공원 벤치 등과 같이 장소의 특성에 관한 간단한 일상적 기술을 포함한다.
+ 包含簡短非正式的文字描述地點的性質,例如房間、餐廳、公園長椅等。
+ 場所の性質を表す簡単な情報を示す.例えば,部屋,レストラン,公園のベ
+ ンチなど.
+ contient une description brève et informelle de la
+ nature d'un lieu, par exemple une pièce, un restaurant, un banc dans un parc, etc.
+ contiene una breve descripción informal del tipo de lugar, p.ej. una habitación, un restaurante, un banco del parque, etc.
+ contiene una breve descrizione informale di un luogo, ad esempio una stanza, un ristorante, una panchina in un parco, ecc.
+
+
+
+
+
+
+
+
+
+ a fashionable restaurant
+
+
+
+
+ Un restaurant à la mode
+
+
+
+
+ 一家時尚的餐館
+
+
+
+
+
+
+ activité
+ contains a brief informal description of what a participant in a
+language interaction is doing other than speaking, if anything.
+ 언어 상호작용 참여자의 발화 외의 다른 행위에 대한 간단한 일상적 기술을 포함한다.
+ 包含簡短非正式的文字,描述一個對話參與者除了說話以外其他可能的動作。
+ 言語交流の参加者が行った発話以外の活動を示す.
+ contient une description brève et informelle de ce
+ que fait, le cas échéant, un participant à une interaction linguistique, en dehors de parler.
+ contiene una breve descripción informal, si cabe, sobre qué está haciendo, además de hablar, un participante en una interacción lingüística.
+ contiene una breve descrizione informale di ciò che sta facendo un partecipante ad una interazione linguistica di diverso dal parlare.
+
+
+
+
+
+
+
+
+
+ driving
+
+
+
+
+ Conduite
+
+
+
+
+ 駕駛
+
+
+
+
For more fine-grained description of participant
+activities during a spoken text, the event element should
+be used.
+
+
+
Pour une description plus fine de toute activité survenant lors d'une communication
+ orale transcrite, utilisez l'élément event.
+
+
+
+ 参加者の行動についてより詳細に記述する場合には,要素event
+ を使用すべきである.
+
+
+
+
+
+
Associating Contextual
+Information with a Text
Combining Corpus and Text Headers
Declarable Elements
Summary
Linguistic Annotation of Corpora
Levels of Analysis
Recommendations for the Encoding of Large Corpora
Module for Language Corpora
+Metadata for Language Corpora
+Corpus texts
+Corpus linguistiques
+文集文本
+Corpus di testiTextos do corporaコーパスモジュール
Linking, Segmentation, and Alignment
Links
Pointers and Links
Using Pointers and Links
Groups of Links
+ lien
+ defines an association or hypertextual link among elements or passages, of some type not more precisely specifiable by other elements.
+ 다른 요소들에 의해 좀 더 명확하게 명시되지 않는 유형의 요소 또는 단락들의 연관 또는 하이퍼텍스트 연결을 정의한다.
+ 定義元素或段落之間的關連或超文字連結,其他元素無法將此連結類型作更詳細說明。
+ 他の要素では上手く示せない,要素や一節間にある関連性やハイパーテキス トリンクを定義する.
+ définit une association ou un lien hypertextuel entre des éléments ou des passages, lien dont le type ne peut être spécifié précisément par d'autres éléments.
+ define una asociación o vínculo hipertextual entre elementos o fragmentos de texto que no es especificable por otros elementos.
+ definisce tra elementi o porzioni di testo un'associazione o legame ipertestuale non meglio specificabile da altri elementi
+
+
+
+
+
+
+
+
+
+
+
+ You must supply at least two values for @target or on
+
+
+
+
+ The state Supreme Court has refused to release Rahway State Prison inmate
+ James Scott on bail.
+ The fighter is serving 30-40 years
+ for a 1975 armed robbery conviction in the penitentiary.
+
+
+
+
+
+
+
+
+
This element should only be used to encode associations not otherwise provided for by more specific elements.
+
The location of this element within a document has no significance, unless it is included within a linkGrp, in which case it may inherit the value of the type attribute from the value given on the linkGrp.
+
+
+
Cet élément n’est utilisé que pour encoder des associations ; il n’est pas préconisé pour d’autres éléments plus spécifiques.
+
L’emplacement de cet élément dans un document n'a aucune signification, à moins qu'il ne soit inclus dans un élément linkGrp ; dans ce cas il peut hériter de la valeur donnée à l’attribut type de l’élément linkGrp .
+
+
+
+
+
+ link group
+ 연결군
+
+ grupo de enlace
+ groupe de liens
+ gruppo di collegamenti
+ defines a collection of associations or hypertextual links.
+ 연관 또는 하이퍼텍스트 연결의 집합을 정의한다.
+ 定義一群關連或超文字連結的集合。
+ 関連性やハイパーテキストリンクの集合を定義する.
+ définit un ensemble d'associations ou de liens hypertextuels.
+ define un conjunto de asociaciones o de vínculos hipertextuales.
+ definisce una raccolta di associazioni o legami ipertestuali
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Longtemps, je me suis couché de bonne heure.
+ Parfois, à peine ma bougie éteinte, mes yeux se fermaient si vite que je n'avais pas le temps de me dire : "Je m'endors."
+
+
+
+
+
+ For a long time I used to go to bed early.
+ Sometimes, when I had put out my candle, my eyes would close so quickly that I had not even time to say "I'm going to sleep."
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Longtemps, je me suis couché de bonne heure.
+ Parfois, à peine ma bougie éteinte, mes yeux se fermaient si vite que
+ je n'avais pas le temps de me dire : "Je m'endors."
+
+
+
+
+ For a long time I used to go to bed early.
+ Sometimes, when I had put out my candle, my eyes would close so quickly
+ that I had not even time to say "I'm going to sleep."
+
May contain one or more link elements only, optionally with interspersed pointer elements.
+
A web or link group is an administrative convenience, which should be used to collect a set of links together for any purpose, not simply to supply a default value for the type attribute.
+
+
+
Ne peut contenir qu’un ou plusieurs éléments link, et éventuellement divers éléments pointeurs.
+
Un groupe de liens facilite les opérations de gestion de ces liens ; on devrait l'utiliser pour regrouper un ensemble de liens dans un but précis, et non pas simplement pour donner une valeur par défaut à l'attribut type.
Blocks, Segments, and Anchors
+ anonymous block
+ 익명 구역
+ 匿名區塊
+ bloc anonyme
+ bloque anónimo
+ blocco anonimo
+ contains any arbitrary component-level unit of text, acting as an anonymous container for phrase or inter level elements analogous to, but without the semantic baggage of, a paragraph.
+ 의미적 부담 없이, 문단과 유사한 구 또는 상호층위 요소에 대한 익명 전달체로 기능하는 임의적 성분-층위 단위를 포함한다.
+ 包含文件中任何隨機組合性層次的單元,匿名收容類似一個段落、但不包含段落語義的字詞或中間層元素。
+ 任意の部分的テキスト単位を示す.特定の意味はなくとも,段落に相当する, 句レベル・挿入レベルの単位として無名単位になる.
+ contient une unité de texte quelconque, de niveau "composant", faisant office de contenant anonyme pour une expression ou des éléments de niveau intermédiaire, analogue à un paragraphe mais sans sa portée sémantique.
+ contiene cualquier unidad textual a nivel de componente que actua como un contenedor anónimo de sintagmas o de elementos de internivel similares al párrafo pero sin la carga semántica de este último.
+ contiene una qualsiasi unità testuale a livello di componente che funge da contenitore anonimo di sintagmi o elementi interlivello simili al paragrafo ma senza il bagaglio semantico di quest'ultimo
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Abstract model violation: ab may not contain paragraphs or other ab elements.
+
+
+
+
+
+
+ Abstract model violation: Lines may not contain higher-level divisions such as p or ab.
+
+
+
+
+
+
+
+ In the beginning God created the heaven and the earth.
+ And the earth was without form, and void; and
+ darkness was upon the face of the deep. And the
+ spirit of God moved upon the face of the waters.
+ And God said, Let there be light: and there was light.
+
+
+
+
+
+
+
The ab element may be used at the encoder's discretion to mark any component-level elements in a text for which no other more specific appropriate markup is defined.
+
+
+
L'élément ab peut être utilisé à la discrétion de l'encodeur pour marquer dans un texte tout élément de niveau composant pour lequel aucune méthode appropriée de balisage plus spécifique n'est définie.
+
+
+
+
+
+ anchor point
+ 앵커 지점
+ 錨點
+ point d'ancrage
+ punto de anclaje
+ punto di ancoraggio
+ attaches an identifier to a point within a text, whether or not it corresponds with a textual element.
+ 텍스트적 요소와의 일치여부와 상관없이 텍스트 내의 특정 지점에 확인소를 부착한다.
+ 在文件中某一位置附上識別符碼,無論該位置是否符合一個文字性元素。
+ テキスト要素であるかどうかに関係なく,テキスト中で,参照先になるIDを 示す.
+ attache un identifiant à un point du texte, que ce point corresponde ou non à un élément textuel.
+ enlanza un indentificador con una posición al interno del texto, independientemente del hecho que esta sea o no a un elemento textual.
+ aggancia un indentificatore a una posizione all'interno del testo indipendentemente dal fatto che questa corrisponda o meno a un elemento testuale
+
+
+
+
+
+
+
+
+
+
+ The anchor is here somewhere.
+ Help me find it.
+
+
+
+
+
+ L'ancre est ici quelque part.
+ Aidez-moi à la trouver.
+
+
+
+
+
+ 此錨點指向這裡
+ 請搜尋此處
+
+
+
+
+
On this element, the global xml:id attribute must be supplied to specify an identifier for the point at which this element occurs within a document. The value used may be chosen freely provided that it is unique within the document and is a syntactically valid name. There is no requirement for values containing numbers to be in sequence.
+
+
+
Il faut donner à cet élément un attribut global xml:id afin de spécifier un identifiant pour le point où l'élément intervient dans un document TEI. La valeur utilisée peut être choisie librement, pourvu qu'elle soit unique dans le document TEI et que le nom soit syntaxiquement valide. Les valeurs contenant des nombres ne doivent pas nécessairement former une séquence.
+
+
+
+
+
+
+ arbitrary segment
+ 임의의 분절
+ 隨機分割
+ segment quelconque
+ segmento arbitrario
+ segmento arbitrario
+ represents any segmentation of text below the chunk level.
+ (다른 분절 요소를 포함하여) 텍스트의 임의의 구-층위 단위를 포함한다.
+ 包含文件中任何隨機字詞層次的單元 (包括其他分割元素)。
+ 任意の句レベルのテキスト単位を示す(要素segを含む).
+ contient une unité de texte quelconque de niveau segment.
+ contiene cualquier unidad textual a nivel sintagmático (inclusive otros elementos de tipo seg.)
+ contiene una qualsiasi unità testuale a livello sintagmatico (ivi compresi altri elementi del tipo seg)
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ When are you leaving?
+ Tomorrow.
+
+
+
+
+ Quand partez-vous ?
+ Demain.
+
+
+
+
+ C' était à Mégara, faubourg de Carthage, dans les jardins d' Hamilcar.
+
+
+
+
+ La magnificence et la galanterie n'ont jamais paru en France avec tant d'éclat que dans les dernières
+ années du règne de Henri second.
+
+
+
+
+
+ 你什麼時候出發?
+ 明天。
+
+
+
+
+
+ 此屬性值表示句首第一個字母大寫
+
+
+
+
+
+
+ 唐太宗李世民, 為唐高祖李淵與竇皇后的次子,是唐朝第二位皇帝。
+ 李承乾為其三子中的長子...
+ 娶長孫氏為妻,長孫皇后是北魏皇族拓跋氏之後...
+
+
+
+
+
+ So father's only glory was the ballfield.
+
+
+
+
+
+ Sigmund, the son of Volsung, was a king in Frankish country.
+ Sinfiotli was the eldest of his sons ...
+ Borghild, Sigmund's wife, had a brother ...
+
+
+
+
+
The seg element may be used at the encoder's discretion to mark any segments of the text of interest for processing. One use of the element is to mark text features for which no appropriate markup is otherwise defined. Another use is to provide an identifier for some segment which is to be pointed at by some other element—i.e. to provide a target, or a part of a target, for a ptr or other similar element.
+
+
+
L'élément seg peut être utilisé à la discrétion de l'encodeur pour baliser tout segment du texte intéressant pour un traitement informatique. L'un des usages de cet élément est d'encoder des caractéristiques textuelles pour lesquelles aucun balisage approprié n'est défini par ailleurs. Un autre usage consiste à fournir un identifiant pour un segment vers lequel pointe un autre élément - c'est-à-dire à fournir une cible, ou une partie de cible, pour un élément ptr ou pour un autre élément similaire.
Placing Synchronous Events in Time
+ indicates a point in time either relative to other elements in the same timeline tag, or absolutely.
+ 동일 시간선상의 태그에서 다른 요소들에 대한 상대적 또는 절대적인 시간 지점을 표시한다.
+ 指出一個時間點,相對或絕對於同一時間進程標籤裡的其他元素。
+ 同じ要素timeline中にある他の要素に対応する時点,または絶対 的な時点を示す.
+ indique un point dans le temps, soit relatif à d'autres éléments de l'élément timeline dans lequel il est contenu, soit dans l'absolu.
+ proporciona una indicación temporal en términos relativos respecto a otros elementos determinados sobre la misma escala temporal, o en términos absolutos.
+ fornisce un'indicazione temporale in termini relativi, rispetto ad altri elementi determinati sulla stessa scala temporale, o in termini assoluti
+
+
+
+
+
+
+
+
+ supplies an absolute value for the time.
+ 시간에 대한 절대값을 제시한다.
+ 提供一個絕對時間值。
+ 当該時点の,絶対時間を示す.
+ contient une valeur temporelle absolue.
+ proporciona un valor temporal absoluto
+ indica un valore temporale assoluto
+
+
+
This attribute should always be specified on a when element which serves as the target for the origin attribute of a timeLine.
+
+
+
Cet attribut est obligatoire pour l'élément when qui est désigné comme cible par l'attribut origin de l'élément timeline.
+
+
+
要素timelineにある属性originの値で指定され た要素で必要となる.
+
+
+
+ specifies the unit of time in which the interval value is expressed, if this is not inherited from the parent timeline.
+ 상위 timeline으로부터 상속받지 않았다면, interval 값이 표현된 시간 단위를 명시한다.
+ 若未由父元素timeLine得到時間單位資訊,則在此指明屬性interval所使用的時間單位。
+ 親要素timeLineから継承されない場合,属性 intervalで示される時間の単位を示す.
+ spécifie l'unité de temps dans laquelle la valeur de l'attribut interval est exprimée, si elle n'est pas héritée de l'élément parent timeLine.
+ especifica la unidad temporal en la que se expresa el valor interval, si este valor no es heredado del padre timeline.
+ specifica l'unità temporale nel quale è espresso l'attributo interval, se questo non è ereditato dal genitore timeline
+
+
+
+
+ days
+ jours
+ giorni
+ días
+
+
+ hours
+ heures
+ ore
+ horas
+
+
+ minutes
+ minutos
+ minuti
+
+
+ seconds
+ secondes
+ secondi
+ segundos
+
+
+ milliseconds
+ millisecondes
+ millesimi di secondo
+ milésimas de segundo
+
+
+
+
+ specifies a time
+ interval either as a number or as one of the keywords defined
+ by the datatype data.interval
+ 시구간의 수치 부분을 명시한다.
+ 指明時間區段中的數值部份
+ 時間幅を数値で示す.
+ spécifie la partie numérique d'un intervalle de temps.
+ especifica los componentes numéricos de un intervalo temporal.
+ indica la componente numerica di un intervallo temporale
+
+
+
+ identifies the reference point for determining the time of the current when element, which is obtained by adding the interval to the time of the reference point.
+ 현재의 when 요소의 시간을 결정하기 위한 참조 지점을 식별하며, 이것은 참조 지점의 시간에 구간을 합하여 구해진다.
+ 指出一個參照點,用以確定現有元素when的時間,可於參照點的時間內加入區段而取得。
+ 当該要素whenの時間となる参照時点を示す.参照時点に時間 幅を足すことで得られる.
+ identifie le point de référence pour déterminer la date ou l'heure de l'élément courant when : cette date ou cette heure s'obtiennent en ajoutant la valeur de l'intervalle à la date du point de référence.
+ identifica el punto de referencia para la determinación del valor temporal del elemento when (cuando) en cuestión, obtenido añadiendo el intervalo al punto de referencia temporal.
+ identifica il punto di riferimento per la determinazione del valore temporale dell'elemento when corrente, ottenuto aggiungendo l'intervallo al punto di riferimento temporale
+
+
+
This attribute should point to another when
+ element in the same timeline. If no value is
+ supplied, and the absolute attribute is also unspecified, then the reference point is understood to be the origin of the enclosing timeline tag.
+
+
+
Si cet attribut est omis, et qu'il n'y a pas d'attribut absolute, le point de référence retenu est alors l'attribut originde l'élément englobant timeline.
On this element, the global xml:id attribute must be supplied to specify an identifier for this point in time. The value used may be chosen freely provided that it is unique within the document and is a syntactically valid name. There is no requirement for values containing numbers to be in sequence.
+
+
+
L'élément when doit avoir un attribut global xml:id pour identifier ce point dans le temps. La valeur utilisée peut être choisie librement, pourvu qu'elle soit unique dans le document et que le nom soit syntaxiquement valide. Les valeurs contenant des nombres ne doivent pas nécessairement former une séquence.
+
+
+
+
+
+ 시간선상
+ 時間進程
+ frise chronologique
+ escala temporal
+ scala temporale
+ provides a set of ordered points in time which can be linked to elements of a spoken text to create a temporal alignment of that text.
+ 해당 텍스트의 시간 정렬을 생성하기 위해 구어 텍스트의 요소들이 연결될 수 있는 시간의 순서로 정렬된 지점의 집합을 제시한다.
+ 提供一組整齊的時間順序點,可與口說文本的元素相連結,以建立該文本的時間組序。
+ 時間的なまとまりを示すために,発話テキストの要素をリンクすることがで きる,時間軸上の順序付き時点の集合を示す.
+ fournit un ensemble de points ordonnés dans le temps qui peuvent être liés à des éléments de la parole transcrite pour créer un alignement temporel de ce texte.
+ indica una serie de puntos ordenados temporalmente los cuales pueden ser enlazados a los elementos de un texto hablado a fin de obtener un alineamiento temporal del texto mismo.
+ indica una serie di punti ordinati temporalmente i quali possono essere collegati agli elementi di un testo parlato al fine di ottenere un allineamento temporale del testo stesso
+
+
+
+
+
+
+
+
+
+
+
+ designates the origin of the timeline, i.e. the time at which it begins.
+ 시간선상의 시작점을 가리킨다, 즉, 시작 시간
+ 標出時間進程的開頭,例如開始時間。
+ 時間軸の起点示す.すなわち,始点の時間.
+ désigne le début de la frise chronologique, c'est-à-dire le moment où elle commence.
+ indica el origen de la escala temporal, es decir, el momento en que inicia.
+ indica l'origine della scala temporale, cioè il momento in cui ha inizio
+
+
+
If this attribute is not supplied, the implication is that
+ the time of origin is not known. If it is supplied, it must
+ point either to one of the when elements in its
+ content, or to another timeline element.
+
+
+
Si cet attribut n'est pas fourni, cela implique que le moment où commence la frise n'est pas connu.
+
+
+
+ specifies the unit of time corresponding to the interval value of the timeline or of its constituent points in time.
+ 시간선상의 interval 값에 일치하는 시간 또는 시간 구성성분 지점의 단위를 명시한다.
+ 指出符合時間進程屬性interval的屬性值或是符合其接續時間點的時間單位。
+ 時間軸を構成する属性intervalの値に対応する,時間単位 を特定する.
+ spécifie l'unité de temps correspondant à la valeur de l'attribut interval de la frise chronologique ou des points temporels qui la constituent.
+ especifica la unidad temporal correspondiente al valor del atributo interval (intervalo) de la escala temporal o de sus puntos constitutivos.
+ specifica l'unità temporale corrispondente al valore dell'attributo interval della scala temporale o dei suoi punti costitutivi
+
+
+
+ days
+ jours
+ giorni
+ días
+
+
+ hours
+ heures
+ ore
+ horas
+
+
+ minutes
+ minutos
+ minuti
+
+
+ seconds
+ secondes
+ secondi
+ segundos
+
+
+ milliseconds
+ millisecondes
+ millesimi di secondo
+ milésimas de segundo
+
+
+
+
+ specifies a time
+ interval either as a positive integral value or using one of a
+ set of predefined codes.
+ 시구간의 수치 비율을 명시한다.
+ 指明時間區段中的數值部份
+ 間隔を表す数値を示す.
+ spécifie la partie numérique d'un intervalle de temps.
+ indica los componentes numéricos de un intervalo de tiempo.
+ indica la componente numerica di un intervallo temporale
+
+
+
The value irregular indicates uncertainty about all the intervals in the timeline; the value regular indicates that all the intervals are evenly spaced, but the size of the intervals is not known; numeric values indicate evenly spaced values of the size specified. If individual points in time in the timeline are given different values for the interval attribute, those values locally override the value given in the timeline.
+
+
+
La valeur irregular indique une incertitude sur tous les intervalles de la frise chronologique ; la valeur regular indique que tous les intervalles sont espacés régulièrement, mais que leur taille est inconnue ; des valeurs numériques indiquent des intervalles régulièrement espacés, de la taille spécifiée. Si on attribue à certains points temporels de la frise chronologique des valeurs différentes pour l'attribut interval, ces valeurs prennent le pas pour ces points sur la valeur donnée dans la frise chronologique.
Aggregation
+ jointure
+ identifies a possibly fragmented segment of text, by pointing at the possibly discontiguous elements which compose it.
+ 텍스트를 구성하고 있는 비연소적 요소를 가리킴으로 텍스트의 파편화된 분절을 식별한다.
+ 標明文本中可能的不完整分割,指向構成此不完整分割的可能不連接元素。
+ バラバラにあるテキスト部分を参照し,ひとつのテキスト部分を指定する.
+ identifie un segment de texte, qui peut être fragmenté, en pointant vers les éléments éventuellement dispersés qui le composent.
+ identifica un segmento o fragmento de texto señalando eventuales elementos no contiguos que lo componen.
+ identifica un segmento o frammento di testo puntando ad eventuali elementi non contigui che lo compongono
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+You must supply at least two values for @target on
+
+
+
+
+
+ specifies the name of an element which this aggregation may be understood to represent.
+ 이 집합체의 표상으로 이해될 수 있는 요소의 이름을 명시한다.
+ 指出一個推斷該元素集合所代表的元素名稱。
+ 当該要素によりまとめられる要素名を示す.
+ spécifie le nom de l'élément que cette agrégation est censée former.
+ indica el nombre del elemento representado por el conjunto de identificadores en cuestión.
+ indica il nome dell'elemento rappresentato dall'insieme di identificatori in questione
+
+
+
+ indicates whether the targets to be joined include the entire element indicated (the entire subtree including its root), or just the children of the target (the branches of the subtree).
+ 결합된 대상이 제시된 전체 요소(그 뿌리를 포함하는 전체 하부수형도) 또는 대상의 자식노드(하부수형도의 가지)의 포함 여부를 제시한다.
+ 指出被連結的目標是否包含所指元素的完整部份 (完整樹狀圖包含根節點) ,或僅包含該目標的子元素 (樹狀分支部份) 。
+ まとめられる対象が,要素全体(すなわち当該要素をルートとする部分 木全体),またはその子要素(すなわち部分木の枝)であるかどうかを示 す.
+ indique si les cibles à réunir incluent l'intégralité de l'élément indiqué (le sous-arbre entier y compris sa racine) ou seulement les enfants de la cible (les branches du sous-arbre).
+ especifica si las metas a enlazar incluyen el elemento entero indicado (el árbol entero con la raíz inclusive) o sólo los elementos que tienen como padre la misma meta (las ramas del árbol).
+ specifica se le destinazioni da collegare includono l'intero elemento indicato (l'intero albero compresa la radice) oppure solo gli elementi che hanno come genitore la stessa destinazione (i rami dell'albero)
+
+ root
+
+
+ the rooted subtrees indicated by the target attribute are joined, each subtree become a child of the virtual element created by the join
+ 대상 속성에 의해 지시된 한 뿌리에 대한 하부수형도가 결합되고, 각 하부수형도는 결합에 의해 생성된 실제 요소의 자식 노드가 된다.
+ 由屬性target所指明、具根節點的樹狀圖彼此連結,每個樹狀圖成為該連結所產生之虛擬元素的子元素。
+ las subárboles arraigados indicados por los atributos target
+ 属性で示された根付き部分木がまとめられ,各部分木は,当該要素 で作られた仮想要素の子となる.
+ les sous-arbres dotés de leur racine qui sont désignés par l'attribut target sont joints ; chaque sous-arbre devient un fils de l'élément virtuel créé par la jointure.
+ gli alberi dotati di radice e indicati dall'attributo delle destinazioni sono collegati e ogni albero diventa un discendente dell'elemento virtuale ottenuto dal collegamento
+
+
+ the children of the subtrees indicated by the target attribute become the children of the virtual element (i.e. the roots of the subtrees are discarded)
+ 대상 속성에 의해 지시된 하부수형도의 자식은 실제 요소의 자식이 된다.(즉, 하부수형도의 뿌리는 없어진다)
+ 由屬性target所指明的樹狀圖的子元素成為虛擬元素的子元素 (例如捨去樹狀圖的根節點) 。
+ los hijos de los sub-árboles indicados por el atributo de los target se inician con los hijos del elemento virtual (es decir, las raíces de los sub-árboles se desechan)
+ 属性で示された部分木の子は,仮想要素の子となる(すなわち,当 該部分木の根は捨てられる.
+ les fils des sous-arbres désignés par l'attribut target deviennent les fils de l'élément virtuel (c'est-à-dire que les racines des sous-arbres disparaissent).
+ i discendenti degli alberi indicati dall'attributo delle destinazioni diventano i discendenti dell'elemento virtuale (cioè vengono rimosse le radici dei vari alberi)
+
+
+
+
+
+
The following example is discussed in section :
+
+
+ Hughie
+
How does it go? da-da-dagets a new frog...
+
+
+
+ Louie
+
+
+ When the old pond
+ ...
+
+
+
+
+ Dewey
+
+ ... It's a new pond.
+
+
+
+
+
+
+
The join element here identifies a linegroup (lg) comprising the three lines indicated by the target attribute. The value root for the scope attribute indicates that the resulting virtual element contains the three l elements linked to at #frog_l1 #frog_l2 #frog_l3, rather than their character data content.
+
+
+
The following example is discussed in section :
+
+
+ Hughie
+
How does it go? da-da-dagets a new frog...
+
+
+
+ Louie
+
+
+ When the old pond
+ ...
+
+
+
+
+ Dewey
+
+ ... It's a new pond.
+
+
+
+
+
+
The join element here identifies a linegroup (lg) comprising the three
+ lines indicated by the target attribute. The value root for
+ thescope attribute indicates that the resulting virtual element contains the
+ three l elements linked to at #frog_l1 #frog_l2 #frog_l3, rather than their
+ character data content.
+
+
+
In this example, the attribute scope is specified with the value of
+ branches to indicate that the virtual list being constructed is to be made by
+ taking the lists indicated by the target attribute of the join element,
+ discarding the list tags which enclose them, and combining the items contained
+ within the lists into a single virtual list:
+
+
Southern dialect (my own variety, at least) has only I done goneI done went whereas Negro Non-Standard basilect has both these and I done go.
+
White Southern dialect also has I've done goneI've done went which, when they occur in Negro dialect, should probably be considered as
+ borrowings from other varieties of English.
In this example, the attribute scope is specified with the value of branches to indicate that the virtual list being constructed is to be made by taking the lists indicated by the target attribute of the join element, discarding the list tags which enclose them, and combining the items contained within the lists into a single virtual list:
+
+
Southern dialect (my own variety, at least) has only I done goneI done went whereas Negro Non-Standard basilect has both these and I done go.
+
White Southern dialect also has I've done goneI've done went which, when they occur in Negro dialect, should probably be considered as borrowings from other varieties of English.
+
+ Sample sentences in Southern speech
+
+
+
+
+
+
+
+ join group
+ 결합군
+ 連結群組
+ groupe de jointures
+ grupo de enlace
+ gruppo di collegamento
+ groups a collection of join elements and possibly pointers.
+ 결합 요소 및 가능한 포인터의 집합군
+ 匯集一群連結元素與可能指標。
+ 要素joinやポインタをまとめる.
+ regroupe une collection d'éléments join ainsi que, éventuellement, des pointeurs.
+ agrupa un conjunto de elementos de enlace a eventuales señalizadores.
+ raggruppa un insieme di elementi di collegamento ed eventuali puntatori
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ supplies the default value for the result on each join included within the group.
+ 이 집합에 모아진 결합 결과를 기술한다.
+ 描述此集合中匯集的連結結果。
+ 当該要素でまとめられた要素joinを示す.
+ décrit le résultat produit par le rassemblement dans cette collection des éléments join.
+ describe el resultado de los enlaces agrupados en tal conjunto.
+ descrive il risultato dei collegamenti raggruppati in tale insieme
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Any number of join or ptr elements.
+
+
+
Un nombre quelconque d'éléments join ou ptr.
+
+
+
任意数の要素joinまたは要素ptr.
+
+
+
+
+
Alternation
+ alternation
+ 교체
+ 替換
+ alternative
+ alternancia
+ alternanza
+ identifies an alternation or a set of choices among elements or passages.
+ 요소나 단락 사이의 교체 또는 선택 집합을 식별한다.
+ 標明一個替換,或是元素或段落之間的一組不同選擇。
+ 要素などが選択的である場合のいち選択肢を示す.
+ identifie une alternative ou un ensemble d'options
+ entre des éléments ou des passages.
+ identifica una alternancia o una serie de elecciones
+ entre los elementos o los pasajes de texto.
+ identifica un'alternanza o una serie di scelte tra gli
+ elementi o le porzioni di testo
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ states whether the alternations gathered in this collection are exclusive or
+ inclusive.
+ 이 집합에 모아진 교체가 배타적인지 또는 총괄적인지를 진술한다.
+ 說明在此集合中的替換物件是唯一的或通用的。
+ 示された選択肢の選択度を示す.
+ établit si les alternatives rassemblées dans
+ cette collection sont exclusives ou non.
+ declara si las alternativas contenidas en el
+ conjunto son exclusivas o inclusivas.
+ dichiara se le alternative contenute
+ nell'insieme sono esclusive o inclusive
+
+
+
+ exclusive
+ 배타적
+ exclusif
+ esclusivo
+ indica que la alternancia es
+ exclusiva, es decir, que aparece sólo una de las posibles alternativas.
+ indicates that the alternation is exclusive, i.e. that at most one of the
+ alternatives occurs.
+ indique que l'alternative est
+ exclusive, c'est-à-dire, qu'une seule des options proposées est possible.
+ 교체가 배타적임을 나타낸다. 즉, 기껏해야 교체 집합 중 하나가
+ 나타난다.
+ 替換物件是唯一的,例如最多只出現一個替換。
+ indica que la alternancia es exclusiva,
+ es decir, que como máximo una de las alternativas ocurre.
+ 高々ひとつしか選択できない.
+ indica che l'alternanza è esclusiva,
+ cioè che compare solo una delle possibili alternative
+
+
+ inclusive
+ 총괄적
+ non exclusif
+ inclusivo
+ inclusivo
+ indicates that the alternation is not exclusive, i.e. that one or more of
+ the alternatives occur.
+ 교체가 배타적이 아님을 나타낸다. 즉, 교체집합 중 하나 이상이
+ 나타난다.
+ 替換物件不是唯一的,例如出現一個或多個替換。
+ indica que la alternancia no es
+ exclusiva, es decir que ocurren una o más de las alternativas.
+ 複数を選択できる.
+ Indique que cette alternative n'est pas
+ exclusive, c'est-à-dire qu'une option au moins est vraie.
+ indica che l'alternanza non è
+ esclusiva, cioè che possono comparire più alternative
+
+
+
+
+ If mode is excl, each weight states the probability that
+ the corresponding alternative occurs. If mode is incl each
+ weight states the probability that the corresponding alternative occurs given that
+ at least one of the other alternatives occurs.
+ mode가 excl이라면, 각 가중치는
+ 대응하는 교체가능성이 발생할 확률을 말한다. mode가 incl이라면, 각 가중치는 적어도 다른 교체가능집합 중
+ 하나가 발생한 상태에서 대응하는 교체가능성이 발생할 확률이다.
+ 若屬性mode的屬性值是excl,則每個weight皆表明相對應替換的可能性。若屬性mode的屬性值是incl,則每個weight皆表明,在至少一個其他替換存在的前提下,相對應替換的可能性
+ 属性modeの値がexclの場合,該当する選択肢 の出現度を示す.
+ 属性modeの値がinclの場合,該当する選択肢の 少なくとも1つが出現する場合の出現度を示す.
+ Si l'attribut mode a la valeur
+ excl, chacune des valeurs de l'attribut weights établit
+ la probabilité que l'option correspondante soit vraie. Si l'attribut mode
+ a la valeur incl, chacune des valeurs de l'attribut weights
+ établit la probabilité que l'option correspondante soit vraie, étant posé qu'au
+ moins une des autres options l'est aussi.
+ si el atributo mode es
+ excl, cada peso representa la probabilidad de que aparezca la
+ alternativa correspondiente; si el atributo mode es incl, cada
+ peso representa la probabilidad de que aparezca la alternativa correspondiente a
+ condición que aparezca al menos otra de las posibles alternativas.
+ se l'attributo mode è
+ excl, ogni peso rappresenta la probabilità che compaia l'alternativa
+ corrispondente; se l'attributo mode è incl ogni peso
+ rappresenta la probabilità che compaia l'alternativa corrispondente a patto che
+ compaia almeno un'altra delle possibili alternative
+
+
+
If mode is excl, the sum of weights must be 1. If
+ mode is incl, the sum of weights must be in the
+ range from 0 to the number of alternants.
+
+
+
Si l'attribut mode a la valeur excl, la somme des poids
+ doit être égale à 1. Si l'attribut mode a la valeur
+ incl, la somme des poids doit se situer entre 0 et le nombre des
+ alternants.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ alternation group
+ 교체군
+ 替換群組
+ groupe d'alternatives
+ grupo de alternancia
+ gruppo di alternanza
+ groups a collection of alt elements and possibly pointers.
+ 교체 요소 및 가능한 포인터의 집합군
+ 匯集一群替換元素和可能指標。
+ 要素altまたはポインタ要素ptrをまとめる.
+ regroupe une collection d'éléments alt et,
+ éventuellement, de pointeurs.
+ agrupa un conjunto de elementos alt y de
+ eventuales indicadores.
+ raggruppa un insieme di elementi alt ed
+ eventuali puntatori
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ states whether the alternations gathered in this collection are exclusive or
+ inclusive.
+ 이 집합에 모아진 교체의 배타적 또는 총괄적 여부를 진술한다.
+ 說明在此集合中的替換物件是專有的或通用的。
+ 当該要素でまとめられたものの,選択度を示す.
+ établit si les alternatives rassemblées dans
+ cette collection sont exclusives ou non.
+ declara si las alternativas contenidas en el
+ conjunto son exclusivas o inclusivas.
+ dichiara se le alternative contenute
+ nell'insieme sono esclusive o inclusive
+
+ excl
+
+
+ exclusive
+ 배타적
+ exclusif
+ esclusivo
+ indica que la alternancia es
+ exclusiva, es decir, que aparece sólo una de las posibles alternativas.
+ indicates that the alternation is exclusive, i.e. that at most one of the
+ alternatives occurs.
+ 교체가 배타적임을 나타낸다. 즉, 기껏해야 교체집합 중 하나가
+ 발생한다.
+ 替換物件是專有的,例如最多只出現一個替換。
+ indica que la alternancia es exclusiva,
+ es decir aquella en que como máximo unade las alternativas ocurre.
+ 高々ひとつしか選択できない.
+ indique que l'alternative est
+ exclusive, c'est-à-dire qu'une seule des alternatives proposées est
+ possible.
+ indica che l'alternanza è esclusiva,
+ cioè che compare solo una delle possibili alternative
+
+
+ inclusive
+ 총괄적
+ non exclusif
+ inclusivo
+ indica que la alternancia no es
+ exclusiva, es decir, que pueden aparecer una o más de las posibles
+ alternativas.
+ indicates that the alternation is not exclusive, i.e. that one or more of
+ the alternatives occur.
+ 교체가 배타적이 아님을 표시한다. 즉, 교체집합 중 하나 이상이
+ 발생한다.
+ 替換物件不是專有的,例如出現一個或多個替換。
+ indica que la alternancia no es
+ exclusiva, es decir que ocurren una o más de las alternativas.
+ 複数を選択できる.
+ indique que l'alternative n'est pas
+ exclusive, c'est-à-dire qu'une alternative au moins est vraie.
+ indica che l'alternanza non è
+ esclusiva, cioè che possono comparire più alternative
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Any number of alternations, pointers or extended pointers.
+
+
+
Un nombre quelconque d'éléments alternatifs, de pointeurs et de pointeurs
+ étendus.
+
+
+
任意数の選択肢,ポインタ,拡張ポインタを示す.
+
+
+
+
+
Stand-off Markup
Introduction
Overview of XInclude
Stand-off Markup in TEI
Well-formedness and Validity of Stand-off Markup
Including Text or XML Fragments
Connecting Analytic and Textual Markup
Module for Linking, Segmentation, and Alignment
+ Linking, Segmentation, and Alignment
+ Linking, segmentation and alignment
+ Liens, segmentation et alignement
+ Linking, segmentation and alignment連結、分割與隊列
+ Collegamento, segmentazione e allineamentoLigação, segmentação e alinhamentoリンクモジュール
+ provides a set of attributes for hypertextual linking.
+ 하이퍼텍스트와 다른 연결에 대한 속성의 집합을 정의한다. 이것은 연결에 대한 부가적 태그 집합이 선택될 때 모든 요소에 가능해야 한다.
+ 定義一組用於超文字連結及其他連結的屬性,當連結的附加標籤組被選擇時,這些屬性可用於所有元素。
+ リンクに関する付加的タグが使用される場合,全ての要素に付与可能な,リ
+ ンクやハイパーテキストのための属性を定義する.
+ fournit un ensemble d'attributs pour décrire les
+ liens hypertextuels.
+ define un conjunto de atributos para hipertexto u otro vínculo habilitado para todos los elementos cuando se selecciona la etiqueta adicional para los enlaces.
+ definisce un insieme di attributi per ipertesto o altro legame abilitati per tutti gli elementi quando è selezionato il sottoinsieme di marcatori per i collegamenti
+
+
+ corresponds
+ 일치
+ correspondencia
+ correspond
+ corrispondente
+ points to elements that correspond to the current
+ element in some way.
+ 어떤 식으로든 현 요소와 일치하는 요소를 가리킨다.
+ 連結到的元素在某方面符合現有元素。
+ 当該要素と対応する要素を示す.
+ pointe vers des éléments qui ont une
+ correspondance avec l'élément en question.
+ señala los elementos que presentan una correspondencia con el elemento corriente.
+ punta a elementi che hanno una qualche corrispondenza con l'elemento corrente
+
+
+
+
+
+
+
+
+ He Whakamaramatanga mo te Ture Hoko, Riihi hoki, i nga Whenua Maori, 1876.
+
…
+
+
+
+
+
+
+ An Act to regulate the Sale, Letting, and Disposal of Native Lands, 1876.
+
…
+
+
+
+
+
+
In this example a group contains two texts, each containing the same document in a different language. The correspondence is indicated using corresp. The language is indicated using xml:lang, whose value is inherited; both the tag with the corresp and the tag pointed to by the corresp inherit the value from their immediate parent.
+
+
+
+
+
+
+
+
+ London
+ The city of London...
+
+
+
+
+ London
+
+
Allegorical character representing the city of London.
+
+
+
+
+ London’s Genius
+
+
Personification of London’s genius. Appears as an
+ allegorical character in mayoral shows.
+
+
+
+
+
In this example, a place element containing information about the city of
+ London is linked with two person elements in a literary personography.
+ This correspondence represents a slightly looser relationship than the one in the
+ preceding example; there is no sense in which an allegorical character could be
+ substituted for the physical city, or vice versa, but there is obviously a correspondence
+ between them.
+
+
+
+
+
+ synchronous
+ 동시발생
+ sincrónico
+ synchrone
+ sincrono
+ points to elements that are synchronous with the current
+ element.
+ 현 요소와 동시 발생하는 요소를 가리킨다.
+ 連結到的元素和現有元素同時出現。
+ 当該要素と連動する要素を示す.
+ pointe vers des éléments qui sont synchrones avec l'élément en question.
+ señala los elementos que son sincrónicos con el elemento corriente.
+ punta a elementi sincroni rispetto all'elemento corrente
+
+
+
+ points to an element that is the same as the current
+ element.
+ 현 요소와 동일한 요소를 가리킨다.
+ 連結到的元素和現有元素相同。
+ 当該要素と同一の要素を示す.
+ pointe vers un élément identique à l'élément en question.
+ señala el elementos que se corresponde exactamente con el elemento corriente.
+ punta a un elemento che corrisponde esattamente all'elemento corrente
+
+
+
+ points to an element of which the current element is a
+ copy.
+ 현 요소가 그 복사인 요소를 가리킨다.
+ 現有元素為所連結元素的複製本。
+ 当該要素のコピー要素を示す.
+ pointe vers un élément dont l'élément en question
+ est une copie.
+ señala un elemento del que el elemento corriente es una copia.
+ punta a un elemento di cui l'elemento corrente è una copia
+
+
+
Any content of the current element should be ignored. Its
+ true content is that of the element being pointed at.
+
+
+
Tout contenu appartenant à l'élément en cours doit être ignoré. Le vrai
+ contenu est celui de l'élément cible du pointeur.
+
+
+
+ 当該要素の内容は無視されるべき.本当の内容は,参照先の要素の内
+ 容になる.
+
+
+
+
+ points to the next element of a virtual aggregate of which
+ the current element is part.
+ 현 요소가 그 부분인 가상 집합의 다음 요소를 가리킨다.
+ 連結到現有元素所屬虛擬集合中的下一個元素。
+ indica el elemento siguiente de un agregado virtual del cual elemento actual es una parte.
+ 当該要素も所属する仮想集合における次の要素を示す.
+ pointe vers l'élément suivant d'un ensemble
+ virtuel dont l'élément en question est une partie.
+ punta all'elemento
+ seguente all'interno di un aggregazione virtuale di cui l'elemento corrente fa parte
+
+
+
+ previous
+ 이전
+ anterior
+ précédent
+ precedente
+ points to the previous element of a virtual aggregate of
+ which the current element is part.
+ 현 요소가 그 부분인 가상 집합의 이전 요소를 가리킨다.
+ 連結到現有元素所屬虛擬集合中的上一個元素。
+ 当該要素も所属する仮想集合における前の要素を示す.
+ pointe vers l'élément précédent d'un ensemble
+ virtuel auquel appartient l'élément en question.
+ señala al elemento precedente de una adición virtual, de la cual el elemento corriente forma parte.
+ punta all'elemento
+ precedente all'interno di un aggregazione virtuale di cui l'elemento corrente fa parte
+
+
+
+ points to elements that are in exclusive alternation
+ with the current element.
+ 현 요소와 배타적 교체인 요소를 가리킨다.
+ 連結到的元素是現有元素的專有替換元素。
+ 当該要素の代替要素を示す.
+ pointe vers des éléments qui sont une alternative
+ exclusive à l'élément en question.
+ señala los elementos que estan en relación de alternancia exclusiva con el elemento corriente.
+ punta a elementi in relazione di alternanza esclusiva con l'elemento corrente
+
+
+
+ selects one or more alternants; if one alternant is
+ selected, the ambiguity or uncertainty is marked as resolved. If
+ more than one alternant is selected, the degree of ambiguity or
+ uncertainty is marked as reduced by the number of alternants not
+ selected.
+ 하나 이상의 교체형을 선택한다; 만약 하나의 교체형이 선택되면 중의성 또는 불활실성이 해결된 것으로 표시된다. 만약 둘 이상의 교체형이 선택되면, 중의성 또는 불확실성의 정도가, 선택되지 않은 교체형의 수로 감소된 것으로 표시된다.
+ 選擇一個或多個替換;若選擇一個替換,則疑惑或不明確被標記為已解決。若選擇的替換多於一個,則疑惑或不明確的程度因為未選擇的替換而被標記為減低。
+ ひとつ以上の選択肢を選ぶ.ひとつの選択肢が選ばれる場合,その曖昧
+ 度や不確実度が示される.複数の選択肢が選ばれる場合,選ばれなかっ
+ た選択肢の数から還元される,曖昧度や不確実度が示される.
+ sélectionne une ou plusieurs valeurs alternatives
+ ; si une seule valeur est sélectionnée, l'ambiguïté ou l'incertitude est marquée comme
+ résolue. Si plus d'une valeur alternative est sélectionnée, le degré d'ambiguïté ou
+ d'incertitude est marqué comme réduit par le nombre de valeurs alternatives non
+ sélectionnées.
+ selecciona una o más alternativas; si se selecciona una de las alternativas, la ambigüidad o la incerteza se indica como resuelta; si se selecciona más de una alternativa, el grado de ambigüidad o incerteza se indica como reducido del número de las alternativas no seleccionadas.
+ seleziona una o più alternative; se viene selezionata una delle alternative, l'ambiguità o incertezza è indicata come risolta; se viene selezionata più di un'alternativa, il grado di ambiguità o incertezza è indicato come ridotto dal numero delle alternative non selezionate
+
+
+
This attribute should be placed on an element which is
+ superordinate to all of the alternants from which the
+ selection is being made.
+
+
+
Cet attribut doit être placé dans un élément hiérarchiquement supérieur à
+ tous les éléments possibles parmi lesquelles la sélection est faite.
+
+
+
+ 当該属性は,選択対象となる全ての要素の上位に位置する要素に付与
+ されるべきである.
+
+
+
+
+
+
+
+
Simple Analytic Mechanisms
Linguistic Segment Categories
Words and Above
Below the Word Level
+ s-unit
+ s-단위
+ 句子單元
+ phrase
+ oración
+ unità s
+ contains a sentence-like division of a text.
+ 텍스트의 문장에 해당하는 부분을 포함한다.
+ 包含文字中一個句子組成的區段。
+ 文に相当するテキスト単位を示す.
+ contient une division textuelle de type phrase
+ contiene una oración del texto.
+ contiene la divisione del testo del tipo proposizione
+
+
+
+
+
+
+
+
+
+
+
+
+ You may not nest one s element within
+ another: use seg instead
+
+
+
+
+
+ A short affair
+
+ When are you leaving?
+ Tomorrow.
+
+
+
+
+ Quand partez-vous ?
+ Demain.
+
+
+
+
+ 士何事?”
+ 尚志。
+
+
+
+
The s element may be used to mark orthographic sentences, or any other segmentation
+ of a text, provided that the segmentation is end-to-end, complete, and non-nesting. For
+ segmentation which is partial or recursive, the seg should be used instead.
+
The type attribute may be used to indicate the type of segmentation intended,
+ according to any convenient typology.
+
+
+
L'élément s peut être utilisé pour marquer les phrases ou toute autre segmentation
+ existant dans un texte, pourvu que cette segmentation soit présente du début à la fin du
+ texte, complète et sans imbrication. Dans le cas d'une segmentation partielle ou récursive,
+ l'élément seg doit remplacer l'élément s.
+
L'attribut type peut être utilisé pour indiquer le type de segmentation prévue, selon une typologie appropriée.
+
+
+
+
+
+
+ clause
+ 절
+ 子句
+ cláusula
+ frase
+ represents a grammatical clause.
+ 문법적인 절을 표시한다.
+ proposition
+ 表示一個文法上的子句。
+ 言語学上の節を示す.
+ représente une proposition grammaticale
+ representa una cláusula gramatical.
+ rappresnta la frase grammaticale
+
+
+
+
+
+
+
+
+
+
+
+ Which frightened
+ both the heroes so,They quite forgot their quarrel.
+
+
+
+
+
+ Il nous rejoindra dans
+ les joursqui viennent.
+
+
+
+
+
+ 最終他還是原諒了他,那個曾經陷他於不義的人。
+
+
+
+
+
The type attribute may be used to indicate the
+type of clause, taking values such as finite, nonfinite,
+declarative, interrogative, relative
+etc. as appropriate.
+
+
+
L'attribut type peut être utilisé pour indiquer le type de proposition, avec des valeurs telles que subordonnée, infinitive,
+declarative, interrogative, relative etc.
+
+
+
+
+
+ phrase
+ 구
+ 片語
+ syntagme
+ sintagma
+ sintagma
+ represents a grammatical phrase.
+ 문법적 구를 표시한다.
+ 表示一個文法上的片語。
+ 文法上の句を示す.
+ représente un syntagme grammatical
+ representa un sintagma gramatical.
+ rappresenta il sintagma grammaticale
+
+
+
+
+
+
+
+
+
+
+
+ To talk
+ of
+ many things
+
+
+
+
+
+
+ To talk
+ of
+ many things
+
+
+
+
+
+
+ 談 及許多事物
+
+
+
+
+
+
The type attribute may be used to indicate the type of phrase, taking values such
+ as noun, verb, preposition, etc. as appropriate.
+
+
+
L'attribut type peut être utilisé pour indiquer le type de syntagme grammatical,
+ avec des valeurs telles que nom, verbe, préposition, etc. selon le cas.
+
+
+
+
+
+ word
+ 단어
+ 單字
+ mot
+ palabra
+ parola
+ represents a grammatical (not necessarily orthographic) word.
+ 문법적 (반드시 철자상이 아닌) 단어를 표시한다.
+ 表示文法上 (但未必是拼字法上) 定義的單字。
+ 文法上の語を示す(正書形である必要はない).
+ représente un mot grammatical (pas nécessairement
+ orthographique)
+ representa una palabra gramatical(no necesariamente ortográfica)
+ rappresenta la parola grammaticale (non necessariamente in modo ortografico).
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ provides a lemma for the word, such as an uninflected
+ dictionary entry form.
+ 단어의 레마(사전의 표제 형식)를 명시한다.
+ 指出在字典中該字的詞條形式。
+ 当該語の,辞書の見出し形を示す.
+ fournit le lemme du mot (entrée du
+ dictionnaire)
+ identifica el lema de una palabra (forma en que se encuentra como entrada en un diccionario).
+ identifica il lemma (la voce di un dizionario)
+
+
+
+ provides a pointer to a definition of the lemma for the
+ word, for example in an online lexicon.
+
+
+
+
+
+ hitting
+
+
+
+
+
+ nager
+
+
+
+
+
+ hitting
+
+
+
+
+
+
+
+ morpheme
+ 형태소
+ 語素
+ morphème
+ morfema
+ morfema
+ represents a grammatical morpheme.
+ 문법적인 형태소를 표시한다.
+ 表示文法上的語素。
+ 言語学上の形態素を示す.
+ représente un morphème grammatical
+ representa un morfema gramatical.
+ rappresenta il morfema grammaticale
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ supplies the morpheme's base form.
+ 형태소의 기본형을 명시한다.
+ 指出該語素的基本形式。
+ 形態素の基形を示す.
+ identifie la forme de base du morphème
+ identifica la forma base del morfema
+ identifica la forma base del morfema
+
+
+
+
+
+
+
+ com
+ fort
+
+ able
+
+
+
+
+
+
+
+ con
+ fort
+
+ able
+
+
+
+
+
+
+
+ com
+ fort
+
+ able
+
+
+
+
+
The type attribute may be used to indicate the type of morpheme, taking values
+ such as clitic, prefix, stem, etc. as appropriate.
+
+
+
L'attribut type peut être utilisé pour préciser le type de morphème, avec des
+ valeurs telles que clitique, préfixe, stemma, etc. selon le cas.
+
+
+
+
+
+ character
+ 문자(글자)
+ 文字符號
+ caractère
+ carácter
+ carattere
+ represents a character.
+ 문자(글자)를 표시한다.
+ 表示一個文字符號。
+ 文字を示す.
+ représente un caractère
+ representa un carácter gráfico.
+ rappresenta il carattere
+
+
+
+
+
+
+
+
+
+
+
+
+ M
+ O
+ A
+ I
+ doth
+ sway
+ my
+ life
+
+
+
+
+
+ ?
+
+
+
+
+ ?
+
+
+
+
Contains a single character, a g element, or a
+ sequence of graphemes to be treated as a single character. The
+ type attribute is used to indicate the function of this
+ segmentation, taking values such as letter,
+ punctuation, or digit etc.
+
+
+
Contient un seul caractère, un élément g ou une suite de graphèmes à traiter comme
+ un seul caractère. L'attribut type est utilisé pour indiquer la fonction de cette segmentation, avec des valeurs telles que letter,
+ punctuation, ou digit, etc.
+
+
+
+ 文字データ.一文字,または一文字を示すエンティティであるべき.
+
+
+
+
+
+
+ punctuation character
+ contains a character or string of characters regarded as constituting a
+ single punctuation mark.
+ contient un caractère ou une chaîne de caractères considérés comme un signe de ponctuation unique.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ indicates the extent to which this punctuation mark
+ conventionally separates words or phrases
+
+
+
+ the punctuation mark is a word separator
+
+
+ the punctuation mark is not a word separator
+
+
+ the punctuation mark may or may not be a word separator
+
+
+
+
+ provides a name for the kind of unit delimited by this punctuation mark.
+
+
+
+ indicates whether this punctuation mark precedes or
+ follows the unit it delimits.
+
+
+
+
+
+
+ do
+ you
+ understand
+ ?
+
+
+
+
+
+
+
+
Global Attributes for Simple Analyses
+ provides additional global attributes for associating specific analyses or
+interpretations with appropriate portions of a text.
+ 텍스트의 일정한 부분의 특별한 분석 혹은 해석과 관련된 부가적인 전반적 속성들을 제공한다.
+ 提供附加的全域屬性,將特定的分析或詮釋和合宜的文字結合。
+ 任意のテキスト部分への分析・解釈に関連するグローバル属性を示す.
+ fournit des attributs globaux complémentaires pour
+ associer des analyses ou des interprétations spécifiques avec des portions de texte
+ appropriées.
+ proporciona atributos globales adicionales para asociar análisis específicos o interpretaciones con las partes apropiadas de un texto.
+ assegna ulteriori attributi globali per associare specifiche analisi o interpretazioni alle adeguate porzioni di un testo
+
+
+ analysis
+ 분석
+ análisis
+ analyse
+ analisi
+ indicates one or more elements containing interpretations of the
+element on which the ana attribute appears.
+ ana 속성이 나오는 요소들의 해석을 포함하는 하나 혹은 그 이상의 요소들을 가리킨다.
+ 指出一個或多個元素,其中包含帶有屬性ana的元素解釋。
+ 属性anaを伴う要素の解釈を含む要素を示す.
+ indique un ou plusieurs éléments contenant des
+ interprétations de l'élément qui porte l'attribut ana.
+ indica uno o más elementos que contienen interpretaciones del elemento en el cual aparece el atributo ana
+
+ indica uno o più elementi che contengono interpretazioni dell'elemento specificato dall'attributo ana
+
+
+
+
+
+
When multiple values are given, they may reflect either
+multiple divergent interpretations of an ambiguous text, or multiple
+mutually consistent interpretations of the same passage in different
+contexts.
+
+
+
Quand on donne de multiples valeurs, celles-ci peuvent refléter, soit des
+ interprétations multiples et divergentes d'un texte ambigu soit des
+ interprétations multiples et compatibles du même passage dans différents
+ contextes.
Spans and Interpretations
+ associates an interpretative annotation directly with a span of text.
+ 해석적 부호를 텍스트의 일정 부분과 직접적으로 연결시킨다.
+ 將詮釋性註釋直接和一段文字段連結。
+ テキスト部分に解釈的注釈を関連づける.
+ associe une interprétation sous forme d'annotation
+ directement à un passage donné dans un texte.
+ asocia una anotación interpretativa directamente con un
+ periodo de texto.
+ associa direttamente l'annotazione interpretativa ad una
+ prozione di testo
+
+
+
+
+
+
+
+
+
+
+
+
+Only one of the attributes @target and @from may be supplied on
+
+
+
+
+
+
+Only one of the attributes @target and @to may be supplied on
+
+
+
+
+
+
+If @to is supplied on , @from must be supplied as well
+
+
+
+
+
+The attributes @to and @from on may each contain only a single value
+
+
+
+
+ gives the identifier of the node which is the starting point of the span of text being annotated; if not accompanied by a to attribute, gives the identifier of the node of the entire span of text being annotated.
+ 현재 부호를 붙이는 단락의 처음을 명시함; to 속성과 같이 쓰이지 않으면
+ 전체 문단을 명시함.
+ 指出被註解段落的起點;若沒有使用屬性to,則指出全部段落。
+ 当該注釈対象の始点を示す.属性toがない場合は,対象全 体を示す.
+ précise le début du passage sur lequel porte
+ l'annotation ; s'il n'est pas accompagné d'un attribut to, désigne alors
+ l'intégralité du passage
+ especifica el principio del pasaje que se anota; si
+ no aparece con el atributo to, especifica el pasaje entero.
+ indica l'inizio di un brano annotato; se non è
+ accompagnato dall'attributo to indica l'inero brano
+
+
+
+ gives the identifier of the node which is the end-point of the span of text being annotated.
+ 부호를 붙이는 단락의 끝을 명시한다.
+ 指出被註解段落的終點。
+ 注釈対象の終点を示す.
+ spécifie la fin du passage annoté.
+ especifica el final del pasaje que se anota.
+ indica la fine del brano annotato
+
+
+
+
+
+
(The "aftermath" starts here)
+
(The "aftermath" continues here)
+
(The "aftermath" ends in this paragraph)
+
+ aftermath
+
+
+
+
+
(la "conséquence" commence ici)
+
(la "conséquence" continue ici)
+
(la "conséquence" se termine dans ce paragraphe)
+ conséquence
+
+
+
+
+
("結局"從這裡開始)
+
("結局"持續)
+
("結局"結束於此)
+
+ 結局
+
+
+
+
+
+
+ span group
+ 범위 집단
+ 文字段群組
+ groupement de fragments de texte
+ grupo de periodo
+ gruppo di porzioni
+ collects together span tags.
+ 범위 태그를 모아놓는다.
+ 匯集文字段標籤。
+ 要素spanをまとめる.
+ regroupe des éléments span
+
+ Agrupa las etiquetas del periodo
+ raggruppa i marcatori di porzione
+
+
+
+
+
+
+
+
+
+
+
+
+ Can I have ten oranges and a kilo of bananas please?
+ Yes, anything else?
+ No thanks.
+ That'll be dollar forty.
+ Two dollars
+ Sixty, eighty, two dollars.
+ Thank you.
+
+
+ sale request
+ sale compliance
+ sale
+ purchase
+ purchase closure
+
+
+
+
+
+
+
+ interpretation
+ 해석
+ 解釋
+
+ interprétation
+ interpretación
+ interpretazione
+ summarizes a specific interpretative annotation which can be linked to a span of text.
+ 텍스트의 범위에 연결될 수 있는 명시적인 해석적 부호를 요약한다.
+ 標明和某一文字段相連結的特定解釋性註釋。
+ あるテキスト部分とリンクする,特定の解釈的注釈をまとめる.
+ interprétation sous la forme d'une annotation concise,
+ pouvant être liée à un passage dans un texte
+ resume una anotación interpretativa específica que puede
+ ser conectada con un periodo de texto.
+ riassume una specifica annotazione interpretativa che può
+ essere associata ad una porzione di testo
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ aftermath
+
+
+
+
+ conséquence
+
+
+
+
+ 結局
+
+
+
+
Generally, each interp element carries an
+ xml:id attribute. This permits the encoder to
+ explicitly associate the interpretation represented by the content
+ of an interp with any textual element through its
+ ana attribute.
+
Alternatively (or, in addition) an interp may carry an
+ inst attribute which points to one or more textual
+ elements to which the analysis represented by the content of the
+ interp applies.
+
+
+
+
+
+ interpretation group
+ 해석 집단
+ 解釋群組
+
+ groupe d'interprétations
+ grupo de interpretación
+ gruppo di interpretazioni
+ collects together a set of related interpretations which share responsibility or type.
+ 책임성 혹은 유형을 공유하고 있는, 관련된 해석들을 모아놓는다.
+ 匯集一系列具有共同任務或類型的相關解釋。
+ 責任者や分類を共にする,関連し合う解釈をまとめる.
+ regroupe un ensemble d'interprétations ayant en commun
+ une mention de responsabilité ou un type
+ Agrupa un conjunto de interpretaciones relacionadas en
+ base a la responsabilidad o al tipo.
+ raggruppa un insieme di interpretazioni accomunate per
+ responsabilità o tipo
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ basic structural organization
+ introduction
+ conflict
+ climax
+ revenge
+ reconciliation
+ aftermath
+
+
+
+
+
+
+
+
+
+ Organisation structurelle de base
+ introduction
+ conflit
+ apogée
+ vengeance
+ reconciliation
+ conséquence
+
+
+
+
+
+
+ 序
+ 衝突
+ 高潮
+ 復仇
+ 調和
+ 結局
+
+
+
+
+
+
+
+
Any number of interp elements.
+
+
+
Un nombre quelconque d'éléments interp.
+
+
+
任意数の要素interp.
+
+
+
+
+
Linguistic Annotation
Module for Analysis and Interpretation
+Analysis and Interpretation
+Simple analytic mechanisms
+Mécanismes analytiques simples
+簡易分析機制
+Semplici meccanismi di analisiMecanismos simples de análise分析モジュール
Feature Structures
Organization of this Chapter
Elementary Feature Structures and the Binary
+Feature Value
Other Atomic Feature Values
Feature Libraries and Feature-Value Libraries
Feature Structures as Complex Feature Values
Re-entrant Feature Structures
Collections as Complex Feature Values
Feature Value Expressions
Alternation
Negation
Collection of Values
Default Values
Linking Text and Analysis
Feature System Declaration
Linking a TEI Text to Feature System Declarations
The Overall Structure of a Feature System Declaration
+ feature system declaration
+ Déclaration de système de traits (FSD)
+ 자질 체계 선언
+ 功能系統宣告
+ Definition des Merkmalsystems
+ declaración FSD (Declaración del Sistema de Rasgos)
+ dichiarazione su FSD (dichiarazione del sistema di tratti)
+ provides a feature system declaration comprising one or more
+ feature structure declarations or feature structure declaration links.
+ fournit une déclaration du système de traits consistant en une ou plusieurs déclarations de structure de traits ou des liens vers une déclaration de structure de traits.
+ 하나 이상의 자질 구조 선언 또는 자질 구조 선언 연결을 구성하고 있는 자질 체계 선언을 제시한다.
+ 明確指出規範某特定功能結構類型的功能系統宣告。
+ ひとつ以上の素性構造宣言または素性構造宣言へのリンクを含む,素性シス
+ テム宣言を示す.
+ Definition des
+ Merkmalsystems für einen bestimmten Typ von Merkmalstrukturen
+ (feature structure).
+ indica la declaración del sistema de rasgos que contiene definiciones para un tipo particular de estructura de rasgos.
+ identifica la dichiarazione del sistema di tratti che contiene le definifioni di un particolare tipo di struttura di tratti.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ feature structure declaration
+ 자질 구조 선언
+ 功能結構宣告
+ déclaration de structure de traits
+ declaración de estructura de rasgo
+ dichiarazione della struttura di tratti
+ declares one type of feature structure.
+ 하나의 자질 구조 유형을 선언한다.
+ 宣告一種功能結構類型。
+ ひとつの素性構造を宣言する.
+ déclare un type de structure de traits
+ declara un tipo de estructura de rasgo
+ dichiara un tipo di struttura di tratti
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ gives a name for the type of feature structure being declared.
+ 선언되고 있는 자질 구조 유형의 이름을 제시한다.
+ 提供所宣告的功能結構的類型名稱。
+ 宣言された素性構造の名前を示す.
+ attribue un nom au type de structure de traits
+ déclaré.
+ proporciona un nombre para el tipo de estructura de rasgo que está siendo declarada.
+ fornisce il nome per il tipo di struttura di tratti che si sta dichiarando.
+
+
+
+ gives the name of one or more typed feature structures
+ from which this type inherits feature specifications and
+ constraints;
+ if this type includes a feature specification
+ with the same name as that of any of those specified by this
+ attribute, or if more than one specification of the same name
+ is inherited, then the set of possible values is defined by
+ unification. Similarly, the set of constraints applicable is
+ derived by combining those specified explicitly within this
+ element with those implied by the baseTypes
+ attribute. When no baseTypes attribute is specified, no
+ feature specification or constraint is inherited.
+
+ 유형으로부터 상속받은 자질 명세와 제약으로 구성된 하나 이상의 유형화된 자질 구조의 이름을 제시한다; 만약 이 유형이 속성에 의해 명시된 것과 동일한 이름을 갖는 자질 명세를 포함한다면, 또는 동일 이름의 하나 이상의 명세가 상속된다면, 가능한 값의 집합은 통합에 의해 정의된다. 비슷하게 적용가능한 제약 집합이 baseTypes 속성에 의해 지시된 제약을 가진 요소 내에서 명백하게 명시된 제약의 결합에 의해 도출된다. baseTypes이 명시되지 않았다면, 어떤 자질 명세 또는 제약도 상속되지 않는다.
+ 提供一個或多個已分類的功能結構名稱,此類型從該功能結構中獲得功能細節與限制;若該類型包含的功能細節名稱同於此屬性所標明的任一功能細節,或者該類型獲得一個以上同名的功能細節,則所有可能的屬性值是為統一定義。同樣地,適用限制的衍生,是將此元素中所明確標明的和屬性baseTypes所標明的結合。若未使用屬性baseTypes,則沒有獲得任何功能細節或限制。
+ ひとつ以上の素性構造を示す.ここから,属性typeは素性定義・制約を
+ 継承する.属性typeが当該属性で示されたものと同名の素性定義を含む
+ 場合,またはひとつ以上の同名素性定義を継承する場合,それらの値は
+ 統合される.同様に,当該属性baseTypesにある値と,当該
+ 要素が持つ内容を統合して制約となる.属性baseTypesが付
+ 与されていない場合,継承される素性定義や素性制約はない.
+ donne le nom d'une ou plusieurs structures de
+ traits "type", de laquelle ou desquelles il hérite des spécifications et des contraintes de traits. Si
+ ce type inclut une spécification de traits du même nom que l'une de celles spécifiées par
+ cet attribut, ou si plus d'une spécification du même nom est transmise par héritage,
+ l'ensemble des valeurs possibles est définie par unification. De même, l'ensemble des
+ contraintes applicables résulte de la combinaison de celles qui sont spécifiées
+ explicitement à l'intérieur de cet élément et de celles qui découlent de l'attribut
+ baseTypes. Quand aucun attribut baseTypes n'est précisé, aucune
+ spécification de traits ni contrainte n'est transmise par héritage.
+ proporciona el nombre de una o más estructura de rasgo dadas, de las cuales este tipo hereda especificaciones de rasgo y restricciones; si este tipo incluye una especificación de rasgo con el mismo nombre que las especificadas por este atributo, o si más de una especificación con el mismo nombre se hereda, entonces el conjunto de posibles valores se definen por la unión de estas. De la misma manera, el conjunto de restricciones aplicable se deriva de la combinación de las restricciones especificadas explícitamente dentro de este elemento con aquellas referidas por el atributo baseTypes. Cuando no se especifica ningún baseTypes, no se hereda ninguna especificación de rasgo o restricción.
+ fornisce il nome ad una o più tipi di strutture di tratti dai quali il tipo eredita le specifiche e i vincoli dei tratti;
+ se questo tipo include una specifica di tratti con lo stesso nome specificato da questo attributo, o se più di una specifica dello stesso nome è ereditata, allora l'insieme dei possibili valori è definito
+ attraverso l'unificazione. In modo analogo, l'insieme dei vincoli applicabile deriva dalla combinazione di quelli specificati in modo esplicito all'interno dell'elemento con quelli sottintesi dall'attributo baseTypes
+ Se nessun baseTypes è specificato, nessuna specificazione o vincolo di tratti è ereditata.
+
+
+
Inheritance is defined here as a monotonous relation.
+
The process of combining constraints
+ may result in a contradiction, for example if two
+ specifications for the same feature
+ specify disjoint ranges of values, and at least one such
+ specification is mandatory. In such a case, there is
+ no valid representative for the type being defined.
+
+
+
L'héritage est défini ici comme une relation monotone.
+
La combinaison de contraintes peut générer une contradiction, par exemple si
+ deux spécifications données pour le même trait présentent des plages
+ disjointes de valeurs et qu'au moins une de ces spécifications est
+ obligatoire. Dans ce cas, il n'y a pas de représentant valide du type
+ défini.
+
+
+
+
+
+
+ Describes what this type of fs represents
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ feature system description (in FSD)
+ 자질 체계 기술(FSD 에서)
+ 功能系統描述 (在功能結構宣告中)
+ description de système de traits (dans FSD)
+ descripción de sistema de rasgo (en FSD)
+ descrizione del sistema di tratti (in FSD)
+ describes in prose what is represented by the type of feature
+structure declared in the enclosing fsDecl.
+ fsDecl에서 선언된 자질 구조 유형에 의해 표시된 정보를 산문체로 기술한다.
+ 描述在功能結構宣告中宣告的功能結構類型所代表的意義。
+ 要素fsDeclで定義される素性構造の内容を,散文で示す.
+ décrit en texte libre ce que représente le type de
+ structure de traits déclaré dans le fsDecl englobant
+ describe en prosa qué se representa mediante el tipo de estructura de rasgo declarado en la fsDecl.
+ descrive in prosa quello che viene rappresentato dal tipo di struttura dei tratti dichiarati nella fsDecl acclusa.
+
+
+
+
+
+
+
+
+
+ This type of feature structure encodes the features
+ for subject-verb agreement in English
+
+ person (first, second, or third)
+
+
+
+
+
+
+
+
+
+ number (singular or plural)
+
+
+
+
+
+
+
+
+
+
+
+
May contain character data, phrase-level elements, and
+inter-level elements.
+
+
+
+
Peut contenir des caractères, des éléments de niveau expression ou de
+ niveau intermédiaire.
+
+
+
+ 文字列,句レベル要素,挿入レベル要素.
+
+
+
+
+
+
+
+ feature structure declaration link
+ 자질 구조 선언 연결
+ enlace a la declaración de la estructura de rasgos
+ lien vers la déclaration d'une structure de traits
+ collegamento alla dichiarazione della struttura di tratti
+ associates the name of a typed feature structure with a feature
+structure declaration for it.
+ 자질 구조 선언에 유형화된 자질 구조의 이름을 관련시킨다.
+ asocia el nombre de una estructura de rasgos dada con una declaración de la estructura de rasgos para ella.
+
+素性構造宣言により素性構造の名前を示す.
+
+ associe le nom d'une structure de traits "type" à
+sa déclaration de structure de traits.
+ associa il nome di una struttura di tratti alla dichiarazione relativa
+
+
+
+
+
+
+
+
+ identifies the type of feature structure to be documented;
+ this will be the value of the type attribute on at least one
+feature structure.
+ 기록된 자질 구조의 유형을 식별한다; 이것은 적어도 하나 이상의 자질 구조에 대한 유형 값이 될 것이다.
+
+ 解説される素性構造を示す.少なくともひとつの素性構造に関する属性
+ typeの値が付与される.
+
+ identifica il tipo di dichiarazione del sistema di tratti attraverso il FSD, sarà il valore dell'attributo type di almeno una struttura di tratti.
+ identifica el tipo de estructura de rasgos documentada por el FSD; éste será el valor del atributo type al menos en una estructura de rasgos.
+ identifie le type de structure de traits à documenter ; ce sera la valeur de l’attribut type d’au moins une structure de traits.
+
+
+
+ supplies a pointer to a feature structure declaration
+ (fsDecl) element within the current document or elsewhere.
+ 현 문서 내 또는 다른 문서에서 자질 구조 선언 (fsDecl) 요소에 대한 포인터를 제공한다.
+ proporciona un puntero a una declaración de estructura de rasgos (elemento fsDecl) al interno del documento actual u otro.
+
+ 素性構造宣言要素(fsDecl)へのポインタが示される.
+
+ fournit un pointeur vers un élément de
+ déclaration de structure de traits (fsDecl) dans le document courant ou
+ailleurs.
+ fornisce un puntatore che indica l'elemento relativo alla dichiarazione di una struttura di tratti (fsDecl) all'interno del documento corrente o altrove
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Feature Declarations
+ feature declaration
+ 자질 선언
+ 功能宣告
+ déclaration de trait
+ declaración de rasgo
+ dichiarazione di tratti
+ declares a single feature, specifying its name, organization,
+range of allowed values, and optionally its default value.
+ 단일 자질, 자질 이름 명시, 조직, 허용 값의 범위, 그리고 수의적으로 기본 값을 선언한다.
+ 宣告一項功能,指明名稱、機構、有效值範圍、以及依情況提供預設值。
+ ひとつの素性を宣言する.名前,構造,定義域,デフォルト値など.
+ déclare un trait unique, en en précisant le nom,
+ l'organisation, la liste de valeurs autorisées et, éventuellement, la valeur par défaut.
+ declara un único rasgo, indicando su nombre, organización, gama de valores posibles y, opcionalmente, su valor predeterminado.
+ dichiara un singolo tratto, specificandone il nome, l'organizzazione, la gamma di valori permessi, e opzionale il suo valore predefinito.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ a single word which follows the rules defining a
+ legal XML name (see ), indicating the name of the feature being declared; matches the
+name attribute of f elements in the text.
+ 선언되고 있는 자질 이름을 제시한다; 텍스트 내 f 요소의 name 속성과 일치한다.
+ 指出所宣告的功能名稱;並符合文件中元素f的屬性name。
+ 素性の名前を示す.要素fの属性nameと一致する
+ もの.
+ indique le nom du trait déclaré ; correspond à
+ l'attribut name des éléments f du texte.
+ indica el nombre del rasgo que está siendo declarado; combina el atributo name de elementos f en el texto.
+ indica il nome del tratto che si sta dichiarando; corrisponde all'attributo name dell'elemento f nel testo.
+
+
+
+ indicates whether or not the value of this feature may
+ be present.
+ 이 자질 값의 제시 여부를 표시한다.
+ 指出該功能值是否存在。
+ 当該素性値があるかどうかを示す.
+ indique si la valeur de ce trait peut ou non
+ exister
+ indica si el valor del rasgo debe estar presente o no.
+ indica se il valore del tratto possa o meno essere presente
+
+ true
+
+
If a feature is marked as optional, it is possible
+ for it to be omitted from a feature structure. If an
+ obligatory feature is omitted, then it is understood to have a
+ default value, either explicitly declared, or, if no default
+ is supplied, the special value
+any. If an optional feature is omitted, then it is
+ understood to be missing and any possible value (including
+ the default) is ignored.
+
+
+
Si un trait est indiqué comme facultatif, il est possible de l'omettre d'une
+ structure de traits. Si un trait obligatoire est omis, il est alors réputé
+ avoir une valeur par défaut, déclarée explicitement, ou, si aucune valeur
+ par défaut n'est fournie, la valeur spéciale any. Si un trait
+ facultatif est omis, il est réputé manquant et aucune valeur possible n'est
+ prise en compte (y compris celle par défaut).
+
+
+
+
+
+
+
+ inverted sentence
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ feature description (in FSD)
+ 자질 기술(FSD에서)
+ 功能描述 (在功能結構宣告中)
+ description de trait (dans FSD)
+ descripción de rasgo (en FSD)
+ descrifine di tratto (in FSD)
+ describes in prose what is represented by the feature being
+declared and its values.
+ 선언되고 있는 자질과 그 값에 의해 표시된 정보를 산문체로 기술한다.
+ 描述被宣告的功能所代表的意義以及其功能值。
+ 当該素性により示されるものを,散文で示す.
+ décrit en texte libre le trait déclaré et ses
+ valeurs
+ describe en prosa qué respresenta el rasgo que se declara y sus valores.
+ descrive in prosa ciò che è rappresentato dal tratto che si sta dichiarando e dai sui valori.
+
+
+
+
+
+
+
+
+
+ inverted sentence
+
+
+
+
+
+
+
+
+
+
+
+
+
+
May contain character data, phrase-level elements, and
+inter-level elements.
+
+
+
+
Peut contenir des caractères, des éléments de niveau expression ou de
+ niveau intermédiaire.
+
+
+
+ 文字,句レベル要素,挿入レベル要素.
+
+
+
+
+
+
+
+ value range
+ 값의 범위
+ 功能值範圍
+ gamme de valeurs
+ gama de valores
+ gamma di valori
+ defines the range of allowed values for a feature, in the form of
+an fs, vAlt, or primitive value;
+for the value of an f to be valid, it must be
+subsumed by the specified range; if the f
+contains multiple values (as sanctioned by the org attribute),
+then each value must be subsumed by the vRange.
+ fs, vAlt, 원형 값의 형태로 자질에 대해 허용된 값의 범위를 정의한다; 유효한 자질 값의 경우, 명시된 범위 내에서 포섭되어야 한다; 만약 자질이 (org 속성에 의해 확인된) 다중 값을 포함한다면, 각 값은 vRange 내에서 포섭되어야 한다.
+ 定義有效功能值的範圍,使用fs、vAlt、或原始值格式;一個有效的功能值必須包含在指定範圍之內;若f包含多個值 (由屬性org所認可),則每個值皆必須以vRange納入。
+ 要素fs, vAltで示される素性値の範囲を定義する.要素
+ fの妥当な値は,その範囲内になければならない.要素f
+ が複数の値をとる場合(属性orgがそれを認めている時),各値は当該要素
+ vRangeが示す範囲内になければならない.
+ définit la plage de valeurs autorisées pour un
+ trait, sous la forme d'un fs, vAlt, ou d'une valeur primitive ; pour que la valeur d'un élément f
+ soit valide, elle doit être englobée dans la plage spécifiée. Si le f contient des valeurs
+ multiples (comme prévu par l'attribut org), chacune des valeurs doit être englobée dans
+ l'élément vRange.
+ define la gama de valores posibles para un rasgo, en forma de una estructura de rasgo, vAlt, o valor primitivo; para que el valor de un rasgo sea válido, este debe ser incluido en la gama especificada; si el rasgo contiene valores múltiples (como restringidos por el atributo org), entonces cada valor debe ser incluido por el vRange.
+ definisce la gamma di valori ammessi per un tratto, sotto forma di un fs, di un vAlt, o di valore primitivo; affinché il valore di un f sia valido deve essere
+ sussunto dalla gamma specificata; se f contiene valori multipli (come sancito dall'attributo org) allora ogni valore deve essere sussunto da vRange.
+
+
+
+
+
+
+
+
+
+ inverted sentence
+
+
+
+
+
+
+
+
+
+
+
+
+
+
May contain any legal feature-value specification.
+
+
+
+
Peut contenir n'importe quelle spécification trait-valeur admise.
+
+
+
+ 正しい素性値規定を含むかもしれない.
+
+
+
+
+
+
+ value default
+ 기본 값
+ 預設值
+ valeur par défaut
+ valor predeterminado
+ valore predefinito
+ declares the default value to be supplied when a feature structure
+does not contain an instance of f for this name; if
+unconditional, it is specified as one (or, depending on the value of
+the org attribute of the enclosing fDecl) more
+fs elements or primitive values;
+if conditional, it is specified as
+one or more if elements; if no default is specified, or no
+condition matches, the value none is assumed.
+ 자질 구조가 이 이름에 대한 자질의 예를 포함하지 않는다면 제시된 기본값을 선언한다. 조건이 미명시되었을 때 하나 이상의 자질구조 요소 또는 원형 값(또는 fDecl의 org 속성 값의 의존하는 값)으로 명시된다; 만약 조건이 명시될 때, 하나 이상의 요소로 명시된다; 만약 기본 값이 명시되지 않는다면 또는 일치하는 조건이 없다면, none 값이 상정된다.
+ 在功能結構不包含元素f以提供名稱的情況下,宣告使用預設值;若無條件限制,預設值會被指明為一個 (或,取決於所包含的元素fDecl中屬性org的屬性值) 多個元素fs或原始值;若有條件限制,則被指明為一個或多個元素 if;若無任何預設值、或無條件符合,則採用屬性值 none。
+ 素性構造が要素fを持たないときのデフォルト値を宣言する.条件
+ 的でない場合,要素fsまたは値がもうひとつ(または,要素
+ fDeclにある属性orgの値に依存する数だけ)付与される.条件的な
+ 場合,要素であればひとつ以上が付与される.デフォルト値が指定されてい
+ ない場合,または条件が成立しない場合は,値noneをとるする.
+ déclare la valeur par défaut à fournir quand une
+ structure de traits ne contient aucun cas de f pour ce nom ; si elle est inconditionnelle,
+ on l'indique comme un élément fs (ou plusieurs, selon la valeur de l'attribut org du fDecl
+ englobant) ; si elle est conditionnelle, on l'indique comme un ou plusieurs éléments if ; si
+ aucune valeur par défaut n'est précisée ou si aucune condition ne correspond, la valeur nulle
+ est retenue.
+ declara el valor predeterminado que se aplica cuando una estructura de rasgo no contiene un valor de f para este nombre; si es incondicional, se especifica como uno (según el valor del atributo org de la fDecl) o más elementos fs o como valores primitivos; si es condicional, se especifica como uno o más elementos; si no hay un valor predeterminado, o no hay ninguna condición combinada, no se asume ningún valor.
+ dichiara il valore predefinito da fornire quando una struttura di tratti non contiene una occorrenza di f per questo nome; se non condizionato, è specificato come uno o (a seconda del valore
+ dell'attributo org del fDecl accluso) più elementi fs di valori primitivi; se condizionato, è specificato come uno o più elementi if; se non è specificto alcun valore predefinito, o nessuna condizione corrisponde, viene assunto il valore nessuno.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ inverted sentence
+
+
+
+
+
+
+
+
+
+
+
+
+
+
May contain a legal feature value, or a series of if
+elements.
+
+
+
Peut contenir une valeur de trait admise ou une série d'éléments
+ if.
+
+
+
+ 正しい素性値,または一連の要素ifをとる.
+
+
+
+
+
+
+ defines a conditional default value for a feature; the condition
+is specified as a feature structure, and is met if it
+subsumes the feature structure in the text for which a
+default value is sought.
+ 자질에 대한 조건부 기본 값을 정의한다: 조건은 자질구조로 명시되며, 기본 값을 요구하는 텍스트의 자질 구조를 포섭한다면 그 조건은 부합한다.
+ 定義一個功能的條件預設值;該條件被指明為一個功能結構,且若在需要預設值的文本中包含該功能結構時,則表示條件符合。
+ 素性の条件におけるデフォルト値を定義する.当該値には,素性構造が指定
+ される.
+ définit une valeur conditionnelle par défaut pour un
+ trait ; la condition est indiquée comme une structure de traits et remplie si elle
+ englobe la structure de traits dans le texte pour lequel on cherche une valeur par
+ défaut.
+ define un valor predeterminado condicional para un rasgo; la condición se especifica como una estructura de rasgo, y se da si la estructura de rasgo se incluye en el texto para el que un valor predeterminado se ha dado.
+ definisce un valore predefinito condizionato di un tratto; la condizione è specificata come una struttura di tratti e se riscontrata sussume la struttura dei tratti nel testo per il quale si cerca un valore predefinito.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
May contain a feature structure, followed by a feature value;
+the two are separated by a then element.
+
+
+
+
Peut contenir une structure de traits suivie d'une valeur de trait ;
+ les deux sont séparées par un élément then.
+
+
+
+ 素性構造と素性値が示されるかもしれない.この2つの値は,要素
+ thenで分けられる.
+
+
+
+
+
+
+
+ separates the condition from the default in an if, or
+the antecedent and the consequent in a cond element.
+ if의 기본값에서 조건을 분리시키거나 또는 cond 요소의 조건부과 결론부를 분리시킨다.
+ 區分條件和元素if中的預設值,或是區分元素cond中的前提和結果。
+ 要素if中のデフォルト値と条件部,または要素cond中の
+ 前提部と帰結部を区切る.
+ sépare la condition de la valeur par défaut dans un
+ if, ou l'antécédent de la conséquence dans un élément cond
+ separa la condición del valor predeterminado, o el antecedento y el resultante en un elemento cond.
+ separa la condizione dal valore predefinito in un if, o l'antecedente e il successivo in un elemento cond.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
This element is provided primarily to enhance the
+human readability of the feature-system declaration.
+
+
+
Cet élément est fourni essentiellement pour rendre plus lisible par l'homme une
+ déclaration d'un système de traits.
+
+
+
+ 当該要素は,素性システム宣言を人が読みやすくするためのものである.
+
+
+
+
+
+
Feature Structure Constraints
+ feature-structure constraints
+ 자질-구조 제약
+ 功能結構限制
+ contraintes de structure de traits
+ restricciones de la estructura de rasgo.
+ vincoli della struttura di tratti
+ specifies constraints on the content of valid feature
+structures.
+ 유효 자질 구조 내용에 대한 제약을 명시한다.
+ 指出完善功能結構的內容限制。
+ 妥当な素性構造の内容に課す制約を示す.
+ définit les contraintes sur le contenu de structures
+ de traits bien formées
+ especifica restricciones para el contenido de estructuras de rasgo bien formadas.
+ specifica i vincoli sul contenuto delle strutture di tratti ben formate.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
May contain a series of conditional or biconditional elements.
+
+
+
+
Peut contenir une série d'éléments conditionnels ou
+ biconditionnels.
+
+
+
+ 一連の条件,すなわち必要十分条件を示す.
+
+
+
+
+
+
+
+ conditional feature-structure constraint
+ 조건적 자질-구조 제약
+ 條件功能結構限制
+ contrainte conditionnelle de structure de traits
+ restricciones de estructura de rasgo condicional
+ vincolo della struttura di tratti condizionato
+ defines a conditional feature-structure constraint; the consequent
+and the antecedent are specified as feature structures or
+feature-structure collections; the constraint is satisfied if both the
+antecedent and the consequent subsume a given feature
+structure, or if the antecedent does not.
+ 조건적 자질-구조 제약을 정의한다; 후건과 전건은 자질 구조 또는 자질-구조 집합으로 명시된다; 전건과 후건 모두 제시된 자질구조를 포섭하거나 전건이 포섭하지 않는다면 그 제약은 만족된다.
+ 定義一個條件功能結構限制;結果和前提被指明為功能結構或功能結構群組;若前提和結果皆包含一個已知功能結構、或前提不包含,則結果符合需求。
+ 素性構造の条件制約を定義する.前提部と帰結部は,素性構造として定義さ
+ れている.前提部と帰結部が共に真であったとき,または前提部が偽であっ
+ たときに,当該条件節は真となる.
+ définit une contrainte conditionnelle de structure de
+ traits ; la conséquence et l'antécédent sont indiqués comme structures de traits ou comme
+ groupes de structures de traits ; la contrainte est satisfaite si à la fois l'antécédent et
+ la conséquence englobent une structure de traits donnée, ou si l'antécédent ne l'englobe
+ pas
+ define una restricción de estructura de rasgo condicional; el resultante y el antecedente se especifican como estructuras de rasgo o grupos de estructuras de rasgo; la restricción se cumple tanto si tanto el antecedente como el resultante incluyen una estructura de rasgo dada, o si el antecedente no lo hace.
+ definisce un vincolo della struttura di tratti condizionato; il successivo e l'antecedente sono specificati come strutture di tratti o gruppi di strutture di tratti; il vincolo è soddisfatto se entrambi
+ l'antecedente e il successivo sussumono una data struttura di tratti, o se l'antecedente non lo fa..
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
May contain an antecedent feature structure, an empty
+then element, and a consequent feature structure.
+
+
+
+
Peut contenir une structure de traits précédente, un élément vide
+ then et une structure de traits suivante.
+
+
+
+ 内容として,前提部に素性構造,空要素then,帰結部に素性構
+ 造を持つかもしれない.
+
+
+
+
+
+
+
+ bi-conditional feature-structure constraint
+ 이중 조건 자질-구조 제약
+ 雙條件功能結構限制
+ contrainte bi-conditionnelle de structure de traits
+ restricciones de estructura de rasgo bicondicional
+ vincolo di struttura di tratti bi-condizionato
+ defines a biconditional feature-structure constraint; both
+consequent and antecedent are specified as feature structures or groups
+of feature structures; the constraint is satisfied if both
+subsume a given feature structure, or if both do not.
+ 이중 조건 자질-구조 제약을 정의한다; 전건과 후건 모두 자질 구조 또는 자질 구조 집합으로 명시된다; 전건과 후건 모두 주어진 자질 구조를 포섭하거나 둘 다 포섭하지 않는다면 이 제약은 만족된다.
+ 定義一個雙條件功能結構限制;結果和前提被指明為功能結構或功能結構群組;若兩者皆包含一個已知功能結構、或兩者皆不包含,則結果符合需求。
+ 素性構造の制約を必要十分条件として定義する.前提部と帰結部は,素性構
+ 造またはそのグループとして定義される.当該制約は,与えられた2つの素
+ 性構造が共に真であるか,またはともに偽である場合に,真になる.
+ définit une contrainte bi-conditionnelle de structure
+ de traits ; la conséquence et l'antécédent sont tous deux indiqués comme structures de
+ traits ou comme groupes de structures de traits ; la contrainte est satisfaite si chacun des
+ deux englobe une structure de traits donnée, ou si aucun ne le fait
+ define una restricción de estructura de rasgo bicondicional; tanto el resultante como el antecedente se especifican como estructuras de rasgos o grupos de estructuras de rasgos; la restricción se cumple si ambos se dan en la estructura de rasgo o si no se da ninguno de ellos.
+ definisce un vincolo della struttura di tratti bi-condizionato; sia il successivo che l'antecedente sono specificati come strutture di tratti o gruppi di strutture di tratti; il vincolo è soddisfatto se entrambi
+ una data struttura di tratti, o se entrambi non mlo fanno.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ if and only if
+ 필요충분조건
+
+ si y solamente si
+ si et seulement si
+ se e solo se
+ separates the condition from the consequence in a bicond
+element.
+ 이중 조건 요소에서 결론과 조건을 분리한다.
+ 區分條件和元素bicond 裡的結果。
+ 必要十分条件における前提部と帰結部の区切を示す.
+ sépare la condition de la conséquence dans un élément
+ bicond
+ separa la condicion de la consecuencia en un elemento bicond.
+ separa la condizione dal successivo in un elemento bicond.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
This element is provided primarily to enhance the
+human readability of the feature-system declaration.
+
+
+
Cet élément est fourni essentiellement pour rendre plus lisible par l'homme une
+ déclaration d'un système de traits.
+
+
+
+ 当該要素は,素性システム宣言を,人に読みやすくするためのものである.
+
+
+
+
+
+
A Complete Example
Formal Definition and Implementation
+Feature Structures
+Feature structures
+Structures de traits
+功能結構 (Feature Structures)
+Strutture di configurazione (feature structures)Estrutura das características素性構造モジュール
+ feature structure
+ 자질 구조
+ 功能結構
+ structure de traits
+ Estructura de rasgo
+ struttura dei tratti
+ represents a feature structure, that is, a
+ collection of feature-value pairs organized as a
+structural unit.
+ feature structure, 즉, 구조화된 단위로서 구성된 자질-값 쌍의 집합을 표시한다.
+ 表示一個功能結構,即組織為一個結構單元的功能-值配對集合。
+ 素性構造を示す.すなわち,構造単位となる素性名-素性値の
+ 組の集合.
+ représente une structure de traits,
+ c'est-à-dire un ensemble de paires trait-valeur organisé comme une unité structurelle.
+ representa una feature structure (estructura de rasgos), es decir, un conjunto de pares de valores de rasgos organizados como una unidad estructural.
+ rappresenta una feature structure, cioè una raccolta di coppie di valori tratti organizzata come una unità strutturale.
+
+
+
+
+
+
+
+
+
+
+
+
+
+ specifies the type of the feature structure.
+ 자질 구조의 유형을 명시한다.
+ 功能結構的類型。
+ 当該素性構造の種類を示す.
+ spécifie le type de la structure de traits.
+ especifica el tipo de estructura de rasgo.
+ specifica il tipo di struttura dei tratti
+
+
+
+ features
+ 자질
+ características
+ traits
+ tratti
+ references the feature-value specifications making up this feature structure.
+ 자질 구조를 구성하는 자질-값 명세를 참조한다.
+ 參照組成該功能結構的功能值細節。
+ 当該素性構造を構成する素性定義を参照する.
+ référence les spécifications trait-valeur qui
+ caractérisent cette structure de traits.
+ indica las especificaciones de valor de rasgo que constituyen esta estructura de
+rasgo.
+ indica le specifiche del valore dei tratti che formano questa struttura.
+
+
+
May be used either instead of having features as content, or in
+ addition. In the latter case, the features referenced and contained
+ are unified.
+
+
+
Peut être utilisé soit à la place de traits pris comme contenu, soit en plus.
+ Dans ce dernier cas, les traits référencés et contenus sont unifiés.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ feature
+ 자질
+ 功能
+ trait
+ Rasgo
+ un tratto
+ represents a feature value specification, that
+ is, the association of a name with a value of any of several different types.
+ feature value specification, 즉, 이름과 몇 가지 다른 유형의 값을 연결시킨다.
+ 表示一個功能值細節,即一項名稱與任一種不同類型值之間的關連。
+ 素性値定義を示す.すなわち,素性名とその様々な値を示す.
+ représente une spécification
+ trait-valeur, c'est-à-dire l'association d'un nom avec une valeur d’un type quelconque
+ parmi plusieurs.
+ representa una feature value specification (especificación de valor de rasgo), es decir, la asociación de un nombre con un valor de cualquier de los diferentes tipos.
+ rappresenta una feature value specification, cioè l'associazione di un nome con il valore di uno qualsiasi di diversi tratti.
+
+
+
+
+
+
+
+
+
+
+
+
+
+ A feature value cannot contain both text and element content
+
+
+
+
+ A feature value can contain only one child element
+
+
+
+
+ a single word which follows the rules defining a
+ legal XML name (see ), providing a name for the feature.
+ 자질에 대한 이름을 제공한다.
+ 功能名稱
+ 当該素性の名前を示す.
+ donne un nom pour le trait
+ proporciona un nombre para un rasgo.
+ fornisce il nome del tratto.
+
+
+
+ feature value
+ 자질 값
+ valor del rasgo
+ valeur de traits
+ valore del tratto
+ references any element which can be used to represent the
+ value of a feature.
+ 자질의 값을 표시할 수 있는 요소를 참조한다.
+ 參照任何可用來代表功能值的元素。
+ 素性値を表す要素を参照する.
+ référence n'importe quel élément pouvant être
+ utilisé pour représenter la valeur d'un trait.
+ indica cualquier elemento que puede ser usado para representar el valor de un rasgo.
+ indica un qualsiasi elemento che può essere usato come valore di un tratto.
+
+
+
If this attribute is supplied as well as content, the value referenced is to be unified with that contained.
+
+
+
Si cet attribut est fourni en plus d'un contenu, la valeur référencée doit
+ être unifiée avec ce contenu.
If the element is empty then a value must be supplied for the
+fVal attribute. The content of f may also be textual,
+ with the assumption that the data type of the feature value is determined
+ by the schema—this is the approach used in many language-technology-oriented projects and recommendations.
+
+
+
Si l'élément est vide, une valeur doit être fournie pour l'attribut
+ fVal.
+
+
+
+
+
+ binary value
+ 이진 값
+ 二元值
+ valeur binaire
+ valor binario
+ un valore binario
+ represents the value part of a feature-value specification which can contain either
+ of exactly two possible values.
+ 정확히 두 가지 가능한 값 중 하나를 포함할 수 있는 자질-값 명세에서 값의 부분을 표시한다.
+ 表示功能值細節的值部分資訊,可包含確切兩種可能值中的其中一種。
+ 二値として,素性値を示す.
+ représente la partie valeur d'une spécification
+ trait-valeur qui peut contenir l'une ou l'autre des deux valeurs possibles.
+ representa la parte del valor de una especificación de valor de rasgo que puede contener cualquier de los dos valores posibles.
+ rappresenta la parte di valore di una specifica del valore dei tratti che può contenere uno di soltanto due possibili valori.
+
+
+
+
+
+
+
+
+
+
+ supplies a binary value.
+ 이진 값을 제시한다.
+ 提供一個二元值
+ 二値で値を示す.
+ fournit une valeur binaire.
+ proporciona un valor binario
+ fornisce un valore binario.
+
+
This attribute has a datatype of data.truthValue, which
+may be represented by the values 1 or
+ true, or 0 or false.
The value attribute may take any value permitted for
+ attributes of the W3C datatype Boolean: this includes for example
+the strings
+ true or 1 which are
+ equivalent.
+
+
+
L'attribut value peut prendre n'importe quelle valeur acceptée pour les
+ attributs de type booléen dans les recommandations du W3C : cela inclut par exemple
+ les chaînes true ou 1 qui sont équivalentes.
+
+
+
+
+
+ symbolic value
+ 기호 값
+ 符號值
+ valeur symbolique
+ valor simbólico
+ valore simbolico
+ represents the value part of a feature-value specification
+ which contains one of a finite list of symbols.
+ 유한한 목록의 기호 중 하나를 포함하는 자질-값 명세에서 값 부분을 표시한다.
+ 表示功能值細節的值部分資訊,包含限定符號列表中的其中一項。
+ 記号リスト中のいち項目を含む素性値規定のうち,値の部分を示す.
+ représente la partie valeur d'une spécification
+ trait-valeur qui contient un symbole extrait d'une liste finie.
+ representa la parte del valor de una especificación de valor de rasgo que contiene uno de una lista finita de símbolos.
+ rappresenta la parte di valore di una specifica del valore dei tratti che contiene un simbolo da una lista chiusa di simboli.
+
+
+
+
+
+
+
+
+
+
+ supplies a symbolic value for the feature, one of a finite list that
+may be specified in a feature declaration.
+ 자질 선언에서 명시될 수 있는 유한한 목록 중 하나인 자질의 기호 값을 제시한다.
+ 提供功能的符號值,限定符號列表可在功能宣告中指明。
+ 当該組成の記号値を示す.素性宣言のリスト中にあるいち項目になる.
+ donne la valeur symbolique pour le trait,
+ extraite d'une liste finie qui peut être spécifiée dans une déclaration de traits.
+ proporciona el valor simbólico para un rasgo, uno de una lista finita que puede ser especificada en una declaración de rasgo.
+ fornisce il valore simbolico del tratto, un valore da una lista che può essere specigicata in una dichiarazione di tratti.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ numeric value
+ 수치
+ 數值
+ valeur numérique
+ valor numérico
+ un valore numerico
+ represents the value part of a feature-value specification
+ which contains a numeric value or range.
+ 수치 또는 숫자 범위를 포함하는 자질-값 명세에서 값의 부분을 표시한다.
+ 表示功能值細節的值部分資訊,包含一個數值或數值範圍。
+ 素性値定義における値を示す.
+ représente la partie valeur d'une spécification
+ trait-valeur qui contient une valeur ou une série numériques.
+ representa la parte del valor de una especificación de valor de rasgo que contiene un valor numérico o de intervalo.
+ rappresenta la parte di valore di una specifica del valore dei tratti che contiene un valore o una gamma di valori numerici.
+
+
+
+
+
+
+
+
+
+
+ supplies a lower bound for the numeric value represented,
+ and also (if max is not supplied) its upper bound.
+ 표시된 수치의 하한값과 (max이 제시되지 않았다면) 그 상한값을 제시한다.
+ 提供所表示數值的底限,以及 (若無標明max) 其上限。
+ 与えられている数値の下限を示す.または,(属性maxが付
+ 与されていない場合には)値の上限を示す.
+ donne une limite inférieure pour la valeur
+ numérique représentée et aussi (simax n'est pas donné) sa limite supérieure.
+ proporciona el límite inferior para el valor numérico representado, y también (si no se proporciona max) su límite superior.
+ fornisce un limite inferiore al valore numerico rappresentato e anche (qualora l'attributo max (maz) non sia presente) il limite superiore.
+
+
+
+ supplies an upper bound for the numeric value represented.
+ 표시된 수치에 대한 상한값을 제시한다.
+ 提供所表示數值的上限。
+ 与えられている数値の上限を示す.
+ donne une limite supérieure pour la valeur
+ numérique représentée.
+ proporciona el límite superior para el valor numérico representado.
+ fornisce un superiore inferiore al valore numerico rappresentato.
+
+
+
+ specifies whether the value represented should be
+ truncated to give an integer value.
+ 표시된 값이 정수 표현을 위해 끝수를 버린 것인지의 여부를 명시한다.
+ 標明是否應將該數值四捨五入而取得一個整數。
+ 当該数値が整数値へ丸められるかどうかを示す.
+ spécifie si la valeur représentée doit être
+ tronquée pour donner un nombre entier.
+ especifica si el valor representado debe ser truncado para dar un valor entero.
+ indica se il valore rappresentato debba essere troncato per ottenere un numero intero.
+
+
+
+
+
+
+
+
This represents the numeric value 42.
+
+
+
+
+
+
Ceci représente la valeur numérique 42.
+
+
+
+
+
+
Ceci représente n'importe laquelle des neuf valeurs des entiers possibles entre 42 et 50
+ inclus. Si l'attribut trunc avait eu la valeur FALSE, cet exemple aurait
+ représenté n'importe lequel des nombres infinis ayant des valeurs numériques comprises entre
+ 42.45 et 50.0
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
This represents any of the nine possible integer values between 42 and 50
+ inclusive. If the trunc attribute had the value FALSE,
+ this example would represent any of the infinite number of numeric values between 42.45 and
+ 50.0
+
+
+
It is an error to supply the max attribute
+in the absence of a value for the value attribute.
+
+
+
C'est une erreur d'utiliser l'attribut max s'il n'y a pas de valeur pour
+ l'attribut value.
+
+
+
+ 属性valueに値がないところで属性maxがあるとエ
+ ラーになる.
+
+
+
+
+
+
+ string value
+ 문자열 값
+ 字串值
+ valeur de chaîne
+ valor de serie
+ una stringa
+ represents the value part of a feature-value specification
+ which contains a string.
+ 문자열을 포함하는 자질-값 명세에서 값의 부분을 표상한다.
+ 表示功能值細節的值部分資訊,包含一個字串。
+ 素性値規定において,値として文字列をとる値の部分を示す.
+ représente la partie valeur d'une spécification
+ trait-valeur qui contient une chaîne de caractères.
+ representa la parte del valor de una especificación de valor de rasgo que contiene una serie.
+ rappresenta la parte di valore di una specifica del valore dei tratti che contiene una stringa.
+
+
+
+
+
+
+
+
+
+
+
+ Hello, world!
+
+
+
+
+
+
+ Bonjour, le monde !
+
+
+
+
+
+
+ 哈囉,大家好!
+
+
+
+
+
+
+
+ value label
+ 값 표지
+ 值標籤
+ étiquette de valeur
+ etiqueta de valor
+ un'etichetta
+ represents the value part of a feature-value specification
+ which appears at more than one point in a feature structure.
+ 자질 구조에서 하나 이상의 위치에 나타나는 자질-값 명세 중 값의 부분을 표시한다.
+ 表示功能值細節的值部分資訊,這項值部分資訊出現在功能結構中一個以上的位置。
+ 素性構造中,複数箇所に現れる,素性値規定の値の部分を示す.
+ représente la partie valeur d'une spécification
+ trait-valeur qui apparaît en plus d’un point dans une structure de traits.
+ representa la parte del valor de una especificación de valor de rasgo que aparece más de en un punto en una estructura de rasgo.
+ rappresenta la parte di valore di una specifica del valore dei tratti che compare in più di un punto nella struttura dei tratti.
+
+
+
+
+
+
+
+
+
+
+
+ supplies a name
+ identifying the sharing point.
+ 공유 지점의 이름을 제시한다.
+ 提供該共享值的名稱。
+ 共有ポイントの場所を示す.
+ fournit un nom pour le point de partage.
+ proporciona un nombre para un punto de división.
+ fornisce un nome per il punto di condivisione.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ collection of values
+ 값의 집합
+ 值集合
+ collection de valeurs
+ grupo de valores
+ raccolta di valori
+ represents the value part of a feature-value specification
+ which contains multiple values organized as a set, bag, or list.
+ 집합, 다중집합 또는 목록으로 구성된 다중치를 포함하는 자질-값 명세에서 값의 부분을 표시한다.
+ 表示功能值細節的值部分資訊,包含形成一組、群組或一列表的複合值。
+ 素性値規定において,複数の値を,集合,バック,リストなどで表す,値の
+ 部分を示す.
+ représente la partie valeur d'une spécification
+ trait-valeur qui contient des valeurs multiples organisées comme un ensemble, un paquet ou une liste.
+ representa la parte del valor de una especificación de valor de rasgo que contiene valores múltiples organizados como un conjunto, o una lista, etc.
+ rappresenta la parte di valore di una specifica del valore dei tratti che contiene valori multipli organizzati in un insieme, borsa, o lista.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ organization
+ 조직
+ organización
+ organisation
+ organizzazione
+ indicates organization of given value or values as set, bag or list.
+ 집합, 다중집합 또는 목록으로 주어진 값 또는 값들의 조직을 나타낸다.
+ 說明一個或一個以上已知值的組成是一組、群組、或列表。
+ 付与された値,または,集合,バッグ,リストとしてある値の構造を示
+ す.
+ indique l'organisation de la ou des valeurs
+ données sous forme d'ensemble, de paquet ou de liste.
+ indica la organización del valor o valores dados como conjunto o lista.
+ indica il tipo di organizzazione di un dato valore come insieme, borsa o lista.
+
+
+
+ indicates that the given values are organized as a set.
+ 주어진 값이 집합으로 조직된 었음을 나타낸다.
+ 指出已知值是以一組的形式組成。
+ indican que los valores dados están ordenados como un conjunto.
+ 集合(順序なし,重複なし)としてある値を示す.
+ indique que les valeurs données sont
+organisées en ensemble.
+ indica che i valori dati sono organizzati in un insieme.
+
+
+ indicates that the given values are organized as a
+bag (multiset).
+ 주어진 값이 다중집합으로 조직되었음을 나타낸다.
+ 指出已知值是以群組的形式組成。
+ indica que los valores dados están ordenados como una bolsa (conjunto múltiple).
+ バック(順序なし,重複あり)としてある値を示す.
+ indique que les valeurs données sont
+organisées en paquet (de plusieurs ensembles).
+
+ indica che i valori dati sono organizzati in una borsa (insieme multiplo).
+
+
+ indicates that the given values are organized as a
+list.
+ 주어진 값이 목록으로 조직되었음을 나타낸다.
+ 指出已知值是以列表的形式組成。
+ indican que los valores dados están ordenados como una lista.
+ リスト(順序あり,重複あり)としてある値を示す.
+ indique que les valeurs données sont
+organisées en liste.
+ indica che i valori dati sono organizzati secondo una lista.
+
+
+
+
+
+
+
+
+ Jean
+ Luc
+ Godard
+
+
+
+
+
+
+
+
+ Jean
+ Luc
+ Godard
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 楊過
+ 小龍女
+ 李莫愁
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ default feature value
+ 기본 자질 값
+ 預設功能值
+ valeur de trait par défaut
+ valor de rasgo predeterminado.
+ un valore del tratto predefinito
+ represents the value part of a feature-value specification
+ which contains a defaulted value.
+ 기본 값을 포함하는 자질-값 명세에서 값의 부분을 표시한다.
+ 表示功能值細節的值部分資訊,包含一個預設值。
+ 素性値定義の既定値を示す
+ représente la partie valeur d'une spécification
+ trait-valeur contenant une valeur par défaut
+ representa la parte del valor de una especificación de valor de rasgo que contiene un valor predeterminado.
+ rappresenta la parte di valore di una specifica del valore dei tratti che contiene un valore predefinito.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ value alternation
+ 값 교체
+ 替換值
+ valeur alternative
+ alternancia de valor
+ un'alterazione del valore
+ represents the value part of a feature-value specification
+ which contains a set of values, only one of which can be valid.
+ 자질-값 명세의 값 부분으로 값은 집합이다. 그 중 단 하나만 유효한 값이다.
+ 表示功能值細節的值部分資訊,包含一組值,僅其中一個得為有效值。
+ 素性値規定において,妥当なひとつの値を表す,値の部分を示す.
+ représente la partie valeur d'une spécification
+ trait-valeur qui contient un jeu de valeurs, dont une seule peut être valide
+ representa la parte del valor de una especificación de valor de rasgo que contiene un conjunto de valores, de los cuales sólo uno puede ser válido.
+ rappresenta la parte di valore di una specifica del valore dei tratti che contiene un insieme di valori, dei quali uno solo può essere valido.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ value negation
+ 부정 값
+ 矛盾值
+ négation de valeur
+ negación de valor
+ una negazione del valore
+ represents a feature value which is the negation of its content.
+ 그 내용을 부정하는 자질 값을 표시한다.
+ 所表示的功能值和其內容互相矛盾。
+ 当該要素の内容の否定する素性値を示す.
+ représente une valeur de trait qui est la négation de
+ son contenu.
+ representa un valor de rasgo que es la negación de su contenido.
+ rappresenta un valore del tratto che è la negazione del suo contenuto.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ merged collection of values
+ 값의 통합 집합
+ 合併的值集合
+ collection fusionnée de valeurs
+ conjunto fusionado de valores
+ una raccolta unificata di valori
+ represents a feature value which is the result of merging
+ together the feature values contained by its children, using the organization
+ specified by the org attribute.
+ org 속성에 의해 명시된 조직을 사용해서 자식 노드에 포함된 자질 값을 통합한 결과인 자질 값을 표시한다.
+ 所表示的功能值是將子元素中的功能值合併的結果,所使用的組成方法在屬性org中標明。
+ 属性orgで示された構造を使い,子要素が持つ値とマージした結
+ 果得られた素性値を示す.
+ représente une valeur de trait , résultant de la
+ fusion des valeurs de trait contenues dans les éléments enfants, qui utilisent l'agencement
+ indiqué par l'attribut org.
+ representa un valor de rasgo que es el resultado de la fusión de los valores de rasgo
+contenidos por sus hijos, considerando la organización especificada por el atributo de org.
+ rappresenta un volre di un tratto che risulta dalla fusione dei vaolri dei tratti contenuti dai figli, usando l'organizzazione specificata dall'attributo org.
+
+
+
+
+
+
+
+
+
+
+
+ indicates the organization of the resulting merged values as set, bag or list.
+ 집합, 다중집합 또는 목록으로 통합결과 값의 조직을 제시한다.
+ 說明功能值合併的結果是以一組、群組、或列表的方式組成。
+ 構造値をマージした結果の構造を示す.例えば,集合,バック,リスト
+ など.
+ indique l'agencement des valeurs fusionnées
+ résultantes comme un ensemble, un paquet ou une liste.
+ indica que la organización resultante de la fusión de valores se muestra como un conjunto, multiconjunto o como una lista.
+ indica l'organizzazione dei valori risultanti dall'unificazione in un insieme, borsa o lista.
+
+
+
+ indicates that the resulting values are organized as a set.
+ 결과 값이 집합으로 조직되었음을 나타낸다.
+ 指出結果值是以一組的形式組成。
+ indican que los valores resultantes están ordenados como un conjunto.
+ 結果として得られた値の構造が,集合(順序なし,重複なし)である
+ ことを示す.
+ indique que les valeurs résultantes
+sont organisées en ensemble.
+ indica che i valori risultanti dall'unificazione sono organizzati in un inseime.
+
+
+ indicates that the resulting values are organized as a bag (multiset).
+ 결과 값이 다중집합으로 조직되었음을 나타낸다.
+ 指出結果值是以群組的形式組成。
+ indica que los valores resultantes están ordenados como una bolsa (conjunto múltiple).
+ 結果として得られた値の構造が,バック(順序なし,重複あり)であ
+ ることを示す.
+ indique que les valeurs résultantes
+sont organisées en paquet (de plusieurs ensembles).
+
+ indica che i valori risultanti dall'unificazione sono organizzati in una borsa (insieme multiplo).
+
+
+ indicates that the resulting values are organized as a list.
+ 결과 값이 목록으로 조직되었음을 제시한다.
+ 指出結果值是以列表的形式組成。
+ indica que los valores resultantes están ordenados como una lista.
+ 結果として得られた値の構造が,リスト(順序あり,重複あり)であ
+ ることを示す.
+ indique que les valeurs résultantes
+sont organisées en liste.
+ indica che i valori risultanti dall'unificazione sono organizzati secondo una lista.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
This example returns a list, concatenating the indeterminate value
+with the set of values masculine, neuter and feminine.
+
+
+
+
+
+
+
+
+
+
+
+
+
Cet exemple génère une liste, concaténant la valeur indéterminée avec le jeu de valeurs
+ masculines, neutres et féminines.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ feature library
+ 자질 라이브러리
+ 功能存庫
+ bibliothèque de traits
+ biblioteca de rasgos
+ biblioteca dei tratti
+ assembles a library of feature elements.
+ 자질 요소를 하나의 라이브러리에 모아놓는다.
+ 功能元素的集合存庫。
+ 素性に関する要素のライブラリをまとめる.
+ rassemble une bibliothèque de traits
+ agrupa una biblioteca de elementos de rasgo.
+ raccoglie una bilbioteca degli elementi dei tratti.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
The global n attribute may be used to supply an informal
+name to categorize the library's contents.
+
+
+
L'attribut global n peut être utilisé pour fournir un nom informel afin de
+ catégoriser les contenus de la bibliothèque.
+
+
+
+
+
+ feature-value library
+ 자질-값 라이브러리
+ 功能值存庫
+ bibliothèque trait-valeur
+ biblioteca de valores de rasgo
+ una biblioteca dei valori dei tratti
+ assembles a library of reusable feature value elements
+ (including complete feature structures).
+ (완전한 자질구조를 포함하여) 다시 사용할 수 있는 자질 값 요소를 하나의 라이브러리에 모아놓는다.
+ 可重複使用的功能值元素的集合存庫 (包含完整功能結構) 。
+ 再利用が可能な素性値をライブラリとしてまとめる.
+ rassemble une bibliothèque d'éléments trait-valeur
+ réutilisables (y compris des structures de traits complètes).
+ reúne una biblioteca de elementos de valor de rasgo reutilizables (incluyendo estructuras de rasgo completas).
+ raccoglie una biblioteca degli elementi dei valori dei tratti riutilizzabili (incluse le strutture complete dei tratti).
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
A feature value library may include any number
+ of values of any kind, including multiple occurrences of identical
+ values such as <binary value="true"/> or default. The only
+ thing guaranteed unique in a feature value library is the set of
+ labels used to identify the values.
+
+
+
Une bibliothèque de valeurs de trait peut inclure n'importe quel nombre de valeurs
+ quelconques, y compris des occurences multiples de valeurs identiques telles que
+ <binary value="true"/> ou default. La
+ seule chose absolument unique dans une bibliothèque de valeurs de trait est
+ l'ensemble des étiquettes utilisées pour identifier les valeurs.
Graphs and Digraphs
+ graphe
+ encodes a graph, which is a collection of nodes, and arcs which
+connect the nodes.
+ 노드와 이 노드를 연결하는 호로 구성된 그래프를 부호화한다.
+ 標記一個圖形,內含節點與節點之間的連線。
+ グラフを示す.ノードと矢(無向の場合は辺)の集合.
+ encode un graphe, c'est-à-dire un ensemble
+ constitué de nœuds et d'arcs qui les relient entre eux.
+ codifica un gráfico, es decir un conjunto de nodos y arcos que conectan los nodos.
+ codifica un grafo, cioè una raccolta di nodi e archi che collegano i nodi
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ describes the type of graph.
+ 그래프의 유형을 기술한다.
+ 描述圖形類型。
+ 当該グラフの種類を示す.
+ décrit le type de graphe.
+ describe el tipo de gráfico
+ descrive il tipo di grafo
+
+
+
+ undirected graph
+ 무방향 그래프
+ 無方向圖形
+ gráfico no-dirigido
+ 無向グラフ.
+
+ graphe non orienté.
+ grafo non orientato
+
+
+ directed graph
+ 방향 그래프
+ 有方向圖形
+ gráfico dirigido
+ 有向グラフ.
+
+ graphe orienté.
+ grafo orientato
+
+
+ a directed graph with distinguished initial and final nodes
+ 시작과 종료 노드가 구분되는 방향 그래프
+ 清楚標明起始節點與末端節點的有向圖形
+ un gráfico dirigido con los nodos iniciales y finales distinguidos
+ 遷移ネットワーク.初期ノードと最終ノードを分けた有向グラフ.
+
+ un graphe orienté avec un nœud
+ initial et un nœud terminal bien distincts.
+ grafo orientato con nodi finale e iniziale distinti.
+
+
+ a transition network with up to two labels on each arc
+ 각 호에 두 개의 표지를 부착한 전이망
+ 每條連線上最多兩個標籤的過境網絡
+ una red de transición con hasta dos escrituras de la etiqueta en cada arco
+ トランスデューサ.各矢に高々2つのラベルを持つ遷移ネットワーク.
+
+ un réseau de transition avec jusqu'à
+deux étiquettes par arc.
+ rete di transizione con un massimo di due etichette per arco
+
+
+
+
If type is specified as undirected, then the distinction between
+the to and from attributes of the arc tag
+is neutralized. Also, the adj attribute, rather than the
+adjFrom and adjTo attributes, should be used to
+encode pointers to the ends of the arcs. If type is specified as directed
+(or any other value which implies directionality), then the
+adjFrom and adjTo attributes should be used,
+instead of the adj attribute.
+
+
+
Si l'attribut type est spécifié avec une valeur undirected, la distinction entre les attributs to et from de la balise arc est neutralisée. Dans ce cas, l'attribut adj doit également être utilisé pour encoder les pointeurs vers les extrêmités des arcs au lieu des attributs adjFrom et adjTo. Si l'attribut type est spécifié avec une valeur directed (ou toute autre valeur qui implique une orientation), les attributs adjFrom et adjTo doivent être utilisés plutôt que l'attribut adj.
+
+
+
+ states the order of the graph, i.e., the number of its nodes.
+ 그래프의 순서를 진술한다. 즉, 그래프 노드의 번호.
+ 說明圖形次序,例如:節點數目。
+ 当該グラフのオーダー.グラフに含まれるノード数を示す.
+ établit l'ordre du graphe, c'est-à-dire le nombre de ses nœuds.
+ define el orden del gráfico, es decir, el número de sus nodos.
+ definisce l'ordine del grafo, cioè il numero dei suoi nodi
+
+
+
+ states the size of the graph, i.e., the number of its arcs.
+ 그래프의 크기를 진술한다. 즉, 그래프 호의 수.
+ 說明圖形大小,例如:連線數目。
+ 当該グラフのサイズ.グラフに含まれる辺数を示す.
+ établit la taille du graphe, c'est-à-dire le nombre de ses arcs.
+ define la dimensión del gráfico, es decir, el número de sus arcos.
+ definisce la dimensione del grafo, cioè il numero dei suoi archi
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
One
+or more nodes and zero or more arcs in any order.
+
+
+
un ou plusieurs nœuds et zéro, un ou plusieurs arcs dans un ordre quelconque.
+
+
+
+ ひとつ以上のノードと,ゼロ以上の矢(辺).
+
+
+
+
+
+
+ nœud
+ encodes a node, a possibly labeled point in a graph.
+ 그래프에서 (표지가 붙는 지점일 수도 있는) 노드를 부호화한다.
+ 標記一個節點,一個圖形中可能帶有標籤的點。
+ グラフのラベル付きノードを示す.
+ encode un nœud, c'est-à-dire un sommet, étiqueté ou non, dans un graphe.
+ codifica un nodo, un punto en un gráfico al que se le puede proporiconar una etiqueta.
+ codifica un nodo, un punto in un grafo a cui può essere assegnata un'etichetta
+
+
+
+
+
+
+
+
+
+
+
+
+
+ provides the value of a node, which is a feature structure or
+other analytic element.
+ 노드의 값을 제공하며, 이 값은 자질 구조 또는 다른 분석적 요소이다.
+ 提供一個節點值,該節點為一個功能結構或其他分析元素。
+ ノードの値を示す.これは,素性構造または他の分析要素である.
+ fournit l'identifiant de l'objet représenté par le nœud ; cet objet peut être une paire nom-valeur ou tout autre élément analytique.
+ proporciona el valor de un nodo, que puede ser una estructura de rasgos u otro elemento de análisis.
+ assegna al nodo un valore, che può essere una struttura di tratti o altro elemento di analisi
+
+
+
+ provides a type for a node.
+ 노드의 유형을 제공한다.
+ 提供節點類型。
+ ノードの種類を示す.
+ indique le type du nœud.
+ define un tipo de nodo.
+ definisce un tipo di nodo
+
+
+
+ initial node in a transition network
+ 전이망에서 시작 노드
+ 過境網絡中的起始節點
+ nodo inicial en una red de transición
+ 遷移ネットワークの初期ノード.
+ nœud initial dans un réseau de
+transition.
+ nodo iniziale in una rete di transizione
+
+
+ final node in a transition network
+ 전이망에서 종료 노드
+ 過境網絡中的末端節點
+ nodo final en una red de transición
+ 遷移ネットワークの最終ノード.
+ nœud terminal dans un réseau de
+transition.
+ nodo finale in una rete di transizione
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ adjacent to
+ 로 인접한
+ adyacente a
+ adjacent à
+ adiacente a
+ gives the identifiers of the nodes which are adjacent to the current node.
+ 현 노드에 인접한 노드의 확인소를 제시한다.
+ 相鄰至當前節點的節點的識別符碼。
+ 有向グラフにおける,現行ノードに入るノードの識別子を示す.
+ donne les identifiants des nœuds qui précèdent immédiatement le nœud décrit.
+ proporciona los identificadores a los nodos adyacentes al nodo corriente.
+ assegna degli identificatori ai nodi adiacenti al nodo corrente
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ adjacent from
+ ~로부터 인접한
+ adyacente de
+ adjacent de
+ non adiacente
+ gives the identifiers of the nodes which are adjacent from the current
+node.
+ 현 노드로부터 인접한 노드의 확인소를 제시한다.
+ 相鄰自當前節點的節點的識別符碼。
+ 有向グラフにおける,現行ノードから出るノードの識別子を示す.
+ donne les identifiants des nœuds qui suivent immédiatement le nœud décrit.
+ proporciona los identificadores a los nodos adyacentes al nodo corriente.
+ assegna degli identificatori ai nodi non adiacenti al nodo corrente
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ adjacent
+ 인접한
+ adyacente
+ adiacente
+ adjacent
+ gives the identifiers of the nodes which are both adjacent to and
+adjacent from the current node.
+ donne les identifiants des nœuds adjacents au nœud courant.
+ 현 노드로 인접한 그리고 현 노드로부터 인접한 노드의 확인소를 제시한다.
+ 相鄰至與相鄰自當前節點的節點的識別符碼。
+ 無向グラフにおける,現行ノードに隣接するノードの識別子を示す.
+ proporciona los identificadores a los nodos adyacentes al nodo corriente.
+ assegna degli identificatori ai nodi adiacenti e non adiacenti al nodo corrente
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Use this attribute instead of the adjTo and
+adjFrom attributes when the graph is undirected and vice
+versa if the graph is directed.
+
+
+
Utiliser cet attribut à la place des attributs adjTo et adjFrom quand le graphe n'est pas orienté et vice versa si le graphe est orienté.
+
+
+
+ gives the in degree of the node, the number of nodes which
+are adjacent from the given node.
+ 주어진 노드로부터 인접한 노드의 수인, 노드의 정도를 제시한다.
+ 節點的向內分支度,即為相鄰自該節點的節點數量。
+ 現行ノードの入りの次数.すなわち,ノードへ入る辺の数.
+ donne le degré entrant du nœud, c'est-à-dire le nombre de nœuds qui précèdent immédiatement le nœud décrit.
+ indica el grado de entrada del nodo, es decir, el número de los nodos no adyacentes al nodo dado.
+ indica il grado in entrata del nodo, cioè il numero dei nodi non adiacenti al nodo stesso
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ gives the out degree of the node, the number of nodes which
+are adjacent to the given node.
+ 주어진 노드에 인접한 노드의 수인, 노드의 정도를 제시한다.
+ 節點的向外分支度,即為相鄰至該節點的節點數量。
+ 現行ノードの出の次数.すなわち,ノードから出る辺の数.
+ donne le degré sortant du nœud,
+ c'est-à-dire le nombre de nœuds qui suivent immédiatement le nœud décrit.
+ indica el grado de salida del nodo, es decir, el número de los nodos no adyacentes al nodo dado.
+ indica il grado in uscita del nodo, cioè il numero dei nodi adiacenti al nodo stesso
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ gives the degree of the node, the number of arcs with which
+the node is incident.
+ 노드와 함께 나타나는 호의 수인, 노드의 정도를 제시한다.
+ 節點的分支度,即為節點所附著的線條數。
+ 当該ノードの次数.すなわち,ノードにある辺の数.
+ donne le degré du nœud, c'est-à-dire le nombre d'arcs avec lesquels le nœud est lié.
+ define el grado del nodo, es decir, el número de los arcos incidentes al nodo
+ definisce il grado del nodo, cioè il numero degli archi incidenti al nodo
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Use this attribute instead of the inDegree and
+outDegree attributes when the graph is undirected and vice
+versa if the graph is directed.
+
+
+
Utiliser cet attribut à la place des attributs inDegree et outDegree quand le graphe n'est pas orienté et vice versa si le graphe est orienté.
Zero, one, or two children label elements may be
+ present. The first occurence of label provides a label
+ for the arc; the second provides a second label for the arc, and
+ should be used if a transducer is being encoded whose actions are
+ associated with nodes rather than with arcs.
+
+
+
Peuvent être présents un ou deux éléments enfants label ou aucun. La première occurrence de l'élément label fournit une étiquette pour l'arc ; la seconde
+occurrence fournit une deuxième étiquette pour l'arc et doit être utilisée si l'on
+encode un transducteur dont les actions sont associées avec des nœuds plutôt
+qu'avec des arcs.
+
+
+
+
+
+ arc
+ encodes an arc, the connection from one node to another in a graph.
+ 그래프에서 노드 사이를 연결하는 호를 부호화한다.
+ 標記一條弧線,即為圖形中節點與節點之間的連線。
+ グラフを構成するノード間の辺を示す.
+ encode un arc, la connexion entre deux noeuds
+ dans un graphe.
+ codifica un arco, es decir, la conexión entre un nodo y otro al interno de un gráfico
+ codifica un arco, cioè il collegamento tra un nodo e l'altro all'interno di un grafo
+
+
+
+
+
+
+
+
+
+
+
+
+
+ gives the identifier of the node which is adjacent from this arc.
+ 이 호로부터 인접한 노드의 확인소를 제시한다.
+ 相鄰自該線邊的節點的識別符碼。
+ 当該辺が有向である場合,起点となるノードを示す.
+ donne l'identifiant du noeud qui précède
+ immédiatement cet arc.
+ proporciona el identificador al nodo adyacente al nodo corriente.
+ assegna un identificatore al nodo non adiacente all'arco
+
+
+
+ gives the identifier of the node which is adjacent to this arc.
+ 이 호에 인접한 노드의 확인소를 제시한다.
+ 相鄰至該線邊的節點的識別符碼。
+ 当該辺が有効である場合,終点となるノードを示す.
+ donne l'identifiant du nœud qui suit
+ immédiatement cet arc.
+ proporciona el identificador al nodo adyacente al nodo corriente.
+ assegna un identificatore al nodo adiacente all'arco
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
The arc element must be used if the arcs are labeled.
+ Otherwise, arcs can be encoded using the adj,
+ adjTo and adjFrom attributes on the
+ node tags in the graph. Both arc tags and
+ adjacency attributes can be used, but the resulting encoding would
+ be highly redundant.
+
Zero, one, or two children label elements may be
+ present. The first occurence of label provides a label
+ for the arc; the second provides a second label for the arc, and
+ should be used if a transducer is being encoded.
+
+
+
L'élément arc doit être utilisé si les arcs sont étiquetés. Sinon les arcs
+ peuvent être encodés en utilisant les attributs adj, adjTo et
+ adjFrom des éléments node du graphe. Les éléments
+ arc et les attributs d'adjacence peuvent être utilisés en même temps mais
+ l'encodage qui en résulte serait extrêmement redondant.
+
Peuvent être présents un ou deux éléments enfants label ou aucun. La première
+ occurrence de l'élément label fournit une étiquette pour l'arc ; la seconde
+ occurrence fournit une deuxième étiquette pour l'arc et doit être utilisée si l'on
+ encode un transducteur.
Trees
+ arbre
+ encodes a tree, which is made up of a root, internal nodes,
+leaves, and arcs from root to leaves.
+ 수형도를 부호화하며, 이 수형도는 뿌리, 내부 노드, 단말노드, 그리고 뿌리로부터 단말 노드에 이르는 호로 구성된다.
+ 標記一個樹狀結構,包含根節點、內部節點、葉節點、以及從根到葉的連線。
+ 根,内部ノード,葉,矢(または辺)から成る木を示す.
+ encode un arbre, qui est composé d'une racine, de nœuds internes, de feuilles et d'arcs allant de la racine vers les feuilles.
+ codifica un árbol, que se constituye de raíz, nodos internos, hojas, y arcos que conectan raíz y hojas.
+ codifica un albero, che è costituito da radice, nodi interni, foglie, e archi che collegano radice e foglie
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ gives the maximum number of children of the root and internal
+nodes of the tree.
+ 뿌리의 자식 노드 및 수형도의 내부 노드의 최대 수를 제시한다.
+ 根節點所擁有的子節點數以及樹狀結構的內部節點數的最大值。
+ 木構造における,根や内部ノードが持つ子供の最大数を示す.
+ donne le nombre maximal d'enfants de la
+ racine et des nœuds internes de l'arbre.
+ establece el número máximo de hijos (descendientes) de la raíz y de los nodos internos del árbol.
+ stabilisce il numero massimo di figli della radice e dei nodi interni dell'albero
+
+
+
+ ordered
+ 순서가 있는
+ ordenado
+ ordonné
+ ordinato
+ indicates whether or not the tree is ordered, or if it is
+partially ordered.
+ 수형도가 순서가 있는지, 또는 수형도가 부분적으로 순서가 있는지를 나타낸다.
+ 說明樹狀結構是否整齊排列,或是部分整齊排列。
+ 当該木構造が,順序付き木,または半順序付き木であるかどうかを示す.
+ indique si l'arbre est ordonné ou non ou s'il l'est partiellement.
+ indica si el árbol es o no ordenado, o si es parcialmente ordenado.
+ indica se l'albero è ordinato o parzialmente ordinato
+
+
+
+
+ indicates that all of the branching nodes of the tree are ordered.
+ 수형도의 모든 분지 노드가 순서가 있음을 나타낸다.
+ 樹狀結構的所有分支節點皆整齊排列。
+ indica que todos los nodos de ramificación del árbol están ordenados.
+ 木構造中の全ノードは,順序付きであることを示す.
+ indique que, dans l'arbre, tous les nœuds d'embranchement sont ordonnés.
+ indica che tutti i nodi ramo dell'albero sono ordinati
+
+
+ indicates that some of the branching nodes of the tree are ordered
+and some are unordered.
+ 수형도의 분지 노드 중 일부는 순서가 있고, 일부는 순서가 없음을 나타낸다.
+ 有些分支節點整齊排列,有些則否。
+ indica que algunos de los nodos de ramificación del árbol están ordenados y otros desordenados.
+ 木構造中のノードの一部は順序付きであるが,一部は順序付きでは
+ ないことを示す.
+ indique que, dans l'arbre, certains
+ nœuds d'embranchement sont ordonnés et d'autres non.
+ indica che alcuni dei nodi ramo dell'albero sono ordinati e che altri non lo sono
+
+
+ indicates that all of the branching nodes of the tree are
+unordered.
+ 수형도의 모든 분지 노드는 순서가 없음을 나타낸다.
+ 樹狀結構的所有分支節點皆未整齊排列。
+ indica que todos los nodos de ramificación del árbol estan desordenados.
+ 木構造の全ノードは,順序付きではないことを示す.
+ indique que, dans l'arbre, tous les
+ nœuds d'embranchement sont non ordonnés.
+ indica che tutti i nodi ramo dell'albero non sono ordinati
+
+
+
+
+ gives the order of the tree, i.e., the number of its nodes.
+ 수형도의 순서를 제시한다. 즉, 그 노드의 수
+ 提供樹狀結構的次序,例如節點數目。
+ 木構造の順番を示す.例えば,ノードの番号を示す.
+ donne l'ordre de l'arbre, c'est-à-dire le
+ nombre de ses nœuds.
+ proporciona el orden del árbol, es decir, el número de los nodos.
+ indica l'ordine dell'albero, cioè il numero dei suoi nodi
+
+
+
The size of a tree is always one less than its order, hence
+there is no need for both a size and order
+attribute.
+
+
+
La taille d'un arbre étant toujours inférieure d'un à son ordre, il n'est donc pas nécessaire d'avoir en même temps un attribut size et un attribut order.
+
+
+
+
+
+ root node
+ 뿌리 노드
+ 根節點
+ nœud racine
+ nodo raíz
+ nodo radice
+ represents the root node of a tree.
+ 수형도의 뿌리 노드를 표시한다.
+ 樹狀結構的根節點。
+ 木の根要素を示す.
+ représente le nœud racine d'un arbre.
+ representa el nodo raíz de un árbol.
+ rappresenta il nodo radice di un albero
+
+
+
+
+
+
+
+
+
+
+ identifies the root node of the network by pointing to a feature structure or
+other analytic element.
+ 뿌리의 값을 제시하며, 그 값은 자질 구조 또는 기타 분석적 요소이다.
+ 提供一個根節點值,該跟節點為一個功能結構或其他分析元素。
+ 当該根要素の値絵お示す.これは,素性構造または他の分析要素となる.
+ fournit l'identifiant de l'objet représenté par la racine ; cet objet peut être une paire nom-valeur ou tout autre élément analytique.
+ proporciona el valor de la raíz, que puede ser una estructura de rasgos u otro elemento de análisis.
+ assegna alla radice un valore, che può essere una struttura di tratti o altro elemento di analisi
+
+
+
+ identifies the elements which are the children of the root node.
+ 뿌리 노드의 자식인 요소의 확인소 목록을 제시한다.
+ 提供根節點的子節點元素識別符碼列表。
+ 当該根要素の子要素となる要素の識別子のリストを示す.
+ fournit la liste des identifiants des éléments qui sont les enfants du nœud racine.
+ proporciona una lista de identificadores de elementos que son hijos (descendientes) de la raíz.
+ fornisce una lista di identificatori degli elementi figli del nodo radice
+
+
+
If the root has no children (i.e., the tree is
+trivial), then the children
+attribute should be omitted.
+
+
+
Si le nœud racine n'a pas d'enfants (c'est-à-dire que l'arbre est trivial), l'attribut children devrait être omis.
+
+
+
+ ordered
+ 순서가 있는
+ ordenado
+ ordonné
+ ordinato
+ indicates whether or not the root is ordered.
+ 뿌리가 순서가 있는지의 여부를 제시한다.
+ 說明根節點是否整齊排列。
+ 当該根要素が,順序付きかどうかを示す.
+ indique si la racine est ordonnée ou non.
+ indica si la raíz es o no ordenada.
+ indica se la radice è ordinata
+
+
+
The value true indicates that the children of
+ the root are ordered, whereas false indicates the
+ are unordered.
+
Use if and only if ord is specified as
+ partial on the tree element and the root
+ has more than one child.
+
+
+
La valeur true indique que les enfants d'un nœud racine sont ordonnés, alors que la valeur false indique qu'ils ne le sont pas.
+
Utiliser si, et seulement si, l'attribut ord de l'élément tree a la valeur partial et que la racine a plus d'un enfant.
+
+
+
+ gives the out degree of the root, the number of its children.
+ 뿌리의 정도, 즉, 그 자식의 수를 제시한다.
+ 根節點的向外分支度,即為其子節點的數量。
+ 当該根要素の出の次数,すなわち子要素の数を示す.
+ donne le degré sortant de la racine, c'est-à-dire le nombre de ses enfants.
+ indica el grado en salida de la raíz, es decir, el número de hijos de esta.
+ indica il grado in uscita della radice, cioè il numero dei suoi figli
+
+
+
The in degree of the root is always 0.
+
+
+
Le degré entrant du nœud racine est toujours 0.
+
+
+
+ 当該根要素の入りの次数は,常に0.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ intermediate (or internal) node
+ 중간 (또는 내부) 노드
+ 中間 (或內部) 節點
+ nœud intermédiaire (ou interne)
+ nodo intermedio (o interno)
+ nodo intermedio (o interno)
+ represents an intermediate (or internal) node of a tree.
+ 수형도의 중간 (또는 내부) 노드를 표시한다.
+ 表示一個樹狀結構的中間 (或內部) 節點。
+ 木における内部ノードを示す.
+ représente un nœud intermédiaire (ou interne) dans un arbre.
+ representa un nodo intermedio (o interno) de un árbol.
+ rappresenta un nodo intermedio (o interno) di un albero
+
+
+
+
+
+
+
+
+
+
+ indicates an intermediate node, which is a feature
+structure or other analytic element.
+ 중간 노드의 값을 제시하며, 그 값은 자질 구조 또는 기타 분석적 요소이다.
+ 提供一個中間節點值,該節點為一個功能結構或其他分析元素。
+ 内部ノードの値を示す.素性構造向け要素または分析向け要素になる.
+ fournit l'identifiant de l'objet représenté par le nœud intermédiaire ; cet objet peut être une paire nom-valeur ou tout autre élément analytique.
+ proporciona el valor de un nodo intermedio, que puede ser una estructura de rasgos u otro elemento de análisis.
+ assegna a un nodo intermedio un valore, che può essere una struttura di tratti o altro elemento di analisi
+
+
+
+ provides a list of identifiers of the elements which are the children of
+the intermediate node.
+ 중간 노드의 자식인 요소의 확인소 목록을 제시한다.
+ 提供中間節點的子節點之元素識別符碼列表。
+ 当該内部ノードの子要素の識別子をまとめたリストを示す.
+ fournit une liste des identifiants des
+ éléments qui sont les enfants du nœud intermédiaire.
+ proporciona una lista de identificadores de elementos que son hijos de un nodo intermedio.
+ fornisce una lista di identificatori degli elementi figli del nodo intermedio
+
+
+
+ provides the identifier of the element which is the parent of this node.
+ 이 노드의 부모인 요소의 확인소를 제공한다.
+ 提供中間節點的雙親節點的元素識別符碼。
+ 当該ノードの親要素の識別子を示す.
+ fournit l'identifiant de l'élément parent
+ de ce nœud.
+ proporciona el identificador del elemento padre de un nodo dado.
+ assegna un identificatore all'elemento genitore del nodo
+
+
+
+ ordered
+ 순서가 있는
+ ordenado
+ ordonné
+ ordinato
+ indicates whether or not the internal node is ordered.
+ 내부 노드가 순서가 있는지를 표시한다.
+ 說明內部節點是否整齊排列。
+ 当該内部ノードが順序付きかどうかを示す.
+ indique si le nœud interne est ou non ordonné.
+ indica si el nodo interno está ordenado o no.
+ indica se il nodo interno è ordinato o meno
+
+
+
The value true indicates that the children of
+ the intermediate node are ordered, whereas false
+ indicates the are unordered.
+
Use if and only if ord is specified as
+ partial on the tree element and the
+ intermediate node has more than one child.
+
+
+
La valeur true indique que les enfants du nœud intermédiaire sont
+ordonnés, alors que la valeur false indique qu'ils ne le sont pas.
+
Utiliser si, et seulement si, l'attribut ord de l'élément treea la valeur partial et que le nœud intermédiaire a plus d'un enfant.
+
+
+
+ provides the identifier of
+an element which this node follows.
+ 이 노드가 따르는 요소의 확인소를 제공한다.
+ 提供此節點所尾隨的元素識別符碼。
+ 当該ノードの姉要素の識別子を示す.
+ fournit l'identifiant de l'élément que ce nœud suit.
+ proporciona un identificador al elemento que precede al nodo.
+ assegna un identificatore all'elemento che precede il nodo
+
+
+
If the tree is unordered or partially ordered, this attribute
+has the property of fixing the relative order of the intermediate node
+and the element which is the value of the attribute.
+
+
+
Si l'arbre n'est pas ordonné ou l'est partiellement, cet attribut a la
+ propriété de fixer l'ordre relatif du nœud intermédiaire et de l'élément
+ indiqué comme valeur de l'attribut.
+
+
+
+ gives the out degree of an intermediate node, the number of its
+children.
+ 중간 노드의 정도, 즉, 그 자식의 수를 제시한다.
+ 中間節點的向外分支度,即為其子節點的數量。
+ 内部ノードの出の次数(子要素の数)を示す.
+ donne le degré sortant d'un nœud intermédiaire, c'est-à-dire le nombre de ses enfants.
+ indica el grado de salida del nodo intermedio, es decir, el número de sus hijos.
+ indica il grado in uscita di un nodo intermedio, cioè il numero dei suoi figli
+
+
+
The in degree of an intermediate node is always 1.
+
+
+
Le degré entrant d'un nœud intermédiaire est toujours 1.
+
+
+
+ 内部ノードの入りの次数(親への辺数)は常に1である.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ feuille
+ encodes the leaves (terminal nodes) of a tree.
+ 수형도의 단말 노드를 부호화한다.
+ 標記樹狀結構的葉節點 (終端節點) 。
+ 木(構造)における葉(終端ノード)を示す.
+ encode les feuilles (nœuds terminaux) d'un
+ arbre.
+ codifica las hojas (nodos terminales) de un árbol.
+ codifica le foglie (nodi terminali) di un albero
+
+
+
+
+
+
+
+
+
+
+ provides a pointer to a feature
+structure or other analytic element.
+ 자질 구조 또는 기타 분석적 요소에 대한 포인터를 제공한다.
+ 提供一個連結到功能結構或其他分析元素的指標。
+ 素性構造または他の分析要素へのポインタを示す.
+ fournit l'identifiant de l'objet représenté par la feuille ; cet objet peut être une paire nom-valeur ou tout autre élément analytique.
+ proporciona un identificador de una estructura de rasgos u otro elemento de análisis.
+ assegna alla foglia un valore, che può essere una struttura di tratti o altro elemento di analisi
+
+
+
+ provides the identifier of parent of a leaf.
+ 단말 노드의 부모의 확인소를 제공한다.
+ 提供葉節點的父節點識別符碼。
+ 葉の親要素の識別子を示す.
+ fournit l'identifiant du parent de la feuille.
+ proporciona el identificador que es padre de una hoja.
+ assegna un identificatore al genitore della foglia
+
+
+
+ provides an identifier of an element which this leaf follows.
+ 이 단말 노드가 따르는 요소의 확인소를 제공한다.
+ 提供此葉節點所尾隨的元素識別符碼。
+ 当該葉の姉要素の識別子を示す.
+ fournit l'identifiant d'un élément que cette feuille suit.
+ proporciona un identificador al elemento que precede a la hoja.
+ assegna un identificatore all'elemento che precede la foglia
+
+
+
If the tree is unordered or partially ordered, this
+attribute has the property of fixing the relative order of the leaf and
+the element which is the value of the attribute.
+
+
+
Si l'arbre n'est pas ordonné ou l'est partiellement, cet attribut a la propriété de fixer l'ordre relatif de la feuille et de l'élément désigné par l'attribut.
The in degree of a leaf is always 1, its out degree always
+0.
+
+
+
Le degré entrant d'une feuille est toujours 1, son degré sortant toujours 0.
+
+
+
+ 葉の入り次数は常に1であり,出の次数は常に0となる.
+
+
+
+
+
+
Another Tree Notation
+ embedding tree
+ 내포 수형도
+ 嵌入樹狀結構
+ arbre englobant
+ árbol integrado
+ albero integrato
+ provides an alternative to tree element for representing ordered rooted tree structures.
+ 순서가 있고 뿌리가 있는 수형 구조를 표시하기 위해 수형도 요소에 대체안을 제시한다.
+ 提供樹元素的替換,用來表示整齊具有根節點的樹狀結構。
+ 順序付き根付き木を構成する部分木を示す.
+ élément à utiliser lorsqu'on a besoin d'imbriquer
+ plusieurs structures arborescentes à racine et ordonnées, pour encoder chacune de ces structures (en effet, il n'est pas possible d'imbriquer des éléments tree).
+ representa una alternativa al elemento árbol para la representación de estructuras del tipo árbol enraizado ordenado
+ rapresenta un'alternativa all'elemento albero per la rappresentazione di strutture del tipo albero radicato ordinato
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ provides the value of an embedding tree, which is a feature
+structure or other analytic element.
+ 내포 수형도의 값을 제시하며, 그 값은 자질 구조 또는 기타 분석적 요소이다.
+ 提供一個嵌入樹狀結構值,該嵌入樹狀結構為一個功能結構或其他分析元素。
+ 当該部分木の値を示す.素性構造または他の分析に関する要素になる.
+ fournit l'identifiant de l'objet représenté par l'arbre englobant ; cet objet peut être une paire nom-valeur ou tout autre élément analytique.
+ adscribe al árbol integrado un valor, que puede ser una estructura de rasgos u otro elemento de análisis.
+ assegna all'albero integrato un valore, che può essere una struttura di tratti o altro elemento di analisi
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
an optional label followed by zero or more
+ embedding trees, triangles, or embedding leafs.
+
+
+
une étiquette facultative suivie de zéro, un ou plusieurs arbres englobants, triangles ou feuilles englobantes.
+
+
+
+ ひとつ以上の部分木や部分木の葉に続いて,選択的にラベルをとる.
+
+
+
+
+
+
+ underspecified embedding tree, so called because of its
+ characteristic shape when drawn
+ 미명시된 내포 수형도, 도출될 때 그 특성적 모양 때문에 그렇게 불린다.
+ 不完全嵌入樹狀結構,如同畫出的圖形特徵所顯示。
+ triangle : arbre englobant sommaire, appelé ainsi en raison de sa forme caractéristique quand il est dessiné.
+ árbol integrado insuficientemente especificado, llamado así a causa de la forma característica que asume cuando se diseña.
+ albero integrato insufficientemente specificato, così chiamato a causa della caratteristica forma che assume quando viene disegnato
+ provides for an underspecified eTree, that is, an eTree with
+ information left out.
+ 미명시된 eTree를 제시한다. 즉, 정보가 삭제된 eTree
+ 為不完全之嵌入樹狀結構所提供的元素,即資訊不足的嵌入樹狀結構。
+ 未定義の部分木(eTree),すなわち情報が付与されていない部分木を示す.
+ désigne un arbre englobant sommaire, c'est-à-dire pour lequel toutes les informations ne sont pas données.
+ define un eTree insuficientemente especificado, es decir, un eTree con algunas informaciones excluidas.
+ definisce un eTree insufficientemente specificato, cioè un eTree con alcune informazioni escluse
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ supplies a value
+ for the triangle, in the form of the identifier of a feature
+structure or other analytic element.
+ 삼각형의 값을 제시하며, 그 값은 자질 구조 또는 기타 분석적 요소의 확인소이다.
+ 提供一個三角樹狀結構值,該三角樹狀結構為一個功能結構或其他分析元素。
+ 省略部分木の値を示す.素性構造または他の分析要素の識別子になる.
+ fournit l'identifiant de l'objet représenté par le triangle ; cet objet peut être une paire nom-valeur ou tout autre élément analytique.
+ asigna al triángulo un valor, que puede ser el identificador de una estructura de rasgos u otro elemento de análisis.
+ assegna al triangolo un valore, che può essere l'dentificatore di una struttura di tratti o altro elemento di analisi
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
An optional label followed by zero or more
+ embedding trees, triangles, or embedding leafs.
+
+
+
une étiquette facultative suivie de zéro, un ou plusieurs arbres englobants, triangles ou feuilles englobantes.
+
+
+
+ 0以上の部分木,省略部分木,部分木の葉が続く,選択的なラベル.
+
+
+
+
+
+
+ leaf or terminal node of an embedding tree
+ 내포 수형도의 단말 노드
+ 嵌入樹狀結構的葉節點。
+ feuille ou nœud terminal d'un arbre englobant
+ hoja de un árbol integrado.
+ foglia di un albero integrato
+ provides explicitly for a leaf of an embedding tree, which may also
+be encoded with the eTree element.
+ 내포 수형도의 단말 노드를 명시적으로 제공한다. 내포 수형도는 또한 eTree 요소로 부호화될 수 있다.
+ 為嵌入樹狀結構的葉節點所明確提供的元素,也可用元素eTree來標記。
+ 部分木における葉を示す.要素eTree中で使用される.
+ la feuille d'un arbre englobant, qui peut aussi être encodée au moyen d'un élément eTree
+
+ proporciona explícitamente una hoja de un árbol integrado, que puede ser codificado también con el elemento eTree.
+ definisce esplicitamente una foglia di un albero integrato, che può essere codificato anche con l'elemento eTree.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ indicates the value of an embedding leaf, which is a feature
+structure or other analytic element.
+ 내포 단말 노드의 값을 제시하며, 그 값은 자질 구조 또는 기타 분석적 요소이다.
+ 提供一個嵌入葉節點值,該嵌入葉節點為一個功能結構或其他分析元素。
+ proporciona el valor de una hoja embute, que es la estructura de rasgo u otro elemento analítico.
+ 部分木の葉の値を示す.この葉は,素性構造または他の分析に関する要
+ 素である.
+ fournit l'identifiant de l'objet représenté par la feuille de l'arbre englobant ; cet objet peut être une paire nom-valeur ou tout autre élément analytique.
+ assegna alla foglia integrata un valore, che può essere una struttura di tratti o altro elemento di analisi
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
The eTree tag may be used if the encoder does not
+wish to distinguish by name between nonleaf and leaf nodes in
+embedding trees; they are distinguished by their arrangement.
+
+
+
La balise eTree peut être utilisée si l'encodeur ne souhaite pas faire une distinction de nom entre des nœuds terminaux (feuilles) ou non-terminaux dans des arbres englobants ; ils sont distingués par leur disposition.
+
+
+
+
+
+ forêt
+ provides for groups of rooted trees.
+ 뿌리가 있는 수형도군을 제공한다.
+ 匯集具根節點的樹狀結構群組。
+ 根付き木のの集合を示す.
+ permet d'encoder des groupes d'arbres à racine.
+ define grupos de árboles enraizados.
+ definisce gruppi di alberi radicati
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
One or more trees, embedding trees, or underspecified embedding
+trees (triangles).
+
+
+
Un ou plusieurs arbres, des arbres englobants ou des arbres englobants sommaires (triangles).
+
+
+
+ ひとつ以上の木,部分木,省略部分木.
+
+
+
+
+
+
+ provides for lists of forests.
+
+
+
+
+
+
+
+
+
+
+
+ identifies the type of the forest group.
+ 수형도군의 유형을 식별한다.
+ 標明森林群組的類型。
+
+ 当該森集合の種類を示す.
+
+ précise le type du groupe de forêts.
+ identifica el tipo de grupo de bosque
+ identifica il tipo di gruppo di foresta
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
One or more forests representing the same object.
+
+
+
Une ou plusieurs forêts.
+
+
+
+ ひとつ以上の森.
+
+
+
+
+
+
Representing Textual Transmission
Module for Graphs, Networks, and Trees
+Graphs, networks, and trees
+Graphs, networks, and trees
+Graphes, réseaux et arbres
+圖形、網絡與樹狀結構
+Grafici, reti e alberiGrafos, redes, e árvoresグラフモジュール
Non-hierarchical Structures
Multiple Encodings of the Same Information
Boundary Marking with Empty Elements
Fragmentation and Reconstitution of Virtual Elements
Stand-off Markup
Non-XML-based Approaches
Certainty, Precision, and Responsibility
Levels of Certainty
Using Notes to Record Uncertainty
Structured Indications of Uncertainty
Contingent Conditions
Pervasive Conditions
Content Uncertainty
Target or Match?
+ indicates the numerical accuracy or precision associated
+ with some aspect of the text markup.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ characterizes the precision of the element or attribute pointed
+ to by the precision element.
+
+
+
+ supplies a standard deviation associated with the value in
+ question
+
+
+
+
+
+ Within about 50
+ years of the death of Augustus
+
+
+
+
+
+
+ Not more than ten years before the start of the Civil War
+
+
+
+
+
+
+
+
+
+
+ indicates the degree of certainty associated
+ with some aspect of the text markup.
+ 텍스트 마크업의 어떤 특성과 관련된 확실성 또는 불확실성의 정도를 가리킨다.
+ 指出標記文本某些部分的確定或不確定的程度。
+ 当該マークアップの確信度を示す.
+ Indique le degré de certitude ou d'incertitude
+ associé à certains aspects du balisage du texte.
+ Indica el grado de certeza o incertidumbre asociado a algun aspecto del marcaje de texto.
+ indica il grado di certezza o incertezza associato a un determinato aspetto del la codifica del testo
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ certainty
+ 확실성
+ certeza
+ certitude
+ certezza
+ signifies the degree of certainty associated with the object pointed to by the certainty element.
+
+
+
+ indicates more exactly the aspect concerning which
+ certainty is being expressed: specifically, whether the markup
+ is correctly located, whether the correct element or attribute
+ name has been used, or whether the content of the element or
+ attribute is correct,
+ etc.
+ 요소의 적용가능성, 시작 및 종료 태그의 정확한 위치, 명시적 속성 값 등과 같이 마크업에서 불확실성을 유발하는 정확한 위치를 가리킨다.
+ 指出不確定標記的確切位置:元素的應用性、開始標籤或結束標籤的確切位置、特定屬性的屬性值等。
+ 当該確信度が該当する場所の詳細を示す.例えば,要素全体,開始タグ
+ または終了タグの正確な位置,特定属性の値,など.
+ Indique le point précis sur lequel porte
+ l'incertitude de balisage : pertinence de l'élément, position exacte de la balise de début
+ ou de fin, valeur d'un attribut spécifique, etc.
+ indica la posición precisa de la incertidumbre en el marcaje: aplicabilidad del elemento, posición precisa del comienzo y del final de la etiqueta, valor de un atributo específico, etc.
+ indica la posizione dell'incertezza nella codifica: l'applicabilità dell'elemento, la precisa posizione del marcatore iniziale o finale, il valore di un singolo attributo, ecc.
+
+
+
+ uncertainty concerns whether the name of the element
+ or attribute used is correctly applied.
+
+
+ uncertainty concerns whether the start of the element
+ is correctly identified.
+
+
+ uncertainty concerns whether the end of the element
+ is correctly identified.
+
+
+ uncertainty concerns both the start and the end of the
+ element.
+
+
+ uncertainty concerns the content (for an element) or
+ the value (for an attribute)
+
+
+
+
+ provides an alternative value for the aspect of the markup in
+question—an alternative generic identifier, transcription,
+or attribute value, or the identifier of an anchor element (to
+indicate an alternative starting or ending location). If an
+assertedValue is given, the confidence level specified by
+degree applies to the alternative markup specified by
+assertedValue; if none is given, it applies to the markup
+in the text.
+ 문제의 마크업에 대한 대체가능한 값을 제공한다- 대체가능한 일반 확인소, 전사, 속성 값, 또는 (대체가능한 시작 또는 종료 위치를 지시하는) anchor 요소의 확인소. assertedValue가 제시된 경우, degree로 명시된 신뢰수준은 assertedValue에 의해 명시된 대체가능한 마크업에 적용된다; 만약 아무런 것도 제시되지 않는다면 텍스트의 마크업에 신뢰수준이 적용된다.
+ 提供一個替代屬性值給指定標記部分—一個替代的類目識別符碼、轉錄、或屬性值,或是元素anchor (用來指出一個替代的開始或結束位置) 的識別符碼。若使用屬性assertedValue,則屬性degree中指出的確定程度適用於屬性assertedValue所指明的替代標記;若無使用,則確定程度適用於文本中的標記。
+ 懸案の部分に対する代替値を示す.例えば,共通識別子(GI),転記,属
+ 性値,(他の開始・終了地点を示す)要素anchorの識別子,な
+ ど.属性assertedValueがある場合,属性
+ degreeで定義された確信度は,属性
+ assertedValueにある値への確信度を示す.
+ 何もない場合には,当該テキスト中の当該マークアップに該当する.
+ fournit une valeur alternative pour l'aspect d'un
+ balisage jugé incertain - un identifiant générique, une transcription ou une valeur
+ d'attribut, ou l'identifiant d'un élément anchor (pour indiquer un
+ emplacement alternatif de début ou de fin). Si un attribut assertedValue est
+ présent, le degré de confiance spécifié par l'attribut degree s'applique au
+ balisage alternatif précisé par la valeur d' assertedValue; s'il n'y a pas
+ d'attribut assertedValue, ce degré de confiance s'applique au balisage du
+ texte.
+ proporciona un valor alternativo para
+ el aspecto del marcaje en cuestion, un identificador
+ genérico alternativo, transcripción, o valor de atributo, o
+ de identificador de un elemento anchor (para
+ indicar una posición de comienzo y fin alternativa). Si un
+ assertedValue viene dado, el nivel de confianza
+ especificado por degree se aplica al marcaje
+ alternativo especificado por assertedValue; si no
+ viene dado ninguno, se aplica al marcaje en el texto.
+ assegna un valore alternativo all'apetto della codifica in questione, un identificatore generico, una trascrizione, il valore di un attributo, o l'identificatore di un elemento anchor (per indicare una posizione di inizio o fine alternativa). Se viene fornito un attributo assertedValue, il livello di sicurezza specificato dall'attributo degree si applica alla codifica alternativa specificata dall'attributo assertedValue; se non viene fornito alcun attributo, si applica alla codifica del testo.
+
+
+
+
+ It is unlikely, but possible, that this refers to the place
+rather than the person.
+
+
+
+
+
+
+
+
+
+
+
This attribute makes it possible to indicate the
+degree of confidence in a specific alternative to some aspect
+of the markup. In the first example above the encoder is expressing
+the likelihood (.2) that the generic identifier should be
+placeName rather than persName, which is the coded
+element.
+
+
+
Cet attribut permet
+ d'indiquer le degré de confiance dans une alternative spécifique à un aspect
+ du balisage. Dans l'exemple qui précède l'encodeur exprime la probabilité
+ qu'il faille un identifiant générique placeName plutôt que
+ persName, qui est l'élément encodé.
+
+
+
+ indicates one or
+ more element(s) characterizing the conditions which
+ are assumed in the assignment of a degree of confidenceconditions assumed in the assignment of a degree
+ of confidence.
+ 신뢰도 할당에서 추정된 조건을 표시한다.
+ 指出在評估確定程度時所設想的情況。
+ 当該確信度が成立する条件を示す.
+ Indique les conditions présumées lors de
+ l'attribution d'un degré de confiance.
+ indica las condiciones asumidas en la asignación de un grado de confianza
+ indica le condizioni presunte nell'assegnare un grado di certezza
+
+
+
The envisioned typical value of this attribute would be the
+ identifier of another certainty element or a list of
+ such identifiers. It may thus be possible to construct
+ probability networks by chaining certainty elements
+ together. Such networks would ultimately be grounded in
+ unconditional certainty elements (with no value for
+ given). The semantics of this chaining would be
+ understood in this way: if a certainty element is
+ specified, via a reference, as the assumption, then it is not
+ the attribution of uncertainty that is the assumption, but
+ rather the assertion itself. For instance, in the example
+ above, the first certainty element indicates that the
+ confidence in the identification of the new scribe as
+ msm. The second indicates the degree of
+ confidence that Essex is a personal
+ name, given that the new scribe is msm.
+ Note that the given in the second certainty element
+ is not the assertion that the likelihood that msm is the new
+ scribe is 0.6, but simply the assertion that msm is the new
+ scribe; this is a recommended convention to facilitate
+ building networks.
+
The ambitious encoder may wish to attempt complex networks
+or probability assertions, experimenting with references to
+other elements or prose assertions, and deploying feature
+structure connectives such as alt, join, and
+note. However, we do not believe that the
+certainty element gives, at this time, a comprehensive
+ambiguity-free system for indicating certainty.
+
+
+
+
La valeur typique à laquelle on pense pour cet attribut
+ serait l'identifiant d'un autre élément certainty ou
+ une liste comportant de tels identifiants. Il serait ainsi
+ possible de construire des réseaux de probabilité en chaînant
+ ensemble des éléments certainty. Ces réseaux seraient
+ en définitive fondés sur des éléments certainty
+ inconditionnels (sans attribut given). La
+ sémantique de ce chaînage est à comprendre ainsi : si un
+ élément certainty est spécifié comme postulat au
+ moyen d'une référence (présence d'un attribut
+ given), alors l'assertion même constitue le
+ postulat, et non pas l'attribution d'un caractère
+ d'incertitude. Ainsi, dans l'exemple ci-dessus, le premier
+ élément certainty formule l'hypothèse que le nouveau
+ scripteur est msm. Le second indique le
+ degré de confiance dans le fait que
+ Essex est un nom de personne, étant
+ donné que le nouveau scripteur est
+ msm. Notons que le postulat dans le
+ deuxième élément certainty n'est pas que le degré de
+ probabilité que msm soit le nouveau scripteur est de 0.6, mais
+ simplement que msm est le nouveau scripteur ; il est
+ recommandé d'utiliser cette convention pour faciliter la
+ construction de réseaux.
+
Les encodeurs ambitieux peuvent souhaiter construire des
+ réseaux ou des assertions de probabilité complexes, en faisant
+ référence à d'autres éléments ou à des assertions en texte
+ libre, et en établissant des relations entre structures de
+ traits, telles que alt, join et
+ note. Toutefois nous ne pensons pas que l'élément
+ certainty procure actuellement un système complet et
+ sans ambiguïté pour indiquer le degré de certitude.
+
+
+
+ indicates the degree of confidence assigned to the aspect
+of the markup named by the locus attribute.
+ locus 속성에 의해 명명된 마크업에 할당된 신뢰도를 표시한다.
+ 指出屬性locus所指定的標記部分之確定程度。
+ 属性locusで示された対象のに付与される確信度の程度を示
+ す.
+ Indique le degré de confiance attribué à l'aspect
+ du balisage que désigne l'attribut locus.
+ indica el grado de confianza asignado al aspecto del marcaje llamado por el atributo locus
+
+ indica il grado di certezza assegnato ad un aspetto della codifica indicato dall'attributo locus.
+
+
+
+
+
Attribution of Responsibility
+ responsibility
+ 책임성
+ 責任
+ Responsabilité
+ responsabilidad
+ responsabilità
+ identifies the individual(s) responsible for some aspect of the content or
+markup of particular element(s).
+ 특정 요소의 마크업에 대한 책임이 있는 개인 또는 개인들을 지저정한다.
+ 指出標記一或多個特定元素某部分的負責人。
+ ある要素の決定に責任のある個人を特定する.
+ identifie le ou les personne(s) responsable(s) d'un
+ aspect du balisage pour un ou plusieurs éléments particuliers.
+ Identifica la responsabilidad individual/es de algún aspecto del marcaje de un elemento/s particular.
+ indica i soggetti responsabili della codifica di determinati elementi
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ indicates the specific aspect of the encoding (markup or
+ content) for which responsibility is being assigned.
+ 책임성이 할당된 명시적인 마크업을 표시한다.
+ 指出標記責任所屬的特定部分。
+ 当該責任を示すマークアップが何についてのものかを示す.
+ Indique l'aspect spécifique du balisage sur
+ lequel porte la responsabilité.
+ indica el aspecto específico del marcaje por el cual la responsabilidad está siendo asignada
+ indica l'aspetto specifico della codifica per il qaule è attribuita la responsabilità
+
+
+
+ responsibility is being assigned concerning the name of the element
+ or attribute used.
+
+
+ responsibility is being assigned concerning the start of the element
+ concerned.
+
+
+ responsibility is being assigned concerning the end of the element
+ concerned.
+
+
+ responsibility is being assigned concerning the location of the element
+ concerned.
+
+
+ responsibility is being assigned concerning the content (for an element) or
+ the value (for an attribute)
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
In this (partially fictional) example the entire document was
+ transcribed and encoded by a single encoder, except for one passage
+ which was transcribed and encoded by the proofreader.
In this (partially fictional) example an initial encoder
+ (across.dta) encoded most of the document; a later
+ encoder (rcapolung.ewo) encoded a particular
+ passage; and a third encoder (sbauman.emt) fixed
+ some of that encoding.
+
+
+
+
+ encoding
+
+
+
+
+ Mor.
+
So, so, so!
+
+
+ Mr. H.
+
What, without my Leave!
+
+
+ Lady D.
+
Amazing!
+
+
+ All together.
+
+
+ Ashley did not know what to do with this; I have decided it
+ best fits as a braced spGrp
+
+
+
+ fixed rend attributes
+
+
+
+
+
The respons element is designed for cases in which
+fine-grained information about specific aspects of the markup of a text
+is desirable for whatever reason. Global responsibility for certain
+aspects of markup is usually more simply indicated in the TEI header,
+using the respStmt element within the title statement, edition
+statement, or change log.
+
+
+
L'élément respons est préconisé dans les cas où une information très fine
+ sur des aspects spécifiques du balisage d'un texte est souhaitable pour une raison
+ quelconque. Une responsabilité globale pour certains aspects du balisage est
+ habituellement indiquée simplement au niveau de l'en-tête TEI en utilisant l'élément
+ respStmt dans la mention de titre, la mention d'édition ou le journal
+ de modifications.
The Certainty ModuleCertainty
+and UncertaintyCertainty and uncertainty
+Degré de certitude et responsabilité
+確定程度與不確定程度
+Certezza e incertezzaCerteza e incerteza確信度モジュール
Documentation Elements
Phrase Level Documentary Elements
Phrase Level Terms
Element and Attribute Descriptions
+ attribute
+ 속성
+ 屬性
+ attribut
+ atributo
+ attributo
+ contains the name of an attribute appearing within running text.
+ 현 텍스트 내에 나타나는 속성명을 포함한다.
+ 包含在連續文字中出現的屬性名稱。
+ 属性の名前を示す.
+ contient le nom d'un attribut apparaissant dans le courant du texte.
+ contiene el nombre de un atributo que aparece en el
+ interior de un texto.
+ contiene il nome di un attributo che compare all'interno
+ del testo
+
+
+
+
+
+
+
+
+
+ schéma
+ supplies an identifier for the scheme in which this name is defined.
+ 이 이름이 정의된 스키마에 대한 확인소를 제공한다.
+ 提供該標準之識別符碼,此名稱定義於該標準中。
+ 当該属性名を定義するスキームの識別子を示す.
+ fournit l'identifiant du schéma dans lequel ce nom
+ est défini.
+ proporciona un identificador al esquema en el cual se
+ define tal nombre.
+ assegna un identificatore allo schema nel quale è
+ definito tale nome
+
+ TEI
+
+
+ text encoding initiative
+ 텍스트 부호화 표준
+ text encoding initiative
+ TEI
+ este atributo es parte del esquema TEI.
+ this attribute is part of the TEI scheme.
+ 이 속성은 TEI 스키마의 부분이다.
+ 此屬性為TEI標準的一部份。
+ este atributo es parte del esquema de TEI.
+ 当該属性はTEIスキームに属している.
+ cet attribut fait partie du modèle TEI.
+ l'attributo è parte dello schema TEI
+
+
+ docbook
+ 도크북
+ Docbook
+ este atributo es parte del esquema Docbook.
+ this attribute is part of the Docbook scheme.
+ 이 속성은 Docbook 스키마의 부분이다.
+ 此屬性為Docbook 標準的一部份。
+ este atributo es parte del esquema de Docbook.
+ 当該属性は,Docbookスキームに属している.
+ cet attribut fait partie du modèle Docbook.
+ l'attributo è parte dello schema Docbook
+
+
+ unknown
+ 미지의
+ inconnu
+ sconosciuto
+ este atributo es parte de un esquema
+ desconocido.
+ this attribute is part of an unknown scheme.
+ 이 속성은 미지의 스키마의 부분이다.
+ 此屬性所屬的標準不明。
+ este atributo es parte de un esquema desconocido.
+ 当該属性は,未知のスキームに属している.
+ cet attribut fait partie d'un schéma inconnu.
+ l'attributo è parte di uno schema
+ sconosciutothe attribute is from a non-existent scheme, for illustrative purposes only
+ the attribute is part of the XHTML language
+ the attribute is part of the XML language
+ the attribute is defined in the xInclude schema
+
+
+
+
+
+
+
The TEI defines several global attributes; their names include
+ xml:id, rend, xml:lang, n, xml:space,
+ and xml:base; type is not amongst them.
+
+
+
+
+
La TEI définit six attributsglobaux qui se nomment
+ xml:id, rend, xml:lang, n,
+ xml:space, et xml:base; typen'en fait pas
+ partie .
+
+
+
+
+
TEI定義六個global屬性,包括:
+ xml:id, rend, xml:lang, n, xml:space,
+ 和xml:base; type 不在其中。
+
+
+
+
A namespace prefix may be used in order to specify the scheme as an alternative to specifying
+ it via the scheme attribute: it takes precedence
+
+
+
Un préfixe d'espace de noms peut être utilisé pour spécifier le schéma, comme alternative à sa
+ spécification par l'attribut scheme : il est alors prioritaire.
+
+
+
+
+
+ contains literal code from some formal language such as a
+programming language.
+ 프로그래밍 언어와 같은 형식 언어의 문자적 부호를 포함한다.
+ 包含一個正式語言的字母代碼,像是一個程式語言。
+ プログラミング言語のような形式言語のコードを示す.
+ contient un code littéral provenant d'un langage
+ formel, comme un langage de programmation.
+ contiene un código alfabético que se deriva de un lenguaje formal, p.ej. un lenguaje de programación.
+ contiene un codice alfabetico derivante da un linguaggio formale, per esempio un linguaggio di programmazione
+
+
+
+
+
+
+
+
+
+ formal language
+ 형식 언어
+ lenguaje formal
+ langage formel
+ linguaggio formale
+ a name identifying the formal language in which the
+ code is expressed
+ 부호가 표현된 형식 언어를 식별하는 이름
+ 表示該代碼的正式語言名稱
+ 当該コードの形式言語名を示す.
+ nom identifiant le langage formel dans
+ lequel le code est exprimé
+ es el nombre que identifica el lenguaje formal en el que se expresa el código.
+ è il nome che identifica il linguaggio formale nel quale viene espresso il codice
+
+
+
+
+
+
+ Size fCheckbox1Size = new Size();
+ fCheckbox1Size.Height = 500;
+ fCheckbox1Size.Width = 500;
+ xCheckbox1.setSize(fCheckbox1Size);
+
+
+
+
+
+
+
+ example
+ 예
+
+ ejemplo
+ exemple
+ esempio
+ contains any kind of illustrative example.
+ 실례적 예의 유형을 포함한다.
+ 包含任何種類的說明範例。
+ 例を示す.
+ contient toutes sortes d'exemples illustratifs.
+ contiene cualquier tipo de ejemplo ilustrativo.
+ contiene un qualsiasi esempio
+
+
+
+
+
+
+
+
+
+
The
+ term element is declared using the following syntax:
+ <![CDATA[<!ELEMENT term (%phrase.content;)>]]
+
+
+
+
+
+
L'élément term est déclaré en utilisant la syntaxe suivante :
+ <![CDATA[<!ELEMENT term (%phrase.content;)>]]
+
+
+
+
+
+
術語元素用於以下語法:
+ <![CDATA[<!ELEMENT term (%phrase.content;)>]]
+
+
+
+
+
If the example contains material in XML markup, either it must be
+enclosed within a CDATA marked section, or character entity
+references must be used to represent the markup delimiters. If the
+ example contains well-formed XML, it should be marked using the
+ more specific egXML element.
+
+
+
Si le contenu de l'exemple est balisé en XML, il y a deux possibilités : soit ce
+ contenu doit être mis dans une section littérale CDATA, soit des références
+ d'entité de caractère doivent être utilisées pour représenter les délimiteurs de
+ balisage. Si l'exemple contient du XML bien formé, il devrait être balisé en
+ utilisant l'élément plus spécifique egXML.
+
+
+
+
+
+
+ example of XML
+ XML의 예
+
+ ejemplo de XML
+ exemple en XML
+ esempio di XML
+ contains a single well-formed XML fragment demonstrating the use of some XML element or
+ attribute, in which the egXML element itself functions as the root element.
+ 어떤 XML 요소 또는 속성의 사용을 나타내는 정형의 단일 XML 예를 포함하며,
+ egXML는 뿌리(최상위) 요소로 기능한다.
+ 包含形式完整的單一XML範例的根結構,用以說明某些XML元素或屬性的使用方法。
+ 要素や属性の使用例を示す,整形式XMLデータによる用例をひとつ含む.要
+ 素egXMLが当該用例の根要素になる.
+ contient un seul exemple en XML bien formé montrant
+ l'utilisation d'un élément ou d'un attribut XML.
+ constituye la raíz de un único ejemplo bien formado según
+ el lenguaje XML que ilustra el uso de un elemento o un atributo XML.
+ contiene un unico esempio ben formato secondo il
+ linguaggio XML che illustra l'impiego di un elemento o attributo XML
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ indicates the intended validity of the example with respect to
+a schema.
+
+ true
+
+
+ the example is intended to be fully valid,
+assuming that its root element, or a provided root element,
+could have been used as a possible root element in the schema concerned.
+
+
+ the example could be transformed into
+a valid document by inserting any number of valid attributes and child
+elements anywhere within it; or it is valid against a version of the
+schema concerned in which the provision of character data, list, element, or attribute
+values has been made optional.
+
+
+ the example is not intended to be valid,
+and contains deliberate errors.
+
+
+
+
+
+
+
+
+ A slide about egXML
+
+ egXML can be used to give XML examples in the TEI
+Examples namespace
+ Attributes values for valid:
+
+ true: intended to be fully
+valid
+ feasible: valid if missing nodes
+provided
+ false: not intended to be valid
+
+
+ The rend attribute in the TEI namespace can be
+used for recording how parts of the example was rendered.
+
+
In the source of the TEI Guidelines, this element declares itself and its content as
+ belonging to the namespace http://www.tei-c.org/ns/Examples. This
+ enables the content of the element to be validated independently against the TEI scheme. Where
+ this element is used outside this context, a different namespace or none at all may be
+ preferable. The content must however be a well-formed XML fragment or document: where this is
+ not the case, the more general eg element should be used in preference. In a TEI context
+ use of the rend attribute in the TEI namespace, as opposed to the TEI Examples namespace,
+ enables recording of rendition information.
+
+
+
+
Dans la source des principes directeurs de la TEI, cet élément se déclare lui-même, ainsi que
+ son contenu, comme appartenant à l'espace de noms http://www.tei-c.org/ns/Examples. Cela permet au contenu de l'élément d'être validé
+ indépendamment du schéma TEI. Lorsque cet élément est utilisé hors de ce contexte, il peut
+ s'avérer préférable de mettre un espace de noms différent ou pas d'espace de nom du tout. Le
+ contenu doit cependant être un document ou un fragment en XML bien formé : si ce n'est pas le
+ cas, on utilisera plutôt l'élément plus général eg .
+
+
+
+
+
+ element name
+ 요소명
+ 通用識別符碼
+ identifiant générique
+ identificador genérico
+ identificatore generico
+ contains the name (generic identifier) of an element.
+ 요소의 이름(일반적 확인소)을 포함한다.
+ 包含一個元素名稱 (通用識別符碼) 。
+ 要素の名前(共通識別子)を含む.
+ contient le nom d'un élément.
+ contiene el nombre (identificador genérico) de un
+ elemento.
+ contiene il nome (identificatore generico) di un elemento
+
+
+
+
+
+
+
+
+
+ supplies the name of the scheme in which this name is defined.
+ 이름이 정의된 스키마의 이름을 제시한다.
+ 提供該標準之識別符碼,此名稱定義於該標準中。
+ 当該名前が定義されているスキーム名を示す.
+ fournit le nom du modèle dans lequel ce nom est
+ défini
+ proporciona el nombra del esquema en el que se define
+ tal nombre.
+ fornisce il nome dello schema in cui è definito tale
+ nome
+
+ TEI
+
+
+ this element is part of the TEI scheme.
+ 이 요소는 TEI 스키마의 부분이다.
+ 此元素為TEI標準的一部份。
+ este elemento es parte del esquema de TEI.
+ 当該要素はTEIスキームにある.
+ cet élément fait partie du modèle TEI.
+ l'elemento è parte dello schema TEI
+
+
+ docbook
+ this element is part of the Docbook scheme.
+ 이 요소는 Docbook 스키마의 부분이다.
+ 此元素為 Docbook標準的一部份。
+ este elemento es parte del esquema de Docbook.
+ 当該要素は,DocBookスキームにある.
+ cet élément fait partie du modèle Docbook.
+ l'elemento è parte dello schema Docbook
+
+
+ unknown
+ 미지의
+ inconnu.
+ sconosciuto
+ desconocido.
+ this element is part of an unknown scheme.
+ 이 요소는 미지의 스키마의 부분이다.
+ 此元素所屬的標準不明。
+ este elemento es parte de un esquema desconocido.
+ 当該要素のスキームは不明.
+ cet élément fait partie d'un modèle inconnu.
+ l'elemento è parte di uno schema
+ sconosciuto
+
+
+ this element is from Schematron.
+ cet élément est défini dans le schéma Schematron.
+
+
+ this element is from the HTML scheme.
+ cet élément est défini dans le schéma HTML.
+
+
+
+
+
+
+
The xhtml:li element is roughly analogous to the item element, as is the
+ listItem element.
+
+
This example shows the use of both a namespace prefix and the schema attribute as alternative
+ ways of indicating that the gi in question is not a TEI element name: in practice only one
+ method should be adopted.
+
+
+
+
L'élément xhtml:li est grosso modo analogue à l'élément item, comme
+ l'est l'élément listItem.
+
+
Cet exemple montre que l'emploi d'un espace de noms préfixe et celui de l'attribut de
+ schéma sont des alternatives possibles pour indiquer que le gi en question n'est
+ pas un nom d'élément TEI : dans la pratique, une seule méthode sera utilisée.
+
+
+
+
元素 xhtml:li大略類似元素item,以及元素 listItem。
+
+
+
+
+
+
+
+ identifier
+ 확인소
+ identificador
+ identifiant
+ identificatore
+ contains an identifier or name for an object of some kind in a formal language. ident is used for tokens such as variable names, class names, type names, function names etc. in formal programming languages.
+ 형식 언어에서 어떤 종류의 개체에 대한 확인소 또는 이름을 포함한다.
+ 包含一個使用正式語言的某種物件的識別符碼或名稱。
+ 形式言語にあるオブジェクトの識別子または名前を示す.
+ contient un identifiant ou un nom dans un langage
+ formel pour un objet quelconque.
+ contiene un identificador o un nombre asignado a un objeto dado en un lenguaje formal.
+ contiene un identificatore o nome assegnato a un dato oggetto in un linguaggio formale
+
+
+
+
+
+
+
+
+
+
+ http://www.tei-c.org/ns/Examples
+
+
+
+
+ http://www.tei-c.org/ns/Examples
+
+
+
+
In running prose, this element may be used for any kind of
+ identifier in any formal language. It should not be used for element and
+ attribute names in XML, for which the special elements gi
+ and att are provided.
+
+
+
Dans un texte courant, cet élément peut être utilisé pour n'importe quelle sorte
+ d'identifiant dans tout langage formel.
+
+
+
+
+
+ balise
+ contains text of a complete start- or end-tag, possibly including attribute specifications,
+ but excluding the opening and closing markup delimiter characters.
+ 속성 명시를 포함하나 시작 및 종료 마크업 구분 문자를 제외한, 완전한 시작 또는 종료 태그의 텍스트를
+ 포함한다.
+ 包含具有完整開始標籤與結束標籤的文字,可能包括屬性說明,但不包含開頭及結尾標記定義符號。
+ 完全な開始タグ,終了タグのテキストを示す.属性規定はとることも可能だ
+ が,タグ開始区切子,タグ終了区切子は含まない.
+ le contenu d'une balise ouvrante ou fermante, avec
+ éventuellement des spécifications d'attributs, mais à l'exclusion des caractères marquant
+ l'ouverture et la fermeture de la balise.
+ contiene el texto completo de un marcador inicial o
+ final, posiblemente incluyendo eventuales descripciones de atributos, pero nunca los caracteres
+ de delimitación de inicio y fin del marcador.
+ contiene il testo completo di un marcatore iniziale o
+ finale, ivi comprese eventuali descrizioni di attributi ma esclusi i caratteri di delimitazione
+ di inizio e fine del marcatore
+
+
+
+
+
+
+
+
+
+ indicates the type of XML tag intended
+ indique quel type de balise XML est prévu.
+ indica di quale tipo di marcatore XML si tratta
+
+
+
+ a start-tag, with delimiters < and > is intended
+ une balise de début, délimitée par les signes
+ <et > est prévue.
+ indica uno start-tag delimitato dai segni
+ < e >
+
+
+ an end-tag, with delimiters </ and > is intended
+ une balise de fin, délimitée par les signes
+ </ and > est prévue.
+ indica un end-tag delimitato dai segni </
+ e >
+
+
+ a empty tag, with delimiters < and /> is intended
+ une balise vide, délimitée par les signes
+ < and /> est prévue.
+ indica un marcatore vuoto delimitato dai segni
+ < e />
+
+
+ a pi (processing instruction), with delimiters <? and ?> is intended
+ un PI (Processing Instruction), délimité par les
+ signes <? and ?> est prévu.
+ indica una pi (istruzione di processing)
+ delimitata dai segni <? e ?>
+
+
+ a comment, with delimiters <!-- and --> is intended
+ Un commentaire délimité par les signes
+ <!-- et --> est prévu.
+ indica un commento delimitato dai segni
+ <!-- e -->
+
+
+ a marked-section, with delimiters <[CDATA[ and ]]> is intended
+ une section marquée, délimitée par les signes
+ <[CDATA[ et ]]> est prévue.
+ indica una sezione marcata, delimitata dai segni
+ <[CDATA[ e ]]>
+
+
+
+
+ supplies the name of the schema in which this tag is defined.
+ 이 이름이 정의된 스키마의 이름을 제공한다.
+ 提供該標準之識別符碼,此名稱定義於該標準中。
+ 当該タグ名が定義されているスキームの名前を示す.
+ fournit le nom du modèle dans lequel ce nom est
+ défini
+ proporciona el nombre del esquema en que tal nombre
+ es definido.
+ fornisce il nome dello schema in cui è definito il
+ nome
+
+ TEI
+
+
+ text encoding initiative
+ 텍스트 부호화 표준
+ This tag is defined as part of the TEI scheme.
+ 이 태그는 TEI 스키마의 부분이다.
+ 此標籤為TEI標準的一部份。
+ esta etiqueta es parte del esquema de TEI.
+ 当該タグは,TEIスキームに属する.
+ cette balise fait partie d'un modèle TEI.
+ il marcatore è parte dello schema TEI
+
+
+ docbook
+ 도크북
+ this tag is part of the Docbook scheme.
+ 이 태그는 Docbook 스키마의 부분이다.
+ 此標籤為Dockbook標準的一部份。
+ esta etiqueta es parte del esquema de Docbook.
+ 当該タグは,DOcbookスキームに属する.
+ cette balise fait partie d'un modèle Docbook.
+ il marcatore è parte dello schema Docbook.
+
+
+ unknown
+ 미지의
+ desconocido
+ inconnu
+ sconosciuto
+ this tag is part of an unknown scheme.
+ 이 태그는 미지의 스키마의 부분이다.
+ esta etiqueta es parte de un esquema desconocido.
+ 当該タグは,不明スキームに属する.
+ cette balise fait partie d'un modèle inconnu.
+ il marcatore è parte di uno schema
+ sconosciuto
+
+
+
+
+
+
+
+ Mark the start of each italicised phrase with a
+ hi rend="it" tag, and its end with a hi tag.Example updated on 2008-04-05
+
+
+
+ Marque le début de tout groupe de mots en
+ italique avec la balise hi rend="it", et le termine avec le tag hi
+ Example updated on 2008-04-05
+
+
+
+ 於所有斜體字的前頭以hi rend="it"
+ 標籤,並以/hi標籤結尾。
+
+
+
+
+
+ value
+ 값
+ 屬性值
+ valeur
+ valor
+ valore
+ contains a single attribute value.
+ 단일 속성 값을 포함한다.
+ 包含單一屬性值。
+ 属性値をひとつ示す.
+ contient une seule valeur d'attribut.
+ contiene el valor de un atributo.
+ contiene un unico valore di attributo
+
+
+
+
+
+
+
+
+
+ unknown
+
+
+
+
+ inconnu
+
+
+
+
+ 未知
+
+
+
+
+
+
+
+ specification list
+ 명시 목록
+ lista de especificación
+ liste de spécification
+ lista di specifiche
+ marks where a list of descriptions is to be inserted into the prose documentation.
+ 기술 목록이 산문체 문서에 삽입된 위치를 표시한다.
+ 標記一敘述列表插入散文文件的位置。
+ 解説のリストが,散文形式の解説文中に挿入される場所を示す.
+ marque l'endroit où insérer une liste de
+ descriptions dans le texte documentaire.
+ marca donde debe inserirse una determinata lista de descripciones al interno de la documentación .
+ indica dove all'interno della documentazione deve essere inserita una determinata lista di descrizioni
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ specification description
+ 명시 기술
+ 元素或元素集描述
+ specification description
+ descripción de elemento o clase.
+ descrizione di elemento o classe
+ indicates that a description of the specified element or class should be included at this
+ point within a document.
+ 명시된 요소 또는 부류에 대한 기술이 문서 내 이 지점에 포함되었음을 나타낸다.
+ 指出指定元素或元素集的描述應在此包括在文件中。
+ 特定された要素またはクラスの解説は,文書中のこの場所にあるべきである ことを示す.
+ indique qu'une description de l'élément particulier ou de
+ la classe particulière doit être incluse à ce point dans un document.
+ indica el punto del documento en el que debe inserirse la
+ descripción de un elemento dado o de una clase dada.
+ indica il punto del documento nel quale deve essere
+ inserita la descrizione di un dato elemento o di una data classe
+
+
+
+
+
+
+
+
+
+ identifier
+ 확인소
+ 識別符碼
+ identifiant
+ identificador
+ identificatore
+ supplies the identifier of the documentary element or class for which a description is
+ to be obtained.
+ 기술이 얻어진 문서 요소 또는 부류에 대한 확인소를 제시한다.
+ 提供文件元素或元素集的識別符碼。
+ 解説が表される,記録用の要素またはクラスの識別子を示す.
+ donne l'identifiant de l'élément ou de la classe
+ documentaire pour lequels la description est à faire.
+ adscribe un identificador al elemento o a la clase
+ que se está describiendo.
+ assegna un identificatore all'elemento o alla classe
+ per i quali deve essere fornita una descrizione
+
+
+
+
+
+
+
+
+
+
+
+
+
+ attributes
+ 속성
+ 屬性
+ attributs
+ atributo
+ attributi
+ supplies attribute names for which descriptions should additionally be obtained.
+ 기술이 부가적으로 얻어진 속성명을 제시한다.
+ 提供其屬性描述應另外包含的屬性名稱。
+ 解説が付加的に表される属性名を示す.
+ donne les noms des attributs dont il faut une
+ description supplémentaire.
+ proporciona nombres de atributo pera los que se debe
+ proporcionar una descripción.
+ indica dei nomi di attributi per i quali devono
+ essere fornite delle descrizioni
+
+
+
+
+
+
+
+
+
+
+
+
+
The attribute names listed may include both attributes inherited from a class and those
+ defined explicitly for the associated element.
+
+
+
Les noms d'attribut listés peuvent inclure à la fois des attributs hérités d'une classe
+ et ceux qui sont définis explicitement pour l'élément associé.
The description is usually displayed as a label and an item. The
+ list of attributes may include some which are inherited by virtue of an element's class
+ membership; descriptions for such attributes may also be retrieved using another
+ specDesc, this time pointing at the relevant class.
+
+
+
La description est habituellement affichée sous la forme d'une étiquette et d'un contenu. La liste d'attributs peut inclure des
+ attributs hérités en vertu de leur appartenance à une classe d'éléments ; les descriptions de
+ ces attributs peuvent également être récupérées en utilisant un autre élément
+ specDesc qui pointe cette fois vers la classe pertinente.
Modules and Schemas
+ points to the specification for an attribute or model class which is to be included in a schema
+
+
+
+
+
+
+
+
+
+
+
+
+ the identifier used for the required class within the
+ source indicated.
+
+
+
+
+ indicates how references
+ to this class within a content model should be interpreted.
+
+
+ any one member of the class may appear
+
+
+ a single occurrence
+ of all members of the class may appear in sequence
+
+
+ a single occurrence of
+ one or more members
+ of the class may appear in sequence
+
+
+
+ one or more
+ occurrences of one or more members of the class
+ may appear in sequence.
+
+
+ one or more
+ occurrences of all members of the class may appear in sequence
+
+
+
If the members of the class are a, b
+and c, then a reference to the class within a content
+model is understood as being a reference to a|b|c when
+expand has the value alternation; to
+a,b,c when it has the value sequence; to
+(a?,b?,c?) when it has the value
+sequenceOptional; to (a*,b*, c*) when it has the value
+sequenceOptionalRepeatable; or to (a+,b+,c+) when it has
+the value sequenceOptionalRepeatable.
+
+
+
+ supplies a list of class members which are to be included in the schema being defined.
+
+
+
+ supplies a list of class members which are to be excluded from the schema being defined.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Attribute and model classes are identified by the name supplied as value for the
+ ident attribute on the classSpec element in
+ which they are declared. All TEI names are unique; attribute
+ class names conventionally begin with the latters att..
+
+
+
+
+
+
+ points to the specification for some element which is to be included in a schema
+
+
+
+
+
+
+
+
+
+
+
+
+ the identifier used for the required element within the
+ source indicated.
+
+
+
+
+
+
+
+
Include in the schema an element named p available from the
+ current default source.
+
+
+
+
+
+
Include in the schema an element named p
+ available from the TEI P5 1.2.1 release.
+
+
+
Elements are identified by the name supplied as value for the
+ ident attribute on the elementSpec element in
+ which they are declared. TEI element names are unique.
+
+
+
+
+
+
+ points to the specification for some pattern which is to be included in a schema
+
+
+
+
+
+
+
+
+
+
+
+ the identifier used for the required pattern within the
+ source indicated.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Patterns or macros are identified by the name supplied as value for the
+ ident attribute on the macroSpec element in
+ which they are declared. All TEI macro names are unique.
+
+
+
+
+
+
+ module reference
+ 모듈 참조
+ referencia de módulo
+ référence de module
+ riferimento al modulo
+ references a module which is to be incorporated into a schema.
+ 하나의 스키마로 통합된 모듈을 참조한다.
+ 參照一個被併入某一模型的模組。
+ スキーマに組み入れられるモジュールを参照する.
+ référence un module qui doit être incorporé dans
+ un schéma.
+ indica un módulo que se ha de incluir al interno de un esquema.
+ indica un modulo da includere all'interno di uno schema
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Child elements of are only allowed when an external module is being loaded
+
+
+
+
+
+
+ specifies a default prefix which will be
+ prepended to all patterns from the imported module
+
+
+
+
+ The prefix attribute
+ of should not match that of any other
+ element (it would defeat the purpose)
+
+
+
+
+
Use of this attribute avoids name collisions (and
+ thus invalid schemas) when the external schema being
+ mixed in with TEI uses a name the TEI or some other
+ included external schema already uses for a
+ pattern.
+
+
+
+
+ supplies a list of the elements which are to be copied from the
+specified module into the schema being defined.
+
+
+
+ supplies a list of the elements which are not to be copied from the
+specified module into the schema being defined.
+
+
+
+
+
+ the name of a TEI module
+ el nombre de un módulo de TEI
+ le nom d'un module TEI.
+ nome di un modulo TEI
+
+
+
+ uniform resource locator
+ localizador de recurso uniforme
+ URL
+ URL
+ refers to a non-TEI module of RELAX NG code by external location
+ se refiere a un módulo no-de-TEI del código de RELAX NG mediante una localización externa
+ fait référence à un module non TEI de code
+RELAX NG par une localisation externe.
+ indica la collocazione esterna di un modulo non TEI che utilizza il codice RELAX NG
+
+
+
+
+
+
+
+
+
This includes all objects available from the linking module.
+
+
+
+
+
+
Cela implante le module linking .
+
+
+
+
+
+
This includes all elements available from the linking module
+ except for the link and linkGrp elements.
+
+
+
+
+
+
+
This includes only the link and linkGrp
+ elements from the linking module.
+
+
+
+
+
+
+
+
If neither include nor exclude is
+ supplied, the effect of this element is to make all the declarations
+ contained by the referenced module available to the schema being
+ compiled. If both attributes are supplied, an ODD
+processor should signal an error.
+
A TEI module is identified by the name supplied as value for
+ the ident attribute on a moduleSpec
+ element. The source attribute may be used to specify an
+ online source from which the specification of that module may be
+ read. A URI may alternatively be supplied in the case of a non-TEI
+ module, and this is expected to be written as a RELAX NG schema.
+
+
+
+
Les modules sont identifiés par le nom fourni comme valeur de l'attribut
+ ident dans l'élément moduleSpec où ils sont déclarés. Un URI
+ peut aussi être indiqué dans le cas d'un module non TEI et l'on s'attend à ce qu'il
+ soit écrit comme un schéma RELAX NG.
+
La fonction de cet élément est de rendre toutes les déclarations contenues par le module
+ référencé disponibles pour le schéma que l'on compile.
+
+
+
+
+
+ module specification
+ 모듈 명시
+ especificación de módulo
+ spécification de module
+ specifica del modulo
+ documents the structure, content, and purpose of a single
+module, i.e. a named and externally visible group of declarations.
+ 하나의 모듈에 대한 구조, 내용 및 목적을 기록한다. 즉, 선언의 이름과 외부적으로 가시적인 그룹
+ 記錄單一模組的結構、內容、以及用途,例如:一個已命名且外部明確的宣告組。
+ いちモジュールの構造,内容,目的を記録する.例えば,外部から名前で参
+ 照可能な宣言集合などである.
+ documente la structure, le contenu et les
+ fonctions d'un module, i.e. d'un groupe de déclarations nommé et
+ visible extérieurement.
+ documenta la estructura, el contenido y la finalidad de un único módulo, es decir, un grupo de declaraciones específicamente indicado y visible externamente.
+ documenta struttura, contenuto e scopo di un unico modulo, cioè un gruppo di dichiarazioni specificamente indicato ed esternamente visibile
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Names and Dates
+ Additional elements for names and dates
+
+
+
+
+
+
+
+ schema specification
+ 스키마 명시
+ especificación de esquema
+ spécification de schéma
+ specifica dello schema
+ generates a TEI-conformant schema and documentation for it.
+ TEI 구조 스키마 및 문서를 생성한다.
+ 建立一個符合TEI標準的模型以及該模型文件。
+ TEI準拠のスキーマや文書を示す.
+ génère un schéma conforme à la TEI et la
+ documentation qui l'accompagne.
+ genera un esquema TEI-conforme y la documentación relativa.
+ genera uno schema TEI-conforme e la relativa documentazione
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ specifies entry points to the schema, i.e. which patterns
+ may be used as the root of documents conforming to
+ it.
+ 스키마에서 표제 항목 지점을 명시한다. 즉, 어떤 요소가 해당 문서의 뿌리로 사용되는 것이 허용되었는지를 명시한다.
+ 指出該模型的初步條件,例如在符合該模型標準的文件中,那些元素可做為文件的根元素。
+ 当該スキーマの開始点を示す.すなわち,TEI準拠文書の根要素となる
+ 要素を示す.
+ précise les points d'accès au schéma,
+ i.e. quels sont les éléments permis comme racine des documents XML qui se
+ conforment à ce schéma.
+ especifica los puntos de acceso al esquema, es decir, qué elementos son los permitidos para ser usados como raíz de los documentos conforme al esquema mismo.
+ specifica i punti di accesso allo schema, cioè quali elementi sono consentiti come radice dei documenti conformi allo schema stesso
+
+ TEI
+
+
+ specifies a default prefix which will be prepended to all
+ patterns relating to TEI elements, unless otherwise stated.
+ TEI 요소와 관련된 모든 유형에 첨가될 접두사를 명시한다. 이는 TEI로서 동일 이름의 요소를 갖는 외부 스키마가 혼용되는 것을 허용한다.
+ 指明一個附加在所有和TEI元素相關的模式中的前綴。這使得外部模型可以和TEI結合,這些外部模型具有和TEI元素名稱相同的元素。
+ TEI要素の全パタンに対応する接頭辞を示す.これにより,TEIと同じ名
+ 前を持つ外部スキーマを混在させることができる.
+ précise un préfixe qui sera ajouté à tous
+ les modèles de définition des éléments de la TEI. Cela autorise l'introduction
+ des schémas externes ayant des éléments de même nom que ceux de la TEI
+ especifica un prefijo que será antepuesto a todos los patrones relativos a los elementos TEI.
+ indica un prefisso che sarà anteposto a tutti i pattern relativi a elementi TEI; questo consente
+
+
+
+
+
Use of this attribute allows an external schema which
+ has an element with the same local name as a TEI element to
+ be mixed in.
+
+
+
Les deux-points, bien qu'ils soient permis à l'intérieur de la valeur, provoqueront la
+ génération d'un schéma invalide.
+
+
+
+ コロンは,値としては認められるが,スキーマ中では使用できない.
+
+
+
+
+ target language
+ 목적 언어
+ lengua meta
+ langue cible
+ lingua di arrivo
+ specifies which language to use when creating
+ the objects in a schema if names for elements or attributes are available in more
+ than one language
+ 요소 또는 속성의 이름을 만들기 위해 여러 언어에서 사용가능한 경우, 스키마에서 대상을 만들 때 사용하는 언어를 명시한다.
+ 若元素或屬性名稱所使用的語言有一種以上,說明建立文件模型時要使用那一種語言。
+ 要素や属性の名前が複数言語である場合には,スキーマ中の対象を作成
+ する際に使用される言語を特定する.
+ lorsque des noms pour un élément ou pour
+ un attribut sont disponibles en plusieurs langues, précise quelle langue
+ utiliser lors de la création d'objets dans un schéma .
+ indica la lengua que se utiliza para la creación de objetos en el esquema en el caso en que los nombres de elementos o atributos esten disponibles en otras lenguas.
+ indica la lingua da utilizzare per la creazione di oggetti nello schema nel caso in cui i nomi di elementi o attributi siano disponibili in più lingue
+
+
+
+ documentation language
+ 문서화 언어
+ lengua de la documentación
+ langue de documentation
+ lingua della documentazione
+ specifies which languages to
+ use when creating documentation if the description for an element, attribute, class or macro
+ is available in more than one language
+ 요소, 속성, 부류 또는 매크로에 대한 기술이 여러 언어에서 사용 가능한 경우, 문서를 만들 때 사용하는 언어를 명시한다.
+ 若元素、屬性、元素集或巨集指令描述所使用的語言有一種以上,說明建立文件時要使用那一種語言。
+ 要素,属性,クラス,マクロの解説が複数言語で可能な場合,解説の言
+ 語を特定する.
+ lorsque la description pour un élément,
+ un attribut, une classe ou une macro est disponible en plusieurs langues,
+ précise quelle langue utiliser lors de la création de la documentation.
+ indica la lengua que se ha de utilizar para la creación de la documentación en el caso en que las descripciones de elementos, atributos, clases o macros esten disponibles en más lenguas.
+ indica la lingua da utilizzare per la creazione della documentazione nel caso in cui le descrizioni di elementi, attributi, classi o macro siano disponibili in più lingue
+
+
+
+
+
+
+
+
+
+
+
+
+
This schema combines elements from the current versions of the drama and core
+modules, the current release version of the header module, and elements
+from an existing RELAXNG schema available from the URL indicated.
+
+
+
A schemaSpec combines references to modules,
+ individual element or macro declarations, and specification groups
+ together to form a unified schema. The processing of the
+ schemaSpec element must resolve any conflicts amongst the
+ declarations it contains or references. Different ODD processors
+ may generate schemas and documentation using different concrete
+ syntaxes.
+
+
+
Un schéma combine des références aux modules ou aux groupes de spécifications avec
+ d'autres déclarations atomiques. Le traitement d'un élément de schéma doit résoudre
+ tous les conflits entre les déclarations qu'il contient ou les références. Des
+ processeurs ODD différents peuvent générer des schémas et une documentation en
+ utilisant différentes syntaxes concrètes.
+
+
+
+
+
+
+
+ specification group
+ 명시 그룹
+ 說明群組
+ groupe de spécifications
+ grupo de instrucciones
+ gruppo di istruzioni
+ contains any convenient grouping of specifications for use within
+ the current module.
+ 현 모듈 내에서 사용에 대한 명시를 다양한 방법의 그룹화를 포함한다.
+ 包含在現有模組中的細節使用說明群組。
+ 当該モジュール中にある規定をまとめる.
+ contient tout regroupement approprié de
+ spécifications pour une utilisation dans le module en question.
+ contiene cualquier agrupación funcional de instrucciones para el uso al interno del módulo corriente
+ contiene un qualsiasi raggruppamento funzionale di istruzioni per l'uso all'interno del modulo corrente
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
This specification group with identifier xDAILC
+contains specifications for the elements
+s,cl,w, etc.
+
+
+
+
+
+
+
+
+
+
+
+
Le groupe de spécification avec l'identifiant xDAILC contient des
+ spécifications pour les éléments s,cl,w, etc.
+
+
+
A specification group is referenced by means of its
+ xml:id attribute. The declarations it contains may be
+ included in a schemaSpec or moduleSpec element
+ only by reference (using a specGrpRef element): it may
+ not be nested within a moduleSpec element.
+
Different ODD processors may generate
+ representations of the specifications contained by a
+ specGrp in different concrete syntaxes.
+
+
+
Un groupe de spécifications est référencé au moyen de son attribut xml:id.
+ Les déclarations qu'il contient ne peuvent être incluses dans un élément
+ module que par référence (en utilisant un élément specGrpRef) : il
+ ne peut être imbriqué dans un élément module.
+
Différents processeurs ODD peuvent générer des représentations des spécifications
+ contenues par un élémentspecGrp dans différentes syntaxes concrètes.
+
+
+
+
+
+ reference to a specification group
+ 명시 그룹에 대한 참조
+ 參照到一個說明群組
+ référence à un groupe de spécifications
+ referencia a un grupo de instrucciones
+ riferimento a gruppo di istruzioni
+ indicates that the declarations contained by the specGrp referenced should be
+ inserted at this point.
+ 참조된 specGrp에 의해 포함된 선언은 이 지점에서 삽입되어야함을 나타낸다.
+ 指出被參照的元素specGrp中的宣告應在此插入。
+ 要素specGrpにより含まれる宣言が,この場所に挿入されるべきこ とを示す.
+ indique que les déclarations contenues dans l'élément
+ specGrpréférencé doivent être insérées à cet endroit.
+ indica el punto en el que deben inserirse las
+ declaraciones contenidas en el specGrp indicado.
+ indica il punto in cui devono essere inserite le
+ dichiarazioni contenute nello specGrp indicato
+
+
+
+
+
+
+
+
+
+ points at the specification group which logically belongs here.
+ 여기에 국부적으로 소속된 명시 그룹을 가리킨다.
+ 指向照理屬於此位置的說明群組。
+ 論理的にはこの場素にある規定グループを参照する.
+ pointe vers l'élément specGrp qui doit
+ logiquement être référencé à cet endroit.
+ indica el grupo de instrucciones que por lógica
+ corresponde a ese punto en cuestión.
+ indica il gruppo di istruzioni che per logica
+ corrisponde al punto in questione
+
+
+
+
+
+
This part of the module contains declarations for names of persons, places, and
+ organisations:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Cette partie du module contient les déclarations pour les noms de personnes, de lieux,
+ des organismes :
+
+
+
+
+
+
+
+
+
+
+
這部份的模組包含人名、地名以及組織名稱的宣告:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
In ODD documentation processing, a specGrpRef usually produces a comment indicating
+ that a set of declarations printed in another section will be inserted at this point in the
+ specGrp being discussed. In schema processing, the contents of the specified
+ specGrp are made available for inclusion in the generated schema.
+
The specification group identified by the target attribute will normally be part
+ of the current ODD document.
+
+
+
Dans le traitement de la documentation ODD, un élément specGrpRef produit
+ habituellement un commentaire indiquant qu'un ensemble de déclarations imprimé dans une autre
+ section sera inséré à cet endroit dans le specGrp que l'on traite. Dans un traitement
+ de schéma, les contenus du specGrp spécifié sont rendus disponibles pour être inclus
+ dans le schéma généré.
+
Le groupe de spécifications identifié par l'attribut target fera normalement
+ partie du document ODD en cours.
Specification Elements
+ element specification
+ 요소 명시
+
+ especificación del elemento
+ spécification d'élément
+ specifica dell'elemento
+ documents the structure, content, and purpose of a
+ single element type.
+ 단일 요소 유형의 구조, 내용 및 목적을 기록한다.
+ 紀錄單一元素類型的結構、內容、以及用途。
+ 構造,内容,その要素の目的などを示す.
+ documente la structure, le contenu et l'emploi d'un
+ élément.
+ documenta la estructura, contenido y finalidad de un
+ único tipo de elemento.
+ documenta struttura, contenuto e scopo di un unico
+ tipo di elemento
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ specifies a default prefix which will be
+ prepended to all patterns relating to the element, unless otherwise stated.
+
+
+
Colons, although permitted inside the value, will cause an invalid schema to be
+ generated.
+
+
+
Les deux-points, bien qu'ils soient permis à l'intérieur de la valeur, provoqueront la
+ génération d'un schéma invalide.
+
+
+
コロンは,値としては認められるが,スキーマ中では使用できない.
+
+
+
+
+
+
+
+
+ contains literal code
+
+
+
+
+
+
+
+
+ the language of the code
+
+
+
+
+
+
+
+
+
+
+
+ contient le code littéral
+
+
+
+
+
+
+
+
+ la langue du code
+
+
+
+
+
+
+
+
+
+
+
+
+ 包含文字規則
+
+
+
+
+
+
+
+
+ 規則的表達方式
+
+
+
+
+
+
+
+
+
+
+
+
+
+ class specification
+ 부류 명시
+
+ especificación de la clase
+ spécification de classe
+ indicazione di classe
+ contains reference information for a TEI element class;
+that is a group of
+ elements which appear together in content models, or
+ which share some common attribute, or both.
+ TEI 요소 부류에 대한 참조 정보를 포함한다; 이것은 내용 모델에서 함께 나타나거나, 공통 속성을 공유하거나, 이 둘을 포괄하는 요소들의 그룹이다.
+ 包含一個TEI元素集的參照資訊;元素集是一群在內容模組中同時出現、或共用某些屬性、或兩者皆包括的元素。
+ TEI要素クラスにおける参照情報を示す.内容モデルに出現する要素のまと
+ まり,共通する属性のまとまり,またはその両方.
+ contient des informations de référence pour une
+ classe d'éléments TEI, c'est-à-dire un groupe d'éléments qui figurent ensemble
+ dans des modèles de contenu ou qui partagent un attribut commun, ou qui ont l'un et l'autre.
+ contiene informaciones relativas a una clase de elementos TEI, es decir, a un grupo de elementos que aparecen juntos en modelos de contenido, o que tienen algunos atributos en común, o ambas cosas.
+ contiene informazioni relative a una classe di elementi TEI, cioè un gruppo di elementi che compaiono insieme in modelli di contenuto, oppure che hanno alcuni attributi in comune, o entrambe le cose
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ indicates whether this is a model class or an attribute class
+ 모델 부류 또는 속성 부류 여부를 나타낸다.
+ 指出這是結構元素集或是屬性元素集。
+ 当該クラスがモデルクラスか属性クラスかを示す.
+ indique si c'est une classe de modèles ou
+ une classe d'attributs
+ indica si se trata de una clase de modelos o de atributos.
+ indica se si tratta di una classe di modelli o di attributi
+
+
+
+ content model
+ 내용 모델
+ modelo de contenido
+ modèle de contenu
+ modello di contenuto
+ members of this class appear in the same content models
+ 이 부류의 원소는 동일 내용 모델에서 나타난다.
+ 該元素集的元素出現在相同的內容模組中
+ 内容モデルクラス.
+ les membres de cette classe
+ figurent dans les mêmes modèles de contenu
+ los miembros de esta clase aparecen en los mismos modelos de contenido.
+ i membri di questa classe compaiono negli stessi modelli di contenuto
+
+
+ attributes
+ 속성
+ atributos
+ attributs
+ attributi
+ members of this class share common attributes
+ 이 부류의 원소는 공통 속성을 공유한다.
+ 該元素集的元素有共用的屬性
+ 属性クラス.
+ les membres de cette classe
+ partagent des attributs communs
+ los miembros de esta clase tienen algunos atributos comunes.
+ i membri di questa classe hanno alcuni attributi in comune
+
+
+
+
+ indicates which alternation and sequence instantiations
+ of a model class may be referenced. By default, all variations
+ are permitted.
+ 모델 부류의 교체 및 일련의 인스턴스 생성이 참조될 수 있음을 나타낸다. 기본적으로 모든 변이형이 허용된다.
+ 說明應該建立結構元素集的哪些替換及順序作業實例。在預設的情形下,會提供所有的變數。
+ モデルクラスのインスタンスとしてある選択肢を示す.デフォルトでは,
+ あらゆるものが可能である.
+ donne les règles régissant dans une
+ instance TEI l'ordre et l'alternance des éléments définis par la classe. Par
+ défaut, toutes les variations sont données.
+ indica que alternancia y que tipos de secuencia se establecen para una clase de modelos; por defecto se indican todas las variaciones.
+ indica quale alternanza e quali tipi di sequenza stabilire per una classe di modelli; di norma sono indicate tutte le variazioni
+
+
+
+ members of the class are alternatives
+ 부류의 원소들은 선택가능 항목이다.
+ 該元素集的元素是替換元素
+ 当該クラスの構成要素は,選択的である.
+
+ les membres de la classe
+ constituent des alternatives
+ los miembros de las clase estan en relación de alternancia.
+ i membri della classe sono in relatione di alternanza
+
+
+ members of the class are to be provided in sequence
+ 부류의 원소는 차례대로 제시된다.
+ 該元素集的元素會依序呈現
+ 当該クラスの構成要素は,リストとしてある.
+
+ les membres de la classe doivent
+ tous être donnés dans l'ordre indiqué
+ los miembros de las clase se indican en secuencia.
+ i membri della classe devono essere indicati in sequenza
+
+
+ members of the class may be provided, in sequence,
+ but are optional
+ 부류의 원소는 차례대로 제시될 수 있지만 수의적이다.
+ 該元素集的元素可依序呈現,但非必須
+ 当該クラスの構成要素は,リストから選択される.
+
+ les membres de la classe peuvent
+ être donnés, dans l'ordre indiqué, mais sont facultatifs
+ los miembros de la clase pueden proporcionarse en modo de secuencia pero son opcionales.
+ i membri della classe possono essere indicati in sequenza ma sono facoltativi
+
+
+ members of the class may be provided one or more
+ times, in sequence, but are optional.
+ 부류의 원소들은 한 번 이상 그리고 차례대로 제시될 수 있지만 수의적이다.
+ 該元素集的元素可一次或多次依序呈現,但非必須
+ 当該クラスの構成要素は,リストから1つ以上が選択される.
+
+ les membres de la classe peuvent
+ être donnés une ou plusieurs fois, dans l'ordre indiqué, mais sont
+ facultatifs
+ los miembros de la clase pueden indicarse una o más ocasiones en secuencia, pero son opcionales.
+ i membri della classe possono essere indicati una o più volte in sequenza ma sono facoltativi
+
+
+ members of the class may be provided one or more times, in sequence
+ 부류의 원소들은 차례대로 한 번 이상 제시될 수 있다.
+ 該元素集的元素可一次或多次依序呈現
+ 当該クラスの構成要素は,リストから1つ以上が選択される.
+
+ les membres de la classe doivent
+ être donnés au moins une fois, dans l'ordre indiqué.
+ miembros de la clase pueden ser indicados una o más veces en secuencia.
+ i membri della classe possono essere indicati una o più volte in sequenza
+
+
+
+
+
+
+
+ groups elements used for arbitrary segmentation.
+
+
+
+
+
The principles on which segmentation is carried out, and
+any special codes or attribute values used, should be defined explicitly
+in the segmentation element of the encodingDesc within
+the associated TEI header.
+
+
+
+
+
+
+
+ regroupe des éléments utilisés pour des segmentations arbitraires.
+
+
+
+
+
Les principes selon lesquels la segmentation est effectuée, et tous les codes
+ spéciaux ou toutes les valeurs d'attribut utilisées, devraient être définis
+ explicitement dans l'élémentsegmentation de l'élémentencodingDesc
+ dans l'en-tête TEI associé.
+
+
+
+
+
+
+
+ 匯集用於隨機分割的元素
+
+
+
+
+
The principles on which segmentation is carried out, and any special codes or attribute
+ values used, should be defined explicitly in the segmentation element of the
+ encodingDesc within the associated TEI header.
+
+
+
+
+
+
+
+
+
+ datatype specification
+ documents a datatype.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ defines the range of
+ attribute values used to provide a single URI, absolute or relative,
+ pointing to some other resource, either within the current document
+ or elsewhere.
+
+
+
+
+
+
+
+
+
+
+
+ macro specification
+ 매크로 명시
+
+ macroespecificación
+ spécification de macro.
+ indicazione di macro
+ documents the function and implementation of a pattern.
+ 유형의 기능 및 구현을 기록한다.
+ 記錄模式的功能與實行。
+ パタンの機能や実装を解説する.
+ documente la fonction et l'implémentation d'un
+ modèle.
+ documenta la función y la aplicación de un pattern (patrón).
+ documenta la funzione e l'applicazione di un pattern
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ indicates which type of entity should be generated, when an ODD
+ processor is generating a module using XML DTD syntax.
+ ODD 프로세서는 XML DTD 통사규칙을 사용하는 모듈을 생성할 때, 개체의 유형이 생성됨을 나타낸다.
+ 指出當一個ODD處理器使用SGML語法建立模組時,應建立哪種類型的實體。
+ ODDソフトウェアがXML DTDによるモジュールを生成する際,どの種類の
+ エンティティが生成されるかを示す.
+ indique quel type d'entité doit être
+ généré lorsqu'un processeur "ODD" génère un module TEI qui
+ utilise la syntaxe XML DTD.
+ indica que tipo de entidad debe generarse cuando un procesador ODD genera un módulo utilizando la sintaxis SGML
+ indica quale tipo di entità deve essere generata quando un processore ODD genera un modulo utilizzando la sintassi SGML
+
+
+
+ parameter entity
+ entité paramètre
+ entità parametro
+ entidad parámetro
+
+
+ datatype entity
+ entité type de données
+ entità tipo di dati
+ entidad tipo de datos
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Common Elements
Description of Components
Exemplification of Components
Classification of Components
+ remarques
+ contains any commentary or discussion about the usage of an element, attribute, class, or
+ entity not otherwise documented within the containing element.
+ 포함 요소 내에서 다르게 기록된 것이 없다면 요소, 속성, 부류 또는 개체의 사용 예에 관한 논평 또는
+ 토론을 포함한다.
+ 包含任何關於元素、屬性、元素集,或實體的使用資訊之評論或討論,該元素、屬性、元素集或實體未以其他方式紀錄在所包含的元素中。
+ 要素,属性,クラス,エンティティに関する,まだ文書化されていない解説 や論議を示す.
+ contient tout commentaire sur l'utilisation d'un élément,
+ d'un attribut, d'une classe ou d'une entité qui n'est pas documentée ailleurs à l'intérieur de
+ l'élément conteneur.
+ contiene cualquier comentario o explicación relativa al
+ uso de elementos, atributos, clases o entitades no documentados de otra manera en el elemento
+ que los contiene.
+ contiene un qualsiasi commento o discussione relativi
+ all'utilizzo di elementi, attributi, classi o entità non altrimenti documentati nell'elemento
+ che li contiene
+
+
+
+
+
+
+
+
+
+
+
+
+
This element is probably redundant.
+
+
+
+
+
+
+
Cet élément est probablement superflu.
+
+
+
+
+
+
+
此元素可能是多餘的
+
+
+
+
+
Contains at least one paragraph, unless it is empty.
+
As defined in ODD, must contain paragraphs; should be special.para
+
+
+
Contient au moins un paragraphe, sauf s'il est vide.
+
Comme c'est défini en ODD, doit contenir des paragraphes ; devrait être special.para
+
+
+
空要素でなければ,少なくとも段落をひとつ含む.
+
ODDにあるよう,段落を含む必要がある.
+
+
+
+
+
+
+
+
+ list of references
+ 참조 목록
+ 參照列表
+ liste de références
+ lista de referencias
+ lista di riferimenti
+ supplies a list of significant references to places where this element is discussed, in the
+ current document or elsewhere.
+ 현 문서 또는 그 밖의 어디든지 이 요소는 논의된 위치에 대한 중요한 참조 목록을 제공한다.
+ 提供一個重要參照的列表,這些參照連結到詳述此元素的位置,在此文件裡或是其他地方。
+ 場所への参照のリストを示す.当該文書中でも外部文書でもよい.
+ fournit une liste de références signifiantes là où cet
+ élément est commenté, dans le document courant ou ailleurs.
+ proporciona una lista de referencias significativas a
+ puntos, en el documento corriente u otro lugar, en el que se discute el elemento en cuestión.
+ fornisce una lista di riferimenti significativi a punti,
+ nel documento corrente o altrove, in cui è discusso l'elemento in questione
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ exemple
+ groups an example demonstrating the use of an element along with optional paragraphs of
+ commentary.
+ 요소의 사용을 나타내는 단일 예를 포함한다. 수의적으로 논평문단과 함께 나타난다.
+ 包含說明某一元素使用的單一範例,可任意配合註解段落。
+ 要素の使用例をひとつ示す.段落単位の解説を伴うかもしれない.
+ contient un exemple qui montre l'utilisation d'un élément
+ avec de possibles paragraphes de commentaires.
+ contiene un ejemplo demostrativo del uso de un elemento,
+ junto a eventuales párrafos explicativos.
+ contiene un unico esempio che illustra l'utilizzo di un
+ elemento insieme ad eventuali paragrafi di discussione
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
The name element can be used for both personal names and place names:
+ <![CDATA[ <q>My dear <name type="person">Mr.
+ Bennet</name>,</q> said his lady to him one day,
+ <q>have you heard that <name type="place">Netherfield
+ Park</name> is let at last?</q>]]>
+
As shown above, the type attribute may be used to distinguish the one from the
+ other.
+
+
+
+
+
+
+
L'élémentname est employé à la fois pour les noms propres de personne et de
+ lieu :
+
+ <q>
+ <name type="person">Mrs. Parker</name>, connaît un épicier bulgare, nommé, <name
+ type="person">Popochef Rosenfeld</name>qui vient d'arriver de <name type="place"
+ >Constantinople</name>. C'est un grand spécialiste en yaourts.</q>
+
+
Comme il est indiqué ci-dessus, l'attributtype peut être utilisé pour
+ distinguer un élément de l'autre.
+
+
+
+
+
+
+
+ classes
+ specifies all the classes of which the documented element or
+class is a member or subclass.
+ 기록된 요소 또는 부류가 원소 또는 하위부류인 모든 부류를 명시한다.
+ 標明所記錄的元素或元素集所屬或是附屬的所有元素集。
+ 当該文書化されている要素やクラスの構成要素や下位クラスを示す.
+ précise toutes les classes dont la classe ou
+ l'élément documentés est un membre ou une sous-classe.
+ especifica todas las clases de las que el elemento o la clase indicados son un miembro o una subclase.
+ indica tutte le classi delle quali l'elemento o la classe indicati sono un membro o una sottoclasse
+
+
+
+
+
+
+
+
+
+
+ specifies the effect of this declaration on its parent
+ module.
+ 부모 모듈에 이 선언의 효과를 명시한다.
+ especifica el efecto de esta declaración en su módulo padre.
+ 当該宣言が親モジュールに与える影響を示す.
+ indique l'effet de cette déclaration sur son
+module parent.
+ indica l'effetto della dichiarazione sul modulo da cui trae origine
+
+ replace
+
+
+ this declaration changes the declaration of the same
+ name in the current definition
+ 이 선언은 현 정의에서 동일 이름의 선언을 변경한다.
+ esta declaración cambia la declaración del mismo nombre en la definición actual
+ 当該宣言は,現行定義中にある同名宣言を修正する.
+
+ cette déclaration modifie la
+déclaration de même nom dans la définition courante.
+ la dichiarazione modifica la dichiarazione con lo stesso nome nella definizione corrente
+
+
+ this declaration replaces the declaration of the same
+ name in the current definition
+ 이 선언은 현 정의에서 동일 이름의 선언을 대체한다.
+ esta declaración substituye la declaración del mismo nombre en la definición actual
+ 当該宣言は,現行定義中の同名宣言に置き換わる.
+
+ cette déclaration remplace la
+déclaration de même nom dans la définition courante.
+ la dichiarazione sostituisce la dichiarazione con lo stesso nome nella definizione corrente
+
+
+
+
+
+
+
+
+
+
+
+
This classes element indicates that the element documented
+(which may be an element or a class) is a member of two distinct classes: model.qLike and
+ att.declarable.
+
+
+
+
+
+
+
+
+
Cet élémentclassesindique que l'élément documenté (qui peut être un élément ou une
+ classe) est membre de deux classes distinctes : model.qLike et
+ att.declarable.
+
+
+
An empty classes element indicates that the
+ element documented is not a member of any class. This should not
+ generally happen.
+
+
+
Un élément classes vide indique que l'élément documenté n'appartient à
+ aucune classe. Cela devrait être exceptionnel.
+
+
+
+
+
+
+ specifies class membership of the documented element or class.
+ 부모 요소 또는 부류의 부류 원소 자격을 명시한다.
+ 標明父元素或元素集所屬的元素集。
+ 親要素や親クラスを示す.
+ précise à quelle classe appartiennent la classe ou
+ l'élément parent.
+ especifica la pertenencia a una clase del elemento o
+ clase padre.
+ specifica l'appartenenza a una classe dell'elemento o
+ classe genitori
+
+
+
+
+
+
+
+
+ specifies the identifier for a class of which the documented element or class is a
+ member or subclass
+ 기록된 요소 또는 부류가 원소 또는 하위부류인 부류의 확인소를 명시한다.
+ 標明一元素集的識別名稱,該元素集為所紀錄元素或元素集之所屬或附屬元素集
+ 当該要素またはクラスが下位要素・下位クラスとなっているクラスの識 別子を示す.
+ précise l’identifiant pour une classe pour laquelle
+ l'élément documenté ou classe est un membre ou sous-classe.
+ especifica el identificador de una clase de la cual
+ el elemento o clase indicados son un miembro o una subclase.
+ indica l'identificatore di una classe di cui
+ l'elemento o classe indicati sono un membro o una sottoclasse
+
+
+
+ specifies the effect of this declaration on its parent module.
+ 부모 모듈에 이 선언의 효과를 명시한다.
+ especifica el efecto de esta declaración en su módulo
+ padre.
+ 当該宣言が親モジュールに与える影響を示す.
+ indique l'effet de cette déclaration sur son module
+ parent.
+ specifica l'effetto della dichiarazione sul modulo
+ genitore
+
+ add
+
+
+ this declaration is added to the current definitions
+ 이 선언은 현 정의에 추가된다.
+ esta declaración se agrega a las definiciones
+ actuales
+ 当該宣言は,現行定義に追加される.
+ cette déclaration s'ajoute aux définitions
+ courantes.
+ la dichiarazione è aggiunta alle definizioni
+ correnti
+
+
+ this declaration and all of its children are removed from the current setup
+ 이 선언과 이 선언의 모든 자식은 현 구성에서 제거된다.
+ esta declaración y todos sus hijos se suprimen de
+ la disposición actual
+ 当該宣言と全子要素は,現行定義から外される.
+ cette déclaration et tous ses enfants sont
+ retirés du système courant.
+ la dichiarazione e i suoi discendenti sono
+ esclusi dall'impostazione corrente
+
+
+
+
+ supplies the maximum number of times the element can occur in elements which use this model class in their content model
+
+
+
+ supplies the minumum number of times the element must occur in elements which use this model class in their content model
+
+
+
+
+
+
+
+
+
This element will appear in any content model which references model.divLike,
+ and will have attributes defined in att.identified (in addition to any defined
+ explicitly for this element).
+
+
+
+
+
+
+
Cet élément apparaîtra dans n'importe quel modèle de contenu faisant référence à
+ model.divLike, et aura des attributs définis
+ dansatt.identified (en plus de n'importe quel autre attribut défini
+ explicitement pour cet élément).
+
+
+
+
+
+
+
+
+
Elements or classes which are members of multiple (unrelated) classes will have more than one
+ memberOf element, grouped by a classes element. If an element is a member
+ of a class C1, which is itself a subclass of a class C2, there is no need to state this, other
+ than in the documentation for class C1.
+
Any additional comment or explanation of the class membership may be provided as content for
+ this element.
+
+
+
Les éléments ou des classes qui appartiennent à des classes multiples (sans rapport entre
+ elles) auront plusieurs éléments memberOf, regroupés par un élément classes.
+ Si un élément appartient à une classe C1 qui est elle-même une sous-classe d'une classe C2, il
+ n'est pas nécessaire d'établir ce fait autrement que dans la documentation de la classe C1.
+
Tout commentaire ou explication additionnels de l'appartenance à une classe peut être fourni
+ comme contenu de cet élément.
+
+
+
+
+
+ equivalent
+ 동치
+
+ equivalente
+ équivalent
+ equivalente
+ specifies a component which is considered equivalent to the parent element, either by
+ co-reference, or by external link.
+ 부모 요소와 동치로 고려되는 성분을 공지시 또는 외부 연결을 통해 명시한다.
+ 具體指出一個與父元素同等的名稱,無論是藉由交互參照或是外部連結。
+ 親要素と同等とされる構成要素を,相互参照または外部リンクで示す.
+ précise un composant considéré comme un équivalent de
+ l'élément parent, soit par une référence commune, soit par un lien externe.
+ especifica un componente que se considera equivalente al
+ elemento padre, o por co-referencias o por algún enlace externo.
+ indica un componente considerato equivalente ad un
+ elemento genitore sia per co-referenza che tramite link esterno.
+
+
+
+
+
+
+
+
+
+
+ a single word which follows the rules defining a
+ legal XML name (see ), naming the underlying concept of which the parent is a representation.
+ 부모가 표상하는 기저 개념에 대한 이름을 부여한다.
+ 說明父元素所標記的基本概念。
+ 親要素の意義を表す.
+ nomme le concept sous-jacent dont le parent est une
+ représentation.
+ especifica el concepto subyacente cuyo padre es una
+ representación.
+ specifica un concetto sottostante di cui il genitore
+ è una rappesentazione
+
+
+
+ uniform resource identifier
+ 표준 자원 확인소(URL)
+ identificador de recurso uniforme
+ Identifiant de ressource uniforme.
+ URI (identificatore universale di risorse)
+ references the underlying concept of which the parent is a representation by means of
+ some external identifier
+ 부모가 외부 확인소를 통해서 표상하는 기저 개념을 지시한다.
+ 以外部識別符來說明父元素所標記的基本概念
+ 外部識別子によって親要素の意義を表す.
+ référence le concept sous-jacent dont le parent est
+ une représentation au moyen d'un identifiant externe quelconque.
+ referencia el concepto subyacente del cual padre es
+ una representación mediante algún identificador externo
+ indica il concetto sottostante di cui il genitore è
+ una rappesentazione attraverso un identificatore esterno
+
+
+
+ references an external script which contains a method to transform instances of this
+ element to canonical TEI
+ 이 요소의 실례를 표준 TEI로 변환하는 방법을 포함하는 외부 스크립트를 참조한다.
+ 參照能把該元素實例轉變成標準TEI的外部程式
+ 当該要素を標準的XMLデータに変形する外部スクリプトへの参照を示す.
+ référence un script externe qui contient une méthode
+ pour transformer les instances de cet élément en TEI canonique.
+ referencia un guión externo que contiene un método
+ para transformar ejemplos de este elemento a TEI canónico.
+ indica uno script esterno contenente un metodo per
+ trasformare le occorrenze dell'elemento in TEI canonico
+
+
+
+
+
The following example declares that the bo element is
+ conceptually equivalent to the markup construct hi rend='bold', and that an
+ external definition of this concept is available from the URI indicated
L'exemple suivant déclare que l'élément bo est conceptuellement
+ équivalent au marqueur construit hi rend='bold', et qu'une définition externe de
+ ce concept est disponible à l'URI indiqué.
+
+
+
+
+
+
+ alternate identifier
+ 교체 확인소
+ identificador alterno
+ identifiant alternatif
+ identificatore alternativo
+ supplies the recommended XML name for an element, class,
+ attribute, etc. in some language.
+ 어떤 언어에서 요소, 부류, 속성에 대해 권고된 XML 이름을 제시한다.
+ 標誌用另一種語言來表示的XML元素、元素集、屬性等的名稱。
+ 特定言語において,XMLの要素,クラス,属性などで推奨される名前を示す.
+ fournit le nom XML recommandé pour un
+ élément, une classe, un attribut, etc. dans un langage quelconque.
+ proporciona el nombre XML recomendado para un elemento, clase, atributo, etc. en alguna lengua.
+ fornisce il nome XML consigliato per un elemento, classe, attributo, ecc. in una lingua.
+
+
+
+
+
+
+
+
+
+
+
+ balisageDoc
+
+
+
+
+ balisageDoc
+
+
+
+
All documentation elements in ODD
+have a canonical name, supplied as the value for their
+ ident attribute. The altIdent element is used to
+ supply an alternative name for the corresponding XML object, perhaps
+ in a different language.
+
+
+
Tous les éléments de documentation en ODD ont un nom canonique
+ fourni comme valeur de leur attribut ident. L'élément
+ altIdent est utilisé pour apporter un nom alternatif à
+ l'objet XML correspondant, éventuellement dans un langage
+ différent.
+
+
+
+
+
+
Element Specifications
Defining Content Models
RELAX NG Content Models
Additional Constraints
Attribute List Specification
Datatypes
Value Specification
Processing Models
The TEI processing model
Output Rendition
CSS Class
Model Contexts and Outputs
Behaviours and their parameters
Outputs
Model sequence
Defining a processing model
Implementation of Processing Models
+ describes the processing intended for a specified element.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ names the process or function which this
+ processing model uses in order to produce output.
+
+
+
+
+
+ support display of alternative
+ visualisations, for example by displaying the preferred content, by displaying both in
+ parallel, or by toggling between the two.
+
+
+ supplies the preferred content
+
+
+ supplies the alternative content
+
+
+
+
+ create an identifiable anchor point in the
+ output
+
+
+ supplies an identifier for the anchor
+ point
+
+
+
+
+
+ create a block structure
+
+
+
+
+
+
+ create the body of a document.
+
+
+
+
+
+
+ create a line, column, or page break
+ according to the value of type
+
+
+
+
+
+
+ create a table cell
+
+
+
+
+
+
+ show the content, with an indication of the
+ source
+
+
+
+
+
+
+ start a new output document
+
+
+
+
+
+ make a figure with the title as
+ caption
+
+
+
+
+
+
+ show a character by looking up reference to a
+ chardesc at the given URI
+
+
+
+
+
+ if url is present, uses it to
+ display graphic, else display a placeholder image.
+
+
+
+ url of image file
+
+
+ desired width of image
+
+
+ desired height of image
+
+
+ scaling for image
+
+
+ title of figure (usually not displayed
+ directly)
+
+
+
+
+ creates a heading.
+
+
+
+
+
+
+
+ generate list according to
+ type
+
+
+
+
+
+ creates inline element out of
+ content
+
+
+
+
+
+
+
+
+
+ create hyperlink
+
+
+
+
+ link url
+
+
+
+
+ create a list
+
+
+
+
+
+
+
+ create a list item
+
+
+
+
+
+
+ create metadata section
+
+
+
+
+
+
+
+ create a note, often out of line, depending
+ on the value of place; could be margin, footnote, endnote, inline
+
+
+
+
+
+
+
+ do nothing, do not process children
+
+
+ create a paragraph out of
+ content.
+
+
+
+
+
+
+
+ create a table row
+
+
+
+
+
+
+ create a new section of the output
+ document
+
+
+
+
+
+ create a table
+
+
+
+
+
+
+ create literal text
+
+
+
+
+
+ create document title
+
+
+
+
+
+
+
+
+ the condition under which this model applies,
+ given as an XPath predicate expression.
+
+
+
+
+
+ whether to obey any rendition attribute which is
+ present.
+
+
+
+
+
If the useSourceRendition attribute is not specified, or has the value false,
+ any renditional information specified in the source document should be ignored.
+
+
+
+ the intended output.
+
+
+
+
+
+ the output is intended for presentation in a
+ web format
+
+
+ the output is intended for presentation in a
+ print format
+
+
+ the output is intended for presentation in a
+ plain text format
+
+
+
If the output attribute is not specified, this model is assumed to apply for all forms of output.
+
+
+
+ the name of a CSS class which should be associated with this element
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ If it's inside a paragraph then it's
+ inline
+
+
+ If it's not inside a paragraph then it is
+ block level
+
+
+
+
+
+
+
+ If it is a child of a person element, treat as
+ inline
+
+
+
+
+
+
+ font-weight:bold
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
The intended output to be generated for a particular behaviour of a processing model may be
+ documented in one or all of the three following ways. Firstly, the cssClass attribute may be
+ used to specify the name of a CSS style in some associated CSS stylesheet which is to be
+ applied to each occurrence of a specified element found (in a given context, for a specified
+ output). Secondly, the attribute useSourceRendition may be used to indicate that the default
+ rendition for occurrences of this element, as defined by a rendition element in the
+ document header, should be applied. Thirdly, the styling to be applied may be specified
+ explicitly as content of a child outputRendition element. When more than one of these
+ options is used, they are understood to be combined in accordance with the rules for multiple
+ declaration of the styling language used.
+
+
+
+
+
+ any sequence of model or modelSequence elements which
+ is to be processed as a single set of actions
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ the condition under which this model applies
+ given as an XPath Predicate Expression
+
+
+
+
+
+ whether to obey any rendition attribute which is
+ present
+
+
+
+
+
+ the intended output method
+
+
+
+
+
+ the output is intended for presentation in a
+ web format
+
+
+ the output is intended for presentation in a
+ print format
+
+
+ the output is intended for presentation in a
+ plain text format
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
All of the child elements of a modelSequence element are to be processed together,
+ for example in sequence, rather than independently of one another.
+
+
+
+
+
+ any grouping of model or modelSequence elements with
+ a common output method
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ whether to obey any rendition attribute which is
+ present
+
+
+
+
+
+ the intended output method
+
+
+
+
+
+ the output is intended for presentation in a
+ web format
+
+
+ the output is intended for presentation in a
+ print format
+
+
+ the output is intended for presentation in a
+ plain text format
+
+
+
+
+
+
+
+
+
+
+ font-style:italic;
+
+
+ content: ' ('
+ content: ')'
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
The child model elements of a modelGrp are always processed
+ independently.
+
+
+
+
+
+
+ describes the rendering or
+ appearance intended for all occurrences of an element in a specified
+ context for a specified type of output.
+
+
+
+
+
+
+
+
+
+ provides a way of defining
+ pseudo-elements, that is, styling rules applicable to specific
+ sub-portions of an element.
+
+
+
+
+
+ styling applies to the first line of the
+ target element.
+
+
+ styling applies to the first character of the
+ target element.
+
+
+ styling should be applied immediately before
+ the content of the target element.
+
+
+ styling should be applied immediately after
+ the content of the target element.
+
+
+
+
+
+
+
+ font-style: italic;
+
+
+ left-margin: 2em;
+
+
+
+
+
This component of an element specification describes the rendering or
+ appearance intended for all occurrences of the element in a specified
+ context for a specified type of output. The rendition element, by
+ contrast, describes the actual rendering or appearance of all occurrences
+ of the specified element in a source document. The
+ useSourceRendition attribute may however be used to indicate
+ that formatting information provided by a rendition element is to
+ be combined with any provided by an outputRendition element.
+
It is strongly recommended that the W3C Cascading Stylesheet language
+ (CSS2 or later) be used to express the required formatting information.
+
+
+
+
+ list of parameter specifications
+
+
+
+
+
+
+
+
+
+ create a specialized display of alternating elements for displaying the preferred version and an alternative, both at once or by some method of toggling between the two.
+
+
+
+ preferred content
+
+
+ alternate content
+
+
+
+
+
+
+
+
The paramList element provides a a mechanism to document parameter specifications using child paramSpec elements.
+
+
+
+ supplies specification for one parameter of a model
+ behaviour
+
+
+
+
+
+
+
+
+
+
+
+
+
+ create a hyperlink
+
+
+ supplies the location of some content describing the link
+
+
+ supplies the location of the intended URL
+
+
+
+
+
+
+
Where a model behaviour uses more than one parameter, individual paramSpec elements
+ should be grouped together using a paramList element, as above. Parameter
+ specifications are provided within the valItem used to define a particular behaviour,
+ which forms part of the specification of a model element's behaviour
+ attribute. In the example above, the behaviour link has two parameters:
+ content and link.
+
Using a desc attribute within a paramSpec is optional but recommended
+ practice.
+
+
+
+
+
+ provides a parameter for a model behaviour by
+ supplying its name and an XPath expression identifying the location of its content.
+
+
+
+
+
+
+
+ a name for the parameter being supplied
+
+
+
+
+
+ when used with behaviour
+ alternate, a parameter of this name supplies one of the pair of possible
+ values; for example the regularized form rather than the original form within a
+ choice element.
+
+
+ when used with behaviour
+ alternate, a parameter of this name supplies one of the pair of possible
+ values; for example the original form rather than the regularized form within a
+ choice element.
+
+
+
+ when used with behaviour
+ graphic, a parameter of this name supplies a value for the height of
+ the graphic e.g. "300px", "50%".
+
+
+ a parameter of this name should supply a
+ unique identifier for the element being processed; as for example with the
+ anchor behaviour
+
+
+ a parameter of this name should supply an
+ expression to be used to label something, for example concat('Page ', @n)
+ for a page break or @n for a footnote reference; typically used with the
+ note or break behaviours
+
+
+ when used with the heading
+ behaviour, a parameter of this name supplies a positive integer indicating the
+ hierarchic level of a heading.
+
+
+ when used with the link
+ behaviour, a parameter of this name should supply a URL to be used as the target of a
+ link.
+
+
+
+ when used with the note
+ behaviour, a parameter of this name should provide a string which describes the intended
+ placement of some text; typical values include "margin", "footnote", "endnote",
+ "inline", "bottom"
+
+
+ a parameter of this name can be used to
+ categorize the specified behaviour in any way; for example the kind of break (when used
+ with the break behaviour) or the kind of index to be generated (if used
+ with the index behaviour) etc.
+
+
+ when used with behaviour
+ graphic, a parameter of this name supplies a a URL indicating the
+ graphic intended.
+
+
+ when used with behaviour
+ graphic, a parameter of this name supplies a value for the width of the
+ graphic e.g. "400px", "70%".
+
+
+
+
+ supplies an XPath expression which when evaluated
+ provides the value for the parameter
+
+
+
+
+
+
+
In this example, which will be processed for a choice element which has both
+ sic and corr child elements, the default parameter will
+ provide the value of the child corr element, and the alternate
+ parameter will provide that of the child sic elements. If neither param
+ element was supplied, both elements would still be available to an application, but the
+ application would need to distinguish them for itself.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
An implementation may require parameters other than those listed here, and is not required to
+ follow this partial specification.
+
The names and datatypes of the expected parameters should be documented in the corresponding
+ customization using a paramSpec element. Literal strings provided in an XPath
+ expression should be quoted.
+
+
+
+
+
Class Specifications
+ content model
+ 내용 모델
+ 模型宣告
+ modèle de contenu
+ declaración del esquema
+ dichiarazione dello schema
+ contains the text of a declaration for the schema documented.
+ 기록된 스키마에 대한 선언 텍스트를 포함한다.
+ 包含所記錄之模型的宣告文字。
+ 当該スキーマの宣言を示す.
+ contient la déclaration d'un modèle de contenu pour
+ le schéma documenté.
+ contiene el texto de la declaración del esquema
+ utilizado.
+ contiene il testo di una dichiarazione dello schema
+ utilizzato
+
+
+
+
+
+
+
+
+
+
+
+
+
+ controls whether or not pattern names generated in the corresponding Relax NG schema
+ source are automatically prefixed to avoid potential nameclashes.
+
+ true
+
+
+ Each name referenced in e.g. a rng:ref element within a content model is
+ automatically prefixed by the value of the prefix attribute on the current
+ schemaSpec
+
+
+
+ No prefixes are added: any prefix required by the value of the prefix
+ attribute on the current schemaSpec must therefore be supplied explicitly, as
+ appropriate.
+
+
+
+
+
+
This content element indicates that the element being specified has no content:
+
+
+
+
+
This content element defines a content model allowing either a sequence of paragraphs or a series of msItem elements
+ optionally preceded by a summary:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
This content model defines a content model allowing either a sequence of paragraphs or a series of msItem elements
+ optionally preceded by a summary:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Ce modèle de contenu permet d'introduire une
+ suite de paragraphes ou une suite d'éléments msItem précédés éventuellement d'un
+ résumé :
As the example shows, content models may be expressed using the RELAX NG syntax directly. To
+ avoid ambiguity when schemas using elements from different namespaces are created, the name
+ supplied for an element in a content model will be automatically prefixed by a short string,
+ as specified by the prefix attribute on schemaSpec. The
+ autoPrefix attribute may be used to reverse this behaviour.
+
The macro macro.schemaPattern defines which elements may be used to define
+ content models. Alternatively, a content model may be expressed using the TEI valList
+ element.
+
+
+
Comme l'exemple le montre, les modèles de contenu dans la P5 peuvent être exprimés en
+ utilisant directement la syntaxe RELAX NG. Plus exactement, ils sont définis avec le modèle
+ macro.schemaPattern. Une autre manière d'exprimer un modèle de contenu est
+ d'utiliser l'élément TEI valList.
+
+
+
+
+
+ supplies attributes for the elements which define
+ component parts of
+ a content model.
+
+
+
+ supplies an XPath
+ identifying a context within which this component of a
+ content model must be found
+
+
+
+ minimum number of occurences
+ 빈도의 최소 수
+ 出現次數最小值
+ nombre minimum d'occurrences
+ numero minimo di occorrenze
+ número mínimo de apariciones
+ indicates the smallest number of times this component may
+ occur.
+
+ 1
+
+
+ maximum number of occurences
+ 빈도의 최대 수
+ 出現次數最大值
+ nombre maximum d'occurrences.
+ numero minimo di occorrenze
+ número máximo de apariciones.
+ indicates the largest number of times this component may
+ occur.
+
+ 1
+
+
+
+ groups elements which
+ may appear as part of the content element.
+
+
+
+
+ sequence of references
+
+
+
+
+
+
+
+
+
+
+ The sequence element must have at least two child elements
+
+
+
+
+ if true, indicates that
+ the order in which component elements of a sequence
+ appear in a document must correspond to the order in
+ which they are given in the content model.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
This example content model matches a sequence consisting of either
+a name or a persName followed by nothing, or by a
+sequence of up to five placeName elements.
+
+
+ an alternation of references
+
+
+
+
+
+
+
+
+
+
+ The alternate element must have at least two child elements
+
+
+
+
+
+
+
+
+
+
+
+
This example content model permits either a name or a
+ persName.
+
+
+ constraint rules
+ the formal rules of a constraint
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ a main title must be supplied
+
+
+
+
+
+
+
+
+
+(output = (ident(title) ident(author) "You must supply a title or an author"))
+
+
+
+
+
+
+
+
+ constraint on schema
+ contains a constraint, expressed in some formal syntax,
+ which cannot be expressed in the structural content model
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Relationship between scheme attribute and contents: Schematron 1.x
+
+
+ Rules in the Schematron 1.* language must be inside a constraintSpec with a value of 'schematron' on the scheme attribute
+
+
+
+ Relationship between scheme attribute and contents: ISO Schematron
+
+
+ Rules in the ISO Schematron language must be inside a constraintSpec with a value of 'isoschematron' on the scheme attribute
+
+
+
+
+
+
+ An ISO Schematron constraint specification for a macro should not have an 'assert' or 'report' element without a parent 'rule' element
+
+
+
+
+
+ supplies the name of the language in which the constraints
+ are defined
+
+
+
+ Schematron
+
+
+ ISO Schematron
+
+
+
+
+
+
This constraint uses Schematron to enforce the presence of the
+ spanTo attribute (which comes from an attribute class)
+ on the addSpan element:
+
+
+ Enforce the presence of the spanTo attribute
+
+ The spanTo= attribute of
+ is required.
+
+
+
+
+
+
+
+ Implement an accessibility rule which says that pictures should
+ have textual explanations
+
+ You should
+ provide information in a figure from which
+ we can construct an alt attribute in HTML
+
+
+
+
+
+
This constraint uses SPITBOL (a language which is not
+ expressed in XML) to check whether the title and author are identical:
+
+
+
+(output = leq(title,author) "title and author cannot be the same")
+
+
+
+
+
+
+
+
+ provides a pattern to match elements from the chosen schema language
+ fournit un modèle pour faire correspondre des éléments à partir du langage du schéma choisi.
+ 선택된 스키마 언어의 요소와 일치하는 유형
+ 配合所選擇的模型語言中的元素的模式
+ 選択されたスキーマ言語による,要素にマッチするパタン.
+ patrón (pattern) que permite elegir los elementos en el lenguaje elegido para el esquema.
+ pattern che consente di abbinare gli elementi descritti nel linguaggio scelto per lo schema
+
+
+
+
+
+
+ liste d'attributs
+ contains documentation for all the attributes associated with this element, as a series of
+ attDef elements.
+ 일련의 attDef 요소로서, 이 요소와 연관된 모든 속성에 대한 기록을 포함한다.
+ 包含所有和此元素相關的屬性記錄,使用一連串的元素attDef。
+ 当該要素に関する全ての属性に関する文書を,一連の要素attDef で示す.
+ contient la documentation pour tous les attributs
+ associés à cet élément comme une série d'éléments attDef.
+ contiene documentación relativa a todos los atributos
+ asociados con este elemento bajo forma de series de elementos attDef.
+ contiene la documentazione relativa agli attributi
+ associati all'elemento in questione sotto forma di una serie di elementi attDef
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ organization
+ 조직
+ organización
+ conditions d'utilisation
+ organizzazione
+ specifies whether all the attributes in the list are available (org="group") or only one
+ of them (org="choice")
+ 목록의 모든 속성이 이용가능하거나(org="group") 그 중 하나만 이용가능한지를 명시한다.
+ 標明是否列表中的全部屬性皆可使用 (org="group") 、或是僅可使用其中一個
+ (org="choice")。
+ リスト中の属性が全て使用できるか(org="group"),またはその1つだけ
+ が使用できるか(org="choice")を示す.
+ précise si les attributs dans la liste sont tous
+ disponibles (org="group") ou seulement l'un d'entre eux (org="choice").
+ indica si los atributos contenidos en la lista son
+ todos disponibles (org="grupo") o si es disponible sólo uno (org="elección")
+ indica se gli attributi contenuti nella lista sono
+ tutti disponibili (org="gruppo") o se ne è disponibile solo uno (org="scelta")
+
+ group
+
+
+ grouped
+ 그룹화된
+ 集合使用
+ agrupado
+ 全て.
+ tous les attributs de la liste sont disponibles.
+ raggruppati
+
+
+ alternated
+ 교체가능한
+ 擇一使用
+ alternado
+ ひとつを選択.
+ un seul des attributs de la liste est disponible.
+ alternati
+
+
+
+
+
+
+
+
+ type of schema
+
+
+
+
+
+
+
+
+
+
+
+ type de schéma
+
+
+
+
+
+
+
+
+
+
+
+ 文件模型的種類
+
+
+
+
+
+
+
+
+
+
+
+
+ attribute definition
+ 속성 정의
+ 屬性定義
+ définition d'attribut
+ definición de atributo
+ definizione di attributo
+ contains the definition of a single attribute.
+ 단일 속성 정의를 포함한다.
+ 包含單一屬性的定義。
+ 1つの属性の定義を示す.
+ contient la définition d'un attribut.
+ contiene la definición de un único atributo.
+ contiene la definizione di un unico attributo
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Attribute: the definition of the @ attribute in the
+
+ should have a closed valList or a datatype
+
+
+
+
+
+ It does not make sense to make "" the default value of @, because that attribute is required.
+
+
+
+
+
+
+
+
+
+
+
+
+ In the defining
+ the default value of the
+ @ attribute is not among the closed list of possible
+ values
+
+
+
+
+
+
+ In the defining
+ the default value of the
+ @ attribute is not among the closed list of possible
+ values
+
+
+
+
+
+ specifies the optionality of the attribute.
+ 속성 또는 요소의 수의성을 명시한다.
+ 說明屬性或元素的必備性。
+ 属性または要素の選択性を示す.
+ précise qu'un attribut ou un élément sont
+ facultatifs.
+ especifica el caracter opcional de un atributo o un
+ elemento
+ indica il carattere facoltativo di un attributo o
+ elemento
+
+ opt
+
+
+ required
+ 必須.
+ requis
+ richiesto
+ requerido
+ 必備的
+
+
+ recommended
+ 推薦的
+ 推奨.
+ recommandé
+ consigliato
+ recomendado
+
+
+ optional
+ 選択的.
+ facultatif
+ facoltativo
+ opcional
+ 非必備的
+
+
+
+
+ namespace
+ 이름 공간
+ 名稱空間
+ espace de noms
+ espacio de nombre
+ spazio del nome
+ specifies the namespace to which this attribute belongs
+ 이 속성이 소속된 이름 공간을 명시한다.
+ 指明該屬性所屬的名稱空間。
+ 当該属性が属する名前空間を示す.
+ précise l'espace de noms auquel appartient cet
+ attribut.
+ especifica el espacio del nombre al que pertenece el
+ atributo.
+ indica lo spazio del nome al quale appartiene
+ l'attributo
+
+ http://www.tei-c.org/ns/1.0
+
+
+
+
+
+ specifies a name conventionally used for this level of subdivision, e.g.
+ act, volume, book, section, canto,
+ etc.
+
+
+
+
+
+
+
+
+
+ spécifie un nom conventionnellement utilisé pour ce niveau de divisions , par ex.
+ acte, volume, livre, section,
+ chant, etc.
+
+
+
+
+
+
+
+
+
+ 具體指定慣例上使用的分部名稱,例如:
+ 幕, 卷, 冊, 節, 篇章,
+ 等。
+
+
+
+
+
+
+
+
+
+
+ attribute pointer
+ 속성 포인터
+ 屬性指標
+ pointeur d'attribut
+ señalizador del atributo
+ puntatore dell'attributo
+ points to the definition of an attribute or group of attributes.
+ 속성 또는 속성의 그룹에 대한 정의를 가리킨다.
+ 連結到屬性或屬性群組的定義。
+ 1つまたは複数の属性の定義の場所を示す.
+ pointe vers la définition d'un attribut ou d'un
+ groupe d'attributs.
+ señala a la definición de un atributo o grupo de atributos.
+ rimanda alla definizione di un attributo o gruppo di attributi
+
+
+
+
+
+
+
+
+ the name of the attribute class
+
+
+
+ the name of the attribute
+
+
+
+
+
+
+
+
+
+
+
+
+ type de données
+ specifies the declared value for an attribute, by referring to
+ any datatype defined by the chosen schema language.
+ 선택된 스키마 언어에 의해 정의된 데이터 유형을 참조함으로써, 속성에 대한 선언된 값을 명시한다.
+ 指明屬性的公開屬性值,參照到任何所選擇的模型語言所定義的資料類型。
+ 属性値の型を,当該スキーマ中のデータ型を参照して示す.
+ précise la valeur déclarée d'un attribut en
+ faisant référence à un type de données défini dans le langage choisi pour le schéma.
+ indica el valor declarado de un atributo haciendo referencia a cualquier tipo de datos definido en el lenguaje elegido para el esquema.
+ indica il valore dichiarato di un attributo facendo riferimento a un qualsiasi tipo di dati definito nel linguaggio scelto per lo schema
+
+
+
+
+
+
+
+
+
+
+
+
+ minimum number of occurences
+ 빈도의 최소 수
+ 出現次數最小值
+ nombre minimum d'occurrences
+ numero minimo di occorrenze
+ número mínimo de apariciones
+ indicates the minimum number of times this datatype may
+ occur in the specification of the attribute being defined
+ 정의되고 있는 속성 명시에서 발생할 수 있는 이 유형의 최소 횟수를 나타낸다.
+ 指出該資料類型在所定義的屬性說明中可能出現的最少次數
+ 。
+ 属性値としてとる当該データ型の値が出現する最小回数を示す.
+ indique le nombre minimum d'occurrences
+ de ce type de données dans la spécification de l'attribut.
+ indica il numero minimo di volte che questo tipo di dati può verificarsi nella definizione dell'attributo da definire
+ indica el mínimo número de veces que los tipo de datos pueden aparecer en la especificación del atributo que se define.
+
+ 1
+
+
+ maximum number of occurences
+ 빈도의 최대 수
+ 出現次數最大值
+ nombre maximum d'occurrences.
+ numero minimo di occorrenze
+ número máximo de apariciones.
+ indicates the maximum number of times this datatype may
+ occur in the specification of the attribute being defined
+ 정의되고 있는 속성 명시에서 발생할 수 있는 이 유형의 최대 횟수를 나타낸다.
+ 指出該資料類型在所定義的屬性說明中可能出現的最多次數。
+ 当該データ型が属性値として出現する最大回数を示す.
+ indique le nombre maximum d'occurrences
+ de ce type de données dans la spécification de l'attribut.
+ indica il numero massimo di volte che questo tipo di dati può verificarsi nella definizione dell'attributo da definire
+ indica el máximo número de veces que los tipo de datos pueden aparecer en la especificación del atributo que se define.
+
+
+
+ 1
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
L'encodage de l'exemple suivant exige que l'attribut défini contienne au moins deux URIs
+ dans ses valeurs, comme le cas de l'attribut target dans join.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
The encoding in the following example requires that the
+ attribute being defined contain at least two URIs in its value, as
+ is the case for the target attribute of
+ join.
+
+
+
+
+
+
+
+
In the TEI scheme, most datatypes are expressed using
+ pre-defined TEI macros, which map a name in the form
+ data.xxxx to a RelaxNG or WSD defined datatype.
+
+
+
Dans le schéma TEI, la plupart des types de données sont exprimées en utilisant des
+ macros TEI prédéfinies, qui font correspondre un nom dans sa forme
+ data.xxxx à un type de données définies en RelaxNG or WSD.
+
+
+
+
+
+
+ identifies the datatype of an attribute value, either by referencing an item in an externally defined datatype library, or by
+ pointing to a TEI-defined data specification
+
+
+
+
+
+
+
+
+
+
+
+ the identifier used for this datatype specification
+
+
+
+ the name of a datatype in the list provided by
+ XML Schemas: Part 2: Datatypes
+
+
+
+ a pointer to a datatype defined in some datatype library
+
+
+
+
+ supplies a string representing a regular expression providing additional constraints
+ on the strings used to represent values of this datatype
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ datatype used for attributes taking an integer value between 0 and 99
+
+
+
+
+
+
+
Only one of the attributes key, name, and ref may be used.
+
+
+
+
+
+
+ default value
+ 기본 값
+
+ valor por defecto
+ valeur par défaut
+ valore predefinito
+ specifies the default declared value for an attribute.
+ 속성에 대한 기본 선언 값을 명시한다.
+ 標明屬性的預設宣告值。
+ 属性の既定値を示す.
+ précise la valeur déclarée par défaut pour un
+ attribut.
+ especifica el valor predefinido declarado para un atributo
+ specifica il valore predefinito dichiarato per un attributo
+
+
+
+
+
+
+
+
+ #IMPLIED
+
+
+
+
+ #IMPLIED
+
+
+
+
+ 預設值
+
+
+
+
any legal declared value or TEI-defined keyword
+
+
+
Toute valeur déclarée dans les règles ou tout mot-clé défini en
+ TEI.
+
+
+
+ TEIの予約値.
+
+
+
+
+
+
+ value description
+ 값 기술
+ 屬性值描述
+ description de la valeur
+ valor de la descripción
+ descrizione del valore
+ specifies any semantic or syntactic constraint on the value that
+an attribute may take, additional to the information carried by the
+datatype element.
+ 데이터 유형 요소에 의해 수행된 정보와 더불어 속성이 취할 수 있는 값에 대한 의미적 또는 통사적 제약을 명시한다.
+ 除了元素datatype所帶有的資訊之外,說明屬性可使用的屬性值在字義或語法上的限制。
+ 要素datatypeにある情報に加えて,属性値の意味的・統語的制約
+ を示す.
+ précise toute contrainte sémantique ou syntaxique
+ sur la valeur que peut prendre un attribut, en supplément de l'information portée par
+ l'élément datatype.
+
+ especifica cualquier vínculo de tipo semántico o sintáctico respecto al valor que un atributo puede asumir, añadiendo informaciones referentes al elemento datatype.
+ specifica un qualsiasi
+ vincolo di tipo semantico o sintattico rispetto al valore che un
+ attributo può assumere, aggiungendo informazioni rispetto a quanto
+ contenuto nell'elemento datatype
+
+
+
+
+
+
+
+
+
+
+ must point to another align
+ element logically preceding this one.
+
+
+
+
+ doit pointer vers un autre élément alignprécédant logiquement
+ celui-ci.
+
+
+
+
+ 必須指向另一個的邏輯上先於此的元素align
+
+
+
+
+
+
+
+ documents a single value in a predefined list of values.
+ 가능한 또는 필수적 항목의 목록 내에서 단일 속성 값을 기록한다.
+ 包含單一屬性的一個屬性值及註解對。
+ 属性値のひとつを解説する.
+ documente une valeur d'attribut unique dans une liste d'items possibles ou obligatoires
+ contiene un único valor y una glosa para un atributo.
+ contiene un unico valore e un'unica coppia di glosse per un attributo
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ specifies the value concerned.
+
+
+
+
+
+
+ dou
+
+ dubious
+ used when the application of this element is doubtful or uncertain
+
+
+
+
+
+
+ dou
+
+ douteux
+ utilisé quand l'emploi de cet élément est douteux ou incertain.
+
+
+
+
+
+
+ dou
+
+ dubious(無把握的)
+ 適用於無法確定或對該元素的使用存疑時
+
+
+
+
+
+
+
+ value list
+ 값 목록
+ 屬性值列表
+ liste de valeurs
+ lista de valores
+ lista di valori
+ contains one or more valItem elements defining possible values.
+ 하나의 속성에 대한 가능한 값을 정의하는 하나 이상의 valItem 요소를
+ 포함한다.
+ 包含一個或多個元素valItem,以定義一個屬性可使用的屬性值。
+ 可能な属性値を表すひとつ以上の要素valItemを示す.
+ contient un ou plusieurs éléments valItem
+ qui définissent des valeurs possibles pour un attribut.
+ contiene uno o más elementos valItem que
+ definen los valores posibles para un atributo.
+ contiene uno o più elementi valItem che
+ definiscono i valori possibili per un attributo
+
+
+
+
+
+
+
+
+
+
+
+
+ specifies the extensibility of the list of values specified.
+ 명시된 속성 값 목록의 확장성을 명시한다.
+ 標明該屬性值列表的延展性。
+ 属性値リストの拡張性を示す.
+ précise l'extensibilité de la liste des valeurs
+ de l'attribut.
+ especifica la posibilidad de extender la lista de
+ los valores especificados para los atributos.
+ indica la possibilità di estendere la lista dei
+ valori specificati per gli attributi
+
+ open
+
+
+ only the values specified are permitted.
+ 명시된 하나의 값만이 허용된다.
+ 僅允許標明的屬性值。
+ solamente los valores especificados estan
+ permitidos.
+ 許可された値のみ.
+ seules les valeurs indiquées sont
+ autorisées.
+ sono consentiti solo i valori
+ specificati
+
+
+ semi-open
+ 반개방
+ semi-ouvert
+ semiaperto
+ todos los valores indicados deben ser
+ soportados pero son consentidos otros valores para los que son necesarios sistemas de
+ elaboración adecuados.
+ all the values specified should be supported, but other values are legal and
+ software should have appropriate fallback processing for them.
+ 명시된 모든 값이 지원되어야하지만, 다른 값도 적법하며 소프트웨어는 이들에 대해
+ 적절한 준비 프로세서를 갖추어야 한다.
+ 所有標明的屬性值應該維持有效;但其他屬性值亦為合法,且所使用的軟體對於它們應該具有適當的後備處理程序。
+ todos los valores especificados deben ser
+ utilizados, pero otros valores son legales y el software debe tener la posibilidad
+ apropiada para proseceralos
+ 付与される全値が支持されるべきであるが,その他の値も可能であ
+ る.ソフトウェアは,そのための適切な代替処理を用意すべきであ る.
+ toutes les valeurs indiquées doivent être
+ acceptées, mais d'autres valeurs sont acceptables et le logiciel doit avoir une
+ procédure qui leur est adaptée.
+ tutti i valori indicati devono essere
+ supportati ma sono consentiti altri valori per i quali sono necessari sistemi di
+ eleborazione adeguati
+
+
+ the values specified are sample values only.
+ 명시된 값만이 표본 값이다.
+ 所標明的屬性值僅為樣本屬性值。
+ los valores especificados son valores de
+ muestra solamente.
+ 付与された値は,参考値である.
+ les valeurs indiquées ne sont que des valeurs
+ d'exemple.
+ i valori specificati sono solo valori
+ campione
+
+
+
+
+
+
+
+
+ required
+
+
+ recommended
+
+
+ optional
+
+
+
+
+
+
+
+
+ exigé
+
+
+ Recommandé
+
+
+ optionnel
+
+
+
+
+
+
+
+
+ 必要性
+
+
+ 建議性
+
+
+ 選擇性
+
+
+
+
+
+
+
+
+ indicates the presence
+ of a text node in a content model
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Macro Specifications
Building a TEI Schema
+ provides attributes indicating how multiple references to the
+ same object in a schema should be combined
+
+
+
+
+
+ specifies the effect of this declaration on its parent
+ object.
+ 그 부모 모듈에 이 선언의 효과를 명시한다.
+ 標明該宣告在其來源模組中的作用。
+ 当該宣言が親要素に与える影響を示す.
+ précise l'effet de cette déclaration sur
+ son parent.
+ especifica el efecto de esta declaración en el módulo del que obtiene el orígen (módulo padre)
+ indica l'effetto della dichiarazione sul modulo da cui trae origine
+
+ add
+
+
+ this declaration is added to the current definitions
+ 이 선언은 현 정의에 추가된다.
+ 該宣告添加在現有定義中
+ esta declaración se agrega a las definiciones actuales
+ 当該宣言は現行定義に追加される.
+ cette déclaration s'ajoute aux
+définitions courantes.
+ la dichiarazione è aggiunta alle definizioni correnti
+
+
+ if present already, the whole of the declaration
+ for this object is removed from the current setup
+ 이 선언과 이 선언의 모든 자식들이 현 구성에서 제거된다.
+ 該宣告以及所有子宣告從現有的設定中被移除
+ esta declaración y todos sus hijos se suprimen de la disposición actual
+ 当該宣言と当該以下の子要素は,現行定義から外される.
+ cette déclaration et tous ses enfants
+sont retirés du système courant.
+ la dichiarazione e i suoi discendenti sono esclusi dall'impostazione corrente
+
+
+ this declaration changes the declaration of the same
+ name in the current definition
+ 이 선언은 현 정의에서 동일 이름의 선언을 변경한다.
+ 該宣告改變在現有定義中名稱相同的宣告。
+ esta declaración cambia la declaración del mismo nombre en la definición actual
+ 当該宣言は,現行定義中の同名宣言を修正する.
+ cette déclaration modifie la
+déclaration de même nom dans la définition courante.
+ la dichiarazione modifica la dichiarazione con lo stesso nome nella definizione corrente
+
+
+ this declaration replaces the declaration of the same
+ name in the current definition
+ 이 선언은 현 정의에서 동일 이름의 선언을 대체한다.
+ 該宣告代替在現有定義中名稱相同的宣告
+ esta declaración substituye la declaración del mismo nombre en la definición actual
+ 当該宣言は,現行定義中の同名宣言に置き換わる.
+ cette déclaration remplace la
+déclaration de même nom dans la définition courante.
+ la dichiarazione sostituisce la dichiarazione con lo stesso nome nella definizione corrente
+
+
+
+
+
+
An ODD processor should handle the values for mode
+as follows:
+the object should be created (processing
+any children in add mode); raise an error if an object
+with the same identifier already existsuse this object in preference to any existing object with the
+same identifier, and ignore any children of that object;
+process any new children in replace modedo not process this object or any existing
+object with the same identifier; raise an error if any new children
+supplied
+process this object, and process its children, and those
+of any existing object with the same identifier, in change
+mode
+
+
+
+
La signification informelle des valeurs de l'attribut mode est la suivante
+ :l'objet doit être créé (traitement de tout enfant dans le mode
+ add) ; générer une erreur si un objet avec le même identifiant
+ existe déjà.utiliser cet objet de préférence à tout autre portant le même identifiant
+ et ignorer tout enfant de cet objet ; traiter tout nouvel enfant dans le
+ mode replace.
+ ne pas traiter cet objet ou aucun autre portant le même identifiant ;
+ générer une erreur si de nouveaux enfants sont fournis.traiter cet objet, et ses enfants, et ceux de n'importe quel objet portant
+ le même identifiant, dans le mode change.
+
+
+
+
+ provides the identifying attribute for elements which can be
+ subsequently referenced by means of a key
+ attribute.
+ key 속성에
+ 의해 참조될 수 있는 요소의 속성을 제시한다.
+ 可利用屬性
+ key來參照的元素
+ 属性keyで参照されている要素に付与する属性を示す.
+ fournit les attributs
+ pour des éléments référençables au moyen d'un attribut
+ key.
+ elementos a los que se
+ puede hacer referencia a través del atributo key.
+ elementi ai quali si
+ può fare riferimento tramite l'attributo key
+
+
+
+
+
+
+
+
+ Specification : the value of the module attribute ("")
+should correspond to an existing module, via a moduleSpec or
+ moduleRef
+
+
+
+
+
+ supplies the identifier by which this element may be referenced.
+ 이 요소가 참조된 확인소를 제공한다.
+ 提供被參照的元素的識別符號。
+ 当該要素を参照する識別子を示す.
+ fournit l'identifiant qui référence cet
+ élément.
+ proporciona el identificador utilizado para indicar un elemento.
+ specifica l'identificatore utilizzato per indicare l'elemento
+
+
+
+ says whether this object should be predeclared in the
+ tei infrastructure module.
+ tei 하부구조 모듈에서 이 대상이 미리 선언되어야 하는지를 설명한다.
+ 說明該元素集是否為全域元素集,並必須在核心中宣告。
+ 当該オブジェクトが,TEI基盤モジュー
+ ルで事前に宣言されるべきかどうかを示す.
+ précise si cet objet nécessite une prédéfinition dans le module d'infrastructure tei.
+ declara si la clase debe ser considerada global y por tanto definida en el módulo core
+ dichiara se la classe debba essere considerata globale e quindi definita nel modulo core
+
+ false
+
+
+ supplies a name for the module in which this object is to be declared.
+ 이 대상이 정의되어야 하는 모듈명을 제시한다.
+ 提供定義該元素的模組名稱。
+ 当該オブジェクトが定義されているモジュール名を示す.
+ fournit le nom du module dans lequel doit
+ être défini cet objet.
+ proporciona el nombre del módulo en que el objeto debe ser definido.
+ indica il nome del modulo nel quale l'oggetto deve essere definito
+
+
+
+
+
+
+ provides attributes indicating how a deprecated feature will be treated in future releases.
+
+
+ provides a date before which the construct being defined
+ will not be removed.
+
+
+
+
+
+ construct is outdated (as of ); ODD processors may ignore it, and its use is no longer supported
+ construct becomes outdated on
+
+
+
+
+
The value of this attribute should represent a date (in standard yyyy-mm-dd format) which is later than the date on which the attribute is added to an ODD. Technically, this attribute asserts only the intent to
+ leave a construct in future releases of the markup language
+ being defined up to at least the specified date, and makes no
+ assertion about what happens past that date. In practice, the
+ expectation is that the construct will be removed from future
+ releases of the markup language being defined sometime shortly
+ after the validUntil date.
+
An ODD processor will typically not process a specification
+ element which has a validUntil date that is in the
+ past. An ODD processor will typically warn users about
+ constructs which have a validUntil date that is in
+ the future. E.g., the documentation for such a construct might
+ include the phrase warning: deprecated
+ in red.
+
+
+
+
+ provides an attribute indicating the target namespace for an
+ object being created
+
+
+ namespace
+ 이름 공간
+ 名稱空間
+ espace de noms
+ espacio de nombre
+ spazio del nome
+ specifies the namespace to which this element belongs
+ 이 요소가 소속된 이름 공간을 명시한다.
+ 指明該元素所屬的名稱空間。
+ 当該要素が属する名前空間を示す.
+ précise l'espace de noms auquel appartient cet
+ élément.
+ especifica el espacio de nombre al que pertenece tal
+ elemento.
+ indica lo spazio del nome al quale appartiene tale
+ elemento
+
+ http://www.tei-c.org/ns/1.0
+
+
+
TEI customizations
Combining TEI and Non-TEI Modules
Linking Schemas to XML Documents
Module for Documentation Elements
+ Documentation Elements
+ Documentation of TEI modules
+ Éléments de déclaration d’un modèle
+ TEI模組說明
+ Documentazione dei moduli TEIDocumentação dos módulos
+ TEIタグ定義モジュール
Using the TEI
Serving TEI files with the TEI Media Type
Obtaining the TEI Schemas
Personalization and Customization
Kinds of Modification
Deletion of Elements
Renaming of Elements
Modification of Content Models
Modification of Attribute and Attribute Value Lists
Class Modification
Addition of New Elements
Modification and Namespaces
Documenting the Modification
Examples of Modification
Conformance
Well-formedness Criterion
Validation Constraint
Conformance to the TEI Abstract Model
Semantic Constraints
Mandatory Components of a TEI Document
Use of the TEI Namespace
Documentation Constraint
Varieties of TEI Conformance
Implementation of an ODD System
Making a Unified ODD
Generating Schemas
Names and Documentation in Generated Schemas
Making a RELAX NG Schema
Macros
Classes
Elements
Making a DTD
Generating Documentation
Using TEI Parameterized Schema Fragments
Selection of Modules
Inclusion and Exclusion of Elements
Changing the Names of Generic Identifiers
Embedding Local Modifications (DTD only)
Model Classes
Attribute Classes
Elements
Attributes
Datatypes and Other Macros
Bibliography
Works Cited in Examples in these Guidelines
Works Cited Elsewhere in the Text of these Guidelines
Reading List
Theory of Markup and XML
TEI
Prefatory Notes
Prefatory Note (March 2002)
Introductory Note (November 2001)
Introductory Note (June 2001)
Introductory Note (May 1999)
Typographic Corrections Made
Specific Changes in the DTD
Outstanding Errors
Preface (April 1994)
Acknowledgments
TEI Working Committees (1990-1993)
Advisory Board
Steering Committee Membership
Colophon
\ No newline at end of file
diff --git a/lib/trang b/lib/trang
index a84b84fa..1e691896 100755
--- a/lib/trang
+++ b/lib/trang
@@ -1,4 +1,3 @@
-#!/bin/sh
-# $Id: trang 379 2009-12-22 19:18:29Z efraim.feinstein $
-SCRIPTPATH=$(dirname $(absolutize $0))
+#!/bin/bash
+SCRIPTPATH="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
java -jar $SCRIPTPATH/trang.jar $@
diff --git a/lib/transform.sh b/lib/transform.sh
deleted file mode 100755
index 8595fb4e..00000000
--- a/lib/transform.sh
+++ /dev/null
@@ -1,14 +0,0 @@
-#!/bin/sh
-# Run the transforms on a given file
-# Usage: ./transform.sh in-file out-file [transform-options]
-# $Id: transform.sh 435 2010-02-01 04:52:05Z efraim.feinstein $
-SCRIPTPATH=$(dirname $(absolutize $0))
-ST1PATH=$SCRIPTPATH/../code/transforms/stage1/stage1.xsl2
-ST2PATH=$SCRIPTPATH/../code/transforms/stage2/stage2.xsl2
-ST3PATH=$SCRIPTPATH/../code/transforms/xhtml/xhtml.xsl2
-INFILE="$1"
-OUTFILE="$2"
-shift 2
-$SCRIPTPATH/saxon -ext:on -s "$INFILE" -o "$OUTFILE.stage1.xml" $ST1PATH $@ && $SCRIPTPATH/saxon -ext:on -s "$OUTFILE.stage1.xml" -o "$OUTFILE.stage2.xml" $ST2PATH $@ && $SCRIPTPATH/saxon -ext:on -s "$OUTFILE.stage2.xml" -o "$OUTFILE" $ST3PATH $@
-#rm -f "$OUTFILE.stage1.xml" "$OUTFILE.stage2.xml"
-
diff --git a/lib/translit.sh b/lib/translit.sh
deleted file mode 100755
index e9e6091f..00000000
--- a/lib/translit.sh
+++ /dev/null
@@ -1,10 +0,0 @@
-#!/bin/sh
-# Run the transliterator on a text file in standalone mode
-# Usage: ./translit.sh in-file out-file
-# $Id: translit.sh 490 2010-03-22 20:09:44Z efraim.feinstein $
-SCRIPTPATH=$(dirname $(absolutize $0))
-RELPATH=$SCRIPTPATH/../code/transforms/stage1
-INPUT="$1"
-OUTPUT="$2"
-shift 2
-$SCRIPTPATH/saxon -ext:on -it:main $RELPATH/translit.xsl2 input-filename="$INPUT" output-filename="$OUTPUT" $@
diff --git a/lib/xelatex b/lib/xelatex
new file mode 100755
index 00000000..5a20ce50
--- /dev/null
+++ b/lib/xelatex
@@ -0,0 +1,3 @@
+#!/bin/sh
+echo This is not a real XeLaTeX. It is a placeholder because XeLaTeX is required by the TEI software, even though we do not use the functionality.
+echo If you have real XeLaTeX, it should be in the PATH before this one.
diff --git a/lib/xsltforms-LICENSE.txt b/lib/xsltforms-LICENSE.txt
deleted file mode 100644
index 602bfc94..00000000
--- a/lib/xsltforms-LICENSE.txt
+++ /dev/null
@@ -1,504 +0,0 @@
- GNU LESSER GENERAL PUBLIC LICENSE
- Version 2.1, February 1999
-
- Copyright (C) 1991, 1999 Free Software Foundation, Inc.
- 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- Everyone is permitted to copy and distribute verbatim copies
- of this license document, but changing it is not allowed.
-
-[This is the first released version of the Lesser GPL. It also counts
- as the successor of the GNU Library Public License, version 2, hence
- the version number 2.1.]
-
- Preamble
-
- The licenses for most software are designed to take away your
-freedom to share and change it. By contrast, the GNU General Public
-Licenses are intended to guarantee your freedom to share and change
-free software--to make sure the software is free for all its users.
-
- This license, the Lesser General Public License, applies to some
-specially designated software packages--typically libraries--of the
-Free Software Foundation and other authors who decide to use it. You
-can use it too, but we suggest you first think carefully about whether
-this license or the ordinary General Public License is the better
-strategy to use in any particular case, based on the explanations below.
-
- When we speak of free software, we are referring to freedom of use,
-not price. Our General Public Licenses are designed to make sure that
-you have the freedom to distribute copies of free software (and charge
-for this service if you wish); that you receive source code or can get
-it if you want it; that you can change the software and use pieces of
-it in new free programs; and that you are informed that you can do
-these things.
-
- To protect your rights, we need to make restrictions that forbid
-distributors to deny you these rights or to ask you to surrender these
-rights. These restrictions translate to certain responsibilities for
-you if you distribute copies of the library or if you modify it.
-
- For example, if you distribute copies of the library, whether gratis
-or for a fee, you must give the recipients all the rights that we gave
-you. You must make sure that they, too, receive or can get the source
-code. If you link other code with the library, you must provide
-complete object files to the recipients, so that they can relink them
-with the library after making changes to the library and recompiling
-it. And you must show them these terms so they know their rights.
-
- We protect your rights with a two-step method: (1) we copyright the
-library, and (2) we offer you this license, which gives you legal
-permission to copy, distribute and/or modify the library.
-
- To protect each distributor, we want to make it very clear that
-there is no warranty for the free library. Also, if the library is
-modified by someone else and passed on, the recipients should know
-that what they have is not the original version, so that the original
-author's reputation will not be affected by problems that might be
-introduced by others.
-
- Finally, software patents pose a constant threat to the existence of
-any free program. We wish to make sure that a company cannot
-effectively restrict the users of a free program by obtaining a
-restrictive license from a patent holder. Therefore, we insist that
-any patent license obtained for a version of the library must be
-consistent with the full freedom of use specified in this license.
-
- Most GNU software, including some libraries, is covered by the
-ordinary GNU General Public License. This license, the GNU Lesser
-General Public License, applies to certain designated libraries, and
-is quite different from the ordinary General Public License. We use
-this license for certain libraries in order to permit linking those
-libraries into non-free programs.
-
- When a program is linked with a library, whether statically or using
-a shared library, the combination of the two is legally speaking a
-combined work, a derivative of the original library. The ordinary
-General Public License therefore permits such linking only if the
-entire combination fits its criteria of freedom. The Lesser General
-Public License permits more lax criteria for linking other code with
-the library.
-
- We call this license the "Lesser" General Public License because it
-does Less to protect the user's freedom than the ordinary General
-Public License. It also provides other free software developers Less
-of an advantage over competing non-free programs. These disadvantages
-are the reason we use the ordinary General Public License for many
-libraries. However, the Lesser license provides advantages in certain
-special circumstances.
-
- For example, on rare occasions, there may be a special need to
-encourage the widest possible use of a certain library, so that it becomes
-a de-facto standard. To achieve this, non-free programs must be
-allowed to use the library. A more frequent case is that a free
-library does the same job as widely used non-free libraries. In this
-case, there is little to gain by limiting the free library to free
-software only, so we use the Lesser General Public License.
-
- In other cases, permission to use a particular library in non-free
-programs enables a greater number of people to use a large body of
-free software. For example, permission to use the GNU C Library in
-non-free programs enables many more people to use the whole GNU
-operating system, as well as its variant, the GNU/Linux operating
-system.
-
- Although the Lesser General Public License is Less protective of the
-users' freedom, it does ensure that the user of a program that is
-linked with the Library has the freedom and the wherewithal to run
-that program using a modified version of the Library.
-
- The precise terms and conditions for copying, distribution and
-modification follow. Pay close attention to the difference between a
-"work based on the library" and a "work that uses the library". The
-former contains code derived from the library, whereas the latter must
-be combined with the library in order to run.
-
- GNU LESSER GENERAL PUBLIC LICENSE
- TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
-
- 0. This License Agreement applies to any software library or other
-program which contains a notice placed by the copyright holder or
-other authorized party saying it may be distributed under the terms of
-this Lesser General Public License (also called "this License").
-Each licensee is addressed as "you".
-
- A "library" means a collection of software functions and/or data
-prepared so as to be conveniently linked with application programs
-(which use some of those functions and data) to form executables.
-
- The "Library", below, refers to any such software library or work
-which has been distributed under these terms. A "work based on the
-Library" means either the Library or any derivative work under
-copyright law: that is to say, a work containing the Library or a
-portion of it, either verbatim or with modifications and/or translated
-straightforwardly into another language. (Hereinafter, translation is
-included without limitation in the term "modification".)
-
- "Source code" for a work means the preferred form of the work for
-making modifications to it. For a library, complete source code means
-all the source code for all modules it contains, plus any associated
-interface definition files, plus the scripts used to control compilation
-and installation of the library.
-
- Activities other than copying, distribution and modification are not
-covered by this License; they are outside its scope. The act of
-running a program using the Library is not restricted, and output from
-such a program is covered only if its contents constitute a work based
-on the Library (independent of the use of the Library in a tool for
-writing it). Whether that is true depends on what the Library does
-and what the program that uses the Library does.
-
- 1. You may copy and distribute verbatim copies of the Library's
-complete source code as you receive it, in any medium, provided that
-you conspicuously and appropriately publish on each copy an
-appropriate copyright notice and disclaimer of warranty; keep intact
-all the notices that refer to this License and to the absence of any
-warranty; and distribute a copy of this License along with the
-Library.
-
- You may charge a fee for the physical act of transferring a copy,
-and you may at your option offer warranty protection in exchange for a
-fee.
-
- 2. You may modify your copy or copies of the Library or any portion
-of it, thus forming a work based on the Library, and copy and
-distribute such modifications or work under the terms of Section 1
-above, provided that you also meet all of these conditions:
-
- a) The modified work must itself be a software library.
-
- b) You must cause the files modified to carry prominent notices
- stating that you changed the files and the date of any change.
-
- c) You must cause the whole of the work to be licensed at no
- charge to all third parties under the terms of this License.
-
- d) If a facility in the modified Library refers to a function or a
- table of data to be supplied by an application program that uses
- the facility, other than as an argument passed when the facility
- is invoked, then you must make a good faith effort to ensure that,
- in the event an application does not supply such function or
- table, the facility still operates, and performs whatever part of
- its purpose remains meaningful.
-
- (For example, a function in a library to compute square roots has
- a purpose that is entirely well-defined independent of the
- application. Therefore, Subsection 2d requires that any
- application-supplied function or table used by this function must
- be optional: if the application does not supply it, the square
- root function must still compute square roots.)
-
-These requirements apply to the modified work as a whole. If
-identifiable sections of that work are not derived from the Library,
-and can be reasonably considered independent and separate works in
-themselves, then this License, and its terms, do not apply to those
-sections when you distribute them as separate works. But when you
-distribute the same sections as part of a whole which is a work based
-on the Library, the distribution of the whole must be on the terms of
-this License, whose permissions for other licensees extend to the
-entire whole, and thus to each and every part regardless of who wrote
-it.
-
-Thus, it is not the intent of this section to claim rights or contest
-your rights to work written entirely by you; rather, the intent is to
-exercise the right to control the distribution of derivative or
-collective works based on the Library.
-
-In addition, mere aggregation of another work not based on the Library
-with the Library (or with a work based on the Library) on a volume of
-a storage or distribution medium does not bring the other work under
-the scope of this License.
-
- 3. You may opt to apply the terms of the ordinary GNU General Public
-License instead of this License to a given copy of the Library. To do
-this, you must alter all the notices that refer to this License, so
-that they refer to the ordinary GNU General Public License, version 2,
-instead of to this License. (If a newer version than version 2 of the
-ordinary GNU General Public License has appeared, then you can specify
-that version instead if you wish.) Do not make any other change in
-these notices.
-
- Once this change is made in a given copy, it is irreversible for
-that copy, so the ordinary GNU General Public License applies to all
-subsequent copies and derivative works made from that copy.
-
- This option is useful when you wish to copy part of the code of
-the Library into a program that is not a library.
-
- 4. You may copy and distribute the Library (or a portion or
-derivative of it, under Section 2) in object code or executable form
-under the terms of Sections 1 and 2 above provided that you accompany
-it with the complete corresponding machine-readable source code, which
-must be distributed under the terms of Sections 1 and 2 above on a
-medium customarily used for software interchange.
-
- If distribution of object code is made by offering access to copy
-from a designated place, then offering equivalent access to copy the
-source code from the same place satisfies the requirement to
-distribute the source code, even though third parties are not
-compelled to copy the source along with the object code.
-
- 5. A program that contains no derivative of any portion of the
-Library, but is designed to work with the Library by being compiled or
-linked with it, is called a "work that uses the Library". Such a
-work, in isolation, is not a derivative work of the Library, and
-therefore falls outside the scope of this License.
-
- However, linking a "work that uses the Library" with the Library
-creates an executable that is a derivative of the Library (because it
-contains portions of the Library), rather than a "work that uses the
-library". The executable is therefore covered by this License.
-Section 6 states terms for distribution of such executables.
-
- When a "work that uses the Library" uses material from a header file
-that is part of the Library, the object code for the work may be a
-derivative work of the Library even though the source code is not.
-Whether this is true is especially significant if the work can be
-linked without the Library, or if the work is itself a library. The
-threshold for this to be true is not precisely defined by law.
-
- If such an object file uses only numerical parameters, data
-structure layouts and accessors, and small macros and small inline
-functions (ten lines or less in length), then the use of the object
-file is unrestricted, regardless of whether it is legally a derivative
-work. (Executables containing this object code plus portions of the
-Library will still fall under Section 6.)
-
- Otherwise, if the work is a derivative of the Library, you may
-distribute the object code for the work under the terms of Section 6.
-Any executables containing that work also fall under Section 6,
-whether or not they are linked directly with the Library itself.
-
- 6. As an exception to the Sections above, you may also combine or
-link a "work that uses the Library" with the Library to produce a
-work containing portions of the Library, and distribute that work
-under terms of your choice, provided that the terms permit
-modification of the work for the customer's own use and reverse
-engineering for debugging such modifications.
-
- You must give prominent notice with each copy of the work that the
-Library is used in it and that the Library and its use are covered by
-this License. You must supply a copy of this License. If the work
-during execution displays copyright notices, you must include the
-copyright notice for the Library among them, as well as a reference
-directing the user to the copy of this License. Also, you must do one
-of these things:
-
- a) Accompany the work with the complete corresponding
- machine-readable source code for the Library including whatever
- changes were used in the work (which must be distributed under
- Sections 1 and 2 above); and, if the work is an executable linked
- with the Library, with the complete machine-readable "work that
- uses the Library", as object code and/or source code, so that the
- user can modify the Library and then relink to produce a modified
- executable containing the modified Library. (It is understood
- that the user who changes the contents of definitions files in the
- Library will not necessarily be able to recompile the application
- to use the modified definitions.)
-
- b) Use a suitable shared library mechanism for linking with the
- Library. A suitable mechanism is one that (1) uses at run time a
- copy of the library already present on the user's computer system,
- rather than copying library functions into the executable, and (2)
- will operate properly with a modified version of the library, if
- the user installs one, as long as the modified version is
- interface-compatible with the version that the work was made with.
-
- c) Accompany the work with a written offer, valid for at
- least three years, to give the same user the materials
- specified in Subsection 6a, above, for a charge no more
- than the cost of performing this distribution.
-
- d) If distribution of the work is made by offering access to copy
- from a designated place, offer equivalent access to copy the above
- specified materials from the same place.
-
- e) Verify that the user has already received a copy of these
- materials or that you have already sent this user a copy.
-
- For an executable, the required form of the "work that uses the
-Library" must include any data and utility programs needed for
-reproducing the executable from it. However, as a special exception,
-the materials to be distributed need not include anything that is
-normally distributed (in either source or binary form) with the major
-components (compiler, kernel, and so on) of the operating system on
-which the executable runs, unless that component itself accompanies
-the executable.
-
- It may happen that this requirement contradicts the license
-restrictions of other proprietary libraries that do not normally
-accompany the operating system. Such a contradiction means you cannot
-use both them and the Library together in an executable that you
-distribute.
-
- 7. You may place library facilities that are a work based on the
-Library side-by-side in a single library together with other library
-facilities not covered by this License, and distribute such a combined
-library, provided that the separate distribution of the work based on
-the Library and of the other library facilities is otherwise
-permitted, and provided that you do these two things:
-
- a) Accompany the combined library with a copy of the same work
- based on the Library, uncombined with any other library
- facilities. This must be distributed under the terms of the
- Sections above.
-
- b) Give prominent notice with the combined library of the fact
- that part of it is a work based on the Library, and explaining
- where to find the accompanying uncombined form of the same work.
-
- 8. You may not copy, modify, sublicense, link with, or distribute
-the Library except as expressly provided under this License. Any
-attempt otherwise to copy, modify, sublicense, link with, or
-distribute the Library is void, and will automatically terminate your
-rights under this License. However, parties who have received copies,
-or rights, from you under this License will not have their licenses
-terminated so long as such parties remain in full compliance.
-
- 9. You are not required to accept this License, since you have not
-signed it. However, nothing else grants you permission to modify or
-distribute the Library or its derivative works. These actions are
-prohibited by law if you do not accept this License. Therefore, by
-modifying or distributing the Library (or any work based on the
-Library), you indicate your acceptance of this License to do so, and
-all its terms and conditions for copying, distributing or modifying
-the Library or works based on it.
-
- 10. Each time you redistribute the Library (or any work based on the
-Library), the recipient automatically receives a license from the
-original licensor to copy, distribute, link with or modify the Library
-subject to these terms and conditions. You may not impose any further
-restrictions on the recipients' exercise of the rights granted herein.
-You are not responsible for enforcing compliance by third parties with
-this License.
-
- 11. If, as a consequence of a court judgment or allegation of patent
-infringement or for any other reason (not limited to patent issues),
-conditions are imposed on you (whether by court order, agreement or
-otherwise) that contradict the conditions of this License, they do not
-excuse you from the conditions of this License. If you cannot
-distribute so as to satisfy simultaneously your obligations under this
-License and any other pertinent obligations, then as a consequence you
-may not distribute the Library at all. For example, if a patent
-license would not permit royalty-free redistribution of the Library by
-all those who receive copies directly or indirectly through you, then
-the only way you could satisfy both it and this License would be to
-refrain entirely from distribution of the Library.
-
-If any portion of this section is held invalid or unenforceable under any
-particular circumstance, the balance of the section is intended to apply,
-and the section as a whole is intended to apply in other circumstances.
-
-It is not the purpose of this section to induce you to infringe any
-patents or other property right claims or to contest validity of any
-such claims; this section has the sole purpose of protecting the
-integrity of the free software distribution system which is
-implemented by public license practices. Many people have made
-generous contributions to the wide range of software distributed
-through that system in reliance on consistent application of that
-system; it is up to the author/donor to decide if he or she is willing
-to distribute software through any other system and a licensee cannot
-impose that choice.
-
-This section is intended to make thoroughly clear what is believed to
-be a consequence of the rest of this License.
-
- 12. If the distribution and/or use of the Library is restricted in
-certain countries either by patents or by copyrighted interfaces, the
-original copyright holder who places the Library under this License may add
-an explicit geographical distribution limitation excluding those countries,
-so that distribution is permitted only in or among countries not thus
-excluded. In such case, this License incorporates the limitation as if
-written in the body of this License.
-
- 13. The Free Software Foundation may publish revised and/or new
-versions of the Lesser General Public License from time to time.
-Such new versions will be similar in spirit to the present version,
-but may differ in detail to address new problems or concerns.
-
-Each version is given a distinguishing version number. If the Library
-specifies a version number of this License which applies to it and
-"any later version", you have the option of following the terms and
-conditions either of that version or of any later version published by
-the Free Software Foundation. If the Library does not specify a
-license version number, you may choose any version ever published by
-the Free Software Foundation.
-
- 14. If you wish to incorporate parts of the Library into other free
-programs whose distribution conditions are incompatible with these,
-write to the author to ask for permission. For software which is
-copyrighted by the Free Software Foundation, write to the Free
-Software Foundation; we sometimes make exceptions for this. Our
-decision will be guided by the two goals of preserving the free status
-of all derivatives of our free software and of promoting the sharing
-and reuse of software generally.
-
- NO WARRANTY
-
- 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
-WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
-EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
-OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY
-KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
-IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
-PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
-LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME
-THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
-
- 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
-WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY
-AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU
-FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
-CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE
-LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
-RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
-FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
-SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
-DAMAGES.
-
- END OF TERMS AND CONDITIONS
-
- How to Apply These Terms to Your New Libraries
-
- If you develop a new library, and you want it to be of the greatest
-possible use to the public, we recommend making it free software that
-everyone can redistribute and change. You can do so by permitting
-redistribution under these terms (or, alternatively, under the terms of the
-ordinary General Public License).
-
- To apply these terms, attach the following notices to the library. It is
-safest to attach them to the start of each source file to most effectively
-convey the exclusion of warranty; and each file should have at least the
-"copyright" line and a pointer to where the full notice is found.
-
-
- Copyright (C)
-
- This library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- This library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with this library; if not, write to the Free Software
- Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
-
-Also add information on how to contact you by electronic and paper mail.
-
-You should also get your employer (if you work as a programmer) or your
-school, if any, to sign a "copyright disclaimer" for the library, if
-necessary. Here is a sample; alter the names:
-
- Yoyodyne, Inc., hereby disclaims all copyright interest in the
- library `Frob' (a library for tweaking knobs) written by James Random Hacker.
-
- , 1 April 1990
- Ty Coon, President of Vice
-
-That's all there is to it!
-
-
diff --git a/opensiddur-demos/build.xml b/opensiddur-demos/build.xml
new file mode 100644
index 00000000..946c6f32
--- /dev/null
+++ b/opensiddur-demos/build.xml
@@ -0,0 +1,54 @@
+
+
+ Build file for opensiddur-demos
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/opensiddur-demos/src/api/demo.xqm b/opensiddur-demos/src/api/demo.xqm
new file mode 100644
index 00000000..efc69834
--- /dev/null
+++ b/opensiddur-demos/src/api/demo.xqm
@@ -0,0 +1,96 @@
+xquery version "3.0";
+(: API module for demos
+ :
+ : Functions assume that the following has already been done:
+ : authentication,
+ : content negotiation
+ :
+ : Copyright 2012-2013,2018 Efraim Feinstein
+ : Open Siddur Project
+ : Licensed Under the GNU Lesser General Public License, version 3 or later
+ :)
+module namespace demo="http://jewishliturgy.org/api/demo";
+
+import module namespace uindex="http://jewishliturgy.org/api/utility"
+ at "/db/apps/opensiddur-server/api/utility/utilityindex.xqm";
+import module namespace translit="http://jewishliturgy.org/api/utility/translit"
+ at "/db/apps/opensiddur-server/api/utility/translit.xqm";
+
+declare namespace tr="http://jewishliturgy.org/ns/tr/1.0";
+declare namespace jx="http://jewishliturgy.org/ns/jlp-processor";
+declare namespace tei="http://www.tei-c.org/ns/1.0";
+declare namespace j="http://jewishliturgy.org/ns/jlptei/1.0";
+declare namespace output="http://www.w3.org/2010/xslt-xquery-serialization";
+
+(:~ index function for the demo services
+ : @return An HTML list of available demo service APIs
+ :)
+declare
+ %rest:GET
+ %rest:path("/api/demo")
+ %rest:produces("application/xhtml+xml", "application/xml", "text/html", "text/xml")
+ %output:method("xhtml")
+ function demo:list(
+ ) as item()+ {
+ uindex:list()
+};
+
+(:~ list all available transliteration demos
+ : @deprecated in favor of [[translit:transliteration-list]]
+ : @param $query Limit the search to a particular query
+ : @param $start Start the list at the given item number
+ : @param $max-results Show this many results
+ : @return An HTML list of all transliteration demos that match the given query
+ :)
+declare
+ %rest:GET
+ %rest:path("/api/demo/transliteration")
+ %rest:query-param("q", "{$q}", "")
+ %rest:query-param("start", "{$start}", 1)
+ %rest:query-param("max-results", "{$max-results}", 100)
+ %rest:produces("application/xhtml+xml", "application/xml", "text/html", "text/xml")
+ %output:method("xhtml")
+ function demo:transliteration-list(
+ $q as xs:string*,
+ $start as xs:integer*,
+ $max-results as xs:integer*
+ ) as item()+ {
+ translit:transliteration-list($q, $start, $max-results)
+};
+
+
+(:~ post arbitrary XML for transliteration by a given schema
+ : @deprecated
+ : @param $schema The schema to transliterate using
+ : @return XML of the same structure, containing transliterated text. Use @xml:lang to specify which table should be used.
+ : @error HTTP 404 Transliteration schema not found
+ :)
+declare
+ %rest:POST("{$body}")
+ %rest:path("/api/demo/transliteration/{$schema}")
+ %rest:consumes("application/xml")
+ %rest:produces("application/xml", "text/xml")
+ function demo:transliterate-xml(
+ $body as document-node(),
+ $schema as xs:string
+ ) as item()* {
+ translit:transliterate-xml($body, $schema)
+};
+
+(:~ Transliterate plain text
+ : @deprecated
+ : @param $body The text to transliterate, which is assumed to be Hebrew
+ : @return Transliterated plain text
+ : @error HTTP 404 Transliteration schema not found
+ :)
+declare
+ %rest:POST("{$body}")
+ %rest:path("/api/demo/transliteration/{$schema}")
+ %rest:consumes("text/plain")
+ %rest:produces("text/plain")
+ function demo:transliterate-text(
+ $body as xs:base64Binary,
+ $schema as xs:string
+ ) as item()+ {
+ translit:transliterate-text($body, $schema)
+};
diff --git a/opensiddur-demos/src/expath-pkg.xml b/opensiddur-demos/src/expath-pkg.xml
new file mode 100644
index 00000000..c74587c1
--- /dev/null
+++ b/opensiddur-demos/src/expath-pkg.xml
@@ -0,0 +1,12 @@
+
+
+ Open Siddur Pre-Client Demos
+
+
+
+
diff --git a/opensiddur-demos/src/post-install.xql b/opensiddur-demos/src/post-install.xql
new file mode 100644
index 00000000..9d289e43
--- /dev/null
+++ b/opensiddur-demos/src/post-install.xql
@@ -0,0 +1,5 @@
+xquery version "3.0";
+
+util:log-system-out("Register RESTXQ..."),
+exrest:register-module(xs:anyURI("/db/apps/opensiddur-demos/api/demo.xqm")),
+util:log-system-out("Done.")
diff --git a/opensiddur-demos/src/repo.xml b/opensiddur-demos/src/repo.xml
new file mode 100644
index 00000000..66e4bcb9
--- /dev/null
+++ b/opensiddur-demos/src/repo.xml
@@ -0,0 +1,14 @@
+
+
+ Open Siddur Pre-client Demos
+ Efraim Feinstein
+ http://github.com/opensiddur/opensiddur
+ alpha
+ GNU-LGPL
+ true
+ application
+ opensiddur-demos
+
+ post-install.xql
+
+
diff --git a/opensiddur-demos/src/translit/index.html b/opensiddur-demos/src/translit/index.html
new file mode 100644
index 00000000..817ee8f9
--- /dev/null
+++ b/opensiddur-demos/src/translit/index.html
@@ -0,0 +1,109 @@
+
+
+
+
+
+
+
+
+ Open Siddur Testing Application
+
+
+
+
+
+
+
This is a demo of the Open Siddur automated transliterator.
+
+
Be aware of the following known issues:
+
+
All Hebrew text must be in Unicode encoding and all vowels must be written correctly.
+ The transliterator is not tolerant of spelling mistakes.
+
The transliterator is sensitive to the presence of the Unicode qamats qatan:
+ כָּל will transliterate incorrectly,
+ כׇּל will transliterate correctly.
+
The transliterator is sensitive to the presence of the Unicode holam haser for vav:
+ מִצְוֹת will transliterate incorrectly,
+ מִצְוֺת will transliterate correctly.
+
+
+
+
+
+
+
+
+
+
+
diff --git a/opensiddur-demos/src/translit/js/app.js b/opensiddur-demos/src/translit/js/app.js
new file mode 100644
index 00000000..57f8e004
--- /dev/null
+++ b/opensiddur-demos/src/translit/js/app.js
@@ -0,0 +1,93 @@
+/* Transliteration demo application
+ * Copyright 2013,2018-2019 Efraim Feinstein, efraim@opensiddur.org
+ * Licensed under the GNU Lesser General Public License, version 3 or later
+ */
+var httpPrefix = "";
+
+/* retrieve an API error return value and return the string */
+var getApiError = function(data) {
+ return $($.parseXML(data)).find("message").text();
+};
+
+var OpenSiddurTranslitDemoApp =
+ angular.module(
+ 'OpenSiddurTranslitDemoApp', []
+ );
+
+OpenSiddurTranslitDemoApp.controller(
+ 'MainCtrl',
+ ['$scope', '$http',
+ function ($scope, $http) {
+ console.log("Demo app controller.")
+
+ $scope.errorMessage = "";
+ $scope.tables = []; // transliteration tables
+ $scope.selectedTable = { "demoApi" : undefined, "api" : undefined, "name" : "None" };
+ $scope.text = "";
+ $scope.transliterated = "";
+ $scope.list = function () {
+ $http.get(
+ httpPrefix + "/api/data/transliteration",
+ {
+ transformResponse: function(data, headers) {
+ console.log(data);
+ var tables = [];
+ var n = 0;
+ $("a.document", data).each(
+ function () {
+ var element = $(this);
+ tables.push({
+ "name" : element.text(),
+ "api" : element.attr("href"),
+ "demoApi" : element.attr("href").replace("/api/data/transliteration/", "/api/utility/translit/")
+ });
+
+ }
+ );
+ return tables;
+ }
+ })
+ .success(
+ function(data, status, headers, config) {
+ $scope.errorMessage = "";
+ console.log(data);
+ $scope.tables = data;
+ }
+ )
+ .error(
+ function(data, status, headers, config) {
+ $scope.errorMessage = getApiError(data)
+ }
+ );
+
+ };
+ $scope.transliterate = function () {
+ $http.post(
+ $scope.selectedTable.demoApi,
+ "" + $scope.text + "",
+ {
+ headers : {
+ "Content-Type" : "application/xml"
+ },
+ responseType: "xml"
+ }
+ )
+ .success(
+ function(data, status, headers, config) {
+ $scope.errorMessage = "";
+ console.log(data);
+ $scope.transliterated = $(data).html();
+ }
+ )
+ .error(
+ function(data, status, headers, config) {
+ $scope.errorMessage = getApiError(data)
+ }
+ );
+
+ };
+
+ $scope.list();
+ }
+ ]
+ );
diff --git a/opensiddur-extensions/pom.xml b/opensiddur-extensions/pom.xml
new file mode 100644
index 00000000..93f32a68
--- /dev/null
+++ b/opensiddur-extensions/pom.xml
@@ -0,0 +1,110 @@
+
+ 4.0.0
+ org.opensiddur
+ testing
+ 1.0-SNAPSHOT
+
+
+ UTF-8
+ 2.12.11
+ 2.12
+ 3.2.0
+ 6.0.1
+ 1.7.0
+ 3.1.3
+
+
+
+
+ org.scala-lang
+ scala-library
+ ${scala.version}
+
+
+
+ net.sf.xmldb-org
+ xmldb-api
+ ${xmldb.api.version}
+
+
+
+ org.exist-db
+ exist-core
+ ${exist.version}
+
+
+ org.apache.xmlrpc
+ xmlrpc-client
+ ${xmlrpc.version}
+
+
+ org.apache.logging.log4j
+ log4j-core
+ 2.17.1
+
+
+ commons-logging
+ commons-logging
+ 1.2
+
+
+ com.evolvedbinary.j8fu
+ j8fu
+ 1.21
+
+
+
+ com.lihaoyi
+ requests_${scala.major.version}
+ 0.7.1
+
+
+
+ org.scalatest
+ scalatest_${scala.major.version}
+ ${scalatest.version}
+ test
+
+
+ org.scalatest
+ scalatest-funspec_${scala.major.version}
+ 3.2.0
+
+
+
+
+
+
+ org.scala-tools
+ maven-scala-plugin
+ 2.15.2
+
+
+
+ compile
+ testCompile
+
+
+
+
+
+
+ org.scalatest
+ scalatest-maven-plugin
+ 1.0
+
+
+
+
+ test
+
+ test
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/opensiddur-extensions/src/test/resources/api/data/conditionals/existing.xml b/opensiddur-extensions/src/test/resources/api/data/conditionals/existing.xml
new file mode 100644
index 00000000..c912f838
--- /dev/null
+++ b/opensiddur-extensions/src/test/resources/api/data/conditionals/existing.xml
@@ -0,0 +1,169 @@
+
+
+
+
+ existing
+
+
+
+ Open Siddur Project
+
+
+
+
+ 2012-06-08
+
+
+
+
+
+
+
+
+
+
+
+ Result of a query
+
+ For testing the search function
+
+
+
+
+ Describes conditionals for some holidays
+
+ On Shabbat
+
+
+
+
+
+
+
+ On Passover
+
+
+
+
+ On Festivals
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Demo an on-off switch
+
+ Whether to use a dingbat to indicate where the reader starts
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/opensiddur-extensions/src/test/resources/api/data/conditionals/existing_after_put.xml b/opensiddur-extensions/src/test/resources/api/data/conditionals/existing_after_put.xml
new file mode 100644
index 00000000..6ba8a3d4
--- /dev/null
+++ b/opensiddur-extensions/src/test/resources/api/data/conditionals/existing_after_put.xml
@@ -0,0 +1,176 @@
+
+
+
+
+ existing
+
+
+
+ Open Siddur Project
+
+
+
+
+ 2012-06-08
+
+
+
+
+
+
+
+
+
+
+
+ Describes conditionals for some holidays
+
+ On Shabbat
+
+
+
+
+
+
+
+ On Passover
+
+
+
+
+ On Shavuot
+
+
+
+ On Festivals
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Demo an on-off switch
+
+ Whether to use a dingbat to indicate where the reader starts
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/opensiddur-extensions/src/test/resources/api/data/conditionals/invalid.xml b/opensiddur-extensions/src/test/resources/api/data/conditionals/invalid.xml
new file mode 100644
index 00000000..5c3b79bd
--- /dev/null
+++ b/opensiddur-extensions/src/test/resources/api/data/conditionals/invalid.xml
@@ -0,0 +1,88 @@
+
+
+
+
+ Invalid
+
+
+
+
+
+
+ Open Siddur Project
+
+ 2012-06-08
+
+
+
+
+
+
+
+
+
+
+
+ Describes conditionals for some holidays
+
+ On Shabbat
+
+
+
+
+
+
+
+ On Passover
+
+
+
+
+ On Festivals
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Demo an on-off switch
+
+ Whether to use a dingbat to indicate where the reader starts
+
+
+
+
+
+
+
+
+
+
+
+
+ not allowed here
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/opensiddur-extensions/src/test/resources/api/data/conditionals/no_write_access.xml b/opensiddur-extensions/src/test/resources/api/data/conditionals/no_write_access.xml
new file mode 100644
index 00000000..82c1c67e
--- /dev/null
+++ b/opensiddur-extensions/src/test/resources/api/data/conditionals/no_write_access.xml
@@ -0,0 +1,33 @@
+
+
+
+
+ existing
+
+
+
+
+
+
+ Open Siddur Project
+
+ 2012-06-08
+
+
+
+
+
+
+
+
+
+
+
+ Just one on off switch
+
+ Do something random
+
+
+
+
+
\ No newline at end of file
diff --git a/opensiddur-extensions/src/test/resources/api/data/conditionals/type1.xml b/opensiddur-extensions/src/test/resources/api/data/conditionals/type1.xml
new file mode 100644
index 00000000..88e8fc04
--- /dev/null
+++ b/opensiddur-extensions/src/test/resources/api/data/conditionals/type1.xml
@@ -0,0 +1,37 @@
+
+
+
+
+ Valid
+
+
+
+ Open Siddur Project
+
+
+
+
+ 2012-06-08
+
+
+
+
+
+
+
+
+
+
+
+ first type
+
+ First
+
+
+
+ Second
+
+
+
+
+
diff --git a/opensiddur-extensions/src/test/resources/api/data/conditionals/type2.xml b/opensiddur-extensions/src/test/resources/api/data/conditionals/type2.xml
new file mode 100644
index 00000000..7b99cdb6
--- /dev/null
+++ b/opensiddur-extensions/src/test/resources/api/data/conditionals/type2.xml
@@ -0,0 +1,37 @@
+
+
+
+
+ Valid
+
+
+
+ Open Siddur Project
+
+
+
+
+ 2012-06-08
+
+
+
+
+
+
+
+
+
+
+
+ second type
+
+ First of second
+
+
+
+ Second of second
+
+
+
+
+
diff --git a/opensiddur-extensions/src/test/resources/api/data/conditionals/valid.xml b/opensiddur-extensions/src/test/resources/api/data/conditionals/valid.xml
new file mode 100644
index 00000000..8820aed3
--- /dev/null
+++ b/opensiddur-extensions/src/test/resources/api/data/conditionals/valid.xml
@@ -0,0 +1,162 @@
+
+
+
+
+ Valid
+
+
+
+ Open Siddur Project
+
+
+
+
+ 2012-06-08
+
+
+
+
+
+
+
+
+
+
+
+ Describes conditionals for some holidays
+
+ On Shabbat
+
+
+
+
+
+
+
+ On Passover
+
+
+
+
+ On Festivals
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Demo an on-off switch
+
+ Whether to use a dingbat to indicate where the reader starts
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/opensiddur-extensions/src/test/resources/api/data/conditionals/xtype1x.xml b/opensiddur-extensions/src/test/resources/api/data/conditionals/xtype1x.xml
new file mode 100644
index 00000000..0d5bc61a
--- /dev/null
+++ b/opensiddur-extensions/src/test/resources/api/data/conditionals/xtype1x.xml
@@ -0,0 +1,37 @@
+
+
+
+
+ Valid
+
+
+
+ Open Siddur Project
+
+
+
+
+ 2012-06-08
+
+
+
+
+
+
+
+
+
+
+
+ first type
+
+ First X
+
+
+
+ Second X
+
+
+
+
+
diff --git a/opensiddur-extensions/src/test/resources/api/data/dictionaries/existing.xml b/opensiddur-extensions/src/test/resources/api/data/dictionaries/existing.xml
new file mode 100644
index 00000000..114cbfb8
--- /dev/null
+++ b/opensiddur-extensions/src/test/resources/api/data/dictionaries/existing.xml
@@ -0,0 +1,97 @@
+
+
+
+
+ existing
+
+
+ Transcribed by
+ Test User
+
+
+
+
+
+ Open Siddur Project
+
+
+
+
+ 2012-06-08
+
+
+
+
+
+
+
+
+
+ Document created from template
+
+
+
+
+
+
+ אָב
+
+ אָב
+
+ awb
+
+
+ Hebrew
+ a primitive word;
+
+
+ n-m
+
+
+
+ father, in a literal and immediate, or figurative and remote application
+ chief, (fore-) father(-less), [idiom] patrimony, principal. Compare names in 'Abi-'.
+
+
+
+ Query result
+
+
+ father of an individual
+
+
+ of God as father of his people
+
+
+ head or founder of a household, group, family, or clan
+
+
+ ancestor
+
+
+ grandfather, forefathers — of person
+
+
+ of people
+
+
+ originator or patron of a class, profession, or art
+
+
+ of producer, generator (fig.)
+
+
+ of benevolence and protection (fig.)
+
+
+ term of respect and honour
+
+
+ ruler or chief (spec.)
+
+
+
+
+
+
\ No newline at end of file
diff --git a/opensiddur-extensions/src/test/resources/api/data/dictionaries/existing_after_put.xml b/opensiddur-extensions/src/test/resources/api/data/dictionaries/existing_after_put.xml
new file mode 100644
index 00000000..c73f40bc
--- /dev/null
+++ b/opensiddur-extensions/src/test/resources/api/data/dictionaries/existing_after_put.xml
@@ -0,0 +1,100 @@
+
+
+
+
+ existing
+
+
+ Transcribed by
+ Test User
+
+
+
+
+
+ Open Siddur Project
+
+
+
+
+ 2012-06-08
+
+
+
+
+
+
+
+
+
+ Document created from template
+
+
+
+
+
+
+ אָב
+
+ אָב
+
+ awb
+
+
+ Hebrew
+ a primitive word;
+
+
+ n-m
+
+
+
+ father, in a literal and immediate, or figurative and remote application
+ chief, (fore-) father(-less), [idiom] patrimony, principal. Compare names in 'Abi-'.
+
+
+
+ Query result
+
+
+ father of an individual
+
+
+ of God as father of his people
+
+
+ head or founder of a household, group, family, or clan
+
+
+ ancestor
+
+
+ grandfather, forefathers — of person
+
+
+ of people
+
+
+ originator or patron of a class, profession, or art
+
+
+ of producer, generator (fig.)
+
+
+ of benevolence and protection (fig.)
+
+
+ term of respect and honour
+
+
+ ruler or chief (spec.)
+
+
+ added!
+
+
+
+
+
+
\ No newline at end of file
diff --git a/opensiddur-extensions/src/test/resources/api/data/dictionaries/invalid.xml b/opensiddur-extensions/src/test/resources/api/data/dictionaries/invalid.xml
new file mode 100644
index 00000000..3cceb403
--- /dev/null
+++ b/opensiddur-extensions/src/test/resources/api/data/dictionaries/invalid.xml
@@ -0,0 +1,97 @@
+
+
+
+
+ Invalid
+
+
+ Transcribed by
+ Test User
+
+
+
+
+
+
+
+
+ Open Siddur Project
+
+ 2012-06-08
+
+
+
+
+
+
+
+
+
+ Document created from template
+
+
+
+
+ illegal here
+
+
+
+
+ אָב
+
+ אָב
+
+ awb
+
+
+ Hebrew
+ a primitive word;
+
+
+ n-m
+
+
+
+ father, in a literal and immediate, or figurative and remote application
+ chief, (fore-) father(-less), [idiom] patrimony, principal. Compare names in 'Abi-'.
+
+
+
+ father of an individual
+
+
+ of God as father of his people
+
+
+ head or founder of a household, group, family, or clan
+
+
+ ancestor
+
+
+ grandfather, forefathers — of person
+
+
+ of people
+
+
+ originator or patron of a class, profession, or art
+
+
+ of producer, generator (fig.)
+
+
+ of benevolence and protection (fig.)
+
+
+ term of respect and honour
+
+
+ ruler or chief (spec.)
+
+
+
+
+
+
\ No newline at end of file
diff --git a/opensiddur-extensions/src/test/resources/api/data/dictionaries/invalid_after_put.xml b/opensiddur-extensions/src/test/resources/api/data/dictionaries/invalid_after_put.xml
new file mode 100644
index 00000000..69af08c6
--- /dev/null
+++ b/opensiddur-extensions/src/test/resources/api/data/dictionaries/invalid_after_put.xml
@@ -0,0 +1,98 @@
+
+
+
+
+ existing
+
+
+ Transcribed by
+ Test User
+
+
+
+
+
+
+
+
+ Open Siddur Project
+
+ 2012-06-08
+
+
+
+
+
+
+
+
+
+ Invalid change record
+ Document created from template
+
+
+
+
+
+
+ אָב
+
+ אָב
+
+ awb
+
+
+ Hebrew
+ a primitive word;
+
+
+ n-m
+
+
+
+ father, in a literal and immediate, or figurative and remote application
+ chief, (fore-) father(-less), [idiom] patrimony, principal. Compare names in 'Abi-'.
+
+
+
+ Query result
+
+
+ father of an individual
+
+
+ of God as father of his people
+
+
+ head or founder of a household, group, family, or clan
+
+
+ ancestor
+
+
+ grandfather, forefathers — of person
+
+
+ of people
+
+
+ originator or patron of a class, profession, or art
+
+
+ of producer, generator (fig.)
+
+
+ of benevolence and protection (fig.)
+
+
+ term of respect and honour
+
+
+ ruler or chief (spec.)
+
+
+
+
+
+
\ No newline at end of file
diff --git a/opensiddur-extensions/src/test/resources/api/data/dictionaries/no_write_access.xml b/opensiddur-extensions/src/test/resources/api/data/dictionaries/no_write_access.xml
new file mode 100644
index 00000000..c41e94e1
--- /dev/null
+++ b/opensiddur-extensions/src/test/resources/api/data/dictionaries/no_write_access.xml
@@ -0,0 +1,94 @@
+
+
+
+
+ NoWriteAccess
+
+
+ Transcribed by
+ Test User
+
+
+
+
+
+
+
+
+ Open Siddur Project
+
+ 2012-06-08
+
+
+
+
+
+
+
+
+
+ Document created from template
+
+
+
+
+
+
+ אָב
+
+ אָב
+
+ awb
+
+
+ Hebrew
+ a primitive word;
+
+
+ n-m
+
+
+
+ father, in a literal and immediate, or figurative and remote application
+ chief, (fore-) father(-less), [idiom] patrimony, principal. Compare names in 'Abi-'.
+
+
+
+ father of an individual
+
+
+ of God as father of his people
+
+
+ head or founder of a household, group, family, or clan
+
+
+ ancestor
+
+
+ grandfather, forefathers — of person
+
+
+ of people
+
+
+ originator or patron of a class, profession, or art
+
+
+ of producer, generator (fig.)
+
+
+ of benevolence and protection (fig.)
+
+
+ term of respect and honour
+
+
+ ruler or chief (spec.)
+
+
+
+
+
+
\ No newline at end of file
diff --git a/opensiddur-extensions/src/test/resources/api/data/dictionaries/valid.xml b/opensiddur-extensions/src/test/resources/api/data/dictionaries/valid.xml
new file mode 100644
index 00000000..dd8dea95
--- /dev/null
+++ b/opensiddur-extensions/src/test/resources/api/data/dictionaries/valid.xml
@@ -0,0 +1,94 @@
+
+
+
+
+ Valid
+
+
+ Transcribed by
+ Test User
+
+
+
+
+
+ Open Siddur Project
+
+
+
+
+ 2012-06-08
+
+
+
+
+
+
+
+
+
+ Document created from template
+
+
+
+
+
+
+ אָב
+
+ אָב
+
+ awb
+
+
+ Hebrew
+ a primitive word;
+
+
+ n-m
+
+
+
+ father, in a literal and immediate, or figurative and remote application
+ chief, (fore-) father(-less), [idiom] patrimony, principal. Compare names in 'Abi-'.
+
+
+
+ father of an individual
+
+
+ of God as father of his people
+
+
+ head or founder of a household, group, family, or clan
+
+
+ ancestor
+
+
+ grandfather, forefathers — of person
+
+
+ of people
+
+
+ originator or patron of a class, profession, or art
+
+
+ of producer, generator (fig.)
+
+
+ of benevolence and protection (fig.)
+
+
+ term of respect and honour
+
+
+ ruler or chief (spec.)
+
+
+
+
+
+
\ No newline at end of file
diff --git a/opensiddur-extensions/src/test/resources/api/data/linkage/existing-after-put.xml b/opensiddur-extensions/src/test/resources/api/data/linkage/existing-after-put.xml
new file mode 100644
index 00000000..581a7cfc
--- /dev/null
+++ b/opensiddur-extensions/src/test/resources/api/data/linkage/existing-after-put.xml
@@ -0,0 +1,47 @@
+
+
+
+
+ Existing
+
+
+ Transcribed by
+ Test User
+
+
+
+
+
+ Open Siddur Project
+
+
+
+
+ 2012-06-08
+
+
+
+
+
+
+
+
+
+ Document created from template
+
+
+
+
+
+ Query result
+
+
+
+ Test Translation
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/opensiddur-extensions/src/test/resources/api/data/linkage/existing-with-invalid-revision-desc.xml b/opensiddur-extensions/src/test/resources/api/data/linkage/existing-with-invalid-revision-desc.xml
new file mode 100644
index 00000000..7dc9ae40
--- /dev/null
+++ b/opensiddur-extensions/src/test/resources/api/data/linkage/existing-with-invalid-revision-desc.xml
@@ -0,0 +1,47 @@
+
+
+
+
+ Existing
+
+ Transcribed by
+ Test User
+
+
+
+
+
+ Open Siddur Project
+
+
+
+
+ 2012-06-08
+
+
+
+
+
+
+
+
+
+
+ Document created from template
+
+
+
+
+
+ Query result
+
+
+
+ Test Translation
+
+
+
+
+
+
+
diff --git a/opensiddur-extensions/src/test/resources/api/data/linkage/existing.xml b/opensiddur-extensions/src/test/resources/api/data/linkage/existing.xml
new file mode 100644
index 00000000..4907fd6c
--- /dev/null
+++ b/opensiddur-extensions/src/test/resources/api/data/linkage/existing.xml
@@ -0,0 +1,46 @@
+
+
+
+
+ Existing
+
+ Transcribed by
+ Test User
+
+
+
+
+ Open Siddur Project
+
+
+
+
+ 2012-06-08
+
+
+
+
+
+
+
+
+
+ Document created from template
+
+
+
+
+
+ Query result
+
+
+
+ Test Translation
+
+
+
+
+
+
diff --git a/opensiddur-extensions/src/test/resources/api/data/linkage/invalid.xml b/opensiddur-extensions/src/test/resources/api/data/linkage/invalid.xml
new file mode 100644
index 00000000..b248da60
--- /dev/null
+++ b/opensiddur-extensions/src/test/resources/api/data/linkage/invalid.xml
@@ -0,0 +1,42 @@
+
+
+
+
+ Invalid
+
+
+ Transcribed by
+ Test User
+
+
+
+
+
+
+
+
+ Open Siddur Project
+
+ 2012-06-08
+
+
+
+
+
+
+
+
+
+ Document created from template
+
+
+
+
+ Has Nonexistent
+
+
+
+
+
+
+
diff --git a/opensiddur-extensions/src/test/resources/api/data/linkage/original-a.xml b/opensiddur-extensions/src/test/resources/api/data/linkage/original-a.xml
new file mode 100644
index 00000000..7cbf5705
--- /dev/null
+++ b/opensiddur-extensions/src/test/resources/api/data/linkage/original-a.xml
@@ -0,0 +1,96 @@
+
+
+
+
+ A-he
+
+ Transcribed by
+ Test User
+
+
+
+
+
+
+
+ Open Siddur Project
+
+ 2012-06-08
+
+
+
+
+
+
+
+
+
+ Document created from template
+
+
+
+
+
+ בְּרֵאשִׁ֖ית
+ בָּרָ֣א
+ אֱלֹהִ֑ים
+
+
+ אֵ֥ת
+ הַשָּׁמַ֖יִם
+ וְאֵ֥ת
+ הָאָֽרֶץ
+ ׃
+
+
+ וְהָאָ֗רֶץ
+
+
+ הָיְתָ֥ה
+ תֹ֙הוּ֙
+ וָבֹ֔הוּ
+
+
+ וְחֹ֖שֶׁךְ
+ עַל
+ ־
+ פְּנֵ֣י
+ תְה֑וֹם
+
+
+ וְר֣וּחַ
+ אֱלֹהִ֔ים
+
+
+ מְרַחֶ֖פֶת
+ עַל
+ ־
+ פְּנֵ֥י
+ הַמָּֽיִם
+ ׃
+
+
+
+
+
+ בראשית
+
+ 1
+ 1
+
+
+
+
+ 1
+ 2
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/opensiddur-extensions/src/test/resources/api/data/linkage/original-b.xml b/opensiddur-extensions/src/test/resources/api/data/linkage/original-b.xml
new file mode 100644
index 00000000..68cc056d
--- /dev/null
+++ b/opensiddur-extensions/src/test/resources/api/data/linkage/original-b.xml
@@ -0,0 +1,116 @@
+
+
+
+
+ B-en
+
+
+ Transcribed by
+ Test User
+
+
+
+
+
+
+
+
+ Open Siddur Project
+
+ 2012-06-08
+
+
+
+
+
+
+
+
+
+ Document created from template
+
+
+
+
+
+ In
+ the
+ beginning
+ ,
+
+
+ God
+ created
+ the
+ heavens
+ and
+ the
+ earth
+ .
+
+
+ And
+ the
+ earth
+ was
+ without
+ form
+
+
+ and
+ void
+
+
+ and
+ darkness
+ was
+ on
+ the
+ face
+ of
+ the
+ deep
+ .
+
+
+ And
+ the
+ spirit
+ of
+ God
+
+
+ moved
+ on
+ the
+ face
+ of
+ the
+ waters
+ .
+
+
+
+
+
+ Genesis
+
+ 1
+ 1
+
+
+
+
+ 1
+ 2
+
+
+
+
+
+
+
+
+
+
+
diff --git a/opensiddur-extensions/src/test/resources/api/data/linkage/valid.xml b/opensiddur-extensions/src/test/resources/api/data/linkage/valid.xml
new file mode 100644
index 00000000..d8d1cda1
--- /dev/null
+++ b/opensiddur-extensions/src/test/resources/api/data/linkage/valid.xml
@@ -0,0 +1,49 @@
+
+
+
+
+ Valid
+
+ Transcribed by
+ Test User
+
+
+
+
+ Open Siddur Project
+
+
+
+
+ 2012-06-08
+
+
+
+
+
+
+
+
+
+ Document created from template
+
+
+
+
+
+ Front matter
+
+
+
+ Test Translation
+
+
+
+
+
+
+ Back matter
+
+
+
+
diff --git a/opensiddur-extensions/src/test/resources/api/data/linkageid/linkage-a-b.xml b/opensiddur-extensions/src/test/resources/api/data/linkageid/linkage-a-b.xml
new file mode 100644
index 00000000..f5604c95
--- /dev/null
+++ b/opensiddur-extensions/src/test/resources/api/data/linkageid/linkage-a-b.xml
@@ -0,0 +1,49 @@
+
+
+
+
+ a=b
+
+ Transcribed by
+ Test User
+
+
+
+
+ Open Siddur Project
+
+
+
+
+ 2012-06-08
+
+
+
+
+
+
+
+
+
+ Document created from template
+
+
+
+
+
+ Front matter
+
+
+
+ identifier1
+
+
+
+
+
+
+ Back matter
+
+
+
+
diff --git a/opensiddur-extensions/src/test/resources/api/data/linkageid/linkage-a-c.xml b/opensiddur-extensions/src/test/resources/api/data/linkageid/linkage-a-c.xml
new file mode 100644
index 00000000..3bea8d2e
--- /dev/null
+++ b/opensiddur-extensions/src/test/resources/api/data/linkageid/linkage-a-c.xml
@@ -0,0 +1,49 @@
+
+
+
+
+ a=c
+
+ Transcribed by
+ Test User
+
+
+
+
+ Open Siddur Project
+
+
+
+
+ 2012-06-08
+
+
+
+
+
+
+
+
+
+ Document created from template
+
+
+
+
+
+ Front matter
+
+
+
+ identifier2
+
+
+
+
+
+
+ Back matter
+
+
+
+
diff --git a/opensiddur-extensions/src/test/resources/api/data/linkageid/linkage-b-c.xml b/opensiddur-extensions/src/test/resources/api/data/linkageid/linkage-b-c.xml
new file mode 100644
index 00000000..8b7d7dc9
--- /dev/null
+++ b/opensiddur-extensions/src/test/resources/api/data/linkageid/linkage-b-c.xml
@@ -0,0 +1,49 @@
+
+
+
+
+ b=c
+
+ Transcribed by
+ Test User
+
+
+
+
+ Open Siddur Project
+
+
+
+
+ 2012-06-08
+
+
+
+
+
+
+
+
+
+ Document created from template
+
+
+
+
+
+ Front matter
+
+
+
+ identifier1
+
+
+
+
+
+
+ Back matter
+
+
+
+
diff --git a/opensiddur-extensions/src/test/resources/api/data/linkageid/original-a.xml b/opensiddur-extensions/src/test/resources/api/data/linkageid/original-a.xml
new file mode 100644
index 00000000..2bed6bfb
--- /dev/null
+++ b/opensiddur-extensions/src/test/resources/api/data/linkageid/original-a.xml
@@ -0,0 +1,38 @@
+
+
+
+
+ original a
+
+ Transcribed by
+ Test User
+
+
+
+
+
+
+
+ Open Siddur Project
+
+ 2012-06-08
+
+
+
+
+
+
+
+
+
+ Document created from template
+
+
+
+
+
+ A A A
+
+
+
+
\ No newline at end of file
diff --git a/opensiddur-extensions/src/test/resources/api/data/linkageid/original-b.xml b/opensiddur-extensions/src/test/resources/api/data/linkageid/original-b.xml
new file mode 100644
index 00000000..ae4088d2
--- /dev/null
+++ b/opensiddur-extensions/src/test/resources/api/data/linkageid/original-b.xml
@@ -0,0 +1,40 @@
+
+
+
+
+ original-b
+
+
+ Transcribed by
+ Test User
+
+
+
+
+
+
+
+
+ Open Siddur Project
+
+ 2012-06-08
+
+
+
+
+
+
+
+
+
+ Document created from template
+
+
+
+
+
+ B B B
+
+
+
+
diff --git a/opensiddur-extensions/src/test/resources/api/data/linkageid/original-c.xml b/opensiddur-extensions/src/test/resources/api/data/linkageid/original-c.xml
new file mode 100644
index 00000000..1be8ae32
--- /dev/null
+++ b/opensiddur-extensions/src/test/resources/api/data/linkageid/original-c.xml
@@ -0,0 +1,38 @@
+
+
+
+
+ original c
+
+ Transcribed by
+ Test User
+
+
+
+
+
+
+
+ Open Siddur Project
+
+ 2012-06-08
+
+
+
+
+
+
+
+
+
+ Document created from template
+
+
+
+
+
+ C C C
+
+
+
+
\ No newline at end of file
diff --git a/opensiddur-extensions/src/test/resources/api/data/notes/existing.xml b/opensiddur-extensions/src/test/resources/api/data/notes/existing.xml
new file mode 100644
index 00000000..2b111510
--- /dev/null
+++ b/opensiddur-extensions/src/test/resources/api/data/notes/existing.xml
@@ -0,0 +1,42 @@
+
+
+
+
+ existing
+
+
+ Transcribed by
+ Test User
+
+
+
+
+
+ Open Siddur Project
+
+
+
+
+ 2012-06-08
+
+
+
+
+
+
+
+
+
+ Document created from template
+
+
+
+ This is a note.
+
+
+ String
+
+
+ Category
+
+
diff --git a/opensiddur-extensions/src/test/resources/api/data/notes/existing_after_put.xml b/opensiddur-extensions/src/test/resources/api/data/notes/existing_after_put.xml
new file mode 100644
index 00000000..6ee65e36
--- /dev/null
+++ b/opensiddur-extensions/src/test/resources/api/data/notes/existing_after_put.xml
@@ -0,0 +1,43 @@
+
+
+
+
+ existing
+
+
+ Transcribed by
+ Test User
+
+
+
+
+
+ Open Siddur Project
+
+
+
+
+ 2012-06-08
+
+
+
+
+
+
+
+
+
+ Document created from template
+
+
+
+ This is a note.
+ This is an added note.
+
+
+ String
+
+
+ Category
+
+
diff --git a/opensiddur-extensions/src/test/resources/api/data/notes/invalid.xml b/opensiddur-extensions/src/test/resources/api/data/notes/invalid.xml
new file mode 100644
index 00000000..3df2c7c7
--- /dev/null
+++ b/opensiddur-extensions/src/test/resources/api/data/notes/invalid.xml
@@ -0,0 +1,35 @@
+
+
+
+
+ Valid
+
+ Transcribed by
+ Test User
+
+
+
+
+
+
+
+
+ Open Siddur Project
+
+ 2012-06-08
+
+
+
+
+
+
+
+
+
+ Document created from template
+
+
+
+
+
+
\ No newline at end of file
diff --git a/opensiddur-extensions/src/test/resources/api/data/notes/invalid_after_put_illegal_revisiondesc.xml b/opensiddur-extensions/src/test/resources/api/data/notes/invalid_after_put_illegal_revisiondesc.xml
new file mode 100644
index 00000000..6f6ecdae
--- /dev/null
+++ b/opensiddur-extensions/src/test/resources/api/data/notes/invalid_after_put_illegal_revisiondesc.xml
@@ -0,0 +1,44 @@
+
+
+
+
+ existing
+
+
+ Transcribed by
+ Test User
+
+
+
+
+
+ Open Siddur Project
+
+
+
+
+ 2012-06-08
+
+
+
+
+
+
+
+
+
+ A fake revision
+ Document created from template
+
+
+
+ This is a note.
+ This is an added note.
+
+
+ String
+
+
+ Category
+
+
diff --git a/opensiddur-extensions/src/test/resources/api/data/notes/query.xml b/opensiddur-extensions/src/test/resources/api/data/notes/query.xml
new file mode 100644
index 00000000..22a70452
--- /dev/null
+++ b/opensiddur-extensions/src/test/resources/api/data/notes/query.xml
@@ -0,0 +1,36 @@
+
+
+
+
+ Query
+
+
+ Transcribed by
+ Test User
+
+
+
+
+
+ Open Siddur Project
+
+
+
+
+ 2012-06-08
+
+
+
+
+
+
+
+
+
+ Document created from template
+
+
+
+ Note query.
+
+
diff --git a/opensiddur-extensions/src/test/resources/api/data/notes/valid.xml b/opensiddur-extensions/src/test/resources/api/data/notes/valid.xml
new file mode 100644
index 00000000..ea1efdf0
--- /dev/null
+++ b/opensiddur-extensions/src/test/resources/api/data/notes/valid.xml
@@ -0,0 +1,36 @@
+
+
+
+
+ Valid
+
+
+ Transcribed by
+ Test User
+
+
+
+
+
+ Open Siddur Project
+
+
+
+
+ 2012-06-08
+
+
+
+
+
+
+
+
+
+ Document created from template
+
+
+
+ A note in a valid annotation files.
+
+
diff --git a/opensiddur-extensions/src/test/resources/api/data/original/bad_source.xml b/opensiddur-extensions/src/test/resources/api/data/original/bad_source.xml
new file mode 100644
index 00000000..0fa97b9f
--- /dev/null
+++ b/opensiddur-extensions/src/test/resources/api/data/original/bad_source.xml
@@ -0,0 +1,36 @@
+
+
+
+
+ bad source
+
+ Transcribed by
+ Test User
+
+
+
+
+ Open Siddur Project
+
+
+
+
+ 2012-06-08
+
+
+
+
+
+
+
+
+
+ Document created from template
+
+
+
+
+ Just some text.
+
+
+
\ No newline at end of file
diff --git a/opensiddur-extensions/src/test/resources/api/data/original/duplicate_xml_id.xml b/opensiddur-extensions/src/test/resources/api/data/original/duplicate_xml_id.xml
new file mode 100644
index 00000000..baf68814
--- /dev/null
+++ b/opensiddur-extensions/src/test/resources/api/data/original/duplicate_xml_id.xml
@@ -0,0 +1,37 @@
+
+
+
+
+ existing
+
+ Transcribed by
+ Test User
+
+
+
+
+ Open Siddur Project
+
+
+
+
+ 2012-06-08
+
+
+
+
+
+
+
+
+
+ Document created from template
+
+
+
+
+ This document has duplicates.
+ So does this one.
+
+
+
\ No newline at end of file
diff --git a/opensiddur-extensions/src/test/resources/api/data/original/existing.xml b/opensiddur-extensions/src/test/resources/api/data/original/existing.xml
new file mode 100644
index 00000000..24caf779
--- /dev/null
+++ b/opensiddur-extensions/src/test/resources/api/data/original/existing.xml
@@ -0,0 +1,55 @@
+
+
+
+
+ existing
+
+
+ Transcribed by
+ Test User
+
+
+
+
+
+ Open Siddur Project
+
+
+
+
+ 2012-06-08
+
+
+
+
+
+
+
+
+
+ Document created from template
+
+
+
+
+
+ This
+ is
+ a
+ valid
+ segment
+ .
+
+
+
+
+
+ Valid data
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/opensiddur-extensions/src/test/resources/api/data/original/existing_after_put.xml b/opensiddur-extensions/src/test/resources/api/data/original/existing_after_put.xml
new file mode 100644
index 00000000..b957b8a2
--- /dev/null
+++ b/opensiddur-extensions/src/test/resources/api/data/original/existing_after_put.xml
@@ -0,0 +1,61 @@
+
+
+
+
+ existing
+
+
+ Transcribed by
+ Test User
+
+
+
+
+
+ Open Siddur Project
+
+
+
+
+ 2012-06-08
+
+
+
+
+
+
+
+
+
+ Document created from template
+
+
+
+
+
+ This
+ is
+ a
+ valid
+ segment
+ .
+
+
+ This
+ is
+ too
+ .
+
+
+
+
+
+ Valid data
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/opensiddur-extensions/src/test/resources/api/data/original/existing_flat.xml b/opensiddur-extensions/src/test/resources/api/data/original/existing_flat.xml
new file mode 100644
index 00000000..ec9afd2e
--- /dev/null
+++ b/opensiddur-extensions/src/test/resources/api/data/original/existing_flat.xml
@@ -0,0 +1,51 @@
+
+
+
+
+ existing
+
+ Transcribed by
+ Test User
+
+
+
+
+ Open Siddur Project
+
+
+
+
+ 2012-06-08
+
+
+
+
+
+
+
+
+
+ Document created from template
+
+
+
+
+
+ Valid data
+
+
+ This
+ is
+ a
+ valid
+ segment
+ .
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/opensiddur-extensions/src/test/resources/api/data/original/external_reference.xml b/opensiddur-extensions/src/test/resources/api/data/original/external_reference.xml
new file mode 100644
index 00000000..32529ad9
--- /dev/null
+++ b/opensiddur-extensions/src/test/resources/api/data/original/external_reference.xml
@@ -0,0 +1,39 @@
+
+
+
+
+ ExternalReference
+
+
+ Transcribed by
+ Test User
+
+
+
+
+
+ Open Siddur Project
+
+
+
+
+ 2012-06-08
+
+
+
+
+
+
+
+
+
+ Document created from template
+
+
+
+
+ Test segment
+
+
+
+
diff --git a/opensiddur-extensions/src/test/resources/api/data/original/fails_single_reference_rule_internal.xml b/opensiddur-extensions/src/test/resources/api/data/original/fails_single_reference_rule_internal.xml
new file mode 100644
index 00000000..8264e5e3
--- /dev/null
+++ b/opensiddur-extensions/src/test/resources/api/data/original/fails_single_reference_rule_internal.xml
@@ -0,0 +1,53 @@
+
+
+
+
+ Fails Single Reference Rule Internally
+
+
+ Transcribed by
+ Test User
+
+
+
+
+
+ Open Siddur Project
+
+
+
+
+ 2012-06-08
+
+
+
+
+
+
+
+
+
+
+
+
+ Just some text
+
+
+
+
+
+
+ a division
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/opensiddur-extensions/src/test/resources/api/data/original/has_external_reference.xml b/opensiddur-extensions/src/test/resources/api/data/original/has_external_reference.xml
new file mode 100644
index 00000000..91e02a1e
--- /dev/null
+++ b/opensiddur-extensions/src/test/resources/api/data/original/has_external_reference.xml
@@ -0,0 +1,37 @@
+
+
+
+
+ Has external reference
+
+
+ Transcribed by
+ Test User
+
+
+
+
+
+ Open Siddur Project
+
+
+
+
+ 2012-06-08
+
+
+
+
+
+
+
+
+
+
+
+
+ Just some text
+
+
+
+
\ No newline at end of file
diff --git a/opensiddur-extensions/src/test/resources/api/data/original/has_external_reference_removed.xml b/opensiddur-extensions/src/test/resources/api/data/original/has_external_reference_removed.xml
new file mode 100644
index 00000000..41ba91f5
--- /dev/null
+++ b/opensiddur-extensions/src/test/resources/api/data/original/has_external_reference_removed.xml
@@ -0,0 +1,36 @@
+
+
+
+
+ Has external reference
+
+
+ Transcribed by
+ Test User
+
+
+
+
+
+ Open Siddur Project
+
+
+
+
+ 2012-06-08
+
+
+
+
+
+
+
+
+
+
+
+
+ Just some text and I removed an external reference
+
+
+
\ No newline at end of file
diff --git a/opensiddur-extensions/src/test/resources/api/data/original/has_transclude.xml b/opensiddur-extensions/src/test/resources/api/data/original/has_transclude.xml
new file mode 100644
index 00000000..a0ef9c1e
--- /dev/null
+++ b/opensiddur-extensions/src/test/resources/api/data/original/has_transclude.xml
@@ -0,0 +1,58 @@
+
+
+
+
+ Has Transclude
+
+
+ Transcribed by
+ Test User
+
+
+
+
+
+ Open Siddur Project
+
+
+
+
+ 2012-06-08
+
+
+
+
+
+
+
+
+
+ Document created from template
+
+
+
+
+
+ This
+ is
+ a
+ valid
+ segment
+ .
+
+
+
+
+
+
+
+ Valid data
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/opensiddur-extensions/src/test/resources/api/data/original/has_undeclared_external_reference.xml b/opensiddur-extensions/src/test/resources/api/data/original/has_undeclared_external_reference.xml
new file mode 100644
index 00000000..f6fc3d96
--- /dev/null
+++ b/opensiddur-extensions/src/test/resources/api/data/original/has_undeclared_external_reference.xml
@@ -0,0 +1,37 @@
+
+
+
+
+ Has undeclared external reference
+
+
+ Transcribed by
+ Test User
+
+
+
+
+
+ Open Siddur Project
+
+
+
+
+ 2012-06-08
+
+
+
+
+
+
+
+
+
+
+
+
+ Just some text
+
+
+
+
\ No newline at end of file
diff --git a/opensiddur-extensions/src/test/resources/api/data/original/invalid.xml b/opensiddur-extensions/src/test/resources/api/data/original/invalid.xml
new file mode 100644
index 00000000..9aff0b01
--- /dev/null
+++ b/opensiddur-extensions/src/test/resources/api/data/original/invalid.xml
@@ -0,0 +1,57 @@
+
+
+
+
+ Valid
+
+
+ Transcribed by
+ Test User
+
+
+
+
+
+ Open Siddur Project
+
+
+
+
+ 2012-06-08
+
+
+
+
+
+
+
+
+
+ Document created from template
+
+
+
+
+
+
+ This
+ is
+ an
+ invalid
+ segment
+ .
+
+
+
+
+
+ Valid data
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/opensiddur-extensions/src/test/resources/api/data/original/invalid_after_put_illegal_revisiondesc.xml b/opensiddur-extensions/src/test/resources/api/data/original/invalid_after_put_illegal_revisiondesc.xml
new file mode 100644
index 00000000..affab4a9
--- /dev/null
+++ b/opensiddur-extensions/src/test/resources/api/data/original/invalid_after_put_illegal_revisiondesc.xml
@@ -0,0 +1,56 @@
+
+
+
+
+ existing
+
+
+ Transcribed by
+ Test User
+
+
+
+
+
+ Open Siddur Project
+
+
+
+
+ 2012-06-08
+
+
+
+
+
+
+
+
+
+
+ Document created from template
+
+
+
+
+
+ This
+ is
+ a
+ valid
+ segment
+ .
+
+
+
+
+
+ Valid data
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/opensiddur-extensions/src/test/resources/api/data/original/invalid_flat.xml b/opensiddur-extensions/src/test/resources/api/data/original/invalid_flat.xml
new file mode 100644
index 00000000..df3fbe78
--- /dev/null
+++ b/opensiddur-extensions/src/test/resources/api/data/original/invalid_flat.xml
@@ -0,0 +1,52 @@
+
+
+
+
+ Valid
+
+ Transcribed by
+ Test User
+
+
+
+
+ Open Siddur Project
+
+
+
+
+ 2012-06-08
+
+
+
+
+
+
+
+
+
+ Document created from
+ template
+
+
+
+
+
+ Valid data
+
+
+ This
+ is
+ an
+ invalid
+ segment
+ .
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/opensiddur-extensions/src/test/resources/api/data/original/link_doc_1.xml b/opensiddur-extensions/src/test/resources/api/data/original/link_doc_1.xml
new file mode 100644
index 00000000..15687fd8
--- /dev/null
+++ b/opensiddur-extensions/src/test/resources/api/data/original/link_doc_1.xml
@@ -0,0 +1,34 @@
+
+
+
+
+ Link Doc 1
+
+
+
+ Open Siddur Project
+
+
+
+
+ 2020-01-01
+
+
+
+
+
+
+
+
+
+
+
+
+
+ TEST
+
+
+
+
+
+
\ No newline at end of file
diff --git a/opensiddur-extensions/src/test/resources/api/data/original/link_doc_2.xml b/opensiddur-extensions/src/test/resources/api/data/original/link_doc_2.xml
new file mode 100644
index 00000000..d6f2f6fe
--- /dev/null
+++ b/opensiddur-extensions/src/test/resources/api/data/original/link_doc_2.xml
@@ -0,0 +1,34 @@
+
+
+
+
+ Link Doc 2
+
+
+
+ Open Siddur Project
+
+
+
+
+ 2020-01-01
+
+
+
+
+
+
+
+
+
+
+
+
+
+ ANOTHER
+
+
+
+
+
+
\ No newline at end of file
diff --git a/opensiddur-extensions/src/test/resources/api/data/original/makes_external_reference.xml b/opensiddur-extensions/src/test/resources/api/data/original/makes_external_reference.xml
new file mode 100644
index 00000000..4164300a
--- /dev/null
+++ b/opensiddur-extensions/src/test/resources/api/data/original/makes_external_reference.xml
@@ -0,0 +1,38 @@
+
+
+
+
+ Makes External Reference
+
+
+ Transcribed by
+ Test User
+
+
+
+
+
+ Open Siddur Project
+
+
+
+
+ 2012-06-08
+
+
+
+
+
+
+
+
+
+ Document created from template
+
+
+
+
+
+
+
+
diff --git a/opensiddur-extensions/src/test/resources/api/data/original/no_duplicate_xml_id.xml b/opensiddur-extensions/src/test/resources/api/data/original/no_duplicate_xml_id.xml
new file mode 100644
index 00000000..ef044a89
--- /dev/null
+++ b/opensiddur-extensions/src/test/resources/api/data/original/no_duplicate_xml_id.xml
@@ -0,0 +1,36 @@
+
+
+
+
+ existing
+
+ Transcribed by
+ Test User
+
+
+
+
+ Open Siddur Project
+
+
+
+
+ 2012-06-08
+
+
+
+
+
+
+
+
+
+ Document created from template
+
+
+
+
+ This document has no duplicates.
+
+
+
\ No newline at end of file
diff --git a/opensiddur-extensions/src/test/resources/api/data/original/no_title.xml b/opensiddur-extensions/src/test/resources/api/data/original/no_title.xml
new file mode 100644
index 00000000..c14ff9dd
--- /dev/null
+++ b/opensiddur-extensions/src/test/resources/api/data/original/no_title.xml
@@ -0,0 +1,52 @@
+
+
+
+
+
+
+
+ Transcribed by
+ Test User
+
+
+
+
+
+ Open Siddur Project
+
+
+
+
+ 2012-06-08
+
+
+
+
+
+
+
+
+
+
+
+
+ This
+ is
+ a
+ valid
+ segment
+ .
+
+
+
+
+
+ Valid data
+
+
+
+
+
+
+
+
diff --git a/opensiddur-extensions/src/test/resources/api/data/original/query_result.xml b/opensiddur-extensions/src/test/resources/api/data/original/query_result.xml
new file mode 100644
index 00000000..dd28c275
--- /dev/null
+++ b/opensiddur-extensions/src/test/resources/api/data/original/query_result.xml
@@ -0,0 +1,61 @@
+
+
+
+
+ Query Result
+
+
+ Transcribed by
+ Test User
+
+
+
+
+
+ Open Siddur Project
+
+
+
+
+ 2012-06-08
+
+
+
+
+
+
+
+
+
+ Document created from template
+
+
+
+
+
+ This
+ is
+ a
+ query
+ result
+ .
+
+
+ This
+ is
+ not
+ .
+
+
+
+
+
+ Valid data
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/opensiddur-extensions/src/test/resources/api/data/original/references_external_reference.xml b/opensiddur-extensions/src/test/resources/api/data/original/references_external_reference.xml
new file mode 100644
index 00000000..e0c63dd4
--- /dev/null
+++ b/opensiddur-extensions/src/test/resources/api/data/original/references_external_reference.xml
@@ -0,0 +1,35 @@
+
+
+
+
+ References external reference
+
+
+ Transcribed by
+ Test User
+
+
+
+
+
+ Open Siddur Project
+
+
+
+
+ 2012-06-08
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/opensiddur-extensions/src/test/resources/api/data/original/references_undeclared_external_reference.xml b/opensiddur-extensions/src/test/resources/api/data/original/references_undeclared_external_reference.xml
new file mode 100644
index 00000000..ee2c043a
--- /dev/null
+++ b/opensiddur-extensions/src/test/resources/api/data/original/references_undeclared_external_reference.xml
@@ -0,0 +1,35 @@
+
+
+
+
+ References undeclared external reference
+
+
+ Transcribed by
+ Test User
+
+
+
+
+
+ Open Siddur Project
+
+
+
+
+ 2012-06-08
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/opensiddur-extensions/src/test/resources/api/data/original/test_doc_1.xml b/opensiddur-extensions/src/test/resources/api/data/original/test_doc_1.xml
new file mode 100644
index 00000000..34b03bdd
--- /dev/null
+++ b/opensiddur-extensions/src/test/resources/api/data/original/test_doc_1.xml
@@ -0,0 +1,33 @@
+
+
+
+
+ Test Doc 1
+
+
+
+ Open Siddur Project
+
+
+
+
+ 2020-01-01
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ A text
+
+
+
+
\ No newline at end of file
diff --git a/opensiddur-extensions/src/test/resources/api/data/original/test_doc_2.xml b/opensiddur-extensions/src/test/resources/api/data/original/test_doc_2.xml
new file mode 100644
index 00000000..4f102a34
--- /dev/null
+++ b/opensiddur-extensions/src/test/resources/api/data/original/test_doc_2.xml
@@ -0,0 +1,33 @@
+
+
+
+
+ Test Doc 2
+
+
+
+ Open Siddur Project
+
+
+
+
+ 2020-01-01
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ text B
+
+
+
+
\ No newline at end of file
diff --git a/opensiddur-extensions/src/test/resources/api/data/original/test_invalid_external_reference.xml b/opensiddur-extensions/src/test/resources/api/data/original/test_invalid_external_reference.xml
new file mode 100644
index 00000000..d96bf44d
--- /dev/null
+++ b/opensiddur-extensions/src/test/resources/api/data/original/test_invalid_external_reference.xml
@@ -0,0 +1,35 @@
+
+
+
+
+ Test Invalid External Reference
+
+
+ Transcribed by
+ Test User
+
+
+
+
+
+ Open Siddur Project
+
+
+
+
+ 2012-06-08
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/opensiddur-extensions/src/test/resources/api/data/original/test_valid_external_reference.xml b/opensiddur-extensions/src/test/resources/api/data/original/test_valid_external_reference.xml
new file mode 100644
index 00000000..d5fb5a08
--- /dev/null
+++ b/opensiddur-extensions/src/test/resources/api/data/original/test_valid_external_reference.xml
@@ -0,0 +1,35 @@
+
+
+
+
+ Test Valid External Reference
+
+
+ Transcribed by
+ Test User
+
+
+
+
+
+ Open Siddur Project
+
+
+
+
+ 2012-06-08
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/opensiddur-extensions/src/test/resources/api/data/original/transcluded.xml b/opensiddur-extensions/src/test/resources/api/data/original/transcluded.xml
new file mode 100644
index 00000000..cba1ce49
--- /dev/null
+++ b/opensiddur-extensions/src/test/resources/api/data/original/transcluded.xml
@@ -0,0 +1,44 @@
+
+
+
+
+ Transcluded
+
+
+ Transcribed by
+ Test User
+
+
+
+
+
+ Open Siddur Project
+
+
+
+
+ 2012-06-08
+
+
+
+
+
+
+
+
+
+ Document created from template
+
+
+
+
+
+ This
+ will
+ be
+ transcluded
+ .
+
+
+
+
\ No newline at end of file
diff --git a/opensiddur-extensions/src/test/resources/api/data/original/valid.xml b/opensiddur-extensions/src/test/resources/api/data/original/valid.xml
new file mode 100644
index 00000000..7a890ac6
--- /dev/null
+++ b/opensiddur-extensions/src/test/resources/api/data/original/valid.xml
@@ -0,0 +1,52 @@
+
+
+
+
+ Valid
+
+
+ Transcribed by
+ Test User
+
+
+
+
+
+ Open Siddur Project
+
+
+
+
+ 2012-06-08
+
+
+
+
+
+
+
+
+
+
+
+
+ This
+ is
+ a
+ valid
+ segment
+ .
+
+
+
+
+
+ Valid data
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/opensiddur-extensions/src/test/resources/api/data/original/valid_flat.xml b/opensiddur-extensions/src/test/resources/api/data/original/valid_flat.xml
new file mode 100644
index 00000000..9ebcda96
--- /dev/null
+++ b/opensiddur-extensions/src/test/resources/api/data/original/valid_flat.xml
@@ -0,0 +1,48 @@
+
+
+
+
+ Valid
+
+ Transcribed by
+ Test User
+
+
+
+
+ Open Siddur Project
+
+
+
+
+ 2012-06-08
+
+
+
+
+
+
+
+
+
+
+
+
+ Valid data
+
+
+ This
+ is
+ a
+ valid
+ segment
+ .
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/opensiddur-extensions/src/test/resources/api/data/original/with_empty_revisiondesc.xml b/opensiddur-extensions/src/test/resources/api/data/original/with_empty_revisiondesc.xml
new file mode 100644
index 00000000..dd1926a5
--- /dev/null
+++ b/opensiddur-extensions/src/test/resources/api/data/original/with_empty_revisiondesc.xml
@@ -0,0 +1,5 @@
+
+
+
+
+
\ No newline at end of file
diff --git a/opensiddur-extensions/src/test/resources/api/data/original/with_no_revisiondesc.xml b/opensiddur-extensions/src/test/resources/api/data/original/with_no_revisiondesc.xml
new file mode 100644
index 00000000..add28614
--- /dev/null
+++ b/opensiddur-extensions/src/test/resources/api/data/original/with_no_revisiondesc.xml
@@ -0,0 +1,5 @@
+
+
+
+
+
\ No newline at end of file
diff --git a/opensiddur-extensions/src/test/resources/api/data/original/with_revisiondesc_and_change.xml b/opensiddur-extensions/src/test/resources/api/data/original/with_revisiondesc_and_change.xml
new file mode 100644
index 00000000..2f55c4c9
--- /dev/null
+++ b/opensiddur-extensions/src/test/resources/api/data/original/with_revisiondesc_and_change.xml
@@ -0,0 +1,7 @@
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/opensiddur-extensions/src/test/resources/api/data/original/with_revisiondesc_and_changelog.xml b/opensiddur-extensions/src/test/resources/api/data/original/with_revisiondesc_and_changelog.xml
new file mode 100644
index 00000000..fc33622f
--- /dev/null
+++ b/opensiddur-extensions/src/test/resources/api/data/original/with_revisiondesc_and_changelog.xml
@@ -0,0 +1,7 @@
+
+
+
+ Change log
+
+
+
\ No newline at end of file
diff --git a/opensiddur-extensions/src/test/resources/api/data/outlines/existing.xml b/opensiddur-extensions/src/test/resources/api/data/outlines/existing.xml
new file mode 100644
index 00000000..b0eab595
--- /dev/null
+++ b/opensiddur-extensions/src/test/resources/api/data/outlines/existing.xml
@@ -0,0 +1,16 @@
+
+ /data/sources/existing
+ http://www.creativecommons.org/publicdomain/zero/1.0
+ existing
+ en
+
+ Number One
+ 1
+ 2
+
+ Number Two
+ 3
+ 4
+
+
+
diff --git a/opensiddur-extensions/src/test/resources/api/data/outlines/has_a_status.xml b/opensiddur-extensions/src/test/resources/api/data/outlines/has_a_status.xml
new file mode 100644
index 00000000..adb6cd24
--- /dev/null
+++ b/opensiddur-extensions/src/test/resources/api/data/outlines/has_a_status.xml
@@ -0,0 +1,38 @@
+
+
+
+
+ Has A Status
+
+
+ Transcribed by
+ Test User
+
+
+
+
+
+ Open Siddur Project
+
+
+
+
+ 2012-06-08
+
+
+
+
+
+
+
+
+
+
+
+
+ Test data.
+
+
+
diff --git a/opensiddur-extensions/src/test/resources/api/data/outlines/has_unconfirmed.xml b/opensiddur-extensions/src/test/resources/api/data/outlines/has_unconfirmed.xml
new file mode 100644
index 00000000..e7c5e113
--- /dev/null
+++ b/opensiddur-extensions/src/test/resources/api/data/outlines/has_unconfirmed.xml
@@ -0,0 +1,38 @@
+
+
+
+
+ has_unconfirmed
+
+
+ Transcribed by
+ Test User
+
+
+
+
+
+ Open Siddur Project
+
+
+
+
+ 2012-06-08
+
+
+
+
+
+
+
+
+
+
+
+
+ Test data.
+
+
+
diff --git a/opensiddur-extensions/src/test/resources/api/data/outlines/sub_one.xml b/opensiddur-extensions/src/test/resources/api/data/outlines/sub_one.xml
new file mode 100644
index 00000000..2f6df0dd
--- /dev/null
+++ b/opensiddur-extensions/src/test/resources/api/data/outlines/sub_one.xml
@@ -0,0 +1,35 @@
+
+
+
+
+ Sub One
+
+
+ Transcribed by
+ Test User
+
+
+
+
+
+ Open Siddur Project
+
+
+
+
+ 2012-06-08
+
+
+
+
+
+
+
+
+
+
+
+ Test data.
+
+
+
diff --git a/opensiddur-extensions/src/test/resources/api/data/outlines/sub_two.xml b/opensiddur-extensions/src/test/resources/api/data/outlines/sub_two.xml
new file mode 100644
index 00000000..1000a320
--- /dev/null
+++ b/opensiddur-extensions/src/test/resources/api/data/outlines/sub_two.xml
@@ -0,0 +1,35 @@
+
+
+
+
+ Sub Two
+
+
+ Transcribed by
+ Test User
+
+
+
+
+
+ Open Siddur Project
+
+
+
+
+ 2012-06-08
+
+
+
+
+
+
+
+
+
+
+
+ Test data.
+
+
+
diff --git a/opensiddur-extensions/src/test/resources/api/data/outlines/test_everything_ok.xml b/opensiddur-extensions/src/test/resources/api/data/outlines/test_everything_ok.xml
new file mode 100644
index 00000000..49ab9c6e
--- /dev/null
+++ b/opensiddur-extensions/src/test/resources/api/data/outlines/test_everything_ok.xml
@@ -0,0 +1,24 @@
+
+ /data/sources/TestSource
+ http://www.creativecommons.org/publicdomain/zero/1.0
+ Test Everything OK
+ en
+
+ NoOne
+ 1
+ 2
+
+
+ NoTwo
+ 3
+ 4
+
+ NoThree
+ 5
+ 6
+
+
+
diff --git a/opensiddur-extensions/src/test/resources/api/data/outlines/test_outline.xml b/opensiddur-extensions/src/test/resources/api/data/outlines/test_outline.xml
new file mode 100644
index 00000000..56914238
--- /dev/null
+++ b/opensiddur-extensions/src/test/resources/api/data/outlines/test_outline.xml
@@ -0,0 +1,122 @@
+
+ /data/sources/TestSource
+ http://www.creativecommons.org/publicdomain/zero/1.0
+ Test Outline
+ en
+
+ TitleDoesNotExist
+ 1
+ 2
+
+
+ Title Exists Once
+ 3
+ 4
+
+
+ Title Exists Twice
+ 5
+ 6
+
+
+ Title Has Been Confirmed
+ 7
+ 8
+
+ /data/original/title_has_been_confirmed
+
+
+
+
+ Title Already Confirmed And Duplicated
+ 9
+ 10
+
+ /data/original/title_already_confirmed_and_duplicated
+
+
+
+
+ Title Duplicated And Subordinates Exist With Same Pointers
+ 11
+ 12
+
+ /data/original/title_duplicated_and_subordinates_exist_with_same_pointers
+
+
+ Sub One
+
+
+ Sub Two
+
+
+
+ Title Duplicated And Subordinates Exist With Different Pointers
+ 13
+ 14
+
+ /data/original/title_duplicated_and_subordinates_exist_with_different_pointers
+
+
+ Sub Two
+
+
+ Sub One
+
+
+
+ Has A Status
+ 15
+ 16
+
+ /data/original/has_a_status
+
+
+
+
+ InternalDuplicate
+ 17
+ 18
+
+ SubThree
+
+
+ SubFour
+
+
+
+ InternalDuplicate
+ 19
+ 20
+
+
+ InternalDuplicate
+ 21
+ 22
+
+ SubThree
+
+
+ SubFour
+
+
+
+ BadInternalDuplicate
+ 23
+ 24
+
+ SubFive
+
+
+
+ BadInternalDuplicate
+ 25
+ 26
+
+ SubSix
+
+
+
diff --git a/opensiddur-extensions/src/test/resources/api/data/outlines/test_outline_executable.xml b/opensiddur-extensions/src/test/resources/api/data/outlines/test_outline_executable.xml
new file mode 100644
index 00000000..c48a53de
--- /dev/null
+++ b/opensiddur-extensions/src/test/resources/api/data/outlines/test_outline_executable.xml
@@ -0,0 +1,18 @@
+
+ /data/sources/test_outline_source
+ http://www.creativecommons.org/publicdomain/zero/1.0
+ test_outline_executable
+ en
+
+ test_outline_executable_new_title
+
+ /user/xqtest1
+ trc
+
+ 1
+ 2
+
+
diff --git a/opensiddur-extensions/src/test/resources/api/data/outlines/test_outline_executable_result.xml b/opensiddur-extensions/src/test/resources/api/data/outlines/test_outline_executable_result.xml
new file mode 100644
index 00000000..6241f01c
--- /dev/null
+++ b/opensiddur-extensions/src/test/resources/api/data/outlines/test_outline_executable_result.xml
@@ -0,0 +1,25 @@
+
+ /data/sources/test_outline_source
+ http://www.creativecommons.org/publicdomain/zero/1.0
+ test_outline_executable
+ en
+ /data/original/test_outline_executable
+ outlined
+
+ test_outline_executable_new_title
+
+ /user/xqtest1
+ trc
+
+ 1
+ 2
+
+ /data/original/test_outline_executable_new_title
+
+
+ outlined
+
+
diff --git a/opensiddur-extensions/src/test/resources/api/data/outlines/test_outline_executable_with_duplicates.xml b/opensiddur-extensions/src/test/resources/api/data/outlines/test_outline_executable_with_duplicates.xml
new file mode 100644
index 00000000..4f989ffa
--- /dev/null
+++ b/opensiddur-extensions/src/test/resources/api/data/outlines/test_outline_executable_with_duplicates.xml
@@ -0,0 +1,39 @@
+
+ /data/sources/test_outline_source
+ http://www.creativecommons.org/publicdomain/zero/1.0
+ test_outline_executable_with_duplicates
+ en
+
+ Test Outline Executable Duplicate
+ 1
+ 2
+
+
+ Test Outline Executable Duplicate
+ 3
+ 4
+
+
+ Test Outline Executable Duplicate With Items
+ 1
+ 2
+
+
+ Test Outline Executable Duplicate With Items
+ 3
+ 4
+
+ Test Sub One
+ 5
+ 5
+
+
+ Test Sub Two
+ 6
+ 6
+
+
+
diff --git a/opensiddur-extensions/src/test/resources/api/data/outlines/test_outline_executable_with_duplicates_result.xml b/opensiddur-extensions/src/test/resources/api/data/outlines/test_outline_executable_with_duplicates_result.xml
new file mode 100644
index 00000000..2a72ead6
--- /dev/null
+++ b/opensiddur-extensions/src/test/resources/api/data/outlines/test_outline_executable_with_duplicates_result.xml
@@ -0,0 +1,72 @@
+
+ /data/sources/test_outline_source
+ http://www.creativecommons.org/publicdomain/zero/1.0
+ test_outline_executable_with_duplicates
+ en
+ /data/original/test_outline_executable_with_duplicates
+ outlined
+
+ Test Outline Executable Duplicate
+ 1
+ 2
+
+ /data/original/test_outline_executable_duplicate
+
+
+ outlined
+
+
+ Test Outline Executable Duplicate
+ 3
+ 4
+
+ /data/original/test_outline_executable_duplicate
+
+
+ outlined
+
+
+ Test Outline Executable Duplicate With Items
+ 1
+ 2
+
+ /data/original/test_outline_executable_duplicate_with_items
+
+
+ outlined
+
+
+ Test Outline Executable Duplicate With Items
+ 3
+ 4
+
+ /data/original/test_outline_executable_duplicate_with_items
+
+
+ outlined
+
+ Test Sub One
+ 5
+ 5
+
+ /data/original/test_sub_one
+
+
+ outlined
+
+
+ Test Sub Two
+ 6
+ 6
+
+ /data/original/test_sub_two
+
+
+ outlined
+
+
+
+
diff --git a/opensiddur-extensions/src/test/resources/api/data/outlines/test_outline_executable_with_external_duplicates.xml b/opensiddur-extensions/src/test/resources/api/data/outlines/test_outline_executable_with_external_duplicates.xml
new file mode 100644
index 00000000..f118541c
--- /dev/null
+++ b/opensiddur-extensions/src/test/resources/api/data/outlines/test_outline_executable_with_external_duplicates.xml
@@ -0,0 +1,64 @@
+
+ /data/sources/test_outline_source
+ http://www.creativecommons.org/publicdomain/zero/1.0
+ test_outline_executable_with_external_duplicates
+ en
+
+ Title Already Confirmed And Duplicated
+ 1
+ 2
+
+ /data/original/title_already_confirmed_and_duplicated
+
+
+
+
+ Title Exists Once
+ 3
+ 4
+
+ /data/original/title_exists_once
+
+
+
+
+ Title Duplicated And Subordinates Exist With Same Pointers
+ 5
+ 6
+
+ /data/original/title_duplicated_and_subordinates_exist_with_same_pointers
+
+
+
+ Sub One
+ 7
+ 8
+
+
+ Sub Two
+ 9
+ 10
+
+
+
+ Title Contains Source One Time
+ 11
+ 12
+
+ /data/original/title_contains_source_one_time
+
+
+
+
+ Title Has Source And Pages One Time
+ 13
+ 14
+
+ /data/original/title_has_source_and_pages_one_time
+
+
+
+
diff --git a/opensiddur-extensions/src/test/resources/api/data/outlines/test_outline_source.xml b/opensiddur-extensions/src/test/resources/api/data/outlines/test_outline_source.xml
new file mode 100644
index 00000000..5876c9e5
--- /dev/null
+++ b/opensiddur-extensions/src/test/resources/api/data/outlines/test_outline_source.xml
@@ -0,0 +1,24 @@
+
+
+ test_outline_source
+
+
+ First
+ Author
+
+
+
+
+ First
+ Editor
+
+
+ 2 ed.
+
+ Publications, Inc.
+ Nowhere, USA
+ 1905
+
+
+ ABCDEFG_10
+
diff --git a/opensiddur-extensions/src/test/resources/api/data/outlines/test_outline_with_error.xml b/opensiddur-extensions/src/test/resources/api/data/outlines/test_outline_with_error.xml
new file mode 100644
index 00000000..82f02ae8
--- /dev/null
+++ b/opensiddur-extensions/src/test/resources/api/data/outlines/test_outline_with_error.xml
@@ -0,0 +1,25 @@
+
+ /data/sources/TestSource
+ http://www.creativecommons.org/publicdomain/zero/1.0
+ test_outline_with_error
+ en
+
+ BadInternalDuplicate
+ 23
+ 24
+
+ SubFive
+
+
+
+ BadInternalDuplicate
+ 25
+ 26
+
+ SubSix
+
+
+
diff --git a/opensiddur-extensions/src/test/resources/api/data/outlines/test_outline_with_unconfirmed.xml b/opensiddur-extensions/src/test/resources/api/data/outlines/test_outline_with_unconfirmed.xml
new file mode 100644
index 00000000..06c604a5
--- /dev/null
+++ b/opensiddur-extensions/src/test/resources/api/data/outlines/test_outline_with_unconfirmed.xml
@@ -0,0 +1,17 @@
+
+ /data/sources/TestSource
+ http://www.creativecommons.org/publicdomain/zero/1.0
+ test_outline_with_unconfirmed
+ en
+
+ has_unconfirmed
+ 1
+ 2
+
+ /data/original/has_unconfirmed
+
+
+
diff --git a/opensiddur-extensions/src/test/resources/api/data/outlines/title_already_confirmed_and_duplicated-1.xml b/opensiddur-extensions/src/test/resources/api/data/outlines/title_already_confirmed_and_duplicated-1.xml
new file mode 100644
index 00000000..ef8ad41f
--- /dev/null
+++ b/opensiddur-extensions/src/test/resources/api/data/outlines/title_already_confirmed_and_duplicated-1.xml
@@ -0,0 +1,35 @@
+
+
+
+
+ Title Already Confirmed And Duplicated
+
+
+ Transcribed by
+ Test User
+
+
+
+
+
+ Open Siddur Project
+
+
+
+
+ 2012-06-08
+
+
+
+
+
+
+
+
+
+
+
+ Test data.
+
+
+
diff --git a/opensiddur-extensions/src/test/resources/api/data/outlines/title_already_confirmed_and_duplicated.xml b/opensiddur-extensions/src/test/resources/api/data/outlines/title_already_confirmed_and_duplicated.xml
new file mode 100644
index 00000000..ef8ad41f
--- /dev/null
+++ b/opensiddur-extensions/src/test/resources/api/data/outlines/title_already_confirmed_and_duplicated.xml
@@ -0,0 +1,35 @@
+
+
+
+
+ Title Already Confirmed And Duplicated
+
+
+ Transcribed by
+ Test User
+
+
+
+
+
+ Open Siddur Project
+
+
+
+
+ 2012-06-08
+
+
+
+
+
+
+
+
+
+
+
+ Test data.
+
+
+
diff --git a/opensiddur-extensions/src/test/resources/api/data/outlines/title_contains_source_one_time.xml b/opensiddur-extensions/src/test/resources/api/data/outlines/title_contains_source_one_time.xml
new file mode 100644
index 00000000..9df0efd3
--- /dev/null
+++ b/opensiddur-extensions/src/test/resources/api/data/outlines/title_contains_source_one_time.xml
@@ -0,0 +1,35 @@
+
+
+
+
+ Title Contains Source One Time
+
+
+ Transcribed by
+ Test User
+
+
+
+
+
+ Open Siddur Project
+
+
+
+
+ 2012-06-08
+
+
+
+
+
+
+
+
+
+
+
+ Test data.
+
+
+
diff --git a/opensiddur-extensions/src/test/resources/api/data/outlines/title_duplicated_and_subordinates_exist_with_different_pointers.xml b/opensiddur-extensions/src/test/resources/api/data/outlines/title_duplicated_and_subordinates_exist_with_different_pointers.xml
new file mode 100644
index 00000000..a0d7bf51
--- /dev/null
+++ b/opensiddur-extensions/src/test/resources/api/data/outlines/title_duplicated_and_subordinates_exist_with_different_pointers.xml
@@ -0,0 +1,36 @@
+
+
+
+
+ Title Duplicated And Subordinates Exist With Different Pointers
+
+
+ Transcribed by
+ Test User
+
+
+
+
+
+ Open Siddur Project
+
+
+
+
+ 2012-06-08
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/opensiddur-extensions/src/test/resources/api/data/outlines/title_duplicated_and_subordinates_exist_with_same_pointers.xml b/opensiddur-extensions/src/test/resources/api/data/outlines/title_duplicated_and_subordinates_exist_with_same_pointers.xml
new file mode 100644
index 00000000..19a420b9
--- /dev/null
+++ b/opensiddur-extensions/src/test/resources/api/data/outlines/title_duplicated_and_subordinates_exist_with_same_pointers.xml
@@ -0,0 +1,36 @@
+
+
+
+
+ Title Duplicated And Subordinates Exist With Same Pointers
+
+
+ Transcribed by
+ Test User
+
+
+
+
+
+ Open Siddur Project
+
+
+
+
+ 2012-06-08
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/opensiddur-extensions/src/test/resources/api/data/outlines/title_exists_once.xml b/opensiddur-extensions/src/test/resources/api/data/outlines/title_exists_once.xml
new file mode 100644
index 00000000..1df32f9d
--- /dev/null
+++ b/opensiddur-extensions/src/test/resources/api/data/outlines/title_exists_once.xml
@@ -0,0 +1,35 @@
+
+
+
+
+ Title Exists Once
+
+
+ Transcribed by
+ Test User
+
+
+
+
+
+ Open Siddur Project
+
+
+
+
+ 2012-06-08
+
+
+
+
+
+
+
+
+
+
+
+ Test data.
+
+
+
diff --git a/opensiddur-extensions/src/test/resources/api/data/outlines/title_exists_twice-1.xml b/opensiddur-extensions/src/test/resources/api/data/outlines/title_exists_twice-1.xml
new file mode 100644
index 00000000..5f5db7a9
--- /dev/null
+++ b/opensiddur-extensions/src/test/resources/api/data/outlines/title_exists_twice-1.xml
@@ -0,0 +1,35 @@
+
+
+
+
+ Title Exists Twice
+
+
+ Transcribed by
+ Test User
+
+
+
+
+
+ Open Siddur Project
+
+
+
+
+ 2012-06-08
+
+
+
+
+
+
+
+
+
+
+
+ Test data.
+
+
+
diff --git a/opensiddur-extensions/src/test/resources/api/data/outlines/title_exists_twice.xml b/opensiddur-extensions/src/test/resources/api/data/outlines/title_exists_twice.xml
new file mode 100644
index 00000000..5f5db7a9
--- /dev/null
+++ b/opensiddur-extensions/src/test/resources/api/data/outlines/title_exists_twice.xml
@@ -0,0 +1,35 @@
+
+
+
+
+ Title Exists Twice
+
+
+ Transcribed by
+ Test User
+
+
+
+
+
+ Open Siddur Project
+
+
+
+
+ 2012-06-08
+
+
+
+
+
+
+
+
+
+
+
+ Test data.
+
+
+
diff --git a/opensiddur-extensions/src/test/resources/api/data/outlines/title_has_been_confirmed.xml b/opensiddur-extensions/src/test/resources/api/data/outlines/title_has_been_confirmed.xml
new file mode 100644
index 00000000..2a8337b2
--- /dev/null
+++ b/opensiddur-extensions/src/test/resources/api/data/outlines/title_has_been_confirmed.xml
@@ -0,0 +1,35 @@
+
+
+
+
+ Title Has Been Confirmed
+
+
+ Transcribed by
+ Test User
+
+
+
+
+
+ Open Siddur Project
+
+
+
+
+ 2012-06-08
+
+
+
+
+
+
+
+
+
+
+
+ Test data.
+
+
+
diff --git a/opensiddur-extensions/src/test/resources/api/data/outlines/title_has_source_and_pages_one_time.xml b/opensiddur-extensions/src/test/resources/api/data/outlines/title_has_source_and_pages_one_time.xml
new file mode 100644
index 00000000..e7db9fd8
--- /dev/null
+++ b/opensiddur-extensions/src/test/resources/api/data/outlines/title_has_source_and_pages_one_time.xml
@@ -0,0 +1,36 @@
+
+
+
+
+ Title Has Source And Pages One Time
+
+
+ Transcribed by
+ Test User
+
+
+
+
+
+ Open Siddur Project
+
+
+
+
+ 2012-06-08
+
+
+
+
+
+
+
+
+
+
+
+
+ Test data.
+
+
+
diff --git a/opensiddur-extensions/src/test/resources/api/data/sources/existing.xml b/opensiddur-extensions/src/test/resources/api/data/sources/existing.xml
new file mode 100644
index 00000000..6f315618
--- /dev/null
+++ b/opensiddur-extensions/src/test/resources/api/data/sources/existing.xml
@@ -0,0 +1,24 @@
+
+
+ existing
+
+
+ First
+ Author
+
+
+
+
+ First
+ Editor
+
+
+ 1 ed.
+
+ Publications, Inc.
+ Nowhere, USA
+ 1900
+
+
+ ABCDEFGH_10
+
diff --git a/opensiddur-extensions/src/test/resources/api/data/sources/existing_after_put.xml b/opensiddur-extensions/src/test/resources/api/data/sources/existing_after_put.xml
new file mode 100644
index 00000000..cf5674d5
--- /dev/null
+++ b/opensiddur-extensions/src/test/resources/api/data/sources/existing_after_put.xml
@@ -0,0 +1,24 @@
+
+
+ existing
+
+
+ First
+ Author
+
+
+
+
+ First
+ Editor
+
+
+ 2 ed.
+
+ Publications, Inc.
+ Nowhere, USA
+ 1920
+
+
+ ABCDEFGH_10
+
diff --git a/opensiddur-extensions/src/test/resources/api/data/sources/test_bibliography.xml b/opensiddur-extensions/src/test/resources/api/data/sources/test_bibliography.xml
new file mode 100644
index 00000000..43e18c6b
--- /dev/null
+++ b/opensiddur-extensions/src/test/resources/api/data/sources/test_bibliography.xml
@@ -0,0 +1,24 @@
+
+
+ Test Bibliography
+
+
+ First
+ Author
+
+
+
+
+ First
+ Editor
+
+
+ 1 ed.
+
+ Publications, Inc.
+ Nowhere, USA
+ 1900
+
+
+ ABCDEFGH_10
+
diff --git a/opensiddur-extensions/src/test/resources/api/data/sources/test_document_1.xml b/opensiddur-extensions/src/test/resources/api/data/sources/test_document_1.xml
new file mode 100644
index 00000000..0757c081
--- /dev/null
+++ b/opensiddur-extensions/src/test/resources/api/data/sources/test_document_1.xml
@@ -0,0 +1,30 @@
+
+
+
+
+ Test Document 1
+
+
+
+ Open Siddur Project
+
+
+
+
+ 2012-06-08
+
+
+
+
+
+
+
+
+
+
+
+
+ A segment.
+
+
+
diff --git a/opensiddur-extensions/src/test/resources/api/data/sources/test_document_2.xml b/opensiddur-extensions/src/test/resources/api/data/sources/test_document_2.xml
new file mode 100644
index 00000000..e66c35be
--- /dev/null
+++ b/opensiddur-extensions/src/test/resources/api/data/sources/test_document_2.xml
@@ -0,0 +1,30 @@
+
+
+
+
+ Test Document 2
+
+
+
+ Open Siddur Project
+
+
+
+
+ 2012-06-08
+
+
+
+
+
+
+
+
+
+
+
+
+ A segment.
+
+
+
diff --git a/opensiddur-extensions/src/test/resources/api/data/sources/test_document_3.xml b/opensiddur-extensions/src/test/resources/api/data/sources/test_document_3.xml
new file mode 100644
index 00000000..ec3798a7
--- /dev/null
+++ b/opensiddur-extensions/src/test/resources/api/data/sources/test_document_3.xml
@@ -0,0 +1,30 @@
+
+
+
+
+ Test Document 3
+
+
+
+ Open Siddur Project
+
+
+
+
+ 2012-06-08
+
+
+
+
+
+
+
+
+
+
+
+
+ A segment.
+
+
+
diff --git a/opensiddur-extensions/src/test/resources/api/data/sources/test_document_4.xml b/opensiddur-extensions/src/test/resources/api/data/sources/test_document_4.xml
new file mode 100644
index 00000000..8c75f190
--- /dev/null
+++ b/opensiddur-extensions/src/test/resources/api/data/sources/test_document_4.xml
@@ -0,0 +1,30 @@
+
+
+
+
+ Test Document 4
+
+
+
+ Open Siddur Project
+
+
+
+
+ 2012-06-08
+
+
+
+
+
+
+
+
+
+
+
+
+ A segment.
+
+
+
diff --git a/opensiddur-extensions/src/test/resources/api/data/sources/test_document_5.xml b/opensiddur-extensions/src/test/resources/api/data/sources/test_document_5.xml
new file mode 100644
index 00000000..9fca115d
--- /dev/null
+++ b/opensiddur-extensions/src/test/resources/api/data/sources/test_document_5.xml
@@ -0,0 +1,29 @@
+
+
+
+
+ Test Document 5
+
+
+
+ Open Siddur Project
+
+
+
+
+ 2012-06-08
+
+
+
+
+
+
+
+
+
+
+
+ A segment.
+
+
+
diff --git a/opensiddur-extensions/src/test/resources/api/data/sources/valid.xml b/opensiddur-extensions/src/test/resources/api/data/sources/valid.xml
new file mode 100644
index 00000000..8b177359
--- /dev/null
+++ b/opensiddur-extensions/src/test/resources/api/data/sources/valid.xml
@@ -0,0 +1,24 @@
+
+
+ Valid
+
+
+ First
+ Author
+
+
+
+
+ First
+ Editor
+
+
+ 2 ed.
+
+ Publications, Inc.
+ Nowhere, USA
+ 1905
+
+
+ ABCDEFG_10
+
diff --git a/opensiddur-extensions/src/test/resources/api/data/styles/existing.xml b/opensiddur-extensions/src/test/resources/api/data/styles/existing.xml
new file mode 100644
index 00000000..30d4d524
--- /dev/null
+++ b/opensiddur-extensions/src/test/resources/api/data/styles/existing.xml
@@ -0,0 +1,46 @@
+
+
+
+
+ existing
+
+
+ Transcribed by
+ Test User
+
+
+
+
+
+ Open Siddur Project
+
+
+
+
+ 2012-06-08
+
+
+
+
+
+
+
+
+
+ Document created from template
+
+
+
+
+
+
+ Query result.
+
+
+
+
\ No newline at end of file
diff --git a/opensiddur-extensions/src/test/resources/api/data/styles/existing_after_put.xml b/opensiddur-extensions/src/test/resources/api/data/styles/existing_after_put.xml
new file mode 100644
index 00000000..13d6acdf
--- /dev/null
+++ b/opensiddur-extensions/src/test/resources/api/data/styles/existing_after_put.xml
@@ -0,0 +1,46 @@
+
+
+
+
+ existing
+
+
+ Transcribed by
+ Test User
+
+
+
+
+
+ Open Siddur Project
+
+
+
+
+ 2012-06-08
+
+
+
+
+
+
+
+
+
+ Document created from template
+
+
+
+
+
+
+ Changed text.
+
+
+
+
\ No newline at end of file
diff --git a/opensiddur-extensions/src/test/resources/api/data/styles/invalid.xml b/opensiddur-extensions/src/test/resources/api/data/styles/invalid.xml
new file mode 100644
index 00000000..d7d24aa5
--- /dev/null
+++ b/opensiddur-extensions/src/test/resources/api/data/styles/invalid.xml
@@ -0,0 +1,50 @@
+
+
+
+
+ Invalid
+
+
+ Transcribed by
+ Test User
+
+
+
+
+
+ Open Siddur Project
+
+
+
+
+ 2012-06-08
+
+
+
+
+
+
+
+
+
+ Document created from template
+
+
+
+
+
+ This is invalid
+
+
+
+
\ No newline at end of file
diff --git a/opensiddur-extensions/src/test/resources/api/data/styles/no_write_access.xml b/opensiddur-extensions/src/test/resources/api/data/styles/no_write_access.xml
new file mode 100644
index 00000000..a9cc0a90
--- /dev/null
+++ b/opensiddur-extensions/src/test/resources/api/data/styles/no_write_access.xml
@@ -0,0 +1,39 @@
+
+
+
+
+ NoWriteAccess
+
+
+ Transcribed by
+ Test User
+
+
+
+
+
+ Open Siddur Project
+
+
+
+
+ 2012-06-08
+
+
+
+
+
+
+
+
+
+ Document created from template
+
+
+
+
\ No newline at end of file
diff --git a/opensiddur-extensions/src/test/resources/api/data/styles/valid.xml b/opensiddur-extensions/src/test/resources/api/data/styles/valid.xml
new file mode 100644
index 00000000..569c07bf
--- /dev/null
+++ b/opensiddur-extensions/src/test/resources/api/data/styles/valid.xml
@@ -0,0 +1,46 @@
+
+
+
+
+ Valid
+
+
+ Transcribed by
+ Test User
+
+
+
+
+
+ Open Siddur Project
+
+
+
+
+ 2012-06-08
+
+
+
+
+
+
+
+
+
+ Document created from template
+
+
+
+
+
+
+ Query result.
+
+
+
+
\ No newline at end of file
diff --git a/opensiddur-extensions/src/test/resources/api/data/transliteration/garbage.tr.xml b/opensiddur-extensions/src/test/resources/api/data/transliteration/garbage.tr.xml
new file mode 100644
index 00000000..cda06b9f
--- /dev/null
+++ b/opensiddur-extensions/src/test/resources/api/data/transliteration/garbage.tr.xml
@@ -0,0 +1,10 @@
+
+ Garbage
+ Just some garbage
+
+ Nobody
+
+
+
+
+
\ No newline at end of file
diff --git a/opensiddur-extensions/src/test/resources/api/data/transliteration/invalid.tr.xml b/opensiddur-extensions/src/test/resources/api/data/transliteration/invalid.tr.xml
new file mode 100644
index 00000000..9c9dbbf7
--- /dev/null
+++ b/opensiddur-extensions/src/test/resources/api/data/transliteration/invalid.tr.xml
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/opensiddur-extensions/src/test/resources/api/data/transliteration/invalid_schema.tr.xml b/opensiddur-extensions/src/test/resources/api/data/transliteration/invalid_schema.tr.xml
new file mode 100644
index 00000000..656adefc
--- /dev/null
+++ b/opensiddur-extensions/src/test/resources/api/data/transliteration/invalid_schema.tr.xml
@@ -0,0 +1,14 @@
+
+ Invalid
+ An invalid transliteration table for testing, invalid because it has two duplicate langs
+
+ Nobody
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/opensiddur-extensions/src/test/resources/api/data/transliteration/mivchan.tr.xml b/opensiddur-extensions/src/test/resources/api/data/transliteration/mivchan.tr.xml
new file mode 100644
index 00000000..f5dd3888
--- /dev/null
+++ b/opensiddur-extensions/src/test/resources/api/data/transliteration/mivchan.tr.xml
@@ -0,0 +1,10 @@
+
+ Mivchan
+ Test in Hebrew
+
+ Nobody
+
+
+
+
+
\ No newline at end of file
diff --git a/opensiddur-extensions/src/test/resources/api/data/transliteration/no_write.tr.xml b/opensiddur-extensions/src/test/resources/api/data/transliteration/no_write.tr.xml
new file mode 100644
index 00000000..dd0134b8
--- /dev/null
+++ b/opensiddur-extensions/src/test/resources/api/data/transliteration/no_write.tr.xml
@@ -0,0 +1,10 @@
+
+ NoWrite
+ No write access
+
+ Nobody
+
+
+
+
+
\ No newline at end of file
diff --git a/opensiddur-extensions/src/test/resources/api/data/transliteration/test.tr.xml b/opensiddur-extensions/src/test/resources/api/data/transliteration/test.tr.xml
new file mode 100644
index 00000000..9ebe451d
--- /dev/null
+++ b/opensiddur-extensions/src/test/resources/api/data/transliteration/test.tr.xml
@@ -0,0 +1,10 @@
+
+ Test
+ A test
+
+ Nobody
+
+
+
+
+
\ No newline at end of file
diff --git a/opensiddur-extensions/src/test/resources/api/data/transliteration/test_2.tr.xml b/opensiddur-extensions/src/test/resources/api/data/transliteration/test_2.tr.xml
new file mode 100644
index 00000000..11aad23d
--- /dev/null
+++ b/opensiddur-extensions/src/test/resources/api/data/transliteration/test_2.tr.xml
@@ -0,0 +1,10 @@
+
+ Test 2
+ Another test
+
+ Nobody
+
+
+
+
+
\ No newline at end of file
diff --git a/opensiddur-extensions/src/test/resources/api/data/transliteration/valid.tr.xml b/opensiddur-extensions/src/test/resources/api/data/transliteration/valid.tr.xml
new file mode 100644
index 00000000..bb126485
--- /dev/null
+++ b/opensiddur-extensions/src/test/resources/api/data/transliteration/valid.tr.xml
@@ -0,0 +1,10 @@
+
+ Valid
+ A minimal valid transliteration table for testing
+
+ Nobody
+
+
+
+
+
\ No newline at end of file
diff --git a/opensiddur-extensions/src/test/resources/api/user/Reference.xml b/opensiddur-extensions/src/test/resources/api/user/Reference.xml
new file mode 100644
index 00000000..6380f01a
--- /dev/null
+++ b/opensiddur-extensions/src/test/resources/api/user/Reference.xml
@@ -0,0 +1,38 @@
+
+
+
+
+ Reference
+
+
+ Transcribed by
+ xqtest3
+
+
+
+
+
+ Open Siddur Project
+
+
+
+
+ 2012-06-08
+
+
+
+
+
+
+
+
+
+ Document created
+
+
+
+
+ Segment
+
+
+
diff --git a/opensiddur-extensions/src/test/resources/api/user/xqtest2.xml b/opensiddur-extensions/src/test/resources/api/user/xqtest2.xml
new file mode 100644
index 00000000..9eaa3b9a
--- /dev/null
+++ b/opensiddur-extensions/src/test/resources/api/user/xqtest2.xml
@@ -0,0 +1,4 @@
+
+ xqtest2
+ Spike Tester
+
\ No newline at end of file
diff --git a/opensiddur-extensions/src/test/resources/api/user/xqtest3.xml b/opensiddur-extensions/src/test/resources/api/user/xqtest3.xml
new file mode 100644
index 00000000..2d8f1fee
--- /dev/null
+++ b/opensiddur-extensions/src/test/resources/api/user/xqtest3.xml
@@ -0,0 +1,4 @@
+
+ xqtest3
+ Not a spike user
+
\ No newline at end of file
diff --git a/opensiddur-extensions/src/test/resources/api/user/xqtest4.xml b/opensiddur-extensions/src/test/resources/api/user/xqtest4.xml
new file mode 100644
index 00000000..60e1cc68
--- /dev/null
+++ b/opensiddur-extensions/src/test/resources/api/user/xqtest4.xml
@@ -0,0 +1,3 @@
+
+ xqtest4
+
\ No newline at end of file
diff --git a/opensiddur-extensions/src/test/resources/api/user/xqtest5.xml b/opensiddur-extensions/src/test/resources/api/user/xqtest5.xml
new file mode 100644
index 00000000..77f03c77
--- /dev/null
+++ b/opensiddur-extensions/src/test/resources/api/user/xqtest5.xml
@@ -0,0 +1,4 @@
+
+ xqtest5
+ A Tester
+
\ No newline at end of file
diff --git a/opensiddur-extensions/src/test/resources/api/user/xqtest7.xml b/opensiddur-extensions/src/test/resources/api/user/xqtest7.xml
new file mode 100644
index 00000000..26e35013
--- /dev/null
+++ b/opensiddur-extensions/src/test/resources/api/user/xqtest7.xml
@@ -0,0 +1,4 @@
+
+ xqtest7
+ A Tester
+
\ No newline at end of file
diff --git a/opensiddur-extensions/src/test/resources/api/utility/translit/test.xml b/opensiddur-extensions/src/test/resources/api/utility/translit/test.xml
new file mode 100644
index 00000000..5f83959a
--- /dev/null
+++ b/opensiddur-extensions/src/test/resources/api/utility/translit/test.xml
@@ -0,0 +1,29 @@
+
+ Test
+ A test
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/opensiddur-extensions/src/test/resources/modules/common/test_common.xml b/opensiddur-extensions/src/test/resources/modules/common/test_common.xml
new file mode 100644
index 00000000..0ed9a9ff
--- /dev/null
+++ b/opensiddur-extensions/src/test/resources/modules/common/test_common.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/opensiddur-extensions/src/test/resources/modules/dep-root.xml b/opensiddur-extensions/src/test/resources/modules/dep-root.xml
new file mode 100644
index 00000000..5840f45e
--- /dev/null
+++ b/opensiddur-extensions/src/test/resources/modules/dep-root.xml
@@ -0,0 +1,9 @@
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/opensiddur-extensions/src/test/resources/modules/dep-tree1.xml b/opensiddur-extensions/src/test/resources/modules/dep-tree1.xml
new file mode 100644
index 00000000..e76feb05
--- /dev/null
+++ b/opensiddur-extensions/src/test/resources/modules/dep-tree1.xml
@@ -0,0 +1,8 @@
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/opensiddur-extensions/src/test/resources/modules/dep-tree2.xml b/opensiddur-extensions/src/test/resources/modules/dep-tree2.xml
new file mode 100644
index 00000000..1cd8a1a4
--- /dev/null
+++ b/opensiddur-extensions/src/test/resources/modules/dep-tree2.xml
@@ -0,0 +1,8 @@
+
+
+
+
+
+ No dependencies
+
+
\ No newline at end of file
diff --git a/opensiddur-extensions/src/test/resources/modules/dep-tree3.xml b/opensiddur-extensions/src/test/resources/modules/dep-tree3.xml
new file mode 100644
index 00000000..bce0fc34
--- /dev/null
+++ b/opensiddur-extensions/src/test/resources/modules/dep-tree3.xml
@@ -0,0 +1,8 @@
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/opensiddur-extensions/src/test/resources/modules/docindex/test_docindex.xml b/opensiddur-extensions/src/test/resources/modules/docindex/test_docindex.xml
new file mode 100644
index 00000000..52e0a200
--- /dev/null
+++ b/opensiddur-extensions/src/test/resources/modules/docindex/test_docindex.xml
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/opensiddur-extensions/src/test/resources/modules/external-dependencies.xml b/opensiddur-extensions/src/test/resources/modules/external-dependencies.xml
new file mode 100644
index 00000000..c1061f52
--- /dev/null
+++ b/opensiddur-extensions/src/test/resources/modules/external-dependencies.xml
@@ -0,0 +1,11 @@
+
+
+
+
+
+
+
+
+ seg1
+
+
\ No newline at end of file
diff --git a/opensiddur-extensions/src/test/resources/modules/follow-uri-cached-context.xml b/opensiddur-extensions/src/test/resources/modules/follow-uri-cached-context.xml
new file mode 100644
index 00000000..45c5ca3a
--- /dev/null
+++ b/opensiddur-extensions/src/test/resources/modules/follow-uri-cached-context.xml
@@ -0,0 +1,18 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/opensiddur-extensions/src/test/resources/modules/follow-uri-context-1.xml b/opensiddur-extensions/src/test/resources/modules/follow-uri-context-1.xml
new file mode 100644
index 00000000..f162d68e
--- /dev/null
+++ b/opensiddur-extensions/src/test/resources/modules/follow-uri-context-1.xml
@@ -0,0 +1,46 @@
+
+
+
+
+
+
+ Final destination
+ Second destination
+
+
+
+
+
+
+
+
+
+
+
+
+ 1
+ 2
+ 3
+
+ You should not be here
+
+
+
+
+ NO 1
+
+ YES 1
+
+ YES 2
+
+ כן 3
+
+ NO 2
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/opensiddur-extensions/src/test/resources/modules/follow-uri-context-2.xml b/opensiddur-extensions/src/test/resources/modules/follow-uri-context-2.xml
new file mode 100644
index 00000000..52c86acc
--- /dev/null
+++ b/opensiddur-extensions/src/test/resources/modules/follow-uri-context-2.xml
@@ -0,0 +1,13 @@
+
+
+
+
+
+
+ Final destination in file 2
+
+
+
+
+
+
\ No newline at end of file
diff --git a/opensiddur-extensions/src/test/resources/modules/no-dependencies.xml b/opensiddur-extensions/src/test/resources/modules/no-dependencies.xml
new file mode 100644
index 00000000..a0b540d6
--- /dev/null
+++ b/opensiddur-extensions/src/test/resources/modules/no-dependencies.xml
@@ -0,0 +1,8 @@
+
+
+
+
+
+ That's it!
+
+
\ No newline at end of file
diff --git a/opensiddur-extensions/src/test/resources/modules/refindex/reference-source-too.xml b/opensiddur-extensions/src/test/resources/modules/refindex/reference-source-too.xml
new file mode 100644
index 00000000..f05198f4
--- /dev/null
+++ b/opensiddur-extensions/src/test/resources/modules/refindex/reference-source-too.xml
@@ -0,0 +1,25 @@
+
+
+
+
+
+ outside
+
+ local target A
+ local target B
+ local target BC
+ local target C
+
+ child of a local target
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/opensiddur-extensions/src/test/resources/modules/refindex/reference-source.xml b/opensiddur-extensions/src/test/resources/modules/refindex/reference-source.xml
new file mode 100644
index 00000000..6cd782da
--- /dev/null
+++ b/opensiddur-extensions/src/test/resources/modules/refindex/reference-source.xml
@@ -0,0 +1,25 @@
+
+
+
+
+
+ outside
+
+ local target A
+ local target B
+ local target BC
+ local target C
+
+ child of a local target
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/opensiddur-extensions/src/test/resources/modules/refindex/reference-target-too.xml b/opensiddur-extensions/src/test/resources/modules/refindex/reference-target-too.xml
new file mode 100644
index 00000000..36f3e1d4
--- /dev/null
+++ b/opensiddur-extensions/src/test/resources/modules/refindex/reference-target-too.xml
@@ -0,0 +1,9 @@
+
+
+ segment 1
+ segment 2
+ segment 3
+ segment 4
+ Note.
+
+
\ No newline at end of file
diff --git a/opensiddur-extensions/src/test/resources/modules/refindex/reference-target.xml b/opensiddur-extensions/src/test/resources/modules/refindex/reference-target.xml
new file mode 100644
index 00000000..36f3e1d4
--- /dev/null
+++ b/opensiddur-extensions/src/test/resources/modules/refindex/reference-target.xml
@@ -0,0 +1,9 @@
+
+
+ segment 1
+ segment 2
+ segment 3
+ segment 4
+ Note.
+
+
\ No newline at end of file
diff --git a/opensiddur-extensions/src/test/resources/modules/test-status.xml b/opensiddur-extensions/src/test/resources/modules/test-status.xml
new file mode 100644
index 00000000..585cf304
--- /dev/null
+++ b/opensiddur-extensions/src/test/resources/modules/test-status.xml
@@ -0,0 +1,12 @@
+
+
+
+
+ test
+
+
+
+
+ Empty.
+
+
\ No newline at end of file
diff --git a/opensiddur-extensions/src/test/resources/modules/upgrade12/external-references.xml b/opensiddur-extensions/src/test/resources/modules/upgrade12/external-references.xml
new file mode 100644
index 00000000..7cb34a55
--- /dev/null
+++ b/opensiddur-extensions/src/test/resources/modules/upgrade12/external-references.xml
@@ -0,0 +1,17 @@
+
+
+
+
+ External reference file
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/opensiddur-extensions/src/test/resources/modules/upgrade12/referenced.xml b/opensiddur-extensions/src/test/resources/modules/upgrade12/referenced.xml
new file mode 100644
index 00000000..ddf5fc4d
--- /dev/null
+++ b/opensiddur-extensions/src/test/resources/modules/upgrade12/referenced.xml
@@ -0,0 +1,57 @@
+
+
+
+
+ Test file
+
+
+
+
+ Biblio
+
+
+
+
+
+
+
+ seg 1
+ middle segment.
+
+ segment
+ with
+ internal
+ structure
+
+
+
+
+ Referenced by an internal pointer
+ Outside a streamText
+
+ Referenced externally without a range
+ Unreferenced.
+ Referenced externally
+ with
+ a range.
+ Multiple
+ range
+ references
+ in the
+ same ptr
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/opensiddur-extensions/src/test/resources/modules/upgrade122/test_file.xml b/opensiddur-extensions/src/test/resources/modules/upgrade122/test_file.xml
new file mode 100644
index 00000000..52b50d9f
--- /dev/null
+++ b/opensiddur-extensions/src/test/resources/modules/upgrade122/test_file.xml
@@ -0,0 +1,47 @@
+
+
+
+
+ Test file
+
+
+
+
+ Biblio
+
+
+
+
+
+
+
+
+ Note
+
+
+
+ { text { " " } }
+ w1{ text { " " } }
+ w2{ text { " " } }
+ unreferencedwith child nodes
+ { text { " text node " } }
+
+ אבג{ text { " " } }
+ ־{ text { " " } }
+ דהו{ text { " " } }
+ זחט{ text { " " } }
+ ׃{ text { " " } }
+ יכל{ text { " " } }
+ ׀{ text { " " } }
+ מנס{ text { " " } }
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/opensiddur-extensions/src/test/resources/modules/upgrade122/transformed.xml b/opensiddur-extensions/src/test/resources/modules/upgrade122/transformed.xml
new file mode 100644
index 00000000..c41f578d
--- /dev/null
+++ b/opensiddur-extensions/src/test/resources/modules/upgrade122/transformed.xml
@@ -0,0 +1,36 @@
+
+
+
+
+ Test file
+
+
+
+
+ Biblio
+
+
+
+
+
+
+
+
+ Note
+
+
+
+ w1 w2
+ unreferenced
+ with child nodes
+ { text { " text node אבג־דהו זחט׃ יכל ׀ מנס "}}
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/opensiddur-extensions/src/test/resources/modules/upgrade140/anchors.xml b/opensiddur-extensions/src/test/resources/modules/upgrade140/anchors.xml
new file mode 100644
index 00000000..e58c7dbc
--- /dev/null
+++ b/opensiddur-extensions/src/test/resources/modules/upgrade140/anchors.xml
@@ -0,0 +1,45 @@
+
+
+
+
+ Anchors
+
+
+
+
+ Biblio
+
+
+
+
+
+
+
+
+
+
+ Inside an internal something
+
+
+
+
+
+ Inside external
+
+
+
+ Inside canonical, referenced
+
+
+
+ Inside canonical, unreferenced
+
+
+
+
+ Inside multiple internal reference
+
+
+
+
+
\ No newline at end of file
diff --git a/opensiddur-extensions/src/test/resources/modules/upgrade140/needs_upgrade.xml b/opensiddur-extensions/src/test/resources/modules/upgrade140/needs_upgrade.xml
new file mode 100644
index 00000000..96fccb56
--- /dev/null
+++ b/opensiddur-extensions/src/test/resources/modules/upgrade140/needs_upgrade.xml
@@ -0,0 +1,31 @@
+
+
+
+
+ Test file
+
+
+
+
+ Biblio
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/opensiddur-extensions/src/test/resources/modules/upgrade140/no_needs_upgrade.xml b/opensiddur-extensions/src/test/resources/modules/upgrade140/no_needs_upgrade.xml
new file mode 100644
index 00000000..7302bc16
--- /dev/null
+++ b/opensiddur-extensions/src/test/resources/modules/upgrade140/no_needs_upgrade.xml
@@ -0,0 +1,31 @@
+
+
+
+
+ Test file
+
+
+
+
+ Biblio
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/opensiddur-extensions/src/test/resources/modules/upgrade140/references.xml b/opensiddur-extensions/src/test/resources/modules/upgrade140/references.xml
new file mode 100644
index 00000000..3274840b
--- /dev/null
+++ b/opensiddur-extensions/src/test/resources/modules/upgrade140/references.xml
@@ -0,0 +1,25 @@
+
+
+
+
+ References
+
+
+
+
+ Biblio
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/opensiddur-extensions/src/test/resources/modules/validation/bad_license.xml b/opensiddur-extensions/src/test/resources/modules/validation/bad_license.xml
new file mode 100644
index 00000000..9774a596
--- /dev/null
+++ b/opensiddur-extensions/src/test/resources/modules/validation/bad_license.xml
@@ -0,0 +1,33 @@
+
+
+
+
+ Bad license
+
+
+
+ Open Siddur Project
+
+
+
+
+
+ 2014-01-01
+
+
+
+
+
+
+
+
+
+ Nothing
+
+
+
+
+ S1
+
+
+
\ No newline at end of file
diff --git a/opensiddur-extensions/src/test/resources/modules/validation/good_license.xml b/opensiddur-extensions/src/test/resources/modules/validation/good_license.xml
new file mode 100644
index 00000000..523a17fb
--- /dev/null
+++ b/opensiddur-extensions/src/test/resources/modules/validation/good_license.xml
@@ -0,0 +1,32 @@
+
+
+
+
+ Bad license
+
+
+
+ Open Siddur Project
+
+
+
+
+ 2014-01-01
+
+
+
+
+
+
+
+
+
+ Nothing
+
+
+
+
+ S1
+
+
+
\ No newline at end of file
diff --git a/opensiddur-extensions/src/test/resources/transforms/Conditionals/conditional1.xml b/opensiddur-extensions/src/test/resources/transforms/Conditionals/conditional1.xml
new file mode 100644
index 00000000..accf16b7
--- /dev/null
+++ b/opensiddur-extensions/src/test/resources/transforms/Conditionals/conditional1.xml
@@ -0,0 +1,43 @@
+
+
+
+
+ conditional1
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/opensiddur-extensions/src/test/resources/transforms/PhonyLayer/phony1.xml b/opensiddur-extensions/src/test/resources/transforms/PhonyLayer/phony1.xml
new file mode 100644
index 00000000..6afd8b7b
--- /dev/null
+++ b/opensiddur-extensions/src/test/resources/transforms/PhonyLayer/phony1.xml
@@ -0,0 +1,25 @@
+
+
+
+
+ phony1
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ A.
+ B.
+ C.
+
+
+
\ No newline at end of file
diff --git a/opensiddur-extensions/src/test/resources/transforms/PhonyLayer/phony2.xml b/opensiddur-extensions/src/test/resources/transforms/PhonyLayer/phony2.xml
new file mode 100644
index 00000000..1c79dcbe
--- /dev/null
+++ b/opensiddur-extensions/src/test/resources/transforms/PhonyLayer/phony2.xml
@@ -0,0 +1,54 @@
+
+
+
+
+ phony2
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ A.
+ B.
+ C.
+ D.
+
+
+ E
+ F
+
+
+
+
+
\ No newline at end of file
diff --git a/opensiddur-extensions/src/test/resources/transforms/PhonyLayer/phony3.xml b/opensiddur-extensions/src/test/resources/transforms/PhonyLayer/phony3.xml
new file mode 100644
index 00000000..5c1af3bb
--- /dev/null
+++ b/opensiddur-extensions/src/test/resources/transforms/PhonyLayer/phony3.xml
@@ -0,0 +1,69 @@
+
+
+
+
+ phony3
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ A.
+ B.
+ C.
+ D.
+
+
+
+
+ Head
+
+
+
+
+
+
+
+
+ Head 2
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/opensiddur-extensions/src/test/resources/transforms/PhonyLayer/phony4.xml b/opensiddur-extensions/src/test/resources/transforms/PhonyLayer/phony4.xml
new file mode 100644
index 00000000..dc04fade
--- /dev/null
+++ b/opensiddur-extensions/src/test/resources/transforms/PhonyLayer/phony4.xml
@@ -0,0 +1,46 @@
+
+
+
+
+ phony4
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ A.
+ B.
+ C.
+ D.
+
+ E
+
+
+
+
\ No newline at end of file
diff --git a/opensiddur-extensions/src/test/resources/transforms/PhonyLayer/phony5.xml b/opensiddur-extensions/src/test/resources/transforms/PhonyLayer/phony5.xml
new file mode 100644
index 00000000..0aac1baf
--- /dev/null
+++ b/opensiddur-extensions/src/test/resources/transforms/PhonyLayer/phony5.xml
@@ -0,0 +1,66 @@
+
+
+
+
+ phony5
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ A.
+ B.
+ C.
+ D.
+
+
+
+
+ Head
+
+
+
+
+
+
+
+
+ Head 2
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/opensiddur-extensions/src/test/resources/transforms/PhonyLayer/phony6.xml b/opensiddur-extensions/src/test/resources/transforms/PhonyLayer/phony6.xml
new file mode 100644
index 00000000..06215325
--- /dev/null
+++ b/opensiddur-extensions/src/test/resources/transforms/PhonyLayer/phony6.xml
@@ -0,0 +1,30 @@
+
+
+
+
+ phony6
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ A.
+ B.
+ C.
+
+ Note 1
+ Instruction 1
+
+
\ No newline at end of file
diff --git a/opensiddur-extensions/src/test/resources/transforms/Reverse/reverse1.xml b/opensiddur-extensions/src/test/resources/transforms/Reverse/reverse1.xml
new file mode 100644
index 00000000..e0403faa
--- /dev/null
+++ b/opensiddur-extensions/src/test/resources/transforms/Reverse/reverse1.xml
@@ -0,0 +1,10 @@
+
+
+
+
+ Segment 1
+ Segment 2
+ Segment 3
+
+
+
\ No newline at end of file
diff --git a/opensiddur-extensions/src/test/resources/transforms/Reverse/reverse2-reversed.xml b/opensiddur-extensions/src/test/resources/transforms/Reverse/reverse2-reversed.xml
new file mode 100644
index 00000000..761d01ac
--- /dev/null
+++ b/opensiddur-extensions/src/test/resources/transforms/Reverse/reverse2-reversed.xml
@@ -0,0 +1,24 @@
+
+
+
+
+ Segment 1
+ Segment 2
+ Segment 3
+
+
+
+
+ Header Text
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/opensiddur-extensions/src/test/resources/transforms/Reverse/reverse2.xml b/opensiddur-extensions/src/test/resources/transforms/Reverse/reverse2.xml
new file mode 100644
index 00000000..0f349158
--- /dev/null
+++ b/opensiddur-extensions/src/test/resources/transforms/Reverse/reverse2.xml
@@ -0,0 +1,38 @@
+
+
+
+
+
+
+
+
+ Header Text
+
+ Segment 1
+ Segment 2
+
+
+
+ Segment 3
+
+
+
+
\ No newline at end of file
diff --git a/opensiddur-extensions/src/test/resources/transforms/Reverse/reverse3-reversed.xml b/opensiddur-extensions/src/test/resources/transforms/Reverse/reverse3-reversed.xml
new file mode 100644
index 00000000..f2339807
--- /dev/null
+++ b/opensiddur-extensions/src/test/resources/transforms/Reverse/reverse3-reversed.xml
@@ -0,0 +1,32 @@
+
+
+
+
+ Segment 1
+ Segment 2
+ Segment 3
+
+
+
+
+ Header Text
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/opensiddur-extensions/src/test/resources/transforms/Reverse/reverse3.xml b/opensiddur-extensions/src/test/resources/transforms/Reverse/reverse3.xml
new file mode 100644
index 00000000..c8a137b5
--- /dev/null
+++ b/opensiddur-extensions/src/test/resources/transforms/Reverse/reverse3.xml
@@ -0,0 +1,55 @@
+
+
+
+
+
+
+
+
+
+ Header Text
+
+
+ Segment 1
+
+
+ Segment 2
+
+
+
+
+ Segment 3
+
+
+
+
\ No newline at end of file
diff --git a/opensiddur-extensions/src/test/resources/transforms/Reverse/reverse4-reversed.xml b/opensiddur-extensions/src/test/resources/transforms/Reverse/reverse4-reversed.xml
new file mode 100644
index 00000000..8c3e2fc3
--- /dev/null
+++ b/opensiddur-extensions/src/test/resources/transforms/Reverse/reverse4-reversed.xml
@@ -0,0 +1,19 @@
+
+
+
+
+ Segment 1
+ Segment 2
+ Segment 3
+
+
+
+
+
+ 1
+
+
+
+
+
+
\ No newline at end of file
diff --git a/opensiddur-extensions/src/test/resources/transforms/Reverse/reverse4.xml b/opensiddur-extensions/src/test/resources/transforms/Reverse/reverse4.xml
new file mode 100644
index 00000000..cfa60002
--- /dev/null
+++ b/opensiddur-extensions/src/test/resources/transforms/Reverse/reverse4.xml
@@ -0,0 +1,32 @@
+
+
+
+
+
+ Segment 1
+ 1
+
+ Segment 2
+
+ Segment 3
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/opensiddur-extensions/src/test/resources/transforms/Reverse/reverse5-reversed.xml b/opensiddur-extensions/src/test/resources/transforms/Reverse/reverse5-reversed.xml
new file mode 100644
index 00000000..80ccbd61
--- /dev/null
+++ b/opensiddur-extensions/src/test/resources/transforms/Reverse/reverse5-reversed.xml
@@ -0,0 +1,31 @@
+
+
+
+
+ Segment 1
+ Segment 2
+ Segment 3
+ Segment 4
+ Segment 5
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/opensiddur-extensions/src/test/resources/transforms/Reverse/reverse5.xml b/opensiddur-extensions/src/test/resources/transforms/Reverse/reverse5.xml
new file mode 100644
index 00000000..0ca3537c
--- /dev/null
+++ b/opensiddur-extensions/src/test/resources/transforms/Reverse/reverse5.xml
@@ -0,0 +1,80 @@
+
+
+
+
+
+
+
+ Segment 1
+
+
+
+ Segment 2
+
+
+
+ Segment 3
+
+
+
+ Segment 4
+
+
+ Segment 5
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/opensiddur-extensions/src/test/resources/transforms/Translit/no-translit-context.xml b/opensiddur-extensions/src/test/resources/transforms/Translit/no-translit-context.xml
new file mode 100644
index 00000000..5c3936ab
--- /dev/null
+++ b/opensiddur-extensions/src/test/resources/transforms/Translit/no-translit-context.xml
@@ -0,0 +1,21 @@
+
+
+
+
+ This is a segment
+
+
+
+
+
+
+ וגם זה
+
+
+
+
+ and so is this.
+
+
+
+
\ No newline at end of file
diff --git a/opensiddur-extensions/src/test/resources/transforms/Translit/testtable.xml b/opensiddur-extensions/src/test/resources/transforms/Translit/testtable.xml
new file mode 100644
index 00000000..d85e237a
--- /dev/null
+++ b/opensiddur-extensions/src/test/resources/transforms/Translit/testtable.xml
@@ -0,0 +1,70 @@
+
+ testtable
+ A table for testing
+
+ Efraim Feinstein
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/opensiddur-extensions/src/test/resources/transforms/combine-ann-incl.xml b/opensiddur-extensions/src/test/resources/transforms/combine-ann-incl.xml
new file mode 100644
index 00000000..e4ac98ff
--- /dev/null
+++ b/opensiddur-extensions/src/test/resources/transforms/combine-ann-incl.xml
@@ -0,0 +1,47 @@
+
+
+
+
+ Includer
+
+
+
+ Open Siddur Project
+
+
+
+
+ 2014-03-19
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Test
+
+
+
+
+
+
+
+
+ From includer 1
+
+ From includer 2
+
+
+
diff --git a/opensiddur-extensions/src/test/resources/transforms/combine-ann-notes.xml b/opensiddur-extensions/src/test/resources/transforms/combine-ann-notes.xml
new file mode 100644
index 00000000..834aedec
--- /dev/null
+++ b/opensiddur-extensions/src/test/resources/transforms/combine-ann-notes.xml
@@ -0,0 +1,17 @@
+
+
+
+
+
+
+
+
+
+ Stream
+ Single
+ Range
+ Off
+ Layer
+ Word
+
+
diff --git a/opensiddur-extensions/src/test/resources/transforms/combine-ann-par.xml b/opensiddur-extensions/src/test/resources/transforms/combine-ann-par.xml
new file mode 100644
index 00000000..222522fd
--- /dev/null
+++ b/opensiddur-extensions/src/test/resources/transforms/combine-ann-par.xml
@@ -0,0 +1,34 @@
+
+
+
+
+ Parallel texts A and B
+
+
+
+ Open Siddur Project
+
+
+
+
+ 2014-03-19
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Test
+
+
+
+
+
+
\ No newline at end of file
diff --git a/opensiddur-extensions/src/test/resources/transforms/combine-ann-parA.xml b/opensiddur-extensions/src/test/resources/transforms/combine-ann-parA.xml
new file mode 100644
index 00000000..a35e435e
--- /dev/null
+++ b/opensiddur-extensions/src/test/resources/transforms/combine-ann-parA.xml
@@ -0,0 +1,39 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ A A.
+ A B.
+ A C.
+
+ A E.
+
+
+
+
+
+
+ Heading
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/opensiddur-extensions/src/test/resources/transforms/combine-ann-parB.xml b/opensiddur-extensions/src/test/resources/transforms/combine-ann-parB.xml
new file mode 100644
index 00000000..a77eac0c
--- /dev/null
+++ b/opensiddur-extensions/src/test/resources/transforms/combine-ann-parB.xml
@@ -0,0 +1,39 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ B A.
+ B B.
+ B C.
+
+ B E.
+
+
+
+
+
+
+ Heading
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/opensiddur-extensions/src/test/resources/transforms/combine-ann1.xml b/opensiddur-extensions/src/test/resources/transforms/combine-ann1.xml
new file mode 100644
index 00000000..2b7652d2
--- /dev/null
+++ b/opensiddur-extensions/src/test/resources/transforms/combine-ann1.xml
@@ -0,0 +1,55 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ A.
+ B.
+ C.
+ D.
+
+ E.
+
+
+
+
+
+
+ Heading
+
+
+
+
+
+
+
+
diff --git a/opensiddur-extensions/src/test/resources/transforms/combine-ann2.xml b/opensiddur-extensions/src/test/resources/transforms/combine-ann2.xml
new file mode 100644
index 00000000..d0760c85
--- /dev/null
+++ b/opensiddur-extensions/src/test/resources/transforms/combine-ann2.xml
@@ -0,0 +1,42 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 1
+ 2
+
+
+ 3
+ 4
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/opensiddur-extensions/src/test/resources/transforms/combine-cond-incl.xml b/opensiddur-extensions/src/test/resources/transforms/combine-cond-incl.xml
new file mode 100644
index 00000000..96d31d8b
--- /dev/null
+++ b/opensiddur-extensions/src/test/resources/transforms/combine-cond-incl.xml
@@ -0,0 +1,47 @@
+
+
+
+
+ Includer
+
+
+
+ Open Siddur Project
+
+
+
+
+ 2014-03-19
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Test
+
+
+
+
+
+
+
+
+ From includer 1
+
+ From includer 2
+
+
+
\ No newline at end of file
diff --git a/opensiddur-extensions/src/test/resources/transforms/combine-cond-par.xml b/opensiddur-extensions/src/test/resources/transforms/combine-cond-par.xml
new file mode 100644
index 00000000..ba9be24a
--- /dev/null
+++ b/opensiddur-extensions/src/test/resources/transforms/combine-cond-par.xml
@@ -0,0 +1,34 @@
+
+
+
+
+ Parallel texts A and B
+
+
+
+ Open Siddur Project
+
+
+
+
+ 2014-03-19
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Test
+
+
+
+
+
+
\ No newline at end of file
diff --git a/opensiddur-extensions/src/test/resources/transforms/combine-cond-parA.xml b/opensiddur-extensions/src/test/resources/transforms/combine-cond-parA.xml
new file mode 100644
index 00000000..bb82cd06
--- /dev/null
+++ b/opensiddur-extensions/src/test/resources/transforms/combine-cond-parA.xml
@@ -0,0 +1,81 @@
+
+
+
+
+ Parallel text A
+
+
+
+ Open Siddur Project
+
+
+
+
+ 2014-03-19
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Present in both
+ Off in A by external
+ Off in B by external
+ Off in A by internal
+ Off in B by internal
+ Off in A by internal set internal
+ Off in B by internal set internal
+
+
+
+
\ No newline at end of file
diff --git a/opensiddur-extensions/src/test/resources/transforms/combine-cond-parB.xml b/opensiddur-extensions/src/test/resources/transforms/combine-cond-parB.xml
new file mode 100644
index 00000000..588551a4
--- /dev/null
+++ b/opensiddur-extensions/src/test/resources/transforms/combine-cond-parB.xml
@@ -0,0 +1,81 @@
+
+
+
+
+ Parallel text B
+
+
+
+ Open Siddur Project
+
+
+
+
+ 2014-03-19
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Present in both
+ Off in A by external
+ Off in B by external
+ Off in A by internal
+ Off in B by internal
+ Off in A by internal set internal
+ Off in B by internal set internal
+
+
+
+
\ No newline at end of file
diff --git a/opensiddur-extensions/src/test/resources/transforms/combine-cond1.xml b/opensiddur-extensions/src/test/resources/transforms/combine-cond1.xml
new file mode 100644
index 00000000..d9521855
--- /dev/null
+++ b/opensiddur-extensions/src/test/resources/transforms/combine-cond1.xml
@@ -0,0 +1,75 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Instruction.
+
+
+
+ A.
+ B.
+ C.
+ D.
+
+
+
+
+ Heading
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/opensiddur-extensions/src/test/resources/transforms/combine-cond2.xml b/opensiddur-extensions/src/test/resources/transforms/combine-cond2.xml
new file mode 100644
index 00000000..31504668
--- /dev/null
+++ b/opensiddur-extensions/src/test/resources/transforms/combine-cond2.xml
@@ -0,0 +1,66 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ A.
+ B.
+ C.
+ D.
+
+
+
+
+ Heading1
+
+
+
+
+
+ Heading2
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/opensiddur-extensions/src/test/resources/transforms/combine-cond3.xml b/opensiddur-extensions/src/test/resources/transforms/combine-cond3.xml
new file mode 100644
index 00000000..b5eccf70
--- /dev/null
+++ b/opensiddur-extensions/src/test/resources/transforms/combine-cond3.xml
@@ -0,0 +1,100 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Note
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ A.
+ B.
+ C.
+
+
+
+ D
+
+
+ E
+
+
+ F
+
+
+
+
+
+
+
+ Heading1
+
+
+
+
+
+ Heading2
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/opensiddur-extensions/src/test/resources/transforms/combine-inline-dest.xml b/opensiddur-extensions/src/test/resources/transforms/combine-inline-dest.xml
new file mode 100644
index 00000000..1eb9e4d5
--- /dev/null
+++ b/opensiddur-extensions/src/test/resources/transforms/combine-inline-dest.xml
@@ -0,0 +1,29 @@
+
+
+
+
+
+
+
+
+
+
+ Included segment 1
+
+ Included segment 2.
+
+ Included segment 3.
+ Excluded segment
+
+
+
+
+
+
+
+
+
+
+
diff --git a/opensiddur-extensions/src/test/resources/transforms/combine-inline-source.xml b/opensiddur-extensions/src/test/resources/transforms/combine-inline-source.xml
new file mode 100644
index 00000000..e7365668
--- /dev/null
+++ b/opensiddur-extensions/src/test/resources/transforms/combine-inline-source.xml
@@ -0,0 +1,26 @@
+
+
+
+
+
+
+
+
+
+
+
+ Segment 1.
+
+ Segment 3.
+
+
+
+
+
+
+
+
+
+
+
diff --git a/opensiddur-extensions/src/test/resources/transforms/combine-repeat.xml b/opensiddur-extensions/src/test/resources/transforms/combine-repeat.xml
new file mode 100644
index 00000000..0e0ef993
--- /dev/null
+++ b/opensiddur-extensions/src/test/resources/transforms/combine-repeat.xml
@@ -0,0 +1,21 @@
+
+
+
+
+
+
+
+
+
+
+ Repeated
+ One
+
+ Two
+
+ Three
+
+ Four
+
+
+
\ No newline at end of file
diff --git a/opensiddur-extensions/src/test/resources/transforms/combine-segGen-1.xml b/opensiddur-extensions/src/test/resources/transforms/combine-segGen-1.xml
new file mode 100644
index 00000000..f3fba1d9
--- /dev/null
+++ b/opensiddur-extensions/src/test/resources/transforms/combine-segGen-1.xml
@@ -0,0 +1,25 @@
+
+
+
+
+
+
+
+
+
+
+ testtable
+
+
+
+
+
+
+
+
+ אַבָּא
+
+
+
diff --git a/opensiddur-extensions/src/test/resources/transforms/combine-settings.xml b/opensiddur-extensions/src/test/resources/transforms/combine-settings.xml
new file mode 100644
index 00000000..7518ba8c
--- /dev/null
+++ b/opensiddur-extensions/src/test/resources/transforms/combine-settings.xml
@@ -0,0 +1,46 @@
+
+
+
+
+ Combine test
+
+
+
+ Open Siddur Project
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ ONE
+ FOUR
+
+
+ TWO
+ THREE
+
+
+
+
+ Segment 1
+ Segment 2
+
+
+
\ No newline at end of file
diff --git a/opensiddur-extensions/src/test/resources/transforms/combine-style-1.xml b/opensiddur-extensions/src/test/resources/transforms/combine-style-1.xml
new file mode 100644
index 00000000..43151fb9
--- /dev/null
+++ b/opensiddur-extensions/src/test/resources/transforms/combine-style-1.xml
@@ -0,0 +1,23 @@
+
+
+
+
+
+
+
+
+
+
+ /data/styles/test_style
+
+
+
+
+
+
+
+ A segment.
+
+
+
+
diff --git a/opensiddur-extensions/src/test/resources/transforms/combine-style-2.xml b/opensiddur-extensions/src/test/resources/transforms/combine-style-2.xml
new file mode 100644
index 00000000..c4d0ec24
--- /dev/null
+++ b/opensiddur-extensions/src/test/resources/transforms/combine-style-2.xml
@@ -0,0 +1,22 @@
+
+
+
+
+
+
+
+
+
+
+ /data/styles/test_style_2
+
+
+
+
+
+
+
+ Another segment.
+
+
+
diff --git a/opensiddur-extensions/src/test/resources/transforms/combine-translit-1.xml b/opensiddur-extensions/src/test/resources/transforms/combine-translit-1.xml
new file mode 100644
index 00000000..b70830d4
--- /dev/null
+++ b/opensiddur-extensions/src/test/resources/transforms/combine-translit-1.xml
@@ -0,0 +1,47 @@
+
+
+
+
+
+
+
+
+
+
+ testtable
+
+
+
+ DoesNotExist
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ not Hebrew.
+
+ אַבָּא
+ English.
+
+
+ אַבָּא
+
+
+ Annotated
+
+
+
+
diff --git a/opensiddur-extensions/src/test/resources/transforms/combine-translit-note-1.xml b/opensiddur-extensions/src/test/resources/transforms/combine-translit-note-1.xml
new file mode 100644
index 00000000..31edb877
--- /dev/null
+++ b/opensiddur-extensions/src/test/resources/transforms/combine-translit-note-1.xml
@@ -0,0 +1,12 @@
+
+
+
+
+
+
+
+
+
+ אִמָּא
+
+
diff --git a/opensiddur-extensions/src/test/resources/transforms/combine1.xml b/opensiddur-extensions/src/test/resources/transforms/combine1.xml
new file mode 100644
index 00000000..2b27dabd
--- /dev/null
+++ b/opensiddur-extensions/src/test/resources/transforms/combine1.xml
@@ -0,0 +1,14 @@
+
+
+
+
+
+
+
+
+
+
+ A segment.
+
+
+
\ No newline at end of file
diff --git a/opensiddur-extensions/src/test/resources/transforms/combine2.xml b/opensiddur-extensions/src/test/resources/transforms/combine2.xml
new file mode 100644
index 00000000..74d19701
--- /dev/null
+++ b/opensiddur-extensions/src/test/resources/transforms/combine2.xml
@@ -0,0 +1,15 @@
+
+
+
+
+
+
+
+
+
+
+ A segment.
+
+
+
+
\ No newline at end of file
diff --git a/opensiddur-extensions/src/test/resources/transforms/combine3.xml b/opensiddur-extensions/src/test/resources/transforms/combine3.xml
new file mode 100644
index 00000000..42fc9752
--- /dev/null
+++ b/opensiddur-extensions/src/test/resources/transforms/combine3.xml
@@ -0,0 +1,15 @@
+
+
+
+
+
+
+
+
+
+
+ A segment.
+
+
+
+
\ No newline at end of file
diff --git a/opensiddur-extensions/src/test/resources/transforms/compile1.xml b/opensiddur-extensions/src/test/resources/transforms/compile1.xml
new file mode 100644
index 00000000..2855d8b7
--- /dev/null
+++ b/opensiddur-extensions/src/test/resources/transforms/compile1.xml
@@ -0,0 +1,13 @@
+
+
+
+ Edited it
+ Created
+
+
+
+
+ A segment.
+
+
+
\ No newline at end of file
diff --git a/opensiddur-extensions/src/test/resources/transforms/compile2.xml b/opensiddur-extensions/src/test/resources/transforms/compile2.xml
new file mode 100644
index 00000000..d0da8363
--- /dev/null
+++ b/opensiddur-extensions/src/test/resources/transforms/compile2.xml
@@ -0,0 +1,19 @@
+
+
+
+
+ Transcribed by
+ Test User 10
+
+
+ Funded by
+ Organization 11
+
+
+
+
+
+ A segment.
+
+
+
\ No newline at end of file
diff --git a/opensiddur-extensions/src/test/resources/transforms/compile3.xml b/opensiddur-extensions/src/test/resources/transforms/compile3.xml
new file mode 100644
index 00000000..076206ec
--- /dev/null
+++ b/opensiddur-extensions/src/test/resources/transforms/compile3.xml
@@ -0,0 +1,20 @@
+
+
+
+
+
+ Edited by
+ Test User 10
+
+
+
+
+ Edited it
+
+
+
+
+ A segment.
+
+
+
\ No newline at end of file
diff --git a/opensiddur-extensions/src/test/resources/transforms/compile4.xml b/opensiddur-extensions/src/test/resources/transforms/compile4.xml
new file mode 100644
index 00000000..d8a51e8b
--- /dev/null
+++ b/opensiddur-extensions/src/test/resources/transforms/compile4.xml
@@ -0,0 +1,17 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+ A segment.
+
+
+
\ No newline at end of file
diff --git a/opensiddur-extensions/src/test/resources/transforms/flatten-par.xml b/opensiddur-extensions/src/test/resources/transforms/flatten-par.xml
new file mode 100644
index 00000000..47ab6bd8
--- /dev/null
+++ b/opensiddur-extensions/src/test/resources/transforms/flatten-par.xml
@@ -0,0 +1,42 @@
+
+
+
+
+ Parallel texts A and B
+
+
+
+ Open Siddur Project
+
+
+
+
+ 2014-03-19
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Test
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/opensiddur-extensions/src/test/resources/transforms/flatten-parA.xml b/opensiddur-extensions/src/test/resources/transforms/flatten-parA.xml
new file mode 100644
index 00000000..1ebbc06c
--- /dev/null
+++ b/opensiddur-extensions/src/test/resources/transforms/flatten-parA.xml
@@ -0,0 +1,39 @@
+
+
+
+
+ Parallel text A
+
+
+
+ Open Siddur Project
+
+
+
+
+ 2014-03-19
+
+
+
+
+
+
+
+
+
+
+
+
+
+ A-1
+ A-2
+ A-3
+ A-4
+ A-5
+ A-6
+ A-7
+ A-8
+ A-9
+
+
+
\ No newline at end of file
diff --git a/opensiddur-extensions/src/test/resources/transforms/flatten-parB.xml b/opensiddur-extensions/src/test/resources/transforms/flatten-parB.xml
new file mode 100644
index 00000000..206aedd5
--- /dev/null
+++ b/opensiddur-extensions/src/test/resources/transforms/flatten-parB.xml
@@ -0,0 +1,46 @@
+
+
+
+
+ Parallel text B
+
+
+
+ Open Siddur Project
+
+
+
+
+ 2014-03-19
+
+
+
+
+
+
+
+
+
+
+
+
+
+ B-1
+ B-2
+ B-3
+ B-4
+ B-5
+ B-6
+ B-7
+ B-8
+ B-9
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/opensiddur-extensions/src/test/resources/transforms/identity.xml b/opensiddur-extensions/src/test/resources/transforms/identity.xml
new file mode 100644
index 00000000..081e0db0
--- /dev/null
+++ b/opensiddur-extensions/src/test/resources/transforms/identity.xml
@@ -0,0 +1,13 @@
+
+
+
+
+
+
+ No layers!
+
+
+
\ No newline at end of file
diff --git a/opensiddur-extensions/src/test/resources/transforms/include-part-1.xml b/opensiddur-extensions/src/test/resources/transforms/include-part-1.xml
new file mode 100644
index 00000000..1558b58b
--- /dev/null
+++ b/opensiddur-extensions/src/test/resources/transforms/include-part-1.xml
@@ -0,0 +1,39 @@
+
+
+
+
+ Include Part
+
+
+
+ Open Siddur Project
+
+
+
+
+ 2014-03-19
+
+
+
+
+
+
+
+
+
+
+
+
+
+ AB
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/opensiddur-extensions/src/test/resources/transforms/include-part-2.xml b/opensiddur-extensions/src/test/resources/transforms/include-part-2.xml
new file mode 100644
index 00000000..6ce098d0
--- /dev/null
+++ b/opensiddur-extensions/src/test/resources/transforms/include-part-2.xml
@@ -0,0 +1,39 @@
+
+
+
+
+ Include Part
+
+
+
+ Open Siddur Project
+
+
+
+
+ 2014-03-19
+
+
+
+
+
+
+
+
+
+
+
+
+
+ AB
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/opensiddur-extensions/src/test/resources/transforms/include-simple-1.xml b/opensiddur-extensions/src/test/resources/transforms/include-simple-1.xml
new file mode 100644
index 00000000..d31d1588
--- /dev/null
+++ b/opensiddur-extensions/src/test/resources/transforms/include-simple-1.xml
@@ -0,0 +1,41 @@
+
+
+
+
+ Include Simple
+
+
+
+ Open Siddur Project
+
+
+
+
+ 2014-03-19
+
+
+
+
+
+
+
+
+
+
+
+
+
+ AB
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/opensiddur-extensions/src/test/resources/transforms/inline.xml b/opensiddur-extensions/src/test/resources/transforms/inline.xml
new file mode 100644
index 00000000..44eb7a99
--- /dev/null
+++ b/opensiddur-extensions/src/test/resources/transforms/inline.xml
@@ -0,0 +1,21 @@
+
+
+
+
+
+
+
+
+ title
+
+ Label
+
+
+
+
+
+
+ One segment
+
+
+
\ No newline at end of file
diff --git a/opensiddur-extensions/src/test/resources/transforms/inline2.xml b/opensiddur-extensions/src/test/resources/transforms/inline2.xml
new file mode 100644
index 00000000..512be51c
--- /dev/null
+++ b/opensiddur-extensions/src/test/resources/transforms/inline2.xml
@@ -0,0 +1,22 @@
+
+
+
+
+
+
+
+
+ title
+
+ Label 1
+ Label 2
+
+
+
+
+
+
+ One segment
+
+
+
\ No newline at end of file
diff --git a/opensiddur-extensions/src/test/resources/transforms/inline3.xml b/opensiddur-extensions/src/test/resources/transforms/inline3.xml
new file mode 100644
index 00000000..2939edd0
--- /dev/null
+++ b/opensiddur-extensions/src/test/resources/transforms/inline3.xml
@@ -0,0 +1,22 @@
+
+
+
+
+
+
+
+
+ title
+
+ Label 1
+
+ Label 2
+
+
+
+
+
+ One segment
+
+
+
\ No newline at end of file
diff --git a/opensiddur-extensions/src/test/resources/transforms/inline4.xml b/opensiddur-extensions/src/test/resources/transforms/inline4.xml
new file mode 100644
index 00000000..9b303735
--- /dev/null
+++ b/opensiddur-extensions/src/test/resources/transforms/inline4.xml
@@ -0,0 +1,26 @@
+
+
+
+
+
+
+
+
+ title
+
+ Label 1
+
+ Label 2
+
+ Label 3
+
+ Label 4
+
+
+
+
+ One segment
+ Two segments
+
+
+
\ No newline at end of file
diff --git a/opensiddur-extensions/src/test/resources/transforms/linkage-part.xml b/opensiddur-extensions/src/test/resources/transforms/linkage-part.xml
new file mode 100644
index 00000000..b8c4c4c4
--- /dev/null
+++ b/opensiddur-extensions/src/test/resources/transforms/linkage-part.xml
@@ -0,0 +1,37 @@
+
+
+
+
+ Linkage A to B
+
+
+
+ Open Siddur Project
+
+
+
+
+ 2014-03-19
+
+
+
+
+
+
+
+
+
+
+
+
+
+ AB
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/opensiddur-extensions/src/test/resources/transforms/linkage-same.xml b/opensiddur-extensions/src/test/resources/transforms/linkage-same.xml
new file mode 100644
index 00000000..39c8979c
--- /dev/null
+++ b/opensiddur-extensions/src/test/resources/transforms/linkage-same.xml
@@ -0,0 +1,34 @@
+
+
+
+
+ Linkage A to B
+
+
+
+ Open Siddur Project
+
+
+
+
+ 2014-03-19
+
+
+
+
+
+
+
+
+
+
+
+
+
+ AB
+
+
+
+
+
+
\ No newline at end of file
diff --git a/opensiddur-extensions/src/test/resources/transforms/linkage-simple.xml b/opensiddur-extensions/src/test/resources/transforms/linkage-simple.xml
new file mode 100644
index 00000000..a84b9559
--- /dev/null
+++ b/opensiddur-extensions/src/test/resources/transforms/linkage-simple.xml
@@ -0,0 +1,34 @@
+
+
+
+
+ Linkage A to B
+
+
+
+ Open Siddur Project
+
+
+
+
+ 2014-03-19
+
+
+
+
+
+
+
+
+
+
+
+
+
+ AB
+
+
+
+
+
+
\ No newline at end of file
diff --git a/opensiddur-extensions/src/test/resources/transforms/no-streamtext-input.xml b/opensiddur-extensions/src/test/resources/transforms/no-streamtext-input.xml
new file mode 100644
index 00000000..ecce6cbe
--- /dev/null
+++ b/opensiddur-extensions/src/test/resources/transforms/no-streamtext-input.xml
@@ -0,0 +1,9 @@
+
+
+ Something
+
+
+
+ A text node
+
+
\ No newline at end of file
diff --git a/opensiddur-extensions/src/test/resources/transforms/par.xml b/opensiddur-extensions/src/test/resources/transforms/par.xml
new file mode 100644
index 00000000..ce91136c
--- /dev/null
+++ b/opensiddur-extensions/src/test/resources/transforms/par.xml
@@ -0,0 +1,42 @@
+
+
+
+
+ Parallel texts A and B
+
+
+
+ Open Siddur Project
+
+
+
+
+ 2014-03-19
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Test
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/opensiddur-extensions/src/test/resources/transforms/parA.xml b/opensiddur-extensions/src/test/resources/transforms/parA.xml
new file mode 100644
index 00000000..7a6d602e
--- /dev/null
+++ b/opensiddur-extensions/src/test/resources/transforms/parA.xml
@@ -0,0 +1,39 @@
+
+
+
+
+ Parallel text A
+
+
+
+ Open Siddur Project
+
+
+
+
+ 2014-03-19
+
+
+
+
+
+
+
+
+
+
+
+
+
+ A-1
+ A-2
+ A-3
+ A-4
+ A-5
+ A-6
+ A-7
+ A-8
+ A-9
+
+
+
\ No newline at end of file
diff --git a/opensiddur-extensions/src/test/resources/transforms/parB.xml b/opensiddur-extensions/src/test/resources/transforms/parB.xml
new file mode 100644
index 00000000..25bbec90
--- /dev/null
+++ b/opensiddur-extensions/src/test/resources/transforms/parB.xml
@@ -0,0 +1,46 @@
+
+
+
+
+ Parallel text B
+
+
+
+ Open Siddur Project
+
+
+
+
+ 2014-03-19
+
+
+
+
+
+
+
+
+
+
+
+
+
+ B-1
+ B-2
+ B-3
+ B-4
+ B-5
+ B-6
+ B-7
+ B-8
+ B-9
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/opensiddur-extensions/src/test/resources/transforms/parallel-part-A.xml b/opensiddur-extensions/src/test/resources/transforms/parallel-part-A.xml
new file mode 100644
index 00000000..7a6d602e
--- /dev/null
+++ b/opensiddur-extensions/src/test/resources/transforms/parallel-part-A.xml
@@ -0,0 +1,39 @@
+
+
+
+
+ Parallel text A
+
+
+
+ Open Siddur Project
+
+
+
+
+ 2014-03-19
+
+
+
+
+
+
+
+
+
+
+
+
+
+ A-1
+ A-2
+ A-3
+ A-4
+ A-5
+ A-6
+ A-7
+ A-8
+ A-9
+
+
+
\ No newline at end of file
diff --git a/opensiddur-extensions/src/test/resources/transforms/parallel-part-B.xml b/opensiddur-extensions/src/test/resources/transforms/parallel-part-B.xml
new file mode 100644
index 00000000..9a2e57bd
--- /dev/null
+++ b/opensiddur-extensions/src/test/resources/transforms/parallel-part-B.xml
@@ -0,0 +1,39 @@
+
+
+
+
+ Parallel text B
+
+
+
+ Open Siddur Project
+
+
+
+
+ 2014-03-19
+
+
+
+
+
+
+
+
+
+
+
+
+
+ B-1
+ B-2
+ B-3
+ B-4
+ B-5
+ B-6
+ B-7
+ B-8
+ B-9
+
+
+
\ No newline at end of file
diff --git a/opensiddur-extensions/src/test/resources/transforms/parallel-same-A.xml b/opensiddur-extensions/src/test/resources/transforms/parallel-same-A.xml
new file mode 100644
index 00000000..c87c4357
--- /dev/null
+++ b/opensiddur-extensions/src/test/resources/transforms/parallel-same-A.xml
@@ -0,0 +1,39 @@
+
+
+
+
+ Parallel text A
+
+
+
+ Open Siddur Project
+
+
+
+
+ 2014-03-19
+
+
+
+
+
+
+
+
+
+
+
+
+
+ AB
+
+
+
+
+
+
+
+ A-1
+
+
+
\ No newline at end of file
diff --git a/opensiddur-extensions/src/test/resources/transforms/parallel-simple-A.xml b/opensiddur-extensions/src/test/resources/transforms/parallel-simple-A.xml
new file mode 100644
index 00000000..8f1e577f
--- /dev/null
+++ b/opensiddur-extensions/src/test/resources/transforms/parallel-simple-A.xml
@@ -0,0 +1,31 @@
+
+
+
+
+ Parallel text A
+
+
+
+ Open Siddur Project
+
+
+
+
+ 2014-03-19
+
+
+
+
+
+
+
+
+
+
+
+
+
+ A-1
+
+
+
\ No newline at end of file
diff --git a/opensiddur-extensions/src/test/resources/transforms/parallel-simple-B.xml b/opensiddur-extensions/src/test/resources/transforms/parallel-simple-B.xml
new file mode 100644
index 00000000..238f09a1
--- /dev/null
+++ b/opensiddur-extensions/src/test/resources/transforms/parallel-simple-B.xml
@@ -0,0 +1,31 @@
+
+
+
+
+ Parallel text B
+
+
+
+ Open Siddur Project
+
+
+
+
+ 2014-03-19
+
+
+
+
+
+
+
+
+
+
+
+
+
+ B-1
+
+
+
\ No newline at end of file
diff --git a/opensiddur-extensions/src/test/resources/transforms/resolve.xml b/opensiddur-extensions/src/test/resources/transforms/resolve.xml
new file mode 100644
index 00000000..2456cef6
--- /dev/null
+++ b/opensiddur-extensions/src/test/resources/transforms/resolve.xml
@@ -0,0 +1,39 @@
+
+
+
+
+
+
+
+
+ title
+
+ Label
+
+
+
+
+
+
+ One segment
+
+
+
diff --git a/opensiddur-extensions/src/test/resources/transforms/simple-concurrency.xml b/opensiddur-extensions/src/test/resources/transforms/simple-concurrency.xml
new file mode 100644
index 00000000..c211aefc
--- /dev/null
+++ b/opensiddur-extensions/src/test/resources/transforms/simple-concurrency.xml
@@ -0,0 +1,17 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+ No layers!
+
+
+
\ No newline at end of file
diff --git a/opensiddur-extensions/src/test/resources/transforms/suspend.xml b/opensiddur-extensions/src/test/resources/transforms/suspend.xml
new file mode 100644
index 00000000..e407bf5c
--- /dev/null
+++ b/opensiddur-extensions/src/test/resources/transforms/suspend.xml
@@ -0,0 +1,22 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ One segment
+ Two segments
+ Three segments
+
+
+
\ No newline at end of file
diff --git a/opensiddur-extensions/src/test/resources/transforms/suspend2.xml b/opensiddur-extensions/src/test/resources/transforms/suspend2.xml
new file mode 100644
index 00000000..f893f6ae
--- /dev/null
+++ b/opensiddur-extensions/src/test/resources/transforms/suspend2.xml
@@ -0,0 +1,23 @@
+
+
+
+
+
+
+
+
+ before
+
+ after 1
+
+ after 3
+
+
+
+
+ One segment
+ Two segments
+ Three segments
+
+
+
\ No newline at end of file
diff --git a/opensiddur-extensions/src/test/resources/transforms/suspend3.xml b/opensiddur-extensions/src/test/resources/transforms/suspend3.xml
new file mode 100644
index 00000000..da25c4f4
--- /dev/null
+++ b/opensiddur-extensions/src/test/resources/transforms/suspend3.xml
@@ -0,0 +1,22 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ One segment
+ Two segments
+ Three segments
+
+
+
diff --git a/opensiddur-extensions/src/test/resources/transforms/suspend4.xml b/opensiddur-extensions/src/test/resources/transforms/suspend4.xml
new file mode 100644
index 00000000..491ccebb
--- /dev/null
+++ b/opensiddur-extensions/src/test/resources/transforms/suspend4.xml
@@ -0,0 +1,24 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ One segment
+ Two segments
+ Three segments
+
+
+
\ No newline at end of file
diff --git a/opensiddur-extensions/src/test/resources/transforms/testtable.xml b/opensiddur-extensions/src/test/resources/transforms/testtable.xml
new file mode 100644
index 00000000..d85e237a
--- /dev/null
+++ b/opensiddur-extensions/src/test/resources/transforms/testtable.xml
@@ -0,0 +1,70 @@
+
+ testtable
+ A table for testing
+
+ Efraim Feinstein
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/opensiddur-extensions/src/test/resources/transforms/unflatten-order-bug.xml b/opensiddur-extensions/src/test/resources/transforms/unflatten-order-bug.xml
new file mode 100644
index 00000000..612ae6ed
--- /dev/null
+++ b/opensiddur-extensions/src/test/resources/transforms/unflatten-order-bug.xml
@@ -0,0 +1,46 @@
+
+
+
+
+
+
+
+
+
+
+ A.
+ B.
+ C.
+ D.
+
+
+
+
+ Heading1
+
+
+
+
+
+ Heading2
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/opensiddur-extensions/src/test/resources/transforms/unflatten-par.xml b/opensiddur-extensions/src/test/resources/transforms/unflatten-par.xml
new file mode 100644
index 00000000..7e2ab6e8
--- /dev/null
+++ b/opensiddur-extensions/src/test/resources/transforms/unflatten-par.xml
@@ -0,0 +1,39 @@
+
+
+
+
+ Parallel texts A and B
+
+
+
+ Open Siddur Project
+
+
+
+
+ 2014-03-19
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Test
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/opensiddur-extensions/src/test/resources/transforms/unflatten-parA.xml b/opensiddur-extensions/src/test/resources/transforms/unflatten-parA.xml
new file mode 100644
index 00000000..7a9d2c85
--- /dev/null
+++ b/opensiddur-extensions/src/test/resources/transforms/unflatten-parA.xml
@@ -0,0 +1,66 @@
+
+
+
+
+ Parallel text A
+
+
+
+ Open Siddur Project
+
+
+
+
+ 2014-03-19
+
+
+
+
+
+
+
+
+
+
+
+
+
+ A-1
+ A-2
+ A-3
+ A-4
+ A-5
+ A-6
+ A-7
+ A-8
+ A-9
+ A-10
+ A-11
+ A-12
+ A-13
+ A-14
+ A-15
+ A-16
+ A-17
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/opensiddur-extensions/src/test/resources/transforms/unflatten-parB.xml b/opensiddur-extensions/src/test/resources/transforms/unflatten-parB.xml
new file mode 100644
index 00000000..aff67cf7
--- /dev/null
+++ b/opensiddur-extensions/src/test/resources/transforms/unflatten-parB.xml
@@ -0,0 +1,43 @@
+
+
+
+
+ Parallel text B
+
+
+
+ Open Siddur Project
+
+
+
+
+ 2014-03-19
+
+
+
+
+
+
+
+
+
+
+
+
+
+ B-1
+ B-2
+ B-3
+ B-4
+ B-5
+ B-6
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/opensiddur-extensions/src/test/resources/transforms/unflatten1-unflat.xml b/opensiddur-extensions/src/test/resources/transforms/unflatten1-unflat.xml
new file mode 100644
index 00000000..b43bb1f8
--- /dev/null
+++ b/opensiddur-extensions/src/test/resources/transforms/unflatten1-unflat.xml
@@ -0,0 +1,16 @@
+
+
+
+
+
+
+
+ title
+
+ Label
+ One segment
+
+
+
+
+
\ No newline at end of file
diff --git a/opensiddur-extensions/src/test/resources/transforms/unflatten1.xml b/opensiddur-extensions/src/test/resources/transforms/unflatten1.xml
new file mode 100644
index 00000000..60e33546
--- /dev/null
+++ b/opensiddur-extensions/src/test/resources/transforms/unflatten1.xml
@@ -0,0 +1,31 @@
+
+
+
+
+
+
+
+ title
+
+ Label
+ One segment
+
+
+
+
+
\ No newline at end of file
diff --git a/opensiddur-extensions/src/test/resources/transforms/unflatten2-unflat.xml b/opensiddur-extensions/src/test/resources/transforms/unflatten2-unflat.xml
new file mode 100644
index 00000000..3aa96818
--- /dev/null
+++ b/opensiddur-extensions/src/test/resources/transforms/unflatten2-unflat.xml
@@ -0,0 +1,19 @@
+
+
+
+
+
+
+ one
+
+
+ two
+
+
+
+ three
+
+
+
+
+
\ No newline at end of file
diff --git a/opensiddur-extensions/src/test/resources/transforms/unflatten2.xml b/opensiddur-extensions/src/test/resources/transforms/unflatten2.xml
new file mode 100644
index 00000000..3fe32cf2
--- /dev/null
+++ b/opensiddur-extensions/src/test/resources/transforms/unflatten2.xml
@@ -0,0 +1,57 @@
+
+
+
+
+
+
+ one
+
+
+ two
+
+
+
+ three
+
+
+
+
+
\ No newline at end of file
diff --git a/opensiddur-extensions/src/test/resources/transforms/unflatten3-unflat.xml b/opensiddur-extensions/src/test/resources/transforms/unflatten3-unflat.xml
new file mode 100644
index 00000000..3dc05014
--- /dev/null
+++ b/opensiddur-extensions/src/test/resources/transforms/unflatten3-unflat.xml
@@ -0,0 +1,15 @@
+
+
+
+
+
+ one
+
+ two
+
+ three
+
+
+
+
+
\ No newline at end of file
diff --git a/opensiddur-extensions/src/test/resources/transforms/unflatten3.xml b/opensiddur-extensions/src/test/resources/transforms/unflatten3.xml
new file mode 100644
index 00000000..90d016e0
--- /dev/null
+++ b/opensiddur-extensions/src/test/resources/transforms/unflatten3.xml
@@ -0,0 +1,31 @@
+
+
+
+
+
+ one
+
+ two
+
+ three
+
+
+
+
+
\ No newline at end of file
diff --git a/opensiddur-extensions/src/test/resources/transforms/unflatten4-unflat.xml b/opensiddur-extensions/src/test/resources/transforms/unflatten4-unflat.xml
new file mode 100644
index 00000000..008de951
--- /dev/null
+++ b/opensiddur-extensions/src/test/resources/transforms/unflatten4-unflat.xml
@@ -0,0 +1,17 @@
+
+
+
+
+
+ one
+
+ two
+
+
+
+ three
+
+
+
+
+
\ No newline at end of file
diff --git a/opensiddur-extensions/src/test/resources/transforms/unflatten4.xml b/opensiddur-extensions/src/test/resources/transforms/unflatten4.xml
new file mode 100644
index 00000000..96b21cc6
--- /dev/null
+++ b/opensiddur-extensions/src/test/resources/transforms/unflatten4.xml
@@ -0,0 +1,34 @@
+
+
+
+
+
+ one
+
+ two
+
+ three
+
+
+
+
+
\ No newline at end of file
diff --git a/opensiddur-extensions/src/test/scala/org/opensiddur/DbTest.scala b/opensiddur-extensions/src/test/scala/org/opensiddur/DbTest.scala
new file mode 100644
index 00000000..adec8938
--- /dev/null
+++ b/opensiddur-extensions/src/test/scala/org/opensiddur/DbTest.scala
@@ -0,0 +1,474 @@
+package org.opensiddur
+
+import scala.io.Source
+import org.exist.xmldb.EXistResource
+import org.opensiddur.DbTest._
+import org.scalatest.funspec.AnyFunSpec
+import org.scalatest.{BeforeAndAfterAll, BeforeAndAfterEach}
+import org.xmldb.api.DatabaseManager
+import org.xmldb.api.base._
+import org.xmldb.api.modules._
+import scala.xml.XML
+
+import Numeric._
+
+trait AbstractXQueryCall {
+ def callXQuery(query: String): Array[String]
+}
+
+trait XQueryCall extends AbstractXQueryCall {
+ def initDb(): Unit = {
+ val cl = Class.forName(driver)
+ val database = cl.newInstance.asInstanceOf[Database]
+ //database.setProperty("create-database", "true")
+ DatabaseManager.registerDatabase(database)
+ }
+
+ /** run a generic XQuery. return the content as strings */
+ override def callXQuery(query: String): Array[String] = {
+ var results = Array[String]()
+ val col = DatabaseManager.getCollection(existUri + "/db")
+ try {
+ val xqs = col.getService("XQueryService", "1.0").asInstanceOf[XQueryService]
+ val compiled = xqs.compile(query)
+ val result = xqs.execute(compiled)
+ val iter = result.getIterator
+ while (iter.hasMoreResources) {
+ var res: EXistResource = null
+ try {
+ res = iter.nextResource.asInstanceOf[EXistResource]
+ results = results :+ res.getContent.toString
+ } finally {
+ // cleanup resources
+ res.freeResources()
+ }
+ }
+ }
+ catch {
+ case ex:XMLDBException => {
+ println(s"XQuery: $query")
+ throw ex
+ }
+ }
+ finally {
+ if (col != null) {
+ col.close()
+ }
+ }
+ results
+ }
+
+}
+
+/*
+ it(...) {
+ xq
+ before
+ code
+ after
+ assertXmlEquals (requires deepequality library)
+ assertThrows exception
+ assertXPath xqueryTest clue (optional)
+ assertEquals
+ assertTrue
+ assertFalse
+ assertEmpty
+ go
+ }
+ */
+case class XPathAssertion(
+ xpath: String,
+ clue: String
+ )
+
+case class UserAndPass(user: Option[String] = None, pass: Option[String] = None)
+
+class Xq(
+ _code: String = "",
+ _prolog: String = "",
+ _throws: String = "",
+ _assertions: Seq[XPathAssertion] = Seq(),
+ _auth: UserAndPass = UserAndPass()
+ ) extends XQueryCall {
+
+ def copy(__code: String = _code,
+ __prolog: String = _prolog,
+ __throws: String = _throws,
+ __assertions: Seq[XPathAssertion] = _assertions,
+ __auth: UserAndPass = _auth): Xq = {
+ new Xq(__code, __prolog, __throws, __assertions, __auth)
+ }
+
+ def prolog(xquery: String): Xq = {
+ copy(
+ __prolog = xquery
+ )
+ }
+
+ def user(user: String, password: Option[String] = None): Xq = {
+ copy(
+ __auth = UserAndPass(Some(user), password.orElse(Some(user)))
+ )
+ }
+
+ def code(xquery: String): Xq = {
+ copy(
+ __code = xquery
+ )
+ }
+
+ /** construct a query that contains the prolog, code and assertions
+ * after the last assertion, all output is returned */
+ protected def constructXQuery(
+ __prolog: String = _prolog,
+ __auth: UserAndPass = _auth,
+ __throws: String = _throws,
+ __code: String = _code,
+ __assertions: Seq[XPathAssertion] = _assertions
+ ): String = {
+ __prolog + "\n" +
+ s"let $$output := " +
+ (if (__auth.user.nonEmpty)
+ s"system:as-user('${__auth.user.get}', ${if (__auth.user.get == "admin") "$magic:password" else s"'${__auth.pass.get}'"},"
+ else "") +
+ (if (__throws.nonEmpty) "try { " else "") +
+ s"${__code}" +
+ (if (__throws.nonEmpty) s"} catch ${__throws} { element threwException { '${__throws}' } }" else "") +
+ ( if (__auth.user.nonEmpty) ")" else "") +
+ "\nreturn (" + (
+ if (__throws.nonEmpty) s"if ($$output instance of element(threwException)) then 1 else 0"
+ else {
+ __assertions.map { assertion: XPathAssertion =>
+ s"if (${assertion.xpath}) then 1 else 0"
+ }.mkString(",\n")
+ }) +
+ (if (__throws.nonEmpty || __assertions.nonEmpty) "," else "") + "\n$output\n)"
+ }
+
+ def go: Array[String] = {
+ val xquery = constructXQuery()
+ val returns = callXQuery(xquery)
+ val actualOutput =
+ if (_throws.nonEmpty) returns.tail
+ else returns.drop(_assertions.length)
+
+ if (_throws.nonEmpty) {
+ assert(returns(0) == "1", s"Did not throw ${_throws}")
+ }
+ else {
+ _assertions.zipWithIndex.foreach { case (assertion: XPathAssertion, idx: Int) =>
+ assert(returns(idx) == "1", assertion.clue + ": output = (" + actualOutput.mkString(",") + ")")
+ }
+ }
+ returns
+ }
+
+ def assertThrows(exceptionType: String): Xq = {
+ copy(
+ __throws = exceptionType)
+ }
+
+ def assertEquals(value: String*): Xq = {
+ copy(
+ __assertions = _assertions ++ value.zipWithIndex.map { case (v:String, idx: Int) =>
+ val indexString = if (value.length > 1) s"[${idx + 1}]" else ""
+ XPathAssertion(s"$$output$indexString='$v'", s" output$indexString did not equal '$v'")
+ }
+ )
+ }
+
+ def assertXPath(xpath: String, clue: String = ""): Xq = {
+ copy(
+ __assertions = _assertions :+ XPathAssertion(xpath,
+ if (clue.nonEmpty) clue else s" output did not conform to '$xpath'")
+ )
+ }
+
+ def assertEquals[T : Numeric](value: T*): Xq = {
+ copy(
+ __assertions = _assertions ++ value.zipWithIndex.map { case (v:T, idx: Int) =>
+ val indexString = if (value.length > 1) s"[${idx + 1}]" else ""
+ XPathAssertion(s"$$output$indexString=$v", s" output$indexString did not equal $v")
+ }
+ )
+ }
+
+ def assertTrue: Xq = {
+ copy(
+ __assertions = _assertions :+ XPathAssertion("$output", s" output was not true()")
+ )
+ }
+
+ def assertFalse: Xq = {
+ copy(
+ __assertions = _assertions :+ XPathAssertion("not($output)", s" output was not false()")
+ )
+ }
+
+ def assertEmpty: Xq = {
+ copy(
+ __assertions = _assertions :+ XPathAssertion("empty($output)", s" output was not empty")
+ )
+ }
+
+ def assertXmlEquals(xml: String*): Xq = {
+ val xmlSequence = "(" + xml.mkString(",") + ")"
+ assertXPathEquals("$output", s" output did not equal $xmlSequence", xml :_*)
+ }
+
+ def assertXPathEquals(xpath: String, clue: String, xml: String*): Xq = {
+ val xmlSequence = "(" + xml.mkString(",") + ")"
+
+ copy(
+ __assertions = _assertions :+ XPathAssertion(s"empty(tcommon:deep-equal($xpath, $xmlSequence))", clue)
+ )
+ }
+
+ // complex assertions
+ def assertHttpNotFound: Xq = {
+ this
+ .assertXPath("""$output/self::rest:response/http:response/@status = 404""", "expected HTTP not found")
+ }
+
+ def assertHttpCreated: Xq = {
+ this
+ .assertXPath("""$output/self::rest:response/http:response/@status = 201""", "expected HTTP created")
+ .assertXPath("""exists($output/self::rest:response/http:response/http:header[@name="Location"][@value])""", "returns a Location header")
+ }
+
+ def assertHttpBadRequest: Xq = {
+ this
+ .assertXPath("""$output/self::rest:response/http:response/@status = 400""", "expected HTTP bad request")
+ }
+
+ def assertHttpForbidden: Xq = {
+ this
+ .assertXPath("""$output/self::rest:response/http:response/@status = 403""", "expected HTTP forbidden")
+ }
+
+ def assertHttpNoData: Xq = {
+ this
+ .assertXPath("""$output/self::rest:response/http:response/@status = 204""", "expected HTTP No data")
+ .assertXPath("""$output/self::rest:response/output:serialization-parameters/output:method = "text"""", "output is declared as text")
+ }
+
+ def assertHttpUnauthorized: Xq = {
+ this
+ .assertXPath("""$output/self::rest:response/http:response/@status = 401""", "expected HTTP unauthorized")
+ }
+
+ def assertSearchResults: Xq = {
+ this
+ .assertXPath("""$output/self::rest:response/output:serialization-parameters/output:method="xhtml"""", "serialize as XHTML")
+ .assertXPath("""empty($output//html:head/@profile)""", "reference to Open Search @profile removed for html5 compliance")
+ .assertXPath("""count($output//html:meta[@name='startIndex'])=1""", "@startIndex is present")
+ .assertXPath("""count($output//html:meta[@name='endIndex'])=0""", "@endIndex has been removed")
+ .assertXPath("""count($output//html:meta[@name='totalResults'])=1""", "@totalResults is present")
+ .assertXPath("""count($output//html:meta[@name='itemsPerPage'])=1""", "@itemsPerPage is present")
+ }
+
+ def assertDiscoveryApi: Xq = {
+ this
+ .assertXPath("""exists($output/self::html:html/html:body/*[@class="apis"]/html:li[@class="api"]/html:a[@class="discovery"])""", "has a discovery API")
+ }
+
+ def assertSerializesAs(serialization: String): Xq = {
+ this
+ .assertXPath(s"""$$output/self::rest:response/output:serialization-parameters/output:method="$serialization" """, s"serializes as $serialization")
+ }
+}
+
+class XqRest(
+ _code: String = "",
+ _prolog: String = "",
+ _throws: String = "",
+ _assertions: Seq[XPathAssertion] = Seq(),
+ _auth: UserAndPass = UserAndPass()
+ ) extends Xq(_code, _prolog, _throws, _assertions, _auth) {
+ override def copy(__code: String, __prolog: String, __throws: String, __assertions: Seq[XPathAssertion], __auth: UserAndPass): XqRest = {
+ new XqRest(__code, __prolog, __throws, __assertions, __auth)
+ }
+
+ override def constructXQuery(__prolog: String, __auth: UserAndPass, __throws: String, __code: String, __assertions: Seq[XPathAssertion]): String = {
+ super.constructXQuery(__prolog, UserAndPass(), __throws, __code, __assertions)
+ }
+
+ override def callXQuery(query: String): Array[String] = {
+ val auth = (_auth.user.getOrElse("guest"), _auth.pass.getOrElse("guest"))
+
+ val response = requests.get(restUri,
+ params = Map("_query" -> query),
+ auth = auth
+ )
+ val xml = XML.loadString(response.text())
+ if (response.statusCode == 200) { // results
+ xml.child.
+ map { c =>
+ if (c.label == "value") c.child.text
+ else c.toString().trim }.
+ filter { _.nonEmpty }
+ }.toArray
+ else { // should never get here...
+ throw new RuntimeException("Error in XML processing via REST: " + xml.toString())
+ }
+ }
+}
+
+abstract class DbTest extends AnyFunSpec with BeforeAndAfterEach with BeforeAndAfterAll with XQueryCall {
+ def xq(code: String): Xq = {
+ new Xq(code, prolog)
+ }
+
+ def xqRest(code: String): XqRest = {
+ new XqRest(code, prolog)
+ }
+
+ def setupUsers(n: Int) = {
+ xq(s"""
+ let $$users := tcommon:setup-test-users($n)
+ return ()
+ """)
+ .go
+ }
+
+ def teardownUsers(n: Int) = {
+ xq(
+ s"""
+ let $$users := tcommon:teardown-test-users($n)
+ return ()
+ """)
+ .go
+ }
+
+ def readXmlFile(localSource: String): String = {
+ val contentSource = Source.fromFile(localSource)
+ val content = try {
+ contentSource.getLines.mkString
+ } finally {
+ contentSource.close()
+ }
+
+ content
+ }
+
+ /** Store arbitrary content to an arbitrary path */
+ def store(
+ localSource: String,
+ collection: String,
+ resourceName: String,
+ dataType: String = "application/xml",
+ firstParamIsContent: Boolean = false,
+ as: String = "guest"
+ ): Array[String] = {
+ val content = if (firstParamIsContent) ("'" + localSource + "'") else readXmlFile(localSource)
+ xq(s"""xmldb:store('$collection', '$resourceName', $content, '$dataType')""")
+ .user(as)
+ .go
+ }
+
+ /** Remove an arbitrary path from the db */
+ def remove(collection: String, resourceName: String, as: String = "guest") = {
+ xq(s"""xmldb:remove('$collection', '$resourceName')""")
+ .user(as)
+ .go
+ }
+
+ def setupCollection(base: String, collection: String,
+ owner: Option[String] = None,
+ group: Option[String] = None,
+ permissions: Option[String] = None) = {
+ val changeOwner =
+ if (owner.isDefined)
+ s"""let $$change-owner := sm:chown(xs:anyURI('$base/$collection'), '${owner.get}')"""
+ else ""
+ val changeGroup =
+ if (group.isDefined)
+ s"""let $$change-group := sm:chgrp(xs:anyURI('$base/$collection'), '${group.get}')"""
+ else ""
+ val changePermissions =
+ if (permissions.isDefined)
+ s"""let $$change-permissions := sm:chmod(xs:anyURI('$base/$collection'), '${permissions.get}')"""
+ else ""
+
+ xq(
+ s"""
+ let $$create := xmldb:create-collection('$base', '$collection')
+ $changeOwner
+ $changeGroup
+ $changePermissions
+ return ()
+ """)
+ .user("admin")
+ .go
+ }
+
+ def setupResource(localSource: String,
+ resourceName: String,
+ dataType: String,
+ owner: Int,
+ subType: Option[String] = None,
+ group: Option[String] = None,
+ permissions: Option[String] = None,
+ firstParamIsContent: Boolean = false
+ ) = {
+ val content = if (firstParamIsContent) ("'" + localSource + "'") else readXmlFile(localSource)
+ xq(
+ s"""
+ let $$file := tcommon:setup-resource('${resourceName}',
+ '${dataType}', $owner, $content,
+ ${subType.fold("()") { "'" + _ + "'"}},
+ ${group.fold("()") { "'" + _ + "'"}},
+ ${permissions.fold("()") { "'" + _ + "'"}})
+ return ()
+ """)
+ .go
+ }
+
+ def teardownResource(resourceName: String, dataType: String, owner: Int) = {
+ xq(
+ s"""
+ let $$file := tcommon:teardown-resource('${resourceName}', '${dataType}', $owner)
+ return ()
+ """)
+ .go
+ }
+
+ def teardownCollection(collectionName: String) = {
+ xq(s"""if (xmldb:collection-available('$collectionName')) then xmldb:remove('$collectionName') else ()""")
+ .user("admin")
+ .go
+ }
+
+ override def beforeAll: Unit = {
+ initDb
+ }
+
+ /** imports, namespaces and variables */
+ val prolog: String
+
+ /** run xquery setup code. The XQuery result is ignored/assumed to be empty */
+ def xquerySetup(query: String): Unit = {
+ xq(query)
+ .go
+ }
+
+ /** run xquery teardown code. The XQuery result is ignored/assumed to be empty */
+ def xqueryTearDown(query: String): Unit = {
+ xq(query)
+ .go
+ }
+
+}
+
+object DbTest {
+ // docker port for eXistdb
+ val existPort = 5000
+
+ val driver = "org.exist.xmldb.DatabaseImpl"
+ val existUri = s"xmldb:exist://localhost:${existPort}/exist/xmlrpc"
+
+ val restUri = s"http://localhost:${existPort}/exist/rest/db"
+
+ val HTML5_SERIALIZATION = "xhtml"
+ val XHTML_SERIALIZATION = "xhtml"
+}
\ No newline at end of file
diff --git a/opensiddur-extensions/src/test/scala/org/opensiddur/api/TestChanges.scala b/opensiddur-extensions/src/test/scala/org/opensiddur/api/TestChanges.scala
new file mode 100644
index 00000000..d0255fac
--- /dev/null
+++ b/opensiddur-extensions/src/test/scala/org/opensiddur/api/TestChanges.scala
@@ -0,0 +1,147 @@
+package org.opensiddur.api
+
+import org.opensiddur.DbTest
+
+import java.time.LocalDateTime
+import java.time.format.DateTimeFormatter
+
+class TestChanges extends DbTest {
+ /** imports, namespaces and variables */
+ override val prolog: String =
+ """xquery version '3.1';
+
+import module namespace chg="http://jewishliturgy.org/api/changes"
+ at "xmldb:exist:///db/apps/opensiddur-server/api/changes.xqm";
+
+import module namespace tcommon="http://jewishliturgy.org/test/tcommon"
+ at "xmldb:exist:///db/apps/opensiddur-server/test/tcommon.xqm";
+
+declare namespace html="http://www.w3.org/1999/xhtml";
+declare namespace tei="http://www.tei-c.org/ns/1.0";
+declare namespace j="http://jewishliturgy.org/ns/jlptei/1.0";
+declare namespace jx="http://jewishliturgy.org/ns/jlp-processor";
+ """
+
+ def dateRange(beginTime: String,
+ endTime: String,
+ intervalMonths: Long): List[String] = {
+ val formatter = DateTimeFormatter.ISO_LOCAL_DATE_TIME
+ if (beginTime <= endTime) {
+ val beginDate = LocalDateTime.parse(beginTime, formatter)
+ List(beginDate.format(formatter)) ++
+ dateRange(beginDate.plusMonths(intervalMonths).format(formatter), endTime, intervalMonths)
+ }
+ else {
+ List()
+ }
+ }
+
+ def changesFile(
+ title: String,
+ whos: List[String],
+ beginTime: String,
+ endTime: String
+ ): String = {
+ val revisionDescContent = dateRange(beginTime, endTime, 1).zipWithIndex.map {
+ case (when: String, n: Int) => {
+ val changeType = if (n == 0) "created" else "edited"
+ val who = whos((n % whos.length))
+ f"""message ${n + 1}"""
+ }}.mkString("\n")
+
+ f"""
+ |
+ |
+ |
+ | {$title}
+ |
+ |
+ | {$revisionDescContent}
+ |
+ |
+ | """.stripMargin
+ }
+
+ override def beforeAll: Unit = {
+ super.beforeAll
+
+ setupUsers(2)
+
+ (1980 to 2000).map { year =>
+ val title = s"file_$year"
+ val owner = if ((year % 2) == 0) 1 else 2
+ val fileContent = changesFile(title, List(s"xqtest$owner"), s"${year}-01-01T00:00:00", s"${year}-12-31T23:59:00")
+ setupResource(fileContent, title, "original", owner, Some("en"), firstParamIsContent = true)
+ }
+ }
+
+ override protected def afterAll(): Unit = {
+ (1980 to 2000).map { year =>
+ val title = s"file_$year"
+ val owner = if ((year % 2) == 0) 1 else 2
+ teardownResource(title, "original", owner)
+ }
+ teardownUsers(2)
+
+ super.afterAll()
+ }
+
+ describe("chg:list") {
+ it("returns all recent changes") {
+ xq("""chg:list((), (), (), (), 1, 100)[2]""")
+ .user("xqtest1")
+ .assertXPath("""exists($output/self::html:html[descendant::html:ul[@class="results"]])""", "an HTML API results document is returned")
+ .assertXPath("""count($output//html:li[@class="result"]) >= 1""", "at least one result is returned")
+ .assertXPath("""count($output//html:li[@class="result"]) <= 100""", "at most max-results are returned")
+ .go
+ }
+
+ it("returns all recent changes by a given user in type notes, where none were made") {
+ xq("""chg:list("notes", "xqtest1", (), (), 1, 100)[2]""")
+ .user("xqtest1")
+ .assertXPath("""exists($output/self::html:html[descendant::html:ul[@class="results"]])""", "an HTML API results document is returned")
+ .assertXPath("""count($output//html:li[@class="result"]) = 0""", "no results is returned")
+ .go
+ }
+
+ it("returns all recent changes made by a particular user") {
+ xq("""chg:list((), "xqtest1", (), (), 1, 1000)[2]""")
+ .user("xqtest1")
+ .assertXPath("""count($output//html:li[@class="result"])=11""", "returns results for 11 files")
+ .assertXPath("""count($output//html:li[@class="result"][html:ol[@class="changes"]/html:li[@class="change"][html:span[@class="who"][.="xqtest1"]][html:span[@class="type"][.="created"]]])=11""", "returns created entry for 11 files")
+ .assertXPath("""count($output//html:li[@class="result"][html:ol[@class="changes"]/html:li[@class="change"][html:span[@class="who"][.="xqtest1"]][html:span[@class="type"][.="edited"]]])=11""", "returns edited entries for 11 files")
+ .assertXPath("""$output//html:li[1]/html:ol/html:li[1]/html:span[@class="when"]/string() > $output//html:li[2]/html:ol/html:li[1]/html:span[@class="when"]/string() """, "files are sorted in descending order")
+ .assertXPath("""$output//html:li[1]/html:ol/html:li[1]/html:span[@class="when"]/string() > $output//html:li[1]/html:ol/html:li[2]/html:span[@class="when"]/string() """, "change records per file are sorted in descending order")
+ .go
+ }
+
+ it("returns all recent changes made by a particular user with a date begin range") {
+ xq("""chg:list((), "xqtest1", "1986-06-01T00:00:00", (), 1, 1000)[2]""")
+ .user("xqtest1")
+ .assertXPath("""count($output//html:li[@class="result"])=8""", "returns results for 8 files")
+ .assertXPath("""count($output//html:li[@class="result"][html:ol[@class="changes"]/html:li[@class="change"][html:span[@class="who"][.="xqtest1"]][html:span[@class="type"][.="created"]]])=7""", "returns created entry for 7 files")
+ .assertXPath("""every $entry in $output//html:ul[@class="results"][html:a[.="file_1986"]]/html:li[@class="result"][html:ol[@class="changes"]/html:li[@class="change"][html:span[@class="who"][.="xqtest1"]][html:span[@class="type"][.="edited"]]] satisfies $entry/html:span[@class="when"] >= "1986-06-01T00:00:00" """, "returns only entries after the breakpoint")
+ .go
+ }
+
+ it("returns all recent changes made by a particular user with a date end range") {
+ xq("""chg:list((), "xqtest1", (), "1986-06-01T00:00:00", 1, 1000)[2]""")
+ .user("xqtest1")
+ .assertXPath("""count($output//html:li[@class="result"])=4""", "returns results for 4 files")
+ .assertXPath("""count($output//html:li[@class="result"][html:ol[@class="changes"]/html:li[@class="change"][html:span[@class="who"][.="xqtest1"]][html:span[@class="type"][.="created"]]])=4""", "returns created entry for 4 files")
+ .assertXPath("""every $entry in $output//html:ul[@class="results"][html:a[.="file_1986"]]/html:li[@class="result"][html:ol[@class="changes"]/html:li[@class="change"][html:span[@class="who"][.="xqtest1"]][html:span[@class="type"][.="edited"]]] satisfies $entry/html:span[@class="when"] <= "1986-06-01T00:00:00"""", "returns only entries before the breakpoint")
+ .go
+ }
+
+ it("returns all recent changes made by a particular user with date begin and end ranges") {
+ xq("""chg:list((), "xqtest1", "1982-06-01T00:00:00", "1990-06-01T00:00:00", 1, 1000)[2]""")
+ .user("xqtest1")
+ .assertXPath("""count($output//html:li[@class="result"])=5""", "returns results for 5 files")
+ .assertXPath("""count($output//html:li[@class="result"][html:ol[@class="changes"]/html:li[@class="change"][html:span[@class="who"][.="xqtest1"]][html:span[@class="type"][.="created"]]])=4""", "returns created entry for 4 files")
+ .assertXPath("""every $entry in $output//html:ul[@class="results"][html:a[.="File_1982"]]/html:li[@class="result"][html:ol[@class="changes"]/html:li[@class="change"][html:span[@class="who"][.="xqtest1"]][html:span[@class="type"][.="edited"]]] satisfies $entry/html:span[@class="when"] >= "1982-06-01T00:00:00"""", "returns only entries after the breakpoint for the start date")
+ .assertXPath("""every $entry in $output//html:ul[@class="results"][html:a[.="File_1990"]]/html:li[@class="result"][html:ol[@class="changes"]/html:li[@class="change"][html:span[@class="who"][.="xqtest1"]][html:span[@class="type"][.="edited"]]] satisfies $entry/html:span[@class="when"] <= "1990-06-01T00:00:00"""", "returns only entries before the breakpoint for the end date")
+ .go
+ }
+
+ }
+}
diff --git a/opensiddur-extensions/src/test/scala/org/opensiddur/api/TestGroup.scala b/opensiddur-extensions/src/test/scala/org/opensiddur/api/TestGroup.scala
new file mode 100644
index 00000000..923d257c
--- /dev/null
+++ b/opensiddur-extensions/src/test/scala/org/opensiddur/api/TestGroup.scala
@@ -0,0 +1,387 @@
+package org.opensiddur.api
+
+import org.opensiddur.DbTest
+
+class BaseTestGroup extends DbTest {
+ /** imports, namespaces and variables */
+ override val prolog: String =
+ """xquery version '3.1';
+
+import module namespace grp="http://jewishliturgy.org/api/group"
+ at "xmldb:exist:///db/apps/opensiddur-server/api/group.xqm";
+import module namespace magic="http://jewishliturgy.org/magic"
+ at "xmldb:exist:///db/apps/opensiddur-server/magic/magic.xqm";
+import module namespace tcommon="http://jewishliturgy.org/test/tcommon"
+ at "xmldb:exist:///db/apps/opensiddur-server/test/tcommon.xqm";
+
+declare namespace html="http://www.w3.org/1999/xhtml";
+declare namespace g="http://jewishliturgy.org/ns/group/1.0";
+declare namespace http="http://expath.org/ns/http-client";
+declare namespace output="http://www.w3.org/2010/xslt-xquery-serialization";
+
+declare variable $local:valid := document {
+
+ xqtest1
+ testuser3
+ testuser4
+ testuser5
+ testuser6
+
+ };
+
+declare variable $local:invalid := document {
+
+
+
+ };
+
+"""
+
+ override def beforeAll: Unit = {
+ super.beforeAll
+
+ setupUsers(1)
+
+ xq("""system:as-user("admin", $magic:password, (
+ let $new-group :=
+ if (sm:group-exists("grouptests")) then ()
+ else sm:create-group("grouptests", "xqtest1", "")
+ let $user := sm:add-group-member("grouptests", "xqtest1")
+ let $new-group2 :=
+ if (sm:group-exists("grouptests2")) then ()
+ else sm:create-group("grouptests2", "admin", "")
+ for $i in 3 to 7
+ let $user :=
+ if (sm:user-exists("testuser" || $i)) then ()
+ else sm:create-account(
+ "testuser" || $i, "testuser" || $i,
+ ("everyone", "grouptests"[$i <= 5])
+ )
+ return ()
+ ))""")
+ .go
+ }
+
+ override def afterAll(): Unit = {
+ xq("""system:as-user("admin", $magic:password, (
+ for $i in 3 to 7
+ let $r := if (sm:group-exists("testuser" || $i)) then sm:remove-group-member("testuser" || $i, "admin") else ()
+ return (
+ if (sm:user-exists("testuser" || $i)) then sm:remove-account("testuser" || $i) else (),
+ if (sm:group-exists("testuser" || $i)) then sm:remove-group("testuser" || $i) else ()
+ ),
+ if (sm:group-exists("grouptests"))
+ then (
+ sm:remove-group-member("grouptests", "xqtest1"),
+ sm:remove-group-manager("grouptests", "xqtest1"),
+ sm:remove-group-member("grouptests", "admin"),
+ sm:remove-group("grouptests")
+ )
+ else (),
+ if (sm:group-exists("grouptests2"))
+ then (
+ sm:remove-group-member("grouptests2", "admin"),
+ sm:remove-group("grouptests2")
+ )
+ else ()
+ ))""")
+ .go
+
+ teardownUsers(1)
+ super.afterAll()
+ }
+}
+
+class TestGroup extends BaseTestGroup {
+
+ describe("grp:list") {
+ it("lists all groups") {
+ xq("""grp:list(1, 100)""")
+ .assertXPath("""count($output//*[@class="results"]/html:li[@class="result"])>=7""", "returns at least 7 results")
+ .go
+ }
+
+ it("lists only 2 groups when limited") {
+ xq("""grp:list(1, 2)""")
+ .assertXPath("""count($output//*[@class="results"]/html:li[@class="result"])=2""", "returns exactly 2 results")
+ .go
+ }
+ }
+
+ describe("grp:get-xml()") {
+ it("Gets members of an existing group") {
+ xq("""grp:get-xml("grouptests")""")
+ .user("xqtest1")
+ .assertXmlEquals("""
+ testuser3
+ testuser4
+ testuser5
+ xqtest1
+ """)
+ .go
+ }
+
+ it("Fails to get members of a non-existing group") {
+ xq("""grp:get-xml("doesnotexist")""")
+ .user("xqtest1")
+ .assertHttpNotFound
+ .go
+ }
+
+ it("fails when unauthenticated for an existing group") {
+ xq("""grp:get-xml("grouptests")""")
+ .assertHttpUnauthorized
+ .go
+ }
+
+ it("fails when unauthenticated for an nonexisting group") {
+ xq("""grp:get-xml("doesnotexist")""")
+ .assertHttpUnauthorized
+ .go
+ }
+
+ }
+
+ describe("grp:get-html()") {
+ it("gets members of an existing group when authenticated") {
+ xq("""grp:get-html("grouptests")""")
+ .user("xqtest1")
+ .assertXPath("""$output/self::html:html/html:body/*[@class="results"]/html:li[@class="result"]/html:a[@class="document"]""", "returns an HTML list of members")
+ .assertXPath("""count($output//html:a[@property="manager"]) = 1""", "managers are marked with @property")
+ .go
+ }
+
+ it("fails to get members of a non-existing group") {
+ xq("""grp:get-html("doesnotexist")""")
+ .user("xqtest1")
+ .assertHttpNotFound
+ .go
+ }
+
+ it("fails when unauthenticated for an existing group") {
+ xq("""grp:get-html("grouptests")""")
+ .assertHttpUnauthorized
+ .go
+ }
+
+ it("fails when unauthenticated for an nonexisting group") {
+ xq("""grp:get-html("doesnotexist")""")
+ .assertHttpUnauthorized
+ .go
+ }
+ }
+
+ describe("grp:get-user-groups()") {
+ it("gets groups for an existing user") {
+ xq("""grp:get-user-groups("xqtest1")""")
+ .user("xqtest1")
+ .assertXPath("""$output/self::html:html/html:body/*[@class="results"]/html:li[@class="result"]/html:a[@class="document"]""", "return an HTML list of groups")
+ .assertXPath("""exists($output//html:a[@property="manager"])""", "return the manager property on managed groups")
+ .assertXPath("""count($output//html:li[@class="result"]) = 3""", "returns exactly 3 groups (xqtest1, everyone and grouptests)")
+ .go
+ }
+
+ it("fails for a nonexisting user") {
+ xq("""grp:get-user-groups("doesnotexist")""")
+ .user("xqtest1")
+ .assertHttpNotFound
+ .go
+ }
+
+ it("fails when unauthenticated for an existing user") {
+ xq("""grp:get-user-groups("xqtest1")""")
+ .assertHttpUnauthorized
+ .go
+ }
+
+ it("fails when unauthenticated for an nonexisting user") {
+ xq("""grp:get-user-groups("doesnotexist")""")
+ .assertHttpUnauthorized
+ .go
+ }
+ }
+}
+
+class TestGroupPut extends BaseTestGroup {
+
+ override def beforeEach(): Unit = {
+ super.beforeAll()
+ super.beforeEach()
+ }
+
+ override def afterEach(): Unit = {
+ super.afterEach()
+ super.afterAll()
+ }
+
+ override def afterAll: Unit = {
+ xq(
+ """system:as-user("admin", $magic:password, (
+ if (sm:list-groups()="grouptestsnew")
+ then (
+ for $user in sm:get-group-members("grouptestsnew")
+ let $removed := sm:remove-group-member("grouptestsnew", $user)
+ return (),
+ sm:remove-group("grouptestsnew")
+ )
+ else ()
+ ))""").go
+
+ super.afterAll()
+ }
+
+ describe("grp:put()") {
+ it("creates a new group") {
+ xq("""grp:put("grouptestsnew", $local:valid)""")
+ .user("xqtest1")
+ .assertHttpCreated
+ .assertXPath("""grp:get-groups()="grouptestsnew" """, "group has been created")
+ .assertXPath(
+ """every $m in $local:valid//g:member[xs:boolean(@manager)] satisfies grp:get-group-managers("grouptestsnew")=$m""", "group managers are as specified")
+ .assertXPath("""every $m in $local:valid//g:member[not(xs:boolean(@manager))] satisfies grp:get-group-members("grouptestsnew")=$m""", "group members are as specified")
+ .assertXPath("""grp:get-group-managers("grouptestsnew")="admin" """, "admin is a group manager")
+ .go
+ }
+
+ it("adds a member to an existing group") {
+ xq(
+ """grp:put("grouptests", document {
+
+ {$local:valid//g:member}
+ testuser6
+
+ })""")
+ .user("xqtest1")
+ .assertHttpNoData
+ .assertXPath("""grp:get-group-members("grouptests")="testuser6" """, "the new user has been added to the group")
+ .go
+ }
+
+ it("removes a member of an existing group") {
+ xq(
+ """ grp:put("grouptests", document {
+
+ {$local:valid//g:member[not(.="testuser5")]}
+
+ })""")
+ .user("xqtest1")
+ .assertHttpNoData
+ .assertXPath("""not(grp:get-group-members("grouptests")="testuser5")""")
+ .go
+
+ }
+
+ it("adds a manager to an existing group") {
+ xq(
+ """grp:put("grouptests", document {
+
+ {$local:valid//g:member[not(.="testuser5")]}
+ testuser5
+
+ })""")
+ .user("xqtest1")
+ .assertHttpNoData
+ .assertXPath("""grp:get-group-managers("grouptests")="testuser5" """, "the member is now a manager")
+ .go
+ }
+
+ it("removes a manager for an existing group") {
+ xq(
+ """grp:put("grouptests", document {
+ |
+ | {$local:valid//g:member[not(.="xqtest1")]}
+ | xqtest1
+ |
+ | })""".stripMargin)
+ .user("xqtest1")
+ .assertHttpNoData
+ .assertXPath("""not(grp:get-group-managers("grouptests")="xqtest1")""", "the member is no longer a manager")
+ .assertXPath("""grp:get-group-members("grouptests")="xqtest1" """, "the member is still a member")
+ .go
+ }
+
+ it("does not remove admin from group manager privileges") {
+ xq("""grp:put("grouptests", $local:valid)""")
+ .user("xqtest1")
+ .assertHttpNoData
+ .assertXPath("""grp:get-group-managers("grouptests")="admin" """, "admin is still a group manager")
+ .go
+ }
+
+ it("fails with invalid group XML") {
+ xq("""grp:put("grouptests", $local:invalid)""")
+ .user("xqtest1")
+ .assertHttpBadRequest
+ .go
+ }
+
+ it("fails for an existing group of which the user is not a manager") {
+ xq("""grp:put("grouptests2", $local:valid) """)
+ .user("xqtest1")
+ .assertHttpForbidden
+ .go
+ }
+
+ it("fails when unauthenticated for an existing group") {
+ xq("""grp:put("grouptests", $local:valid)""")
+ .assertHttpUnauthorized
+ .go
+ }
+
+ it("fails when unauthenticated for a non existing group") {
+ xq("""grp:put("doesnotexist", $local:valid)""")
+ .assertHttpUnauthorized
+ .go
+ }
+ }
+}
+
+class TestGroupDelete extends BaseTestGroup {
+ override def beforeEach(): Unit = {
+ super.beforeAll()
+ super.beforeEach()
+ }
+
+ override def afterEach(): Unit = {
+ super.afterEach()
+ super.afterAll()
+ }
+
+ describe("grp:delete()") {
+ it("deletes an existing group") {
+ xq("""grp:delete("grouptests")""")
+ .user("xqtest1")
+ .assertHttpNoData
+ .assertXPath("""not(grp:get-groups()="grouptests")""", "group is deleted")
+ .assertXPath("""not(system:as-user("xqtest1", "xqtest1", sm:get-user-groups("xqtest1"))="grouptests")""", "user is not a member of the group")
+ .go
+ }
+
+ it("fails when unauthenticated for an existing group") {
+ xq("""grp:delete("grouptests")""")
+ .assertHttpUnauthorized
+ .go
+ }
+
+ it("fails when unauthenticated for a non existing group") {
+ xq("""grp:delete("doesnotexist")""")
+ .assertHttpUnauthorized
+ .go
+ }
+
+ it("fails when the user requesting the deletion is not a manager") {
+ xq("""grp:delete("grouptests")""")
+ .user("testuser6")
+ .assertHttpForbidden
+ .go
+ }
+
+ it("fails for a nonexistent group") {
+ xq("""grp:delete("doesnotexist")""")
+ .user("xqtest1")
+ .assertHttpNotFound
+ .go
+ }
+ }
+
+}
\ No newline at end of file
diff --git a/opensiddur-extensions/src/test/scala/org/opensiddur/api/TestIndex.scala b/opensiddur-extensions/src/test/scala/org/opensiddur/api/TestIndex.scala
new file mode 100644
index 00000000..591d24f0
--- /dev/null
+++ b/opensiddur-extensions/src/test/scala/org/opensiddur/api/TestIndex.scala
@@ -0,0 +1,29 @@
+package org.opensiddur.api
+
+import org.opensiddur.DbTest
+
+class TestIndex extends DbTest {
+ override val prolog: String =
+ """xquery version '3.1';
+
+import module namespace index="http://jewishliturgy.org/api/index"
+ at "xmldb:exist:/db/apps/opensiddur-server/api/index.xqm";
+
+import module namespace tcommon="http://jewishliturgy.org/test/tcommon"
+ at "xmldb:exist:/db/apps/opensiddur-server/test/tcommon.xqm";
+
+declare namespace html="http://www.w3.org/1999/xhtml";
+declare namespace http="http://expath.org/ns/http-client";
+declare namespace rest="http://exquery.org/ns/restxq";
+declare namespace output="http://www.w3.org/2010/xslt-xquery-serialization";
+declare namespace o="http://a9.com/-/spec/opensearch/1.1/";
+ """
+
+ describe("index:list") {
+ it("returns a discovery API") {
+ xq("""index:list()""")
+ .assertDiscoveryApi
+ .go
+ }
+ }
+}
diff --git a/opensiddur-extensions/src/test/scala/org/opensiddur/api/TestJobs.scala b/opensiddur-extensions/src/test/scala/org/opensiddur/api/TestJobs.scala
new file mode 100644
index 00000000..45cc5db9
--- /dev/null
+++ b/opensiddur-extensions/src/test/scala/org/opensiddur/api/TestJobs.scala
@@ -0,0 +1,183 @@
+package org.opensiddur.api
+
+import org.opensiddur.DbTest
+
+class BaseTestJobs extends DbTest {
+ /** imports, namespaces and variables */
+ override val prolog: String =
+ """xquery version '3.1';
+
+import module namespace tcommon="http://jewishliturgy.org/test/tcommon"
+ at "xmldb:exist:/db/apps/opensiddur-server/test/tcommon.xqm";
+import module namespace job="http://jewishliturgy.org/api/jobs"
+ at "xmldb:exist:///db/apps/opensiddur-server/api/jobs.xqm";
+
+declare namespace html="http://www.w3.org/1999/xhtml";
+declare namespace tei="http://www.tei-c.org/ns/1.0";
+declare namespace j="http://jewishliturgy.org/ns/jlptei/1.0";
+declare namespace jx="http://jewishliturgy.org/ns/jlp-processor";
+declare namespace status="http://jewishliturgy.org/modules/status";
+declare namespace http="http://expath.org/ns/http-client";
+ """
+
+ override def beforeAll: Unit = {
+ super.beforeAll
+
+ setupUsers(2)
+ }
+
+ override def afterAll(): Unit = {
+ teardownUsers(2)
+
+ super.afterAll()
+ }
+
+}
+
+class TestJobGet extends BaseTestJobs {
+ override def beforeAll: Unit = {
+ super.beforeAll
+
+ store("""
+ |
+ | """.stripMargin, "/db/cache/status", "1000-2000.status.xml",
+ firstParamIsContent = true)
+ }
+
+ override def afterAll(): Unit = {
+ remove("/db/cache/status", "1000-2000.status.xml")
+
+ super.afterAll()
+ }
+
+ describe("job:get-job()") {
+ it("gets an existing job") {
+ xq("""job:get-job("1000-2000")""")
+ .user("xqtest1")
+ .assertXPath("""$output//status:job[@user="xqtest2"][@resource="/api/data/original/Test"]""", "returns a status document")
+ .go
+ }
+
+ it("gets an nonexistent job") {
+ xq("""job:get-job("1000-3000")""")
+ .user("xqtest1")
+ .assertHttpNotFound
+ .go
+ }
+ }
+}
+
+class TestJobList extends BaseTestJobs {
+ override def beforeAll: Unit = {
+ super.beforeAll
+
+ store("""""".stripMargin, "/db/cache/status", "1000-1000.status.xml",
+ firstParamIsContent = true)
+ store("""""".stripMargin, "/db/cache/status", "1000-2000.status.xml",
+ firstParamIsContent = true)
+ store("""""".stripMargin, "/db/cache/status", "1000-3000.status.xml",
+ firstParamIsContent = true)
+ store("""""".stripMargin, "/db/cache/status", "1000-4000.status.xml",
+ firstParamIsContent = true)
+ store("""""".stripMargin, "/db/cache/status", "1000-5000.status.xml",
+ firstParamIsContent = true)
+ }
+
+ override def afterAll(): Unit = {
+ remove("/db/cache/status", "1000-1000.status.xml")
+ remove("/db/cache/status", "1000-2000.status.xml")
+ remove("/db/cache/status", "1000-3000.status.xml")
+ remove("/db/cache/status", "1000-4000.status.xml")
+ remove("/db/cache/status", "1000-5000.status.xml")
+
+ super.afterAll()
+ }
+
+ describe("job:list") {
+ it("returns all jobs") {
+ xq("""job:list((), (), (), (), 1, 100)[2]""")
+ .user("xqtest1")
+ .assertXPath("""exists($output/self::html:html[descendant::html:ul[@class="results"]])""", "an HTML API results document is returned")
+ .assertXPath("""count($output//html:li[@class="result"]) >= 5""", "at least 5 results are returned")
+ .assertXPath("""count($output//html:li[@class="result"]) <= 100""", "at most max-results are returned")
+ .assertXPath("""$output//html:li[@class="result"][1]/html:span[@class="started"]/string() > $output//html:li[@class="result"][2]/html:span[@class="started"]/string()""", "results are returned in descending order of start time")
+ .go
+ }
+
+ it("returns an error for a nonexistent type") {
+ xq("""job:list("typo", "xqtest1", (), (), 1, 100)[2]""")
+ .user("xqtest1")
+ .assertXPath("""exists($output/self::error)""")
+ .go
+ }
+
+ it("returns all jobs belonging to a given user") {
+ xq("""job:list("xqtest2", (), (), (), 1, 100)""")
+ .user("xqtest1")
+ .assertXPath("""count($output//html:li[@class="result"])=5""", "5 results are returned")
+ .assertXPath("""every $result in $output//html:li[@class="result"] satisfies matches($result/html:a/@href, "^/api/jobs/\d+-\d+$")""", "every result returns a pointer to an API")
+ .assertXPath("""every $result in $output//html:li[@class="result"] satisfies $result/html:span[@class="user"]="xqtest2" """, "every result returns a user name")
+ .assertXPath("""every $result in $output//html:li[@class="result"] satisfies $result/html:span[@class="state"]=("complete", "failed", "working")""", "every result returns a state")
+ .assertXPath("""every $result in $output//html:li[@class="result"] satisfies matches($result/html:span[@class="started"], '\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(\.\d+)?[+\-]\d{2}:\d{2}')""", "every result returns a start time")
+ .assertXPath("""every $result in $output//html:li[@class="result"][html:span[@class="state"][not(.="working")]] satisfies matches($result/html:span[@class=("complete", "failed")], '\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(\.\d+)?[+\-]\d{2}:\d{2}')""", "every completed of failed result returns a complete/failed time")
+ .go
+ }
+
+ it("""returns all jobs belonging to a user in working state""") {
+ xq("""job:list("xqtest2", "working", (), (), 1, 100)""")
+ .user("xqtest1")
+ .assertXPath("""count($output//html:li[@class="result"])=1""", "1 result is returned")
+ .assertXPath("""$output//html:li[@class="result"]/html:span[@class="state"]= "working" """, "the result's state is 'working'")
+ .go
+ }
+
+ it("returns all jobs belonging to a user after a given date") {
+ xq("""job:list("xqtest2", (), "1900-01-02", (), 1, 100)""")
+ .user("xqtest1")
+ .assertXPath("""count($output//html:li[@class="result"])=4""", "4 results are returned")
+ .assertXPath("""every $result in $output//html:li[@class="result"]/html:span[@class="started"] satisfies $result >= "1900-01-02" """, "every result's start date is after $from")
+ .go
+ }
+
+ it("returns all jobs belonging to a user before a given date") {
+ xq("""job:list("xqtest2", (), (), "1900-01-04", 1, 100)""")
+ .user("xqtest1")
+ .assertXPath("""count($output//html:li[@class="result"])=3""", "3 results are returned")
+ .assertXPath("""every $result in $output//html:li[@class="result"]/html:span[@class="started"] satisfies $result <= "1900-01-04" """, "every result's start date is before $to")
+ .go
+ }
+ }
+}
diff --git a/opensiddur-extensions/src/test/scala/org/opensiddur/api/TestLogin.scala b/opensiddur-extensions/src/test/scala/org/opensiddur/api/TestLogin.scala
new file mode 100644
index 00000000..09360695
--- /dev/null
+++ b/opensiddur-extensions/src/test/scala/org/opensiddur/api/TestLogin.scala
@@ -0,0 +1,252 @@
+package org.opensiddur.api
+
+import org.opensiddur.DbTest
+
+class BaseTestLogin extends DbTest {
+ /** imports, namespaces and variables */
+ override val prolog: String =
+ """xquery version '3.1';
+
+import module namespace login="http://jewishliturgy.org/api/login"
+ at "xmldb:exist:///db/apps/opensiddur-server/api/login.xqm";
+import module namespace app="http://jewishliturgy.org/modules/app"
+ at "xmldb:exist:///db/apps/opensiddur-server/modules/app.xqm";
+import module namespace tcommon="http://jewishliturgy.org/test/tcommon"
+ at "xmldb:exist:///db/apps/opensiddur-server/test/tcommon.xqm";
+
+declare namespace html="http://www.w3.org/1999/xhtml";
+declare namespace tei="http://www.tei-c.org/ns/1.0";
+declare namespace j="http://jewishliturgy.org/ns/jlptei/1.0";
+declare namespace jx="http://jewishliturgy.org/ns/jlp-processor";
+declare namespace output="http://www.w3.org/2010/xslt-xquery-serialization";
+declare namespace http = 'http://expath.org/ns/http-client';
+
+"""
+
+ override def beforeAll: Unit = {
+ super.beforeAll
+
+ setupUsers(1)
+ }
+
+ override def afterAll(): Unit = {
+ teardownUsers(1)
+
+ super.afterAll()
+ }
+}
+
+class TestLogin extends BaseTestLogin {
+
+ describe("login:get-xml()") {
+ it("returns an empty login element when not logged in") {
+ xq("""login:get-xml()""")
+ .assertXmlEquals("""""")
+ .go
+ }
+
+ it("returns the name of the logged in user when logged in") {
+ xq("""login:get-xml()""")
+ .user("xqtest1")
+ .assertXmlEquals("""xqtest1""")
+ .go
+ }
+ }
+
+ describe("login:get-html()") {
+ it("returns an empty login name when not logged in") {
+ xq("""login:get-html((), (), ())""")
+ .assertSerializesAs("xhtml")
+ .assertXPath("""$output//html:div[@class='result'][count(*) = 0]""", "empty login name")
+ .go
+ }
+
+ it("returns a record for the logged in user when logged in") {
+ xq("""login:get-html((), (), ())""")
+ .user("xqtest1")
+ .assertSerializesAs("xhtml")
+ .assertXPath("""$output//html:div[@class='result'] = 'xqtest1' """, "empty login name")
+ .go
+ }
+ }
+}
+
+class TestLoginPost extends BaseTestLogin {
+ override def beforeEach: Unit = {
+ super.beforeEach()
+
+ xq("""if (session:exists()) then (
+ session:create(),
+ session:clear(),
+ let $null := xmldb:login("/db", "guest", "guest")
+ return ()) else ()""")
+ .go
+ }
+
+ override def afterEach: Unit = {
+ xq("""session:invalidate()""")
+ .go
+
+ super.afterEach()
+ }
+
+ describe("login:post-xml()") {
+ it("starts a session when given a user and password") {
+ xq("""login:post-xml(document{
+
+ xqtest1
+ xqtest1
+
+ }, ())""")
+ .assertHttpNoData
+ .assertXPath("""if (session:exists()) then app:auth-user()="xqtest1" else true() """, "user is set")
+ .assertXPath("""if (session:exists()) then app:auth-password()="xqtest1" else true()""", "password is set")
+ .go
+ }
+
+ it("fails with valid user and invalid password") {
+ xq("""login:post-xml(document{
+
+ xqtest1
+ badpassword
+
+ }, ())""")
+ .assertHttpBadRequest
+ .assertXPath("""empty(app:auth-user())""", "user is not set")
+ .assertXPath("""empty(app:auth-password())""", "password is not set")
+ .go
+ }
+
+ it("fails with an invalid user") {
+ xq("""login:post-xml(document{
+
+ baduser
+ badpassword
+
+ }, ())""")
+ .assertHttpBadRequest
+ .assertXPath("""empty(app:auth-user())""", "user is not set")
+ .assertXPath("""empty(app:auth-password())""", "password is not set")
+ .go
+ }
+
+ it("fails when no user is given") {
+ xq("""login:post-xml(document{
+
+ badpassword
+
+ }, ())""")
+ .assertHttpBadRequest
+ .assertXPath("""empty(app:auth-user())""", "user is not set")
+ .assertXPath("""empty(app:auth-password())""", "password is not set")
+ .go
+ }
+
+ it("fails when no password is given") {
+ xq("""login:post-xml(document{
+
+ xqtest1
+
+ }, ())""")
+ .assertHttpBadRequest
+ .assertXPath("""empty(app:auth-user())""", "user is not set")
+ .assertXPath("""empty(app:auth-password())""", "password is not set")
+ .go
+ }
+ }
+
+ describe("login:post-form()") {
+ it("logs in with valid user and password") {
+ xq("""login:post-form("xqtest1", "xqtest1", ())""")
+ .assertHttpNoData
+ .assertXPath("""if (session:exists()) then app:auth-user()="xqtest1" else true() """, "user is set")
+ .assertXPath("""if (session:exists()) then app:auth-password()="xqtest1" else true()""", "password is set")
+ .go
+ }
+
+ it("fails with valid user and invalid password") {
+ xq("""login:post-form("xqtest1", "badpassword", ())""")
+ .assertHttpBadRequest
+ .assertXPath("""empty(app:auth-user())""", "user is not set")
+ .assertXPath("""empty(app:auth-password())""", "password is not set")
+ .go
+ }
+
+ it("fails with invalid user") {
+ xq("""login:post-form("baduser", "xqtest1", ())""")
+ .assertHttpBadRequest
+ .assertXPath("""empty(app:auth-user())""", "user is not set")
+ .assertXPath("""empty(app:auth-password())""", "password is not set")
+ .go
+ }
+
+ it("fails with missing user") {
+ xq("""login:post-form((), "xqtest1", ())""")
+ .assertHttpBadRequest
+ .assertXPath("""empty(app:auth-user())""", "user is not set")
+ .assertXPath("""empty(app:auth-password())""", "password is not set")
+ .go
+ }
+
+ it("fails with missing password") {
+ xq("""login:post-form("xqtest1", (), ())""")
+ .assertHttpBadRequest
+ .assertXPath("""empty(app:auth-user())""", "user is not set")
+ .assertXPath("""empty(app:auth-password())""", "password is not set")
+ .go
+ }
+ }
+}
+
+class TestLogout extends BaseTestLogin {
+ override def beforeEach(): Unit = {
+ super.beforeEach()
+
+ xq("""if (session:exists()) then (
+ session:create(),
+ session:clear(),
+ let $null := xmldb:login("/db","xqtest1","xqtest1")
+ return app:login-credentials("xqtest1", "xqtest1")
+ ) else ()""")
+ .go
+ }
+
+ override def afterEach(): Unit = {
+ xq("""if (session:exists())
+ then session:invalidate()
+ else ()""")
+ .go
+
+ super.afterEach()
+ }
+
+ describe("login:delete()") {
+ it("logs out a user") {
+ xq("""login:delete()""")
+ .assertHttpNoData
+ .assertXPath("""empty(app:auth-user())""", "user is not set")
+ .assertXPath("""empty(app:auth-password())""", "password is not set")
+ .go
+ }
+ }
+
+ describe("login:get-logout()") {
+ it("logs out a user") {
+ xq("""login:get-logout()""")
+ .assertHttpNoData
+ .assertXPath("""empty(app:auth-user())""", "user is not set")
+ .assertXPath("""empty(app:auth-password())""", "password is not set")
+ .go
+ }
+ }
+
+ describe("login:post-logout()") {
+ it("logs out a user") {
+ xq("""login:post-logout()""")
+ .assertHttpNoData
+ .assertXPath("""empty(app:auth-user())""", "user is not set")
+ .assertXPath("""empty(app:auth-password())""", "password is not set")
+ .go
+ }
+ }
+}
diff --git a/opensiddur-extensions/src/test/scala/org/opensiddur/api/TestUser.scala b/opensiddur-extensions/src/test/scala/org/opensiddur/api/TestUser.scala
new file mode 100644
index 00000000..928eadd9
--- /dev/null
+++ b/opensiddur-extensions/src/test/scala/org/opensiddur/api/TestUser.scala
@@ -0,0 +1,526 @@
+package org.opensiddur.api
+
+import org.opensiddur.DbTest
+
+trait CommonTestUser {
+ val prolog =
+ """xquery version '3.1';
+ import module namespace tcommon="http://jewishliturgy.org/test/tcommon"
+ at "xmldb:exist:/db/apps/opensiddur-server/test/tcommon.xqm";
+
+ import module namespace ridx="http://jewishliturgy.org/modules/refindex"
+ at "xmldb:exist:///db/apps/opensiddur-server/modules/refindex.xqm";
+ import module namespace user="http://jewishliturgy.org/api/user"
+ at "xmldb:exist:///db/apps/opensiddur-server/api/user.xqm";
+ import module namespace magic="http://jewishliturgy.org/magic"
+ at "xmldb:exist:///db/apps/opensiddur-server/magic/magic.xqm";
+
+ declare namespace html="http://www.w3.org/1999/xhtml";
+ declare namespace tei="http://www.tei-c.org/ns/1.0";
+ declare namespace j="http://jewishliturgy.org/ns/jlptei/1.0";
+ declare namespace jx="http://jewishliturgy.org/ns/jlp-processor";
+ declare namespace http="http://expath.org/ns/http-client";
+ declare namespace output="http://www.w3.org/2010/xslt-xquery-serialization";
+
+ """
+}
+
+class TestUser extends DbTest with CommonTestUser {
+ override def beforeAll() {
+ super.beforeAll()
+
+ setupUsers(4)
+ setupResource("src/test/resources/api/user/xqtest2.xml", "xqtest2", "user", 2,
+ None, Some("xqtest2"), Some("rw-r--r--"))
+ setupResource("src/test/resources/api/user/xqtest3.xml", "xqtest3", "user", 3,
+ None, Some("everyone"), Some("rw-rw-r--"))
+ setupResource("src/test/resources/api/user/xqtest4.xml", "xqtest4", "user", 4,
+ None, Some("everyone"), Some("rw-r--r--"))
+ setupResource("src/test/resources/api/user/xqtest5.xml", "xqtest5", "user", 1,
+ None, Some("everyone"), Some("rw-r--r--"))
+ }
+
+ override def afterAll() {
+ // tear down users that were created by tests
+ teardownResource("xqtest1", "user", 1)
+ teardownResource("xqtest2", "user", 2)
+ teardownResource("xqtest3", "user", -1) // password gets changed
+ teardownResource("xqtest4", "user", 4)
+ teardownResource("xqtest5", "user", 1)
+ teardownResource("not_a_real_contributors_profile", "user", 1)
+
+ teardownUsers(6)
+
+ super.afterAll()
+ }
+
+ override def beforeEach(): Unit = {
+ super.beforeEach()
+ }
+
+ override def afterEach(): Unit = {
+ super.afterEach()
+ }
+
+ describe("user:list") {
+ it("lists users") {
+ xq("""user:list("", 1, 100)""")
+ .assertSearchResults
+ .assertXPath("""count($output//html:*[@class="result"])>=4""", "returns at least 4 results")
+ .assertXPath(
+ """
+ exists($output//html:li[@class="result"]/html:a[@class="document"]) and (
+ every $d in $output//html:li[@class="result"]/html:a[@class="document"]
+ satisfies exists($d/following-sibling::html:a[@class="alt"][@property="groups"])
+ )""", "groups view is presented as an alternate")
+ .assertXPath(
+ """
+ exists($output//html:li[@class="result"]/html:a[@class="document"]) and (
+ every $d in $output//html:li[@class="result"]/html:a[@class="document"]
+ satisfies exists($d/following-sibling::html:a[@class="alt"][@property="access"])
+ )""", "access view is presented as an alternate")
+ .assertXPath(
+ """
+ exists($output//html:li[@class="result"]/html:a[@class="document"]) and (
+ every $d in $output//html:li[@class="result"]/html:a[@class="document"]
+ satisfies exists($d/following-sibling::html:a[@class="alt"][starts-with(@property, "validation")])
+ )""", "validation view is presented as an alternate")
+ .go
+ }
+
+ it("queries users") {
+ xq("""user:list("spike", 1, 100)""")
+ .assertSearchResults
+ .assertXPath("""count($output//html:*[@class="result"])>=2""", "returns at least 2 results")
+ .go
+ }
+ }
+
+ describe("user:get") {
+ it("gets an existing user profile while authenticated") {
+ xq("""user:get("xqtest4")/*""")
+ .user("xqtest1")
+ .assertXmlEquals("""
+ xqtest4
+ """)
+ .go
+ }
+
+ it("returns 404 for a non-existing user profile (authenticated)") {
+ xq("""user:get("doesnotexist")""")
+ .user("xqtest1")
+ .assertHttpNotFound
+ .go
+ }
+
+ it("gets an existing user profile while unauthenticated") {
+ xq("""user:get("xqtest4")/*""")
+ .assertXmlEquals("""
+ xqtest4
+ """)
+ .go
+ }
+
+ it("returns 404 for a non-existing user profile (unauthenticated)") {
+ xq("""user:get("doesnotexist")""")
+ .assertHttpNotFound
+ .go
+ }
+ }
+
+ describe("user:post-xml (unauthenticated)") {
+ it("creates a new user") {
+ xq(
+ """user:post-xml(document {
+
+ xqtest6
+ xqtest6
+
+ })""")
+ .assertHttpCreated
+ .assertXPath("""system:as-user("admin", $magic:password, sm:user-exists("xqtest6"))""", "user has been created")
+ .assertXPath("""system:as-user("admin", $magic:password, sm:group-exists("xqtest6"))""", "group has been created")
+ .assertXPath("""system:as-user("admin", $magic:password, sm:get-group-managers("xqtest6")="xqtest6")""", "user is a manager of its own group")
+ .assertXPath("""doc-available("/db/data/user/xqtest6.xml")""", "profile has been created")
+ .assertXPath("""doc("/db/data/user/xqtest6.xml")/j:contributor/tei:idno="xqtest6"""", "profile contains an idno equal to the user name")
+ .assertXPath(
+ """
+ doc-available("/db/data/user/xqtest6.xml") and
+ sm:get-permissions(xs:anyURI("/db/data/user/xqtest6.xml"))/*/(
+ @owner = "xqtest6" and @group="xqtest6" and @mode="rw-r--r--"
+ )""", "user profile permissions are correct")
+ .go
+ }
+
+ it("fails to create a new user with a blank username") {
+ xq("""user:post-xml(document {
+
+ testuser3
+
+ })""")
+ .assertHttpBadRequest
+ .go
+ }
+
+ it("fails to create a new user with a blank password") {
+ xq("""user:post-xml(document {
+
+ testuser4
+
+
+ })""")
+ .assertHttpBadRequest
+ .go
+ }
+
+ it("fails to create a new user with a username containing an illegal character") {
+ xq("""user:post-xml(document {
+
+ test,user3
+ testuser3
+
+ })""")
+ .assertHttpBadRequest
+ .go
+ }
+
+ it("fails to create a new user that already exists") {
+ xq("""user:post-xml(document {
+
+ xqtest1
+ xxxxxx
+
+ })""")
+ .assertHttpUnauthorized
+ .go
+ }
+
+ it("fails to create a new user when the profile exists, even when the user does not") {
+ xq("""user:post-xml(document {
+
+ xqtest5
+ xxxxxx
+
+ })""")
+ .assertHttpForbidden
+ .go
+ }
+ }
+
+ describe("user:post-xml (authenticated)") {
+ it("changes a password") {
+ xq("""
+ user:post-xml(document {
+
+ xqtest3
+ xqtest3newpassword
+
+ })
+ """)
+ .user("xqtest3")
+ .assertHttpNoData
+ .assertXPath("""xmldb:authenticate("/db", "xqtest3", "xqtest3newpassword")""", "password is changed")
+ .go
+ }
+
+ it("fails to change the password for another user") {
+ xq("""user:post-xml(document {
+
+ xqtest3
+ xqtest3password
+
+ })""")
+ .user("xqtest4")
+ .assertHttpForbidden
+ .go
+ }
+
+ it("fails to change the password for a missing username") {
+ xq("""user:post-xml(document {
+
+ xqtest4new
+
+ })""")
+ .user("xqtest4")
+ .assertHttpBadRequest
+ .go
+ }
+
+ it("fails to change the password for a missing password") {
+ xq("""user:post-xml(document {
+
+ xqtest4
+
+ })""")
+ .user("xqtest4")
+ .assertHttpBadRequest
+ .go
+ }
+
+ it("fails to change a username") {
+ xq("""user:post-xml(document {
+
+ xqtest400
+ xqtest4
+
+ })""")
+ .user("xqtest4")
+ .assertHttpForbidden
+ .go
+ }
+ }
+
+ describe("user:put (authenticated)") {
+ it("allows editing a user's own profile") {
+ xq(
+ """user:put("xqtest2", document {
+
+ xqtest2
+ Test User
+
+ })""")
+ .user("xqtest2")
+ .assertHttpNoData
+ .assertXPath("""doc("/db/data/user/xqtest2.xml")/j:contributor/tei:name="Test User"""", "profile is edited")
+ .go
+ }
+
+ it("validates a user's profile") {
+ xq(
+ """user:put("xqtest2", document {
+
+ xqtest2
+ Test User
+
+ }, "true")""")
+ .user("xqtest2")
+ .assertXPath("""$output/self::report/status = 'valid' """)
+ .go
+ }
+
+ it("refuses to change idno in a user's own profile") {
+ xq(
+ """user:put("xqtest2", document {
+
+ notxqtest2
+ Test User
+
+ })""")
+ .user("xqtest2")
+ .assertHttpBadRequest
+ .go
+ }
+
+ it("fails on invalid contributor data") {
+ xq(
+ """user:put("xqtest2", document {
+
+ xqtest2
+
+
+ })""")
+ .user("xqtest2")
+ .assertHttpBadRequest
+ .go
+ }
+
+ it("invalidates invalid contributor data") {
+ xq(
+ """user:put("xqtest2", document {
+
+ xqtest2
+
+
+ }, "true")""")
+ .user("xqtest2")
+ .assertXPath("""$output/self::report/status = 'invalid' """)
+ .go
+ }
+
+ it("fails to edit another user's profile") {
+ xq(
+ """user:put("xqtest1", document {
+
+ xqtest1
+ Not Xq Test 1
+
+ })""")
+ .user("xqtest2")
+ .assertHttpForbidden
+ .go
+ }
+
+ it("creates a non-user profile") {
+ xq(
+ """user:put("not_a_real_contributors_profile", document {
+
+ not_a_real_contributors_profile
+ Not Real
+
+ })""")
+ .user("xqtest1")
+ .assertHttpCreated
+ .assertXPath("""doc-available("/db/data/user/not_a_real_contributors_profile.xml")""", "profile created")
+ .assertXPath("""sm:get-permissions(xs:anyURI("/db/data/user/not_a_real_contributors_profile.xml"))/*/(
+ @owner="xqtest1" and @group="everyone" and @mode="rw-rw-r--"
+ )""", "profile mode is correct")
+ .go
+ }
+
+ it("validates a non-user profile") {
+ xq(
+ """user:put("still_not_a_real_contributors_profile", document {
+
+ still_not_a_real_contributors_profile
+ Not Real
+
+ }, "true")""")
+ .user("xqtest1")
+ .assertXPath("""$output/self::report/status = 'valid' """)
+ .go
+ }
+
+ it("edits a non-user profile") {
+ xq("""user:put("xqtest5", document {
+
+ xqtest5
+ Not A User
+
+ })""")
+ .user("xqtest1")
+ .assertHttpNoData
+ .assertXPath("""doc("/db/data/user/xqtest5.xml")/j:contributor/tei:name="Not A User"""", "profile edited")
+ .assertXPath("""sm:get-permissions(xs:anyURI("/db/data/user/xqtest5.xml"))/*/(
+ @owner="xqtest1" and @group="everyone" and @mode="rw-rw-r--"
+ )""", "profile mode is correct")
+ .go
+ }
+ }
+
+ describe("user:put (unauthenticated)") {
+ it("fails to edit a user profile") {
+ xq(
+ """user:put("xqtest2", document {
+
+ xqtest2
+ Test User
+
+ })""")
+ .assertHttpUnauthorized
+ .go
+ }
+
+ it("fails to edit a non-user profile") {
+ xq(
+ """user:put("xqtest5", document {
+
+ xqtest5
+ Is not a user
+
+ })""")
+ .assertHttpUnauthorized
+ .go
+ }
+
+ it("fails to create a non-user profile") {
+ xq(
+ """user:put("there_is_no_user_with_that_name", document {
+
+ there_is_no_user_with_that_name
+ Not Real
+
+ })""")
+ .assertHttpUnauthorized
+ .go
+ }
+ }
+
+ describe("user:delete (not authenticated)") {
+ it("fails to delete a user") {
+ xq("""user:delete("xqtest1")""")
+ .assertHttpUnauthorized
+ .go
+ }
+
+ it("fails to delete a non-user profile") {
+ xq("""user:delete("xqtest5")""")
+ .assertHttpUnauthorized
+ .go
+ }
+
+ it("fails to delete a non-existent profile") {
+ xq("""user:delete("doesnotexist")""")
+ .assertHttpNotFound
+ .go
+ }
+ }
+}
+
+class TestUserDelete extends DbTest with CommonTestUser {
+
+ override def beforeEach(): Unit = {
+ super.beforeEach()
+
+ setupUsers(3)
+ setupResource("src/test/resources/api/user/xqtest7.xml", "xqtest7", "user", 1,
+ None, Some("everyone"), Some("rw-rw-r--"))
+ setupResource("src/test/resources/api/user/Reference.xml", "Reference", "original", 1,
+ Some("en"), Some("everyone"), Some("rw-rw-r--"))
+ }
+
+ override def afterEach(): Unit = {
+ super.afterEach()
+
+ teardownResource("Reference", "original", 1)
+ teardownResource("xqtest7", "user", 1)
+ teardownUsers(3)
+ }
+
+ describe("user:delete (authenticated)") {
+ it("can delete a user's own profile") {
+ xq("""user:delete("xqtest2")""")
+ .user("xqtest2")
+ .assertHttpNoData
+ .assertXPath("""system:as-user("admin", $magic:password, not(sm:user-exists("xqtest2")))""", "user removed")
+ .assertXPath("""system:as-user("admin", $magic:password, not(sm:list-groups()="xqtest2"))""", "group removed")
+ .assertXPath("""not(doc-available("/db/data/user/xqtest2.xml"))""", "profile removed")
+ .go
+ }
+
+ it("fails to delete another user") {
+ xq("""user:delete("xqtest2")""")
+ .user("xqtest1")
+ .assertHttpForbidden
+ .go
+ }
+
+ it("fails to delete a non-existent profile") {
+ xq("""user:delete("doesnotexist")""")
+ .user("xqtest1")
+ .assertHttpNotFound
+ .go
+ }
+
+ it("successfully deletes a non-user profile") {
+ xq("""user:delete("xqtest7")""")
+ .user("xqtest1")
+ .assertHttpNoData
+ .assertXPath("""not(doc-available("/db/data/user/xqtest7.xml"))""", "profile removed")
+ .go
+ }
+
+ it("deletes a user, deprecates a profile, and returns references when the user has references") {
+ xq("""user:delete("xqtest3")""")
+ .user("xqtest3")
+ .assertXPath("""$output/self::rest:response/http:response/@status = 200""", "status code is 200")
+ .assertXPath("""ends-with($output/self::info//documents/document, "/api/data/original/Reference")""", "returns an info element with the referenced document")
+ .assertXPath("""system:as-user("admin", $magic:password, not(sm:user-exists("xqtest3")))""", "user account removed")
+ .assertXPath("""system:as-user("admin", $magic:password, not(sm:list-groups()="xqtest3"))""", "group removed")
+ .assertXPath("""exists(doc("/db/data/user/xqtest3.xml")/j:contributor[tei:idno="xqtest3"][tei:name="Deleted user"])""", "profile changed to anonymous profile")
+ .assertXPath("""system:as-user("admin", $magic:password, sm:get-permissions(xs:anyURI("/db/data/user/xqtest3.xml")))/*/@owner="admin"""", "profile owned by admin")
+ .assertXPath("""system:as-user("admin", $magic:password, sm:get-permissions(xs:anyURI("/db/data/user/xqtest3.xml")))/*/@group="everyone"""", "profile owned by group everyone")
+ .assertXPath("""system:as-user("admin", $magic:password, sm:get-permissions(xs:anyURI("/db/data/user/xqtest3.xml")))/*/@mode="rw-rw-r--"""", "profile permissions are 664")
+ .go
+ }
+ }
+}
\ No newline at end of file
diff --git a/opensiddur-extensions/src/test/scala/org/opensiddur/api/data/TestConditionals.scala b/opensiddur-extensions/src/test/scala/org/opensiddur/api/data/TestConditionals.scala
new file mode 100644
index 00000000..8b92b70c
--- /dev/null
+++ b/opensiddur-extensions/src/test/scala/org/opensiddur/api/data/TestConditionals.scala
@@ -0,0 +1,516 @@
+package org.opensiddur.api.data
+
+import org.opensiddur.DbTest
+
+trait CommonTestConditionals {
+ val prolog =
+ """xquery version '3.1';
+ import module namespace tcommon="http://jewishliturgy.org/test/tcommon"
+ at "xmldb:exist:/db/apps/opensiddur-server/test/tcommon.xqm";
+
+ import module namespace cnd="http://jewishliturgy.org/api/data/conditionals"
+ at "xmldb:exist:///db/apps/opensiddur-server/api/data/conditionals.xqm";
+ import module namespace magic="http://jewishliturgy.org/magic"
+ at "xmldb:exist:///db/apps/opensiddur-server/magic/magic.xqm";
+
+ declare namespace html="http://www.w3.org/1999/xhtml";
+ declare namespace tei="http://www.tei-c.org/ns/1.0";
+ declare namespace j="http://jewishliturgy.org/ns/jlptei/1.0";
+ declare namespace http="http://expath.org/ns/http-client";
+ declare namespace output="http://www.w3.org/2010/xslt-xquery-serialization";
+ declare namespace a="http://jewishliturgy.org/ns/access/1.0";
+ declare namespace r="http://jewishliturgy.org/ns/results/1.0";
+ """
+}
+
+class TestConditionals extends DbTest with CommonTestConditionals {
+ override def beforeAll() {
+ super.beforeAll()
+
+ setupUsers(2)
+ setupResource("src/test/resources/api/data/conditionals/existing.xml", "existing", "conditionals", 1)
+ setupResource("src/test/resources/api/data/conditionals/existing.xml", "no_access", "conditionals", 2,
+ None, Some("everyone"), Some("rw-------"))
+ setupResource("src/test/resources/api/data/conditionals/type1.xml", "type1", "conditionals", 1)
+ setupResource("src/test/resources/api/data/conditionals/type2.xml", "type2", "conditionals", 1)
+ setupResource("src/test/resources/api/data/conditionals/xtype1x.xml", "xtype1x", "conditionals", 1)
+ }
+
+ override def afterAll() {
+ teardownResource("type1", "conditionals", 1)
+ teardownResource("type2", "conditionals", 1)
+ teardownResource("xtype1x", "conditionals", 1)
+ teardownResource("no_access", "conditionals", 2)
+ teardownResource("existing", "conditionals", 1)
+ teardownResource("valid", "conditionals", 1)
+ teardownUsers(2)
+
+ super.afterAll()
+ }
+
+ override def beforeEach(): Unit = {
+ super.beforeEach()
+ }
+
+ override def afterEach(): Unit = {
+ super.afterEach()
+ }
+
+ describe("cnd:get") {
+ it("gets an existing resource") {
+ xq("""cnd:get("existing")""")
+ .assertXPath("""exists($output/tei:TEI)""", "Returns a TEI resource")
+ .go
+ }
+
+ it("fails to get a nonexisting resource") {
+ xq("""cnd:get("does_not_exist")""")
+ .assertHttpNotFound
+ .go
+ }
+
+ it("fails to get a resource with no read access") {
+ xq("""cnd:get("no_access")""")
+ .assertHttpNotFound
+ .go
+ }
+ }
+
+ describe("cnd:list") {
+ it("lists all resources") {
+ xq("""cnd:list("", 1, 100)""")
+ .user("xqtest1")
+ .assertSearchResults
+ .assertXPath("""count($output//html:li[@class="result"])>=1""", "returns at least 1 result")
+ .assertXPath("""
+ exists($output//html:li[@class="result"]) and (
+ every $li in $output//html:li[@class="result"]
+ satisfies empty($li/html:a[@class="alt"][@property="access"])
+ )
+ """, "results do not include a pointer to access API")
+ .go
+ }
+
+ it("does not list resources with no access when unauthenticated") {
+ xq("""cnd:list("", 1, 100)""")
+ .assertSearchResults
+ .assertXPath("""count($output//html:li[@class="result"])>=1""", "returns at least 1 result")
+ .assertXPath("""empty($output//html:li[@class="result"]/html:a[@class="document"]/@href[contains(., "no_access")])""",
+ "does not list resource with no read access")
+ .go
+ }
+
+ it("lists some resources") {
+ xq("""cnd:list("", 1, 2)""")
+ .user("xqtest1")
+ .assertXPath("""count($output//html:li[@class="result"])=2""", "returns 2 results")
+ .assertSearchResults
+ .go
+ }
+
+ it("responds to a query") {
+ xq("""cnd:list("query", 1, 100)""")
+ .assertXPath("""count($output//html:ol[@class="results"]/html:li)=1""",
+ "returns 1 result (existing)")
+ .assertSearchResults
+ .go
+ }
+
+ it("searches for a feature type") {
+ xq("""cnd:list("type1", 1, 100, "true")""")
+ .assertXPathEquals("$output/self::r:conditional-results",
+ "two records are returned",
+ """
+
+
+ first type
+
+ First
+
+
+
+ Second
+
+
+
+
+
+
+ first type
+
+ First X
+
+
+
+ Second X
+
+
+
+
+ """)
+ .go
+ }
+
+ it("fails to return results when searching for something that does not exist") {
+ xq("""cnd:list("doesnotexist", 1, 100, "true")""")
+ .assertXPath("""$output/self::r:conditional-results[@start='1'][@end='0'][@n-results='0']""",
+ "an empty list is returned")
+ .go
+ }
+
+ it("returns a list of matched names when the name exists") {
+ xq("""cnd:list("name1", 1, 100, "true")""")
+ .assertXPathEquals("$output/self::r:conditional-results",
+ "two records are returned",
+ """
+
+
+ first type
+
+ First
+
+
+
+
+
+
+ second type
+
+ First of second
+
+
+
+
+
+
+ first type
+
+ First X
+
+
+
+
+ """)
+ .go
+ }
+
+ it("returns a list by match to feature name where the name exists, limit to 1 result") {
+ xq("""cnd:list("name1", 1, 1, "true")""")
+ .assertXPathEquals("$output/self::r:conditional-results",
+ "one record is returned",
+ """
+
+
+ first type
+
+ First
+
+
+
+
+ """)
+ .go
+ }
+
+ it("returns a list by inexact match to feature type where the type exists") {
+ xq("""cnd:list("type", 1, 100, "true")""")
+ .assertXPathEquals("$output/self::r:conditional-results",
+ "two records are returned",
+ """
+
+
+ first type
+
+ First
+
+
+
+ Second
+
+
+
+
+
+
+ second type
+
+ First of second
+
+
+
+ Second of second
+
+
+
+
+
+
+ first type
+
+ First X
+
+
+
+ Second X
+
+
+
+
+ """)
+ .go
+ }
+
+ it("returns a list by inexact match to feature name where the name exists") {
+ xq("""cnd:list("name1", 1, 100, "true")""")
+ .assertXPathEquals("$output/self::r:conditional-results",
+ "three records are returned",
+ """
+
+
+ first type
+
+ First
+
+
+
+
+
+
+ second type
+
+ First of second
+
+
+
+
+
+
+ first type
+
+ First X
+
+
+
+
+ """)
+ .go
+ }
+
+ it("returns a list by exact match feature type and name, where both exist") {
+ xq("""cnd:list("type1 name1", 1, 100, "true")""")
+ .assertXPathEquals("$output/self::r:conditional-results",
+ "records that match any of the terms are returned",
+ """
+
+
+ first type
+
+ First
+
+
+
+ Second
+
+
+
+
+
+
+ first type
+
+ First
+
+
+
+
+
+
+ second type
+
+ First of second
+
+
+
+
+
+
+ first type
+
+ First X
+
+
+
+ Second X
+
+
+
+
+
+
+ first type
+
+ First X
+
+
+
+
+ """)
+ .go
+ }
+
+ it("returns a list by exact match to feature type where the type exists") {
+ xq("""cnd:list("type1", 1, 100, "false", "true")""")
+ .assertXPathEquals("$output/self::r:conditional-results",
+ "one record is returned",
+ """
+
+
+ first type
+
+ First
+
+
+
+ Second
+
+
+
+
+ """)
+ .go
+ }
+
+ it("returns an empty list by exact match to feature type, where the type does not exist") {
+ xq("""cnd:list("typenotexists", 1, 100, "false", "true")""")
+ .assertXPathEquals("$output/self::r:conditional-results", "no records are returned",
+ """""")
+ .go
+ }
+ }
+
+ describe("cnd:post") {
+ val validDoc = readXmlFile("src/test/resources/api/data/conditionals/valid.xml")
+ val invalidDoc = readXmlFile("src/test/resources/api/data/conditionals/invalid.xml")
+ it("posts a valid resource") {
+ xq(s"""cnd:post(document { $validDoc })""")
+ .user("xqtest1")
+ .assertHttpCreated
+ .assertXPathEquals("collection('/db/data/conditionals')[util:document-name(.)=tokenize($output//http:header[@name='Location']/@value,'/')[last()] || '.xml']//tei:revisionDesc/tei:change[1]",
+ "a change record has been added",
+ """"""
+ )
+ .go
+ }
+
+ it("fails to post a valid resource unauthenticated") {
+ xq(s"""cnd:post(document { $validDoc })""")
+ .assertHttpUnauthorized
+ .go
+ }
+
+ it("fails to post an invalid resource") {
+ xq(s"""cnd:post(document { $invalidDoc })""")
+ .user("xqtest1")
+ .assertHttpBadRequest
+ .go
+ }
+ }
+
+ describe("cnd:put") {
+
+ it("puts a valid resource to an existing resource") {
+ val validDoc = readXmlFile("src/test/resources/api/data/conditionals/existing_after_put.xml")
+ xq(s"""cnd:put("existing", document { $validDoc })""")
+ .user("xqtest1")
+ .assertHttpNoData
+ .assertXPathEquals("""doc('/db/data/conditionals/existing.xml')//tei:revisionDesc/tei:change[1]""",
+ "a change record has been added",
+ """"""
+ )
+ .go
+ }
+
+ it("fails to put a resource when unauthenticated") {
+ val validDoc = readXmlFile("src/test/resources/api/data/conditionals/existing_after_put.xml")
+ xq(s"""cnd:put("existing", document { $validDoc })""")
+ .assertHttpUnauthorized
+ .go
+ }
+
+ it("fails to put a valid resource to a nonexisting resource") {
+ val validDoc = readXmlFile("src/test/resources/api/data/conditionals/valid.xml")
+ xq(s"""cnd:put("does_not_exist", document { $validDoc })""")
+ .user("xqtest1")
+ .assertHttpNotFound
+ .go
+ }
+
+ it("fails to put an invalid resource") {
+ val invalidDoc = readXmlFile("src/test/resources/api/data/conditionals/invalid.xml")
+ xq(s"""cnd:put("existing", document { $invalidDoc })""")
+ .user("xqtest1")
+ .assertHttpBadRequest
+ .go
+ }
+
+ }
+
+}
+
+class TestConditionalsDelete extends DbTest with CommonTestConditionals {
+
+ override def beforeEach(): Unit = {
+ super.beforeEach()
+
+ setupUsers(2)
+ setupResource("src/test/resources/api/data/conditionals/existing.xml", "existing", "conditionals", 1, None)
+ setupResource("src/test/resources/api/data/conditionals/existing.xml", "no_write_access", "conditionals", 2,
+ None, Some("everyone"), Some("rw-r--r--"))
+ }
+
+ override def afterEach(): Unit = {
+ super.afterEach()
+
+ teardownResource("existing", "conditionals", 1)
+ teardownResource("no_write_access", "conditionals", 2)
+ teardownUsers(2)
+ }
+
+ describe("cnd:delete") {
+ it("removes an existing resource") {
+ xq("""cnd:delete("existing")""")
+ .user("xqtest1")
+ .assertHttpNoData
+ .go
+ }
+
+ it("does not remove an existing resource when unauthenticated") {
+ xq("""cnd:delete("existing")""")
+ .assertHttpUnauthorized
+ .go
+ }
+
+ it("fails to remove a nonexisting resource") {
+ xq("""cnd:delete("does_not_exist")""")
+ .user("xqtest1")
+ .assertHttpNotFound
+ .go
+ }
+
+ it("fails to remove a resource without write access") {
+ xq("""cnd:delete("no_write_access")""")
+ .user("xqtest1")
+ .assertHttpForbidden
+ .go
+ }
+
+ ignore("fails to remove a resource that has external references") {
+ xq("""cnd:delete("external_reference")""")
+ .user("xqtest1")
+ .assertHttpBadRequest
+ .go
+ }
+ }
+}
\ No newline at end of file
diff --git a/opensiddur-extensions/src/test/scala/org/opensiddur/api/data/TestDataIndex.scala b/opensiddur-extensions/src/test/scala/org/opensiddur/api/data/TestDataIndex.scala
new file mode 100644
index 00000000..be3a45be
--- /dev/null
+++ b/opensiddur-extensions/src/test/scala/org/opensiddur/api/data/TestDataIndex.scala
@@ -0,0 +1,39 @@
+package org.opensiddur.api.data
+
+import org.opensiddur.DbTest
+
+class TestDataIndex extends DbTest {
+ override val prolog: String =
+ """xquery version '3.1';
+
+import module namespace dindex="http://jewishliturgy.org/api/data/index"
+ at "xmldb:exist:/db/apps/opensiddur-server/api/data/dindex.xqm";
+
+import module namespace tcommon="http://jewishliturgy.org/test/tcommon"
+ at "xmldb:exist:/db/apps/opensiddur-server/test/tcommon.xqm";
+
+declare namespace html="http://www.w3.org/1999/xhtml";
+declare namespace http="http://expath.org/ns/http-client";
+declare namespace rest="http://exquery.org/ns/restxq";
+declare namespace output="http://www.w3.org/2010/xslt-xquery-serialization";
+declare namespace o="http://a9.com/-/spec/opensearch/1.1/";
+ """
+
+ describe("dindex:list") {
+ it("returns a discovery API") {
+ xq("dindex:list()")
+ .assertDiscoveryApi
+ .assertXPath("""exists($output/self::html:html/html:body/*[@class="apis"]/html:li[@class="api"]/html:a[@class="alt"][@property="validation"])""", "has a validation API")
+ .assertSerializesAs(DbTest.HTML5_SERIALIZATION)
+ .go
+ }
+ }
+
+ describe("dindex:open-search") {
+ it("returns an Open Search description") {
+ xq("""dindex:open-search("")""")
+ .assertXPath("""exists($output/self::o:OpenSearchDescription)""")
+ .go
+ }
+ }
+}
diff --git a/opensiddur-extensions/src/test/scala/org/opensiddur/api/data/TestDictionaries.scala b/opensiddur-extensions/src/test/scala/org/opensiddur/api/data/TestDictionaries.scala
new file mode 100644
index 00000000..99a02b6c
--- /dev/null
+++ b/opensiddur-extensions/src/test/scala/org/opensiddur/api/data/TestDictionaries.scala
@@ -0,0 +1,314 @@
+package org.opensiddur.api.data
+
+import org.opensiddur.DbTest
+
+trait CommonTestDictionaries {
+ val prolog =
+ """xquery version '3.1';
+ import module namespace tcommon="http://jewishliturgy.org/test/tcommon"
+ at "xmldb:exist:/db/apps/opensiddur-server/test/tcommon.xqm";
+
+ import module namespace dict="http://jewishliturgy.org/api/data/dictionaries"
+ at "xmldb:exist:///db/apps/opensiddur-server/api/data/dictionaries.xqm";
+ import module namespace magic="http://jewishliturgy.org/magic"
+ at "xmldb:exist:///db/apps/opensiddur-server/magic/magic.xqm";
+
+ declare namespace html="http://www.w3.org/1999/xhtml";
+ declare namespace tei="http://www.tei-c.org/ns/1.0";
+ declare namespace j="http://jewishliturgy.org/ns/jlptei/1.0";
+ declare namespace http="http://expath.org/ns/http-client";
+ declare namespace output="http://www.w3.org/2010/xslt-xquery-serialization";
+ declare namespace a="http://jewishliturgy.org/ns/access/1.0";
+ """
+}
+
+class TestDictionaries extends DbTest with CommonTestDictionaries {
+ override def beforeAll() {
+ super.beforeAll()
+
+ setupUsers(2)
+ setupResource("src/test/resources/api/data/dictionaries/existing.xml", "existing", "dictionaries", 1, Some("en"))
+ setupResource("src/test/resources/api/data/dictionaries/existing.xml", "no_access", "dictionaries", 2,
+ Some("en"), Some("everyone"), Some("rw-------"))
+ setupResource("src/test/resources/api/data/notes/existing.xml", "no_write_access", "dictionaries", 2,
+ Some("en"), Some("everyone"), Some("rw-r--r--"))
+ }
+
+ override def afterAll() {
+ teardownResource("no_write_access", "dictionaries", 2)
+ teardownResource("no_access", "dictionaries", 2)
+ teardownResource("existing", "dictionaries", 1)
+ teardownResource("valid", "dictionaries", 1)
+ teardownUsers(2)
+
+ super.afterAll()
+ }
+
+ override def beforeEach(): Unit = {
+ super.beforeEach()
+ }
+
+ override def afterEach(): Unit = {
+ super.afterEach()
+ }
+
+ describe("dict:get") {
+ it("gets an existing resource") {
+ xq("""dict:get("existing")""")
+ .assertXPath("""exists($output/tei:TEI)""", "Returns a TEI resource")
+ .go
+ }
+
+ it("fails to get a nonexisting resource") {
+ xq("""dict:get("does_not_exist")""")
+ .assertHttpNotFound
+ .go
+ }
+
+ it("fails to get a resource with no read access") {
+ xq("""dict:get("no_access")""")
+ .assertHttpNotFound
+ .go
+ }
+ }
+
+ describe("dict:list") {
+ it("lists all resources") {
+ xq("""dict:list("", 1, 100)""")
+ .user("xqtest1")
+ .assertSearchResults
+ .assertXPath("""count($output//html:li[@class="result"])>=1""", "returns at least 1 result")
+ .assertXPath("""
+ every $li in $output//html:li[@class="result"]
+ satisfies exists($li/html:a[@class="alt"][@property="access"])
+ """, "results include a pointer to access API")
+ .go
+ }
+
+ it("does not list resources with no access when unauthenticated") {
+ xq("""dict:list("", 1, 100)""")
+ .assertSearchResults
+ .assertXPath("""count($output//html:li[@class="result"])>=1""", "returns at least 1 result")
+ .assertXPath("""empty($output//html:li[@class="result"]/html:a[@class="document"]/@href[contains(., "no_access")])""",
+ "does not list resource with no read access")
+ .go
+ }
+
+ it("lists some resources") {
+ xq("""dict:list("", 1, 2)""")
+ .user("xqtest1")
+ .assertXPath("""count($output//html:li[@class="result"])=2""", "returns 2 results")
+ .assertSearchResults
+ .go
+ }
+
+ it("responds to a query") {
+ xq("""dict:list("query", 1, 100)""")
+ .assertXPath("""count($output//html:ol[@class="results"]/html:li)=1""", "returns 1 result")
+ .assertSearchResults
+ .go
+ }
+ }
+
+ describe("dict:post") {
+ val validDoc = readXmlFile("src/test/resources/api/data/dictionaries/valid.xml")
+ val invalidDoc = readXmlFile("src/test/resources/api/data/dictionaries/invalid.xml")
+ it("posts a valid resource") {
+ xq(s"""dict:post(document { $validDoc })""")
+ .user("xqtest1")
+ .assertHttpCreated
+ .assertXPathEquals("collection('/db/data/dictionaries/en')[util:document-name(.)=tokenize($output//http:header[@name='Location']/@value,'/')[last()] || '.xml']//tei:revisionDesc/tei:change[1]",
+ "a change record has been added",
+ """"""
+ )
+ .go
+ }
+
+ it("fails to post a valid resource unauthenticated") {
+ xq(s"""dict:post(document { $validDoc })""")
+ .assertHttpUnauthorized
+ .go
+ }
+
+ it("fails to post an invalid resource") {
+ xq(s"""dict:post(document { $invalidDoc })""")
+ .user("xqtest1")
+ .assertHttpBadRequest
+ .go
+ }
+ }
+
+ describe("dict:put") {
+
+ it("puts a valid resource to an existing resource") {
+ val validDoc = readXmlFile("src/test/resources/api/data/dictionaries/existing_after_put.xml")
+ xq(s"""dict:put("existing", document { $validDoc })""")
+ .user("xqtest1")
+ .assertHttpNoData
+ .assertXPathEquals("""doc('/db/data/dictionaries/en/existing.xml')//tei:revisionDesc/tei:change[1]""",
+ "a change record has been added",
+ """"""
+ )
+ .go
+ }
+
+ it("fails to put a resource when unauthenticated") {
+ val validDoc = readXmlFile("src/test/resources/api/data/dictionaries/existing_after_put.xml")
+ xq(s"""dict:put("existing", document { $validDoc })""")
+ .assertHttpUnauthorized
+ .go
+ }
+
+ it("fails to put a valid resource to a nonexisting resource") {
+ val validDoc = readXmlFile("src/test/resources/api/data/dictionaries/valid.xml")
+ xq(s"""dict:put("does_not_exist", document { $validDoc })""")
+ .user("xqtest1")
+ .assertHttpNotFound
+ .go
+ }
+
+ it("fails to put an invalid resource") {
+ val invalidDoc = readXmlFile("src/test/resources/api/data/dictionaries/invalid.xml")
+ xq(s"""dict:put("existing", document { $invalidDoc })""")
+ .user("xqtest1")
+ .assertHttpBadRequest
+ .go
+ }
+
+ it("fails to put an resource that was invalidated by an illegal change") {
+ val invalidDoc = readXmlFile("src/test/resources/api/data/dictionaries/invalid_after_put.xml")
+ xq(s"""dict:put("existing", document { $invalidDoc })""")
+ .user("xqtest1")
+ .assertHttpBadRequest
+ .go
+ }
+ }
+
+ describe("dict:get-access") {
+ it("gets an access document for an existing resource") {
+ xq("""dict:get-access("existing", ())""")
+ .assertXPath("""$output/self::a:access""", "an access structure is returned")
+ .go
+ }
+
+ it("fails to get access for a nonexistent resource") {
+ xq("""dict:get-access("does_not_exist", ())""")
+ .assertHttpNotFound
+ .go
+ }
+ }
+
+ describe("dict:put-access") {
+ it("sets access with a valid access structure") {
+ xq("""dict:put-access("existing", document{
+
+ xqtest1
+ everyone
+
+
+ })""")
+ .user("xqtest1")
+ .assertHttpNoData
+ .go
+ }
+
+ it("fails with an invalid access structure") {
+ xq("""dict:put-access("existing", document {
+
+ })""")
+ .user("xqtest1")
+ .assertHttpBadRequest
+ .go
+ }
+
+ it("fails for a resource with no write access") {
+ xq("""dict:put-access("no_write_access", document{
+
+ xqtest1
+ everyone
+
+
+ })""")
+ .user("xqtest1")
+ .assertHttpForbidden
+ .go
+ }
+
+ it("fails for a nonexistent resource") {
+ xq("""dict:put-access("does_not_exist", document{
+
+ xqtest1
+ everyone
+
+
+ })""")
+ .user("xqtest1")
+ .assertHttpNotFound
+ .go
+ }
+
+ it("fails to change access unauthenticated") {
+ xq("""dict:put-access("existing", document{
+
+ xqtest1
+ everyone
+
+
+ })""")
+ .assertHttpUnauthorized
+ .go
+ }
+ }
+
+}
+
+class TestDictionariesDelete extends DbTest with CommonTestDictionaries {
+
+ override def beforeEach(): Unit = {
+ super.beforeEach()
+
+ setupUsers(2)
+ setupResource("src/test/resources/api/data/dictionaries/existing.xml", "existing", "dictionaries", 1, Some("en"))
+ setupResource("src/test/resources/api/data/dictionaries/existing.xml", "no_write_access", "dictionaries", 2,
+ Some("en"), Some("everyone"), Some("rw-r--r--"))
+ }
+
+ override def afterEach(): Unit = {
+ super.afterEach()
+
+ teardownResource("existing", "dictionaries", 1)
+ teardownResource("no_write_access", "dictionaries", 2)
+ teardownUsers(2)
+ }
+
+ describe("dict:delete") {
+ it("removes an existing resource") {
+ xq("""dict:delete("existing")""")
+ .user("xqtest1")
+ .assertHttpNoData
+ .go
+ }
+
+ it("does not remove an existing resource when unauthenticated") {
+ xq("""dict:delete("existing")""")
+ .assertHttpUnauthorized
+ .go
+ }
+
+ it("fails to remove a nonexisting resource") {
+ xq("""dict:delete("does_not_exist")""")
+ .user("xqtest1")
+ .assertHttpNotFound
+ .go
+ }
+
+ it("fails to remove a resource without write access") {
+ xq("""dict:delete("no_write_access")""")
+ .user("xqtest1")
+ .assertHttpForbidden
+ .go
+ }
+ }
+}
\ No newline at end of file
diff --git a/opensiddur-extensions/src/test/scala/org/opensiddur/api/data/TestLinkage.scala b/opensiddur-extensions/src/test/scala/org/opensiddur/api/data/TestLinkage.scala
new file mode 100644
index 00000000..9b00aaac
--- /dev/null
+++ b/opensiddur-extensions/src/test/scala/org/opensiddur/api/data/TestLinkage.scala
@@ -0,0 +1,324 @@
+package org.opensiddur.api.data
+
+import org.opensiddur.DbTest
+
+class TestLinkage extends DbTest {
+ override val prolog: String =
+ """xquery version '3.1';
+import module namespace lnk="http://jewishliturgy.org/api/data/linkage"
+ at "xmldb:exist:/db/apps/opensiddur-server/api/data/linkage.xqm";
+import module namespace tcommon="http://jewishliturgy.org/test/tcommon"
+ at "xmldb:exist:/db/apps/opensiddur-server/test/tcommon.xqm";
+
+declare namespace html="http://www.w3.org/1999/xhtml";
+declare namespace a="http://jewishliturgy.org/ns/access/1.0";
+declare namespace tei="http://www.tei-c.org/ns/1.0";
+declare namespace j="http://jewishliturgy.org/ns/jlptei/1.0";
+declare namespace jf="http://jewishliturgy.org/ns/jlptei/flat/1.0";
+declare namespace o="http://a9.com/-/spec/opensearch/1.1/";
+declare namespace http="http://expath.org/ns/http-client";
+declare namespace output="http://www.w3.org/2010/xslt-xquery-serialization";
+"""
+
+ override def beforeAll: Unit = {
+ super.beforeAll
+ setupUsers(2)
+ setupResource("src/test/resources/api/data/linkage/original-a.xml", "a-he", "original", 1, Some("he"))
+ setupResource("src/test/resources/api/data/linkage/original-b.xml", "b-en", "original", 1, Some("en"))
+ }
+
+ override def beforeEach: Unit = {
+ super.beforeEach()
+ setupResource("src/test/resources/api/data/linkage/existing.xml", "existing", "linkage", 1, Some("none"))
+ setupResource("src/test/resources/api/data/linkage/existing.xml", "noaccess", "linkage", 2, Some("none"),
+ Some("everyone"), Some("rw-------"))
+ setupResource("src/test/resources/api/data/linkage/existing.xml", "nowriteaccess", "linkage", 2, Some("none"),
+ Some("everyone"), Some("rw-r--r--"))
+ }
+
+ override def afterEach(): Unit = {
+ teardownResource("nowriteaccess", "linkage", 2)
+ teardownResource("noaccess", "linkage", 2)
+ teardownResource("existing", "linkage", 1)
+ teardownResource("valid", "linkage", 1)
+ super.afterEach()
+ }
+
+ override def afterAll(): Unit = {
+ teardownResource("existing", "linkage", 1)
+ teardownResource("a-he", "original", 1)
+ teardownResource("b-en", "original", 1)
+ teardownUsers(2)
+ super.afterAll()
+ }
+
+ describe("lnk:get") {
+ it("returns an existing resource") {
+ xq("""lnk:get("existing")""")
+ .user("xqtest1")
+ .assertXPath("exists($output/tei:TEI)", "Returns a resource")
+ .go
+ }
+
+ it("returns an existing resource unauthenticated") {
+ xq("""lnk:get("existing")""")
+ .assertXPath("exists($output/tei:TEI)", "Returns a resource")
+ .go
+ }
+
+ it("returns 404 for a nonexisting resource") {
+ xq("""lnk:get("nonexisting")""")
+ .user("xqtest1")
+ .assertHttpNotFound
+ .go
+ }
+
+ it("returns error when there is no read access") {
+ xq("""lnk:get("noaccess")""")
+ .user("xqtest1")
+ .assertHttpNotFound
+ .go
+ }
+ }
+
+ describe("lnk:get-combined") {
+ it("returns a combined resource") {
+ xq("""lnk:get-combined("existing")""")
+ .user("xqtest1")
+ .assertXPath("exists($output//tei:TEI//jf:unflattened)", "Returns unflattened data")
+ .go
+ }
+
+ it("returns a combined resource unauthenticated") {
+ xq("""lnk:get-combined("existing")""")
+ .assertXPath("exists($output//tei:TEI//jf:unflattened)", "Returns unflattened data")
+ .go
+ }
+ }
+
+ describe("lnk:list") {
+ it("returns a list of existing resources") {
+ xq("""lnk:list("", 1, 100)""")
+ .user("xqtest1")
+ .assertXPath("""count($output//html:li[@class="result"]) >= 1""", "returns at least 1 result")
+ .assertXPath(
+ """every $li in $output//html:li[@class="result"]
+ satisfies exists($li/html:a[@class="alt"][@property="access"])""", "results include a pointer to access API")
+ .assertXPath(
+ """every $li in $output//html:li[@class="result"]
+ satisfies exists($li/html:a[@class="alt"][@property="combined"])""", "results include a pointer to combined API")
+ .assertSearchResults
+ .go
+ }
+
+ it("returns a list of existing resources unauthenticated") {
+ xq("""lnk:list("", 1, 100)""")
+ .assertXPath("""count($output//html:li[@class="result"]) >= 1""", "returns at least 1 result")
+ .assertXPath("""empty($output//html:li[@class="result"]/html:a[@class="document"]/@href[contains(., "noaccess")])""",
+ "does not list the resource with no read access")
+ .assertSearchResults
+ .go
+ }
+
+ it("returns a limited number of results") {
+ xq("""lnk:list("", 1, 2)""")
+ .user("xqtest1")
+ .assertXPath("""count($output//html:li[@class="result"])=2""", "returns 2 results")
+ .assertSearchResults
+ .go
+ }
+
+ it("limits search results to a query") {
+ xq("""lnk:list("Query", 1, 100)""")
+ .user("xqtest1")
+ .assertXPath("""count($output//html:ol[@class="results"]/html:li)=2""", "returns 2 results (Existing and NoWriteAccess)")
+ .assertSearchResults
+ .go
+ }
+ }
+
+ describe("lnk:delete") {
+ it("deletes an existing resource") {
+ xq("""lnk:delete("existing")""")
+ .user("xqtest1")
+ .assertHttpNoData
+ .go
+ }
+
+ it("returns an error deleting an existing resource unauthenticated") {
+ xq("""lnk:delete("existing")""")
+ .assertHttpUnauthorized
+ .go
+ }
+
+ it("returns an error when deleting a nonexisting resource") {
+ xq("""lnk:delete("nonexisting")""")
+ .user("xqtest1")
+ .assertHttpNotFound
+ .go
+ }
+
+ it("returns an error when deleting a resource without write access") {
+ xq("""lnk:delete("nowriteaccess")""")
+ .user("xqtest1")
+ .assertHttpForbidden
+ .go
+ }
+ }
+
+ describe("lnk:post") {
+ val validContent = readXmlFile("src/test/resources/api/data/linkage/valid.xml")
+ val invalidContent = readXmlFile("src/test/resources/api/data/linkage/invalid.xml")
+
+ it("posts valid content") {
+ xq(s"""lnk:post(document { $validContent })""")
+ .user("xqtest1")
+ .assertHttpCreated
+ .assertXPathEquals(
+ """collection('/db/data/linkage/none')
+ [util:document-name(.)=tokenize($output//http:header[@name='Location']/@value,'/')[last()] || '.xml']//
+ tei:revisionDesc/tei:change[1]""",
+ "a change record has been added",
+ """"""
+ )
+ .go
+ }
+
+ it("returns an error when posting unauthenticated") {
+ xq(s"""lnk:post(document { $validContent })""")
+ .assertHttpUnauthorized
+ .go
+ }
+
+ it("returns an error when posting invalid content") {
+ xq(s"""lnk:post(document { $invalidContent })""")
+ .user("xqtest1")
+ .assertHttpBadRequest
+ .go
+ }
+ }
+
+ describe("lnk:put") {
+ val validContent = readXmlFile("src/test/resources/api/data/linkage/existing-after-put.xml")
+ val invalidContent = readXmlFile("src/test/resources/api/data/linkage/invalid.xml")
+
+ it("puts a valid resource") {
+ xq(s""" lnk:put("existing", document { $validContent })""")
+ .user("xqtest1")
+ .assertHttpNoData
+ .assertXPath("""count(doc('/db/data/linkage/none/existing.xml')//tei:revisionDesc/tei:change)=2""", "There are 2 change records total")
+ .assertXPath("""doc('/db/data/linkage/none/existing.xml')//tei:revisionDesc/tei:change[1][@who="/user/xqtest1"][@type="edited"][@when]""",
+ """a change record is added""")
+ .go
+ }
+
+ it("returns an error when putting a valid resource unauthenticated") {
+ xq(s""" lnk:put("existing", document { $validContent })""")
+ .assertHttpUnauthorized
+ .go
+ }
+
+ it("returns an error when putting a non-existent resource") {
+ xq(s"""lnk:put("doesnotexist", document { $validContent })""")
+ .user("xqtest1")
+ .assertHttpNotFound
+ .go
+ }
+
+ it("returns an error when putting an invalid resource") {
+ xq(s"""lnk:put("existing", document { $invalidContent })""")
+ .user("xqtest1")
+ .assertHttpBadRequest
+ .go
+ }
+
+ it("returns an error when putting an valid resource with an invalid change") {
+ val invalidChangeContent = readXmlFile("src/test/resources/api/data/linkage/existing-with-invalid-revision-desc.xml")
+
+ xq(s"""lnk:put("existing", document { $invalidChangeContent })""")
+ .user("xqtest1")
+ .assertHttpBadRequest
+ .go
+ }
+ }
+
+ describe("lnk:get-access") {
+ it("returns an access structure") {
+ xq("""lnk:get-access("existing", ())""")
+ .assertXPath("exists($output/self::a:access)", "an access structure is returned")
+ .go
+ }
+
+ it("returns an error for a nonexisting document") {
+ xq("""lnk:get-access("doesnotexist", ())""")
+ .user("xqtest1")
+ .assertHttpNotFound
+ .go
+ }
+ }
+
+ describe("lnk:put-access") {
+ it("sets access") {
+ xq("""lnk:put-access("existing", document{
+
+ xqtest1
+ everyone
+
+
+ })""")
+ .user("xqtest1")
+ .assertHttpNoData
+ .go
+ }
+
+ it("returns an error unauthenticated") {
+ xq("""lnk:put-access("existing", document{
+
+ xqtest1
+ everyone
+
+
+ })""")
+ .assertHttpUnauthorized
+ .go
+ }
+
+ it("returns an error for a nonexisting document") {
+ xq("""lnk:put-access("doesnotexist", document{
+
+ xqtest1
+ everyone
+
+
+ })""")
+ .assertHttpNotFound
+ .go
+ }
+
+ it("returns an error for no write access to the document") {
+ xq("""lnk:put-access("nowriteaccess", document{
+
+ xqtest1
+ everyone
+
+
+ })""")
+ .user("xqtest1")
+ .assertHttpForbidden
+ .go
+ }
+
+ it("returns an error for an invalid access structure") {
+ xq("""lnk:put-access("existing", document{
+
+
+
+ })""")
+ .user("xqtest1")
+ .assertHttpBadRequest
+ .go
+ }
+ }
+
+}
diff --git a/opensiddur-extensions/src/test/scala/org/opensiddur/api/data/TestLinkageId.scala b/opensiddur-extensions/src/test/scala/org/opensiddur/api/data/TestLinkageId.scala
new file mode 100644
index 00000000..a241854e
--- /dev/null
+++ b/opensiddur-extensions/src/test/scala/org/opensiddur/api/data/TestLinkageId.scala
@@ -0,0 +1,98 @@
+package org.opensiddur.api.data
+
+import org.opensiddur.DbTest
+
+class TestLinkageId extends DbTest {
+ /** imports, namespaces and variables */
+ override val prolog: String =
+ """xquery version '3.1';
+
+ import module namespace lnkid = 'http://jewishliturgy.org/api/data/linkageid'
+ at "xmldb:exist:/db/apps/opensiddur-server/api/data/linkageid.xqm";
+ import module namespace tcommon="http://jewishliturgy.org/test/tcommon"
+ at "xmldb:exist:/db/apps/opensiddur-server/test/tcommon.xqm";
+
+ declare namespace tei="http://www.tei-c.org/ns/1.0";
+ declare namespace j="http://jewishliturgy.org/ns/jlptei/1.0";
+ declare namespace output="http://www.w3.org/2010/xslt-xquery-serialization";
+ declare namespace html="http://www.w3.org/1999/xhtml";
+ declare namespace http="http://expath.org/ns/http-client";
+ declare namespace rest="http://exquery.org/ns/restxq";
+ """
+
+ override def beforeAll: Unit = {
+ super.beforeAll
+
+ setupUsers(1)
+
+ setupResource("src/test/resources/api/data/linkageid/original-a.xml", "original-a", "original", 1, Some("en"))
+ setupResource("src/test/resources/api/data/linkageid/original-b.xml", "original-b", "original", 1, Some("en"))
+ setupResource("src/test/resources/api/data/linkageid/original-c.xml", "original-c", "original", 1, Some("en"))
+
+ setupResource("src/test/resources/api/data/linkageid/linkage-a-b.xml", "linkage-a-b", "linkage", 1, Some("none"))
+ setupResource("src/test/resources/api/data/linkageid/linkage-a-c.xml", "linkage-a-c", "linkage", 1, Some("none"))
+ setupResource("src/test/resources/api/data/linkageid/linkage-b-c.xml", "linkage-b-c", "linkage", 1, Some("none"))
+ }
+
+ override def afterAll(): Unit = {
+ teardownResource("linkage-b-c", "linkage", 1)
+ teardownResource("linkage-a-c", "linkage", 1)
+ teardownResource("linkage-a-b", "linkage", 1)
+
+ teardownResource("original-c", "original", 1)
+ teardownResource("original-b", "original", 1)
+ teardownResource("original-a", "original", 1)
+ teardownUsers(1)
+
+ super.afterAll()
+ }
+
+ describe("lnkid:list") {
+ it("returns a list that includes the linkage ids linkage documents") {
+ xq("""lnkid:list("", 1, 100)""")
+ .user("xqtest1")
+ .assertXPath("""count($output//html:li[@class="result"]) >= 2""", "returns at least 2 results")
+ .assertXPath("""$output//html:li[@class="result"]/html:a/string() = "identifier1" """, "one of the results is identifier1")
+ .assertXPath("""ends-with($output//html:li[@class="result"]/html:a/@href/string(), "/api/data/linkageid/identifier1") """, "the url of identifier1 is referenced")
+ .assertXPath("""$output//html:li[@class="result"]/html:a/string() = "identifier2" """, "one of the results is identifier2")
+ .assertSearchResults
+ .go
+ }
+
+ it("returns a limited list when given a search query") {
+ xq("""lnkid:list("ifier2", 1, 100)""") // identifier2
+ .user("xqtest1")
+ .assertXPath("""count($output//html:li[@class="result"]) = 1""", "returns 1 result")
+ .assertSearchResults
+ .go
+ }
+
+ it("returns a limited list when given start and max results") {
+ xq("""lnkid:list("", 1, 1)""") // identifier2
+ .user("xqtest1")
+ .assertXPath("""count($output//html:li[@class="result"]) = 1""", "returns 1 result")
+ .assertSearchResults
+ .go
+ }
+ }
+
+ describe("lnkid:get") {
+ it("returns Not found if the linkage id does not exist") {
+ xq("""lnkid:get("DOESNOTEXIST")""")
+ .user("xqtest1")
+ .assertHttpNotFound
+ .go
+ }
+
+ it("returns a list of linkage, left and right documents when called with an existing id") {
+ xq("""lnkid:get("identifier1")""")
+ .user("xqtest1")
+ .assertSerializesAs("xhtml")
+ .assertXPath("""count($output//html:li[@class="result"]) = 2""", "returns 2 linkage files")
+ .assertXPath("""$output//html:li[@class="result"]/html:a[contains(@class, "linkage")]/@href = "/api/data/linkage/linkage-a-b" """, "linkage file referenced")
+ .assertXPath("""$output//html:li[@class="result"]/html:a[contains(@class, "left")]/@href = "/api/data/original/original-a" """, "original file referenced")
+ .assertXPath("""$output//html:li[@class="result"]/html:a[contains(@class, "right")]/@href = "/api/data/original/original-b" """, "original file referenced")
+ .go
+ }
+ }
+}
diff --git a/opensiddur-extensions/src/test/scala/org/opensiddur/api/data/TestNotes.scala b/opensiddur-extensions/src/test/scala/org/opensiddur/api/data/TestNotes.scala
new file mode 100644
index 00000000..212147b4
--- /dev/null
+++ b/opensiddur-extensions/src/test/scala/org/opensiddur/api/data/TestNotes.scala
@@ -0,0 +1,380 @@
+package org.opensiddur.api.data
+
+import org.opensiddur.DbTest
+
+trait CommonTestNotes {
+ val prolog =
+ """xquery version '3.1';
+ import module namespace tcommon="http://jewishliturgy.org/test/tcommon"
+ at "xmldb:exist:/db/apps/opensiddur-server/test/tcommon.xqm";
+
+ import module namespace notes="http://jewishliturgy.org/api/data/notes"
+ at "xmldb:exist:///db/apps/opensiddur-server/api/data/notes.xqm";
+ import module namespace magic="http://jewishliturgy.org/magic"
+ at "xmldb:exist:///db/apps/opensiddur-server/magic/magic.xqm";
+
+ declare namespace html="http://www.w3.org/1999/xhtml";
+ declare namespace tei="http://www.tei-c.org/ns/1.0";
+ declare namespace j="http://jewishliturgy.org/ns/jlptei/1.0";
+ declare namespace http="http://expath.org/ns/http-client";
+ declare namespace output="http://www.w3.org/2010/xslt-xquery-serialization";
+ declare namespace a="http://jewishliturgy.org/ns/access/1.0";
+ """
+}
+
+class TestNotes extends DbTest with CommonTestNotes {
+ override def beforeAll() {
+ super.beforeAll()
+
+ setupUsers(2)
+ setupResource("src/test/resources/api/data/notes/existing.xml", "existing", "notes", 1, Some("en"))
+ setupResource("src/test/resources/api/data/notes/existing.xml", "existing_put", "notes", 1, Some("en"))
+ setupResource("src/test/resources/api/data/notes/query.xml", "query", "notes", 1, Some("en"))
+ setupResource("src/test/resources/api/data/notes/existing.xml", "no_access", "notes", 2,
+ Some("en"), Some("everyone"), Some("rw-------"))
+ setupResource("src/test/resources/api/data/notes/existing.xml", "no_write_access", "notes", 2,
+ Some("en"), Some("everyone"), Some("rw-r--r--"))
+ }
+
+ override def afterAll() {
+ teardownResource("no_write_access", "notes", 2)
+ teardownResource("no_access", "notes", 2)
+ teardownResource("query", "notes", 1)
+ teardownResource("existing_put", "notes", 1)
+ teardownResource("existing", "notes", 1)
+ teardownResource("valid", "notes", 1)
+ teardownUsers(2)
+
+ super.afterAll()
+ }
+
+ override def beforeEach(): Unit = {
+ super.beforeEach()
+ }
+
+ override def afterEach(): Unit = {
+ super.afterEach()
+ }
+
+ describe("notes:get") {
+ it("gets an existing resource") {
+ xq("""notes:get("existing")""")
+ .assertXPath("""exists($output/tei:TEI)""", "Returns a TEI resource")
+ .go
+ }
+
+ it("fails to get a nonexisting resource") {
+ xq("""notes:get("does_not_exist")""")
+ .assertHttpNotFound
+ .go
+ }
+
+ it("fails to get a resource with no read access") {
+ xq("""notes:get("no_access")""")
+ .assertHttpNotFound
+ .go
+ }
+ }
+
+ describe("notes:list") {
+ it("lists all resources") {
+ xq("""notes:list("", 1, 100)""")
+ .user("xqtest1")
+ .assertSearchResults
+ .assertXPath("""count($output//html:li[@class="result"])>=1""", "returns at least 1 result")
+ .assertXPath("""
+ every $li in $output//html:li[@class="result"]
+ satisfies exists($li/html:a[@class="alt"][@property="access"])
+ """, "results include a pointer to access API")
+ .go
+ }
+
+ it("does not list resources with no access when unauthenticated") {
+ xq("""notes:list("", 1, 100)""")
+ .assertSearchResults
+ .assertXPath("""count($output//html:li[@class="result"])>=1""", "returns at least 1 result")
+ .assertXPath("""empty($output//html:li[@class="result"]/html:a[@class="document"]/@href[contains(., "no_access")])""",
+ "does not list resource with no read access")
+ .go
+ }
+
+ it("lists some resources") {
+ xq("""notes:list("", 1, 2)""")
+ .user("xqtest1")
+ .assertXPath("""count($output//html:li[@class="result"])=2""", "returns 2 results")
+ .assertSearchResults
+ .go
+ }
+
+ it("responds to a query") {
+ xq("""notes:list("query", 1, 100)""")
+ .assertXPath("""count($output//html:ol[@class="results"]/html:li)=1""", "returns 1 result")
+ .assertSearchResults
+ .go
+ }
+ }
+
+ describe("notes:post") {
+ val validDoc = readXmlFile("src/test/resources/api/data/notes/valid.xml")
+ val invalidDoc = readXmlFile("src/test/resources/api/data/notes/invalid.xml")
+ it("posts a valid resource") {
+ xq(s"""notes:post(document { $validDoc })""")
+ .user("xqtest1")
+ .assertHttpCreated
+ .assertXPathEquals("collection('/db/data/notes')[descendant::tei:title[@type='main'][.='Valid']]//tei:revisionDesc/tei:change[1]",
+ "a change record has been added",
+ """"""
+ )
+ .go
+ }
+
+ it("fails to post a valid resource unauthenticated") {
+ xq(s"""notes:post(document { $validDoc })""")
+ .assertHttpUnauthorized
+ .go
+ }
+
+ it("fails to post an invalid resource") {
+ xq(s"""notes:post(document { $invalidDoc })""")
+ .user("xqtest1")
+ .assertHttpBadRequest
+ .go
+ }
+ }
+
+ describe("notes:post-note") {
+ it("posts a valid new note to an existing resource") {
+ xq("""notes:post-note("existing", This is new.)""")
+ .user("xqtest1")
+ .assertHttpNoData
+ .assertXPathEquals("doc('/db/data/notes/en/existing.xml')//tei:revisionDesc/tei:change[1]",
+ "a change record has been added",
+ """"""
+ )
+ .assertXPathEquals("doc('/db/data/notes/en/existing.xml')//j:annotations/tei:note[last()]",
+ "a new note has been added",
+ """This is new."""
+ )
+ .assertXPath("""count(
+ doc('/db/data/notes/en/existing.xml')//j:annotations/tei:note)=2""",
+ "all the other notes remain undisturbed")
+ .go
+ }
+
+ it("posts a valid replacement note to an existing resource") {
+ xq("""notes:post-note("existing", This is replaced.)""")
+ .user("xqtest1")
+ .assertHttpNoData
+ .assertXPathEquals("doc('/db/data/notes/en/existing.xml')//tei:revisionDesc/tei:change[1]",
+ "a change record has been added",
+ """"""
+ )
+ .assertXPathEquals("doc('/db/data/notes/en/existing.xml')//j:annotations/tei:note[@xml:id='a-note']",
+ "a new note has been replaced",
+ """This is replaced."""
+ )
+ .assertXPath("""count(
+ doc('/db/data/notes/en/existing.xml')//j:annotations/tei:note[@xml:id='a-note'])=1""", "the existing note was the one that was edited")
+ .go
+ }
+
+ it("fails to post a valid note to a nonexisting resource") {
+ xq("""notes:post-note("Does-Not-Exist", This is new.)""")
+ .user("xqtest1")
+ .assertHttpNotFound
+ .go
+ }
+
+ it("fails to post an invalid note (lacking xml:id) to an existing resource") {
+ xq("""notes:post-note("existing", This is new.)""")
+ .user("xqtest1")
+ .assertHttpBadRequest
+ .go
+ }
+
+ it("fails to post a note to a resource without access") {
+ xq("""notes:post-note("no_write_access", This is new.)""")
+ .user("xqtest1")
+ .assertHttpForbidden
+ .go
+ }
+ }
+
+ describe("notes:put") {
+
+ it("puts a valid resource to an existing resource") {
+ val validDoc = readXmlFile("src/test/resources/api/data/notes/existing_after_put.xml")
+ xq(s"""notes:put("existing_put", document { $validDoc })""")
+ .user("xqtest1")
+ .assertHttpNoData
+ .assertXPathEquals("""doc('/db/data/notes/en/existing_put.xml')//tei:revisionDesc/tei:change[1]""",
+ "a change record has been added",
+ """"""
+ )
+ .go
+ }
+
+ it("fails to put a resource when unauthenticated") {
+ val validDoc = readXmlFile("src/test/resources/api/data/notes/existing_after_put.xml")
+ xq(s"""notes:put("existing", document { $validDoc })""")
+ .assertHttpUnauthorized
+ .go
+ }
+
+ it("fails to put a valid resource to a nonexisting resource") {
+ val validDoc = readXmlFile("src/test/resources/api/data/notes/valid.xml")
+ xq(s"""notes:put("does_not_exist", document { $validDoc })""")
+ .user("xqtest1")
+ .assertHttpNotFound
+ .go
+ }
+
+ it("fails to put an invalid resource") {
+ val invalidDoc = readXmlFile("src/test/resources/api/data/notes/invalid.xml")
+ xq(s"""notes:put("existing", document { $invalidDoc })""")
+ .user("xqtest1")
+ .assertHttpBadRequest
+ .go
+ }
+
+ it("fails to put an resource that was invalidated by an illegal change") {
+ val invalidDoc = readXmlFile("src/test/resources/api/data/notes/invalid_after_put_illegal_revisiondesc.xml")
+ xq(s"""notes:put("existing", document { $invalidDoc })""")
+ .user("xqtest1")
+ .assertHttpBadRequest
+ .go
+ }
+ }
+
+ describe("notes:get-access") {
+ it("gets an access document for an existing resource") {
+ xq("""notes:get-access("existing", ())""")
+ .assertXPath("""$output/self::a:access""", "an access structure is returned")
+ .go
+ }
+
+ it("fails to get access for a nonexistent resource") {
+ xq("""notes:get-access("does_not_exist", ())""")
+ .assertHttpNotFound
+ .go
+ }
+ }
+
+ describe("notes:put-access") {
+ it("sets access with a valid access structure") {
+ xq("""notes:put-access("existing", document{
+
+ xqtest1
+ everyone
+
+
+ })""")
+ .user("xqtest1")
+ .assertHttpNoData
+ .go
+ }
+
+ it("fails with an invalid access structure") {
+ xq("""notes:put-access("existing", document {
+
+ })""")
+ .user("xqtest1")
+ .assertHttpBadRequest
+ .go
+ }
+
+ it("fails for a resource with no write access") {
+ xq("""notes:put-access("no_write_access", document{
+
+ xqtest1
+ everyone
+
+
+ })""")
+ .user("xqtest1")
+ .assertHttpForbidden
+ .go
+ }
+
+ it("fails for a nonexistent resource") {
+ xq("""notes:put-access("does_not_exist", document{
+
+ xqtest1
+ everyone
+
+
+ })""")
+ .user("xqtest1")
+ .assertHttpNotFound
+ .go
+ }
+
+ it("fails to change access unauthenticated") {
+ xq("""notes:put-access("existing", document{
+
+ xqtest1
+ everyone
+
+
+ })""")
+ .assertHttpUnauthorized
+ .go
+ }
+ }
+
+}
+
+class TestNotesDelete extends DbTest with CommonTestNotes {
+
+ override def beforeEach(): Unit = {
+ super.beforeEach()
+
+ setupUsers(2)
+ setupResource("src/test/resources/api/data/notes/existing.xml", "existing", "notes", 1, Some("en"))
+ setupResource("src/test/resources/api/data/notes/existing.xml", "no_write_access", "notes", 2,
+ Some("en"), Some("everyone"), Some("rw-r--r--"))
+ }
+
+ override def afterEach(): Unit = {
+ super.afterEach()
+
+ teardownResource("existing", "notes", 1)
+ teardownResource("no_write_access", "notes", 2)
+ teardownUsers(2)
+ }
+
+ describe("notes:delete") {
+ it("removes an existing resource") {
+ xq("""notes:delete("existing")""")
+ .user("xqtest1")
+ .assertHttpNoData
+ .go
+ }
+
+ it("does not remove an existing resource when unauthenticated") {
+ xq("""notes:delete("existing")""")
+ .assertHttpUnauthorized
+ .go
+ }
+
+ it("fails to remove a nonexisting resource") {
+ xq("""notes:delete("does_not_exist")""")
+ .user("xqtest1")
+ .assertHttpNotFound
+ .go
+ }
+
+ it("fails to remove a resource without write access") {
+ xq("""notes:delete("no_write_access")""")
+ .user("xqtest1")
+ .assertHttpForbidden
+ .go
+ }
+ }
+}
\ No newline at end of file
diff --git a/opensiddur-extensions/src/test/scala/org/opensiddur/api/data/TestOriginal.scala b/opensiddur-extensions/src/test/scala/org/opensiddur/api/data/TestOriginal.scala
new file mode 100644
index 00000000..53585ecd
--- /dev/null
+++ b/opensiddur-extensions/src/test/scala/org/opensiddur/api/data/TestOriginal.scala
@@ -0,0 +1,854 @@
+package org.opensiddur.api.data
+
+import org.opensiddur.DbTest
+
+trait OriginalDataTestFixtures extends DbTest {
+ override val prolog =
+ """xquery version '3.1';
+
+import module namespace tcommon="http://jewishliturgy.org/test/tcommon"
+ at "xmldb:exist:/db/apps/opensiddur-server/test/tcommon.xqm";
+
+import module namespace orig="http://jewishliturgy.org/api/data/original"
+ at "xmldb:exist:///db/apps/opensiddur-server/api/data/original.xqm";
+import module namespace format="http://jewishliturgy.org/modules/format"
+ at "xmldb:exist:///db/apps/opensiddur-server/modules/format.xqm";
+import module namespace crest="http://jewishliturgy.org/modules/common-rest"
+ at "xmldb:exist:///db/apps/opensiddur-server/api/modules/common-rest.xqm";
+import module namespace ridx="http://jewishliturgy.org/modules/refindex"
+ at "xmldb:exist:///db/apps/opensiddur-server/api/modules/refindex.xqm";
+import module namespace magic="http://jewishliturgy.org/magic"
+ at "xmldb:exist:///db/apps/opensiddur-server/magic/magic.xqm";
+
+declare namespace html="http://www.w3.org/1999/xhtml";
+declare namespace tei="http://www.tei-c.org/ns/1.0";
+declare namespace a="http://jewishliturgy.org/ns/access/1.0";
+declare namespace j="http://jewishliturgy.org/ns/jlptei/1.0";
+declare namespace jf="http://jewishliturgy.org/ns/jlptei/flat/1.0";
+declare namespace http="http://expath.org/ns/http-client";
+declare namespace output="http://www.w3.org/2010/xslt-xquery-serialization";
+"""
+
+ def setup() = {
+ setupUsers(2)
+
+ setupResource("src/test/resources/api/data/original/existing.xml",
+ "existing", "original", 1, Some("en"),
+ group=Some("everyone"),permissions=Some("rw-rw-r--"))
+ setupResource("src/test/resources/api/data/original/existing.xml",
+ "no_access", "original", 2, Some("en"),
+ group=Some("everyone"),permissions=Some("rw-------"))
+ setupResource("src/test/resources/api/data/original/existing.xml",
+ "no_write_access", "original", 2, Some("en"),
+ group=Some("everyone"),permissions=Some("rw-r--r--"))
+ setupResource("src/test/resources/api/data/original/query_result.xml",
+ "query_result", "original", 1, Some("en"),
+ group=Some("everyone"),permissions=Some("rw-rw-r--"))
+ setupResource("src/test/resources/api/data/original/has_transclude.xml",
+ "has_transclude", "original", 1, Some("en"),
+ group=Some("everyone"),permissions=Some("rw-rw-r--"))
+ setupResource("src/test/resources/api/data/original/transcluded.xml",
+ "transcluded", "original", 1, Some("en"),
+ group=Some("everyone"),permissions=Some("rw-rw-r--"))
+ setupResource("src/test/resources/api/data/original/external_reference.xml",
+ "external_reference", "original", 1, Some("en"),
+ group=Some("everyone"),permissions=Some("rw-r--r--"))
+ setupResource("src/test/resources/api/data/original/with_revisiondesc_and_change.xml",
+ "with_revisiondesc_and_change", "original", 1, Some("en"),
+ group=Some("everyone"),permissions=Some("rw-r--r--"))
+ setupResource("src/test/resources/api/data/original/with_revisiondesc_and_changelog.xml",
+ "with_revisiondesc_and_changelog", "original", 1, Some("en"),
+ group=Some("everyone"),permissions=Some("rw-r--r--"))
+ setupResource("src/test/resources/api/data/original/with_no_revisiondesc.xml",
+ "with_no_revisiondesc", "original", 1, Some("en"),
+ group=Some("everyone"),permissions=Some("rw-r--r--"))
+ setupResource("src/test/resources/api/data/original/with_empty_revisiondesc.xml",
+ "with_empty_revisiondesc", "original", 1, Some("en"),
+ group=Some("everyone"),permissions=Some("rw-r--r--"))
+ setupResource("src/test/resources/api/data/original/test_doc_1.xml",
+ "test_doc_1", "original", 1, Some("en"),
+ group=Some("everyone"),permissions=Some("rw-r--r--"))
+ setupResource("src/test/resources/api/data/original/test_doc_2.xml",
+ "test_doc_2", "original", 1, Some("en"),
+ group=Some("everyone"),permissions=Some("rw-r--r--"))
+ setupResource("src/test/resources/api/data/original/link_doc_1.xml",
+ "link_doc_1", "linkage", 1, None,
+ group=Some("everyone"),permissions=Some("rw-r--r--"))
+ setupResource("src/test/resources/api/data/original/link_doc_2.xml",
+ "link_doc_2", "linkage", 1, None,
+ group=Some("everyone"),permissions=Some("rw-r--r--"))
+ setupResource("src/test/resources/api/data/original/has_external_reference.xml",
+ "has_external_reference", "original", 1, Some("en"),
+ group=Some("everyone"),permissions=Some("rw-r--r--"))
+ setupResource("src/test/resources/api/data/original/references_external_reference.xml",
+ "references_external_reference", "original", 1, Some("en"),
+ group=Some("everyone"),permissions=Some("rw-r--r--"))
+ setupResource("src/test/resources/api/data/original/has_undeclared_external_reference.xml",
+ "has_undeclared_external_reference", "original", 1, Some("en"),
+ group=Some("everyone"),permissions=Some("rw-r--r--"))
+ setupResource("src/test/resources/api/data/original/references_undeclared_external_reference.xml",
+ "references_undeclared_external_reference", "original", 1, Some("en"),
+ group=Some("everyone"),permissions=Some("rw-r--r--"))
+ }
+
+ def tearDown(): Unit = {
+ teardownResource("references_undeclared_external_reference", "original", 1)
+ teardownResource("has_undeclared_external_reference", "original", 1)
+ teardownResource("references_external_reference", "original", 1)
+ teardownResource("has_external_reference", "original", 1)
+ teardownResource("link_doc_2", "linkage", 1)
+ teardownResource("link_doc_1", "linkage", 1)
+ teardownResource("test_doc_2", "original", 1)
+ teardownResource("test_doc_1", "original", 1)
+ teardownResource("with_no_revisiondesc", "original", 1)
+ teardownResource("with_empty_revisiondesc", "original", 1)
+ teardownResource("with_revisiondesc_and_changelog", "original", 1)
+ teardownResource("with_revisiondesc_and_change", "original", 1)
+ teardownResource("test_invalid_external_reference", "original", 1)
+ teardownResource("test_valid_external_reference", "original", 1)
+ teardownResource("valid", "original", 1)
+ teardownResource("existing", "original", 1)
+ teardownResource("no_access", "original", 2)
+ teardownResource("no_write_access", "original", 2)
+ teardownResource("query_result", "original", 1)
+ teardownResource("has_transclude", "original", 1)
+ teardownResource("transcluded", "original", 1)
+ teardownResource("external_reference", "original", 1)
+
+ teardownUsers(2)
+ }
+
+}
+
+class TestOriginal extends OriginalDataTestFixtures {
+
+ override def beforeAll = {
+ super.beforeAll()
+ setup()
+ }
+
+ override def beforeEach() = {
+ super.beforeEach()
+ }
+
+ override def afterAll = {
+ tearDown()
+ super.afterAll()
+ }
+
+ override def afterEach(): Unit = {
+ super.afterEach()
+ }
+
+ describe("orig:get") {
+ it("returns a successful http call for an existing document when authenticated") {
+ xq("orig:get('existing')")
+ .user("xqtest1")
+ .assertXPath("""exists($output/tei:TEI)""", "Returns a TEI resource")
+ .go
+ }
+
+ it("returns a successful http call for an existing document when unauthenticated") {
+ xq("orig:get('existing')")
+ .assertXPath("""exists($output/tei:TEI)""", "Returns a TEI resource")
+ .go
+ }
+
+ it("returns not found for a nonexisting resource") {
+ xq("""orig:get("does_not_exist")""")
+ .assertHttpNotFound
+ .go
+ }
+
+ it("returns not found where there is no read access when authenticated") {
+ xq("""orig:get("no_access")""")
+ .user("xqtest1")
+ .assertHttpNotFound
+ .go
+ }
+
+ it("returns not found where there is no read access when unauthenticated") {
+ xq("""orig:get("no_access")""")
+ .assertHttpNotFound
+ .go
+ }
+ }
+
+ describe("orig:get-flat") {
+ it("returns a flattened existing TEI resource") {
+ xq("""orig:get-flat("existing")""")
+ .assertXPath("""exists($output/tei:TEI)""", "the output is a TEI resource")
+ .assertXPath("""exists($output/tei:TEI//jf:merged)""", "the returned resource is flattened")
+ .go
+ }
+
+ it("returns 404 for a nonexisting resource") {
+ xq("""orig:get-flat("does_not_exist")""")
+ .assertHttpNotFound
+ .go
+ }
+
+ it("returns 404 for a resource with no read access") {
+ xq("""orig:get-flat("no_access")""")
+ .assertHttpNotFound
+ .go
+ }
+ }
+
+ describe("orig:get-combined") {
+ it("returns an untranscluded resource when transclude=false()") {
+ xq("""orig:get-combined("has_transclude", false())""")
+ .assertXPath("exists($output/tei:TEI)", "the resource is a TEI document")
+ .assertXPath("exists($output/tei:TEI//jf:unflattened)", "the resource is unflattened")
+ .assertXPath("exists($output/tei:TEI//tei:ptr[ancestor::jf:unflattened])", "the pointers are intact")
+ .go
+ }
+
+ it("returns a transcluded resource when transclude=true()") {
+ xq("""orig:get-combined("has_transclude", true())""")
+ .assertXPath("exists($output/tei:TEI)", "the resource is a TEI document")
+ .assertXPath("exists($output/tei:TEI//jf:combined)", "the resource is combined")
+ .assertXPath("exists($output/tei:TEI//jf:ptr[ancestor::jf:combined])", "the pointers are converted to jf:ptr")
+ .assertXPath("""exists($output/tei:TEI//tei:seg[@jf:id="tr_seg1"])""", "a section is transcluded")
+ .go
+ }
+
+ it("returns HTTP 404 on a nonexisting resource") {
+ xq("""orig:get-combined("does_not_exist", false())""")
+ .assertHttpNotFound
+ .go
+ }
+
+ it("returns HTTP 404 on an inaccessible resource") {
+ xq("""orig:get-combined("no_access", false())""")
+ .assertHttpNotFound
+ .go
+ }
+ }
+
+ describe("orig:get-combined-html") {
+ it("returns an HTML resource when transclude=false()") {
+ xq("""orig:get-combined-html("has_transclude", false())""")
+ .assertXPath("exists($output/html:html)", "the resource is an HTML document")
+ .go
+ }
+
+ it("returns a transcluded resource when transclude=true()") {
+ xq("""orig:get-combined-html("has_transclude", true())""")
+ .assertXPath("exists($output/html:html)", "the resource is an HTML document")
+ .assertXPath("""exists($output/html:html//html:div[matches(@data-document,"^((/exist/restxq)?/api)?/data/original/transcluded$")])""", "the resource is combined")
+ .assertXPath("""exists($output/html:html//html:div[contains(@class,"id-tr_seg1")])""", "a section is transcluded")
+ .go
+ }
+
+ it("returns HTTP 404 on a nonexisting resource") {
+ xq("""orig:get-combined-html("does_not_exist", false())""")
+ .assertHttpNotFound
+ .go
+ }
+
+ it("returns HTTP 404 on an inaccessible resource") {
+ xq("""orig:get-combined-html("no_access", false())""")
+ .assertHttpNotFound
+ .go
+ }
+ }
+
+ describe("orig:post-combined-job") {
+ it("returns a job header and location on an existing document") {
+ xq("""orig:post-combined-job("existing", false(), "html")""")
+ .assertXPath("$output/self::rest:response/http:response/@status=202", "returns status 202")
+ .assertXPath("$output/self::rest:response/http:response/http:header[@name='Location'][matches(@value, '/api/jobs/\\d+-\\d+')]", "returns the location header with job id")
+ .go
+ }
+
+ it("returns HTTP 404 on a nonexisting resource") {
+ xq("""orig:post-combined-job("does_not_exist", false(), "html")""")
+ .assertHttpNotFound
+ .go
+ }
+
+ it("returns HTTP 400 for an invalid format") {
+ xq("""orig:post-combined-job("existing", false(), "invalid")""")
+ .assertHttpBadRequest
+ .go
+ }
+
+ it("returns HTTP 404 on an inaccessible resource") {
+ xq("""orig:post-combined-job("no_access", false(), "html")""")
+ .assertHttpNotFound
+ .go
+ }
+
+ }
+
+ describe("orig:list") {
+ it("lists all resources when authenticated") {
+ xq("""orig:list("", 1, 100)""")
+ .user("xqtest1")
+ .assertXPath("""count($output//html:li[@class="result"])>=1""", "Returns at least one result")
+ .assertXPath("""every $li in $output//html:li[@class="result"]
+ satisfies exists($li/html:a[@class="alt"][@property="access"])""", "Results include a pointer to the access API")
+ .assertXPath("""every $li in $output//html:li[@class="result"]
+ satisfies exists($li/html:a[@class="alt"][starts-with(@property, "validation")])""", "Results include a pointer to the validation API")
+ .assertSearchResults
+ .go
+ }
+
+ it("does not list resources for which there is no read access when unauthenticated") {
+ xq("""orig:list("", 1, 100)""")
+ .assertXPath("""count($output//html:li[@class="result"])>=1""", "Returns at least one result")
+ .assertXPath("""empty($output//html:li[@class="result"]/html:a[@class="document"]/@href[contains(., "no_access")])""",
+ "Does not list resources for which there is no access")
+ .assertSearchResults
+ .go
+ }
+
+ it("lists a limited number of resources") {
+ xq("""orig:list("", 1, 2)""")
+ .assertXPath("""count($output//html:li[@class="result"])=2""", "2 results returned")
+ .assertSearchResults
+ .go
+ }
+
+ it("responds to a query") {
+ xq("""orig:list("query", 1, 100)""")
+ .assertXPath("""count($output//html:ol[@class="results"]/html:li)=1""", "1 result returned")
+ .assertSearchResults
+ .go
+ }
+ }
+
+ describe("orig:post") {
+ it("posts a valid resource") {
+ val validContent = readXmlFile("src/test/resources/api/data/original/valid.xml")
+
+ xq(s"""orig:post(document { $validContent })""")
+ .user("xqtest1")
+ .assertHttpCreated
+ .assertXPath(
+ """collection('/db/data/original/en')
+ [util:document-name(.)=tokenize($output//http:header[@name='Location']/@value,'/')[last()] || '.xml']
+ //tei:revisionDesc/tei:change[1][@who="/user/xqtest1"][@type="created"]""", "A change record has been added")
+ .go
+ }
+
+ it("validates a valid resource") {
+ val validContent = readXmlFile("src/test/resources/api/data/original/valid.xml")
+
+ xq(s"""orig:post(document { $validContent }, "true")""")
+ .assertXPath("""$output/self::report/status='valid'""")
+ .go
+ }
+
+ it("""invalidates an invalid resource""") {
+ val invalidContent = readXmlFile("src/test/resources/api/data/original/invalid.xml")
+ xq(s"""orig:post(document { $invalidContent }, "true")""")
+ .assertXPath("$output/self::report/status = 'invalid'")
+ .go
+ }
+
+ it("returns unauthorized when posting a valid resource unauthenticated") {
+ val validContent = readXmlFile("src/test/resources/api/data/original/valid.xml")
+
+ xq(s"""orig:post(document { $validContent })""")
+ .assertHttpUnauthorized
+ .go
+ }
+
+ it("rejects a post of an invalid resource") {
+ val invalidContent = readXmlFile("src/test/resources/api/data/original/invalid.xml")
+ xq(s"""orig:post(document { $invalidContent })""")
+ .user("xqtest1")
+ .assertHttpBadRequest
+ .go
+ }
+
+ it("rejects a post of a resource lacking a title") {
+ val invalidContent = readXmlFile("src/test/resources/api/data/original/no_title.xml")
+ xq(s"""orig:post(document { $invalidContent })""")
+ .user("xqtest1")
+ .assertHttpBadRequest
+ .go
+ }
+
+ it("updates a document with a valid external reference") {
+ val validContent = readXmlFile("src/test/resources/api/data/original/test_valid_external_reference.xml")
+
+ xq(s"""orig:post(document { $validContent })""")
+ .user("xqtest1")
+ .assertHttpCreated
+ .go
+ }
+
+ it("rejects a resource with an invalid external reference") {
+ val invalidContent = readXmlFile("src/test/resources/api/data/original/test_invalid_external_reference.xml")
+ xq(s"""orig:post(document { $invalidContent })""")
+ .user("xqtest1")
+ .assertHttpBadRequest
+ .go
+ }
+ }
+
+ describe("orig:get-access") {
+ it("returns an access structure for an existing document") {
+ xq("""orig:get-access("existing", ())""")
+ .user("xqtest1")
+ .assertXPath("exists($output/self::a:access)", "an access structure is returned")
+ .go
+ }
+
+ it("returns an access structure for an existing document when unauthenticated") {
+ xq("""orig:get-access("existing", ())""")
+ .assertXPath("exists($output/self::a:access)", "an access structure is returned")
+ .go
+ }
+
+ it("returns not found for a nonexisting document") {
+ xq("""orig:get-access("does_not_exist", ())""")
+ .user("xqtest1")
+ .assertHttpNotFound
+ .go
+ }
+ }
+
+ describe("orig:put-access") {
+ it("returns 'no data' when setting access with a valid structure and authenticated") {
+ xq(
+ """orig:put-access("existing", document {
+
+ xqtest1
+ everyone
+
+
+ })""")
+ .user("xqtest1")
+ .assertHttpNoData
+ .go
+ }
+
+ it("returns unauthorized on an existing document when unauthenticated") {
+ xq(
+ """orig:put-access("existing", document {
+
+ xqtest1
+ everyone
+
+
+ })""")
+ .assertHttpUnauthorized
+ .go
+ }
+
+ it("returns bad request when the access structure is invalid") {
+ xq("""orig:put-access("existing", document {
+
+
+
+ })""")
+ .user("xqtest1")
+ .assertHttpBadRequest
+ .go
+ }
+
+ it("returns forbidden when there is no write access") {
+ xq("""orig:put-access("no_write_access", document {
+
+ xqtest1
+ xqtest1
+
+
+ })""")
+ .user("xqtest1")
+ .assertHttpForbidden
+ .go
+ }
+
+ it("returns not found when the document doesn't exist") {
+ xq("""orig:put-access("does_not_exist", document {
+
+ xqtest1
+ xqtest1
+
+
+ })""")
+ .user("xqtest1")
+ .assertHttpNotFound
+ .go
+ }
+ }
+
+ describe("crest:record-change") {
+ it("adds an edit record when there is a revisionDesc and change existing") {
+ xq("""crest:record-change(doc("/db/data/original/en/with_revisiondesc_and_change.xml"), "edited")""")
+ .user("xqtest1")
+ .assertXPath(
+ """doc('/db/data/original/en/with_revisiondesc_and_change.xml')//tei:revisionDesc/tei:change[1]
+ [@when][@who='/user/xqtest1'][@type='edited']""", "change is recorded")
+ .go
+ }
+
+ it("adds details to a record with revisionDesc and change log entry") {
+ xq("""crest:record-change(doc("/db/data/original/en/with_revisiondesc_and_changelog.xml"), "edited")""")
+ .user("xqtest1")
+ .assertXPath("""count(doc('/db/data/original/en/with_revisiondesc_and_changelog.xml')//tei:revisionDesc/tei:change)=1""",
+ "no change entry is inserted")
+ .assertXPath(
+ """doc('/db/data/original/en/with_revisiondesc_and_changelog.xml')//tei:revisionDesc/tei:change[1]
+ [@when][@who='/user/xqtest1'][@type='edited']""", "change is recorded")
+ .go
+ }
+
+ it("adds an edit record with empty revisionDesc") {
+ xq("""crest:record-change(doc("/db/data/original/en/with_empty_revisiondesc.xml"), "edited")""")
+ .user("xqtest1")
+ .assertXPath(
+ """doc('/db/data/original/en/with_empty_revisiondesc.xml')//tei:revisionDesc/tei:change[1]
+ [@when][@who='/user/xqtest1'][@type='edited']""", "change is recorded")
+ .go
+ }
+
+ it("adds an edit record with no revisionDesc") {
+ xq("""crest:record-change(doc("/db/data/original/en/with_no_revisiondesc.xml"), "created")""")
+ .user("xqtest1")
+ .assertXPath(
+ """doc('/db/data/original/en/with_no_revisiondesc.xml')//tei:revisionDesc/tei:change[1]
+ [@when][@who='/user/xqtest1'][@type='created']""", "change is recorded in a new revisionDesc")
+ .go
+ }
+ }
+
+ describe("orig:linkage-query-function") {
+ it("finds linkage documents associated with an original document") {
+ xq("""orig:linkage-query-function(doc("/db/data/original/en/test_doc_1.xml"), ())""")
+ .user("xqtest1")
+ .assertXPath("""count($output) = 2 and $output/tei:idno="TEST" and $output/tei:idno="ANOTHER"""",
+ "The expected linkages are returned")
+ .go
+ }
+
+ it("finds linkage documents associated with an original document, when limited by a query string") {
+ xq("""orig:linkage-query-function(doc("/db/data/original/en/test_doc_1.xml"), "TES")""")
+ .user("xqtest1")
+ .assertXPath("""count($output) = 1 and $output/tei:idno="TEST"""",
+ "The expected linkages are returned")
+ .go
+ }
+ }
+
+ describe("orig:linkage-title-function") {
+ val linkageData = readXmlFile("src/test/resources/api/data/original/link_doc_1.xml")
+
+ it("returns the id of a linkage parallel group") {
+ xq(
+ s"""let $$data := document { $linkageData }
+ return orig:linkage-title-function($$data//j:parallelText)""")
+ .assertEquals("TEST")
+ .go
+ }
+ }
+
+ describe("orig:get-linkage") {
+ it("returns a list of linkages and ids to an original document") {
+ xq("""orig:get-linkage("test_doc_1", (), 1, 100)""")
+ .assertXPath("""count($output//html:li[@class="result"])=2""", "2 results")
+ .assertXPath("""every $id in ("TEST", "ANOTHER") satisfies $output//html:li[@class="result"]/html:a=$id""",
+ "Expected ids are returned")
+ .assertXPath("""every $link in $output//html:li[@class="result"]/html:a satisfies (
+ let $expected-link :=
+ if ($link = "TEST") then "link_doc_1"
+ else if ($link = "ANOTHER") then "link_doc_2"
+ else ()
+ return
+ matches($link/@href, "/api/data/linkage/" || $expected-link || "$"))""",
+ "ids are connected to the correct documents")
+ .go
+ }
+ }
+
+ describe("orig:validate") {
+
+ it("invalidates a document with duplicate xml:ids") {
+ val invalidDupe = readXmlFile("src/test/resources/api/data/original/duplicate_xml_id.xml")
+ xq(s"""orig:validate-report(document { $invalidDupe }, ())""")
+ .assertXPath("$output/status = 'invalid'", "The document is marked invalid")
+ .go
+ }
+
+ it("validates the same document without duplicate xml:ids") {
+ val validNoDupe = readXmlFile("src/test/resources/api/data/original/no_duplicate_xml_id.xml")
+ xq(s"""orig:validate-report(document { $validNoDupe }, ())""")
+ .assertXPath("$output/status = 'valid'", "The document is marked valid")
+ .go
+ }
+
+ it("invalidates a document with an invalid source (regression test for #208)") {
+ val invalidBadSource = readXmlFile("src/test/resources/api/data/original/bad_source.xml")
+ xq(s"""orig:validate-report(document { $invalidBadSource }, ())""")
+ .assertXPath("$output/status = 'invalid'", "The document is marked invalid")
+ .go
+ }
+
+ it("invalidates non-canonical anchors that fail the single reference rule") {
+ val invalidSource = readXmlFile("src/test/resources/api/data/original/fails_single_reference_rule_internal.xml")
+ xq(s"""orig:validate-report(document { $invalidSource }, ())""")
+ .assertXPath("$output/status = 'invalid'", "The document is marked invalid")
+ .assertXPath("""contains($output/message, "'beginning'")""", "The failed anchor is mentioned in the error")
+ .go
+ }
+
+ it("invalidates a document when referenced external or canonical anchors are removed") {
+ val newDoc = readXmlFile("src/test/resources/api/data/original/has_external_reference_removed.xml")
+ xq(s"""orig:validate-report(document { $newDoc }, doc("/db/data/original/en/has_external_reference.xml"))""")
+ .assertXPath("$output/status = 'invalid'", "The document is marked invalid")
+ .assertXPath("""contains($output/message, "'is_external_end'")""", "The missing anchor is mentioned in the error")
+ .go
+ }
+
+ it("invalidates a document when externally referenced anchors are not declared as external") {
+ val newDoc = readXmlFile("src/test/resources/api/data/original/has_undeclared_external_reference.xml")
+ xq(s"""orig:validate-report(document { $newDoc }, doc("/db/data/original/en/has_undeclared_external_reference.xml"))""")
+ .assertXPath("$output/status = 'invalid'", "The document is marked invalid")
+ .assertXPath("""contains($output/message, "'is_external_end'")""", "The undeclared anchor is mentioned in the error")
+ .go
+ }
+ }
+
+ describe("(non-public function) orig:internal-references") {
+ it("returns all references to anchors inside a document") {
+ xq(
+ """let $doc := document {
+
+
+
+
+
+
+
+
+ abcdef
+
+ dsifjs
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ }
+ return orig:internal-references($doc)
+ """)
+ .assertXPath("""$output("referenced_as_middle")/@xml:id="single_reference" """, "single reference")
+ .assertXPath("""$output("referenced_as_begin")/@xml:id="range_reference" """, "start of range reference")
+ .assertXPath("""$output("referenced_as_end")/@xml:id="range_reference" """, "end of range reference")
+ .assertXPath("""$output("referenced_as_end")/@xml:id="with_duplicate_reference" """, "duplicate reference")
+ .assertXPath("""not(map:contains($output, "unreferenced")) """, "unreferenced doesn't exist")
+ .assertXPath("""not(map:contains($output, "stream")) """, "non-anchor reference doesn't exist")
+ .go
+ }
+ }
+
+}
+
+// delete will delete data and put will alter data, so we need a separate fixture
+class TestOriginalWithReset extends OriginalDataTestFixtures {
+ override def beforeEach = {
+ super.beforeEach()
+ setup()
+ }
+
+ override def afterEach = {
+ tearDown()
+ super.afterEach()
+ }
+
+ describe("orig:put") {
+ it("successfully puts a valid resource to an existing resource") {
+ val validContent = readXmlFile("src/test/resources/api/data/original/existing_after_put.xml")
+
+ xq(s"""orig:put("existing", document { $validContent })""")
+ .user("xqtest1")
+ .assertHttpNoData
+ .assertXPath(
+ """doc('/db/data/original/en/existing.xml')
+ //tei:revisionDesc/tei:change[1][@who="/user/xqtest1"][@type="edited"][@who="/user/xqtest1"][@when]""", "A change record has been added")
+ .assertXPath("""count(doc('/db/data/original/en/existing.xml')//tei:revisionDesc/tei:change)=2""", "There are 2 change records total")
+ .go
+ }
+
+ it("successfully validates a valid resource to an existing resource") {
+ val validContent = readXmlFile("src/test/resources/api/data/original/existing_after_put.xml")
+
+ xq(s"""orig:put("existing", document { $validContent }, "true")""")
+ .assertXPath(
+ """$output/self::report/status = 'valid'""")
+ .go
+ }
+
+ it("returns unauthorized when putting a valid resource to an existing resource unauthenticated") {
+ val validContent = readXmlFile("src/test/resources/api/data/original/existing_after_put.xml")
+
+ xq(s"""orig:put("existing", document { $validContent })""")
+ .assertHttpUnauthorized
+ .go
+ }
+
+ it("flags an error when a resource is put to a nonexistent resource") {
+ val validContent = readXmlFile("src/test/resources/api/data/original/valid.xml")
+
+ xq(s"""orig:put("does_not_exist", document { $validContent })""")
+ .user("xqtest1")
+ .assertHttpNotFound
+ .go
+ }
+
+ it("flags an error when a resource is put to a nonexistent resource unauthenticated") {
+ val validContent = readXmlFile("src/test/resources/api/data/original/valid.xml")
+
+ xq(s"""orig:put("does_not_exist", document { $validContent })""")
+ .assertHttpNotFound
+ .go
+ }
+
+
+ it("flags an error on put of an invalid resource to an existing resource") {
+ val invalidContent = readXmlFile("src/test/resources/api/data/original/invalid.xml")
+
+ xq(s"""orig:put("existing", document { $invalidContent })""")
+ .user("xqtest1")
+ .assertHttpBadRequest
+ .go
+ }
+
+ it("successfully invalidates an invalid resource to an existing resource") {
+ val invalidContent = readXmlFile("src/test/resources/api/data/original/invalid.xml")
+
+ xq(s"""orig:put("existing", document { $invalidContent }, "true")""")
+ .assertXPath(
+ """$output/self::report/status = 'invalid'""")
+ .go
+ }
+
+ it("flags an error on a resource that is invalidated by an illegal change") {
+ val invalidContent = readXmlFile("src/test/resources/api/data/original/invalid_after_put_illegal_revisiondesc.xml")
+
+ xq(s"""orig:put("existing", document { $invalidContent })""")
+ .user("xqtest1")
+ .assertHttpBadRequest
+ .go
+ }
+ }
+
+ describe("orig:delete") {
+ it("removes an existing resource") {
+ xq("""orig:delete("existing")""")
+ .user("xqtest1")
+ .assertHttpNoData
+ .go
+ }
+
+ it("returns unauthorized when unauthenticated") {
+ xq("""orig:delete("existing")""")
+ .assertHttpUnauthorized
+ .go
+ }
+
+ it("returns HTTP 404 for removing a nonexistent resource") {
+ xq("""orig:delete("does_not_exist")""")
+ .user("xqtest1")
+ .assertHttpNotFound
+ .go
+ }
+
+ it("returns HTTP 404 for removing a nonexistent resource, when unauthenticated") {
+ xq("""orig:delete("does_not_exist")""")
+ .assertHttpNotFound
+ .go
+ }
+
+ it("returns forbidden when removing a resource with no write access") {
+ xq("""orig:delete("no_write_access")""")
+ .user("xqtest1")
+ .assertHttpForbidden
+ .go
+ }
+
+ it("deletes a resource with only an internal reference") {
+ xq("""orig:delete("external_reference")""")
+ .user("xqtest1")
+ .assertHttpNoData
+ .go
+ }
+ }
+
+ describe("orig:put-flat") {
+ it("puts a valid flattened resource to an existing resource") {
+ val existingFlat = readXmlFile("src/test/resources/api/data/original/existing_flat.xml")
+
+ xq(s"""orig:put-flat("existing", document { $existingFlat })""")
+ .user("xqtest1")
+ .assertHttpNoData
+ .assertXPath(
+ """(collection('/db/data/original/en')[util:document-name(.)='existing.xml']//tei:revisionDesc/tei:change)[1]
+ [@type="edited"][@who="/user/xqtest1"][@when]""", "A change record has been added")
+ .go
+ }
+
+ it("returns not found when the resource does not exist") {
+ val validFlat = readXmlFile("src/test/resources/api/data/original/valid_flat.xml")
+ xq(s"""orig:put-flat("does_not_exist", document { $validFlat })""")
+ .assertHttpNotFound
+ .go
+ }
+
+ it("returns bad request when the resource is not valid") {
+ val invalidFlat = readXmlFile("src/test/resources/api/data/original/invalid_flat.xml")
+
+ xq(s"""orig:put-flat("existing", document { $invalidFlat })""")
+ .user("xqtest1")
+ .assertHttpBadRequest
+ .go
+ }
+ }
+}
+
+class TestOriginalDeleteWithExternalReference extends OriginalDataTestFixtures {
+ override def beforeEach() = {
+ super.beforeEach()
+ setup()
+ setupResource("src/test/resources/api/data/original/makes_external_reference.xml",
+ "makes_external_reference", "original", 1,
+ group=Some("everyone"),permissions=Some("rw-r--r--"))
+ }
+
+ override def afterEach() = {
+ teardownResource("makes_external_reference", "original", 1)
+ tearDown()
+ super.afterEach()
+ }
+
+ describe("orig:delete") {
+ it("refuses to delete a resource with an external reference") {
+ xq("""orig:delete("external_reference")""")
+ .user("xqtest1")
+ .assertHttpBadRequest
+ .assertXPath("""count($output//documents/document)=1 and ends-with(.//documents/document,"/data/original/makes_external_reference")""",
+ "error message returns a reference to the document where the external reference is")
+ }
+ }
+}
\ No newline at end of file
diff --git a/opensiddur-extensions/src/test/scala/org/opensiddur/api/data/TestOutlines.scala b/opensiddur-extensions/src/test/scala/org/opensiddur/api/data/TestOutlines.scala
new file mode 100644
index 00000000..fe0c8b3f
--- /dev/null
+++ b/opensiddur-extensions/src/test/scala/org/opensiddur/api/data/TestOutlines.scala
@@ -0,0 +1,490 @@
+package org.opensiddur.api.data
+
+import org.opensiddur.DbTest
+
+trait CommonTestOutlines {
+ val prolog =
+ """xquery version '3.1';
+ import module namespace tcommon="http://jewishliturgy.org/test/tcommon"
+ at "xmldb:exist:/db/apps/opensiddur-server/test/tcommon.xqm";
+
+ import module namespace outl="http://jewishliturgy.org/api/data/outlines"
+ at "xmldb:exist:///db/apps/opensiddur-server/api/data/outlines.xqm";
+ import module namespace magic="http://jewishliturgy.org/magic"
+ at "xmldb:exist:///db/apps/opensiddur-server/magic/magic.xqm";
+ import module namespace data="http://jewishliturgy.org/modules/data"
+ at "xmldb:exist:///db/apps/opensiddur-server/modules/data.xqm";
+
+ declare namespace html="http://www.w3.org/1999/xhtml";
+ declare namespace tei="http://www.tei-c.org/ns/1.0";
+ declare namespace j="http://jewishliturgy.org/ns/jlptei/1.0";
+ declare namespace http="http://expath.org/ns/http-client";
+ declare namespace output="http://www.w3.org/2010/xslt-xquery-serialization";
+ declare namespace ol="http://jewishliturgy.org/ns/outline/1.0";
+ declare namespace olx="http://jewishliturgy.org/ns/outline/responses/1.0";
+ """
+}
+
+class TestOutlines extends DbTest with CommonTestOutlines {
+ override def beforeAll() {
+ super.beforeAll()
+
+ setupUsers(2)
+ setupResource("src/test/resources/api/data/outlines/existing.xml", "existing", "outlines", 1)
+ setupResource("src/test/resources/api/data/outlines/test_everything_ok.xml", "test_everything_ok", "outlines", 1)
+ setupResource("src/test/resources/api/data/outlines/test_outline.xml", "test_outline", "outlines", 1)
+ setupResource("src/test/resources/api/data/outlines/title_exists_once.xml", "title_exists_once", "original", 1, Some("en"))
+ setupResource("src/test/resources/api/data/outlines/title_contains_source_one_time.xml", "title_contains_source_one_time", "original", 1, Some("en"))
+ setupResource("src/test/resources/api/data/outlines/title_has_source_and_pages_one_time.xml", "title_has_source_and_pages_one_time", "original", 1, Some("en"))
+ setupResource("src/test/resources/api/data/outlines/title_exists_twice.xml", "title_exists_twice", "original", 1, Some("en"))
+ setupResource("src/test/resources/api/data/outlines/title_exists_twice-1.xml", "title_exists_twice-1", "original", 1, Some("en"))
+ setupResource("src/test/resources/api/data/outlines/title_has_been_confirmed.xml", "title_has_been_confirmed", "original", 1, Some("en"))
+ setupResource("src/test/resources/api/data/outlines/title_already_confirmed_and_duplicated.xml", "title_already_confirmed_and_duplicated", "original", 1, Some("en"))
+ setupResource("src/test/resources/api/data/outlines/title_already_confirmed_and_duplicated-1.xml", "title_already_confirmed_and_duplicated-1", "original", 1, Some("en"))
+ setupResource("src/test/resources/api/data/outlines/title_duplicated_and_subordinates_exist_with_same_pointers.xml", "title_duplicated_and_subordinates_exist_with_same_pointers", "original", 1, Some("en"))
+ setupResource("src/test/resources/api/data/outlines/title_duplicated_and_subordinates_exist_with_different_pointers.xml", "title_duplicated_and_subordinates_exist_with_different_pointers", "original", 1, Some("en"))
+ setupResource("src/test/resources/api/data/outlines/sub_one.xml", "sub_one", "original", 1, Some("en"))
+ setupResource("src/test/resources/api/data/outlines/sub_two.xml", "sub_two", "original", 1, Some("en"))
+ setupResource("src/test/resources/api/data/outlines/has_a_status.xml", "has_a_status", "original", 1, Some("en"))
+ setupResource("src/test/resources/api/data/outlines/test_outline_with_error.xml", "test_outline_with_error", "outlines", 1)
+ setupResource("src/test/resources/api/data/outlines/test_outline_with_unconfirmed.xml", "test_outline_with_unconfirmed", "outlines", 1)
+ setupResource("src/test/resources/api/data/outlines/has_unconfirmed.xml", "has_unconfirmed", "original", 1, Some("en"))
+ setupResource("src/test/resources/api/data/outlines/test_outline_source.xml", "test_outline_source", "sources", 1)
+ setupResource("src/test/resources/api/data/outlines/test_outline_executable.xml", "test_outline_executable", "outlines", 1)
+ setupResource("src/test/resources/api/data/outlines/test_outline_executable_with_duplicates.xml", "test_outline_executable_with_duplicates", "outlines", 1)
+ setupResource("src/test/resources/api/data/outlines/test_outline_executable_with_external_duplicates.xml", "test_outline_executable_with_external_duplicates", "outlines", 1)
+ }
+
+ override def afterAll() {
+ teardownResource("test_outline_executable_with_external_duplicates", "original", 1)
+ teardownResource("test_outline_executable_with_external_duplicates", "outlines", 1)
+ teardownResource("test_outline_executable_with_duplicates", "original", 1)
+ teardownResource("test_outline_executable_with_duplicates", "outlines", 1)
+ teardownResource("test_outline_executable_duplicate", "original", 1)
+ teardownResource("test_outline_executable_duplicate_with_items", "original", 1)
+ teardownResource("test_sub_one", "original", 1)
+ teardownResource("test_sub_two", "original", 1)
+ teardownResource("test_outline_executable", "original", 1)
+ teardownResource("test_outline_executable_new_title", "original", 1)
+ teardownResource("test_outline_executable", "outlines", 1)
+ teardownResource("test_outline_source", "sources", 1)
+ teardownResource("has_unconfirmed", "original", 1)
+ teardownResource("test_outline_with_unconfirmed", "outlines", 1)
+ teardownResource("test_outline_with_error", "outlines", 1)
+ teardownResource("has_a_status", "original", 1)
+ teardownResource("sub_two", "original", 1)
+ teardownResource("sub_one", "original", 1)
+ teardownResource("title_duplicated_and_subordinates_exist_with_different_pointers", "original", 1)
+ teardownResource("title_duplicated_and_subordinates_exist_with_same_pointers", "original", 1)
+ teardownResource("title_already_confirmed_and_duplicated-1", "original", 1)
+ teardownResource("title_already_confirmed_and_duplicated", "original", 1)
+ teardownResource("title_has_been_confirmed", "original", 1)
+ teardownResource("title_exists_twice-1", "original", 1)
+ teardownResource("title_exists_twice", "original", 1)
+ teardownResource("title_contains_source_one_time-1", "original", 1)
+ teardownResource("title_contains_source_one_time", "original", 1)
+ teardownResource("title_has_source_and_pages_one_time-1", "original", 1)
+ teardownResource("title_has_source_and_pages_one_time", "original", 1)
+ teardownResource("title_exists_once-1", "original", 1)
+ teardownResource("title_exists_once", "original", 1)
+ teardownResource("test_outline", "outlines", 1)
+ teardownResource("test_everything_ok", "outlines", 1)
+ teardownResource("existing", "outlines", 1)
+ teardownUsers(2)
+
+ super.afterAll()
+ }
+
+ override def beforeEach(): Unit = {
+ super.beforeEach()
+ }
+
+ override def afterEach(): Unit = {
+ super.afterEach()
+ }
+
+ describe("outl:get") {
+ it("gets an existing resource, no check") {
+ xq("""outl:get("existing", ())""")
+ .assertXPath("""exists($output/ol:outline)""", "Returns a TEI resource")
+ .go
+ }
+
+ it("fails to get a nonexisting resource, no check") {
+ xq("""outl:get("does_not_exist", ())""")
+ .assertHttpNotFound
+ .go
+ }
+
+ it("gets an existing resource, with identity check") {
+ val identity = readXmlFile("src/test/resources/api/data/outlines/test_everything_ok.xml")
+ xq("""outl:get("test_everything_ok", "1")/*""")
+ .assertXmlEquals(identity)
+ .go
+ }
+
+ it("gets an existing resource, with logic check") {
+ xq("""outl:get("test_outline", "1")""")
+ .assertXPathEquals("$output/ol:outline/ol:item[1]",
+ "for each item without a duplicate title, return the item as-is",
+ """
+ TitleDoesNotExist
+ 1
+ 2
+ """)
+ .assertXPathEquals("$output/ol:outline/ol:item[2]",
+ "for each item with a duplicate title external to the outline without a duplication confirmation, " +
+ "return an olx:sameAs with an olx:uri for each duplicate entry (title exists once)",
+ """
+ Title Exists Once
+ 3
+ 4
+
+ /data/original/title_exists_once
+
+ """)
+ .assertXPathEquals("$output/ol:outline/ol:item[3]",
+ "for each item with a duplicate title external to the outline without a duplication confirmation, " +
+ "return an olx:sameAs with an olx:uri for each duplicate entry (title exists more than once)",
+ """
+ Title Exists Twice
+ 5
+ 6
+
+ /data/original/title_exists_twice
+
+
+ /data/original/title_exists_twice-1
+
+ """)
+ .assertXPathEquals("$output/ol:outline/ol:item[4]",
+ "for an item with a duplicate title that is already confirmed, the confirmation is maintained exactly",
+ """
+ Title Has Been Confirmed
+ 7
+ 8
+
+ /data/original/title_has_been_confirmed
+
+
+ """)
+ .assertXPathEquals("$output/ol:outline/ol:item[5]",
+ "for an item with a duplicate title that is already confirmed and duplicated again, " +
+ "the confirmation is maintained exactly and the additional duplicate is recorded with a negative confirmation",
+ """
+ Title Already Confirmed And Duplicated
+ 9
+ 10
+
+ /data/original/title_already_confirmed_and_duplicated
+
+
+
+ /data/original/title_already_confirmed_and_duplicated-1
+
+
+ """)
+ .assertXPathEquals("$output/ol:outline/ol:item[6]",
+ "Title already exists and has subordinates that are referenced and have the same pointers in the same order",
+ """
+ Title Duplicated And Subordinates Exist With Same Pointers
+ 11
+ 12
+
+ /data/original/title_duplicated_and_subordinates_exist_with_same_pointers
+
+
+ Sub One
+
+ /data/original/sub_one
+
+
+
+ Sub Two
+
+ /data/original/sub_two
+
+
+ """
+ )
+ .assertXPathEquals("$output/ol:outline/ol:item[7]",
+ "Title already exists and has subordinates that are referenced and have the same pointers in different order",
+ """
+ Title Duplicated And Subordinates Exist With Different Pointers
+ 13
+ 14
+
+ /data/original/title_duplicated_and_subordinates_exist_with_different_pointers
+ ...
+
+
+ Sub Two
+
+ /data/original/sub_two
+
+
+
+ Sub One
+
+ /data/original/sub_one
+
+
+ """)
+ .assertXPathEquals("$output/ol:outline/ol:item[8]",
+ "if the document has a confirmed identity and a status with respect to the source, the status is returned",
+ """
+ Has A Status
+ 15
+ 16
+
+ /data/original/has_a_status
+
+
+ outlined
+ """
+ )
+ .assertXPathEquals("$output/ol:outline/ol:item[9]",
+ "if there is an internal duplicate title and one has items and the other does not, do nothing to the one that has items",
+ """
+ InternalDuplicate
+ 17
+ 18
+
+ SubThree
+
+
+ SubFour
+
+ """
+ )
+ .assertXPathEquals("$output/ol:outline/ol:item[10]",
+ "if there is an internal duplicate title and one has items and the other does not, do nothing to the one that has no items",
+ """
+ InternalDuplicate
+ 19
+ 20
+ """
+ )
+ .assertXPathEquals("$output/ol:outline/ol:item[11]",
+ "if there is an internal duplicate title and both have identical items, do nothing to the duplicate",
+ """
+ InternalDuplicate
+ 21
+ 22
+
+ SubThree
+
+
+ SubFour
+
+ """
+ )
+ .assertXPathEquals("$output/ol:outline/ol:item[12]",
+ "if there is an internal duplicate title and the items are not identical, flag olx:error on the first copy",
+ """
+ BadInternalDuplicate
+ 23
+ 24
+ ...
+
+ SubFive
+
+ """
+ )
+ .assertXPathEquals("$output/ol:outline/ol:item[13]",
+ "if there is an internal duplicate title and the items are not identical, flag olx:error on the second copy",
+ """
+ BadInternalDuplicate
+ 25
+ 26
+ ...
+
+ SubSix
+
+ """
+ )
+ .assertXPath("outl:validate($output, ())", "the resulting file is valid")
+ .go
+ }
+ }
+
+ describe("outl:post with execute") {
+ it("fails on an outline file with olx:error after check") {
+ xq("""outl:post-execute("test_outline_with_error")""")
+ .user("xqtest1")
+ .assertHttpBadRequest
+ .go
+ }
+
+ it("fails on an outline file with an unconfirmed olx:sameAs") {
+ xq("""outl:post-execute("test_outline_with_unconfirmed")""")
+ .user("xqtest1")
+ .assertHttpBadRequest
+ .go
+ }
+
+ it("executes an executable outline") {
+ val expectedResult = readXmlFile("src/test/resources/api/data/outlines/test_outline_executable_result.xml")
+ xq("""outl:post-execute("test_outline_executable")""")
+ .user("xqtest1")
+ .assertXPathEquals("$output/*", "Result is a copy of the rewritten outline", expectedResult)
+ .assertXPathEquals("""doc("/db/data/outlines/test_outline_executable.xml")/*""",
+ "the original outline file has been rewritten to correspond to the new data from execution",
+ expectedResult)
+ .assertXPath("""exists(data:doc("/data/original/test_outline_executable"))""", "the outline main file exists")
+ .assertXPath("""contains(document-uri(data:doc("/data/original/test_outline_executable")), "/en")""", "the outline main file is placed in the correct collection for its language")
+ .assertXPath("""data:doc("/data/original/test_outline_executable")//tei:titleStmt/tei:title[@type="main"]="test_outline_executable"""", "the outline main file has the correct title")
+ .assertXPath("""data:doc("/data/original/test_outline_executable")/tei:TEI/@xml:lang="en"""", "the outline main file references the correct xml:lang")
+ .assertXPath("""data:doc("/data/original/test_outline_executable")//tei:availability/tei:licence/@target="http://www.creativecommons.org/publicdomain/zero/1.0"""", "the outline main file references the correct license")
+ .assertXPath("""data:doc("/data/original/test_outline_executable")//tei:sourceDesc/tei:bibl[@j:docStatus="outlined"]/tei:ptr[@type="bibl"]/@target="/data/sources/test_outline_source"""", "the outline main file references the correct source and status")
+ .assertXPath("""data:doc("/data/original/test_outline_executable")//j:streamText/tei:ptr/@target="/data/original/test_outline_executable_new_title#stream"""", "the outline main file has a streamText containing a pointer to the included file")
+ .assertXPath("""empty(data:doc("/data/original/test_outline_executable")//j:streamText/tei:seg)""", "the outline main file streamText filler has been removed")
+ .assertXPath("""count(data:doc("/data/original/test_outline_executable")//tei:revisionDesc/tei:change[@type="created"])=1""", "the outline main file has 1 creation change record")
+ .assertXPath("""count(data:doc("/data/original/test_outline_executable")//tei:revisionDesc/tei:change[@type="edited"])=1""", "the outline main file has 1 edit change record")
+ .assertXPath("""exists(data:doc("/data/original/test_outline_executable_new_title"))""", "the outline included file exists")
+ .assertXPath("""contains(document-uri(data:doc("/data/original/test_outline_executable_new_title")), "/en")""", "the outline included file is placed in the correct collection for its language")
+ .assertXPath("""data:doc("/data/original/test_outline_executable_new_title")//tei:titleStmt/tei:title[@type="main"]="test_outline_executable_new_title"""", "the outline included file has the correct title")
+ .assertXPath("""data:doc("/data/original/test_outline_executable_new_title")/tei:TEI/@xml:lang="en"""", "the outline included file references the correct xml:lang")
+ .assertXPath("""data:doc("/data/original/test_outline_executable_new_title")//tei:availability/tei:licence/@target="http://www.creativecommons.org/publicdomain/zero/1.0"""", "the outline included file references the correct license")
+ .assertXPath("""data:doc("/data/original/test_outline_executable_new_title")//tei:titleStmt/tei:respStmt[tei:resp[@key="trc"][.="Transcribed by"]][tei:name[@ref="/user/xqtest1"]]""", "the outline included file references a contributor credit")
+ .assertXPath("""data:doc("/data/original/test_outline_executable_new_title")//tei:sourceDesc/tei:bibl[@j:docStatus="outlined"][tei:biblScope[@unit="pages"][@from="1"][@to="2"]]/tei:ptr[@type="bibl"]/@target="/data/sources/test_outline_source"""", "the outline included file references the correct source, status, and page numbers")
+ .assertXPath("""count(data:doc("/data/original/test_outline_executable_new_title")//j:streamText/tei:seg)=2""", "the outline included file has a streamText containing filler")
+ .assertXPath("""count(data:doc("/data/original/test_outline_executable_new_title")//tei:revisionDesc/tei:change[@type="created"])=1""", "the outline included file has 1 creation change record")
+ .assertXPath("""count(data:doc("/data/original/test_outline_executable_new_title")//tei:revisionDesc/tei:change[@type="edited"])=0""", "the outline included file has no edit change records")
+ .go
+ }
+
+ it("executes an outline with duplicates") {
+ xq("""outl:post-execute("test_outline_executable_with_duplicates")""")
+ .user("xqtest1")
+ .assertXPath("""exists(data:doc("/data/original/test_outline_executable_with_duplicates"))""", "the outline main file exists")
+ .assertXPath("""
+ let $d := data:doc("/data/original/test_outline_executable_with_duplicates")
+ let $st := $d//j:streamText
+ return
+ count($st/tei:ptr[@target='/data/original/test_outline_executable_duplicate#stream'])=2 and
+ count($st/tei:ptr[@target='/data/original/test_outline_executable_duplicate_with_items#stream'])=2
+ """, "The main outline file references test_outline_executable_duplicate 2x and test_outline_executable_duplicate_with_items 2x")
+ .assertXPath("""count(collection("/db/data/original/en")/tei:TEI[descendant::tei:titleStmt/tei:title[@type="main"][.="Test Outline Executable Duplicate"]])=1""",
+ "Documents with the title TestOutlineExecutableDuplicate exist only once")
+ .assertXPath("""count(data:doc("/data/original/test_outline_executable_duplicate")//tei:revisionDesc/tei:change)=1""",
+ "TestOutlineExecutableDuplicate has been written to once on creation, since it has no filler pointers")
+ .assertXPath("""
+ let $b := data:doc("/data/original/test_outline_executable_duplicate")//tei:sourceDesc/tei:bibl
+ return
+ count($b/tei:biblScope)=2
+ and exists($b/tei:biblScope[@unit='pages'][@from='1'][@to='2'])
+ and exists($b/tei:biblScope[@unit='pages'][@from='3'][@to='4'])
+ """, "TestOutlineExecutableDuplicate references two different page ranges")
+ .assertXPath("""count(collection("/db/data/original/en")/tei:TEI[descendant::tei:titleStmt/tei:title[@type="main"][.="Test Outline Executable Duplicate With Items"]])=1""",
+ "Documents with the title TestOutlineExecutableDuplicateWithItems exist only once")
+ .assertXPath("""
+ let $st := data:doc("/data/original/test_outline_executable_duplicate_with_items")//j:streamText
+ return exists($st/tei:ptr[1]["/data/original/test_sub_one#stream"=@target])
+ and exists($st/tei:ptr[2]["/data/original/test_sub_two#stream"=@target])
+ """, "TestOutlineExecutableDuplicateWithItems has a streamText that points to its two subordinates")
+ .assertXPath("""exists(data:doc("/data/original/test_sub_one"))""", "TestSubOne exists")
+ .assertXPath("""exists(data:doc("/data/original/test_sub_two"))""", "TestSubTwo exists")
+ .assertXPathEquals("$output/*", "The return outline contains the expected data and references",
+ readXmlFile("src/test/resources/api/data/outlines/test_outline_executable_with_duplicates_result.xml"))
+ .go
+ }
+
+ it("executes an outline containing external duplicate references") {
+ xq("""outl:post-execute("test_outline_executable_with_external_duplicates")""")
+ .user("xqtest1")
+ //.assertXPath("false()", "forced fail")
+ .assertXPath("""exists(data:doc("/data/original/test_outline_executable_with_external_duplicates"))""", "the outline main file exists")
+ /*.assertXPath("""count(collection("/db/data/original/en")//tei:titleStmt/tei:title[@type="main"][.="title_already_confirmed_and_duplicated"])=1""",
+ "There is only file with the same title as the confirmed resource")*/
+ .assertXPath("""exists(data:doc("/data/original/title_already_confirmed_and_duplicated")//tei:sourceDesc/tei:bibl[@j:docStatus="outlined"]/tei:ptr[@type="bibl"]["/data/sources/test_outline_source"=@target])""",
+ "A reference to the source has been added to the confirmed resource")
+ .assertXPath("""exists(data:doc("/data/original/title_already_confirmed_and_duplicated")//tei:sourceDesc/tei:bibl[@j:docStatus="outlined"]/tei:biblScope[@unit="pages"][@from="1"][@to="2"])""",
+ "A reference to the source's pages has been added to the confirmed resource")
+ .assertXPath("""exists(data:doc("/data/original/title_already_confirmed_and_duplicated")//tei:revisionDesc/tei:change[1][@type="edited"][contains(., "outline tool")])""",
+ "An edited by change record has been added to the confirmed resource")
+ .assertXPath(
+ """every $resource in ("Title Already Confirmed And Duplicated", "Title Duplicated And Subordinates Exist With Same Pointers", "Title Contains Source One Time", "Title Has Source And Pages One Time") satisfies
+ count($output//ol:item[ol:title=$resource]/olx:sameAs[olx:yes])=1""",
+ "For each confirmed resource, a single olx:sameAs[olx:yes] record exists in the output outline")
+ .assertXPath("""data:doc("/data/original/title_already_confirmed_and_duplicated")//j:streamText/tei:seg[1]="Test data."""",
+ "The text data in the confirmed resource has not been overwritten")
+ .assertXPath("""exists(data:doc("/data/original/title_exists_once-1"))""",
+ "A second file with the same title and different URI as the confirmed negative file has been created")
+ .assertXPath("""exists($output/ol:outline/ol:item[ol:title="Title Exists Once"]/olx:sameAs[olx:yes]/olx:uri="/data/original/title_exists_once-1")""",
+ "The second file is referenced in the returned outline")
+ .assertXPath("""exists(data:doc("/data/original/title_duplicated_and_subordinates_exist_with_same_pointers")//tei:sourceDesc/tei:bibl[tei:ptr[@type="bibl"]["/data/sources/test_outline_source"=@target]])""",
+ "When the title is duplicated and sub-items exist, a reference to the source has been added to the file")
+ .assertXPath("""exists(data:doc("/data/original/title_contains_source_one_time")//tei:sourceDesc/tei:bibl[tei:ptr[@type="bibl"]["/data/sources/test_outline_source"=@target]][tei:biblScope[@unit="pages"][@from="11"][@to="12"]])""",
+ "When the title is confirmed and the source is already referenced, page numbers are added")
+ .assertXPath("""count(data:doc("/data/original/title_has_source_and_pages_one_time")//tei:sourceDesc/tei:bibl[@j:docStatus="outlined"][tei:ptr/@target="/data/sources/test_outline_source"][count(tei:biblScope)=1])=1""",
+ "When the title is confirmed and the source and pages already referenced, @j:docStatus is added to the tei:bibl and only 1 biblScope exists")
+ .assertXPathEquals("""data:doc("/data/original/title_exists_once")/*""", "The confirmed negative duplicate file remains unchanged",
+ readXmlFile("src/test/resources/api/data/outlines/title_exists_once.xml"))
+ .go
+ }
+ }
+
+ describe("outl:list") {
+ it("lists all resources") {
+ xq("""outl:list("", 1, 100)""")
+ .assertSearchResults
+ .assertXPath("""count($output//html:li[@class="result"])>=1""", "returns at least 1 result")
+ .go
+ }
+
+ it("lists some resources") {
+ xq("""outl:list("", 1, 1)""")
+ .user("xqtest1")
+ .assertXPath("""count($output//html:li[@class="result"])=1""", "returns 1 result")
+ .assertSearchResults
+ .go
+ }
+
+ it("responds to a query") {
+ xq("""outl:list("existing", 1, 100)""")
+ .assertXPath("""count($output//html:ol[@class="results"]/html:li)=1""", "returns 1 result (existing)")
+ .assertSearchResults
+ .go
+ }
+ }
+}
+
+class TestOutlinesDelete extends DbTest with CommonTestOutlines {
+
+ override def beforeEach(): Unit = {
+ super.beforeEach()
+
+ setupUsers(1)
+ setupResource("src/test/resources/api/data/outlines/existing.xml", "existing", "outlines", 1)
+ }
+
+ override def afterEach(): Unit = {
+ super.afterEach()
+
+ teardownResource("existing", "outlines", 1)
+ teardownUsers(1)
+ }
+
+ describe("outl:delete") {
+ it("removes an existing resource") {
+ xq("""outl:delete("existing")""")
+ .user("xqtest1")
+ .assertHttpNoData
+ .go
+ }
+
+ it("does not remove an existing resource when unauthenticated") {
+ xq("""outl:delete("existing")""")
+ .assertHttpUnauthorized
+ .go
+ }
+
+ it("fails to remove a nonexisting resource") {
+ xq("""outl:delete("does_not_exist")""")
+ .user("xqtest1")
+ .assertHttpNotFound
+ .go
+ }
+ }
+}
\ No newline at end of file
diff --git a/opensiddur-extensions/src/test/scala/org/opensiddur/api/data/TestSources.scala b/opensiddur-extensions/src/test/scala/org/opensiddur/api/data/TestSources.scala
new file mode 100644
index 00000000..63a8e57d
--- /dev/null
+++ b/opensiddur-extensions/src/test/scala/org/opensiddur/api/data/TestSources.scala
@@ -0,0 +1,273 @@
+package org.opensiddur.api.data
+
+import org.opensiddur.DbTest
+
+trait CommonTestSources {
+ val prolog =
+ """xquery version '3.1';
+ import module namespace tcommon="http://jewishliturgy.org/test/tcommon"
+ at "xmldb:exist:/db/apps/opensiddur-server/test/tcommon.xqm";
+
+ import module namespace src="http://jewishliturgy.org/api/data/sources"
+ at "xmldb:exist:///db/apps/opensiddur-server/api/data/sources.xqm";
+ import module namespace magic="http://jewishliturgy.org/magic"
+ at "xmldb:exist:///db/apps/opensiddur-server/magic/magic.xqm";
+
+ declare namespace html="http://www.w3.org/1999/xhtml";
+ declare namespace tei="http://www.tei-c.org/ns/1.0";
+ declare namespace j="http://jewishliturgy.org/ns/jlptei/1.0";
+ declare namespace http="http://expath.org/ns/http-client";
+ declare namespace output="http://www.w3.org/2010/xslt-xquery-serialization";
+ """
+}
+
+class TestSources extends DbTest with CommonTestSources {
+ override def beforeAll() {
+ super.beforeAll()
+
+ setupUsers(2)
+ setupResource("src/test/resources/api/data/sources/existing.xml", "existing", "sources", 1)
+ setupResource("src/test/resources/api/data/sources/existing.xml", "no_access", "sources", 2,
+ None, Some("everyone"), Some("rw-------"))
+ setupResource("src/test/resources/api/data/sources/existing.xml", "no_write_access", "sources", 2,
+ None, Some("everyone"), Some("rw-r--r--"))
+ setupResource("src/test/resources/api/data/sources/test_bibliography.xml", "test_bibliography", "sources", 1)
+ setupResource("src/test/resources/api/data/sources/test_document_1.xml", "test_document_1", "original", 1, Some("en"))
+ setupResource("src/test/resources/api/data/sources/test_document_2.xml", "test_document_2", "original", 1, Some("en"))
+ setupResource("src/test/resources/api/data/sources/test_document_3.xml", "test_document_3", "original", 1, Some("en"))
+ setupResource("src/test/resources/api/data/sources/test_document_4.xml", "test_document_4", "original", 1, Some("en"))
+ setupResource("src/test/resources/api/data/sources/test_document_5.xml", "test_document_5", "original", 1, Some("en"))
+
+ }
+
+ override def afterAll() {
+ teardownResource("test_document_5", "original", 1)
+ teardownResource("test_document_4", "original", 1)
+ teardownResource("test_document_3", "original", 1)
+ teardownResource("test_document_2", "original", 1)
+ teardownResource("test_document_1", "original", 1)
+ teardownResource("test_bibliography", "sources", 1)
+ teardownResource("no_write_access", "sources", 2)
+ teardownResource("no_access", "sources", 2)
+ teardownResource("existing", "sources", 1)
+ teardownResource("valid", "sources", 1)
+ teardownUsers(2)
+
+ super.afterAll()
+ }
+
+ override def beforeEach(): Unit = {
+ super.beforeEach()
+ }
+
+ override def afterEach(): Unit = {
+ super.afterEach()
+ }
+
+ describe("src:get") {
+ it("gets an existing resource") {
+ xq("""src:get("existing")""")
+ .assertXPath("""exists($output/tei:biblStruct)""", "Returns a TEI resource")
+ .go
+ }
+
+ it("fails to get a nonexisting resource") {
+ xq("""src:get("does_not_exist")""")
+ .assertHttpNotFound
+ .go
+ }
+
+ it("fails to get a resource with no read access") {
+ xq("""src:get("no_access")""")
+ .assertHttpNotFound
+ .go
+ }
+ }
+
+ describe("src:list") {
+ it("lists all resources") {
+ xq("""src:list("", 1, 100)""")
+ .user("xqtest1")
+ .assertSearchResults
+ .assertXPath("""count($output//html:li[@class="result"])>=1""", "returns at least 1 result")
+ .go
+ }
+
+ it("does not list resources with no access when unauthenticated") {
+ xq("""src:list("", 1, 100)""")
+ .assertSearchResults
+ .assertXPath("""count($output//html:li[@class="result"])>=1""", "returns at least 1 result")
+ .assertXPath("""empty($output//html:li[@class="result"]/html:a[@class="document"]/@href[contains(., "no_access")])""",
+ "does not list resource with no read access")
+ .go
+ }
+
+ it("lists some resources") {
+ xq("""src:list("", 1, 2)""")
+ .user("xqtest1")
+ .assertXPath("""count($output//html:li[@class="result"])=2""", "returns 2 results")
+ .assertSearchResults
+ .go
+ }
+
+ it("responds to a query") {
+ xq("""src:list("existing", 1, 100)""")
+ .assertXPath("""count($output//html:ol[@class="results"]/html:li)=2""", "returns 2 results (existing and no_write_access)")
+ .assertSearchResults
+ .go
+ }
+ }
+
+ describe("src:post") {
+ val validDoc = readXmlFile("src/test/resources/api/data/sources/valid.xml")
+ it("posts a valid resource") {
+ xq(s"""src:post(document { $validDoc })""")
+ .user("xqtest1")
+ .assertHttpCreated
+ .go
+ }
+
+ it("fails to post a valid resource unauthenticated") {
+ xq(s"""src:post(document { $validDoc })""")
+ .assertHttpUnauthorized
+ .go
+ }
+
+ it("fails to post an invalid resource") {
+ xq(s"""src:post(document { invalid })""")
+ .user("xqtest1")
+ .assertHttpBadRequest
+ .go
+ }
+ }
+
+ describe("src:put") {
+ val validDoc = readXmlFile("src/test/resources/api/data/sources/existing_after_put.xml")
+ it("puts a valid resource to an existing resource") {
+ xq(s"""src:put("existing", document { $validDoc })""")
+ .user("xqtest1")
+ .assertHttpNoData
+ .assertXPath(
+ """collection('/data/sources')[descendant::tei:title[.='existing']]//tei:date/@when=1920""", "new document has been saved")
+ .go
+ }
+
+ it("fails to put a resource when unauthenticated") {
+ xq(s"""src:put("existing", document { $validDoc })""")
+ .assertHttpUnauthorized
+ .go
+ }
+
+ it("fails to put a valid resource to a nonexisting resource") {
+ val validDoc = readXmlFile("src/test/resources/api/data/styles/valid.xml")
+ xq(s"""src:put("does_not_exist", document { $validDoc })""")
+ .user("xqtest1")
+ .assertHttpNotFound
+ .go
+ }
+
+ it("fails to put an invalid resource") {
+ xq(s"""src:put("existing", document { invalid })""")
+ .user("xqtest1")
+ .assertHttpBadRequest
+ .go
+ }
+ }
+
+ describe("src:pages") {
+ it("fails when the resource does not exist") {
+ xq("""src:pages("does_not_exist")""")
+ .assertHttpNotFound
+ .go
+ }
+
+ it("returns an empty list when there are no pages to return") {
+ xq("""src:pages("existing")""")
+ .assertXPath("""exists($output/self::html:html)""", "html is returned")
+ .assertXPath("""exists($output//html:ol[@class="results"]) and empty($output//html:ol[@class="results"]/*)""", "an empty list is returned")
+ .go
+ }
+
+ it("lists pages when there are results") {
+ xq("""src:pages("test_bibliography")""")
+ .assertXPath("""count($output//html:ol[@class="results"]/html:li[@class="result"]) > 0""", "some results are returned")
+ .assertXPath("""
+ let $pages :=
+ for $p in $output//html:ol[@class="results"]/html:li[@class="result"]/html:span[@class="page"] return xs:integer($p)
+ return every $pg in (1 to 7) satisfies $pg=$pages
+ """, "all pages are represented by a list element")
+ .assertXPath("""count($output//html:ol[@class="results"]/html:li[@class="result"][not(html:span[@class="page"])])=1""", "results without pages are represented by a list element")
+ .assertXPath(
+ """every $li in $output//html:ol[@class="results"]/html:li[html:span[@class="page"]][position() >= 2]
+ satisfies $li/html:span[@class="page"]/number() >= $li/preceding-sibling::html:li[1]/html:span[@class="page"]/number() """, "pages (where they exist) are ordered")
+ .assertXPath("""exists($output//html:ol[@class="results"]/html:li[@class="result"][html:span[@class="page"]=1][ends-with(html:a/@href, "test_document_1")])""", "test_document_1 is represented as page 1")
+ .assertXPath("""
+ every $v in (for $pg at $n in $output//html:ol[@class="results"]/html:li[@class="result"][ends-with(html:a/@href, "test_document_2")]/html:span/@page/number()
+ return $pg=(2 to 6)[$n]) satisfies $v
+ """, "test_document_2 is represented as pages 2-6")
+ .assertXPath("""
+ every $v in (for $pg at $n in $output//html:ol[@class="results"]/html:li[@class="result"][ends-with(html:a/@href, "test_document_3")]/html:span/@page/number()
+ return $pg=(4 to 5)[$n]) satisfies $v
+ """, "test_document_3 is represented as pages 4-5 (overlap is allowed)")
+ .assertXPath("""
+ every $v in (for $pg at $n in $output//html:ol[@class="results"]/html:li[@class="result"][ends-with(html:a/@href, "test_document_4")]/html:span/@page/number()
+ return $pg=7) satisfies $v
+ """, "test_document_4 is represented as page 7")
+ .assertXPath("""every $v in (for $status at $n in $output//html:ol[@class="results"]/html:li[@class="result"][ends-with(html:a/@href, "test_document_4")]/html:ul[@class="statuses"]/html:li[@class="status"]/string() return $status=("proofread-once", "transcribed")[$n]) satisfies $v
+ """, "test_document_4 has its status represented")
+ .assertXPath("""exists($output//html:ol[@class="results"]/html:li[@class="result"][ends-with(html:a/@href, "test_document_5")][not(html:span[@class="page"])])""", "test_document_5 (no page) is represented with no page span")
+ .go
+
+ }
+ }
+
+}
+
+class TestSourcesDelete extends DbTest with CommonTestSources {
+
+ override def beforeEach(): Unit = {
+ super.beforeEach()
+
+ setupUsers(2)
+ setupResource("src/test/resources/api/data/sources/existing.xml", "existing", "sources", 1)
+ setupResource("src/test/resources/api/data/sources/existing.xml", "no_write_access", "sources", 2,
+ None, Some("everyone"), Some("rw-r--r--"))
+ }
+
+ override def afterEach(): Unit = {
+ super.afterEach()
+
+ teardownResource("existing", "sources", 1)
+ teardownResource("no_write_access", "sources", 2)
+ teardownUsers(2)
+ }
+
+ describe("src:delete") {
+ it("removes an existing resource") {
+ xq("""src:delete("existing")""")
+ .user("xqtest1")
+ .assertHttpNoData
+ .go
+ }
+
+ it("does not remove an existing resource when unauthenticated") {
+ xq("""src:delete("existing")""")
+ .assertHttpUnauthorized
+ .go
+ }
+
+ it("fails to remove a nonexisting resource") {
+ xq("""src:delete("does_not_exist")""")
+ .user("xqtest1")
+ .assertHttpNotFound
+ .go
+ }
+
+ it("fails to remove a resource without write access") {
+ xq("""src:delete("no_write_access")""")
+ .user("xqtest1")
+ .assertHttpForbidden
+ .go
+ }
+ }
+}
\ No newline at end of file
diff --git a/opensiddur-extensions/src/test/scala/org/opensiddur/api/data/TestStyles.scala b/opensiddur-extensions/src/test/scala/org/opensiddur/api/data/TestStyles.scala
new file mode 100644
index 00000000..f74723b1
--- /dev/null
+++ b/opensiddur-extensions/src/test/scala/org/opensiddur/api/data/TestStyles.scala
@@ -0,0 +1,368 @@
+package org.opensiddur.api.data
+
+import org.opensiddur.DbTest
+
+trait CommonTestStyles {
+ val prolog =
+ """xquery version '3.1';
+ import module namespace tcommon="http://jewishliturgy.org/test/tcommon"
+ at "xmldb:exist:/db/apps/opensiddur-server/test/tcommon.xqm";
+
+ import module namespace sty="http://jewishliturgy.org/api/data/styles"
+ at "xmldb:exist:///db/apps/opensiddur-server/api/data/styles.xqm";
+ import module namespace magic="http://jewishliturgy.org/magic"
+ at "xmldb:exist:///db/apps/opensiddur-server/magic/magic.xqm";
+
+ declare namespace html="http://www.w3.org/1999/xhtml";
+ declare namespace tei="http://www.tei-c.org/ns/1.0";
+ declare namespace j="http://jewishliturgy.org/ns/jlptei/1.0";
+ declare namespace http="http://expath.org/ns/http-client";
+ declare namespace output="http://www.w3.org/2010/xslt-xquery-serialization";
+ declare namespace a="http://jewishliturgy.org/ns/access/1.0";
+
+ """
+}
+
+class TestStyles extends DbTest with CommonTestStyles {
+ override def beforeAll() {
+ super.beforeAll()
+
+ setupUsers(2)
+ setupResource("src/test/resources/api/data/styles/existing.xml", "existing", "styles", 1)
+ setupResource("src/test/resources/api/data/styles/existing.xml", "no_access", "styles", 2,
+ None, Some("everyone"), Some("rw-------"))
+ setupResource("src/test/resources/api/data/styles/no_write_access.xml", "no_write_access", "styles", 2,
+ None, Some("everyone"), Some("rw-r--r--"))
+
+ }
+
+ override def afterAll() {
+ // tear down users that were created by tests
+ teardownResource("no_write_access", "styles", 2)
+ teardownResource("no_access", "styles", 2)
+ teardownResource("existing", "styles", 1)
+ teardownResource("valid", "styles", 1)
+ teardownUsers(2)
+
+ super.afterAll()
+ }
+
+ override def beforeEach(): Unit = {
+ super.beforeEach()
+ }
+
+ override def afterEach(): Unit = {
+ super.afterEach()
+ }
+
+ describe("sty:get-xml") {
+ it("gets an existing resource") {
+ xq("""sty:get-xml("existing")""")
+ .assertXPath("""exists($output/tei:TEI)""", "Returns a TEI resource")
+ .go
+ }
+
+ it("fails to get a nonexisting resource") {
+ xq("""sty:get-xml("does_not_exist")""")
+ .assertHttpNotFound
+ .go
+ }
+
+ it("fails to get a resource with no read access") {
+ xq("""sty:get-xml("no_access")""")
+ .assertHttpNotFound
+ .go
+ }
+ }
+
+ describe("sty:get-css") {
+ it("gets an existing resource") {
+ xq("""sty:get-css("existing")""")
+ .assertXPath("""$output instance of xs:string and contains($output, ".tei-seg")""",
+ "Returns a string containing the CSS")
+ .go
+ }
+
+ it("fails to get a nonexisting resource") {
+ xq("""sty:get-css("does_not_exist")""")
+ .assertHttpNotFound
+ .go
+ }
+
+ it("fails to get a resource with no read access") {
+ xq("""sty:get-css("no_access")""")
+ .assertHttpNotFound
+ .go
+ }
+ }
+
+ describe("sty:list") {
+ it("lists all resources") {
+ xq("""sty:list("", 1, 100)""")
+ .user("xqtest1")
+ .assertSearchResults
+ .assertXPath("""count($output//html:li[@class="result"])>=1""", "returns at least 1 result")
+ .assertXPath("""
+ every $li in $output//html:li[@class="result"]
+ satisfies exists($li/html:a[@class="alt"][@property="access"])
+ """, "results include a pointer to access API")
+ .go
+ }
+
+ it("does not list resources with no access when unauthenticated") {
+ xq("""sty:list("", 1, 100)""")
+ .assertSearchResults
+ .assertXPath("""count($output//html:li[@class="result"])>=1""", "returns at least 1 result")
+ .assertXPath("""empty($output//html:li[@class="result"]/html:a[@class="document"]/@href[contains(., "no_access")])""",
+ "does not list resource with no read access")
+ .go
+ }
+
+ it("lists some resources") {
+ xq("""sty:list("", 1, 2)""")
+ .user("xqtest1")
+ .assertXPath("""count($output//html:li[@class="result"])=2""", "returns 2 results")
+ .assertSearchResults
+ .go
+ }
+
+ it("responds to a query") {
+ xq("""sty:list("query", 1, 100)""")
+ .assertXPath("""count($output//html:ol[@class="results"]/html:li)=1""", "returns 1 results")
+ .assertSearchResults
+ .go
+ }
+ }
+
+ describe("sty:post") {
+ val validDoc = readXmlFile("src/test/resources/api/data/styles/valid.xml")
+ it("posts a valid resource") {
+ xq(s"""sty:post(document { $validDoc })""")
+ .user("xqtest1")
+ .assertHttpCreated
+ // does styles have language?
+ .assertXPath(
+ """collection('/db/data/styles')[util:document-name(.)=tokenize($output//http:header[@name='Location']/@value,'/')[last()] || '.xml']//
+ tei:revisionDesc/tei:change[1][@type="created"][@who="/user/xqtest1"][@when]""",
+ "a change record has been added")
+ .go
+ }
+
+ it("fails to post a valid resource unauthenticated") {
+ xq(s"""sty:post(document { $validDoc })""")
+ .assertHttpUnauthorized
+ .go
+ }
+
+ it("fails to post an invalid resource") {
+ val invalidDoc = readXmlFile("src/test/resources/api/data/styles/invalid.xml")
+
+ xq(s"""sty:post(document { $invalidDoc })""")
+ .user("xqtest1")
+ .assertHttpBadRequest
+ .go
+ }
+ }
+
+ describe("sty:put-xml") {
+ val validDoc = readXmlFile("src/test/resources/api/data/styles/existing_after_put.xml")
+ it("puts a valid resource to an existing resource") {
+ xq(s"""sty:put-xml("existing", document { $validDoc })""")
+ .user("xqtest1")
+ .assertHttpNoData
+ // en?
+ .assertXPath(
+ """(collection('/db/data/styles')[util:document-name(.)='existing.xml']//tei:revisionDesc/tei:change)[1]
+ [@type="edited"][@who="/user/xqtest1"][@when]""", "a change record has been added")
+ .go
+ }
+
+ it("fails to put a resource when unauthenticated") {
+ xq(s"""sty:put-xml("existing", document { $validDoc })""")
+ .assertHttpUnauthorized
+ .go
+ }
+
+ it("fails to put a valid resource to a nonexisting resource") {
+ val validDoc = readXmlFile("src/test/resources/api/data/styles/valid.xml")
+ xq(s"""sty:put-xml("does_not_exist", document { $validDoc })""")
+ .user("xqtest1")
+ .assertHttpNotFound
+ .go
+ }
+
+ it("fails to put an invalid resource") {
+ val invalidDoc = readXmlFile("src/test/resources/api/data/styles/invalid.xml")
+ xq(s"""sty:put-xml("existing", document { $invalidDoc })""")
+ .user("xqtest1")
+ .assertHttpBadRequest
+ .go
+ }
+ }
+
+ describe("sty:put-css") {
+ val validDoc = readXmlFile("src/test/resources/api/data/styles/valid.xml")
+
+ it("puts a valid resource to an existing resource") {
+ xq(
+ """sty:put-css("existing", ".tei-div {display: none;}")""")
+ .user("xqtest1")
+ .assertHttpNoData
+ .assertXPath("""contains(
+ (collection('/db/data/styles')
+ [util:document-name(.)='existing.xml']//j:stylesheet[@scheme="css"])[1],
+ ".tei-div")""", "j:stylesheet content changed")
+ .assertXPath(
+ """(collection('/db/data/styles')[util:document-name(.)='existing.xml']//tei:revisionDesc/tei:change)[1]
+ [@type="edited"][@who="/user/xqtest1"][@when]""", "a change record has been added")
+ .go
+ }
+
+ it("fails to put a valid resource to an existing resource when unauthenticated") {
+ xq(
+ """sty:put-css("existing", ".tei-div {display: none;}")""")
+ .assertHttpUnauthorized
+ .go
+ }
+
+ it("fails to put a valid resource to a nonexisting resource") {
+ xq("""sty:put-css("does_not_exist", ".tei-div {display:none;}")""")
+ .user("xqtest1")
+ .assertHttpNotFound
+ .go
+ }
+
+ ignore("it fails to put an invalid resource") {
+ xq("""sty:put-css("existing", "xxxx")""")
+ .user("xqtest1")
+ .assertHttpBadRequest
+ .go
+ }
+ }
+
+ describe("sty:get-access") {
+ it("returns an access structure on an existing document") {
+ xq("""sty:get-access("existing", ())""")
+ .assertXPath("""exists($output/self::a:access)""", "an access structure is returned")
+ .go
+ }
+
+ it("fails to return an access structure for a nonexistent resource") {
+ xq("""sty:get-access("does_not_exist", ())""")
+ .assertHttpNotFound
+ .go
+ }
+ }
+
+ describe("sty:put-access") {
+ it("puts a valid access structure") {
+ xq("""sty:put-access("existing", document{
+
+ xqtest1
+ everyone
+
+
+ })""")
+ .user("xqtest1")
+ .assertHttpNoData
+ .go
+ }
+
+ it("fails to put unauthenticated") {
+ xq("""sty:put-access("existing", document{
+
+ xqtest1
+ everyone
+
+
+ })""")
+ .assertHttpUnauthorized
+ .go
+ }
+
+ it("fails to put an invalid access structure") {
+ xq("""sty:put-access("existing", document{
+
+
+
+ })""")
+ .user("xqtest1")
+ .assertHttpBadRequest
+ .go
+ }
+
+ it("fails to put for a resource with no write access") {
+ xq("""sty:put-access("no_write_access", document{
+
+ xqtest1
+ everyone
+
+
+ })""")
+ .user("xqtest1")
+ .assertHttpForbidden
+ .go
+ }
+
+ it("fails to put for a nonexistent resource") {
+ xq("""sty:put-access("does_not_exist", document{
+
+ xqtest1
+ everyone
+
+
+ })""")
+ .assertHttpNotFound
+ .go
+ }
+ }
+}
+
+class TestStylesDelete extends DbTest with CommonTestStyles {
+
+ override def beforeEach(): Unit = {
+ super.beforeEach()
+
+ setupUsers(2)
+ setupResource("src/test/resources/api/data/styles/existing.xml", "existing", "styles", 1)
+ setupResource("src/test/resources/api/data/styles/no_write_access.xml", "no_write_access", "styles", 2,
+ None, Some("everyone"), Some("rw-r--r--"))
+ }
+
+ override def afterEach(): Unit = {
+ super.afterEach()
+
+ teardownResource("existing", "styles", 1)
+ teardownResource("no_write_access", "styles", 2)
+ teardownUsers(2)
+ }
+
+ describe("sty:delete") {
+ it("removes an existing resource") {
+ xq("""sty:delete("existing")""")
+ .user("xqtest1")
+ .assertHttpNoData
+ .go
+ }
+
+ it("does not remove an existing resource when unauthenticated") {
+ xq("""sty:delete("existing")""")
+ .assertHttpUnauthorized
+ .go
+ }
+
+ it("fails to remove a nonexisting resource") {
+ xq("""sty:delete("does_not_exist")""")
+ .user("xqtest1")
+ .assertHttpNotFound
+ .go
+ }
+
+ it("fails to remove a resource without write access") {
+ xq("""sty:delete("no_write_access")""")
+ .user("xqtest1")
+ .assertHttpForbidden
+ .go
+ }
+ }
+}
\ No newline at end of file
diff --git a/opensiddur-extensions/src/test/scala/org/opensiddur/api/data/TestTransliteration.scala b/opensiddur-extensions/src/test/scala/org/opensiddur/api/data/TestTransliteration.scala
new file mode 100644
index 00000000..e2c679a5
--- /dev/null
+++ b/opensiddur-extensions/src/test/scala/org/opensiddur/api/data/TestTransliteration.scala
@@ -0,0 +1,329 @@
+package org.opensiddur.api.data
+
+import org.opensiddur.DbTest
+
+trait CommonTestTransliteration {
+ val prolog =
+ """xquery version '3.1';
+ import module namespace tcommon="http://jewishliturgy.org/test/tcommon"
+ at "xmldb:exist:/db/apps/opensiddur-server/test/tcommon.xqm";
+
+ import module namespace tran="http://jewishliturgy.org/api/transliteration"
+ at "xmldb:exist:///db/apps/opensiddur-server/api/data/transliteration.xqm";
+ import module namespace data="http://jewishliturgy.org/modules/data"
+ at "xmldb:exist:///db/apps/opensiddur-server/api/modules/data.xqm";
+ import module namespace magic="http://jewishliturgy.org/magic"
+ at "xmldb:exist:///db/apps/opensiddur-server/magic/magic.xqm";
+
+ declare namespace html="http://www.w3.org/1999/xhtml";
+ declare namespace tei="http://www.tei-c.org/ns/1.0";
+ declare namespace j="http://jewishliturgy.org/ns/jlptei/1.0";
+ declare namespace tr="http://jewishliturgy.org/ns/tr/1.0";
+ declare namespace http="http://expath.org/ns/http-client";
+ declare namespace output="http://www.w3.org/2010/xslt-xquery-serialization";
+ declare namespace a="http://jewishliturgy.org/ns/access/1.0";
+
+ """
+}
+
+class TestTransliteration extends DbTest with CommonTestTransliteration {
+ override def beforeAll() {
+ super.beforeAll()
+
+ setupUsers(2)
+ setupResource("src/test/resources/api/data/transliteration/test.tr.xml", "test", "transliteration", 1)
+ setupResource("src/test/resources/api/data/transliteration/test_2.tr.xml", "test_2", "transliteration", 1)
+ setupResource("src/test/resources/api/data/transliteration/mivchan.tr.xml", "mivchan", "transliteration", 1)
+ setupResource("src/test/resources/api/data/transliteration/garbage.tr.xml", "garbage", "transliteration", 1)
+ setupResource("src/test/resources/api/data/transliteration/no_write.tr.xml", "no_write", "transliteration", 2,
+ None, Some("everyone"), Some("rw-r--r--"))
+ }
+
+ override def afterAll() {
+ // tear down users that were created by tests
+ teardownResource("no_write", "transliteration", 2)
+ teardownResource("garbage", "transliteration", 1)
+ teardownResource("mivchan", "transliteration", 1)
+ teardownResource("test_2", "transliteration", 1)
+ teardownResource("test", "transliteration", 1)
+ teardownUsers(2)
+
+ super.afterAll()
+ }
+
+ override def beforeEach(): Unit = {
+ super.beforeEach()
+ }
+
+ override def afterEach(): Unit = {
+ super.afterEach()
+ }
+
+ describe("tran:get") {
+ it("gets an existing resource (authenticated)") {
+ xq("""tran:get("test")""")
+ .user("xqtest1")
+ .assertXPath("""exists($output/tr:schema)""", "returns a transliteration schema")
+ .go
+ }
+
+ it("gets an existing resource (unauthenticated)") {
+ xq("""tran:get("test")""")
+ .assertXPath("""exists($output/tr:schema)""", "returns a transliteration schema")
+ .go
+ }
+
+ it("fails to get a non-existing resource") {
+ xq("""tran:get("does_not_exist")""")
+ .assertHttpNotFound
+ .go
+ }
+ }
+
+ describe("tran:list") {
+ it("""list all resources""") {
+ xq("""tran:list("", 1, 100)""")
+ .assertSearchResults
+ .assertXPath("""count($output//html:li[@class="result"])>=3""", "returns at least 3 results")
+ .assertXPath("""
+ every $li in $output//html:li[@class="result"]
+ satisfies exists($li/html:a[@class="alt"][@property="access"])
+ """, "results include a pointer to access API")
+ .go
+ }
+
+ it("lists some resources") {
+ xq("""tran:list("", 1, 2)""")
+ .assertSearchResults
+ .assertXPath("""count($output//html:li[@class="result"])=2""", "returns 2 results")
+ .go
+ }
+
+ it("responds to a query") {
+ xq("""tran:list("test", 1, 100)""")
+ .assertSearchResults
+ .assertXPath("""count($output//html:ol[@class="results"]/html:li)=3""", "returns 3 results")
+ .go
+ }
+ }
+
+ describe("tran:post") {
+ it("posts a valid transliteration") {
+ val validData = readXmlFile("src/test/resources/api/data/transliteration/valid.tr.xml")
+ xq(s"""tran:post(document { $validData })""")
+ .user("xqtest1")
+ .assertHttpCreated
+ .assertXPath("""exists($output/self::rest:response/http:response/http:header[@name="Location"])""",
+ "A location header specifies where the document is stored")
+ .assertXPath("""exists(data:doc("transliteration", "valid"))""",
+ "A new document has been created at the location")
+ .go
+ }
+
+ it("fails to post a valid transliteration unauthenticated") {
+ val validData = readXmlFile("src/test/resources/api/data/transliteration/valid.tr.xml")
+ xq(s"""tran:post(document { $validData })""")
+ .assertHttpUnauthorized
+ .go
+ }
+
+ it("fails to post an invalid transliteration") {
+ val invalidData = readXmlFile("src/test/resources/api/data/transliteration/invalid.tr.xml")
+
+ xq(s"""tran:post(document { $invalidData })""")
+ .user("xqtest1")
+ .assertHttpBadRequest
+ .go
+ }
+
+ it("fails to post an invalid transliteration that is invalid because of the Schematron") {
+ val invalidData = readXmlFile("src/test/resources/api/data/transliteration/invalid_schema.tr.xml")
+
+ xq(s"""tran:post(document { $invalidData })""")
+ .user("xqtest1")
+ .assertHttpBadRequest
+ .go
+ }
+ }
+
+ describe("tran:put") {
+ val validData = readXmlFile("src/test/resources/api/data/transliteration/valid.tr.xml")
+ val invalidData = readXmlFile("src/test/resources/api/data/transliteration/invalid.tr.xml")
+ val invalidSchema = readXmlFile("src/test/resources/api/data/transliteration/invalid_schema.tr.xml")
+ it("succeeds in putting valid data to an existing resource") {
+
+ xq(s"""tran:put("garbage", document { $validData })""")
+ .user("xqtest1")
+ .assertHttpNoData
+ .assertXPath("""data:doc("transliteration", "garbage")//tr:title="Valid"""", "document data has been changed")
+ .go
+ }
+
+ it("fails to put valid data to an existing resource unauthenticated") {
+
+ xq(s"""tran:put("garbage", document { $validData })""")
+ .assertHttpUnauthorized
+ .go
+ }
+
+ it("fails to put data to a non-existing resource") {
+ xq(s"""tran:put("does_not_exist", document { $validData })""")
+ .user("xqtest1")
+ .assertHttpNotFound
+ .go
+ }
+
+ it("fails to put invalid data to an existing resource") {
+ xq(s"""tran:put("garbage", document { $invalidData })""")
+ .user("xqtest1")
+ .assertHttpBadRequest
+ .go
+ }
+
+ it("fails to put invalid data (by schematron) to an existing resource") {
+ xq(s"""tran:put("garbage", document { $invalidSchema })""")
+ .user("xqtest1")
+ .assertHttpBadRequest
+ .go
+ }
+
+ it("fails to put valid data to an existing resource as an unauthorized user") {
+ xq(s"""tran:put("garbage", document { $validData })""")
+ .user("xqtest2")
+ .assertHttpForbidden
+ .go
+
+ }
+ }
+
+ describe("tran:get-access") {
+ it("returns an access structure for an existing document") {
+ xq("""tran:get-access("garbage", ())""")
+ .assertXPath("""exists($output/self::a:access)""")
+ .go
+ }
+
+ it("fails to return an access structure for a nonexisting document") {
+ xq("""tran:get-access("does_not_exist", ())""")
+ .assertHttpNotFound
+ .go
+ }
+ }
+
+ describe("tran:put-access") {
+ it("sets access with a valid access structure, authenticated") {
+ xq("""tran:put-access("test", document{
+
+ xqtest1
+ everyone
+
+
+ })""")
+ .user("xqtest1")
+ .assertHttpNoData
+ .go
+ }
+
+ it("fails when the access structure is invalid") {
+ xq("""tran:put-access("test", document{
+
+
+
+ })""")
+ .user("xqtest1")
+ .assertHttpBadRequest
+ .go
+ }
+
+ it("fails when no write access") {
+ xq("""tran:put-access("no_write", document{
+
+ xqtest1
+ everyone
+
+
+ })""")
+ .user("xqtest1")
+ .assertHttpForbidden
+ .go
+ }
+
+ it("fails for a nonexistent resource") {
+ xq("""tran:put-access("does_not_exist", document{
+
+ xqtest1
+ everyone
+
+
+ })""")
+ .user("xqtest1")
+ .assertHttpNotFound
+ .go
+ }
+
+ it("fails to change access unauthenticated") {
+ xq("""tran:put-access("garbage", document{
+
+ xqtest1
+ everyone
+
+
+ })""")
+ .assertHttpUnauthorized
+ .go
+ }
+ }
+}
+
+class TestTransliterationDelete extends DbTest with CommonTestTransliteration {
+
+ override def beforeEach(): Unit = {
+ super.beforeEach()
+
+ setupUsers(2)
+ setupResource("src/test/resources/api/data/transliteration/garbage.tr.xml", "garbage", "transliteration", 1, None,
+ Some("everyone"), Some("rw-r--r--"))
+ }
+
+ override def afterEach(): Unit = {
+ super.afterEach()
+
+ teardownResource("garbage", "transliteration", 1)
+ teardownUsers(2)
+ }
+
+ describe("tran:delete") {
+ it("deletes a transliteration that exists") {
+ xq("""tran:delete("garbage")""")
+ .user("xqtest1")
+ .assertHttpNoData
+ .assertXPath("""not(doc-available("/data/transliteration/garbage.xml"))""", "data is removed")
+ .go
+ }
+
+ it("fails to delete a transliteration that exists (unauthenticated)") {
+ xq("""tran:delete("garbage")""")
+ .assertHttpUnauthorized
+ .go
+ }
+
+ it("fails to delete a transliteration that does not exist") {
+ xq("""tran:delete("does_not_exist")""")
+ .assertHttpNotFound
+ .go
+ }
+
+ it("fails to delete where no write access is granted") {
+ xq("""tran:delete("garbage")""")
+ .user("xqtest2")
+ .assertHttpForbidden
+ .go
+ }
+
+ ignore("fails to delete a transliteration with an external reference") {
+ xq("""tran:delete("external_reference")""")
+ .assertHttpBadRequest
+ .go
+ }
+ }
+}
\ No newline at end of file
diff --git a/opensiddur-extensions/src/test/scala/org/opensiddur/api/utility/TestTranslit.scala b/opensiddur-extensions/src/test/scala/org/opensiddur/api/utility/TestTranslit.scala
new file mode 100644
index 00000000..f9cea21e
--- /dev/null
+++ b/opensiddur-extensions/src/test/scala/org/opensiddur/api/utility/TestTranslit.scala
@@ -0,0 +1,94 @@
+package org.opensiddur.api.utility
+
+import org.opensiddur.DbTest
+
+class TestTranslit extends DbTest {
+ override val prolog =
+ """xquery version '3.1';
+
+import module namespace tcommon="http://jewishliturgy.org/test/tcommon"
+ at "xmldb:exist:/db/apps/opensiddur-server/test/tcommon.xqm";
+
+import module namespace translit="http://jewishliturgy.org/api/utility/translit"
+ at "xmldb:exist:///db/apps/opensiddur-server/api/utility/translit.xqm";
+
+declare namespace html="http://www.w3.org/1999/xhtml";
+declare namespace tr="http://jewishliturgy.org/ns/tr/1.0";
+declare namespace http="http://expath.org/ns/http-client";
+declare namespace output="http://www.w3.org/2010/xslt-xquery-serialization";
+"""
+ override def beforeAll = {
+ super.beforeAll()
+
+ setupUsers(1)
+ setupResource("src/test/resources/api/utility/translit/test.xml",
+ "test", "transliteration", 1)
+ }
+
+ override def afterAll = {
+ teardownResource("test", "transliteration", 1)
+ teardownUsers(1)
+
+ super.afterAll()
+ }
+
+ describe("translit:transliteration-list") {
+ it("returns an HTML list") {
+ xq("""translit:transliteration-list("", 1, 100)""")
+ .assertXPath("""$output/self::html:html/html:body/html:ul[@class="results"]/html:li[@class="result"]/html:a[contains(@href, "/utility/translit/")]""")
+ .go
+ }
+ }
+
+ describe("translit:transliterate-xml") {
+ it("returns a transliteration XML on posting XML and a valid transliteration schema") {
+ xq("""translit:transliterate-xml(
+ document{
+ אבגדה וזח
+ },
+ "test")
+ """)
+ .assertXmlEquals("""abcde fgh""")
+ .go
+ }
+
+ it("returns 404 on posting XML and a nonexistent transliteration schema") {
+ xq("""translit:transliterate-xml(
+ document{
+ אבגדה וזח
+ },
+ "NotExistent")""")
+ .assertHttpNotFound
+ .go
+ }
+
+ it("returns 400 on post XML and a nonexistent transliteration table") {
+ xq("""translit:transliterate-xml(
+ document{
+ אבגדה וזח
+ },
+ "test")""")
+ .assertHttpBadRequest
+ .go
+ }
+ }
+
+ describe("translit:transliterate-text") {
+ it("returns a transliterated text record on posting text and valid transliteration schema") {
+ xq("""translit:transliterate-text(
+ util:string-to-binary("אבגדה וזח"),
+ "test")""")
+ .assertXPath("""$output[1]/self::rest:response/output:serialization-parameters/output:method="text"""", "output is text/plain")
+ .assertXPath("""$output[2]="abcde fgh"""", "transliterated text")
+ .go
+ }
+
+ it("returns 404 on post text and a nonexistent transliteration schema") {
+ xq("""translit:transliterate-text(
+ util:string-to-binary("אבגדה וזח"),
+ "NotExistent")""")
+ .assertHttpNotFound
+ .go
+ }
+ }
+}
\ No newline at end of file
diff --git a/opensiddur-extensions/src/test/scala/org/opensiddur/api/utility/TestUtilityIndex.scala b/opensiddur-extensions/src/test/scala/org/opensiddur/api/utility/TestUtilityIndex.scala
new file mode 100644
index 00000000..d8bb9ead
--- /dev/null
+++ b/opensiddur-extensions/src/test/scala/org/opensiddur/api/utility/TestUtilityIndex.scala
@@ -0,0 +1,28 @@
+package org.opensiddur.api.utility
+
+import org.opensiddur.DbTest
+
+class TestUtilityIndex extends DbTest {
+ override val prolog: String =
+ """xquery version '3.1';
+
+import module namespace uindex="http://jewishliturgy.org/api/utility"
+ at "xmldb:exist:/db/apps/opensiddur-server/api/utility/utilityindex.xqm";
+
+import module namespace tcommon="http://jewishliturgy.org/test/tcommon"
+ at "xmldb:exist:/db/apps/opensiddur-server/test/tcommon.xqm";
+
+declare namespace html="http://www.w3.org/1999/xhtml";
+declare namespace http="http://expath.org/ns/http-client";
+declare namespace rest="http://exquery.org/ns/restxq";
+declare namespace output="http://www.w3.org/2010/xslt-xquery-serialization";
+declare namespace o="http://a9.com/-/spec/opensearch/1.1/";
+ """
+ describe("uindex:list") {
+ it("returns a discovery API") {
+ xq("""uindex:list()""")
+ .assertDiscoveryApi
+ .go
+ }
+ }
+}
diff --git a/opensiddur-extensions/src/test/scala/org/opensiddur/modules/TestAccess.scala b/opensiddur-extensions/src/test/scala/org/opensiddur/modules/TestAccess.scala
new file mode 100644
index 00000000..1d1befe2
--- /dev/null
+++ b/opensiddur-extensions/src/test/scala/org/opensiddur/modules/TestAccess.scala
@@ -0,0 +1,545 @@
+package org.opensiddur.modules
+
+import org.opensiddur.DbTest
+
+class TestAccess extends DbTest {
+ override val prolog: String =
+ """xquery version '3.1';
+ import module namespace magic="http://jewishliturgy.org/magic"
+ at "xmldb:exist:///db/apps/opensiddur-server/magic/magic.xqm";
+ import module namespace acc="http://jewishliturgy.org/modules/access"
+ at "xmldb:exist:///db/apps/opensiddur-server/modules/access.xqm";
+ import module namespace tcommon="http://jewishliturgy.org/test/tcommon"
+ at "xmldb:exist:/db/apps/opensiddur-server/test/tcommon.xqm";
+ import module namespace data="http://jewishliturgy.org/modules/data"
+ at "xmldb:exist:///db/apps/opensiddur-server/modules/data.xqm";
+
+ declare namespace a="http://jewishliturgy.org/ns/access/1.0";
+ declare namespace html="http://www.w3.org/1999/xhtml";
+ declare namespace output="http://www.w3.org/2010/xslt-xquery-serialization";
+ declare namespace error="http://jewishliturgy.org/errors";
+"""
+
+ override def beforeAll: Unit = {
+ super.beforeAll()
+
+ setupUsers(2)
+ }
+
+ override def beforeEach: Unit = {
+ super.beforeEach()
+
+ setupResource("""""", "test_one", "original", 1,
+ Some("en"), Some("dba"), Some("rw-r--r--"), firstParamIsContent = true)
+ }
+
+ override def afterEach: Unit = {
+ teardownResource("test_one", "original", 1)
+
+ super.afterEach()
+ }
+
+ override def afterAll: Unit = {
+ teardownUsers(2)
+
+ super.afterAll()
+ }
+
+ describe("acc:get-access()") {
+ it("returns basic permissions") {
+ xq("""acc:get-access(data:doc("/data/original/test_one"))""")
+ .user("xqtest1")
+ .assertXmlEquals(
+ """
+
+ xqtest1
+ dba
+
+ """)
+ .go
+ }
+
+ it("returns a grant structure for a group r/w grant") {
+ xq(
+ """
+ let $uri := document-uri(data:doc("/data/original/test_one"))
+ let $grant := system:as-user("admin", $magic:password,
+ sm:add-group-ace($uri, "everyone", true(), "rw-")
+ )
+ return acc:get-access(data:doc("/data/original/test_one"))""")
+ .user("xqtest1")
+ .assertXPath("$output/a:grant/a:grant-group[@write='true']='everyone'", "read-write grant is recorded")
+ .go
+ }
+
+ it("returns a grant structure for a group r/o grant") {
+ xq(
+ """
+ let $uri := document-uri(data:doc("/data/original/test_one"))
+ let $grant := system:as-user("admin", $magic:password,
+ sm:add-group-ace($uri, "everyone", true(), "r--")
+ )
+ return acc:get-access(data:doc("/data/original/test_one"))""")
+ .user("xqtest1")
+ .assertXPath("$output/a:grant/a:grant-group[@write='false']='everyone'", "read-only grant is recorded")
+ .go
+ }
+
+ it("returns a grant structure for a user r/w grant") {
+ xq(
+ """
+ let $uri := document-uri(data:doc("/data/original/test_one"))
+ let $grant := system:as-user("admin", $magic:password,
+ sm:add-user-ace($uri, "xqtest2", true(), "rw-")
+ )
+ return acc:get-access(data:doc("/data/original/test_one"))""")
+ .user("xqtest1")
+ .assertXPath("$output/a:grant/a:grant-user[@write='true']='xqtest2'", "read-write grant is recorded")
+ .go
+ }
+
+ it("returns a grant structure for a user r/o grant") {
+ xq(
+ """
+ let $uri := document-uri(data:doc("/data/original/test_one"))
+ let $grant := system:as-user("admin", $magic:password,
+ sm:add-user-ace($uri, "xqtest2", true(), "r--")
+ )
+ return acc:get-access(data:doc("/data/original/test_one"))""")
+ .user("xqtest1")
+ .assertXPath("$output/a:grant/a:grant-user[@write='false']='xqtest2'", "read-only grant is recorded")
+ .go
+ }
+
+ it("returns a grant structure for a group r/w deny") {
+ xq(
+ """
+ let $uri := document-uri(data:doc("/data/original/test_one"))
+ let $grant := system:as-user("admin", $magic:password, (
+ sm:chgrp($uri, "everyone"),
+ sm:chmod($uri, "rw-rw-r--"),
+ sm:add-group-ace($uri, "guest", false(), "rw-")
+ ))
+ return acc:get-access(data:doc("/data/original/test_one"))""")
+ .user("xqtest1")
+ .assertXPath("$output/a:deny/a:deny-group[@read='false']='guest'", "read-write deny is recorded")
+ .go
+ }
+
+ it("returns a grant structure for a group w/o deny") {
+ xq(
+ """
+ let $uri := document-uri(data:doc("/data/original/test_one"))
+ let $grant := system:as-user("admin", $magic:password, (
+ sm:chgrp($uri, "everyone"),
+ sm:chmod($uri, "rw-rw-r--"),
+ sm:add-group-ace($uri, "guest", false(), "-w-")
+ ))
+ return acc:get-access(data:doc("/data/original/test_one"))""")
+ .user("xqtest1")
+ .assertXPath("$output/a:deny/a:deny-group[@read='true']='guest'", "write-only deny is recorded")
+ .go
+ }
+
+ it("returns a grant structure for a user r/w deny") {
+ xq(
+ """
+ let $uri := document-uri(data:doc("/data/original/test_one"))
+ let $grant := system:as-user("admin", $magic:password, (
+ sm:chgrp($uri, "everyone"),
+ sm:chmod($uri, "rw-rw-r--"),
+ sm:add-user-ace($uri, "xqtest2", false(), "rw-")
+ ))
+ return acc:get-access(data:doc("/data/original/test_one"))""")
+ .user("xqtest1")
+ .assertXPath("$output/a:deny/a:deny-user[@read='false']='xqtest2'", "read-write deny is recorded")
+ .go
+ }
+
+ it("returns a grant structure for a user w/o deny") {
+ xq(
+ """
+ let $uri := document-uri(data:doc("/data/original/test_one"))
+ let $grant := system:as-user("admin", $magic:password, (
+ sm:chgrp($uri, "everyone"),
+ sm:chmod($uri, "rw-rw-r--"),
+ sm:add-user-ace($uri, "xqtest2", false(), "-w-")
+ ))
+ return acc:get-access(data:doc("/data/original/test_one"))""")
+ .user("xqtest1")
+ .assertXPath("$output/a:deny/a:deny-user[@read='true']='xqtest2'", "write-only deny is recorded")
+ .go
+ }
+ }
+
+ describe("acc:set-access()") {
+ it("sets general parameters") {
+ xq(
+ """
+ let $uri := document-uri(data:doc("/data/original/test_one"))
+ let $grant := system:as-user("admin", $magic:password, (
+ sm:chown($uri, "xqtest1"),
+ sm:chgrp($uri, "dba"),
+ sm:chmod($uri, "rw-r--rw-")
+ ))
+ return acc:set-access(doc($uri),
+
+ xqtest1
+ everyone
+
+ )""")
+ .user("xqtest1")
+ .assertXPath("""sm:get-permissions(document-uri(data:doc("/data/original/test_one")))/*/@owner="xqtest1" """, "owner is set")
+ .assertXPath("""sm:get-permissions(document-uri(data:doc("/data/original/test_one")))/*/@group="everyone" """, "group is set")
+ .assertXPath("""sm:get-permissions(document-uri(data:doc("/data/original/test_one")))/*/@mode="rw-rw-r--" """, "permissions are set")
+ .go
+ }
+
+ it("sets access to share with a group") {
+ xq(
+ """
+ let $resource := data:doc("/data/original/test_one")
+ return acc:set-access($resource,
+
+ xqtest1
+ everyone
+
+
+ guest
+
+ )
+ """)
+ .user("xqtest1")
+ .assertXPath("""sm:get-permissions(document-uri(data:doc("/data/original/test_one")))//sm:ace
+ [@target="GROUP"][@who="guest"][@access_type="ALLOWED"]/@mode="rw-" """, "group share is present and has r/w access")
+ .go
+ }
+
+ it("sets access to share with a group r/o") {
+ xq(
+ """
+ let $resource := data:doc("/data/original/test_one")
+ return acc:set-access($resource,
+
+ xqtest1
+ everyone
+
+
+ guest
+
+ )
+ """)
+ .user("xqtest1")
+ .assertXPath("""sm:get-permissions(document-uri(data:doc("/data/original/test_one")))//sm:ace
+ [@target="GROUP"][@who="guest"][@access_type="ALLOWED"]/@mode="r--" """, "group share is present and has r/o access")
+ .go
+ }
+
+ it("sets access to share with a user r/w") {
+ xq(
+ """
+ let $resource := data:doc("/data/original/test_one")
+ return acc:set-access($resource,
+
+ xqtest1
+ everyone
+
+
+ guest
+
+ )
+ """)
+ .user("xqtest1")
+ .assertXPath("""system:as-user("admin", $magic:password,
+ sm:get-permissions(document-uri(data:doc("/data/original/test_one")))//sm:ace
+ [@target="USER"][@who="guest"][@access_type="ALLOWED"]/@mode="rw-") """, "user share is present and has r/w access")
+ .go
+ }
+
+ it("sets access to share with a user r/o") {
+ xq(
+ """
+ let $resource := data:doc("/data/original/test_one")
+ return acc:set-access($resource,
+
+ xqtest1
+ everyone
+
+
+ guest
+
+ )
+ """)
+ .user("xqtest1")
+ .assertXPath("""sm:get-permissions(document-uri(data:doc("/data/original/test_one")))//sm:ace
+ [@target="USER"][@who="guest"][@access_type="ALLOWED"]/@mode="r--" """, "user share is present and has r/o access")
+ .go
+ }
+
+ it("sets access to deny a group r/w") {
+ xq(
+ """
+ let $resource := data:doc("/data/original/test_one")
+ return acc:set-access($resource,
+
+ xqtest1
+ everyone
+
+
+ guest
+
+ )
+ """)
+ .user("xqtest1")
+ .assertXPath("""system:as-user("admin", $magic:password,
+ sm:get-permissions(document-uri(data:doc("/data/original/test_one")))//sm:ace
+ [@target="GROUP"][@who="guest"][@access_type="DENIED"]/@mode="rw-") """, "group deny is present and covers r/w access")
+ .go
+ }
+
+ it("sets access to deny a group w/o") {
+ xq(
+ """
+ let $resource := data:doc("/data/original/test_one")
+ return acc:set-access($resource,
+
+ xqtest1
+ everyone
+
+
+ guest
+
+ )
+ """)
+ .user("xqtest1")
+ .assertXPath("""sm:get-permissions(document-uri(data:doc("/data/original/test_one")))//sm:ace
+ [@target="GROUP"][@who="guest"][@access_type="DENIED"]/@mode="-w-" """, "group deny is present and covers w/o access")
+ .go
+ }
+
+ it("sets access to deny a user r/w") {
+ xq(
+ """
+ let $resource := data:doc("/data/original/test_one")
+ return acc:set-access($resource,
+
+ xqtest1
+ everyone
+
+
+ guest
+
+ )
+ """)
+ .user("xqtest1")
+ .assertXPath("""system:as-user("admin", $magic:password, sm:get-permissions(document-uri(data:doc("/data/original/test_one")))//sm:ace
+ [@target="USER"][@who="guest"][@access_type="DENIED"]/@mode="rw-") """, "user deny is present and covers r/w access")
+ .go
+ }
+
+ it("sets access to deny a user w/o") {
+ xq(
+ """
+ let $resource := data:doc("/data/original/test_one")
+ return acc:set-access($resource,
+
+ xqtest1
+ everyone
+
+
+ guest
+
+ )
+ """)
+ .user("xqtest1")
+ .assertXPath("""sm:get-permissions(document-uri(data:doc("/data/original/test_one")))//sm:ace
+ [@target="USER"][@who="guest"][@access_type="DENIED"]/@mode="-w-" """, "user deny is present and covers w/o access")
+ .go
+ }
+
+ it("fails to set access unauthenticated") {
+ xq(
+ """
+ let $resource := data:doc("/data/original/test_one")
+ return acc:set-access($resource,
+
+ xqtest1
+ everyone
+
+ )
+ """)
+ .assertThrows("error:UNAUTHORIZED")
+ .go
+ }
+
+ it("fails to set access with incorrect authentication") {
+ xq(
+ """
+ let $resource := data:doc("/data/original/test_one")
+ return acc:set-access($resource,
+
+ xqtest1
+ everyone
+
+ )
+ """)
+ .user("xqtest2")
+ .assertThrows("error:FORBIDDEN")
+ .go
+ }
+
+ it("fails to set access with an invalid access structure") {
+ xq(
+ """
+ let $resource := data:doc("/data/original/test_one")
+ return acc:set-access($resource,
+
+
+ )
+ """)
+ .user("xqtest1")
+ .assertThrows("error:VALIDATION")
+ .go
+ }
+ }
+
+ describe("acc:get-access-as-user()") {
+ it("returns an access structure when called as the same user") {
+ xq("""acc:get-access-as-user(data:doc("/data/original/test_one"), "xqtest1")""")
+ .user("xqtest1")
+ .assertXmlEquals("""""")
+ .go
+ }
+
+ it("returns an access structure when called as a different user") {
+ xq(
+ """
+ let $resource := data:doc("/data/original/test_one")
+ let $grant := system:as-user("admin", $magic:password,
+ sm:chmod(document-uri($resource), "rw-r--r--")
+ )
+ return acc:get-access-as-user($resource, "xqtest2")
+ """)
+ .user("xqtest1")
+ .assertXmlEquals("""""")
+ .go
+ }
+
+ it("returns an error when the requested user is nonexistent") {
+ xq(
+ """let $resource := data:doc("/data/original/test_one")
+ return acc:get-access-as-user($resource, "doesnotexist")""")
+ .user("xqtest1")
+ .assertThrows("error:BAD_REQUEST")
+ .go
+ }
+
+ it("returns that the user has r/o access when the calling user is different from the second argument and an ACE is present") {
+ xq("""
+ let $resource-doc := data:doc("/data/original/test_one")
+ let $resource := document-uri($resource-doc)
+ let $grant := system:as-user("admin", $magic:password,(
+ sm:chmod(xs:anyURI($resource), "rw-------"),
+ sm:add-user-ace(xs:anyURI($resource), "xqtest2", true(), "r--")
+ )
+ )
+ return acc:get-access-as-user($resource-doc, "xqtest2") """)
+ .user("xqtest1")
+ .assertXmlEquals("""""")
+ .go
+ }
+
+ it("returns that the user has r/w access when the calling user is different from the second argument and an ACE is present") {
+ xq("""
+ let $resource-doc := data:doc("/data/original/test_one")
+ let $resource := document-uri($resource-doc)
+ let $grant := system:as-user("admin", $magic:password, (
+ sm:chmod($resource, "rw-------"),
+ sm:add-user-ace($resource, "xqtest2", true(), "rw-")
+ ))
+ return acc:get-access-as-user($resource-doc, "xqtest2") """)
+ .user("xqtest1")
+ .assertXmlEquals("""""")
+ .go
+ }
+
+ it("returns that the user has r/o access when the calling user is different from the second argument and an ACE is present with w/o override") {
+ xq("""
+ let $resource-doc := data:doc("/data/original/test_one")
+ let $resource := document-uri($resource-doc)
+ let $grant := system:as-user("admin", $magic:password, (
+ sm:chmod(xs:anyURI($resource), "rw-rw-rw-"),
+ sm:add-user-ace(xs:anyURI($resource), "xqtest2", false(), "-w-")
+ ))
+ return acc:get-access-as-user($resource-doc, "xqtest2") """)
+ .user("xqtest1")
+ .assertXmlEquals("""""")
+ .go
+ }
+
+ it("returns that the user has no access when the calling user is different from the second argument and an ACE is present with r/w denial override") {
+ xq("""
+ let $resource-doc := data:doc("/data/original/test_one")
+ let $resource := document-uri($resource-doc)
+ let $grant := system:as-user("admin", $magic:password, (
+ sm:chmod(xs:anyURI($resource), "rw-rw-rw-"),
+ sm:add-user-ace(xs:anyURI($resource), "xqtest2", false(), "rw-")
+ ))
+ return acc:get-access-as-user($resource-doc, "xqtest2") """)
+ .user("xqtest1")
+ .assertXmlEquals("""""")
+ .go
+ }
+ }
+
+ describe("functional test: get just after set") {
+ it("returns the values that were set") {
+ xq("""let $resource := "/data/original/test_one"
+ let $set := acc:set-access(data:doc($resource),
+
+ xqtest1
+ dba
+
+
+ everyone
+ xqtest2
+
+
+ guest
+ guest
+
+ )
+ return acc:get-access(data:doc($resource))""")
+ .user("xqtest1")
+ .assertXPath("""count($output/*)=6 and count($output/a:grant/*)=2 and count($output/a:deny/*)=2""", "correct number of conditions")
+ .assertXPathEquals("$output/a:owner", "owner", """xqtest1""")
+ .assertXPathEquals("$output/a:group", "group", """dba""")
+ .assertXPathEquals("$output/a:world", "world", """""")
+ .assertXPathEquals("$output/a:grant/a:grant-group", "grant-group", """everyone""")
+ .assertXPathEquals("$output/a:grant/a:grant-user", "grant-user", """xqtest2""")
+ .assertXPathEquals("$output/a:deny/a:deny-user", "deny-user", """guest""")
+ .assertXPathEquals("$output/a:deny/a:deny-group", "deny-group", """guest""")
+ .go
+ }
+ }
+}
diff --git a/opensiddur-extensions/src/test/scala/org/opensiddur/modules/TestApp.scala b/opensiddur-extensions/src/test/scala/org/opensiddur/modules/TestApp.scala
new file mode 100644
index 00000000..23a74d8a
--- /dev/null
+++ b/opensiddur-extensions/src/test/scala/org/opensiddur/modules/TestApp.scala
@@ -0,0 +1,72 @@
+package org.opensiddur.modules
+
+import org.opensiddur.DbTest
+import scala.xml.XML
+
+class TestApp extends DbTest {
+ override val prolog: String =
+ """xquery version '3.1';
+ import module namespace magic="http://jewishliturgy.org/magic"
+ at "xmldb:exist:///db/apps/opensiddur-server/magic/magic.xqm";
+ import module namespace app="http://jewishliturgy.org/modules/app"
+ at "xmldb:exist:///db/apps/opensiddur-server/modules/app.xqm";
+ import module namespace tcommon="http://jewishliturgy.org/test/tcommon"
+ at "xmldb:exist:/db/apps/opensiddur-server/test/tcommon.xqm";
+
+ declare namespace html="http://www.w3.org/1999/xhtml";
+ declare namespace output="http://www.w3.org/2010/xslt-xquery-serialization";
+ declare namespace error="http://jewishliturgy.org/errors";
+ """
+
+ override def beforeAll: Unit = {
+ super.beforeAll()
+ setupUsers(1)
+ }
+
+ override def afterAll(): Unit = {
+ teardownUsers(1)
+ super.afterAll()
+ }
+
+ describe("app:get-version") {
+ it("returns the same version as the package") {
+ val version = XML.loadFile("../opensiddur-server/src/expath-pkg.xml").attributes("version").toString()
+ val returnedVersion = xq("""app:get-version()""")
+ .go
+ assert(returnedVersion.head == version)
+ }
+ }
+
+ describe("app:auth-user") {
+ it("returns an empty sequence when not logged in") {
+ xq("app:auth-user()")
+ .assertEmpty
+ .go
+ }
+
+ it("returns the authenticated user when as-user-ed") {
+ xq("""app:auth-user()""")
+ .user("xqtest1")
+ .assertXPath("$output='xqtest1'")
+ .go
+ }
+
+ it("returns the authenticated user when logged in with HTTP Basic") {
+ xqRest("""app:auth-user()""")
+ .user("xqtest1")
+ .assertXPath("$output='xqtest1'")
+ .go
+ }
+
+ it("returns the authenticated user from the session") {
+ xqRest(
+ """
+ let $create := session:create()
+ let $session := app:login-credentials('xqtest1', 'xqtest1')
+ return app:auth-user()""")
+ .assertXPath("session:exists()", "There must be a session for this test to be meaningful")
+ .assertXPath("$output='xqtest1'")
+ .go
+ }
+ }
+}
diff --git a/opensiddur-extensions/src/test/scala/org/opensiddur/modules/TestCommon.scala b/opensiddur-extensions/src/test/scala/org/opensiddur/modules/TestCommon.scala
new file mode 100644
index 00000000..b9c2b1c1
--- /dev/null
+++ b/opensiddur-extensions/src/test/scala/org/opensiddur/modules/TestCommon.scala
@@ -0,0 +1,114 @@
+package org.opensiddur.modules
+
+import org.opensiddur.DbTest
+
+class TestCommon extends DbTest {
+ /** imports, namespaces and variables */
+ override val prolog: String =
+ """xquery version '3.1';
+
+ import module namespace common="http://jewishliturgy.org/transform/common"
+ at "xmldb:exist:///db/apps/opensiddur-server/modules/common.xqm";
+ import module namespace tcommon="http://jewishliturgy.org/test/tcommon"
+ at "xmldb:exist:/db/apps/opensiddur-server/test/tcommon.xqm";
+
+ declare namespace tei="http://www.tei-c.org/ns/1.0";
+ declare namespace j="http://jewishliturgy.org/ns/jlptei/1.0";
+ declare namespace jf="http://jewishliturgy.org/ns/jlptei/flat/1.0";
+ """
+
+ override def beforeAll: Unit = {
+ super.beforeAll
+ setupUsers(1)
+ setupResource("src/test/resources/modules/common/test_common.xml", "test_common", "original", 1, Some("en"))
+ }
+
+ override def afterAll(): Unit = {
+ teardownResource("test_common", "original", 1)
+ teardownUsers(1)
+ super.afterAll()
+ }
+
+ describe("common:apply-at") {
+ it("acts as an identity transform if it can't find the node to apply at") {
+ xq("""let $e :=
+
+ text
+
+
+
+
+ return
+ common:apply-at(
+ $e, ,
+ function($n as node()*, $p as map(*)) as node()* {()},
+ map {}
+ ) """)
+ .assertXmlEquals("""
+ text
+
+
+
+ """)
+ .go
+ }
+
+ it("applies a transform if a matching node is found") {
+ xq("""let $e :=
+
+ text
+
+
+
+
+ return
+ common:apply-at(
+ $e, $e/c,
+ function($n as node()*, $p as map(*)) as node()* {
+
+ },
+ map {}
+ ) """)
+ .assertXmlEquals("""
+ text
+
+ """)
+ .go
+ }
+ }
+
+ describe("common:generate-id") {
+ it("generates an id") {
+ xq("""common:generate-id(doc("/db/data/original/en/test_common.xml"))""")
+ .user("xqtest1")
+ .assertXPath("""not(empty($output))""")
+ .go
+ }
+
+ it("generates a different id for 2 different nodes") {
+ val firstCall = xq("""common:generate-id(doc("/db/data/original/en/test_common.xml")/*/*/node[1])""")
+ .user("xqtest1")
+ .assertXPath("""not(empty($output))""")
+ .go
+
+ val secondCall = xq("""common:generate-id(doc("/db/data/original/en/test_common.xml")/*/*/node[2])""")
+ .user("xqtest1")
+ .assertXPath("""not(empty($output))""")
+ .go
+
+ assert(firstCall(1) != secondCall(1))
+ }
+
+ it("generates the same id twice") {
+ val firstCall = xq("""common:generate-id(doc("/db/data/original/en/test_common.xml"))""")
+ .user("xqtest1")
+ .go
+
+ val secondCall = xq("""common:generate-id(doc("/db/data/original/en/test_common.xml"))""")
+ .user("xqtest1")
+ .go
+
+ assert(firstCall.head == secondCall.head)
+ }
+ }
+}
\ No newline at end of file
diff --git a/opensiddur-extensions/src/test/scala/org/opensiddur/modules/TestData.scala b/opensiddur-extensions/src/test/scala/org/opensiddur/modules/TestData.scala
new file mode 100644
index 00000000..c9a44d86
--- /dev/null
+++ b/opensiddur-extensions/src/test/scala/org/opensiddur/modules/TestData.scala
@@ -0,0 +1,246 @@
+package org.opensiddur.modules
+
+import org.opensiddur.DbTest
+
+class TestData extends DbTest {
+ override val prolog =
+ """xquery version '3.1';
+ import module namespace tcommon="http://jewishliturgy.org/test/tcommon"
+ at "xmldb:exist:/db/apps/opensiddur-server/test/tcommon.xqm";
+
+ import module namespace data="http://jewishliturgy.org/modules/data"
+ at "xmldb:exist:/db/apps/opensiddur-server/modules/data.xqm";
+
+ import module namespace magic="http://jewishliturgy.org/magic"
+ at "xmldb:exist:/db/apps/opensiddur-server/magic/magic.xqm";
+
+ declare namespace t="http://test.jewishliturgy.org/modules/data";
+ declare namespace tei="http://www.tei-c.org/ns/1.0";
+ declare namespace j="http://jewishliturgy.org/ns/jlptei/1.0";
+ declare namespace error="http://jewishliturgy.org/errors";
+
+ declare variable $t:resource := "datatest";
+ declare variable $t:noaccess := "noaccess";
+
+ declare variable $t:resource-content := document {
+
+
+
+
+ datatest
+
+
+
+
+ Empty.
+
+
+ };
+ """
+
+ override def beforeAll() {
+ super.beforeAll()
+
+ setupUsers(2)
+ }
+
+ override def afterAll() {
+ teardownUsers(1)
+
+ super.afterAll()
+ }
+
+ override def beforeEach(): Unit = {
+ super.beforeEach()
+
+ xq(
+ """
+ let $test-resource := tcommon:setup-resource($t:resource, "original", 1, $t:resource-content)
+ let $noaccess-resource := tcommon:setup-resource($t:noaccess, "original", 1, $t:resource-content, (), "everyone", "rw-------")
+ return ()
+ """)
+ .go
+ }
+
+ override def afterEach(): Unit = {
+ xq(
+ """
+ let $test-resource := tcommon:teardown-resource($t:resource, "original", 1)
+ let $noaccess-resource := tcommon:teardown-resource($t:noaccess, "original", 1)
+ return ()
+ """)
+ .go
+
+ super.afterEach()
+ }
+
+ describe("data:normalize-resource-title") {
+ it("combines parts and words") {
+ xq("""data:normalize-resource-title(("Part1", "Part2 Part3"), false())""")
+ .assertEquals("part1-part2_part3")
+ .go
+ }
+
+ it("preserves case when case-sensitive is true") {
+ xq("""data:normalize-resource-title(("Part1", "Part2 Part3"), true())""")
+ .assertEquals("Part1-Part2_Part3")
+ .go
+ }
+
+ it("removes characters that are not letters, numbers, underscore or dash") {
+ val alephPresentation = "\ufb21"
+ val betDot = "\ufb31"
+
+ val aleph = "\u05d0"
+ val bet = "\u05d1"
+
+ xq(s"""data:normalize-resource-title("a?b!c#d$$e%f^g&h*i(j)k:l;m'np,q.r/s~t`u\\v|w+x=$alephPresentation$betDot", false())""")
+ .assertEquals(s"abcdefghijklmnopqrstuvwx$aleph$bet")
+ .go
+ }
+
+ it("disallows begin and end punctuators") {
+ xq("""data:normalize-resource-title(("", "_abc-", ""), false())""")
+ .assertEquals("abc")
+ .go
+ }
+
+ it("disallows duplicate punctuators") {
+ xq("""data:normalize-resource-title(("abc", "-def_ _ghi"), false())""")
+ .assertEquals("abc-def_ghi")
+ .go
+ }
+
+ it("disallows titles that start with a number") {
+ xq("""data:normalize-resource-title("1 abc", false())""")
+ .assertEquals("_1_abc")
+ .go
+ }
+
+ it("disallows titles that are all spaces") {
+ xq("""data:normalize-resource-title(("_-_", "_ _", "---"), false())""")
+ .assertEquals("")
+ .go
+ }
+
+ it("truncates super-long titles") {
+ val superLongTitleString = "a" * 200
+ xq(s"""data:normalize-resource-title("$superLongTitleString", false())""")
+ .assertXPath("fn:string-length($output) = $data:max-resource-name-length")
+ .go
+ }
+ }
+
+ describe("data:db-path-to-api") {
+ it("returns empty in a nonexistent hierarchy") {
+ xq(
+ "data:db-path-to-api(\"/db/code/tests/api/data.t.xml\")")
+ .assertEmpty
+ .go
+ }
+
+ it("returns the path to a user if the user exists") {
+ xq(
+ "data:db-path-to-api('/db/data/user/xqtest1.xml')"
+ )
+ .assertEquals("/api/user/xqtest1")
+ .go
+ }
+
+ it("returns empty if a user does not exist") {
+ xq("""data:db-path-to-api("/db/data/user/__nope__")""")
+ .assertEmpty
+ .go
+ }
+
+ it("returns the path to a document if the document exists") {
+ xq("""data:db-path-to-api("/db/data/original/" || $t:resource || ".xml")""")
+ .assertEquals("/api/data/original/datatest")
+ .go
+ }
+
+ it("returns empty if a document does not exist") {
+ xq("""data:db-path-to-api("/db/data/original/__nope__.xml")""")
+ .assertEmpty
+ .go
+ }
+ }
+
+ describe("data:api-path-to-db") {
+ it("returns the db path of a user that exists") {
+ xq("""data:api-path-to-db("/api/user/xqtest1")""")
+ .assertEquals("/db/data/user/xqtest1.xml")
+ .go
+ }
+
+ it("returns empty when the user does not exist") {
+ xq("""data:api-path-to-db("/api/user/__nope__")""")
+ .assertEmpty
+ .go
+ }
+
+ it("returns the db path of a document that exists") {
+ xq("""data:api-path-to-db("/api/data/original/datatest")""")
+ .assertEquals("/db/data/original/datatest.xml")
+ .go
+ }
+
+ it("returns empty when the document does not exist") {
+ xq("""data:api-path-to-db("/api/data/original/__nope__")""")
+ .assertEmpty
+ .go
+ }
+
+ it("throws an exception in an unsupported hierarchy") {
+ xq("""data:api-path-to-db("/api/group/everyone")""")
+ .assertThrows("error:NOTIMPLEMENTED")
+ .go
+ }
+ }
+
+ describe("data:new-path") {
+ it("returns a full path when there is no resource with the same title") {
+ xq("""data:new-path("original", "very long test title")""")
+ .assertXPath("""$output = "/db/data/original/very%20long%20test%20title.xml" """)
+ .go
+ }
+
+ it("returns a numbered resource when there is a resource with the same title") {
+ xq("""data:new-path("original", "datatest")""")
+ .assertXPath("""$output="/db/data/original/datatest-1.xml" """)
+ .go
+ }
+ }
+
+ describe("data:doc") {
+ it("returns a document that exists by API path") {
+ xq("""data:doc("/api/data/original/datatest")""")
+ .assertXPath("$output instance of document-node()")
+ .go
+ }
+
+ it("returns a document that exists by API path (without /api)") {
+ xq("""data:doc("/data/original/datatest")""")
+ .assertXPath("$output instance of document-node()")
+ .go
+ }
+
+ it("returns empty for a nonexistent document by path") {
+ xq("""data:doc("/api/data/original/__nope__")""")
+ .assertEmpty
+ .go
+ }
+
+ it("returns empty if a document is inaccessible") {
+ xq("""data:doc("/api/data/original/noaccess")""")
+ .assertEmpty
+ .go
+ }
+
+ it("throws an exception for an inaccessible API") {
+ xq("""data:doc("/api/test/something")""")
+ .assertThrows("error:NOTIMPLEMENTED")
+ .go
+ }
+ }
+}
diff --git a/opensiddur-extensions/src/test/scala/org/opensiddur/modules/TestDocindex.scala b/opensiddur-extensions/src/test/scala/org/opensiddur/modules/TestDocindex.scala
new file mode 100644
index 00000000..709a502d
--- /dev/null
+++ b/opensiddur-extensions/src/test/scala/org/opensiddur/modules/TestDocindex.scala
@@ -0,0 +1,143 @@
+package org.opensiddur.modules
+
+import org.opensiddur.DbTest
+
+class TestDocindex extends DbTest {
+ /** imports, namespaces and variables */
+ override val prolog: String =
+ """xquery version '3.1';
+
+import module namespace tcommon="http://jewishliturgy.org/test/tcommon"
+ at "xmldb:exist:/db/apps/opensiddur-server/test/tcommon.xqm";
+import module namespace deepequality="http://jewishliturgy.org/modules/deepequality"
+ at "xmldb:exist:/db/apps/opensiddur-server/modules/deepequality.xqm";
+
+import module namespace didx="http://jewishliturgy.org/modules/docindex"
+ at "xmldb:exist:/db/apps/opensiddur-server/modules/didx.xqm";
+
+import module namespace magic="http://jewishliturgy.org/magic"
+ at "xmldb:exist:/db/apps/opensiddur-server/magic/magic.xqm";
+
+declare namespace tei="http://www.tei-c.org/ns/1.0";
+declare namespace j="http://jewishliturgy.org/ns/jlptei/1.0";
+ """
+
+ override def beforeAll: Unit = {
+ super.beforeAll()
+
+ setupUsers(1)
+ setupCollection("/db/data/original", "test", Some("xqtest1"), Some("xqtest1"), Some("rwxrwxrwx"))
+ }
+
+ override def afterAll(): Unit = {
+ teardownCollection("/db/data/original/test")
+ teardownUsers(1)
+ super.afterAll()
+ }
+
+ override def beforeEach(): Unit = {
+ super.beforeEach()
+
+ setupResource("src/test/resources/modules/docindex/test_docindex.xml", "test_docindex", "original", 1, Some("en"))
+ setupResource("src/test/resources/modules/docindex/test_docindex.xml", "test_docindex_2", "original", 1, Some("test"))
+
+ }
+
+ override def afterEach(): Unit = {
+ teardownResource("test_docindex_2", "original", 1)
+ teardownResource("test_docindex", "original", 1)
+ super.afterEach()
+ }
+
+ describe("didx:reindex") {
+ it("indexed the document (in tcommon:setup-resource)") {
+ xq("""xmldb:collection-available($didx:didx-path)""")
+ .assertTrue
+ .go
+
+ xq("""exists(doc($didx:didx-path || "/" || $didx:didx-resource))""")
+ .assertTrue
+ .go
+
+ xq(
+ """doc($didx:didx-path || "/" || $didx:didx-resource)//
+ didx:entry[@db-path="/db/data/original/en/test_docindex.xml"]""")
+ .assertXPath("exists($output)", "The document was not indexed")
+ .assertXPath("count($output) = 1", "The document was not indexed exactly once")
+ .assertXPath("$output/@collection='/db/data/original/en'", "the collection was recorded incorrectly")
+ .assertXPath("$output/@resource='test_docindex'", "the resource was recorded incorrectly")
+ .assertXPath("$output/@data-type='original'", "the data type was recorded incorrectly")
+ .assertXPath("$output/@document-name='test_docindex.xml'", "The document name was recorded incorrectly")
+ .go
+ }
+
+ it("does not add an additional entry when a document is reindexed twice") {
+ xq(
+ """let $reindex := didx:reindex("/db/data/original", "test_docindex.xqm")
+ return doc($didx:didx-path || "/" || $didx:didx-resource)//
+ didx:entry[@db-path="/db/data/original/en/test_docindex.xml"]""")
+ .assertXPath("count($output) = 1", "The document was not indexed exactly once")
+ .go
+ }
+ }
+
+ describe("didx:remove") {
+ it("deletes an existing entry from the index") {
+ xq("""didx:remove("/db/data/original/en", "test_docindex.xml")""")
+ .assertXPath("empty(doc($didx:didx-path || \"/\" || $didx:didx-resource)//didx:entry[@db-path=\"/db/data/original/en/test_docindex.xml\"])",
+ "The entry was not removed")
+ .assertXPath("""exists(doc($didx:didx-path || "/" || $didx:didx-resource)//didx:entry[@collection="/db/data/original/test"]) """)
+ .go
+ }
+
+ it("deletes an entire collection from the index with remove#2") {
+ xq("""didx:remove("/db/data/original/test", ())""")
+ .assertXPath("""empty(doc($didx:didx-path || "/" || $didx:didx-resource)//didx:entry[@collection="/db/data/original/test"]) """)
+ .go
+ }
+
+ it("deletes an entire collection from the index with remove#1") {
+ xq("""didx:remove("/db/data/original/test")""")
+ .assertXPath("""empty(doc($didx:didx-path || "/" || $didx:didx-resource)//didx:entry[@collection="/db/data/original/test"]) """)
+ .go
+ }
+
+ it("does nothing when a document does not exist") {
+ xq("""didx:remove("/db/data/original", "test_docindex_does_not_exist.xml")""")
+ .go
+ }
+ }
+
+ describe("didx:query-path") {
+ it("returns a result for an existing path") {
+ xq("""didx:query-path("original", "test_docindex")""")
+ .assertXPath("count($output) = 1", "The query did not return exactly 1 result")
+ .assertEquals("/db/data/original/en/test_docindex.xml")
+ .go
+ }
+
+ it("returns empty for a nonexisting path") {
+ xq("""didx:query-path("original", "nonexistent_docindex_entry")""")
+ .assertEmpty
+ .go
+ }
+ }
+
+ describe("didx:query-by-path") {
+ it("returns a result for an existing path") {
+ xq("""didx:query-by-path("/db/data/original/en/test_docindex.xml")""")
+ .assertXPath("exists($output)", "The document was not indexed")
+ .assertXPath("count($output) = 1", "The document was not indexed exactly once")
+ .assertXPath("$output/@resource='test_docindex'", "the resource was recorded incorrectly")
+ .assertXPath("$output/@data-type='original'", "the data type was recorded incorrectly")
+ .assertXPath("$output/@document-name='test_docindex.xml'", "The document name was recorded incorrectly")
+ .go
+ }
+
+ it("returns no result for a nonexisting path") {
+ xq("""didx:query-by-path("/db/data/original/en/test_docindex_does_not_exist.xml")""")
+ .assertEmpty
+ .go
+ }
+ }
+}
diff --git a/opensiddur-extensions/src/test/scala/org/opensiddur/modules/TestFollowUri.scala b/opensiddur-extensions/src/test/scala/org/opensiddur/modules/TestFollowUri.scala
new file mode 100644
index 00000000..3797bfea
--- /dev/null
+++ b/opensiddur-extensions/src/test/scala/org/opensiddur/modules/TestFollowUri.scala
@@ -0,0 +1,278 @@
+package org.opensiddur.modules
+
+import org.opensiddur.DbTest
+
+class TestFollowUri extends DbTest {
+ override val prolog =
+ """xquery version '3.1';
+import module namespace tcommon="http://jewishliturgy.org/test/tcommon"
+ at "xmldb:exist:/db/apps/opensiddur-server/test/tcommon.xqm";
+
+import module namespace uri="http://jewishliturgy.org/transform/uri"
+ at "xmldb:exist:///db/apps/opensiddur-server/modules/follow-uri.xqm";
+
+declare namespace tei="http://www.tei-c.org/ns/1.0";
+declare namespace jf="http://jewishliturgy.org/ns/jlptei/flat/1.0";
+
+ """
+
+ override def beforeAll: Unit = {
+ super.beforeAll
+ xq(
+ """let $user := tcommon:setup-test-users(1)
+ return ()
+ """)
+ .go
+ setupResource("src/test/resources/modules/follow-uri-context-1.xml",
+ "follow-uri-context-1", "original", 1, Some("en"),
+ group=Some("everyone"),permissions=Some("rw-rw-r--"))
+ setupResource("src/test/resources/modules/follow-uri-context-2.xml",
+ "follow-uri-context-2", "original", 1, Some("en"),
+ group=Some("everyone"),permissions=Some("rw-rw-r--"))
+ setupResource("src/test/resources/modules/no-dependencies.xml",
+ "no-dependencies", "original", 1, Some("en"),
+ group=Some("everyone"),permissions=Some("rw-rw-r--"))
+ setupResource("src/test/resources/modules/no-dependencies.xml",
+ "external-dependencies", "original", 1, Some("en"),
+ group=Some("everyone"),permissions=Some("rw-rw-r--"))
+ setupResource("src/test/resources/modules/dep-root.xml",
+ "dep-root", "original", 1, Some("en"),
+ group=Some("everyone"),permissions=Some("rw-rw-r--"))
+ setupResource("src/test/resources/modules/dep-tree1.xml",
+ "dep-tree1", "original", 1, Some("en"),
+ group=Some("everyone"),permissions=Some("rw-rw-r--"))
+ setupResource("src/test/resources/modules/dep-tree2.xml",
+ "dep-tree2", "original", 1, Some("en"),
+ group=Some("everyone"),permissions=Some("rw-rw-r--"))
+ setupResource("src/test/resources/modules/dep-tree3.xml",
+ "dep-tree3", "original", 1, Some("en"),
+ group=Some("everyone"),permissions=Some("rw-rw-r--"))
+ }
+
+ override def afterAll(): Unit = {
+ teardownResource("dep-tree3", "original", 1)
+ teardownResource("dep-tree2", "original", 1)
+ teardownResource("dep-tree1", "original", 1)
+ teardownResource("dep-root", "original", 1)
+ teardownResource("external-dependencies", "original", 1)
+ teardownResource("no-dependencies", "original", 1)
+ teardownResource("follow-uri-context-2", "original", 1)
+ teardownResource("follow-uri-context-1", "original", 1)
+ xq(
+ """let $user := tcommon:teardown-test-users(2)
+ return ()
+ """)
+ super.afterAll()
+ }
+
+ describe("uri:uri-base-path") {
+ it("returns a path without a fragment") {
+ xq("""uri:uri-base-path("abc.xml")""")
+ .assertEquals("abc.xml")
+ .go
+ }
+
+ it("removes the fragment from a path with one") {
+ xq("""uri:uri-base-path("abc.xml#def")""")
+ .assertEquals("abc.xml")
+ .go
+ }
+ }
+
+ describe("uri:uri-fragment") {
+ it("returns empty for a path with no fragment") {
+ xq("""uri:uri-fragment("abc.xml")""")
+ .assertEquals("")
+ .go
+ }
+
+ it("returns the fragment for a path that has one") {
+ xq("""uri:uri-fragment("abc.xml#def")""")
+ .assertEquals("def")
+ .go
+ }
+ }
+
+ describe("uri:follow (fast=true)") {
+ it("returns the destination itself when the destination is not a pointer") {
+ xq("""uri:follow(doc("/db/data/original/en/follow-uri-context-1.xml")/id("destination"), -1, (), true())""")
+ .assertXPath("""$output/self::tei:seg/@xml:id='destination' and count($output) = 1""")
+ .go
+ }
+
+ it("returns the final destination when the immediate destination points directly somewhere else") {
+ xq("""uri:follow(doc("/db/data/original/en/follow-uri-context-1.xml")/id("one"), -1, (), true())""")
+ .assertXPath("""$output/self::tei:seg/@xml:id='destination' and count($output) = 1""")
+ .go
+ }
+
+ it("returns the final destination when there are 2 chained pointers") {
+ xq("""uri:follow(doc("/db/data/original/en/follow-uri-context-1.xml")/id("two"), -1, (), true())""")
+ .assertXPath("""$output/self::tei:seg/@xml:id='destination' and count($output) = 1""")
+ .go
+ }
+
+ it("returns the final destination when there are 3 chained pointers") {
+ xq("""uri:follow(doc("/db/data/original/en/follow-uri-context-1.xml")/id("three"), -1, (), true())""")
+ .assertXPath("""$output/self::tei:seg/@xml:id='destination' and count($output) = 1""")
+ .go
+ }
+
+ it("returns the next pointer when evaluate=none") {
+ xq("""uri:follow(doc("/db/data/original/en/follow-uri-context-1.xml")/id("noeval"), -1, (), true())""")
+ .assertXPath("""$output/self::tei:ptr/@xml:id='three' and count($output) = 1""")
+ .go
+ }
+
+ it("returns two pointers ahead when evaluate=one") {
+ xq("""uri:follow(doc("/db/data/original/en/follow-uri-context-1.xml")/id("evalone"), -1, (), true())""")
+ .assertXPath("""$output/self::tei:ptr/@xml:id='two' and count($output) = 1""")
+ .go
+ }
+
+ it("returns both results when the pointer is a join") {
+ xq("""uri:follow(doc("/db/data/original/en/follow-uri-context-1.xml")/id("eval_join"), -1, (), true())""")
+ .assertXPath("count($output) = 2", "count is 2")
+ .assertXPath("$output/self::tei:seg/@xml:id='destination'", "segment 1 is present")
+ .assertXPath("$output/self::tei:seg/@xml:id='destination2'", "segment 2 is present")
+ .go
+ }
+
+ it("returns a p when the result is a join into a paragraph") {
+ xq("""uri:follow(doc("/db/data/original/en/follow-uri-context-1.xml")/id("eval_join_as_p"), -1, (), true())""")
+ .assertXPath("count($output) = 1 and exists($output/self::tei:p)", "result is 1 paragraph")
+ .assertXPath("$output/tei:seg/@xml:id='destination'", "segment 1 is present")
+ .assertXPath("$output/tei:seg/@xml:id='destination2'", "segment 2 is present")
+ .go
+ }
+
+ it("returns the destination when the pointer points to a different file") {
+ xq("""uri:follow(doc("/db/data/original/en/follow-uri-context-1.xml")/id("in_file_2"), -1, (), true())""")
+ .assertXPath("$output/self::tei:seg/@xml:id='f2_destination' and count($output) = 1")
+ .go
+ }
+
+ it("returns the destination when the other file has indirection") {
+ xq("""uri:follow(doc("/db/data/original/en/follow-uri-context-1.xml")/id("in_file_2_indirect"), -1, (), true())""")
+ .assertXPath("$output/self::tei:seg/@xml:id='f2_destination' and count($output) = 1")
+ .go
+ }
+
+ it("returns the full range when the destination is a range") {
+ xq("""uri:follow(doc("/db/data/original/en/follow-uri-context-1.xml")/id("range"), -1, (), true())""")
+ .assertXmlEquals("""1""",
+ """2""",
+ """3""")
+ .go
+ }
+
+ it("does not follow pointers of type=url") {
+ xq("""uri:follow(doc("/db/data/original/en/follow-uri-context-1.xml")/id("url_ptr"), -1, (), true())""")
+ .assertXPath("$output/self::tei:ptr/@xml:id='url_ptr' and count($output)=1")
+ .go
+ }
+
+ it("stops following a pointer at a url pointer") {
+ xq("""uri:follow(doc("/db/data/original/en/follow-uri-context-1.xml")/id("to_url_ptr"), -1, (), true())""")
+ .assertXPath("$output/self::tei:ptr/@xml:id='url_ptr' and count($output)=1")
+ .go
+ }
+ }
+
+ describe("uri:fast-follow") {
+ it("handles a pointer to a range that crosses a hierarchy, $allow-copies=false()") {
+ xq("""let $ptr := doc("/db/data/original/en/follow-uri-context-1.xml")/id("range_bdy")
+ return
+ uri:fast-follow($ptr/@target/string(), $ptr, -1, (), false(), ())[. instance of element()]""")
+ .assertXmlEquals("""
+ | YES 1
+ | YES 2
+ | כן 3
+ | """.stripMargin)
+ }
+
+ it("returns a range that crosses a hierarchy, $allow-copies=true() (including uri attributes for copied elements)") {
+ xq("""let $ptr := doc("/db/data/original/en/follow-uri-context-1.xml")/id("range_bdy")
+ return
+ uri:fast-follow($ptr/@target/string(), $ptr, -1, (), true(), ())""")
+ .assertXmlEquals("""
+ | YES 1
+ | YES 2
+ |
+ | כן 3
+ |
+ |
+ |""".stripMargin)
+ }
+ }
+
+ describe("uri:dependency") {
+ it("returns a self dependency for a document with no dependencies") {
+ xq("""uri:dependency(doc("/db/data/original/en/no-dependencies.xml"), ())""")
+ .assertEquals("/db/data/original/en/no-dependencies.xml")
+ .go
+ }
+
+ it("returns only self dependency of a resource with internal and external dependencies") {
+ xq("""uri:dependency(doc("/db/data/original/en/external-dependencies.xml"), ())""")
+ .assertEquals("/db/data/original/en/external-dependencies.xml")
+ .go
+ }
+
+ it("returns all dependencies in a tree with one circular dependency") {
+ xq("""uri:dependency(doc("/db/data/original/en/dep-root.xml"), ())""")
+ .assertXPath("count($output)=4", "4 listed")
+ .assertXPath("""every $d in (
+ "/db/data/original/en/dep-root.xml",
+ "/db/data/original/en/dep-tree1.xml",
+ "/db/data/original/en/dep-tree2.xml",
+ "/db/data/original/en/dep-tree3.xml") satisfies $d=$output""", "all deps listed")
+ .go
+ }
+ }
+}
diff --git a/opensiddur-extensions/src/test/scala/org/opensiddur/modules/TestMirror.scala b/opensiddur-extensions/src/test/scala/org/opensiddur/modules/TestMirror.scala
new file mode 100644
index 00000000..50bcfefa
--- /dev/null
+++ b/opensiddur-extensions/src/test/scala/org/opensiddur/modules/TestMirror.scala
@@ -0,0 +1,728 @@
+package org.opensiddur.modules
+
+import org.opensiddur.DbTest
+
+class BaseTestMirror extends DbTest {
+ /** imports, namespaces and variables */
+ override val prolog: String =
+ """xquery version '3.1';
+
+ import module namespace magic="http://jewishliturgy.org/magic"
+ at "xmldb:exist:/db/apps/opensiddur-server/magic/magic.xqm";
+ import module namespace mirror="http://jewishliturgy.org/modules/mirror"
+ at "xmldb:exist:///db/apps/opensiddur-server/modules/mirror.xqm";
+ import module namespace tcommon="http://jewishliturgy.org/test/tcommon"
+ at "xmldb:exist:///db/apps/opensiddur-server/test/tcommon.xqm";
+
+
+ declare namespace error="http://jewishliturgy.org/errors";
+
+ declare variable $local:original-collection := '/db/data/tests';
+ declare variable $local:mirror-collection := '/db/data/tests/mirror';
+
+ declare function local:same-permissions(
+ $a as xs:string,
+ $b as xs:string
+ ) as xs:boolean {
+ (xmldb:collection-available($a) or doc-available($a)) and
+ (xmldb:collection-available($b) or doc-available($b)) and
+ xmldiff:compare(sm:get-permissions(xs:anyURI($a)),sm:get-permissions(xs:anyURI($b)))
+ };
+
+ declare function local:transform(
+ $context as node()
+ ) as node()* {
+ typeswitch($context)
+ case document-node() return document { local:transform($context/*)}
+ case element(up-to-date) return element up-to-date { attribute n { $context/@n/number() + 1 }}
+ default return $context
+ };
+
+ """
+ val delayTimeMs = 500; // for forced delays
+
+ override def beforeAll: Unit = {
+ super.beforeAll
+
+ setupUsers(2)
+ setupCollection("/db/data", "tests", Some("admin"), Some("dba"), Some("rwxrwxrwx"))
+ setupCollection("/db/data/tests", "mirror", Some("admin"), Some("dba"), Some("rwxrwxrwx"))
+ store("""
+ /db/data/tests
+ false
+ """,
+ "/db/data/tests/mirror", "mirror-conf.xml", firstParamIsContent = true)
+ }
+
+ override def afterAll(): Unit = {
+ teardownCollection("/db/data/tests")
+ teardownUsers(2)
+
+ super.afterAll()
+ }
+}
+
+class TestMirrorCreate extends BaseTestMirror {
+ override def afterEach(): Unit = {
+ teardownCollection("/db/data/tests/new-mirror")
+ super.afterEach()
+ }
+
+ describe("mirror:create") {
+ it("creates a new mirror collection") {
+ xq("""mirror:create("/db/data/tests/new-mirror", $local:original-collection)""")
+ .user("xqtest1")
+ .assertXPath("""xmldb:collection-available("/db/data/tests/new-mirror")""", "mirror collection created")
+ .assertXPath("""doc-available("/db/data/tests/new-mirror/" || $mirror:configuration)""", "mirror configuration exists")
+ .assertXPath("""doc('/db/data/tests/new-mirror/' || $mirror:configuration)/mirror:configuration/mirror:of = "/db/data/tests" """, "mirror configuration points to the correct original")
+ .assertXPath("""local:same-permissions("/db/data/tests/new-mirror", $local:original-collection)""", "mirror collection permissions are the same as the original collection")
+ .go
+ }
+
+ it("creates a new mirror collection with universal access") {
+ xq("""mirror:create("/db/data/tests/new-mirror", $local:original-collection, true())""")
+ .user("xqtest1")
+ .assertXPath("""xmldb:collection-available("/db/data/tests/new-mirror") """, "mirror collection created")
+ .assertXPath("""doc-available("/db/data/tests/new-mirror/" || $mirror:configuration) """, "mirror configuration exists")
+ .assertXPath("""doc('/db/data/tests/new-mirror/' || $mirror:configuration)/mirror:configuration/mirror:of = "/db/data/tests" """, "mirror configuration points to the correct original")
+ .assertXPath("""doc('/db/data/tests/new-mirror/' || $mirror:configuration)/mirror:configuration/mirror:universal-access = "true" """, "mirror is configured for universal access")
+ .assertXPath("""sm:get-permissions(xs:anyURI("/db/data/tests/new-mirror"))/*/@mode = "rwxrwxrwx" """, "mirror collection permissions are universally permissive")
+ .go
+ }
+
+ it("creates a new mirror collection with an extension map") {
+ xq("""mirror:create("/db/data/tests/new-mirror", $local:original-collection, false(),
+ map {
+ "xml" : "html"
+ , "txt" : "csv"}
+ )""")
+ .user("xqtest1")
+ .assertXPath("""xmldb:collection-available("/db/data/tests/new-mirror") """, "mirror collection created")
+ .assertXPath("""doc-available("/db/data/tests/new-mirror/" || $mirror:configuration) """, "mirror configuration exists")
+ .assertXPath("""doc('/db/data/tests/new-mirror/' || $mirror:configuration)/mirror:configuration/mirror:of = "/db/data/tests" """, "mirror configuration points to the correct original")
+ .assertXPath("""count(doc("/db/data/tests/new-mirror/" || $mirror:configuration)/mirror:configuration/mirror:map) = 2 """, "mirror configuration includes 2 maps")
+ .assertXPath("""doc("/db/data/tests/new-mirror/" || $mirror:configuration)/mirror:configuration/mirror:map[@from="xml"][@to="html"] """, "mirror configuration includes xml->html map")
+ .assertXPath("""doc("/db/data/tests/new-mirror/" || $mirror:configuration)/mirror:configuration/mirror:map[@from="txt"][@to="csv"] """, "mirror configuration includes txt->csv map")
+ .go
+ }
+ }
+}
+
+class TestMirrorPathExtended extends BaseTestMirror {
+ override def beforeEach(): Unit = {
+ super.beforeEach()
+
+ xq("""update insert into
+ doc("/db/data/tests/mirror/mirror-conf.xml")/mirror:configuration""")
+ .go
+ }
+
+ describe("mirror:path (with extension map)") {
+ it("returns the path concatenated and mapped") {
+ xq("""mirror:mirror-path("/db/data/tests/mirror", "/db/data/tests/original/path/test.xml")""")
+ .user("xqtest1")
+ .assertEquals("/db/data/tests/mirror/original/path/test.html")
+ .go
+ }
+
+ it("returns the path concatenated with an unmapped extension") {
+ xq("""mirror:mirror-path("/db/data/tests/mirror", "/db/data/tests/original/path/test.xsl")""")
+ .user("xqtest1")
+ .assertEquals("/db/data/tests/mirror/original/path/test.xsl")
+ .go
+ }
+ }
+
+ describe("mirror:unmirror-path (with extension map)") {
+ it("returns the path with the mapped extension") {
+ xq("""mirror:unmirror-path("/db/data/tests/mirror", "/db/data/tests/mirror/one/two/test.html") """)
+ .user("xqtest1")
+ .assertEquals("/db/data/tests/one/two/test.xml")
+ .go
+ }
+
+ it("returns a path with an unmapped extension") {
+ xq("""mirror:unmirror-path("/db/data/tests/mirror", "/db/data/tests/mirror/one/two/test.xsl") """)
+ .user("xqtest1")
+ .assertEquals("/db/data/tests/one/two/test.xsl")
+ .go
+ }
+ }
+}
+
+class TestMirrorPath extends BaseTestMirror {
+ describe("mirror:mirror-path") {
+ it("returns the path concatenated") {
+ xq("""mirror:mirror-path("/db/data/tests/mirror", "/db/data/tests/original/path")""")
+ .user("xqtest1")
+ .assertEquals("/db/data/tests/mirror/original/path")
+ .go
+ }
+
+ it("handles relative paths in second parameter") {
+ xq("""mirror:mirror-path("/db/data/tests/mirror", "original/path")""")
+ .user("xqtest1")
+ .assertEquals("/db/data/tests/mirror/original/path")
+ .go
+ }
+
+ it("fails when no /db prefix in second parameter") {
+ xq("""mirror:mirror-path("/db/data/tests/mirror", "/data/tests")""")
+ .user("xqtest1")
+ .assertThrows("error:NOT_MIRRORED")
+ .go
+ }
+
+ it("fails when no /db in first parameter") {
+ xq("""mirror:mirror-path("/data/tests/mirror", "/db/data/tests")""")
+ .user("xqtest1")
+ .assertThrows("error:INPUT")
+ .go
+ }
+
+ it("fails if mirror collection is not a mirror") {
+ xq("""mirror:mirror-path("/db", "/original/path")""")
+ .user("xqtest1")
+ .assertThrows("error:NOT_A_MIRROR")
+ .go
+ }
+
+ it("fails if mirrored collection is not in the mirror") {
+ xq("""mirror:mirror-path("/db/data/tests/mirror", "/db")""")
+ .user("xqtest1")
+ .assertThrows("error:NOT_MIRRORED")
+ .go
+ }
+ }
+
+ describe("mirror:unmirror-path") {
+ it("returns a path when /db is in both parameters, self") {
+ xq("""mirror:unmirror-path("/db/data/tests/mirror", "/db/data/tests/mirror") """)
+ .user("xqtest1")
+ .assertEquals("/db/data/tests")
+ .go
+ }
+
+ it("fails when /db missing in second parameter") {
+ xq("""mirror:unmirror-path("/db/data/tests/mirror", "/data/tests/mirror") """)
+ .user("xqtest1")
+ .assertThrows("error:INPUT")
+ .go
+ }
+
+ it("it fails when /db missing in first parameter") {
+ xq("""mirror:unmirror-path("/data/tests/mirror", "/db/data/tests/mirror") """)
+ .user("xqtest1")
+ .assertThrows("error:INPUT")
+ .go
+ }
+
+ it("returns a path when given the mirror collection + subcollections") {
+ xq("""mirror:unmirror-path("/db/data/tests/mirror", "/db/data/tests/mirror/one/two") """)
+ .user("xqtest1")
+ .assertEquals("/db/data/tests/one/two")
+ .go
+ }
+ }
+}
+
+class TestMirrorCollection extends BaseTestMirror {
+ override def beforeAll: Unit = {
+ super.beforeAll
+
+ setupCollection("/db/data/tests", "one", Some("xqtest1"), Some("everyone"), Some("rwxrwxr-x"))
+ setupCollection("/db/data/tests/one", "two", Some("xqtest1"), Some("xqtest1"), Some("rwxrwxr-x"))
+ setupCollection("/db/data/tests/one/two", "three", Some("xqtest1"), Some("xqtest1"), Some("rwxrwxr-x"))
+ setupCollection("/db/data/tests/one/two/three", "four", Some("xqtest1"), Some("xqtest1"), Some("rwxrwxr-x"))
+
+ xq("""
+ let $one := xs:anyURI("/db/data/tests/one")
+ let $two := xs:anyURI("/db/data/tests/one/two")
+ let $three := xs:anyURI("/db/data/tests/one/two/three")
+ let $four := xs:anyURI("/db/data/tests/one/two/three/four")
+ let $two-ace := sm:add-user-ace($two, "xqtest2", true(), "w")
+ let $three-ace := sm:add-group-ace($three, "everyone", true(), "r")
+ let $four-ace-1 := sm:add-user-ace($four, "xqtest2", true(), "r")
+ let $four-ace-2 := sm:add-group-ace($four, "everyone", false(), "w")
+ return ()""")
+ .user("admin")
+ .go
+ }
+
+ override def afterAll(): Unit = {
+ teardownCollection("/db/data/tests/one")
+ super.afterAll()
+ }
+
+ describe("mirror:make-collection-path") {
+ it("makes a collection hierarchy mirror") {
+ xq("""mirror:make-collection-path("/db/data/tests/mirror", "/db/data/tests/one/two/three/four") """)
+ .user("xqtest1")
+ .assertXPath("""xmldb:collection-available("/db/data/tests/mirror/one") """, "mirror collection 'one' created")
+ .assertXPath("""xmldb:collection-available("/db/data/tests/mirror/one/two") """, "mirror collection 'two' created")
+ .assertXPath("""xmldb:collection-available("/db/data/tests/mirror/one/two/three") """, "mirror collection 'three' created")
+ .assertXPath("""xmldb:collection-available("/db/data/tests/mirror/one/two/three/four") """, "mirror collection 'four' created")
+ .assertXPath("""local:same-permissions("/db/data/tests/mirror/one","/db/data/tests/one") """, "mirror collection 'one' has same permissions as /db/data/tests/one (changed owner/group/mode)")
+ .assertXPath("""local:same-permissions("/db/data/tests/mirror/one/two","/db/data/tests/one/two") """, "mirror collection 'two' has same permissions as /db/data/tests/one/two (allowed user ACE)")
+ .assertXPath("""local:same-permissions("/db/data/tests/mirror/one/two/three","/db/data/tests/one/two/three") """, "mirror collection 'three' has same permissions as /db/data/tests/one/two/three (allowed group ACE)")
+ .assertXPath("""local:same-permissions("/db/data/tests/mirror/one/two/three/four","/db/data/tests/one/two/three/four") """, "mirror collection 'four' has same permissions as /db/data/tests/one/two/three/four (allowed user ACE, disallowed group ACE)")
+ .go
+ }
+ }
+}
+
+class TestMirrorCollectionUniversal extends BaseTestMirror {
+ override def beforeAll: Unit = {
+ super.beforeAll
+
+ setupCollection("/db/data/tests", "one", Some("xqtest1"), Some("everyone"), Some("rwxrwxr-x"))
+ setupCollection("/db/data/tests/one", "two", Some("admin"), Some("dba"), Some("rwxrwxr-x"))
+ setupCollection("/db/data/tests/one/two", "three", Some("admin"), Some("dba"), Some("rwxrwxr-x"))
+
+ xq("""
+ let $update := update value doc("/db/data/tests/mirror/" || $mirror:configuration)/*/mirror:universal-access with "true"
+ let $one := xs:anyURI("/db/data/tests/one")
+ let $two := xs:anyURI("/db/data/tests/one/two")
+ let $three := xs:anyURI("/db/data/tests/one/two/three")
+ let $two-ace := sm:add-user-ace($two, "xqtest2", true(), "w")
+ let $three-ace := sm:add-group-ace($three, "everyone", true(), "r")
+ return ()""")
+ .user("admin")
+ .go
+ }
+
+ override def afterAll(): Unit = {
+ teardownCollection("/db/data/tests/one")
+ super.afterAll()
+ }
+
+ describe("mirror:make-collection-path") {
+ it("makes a collection hierarchy mirror") {
+ xq("""mirror:make-collection-path("/db/data/tests/mirror","/db/data/tests/one/two/three") """)
+ .user("xqtest1")
+ .assertXPath("""xmldb:collection-available("/db/data/tests/mirror/one") """, "mirror collection 'one' created")
+ .assertXPath("""xmldb:collection-available("/db/data/tests/mirror/one/two") """, "mirror collection 'two' created")
+ .assertXPath("""xmldb:collection-available("/db/data/tests/mirror/one/two/three") """, "mirror collection 'three' created")
+ .assertXPath("""sm:get-permissions(xs:anyURI("/db/data/tests/mirror/one"))/*/@mode="rwxrwxrwx" """, "mirror collection 'one' has universal access permissions")
+ .assertXPath("""sm:get-permissions(xs:anyURI("/db/data/tests/mirror/one/two"))/*/@mode="rwxrwxrwx" """, "mirror collection 'two' has universal access permissions")
+ .assertXPath("""sm:get-permissions(xs:anyURI("/db/data/tests/mirror/one/two/three"))/*/@mode="rwxrwxrwx" """, "mirror collection 'three' universal access permissions")
+ .go
+ }
+ }
+}
+
+class TestMirrorIsUpToDateMirrorNewer extends BaseTestMirror {
+ override def beforeAll: Unit = {
+ super.beforeAll
+ store("""""", "/db/data/tests", "test.xml", firstParamIsContent = true)
+ // add an artificial delay to make the mirror newer
+ Thread.sleep(delayTimeMs)
+
+ store("""""", "/db/data/tests/mirror", "test.xml", firstParamIsContent = true)
+ }
+
+ override def afterAll(): Unit = {
+ remove("/db/data/tests", "test.xml")
+
+ super.afterAll()
+ }
+
+ describe("mirror:is-up-to-date") {
+ it ("returns true with no function") {
+ xq("""mirror:is-up-to-date($local:mirror-collection, "/db/data/tests/test.xml") """)
+ .assertTrue
+ .go
+ }
+
+ it("returns true with an additional function that returns true") {
+ xq(
+ """mirror:is-up-to-date($local:mirror-collection, "/db/data/tests/test.xml",
+ function($m, $t) as xs:boolean { true() }) """)
+ .assertTrue
+ .go
+ }
+
+ it("returns false with an additional function that returns false") {
+ xq(
+ """mirror:is-up-to-date($local:mirror-collection, "/db/data/tests/test.xml",
+ function($m, $t) as xs:boolean { false() }) """)
+ .assertFalse
+ .go
+ }
+ }
+}
+
+class TestMirrorIsUpToDateExtensionMapMirrorNewer extends BaseTestMirror {
+ override def beforeAll: Unit = {
+ super.beforeAll
+ store("""""", "/db/data/tests", "test.xml", firstParamIsContent = true)
+ // add an artificial delay to make the mirror newer
+ Thread.sleep(delayTimeMs)
+
+ store("""""", "/db/data/tests/mirror", "test.html", firstParamIsContent = true)
+
+ xq("""update insert into
+ doc("/db/data/tests/mirror/mirror-conf.xml")/mirror:configuration""").go
+ }
+
+ override def afterAll(): Unit = {
+ remove("/db/data/tests", "test.xml")
+
+ super.afterAll()
+ }
+
+ describe("mirror:is-up-to-date()") {
+ it("returns true when a mapping is present and the mirror is up to date") {
+ xq("""mirror:is-up-to-date($local:mirror-collection, "/db/data/tests/test.xml") """)
+ .assertTrue
+ .go
+ }
+ }
+}
+
+class TestMirrorIsUpToDateMirrorOlder extends BaseTestMirror {
+
+ override def beforeAll: Unit = {
+ super.beforeAll
+
+ store("""""", "/db/data/tests/mirror", "test.xml", firstParamIsContent = true)
+ // add an artificial delay to make the mirror newer
+ Thread.sleep(delayTimeMs)
+ store("""""", "/db/data/tests", "test.xml", firstParamIsContent = true)
+ }
+
+ override def afterAll(): Unit = {
+ remove("/db/data/tests", "test.xml")
+
+ super.afterAll()
+ }
+
+ describe("mirror:is-up-to-date()") {
+ it("returns false without an additional function") {
+ xq("""mirror:is-up-to-date($local:mirror-collection, "/db/data/tests/test.xml") """)
+ .assertFalse
+ .go
+ }
+
+ it("returns false with an additional function that returns true()") {
+ xq("""
+ mirror:is-up-to-date($local:mirror-collection, "/db/data/tests/test.xml",
+ function($m, $t) as xs:boolean
+ {true()}
+ )
+ """)
+ .assertFalse
+ .go
+ }
+ }
+}
+
+class TestMirrorIsUpToDateExtensionMapMirrorOlder extends BaseTestMirror {
+ override def beforeAll: Unit = {
+ super.beforeAll
+
+ store("""""", "/db/data/tests/mirror", "test.html", firstParamIsContent = true)
+ // add an artificial delay to make the mirror newer
+ Thread.sleep(delayTimeMs)
+ store("""""", "/db/data/tests", "test.xml", firstParamIsContent = true)
+
+ xq("""update insert into
+ doc("/db/data/tests/mirror/mirror-conf.xml")/mirror:configuration""").go
+ }
+
+ override def afterAll(): Unit = {
+ remove("/db/data/tests", "test.xml")
+
+ super.afterAll()
+ }
+
+ describe("mirror:is-up-to-date()") {
+ it("returns false when a mapping is present and the mirror is up to date") {
+ xq("""mirror:is-up-to-date($local:mirror-collection, "/db/data/tests/test.xml") """)
+ .assertFalse
+ .go
+ }
+ }
+}
+
+class TestMirrorStore extends BaseTestMirror {
+ override def beforeAll: Unit = {
+ super.beforeAll()
+ setupCollection("/db/data/tests", "one", Some("xqtest1"), Some("everyone"), Some("rwxrwxr-x"))
+
+ store("", "/db/data/tests/one", "test.xml", firstParamIsContent = true, as = "xqtest1")
+ }
+
+ override def afterAll(): Unit = {
+ teardownCollection("/db/data/tests/one")
+
+ super.afterAll()
+ }
+
+ describe("mirror:store()") {
+ it("stores a resource and returns its path") {
+ xq("""mirror:store($local:mirror-collection, "/db/data/tests/one", "test.xml", ) """)
+ .user("xqtest1")
+ .assertEquals("/db/data/tests/mirror/one/test.xml")
+ .assertXPath("""xmldb:collection-available("/db/data/tests/mirror/one") """, "mirror collection created")
+ .assertXPath("""doc-available("/db/data/tests/mirror/one/test.xml") """, "mirror resource created")
+ .assertXPath("""local:same-permissions("/db/data/tests/one/test.xml", "/db/data/tests/mirror/one/test.xml") """, "mirror resource has same permissions as original")
+ .go
+ }
+ }
+}
+
+class TestMirrorStoreWithExtensionMap extends BaseTestMirror {
+ override def beforeAll: Unit = {
+ super.beforeAll()
+ setupCollection("/db/data/tests", "one", Some("xqtest1"), Some("everyone"), Some("rwxrwxr-x"))
+
+ store("", "/db/data/tests/one", "test.xml", firstParamIsContent = true, as = "xqtest1")
+
+ xq("""update insert into
+ doc("/db/data/tests/mirror/mirror-conf.xml")/mirror:configuration """).go
+ }
+
+ override def afterAll(): Unit = {
+ teardownCollection("/db/data/tests/one")
+
+ super.afterAll()
+ }
+
+ describe("mirror:store()") {
+ it("returns the path of a mirror document with an extension map") {
+ xq("""mirror:store($local:mirror-collection, "/db/data/tests/one", "test.xml", )""")
+ .user("xqtest1")
+ .assertEquals("/db/data/tests/mirror/one/test.html")
+ .assertXPath("""xmldb:collection-available("/db/data/tests/mirror/one") """, "mirror collection created")
+ .assertXPath("""doc-available("/db/data/tests/mirror/one/test.html") """, "mirror resource created with mapped extension")
+ .assertXPath("""local:same-permissions("/db/data/tests/one/test.xml", "/db/data/tests/mirror/one/test.html") """, "mirror resource has same permissions as original")
+ .go
+ }
+ }
+}
+
+class TestMirrorRemove extends BaseTestMirror {
+ override def beforeEach: Unit = {
+ super.beforeEach()
+ setupCollection("/db/data/tests/mirror", "one", Some("xqtest1"), Some("everyone"), Some("rwxrwxr-x"))
+
+ store("", "/db/data/tests/mirror/one", "test.xml", firstParamIsContent = true, as = "xqtest1")
+ }
+
+ override protected def afterEach(): Unit = {
+ teardownCollection("/db/data/tests/mirror/one")
+
+ super.afterEach()
+ }
+
+ describe("mirror:remove()") {
+ it("removes a mirror resource") {
+
+ xq("""mirror:remove($local:mirror-collection, "/db/data/tests/one", "test.xml") """)
+ .user("xqtest1")
+ .assertXPath("""not(doc-available("/db/data/tests/mirror/one/test.xml")) """, "resource removed")
+ .assertXPath("""not(xmldb:collection-available("/db/data/tests/mirror/one")) """, "empty parent collection removed")
+ .go
+ }
+
+ it("removes a collection") {
+ xq("""mirror:remove($local:mirror-collection, "/db/data/tests/one") """)
+ .user("xqtest1")
+ .assertXPath("""not(xmldb:collection-available("/db/data/tests/mirror/one")) """, "collection removed")
+ .go
+ }
+ }
+}
+
+class TestMirrorRemoveWithExtensionMap extends BaseTestMirror {
+ override def beforeAll: Unit = {
+ super.beforeAll()
+ setupCollection("/db/data/tests", "one", Some("xqtest1"), Some("everyone"), Some("rwxrwxr-x"))
+
+ store("""""", "/db/data/tests/one", "test.html", firstParamIsContent = true, as = "xqtest1")
+
+ xq("""update insert into
+ doc("/db/data/tests/mirror/mirror-conf.xml")/mirror:configuration """).go
+ }
+
+ override def afterAll(): Unit = {
+ teardownCollection("/db/data/tests/one")
+
+ super.afterAll()
+ }
+
+ describe("mirror:remove()") {
+ it("removes the resource") {
+ xq("""mirror:remove($local:mirror-collection, "/db/data/tests/one", "test.xml")""")
+ .user("xqtest1")
+ .assertXPath("""not(doc-available("/db/data/tests/mirror/one/test.html")) """, "mapped resource removed")
+ .go
+ }
+ }
+}
+
+class TestMirrorApplyIfOutdated extends BaseTestMirror {
+ override def beforeEach: Unit = {
+ super.beforeEach()
+
+ store("""""", "/db/data/tests", "test-up-to-date.xml", firstParamIsContent = true, as = "xqtest1")
+ store("""""", "/db/data/tests", "test-out-of-date.xml", firstParamIsContent = true, as = "xqtest1")
+ store("""""", "/db/data/tests/mirror", "test-up-to-date.xml", firstParamIsContent = true, as = "xqtest1")
+ }
+
+ override def afterEach(): Unit = {
+ remove("/db/data/tests", "test-up-to-date.xml", as = "xqtest1")
+ remove("/db/data/tests", "test-out-of-date.xml", as = "xqtest1")
+ super.afterEach()
+ }
+
+ describe("mirror:apply-if-outdated()") {
+ it("""does not apply the transform when the file is up to date""") {
+ xq("""mirror:apply-if-outdated(
+ $local:mirror-collection,
+ "/db/data/tests/test-up-to-date.xml",
+ local:transform#1)
+ """)
+ .user("xqtest1")
+ .assertXPath("""doc("/db/data/tests/mirror/test-up-to-date.xml")/up-to-date/@n = 1 """, "transform did not run")
+ .assertXPath("""$output/up-to-date/@n = 1 """, "return value is correct document")
+ .go
+ }
+
+ it("""does apply the transform when the file is out of date""") {
+ xq("""mirror:apply-if-outdated(
+ $local:mirror-collection,
+ "/db/data/tests/test-out-of-date.xml",
+ local:transform#1)
+ """)
+ .user("xqtest1")
+ .assertXPath("""doc("/db/data/tests/mirror/test-out-of-date.xml")/up-to-date/@n = 2 """, "transform did run")
+ .assertXPath("""$output/up-to-date/@n = 2 """, "return value is transformed document")
+ .go
+ }
+
+ it("does apply the transform when the file is out of date and given a document-node as parameter #2") {
+ xq("""mirror:apply-if-outdated(
+ $local:mirror-collection,
+ doc("/db/data/tests/test-out-of-date.xml"),
+ local:transform#1)
+ """)
+ .user("xqtest1")
+ .assertXPath("""doc("/db/data/tests/mirror/test-out-of-date.xml")/up-to-date/@n = 2 """, "transform did run")
+ .assertXPath("""$output/up-to-date/@n = 2 """, "return value is transformed document")
+ .go
+ }
+
+ it("does not apply the transform when in-date and there is a different original node than the transformed node") {
+ xq("""mirror:apply-if-outdated(
+ $local:mirror-collection,
+ doc("/db/data/tests/test-out-of-date.xml"),
+ local:transform#1,
+ doc("/db/data/tests/test-up-to-date.xml")
+ )
+ """)
+ .user("xqtest1")
+ .assertXPath("""doc("/db/data/tests/mirror/test-up-to-date.xml")/up-to-date/@n = 1 """, "transform did not run")
+ .assertXPath("""$output/up-to-date/@n = 1 """, "return value is untransformed document")
+ .go
+ }
+
+ it("does apply the transform when out of date with a different original node than the transformed node") {
+ xq("""mirror:apply-if-outdated(
+ $local:mirror-collection,
+ doc("/db/data/tests/test-up-to-date.xml"),
+ local:transform#1,
+ doc("/db/data/tests/test-out-of-date.xml")
+ )
+ """)
+ .user("xqtest1")
+ .assertXPath("""doc("/db/data/tests/mirror/test-out-of-date.xml")/up-to-date/@n = 101 """, "transform did run")
+ .assertXPath("""$output/up-to-date/@n = 101 """, "return value is transformed document")
+ .go
+ }
+ }
+}
+
+class TestMirrorApplyIfOutdatedWithExtensionMap extends BaseTestMirror {
+ override def beforeEach: Unit = {
+ super.beforeEach()
+
+ xq("""update insert into
+ doc("/db/data/tests/mirror/mirror-conf.xml")/mirror:configuration""").go
+
+ store("""""", "/db/data/tests", "test-up-to-date.xml", firstParamIsContent = true, as = "xqtest1")
+ store("""""", "/db/data/tests", "test-out-of-date.xml", firstParamIsContent = true, as = "xqtest1")
+ store("""""", "/db/data/tests/mirror", "test-up-to-date.html", firstParamIsContent = true, as = "xqtest1")
+
+ }
+
+ override def afterEach(): Unit = {
+ remove("/db/data/tests", "test-up-to-date.xml", as = "xqtest1")
+ remove("/db/data/tests", "test-out-of-date.xml", as = "xqtest1")
+ super.afterEach()
+ }
+
+ describe("mirror:apply-if-outdated()") {
+ it("does not run the transform when the file is in date") {
+ xq(
+ """mirror:apply-if-outdated(
+ $local:mirror-collection,
+ "/db/data/tests/test-up-to-date.xml",
+ local:transform#1)
+ """)
+ .user("xqtest1")
+ .assertXPath("""doc("/db/data/tests/mirror/test-up-to-date.html")/up-to-date/@n = 1 """, "transform did not run")
+ .assertXPath("""$output/up-to-date/@n = 1 """, "return value is correct document")
+ .go
+ }
+ it("does run the transform when the file is out of date") {
+ xq("""mirror:apply-if-outdated(
+ $local:mirror-collection,
+ "/db/data/tests/test-out-of-date.xml",
+ local:transform#1)
+ """)
+ .user("xqtest1")
+ .assertXPath("""doc("/db/data/tests/mirror/test-out-of-date.html")/up-to-date/@n = 2 """, "transform did run")
+ .assertXPath("""$output/up-to-date/@n = 2 """, "return value is transformed document")
+ .go
+ }
+ it("does run the transform when the file is out of date with a document-node as parameter #2") {
+ xq("""mirror:apply-if-outdated(
+ $local:mirror-collection,
+ doc("/db/data/tests/test-out-of-date.xml"),
+ local:transform#1)
+ """)
+ .user("xqtest1")
+ .assertXPath("""doc("/db/data/tests/mirror/test-out-of-date.html")/up-to-date/@n = 2 """, "transform did run")
+ .assertXPath("""$output/up-to-date/@n = 2 """, "return value is transformed document")
+ .go
+ }
+ it("does not run the transform when the file is up to date with a different original node than the transformed node") {
+ xq("""mirror:apply-if-outdated(
+ $local:mirror-collection,
+ doc("/db/data/tests/test-out-of-date.xml"),
+ local:transform#1,
+ doc("/db/data/tests/test-up-to-date.xml")
+ )
+ """)
+ .user("xqtest1")
+ .assertXPath("""doc("/db/data/tests/mirror/test-up-to-date.html")/up-to-date/@n = 1 """, "transform did not run")
+ .assertXPath("""$output/up-to-date/@n = 1 """, "return value is untransformed document")
+ .go
+ }
+ it("runs the transform when the file is out of date with a different original node than the transformed node") {
+ xq("""mirror:apply-if-outdated(
+ $local:mirror-collection,
+ doc("/db/data/tests/test-up-to-date.xml"),
+ local:transform#1,
+ doc("/db/data/tests/test-out-of-date.xml")
+ )
+ """)
+ .user("xqtest1")
+ .assertXPath("""doc("/db/data/tests/mirror/test-out-of-date.html")/up-to-date/@n = 101 """, "transform did run")
+ .assertXPath("""$output/up-to-date/@n = 101 """, "return value is transformed document")
+ .go
+ }
+ }
+}
\ No newline at end of file
diff --git a/opensiddur-extensions/src/test/scala/org/opensiddur/modules/TestRefindex.scala b/opensiddur-extensions/src/test/scala/org/opensiddur/modules/TestRefindex.scala
new file mode 100644
index 00000000..ab114dee
--- /dev/null
+++ b/opensiddur-extensions/src/test/scala/org/opensiddur/modules/TestRefindex.scala
@@ -0,0 +1,499 @@
+package org.opensiddur.modules
+
+import org.opensiddur.DbTest
+
+class BaseTestRefindex extends DbTest {
+ override val prolog =
+ """xquery version '3.1';
+ import module namespace tcommon="http://jewishliturgy.org/test/tcommon"
+ at "xmldb:exist:/db/apps/opensiddur-server/test/tcommon.xqm";
+
+ import module namespace ridx="http://jewishliturgy.org/modules/refindex"
+ at "xmldb:exist:///db/apps/opensiddur-server/modules/refindex.xqm";
+ import module namespace mirror="http://jewishliturgy.org/modules/mirror"
+ at "xmldb:exist:///db/apps/opensiddur-server/modules/mirror.xqm";
+ import module namespace magic="http://jewishliturgy.org/magic"
+ at "xmldb:exist:///db/apps/opensiddur-server/magic/magic.xqm";
+
+ declare namespace tei="http://www.tei-c.org/ns/1.0";
+ declare namespace j="http://jewishliturgy.org/ns/jlptei/1.0";
+ """
+ override def beforeAll() {
+ super.beforeAll()
+
+ xq(
+ """
+ let $users := tcommon:setup-test-users(1)
+ let $index-collection :=
+ if (xmldb:collection-available($ridx:ridx-path))
+ then ()
+ else system:as-user("admin", $magic:password,
+ let $setup := ridx:setup()
+ let $indicator := xmldb:store($ridx:ridx-path, "created-by-test.xml", )
+ return ()
+ )
+ return ()
+ """)
+ .go
+ }
+
+ override def afterAll() {
+ xq(
+ """
+ let $users := tcommon:teardown-test-users(1)
+ let $index :=
+ if (doc-available($ridx:ridx-path || "/created-by-test.xml"))
+ then system:as-user("admin", $magic:password, xmldb:remove($ridx:ridx-path))
+ else ()
+ return ()
+ """)
+ .go
+
+ super.afterAll()
+ }
+
+}
+
+class TestRefindex extends BaseTestRefindex {
+
+ override def beforeAll() {
+ super.beforeAll()
+
+ setupResource("src/test/resources/modules/refindex/reference-target.xml", "reference-target", "original", 1, Some("en"))
+ setupResource("src/test/resources/modules/refindex/reference-source.xml", "reference-source", "original", 1, Some("en"))
+ }
+
+ override def afterAll() {
+ teardownResource("reference-source", "original", 1)
+ teardownResource("reference-target", "original", 1)
+
+ super.afterAll()
+ }
+
+ describe("ridx:is-enabled") {
+ it("returns false after the index is disabled") {
+ xq(
+ """let $disabled := ridx:disable()
+ return ridx:is-enabled()""")
+ .user("admin")
+ .assertFalse
+ .assertXPath("""doc-available($ridx:ridx-path || "/" || $ridx:disable-flag)""", "disable flag is present")
+ .go
+ }
+
+ it("returns true after the index is enabled") {
+ xq(
+ """let $disabled := ridx:enable()
+ return ridx:is-enabled()""")
+ .user("admin")
+ .assertTrue
+ .assertXPath("""not(doc-available($ridx:ridx-path || "/" || $ridx:disable-flag))""", "disable flag is removed")
+ .go
+ }
+ }
+
+ describe("ridx:reindex") {
+ it("indexes the source document") {
+ xq(
+ """ridx:reindex("/db/data/original/en", "reference-source.xml")"""
+ )
+ .user("xqtest1")
+ .assertXPath("""doc-available("/db/refindex/original/en/reference-source.xml")""", "reference document created")
+ .assertXPath("""count(doc("/db/refindex/original/en/reference-source.xml")//ridx:entry) > 1""", "reference document has some index entries")
+ .assertXPath("""count(doc("/db/refindex/original/en/reference-source.xml")//ridx:broken)=2""", "reference document has 2 broken links")
+ .go
+ }
+
+ it("indexes the target document") {
+ xq("""ridx:reindex("/db/data/original/en", "reference-target.xml")""")
+ .user("xqtest1")
+ .assertXPath("""doc-available("/db/refindex/original/en/reference-target.xml")""", "target document exists in reference index")
+ .assertXPath("""empty(doc("/db/refindex/original/en/reference-target.xml")/*/*)""", "target document in reference index is empty")
+ .go
+ }
+ }
+
+ describe("ridx:query#3($position, $include-ancestors=true())") {
+ it("returns the link when position=1, where the query is in position 1") {
+ xq("""ridx:query(
+ doc("/db/data/original/en/reference-source.xml")//tei:link,
+ doc("/db/data/original/en/reference-source.xml")/id("segA"),
+ 1
+ )""")
+ .assertXPath("""$output/self::tei:link[@type="note"]""", "the link is returned")
+ .go
+ }
+
+ it("returns the link when position=2, where the query is in position 2") {
+ xq("""ridx:query(
+ doc("/db/data/original/en/reference-source.xml")//tei:link,
+ doc("/db/data/original/en/reference-target.xml")/id("note"),
+ 2
+ )""")
+ .assertXPath("""$output/self::tei:link[@type="note"]""", "the link is returned")
+ .go
+ }
+
+ it("returns empty for position=1, where the query is in position 2") {
+ xq("""ridx:query(
+ doc("/db/data/original/en/reference-source.xml")//tei:link,
+ doc("/db/data/original/en/reference-target.xml")/id("note"),
+ 1
+ )""")
+ .assertEmpty
+ .go
+ }
+
+ it("returns empty for position=2, where the query is in position 1") {
+ xq("""ridx:query(
+ doc("/db/data/original/en/reference-source.xml")//tei:link,
+ doc("/db/data/original/en/reference-source.xml")/id("segA"),
+ 2
+ )""")
+ .assertEmpty
+ .go
+ }
+
+ it("returns a result for a query through an ancestor") {
+ xq("""ridx:query(
+ doc("/db/data/original/en/reference-source.xml")//tei:ptr,
+ doc("/db/data/original/en/reference-source.xml")/id("child"),
+ ()
+ )""")
+ .assertXPath("""count($output)=1""", "returns 1 result")
+ .assertXPath("""$output/self::tei:ptr[@xml:id="ptr_to_ancestor"]""", "result is a ptr to the ancestor")
+ .go
+ }
+ }
+
+ describe("ridx:query#4 ($include-ancestors=false())") {
+ it("returns results for a query for all references") {
+ xq("""ridx:query(
+ doc("/db/data/original/en/reference-source.xml")//j:textStream/tei:ptr,
+ doc("/db/data/original/en/reference-source.xml")//j:textStream/tei:seg,
+ (),
+ false()
+ )""")
+ .assertXPath("""count($output)=3""", "there are 3 results")
+ .assertXPath("""count($output/self::tei:ptr)=3""", "all results are tei:ptr")
+ .go
+ }
+
+ it("returns results for a shorthand pointer reference") {
+ xq("""ridx:query(
+ doc("/db/data/original/en/reference-source.xml")//tei:ptr,
+ doc("/db/data/original/en/reference-source.xml")/id("segA"),
+ (), false()
+ )""")
+ .assertXPath("""count($output)=1""", "there is 1 result")
+ .assertXPath("""$output/self::tei:ptr[@xml:id="ptr_to_seg"]""", "one result is a tei:ptr")
+ .go
+ }
+
+ it("returns a result where the query is the beginning of a range") {
+ xq("""ridx:query(
+ doc("/db/data/original/en/reference-source.xml")//tei:ptr,
+ doc("/db/data/original/en/reference-source.xml")/id("segB"),
+ (), false()
+ )""")
+ .assertXPath("""count($output)=1""", "there is 1 result")
+ .assertXPath("""$output/self::tei:ptr[@xml:id="ptr_to_range"]""", "one result is a tei:ptr")
+ .go
+ }
+
+ it("returns a result where the query result is inside a range, any position, no ancestors") {
+ xq("""ridx:query(
+ doc("/db/data/original/en/reference-source.xml")//tei:ptr,
+ doc("/db/data/original/en/reference-source.xml")/id("segBC"),
+ (), false()
+ )""")
+ .assertXPath("""count($output)=1""", "there is 1 result")
+ .assertXPath("""$output/self::tei:ptr[@xml:id="ptr_to_range"]""", "one result is a tei:ptr")
+ .go
+ }
+
+ it("returns a results where the query result in at the end of the range, any position, no ancestors") {
+ xq("""ridx:query(
+ doc("/db/data/original/en/reference-source.xml")//tei:ptr,
+ doc("/db/data/original/en/reference-source.xml")/id("segC"),
+ (), false()
+ )""")
+ .assertXPath("""count($output)=1""", "there is 1 result")
+ .assertXPath("""$output/self::tei:ptr[@xml:id="ptr_to_range"]""", "one result is a tei:ptr")
+ .go
+ }
+
+ it("returns empty when querying for a child where only ancestors are targetted") {
+ xq("""ridx:query(
+ doc("/db/data/original/en/reference-source.xml")//tei:ptr,
+ doc("/db/data/original/en/reference-source.xml")/id("child"),
+ (), false()
+ )""")
+ .assertEmpty
+ .go
+ }
+
+ it("returns results when querying for an external target") {
+ xq("""ridx:query(
+ doc("/db/data/original/en/reference-source.xml")//tei:ptr,
+ doc("/db/data/original/en/reference-target.xml")/id("seg1"),
+ (), false()
+ )""")
+ .assertXPath("""count($output)=1""", "there is 1 result")
+ .assertXPath("""$output/self::tei:ptr[@xml:id="external"]""", "one result is a tei:ptr")
+ .go
+ }
+
+ it("returns results when querying for an external target inside a range") {
+ xq("""ridx:query(
+ doc("/db/data/original/en/reference-source.xml")//tei:ptr,
+ doc("/db/data/original/en/reference-target.xml")/id("seg3"),
+ (), false()
+ )""")
+ .assertXPath("""count($output)=1""", "there is 1 result")
+ .assertXPath("""$output/self::tei:ptr[@xml:id="external_range"]""", "one result is a tei:ptr")
+ .go
+ }
+
+ it("returns results when querying for an external target from a link") {
+ xq("""ridx:query(
+ doc("/db/data/original/en/reference-source.xml")//tei:link,
+ doc("/db/data/original/en/reference-target.xml")/id("note"),
+ (), false()
+ )""")
+ .assertXPath("""count($output)=1""", "there is 1 result")
+ .assertXPath("""$output/self::tei:link[@type="note"]""", "one result is a tei:link")
+ .go
+ }
+
+ it("returns empty when querying for a reference through an ancestor") {
+ xq("""ridx:query(
+ doc("/db/data/original/en/reference-source.xml")//tei:ptr,
+ doc("/db/data/original/en/reference-source.xml")/id("child"),
+ (), false()
+ )""")
+ .assertEmpty
+ .go
+ }
+ }
+
+ describe("ridx:query-all#1 ($include-ancestors=true)") {
+ it("returns results for querying a reference through an ancestor") {
+ xq(
+ """ridx:query-all(
+ doc("/db/data/original/en/reference-source.xml")/id("child")
+ )""")
+ .assertXPath("""count($output)=1""", "returns 1 result")
+ .assertXPath("""$output/self::tei:ptr[@xml:id="ptr_to_ancestor"]""", "result is a ptr to the ancestor")
+ .go
+ }
+ }
+
+ describe("ridx_query-all#2 ($position)") {
+ it("returns results where position=1, where the query is in position 1") {
+ xq("""ridx:query-all(
+ doc("/db/data/original/en/reference-source.xml")/id("segA"),
+ 1
+ )""")
+ .assertXPath("""$output/self::tei:link[@type="note"]""", "the link is returned")
+ .go
+ }
+
+ it("returns results for position=2, where the query is in position 2") {
+ xq("""ridx:query-all(
+ doc("/db/data/original/en/reference-target.xml")/id("note"),
+ 2
+ )""")
+ .assertXPath("""$output/self::tei:link[@type="note"]""", "the link is returned")
+ .go
+ }
+
+ it("returns empty for position=1, where the query is in position 2") {
+ xq("""ridx:query-all(
+ doc("/db/data/original/en/reference-target.xml")/id("note"),
+ 1
+ )""")
+ .assertEmpty
+ .go
+ }
+
+ it("returns empty for position=2, where the query is in position 1") {
+ xq("""ridx:query-all(
+ doc("/db/data/original/en/reference-source.xml")/id("segA"),
+ 2
+ )""")
+ .assertEmpty
+ .go
+ }
+ }
+
+ describe("ridx:query-all#3 ($include-ancestors=false())") {
+ it("returns results for a query for an reference, any position, no ancestors") {
+ xq("""ridx:query-all(
+ doc("/db/data/original/en/reference-source.xml")/id("segA"),
+ (), false()
+ )""")
+ .assertXPath("""count($output)=2""", "there are 2 results")
+ .assertXPath("""$output/self::tei:ptr[@xml:id="ptr_to_seg"]""", "one result is a tei:ptr")
+ .assertXPath("""$output/self::tei:link[@type="note"]""", "one result is is a link")
+ .go
+ }
+
+ it("returns results for a query where the results include the beginning of a range, any position, no ancestors") {
+ xq("""ridx:query-all(
+ doc("/db/data/original/en/reference-source.xml")/id("segB"),
+ (), false()
+ )""")
+ .assertXPath("""count($output)=1""", "there is 1 result")
+ .assertXPath("""$output/self::tei:ptr[@xml:id="ptr_to_range"]""", "one result is a tei:ptr")
+ .go
+ }
+
+ it("returns results for a query where the result is inside a range, any position, no ancestors") {
+ xq("""ridx:query-all(
+ doc("/db/data/original/en/reference-source.xml")/id("segBC"),
+ (), false()
+ )""")
+ .assertXPath("""count($output)=1""", "there is 1 result")
+ .assertXPath("""$output/self::tei:ptr[@xml:id="ptr_to_range"]""", "one result is a tei:ptr")
+ .go
+ }
+
+ it("returns results for a query where the results are at the end of a range, any position, no ancestors") {
+ xq("""ridx:query-all(
+ doc("/db/data/original/en/reference-source.xml")/id("segC"),
+ (), false()
+ )""")
+ .assertXPath("""count($output)=1""", "there is 1 result")
+ .assertXPath("""$output/self::tei:ptr[@xml:id="ptr_to_range"]""", "one result is a tei:ptr")
+ .go
+ }
+
+ it("returns empty for the query of a child where only the ancestors are targetted") {
+ xq("""ridx:query-all(
+ doc("/db/data/original/en/reference-source.xml")/id("child"),
+ (), false()
+ )""")
+ .assertEmpty
+ .go
+ }
+
+ it("returns results for the query of an external target") {
+ xq("""ridx:query-all(
+ doc("/db/data/original/en/reference-target.xml")/id("seg1"),
+ (), false()
+ )""")
+ .assertXPath("""count($output)=1""", "there is 1 result")
+ .assertXPath("""$output/self::tei:ptr[@xml:id="external"]""", "one result is a tei:ptr")
+ .go
+ }
+
+ it("returns results for the query of external target inside a range") {
+ xq("""ridx:query-all(
+ doc("/db/data/original/en/reference-target.xml")/id("seg3"),
+ (), false()
+ )""")
+ .assertXPath("""count($output)=1""", "there is 1 result")
+ .assertXPath("""$output/self::tei:ptr[@xml:id="external_range"]""", "one result is a tei:ptr")
+ .go
+ }
+
+ it("returns results for the query of an external target from a link") {
+ xq("""ridx:query-all(
+ doc("/db/data/original/en/reference-target.xml")/id("note"),
+ (), false()
+ )""")
+ .assertXPath("""count($output)=1""", "there is 1 result")
+ .assertXPath("""$output/self::tei:link[@type="note"]""", "one result is a tei:link")
+ .go
+ }
+ }
+
+ describe("ridx:query-document#1 ($accept-same=false())") {
+ it("returns results for a document with only internal references") {
+ xq("""ridx:query-document(
+ doc("/db/data/original/en/reference-source.xml")
+ )""")
+ .assertXPath("""count($output)=5""", "returns 5 results")
+ .assertXPath("""count($output/self::tei:link)=1""", "one result is a link")
+ .assertXPath("""count($output/self::tei:ptr)=4""", "the rest are ptr")
+ .go
+ }
+
+ it("returns results for a document with external references") {
+ xq("""ridx:query-document(doc("/db/data/original/en/reference-target.xml"))""")
+ .assertXPath("""count($output)=3""", "returns 3 references")
+ .assertXPath("""$output/self::tei:link[@type="note"]""", "1 reference is a link")
+ .assertXPath("""$output/self::tei:ptr[@xml:id="external"]""", "1 reference comes from a #fragment type pointer")
+ .assertXPath("""$output/self::tei:ptr[@xml:id="external_range"]""", "1 reference comes from a range pointer")
+ .go
+ }
+ }
+
+ describe("ridx:query-document#2 ($accept-same=true())") {
+ it("returns results for a document with internal references") {
+ xq("""ridx:query-document(
+ doc("/db/data/original/en/reference-source.xml"),
+ true()
+ )""")
+ .assertXPath("""count($output)=5""", "returns 5 results")
+ .assertXPath("""count($output/self::tei:link)=1""", "one result is a link")
+ .assertXPath("""count($output/self::tei:ptr)=4""", "the rest are ptr")
+ .go
+ }
+
+ it("returns empty for a document with no internal references") {
+ xq("""ridx:query-document(
+ doc("/db/data/original/en/reference-target.xml"),
+ true()
+ )""")
+ .assertEmpty
+ .go
+ }
+ }
+}
+
+class TestRidxReindexCollection extends BaseTestRefindex {
+ override def beforeEach(): Unit = {
+ super.beforeEach()
+
+ setupResource("src/test/resources/modules/refindex/reference-target.xml", "reference-target", "original", 1, Some("en"))
+ setupResource("src/test/resources/modules/refindex/reference-source.xml", "reference-source", "original", 1, Some("en"))
+ setupResource("src/test/resources/modules/refindex/reference-target-too.xml", "reference-target-too", "original", 1, Some("en"))
+ setupResource("src/test/resources/modules/refindex/reference-source-too.xml", "reference-source-too", "original", 1, Some("en"))
+
+ // remove 2 files without removing their index entries
+ xq(
+ """
+ let $r1 := xmldb:remove("/db/data/original/en", "reference-source.xml")
+ let $r2 := xmldb:remove("/db/data/original/en", "reference-target.xml")
+ return ()""")
+ .user("admin")
+ .go
+ }
+
+ override def afterEach(): Unit = {
+ teardownResource("reference-source", "original", 1)
+ teardownResource("reference-target", "original", 1)
+ teardownResource("reference-source-too", "original", 1)
+ teardownResource("reference-target-too", "original", 1)
+
+ super.afterEach()
+ }
+
+ describe("ridx:reindex#2") {
+ // setupResource calls reindex already...
+
+
+ it("removes the index entries for the removed files") {
+ xq("""ridx:reindex("/db/data/original/en", ())""")
+ .user("admin")
+ .assertXPath("""mirror:collection-available($ridx:ridx-path, "/db/data/original/en")""")
+ .assertXPath("""not(mirror:doc-available($ridx:ridx-path, "/db/data/original/en/reference-source.xml"))""")
+ .assertXPath("""not(mirror:doc-available($ridx:ridx-path, "/db/data/original/en/reference-target.xml"))""")
+ .assertXPath("""mirror:doc-available($ridx:ridx-path, "/db/data/original/en/reference-source-too.xml")""")
+ .assertXPath("""mirror:doc-available($ridx:ridx-path, "/db/data/original/en/reference-target-too.xml")""")
+ .go
+ }
+ }
+}
\ No newline at end of file
diff --git a/opensiddur-extensions/src/test/scala/org/opensiddur/modules/TestStatus.scala b/opensiddur-extensions/src/test/scala/org/opensiddur/modules/TestStatus.scala
new file mode 100644
index 00000000..b57699f4
--- /dev/null
+++ b/opensiddur-extensions/src/test/scala/org/opensiddur/modules/TestStatus.scala
@@ -0,0 +1,158 @@
+package org.opensiddur.modules
+
+import org.opensiddur.DbTest
+
+class TestStatus extends DbTest {
+ override val prolog: String =
+ """xquery version '3.1';
+import module namespace status="http://jewishliturgy.org/modules/status"
+ at "xmldb:exist:///db/apps/opensiddur-server/modules/status.xqm";
+
+import module namespace tcommon="http://jewishliturgy.org/test/tcommon"
+ at "xmldb:exist:/db/apps/opensiddur-server/test/tcommon.xqm";
+
+declare namespace tei="http://www.tei-c.org/ns/1.0";
+declare namespace j="http://jewishliturgy.org/ns/jlptei/1.0";
+
+
+declare function local:job-id() {
+ let $resource-id := util:absolute-resource-id(doc("/db/data/original/en/test-status.xml"))
+ let $timestamp := string((current-dateTime() - xs:dateTime("1970-01-01T00:00:00-00:00")) div xs:dayTimeDuration('PT0.001S'))
+ return $resource-id || "-" || $timestamp
+};
+
+declare function local:job-document-name() {
+ let $status-document := local:job-id() || ".status.xml"
+ return $status-document
+};
+
+declare function local:job-document() {
+ doc($status:status-collection || "/" || local:job-document-name())
+};
+
+declare function local:tei-document() {
+ doc("/db/data/original/en/test-status.xml")
+};
+ """
+
+ override def beforeAll: Unit = {
+ super.beforeAll
+ xq("""let $users := tcommon:setup-test-users(1)
+ return ()""")
+ .go
+ setupResource("src/test/resources/modules/test-status.xml", "test-status", "original", 1, Some("en"))
+
+ }
+
+ override def afterAll(): Unit = {
+ teardownResource("test-status", "original", 1)
+ xq("""try {
+ xmldb:remove($status:status-collection, local:job-document-name())
+ }
+ catch * { () }""")
+ .user("xqtest1")
+ .go
+ xq("""
+ let $users := tcommon:teardown-test-users(1)
+ return ()""")
+ .go
+
+ super.afterAll()
+ }
+
+ describe("status:start-job") {
+ it("starts a job") {
+ xq("""let $doc := doc("/db/data/original/en/test-status.xml")
+ let $start := status:start-job($doc)
+ return doc($status:status-collection || "/" || $start || ".status.xml")""")
+ .user("xqtest1")
+ .assertXPath("""exists($output//status:job)""", "a status document has been created")
+ .assertXPath("""$output//status:job/@user = "xqtest1"""", "the document references the user")
+ .assertXPath("""matches($output//status:job/@started, "^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(\.\d{1,3})?(Z|([+\-]\d{2}:\d{2}))$")""",
+ "the document references a start time")
+ .assertXPath("""$output//status:job/@state = "working"""", "the document status is working")
+ .assertXPath("""ends-with($output//status:job/@resource, "/api/data/original/test-status")""", "the document references the API path of the document")
+ .go
+ }
+ }
+
+ describe("status:complete-job") {
+ it("marks a job as complete") {
+ xq(
+ """
+ let $start := status:start-job(local:tei-document())
+ let $complete := status:complete-job(local:job-id(), document-uri(local:tei-document()))
+ return local:job-document()""")
+ .user("xqtest1")
+ .assertXPath("""exists($output//status:job/status:complete)""", "completion element has been added")
+ .assertXPath("""exists($output//status:job/@completed)""", "completion timestamp has been added")
+ .assertXPath("""$output//status:job/@state = "complete"""", "job status has been changed to 'complete'")
+ .go
+ }
+ }
+
+ describe("status:fail-job") {
+ it("marks the job as failed ") {
+ xq(
+ """let $start := status:start-job(local:tei-document())
+ let $fail := status:fail-job(local:job-id(), document-uri(local:tei-document()), "testing", "ERROR")
+ return local:job-document()
+ """)
+ .user("xqtest1")
+ .assertXPath("""exists($output//status:job/status:fail)""", "fail element has been added")
+ .assertXPath("""$output//status:fail/@stage = "testing"""", "fail element records the fail stage")
+ .assertXPath("""$output//status:fail = "ERROR"""", "fail element records the fail error")
+ .assertXPath("""exists($output//status:job/@failed)""", "failed timestamp has been added")
+ .assertXPath("""$output//status:job/@state = "failed"""", "job status has been changed to 'failed'")
+ .go
+ }
+ }
+
+ describe("status:start") {
+ it("starts a stage") {
+ xq(
+ """let $setup := status:start-job(local:tei-document())
+ let $start := status:start(local:job-id(), local:tei-document(), "testing")
+ return local:job-document()
+ """)
+ .user("xqtest1")
+ .assertXPath("""count($output//status:job/status:start)=1""", "start element has been added")
+ .assertXPath("""exists($output//status:job/status:start/@timestamp)""", "start element has a timestamp")
+ .assertXPath("""$output//status:job/status:start/@stage = "testing"""", "start element stage is recorded")
+ .go
+ }
+ }
+
+ describe("status:finish") {
+ it("marks a stage as finished") {
+ xq(
+ """let $setup := status:start-job(local:tei-document())
+ let $start := status:start($setup, local:tei-document(), "testing")
+ let $finish := status:finish(local:job-id(), local:tei-document(), "testing")
+ return local:job-document()
+ """)
+ .user("xqtest1")
+ .assertXPath("""count($output//status:job/status:finish)=1""", "finish element has been added")
+ .assertXPath("""$output//status:job/status:finish >> $output//status:job/status:start""", "finish element is after the start element")
+ .assertXPath("""exists($output//status:job/status:finish/@timestamp)""", "finish element has a timestamp")
+ .assertXPath("""$output//status:job/status:finish/@stage = "testing"""", "finish element stage is recorded")
+ .go
+ }
+ }
+
+ describe("status:log") {
+ it("logs a message") {
+ xq(
+ """let $setup := status:start-job(local:tei-document())
+ let $log := status:log(local:job-id(), local:tei-document(), "testing", "MESSAGE")
+ return local:job-document()
+ """)
+ .user("xqtest1")
+ .assertXPath("""count($output//status:job/status:log)=1""", "log element has been added")
+ .assertXPath("""$output//status:job/status:log = "MESSAGE"""", "log element records the message")
+ .assertXPath("""exists($output//status:job/status:log/@timestamp)""", "log element has a timestamp")
+ .assertXPath("""$output//status:job/status:log/@stage = "testing"""", "log element stage is recorded")
+ .go
+ }
+ }
+}
diff --git a/opensiddur-extensions/src/test/scala/org/opensiddur/modules/TestUpgrade12.scala b/opensiddur-extensions/src/test/scala/org/opensiddur/modules/TestUpgrade12.scala
new file mode 100644
index 00000000..700729fa
--- /dev/null
+++ b/opensiddur-extensions/src/test/scala/org/opensiddur/modules/TestUpgrade12.scala
@@ -0,0 +1,111 @@
+package org.opensiddur.modules
+
+import org.opensiddur.DbTest
+
+class TestUpgrade12 extends DbTest {
+ override val prolog =
+ """xquery version '3.1';
+
+import module namespace tcommon="http://jewishliturgy.org/test/tcommon"
+ at "xmldb:exist:/db/apps/opensiddur-server/test/tcommon.xqm";
+
+import module namespace upg12="http://jewishliturgy.org/modules/upgrade12"
+ at "xmldb:exist:/db/apps/opensiddur-server/modules/upgrade12.xqm";
+
+import module namespace ridx="http://jewishliturgy.org/modules/refindex"
+ at "xmldb:exist:/db/apps/opensiddur-server/modules/refindex.xqm";
+import module namespace didx="http://jewishliturgy.org/modules/docindex"
+ at "xmldb:exist:/db/apps/opensiddur-server/modules/docindex.xqm";
+import module namespace magic="http://jewishliturgy.org/magic"
+ at "xmldb:exist:/db/apps/opensiddur-server/magic/magic.xqm";
+
+declare namespace tei="http://www.tei-c.org/ns/1.0";
+declare namespace j="http://jewishliturgy.org/ns/jlptei/1.0";
+
+ """
+
+ override def beforeAll: Unit = {
+ super.beforeAll
+ setupUsers(1)
+ setupResource("src/test/resources/modules/upgrade12/referenced.xml", "Referenced_File", "original", 1, Some("en"))
+ setupResource("src/test/resources/modules/upgrade12/external-references.xml", "External_References", "original", 1, Some("en"))
+ }
+
+ override def afterAll(): Unit = {
+ teardownResource("Referenced_File", "original", 1)
+ teardownResource("External_References", "original", 1)
+ teardownUsers(1)
+ super.afterAll()
+ }
+
+ describe("upg12:upgrade") {
+ it("changes the reference file") {
+ xq("""upg12:upgrade(doc("/db/data/original/en/Referenced_File.xml"))/*""")
+ .assertXmlEquals("""
+ |
+ |
+ |
+ | Test file
+ |
+ |
+ |
+ |
+ | Biblio
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ | seg 1 middle segment.
+ | segment
+ | with
+ | internal
+ | structure
+ |
+ |
+ |
+ | Referenced by an internal pointer Outside a streamText
+ | Referenced externally without a range Unreferenced. Referenced externally with a range.Multiple rangereferencesin the same ptr
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ | """.stripMargin)
+ .go
+ }
+
+ it("changes the external reference file") {
+ xq("""upg12:upgrade(doc("/db/data/original/en/External_References.xml"))/*""")
+ .assertXmlEquals("""
+ |
+ |
+ |
+ | External reference file
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ | """.stripMargin)
+ .go
+ }
+ }
+}
diff --git a/opensiddur-extensions/src/test/scala/org/opensiddur/modules/TestUpgrade122.scala b/opensiddur-extensions/src/test/scala/org/opensiddur/modules/TestUpgrade122.scala
new file mode 100644
index 00000000..3f5e0aa7
--- /dev/null
+++ b/opensiddur-extensions/src/test/scala/org/opensiddur/modules/TestUpgrade122.scala
@@ -0,0 +1,47 @@
+package org.opensiddur.modules
+
+import org.opensiddur.DbTest
+
+class TestUpgrade122 extends DbTest {
+ override val prolog: String =
+ """xquery version '3.1';
+
+import module namespace tcommon="http://jewishliturgy.org/test/tcommon"
+ at "xmldb:exist:/db/apps/opensiddur-server/test/tcommon.xqm";
+import module namespace deepequality="http://jewishliturgy.org/modules/deepequality"
+ at "xmldb:exist:/db/apps/opensiddur-server/modules/deepequality.xqm";
+
+import module namespace upg122="http://jewishliturgy.org/modules/upgrade122"
+ at "xmldb:exist:/db/apps/opensiddur-server/modules/upgrade122.xqm";
+
+import module namespace ridx="http://jewishliturgy.org/modules/refindex"
+ at "xmldb:exist:/db/apps/opensiddur-server/modules/refindex.xqm";
+import module namespace magic="http://jewishliturgy.org/magic"
+ at "xmldb:exist:/db/apps/opensiddur-server/magic/magic.xqm";
+
+declare namespace tei="http://www.tei-c.org/ns/1.0";
+declare namespace j="http://jewishliturgy.org/ns/jlptei/1.0";
+ """
+
+ override def beforeAll: Unit = {
+ super.beforeAll()
+ setupUsers(1)
+ setupResource("src/test/resources/modules/upgrade122/test_file.xml", "test_file", "original", 1)
+ }
+
+ override def afterAll(): Unit = {
+ teardownResource("test_file", "original", 1)
+ teardownUsers(1)
+ super.afterAll()
+ }
+
+ describe("upg122:upgrade122") {
+ it("transforms a file") {
+ val expected = readXmlFile("src/test/resources/modules/upgrade122/transformed.xml")
+
+ xq("""upg122:upgrade122(doc("/db/data/original/test_file.xml"))/*""")
+ .assertXmlEquals(expected)
+ .go
+ }
+ }
+}
diff --git a/opensiddur-extensions/src/test/scala/org/opensiddur/modules/TestUpgrade140.scala b/opensiddur-extensions/src/test/scala/org/opensiddur/modules/TestUpgrade140.scala
new file mode 100644
index 00000000..bc4783c5
--- /dev/null
+++ b/opensiddur-extensions/src/test/scala/org/opensiddur/modules/TestUpgrade140.scala
@@ -0,0 +1,350 @@
+package org.opensiddur.modules
+
+import org.opensiddur.DbTest
+
+class BaseTestUpgrade140 extends DbTest {
+ /** imports, namespaces and variables */
+ override val prolog: String =
+ """xquery version '3.1';
+
+import module namespace magic="http://jewishliturgy.org/magic"
+ at "xmldb:exist:/db/apps/opensiddur-server/magic/magic.xqm";
+import module namespace tcommon="http://jewishliturgy.org/test/tcommon"
+ at "xmldb:exist:/db/apps/opensiddur-server/test/tcommon.xqm";
+import module namespace upg14 = "http://jewishliturgy.org/modules/upgrade140"
+ at "xmldb:exist:/db/apps/opensiddur-server/modules/upgrade140.xqm";
+
+declare namespace tei="http://www.tei-c.org/ns/1.0";
+declare namespace j="http://jewishliturgy.org/ns/jlptei/1.0";
+ """
+
+ override def beforeAll: Unit = {
+ super.beforeAll()
+ setupUsers(1)
+ }
+
+ override def afterAll(): Unit = {
+ teardownUsers(1)
+ super.afterAll()
+ }
+
+
+}
+
+class TestUpgrade140 extends BaseTestUpgrade140 {
+
+ override def beforeAll: Unit = {
+ super.beforeAll()
+ setupResource("src/test/resources/modules/upgrade122/test_file.xml", "test_file", "original", 1)
+
+ setupCollection("/db/data", "needs_upgrade", Some("xqtest1"), Some("xqtest1"), Some("rwxrwxrwx"))
+ store("src/test/resources/modules/upgrade140/needs_upgrade.xml",
+ "/db/data/needs_upgrade", "needs_upgrade.xml", as="xqtest1")
+ setupCollection("/db/data", "no_needs_upgrade", Some("xqtest1"), Some("xqtest1"), Some("rwxrwxrwx"))
+ store("src/test/resources/modules/upgrade140/no_needs_upgrade.xml",
+ "/db/data/no_needs_upgrade", "no_needs_upgrade.xml", as="xqtest1")
+ }
+
+ override def afterAll(): Unit = {
+ teardownCollection("/db/data/no_needs_upgrade")
+ teardownCollection("/db/data/needs_upgrade")
+
+ teardownResource("test_file", "original", 1)
+ super.afterAll()
+ }
+
+ describe("upg14:is-canonical") {
+ it("says a start of a verse segment is canonical") {
+ xq("""upg14:is-canonical(element tei:anchor { attribute xml:id { "v1_seg1" }})""")
+ .assertTrue
+ .go
+ }
+
+ it("says an end of a verse segment is canonical") {
+ xq("""upg14:is-canonical(element tei:anchor { attribute xml:id { "v19_seg12_end" }})""")
+ .assertTrue
+ .go
+ }
+
+ it("says a non-verse segment is not canonical") {
+ xq("""upg14:is-canonical(element tei:anchor { attribute xml:id { "notcanonical21" }})""")
+ .assertFalse
+ .go
+ }
+ }
+
+ describe("upg14:needs-upgrade") {
+ it("returns true for a collection that has an insufficient number of externals/canonicals") {
+ xq("""upg14:needs-upgrade("/db/data/needs_upgrade")""")
+ .assertTrue
+ .go
+ }
+
+ it("returns false for a collection that has a minimal sufficient number of externals/canonicals") {
+ xq("""upg14:needs-upgrade("/db/data/no_needs_upgrade")""")
+ .assertFalse
+ .go
+ }
+ }
+}
+
+class TestUpgradeChangesMap extends BaseTestUpgrade140 {
+ override def beforeEach(): Unit = {
+ super.beforeEach()
+
+ // set up a test root collection
+ setupCollection("/db/data/original", "test_upgrade_map", Option("xqtest1"), Option("xqtest1"))
+ // set up one file with anchors (internal, external, and canonical)
+ setupResource("src/test/resources/modules/upgrade140/anchors.xml", "anchors", "original", 1,
+ Option("test_upgrade_map"))
+ // set up a file that references the anchors
+ setupResource("src/test/resources/modules/upgrade140/references.xml", "references", "original", 1,
+ Option("test_upgrade_map"))
+ // reindex the reference index
+ }
+
+ override def afterEach(): Unit = {
+ // clear the reference index
+ teardownResource("references", "original", 1)
+ teardownResource("anchors", "original", 1)
+ // remove test root collection
+ teardownCollection("/db/data/original/test_upgrade_map")
+ super.afterEach()
+ }
+
+ describe("upg14:get-upgrade-changes-map") {
+ it("returns a map of anchors that need new types") {
+ xq(
+ """upg14:get-upgrade-changes-map("/db/data/original/test_upgrade_map")""")
+ .user("xqtest1")
+ .assertXPath("""$output("/db/data/original/test_upgrade_map/anchors.xml#with_internal_reference")("type") = "internal" """)
+ .assertXPath("""$output("/db/data/original/test_upgrade_map/anchors.xml#with_internal_reference")("id") = "with_internal_reference" """)
+ .assertXPath("""$output("/db/data/original/test_upgrade_map/anchors.xml#with_internal_reference")("old_id") = "with_internal_reference" """)
+ .assertXPath("""$output("/db/data/original/test_upgrade_map/anchors.xml#with_internal_reference")("reference_doc") = "/db/data/original/test_upgrade_map/anchors.xml" """)
+ .assertXPath(
+ """util:node-by-id(doc("/db/data/original/test_upgrade_map/anchors.xml"),
+ $output("/db/data/original/test_upgrade_map/anchors.xml#with_internal_reference")("reference_id"))/@xml:id = "ptr_to_internal_reference" """)
+
+ .assertXPath("""$output("/db/data/original/test_upgrade_map/anchors.xml#with_internal_start")("type") = "internal" """)
+ .assertXPath("""$output("/db/data/original/test_upgrade_map/anchors.xml#with_internal_start")("id") = "with_internal_start" """)
+ .assertXPath("""$output("/db/data/original/test_upgrade_map/anchors.xml#with_internal_start")("old_id") = "with_internal_start" """)
+ .assertXPath("""$output("/db/data/original/test_upgrade_map/anchors.xml#with_internal_start")("reference_doc") = "/db/data/original/test_upgrade_map/anchors.xml" """)
+ .assertXPath(
+ """util:node-by-id(doc("/db/data/original/test_upgrade_map/anchors.xml"),
+ $output("/db/data/original/test_upgrade_map/anchors.xml#with_internal_start")("reference_id"))/@target = "#range(with_internal_start,with_internal_end)" """)
+
+ .assertXPath("""$output("/db/data/original/test_upgrade_map/anchors.xml#with_internal_end")("type") = "internal" """)
+ .assertXPath("""$output("/db/data/original/test_upgrade_map/anchors.xml#with_internal_end")("id") = "with_internal_end" """)
+ .assertXPath("""$output("/db/data/original/test_upgrade_map/anchors.xml#with_internal_end")("old_id") = "with_internal_end" """)
+ .assertXPath("""$output("/db/data/original/test_upgrade_map/anchors.xml#with_internal_end")("reference_doc") = "/db/data/original/test_upgrade_map/anchors.xml" """)
+ .assertXPath(
+ """util:node-by-id(doc("/db/data/original/test_upgrade_map/anchors.xml"),
+ $output("/db/data/original/test_upgrade_map/anchors.xml#with_internal_end")("reference_id"))/@target = "#range(with_internal_start,with_internal_end)" """)
+
+ .assertXPath("""$output("/db/data/original/test_upgrade_map/anchors.xml#with_external_reference")("type") = "external" """)
+ .assertXPath("""$output("/db/data/original/test_upgrade_map/anchors.xml#with_external_reference")("id") = "with_external_reference" """)
+ .assertXPath("""$output("/db/data/original/test_upgrade_map/anchors.xml#with_external_reference")("old_id") = "with_external_reference" """)
+ .assertXPath("""$output("/db/data/original/test_upgrade_map/anchors.xml#with_external_reference")("reference_doc") = "/db/data/original/test_upgrade_map/references.xml" """)
+ .assertXPath(
+ """util:node-by-id(doc("/db/data/original/test_upgrade_map/references.xml"),
+ $output("/db/data/original/test_upgrade_map/anchors.xml#with_external_reference")("reference_id"))/@target = "/data/original/anchors#with_external_reference" """)
+
+ .assertXPath("""$output("/db/data/original/test_upgrade_map/anchors.xml#with_external_start")("type") = "external" """)
+ .assertXPath("""$output("/db/data/original/test_upgrade_map/anchors.xml#with_external_start")("id") = "with_external_start" """)
+ .assertXPath("""$output("/db/data/original/test_upgrade_map/anchors.xml#with_external_start")("old_id") = "with_external_start" """)
+ .assertXPath("""$output("/db/data/original/test_upgrade_map/anchors.xml#with_external_start")("reference_doc") = "/db/data/original/test_upgrade_map/references.xml" """)
+ .assertXPath(
+ """util:node-by-id(doc("/db/data/original/test_upgrade_map/references.xml"),
+ $output("/db/data/original/test_upgrade_map/anchors.xml#with_external_start")("reference_id"))/@target = "/data/original/anchors#range(with_external_start,with_external_end)" """)
+
+ .assertXPath("""$output("/db/data/original/test_upgrade_map/anchors.xml#with_external_end")("type") = "external" """)
+ .assertXPath("""$output("/db/data/original/test_upgrade_map/anchors.xml#with_external_end")("id") = "with_external_end" """)
+ .assertXPath("""$output("/db/data/original/test_upgrade_map/anchors.xml#with_external_end")("old_id") = "with_external_end" """)
+ .assertXPath("""$output("/db/data/original/test_upgrade_map/anchors.xml#with_external_end")("reference_doc") = "/db/data/original/test_upgrade_map/references.xml" """)
+ .assertXPath(
+ """util:node-by-id(doc("/db/data/original/test_upgrade_map/references.xml"),
+ $output("/db/data/original/test_upgrade_map/anchors.xml#with_external_end")("reference_id"))/@target = "/data/original/anchors#range(with_external_start,with_external_end)" """)
+
+ .assertXPath("""$output("/db/data/original/test_upgrade_map/anchors.xml#v10_seg1")("type") = "canonical" """)
+ .assertXPath("""$output("/db/data/original/test_upgrade_map/anchors.xml#v10_seg1")("id") = "v10_seg1" """)
+ .assertXPath("""$output("/db/data/original/test_upgrade_map/anchors.xml#v10_seg1")("old_id") = "" """)
+ .assertXPath("""empty($output("/db/data/original/test_upgrade_map/anchors.xml#v10_seg1")("reference_doc")) """)
+ .assertXPath(
+ """empty($output("/db/data/original/test_upgrade_map/anchors.xml#v10_seg1")("reference_id")) """)
+
+ .assertXPath("""$output("/db/data/original/test_upgrade_map/anchors.xml#v10_seg1_end")("type") = "canonical" """)
+ .assertXPath("""$output("/db/data/original/test_upgrade_map/anchors.xml#v10_seg1_end")("id") = "v10_seg1_end" """)
+ .assertXPath("""$output("/db/data/original/test_upgrade_map/anchors.xml#v10_seg1_end")("old_id") = "" """)
+ .assertXPath("""empty($output("/db/data/original/test_upgrade_map/anchors.xml#v10_seg1_end")("reference_doc")) """)
+ .assertXPath(
+ """empty($output("/db/data/original/test_upgrade_map/anchors.xml#v10_seg1_end")("reference_id")) """)
+
+ .assertXPath("""$output("/db/data/original/test_upgrade_map/anchors.xml#v10_seg2")("type") = "canonical" """)
+ .assertXPath("""$output("/db/data/original/test_upgrade_map/anchors.xml#v10_seg2")("id") = "v10_seg2" """)
+ .assertXPath("""$output("/db/data/original/test_upgrade_map/anchors.xml#v10_seg2")("old_id") = "" """)
+ .assertXPath("""empty($output("/db/data/original/test_upgrade_map/anchors.xml#v10_seg1_end")("reference_doc")) """)
+ .assertXPath(
+ """empty($output("/db/data/original/test_upgrade_map/anchors.xml#v10_seg1_end")("reference_id"))""")
+
+
+ .assertXPath("""$output("/db/data/original/test_upgrade_map/anchors.xml#v10_seg2_end")("type") = "canonical" """)
+ .assertXPath("""$output("/db/data/original/test_upgrade_map/anchors.xml#v10_seg2_end")("id") = "v10_seg2_end" """)
+ .assertXPath("""$output("/db/data/original/test_upgrade_map/anchors.xml#v10_seg2_end")("old_id") = "" """)
+ .assertXPath("""empty($output("/db/data/original/test_upgrade_map/anchors.xml#v10_seg2_end")("reference_doc")) """)
+ .assertXPath(
+ """empty($output("/db/data/original/test_upgrade_map/anchors.xml#v10_seg2_end")("reference_id"))""")
+
+ .assertXPath("""count($output("/db/data/original/test_upgrade_map/anchors.xml#multiple_reference_start")) = 2 """)
+ .assertXPath("""$output("/db/data/original/test_upgrade_map/anchors.xml#multiple_reference_start")[1]("type") = ("internal", "external") """)
+ .assertXPath("""$output("/db/data/original/test_upgrade_map/anchors.xml#multiple_reference_start")[1]("id") = ("multiple_reference_start_1", "multiple_reference_start_2") """)
+ .assertXPath("""$output("/db/data/original/test_upgrade_map/anchors.xml#multiple_reference_start")[1]("old_id") = "multiple_reference_start" """)
+ .assertXPath(
+ """$output("/db/data/original/test_upgrade_map/anchors.xml#multiple_reference_start")[1]("reference_doc") = (
+ "/db/data/original/test_upgrade_map/anchors.xml",
+ "/db/data/original/test_upgrade_map/references.xml"
+ ) """)
+
+ .assertXPath("""$output("/db/data/original/test_upgrade_map/anchors.xml#multiple_reference_start")[2]("type") = ("internal", "external") """)
+ .assertXPath("""$output("/db/data/original/test_upgrade_map/anchors.xml#multiple_reference_start")[2]("id") = ("multiple_reference_start_1", "multiple_reference_start_2") """)
+ .assertXPath("""$output("/db/data/original/test_upgrade_map/anchors.xml#multiple_reference_start")[2]("old_id") = "multiple_reference_start" """)
+ .assertXPath(
+ """$output("/db/data/original/test_upgrade_map/anchors.xml#multiple_reference_start")[2]("reference_doc") = (
+ "/db/data/original/test_upgrade_map/anchors.xml",
+ "/db/data/original/test_upgrade_map/references.xml"
+ ) """)
+
+ .assertXPath("""count($output("/db/data/original/test_upgrade_map/anchors.xml#multiple_reference_end")) = 2 """)
+ .assertXPath("""$output("/db/data/original/test_upgrade_map/anchors.xml#multiple_reference_end")[1]("type") = ("internal", "external") """)
+ .assertXPath("""$output("/db/data/original/test_upgrade_map/anchors.xml#multiple_reference_end")[1]("id") = ("multiple_reference_end_1", "multiple_reference_end_2") """)
+ .assertXPath("""$output("/db/data/original/test_upgrade_map/anchors.xml#multiple_reference_end")[1]("old_id") = "multiple_reference_end" """)
+
+ .assertXPath("""$output("/db/data/original/test_upgrade_map/anchors.xml#multiple_reference_end")[2]("type") = ("internal", "external") """)
+ .assertXPath("""$output("/db/data/original/test_upgrade_map/anchors.xml#multiple_reference_end")[2]("id") = ("multiple_reference_end_1", "multiple_reference_end_2") """)
+ .assertXPath("""$output("/db/data/original/test_upgrade_map/anchors.xml#multiple_reference_end")[2]("old_id") = "multiple_reference_end" """)
+ .go
+ }
+ }
+
+ describe("upg14:do-upgrade-changes") {
+ it("does nothing when provided with no changes") {
+ xq("""upg14:do-upgrade-changes(map {})""")
+ .user("xqtest1")
+ .assertXPathEquals(""" doc("/db/data/original/test_upgrade_map/anchors.xml")/* """,
+ "anchors file has not changed",
+ readXmlFile("src/test/resources/modules/upgrade140/anchors.xml")
+ )
+ .go
+ }
+
+ it("updates the type of a canonical anchor") {
+ xq(
+ """upg14:do-upgrade-changes(map {
+ "/db/data/original/test_upgrade_map/anchors.xml#v10_seg1" : map {
+ "type": "canonical",
+ "id": "v10_seg1"
+ }
+ })""")
+ .user("xqtest1")
+ .assertXPath("""doc("/db/data/original/test_upgrade_map/anchors.xml")//tei:anchor[@xml:id="v10_seg1"]/@type="canonical" """)
+ .go
+ }
+
+ it("updates the type of an anchor where the new and old id are the same") {
+ xq(
+ """upg14:do-upgrade-changes(map {
+ "/db/data/original/test_upgrade_map/anchors.xml#with_internal_reference" : map {
+ "type": "internal",
+ "id": "with_internal_reference",
+ "old_id" : "with_internal_reference"
+ }
+ })""")
+ .user("xqtest1")
+ .assertXPath("""doc("/db/data/original/test_upgrade_map/anchors.xml")//tei:anchor[@xml:id="with_internal_reference"]/@type="internal" """)
+ .go
+ }
+
+ it("creates a new anchor and updates the references to it if the new and old ids are different") {
+ xq(
+ """
+ let $anchors-file := doc("/db/data/original/test_upgrade_map/anchors.xml")
+ let $reference-file := doc("/db/data/original/test_upgrade_map/references.xml")
+ return upg14:do-upgrade-changes(map {
+ "/db/data/original/test_upgrade_map/anchors.xml#multiple_reference_start" : (
+ map {
+ "type": "internal",
+ "id": "multiple_reference_start_0",
+ "old_id" : "multiple_reference_start",
+ "reference_doc": document-uri($anchors-file),
+ "reference_id": util:node-id($anchors-file//tei:ptr[@xml:id="multi_ref"])
+ } ,
+ map {
+ "type": "external",
+ "id": "multiple_reference_start_1",
+ "old_id" : "multiple_reference_start",
+ "reference_doc": document-uri($reference-file),
+ "reference_id": util:node-id($reference-file//tei:ptr[@xml:id="multi_ref"])
+ }
+ )
+ })""")
+ .user("xqtest1")
+ .assertXPath("""doc("/db/data/original/test_upgrade_map/anchors.xml")//tei:anchor[@xml:id="multiple_reference_start_0"]/@type="internal" """)
+ .assertXPath("""doc("/db/data/original/test_upgrade_map/anchors.xml")//tei:ptr[@xml:id="multi_ref"]/@target="#range(multiple_reference_start_0,multiple_reference_end)" """)
+ .assertXPath("""doc("/db/data/original/test_upgrade_map/anchors.xml")//tei:anchor[@xml:id="multiple_reference_start_1"]/@type="external" """)
+ .assertXPath("""doc("/db/data/original/test_upgrade_map/references.xml")//tei:ptr[@xml:id="multi_ref"]/@target="/data/original/anchors#range(multiple_reference_start_1,multiple_reference_end)" """)
+ .assertXPath("""empty(doc("/db/data/original/test_upgrade_map/anchors.xml")//tei:anchor[@xml:id="multiple_reference_start"])""")
+ .go
+ }
+
+ it("can make changes to the beginnings and ends of the same range reference") {
+ xq(
+ """
+ let $anchors-file := doc("/db/data/original/test_upgrade_map/anchors.xml")
+ let $reference-file := doc("/db/data/original/test_upgrade_map/references.xml")
+ return upg14:do-upgrade-changes(map {
+ "/db/data/original/test_upgrade_map/anchors.xml#multiple_reference_start" : (
+ map {
+ "type": "internal",
+ "id": "multiple_reference_start_0",
+ "old_id" : "multiple_reference_start",
+ "reference_doc": document-uri($anchors-file),
+ "reference_id": util:node-id($anchors-file//tei:ptr[@xml:id="multi_ref"])
+ },
+ map {
+ "type": "external",
+ "id": "multiple_reference_start_1",
+ "old_id" : "multiple_reference_start",
+ "reference_doc": document-uri($reference-file),
+ "reference_id": util:node-id($reference-file//tei:ptr[@xml:id="multi_ref"])
+ }
+ ),
+ "/db/data/original/test_upgrade_map/anchors.xml#multiple_reference_end" : (
+ map {
+ "type": "internal",
+ "id": "multiple_reference_end_0",
+ "old_id" : "multiple_reference_end",
+ "reference_doc": document-uri($anchors-file),
+ "reference_id": util:node-id($anchors-file//tei:ptr[@xml:id="multi_ref"])
+ },
+ map {
+ "type": "external",
+ "id": "multiple_reference_end_1",
+ "old_id" : "multiple_reference_end",
+ "reference_doc": document-uri($reference-file),
+ "reference_id": util:node-id($reference-file//tei:ptr[@xml:id="multi_ref"])
+ }
+ )
+ })""")
+ .user("xqtest1")
+ .assertXPath("""doc("/db/data/original/test_upgrade_map/anchors.xml")//tei:anchor[@xml:id="multiple_reference_start_0"]/@type="internal" """)
+ .assertXPath("""doc("/db/data/original/test_upgrade_map/anchors.xml")//tei:anchor[@xml:id="multiple_reference_start_1"]/@type="external" """)
+ .assertXPath("""doc("/db/data/original/test_upgrade_map/anchors.xml")//tei:ptr[@xml:id="multi_ref"]/@target="#range(multiple_reference_start_0,multiple_reference_end_0)" """)
+ .assertXPath("""doc("/db/data/original/test_upgrade_map/anchors.xml")//tei:anchor[@xml:id="multiple_reference_end_0"]/@type="internal" """)
+ .assertXPath("""doc("/db/data/original/test_upgrade_map/anchors.xml")//tei:anchor[@xml:id="multiple_reference_end_1"]/@type="external" """)
+ .assertXPath("""doc("/db/data/original/test_upgrade_map/references.xml")//tei:ptr[@xml:id="multi_ref"]/@target="/data/original/anchors#range(multiple_reference_start_1,multiple_reference_end_1)" """)
+ .assertXPath("""empty(doc("/db/data/original/test_upgrade_map/anchors.xml")//tei:anchor[@xml:id="multiple_reference_start"])""")
+ .assertXPath("""empty(doc("/db/data/original/test_upgrade_map/anchors.xml")//tei:anchor[@xml:id="multiple_reference_end"])""")
+ .go
+ }
+ }
+}
+
diff --git a/opensiddur-extensions/src/test/scala/org/opensiddur/modules/TestValidation.scala b/opensiddur-extensions/src/test/scala/org/opensiddur/modules/TestValidation.scala
new file mode 100644
index 00000000..5a0cf43a
--- /dev/null
+++ b/opensiddur-extensions/src/test/scala/org/opensiddur/modules/TestValidation.scala
@@ -0,0 +1,40 @@
+package org.opensiddur.modules
+
+import org.opensiddur.DbTest
+
+class TestValidation extends DbTest {
+ /** imports, namespaces and variables */
+ override val prolog: String =
+ """xquery version '3.1';
+
+import module namespace crest="http://jewishliturgy.org/modules/common-rest"
+ at "xmldb:exist:///db/apps/opensiddur-server/modules/common-rest.xqm";
+import module namespace orig="http://jewishliturgy.org/api/data/original"
+ at "xmldb:exist:///db/apps/opensiddur-server/api/data/original.xqm";
+import module namespace tcommon="http://jewishliturgy.org/test/tcommon"
+ at "xmldb:exist:///db/apps/opensiddur-server/test/tcommon.xqm";
+
+declare namespace tei="http://www.tei-c.org/ns/1.0";
+declare namespace j="http://jewishliturgy.org/ns/jlptei/1.0";
+declare namespace jf="http://jewishliturgy.org/ns/jlptei/flat/1.0";
+"""
+
+ describe("orig:validate-report") {
+ it("fails validation with an invalid license") {
+ val bad = readXmlFile("src/test/resources/modules/validation/bad_license.xml")
+
+ xq(s"""orig:validate-report(document { $bad }, ())""")
+ .assertXPath("""$output/status="invalid" """)
+ .go
+ }
+
+ it("succeeds validation with a valid license") {
+ val good = readXmlFile("src/test/resources/modules/validation/good_license.xml")
+
+ xq(s"""orig:validate-report(document { $good }, ())""")
+ .assertXPath("""$output/status="valid" """)
+ .go
+ }
+ }
+
+}
diff --git a/opensiddur-extensions/src/test/scala/org/opensiddur/transforms/TestCombine.scala b/opensiddur-extensions/src/test/scala/org/opensiddur/transforms/TestCombine.scala
new file mode 100644
index 00000000..6b38a3f0
--- /dev/null
+++ b/opensiddur-extensions/src/test/scala/org/opensiddur/transforms/TestCombine.scala
@@ -0,0 +1,508 @@
+package org.opensiddur.transforms
+
+import org.opensiddur.DbTest
+
+class TestCombine extends DbTest {
+ override val prolog =
+ """xquery version '3.1';
+
+declare namespace tei="http://www.tei-c.org/ns/1.0";
+declare namespace j="http://jewishliturgy.org/ns/jlptei/1.0";
+declare namespace jf="http://jewishliturgy.org/ns/jlptei/flat/1.0";
+
+import module namespace tcommon="http://jewishliturgy.org/test/tcommon"
+ at "xmldb:exist:/db/apps/opensiddur-server/test/tcommon.xqm";
+
+import module namespace format="http://jewishliturgy.org/modules/format"
+ at "xmldb:exist:///db/apps/opensiddur-server/modules/format.xqm";
+import module namespace mirror="http://jewishliturgy.org/modules/mirror"
+ at "xmldb:exist:///db/apps/opensiddur-server/modules/mirror.xqm";
+import module namespace combine="http://jewishliturgy.org/transform/combine"
+ at "xmldb:exist:///db/apps/opensiddur-server/transforms/combine.xqm";
+import module namespace ridx="http://jewishliturgy.org/modules/refindex"
+ at "xmldb:exist:///db/apps/opensiddur-server/modules/refindex.xqm";
+"""
+
+ def setupResourceForTest(resourceName: String, dataType: String = "original") = {
+ setupResource("src/test/resources/transforms/" + resourceName + ".xml",
+ resourceName, dataType, 1, if (dataType == "original") Some("en") else None,
+ Some("everyone"), Some("rw-rw-r--"))
+ xq(
+ s"""
+ let $$name := '/db/data/$dataType/${if (dataType == "original") "en/" else ""}$resourceName.xml'
+ let $$segmented := format:unflatten-dependencies(doc($$name), map {})
+ return ()""").go
+ }
+
+ override def beforeAll: Unit = {
+ super.beforeAll
+ setupUsers(1)
+ setupResourceForTest("combine1")
+ setupResourceForTest("combine2")
+ setupResourceForTest("combine3")
+ setupResourceForTest("combine-repeat")
+ setupResourceForTest("combine-cond1")
+ setupResourceForTest("combine-cond2")
+ setupResourceForTest("combine-cond3")
+ setupResourceForTest("combine-inline-dest")
+ setupResourceForTest("combine-inline-source")
+ setupResourceForTest("combine-settings")
+ setupResourceForTest("parallel-simple-A")
+ setupResourceForTest("parallel-same-A")
+ setupResourceForTest("parallel-simple-B")
+ setupResourceForTest("parallel-part-A")
+ setupResourceForTest("parallel-part-B")
+ setupResourceForTest("include-simple-1")
+ setupResourceForTest("include-part-1")
+ setupResourceForTest("include-part-2")
+ setupResourceForTest("linkage-simple", "linkage")
+ setupResourceForTest("linkage-same", "linkage")
+ setupResourceForTest("linkage-part", "linkage")
+ setupResourceForTest("combine-cond-parA")
+ setupResourceForTest("combine-cond-parB")
+ setupResourceForTest("combine-cond-incl")
+ setupResourceForTest("combine-cond-par", "linkage")
+ setupResourceForTest("combine-ann-notes", "notes")
+ setupResourceForTest("combine-ann1")
+ setupResourceForTest("combine-ann2")
+ setupResourceForTest("combine-ann-parA")
+ setupResourceForTest("combine-ann-parB")
+ setupResourceForTest("combine-ann-par", "linkage")
+ setupResourceForTest("combine-ann-incl")
+ setupResourceForTest("combine-style-2")
+ setupResourceForTest("combine-style-1")
+ setupResourceForTest("combine-segGen-1")
+ setupResourceForTest("combine-translit-note-1", "notes")
+ setupResourceForTest("combine-translit-1")
+ setupResource("src/test/resources/transforms/testtable.xml", "testtable", "transliteration", 1)
+ }
+
+ override def afterAll(): Unit = {
+ teardownResource("testtable", "transliteration", 1)
+ teardownResource("combine-translit-note-1", "notes", 1)
+ teardownResource("combine-translit-1", "original", 1)
+ teardownResource("combine-segGen-1", "original", 1)
+ teardownResource("combine-style-1", "original", 1)
+ teardownResource("combine-style-2", "original", 1)
+ teardownResource("combine-ann-incl", "original", 1)
+ teardownResource("combine-ann-par", "linkage", 1)
+ teardownResource("combine-ann-parB", "original", 1)
+ teardownResource("combine-ann-parA", "original", 1)
+ teardownResource("combine-ann2", "original", 1)
+ teardownResource("combine-ann1", "original", 1)
+ teardownResource("combine-ann-notes", "notes", 1)
+ teardownResource("combine-cond-par", "linkage", 1)
+ teardownResource("combine-cond-incl", "original", 1)
+ teardownResource("combine-cond-parB", "original", 1)
+ teardownResource("combine-cond-parA", "original", 1)
+ teardownResource("linkage-part", "linkage", 1)
+ teardownResource("linkage-same", "linkage", 1)
+ teardownResource("linkage-simple", "linkage", 1)
+ teardownResource("include-part-2", "original", 1)
+ teardownResource("include-part-1", "original", 1)
+ teardownResource("include-simple-1", "original", 1)
+ teardownResource("parallel-part-B", "original", 1)
+ teardownResource("parallel-part-A", "original", 1)
+ teardownResource("parallel-simple-B", "original", 1)
+ teardownResource("parallel-same-A", "original", 1)
+ teardownResource("parallel-simple-A", "original", 1)
+ teardownResource("combine-settings", "original", 1)
+ teardownResource("combine-inline-source", "original", 1)
+ teardownResource("combine-inline-dest", "original", 1)
+ teardownResource("combine-cond3", "original", 1)
+ teardownResource("combine-cond2", "original", 1)
+ teardownResource("combine-cond1", "original", 1)
+ teardownResource("combine-repeat", "original", 1)
+ teardownResource("combine3", "original", 1)
+ teardownResource("combine2", "original", 1)
+ teardownResource("combine1", "original", 1)
+ teardownUsers(1)
+ super.afterAll()
+ }
+
+ describe("combine:combine-document") {
+ it("acts as an identity transform") {
+ xq("""combine:combine-document(
+ mirror:doc($format:unflatten-cache, "/db/data/original/en/combine1.xml"),
+ map {})""")
+ .assertXPath("""matches($output/tei:TEI/@jf:document,"^((/exist/restxq)?/api)?/data/original/combine1$")""", "has @jf:document on root element")
+ .assertXPath("""exists($output/tei:TEI/tei:text/jf:combined[@jf:id="stream"]/tei:seg[@jf:id="seg1"][ends-with(@jf:stream,"#stream")])""", "acts as an identity transform for unflattened text")
+ .go
+ }
+
+ it("incorporates a local pointer with one segment in place") {
+ xq("""combine:combine-document(
+ mirror:doc($format:unflatten-cache, "/db/data/original/en/combine2.xml"),
+ map {})""")
+ .assertXPath("""matches($output/tei:TEI/@jf:document,"^((/exist/restxq)?/api)?/data/original/combine2$")""", "has @jf:document on root element")
+ .assertXPath("""exists($output/tei:TEI/tei:text/jf:combined[@jf:id="stream"]/jf:ptr[@jf:id="ptr1"][ends-with(@jf:stream,"#stream")]/tei:seg[@jf:id="seg1"])""", "incorporate destination in-place")
+ .assertXPath("""empty($output/tei:TEI/tei:text/jf:combined[@jf:id="stream"]/jf:ptr[@jf:id="ptr1"][ends-with(@jf:stream,"#stream")]/@jf:document)""",
+ "no @jf:document attribute on jf:ptr")
+ .go
+ }
+
+ it("incorporates a local pointer with multiple repeats") {
+ xq("""combine:combine-document(
+ mirror:doc($format:unflatten-cache, "/db/data/original/en/combine-repeat.xml"),
+ map {}
+ )""")
+ .assertXPath("""count($output/tei:TEI/tei:text/jf:combined[@jf:id="stream"]/jf:ptr[ends-with(@jf:stream,"#stream")]/tei:seg[@jf:id="repeated"])=3""",
+ "incorporate destination in-place once each time it is referenced")
+ .assertXPath("""every $repeat in $output/tei:TEI/tei:text/jf:combined[@jf:id="stream"]/jf:ptr[ends-with(@jf:stream,"#stream")] satisfies count($repeat/tei:seg[@jf:id="repeated"])=1
+ """, "incorporate destination in-place once each time it is referenced")
+ .assertXPath("""
+ empty($output/tei:TEI/tei:text/jf:combined[@jf:id="stream"]/jf:ptr/@jf:document)
+ """, "no @jf:document attribute on any jf:ptr")
+ .go
+ }
+
+ it("combines data with inclusion for an external pointer") {
+ xq("""combine:combine-document(
+ mirror:doc($format:unflatten-cache, "/db/data/original/en/combine3.xml"),
+ map {}
+ )""")
+ .assertXPath("""matches($output/tei:TEI/@jf:document,"^((/exist/restxq)?/api)?/data/original/combine3$")""", "has @jf:document on root element")
+ .assertXPath("""matches($output/tei:TEI//jf:ptr[@jf:id="ptr1"]/@jf:document,"^((/exist/restxq)?/api)?/data/original/combine1$")""", "has @jf:document on the included element")
+ .assertXPath("""exists($output/tei:TEI/tei:text/jf:combined[@jf:id="stream"]/jf:ptr[@jf:id="ptr1"][ends-with(@jf:stream,"#stream")]/tei:seg[@jf:id="seg1"])
+ """, "incorporate destination in-place")
+ .go
+ }
+
+ it("combines an inline range pointer") {
+ xq("""combine:combine-document(
+ mirror:doc($format:unflatten-cache, "/db/data/original/en/combine-inline-source.xml"),
+ map {}
+ )""")
+ .assertXPath("""count($output/tei:TEI/tei:text/jf:combined[@jf:id="stream"]/tei:p[@jf:layer-id]/jf:ptr[@type="inline"][@jf:id="ptr2"][ends-with(@jf:stream, "#stream")]/tei:seg)=3""",
+ "inline pointer included in place")
+ .go
+ }
+
+ }
+
+ describe("combine:tei-fs-to-map") {
+ it("handles fs/f/symbol") {
+ xq(
+ """let $m := combine:tei-fs-to-map(
+
+
+
+
+ ,
+ map {}
+ )
+ return $m("FS->FSYMBOL")
+ """)
+ .assertXmlEquals("""SYMBOL""")
+ .go
+ }
+
+ it("handles fs/f/binary") {
+ xq(
+ """let $m := combine:tei-fs-to-map(
+
+
+
+
+ ,
+ map {}
+ )
+ return $m("FS->FBINARY")
+ """)
+ .assertXmlEquals("""true""")
+ .go
+ }
+
+ it("handles fs/f/yes") {
+ xq(
+ """let $m := combine:tei-fs-to-map(
+
+
+
+
+ ,
+ map {}
+ )
+ return $m("FS->FYES")
+ """)
+ .assertXmlEquals("""YES""")
+ .go
+ }
+
+ it("handles fs/f/string") {
+ xq(
+ """let $m := combine:tei-fs-to-map(
+
+ string
+ ,
+ map {}
+ )
+ return $m("FS->FSTRING")
+ """)
+ .assertXmlEquals("""string""")
+ .go
+ }
+
+ it("handles fs/f/text()") {
+ xq(
+ """let $m := combine:tei-fs-to-map(
+
+ text
+ ,
+ map {}
+ )
+ return $m("FS->FTEXT")
+ """)
+ .assertXmlEquals("""text""")
+ .go
+ }
+
+ it("handles fs/f/vColl") {
+ xq(
+ """let $m := combine:tei-fs-to-map(
+
+
+
+
+
+
+
+
+ ,
+ map {}
+ )
+ return $m("FS->FVCOLL")
+ """)
+ .assertXmlEquals("""S1""",
+ """S2""",
+ """S3""")
+ .go
+ }
+ }
+
+ describe("combine:update-settings-from-standoff-markup") {
+ it("updates settings for a segment with inbound links") {
+ xq(
+ """
+ let $m :=
+ combine:update-settings-from-standoff-markup(
+ mirror:doc($format:unflatten-cache, "/db/data/original/en/combine-settings.xml")//tei:seg[@jf:id="seg1"]/parent::jf:set,
+ map { "combine:settings" : map {} },
+ false()
+ )
+ return $m("combine:settings")("FS1->F1")
+ """)
+ .assertEquals("ONE")
+ .go
+ }
+
+ it("updates settings for a segment with no inbound links") {
+ xq("""let $m :=
+ combine:update-settings-from-standoff-markup(
+ mirror:doc($format:unflatten-cache, "/db/data/original/en/combine-settings.xml")//tei:seg[@jf:id="seg2"],
+ map { "combine:settings" : map {} },
+ false()
+ )
+ return count(map:keys($m("combine:settings")))""")
+ .assertEquals(0)
+ .go
+ }
+
+ it("updates settings with ancestors for segment with inbound link") {
+ xq("""
+ combine:update-settings-from-standoff-markup(
+ mirror:doc($format:unflatten-cache, "/db/data/original/en/combine-settings.xml")//tei:seg[@jf:id="seg1"]/parent::jf:set,
+ map { "combine:settings" : map {} },
+ true()
+ )""")
+ .assertXPath("""$output("combine:settings")("FS1->F2")="THREE"""",
+ "non-overridden setting from ancestor is retained")
+ .assertXPath("""$output("combine:settings")("FS1->F1")="ONE"""", "overridden setting from ancestor is overridden")
+ .assertXPath("""$output("combine:settings")("FS1->F3")="FOUR"""", "non-overridden setting from this is retained")
+ .go
+ }
+ }
+
+ describe("combine:combine-document") {
+ it("handles parallel texts with simple inclusion set inside the stream") {
+ xq(
+ """combine:combine-document(
+ mirror:doc($format:unflatten-cache, "/db/data/original/en/include-simple-1.xml"),
+ map {})""")
+ .assertXPath("""$output//jf:ptr[@jf:id="inc3"]/jf:combined[jf:parallelGrp]""", "the inclusion pointer is followed through a redirect")
+ .assertXPath("""$output//jf:ptr[@jf:id="inc3"]/jf:combined/jf:parallelGrp/jf:parallel/@domain="/data/original/parallel-simple-A#stream"""", "the correct domain is chosen")
+ .assertXPath("""$output//jf:ptr[@jf:id="inc3"]/jf:combined/jf:parallelGrp/jf:parallel[@domain="/data/original/parallel-simple-A#stream"]/tei:seg[.="A-1"]""", "the redirect includes the original text")
+ .assertXPath("""$output//jf:ptr[@jf:id="inc3"]/jf:combined/jf:parallelGrp/jf:parallel[@domain="/data/original/parallel-simple-B#stream"]/tei:seg[.="B-1"]""", "the redirect includes the parallel text")
+ .go
+ }
+
+ it("handles simple parallelism when the parallism is set in the same document as it is used") {
+ xq(
+ """combine:combine-document(
+ mirror:doc($format:unflatten-cache, "/db/data/original/en/parallel-same-A.xml"),
+ map {})""")
+ .assertXPath("""exists($output//tei:text/jf:combined[@jf:id="stream"]/jf:combined[jf:parallelGrp])""", "the stream is redirected")
+ .assertXPath("""$output//jf:combined/jf:parallelGrp[starts-with(@jf:layer-id, "/data/original/parallel-same-A")]""", "the correct domain is chosen")
+ .assertXPath("""$output//jf:combined/jf:parallelGrp/jf:parallel[@domain="/data/original/parallel-same-A#stream"]/tei:seg[.="A-1"]""", "the redirect includes the original text")
+ .assertXPath("""$output//jf:combined/jf:parallelGrp/jf:parallel[@domain="/data/original/parallel-simple-B#stream"]/tei:seg[.="B-1"]""", "the redirect includes the parallel text")
+ .go
+ }
+
+ it("handles a request for a part of a parallel document: include where the boundaries are the same as the " +
+ "boundaries of the parallelism") {
+ xq(
+ """combine:combine-document(
+ mirror:doc($format:unflatten-cache, "/db/data/original/en/include-part-1.xml"),
+ map {})""")
+ .assertXPath("""exists($output//tei:text/jf:combined[@jf:id="stream"]/descendant::jf:ptr[@jf:id="inc1"]/jf:parallelGrp)""", "the stream is redirected")
+ .assertXPath("""exists($output//jf:parallelGrp[starts-with(@jf:layer-id,"/data/original/parallel-part-A")])""", "the correct domain is chosen")
+ .assertXPath("""$output//jf:ptr[@jf:id="inc1"]/jf:parallelGrp[1]/jf:parallel[@domain="/data/original/parallel-part-A#stream"]/tei:seg[1]/@jf:id="A2"""", "the redirect begins at the first requested part")
+ .assertXPath("""$output//jf:ptr[@jf:id="inc1"]/jf:parallelGrp[last()]/jf:parallel[@domain="/data/original/parallel-part-A#stream"]/tei:seg[last()]/@jf:id="A7"""", "the redirect ends at the last requested part")
+ .go
+ }
+
+ it("handles a request for a part of a parallel document: include where the boundaries are different from the " +
+ "boundaries of the parallelism") {
+ xq(
+ """combine:combine-document(
+ mirror:doc($format:unflatten-cache, "/db/data/original/en/include-part-2.xml"),
+ map {})""")
+ .assertXPath("""exists($output//tei:text/jf:combined[@jf:id="stream"]/descendant::jf:ptr[@jf:id="inc2"]/jf:parallelGrp)""", "the stream is redirected")
+ .assertXPath("""exists($output//jf:parallelGrp[starts-with(@jf:layer-id,"/data/original/parallel-part-A")])""", "the correct domain is chosen")
+ .assertXPath("""$output//jf:ptr[@jf:id="inc2"]/jf:parallelGrp[1]/jf:parallel[@domain="/data/original/parallel-part-A#stream"]/tei:seg[1]/@jf:id="A2"""", "the redirect begins at the first parallelGrp that includes the beginning of the first requested part")
+ .assertXPath("""$output//jf:ptr[@jf:id="inc2"]/jf:parallelGrp[last()]/jf:parallel[@domain="/data/original/parallel-part-A#stream"]/tei:seg[last()]/@jf:id="A7"""", "the redirect ends at the last parallelGrp that includes the end of the last requested part")
+ .go
+ }
+
+ it("handles conditionals during combine that affect the streamText: inside a streamText") {
+ xq(
+ """combine:combine-document(
+ mirror:doc($format:unflatten-cache, "/db/data/original/en/combine-cond1.xml"),
+ map {})""")
+ .assertXPath("""exists($output//*[@jf:id="seg1"]/parent::jf:conditional)""", "seg1 exists and is directly enclosed in a jf:conditional")
+ .assertXPath("""empty($output//*[@jf:id="seg2"])""", "seg2 does not exist at all")
+ .assertXPath("""exists($output//*[@jf:id="seg3"]/parent::jf:conditional[jf:annotated])""", "seg3 has an instruction added")
+ .go
+ }
+
+ it("handles conditionals during combine that affect layers") {
+ xq(
+ """combine:combine-document(
+ mirror:doc($format:unflatten-cache, "/db/data/original/en/combine-cond2.xml"),
+ map {})""")
+ .assertXPath("""exists($output//*[@jf:id="div1"][@jf:conditional])""", "on condition has a @jf:conditional and exists")
+ .assertXPath("""empty($output//*[@jf:id="div2"])""", "off condition: layer element that is off is not present ")
+ .assertXPath("""empty($output//*[@jf:id="ab2"])""", "off condition: layer-based child of element that is off is not present")
+ .assertXPath("""empty($output//tei:head[.="Heading2"])""", "off condition: layer element without xml:id is not present")
+ .assertXPath("""exists($output//*[@jf:id="ab_wrapper"])""", "off condition: other layers are unaffected")
+ .assertXPath("""exists($output//*[@jf:id="seg3"]) and exists($output//*[@jf:id="seg4"])""", "off condition: segments are present")
+ .go
+ }
+
+ it("handles conditionals with j:option") {
+ xq(
+ """combine:combine-document(
+ mirror:doc($format:unflatten-cache, "/db/data/original/en/combine-cond3.xml"),
+ map {})""")
+ .assertXPath("""empty($output//jf:conditional)""", "no jf:conditional elements have been added")
+ .assertXPath("""exists($output//j:option[@jf:id="opt1"][@jf:conditional]) and exists($output//tei:seg[@jf:id="seg1"])""", "opt1 and seg1 exist")
+ .assertXPath("""empty($output//j:option[@jf:id="opt2"]) and empty($output//tei:seg[@jf:id="seg2"])""", "opt2 and seg2 removed")
+ .assertXPath(
+ """exists($output//j:option[@jf:id="opt3"][@jf:conditional][@jf:conditional-instruction][descendant::jf:annotated])
+ and exists($output//tei:seg[@jf:id="seg3"])""", "opt3 and seg3 exist, an instruction has been added")
+ .assertXPath("""exists($output//j:option[@jf:id="opt4"][@jf:conditional][tei:w])""", "opt4 exists")
+ .assertXPath("""empty($output//j:option[@jf:id="opt5"]) and empty($output//tei:w[.="E"])""", "opt5 removed")
+ .assertXPath("""exists($output//j:option[@jf:id="opt6"][@jf:conditional][@jf:conditional-instruction][jf:annotated][tei:w])""", "opt6 exists, an instruction has been added")
+ .go
+ }
+
+ it("handles conditionals and parallel texts together") {
+ xq(
+ """combine:combine-document(
+ mirror:doc($format:unflatten-cache, "/db/data/original/en/combine-cond-incl.xml"),
+ map {})""")
+ .assertXPath("""exists($output//jf:parallel[starts-with(@jf:layer-id, "/data/original/combine-cond-parA")]/tei:seg[@jf:id="present"])""", "in parA, present is present")
+ .assertXPath("""empty($output//jf:parallel[starts-with(@jf:layer-id, "/data/original/combine-cond-parA")]/descendant::tei:seg[@jf:id="offAext"])""", "in parA, segment turned off externally is not present")
+ .assertXPath("""empty($output//jf:parallel[starts-with(@jf:layer-id, "/data/original/combine-cond-parA")]/descendant::tei:seg[@jf:id="offAint"])""", "in parA, segment turned off internally at streamText is not present")
+ .assertXPath("""empty($output//jf:parallel[starts-with(@jf:layer-id, "/data/original/combine-cond-parA")]/descendant::tei:seg[@jf:id="offAintSetInt"])""", "in parA, segment turned off internally within stream is not present")
+ .assertXPath("""exists($output//jf:parallel[starts-with(@jf:layer-id, "/data/original/combine-cond-parA")]/descendant::tei:seg[@jf:id="offBext"])""", "in parA, segment turned off externally in parB with the same id is present")
+ .assertXPath("""exists($output//jf:parallel[starts-with(@jf:layer-id, "/data/original/combine-cond-parA")]/descendant::tei:seg[@jf:id="offBint"])""", "in parA, segment turned off internally in parB with the same id is present")
+ .assertXPath("""exists($output//jf:parallel[starts-with(@jf:layer-id, "/data/original/combine-cond-parA")]/descendant::tei:seg[@jf:id="offBintSetInt"])""", "in parA, segment turned off internally within stream in parB is present")
+ .assertXPath("""exists($output//jf:parallel[starts-with(@jf:layer-id, "/data/original/combine-cond-parB")]/tei:seg[@jf:id="present"])""", "in parB, present is present")
+ .assertXPath("""empty($output//jf:parallel[starts-with(@jf:layer-id, "/data/original/combine-cond-parB")]/descendant::tei:seg[@jf:id="offBext"])""", "in parB, segment turned off externally is not present")
+ .assertXPath("""empty($output//jf:parallel[starts-with(@jf:layer-id, "/data/original/combine-cond-parB")]/descendant::tei:seg[@jf:id="offBint"])""", "in parB, segment turned off internally at streamText is not present")
+ .assertXPath("""empty($output//jf:parallel[starts-with(@jf:layer-id, "/data/original/combine-cond-parB")]/descendant::tei:seg[@jf:id="offBintSetInt"])""", "in parB, segment turned off internally within stream is not present")
+ .go
+ }
+ }
+
+ describe("format:combine") {
+ it("handles annotations in a single text, notes of all types") {
+ xq("""let $d := doc("/db/data/original/en/combine-ann1.xml")
+ return
+ format:combine($d, map {}, $d)""")
+ .assertXPath("""exists($output//jf:combined[@jf:id="stream"][@jf:annotation]/jf:annotated/tei:note[@jf:id="stream_note"])""", "stream note is present")
+ .assertXPath("""exists($output//jf:annotation[tei:seg[@jf:id="single"]]/jf:annotated/tei:note[@jf:id="single_note"])""", "single note is present")
+ .assertXPath("""exists($output//jf:annotation[tei:seg[@jf:id="range1"] and tei:seg[@jf:id="range2"]]/jf:annotated/tei:note[@jf:id="range_note"])""", "range note is present")
+ .assertXPath("""empty($output//tei:note[@jf:id="off_note"])""", "off note is not present")
+ .assertXPath("""exists($output//tei:ab[@jf:id="ab1"][@jf:annotation]/jf:annotated/tei:note[@jf:id="layer_note"])""", "layer note is not present")
+ .assertXPath("""exists($output//tei:w[@jf:id="word"][@jf:annotation]/jf:annotated/tei:note[@jf:id="word_note"])""", "word note is not present")
+ .assertXPath("""every $annotated in $output//jf:annotated satisfies contains($annotated/@jf:document, "/combine-ann-notes") and $annotated/@jf:license="http://www.creativecommons.org/licenses/by/3.0"""", "annotations reference the document they came from and its license")
+ .go
+ }
+
+ it("handles annotations in a parallel text") {
+ xq("""let $d := doc("/db/data/original/en/combine-ann-incl.xml")
+ return
+ format:combine($d, map {}, $d)""")
+ .assertXPath("""exists($output//jf:ptr[@jf:id="ptr2"]/jf:combined[@jf:id="stream"][@jf:annotation]/jf:annotated/tei:note[@jf:id="stream_note"])""", "stream annotation from parA is present")
+ .assertXPath("""exists($output//jf:ptr[@jf:id="ptr2"]/descendant::jf:parallel[contains(@domain, "/combine-ann-parA")]/descendant::jf:annotation[tei:seg[@jf:id="single"]]/jf:annotated/tei:note[@jf:id="single_note"])""", "single annotation from parA is present")
+ .assertXPath("""exists($output//jf:ptr[@jf:id="ptr2"]/descendant::jf:parallel[contains(@domain, "/combine-ann-parA")]/descendant::jf:annotation[tei:seg[@jf:id="range1"] and tei:seg[@jf:id="range2"]]/jf:annotated/tei:note[@jf:id="range_note"])""", "range annotation from parA is present")
+ .assertXPath("""exists($output//jf:ptr[@jf:id="ptr2"]/descendant::jf:parallel[contains(@domain, "/combine-ann-parA")]/descendant::tei:seg[@jf:id="with_word"]/tei:w[@jf:annotation]/jf:annotated/tei:note[@jf:id="word_note"])""", "word annotation from parA is present")
+ .assertXPath("""count($output//jf:ptr[@jf:id="ptr2"]/jf:combined[@jf:id="stream"][@jf:annotation]/jf:annotated/tei:note[@jf:id="stream_note"])=2""", "stream annotation from parB is present")
+ .assertXPath("""exists($output//jf:ptr[@jf:id="ptr2"]/descendant::jf:parallel[contains(@domain, "/combine-ann-parB")]/descendant::jf:annotation[tei:seg[@jf:id="single"]]/jf:annotated/tei:note[@jf:id="single_note"])""", "single annotation from parB is present")
+ .assertXPath("""exists($output//jf:ptr[@jf:id="ptr2"]/descendant::jf:parallel[contains(@domain, "/combine-ann-parB")]/descendant::jf:annotation[tei:seg[@jf:id="range1"] and tei:seg[@jf:id="range2"]]/jf:annotated/tei:note[@jf:id="range_note"])""", "range annotation from parB is present")
+ .assertXPath("""exists($output//jf:ptr[@jf:id="ptr2"]/descendant::jf:parallel[contains(@domain, "/combine-ann-parB")]/descendant::tei:seg[@jf:id="with_word"]/tei:w[@jf:annotation]/jf:annotated/tei:note[@jf:id="word_note"])""", "word annotation from parB is present")
+ .go
+ }
+
+ it("handles annotations that are broken up by concurrency") {
+ xq("""let $d := doc("/db/data/original/en/combine-ann2.xml")
+ return
+ format:combine($d, map {}, $d)""")
+ .assertXPath("""count($output//jf:annotated/tei:note[@jf:id="single_note"])=1""", "single note is present exactly once")
+ .go
+ }
+
+ it("handles styling a document with inclusions") {
+ xq("""let $d := doc("/db/data/original/en/combine-style-1.xml")
+ return
+ format:combine($d, map {}, $d)""")
+ .assertXPath("""count($output//*[@jf:style])=1""", "only one @jf:style attribute is added")
+ .assertXPath("""$output//@jf:style[1]="/data/styles/test_style"""", "the attribute points to the style in the opensiddur->style feature")
+ .go
+ }
+
+ it("handles transliteration with segGen") {
+ xq("""let $d := doc("/db/data/original/en/combine-segGen-1.xml")
+ return
+ format:combine($d, map {}, $d)""")
+ .assertXPath("""$output//jf:combined/j:segGen[@jf:id="segGen1"]="ʾabbaʾ"""", "the segGen element contains the generated transliteration")
+ .assertXPath("""$output//jf:combined/j:segGen[@jf:id="segGen1"]/@xml:lang="he-Latn"""", "the segGen element has an appropriate xml:lang")
+ .assertXPath("""count($output//jf:combined/*)=1""", "no other elements are generated")
+ .go
+ }
+
+ it("handles declared transliteration in a non-parallel document") {
+ xq("""let $d := doc("/db/data/original/en/combine-translit-1.xml")
+ return
+ format:combine($d, map {}, $d)""")
+ .assertXPath("""exists($output//jf:combined/tei:seg[@jf:id="not_transliterated"])""", "the untransliterated segment remains untransliterated")
+ .assertXPath("""exists($output//jf:combined//tei:seg[@jf:id="bad_language"])""", "a transliterated segment that declares an untransliteratable xml:lang remains untransliterated")
+ .assertXPath("""exists($output//jf:combined/jf:annotation/jf:annotated/tei:note/tei:seg) and empty($output//jf:combined/jf:annotation/jf:annotated/tei:note/jf:transliterated)""", "a segment inside an annotation does not get transliterated")
+ .assertXPath("""exists($output//jf:combined//jf:transliterated/tei:seg[@jf:id="to_be_transliterated"]) and $output//jf:combined//jf:transliterated/tei:seg[@type="transliterated"]="ʾabbaʾ"""", "a segment inside the transliterated portion with the correct language is transliterated")
+ .assertXPath("""exists($output//jf:combined//tei:seg[@jf:id="no_table"]) and empty($output//jf:combined//jf:transliterated/tei:seg[@jf:id="no_table"])""", "if the table does not exist, no transliteration")
+ .go
+ }
+ }
+}
diff --git a/opensiddur-extensions/src/test/scala/org/opensiddur/transforms/TestCompile.scala b/opensiddur-extensions/src/test/scala/org/opensiddur/transforms/TestCompile.scala
new file mode 100644
index 00000000..e42b9453
--- /dev/null
+++ b/opensiddur-extensions/src/test/scala/org/opensiddur/transforms/TestCompile.scala
@@ -0,0 +1,150 @@
+package org.opensiddur.transforms
+
+import org.opensiddur.DbTest
+
+class TestCompile extends DbTest {
+ override val prolog =
+ """xquery version '3.1';
+
+declare namespace tei="http://www.tei-c.org/ns/1.0";
+declare namespace j="http://jewishliturgy.org/ns/jlptei/1.0";
+declare namespace jf="http://jewishliturgy.org/ns/jlptei/flat/1.0";
+
+import module namespace tcommon="http://jewishliturgy.org/test/tcommon"
+ at "xmldb:exist:/db/apps/opensiddur-server/test/tcommon.xqm";
+
+import module namespace format="http://jewishliturgy.org/modules/format"
+ at "xmldb:exist:///db/apps/opensiddur-server/modules/format.xqm";
+import module namespace mirror="http://jewishliturgy.org/modules/mirror"
+ at "xmldb:exist:///db/apps/opensiddur-server/modules/mirror.xqm";
+import module namespace compile="http://jewishliturgy.org/transform/compile"
+ at "xmldb:exist:///db/apps/opensiddur-server/transforms/compile.xqm";
+import module namespace user="http://jewishliturgy.org/api/user"
+ at "xmldb:exist:///db/apps/opensiddur-server/api/user.xqm";
+ """
+
+ def setupResourceForTest(resourceName: String, dataType: String = "original") = {
+ setupResource("src/test/resources/transforms/" + resourceName + ".xml",
+ resourceName, dataType, 1, if (dataType == "original") Some("en") else None,
+ Some("everyone"), Some("rw-rw-r--"))
+ xq(
+ s"""
+ let $$name := '/db/data/$dataType/${if (dataType == "original") "en/" else ""}$resourceName.xml'
+ let $$segmented := format:combine(doc($$name), map {}, doc($$name))
+ return ()""").go
+ }
+
+ def setupUsersForTest() {
+ xq("""let $u1 := user:put(
+ "xqtest1",
+ document {
+
+ xqtest1
+ Test User 10
+
+ }
+ )
+ let $u2 := user:put(
+ "xqtest2",
+ document {
+
+ xqtest2
+ Organization
+
+ }
+ )
+ return ()
+ """)
+ }
+
+ override def beforeAll: Unit = {
+ super.beforeAll
+ setupUsers(2)
+ setupUsersForTest()
+ setupResourceForTest("combine1")
+ setupResourceForTest("combine3")
+ setupResourceForTest("compile1")
+ setupResourceForTest("compile2")
+ setupResourceForTest("compile3")
+ setupResourceForTest("compile4")
+ }
+
+ override def afterAll(): Unit = {
+ teardownResource("compile4", "original", 1)
+ teardownResource("compile3", "original", 1)
+ teardownResource("compile2", "original", 1)
+ teardownResource("compile1", "original", 1)
+ teardownResource("combine3", "original", 1)
+ teardownResource("combine1", "original", 1)
+ teardownUsers(2)
+ super.afterAll()
+ }
+
+ describe("compile:compile-document") {
+ it("acts as an identity transform") {
+ xq("""compile:compile-document(
+ mirror:doc($format:combine-cache, "/db/data/original/en/combine1.xml"),
+ map {})""")
+ .assertXPath("""exists($output/tei:TEI/tei:text/jf:combined[@jf:id="stream"]/tei:seg[@jf:id="seg1"][ends-with(@jf:stream,"#stream")])
+ """, "acts as an identity transform for unflattened text")
+ .assertXPath("""exists($output/tei:TEI/tei:text/tei:back/tei:div[@type="licensing"])""", "a license statement is added")
+ .assertXPath("""count($output//tei:div[@type="licensing"]/tei:div[@type="license-statement"]/tei:ref[@target="http://www.creativecommons.org/publicdomain/zero/1.0"])=1""", "the license statement references 1 license")
+ .go
+ }
+
+ it("compiles with an external pointer inclusion") {
+ xq("""compile:compile-document(
+ mirror:doc($format:combine-cache, "/db/data/original/en/combine3.xml"),
+ map {})""")
+ .assertXPath("""exists($output/tei:TEI/tei:text/tei:back/tei:div[@type="licensing"])""", "a license statement is added")
+ .assertXPath("""
+ let $statements := $output//tei:div[@type="licensing"]/tei:div[@type="license-statement"]
+ return
+ count($statements)=2 and
+ exists($statements/tei:ref[@target="http://www.creativecommons.org/publicdomain/zero/1.0"]) and
+ exists($statements/tei:ref[@target="http://www.creativecommons.org/licenses/by/3.0"])
+ """, "the license statement references 2 licenses")
+ .go
+ }
+
+ it("compiles the contributor list from change elements") {
+ xq("""compile:compile-document(
+ mirror:doc($format:combine-cache, "/db/data/original/en/compile1.xml"),
+ map {}
+ )""")
+ .assertXPath("""count($output//tei:back/tei:div[@type="contributors"]/tei:list[tei:head="Editors"]/tei:item)=2""", "returns a list of editors")
+ .assertXPath("""$output//tei:div[@type="contributors"]/tei:list/(tei:item[1]/j:contributor/tei:idno="xqtest1" and tei:item[2]/j:contributor/tei:idno="xqtest2")""", "sorted by name")
+ .go
+ }
+
+ it("compiles a contributor list from respStmt elements") {
+ xq("""compile:compile-document(
+ mirror:doc($format:combine-cache, "/db/data/original/en/compile2.xml"),
+ map {}
+ )""")
+ .assertXPath("""count($output//tei:back/tei:div[@type="contributors"]/tei:list)=2""", "returns a list for each key in the respStmt")
+ .assertXPath("""$output//tei:div[@type="contributors"]/tei:list[tei:head="Funders"]/tei:item/j:contributor/tei:idno="xqtest2"""", "references contributor of type 'fnd' in funders list")
+ .assertXPath("""$output//tei:div[@type="contributors"]/tei:list[tei:head="Transcribers"]/tei:item/j:contributor/tei:idno="xqtest1"""", "references contributor of type 'trc' in transcribers list")
+ .go
+ }
+
+ it("dedupes the same user referenced more than once for the same contribution") {
+ xq("""compile:compile-document(
+ mirror:doc($format:combine-cache, "/db/data/original/en/compile3.xml"),
+ map {}
+ )""")
+ .assertXPath("""count($output//tei:div[@type="contributors"]/tei:list/tei:item)=1""", "returns only one reference")
+ .go
+ }
+
+ it("compiles a bibliography") {
+ xq("""compile:compile-document(
+ mirror:doc($format:combine-cache, "/db/data/original/en/compile4.xml"),
+ map {}
+ )""")
+ .assertXPath("""count($output//tei:back/tei:div[@type="bibliography"]/tei:listBibl/tei:biblStruct)=1""", "generates a bibliography with one entry")
+ .go
+ }
+ }
+
+}
diff --git a/opensiddur-extensions/src/test/scala/org/opensiddur/transforms/TestConditionals.scala b/opensiddur-extensions/src/test/scala/org/opensiddur/transforms/TestConditionals.scala
new file mode 100644
index 00000000..151678a6
--- /dev/null
+++ b/opensiddur-extensions/src/test/scala/org/opensiddur/transforms/TestConditionals.scala
@@ -0,0 +1,468 @@
+package org.opensiddur.transforms
+
+import org.opensiddur.DbTest
+
+class TestConditionals extends DbTest {
+ /** imports, namespaces and variables */
+ override val prolog: String =
+ """xquery version '3.1';
+
+ declare namespace tei="http://www.tei-c.org/ns/1.0";
+ declare namespace j="http://jewishliturgy.org/ns/jlptei/1.0";
+ declare namespace jf="http://jewishliturgy.org/ns/jlptei/flat/1.0";
+
+ import module namespace cond="http://jewishliturgy.org/transform/conditionals"
+ at "xmldb:exist:///db/apps/opensiddur-server/transforms/conditionals.xqm";
+ import module namespace tcommon="http://jewishliturgy.org/test/tcommon"
+ at "xmldb:exist:/db/apps/opensiddur-server/test/tcommon.xqm";
+
+ """
+
+ override def beforeAll: Unit = {
+ super.beforeAll()
+
+ setupUsers(1)
+
+ setupResource("src/test/resources/transforms/Conditionals/conditional1.xml", "conditional1", "conditionals", 1)
+ }
+
+ override def afterAll(): Unit = {
+ teardownResource("conditional1", "conditionals", 1)
+
+ teardownUsers(1)
+
+ super.afterAll()
+ }
+
+ describe("cond:evaluate") {
+ it("returns true for a condition checking 1 true value") {
+ xq("""let $settings := map {
+ "combine:settings" : map {
+ "FS->ONE" : YES
+ }
+ }
+ return
+ cond:evaluate(
+
+
+ ,
+ $settings
+ ) """)
+ .assertEquals("YES")
+ .go
+ }
+
+ it("returns false for a condition checking one false value") {
+ xq("""let $settings := map {
+ "combine:settings" : map {
+ "FS->ONE" : YES
+ }
+ }
+ return
+ cond:evaluate(
+
+
+ ,
+ $settings
+ )""")
+ .assertEquals("NO")
+ .go
+ }
+
+ it("returns maybe for a condition checking 1 maybe value") {
+ xq("""let $settings := map {
+ "combine:settings" : map {
+ "FS->ONE" : MAYBE
+ }
+ }
+ return
+ cond:evaluate(
+
+
+ ,
+ $settings
+ ) """)
+ .assertEquals("MAYBE")
+ .go
+ }
+
+ it("returns two results for a condition checking one true and one false value") {
+ xq("""let $settings := map {
+ "combine:settings" : map {
+ "FS->ONE" : YES,
+ "FS->TWO" : NO
+ }
+ }
+ return
+ cond:evaluate(
+
+
+
+ ,
+ $settings
+ ) """)
+ .assertEquals("YES", "NO")
+ .go
+ }
+
+ it("returns YES when j:all conditions are all YES") {
+ xq("""let $settings := map {
+ "combine:settings" : map {
+ "FS->ONE" : YES,
+ "FS->TWO" : YES,
+ "FS->THREE" : YES
+ }
+ }
+ return
+ cond:evaluate(
+
+
+
+
+
+
+ ,
+ $settings
+ )""")
+ .assertEquals("YES")
+ .go
+ }
+
+ it("returns NO with all and one NO") {
+ xq("""let $settings := map {
+ "combine:settings" : map {
+ "FS->ONE" : YES,
+ "FS->TWO" : YES,
+ "FS->THREE" : NO
+ }
+ }
+ return
+ cond:evaluate(
+
+
+
+
+
+
+ ,
+ $settings
+ )""")
+ .assertEquals("NO")
+ .go
+ }
+
+ it("returns MAYBE for all and one MAYBE") {
+ xq("""let $settings := map {
+ "combine:settings" : map {
+ "FS->ONE" : YES,
+ "FS->TWO" : YES,
+ "FS->THREE" : MAYBE
+ }
+ }
+ return
+ cond:evaluate(
+
+
+
+
+
+
+ ,
+ $settings
+ )""")
+ .assertEquals("MAYBE")
+ .go
+ }
+
+ it("returns YES for any when all are YES") {
+ xq("""let $settings := map {
+ "combine:settings" : map {
+ "FS->ONE" : YES,
+ "FS->TWO" : YES,
+ "FS->THREE" : YES
+ }
+ }
+ return
+ cond:evaluate(
+
+
+
+
+
+
+ ,
+ $settings
+ )""")
+ .assertEquals("YES")
+ .go
+ }
+
+ it("returns YES for any when there is one YES") {
+ xq("""let $settings := map {
+ "combine:settings" : map {
+ "FS->ONE" : YES,
+ "FS->TWO" : NO,
+ "FS->THREE" : NO
+ }
+ }
+ return
+ cond:evaluate(
+
+
+
+
+
+
+ ,
+ $settings
+ )""")
+ .assertEquals("YES")
+ .go
+ }
+
+ it("returns MAYBE for any when there is one MAYBE") {
+ xq("""let $settings := map {
+ "combine:settings" : map {
+ "FS->ONE" : MAYBE,
+ "FS->TWO" : YES,
+ "FS->THREE" : NO
+ }
+ }
+ return
+ cond:evaluate(
+
+
+
+
+
+
+ ,
+ $settings
+ )""")
+ .assertEquals("MAYBE")
+ .go
+ }
+
+ it("returns NO for oneOf when all are YES") {
+ xq("""let $settings := map {
+ "combine:settings" : map {
+ "FS->ONE" : YES,
+ "FS->TWO" : YES,
+ "FS->THREE" : YES
+ }
+ }
+ return
+ cond:evaluate(
+
+
+
+
+
+
+ ,
+ $settings
+ )""")
+ .assertEquals("NO")
+ .go
+ }
+
+ it("returns NO for oneOf when all are NO") {
+ xq("""let $settings := map {
+ "combine:settings" : map {
+ "FS->ONE" : NO,
+ "FS->TWO" : NO,
+ "FS->THREE" : NO
+ }
+ }
+ return
+ cond:evaluate(
+
+
+
+
+
+
+ ,
+ $settings
+ )""")
+ .assertEquals("NO")
+ .go
+ }
+
+ it("returns YES for oneOf when there is one YES") {
+ xq("""let $settings := map {
+ "combine:settings" : map {
+ "FS->ONE" : YES,
+ "FS->TWO" : NO,
+ "FS->THREE" : NO
+ }
+ }
+ return
+ cond:evaluate(
+
+
+
+
+
+
+ ,
+ $settings
+ )""")
+ .assertEquals("YES")
+ .go
+ }
+
+ it("returns MAYBE for oneOf when there is one MAYBE") {
+ xq("""let $settings := map {
+ "combine:settings" : map {
+ "FS->ONE" : MAYBE,
+ "FS->TWO" : NO,
+ "FS->THREE" : NO
+ }
+ }
+ return
+ cond:evaluate(
+
+
+
+
+
+
+ ,
+ $settings
+ )""")
+ .assertEquals("MAYBE")
+ .go
+ }
+
+ it("returns NO for oneOf when there is one YES and one MAYBE") {
+ xq("""let $settings := map {
+ "combine:settings" : map {
+ "FS->ONE" : MAYBE,
+ "FS->TWO" : YES,
+ "FS->THREE" : NO
+ }
+ }
+ return
+ cond:evaluate(
+
+
+
+
+
+
+ ,
+ $settings
+ )""")
+ .assertEquals("NO")
+ .go
+ }
+
+ it("returns that not YES is NO") {
+ xq("""let $settings := map {
+ "combine:settings" : map {
+ "FS->ONE" : YES
+ }
+ }
+ return
+ cond:evaluate(
+
+
+
+
+ ,
+ $settings
+ )""")
+ .assertEquals("NO")
+ .go
+ }
+
+ it("returns that not NO is YES") {
+ xq("""let $settings := map {
+ "combine:settings" : map {
+ "FS->ONE" : NO
+ }
+ }
+ return
+ cond:evaluate(
+
+
+
+
+ ,
+ $settings
+ )""")
+ .assertEquals("YES")
+ .go
+ }
+
+ it("returns that not MAYBE is MAYBE") {
+ xq("""let $settings := map {
+ "combine:settings" : map {
+ "FS->ONE" : MAYBE
+ }
+ }
+ return
+ cond:evaluate(
+
+
+
+
+ ,
+ $settings
+ )""")
+ .assertEquals("MAYBE")
+ .go
+ }
+
+ it("returns a literal default value") {
+ xq("""let $settings := map {
+ "combine:settings" : map {
+ }
+ }
+ return
+ cond:evaluate(
+
+
+ ,
+ $settings
+ )""")
+ .assertEquals("YES")
+ .go
+ }
+
+ it("returns a conditional default value when the condition evaluates to true") {
+ xq("""let $settings := map {
+ "combine:settings" : map {
+ "test:FS->CONTROL" : NO
+ }
+ }
+ return
+ cond:evaluate(
+
+
+ ,
+ $settings
+ )""")
+ .assertEquals("YES")
+ .go
+ }
+
+ it("returns default NO for a conditional default value where the condition evaluates false") {
+ xq("""let $settings := map {
+ "combine:settings" : map {
+ "test:FS->CONTROL" : YES
+ }
+ }
+ return
+ cond:evaluate(
+
+
+ ,
+ $settings
+ )""")
+ .assertEquals("NO")
+ .go
+ }
+ }
+}
diff --git a/opensiddur-extensions/src/test/scala/org/opensiddur/transforms/TestFlatten.scala b/opensiddur-extensions/src/test/scala/org/opensiddur/transforms/TestFlatten.scala
new file mode 100644
index 00000000..5580cc27
--- /dev/null
+++ b/opensiddur-extensions/src/test/scala/org/opensiddur/transforms/TestFlatten.scala
@@ -0,0 +1,635 @@
+package org.opensiddur.transforms
+
+import org.opensiddur.DbTest
+
+class TestFlatten extends DbTest {
+ override val prolog =
+ """xquery version '3.1';
+
+declare namespace tei="http://www.tei-c.org/ns/1.0";
+declare namespace j="http://jewishliturgy.org/ns/jlptei/1.0";
+declare namespace jf="http://jewishliturgy.org/ns/jlptei/flat/1.0";
+
+import module namespace magic="http://jewishliturgy.org/magic"
+ at "xmldb:exist:/db/apps/opensiddur-server/magic/magic.xqm";
+import module namespace tcommon="http://jewishliturgy.org/test/tcommon"
+ at "xmldb:exist:/db/apps/opensiddur-server/test/tcommon.xqm";
+
+import module namespace flatten="http://jewishliturgy.org/transform/flatten"
+ at "xmdb:exist:/db/apps/opensiddur-server/transforms/flatten.xqm";
+import module namespace format="http://jewishliturgy.org/modules/format"
+ at "xmdb:exist:/db/apps/opensiddur-server/modules/format.xqm";
+import module namespace ridx="http://jewishliturgy.org/modules/refindex"
+ at "xmdb:exist:/db/apps/opensiddur-server/modules/refindex.xqm";
+
+ """
+
+ def setupResourceForFormat(resourceName: String, dataType: String = "original",
+ ): Unit = {
+ setupResource("src/test/resources/transforms/" + resourceName + ".xml",
+ resourceName, dataType, 1, if (dataType == "original") Some("en") else None,
+ Some("everyone"), Some("rw-rw-r--"))
+ xq(
+ s"""
+ let $$name := '/db/data/$dataType/${if (dataType == "original") "en/" else ""}$resourceName.xml'
+ let $$segmented := format:segment(doc($$name), map {}, doc($$name))
+ return ()""").go
+ }
+
+ override def beforeAll: Unit = {
+ super.beforeAll
+ xq("""let $users := tcommon:setup-test-users(1)
+ return ()""")
+ .go
+
+ setupResourceForFormat("identity")
+ setupResourceForFormat("simple-concurrency")
+ setupResourceForFormat("inline")
+ setupResourceForFormat("inline2")
+ setupResourceForFormat("inline3")
+ setupResourceForFormat("inline4")
+ setupResourceForFormat("suspend")
+ setupResourceForFormat("suspend2")
+ setupResourceForFormat("suspend3")
+ setupResourceForFormat("suspend4")
+ setupResourceForFormat("resolve")
+ setupResourceForFormat("flatten-parA")
+ setupResourceForFormat("flatten-parB")
+ setupResourceForFormat("flatten-par", "linkage")
+ }
+
+ override def afterAll(): Unit = {
+ teardownResource("flatten-parB", "original", 1)
+ teardownResource("flatten-parA", "original", 1)
+ teardownResource("flatten-par", "linkage", 1)
+ teardownResource("resolve", "original", 1)
+ teardownResource("suspend4", "original", 1)
+ teardownResource("suspend3", "original", 1)
+ teardownResource("suspend2", "original", 1)
+ teardownResource("suspend", "original", 1)
+ teardownResource("inline4", "original", 1)
+ teardownResource("inline3", "original", 1)
+ teardownResource("inline2", "original", 1)
+ teardownResource("inline", "original", 1)
+ teardownResource("simple-concurrency", "original", 1)
+ teardownResource("identity", "original", 1)
+ xq("""let $users := tcommon:teardown-test-users(1)
+ return ()""")
+ .go
+ super.afterAll()
+ }
+
+ describe("format:flatten-document") {
+ it("acts as an identity transform except streamText has jf:id, when there is no concurrency") {
+ xq("""flatten:flatten-document(doc("/db/data/original/en/identity.xml"), map {})/*""")
+ .assertXmlEquals("""
+ |
+ |
+ |
+ |
+ |
+ |
+ | No layers!
+ |
+ |
+ | """.stripMargin)
+ .go
+ }
+
+ it("changes a pointer to a placeholder with simple concurrency") {
+ xq("""flatten:flatten-document(doc("/db/data/original/en/simple-concurrency.xml"), map {})/*""")
+ .assertXmlEquals("""
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ | No layers!
+ |
+ |
+ | """.stripMargin)
+ .go
+ }
+
+ it("matches start and end attributes when there are concurrent hierarchies with inline elements and no children") {
+ xq("""flatten:flatten-document(doc("/db/data/original/en/inline.xml"), map {})/*""")
+ .assertXmlEquals("""
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ | title
+ |
+ | Label
+ |
+ |
+ |
+ |
+ |
+ |
+ | One segment
+ |
+ |
+ | """.stripMargin)
+ .assertXPath("$output//*:ab[@*:start]/@*:start=$output//*:ab[@*:end]/@*:end")
+ .go
+ }
+
+ it("writes labels with positioning information with concurrent hierarchies and two inline elements in a row") {
+ xq("""flatten:flatten-document(doc("/db/data/original/en/inline2.xml"), map {})""")
+ .assertXPathEquals("$output//tei:label[1]", "label 1", """Label 1""".stripMargin)
+ .assertXPathEquals("$output//tei:label[2]", "label 2", """Label 2""".stripMargin)
+ .go
+ }
+
+ it("annotates labels with concurrent hierarchies with two inline elements, the second follows a ptr") {
+ xq("""flatten:flatten-document(doc("/db/data/original/en/inline3.xml"), map {})""")
+ .assertXPathEquals("$output//tei:label[1]", "label 1", """Label 1""".stripMargin)
+ .assertXPathEquals("$output//tei:label[2]", "label 2", """Label 2""".stripMargin)
+ .go
+ }
+
+ it("flattens a document with pointers and labels") {
+ xq("""flatten:flatten-document(doc("/db/data/original/en/inline4.xml"), map {})/*""")
+ .assertXmlEquals("""
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ | title
+ |
+ | Label 1
+ |
+ | Label 2
+ |
+ | Label 3
+ |
+ | Label 4
+ |
+ |
+ |
+ |
+ | One segment
+ | Two segments
+ |
+ |
+ | """.stripMargin)
+ }
+
+ it("flattens a document with two level suspend and continue") {
+ xq("""flatten:flatten-document(doc("/db/data/original/en/suspend.xml"), map {})/*""")
+ .assertXmlEquals("""
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ | One segment
+ | Two segments
+ | Three segments
+ |
+ |
+ | """.stripMargin)
+ .go
+ }
+
+ it("flattens with suspend and continue with labels") {
+ xq("""flatten:flatten-document(doc("/db/data/original/en/suspend2.xml"), map {})/*""")
+ .assertXmlEquals("""
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ | before
+ |
+ | after 1
+ |
+ |
+ |
+ | after 3
+ |
+ |
+ |
+ |
+ | One segment
+ | Two segments
+ | Three segments
+ |
+ |
+ | """.stripMargin)
+ .go
+ }
+
+ it("flattens with multi-level suspend and continue with unequal numbers of levels") {
+ xq("""flatten:flatten-document(doc("/db/data/original/en/suspend3.xml"), map {})/*""")
+ .assertXmlEquals("""
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ | One segment
+ | Two segments
+ | Three segments
+ |
+ |
+ | """.stripMargin)
+ .go
+ }
+
+ it("flattens with multi-level suspend and continue with end and start at the suspend position") {
+ xq("""flatten:flatten-document(doc("/db/data/original/en/suspend4.xml"), map {})/*""")
+ .assertXmlEquals("""
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ | One segment
+ | Two segments
+ | Three segments
+ |
+ |
+ | """.stripMargin)
+ .go
+ }
+ }
+
+ describe("flatten:resolve-stream") {
+ it("replaces placeholders with stream elements") {
+ xq("""flatten:resolve-stream(doc("/db/data/original/en/resolve.xml"), map {})/*""")
+ .assertXmlEquals("""
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ | title
+ |
+ | Label
+ | One segment
+ |
+ |
+ |
+ |
+ |
+ | """.stripMargin)
+ .go
+ }
+ }
+
+ describe("format:flatten") {
+ it("flattens a parallel document") {
+ xq(
+ """let $linkage-doc := doc("/db/data/linkage/flatten-par.xml")
+ return format:flatten($linkage-doc, map {}, $linkage-doc)""")
+ .assertXPath("""$output//tei:TEI[contains(@jf:document, '/flatten-parA')]//j:streamText/tei:seg[@jf:id="A1"]="A-1" """,
+ "parA reproduces its own streamText")
+ .assertXPath("""exists($output//tei:TEI[contains(@jf:document, '/flatten-parA')]//j:concurrent[count(jf:layer)=1]/jf:layer[@type="parallel"])""",
+ "parA has 1 flattened parallel layer")
+ .assertXPath("""exists($output//tei:TEI[contains(@jf:document, '/flatten-parA')]//j:concurrent/jf:layer[@type="parallel"][count(jf:parallelGrp[@jf:start])=3][count(jf:parallel[@jf:start])=3][count(jf:placeholder[@jf:stream="/data/original/flatten-parA#stream"])=6])""",
+ "parA layer has flattened parallelGrps")
+ .assertXPath(
+ """every $ph in $output//tei:TEI[contains(@jf:document, '/flatten-parA')]//j:concurrent/jf:layer[@type="parallel"]/jf:placeholder
+ satisfies starts-with($ph/@jf:id, "A")""", "parA layer placeholders point to their segs")
+ .assertXPath("""$output//tei:TEI[contains(@jf:document, '/flatten-parB')]//j:streamText/tei:seg[@jf:id="A1"]="B-1"""",
+ "parB reproduces its own streamText")
+ .assertXPath("""exists($output//tei:TEI[contains(@jf:document, '/flatten-parB')]//j:concurrent[count(jf:layer)=2]/jf:layer[@type="parallel"])""",
+ "parB has 1 flattened parallel layer and 2 flattened layers")
+ .assertXPath("""exists($output//tei:TEI[contains(@jf:document, '/flatten-parB')]//j:concurrent/jf:layer[@type="parallel"][count(jf:parallelGrp[@jf:start])=3][count(jf:parallel[@jf:start])=3][count(jf:placeholder[@jf:stream="/data/original/flatten-parB#stream"])=7])""",
+ "one parB layer has flattened parallelGrps")
+ .assertXPath("""exists($output//tei:TEI[contains(@jf:document, '/flatten-parB')]//j:concurrent/jf:layer[@type="p"][count(tei:p[@jf:start])=1][count(jf:placeholder[@jf:stream="/data/original/flatten-parB#stream"])=9])""",
+ "one parB layer has flattened paragraphs")
+ .assertXPath(
+ """every $ph in $output//tei:TEI[contains(@jf:document, '/flatten-parB')]//j:concurrent/jf:layer[@type="parallel"]/jf:placeholder
+ satisfies starts-with($ph/@jf:id, "A")""", "parB layer placeholders point to their segs")
+ .assertXPath(
+ """every $pe in $output//jf:parallelGrp|$output//jf:parallel
+ satisfies $pe/@jf:nchildren=(-19,19)""", "parallel elements are prioritized")
+ .go
+ }
+ }
+
+ describe("format:merge") {
+ it("merges a parallel document") {
+ xq(
+ """let $d := doc("/db/data/linkage/flatten-par.xml")
+ return format:merge($d, map {}, $d)""")
+ .assertXPath("""exists($output//tei:TEI[contains(@jf:document, '/flatten-parA')]//jf:merged)""", "parA has a merged element")
+ .assertXPath("""count($output//tei:TEI[contains(@jf:document, '/flatten-parA')]//jf:merged/jf:placeholder[contains(@jf:stream, 'parA')][starts-with(@jf:id,'A')])=9""",
+ "parA merged element contains all the elements from the parA streamText")
+ .assertXPath("""exists($output//tei:TEI[contains(@jf:document, '/flatten-parA')]//jf:concurrent[count(jf:layer)=1]/jf:layer[count(node())=0])""",
+ "parA has a concurrent element that makes reference to its layers")
+ .assertXPath("""exists($output//tei:TEI[contains(@jf:document, '/flatten-parB')]//jf:merged)""", "parB has a merged element")
+ .assertXPath("""count($output//tei:TEI[contains(@jf:document, '/flatten-parB')]//jf:merged/jf:placeholder[contains(@jf:stream,'parB')][starts-with(@jf:id,'A')])=9""", "parB merged element contains all the elements from the parB streamText")
+ .assertXPath(
+ """every $layer in $output//tei:TEI[contains(@jf:document, '/flatten-parB')]//jf:concurrent[count(jf:layer)=2]/jf:layer
+ satisfies count($layer/node())=0""", "parB has a concurrent element that makes reference to its layers")
+ .go
+
+ }
+ }
+
+ describe("format:resolve") {
+ it("resolves a parallel document") {
+ xq(
+ """let $d := doc("/db/data/linkage/flatten-par.xml")
+ return format:resolve($d, map {}, $d)""")
+ .assertXPath("""empty($output//j:streamText)""", "streamText has been removed")
+ .assertXPath("""count($output//tei:TEI[contains(@jf:document, '/flatten-parA')]//jf:merged/tei:seg[contains(@jf:stream, 'parA')][starts-with(.,'A-')])=9""",
+ "parA merged element contains all the seg elements from the parA streamText")
+ .assertXPath("""count($output//tei:TEI[contains(@jf:document, '/flatten-parB')]//jf:merged/tei:seg[contains(@jf:stream,'parB')][starts-with(.,'B-')])=9""",
+ "parB merged element contains all the seg elements from the parB streamText")
+ .go
+ }
+ }
+}
diff --git a/opensiddur-extensions/src/test/scala/org/opensiddur/transforms/TestParallelLayer.scala b/opensiddur-extensions/src/test/scala/org/opensiddur/transforms/TestParallelLayer.scala
new file mode 100644
index 00000000..ebf5cb62
--- /dev/null
+++ b/opensiddur-extensions/src/test/scala/org/opensiddur/transforms/TestParallelLayer.scala
@@ -0,0 +1,74 @@
+package org.opensiddur.transforms
+
+import org.opensiddur.DbTest
+
+class TestParallelLayer extends DbTest {
+ override val prolog =
+ """xquery version '3.1';
+
+import module namespace tcommon="http://jewishliturgy.org/test/tcommon"
+ at "xmldb:exist:/db/apps/opensiddur-server/test/tcommon.xqm";
+import module namespace format="http://jewishliturgy.org/modules/format"
+at "xmldb:exist:///db/apps/opensiddur-server/modules/format.xqm";
+import module namespace pla="http://jewishliturgy.org/transform/parallel-layer"
+ at "xmldb:exist:///db/apps/opensiddur-server/transforms/parallel-layer.xqm";
+import module namespace ridx="http://jewishliturgy.org/modules/refindex"
+ at "xmldb:exist:///db/apps/opensiddur-server/modules/refindex.xqm";
+
+declare namespace tei="http://www.tei-c.org/ns/1.0";
+declare namespace j="http://jewishliturgy.org/ns/jlptei/1.0";
+declare namespace jf="http://jewishliturgy.org/ns/jlptei/flat/1.0";
+
+ """
+
+ override def beforeAll: Unit = {
+ super.beforeAll
+ setupUsers(1)
+ setupResource("src/test/resources/transforms/identity.xml", "identity", "original", 1, Some("en"))
+ setupResource("src/test/resources/transforms/parA.xml", "parA", "original", 1, Some("en"))
+ setupResource("src/test/resources/transforms/parB.xml", "parB", "original", 1, Some("en"))
+ setupResource("src/test/resources/transforms/par.xml", "par", "linkage", 1)
+ }
+
+ override def afterAll(): Unit = {
+ teardownResource("par", "linkage", 1)
+ teardownResource("parA", "original", 1)
+ teardownResource("parB", "original", 1)
+ teardownResource("identity", "original", 1)
+ teardownUsers(1)
+ super.afterAll()
+ }
+
+ describe("pla:parallel-layer-document") {
+ it("acts as an identity transform when there is no parallel text") {
+ val expectedData = readXmlFile("src/test/resources/transforms/identity.xml")
+
+ xq("""pla:parallel-layer-document(
+ doc("/db/data/original/en/identity.xml"),
+ map {}
+ )/*""")
+ .user("xqtest1")
+ .assertXmlEquals(expectedData)
+ .go
+ }
+ }
+
+ describe("format:parallel-layer") {
+ it("produces a parallel document, given the linkage and original docs") {
+ xq("""let $d := doc("/db/data/linkage/par.xml")
+ return format:parallel-layer($d, map {}, $d)""")
+ .user("xqtest1")
+ .assertXPath("""exists($output/jf:parallel-document[tei:idno='Test'])""", "produces one jf:paellel-document")
+ .assertXPath("""count($output//@xml:id)=0 and count($output//@jf:id) > 0""", "all xml:ids have been converted into @jf:id")
+ .assertXPath("""count($output/jf:parallel-document/tei:TEI)=2""", "two tei:TEI elements exist")
+ .assertXPath("""contains($output/jf:parallel-document/tei:TEI[1]/@jf:document, "/parA") and contains($output/jf:parallel-document/tei:TEI[2]/@jf:document, "/parB")""", "each tei:TEI element has a @jf:document")
+ .assertXPath("""contains($output/jf:parallel-document/tei:TEI[1]/@xml:base, "/parA") and contains($output/jf:parallel-document/tei:TEI[2]/@xml:base, "/parB")""", "each tei:TEI element has an @xml:base")
+ .assertXPath("""exists($output/jf:parallel-document/tei:TEI[1]//j:concurrent[count(j:layer)=1]/j:layer[@type='parallel'])""", "a j:concurrent and j:layer have been added to parA")
+ .assertXPath("""exists($output/jf:parallel-document/tei:TEI[2]//j:concurrent[count(j:layer)=2]/j:layer[@type='parallel'])""", "a j:layer has been added to parB")
+ .assertXPath("""every $layer in $output//j:concurrent/j:layer[@type='parallel'] satisfies count($layer/jf:parallelGrp/jf:parallel/tei:ptr)=3""", "the added layer contains the same number of tei:ptr as the parallel document contains links")
+ .assertXPath("""every $ptr in $output//j:concurrent/j:layer[@type='parallel']/jf:parallelGrp/jf:parallel/tei:ptr satisfies starts-with($ptr/@target, '#') and string-length($ptr/@target)>1""", "Each tei:ptr is a local ptr")
+ .go
+ }
+ }
+
+}
diff --git a/opensiddur-extensions/src/test/scala/org/opensiddur/transforms/TestPhonyLayer.scala b/opensiddur-extensions/src/test/scala/org/opensiddur/transforms/TestPhonyLayer.scala
new file mode 100644
index 00000000..fcb9f374
--- /dev/null
+++ b/opensiddur-extensions/src/test/scala/org/opensiddur/transforms/TestPhonyLayer.scala
@@ -0,0 +1,179 @@
+package org.opensiddur.transforms
+
+import org.opensiddur.DbTest
+
+class TestPhonyLayer extends DbTest {
+ override val prolog: String =
+ """xquery version '3.1';
+
+ import module namespace phony="http://jewishliturgy.org/transform/phony-layer"
+ at "xmldb:exist:///db/apps/opensiddur-server/transforms/phony-layer.xqm";
+ import module namespace ridx="http://jewishliturgy.org/modules/refindex"
+ at "xmldb:exist:///db/apps/opensiddur-server/modules/refindex.xqm";
+ import module namespace tcommon="http://jewishliturgy.org/test/tcommon"
+ at "xmldb:exist:/db/apps/opensiddur-server/test/tcommon.xqm";
+ import module namespace data="http://jewishliturgy.org/modules/data"
+ at "xmldb:exist:/db/apps/opensiddur-server/modules/data.xqm";
+
+ declare namespace tei="http://www.tei-c.org/ns/1.0";
+ declare namespace j="http://jewishliturgy.org/ns/jlptei/1.0";
+ declare namespace jf="http://jewishliturgy.org/ns/jlptei/flat/1.0";
+
+ """
+
+ override def beforeAll: Unit = {
+ super.beforeAll
+
+ setupUsers(1)
+ setupResource("src/test/resources/transforms/PhonyLayer/phony1.xml", "phony1", "original", 1, Some("en"))
+ setupResource("src/test/resources/transforms/PhonyLayer/phony2.xml", "phony2", "original", 1, Some("en"))
+ setupResource("src/test/resources/transforms/PhonyLayer/phony3.xml", "phony3", "original", 1, Some("en"))
+ setupResource("src/test/resources/transforms/PhonyLayer/phony4.xml", "phony4", "original", 1, Some("en"))
+ setupResource("src/test/resources/transforms/PhonyLayer/phony5.xml", "phony5", "original", 1, Some("en"))
+ setupResource("src/test/resources/transforms/PhonyLayer/phony6.xml", "phony6", "original", 1, Some("en"))
+ }
+
+ override def afterAll(): Unit = {
+ teardownResource("phony6", "original", 1)
+ teardownResource("phony5", "original", 1)
+ teardownResource("phony4", "original", 1)
+ teardownResource("phony3", "original", 1)
+ teardownResource("phony2", "original", 1)
+ teardownResource("phony1", "original", 1)
+
+ teardownUsers(1)
+
+ super.afterAll()
+ }
+
+ describe("phony:phony-layer-document") {
+
+ it("is an identity transform with no conditionals") {
+ val identityXml = readXmlFile("src/test/resources/transforms/PhonyLayer/phony1.xml")
+
+ xq("""phony:phony-layer-document(data:doc("original", "phony1"), map {})/*""")
+ .user("xqtest1")
+ .assertXmlEquals(identityXml)
+ .go
+ }
+
+ it("performs a transform when there are conditionals and only a streamText with no concurrency") {
+ xq("""phony:phony-layer-document(
+ data:doc("original", "phony2"),
+ map {}
+ )""")
+ .user("xqtest1")
+ .assertXPath("""$output//j:streamText/@jf:conditional="#cond1" """, "j:streamText has a @jf:conditional attribute")
+ .assertXPath("""exists($output//j:concurrent[j:layer]) """, "new concurrent section added")
+ .assertXPath("""count($output//j:concurrent/j:layer[@type="phony-conditional"])=3 """, "3 layers of type phony added")
+ .assertXPath("""every $l in $output//j:concurrent/j:layer[@type="phony-conditional"] satisfies $l/@xml:id/string() """, "each of the layers has a @xml:id attribute")
+ .assertXPath("""not($output//j:concurrent/j:layer[@type='phony-conditional'][1]/@xml:id/string()=$output//j:concurrent/j:layer[@type="phony-conditional"][2]/@xml:id/string()) """, "the first layer has an xml:id that is different from the second")
+ .assertXPathEquals("$output//j:concurrent/j:layer[@type='phony-conditional'][1]/jf:conditional",
+ "one layer represents the first conditional",
+ """
+
+ """
+ )
+ .assertXPathEquals("$output//j:concurrent/j:layer[@type='phony-conditional'][2]/jf:conditional",
+ "one layer represents the second conditional",
+ """
+
+ """)
+ .assertXPathEquals("$output//j:concurrent/j:layer[@type='phony-conditional'][3]/jf:conditional",
+ "one layer represents the third conditional, references the instruction",
+ """
+
+ """)
+ .assertXPath("""$output//j:option[@xml:id="opt1"]/(@jf:conditional="#cond1" and empty(@jf:conditional-instruction)) """, "first j:option has conditional attributes with no instruction")
+ .assertXPath("""$output//j:option[@xml:id="opt2"]/(@jf:conditional="#cond2" and @jf:conditional-instruction="#instruction") """, "second j:option has conditional attributes and instruction")
+ .go
+ }
+
+ it("transforms when there are settings and only a streamText") {
+ xq("""phony:phony-layer-document(
+ data:doc("original", "phony4"),
+ map {}
+ )""")
+ .user("xqtest1")
+ .assertXPath("""$output//j:streamText/@jf:set="#set1" """, "j:streamText has a @jf:set attribute")
+ .assertXPath("""exists($output//j:concurrent[j:layer]) """, "new concurrent section added")
+ .assertXPath("""count($output//j:concurrent/j:layer[@type="phony-set"])=2 """, "2 layers of type phony-set added")
+ .assertXPath("""every $l in $output//j:concurrent/j:layer[@type="phony-set"] satisfies $l/@xml:id/string() """, "each of the layers has a @xml:id attribute")
+ .assertXPath("""not($output//j:concurrent/j:layer[@type='phony-set'][1]/@xml:id/string()=$output//j:concurrent/j:layer[@type="phony-set"][2]/@xml:id/string()) """, "the first layer has an xml:id that is different from the second")
+ .assertXPathEquals("$output//j:concurrent/j:layer[@type='phony-set'][1]/jf:set",
+ "one layer represents the first setting",
+ """
+
+ """)
+ .assertXPathEquals("$output//j:concurrent/j:layer[@type='phony-set'][2]/jf:set",
+ "one layer represents the second setting",
+ """
+
+ """)
+ .assertXPath("""$output//tei:w[@xml:id="w1"]/@jf:set="#set2" """, "a setting referenced inside a streamText element results in @jf:set")
+ .go
+ }
+
+ it("adds a phony layer with conditionals") {
+ xq("""
+ phony:phony-layer-document(
+ data:doc("original", "phony3"),
+ map {}
+ )
+ """)
+ .user("xqtest1")
+ .assertXPath("""count($output//j:concurrent/j:layer[@type="phony-conditional"])=1 """, "1 layer of type phony added")
+ .assertXPath("""count($output//j:layer/tei:div[contains(@jf:conditional, "#cond2")])=2 """, "concurrent condition appears as an attribute on all divs in the layer")
+ .assertXPath("""count($output/*[contains(@jf:conditional, "#cond2")][not(parent::j:layer)])=0 """, "concurrent condition does not appear as an attribute on any elements that are not direct descendents of j:layer")
+ .assertXPath("""every $ab in $output//tei:ab[@xml:id=("ab1","ab2")] satisfies $ab/@jf:conditional="#cond1" """, "range reference results in @jf:conditional")
+ .assertXPath("""contains($output//tei:div[@xml:id="div2"]/@jf:conditional, "#cond1") """, "direct reference results in @jf:conditional, along with concurrent condition")
+ .assertXPath("""empty($output//tei:ab[@xml:id="ab3"]/@jf:conditional) """, "@jf:conditional is not added when there is no condition")
+ .assertXPath("""empty($output//j:layer/@jf:conditional) """, "@jf:conditional is not added for j:layer")
+ .go
+ }
+
+ it("adds a phony layer with settings") {
+ xq("""
+ phony:phony-layer-document(
+ data:doc("original", "phony5"),
+ map {}
+ )
+ """)
+ .user("xqtest1")
+ .assertXPath("""count($output//j:concurrent/j:layer[@type="phony-set"])=1 """, "1 layer of type phony added")
+ .assertXPath("""count($output//j:layer/tei:div[contains(@jf:set, "#set2")])=2 """, "concurrent setting appears as an attribute on all divs in the layer")
+ .assertXPath("""count($output/*[contains(@jf:set, "#set2")][not(parent::j:layer)])=0 """, "concurrent setting does not appear as an attribute on any elements that are not direct descendents of j:layer")
+ .assertXPath("""every $ab in $output//tei:ab[@xml:id=("ab1","ab2")] satisfies $ab/@jf:set="#set1" """, "range reference results in @jf:set")
+ .assertXPath("""contains($output//tei:div[@xml:id="div2"]/@jf:set, "#set1") """, "direct reference results in @jf:set, along with concurrent condition")
+ .assertXPath("""empty($output//tei:ab[@xml:id="ab3"]/@jf:set) """, "@jf:set is not added when there is no condition")
+ .assertXPath("""empty($output//j:layer/@jf:set) """, "@jf:set is not added for j:layer")
+ .go
+ }
+
+ it("adds a phony layer for annotations") {
+ xq("""
+ phony:phony-layer-document(
+ data:doc("original", "phony6"),
+ map {}
+ )
+ """)
+ .user("xqtest1")
+ .assertXPath("""exists($output//j:concurrent[j:layer]) """, "new concurrent section added")
+ .assertXPath("""count($output//j:concurrent/j:layer[@type="phony-annotation"])=2 """, "2 layers of type phony-annotation added")
+ .assertXPath("""every $l in $output//j:concurrent/j:layer[@type="phony-annotation"] satisfies $l/@xml:id/string() """, "each of the layers has a @xml:id attribute")
+ .assertXPath("""not($output//j:concurrent/j:layer[@type='phony-annotation'][1]/@xml:id/string()=$output//j:concurrent/j:layer[@type="phony-annotation"][2]/@xml:id/string()) """, "the first layer has an xml:id that is different from the second")
+ .assertXPathEquals("$output//j:concurrent/j:layer[@type='phony-annotation'][1]/jf:annotation",
+ "one layer represents the note",
+ """
+
+ """)
+ .assertXPathEquals("$output//j:concurrent/j:layer[@type='phony-annotation'][2]/jf:instruction",
+ "one layer represents the instruction",
+ """
+
+ """)
+ .go
+ }
+ }
+}
\ No newline at end of file
diff --git a/opensiddur-extensions/src/test/scala/org/opensiddur/transforms/TestReverse.scala b/opensiddur-extensions/src/test/scala/org/opensiddur/transforms/TestReverse.scala
new file mode 100644
index 00000000..f3f97b28
--- /dev/null
+++ b/opensiddur-extensions/src/test/scala/org/opensiddur/transforms/TestReverse.scala
@@ -0,0 +1,92 @@
+package org.opensiddur.transforms
+
+import org.opensiddur.DbTest
+
+class TestReverse extends DbTest {
+ /** imports, namespaces and variables */
+ override val prolog: String =
+ """xquery version '3.1';
+
+ import module namespace reverse="http://jewishliturgy.org/transform/reverse"
+ at "xmldb:exist:///db/apps/opensiddur-server/transforms/reverse.xqm";
+ import module namespace tcommon="http://jewishliturgy.org/test/tcommon"
+ at "xmldb:exist:/db/apps/opensiddur-server/test/tcommon.xqm";
+
+ declare namespace tei="http://www.tei-c.org/ns/1.0";
+ declare namespace j="http://jewishliturgy.org/ns/jlptei/1.0";
+ declare namespace jf="http://jewishliturgy.org/ns/jlptei/flat/1.0";
+ """
+
+ override def beforeAll: Unit = {
+ super.beforeAll
+
+ setupUsers(1)
+ }
+
+ override def afterAll(): Unit = {
+ teardownUsers(1)
+
+ super.afterAll()
+ }
+
+ describe("reverse:reverse-document") {
+ it("reverses a document that only has a streamText") {
+ val document = readXmlFile("src/test/resources/transforms/Reverse/reverse1.xml")
+
+ xq(s"""reverse:reverse-document(
+ document { $document },
+ map {})""")
+ .assertXPath("""empty($output//*[@jf:id]) """, "No @jf:id attributes")
+ .assertXPath("""empty($output//*[@jf:stream]) """, "No @jf:stream attributes")
+ .assertXPath("""exists($output//j:streamText[@xml:id][tei:seg]) """, "A j:streamText exists")
+ .assertXPath("""count($output//j:streamText/*) = 3 and (every $child in $output//j:streamText/* satisfies exists($child/@xml:id)) """, "Every child of j:streamText has @xml:id")
+ .go
+ }
+
+ it("reverses a streamText and one layer to j:concurrent content that includes a layer") {
+ val document = readXmlFile("src/test/resources/transforms/Reverse/reverse2.xml")
+ val expected = readXmlFile("src/test/resources/transforms/Reverse/reverse2-reversed.xml")
+
+ xq(s"""reverse:reverse-document(
+ document { $document },
+ map {})/*""")
+ .assertXPath("""exists($output//j:concurrent) """, "A j:concurrent exists")
+ .assertXPath("""empty($output//jf:concurrent) """, "jf:concurrent does not exist")
+ .assertXmlEquals(expected)
+ .go
+ }
+
+ it("reverses streamText and concurrent layers to a j:concurrent that includes both layers") {
+ val document = readXmlFile("src/test/resources/transforms/Reverse/reverse3.xml")
+ val expected = readXmlFile("src/test/resources/transforms/Reverse/reverse3-reversed.xml")
+
+ xq(s"""reverse:reverse-document(
+ document { $document },
+ map {})/*""")
+ .assertXmlEquals(expected)
+ .go
+ }
+
+ it("reverses a layer with suspend/resume to a j:concurrent with a reconstituted suspended layer") {
+ val document = readXmlFile("src/test/resources/transforms/Reverse/reverse4.xml")
+ val expected = readXmlFile("src/test/resources/transforms/Reverse/reverse4-reversed.xml")
+
+ xq(s"""reverse:reverse-document(
+ document { $document },
+ map {})/*""")
+ .assertXmlEquals(expected)
+ .go
+ }
+
+ it("reverses concurrent layers with overlapping suspend/resume to a j:concurrent that includes the suspended layers") {
+ val document = readXmlFile("src/test/resources/transforms/Reverse/reverse5.xml")
+ val expected = readXmlFile("src/test/resources/transforms/Reverse/reverse5-reversed.xml")
+
+ xq(s"""reverse:reverse-document(
+ document { $document },
+ map {})/*""")
+ .assertXmlEquals(expected)
+ .go
+ }
+ }
+}
diff --git a/opensiddur-extensions/src/test/scala/org/opensiddur/transforms/TestSegment.scala b/opensiddur-extensions/src/test/scala/org/opensiddur/transforms/TestSegment.scala
new file mode 100644
index 00000000..81765d2d
--- /dev/null
+++ b/opensiddur-extensions/src/test/scala/org/opensiddur/transforms/TestSegment.scala
@@ -0,0 +1,58 @@
+package org.opensiddur.transforms
+
+import org.opensiddur.DbTest
+
+class TestSegment extends DbTest {
+ override val prolog: String =
+ """xquery version "3.1";
+
+import module namespace tcommon="http://jewishliturgy.org/test/tcommon"
+ at "xmldb:exist:/db/apps/opensiddur-server/test/tcommon.xqm";
+import module namespace segment="http://jewishliturgy.org/transform/segment"
+ at "xmldb:exist:/db/apps/opensiddur-server/transforms/segment.xqm";
+
+import module namespace deepequality="http://jewishliturgy.org/modules/deepequality"
+ at "xmldb:exist:/db/apps/opensiddur-server/modules/deepequality.xqm";
+
+declare namespace tei="http://www.tei-c.org/ns/1.0";
+declare namespace j="http://jewishliturgy.org/ns/jlptei/1.0";
+declare namespace jf="http://jewishliturgy.org/ns/jlptei/flat/1.0";
+ """
+
+ describe("segment:segment") {
+ it("is an identity transform with no streamText in the input") {
+ val inputData = readXmlFile("src/test/resources/transforms/no-streamtext-input.xml")
+
+ xq(s"""segment:segment($inputData)""")
+ .assertXmlEquals(inputData)
+ .go
+ }
+
+ it("segments text nodes inside the streamText") {
+ val streamTextInput = """
+ One text node
+
+ Another text node
+
+
+
+ has no xml:id
+ Space inside text
+ nodes is normalized.
+ """
+
+ val expectedOutput = """
+ One text node
+
+ Another text node
+
+ has no xml:id
+ Space inside text nodes is normalized.
+ """
+
+ xq(s"""segment:segment($streamTextInput)""")
+ .assertXmlEquals(expectedOutput)
+ .go
+ }
+ }
+}
diff --git a/opensiddur-extensions/src/test/scala/org/opensiddur/transforms/TestTranslit.scala b/opensiddur-extensions/src/test/scala/org/opensiddur/transforms/TestTranslit.scala
new file mode 100644
index 00000000..cf7e99ae
--- /dev/null
+++ b/opensiddur-extensions/src/test/scala/org/opensiddur/transforms/TestTranslit.scala
@@ -0,0 +1,309 @@
+package org.opensiddur.transforms
+
+import org.opensiddur.DbTest
+
+class TestTranslit extends DbTest {
+ val testTable = readXmlFile("src/test/resources/transforms/Translit/testtable.xml")
+
+ /** imports, namespaces and variables */
+ override val prolog: String =
+ s"""xquery version '3.1';
+
+ declare namespace tei="http://www.tei-c.org/ns/1.0";
+ declare namespace j="http://jewishliturgy.org/ns/jlptei/1.0";
+ declare namespace jf="http://jewishliturgy.org/ns/jlptei/flat/1.0";
+ declare namespace tr="http://jewishliturgy.org/ns/tr/1.0";
+
+ import module namespace translit="http://jewishliturgy.org/transform/transliterator"
+ at "xmldb:exist:/db/apps/opensiddur-server/transforms/translit/translit.xqm";
+ import module namespace tcommon="http://jewishliturgy.org/test/tcommon"
+ at "xmldb:exist:/db/apps/opensiddur-server/test/tcommon.xqm";
+
+ declare variable $$local:table := $testTable;
+ """
+
+ override def beforeAll: Unit = {
+ super.beforeAll
+
+ setupUsers(1)
+ }
+
+ override def afterAll(): Unit = {
+ teardownUsers(1)
+
+ super.afterAll()
+ }
+
+ describe("translit:transliterate-document") {
+ ignore("acts as an identity transform with no transliteration table") {
+ val noTranslitContext = readXmlFile("src/test/resources/transforms/Translit/no-translit-context.xml")
+
+ xq(
+ s"""let $$doc := document { $noTranslitContext }
+ return translit:transliterate-document($$doc, map {})/* """)
+ .user("xqtest1")
+ .assertXmlEquals(noTranslitContext)
+ .go
+ }
+ }
+
+ describe("translit:transliterate") {
+ it("provides a translation of a word") {
+ xq("""translit:transliterate(element tei:w { attribute { "n" }{ "2" }, text { "אֶפְרָיִם" }} , map { "translit:table" : $local:table//tr:table })""")
+ .assertXmlEquals("""ʾefrayim""")
+ .go
+ }
+
+ it("transliterates a patah genuva") {
+ xq("""translit:transliterate(element tei:w { text { "שַׂמֵחַ" }}, map { "translit:table" : $local:table//tr:table })""")
+ .assertXmlEquals("""sameyaḥ""")
+ .go
+ }
+
+ it("transliterates a sheva na") {
+ xq("""translit:transliterate(element tei:w { text { "בְּךָ" }}, map { "translit:table" : $local:table//tr:table })""")
+ .assertXmlEquals("""bəkha""")
+ .go
+ }
+
+ it("transliterates a sheva nakh") {
+ xq("""translit:transliterate(element tei:w { text { "בָּךְ" }}, map { "translit:table" : $local:table//tr:table })""")
+ .assertXmlEquals("""bakh""")
+ .go
+ }
+
+ it("transliterates a vowel letter") {
+ xq("""translit:transliterate(element tei:w { text { "בָּה" }}, map { "translit:table" : $local:table//tr:table })""")
+ .assertXmlEquals("""ba""")
+ .go
+ }
+
+ it("transliterates a vav-dagesh") {
+ xq("""translit:transliterate(element tei:w { text { "צִוָּה" }}, map { "translit:table" : $local:table//tr:table })""")
+ .assertXmlEquals("""tzivva""")
+ .go
+ }
+
+ it("transliterates a maleh vowel") {
+ xq("""translit:transliterate(element tei:w { text { "רִית" }}, map { "translit:table" : $local:table//tr:table })""")
+ .assertXmlEquals("""riyt""")
+ .go
+ }
+
+ it("transliterates a holam male") {
+ xq("""translit:transliterate(element tei:w { text{ "זוֹ" }}, map { "translit:table" : $local:table//tr:table })""")
+ .assertXmlEquals("""zo""")
+ .go
+ }
+
+ it("transliterates a shuruq") {
+ xq("""translit:transliterate(element tei:w { text { "זוּ" }}, map { "translit:table" : $local:table//tr:table })""")
+ .assertXmlEquals("""zu""")
+ .go
+ }
+
+ it("transliterates a dagesh hazak") {
+ xq("""translit:transliterate(element tei:w { text { "לַבַּל" }}, map { "translit:table" : $local:table//tr:table })""")
+ .assertXmlEquals("""labbal""")
+ .go
+ }
+
+ it("transliterates a dagesh kal") {
+ xq("""translit:transliterate(element tei:w { text { "בַּז" }}, map { "translit:table" : $local:table//tr:table })""")
+ .assertXmlEquals("""baz""")
+ .go
+ }
+
+ it("transliterates a silent letter") {
+ xq("""translit:transliterate(element tei:w { text { "רֹאשׁ" }}, map { "translit:table" : $local:table//tr:table })""")
+ .assertXmlEquals("""rosh""")
+ .go
+ }
+
+
+ it("transliterates a Tetragrammation (form 1)") {
+ xq("""translit:transliterate(element tei:w { text { "יְהוָה" }}, map { "translit:table" : $local:table//tr:table })""")
+ .assertXmlEquals("""ʾadonay""")
+ .go
+ }
+
+ it("transliterates a Tetragrammation (form 2)") {
+ xq("""translit:transliterate(element tei:w { text { "יֱהוִה" }}, map { "translit:table" : $local:table//tr:table })""")
+ .assertXmlEquals("""ʾelohim""")
+ .go
+ }
+
+ it("transliterates a Tetragrammation (form 3)") {
+ xq("""translit:transliterate(element tei:w { text { "יְיָ" }}, map { "translit:table" : $local:table//tr:table })""")
+ .assertXmlEquals("""ʾadonay""")
+ .go
+ }
+
+ it("transliterates a shin-dot+vowel") {
+ xq("""translit:transliterate(element tei:w { text { "שָׁ" }}, map { "translit:table" : $local:table//tr:table })""")
+ .assertXmlEquals("""sha""")
+ .go
+ }
+
+ it("transliterates a shin+dot+dagesh+vowel+consonant") {
+ xq("""translit:transliterate(element tei:w { text { "שָּׁב" }}, map { "translit:table" : $local:table//tr:table })""")
+ .assertXmlEquals("""shav""")
+ .go
+ }
+
+ it("transliterates a shin+dot+dagesh+vowel (no doubling)") {
+ xq("""translit:transliterate(element tei:w { text { "שָּׁ" }}, map { "translit:table" : $local:table//tr:table })""")
+ .assertXmlEquals("""sha""")
+ .go
+ }
+
+ it("transliterates a vav-holam haser for vav") {
+ xq("""translit:transliterate(element tei:w { text { "מִצְוֺת" }}, map { "translit:table" : $local:table//tr:table })""")
+ .assertXmlEquals("""mitzvot""")
+ .go
+ }
+
+ it("transliterates Unicode combined forms like the decomposed form") {
+ xq("""translit:transliterate(element tei:w { text { "אָבּוֹ" }}, map { "translit:table" : $local:table//tr:table })""")
+ .assertXmlEquals("""ʾabbo""")
+ .go
+ }
+ }
+
+ describe("translit:make-word-text") {
+ it("forms a structure when given consonants only") {
+ xq("""element ccs {
+ translit:make-word-text(text { "אב" }, map {})
+ }""")
+ .assertXmlEquals("""
+
+ א
+
+
+ ב
+
+ """)
+ .go
+ }
+
+ it("forms a complex consonant from consonants and vowels") {
+ xq("""element ccs {
+ translit:make-word-text(text { "אְבֱגַדָ" }, map {})
+ }""")
+ .assertXmlEquals("""
+ |
+ | א
+ | ְ
+ |
+ |
+ | ב
+ | ֱ
+ |
+ |
+ | ג
+ | ַ
+ |
+ |
+ | ד
+ | ָ
+ |
+ | """.stripMargin)
+ .go
+ }
+
+ it("makes a complex consonant structure from consonant+dagesh+vowel") {
+ xq("""element ccs {
+ | translit:make-word-text(text { "בָּ" }, map {})
+ | }""".stripMargin)
+ .assertXmlEquals("""
+ |
+ | ב
+ | ּ
+ | ָ
+ |
+ | """.stripMargin)
+ .go
+ }
+
+ it("forms a complex consonant structure from shin+dot+dagesh+vowel") {
+ xq("""element ccs {
+ | translit:make-word-text(text { "שָּׁ" }, map {})
+ | }""".stripMargin)
+ .assertXmlEquals("""
+ |
+ | ש
+ | ׁ
+ | ּ
+ | ָ
+ |
+ | """.stripMargin)
+ .go
+ }
+
+ it("forms a complex consonant strucure from shin+dot+rafe+vowel") {
+ xq("""element ccs {
+ | translit:make-word-text(text { "שָֿׁ" }, map {})
+ | }""".stripMargin)
+ .assertXmlEquals("""
+ |
+ | ש
+ | ׁ
+ | ֿ
+ | ָ
+ |
+ | """.stripMargin)
+ .go
+ }
+
+ it("forms a complex character structure if thrown the kitchen sink shin+dot+dagesh+vowel+meteg+lower accent") {
+ xq("""element ccs {
+ | translit:make-word-text(text { "שָּֽׁ֥" }, map {})
+ | }""".stripMargin)
+ .assertXmlEquals("""
+ |
+ | ש
+ | ׁ
+ | ּ
+ | ָ
+ | ֽ
+ | ֥
+ |
+ | """.stripMargin)
+ .go
+ }
+
+ it("""forms a complex character if thrown the kitchen sink 2 (shin+dot+dagesh+vowel+meteg+mid accent)""") {
+ xq("""element ccs {
+ | translit:make-word-text(text { "שָּֽׁ֭" }, map {})
+ | }""".stripMargin)
+ .assertXmlEquals("""
+ |
+ | ש
+ | ׁ
+ | ּ
+ | ָ
+ | ֽ
+ | ֭
+ |
+ | """.stripMargin)
+ .go
+ }
+
+ it("forms a complex character when thrown the kitchen sink 3 (shin+dot+dagesh+vowel+meteg+upper accent)") {
+ xq("""element ccs {
+ | translit:make-word-text(text { "שָּֽׁ֨" }, map {})
+ | }""".stripMargin)
+ .assertXmlEquals("""
+ |
+ | ש
+ | ׁ
+ | ּ
+ | ָ
+ | ֽ
+ | ֨
+ |
+ | """.stripMargin)
+ .go
+ }
+ }
+}
diff --git a/opensiddur-extensions/src/test/scala/org/opensiddur/transforms/TestUnflatten.scala b/opensiddur-extensions/src/test/scala/org/opensiddur/transforms/TestUnflatten.scala
new file mode 100644
index 00000000..0ba8cd05
--- /dev/null
+++ b/opensiddur-extensions/src/test/scala/org/opensiddur/transforms/TestUnflatten.scala
@@ -0,0 +1,241 @@
+package org.opensiddur.transforms
+
+import org.opensiddur.DbTest
+
+class TestUnflatten extends DbTest {
+ override val prolog =
+ """xquery version '3.1';
+
+declare namespace tei="http://www.tei-c.org/ns/1.0";
+declare namespace j="http://jewishliturgy.org/ns/jlptei/1.0";
+declare namespace jf="http://jewishliturgy.org/ns/jlptei/flat/1.0";
+
+import module namespace magic="http://jewishliturgy.org/magic"
+ at "xmldb:exist:/db/apps/opensiddur-server/magic/magic.xqm";
+import module namespace tcommon="http://jewishliturgy.org/test/tcommon"
+ at "xmldb:exist:/db/apps/opensiddur-server/test/tcommon.xqm";
+
+import module namespace unflatten="http://jewishliturgy.org/transform/unflatten"
+ at "xmldb:exist:///db/apps/opensiddur-server/transforms/unflatten.xqm";
+import module namespace format="http://jewishliturgy.org/modules/format"
+ at "xmldb:exist:///db/apps/opensiddur-server/modules/format.xqm";
+
+ """
+
+ override def beforeAll: Unit = {
+ super.beforeAll
+ setupUsers(1)
+ setupResource("src/test/resources/transforms/unflatten-order-bug.xml", "unflatten-order-bug", "original", 1, Some("en"))
+ setupResource("src/test/resources/transforms/unflatten-parA.xml", "unflatten-parA", "original", 1, Some("en"))
+ setupResource("src/test/resources/transforms/unflatten-parB.xml", "unflatten-parB", "original", 1, Some("en"))
+ setupResource("src/test/resources/transforms/unflatten-par.xml", "unflatten-par", "linkage", 1)
+ }
+
+ override def afterAll(): Unit = {
+ teardownResource("unflatten-par", "linkage", 1)
+ teardownResource("unflatten-parA", "original", 1)
+ teardownResource("unflatten-parB", "original", 1)
+ teardownResource("unflatten-order-bug", "original", 1)
+ teardownUsers(1)
+ super.afterAll()
+ }
+
+ describe("unflatten:unopened-tags") {
+ it("produces no output for no unopened tags") {
+ xq(
+ """unflatten:unopened-tags(
+ (
+
+
+ Label
+
+
+ )/*)""")
+ .assertEmpty
+ .go
+ }
+
+ it("returns the ended element one ended unopened tag") {
+ xq(
+ """unflatten:unopened-tags(
+ (
+ Label
+
+ )/*)""")
+ .assertXmlEquals(
+ """""".stripMargin)
+ .go
+ }
+
+ it("returns the suspended element for a suspended unopened tag") {
+ xq(
+ """unflatten:unopened-tags(
+ (
+ Label
+
+ )/*)""")
+ .assertXmlEquals(
+ """""".stripMargin)
+ .go
+ }
+ }
+
+ describe("unflatten:unclosed-tags") {
+ it("returns empty on no unclosed tags") {
+ xq("""let $tags :=
+
+
+
+ Label
+
+
+
+ return
+ unflatten:unclosed-tags(
+ $tags/*
+ )""")
+ .assertEmpty
+ .go
+ }
+
+ it("returns the started element when there is one unclosed tag") {
+ xq("""let $tags :=
+
+
+ Label
+
+ return
+ unflatten:unclosed-tags(
+ $tags/*
+ )""")
+ .assertXmlEquals("""""".stripMargin)
+ .go
+ }
+
+ it("it returns the continued element when there is a continued unclosed tag") {
+ xq("""let $tags :=
+
+
+ Label
+
+ return
+ unflatten:unclosed-tags(
+ $tags/*
+ )""")
+ .assertXmlEquals("""""".stripMargin)
+ .go
+ }
+ }
+
+ describe("unflatten:unflatten-document") {
+ it("unflattens a simple hierarchy") {
+ val simpleDocument = readXmlFile("src/test/resources/transforms/unflatten1.xml")
+ val unflattenedDocument = readXmlFile("src/test/resources/transforms/unflatten1-unflat.xml")
+
+ xq(s"""unflatten:unflatten-document(document { $simpleDocument }, map {})/*""")
+ .assertXmlEquals(unflattenedDocument)
+ .go
+ }
+
+ it("unflattens a hierarchy with 2 levels with siblings") {
+ val hierDocument = readXmlFile("src/test/resources/transforms/unflatten2.xml")
+ val unflattenedDocument = readXmlFile("src/test/resources/transforms/unflatten2-unflat.xml")
+
+ xq(s"""unflatten:unflatten-document(document { $hierDocument }, map {})/*""")
+ .assertXmlEquals(unflattenedDocument)
+ .go
+ }
+
+ it("unflattens a hierarchy with suspend and continue") {
+ val hierDocument = readXmlFile("src/test/resources/transforms/unflatten3.xml")
+ val unflattenedDocument = readXmlFile("src/test/resources/transforms/unflatten3-unflat.xml")
+
+ xq(s"""unflatten:unflatten-document(document { $hierDocument }, map {})/*""")
+ .assertXmlEquals(unflattenedDocument)
+ .go
+ }
+
+ it("unflattens multiple hierarchies with a broken up element") {
+ val hierDocument = readXmlFile("src/test/resources/transforms/unflatten4.xml")
+ val unflattenedDocument = readXmlFile("src/test/resources/transforms/unflatten4-unflat.xml")
+
+ xq(s"""unflatten:unflatten-document(document { $hierDocument }, map {})/*""")
+ .assertXmlEquals(unflattenedDocument)
+ .go
+ }
+ }
+
+ describe("format:unflatten") {
+ it("works correctly when an element is repeated (regression test)") {
+
+ xq(
+ """let $d := doc("/db/data/original/en/unflatten-order-bug.xml")
+ return format:unflatten($d, map {}, $d)/*""")
+ .assertXPath("""empty($output//tei:head[ancestor::tei:ab])""", "tei:head is not a descendant of tei:ab")
+ .assertXPath("""empty($output//tei:ab[@jf:id="ab2"][ancestor::tei:ab[@jf:id="ab2"]])""", "tei:ab[id=ab2] is not a descendant of itself")
+ .go
+ }
+
+ it("unflattens a parallel document") {
+ xq("""let $d := doc("/db/data/linkage/unflatten-par.xml")
+ return format:unflatten($d, map {}, $d)""")
+ .assertXPath("""count($output//tei:TEI[contains(@jf:document, '/unflatten-parA')]//jf:unflattened//tei:p[@jf:id="p1"][count(descendant::tei:seg)=3]/ancestor::jf:parallel)=1""",
+ "p1 is entirely contained in a single parallel element")
+ .assertXPath("""
+ let $p := $output//tei:TEI[contains(@jf:document, '/unflatten-parA')]//jf:unflattened//tei:p[@jf:part="p2"]
+ return
+ count($p)=2
+ and not($p[1]/ancestor::jf:parallel)
+ and $p[1]/descendant::tei:seg[@jf:id="A4"]
+ and count($p[2]/ancestor::jf:parallel)=1
+ and $p[2]/count(descendant::tei:seg)=2
+ and $p[1]/@jf:part
+ and $p[2]/@jf:part
+ """, "p2 (break at beginning) is partially contained outside parallel and partially inside it")
+ .assertXPath("""
+ let $p := $output//tei:TEI[contains(@jf:document, '/unflatten-parA')]//jf:unflattened//tei:p[@jf:part="p3"]
+ return
+ count($p)=2
+ and count($p[1]/ancestor::jf:parallel)=1
+ and count($p[1]/descendant::tei:seg)=2
+ and count($p[2]/ancestor::jf:parallel)=0
+ and count($p[2]/descendant::tei:seg)=1
+ and $p[1]/@jf:part
+ and $p[2]/@jf:part
+ """, "p3 (break at end) is partially contained outside parallel and partially inside it")
+ .assertXPath("""
+ let $p := $output//tei:TEI[contains(@jf:document, '/unflatten-parA')]//jf:unflattened//tei:p[@jf:part="p4"]
+ return
+ count($p)=3
+ and $p[1]/descendant::tei:seg/@jf:id="A10"
+ and count($p[2]/descendant::tei:seg)=2
+ and count($p[2]/ancestor::jf:parallel)=1
+ and $p[3]/descendant::tei:seg/@jf:id="A13"
+ and (every $pp in $p satisfies $pp/@jf:part)
+ """, "p4 (break at beginning and end) is partially contained outside parallel and partially inside it")
+ .assertXPath("""
+ let $p := $output//tei:TEI[contains(@jf:document, '/unflatten-parA')]//jf:unflattened//tei:p[@jf:part="p5"]
+ return
+ count($p)=2
+ and (every $pp in $p satisfies count($pp/ancestor::jf:parallel)=1 and count($pp/ancestor::jf:parallelGrp)=1)
+ and not($p[1]/ancestor::jf:parallelGrp is $p[2]/ancestor::jf:parallelGrp)
+ and count($p[1]/descendant::tei:seg)=2
+ and count($p[2]/descendant::tei:seg)=2
+ and (every $pp in $p satisfies $pp/@jf:part)
+ """, "p5 (broken up in the middle) is entirely contained within 2 parallel groups")
+ .go
+ }
+ }
+
+
+}
diff --git a/opensiddur-server/build.xml b/opensiddur-server/build.xml
new file mode 100644
index 00000000..2faef45f
--- /dev/null
+++ b/opensiddur-server/build.xml
@@ -0,0 +1,211 @@
+
+
+ Build file for opensiddur-server
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/setup/exclude b/opensiddur-server/setup/exclude
similarity index 100%
rename from setup/exclude
rename to opensiddur-server/setup/exclude
diff --git a/opensiddur-server/setup/install.exp b/opensiddur-server/setup/install.exp
new file mode 100644
index 00000000..55f69fcc
--- /dev/null
+++ b/opensiddur-server/setup/install.exp
@@ -0,0 +1,25 @@
+#!/usr/bin/expect -f
+set installer [lindex $argv 0]
+set install_path [lindex $argv 1]
+set password [lindex $argv 2]
+
+spawn java -jar "$installer" -console
+
+expect "Select target path" { send "$install_path\r" }
+
+expect "3 to redisplay" { send "1\r" }
+
+expect "Set Data Directory" { send "\r" }
+
+expect "press 1 to continue" { send "1\r" }
+
+expect "Enter password:" { send "$password\r" }
+expect "Enter password:" { send "$password\r" }
+
+expect "Maximum memory in mb:" { send "2048\r" }
+
+expect "Cache memory in mb:" { send "256\r" }
+
+expect "3 to redisplay" { send "1\r" }
+
+interact
diff --git a/setup/makedb.py b/opensiddur-server/setup/makedb.py
similarity index 96%
rename from setup/makedb.py
rename to opensiddur-server/setup/makedb.py
index dfd7f2af..d89a73ab 100755
--- a/setup/makedb.py
+++ b/opensiddur-server/setup/makedb.py
@@ -13,7 +13,7 @@
# An override file can also be used to exclude files by regular expression
#
# Open Siddur Project
-# Copyright 2010-2012 Efraim Feinstein
+# Copyright 2010-2013 Efraim Feinstein
# Licensed under the GNU Lesser General Public License, version 3 or later
#
import sys
@@ -150,6 +150,9 @@ def buildCollection(srcDirectory, destCollection, default, mimeDict, excludeRE):
# using xmlns attribute to avoid auto-prefixing
contentsXml = etree.Element('collection', {'name':destCollection, 'version':'1',
'mode':props.permissions, 'owner':props.user, 'group':props.group, 'created':directoryCtime, 'xmlns':exNS})
+ # add acl entry (or lack thereof)
+ etree.SubElement(contentsXml, "acl", {"entries":"0", "version":"1" })
+
contentsXmlTree = etree.ElementTree(contentsXml)
for fname in os.listdir(srcDirectory):
@@ -190,10 +193,11 @@ def buildCollection(srcDirectory, destCollection, default, mimeDict, excludeRE):
# add resource to contentsXml
# TODO: namedoctype, publicid, systemid
- etree.SubElement(contentsXml, 'resource', {'filename':unicode(fname,'utf-8'),
+ resourceElement = etree.SubElement(contentsXml, 'resource', {'filename':unicode(fname,'utf-8'),
'name':unicode(fname,'utf-8'),
'owner':props.user, 'group':props.group, 'mode':props.permissions,
'mimetype':fMime, 'type':fType, 'created':fCtime, 'modified':fMtime})
+ etree.SubElement(resourceElement, "acl", {"entries":"0", "version":"1" })
# write the contentsXml file
unindented = etree.tostring(contentsXml)
diff --git a/opensiddur-server/setup/nginx-dev.conf b/opensiddur-server/setup/nginx-dev.conf
new file mode 100644
index 00000000..3a1dc0c4
--- /dev/null
+++ b/opensiddur-server/setup/nginx-dev.conf
@@ -0,0 +1,93 @@
+# header helpers for reverse proxied servers
+proxy_set_header Host $host;
+# Ensures the actual hostname is sent to eXist-db and not 'localhost' (needed in
+# eXist-db for server-name in controller-config.xml)
+proxy_set_header X-Real-IP $remote_addr;
+# The Real IP of the client and not the IP of nginx proxy
+proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
+proxy_set_header nginx-request-uri $request_uri;
+
+server {
+ listen 80;
+ server_name app.jewishliturgy.org app.opensiddur.org;
+ return 301 https://$server_name$request_uri;
+}
+
+server {
+ ## CHANGE: only listen on local, port 5000
+ listen 443 ssl;
+ server_name app.jewishliturgy.org app.opensiddur.org;
+ charset utf-8;
+
+ ## use the Google resolver
+ resolver 8.8.8.8;
+
+ ## timeouts
+ proxy_connect_timeout 600;
+ proxy_send_timeout 600;
+ proxy_read_timeout 600;
+ send_timeout 600;
+
+
+ ## CHANGE: change this to the root directory of your opensiddur-client sources
+ root /usr/local/opensiddur-client;
+
+ location /api {
+ if ($request_method = 'OPTIONS' ) {
+ add_header Access-Control-Allow-Origin $http_origin;
+ add_header Access-Control-Allow-Methods "GET, PUT, POST, DELETE, OPTIONS";
+ add_header Access-Control-Allow-Headers "Authorization";
+ add_header Access-Control-Allow-Credentials "true";
+ add_header Content-Length 0;
+ add_header Content-Type text/plain;
+ return 200;
+ }
+ proxy_pass $scheme://127.0.0.1:8080/exist/restxq$request_uri;
+ proxy_intercept_errors on;
+ ## remap 401 to 418 so the browser doesn't get upset and pop up a user/pass dialog
+ if ($status = 401) {
+ return 418 'Unauthorized';
+ }
+ add_header 'Access-Control-Allow-Origin' $http_origin;
+ add_header 'Access-Control-Allow-Credentials' 'true';
+ add_header 'Access-Control-Allow-Headers' 'Content-Type,Accept,Authorization,X-HTTP-Method-Override,DNT,X-Mx-ReqToken,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control';
+ add_header 'Access-Control-Allow-Methods' 'GET, POST, OPTIONS, PUT, DELETE';
+ }
+
+ ## proxy pass to the dev server ##
+ location /exist/restxq/api {
+ ##CHANGE: choose a server
+ ## to use the dev server, uncomment this line and comment the one below:
+ ##proxy_pass http://app.jewishliturgy.org:8080;
+
+ ## to use a local server, uncomment this line and comment the one above:
+ proxy_pass $scheme://127.0.0.1:8080$request_uri;
+
+ proxy_intercept_errors on;
+ ## remap 401 to 418 so the browser doesn't get upset and pop up a user/pass dialog
+ if ($status = 401) {
+ return 418 'Unauthorized';
+ }
+ }
+
+ location /apps {
+ proxy_pass $scheme://127.0.0.1:8080/exist$request_uri;
+ proxy_intercept_errors on;
+ }
+
+
+ ## everything else, config from http://java.dzone.com/articles/html5angularjsnginx-crawlable
+ ## point directly to index.html for no URL path
+ ##location = / {
+ ## index index.html;
+ ##}
+
+ ## point to the controller for everything else
+ location / {
+ expires -1;
+ add_header Pragma "no-cache";
+ add_header Cache-Control "no-store, no-cache, must-revalidate, post-check=0, pre-check=0";
+ try_files $uri $uri/ /index.html =404;
+ }
+}
+
diff --git a/opensiddur-server/setup/nginx-docker.conf b/opensiddur-server/setup/nginx-docker.conf
new file mode 100644
index 00000000..586fbb28
--- /dev/null
+++ b/opensiddur-server/setup/nginx-docker.conf
@@ -0,0 +1,79 @@
+# nginx reverse proxy setup for inside docker
+# header helpers for reverse proxied servers
+proxy_set_header Host $host;
+# Ensures the actual hostname is sent to eXist-db and not 'localhost' (needed in
+# eXist-db for server-name in controller-config.xml)
+proxy_set_header X-Real-IP $remote_addr;
+# The Real IP of the client and not the IP of nginx proxy
+proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
+proxy_set_header nginx-request-uri $request_uri;
+
+# the Accept header from chrome does not play well with eXist https://github.com/eXist-db/exist/issues/1698
+proxy_set_header Accept '*/*';
+
+server {
+ listen 80;
+ server_name localhost;
+ charset utf-8;
+
+ ## use the Google resolver
+ resolver 8.8.8.8;
+
+ ## timeouts
+ proxy_connect_timeout 600;
+ proxy_send_timeout 600;
+ proxy_read_timeout 600;
+ send_timeout 600;
+
+
+ ## CHANGE: change this to the root directory of your opensiddur-client sources
+ root /usr/local/opensiddur-client;
+
+ location /api {
+ if ($request_method = 'OPTIONS' ) {
+ add_header Access-Control-Allow-Origin $http_origin;
+ add_header Access-Control-Allow-Methods "GET, PUT, POST, DELETE, OPTIONS";
+ add_header Access-Control-Allow-Headers "Authorization";
+ add_header Access-Control-Allow-Credentials "true";
+ add_header Content-Length 0;
+ add_header Content-Type text/plain;
+ return 200;
+ }
+ proxy_pass $scheme://127.0.0.1:8080/exist/restxq$request_uri;
+ proxy_intercept_errors on;
+ ## remap 401 to 418 so the browser doesn't get upset and pop up a user/pass dialog
+ if ($status = 401) {
+ return 418 'Unauthorized';
+ }
+ add_header 'Access-Control-Allow-Origin' $http_origin;
+ add_header 'Access-Control-Allow-Credentials' 'true';
+ add_header 'Access-Control-Allow-Headers' 'Content-Type,Accept,Authorization,X-HTTP-Method-Override,DNT,X-Mx-ReqToken,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control';
+ add_header 'Access-Control-Allow-Methods' 'GET, POST, OPTIONS, PUT, DELETE';
+ }
+
+ ## proxy pass to the dev server ##
+ location /exist/restxq/api {
+ ## to use a local server, uncomment this line and comment the one above:
+ proxy_pass $scheme://127.0.0.1:8080$request_uri;
+
+ proxy_intercept_errors on;
+ ## remap 401 to 418 so the browser doesn't get upset and pop up a user/pass dialog
+ if ($status = 401) {
+ return 418 'Unauthorized';
+ }
+ }
+
+ location /apps {
+ proxy_pass $scheme://127.0.0.1:8080/exist$request_uri;
+ proxy_intercept_errors on;
+ }
+
+ ## point to the controller for everything else
+ location / {
+ expires -1;
+ add_header Pragma "no-cache";
+ add_header Cache-Control "no-store, no-cache, must-revalidate, post-check=0, pre-check=0";
+ try_files $uri $uri/ /index.html =404;
+ }
+}
+
diff --git a/opensiddur-server/setup/nginx-site.conf b/opensiddur-server/setup/nginx-site.conf
new file mode 100644
index 00000000..db5df308
--- /dev/null
+++ b/opensiddur-server/setup/nginx-site.conf
@@ -0,0 +1,44 @@
+# header helpers for reverse proxied servers
+proxy_set_header Host $host;
+# Ensures the actual hostname is sent to eXist-db and not 'localhost' (needed in
+# eXist-db for server-name in controller-config.xml)
+proxy_set_header X-Real-IP $remote_addr;
+# The Real IP of the client and not the IP of nginx proxy
+proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
+proxy_set_header nginx-request-uri $request_uri;
+
+server {
+ listen 8088;
+ server_name localhost;
+ charset utf-8;
+ access_log /var/log/nginx/access.log;
+ # timeouts
+ proxy_connect_timeout 600;
+ proxy_send_timeout 600;
+ proxy_read_timeout 600;
+ send_timeout 600;
+
+
+ location /api {
+ if ($request_method = 'OPTIONS' ) {
+ add_header Access-Control-Allow-Origin $http_origin;
+ add_header Access-Control-Allow-Methods "GET, PUT, POST, DELETE, OPTIONS";
+ add_header Access-Control-Allow-Headers "Authorization";
+ add_header Access-Control-Allow-Credentials "true";
+ add_header Content-Length 0;
+ add_header Content-Type text/plain;
+ return 200;
+ }
+ proxy_pass http://localhost:8080/exist/restxq/api;
+ #include /etc/nginx/conf.d/proxy.conf;
+ add_header 'Access-Control-Allow-Origin' $http_origin;
+ add_header 'Access-Control-Allow-Credentials' 'true';
+ add_header 'Access-Control-Allow-Headers' 'Content-Type,Accept,Authorization,X-HTTP-Method-Override,DNT,X-Mx-ReqToken,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control';
+ add_header 'Access-Control-Allow-Methods' 'GET, POST, OPTIONS, PUT, DELETE';
+ }
+
+ location / {
+ proxy_pass http://localhost:8080;
+ }
+}
+
diff --git a/opensiddur-server/src/api/changes.xqm b/opensiddur-server/src/api/changes.xqm
new file mode 100644
index 00000000..f2a0ab15
--- /dev/null
+++ b/opensiddur-server/src/api/changes.xqm
@@ -0,0 +1,119 @@
+xquery version "3.1";
+(:~ API module for recent changes
+ :
+ : Copyright 2014 Efraim Feinstein
+ : Open Siddur Project
+ : Licensed Under the GNU Lesser General Public License, version 3 or later
+ :)
+module namespace chg = 'http://jewishliturgy.org/api/changes';
+
+import module namespace api="http://jewishliturgy.org/modules/api"
+ at "../modules/api.xqm";
+import module namespace data="http://jewishliturgy.org/modules/data"
+ at "../modules/data.xqm";
+
+
+declare namespace tei="http://www.tei-c.org/ns/1.0";
+declare namespace o="http://a9.com/-/spec/opensearch/1.1/";
+declare namespace rest="http://exquery.org/ns/restxq";
+declare namespace output="http://www.w3.org/2010/xslt-xquery-serialization";
+
+declare function chg:get-recent-changes(
+ $type as xs:string?,
+ $by as xs:string?,
+ $from as xs:string?,
+ $to as xs:string?
+ ) as node()* {
+ let $username := $by
+ let $c := collection(string-join((
+ "/db/data",
+ $type[.]
+ ), "/"))
+ return
+ (: all empty :)
+ if (empty($by) and empty($from) and empty($to))
+ then $c//tei:change
+ (: $by empty :)
+ else if (empty($by) and empty($to))
+ then $c//tei:change[@when ge $from]
+ else if (empty($by) and empty($from))
+ then $c//tei:change[@when le $to]
+ else if (empty($by))
+ then $c//tei:change[@when ge $from][@when le $to]
+ (: $from empty :)
+ else if (empty($from) and empty($to))
+ then $c//tei:change[@who="/user/" || $username]
+ else if (empty($from))
+ then $c//tei:change[@who="/user/" || $username][@when le $to]
+ (: $to empty :)
+ else if (empty($to))
+ then $c//tei:change[@who="/user/" || $username][@when ge $from]
+ (: no empty :)
+ else $c//tei:change[@who="/user/" || $username][@when ge $from][@when le $to]
+};
+
+(:~ List all recent changes
+ : @param $by List only changes made by the given user. List all users if omitted.
+ : @param $from List only changes made on or after the given date/time. No restriction if omitted. The expected format is yyyy-mm-ddThh:mm:ss, where any of the smaller sized components are optional.
+ : @param $to List only changes made on or before the given date/time. No restriction if omitted.
+ : @param $start Start the list from the given index
+ : @param $max-results List only this many results
+ : @return An HTML list
+ :)
+declare
+ %rest:GET
+ %rest:path("/api/changes")
+ %rest:query-param("type", "{$type}")
+ %rest:query-param("by", "{$by}")
+ %rest:query-param("from", "{$from}")
+ %rest:query-param("to", "{$to}")
+ %rest:query-param("start", "{$start}", 1)
+ %rest:query-param("max-results", "{$max-results}", 100)
+ %rest:produces("application/xhtml+xml", "text/html", "application/xml", "text/xml")
+ function chg:list(
+ $type as xs:string*,
+ $by as xs:string*,
+ $from as xs:string*,
+ $to as xs:string*,
+ $start as xs:integer*,
+ $max-results as xs:integer*
+ ) as item()+ {
+ if ($type and not($type=("original", "conditionals", "sources", "notes", "styles", "dictionaries", "linkage", "transliteration")))
+ then
+ api:rest-error(400, "Invalid type", $type)
+ else (
+
+
+ xhtml
+
+ ,
+ { ((: xmlns="http://www.w3.org/1999/xhtml"> :)) }
+
+ Recent changes
+
+
+
+
{
+ for $change in
+ subsequence(
+ for $ch in chg:get-recent-changes($type[.][1], $by[.][1], $from[.][1], $to[.][1])
+ order by $ch/@when/string() descending
+ return $ch, ($start, 1)[1], ($max-results, 100)[1])
+ group by $doc := document-uri(root($change))
+ order by max($change/@when/string()) descending
+ return
+
+
+
+ )
+};
diff --git a/opensiddur-server/src/api/data/conditionals.xqm b/opensiddur-server/src/api/data/conditionals.xqm
new file mode 100644
index 00000000..667efa52
--- /dev/null
+++ b/opensiddur-server/src/api/data/conditionals.xqm
@@ -0,0 +1,385 @@
+xquery version "3.1";
+(: Copyright 2012-2013,2016-2017 Efraim Feinstein
+ : Licensed under the GNU Lesser General Public License, version 3 or later
+ :)
+(:~ Conditional data API
+ : @author Efraim Feinstein
+ :)
+
+module namespace cnd = 'http://jewishliturgy.org/api/data/conditionals';
+
+declare namespace tei="http://www.tei-c.org/ns/1.0";
+declare namespace j="http://jewishliturgy.org/ns/jlptei/1.0";
+declare namespace r="http://jewishliturgy.org/ns/results/1.0";
+declare namespace output="http://www.w3.org/2010/xslt-xquery-serialization";
+declare namespace rest="http://exquery.org/ns/restxq";
+
+import module namespace api="http://jewishliturgy.org/modules/api"
+ at "../../modules/api.xqm";
+import module namespace crest="http://jewishliturgy.org/modules/common-rest"
+ at "../../modules/common-rest.xqm";
+import module namespace data="http://jewishliturgy.org/modules/data"
+ at "../../modules/data.xqm";
+import module namespace orig="http://jewishliturgy.org/api/data/original"
+ at "original.xqm";
+import module namespace paths="http://jewishliturgy.org/modules/paths"
+ at "../../modules/paths.xqm";
+
+declare variable $cnd:data-type := "conditionals";
+declare variable $cnd:schema := concat($paths:schema-base, "/conditional.rnc");
+declare variable $cnd:schematron := concat($paths:schema-base, "/conditional.xsl");
+declare variable $cnd:path-base := concat($data:path-base, "/", $cnd:data-type);
+declare variable $cnd:api-path-base := concat("/api/data/", $cnd:data-type);
+
+(:~ special validation for conditionals
+ : @param $doc The document to be validated
+ : @param $old-doc The document it is replacing, if any
+ : @return A report element, indicating validity
+ :)
+declare function cnd:validate-conditionals(
+ $doc as item(),
+ $old-doc as document-node()?
+ ) as element() {
+ let $types-declared := $doc//tei:fsDecl/@type/string()
+ let $messages :=
+ for $fs-declaration in
+ collection($cnd:path-base)[not(. is $old-doc)]//
+ tei:fsDecl[@type=$types-declared]
+ return
+ Type '{$fs-declaration/@type/string()}' is already declared in {crest:tei-title-function($fs-declaration)}
+ $old-doc={exists($old-doc)}={document-uri($old-doc)}
+ root($fs-declaration)={document-uri(root($fs-declaration))}
+
+ let $is-valid := empty($messages)
+ return
+
+ {
+ if ($is-valid)
+ then "valid"
+ else "invalid"
+ }
+ {$messages}
+
+};
+
+(:~ validate
+ : @param $doc The document to be validated
+ : @param $old-doc The document it is replacing, if any
+ : @return true() if valid, false() if not
+ : @see lnk:validate-report
+ :)
+declare function cnd:validate(
+ $doc as item(),
+ $old-doc as document-node()?
+ ) as xs:boolean {
+ crest:validate(
+ $doc, $old-doc,
+ xs:anyURI($cnd:schema), xs:anyURI($cnd:schematron),
+ (
+ cnd:validate-conditionals#2,
+ if (exists($old-doc)) then orig:validate-changes#2 else ()
+ )
+ )
+};
+
+(:~ validate, returning a validation report
+ : @param $doc The document to be validated
+ : @param $old-doc The document it is replacing, if any
+ : @return true() if valid, false() if not
+ : @see lnk:validate
+ :)
+declare function cnd:validate-report(
+ $doc as item(),
+ $old-doc as document-node()?
+ ) as element() {
+ crest:validate-report(
+ $doc, $old-doc,
+ xs:anyURI($cnd:schema), xs:anyURI($cnd:schematron),
+ (
+ cnd:validate-conditionals#2,
+ if (exists($old-doc)) then orig:validate-changes#2 else ()
+ )
+ )
+};
+
+(:~ Get a conditional declaration document by name
+ : @param $name Document name as a string
+ : @error HTTP 404 Not found (or not available)
+ :)
+declare
+ %rest:GET
+ %rest:path("/api/data/conditionals/{$name}")
+ %rest:produces("application/xml", "text/xml", "application/tei+xml")
+ function cnd:get(
+ $name as xs:string
+ ) as item()+ {
+ crest:get($cnd:data-type, $name)
+};
+
+declare function cnd:list(
+ $q as xs:string*,
+ $start as xs:integer*,
+ $max-results as xs:integer*
+ ) as item()+ {
+ cnd:list($q, $start, $max-results, (), ())
+};
+
+declare function cnd:list(
+ $q as xs:string*,
+ $start as xs:integer*,
+ $max-results as xs:integer*,
+ $decls-only as xs:string*
+) as item()+ {
+ cnd:list($q, $start, $max-results, $decls-only, ())
+};
+
+(:~ List or full-text query conditionals data.
+ : Querying conditionals data will search for titles and
+ : feature/feature structure descriptions
+ : @param $q text of the query, empty string for all
+ : @param $start first document to list
+ : @param $max-results number of documents to list
+ : @param $decls-only return matching declarations only, not the whole file
+ : @param $types-only return (exact) matching types only
+ : @return a list of documents (or declarations, as XML) that match the search. If the documents match a query, return the context.
+ : @error HTTP 404 Not found
+ :)
+declare
+ %rest:GET
+ %rest:path("/api/data/conditionals")
+ %rest:query-param("q", "{$q}", "")
+ %rest:query-param("start", "{$start}", 1)
+ %rest:query-param("max-results", "{$max-results}", 100)
+ %rest:query-param("decls-only", "{$decls-only}", "false")
+ %rest:query-param("types-only", "{$types-only}", "false")
+ %rest:produces("application/xhtml+xml", "application/xml", "text/xml", "text/html")
+ %output:method("xhtml")
+ function cnd:list(
+ $q as xs:string*,
+ $start as xs:integer*,
+ $max-results as xs:integer*,
+ $decls-only as xs:string*,
+ $types-only as xs:string*
+ ) as item()+ {
+ if (xs:boolean($decls-only) or xs:boolean($types-only))
+ then
+ cnd:list-definitions($q[1], $start[1], $max-results[1], xs:boolean($types-only))
+ else
+ crest:list($q, $start, $max-results,
+ "Conditional declaration data API", api:uri-of($cnd:api-path-base),
+ cnd:query-function#1, cnd:list-function#0,
+ (
+ $crest:additional-validate
+ ), (: conditionals should not support access restrictions? :)
+ ()
+ )
+};
+
+(:~
+ : return all relevant search results
+ : if searching for specific feaures, extract the features from matching feature structures :)
+declare %private
+ function cnd:extract-search-results(
+ $nodes as element()*
+ ) as node()* {
+ for $node in $nodes
+ return
+ typeswitch($node)
+ case element(tei:title)
+ return
+ (: got the title of the file, return all fsDecls :)
+ for $decl in root($node)//tei:fsdDecl/tei:fsDecl
+ return
+ element r:conditional-result {
+ attribute resource { data:db-path-to-api(document-uri(root($node))) },
+ attribute match { "resource" },
+ $decl
+ }
+ case element(tei:fsDecl)
+ return
+ (: got a match on type :)
+ element r:conditional-result {
+ attribute resource { data:db-path-to-api(document-uri(root($node))) },
+ attribute match { "type" },
+ $node
+ }
+ case element(tei:fDecl)
+ return
+ (: got a match on name :)
+ element r:conditional-result {
+ attribute resource { data:db-path-to-api(document-uri(root($node))) },
+ attribute match { "feature" },
+ element tei:fsDecl {
+ $node/parent::*/@*,
+ $node/parent::*/node() except $node/parent::*/tei:fDecl[not(. is $node)]
+ }
+ }
+ default
+ return $node
+};
+
+(:~ find conditional definitions by type or name :)
+declare function cnd:list-definitions(
+ $query as xs:string,
+ $start as xs:integer,
+ $max-results as xs:integer,
+ $types-only as xs:boolean?
+ ) as item()+ {
+
+
+ xml
+
+ ,
+ let $c := collection($cnd:path-base)
+ let $search-results :=
+ if ($types-only)
+ then
+ $c//tei:fsDecl[lower-case($query)=lower-case(@type)]
+ else
+ $c//tei:title[ft:query(.,$query)]|
+ $c//tei:fsDescr[ft:query(.,$query)]/parent::tei:fsDecl|
+ $c//tei:fDescr[ft:query(.,$query)]/parent::tei:fDecl|
+ (
+ for $qpart in tokenize($query, '\s+')
+ let $lqpart := lower-case($qpart)
+ return
+ $c//tei:fsDecl[contains(lower-case(@type), lower-case($qpart))]|
+ $c//tei:fDecl[contains(lower-case(@name), lower-case($qpart))]
+ )
+ let $extracted as element(r:conditional-result)* :=
+ cnd:extract-search-results(
+ $search-results
+ )
+ let $n-total := count($extracted)
+ let $subseq :=
+ subsequence(
+ for $result in $extracted
+ order by $result/tei:fsDecl/@type/string()
+ return $result, $start, $max-results)
+ let $n-subseq := count($subseq)
+ return
+ {
+ $subseq
+ }
+};
+
+(: @return (list, start, count, n-results) :)
+declare function cnd:query-function(
+ $query as xs:string
+ ) as element()* {
+ let $c := collection($cnd:path-base)
+ return $c//tei:title[ft:query(.,$query)]|
+ $c//tei:fsDescr[ft:query(.,$query)]|
+ $c//tei:fDescr[ft:query(.,$query)]
+};
+
+declare function cnd:list-function(
+ ) as element()* {
+ for $doc in collection($cnd:path-base)/tei:TEI
+ order by $doc//tei:title[@type="main"] ascending
+ return $doc
+};
+
+(:~ Delete a conditionals text
+ : @param $name The name of the text
+ : @return HTTP 204 (No data) if successful
+ : @error HTTP 400 Cannot be deleted and a reason, including existing external references
+ : @error HTTP 401 Not authorized
+ : @error HTTP 403 Forbidden - logged in as a user who does not have write access to the document
+ : @error HTTP 404 Not found
+ :)
+declare
+ %rest:DELETE
+ %rest:path("/api/data/conditionals/{$name}")
+ function cnd:delete(
+ $name as xs:string
+ ) as item()+ {
+ crest:delete($cnd:data-type, $name)
+};
+
+declare function cnd:post(
+ $body as document-node()
+ ) as item()+ {
+ cnd:post($body, ())
+};
+
+(:~ Post a new conditionals document
+ : @param $body The conditionals document
+ : @param $validate If present, validate the document instead of posting
+ : @return HTTP 200 if validated successfully
+ : @return HTTP 201 if created successfully
+ : @error HTTP 400 Invalid linkage XML
+ : @error HTTP 401 Not authorized
+ : @error HTTP 500 Storage error
+ :
+ : Other effects:
+ : * A change record is added to the resource
+ : * The new resource is owned by the current user, group owner=current user, and mode is 664
+ :)
+declare
+ %rest:POST("{$body}")
+ %rest:path("/api/data/conditionals")
+ %rest:query-param("validate", "{$validate}")
+ %rest:consumes("application/xml", "application/tei+xml", "text/xml")
+ function cnd:post(
+ $body as document-node(),
+ $validate as xs:string*
+ ) as item()+ {
+ let $api-path-base := api:uri-of($cnd:api-path-base)
+ return
+ crest:post(
+ $cnd:data-type,
+ $cnd:path-base,
+ $api-path-base,
+ $body,
+ cnd:validate#2,
+ cnd:validate-report#2,
+ (),
+ (),
+ $validate[1]
+ )
+};
+
+declare function cnd:put(
+ $name as xs:string,
+ $body as document-node()
+) as item()+ {
+ cnd:put($name, $body, ())
+};
+
+(:~ Edit/replace a conditionals document in the database
+ : @param $name Name of the document to replace
+ : @param $body New document
+ : @param $validate If present, validate only without writing to the database
+ : @return HTTP 200 If validated successfully
+ : @return HTTP 204 If successful
+ : @error HTTP 400 Invalid XML; Attempt to edit a read-only part of the document
+ : @error HTTP 401 Unauthorized - not logged in
+ : @error HTTP 403 Forbidden - the document can be found, but is not writable by you
+ : @error HTTP 404 Not found
+ : @error HTTP 500 Storage error
+ :
+ : A change record is added to the resource
+ : TODO: add xml:id to required places too
+ :)
+declare
+ %rest:PUT("{$body}")
+ %rest:path("/api/data/conditionals/{$name}")
+ %rest:query-param("validate", "{$validate}")
+ %rest:consumes("application/xml", "text/xml")
+ function cnd:put(
+ $name as xs:string,
+ $body as document-node(),
+ $validate as xs:string*
+ ) as item()+ {
+ crest:put(
+ $cnd:data-type, $name, $body,
+ cnd:validate#2,
+ cnd:validate-report#2,
+ (),
+ $validate[1]
+ )
+};
diff --git a/opensiddur-server/src/api/data/dictionaries.xqm b/opensiddur-server/src/api/data/dictionaries.xqm
new file mode 100644
index 00000000..5e2e5110
--- /dev/null
+++ b/opensiddur-server/src/api/data/dictionaries.xqm
@@ -0,0 +1,270 @@
+xquery version "3.1";
+(: Copyright 2012-2014 Efraim Feinstein
+ : Licensed under the GNU Lesser General Public License, version 3 or later
+ :)
+(:~ Dictionary data API
+ : @author Efraim Feinstein
+ :)
+
+module namespace dict = 'http://jewishliturgy.org/api/data/dictionaries';
+
+declare namespace tei="http://www.tei-c.org/ns/1.0";
+declare namespace j="http://jewishliturgy.org/ns/jlptei/1.0";
+declare namespace output="http://www.w3.org/2010/xslt-xquery-serialization";
+declare namespace rest="http://exquery.org/ns/restxq";
+
+import module namespace api="http://jewishliturgy.org/modules/api"
+ at "../../modules/api.xqm";
+import module namespace app="http://jewishliturgy.org/modules/app"
+ at "../../modules/app.xqm";
+import module namespace crest="http://jewishliturgy.org/modules/common-rest"
+ at "../../modules/common-rest.xqm";
+import module namespace data="http://jewishliturgy.org/modules/data"
+ at "../../modules/data.xqm";
+import module namespace orig="http://jewishliturgy.org/api/data/original"
+ at "original.xqm";
+import module namespace paths="http://jewishliturgy.org/modules/paths"
+ at "../../modules/paths.xqm";
+
+declare variable $dict:data-type := "dictionaries";
+declare variable $dict:schema := concat($paths:schema-base, "/dictionary.rnc");
+declare variable $dict:schematron := concat($paths:schema-base, "/dictionary.xsl");
+declare variable $dict:path-base := concat($data:path-base, "/", $dict:data-type);
+declare variable $dict:api-path-base := concat("/api/data/", $dict:data-type);
+
+(:~ validate
+ : @param $doc The document to be validated
+ : @param $old-doc The document it is replacing, if any
+ : @return true() if valid, false() if not
+ : @see orig:validate-report
+ :)
+declare function dict:validate(
+ $doc as item(),
+ $old-doc as document-node()?
+ ) as xs:boolean {
+ crest:validate(
+ $doc, $old-doc,
+ xs:anyURI($dict:schema), xs:anyURI($dict:schematron),
+ if (exists($old-doc)) then orig:validate-changes#2 else ()
+ )
+};
+
+(:~ validate, returning a validation report
+ : @param $doc The document to be validated
+ : @param $old-doc The document it is replacing, if any
+ : @return true() if valid, false() if not
+ : @see orig:validate
+ :)
+declare function dict:validate-report(
+ $doc as item(),
+ $old-doc as document-node()?
+ ) as element() {
+ crest:validate-report(
+ $doc, $old-doc,
+ xs:anyURI($dict:schema), xs:anyURI($dict:schematron),
+ if (exists($old-doc)) then orig:validate-changes#2 else ()
+ )
+};
+
+(:~ Get an XML document by name
+ : @param $name Document name as a string
+ : @error HTTP 404 Not found (or not available)
+ :)
+declare
+ %rest:GET
+ %rest:path("/api/data/dictionaries/{$name}")
+ %rest:produces("application/xml", "text/xml", "application/tei+xml")
+ function dict:get(
+ $name as xs:string
+ ) as item()+ {
+ crest:get($dict:data-type, $name)
+};
+
+(:~ List or full-text query original data
+ : @param $q text of the query, empty string for all
+ : @param $start first document to list
+ : @param $max-results number of documents to list
+ : @return a list of documents that match the search. If the documents match a query, return the context.
+ : @error HTTP 404 Not found
+ :)
+declare
+ %rest:GET
+ %rest:path("/api/data/dictionaries")
+ %rest:query-param("q", "{$q}", "")
+ %rest:query-param("start", "{$start}", 1)
+ %rest:query-param("max-results", "{$max-results}", 100)
+ %rest:produces("application/xhtml+xml", "application/xml", "text/xml", "text/html")
+ %output:method("xhtml")
+ function dict:list(
+ $q as xs:string*,
+ $start as xs:integer*,
+ $max-results as xs:integer*
+ ) as item()+ {
+ crest:list($q, $start, $max-results,
+ "Dictionary data API", api:uri-of($dict:api-path-base),
+ dict:query-function#1, dict:list-function#0,
+ (
+ ,
+ $crest:additional-validate
+ ),
+ ()
+ )
+};
+
+(: support function for queries :)
+declare function dict:query-function(
+ $query as xs:string
+ ) as element()* {
+ let $c := collection($dict:path-base)
+ return $c//tei:title[ft:query(., $query)]|
+ $c//tei:text[ft:query(.,$query)]
+};
+
+(: support function for list :)
+declare function dict:list-function(
+ ) as element()* {
+ for $doc in collection($dict:path-base)/tei:TEI
+ order by $doc//tei:title[@type="main"] ascending
+ return $doc
+};
+
+(:~ Delete a dictionary text
+ : @param $name The name of the text
+ : @return HTTP 204 (No data) if successful
+ : @error HTTP 400 Cannot be deleted and a reason, including existing external references
+ : @error HTTP 401 Not authorized
+ : @error HTTP 403 Forbidden - logged in as a user who does not have write access to the document
+ : @error HTTP 404 Not found
+ :)
+declare
+ %rest:DELETE
+ %rest:path("/api/data/dictionaries/{$name}")
+ function dict:delete(
+ $name as xs:string
+ ) as item()+ {
+ crest:delete($dict:data-type, $name)
+};
+
+declare function dict:post(
+ $body as document-node()
+ ) as item()+ {
+ dict:post($body, ())
+};
+
+(:~ Post a new dictionary document
+ : @param $body The JLPTEI document
+ : @param $validate If present, validate instead of posting
+ : @return HTTP 200 if validated successfully
+ : @return HTTP 201 if created successfully
+ : @error HTTP 400 Invalid JLPTEI XML
+ : @error HTTP 401 Not authorized
+ : @error HTTP 500 Storage error
+ :
+ : Other effects:
+ : * A change record is added to the resource
+ : * The new resource is owned by the current user, group owner=current user, and mode is 664
+ :)
+declare
+ %rest:POST("{$body}")
+ %rest:path("/api/data/dictionaries")
+ %rest:query-param("validate", "{$validate}")
+ %rest:consumes("application/xml", "application/tei+xml", "text/xml")
+ function dict:post(
+ $body as document-node(),
+ $validate as xs:string*
+ ) as item()+ {
+ let $data-path := concat($dict:data-type, "/", $body/tei:TEI/@xml:lang)
+ let $api-path-base := api:uri-of($dict:api-path-base)
+ return
+ crest:post(
+ $data-path,
+ $dict:path-base,
+ $api-path-base,
+ $body,
+ dict:validate#2,
+ dict:validate-report#2,
+ (),
+ (),
+ $validate[1]
+ )
+};
+
+declare function dict:put(
+ $name as xs:string,
+ $body as document-node()
+ ) as item()+ {
+ dict:put($name, $body, ())
+};
+
+(:~ Edit/replace a document in the database
+ : @param $name Name of the document to replace
+ : @param $body New document
+ : @param $validate Validate only
+ : @return HTTP 200 If successfully validated
+ : @return HTTP 204 If successful
+ : @error HTTP 400 Invalid XML; Attempt to edit a read-only part of the document
+ : @error HTTP 401 Unauthorized - not logged in
+ : @error HTTP 403 Forbidden - the document can be found, but is not writable by you
+ : @error HTTP 404 Not found
+ : @error HTTP 500 Storage error
+ :
+ : A change record is added to the resource
+ : TODO: add xml:id to required places too
+ :)
+declare
+ %rest:PUT("{$body}")
+ %rest:path("/api/data/dictionaries/{$name}")
+ %rest:query-param("validate", "{$validate}")
+ %rest:consumes("application/xml", "text/xml")
+ function dict:put(
+ $name as xs:string,
+ $body as document-node(),
+ $validate as xs:string*
+ ) as item()+ {
+ crest:put(
+ $dict:data-type, $name, $body,
+ dict:validate#2,
+ dict:validate-report#2,
+ (),
+ $validate[1]
+ )
+};
+
+(:~ Get access/sharing data for a dictionary document
+ : @param $name Name of document
+ : @param $user User to get access as
+ : @return HTTP 200 and an access structure (a:access) or user access (a:user-access)
+ : @error HTTP 400 User does not exist
+ : @error HTTP 404 Document not found or inaccessible
+ :)
+declare
+ %rest:GET
+ %rest:path("/api/data/dictionaries/{$name}/access")
+ %rest:query-param("user", "{$user}")
+ %rest:produces("application/xml")
+ function dict:get-access(
+ $name as xs:string,
+ $user as xs:string*
+ ) as item()+ {
+ crest:get-access($dict:data-type, $name, $user)
+};
+
+(:~ Set access/sharing data for a document
+ : @param $name Name of document
+ : @param $body New sharing rights, as an a:access structure
+ : @return HTTP 204 No data, access rights changed
+ : @error HTTP 400 Access structure is invalid
+ : @error HTTP 401 Not authorized
+ : @error HTTP 403 Forbidden
+ : @error HTTP 404 Document not found or inaccessible
+ :)
+declare
+ %rest:PUT("{$body}")
+ %rest:path("/api/data/dictionaries/{$name}/access")
+ %rest:consumes("application/xml", "text/xml")
+ function dict:put-access(
+ $name as xs:string,
+ $body as document-node()
+ ) as item()+ {
+ crest:put-access($dict:data-type, $name, $body)
+};
diff --git a/opensiddur-server/src/api/data/dindex.xqm b/opensiddur-server/src/api/data/dindex.xqm
new file mode 100644
index 00000000..1cbc8797
--- /dev/null
+++ b/opensiddur-server/src/api/data/dindex.xqm
@@ -0,0 +1,117 @@
+xquery version "3.1";
+(: API module for functions for index URIs
+ :
+ : Functions assume that the following has already been done:
+ : authentication,
+ : content negotiation
+ :
+ : Copyright 2012-2013,2016 Efraim Feinstein
+ : Open Siddur Project
+ : Licensed Under the GNU Lesser General Public License, version 3 or later
+ :)
+module namespace dindex = 'http://jewishliturgy.org/api/data/index';
+
+import module namespace api="http://jewishliturgy.org/modules/api"
+ at "../../modules/api.xqm";
+
+declare namespace o="http://a9.com/-/spec/opensearch/1.1/";
+declare namespace output="http://www.w3.org/2010/xslt-xquery-serialization";
+declare namespace rest="http://exquery.org/ns/restxq";
+
+(:~ list all available data APIs :)
+declare
+ %rest:GET
+ %rest:path("/api/data")
+ %rest:produces("application/xhtml+xml", "text/html", "application/xml", "text/xml")
+ function dindex:list(
+ ) as item()+ {
+
+
+ xhtml
+
+ ,
+ let $api-base := api:uri-of("/api/data")
+ return
+
+
+ Open Siddur API Index
+
+
+
+
+
+};
+
+declare
+ %rest:GET
+ %rest:path("/api/data/OpenSearchDescription")
+ %rest:query-param("source", "{$source}", "")
+ %rest:produces("application/opensearchdescription+xml","application/xml","text/xml")
+ function dindex:open-search(
+ $source as xs:string*
+ ) as item()+ {
+
+
+
+
+ ,
+
+ Open Siddur Search
+ Full text search of Open Siddur texts.
+ siddur
+ efraim@opensiddur.org
+
+
+};
diff --git a/opensiddur-server/src/api/data/linkage.xqm b/opensiddur-server/src/api/data/linkage.xqm
new file mode 100644
index 00000000..d1133096
--- /dev/null
+++ b/opensiddur-server/src/api/data/linkage.xqm
@@ -0,0 +1,309 @@
+xquery version "3.1";
+(: Copyright 2012-2014 Efraim Feinstein
+ : Licensed under the GNU Lesser General Public License, version 3 or later
+ :)
+(:~ Linkage data API
+ : @author Efraim Feinstein
+ :)
+
+module namespace lnk = 'http://jewishliturgy.org/api/data/linkage';
+
+declare namespace tei="http://www.tei-c.org/ns/1.0";
+declare namespace j="http://jewishliturgy.org/ns/jlptei/1.0";
+declare namespace output="http://www.w3.org/2010/xslt-xquery-serialization";
+declare namespace rest="http://exquery.org/ns/restxq";
+
+import module namespace api="http://jewishliturgy.org/modules/api"
+ at "../../modules/api.xqm";
+import module namespace crest="http://jewishliturgy.org/modules/common-rest"
+ at "../../modules/common-rest.xqm";
+import module namespace data="http://jewishliturgy.org/modules/data"
+ at "../../modules/data.xqm";
+import module namespace format="http://jewishliturgy.org/modules/format"
+ at "../../modules/format.xqm";
+import module namespace orig="http://jewishliturgy.org/api/data/original"
+ at "original.xqm";
+import module namespace paths="http://jewishliturgy.org/modules/paths"
+ at "../../modules/paths.xqm";
+import module namespace uri="http://jewishliturgy.org/transform/uri"
+ at "../../modules/follow-uri.xqm";
+
+declare variable $lnk:data-type := "linkage";
+declare variable $lnk:no-lang := "none"; (: no language :)
+declare variable $lnk:schema := concat($paths:schema-base, "/linkage.rnc");
+declare variable $lnk:schematron := concat($paths:schema-base, "/linkage.xsl");
+declare variable $lnk:path-base := concat($data:path-base, "/", $lnk:data-type);
+declare variable $lnk:api-path-base := concat("/api/data/", $lnk:data-type);
+
+(:~ @return the documents that are linked by $doc :)
+declare function lnk:get-linked-documents(
+ $doc as document-node()
+ ) as xs:string+ {
+ distinct-values(
+ for $ptr in j:parallelText//tei:ptr
+ for $target in tokenize($ptr/@target, "\s+")
+ return uri:absolutize-uri(uri:uri-base-path($target), $ptr)
+ )
+};
+
+(:~ validate
+ : @param $doc The document to be validated
+ : @param $old-doc The document it is replacing, if any
+ : @return true() if valid, false() if not
+ : @see lnk:validate-report
+ :)
+declare function lnk:validate(
+ $doc as item(),
+ $old-doc as document-node()?
+ ) as xs:boolean {
+ crest:validate(
+ $doc, $old-doc,
+ xs:anyURI($lnk:schema), xs:anyURI($lnk:schematron),
+ if (exists($old-doc)) then orig:validate-changes#2 else ()
+ )
+};
+
+(:~ validate, returning a validation report
+ : @param $doc The document to be validated
+ : @param $old-doc The document it is replacing, if any
+ : @return true() if valid, false() if not
+ : @see lnk:validate
+ :)
+declare function lnk:validate-report(
+ $doc as item(),
+ $old-doc as document-node()?
+ ) as element() {
+ crest:validate-report(
+ $doc, $old-doc,
+ xs:anyURI($lnk:schema), xs:anyURI($lnk:schematron),
+ if (exists($old-doc)) then orig:validate-changes#2 else ()
+ )
+};
+
+(:~ Get an XML linkage document by name
+ : @param $name Document name as a string
+ : @error HTTP 404 Not found (or not available)
+ :)
+declare
+ %rest:GET
+ %rest:path("/api/data/linkage/{$name}")
+ %rest:produces("application/xml", "text/xml", "application/tei+xml")
+ function lnk:get(
+ $name as xs:string
+ ) as item()+ {
+ crest:get($lnk:data-type, $name)
+};
+
+(:~ Get a version of the linkage data resource with unflattened/combined hierarchies
+ : @param $name The resource to get
+ : @return HTTP 200 A TEI header with a combined hierarchy version of the resource as XML
+ : @error HTTP 404 Not found (or not available)
+ :)
+declare
+ %rest:GET
+ %rest:path("/api/data/linkage/{$name}/combined")
+ %rest:produces("application/xml", "text/xml")
+ %output:method("xml")
+ function lnk:get-combined(
+ $name as xs:string
+ ) as item()+ {
+ let $doc := crest:get($lnk:data-type, $name)
+ return
+ if ($doc instance of document-node())
+ then
+ let $deps := format:unflatten-dependencies($doc, map {})
+ return format:unflatten($doc, map {}, $doc)
+ else $doc
+};
+
+(:~ List or full-text query linkage data. Note that querying
+ : linkage data is not super-useful.
+ : @param $q text of the query, empty string for all
+ : @param $start first document to list
+ : @param $max-results number of documents to list
+ : @return a list of documents that match the search. If the documents match a query, return the context.
+ : @error HTTP 404 Not found
+ :)
+declare
+ %rest:GET
+ %rest:path("/api/data/linkage")
+ %rest:query-param("q", "{$q}", "")
+ %rest:query-param("start", "{$start}", 1)
+ %rest:query-param("max-results", "{$max-results}", 100)
+ %rest:produces("application/xhtml+xml", "application/xml", "text/xml", "text/html")
+ %output:method("xhtml")
+ function lnk:list(
+ $q as xs:string*,
+ $start as xs:integer*,
+ $max-results as xs:integer*
+ ) as item()+ {
+ crest:list($q, $start, $max-results,
+ "Linkage data API", api:uri-of($lnk:api-path-base),
+ lnk:query-function#1, lnk:list-function#0,
+ (,
+ ,
+ $crest:additional-validate),
+ ()
+ )
+};
+
+(: @return (list, start, count, n-results) :)
+declare function lnk:query-function(
+ $query as xs:string
+ ) as element()* {
+ let $c := collection($lnk:path-base)
+ return $c//tei:title[ft:query(.,$query)]|$c//tei:idno[ft:query(.,$query)]|$c//tei:text[ft:query(.,$query)]
+};
+
+declare function lnk:list-function(
+ ) as element()* {
+ for $doc in collection($lnk:path-base)/tei:TEI
+ order by $doc//tei:title[@type="main"] ascending
+ return $doc
+};
+
+(:~ Delete a linkage text
+ : @param $name The name of the text
+ : @return HTTP 204 (No data) if successful
+ : @error HTTP 400 Cannot be deleted and a reason, including existing external references
+ : @error HTTP 401 Not authorized
+ : @error HTTP 403 Forbidden - logged in as a user who does not have write access to the document
+ : @error HTTP 404 Not found
+ :)
+declare
+ %rest:DELETE
+ %rest:path("/api/data/linkage/{$name}")
+ function lnk:delete(
+ $name as xs:string
+ ) as item()+ {
+ crest:delete($lnk:data-type, $name)
+};
+
+declare function lnk:post(
+ $body as document-node()
+ ) as item()+ {
+ lnk:post($body, ())
+ };
+
+(:~ Post a new linkage document
+ : @param $body The linkage document
+ : @param $validate If present, validate instead of posting
+ : @return HTTP 200 if validated successfully
+ : @return HTTP 201 if created successfully
+ : @error HTTP 400 Invalid linkage XML
+ : @error HTTP 401 Not authorized
+ : @error HTTP 500 Storage error
+ :
+ : Other effects:
+ : * A change record is added to the resource
+ : * The new resource is owned by the current user, group owner=current user, and mode is 664
+ :)
+declare
+ %rest:POST("{$body}")
+ %rest:path("/api/data/linkage")
+ %rest:query-param("validate", "{$validate}")
+ %rest:consumes("application/xml", "application/tei+xml", "text/xml")
+ function lnk:post(
+ $body as document-node(),
+ $validate as xs:string*
+ ) as item()+ {
+ let $data-path := concat($lnk:data-type, "/",
+ ($body/tei:TEI/@xml:lang/string()[.], $lnk:no-lang)[1]
+ )
+ let $api-path-base := api:uri-of($lnk:api-path-base)
+ return
+ crest:post(
+ $data-path,
+ $lnk:path-base,
+ $api-path-base,
+ $body,
+ lnk:validate#2,
+ lnk:validate-report#2,
+ (),
+ (),
+ $validate[1]
+ )
+};
+
+declare function lnk:put(
+ $name as xs:string,
+ $body as document-node()
+ ) as item()+ {
+ lnk:put($name, $body, ())
+};
+
+(:~ Edit/replace a linkage document in the database
+ : @param $name Name of the document to replace
+ : @param $body New document
+ : @param $validate Validate without writing to the database
+ : @return HTTP 200 If successfully validated
+ : @return HTTP 204 If successful
+ : @error HTTP 400 Invalid XML; Attempt to edit a read-only part of the document
+ : @error HTTP 401 Unauthorized - not logged in
+ : @error HTTP 403 Forbidden - the document can be found, but is not writable by you
+ : @error HTTP 404 Not found
+ : @error HTTP 500 Storage error
+ :
+ : A change record is added to the resource
+ : TODO: add xml:id to required places too
+ :)
+declare
+ %rest:PUT("{$body}")
+ %rest:path("/api/data/linkage/{$name}")
+ %rest:query-param("validate", "{$validate}")
+ %rest:consumes("application/xml", "text/xml")
+ function lnk:put(
+ $name as xs:string,
+ $body as document-node(),
+ $validate as xs:string*
+ ) as item()+ {
+ crest:put(
+ $lnk:data-type, $name, $body,
+ lnk:validate#2,
+ lnk:validate-report#2,
+ (),
+ $validate[1]
+ )
+};
+
+(:~ Get access/sharing data for a document
+ : @param $name Name of document
+ : @param $user User to get access as
+ : @return HTTP 200 and an access structure (a:access) or user access (a:user-access)
+ : @error HTTP 400 User does not exist
+ : @error HTTP 404 Document not found or inaccessible
+ :)
+declare
+ %rest:GET
+ %rest:path("/api/data/linkage/{$name}/access")
+ %rest:query-param("user", "{$user}")
+ %rest:produces("application/xml")
+ function lnk:get-access(
+ $name as xs:string,
+ $user as xs:string*
+ ) as item()+ {
+ crest:get-access($lnk:data-type, $name, $user)
+};
+
+(:~ Set access/sharing data for a document
+ : @param $name Name of document
+ : @param $body New sharing rights, as an a:access structure
+ : @return HTTP 204 No data, access rights changed
+ : @error HTTP 400 Access structure is invalid
+ : @error HTTP 401 Not authorized
+ : @error HTTP 403 Forbidden
+ : @error HTTP 404 Document not found or inaccessible
+ :)
+declare
+ %rest:PUT("{$body}")
+ %rest:path("/api/data/linkage/{$name}/access")
+ %rest:consumes("application/xml", "text/xml")
+ function lnk:put-access(
+ $name as xs:string,
+ $body as document-node()
+ ) as item()+ {
+ (: TODO: a linkage document cannot have looser read access
+ : restrictions than any of the documents it links
+ :)
+ crest:put-access($lnk:data-type, $name, $body)
+};
diff --git a/opensiddur-server/src/api/data/linkageid.xqm b/opensiddur-server/src/api/data/linkageid.xqm
new file mode 100644
index 00000000..dda9ed26
--- /dev/null
+++ b/opensiddur-server/src/api/data/linkageid.xqm
@@ -0,0 +1,153 @@
+xquery version "3.1";
+(: Copyright 2021 Efraim Feinstein
+ : Licensed under the GNU Lesser General Public License, version 3 or later
+ :)
+(:~ Linkage ID data API
+ :
+ : A linkage ID is not a document type. Linkage ids exist as tei:idno inside linkage documents.
+ : This API allows:
+ : * Listing linkage ids as if they were a primary resource
+ : * Finding resources that are linked with a given linkage id
+ : * Finding linkage ids that link a given resource
+ :
+ : @author Efraim Feinstein
+ :)
+
+module namespace lnkid = 'http://jewishliturgy.org/api/data/linkageid';
+
+declare namespace tei="http://www.tei-c.org/ns/1.0";
+declare namespace j="http://jewishliturgy.org/ns/jlptei/1.0";
+declare namespace output="http://www.w3.org/2010/xslt-xquery-serialization";
+declare namespace rest="http://exquery.org/ns/restxq";
+
+import module namespace api="http://jewishliturgy.org/modules/api"
+ at "../../modules/api.xqm";
+import module namespace crest="http://jewishliturgy.org/modules/common-rest"
+ at "../../modules/common-rest.xqm";
+import module namespace data="http://jewishliturgy.org/modules/data"
+ at "../../modules/data.xqm";
+import module namespace lnk="http://jewishliturgy.org/api/data/linkage"
+ at "linkage.xqm";
+import module namespace uri="http://jewishliturgy.org/transform/uri"
+ at "../../modules/follow-uri.xqm";
+
+declare variable $lnkid:api-path-base := "/api/data/linkageid";
+
+(:~ query for ids that match :)
+declare function lnkid:query-function(
+ $query as xs:string
+) {
+ (: this should use a range index, I think :)
+ for $result in collection($lnk:path-base)//tei:idno[contains(., $query)]
+ order by $result/string()
+ return $result
+};
+
+(:~ list all linkage ids :)
+declare function lnkid:list-function() as element()* {
+ for $id in distinct-values(collection($lnk:path-base)//j:parallelText/tei:idno)
+ let $normalized := normalize-space($id)
+ order by $normalized ascending
+ return element tei:idno { $normalized }
+};
+
+(:~ title of a linkage id from an id node :)
+declare function lnkid:title-function(
+ $idno as node()
+) as xs:string {
+ $idno/string()
+};
+
+declare
+ %rest:GET
+ %rest:path("/api/data/linkageid")
+ %rest:query-param("q", "{$q}", "")
+ %rest:query-param("start", "{$start}", 1)
+ %rest:query-param("max-results", "{$max-results}", 100)
+ %rest:produces("application/xhtml+xml", "application/xml", "text/xml", "text/html")
+ %output:method("xhtml")
+ function lnkid:list(
+ $q as xs:string*,
+ $start as xs:integer*,
+ $max-results as xs:integer*
+ ) as item()+ {
+ crest:list($q, $start, $max-results,
+ "Linkage ID data API", api:uri-of($lnkid:api-path-base),
+ lnkid:query-function#1, lnkid:list-function#0,
+ (),
+ lnkid:title-function#1
+ )
+};
+
+(:~ (internal function) get all the original resources linked to by an id.
+ : The format is:
+ :
+ : (document-name)
+ : (left side doc path)
+ : (right side doc path)
+ :
+ :)
+declare function lnkid:list-by-id(
+ $id as xs:string
+) as element(lnkid:result)* {
+ for $id-element in collection($lnk:path-base)//tei:idno[normalize-space(.) = $id]
+ let $parallel-domains := tokenize($id-element/parent::j:parallelText/tei:linkGrp/@domains/string(), "\s+")
+ let $left-domain := uri:uri-base-path($parallel-domains[1])
+ let $right-domain := uri:uri-base-path($parallel-domains[2])
+ let $linkage := document-uri(root($id-element))
+ order by $linkage
+ return
+ element lnkid:result {
+ element lnkid:linkage { data:db-path-to-api($linkage) },
+ element lnkid:left { "/api" || $left-domain }, (: I am assuming here that the domains contain api-like paths, but lack /api prepended :)
+ element lnkid:right { "/api" || $right-domain }
+ }
+};
+
+(:~ Get a list of documents that are linked to by a given linkage ID
+ : There is no actual "linkageid" document - it is really a search and just supports the GET verb.
+ : @param $name Document name as a string
+ : @error HTTP 404 Not found (or not available)
+ :)
+declare
+ %rest:GET
+ %rest:path("/api/data/linkageid/{$name}")
+ %rest:produces("application/xhtml+xml", "application/xml", "text/xml", "text/html")
+ %output:method("xhtml")
+ function lnkid:get(
+ $name as xs:string
+ ) as item()+ {
+ let $results := lnkid:list-by-id($name)
+ return
+ if (empty($results))
+ then api:rest-error(404, "Not found", $name)
+ else (
+
+
+ xhtml
+
+ ,
+
+
+ {$name}
+
+
+
{
+ for $result in $results
+ let $linkage := $result/lnkid:linkage/string()
+ let $left := $result/lnkid:left/string()
+ let $right := $result/lnkid:right/string()
+ let $log := util:log("INFO", ("***linkage=", $linkage, " left=", $left, " right=", $right))
+ return
+
+
+
+ )
+};
\ No newline at end of file
diff --git a/opensiddur-server/src/api/data/notes.xqm b/opensiddur-server/src/api/data/notes.xqm
new file mode 100644
index 00000000..1de6fec1
--- /dev/null
+++ b/opensiddur-server/src/api/data/notes.xqm
@@ -0,0 +1,384 @@
+xquery version "3.1";
+(: Copyright 2012-2013 Efraim Feinstein
+ : Licensed under the GNU Lesser General Public License, version 3 or later
+ :)
+(:~ Annotation data API
+ : Annotation data includes textual notes, instructional material,
+ : category annotations and cross references
+ : @author Efraim Feinstein
+ :)
+
+module namespace notes = 'http://jewishliturgy.org/api/data/notes';
+
+declare namespace tei="http://www.tei-c.org/ns/1.0";
+declare namespace j="http://jewishliturgy.org/ns/jlptei/1.0";
+declare namespace output="http://www.w3.org/2010/xslt-xquery-serialization";
+declare namespace rest="http://exquery.org/ns/restxq";
+
+import module namespace api="http://jewishliturgy.org/modules/api"
+ at "../../modules/api.xqm";
+import module namespace crest="http://jewishliturgy.org/modules/common-rest"
+ at "../../modules/common-rest.xqm";
+import module namespace data="http://jewishliturgy.org/modules/data"
+ at "../../modules/data.xqm";
+import module namespace orig="http://jewishliturgy.org/api/data/original"
+ at "original.xqm";
+import module namespace paths="http://jewishliturgy.org/modules/paths"
+ at "../../modules/paths.xqm";
+
+declare variable $notes:data-type := "notes";
+declare variable $notes:schema := concat($paths:schema-base, "/annotation.rnc");
+declare variable $notes:schematron := concat($paths:schema-base, "/annotation.xsl");
+declare variable $notes:path-base := concat($data:path-base, "/", $notes:data-type);
+declare variable $notes:api-path-base := concat("/api/data/", $notes:data-type);
+
+(:~ validate
+ : @param $doc The document to be validated
+ : @param $old-doc An older copy of the document that is being replaced
+ : @return true() if valid, false() if not
+ : @see notes:validate-report
+ :)
+declare function notes:validate(
+ $doc as item(),
+ $old-doc as document-node()?
+ ) as xs:boolean {
+ crest:validate($doc, $old-doc,
+ xs:anyURI($notes:schema), xs:anyURI($notes:schematron),
+ if (exists($old-doc)) then orig:validate-changes#2 else ()
+ )
+};
+
+(:~ validate, returning a validation report
+ : @param $doc The document to be validated
+ : @param $old-doc An old copy of the document
+ : @return true() if valid, false() if not
+ : @see notes:validate
+ :)
+declare function notes:validate-report(
+ $doc as item(),
+ $old-doc as document-node()?
+ ) as element() {
+ crest:validate-report($doc, $old-doc,
+ xs:anyURI($notes:schema), xs:anyURI($notes:schematron),
+ if (exists($old-doc)) then orig:validate-changes#2 else ()
+ )
+};
+
+(:~ Get an XML annotation document by name
+ : @param $name Document name as a string
+ : @error HTTP 404 Not found (or not available)
+ :)
+declare
+ %rest:GET
+ %rest:path("/api/data/notes/{$name}")
+ %rest:produces("application/xml", "text/xml", "application/tei+xml")
+ function notes:get(
+ $name as xs:string
+ ) as item()+ {
+ crest:get($notes:data-type, $name)
+};
+
+(:~ Get an XML annotation by resource name and id
+ : @param $name Document name
+ : @param $id The xml:id of the annotation to get
+ : @return The tei:note containing the requested annotation
+ : @error HTTP 404 Not found (or not available)
+ :)
+declare
+ %rest:GET
+ %rest:path("/api/data/notes/{$name}/{$id}")
+ %rest:produces("application/xml", "text/xml", "application/tei+xml")
+ %output:method("xml")
+ function notes:get-note(
+ $name as xs:string,
+ $id as xs:string
+ ) as item()+ {
+ let $notes-doc := crest:get($notes:data-type, $name)
+ return
+ if ($notes-doc instance of document-node())
+ then
+ let $note := $notes-doc//tei:note[@xml:id=$id]
+ return
+ if (exists($note))
+ then document { $note }
+ else api:rest-error(404, "Note not found", $id)
+ else
+ (: it's an error condition :)
+ $notes-doc
+};
+
+(:~ List or full-text query annotation documents
+ : @param $q text of the query, empty string for all
+ : @param $start first document to list
+ : @param $max-results number of documents to list
+ : @return a list of documents that match the search. If the documents match a query, return the context.
+ : @error HTTP 404 Not found
+ :)
+declare
+ %rest:GET
+ %rest:path("/api/data/notes")
+ %rest:query-param("q", "{$q}", "")
+ %rest:query-param("start", "{$start}", 1)
+ %rest:query-param("max-results", "{$max-results}", 100)
+ %rest:produces("application/xhtml+xml", "application/xml", "text/xml", "text/html")
+ %output:method("xhtml")
+ function notes:list(
+ $q as xs:string*,
+ $start as xs:integer*,
+ $max-results as xs:integer*
+ ) as item()+ {
+ crest:list(
+ $q, $start, $max-results,
+ "Annotation data API",
+ api:uri-of($notes:api-path-base),
+ notes:query-function#1,
+ notes:list-function#0,
+ (
+ ,
+ $crest:additional-validate
+ ),
+ ()
+ )
+};
+
+(: support function :)
+declare function notes:query-function(
+ $query as xs:string
+ ) as element()* {
+ let $c := collection($notes:path-base)
+ return
+ $c//tei:titleStmt/tei:title[ft:query(.,$query)]|$c/tei:text[ft:query(.,$query)]
+};
+
+declare function notes:list-function(
+ ) as element()* {
+ for $doc in collection($notes:path-base)/tei:TEI
+ order by $doc//tei:titleStmt/(tei:title[@type="main"]|tei:title[not(@type)])[1] ascending
+ return $doc
+};
+
+(:~ Delete an annotation text
+ : @param $name The name of the text
+ : @return HTTP 204 (No data) if successful
+ : @error HTTP 400 Cannot be deleted and a reason, including existing external references
+ : @error HTTP 401 Not authorized
+ : @error HTTP 403 Forbidden - logged in as a user who does not have write access to the document
+ : @error HTTP 404 Not found
+ :)
+declare
+ %rest:DELETE
+ %rest:path("/api/data/notes/{$name}")
+ function notes:delete(
+ $name as xs:string
+ ) as item()+ {
+ crest:delete($notes:data-type, $name)
+};
+
+declare function notes:post(
+ $body as document-node()
+ ) as item()+ {
+ notes:post($body, ())
+};
+
+(:~ Post a new annotation document
+ : @param $body The annotation document
+ : @param $validate Validate the document instead of posting
+ : @return HTTP 200 if posted successfully
+ : @return HTTP 201 if created successfully
+ : @error HTTP 400 Invalid annotation XML
+ : @error HTTP 401 Not authorized
+ : @error HTTP 500 Storage error
+ :
+ : Other effects:
+ : * A change record is added to the resource
+ : * The new resource is owned by the current user, group owner=current user, and mode is 664
+ :)
+declare
+ %rest:POST("{$body}")
+ %rest:path("/api/data/notes")
+ %rest:query-param("validate", "{$validate}")
+ %rest:consumes("application/xml", "application/tei+xml", "text/xml")
+ function notes:post(
+ $body as document-node(),
+ $validate as xs:string*
+ ) as item()+ {
+ let $data-path := concat($notes:data-type, "/", $body/tei:TEI/@xml:lang)
+ let $api-path-base := api:uri-of($notes:api-path-base)
+ return
+ crest:post(
+ $data-path,
+ $notes:path-base,
+ $api-path-base,
+ $body,
+ notes:validate#2,
+ notes:validate-report#2,
+ crest:tei-title-function#1,
+ (),
+ $validate[1]
+ )
+};
+
+(:~ transform to insert or replace elements in an in-memory document
+ : we do not use XQuery update because it doesn't work on in-memory documents
+ :
+ : @param $nodes Nodes that are being operated on
+ : @param $annotation-to-insert The annotation that will be inserted into j:annotations
+ : @param $annotation-to-replace The annotation that should be replaced. If it does not exist, the annotation will be
+ : inserted at the end of j:annotations
+ : @return $node with insertions or replacements
+ :)
+declare function notes:insert-or-replace(
+ $nodes as node()*,
+ $annotation-to-insert as element(tei:note),
+ $annotation-to-replace as element(tei:note)?
+) {
+ for $node in $nodes
+ return
+ typeswitch ($node)
+ case document-node() return
+ document { notes:insert-or-replace($node/node(), $annotation-to-insert, $annotation-to-replace) }
+ case element(j:annotations) return
+ element { QName(namespace-uri($node), name($node)) } {
+ $node/@*,
+ if (empty($annotation-to-replace))
+ then (
+ $node/node(),
+ $annotation-to-insert
+ )
+ else notes:insert-or-replace($node/node(), $annotation-to-insert, $annotation-to-replace)
+ }
+ case element(tei:note) return
+ if (exists($annotation-to-replace) and $annotation-to-replace is $node)
+ then $annotation-to-insert
+ else $node
+ case element() return
+ element { QName(namespace-uri($node), name($node)) } {
+ $node/@*,
+ notes:insert-or-replace($node/node(), $annotation-to-insert, $annotation-to-replace)
+ }
+ default return $node
+};
+
+(:~ Edit or insert a note into a document
+ : @param $name Document name
+ : @param $body Body of the note
+ : @return HTTP 200 if the edit was successful
+ : @return HTTP 201 if a new document was created
+ : @error HTTP 400 for invalid XML, including missing @xml:id
+ : @error HTTP 401 not authorized
+ :
+ : Other effects:
+ : * A change record is added to the resource
+ : * If a new resource is created, it is owned by the current user, group owner=current user, and mode is 664
+ :)
+declare
+ %rest:POST
+ %rest:path("/api/data/notes/{$name}")
+ %rest:consumes("application/xml", "application/tei+xml", "text/xml")
+ function notes:post-note(
+ $name as xs:string,
+ $body as element(tei:note)
+ ) as item()+ {
+ let $doc := data:doc($notes:data-type, $name)
+ return
+ if (not($body/@xml:id/string()))
+ then
+ api:rest-error(400, "Input annotation requires an xml:id")
+ else if ($doc)
+ then
+ let $resource := util:document-name($doc)
+ let $collection := util:collection-name($doc)
+ let $uri := document-uri($doc)
+ return
+ if (sm:has-access(xs:anyURI($uri), "w"))
+ then
+ (: existing document with write access :)
+ let $existing-note := $doc//tei:note[@xml:id=$body/@xml:id]
+ let $inserted := notes:insert-or-replace($doc, $body, $existing-note)
+ return notes:put($name, $inserted)
+ else
+ crest:no-access()
+ else
+ (: document does not exist, return HTTP 404 :)
+ api:rest-error(404, "Not found", $name)
+};
+
+declare function notes:put(
+ $name as xs:string,
+ $body as document-node()
+ ) as item()+ {
+ notes:put($name, $body, ())
+ };
+
+(:~ Edit/replace an annotation document in the database
+ : @param $name Name of the document to replace
+ : @param $body New document
+ : @param $validate Validate without writing to the database
+ : @return HTTP 200 If successfully validated
+ : @return HTTP 204 If successful
+ : @error HTTP 400 Invalid XML; Attempt to edit a read-only part of the document
+ : @error HTTP 401 Unauthorized - not logged in
+ : @error HTTP 403 Forbidden - the document can be found, but is not writable by you
+ : @error HTTP 404 Not found
+ : @error HTTP 500 Storage error
+ :
+ : A change record is added to the resource
+ : TODO: add xml:id to required places too
+ :)
+declare
+ %rest:PUT("{$body}")
+ %rest:path("/api/data/notes/{$name}")
+ %rest:query-param("validate", "{$validate}")
+ %rest:consumes("application/xml", "text/xml")
+ function notes:put(
+ $name as xs:string,
+ $body as document-node(),
+ $validate as xs:string*
+ ) as item()+ {
+ crest:put(
+ $notes:data-type,
+ $name,
+ $body,
+ notes:validate#2, notes:validate-report#2,
+ (),
+ $validate[1])
+};
+
+(:~ Get access/sharing data for an annotation document
+ : @param $name Name of document
+ : @param $user User to get access as
+ : @return HTTP 200 and an access structure (a:access) or user access (a:user-access)
+ : @error HTTP 400 User does not exist
+ : @error HTTP 404 Document not found or inaccessible
+ :)
+declare
+ %rest:GET
+ %rest:path("/api/data/notes/{$name}/access")
+ %rest:query-param("user", "{$user}")
+ %rest:produces("application/xml")
+ function notes:get-access(
+ $name as xs:string,
+ $user as xs:string*
+ ) as item()+ {
+ crest:get-access($notes:data-type, $name, $user)
+};
+
+(:~ Set access/sharing data for an annotation document
+ : @param $name Name of document
+ : @param $body New sharing rights, as an a:access structure
+ : @return HTTP 204 No data, access rights changed
+ : @error HTTP 400 Access structure is invalid
+ : @error HTTP 401 Not authorized
+ : @error HTTP 403 Forbidden
+ : @error HTTP 404 Document not found or inaccessible
+ :)
+declare
+ %rest:PUT("{$body}")
+ %rest:path("/api/data/notes/{$name}/access")
+ %rest:consumes("application/xml", "text/xml")
+ function notes:put-access(
+ $name as xs:string,
+ $body as document-node()
+ ) as item()+ {
+ crest:put-access($notes:data-type, $name, $body)
+};
diff --git a/opensiddur-server/src/api/data/original.xqm b/opensiddur-server/src/api/data/original.xqm
new file mode 100644
index 00000000..92995191
--- /dev/null
+++ b/opensiddur-server/src/api/data/original.xqm
@@ -0,0 +1,814 @@
+xquery version "3.1";
+(: Copyright 2012-2016 Efraim Feinstein
+ : Licensed under the GNU Lesser General Public License, version 3 or later
+ :)
+(:~ Original data API
+ : @author Efraim Feinstein
+ :)
+
+module namespace orig = 'http://jewishliturgy.org/api/data/original';
+
+declare namespace tei="http://www.tei-c.org/ns/1.0";
+declare namespace j="http://jewishliturgy.org/ns/jlptei/1.0";
+declare namespace output="http://www.w3.org/2010/xslt-xquery-serialization";
+declare namespace rest="http://exquery.org/ns/restxq";
+declare namespace http="http://expath.org/ns/http-client";
+
+
+import module namespace api="http://jewishliturgy.org/modules/api"
+ at "../../modules/api.xqm";
+import module namespace acc="http://jewishliturgy.org/modules/access"
+ at "../../modules/access.xqm";
+import module namespace app="http://jewishliturgy.org/modules/app"
+ at "../../modules/app.xqm";
+import module namespace crest="http://jewishliturgy.org/modules/common-rest"
+ at "../../modules/common-rest.xqm";
+import module namespace data="http://jewishliturgy.org/modules/data"
+ at "../../modules/data.xqm";
+import module namespace format="http://jewishliturgy.org/modules/format"
+ at "../../modules/format.xqm";
+import module namespace paths="http://jewishliturgy.org/modules/paths"
+ at "../../modules/paths.xqm";
+import module namespace ridx="http://jewishliturgy.org/modules/refindex"
+ at "../../modules/refindex.xqm";
+import module namespace status="http://jewishliturgy.org/modules/status"
+ at "../../modules/status.xqm";
+import module namespace uri="http://jewishliturgy.org/transform/uri"
+ at "../../modules/follow-uri.xqm";
+
+declare variable $orig:data-type := "original";
+declare variable $orig:schema := concat($paths:schema-base, "/jlptei.rnc");
+declare variable $orig:schematron := concat($paths:schema-base, "/jlptei.xsl");
+declare variable $orig:path-base := concat($data:path-base, "/", $orig:data-type);
+declare variable $orig:api-path-base := concat("/api/data/", $orig:data-type);
+
+(:~ validate
+ : @param $doc The document to be validated
+ : @param $old-doc The document it is replacing, if any
+ : @return true() if valid, false() if not
+ : @see orig:validate-report
+ :)
+declare function orig:validate(
+ $doc as item(),
+ $old-doc as document-node()?
+ ) as xs:boolean {
+ crest:validate(
+ $doc, $old-doc,
+ xs:anyURI($orig:schema), xs:anyURI($orig:schematron),
+ (
+ if (exists($old-doc)) then orig:validate-changes#2 else (),
+ orig:validate-external-links#2,
+ orig:validate-external-anchors#2
+ )
+ )
+};
+
+(:~ validate, returning a validation report
+ : @param $doc The document to be validated
+ : @param $old-doc The document it is replacing, if any
+ : @return true() if valid, false() if not
+ : @see orig:validate
+ :)
+declare function orig:validate-report(
+ $doc as item(),
+ $old-doc as document-node()?
+ ) as element() {
+ crest:validate-report(
+ $doc, $old-doc,
+ xs:anyURI($orig:schema), xs:anyURI($orig:schematron),
+ (
+ if (exists($old-doc)) then orig:validate-changes#2 else (),
+ orig:validate-external-links#2,
+ orig:validate-external-anchors#2
+ )
+ )
+};
+
+declare
+ %private
+ function orig:validate-revisionDesc(
+ $new as element(tei:revisionDesc)?,
+ $old as element(tei:revisionDesc)?
+ ) as xs:boolean {
+ let $offset := count($new/tei:change) - count($old/tei:change)
+ return
+ ($offset = (0,1) ) and (
+ $offset=0 or ( (: if the first change record is new, it can;t have @when :)
+ empty($new/tei:change[1]/@when)
+ )
+ ) and not(false()=(
+ true(), (: handle the case of the empty revisionDesc :)
+ for $change at $x in $old/tei:change
+ (: Putting this line directly below causes an exception, see issue #158 :)
+ let $y := $x + $offset
+ return xmldiff:compare($new/tei:change[$y], $change)
+ ))
+};
+
+(:~ remove ignorable text nodes :)
+declare function orig:remove-whitespace(
+ $nodes as node()*
+ ) as node()* {
+ for $node in $nodes
+ return
+ typeswitch ($node)
+ case document-node() return
+ document { orig:remove-whitespace($node/node()) }
+ case comment() return ()
+ case text() return
+ if (normalize-space($node)='')
+ then ()
+ else $node
+ case element() return
+ element { QName(namespace-uri($node), name($node)) }{
+ $node/@*,
+ orig:remove-whitespace($node/node())
+ }
+ default return orig:remove-whitespace($node/node())
+};
+
+(:~ determine if:
+ : 1. the anchors in a document that have type=external or canonical *and* are referenced externally are still present in the new doc
+ : @param $doc the document to validate
+ : @param $old-doc ignored
+ : @return validation messages if the document breaks the rule, otherwise empty sequence if the document is valid
+ :)
+declare function orig:validate-external-anchor-presence(
+ $doc as document-node(),
+ $old-doc as document-node()?
+) as element(message)* {
+ (: this map will have one entry keyed by the xml:id with the value of the referencing document
+ for each referenced external anchor that is not present in the new version of the document.
+ :)
+ let $missing-old-doc-externals as map(xs:string, xs:string) :=
+ if (exists($old-doc))
+ then map:merge(
+ let $external-anchor-ids := $old-doc//tei:anchor[@type=("canonical", "external")]/@xml:id
+ let $missing-new-doc-anchors :=
+ for $external-anchor-id in $external-anchor-ids
+ where empty($doc//tei:anchor[@type=("canonical", "external")][@xml:id=$external-anchor-id])
+ return $external-anchor-id
+ for $missing-anchor in $missing-new-doc-anchors
+ let $missing-anchor-original := $old-doc//tei:anchor[@xml:id=$missing-anchor]
+ let $references := ridx:query-all($missing-anchor-original)
+ let $reference-docs :=
+ for $reference in $references
+ where not(root($reference) is $old-doc)
+ return data:db-path-to-api(document-uri(root($reference)))
+ where exists($reference-docs)
+ return map:entry($missing-anchor-original/@xml:id/string(), string-join($reference-docs, ","))
+ )
+ else map {}
+ for $missing-external-anchor in map:keys($missing-old-doc-externals)
+ return element message {
+ "The anchor '" || $missing-external-anchor || "' is referenced by " ||
+ $missing-old-doc-externals($missing-external-anchor) ||
+ " but is not present in the new document."
+ }
+};
+
+(:~ determine if all anchors that are referenced externally in the new doc have type=external or canonical
+ : @param $doc the document to validate
+ : @param $old-doc ignored
+ : @return a validation report
+ :)
+declare function orig:validate-internal-anchors(
+ $doc as document-node(),
+ $old-doc as document-node()?
+) as element(message)* {
+ for $anchor in $old-doc//tei:anchor
+ let $references := ridx:query-all($anchor)
+ for $reference in $references
+ let $new-doc-equivalent := $doc//tei:anchor[@xml:id=$anchor/@xml:id]
+ where not(root($reference) is $old-doc) and
+ not($new-doc-equivalent/@type = ("canonical", "external"))
+ return element message {
+ "The anchor '" || $new-doc-equivalent/@xml:id/string() || "' is referenced externally by " ||
+ data:db-path-to-api(document-uri(root($reference))) ||
+ " but is not marked 'external' or 'canonical'."
+ }
+
+};
+
+(:~ return all internal references to anchors within the given document :)
+declare function orig:internal-references(
+ $doc as document-node()
+) as map(xs:string, element()*) {
+ fold-left( (: eXist does not support map:merge with combine semantics... :)
+ for $ptr-element in $doc//*[@target|@targets|@domains|@ref]
+ for $reference in tokenize($ptr-element/@target|$ptr-element/@targets|$ptr-element/@domains|$ptr-element/@ref, "\s+")
+ where starts-with($reference, "#")
+ return
+ let $after-hash := substring-after($reference, "#")
+ let $target-ids :=
+ if (starts-with($after-hash, "range"))
+ then
+ let $left := $after-hash => substring-after("(") => substring-before(",")
+ let $right := $after-hash => substring-after(",") => substring-before(")")
+ return ($left, $right)
+ else $after-hash
+ let $sources := $doc//tei:anchor[@xml:id=$target-ids]
+ for $source in $sources
+ return map:entry($source/@xml:id/string(), $ptr-element),
+ map {},
+ function($items as map(xs:string, element()*), $new-item as map(xs:string, element()*)) {
+ map:merge(
+ for $key in (map:keys($items), map:keys($new-item))
+ return
+ if (map:contains($new-item, $key))
+ then map:entry($key, $items($key) | $new-item($key))
+ else map:entry($key, $items($key))
+ )
+ }
+ )
+};
+
+(:~ determine if the anchors in a document follow the single-reference rule,
+ : which requires that all anchors that are not canonical have only 1 pointer referencing them,
+ : either internally or externally.
+ : @param $doc the document to validate
+ : @param $old-doc ignored
+ : @return validation messages that indicate errors
+ :)
+declare function orig:validate-anchors-single-reference-rule(
+ $doc as document-node(),
+ $old-doc as document-node()?
+) as element(message)* {
+ let $all-internal-references as map(xs:string, element()*) := orig:internal-references($doc)
+ let $relevant-anchors := $doc//tei:anchor[not(@type="canonical")]
+ for $anchor in $relevant-anchors
+ let $id := $anchor/@xml:id/string()
+ let $old-doc-equivalent := $old-doc//tei:anchor[@xml:id=$id]
+ let $external-references := ridx:query-all($old-doc-equivalent)[not(root(.) is $old-doc)]
+ let $internal-references := $all-internal-references($id)
+ let $all-references := ($external-references, $internal-references)
+ let $count := count($all-references)
+ where $count > 1
+ return element message {
+ "The anchor '" || $id || "' is referenced " || string($count) || " times, but may only be referenced once"
+ }
+};
+
+(:~ determine if:
+ : 1. the anchors in a document that have type=external or canonical *and* are referenced externally are still present in the new doc
+ : 2. all anchors that are referenced externally in the new doc have type=external or canonical
+ : 3. each anchor that has type=external or internal is referenced once
+ : @param $doc the document to validate
+ : @param $old-doc ignored
+ : @return a validation report
+ :)
+declare function orig:validate-external-anchors(
+ $doc as document-node(),
+ $old-doc as document-node()?
+) as element(report) {
+ let $all-messages := (
+ orig:validate-external-anchor-presence($doc, $old-doc),
+ orig:validate-internal-anchors($doc, $old-doc),
+ orig:validate-anchors-single-reference-rule($doc, $old-doc)
+ )
+ let $status :=
+ if (exists($all-messages))
+ then "invalid"
+ else "valid"
+ return
+ element report {
+ element status { $status },
+ $all-messages
+ }
+};
+
+(:~ determine if the external links in a document all point to something
+ : @param $doc the document to validate
+ : @param $old-doc ignored
+ : @return a validation report
+ :)
+declare function orig:validate-external-links(
+ $doc as document-node(),
+ $old-doc as document-node()?
+ ) as element(report) {
+ let $bad-ptrs :=
+ for $ptr in $doc//*[@target|@targets|@domains|@ref]/(@target|@targets|@domains|@ref)
+ let $doc := root($ptr)
+ for $target in tokenize($ptr, '\s+')
+ [not(starts-with(., 'http:'))]
+ [not(starts-with(., 'https:'))]
+ let $base :=
+ if (contains($target, '#'))
+ then substring-before($target, '#')[.]
+ else $target
+ where exists($base)
+ return
+ let $fragment := substring-after($target, '#')[.]
+ let $dest-doc := data:doc($base)
+ let $dest-fragment := uri:follow-uri($target, $ptr/.., uri:follow-steps($ptr/..))
+ where empty($dest-doc) or ($fragment and empty($dest-fragment))
+ return
+ The pointer {$target} is invalid: {
+ if (empty($dest-doc))
+ then ("The document " || $base || " does not exist")
+ else ("The fragment "|| $fragment || " does not exist in the document " || $base)
+ }.
+ return
+ element report {
+ element status {
+ if (exists($bad-ptrs)) then "invalid" else "valid"
+ },
+ $bad-ptrs
+ }
+};
+
+
+(:~ determine if all the changes between an old version and
+ : a new version of a document are legal
+ : @param $doc new document
+ : @param $old-doc old document
+ : @return a report element, indicating whether the changes are valid or invalid
+ :)
+declare function orig:validate-changes(
+ $doc as document-node(),
+ $old-doc as document-node()
+ ) as element(report) {
+ (: TODO: check for missing externally referenced xml:id's :)
+ let $messages := (
+ if (not(orig:validate-revisionDesc($doc//tei:revisionDesc, $old-doc//tei:revisionDesc)))
+ then You may not alter the existing revision history. You may add one change log entry.
+ else (),
+ let $can-change-license :=
+ acc:can-relicense($doc, app:auth-user())
+ where (not($can-change-license) and not($doc//tei:availability/tei:licence/@target=$old-doc//tei:availability/tei:licence/@target))
+ return
+ Only the original author can change a text's license
+ )
+ let $is-valid := empty($messages)
+ return
+
+ {
+ if ($is-valid)
+ then "valid"
+ else "invalid"
+ }
+ {$messages}
+
+};
+
+(:~ Get an XML document by name
+ : @param $name Document name as a string
+ : @error HTTP 404 Not found (or not available)
+ :)
+declare
+ %rest:GET
+ %rest:path("/api/data/original/{$name}")
+ %rest:produces("application/xml", "text/xml", "application/tei+xml")
+ function orig:get(
+ $name as xs:string
+ ) as item()+ {
+ crest:get($orig:data-type, $name)
+};
+
+(:~ List or full-text query original data
+ : @param $q text of the query, empty string for all
+ : @param $start first document to list
+ : @param $max-results number of documents to list
+ : @return a list of documents that match the search. If the documents match a query, return the context.
+ : @error HTTP 404 Not found
+ :)
+declare
+ %rest:GET
+ %rest:path("/api/data/original")
+ %rest:query-param("q", "{$q}", "")
+ %rest:query-param("start", "{$start}", 1)
+ %rest:query-param("max-results", "{$max-results}", 100)
+ %rest:produces("application/xhtml+xml", "application/xml", "text/xml", "text/html")
+ %output:method("xhtml")
+ function orig:list(
+ $q as xs:string*,
+ $start as xs:integer*,
+ $max-results as xs:integer*
+ ) as item()+ {
+ crest:list($q, $start, $max-results,
+ "Original data API", api:uri-of($orig:api-path-base),
+ orig:query-function#1, orig:list-function#0,
+ (,
+ ,
+ ,
+ ,
+ ,
+ $crest:additional-validate),
+ ()
+ )
+};
+
+(: support function for queries :)
+declare function orig:query-function(
+ $query as xs:string
+ ) as element()* {
+ let $c := collection($orig:path-base)
+ return $c//tei:text[ft:query(.,$query)]|$c//tei:title[ft:query(.,$query)]
+};
+
+(: support function for list :)
+declare function orig:list-function(
+ ) as element()* {
+ for $doc in collection($orig:path-base)/tei:TEI
+ order by $doc//tei:title[@type="main"] ascending
+ return $doc
+};
+
+(:~ Delete an original text
+ : @param $name The name of the text
+ : @return HTTP 204 (No data) if successful
+ : @error HTTP 400 Cannot be deleted and a reason, including existing external references
+ : @error HTTP 401 Not authorized
+ : @error HTTP 403 Forbidden - logged in as a user who does not have write access to the document
+ : @error HTTP 404 Not found
+ :)
+declare
+ %rest:DELETE
+ %rest:path("/api/data/original/{$name}")
+ function orig:delete(
+ $name as xs:string
+ ) as item()+ {
+ crest:delete($orig:data-type, $name)
+};
+
+declare function orig:post(
+ $doc as document-node()
+) as item()+ {
+ orig:post($doc, ())
+};
+
+(:~ Post a new original document
+ : @param $body The JLPTEI document
+ : @param $validate If present, validate the POST-ed document, but do not actually post it
+ :
+ : @return HTTP 200 if validated
+ : @return HTTP 201 if created successfully
+ : @error HTTP 400 Invalid JLPTEI XML
+ : @error HTTP 401 Not authorized
+ : @error HTTP 500 Storage error
+ :
+ : Other effects:
+ : * A change record is added to the resource
+ : * The new resource is owned by the current user, group owner=current user, and mode is 664
+ :)
+declare
+ %rest:POST("{$body}")
+ %rest:path("/api/data/original")
+ %rest:query-param("validate", "{$validate}")
+ %rest:consumes("application/xml", "application/tei+xml", "text/xml")
+ function orig:post(
+ $body as document-node(),
+ $validate as xs:string*
+ ) as item()+ {
+ let $data-path := concat($orig:data-type, "/", $body/tei:TEI/@xml:lang)
+ let $api-path-base := api:uri-of($orig:api-path-base)
+ return
+ crest:post(
+ $data-path,
+ $orig:path-base,
+ $api-path-base,
+ $body,
+ orig:validate#2,
+ orig:validate-report#2,
+ (),
+ (),
+ $validate[1]
+ )
+};
+
+declare function orig:put(
+ $name as xs:string,
+ $body as document-node()
+ ) as item()+ {
+ orig:put($name, $body, ())
+ };
+
+(:~ Edit/replace a document in the database
+ : @param $name Name of the document to replace
+ : @param $body New document
+ : @param $validate Validate without writing to the database
+ : @return HTTP 200 If successfully validated
+ : @return HTTP 204 If successful
+ : @error HTTP 400 Invalid XML; Attempt to edit a read-only part of the document
+ : @error HTTP 401 Unauthorized - not logged in
+ : @error HTTP 403 Forbidden - the document can be found, but is not writable by you
+ : @error HTTP 404 Not found
+ : @error HTTP 500 Storage error
+ :
+ : A change record is added to the resource
+ : TODO: add xml:id to required places too
+ :)
+declare
+ %rest:PUT("{$body}")
+ %rest:path("/api/data/original/{$name}")
+ %rest:query-param("validate", "{$validate}")
+ %rest:consumes("application/xml", "text/xml")
+ function orig:put(
+ $name as xs:string,
+ $body as document-node(),
+ $validate as xs:string*
+ ) as item()+ {
+ crest:put(
+ $orig:data-type, $name, $body,
+ orig:validate#2,
+ orig:validate-report#2,
+ (),
+ $validate[1]
+ )
+};
+
+(:~ Get access/sharing data for a document
+ : @param $name Name of document
+ : @param $user User to get access as
+ : @return HTTP 200 and an access structure (a:access) or user access (a:user-access)
+ : @error HTTP 400 User does not exist
+ : @error HTTP 404 Document not found or inaccessible
+ :)
+declare
+ %rest:GET
+ %rest:path("/api/data/original/{$name}/access")
+ %rest:query-param("user", "{$user}")
+ %rest:produces("application/xml")
+ function orig:get-access(
+ $name as xs:string,
+ $user as xs:string*
+ ) as item()+ {
+ crest:get-access($orig:data-type, $name, $user)
+};
+
+(:~ Set access/sharing data for a document
+ : @param $name Name of document
+ : @param $body New sharing rights, as an a:access structure
+ : @return HTTP 204 No data, access rights changed
+ : @error HTTP 400 Access structure is invalid
+ : @error HTTP 401 Not authorized
+ : @error HTTP 403 Forbidden
+ : @error HTTP 404 Document not found or inaccessible
+ :)
+declare
+ %rest:PUT("{$body}")
+ %rest:path("/api/data/original/{$name}/access")
+ %rest:consumes("application/xml", "text/xml")
+ function orig:put-access(
+ $name as xs:string,
+ $body as document-node()
+ ) as item()+ {
+ crest:put-access($orig:data-type, $name, $body)
+};
+
+(:~ Get a flattened version of the original data resource
+ : @param $name The resource to get
+ : @return HTTP 200 A TEI header with a flattened version of the resource as XML
+ : @error HTTP 404 Not found (or not available)
+ :)
+declare
+ %rest:GET
+ %rest:path("/api/data/original/{$name}/flat")
+ %rest:produces("application/xml", "text/xml")
+ function orig:get-flat(
+ $name as xs:string
+ ) as item()+ {
+ let $doc := crest:get($orig:data-type, $name)
+ return
+ if ($doc instance of document-node())
+ then format:display-flat($doc, map {}, $doc)
+ else $doc
+};
+
+(:~ find all linkage documents linked to the given document, conditioned on the query string $q
+ : @return j:parallelText elements that map to the linkage
+ :)
+declare function orig:linkage-query-function(
+ $doc as document-node(),
+ $q as xs:string?
+) as element()* {
+ let $collection := collection("/db/data/linkage")
+ let $queried :=
+ if ($q)
+ then $collection//j:parallelText[contains(tei:idno, $q)]
+ else $collection//j:parallelText
+ return
+ ridx:query(
+ $queried/tei:linkGrp[@domains],
+ $doc//j:streamText)/parent::*
+};
+
+(:~ linkage results are given as j:parallelText elements.
+ : The title is the translation id
+ :)
+declare function orig:linkage-title-function(
+ $e as element(j:parallelText)
+ ) as xs:string {
+ $e/tei:idno/string()
+};
+
+(:~ Get a list of ids that are linked to this document
+ : @param $name The resource to get the linkage list
+ : @return HTTP 200 A list of linked resources
+ : @error HTTP 404 Not found (or not available)
+ :)
+declare
+ %rest:GET
+ %rest:path("/api/data/original/{$name}/linkage")
+ %rest:query-param("q", "{$q}", "")
+ %rest:query-param("start", "{$start}", 1)
+ %rest:query-param("max-results", "{$max-results}", 100)
+ %rest:produces("application/xhtml+xml", "application/xml", "text/xml", "text/html")
+ %output:method("xhtml")
+ function orig:get-linkage(
+ $name as xs:string,
+ $q as xs:string*,
+ $start as xs:integer*,
+ $max-results as xs:integer*
+ ) as item()+ {
+ let $doc := crest:get($orig:data-type, $name)
+ return
+ if ($doc instance of document-node())
+ then
+ let $query-function := orig:linkage-query-function($doc, ?)
+ let $list-function := function() as element()* { orig:linkage-query-function($doc, ()) }
+ return
+ crest:list($q, $start, $max-results,
+ "Linkage to " || $name,
+ api:uri-of("/api/data/linkage"),
+ $query-function, $list-function,
+ (),
+ orig:linkage-title-function#1
+ )
+ else $doc
+};
+
+(:~ Save a flattened version of the original data resource.
+ : The resource must already exist.
+ : @param $name The resource to get
+ : @return HTTP 204 Success
+ : @error HTTP 400 Flat XML cannot be reversed; Invalid XML; Attempt to edit a read-only part of the document
+ : @error HTTP 401 Unauthorized - not logged in
+ : @error HTTP 403 Forbidden - the document can be found, but is not writable by you
+ : @error HTTP 404 Not found
+ : @error HTTP 500 Storage error
+ :)
+declare
+ %rest:PUT("{$body}")
+ %rest:path("/api/data/original/{$name}/flat")
+ %rest:consumes("application/xml", "text/xml")
+ function orig:put-flat(
+ $name as xs:string,
+ $body as document-node()
+ ) as item()+ {
+ let $doc := orig:get($name)
+ return
+ if ($doc instance of document-node())
+ then
+ let $reversed := format:reverse($body, map {})
+ return
+ orig:put($name, $reversed)
+ else
+ (: error in get (eg, 404) :)
+ $doc
+};
+
+
+(:~ Get a version of the original data resource with combined hierarchies
+ : @param $name The resource to get
+ : @param $transclude If true(), transclude all pointers, otherwise (default), return the pointers only.
+ : @return HTTP 200 A TEI header with a combined hierarchy version of the resource as XML
+ : @error HTTP 404 Not found (or not available)
+ :)
+declare
+ %rest:GET
+ %rest:path("/api/data/original/{$name}/combined")
+ %rest:query-param("transclude", "{$transclude}")
+ %rest:produces("application/xml", "text/xml")
+ %output:method("xml")
+ function orig:get-combined(
+ $name as xs:string,
+ $transclude as xs:boolean*
+ ) as item()+ {
+ let $doc := crest:get($orig:data-type, $name)
+ return
+ if ($doc instance of document-node())
+ then
+ if ($transclude[1])
+ then
+ format:compile($doc, map {}, $doc)
+ else
+ format:unflatten($doc, map {}, $doc)
+ else $doc
+};
+
+(:~ Get a version of the original data resource with combined hierarchies in HTML
+ : @param $name The resource to get
+ : @param $transclude If true(), transclude all pointers, otherwise (default), return the pointers only.
+ : @return HTTP 200 An HTML file
+ : @error HTTP 404 Not found (or not available)
+ :)
+declare
+ %rest:GET
+ %rest:path("/api/data/original/{$name}/combined")
+ %rest:query-param("transclude", "{$transclude}")
+ %rest:produces("application/xhtml+xml", "text/html")
+ %output:method("xhtml")
+ %output:indent("yes")
+ function orig:get-combined-html(
+ $name as xs:string,
+ $transclude as xs:boolean*
+ ) as item()+ {
+ let $doc := crest:get($orig:data-type, $name)
+ return
+ if ($doc instance of document-node())
+ then
+ format:html($doc, map {}, $doc, ($transclude, false())[1])
+ else $doc
+};
+
+(:~ Background compile an original data resource with combined hierarchies in HTML.
+ : @param $name The resource to background compile
+ : @param $format output format: may be 'xml' or 'html' (default).
+ : @param $transclude if true(), transclude all pointers, otherwise (default), return the pointers only.
+ : @return HTTP 202 A Location header pointing to the job status API
+ : @error HTTP 400 Bad output format
+ : @error HTTP 404 Not found (or not available)
+ :)
+declare
+ %rest:POST
+ %rest:path("/api/data/original/{$name}/combined")
+ %rest:query-param("transclude", "{$transclude}")
+ %rest:query-param("format", "{$format}")
+ %rest:produces("text/plain")
+ %output:method("xml")
+ %output:indent("yes")
+ function orig:post-combined-job(
+ $name as xs:string,
+ $transclude as xs:boolean*,
+ $format as xs:string*
+ ) as item()+ {
+ let $doc := crest:get($orig:data-type, $name)
+ let $format :=
+ if (exists($format))
+ then $format[1]
+ else 'html'
+ return
+ if (not($format=('html','xml')))
+ then api:rest-error(400, "Bad format. Must be one of 'xml' or 'html'", $format)
+ else if ($doc instance of document-node())
+ then
+ let $doc-path := "doc('" || document-uri($doc) || "')"
+ let $transclude-string := string(($transclude, false())[1]) || "()"
+ let $job-id := status:start-job($doc)
+ let $params-string := "map { 'format:status-job-id' := '" || $job-id || "' }"
+ let $preamble := "xquery version '3.0';
+ import module namespace format='http://jewishliturgy.org/modules/format' at '/db/apps/opensiddur-server/modules/format.xqm';
+ let $b :=
+"
+ let $postamble := "
+return util:log-system-out(('compiled ', document-uri($b)))"
+ let $async :=
+ if ($format = 'html')
+ then (:util:eval-async("format:html($doc, map {}, $doc, ($transclude, false())[1])"):)
+ status:submit($preamble ||
+ "format:html(" || $doc-path || ", " || $params-string || ", " || $doc-path || ", " || $transclude-string || ")" || $postamble)
+ else
+ if ($transclude[1])
+ then status:submit($preamble ||
+ "format:compile(" || $doc-path || ", " || $params-string || ", " || $doc-path || ")" ||
+ $postamble)
+ else status:submit($preamble ||
+ "format:unflatten(" || $doc-path || ", " || $params-string || ", " || $doc-path || ")" ||
+ $postamble)
+(:
+ util:eval-async("
+ if ($transclude[1])
+ then
+ format:compile($doc, map {}, $doc)
+ else
+ format:unflatten($doc, map {}, $doc)
+ ")
+:)
+ return
+
+
+ text
+
+
+
+
+
+ else $doc
+};
+
+
+(:~ for debugging only :)
+declare
+ %rest:GET
+ %rest:path("/api/data/original/{$name}/html")
+ %rest:query-param("transclude", "{$transclude}")
+ %rest:produces("application/xhtml+xml", "text/html")
+ %output:method("xhtml")
+ %output:indent("yes")
+ function orig:get-combined-html-forced(
+ $name as xs:string,
+ $transclude as xs:boolean*
+ ) as item()+ {
+ orig:get-combined-html($name, $transclude)
+};
\ No newline at end of file
diff --git a/opensiddur-server/src/api/data/outlines.xqm b/opensiddur-server/src/api/data/outlines.xqm
new file mode 100644
index 00000000..bdebfebb
--- /dev/null
+++ b/opensiddur-server/src/api/data/outlines.xqm
@@ -0,0 +1,768 @@
+xquery version "3.1";
+(: Copyright 2016,2018 Efraim Feinstein
+ : Licensed under the GNU Lesser General Public License, version 3 or later
+ :)
+(:~ Outlines data API
+ : @author Efraim Feinstein
+ :)
+
+module namespace outl = 'http://jewishliturgy.org/api/data/outlines';
+
+declare namespace ol="http://jewishliturgy.org/ns/outline/1.0";
+declare namespace olx="http://jewishliturgy.org/ns/outline/responses/1.0";
+declare namespace tei="http://www.tei-c.org/ns/1.0";
+declare namespace j="http://jewishliturgy.org/ns/jlptei/1.0";
+declare namespace output="http://www.w3.org/2010/xslt-xquery-serialization";
+declare namespace rest="http://exquery.org/ns/restxq";
+declare namespace error="http://jewishliturgy.org/errors";
+declare namespace http="http://expath.org/ns/http-client";
+
+import module namespace api="http://jewishliturgy.org/modules/api"
+ at "../../modules/api.xqm";
+import module namespace app="http://jewishliturgy.org/modules/app"
+ at "../../modules/app.xqm";
+import module namespace crest="http://jewishliturgy.org/modules/common-rest"
+ at "../../modules/common-rest.xqm";
+import module namespace data="http://jewishliturgy.org/modules/data"
+ at "../../modules/data.xqm";
+import module namespace orig="http://jewishliturgy.org/api/data/original"
+ at "original.xqm";
+import module namespace paths="http://jewishliturgy.org/modules/paths"
+ at "../../modules/paths.xqm";
+import module namespace src="http://jewishliturgy.org/api/data/sources"
+ at "sources.xqm";
+
+declare variable $outl:data-type := "outlines";
+declare variable $outl:schema := concat($paths:schema-base, "/outline.rnc");
+declare variable $outl:schematron := ();
+declare variable $outl:path-base := concat($data:path-base, "/", $outl:data-type);
+declare variable $outl:api-path-base := concat("/api/data/", $outl:data-type);
+
+(:~ validate
+ : @param $doc The document to be validated
+ : @param $old-doc The document it is replacing, if any
+ : @return true() if valid, false() if not
+ : @see outl:validate-report
+ :)
+declare function outl:validate(
+ $doc as item(),
+ $old-doc as document-node()?
+ ) as xs:boolean {
+ crest:validate(
+ $doc, $old-doc,
+ xs:anyURI($outl:schema), (),
+ ()
+ )
+};
+
+(:~ validate, returning a validation report
+ : @param $doc The document to be validated
+ : @param $old-doc The document it is replacing, if any
+ : @return true() if valid, false() if not
+ : @see outl:validate
+ :)
+declare function outl:validate-report(
+ $doc as item(),
+ $old-doc as document-node()?
+ ) as element() {
+ crest:validate-report(
+ $doc, $old-doc,
+ xs:anyURI($outl:schema), (),
+ ()
+ )
+};
+
+(:~ return the outline path to a given item :)
+declare function outl:get-outline-path(
+ $e as element()
+ ) as xs:string {
+ typeswitch ($e)
+ case element(ol:outline) return $e/ol:title
+ default return (outl:get-outline-path($e/parent::*) || "/" || $e/ol:title || "[" ||
+ string(count($e/preceding-sibling::ol:item) + 1) || "]")
+};
+
+(:~ find the API paths for the given title :)
+declare function outl:title-search(
+ $title as xs:string
+) as xs:string* {
+ let $title-plus := string-join(for $t in tokenize($title, '\s+') return "+" || $t, " ")
+ for $doc in collection($orig:path-base)//tei:titleStmt/tei:title[ft:query(., $title-plus)]/root(.) | ()
+ return replace(data:db-path-to-api(document-uri($doc)), "^(/exist/restxq)?/api", "")
+};
+
+(: get the status of a document, given the outline and uri.
+ : If the URI does not exist, return empty :)
+declare function outl:get-status(
+ $outline as document-node(),
+ $uri as xs:string?
+ ) as xs:string? {
+ let $source := $outline/ol:outline/ol:source
+ where exists($uri)
+ return data:doc($uri)//tei:sourceDesc/tei:bibl[tei:ptr[@type="bibl"]/@target=$source]/@j:docStatus/string()
+};
+
+
+(:~ given an item definition and a document, check if the referenced pointers in the
+ : document pointed to be $same-as-uri are the same and in the same order as the ones in
+ : the item.
+ :)
+declare function outl:check-sameas-pointers(
+ $e as element(ol:item),
+ $same-as-uri as xs:string
+ ) as element(olx:warning)? {
+ let $warning :=
+ This outline item has subordinate items that are either not referenced in the resource or are referenced and are a different order than they are presented in the outline.
+ let $doc := data:doc($same-as-uri)
+ (: if the document doesn't exist, it's new, so we can ignore it... :)
+ where exists($doc)
+ return
+ let $in-document-pointers := $doc//j:streamText/tei:ptr
+ let $has-warning :=
+ if (count($in-document-pointers) ne count($e/ol:item))
+ then 1
+ else
+ for $item at $n in $e/ol:item
+ let $item-title := normalize-space($item/ol:title)
+ let $target :=
+ if (contains($in-document-pointers[$n]/@target, '#'))
+ then substring-before($in-document-pointers[$n]/@target, '#')
+ else $in-document-pointers[$n]/@target/string()
+ let $pointer-target := if ($target) then data:doc($target) else ()
+ let $pointer-title := normalize-space($pointer-target//tei:titleStmt/tei:title["main"=@type or not(@type)]/string())
+ where not($pointer-title=$item-title)
+ return 1
+ where exists($has-warning)
+ return $warning
+};
+
+(:~ @return true() if $node1 and $node2 have the same (direct) subordinates by title :)
+declare function outl:has-same-subordinates(
+ $node1 as element(ol:item),
+ $node2 as element(ol:item)
+ ) as xs:boolean {
+ if (empty($node1/ol:item) and empty($node2/ol:item))
+ then true()
+ else if (count($node1/ol:item) != count($node2/ol:item))
+ then false()
+ else (
+ every $value in (
+ for $item at $n in $node1/ol:item
+ return normalize-space($item/ol:title)=normalize-space($node2/ol:item[$n]/ol:title)
+ ) satisfies $value
+ )
+};
+
+(:~ check an outline for duplicate titles:
+ : (0) For each item without a duplicate title:
+ : return the item as-is.
+ : (1) For each item with a duplicate title external to this outline:
+ : (a) If there is no confirmation of it being duplicate:
+ : add an olx:sameAs entry with olx:uri for each duplicate entry
+ : (b) If there is a confirmation of it being duplicate:
+ : maintain the existing olx:sameAs entry
+ : add an olx:sameAs entry for other duplicates
+ : (c) If there are subordinate ol:item elements and olx:sameAs is present:
+ : for each sameAs element:
+ : (i) if the item does not point to the same items, issue an olx:warning with a textual message
+ : (ii) if the item does not point to the same items in the same order, issue an olx:warning with a textual message
+ : (d) If the document has a status with respect to this source and a confirmed sameAs, an olx:status element is returned
+ : (2) For each item with a duplicate title internal to this outline:
+ : (a) If one is empty and the other is empty or has ol:item, do nothing
+ : (b) If both have identically titled and ordered ol:items, do nothing
+ : (c) If both have ol:item that are not identically titled or identically ordered, issue olx:error
+ : @return olx:sameAs when necessary
+ :)
+declare function outl:check(
+ $nodes as node()*
+) as node()* {
+ for $node in $nodes
+ return
+ typeswitch($node)
+ case document-node() return document { outl:check($node/*) }
+ case element(ol:outline) return
+ (: The outline element cannot be a duplicate. If it has a Uri element,
+ : the URI is itself.
+ :)
+ element ol:outline {
+ $node/@*,
+ outl:check($node/node())
+ }
+ case element(ol:item) return
+ element ol:item {
+ $node/@*,
+ let $duplicate-titles := outl:title-search($node/ol:title)
+ let $status := outl:get-status(root($node), $node/olx:sameAs[olx:yes]/olx:uri/string())
+ return (
+ $node/(ol:title, ol:lang, ol:resp, ol:from|ol:to),
+ for $internal-duplicate-title-item in root($node)//ol:item[ol:title=$node/ol:title][not(. is $node)]
+ where
+ (: ignorable duplicates :)
+ not(
+ count($node/ol:item)=0 or
+ count($internal-duplicate-title-item/ol:item)=0 or
+ outl:has-same-subordinates($internal-duplicate-title-item, $node) )
+ return
+ element olx:error {
+ concat("Duplication of a title is only allowed for items that have exactly the same subordinates or where one of the items has no subordinates. The duplicate outline item is: ", outl:get-outline-path($internal-duplicate-title-item))
+ },
+ for $duplicate-title in $duplicate-titles
+ order by $duplicate-title
+ return
+ element olx:sameAs {
+ element olx:uri { $duplicate-title },
+ (: copy the remaining elements (yes, no, etc) :)
+ $node/olx:sameAs[olx:uri=$duplicate-title]/(* except (olx:uri, olx:warning)),
+ (: if there is no existing olx:yes or olx:no *and* another sibling has olx:yes, insert olx:no :)
+ if (empty($node/olx:sameAs[olx:uri=$duplicate-title]/(olx:yes|olx:no))
+ and exists($node/olx:sameAs/olx:yes))
+ then
+ element olx:no {}
+ else (),
+ (: add appropriate warnings :)
+ outl:check-sameas-pointers($node, $duplicate-title)
+ },
+ if (exists($status))
+ then
+ element olx:status { $status }
+ else (),
+ outl:check($node/ol:item)
+ )
+ }
+ default return $node
+};
+
+(:~ return whether a document is executable (if empty)
+ : otherwise, return messages indicating why not
+ : assumes document is checked
+ :)
+declare function outl:is-executable(
+ $doc as document-node()
+ ) as element(message)* {
+ let $chk := $doc
+ return (
+ for $item in $chk//ol:item
+ where exists($item/olx:sameAs[not(olx:yes|olx:no)]) and empty($item/olx:sameAs[olx:yes])
+ return
+ The item has a title that duplicates existing documents, and no confirmation of whether those documents are identical to the one in the outline: {outl:get-outline-path($item)},
+ for $error in $chk//olx:error
+ return {$error/node()}
+ )
+};
+
+declare variable $outl:responsibilities := map {
+ "ann" : "Annotated by",
+ "fac" : "Scanned by",
+ "fnd" : "Funded by",
+ "mrk" : "Markup edited by",
+ "pfr" : "Proofread by",
+ "spn" : "Sponsored by",
+ "trc" : "Transcribed by",
+ "trl" : "Translated by"
+};
+
+(:~ get the name of a contributor by uri :)
+declare function outl:contributor-lookup(
+ $uri as xs:string
+ ) as xs:string? {
+ data:doc($uri)/j:contributor/(tei:name, tei:orgName)[1]
+};
+
+(:~ get a template document specified by the ol:item or ol:outline
+ : Note: the document may have pointers to unknown uris temporarily stored in tei:seg with n="outline:filler"
+ : @param $e The item(s) or outline element that represent a single title
+ : @param $old-doc If this is an edit to a pre-existing document, the pre-existing doc
+ : @return the document content
+ :)
+declare function outl:template(
+ $e as element()+,
+ $old-doc as document-node()?
+ ) as document-node() {
+ let $f := $e[1]
+ let $sub-items := $e[ol:item][1]/ol:item (: first entry that has items :)
+ let $outline := root($f)/ol:outline
+ let $lang := ($outline/ol:lang, $e/ol:lang)[1]/string()
+ return
+ document {
+
+
+
+
+ {$f/ol:title/string()}
+ {
+ for $resp in $e/ol:resp
+ group by
+ $contributor := $resp/ol:contributor/string(),
+ $responsibility := $resp/ol:responsibility/string()
+ return
+
+ { $outl:responsibilities($responsibility) }
+ { outl:contributor-lookup($contributor) }
+
+ }
+
+
+
+ Open Siddur Project
+
+
+
+
+ { format-date(current-date(), '[Y0001]-[M01]-[D01]') }
+
+
+ { $old-doc//tei:sourceDesc/tei:bibl[not(tei:ptr[@type="bibl"][@target=$outline/ol:source])] }
+
+ { src:title-function(data:doc($outline/ol:source)) }
+
+
+ {
+ for $it in $e[ol:from][ol:to]
+ return
+
+ }
+
+
+
+
+ {if (exists($old-doc)) then 'Edited' else 'Created'} by the outline tool.
+ { $old-doc//tei:revisionDesc/tei:change }
+
+
+
+ {
+ if (exists($sub-items))
+ then
+ for $sub-item at $n in $sub-items
+ let $sub-item-uri :=
+ $sub-item/olx:sameAs[olx:yes]/olx:uri/string()
+ return
+ if ($sub-item-uri)
+ then
+ let $target := (data:doc($sub-item-uri)//j:streamText/@xml:id/string(), "stream")[1]
+ return
+
+ else
+ {outl:get-outline-path($sub-item)}
+ else (
+ FILL ME IN,
+ {$f/ol:title/string()}
+ )
+ }
+
+
+ }
+};
+
+declare function outl:rewrite-outline(
+ $nodes as node()*,
+ $filler-map as map(*)
+ ) as node()* {
+ for $node in $nodes
+ return
+ typeswitch($node)
+ case document-node() return document { outl:rewrite-outline($node/node(), $filler-map) }
+ case element(ol:outline) return
+ let $uri := $filler-map(outl:get-outline-path($node))
+ return
+ element ol:outline {
+ $node/(ol:source | ol:license | ol:title | ol:lang | ol:resp | ol:from | ol:to),
+ element olx:uri { $uri },
+ element olx:status { outl:get-status(root($node), $uri) },
+ outl:rewrite-outline($node/ol:item, $filler-map)
+ }
+ case element(ol:item) return
+ let $uri := $filler-map(outl:get-outline-path($node))
+ return
+ element ol:item {
+ $node/(ol:title | ol:lang | ol:resp | ol:from | ol:to | olx:sameAs[not(olx:uri=$uri)]),
+ element olx:sameAs {
+ element olx:uri { $uri },
+ element olx:yes { () },
+ $node/olx:sameAs/olx:warning
+ },
+ $node/olx:error,
+ element olx:status { outl:get-status(root($node), $uri) },
+ outl:rewrite-outline($node/ol:item, $filler-map)
+ }
+ default return $node
+};
+
+(:~ transform an existing document by adding a source, pages or change record, if necessary :)
+declare function outl:transform-existing(
+ $nodes as node()*,
+ $item as item()+
+ ) as node()* {
+ let $source := root($item[1])//ol:source/string()
+ for $node in $nodes
+ return
+ typeswitch($node)
+ case document-node() return
+ (: short circuit if we don't need to do anything :)
+ if (
+ every $it in $item
+ satisfies exists($node//tei:sourceDesc[
+ tei:bibl
+ [@j:docStatus]
+ [tei:ptr[@type="bibl"][$source=@target]]
+ [tei:biblScope[@unit="pages"][@from le $it/ol:from][@to ge $it/ol:to]]
+ ])
+ ) then $node
+ else document { outl:transform-existing($node/node(), $item) }
+ case element(tei:sourceDesc) return
+ element tei:sourceDesc {
+ $node/@*,
+ if (empty(
+ $node/tei:bibl
+ [tei:ptr[@type="bibl"][$source=@target]]))
+ then
+
+ { src:title-function(data:doc($source)) }
+
+
+ {
+ for $it in $item[ol:from][ol:to]
+ return
+
+ }
+
+ else (),
+ outl:transform-existing($node/node(), $item)
+ }
+ case element(tei:bibl) return
+ if ($node/tei:ptr[@type="bibl"]/@target=$source)
+ then
+ element tei:bibl {
+ $node/@*,
+ if (not($node/@j:docStatus))
+ then attribute j:docStatus { "outlined" }
+ else (),
+ $node/node(),
+ for $it in $item[ol:from][ol:to]
+ where empty($node/tei:biblScope[@unit="pages"][@from le $it/ol:from][@to ge $it/ol:to])
+ return
+
+
+ }
+ else $node
+ case element(tei:teiHeader) return
+ element tei:teiHeader {
+ $node/@*,
+ outl:transform-existing($node/node(), $item),
+ if (empty($node/tei:revisionDesc))
+ then
+ element tei:revisionDesc {
+ element tei:change { attribute type { "edited" }, "Edited by the outline tool." }
+ }
+ else ()
+
+ }
+ case element(tei:revisionDesc) return
+ element tei:revisionDesc {
+ $node/@*,
+ element tei:change { attribute type { "edited" }, "Edited by the outline tool." },
+ $node/node()
+ }
+ case element() return
+ element { QName(namespace-uri($node), name($node)) }{
+ $node/@*,
+ outl:transform-existing($node/node(), $item)
+ }
+ case text() return $node
+ case comment() return $node
+ default return outl:transform-existing($node/node(), $item)
+};
+(:~ execute an outline document, assuming it has been checked and is found to be executable, see also outl:is-executable
+ : Execution pattern:
+ : (1) for each title in an ol:outline or ol:item:
+ : (a) find the item that has subordinate items and execute that item; otherwise choose the first one
+ : (b) if multiple items exist with the same titles, all of their scopes must be represented
+ : (c) if the item has an olx:sameAs[olx:yes], record the title=uri connection, but do not edit the file
+ : otherwise create a file template referencing each item
+ : (.) rewrite the outline with all the uris and statuses present
+ :)
+declare function outl:execute(
+ $name as xs:string,
+ $doc as document-node()
+ ) {
+ let $paths-to-uris :=
+ map:merge(
+ for $item in ($doc//ol:item, $doc/ol:outline)
+ group by
+ $title := $item/ol:title/string(),
+ $forced-uri := ($item/olx:sameAs[olx:yes]/olx:uri, $item/olx:uri)/string()
+ return
+ let $old-doc := if ($forced-uri) then data:doc($forced-uri) else ()
+ let $template :=
+ if ($old-doc)
+ then outl:transform-existing($old-doc, $item)
+ else outl:template($item, $old-doc)
+ let $result :=
+ if ($forced-uri)
+ then
+ if ($old-doc is $template)
+ then ()
+ else orig:put(tokenize($forced-uri, '/')[last()], $template)
+ else
+ orig:post($template)
+ let $null :=
+ if ($result/self::rest:response/http:response/@status >= 400)
+ then error(xs:QName("error:OUTLINE"), ("While writing from template " || ($forced-uri) || " received an error:" || $result/message) )
+ else ()
+ let $location := ($result/self::rest:response/http:response/http:header[@name="Location"]/@value/string(), $forced-uri)[1]
+ for $it in $item
+ return
+ (: a mapping between outline paths and http location :)
+ map:entry(outl:get-outline-path($it), replace($location, '^(.*/api/)', '/'))
+ )
+ let $all-uris :=
+ distinct-values(for $outline-path in map:keys($paths-to-uris) return $paths-to-uris($outline-path))
+ let $rewrite-filler :=
+ for $uri in $all-uris
+ let $doc-uri := data:doc($uri)
+ let $rewritten := outl:rewrite-filler($doc-uri, $paths-to-uris)
+ where not($rewritten is $doc-uri)
+ return
+ let $put := orig:put(tokenize($uri, '/')[last()], $rewritten)
+ where $put/self::rest:response/http:response/@status >= 400
+ return error(xs:QName("error:OUTLINE"), ("While writing " || $uri || "received an error:" || $put/message) )
+ let $rewritten-outline := outl:rewrite-outline($doc, $paths-to-uris)
+ let $outline-doc-name := replace(tokenize(document-uri($doc), '/')[last()], '\.xml$', '')
+ let $save := outl:put($name, $rewritten-outline)
+ return $rewritten-outline
+};
+
+declare function outl:rewrite-filler(
+ $nodes as node()*,
+ $filler-map as map(*)
+ ) as node()* {
+ for $node in $nodes
+ return
+ typeswitch($node)
+ case document-node() return
+ if (exists($node//tei:seg[@n="outline:filler"]))
+ then document { outl:rewrite-filler($node/node(), $filler-map) }
+ else $node
+ case element(tei:revisionDesc) return
+ element tei:revisionDesc {
+ $node/@*,
+ element tei:change {
+ attribute type { "edited" },
+ text { "Rewritten by the outline tool." }
+ },
+ $node/tei:change
+ }
+ case element() return
+ if ($node/self::tei:seg and $node/@n="outline:filler")
+ then
+ let $uri := $filler-map($node/string())
+ let $streamText-id := (data:doc($uri)//j:streamText[1]/@xml:id/string(), "stream")[1] (: if the document doesn't exist, we are about to create it :)
+ return
+
+ else
+ element { QName(namespace-uri($node), name($node)) }{
+ $node/@*,
+ outl:rewrite-filler($node/node(), $filler-map)
+ }
+ default return $node
+};
+
+(:~ Get an XML document by name
+ : @param $name Document name as a string
+ : @error HTTP 404 Not found (or not available)
+ :)
+declare
+ %rest:GET
+ %rest:path("/api/data/outlines/{$name}")
+ %rest:query-param("check", "{$check}")
+ %rest:produces("application/xml", "text/xml", "application/tei+xml")
+ function outl:get(
+ $name as xs:string,
+ $check as xs:string*
+ ) as item()+ {
+ let $doc := crest:get($outl:data-type, $name)
+ return
+ if (exists($check) and $doc instance of document-node())
+ then outl:check($doc)
+ else $doc
+};
+
+(:~ List or full-text query outline data
+ : @param $q text of the query, empty string for all
+ : @param $start first document to list
+ : @param $max-results number of documents to list
+ : @return a list of documents that match the search. If the documents match a query, return the context.
+ : @error HTTP 404 Not found
+ :)
+declare
+ %rest:GET
+ %rest:path("/api/data/outlines")
+ %rest:query-param("q", "{$q}", "")
+ %rest:query-param("start", "{$start}", 1)
+ %rest:query-param("max-results", "{$max-results}", 100)
+ %rest:produces("application/xhtml+xml", "application/xml", "text/xml", "text/html")
+ %output:method("xhtml")
+ function outl:list(
+ $q as xs:string*,
+ $start as xs:integer*,
+ $max-results as xs:integer*
+ ) as item()+ {
+ crest:list($q, $start, $max-results,
+ "Outline data API", api:uri-of($outl:api-path-base),
+ outl:query-function#1, outl:list-function#0,
+ (,
+ ,
+ $crest:additional-validate),
+ outl:title-function#1
+ )
+};
+
+(: support function for queries :)
+declare function outl:query-function(
+ $query as xs:string
+ ) as element()* {
+ let $c := collection($outl:path-base)
+ return $c//ol:outline[ft:query(.,$query)]|$c//ol:outline/ol:title[ft:query(.,$query)]
+};
+
+declare function outl:title-function(
+ $n as node()
+ ) as xs:string {
+ root($n)/ol:outline/ol:title/string()
+};
+
+(: support function for list :)
+declare function outl:list-function(
+ ) as element()* {
+ for $doc in collection($outl:path-base)/ol:outline
+ order by $doc/ol:outline/ol:title ascending
+ return $doc
+};
+
+(:~ Delete an outline text
+ : @param $name The name of the text
+ : @return HTTP 204 (No data) if successful
+ : @error HTTP 400 Cannot be deleted and a reason, including existing external references
+ : @error HTTP 401 Not authorized
+ : @error HTTP 403 Forbidden - logged in as a user who does not have write access to the document
+ : @error HTTP 404 Not found
+ :)
+declare
+ %rest:DELETE
+ %rest:path("/api/data/outlines/{$name}")
+ function outl:delete(
+ $name as xs:string
+ ) as item()+ {
+ crest:delete($outl:data-type, $name)
+};
+
+declare function outl:post(
+ $body as document-node()
+ ) as item()+ {
+ outl:post($body, ())
+ };
+
+(:~ Post a new outline document
+ : @param $body The outline document
+ : @param $validate Validate the document, instead of posting
+ : @return HTTP 200 if validated successfully
+ : @return HTTP 201 if created successfully
+ : @error HTTP 400 Invalid outline XML
+ : @error HTTP 401 Not authorized
+ : @error HTTP 500 Storage error
+ :
+ : Other effects:
+ : * The new resource is owned by the current user, group owner=current user, and mode is 664
+ :)
+declare
+ %rest:POST("{$body}")
+ %rest:path("/api/data/outlines")
+ %rest:query-param("validate", "{$validate}")
+ %rest:consumes("application/xml", "application/tei+xml", "text/xml")
+ function outl:post(
+ $body as document-node(),
+ $validate as xs:string*
+ ) as item()+ {
+ let $api-path-base := api:uri-of($outl:api-path-base)
+ return
+ crest:post(
+ $outl:data-type,
+ $outl:path-base,
+ $api-path-base,
+ $body,
+ outl:validate#2,
+ outl:validate-report#2,
+ outl:title-function#1,
+ false(),
+ $validate[1]
+ )
+};
+
+(:~ Execute an outline document
+ : @param $body Anything...
+ : @return HTTP 201 if created successfully
+ : @error HTTP 400 Invalid outline XML or outline is not executable
+ : @error HTTP 401 Not authorized
+ : @error HTTP 500 Storage error
+ :
+ : Other effects:
+ : The outline file is saved with the URIs
+ :)
+declare
+ %rest:POST
+ %rest:path("/api/data/outlines/{$name}/execute")
+ %rest:consumes("application/xml", "application/tei+xml", "text/xml")
+ function outl:post-execute(
+ $name as xs:string
+ ) as item()+ {
+ let $document := outl:get($name, "check")
+ return
+ if ($document instance of document-node())
+ then
+ let $executable-errors := outl:is-executable($document)
+ return
+ if (exists($executable-errors))
+ then api:rest-error(400, $executable-errors)
+ else outl:execute($name, $document)
+ else $document
+};
+
+declare function outl:put(
+ $name as xs:string,
+ $body as document-node()
+ ) as item()+ {
+ outl:put($name, $body, ())
+ };
+
+(:~ Edit/replace a document in the database
+ : @param $name Name of the document to replace
+ : @param $body New document
+ : @param $validate Validate the document without writing to the database
+ : @return HTTP 200 If successfully validated
+ : @return HTTP 204 If successful
+ : @error HTTP 400 Invalid XML; Attempt to edit a read-only part of the document
+ : @error HTTP 401 Unauthorized - not logged in
+ : @error HTTP 403 Forbidden - the document can be found, but is not writable by you
+ : @error HTTP 404 Not found
+ : @error HTTP 500 Storage error
+ :
+ :)
+declare
+ %rest:PUT("{$body}")
+ %rest:path("/api/data/outlines/{$name}")
+ %rest:query-param("validate", "{$validate}")
+ %rest:consumes("application/xml", "text/xml")
+ function outl:put(
+ $name as xs:string,
+ $body as document-node(),
+ $validate as xs:string*
+ ) as item()+ {
+ crest:put(
+ $outl:data-type, $name, $body,
+ outl:validate#2,
+ outl:validate-report#2,
+ false(),
+ $validate[1]
+ )
+};
+
diff --git a/opensiddur-server/src/api/data/sources.xqm b/opensiddur-server/src/api/data/sources.xqm
new file mode 100644
index 00000000..f75035ca
--- /dev/null
+++ b/opensiddur-server/src/api/data/sources.xqm
@@ -0,0 +1,303 @@
+xquery version "3.1";
+(: Copyright 2012-2013,2016,2018 Efraim Feinstein
+ : Licensed under the GNU Lesser General Public License, version 3 or later
+ :)
+(:~ Sources (bibliographic) data API
+ : @author Efraim Feinstein
+ :)
+
+module namespace src = 'http://jewishliturgy.org/api/data/sources';
+
+declare namespace tei="http://www.tei-c.org/ns/1.0";
+declare namespace j="http://jewishliturgy.org/ns/jlptei/1.0";
+declare namespace output="http://www.w3.org/2010/xslt-xquery-serialization";
+declare namespace http="http://expath.org/ns/http-client";
+declare namespace rest="http://exquery.org/ns/restxq";
+
+import module namespace api="http://jewishliturgy.org/modules/api"
+ at "../../modules/api.xqm";
+import module namespace crest="http://jewishliturgy.org/modules/common-rest"
+ at "../../modules/common-rest.xqm";
+import module namespace data="http://jewishliturgy.org/modules/data"
+ at "../../modules/data.xqm";
+import module namespace orig="http://jewishliturgy.org/api/data/original"
+ at "original.xqm";
+import module namespace paths="http://jewishliturgy.org/modules/paths"
+ at "../../modules/paths.xqm";
+
+declare variable $src:data-type := "sources";
+declare variable $src:schema := concat($paths:schema-base, "/bibliography.rnc");
+declare variable $src:schematron := concat($paths:schema-base, "/bibliography.xsl");
+declare variable $src:path-base := concat($data:path-base, "/", $src:data-type);
+declare variable $src:api-path-base := concat("/api/data/", $src:data-type);
+
+(:~ validate
+ : @param $doc The document to be validated
+ : @return true() if valid, false() if not
+ : @see src:validate-report
+ :)
+declare function src:validate(
+ $doc as item(),
+ $old-doc as document-node()?
+ ) as xs:boolean {
+ crest:validate($doc, $old-doc,
+ xs:anyURI($src:schema), xs:anyURI($src:schematron), ())
+};
+
+(:~ validate, returning a validation report
+ : @param $doc The document to be validated
+ : @return true() if valid, false() if not
+ : @see src:validate
+ :)
+declare function src:validate-report(
+ $doc as item(),
+ $old-doc as document-node()?
+ ) as element() {
+ crest:validate-report($doc, $old-doc,
+ xs:anyURI($src:schema), xs:anyURI($src:schematron), ())
+};
+
+(:~ Get an XML document by name
+ : @param $name Document name as a string
+ : @error HTTP 404 Not found (or not available)
+ :)
+declare
+ %rest:GET
+ %rest:path("/api/data/sources/{$name}")
+ %rest:produces("application/xml", "text/xml", "application/tei+xml")
+ function src:get(
+ $name as xs:string
+ ) as item()+ {
+ crest:get($src:data-type, $name)
+};
+
+(:~ List the transcribed pages of a document
+ : @param $name the source file
+ : @error HTTP 404 not found (or not available)
+ :)
+declare
+ %rest:GET
+ %rest:path("/api/data/sources/{$name}/pages")
+ %rest:produces("application/xhtml+xml", "application/xml", "text/xml", "text/html")
+ %output:method("xhtml")
+ function src:pages(
+ $name as xs:string
+ ) as item()+ {
+ let $biblio := src:get($name)
+ return
+ if ($biblio/self::rest:response/http:response/@status/number() ge 400)
+ then $biblio
+ else
+ let $target := replace(data:db-path-to-api(document-uri($biblio)), "^(/exist/restxq)?/api", "")
+ let $max-page := $biblio//tei:extent/tei:measure[@unit='pages']/@quantity/number()
+ let $title := src:title-function($biblio)
+ let $transcribed-document-bibl :=
+ collection($orig:path-base)//tei:sourceDesc/tei:bibl[tei:ptr["bibl"=@type][$target=@target]]
+ let $transcribed-pages :=
+ for $bibl in $transcribed-document-bibl
+ let $db-uri := document-uri(root($bibl))
+ let $api := data:db-path-to-api($db-uri)
+ let $status := $bibl/@j:docStatus/string()
+ return
+ if (exists($bibl/tei:biblScope))
+ then
+ for $pg in ( xs:integer($bibl/tei:biblScope/@from) to xs:integer($bibl/tei:biblScope/@to) )
+ return
+ else
+
+ return
+
+
+ Pages for {$title}
+
+ {
+ {
+ for $page in $transcribed-pages
+ let $page-number := ($page/@pg/number(), -1)[1]
+ let $api-path := $page/@api/string()
+ let $db-path := $page/@db-doc/string()
+ let $statuses := tokenize($page/@status/string(), '\s+')
+ order by $page-number
+ return
+
{
+ for $status in $statuses
+ order by lower-case($status)
+ return
{$status}
+ }
+
+ }
+ }
+
+};
+
+(:~ List or full-text query bibliographic data
+ : @param $q text of the query, empty string for all
+ : @param $start first document to list
+ : @param $max-results number of documents to list
+ : @return a list of documents that match the search. If the documents match a query, return the context.
+ : @error HTTP 404 Not found
+ :)
+declare
+ %rest:GET
+ %rest:path("/api/data/sources")
+ %rest:query-param("q", "{$q}", "")
+ %rest:query-param("start", "{$start}", 1)
+ %rest:query-param("max-results", "{$max-results}", 100)
+ %rest:produces("application/xhtml+xml", "application/xml", "text/xml", "text/html")
+ %output:method("xhtml")
+ function src:list(
+ $q as xs:string*,
+ $start as xs:integer*,
+ $max-results as xs:integer*
+ ) as item()+ {
+ crest:list($q, $start, $max-results,
+ "Bibliographic data API", api:uri-of($src:api-path-base),
+ src:query-function#1, src:list-function#0,
+ (
+ ,
+ $crest:additional-validate
+ ),
+ src:title-function#1
+ )
+};
+
+(: Support function :)
+declare function src:query-function(
+ $query as xs:string
+ ) as element()* {
+ let $c := collection($src:path-base)
+ return $c//tei:biblStruct[ft:query(.,$query)]|$c//tei:title[ft:query(.,$query)]
+};
+
+declare function src:list-function(
+ ) as element()* {
+ for $doc in collection($src:path-base)/tei:biblStruct
+ order by src:title-function(root($doc)) ascending
+ return $doc
+};
+
+declare %private function src:title-part(
+ $tp as element()*
+ ) as xs:string? {
+ $tp/
+ normalize-space(string-join((
+ (tei:title["main"=@type],tei:title[not(@type)])[1],
+ tei:title["sub"=@type]), ": "))
+};
+
+declare function src:title-function(
+ $n as node()
+ ) as xs:string {
+ let $doc := root($n)
+ return
+ normalize-space(string-join(
+ for $e in ($doc//tei:analytic, $doc//tei:monogr, $doc//tei:series)
+ return src:title-part($e), "-"))
+};
+
+(:~ Delete a bibliographic entry text
+ : @param $name The name of the text
+ : @return HTTP 204 (No data) if successful
+ : @error HTTP 400 Cannot be deleted and a reason, including existing external references
+ : @error HTTP 401 Not authorized
+ : @error HTTP 403 Forbidden - logged in as a user who does not have write access to the document
+ : @error HTTP 404 Not found
+ :)
+declare
+ %rest:DELETE
+ %rest:path("/api/data/sources/{$name}")
+ function src:delete(
+ $name as xs:string
+ ) as item()+ {
+ crest:delete($src:data-type, $name)
+};
+
+declare function src:post(
+ $body as document-node()
+ ) as item()+ {
+ src:post($body, ())
+ };
+
+(:~ Post a new bibliographic document
+ : @param $body The bibliographic document
+ : @param $validate Validate a document, instead of posting
+ : @return HTTP 200 if validated successfully
+ : @return HTTP 201 if created successfully
+ : @error HTTP 400 Invalid bibliographic XML
+ : @error HTTP 401 Not authorized
+ : @error HTTP 500 Storage error
+ :
+ : Other effects:
+ : * The new resource is owned by the current user, group owner=everyone, and mode is 664
+ :)
+declare
+ %rest:POST("{$body}")
+ %rest:path("/api/data/sources")
+ %rest:query-param("validate", "{$validate}")
+ %rest:consumes("application/xml", "application/tei+xml", "text/xml")
+ function src:post(
+ $body as document-node(),
+ $validate as xs:string*
+ ) as item()+ {
+ let $api-path-base := api:uri-of($src:api-path-base)
+ return
+ crest:post(
+ $src:data-type,
+ $src:path-base,
+ $api-path-base,
+ $body,
+ src:validate#2,
+ src:validate-report#2,
+ src:title-function#1,
+ (),
+ $validate[1]
+ )
+};
+
+declare function src:put(
+ $name as xs:string,
+ $body as document-node()
+ ) as item()+ {
+ src:put($name, $body, ())
+ };
+
+(:~ Edit/replace a bibliographic document in the database
+ : @param $name Name of the document to replace
+ : @param $body New document
+ : @param $validate Validate only without writing to the database
+ : @return HTTP 200 If successfully validated
+ : @return HTTP 204 If successful
+ : @error HTTP 400 Invalid XML
+ : @error HTTP 401 Unauthorized - not logged in
+ : @error HTTP 403 Forbidden - the document can be found, but is not writable by you
+ : @error HTTP 404 Not found
+ : @error HTTP 500 Storage error
+ :
+ :)
+declare
+ %rest:PUT("{$body}")
+ %rest:path("/api/data/sources/{$name}")
+ %rest:query-param("validate", "{$validate}")
+ %rest:consumes("application/xml", "text/xml")
+ function src:put(
+ $name as xs:string,
+ $body as document-node(),
+ $validate as xs:string*
+ ) as item()+ {
+ crest:put(
+ $src:data-type, $name, $body,
+ src:validate#2,
+ src:validate-report#2,
+ (),
+ $validate[1]
+ )
+};
diff --git a/opensiddur-server/src/api/data/styles.xqm b/opensiddur-server/src/api/data/styles.xqm
new file mode 100644
index 00000000..5fc6ebc8
--- /dev/null
+++ b/opensiddur-server/src/api/data/styles.xqm
@@ -0,0 +1,354 @@
+xquery version "3.1";
+(: Copyright 2012-2013 Efraim Feinstein
+ : Licensed under the GNU Lesser General Public License, version 3 or later
+ :)
+(:~ Styles data API
+ : @author Efraim Feinstein
+ :)
+
+module namespace sty = 'http://jewishliturgy.org/api/data/styles';
+
+declare namespace tei="http://www.tei-c.org/ns/1.0";
+declare namespace j="http://jewishliturgy.org/ns/jlptei/1.0";
+declare namespace output="http://www.w3.org/2010/xslt-xquery-serialization";
+declare namespace rest="http://exquery.org/ns/restxq";
+
+import module namespace api="http://jewishliturgy.org/modules/api"
+ at "../../modules/api.xqm";
+import module namespace app="http://jewishliturgy.org/modules/app"
+ at "../../modules/app.xqm";
+import module namespace crest="http://jewishliturgy.org/modules/common-rest"
+ at "../../modules/common-rest.xqm";
+import module namespace data="http://jewishliturgy.org/modules/data"
+ at "../../modules/data.xqm";
+import module namespace orig="http://jewishliturgy.org/api/data/original"
+ at "original.xqm";
+import module namespace paths="http://jewishliturgy.org/modules/paths"
+ at "../../modules/paths.xqm";
+
+declare variable $sty:data-type := "styles";
+declare variable $sty:schema := concat($paths:schema-base, "/style.rnc");
+declare variable $sty:schematron := concat($paths:schema-base, "/style.xsl");
+declare variable $sty:path-base := concat($data:path-base, "/", $sty:data-type);
+declare variable $sty:api-path-base := concat("/api/data/", $sty:data-type);
+
+(:~ validate
+ : @param $doc The style document to be validated
+ : @param $old-doc The style document it is replacing, if any
+ : @return true() if valid, false() if not
+ : @see orig:validate-report
+ :)
+declare function sty:validate(
+ $doc as item(),
+ $old-doc as document-node()?
+ ) as xs:boolean {
+ crest:validate(
+ $doc, $old-doc,
+ xs:anyURI($sty:schema), xs:anyURI($sty:schematron),
+ if (exists($old-doc)) then orig:validate-changes#2 else ()
+ )
+};
+
+(:~ validate, returning a validation report
+ : @param $doc The style document to be validated
+ : @param $old-doc The style document it is replacing, if any
+ : @return true() if valid, false() if not
+ : @see orig:validate
+ :)
+declare function sty:validate-report(
+ $doc as item(),
+ $old-doc as document-node()?
+ ) as element() {
+ crest:validate-report(
+ $doc, $old-doc,
+ xs:anyURI($sty:schema), xs:anyURI($sty:schematron),
+ if (exists($old-doc)) then orig:validate-changes#2 else ()
+ )
+};
+
+(:~ Get a style document by name as XML
+ : @param $name Document name as a string
+ : @error HTTP 404 Not found (or not available)
+ :)
+declare
+ %rest:GET
+ %rest:path("/api/data/styles/{$name}")
+ %rest:produces("application/xml", "text/xml", "application/tei+xml")
+ function sty:get-xml(
+ $name as xs:string
+ ) as item()+ {
+ crest:get($sty:data-type, $name)
+};
+
+declare
+ %rest:GET
+ %rest:path("/api/data/styles/{$name}")
+ %rest:produces("text/css", "text/plain")
+ %output:method("text")
+ %output:media-type("text/css")
+ function sty:get-css(
+ $name as xs:string
+ ) as item()+ {
+ let $xml := sty:get-xml(replace($name, "\.css$", ""))
+ return
+ if ($xml instance of document-node())
+ then
+ $xml//j:stylesheet[@scheme="css"]/string()
+ else
+ $xml
+};
+
+(:~ List or full-text query original data
+ : @param $q text of the query, empty string for all
+ : @param $start first document to list
+ : @param $max-results number of documents to list
+ : @return a list of documents that match the search. If the documents match a query, return the context.
+ : @error HTTP 404 Not found
+ :)
+declare
+ %rest:GET
+ %rest:path("/api/data/styles")
+ %rest:query-param("q", "{$q}", "")
+ %rest:query-param("start", "{$start}", 1)
+ %rest:query-param("max-results", "{$max-results}", 100)
+ %rest:produces("application/xhtml+xml", "application/xml", "text/xml", "text/html")
+ %output:method("xhtml")
+ function sty:list(
+ $q as xs:string*,
+ $start as xs:integer*,
+ $max-results as xs:integer*
+ ) as item()+ {
+ crest:list($q, $start, $max-results,
+ "Styles API", api:uri-of($sty:api-path-base),
+ sty:query-function#1, sty:list-function#0,
+ (
+ ,
+ $crest:additional-validate
+ ),
+ ()
+ )
+};
+
+(: support function for queries :)
+declare function sty:query-function(
+ $query as xs:string
+ ) as element()* {
+ let $c := collection($sty:path-base)
+ return $c//tei:title[ft:query(.,$query)]|$c//tei:text[ft:query(.,$query)]
+};
+
+(: support function for list :)
+declare function sty:list-function(
+ ) as element()* {
+ for $doc in collection($sty:path-base)/tei:TEI
+ order by $doc//tei:title[@type="main"] ascending
+ return $doc
+};
+
+(:~ Delete a style
+ : @param $name The name of the text
+ : @return HTTP 204 (No data) if successful
+ : @error HTTP 400 Cannot be deleted and a reason, including existing external references
+ : @error HTTP 401 Not authorized
+ : @error HTTP 403 Forbidden - logged in as a user who does not have write access to the document
+ : @error HTTP 404 Not found
+ :)
+declare
+ %rest:DELETE
+ %rest:path("/api/data/styles/{$name}")
+ function sty:delete(
+ $name as xs:string
+ ) as item()+ {
+ crest:delete($sty:data-type, $name)
+};
+
+declare function sty:post(
+ $body as document-node()
+ ) as item()+ {
+ sty:post($body, ())
+ };
+
+(:~ Post a new style document
+ : @param $body The style document
+ : @param $validate Validate the document, instead of posting
+ : @return HTTP 200 if validated successfully
+ : @return HTTP 201 if created successfully
+ : @error HTTP 400 Invalid JLPTEI XML
+ : @error HTTP 401 Not authorized
+ : @error HTTP 500 Storage error
+ :
+ : Other effects:
+ : * A change record is added to the resource
+ : * The new resource is owned by the current user, group owner=current user, and mode is 664
+ :)
+declare
+ %rest:POST("{$body}")
+ %rest:path("/api/data/styles")
+ %rest:query-param("validate", "{$validate}")
+ %rest:consumes("application/xml", "application/tei+xml", "text/xml")
+ function sty:post(
+ $body as document-node(),
+ $validate as xs:string*
+ ) as item()+ {
+ let $data-path := concat($sty:data-type, "/", ($body/tei:TEI/@xml:lang/string(), "none")[1])
+ let $api-path-base := api:uri-of($sty:api-path-base)
+ return
+ crest:post(
+ $data-path,
+ $sty:path-base,
+ $api-path-base,
+ $body,
+ sty:validate#2,
+ sty:validate-report#2,
+ (),
+ (),
+ $validate[1]
+ )
+};
+
+declare function sty:put-xml(
+ $name as xs:string,
+ $body as document-node()
+ ) as item()+ {
+ sty:put-xml($name, $body, ())
+ };
+
+(:~ Edit/replace a style document in the database
+ : @param $name Name of the document to replace
+ : @param $body New document
+ : @param $validate Validate, but do not write to the database
+ : @return HTTP 200 If successfully validated
+ : @return HTTP 204 If successful
+ : @error HTTP 400 Invalid XML; Attempt to edit a read-only part of the document
+ : @error HTTP 401 Unauthorized - not logged in
+ : @error HTTP 403 Forbidden - the document can be found, but is not writable by you
+ : @error HTTP 404 Not found
+ : @error HTTP 500 Storage error
+ :
+ : A change record is added to the resource
+ : TODO: add xml:id to required places too
+ :)
+declare
+ %rest:PUT("{$body}")
+ %rest:path("/api/data/styles/{$name}")
+ %rest:query-param("validate", "{$validate}")
+ %rest:consumes("application/xml", "text/xml")
+ function sty:put-xml(
+ $name as xs:string,
+ $body as document-node(),
+ $validate as xs:string*
+ ) as item()+ {
+ crest:put(
+ $sty:data-type, $name, $body,
+ sty:validate#2,
+ sty:validate-report#2,
+ (),
+ $validate[1]
+ )
+};
+
+declare
+ %private
+ function sty:replace-stylesheet(
+ $nodes as node()*,
+ $replacement as item(),
+ $scheme as xs:string
+ ) as node()* {
+ for $n in $nodes
+ return
+ typeswitch($n)
+ case document-node()
+ return
+ document { sty:replace-stylesheet($n/node(), $replacement, $scheme) }
+ case element(j:stylesheet)
+ return
+ {
+ $n/(@* except @scheme),
+ $replacement
+ }
+ case element()
+ return
+ element {QName(namespace-uri($n), name($n))}{
+ $n/@*,
+ sty:replace-stylesheet($n/node(), $replacement, $scheme)
+ }
+ default
+ return $n
+};
+
+(:~ Edit/replace the CSS in a style document in the database
+ : All other metadata stays the same
+ : @param $name Name of the document to replace
+ : @param $body New document
+ : @return HTTP 204 If successful
+ : @error HTTP 400 Invalid XML; Attempt to edit a read-only part of the document
+ : @error HTTP 401 Unauthorized - not logged in
+ : @error HTTP 403 Forbidden - the document can be found, but is not writable by you
+ : @error HTTP 404 Not found
+ : @error HTTP 500 Storage error
+ :
+ : A change record is added to the resource
+ :)
+declare
+ %rest:PUT("{$body}")
+ %rest:path("/api/data/styles/{$name}")
+ %rest:consumes("text/css")
+ function sty:put-css(
+ $name as xs:string,
+ $body as xs:string
+ ) as item()+ {
+ let $adj-name := replace($name, "\.css$", "")
+ let $old-xml := sty:get-xml($adj-name)
+ return
+ if ($old-xml instance of document-node())
+ then
+ crest:put(
+ $sty:data-type, $adj-name,
+ sty:replace-stylesheet($old-xml, $body, "css"),
+ sty:validate#2,
+ sty:validate-report#2,
+ (),
+ ()
+ )
+ else $old-xml
+};
+
+(:~ Get access/sharing data for a style document
+ : @param $name Name of document
+ : @param $user User to get access as
+ : @return HTTP 200 and an access structure (a:access) or user access (a:user-access)
+ : @error HTTP 400 User does not exist
+ : @error HTTP 404 Document not found or inaccessible
+ :)
+declare
+ %rest:GET
+ %rest:path("/api/data/styles/{$name}/access")
+ %rest:query-param("user", "{$user}")
+ %rest:produces("application/xml")
+ function sty:get-access(
+ $name as xs:string,
+ $user as xs:string*
+ ) as item()+ {
+ crest:get-access($sty:data-type, $name, $user)
+};
+
+
+(:~ Set access/sharing data for a style document
+ : @param $name Name of document
+ : @param $body New sharing rights, as an a:access structure
+ : @return HTTP 204 No data, access rights changed
+ : @error HTTP 400 Access structure is invalid
+ : @error HTTP 401 Not authorized
+ : @error HTTP 403 Forbidden
+ : @error HTTP 404 Document not found or inaccessible
+ :)
+declare
+ %rest:PUT("{$body}")
+ %rest:path("/api/data/styles/{$name}/access")
+ %rest:consumes("application/xml", "text/xml")
+ function sty:put-access(
+ $name as xs:string,
+ $body as document-node()
+ ) as item()+ {
+ crest:put-access($sty:data-type, $name, $body)
+};
diff --git a/opensiddur-server/src/api/data/transliteration.xqm b/opensiddur-server/src/api/data/transliteration.xqm
new file mode 100644
index 00000000..e2d25cef
--- /dev/null
+++ b/opensiddur-server/src/api/data/transliteration.xqm
@@ -0,0 +1,205 @@
+xquery version "3.1";
+(: Transliteration API module
+ :
+ : Functions assume that the following has already been done:
+ : authentication,
+ : content negotiation
+ :
+ : Copyright 2012-2013 Efraim Feinstein
+ : Open Siddur Project
+ : Licensed Under the GNU Lesser General Public License, version 3 or later
+ :)
+module namespace tran = 'http://jewishliturgy.org/api/transliteration';
+
+import module namespace api="http://jewishliturgy.org/modules/api"
+ at "../../modules/api.xqm";
+import module namespace crest="http://jewishliturgy.org/modules/common-rest"
+ at "../../modules/common-rest.xqm";
+import module namespace data="http://jewishliturgy.org/modules/data"
+ at "../../modules/data.xqm";
+import module namespace paths="http://jewishliturgy.org/modules/paths"
+ at "../../modules/paths.xqm";
+
+declare namespace tr="http://jewishliturgy.org/ns/tr/1.0";
+declare namespace rest="http://exquery.org/ns/restxq";
+declare namespace output="http://www.w3.org/2010/xslt-xquery-serialization";
+declare namespace error="http://jewishliturgy.org/errors";
+
+declare variable $tran:data-type := "transliteration";
+declare variable $tran:schema := concat($paths:schema-base, "/transliteration.rnc");
+declare variable $tran:schematron := concat($paths:schema-base, "/transliteration.xsl");
+declare variable $tran:path-base := concat($data:path-base, "/", $tran:data-type);
+declare variable $tran:api-path-base := concat("/api/data/", $tran:data-type);
+
+declare function tran:validate(
+ $tr as item(),
+ $old-doc as document-node()?
+ ) as xs:boolean {
+ crest:validate($tr, $old-doc,
+ xs:anyURI($tran:schema), xs:anyURI($tran:schematron), ())
+};
+
+declare function tran:validate-report(
+ $tr as item(),
+ $old-doc as document-node()?
+ ) as element() {
+ crest:validate-report(
+ $tr, $old-doc,
+ xs:anyURI($tran:schema), xs:anyURI($tran:schematron), ()
+ )
+};
+
+declare
+ %rest:GET
+ %rest:path("/api/data/transliteration/{$name}")
+ %rest:produces("application/xml")
+ function tran:get(
+ $name as xs:string
+ ) as item()+ {
+ crest:get($tran:data-type, $name)
+};
+
+(:~ Discovery and query API:
+ : list accessible transliterations
+ : or search
+ :)
+declare
+ %rest:GET
+ %rest:path("/api/data/transliteration")
+ %rest:query-param("q", "{$q}", "")
+ %rest:query-param("start", "{$start}", 1)
+ %rest:query-param("max-results", "{$max-results}", 100)
+ %rest:produces("application/xhtml+xml", "application/xml", "text/html", "text/xml")
+ %output:method("xhtml")
+ function tran:list(
+ $q as xs:string*,
+ $start as xs:integer*,
+ $max-results as xs:integer*
+ ) as item()+ {
+ crest:list($q, $start, $max-results,
+ "Transliteration API", api:uri-of($tran:api-path-base),
+ tran:query-function#1, tran:list-function#0,
+ (
+ ,
+ $crest:additional-validate
+ ),
+ tran:title-function#1
+ )
+};
+
+(: @return (list, start, count, n-results) :)
+declare function tran:query-function(
+ $query as xs:string
+ ) as element()* {
+ let $c := collection($tran:path-base)
+ return $c//tr:title[ft:query(., $query)]|$c//tr:description[ft:query(.,$query)]
+};
+
+declare function tran:list-function(
+ ) as element()* {
+ for $doc in collection($tran:path-base)/tr:schema
+ order by $doc//tr:title ascending
+ return $doc
+};
+
+declare function tran:title-function(
+ $n as node()
+ ) as xs:string {
+ root($n)//tr:title[1]/string()
+};
+
+declare
+ %rest:DELETE
+ %rest:path("/api/data/transliteration/{$name}")
+ function tran:delete(
+ $name as xs:string
+ ) as item()+ {
+ crest:delete($tran:data-type, $name)
+};
+
+
+declare function tran:post(
+ $body as document-node()
+ ) as item()+ {
+ tran:post($body, ())
+ };
+
+declare
+ %rest:POST("{$body}")
+ %rest:path("/api/data/transliteration")
+ %rest:query-param("validate", "{$validate}")
+ %rest:consumes("application/xml", "text/xml")
+ function tran:post(
+ $body as document-node(),
+ $validate as xs:string*
+ ) as item()+ {
+ let $api-path-base := api:uri-of($tran:api-path-base)
+ return
+ crest:post(
+ $tran:data-type,
+ $tran:path-base,
+ $api-path-base,
+ $body,
+ tran:validate#2,
+ tran:validate-report#2,
+ tran:title-function#1,
+ (),
+ $validate[1]
+ )
+};
+
+declare function tran:put(
+ $name as xs:string,
+ $body as document-node()
+) as item()+ {
+ tran:put($name, $body, ())
+};
+
+declare
+ %rest:PUT("{$body}")
+ %rest:path("/api/data/transliteration/{$name}")
+ %rest:query-param("validate", "{$validate}")
+ %rest:consumes("application/xml", "text/xml")
+ function tran:put(
+ $name as xs:string,
+ $body as document-node(),
+ $validate as xs:string*
+ ) as item()+ {
+ crest:put(
+ $tran:data-type, $name, $body,
+ tran:validate#2,
+ tran:validate-report#2,
+ (),
+ $validate[1]
+ )
+};
+
+(:~ Get access/sharing data for a transliteration document
+ : @param $name Name of document
+ : @param $user User to get access as
+ : @return HTTP 200 and an access structure (a:access) or user access (a:user-access)
+ : @error HTTP 400 User does not exist
+ : @error HTTP 404 Document not found or inaccessible
+ :)
+declare
+ %rest:GET
+ %rest:path("/api/data/transliteration/{$name}/access")
+ %rest:query-param("user", "{$user}")
+ %rest:produces("application/xml")
+ function tran:get-access(
+ $name as xs:string,
+ $user as xs:string*
+ ) as item()+ {
+ crest:get-access($tran:data-type, $name, $user)
+};
+
+declare
+ %rest:PUT("{$body}")
+ %rest:path("/api/data/transliteration/{$name}/access")
+ %rest:consumes("application/xml", "text/xml")
+ function tran:put-access(
+ $name as xs:string,
+ $body as document-node()
+ ) as item()+ {
+ crest:put-access($tran:data-type, $name, $body)
+};
diff --git a/opensiddur-server/src/api/group.xqm b/opensiddur-server/src/api/group.xqm
new file mode 100644
index 00000000..179e8dbc
--- /dev/null
+++ b/opensiddur-server/src/api/group.xqm
@@ -0,0 +1,510 @@
+xquery version "3.1";
+(:~ Group management API
+ :
+ : Copyright 2012-2013 Efraim Feinstein
+ : Licensed under the GNU Lesser General Public License, version 3 or later
+ :
+ : @author Efraim Feinstein
+ :)
+module namespace grp = 'http://jewishliturgy.org/api/group';
+
+import module namespace api="http://jewishliturgy.org/modules/api"
+ at "../modules/api.xqm";
+import module namespace app="http://jewishliturgy.org/modules/app"
+ at "../modules/app.xqm";
+import module namespace debug="http://jewishliturgy.org/transform/debug"
+ at "../modules/debug.xqm";
+import module namespace jvalidate="http://jewishliturgy.org/modules/jvalidate"
+ at "../modules/jvalidate.xqm";
+import module namespace magic="http://jewishliturgy.org/magic"
+ at "../magic/magic.xqm";
+import module namespace paths="http://jewishliturgy.org/modules/paths"
+ at "../modules/paths.xqm";
+
+declare namespace g="http://jewishliturgy.org/ns/group/1.0";
+declare namespace error="http://jewishliturgy.org/errors";
+declare namespace rest="http://exquery.org/ns/restxq";
+declare namespace output="http://www.w3.org/2010/xslt-xquery-serialization";
+declare namespace http="http://expath.org/ns/http-client";
+
+declare variable $grp:schema := concat($paths:schema-base, "/group.rnc");
+
+(:~ @return the group managers of a given group.
+ : eXist considers this a secret, but it's public in Open Siddur
+ :)
+declare function grp:get-group-managers(
+ $group as xs:string
+ ) as xs:string* {
+ system:as-user("admin", $magic:password,
+ sm:get-group-managers($group)
+ )
+};
+
+(:~ @return the group memberships of a given user.
+ : eXist considers this a secret, but it is public knowledge in Open Siddur
+ :)
+declare function grp:get-user-group-memberships(
+ $user as xs:string
+ ) as xs:string+ {
+ system:as-user("admin", $magic:password,
+ sm:get-user-groups($user)
+ )
+};
+
+declare function grp:get-user-group-managerships(
+ $user as xs:string
+) as xs:string* {
+ system:as-user("admin", $magic:password,
+ sm:list-groups()[
+ sm:get-group-managers(.)=$user
+ ]
+ )
+};
+
+(:~ @return the members of a given group
+ : eXist considers group membership a secret. We do not
+ :)
+declare function grp:get-group-members(
+ $group as xs:string
+ ) as xs:string* {
+ system:as-user("admin", $magic:password,
+ sm:get-group-members($group)
+ )
+};
+
+(:~ @return a list of groups
+ : eXist considers group existence a secret. We do not
+ :)
+declare function grp:get-groups(
+ ) as xs:string* {
+ system:as-user("admin", $magic:password,
+ sm:list-groups()
+ )
+};
+
+(:~ List all groups
+ : @param $start Begin listing at this item number
+ : @param $max-results End listing after this many results
+ : @return an HTML list of groups
+ :)
+declare
+ %rest:GET
+ %rest:path("/api/group")
+ %rest:query-param("start", "{$start}", 1)
+ %rest:query-param("max-results", "{$max-results}", 100)
+ %rest:produces("application/xhtml+xml", "application/xml", "text/html", "text/xml")
+ %output:method("xhtml")
+ function grp:list(
+ $start as xs:integer*,
+ $max-results as xs:integer*
+ ) as item()+ {
+ let $start := $start[1]
+ let $max-results := $max-results[1]
+ let $all :=
+ (: for some reason, eXist considers group existence to be a secret.
+ : I think it should be public.
+ :)
+ grp:get-groups()
+ let $total := count($all)
+ return
+
+
+ Group API index
+
+
+
+
+
+
{
+ for $group in subsequence($all, $start, $max-results)
+ let $api-name := encode-for-uri($group)
+ return
+
+
+
+};
+
+(:~ list members of a group, in group XML
+ : @param $name Group name
+ : @return XML conforming to schema/group.rnc
+ : @error HTTP 404 Not found If the group does not exist or is inaccessible
+ : @error HTTP 401 Unauthorized If not logged in
+ :)
+declare
+ %rest:GET
+ %rest:path("/api/group/{$name}")
+ %rest:produces("application/xml", "text/xml")
+ function grp:get-xml(
+ $name as xs:string
+ ) as item()+ {
+ if (app:auth-user())
+ then
+ if (grp:get-groups() = $name)
+ then
+ let $members := grp:get-group-members($name)
+ let $managers := grp:get-group-managers($name)
+ return
+ {
+ for $member in $members
+ let $manager :=
+ if ($member=$managers)
+ then
+ attribute manager {true()}
+ else ()
+ order by $member ascending
+ return
+ {
+ $manager,
+ $member
+ }
+ }
+ else api:rest-error(404, "Not found")
+ else api:rest-error(401, "Not authenticated")
+};
+
+(:~ list members of a group, in HTML
+ : @param $name The name of the group to list
+ : @return an HTML list of group members
+ : @error HTTP 401 Unauthorized If not logged in
+ : @error HTTP 404 Not found If the group does not exist or is inaccessible
+ :)
+declare
+ %rest:GET
+ %rest:path("/api/group/{$name}")
+ %rest:produces("application/xhtml+xml", "text/html")
+ function grp:get-html(
+ $name as xs:string
+ ) as item()+ {
+ let $group := grp:get-xml($name)
+ return
+ if ($group[2] instance of element(error))
+ then $group
+ else
+
+
+ {$name}
+
+
+
+
+
+};
+
+(:~ List the group memberships of a given user.
+ : @return An HTML list of group memberships
+ : @error HTTP 401 Unauthorized if not logged in
+ : @error HTTP 404 Not found If the user does not exist
+ :)
+declare
+ %rest:GET
+ %rest:path("/api/user/{$user}/groups")
+ %rest:produces("application/xhtml+xml", "application/xml", "text/html", "text/xml")
+ function grp:get-user-groups(
+ $user as xs:string
+ ) as item()+ {
+ if (app:auth-user())
+ then
+ if (sm:user-exists($user))
+ then
+
+
+ {$user}
+
+
+
{
+ let $managerships := grp:get-user-group-managerships($user)
+ for $membership in grp:get-user-group-memberships($user)
+ let $managership :=
+ if ($managerships=$membership)
+ then
+ attribute property {"manager"}
+ else ()
+ order by $membership
+ return
+
+
+
+ else api:rest-error(404, "Not found")
+ else api:rest-error(401, "Not authorized")
+};
+
+(:~ validate group XML
+ : @param $doc Document holding group XML
+ : @param $group-name Group name of existing group this XML is intended to describe, empty for a new group
+ : @return A boolean
+ :)
+(: TODO: use document-node(element(g:group)) :)
+declare function grp:validate(
+ $doc as document-node(),
+ $group-name as xs:string?
+ ) as xs:boolean {
+ jvalidate:validation-boolean(
+ grp:validate-report($doc, $group-name)
+ )
+};
+
+declare function local:validate-existing-group(
+ $doc as document-node(),
+ $group-name as xs:string
+ ) as element(message)* {
+ ((: if there were any special validation for an
+ : existing group, it would go here:))
+};
+
+(:~ validate a group XML structure
+ : @param $doc Group XML
+ : @param $group-name Name of existing group the XML is intending to change. If empty, assume it is for a new group.
+ : @return A validation report. report/status indicates validity, report/message indicates reasons for invalidity.
+ :)
+declare function grp:validate-report(
+ $doc as document-node(),
+ $group-name as xs:string?
+ ) as element(report) {
+ jvalidate:concatenate-reports((
+ jvalidate:validate-relaxng($doc, xs:anyURI($grp:schema)),
+ let $invalid-users := $doc//g:member/string()[not(sm:user-exists(.))]
+ let $existing-group-validation :=
+ if ($group-name)
+ then
+ local:validate-existing-group($doc, $group-name)
+ else ()
+ return
+
+ {
+ if (empty(($invalid-users, $existing-group-validation)))
+ then "valid"
+ else "invalid"
+ }
+ {
+ for $user in $invalid-users
+ return
+ User {$user} does not exist.,
+ $existing-group-validation
+ }
+
+ ))
+};
+
+(:~ Create a group or change membership of a group
+ : @param $name Name of group to create or edit
+ : @param $body Group XML, which describes the membership of the group
+ : @return HTTP 201 successful, new group created
+ : @return HTTP 204 successful, group edited
+ : @error HTTP 400 if the input is invalid
+ : @error HTTP 401 if not logged in
+ : @error HTTP 403 if not a group manager
+ :
+ : Notes:
+ : When a group is created, the creating user is a manager, independent of the XML.
+ : admin cannot be removed as a group manager.
+ : Because of a missing feature in eXist, group management cannot be changed after creation.
+ :)
+declare
+ %rest:PUT("{$body}")
+ %rest:path("/api/group/{$name}")
+ %rest:consumes("application/xml", "text/xml")
+ function grp:put(
+ $name as xs:string,
+ $body as document-node()
+ ) as item()+ {
+ let $user := app:auth-user()
+ return
+ if ($user)
+ then
+ let $group-exists := grp:get-groups()=$name
+ return
+ if (grp:validate($body, $name[$group-exists]))
+ then
+ if ($group-exists)
+ then
+ (: group exists, this is an edit :)
+ let $old-managers := grp:get-group-managers($name)
+ return
+ if ($old-managers=$user)
+ then
+ let $all-new-members := $body//g:member
+ let $all-new-managers := $body//g:member[xs:boolean(@manager)]
+ let $old-members := grp:get-group-members($name)
+ let $members-to-add := $all-new-members[not(.=$old-members)]
+ let $members-to-remove := $old-members[not(.=$all-new-members)]
+ let $managers-to-add := $all-new-managers[not(.=$old-managers)]
+ let $managers-to-remove := $old-managers[not(.=$all-new-managers)][not(.="admin")]
+ let $errors := (
+ (: Changing group managerships/memberships is supposed to work
+ w/o admin access (it does not). Admin access is required to
+ ensure it works as an atomic operation if a user removes
+ his own managership :)
+ for $member in $members-to-add
+ return
+ try {
+ system:as-user("admin", $magic:password,
+ sm:add-group-member($name, $member)
+ )
+ }
+ catch * {
+ "Adding member:" || $member
+ },
+ for $manager in $managers-to-add
+ return
+ try {
+ system:as-user("admin", $magic:password,
+ sm:add-group-manager($name, $manager)
+ )
+ }
+ catch * {
+ "Adding manager: " || $manager
+ },
+ for $member in $members-to-remove
+ return
+ try {
+ system:as-user("admin", $magic:password,
+ sm:remove-group-member($name, $member)
+ )
+ }
+ catch * {
+ "Removing member:" || $member
+ },
+ for $manager in $managers-to-remove
+ return
+ try {
+ system:as-user("admin", $magic:password,
+ sm:remove-group-manager($name, $manager)
+ )
+ }
+ catch * {
+ "Removing manager:" || $manager
+ }
+ )
+ return
+ if (exists($errors))
+ then
+ api:rest-error(500, "Could not change group status:",
+ string-join($errors, " ")
+ )
+ else
+
+
+ text
+
+
+
+ else
+ (: not a group manager of an existing group :)
+ api:rest-error(403, "Forbidden: " || $user || " cannot edit group because managers are " || string-join($old-managers, ","))
+ else
+ (: group does not exist, this is group creation :)
+ let $members := distinct-values($body//g:member)
+ let $managers := distinct-values(($body//g:member[xs:boolean(@manager)], "admin", $user))
+ let $created :=
+ try {
+ system:as-user("admin", $magic:password,
+ sm:create-group($name, $managers, string($body//g:description))
+ ),
+ true()
+ }
+ catch * {
+ false()
+ }
+ return
+ if ($created)
+ then
+ let $errors :=
+ for $member in $members
+ return
+ try {
+ sm:add-group-member($name, $member)
+ }
+ catch * {
+ $member
+ }
+ return
+ if (exists($errors))
+ then
+ api:rest-error(500,
+ "Could not add users to group",
+ string-join($errors, " ")
+ )
+ else
+
+
+ text
+
+
+ {((: TODO: this is wrong! It needs to be an absolute URI :))}
+
+
+
+ else api:rest-error(500, "Could not create group " || $name)
+ else api:rest-error(400, "Validation error", grp:validate-report($body, $name[$group-exists]))
+ else api:rest-error(401, "Not authorized")
+};
+
+(:~ delete a group
+ : @param $name Group to delete
+ : @return HTTP 204 if successful
+ : @error HTTP 401 if not logged in
+ : @error HTTP 403 if not a group manager
+ : @error HTTP 404 if the group does not exist
+ :
+ : Notes:
+ : Resources owned by a deleted group should become property of "everyone"
+ : For now, they become property of guest.
+ : TODO: This code has some hacks to work around eXist deficiencies
+ :)
+declare
+ %rest:DELETE
+ %rest:path("/api/group/{$name}")
+ function grp:delete(
+ $name as xs:string
+ ) as item()+ {
+ let $user := app:auth-user()
+ return
+ if ($user)
+ then
+ if (grp:get-groups()=$name)
+ then
+ if (grp:get-group-managers($name)=$user)
+ then
+
+
+ text
+
+ {
+ (: members are not removed automatically from a deleted group :)
+ let $all-group-members := grp:get-group-members($name)
+ let $all-group-managers := grp:get-group-managers($name)
+ return system:as-user("admin", $magic:password, (
+ for $member in $all-group-members
+ return sm:remove-group-member($name, $member),
+ for $manager in $all-group-managers
+ return sm:remove-group-manager($name, $manager),
+ sm:remove-group($name)
+ ))
+ }
+
+
+ else api:rest-error(403, "Forbidden")
+ else api:rest-error(404, "Not found")
+ else api:rest-error(401, "Not authorized")
+};
diff --git a/opensiddur-server/src/api/index.xqm b/opensiddur-server/src/api/index.xqm
new file mode 100644
index 00000000..b76eff64
--- /dev/null
+++ b/opensiddur-server/src/api/index.xqm
@@ -0,0 +1,84 @@
+xquery version "3.1";
+(:~ API module for functions for index URIs
+ :
+ : Copyright 2012-2014 Efraim Feinstein
+ : Open Siddur Project
+ : Licensed Under the GNU Lesser General Public License, version 3 or later
+ :)
+module namespace index = 'http://jewishliturgy.org/api/index';
+
+import module namespace api="http://jewishliturgy.org/modules/api"
+ at "../modules/api.xqm";
+
+declare namespace o="http://a9.com/-/spec/opensearch/1.1/";
+declare namespace rest="http://exquery.org/ns/restxq";
+declare namespace output="http://www.w3.org/2010/xslt-xquery-serialization";
+
+(:~ display an element if a package is installed :)
+declare
+ %private
+ function index:if-installed(
+ $package as xs:string,
+ $item as element()
+ ) as element()? {
+ let $pkgs := repo:list()
+ where $pkgs = $package
+ return $item
+};
+
+(:~ List all available APIs
+ : @return An HTML list
+ :)
+declare
+ %rest:GET
+ %rest:path("/api")
+ %rest:produces("application/xhtml+xml", "text/html", "application/xml", "text/xml")
+ function index:list(
+ ) as item()+ {
+
+
+ xhtml
+
+ ,
+
+
+ Open Siddur API Index
+
+
+
+
+
+};
diff --git a/opensiddur-server/src/api/jobs.xqm b/opensiddur-server/src/api/jobs.xqm
new file mode 100644
index 00000000..b2e124d0
--- /dev/null
+++ b/opensiddur-server/src/api/jobs.xqm
@@ -0,0 +1,155 @@
+xquery version "3.1";
+(:~ API module for background job tracking
+ :
+ : Copyright 2014 Efraim Feinstein
+ : Open Siddur Project
+ : Licensed Under the GNU Lesser General Public License, version 3 or later
+ :)
+module namespace job='http://jewishliturgy.org/api/jobs';
+
+import module namespace api="http://jewishliturgy.org/modules/api"
+ at "../modules/api.xqm";
+import module namespace crest="http://jewishliturgy.org/modules/common-rest"
+ at "../modules/common-rest.xqm";
+import module namespace data="http://jewishliturgy.org/modules/data"
+ at "../modules/data.xqm";
+import module namespace status="http://jewishliturgy.org/modules/status"
+ at "../modules/status.xqm";
+
+declare namespace tei="http://www.tei-c.org/ns/1.0";
+declare namespace o="http://a9.com/-/spec/opensearch/1.1/";
+declare namespace rest="http://exquery.org/ns/restxq";
+declare namespace output="http://www.w3.org/2010/xslt-xquery-serialization";
+
+declare function job:get-jobs(
+ $user as xs:string?,
+ $state as xs:string?,
+ $from as xs:string?,
+ $to as xs:string?
+ ) as node()* {
+ let $username := $user
+ let $c := collection($status:status-collection)
+ let $state :=
+ if (empty($state))
+ then ("complete", "working", "failed")
+ else $state
+ let $from :=
+ if (empty($from))
+ then min($c//@started/string())
+ else $from
+ let $to :=
+ if (empty($to))
+ then max($c//@started/string())
+ else $to
+ return
+ if (empty($user))
+ then
+ $c//status:job
+ [@started ge $from]
+ [@started le $to]
+ [$state=@state]
+ else
+ $c//status:job
+ [@user=$user]
+ [@started ge $from]
+ [@started le $to]
+ [$state=@state]
+};
+
+(:~ List all jobs
+ : @param $user List only jobs initiated by the given user
+ : @param $state List only jobs with the given state, which may be one of: working, complete, failed. No restriction if omitted.
+ : @param $from List only jobs started on or after the given date/time. No restriction if omitted. The expected format is yyyy-mm-ddThh:mm:ss, where any of the smaller sized components are optional.
+ : @param $to List only jobs started on or before the given date/time. No restriction if omitted.
+ : @param $start Start the list from the given index
+ : @param $max-results List only this many results
+ : @return An HTML list
+ :)
+declare
+ %rest:GET
+ %rest:path("/api/jobs")
+ %rest:query-param("user", "{$user}")
+ %rest:query-param("state", "{$state}")
+ %rest:query-param("from", "{$from}")
+ %rest:query-param("to", "{$to}")
+ %rest:query-param("start", "{$start}", 1)
+ %rest:query-param("max-results", "{$max-results}", 100)
+ %rest:produces("application/xhtml+xml", "text/html", "application/xml", "text/xml")
+ function job:list(
+ $user as xs:string*,
+ $state as xs:string*,
+ $from as xs:string*,
+ $to as xs:string*,
+ $start as xs:integer*,
+ $max-results as xs:integer*
+ ) as item()+ {
+ if ($state and not($state=("working", "failed", "complete")))
+ then
+ api:rest-error(400, "Invalid state. Must be one of 'working', 'failed', or 'complete'", $state)
+ else (
+
+
+ xhtml
+
+ ,
+
+
+ Jobs
+
+
+
+
{
+ for $job in
+ subsequence(
+ for $jb in job:get-jobs($user[.][1], $state[.][1], $from[.][1], $to[.][1])
+ order by $jb/@started/string() descending
+ return $jb, ($start, 1)[1], ($max-results, 100)[1])
+ let $job-id := substring-before(util:document-name($job), ".status.xml")
+ return
+
{
+ $job/@resource/string()
+ }:
+ {
+ let $doc := data:doc($job/@resource/string())
+ return
+ if (exists($doc))
+ then crest:tei-title-function($doc)
+ else "(deleted)"
+ }:
+ {$job/@user/string()}:
+ {$job/@state/string()}:
+ {$job/@started/string()}-
+ {
+ if ($job/@state=("complete", "failed"))
+ then
+ {$job/(@completed,@failed)/string()}
+ else ()
+ }
+
+ }
+
+
+ )
+};
+
+(:~ Get the status of a job, given a job id
+ : @param $id The job id
+ : @return HTTP 200 and a job description XML document
+ : @error HTTP 404 if the job id does not exist
+ :)
+declare
+ %rest:GET
+ %rest:path("/api/jobs/{$id}")
+ %rest:produces("application/xml", "text/xml")
+ %output:method("xml")
+ %output:indent("yes")
+ function job:get-job(
+ $id as xs:string
+ ) as item()+ {
+ let $status-doc := doc($status:status-collection || "/" || $id || ".status.xml")
+ return
+ if ($status-doc)
+ then $status-doc
+ else api:rest-error(404, "Not found", $id)
+};
+
diff --git a/opensiddur-server/src/api/login.xqm b/opensiddur-server/src/api/login.xqm
new file mode 100644
index 00000000..ebec13e0
--- /dev/null
+++ b/opensiddur-server/src/api/login.xqm
@@ -0,0 +1,188 @@
+xquery version "3.1";
+(:~ api login
+ :
+ : Open Siddur Project
+ : Copyright 2011-2012 Efraim Feinstein
+ : Licensed under the GNU Lesser General Public License, version 3 or later
+ :
+ :)
+module namespace login="http://jewishliturgy.org/api/login";
+
+import module namespace api="http://jewishliturgy.org/modules/api"
+ at "../modules/api.xqm";
+import module namespace app="http://jewishliturgy.org/modules/app"
+ at "../modules/app.xqm";
+import module namespace debug="http://jewishliturgy.org/transform/debug"
+ at "../modules/debug.xqm";
+
+declare namespace output="http://www.w3.org/2010/xslt-xquery-serialization";
+declare namespace error="http://jewishliturgy.org/errors";
+declare namespace rest="http://exquery.org/ns/restxq";
+declare namespace http="http://expath.org/ns/http-client";
+
+(:~ Query who is currently logged in.
+ : @return HTTP 200 with an XML entity with the currently logged in user
+ :)
+declare
+ %rest:GET
+ %rest:path("/api/login")
+ %rest:produces("application/xml", "text/xml")
+ function login:get-xml() {
+ let $user := app:auth-user()
+ return {$user}
+};
+
+(:~ GET HTML: usually, used as a who am I function,
+ : but may also be used to log in by query params.
+ : Please do not use it that way, except for debugging
+ : @param $user User to log in via HTTP GET
+ : @param $password Password of user to log in via HTTP GET
+ : @return Who am I as HTML
+ :)
+declare
+ %rest:GET
+ %rest:path("/api/login")
+ %rest:query-param("user", "{$user}", "")
+ %rest:query-param("password", "{$password}", "")
+ %rest:query-param("auth-only", "{$auth-only}", "")
+ %rest:produces("application/xhtml+xml", "text/html")
+ function login:get-html(
+ $user as xs:string*,
+ $password as xs:string*,
+ $auth-only as xs:string*
+ ) as item()+ {
+ let $did-login :=
+ if ($user and $password)
+ then
+ login:post-form($user[1], $password[1], $auth-only[1])
+ else ()
+ return (
+
+
+ xhtml
+
+ ,
+
+
+ Login: who am I?
+
+
+
{app:auth-user()}
+
+
+ )
+};
+
+(:~ Log in a user using XML parameters
+ : @param $body A document containing login/(user/string(), password/string())
+ : @return HTTP 204 Login successful
+ : @error HTTP 400 Wrong user name or password
+ :)
+declare
+ %rest:POST("{$body}")
+ %rest:path("/api/login")
+ %rest:query-param("auth-only", "{$auth-only}", "")
+ %rest:consumes("application/xml", "text/xml")
+ %rest:produces("text/plain")
+ function login:post-xml(
+ $body as document-node(),
+ $auth-only as xs:string*
+ ) as item()+ {
+ login:post-form($body//user, $body//password, $auth-only)
+};
+
+(:~ Log in a user using a form
+ : @param $user User name
+ : @param $password Password
+ : @param $auth-only Authenticate only, but do not start a session
+ : @return HTTP 204 Login successful
+ : @error HTTP 400 Wrong user name or password
+ :)
+declare
+ %rest:POST
+ %rest:path("/api/login")
+ %rest:form-param("user", "{$user}")
+ %rest:form-param("password", "{$password}")
+ %rest:query-param("auth-only", "{$auth-only}", "")
+ %rest:consumes("application/x-www-url-formencoded")
+ %rest:produces("text/plain")
+ function login:post-form(
+ $user as xs:string*,
+ $password as xs:string*,
+ $auth-only as xs:string*
+ ) as item()+ {
+ let $user := $user[1]
+ let $password := $password[1]
+ let $auth-only := $auth-only[1]
+ return
+ if (empty($user) or empty($password))
+ then
+ api:rest-error(400, "User name and password are required")
+ else
+ if (xmldb:authenticate("/db", $user, $password))
+ then (
+ debug:debug($debug:info, "login",
+ ('Logging in ', $user, ':', $password)),
+ if (not($auth-only) or lower-case($auth-only) = "false")
+ then
+ app:login-credentials($user, $password)
+ else (),
+
+
+ text
+
+
+
+ )
+ else (
+ api:rest-error(400,"Wrong user name or password")
+ )
+};
+
+(:~ log out
+ : @return HTTP 204
+ :)
+declare function local:logout(
+ ) as element(rest:response) {
+ app:logout-credentials(),
+
+
+ text
+
+
+
+};
+
+(:~ request to log out from session-based login
+ : @return HTTP 204 on success
+ :)
+declare
+ %rest:DELETE
+ %rest:path("/api/login")
+ function login:delete(
+ ) as item()+ {
+ local:logout()
+};
+
+(:~ request to log out from session-based login
+ : @see login:delete
+ :)
+declare
+ %rest:GET
+ %rest:path("/api/logout")
+ function login:get-logout(
+ ) as item()+ {
+ local:logout()
+};
+
+(:~ request to log out
+ : @see login:delete
+ :)
+declare
+ %rest:POST
+ %rest:path("/api/logout")
+ function login:post-logout(
+ ) as item()+ {
+ local:logout()
+};
+
diff --git a/opensiddur-server/src/api/static.xqm b/opensiddur-server/src/api/static.xqm
new file mode 100644
index 00000000..150096e4
--- /dev/null
+++ b/opensiddur-server/src/api/static.xqm
@@ -0,0 +1,81 @@
+xquery version "3.1";
+(:~ API module for accessing static data
+ :
+ : Copyright 2014 Efraim Feinstein
+ : Open Siddur Project
+ : Licensed Under the GNU Lesser General Public License, version 3 or later
+ :)
+module namespace static = 'http://jewishliturgy.org/api/static';
+
+import module namespace api="http://jewishliturgy.org/modules/api"
+ at "../modules/api.xqm";
+import module namespace paths="http://jewishliturgy.org/modules/paths"
+ at "../modules/paths.xqm";
+
+declare namespace rest="http://exquery.org/ns/restxq";
+declare namespace output="http://www.w3.org/2010/xslt-xquery-serialization";
+
+(:~ List all static data
+ : @return An HTML list
+ :)
+declare
+ %rest:GET
+ %rest:path("/api/static")
+ %rest:produces("application/xhtml+xml", "text/html", "application/xml", "text/xml")
+ function static:list(
+ ) as item()+ {
+
+
+ xhtml
+
+ ,
+
+
+ Static API
+
+
+
+ {
+ let $api-base := api:uri-of("/api/static")
+ let $collection := $paths:repo-base || "/static"
+ for $resource in xmldb:get-child-resources($collection)
+ order by $resource
+ return
+
+
+
+};
+
+declare
+ %rest:GET
+ %rest:path("/api/static/{$name}")
+ %output:method("xml")
+ %rest:produces("image/svg+xml", "application/xml", "text/xml")
+ %output:media-type("image/svg+xml")
+ function static:get(
+ $name as xs:string
+ ) as item()+ {
+ let $collection := $paths:repo-base || "/static"
+ let $resource-uri := $collection || "/" || $name
+ let $doc :=
+ if (util:is-binary-doc($resource-uri))
+ then util:binary-doc($resource-uri)
+ else doc($resource-uri)
+ return
+ if ($doc)
+ then
+ (
+
+
+
+ {if (util:is-binary-doc($resource-uri)) then 'binary' else 'xml'}
+
+ ,
+ $doc
+ )
+ else api:rest-error(404, "Not Found", $name)
+};
diff --git a/opensiddur-server/src/api/user.xqm b/opensiddur-server/src/api/user.xqm
new file mode 100644
index 00000000..5075b258
--- /dev/null
+++ b/opensiddur-server/src/api/user.xqm
@@ -0,0 +1,489 @@
+xquery version "3.1";
+(:~ User management API
+ :
+ : Copyright 2012-2014 Efraim Feinstein
+ : Licensed under the GNU Lesser General Public License, version 3 or later
+ :)
+module namespace user="http://jewishliturgy.org/api/user";
+
+import module namespace acc="http://jewishliturgy.org/modules/access"
+ at "../modules/access.xqm";
+import module namespace api="http://jewishliturgy.org/modules/api"
+ at "../modules/api.xqm";
+import module namespace app="http://jewishliturgy.org/modules/app"
+ at "../modules/app.xqm";
+import module namespace crest="http://jewishliturgy.org/modules/common-rest"
+ at "../modules/common-rest.xqm";
+import module namespace data="http://jewishliturgy.org/modules/data"
+ at "../modules/data.xqm";
+import module namespace debug="http://jewishliturgy.org/transform/debug"
+ at "../modules/debug.xqm";
+import module namespace didx="http://jewishliturgy.org/modules/docindex"
+ at "../modules/docindex.xqm";
+import module namespace jvalidate="http://jewishliturgy.org/modules/jvalidate"
+ at "../modules/jvalidate.xqm";
+import module namespace magic="http://jewishliturgy.org/magic"
+ at "../magic/magic.xqm";
+import module namespace name="http://jewishliturgy.org/modules/name"
+ at "../modules/name.xqm";
+import module namespace paths="http://jewishliturgy.org/modules/paths"
+ at "../modules/paths.xqm";
+import module namespace ridx="http://jewishliturgy.org/modules/refindex"
+ at "../modules/refindex.xqm";
+import module namespace kwic="http://exist-db.org/xquery/kwic";
+
+declare namespace html="http://www.w3.org/1999/xhtml";
+declare namespace tei="http://www.tei-c.org/ns/1.0";
+declare namespace j="http://jewishliturgy.org/ns/jlptei/1.0";
+declare namespace rest="http://exquery.org/ns/restxq";
+declare namespace output="http://www.w3.org/2010/xslt-xquery-serialization";
+declare namespace error="http://jewishliturgy.org/errors";
+declare namespace err = "http://www.w3.org/2005/xqt-errors";
+declare namespace http="http://expath.org/ns/http-client";
+
+(: path to user profile data :)
+declare variable $user:path := "/db/data/user";
+declare variable $user:api-path := "/api/user";
+declare variable $user:data-type := "user";
+(: path to schema :)
+declare variable $user:schema := concat($paths:schema-base, "/contributor.rnc");
+
+declare function user:result-title(
+ $result as node()
+ ) as xs:string {
+ let $c := root($result)/j:contributor
+ return
+ if (exists($c/tei:name))
+ then name:name-to-string($c/tei:name)
+ else ($c/tei:orgName, $c/tei:idno)[1]/string()
+};
+
+declare function user:query-function(
+ $query as xs:string
+ ) as element()* {
+ for $doc in collection($user:path)/j:contributor[ft:query(.,$query)]
+ order by user:result-title($doc) ascending
+ return $doc
+};
+
+declare function user:list-function(
+ ) as element()* {
+ for $doc in collection($user:path)/j:contributor
+ order by user:result-title($doc) ascending
+ return $doc
+};
+
+(:~ List or query users and contributors
+ : @param $q text of the query, empty string for all
+ : @param $start first user to list
+ : @param $max-results number of users to list
+ : @return a list of users whose full names or user names match the query
+ :)
+declare
+ %rest:GET
+ %rest:path("/api/user")
+ %rest:query-param("q", "{$q}", "")
+ %rest:query-param("start", "{$start}", 1)
+ %rest:query-param("max-results", "{$max-results}", 100)
+ %rest:produces("application/xhtml+xml", "application/xml", "text/xml", "text/html")
+ %output:method("xhtml")
+ function user:list(
+ $q as xs:string*,
+ $start as xs:integer*,
+ $max-results as xs:integer*
+ ) as item()+ {
+ crest:list($q, $start, $max-results,
+ "User and contributor API", api:uri-of($user:api-path),
+ user:query-function#1, user:list-function#0,
+ (
+ ,
+ ,
+ $crest:additional-validate
+ ),
+ user:result-title#1
+ )
+};
+
+(:~ Get a user profile
+ : @param $name Name of user to profile
+ : @return The profile, if available. Otherwise, return error 404 (not found)
+ :)
+declare
+ %rest:GET
+ %rest:path("/api/user/{$name}")
+ %rest:produces("application/xml", "application/tei+xml", "text/xml")
+ %output:method("xml")
+ function user:get(
+ $name as xs:string
+ ) as item()+ {
+ let $resource := concat($user:path, "/", $name, ".xml")
+ return
+ if (doc-available($resource))
+ then doc($resource)
+ else api:rest-error(404, "Not found")
+};
+
+(:~ Create a new user or edit a user's password, using XML
+ : @param $body The user XML, {name}{}
+ : @return if available. Otherwise, return errors
+ : 201 (created): A new user was created, a location link points to the profile
+ : 400 (bad request): User or password missing
+ : 401 (not authorized): Attempt to change a password for a user and you are not authenticated,
+ : 403 (forbidden): Attempt to change a password for a user and you are authenticated as a different user
+ :)
+declare
+ %rest:POST("{$body}")
+ %rest:path("/api/user")
+ %rest:consumes("application/xml", "text/xml")
+ function user:post-xml(
+ $body as document-node()
+ ) as item()+ {
+ user:post-form($body//user, $body//password)
+};
+
+(:~ Create a new user or edit a user's password, using a web form
+ : @param $user The user's name
+ : @param $password The user's new password
+ : @return if available. Otherwise, return errors
+ : 201 (created): A new user was created, a location link points to the profile
+ : 400 (bad request): User or password missing
+ : 401 (not authorized): Attempt to change a password for a user and you are not authenticated,
+ : 403 (forbidden): Attempt to change a password for a user and you are authenticated as a different user
+ :)
+declare
+ %rest:POST
+ %rest:path("/api/user")
+ %rest:form-param("user", "{$user}")
+ %rest:form-param("password", "{$password}")
+ %rest:consumes("application/x-www-form-urlencoded")
+ function user:post-form(
+ $user as xs:string*,
+ $password as xs:string*
+ ) as item()+ {
+ let $name := xmldb:decode($user[1] || "")
+ let $normalized-name := data:normalize-resource-title($name, true())
+ let $password := $password[1]
+ return
+ if (not($name = $normalized-name))
+ then api:rest-error(400, "User names must contain only alphanumeric characters, nonrepeated dashes and underscores. They must begin with a letter. They may not end with an underscore or dash.")
+ else if (not($name) or not($password))
+ then api:rest-error(400, "Missing user or password")
+ else
+ let $user := app:auth-user()
+ return
+ if ($user = $name)
+ then
+ (: logged in as the user of the request.
+ : this is a change password request
+ :)
+
+
+ text
+
+ {
+ system:as-user("admin", $magic:password,
+ sm:passwd($name, $password)
+ )
+ }
+
+
+ else if (not($user))
+ then
+ (: not authenticated, this is a new user request :)
+ if (system:as-user("admin", $magic:password, sm:user-exists($name)))
+ then
+ (: user already exists, need to be authenticated to change the password :)
+ api:rest-error(401, "Not authorized")
+ else if (collection($user:path)//tei:idno=$name)
+ then
+ (: profile already exists, but is not a user. No authorization will help :)
+ api:rest-error(403, "Forbidden")
+ else (
+ (: the user can be created :)
+ system:as-user("admin", $magic:password, (
+ let $null := sm:create-account($name, $password, "everyone")
+ let $stored :=
+ xmldb:store($user:path,
+ concat($normalized-name, ".xml"),
+
+ {$name}
+
+ )
+ let $uri := xs:anyURI($stored)
+ return
+ if ($stored)
+ then
+
+
+ text
+
+ {
+ sm:chmod($uri, "rw-r--r--"),
+ sm:chown($uri, $name),
+ sm:chgrp($uri, $name),
+ didx:reindex(doc($stored))
+ }
+
+
+
+
+ else
+ api:rest-error(500, "Internal error in storing a document",
+ (" storage = " || $stored)
+ )
+ ))
+ )
+ else
+ (: authenticated as a user who is not the one we're changing :)
+ api:rest-error(403, "Attempt to change the password of a different user")
+};
+
+declare function user:validate(
+ $doc as document-node(),
+ $name as xs:string
+ ) as xs:boolean {
+ jvalidate:validation-boolean(
+ user:validate-report($doc, $name)
+ )
+};
+
+declare function user:validate-report(
+ $doc as document-node(),
+ $name as xs:string
+ ) as element(report) {
+ jvalidate:concatenate-reports((
+ jvalidate:validate-relaxng($doc, xs:anyURI($user:schema)),
+ let $name-ok := $name = $doc//tei:idno
+ return
+
+ {
+ if (not($name-ok))
+ then "invalid"
+ else "valid"
+ }
+ {
+ if (not($name-ok))
+ then "tei:idno must be the same as the profile name."
+ else ()
+ }
+
+ ))
+};
+
+declare function user:put(
+ $name as xs:string,
+ $body as document-node()
+ ) as item()+ {
+ user:put($name, $body, ())
+};
+
+(:~ Edit or create a user or contributor profile
+ : @param $name The name to place the profile under
+ : @param $body The user profile, which must validate against /schema/contributor.rnc
+ : @param $validate Validate without writing to the database
+ : @return
+ : 200 (OK): validated successfully
+ : 201 (created): A new contributor profile, which is not associated with a user, has been created
+ : 204 (no data): The profile was successfully edited
+ : 400 (bad request): The profile is invalid
+ : 401 (not authorized): You are not authenticated,
+ : 403 (forbidden): You are authenticated as a different user
+ :)
+declare
+ %rest:PUT("{$body}")
+ %rest:path("/api/user/{$name}")
+ %rest:query-param("validate", "{$validate}")
+ %rest:consumes("application/tei+xml", "application/xml", "text/xml")
+ function user:put(
+ $name as xs:string,
+ $body as document-node(),
+ $validate as xs:string*
+ ) as item()+ {
+ let $is-validate := boolean($validate[1])
+ let $name := xmldb:decode($name)
+ let $user := app:auth-user()
+ let $resource-name := encode-for-uri($name) || ".xml"
+ let $resource := concat($user:path, "/", $resource-name)
+ let $resource-exists := doc-available($resource)
+ let $is-non-user-profile :=
+ not($user = $name) and
+ ($resource-exists and sm:has-access(xs:anyURI($resource), "w")) or
+ not($resource-exists)
+ return
+ if (not($user))
+ then api:rest-error(401, "Unauthorized")
+ else if ($user = $name or $is-non-user-profile)
+ then
+ (: user editing his own profile, or a non-user profile :)
+ if (user:validate($body, $name))
+ then
+ (: the profile is valid :)
+ if ($is-validate)
+ then
+ crest:validation-success()
+ else
+ if (xmldb:store($user:path, $resource-name, $body))
+ then (
+ system:as-user("admin", $magic:password, (
+ sm:chown(xs:anyURI($resource), $user),
+ sm:chgrp(xs:anyURI($resource), if ($is-non-user-profile) then "everyone" else $user),
+ sm:chmod(xs:anyURI($resource), if ($is-non-user-profile) then "rw-rw-r--" else "rw-r--r--")
+ )),
+ didx:reindex($user:path, $resource-name),
+
+
+ text
+
+ {
+ if ($resource-exists)
+ then
+ else
+
+
+
+ }
+
+ )
+ else api:rest-error(500, "Internal error: cannot store the profile")
+ else (: invalid :)
+ let $report := user:validate-report($body, $name)
+ return
+ if ($is-validate)
+ then $report
+ else api:rest-error(400, "Invalid", $report)
+ else api:rest-error(403, "Forbidden")
+};
+
+(:~ Delete a contributor or contributor profile
+ : @param $name Profile to remove
+ : @return
+ : 200 (OK): The profile is referenced elsewhere. All the information in it was deleted. A list of referencing documents is returned.
+ : 204 (no data): The profile was successfully deleted
+ : 401 (not authorized): You are not authenticated
+ : 403 (forbidden): You are authenticated as a different user
+ :)
+declare
+ %rest:DELETE
+ %rest:path("/api/user/{$name}")
+ function user:delete(
+ $name as xs:string
+ ) as item()+ {
+ let $user := app:auth-user()
+ let $resource-name := concat($name, ".xml")
+ let $resource := concat($user:path, "/", $resource-name)
+ let $resource-exists := doc-available($resource)
+ let $is-non-user-profile :=
+ not($user = $name) and
+ ($resource-exists and sm:has-access(xs:anyURI($resource), "w"))
+ let $return-success :=
+
+
+ text
+
+
+
+ return
+ if (not($resource-exists))
+ then api:rest-error(404, "Not found")
+ else if (not($user))
+ then api:rest-error(401, "Unauthorized")
+ else if ($user = $name)
+ then
+ let $user-doc := doc($resource)
+ let $user-references := ridx:query-document($user-doc)[not(root(.) is doc)]
+ let $removal-return :=
+ if (empty($user-references))
+ then
+ let $null := xmldb:remove($user:path, $resource-name)
+ return $return-success
+ else
+ (: the user is referenced externally.
+ the profile should be replaced with a basic deleted user profile
+ :)
+ let $store := xmldb:store($user:path, $resource-name,
+ {
+ $user-doc/j:contributor/tei:idno,
+ Deleted user
+ }
+ )
+ let $chown := system:as-user("admin", $magic:password, (
+ sm:chown(xs:anyURI($resource), "admin"),
+ sm:chgrp(xs:anyURI($resource), "everyone"),
+ sm:chmod(xs:anyURI($resource), "rw-rw-r--")
+ ))
+ return
+ api:rest-error(200, "The user account was removed, but external references prevented the user profile from being removed. It has been replaced by the profile of a deleted user, and will continue to exist as an empty third-party profile.",
+ {
+ for $udoc in $user-references
+ group by $uuri := document-uri(root($udoc))
+ return {data:db-path-to-api($uuri)}
+ })
+ return
+ system:as-user("admin", $magic:password, (
+ try {
+ for $member in sm:get-group-members($name)
+ return sm:remove-group-member($name, $member),
+ for $manager in sm:get-group-managers($name)
+ return sm:remove-group-manager($name, $manager),
+ sm:remove-account($name),
+ sm:remove-group($name), (: TODO: successor group is guest! until remove-group#2 exists@ :)
+ didx:remove($user:path, $resource-name),
+ $removal-return
+ }
+ catch * {
+ api:rest-error(500, "Internal error: Cannot delete the user or group!",
+ debug:print-exception("user",
+ $err:line-number, $err:column-number,
+ $err:code, $err:value, $err:description))
+ }
+ ))
+ else if ($is-non-user-profile)
+ then (
+ (: non-user profile -- check for references! :)
+ xmldb:remove($user:path, $resource-name),
+ $return-success
+ )
+ else
+ (: must be another user's profile :)
+ api:rest-error(403, "Forbidden")
+};
+
+(:~ Get access/sharing data for a contributor profile
+ : @param $name Name of contributor
+ : @param $user User to get access as
+ : @return HTTP 200 and an access structure (a:access) or user access (a:user-access)
+ : @error HTTP 400 User does not exist
+ : @error HTTP 404 Document not found or inaccessible
+ :)
+declare
+ %rest:GET
+ %rest:path("/api/user/{$name}/access")
+ %rest:query-param("user", "{$user}")
+ %rest:produces("application/xml")
+ function user:get-access(
+ $name as xs:string,
+ $user as xs:string*
+ ) as item()+ {
+ crest:get-access($user:data-type, $name, $user)
+};
+
+(:~ Set access/sharing data for a contributor profile
+ : @param $name Name of document
+ : @param $body New sharing rights, as an a:access structure
+ : @return HTTP 204 No data, access rights changed
+ : @error HTTP 400 Access structure is invalid
+ : @error HTTP 401 Not authorized
+ : @error HTTP 403 Forbidden
+ : @error HTTP 404 Document not found or inaccessible
+ :)
+declare
+ %rest:PUT("{$body}")
+ %rest:path("/api/user/{$name}/access")
+ %rest:consumes("application/xml", "text/xml")
+ function user:put-access(
+ $name as xs:string,
+ $body as document-node()
+ ) as item()+ {
+ crest:put-access($user:data-type, $name, $body)
+};
+
diff --git a/opensiddur-server/src/api/utility/translit.xqm b/opensiddur-server/src/api/utility/translit.xqm
new file mode 100644
index 00000000..c7b8dee1
--- /dev/null
+++ b/opensiddur-server/src/api/utility/translit.xqm
@@ -0,0 +1,172 @@
+xquery version "3.1";
+(: Utility API for transliteration
+ :
+ : Functions assume that the following has already been done:
+ : authentication,
+ : content negotiation
+ : TODO: change the GET API to return lists of table/from/to combinations
+ : TODO: change the POST API to /api/utility/translit?table=&from=&to=
+ :
+ : Copyright 2012-2013,2018 Efraim Feinstein
+ : Open Siddur Project
+ : Licensed Under the GNU Lesser General Public License, version 3 or later
+ :)
+
+module namespace translit = "http://jewishliturgy.org/api/utility/translit";
+
+
+import module namespace api="http://jewishliturgy.org/modules/api"
+ at "../../modules/api.xqm";
+import module namespace app="http://jewishliturgy.org/modules/app"
+ at "../../modules/app.xqm";
+import module namespace data="http://jewishliturgy.org/modules/data"
+ at "../../modules/data.xqm";
+import module namespace xlit="http://jewishliturgy.org/transform/transliterator"
+ at "../../transforms/translit/translit.xqm";
+import module namespace tran="http://jewishliturgy.org/api/transliteration"
+ at "../data/transliteration.xqm";
+
+declare namespace tr="http://jewishliturgy.org/ns/tr/1.0";
+declare namespace jx="http://jewishliturgy.org/ns/jlp-processor";
+declare namespace tei="http://www.tei-c.org/ns/1.0";
+declare namespace j="http://jewishliturgy.org/ns/jlptei/1.0";
+declare namespace rest="http://exquery.org/ns/restxq";
+declare namespace output="http://www.w3.org/2010/xslt-xquery-serialization";
+
+(:~ transliterate the given data, which is wrapped in XML :)
+declare function local:transliterate(
+ $data as element(),
+ $table as element(tr:table),
+ $out-lang as xs:string
+) as node()* {
+ let $transliterated := xlit:transliterate($data, map { "translit:table" : $table })
+ return
+ element {
+ QName(namespace-uri($transliterated), name($transliterated))
+ }{
+ $transliterated/(
+ @* except @xml:lang,
+ attribute xml:lang { $out-lang },
+ node()
+ )
+ }
+};
+
+
+(:~ list all available transliteration demos
+ : @param $query Limit the search to a particular query
+ : @param $start Start the list at the given item number
+ : @param $max-results Show this many results
+ : @return An HTML list of all transliteration demos that match the given query
+ :)
+declare
+ %rest:GET
+ %rest:path("/api/utility/translit")
+ %rest:query-param("q", "{$q}", "")
+ %rest:query-param("start", "{$start}", 1)
+ %rest:query-param("max-results", "{$max-results}", 100)
+ %rest:produces("application/xhtml+xml", "application/xml", "text/html", "text/xml")
+ %output:method("xhtml")
+ function translit:transliteration-list(
+ $q as xs:string*,
+ $start as xs:integer*,
+ $max-results as xs:integer*
+ ) as item()+ {
+ let $q := string-join(($q[.]), " ")
+ let $start := $start[1]
+ let $count := $max-results[1]
+ let $list := tran:list($q, $start, $count)
+ return
+
+
+ Transliteration utility API
+ {$list//head/(* except title)}
+
+
+
This API supports HTTP POST only.
+
If you POST some data to be transliterated to
+ {api:uri-of("/api/utility/translit/")}schema-name, where you can choose a schema from
+ any transliteration schema,
+ you will get back a transliterated version.
+
+ {
+ for $li in $list//li[@class="result"]
+ return
+
+
+
+};
+
+
+(:~ post arbitrary XML for transliteration by a given schema
+ : @param $schema The schema to transliterate using
+ : @return XML of the same structure, containing transliterated text. Use @xml:lang to specify which table should be used.
+ : @error HTTP 404 Transliteration schema not found
+ : @error HTTP 400 table not found
+ :)
+declare
+ %rest:POST("{$body}")
+ %rest:path("/api/utility/translit/{$schema}")
+ %rest:consumes("application/xml")
+ %rest:produces("application/xml", "text/xml")
+ function translit:transliterate-xml(
+ $body as document-node(),
+ $schema as xs:string
+ ) as item()* {
+ let $schema-exists := data:doc("transliteration", $schema)
+ let $in-lang := ($body/*/@xml:lang/string(), "he")[1]
+ let $out-lang := $in-lang || "-Latn"
+ let $table-exists := $schema-exists/tr:schema/tr:table[tr:lang[@in=$in-lang][@out=$out-lang]]
+ return
+ if ($table-exists)
+ then
+ let $transliterated := local:transliterate($body/*, $table-exists, $out-lang)
+ return $transliterated
+ else if ($schema-exists)
+ then
+ api:rest-error(400, "Table cannot be found to transliterate " || $in-lang || " to " || $out-lang, $schema)
+ else
+ api:rest-error(404, "Schema cannot be found", $schema)
+};
+
+(:~ Transliterate plain text
+ : @param $body The text to transliterate, which is assumed to be Hebrew
+ : @return Transliterated plain text
+ : @error HTTP 404 Transliteration schema not found
+ : @error HTTP 400 Transliteration table not found
+ :)
+declare
+ %rest:POST("{$body}")
+ %rest:path("/api/utility/translit/{$schema}")
+ %rest:consumes("text/plain")
+ %rest:produces("text/plain")
+ function translit:transliterate-text(
+ $body as xs:base64Binary,
+ $schema as xs:string
+ ) as item()+ {
+ let $text := util:binary-to-string($body)
+ let $transliterated :=
+ translit:transliterate-xml(
+ document {
+ {
+ $text
+ }
+ }, $schema)
+ return
+ if ($transliterated[2] instance of element(error))
+ then $transliterated
+ else (
+
+
+ text
+
+ ,
+ data($transliterated)
+ )
+};
diff --git a/opensiddur-server/src/api/utility/utilityindex.xqm b/opensiddur-server/src/api/utility/utilityindex.xqm
new file mode 100644
index 00000000..fd36af6e
--- /dev/null
+++ b/opensiddur-server/src/api/utility/utilityindex.xqm
@@ -0,0 +1,46 @@
+xquery version "3.0";
+(: Utility API index
+ :
+ :
+ : Copyright 2012-2013,2018 Efraim Feinstein
+ : Open Siddur Project
+ : Licensed Under the GNU Lesser General Public License, version 3 or later
+ :)
+
+module namespace uindex = "http://jewishliturgy.org/api/utility";
+
+import module namespace api="http://jewishliturgy.org/modules/api"
+ at "../../modules/api.xqm";
+
+declare namespace rest="http://exquery.org/ns/restxq";
+declare namespace output="http://www.w3.org/2010/xslt-xquery-serialization";
+
+(:~ index function for the demo services
+ : @return An HTML list of available demo service APIs
+ :)
+declare
+ %rest:GET
+ %rest:path("/api/utility")
+ %rest:produces("application/xhtml+xml", "application/xml", "text/html", "text/xml")
+ %output:method("xhtml")
+ function uindex:list(
+) as item()+ {
+
+
+ Utility API index
+
+
+
+ let $listed-results :=
+ {
+ $list-of-results
+ }
+ return (
+ $listed-results,
+ $start,
+ $count,
+ count($all-results)
+ )
+};
+
+declare function crest:do-list(
+ $start as xs:integer,
+ $count as xs:integer,
+ $path-base as xs:string,
+ $list-function as (function() as element()*),
+ $additional-uris as element(crest:additional)*,
+ $title-function as (function(node()) as xs:string)?
+ ) {
+ let $title-function as function(node()) as xs:string :=
+ ($title-function, crest:tei-title-function#1)[1]
+ let $all := $list-function()
+ return (
+
{
+ for $result in subsequence($all, $start, $count)
+ let $api-name := replace((
+ util:document-name($result)[.], (: if there is no document available, use the result itself as the API name :)
+ $result)[1], "\.xml$", "")
+ return
+
,
+ $start,
+ $count,
+ count($all)
+ )
+};
+
+(:~ Delete an original text
+ : #param $data-type data-type
+ : @param $name The name of the resource
+ : @return HTTP 204 (No data) if successful
+ : @error HTTP 400 Cannot be deleted and a reason, including existing external references
+ : @error HTTP 401 Not authorized
+ : @error HTTP 403 Forbidden - logged in as a user who does not have write access to the document
+ : @error HTTP 404 Not found
+ :)
+declare function crest:delete(
+ $data-type as xs:string,
+ $name as xs:string
+ ) as item()+ {
+ let $doc := data:doc($data-type, $name)
+ return
+ if ($doc)
+ then
+ let $path := document-uri($doc) cast as xs:anyURI
+ let $collection := util:collection-name($doc)
+ let $resource := util:document-name($doc)
+ return
+ if (
+ (: for deletion,
+ eXist requires write access to the collection.
+ We need to require write access to the path
+ :)
+ sm:has-access(xs:anyURI($collection), "w") and
+ sm:has-access($path, "w")
+ )
+ then
+ let $doc-references := ridx:query-document($doc)/root(.)[not(. is $doc)]
+ return
+ if (exists($doc-references))
+ then
+ api:rest-error(400, "The document cannot be deleted because other documents reference this document.",
+ {
+ for $other-doc in $doc-references
+ group by $other-doc-uri := document-uri(root($other-doc))
+ return
+ {data:db-path-to-api($other-doc-uri)}
+ })
+ else
+ (
+ (: TODO: check for references! :)
+ let $r1 := xmldb:remove($collection, $resource)
+ let $r2 := ridx:remove($collection, $resource)
+ let $r3 := didx:remove($collection, $resource)
+ return
+
+
+ text
+
+
+
+ )
+ else
+ crest:no-access()
+ else
+ api:rest-error(404, "Not found", $name)
+};
+
+declare function crest:post(
+ $data-path as xs:string,
+ $path-base as xs:string,
+ $api-path-base as xs:string,
+ $body as document-node(),
+ $validation-function-boolean as
+ function(item(), document-node()?) as xs:boolean,
+ $validation-function-report as
+ function(item(), document-node()?) as element(),
+ $title-function as (function(node()) as xs:string)?
+ ) as item()+ {
+ crest:post($data-path, $path-base, $api-path-base, $body, $validation-function-boolean, $validation-function-report,
+ $title-function, true(), ())
+};
+
+(:~ Post a new document
+ : @param $data-path document data type and additional database path
+ : @param $path-base base path for document type in the db
+ : @param $api-path-base Base path of the API (/api/...)
+ : @param $body The document
+ : @param $validation-function-boolean function used to validate that returns a boolean
+ : @param $validation-function-report function used to validate that returns a full report
+ : @param $title-function Function that derives the title text from a document
+ : @param $use-reference-index true() [default] if the reference index should be updated, false() or empty() otherwise
+ : @return HTTP 201 if created successfully
+ : @error HTTP 400 Invalid JLPTEI XML
+ : @error HTTP 401 Not authorized
+ : @error HTTP 500 Storage error
+ :
+ : Other effects:
+ : * A change record is added to the resource
+ : * The new resource is owned by the current user, group owner=current user, and mode is 664
+ : * A reference index is created for the resource
+ :)
+declare function crest:post(
+ $data-path as xs:string,
+ $path-base as xs:string,
+ $api-path-base as xs:string,
+ $body as document-node(),
+ $validation-function-boolean as
+ function(item(), document-node()?) as xs:boolean,
+ $validation-function-report as
+ function(item(), document-node()?) as element(),
+ $title-function as (function(node()) as xs:string)?,
+ $use-reference-index as xs:boolean?,
+ $validate as xs:boolean?
+ ) as item()+ {
+ if (sm:has-access(xs:anyURI($path-base), if ($validate) then "r" else "w"))
+ then
+ if ($validation-function-boolean($body, ()))
+ then
+ let $title-function :=
+ ($title-function, crest:tei-title-function#1)[1]
+ let $paths :=
+ data:new-path-to-resource(
+ $data-path,
+ data:normalize-resource-title($title-function($body), false())
+ )
+ let $resource := $paths[2]
+ let $collection := $paths[1]
+ let $user := app:auth-user()
+ return
+ if ($resource)
+ then
+ if ($validate)
+ then crest:validation-success()
+ else (
+ app:make-collection-path($collection, "/", sm:get-permissions(xs:anyURI($path-base))),
+ let $db-path := xmldb:store($collection, $resource, $body)
+ return
+ if ($db-path)
+ then
+
+
+ text
+
+
+ {
+ let $uri := xs:anyURI($db-path)
+ let $doc := doc($db-path)
+ let $change-record := crest:record-change($doc, "created")
+ return (
+ system:as-user("admin", $magic:password, (
+ sm:chown($uri, $user),
+ sm:chgrp($uri, "everyone"),
+ sm:chmod($uri, "rw-rw-r--")
+ )),
+ didx:reindex($doc),
+ if ($use-reference-index) then ridx:reindex($doc) else ()
+ )
+ }
+
+
+
+ else api:rest-error(500, "Cannot store the resource")
+ )
+ else
+ let $message := "A title element with non-whitespace content is required"
+ return
+ if ($validate)
+ then crest:validation-failure({$message})
+ else api:rest-error(400, $message)
+ else
+ let $report := $validation-function-report($body, ())
+ return
+ if ($validate)
+ then $report
+ else api:rest-error(400, "Input document is not valid", $report)
+ else crest:no-access()
+};
+
+declare function crest:put(
+ $data-type as xs:string,
+ $name as xs:string,
+ $body as document-node(),
+ $validation-function-boolean as
+ function(item(), document-node()?) as xs:boolean,
+ $validation-function-report as
+ function(item(), document-node()?) as element()
+ ) as item()+ {
+ crest:put($data-type, $name, $body, $validation-function-boolean, $validation-function-report, true(), ())
+};
+
+(:~ Edit/replace a document in the database
+ : or Validate a document as if editing (without writing the result)
+ : Side effect: update the reference index, update document index
+ : @param $data-type data type of document
+ : @param $name Name of the document to replace
+ : @param $body New document
+ : @param $validation-function-boolean function used to validate that returns a boolean
+ : @param $validation-function-report function used to validate that returns a full report
+ : @param $use-reference-index true() [default] if reference index should be updated, else no reference index
+ : @param $validate true() for validation only
+ : @return HTTP 200 If successfully validated (but not written)
+ : @return HTTP 204 If successful
+ : @error HTTP 400 Invalid XML; Attempt to edit a read-only part of the document
+ : @error HTTP 401 Unauthorized - not logged in
+ : @error HTTP 403 Forbidden - the document can be found, but is not writable by you
+ : @error HTTP 404 Not found
+ : @error HTTP 500 Storage error
+ :
+ : A change record is added to the resource
+ : TODO: add xml:id to required places too
+ :)
+declare function crest:put(
+ $data-type as xs:string,
+ $name as xs:string,
+ $body as document-node(),
+ $validation-function-boolean as
+ function(item(), document-node()?) as xs:boolean,
+ $validation-function-report as
+ function(item(), document-node()?) as element(),
+ $use-reference-index as xs:boolean?,
+ $validate as xs:boolean?
+ ) as item()+ {
+ let $doc := data:doc($data-type, $name)
+ return
+ if ($doc)
+ then
+ let $resource := util:document-name($doc)
+ let $collection := util:collection-name($doc)
+ let $uri := document-uri($doc)
+ return
+ if (sm:has-access(xs:anyURI($uri), if ($validate) then "r" else "w"))
+ then
+ let $validation-result := $validation-function-boolean($body, $doc)
+ return
+ if ($validation-result)
+ then
+ if ($validate)
+ then crest:validation-success()
+ else (: actual post :)
+ if (xmldb:store($collection, $resource, $body))
+ then
+
+ {
+ let $doc := doc($uri)
+ return (
+ crest:record-change($doc, "edited"),
+ didx:reindex($doc),
+ if ($use-reference-index) then ridx:reindex($doc) else ()
+
+ )
+ }
+
+ text
+
+
+
+ else api:rest-error(500, "Cannot store the resource")
+ else (: document is invalid :)
+ let $report := $validation-function-report($body, $doc)
+ return
+ if ($validate)
+ then $report (: not an error :)
+ else api:rest-error(400, "Input document is not valid",
+ $report)
+ else crest:no-access()
+ else
+ (: it is not clear that this is correct behavior for PUT.
+ : If the user gives the document a name, maybe it should
+ : just keep that resource name and create it?
+ :)
+ api:rest-error(404, "Not found", $name)
+};
+
+
+(:~ Get access/sharing data for a document
+ : @param $name Name of document
+ : @param $user Get access permissions as the given user
+ : @return HTTP 200 and an access structure (a:access),
+ : or if $user is given, a:user-access
+ : @error HTTP 400 Requested user does not exist
+ : @error HTTP 404 Document not found or inaccessible
+ :)
+declare function crest:get-access(
+ $data-type as xs:string,
+ $name as xs:string,
+ $user as xs:string*
+ ) as item()+ {
+ let $doc := data:doc($data-type, $name)
+ return
+ if ($doc)
+ then
+ if (exists($user))
+ then
+ try {
+ acc:get-access-as-user($doc, $user[1])
+ }
+ catch error:BAD_REQUEST {
+ api:rest-error(400, "User not found", $user[1])
+ }
+ else acc:get-access($doc)
+ else api:rest-error(404, "Not found", $name)
+};
+
+(:~ Set access/sharing data for a document
+ : Side effect: change access of refindex.
+ : @param $name Name of document
+ : @param $body New sharing rights, as an a:access structure
+ : @return HTTP 204 No data, access rights changed
+ : @error HTTP 400 Access structure is invalid
+ : @error HTTP 401 Not authorized
+ : @error HTTP 403 Forbidden
+ : @error HTTP 404 Document not found or inaccessible
+ :)
+declare function crest:put-access(
+ $data-type as xs:string,
+ $name as xs:string,
+ $body as document-node()
+ ) as item()+ {
+ let $doc := data:doc($data-type, $name)
+ let $access := $body/*
+ let $uri := document-uri($doc)
+ return
+ if ($doc)
+ then
+ try {
+ acc:set-access($doc, $access),
+ let $ridx-uri := mirror:mirror-path($ridx:ridx-path, $uri)
+ where doc($ridx-uri)
+ return
+ mirror:mirror-permissions($ridx:ridx-path, $uri, $ridx-uri),
+
+
+ text
+
+
+
+ }
+ catch error:VALIDATION {
+ api:rest-error(400, "Validation error in input", acc:validate-report($access))
+ }
+ catch error:UNAUTHORIZED {
+ api:rest-error(401, "Not authenticated")
+ }
+ catch error:FORBIDDEN {
+ api:rest-error(403, "Forbidden")
+ }
+ else api:rest-error(404, "Not found", $name)
+};
+
+declare function crest:validation-success(
+ ) as element(report) {
+
+ valid
+
+};
+
+declare function crest:validation-failure(
+ $messages as element(message)+
+ ) as element(report) {
+
+ invalid
+ {$messages}
+
+ };
\ No newline at end of file
diff --git a/opensiddur-server/src/modules/common.xqm b/opensiddur-server/src/modules/common.xqm
new file mode 100644
index 00000000..3e14a03c
--- /dev/null
+++ b/opensiddur-server/src/modules/common.xqm
@@ -0,0 +1,357 @@
+xquery version "3.1";
+(:~
+ : Common functions for the transform
+ :
+ : Open Siddur Project
+ : Copyright 2011-2014 Efraim Feinstein
+ : Licensed under the GNU Lesser General Public License, version 3 or later
+ :
+ :)
+module namespace common="http://jewishliturgy.org/transform/common";
+
+import module namespace debug="http://jewishliturgy.org/transform/debug"
+ at "debug.xqm";
+import module namespace data="http://jewishliturgy.org/modules/data"
+ at "data.xqm";
+import module namespace mirror="http://jewishliturgy.org/modules/mirror"
+ at "mirror.xqm";
+import module namespace uri="http://jewishliturgy.org/transform/uri"
+ at "follow-uri.xqm";
+
+declare namespace tei="http://www.tei-c.org/ns/1.0";
+declare namespace j="http://jewishliturgy.org/ns/jlptei/1.0";
+declare namespace jf="http://jewishliturgy.org/ns/jlptei/flat/1.0";
+declare namespace error="http://jewishliturgy.org/errors";
+declare namespace http="http://expath.org/ns/http-client";
+
+(:~ generate a unique, persistent id for a node. replace with xsl:generate-id()
+ : @param $node node to create an id for
+ :)
+declare function common:generate-id(
+ $node as node()
+ ) as xs:string {
+ let $docid :=
+ let $d := util:absolute-resource-id($node)
+ return
+ if ($d)
+ then string($d)
+ else (
+ (: it's a temporary node :)
+ debug:debug($debug:warn, 'common:generate-id() used on a temporary node. There is no guarantee the node will always have the same ID', $node),
+ util:uuid($node)
+ )
+ let $nodeid := string(util:node-id($node))
+ return
+ string-join(
+ (
+ if ($node instance of element())
+ then $node/local-name()
+ else "node", $docid, $nodeid
+ ), "-"
+ )
+};
+
+declare function common:copy-attributes-and-context(
+ $context as element(),
+ $attributes as attribute()*
+ ) as attribute()* {
+ common:copy-attributes-and-context($context, $attributes, ())
+};
+
+(:~ Copy the current context attributes and lang/base
+ context, if necessary. Passing an empty sequence indicates
+ that the base or lang should not be added unless an explicit
+ attribute is present. :)
+declare function common:copy-attributes-and-context(
+ $context as element(),
+ $attributes as attribute()*,
+ $tunnel as map(xs:string, item()*)?
+ ) as attribute()* {
+ let $tunnel := ($tunnel, map {} )[1]
+ let $current-base-uri :=
+ ($tunnel("current-base-uri"), base-uri($context))[1]
+ let $current-document-uri :=
+ ($tunnel("current-document-uri"), common:original-document-uri($context))[1]
+ let $current-lang :=
+ ($tunnel("current-lang"), common:language($context))[1]
+ return (
+ $attributes//(@* except (@lang,@xml:lang,@xml:base)),
+ if ($current-base-uri)
+ then
+ attribute xml:base { uri:uri-base-resource($current-base-uri) }
+ else (),
+ if ($current-document-uri)
+ then
+ attribute jf:document-uri { uri:uri-base-resource($current-document-uri) }
+ else (),
+ if ($current-lang)
+ then
+ attribute xml:lang { $current-lang }
+ else (),
+ debug:debug($debug:detail, ('copy-attributes-and-context for ', util:node-xpath($context)), ('lang:', $current-lang, ' base:', $current-base-uri, ' document-uri:', $current-document-uri))
+ )
+};
+
+declare function common:copy-attributes-and-context-if-changed(
+ $context as element(),
+ $attributes as attribute()*
+ ) {
+ common:copy-attributes-and-context-if-changed(
+ $context, $attributes, ()
+ )
+};
+
+declare function common:copy-attributes-and-context-if-changed(
+ $context as element(),
+ $attributes as attribute()*,
+ $tunnel as map(xs:string, item()*)
+ ) as attribute()* {
+ common:copy-attributes-and-context-if-changed(
+ $context, $attributes, $tunnel, (), (), ()
+ )
+};
+
+
+(:~ Copy attributes and context (xml:base, jf:document-uri, xml:lang) if
+ the context is changed, either by coming from a different document or by manual changes.
+ Do not copy @xml:id to prevent invalid XML from repetition.
+ @param $context Context of call
+ @param $attributes List of attributes to potentially copy
+ @param new-document-uri Document URI of the context (defaulted if empty)
+ @param new-lang Language of the context (defaulted if empty)
+ @param new-base-uri Base URI of context (defaulted if empty)
+ @param $tunnel Tunneled parameters:
+ current-document-uri Document URI
+ current-language Language
+ current-base-uri Base URI
+ :)
+declare function common:copy-attributes-and-context-if-changed(
+ $context as element(),
+ $attributes as attribute()*,
+ $tunnel as map(xs:string, item()*)?,
+ $new-document-uri as xs:anyURI?,
+ $new-lang as xs:string?,
+ $new-base-uri as xs:anyURI?
+ ) as attribute()* {
+ let $new-document-uri := (
+ $new-document-uri,
+ uri:uri-base-resource(common:original-document-uri($context))
+ )[1]
+ let $new-lang := (
+ $new-lang,
+ common:language($context)
+ )[1]
+ let $new-base-uri := (
+ $new-base-uri,
+ uri:uri-base-resource(base-uri($context))
+ )[1]
+ let $current-document-uri :=
+ (
+ $tunnel("current-document-uri"),
+ uri:uri-base-resource(
+ common:original-document-uri($context/(..,.)[1])
+ )
+ )[1]
+ let $current-lang :=
+ (
+ $tunnel("current-lang"),
+ common:language($context/(..,.)[1])
+ )[1]
+ let $current-base-uri :=
+ (
+ $tunnel("current-base-uri"),
+ uri:uri-base-resource(base-uri($context/(..,.)[1]))
+ )[1]
+ return (
+ $attributes//(@* except (@xml:base,@xml:lang,@jf:document-uri)),
+ debug:debug($debug:detail, ('copy-attributes-and-context-if-changed for ', util:node-xpath($context)), ('attributes = ', debug:list-attributes($attributes//(@* except (@xml:base,@xml:lang,@jf:document-uri))),' copying = ' , $new-document-uri and not($current-document-uri eq $new-document-uri), '$current-document-uri = ', $current-document-uri, ' $new-document-uri = ', $new-document-uri, ' context:', $context)),
+ if ($new-base-uri and not($current-base-uri eq $new-base-uri))
+ then
+ attribute xml:base { uri:uri-base-resource($new-base-uri) }
+ else (),
+ if ($new-document-uri and not($current-document-uri eq $new-document-uri))
+ then
+ attribute jf:document-uri { uri:uri-base-resource($new-document-uri) }
+ else (),
+ if ($new-lang and not($current-lang eq $new-lang))
+ then
+ attribute xml:lang { $new-lang }
+ else ()
+ )
+};
+
+(:~ Returns the language of the given node, as it would be tested with the lang() function.
+ : If none can be found, returns and empty string.
+ : @param $node A single node to return the language for.
+ :)
+declare function common:language(
+ $node as node()
+ ) as xs:string {
+ string($node/ancestor-or-self::*[@xml:lang][1]/@xml:lang)
+};
+
+(:~ Return the original document uri of a node, given the
+ : possibility that processing was done by concurrent.xqm
+ : When this function is called, you want a URI.
+ : It fails if it cannot give one.
+ : The declaration is xs:anyURI? to prevent a stylesheet error.
+ : The original document URI is determined by (in order):
+ : @jf:source-document-uri, @jf:document-uri (cascading from ancestors) and
+ : the document-uri() function
+ : @param $node The node whose document-uri we are trying to get
+ :)
+declare function common:original-document-uri(
+ $node as node()
+ ) as xs:anyURI? {
+ let $document-uri as xs:anyURI? := document-uri(root($node))
+ let $closest-jf-document-uri as xs:anyURI? :=
+ xs:anyURI(
+ if ($node instance of document-node())
+ then $node/*/(@jf:source-document-uri, @jf:document-uri)[1]
+ else $node/
+ (@jf:source-document-uri,
+ ancestor-or-self::*[@jf:document-uri][1]/@jf:document-uri)[1]
+ )
+ return
+ ($closest-jf-document-uri, $document-uri)[1]
+};
+
+(:~ return the original path from which a node derives. The path generally begins with /data.
+ : The search path is:
+ : * If @jf:document exists in an ancestor, return its value
+ : * If the node is in a cached document, unmirror it
+ : * Otherwise, return the API path (without /api prefixing)
+ : * If an API path does not exist (as happens in tests), return the document URI
+ :)
+declare function common:original-document-path(
+ $node as node()
+ ) as xs:string {
+ let $document-uri := document-uri(root($node))
+ let $jf-document := $node/ancestor-or-self::*[@jf:document][1]/@jf:document/string()
+ return
+ if ($jf-document)
+ then $jf-document
+ else
+ let $api-path :=
+ try {
+ data:db-path-to-api(
+ if (starts-with($document-uri, "/db/cache"))
+ then (: (1) / (2) db / (3) cache / (4) type / (5) path... :)
+ let $cache-type := string-join(subsequence(tokenize($document-uri, "/"), 1, 4), "/")
+ return mirror:unmirror-path($cache-type, $document-uri)
+ else $document-uri
+ )
+ }
+ catch error:NOTIMPLEMENTED {
+ $document-uri
+ }
+ return replace($api-path, "^(/exist/restxq)?(/api)?", "")
+};
+
+(:~ return the effective TEI root of a document.
+ : In most cases, it's the same as the document-node()/tei:TEI
+ : however, in cases of parallel documents, it may be one of many tei:TEI elements
+ :)
+declare function common:TEI-root(
+ $node as node()
+ ) as element(tei:TEI) {
+ if ($node/@uri:document-uri)
+ then
+ (: this came from a copy, so the root node is in the original :)
+ doc($node/@uri:document-uri)//tei:TEI[1]
+ else $node/ancestor-or-self::tei:TEI[1]
+};
+
+(:~ apply an identity transform until reaching
+ : a node in $transition-nodes, then apply
+ : $transform
+ : @param $nodes nodes to identity transform
+ : @param $transition-nodes transitional nodes
+ : @param $transform The transform to apply
+ : @param $params Named parameters to pass to the transform
+ :)
+declare function common:apply-at(
+ $nodes as node()*,
+ $transition-nodes as node()*,
+ $transform as function(node()*, map(*)) as node()*,
+ $params as map(*)
+ ) as node()* {
+ for $node in $nodes
+ return
+ if (some $t in $transition-nodes satisfies $node is $t)
+ then
+ $transform($node, $params)
+ else
+ typeswitch($node)
+ case processing-instruction() return $node
+ case comment() return $node
+ case text() return $node
+ case element()
+ return
+ element {QName(namespace-uri($node), name($node))}{
+ $node/@*,
+ common:apply-at($node/node(), $transition-nodes, $transform, $params)
+ }
+ case document-node()
+ return document { common:apply-at($node/node(), $transition-nodes, $transform, $params) }
+ default return common:apply-at($node/node(), $transition-nodes, $transform, $params)
+};
+
+(:~ simulate following-sibling::* in sequences
+ : @return all items in the sequence $sequence that follow $item
+ : $item is a reference, not a value
+ :)
+declare function common:following(
+ $item as node()?,
+ $sequence as node()*
+ ) as node()* {
+ if (exists($item))
+ then
+ subsequence(
+ $sequence,
+ (: there may be a better way to do this! :)
+ (for $s at $i in $sequence
+ where $s is $item
+ return $i + 1)[1]
+ )
+ else ()
+};
+
+(:~ simulate preceding-sibling::* in sequences
+ : @return all items in the sequence $sequence that precede $item
+ : $item is a reference, not a value
+ :)
+declare function common:preceding(
+ $item as node()?,
+ $sequence as node()*
+ ) as node()* {
+ if (exists($item))
+ then
+ subsequence(
+ $sequence,
+ 1,
+ (: there may be a better way to do this! :)
+ (for $s at $i in $sequence
+ where $s is $item
+ return $i - 1)[1]
+ )
+ else ()
+};
+
+(:~ given a language code, determine its direction
+ : (rtl, ltr)
+ :)
+declare function common:direction-from-language(
+ $lang as xs:string
+ ) as xs:string {
+ switch ($lang)
+ case "he" (: Hebrew :)
+ case "arc" (: Aramaic :)
+ case "ar" (: Arabic :)
+ return
+ if (contains($lang, "-latn")) (: Latin alphabet transliteration :)
+ then "ltr"
+ else "rtl"
+ default
+ return "ltr"
+};
diff --git a/opensiddur-server/src/modules/data.xqm b/opensiddur-server/src/modules/data.xqm
new file mode 100644
index 00000000..33717f69
--- /dev/null
+++ b/opensiddur-server/src/modules/data.xqm
@@ -0,0 +1,220 @@
+xquery version "3.1";
+(:~ support functions for the REST API for data retrieval
+ :
+ : Open Siddur Project
+ : Copyright 2011-2014 Efraim Feinstein
+ : Licensed under the GNU Lesser General Public License, version 3 or later
+ :
+ :)
+module namespace data="http://jewishliturgy.org/modules/data";
+
+import module namespace api="http://jewishliturgy.org/modules/api"
+ at "api.xqm";
+import module namespace app="http://jewishliturgy.org/modules/app"
+ at "app.xqm";
+import module namespace didx="http://jewishliturgy.org/modules/docindex"
+ at "docindex.xqm";
+
+declare namespace tei="http://www.tei-c.org/ns/1.0";
+declare namespace j="http://jewishliturgy.org/ns/jlptei/1.0";
+declare namespace error="http://jewishliturgy.org/errors";
+declare namespace exist="http://exist.sourceforge.net/NS/exist";
+declare namespace err="http://www.w3.org/2005/xqt-errors";
+
+(:~ base of all data paths :)
+declare variable $data:path-base := "/db/data";
+
+(:~ API paths that can be supported by doc and db-api-path-to-db :)
+declare variable $data:supported-api-paths := ("data", "user");
+
+(:~ maximum length (character) of the title part of a resource name [excludes any postfix numbers] :)
+declare variable $data:max-resource-name-length := 128;
+
+(:~ convert a given path from an API path (may begin / or /api) to a database path
+ : works only to find the resource.
+ : @param $api-path API path
+ : @return The database path or empty sequence if a db path cannot be found
+ :)
+declare function data:api-path-to-db(
+ $api-path as xs:string
+ ) as xs:string? {
+ let $doc := data:doc($api-path)
+ where exists($doc)
+ return document-uri($doc)
+};
+
+(:~ Convert a database path to a path in the API
+ : @param $db-path database path to convert
+ : @return the API path or empty sequence
+ :)
+declare function data:db-path-to-api(
+ $db-path as xs:string
+ ) as xs:string? {
+ let $norm-db-path := replace($db-path, "^(/db)?/", "/db/")
+ let $doc-query := didx:query-by-path($norm-db-path)
+ where exists($doc-query)
+ return
+ api:uri-of(string-join(
+ ("/api",
+ if ($doc-query/@data-type = "user")
+ then ()
+ else "data",
+ $doc-query/@data-type,
+ $doc-query/@resource), "/"))
+};
+
+(: Find the API path of a user by name
+ : @param user name
+ : @return API path of a user by name
+ :)
+declare function data:user-api-path(
+ $name as xs:string
+ ) as xs:string? {
+ let $doc := collection("/db/data/user")//tei:idno[.=$name]/root(.)
+ where $doc
+ return
+ concat(api:uri-of("/api/user/"),
+ encode-for-uri(
+ replace(util:document-name($doc), "\.xml$", "")
+ )
+ )
+};
+
+declare function data:resource-name-from-title-and-number(
+ $title as xs:string,
+ $number as xs:integer
+ ) as xs:string {
+ string-join(
+ ( (: remove diacritics in resource names and replace some special characters
+ : like strings of ,;=$:@ with dashes. The latter characters have special
+ : meanings in some URIs and are not always properly encoded on the client side
+ :)
+ encode-for-uri(replace(replace(normalize-space($title), "\p{M}", ""), "[,;:$=@]+", "-")),
+ if ($number)
+ then ("-", string($number))
+ else (), ".xml"
+ ),
+ "")
+};
+
+declare function data:find-duplicate-number(
+ $type as xs:string,
+ $title as xs:string,
+ $n as xs:integer
+ ) as xs:integer {
+ if (exists(collection(concat($data:path-base, "/", $type))
+ [util:document-name(.)=
+ data:resource-name-from-title-and-number($title, $n)]
+ ))
+ then data:find-duplicate-number($type, $title, $n + 1)
+ else $n
+};
+
+(:~ make the path of a new resource
+ : @param $type The category of the resource (original|transliteration, eg)
+ : @param $title The resource's human-readable title
+ : @return (collection, resource)
+ :)
+declare function data:new-path-to-resource(
+ $type as xs:string,
+ $title as xs:string
+ ) as xs:string+ {
+ let $date := current-date()
+ let $resource-name :=
+ data:resource-name-from-title-and-number($title,
+ data:find-duplicate-number($type, $title, 0))
+ return (
+ app:concat-path(($data:path-base, $type)),
+ $resource-name
+ )
+};
+
+(:~ make the path of a new resource
+ : @param $type The category of the resource (original|transliteration, eg)
+ : @param $title The resource's human-readable title
+ :)
+declare function data:new-path(
+ $type as xs:string,
+ $title as xs:string
+ ) as xs:string {
+ let $new-paths := data:new-path-to-resource($type, $title)
+ return
+ string-join($new-paths, "/")
+};
+
+(:~ return a document from the collection hierarchy for $type
+ : given a resource name $name (without extension) :)
+declare function data:doc(
+ $type as xs:string,
+ $name as xs:string
+ ) as document-node()? {
+ try {
+ doc(didx:query-path($type, $name))
+ }
+ catch err:FODC0005 {
+ ( (: return empty on access denied :) )
+ }
+};
+
+(:~ get a document using an api path, with or without /api :)
+declare function data:doc(
+ $api-path as xs:string
+ ) as document-node()? {
+ let $path := replace($api-path, "^((" || api:uri-of("/api") || ")|(/api))?/", "")
+ let $tokens := tokenize($path, "/")
+ let $token-offset := if ($tokens[1] = "data") then 1 else 0
+ let $data-type := $tokens[1 + $token-offset]
+ let $resource := $tokens[2 + $token-offset]
+ return
+ if ($tokens[1] = ("data", "user"))
+ then
+ data:doc($data-type, $resource)
+ else
+ error(
+ xs:QName("error:NOTIMPLEMENTED"),
+ "data:doc() not implemented for the path: " || $api-path
+ )
+};
+
+(:~ given the parts (eg, title and subtitle) of a document title, put together a standardized
+ : title that can be used as a resource name.
+ : This function will restrict the available title space to be stricter than valid xml:id's
+ : @param case-sensitive if true(), do not lowercase, the title, otherwise, do
+ : @return the string value of the normalized title. If the value is an "", the title is invalid.
+ :)
+declare function data:normalize-resource-title(
+ $title-string-parts as xs:string+,
+ $case-sensitive as xs:boolean
+) as xs:string {
+ let $part-composition-character := "-"
+ let $word-composition-character := "_"
+ return
+ (: join all non-empty title parts with part composition :)
+ string-join($title-string-parts[normalize-space(.)], $part-composition-character) =>
+ (: replaces spaces with word composition :)
+ replace("\s+", $word-composition-character) =>
+ (: normalize to a decomposed form :)
+ normalize-unicode("NFKD") =>
+ (: remove non-alphanumerics or compositions :)
+ replace("[^-_\p{L}\p{Nd}]+", "") =>
+ (: lower-case if case sensitive :)
+ (function ($s) {
+ if (not($case-sensitive)) then lower-case($s)
+ else $s
+ })() =>
+ (: can't be too long :)
+ substring(1, $data:max-resource-name-length) =>
+ (: disallow punctuators at the beginning and end :)
+ replace( "(^[-_]+)|([-_]+$)", "") =>
+ (: must begin with a letter - an exception to disallowing begin/end punctuators :)
+ (function($s) {
+ if (matches($s, "^\d"))
+ then $word-composition-character || $s
+ else $s
+ })() =>
+ (: remove duplicate punctuators :)
+ replace( "(([-])+|([_])+)", "$2$3") =>
+ (: empty it out if it's only - and _ :)
+ replace( "^[-_]+$", "")
+ (: can't be empty :)
+};
\ No newline at end of file
diff --git a/opensiddur-server/src/modules/debug.xqm b/opensiddur-server/src/modules/debug.xqm
new file mode 100644
index 00000000..aeb218ab
--- /dev/null
+++ b/opensiddur-server/src/modules/debug.xqm
@@ -0,0 +1,147 @@
+xquery version "3.1";
+(:~
+ : debug functions
+ :
+ : Open Siddur Project
+ : Copyright 2011,2016,2018-2019 Efraim Feinstein
+ : Licensed under the GNU Lesser General Public License, version 3 or later
+ :
+ :)
+module namespace debug="http://jewishliturgy.org/transform/debug";
+
+import module namespace paths="http://jewishliturgy.org/modules/paths"
+ at "paths.xqm";
+
+declare variable $debug:error := 1;
+declare variable $debug:warn := 2;
+declare variable $debug:info := 3;
+declare variable $debug:detail := 4;
+declare variable $debug:level := $debug:detail;
+
+declare variable $debug:settings-file := concat($paths:repo-base, "/debug.xml");
+declare variable $debug:settings := doc($debug:settings-file);
+
+(:~ debugging output function
+ : if the source is listed in /db/[repository]/debug.xml
+ :)
+declare function debug:debug(
+ $level as xs:integer,
+ $source as item()*,
+ $message as item()*
+ ) as empty-sequence() {
+ let $level-strings := ('error', 'warn', 'info', 'debug', 'trace')
+ let $level-string := $level-strings[min(($level, count($level-strings)))]
+ let $xmsg :=
+ element { $level-string } {
+ element source { $source},
+ element message {
+ for $m in $message
+ return
+ if ($m instance of attribute())
+ then concat("attribute(", $m/name(), ")=", $m/string())
+ else $m
+ }
+ }
+ let $source-level :=
+ (
+ $debug:settings//debug:settings/@override/number(),
+ if ($source castable as xs:string)
+ then
+ $debug:settings//debug:module[@name=string($source)]/@level/number()
+ else (),
+ $debug:settings//debug:settings/@level/number(),
+ $debug:level
+ )[1]
+ return
+ if ($level = $debug:error)
+ then error(xs:QName('debug:ERROR'), $xmsg)
+ else if ($level <= $source-level)
+ then util:log($level-string, $xmsg) (: TODO: this should replace with a custom logger :)
+ else ()
+};
+
+(:~ Debugging function to turn a long string into a short one :)
+declare function debug:abbr-string(
+ $string as xs:string?
+ ) as xs:string {
+ let $strlen := string-length($string)
+ let $quote := "`"
+ return
+ string-join(
+ ($quote,
+ if ($strlen < 25)
+ then $string
+ else ( substring($string, 1, 10), '...',
+ substring($string, $strlen - 10, 10)),
+ $quote),
+ '')
+};
+
+declare function debug:list-attributes(
+ $attrs as attribute()*
+ ) as xs:string {
+ string(
+ string-join(
+ for $a in $attrs
+ return ($a/name(), '=', string($a)),
+ ' '
+ )
+ )
+};
+
+(:~ write an error message for a given exception :)
+declare function debug:print-exception(
+ $module as xs:string?,
+ $line-number as xs:integer?,
+ $column-number as xs:integer?,
+ $code as xs:string?,
+ $value as xs:string?,
+ $description as xs:string?
+ ) as xs:string {
+ concat(
+ $module, ":", $line-number, ":",
+ $column-number, ","[$code], $code, ":"[$value], $value, ": "[$description],
+ $description,
+ ";"
+ )
+};
+
+(:~ find broken links in the data that point to nothing
+ : @param $source-collection where to start searching
+ :)
+(: removing -- this causes a circular dependency, if needed, move to the URI module
+declare function debug:find-dangling-links(
+ $source-collection as xs:string?
+ ) as element(dangling-links) {
+ element dangling-links {
+ for $ptr in collection(($source-collection, "/data")[1])//*[@target|@targets|@domains|@ref]/(@target|@targets|@domains|@ref)
+ let $doc := root($ptr)
+ for $target in tokenize($ptr, '\s+')
+ [not(starts-with(., 'http:'))]
+ [not(starts-with(., 'https:'))]
+ let $base :=
+ if (contains($target, '#'))
+ then (substring-before($target, '#')[.], document-uri($doc))[1]
+ else $target
+ let $fragment := substring-after($target, '#')[.]
+ let $dest-doc :=
+ try {
+ data:doc($base)
+ }
+ catch * {
+ doc($base)
+ }
+ let $dest-fragment := uri:follow-uri($target, $ptr/.., uri:follow-steps($ptr/..))
+ where empty($dest-doc) or ($fragment and empty($dest-fragment))
+ return
+ element dangling-link {
+ element source-doc { document-uri($doc) },
+ element source-element { $ptr/.. },
+ element target { $target },
+ element target-doc-broken { empty($dest-doc) },
+ element target-fragment-broken { empty($dest-fragment) }
+ }
+ }
+};
+
+:)
\ No newline at end of file
diff --git a/opensiddur-server/src/modules/deepequality.xqm b/opensiddur-server/src/modules/deepequality.xqm
new file mode 100644
index 00000000..79ced85b
--- /dev/null
+++ b/opensiddur-server/src/modules/deepequality.xqm
@@ -0,0 +1,155 @@
+xquery version "3.1";
+
+(:~ Functions to test for deep XML equality.
+ :
+ : Copyright 2019 Efraim Feinstein, Open Siddur Project
+ : Licensed under the GNU Lesser General Public License, version 3 or later
+ :)
+
+module namespace deepequality = "http://jewishliturgy.org/modules/deepequality";
+
+(:~ compare two nodes. If the result is not deep equal to expected according to [[deepequality:equal-wildcard]],
+ : return the result, otherwise, return empty
+ :)
+declare function deepequality:equal-or-result(
+ $result as node()*,
+ $expected as node()*
+) as node()* {
+ let $is-equal := deepequality:equal-wildcard($result, $expected)
+ where not($is-equal)
+ return $result
+};
+
+(:~ compare two nodes. If the result is deep equal to expected according to [[deepequality:equal-wildcard]],
+ : return the result, otherwise, return the result inside a deepequality:error element
+ : Test for it with test:assertXPath("not(error)")
+ :)
+declare function deepequality:equal-or-error(
+ $result as node()*,
+ $expected as node()*
+) as node()* {
+ let $is-equal := deepequality:equal-wildcard($result, $expected)
+ return
+ if ($is-equal)
+ then $result
+ else element error { $result }
+};
+
+
+(:~ determine if two nodes are equal, allowing for the string ... to be a wildcard
+ : and the namespace http://www.w3.org/1998/xml/namespace/alias to be equivalent to the
+ : xml namespace
+ : @param $node1 The original node
+ : @param $node2 The expectation node, which may include aliased namespaces and wildcards
+ :)
+declare function deepequality:equal-wildcard(
+ $node1 as node()*,
+ $node2 as node()*
+) as xs:boolean {
+ let $n1 := deepequality:clean-xml($node1)
+ let $n2 := deepequality:clean-xml($node2)
+ return
+ (
+ count($n1) = count($n2)
+ and
+ (every $result in
+ (
+ for $n at $pos in $n1
+ return
+ typeswitch ($n)
+ case document-node() return deepequality:docnode($n, $n2[$pos])
+ case comment() return deepequality:comment($n, $n2[$pos])
+ case text() return deepequality:text($n, $n2[$pos])
+ case attribute() return deepequality:attribute($n, $n2)
+ case element() return deepequality:element($n, $n2[$pos])
+ default return false()
+ )
+ satisfies $result
+ )
+ )
+};
+
+(: clean up empty text nodes from XML :)
+declare %private function deepequality:clean-xml(
+ $nodes as node()*
+) as node()* {
+ for $node in $nodes
+ return
+ typeswitch($node)
+ case text() return
+ if (normalize-space($node))
+ then $node
+ else ()
+ case document-node() return
+ document {
+ deepequality:clean-xml($node/node())
+ }
+ case element() return
+ element { QName(namespace-uri($node), name($node)) }{
+ $node/@*,
+ deepequality:clean-xml($node/node())
+ }
+ default return $node
+};
+
+
+declare function deepequality:docnode(
+ $node1 as document-node(),
+ $node2 as node()
+) as xs:boolean {
+ ($node2 instance of document-node()) and
+ deepequality:equal-wildcard($node1/node(), $node2/node())
+};
+
+declare function deepequality:comment(
+ $node1 as comment(),
+ $node2 as node()
+) as xs:boolean {
+ ($node2 instance of comment()) and (
+ string($node1) = string($node2)
+ or string($node2) = '...'
+ )
+};
+
+declare function deepequality:text(
+ $node1 as text(),
+ $node2 as node()
+) as xs:boolean {
+ ($node2 instance of text()) and (
+ string($node1) = string($node2)
+ or string($node2) = '...'
+ )
+};
+
+declare function deepequality:attribute(
+ $node1 as attribute(),
+ $node2 as attribute()*
+) as xs:boolean {
+ let $equivalent :=
+ $node2[
+ (
+ namespace-uri(.) = namespace-uri($node1)
+ or
+ namespace-uri(.) = 'http://www.w3.org/1998/xml/namespace/alias' and
+ namespace-uri($node1) = 'http://www.w3.org/1998/xml/namespace'
+ )
+ and local-name(.) = local-name($node1)
+ ]
+ return exists($equivalent) and (
+ string($equivalent) = (string($node1), '...')
+ )
+};
+
+declare function deepequality:element(
+ $node1 as element(),
+ $node2 as node()
+) as xs:boolean {
+ ($node2 instance of element()) and
+ namespace-uri($node1) = namespace-uri($node2) and
+ local-name($node1) = local-name($node2) and
+ deepequality:equal-wildcard($node1/@*, $node2/@*) and
+ (
+ (count($node2/node()) = 1 and string($node2) = '...') or
+ deepequality:equal-wildcard($node1/node(), $node2/node())
+ )
+};
diff --git a/opensiddur-server/src/modules/docindex.xqm b/opensiddur-server/src/modules/docindex.xqm
new file mode 100644
index 00000000..cd0c0ebe
--- /dev/null
+++ b/opensiddur-server/src/modules/docindex.xqm
@@ -0,0 +1,147 @@
+xquery version "3.1";
+
+(:~ document index module
+ :
+ : Manage an index of references in the /db/docindex collection
+ : This index is keyed by data-type, and document name and the
+ : full database path (starting with /db). It can be used to look up either way.
+ :
+ : Open Siddur Project
+ : Copyright 2020 Efraim Feinstein
+ : Licensed under the GNU Lesser General Public License, version 3 or later
+ :)
+module namespace didx = 'http://jewishliturgy.org/modules/docindex';
+
+import module namespace magic="http://jewishliturgy.org/magic"
+ at "../magic/magic.xqm";
+
+declare namespace error="http://jewishliturgy.org/errors";
+declare namespace tei="http://www.tei-c.org/ns/1.0";
+
+(: the default cache is under this directory :)
+declare variable $didx:didx-collection := "docindex";
+declare variable $didx:didx-path := concat("/db/", $didx:didx-collection);
+declare variable $didx:didx-resource := "docindex.xml";
+
+(:~ initial setup :)
+declare function didx:setup(
+ ) {
+ let $create-collection :=
+ if (xmldb:collection-available($didx:didx-path))
+ then ()
+ else xmldb:create-collection("/db", $didx:didx-collection)
+ let $uri := xs:anyURI($didx:didx-path)
+ let $owner-collection := sm:chown($uri, "admin")
+ let $group-collection := sm:chgrp($uri, "everyone")
+ let $mode-collection := sm:chmod($uri, "rwxr-xr-x")
+ let $index-resource :=
+ (: write the index configuration :)
+ xmldb:store($didx:didx-path, $didx:didx-resource,
+
+ )
+ let $index-uri := xs:anyURI(concat($didx:didx-path, "/", $didx:didx-resource))
+ let $index-owner := sm:chown($index-uri, "admin")
+ let $index-group := sm:chgrp($index-uri, "everyone")
+ let $index-mode := sm:chmod($index-uri, "rw-r--r--")
+ return ()
+};
+
+(:~ index or reindex a document given its location by collection
+ : and resource name
+ : If only a collection is given, reindex the collection after clearing it
+ :)
+declare function didx:reindex(
+ $collection as xs:string,
+ $resource as xs:string?
+ ) {
+ if (not($resource))
+ then
+ let $remove := didx:remove($collection)
+ return didx:reindex(collection($collection))
+ else didx:reindex(doc(concat($collection, "/", $resource)))
+};
+
+(:~ index or reindex a document from the given document node
+ : which may be specified as a node or an xs:anyURI or xs:string
+ :)
+declare function didx:reindex(
+ $doc-items as item()*
+ ) as empty-sequence() {
+ for $doc-item in $doc-items
+ let $doc := root($doc-item)
+ let $doc-uri := document-uri($doc)
+ let $collection := util:collection-name($doc)
+ let $resource := util:document-name($doc)
+ let $resource-extension-removed := replace($resource, "\.[^.]+$", "")
+ let $split := tokenize($collection, "/") (: "[1]/[2]db/[3]data/[4]{datatype}/...":)
+ let $data-type := $split[4]
+ let $index-entry :=
+
+ let $index-collection := collection($didx:didx-path)
+ let $existing-entry := $index-collection//didx:entry[@db-path=$doc-uri]
+ return
+ system:as-user("admin", $magic:password, (
+ let $update := if (exists($existing-entry))
+ then update replace $existing-entry with $index-entry
+ else update insert $index-entry into $index-collection[1]/*
+ let $reindex :=
+ xmldb:reindex($didx:didx-path, $didx:didx-resource)
+ return ()
+ ))
+};
+
+
+declare function didx:remove(
+ $collection as xs:string
+ ) as empty-sequence() {
+ system:as-user("admin", $magic:password,
+ let $collection-entries := collection($didx:didx-path)//didx:entry[$collection=@collection]
+ let $delete := update delete $collection-entries
+ let $reindex := xmldb:reindex($didx:didx-path, $didx:didx-resource)
+ return ()
+ )
+};
+
+declare function didx:remove(
+ $collection as xs:string,
+ $resource as xs:string?
+ ) as empty-sequence() {
+ if (exists($resource))
+ then
+ let $doc-uri := $collection || "/" || $resource
+ let $index-collection := collection($didx:didx-path)
+ let $existing-entry := $index-collection//didx:entry[$doc-uri=@db-path]
+ where exists($existing-entry)
+ return
+ system:as-user("admin", $magic:password, (
+ let $update := update delete $existing-entry
+ let $reindex := xmldb:reindex($didx:didx-path, $didx:didx-resource)
+ return ()
+ ))
+ else didx:remove($collection)
+};
+
+(:~ Query the document index for a path :)
+declare function didx:query-path(
+ $data-type as xs:string,
+ $resource as xs:string
+ ) as xs:string? {
+ let $query :=
+ collection($didx:didx-path)//didx:entry[$data-type=@data-type][$resource=@resource]
+ return $query/@db-path/string()
+};
+
+(:~ query the document index by a path :)
+declare function didx:query-by-path(
+ $db-path as xs:string
+ ) as element(didx:result)? {
+ let $query :=
+ collection($didx:didx-path)//didx:entry[$db-path=@db-path]
+ where exists($query)
+ return {$query/@*}
+};
diff --git a/opensiddur-server/src/modules/follow-uri.xqm b/opensiddur-server/src/modules/follow-uri.xqm
new file mode 100644
index 00000000..5a8ac755
--- /dev/null
+++ b/opensiddur-server/src/modules/follow-uri.xqm
@@ -0,0 +1,553 @@
+xquery version "3.1";
+(:~
+ : follow-uri function and mode
+ : The follow-uri function will follow paths in the /api/* form,
+ : /data/* form, and if neither can be found, will use
+ : direct database resource paths as a fallback. The fast-* form
+ : will not use caching and assumes that only #range() XPointers
+ : or #id pointers are used.
+ :
+ : Open Siddur Project
+ : Copyright 2009-2013 Efraim Feinstein
+ : Licensed under the GNU Lesser General Public License, version 3 or later
+ :
+ :)
+module namespace uri="http://jewishliturgy.org/transform/uri";
+
+import module namespace common="http://jewishliturgy.org/transform/common"
+ at "common.xqm";
+import module namespace debug="http://jewishliturgy.org/transform/debug"
+ at "debug.xqm";
+import module namespace mirror="http://jewishliturgy.org/modules/mirror"
+ at "mirror.xqm";
+import module namespace data="http://jewishliturgy.org/modules/data"
+ at "data.xqm";
+
+declare namespace tei="http://www.tei-c.org/ns/1.0";
+declare namespace jf="http://jewishliturgy.org/ns/jlptei/flat/1.0";
+declare namespace p="http://jewishliturgy.org/ns/parser";
+declare namespace r="http://jewishliturgy.org/ns/parser-result";
+declare namespace error="http://jewishliturgy.org/errors";
+
+(:~ return an element by id, relative to a node :)
+declare function uri:id(
+ $id as xs:string,
+ $root as node()
+ ) as element()? {
+ ($root/id($id), $root//*[@jf:id = $id])[1]
+};
+
+(:~ Given a relative URI and a context,
+ : resolve the relative URI into an absolute URI
+ : @param $uri contains the URI to make absolute
+ : @param $context The URI is absolute relative to this context.
+ :)
+declare function uri:absolutize-uri(
+ $uri as xs:string,
+ $context as node()?
+ ) as xs:anyURI {
+ let $base-path as xs:anyURI := uri:uri-base-path($uri)
+ return
+ xs:anyURI(
+ if ($base-path and (matches($uri, "^http[s]?://") or doc-available($base-path)))
+ then $uri
+ else (:resolve-uri($uri,base-uri($context) ):)
+ (: UHOH: there is some kind of bug in eXist 2.2 where if this is run on an in-memory document,
+ it will fail with an NPE.
+ This code checks for an in-memory document and if the document does not have a document-uri,
+ it will try to figure out the right base uri manually. If it can't, it will just assume that
+ it is as absolute as it can be :)
+ let $docuri := document-uri(root($context))
+ return
+ if ($docuri)
+ then resolve-uri($uri,base-uri($context) )
+ else
+ let $base := $context/ancestor-or-self::*[@xml:base][1]/@xml:base
+ return
+ if ($base)
+ then resolve-uri($uri, xs:anyURI($base))
+ else $uri
+ )
+};
+
+(:~ Returns the base path part of an absolute URI
+ : @param $uri An absolute URI
+ :)
+declare function uri:uri-base-path(
+ $uri as xs:string
+ ) as xs:anyURI {
+ xs:anyURI(
+ if (contains($uri,'#'))
+ then substring-before($uri,'#')
+ else $uri
+ )
+};
+
+(:~ Base resource of a URI (not including the fragment or query string)
+ : @param $uri A URI
+ :)
+declare function uri:uri-base-resource(
+ $uri as xs:string
+ ) as xs:anyURI {
+ let $base-path as xs:string := string(uri:uri-base-path($uri))
+ return
+ xs:anyURI(
+ if (contains($base-path, '?'))
+ then substring-before($base-path, '?')
+ else $base-path
+ )
+};
+
+(:~ Returns the fragment portion of an absolute URI.
+ : The return value excludes the #
+ : @param $uri An absolute URI
+ :)
+declare function uri:uri-fragment(
+ $uri as xs:string
+ ) as xs:anyURI {
+ xs:anyURI(
+ if (contains($uri, '#'))
+ then substring-after($uri, '#')
+ else ''
+ )
+};
+
+(:~ Follow a given pointer $uri,
+ : including any subsequent pointers or links (such as tei:join).
+ : The $steps parameter indicates the number of pointer steps to follow if
+ : another pointer is pointed to by $uri.
+ : If $steps is negative, the chain is followed infinitely (or
+ : until another pointer limits it).
+ :)
+declare function uri:follow-uri(
+ $uri as xs:string,
+ $context as node(),
+ $steps as xs:integer
+ ) as node()* {
+ uri:fast-follow($uri, $context, $steps)
+};
+
+declare function uri:follow-cached-uri(
+ $uri as xs:string,
+ $context as node(),
+ $steps as xs:integer,
+ $cache-type as xs:string?
+ ) as node()* {
+ uri:fast-follow($uri, $context, $steps, false(), false(), $cache-type)
+};
+
+(:~ Extended uri:follow-uri() to allow caching.
+ : @param $cache-type Which cache to use
+ :)
+declare function uri:follow-cached-uri(
+ $uri as xs:string,
+ $context as node(),
+ $steps as xs:integer,
+ $cache-type as xs:string?,
+ $intermediate-ptrs as xs:boolean?
+ ) as node()* {
+ uri:fast-follow($uri, $context, $steps, $intermediate-ptrs, false(), $cache-type)
+};
+
+declare function uri:fast-follow(
+ $uri as xs:string,
+ $context as node(),
+ $steps as xs:integer
+ ) as node()* {
+ uri:fast-follow($uri, $context, $steps, (), false())
+};
+
+declare function uri:fast-follow(
+ $uri as xs:string,
+ $context as node(),
+ $steps as xs:integer,
+ $intermediate-ptrs as xs:boolean?) {
+ uri:fast-follow($uri, $context, $steps, $intermediate-ptrs, false())
+};
+
+declare function uri:fast-follow(
+ $uri as xs:string,
+ $context as node(),
+ $steps as xs:integer,
+ $intermediate-ptrs as xs:boolean?,
+ $allow-copies as xs:boolean
+ ) as node()* {
+ uri:fast-follow($uri, $context, $steps, $intermediate-ptrs, $allow-copies, ())
+};
+
+(:~ faster routine to follow a pointer one step
+ : Only works with shorthand pointers and #range().
+ : If $cache is used, assumes that the cache is valid
+ :)
+declare function uri:fast-follow(
+ $uri as xs:string,
+ $context as node(),
+ $steps as xs:integer,
+ $intermediate-ptrs as xs:boolean?,
+ $allow-copies as xs:boolean,
+ $cache as xs:string?
+ ) as node()* {
+ let $full-uri as xs:anyURI :=
+ uri:absolutize-uri($uri, $context)
+ let $base-path as xs:anyURI :=
+ uri:uri-base-path($full-uri)
+ let $fragment as xs:anyURI :=
+ uri:uri-fragment(string($full-uri))
+ let $original-document as document-node()? :=
+ try {
+ data:doc($base-path)
+ }
+ catch error:NOTIMPLEMENTED {
+ (: the requested path is not in /data :)
+ doc($base-path)
+ }
+ (: short-circuit if the document does not exist :)
+ where exists($original-document)
+ return
+ let $original-document-uri := document-uri($original-document)
+ let $document as document-node()? :=
+ if ($cache
+ and not(starts-with($original-document-uri, "/db/cache")))
+ then
+ (: we have requested a cached link and we make sure that the link is not also coming from the cache :)
+ mirror:doc($cache, $original-document-uri)
+ else $original-document
+ let $pointer-destination as node()* :=
+ if ($fragment)
+ then
+ uri:follow(
+ if (starts-with($fragment, "range("))
+ then
+ let $left :=
+ let $left-ptr := substring-before(substring-after($fragment, "("), ",")
+ return uri:id($left-ptr, $document)[1]
+ let $right :=
+ let $right-ptr := substring-before(substring-after($fragment, ","), ")")
+ return uri:id($right-ptr, $document)[1]
+ return uri:range($left, $right, $allow-copies)
+ else
+ uri:id($fragment,$document)[1],
+ $steps, $cache, true(),
+ $intermediate-ptrs
+ )
+ else $document
+ return $pointer-destination
+};
+
+declare function uri:follow-tei-link(
+ $context as element()
+ ) as node()* {
+ uri:follow-tei-link($context, -1, (), ())
+};
+
+declare function uri:follow-tei-link(
+ $context as element(),
+ $steps as xs:integer
+ ) as node()* {
+ uri:follow-tei-link($context, $steps, (), ())
+};
+
+declare function uri:follow-tei-link(
+ $context as element(),
+ $steps as xs:integer,
+ $cache-type as xs:string?
+ ) as node()* {
+ uri:follow-tei-link($context, $steps, $cache-type, ())
+};
+
+declare function uri:follow-tei-link(
+ $context as element(),
+ $steps as xs:integer,
+ $cache-type as xs:string?,
+ $fast as xs:boolean?
+ ) as node()* {
+ uri:follow-tei-link($context, $steps, $cache-type, $fast, ())
+};
+
+(:~ Handle the common processing involved in following TEI links
+ : @param $context Link to follow
+ : @param $steps Specifies the maximum number of steps to evaluate. Negative for infinity (default)
+ : @param $cache-type Specifies the cache type to use (eg, fragmentation). Empty for none (default)
+ : @deprecated @param $fast use the fast follow algorithm (default true())
+ : @param $intermediate-ptrs return all intermediate pointers, not just the final result (default false())
+ :)
+declare function uri:follow-tei-link(
+ $context as element(),
+ $steps as xs:integer,
+ $cache-type as xs:string?,
+ $fast as xs:boolean?,
+ $intermediate-ptrs as xs:boolean?
+ ) as node()* {
+ let $targets as xs:string+ :=
+ tokenize(string($context/(@target|@targets)),'\s+')
+ return
+ for $t in $targets
+ return
+ if ($steps = 0)
+ then $context
+ else
+ if ($fast)
+ then
+ uri:fast-follow($t, $context,
+ uri:follow-steps($context, $steps),
+ $intermediate-ptrs, false(), $cache-type)
+ else
+ (:
+ uri:follow-cached-uri(
+ $t, $context,
+ uri:follow-steps($context, $steps),
+ $cache-type,
+ $intermediate-ptrs)
+ :)
+ error(xs:QName("error:DEPRECATED"), "slow follow is deprecated")
+};
+
+(:~ calculate the number of steps to pass to follow-cached-uri()
+ : given a pointer or link element
+ :)
+declare function uri:follow-steps(
+ $context as element()
+ ) as xs:integer {
+ uri:follow-steps($context, -1)
+};
+
+(:~ calculate the number of steps to pass to follow-cached-uri()
+ : given a pointer or link element and a number already followed
+ :)
+declare function uri:follow-steps(
+ $context as element(),
+ $steps as xs:integer
+ ) as xs:integer {
+ let $evaluate as xs:string? :=
+ ($context/(@evaluate,../(tei:linkGrp|../tei:joinGrp)/@evaluate)[1])/string()
+ return
+ if ($evaluate='none')
+ then 0
+ else if ($evaluate='one')
+ then 1
+ else $steps - 1
+};
+
+(:----------- follow a pointer mode -------------:)
+
+declare function uri:follow(
+ $node as node()*,
+ $steps as xs:integer,
+ $cache-type as xs:string?
+ ) as node()* {
+ uri:follow($node, $steps, $cache-type, (), ())
+};
+
+declare function uri:follow(
+ $node as node()*,
+ $steps as xs:integer,
+ $cache-type as xs:string?,
+ $fast as xs:boolean?
+ ) as node()* {
+ uri:follow($node, $steps, $cache-type, $fast, ())
+};
+
+(:~
+ : @param $fast use uri:fast-follow()
+ : @param $intermediate-ptrs return all intermediates in addition
+ : to the end result of following the pointer
+ :)
+declare function uri:follow(
+ $node as node()*,
+ $steps as xs:integer,
+ $cache-type as xs:string?,
+ $fast as xs:boolean?,
+ $intermediate-ptrs as xs:boolean?
+ ) as node()* {
+ for $n in $node
+ return
+ typeswitch($n)
+ case element(tei:join) return uri:tei-join($n, $steps, $cache-type, $fast, $intermediate-ptrs)
+ case element(tei:ptr) return uri:tei-ptr($n, $steps, $cache-type, $fast, $intermediate-ptrs)
+ default return $n
+};
+
+(:~ follow tei:ptr, except tei:ptr[@type=url] :)
+declare function uri:tei-ptr(
+ $context as element(),
+ $steps as xs:integer,
+ $cache-type as xs:string?,
+ $fast as xs:boolean?,
+ $intermediate-ptrs as xs:boolean?
+ ) as node()* {
+ if ($context/@type = 'url')
+ then $context
+ else (
+ $context[$intermediate-ptrs],
+ if ($context/parent::tei:joinGrp)
+ then uri:tei-join($context, $steps, $cache-type, $fast, $intermediate-ptrs)
+ else uri:follow-tei-link($context, $steps, $cache-type, $fast, $intermediate-ptrs)
+ )
+};
+
+(:~ tei:join or tei:ptr acting as a join being followed.
+ : If @result is present, produce an element with the namespace URI
+ : the same as that of the context node
+ :)
+declare function uri:tei-join(
+ $context as element(),
+ $steps as xs:integer,
+ $cache-type as xs:string?,
+ $fast as xs:boolean?,
+ $intermediate-ptrs as xs:boolean?
+ ) as node()* {
+ $context[$intermediate-ptrs],
+ let $joined-elements as element()* :=
+ for $pj in uri:follow-tei-link($context, $steps, $cache-type, $fast, $intermediate-ptrs)
+ return
+ if ($pj/@scope='branches')
+ then $pj/node()
+ else $pj
+ let $result as xs:string? :=
+ string($context/(@result, parent::tei:joinGrp/@result)[1])
+ return
+ if ($result)
+ then
+ element { QName($context/namespace-uri(), $result)} {
+ $joined-elements
+ }
+ else
+ $joined-elements
+};
+
+(:~ find the dependency graph of a given document
+ : @param $doc The document
+ : @param $visited Dependencies already checked
+ : @return A dependency list of database URIs, including the $doc itself
+ :)
+declare function uri:dependency(
+ $doc as document-node(),
+ $visited as xs:string*
+ ) as xs:string+ {
+ let $new-dependencies :=
+ distinct-values(
+ for $targets in $doc//*[@targets|@target|@domains|@ref]/(@target|@targets|@domains|@ref)
+ for $target in
+ tokenize($targets, '\s+')
+ [not(starts-with(., '#'))]
+ [not(starts-with(., 'http:'))]
+ [not(starts-with(., 'https:'))]
+ return
+ uri:uri-base-path(
+ uri:absolutize-uri($target, $targets/..)
+ )
+ )
+ let $this-uri := document-uri($doc)
+ return distinct-values((
+ $this-uri,
+ for $dependency in $new-dependencies
+ let $next-doc := data:doc($dependency)
+ where not(document-uri($next-doc)=$visited)
+ return
+ if (exists($next-doc))
+ then
+ uri:dependency(
+ $next-doc,
+ ($visited, $this-uri)
+ )
+ else error(xs:QName("error:DEPENDENCY"), "An unresolvable dependency was found in " || tokenize(document-uri($doc), "/")[last()] ||": The pointer: " || $dependency || " points to a document that does not exist.")
+ ))
+
+
+};
+
+(:~ range transform, returning nodes in $context that are
+ : between $left and $right, inclusive.
+ : If $allow-copies is true(), the nodes that are returned
+ : may be copies. If they are, their original document URI,
+ : base-uri and language
+ : will be included as uri:document-uri, uri:base and uri:lang
+ : attributes.
+ :)
+declare function uri:range-transform(
+ $context as node()*,
+ $left as node(),
+ $right as node(),
+ $allow-copies as xs:boolean
+ ) as node()* {
+ for $node in $context
+ return
+ if ($node is $right)
+ then
+ (: special case for $right itself... its descendants
+ : should be returned, but won't be because they are
+ : after $right
+ :)
+ if ($allow-copies)
+ then
+ element {QName(namespace-uri($node), name($node))}{
+ attribute uri:document-uri { document-uri(root($node)) },
+ if ($node/@xml:lang)
+ then ()
+ else attribute uri:lang { common:language($node) },
+ if ($node/@xml:base)
+ then ()
+ else attribute uri:base { base-uri($node) },
+ $node/(@*|node())
+ }
+ else
+ $node
+ else if (
+ ($node << $left or $node >> $right)
+ )
+ then
+ uri:range-transform($node/node(), $left, $right, $allow-copies)
+ else
+ typeswitch($node)
+ case element()
+ return
+ if ($allow-copies)
+ then
+ element {QName(namespace-uri($node), name($node))}{
+ attribute uri:document-uri { document-uri(root($node)) },
+ if ($node/@xml:lang)
+ then ()
+ else attribute uri:lang { common:language($node) },
+ if ($node/@xml:base)
+ then ()
+ else attribute uri:base { base-uri($node) },
+ $node/@*,
+ uri:range-transform($node/node(), $left, $right, $allow-copies)
+ }
+ else
+ (
+ if ($node/descendant::*[. is $right] and $right/following-sibling::node())
+ then ()
+ else $node,
+ uri:range-transform($node/node(), $left, $right, $allow-copies)
+ )
+ default return $node
+};
+
+(:~
+ : @param $left node pointed to by the left pointer
+ : @param $right node pointed to by the right pointer
+ : @param $allow-copies If true(), allow returning a copy of the nodes,
+ : which will result in the nodes being returned in document order and arity,
+ : but without identity to the place of origin.
+ : If false(), return a reference to the nodes, which may be duplicated.
+ : @return The range between $left and $right
+ :)
+declare function uri:range(
+ $left as node(),
+ $right as node(),
+ $allow-copies as xs:boolean
+ ) as node()* {
+ let $start := (
+ $left/ancestor::* intersect
+ $right/ancestor::*)[last()]
+ return
+ if ($left/parent::* is $right/parent::*)
+ then
+ (: if $left and $right are siblings, no transform is needed :)
+ $left |
+ ($left/following-sibling::* intersect $right/preceding-sibling::*) |
+ $right
+ else
+ uri:range-transform($start, $left, $right, $allow-copies)
+};
diff --git a/opensiddur-server/src/modules/format.xqm b/opensiddur-server/src/modules/format.xqm
new file mode 100644
index 00000000..71e38032
--- /dev/null
+++ b/opensiddur-server/src/modules/format.xqm
@@ -0,0 +1,596 @@
+xquery version "3.1";
+(:~
+ : XQuery functions to output a given XML file in a format.
+ :
+ : Copyright 2011-2014,2019 Efraim Feinstein
+ : Open Siddur Project
+ : Licensed under the GNU Lesser General Public License, version 3 or later
+ :)
+module namespace format="http://jewishliturgy.org/modules/format";
+
+declare namespace exist="http://exist.sourceforge.net/NS/exist";
+declare namespace error="http://jewishliturgy.org/errors";
+declare namespace err="http://www.w3.org/2005/xqt-errors";
+declare namespace tr="http://jewishliturgy.org/ns/tr/1.0";
+
+import module namespace data="http://jewishliturgy.org/modules/data"
+ at "data.xqm";
+import module namespace mirror="http://jewishliturgy.org/modules/mirror"
+ at "mirror.xqm";
+import module namespace status="http://jewishliturgy.org/modules/status"
+ at "status.xqm";
+import module namespace uri="http://jewishliturgy.org/transform/uri"
+ at "follow-uri.xqm";
+import module namespace pla="http://jewishliturgy.org/transform/parallel-layer"
+ at "../transforms/parallel-layer.xqm";
+import module namespace phony="http://jewishliturgy.org/transform/phony-layer"
+ at "../transforms/phony-layer.xqm";
+import module namespace flatten="http://jewishliturgy.org/transform/flatten"
+ at "../transforms/flatten.xqm";
+import module namespace unflatten="http://jewishliturgy.org/transform/unflatten"
+ at "../transforms/unflatten.xqm";
+import module namespace combine="http://jewishliturgy.org/transform/combine"
+ at "../transforms/combine.xqm";
+import module namespace compile="http://jewishliturgy.org/transform/compile"
+ at "../transforms/compile.xqm";
+import module namespace segment="http://jewishliturgy.org/transform/segment"
+at "../transforms/segment.xqm";
+import module namespace tohtml="http://jewishliturgy.org/transform/html"
+ at "../transforms/tohtml.xqm";
+import module namespace translit="http://jewishliturgy.org/transform/transliterator"
+ at "../transforms/translit/translit.xqm";
+import module namespace reverse="http://jewishliturgy.org/transform/reverse"
+ at "../transforms/reverse.xqm";
+
+declare namespace tei="http://www.tei-c.org/ns/1.0";
+declare namespace j="http://jewishliturgy.org/ns/jlptei/1.0";
+declare namespace jf="http://jewishliturgy.org/ns/jlptei/flat/1.0";
+declare namespace http="http://expath.org/ns/http-client";
+
+declare variable $format:temp-dir := '.format';
+
+declare variable $format:parallel-layer-cache := "/db/cache/parallel-layer";
+declare variable $format:phony-layer-cache := "/db/cache/phony-layer";
+declare variable $format:dependency-cache := "/db/cache/dependency";
+declare variable $format:segment-cache := "/db/cache/segment";
+declare variable $format:flatten-cache := "/db/cache/flatten";
+declare variable $format:merge-cache := "/db/cache/merge";
+declare variable $format:resolve-cache := "/db/cache/resolved";
+declare variable $format:unflatten-cache := "/db/cache/unflattened";
+declare variable $format:combine-cache := "/db/cache/combined";
+declare variable $format:compile-cache := "/db/cache/compiled";
+declare variable $format:html-cache := "/db/cache/html";
+declare variable $format:transcluded-html-cache := "/db/cache/html-transclude";
+declare variable $format:caches := (
+ $format:parallel-layer-cache,
+ $format:phony-layer-cache,
+ $format:dependency-cache,
+ $format:segment-cache,
+ $format:flatten-cache,
+ $format:merge-cache,
+ $format:resolve-cache,
+ $format:unflatten-cache,
+ $format:combine-cache,
+ $format:compile-cache,
+ $format:html-cache,
+ $format:transcluded-html-cache
+ );
+
+(:~ setup to allow format functions to work :)
+declare function format:setup(
+ ) as empty-sequence() {
+ for $collection in $format:caches
+ where not(xmldb:collection-available($collection))
+ return
+ mirror:create($collection, "/db/data", true(),
+ if ($collection = ($format:html-cache, $format:transcluded-html-cache))
+ then map { "xml" : "html" }
+ else map {}
+ ),
+ status:setup()
+};
+
+(:~ clear all format caches of a single file
+ : @param $path database path of the original resource
+ :)
+declare function format:clear-caches(
+ $path as xs:string
+ ) as empty-sequence() {
+ for $cache in $format:caches
+ where doc-available($path)
+ return
+ let $doc := doc($path)
+ return
+ mirror:remove($cache, util:collection-name($doc), util:document-name($doc))
+};
+
+(:~ add a format:status-job-id parameter pointing to the job where status should be updated
+ : should be updated and format:stage-number to $params if they do not already exist :)
+declare function format:status-param(
+ $params as map(*),
+ $original-doc as document-node()
+ ) as map(*) {
+ map:merge((
+ $params,
+ map {
+ "format:status-job-id" : ($params("format:status-job-id"), status:get-job-id($original-doc))[1],
+ "format:stage-number" : ($params("format:stage-number") + 1, 0)[1]
+ }
+ ))
+};
+
+declare function format:apply-if-outdated(
+ $stage as xs:string,
+ $params as map(*),
+ $mirror-path as xs:string,
+ $transformee as item(),
+ $transform as function(node()*) as node()*,
+ $original-doc as document-node()
+ ) as document-node()? {
+ format:apply-if-outdated($stage, $params, $mirror-path, $transformee, $transform, $original-doc, ())
+};
+
+declare function format:apply-if-outdated(
+ $stage as xs:string,
+ $params as map(*),
+ $mirror-path as xs:string,
+ $transformee as item(),
+ $transform as function(node()*) as node()*,
+ $original-doc as document-node(),
+ $up-to-date-function as (function(xs:string, item()) as xs:boolean)?
+ ) as document-node()? {
+ let $status-resource := ($params("format:status-job-id"), status:get-job-id($original-doc))[1]
+ let $is-first :=
+ (: if the status document does not exist, it should be created :)
+ let $sd := status:doc($status-resource)
+ return empty($sd) or exists($sd/*/@status:completed)
+ let $job-start :=
+ if ($is-first)
+ then status:start-job($original-doc)
+ else ()
+ return
+ try {
+ let $stage-start := status:start($status-resource, $original-doc, $stage)
+ let $transformed :=
+ mirror:apply-if-outdated($mirror-path, $transformee, $transform, $original-doc, $up-to-date-function)
+ let $stage-finish := status:finish($status-resource, $original-doc, $stage)
+ let $job-end :=
+ if ($params("format:stage-number") = 0)
+ then status:complete-job($status-resource, document-uri($original-doc))
+ else ()
+ return $transformed
+ }
+ catch * {
+ let $error-message :=
+ concat(
+ $err:module, ":", $err:line-number, ":", $err:column-number,
+ ":"[$err:value], $err:value,
+ ": "[$err:description], $err:description
+ )
+ return (
+ status:fail-job($status-resource, $original-doc, $stage, $error-message),
+ error($err:code, $error-message) (: rethrow the exception :)
+ )
+ }
+};
+
+(:~ @return true() if the document requires special processing for parallel documents :)
+declare function format:is-parallel-document(
+ $doc as document-node()
+ ) as xs:boolean {
+ exists($doc//j:parallelText)
+};
+
+(:~ make a cached version of a parallel text document,
+ : and return it
+ : @param $doc The document to run parallel text transform on
+ : @param $params Parameters to send to the transform
+ : @param $original-doc The original document
+ : @return The mirrored parallel text document
+ :)
+declare function format:parallel-layer(
+ $doc as document-node(),
+ $params as map(*),
+ $original-doc as document-node()
+ ) as document-node() {
+ let $params := format:status-param($params, $original-doc)
+ let $pla-transform := pla:parallel-layer-document(?, $params)
+ return
+ format:apply-if-outdated(
+ "parallel-layer",
+ $params,
+ $format:parallel-layer-cache,
+ $doc,
+ $pla-transform,
+ $original-doc
+ )
+};
+
+
+(:~ make a cached version of a phony layer text document,
+ : and return it
+ : @param $doc The document to run phony layer transform on
+ : @param $params Parameters to send to the transform
+ : @param $original-doc The original document
+ : @return The mirrored phony layer document
+ :)
+declare function format:phony-layer(
+ $doc as document-node(),
+ $params as map(*),
+ $original-doc as document-node()
+ ) as document-node() {
+ let $params := format:status-param($params, $original-doc)
+ let $pho-transform := phony:phony-layer-document(?, $params)
+ return
+ format:apply-if-outdated(
+ "phony-layer",
+ $params,
+ $format:phony-layer-cache,
+ $doc,
+ $pho-transform,
+ $original-doc
+ )
+};
+
+
+(:~ make a cached version of a segmented document,
+ : and return it
+ : @param $doc The document to segment
+ : @param $params Parameters to send to the segment
+ : @param $original-doc The original document that was segmented
+ : @return The mirrored segmented document
+ :)
+declare function format:segment(
+ $doc as document-node(),
+ $params as map(*),
+ $original-doc as document-node()
+) as document-node() {
+ let $params := format:status-param($params, $original-doc)
+ let $segment-transform := segment:segment(?)
+ return
+ format:apply-if-outdated(
+ "segment",
+ $params,
+ $format:segment-cache,
+ format:phony-layer($doc, $params, $original-doc),
+ $segment-transform,
+ $original-doc
+ )
+};
+
+(:~ make a cached version of a flattened document,
+ : and return it
+ : @param $doc The document to flatten
+ : @param $params Parameters to send to the transform
+ : @param $original-doc The original document that was flattened
+ : @return The mirrored flattened document
+ :)
+declare function format:flatten(
+ $doc as document-node(),
+ $params as map(*),
+ $original-doc as document-node()
+ ) as document-node() {
+ let $params := format:status-param($params, $original-doc)
+ return
+ format:apply-if-outdated(
+ "flatten",
+ $params,
+ $format:flatten-cache,
+ if (format:is-parallel-document($original-doc))
+ then
+ format:parallel-layer($doc, $params, $original-doc)
+ else
+ format:segment($doc, $params, $original-doc),
+ flatten:flatten-document(?, $params),
+ $original-doc
+ )
+};
+
+(:~ perform the transform up to the merge step
+ : @param $doc Original document
+ : @param $params Parameters to pass to the transforms
+ : @param $original-doc The original document that was merged
+ : @return The merged document (as an in-database copy)
+ :)
+declare function format:merge(
+ $doc as document-node(),
+ $params as map(*),
+ $original-doc as document-node()
+ ) as document-node() {
+ let $params := format:status-param($params, $original-doc)
+ let $merge-transform := flatten:merge-document(?, $params)
+ return
+ format:apply-if-outdated(
+ "merge",
+ $params,
+ $format:merge-cache,
+ format:flatten($doc, $params, $original-doc),
+ $merge-transform,
+ $original-doc
+ )
+};
+
+(:~ perform the transform up to the resolve-stream step
+ : @param $doc Original document
+ : @param $params Parameters to pass to the transforms
+ : @param $original-doc The original document that was resolved
+ : @return The merged document (as an in-database copy)
+ :)
+declare function format:resolve(
+ $doc as document-node(),
+ $params as map(*),
+ $original-doc as document-node()
+ ) as document-node() {
+ let $params := format:status-param($params, $original-doc)
+ let $resolve-transform := flatten:resolve-stream(?, $params)
+ return
+ format:apply-if-outdated(
+ "resolve",
+ $params,
+ $format:resolve-cache,
+ format:merge($doc, $params, $original-doc),
+ $resolve-transform,
+ $original-doc
+ )
+};
+
+(:~ provide a display version of the flattened/merged hierachies
+ :)
+declare function format:display-flat(
+ $doc as document-node(),
+ $params as map(*),
+ $original-doc as document-node()
+ ) as document-node() {
+ flatten:display(
+ format:resolve($doc, $params, $original-doc),
+ $params
+ )
+};
+
+(:~ perform the transform up to the unflatten step
+ : @param $doc Original document
+ : @param $params Parameters to pass to the transforms
+ : @param $original-doc The original document that was unflattened, if not $doc
+ : @return The unflattened document (as an in-database copy)
+ :)
+declare function format:unflatten(
+ $doc as document-node(),
+ $params as map(*),
+ $original-doc as document-node()
+ ) as document-node() {
+ let $params := format:status-param($params, $original-doc)
+ let $unflatten-transform := unflatten:unflatten-document(?, $params)
+ return
+ format:apply-if-outdated(
+ "unflatten",
+ $params,
+ $format:unflatten-cache,
+ format:resolve($doc, $params, $original-doc),
+ $unflatten-transform,
+ $original-doc
+ )
+};
+
+declare function format:dependency-is-transformable(
+ $dep-uri as xs:string
+ ) as xs:boolean {
+ (: TODO: add other transformables here... :)
+ matches($dep-uri, "^/db/data/(linkage|notes|original|tests)")
+};
+
+declare function format:get-dependencies(
+ $doc as document-node()
+ ) as document-node() {
+ document {
+ {
+ for $dep in uri:dependency($doc, ())
+ let $transformable := format:dependency-is-transformable($dep)
+ return
+ {
+ if ($transformable)
+ then attribute transformable { $transformable }
+ else (),
+ $dep
+ }
+ }
+ }
+};
+
+(:~ set up an XML file containing all dependencies
+ : of a given document
+ :)
+declare function format:dependencies(
+ $doc as document-node(),
+ $params as map(*)
+ ) as document-node() {
+ let $params := format:status-param($params, $doc)
+ return
+ format:apply-if-outdated(
+ "dependencies",
+ $params,
+ $format:dependency-cache,
+ $doc,
+ format:get-dependencies#1,
+ $doc
+ )
+};
+
+(:~ unflatten all transformable dependencies of a given document :)
+declare function format:unflatten-dependencies(
+ $doc as document-node(),
+ $params as map(*)
+ ) as document-node()* {
+ for $dep in format:dependencies($doc, $params)//format:dependency[@transformable]
+ return format:unflatten(doc($dep), $params, doc($dep))
+};
+
+(:~ flatten all transformable dependencies of a given document, excluding itself :)
+declare function format:flatten-external-dependencies(
+ $doc as document-node(),
+ $params as map(*)
+ ) as document-node()+ {
+ for $dep in format:dependencies($doc, $params)//format:dependency[@transformable]
+ let $dep-doc := doc($dep)
+ where not($dep-doc is $doc)
+ return format:flatten($dep-doc, $params, $dep-doc)
+};
+
+(:~ combine may have dependencies on translations as well as directly referenced documents
+ : fortunately, if a combine cached document exists, it already references all of its dependencies
+ :)
+declare function format:combine-dependencies-up-to-date(
+ $mirror-path as xs:string,
+ $original as item()
+ ) as xs:boolean {
+ let $combine-mirrored :=
+ mirror:doc($mirror-path,
+ typeswitch($original)
+ case document-node() return document-uri($original)
+ default return $original
+ )
+ let $dependencies :=
+ distinct-values((
+ $combine-mirrored//@jf:document/string(),
+ $combine-mirrored//@jf:linkage-document/string()
+ ))
+ return
+ every $dependency in $dependencies
+ satisfies
+ let $path := data:api-path-to-db($dependency)
+ let $up-to-date-relative :=
+ (: check if the dependency has changed since
+ : the combined document was cached :)
+ let $collection := util:collection-name($path)
+ let $resource := util:document-name($path)
+ let $mirror-collection := util:collection-name($combine-mirrored)
+ let $mirror-resource := util:document-name($combine-mirrored)
+ let $last-modified :=
+ try {
+ xmldb:last-modified($collection, $resource)
+ }
+ catch * { () }
+ let $mirror-last-modified :=
+ try {
+ xmldb:last-modified($mirror-collection, $mirror-resource)
+ }
+ catch * { () }
+ return
+ not(
+ empty($last-modified) or
+ empty($mirror-last-modified) or
+ ($last-modified > $mirror-last-modified)
+ )
+ return
+ $up-to-date-relative and (
+ (not(format:dependency-is-transformable($path)))
+ or mirror:is-up-to-date($format:unflatten-cache, $path)
+ )
+};
+
+(:~ perform the transform up to the combine step
+ : @param $doc The document to be transformed
+ : @param $params Parameters to pass to the transforms
+ : @param $original-doc The original document that is being transformed (may be the same as $doc)
+ : @return The combined document (as an in-database copy)
+ :)
+declare function format:combine(
+ $doc as document-node(),
+ $params as map(*),
+ $original-doc as document-node()
+ ) as document-node() {
+ let $params := format:status-param($params, $original-doc)
+ let $unflats := format:unflatten-dependencies($doc, $params)
+ let $cmb := combine:combine-document(?, $params)
+ return
+ format:apply-if-outdated(
+ "combine",
+ $params,
+ $format:combine-cache,
+ mirror:doc($format:unflatten-cache, document-uri($doc)),
+ $cmb,
+ $original-doc,
+ format:combine-dependencies-up-to-date#2
+ )
+};
+
+(:~ perform the transform up to the compile step
+ : @param $doc The document to be transformed
+ : @param $params Parameters to pass to the transforms
+ : @param $original-doc The original document that is being transformed (may be the same as $doc)
+ : @return The compiled document (as an in-database copy)
+ :)
+declare function format:compile(
+ $doc as document-node(),
+ $params as map(*),
+ $original-doc as document-node()
+ ) as document-node() {
+ let $params := format:status-param($params, $original-doc)
+ let $cmp := compile:compile-document(?, $params)
+ let $combined := format:combine($doc, $params, $original-doc)
+ let $up-to-date-function := mirror:is-up-to-date-cache(?, ?, $format:combine-cache)
+ return
+ (: compile has to check if the compile cache is outdated against the updated combine cache,
+ : not the original document
+ :)
+ format:apply-if-outdated(
+ "compile",
+ $params,
+ $format:compile-cache,
+ $combined,
+ $cmp,
+ $original-doc,
+ $up-to-date-function
+ )
+};
+
+(:~ perform the transform up to the HTML formatting step
+ : @param $doc The document to be transformed
+ : @param $params Parameters to pass to the transforms
+ : @param $original-doc The original document that is being transformed (may be the same as $doc)
+ : @param $transclude Use transclusion?
+ : @return The combined document (as an in-database copy)
+ :)
+declare function format:html(
+ $doc as document-node(),
+ $params as map(*),
+ $original-doc as document-node(),
+ $transclude as xs:boolean
+ ) as document-node() {
+ let $params := format:status-param($params, $original-doc)
+ let $html := tohtml:tohtml-document(?, $params)
+ let $up-to-date-function :=
+ if ($transclude)
+ then mirror:is-up-to-date-cache(?, ?, $format:compile-cache)
+ else ()
+ return
+ format:apply-if-outdated(
+ "html",
+ $params,
+ if ($transclude)
+ then $format:transcluded-html-cache
+ else $format:html-cache,
+ if ($transclude)
+ then format:compile($doc, $params, $original-doc)
+ else format:unflatten($doc, $params, $original-doc),
+ $html,
+ $original-doc,
+ $up-to-date-function
+ )
+};
+
+declare function format:reverse(
+ $doc as document-node(),
+ $params as map(*)
+ ) as document-node() {
+ reverse:reverse-document($doc, $params)
+};
+
+
+declare function format:transliterate(
+ $doc as document-node(),
+ $params as map(*)
+ ) as document-node() {
+ (: TODO: set up a transliteration cache :)
+ translit:transliterate-document($doc, $params)
+};
+
diff --git a/opensiddur-server/src/modules/jvalidate.xqm b/opensiddur-server/src/modules/jvalidate.xqm
new file mode 100644
index 00000000..f7e05722
--- /dev/null
+++ b/opensiddur-server/src/modules/jvalidate.xqm
@@ -0,0 +1,118 @@
+xquery version "3.1";
+(:
+: Module Name: Validation API
+: Date: August 19, 2009
+: Copyright: 2009,2012 Efraim Feinstein .
+: Licensed under the GNU Lesser General Public License, version 3 or later
+: Module Overview: Provides the vendor-specific interfaces to validation.
+: Return values come as report elements. status can be:
+: "ok",
+: "invalid",
+: "valid",
+: "not available"
+:)
+(:~
+ :
+ : @author Efraim Feinstein
+ :)
+module namespace jvalidate="http://jewishliturgy.org/modules/jvalidate";
+
+declare namespace tei="http://www.tei-c.org/ns/1.0";
+declare namespace j="http://jewishliturgy.org/ns/jlptei/1.0";
+declare namespace sch="http://purl.oclc.org/dsdl/schematron";
+declare namespace svrl="http://purl.oclc.org/dsdl/svrl";
+declare namespace error="http://jewishliturgy.org/errors";
+
+declare variable $jvalidate:not-available := (
+
+ not available
+
+);
+
+declare function jvalidate:validate-relaxng(
+ $content as item(), $grammar as item())
+ as element(report) {
+ validation:jing-report($content, $grammar)
+};
+
+(:~ Validate $content using the ISO Schematron schema $grammar
+ : Assumes all failed assertions and activated reports are invalid.
+ : @param $content The content to validate
+ : @param $grammar XSLT-transformed schematron grammar (an XSLT stylesheet)
+ : @return The result of the validation as:
+ :
+ : valid|invalid
+ : +
+ :
+ :)
+declare function jvalidate:validate-iso-schematron-svrl(
+ $content as item(), $grammar as item())
+ as element(report) {
+ let $grammar-doc :=
+ typeswitch($grammar)
+ case xs:anyAtomicType
+ return doc($grammar)
+ default
+ return $grammar
+ let $result-transform :=
+ transform:transform($content, $grammar-doc,
+
+
+ )
+ return (
+
+ {
+ if ($result-transform/svrl:failed-assert[not(@role="nonfatal")] |
+ $result-transform/svrl:successful-report[not(@role="nonfatal")])
+ then 'invalid'
+ else 'valid'
+ }
+ {
+ for $failure in $result-transform/svrl:failed-assert | $result-transform/svrl:successful-report
+ return
+ {
+ $failure/@location,
+ $failure/svrl:text/node()
+ }
+ }
+
+ )
+};
+
+(:~ Validate content against an XML Schema :)
+declare function jvalidate:validate-xsd(
+ $content as item(), $grammar as item())
+ as element(report) {
+ validation:jing-report($content, $grammar)
+};
+
+(:~ Convert the result of a validation performed by one of the other
+ : jvalidate functions to a boolean
+ :)
+declare function jvalidate:validation-boolean(
+ $validation-result as element(report))
+ as xs:boolean {
+ $validation-result/status = ('valid', 'ok')
+};
+
+(:~ Concatenate a number of validation reports into a single-
+ : result report
+ :)
+declare function jvalidate:concatenate-reports(
+ $reports as element(report)*)
+ as element(report) {
+
+ {
+ let $texts := $reports/status/text()
+ return
+ if ($texts='invalid')
+ then 'invalid'
+ else if ($texts='not available')
+ then 'not available'
+ else if ($texts=('ok', 'valid'))
+ then 'valid'
+ else 'not available'
+ }
+ {$reports/(* except status)}
+
+};
diff --git a/opensiddur-server/src/modules/merge.xqm b/opensiddur-server/src/modules/merge.xqm
new file mode 100644
index 00000000..f5016da1
--- /dev/null
+++ b/opensiddur-server/src/modules/merge.xqm
@@ -0,0 +1,46 @@
+(: implementation of a merge algorithm for two JLPTEI files
+ :
+ : Copyright 2021 Efraim Feinstein
+ : Open Siddur Project
+ : Licensed under the GNU Lesser General Public License, version 3 or later
+ :)
+xquery version '3.1';
+
+module namespace merge="http://jewishliturgy.org/modules/merge";
+
+declare namespace tei="http://www.tei-c.org/ns/1.0";
+declare namespace j="http://jewishliturgy.org/ns/jlptei/1.0";
+
+(:~ merge two XML documents, assuming that we need to preserve $old-doc :)
+declare function merge(
+ $old-doc as document-node(),
+ $new-doc as document-node()
+) as document-node() {
+
+};
+
+declare function merge:stream-sequence(
+ $nodes as node()*
+) {
+ for $node in $nodes
+ return
+ typeswitch($node)
+ case text() return
+ for $word in tokenize($node, '\s+')
+ return text { $word }
+ default return $node
+};
+
+declare function merge:j-streamText(
+ $old-streamText as element(j:streamText)?,
+ $new-streamText as element(j:streamText)?
+) as element(j:streamText)? {
+ if (empty($old-streamText|$new-streamText))
+ then ()
+ else (
+ element j:streamText {
+ ($old-streamText/@xml:id, $new-streamText/@xml:id)[1]
+ let $old-stream-sequence := stream-sequence($old-streamText/node())
+ }
+ )
+};
\ No newline at end of file
diff --git a/opensiddur-server/src/modules/mirror.xqm b/opensiddur-server/src/modules/mirror.xqm
new file mode 100644
index 00000000..aad4bcd1
--- /dev/null
+++ b/opensiddur-server/src/modules/mirror.xqm
@@ -0,0 +1,587 @@
+xquery version "3.1";
+(:~ mirror collections
+ :
+ : A mirror collection is a collection intended to cache some
+ : aspect of another collection, maintaining the same directory
+ : structure and permissions
+ :
+ : @author Efraim Feinstein
+ : Open Siddur Project
+ : Copyright 2011-2014 Efraim Feinstein
+ : Licensed under the GNU Lesser General Public License, version 3 or later
+ :)
+module namespace mirror = 'http://jewishliturgy.org/modules/mirror';
+
+import module namespace app="http://jewishliturgy.org/modules/app"
+ at "app.xqm";
+import module namespace debug="http://jewishliturgy.org/transform/debug"
+ at "debug.xqm";
+import module namespace magic="http://jewishliturgy.org/magic"
+ at "../magic/magic.xqm";
+
+declare namespace error="http://jewishliturgy.org/errors";
+
+declare variable $mirror:configuration := "mirror-conf.xml";
+
+(:~ create a mirror collection
+ : @param $mirror-path Full path to the new mirror collection
+ : @param $original-path Full path to the collection that is to be mirrored
+ : @param $allow-universal-access Allow universal r/w/x access
+ : to cache *collections*; useful for intermediate processing
+ : collections where guests should be allowed to make modifications
+ : @param $extension-map Map extensions to other extensions in this mirror. If an extension is not listed, it stays the same
+ : @return empty-sequence()
+ : @error error:INPUT one of the the original or mirror paths is not absolute
+ :)
+declare function mirror:create(
+ $mirror-path as xs:string,
+ $original-path as xs:string,
+ $allow-universal-access as xs:boolean,
+ $extension-map as map(*)
+ ) as empty-sequence() {
+ let $check :=
+ if (starts-with($mirror-path, "/db"))
+ then
+ if (starts-with($original-path, "/db"))
+ then true()
+ else error(xs:QName("error:INPUT"), "original-path must be absolute")
+ else error(xs:QName("error:INPUT"), "mirror-path must be absolute")
+ let $create :=
+ app:make-collection-path(
+ $mirror-path, "/",
+ sm:get-permissions($original-path)
+ )
+ let $universal :=
+ for $allow in $allow-universal-access
+ where $allow
+ return
+ system:as-user("admin", $magic:password,
+ sm:chmod(xs:anyURI($mirror-path), "rwxrwxrwx")
+ )
+ let $uri := xs:anyURI(
+ xmldb:store($mirror-path, $mirror:configuration,
+
+ {
+ $original-path
+ }
+ {$allow-universal-access}
+ {
+ for $extension in map:keys($extension-map)
+ return
+
+ }
+ )
+ )
+ return
+ if ($uri)
+ then
+ system:as-user("admin", $magic:password, (
+ sm:chown($uri, "admin"),
+ sm:chgrp($uri, "dba"),
+ sm:chmod($uri, "rw-rw-r--")
+ ))
+ else error(xs:QName("error:STORAGE"), "Cannot store mirror collection configuration.", $mirror-path)
+};
+
+declare function mirror:create(
+ $mirror-path as xs:string,
+ $original-path as xs:string,
+ $allow-universal-access as xs:boolean
+ ) as empty-sequence() {
+ mirror:create($mirror-path, $original-path, $allow-universal-access, map {})
+};
+
+
+declare function mirror:create(
+ $mirror-path as xs:string,
+ $original-path as xs:string
+ ) as empty-sequence() {
+ mirror:create($mirror-path, $original-path, false(), map {})
+};
+
+(:~ @return Whether the mirror supports universal access
+ : @error error:NOT_A_MIRROR if the collection is not a mirror collection
+ :)
+declare function mirror:supports-universal-access(
+ $mirror-path as xs:string
+ ) as xs:boolean {
+ xs:boolean(local:config($mirror-path)/*/mirror:universal-access)
+};
+
+(:~ @return A resource name mapped to its in-mirror representation
+ :)
+declare function mirror:map-resource-name(
+ $mirror-path as xs:string,
+ $name as xs:string
+ ) as xs:string {
+ let $extensions :=
+ local:config($mirror-path)/*/mirror:map
+ return (
+ for $ext in $extensions
+ let $regexp := "\." || $ext/@from || "$"
+ where matches($name, $regexp)
+ return replace($name, $regexp, "." || $ext/@to ),
+ $name
+ )[1]
+};
+
+(:~ @return A resource name mapped to its original representation
+ :)
+declare function mirror:unmap-resource-name(
+ $mirror-path as xs:string,
+ $mirror-name as xs:string
+ ) as xs:string {
+ let $extensions :=
+ local:config($mirror-path)/*/mirror:map
+ return (
+ for $ext in $extensions
+ let $regexp := "\." || $ext/@to || "$"
+ where matches($mirror-name, $regexp)
+ return replace($mirror-name, $regexp, "." || $ext/@from ),
+ $mirror-name
+ )[1]
+};
+
+(:~ @return the configuration file for a mirror collection
+ : @error error:NOT_A_MIRROR if the collection is not a mirror collection
+ :)
+declare function local:config(
+ $mirror-path as xs:string
+ ) as document-node() {
+ let $config := doc($mirror-path || "/" || $mirror:configuration)
+ return
+ if ($config)
+ then $config
+ else error(xs:QName("error:NOT_A_MIRROR"), "The collection is not a mirror collection.", $mirror-path)
+};
+
+(:~ @return the original base path :)
+declare function local:base-path(
+ $mirror-path as xs:string
+ ) as xs:string {
+ local:config($mirror-path)/mirror:configuration/mirror:of/string()
+};
+
+(:~
+ : @param $mirror-path The absolute path to the mirror
+ : @param $path The relative (not beginning with /db) or absolute (beginning with /db) path of the desired collection
+ : @return the mirror path
+ : @error error:NOT_A_MIRROR The collection $mirror-path is not a mirror collection
+ : @error error:NOT_MIRRORED The collection $path is not a subcollection of the original path and is not mirrored in this mirror collection
+ :)
+declare function mirror:mirror-path(
+ $mirror-path as xs:string,
+ $path as xs:string
+ ) as xs:string {
+ let $check :=
+ if (starts-with($mirror-path, "/db"))
+ then true()
+ else error(xs:QName("error:INPUT"), "mirror-path is not absolute")
+ let $base-path := local:base-path($mirror-path)
+ return
+ mirror:map-resource-name($mirror-path ,
+ if (starts-with($path, $base-path))
+ then replace($path, "^" || $base-path, $mirror-path)
+ else if (starts-with($path, "/"))
+ then
+ error(
+ xs:QName("error:NOT_MIRRORED"),
+ "The absolute path " || $path || "is not mirrored in " || $mirror-path
+ )
+ else
+ (: relative path :)
+ app:concat-path($mirror-path, $path)
+ )
+};
+
+(:~ turn a path from relative to a mirror to one relative the original path
+ : @param $mirror-path The absolute path to the mirror
+ : @param $mirrored-path The absolute path to the mirrored location
+ : @error error:INPUT One of the parameters is not an absolute path
+ : @error error:NOT_A_MIRROR The collection $mirror-path is not a mirror collection
+ : @error error:NOT_MIRRORED The collection $path is not a subcollection of the original path and is not mirrored in this mirror collection
+ :)
+declare function mirror:unmirror-path(
+ $mirror-path as xs:string,
+ $mirrored-path as xs:string
+ ) as xs:string {
+ let $check :=
+ if (starts-with($mirror-path, "/db"))
+ then
+ if (starts-with($mirrored-path, "/db"))
+ then true()
+ else error(xs:QName("error:INPUT"), "The mirrored path is not absolute")
+ else error(xs:QName("error:INPUT"), "The mirror-path is not absolute")
+ let $base-path := local:base-path($mirror-path)
+ return
+ if (starts-with($mirrored-path, $mirror-path))
+ then
+ mirror:unmap-resource-name(
+ $mirror-path,
+ replace($mirrored-path, "^" || $mirror-path, $base-path)
+ )
+ else
+ error(
+ xs:QName("error:NOT_MIRRORED"),
+ "The absolute path " || $mirrored-path || "is not mirrored in " || $mirror-path
+ )
+};
+
+(:~ make a mirror collection path that mirrors the same path in
+ : the normal /db hierarchy
+ : @param $mirror-path the base location of the mirror
+ : @param $path the path that should be mirrored (relative to /db)
+ : @error error:NOT_A_MIRROR The collection $mirror-path is not a mirror collection
+ : @error error:NOT_MIRRORED The collection $path is not a subcollection of the original path and is not mirrored in this mirror collection
+ : @error error:CREATE A collection could not be created
+ :)
+(: TODO: this function is wrong! :)
+declare function mirror:make-collection-path(
+ $mirror-path as xs:string,
+ $path as xs:string
+ ) as empty-sequence() {
+ let $mirror-path-no-db := replace($mirror-path, "^/db", "")
+ let $path-no-db := replace($path, "^/db", "")
+ let $mirrored-path := mirror:mirror-path($mirror-path, $path)
+ let $base-path := local:base-path($mirror-path)
+ (: extended-* is the path part after the mirror or original base. :)
+ let $extended-path := substring-after($path, $base-path)
+ let $extended-mirror := substring-after($mirrored-path, $mirror-path-no-db)
+ let $steps :=
+ tokenize($extended-mirror, '/')[.]
+ for $step in 1 to count($steps)
+ let $this-step :=
+ app:concat-path(($base-path, subsequence($steps, 1, $step)))
+ let $mirror-this-step :=
+ mirror:mirror-path($mirror-path,$this-step)
+ let $mirror-previous-step :=
+ app:concat-path(($mirror-path, subsequence($steps, 1, $step - 1)))
+ where not(xmldb:collection-available($mirror-this-step))
+ return
+ let $new-collection := $steps[$step]
+ let $null :=
+ debug:debug(
+ $debug:info,
+ "mirror",
+ (("step ", $step, ":", $this-step, " new-collection=",$new-collection, " from ", $mirror-previous-step))
+ )
+ return (
+ debug:debug(
+ $debug:info,
+ "mirror",
+ ('creating new mirror collection: ',
+ $mirror-this-step, ' from ',
+ $mirror-previous-step, ' to ',
+ $new-collection)
+ ),
+ if (xmldb:create-collection($mirror-previous-step, $new-collection))
+ then
+ mirror:mirror-permissions($mirror-path, $this-step, $mirror-this-step)
+ else error(xs:QName('error:CREATE'), concat('Cannot create mirror collection ', $this-step))
+ )
+};
+
+declare function mirror:mirror-permissions(
+ $mirror-path as xs:string,
+ $source as xs:anyAtomicType,
+ $dest as xs:anyAtomicType
+ ) as empty-sequence() {
+ if (mirror:supports-universal-access($mirror-path))
+ then
+ let $src-uri := $source cast as xs:anyURI
+ let $dest-uri := $dest cast as xs:anyURI
+ let $src-permissions := sm:get-permissions($src-uri)
+ return
+ system:as-user("admin", $magic:password, (
+ sm:chown($dest-uri, $src-permissions/*/@owner/string()),
+ sm:chgrp($dest-uri, $src-permissions/*/@group/string()),
+ sm:chmod($dest-uri, "rwxrwxrwx")
+ ))
+ else
+ app:mirror-permissions($source, $dest)
+};
+
+(: determine if a path or original document is up to date
+ : @param $mirror the name of the mirror collection
+ : @param $original original document as document-node() or path
+ : @param $up-to-date-function A function that determines additional
+ : up to date information and returns an xs:boolean ; The up-to-date function
+ : will not be called when the mirror is already known to be out of date
+ :)
+declare function mirror:is-up-to-date(
+ $mirror-path as xs:string,
+ $original as item(),
+ $up-to-date-function as (function(xs:string, item()) as xs:boolean)?
+ ) as xs:boolean {
+ let $original-doc :=
+ typeswitch($original)
+ case document-node() return $original
+ default return doc($original)
+ let $collection := util:collection-name($original-doc)
+ let $original-resource-name := util:document-name($original-doc)
+ let $mirror-resource-name :=
+ mirror:map-resource-name(
+ $mirror-path,
+ $original-resource-name
+ )
+ let $mirror-collection := mirror:mirror-path($mirror-path, $collection)
+ let $last-modified :=
+ try {
+ xmldb:last-modified($collection, $original-resource-name)
+ }
+ catch * { () }
+ let $mirror-last-modified :=
+ (: if the collection does not exist, xmldb:last-modified() fails :)
+ try {
+ xmldb:last-modified($mirror-collection, $mirror-resource-name)
+ }
+ catch * { () }
+ return
+ not(
+ empty($last-modified) or
+ empty($mirror-last-modified) or
+ ($last-modified > $mirror-last-modified)
+ ) and
+ (
+ empty($up-to-date-function)
+ or $up-to-date-function($mirror-path, $original)
+ )
+};
+
+declare function mirror:is-up-to-date(
+ $mirror-path as xs:string,
+ $original as item()
+ ) as xs:boolean {
+ mirror:is-up-to-date($mirror-path, $original, ())
+};
+
+(:~ determine if a cache is up to date with respect to another cache
+ : @param $mirror-path the cache to be determined
+ : @param $original pointer to the original document or original document
+ : @param $prev-mirror-path the cache to compare to
+ : @return a boolean
+ :)
+declare function mirror:is-up-to-date-cache(
+ $mirror-path as xs:string,
+ $original as item(),
+ $prev-mirror-path as xs:string
+ ) as xs:boolean {
+ let $doc :=
+ typeswitch($original)
+ case document-node() return $original
+ default return doc($original)
+ let $collection := util:collection-name($doc)
+ let $mirror-collection := mirror:mirror-path($mirror-path, $collection)
+ let $prev-collection := mirror:mirror-path($prev-mirror-path, $collection)
+ let $resource := util:document-name($doc)
+ let $mirror-resource-name := mirror:map-resource-name($mirror-path, $resource)
+ let $prev-resource-name := mirror:map-resource-name($prev-mirror-path, $resource)
+ let $mirror-last-modified :=
+ try {
+ xmldb:last-modified($mirror-collection, $mirror-resource-name)
+ }
+ catch * { () }
+ let $prev-last-modified :=
+ try {
+ xmldb:last-modified($prev-collection, $prev-resource-name)
+ }
+ catch * { () }
+ return not(
+ empty($mirror-last-modified) or
+ empty($prev-last-modified) or
+ ($mirror-last-modified < $prev-last-modified)
+ )
+};
+
+declare function mirror:apply-if-outdated(
+ $mirror-path as xs:string,
+ $transformee as item(),
+ $transform as function(node()*) as node()*
+ ) as document-node()? {
+ mirror:apply-if-outdated($mirror-path, $transformee, $transform, $transformee, ())
+};
+
+declare function mirror:apply-if-outdated(
+ $mirror-path as xs:string,
+ $transformee as item(),
+ $transform as function(node()*) as node()*,
+ $original as item()
+ ) as document-node()? {
+ mirror:apply-if-outdated($mirror-path, $transformee, $transform, $original, ())
+};
+
+(:~ apply a function or transform to the original, if the mirror is out of date,
+ : otherwise return the mirror
+ : @param $mirror-path Base of the mirror
+ : @param $transformee Path or resource node to be transformed
+ : @param $transform The transform to run, use a partial function to pass parameters
+ : @param $original If $transformee is the result of intermediate processing, this should point to the actual original document
+ : @param $up-to-date-function Additional function to pass to mirror:is-up-to-date
+ :)
+declare function mirror:apply-if-outdated(
+ $mirror-path as xs:string,
+ $transformee as item(),
+ $transform as function(node()*) as node()*,
+ $original as item(),
+ $up-to-date-function as (function(xs:string, item()) as xs:boolean)?
+ ) as document-node()? {
+ if (mirror:is-up-to-date($mirror-path, $original, $up-to-date-function))
+ then
+ mirror:doc(
+ $mirror-path,
+ typeswitch($original)
+ case $o as document-node() return document-uri($o)
+ default $o return $o
+ )
+ else
+ let $transformee-doc :=
+ typeswitch($transformee)
+ case document-node() return $transformee
+ default return doc($transformee)
+ let $original-doc :=
+ typeswitch($original)
+ case document-node() return $original
+ default return doc($original)
+ let $collection := util:collection-name($original-doc)
+ let $resource := util:document-name($original-doc)
+ let $path :=
+ mirror:store($mirror-path, $collection, $resource,
+ $transform($transformee-doc)
+ )
+ return doc($path)
+};
+
+(:~ store data in a mirror collection
+ : @param $mirror-path Base of the mirror
+ : @param $collection Original path to the collection
+ : @param $resource Resource name
+ : @param $data The data to store
+ :)
+declare function mirror:store(
+ $mirror-path as xs:string,
+ $collection as xs:string,
+ $resource as xs:string,
+ $data as item()+
+ ) as xs:string? {
+ let $mirror-collection := mirror:mirror-path($mirror-path, $collection)
+ let $make :=
+ system:as-user("admin", $magic:password,
+ mirror:make-collection-path($mirror-path, $collection)
+ )
+ let $resource-name := mirror:map-resource-name($mirror-path, $resource)
+ let $mirror-resource := concat($mirror-collection, "/", $resource-name)
+ return
+ if (xmldb:store($mirror-collection, $resource-name, $data))
+ then (
+ mirror:mirror-permissions(
+ $mirror-path,
+ concat($collection, "/", $resource),
+ $mirror-resource
+ ),
+ $mirror-resource
+ )
+ else ()
+};
+
+(:~ remove a resource from the given mirror
+ : If there are no more mirror resources in the collection,
+ : remove the collection
+ : @param $mirror The mirror
+ : @param $collection The collection where the resource is
+ : @param $resource The resource
+ :)
+declare function mirror:remove(
+ $mirror as xs:string,
+ $collection as xs:string,
+ $resource as xs:string?
+ ) as empty-sequence() {
+ let $mirror-collection := mirror:mirror-path($mirror,$collection)
+ return
+ if (not($resource))
+ then
+ (: remove a collection :)
+ let $exists := xmldb:collection-available($mirror-collection)
+ where $exists
+ return mirror:clear-collections($mirror-collection, true())
+ else
+ (: remove a resource :)
+ let $resource-name := mirror:map-resource-name($mirror, $resource)
+ let $mirror-path := concat($mirror-collection, "/", $resource-name)
+ let $exists :=
+ util:binary-doc-available($mirror-path) or
+ doc-available($mirror-path)
+ where $exists
+ return (
+ xmldb:remove($mirror-collection, $resource-name),
+ mirror:clear-collections($mirror-collection, false())
+ )
+};
+
+(:~ clear cache collections :)
+declare %private function mirror:clear-collections(
+ $collection as xs:string,
+ $allow-nonempty as xs:boolean
+ ) as empty-sequence() {
+ if (
+ $allow-nonempty or
+ empty(
+ system:as-user("admin", $magic:password,
+ collection($collection)
+ )
+ )
+ )
+ then
+ let $tokens := tokenize($collection, "/")
+ return (
+ system:as-user("admin", $magic:password, xmldb:remove($collection)),
+ mirror:clear-collections(
+ string-join(subsequence($tokens, 1, count($tokens) - 1), "/"),
+ false()
+ )
+ )
+ else ()
+};
+
+
+declare function mirror:remove(
+ $mirror as xs:string,
+ $collection as xs:string
+ ) as empty-sequence() {
+ mirror:remove($mirror, $collection, ())
+};
+
+declare function mirror:collection-available(
+ $mirror as xs:string,
+ $collection as xs:string
+ ) as xs:boolean {
+ xmldb:collection-available(mirror:mirror-path($mirror, $collection))
+};
+
+declare function mirror:doc-available(
+ $mirror as xs:string,
+ $path as xs:string
+ ) as xs:boolean {
+ doc-available(mirror:mirror-path($mirror, $path))
+};
+
+(:~ get a document from a mirror :)
+declare function mirror:doc(
+ $mirror as xs:string,
+ $path as xs:string
+ ) as document-node()? {
+ doc(mirror:mirror-path($mirror, $path))
+};
+
+declare function mirror:binary-doc-available(
+ $mirror as xs:string,
+ $path as xs:string
+ ) as xs:boolean {
+ util:binary-doc-available(mirror:mirror-path($mirror, $path))
+};
+
+declare function mirror:binary-doc(
+ $mirror as xs:string,
+ $path as xs:string
+ ) as xs:base64Binary? {
+ util:binary-doc(mirror:mirror-path($mirror, $path))
+};
diff --git a/code/modules/name.xqm b/opensiddur-server/src/modules/name.xqm
similarity index 98%
rename from code/modules/name.xqm
rename to opensiddur-server/src/modules/name.xqm
index 022cfd3c..286ac761 100644
--- a/code/modules/name.xqm
+++ b/opensiddur-server/src/modules/name.xqm
@@ -1,4 +1,4 @@
-xquery version "1.0";
+xquery version "3.1";
(: convert text to a separated tei:name structure
:
: Copyright 2010-2011 Efraim Feinstein
diff --git a/code/modules/name.xsl2 b/opensiddur-server/src/modules/name.xsl2
similarity index 100%
rename from code/modules/name.xsl2
rename to opensiddur-server/src/modules/name.xsl2
diff --git a/opensiddur-server/src/modules/paths.xqm b/opensiddur-server/src/modules/paths.xqm
new file mode 100644
index 00000000..1a314d6b
--- /dev/null
+++ b/opensiddur-server/src/modules/paths.xqm
@@ -0,0 +1,22 @@
+(: Path mnemonics
+ : Open Siddur Project
+ : Copyright 2010-2011,2013 Efraim Feinstein
+ : Released under the GNU Lesser General Public License, ver 3 or later
+ :)
+xquery version "3.1";
+
+module namespace paths="http://jewishliturgy.org/modules/paths";
+
+declare namespace expath="http://expath.org/ns/pkg";
+
+declare variable $paths:repo-base :=
+ let $descriptor :=
+ collection(repo:get-root())//expath:package[@name = "http://jewishliturgy.org/apps/opensiddur-server"]
+ return
+ util:collection-name($descriptor);
+
+(:~ absolute db location of schema files :)
+declare variable $paths:schema-base :=
+ concat($paths:repo-base, "/schema");
+
+
diff --git a/opensiddur-server/src/modules/refindex.xqm b/opensiddur-server/src/modules/refindex.xqm
new file mode 100644
index 00000000..fc78bdd2
--- /dev/null
+++ b/opensiddur-server/src/modules/refindex.xqm
@@ -0,0 +1,423 @@
+xquery version "3.1";
+
+(:~ reference index module
+ :
+ : Manage an index of references in the /db/refindex collection
+ : In this index, the keys are the referenced URI or a node
+ : and the type of reference. The index stores node id's of
+ : the linking elements that make the references
+ :
+ : Open Siddur Project
+ : Copyright 2011-2014,2019 Efraim Feinstein
+ : Licensed under the GNU Lesser General Public License, version 3 or later
+ :)
+module namespace ridx = 'http://jewishliturgy.org/modules/refindex';
+
+import module namespace app="http://jewishliturgy.org/modules/app"
+ at "app.xqm";
+import module namespace debug="http://jewishliturgy.org/transform/debug"
+ at "debug.xqm";
+import module namespace mirror="http://jewishliturgy.org/modules/mirror"
+ at "mirror.xqm";
+import module namespace uri="http://jewishliturgy.org/transform/uri"
+ at "follow-uri.xqm";
+import module namespace magic="http://jewishliturgy.org/magic"
+ at "../magic/magic.xqm";
+
+declare namespace error="http://jewishliturgy.org/errors";
+declare namespace tei="http://www.tei-c.org/ns/1.0";
+
+(: the default cache is under this directory :)
+declare variable $ridx:ridx-collection := "refindex";
+declare variable $ridx:ridx-path := concat("/db/", $ridx:ridx-collection);
+declare variable $ridx:indexed-base-path := "/db/data";
+
+(: if this file exists, reference indexing should be skipped.
+ :)
+declare variable $ridx:disable-flag := "disabled.xml";
+
+(:~ initial setup :)
+declare function ridx:setup(
+ ) {
+ if (xmldb:collection-available($ridx:ridx-path))
+ then (
+ (: (re)write the mirror configuration :)
+ xmldb:store($ridx:ridx-path, $mirror:configuration,
+
+ /db/data
+ false
+
+ ),
+ let $uri := xs:anyURI(concat($ridx:ridx-path, "/", $mirror:configuration))
+ return (
+ sm:chown($uri, "admin"),
+ sm:chgrp($uri, "dba"),
+ sm:chmod($uri, "rw-rw-r--")
+ )
+ )
+ else mirror:create($ridx:ridx-path, "/db/data")
+};
+
+(:~ given a collection, return its index :)
+declare function ridx:index-collection(
+ $collection as xs:string
+ ) as xs:string {
+ mirror:mirror-path($ridx:ridx-path, $collection)
+};
+
+(:~ index or reindex a document given its location by collection
+ : and resource name.
+ : If the resource is empty, clear and reindex the collection.
+ : Note that this is the only way to clear documents by collection name.
+ :)
+declare function ridx:reindex(
+ $collection as xs:string,
+ $resource as xs:string?
+ ) {
+ if (not($resource))
+ then
+ let $remove := mirror:remove($ridx:ridx-path, $collection, ())
+ return ridx:reindex(collection($collection))
+ else ridx:reindex(doc(concat($collection, "/", $resource)))
+};
+
+declare function ridx:is-enabled(
+ ) as xs:boolean {
+ not(doc-available(concat($ridx:ridx-path, "/", $ridx:disable-flag)))
+};
+
+declare function local:make-index-collection(
+ $collection as xs:string
+ ) as empty-sequence() {
+ system:as-user("admin", $magic:password, (
+ if (not(xmldb:collection-available($ridx:ridx-path)))
+ then
+ mirror:create($ridx:ridx-path, $ridx:indexed-base-path)
+ else (),
+ mirror:make-collection-path($ridx:ridx-path, $collection)
+ )
+ )
+};
+
+(:~ @return false() if the indexed document has any ridx:broken elements, otherwise true(). :)
+declare function ridx:up-to-date-function(
+ $mirror-path as xs:string,
+ $original as item()
+ ) as xs:boolean {
+ let $ridx-doc := mirror:doc($mirror-path,
+ typeswitch ($original)
+ case document-node() return document-uri($original)
+ default return $original
+ )
+ return exists($ridx-doc) and empty($ridx-doc//ridx:broken)
+};
+
+(:~ index or reindex a document from the given document node
+ : which may be specified as a node or an xs:anyURI or xs:string
+ :)
+declare function ridx:reindex(
+ $doc-items as item()*
+ ) as empty-sequence() {
+ let $enabled := ridx:is-enabled()
+ where $enabled
+ return
+ for $doc-item in $doc-items
+ let $doc :=
+ typeswitch($doc-item)
+ case document-node()
+ return
+ $doc-item
+ [not(util:is-binary-doc(document-uri(.)))]
+ case node() return $doc-item
+ default
+ return
+ if (util:is-binary-doc($doc-item))
+ then ()
+ else doc($doc-item)
+ (: do not index binary documents :)
+ where exists($doc)
+ return
+ let $doc-uri := document-uri(root($doc))
+ let $collection := util:collection-name(root($doc))
+ let $resource := util:document-name($doc)
+ let $make-mirror-collection :=
+ local:make-index-collection($collection)
+ let $debug := debug:debug($debug:detail, "refindex", "reindexing " || $doc-uri || "...")
+ where not(mirror:is-up-to-date($ridx:ridx-path, $doc-uri, ridx:up-to-date-function#2))
+ return
+ if (mirror:store($ridx:ridx-path, $collection, $resource,
+ element ridx:index {
+ attribute document { $doc-uri },
+ ridx:make-index-entries($doc//@target|$doc//@targets|$doc//@ref|$doc//@domains|$doc//@who)
+ }
+ ))
+ then
+ let $mirror-collection := mirror:mirror-path($ridx:ridx-path, $collection)
+ let $reindex :=
+ system:as-user("admin", $magic:password, (
+ xmldb:reindex($mirror-collection, $resource)
+ ))
+ return ()
+ else debug:debug($debug:warn, "refindex",
+ concat("Could not store index for ", $collection, "/", $resource))
+};
+
+declare function ridx:remove(
+ $collection as xs:string,
+ $resource as xs:string?
+ ) as empty-sequence() {
+ mirror:remove($ridx:ridx-path, $collection, $resource)
+};
+
+declare %private function ridx:make-index-entries(
+ $reference-attributes as attribute()*
+ ) as element()* {
+ for $rattr in $reference-attributes
+ let $element := $rattr/parent::element()
+ let $source-node-id := util:node-id($element)
+ for $follow at $position in tokenize($rattr/string(), "\s+")
+ let $returned :=
+ if (matches($follow, "^http[s]?://"))
+ then ()
+ else
+ let $debug := debug:debug($debug:detail, "refindex", "following " || $follow || "...")
+ let $r := uri:fast-follow($follow, $element, uri:follow-steps($element), true())
+ return
+ if (exists($r))
+ then $r
+ else
+ element ridx:broken {
+ attribute source-node { $source-node-id },
+ attribute position { $position },
+ attribute target { $follow }
+ }
+ for $followed in $returned
+ return
+ if ($followed instance of element(ridx:broken))
+ then $followed
+ else
+ let $target-document := document-uri(root($followed))
+ let $target-node-id := util:node-id($followed)
+ return
+ element ridx:entry {
+ attribute source-node { $source-node-id },
+ attribute target-doc { $target-document },
+ attribute target-node { $target-node-id },
+ attribute position { $position }
+ }
+};
+
+declare function ridx:query(
+ $source-nodes as node()*,
+ $query-node as node()
+ ) {
+ ridx:query($source-nodes, $query-node, (), true())
+};
+
+declare function ridx:query(
+ $source-nodes as node()*,
+ $query-node as node(),
+ $position as xs:integer*
+ ) {
+ ridx:query($source-nodes, $query-node, $position, true())
+};
+
+
+(:~ find instances where $source-nodes reference $query-node
+ : in position $position
+ : @param $source-nodes The nodes doing the targetting
+ : @param $query-node The node that is being referenced
+ : @param $position Limit results to the position in the link. Otherwise, do not limit.
+ : @param $include-ancestors If set, then include in the search the node's ancestors (default true())
+ :)
+declare function ridx:query(
+ $source-nodes as node()*,
+ $query-nodes as node()*,
+ $position as xs:integer*,
+ $include-ancestors as xs:boolean?
+ ) as node()* {
+ let $nodes :=
+ for $query in
+ (
+ if ($include-ancestors)
+ then $query-nodes/ancestor-or-self::node()
+ else $query-nodes
+ )
+ let $query-document := document-uri(root($query))
+ let $query-id := util:node-id($query)
+ for $source-node in $source-nodes
+ let $source-document := document-uri(root($source-node))
+ let $source-node-id :=
+ if ($source-node instance of document-node())
+ then ()
+ else util:node-id($source-node)
+ for $entry in (
+ if (empty($source-node-id) and empty($position))
+ then collection($ridx:ridx-path)/ridx:index[@document=$source-document]/ridx:entry
+ [@target-node=$query-id]
+ [@target-doc=$query-document]
+ else if (empty($source-node-id))
+ then collection($ridx:ridx-path)/ridx:index[@document=$source-document]/ridx:entry
+ [@target-node=$query-id]
+ [@target-doc=$query-document]
+ [@position=$position]
+ else if (empty($position))
+ then collection($ridx:ridx-path)/ridx:index[@document=$source-document]/ridx:entry
+ [@target-node=$query-id]
+ [@source-node=$source-node-id]
+ [@target-doc=$query-document]
+ else collection($ridx:ridx-path)/ridx:index[@document=$source-document]/ridx:entry
+ [@target-node=$query-id]
+ [@source-node=$source-node-id]
+ [@target-doc=$query-document]
+ [@position=$position]
+ )
+ group by
+ $document-uri := string(root($entry)/*/@document),
+ $entry-source-node := string($entry/@source-node)
+ return (
+ util:node-by-id(doc($document-uri), $entry-source-node)
+ )
+ return
+ $nodes | ()
+};
+
+declare function ridx:query-all(
+ $query-nodes as node()*
+ ) {
+ ridx:query-all($query-nodes, (), true())
+};
+
+declare function ridx:query-all(
+ $query-nodes as node()*,
+ $position as xs:integer*
+ ) {
+ ridx:query-all($query-nodes, $position, true())
+};
+
+(:~ find all instances in the index where there are references to
+ : $query-node in position $position
+ : @param $query-node The node that is being referenced
+ : @param $position Limit results to the position in the link. Otherwise, do not limit.
+ : @param $include-ancestors If set, then include in the search the node's ancestors
+ :)
+declare function ridx:query-all(
+ $query-nodes as node()*,
+ $position as xs:integer*,
+ $include-ancestors as xs:boolean?
+ ) as node()* {
+ let $nodes :=
+ for $query in
+ (
+ if ($include-ancestors)
+ then $query-nodes/ancestor-or-self::node()
+ else $query-nodes
+ )
+ let $query-document := document-uri(root($query))
+ let $query-id := util:node-id($query)
+ for $entry in (
+ if (empty($position))
+ then collection($ridx:ridx-path)//
+ ridx:entry
+ [@target-doc=$query-document]
+ [@target-node=$query-id]
+ else collection($ridx:ridx-path)//
+ ridx:entry
+ [@target-doc=$query-document]
+ [@target-node=$query-id]
+ [@position=$position]
+ )
+ group by
+ $document-uri := root($entry)/*/@document/string(),
+ $source-node := $entry/@source-node/string()
+ return
+ util:node-by-id(doc($document-uri), $source-node)
+ return
+ $nodes | ()
+};
+
+
+declare function ridx:query-document(
+ $docs as item()*
+ ) as node()* {
+ ridx:query-document($docs, false())
+};
+
+(:~ @return all references to a document
+ : @param $docs The documents, as URIs or document-node()
+ : @param $accept-same if true(), include only references that
+ : are in the same document. Otherwise, return all references.
+ : Default false()
+ :)
+declare function ridx:query-document(
+ $docs as item()*,
+ $accept-same as xs:boolean
+ ) as node()* {
+ let $nodes :=
+ for $doc in $docs
+ let $target-document-uri :=
+ document-uri(
+ typeswitch ($doc)
+ case node() return root($doc)
+ default return doc($doc)
+ )
+ let $entries :=
+ if ($accept-same)
+ then
+ collection($ridx:ridx-path)/
+ ridx:index[@document=$target-document-uri]/
+ ridx:entry[@target-doc=$target-document-uri]
+ else
+ collection($ridx:ridx-path)//
+ ridx:entry[@target-doc=$target-document-uri]
+ for $entry in $entries
+ return
+ try {
+ util:node-by-id(doc(root($entry)/*/@document), $entry/@source-node)
+ }
+ catch * {
+ debug:debug($debug:info,
+ "refindex",
+ ("A query could not find a node from ", $entry, " - is the index expired?")
+ )
+ }
+ return
+ $nodes | () (: avoid duplicates :)
+};
+
+(:~ disable the reference index: you must be admin! :)
+declare function ridx:disable(
+ ) as xs:boolean {
+ let $user := app:auth-user()
+ let $idx-flag := xs:anyURI(concat($ridx:ridx-path, "/", $ridx:disable-flag))
+ return
+ sm:is-dba($user)
+ and (
+ local:make-index-collection($ridx:indexed-base-path),
+ if (xmldb:store(
+ $ridx:ridx-path,
+ $ridx:disable-flag,
+
+ ))
+ then (
+ sm:chown($idx-flag, $user),
+ sm:chgrp($idx-flag, "dba"),
+ sm:chmod($idx-flag, "rw-rw-r--"),
+ true()
+ )
+ else false()
+ )
+};
+
+(:~ re-enable the reference index: you must be admin to run! :)
+declare function ridx:enable(
+ ) as xs:boolean {
+ if (sm:is-dba(app:auth-user())
+ and doc-available(concat($ridx:ridx-path, "/", $ridx:disable-flag))
+ )
+ then (
+ xmldb:remove($ridx:ridx-path, $ridx:disable-flag),
+ true()
+ )
+ else false()
+};
diff --git a/code/modules/relevance.xsl2 b/opensiddur-server/src/modules/relevance.xsl2
similarity index 100%
rename from code/modules/relevance.xsl2
rename to opensiddur-server/src/modules/relevance.xsl2
diff --git a/code/modules/resources/favicon.ico b/opensiddur-server/src/modules/resources/favicon.ico
similarity index 100%
rename from code/modules/resources/favicon.ico
rename to opensiddur-server/src/modules/resources/favicon.ico
diff --git a/code/modules/resources/open-siddur-logo.png b/opensiddur-server/src/modules/resources/open-siddur-logo.png
similarity index 100%
rename from code/modules/resources/open-siddur-logo.png
rename to opensiddur-server/src/modules/resources/open-siddur-logo.png
diff --git a/code/modules/resources/site.css b/opensiddur-server/src/modules/resources/site.css
similarity index 100%
rename from code/modules/resources/site.css
rename to opensiddur-server/src/modules/resources/site.css
diff --git a/opensiddur-server/src/modules/status.xqm b/opensiddur-server/src/modules/status.xqm
new file mode 100644
index 00000000..2bce6ebd
--- /dev/null
+++ b/opensiddur-server/src/modules/status.xqm
@@ -0,0 +1,232 @@
+xquery version "3.1";
+(:~ job status/logging module
+ :
+ : Open Siddur Project
+ : Copyright 2014 Efraim Feinstein
+ : Licensed under the GNU Lesser General Public License, version 3 or later
+ :)
+module namespace status="http://jewishliturgy.org/modules/status";
+
+import module namespace app="http://jewishliturgy.org/modules/app"
+ at "app.xqm";
+import module namespace data="http://jewishliturgy.org/modules/data"
+ at "data.xqm";
+import module namespace mirror="http://jewishliturgy.org/modules/mirror"
+ at "mirror.xqm";
+import module namespace magic="http://jewishliturgy.org/magic"
+ at "../magic/magic.xqm";
+
+declare variable $status:status-collection := "/db/cache/status";
+declare variable $status:bg-scheduler := "scheduler.xml";
+
+(:~ initial setup :)
+declare function status:setup(
+ ) {
+ if (xmldb:collection-available($status:status-collection))
+ then ()
+ else
+ let $cp := app:make-collection-path($status:status-collection, "/", sm:get-permissions(xs:anyURI("/db/data")))
+ let $ch := sm:chmod(xs:anyURI($status:status-collection), "rwxrwxrwx")
+ return status:setup-scheduler()
+};
+
+(:~ clear all jobs :)
+declare function status:clear-jobs(
+ ) {
+ for $job in collection($status:status-collection)[status:job]
+ return xmldb:remove(util:collection-name($job), util:document-name($job))
+};
+
+(:~ return a query-unique job id for the processing of the given document :)
+declare function status:get-job-id(
+ $doc as document-node()
+ ) as xs:string {
+ let $query-document-id := string(util:absolute-resource-id($doc))
+ let $query-time := string((current-dateTime() - xs:dateTime("1970-01-01T00:00:00-00:00")) div xs:dayTimeDuration('PT0.001S'))
+ return $query-document-id || "-" || $query-time
+};
+
+(:~ @return the name of the job document :)
+declare function status:job-doc-name(
+ $job-id as xs:string
+ ) as xs:string {
+ $job-id || ".status.xml"
+};
+
+(:~ get the status document for a given origin document
+ : @param $job-id the job identifier
+ :)
+declare function status:doc(
+ $job-id as xs:string
+ ) as document-node()? {
+ let $job-doc := status:job-doc-name($job-id)
+ return doc($status:status-collection || "/" || $job-doc)
+};
+
+(:~ start a job in this query with $origin-doc,
+ : @return the job-id of the job
+ :)
+declare function status:start-job(
+ $origin-doc as document-node()
+ ) as xs:string {
+ let $collection := util:collection-name($origin-doc)
+ let $resource := util:document-name($origin-doc)
+ let $job-id := status:get-job-id($origin-doc)
+ let $status-resource := status:job-doc-name($job-id)
+ let $path :=
+ xmldb:store(
+ $status:status-collection,
+ $status-resource,
+ element status:job {
+ attribute user { (app:auth-user(), "guest")[1] },
+ attribute started { util:system-dateTime()},
+ attribute state { "working" },
+ attribute resource {data:db-path-to-api(string-join(($collection, $resource), '/'))}
+ }
+ )
+ let $permissions :=
+ system:as-user("admin", $magic:password, (
+ app:copy-permissions(
+ $path,
+ sm:get-permissions(document-uri($origin-doc))),
+ sm:chmod(xs:anyURI($path), "rw-rw-rw-")
+ ))
+ return $job-id
+};
+
+declare function status:complete-job(
+ $job-id as xs:string,
+ $result-path as xs:string
+ ) as empty-sequence() {
+ let $sj := status:doc($job-id)/status:job
+ return (
+ update value $sj/@state with "complete",
+ update insert attribute completed { util:system-dateTime() } into $sj,
+ update insert element status:complete {
+ attribute timestamp { util:system-dateTime() },
+ attribute resource { data:db-path-to-api($result-path) }
+ } into $sj
+ )
+};
+
+declare function status:fail-job(
+ $job-id as xs:string,
+ $resource as item(),
+ $stage as xs:string?,
+ $error as item()
+ ) as empty-sequence() {
+ let $sj := status:doc($job-id)/status:job
+ let $res :=
+ data:db-path-to-api(
+ typeswitch($resource)
+ case document-node() return document-uri($resource)
+ default return $resource
+ )
+ return (
+ update value $sj/@state with "failed",
+ update insert attribute failed { util:system-dateTime() } into $sj,
+ update insert element status:fail {
+ attribute timestamp { util:system-dateTime() },
+ attribute resource { $res },
+ if ($stage) then attribute stage { $stage } else (),
+ $error
+ } into $sj
+ )
+};
+
+declare function status:start(
+ $job-id as xs:string,
+ $resource as item(),
+ $stage as xs:string
+ ) as empty-sequence() {
+ let $sj := status:doc($job-id)/status:job
+ let $res :=
+ data:db-path-to-api(
+ typeswitch($resource)
+ case document-node() return document-uri($resource)
+ default return $resource
+ )
+ return (
+ update insert element status:start {
+ attribute timestamp { util:system-dateTime() },
+ attribute resource { $res },
+ attribute stage { $stage }
+ } into $sj
+ )
+};
+
+declare function status:finish(
+ $job-id as xs:string,
+ $resource as item(),
+ $stage as xs:string
+ ) as empty-sequence() {
+ let $sj := status:doc($job-id)/status:job
+ let $res :=
+ data:db-path-to-api(
+ typeswitch($resource)
+ case document-node() return document-uri($resource)
+ default return $resource
+ )
+ return (
+ update insert element status:finish {
+ attribute timestamp { util:system-dateTime() },
+ attribute resource { $res },
+ attribute stage { $stage }
+ } into $sj
+ )
+};
+
+declare function status:log(
+ $job-id as xs:string,
+ $resource as item()?,
+ $stage as xs:string?,
+ $message as item()*
+ ) as empty-sequence() {
+ let $sj := status:doc($job-id)/status:job
+ let $res :=
+ if (exists($resource))
+ then
+ data:db-path-to-api(
+ typeswitch($resource)
+ case document-node() return document-uri($resource)
+ default return $resource
+ )
+ else ""
+ return (
+ update insert element status:log {
+ attribute timestamp { util:system-dateTime() },
+ attribute resource { $res },
+ attribute stage { $stage },
+ $message
+ } into $sj
+ )
+};
+
+
+(: these functions are for the background task processor, which can be eliminated when util:eval-async works :)
+
+declare function status:setup-scheduler() {
+ let $scheduler :=
+ xmldb:store($status:status-collection, $status:bg-scheduler,
+
+
+ )
+ let $chmod := sm:chmod(xs:anyURI($scheduler), "rw-rw-rw-")
+ return ()
+};
+
+declare function status:submit(
+ $xquery as xs:string
+ ) {
+ let $sch := doc($status:status-collection || "/" || $status:bg-scheduler)/status:scheduler
+ return update insert {$xquery} into $sch
+};
+
+declare function status:run(
+ ) {
+ let $sch := doc($status:status-collection || "/" || $status:bg-scheduler)/status:scheduler
+ let $next-task := string($sch/status:task[1])
+ let $del := update delete $sch/status:task[1]
+ where $next-task
+ return system:as-user("admin", $magic:password, util:eval($next-task))
+};
diff --git a/opensiddur-server/src/modules/upgrade.xqm b/opensiddur-server/src/modules/upgrade.xqm
new file mode 100644
index 00000000..b4a2f364
--- /dev/null
+++ b/opensiddur-server/src/modules/upgrade.xqm
@@ -0,0 +1,221 @@
+xquery version "3.1";
+(:~ effect schema upgrades
+ :
+ : Open Siddur Project
+ : Copyright 2014-2015,2018-2019 Efraim Feinstein
+ : Licensed under the GNU Lesser General Public License, version 3 or later
+ :)
+module namespace upg="http://jewishliturgy.org/modules/upgrade";
+
+import module namespace data="http://jewishliturgy.org/modules/data"
+ at "data.xqm";
+import module namespace crest="http://jewishliturgy.org/modules/common-rest"
+ at "common-rest.xqm";
+import module namespace notes="http://jewishliturgy.org/api/data/notes"
+ at "../api/data/notes.xqm";
+import module namespace outl="http://jewishliturgy.org/api/data/outlines"
+ at "../api/data/outlines.xqm";
+import module namespace src="http://jewishliturgy.org/api/data/sources"
+ at "../api/data/sources.xqm";
+import module namespace tran="http://jewishliturgy.org/api/transliteration"
+ at "../api/data/transliteration.xqm";
+import module namespace upg12="http://jewishliturgy.org/modules/upgrade12"
+ at "upgrade12.xqm";
+import module namespace upg13="http://jewishliturgy.org/modules/upgrade130"
+ at "upgrade130.xqm";
+import module namespace upg14="http://jewishliturgy.org/modules/upgrade140"
+ at "upgrade140.xqm";
+import module namespace uri="http://jewishliturgy.org/transform/uri"
+ at "follow-uri.xqm";
+
+declare namespace tei="http://www.tei-c.org/ns/1.0";
+declare namespace j="http://jewishliturgy.org/ns/jlptei/1.0";
+
+(:~ schema changes for 0.7.5
+ : * tei:availability/@status was removed
+ : * tei:sourceDesc/tei:link becomes tei:bibl/tei:ptr;
+ :)
+declare function upg:schema-changes-0-7-5(
+ ) {
+ update delete collection("/db/data")//tei:availability/@status,
+ for $sourceDescLink in collection("/db/data")//tei:sourceDesc/tei:link
+ return
+ update replace $sourceDescLink with
+ element tei:bibl {
+ element tei:ptr {
+ attribute type { "bibl" },
+ attribute target { tokenize($sourceDescLink/@target, '\s+')[2] }
+ },
+ element tei:ptr {
+ attribute type { "bibl-content" },
+ attribute target { tokenize($sourceDescLink/@target, '\s+')[1] }
+ }
+ }
+};
+
+declare function upg:rename-resources-for-upgrade(
+) as map(xs:string, xs:string) {
+ map:merge((
+ map:entry("/data/sources/Born%20Digital", "/data/sources/open_siddur_project"),
+ for $document in collection("/db/data")
+ let $collection := util:collection-name($document)
+ let $resource := util:document-name($document)
+ let $decoded := xmldb:decode($resource)
+ let $resource-number :=
+ let $n := tokenize($decoded, '-')[last()]
+ where matches($decoded, "-\d+\.xml$") and matches($n, "\d+\.xml")
+ return substring-before($n, '.xml')
+ let $log1 := util:log("info", "10:" || $collection || "/" || $resource)
+ let $title :=
+ data:normalize-resource-title(
+ if (starts-with($collection, "/db/data/user"))
+ then "ignored"
+ else if (starts-with($collection, "/db/data/sources"))
+ then src:title-function($document)
+ else if (starts-with($collection, "/db/data/transliteration"))
+ then tran:title-function($document)
+ else if (starts-with($collection, "/db/data/outlines"))
+ then outl:title-function($document)
+ else crest:tei-title-function($document)
+ , false())
+ let $log2 := util:log("info", "11:" || $title )
+ let $new-name :=
+ encode-for-uri($title) || (
+ if ($resource-number) then ("-" || $resource-number) else ""
+ )
+ let $new-resource-name := $new-name || ".xml"
+ where not(starts-with($collection,"/db/data/user"))
+ and not($resource = $new-resource-name)
+ return (
+ let $internal-collection := "/" || string-join(subsequence(tokenize($collection, "/"), 3, 2), "/") || "/"
+ let $old-internal-uri := $internal-collection || substring-before($resource, '.xml')
+ let $new-internal-uri := $internal-collection || $new-name
+ let $log := util:log("info","Renaming: " || $collection || "/" || $resource || " -> " || $new-resource-name || "
using title=" || $title)
+ let $rename := xmldb:rename($collection, $resource, $new-resource-name)
+ return map:entry($old-internal-uri, $new-internal-uri)
+ )
+ ))
+};
+
+declare function upg:rewrite-resource-links(
+ $resource-name-map as map(xs:string, xs:string)
+) {
+ upg:rewrite-resource-links($resource-name-map,
+ collection("/db/data")//*[(@target|@targets|@domains|@ref)]/(@target|@targets|@domains|@ref))
+};
+
+declare function upg:rewrite-resource-links(
+ $resource-name-map as map(xs:string, xs:string),
+ $link-data as attribute()*
+) {
+ for $link-attribute in $link-data
+ let $tokenized := tokenize($link-attribute, "\s+")
+ let $rewritten := string-join(
+ for $token in $tokenized
+ let $resource := string(uri:uri-base-resource($token))
+ let $fragment := string(uri:uri-fragment($token))
+ let $rewritten-resource :=
+ if (map:contains($resource-name-map, $resource))
+ then $resource-name-map($resource)
+ else $resource
+ return
+ string-join(($rewritten-resource, $fragment[.]), '#')
+ , " "
+ )
+ let $log := util:log("info", "21:" || $link-attribute/string() || "->" || $rewritten)
+ return
+ update replace $link-attribute with (
+ attribute { local-name($link-attribute) } { $rewritten }
+ )
+};
+
+(: not strictly speaking a schema change:
+ : any resource in /db/data with a name containing ,;= will be renamed.
+ : NOTE: if we expected any links to such files, the links would also have to be changed.
+ : Fortunately, we do not expect external links. If they are found, they will have to
+ : be manually corrected.
+ : NOTE 2: This will also update for 0.13.0
+ :)
+declare function upg:schema-changes-0-8-0() {
+ let $log1 := util:log("info", "Renaming resources for upgrade...")
+ let $name-map := upg:rename-resources-for-upgrade()
+ let $log1 := util:log("info", "Rewriting resource links...")
+ return upg:rewrite-resource-links($name-map)
+};
+
+(:~ removal of tei:relatedItem/@type='scan',
+ : replaced with tei:idno -- supports Google Books (@type='books.google.com') and Internet Archive (@type='archive.org')
+ :)
+declare function upg:schema-changes-0-8-1() {
+ for $source in collection("/db/data/sources")[descendant::tei:relatedItem]
+ let $relatedItem := $source//tei:relatedItem["scan"=@type]
+ let $archive :=
+ if (contains($relatedItem/(@target || @targetPattern), "books.google.com"))
+ then "books.google.com"
+ else if (contains($relatedItem/(@target || @targetPattern), "archive.org"))
+ then "archive.org"
+ else "scan"
+ let $id :=
+ if ($archive = "archive.org")
+ then analyze-string(
+ ($relatedItem/@target, $relatedItem/@targetPattern)[1],
+ "/(details|stream)/([A-Za-z0-9_]+)")/fn:match/fn:group[@nr=2]/string()
+ else if ($archive = "books.google.com")
+ then analyze-string(
+ ($relatedItem/@target, $relatedItem/@targetPattern)[1],
+ "id=([A-Za-z0-9_]+)")/fn:match/fn:group[@nr=1]/string()
+ else $relatedItem/@target
+ return
+ update replace $relatedItem with
+ element tei:idno {
+ attribute type { $archive },
+ $id
+ }
+};
+
+(:~ removal of tei:idno in annotations files, change names of annotation files to be xsd:Names
+ :)
+declare function upg:schema-changes-0-9-0() {
+ update delete collection("/db/data/notes")//j:annotations/tei:idno,
+ for $document in collection("/db/data/notes")
+ let $collection := util:collection-name($document)
+ let $resource := util:document-name($document)
+ let $uri-title := data:normalize-resource-title(crest:tei-title-function($document), false())
+ let $resource-number :=
+ let $n := tokenize($resource, '-')[last()]
+ where matches($resource, "-\d+\.xml$") and matches($n, "\d+\.xml")
+ return substring-before($n, '.xml')
+ let $new-name :=
+ string-join((
+
+ encode-for-uri(replace(replace(normalize-space($uri-title), "\p{M}", ""), "[,;:$=@]+", "-")),
+ $resource-number), "-") || ".xml"
+ where not($new-name=$resource)
+ return (
+ util:log-system-out("Renaming annotation file: " || $collection || "/" || $resource || " -> " || $new-name || "
using uri title=" || $uri-title),
+ xmldb:rename($collection, $resource, $new-name)
+ )
+
+};
+
+declare function upg:schema-changes-0-12-0() {
+ util:log("info","You must run the schema upgrade to 0.12.0 manually!...")
+};
+
+declare function upg:schema-changes-0-13-0() {
+ upg13:upgrade-all()
+};
+
+declare function upg:schema-changes-0-14-0() {
+ upg14:upgrade()
+};
+
+declare function upg:all-schema-changes() {
+ upg:schema-changes-0-7-5(),
+ upg:schema-changes-0-8-0(),
+ upg:schema-changes-0-8-1(),
+ upg:schema-changes-0-9-0(),
+ upg:schema-changes-0-12-0(),
+ upg:schema-changes-0-13-0(),
+ upg:schema-changes-0-14-0()
+};
diff --git a/opensiddur-server/src/modules/upgrade12.xqm b/opensiddur-server/src/modules/upgrade12.xqm
new file mode 100644
index 00000000..c0dc466b
--- /dev/null
+++ b/opensiddur-server/src/modules/upgrade12.xqm
@@ -0,0 +1,253 @@
+xquery version "3.1";
+(:~ Transformation for JLPTEI files to 0.12.0+
+ : Major changes:
+ : 1. Remove `tei:seg` from inside `j:streamText`.
+ : 2. All segments with references to them as the beginning of the range (or the only reference) should be replaced with `tei:anchor` before them.
+ : 3. All segments with references to them as the end of the range (or only reference) should be replaced with `tei:anchor` after them;
+ : the range pointer should be changed to point to the end instead of the beginning.
+ : 4. all internal and external pointers in `j:streamText` must point to `tei:anchor`
+ :
+ :)
+module namespace upg12 = "http://jewishliturgy.org/modules/upgrade12";
+
+import module namespace mirror = "http://jewishliturgy.org/modules/mirror"
+ at "mirror.xqm";
+import module namespace ridx = "http://jewishliturgy.org/modules/refindex"
+ at "refindex.xqm";
+import module namespace didx = "http://jewishliturgy.org/modules/docindex"
+ at "docindex.xqm";
+import module namespace uri = "http://jewishliturgy.org/transform/uri"
+ at "follow-uri.xqm";
+
+declare namespace tei = "http://www.tei-c.org/ns/1.0";
+declare namespace j = "http://jewishliturgy.org/ns/jlptei/1.0";
+
+(:~ upgrade all the documents in /db/data
+ : first, create a mirror collection for /db/data, then run [[upg12:upgrade]] on all documents,
+ : saving them to an equivalent location in the mirror.
+ : when finished, remove /db/data and replace it with the mirror
+ : remove the mirror file.
+ : This function will only perform the operations if there are any j:streamText/tei:seg elements (a proxy for
+ : databases that are not converted)
+ :)
+declare function upg12:upgrade-all() {
+ if (exists(collection("/db/data")//j:streamText/tei:seg))
+ then
+ let $didx-reindex := didx:reindex(collection("/db/data"))
+ let $ridx-reindex := ridx:reindex(collection("/db/data"))
+ let $upgrade-mirror := "/db/upgrade"
+ let $create-mirror := mirror:create($upgrade-mirror, "/db/data", false())
+ let $upgrade :=
+ for $resource in upg12:recursive-file-list("/db/data")
+ return
+ typeswitch ($resource)
+ case element(collection) return (
+ util:log("info", "Upgrading to 0.12.0: mirror " || $resource/@collection),
+ mirror:make-collection-path($upgrade-mirror, $resource/@collection)
+ )
+ case element(resource) return
+ if ($resource/@mime-type = "application/xml")
+ then (
+ util:log("info", "Upgrading to 0.12.0: " || $resource/@collection || "/" || $resource/@resource),
+ mirror:store($upgrade-mirror, $resource/@collection, $resource/@resource,
+ upg12:upgrade(doc($resource/@collection || "/" || $resource/@resource)))
+ )
+ else (
+ (: not an XML file, just copy it :)
+ util:log("info", "Copying for 0.12.0: " || $resource/@collection || "/" || $resource/@resource),
+ xmldb:copy-resource($resource/@collection, $resource/@resource, mirror:mirror-path($upgrade-mirror, $resource/@collection), $resource/@resource, true())
+ )
+ default return ()
+ let $unmirror := xmldb:remove($upgrade-mirror, $mirror:configuration)
+ let $destroy := xmldb:remove("/db/data")
+ let $move := xmldb:rename($upgrade-mirror, "data")
+ let $ridx-reindex := ridx:reindex(collection("/db/data"))
+ let $reindex := xmldb:reindex("/db/data")
+ return ()
+ else
+ util:log("info", "Not upgrading to 0.12.0: This database appears to already be upgraded.")
+};
+
+declare function upg12:recursive-file-list(
+ $base-path as xs:string
+) as element(resource)* {
+ for $child-collection in xmldb:get-child-collections($base-path)
+ let $uri := xs:anyURI($base-path || "/" || $child-collection)
+ let $perms := sm:get-permissions($uri)
+ return (
+ ,
+ upg12:recursive-file-list($base-path || "/" || $child-collection)
+ ),
+ for $child-resource in xmldb:get-child-resources($base-path)
+ let $uri := xs:anyURI($base-path || "/" || $child-resource)
+ let $perms := sm:get-permissions($uri)
+ let $mime-type := xmldb:get-mime-type($uri)
+ return
+
+};
+
+(:~ upgrade a document file :)
+declare function upg12:upgrade(
+ $nodes as node()*
+) {
+ for $node in $nodes
+ return
+ typeswitch($node)
+ case document-node() return document { upg12:upgrade($node/node()) }
+ case element(j:streamText) return upg12:j-streamText($node)
+ case element() return upg12:upgrade-ptrs($node)
+ case text() return $node
+ default return $node
+};
+
+(:~ this transform is intended to be called on any element with @target|@targets
+ : it will copy the element and update the target according to the following rules:
+ : (1) if the target is a range ptr, all ends that are segments inside j:streamText will be rewritten
+ : such that beginnings of segments maintain the same xml:id and ends of segments have the xml:id with _end appended
+ :)
+declare function upg12:upgrade-ptrs(
+ $elements as element()*
+) {
+ for $element in $elements
+ return
+ element { QName(namespace-uri($element), name($element))} {
+ $element/(@* except @target|@targets),
+ if ($element/(@target|@targets))
+ then
+ attribute {
+ name($element/(@target|@targets))
+ }{
+ string-join(
+ for $target in tokenize(string($element/(@target | @targets)), '\s+')
+ return
+ if (matches($target, "^http[s]?[:]"))
+ then
+ (: do not follow external links :)
+ $target
+ else
+ let $target-nodes := uri:fast-follow($target, $element, 0)
+ let $first-target-node-seg := $target-nodes[1][self::tei:seg][ancestor::j:streamText]
+ let $last-target-node-seg := $target-nodes[last()][self::tei:seg][ancestor::j:streamText]
+ let $first-is-last := $first-target-node-seg is $last-target-node-seg
+ return
+ if (exists($first-target-node-seg) or exists($last-target-node-seg))
+ then
+ let $document-part := substring-before($target, "#")
+ let $fragment-ptr := substring-after($target, "#")
+ let $fragment-start :=
+ if (starts-with($fragment-ptr, "range("))
+ then substring-before(substring-after($fragment-ptr, "("), ",")
+ else $fragment-ptr
+ let $fragment-end :=
+ if (starts-with($fragment-ptr, "range("))
+ then substring-before(substring-after($fragment-ptr, ","), ")")
+ else $fragment-ptr
+ return concat($document-part, "#",
+ (
+ if ($first-is-last)
+ then
+ if (exists($first-target-node-seg))
+ then
+ (: a single segment becomes a range pointer :)
+ "range(" || $fragment-start || "," || $fragment-start || "_end)"
+ else
+ (: not a segment, no change :)
+ $fragment-ptr
+ else
+ (: a range pointer has to be rewritten-- if the end is a segment inside a streamText :)
+ "range(" || $fragment-start || "," || $fragment-end || (
+ if ($last-target-node-seg)
+ then "_end"
+ else ""
+ ) || ")"
+ )
+ )
+ else $target,
+ " "
+ )
+ }
+ else (),
+ upg12:upgrade($element/node())
+ }
+};
+
+
+
+(:~ upgrade j:streamText
+ : 1. run the special operations for tei:seg
+ : 2. join adjacent text nodes
+ :)
+declare function upg12:j-streamText(
+ $e as element(j:streamText)
+) as element(j:streamText) {
+ element j:streamText {
+ $e/@*,
+ for $node in $e/node()
+ return
+ typeswitch($node)
+ case element(tei:seg) return upg12:tei-seg($node)
+ case element() return upg12:upgrade-ptrs($node)
+ default return $node
+ }
+};
+
+declare function upg12:tei-seg(
+ $node as element(tei:seg)
+) as item()+ {
+ upg12:tei-seg($node, ridx:query-all($node))
+};
+
+(:~ a segment inside a streamText will be surrounded by anchors if there are existing references to the
+ : beginning or end of the element.
+ :)
+declare function upg12:tei-seg(
+ $node as element(tei:seg),
+ $references as element()*
+) as item()+ {
+ let $xmlid := $node/@xml:id
+ let $end-xmlid := concat($xmlid, "_end")
+ let $references :=
+ distinct-values(
+ for $reference in $references
+ for $target in tokenize(string($reference/(@target | @targets)), '\s+')
+ let $target-nodes := uri:fast-follow($target, $reference, 1)
+ let $i-am-first-target := $target-nodes[1] is $node
+ let $i-am-last-target := $target-nodes[last()] is $node
+ return (
+ if ($i-am-first-target) then "first" else (),
+ if ($i-am-last-target) then "last" else ()
+ )
+ )
+ return (
+ if ($references = "first")
+ then
+ element tei:anchor {
+ attribute xml:id {$xmlid}
+ }
+ else (),
+ upg12:upgrade-inside-seg($node/node()),
+ if ($references = "last")
+ then
+ element tei:anchor {
+ attribute xml:id {$end-xmlid}
+ }
+ else (),
+ " "
+ )
+};
+
+declare function upg12:upgrade-inside-seg(
+ $nodes as node()*
+) {
+ $nodes
+};
diff --git a/opensiddur-server/src/modules/upgrade122.xqm b/opensiddur-server/src/modules/upgrade122.xqm
new file mode 100644
index 00000000..17e1853e
--- /dev/null
+++ b/opensiddur-server/src/modules/upgrade122.xqm
@@ -0,0 +1,123 @@
+xquery version "3.1";
+
+(:~ Upgrade transition for 0.12.2:
+ : Reduce the number of elements in j:streamText
+ :)
+
+module namespace upgrade122 = "http://jewishliturgy.org/modules/upgrade122";
+
+import module namespace ridx="http://jewishliturgy.org/modules/refindex" at "refindex.xqm";
+import module namespace upg12 = "http://jewishliturgy.org/modules/upgrade12" at "upgrade12.xqm";
+import module namespace mirror = "http://jewishliturgy.org/modules/mirror" at "mirror.xqm";
+
+declare namespace tei="http://www.tei-c.org/ns/1.0";
+declare namespace j="http://jewishliturgy.org/ns/jlptei/1.0";
+
+(:~ upgrade all the documents in /db/data
+ : first, create a mirror collection for /db/data, then run [[upgrade122:upgrade122]] on all documents,
+ : saving them to an equivalent location in the mirror.
+ : when finished, remove /db/data and replace it with the mirror
+ : remove the mirror file.
+ : This function will only perform the operations if there are any j:streamText/tei:pc elements (a proxy for
+ : databases that are not converted)
+ :)
+declare function upgrade122:upgrade-all() {
+ if (count(collection("/db/data")//j:streamText/tei:pc) > 10) (: arbitrary cutoff :)
+ then
+ let $ridx-reindex := ridx:reindex(collection("/db/data"))
+ let $upgrade-mirror := "/db/upgrade"
+ let $create-mirror := mirror:create($upgrade-mirror, "/db/data", false())
+ let $upgrade :=
+ for $resource in upg12:recursive-file-list("/db/data")
+ return
+ typeswitch ($resource)
+ case element(collection) return (
+ util:log("info", "Upgrading to 0.12.2: mirror " || $resource/@collection),
+ mirror:make-collection-path($upgrade-mirror, $resource/@collection)
+ )
+ case element(resource) return
+ if ($resource/@mime-type = "application/xml")
+ then (
+ util:log("info", "Upgrading to 0.12.2: " || $resource/@collection || "/" || $resource/@resource),
+ mirror:store($upgrade-mirror, $resource/@collection, $resource/@resource,
+ upgrade122:upgrade122(doc($resource/@collection || "/" || $resource/@resource)))
+ )
+ else (
+ (: not an XML file, just copy it :)
+ util:log("info", "Copying for 0.12.2: " || $resource/@collection || "/" || $resource/@resource),
+ xmldb:copy-resource($resource/@collection, $resource/@resource, mirror:mirror-path($upgrade-mirror, $resource/@collection), $resource/@resource, true())
+ )
+ default return ()
+ let $unmirror := xmldb:remove($upgrade-mirror, $mirror:configuration)
+ let $destroy := xmldb:remove("/db/data")
+ let $move := xmldb:rename($upgrade-mirror, "data")
+ let $ridx-reindex := ridx:reindex(collection("/db/data"))
+ let $reindex := xmldb:reindex("/db/data")
+ return ()
+ else
+ util:log("info", "Not upgrading to 0.12.2: This database appears to already be upgraded.")
+};
+
+
+declare function upgrade122:upgrade122(
+ $nodes as node()*
+) as node()* {
+ for $node in $nodes
+ return
+ typeswitch($node)
+ case document-node() return document { upgrade122:upgrade122($node/node()) }
+ case element(j:streamText) return upgrade122:j-streamText($node)
+ case element() return
+ element { QName(namespace-uri($node), name($node))}{
+ $node/@*,
+ upgrade122:upgrade122($node/node())
+ }
+ default return $node
+
+};
+
+(:~ @return true() if any of $ref contain a literal reference to the element with id $xmlid, otherwise false() :)
+declare %private function upgrade122:is-literal-reference(
+ $ref as element()*,
+ $xmlid as xs:string
+) as xs:boolean {
+ let $all-reference-strings := string-join($ref/(@target|@targets), " ")
+ let $all-reference-ids := tokenize($all-reference-strings, "[\s,()#]+")
+ return $all-reference-ids=$xmlid
+};
+
+declare function upgrade122:j-streamText(
+ $e as element(j:streamText)
+) as element(j:streamText) {
+ element { QName(namespace-uri($e), name($e)) }{
+ $e/@*,
+ for $child in $e/node()
+ return
+ typeswitch($child)
+ case element(tei:ptr) return $child
+ case element() return
+ let $refs := ridx:query-all($child, (), false())
+ return
+ if (
+ ($child/@xml:id and exists($refs) and upgrade122:is-literal-reference($refs, $child/@xml:id))
+ or (exists($child/element()))
+ )
+ then $child
+ else $child/node()
+ case text() return
+ if (normalize-space($child))
+ then
+ (: something other than whitespace :)
+ $child
+ else
+ (: all whitespace :)
+ if (
+ $child/preceding-sibling::*[1]='־'
+ or $child/following-sibling::*[1]=('׃', '־')) then (
+ (: maqaf should always be connected to following and preceding word
+ sof pasuq should be connected to preceding word.
+ :))
+ else text { " " }
+ default return $child
+ }
+};
\ No newline at end of file
diff --git a/opensiddur-server/src/modules/upgrade130.xqm b/opensiddur-server/src/modules/upgrade130.xqm
new file mode 100644
index 00000000..2f5fe244
--- /dev/null
+++ b/opensiddur-server/src/modules/upgrade130.xqm
@@ -0,0 +1,70 @@
+xquery version "3.1";
+(:~ Transformation for JLPTEI files to 0.13.0+
+ : Major changes:
+ : 1. Move all files from YYYY/MM directories into the root directory
+ :
+ :)
+module namespace upg13 = "http://jewishliturgy.org/modules/upgrade130";
+
+import module namespace mirror = "http://jewishliturgy.org/modules/mirror"
+ at "mirror.xqm";
+import module namespace ridx = "http://jewishliturgy.org/modules/refindex"
+ at "refindex.xqm";
+import module namespace didx = "http://jewishliturgy.org/modules/docindex"
+ at "docindex.xqm";
+import module namespace uri = "http://jewishliturgy.org/transform/uri"
+ at "follow-uri.xqm";
+import module namespace upg12="http://jewishliturgy.org/modules/upgrade12"
+ at "upgrade12.xqm";
+
+declare namespace tei = "http://www.tei-c.org/ns/1.0";
+declare namespace j = "http://jewishliturgy.org/ns/jlptei/1.0";
+
+(:~ upgrade all the documents in /db/data
+ : first, create a mirror collection for /db/data, then run [[upg13:upgrade]] on all documents,
+ : saving them to an equivalent location in the mirror.
+ : when finished, remove /db/data and replace it with the mirror
+ : remove the mirror file.
+ :)
+declare function upg13:upgrade-all() {
+ if (exists(xmldb:get-child-collections("/db/data/original/en")))
+ then
+ let $upgrade-mirror := "/db/upgrade13"
+ let $create-mirror := mirror:create($upgrade-mirror, "/db/data", false())
+ let $upgrade :=
+ (: use the function from upg12 to list files... :)
+ for $resource in upg12:recursive-file-list("/db/data")
+ return
+ typeswitch ($resource)
+ case element(collection) return (
+ let $to-create := tokenize($resource/@collection, "/")[.][last()]
+ return
+ if (matches($to-create, "^\d+$"))
+ then
+ util:log("info", "Upgrading to 0.13.0: Not mirroring " || $resource/@collection)
+ else (
+ util:log("info", "Upgrading to 0.13.0: mirror " || $resource/@collection),
+ mirror:make-collection-path($upgrade-mirror, $resource/@collection)
+ )
+ )
+ case element(resource) return
+ let $destination-collection := replace($resource/@collection, "[/]\d+[/]\d+", "")
+ let $log := util:log("info", "Copying for 0.13.0: " || $resource/@collection || "/" || $resource/@resource || " to " || $destination-collection)
+ return
+ xmldb:copy-resource($resource/@collection, $resource/@resource, mirror:mirror-path($upgrade-mirror, $destination-collection), $resource/@resource)
+ default return ()
+ let $unmirror := xmldb:remove($upgrade-mirror, $mirror:configuration)
+ let $destroy := xmldb:remove("/db/data")
+ let $move := xmldb:rename($upgrade-mirror, "data")
+ (: the entire /db/data directory has been wiped and all indexes are inconsistent. Completely remake them. :)
+ let $didx-delete := xmldb:remove($didx:didx-path)
+ let $ridx-delete := xmldb:remove($ridx:ridx-path)
+ let $didx-resetup := didx:setup()
+ let $ridx-resetup := ridx:setup()
+ let $didx-reindex := didx:reindex(collection("/db/data"))
+ let $ridx-reindex := ridx:reindex(collection("/db/data"))
+ let $reindex := xmldb:reindex("/db/data")
+ return ()
+ else
+ util:log("info", "Not upgrading to 0.13.0: This database appears to already be upgraded.")
+};
diff --git a/opensiddur-server/src/modules/upgrade140.xqm b/opensiddur-server/src/modules/upgrade140.xqm
new file mode 100644
index 00000000..5e9ece21
--- /dev/null
+++ b/opensiddur-server/src/modules/upgrade140.xqm
@@ -0,0 +1,155 @@
+xquery version "3.1";
+(: Upgrade to 0.14.0
+ :
+ : Major changes:
+ : 1. Single-reference rule: All anchors must be referenced only once
+ : 2. External anchors must be declared 'external' or 'canonical'
+ :)
+
+module namespace upg14 = "http://jewishliturgy.org/modules/upgrade140";
+
+import module namespace ridx = 'http://jewishliturgy.org/modules/refindex'
+ at "xmldb:///db/apps/opensiddur-server/modules/refindex.xqm";
+import module namespace didx="http://jewishliturgy.org/modules/docindex"
+ at "xmldb:///db/apps/opensiddur-server/modules/docindex.xqm";
+
+declare namespace tei="http://www.tei-c.org/ns/1.0";
+
+(:~ determine if this database likely needs upgrade (true) or not (false)
+ : Determined by having a minimum number of anchors that are marked external or canonical :)
+declare function upg14:needs-upgrade(
+ $root-collection as xs:string
+) as xs:boolean {
+ let $anchors := collection($root-collection)//tei:anchor
+ return count($anchors) > 1 and (: there is some data:)
+ count($anchors[@type=("external", "canonical")]) < 10 (: there are not enough canonical/external anchors :)
+};
+
+(:~ heuristic to determine if the link should be called canonical :)
+declare function upg14:is-canonical($anchor as element(tei:anchor)) as xs:boolean {
+ matches($anchor/@xml:id, "v\d+_seg\d+(_end)?")
+};
+
+declare function upg14:get-upgrade-changes-map(
+ $root-collection as xs:string
+ ) as map(*) {
+ map:merge(
+ for $anchor in collection($root-collection)//tei:anchor
+ let $is-canonical := upg14:is-canonical($anchor)
+ let $source-doc := document-uri(root($anchor))
+ let $all-references := ridx:query-all($anchor, (), false())
+ (: we need to know:
+ : what type is each anchor? (internal, external or canonical)
+ : which anchors need to be split up?
+ : for the anchors that get split up: for each reference, what will the target be rewritten to?
+ : anchor_doc#xmlid -> map { type : str, old_id: original id, id: new_xml_id, reference_doc: reference_doc reference_id: node_id }+
+ :)
+ let $anchor-id := $source-doc || "#" || $anchor/@xml:id/string()
+ let $reference-elements :=
+ for $reference in $all-references
+ (: this will not touch anchors that are unreferenced! :)
+ where exists(
+ (: this picks up the actual elements that reference the anchor :)
+ for $token in tokenize($reference/(@target|@targets|@ref|@domains|@who), "\s+")
+ let $fragment := substring-after($token, "#")
+ where (
+ if (starts-with($fragment, "range("))
+ then tokenize(substring-before(substring-after($fragment, "("), ")"), ",")=$anchor/@xml:id
+ else $fragment=$anchor/@xml:id
+ )
+ return $token
+ )
+ return $reference
+ return
+ if ($is-canonical)
+ then
+ (: canonical elements are allowed to be multiply referenced, so the references need not be rewritten :)
+ map:entry($anchor-id, map {
+ "type" : "canonical",
+ "id" : $anchor/@xml:id/string(),
+ "old_id" : "",
+ "reference_doc": (),
+ "reference_id" :()
+ })
+ else
+ map:entry($anchor-id,
+ for $reference-element at $ctr in $reference-elements
+ let $type :=
+ if (root($reference-element) is root($anchor))
+ then "internal"
+ else "external"
+ return
+ map {
+ "type": $type,
+ "id" : (
+ if (count($reference-elements) = 1)
+ then $anchor/@xml:id/string()
+ else ($anchor/@xml:id/string() || "_" || string($ctr))
+ ),
+ "old_id" : $anchor/@xml:id/string(),
+ "reference_doc" : document-uri(root($reference-element)),
+ "reference_id" : util:node-id($reference-element)
+ }
+ )
+ )
+};
+
+declare function upg14:do-upgrade-changes($changes as map(*)) {
+ for $anchor-id in map:keys($changes)
+ let $doc-uri := substring-before($anchor-id, "#")
+ let $anchor-doc := doc($doc-uri)
+ let $anchor-xml-id := substring-after($anchor-id, "#")
+ let $anchor := $anchor-doc//tei:anchor[@xml:id=$anchor-xml-id]
+ let $map-entry := $changes($anchor-id)
+ let $deletions :=
+ for $change in $map-entry
+ let $new-type := $change("type")
+ let $new-id := $change("id")
+ let $old-id := $change("old_id")
+ return
+ if ($new-type = "canonical" or $new-id = $old-id)
+ then update insert attribute type { $new-type } into $anchor
+ else (
+ let $reference := util:node-by-id(doc($change("reference_doc")), $change("reference_id"))
+ let $reference-target-attribute := $reference/(@target|@targets|@ref|@domains|@who)
+ return (
+ update insert element tei:anchor {
+ attribute type { $new-type },
+ attribute xml:id { $new-id }
+ } following $anchor,
+ update replace $reference-target-attribute with attribute { name($reference-target-attribute) } {
+ replace($reference-target-attribute/string(), $old-id || ("($|,|\))"), $new-id || "$1")
+ }
+ ),
+ $anchor
+ )
+ for $deletion in ($deletions | ())
+ return update delete $deletion
+};
+
+(: eventually, we want a list like this:
+ : document -> anchor xml:id -> list of new anchors (xml:id, type)
+ : -> reference element -> (old target-> new target)
+ :)
+declare function upg14:do-upgrade($root-collection as xs:string) {
+ (: find references to anchors and determine if the anchor supports an external reference :)
+ let $log := util:log("info", "Upgrade to 0.14.0: Finding upgrade changes")
+ let $changes := upg14:get-upgrade-changes-map($root-collection)
+ let $log := util:log("info", "Upgrade to 0.14.0: Found changes: " || string(count(map:keys($changes))))
+ return upg14:do-upgrade-changes($changes)
+};
+
+declare function upg14:upgrade() {
+ if (upg14:needs-upgrade("/db/data"))
+ then
+ let $log := util:log("info", "Prewriting indexes")
+ let $didx-reindex := didx:reindex(collection("/db/data"))
+ let $ridx-reindex := ridx:reindex(collection("/db/data"))
+ let $log := util:log("info", "Upgrading to 0.14.0")
+ let $upgraded := upg14:do-upgrade("/db/data")
+ let $log := util:log("info", "Rewriting indexes")
+ let $didx-reindex := didx:reindex(collection("/db/data"))
+ let $ridx-reindex := ridx:reindex(collection("/db/data"))
+ return ()
+ else util:log("info", "Upgrading to 0.14.0: No upgrade needed.")
+};
\ No newline at end of file
diff --git a/opensiddur-server/src/post-install.xql b/opensiddur-server/src/post-install.xql
new file mode 100644
index 00000000..c9bfd2b3
--- /dev/null
+++ b/opensiddur-server/src/post-install.xql
@@ -0,0 +1,104 @@
+xquery version "3.1";
+
+import module namespace format="http://jewishliturgy.org/modules/format"
+ at "modules/format.xqm";
+import module namespace didx="http://jewishliturgy.org/modules/docindex"
+ at "modules/docindex.xqm";
+import module namespace ridx="http://jewishliturgy.org/modules/refindex"
+ at "modules/refindex.xqm";
+import module namespace src="http://jewishliturgy.org/api/data/sources"
+ at "api/data/sources.xqm";
+import module namespace sty="http://jewishliturgy.org/api/data/styles"
+ at "api/data/styles.xqm";
+import module namespace upg="http://jewishliturgy.org/modules/upgrade"
+ at "modules/upgrade.xqm";
+
+declare namespace tei="http://www.tei-c.org/ns/1.0";
+declare namespace j="http://jewishliturgy.org/ns/jlptei/1.0";
+
+(: file path pointing to the exist installation directory :)
+declare variable $home external;
+(: path to the directory containing the unpacked .xar package :)
+declare variable $dir external;
+(: the target collection into which the app is deployed :)
+declare variable $target external;
+
+util:log("info", "starting post-install..."),
+util:log("info", "removing caches..."),
+for $cache in $format:caches
+where xmldb:collection-available($cache)
+return
+ try { xmldb:remove($cache) }
+ catch * { util:log("info", ("Error removing ", $cache)) },
+util:log("info", "setup format..."),
+format:setup(),
+util:log("info", "setup refindex..."),
+ridx:setup(),
+util:log("info", "setup docindex..."),
+didx:setup(),
+util:log("info", "install default sources..."),
+(: add $target/data/sources/Born Digital using src:post() or src:put() :)
+xmldb:store(
+ "/db/data/sources",
+ "open_siddur_project.xml",
+ doc($target || "/data/sources/open_siddur_project.xml")
+ ),
+util:log("info", "install default styles..."),
+(: add $target/data/styles/generic.xml using sty:post() or sty:put() :)
+xmldb:store(
+ "/db/data/styles/en",
+ "generic.xml",
+ doc($target || "/data/styles/en/generic.xml")
+ ),
+util:log("info", "install default users..."),
+xmldb:store(
+ "/db/data/user",
+ "admin.xml",
+
+ admin
+ Open Siddur Project
+
+),
+xmldb:store(
+ "/db/data/user",
+ "SYSTEM.xml",
+
+ SYSTEM
+ Open Siddur Project
+
+),
+util:log("info", "upgrades: update existing JLPTEI for schema changes..."),
+upg:all-schema-changes(),
+util:log("info", "upgrades: reindex document index"),
+didx:reindex(collection("/db/data")),
+util:log("info", "upgrades: reindex reference index"),
+ridx:reindex(collection("/db/data")),
+util:log("info", "reindex all data collections"),
+xmldb:reindex("/db/data"),
+util:log("info", "force registration for RESTXQ..."),
+for $module in (
+ "/api/data/conditionals.xqm",
+ "/api/data/styles.xqm",
+ "/api/data/original.xqm",
+ "/api/group.xqm",
+ "/api/data/linkage.xqm",
+ "/api/data/linkageid.xqm",
+ "/api/data/transliteration.xqm",
+ "/api/index.xqm",
+ "/api/login.xqm",
+ "/api/test.xqm",
+ "/api/data/dindex.xqm",
+ "/api/data/notes.xqm",
+ "/api/data/dictionaries.xqm",
+ "/api/jobs.xqm",
+ "/api/user.xqm",
+ "/api/data/sources.xqm",
+ "/api/changes.xqm",
+ "/api/static.xqm",
+ "/api/data/outlines.xqm",
+ "/api/utility/utilityindex.xqm",
+ "/api/utility/translit.xqm"
+)
+return exrest:register-module(xs:anyURI("/db/apps/opensiddur-server" || $module)),
+util:log("info", "done")
+
diff --git a/opensiddur-server/src/pre-install.xql b/opensiddur-server/src/pre-install.xql
new file mode 100644
index 00000000..39470bc7
--- /dev/null
+++ b/opensiddur-server/src/pre-install.xql
@@ -0,0 +1,142 @@
+xquery version "3.1";
+(: pre-install setup script
+ :
+ : Open Siddur Project
+ : Copyright 2010-2013,2016 Efraim Feinstein
+ : Licensed under the GNU Lesser General Public License, version 3 or later
+ :)
+
+(: file path pointing to the exist installation directory :)
+declare variable $home external;
+(: path to the directory containing the unpacked .xar package :)
+declare variable $dir external;
+(: the target collection into which the app is deployed :)
+declare variable $target external;
+
+declare variable $local:supported-languages := ("en", "he");
+
+
+(: from XQuery wikibook :)
+declare function local:mkcol-recursive($collection, $components) {
+ if (exists($components))
+ then
+ let $newColl := concat($collection, "/", $components[1])
+ return (
+ if (xmldb:collection-available($newColl))
+ then ()
+ else xmldb:create-collection($collection, $components[1]),
+ local:mkcol-recursive($newColl, subsequence($components, 2))
+ )
+ else
+ ()
+};
+
+(: Helper function to recursively create a collection hierarchy. :)
+declare function local:mkcol($collection, $path) {
+ local:mkcol-recursive($collection, tokenize($path, "/")[.])
+};
+
+declare function local:mkgroup($name) {
+ if (sm:group-exists($name))
+ then ()
+ else sm:create-group($name, "admin", "")
+};
+
+declare function local:mkcollection(
+ $collection as element(collection),
+ $system-config-base as xs:string
+ ) {
+ let $path := string-join($collection/ancestor-or-self::*[@name]/@name, "/")
+ let $tokens := tokenize($path, "/")
+ let $parent := subsequence($tokens, 1, count($path) - 1)
+ let $collection-name := $tokens[last()]
+ let $config-path := concat($system-config-base, $path)
+ let $package-config-path := replace($config-path, "/__target__", $target)
+ let $owner := $collection/ancestor-or-self::*[@owner][1]/@owner/string()
+ let $group := $collection/ancestor-or-self::*[@group][1]/@group/string()
+ let $permissions := $collection/ancestor-or-self::*[@perms][1]/@perms/string()
+ return (
+ util:log("info", 'make collection ' || $path),
+ (: make collection :)
+ local:mkcol("/db", substring-after($path, "/db")),
+ (: (re)set permissions :)
+ util:log("info", 'setting permissions for ' || $path),
+ sm:clear-acl(xs:anyURI($path)),
+ sm:chown(xs:anyURI($path), $owner),
+ sm:chgrp(xs:anyURI($path), $group),
+ sm:chmod(xs:anyURI($path), $permissions),
+ (: store configuration :)
+ util:log("info", 'making configuration collection for ' || $path),
+ local:mkcol("/db" || $system-config-base, $path),
+ util:log("info", 'storing configuration for ' || $path || ' to ' || $config-path || ' from ' || concat($dir, $package-config-path)),
+ let $local-path := concat($dir, $package-config-path)
+ return
+ if (file:is-directory($local-path))
+ then
+ xmldb:store-files-from-pattern(
+ $config-path, $local-path, "*.xconf"
+ )
+ else (),
+ util:log("info", 'finished processing ' || $path)
+ ),
+ (: recurse :)
+ for $subcollection in $collection/collection
+ return local:mkcollection($subcollection, $system-config-base)
+};
+
+declare function local:mkcollections(
+ $collections as element(collections),
+ $system-config-base as xs:string
+ ) {
+ for $collection in $collections/collection
+ return local:mkcollection($collection, $system-config-base)
+};
+
+declare function local:lang-collections(
+ ) {
+ local:lang-collections(())
+};
+
+declare function local:lang-collections(
+ $additional-langs as xs:string*
+ ) {
+ for $lang in ($local:supported-languages, $additional-langs)
+ return
+
+};
+
+(: make the 'everyone' group if it does not exist :)
+util:log("info", 'making groups...'),
+local:mkgroup("everyone"),
+util:log("info", 'making collections...'),
+(: make collections and store the collection configurations
+ : from the package
+ :)
+let $owner := "admin"
+let $group := "everyone"
+let $permissions := "rwxrwxr-x"
+let $collections :=
+
+
+
+
+
+ {local:lang-collections()}
+ {local:lang-collections("none")}
+ {local:lang-collections()}
+ {local:lang-collections()}
+
+
+ {local:lang-collections()}
+
+
+
+
+
+
+
+
+
+return
+ local:mkcollections($collections, "/system/config"),
+util:log("info", 'done')
diff --git a/opensiddur-server/src/repo.xml b/opensiddur-server/src/repo.xml
new file mode 100644
index 00000000..540cf7a0
--- /dev/null
+++ b/opensiddur-server/src/repo.xml
@@ -0,0 +1,14 @@
+
+
+ Open Siddur Server
+ Efraim Feinstein
+ http://github.com/opensiddur/opensiddur
+ alpha
+ GNU-LGPL
+ true
+ application
+ opensiddur-server
+ pre-install.xql
+ post-install.xql
+
+
diff --git a/opensiddur-server/src/schema/access.rnc b/opensiddur-server/src/schema/access.rnc
new file mode 100644
index 00000000..5b265992
--- /dev/null
+++ b/opensiddur-server/src/schema/access.rnc
@@ -0,0 +1,59 @@
+# Access rights XML
+# Open Siddur Project
+# Copyright 2012,2014 Efraim Feinstein
+# Licensed under the GNU Lesser General Public License, version 3 or later
+default namespace = "http://jewishliturgy.org/ns/access/1.0"
+
+start = Access
+
+# ThreeWay switch:
+# true, false, inherit. The latter indicates that the given exception should not interfere with
+# other defaults or exceptions
+ThreeWay = ( "true" | "false" | "inherit" )
+
+Permissions = (
+ attribute read { xsd:boolean },
+ attribute write { xsd:boolean }
+)
+
+Read = (
+ attribute read { xsd:boolean }
+)
+
+Write = (
+ attribute write { xsd:boolean }
+)
+
+Chmod = (
+ attribute chmod { xsd:boolean }
+)
+
+Relicense = (
+ attribute relicense { xsd:boolean }
+)
+
+Access = element access {
+ ## permissions that affect the caller.
+ ## Read-only: cannot be used for changing permissions
+ element you { Read, Write, Relicense, Chmod }?,
+ # default sets of permissions for owner/owner group/world
+ # no permissions for owner because you cannot make something read-only or unreadable for its owner
+ element owner { xsd:string },
+ element group { Write, xsd:string },
+ # default permissions to a user who is not the owner, not in the owning group, or not logged in
+ element world { Read, Write },
+ # grant special access to a group or user; write="true" if the user or group can edit
+ element grant {
+ (
+ element grant-group { Write, xsd:string } |
+ element grant-user { Write, xsd:string }
+ )*
+ }?,
+ # deny rights to a group or user; read="true" if the group/user can read, false if you want to deny read rights
+ element deny {
+ (
+ element deny-group { Read, xsd:string } |
+ element deny-user { Read, xsd:string }
+ )*
+ }?
+}
diff --git a/opensiddur-server/src/schema/annotation.xml b/opensiddur-server/src/schema/annotation.xml
new file mode 100644
index 00000000..8d96336a
--- /dev/null
+++ b/opensiddur-server/src/schema/annotation.xml
@@ -0,0 +1,125 @@
+
+
+
+
+
+ Annotation Documents
+ Efraim Feinstein
+ Syd Bauman
+ Lou Burnard
+ Sebastian Rahtz
+
+
+
+
+
+
+
+ http://jewishliturgy.org/ns/jlptei/1.0
+
+
+
Initially created on Thursday 12th
+ October 2006 by the form at
+ http://www.tei-c.org.uk/Roma/.
+
+
+
+ Limit to annotation documents
+ Change bare TEI ODD to JLPTEI
+ rewrite as new-style ODD
+ Removed further elements added
+since this ODD was first created
+ Added prose and reorganized
+structure to make it more document-like; changed deletion of attribute
+decls into deletion of att.declaring class; add deletes for elements
+email and floatingText added to P5 since this ODD was first created;
+considered but did not implement removal of all irrelevant datatype specs...
+ Made valid: removed empty prefix attributeadded required type attribute to
+ classSpecsAlso
+ removed extraneous altIdent elements, improved
+ sourceDesc, changed the ident of schemaSpec
+ to match the filename, and added this revision description.
+
+
+
+
+
+
+
+
This customization is for annotation-only files.
+
+ Formal declaration
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ A resource that holds annotations, such as notes or standoff annotations.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ The type of note
+
+
+ This note presents a link (in the form of a tei:ptr or tei:ref) that will be interpreted as an audio representation of the annotated text, and (optionally) textual information about the audio.
+
+
+ The note presents some kind of commentary on the source text.
+
+
+ The note is about how the text was edited.
+
+
+ The note is an annotation that is not part of the normal text stream,
+ but it must appear inline to the text. Prefer "instruction" or "comment". Use sparingly.
+
+
+ The note indicates instructional text
+
+
+ The note is about how the text was transcribed, and is not part of the original text.
+
+
+ The note is by the translator, commenting specifically on some aspect of the translation and not on the text itself.
+
+
+
+
+
+
+
+
+
+
diff --git a/schema/bibliography.xml b/opensiddur-server/src/schema/bibliography.xml
similarity index 76%
rename from schema/bibliography.xml
rename to opensiddur-server/src/schema/bibliography.xml
index ecf332f3..5ff51be8 100644
--- a/schema/bibliography.xml
+++ b/opensiddur-server/src/schema/bibliography.xml
@@ -5,6 +5,7 @@
xmlns:j="http://jewishliturgy.org/ns/jlptei/1.0"
xmlns:rng="http://relaxng.org/ns/structure/1.0"
xmlns:s="http://purl.oclc.org/dsdl/schematron"
+ xmlns:xi="http://www.w3.org/2001/XInclude"
xml:lang="en">
@@ -69,19 +70,25 @@ considered but did not implement removal of all irrelevant datatype specs...TEI Guidelines.
-
The only major change is the introduction of the targetPattern attribute in
- the relatedItem tag, allowing linking to page images.
If the source is not clearly a public domain book, a note where type has the value
"copyright" is recommended, where the copyright status of the work is explained in natural language.
Formal declaration
-
-
+
+
+
+
+
+
+
+
+
+
@@ -92,21 +99,31 @@ considered but did not implement removal of all irrelevant datatype specs...
-
-
+
+
+
-
- Type of related item. One recommended value is scan, where
- target references the entirety of the scan and
- targetPattern references images of individual pages.
-
-
- The related item's components can be found at a URL that matches the given pattern.
- {$page} can be used to replace a page number. If target is also
- supplied, the pattern must refer to the same Internet resource.
+
+
+ Responsibility type, indicated using one of the allowed MARC relator codes, as defined at
+ http://www.loc.gov/marc/relators/relaterm.html. The valid codes are:
+ ann (annotator), aut (author), edt (editor), fac (facsimilist, scanner?), fnd (funder), mrk (markup editor), pfr (proofreader), spn (sponsor),
+ trl (translator), and trc (transcriber)
-
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -122,7 +139,12 @@ considered but did not implement removal of all irrelevant datatype specs...
-
+
+
+
+
+
+
@@ -144,6 +166,20 @@ considered but did not implement removal of all irrelevant datatype specs...
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/schema/canonical-tei.xsl2 b/opensiddur-server/src/schema/canonical-tei.xsl
similarity index 100%
rename from schema/canonical-tei.xsl2
rename to opensiddur-server/src/schema/canonical-tei.xsl
diff --git a/opensiddur-server/src/schema/common-schema-base.xml b/opensiddur-server/src/schema/common-schema-base.xml
new file mode 100644
index 00000000..4f713064
--- /dev/null
+++ b/opensiddur-server/src/schema/common-schema-base.xml
@@ -0,0 +1,376 @@
+
+
+
+
+
+
+
+
+
+
+
+
+ indicates the default language of the text in the document. Required because it determines how the document will be indexed in the database.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Identifies the type of the anchor, and how it should be treated with respect to the
+ pointers that point to it for the purposes of validity.
+
+
+
+ internal
+
+ Anchor is canonical. Its id cannot be removed from the document if externally referenced.
+ It can be referenced by more than one pointer.
+ Anchor is internal. It cannot be externally referenced. Its id may be removed from the document.
+ Anchor is external. Its id cannot be removed from the document if externally referenced. It may only
+ be referenced by a single pointer (the single-purpose rule)
+
+
+
+
+
+
+
+ Test that internal #range pointers point to a reasonable range
+
+
+ In a #range(lptr,rptr) XPath expression, the left pointer must precede the right pointer.
+
+
+
+
+ Test that internal shorthand pointers point to an existing target
+
+
+ In a local shorthand pointer, the target node must exist.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Pointer to the license that applies to the text, which must be in the list of licenses approved for use in the project.
+
+
+
+
+
+ Creative Commons Zero (Public Domain Dedication)
+
+
+ Creative Commons Public Domain Mark (for works known to be in the public domain and without post-PD modification)
+
+
+ Creative Commons Attribution 3.0 Unported
+
+
+ Creative Commons Attribution 4.0 International
+
+
+ Creative Commons Attribution-ShareAlike 3.0 Unported
+
+
+ Creative Commons Attribution-ShareAlike 4.0 International
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Test that internal #range pointers point to a reasonable range
+
+
+ In a #range(lptr,rptr) XPath expression, the left pointer must precede the right pointer.
+
+
+
+
+ Test that internal shorthand pointers point to an existing target
+
+
+ In a local shorthand pointer, the target node must exist.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Responsibility type, indicated using one of the allowed MARC relator codes, as defined at
+ http://www.loc.gov/marc/relators/relaterm.html. The valid codes are:
+ ann (annotator), aut (author), edt (editor), fac (facsimilist, scanner?), fnd (funder), mrk (markup editor), pfr (proofreader), spn (sponsor),
+ trl (translator), and trc (transcriber)
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Require @ref in the non-resp element to reference a contributor
+
+ The name-like element in respStmt is required to reference a contributor using an @ref attribute
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/opensiddur-server/src/schema/common-schema.xml b/opensiddur-server/src/schema/common-schema.xml
new file mode 100644
index 00000000..934dff1d
--- /dev/null
+++ b/opensiddur-server/src/schema/common-schema.xml
@@ -0,0 +1,133 @@
+
+
+
+
+
+ Holds standoff markup links
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Generated segment.
+
+
+
+
+
+
+
+
+
+ Type of segment generation that is required.
+
+
+
+
+
+
+
+
+
+
+
+ Test that the document has a main title
+
+ A main title is required.
+
+
+
+
+ Marks a section of text, which may be included, depending on the result of a conditional evaluation.
+
+
+
+
+
+
+
+
+
+ Contains a proper name for the Deity.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/opensiddur-server/src/schema/conditional-common.xml b/opensiddur-server/src/schema/conditional-common.xml
new file mode 100644
index 00000000..24d3dcb1
--- /dev/null
+++ b/opensiddur-server/src/schema/conditional-common.xml
@@ -0,0 +1,194 @@
+
+
+
+
+ groups elements that function as evaluable conditionals``
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Holds a single condition
+
+
+
+
+
+ Required unique identifier
+
+
+
+
+
+
+
+
+ Holds statements of conditions that can be evaluated by the conditional system.
+
+
+
+
+
+
+
+
+
+
+
+ Holds feature structures that are evaluated as settings
+
+
+
+
+
+
+
+
+
+
+
+
+ Either the settings block has @xml:id or
+ @xml:id is required to reference settings feature structures inside a settings block
+
+
+
+
+
+
+ Conditional value "yes"
+
+
+
+
+
+
+
+
+ Conditional value "no"
+
+
+
+
+
+
+
+
+ Conditional value "maybe". Indicates that if a text is included, it should be
+ included with associated instructional text and/or formatting features that indicate
+ a condition.
+
+
+
+
+
+
+
+
+ Conditional value "on"
+
+
+
+
+
+
+
+
+ Conditional value "off"
+
+
+
+
+
+
+
+
+ Indicates that the conditional should evaluate to yes or maybe if any of the subordinate feature values do.
+ If any of the conditions evaluate to yes, any evaluates to yes.
+ If any of the conditions evaluate to maybe and none evaluate to yes, any evaluates to maybe.
+ If all of the conditions evaluate to no, any evaluates to no.
+
+
+
+
+
+
+
+
+
+
+
+ Indicates that the conditional should evaluate to YES/MAYBE if all of the subordinate feature values are.
+ If any of the conditions evaluate to no, all evaluates to no.
+ If all of the conditions evaluate to yes or maybe, all evaluates to maybe.
+ If all of the conditions evaluate to yes, all evaluates to yes.
+
+
+
+
+
+
+
+
+
+
+
+ Indicates that the conditional should evaluate to YES/MAYBE if exactly one of the subordinate feature values do.
+ If one of the conditions evaluates to yes and all others evaluate to no, oneOf evaluates to yes.
+ If one of the conditions evaluates to maybe and all others evaluate to no, oneOf evaluates to maybe.
+ If all of the conditions evaluate to no, oneOf evaluates to no.
+
+
+
+
+
+
+
+
+
+
+
+ Indicates that the conditional should evaluate to the negation of its content.
+ not yes is no. not no is yes. not maybe is maybe.
+
+
+
+
+
+
+
+
+
diff --git a/opensiddur-server/src/schema/conditional.xml b/opensiddur-server/src/schema/conditional.xml
new file mode 100644
index 00000000..69d49334
--- /dev/null
+++ b/opensiddur-server/src/schema/conditional.xml
@@ -0,0 +1,188 @@
+
+
+
+
+
+ Conditional XML
+ Efraim Feinstein
+ Syd Bauman
+ Lou Burnard
+ Sebastian Rahtz
+
+
+
+
+
+
+
+ http://jewishliturgy.org/ns/jlptei/1.0
+
+
+
Initially created on Thursday 12th
+ October 2006 by the form at
+ http://www.tei-c.org.uk/Roma/.
+
+
+
+ Modify for conditional schema
+ Change bare TEI ODD to JLPTEI
+ rewrite as new-style ODD
+ Removed further elements added
+since this ODD was first created
+ Added prose and reorganized
+structure to make it more document-like; changed deletion of attribute
+decls into deletion of att.declaring class; add deletes for elements
+email and floatingText added to P5 since this ODD was first created;
+considered but did not implement removal of all irrelevant datatype specs...
+ Made valid: removed empty prefix attributeadded required type attribute to
+ classSpecsAlso
+ removed extraneous altIdent elements, improved
+ sourceDesc, changed the ident of schemaSpec
+ to match the filename, and added this revision description.
+
+
+
+
+
+
+ The conditional system
+
The conditional system involves 3 parts:
+
+ Conditional type declarations, which define what conditions
+ are used, and provide natural-language descriptions of them.
+ Conditional types are declared in separate files in fsdDecl
+ blocks.
+ Conditional associations, declared inside conditions blocks,
+ which specify under what conditions a given text should be included.
+ Conditional settings, declared inside conditions blocks,
+ which specify what conditions should be applied if any
+ conditional associations are encountered.
+
+
Conditional settings are linked to text using link, where type="set".
+ Conditional associations are linked to text using link, where type="associate".
In Open Siddur, unlike standard TEI, if no condition matches, an additional, optional default value may be specified after all the if elements
+
+
+ Declares a feature as a switch
+
+
+
+
+
+ Type of switch
+
+
+ Two-way yes|no switch
+
+
+ Three-way yes|no|maybe switch
+
+
+ Two-way on|off switch
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/schema/contributor.xml b/opensiddur-server/src/schema/contributor.xml
similarity index 100%
rename from schema/contributor.xml
rename to opensiddur-server/src/schema/contributor.xml
diff --git a/opensiddur-server/src/schema/dictionary.xml b/opensiddur-server/src/schema/dictionary.xml
new file mode 100644
index 00000000..b80ca887
--- /dev/null
+++ b/opensiddur-server/src/schema/dictionary.xml
@@ -0,0 +1,83 @@
+
+
+
+
+
+ Open Siddur Dictionary TEI extension
+ Efraim Feinstein
+ Syd Bauman
+ Lou Burnard
+ Sebastian Rahtz
+
+
+
+
+
+
+
+ http://jewishliturgy.org/ns/jlptei/1.0
+
+
+
Initially created on Thursday 12th
+ October 2006 by the form at
+ http://www.tei-c.org.uk/Roma/.
+
+
+
+ Modify for dictionary schema
+ Change bare TEI ODD to JLPTEI
+ rewrite as new-style ODD
+ Removed further elements added
+since this ODD was first created
+ Added prose and reorganized
+structure to make it more document-like; changed deletion of attribute
+decls into deletion of att.declaring class; add deletes for elements
+email and floatingText added to P5 since this ODD was first created;
+considered but did not implement removal of all irrelevant datatype specs...
+ Made valid: removed empty prefix attributeadded required type attribute to
+ classSpecsAlso
+ removed extraneous altIdent elements, improved
+ sourceDesc, changed the ident of schemaSpec
+ to match the filename, and added this revision description.
+
+
+
+
+
+
+
+
+
+
+
diff --git a/schema/group.rnc b/opensiddur-server/src/schema/group.rnc
similarity index 79%
rename from schema/group.rnc
rename to opensiddur-server/src/schema/group.rnc
index 7c38615c..d3b9a3fd 100644
--- a/schema/group.rnc
+++ b/opensiddur-server/src/schema/group.rnc
@@ -6,6 +6,12 @@ default namespace = "http://jewishliturgy.org/ns/group/1.0"
start = Group
+# The description element holds an optional description of
+# the group
+Description = element description {
+ xsd:string?
+}
+
# The member element holds the user name of a member,
# manager is true if the member is a group manager, false or nonexistent otherwise
Member = element member {
@@ -15,7 +21,6 @@ Member = element member {
# the group element holds a list of members
Group = element group {
+ Description?,
Member*
}
-
-
diff --git a/opensiddur-server/src/schema/jlptei.xml b/opensiddur-server/src/schema/jlptei.xml
new file mode 100644
index 00000000..8ea91080
--- /dev/null
+++ b/opensiddur-server/src/schema/jlptei.xml
@@ -0,0 +1,336 @@
+
+
+
+
+
+ Open Siddur Jewish Liturgy TEI extension
+ Efraim Feinstein
+ Syd Bauman
+ Lou Burnard
+ Sebastian Rahtz
+
+
+
+
+
+
+
+ http://jewishliturgy.org/ns/jlptei/1.0
+
+
+
Initially created on Thursday 12th
+ October 2006 by the form at
+ http://www.tei-c.org.uk/Roma/.
+
+
+
+ Change bare TEI ODD to JLPTEI
+ rewrite as new-style ODD
+ Removed further elements added
+since this ODD was first created
+ Added prose and reorganized
+structure to make it more document-like; changed deletion of attribute
+decls into deletion of att.declaring class; add deletes for elements
+email and floatingText added to P5 since this ODD was first created;
+considered but did not implement removal of all irrelevant datatype specs...
+ Made valid: removed empty prefix attributeadded required type attribute to
+ classSpecsAlso
+ removed extraneous altIdent elements, improved
+ sourceDesc, changed the ident of schemaSpec
+ to match the filename, and added this revision description.
+
+
+
+
+
+
+
+
This customization produces an extension usable in tagging Jewish liturgy for the Open Siddur Project.
+
Introduction
+On the most basic level, the siddur is simple text. As such, on first thought, a transcription of the material on a wiki, in a word processor document, or in a text file would seem sufficient for its representation. If that is the case, why define an XML encoding? And why does JLPTEI require the features it does? This introduction addresses the essential problems in representing the Jewish liturgy on a computer and how JLPTEI approaches the problems. It also gives the reasons behind some of the tradeoffs that were made in the design of JLPTEI.
+JLPTEI is a technical means to achieving the Open Siddur Project's Mission Statement. As such, it must support "texts and supplemental material that may be accessed, shared, adapted, and improved on by the entire Jewish community," "a non-prescriptive attitude towards the manner in which individuals and communities engage tradition," "pluralism that reflects the multiplicity of creative expressions possible," and "awareness of historical, geographical, and philosophical diversity in Jewish communities." Respect for communal and individual diversity is at the core of the Open Siddur/Jewish Liturgy Project's mission, and guides the project's technological vision.
+There is no such thing as a single text called The Siddur. On the broadest scale, siddur texts may be divided by rite (nusah). However, even accepting that there are multiple base texts, neither is there a single Ashkenazic siddur, Hasidic siddur, Sephardic siddur, etc. A rite is a major division which uniquely specifies a common denominator of customs within a group of customs. Within Ashkenaz, there are differences between the Polish and German customs. The Iraqi custom is not the same as the Yemenite custom, and the Lubavitch custom is not the same as the Breslov custom. There are also divisions within each rite along major the philosophical boundaries that have developed in recent centuries, which lead to differences in custom and text. The traditional-egalitarian rite (usually a variant of the Ashkenazic rite), for example, is still undergoing major evolution. As such, it is impossible to maintain a single source text. It is possible to maintain a bank of source texts, calling each one by the name of a given rite. The latter is the approach taken by many vendors, who will sell an electronic edition of a base-text siddur from a given rite. However, from a philosophical perspective, that approach fails to recognize diversity within Jewish communities, and essentially requires the project to canonize one text over another in the distributed version. Further, from a technical perspective, as more base texts are completed, the project becomes unscalable; with many copies of common texts in the archive, both correcting mistakes and remixing content in novel ways become increasingly difficult.
+In addition, a modern siddur is expected to contain more than simple text. Aligned translations and transliterations and linked commentaries are usual fare. Some siddurim also contain art. As an online project, we also have the opportunity to link additional non-textual material, such as audio or video.
+As a member of the community at large, it is also important to maintain a chain of credit and responsibility for our contributors, and a chain of bibliographic credit for ideas. This necessarily involves maintaining a great deal of metadata in addition to the texts and supplementary material.
+The Open Siddur, therefore, takes a different approach, which is realized in the JLPTEI design. This approach involves (1) minimizing the amount of stored text, (2) storing the differences between the texts and (3) having user-selectable sets of conditions that specify when each variant is selected. If a typo is corrected in one variant, it is naturally corrected for all variants. Any stored metadata is also automatically consistent between all texts. An additional advantage of this approach is that a community with a custom that differs from the “base” custom of the rite only has to make a different choice of variants. No change is required in the text in order to support a slightly differing custom.
+Aside from text versioning, a second major problem in representation is what should be represented. A user working on a word processor or desktop publishing system would first consider presentation. What is considered good presentation form is up to individual taste, and tastes are expected to change far more rapidly than the text. In a system intended for universal use, we must encode, along with the text, sufficient information to present the text. What we encode, however, should be intrinsic to the text, not to any aspect of its presentation. Separating the encoding of document structure from its presentation allows each user to make the presentation conform to his/her own tastes without duplicating effort on the encoding side.
+The primary question then becomes: which structure should be encoded? Prose can be divided into paragraphs and sentences, poetic text can be divided into line groups and verse lines, lists into items and lists, etc. Many parts of the siddur have more than one structure on the same text! XML assumes that a document has a pure hierarchical tree structure. This suggests that XML is not an appropriate encoding technology for the siddur. At the same time, XML encoding is nearly universally standard and more software tools support XML-based formats than other encoding formats. One of the primary innovations of JLPTEI is its particular encoding of concurrent structural hierarchies. While the idea is not novel, the implementation is. The potential for the existence of concurrent structure is a guiding force in JLPTEI design.
+The disadvantage of JLPTEI's encoding solutions is that the archival form of the text is not immediately consumable by humans. We are forced to rely extensively on processing software to make the format editable and displayable. The disadvantage, however, is balanced by the encoding format's extensibility and conservation of human labor.
+The Open Siddur intends to work within open standards whenever possible. In choosing a basis for our encoding, we searched for available encoding standards that would suit our purposes. We seriously considered using Open Scripture Information Standard (OSIS), an XML format used for encoding bibles. It was quickly discovered that representations of some of the more advanced features required to encode the liturgy (such as those discussed above) would have to be "hacked" on top of the standard. The Text Encoding Initiative (TEI) XML format is a de-facto standard within the digital humanities community. It is also is specified in well-documented texts, is actively supported by tools, and has a large community built around its use and development. Further, the standard is deliberately extensible using a relatively simple mechanism. The TEI was therefore a natural choice as a basis for our encoding.
+
+
+ File structure
+
+
+
+ The header
+
+
+
+
+
+ Basic text structure
+
+
+
+ The text stream
+
+
+
+
+ Concurrent text hierarchies
+
+
+
+ Translations and parallel texts
+
+
+
+ Instructions and annotations
+
+
+
+ Conditional texts
+
+
+
+
+
+
+
+ Citations
+
+
+
+ Support files
+
+
+ Transliteration
+
+
+
Have their own schemas
+
+
+
+
+ Formal declaration
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Indicates the portion of a text that is read in read-written (kri-ktiv) choice.
+
+
+
+
+
+
+
+
+
+ Indicates the part of a text that is written
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ A hierarchic layer of text. @type should indicate what layer is being provided, and all the top level contained elements should be consistent with that type.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Indicates what type of hierarchic layer is being constructed
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Only internal pointers are allowed inside concurrent structures
+
+
+ All pointers in layers must point into the text stream.
+
+
+
+
+
+ A list of concurrent hierarchies of one or more layers.
+
+
+
+
+
+
+
+
+
+
+ A continuous stream of text, suitable for concurrent hierarchies.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ j:streamText requires an @xml:id attribute.
+
+
+
+
+ An @xml:id attribute is required on all anchor elements in a text stream.
+
+
+
+
+
Initially created on Thursday 12th
+ October 2006 by the form at
+ http://www.tei-c.org.uk/Roma/.
+
+
+
+ Update for translation linkage documents
+ Change bare TEI ODD to JLPTEI
+ rewrite as new-style ODD
+ Removed further elements added
+since this ODD was first created
+ Added prose and reorganized
+structure to make it more document-like; changed deletion of attribute
+decls into deletion of att.declaring class; add deletes for elements
+email and floatingText added to P5 since this ODD was first created;
+considered but did not implement removal of all irrelevant datatype specs...
+ Made valid: removed empty prefix attributeadded required type attribute to
+ classSpecsAlso
+ removed extraneous altIdent elements, improved
+ sourceDesc, changed the ident of schemaSpec
+ to match the filename, and added this revision description.
+
+
+
+
+
+
+
+
+ Translations and parallel texts
+
+
A parallel text document may have introductory material
+ in the front element and concluding material
+ in the back element. The main content is one or
+ more parallelText elements, each of which contains
+ a single parallelization of a text.
+
+
+ Formal declaration
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ The main body element for a text that consists of a parallelization of multiple texts.
+ Multiple parallelizations of the same text may be in the same document. The parallelization is
+ identified by one or more tei:idno elements (the database identifier[s] of the translation, for example),
+ and accomplished by tei:linkGrp elements
+
+
+ The segmentation level at which the parallelization is done, for example, segment, verse, paragraph, line-group, line, etc. Use one of the recommended values unless none of them makes sense.
+
+
+
+ other
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ tei:parallelText/tei:linkGrp must specify domains that point to j:streamText elements
+
+
+
+
+ every link must have an equal number of links to its parent linkGrp's @domains
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/opensiddur-server/src/schema/outline.rnc b/opensiddur-server/src/schema/outline.rnc
new file mode 100644
index 00000000..aef657fa
--- /dev/null
+++ b/opensiddur-server/src/schema/outline.rnc
@@ -0,0 +1,114 @@
+# Outline definition schema
+# Copyright 2016 Efraim Feinstein
+# Licensed under the GNU Lesser General Public License, version 3 or later
+
+default namespace = "http://jewishliturgy.org/ns/outline/1.0"
+
+# olx namespace is used as a response by the server or a response to
+# a server "query"
+namespace olx = "http://jewishliturgy.org/ns/outline/responses/1.0"
+
+start = Outline
+
+## acknowledge "yes" that what the server flagged is what you intend to do
+## For example, server says that item is the same as another item.
+Yes = element olx:yes {
+ empty
+}
+
+## Acknowledge "no" that what the server flagged as the same is not and should be
+## treated as a new document
+No = element olx:no {
+ empty
+}
+
+## The element has an error that can't be recovered from
+Error = element olx:error {
+ xsd:string
+}
+
+## The element has a warning that can be ignored
+Warning = element olx:warning {
+ xsd:string
+}
+
+Title = element title { xsd:string }
+License = element license {
+ "http://www.creativecommons.org/publicdomain/zero/1.0" |
+ "http://www.creativecommons.org/licenses/by/4.0" |
+ "http://www.creativecommons.org/licenses/by-sa/4.0"
+}
+
+Lang = element lang { xsd:language }
+Resp = element resp {
+ ## contributor URI
+ element contributor { xsd:anyURI },
+ ## responsibility code
+ element responsibility {
+ "ann" | "fac" | "fnd" | "mrk" | "pfr" | "spn" | "trc" | "trl"
+ }
+ }
+
+Pages = (
+ element from {
+ xsd:string
+ },
+ element to {
+ xsd:string
+ }
+)
+
+## Document is the same as another document
+SameAs = element olx:sameAs {
+ ## URI of the other document
+ Uri,
+ ## Acknowlegement/refusal of identity
+ ## required for execution
+ (Yes | No)?,
+ ## potential warnings
+ Warning*
+}
+
+## Point to an existing document
+Uri = element olx:uri {
+ xsd:string
+}
+
+Status = element olx:status {
+ xsd:string
+}
+
+Outline = element outline {
+ ## required source pointer
+ element source { xsd:anyURI },
+ ## default license
+ License,
+ ## required title
+ Title,
+ ## required language (default for all documents)
+ Lang,
+ ## optional responsibility blocks to assign additional responsibility to contributors
+ Resp*,
+ Pages?,
+ ## Uri of the existing outline file
+ Uri?,
+ ## status of the outline file (if outlined or greater, will mean that the outline has been executed/edited)
+ Status?,
+ ## additional items
+ Item+
+}
+
+## each item in the outline has a title
+Item = element item {
+ ## file-unique ID for the item
+ Title,
+ Lang?,
+ Resp*,
+ ## from and to pages
+ Pages?,
+ SameAs*,
+ (Error|Warning)*,
+ ## current document status, if any
+ Status?,
+ Item*
+}
diff --git a/opensiddur-server/src/schema/style.xml b/opensiddur-server/src/schema/style.xml
new file mode 100644
index 00000000..d934e3cd
--- /dev/null
+++ b/opensiddur-server/src/schema/style.xml
@@ -0,0 +1,143 @@
+
+
+
+
+
+ Style documents
+ Efraim Feinstein
+ Syd Bauman
+ Lou Burnard
+ Sebastian Rahtz
+
+
+
+
+
+
+
+ http://jewishliturgy.org/ns/jlptei/1.0
+
+
+
Initially created on Thursday 12th
+ October 2006 by the form at
+ http://www.tei-c.org.uk/Roma/.
+
+
+
+ Update to style schema
+ Update for translation linkage documents
+ Change bare TEI ODD to JLPTEI
+ rewrite as new-style ODD
+ Removed further elements added
+since this ODD was first created
+ Added prose and reorganized
+structure to make it more document-like; changed deletion of attribute
+decls into deletion of att.declaring class; add deletes for elements
+email and floatingText added to P5 since this ODD was first created;
+considered but did not implement removal of all irrelevant datatype specs...
+ Made valid: removed empty prefix attributeadded required type attribute to
+ classSpecsAlso
+ removed extraneous altIdent elements, improved
+ sourceDesc, changed the ident of schemaSpec
+ to match the filename, and added this revision description.
+
+
+
+
+
+
+
+
+ Styles
+
+
A style document is a container for stylesheets intended
+ to control visual rendering of Open Siddur TEI documents.
+ The document contains a normal metadata header, and a stylesheet
+ element, which contains styling information in a formatting language,
+ such as CSS. The language is specified in the scheme attribute.
+ The documents may contain a text section describing the style in
+ a text/body element.
+
+
+
diff --git a/schema/templates/bibliography-template.xml b/opensiddur-server/src/schema/templates/bibliography-template.xml
similarity index 96%
rename from schema/templates/bibliography-template.xml
rename to opensiddur-server/src/schema/templates/bibliography-template.xml
index 5c42ed7d..09fca2a5 100644
--- a/schema/templates/bibliography-template.xml
+++ b/opensiddur-server/src/schema/templates/bibliography-template.xml
@@ -15,7 +15,6 @@
for multiple titles, use the type="main" attribute to designate the main
title. Alternate titles MAY be designated with type="alt"
-->
-
+
-
+
diff --git a/schema/transliteration.sch b/opensiddur-server/src/schema/transliteration.isosch
similarity index 100%
rename from schema/transliteration.sch
rename to opensiddur-server/src/schema/transliteration.isosch
diff --git a/schema/transliteration.rnc b/opensiddur-server/src/schema/transliteration.rnc
similarity index 100%
rename from schema/transliteration.rnc
rename to opensiddur-server/src/schema/transliteration.rnc
diff --git a/opensiddur-server/src/static/Speaker_Icon.svg b/opensiddur-server/src/static/Speaker_Icon.svg
new file mode 100644
index 00000000..2613b893
--- /dev/null
+++ b/opensiddur-server/src/static/Speaker_Icon.svg
@@ -0,0 +1,30 @@
+
+
\ No newline at end of file
diff --git a/opensiddur-server/src/static/cc-by-sa.svg b/opensiddur-server/src/static/cc-by-sa.svg
new file mode 100644
index 00000000..39062d49
--- /dev/null
+++ b/opensiddur-server/src/static/cc-by-sa.svg
@@ -0,0 +1,126 @@
+
+
+
+
\ No newline at end of file
diff --git a/opensiddur-server/src/static/cc-by.svg b/opensiddur-server/src/static/cc-by.svg
new file mode 100644
index 00000000..33460083
--- /dev/null
+++ b/opensiddur-server/src/static/cc-by.svg
@@ -0,0 +1,104 @@
+
+
+
+
\ No newline at end of file
diff --git a/opensiddur-server/src/static/cc-publicdomain.svg b/opensiddur-server/src/static/cc-publicdomain.svg
new file mode 100644
index 00000000..5718ef03
--- /dev/null
+++ b/opensiddur-server/src/static/cc-publicdomain.svg
@@ -0,0 +1,4 @@
+
+
\ No newline at end of file
diff --git a/opensiddur-server/src/static/cc-zero.svg b/opensiddur-server/src/static/cc-zero.svg
new file mode 100644
index 00000000..b9226a57
--- /dev/null
+++ b/opensiddur-server/src/static/cc-zero.svg
@@ -0,0 +1,124 @@
+
+
+
+
\ No newline at end of file
diff --git a/opensiddur-server/src/system/config/db/cache/status/collection.xconf b/opensiddur-server/src/system/config/db/cache/status/collection.xconf
new file mode 100644
index 00000000..f5559781
--- /dev/null
+++ b/opensiddur-server/src/system/config/db/cache/status/collection.xconf
@@ -0,0 +1,15 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/opensiddur-server/src/system/config/db/collection.xconf b/opensiddur-server/src/system/config/db/collection.xconf
new file mode 100644
index 00000000..cc0c2e2b
--- /dev/null
+++ b/opensiddur-server/src/system/config/db/collection.xconf
@@ -0,0 +1,23 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/opensiddur-server/src/system/config/db/data/conditionals/collection.xconf b/opensiddur-server/src/system/config/db/data/conditionals/collection.xconf
new file mode 100644
index 00000000..cbec0ac6
--- /dev/null
+++ b/opensiddur-server/src/system/config/db/data/conditionals/collection.xconf
@@ -0,0 +1,29 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/opensiddur-server/src/system/config/db/data/dictionaries/en/collection.xconf b/opensiddur-server/src/system/config/db/data/dictionaries/en/collection.xconf
new file mode 100644
index 00000000..07409c85
--- /dev/null
+++ b/opensiddur-server/src/system/config/db/data/dictionaries/en/collection.xconf
@@ -0,0 +1,35 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/opensiddur-server/src/system/config/db/data/dictionaries/he/collection.xconf b/opensiddur-server/src/system/config/db/data/dictionaries/he/collection.xconf
new file mode 100644
index 00000000..8cc23d1c
--- /dev/null
+++ b/opensiddur-server/src/system/config/db/data/dictionaries/he/collection.xconf
@@ -0,0 +1,35 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/opensiddur-server/src/system/config/db/data/linkage/collection.xconf b/opensiddur-server/src/system/config/db/data/linkage/collection.xconf
new file mode 100644
index 00000000..e7f34ada
--- /dev/null
+++ b/opensiddur-server/src/system/config/db/data/linkage/collection.xconf
@@ -0,0 +1,40 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/opensiddur-server/src/system/config/db/data/linkage/en/collection.xconf b/opensiddur-server/src/system/config/db/data/linkage/en/collection.xconf
new file mode 100644
index 00000000..fb22d00e
--- /dev/null
+++ b/opensiddur-server/src/system/config/db/data/linkage/en/collection.xconf
@@ -0,0 +1,37 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/opensiddur-server/src/system/config/db/data/linkage/he/collection.xconf b/opensiddur-server/src/system/config/db/data/linkage/he/collection.xconf
new file mode 100644
index 00000000..5dd89285
--- /dev/null
+++ b/opensiddur-server/src/system/config/db/data/linkage/he/collection.xconf
@@ -0,0 +1,38 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/opensiddur-server/src/system/config/db/data/notes/en/collection.xconf b/opensiddur-server/src/system/config/db/data/notes/en/collection.xconf
new file mode 100644
index 00000000..f76f7761
--- /dev/null
+++ b/opensiddur-server/src/system/config/db/data/notes/en/collection.xconf
@@ -0,0 +1,36 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/opensiddur-server/src/system/config/db/data/notes/he/collection.xconf b/opensiddur-server/src/system/config/db/data/notes/he/collection.xconf
new file mode 100644
index 00000000..fcf60576
--- /dev/null
+++ b/opensiddur-server/src/system/config/db/data/notes/he/collection.xconf
@@ -0,0 +1,36 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/opensiddur-server/src/system/config/db/data/original/en/collection.xconf b/opensiddur-server/src/system/config/db/data/original/en/collection.xconf
new file mode 100644
index 00000000..19849fb6
--- /dev/null
+++ b/opensiddur-server/src/system/config/db/data/original/en/collection.xconf
@@ -0,0 +1,48 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/opensiddur-server/src/system/config/db/data/original/he/collection.xconf b/opensiddur-server/src/system/config/db/data/original/he/collection.xconf
new file mode 100644
index 00000000..bccf5dba
--- /dev/null
+++ b/opensiddur-server/src/system/config/db/data/original/he/collection.xconf
@@ -0,0 +1,46 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/opensiddur-server/src/system/config/db/data/outlines/collection.xconf b/opensiddur-server/src/system/config/db/data/outlines/collection.xconf
new file mode 100644
index 00000000..dabb82b7
--- /dev/null
+++ b/opensiddur-server/src/system/config/db/data/outlines/collection.xconf
@@ -0,0 +1,15 @@
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/opensiddur-server/src/system/config/db/data/sources/collection.xconf b/opensiddur-server/src/system/config/db/data/sources/collection.xconf
new file mode 100644
index 00000000..abd84829
--- /dev/null
+++ b/opensiddur-server/src/system/config/db/data/sources/collection.xconf
@@ -0,0 +1,22 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/opensiddur-server/src/system/config/db/data/styles/collection.xconf b/opensiddur-server/src/system/config/db/data/styles/collection.xconf
new file mode 100644
index 00000000..29f3fd1b
--- /dev/null
+++ b/opensiddur-server/src/system/config/db/data/styles/collection.xconf
@@ -0,0 +1,33 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/opensiddur-server/src/system/config/db/data/transliteration/collection.xconf b/opensiddur-server/src/system/config/db/data/transliteration/collection.xconf
new file mode 100644
index 00000000..d62f8c54
--- /dev/null
+++ b/opensiddur-server/src/system/config/db/data/transliteration/collection.xconf
@@ -0,0 +1,10 @@
+
+
+
+
+
+
+
+
+
diff --git a/opensiddur-server/src/system/config/db/data/user/collection.xconf b/opensiddur-server/src/system/config/db/data/user/collection.xconf
new file mode 100644
index 00000000..33f7a9e5
--- /dev/null
+++ b/opensiddur-server/src/system/config/db/data/user/collection.xconf
@@ -0,0 +1,23 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/opensiddur-server/src/system/config/db/docindex/collection.xconf b/opensiddur-server/src/system/config/db/docindex/collection.xconf
new file mode 100644
index 00000000..9c965ce9
--- /dev/null
+++ b/opensiddur-server/src/system/config/db/docindex/collection.xconf
@@ -0,0 +1,21 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/opensiddur-server/src/system/config/db/refindex/collection.xconf b/opensiddur-server/src/system/config/db/refindex/collection.xconf
new file mode 100644
index 00000000..c44a8b11
--- /dev/null
+++ b/opensiddur-server/src/system/config/db/refindex/collection.xconf
@@ -0,0 +1,18 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/opensiddur-server/src/test/tcommon.xqm b/opensiddur-server/src/test/tcommon.xqm
new file mode 100644
index 00000000..ed195855
--- /dev/null
+++ b/opensiddur-server/src/test/tcommon.xqm
@@ -0,0 +1,327 @@
+xquery version "3.1";
+
+(:~
+: Common tests
+:
+: Copyright 2019 Efraim Feinstein
+: Open Siddur Project
+: Licensed under the GNU Lesser General Public License, version 3 or later
+:)
+
+module namespace tcommon = "http://jewishliturgy.org/test/tcommon";
+
+declare namespace tei="http://www.tei-c.org/ns/1.0";
+declare namespace j="http://jewishliturgy.org/ns/jlptei/1.0";
+declare namespace html="http://www.w3.org/1999/xhtml";
+declare namespace http="http://expath.org/ns/http-client";
+declare namespace rest="http://exquery.org/ns/restxq";
+declare namespace output="http://www.w3.org/2010/xslt-xquery-serialization";
+
+import module namespace deepequality="http://jewishliturgy.org/modules/deepequality"
+ at "../modules/deepequality.xqm";
+import module namespace data="http://jewishliturgy.org/modules/data"
+ at "../modules/data.xqm";
+import module namespace didx="http://jewishliturgy.org/modules/docindex"
+ at "../modules/docindex.xqm";
+import module namespace format="http://jewishliturgy.org/modules/format"
+ at "../modules/format.xqm";
+import module namespace magic="http://jewishliturgy.org/magic"
+ at "../magic/magic.xqm";
+import module namespace ridx="http://jewishliturgy.org/modules/refindex"
+ at "../modules/refindex.xqm";
+import module namespace user="http://jewishliturgy.org/api/user"
+ at "../api/user.xqm";
+
+(:~ test if a given returned index has a discovery API, return an error if it doesn't :)
+declare function tcommon:contains-discovery-api(
+ $result as item()*
+ ) as element()? {
+ let $test := $result/self::html:html/html:body/*[@class="apis"]/html:li[@class="api"]/html:a[@class="discovery"]
+ where empty($test)
+ return {$result}
+};
+
+(:~ test if a given returned result contains search results, otherwise, return errors :)
+declare function tcommon:contains-search-results(
+ $result as item()*
+) as element()* {
+ if ($result/self::rest:response/output:serialization-parameters/output:method="xhtml")
+ then ()
+ else {$result},
+ if (empty($result//html:head/@profile))
+ then ()
+ else {$result},
+ if (count($result//html:meta[@name='startIndex'])=1)
+ then ()
+ else {$result},
+ if (count($result//html:meta[@name='endIndex'])=0)
+ then ()
+ else {$result},
+ if (count($result//html:meta[@name='totalResults'])=1)
+ then ()
+ else {$result},
+ if (count($result//html:meta[@name='itemsPerPage'])=1)
+ then ()
+ else {$result}
+};
+
+(:~ test is a Not Found response :)
+declare function tcommon:not-found($result as item()*) as element()? {
+ let $test := $result/self::rest:response/http:response/@status = 404
+ where empty($test)
+ return {$result}
+};
+
+(:~ test if result contains a no data response :)
+declare function tcommon:no-data($result as item()*) as element()* {
+ if ($result/self::rest:response/http:response/@status = 204)
+ then ()
+ else {$result},
+ if ($result/self::rest:response/output:serialization-parameters/output:method = "text")
+ then ()
+ else {$result}
+};
+
+(:~ test if a resource has a created response :)
+declare function tcommon:created($result as item()*) as element()* {
+ if ($result/self::rest:response/http:response/@status = 201)
+ then ()
+ else {$result},
+ if (exists($result/self::rest:response/http:response/http:header[@name="Location"][@value]))
+ then ()
+ else {$result}
+};
+
+(:~ test if result contains a forbidden response :)
+declare function tcommon:forbidden($result as item()*) as element()* {
+ if ($result/self::rest:response/http:response/@status = 403)
+ then ()
+ else {$result}
+};
+
+(:~ test if result contains a bad request response :)
+declare function tcommon:bad-request($result as item()*) as element()* {
+ if ($result/self::rest:response/http:response/@status = 400)
+ then ()
+ else {$result}
+};
+
+(:~ test if result contains an unauthorized response :)
+declare function tcommon:unauthorized($result as item()*) as element()* {
+ if ($result/self::rest:response/http:response/@status = 401)
+ then ()
+ else {$result}
+};
+
+(:~ test if an HTML5 serialization command is included :)
+declare function tcommon:serialize-as-html5($result as item()*) as element()? {
+ let $test := $result/self::rest:response/output:serialization-parameters/output:method="xhtml"
+ where empty($test)
+ return {$result}
+};
+
+(:~ return a minimally "valid" TEI header :)
+declare function tcommon:minimal-valid-header(
+ $title as xs:string
+) as element(tei:teiHeader) {
+
+
+
+ {$title}
+
+
+
+ Open Siddur Project
+
+
+
+
+ 2020-01-01
+
+
+
+
+
+
+
+
+
+
+
+};
+
+(:~ set up a number $n of test users named xqtestN :)
+declare function tcommon:setup-test-users(
+ $n as xs:integer
+) {
+ for $i in 1 to $n
+ let $name := "xqtest" || string($i)
+ let $log := util:log-system-out("Setting up user " || $name)
+ let $creation :=
+ system:as-user("admin", $magic:password, (
+ let $create-account :=
+ if (not(sm:user-exists($name)))
+ then sm:create-account($name, $name, "everyone")
+ else ()
+ let $stored :=
+ xmldb:store($user:path,
+ concat($name, ".xml"),
+
+ {$name}
+
+ )
+ let $uri := xs:anyURI($stored)
+ let $chmod := sm:chmod($uri, "rw-r--r--")
+ let $chown := sm:chown($uri, $name)
+ let $chgrp := sm:chgrp($uri, $name)
+ let $didx := didx:reindex($user:path, $name || ".xml")
+ return ()
+ ))
+ return (
+ tcommon:wait-for("existence of user " || string($i),
+ function () { system:as-user("admin", $magic:password, sm:user-exists($name) ) } )
+ )
+};
+
+declare function tcommon:wait-for(
+ $desc as xs:string,
+ $condition as function() as xs:boolean
+) {
+ if (not($condition()))
+ then
+ let $log := util:log("info", "Waiting for " || $desc)
+ let $wait := util:wait(100)
+ return tcommon:wait-for($desc, $condition)
+ else ()
+};
+
+(:~ remove N test users :)
+declare function tcommon:teardown-test-users(
+ $n as xs:integer
+) {
+ for $i in 1 to $n
+ let $name := "xqtest" || string($i)
+ let $resource-name := $name || ".xml"
+ return
+ (: this duplicates code from user:delete, but makes sure that the user *always* gets deleted :)
+ system:as-user("admin", $magic:password, (
+ if (fn:doc-available($user:path || "/" || $resource-name))
+ then xmldb:remove($user:path, $resource-name)
+ else (),
+ if (sm:user-exists($name))
+ then (
+ for $member in sm:get-group-members($name)
+ return sm:remove-group-member($name, $member),
+ for $manager in sm:get-group-managers($name)
+ return sm:remove-group-manager($name, $manager),
+ sm:remove-account($name),
+ sm:remove-group($name) (: TODO: successor group is guest! until remove-group#2 exists@ :)
+ )
+ else (),
+ didx:remove($user:path, $resource-name),
+ ridx:remove($user:path, $resource-name)
+ ))
+};
+
+(:~ set up a resource as if it had been added by API :)
+declare function tcommon:setup-resource(
+ $resource-name as xs:string,
+ $data-type as xs:string,
+ $owner as xs:integer,
+ $content as item(),
+ $subtype as xs:string?,
+ $group as xs:string?,
+ $permissions as xs:string?
+) as xs:string {
+ let $log := util:log-system-out("setup " || $resource-name || " as " || string($owner))
+ let $resource-path := system:as-user("xqtest" || string($owner), "xqtest" || string($owner),
+ let $collection := string-join(("/db/data", $data-type, $subtype), "/")
+ let $resource := $resource-name || ".xml"
+ let $path := xmldb:store(
+ $collection, $resource, $content)
+ let $wait := tcommon:wait-for("Storing " || $path, function() { doc-available($path) })
+ let $didx := didx:reindex(doc($path))
+ let $ridx := ridx:reindex(doc($path))
+ let $xidx := system:as-user("admin", $magic:password, xmldb:reindex($collection, $resource))
+ let $log := util:log("info", "Saved " || $path || " as " || $owner)
+ return $path
+ )
+ let $change-group :=
+ if ($group)
+ then system:as-user("admin", $magic:password, sm:chgrp(xs:anyURI($resource-path), $group))
+ else ()
+ let $change-permissions :=
+ if ($permissions)
+ then system:as-user("admin", $magic:password, sm:chmod(xs:anyURI($resource-path), $permissions))
+ else ()
+ return $resource-path
+};
+
+declare function tcommon:setup-resource(
+ $resource-name as xs:string,
+ $data-type as xs:string,
+ $owner as xs:integer,
+ $content as item()
+) as xs:string {
+ tcommon:setup-resource($resource-name, $data-type, $owner, $content, (), (), ())
+};
+
+(:~ remove a test resource.
+ : $owner is -1 for admin
+ :)
+declare function tcommon:teardown-resource(
+ $resource-name as xs:string,
+ $data-type as xs:string,
+ $owner as xs:integer
+) {
+ system:as-user(
+ if ($owner=-1) then "admin" else ("xqtest" || string($owner)),
+ if( $owner=-1) then $magic:password else ("xqtest" || string($owner)),
+ let $probable-collection := "/db/data/" || $data-type
+ let $doc := data:doc($data-type, $resource-name)
+ let $doc-exists := exists($doc)
+ let $uri := if ($doc-exists) then fn:document-uri($doc) else xs:anyURI($probable-collection || "/" || $resource-name || ".xml")
+ let $collection := if ($doc-exists) then util:collection-name($doc) else $probable-collection
+ let $res := if ($doc-exists) then util:document-name($doc) else ($resource-name || ".xml")
+ return (
+ format:clear-caches($uri),
+ ridx:remove($collection, $res),
+ didx:remove($collection, $res),
+ if ($doc-exists) then xmldb:remove($collection, $res) else ()
+ )
+ )
+};
+
+(:~ return deep equality, using the convention of these tests:
+ : an error element is returned if the items are unequal, otherwise, empty :)
+declare function tcommon:deep-equal($node1 as node()*, $node2 as node()*) as element()? {
+ let $equality := deepequality:equal-or-error($node1, $node2)
+ where $equality/self::error
+ return $equality
+};
+
+(:~ create a collection path with the given permissions :)
+declare function tcommon:create-collection(
+ $name as xs:string,
+ $owner as xs:string,
+ $group as xs:string,
+ $permissions as xs:string
+) {
+ let $tokens := tokenize($name, "/")[.]
+ for $token at $ctr in $tokens
+ let $collection-so-far := "/" || string-join(subsequence($tokens, 1, $ctr), "/")
+ let $collection-origin := "/" || string-join(subsequence($tokens, 1, $ctr - 1), "/")
+ let $collection-new := $tokens[$ctr]
+ return
+ if (not(xmldb:collection-available($collection-so-far)))
+ then
+ system:as-user("admin", $magic:password, (
+ let $create := xmldb:create-collection($collection-origin, $collection-new)
+ let $owner := sm:chown(xs:anyURI($collection-so-far), $owner)
+ let $group := sm:chgrp(xs:anyURI($collection-so-far), $group)
+ let $perm := sm:chmod(xs:anyURI($collection-so-far), $permissions)
+ return ()
+ )
+ )
+ else ()
+};
\ No newline at end of file
diff --git a/opensiddur-server/src/transforms/combine.xqm b/opensiddur-server/src/transforms/combine.xqm
new file mode 100644
index 00000000..ccadb1cf
--- /dev/null
+++ b/opensiddur-server/src/transforms/combine.xqm
@@ -0,0 +1,815 @@
+xquery version "3.1";
+(:~
+ : Combine multiple documents into a single all-encompassing
+ : JLPTEI document
+ : Also add late-binding concerns, like transliteration
+ :
+ : Open Siddur Project
+ : Copyright 2013-2014,2016 Efraim Feinstein
+ : Licensed under the GNU Lesser General Public License, version 3 or later
+ :
+ :)
+module namespace combine="http://jewishliturgy.org/transform/combine";
+
+import module namespace common="http://jewishliturgy.org/transform/common"
+ at "../modules/common.xqm";
+import module namespace data="http://jewishliturgy.org/modules/data"
+ at "../modules/data.xqm";
+import module namespace uri="http://jewishliturgy.org/transform/uri"
+ at "../modules/follow-uri.xqm";
+import module namespace format="http://jewishliturgy.org/modules/format"
+ at "../modules/format.xqm";
+import module namespace mirror="http://jewishliturgy.org/modules/mirror"
+ at "../modules/mirror.xqm";
+import module namespace ridx="http://jewishliturgy.org/modules/refindex"
+ at "../modules/refindex.xqm";
+import module namespace debug="http://jewishliturgy.org/transform/debug"
+ at "../modules/debug.xqm";
+import module namespace cond="http://jewishliturgy.org/transform/conditionals"
+ at "conditionals.xqm";
+import module namespace flatten="http://jewishliturgy.org/transform/flatten"
+ at "flatten.xqm";
+import module namespace translit="http://jewishliturgy.org/transform/transliterator"
+ at "translit/translit.xqm";
+
+declare namespace tei="http://www.tei-c.org/ns/1.0";
+declare namespace j="http://jewishliturgy.org/ns/jlptei/1.0";
+declare namespace jf="http://jewishliturgy.org/ns/jlptei/flat/1.0";
+declare namespace tr="http://jewishliturgy.org/ns/tr/1.0";
+
+declare function combine:combine-document(
+ $doc as document-node(),
+ $params as map(*)
+ ) as document-node() {
+ combine:combine($doc, $params)
+};
+
+declare function combine:combine(
+ $nodes as node()*,
+ $params as map(*)
+ ) as node()* {
+ for $node in $nodes
+ return
+ typeswitch($node)
+ case document-node()
+ return document { combine:combine($node/node(), $params)}
+ case element(tei:teiHeader)
+ return $node
+ case element()
+ return
+ let $updated-params := combine:update-settings-from-standoff-markup($node, $params, false())
+ let $updated-params := combine:evaluate-conditions($node, $updated-params)
+ let $conditional-layer-id := combine:get-conditional-layer-id($node, $updated-params)
+ let $instruction := $updated-params("combine:conditional-instruction")
+ let $updated-params := map:remove($updated-params, "combine:conditional-instruction")
+ (: handling conditionals:
+ if $e/@jf:layer-id and combine:conditional-layers = OFF, NO, combine:combine($node/node(), $updated-params)
+ else if combine:conditional-result = OFF, NO -> () MAYBE -> evaluate instruction and add it
+ :)
+ return
+ if (
+ $node/@jf:layer-id
+ and $updated-params("combine:conditional-layers")($conditional-layer-id)=("NO", "OFF")
+ )
+ then
+ if ($node/descendant::*[@jf:stream])
+ then combine:combine($node/node(), $updated-params)
+ else ()
+ else if (not($updated-params("combine:conditional-result") = ("OFF", "NO")))
+ then
+ let $ret :=
+ typeswitch($node)
+ case element(tei:TEI)
+ return combine:tei-TEI($node, $params)
+ case element(tei:ptr)
+ return combine:tei-ptr($node, $updated-params)
+ (: TODO: add other model.resourceLike elements above :)
+ case element(jf:unflattened)
+ return combine:jf-unflattened($node, $updated-params)
+ case element(jf:parallelGrp)
+ return combine:jf-parallelGrp($node, $updated-params)
+ case element(j:segGen)
+ return combine:j-segGen($node, $updated-params)
+ case element(tei:seg)
+ return combine:tei-seg($node, $updated-params)
+ default (: other element :)
+ return combine:element($node, $updated-params)
+ let $annotation-sources := (
+ $instruction,
+ $node/@jf:annotation,
+ $node/self::jf:unflattened/ancestor::jf:parallel-document//jf:unflattened[not(. is $node)]/@jf:annotation
+ )
+ return
+ if (exists($annotation-sources) and
+ not($node[@jf:part]/preceding::*[@jf:part=$node/@jf:part]))
+ then
+ element {QName(namespace-uri($ret), name($ret))}{
+ $ret/@*,
+ for $al in $annotation-sources,
+ $an in tokenize($al, "\s+")
+ return
+ combine:follow-pointer(
+ $al/parent::*,
+ $an, $updated-params,
+ element jf:annotated { () },
+ if ($al is $instruction)
+ then ()
+ else combine:include-annotation#3
+ ),
+ $ret/node()
+ }
+ else $ret
+ else ()
+ default return $node
+};
+
+(:~ TEI is the root element :)
+declare function combine:tei-TEI(
+ $e as element(tei:TEI),
+ $params as map(*)
+ ) as element(tei:TEI) {
+ element { QName(namespace-uri($e), name($e)) }{
+ $e/@*,
+ combine:new-document-attributes((), $e),
+ combine:combine(
+ $e/node(),
+ combine:new-document-params($e, $params)
+ )
+ }
+};
+
+(:~ styles are set using the opensiddur->style parameter
+ : the content points to a style document
+ : @return a @jf:style attribute if the opensiddur->style parameter is set and
+ : something to prevent every element from having jf:style
+ :)
+declare function combine:associate-style(
+ $e as element(),
+ $params as map(*)
+ ) as node()? {
+ let $s := $params("combine:settings")
+ where empty($params("combine:styled")) and exists($s) and $s("opensiddur->style")
+ return
+ attribute jf:style { normalize-space($s("opensiddur->style")) }
+};
+
+(: call this after associate-style :)
+declare function combine:unset-style(
+ $params as map(*)
+ ) as map(*) {
+ map:put($params, "combine:styled", 1)
+};
+
+(:~ equivalent of a streamText, check for redirects, add style if necessary :)
+declare function combine:jf-unflattened(
+ $e as element(jf:unflattened),
+ $params as map(*)
+ ) as element(jf:combined) {
+ let $new-params := combine:unset-style($params)
+ return
+ element jf:combined {
+ $e/@*,
+ combine:associate-style($e, $params),
+ if ($e/ancestor::jf:parallel-document)
+ then
+ (: parallel texts cannot be redirected :)
+ combine:combine($e/node(), $new-params)
+ else
+ (: determine if we need a translation redirect
+ : this code will only result in a redirect if the translation settings are
+ : set in the same file as the streamText
+ :)
+ let $redirect := combine:translation-redirect($e, $e, $new-params)
+ return
+ if (exists($redirect))
+ then $redirect
+ else combine:combine($e/node(), $new-params)
+ }
+};
+
+(:~ seg handling: if the segment is inside a stream (or parallelGrp) directly and transliteration is on,
+ : it should be turned into a jf:transliterated/(tei:seg , tei:seg[@type=transliterated])
+ :)
+declare function combine:tei-seg(
+ $e as element(tei:seg),
+ $params as map(*)
+ ) as element() {
+ let $combined := combine:element($e, $params)
+ let $transliterated :=
+ if ($e/@jf:stream)
+ then combine:transliterate-in-place($combined, $e, $params)
+ else ()
+ return
+ if (exists($transliterated))
+ then
+ element jf:transliterated {
+ $combined,
+ element tei:seg {
+ $transliterated/(@* except (@type, @jf:id, @jf:stream)),
+ attribute type { "transliterated" },
+ $transliterated/node()
+ }
+ }
+ else $combined
+};
+
+declare function combine:j-segGen(
+ $e as element(j:segGen),
+ $params as map(*)
+ ) as element() {
+ let $combined := combine:element($e, $params)
+ let $transliterated := combine:transliterate-in-place($combined, $e, $params)
+ return
+ ($transliterated, $combined)[1]
+};
+
+declare function combine:element(
+ $e as element(),
+ $params as map(*)
+ ) as element() {
+ element {QName(namespace-uri($e), name($e))}{
+ $e/(@* except (@uri:*, @xml:id)),
+ if ($e/@xml:id)
+ then attribute jf:id { $e/@xml:id/string() }
+ else (),
+ combine:combine($e/node() ,$params)
+ }
+};
+
+(:~ a parallelGrp has to align the parallel from here and from the other parallel file :)
+declare function combine:jf-parallelGrp(
+ $e as element(jf:parallelGrp),
+ $params as map(*)
+ ) as element(jf:parallelGrp) {
+ element jf:parallelGrp {
+ $e/@*,
+ combine:combine($e/node(), $params),
+ let $this-parallelGrp := count($e/preceding-sibling::jf:parallelGrp) + 1
+ let $other-parallel-doc := root($e)/*/tei:TEI[not(. is $e/ancestor::tei:TEI)]
+ for $parallel in $other-parallel-doc//jf:unflattened/jf:parallelGrp[$this-parallelGrp]/jf:parallel
+ return
+ element jf:parallel {
+ combine:new-document-attributes($e, $parallel),
+ $parallel/@*,
+ combine:combine($parallel/node(), combine:new-document-params($parallel, $params))
+ }
+ }
+};
+
+(:~ attributes that change on any context switch :)
+declare function combine:new-context-attributes(
+ $context as node()?,
+ $new-context-nodes as node()*
+ ) as node()* {
+ let $new-lang-node := $new-context-nodes[not(@xml:lang)][1]
+ let $new-language := (
+ $new-lang-node/@uri:lang/string(),
+ if ($new-lang-node) then common:language($new-lang-node) else ()
+ )[1]
+ return
+ if (
+ $new-language and
+ ($context and common:language($context) != $new-language))
+ then
+ attribute xml:lang { $new-language }
+ else ()
+};
+
+(:~ return the children (attributes and possibly other nodes)
+ : that should be added when a document boundary is crossed
+ :)
+declare function combine:new-document-attributes(
+ $context as node()?,
+ $new-doc-nodes as node()*
+ ) as node()* {
+ let $document-path :=
+ if ($new-doc-nodes[1]/ancestor::jf:parallel-document)
+ then
+ (: parallel documents are guaranteed to have a @jf:document attribute :)
+ $new-doc-nodes[1]/ancestor::*[@jf:document][1]/@jf:document/string()
+ else
+ let $uri :=
+ (
+ document-uri(root($new-doc-nodes[1])),
+ ($new-doc-nodes[1]/@uri:document-uri)
+ )[1]
+ return
+ replace(
+ data:db-path-to-api(
+ mirror:unmirror-path(
+ (: most of the time, the document will be from unflatten; for inline ptr inclusions, it will be from flatten;
+ this is a more or less generic way to get the cache
+ :)
+ string-join(subsequence(tokenize($uri, "/"), 1, 4), "/"),
+ $uri
+ )
+ ), "^(/exist/restxq)?/api", "")
+ return (
+ (: document (as API source ), base URI?, language, source(?),
+ : license, contributors :)
+ attribute jf:document { $document-path },
+ attribute jf:license { common:TEI-root($new-doc-nodes[1])//tei:licence/@target },
+ combine:new-context-attributes($context, $new-doc-nodes)
+ )
+};
+
+declare function combine:new-document-params(
+ $new-doc-nodes as node()*,
+ $params as map(*)
+ ) as map(*) {
+ combine:new-document-params($new-doc-nodes, $params, false())
+};
+
+(:~ change parameters as required for entry into a new document
+ : manages "combine:unmirrored-doc", resets "combine:conditional-layers"
+ :
+ : @param $new-doc-nodes The newly active document
+ : @param $params Already active parameters
+ : @param $is-redirect If a redirect is going into force, then 2 documents' params will be simulataneously active. : In that case, combine:unmirrored-doc is added to, not replaced. The redirect is always second.
+ :)
+declare function combine:new-document-params(
+ $new-doc-nodes as node()*,
+ $params as map(*),
+ $is-redirect as xs:boolean
+ ) as map(*) {
+ let $unmirrored-doc :=
+ if ($new-doc-nodes[1]/ancestor::jf:parallel-document)
+ then
+ data:doc($new-doc-nodes[1]/ancestor::tei:TEI/@jf:document)
+ else
+ let $uri :=
+ (document-uri(root($new-doc-nodes[1])),
+ $new-doc-nodes[1]/@uri:document-uri)[1]
+ return
+ doc(
+ mirror:unmirror-path(
+ string-join(subsequence(tokenize($uri, "/"), 1, 4), "/"),
+ $uri
+ )
+ )
+ let $new-params := map:merge((
+ $params,
+ map {
+ "combine:unmirrored-doc" :
+ if ($is-redirect)
+ then ($params("combine:unmirrored-doc"), $unmirrored-doc)
+ else $unmirrored-doc,
+ "combine:conditional-layers" : map {}
+ }
+ ))
+ return
+ combine:update-params($new-doc-nodes[1], $new-params)
+};
+
+(:~ update parameters are required for any new context :)
+declare function combine:update-params(
+ $node as node()?,
+ $params as map(*)
+ ) as map(*) {
+ combine:update-settings-from-standoff-markup($node, $params, true())
+};
+
+(:~ update parameters with settings from standoff markup.
+ : feature structures are represented by type->name := value
+ : @param $params maintains the combine:settings parameter
+ : @param $new-context true() if this is a new context
+ :)
+declare function combine:update-settings-from-standoff-markup(
+ $e as node(),
+ $params as map(*),
+ $new-context as xs:boolean
+ ) as map(*) {
+ let $real-context :=
+ (: if there's a @uri:document-uri, we need to load the real context-equivalent :)
+ if ($e/@uri:document-uri)
+ then doc($e/@uri:document-uri)//*[@jf:id=$e/@jf:id][1]
+ else $e
+ let $base-context :=
+ if ($new-context)
+ (: this is more complex --
+ need to handle overrides, so each of these ancestors has to be treated separately, and in document order
+ :)
+ then $real-context/ancestor-or-self::*[@jf:set]
+ else if (exists($real-context/(@jf:set)))
+ then $real-context
+ else ()
+ return
+ if (exists($base-context))
+ then
+ map:merge((
+ $params,
+ map {
+ "combine:settings" : map:merge((
+ $params("combine:settings"),
+ for $context in $base-context,
+ $setting in tokenize($context/@jf:set, '\s+')
+ let $link-dest := uri:fast-follow($setting, $context, uri:follow-steps($context))
+ where $link-dest instance of element(tei:fs)
+ return combine:tei-fs-to-map($link-dest, $params)
+ ))
+ }
+ ))
+ else $params
+};
+
+declare %private function combine:tei-featureVal-to-map(
+ $fnodes as node()*,
+ $params as map(*)
+ ) as element(tei:string)* {
+ for $node in $fnodes
+ return
+ typeswitch ($node)
+ case element(j:yes) return element tei:string { "YES" }
+ case element(j:no) return element tei:string { "NO" }
+ case element(j:maybe) return element tei:string { "MAYBE" }
+ case element(j:on) return element tei:string { "ON" }
+ case element(j:off) return element tei:string { "OFF" }
+ case element(tei:binary) return element tei:string { string($node/@value=(1, "true")) }
+ case element(tei:numeric) return element tei:string { $node/string() }
+ case element(tei:string) return $node
+ case element(tei:vColl) return combine:tei-featureVal-to-map($node/element(), $params)
+ case element(tei:default) return element tei:string { cond:evaluate($node, $params) }
+ case element() return element tei:string { $node/@value/string() }
+ case text() return
+ (: empty text nodes should not produce values :)
+ if (normalize-space($node))
+ then element tei:string { string($node) }
+ else ()
+ default return ()
+};
+
+(:~ convert a tei:fs to an XQuery map
+ : The key is fsname->fname. The value is always one or more tei:string elements.
+ :)
+declare function combine:tei-fs-to-map(
+ $e as element(tei:fs),
+ $params as map(*)
+ ) as map(*) {
+ let $fsname :=
+ if ($e/@type)
+ then $e/@type/string()
+ else ("anonymous:" || common:generate-id($e))
+ return
+ map:merge(
+ for $f in $e/tei:f
+ return
+ map:entry(
+ $fsname || "->" ||
+ (
+ if ($f/@name)
+ then $f/@name/string()
+ else ("anonymous:" || common:generate-id($f))
+ ),
+ combine:tei-featureVal-to-map(
+ if ($f/@fVal)
+ then uri:fast-follow($f/@fVal, $f, -1)
+ else $f/node(),
+ $params
+ )[.]
+ )
+ )
+};
+
+(:~ transliterate an element in place
+ : @param $e already fully processed element
+ : @param $context original context
+ : @param $params includes transliteration on/off and table if on
+ :)
+declare function combine:transliterate-in-place(
+ $e as element(),
+ $context as element(),
+ $params as map(*)
+ ) as element()? {
+ let $settings := $params("combine:settings")
+ where exists($settings) and $settings("opensiddur:transliteration->active")=("ON","YES") and $settings("opensiddur:transliteration->table")
+ return
+ let $table := translit:get-table($context, $settings("opensiddur:transliteration->table"), (), $settings("opensiddur:transliteration->script"))
+ let $out-script := $table/tr:lang[common:language($context)=@in]/@out/string()
+ where exists($table)
+ return
+ let $transliterated := translit:transliterate($e, map { "translit:table" : $table })
+ return
+ element {QName(namespace-uri($transliterated), name($transliterated))}{
+ $transliterated/(@* except @xml:lang),
+ attribute xml:lang { $out-script },
+ $transliterated/node()
+ }
+};
+
+(:~ get the effective document URI of the processing
+ : context :)
+declare function combine:document-uri(
+ $context as node()?
+ ) as xs:string? {
+ (document-uri(root($context)),
+ $context/ancestor-or-self::*
+ [(@jf:document-uri|@uri:document-uri)][1]/
+ (@jf:document-uri, @uri:document-uri)[1]/string()
+ )[1]
+};
+
+(: opensiddur->translation contains an ordered list of translations.
+ : return the first existing match of a translation of $destination-stream from that list
+ :)
+declare %private function combine:get-first-active-translation(
+ $destination-stream as element(),
+ $active-translations as element(tei:string)*
+ ) as element(tei:linkGrp)? {
+ let $this-test := $active-translations[1]/string()
+ where exists($this-test)
+ return
+ let $this-translation :=
+ ridx:query(
+ collection("/db/data/linkage")//j:parallelText[tei:idno=$this-test]/tei:linkGrp[@domains],
+ $destination-stream)[1] (: what should happen if more than 1 value is returned? :)
+ return
+ if (exists($this-translation))
+ then $this-translation
+ else combine:get-first-active-translation($destination-stream, subsequence($active-translations, 2))
+};
+
+(:~ do a translation redirect, if necessary, from the context $e
+ : which may be the same or different from $destination
+ :
+ : @return the redirected data, or () if no redirect occurred
+ :)
+declare function combine:translation-redirect(
+ $e as element(),
+ $destination as node()*,
+ $params as map(*)
+ ) as node()* {
+ let $active-translation :=
+ let $s := $params("combine:settings")
+ where exists($s)
+ return $s("opensiddur->translation")
+ let $destination-stream-mirrored :=
+ (: check if we're in a copied segment :)
+ if ($destination[1]/@uri:document-uri)
+ then doc($destination[1]/@uri:document-uri)//jf:unflattened
+ else $destination[1]/ancestor-or-self::jf:unflattened
+ let $destination-stream :=
+ doc(mirror:unmirror-path($format:unflatten-cache, document-uri(root($destination-stream-mirrored))))/
+ id($destination-stream-mirrored/@jf:id)
+ let $translated-stream-unmirrored :=
+ combine:get-first-active-translation($destination-stream, $active-translation)
+ where (
+ exists($translated-stream-unmirrored)
+ and not($e/parent::jf:parallel) (: special exception for the external pointers in the parallel construct :)
+ )
+ return
+ (: there is a translation redirect :)
+ let $destination-doc :=
+ replace(
+ data:db-path-to-api(document-uri(root($destination-stream))),
+ "(/exist/restxq)?/api", "")
+ let $destination-domain :=
+ replace(
+ data:db-path-to-api(document-uri(root($destination-stream))) || "#" ||
+ ($destination-stream/(@xml:id, @jf:id, flatten:generate-id(.)))[1],
+ "(/exist/restxq)?/api", "")
+ let $translated-stream-root := root($translated-stream-unmirrored)
+ let $mirrored-translation-doc :=
+ let $deps := format:unflatten-dependencies($translated-stream-root, $params)
+ return format:unflatten($translated-stream-root, $params, $translated-stream-root)
+ let $destination-stream-domain := $mirrored-translation-doc//tei:TEI[@jf:document=$destination-doc]//jf:unflattened
+ let $redirect-begin :=
+ if ($destination[1] instance of element(jf:unflattened))
+ then $destination-stream-domain
+ else $destination-stream-domain//jf:parallel/descendant::*[@jf:id=$destination/@jf:id][1]/ancestor::jf:parallelGrp
+ let $redirect-end :=
+ if ($destination[last()] instance of element(jf:unflattened))
+ then $destination-stream-domain
+ else $destination-stream-domain//jf:parallel/descendant::*[@jf:id=$destination/@jf:id][last()]/ancestor::jf:parallelGrp
+ let $redirect :=
+ $redirect-begin |
+ $redirect-begin/following-sibling::* intersect $redirect-end/preceding-sibling::* |
+ $redirect-end
+ return (
+ combine:new-document-attributes($e, $destination),
+ (: make reference to the linkage document :)
+ attribute jf:linkage-document {
+ replace(
+ data:db-path-to-api(document-uri($translated-stream-root)),
+ "(/exist/restxq)?/api", ""
+ ) },
+ combine:combine(
+ $redirect,
+ (: new document params looks to the unmirrored doc, so it should go to the unredirected destination too :)
+ combine:new-document-params(
+ $redirect, combine:new-document-params($destination, $params)
+ )
+ )
+ )
+};
+
+(:~ @return true() if the given annotation should be included, false() otherwise :)
+declare function combine:include-annotation(
+ $node as element(),
+ $annotation as element()*,
+ $params as map(*)
+ ) as xs:boolean {
+ let $a := $annotation[1]
+ let $annotation-id := xmldb:decode-uri(xs:anyURI(replace(tokenize(document-uri(root($a)), '/')[last()], '\.xml$', '')))
+ let $s := $params("combine:settings")
+ return
+ exists($s) and (
+ $s("opensiddur:annotation->" || $annotation-id)=("YES","ON")
+ )
+};
+
+declare function combine:follow-pointer(
+ $e as element(),
+ $destination-ptr as xs:string,
+ $params as map(*),
+ $wrapping-element as element()
+ ) as element() {
+ combine:follow-pointer($e, $destination-ptr, $params, $wrapping-element, ())
+};
+
+
+(:~ follow a pointer in the context of the combine operation
+ : @param $e The context element from which the pointer is being followed
+ : @param $destination-ptr The pointer
+ : @param $params Active parameters
+ : @param $wrapping-element The element that should wrap the followed pointer and added attributes
+ : @param $include-function A function that, given context, a followed pointer, and parameters will determine whether the pointer should indeed be followed (optional)
+ : @return $wrapping-element with attributes and content added or empty sequence if $include-function returns false()
+ :)
+declare function combine:follow-pointer(
+ $e as element(),
+ $destination-ptr as xs:string,
+ $params as map(*),
+ $wrapping-element as element(),
+ $include-function as (function(element(), element()*, map(*)) as xs:boolean)?
+ ) as element()? {
+ (: pointer to follow.
+ : This will naturally result in more than one wrapper per
+ : context element if it has more than one @target, but that's OK.
+ :)
+ let $targets := tokenize($destination-ptr, '\s+')
+ for $target in $targets
+ let $destination :=
+ uri:fast-follow(
+ $target,
+ $e,
+ uri:follow-steps($e),
+ (),
+ true(),
+ if ($e/@type="inline")
+ then
+ (: any inline pointer comes from the flatten cache :)
+ $format:flatten-cache
+ else if (substring-before($target, "#") or not(contains($target, "#")))
+ then $format:unflatten-cache
+ else (
+ (: Already in the cache, no need to try to
+ find a cache of a cached document :)
+ )
+ )
+ where empty($include-function) or $include-function($e, $destination, $params)
+ return
+ element {QName(namespace-uri($wrapping-element), name($wrapping-element))} {
+ $wrapping-element/@*,
+ if (
+ combine:document-uri($e) = combine:document-uri($destination[1])
+ )
+ then
+ ((: internal pointer, partial context switch necessary:
+ : lang, but not document-uri
+ :)
+ combine:new-context-attributes($e, $destination[1]),
+ combine:combine($destination,
+ combine:update-params($destination[1], $params)
+ )
+ )
+ else (
+ (: external pointer... determine if we need to redirect :)
+ let $unflattened :=
+ if ($destination[1]/@uri:document-uri)
+ then doc($destination[1]/@uri:document-uri)//jf:unflattened
+ else $destination[1]/ancestor-or-self::jf:unflattened
+ let $redirected :=
+ if ($unflattened)
+ then
+ (: only unflattened can have a parallel text :)
+ combine:translation-redirect($e, $destination, $params)
+ else ()
+ return
+ if (exists($redirected))
+ then $redirected
+ else
+ (: no translation redirect :)
+ (
+ combine:new-document-attributes($e, $destination[1]),
+ combine:combine(
+ $destination,
+ combine:new-document-params($destination[1], $params)
+ )
+ )
+ )
+ }
+
+};
+
+(:~ handle a pointer :)
+declare function combine:tei-ptr(
+ $e as element(tei:ptr),
+ $params as map(*)
+ ) as element()+ {
+ if ($e/@type = "url")
+ then combine:element($e, $params)
+ else
+ combine:follow-pointer(
+ $e, $e/@target/string(), $params,
+ element jf:ptr {
+ $e/(@* except @target)
+ }
+ )
+};
+
+declare function combine:get-conditional-layer-id(
+ $e as element(),
+ $params as map(*)
+ ) as xs:string? {
+ $params("combine:unmirrored-doc")[1] || "#" || $e/@jf:layer-id
+};
+
+(:~ evaluate any conditions involving the current element, which can occur if:
+ : * the element itself is jf:conditional
+ : * the element has an @jf:conditional attribute
+ : * the element derives from a layer that is subject to a condition
+ : * the element is j:option/@xml:id and the opensiddur:option/[document]#[xmlid] feature exists
+ :
+ : @return an updated parameter map with the following parameters updated:
+ : combine:conditional-result: YES, NO, MAYBE, ON, OFF if the element is subject to a conditional; empty if not
+ : combine:conditional-layers: a map of document#layer-id->conditional result
+ : combine:conditional-instruction: the attribute node that points to the instruction
+ :)
+declare function combine:evaluate-conditions(
+ $e as element(),
+ $params as map(*)
+ ) as map(*) {
+ let $this-element-condition-result :=
+ let $conditions := (
+ for $condition in tokenize($e/@jf:conditional, '\s+')
+ return uri:fast-follow($condition, $e, uri:follow-steps($e)),
+ if ($e instance of element(j:option) and $e/@jf:id and not($e/@jf:conditional))
+ then
+ let $option-feature-name := $params("combine:unmirrored-document")[1] || "#" || $e/@jf:id/string()
+ let $feature-value := cond:get-feature-value($params, "opensiddur:option", $option-feature-name)
+ where exists($feature-value)
+ return
+
+
+
+ else ()
+ )
+ where exists($conditions)
+ return
+ cond:evaluate(
+ if (count($conditions) > 1)
+ then element j:all { $conditions }
+ else $conditions,
+ $params
+ )
+ let $conditional-layer-id := combine:get-conditional-layer-id($e, $params)
+ let $conditional-layer-result :=
+ if (not($e instance of element(jf:conditional)
+ or $e instance of element(j:option))
+ and $e/@jf:layer-id)
+ then
+ let $conditional-layer := $params("combine:conditional-layers")
+ where exists($conditional-layer)
+ return $conditional-layer($conditional-layer-id)
+ else ()
+ return
+ map:merge((
+ $params,
+ map {
+ (: if a layer is not ON/YES, then the layer result takes precedence :)
+ "combine:conditional-result" : (
+ $conditional-layer-result,
+ $this-element-condition-result
+ )[1],
+ "combine:conditional-instruction" :
+ $e/@jf:conditional-instruction
+ },
+ (: record if the layer is being turned off :)
+ if (not($e instance of element(jf:conditional)
+ or $e instance of element(j:option))
+ and $e/@jf:layer-id)
+ then
+ map {
+ "combine:conditional-layers" : map:put(
+ $params("combine:conditional-layers"),
+ $conditional-layer-id,
+ (
+ $conditional-layer-result,
+ $this-element-condition-result[not(.=("YES","ON"))]
+ )[1]
+ )
+ }
+ else ()
+ ))
+};
+
diff --git a/opensiddur-server/src/transforms/compile.xqm b/opensiddur-server/src/transforms/compile.xqm
new file mode 100644
index 00000000..6d19b2e9
--- /dev/null
+++ b/opensiddur-server/src/transforms/compile.xqm
@@ -0,0 +1,245 @@
+xquery version "3.1";
+(:~
+ : Write lists for a combined document
+ :
+ : Open Siddur Project
+ : Copyright 2014 Efraim Feinstein
+ : Licensed under the GNU Lesser General Public License, version 3 or later
+ :
+ :)
+module namespace compile="http://jewishliturgy.org/transform/compile";
+
+import module namespace data="http://jewishliturgy.org/modules/data"
+ at "../modules/data.xqm";
+import module namespace format="http://jewishliturgy.org/modules/format"
+ at "../modules/format.xqm";
+import module namespace mirror="http://jewishliturgy.org/modules/mirror"
+ at "../modules/mirror.xqm";
+import module namespace debug="http://jewishliturgy.org/transform/debug"
+ at "../modules/debug.xqm";
+
+declare namespace error="http://jewishliturgy.org/errors";
+declare namespace tei="http://www.tei-c.org/ns/1.0";
+declare namespace j="http://jewishliturgy.org/ns/jlptei/1.0";
+declare namespace jf="http://jewishliturgy.org/ns/jlptei/flat/1.0";
+
+declare function compile:compile-document(
+ $doc as document-node(),
+ $params as map(*)
+ ) as document-node() {
+ compile:compile($doc, $params)
+};
+
+declare function compile:compile(
+ $nodes as node()*,
+ $params as map(*)
+ ) as node()* {
+ for $node in $nodes
+ return
+ typeswitch($node)
+ case document-node()
+ return document { compile:compile($node/node(), $params)}
+ case element(tei:text)
+ return compile:tei-text($node, $params)
+ case element()
+ return compile:element($node, $params)
+ default return $node
+};
+
+declare function compile:element(
+ $e as element(),
+ $params as map(*)
+ ) as element() {
+ element {QName(namespace-uri($e), name($e))}{
+ $e/@*,
+ compile:compile($e/node() ,$params)
+ }
+};
+
+(: add back matter that's derived from the text's metadata :)
+declare function compile:tei-text(
+ $e as element(tei:text),
+ $params as map(*)
+ ) as element(tei:text) {
+ let $text-output := compile:element($e, $params)
+ return
+ element tei:text {
+ $text-output/@*,
+ $text-output/(* except tei:back),
+ element tei:back {
+ $text-output/tei:back/(@*|node()),
+ let $api-documents := ($text-output//@jf:document, $text-output//@jf:linkage-document)
+ let $unique-documents-db := distinct-values((
+ mirror:unmirror-path( (: this document :)
+ $format:combine-cache,
+ document-uri(root($e))
+ ),
+ for $doc in $api-documents
+ return data:api-path-to-db($doc)
+ ))
+ let $unique-documents :=
+ for $d in $unique-documents-db
+ return doc($d)
+ return (
+ (: licensing :)
+ compile:license-statements($unique-documents),
+ (: contributor list :)
+ compile:contributor-list($unique-documents),
+ (: bibliography :)
+ compile:source-list($unique-documents)
+ )
+ }
+ }
+};
+
+declare function compile:license-statements(
+ $documents as document-node()*
+ ) as element(tei:div)? {
+ let $text-licenses :=
+ distinct-values($documents//tei:licence/@target/string())
+ let $supported-licenses := (
+ "http://www.creativecommons.org/publicdomain/zero/",
+ "http://www.creativecommons.org/licenses/by/",
+ "http://www.creativecommons.org/licenses/by-sa/"
+ )
+ let $supported-license-names := map {
+ "http://www.creativecommons.org/publicdomain/zero/" : "Creative Commons Zero",
+ "http://www.creativecommons.org/licenses/by/" : "Creative Commons Attribution",
+ "http://www.creativecommons.org/licenses/by-sa/" : "Creative Commons Attribution-ShareAlike"
+ }
+ return
+ if (count($text-licenses)>0)
+ then
+ element tei:div {
+ attribute type { "licensing" },
+ attribute xml:lang { "en" },
+ if (count($text-licenses)=1)
+ then "This text is licensed under the terms of the following license:"
+ else "This text is derived from works under the following licenses:",
+ for $license in $supported-licenses,
+ $text-license in $text-licenses
+ where starts-with($text-license, $license)
+ return
+ let $lic-version := replace($text-license, "http://[^/]+/[^/]+/[^/]+/", "")
+ return
+
+ {
+ string-join((
+ $supported-license-names($license),
+ $lic-version
+ ), " ")}
+
+ }
+ else ()
+};
+
+declare variable $compile:contributor-types :=
+ map {
+ "aut" : "Author",
+ "ann" : "Annotator",
+ "ctb" : "Contributor",
+ "cre" : "Creator",
+ "edt" : "Editor",
+ "fac" : "Facsimilist",
+ "fnd" : "Funder",
+ "mrk" : "Markup editor",
+ "oth" : "Other",
+ "pfr" : "Proofreader",
+ "spn" : "Sponsor",
+ "trc" : "Transcriber",
+ "trl" : "Translator"
+ };
+
+declare function compile:contributor-list(
+ $documents as document-node()*
+ ) as element(tei:div)? {
+ let $responsibility-statements := $documents//tei:respStmt
+ let $change-statements := $documents//tei:change
+ let $all-responsibilities := $responsibility-statements | $change-statements
+ where exists($all-responsibilities)
+ return
+ element tei:div {
+ attribute type { "contributors" },
+ attribute xml:lang { "en" },
+ for $contributor in $all-responsibilities
+ group by
+ $key := ($contributor/tei:resp/@key/string(), "edt")[1]
+ order by $key
+ return (
+ let $contributor-uris :=
+ distinct-values($contributor/(*/@ref,@who)[1]/string()[.])
+ let $n := count($contributor-uris)
+ where $n > 0
+ return
+ element tei:list {
+ element tei:head {
+ text { $compile:contributor-types($key) || "s" }
+ },
+ for $contributor-uri in $contributor-uris
+ let $contributor-doc :=
+ if ($contributor-uri)
+ then data:doc($contributor-uri)
+ else ()
+ let $contributor-name := $contributor-doc/*/(tei:name, tei:orgName, tei:idno)[1]
+ where $contributor-doc
+ order by $contributor-name
+ return
+ element tei:item {
+ $contributor-doc
+ }
+ }
+ )
+
+ }
+};
+
+declare function compile:name-sort-key(
+ $name as element()
+ ) as xs:string? {
+ (string-join($name/(tei:nameLink, tei:surname, tei:genName, tei:forename), " "), string($name))[1]
+};
+
+declare function compile:source-list(
+ $documents as document-node()*
+ ) as element(tei:div)? {
+ let $source-link-elements := $documents//tei:sourceDesc/tei:bibl/tei:ptr[@type="bibl"]
+ let $source-links :=
+ distinct-values(
+ for $link-element in $source-link-elements
+ return tokenize($link-element/@target, '\s+')
+ )
+ where exists($source-links)
+ return
+ element tei:div {
+ attribute type { "bibliography" },
+ attribute xml:lang { "en" },
+ element tei:listBibl {
+ element tei:head {
+ text { "Bibliography" }
+ },
+ for $source-link in $source-links
+ let $source-doc := data:doc($source-link)
+ let $source-key := lower-case(string-join((
+ $source-doc/*/(
+ for $e in (
+ tei:analytic/tei:author/tei:name,
+ tei:analytic/tei:editor/tei:name,
+ tei:analytic/tei:respStmt/tei:name,
+ tei:monogr/tei:author/tei:name,
+ tei:monogr/tei:editor/tei:name,
+ tei:monogr/tei:respStmt/tei:name,
+ tei:series/tei:author/tei:name,
+ tei:series/tei:editor/tei:name,
+ tei:series/tei:respStmt/tei:name
+ )
+ return compile:name-sort-key($e),
+ tei:analytic/tei:title,
+ tei:monogr/tei:title,
+ tei:series/tei:title,
+ tei:monogr/tei:imprint/tei:date
+ )), " "))
+ order by $source-key
+ return $source-doc
+ }
+ }
+};
diff --git a/opensiddur-server/src/transforms/conditionals.xqm b/opensiddur-server/src/transforms/conditionals.xqm
new file mode 100644
index 00000000..2dc50849
--- /dev/null
+++ b/opensiddur-server/src/transforms/conditionals.xqm
@@ -0,0 +1,220 @@
+xquery version "3.1";
+(:~
+ : Evaluate conditionals
+ :
+ : Open Siddur Project
+ : Copyright 2014 Efraim Feinstein, efraim@opensiddur.org
+ : Licensed under the GNU Lesser General Public License, version 3 or later
+ :
+ :)
+module namespace cond="http://jewishliturgy.org/transform/conditionals";
+
+declare namespace tei="http://www.tei-c.org/ns/1.0";
+declare namespace j="http://jewishliturgy.org/ns/jlptei/1.0";
+declare namespace jf="http://jewishliturgy.org/ns/jlptei/flat/1.0";
+
+(:~ get a feature value from the parameters
+ : if the feature value is not set, use the default value
+ :)
+declare function cond:get-feature-value(
+ $params as map(*),
+ $fsname as xs:string,
+ $fname as xs:string
+ ) as xs:string? {
+ let $s := $params("combine:settings")
+ let $val :=
+ if (exists($s))
+ then $s($fsname || "->" || $fname)/string()
+ else ()
+ return
+ if (exists($val))
+ then $val
+ else
+ cond:evaluate(
+ collection("/db/data/conditionals")//
+ tei:fsDecl[@type=$fsname]/tei:fDecl[@name=$fname]/tei:vDefault,
+ $params
+ )
+};
+
+
+declare function cond:tei-default(
+ $e as element(tei:default),
+ $params as map(*)
+ ) as xs:string? {
+ let $fname := $e/parent::tei:f/@name/string()
+ let $fstype := $e/ancestor::tei:fs[1]/@type/string()
+ return
+ cond:evaluate(
+ collection("/db/data/conditionals")//
+ tei:fsDecl[@type=$fstype]/tei:fDecl[@name=$fname]/tei:vDefault,
+ $params
+ )
+};
+
+(:~ evaluate a conditional in a given context, using the settings contained in
+ : $params("combine:settings")
+ :
+ : @param $conditional The condition to evaluate
+ : @param $params Current parameters
+ :
+ : @return A sequence of: "YES", "NO", "MAYBE", "ON", "OFF"
+ :)
+declare function cond:evaluate(
+ $conditional as element()*,
+ $params as map(*)
+ ) as xs:string* {
+ for $e in $conditional
+ return
+ typeswitch ($e)
+ case text() return ()
+ case element(j:on) return "ON"
+ case element(j:off) return "OFF"
+ case element(j:yes) return "YES"
+ case element(j:no) return "NO"
+ case element(j:maybe) return "MAYBE"
+ case element(j:all) return cond:j-all($e, $params)
+ case element(j:any) return cond:j-any($e, $params)
+ case element(j:oneOf) return cond:j-oneOf($e, $params)
+ case element(j:not) return cond:j-not($e, $params)
+ case element(tei:default) return cond:tei-default($e, $params)
+ case element(tei:vDefault) return cond:tei-vDefault($e, $params)
+ case element(tei:if) return cond:tei-if($e, $params)
+ case element(tei:f) return cond:tei-f($e, $params)
+ case element(tei:fs) return cond:tei-fs($e, $params)
+ case element() return cond:evaluate($e/element(), $params)
+ default return ()
+};
+
+declare function cond:j-all(
+ $e as element(j:all),
+ $params as map(*)
+ ) as xs:string? {
+ let $result := cond:evaluate($e/element(), $params)
+ return
+ if ($result="NO") (: if any feature evaluates to NO or OFF, so does all :)
+ then "NO"
+ else if ($result="OFF")
+ then "OFF"
+ else if ($result="MAYBE") (: otherwise if any feature evaluates to MAYBE, so does all :)
+ then "MAYBE"
+ else if ($result="YES") (: all that's left is YES/ON :)
+ then "YES"
+ else if ($result="ON")
+ then "ON"
+ else ()
+};
+
+declare function cond:j-any(
+ $e as element(j:any),
+ $params as map(*)
+ ) as xs:string? {
+ let $result := cond:evaluate($e/element(), $params)
+ return
+ if ($result="MAYBE") (: if any feature evaluates to MAYBE, so does any :)
+ then "MAYBE"
+ else if ($result="YES") (: next, YES or ON :)
+ then "YES"
+ else if ($result="ON")
+ then "ON"
+ else if ($result="NO") (: all that's left is NO or OFF :)
+ then "NO"
+ else if ($result="OFF")
+ then "OFF"
+ else ()
+};
+
+declare function cond:j-oneOf(
+ $e as element(j:oneOf),
+ $params as map(*)
+ ) as xs:string? {
+ let $result := cond:evaluate($e/element(), $params)
+ let $n-yes := count($result[.="YES"])
+ let $n-maybe := count($result[.="MAYBE"])
+ let $n-on := count($result[.="ON"])
+ let $n-sum := $n-yes + $n-maybe + $n-on
+ return
+ if ($n-on=1 and $n-sum=1)
+ then "ON"
+ else if ($n-yes=1 and $n-sum=1)
+ then "YES"
+ else if ($n-maybe=1 and $n-sum=1)
+ then "MAYBE"
+ else if ($result=("YES", "NO", "MAYBE"))
+ then "NO"
+ else if ($result=("ON", "OFF"))
+ then "OFF"
+ else ()
+};
+
+declare function cond:j-not(
+ $e as element(j:not),
+ $params as map(*)
+ ) as xs:string? {
+ let $result := cond:evaluate($e/element(), $params)
+ return
+ if ($result="ON")
+ then "OFF"
+ else if ($result="OFF")
+ then "ON"
+ else if ($result="YES")
+ then "NO"
+ else if ($result="NO")
+ then "YES"
+ else if ($result="MAYBE")
+ then "MAYBE"
+ else ()
+};
+
+(: the default value is either a literal or the first matching result of an if :)
+declare function cond:tei-vDefault(
+ $e as element(tei:vDefault),
+ $params as map(*)
+ ) as xs:string? {
+ cond:evaluate($e/element(), $params)[1]
+};
+
+declare function cond:tei-if(
+ $e as element(tei:if),
+ $params as map(*)
+ ) as xs:string? {
+ let $eval := cond:evaluate($e/tei:then/preceding-sibling::*, $params)
+ where ($eval=("ON", "YES"))
+ return cond:evaluate($e/tei:then/following-sibling::*, $params) (: this will be a YES, NO, etc. :)
+};
+
+declare variable $cond:truth-table :=
+ (: map setting,condition -> value :)
+ map {
+ "ON,ON" : "ON",
+ "ON,OFF" : "OFF",
+ "OFF,ON" : "OFF",
+ "OFF,OFF" : "ON",
+ "YES,YES" : "YES",
+ "YES,NO" : "NO",
+ "YES,MAYBE" : "MAYBE",
+ "NO,YES" : "NO",
+ "NO,NO" : "YES",
+ "NO,MAYBE" : "MAYBE",
+ "MAYBE,YES" : "MAYBE",
+ "MAYBE,NO" : "MAYBE",
+ "MAYBE,MAYBE" : "MAYBE"
+ };
+
+declare function cond:tei-f(
+ $e as element(tei:f),
+ $params as map(*)
+ ) as xs:string? {
+ let $fstype := $e/parent::tei:fs/@type/string()
+ let $fname := $e/@name/string()
+ let $settings-value := cond:get-feature-value($params, $fstype, $fname)
+ let $my-value := cond:evaluate($e/element(), $params)
+ return $cond:truth-table(string-join(($settings-value, $my-value), ","))
+};
+
+declare function cond:tei-fs(
+ $e as element(tei:fs),
+ $params as map(*)
+ ) as xs:string* {
+ cond:evaluate($e/element(), $params)
+};
diff --git a/code/transforms/copy-context.xsl2 b/opensiddur-server/src/transforms/copy-context.xsl2
similarity index 100%
rename from code/transforms/copy-context.xsl2
rename to opensiddur-server/src/transforms/copy-context.xsl2
diff --git a/opensiddur-server/src/transforms/flatten.xqm b/opensiddur-server/src/transforms/flatten.xqm
new file mode 100644
index 00000000..0994f22d
--- /dev/null
+++ b/opensiddur-server/src/transforms/flatten.xqm
@@ -0,0 +1,768 @@
+xquery version "3.1";
+(:~
+ : Modes to flatten a hierarchy.
+ : To run:
+ : flatten:flatten-document -> flatten:merge-document -> flatten:resolve-stream
+ : At each step, a save is recommended.
+ : resolve-stream REQUIRES that the document root be accessible.
+ :
+ : Open Siddur Project
+ : Copyright 2009-2014 Efraim Feinstein
+ : Licensed under the GNU Lesser General Public License, version 3 or later
+ :
+ :)
+module namespace flatten="http://jewishliturgy.org/transform/flatten";
+
+import module namespace uri="http://jewishliturgy.org/transform/uri"
+ at "../modules/follow-uri.xqm";
+import module namespace common="http://jewishliturgy.org/transform/common"
+ at "../modules/common.xqm";
+import module namespace debug="http://jewishliturgy.org/transform/debug"
+ at "../modules/debug.xqm";
+import module namespace format="http://jewishliturgy.org/modules/format"
+ at "../modules/format.xqm";
+
+declare namespace tei="http://www.tei-c.org/ns/1.0";
+declare namespace j="http://jewishliturgy.org/ns/jlptei/1.0";
+declare namespace jf="http://jewishliturgy.org/ns/jlptei/flat/1.0";
+
+declare variable $flatten:layer-order := map {
+ "none" : 0,
+ "parallel" : 1,
+ "phony-set" : 2,
+ "phony-conditional" : 3,
+ "phony-annotation" : 4,
+ "div" : 5,
+ "p" : 6,
+ "lg" : 7,
+ "s" : 8,
+ "ab" : 9,
+ "verse" : 10,
+ "l" : 11,
+ "cit" : 12,
+ "choice" : 13
+ };
+
+(:~ this declares the cache path that is expected to precede flatten, so
+ : we make sure to load absolute links from the right place. :)
+declare variable $flatten:origin-cache := "/db/cache/segment";
+
+(:~ order the given flattened nodes, using the information in
+ : the ordering attributes
+ :)
+declare function flatten:order-flattened(
+ $flattened-nodes as node()*
+ ) as node()* {
+ for $n in $flattened-nodes
+ order by
+ $n/@jf:position/number(),
+ $n/@jf:relative/number(),
+ $n/@jf:nchildren/number(),
+ (: if an ancestor layer type is available,
+ : use it to disambiguate :)
+ -1 * $n/@jf:relative/number() *
+ $flatten:layer-order(($n/ancestor::jf:layer/@type/string(), "none")[1]),
+ $n/@jf:nlevels/number(),
+ $n/@jf:nprecedents/number(),
+ $n/@jf:layer-id
+ return $n
+};
+
+(:~ entry point for the merge transform :)
+declare function flatten:merge-document(
+ $doc as document-node(),
+ $params as map(*)
+ ) as document-node() {
+ common:apply-at(
+ $doc,
+ $doc//(j:concurrent|j:streamText),
+ flatten:merge-concurrent#2,
+ $params
+ )
+};
+
+declare function flatten:merge-concurrent(
+ $e as element(),
+ $params as map(*)
+ ) as element()* {
+ typeswitch($e)
+ case element(j:concurrent)
+ return flatten:merge-j-concurrent($e, $params)
+ default (: j:streamText :)
+ return (
+ flatten:merge(
+ flatten:flatten-streamText($e, $params),
+ $e/../j:concurrent/jf:layer,
+ $params
+ ),
+ $e
+ )
+};
+
+declare function flatten:merge-j-parallelText(
+ $e as element(j:parallelText),
+ $params as map(*)
+ ) as element(jf:parallelText) {
+ element jf:parallelText {
+ if ($e/(@jf:id|@xml:id))
+ then
+ attribute jf:id { $e/(@jf:id|@xml:id)/string() }
+ else (),
+ for $layer in $e/jf:layer
+ let $domain := $layer/@jf:domain (: domain points to the streamText :)
+ let $flat-stream := uri:follow-cached-uri($domain, $layer, -1, $format:flatten-cache)
+ let $lang := common:language($flat-stream)
+ let $merged :=
+ flatten:merge(
+ flatten:flatten-streamText($flat-stream, $params),
+ ($layer, $flat-stream/../j:concurrent/jf:layer),
+ $params
+ )
+ return (
+ element jf:merged {
+ $layer/(@type, @jf:domain),
+ (: each merged domain maintains the language of the primary stream it derives from :)
+ if ($lang)
+ then attribute xml:lang { $lang }
+ else (),
+ $merged/node()
+ },
+ element j:streamText {
+ attribute jf:domain { $domain },
+ attribute jf:id { $flat-stream/(@jf:id|@xml:id)/string() },
+ $flat-stream/(@* except @xml:id),
+ flatten:copy($flat-stream/node(), $params)
+ }
+ )
+ }
+};
+
+(:~ @return an element that records all the existing layers
+ : and their layer-ids, recording the match between the layer-id
+ : to the layer type
+ :)
+declare function flatten:merge-j-concurrent(
+ $e as element(j:concurrent),
+ $params as map(*)
+ ) as element(jf:concurrent) {
+ element jf:concurrent {
+ if ($e/(@jf:id|@xml:id))
+ then
+ attribute jf:id { $e/(@jf:id|@xml:id)/string() }
+ else (),
+ for $layer in $e/jf:layer
+ return
+ element jf:layer {
+ $layer/(@type, @jf:id, @jf:layer-id)
+ }
+ }
+};
+
+(:~ merge flattened layers and a flattened streamText
+ : @return an ordered structure containing all the elements of the layers and the streamText
+ :)
+declare function flatten:merge(
+ $streamText as element(jf:streamText),
+ $layers as element(jf:layer)*,
+ $params as map(*)
+ ) as element(jf:merged) {
+ element jf:merged {
+ (: jf:merged takes the place of streamText :)
+ $streamText/(@* except @xml:id),
+ if ($streamText/@xml:id and not($streamText/@jf:id))
+ then
+ attribute jf:id { $streamText/@xml:id }
+ else (),
+ flatten:order-flattened(
+ (
+ $layers/(node() except jf:placeholder),
+ $streamText/node()
+ )
+ )
+ }
+};
+
+(:~ replace all references to jf:placeholder with
+ : their stream elements; replace remaining @xml:id with @jf:id
+ : @param $params passes itself the "flatten:resolve-stream" parameter to point to the stream being resolved
+ :)
+declare function flatten:resolve-stream(
+ $nodes as node()*,
+ $params as map(*)
+ ) as node()* {
+ for $node in $nodes
+ return
+ typeswitch ($node)
+ case element (j:streamText)
+ return ()
+ case element (jf:merged)
+ return
+ element { QName(namespace-uri($node), name($node)) }{
+ $node/@*,
+ flatten:resolve-stream($node/node(),
+ map:put(
+ $params,
+ "flatten:resolve-stream",
+ common:TEI-root($node)//j:streamText
+ ))
+ }
+ case element (jf:placeholder)
+ return
+ let $stream := $params("flatten:resolve-stream")
+ let $stream-element := ($stream/id($node/@jf:id), $stream/*[@jf:id=$node/@jf:id])[1]
+ return
+ element { QName(namespace-uri($stream-element), name($stream-element)) }{
+ $stream-element/(@* except @xml:id),
+ if ($stream-element/@xml:id and not($stream-element/@jf:id))
+ then
+ attribute jf:id { $stream-element/@xml:id }
+ else (),
+ $node/@jf:stream,
+ flatten:resolve-copy($stream-element/node(), $params)
+ }
+ case element()
+ return
+ element { QName(namespace-uri($node), name($node)) }{
+ $node/(@* except @xml:id),
+ if ($node/@xml:id and not($node/@jf:id))
+ then
+ attribute jf:id { $node/@xml:id/string() }
+ else (),
+ flatten:resolve-stream($node/node(), $params)
+ }
+ case document-node()
+ return
+ document {
+ flatten:resolve-stream($node/node(), $params)
+ }
+ default return $node
+};
+
+(:~ copy with xml:id->jf:id for elements inside streamText segments during the resolve stage :)
+declare function flatten:resolve-copy(
+ $nodes as node()*,
+ $params as map(*)
+ ) as node()* {
+ for $node in $nodes
+ return
+ typeswitch ($node)
+ case element() return
+ element { QName(namespace-uri($node), name($node)) } {
+ $node/(@* except @xml:id),
+ if ($node/@xml:id and not($node/@jf:id))
+ then
+ attribute jf:id { $node/@xml:id/string() }
+ else (),
+ flatten:resolve-copy($node/node(), $params)
+ }
+ default return $node
+};
+
+(:~ prepare a "display" version of a flattened or merged document
+ : without the sorting keys
+ :
+ :)
+declare function flatten:display(
+ $nodes as node()*,
+ $params as map(*)
+ ) as node()* {
+ for $node in $nodes
+ return
+ typeswitch($node)
+ case document-node()
+ return
+ document { flatten:display($node/node(), $params) }
+ case element()
+ return
+ element {QName(namespace-uri($node), name($node))} {
+ $node/(
+ (@* except (
+ @jf:position, @jf:relative,
+ @jf:nchildren, @jf:nlevels,
+ @jf:nprecedents))
+ ),
+ flatten:display($node/node(), $params)
+ }
+ default return $node
+};
+
+(:~ entry point to run flatten transform on an entire document,
+ : returning the document with flattened layers
+ :)
+declare function flatten:flatten-document(
+ $doc as document-node(),
+ $params as map(*)
+ ) as document-node() {
+ common:apply-at(
+ $doc,
+ $doc//(j:concurrent|j:streamText),
+ flatten:flatten#2,
+ $params
+ )
+};
+
+declare function flatten:flatten(
+ $node as node()*,
+ $params as map(*)
+ ) as node()* {
+ for $n in $node
+ return (
+ typeswitch($n)
+ case text() return $n
+ case comment() return $n
+ case processing-instruction() return $n
+ case element(j:layer) return flatten:j-layer($n, $params)
+ case element(tei:ptr) return flatten:tei-ptr($n, $params)
+ case element(j:concurrent) return flatten:identity($n, $params)
+ case element(j:streamText) return flatten:j-streamText($n, $params)
+ case element() return
+ if ($n is common:TEI-root($n))
+ then flatten:identity($n, $params) (: special treatment for root elements :)
+ else flatten:element($n, $params)
+ case document-node() return document { flatten:flatten($n/node(), $params) }
+ default return flatten:flatten($n/node(), $params)
+ )
+};
+
+(:~ identity :)
+declare function flatten:identity(
+ $e as element(),
+ $params as map(*)
+ ) as element() {
+ element { QName(namespace-uri($e), name($e))}{
+ flatten:copy-attributes($e),
+ flatten:flatten($e/node(), $params)
+ }
+};
+
+(:~ identity - copy only and change xml:id->jf:id :)
+declare function flatten:copy(
+ $nodes as node()*,
+ $params as map(*)
+ ) as node()* {
+ for $node in $nodes
+ return
+ typeswitch($node)
+ case document-node() return document { flatten:copy($node/node(), $params) }
+ case element() return
+ element { QName(namespace-uri($node), name($node))}{
+ flatten:copy-attributes($node),
+ flatten:copy($node/node(), $params)
+ }
+ default return $node
+};
+
+(:~ generate a stream id
+ :
+ : because of parallel texts, a stream id has to uniquely define a stream across documents
+ : @param $stream a streamText
+ : @return generated id
+ :)
+declare function flatten:stream-id(
+ $stream as element(j:streamText)
+ ) as xs:string {
+ concat(
+ common:original-document-path($stream), "#",
+ $stream/(@xml:id, @jf:id, flatten:generate-id(.))[1]
+ )
+};
+
+(:~ streamText within the transform:
+ : assure that the streamText has a jf:id
+ :)
+declare function flatten:j-streamText(
+ $e as element(j:streamText),
+ $params as map(*)
+ ) {
+ element j:streamText {
+ if (empty($e/@jf:id))
+ then
+ attribute jf:id { $e/(@xml:id, flatten:generate-id(.))[1] }
+ else (),
+ $e/(@* except @xml:id),
+ $e/node()
+ }
+};
+
+
+(:~ flatten a streamtext.
+ : This is not part of the transform, rather, it should be used before merge
+ : to obtain placeholders for all streamText elements, whether or not they are
+ : referenced by layers
+ :)
+declare function flatten:flatten-streamText(
+ $st as element(j:streamText),
+ $params as map(*)
+ ) as element(jf:streamText) {
+ element jf:streamText {
+ attribute jf:id { $st/(@xml:id, @jf:id, flatten:generate-id(.))[1] },
+ $st/(@* except (@xml:id, @jf:id)),
+ for $node in $st/node()
+ return
+ typeswitch($node)
+ case element() return flatten:write-placeholder($node, $st)
+ default return $node
+ }
+};
+
+declare function flatten:write-placeholder(
+ $e as element(),
+ $stream as element(j:streamText)
+ ) as element(jf:placeholder) {
+ (:
+ position = position in streamText, starting from 1
+ relative = position relative to placeholder
+ (-1 for before, 0 for at, 1 for after)
+ nchildren = number of children in streamText
+ nlevels = distance in levels from the streamText
+ nprecedents = number of preceding siblings in layer (0 for streamText)
+ stream = which stream derived from
+ layer-id = which layer derived from
+ :)
+
+};
+
+(:~ flatten a ptr.
+ : evaluate ranges into multiple pointers
+ : if it points into the local streamText, turn it into a
+ : jf:placeholder and mark it with @jf:stream
+ :)
+declare function flatten:tei-ptr(
+ $e as element(tei:ptr),
+ $params as map(*)
+ ) as element()+ {
+ for $target in uri:follow-tei-link($e, 1, $flatten:origin-cache, true())
+ let $stream := $target/ancestor::j:streamText
+ return
+ if ($stream)
+ then
+ flatten:write-placeholder($target, $stream)
+ else flatten:element($target, $params)
+};
+
+declare function flatten:copy-attributes(
+ $context as element()
+ ) as attribute()* {
+ if ($context/ancestor-or-self::j:layer)
+ then (
+ $context/(@* except @xml:id),
+ if ($context/@xml:id and not($context/@jf:id))
+ then
+ attribute jf:id { $context/@xml:id }
+ else ()
+ )
+ else $context/@*
+};
+
+(:~ helper function: rewrite the @nchildren parameter following
+ : application of flatten:suspend-or-continue
+ :)
+declare function flatten:rewrite-suspend-or-continue(
+ $nodes as node()*,
+ $active-stream as xs:string
+ ) as node()* {
+ if (empty($nodes[@jf:suspend]))
+ then
+ (: no suspend: this is a no-op :)
+ $nodes
+ else
+ let $temp :=
+ (: required to make *-sibling::* work :)
+ {
+ $nodes
+ }
+ let $start-node := $nodes[1]
+ let $start-node-id := $start-node/@jf:id/string()
+ let $start-level := $start-node/@jf:nlevels/number()
+ for $node in $temp/*
+ return
+ if ($node/(@jf:start, @jf:continue) = $start-node-id)
+ then
+ (: this is a start or continue node, look forwards :)
+ element { QName(namespace-uri($node), name($node)) }{
+ $node/(@* except @jf:nchildren),
+ attribute jf:nchildren {
+ - count(
+ $node/
+ following-sibling::*
+ [@jf:stream=$active-stream]
+ [. << $node/following-sibling::*[(@jf:suspend, @jf:end)=$start-node-id][1]]
+ )
+ },
+ $node/node()
+ }
+ else if ($node/(@jf:end, @jf:suspend) = $start-node-id)
+ then
+ (: this is an end or suspend node, look backwards :)
+ element { QName(namespace-uri($node), name($node)) }{
+ $node/(@* except @jf:nchildren),
+ attribute jf:nchildren {
+ count(
+ $node/
+ preceding-sibling::*
+ [@jf:stream=$active-stream]
+ [. >> $node/preceding-sibling::*[(@jf:start, @jf:continue)=$start-node-id][1]]
+ )
+ },
+ $node/node()
+ }
+ else if (
+ empty($node/(@jf:start|@jf:continue|@jf:suspend|@jf:end)) and
+ abs($node/@jf:nlevels) = ($start-level + 1) and
+ $node/preceding-sibling::*[@jf:start|@jf:continue][@jf:nlevels = $start-level][1]/(@jf:start, @jf:continue) = $start-node-id
+ )
+ then
+ (: this is a child node of the parent with no streamText children :)
+ let $parent-node :=
+ $node/preceding-sibling::*[(@jf:start, @jf:continue)=$start-node-id][@jf:nlevels = $start-level][1]
+ return
+ element { QName(namespace-uri($node), name($node)) }{
+ $node/(@* except @jf:nchildren),
+ attribute jf:nchildren {
+ (
+ if (number($node/@jf:nchildren/number() < 0))
+ then -1
+ else 1
+ ) *
+ count(
+ $parent-node/
+ following-sibling::*
+ [@jf:stream=$active-stream]
+ [. << $parent-node/following-sibling::*[(@jf:suspend, @jf:end)=$start-node-id][1]]
+ )
+ },
+ $node/node()
+ }
+ else
+ (: nothing specific -- pass through :)
+ $node
+};
+
+(:~ add suspend or continue elements for the given context
+ : node to a set of flattened elements
+ :)
+declare function flatten:suspend-or-continue(
+ $context as element(),
+ $node-id as xs:string,
+ $flattened-nodes as node()*,
+ $start-node as element(),
+ $active-stream as xs:string
+ ) as node()* {
+ let $stream-children := $flattened-nodes[@jf:stream=$active-stream]
+ let $positions := $stream-children/@jf:position/number()
+ for $fnode at $pos in $flattened-nodes
+ return
+ if ($fnode instance of element(jf:placeholder))
+ then
+ let $position := $fnode/@jf:position/number()
+ return (
+ if ($position = $positions[1] or ($position - 1) = $positions)
+ then ()
+ else (
+ (: previous position was skipped, resume the context element :)
+ element {QName(namespace-uri($context), name($context))}{
+ attribute jf:continue { $node-id },
+ $fnode/@jf:position,
+ attribute jf:relative { -1 },
+ $start-node/(
+ @jf:nchildren,
+ @jf:nlevels,
+ @jf:nprecedents,
+ @jf:layer-id
+ )
+ }
+ ),
+ $fnode,
+ if ($position = $positions[last()] or ($position + 1) = $positions)
+ then ()
+ else (
+ (: next position will be skipped, suspend the context element :)
+ element {QName(namespace-uri($context), name($context))}{
+ attribute jf:suspend { $node-id },
+ $fnode/@jf:position,
+ attribute jf:relative { 1 },
+ attribute jf:nchildren { - number($start-node/@jf:nchildren) },
+ attribute jf:nlevels { - number($start-node/@jf:nlevels) },
+ $start-node/@jf:nprecedents,
+ $start-node/@jf:layer-id
+ }
+ )
+ )
+ else $fnode
+};
+
+(:~ flatten element
+ : @param $params Expects "flatten:layer-id", "flatten:stream-id"
+ :)
+declare function flatten:element(
+ $context as element(),
+ $params as map(*)
+ ) as node()+ {
+ let $active-stream := $params("flatten:stream-id")
+ let $node-id :=
+ string(
+ $context/(
+ @xml:id,
+ @jf:id,
+ flatten:generate-id(.)
+ )[1]
+ )
+ let $children :=
+ flatten:flatten(
+ $context/node(),
+ $params
+ )
+ let $layer := $context/ancestor::j:layer
+ let $level := count($context/ancestor::*) - count($layer/ancestor::*)
+ let $nprecedents := count($context/preceding-sibling::*) + 1
+ let $attributes := flatten:copy-attributes($context)
+ return
+ if (
+ ($context/empty(./*|./text())) or
+ empty($children[@jf:stream=$active-stream])
+ )
+ then
+ (: If an element is empty or has no children in the streamText
+ :)
+ element { QName(namespace-uri($context), name($context)) }{
+ $attributes,
+ ((: position and relative are filled in later :)),
+ attribute jf:nlevels { $level },
+ attribute jf:nprecedents { $nprecedents },
+ attribute jf:layer-id { $params("flatten:layer-id") },
+ $context/node()
+ }
+ else
+ (: element has children in the streamText :)
+ let $stream-children := $children[@jf:stream=$active-stream]
+ let $nchildren :=
+ if ($context instance of element(jf:parallelGrp) or
+ $context instance of element(jf:parallel))
+ then count(root($context)//j:streamText/element())+1 (: parallel elements are always prioritized :)
+ else count($stream-children)
+ let $start-node :=
+ element { QName(namespace-uri($context), name($context)) }{
+ $attributes,
+ attribute jf:start { $node-id },
+ $stream-children[1]/@jf:position,
+ attribute jf:relative { -1 },
+ attribute jf:nchildren { -$nchildren },
+ attribute jf:nlevels { $level },
+ attribute jf:nprecedents { $nprecedents },
+ attribute jf:layer-id { $params("flatten:layer-id") }
+ }
+ return flatten:rewrite-suspend-or-continue((
+ $start-node,
+ flatten:set-missing-attributes(
+ $context,
+ flatten:suspend-or-continue(
+ $context, $node-id, $children, $start-node, $active-stream
+ ),
+ $nchildren
+ ),
+ element { QName(namespace-uri($context), name($context)) }{
+ attribute jf:end { $node-id },
+ $stream-children[last()]/@jf:position,
+ attribute jf:relative { 1 },
+ attribute jf:nchildren { $nchildren },
+ attribute jf:nlevels { -$level },
+ attribute jf:nprecedents { $nprecedents },
+ attribute jf:layer-id { $params("flatten:layer-id") }
+ }
+ ),
+ $active-stream)
+};
+
+declare function flatten:set-missing-attributes(
+ $context as element(),
+ $nodes as node()*,
+ $nchildren as xs:integer
+ ) as node()* {
+ let $temp :=
+ (: required for siblinghood :)
+ {
+ $nodes
+ }
+ for $node at $pos in $temp/*
+ return
+ typeswitch($node)
+ case element() return
+ if ($node/@jf:position)
+ then $node
+ else
+ let $position-number :=
+ count($node/preceding-sibling::jf:placeholder) + 1
+ let $position :=
+ $node/(
+ preceding-sibling::jf:placeholder[1],
+ following-sibling::jf:placeholder[1]
+ )[1]
+ let $relative :=
+ if ($position << $node)
+ then +1
+ else -1
+ return
+ (: need to enter position, relative, and nchildren :)
+ element {QName(namespace-uri($node), name($node))}{
+ $node/(@* except @jf:nlevels),
+ $position/@jf:position,
+ attribute jf:nlevels { -$relative * $node/@jf:nlevels/number() },
+ attribute jf:relative { $relative },
+ attribute jf:nchildren { $relative * $nchildren },
+ $node/node()
+ }
+ default return $node
+};
+
+declare function flatten:generate-id(
+ $context as element()
+ ) as xs:string {
+ concat(
+ $context/local-name(), "-",
+ replace(util:node-id($context), '[.]', '-') (: clients have trouble handling dots in ids :)
+ )
+};
+
+(:~ Convert j:layer (which may be a root element)
+ : to jf:layer.
+ : Start sending the "flatten:layer-id" and "flatten:stream:id" parameters
+ : If $params("flatten:stream-id") is already set, use the existing value.
+ :)
+declare function flatten:j-layer(
+ $context as element(),
+ $params as map(*)
+ ) as element(jf:layer) {
+ let $id :=
+ $context/(
+ @xml:id,
+ @jf:id,
+ flatten:generate-id(.)
+ )[1]
+ let $stream-id :=
+ if ($params("flatten:stream-id"))
+ then $params("flatten:stream-id")
+ else flatten:stream-id($context/../../j:streamText)
+ let $layer-id := common:original-document-path($context) || "#" || $id
+ return
+ element jf:layer {
+ $context/(@* except @xml:id),
+ if ($context/@xml:id and not($context/@jf:id))
+ then
+ attribute jf:id { $context/@xml:id }
+ else (),
+ attribute jf:layer-id { $layer-id },
+ flatten:order-flattened(
+ flatten:flatten(
+ $context/node(),
+ map:merge(($params, map { "flatten:layer-id" : $layer-id, "flatten:stream-id" : $stream-id } ))
+ )
+ )
+ }
+};
diff --git a/code/transforms/follow-uri.xsl2 b/opensiddur-server/src/transforms/follow-uri.xsl2
similarity index 100%
rename from code/transforms/follow-uri.xsl2
rename to opensiddur-server/src/transforms/follow-uri.xsl2
diff --git a/code/transforms/intl-strings.xsl2 b/opensiddur-server/src/transforms/intl-strings.xsl2
similarity index 100%
rename from code/transforms/intl-strings.xsl2
rename to opensiddur-server/src/transforms/intl-strings.xsl2
diff --git a/opensiddur-server/src/transforms/parallel-layer.xqm b/opensiddur-server/src/transforms/parallel-layer.xqm
new file mode 100644
index 00000000..675ccf68
--- /dev/null
+++ b/opensiddur-server/src/transforms/parallel-layer.xqm
@@ -0,0 +1,115 @@
+xquery version "3.1";
+(:~ parallel to layer transform
+ : convert j:parallelText/tei:linkGrp into layers that can be flattened and merged
+ : assumes that external dependencies are flattened/phony-layered
+ :
+ : Open Siddur Project
+ : Copyright 2014 Efraim Feinstein, efraim@opensiddur.org
+ : Licensed under the GNU Lesser General Public License, version 3.0
+ :)
+module namespace pla="http://jewishliturgy.org/transform/parallel-layer";
+
+import module namespace common="http://jewishliturgy.org/transform/common"
+ at "../modules/common.xqm";
+import module namespace data="http://jewishliturgy.org/modules/data"
+ at "../modules/data.xqm";
+import module namespace format="http://jewishliturgy.org/modules/format"
+ at "../modules/format.xqm";
+import module namespace mirror="http://jewishliturgy.org/modules/mirror"
+ at "../modules/mirror.xqm";
+import module namespace flatten="http://jewishliturgy.org/transform/flatten"
+ at "flatten.xqm";
+
+declare namespace tei="http://www.tei-c.org/ns/1.0";
+declare namespace j="http://jewishliturgy.org/ns/jlptei/1.0";
+declare namespace jf="http://jewishliturgy.org/ns/jlptei/flat/1.0";
+
+declare function pla:parallel-layer-document(
+ $doc as document-node(),
+ $params as map(*)
+ ) as document-node() {
+ document {
+ let $pt := $doc//j:parallelText
+ return
+ if (exists($pt))
+ then
+ element jf:parallel-document {
+ attribute jf:id { ($pt/@xml:id, flatten:generate-id($pt))[1] },
+ $pt/(@* except @xml:id, tei:idno),
+ for $domain in tokenize($doc//j:parallelText/tei:linkGrp/@domains, '\s+')
+ (: substring-before() is returning blank string if the # character doesn't exist;
+ this will select the whole domain if there is no fragment
+ :)
+ let $domain-doc-orig := data:doc((substring-before($domain, '#')[.], $domain)[1])
+ let $domain-document := format:segment($domain-doc-orig, $params, $domain-doc-orig)
+ let $params := map { "pla:domain" : $domain }
+ let $layer := pla:tei-linkGrp($pt/tei:linkGrp, $params)
+ return pla:add-layer($domain-document, $layer, $params)
+ }
+ else $doc/*
+ }
+};
+
+declare function pla:add-layer(
+ $nodes as node()*,
+ $layer as element(j:layer),
+ $params as map(*)
+ ) as node()* {
+ for $node in $nodes
+ return
+ typeswitch($node)
+ case document-node() return pla:add-layer($node/node(), $layer, $params)
+ case element() return
+ element { QName(namespace-uri($node), name($node)) } {
+ $node/(@* except @xml:id),
+ if ($node/@xml:id)
+ then attribute jf:id { $node/@xml:id/string() }
+ else (),
+ if ($node instance of element(tei:TEI))
+ then
+ let $domain-doc := substring-before($params("pla:domain"), '#')
+ return (
+ attribute jf:document { $domain-doc },
+ attribute xml:base { $domain-doc }
+ )
+ else (),
+ pla:add-layer($node/node(), $layer, $params),
+ if ($node instance of element(j:concurrent))
+ then $layer
+ else if ($node instance of element(tei:text)
+ and empty($node/j:concurrent))
+ then
+ element j:concurrent {
+ $layer
+ }
+ else ()
+ }
+ default return $node
+};
+
+declare function pla:tei-linkGrp(
+ $e as element(tei:linkGrp),
+ $params as map(*)
+ ) as element(j:layer) {
+ element j:layer {
+ attribute type { "parallel" },
+ attribute jf:id { ($e/@xml:id, flatten:generate-id($e))[1] },
+ $e/(@* except @xml:id),
+ let $domains := tokenize($e/@domains, "\s+")
+ let $this-domain := index-of($domains, $params("pla:domain"))
+ for $link in $e/tei:link
+ return
+ element jf:parallelGrp {
+ flatten:copy-attributes($link),
+ for $target at $nt in tokenize($link/@target, "\s+")
+ where $nt = $this-domain
+ return
+ element jf:parallel {
+ attribute domain { $domains[$nt] },
+ element tei:ptr {
+ attribute target { '#' || substring-after($target, '#') }
+ }
+ }
+ }
+ }
+};
diff --git a/opensiddur-server/src/transforms/phony-layer.xqm b/opensiddur-server/src/transforms/phony-layer.xqm
new file mode 100644
index 00000000..aa7165e9
--- /dev/null
+++ b/opensiddur-server/src/transforms/phony-layer.xqm
@@ -0,0 +1,226 @@
+xquery version "3.1";
+(:~
+ : Act on "condition", "set", "note", "instruction", "interp", and "annotation" links:
+ : This must be run on the original data because it relies on having the reference index
+ : If the condition/setting applies inside the streamText, make a new phony layer of jf:conditional/jf:set elements per condition
+ : If the condition applies inside j:layer or on j:streamText, put an @jf:conditional/@jf:set/@jf:note/@jf:instruction/... attribute on the element
+ :
+ : This transform only makes sense on original text documents. Otherwise, it acts as an identity transform.
+ :
+ : Copyright 2014 Efraim Feinstein, efraim@opensiddur.org
+ : Open Siddur Project
+ : Licensed under the GNU Lesser General Public License, version 3 or later
+ :)
+module namespace phony="http://jewishliturgy.org/transform/phony-layer";
+
+import module namespace common="http://jewishliturgy.org/transform/common"
+ at "../modules/common.xqm";
+import module namespace uri="http://jewishliturgy.org/transform/uri"
+ at "../modules/follow-uri.xqm";
+import module namespace ridx="http://jewishliturgy.org/modules/refindex"
+ at "../modules/refindex.xqm";
+
+declare namespace tei="http://www.tei-c.org/ns/1.0";
+declare namespace j="http://jewishliturgy.org/ns/jlptei/1.0";
+declare namespace jf="http://jewishliturgy.org/ns/jlptei/flat/1.0";
+
+(: keys are the link types, values are the element and attribute they produce; layer type will be the attribute type :)
+declare variable $phony:link-types := map {
+ "condition" : ("conditional", "conditional"),
+ "set" : ("set", "set"),
+ "note" : ("annotation", "annotation"),
+ "instruction" : ("instruction", "annotation"),
+ "interp" : ("annotation", "annotation"),
+ "annotation" : ("annotation", "annotation")
+};
+
+declare function phony:phony-layer-document(
+ $doc as document-node(),
+ $params as map(*)
+ ) as document-node() {
+ common:apply-at(
+ $doc,
+ $doc//tei:text[j:streamText],
+ phony:phony-layer#2,
+ $params
+ )
+};
+
+declare function phony:phony-layer(
+ $nodes as node()*,
+ $params as map(*)
+ ) as node()* {
+ for $node in $nodes
+ return
+ typeswitch ($node)
+ case document-node() return document { phony:phony-layer($node/node(), $params) }
+ case text() return $node
+ case comment() return $node
+ case element(tei:text) return phony:tei-text($node, $params)
+ case element(j:concurrent) return phony:j-concurrent($node, $params)
+ case element(j:streamText) return phony:j-streamText($node, $params)
+ case element() return phony:element($node, $params, phony:phony-layer#2)
+ default return phony:phony-layer($node/node(), $params)
+};
+
+(:~ return the phony-layer eligible links that apply to the document :)
+declare function phony:doc-phony-links(
+ $n as node()
+ ) as element(tei:link)* {
+ let $link-types := map:keys($phony:link-types)
+ return
+ root($n)//j:links/tei:link[$link-types=@type]|
+ root($n)//j:links/tei:linkGrp[$link-types=@type]/tei:link[not(@type)]
+};
+
+declare function phony:links-to-attributes(
+ $phonies as element(tei:link)*
+ ) as attribute()* {
+ for $phony-link in $phonies
+ group by
+ $phony-type := $phony-link/@type/string()
+ return (
+ let $link-attribute := $phony:link-types($phony-type)[2]
+ return
+ attribute { "jf:" || $link-attribute }{
+ string-join(
+ for $link in $phony-link
+ return tokenize($link/@target, '\s+')[2]
+ , ' ')
+ },
+ let $instructions :=
+ for $link in $phony-link["condition"=@type]
+ return tokenize($link/@target, '\s+')[3]
+ where exists($instructions)
+ return
+ (: TODO: this is really just an annotation, but it needs to be added to other annotations :)
+ attribute jf:conditional-instruction {
+ string-join($instructions, ' ')
+ }
+ )
+};
+
+declare function phony:j-streamText(
+ $e as element(j:streamText),
+ $params as map(*)
+ ) as element(j:streamText) {
+ let $phonies := ridx:query(phony:doc-phony-links($e), $e, 1, false())[self::tei:link]
+ return
+ element j:streamText {
+ $e/@*,
+ phony:links-to-attributes($phonies),
+ phony:inside-streamText($e/node(), $params)
+ }
+};
+
+declare function phony:inside-streamText(
+ $nodes as node()*,
+ $params as map(*)
+ ) as node()* {
+ for $node in $nodes
+ return
+ typeswitch ($node)
+ case element(j:option) return phony:element($node, $params, phony:inside-streamText#2)
+ case element() return
+ if ($node/parent::j:streamText)
+ then
+ element { QName(namespace-uri($node), name($node)) }{
+ $node/@*,
+ phony:inside-streamText($node/node(), $params)
+ }
+ else phony:element($node, $params, phony:inside-streamText#2)
+ case text() return $node
+ case comment() return $node
+ case document-node() return document { phony:inside-streamText($node/node(), $params) }
+ default return phony:inside-streamText($node/node(), $params)
+};
+
+(:~ activates on elements inside layers or j:option inside streamText, which is treated the same way :)
+declare function phony:element(
+ $e as element(),
+ $params as map(*),
+ $caller as function(node()*, map(*)) as node()*
+ ) as element() {
+ let $layer-ancestor := $e/ancestor::j:layer
+ let $stream-ancestor := $e/ancestor::j:streamText[not(. is $e/parent::*)]
+ let $concurrent-ancestor := $layer-ancestor/parent::j:concurrent
+ let $phonies :=
+ if (exists($layer-ancestor) or exists($stream-ancestor) or $e instance of element(j:option))
+ then
+ (: if a condition applies to the whole layer/concurrent section, it applies to all its constituents :)
+ ridx:query(phony:doc-phony-links($e),
+ $e|(
+ if ($e/parent::j:layer) then ($concurrent-ancestor, $layer-ancestor) else ()
+ ), 1, false())[self::tei:link]
+ else ()
+ return
+ element {QName(namespace-uri($e), name($e))}{
+ $e/@*,
+ phony:links-to-attributes($phonies),
+ $caller($e/node(), $params)
+ }
+};
+
+(:~ add a concurrent section if any additional layers should be added
+ : and no concurrent section exists
+ :)
+declare function phony:tei-text(
+ $e as element(tei:text),
+ $params as map(*)
+ ) as element(tei:text) {
+ element tei:text {
+ $e/@*,
+ phony:phony-layer($e/node(), $params),
+ if (empty($e/j:concurrent))
+ then
+ let $phonies := phony:doc-phony-links($e)
+ let $phony-layers := phony:phony-layer-from-links($phonies, $params)
+ where exists($phony-layers)
+ return
+ element j:concurrent {
+ $phony-layers
+ }
+ else ()
+ }
+};
+
+(:~ add a additional layers, if necessary
+ :)
+declare function phony:j-concurrent(
+ $e as element(j:concurrent),
+ $params as map(*)
+ ) as element(j:concurrent) {
+ element j:concurrent {
+ $e/@*,
+ phony:phony-layer($e/node(), $params),
+ let $phonies := phony:doc-phony-links($e)
+ return phony:phony-layer-from-links($phonies, $params)
+ }
+};
+
+declare function phony:phony-layer-from-links(
+ $e as element(tei:link)*,
+ $params as map(*)
+ ) as element(j:layer)* {
+ for $link at $n in $e
+ let $phony-type := $phony:link-types(($link/@type,$link/parent::tei:linkGrp/@type)[1]/string())
+ let $phony-element-type := $phony-type[1]
+ let $phony-attribute-type := $phony-type[2]
+ let $phony-layer-type := $phony-type[2]
+ return
+ let $targets := tokenize($link/@target, '\s+')
+ let $dest := uri:fast-follow($targets[1], $link, 0) (: follow only 1 step -- dest might be a ptr :)
+ where exists($dest[1]/parent::j:streamText)
+ return
+ element j:layer {
+ attribute type { "phony-" || $phony-layer-type },
+ attribute xml:id { "phony-" || $phony-layer-type || "-" || string($n) },
+ element { "jf:" || $phony-element-type } {
+ attribute { "jf:" || $phony-attribute-type } { $targets[2] },
+ if ($phony-type="conditional" and $targets[3])
+ then attribute jf:conditional-instruction { $targets[3] }
+ else (),
+ element tei:ptr { attribute target { $targets[1] } }
+ }
+ }
+};
\ No newline at end of file
diff --git a/opensiddur-server/src/transforms/reverse.xqm b/opensiddur-server/src/transforms/reverse.xqm
new file mode 100644
index 00000000..141ccad6
--- /dev/null
+++ b/opensiddur-server/src/transforms/reverse.xqm
@@ -0,0 +1,225 @@
+xquery version "3.1";
+(:~
+ : Modes to reverse the flattening of a hierarchy.
+ :
+ : Open Siddur Project
+ : Copyright 2013-2014 Efraim Feinstein
+ : Licensed under the GNU Lesser General Public License, version 3 or later
+ :
+ :)
+module namespace reverse="http://jewishliturgy.org/transform/reverse";
+
+import module namespace common="http://jewishliturgy.org/transform/common"
+ at "../modules/common.xqm";
+import module namespace debug="http://jewishliturgy.org/transform/debug"
+ at "../modules/debug.xqm";
+
+declare namespace tei="http://www.tei-c.org/ns/1.0";
+declare namespace j="http://jewishliturgy.org/ns/jlptei/1.0";
+declare namespace jf="http://jewishliturgy.org/ns/jlptei/flat/1.0";
+
+declare function reverse:reverse-document(
+ $doc as document-node(),
+ $params as map(*)
+ ) as document-node() {
+ common:apply-at(
+ $doc,
+ $doc//(jf:merged|jf:concurrent),
+ reverse:reverse#2,
+ $params
+ )
+};
+
+declare function reverse:copy-attributes(
+ $e as element()
+ ) as attribute()* {
+ if ($e/@jf:id)
+ then
+ attribute xml:id { $e/@jf:id/string() }
+ else (),
+ $e/(@* except
+ (@jf:start, @jf:continue,
+ @jf:suspend, @jf:end,
+ @jf:id, @jf:layer-id, @jf:stream,
+ @jf:position, @jf:relative,
+ @jf:nchildren, @jf:nlevels, @jf:nprecedents
+ ))
+};
+
+declare function reverse:reverse(
+ $n as node(),
+ $params as map(*)
+ ) as node()* {
+ typeswitch($n)
+ case element(jf:merged)
+ return reverse:jf-merged($n, $params)
+ default return ( (: jf:concurrent goes away :) )
+};
+
+declare function reverse:jf-merged(
+ $e as element(jf:merged),
+ $params as map(*)
+ ) as element()+ {
+ reverse:construct-streamText($e, $params),
+ reverse:construct-layers($e, $params)
+};
+
+declare function reverse:construct-streamText(
+ $e as element(jf:merged),
+ $params as map(*)
+ ) as element(j:streamText)* {
+ for $stream in distinct-values($e//@jf:stream)
+ return
+ element j:streamText {
+ attribute xml:id {
+ if (contains($stream, "#"))
+ then substring-after($stream, "#")
+ else $stream
+ },
+ for $elem in $e/*[@jf:stream=$stream]
+ return
+ element { QName(namespace-uri($elem), name($elem)) }{
+ reverse:copy-attributes($elem),
+ $elem/node()
+ }
+ }
+};
+
+declare function reverse:construct-layers(
+ $e as element(jf:merged),
+ $params as map(*)
+ ) as element (j:concurrent)? {
+ let $jf-concurrent := $e/../jf:concurrent
+ let $layers :=
+ for $layer in $jf-concurrent/jf:layer
+ return
+ element j:layer {
+ reverse:copy-attributes($layer),
+ reverse:construct-layer(
+ $e/*[1],
+ map:put($params,
+ "reverse:layer-id",
+ $layer/@jf:layer-id/string()
+ ))
+ }
+ where $layers
+ return
+ element j:concurrent {
+ reverse:copy-attributes($jf-concurrent),
+ $layers
+ }
+};
+
+(:~ construct a layer hierarchy
+ : @param $params map parameters, which include:
+ : "reverse:layer-id" = the id of the layer being constructed
+ : "reverse:start" = the start element that is being processed, if any
+ : "reverse:end" = the end element to return at, if any
+ :)
+declare function reverse:construct-layer(
+ $node as node()?,
+ $params as map(*)
+ ) as node()* {
+ typeswitch($node)
+ case empty-sequence()
+ return ()
+ case element()
+ return
+ let $this-layer := $params("reverse:layer-id")
+ let $this-parent := $params("reverse:start")
+ let $this-end := $params("reverse:end")
+ let $suspended := $params("reverse:suspended")
+ return (
+ if ($node/@jf:layer-id=$this-layer)
+ then
+ (: new hierarchic element in this layer :)
+ if ($node is $this-end)
+ then (
+ (: no-op -- do not recurse :)
+ )
+ else if ($node/@jf:start)
+ then
+ (: start a new element :)
+ let $end := $node/following-sibling::*[@jf:end=$node/@jf:start][1]
+ return (
+ element { QName(namespace-uri($node), name($node)) }{
+ reverse:copy-attributes($node),
+ reverse:construct-layer(
+ $node/following-sibling::node()[1],
+ map:merge((
+ $params,
+ map {
+ "reverse:start" : $node,
+ "reverse:end" : $end
+ }))
+ )
+ },
+ reverse:construct-layer(
+ $end/following-sibling::node()[1],
+ $params
+ )
+ )
+ else if ($node/@jf:suspend)
+ then (
+ (: recurse forward, suspending the current :)
+ reverse:construct-layer(
+ $node/following-sibling::node()[1],
+ map:put(
+ $params,
+ "reverse:suspended",
+ ($params("reverse:suspended"), $node/@jf:suspend)
+ )
+ )
+ )
+ else if ($node/@jf:continue)
+ then (
+ (: recurse forward, undo the suspension :)
+ reverse:construct-layer(
+ $node/following-sibling::node()[1],
+ map:put(
+ $params,
+ "reverse:suspended",
+ ($params("reverse:suspended")[not(.=$node/@jf:continue)])
+ )
+ )
+ )
+ else (
+ (: this is a literal element :)
+ element { QName(namespace-uri($node), name($node)) }{
+ reverse:copy-attributes($node),
+ $node/node()
+ },
+ reverse:construct-layer(
+ $node/following-sibling::node()[1],
+ $params
+ )
+ )
+ else if ($node/@jf:stream)
+ then (
+ (: node in the stream :)
+ if (
+ exists($this-parent) and
+ not($suspended = $this-parent/@jf:start)
+ )
+ then
+ element tei:ptr {
+ attribute target { "#" || $node/@jf:id/string() }
+ }
+ else (),
+ reverse:construct-layer(
+ $node/following-sibling::node()[1],
+ $params)
+ )
+ else (
+ (: just go ahead, nothing to do here :)
+ reverse:construct-layer($node/following-sibling::node()[1], $params)
+ )
+ )
+ default
+ return (
+ if (exists($params("reverse:start")))
+ then $node
+ else (),
+ reverse:construct-layer($node/following-sibling::node()[1], $params)
+ )
+};
diff --git a/opensiddur-server/src/transforms/segment.xqm b/opensiddur-server/src/transforms/segment.xqm
new file mode 100644
index 00000000..6b3ebbbe
--- /dev/null
+++ b/opensiddur-server/src/transforms/segment.xqm
@@ -0,0 +1,57 @@
+xquery version "3.1";
+
+(:~ The segmentation stage converts an incoming document with an unsegmented streamText into a
+ : document with a streamText broken up by elements with xml:id
+:)
+
+module namespace segment = "http://jewishliturgy.org/transform/segment";
+
+import module namespace common="http://jewishliturgy.org/transform/common" at "../modules/common.xqm";
+
+declare namespace j="http://jewishliturgy.org/ns/jlptei/1.0";
+declare namespace jf="http://jewishliturgy.org/ns/jlptei/flat/1.0";
+
+declare function segment:segment(
+ $nodes as node()*
+) {
+ for $node in $nodes
+ return
+ typeswitch ($node)
+ case element(j:streamText) return segment:j-streamText($node)
+ case element() return
+ element { QName(namespace-uri($node), name($node)) }{
+ $node/@*,
+ segment:segment($node/node())
+ }
+ case document-node() return document { segment:segment($node/node()) }
+ default return $node
+};
+
+declare function segment:j-streamText(
+ $e as element(j:streamText)
+) as element(j:streamText) {
+ element j:streamText {
+ $e/@*,
+ for $node in $e/node()
+ return
+ typeswitch ($node)
+ case element() return
+ if ($node/@xml:id or $node/@jf:id) then $node
+ else
+ element { QName(namespace-uri($node), name($node)) }{
+ attribute xml:id { common:generate-id($node) },
+ $node/@*,
+ $node/node()
+ }
+ case text() return
+ let $normalized := normalize-space($node)
+ return
+ if ($normalized)
+ then element jf:textnode {
+ attribute xml:id { common:generate-id($node) },
+ $normalized
+ }
+ else ()
+ default return $node
+ }
+};
diff --git a/opensiddur-server/src/transforms/tohtml.xqm b/opensiddur-server/src/transforms/tohtml.xqm
new file mode 100644
index 00000000..bbd09ebb
--- /dev/null
+++ b/opensiddur-server/src/transforms/tohtml.xqm
@@ -0,0 +1,818 @@
+xquery version "3.1";
+(:~
+ : Transform for combined JLPTEI to HTML
+ :
+ : Parameters:
+ : tohtml:style (temporary) -> pointer to API for CSS styling
+ :
+ : Open Siddur Project
+ : Copyright 2013-2014 Efraim Feinstein
+ : Licensed under the GNU Lesser General Public License, version 3 or later
+ :
+ :)
+module namespace tohtml = 'http://jewishliturgy.org/transform/html';
+
+declare namespace tei="http://www.tei-c.org/ns/1.0";
+declare namespace j="http://jewishliturgy.org/ns/jlptei/1.0";
+declare namespace jf="http://jewishliturgy.org/ns/jlptei/flat/1.0";
+declare namespace error="http://jewishliturgy.org/errors";
+declare default element namespace "http://www.w3.org/1999/xhtml";
+
+import module namespace api="http://jewishliturgy.org/modules/api"
+ at "../modules/api.xqm";
+import module namespace common="http://jewishliturgy.org/transform/common"
+ at "../modules/common.xqm";
+import module namespace compile="http://jewishliturgy.org/transform/compile"
+ at "compile.xqm";
+
+declare variable $tohtml:default-style := "/api/data/styles/generic.css";
+
+(:~ entry point :)
+declare function tohtml:tohtml-document(
+ $doc as document-node(),
+ $params as map(*)
+ ) as document-node() {
+ tohtml:tohtml($doc, $params)
+};
+
+declare function tohtml:tohtml(
+ $nodes as node()*,
+ $params as map(*)
+ ) as node()* {
+ for $node in $nodes
+ return
+ typeswitch ($node)
+ case document-node()
+ return document { tohtml:tohtml($node/node(), $params) }
+ case element(tei:TEI)
+ return tohtml:tei-TEI($node, $params)
+ case element(tei:teiHeader)
+ return ()
+ case element(tei:listBibl)
+ return tohtml:tei-listBibl($node, $params)
+ case element(tei:div)
+ return
+ if ($node/@type="licensing")
+ then tohtml:div-with-header((
+ tohtml:add-additional-license-notes($node, $params)
+ ), $params, "Licensing")
+ else if ($node/@type="contributors")
+ then tohtml:div-with-header($node, $params, "Contributors")
+ else tohtml:element($node, $params)
+ case element(tei:forename)
+ return tohtml:span-element($node, $params)
+ case element(tei:item)
+ return tohtml:span-element($node, $params)
+ case element(tei:list)
+ return tohtml:span-element($node, $params)
+ case element(tei:ptr)
+ return tohtml:tei-ptr($node, $params)
+ case element(tei:ref)
+ return tohtml:tei-ref($node, $params)
+ case element(tei:roleName)
+ return tohtml:span-element($node, $params)
+ case element(tei:surname)
+ return tohtml:span-element($node, $params)
+ case element(tei:w)
+ return tohtml:span-element($node, $params)
+ case element(j:divineName)
+ return tohtml:span-element($node, $params)
+ case element(tei:pc)
+ return tohtml:tei-pc($node,$params)
+ case element(j:contributor)
+ return tohtml:j-contributor($node, $params)
+ case element()
+ return tohtml:element($node, $params)
+ default
+ return $node
+};
+
+(:~ add space between elements where necessary
+ : @param $e preceding element
+ :)
+declare function tohtml:space(
+ $e as element(),
+ $params as map(*)
+ ) as node()? {
+ if (
+ $e/following::*[1] instance of element(tei:pc) or
+ $e/self::tei:pc[.='־'] (: maqef is a connector on both sides :)
+ )
+ then ()
+ else text { " " }
+};
+
+declare function tohtml:span-element(
+ $e as element(),
+ $params as map(*)
+ ) as node()+ {
+ element span {
+ tohtml:attributes($e, $params),
+ tohtml:tohtml($e/node(), $params),
+ tohtml:space($e, $params)
+ }
+};
+
+declare function tohtml:tei-pc(
+ $e as element(tei:pc),
+ $params as map(*)
+ ) as node()+ {
+ element span {
+ let $attributes := tohtml:attributes($e, $params)
+ return (
+ $attributes[name(.) != 'class'],
+ attribute class {
+ string-join((
+ $attributes[name(.)="class"]/string(),
+ switch ($e/string())
+ case 'פ'
+ return "pe"
+ case 'ס'
+ return "samekh"
+ default
+ return ()
+ ), ' ')
+ },
+ tohtml:tohtml($e/node(), $params)
+ ),
+ tohtml:space($e, $params)
+ }
+};
+
+(:~ convert any remaining tei:ptr after processing to an a[href] :)
+declare function tohtml:tei-ptr(
+ $e as element(tei:ptr),
+ $params as map(*)
+ ) as node()+ {
+ element a {
+ attribute href { $e/@target },
+ tohtml:attributes($e, $params),
+ if ($e/ancestor::tei:note[@type="audio"])
+ then tohtml:tei-ref-audio($e, $params)
+ else text { "." } (: give the ptr some substance :),
+ tohtml:tohtml($e/node(), $params)
+ },
+ tohtml:space($e, $params)
+};
+
+declare function tohtml:tei-ref(
+ $e as element(tei:ref),
+ $params as map(*)
+ ) as node()+ {
+ element a {
+ attribute href { $e/@target },
+ tohtml:attributes($e, $params),
+ if (exists($e/ancestor::tei:note["audio"=@type]))
+ then tohtml:tei-ref-audio($e, $params)
+ else if (exists($e/ancestor::tei:div[@type="license-statement"]))
+ then tohtml:tei-ref-license($e, $params)
+ else (),
+ tohtml:tohtml($e/node(), $params)
+ },
+ tohtml:space($e, $params)
+};
+
+declare function tohtml:tei-ref-license(
+ $e as element(tei:ref),
+ $params as map(*)
+ ) as node()+ {
+ let $icons := map {
+ "zero" : "/api/static/cc-zero.svg",
+ "by" : "/api/static/cc-by.svg",
+ "by-sa" : "/api/static/cc-by-sa.svg"
+ }
+ let $license-type := tokenize($e/@target, "/")[5]
+ let $img :=
+ if ($license-type)
+ then
+ element object {
+ attribute data { $icons($license-type) },
+ attribute type { "image/svg+xml" },
+ attribute width { "300px" },
+ text { if ($license-type="zero") then "No rights reserved" else "Some rights reserved" }
+ }
+ else ()
+ return (
+ attribute rel { "license" },
+ $img
+ )
+};
+
+(:~ add an audio icon :)
+declare function tohtml:tei-ref-audio(
+ $e as element(),
+ $params as map(*)
+ ) as node()+ {
+ element object {
+ attribute data { "/api/static/Speaker_Icon.svg" },
+ attribute type { "image/svg+xml" },
+ attribute width { "20px" },
+ attribute text { "Play audio" }
+ }
+};
+
+declare function tohtml:wrap-in-link(
+ $item as item()*,
+ $link as xs:string?
+ ) as item()* {
+ if ($link)
+ then
+ element a {
+ attribute href { $link },
+ $item
+ }
+ else $item
+};
+
+(:~ @return contributor list entry :)
+declare function tohtml:j-contributor(
+ $e as element(j:contributor),
+ $params as map(*)
+ ) as element() {
+ let $name :=
+ let $name := tohtml:tohtml(($e/tei:name,$e/tei:orgName,$e/tei:idno)[1], $params)
+ let $website := $e/tei:ptr[@type="url"]/@target/string()
+ return tohtml:wrap-in-link($name, $website)
+ let $affiliation :=
+ if ($e/tei:affiliation)
+ then
+ let $name := tohtml:tohtml($e/tei:affiliation, $params)
+ let $website := $e/tei:affiliation/tei:ptr[@type="url"]/@target/string()
+ return tohtml:wrap-in-link($name, $website)
+ else ()
+ return
+ element div {
+ tohtml:attributes($e, $params),
+ $name,
+ $affiliation
+ }
+};
+
+(:~ @return classes :)
+declare function tohtml:attributes-to-class(
+ $attributes as attribute()*,
+ $params as map(*)
+ ) as xs:string* {
+ for $a in $attributes
+ return
+ typeswitch ($a)
+ case attribute(jf:id)
+ return "id-" || $a/string()
+ case attribute(type)
+ return "type-" || $a/string()
+ case attribute(subtype)
+ return "subtype-" || $a/string()
+ case attribute(n)
+ return "n-" || $a/string()
+ case attribute(jf:part)
+ return "part-" || $a/string()
+ default return ()
+};
+
+declare function tohtml:attributes(
+ $e as element(),
+ $params as map(*)
+ ) as attribute()* {
+ if ($e/@xml:lang and
+ ( $e is root($e)/* or
+ not($e/../tohtml:lang(., $e/@xml:lang))
+ )
+ )
+ then (
+ attribute lang { $e/@xml:lang },
+ $e/@xml:lang,
+ attribute dir { common:direction-from-language($e/@xml:lang) }
+ )
+ else (),
+ attribute class {
+ string-join((
+ concat(
+ switch(namespace-uri($e))
+ case "http://www.tei-c.org/ns/1.0"
+ return "tei"
+ case "http://jewishliturgy.org/ns/jlptei/1.0"
+ return "j"
+ case "http://jewishliturgy.org/ns/jlptei/flat/1.0"
+ return "jf"
+ default
+ return ("",
+ error(
+ xs:QName("error:NAMESPACE_UNKNOWN"),
+ "Unknown namespace for " || name($e) || ":" || namespace-uri($e)
+ )
+ ),
+ "-",
+ local-name($e)
+ ),
+ tohtml:attributes-to-class($e/@*,$params)
+ ), " ")
+ },
+ if ($e/@jf:document)
+ then attribute data-document { $e/@jf:document/string() }
+ else (),
+ if ($e/@jf:license)
+ then attribute data-license { $e/@jf:license/string() }
+ else ()
+};
+
+declare function tohtml:tei-TEI(
+ $e as element(tei:TEI),
+ $params as map(*)
+ ) as element(html) {
+ element html {
+ tohtml:attributes($e, $params),
+ element head {
+ element meta { attribute charset { "utf8" } },
+ element meta { (: do we need this? :)
+ attribute http-equiv {"Content-Type" },
+ attribute content { "text/html; charset=utf-8" }
+ },
+ element link {
+ attribute rel { "stylesheet" },
+ attribute href { api:uri-of(($e//@jf:style/string()[.], $tohtml:default-style)[1]) },
+ attribute type { "text/css" }
+ },
+ tohtml:header-title($e/tei:teiHeader, $params)
+ },
+ element body {
+ tohtml:tohtml($e/tei:text, $params)
+ }
+ }
+};
+
+(:~ workaround for broken lang() function. Requires a context :)
+declare %private function tohtml:lang(
+ $context as node(),
+ $lang as xs:string
+ ) as xs:boolean {
+ starts-with(common:language($context), $lang)
+};
+
+(:~ build a title suitable for an HTML header :)
+declare function tohtml:header-title(
+ $tei-header as element(tei:teiHeader),
+ $params as map(*)
+ ) as element(title) {
+ element title {
+ let $main-lang := common:language($tei-header/..)
+ let $title-element as element(tei:title) :=
+ $tei-header/tei:fileDesc/tei:titleStmt/(
+ tei:title[@type="main"][tohtml:lang(., $main-lang)],
+ tei:title[not(@type)][tohtml:lang(., $main-lang)],
+ tei:title[@type="main"],
+ tei:title[not(@type)])[1]
+ let $title-element-lang := common:language($title-element)
+ let $title-element-dir := common:direction-from-language($title-element-lang)
+ return (
+ attribute lang { $title-element-lang },
+ attribute xml:lang { $title-element-lang },
+ attribute dir { $title-element-dir },
+ $title-element/string()
+ )
+ }
+};
+
+declare function tohtml:div-with-header(
+ $e as element(tei:div),
+ $params as map(*),
+ $header as item()*
+ ) as element() {
+ element div {
+ tohtml:attributes($e, $params),
+ element h2 {
+ $header
+ },
+ tohtml:tohtml($e/node(), $params)
+ }
+};
+
+(:~ add additional license notes, if necessary :)
+declare function tohtml:add-additional-license-notes(
+ $e as element(),
+ $params as map(*)
+ ) as element() {
+ element { QName(namespace-uri($e), name($e)) } {
+ $e/@*,
+ $e/node(),
+ if (exists(root($e)//tei:note[@type="audio"]))
+ then
+ element tei:div {
+ attribute type { "license-statement" },
+ text { "Audio icon downloaded from " },
+ element tei:ref {
+ attribute target { "http://commons.wikimedia.org/wiki/File:Speaker_Icon.svg" },
+ text { "Wikimedia Commons" }
+ },
+ text { " dedicated to the public domain by its authors." }
+ }
+ else (
+ (: any more external credits? :)
+ )
+ }
+};
+
+declare function tohtml:tei-listBibl(
+ $e as element(tei:listBibl),
+ $params as map(*)
+ ) as element() {
+ element div {
+ tohtml:attributes($e, $params),
+ element h2 {
+ tohtml:tohtml($e/tei:head/node(), $params)
+ },
+ tohtml:bibliography($e/tei:biblStruct, $params)
+ }
+};
+
+declare function tohtml:bibliography(
+ $nodes as node()*,
+ $params as map(*)
+ ) as node()* {
+ for $node in $nodes
+ return
+ typeswitch($node)
+ case element(tei:edition)
+ return tohtml:bibl-tei-edition($node, $params)
+ case element(tei:imprint)
+ return tohtml:bibl-tei-imprint($node, $params)
+ case element(tei:author)
+ return tohtml:bibl-tei-author-or-editor($node, $params)
+ case element(tei:editor)
+ return tohtml:bibl-tei-author-or-editor($node, $params)
+ case element(tei:respStmt)
+ return tohtml:bibl-tei-author-or-editor($node, $params)
+ case element(tei:surname)
+ return tohtml:bibl-tei-surname($node, $params)
+ case element(tei:forename)
+ return ()
+ case element(tei:nameLink)
+ return ()
+ case element(tei:roleName)
+ return ()
+ case element(tei:title)
+ return tohtml:bibl-tei-title($node, $params)
+ case element(tei:meeting)
+ return tohtml:bibl-tei-meeting($node, $params)
+ case element(tei:date)
+ return tohtml:bibl-tei-date($node, $params)
+ case element(tei:pubPlace)
+ return tohtml:bibl-tei-pubPlace($node, $params)
+ case element(tei:publisher)
+ return tohtml:bibl-tei-publisher($node, $params)
+ case element(tei:idno)
+ return tohtml:bibl-tei-idno($node, $params)
+ case element(tei:note)
+ return tohtml:bibl-tei-note($node, $params)
+ case element(tei:distributor)
+ return tohtml:bibl-tei-distributor($node, $params)
+ case element(tei:biblStruct)
+ return tohtml:bibl-tei-biblStruct($node, $params)
+ (: regular processing :)
+ case element(tei:ref)
+ return tohtml:tohtml($node, $params)
+ case element(tei:ptr)
+ return tohtml:tohtml($node, $params)
+ case text()
+ return tohtml:bibl-text($node, $params)
+ default return tohtml:bibliography($node/node(), $params)
+};
+
+declare function tohtml:bibl-tei-edition(
+ $e as element(tei:edition),
+ $params as map(*)
+ ) as node()+ {
+ element div {
+ tohtml:attributes($e, $params),
+ tohtml:bibliography($e/node(), $params)
+ }, text { "." }
+};
+
+declare function tohtml:bibl-tei-imprint(
+ $e as element(tei:imprint),
+ $params as map(*)
+ ) as node()* {
+ element div {
+ tohtml:attributes($e, $params),
+ tohtml:bibliography((
+ $e/tei:date,
+ $e/tei:pubPlace,
+ $e/tei:publisher,
+ $e/tei:distributor,
+ $e/tei:biblScope), $params)
+ }
+};
+
+declare function tohtml:bibl-tei-author-or-editor(
+ $e as element(),
+ $params as map(*)
+ ) as node()* {
+ if (not($e/@corresp))
+ then (: do not include translations :)
+ let $n-following :=
+ if ($e instance of element(tei:respStmt))
+ then count($e/following-sibling::tei:respStmt[tei:resp/@key=$e/tei:resp/@key][not(@corresp)])
+ else count($e/following-sibling::*[name()=$e/name()][not(@corresp)])
+ return (
+ element div {
+ tohtml:attributes($e, $params),
+ tohtml:bibliography(
+ if ($e instance of element(tei:respStmt)) then $e/(node() except tei:resp)
+ else $e/node(), $params)
+ },
+ text {
+ if ($e instance of element(tei:author) and $n-following=0)
+ then "." (: last name in a list :)
+ else if ($e instance of element(tei:editor) and $n-following=0)
+ then string-join((
+ " (ed",
+ if ($e/preceding-sibling::tei:editor) then "s" else (),
+ ".) "), "") (: editor :)
+ else if ($e instance of element(tei:respStmt) and $n-following=0) (: other responsibility :)
+ then string-join((" (",
+ lower-case($compile:contributor-types(($e/tei:resp/@key/string(), "edt")[1])),
+ if ($e/preceding-sibling::tei:respStmt[tei:resp/@key=$e/tei:resp/@key])
+ then "s" else (),
+ ")"), "")
+ else if ($n-following=1)
+ then " and " (: penultimate in list :)
+ else ", " (: first or middle name in a list :)
+ }
+ )
+ else ()
+};
+
+declare function tohtml:bibl-tei-surname(
+ $e as element(tei:surname),
+ $params as map(*)
+ ) as node()* {
+ let $rn := $e/../tei:roleName
+ where exists($rn)
+ return (tohtml:use-bibl($rn, $params), text { " " }),
+ let $fn := $e/../tei:foreName
+ where exists($fn)
+ return (tohtml:use-bibl($fn, $params), text { " " }),
+ let $nl := $e/../tei:nameLink
+ where exists($nl)
+ return (tohtml:use-bibl($nl, $params), text { " " }),
+ element div {
+ tohtml:attributes($e, $params),
+ tohtml:bibliography($e/node(), $params)
+ }
+};
+
+declare function tohtml:use-bibl(
+ $nodes as node()*,
+ $params as map(*)
+ ) as node()* {
+ for $node in $nodes
+ return
+ typeswitch($node)
+ case element(tei:forename)
+ return tohtml:use-bibl-tei-forename($node, $params)
+ case element(tei:nameLink)
+ return tohtml:use-bibl-any($node, $params)
+ case element(tei:roleName)
+ return tohtml:use-bibl-any($node, $params)
+ case text()
+ return $node
+ default return tohtml:use-bibl($node/node(), $params)
+};
+
+declare function tohtml:use-bibl-tei-forename(
+ $e as element(tei:forename),
+ $params as map(*)
+ ) as node()* {
+ if ($e/preceding-sibling::tei:forename)
+ then text { " " }
+ else (),
+ element span {
+ tohtml:attributes($e, $params),
+ tohtml:bibliography($e/node(), $params)
+ }
+};
+
+declare function tohtml:use-bibl-any(
+ $e as element(),
+ $params as map(*)
+ ) as node()* {
+ element span {
+ tohtml:attributes($e, $params),
+ tohtml:bibliography($e/node(), $params)
+ }
+};
+
+(: TODO: differentiate between different level titles :)
+declare function tohtml:bibl-tei-title(
+ $e as element(tei:title),
+ $params as map(*)
+ ) as node()* {
+ element div {
+ tohtml:attributes($e, $params),
+ tohtml:bibliography($e/node(), $params)
+ },
+ if ($e/@type="sub" and $e/following-sibling::*)
+ then text { " " }
+ else (),
+ text { ". " }
+};
+
+declare function tohtml:bibl-tei-meeting(
+ $e as element(tei:meeting),
+ $params as map(*)
+ ) as node()* {
+ text { " (" },
+ element div {
+ tohtml:attributes($e, $params),
+ tohtml:bibliography($e/node(), $params)
+ },
+ text { ")" },
+ if (exists($e/following-sibling::*))
+ then text { " " }
+ else ()
+};
+
+declare function tohtml:bibl-tei-date(
+ $e as element(tei:date),
+ $params as map(*)
+ ) as node()* {
+ if ($e/@type="access")
+ then text { "Accessed " }
+ else (),
+ element div {
+ tohtml:attributes($e, $params),
+ tohtml:bibliography($e/node(), $params)
+ },
+ if (exists($e/following-sibling::*))
+ then text { ". " }
+ else ()
+};
+
+declare function tohtml:bibl-tei-pubPlace(
+ $e as element(tei:pubPlace),
+ $params as map(*)
+ ) as node()* {
+ element div {
+ tohtml:attributes($e, $params),
+ tohtml:bibliography($e/node(), $params)
+ },
+ text {
+ if ($e/following-sibling::tei:pubPlace)
+ then ", "
+ else if ($e/../tei:publisher)
+ then ": "
+ else ". "
+ }
+};
+
+declare function tohtml:bibl-tei-publisher(
+ $e as element(tei:publisher),
+ $params as map(*)
+ ) as node()+ {
+ element div {
+ tohtml:attributes($e, $params),
+ tohtml:bibliography($e/node(), $params)
+ },
+ text { ". " }
+};
+
+declare function tohtml:bibl-tei-biblScope(
+ $e as element(tei:biblScope),
+ $params as map(*)
+ ) as node()+ {
+ if ($e/ancestor::tei:bibl)
+ then tohtml:bibliography($e/node(), $params)
+ else if ($e/@type="vol")
+ then
+ element div {
+ tohtml:attributes($e, $params),
+ tohtml:bibliography($e/node(), $params)
+ }
+ else if ($e/@type="chap")
+ then (
+ text { "chapter " },
+ element div {
+ tohtml:attributes($e, $params),
+ tohtml:bibliography($e/node(), $params)
+ }
+ )
+ else if ($e/@type="issue")
+ then (
+ text { " (" },
+ element div {
+ tohtml:attributes($e, $params),
+ tohtml:bibliography($e/node(), $params)
+ },
+ text { ") " }
+ )
+ else if ($e/@type="pp")
+ then (
+ if (contains($e, "-") or contains($e, "ff") or contains($e, " "))
+ then text { "pp. " }
+ else text { "p. " },
+ element div {
+ tohtml:attributes($e, $params),
+ tohtml:bibliography($e/node(), $params)
+ }
+ )
+ else
+ tohtml:bibliography($e/node(), $params),
+ if ($e/@type="vol" and $e/following-sibling::tei:biblScope)
+ then text { " " }
+ else if ($e/ancestor::tei:biblStruct)
+ then text { ". " }
+ else ()
+};
+
+declare function tohtml:bibl-tei-idno(
+ $e as element(tei:idno),
+ $params as map(*)
+ ) as node()* {
+ if ($e/@type=("doi", "isbn", "ISBN"))
+ then ()
+ else (
+ text { " " },
+ element div {
+ tohtml:attributes($e, $params),
+ tohtml:bibliography($e/node(), $params)
+ }
+ )
+};
+
+declare function tohtml:bibl-tei-biblStruct(
+ $e as element(tei:biblStruct),
+ $params as map(*)
+ ) as element() {
+ element div {
+ tohtml:attributes($e, $params),
+ element div {
+ attribute class { "bibl-authors" },
+ tohtml:bibliography($e/tei:*/tei:author, $params)
+ },
+ element div {
+ attribute class { "bibl-editors" },
+ tohtml:bibliography($e/tei:*/tei:editor, $params)
+ },
+ element div {
+ attribute class { "bibl-titles" },
+ tohtml:bibliography($e/(tei:analytic, tei:monogr, tei:series)/tei:title, $params)
+ },
+ tohtml:bibliography($e/tei:*/(tei:edition, tei:imprint), $params),
+ element div {
+ attribute class { "bibl-notes" },
+ tohtml:bibliography($e/tei:note, $params)
+ }
+ }
+};
+
+declare function tohtml:bibl-tei-note(
+ $e as element(tei:note),
+ $params as map(*)
+ ) as element() {
+ element div {
+ tohtml:attributes($e, $params),
+ (: apply in default mode :)
+ tohtml:tohtml($e/node(), $params)
+ }
+};
+
+declare function tohtml:bibl-tei-distributor(
+ $e as element(tei:distributor),
+ $params as map(*)
+ ) as node()+ {
+ text { "Distributed by " },
+ element div {
+ tohtml:attributes($e, $params),
+ tohtml:bibliography($e/node(), $params),
+ text { "." }
+ }
+};
+
+declare function tohtml:bibl-text(
+ $e as text(),
+ $params as map(*)
+ ) as text()? {
+ if ($e/ancestor::tei:name/descendant::text()[last()])
+ then $e (: last name in a list :)
+ else if (
+ some $text
+ in $e/(ancestor::tei:monogr|ancestor::tei:imprint|ancestor::tei:series|ancestor::tei:analytic)/*/
+ descendant::text()[last()]
+ satisfies $text is $e
+ )
+ then
+ (: last text node in any item of imprint :)
+ $e
+ else
+ tohtml:tohtml($e, $params)
+};
+
+(:~ generic element :)
+declare function tohtml:element(
+ $e as element(),
+ $params as map(*)
+ ) as element() {
+ element div {
+ tohtml:attributes($e, $params),
+ tohtml:tohtml($e/node(), $params)
+ }
+};
diff --git a/opensiddur-server/src/transforms/translit/translit.xqm b/opensiddur-server/src/transforms/translit/translit.xqm
new file mode 100644
index 00000000..cc3f5880
--- /dev/null
+++ b/opensiddur-server/src/transforms/translit/translit.xqm
@@ -0,0 +1,1121 @@
+xquery version "3.1";
+(:~ transliterator transform
+ : Copyright 2008-2010,2013 Efraim Feinstein, efraim@opensiddur.org
+ : Licensed under the GNU Lesser General Public License, version 3 or later
+ :)
+module namespace translit="http://jewishliturgy.org/transform/transliterator";
+
+import module namespace common="http://jewishliturgy.org/transform/common"
+ at "../../modules/common.xqm";
+import module namespace data="http://jewishliturgy.org/modules/data"
+ at "../../modules/data.xqm";
+import module namespace uri="http://jewishliturgy.org/transform/uri"
+ at "../../modules/follow-uri.xqm";
+
+
+declare namespace tei="http://www.tei-c.org/ns/1.0";
+declare namespace j="http://jewishliturgy.org/ns/jlptei/1.0";
+declare namespace tr="http://jewishliturgy.org/ns/tr/1.0";
+
+(:
+ Automated transliterator for Hebrew to Roman (or any other alphabet)
+ text.
+
+
Implementation details:
+ After substituting the Tetragrammaton for the appropriate pronunciation, a word is
+ split into independent characters, which are represented in XML as <tr:cc/> elements,
+ which are contained in tr:w elements. Each tr:w element should contain a grammatical word.
+ cc stands for "complex character."
+ This transliterator is a 6 pass processor:
+
+
The "zeroth" pass assembles the shin and shin/sin dots and marks first,
+ last letters of orthographic words and punctuation, and assembles the hiriq male-dagesh
+
The first pass assembles multicharacter vowels, such as shuruq, holam male, qamats-he
+
The second pass removes vowel letters that are ignored in transliteration
+
The third pass marks degeshim as hazak or kal; virtually doubles dagesh hazak
+
The fourth pass marks sheva as sheva na or sheva nach, using characters in the private use area
+
The fifth pass transliterates using a given table
+
+
+
Partial words that are broken up between elements must be enclosed
+ in tei:w elements, with a chain of @next attributes
+ pointing from the first part to the last.
+ (Partial words are not supported in standalone mode)
+:)
+
+declare variable $translit:hebrew := map {
+ "aleph" : "א",
+ "bet" : "ב",
+ "gimel" : "ג",
+ "dalet" : "ד",
+ "he" : "ה",
+ "vav" : "ו",
+ "zayin" : "ז",
+ "het" : "ח",
+ "tet" : "ט",
+ "yod" : "י",
+ "finalkaf" : "ך",
+ "kaf" : "כ",
+ "lamed" : "ל",
+ "finalmem" : "ם",
+ "mem" : "מ",
+ "finalnun" : "ן",
+ "nun" : "נ",
+ "samekh" : "ס",
+ "ayin" : "ע",
+ "finalpe" : "ף",
+ "pe" : "פ",
+ "finaltsadi" : "ץ",
+ "tsadi" : "צ",
+ "qof" : "ק",
+ "resh" : "ר",
+ "shin" : "ש",
+ "tav" : "ת",
+ "etnahta" : "֑",
+ "accentsegol" : "֒",
+ "shalshelet" : "֓",
+ "zaqefqatan" : "֔",
+ "zaqefgadol" : "֕",
+ "tipeha" : "֖",
+ "revia" : "֗",
+ "zarqa" : "֘",
+ "pashta" : "֙",
+ "yetiv" : "֚",
+ "tevir" : "֛",
+ "geresh" : "֜",
+ "gereshmuqdam" : "֝",
+ "gershayim" : "֞",
+ "qarneypara" : "֟",
+ "telishagedola" : "֠",
+ "pazer" : "֡",
+ "atnahhafukh" : "֢",
+ "munah" : "֣",
+ "mahapakh" : "֤",
+ "merkha" : "֥",
+ "merkhakefula" : "֦",
+ "darga" : "֧",
+ "qadma" : "֨",
+ "telishaqetana" : "֩",
+ "yerahbenyomo" : "֪",
+ "ole" : "֫",
+ "iluy" : "֬",
+ "dehi" : "֭",
+ "zinor" : "֮",
+ "masoracircle" : "֯",
+ "sheva" : "ְ",
+ "hatafsegol" : "ֱ",
+ "hatafpatah" : "ֲ",
+ "hatafqamats" : "ֳ",
+ "hiriq" : "ִ",
+ "tsere" : "ֵ",
+ "segol" : "ֶ",
+ "patah" : "ַ",
+ "qamats" : "ָ",
+ "holam" : "ֹ",
+ "holamhaserforvav" : "ֺ",
+ "qubuts" : "ֻ",
+ "dageshormapiq" : "ּ",
+ "meteg" : "ֽ",
+ "maqaf" : "־",
+ "rafe" : "ֿ",
+ "paseq" : "׀",
+ "shindot" : "ׁ",
+ "sindot" : "ׂ",
+ "sofpasuq" : "׃",
+ "upperdot" : "ׄ",
+ "lowerdot" : "ׅ",
+ "nunhafukha" : "׆",
+ "qamatsqatan" : "ׇ",
+ "punctuationgeresh" : "׳",
+ "punctuationgershayim" : "״",
+ "schwa" : "ə",
+ "lefthalfring" : "ʿ",
+ "righthalfring" : "ʾ",
+ "underline" : "̲",
+ "dotbelow" : "̣",
+ "acute" : "́",
+ "circumflex" : "̂",
+ "macron" : "̄",
+ "breve" : "̆",
+ "caron" : "̌",
+ "shevana" : "",
+ "shevanach" : "!",
+ "cgj" : "͏"
+};
+
+(:~ transliterate a document.
+ : @param $params Expected to include 'translit:table', a document node containing a transliteration table
+ :)
+declare function translit:transliterate-document(
+ $doc as document-node(),
+ $params as map(*)
+ ) as document-node() {
+ translit:transliterate($doc, $params)
+};
+
+
+(:~ Check if the given context item has a vowel or sheva
+ : (include shuruq and holam male) :)
+declare
+ %private
+ function translit:has-vowel(
+ $context as element(tr:cc)
+ ) as xs:boolean {
+ let $following := $context/following::tr:cc[1]
+ return
+ $context/(
+ (tr:s|tr:vu|tr:vl|tr:vs) or
+ $following[tr:cons=$translit:hebrew('vav') and
+ (tr:vl=$translit:hebrew('holam') or
+ (tr:d and not(tr:s|tr:vu|tr:vl|tr:vs)))]
+ )
+};
+
+declare function translit:assemble-word-reverse(
+ $nodes as node()*,
+ $params as map(*)
+ ) as node()* {
+ for $node in $nodes
+ return
+ typeswitch($node)
+ case element(tei:w) return translit:assemble-word-reverse-tei-w($node, $params)
+ case text() return $node
+ default return translit:assemble-word-reverse($node/node(), $params)
+};
+
+(:~
+ Find a whole word, reversing through the @next pointers.
+ When the first part is found, go into assemble-word mode.
+:)
+declare function translit:assemble-word-reverse-tei-w(
+ $context as element(tei:w),
+ $params as map(*)
+ ) as node()* {
+ let $context-abs-uri :=
+ uri:absolutize-uri(xs:anyURI(concat('#',$context/@xml:id)), $context)
+ let $backlink as element(tei:w)? :=
+ root($context)//tei:w[@next]
+ [uri:absolutize-uri(xs:anyURI(@next), .)=$context-abs-uri]
+ return
+ if ($backlink)
+ then
+ translit:assemble-word-reverse-tei-w($backlink, $params)
+ else
+ translit:assemble-word($context, $params)
+};
+
+declare function translit:assemble-word(
+ $nodes as node()*,
+ $params as map(*)
+ ) as node()* {
+ for $node in $nodes
+ return
+ typeswitch($node)
+ case element(tei:w) return translit:assemble-word-tei-w($node, $params)
+ case text() return translit:assemble-word-text($node, $params)
+ case element() return translit:identity($node, $params, translit:assemble-word#2)
+ default return translit:assemble-word($node/node(), $params)
+};
+
+(:~ Find a whole word, going forward through the @next
+ : pointers.
+ :)
+declare function translit:assemble-word-tei-w(
+ $context as element(tei:w),
+ $params as map(*)
+ ) {
+ translit:assemble-word($context/node(), $params),
+ if ($context/@next)
+ then
+ translit:assemble-word(uri:follow-uri($context/@next, $context, -1), $params)
+ else ()
+};
+
+(:~ Finds the textual part of a whole word;
+ : If it's from the context we're looking for, don't wrap it.
+ : If it isn't, wrap it in tr:ignore tags.
+ : Normalize all Unicode to be transliterated to NFKD
+ : @param $params Includes translit:this-context as node()
+ :)
+declare function translit:assemble-word-text(
+ $context as text(),
+ $params as map(*)
+ ) as node() {
+ if ($context=$params("translit:this-context"))
+ then
+ text { normalize-unicode($context, "NFKD") }
+ else
+ element tr:ignore { normalize-unicode($context, "NFKD") }
+};
+
+declare function translit:replace-tetragrammaton(
+ $nodes as node()*,
+ $params as map(*)
+ ) as node()* {
+ for $node in $nodes
+ return
+ typeswitch($node)
+ case text() return translit:replace-tetragrammaton-text($node, $params)
+ case element() return translit:identity($node, $params, translit:replace-tetragrammaton#2)
+ default return translit:replace-tetragrammaton($node/node(), $params)
+};
+
+(:~ Replaces appearances of the Tetragrammaton with their pronounced versions. Returns an xs:string.
+ : Will only work if the Tetragrammaton is a not broken up.
+ :)
+declare function translit:replace-tetragrammaton-text(
+ $context as text(),
+ $params as map(*)
+ ) as text() {
+ let $word as xs:string := $context/string()
+ let $regex := "(" || $translit:hebrew("yod") || "([" || $translit:hebrew("sheva") || "]?)([\P{L}]*)" ||
+ $translit:hebrew("he") || "([\P{L}]*)" ||
+ $translit:hebrew("vav") || "([" || $translit:hebrew("qamats") || $translit:hebrew("patah") ||
+ $translit:hebrew("hiriq") || "])([\P{L}]*)" ||
+ $translit:hebrew("he") || "([\P{L}]*)$)|(" ||
+ $translit:hebrew("yod") || "([" || $translit:hebrew("sheva") || "]?)" ||
+ $translit:hebrew("yod") || "[" || $translit:hebrew("qamats") || "]?$)"
+ let $replaced :=
+ for $a in analyze-string($word, $regex)/*
+ return
+ typeswitch ($a)
+ case element(fn:match)
+ return
+ if ($a//fn:group[@nr=5]=$translit:hebrew("hiriq"))
+ then
+ (: elohim :)
+ string-join(
+ ($translit:hebrew("aleph"),
+ if ($a//fn:group[@nr=2]=$translit:hebrew("sheva")) then $translit:hebrew("hatafsegol") else "",
+ $a//fn:group[@nr=3]/string(),
+ $translit:hebrew("lamed"),
+ $translit:hebrew("holam"),
+ $a//fn:group[@nr=4]/string(),
+ $translit:hebrew("he"),
+ $translit:hebrew("hiriq"),
+ $a//fn:group[@nr=6],
+ $translit:hebrew("finalmem"),
+ $a//fn:group[@nr=7]/string()
+ ),"")
+ else if ($a//fn:group[@nr=8])
+ then
+ (: adonai without cantillation :)
+ string-join(
+ ($translit:hebrew("aleph"),
+ if ($a//fn:group[@nr=9]=$translit:hebrew("sheva")) then $translit:hebrew("hatafpatah") else "",
+ $translit:hebrew("dalet"),
+ $translit:hebrew("holam"),
+ $translit:hebrew("nun"),
+ ($a//fn:group[@nr=5], $translit:hebrew("qamats"))[1],
+ $translit:hebrew("yod")
+ ), "")
+ else
+ (: adonai :)
+ string-join(
+ ($translit:hebrew("aleph"),
+ if ($a//fn:group[@nr=2]=$translit:hebrew("sheva")) then $translit:hebrew("hatafpatah") else "",
+ $a//fn:group[@nr=3]/string(),
+ $translit:hebrew("dalet"),
+ $translit:hebrew("holam"),
+ $a//fn:group[@nr=4]/string(),
+ $translit:hebrew("nun"),
+ $a//fn:group[@nr=5]/string(),
+ $a//fn:group[@nr=6]/string(),
+ $translit:hebrew("yod"),
+ $a//fn:group[@nr=7]/string()),"")
+ default (: non match :)
+ return $a/string()
+ return text { string-join($replaced, "") }
+};
+
+declare function translit:make-word(
+ $nodes as node()*,
+ $params as map(*)
+ ) as node()* {
+ for $node in $nodes
+ return
+ typeswitch($node)
+ case text() return translit:make-word-text($node, $params)
+ case element() return translit:identity($node, $params, translit:make-word#2)
+ default return translit:make-word($node/node(), $params)
+};
+
+declare %private function translit:make-word-helper(
+ $sequence as element()*
+ ) {
+ if (empty($sequence))
+ then ()
+ else if ($sequence[1] instance of element(tr:cons))
+ then
+ let $following := translit:make-word-helper(subsequence($sequence, 2))
+ return (
+ element tr:cc {
+ $sequence[1],
+ $following/self::* except $following/self::tr:cc
+ },
+ $following/self::tr:cc
+ )
+ else (
+ $sequence[1],
+ translit:make-word-helper(subsequence($sequence, 2))
+ )
+};
+
+(:~
+ Make a tr:w word filled with tr:cc "complex characters."
+ The result must be processed further to make all of these correct.
+
+ A set of complex characters consists of the following elements in the "urn:transliterator" namespace:
+
+
cons: consonant
+
s: sheva
+
vu: ultrashort vowel
+
vs: short vowel
+
vl: long vowel
+
d: dagesh or rafe
+
dot:shin/sin dot
+
m: meteg
+
al: lower accent
+
am: "mid accent" - Unicode character class between 220 and 230, exclusive
+
ah: high accent
+
+
+ The context is the content of the Hebrew word to be converted, which is a Unicode string inside tr:w
+:)
+declare function translit:make-word-text(
+ $context as text(),
+ $params as map(*)
+ ) as element()* {
+ let $word as xs:string := $context/string()
+ let $consonants :=
+ "([\p{Lo}\p{Po}" || $translit:hebrew("cgj") || "])"
+ let $sheva :=
+ "([" || $translit:hebrew("sheva") || "])"
+ let $ultrashort :=
+ "([" || $translit:hebrew("hatafsegol") || "-" || $translit:hebrew("hatafqamats") || "])"
+ let $short :=
+ "([" || $translit:hebrew("hiriq") || $translit:hebrew("segol") || $translit:hebrew("patah") || $translit:hebrew("qamatsqatan") || $translit:hebrew("qubuts") || "])"
+ let $long :=
+ "([" || $translit:hebrew("tsere") || $translit:hebrew("qamats") || $translit:hebrew("holam") || $translit:hebrew("holamhaserforvav") || "])"
+ let $dagesh :=
+ "([" || $translit:hebrew("dageshormapiq") || $translit:hebrew("rafe") || "])"
+ let $meteg :=
+ "([" || $translit:hebrew("meteg") || "])"
+ let $dot :=
+ "([" || $translit:hebrew("shindot") || $translit:hebrew("sindot") || "])"
+ let $low-accent :=
+ "([" || $translit:hebrew("etnahta") || $translit:hebrew("tevir") || $translit:hebrew("atnahhafukh") || $translit:hebrew("munah") || $translit:hebrew("mahapakh") || $translit:hebrew("merkha") || $translit:hebrew("merkhakefula") || $translit:hebrew("darga") || $translit:hebrew("yerahbenyomo") || $translit:hebrew("lowerdot") || $translit:hebrew("tipeha") || "])"
+ let $mid-accent :=
+ "([" || $translit:hebrew("dehi") || $translit:hebrew("yetiv") || $translit:hebrew("zinor") || "])"
+ let $high-accent :=
+ "([" || $translit:hebrew("geresh") || $translit:hebrew("shalshelet") || $translit:hebrew("accentsegol") || $translit:hebrew("ole") || $translit:hebrew("iluy") || $translit:hebrew("pazer") || $translit:hebrew("qadma") || $translit:hebrew("zaqefqatan") || $translit:hebrew("zaqefgadol") || $translit:hebrew("telishaqetana") || $translit:hebrew("telishagedola") || $translit:hebrew("qarneypara") || $translit:hebrew("gershayim") || $translit:hebrew("gereshmuqdam") || $translit:hebrew("revia") || $translit:hebrew("zarqa") || $translit:hebrew("pashta") || $translit:hebrew("upperdot") || "])"
+ let $characters :=
+ element tr:characters {
+ for $cp in string-to-codepoints($word)
+ let $c := codepoints-to-string($cp)
+ return
+ if (matches($c, $consonants))
+ then element tr:cons { $c }
+ else if (matches($c, $sheva))
+ then element tr:s { $c }
+ else if (matches($c, $ultrashort))
+ then element tr:vu { $c }
+ else if (matches($c, $short))
+ then element tr:vs { $c }
+ else if (matches($c, $long))
+ then element tr:vl { $c }
+ else if (matches($c, $dagesh))
+ then element tr:d { $c }
+ else if (matches($c, $meteg))
+ then element tr:m { $c }
+ else if (matches($c, $dot))
+ then element tr:dot { $c }
+ else if (matches($c, $low-accent))
+ then element tr:al { $c }
+ else if (matches($c, $mid-accent))
+ then element tr:am { $c }
+ else if (matches($c, $high-accent))
+ then element tr:ah { $c }
+ else (
+ element tr:nomatch { $c },
+ util:log-system-err(string-join((
+ "Encountered a character (", $c, "=#", $cp, ") in your Hebrew text in the word ", $word, "that doesn't match any known pattern in Hebrew. This is either a typo or a bug in the transliterator."), ""))
+ )
+ }
+ return translit:make-word-helper($characters/*)
+};
+
+(:~ @param $params translit:table as element(tr:table) :)
+declare function translit:transliterate-final(
+ $nodes as node()*,
+ $params as map(*)
+ ) as node()* {
+ let $table as element(tr:table)? := $params("translit:table")
+ for $node in $nodes
+ return
+ typeswitch($node)
+ case element() return
+ (: this has to work as a cascade, to simulate next-match :)
+ if ($node/parent::tr:cc[@virtual] and
+ ($table/tr:tr[@from=$node/string()]/@double=('no','false','off'))
+ )
+ then ((: suppressed virtual doubling :))
+ else if (
+ $node instance of element(tr:cc) or
+ $node instance of element(tr:silent) or
+ $node instance of element(tr:w)
+ )
+ then translit:transliterate-final-continue($node, $params)
+ else if (
+ ($node instance of element (tr:cons) and $node[not(tr:suppress) and following-sibling::tr:d])
+ and not(contains($node/string(), $translit:hebrew("dageshormapiq") or $node/string()=$translit:hebrew("vav")))
+ )
+ then translit:transliterate-final-different-by-dagesh($node, $params)
+ else if (
+ $node instance of element(tr:ignore) or
+ $node instance of element(tr:suppress) or
+ $node/tr:suppress
+ )
+ then translit:transliterate-final-ignored($node, $params)
+ else if ($node[not(tr:suppress) and not(parent::tr:silent)])
+ then translit:transliterate-final-non-ignored($node, $params)
+ else if ($node instance of element(tr:cons) and $node[parent::tr:silent])
+ then translit:transliterate-final-silent($node, $params)
+ else translit:identity($node, $params, translit:transliterate-final#2)
+ case text() return $node
+ default return translit:transliterate-final($node/node(), $params)
+};
+
+(:~ continue... :)
+declare function translit:transliterate-final-continue(
+ $context as element(),
+ $params as map(*)
+ ) as node()* {
+ translit:transliterate-final($context/node(), $params)
+};
+
+(:~ If a dagesh letter requires a different transliteration
+ : because it has a dagesh, transliterate it here
+ :)
+declare function translit:transliterate-final-different-by-dagesh(
+ $context as element(),
+ $params as map(*)
+ ) as text() {
+ let $table as element(tr:table)? := $params("translit:table")
+ let $text := $context/string()
+ return text {
+ (
+ $table/tr:tr[@from=concat($text, $translit:hebrew("dageshormapiq"))],
+ $table/tr:tr[@from=$text]
+ )[1]/@to/string()
+ }
+};
+
+(:~ silent letter: use @silent instead of @to :)
+declare function translit:transliterate-final-silent(
+ $context as element(tr:cons),
+ $params as map(*)
+ ) as text()? {
+ let $table as element(tr:table)? := $params("translit:table")
+ return text {
+ $table/tr:tr[@from=$context/string()]/@silent/string()
+ }
+};
+
+(:~
+ : Transliterate non-ignored text from the table
+ : @param $params "translit:table" as element(tr:table)
+ :)
+declare function translit:transliterate-final-non-ignored(
+ $context as element(),
+ $params as map(*)
+ ) as text()? {
+ let $table as element(tr:table)? := $params("translit:table")
+ let $text := $context/string()
+ return text {
+ $table/tr:tr[@from=$text]/@to/string()
+ }
+};
+
+(:~ Ignore text under tr:ignore/tr:suppress :)
+declare function translit:transliterate-final-ignored(
+ $context as element(),
+ $params as map(*)
+ ) as empty-sequence() {
+ ()
+};
+
+(:~ @param $params must include a "translit:table" parameter that contains a tr:table element :)
+declare function translit:transliterate(
+ $nodes as node()*,
+ $params as map(*)
+ ) as node()* {
+ for $node in $nodes
+ return
+ typeswitch($node)
+ case document-node() return document { translit:transliterate($node/node(), $params) }
+ case text() return translit:transliterate-text($node, $params)
+ case element() return translit:identity($node, $params, translit:transliterate#2)
+ default return translit:transliterate($node/node(), $params)
+};
+
+(:~ transliterate raw text
+ : @param $params translit:table as element(tr:table)
+ :)
+declare function translit:transliterate-text(
+ $context as text(),
+ $params as map(*)
+ ) as text()? {
+ text {
+ string-join((
+ let $table as element(tr:table)? := $params("translit:table")
+ return
+ if (empty($table))
+ then
+ $context
+ else
+ for $token in analyze-string($context/string(), "\S+")/*
+ return
+ typeswitch($token)
+ case element(fn:match) return
+ let $original := $token/string()
+ let $replaced-tetragrammaton as element(tr:w) :=
+ let $whole-word as element(tr:w) :=
+ element tr:w {
+ if ($context/ancestor::tei:w)
+ then translit:assemble-word-reverse($context/ancestor::tei:w, map:put($params, "translit:this-context", $context ))
+ else $original
+ }
+ return
+ if (not($table/tr:option
+ [@name='replace-tetragrammaton'][@value=('off','false','no')])
+ )
+ then
+ translit:replace-tetragrammaton($whole-word, $params)
+ else $whole-word
+ let $complex-character-word as element(tr:w)? :=
+ translit:make-word($replaced-tetragrammaton, $params)
+ where (exists($complex-character-word))
+ return
+ let $pass0-result as element(tr:w) :=
+ translit:pass0($complex-character-word, $params)
+ let $pass1-result as element(tr:w) :=
+ translit:pass1($pass0-result, $params)
+ let $pass2-result as element(tr:w) :=
+ translit:pass2($pass1-result, $params)
+ let $pass3-result as element(tr:w) :=
+ translit:pass3($pass2-result, $params)
+ let $pass4-result as element(tr:w) :=
+ translit:pass4($pass3-result, $params)
+ return translit:transliterate-final($pass4-result, $params)
+ default return $token/string() (: whitespace :)
+ ), "")
+ }
+};
+
+declare function translit:pass0(
+ $nodes as node()*,
+ $params as map(*)
+ ) as node()* {
+ for $node in $nodes
+ return
+ typeswitch($node)
+ case element(tr:cc) return translit:pass0-tr-cc($node, $params)
+ case element() return translit:identity($node, $params, translit:pass0#2)
+ case text() return $node
+ default return translit:pass0($node/node(), $params)
+};
+
+(:~ Mark first and last in word with @first or @last; punctuation is marked with @punct; combine shin/sin dot :)
+declare function translit:pass0-tr-cc(
+ $context as element(tr:cc),
+ $params as map(*)
+ ) as element(tr:cc) {
+ let $following := $context/following::tr:cc[1]
+ let $preceding := $context/preceding::tr:cc[1]
+ return
+ $context/
+ element tr:cc {
+ @*,
+ (: mark position; can't use position() because there may be other elements in the hierarchy! :)
+ if (not($preceding) or $preceding/tr:cons[matches(.,'\p{P}')])
+ then
+ attribute first { 1 }
+ else (),
+ if (matches(tr:cons/text(),'\p{P}'))
+ then
+ attribute punct { 1 }
+ else (),
+ if (not($following) or $following/tr:cons[matches(.,'\p{P}')])
+ then
+ attribute last { 1 }
+ else (),
+ (: shin/sin dot :)
+ if (tr:dot)
+ then (
+ element tr:cons {
+ concat(tr:cons, tr:dot)
+ },
+ * except (tr:cons, tr:dot)
+ )
+ else *
+ }
+};
+
+declare function translit:pass1(
+ $nodes as node()*,
+ $params as map(*)
+ ) as node()* {
+ for $node in $nodes
+ let $preceding := $node/preceding::tr:cc[1]
+ let $following := $node/following::tr:cc[1]
+ let $following2 := $node/following::tr:cc[2]
+ return
+ typeswitch ($node)
+ case element(tr:cc) return
+ if ($node[@last][tr:vs=$translit:hebrew("patah")])
+ then translit:pass1-furtive-patah($node, $params)
+ else if (
+ $node
+ [not(tr:vs|tr:s|tr:vl|tr:vu)]
+ [$following[tr:cons=$translit:hebrew("vav")][tr:vl=$translit:hebrew("holam")]]
+ )
+ then translit:pass1-preceding-holam-male($node, $params)
+ else if ($node[tr:cons=$translit:hebrew("vav")][tr:vl=$translit:hebrew("holam")])
+ then translit:pass1-vav-haluma($node, $params)
+ else if (
+ $node
+ [not(tr:vs|tr:s|tr:vl|tr:vu)]
+ [$following
+ [tr:cons=$translit:hebrew("vav")]
+ [tr:d=$translit:hebrew("dageshormapiq")]
+ [not($following2
+ [tr:cons=$translit:hebrew("vav")][tr:d=$translit:hebrew("dageshormapiq")])]]
+ )
+ then translit:pass1-preceding-shuruq($node, $params)
+ else if (
+ $node
+ [tr:cons=$translit:hebrew("vav")]
+ [tr:d=$translit:hebrew("dageshormapiq")]
+ [not(tr:vl|tr:vs|tr:s)]
+ [not($following
+ [tr:cons=$translit:hebrew("vav")]
+ [tr:d=$translit:hebrew("dageshormapiq") or tr:vl=$translit:hebrew("holam")])
+ ])
+ then translit:pass1-vav-with-dagesh($node, $params)
+ else if (
+ $node
+ [tr:vs=($translit:hebrew("hiriq"),$translit:hebrew("segol")) or tr:vl=$translit:hebrew("tsere")]
+ [$following[tr:cons=$translit:hebrew("yod")][tr:d or not(translit:has-vowel(.))]]
+ )
+ then translit:pass1-male-vowels($node, $params)
+ else if (
+ $node
+ [tr:cons=$translit:hebrew("yod")]
+ [not(tr:s|tr:d|tr:vl|tr:vs|tr:vu)]
+ [$preceding
+ [tr:vs=($translit:hebrew("hiriq"),$translit:hebrew("segol")) or tr:vl=$translit:hebrew("tsere")]
+ [not($following
+ [tr:cons=$translit:hebrew("vav")]
+ [((tr:d and not(tr:vl|tr:vs|tr:vu|tr:s)) or tr:vl=$translit:hebrew("holam")) ])]
+ ])
+ then translit:pass1-male-vowels-yod($node, $params)
+ else if (
+ $node
+ [tr:vl=$translit:hebrew("qamats")]
+ [$following
+ [tr:cons=$translit:hebrew("he")][not(tr:d)][not(translit:has-vowel(.))]])
+ then translit:pass1-qamats-vowel-letter($node, $params)
+ else if (
+ $node
+ [tr:cons=$translit:hebrew("he")]
+ [not(translit:has-vowel(.))]
+ [not(tr:d)]
+ [$preceding[tr:vl=$translit:hebrew("qamats")]]
+ )
+ then translit:pass1-vowel-letter-he($node, $params)
+ else translit:identity($node, $params, translit:pass1#2)
+ case element() return translit:identity($node, $params, translit:pass1#2)
+ case text() return $node
+ default return translit:pass1($node/node(), $params)
+};
+
+(:~ Furtive patah. Reverses the vowel and consonant order. :)
+declare function translit:pass1-furtive-patah(
+ $context as element(tr:cc),
+ $params as map(*)
+ ) as element(tr:cc) {
+ $context/
+ element tr:cc {
+ @*,
+ if (tr:cons=(
+ $translit:hebrew("aleph"),
+ $translit:hebrew("he"),
+ $translit:hebrew("het"),
+ $translit:hebrew("ayin"),
+ $translit:hebrew("resh")
+ ))
+ then
+ (tr:vs,tr:cons,* except (tr:vs,tr:cons))
+ else *
+ }
+};
+
+(:~ Complex character preceding a holam male. Adds the holam male. :)
+declare function translit:pass1-preceding-holam-male(
+ $context as element(tr:cc),
+ $params as map(*)
+ ) as element(tr:cc) {
+ $context/
+ element tr:cc {
+ @* except @last,
+ (@last, following::tr:cc[1]/@last)[1], (: holam male can't be first or punct :)
+ tr:cons,
+ element tr:vl { $translit:hebrew("vav") || $translit:hebrew("holam") },
+ * except tr:cons
+ }
+};
+
+(:~ vav with holam - remove (it's a typographic convention for holam male).
+ : For vav haluma use HEBREW VOWEL HOLAM FOR VAV instead
+ :)
+declare function translit:pass1-vav-haluma(
+ $context as element(tr:cc),
+ $params as map(*)
+ ) as empty-sequence() {
+ ()
+};
+
+(:~ Complex character preceding a shuruq; adds the shuruq; ignore two "possible" shuruqs in a row - first is not a shuruq :)
+declare function translit:pass1-preceding-shuruq(
+ $context as element(tr:cc),
+ $params as map(*)
+ ) as element(tr:cc) {
+ $context/
+ element tr:cc {
+ (@last, following::tr:cc[1]/@last)[1],
+ @* except @last,
+ tr:cons,
+ tr:d,
+ element tr:vl { $translit:hebrew("vav") || $translit:hebrew("dageshormapiq") },
+ * except (tr:cons,tr:d)
+ }
+};
+
+(:~
+ : vav with dagesh.
+ : At beginning of word - replace the current cc with a shuruq vowel only;
+ : if the preceding consonant has no vowel, it's a shuruq and should be ignored;
+ : otherwise, it gets copied wholesale because it's a vav with dagesh; ignores first vav-dagesh
+ :)
+declare function translit:pass1-vav-with-dagesh(
+ $context as element(tr:cc),
+ $params as map(*)
+ ) as element(tr:cc)? {
+ let $preceding := $context/preceding::tr:cc[1]
+ return
+ $context/(
+ if (@first)
+ then
+ element tr:cc {
+ @*,
+ element tr:vl { $translit:hebrew("vav") || $translit:hebrew("dageshormapiq") },
+ * except (tr:cons, tr:d)
+ }
+ else if ($preceding[not(tr:s|tr:vs|tr:vl|tr:vu)])
+ then ()
+ else .
+ )
+};
+
+(:~ Hiriq male or long versions of tsere and segol :)
+declare function translit:pass1-male-vowels(
+ $context as element(tr:cc),
+ $params as map(*)
+ ) as element(tr:cc) {
+ (: note: a bug in eXist *somewhere* is preventing the context from being preserved in this function :)
+ $context/(
+ let $table as element(tr:table) := $params("translit:table")
+ let $vowel-male as element() :=
+ element tr:vl {
+ string-join((
+ $context/(tr:vs,tr:vl),
+ $translit:hebrew("yod"),
+ if ($context/tr:vs=$translit:hebrew("hiriq") and
+ $context/following::tr:cc[1]/tr:d and
+ $table/tr:tr[@from=($translit:hebrew("hiriq") || $translit:hebrew("yod") || $translit:hebrew("dageshormapiq"))])
+ then $translit:hebrew("dageshormapiq")
+ else ()
+ ), "")
+ }
+ return
+ element tr:cc {
+ $context/following::tr:cc[1]/@last,
+ $context/(@* except @last),
+ $context/tr:cons,
+ $vowel-male,
+ $context/(* except (tr:cons,tr:vs,tr:vl))
+ }
+ )
+};
+
+(:~ Hiriq male and similar, remove the yod (but not when it has a dagesh) :)
+declare function translit:pass1-male-vowels-yod(
+ $context as element(tr:cc),
+ $params as map(*)
+ ) as empty-sequence() {
+ ()
+};
+
+(:
+ : Check if a qamats is a vowel letter.
+ : Removed @last condition on following tr:cc.
+ : Has to prevent next letter from having a vowel itself or shuruq/holam male
+ :)
+declare function translit:pass1-qamats-vowel-letter(
+ $context as element(tr:cc),
+ $params as map(*)
+ ) as element(tr:cc) {
+ $context/
+ element tr:cc {
+ (@last, following::tr:cc[1]/@last)[1],
+ @* except @last,
+ tr:cons,
+ element tr:vl { $translit:hebrew("qamats") || $translit:hebrew("he") },
+ * except (tr:cons,tr:vl)
+ }
+};
+
+(:~ Remove the vowel letter he :)
+declare function translit:pass1-vowel-letter-he(
+ $context as element(tr:cc),
+ $params as map(*)
+ ) as element(tr:silent) {
+ element tr:silent {
+ $context/tr:cons
+ }
+};
+
+declare function translit:pass2(
+ $nodes as node()*,
+ $params as map(*)
+ ) as node()* {
+ for $node in $nodes
+ let $following := $node/following::tr:cc[1]
+ let $preceding := $node/preceding::tr:cc[1]
+ return
+ typeswitch($node)
+ case element(tr:cc) return
+ if (
+ $node
+ [not(@first|@punct)]
+ [not(translit:has-vowel(.))]
+ [$following
+ [tr:cons=($translit:hebrew("he"),$translit:hebrew("aleph"))]
+ [not(tr:d)]
+ [not(translit:has-vowel(.))]
+ [not(@last) ]]
+ )
+ then translit:pass2-preceding-silent($node, $params)
+ else if (
+ $node
+ [tr:cons=$translit:hebrew("aleph")]
+ [not(tr:d)]
+ [not(translit:has-vowel(.))]
+ [not($preceding[tr:s|tr:vs|tr:vu|tr:vl]) or (not(@last))]
+ [not(@first|@punct)]
+ )
+ then translit:pass2-silent-letter($node, $params)
+ else translit:identity($node, $params, translit:pass2#2)
+ case element() return translit:identity($node, $params, translit:pass2#2)
+ case text() return $node
+ default return translit:pass2($node/node(), $params)
+};
+
+(:~ Put a vowel on the preceding letter when a silent letter is
+ : about to be removed.
+ :)
+declare function translit:pass2-preceding-silent(
+ $context as element(tr:cc),
+ $params as map(*)
+ ) as element(tr:cc) {
+ $context/
+ element tr:cc {
+ (@last, following::tr:cc[1]/@last)[1],
+ @* except @last,
+ tr:cons,
+ * except tr:cons
+ }
+};
+
+(:~ Remove silent letters in the second pass.
+ :
+ : The silent letter may actually have a vowel after the first pass (HOW!?),
+ : which should be moved (by another function) to the preceding letter
+ :)
+declare function translit:pass2-silent-letter(
+ $context as element(tr:cc),
+ $params as map(*)
+ ) as element(tr:silent) {
+ element tr:silent { $context/tr:cons }
+};
+
+declare function translit:pass3(
+ $nodes as node()*,
+ $params as map(*)
+ ) as node()* {
+ for $node in $nodes
+ return
+ typeswitch($node)
+ case element(tr:cc) return
+ if ($node
+ [tr:d=$translit:hebrew("dageshormapiq")]
+ [not(tr:cons[.=$translit:hebrew("he")][@last])]
+ )
+ then translit:pass3-identify-dagesh($node, $params)
+ else translit:identity($node, $params, translit:pass3#2)
+ case element() return translit:identity($node, $params, translit:pass3#2)
+ case text() return $node
+ default return translit:pass3($node/node(), $params)
+};
+
+(:~ Try to find whether a dagesh is a kal or hazak.
+ : If hazak, double the letter by adding a "virtual" complex
+ : character before the current one, otherwise join the dagesh
+ : to the consonant.
+ :)
+declare function translit:pass3-identify-dagesh(
+ $context as element(tr:cc),
+ $params as map(*)
+ ) as element(tr:cc)+ {
+ (: dagesh kal if begedkeft letter at beginning of word or after sheva(nach) :)
+ let $is-bgdkft as xs:boolean :=
+ $context/tr:cons=(
+ $translit:hebrew("bet"),
+ $translit:hebrew("gimel"),
+ $translit:hebrew("dalet"),
+ $translit:hebrew("finalkaf"),
+ $translit:hebrew("kaf"),
+ $translit:hebrew("finalpe"),
+ $translit:hebrew("pe"),
+ $translit:hebrew("tav")
+ )
+ let $is-dagesh-kal as xs:boolean :=
+ ($is-bgdkft) and $context/(@first or preceding::tr:cc[1]/tr:s)
+ let $new-consonant as element(tr:cons) :=
+ element tr:cons {
+ string-join((
+ $context/tr:cons,
+ $context/tr:d[$is-bgdkft]
+ ), "")
+ }
+ return
+ if ($is-dagesh-kal)
+ then
+ $context/
+ element tr:cc {
+ @*,
+ $new-consonant,
+ * except (tr:cons,tr:d)
+ }
+ else $context/(
+ element tr:cc {
+ attribute virtual { 1 },
+ @first,
+ $new-consonant,
+ (: virtual doubling of a vav should not cause a vowel-shuruq to be printed :)
+ if (not(tr:cons=$translit:hebrew("vav"))) then tr:d else (),
+ element tr:s { $translit:hebrew("shevanach") }
+ },
+ element tr:cc {
+ @* except @first,
+ $new-consonant,
+ if (not(tr:cons=$translit:hebrew("vav"))) then tr:d else (),
+ * except (tr:cons, tr:d)
+ }
+ )
+};
+
+declare function translit:pass4(
+ $nodes as node()*,
+ $params as map(*)
+ ) as node()* {
+ for $node in $nodes
+ return
+ typeswitch($node)
+ case element(tr:cc) return
+ if ($node[tr:s=$translit:hebrew("sheva")])
+ then translit:pass4-identify-sheva($node, $params)
+ else translit:identity($node, $params, translit:pass4#2)
+ case element() return translit:identity($node, $params, translit:pass4#2)
+ case text() return $node
+ default return translit:pass4($node/node(), $params)
+};
+
+(:~ Determine if an indeterminate sheva is na or nach.
+ :
+ : Rules:
+ :
+ :
First letter in word
+ :
Preceding letter had a long vowel or sheva and not last
+ : letter in word
+ :
Next letter is not last and with sheva (not the first in a
+ : doubly closed syllable)
+ :
First consonant in a sequence of two identical consonants
+ :
+ :
+ :)
+declare function translit:pass4-identify-sheva(
+ $context as element(tr:cc),
+ $params as map(*)
+ ) as element(tr:cc) {
+ $context/
+ element tr:cc {
+ @*,
+ tr:cons,
+ (: removed tr:s and @last from following::tr:cc[1][tr:s] :)
+ element tr:s {
+ let $following := following::tr:cc[1]
+ let $preceding := preceding::tr:cc[1]
+ return
+ if (
+ (@first
+ or $preceding[tr:vl|tr:s]
+ and not(@last))
+ and not($following/tr:s)
+ or (tr:cons=$following/tr:cons)
+ )
+ then $translit:hebrew("shevana")
+ else $translit:hebrew("shevanach")
+ },
+ * except (tr:cons, tr:s)
+ }
+};
+
+(:~ By default, pass on what already exists in all modes. :)
+declare function translit:identity(
+ $context as element(),
+ $params as map(*),
+ $mode as function(node()*,map(*)) as node()*
+ ) as node()* {
+ element { QName(namespace-uri($context), name($context)) }{
+ $context/(@* except @xml:lang),
+ $mode($context/node(), $params)
+ }
+};
+
+(:~ utility function to get a transliteration table by name and languages :)
+declare function translit:get-table(
+ $context as node(),
+ $table-name as xs:string,
+ $lang-in as xs:string?,
+ $lang-out as xs:string?
+ ) as element(tr:table)? {
+ let $tr-doc := data:doc("transliteration", $table-name)
+ let $lang-in := ($lang-in, common:language($context))[1]
+ let $in-table-langs := $tr-doc/tr:schema/tr:table/tr:lang[$lang-in=tr:lang]
+ let $lang-out := ($lang-out, $in-table-langs[1]/@out/string(), $lang-in || "-Latn")[1]
+ return
+ $tr-doc/tr:schema/
+ tr:table[tr:lang[$lang-in=@in][$lang-out=@out]]
+};
diff --git a/opensiddur-server/src/transforms/unflatten.xqm b/opensiddur-server/src/transforms/unflatten.xqm
new file mode 100644
index 00000000..a75cfdef
--- /dev/null
+++ b/opensiddur-server/src/transforms/unflatten.xqm
@@ -0,0 +1,299 @@
+xquery version "3.1";
+(:~
+ : Modes to unflatten a flattened hierarchy.
+ :
+ : Open Siddur Project
+ : Copyright 2013-2014 Efraim Feinstein
+ : Licensed under the GNU Lesser General Public License, version 3 or later
+ :
+ :)
+module namespace unflatten='http://jewishliturgy.org/transform/unflatten';
+
+import module namespace common="http://jewishliturgy.org/transform/common"
+ at "../modules/common.xqm";
+
+declare namespace tei="http://www.tei-c.org/ns/1.0";
+declare namespace j="http://jewishliturgy.org/ns/jlptei/1.0";
+declare namespace jf="http://jewishliturgy.org/ns/jlptei/flat/1.0";
+
+(:~ exclude attributes added by flattening :)
+declare %private function unflatten:attributes-except-flatten(
+ $e as element()
+ ) as node()* {
+ $e/@* except (
+ $e/@jf:start, $e/@jf:end, $e/@jf:continue, $e/@jf:suspend,
+ $e/@jf:position, $e/@jf:relative, $e/@jf:nchildren,
+ $e/@jf:nlevels, $e/@jf:nprecedents
+ )
+};
+
+(:~ a list of elements that are closed in $sequence,
+ : but not opened :)
+declare function unflatten:unopened-tags(
+ $sequence as node()*
+ ) as element()* {
+ for $node in $sequence[@jf:suspend|@jf:end]
+ let $id := $node/(@jf:suspend, @jf:end)
+ let $prec := common:preceding($node, $sequence)
+ where empty(
+ $prec[(@jf:start,@jf:continue)=$id]
+ )
+ return $node
+};
+
+(:~ a sequence of elements that are open in $sequence,
+ : but never closed
+ :)
+declare function unflatten:unclosed-tags(
+ $sequence as node()*
+ ) as element()* {
+ for $node in $sequence[@jf:start|@jf:continue]
+ let $id := $node/(@jf:start, @jf:continue)
+ let $fol := common:following($node, $sequence)
+ where empty(
+ $fol[(@jf:suspend,@jf:end)=$id]
+ )
+ return $node
+};
+
+(: if the merged element contains a parallel structure,
+ : initiate a transform to suspend open elements at parallel boundaries
+ : and continue them inside
+ :)
+declare function unflatten:parallel-suspend-and-continue(
+ $e as element(jf:merged),
+ $params as map(*)
+ ) as element(jf:merged) {
+ if (exists($e/jf:parallelGrp))
+ then
+ element jf:merged {
+ $e/@*,
+ unflatten:iterate-parallel-suspend-and-continue(
+ $e/node(),
+ (),
+ (),
+ $params
+ )
+ }
+ else $e
+};
+
+declare function unflatten:iterate-parallel-suspend-and-continue(
+ $sequence as node()*,
+ $opened-elements as element()*,
+ $suspended-elements as element()*,
+ $params as map(*)
+ ) as node()* {
+ let $s := $sequence[1]
+ where exists($s)
+ return (
+ typeswitch($s)
+ case element()
+ return
+ if ($s/self::jf:parallelGrp[@jf:start|@jf:continue]
+ or $s/self::jf:parallel[@jf:end|@jf:suspend])
+ then (
+ unflatten:continue-or-suspend($opened-elements, "suspend"),
+ $s,
+ unflatten:iterate-parallel-suspend-and-continue(
+ subsequence($sequence, 2),
+ (),
+ $opened-elements, (: open elements are now suspended :)
+ $params
+ )
+ )
+ else if ($s/self::jf:parallelGrp[@jf:end|@jf:suspend]
+ or $s/self::jf:parallel[@jf:start|@jf:continue])
+ then (
+ $s,
+ unflatten:continue-or-suspend($suspended-elements, "continue"),
+ unflatten:iterate-parallel-suspend-and-continue(
+ subsequence($sequence, 2),
+ $suspended-elements, (: suspended elements are now open :)
+ (),
+ $params
+ )
+ )
+ else (: other element :)
+ let $next-opened-elements :=
+ if ($s/@jf:start|$s/@jf:continue)
+ then ($opened-elements, $s)
+ else if ($s/@jf:end|$s/@jf:suspend)
+ then
+ $opened-elements[not((@jf:start,@jf:continue)=$s/(@jf:suspend, @jf:end))]
+ else $opened-elements
+ return ($s,
+ unflatten:iterate-parallel-suspend-and-continue(
+ subsequence($sequence, 2),
+ $next-opened-elements,
+ $suspended-elements,
+ $params
+ )
+ )
+ default
+ return ($s,
+ unflatten:iterate-parallel-suspend-and-continue(
+ subsequence($sequence, 2),
+ $opened-elements,
+ $suspended-elements,
+ $params
+ )
+ )
+ )
+};
+
+declare function unflatten:continue-or-suspend(
+ $tags as element()*,
+ $type as xs:string
+ ) as element()* {
+ for $tag in $tags
+ return
+ element { QName(namespace-uri($tag), name($tag)) }{
+ attribute { "jf:" || $type }{
+ $tag/(@jf:start, @jf:continue, @jf:suspend, @jf:end)
+ },
+ $tag/(@* except (@jf:start, @jf:end, @jf:continue, @jf:suspend))
+ }
+};
+
+declare function unflatten:unflatten-document(
+ $doc as document-node(),
+ $params as map(*)
+ ) as document-node() {
+ common:apply-at(
+ $doc,
+ $doc//jf:merged,
+ unflatten:unflatten#2,
+ $params
+ )
+
+};
+
+(:~ unflatten a flattened hierarchy that is contained inside
+ : a container element
+ : @param $flattened container element
+ : @return unflattened hierarchy
+ :)
+declare function unflatten:unflatten(
+ $flattened as element(),
+ $params as map(*)
+ ) as element(jf:unflattened) {
+ element jf:unflattened {
+ $flattened/@*,
+ unflatten:sequence(
+ unflatten:parallel-suspend-and-continue($flattened, $params)/node(),
+ $params
+ )
+ }
+};
+
+declare function unflatten:sequence(
+ $sequence as node()*,
+ $params as map(*)
+ ) as node()* {
+ let $s := $sequence[1]
+ let $seq := $sequence
+ return
+ if (empty($s))
+ then ()
+ else if ($s/(@jf:start|@jf:continue))
+ then
+ let $start-return := unflatten:start($s, $sequence, $params)
+ return (
+ $start-return("start"),
+ unflatten:sequence(
+ (
+ if (exists($start-return("end")))
+ then $start-return("continue")
+ else (),
+ common:following($start-return("end"), $sequence)
+ ),
+ $params
+ )
+ )
+ else (
+ if ($s/(@jf:end|@jf:suspend))
+ then ()
+ else
+ if ($s instance of element())
+ then unflatten:lone-element($s, $params)
+ else $s,
+ unflatten:sequence(
+ subsequence($sequence, 2),
+ $params
+ )
+ )
+};
+
+(:~ element with no start, continue, end, suspend :)
+declare function unflatten:lone-element(
+ $s as element(),
+ $params as map(*)
+ ) as element() {
+ element { QName(namespace-uri($s), name($s)) }{
+ unflatten:attributes-except-flatten($s),
+ $s/node()
+ }
+};
+
+(:~ process a start element.
+ : return value: A map containing:
+ : "start" := The start element, processed
+ : "end" := The end element
+ : "continue" := Any continued unclosed tags
+ :)
+declare function unflatten:start(
+ $s as element(),
+ $sequence as node()*,
+ $params as map(*)
+ ) as map(*) {
+ let $following as node()* := common:following($s, $sequence)
+ let $end as node()? :=
+ $following[(@jf:end|@jf:suspend)=$s/(@jf:start, @jf:continue)][1]
+ let $inside-sequence as node()* :=
+ if (exists($end))
+ then
+ let $preceding as node()* := common:preceding($end, $sequence)
+ return
+ $following intersect $preceding
+ else
+ $following
+ let $unopened-tags := unflatten:unopened-tags($inside-sequence)
+ let $unclosed-tags := unflatten:unclosed-tags($inside-sequence)
+ return
+ let $processed-inside-sequence :=
+ unflatten:sequence(
+ (
+ unflatten:continue-or-suspend($unopened-tags, "continue"),
+ $inside-sequence,
+ unflatten:continue-or-suspend(reverse($unclosed-tags), "suspend")
+ ),
+ $params
+ )
+ return map {
+ "start" :
+ if (empty($processed-inside-sequence))
+ then ()
+ else
+ element { QName(namespace-uri($s), name($s)) }{
+ (
+ (unflatten:attributes-except-flatten($s) except $s/@jf:id)
+ |($s/@jf:id[exists($s/@jf:start)])
+ ),
+ if (
+ exists($s/@jf:continue) or
+ exists($end/@jf:suspend) or
+ empty($end) (: automatic suspend :) )
+ then
+ attribute jf:part {
+ ($s/@jf:continue, $end/@jf:suspend, $s/@jf:start)[1]
+ }
+ else (),
+ $processed-inside-sequence
+ },
+ "end" :
+ ($end, $inside-sequence[last()])[1],
+ "continue" :
+ unflatten:continue-or-suspend($unclosed-tags, "continue")
+ }
+};
diff --git a/opensiddur-sources/README.md b/opensiddur-sources/README.md
new file mode 100644
index 00000000..e73c1018
--- /dev/null
+++ b/opensiddur-sources/README.md
@@ -0,0 +1,5 @@
+opensiddur-sources is deprecated.
+
+All of this code, particularly the WLC code,
+is written to an older version of JLPTEI. While there is still some usable code
+in here, it is not maintained past version 0.12.0.
\ No newline at end of file
diff --git a/opensiddur-sources/build.xml b/opensiddur-sources/build.xml
new file mode 100644
index 00000000..8b010003
--- /dev/null
+++ b/opensiddur-sources/build.xml
@@ -0,0 +1,104 @@
+
+
+ Build file for opensiddur-sources
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/opensiddur-sources/common/cRef.xsl2 b/opensiddur-sources/common/cRef.xsl2
new file mode 100644
index 00000000..72647546
--- /dev/null
+++ b/opensiddur-sources/common/cRef.xsl2
@@ -0,0 +1,709 @@
+
+
+
+
+
+ Converts canonical references into appropriate printable references.
+ $Author: efraim.feinstein $
+ Copyright 2009 Efraim Feinstein <efraim.feinstein@gmail.com> (LGPL 3+)
+
+
This program is free software: you can redistribute it and/or modify
+it under the terms of the GNU Lesser General Public License as published by
+the Free Software Foundation, either version 3 of the License, or
+(at your option) any later version.
+
This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU Lesser General Public License for more details.
+
You should have received a copy of the GNU Lesser General Public License
+ along with this program. If not, see http://www.gnu.org/licenses/.
+
+ $Id: cRef.xsl2 510 2010-06-03 01:33:46Z efraim.feinstein $
+
+
+
+ Function to resolve a reference from a cRef. If it can't be resolved, just return it.
+ Which reference system to use. Valid values are: Biblical
+ The reference
+ Language the reference should be written in.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ func:resolve-cRef(,): reference system "" unknown. Returning the reference as-is.
+
+
+
+
+
+
+
+ Format a number and convert it into a string.
+ Corrects traditional hebrew numbering (only 1 <= $num <= 9999 is defined).
+
+ The number
+ Format specifier, similar to @format in xsl:number
+
+ Language
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Reference table to convert canonical biblical references into language-dependent full references.
+ ref:from/@source is a regular expression defining the book name. Special sources are used for the correct separator between chapter and verse(source=:) and numeric format (source=1)
+ ref:to/lang(X) is is the name of the book as it should be displayed in the given language.
+
+
+
+
+ Genesis
+ בְּרֵאשִׁית
+
+
+ Exodus
+ שְׁמוֹת
+
+
+ Leviticus
+ וַיִּקְרָא
+
+
+ Numbers
+ בְּמִדְבָּר
+
+
+ Deuteronomy
+ דְּבָרִים
+
+
+ Joshua
+ יְהוֹשׁוּעַ
+
+
+ Judges
+ שׁוֹפְטִים
+
+
+ 1 Samuel
+ שְׁמוּאֶל א׳
+
+
+ 2 Samuel
+ שְׁמוּאֶל ב׳
+
+
+ 1 Kings
+ מְלָכִים א׳
+
+
+ 2 Kings
+ מְלָכִים ב׳
+
+
+ Isaiah
+ יְשַׁעְיָהוּ
+
+
+ Jeremiah
+ יִרְמְיָהוּ
+
+
+ Ezekiel
+ יְחֶזְקֵאל
+
+
+ Hosea
+ הוֹשֵׁעַ
+
+
+ Joel
+ יוֹאֵל
+
+
+ Amos
+ עָמוֹס
+
+
+ Obadiah
+ עֹבַדְיָה
+
+
+ Jonah
+ יוֹנָה
+
+
+ Micah
+ מִיכָה
+
+
+ Nahum
+ נַחוּם
+
+
+ Habakkuk
+ חֲבַקּוּק
+
+
+ Zephaniah
+ צְפַנְיָה
+
+
+ Haggai
+ חַגַּי
+
+
+ Zachariah
+ זְכַרְיָה
+
+
+ Malachi
+ מַלְאָכִי
+
+
+ Ezra
+ עֶזְרָא
+
+
+ Nehemiah
+ נְחֶמְיָה
+
+
+ Daniel
+ דָּנִיֵּאל
+
+
+ Psalms
+ תְּהִלִּים
+
+
+ Job
+ אִיּוֹב
+
+
+ Proverbs
+ מִשְׁלֵי
+
+
+ Ruth
+ רוּת
+
+
+ Song of Songs
+ שִׁיר הַשִּׁירִים
+
+
+ Ecclesiastes
+ קֹהֶלֶת
+
+
+ Lamentations
+ אֵיכָה
+
+
+ Esther
+ אֶסְתֵּר
+
+
+ 1 Chronicles
+ דִּבְרֵי הַיָּמִים א׳
+
+
+ 2 Chronicles
+ דִּבְרֵי הַיָּמִים ב׳
+
+
+ :
+ ,
+
+
+ 1
+ א
+
+
+
+
+
+ Convert a cRef to a set of pointers
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Convert a canonical biblical reference $cRef to an XML representation
+ of the beginning and ending book, chapter, verse in language $lang
+ The canonical reference
+ Language the reference should be in
+ Table that contains the names of the books
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ b=
+
+ c-r-b=
+ c-r-e=
+ v-r-b=
+ v-r-e=
+
+
+
+
+
+
+ book="" is unknown.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ $cRef="" is not recognized as a Biblical reference.
+
+
+
+
+
+
+ Front end to split-cRef-Biblical to return a string
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ SA
+ שו״ע
+
+
+ MB
+ מ״ב
+
+
+ OH
+ א״ח
+
+
+ YD
+ י״ד
+
+
+ HM
+ ח״מ
+
+
+ EH
+ א״ע
+
+
+ :
+ ,
+
+
+ 1
+ א
+
+
+
+
+
+ Canonical references for Shulchan Aruch and similar books
+ The name of the work.
+ The canonical reference
+ Language the reference should be in
+ Table that contains the names of the books
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+
+
+
+
+ Cannot match the cRef "" to the pattern "", returning the original cRef unmodified.
+
+
+
+
+
+
+
+
+ tests for the reference mechanism
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/opensiddur-sources/common/common.xsl2 b/opensiddur-sources/common/common.xsl2
new file mode 100644
index 00000000..538f79e4
--- /dev/null
+++ b/opensiddur-sources/common/common.xsl2
@@ -0,0 +1,391 @@
+
+
+
+
+ Common functions required by multiple stages of the TEI processing.
+ Copyright 2007-2011 Efraim Feinstein
+
+
This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU Lesser General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+
This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU Lesser General Public License for more details.
+
+
You should have received a copy of the GNU Lesser General Public License
+ along with this program. If not, see http://www.gnu.org/licenses/.
+
+ $Id: common.xsl2 766 2011-04-28 02:42:20Z efraim.feinstein $
+
+
+ User name to log in as on the database (optional)
+
+
+ Password to log in as on the database (required if user is specified)
+
+
+ base64 encoded authentication to log in as on the database (optional, overrides user/password)
+
+
+
+ Keeps track of all @xml:id and @jx:id attributes in the sources.
+
+
+
+
+ Output a debugging message, depending on debug level.
+ Each message is given a unique ID so its end can be associated
+ with its beginning. If the debug level is $debug-error,
+ terminate with the message, otherwise output it.
+ The message, which may include nodes
+ The source of the message
+ The debug level of the message
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ ERROR
+
+
+ WARNING
+
+
+ INFO
+
+
+ DETAIL
+
+
+ MESSAGE
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Returns the language of the given node, as it would be tested with the lang() function.
+
+ If none can be found, returns and empty string.
+
+ A single node to return the language for.
+
+
+
+
+
+
+
+
+
+ Return the text direction ('ltr' or 'rtl'), given a language code as a string.
+ A language code
+
+
+
+
+
+
+
+ Returns the direction ('ltr' or 'rtl') as a string, dependent on the current language of the given node.
+ Node to test language.
+
+
+
+
+
+ rtl
+
+
+ ltr
+
+
+
+
+
+ Add the given attribute nodes.
+ If equivalent named attributes already exist, override them
+ The element nodes to add to
+ The nodes to add
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Debugging catcher for elements. Displays the element and path when $debug-show-process is set.
+ WON'T WORK BECAUSE OF TUNNELING PARAMETERS!
+
+
+
+
+
+ Return a unique identifier for a document.
+ Used as a replacement for document-uri() when it won't work
+ in the database.
+ Document node whose id we're obtaining
+
+
+
+
+
+
+
+
+
+
+ Retrieve an xpath that identifies the given node.
+ The node to find the xpath from
+
+
+
+
+
+
+
+
+
+
+
+ /
+
+
+
+
+ /
+
+
+
+
+
+ /
+
+
+
+
+
+ /
+
+
+
+
+
+ /
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ common base URI for the project
+
+ http://jewishliturgy.org/base/text/
+
+
+ Named template to do identity transform and continue in current mode.
+
+
+
+
+
+
+
+
+
+ Default catcher for elements. Copy and continue.
+
+
+
+
+
+
+ Identity mode
+
+
+
+
+
+
+ Default catcher for text. Copy.
+
+
+
+
diff --git a/opensiddur-sources/common/params.xsl2 b/opensiddur-sources/common/params.xsl2
new file mode 100644
index 00000000..170f3462
--- /dev/null
+++ b/opensiddur-sources/common/params.xsl2
@@ -0,0 +1,78 @@
+
+
+
+ User-adjustable parameters; intended to be imported in other stylesheets.
+ $Author: efraim.feinstein $
+ Copyright 2008 Efraim Feinstein
+
+
+ This work is provided 'as-is', without any express or implied
+ warranty. In no event will the authors be held liable for any damages
+ arising from the use of this work.
+
+
+
+ Permission is granted to anyone to use this work for any purpose,
+ including commercial applications, and to alter it and redistribute it
+ freely, subject to the following restrictions:
+
+
+
+
The origin of this work must not be misrepresented; you must not
+ claim that you wrote the original work. If you use this work
+ in a product, an acknowledgment in the product documentation would be
+ appreciated but is not required.
+
Altered source versions must be plainly marked as such, and must not be
+ misrepresented as being the original work.
+
This notice may not be removed or altered from any source distribution.
+
+
+ $Id: params.tmpl.xsl2 687 2011-01-23 23:36:48Z efraim.feinstein $
+
+
+
+ Show every element that is traversed.
+
+
+
+
+ Debug level 0
+
+
+
+ Debug level 1
+
+
+
+ Debug level 2
+
+
+
+ Debug level 3
+
+
+
+ Debug level 4
+
+
+
+
+ Debug level. Use one of the $debug* parameters as a value.
+ All debugging messages with levels at or below this value will display.
+
+
+
+
+
+
+
+
diff --git a/code/input-conversion/1917JPS/1917JPS.xslt b/opensiddur-sources/input-conversion/1917JPS/1917JPS.xslt
similarity index 100%
rename from code/input-conversion/1917JPS/1917JPS.xslt
rename to opensiddur-sources/input-conversion/1917JPS/1917JPS.xslt
diff --git a/code/input-conversion/1917JPS/bbox2xywh.xsl2 b/opensiddur-sources/input-conversion/1917JPS/bbox2xywh.xsl2
similarity index 100%
rename from code/input-conversion/1917JPS/bbox2xywh.xsl2
rename to opensiddur-sources/input-conversion/1917JPS/bbox2xywh.xsl2
diff --git a/code/input-conversion/1917JPS/columns.xslt b/opensiddur-sources/input-conversion/1917JPS/columns.xslt
similarity index 100%
rename from code/input-conversion/1917JPS/columns.xslt
rename to opensiddur-sources/input-conversion/1917JPS/columns.xslt
diff --git a/code/input-conversion/1917JPS/final.xsl2 b/opensiddur-sources/input-conversion/1917JPS/final.xsl2
similarity index 100%
rename from code/input-conversion/1917JPS/final.xsl2
rename to opensiddur-sources/input-conversion/1917JPS/final.xsl2
diff --git a/code/input-conversion/1917JPS/fix-apostrophe-s.xsl2 b/opensiddur-sources/input-conversion/1917JPS/fix-apostrophe-s.xsl2
similarity index 100%
rename from code/input-conversion/1917JPS/fix-apostrophe-s.xsl2
rename to opensiddur-sources/input-conversion/1917JPS/fix-apostrophe-s.xsl2
diff --git a/code/input-conversion/1917JPS/fix-chapter-numbers.xsl2 b/opensiddur-sources/input-conversion/1917JPS/fix-chapter-numbers.xsl2
similarity index 100%
rename from code/input-conversion/1917JPS/fix-chapter-numbers.xsl2
rename to opensiddur-sources/input-conversion/1917JPS/fix-chapter-numbers.xsl2
diff --git a/code/input-conversion/1917JPS/fix-hebrew.xsl2 b/opensiddur-sources/input-conversion/1917JPS/fix-hebrew.xsl2
similarity index 100%
rename from code/input-conversion/1917JPS/fix-hebrew.xsl2
rename to opensiddur-sources/input-conversion/1917JPS/fix-hebrew.xsl2
diff --git a/code/input-conversion/1917JPS/fix-lines.xslt b/opensiddur-sources/input-conversion/1917JPS/fix-lines.xslt
similarity index 100%
rename from code/input-conversion/1917JPS/fix-lines.xslt
rename to opensiddur-sources/input-conversion/1917JPS/fix-lines.xslt
diff --git a/code/input-conversion/1917JPS/functions.xsl2 b/opensiddur-sources/input-conversion/1917JPS/functions.xsl2
similarity index 100%
rename from code/input-conversion/1917JPS/functions.xsl2
rename to opensiddur-sources/input-conversion/1917JPS/functions.xsl2
diff --git a/code/input-conversion/1917JPS/get-blocks.xsl2 b/opensiddur-sources/input-conversion/1917JPS/get-blocks.xsl2
similarity index 100%
rename from code/input-conversion/1917JPS/get-blocks.xsl2
rename to opensiddur-sources/input-conversion/1917JPS/get-blocks.xsl2
diff --git a/code/input-conversion/1917JPS/get-pages.py b/opensiddur-sources/input-conversion/1917JPS/get-pages.py
similarity index 100%
rename from code/input-conversion/1917JPS/get-pages.py
rename to opensiddur-sources/input-conversion/1917JPS/get-pages.py
diff --git a/code/input-conversion/1917JPS/include.py b/opensiddur-sources/input-conversion/1917JPS/include.py
similarity index 100%
rename from code/input-conversion/1917JPS/include.py
rename to opensiddur-sources/input-conversion/1917JPS/include.py
diff --git a/code/input-conversion/1917JPS/index.template.html b/opensiddur-sources/input-conversion/1917JPS/index.template.html
similarity index 100%
rename from code/input-conversion/1917JPS/index.template.html
rename to opensiddur-sources/input-conversion/1917JPS/index.template.html
diff --git a/code/input-conversion/1917JPS/index.xsl2 b/opensiddur-sources/input-conversion/1917JPS/index.xsl2
similarity index 100%
rename from code/input-conversion/1917JPS/index.xsl2
rename to opensiddur-sources/input-conversion/1917JPS/index.xsl2
diff --git a/code/input-conversion/1917JPS/join-pages.xsl2 b/opensiddur-sources/input-conversion/1917JPS/join-pages.xsl2
similarity index 100%
rename from code/input-conversion/1917JPS/join-pages.xsl2
rename to opensiddur-sources/input-conversion/1917JPS/join-pages.xsl2
diff --git a/code/input-conversion/1917JPS/join-text.xsl2 b/opensiddur-sources/input-conversion/1917JPS/join-text.xsl2
similarity index 100%
rename from code/input-conversion/1917JPS/join-text.xsl2
rename to opensiddur-sources/input-conversion/1917JPS/join-text.xsl2
diff --git a/code/input-conversion/1917JPS/jps.xslt b/opensiddur-sources/input-conversion/1917JPS/jps.xslt
similarity index 100%
rename from code/input-conversion/1917JPS/jps.xslt
rename to opensiddur-sources/input-conversion/1917JPS/jps.xslt
diff --git a/code/input-conversion/1917JPS/jps2.xslt b/opensiddur-sources/input-conversion/1917JPS/jps2.xslt
similarity index 100%
rename from code/input-conversion/1917JPS/jps2.xslt
rename to opensiddur-sources/input-conversion/1917JPS/jps2.xslt
diff --git a/code/input-conversion/1917JPS/outline.py b/opensiddur-sources/input-conversion/1917JPS/outline.py
similarity index 100%
rename from code/input-conversion/1917JPS/outline.py
rename to opensiddur-sources/input-conversion/1917JPS/outline.py
diff --git a/code/input-conversion/1917JPS/outline.xsl2.template b/opensiddur-sources/input-conversion/1917JPS/outline.xsl2.template
similarity index 100%
rename from code/input-conversion/1917JPS/outline.xsl2.template
rename to opensiddur-sources/input-conversion/1917JPS/outline.xsl2.template
diff --git a/code/input-conversion/1917JPS/pdf2txt-clean.xslt b/opensiddur-sources/input-conversion/1917JPS/pdf2txt-clean.xslt
similarity index 100%
rename from code/input-conversion/1917JPS/pdf2txt-clean.xslt
rename to opensiddur-sources/input-conversion/1917JPS/pdf2txt-clean.xslt
diff --git a/code/input-conversion/1917JPS/small-caps.xsl2 b/opensiddur-sources/input-conversion/1917JPS/small-caps.xsl2
similarity index 100%
rename from code/input-conversion/1917JPS/small-caps.xsl2
rename to opensiddur-sources/input-conversion/1917JPS/small-caps.xsl2
diff --git a/code/input-conversion/1917JPS/test-html.xsl2 b/opensiddur-sources/input-conversion/1917JPS/test-html.xsl2
similarity index 100%
rename from code/input-conversion/1917JPS/test-html.xsl2
rename to opensiddur-sources/input-conversion/1917JPS/test-html.xsl2
diff --git a/code/input-conversion/1917JPS/test-sort.xslt b/opensiddur-sources/input-conversion/1917JPS/test-sort.xslt
similarity index 100%
rename from code/input-conversion/1917JPS/test-sort.xslt
rename to opensiddur-sources/input-conversion/1917JPS/test-sort.xslt
diff --git a/code/input-conversion/1917JPS/testing.txt b/opensiddur-sources/input-conversion/1917JPS/testing.txt
similarity index 100%
rename from code/input-conversion/1917JPS/testing.txt
rename to opensiddur-sources/input-conversion/1917JPS/testing.txt
diff --git a/code/input-conversion/fill-template.xsl2 b/opensiddur-sources/input-conversion/fill-template.xsl2
similarity index 88%
rename from code/input-conversion/fill-template.xsl2
rename to opensiddur-sources/input-conversion/fill-template.xsl2
index e55f6fd7..1fa76b29 100644
--- a/code/input-conversion/fill-template.xsl2
+++ b/opensiddur-sources/input-conversion/fill-template.xsl2
@@ -10,7 +10,7 @@
Fill JLPTEI template with the given parameters.
- Copyright 2009-2010,2012 Efraim Feinstein <efraim.feinstein@gmail.com>
+ Copyright 2009-2010,2012-2014 Efraim Feinstein <efraim.feinstein@gmail.com>
This program is free software: you can redistribute it
@@ -43,10 +43,10 @@
-
+
-
+
@@ -65,23 +65,21 @@
-
-
-
+
-
+ Open Siddur Project
+
- Open Siddur Project
-
+
- Document created from template
+ Document created from template
diff --git a/code/identity.xslt b/opensiddur-sources/input-conversion/identity.xslt
similarity index 100%
rename from code/identity.xslt
rename to opensiddur-sources/input-conversion/identity.xslt
diff --git a/code/input-conversion/rawtext/NotUnicodeData.txt b/opensiddur-sources/input-conversion/rawtext/NotUnicodeData.txt
similarity index 100%
rename from code/input-conversion/rawtext/NotUnicodeData.txt
rename to opensiddur-sources/input-conversion/rawtext/NotUnicodeData.txt
diff --git a/opensiddur-sources/input-conversion/rawtext/hierarchies.xqm b/opensiddur-sources/input-conversion/rawtext/hierarchies.xqm
new file mode 100644
index 00000000..d0858e19
--- /dev/null
+++ b/opensiddur-sources/input-conversion/rawtext/hierarchies.xqm
@@ -0,0 +1,335 @@
+xquery version "3.0";
+(:~ Convert STML to JLPTEI: construction of hierarchies
+ :
+ : @author Efraim Feinstein
+ : Copyright 2012 Efraim Feinstein
+ : Licensed under the GNU Lesser General Public License, version 3 or later
+ :)
+module namespace hier="http://jewishliturgy.org/transform/hierarchies";
+
+declare namespace error="http://jewishliturgy.org/errors";
+declare namespace tei="http://www.tei-c.org/ns/1.0";
+declare namespace j="http://jewishliturgy.org/ns/jlptei/1.0";
+declare namespace stml="http://jewishliturgy.org/transform/stml";
+
+(: write a target string :)
+declare function hier:target(
+ $start as element(),
+ $end as element()
+ ) {
+ if ($start is $end)
+ then $start/@xml:id/string()
+ else concat("range(", $start/@xml:id ,",", $end/@xml:id ,")")
+};
+
+(:~ last step in the conversion process:
+ : separate out stml:file, and do other cleanup
+ :)
+declare function hier:separate-files(
+ $e as element(stml:file)+
+ ) as element(stml:file)+ {
+ for $file in $e/descendant-or-self::stml:file
+ return
+ element stml:file {
+ $file/@*,
+ hier:remove-embedded-files($file/node())
+ }
+};
+
+declare function hier:remove-embedded-files(
+ $nodes as node()*
+ ) {
+ for $n in $nodes
+ return
+ typeswitch($n)
+ case element(stml:file) return ()
+ case element(tei:milestone) return ()
+ case element(tei:pb) return ()
+ case document-node() return
+ document {
+ hier:remove-embedded-files($n/node())
+ }
+ case text() return $n
+ default return
+ element { QName(namespace-uri($n), name($n)) }{
+ $n/(@* except @j:*),
+ hier:remove-embedded-files($n/node())
+ }
+};
+
+(:~ construct page links :)
+declare function hier:page-links(
+ $streams as element()+,
+ $page-images-url as xs:string
+ ) {
+ {
+ for $stream in $streams
+ let $ids-by-page :=
+ {
+ for $seg in $stream/tei:seg[@j:pages]
+ let $pages := tokenize($seg/@j:pages,'\s+')
+ for $page in $pages
+ return
+ }
+ for $page in distinct-values($ids-by-page/page/@n)
+ let $ids-on-page := $ids-by-page/page[@n=$page]
+ let $first-on-page := $ids-on-page[1]
+ let $last-on-page := $ids-on-page[count($ids-on-page)] (: last() is broken :)
+ let $local-target := hier:target($first-on-page,$last-on-page)
+ let $page-target := replace($page-images-url, "\{\$page\}", $page)
+ return
+
+ }
+};
+
+declare function hier:add-hierarchies(
+ $nodes as node()*,
+ $support as element(stml:file)+
+ ) {
+ for $n in $nodes
+ let $making-hierarchies :=
+ (count($n/ancestor::j:streamText) = count($n/ancestor-or-self::stml:file))
+ return
+ typeswitch($n)
+ case element(stml:file) return hier:file($n, $support)
+ case element(tei:TEI) return hier:TEI($n, $support)
+ case element(tei:text) return hier:text($n, $support)
+ case element(tei:div) return hier:div($n, $support)
+ case element(tei:ab) return hier:ab($n, $support)
+ case element(tei:p) return hier:p($n, $support)
+ case element(tei:lb) return hier:lb($n, $support)
+ case element(tei:anchor) return hier:anchor($n, $support)
+ case element(j:streamText) return hier:add-hierarchies($n/node(), $support)
+ case document-node() return
+ document { hier:add-hierarchies($n/node(), $support) }
+ case text() return
+ if ($making-hierarchies)
+ then ()
+ else $n
+ default return
+ if ($making-hierarchies)
+ then hier:add-hierarchies($n/node(), $support)
+ else
+ element { QName(namespace-uri($n), name($n)) }{
+ $n/@*,
+ hier:add-hierarchies($n/node(), $support)
+ }
+};
+
+declare function hier:file(
+ $n as element(stml:file),
+ $support as element()+
+ ) {
+ element stml:file {
+ $n/@*,
+ hier:add-hierarchies($n/node(), $support)
+ },
+ hier:add-hierarchies($n/tei:TEI/tei:text/j:streamText/stml:file, $support)
+};
+
+declare function hier:TEI(
+ $e as element(tei:TEI),
+ $support as element(stml:file)+
+ ) {
+ element tei:TEI {
+ $e/@*,
+ $e/tei:teiHeader,
+ hier:page-links($e/tei:text/j:streamText, $support//tei:relatedItem[@type="scan"]/@targetPattern),
+ hier:add-hierarchies($e/(node() except tei:teiHeader), $support)
+ }
+};
+
+declare function hier:text(
+ $e as element(tei:text),
+ $support as element(stml:file)+
+ ) {
+ element tei:text {
+ $e/@*,
+ hier:streamText($e/j:streamText),
+ {
+ let $all-hierarchies := hier:add-hierarchies($e/j:streamText/node(),$support)
+ return hier:split-layers($all-hierarchies)
+ }
+ }
+};
+
+declare function hier:div(
+ $e as element(tei:div),
+ $support as element()+
+ ) {
+ {
+ if ($e/@j:type="file")
+ then attribute xml:id { "main" }
+ else (),
+ $e/tei:head,
+ let $start := $e/following-sibling::tei:seg[1]
+ (: last() is broken in annoying ways: :)
+ let $n-segs := count($e/following-sibling::tei:seg)
+ let $end :=
+ $e/(
+ following-sibling::tei:div[@j:type=$e/@j:type]/preceding-sibling::tei:seg[1],
+ following-sibling::tei:seg[$n-segs]
+ )[1]
+ let $target :=
+ hier:target($start, $end)
+ return
+
+
+
+ }
+};
+
+declare function hier:p(
+ $e as element(tei:p),
+ $support as element()+
+ ) {
+ let $p-count := count($e/preceding-sibling::tei:p) + 1
+ let $start-p := $e/(
+ preceding-sibling::tei:p[1],
+ preceding-sibling::*[last()]
+ )[1]
+ let $start := $start-p/(self::tei:seg, following-sibling::tei:seg[1])
+ let $end := $e/preceding-sibling::tei:seg[1]
+ let $target := hier:target($start, $end)
+ return (
+ if ($start and $end and
+ (($start is $end) or $start << $end)
+ )
+ then
+
+
+
+ else (),
+ if (
+ empty($e/following-sibling::tei:p) and
+ exists($e/following-sibling::tei:seg)
+ )
+ then
+ (: insert one more last paragraph :)
+ {
+ let $start := $e/following-sibling::tei:seg[1]
+ let $end := $e/following-sibling::tei:seg[last()]
+ return
+
+ }
+ else ()
+ )
+};
+
+(:~ named hierarchies :)
+declare function hier:anchor(
+ $e as element(tei:anchor),
+ $support as element()+
+ ) {
+ if ($e/@j:type = "NamedCommand")
+ then
+ let $name := substring-after($e/@xml:id, "start-")
+ return
+ {
+
+ }
+ else ()
+};
+
+(:~ verses :)
+declare function hier:ab(
+ $e as element(tei:ab),
+ $support as element()+
+ ) {
+ if ($e/@type="verse")
+ then
+ let $chapter := $e/tei:label[@n="chapter"]
+ let $verse := $e/tei:label[@n="verse"]
+ return
+ {
+ $e/(@*|node()),
+ let $start := $e/following-sibling::tei:seg[1]
+ let $end := $e/(
+ following-sibling::tei:ab[@type="verse"][1]/preceding-sibling::tei:seg[1],
+ following-sibling::tei:seg[last()]
+ )
+ let $target := hier:target($start,$end)
+ return
+
+ }
+ else ()
+};
+
+(:~ line group/line hierarchy: after stxt transform,
+ : these should only exist in poetry mode
+ :)
+declare function hier:lb(
+ $e as element(tei:lb),
+ $support as element()+
+ ) {
+ (: is this lb the end of an lg? :)
+ let $end-of-lg :=
+ $e/(
+ following-sibling::tei:milestone[@type="End-Poetry-Mode"][1]|
+ following-sibling::tei:p[1]|
+ (
+ let $lst := (self::*,following-sibling::*)
+ return $lst[count($lst)] (: last() is *very* broken :)
+ )
+ )[1]
+ let $last-lb := $end-of-lg/(
+ self::tei:lb,
+ preceding-sibling::tei:lb[1]
+ )[1]
+ where ($e is $last-lb)
+ return
+ (: because of issues with last(), this code is terribly
+ inefficient :)
+ let $starts :=
+ ($e/preceding-sibling::*| $e)[1] |
+ $e/preceding-sibling::tei:milestone[@type="Begin-Poetry-Mode"][1]|
+ $e/preceding-sibling::tei:p[1]
+ let $start-of-lg := $starts[count($starts)] (: <-- these are in document order, so I want the last one :)
+ return
+ {
+ for $lb in (
+ $start-of-lg/following-sibling::tei:lb[. << $end-of-lg],
+ $end-of-lg/self::tei:lb
+ )
+ let $start-of-l := ($start-of-lg|$lb/preceding-sibling::tei:lb[1])[last()]
+ let $contained-segments := $start-of-l/following-sibling::tei:seg[. << $lb]
+ where exists($contained-segments)
+ return
+ {
+
+ }
+ }
+};
+
+
+
+declare function hier:split-layers(
+ $layer-elements as element()+
+ ) {
+ for $element in $layer-elements
+ let $layer-type := $element/@j:layer
+ group by $layer-type
+ return
+ if ($layer-type)
+ then
+ {
+ $element
+ }
+ else ()
+};
+
+declare function hier:streamText(
+ $e as element(j:streamText)?
+ ) {
+ for $st in $e
+ return
+ element j:streamText {
+ $e/(@*|tei:ptr|tei:seg|tei:anchor)
+ }
+};
\ No newline at end of file
diff --git a/code/input-conversion/rawtext/normalize-nonunicode.xsl2 b/opensiddur-sources/input-conversion/rawtext/normalize-nonunicode.xsl2
similarity index 100%
rename from code/input-conversion/rawtext/normalize-nonunicode.xsl2
rename to opensiddur-sources/input-conversion/rawtext/normalize-nonunicode.xsl2
diff --git a/code/input-conversion/rawtext/pre-encode.xsl2 b/opensiddur-sources/input-conversion/rawtext/pre-encode.xsl2
similarity index 100%
rename from code/input-conversion/rawtext/pre-encode.xsl2
rename to opensiddur-sources/input-conversion/rawtext/pre-encode.xsl2
diff --git a/code/input-conversion/rawtext/rawtext.xsl2 b/opensiddur-sources/input-conversion/rawtext/rawtext.xsl2
similarity index 100%
rename from code/input-conversion/rawtext/rawtext.xsl2
rename to opensiddur-sources/input-conversion/rawtext/rawtext.xsl2
diff --git a/code/input-conversion/rawtext/rt-grammar.xsl2 b/opensiddur-sources/input-conversion/rawtext/rt-grammar.xsl2
similarity index 90%
rename from code/input-conversion/rawtext/rt-grammar.xsl2
rename to opensiddur-sources/input-conversion/rawtext/rt-grammar.xsl2
index 75246342..6a7493db 100644
--- a/code/input-conversion/rawtext/rt-grammar.xsl2
+++ b/opensiddur-sources/input-conversion/rawtext/rt-grammar.xsl2
@@ -21,7 +21,7 @@
Conversion of raw text to Grammar Parsed XML.
- Copyright 2010 Efraim Feinstein
+ Copyright 2010,2012 Efraim Feinstein
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
@@ -37,7 +37,6 @@
along with this program. If not, see http://www.gnu.org/licenses/.
- $Id: rt-grammar.xsl2 687 2011-01-23 23:36:48Z efraim.feinstein $
@@ -50,6 +49,10 @@
+
+ Start parsing at this point in the grammar
+
+ Entry point for standalone processing
@@ -58,6 +61,6 @@
+ func:grammar-parse($text, 'STML', doc($grammar-filename)))"/>
diff --git a/code/input-conversion/rawtext/split-word.xsl2 b/opensiddur-sources/input-conversion/rawtext/split-word.xsl2
similarity index 100%
rename from code/input-conversion/rawtext/split-word.xsl2
rename to opensiddur-sources/input-conversion/rawtext/split-word.xsl2
diff --git a/opensiddur-sources/input-conversion/rawtext/stml.xqm b/opensiddur-sources/input-conversion/rawtext/stml.xqm
new file mode 100644
index 00000000..6ed83553
--- /dev/null
+++ b/opensiddur-sources/input-conversion/rawtext/stml.xqm
@@ -0,0 +1,913 @@
+xquery version "3.0";
+(:~ Convert STML to JLPTEI
+ :
+ : A multipass converter:
+ : Pass 1: parse text->grammar parsed XML
+ : Pass 2: create finalized headers and file outlines, convert grammar parser XML to (invalid) TEI
+ :
+ : @author Efraim Feinstein
+ : Copyright 2012-2013 Efraim Feinstein
+ : Licensed under the GNU Lesser General Public License, version 3 or later
+ :)
+module namespace stml="http://jewishliturgy.org/transform/stml";
+
+import module namespace grammar="http://jewishliturgy.org/transform/grammar"
+ at "/db/apps/opensiddur-server/grammar-parser/grammar2.xqm";
+import module namespace name="http://jewishliturgy.org/modules/name"
+ at "/db/apps/opensiddur-server/modules/name.xqm";
+import module namespace data="http://jewishliturgy.org/modules/data"
+ at "/db/apps/opensiddur-server/modules/data.xqm";
+
+import module namespace stxt="http://jewishliturgy.org/transform/streamtext"
+ at "streamtext.xqm";
+import module namespace hier="http://jewishliturgy.org/transform/hierarchies"
+ at "hierarchies.xqm";
+
+declare namespace p="http://jewishliturgy.org/ns/parser";
+declare namespace r="http://jewishliturgy.org/ns/parser-result";
+declare namespace error="http://jewishliturgy.org/errors";
+declare namespace tei="http://www.tei-c.org/ns/1.0";
+declare namespace j="http://jewishliturgy.org/ns/jlptei/1.0";
+
+declare variable $stml:grammar := "/db/apps/opensiddur-server/grammar-parser/stml-grammar.xml";
+
+(:~ parse STML, or flag an error
+ :
+ : @param $text the STML, as text
+ : @return The STML file, parsed to XML
+ : @error error:PARSE Cannot parse the file, returns the position where the parsing failed.
+ :)
+declare function stml:parse(
+ $text as xs:string
+ ) as element(r:STML) {
+ let $parsed :=
+ grammar:clean(grammar:parse($text, "STML", doc($stml:grammar)))
+ return
+ if ($parsed/self::r:no-match)
+ then error(xs:QName("error:PARSE"), "Cannot parse the STML", $parsed/self::r:no-match/r:remainder)
+ else $parsed
+};
+
+declare function stml:convert-text(
+ $text as xs:string
+ ) (:as element(stml:file)+ :){
+ stml:convert(stml:parse($text))
+};
+
+declare function stml:convert(
+ $node as node()*
+ ) as item()* {
+ for $n in $node
+ return (
+ typeswitch($n)
+ case document-node() return stml:convert($n/*)
+ case element(r:STML) return stml:STML($n)
+ case element(r:STMLCommand) return ()
+ case element(r:BiblCommand) return stml:BiblCommand($n)
+ case element(r:TitleCommand) return stml:TitleCommand($n)
+ case element(r:PubInfoCommand) return stml:PubInfoCommand($n)
+ case element(r:Info) return stml:pass-through($n)
+ case element(r:URL) return stml:pass-through($n)
+ case element(r:Date) return stml:pass-through($n)
+ case element(r:Title) return stml:pass-through($n)
+ case element(r:Argument) return stml:pass-through($n)
+ case element(r:ShortName) return stml:pass-through($n)
+ case element(r:AuthorEditorCommand) return stml:AuthorEditorCommand($n)
+ case element(r:PubDateCommand) return stml:PubDateCommand($n)
+ case element(r:PageRefCommand) return stml:PageRefCommand($n)
+ case element(r:AuthEdit) return stml:AuthEdit($n)
+ case element(r:ContributorCommand) return stml:ContributorCommand($n)
+ case element(r:Handle) return stml:Handle($n)
+ case element(r:ContributorIDCommand) return stml:ContributorIDCommand($n)
+ case element(r:FileContent) return stml:FileContent($n)
+ case element(r:FileCommand) return stml:FileCommand($n)
+ case element(r:EndFileCommand) return ()
+ case element(r:IncludeCommand) return stml:IncludeCommand($n)
+ case element(r:IncludeBlockCommand) return stml:IncludeCommand($n)
+ case element(r:RemarkCommand) return ()
+ case element(r:DivineNameCommand) return stml:DivineNameCommand($n)
+ case element(r:DivineName) return stml:pass-through($n)
+ case element(r:TranslitCommand) return stml:TranslitCommand($n)
+ case element(r:AsWritten) return stml:pass-through($n)
+ case element(r:OriginalLanguage) return stml:pass-through($n)
+ case element(r:SicCommand) return stml:SicCommand($n)
+ case element(r:IncorrectText) return stml:IncorrectText($n)
+ case element(r:CorrectedText) return stml:CorrectedText($n)
+ case element(r:PageBreakCommand) return stml:PageBreakCommand($n)
+ case element(r:FootnotePageBreakCommand) return stml:FootnotePageBreakCommand($n)
+ case element(r:BookPage) return stml:pass-through($n)
+ case element(r:ScanPage) return stml:pass-through($n)
+ case element(r:NamedCommand) return stml:NamedCommand($n)
+ case element(r:EndNamedCommand) return stml:EndNamedCommand($n)
+ case element(r:NoteCommand) return stml:note-like-commands($n)
+ case element(r:FootNoteCommand) return stml:note-like-commands($n)
+ case element(r:InstructCommand) return stml:note-like-commands($n)
+ case element(r:EndNoteCommand) return stml:EndNoteCommand($n)
+ case element(r:EndInstructCommand) return stml:EndInstructCommand($n)
+ case element(r:NoteContent) return stml:pass-through($n)
+ case element(r:Escape) return stml:Escape($n)
+ case element(r:BeginFormattingCommand) return stml:formatting-commands($n)
+ case element(r:EndFormattingCommand) return stml:formatting-commands($n)
+ case element(r:EmphasisCommand) return stml:EmphasisCommand($n)
+ case element(r:ParagraphBreak) return stml:end-p($n)
+ case element(r:LineBreak) return stml:end-l($n)
+ case element(r:HorizontalRuleCommand) return stml:end-p($n)
+ case element(r:SectionCommand) return stml:SectionCommand($n)
+ case element(r:SectionName) return stml:SectionName($n)
+ case element(r:VerseDivision) return stml:VerseDivision($n)
+ case element(r:PoetryMode) return stml:PoetryMode($n)
+ case element(r:EndPoetryMode) return stml:EndPoetryMode($n)
+ case element(r:Pausal) return stml:Pausal($n)
+ case element(r:SegmentContent) return stml:SegmentContent($n)
+ case element(r:ReferenceCommand) return stml:ReferenceCommand($n)
+ case element(r:Text) return stml:pass-through($n)
+ case element(r:HebrewCommand) return stml:HebrewCommand($n)
+ case element(r:FootRefCommand) return stml:FootRefCommand($n)
+ case element(r:PageReferenceCommand) return stml:PageReferenceCommand($n)
+ case element(r:ContCommand) return ()
+ case text() return stml:text($n)
+ default return (
+ util:log-system-out(("Not implemented:" ,name($n))),
+ stml:convert($n/node())
+ )
+ )
+};
+
+declare function stml:STML(
+ $e as element(r:STML)
+ ) {
+ stml:finalize(stml:convert($e/node()))
+};
+
+declare function stml:Language(
+ $node as node()
+ ) as xs:string {
+ string(root($node)/r:STML/r:STMLCommand/r:Language)
+};
+
+(:~ Bibliography resource
+ :)
+declare function stml:BiblCommand(
+ $e as element(r:BiblCommand)
+ ) {
+
+
+
+ { $e/stml:convert((
+ r:TitleCommand,
+ r:AuthorEditorCommand,
+ r:PubInfoCommand[r:Type="edition"]
+ ))
+ }
+ {
+ $e/stml:convert((
+ r:PubInfoCommand[not(r:Type = "edition")],
+ r:PubDateCommand
+ )),
+ The Open Siddur Project
+ }
+
+ {
+ $e/stml:convert(r:PageRefCommand)
+ }
+
+
+};
+
+declare function stml:TitleCommand(
+ $e as element(r:TitleCommand)
+ ) {
+ {stml:convert($e/r:Title)}
+};
+
+declare function stml:PubInfoCommand(
+ $e as element(r:PubInfoCommand)
+ ) {
+ element {
+ switch($e/r:Type)
+ case "edition" return "tei:edition"
+ case "publisher" return "tei:publisher"
+ case "place" return "tei:pubPlace"
+ default return error(xs:QName("error:BADNESS"), ("Bad PubInfoCommand type: ", data($e/r:Type)))
+ }{
+ stml:convert($e/r:Info)
+ }
+};
+
+declare function stml:AuthorEditorCommand(
+ $e as element(r:AuthorEditorCommand)
+ ) {
+ element {
+ switch($e/r:Type)
+ case "author" return "tei:author"
+ case "editor" return "tei:editor"
+ default return error(xs:QName("error:BADNESS"), ("Bad AuthorEditor type: ", data($e/r:Type)))
+ }{
+ if ($e/r:Type = "edition")
+ then stml:convert($e/node())
+ else name:string-to-name(stml:convert($e/r:AuthEdit))
+ }
+};
+
+declare function stml:PubDateCommand(
+ $e as element(r:PubDateCommand)
+ ) {
+ {stml:convert($e/r:Date/node())}
+};
+
+declare function stml:PageRefCommand(
+ $e as element(r:PageRefCommand)
+ ) {
+ if ($e/r:Type = "page-images")
+ then ()
+ else
+ (: page-ref, where page-images may be a sibling :)
+ let $page-images := $e/../r:PageRefCommand[r:Type="page-images"]
+ return
+ {
+ attribute target { stml:convert($e/r:URL) },
+ if (exists($page-images))
+ then
+ attribute targetPattern { stml:convert($page-images/r:URL) }
+ else ()
+ }
+};
+
+declare function stml:AuthEdit(
+ $e as element(r:AuthEdit)
+ ) {
+ stml:convert($e/node())
+};
+
+(: Contributor information :)
+declare function stml:ContributorCommand(
+ $e as element(r:ContributorCommand)
+ ) {
+
+ {
+ $e/stml:convert((
+ r:Handle,
+ (: reorder the contributor identifiers :)
+ for $type in ("name", "organization", "email", "website")
+ return $e/r:ContributorIDCommand[r:Type=$type]
+ ))
+ }
+
+};
+
+declare function stml:Handle(
+ $e as element(r:Handle)
+ ) {
+ {stml:convert($e/node())}
+};
+
+declare function stml:ContributorIDCommand(
+ $e as element(r:ContributorIDCommand)
+ ) {
+ switch($e/r:Type)
+ case "name"
+ return
+ {name:string-to-name(stml:convert($e/r:Argument))}
+ case "organization"
+ return
+ let $org :=
+ {stml:convert($e/r:Argument)}
+ return
+ if ($e/../r:ContributorCommand[r:Type="name"])
+ then
+ {
+ $org
+ }
+ else $org
+ case "email"
+ return
+ {stml:convert($e/r:Argument)}
+ case "website"
+ return
+
+ default return ()
+};
+
+declare function stml:file-location(
+ $n as node()
+ ) {
+ let $st := root($n)/r:STML/r:STMLCommand
+ let $doctype := string($st/r:DocType)
+ return
+ if ($doctype = "original")
+ then "/data/original"
+ else
+ concat(
+ "/data/translation/",
+ $st/r:Language/string(), "/",
+ $st/r:Argument/string()
+ )
+};
+
+declare function stml:annotation-location(
+ $n as node()
+ ) {
+ "/data/notes"
+};
+
+declare function stml:license(
+ $n as node()
+ ) {
+ let $st := root($n)/r:STML/r:STMLCommand
+ let $license := $st/r:License/string()
+ let $license-uri :=
+ switch ($license)
+ case "cc-zero" return "http://www.creativecommons.org/publicdomain/zero/1.0"
+ case "cc-by" return "http://www.creativecommons.org/licenses/by/3.0"
+ case "cc-by-sa" return "http://www.creativecommons.org/licenses/by-sa/3.0"
+ default return ()
+ return
+
+
+
+};
+
+declare function stml:source(
+ $n as node()
+ ) {
+ let $type := "original" (: does not matter :)
+ let $bibl := root($n)/r:STML/r:BiblCommand
+ let $path := data:new-path-to-resource($type, stml:convert($bibl/r:TitleCommand))
+ let $resource := substring-before($path[2], ".xml")
+ return
+
+};
+
+declare function stml:header(
+ $e as element(r:FileCommand),
+ $title as element(tei:title)
+ ) {
+ stml:header(stml:license($e),
+ stml:source($e),
+ stml:responsibility($e),
+ $title)
+};
+
+(: write a header :)
+declare function stml:header(
+ $license as element(tei:availability),
+ $source as element(tei:link)+,
+ $responsibility as element(tei:respStmt)*,
+ $title as element(tei:title)
+ ) {
+
+
+
+ {
+ $title,
+ $responsibility
+ }
+
+ {
+ $license
+ }
+ Open Siddur Project
+ {year-from-date(current-date())}
+
+ {
+ $source
+ }
+
+
+ Document converted from STML
+
+
+
+};
+
+declare function stml:file-path(
+ $e as element()
+ ) {
+ let $file-command := $e/(
+ self::r:FileCommand,
+ ancestor-or-self::r:FileContent[1]/r:FileCommand
+ )[1]
+ let $resource :=
+ substring-before(
+ data:new-path-to-resource(
+ "original",
+ stml:convert($file-command/r:Title)
+ )[2],
+ ".xml"
+ )
+ let $location := stml:file-location($e)
+ return concat($location, "/", $resource)
+
+};
+
+declare function stml:finalize(
+ $converted as element(stml:file)+
+ ) {
+ let $st := stxt:convert($converted)
+ let $support := subsequence($st, 1, count($st) - 1)
+ let $data := $st[last()]
+ let $with-ids :=
+ stxt:assign-xmlids(
+ $data, 1, 1
+ )
+ let $added-hierarchies := hier:add-hierarchies($with-ids, $support)
+ return (
+ $support,
+ hier:separate-files(($added-hierarchies,
+ for $file in $with-ids/descendant-or-self::stml:file
+ return stml:annotations($file, $support)
+ ))
+ )
+};
+
+(:~ file conversion :)
+declare function stml:FileContent(
+ $e as element(r:FileContent)
+ ) {
+ let $file-command := $e/r:FileCommand
+ let $file-path := stml:file-path($file-command)
+ let $file-location := stml:file-location($file-command)
+ let $ShortName := stml:convert($file-command/r:ShortName)
+ let $file-title := stml:convert($file-command/r:Title)
+ let $converted :=
+
+ {
+ stml:header(
+ $e/r:FileCommand,
+ {
+ $file-title
+ }
+ ),
+
+ {
+ stml:convert($e/node())
+ }
+
+ }
+
+ return (
+ if ($e/parent::r:STML)
+ then $converted
+ else (
+ (: this is a file-in-a-file, resulting in an inclusion :)
+ ,
+ $converted
+ )
+ )
+};
+
+(:~ write a responsibility structure :)
+declare function stml:responsibility(
+ $e as element(r:FileCommand)
+ ) as element(tei:respStmt)? {
+ let $ShortName := data($e/r:ShortName)
+ let $contributors := root($e)//r:ContributorCommand[data(r:AppliesToCommand/r:ShortName)=$ShortName]
+ where exists($contributors)
+ return
+ {
+ for $contributor in $contributors
+ return (
+ Transcribed by,
+ {data($contributor/r:ContributorIDCommand[r:Type="name"])}
+ )
+ }
+};
+
+declare function stml:make-annotations(
+ $nodes as node()*
+ ) {
+ for $n in $nodes
+ return
+ typeswitch($n)
+ case element(tei:note) return stml:annotate($n)
+ case element(stml:file) return ()
+ default return stml:make-annotations($n/node())
+};
+
+declare function stml:annotate(
+ $e as element()
+ ) {
+ let $base := $e/ancestor::stml:file[1]/@path/string()
+ let $name := $e/@xml:id/string()
+ let $targets :=
+ if ($e/../tei:anchor[@xml:id=("start-"||$name)])
+ then concat("range(start-", $name, ",end-", $name, ")")
+ else $e/../descendant::tei:ptr[@j:type="FootnoteReference"][@target=concat("#", $name)]/preceding::*[@xml:id][1]/@xml:id
+ for $target in $targets
+ return (
+
+ ),
+ $e
+};
+
+(: extract annotations from an unsplit/uncleaned stml:file
+ : does not recurse through the files
+ :)
+declare function stml:annotations(
+ $e as element(stml:file),
+ $support as element(stml:file)+
+ ) {
+ let $header := $e/tei:TEI/tei:teiHeader
+ let $title :=
+ concat("Notes for ", $header/descendant::tei:title[@type="main"])
+ let $responsibility := $header/descendant::tei:respStmt
+ let $source := $header/descendant::tei:sourceDesc/*
+ let $license := $header/descendant::tei:availability
+ return
+
+ {
+ $e/tei:TEI/@xml:lang,
+ (: the header will be wrong because this is now
+ working on the processed TEI :)
+ stml:header($license,
+ $source,
+ $responsibility,
+ {
+ $title
+ }
+ )
+ }
+ {
+ let $annotations := stml:make-annotations($e/node())
+ let $notes := $annotations/(self::* except self::tei:link)
+ return (
+ {
+ $annotations/self::tei:link
+ },
+ hier:page-links($notes, $support//tei:relatedItem[@type="scan"]/@targetPattern),
+ {
+ $notes
+ }
+ )
+ }
+
+};
+
+declare function stml:DivineNameCommand(
+ $e as element(r:DivineNameCommand)
+ ) {
+ {stml:convert($e/r:DivineName)}
+};
+
+declare function stml:TranslitCommand(
+ $e as element(r:TranslitCommand)
+ ) {
+ let $lang := $e/r:LangCode/string()
+ return
+ if (exists($e/r:OriginalLanguage))
+ then
+ let $original := substring-before($lang, "-")
+ return
+
+ {stml:convert($e/r:AsWritten)}
+
+ {
+ stml:convert($e/r:OriginalLanguage)
+ }
+
+
+ else
+ {
+ stml:convert($e/r:AsWritten)
+ }
+};
+
+declare function stml:SicCommand(
+ $e as element(r:SicCommand)
+ ) {
+ {
+ stml:convert($e/r:IncorrectText),
+ stml:convert($e/r:CorrectedText)
+ }
+};
+
+declare function stml:IncorrectText(
+ $e as element(r:IncorrectText)
+ ) {
+ {stml:convert($e/node())}
+};
+
+declare function stml:CorrectedText(
+ $e as element(r:CorrectedText)
+ ) {
+ {stml:convert($e/node())}
+};
+
+declare function stml:page-image-url(
+ $e as element(r:PageBreakCommand)
+ ) {
+ let $page-images := root($e)/r:STML/r:BiblCommand/
+ r:PageRefCommand[r:Type="page-images"]
+ return
+ replace($page-images/r:URL, "\{\$page\}", $e/r:ScanPage/string())
+};
+
+(:~ page breaks do not appear in the stream text,
+ : but are useful as milestone elements for intermediate
+ : processing
+ :)
+declare function stml:PageBreakCommand(
+ $e as element(r:PageBreakCommand)
+ ) {
+ let $continued := stml:is-pagebreak-continued($e)
+ return (
+ ,
+ if (exists($e/r:ScanPage))
+ then
+
+ else ()
+ )
+};
+
+declare function stml:FootnotePageBreakCommand(
+ $e as element(r:FootnotePageBreakCommand)
+ ) {
+ stml:PageBreakCommand(root($e)//r:PageBreakCommand[r:BookPage=$e/r:BookPage])
+};
+
+declare function stml:NamedCommand(
+ $e as element(r:NamedCommand)
+ ) {
+
+};
+
+declare function stml:EndNamedCommand(
+ $e as element(r:EndNamedCommand)
+ ) {
+
+};
+
+declare function stml:EndNoteCommand(
+ $e as element(r:EndNoteCommand)
+ ) {
+
+};
+
+declare function stml:EndInstructCommand(
+ $e as element(r:EndInstructCommand)
+ ) {
+
+};
+
+(:~ find out what scan pages a (set of) node(s) is(are) on :)
+declare function stml:page(
+ $nodes as node()*
+ ) {
+ distinct-values(
+ for $n in $nodes
+ let $page-break :=
+ if ($n/ancestor::r:FootNoteCommand)
+ then
+ let $fp := $n/(preceding-sibling::r:FootNotePageBreakCommand|preceding::r:PageBreakCommand)[last()]
+ return
+ if ($fp instance of element(r:FootNotePageBreakCommand))
+ then root($n)//r:PageBreakCommand[r:BookPage=$fp/r:BookPage]
+ else $fp
+ else $n/preceding::r:PageBreakCommand[1]
+ return $page-break/(r:ScanPage, r:BookPage)[1]/string()
+ )
+};
+
+declare function stml:note-id(
+ $e as element()
+ ) {
+ if ($e instance of element(r:FootNoteCommand))
+ then concat("fn_", stml:page($e), "_", $e/r:Number/string())
+ else $e/r:ShortName
+};
+
+declare function stml:note-like-commands(
+ $e as element()
+ ) {
+ element tei:note {
+ attribute xml:id { stml:note-id($e) },
+ if ($e instance of element(r:InstructCommand))
+ then attribute type { "instruct" }
+ else (),
+ stml:convert($e/r:NoteContent)
+ },
+ if ($e instance of element(r:FootNoteCommand))
+ then ()
+ else
+
+};
+
+declare function stml:formatting-commands(
+ $e as element()
+ ) {
+ ( (: ignore all formatting :) )
+};
+
+declare function stml:end-l(
+ $e as element()
+ ) {
+
+};
+
+declare function stml:end-p(
+ $e as element()
+ ) {
+ stml:end-l($e),
+
+};
+
+declare function stml:FileCommand(
+ $e as element(r:FileCommand)
+ ) {
+
+ {stml:convert($e/r:Title)}
+
+};
+
+(: the section command leaves a div (which should
+ : ends at the end of the file!) and a head in-place
+ :)
+declare function stml:SectionCommand(
+ $e as element(r:SectionCommand)
+ ) {
+
+ {stml:convert($e/*)}
+
+};
+
+declare function stml:SectionName(
+ $e as element(r:SectionName)
+ ) {
+ {stml:convert($e/node())}
+};
+
+declare function stml:VerseDivision(
+ $e as element(r:VerseDivision)
+ ) {
+
+ {$e/r:Chapter/string()}
+ {$e/r:Verse/string()}
+
+};
+
+declare function stml:Escape(
+ $e as element(r:Escape)
+ ) {
+ substring-after($e, "\")
+};
+
+declare function stml:Pausal(
+ $e as element(r:Pausal)
+ ) {
+ for $t in $e/r:Type
+ return
+ {stml:convert($t/node())}
+};
+
+(:~ poetry mode: just leave a milestone indicating poetry mode beginning :)
+declare function stml:PoetryMode(
+ $e as element(r:PoetryMode)
+ ) {
+
+};
+
+(:~ poetry mode: just leave a milestone indicating poetry mode beginning :)
+declare function stml:EndPoetryMode(
+ $e as element(r:EndPoetryMode)
+ ) {
+
+};
+
+(: include and include block commands :)
+declare function stml:IncludeCommand(
+ $e as element()
+ ) {
+ let $is-block := $e instance of element(r:IncludeBlockCommand)
+ let $inclusion := $e/r:ShortName/string()
+ let $inclusion-element := root($e)//*[r:ShortName=$inclusion]
+ let $my-file := $e/parent::r:FileContent
+ let $inclusion-file := $inclusion-element/parent::r:FileContent
+ let $base :=
+ if ($my-file is $inclusion-file)
+ then ""
+ else stml:file-path($inclusion-file/r:FileCommand)
+ return
+
+};
+
+declare function stml:SegmentContent(
+ $e as element(r:SegmentContent)
+ ) {
+ let $text := stml:convert($e/node())
+ where exists($text) (: nonzero length :)
+ return
+ {
+ $text
+ }
+};
+
+declare function stml:HebrewCommand(
+ $e as element(r:HebrewCommand)
+ ) {
+ for $xml in stml:convert($e/*)
+ return
+ typeswitch ($xml)
+ case element() return
+ element { QName(namespace-uri($xml), name($xml)) }{
+ attribute xml:lang {"he"},
+ $xml/node()
+ }
+ default return $xml
+};
+
+declare function stml:EmphasisCommand(
+ $e as element(r:EmphasisCommand)
+ ) {
+ {stml:convert($e/*)}
+};
+
+declare function stml:ReferenceCommand(
+ $e as element(r:ReferenceCommand)
+ ) {
+ {
+ stml:convert($e/r:SegmentContent)
+ }
+};
+
+(:~ for a footnote reference, leave behind an indicator that
+ : more processing will need to be done
+ :)
+declare function stml:FootRefCommand(
+ $e as element(r:FootRefCommand)
+ ) {
+ let $refers-to := $e/following::r:FootNoteCommand[r:Number=$e/r:Reference]
+ return
+
+};
+
+declare function stml:PageReferenceCommand(
+ $e as element(r:PageReferenceCommand)
+ ) {
+ let $refers-to := root($e)//*[r:ShortName=$e/r:ShortName]
+ let $my-file := $e/ancestor::r:FileContent[1]
+ let $reference-file := $refers-to/ancestor::r:FileContent[1]
+ let $base :=
+ if ($my-file is $reference-file)
+ then ""
+ else stml:file-path($reference-file/r:FileCommand)
+ return
+ {
+ string-join((
+ "page"[$e/r:ReferenceType = "prr"],
+ $e/r:PageNumber
+ ), " ")
+ }
+};
+
+declare function stml:is-pagebreak-continued(
+ $e as element()
+ ) {
+ let $next-pb :=
+ $e/(
+ following-sibling::r:PageBreakCommand|
+ following-sibling::r:FootnotePageBreakCommand
+ )
+ return
+ exists(
+ $e/following-sibling::r:ContCommand
+ [empty($next-pb) or (.<<$next-pb)]
+ )
+};
+
+(:~ generic pass-through :)
+declare function stml:pass-through(
+ $e as element()
+ ) {
+ stml:convert($e/node())
+};
+
+declare function stml:text(
+ $t as text()
+ ) {
+ let $s := normalize-space($t)
+ where $s
+ return text {
+ if ($t/ancestor::r:SegmentContent)
+ then concat(" ", $s, " ")
+ else $s
+ }
+};
diff --git a/opensiddur-sources/input-conversion/rawtext/streamtext.xqm b/opensiddur-sources/input-conversion/rawtext/streamtext.xqm
new file mode 100644
index 00000000..020fd79e
--- /dev/null
+++ b/opensiddur-sources/input-conversion/rawtext/streamtext.xqm
@@ -0,0 +1,226 @@
+xquery version "3.0";
+(:~ Convert STML to JLPTEI: construct a text stream
+ : Note: this stream will have interspersed elements.
+ : seg, ptr, and anchor should be retained;
+ : @j:* attributes and all other elements should be removed
+ :
+ : @author Efraim Feinstein
+ : Copyright 2012 Efraim Feinstein
+ : Licensed under the GNU Lesser General Public License, version 3 or later
+ :)
+module namespace stxt="http://jewishliturgy.org/transform/streamtext";
+
+declare namespace error="http://jewishliturgy.org/errors";
+declare namespace tei="http://www.tei-c.org/ns/1.0";
+declare namespace j="http://jewishliturgy.org/ns/jlptei/1.0";
+declare namespace stml="http://jewishliturgy.org/transform/stml";
+
+(: construct a streamText given temporary-stream (which may have embedded files) :)
+declare function stxt:convert(
+ $nodes as node()*
+ ) {
+ for $n in $nodes
+ return
+ typeswitch ($n)
+ case element(stml:temporary-stream)return stxt:temporary-stream($n)
+ case element(tei:seg) return stxt:seg($n)
+ case element(tei:lb) return stxt:lb($n)
+ case text() return stxt:text($n)
+ case document-node() return stxt:convert($n/*)
+ default return (
+ stxt:copy($n)
+ )
+};
+
+declare function stxt:copy(
+ $e as element()
+ ) {
+ element {QName(namespace-uri($e), name($e))}{
+ $e/@*,
+ stxt:convert($e/node())
+ }
+};
+
+declare function stxt:lb(
+ $e as element(tei:lb)
+ ) {
+ if (stxt:is-poetry-mode($e))
+ then $e
+ else ()
+};
+
+(: return whether a segment is a continuation of
+ : another segment :)
+declare function stxt:is-continuation-segment(
+ $e as element(tei:seg)
+ ) {
+ exists(
+ stxt:is-continued-segment(
+ $e/preceding-sibling::tei:seg[1]
+ )
+ )
+};
+
+(:~ determine if we're in poetry mode (note:poetry mode may cross files!)
+ :)
+declare function stxt:is-poetry-mode(
+ $n as node()
+ ) {
+ $n/(
+ count(preceding::tei:milestone[@type="Begin-Poetry-Mode"]) >
+ count(preceding::tei:milestone[@type="End-Poetry-Mode"])
+ )
+};
+
+(: return whether a segment is continued to the next segment
+ : if it is continued, return the segment that continues it
+ :)
+declare function stxt:is-continued-segment(
+ $e as element(tei:seg)?
+ ) as element(tei:seg)? {
+ let $next := $e/following-sibling::tei:seg[1]
+ let $is-terminated :=
+ exists($e/tei:pc[@j:type="pausal"]) or
+ (exists(($next,$e)/@xml:lang) and
+ not($next/@xml:lang = $e/@xml:lang)) or
+ $e/following-sibling::tei:pb[1][. << $next]/@j:continued="false" or
+ (stxt:is-poetry-mode($e) and
+ ($e/following-sibling::tei:lb[1] << $next))
+ return
+ $next[not($is-terminated)]
+};
+
+declare function stxt:seg(
+ $e as element(tei:seg)
+ ) {
+ stxt:seg($e, false())
+};
+
+(: $override turns off checking for continuation :)
+declare function stxt:seg(
+ $e as element(tei:seg),
+ $override as xs:boolean
+ ) {
+ if (not($override) and stxt:is-continuation-segment($e))
+ then
+ ((: is this a continued segment? if yes, ignore it :))
+ else
+ let $next := stxt:is-continued-segment($e)
+ let $continued-segments :=
+ if ($next)
+ then stxt:seg($next, true())
+ else ()
+ return
+ element tei:seg {
+ attribute j:pages {
+ string-join(
+ distinct-values(
+ ($e/preceding::tei:pb[@ed="scan"][1]/@n,
+ $continued-segments/@j:page)
+ ),
+ " "
+ )
+ },
+ $e/@*,
+ stxt:convert($e/node()),
+ $continued-segments/node()
+ }
+};
+
+(: once segments are finalized, assign xml:ids to the stream
+ : elements
+ :)
+declare function stxt:assign-xmlids(
+ $n as node()?,
+ $seg-ctr as xs:integer,
+ $w-ctr as xs:integer
+ ) {
+ typeswitch($n)
+ case empty-sequence() return ()
+ case text() return $n
+ case element(tei:anchor) return stxt:assign-xmlids-seg-level($n, $seg-ctr, $w-ctr)
+ case element(tei:ptr) return stxt:assign-xmlids-seg-level($n, $seg-ctr, $w-ctr)
+ case element(tei:seg) return stxt:assign-xmlids-seg-level($n, $seg-ctr, $w-ctr)
+ case element(tei:w) return stxt:assign-xmlids-w-level($n, $seg-ctr, $w-ctr)
+ case element(tei:pc) return stxt:assign-xmlids-w-level($n, $seg-ctr, $w-ctr)
+ case element(stml:file)
+ return (
+ element stml:file {
+ $n/@*,
+ (: file level, reset all counters :)
+ stxt:assign-xmlids($n/node()[1], 1, 1)
+ },
+ stxt:assign-xmlids($n/following-sibling::node()[1], $seg-ctr, $w-ctr)
+ )
+ default return (
+ (: other element type? copy and recurse :)
+ element { QName(namespace-uri($n), name($n)) }{
+ $n/@*,
+ stxt:assign-xmlids($n/node()[1], $seg-ctr, $w-ctr)
+ },
+ stxt:assign-xmlids($n/following-sibling::node()[1], $seg-ctr, $w-ctr)
+ )
+};
+
+declare function stxt:assign-xmlids-seg-level(
+ $n as element(),
+ $seg-ctr as xs:integer,
+ $w-ctr as xs:integer
+ ) {
+ (: segment level :)
+ element { QName(namespace-uri($n), name($n))}{
+ (
+ $n/@xml:id,
+ attribute xml:id { concat(local-name($n), "_", $seg-ctr) }
+ )[1],
+ $n/(@* except @xml:id),
+ stxt:assign-xmlids($n/node()[1], $seg-ctr, 1)
+ },
+ stxt:assign-xmlids($n/following-sibling::node()[1], $seg-ctr + 1, $w-ctr)
+};
+
+declare function stxt:assign-xmlids-w-level(
+ $n as element(),
+ $seg-ctr as xs:integer,
+ $w-ctr as xs:integer
+ ) {
+ (: word-level :)
+ element tei:w {
+ (
+ $n/@xml:id,
+ attribute xml:id {
+ concat(local-name($n), "_", $seg-ctr, "_", $w-ctr)
+ }
+ )[1],
+ $n/(@* except @xml:id),
+ stxt:assign-xmlids($n/node()[1], $seg-ctr, $w-ctr)
+ },
+ stxt:assign-xmlids($n/following-sibling::node()[1], $seg-ctr, $w-ctr + 1)
+};
+
+declare function stxt:temporary-stream(
+ $e as element(stml:temporary-stream)
+ ) {
+ {
+ stxt:convert($e/node())
+ }
+};
+
+declare function stxt:text(
+ $t as text()
+ ) {
+ if ($t/ancestor::tei:seg and not($t/parent::tei:pc))
+ then
+ (: split into words and punctuation characters :)
+ let $tokens := tokenize($t, "\s+")
+ for $token in $tokens
+ let $groups := text:groups($token, "([\p{L}\p{M}\p{N}\p{S}\p{C}]+)|(\p{P})")
+ let $word-chars := $groups[2]
+ let $punct-chars := $groups[3]
+ where $groups[1]
+ return
+ if ($word-chars)
+ then {$word-chars}
+ else {$punct-chars}
+ else normalize-space($t)
+};
\ No newline at end of file
diff --git a/code/input-conversion/rawtext/unzip.xsl2 b/opensiddur-sources/input-conversion/rawtext/unzip.xsl2
similarity index 100%
rename from code/input-conversion/rawtext/unzip.xsl2
rename to opensiddur-sources/input-conversion/rawtext/unzip.xsl2
diff --git a/code/input-conversion/stml/stml2xml.el b/opensiddur-sources/input-conversion/stml/stml2xml.el
similarity index 100%
rename from code/input-conversion/stml/stml2xml.el
rename to opensiddur-sources/input-conversion/stml/stml2xml.el
diff --git a/code/input-conversion/strongs/strongs2jlptei.xsl2 b/opensiddur-sources/input-conversion/strongs/strongs2jlptei.xsl2
similarity index 80%
rename from code/input-conversion/strongs/strongs2jlptei.xsl2
rename to opensiddur-sources/input-conversion/strongs/strongs2jlptei.xsl2
index de212801..72c10e03 100644
--- a/code/input-conversion/strongs/strongs2jlptei.xsl2
+++ b/opensiddur-sources/input-conversion/strongs/strongs2jlptei.xsl2
@@ -4,10 +4,11 @@
xmlns:tei="http://www.tei-c.org/ns/1.0"
xmlns:j="http://jewishliturgy.org/ns/jlptei/1.0"
xmlns:osis="http://www.bibletechnologies.net/2003/OSIS/namespace"
+ xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:xd="http://www.pnp-software.com/XSLTdoc"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:cc="http://web.resource.org/cc/"
- exclude-result-prefixes="osis xd rdf cc">
+ exclude-result-prefixes="osis xs xd rdf cc">
@@ -55,60 +56,46 @@
Populate template and launch main processing logic for program
-
-
-
-
-
-
-
- To the extent possible under law,
- the contributors who associated
- Creative Commons Zero
-
- with this work have waived all copyright and related or
- neighboring rights to this work.
-
-
-
-
-
-
-
-
-
-
-
-
- Strong's Dictionary of the Words in the Hebrew Bible
+
+
+
+
+
+
+ Strong's Dictionary of the Words in the Hebrew Bible
-
+
+
+
+
+
+
+
+
-
-
-
+
diff --git a/code/input-conversion/strongs/strongs2xlittest.xsl2 b/opensiddur-sources/input-conversion/strongs/strongs2xlittest.xsl2
similarity index 100%
rename from code/input-conversion/strongs/strongs2xlittest.xsl2
rename to opensiddur-sources/input-conversion/strongs/strongs2xlittest.xsl2
diff --git a/setup/hebrew.dtd b/opensiddur-sources/input-conversion/wlc/hebrew.dtd
similarity index 100%
rename from setup/hebrew.dtd
rename to opensiddur-sources/input-conversion/wlc/hebrew.dtd
diff --git a/code/input-conversion/wlc/join-wlc.xsl2 b/opensiddur-sources/input-conversion/wlc/join-wlc.xsl2
similarity index 99%
rename from code/input-conversion/wlc/join-wlc.xsl2
rename to opensiddur-sources/input-conversion/wlc/join-wlc.xsl2
index 9457f91f..334d942f 100644
--- a/code/input-conversion/wlc/join-wlc.xsl2
+++ b/opensiddur-sources/input-conversion/wlc/join-wlc.xsl2
@@ -226,7 +226,7 @@
-
+
diff --git a/code/input-conversion/wlc/pre-encode.xsl2 b/opensiddur-sources/input-conversion/wlc/pre-encode.xsl2
similarity index 100%
rename from code/input-conversion/wlc/pre-encode.xsl2
rename to opensiddur-sources/input-conversion/wlc/pre-encode.xsl2
diff --git a/code/input-conversion/wlc/wlc2jlptei.xsl2 b/opensiddur-sources/input-conversion/wlc/wlc2jlptei.xsl2
similarity index 87%
rename from code/input-conversion/wlc/wlc2jlptei.xsl2
rename to opensiddur-sources/input-conversion/wlc/wlc2jlptei.xsl2
index 13efe11a..f54f4d56 100644
--- a/code/input-conversion/wlc/wlc2jlptei.xsl2
+++ b/opensiddur-sources/input-conversion/wlc/wlc2jlptei.xsl2
@@ -25,7 +25,7 @@ TODO:
Convert the Joined WLC to JLPTEI.
- Copyright 2009-2010,2012 Efraim Feinstein
+ Copyright 2009-2010,2012-2014 Efraim Feinstein
This program is free software: you can redistribute it
@@ -69,21 +69,17 @@ TODO:
- Year/Month directory
-
-
Subdirectory of $result-directory to place tanach original files in
+ select="'original'"/>
Notes file name (base of name without extension)
+ select="concat('notes/', encode-for-uri('Notes_from_the_Westminster_Leningrad_Codex'))"/>
Contributor list entry file name (base w/o extension)
@@ -134,6 +130,42 @@ TODO:
+
+ Return a reformatted date from DD\sMonth\sYYYY to YYYY-MM-DD
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Return the generated xml:id of a word
@@ -213,6 +245,11 @@ TODO:
+
+ ignore x
+
+
+
Split a given verse into segments based on tropeset to true() if the verse should be considered to use eme"t trope. otherwise, false
@@ -269,6 +306,7 @@ TODO:
+ editorial
@@ -335,11 +373,6 @@ TODO:
Turn WLC x into a link for a tei:note
-
+ ('#',$link-to-id, ' /data/',$notes-file-name,'#note_',.),'')}"/>
@@ -378,18 +411,21 @@ TODO:
-
-
+
+
+
+
+
-
-
-
-
+
+
+ Transcribed by
+ Christopher Kimball
+
@@ -416,7 +452,7 @@ TODO:
as="xs:string" />
-
+
@@ -447,9 +483,9 @@ TODO:
+ as="element(tei:bibl)" select="$bibl-content" />
+ as="element(tei:respStmt)" select="$responsGrp-content"/>
@@ -476,7 +512,7 @@ TODO:
+ as="element(tei:respStmt)" select="$responsGrp-content"/>
@@ -484,7 +520,7 @@ TODO:
-
+
@@ -505,15 +541,22 @@ TODO:
-
+
+
+
+
+
+
+
+
-
+
@@ -722,11 +765,20 @@ TODO:
+ as="element(tei:bibl)" select="$bibl-content" />
+ as="element(tei:respStmt)+" select="$responsGrp-content" />
+ as="element(j:links)?" >
+
+
+
+
+
+
+
+
+
@@ -735,27 +787,32 @@ TODO:
+ Notes from the Westminster Leningrad Codex
+ as="element(tei:respStmt)">
+
+ Transcribed by
+ Christopher Kimball
+
+
-
+
-
-
-
-
-
+
+
+
+
+
@@ -776,16 +833,12 @@ TODO:
-
+
-
+
-
- v.
-
-
@@ -795,27 +848,30 @@ TODO:
+
+ v.
+
+
- J. Alan Groves Center for Advanced Biblical
- Research
+ J. Alan Groves Center for Advanced Biblical ResearchGlenside, PA
-
+
-
+ via web site2012-06-07
+ Leningrad_Codex
- The transcriber has released the text "without restriction."
- A copy of the license is in our
+ The transcriber has released the text "without restriction."source code repository.
+ target="https://github.com/opensiddur/opensiddur/blob/master/opensiddur-sources/sources/tanach/WLC/License.html">Link to license.
diff --git a/sources/1917JPS/1917JPS.xsd b/opensiddur-sources/sources/1917JPS/1917JPS.xsd
similarity index 100%
rename from sources/1917JPS/1917JPS.xsd
rename to opensiddur-sources/sources/1917JPS/1917JPS.xsd
diff --git a/sources/1917JPS/Makefile b/opensiddur-sources/sources/1917JPS/Makefile
similarity index 100%
rename from sources/1917JPS/Makefile
rename to opensiddur-sources/sources/1917JPS/Makefile
diff --git a/sources/1917JPS/README.md b/opensiddur-sources/sources/1917JPS/README.md
similarity index 100%
rename from sources/1917JPS/README.md
rename to opensiddur-sources/sources/1917JPS/README.md
diff --git a/sources/1917JPS/Tanakh-JPS1917.pdf b/opensiddur-sources/sources/1917JPS/Tanakh-JPS1917.pdf
similarity index 100%
rename from sources/1917JPS/Tanakh-JPS1917.pdf
rename to opensiddur-sources/sources/1917JPS/Tanakh-JPS1917.pdf
diff --git a/sources/1917JPS/Tanakh-JPS1917.xml b/opensiddur-sources/sources/1917JPS/Tanakh-JPS1917.xml
similarity index 100%
rename from sources/1917JPS/Tanakh-JPS1917.xml
rename to opensiddur-sources/sources/1917JPS/Tanakh-JPS1917.xml
diff --git a/sources/1917JPS/Tanakh1917b.README b/opensiddur-sources/sources/1917JPS/Tanakh1917b.README
similarity index 100%
rename from sources/1917JPS/Tanakh1917b.README
rename to opensiddur-sources/sources/1917JPS/Tanakh1917b.README
diff --git a/sources/1917JPS/Tanakh1917b.txt b/opensiddur-sources/sources/1917JPS/Tanakh1917b.txt
similarity index 100%
rename from sources/1917JPS/Tanakh1917b.txt
rename to opensiddur-sources/sources/1917JPS/Tanakh1917b.txt
diff --git a/sources/1917JPS/books/DANIEL.html b/opensiddur-sources/sources/1917JPS/books/DANIEL.html
similarity index 100%
rename from sources/1917JPS/books/DANIEL.html
rename to opensiddur-sources/sources/1917JPS/books/DANIEL.html
diff --git a/sources/1917JPS/books/DANIEL.xml b/opensiddur-sources/sources/1917JPS/books/DANIEL.xml
similarity index 100%
rename from sources/1917JPS/books/DANIEL.xml
rename to opensiddur-sources/sources/1917JPS/books/DANIEL.xml
diff --git a/sources/1917JPS/books/DEUTERONOMY.html b/opensiddur-sources/sources/1917JPS/books/DEUTERONOMY.html
similarity index 100%
rename from sources/1917JPS/books/DEUTERONOMY.html
rename to opensiddur-sources/sources/1917JPS/books/DEUTERONOMY.html
diff --git a/sources/1917JPS/books/DEUTERONOMY.xml b/opensiddur-sources/sources/1917JPS/books/DEUTERONOMY.xml
similarity index 100%
rename from sources/1917JPS/books/DEUTERONOMY.xml
rename to opensiddur-sources/sources/1917JPS/books/DEUTERONOMY.xml
diff --git a/sources/1917JPS/books/ECCLESIASTES.html b/opensiddur-sources/sources/1917JPS/books/ECCLESIASTES.html
similarity index 100%
rename from sources/1917JPS/books/ECCLESIASTES.html
rename to opensiddur-sources/sources/1917JPS/books/ECCLESIASTES.html
diff --git a/sources/1917JPS/books/ECCLESIASTES.xml b/opensiddur-sources/sources/1917JPS/books/ECCLESIASTES.xml
similarity index 100%
rename from sources/1917JPS/books/ECCLESIASTES.xml
rename to opensiddur-sources/sources/1917JPS/books/ECCLESIASTES.xml
diff --git a/sources/1917JPS/books/ESTHER.html b/opensiddur-sources/sources/1917JPS/books/ESTHER.html
similarity index 100%
rename from sources/1917JPS/books/ESTHER.html
rename to opensiddur-sources/sources/1917JPS/books/ESTHER.html
diff --git a/sources/1917JPS/books/ESTHER.xml b/opensiddur-sources/sources/1917JPS/books/ESTHER.xml
similarity index 100%
rename from sources/1917JPS/books/ESTHER.xml
rename to opensiddur-sources/sources/1917JPS/books/ESTHER.xml
diff --git a/sources/1917JPS/books/EXODUS.html b/opensiddur-sources/sources/1917JPS/books/EXODUS.html
similarity index 100%
rename from sources/1917JPS/books/EXODUS.html
rename to opensiddur-sources/sources/1917JPS/books/EXODUS.html
diff --git a/sources/1917JPS/books/EXODUS.xml b/opensiddur-sources/sources/1917JPS/books/EXODUS.xml
similarity index 100%
rename from sources/1917JPS/books/EXODUS.xml
rename to opensiddur-sources/sources/1917JPS/books/EXODUS.xml
diff --git a/sources/1917JPS/books/EZEKIEL.html b/opensiddur-sources/sources/1917JPS/books/EZEKIEL.html
similarity index 100%
rename from sources/1917JPS/books/EZEKIEL.html
rename to opensiddur-sources/sources/1917JPS/books/EZEKIEL.html
diff --git a/sources/1917JPS/books/EZEKIEL.xml b/opensiddur-sources/sources/1917JPS/books/EZEKIEL.xml
similarity index 100%
rename from sources/1917JPS/books/EZEKIEL.xml
rename to opensiddur-sources/sources/1917JPS/books/EZEKIEL.xml
diff --git a/sources/1917JPS/books/EZRA.html b/opensiddur-sources/sources/1917JPS/books/EZRA.html
similarity index 100%
rename from sources/1917JPS/books/EZRA.html
rename to opensiddur-sources/sources/1917JPS/books/EZRA.html
diff --git a/sources/1917JPS/books/EZRA.xml b/opensiddur-sources/sources/1917JPS/books/EZRA.xml
similarity index 100%
rename from sources/1917JPS/books/EZRA.xml
rename to opensiddur-sources/sources/1917JPS/books/EZRA.xml
diff --git a/sources/1917JPS/books/FIRST CHRONICLES.html b/opensiddur-sources/sources/1917JPS/books/FIRST CHRONICLES.html
similarity index 100%
rename from sources/1917JPS/books/FIRST CHRONICLES.html
rename to opensiddur-sources/sources/1917JPS/books/FIRST CHRONICLES.html
diff --git a/sources/1917JPS/books/FIRST CHRONICLES.xml b/opensiddur-sources/sources/1917JPS/books/FIRST CHRONICLES.xml
similarity index 100%
rename from sources/1917JPS/books/FIRST CHRONICLES.xml
rename to opensiddur-sources/sources/1917JPS/books/FIRST CHRONICLES.xml
diff --git a/sources/1917JPS/books/FIRST KINGS.html b/opensiddur-sources/sources/1917JPS/books/FIRST KINGS.html
similarity index 100%
rename from sources/1917JPS/books/FIRST KINGS.html
rename to opensiddur-sources/sources/1917JPS/books/FIRST KINGS.html
diff --git a/sources/1917JPS/books/FIRST KINGS.xml b/opensiddur-sources/sources/1917JPS/books/FIRST KINGS.xml
similarity index 100%
rename from sources/1917JPS/books/FIRST KINGS.xml
rename to opensiddur-sources/sources/1917JPS/books/FIRST KINGS.xml
diff --git a/sources/1917JPS/books/FIRST SAMUEL.html b/opensiddur-sources/sources/1917JPS/books/FIRST SAMUEL.html
similarity index 100%
rename from sources/1917JPS/books/FIRST SAMUEL.html
rename to opensiddur-sources/sources/1917JPS/books/FIRST SAMUEL.html
diff --git a/sources/1917JPS/books/FIRST SAMUEL.xml b/opensiddur-sources/sources/1917JPS/books/FIRST SAMUEL.xml
similarity index 100%
rename from sources/1917JPS/books/FIRST SAMUEL.xml
rename to opensiddur-sources/sources/1917JPS/books/FIRST SAMUEL.xml
diff --git a/sources/1917JPS/books/GENESIS.html b/opensiddur-sources/sources/1917JPS/books/GENESIS.html
similarity index 100%
rename from sources/1917JPS/books/GENESIS.html
rename to opensiddur-sources/sources/1917JPS/books/GENESIS.html
diff --git a/sources/1917JPS/books/GENESIS.xml b/opensiddur-sources/sources/1917JPS/books/GENESIS.xml
similarity index 100%
rename from sources/1917JPS/books/GENESIS.xml
rename to opensiddur-sources/sources/1917JPS/books/GENESIS.xml
diff --git a/sources/1917JPS/books/ISAIAH.html b/opensiddur-sources/sources/1917JPS/books/ISAIAH.html
similarity index 100%
rename from sources/1917JPS/books/ISAIAH.html
rename to opensiddur-sources/sources/1917JPS/books/ISAIAH.html
diff --git a/sources/1917JPS/books/ISAIAH.xml b/opensiddur-sources/sources/1917JPS/books/ISAIAH.xml
similarity index 100%
rename from sources/1917JPS/books/ISAIAH.xml
rename to opensiddur-sources/sources/1917JPS/books/ISAIAH.xml
diff --git a/sources/1917JPS/books/JEREMIAH.html b/opensiddur-sources/sources/1917JPS/books/JEREMIAH.html
similarity index 100%
rename from sources/1917JPS/books/JEREMIAH.html
rename to opensiddur-sources/sources/1917JPS/books/JEREMIAH.html
diff --git a/sources/1917JPS/books/JEREMIAH.xml b/opensiddur-sources/sources/1917JPS/books/JEREMIAH.xml
similarity index 100%
rename from sources/1917JPS/books/JEREMIAH.xml
rename to opensiddur-sources/sources/1917JPS/books/JEREMIAH.xml
diff --git a/sources/1917JPS/books/JOB.html b/opensiddur-sources/sources/1917JPS/books/JOB.html
similarity index 100%
rename from sources/1917JPS/books/JOB.html
rename to opensiddur-sources/sources/1917JPS/books/JOB.html
diff --git a/sources/1917JPS/books/JOB.xml b/opensiddur-sources/sources/1917JPS/books/JOB.xml
similarity index 100%
rename from sources/1917JPS/books/JOB.xml
rename to opensiddur-sources/sources/1917JPS/books/JOB.xml
diff --git a/sources/1917JPS/books/JOSHUA.html b/opensiddur-sources/sources/1917JPS/books/JOSHUA.html
similarity index 100%
rename from sources/1917JPS/books/JOSHUA.html
rename to opensiddur-sources/sources/1917JPS/books/JOSHUA.html
diff --git a/sources/1917JPS/books/JOSHUA.xml b/opensiddur-sources/sources/1917JPS/books/JOSHUA.xml
similarity index 100%
rename from sources/1917JPS/books/JOSHUA.xml
rename to opensiddur-sources/sources/1917JPS/books/JOSHUA.xml
diff --git a/sources/1917JPS/books/JUDGES.html b/opensiddur-sources/sources/1917JPS/books/JUDGES.html
similarity index 100%
rename from sources/1917JPS/books/JUDGES.html
rename to opensiddur-sources/sources/1917JPS/books/JUDGES.html
diff --git a/sources/1917JPS/books/JUDGES.xml b/opensiddur-sources/sources/1917JPS/books/JUDGES.xml
similarity index 100%
rename from sources/1917JPS/books/JUDGES.xml
rename to opensiddur-sources/sources/1917JPS/books/JUDGES.xml
diff --git a/sources/1917JPS/books/LAMENTATIONS.html b/opensiddur-sources/sources/1917JPS/books/LAMENTATIONS.html
similarity index 100%
rename from sources/1917JPS/books/LAMENTATIONS.html
rename to opensiddur-sources/sources/1917JPS/books/LAMENTATIONS.html
diff --git a/sources/1917JPS/books/LAMENTATIONS.xml b/opensiddur-sources/sources/1917JPS/books/LAMENTATIONS.xml
similarity index 100%
rename from sources/1917JPS/books/LAMENTATIONS.xml
rename to opensiddur-sources/sources/1917JPS/books/LAMENTATIONS.xml
diff --git a/sources/1917JPS/books/LEVITICUS.html b/opensiddur-sources/sources/1917JPS/books/LEVITICUS.html
similarity index 100%
rename from sources/1917JPS/books/LEVITICUS.html
rename to opensiddur-sources/sources/1917JPS/books/LEVITICUS.html
diff --git a/sources/1917JPS/books/LEVITICUS.xml b/opensiddur-sources/sources/1917JPS/books/LEVITICUS.xml
similarity index 100%
rename from sources/1917JPS/books/LEVITICUS.xml
rename to opensiddur-sources/sources/1917JPS/books/LEVITICUS.xml
diff --git a/sources/1917JPS/books/NEHEMIAH.html b/opensiddur-sources/sources/1917JPS/books/NEHEMIAH.html
similarity index 100%
rename from sources/1917JPS/books/NEHEMIAH.html
rename to opensiddur-sources/sources/1917JPS/books/NEHEMIAH.html
diff --git a/sources/1917JPS/books/NEHEMIAH.xml b/opensiddur-sources/sources/1917JPS/books/NEHEMIAH.xml
similarity index 100%
rename from sources/1917JPS/books/NEHEMIAH.xml
rename to opensiddur-sources/sources/1917JPS/books/NEHEMIAH.xml
diff --git a/sources/1917JPS/books/NUMBERS.html b/opensiddur-sources/sources/1917JPS/books/NUMBERS.html
similarity index 100%
rename from sources/1917JPS/books/NUMBERS.html
rename to opensiddur-sources/sources/1917JPS/books/NUMBERS.html
diff --git a/sources/1917JPS/books/NUMBERS.xml b/opensiddur-sources/sources/1917JPS/books/NUMBERS.xml
similarity index 100%
rename from sources/1917JPS/books/NUMBERS.xml
rename to opensiddur-sources/sources/1917JPS/books/NUMBERS.xml
diff --git a/sources/1917JPS/books/PREFACE.html b/opensiddur-sources/sources/1917JPS/books/PREFACE.html
similarity index 100%
rename from sources/1917JPS/books/PREFACE.html
rename to opensiddur-sources/sources/1917JPS/books/PREFACE.html
diff --git a/sources/1917JPS/books/PREFACE.xml b/opensiddur-sources/sources/1917JPS/books/PREFACE.xml
similarity index 100%
rename from sources/1917JPS/books/PREFACE.xml
rename to opensiddur-sources/sources/1917JPS/books/PREFACE.xml
diff --git a/sources/1917JPS/books/PROVERBS.html b/opensiddur-sources/sources/1917JPS/books/PROVERBS.html
similarity index 100%
rename from sources/1917JPS/books/PROVERBS.html
rename to opensiddur-sources/sources/1917JPS/books/PROVERBS.html
diff --git a/sources/1917JPS/books/PROVERBS.xml b/opensiddur-sources/sources/1917JPS/books/PROVERBS.xml
similarity index 100%
rename from sources/1917JPS/books/PROVERBS.xml
rename to opensiddur-sources/sources/1917JPS/books/PROVERBS.xml
diff --git a/sources/1917JPS/books/PSALMS.html b/opensiddur-sources/sources/1917JPS/books/PSALMS.html
similarity index 100%
rename from sources/1917JPS/books/PSALMS.html
rename to opensiddur-sources/sources/1917JPS/books/PSALMS.html
diff --git a/sources/1917JPS/books/PSALMS.xml b/opensiddur-sources/sources/1917JPS/books/PSALMS.xml
similarity index 100%
rename from sources/1917JPS/books/PSALMS.xml
rename to opensiddur-sources/sources/1917JPS/books/PSALMS.xml
diff --git a/sources/1917JPS/books/RUTH.html b/opensiddur-sources/sources/1917JPS/books/RUTH.html
similarity index 100%
rename from sources/1917JPS/books/RUTH.html
rename to opensiddur-sources/sources/1917JPS/books/RUTH.html
diff --git a/sources/1917JPS/books/RUTH.xml b/opensiddur-sources/sources/1917JPS/books/RUTH.xml
similarity index 100%
rename from sources/1917JPS/books/RUTH.xml
rename to opensiddur-sources/sources/1917JPS/books/RUTH.xml
diff --git a/sources/1917JPS/books/SECOND CHRONICLES.html b/opensiddur-sources/sources/1917JPS/books/SECOND CHRONICLES.html
similarity index 100%
rename from sources/1917JPS/books/SECOND CHRONICLES.html
rename to opensiddur-sources/sources/1917JPS/books/SECOND CHRONICLES.html
diff --git a/sources/1917JPS/books/SECOND CHRONICLES.xml b/opensiddur-sources/sources/1917JPS/books/SECOND CHRONICLES.xml
similarity index 100%
rename from sources/1917JPS/books/SECOND CHRONICLES.xml
rename to opensiddur-sources/sources/1917JPS/books/SECOND CHRONICLES.xml
diff --git a/sources/1917JPS/books/SECOND KINGS.html b/opensiddur-sources/sources/1917JPS/books/SECOND KINGS.html
similarity index 100%
rename from sources/1917JPS/books/SECOND KINGS.html
rename to opensiddur-sources/sources/1917JPS/books/SECOND KINGS.html
diff --git a/sources/1917JPS/books/SECOND KINGS.xml b/opensiddur-sources/sources/1917JPS/books/SECOND KINGS.xml
similarity index 100%
rename from sources/1917JPS/books/SECOND KINGS.xml
rename to opensiddur-sources/sources/1917JPS/books/SECOND KINGS.xml
diff --git a/sources/1917JPS/books/SECOND SAMUEL.html b/opensiddur-sources/sources/1917JPS/books/SECOND SAMUEL.html
similarity index 100%
rename from sources/1917JPS/books/SECOND SAMUEL.html
rename to opensiddur-sources/sources/1917JPS/books/SECOND SAMUEL.html
diff --git a/sources/1917JPS/books/SECOND SAMUEL.xml b/opensiddur-sources/sources/1917JPS/books/SECOND SAMUEL.xml
similarity index 100%
rename from sources/1917JPS/books/SECOND SAMUEL.xml
rename to opensiddur-sources/sources/1917JPS/books/SECOND SAMUEL.xml
diff --git a/sources/1917JPS/books/SONG OF SONGS.html b/opensiddur-sources/sources/1917JPS/books/SONG OF SONGS.html
similarity index 100%
rename from sources/1917JPS/books/SONG OF SONGS.html
rename to opensiddur-sources/sources/1917JPS/books/SONG OF SONGS.html
diff --git a/sources/1917JPS/books/SONG OF SONGS.xml b/opensiddur-sources/sources/1917JPS/books/SONG OF SONGS.xml
similarity index 100%
rename from sources/1917JPS/books/SONG OF SONGS.xml
rename to opensiddur-sources/sources/1917JPS/books/SONG OF SONGS.xml
diff --git a/sources/1917JPS/books/TABLE OF READINGS.html b/opensiddur-sources/sources/1917JPS/books/TABLE OF READINGS.html
similarity index 100%
rename from sources/1917JPS/books/TABLE OF READINGS.html
rename to opensiddur-sources/sources/1917JPS/books/TABLE OF READINGS.html
diff --git a/sources/1917JPS/books/TABLE OF READINGS.xml b/opensiddur-sources/sources/1917JPS/books/TABLE OF READINGS.xml
similarity index 100%
rename from sources/1917JPS/books/TABLE OF READINGS.xml
rename to opensiddur-sources/sources/1917JPS/books/TABLE OF READINGS.xml
diff --git a/sources/1917JPS/books/THE LAW.html b/opensiddur-sources/sources/1917JPS/books/THE LAW.html
similarity index 100%
rename from sources/1917JPS/books/THE LAW.html
rename to opensiddur-sources/sources/1917JPS/books/THE LAW.html
diff --git a/sources/1917JPS/books/THE LAW.xml b/opensiddur-sources/sources/1917JPS/books/THE LAW.xml
similarity index 100%
rename from sources/1917JPS/books/THE LAW.xml
rename to opensiddur-sources/sources/1917JPS/books/THE LAW.xml
diff --git a/sources/1917JPS/books/THE ORDER OF THE BOOKS.html b/opensiddur-sources/sources/1917JPS/books/THE ORDER OF THE BOOKS.html
similarity index 100%
rename from sources/1917JPS/books/THE ORDER OF THE BOOKS.html
rename to opensiddur-sources/sources/1917JPS/books/THE ORDER OF THE BOOKS.html
diff --git a/sources/1917JPS/books/THE ORDER OF THE BOOKS.xml b/opensiddur-sources/sources/1917JPS/books/THE ORDER OF THE BOOKS.xml
similarity index 100%
rename from sources/1917JPS/books/THE ORDER OF THE BOOKS.xml
rename to opensiddur-sources/sources/1917JPS/books/THE ORDER OF THE BOOKS.xml
diff --git a/sources/1917JPS/books/THE PROPHETS.html b/opensiddur-sources/sources/1917JPS/books/THE PROPHETS.html
similarity index 100%
rename from sources/1917JPS/books/THE PROPHETS.html
rename to opensiddur-sources/sources/1917JPS/books/THE PROPHETS.html
diff --git a/sources/1917JPS/books/THE PROPHETS.xml b/opensiddur-sources/sources/1917JPS/books/THE PROPHETS.xml
similarity index 100%
rename from sources/1917JPS/books/THE PROPHETS.xml
rename to opensiddur-sources/sources/1917JPS/books/THE PROPHETS.xml
diff --git a/sources/1917JPS/books/THE TWELVE.html b/opensiddur-sources/sources/1917JPS/books/THE TWELVE.html
similarity index 100%
rename from sources/1917JPS/books/THE TWELVE.html
rename to opensiddur-sources/sources/1917JPS/books/THE TWELVE.html
diff --git a/sources/1917JPS/books/THE TWELVE.xml b/opensiddur-sources/sources/1917JPS/books/THE TWELVE.xml
similarity index 100%
rename from sources/1917JPS/books/THE TWELVE.xml
rename to opensiddur-sources/sources/1917JPS/books/THE TWELVE.xml
diff --git a/sources/1917JPS/books/THE WRITINGS.html b/opensiddur-sources/sources/1917JPS/books/THE WRITINGS.html
similarity index 100%
rename from sources/1917JPS/books/THE WRITINGS.html
rename to opensiddur-sources/sources/1917JPS/books/THE WRITINGS.html
diff --git a/sources/1917JPS/books/THE WRITINGS.xml b/opensiddur-sources/sources/1917JPS/books/THE WRITINGS.xml
similarity index 100%
rename from sources/1917JPS/books/THE WRITINGS.xml
rename to opensiddur-sources/sources/1917JPS/books/THE WRITINGS.xml
diff --git a/sources/1917JPS/books/TITLE PAGE.html b/opensiddur-sources/sources/1917JPS/books/TITLE PAGE.html
similarity index 100%
rename from sources/1917JPS/books/TITLE PAGE.html
rename to opensiddur-sources/sources/1917JPS/books/TITLE PAGE.html
diff --git a/sources/1917JPS/books/TITLE PAGE.xml b/opensiddur-sources/sources/1917JPS/books/TITLE PAGE.xml
similarity index 100%
rename from sources/1917JPS/books/TITLE PAGE.xml
rename to opensiddur-sources/sources/1917JPS/books/TITLE PAGE.xml
diff --git a/sources/1917JPS/books/index.html b/opensiddur-sources/sources/1917JPS/books/index.html
similarity index 100%
rename from sources/1917JPS/books/index.html
rename to opensiddur-sources/sources/1917JPS/books/index.html
diff --git a/sources/1917JPS/books/static/normalize.css b/opensiddur-sources/sources/1917JPS/books/static/normalize.css
similarity index 100%
rename from sources/1917JPS/books/static/normalize.css
rename to opensiddur-sources/sources/1917JPS/books/static/normalize.css
diff --git a/sources/1917JPS/books/static/normalize.min.css b/opensiddur-sources/sources/1917JPS/books/static/normalize.min.css
similarity index 100%
rename from sources/1917JPS/books/static/normalize.min.css
rename to opensiddur-sources/sources/1917JPS/books/static/normalize.min.css
diff --git a/sources/1917JPS/books/static/old-toc.jpg b/opensiddur-sources/sources/1917JPS/books/static/old-toc.jpg
similarity index 100%
rename from sources/1917JPS/books/static/old-toc.jpg
rename to opensiddur-sources/sources/1917JPS/books/static/old-toc.jpg
diff --git a/sources/1917JPS/books/static/style.css b/opensiddur-sources/sources/1917JPS/books/static/style.css
similarity index 100%
rename from sources/1917JPS/books/static/style.css
rename to opensiddur-sources/sources/1917JPS/books/static/style.css
diff --git a/sources/HeidenheimHaggadah/haggadah.txt b/opensiddur-sources/sources/HeidenheimHaggadah/haggadah.txt
similarity index 100%
rename from sources/HeidenheimHaggadah/haggadah.txt
rename to opensiddur-sources/sources/HeidenheimHaggadah/haggadah.txt
diff --git a/sources/Singers-Prayer-Book/spb.mac b/opensiddur-sources/sources/Singers-Prayer-Book/spb.mac
similarity index 100%
rename from sources/Singers-Prayer-Book/spb.mac
rename to opensiddur-sources/sources/Singers-Prayer-Book/spb.mac
diff --git a/sources/Singers-Prayer-Book/spb.stml b/opensiddur-sources/sources/Singers-Prayer-Book/spb.stml
similarity index 100%
rename from sources/Singers-Prayer-Book/spb.stml
rename to opensiddur-sources/sources/Singers-Prayer-Book/spb.stml
diff --git a/sources/Singers-Prayer-Book/spb2k.htm b/opensiddur-sources/sources/Singers-Prayer-Book/spb2k.htm
similarity index 100%
rename from sources/Singers-Prayer-Book/spb2k.htm
rename to opensiddur-sources/sources/Singers-Prayer-Book/spb2k.htm
diff --git a/sources/Singers-Prayer-Book/spb2stml.xsl2 b/opensiddur-sources/sources/Singers-Prayer-Book/spb2stml.xsl2
similarity index 100%
rename from sources/Singers-Prayer-Book/spb2stml.xsl2
rename to opensiddur-sources/sources/Singers-Prayer-Book/spb2stml.xsl2
diff --git a/sources/Singers-Prayer-Book/tidy-it.sh b/opensiddur-sources/sources/Singers-Prayer-Book/tidy-it.sh
similarity index 100%
rename from sources/Singers-Prayer-Book/tidy-it.sh
rename to opensiddur-sources/sources/Singers-Prayer-Book/tidy-it.sh
diff --git a/sources/StrongsDictionary/StrongHebrewG.xml b/opensiddur-sources/sources/StrongsDictionary/StrongHebrewG.xml
similarity index 100%
rename from sources/StrongsDictionary/StrongHebrewG.xml
rename to opensiddur-sources/sources/StrongsDictionary/StrongHebrewG.xml
diff --git a/sources/tanach/WLC/Books/Amos.xml b/opensiddur-sources/sources/tanach/WLC/Books/Amos.xml
similarity index 98%
rename from sources/tanach/WLC/Books/Amos.xml
rename to opensiddur-sources/sources/tanach/WLC/Books/Amos.xml
index 5d402c56..7245cef9 100644
--- a/sources/tanach/WLC/Books/Amos.xml
+++ b/opensiddur-sources/sources/tanach/WLC/Books/Amos.xml
@@ -30,14 +30,14 @@
Unicode/XML Westminster Leningrad Codex
- 4.16
- 30 Apr 2012
+ 4.18
+ 13 Jun 2013
- Transcribed by WLC2XML of 6 Jun 2010 at 05 Jun 2012 @ 21:41.44. Build number: 23.0.
+ Transcribed by WLC2XML of 6 Jun 2010 at 25 Jun 2013 @ 20:24.21. Build number: 24.0.
- 83,673 bytes
+ 83,720 bytesTranscription permitted:
Kirk Lowery
@@ -53,7 +53,7 @@
Freely available
- from the electronic version of the Leningrad Codex maintained by the J. Alan Groves Center for Advanced Biblical Research.
+ From the electronic version of the Leningrad Codex maintained by the J. Alan Groves Center for Advanced Biblical Research.This text began as an electronic transcription by Richard Whitaker (Princeton Seminary, New Jersey) and H. van Parunak (then at the University of Michigan, Ann Arbor) of the 1983 printed edition of Biblia Hebraica Stuttgartensia (BHS). It was continued with the cooperation of Robert Kraft (University of Pennsylvania) and Emmanuel Tov (Hebrew University, Jerusalem), and completed by Alan Groves (Westminster Theological Seminary). The transcription was called the Michigan-Claremont-Westminster electronic Hebrew Bible and was archived at the Oxford Text Archive (OTA) in 1987. It has been variously known as the "CCAT" or "eBHS" text. Since that time, the text has been modified in many hundreds of places to conform to the photo-facsimile of the Leningrad Codex, Firkovich B19A, residing at the Russian National Library, St. Petersberg; hence the change of name.The J. Alan Groves Center for Advanced Biblical Research has continued to scrutinize and correct this electronic text as a part of its continuing work of building morphology and syntax databases of the Hebrew Bible, since correct linguistic analysis requires an accurate text.Vocalized ketib variants are no longer included as they are not part of the original manuscript.
@@ -129,13 +129,13 @@
- Input text file wlc416_ps.txt provided by the J. Alan Groves Center for Advanced
-Biblical Research. The file has the MD5 hash: a941 88e1 3fc3 0b18 8bb4 9ac8 c24f 2946
-and was received on 30 Apr 2012. The WLC text file has been modified by the
+ Input text file wlc418_ps.txt provided by the J. Alan Groves Center for Advanced
+Biblical Research. The file has the MD5 hash: 79fa 8f5a 9957 a0a0 3212 e51e b4c9 fc33
+and was received on 13 Jun 2013. The WLC text file has been modified by the
transcriber to move transcription notes closer to the relevant character in
-exactly six (6) places. The modified file, wlc_4.16_ps_td.txt, has the following
-SHA-1 hash: 79C7 003E 75C9 40B1 DDDE A885 A3A0 06B3 4C48 7140 .
- 05 Jun 2012
+exactly six (6) places. The modified file, wlc_4.18_ps_td.txt, has the following
+SHA-1 hash: 036E 5248 D7E9 522D D62C 1466 C019 8347 A693 60D9 .
+ 25 Jun 2013Hebrew
@@ -164,7 +164,7 @@ SHA-1 hash: 79C7 003E 75C9 40B1 DDDE A885 A3A0 06B3 4C48 7140 .
עַל־יִשְׂרָאֵ֜לבִּ/ימֵ֣י ׀
- עֻזִיָּ֣הQp
+ עֻזִיָּ֣הQnpמֶֽלֶךְ־יְהוּדָ֗הוּ/בִ/ימֵ֞י
@@ -180,7 +180,7 @@ SHA-1 hash: 79C7 003E 75C9 40B1 DDDE A885 A3A0 06B3 4C48 7140 .
וַ/יֹּאמַ֓ר ׀יְהוָה֙
- מִ/צִיּ֣וֹןQp
+ מִ/צִיּ֣וֹןQnpיִשְׁאָ֔גוּ/מִ/ירוּשָׁלִַ֖םיִתֵּ֣ן
@@ -387,7 +387,7 @@ SHA-1 hash: 79C7 003E 75C9 40B1 DDDE A885 A3A0 06B3 4C48 7140 .
מִלְחָמָ֔הבְּ/סַ֖עַרבְּ/י֥וֹם
- סוּפָֽהQp
+ סוּפָֽהQnpוְ/הָלַ֥ךְ
@@ -1093,7 +1093,7 @@ SHA-1 hash: 79C7 003E 75C9 40B1 DDDE A885 A3A0 06B3 4C48 7140 .
וַ/תִּהְי֕וּכְּ/א֖וּדמֻצָּ֣ל
- מִ/שְׂרֵפָ֑הQp
+ מִ/שְׂרֵפָ֑הQnpוְ/לֹֽא־שַׁבְתֶּ֥םעָדַ֖/י
@@ -1607,7 +1607,7 @@ SHA-1 hash: 79C7 003E 75C9 40B1 DDDE A885 A3A0 06B3 4C48 7140 .
נֶחְל֖וּעַל־שֵׁ֥בֶר
- יוֹסֵֽףQp
+ יוֹסֵֽףQnpלָ/כֵ֛ן
@@ -1727,7 +1727,7 @@ SHA-1 hash: 79C7 003E 75C9 40B1 DDDE A885 A3A0 06B3 4C48 7140 .
גּ֑וֹיוְ/לָחֲצ֥וּאֶתְ/כֶ֛ם
- מִ/לְּ/ב֥וֹא
+ מִ/לְּב֥וֹאחֲמָ֖תעַד־נַ֥חַל
@@ -2354,7 +2354,7 @@ SHA-1 hash: 79C7 003E 75C9 40B1 DDDE A885 A3A0 06B3 4C48 7140 .
כֻּלָּ֔/הּוְ/שָׁקְעָ֖הכִּ/יאֹ֥ר
- מִצְרָֽיִםQp
+ מִצְרָֽיִםQnpהַ/בּוֹנֶ֤ה
diff --git a/sources/tanach/WLC/Books/Chronicles_1.xml b/opensiddur-sources/sources/tanach/WLC/Books/Chronicles_1.xml
similarity index 99%
rename from sources/tanach/WLC/Books/Chronicles_1.xml
rename to opensiddur-sources/sources/tanach/WLC/Books/Chronicles_1.xml
index d40e62f7..1787db54 100644
--- a/sources/tanach/WLC/Books/Chronicles_1.xml
+++ b/opensiddur-sources/sources/tanach/WLC/Books/Chronicles_1.xml
@@ -30,14 +30,14 @@
Unicode/XML Westminster Leningrad Codex
- 4.16
- 30 Apr 2012
+ 4.18
+ 13 Jun 2013
- Transcribed by WLC2XML of 6 Jun 2010 at 05 Jun 2012 @ 21:41.44. Build number: 23.0.
+ Transcribed by WLC2XML of 6 Jun 2010 at 25 Jun 2013 @ 20:24.21. Build number: 24.0.
- 408,774 bytes
+ 408,782 bytesTranscription permitted:
Kirk Lowery
@@ -53,7 +53,7 @@
Freely available
- from the electronic version of the Leningrad Codex maintained by the J. Alan Groves Center for Advanced Biblical Research.
+ From the electronic version of the Leningrad Codex maintained by the J. Alan Groves Center for Advanced Biblical Research.This text began as an electronic transcription by Richard Whitaker (Princeton Seminary, New Jersey) and H. van Parunak (then at the University of Michigan, Ann Arbor) of the 1983 printed edition of Biblia Hebraica Stuttgartensia (BHS). It was continued with the cooperation of Robert Kraft (University of Pennsylvania) and Emmanuel Tov (Hebrew University, Jerusalem), and completed by Alan Groves (Westminster Theological Seminary). The transcription was called the Michigan-Claremont-Westminster electronic Hebrew Bible and was archived at the Oxford Text Archive (OTA) in 1987. It has been variously known as the "CCAT" or "eBHS" text. Since that time, the text has been modified in many hundreds of places to conform to the photo-facsimile of the Leningrad Codex, Firkovich B19A, residing at the Russian National Library, St. Petersberg; hence the change of name.The J. Alan Groves Center for Advanced Biblical Research has continued to scrutinize and correct this electronic text as a part of its continuing work of building morphology and syntax databases of the Hebrew Bible, since correct linguistic analysis requires an accurate text.Vocalized ketib variants are no longer included as they are not part of the original manuscript.
@@ -129,13 +129,13 @@
- Input text file wlc416_ps.txt provided by the J. Alan Groves Center for Advanced
-Biblical Research. The file has the MD5 hash: a941 88e1 3fc3 0b18 8bb4 9ac8 c24f 2946
-and was received on 30 Apr 2012. The WLC text file has been modified by the
+ Input text file wlc418_ps.txt provided by the J. Alan Groves Center for Advanced
+Biblical Research. The file has the MD5 hash: 79fa 8f5a 9957 a0a0 3212 e51e b4c9 fc33
+and was received on 13 Jun 2013. The WLC text file has been modified by the
transcriber to move transcription notes closer to the relevant character in
-exactly six (6) places. The modified file, wlc_4.16_ps_td.txt, has the following
-SHA-1 hash: 79C7 003E 75C9 40B1 DDDE A885 A3A0 06B3 4C48 7140 .
- 05 Jun 2012
+exactly six (6) places. The modified file, wlc_4.18_ps_td.txt, has the following
+SHA-1 hash: 036E 5248 D7E9 522D D62C 1466 C019 8347 A693 60D9 .
+ 25 Jun 2013Hebrew
@@ -5492,7 +5492,7 @@ SHA-1 hash: 79C7 003E 75C9 40B1 DDDE A885 A3A0 06B3 4C48 7140 .
דַּמִּ֗יםוְ/הַ/פְּלִשְׁתִּים֙נֶאֱסְפוּ־
- שָׁ֣ם
+ שָׁ֣ם1לַ/מִּלְחָמָ֔הוַ/תְּהִ֛יחֶלְקַ֥ת
diff --git a/sources/tanach/WLC/Books/Chronicles_2.xml b/opensiddur-sources/sources/tanach/WLC/Books/Chronicles_2.xml
similarity index 99%
rename from sources/tanach/WLC/Books/Chronicles_2.xml
rename to opensiddur-sources/sources/tanach/WLC/Books/Chronicles_2.xml
index 0a54c07c..04dc67d6 100644
--- a/sources/tanach/WLC/Books/Chronicles_2.xml
+++ b/opensiddur-sources/sources/tanach/WLC/Books/Chronicles_2.xml
@@ -30,11 +30,11 @@
Unicode/XML Westminster Leningrad Codex
- 4.16
- 30 Apr 2012
+ 4.18
+ 13 Jun 2013
- Transcribed by WLC2XML of 6 Jun 2010 at 05 Jun 2012 @ 21:41.44. Build number: 23.0.
+ Transcribed by WLC2XML of 6 Jun 2010 at 25 Jun 2013 @ 20:24.21. Build number: 24.0. 492,338 bytes
@@ -53,7 +53,7 @@
Freely available
- from the electronic version of the Leningrad Codex maintained by the J. Alan Groves Center for Advanced Biblical Research.
+ From the electronic version of the Leningrad Codex maintained by the J. Alan Groves Center for Advanced Biblical Research.This text began as an electronic transcription by Richard Whitaker (Princeton Seminary, New Jersey) and H. van Parunak (then at the University of Michigan, Ann Arbor) of the 1983 printed edition of Biblia Hebraica Stuttgartensia (BHS). It was continued with the cooperation of Robert Kraft (University of Pennsylvania) and Emmanuel Tov (Hebrew University, Jerusalem), and completed by Alan Groves (Westminster Theological Seminary). The transcription was called the Michigan-Claremont-Westminster electronic Hebrew Bible and was archived at the Oxford Text Archive (OTA) in 1987. It has been variously known as the "CCAT" or "eBHS" text. Since that time, the text has been modified in many hundreds of places to conform to the photo-facsimile of the Leningrad Codex, Firkovich B19A, residing at the Russian National Library, St. Petersberg; hence the change of name.The J. Alan Groves Center for Advanced Biblical Research has continued to scrutinize and correct this electronic text as a part of its continuing work of building morphology and syntax databases of the Hebrew Bible, since correct linguistic analysis requires an accurate text.Vocalized ketib variants are no longer included as they are not part of the original manuscript.
@@ -129,13 +129,13 @@
- Input text file wlc416_ps.txt provided by the J. Alan Groves Center for Advanced
-Biblical Research. The file has the MD5 hash: a941 88e1 3fc3 0b18 8bb4 9ac8 c24f 2946
-and was received on 30 Apr 2012. The WLC text file has been modified by the
+ Input text file wlc418_ps.txt provided by the J. Alan Groves Center for Advanced
+Biblical Research. The file has the MD5 hash: 79fa 8f5a 9957 a0a0 3212 e51e b4c9 fc33
+and was received on 13 Jun 2013. The WLC text file has been modified by the
transcriber to move transcription notes closer to the relevant character in
-exactly six (6) places. The modified file, wlc_4.16_ps_td.txt, has the following
-SHA-1 hash: 79C7 003E 75C9 40B1 DDDE A885 A3A0 06B3 4C48 7140 .
- 05 Jun 2012
+exactly six (6) places. The modified file, wlc_4.18_ps_td.txt, has the following
+SHA-1 hash: 036E 5248 D7E9 522D D62C 1466 C019 8347 A693 60D9 .
+ 25 Jun 2013Hebrew
diff --git a/sources/tanach/WLC/Books/Daniel.xml b/opensiddur-sources/sources/tanach/WLC/Books/Daniel.xml
similarity index 99%
rename from sources/tanach/WLC/Books/Daniel.xml
rename to opensiddur-sources/sources/tanach/WLC/Books/Daniel.xml
index 0d3e411d..7a016ea7 100644
--- a/sources/tanach/WLC/Books/Daniel.xml
+++ b/opensiddur-sources/sources/tanach/WLC/Books/Daniel.xml
@@ -30,11 +30,11 @@
Unicode/XML Westminster Leningrad Codex
- 4.16
- 30 Apr 2012
+ 4.18
+ 13 Jun 2013
- Transcribed by WLC2XML of 6 Jun 2010 at 05 Jun 2012 @ 21:41.45. Build number: 23.0.
+ Transcribed by WLC2XML of 6 Jun 2010 at 25 Jun 2013 @ 20:24.22. Build number: 24.0. 226,955 bytes
@@ -53,7 +53,7 @@
Freely available
- from the electronic version of the Leningrad Codex maintained by the J. Alan Groves Center for Advanced Biblical Research.
+ From the electronic version of the Leningrad Codex maintained by the J. Alan Groves Center for Advanced Biblical Research.This text began as an electronic transcription by Richard Whitaker (Princeton Seminary, New Jersey) and H. van Parunak (then at the University of Michigan, Ann Arbor) of the 1983 printed edition of Biblia Hebraica Stuttgartensia (BHS). It was continued with the cooperation of Robert Kraft (University of Pennsylvania) and Emmanuel Tov (Hebrew University, Jerusalem), and completed by Alan Groves (Westminster Theological Seminary). The transcription was called the Michigan-Claremont-Westminster electronic Hebrew Bible and was archived at the Oxford Text Archive (OTA) in 1987. It has been variously known as the "CCAT" or "eBHS" text. Since that time, the text has been modified in many hundreds of places to conform to the photo-facsimile of the Leningrad Codex, Firkovich B19A, residing at the Russian National Library, St. Petersberg; hence the change of name.The J. Alan Groves Center for Advanced Biblical Research has continued to scrutinize and correct this electronic text as a part of its continuing work of building morphology and syntax databases of the Hebrew Bible, since correct linguistic analysis requires an accurate text.Vocalized ketib variants are no longer included as they are not part of the original manuscript.
@@ -129,13 +129,13 @@
- Input text file wlc416_ps.txt provided by the J. Alan Groves Center for Advanced
-Biblical Research. The file has the MD5 hash: a941 88e1 3fc3 0b18 8bb4 9ac8 c24f 2946
-and was received on 30 Apr 2012. The WLC text file has been modified by the
+ Input text file wlc418_ps.txt provided by the J. Alan Groves Center for Advanced
+Biblical Research. The file has the MD5 hash: 79fa 8f5a 9957 a0a0 3212 e51e b4c9 fc33
+and was received on 13 Jun 2013. The WLC text file has been modified by the
transcriber to move transcription notes closer to the relevant character in
-exactly six (6) places. The modified file, wlc_4.16_ps_td.txt, has the following
-SHA-1 hash: 79C7 003E 75C9 40B1 DDDE A885 A3A0 06B3 4C48 7140 .
- 05 Jun 2012
+exactly six (6) places. The modified file, wlc_4.18_ps_td.txt, has the following
+SHA-1 hash: 036E 5248 D7E9 522D D62C 1466 C019 8347 A693 60D9 .
+ 25 Jun 2013Hebrew
diff --git a/sources/tanach/WLC/Books/Deuteronomy.xml b/opensiddur-sources/sources/tanach/WLC/Books/Deuteronomy.xml
similarity index 99%
rename from sources/tanach/WLC/Books/Deuteronomy.xml
rename to opensiddur-sources/sources/tanach/WLC/Books/Deuteronomy.xml
index 2e3ff865..9532e00a 100644
--- a/sources/tanach/WLC/Books/Deuteronomy.xml
+++ b/opensiddur-sources/sources/tanach/WLC/Books/Deuteronomy.xml
@@ -30,14 +30,14 @@
Unicode/XML Westminster Leningrad Codex
- 4.16
- 30 Apr 2012
+ 4.18
+ 13 Jun 2013
- Transcribed by WLC2XML of 6 Jun 2010 at 05 Jun 2012 @ 21:41.43. Build number: 23.0.
+ Transcribed by WLC2XML of 6 Jun 2010 at 25 Jun 2013 @ 20:24.20. Build number: 24.0.
- 516,393 bytes
+ 516,585 bytesTranscription permitted:
Kirk Lowery
@@ -53,7 +53,7 @@
Freely available
- from the electronic version of the Leningrad Codex maintained by the J. Alan Groves Center for Advanced Biblical Research.
+ From the electronic version of the Leningrad Codex maintained by the J. Alan Groves Center for Advanced Biblical Research.This text began as an electronic transcription by Richard Whitaker (Princeton Seminary, New Jersey) and H. van Parunak (then at the University of Michigan, Ann Arbor) of the 1983 printed edition of Biblia Hebraica Stuttgartensia (BHS). It was continued with the cooperation of Robert Kraft (University of Pennsylvania) and Emmanuel Tov (Hebrew University, Jerusalem), and completed by Alan Groves (Westminster Theological Seminary). The transcription was called the Michigan-Claremont-Westminster electronic Hebrew Bible and was archived at the Oxford Text Archive (OTA) in 1987. It has been variously known as the "CCAT" or "eBHS" text. Since that time, the text has been modified in many hundreds of places to conform to the photo-facsimile of the Leningrad Codex, Firkovich B19A, residing at the Russian National Library, St. Petersberg; hence the change of name.The J. Alan Groves Center for Advanced Biblical Research has continued to scrutinize and correct this electronic text as a part of its continuing work of building morphology and syntax databases of the Hebrew Bible, since correct linguistic analysis requires an accurate text.Vocalized ketib variants are no longer included as they are not part of the original manuscript.
@@ -129,13 +129,13 @@
- Input text file wlc416_ps.txt provided by the J. Alan Groves Center for Advanced
-Biblical Research. The file has the MD5 hash: a941 88e1 3fc3 0b18 8bb4 9ac8 c24f 2946
-and was received on 30 Apr 2012. The WLC text file has been modified by the
+ Input text file wlc418_ps.txt provided by the J. Alan Groves Center for Advanced
+Biblical Research. The file has the MD5 hash: 79fa 8f5a 9957 a0a0 3212 e51e b4c9 fc33
+and was received on 13 Jun 2013. The WLC text file has been modified by the
transcriber to move transcription notes closer to the relevant character in
-exactly six (6) places. The modified file, wlc_4.16_ps_td.txt, has the following
-SHA-1 hash: 79C7 003E 75C9 40B1 DDDE A885 A3A0 06B3 4C48 7140 .
- 05 Jun 2012
+exactly six (6) places. The modified file, wlc_4.18_ps_td.txt, has the following
+SHA-1 hash: 036E 5248 D7E9 522D D62C 1466 C019 8347 A693 60D9 .
+ 25 Jun 2013Hebrew
@@ -656,7 +656,7 @@ SHA-1 hash: 79C7 003E 75C9 40B1 DDDE A885 A3A0 06B3 4C48 7140 .
אֱלֹהֶ֔י/ךָכַּ/אֲשֶׁ֥ריִשָׂא־
- אִ֖ישׁQp
+ אִ֖ישׁQnpאֶת־בְּנ֑/וֹבְּ/כָל־
@@ -758,7 +758,7 @@ SHA-1 hash: 79C7 003E 75C9 40B1 DDDE A885 A3A0 06B3 4C48 7140 .
יְהוֹשֻׁ֤עַ
- בִּןQp
+ בִּןQnpנוּן֙הָ/עֹמֵ֣דלְ/פָנֶ֔י/ךָ
@@ -792,7 +792,7 @@ SHA-1 hash: 79C7 003E 75C9 40B1 DDDE A885 A3A0 06B3 4C48 7140 .
וְ/לָ/הֶ֣םאֶתְּנֶ֔/נָּהוְ/הֵ֖ם
- יִירָשֽׁוּ/הָּ׃Qp
+ יִירָשֽׁוּ/הָּ׃Qnpוְ/אַתֶּ֖ם
@@ -1913,7 +1913,7 @@ SHA-1 hash: 79C7 003E 75C9 40B1 DDDE A885 A3A0 06B3 4C48 7140 .
לֹ֖א
- תְִּירָא֑וּ/םQv
+ תְִּירָא֑וּ/םQnvכִּ֚ייְהוָ֣האֱלֹֽהֵי/כֶ֔ם
@@ -2175,7 +2175,7 @@ SHA-1 hash: 79C7 003E 75C9 40B1 DDDE A885 A3A0 06B3 4C48 7140 .
כַּ/יהוָ֣האֱלֹהֵ֔י/נוּבְּ/כָּל־
- קָרְאֵ֖/נוּQp
+ קָרְאֵ֖/נוּQnpאֵלָֽי/ו׃
@@ -2801,7 +2801,7 @@ SHA-1 hash: 79C7 003E 75C9 40B1 DDDE A885 A3A0 06B3 4C48 7140 .
תַּאֲרִ֤יךְיָמִים֙עַל־
- הַ֣/אֲדָמָ֔הQv
+ הַ֣/אֲדָמָ֔הQnvאֲשֶׁ֨ריְהוָ֧האֱלֹהֶ֛י/ךָ
@@ -3134,7 +3134,7 @@ SHA-1 hash: 79C7 003E 75C9 40B1 DDDE A885 A3A0 06B3 4C48 7140 .
שָׁמ֣֛וֹראֶת־י֥וֹם֩
- הַ/שַׁבָּ֖֨תQp
+ הַ/שַׁבָּ֖֨תQnpלְ/קַדְּשׁ֑֜/וֹכַּ/אֲשֶׁ֥רצִוְּ/ךָ֖֣ ׀
@@ -3200,7 +3200,7 @@ SHA-1 hash: 79C7 003E 75C9 40B1 DDDE A885 A3A0 06B3 4C48 7140 .
לַ/עֲשׂ֖וֹתאֶת־י֥וֹם
- הַ/שַׁבָּֽת׃Qp
+ הַ/שַׁבָּֽת׃Qnp
@@ -4408,7 +4408,7 @@ SHA-1 hash: 79C7 003E 75C9 40B1 DDDE A885 A3A0 06B3 4C48 7140 .
וַֽ/יְעַנְּ/ךָ֮וַ/יַּרְעִבֶ/ךָ֒וַ/יַּֽאֲכִֽלְ/ךָ֤
- אֶתQp
+ אֶתQnpהַ/מָּן֙אֲשֶׁ֣רלֹא־
@@ -5090,7 +5090,7 @@ SHA-1 hash: 79C7 003E 75C9 40B1 DDDE A885 A3A0 06B3 4C48 7140 .
בְּעַ֥דאַהֲרֹ֖ןבָּ/עֵ֥ת
- הַ/הִֽואQp
+ הַ/הִֽואQnpוְֽ/אֶת־
@@ -5266,7 +5266,7 @@ SHA-1 hash: 79C7 003E 75C9 40B1 DDDE A885 A3A0 06B3 4C48 7140 .
פְּסָל־לְ/ךָ֞שְׁנֵֽי־
- לֻוחֹ֤תQv
+ לֻוחֹ֤תQnpvאֲבָנִים֙כָּ/רִ֣אשֹׁנִ֔יםוַ/עֲלֵ֥ה
@@ -5374,7 +5374,7 @@ SHA-1 hash: 79C7 003E 75C9 40B1 DDDE A885 A3A0 06B3 4C48 7140 .
הַ/גֻּדְגֹּ֣דָ/היָטְבָ֔תָהאֶ֖רֶץ
- נַ֥חֲלֵיQc
+ נַ֥חֲלֵיCcnמָֽיִם׃
@@ -5617,7 +5617,7 @@ SHA-1 hash: 79C7 003E 75C9 40B1 DDDE A885 A3A0 06B3 4C48 7140 .
נֶ֔פֶשׁיָרְד֥וּאֲבֹתֶ֖י/ךָ
- מִצְרָ֑יְמָ/הּQp
+ מִצְרָ֑יְמָ/הּQnpוְ/עַתָּ֗השָֽׂמְ/ךָ֙יְהוָ֣ה
@@ -8045,7 +8045,7 @@ SHA-1 hash: 79C7 003E 75C9 40B1 DDDE A885 A3A0 06B3 4C48 7140 .
מֵ/אֶ֣רֶץמִצְרַ֔יִםלְמַ֣עַן
- תִּזְכֹּר֔Qc
+ תִּזְכֹּר֔Qcnאֶת־י֤וֹםצֵֽאתְ/ךָ֙
@@ -9004,7 +9004,7 @@ SHA-1 hash: 79C7 003E 75C9 40B1 DDDE A885 A3A0 06B3 4C48 7140 .
וְ/אַתָּ֕הלֹ֣אכֵ֔ן
- נָ֛תַןQc
+ נָ֛תַןQcnלְ/ךָ֖יְהוָ֥האֱלֹהֶֽי/ךָ׃
@@ -9736,7 +9736,7 @@ SHA-1 hash: 79C7 003E 75C9 40B1 DDDE A885 A3A0 06B3 4C48 7140 .
עִמְּ/ךָ֖מִלְחָמָ֑הוְ/צַרְתָּ֖
- עָלֶֽי/הָּ׃Qp
+ עָלֶֽי/הָּ׃Qnpוּ/נְתָנָ֛/הּ
@@ -10211,7 +10211,7 @@ SHA-1 hash: 79C7 003E 75C9 40B1 DDDE A885 A3A0 06B3 4C48 7140 .
אָבִ֖י/ווּ/בְ/ק֣וֹלאִמּ֑/וֹ
- וְ/יסְּר֣וּQv
+ וְ/יסְּר֣וּQnvאֹת֔/וֹוְ/לֹ֥איִשְׁמַ֖ע
@@ -10558,7 +10558,7 @@ SHA-1 hash: 79C7 003E 75C9 40B1 DDDE A885 A3A0 06B3 4C48 7140 .
וְ/אָמַ֛ראֲבִ֥יה/נער
- הַֽ/נַּעַרָ֖הQv
+ הַֽ/נַּעַרָ֖הQnvאֶל־הַ/זְּקֵנִ֑יםאֶת־
@@ -10619,7 +10619,7 @@ SHA-1 hash: 79C7 003E 75C9 40B1 DDDE A885 A3A0 06B3 4C48 7140 .
לְ/אִשָּׁ֔הלֹא־יוּכַ֥ל
- לְ/שַּׁלְּחָ֖/הּQp
+ לְ/שַּׁלְּחָ֖/הּQnpכָּל־יָמָֽי/ו׃
@@ -10823,7 +10823,7 @@ SHA-1 hash: 79C7 003E 75C9 40B1 DDDE A885 A3A0 06B3 4C48 7140 .
עִנָּ֔/הּלֹא־יוּכַ֥ל
- שַׁלְּחָ֖/הQp
+ שַׁלְּחָ֖/הQnpכָּל־יָמָֽי/ו׃
@@ -11518,7 +11518,7 @@ SHA-1 hash: 79C7 003E 75C9 40B1 DDDE A885 A3A0 06B3 4C48 7140 .
יוּמְת֣וּעַל־אָב֑וֹת
- אִ֥ישQk
+ אִ֥ישQknבְּ/חֶטְא֖/וֹיוּמָֽתוּ׃
@@ -11777,7 +11777,7 @@ SHA-1 hash: 79C7 003E 75C9 40B1 DDDE A885 A3A0 06B3 4C48 7140 .
יִבְנֶ֖האֶת־בֵּ֥ית
- אָחִֽי/וQp
+ אָחִֽי/וQnpוְ/נִקְרָ֥א
@@ -13148,7 +13148,7 @@ SHA-1 hash: 79C7 003E 75C9 40B1 DDDE A885 A3A0 06B3 4C48 7140 .
כֶּ֥רֶםתִּטַּ֖עוְ/לֹ֥א
- תְחַלְּלֶּֽ/נּוּ׃Qp
+ תְחַלְּלֶּֽ/נּוּ׃Qnpשׁוֹרְ/ךָ֞
diff --git a/sources/tanach/WLC/Books/Ecclesiastes.xml b/opensiddur-sources/sources/tanach/WLC/Books/Ecclesiastes.xml
similarity index 99%
rename from sources/tanach/WLC/Books/Ecclesiastes.xml
rename to opensiddur-sources/sources/tanach/WLC/Books/Ecclesiastes.xml
index 03760c1c..20440235 100644
--- a/sources/tanach/WLC/Books/Ecclesiastes.xml
+++ b/opensiddur-sources/sources/tanach/WLC/Books/Ecclesiastes.xml
@@ -30,14 +30,14 @@
Unicode/XML Westminster Leningrad Codex
- 4.16
- 30 Apr 2012
+ 4.18
+ 13 Jun 2013
- Transcribed by WLC2XML of 6 Jun 2010 at 05 Jun 2012 @ 21:41.45. Build number: 23.0.
+ Transcribed by WLC2XML of 6 Jun 2010 at 25 Jun 2013 @ 20:24.22. Build number: 24.0.
- 114,541 bytes
+ 114,581 bytesTranscription permitted:
Kirk Lowery
@@ -53,7 +53,7 @@
Freely available
- from the electronic version of the Leningrad Codex maintained by the J. Alan Groves Center for Advanced Biblical Research.
+ From the electronic version of the Leningrad Codex maintained by the J. Alan Groves Center for Advanced Biblical Research.This text began as an electronic transcription by Richard Whitaker (Princeton Seminary, New Jersey) and H. van Parunak (then at the University of Michigan, Ann Arbor) of the 1983 printed edition of Biblia Hebraica Stuttgartensia (BHS). It was continued with the cooperation of Robert Kraft (University of Pennsylvania) and Emmanuel Tov (Hebrew University, Jerusalem), and completed by Alan Groves (Westminster Theological Seminary). The transcription was called the Michigan-Claremont-Westminster electronic Hebrew Bible and was archived at the Oxford Text Archive (OTA) in 1987. It has been variously known as the "CCAT" or "eBHS" text. Since that time, the text has been modified in many hundreds of places to conform to the photo-facsimile of the Leningrad Codex, Firkovich B19A, residing at the Russian National Library, St. Petersberg; hence the change of name.The J. Alan Groves Center for Advanced Biblical Research has continued to scrutinize and correct this electronic text as a part of its continuing work of building morphology and syntax databases of the Hebrew Bible, since correct linguistic analysis requires an accurate text.Vocalized ketib variants are no longer included as they are not part of the original manuscript.
@@ -129,13 +129,13 @@
- Input text file wlc416_ps.txt provided by the J. Alan Groves Center for Advanced
-Biblical Research. The file has the MD5 hash: a941 88e1 3fc3 0b18 8bb4 9ac8 c24f 2946
-and was received on 30 Apr 2012. The WLC text file has been modified by the
+ Input text file wlc418_ps.txt provided by the J. Alan Groves Center for Advanced
+Biblical Research. The file has the MD5 hash: 79fa 8f5a 9957 a0a0 3212 e51e b4c9 fc33
+and was received on 13 Jun 2013. The WLC text file has been modified by the
transcriber to move transcription notes closer to the relevant character in
-exactly six (6) places. The modified file, wlc_4.16_ps_td.txt, has the following
-SHA-1 hash: 79C7 003E 75C9 40B1 DDDE A885 A3A0 06B3 4C48 7140 .
- 05 Jun 2012
+exactly six (6) places. The modified file, wlc_4.18_ps_td.txt, has the following
+SHA-1 hash: 036E 5248 D7E9 522D D62C 1466 C019 8347 A693 60D9 .
+ 25 Jun 2013Hebrew
@@ -781,7 +781,7 @@ SHA-1 hash: 79C7 003E 75C9 40B1 DDDE A885 A3A0 06B3 4C48 7140 .
בַּ/לַּ֖יְלָהלֹא־שָׁכַ֣ב
- לִבּ֑/וQv
+ לִבּ֑/וQnvגַּם־זֶ֖ההֶ֥בֶל
@@ -1498,7 +1498,7 @@ SHA-1 hash: 79C7 003E 75C9 40B1 DDDE A885 A3A0 06B3 4C48 7140 .
אֲשֶׁ֣רלֹֽא־תִדֹּ֑ר
- מִ/שֶׁ/תִּדּ֖וֹרQp
+ מִ/שֶׁ/תִּדּ֖וֹרQnpוְ/לֹ֥אתְשַׁלֵּֽם׃
@@ -1555,7 +1555,7 @@ SHA-1 hash: 79C7 003E 75C9 40B1 DDDE A885 A3A0 06B3 4C48 7140 .
כִּ֣יגָבֹ֜הַּמֵ/עַ֤ל
- גָּבֹ֙הַ֙Qp
+ גָּבֹ֙הַ֙Qnpשֹׁמֵ֔רוּ/גְבֹהִ֖יםעֲלֵי/הֶֽם׃
@@ -2971,7 +2971,7 @@ SHA-1 hash: 79C7 003E 75C9 40B1 DDDE A885 A3A0 06B3 4C48 7140 .
אֶת־הָ/אִ֥ישׁהַ/מִּסְכֵּ֖ן
- הַ/הּֽוּא׃Qp
+ הַ/הּֽוּא׃Qnpוְ/אָמַ֣רְתִּי
@@ -3502,7 +3502,7 @@ SHA-1 hash: 79C7 003E 75C9 40B1 DDDE A885 A3A0 06B3 4C48 7140 .
בֵּ֣יתעוֹלָמ֔/וֹוְ/סָבְב֥וּ
- בָ/שּׁ֖וּקQv
+ בָ/שּׁ֖וּקQnvהַ/סֹּפְדִֽים׃
diff --git a/sources/tanach/WLC/Books/Esther.xml b/opensiddur-sources/sources/tanach/WLC/Books/Esther.xml
similarity index 99%
rename from sources/tanach/WLC/Books/Esther.xml
rename to opensiddur-sources/sources/tanach/WLC/Books/Esther.xml
index 00e45b9f..ef493dbd 100644
--- a/sources/tanach/WLC/Books/Esther.xml
+++ b/opensiddur-sources/sources/tanach/WLC/Books/Esther.xml
@@ -30,14 +30,14 @@
Unicode/XML Westminster Leningrad Codex
- 4.16
- 30 Apr 2012
+ 4.18
+ 13 Jun 2013
- Transcribed by WLC2XML of 6 Jun 2010 at 05 Jun 2012 @ 21:41.45. Build number: 23.0.
+ Transcribed by WLC2XML of 6 Jun 2010 at 25 Jun 2013 @ 20:24.22. Build number: 24.0.
- 119,978 bytes
+ 120,002 bytesTranscription permitted:
Kirk Lowery
@@ -53,7 +53,7 @@
Freely available
- from the electronic version of the Leningrad Codex maintained by the J. Alan Groves Center for Advanced Biblical Research.
+ From the electronic version of the Leningrad Codex maintained by the J. Alan Groves Center for Advanced Biblical Research.This text began as an electronic transcription by Richard Whitaker (Princeton Seminary, New Jersey) and H. van Parunak (then at the University of Michigan, Ann Arbor) of the 1983 printed edition of Biblia Hebraica Stuttgartensia (BHS). It was continued with the cooperation of Robert Kraft (University of Pennsylvania) and Emmanuel Tov (Hebrew University, Jerusalem), and completed by Alan Groves (Westminster Theological Seminary). The transcription was called the Michigan-Claremont-Westminster electronic Hebrew Bible and was archived at the Oxford Text Archive (OTA) in 1987. It has been variously known as the "CCAT" or "eBHS" text. Since that time, the text has been modified in many hundreds of places to conform to the photo-facsimile of the Leningrad Codex, Firkovich B19A, residing at the Russian National Library, St. Petersberg; hence the change of name.The J. Alan Groves Center for Advanced Biblical Research has continued to scrutinize and correct this electronic text as a part of its continuing work of building morphology and syntax databases of the Hebrew Bible, since correct linguistic analysis requires an accurate text.Vocalized ketib variants are no longer included as they are not part of the original manuscript.
@@ -129,13 +129,13 @@
- Input text file wlc416_ps.txt provided by the J. Alan Groves Center for Advanced
-Biblical Research. The file has the MD5 hash: a941 88e1 3fc3 0b18 8bb4 9ac8 c24f 2946
-and was received on 30 Apr 2012. The WLC text file has been modified by the
+ Input text file wlc418_ps.txt provided by the J. Alan Groves Center for Advanced
+Biblical Research. The file has the MD5 hash: 79fa 8f5a 9957 a0a0 3212 e51e b4c9 fc33
+and was received on 13 Jun 2013. The WLC text file has been modified by the
transcriber to move transcription notes closer to the relevant character in
-exactly six (6) places. The modified file, wlc_4.16_ps_td.txt, has the following
-SHA-1 hash: 79C7 003E 75C9 40B1 DDDE A885 A3A0 06B3 4C48 7140 .
- 05 Jun 2012
+exactly six (6) places. The modified file, wlc_4.18_ps_td.txt, has the following
+SHA-1 hash: 036E 5248 D7E9 522D D62C 1466 C019 8347 A693 60D9 .
+ 25 Jun 2013Hebrew
@@ -1617,7 +1617,7 @@ SHA-1 hash: 79C7 003E 75C9 40B1 DDDE A885 A3A0 06B3 4C48 7140 .
וְ/חָיָ֑הוַ/אֲנִ֗ילֹ֤א
- נִקְרֵ֙אתי֙Qv
+ נִקְרֵ֙אתי֙Qnvלָ/ב֣וֹאאֶל־הַ/מֶּ֔לֶךְ
@@ -2012,7 +2012,7 @@ SHA-1 hash: 79C7 003E 75C9 40B1 DDDE A885 A3A0 06B3 4C48 7140 .
וּ/בֹֽא־עִם־הַ/מֶּ֥לֶךְ
- אֶלQp
+ אֶלQnpהַ/מִּשְׁתֶּ֖השָׂמֵ֑חַוַ/יִּיטַ֧ב
@@ -2279,7 +2279,7 @@ SHA-1 hash: 79C7 003E 75C9 40B1 DDDE A885 A3A0 06B3 4C48 7140 .
כָּל־אֲשֶׁ֣רקָרָ֑/הוּ
- וַ/יֹּ֩אמְרוּ֩
+ וַ/יֹּ֩אמְרוּ֩Cל֨/וֹחֲכָמָ֜י/ווְ/זֶ֣רֶשׁ
diff --git a/sources/tanach/WLC/Books/Exodus.xml b/opensiddur-sources/sources/tanach/WLC/Books/Exodus.xml
similarity index 99%
rename from sources/tanach/WLC/Books/Exodus.xml
rename to opensiddur-sources/sources/tanach/WLC/Books/Exodus.xml
index 28eb049b..d2930f94 100644
--- a/sources/tanach/WLC/Books/Exodus.xml
+++ b/opensiddur-sources/sources/tanach/WLC/Books/Exodus.xml
@@ -30,11 +30,11 @@
Unicode/XML Westminster Leningrad Codex
- 4.16
- 30 Apr 2012
+ 4.18
+ 13 Jun 2013
- Transcribed by WLC2XML of 6 Jun 2010 at 05 Jun 2012 @ 21:41.42. Build number: 23.0.
+ Transcribed by WLC2XML of 6 Jun 2010 at 25 Jun 2013 @ 20:24.19. Build number: 24.0. 600,763 bytes
@@ -53,7 +53,7 @@
Freely available
- from the electronic version of the Leningrad Codex maintained by the J. Alan Groves Center for Advanced Biblical Research.
+ From the electronic version of the Leningrad Codex maintained by the J. Alan Groves Center for Advanced Biblical Research.This text began as an electronic transcription by Richard Whitaker (Princeton Seminary, New Jersey) and H. van Parunak (then at the University of Michigan, Ann Arbor) of the 1983 printed edition of Biblia Hebraica Stuttgartensia (BHS). It was continued with the cooperation of Robert Kraft (University of Pennsylvania) and Emmanuel Tov (Hebrew University, Jerusalem), and completed by Alan Groves (Westminster Theological Seminary). The transcription was called the Michigan-Claremont-Westminster electronic Hebrew Bible and was archived at the Oxford Text Archive (OTA) in 1987. It has been variously known as the "CCAT" or "eBHS" text. Since that time, the text has been modified in many hundreds of places to conform to the photo-facsimile of the Leningrad Codex, Firkovich B19A, residing at the Russian National Library, St. Petersberg; hence the change of name.The J. Alan Groves Center for Advanced Biblical Research has continued to scrutinize and correct this electronic text as a part of its continuing work of building morphology and syntax databases of the Hebrew Bible, since correct linguistic analysis requires an accurate text.Vocalized ketib variants are no longer included as they are not part of the original manuscript.
@@ -129,13 +129,13 @@
- Input text file wlc416_ps.txt provided by the J. Alan Groves Center for Advanced
-Biblical Research. The file has the MD5 hash: a941 88e1 3fc3 0b18 8bb4 9ac8 c24f 2946
-and was received on 30 Apr 2012. The WLC text file has been modified by the
+ Input text file wlc418_ps.txt provided by the J. Alan Groves Center for Advanced
+Biblical Research. The file has the MD5 hash: 79fa 8f5a 9957 a0a0 3212 e51e b4c9 fc33
+and was received on 13 Jun 2013. The WLC text file has been modified by the
transcriber to move transcription notes closer to the relevant character in
-exactly six (6) places. The modified file, wlc_4.16_ps_td.txt, has the following
-SHA-1 hash: 79C7 003E 75C9 40B1 DDDE A885 A3A0 06B3 4C48 7140 .
- 05 Jun 2012
+exactly six (6) places. The modified file, wlc_4.18_ps_td.txt, has the following
+SHA-1 hash: 036E 5248 D7E9 522D D62C 1466 C019 8347 A693 60D9 .
+ 25 Jun 2013Hebrew
diff --git a/sources/tanach/WLC/Books/Ezekiel.xml b/opensiddur-sources/sources/tanach/WLC/Books/Ezekiel.xml
similarity index 99%
rename from sources/tanach/WLC/Books/Ezekiel.xml
rename to opensiddur-sources/sources/tanach/WLC/Books/Ezekiel.xml
index 26b5f738..8c1915d9 100644
--- a/sources/tanach/WLC/Books/Ezekiel.xml
+++ b/opensiddur-sources/sources/tanach/WLC/Books/Ezekiel.xml
@@ -30,11 +30,11 @@
Unicode/XML Westminster Leningrad Codex
- 4.16
- 30 Apr 2012
+ 4.18
+ 13 Jun 2013
- Transcribed by WLC2XML of 6 Jun 2010 at 05 Jun 2012 @ 21:41.44. Build number: 23.0.
+ Transcribed by WLC2XML of 6 Jun 2010 at 25 Jun 2013 @ 20:24.21. Build number: 24.0. 682,370 bytes
@@ -53,7 +53,7 @@
Freely available
- from the electronic version of the Leningrad Codex maintained by the J. Alan Groves Center for Advanced Biblical Research.
+ From the electronic version of the Leningrad Codex maintained by the J. Alan Groves Center for Advanced Biblical Research.This text began as an electronic transcription by Richard Whitaker (Princeton Seminary, New Jersey) and H. van Parunak (then at the University of Michigan, Ann Arbor) of the 1983 printed edition of Biblia Hebraica Stuttgartensia (BHS). It was continued with the cooperation of Robert Kraft (University of Pennsylvania) and Emmanuel Tov (Hebrew University, Jerusalem), and completed by Alan Groves (Westminster Theological Seminary). The transcription was called the Michigan-Claremont-Westminster electronic Hebrew Bible and was archived at the Oxford Text Archive (OTA) in 1987. It has been variously known as the "CCAT" or "eBHS" text. Since that time, the text has been modified in many hundreds of places to conform to the photo-facsimile of the Leningrad Codex, Firkovich B19A, residing at the Russian National Library, St. Petersberg; hence the change of name.The J. Alan Groves Center for Advanced Biblical Research has continued to scrutinize and correct this electronic text as a part of its continuing work of building morphology and syntax databases of the Hebrew Bible, since correct linguistic analysis requires an accurate text.Vocalized ketib variants are no longer included as they are not part of the original manuscript.
@@ -129,13 +129,13 @@
- Input text file wlc416_ps.txt provided by the J. Alan Groves Center for Advanced
-Biblical Research. The file has the MD5 hash: a941 88e1 3fc3 0b18 8bb4 9ac8 c24f 2946
-and was received on 30 Apr 2012. The WLC text file has been modified by the
+ Input text file wlc418_ps.txt provided by the J. Alan Groves Center for Advanced
+Biblical Research. The file has the MD5 hash: 79fa 8f5a 9957 a0a0 3212 e51e b4c9 fc33
+and was received on 13 Jun 2013. The WLC text file has been modified by the
transcriber to move transcription notes closer to the relevant character in
-exactly six (6) places. The modified file, wlc_4.16_ps_td.txt, has the following
-SHA-1 hash: 79C7 003E 75C9 40B1 DDDE A885 A3A0 06B3 4C48 7140 .
- 05 Jun 2012
+exactly six (6) places. The modified file, wlc_4.18_ps_td.txt, has the following
+SHA-1 hash: 036E 5248 D7E9 522D D62C 1466 C019 8347 A693 60D9 .
+ 25 Jun 2013Hebrew
diff --git a/sources/tanach/WLC/Books/Ezra.xml b/opensiddur-sources/sources/tanach/WLC/Books/Ezra.xml
similarity index 99%
rename from sources/tanach/WLC/Books/Ezra.xml
rename to opensiddur-sources/sources/tanach/WLC/Books/Ezra.xml
index 9f144647..2622fb8f 100644
--- a/sources/tanach/WLC/Books/Ezra.xml
+++ b/opensiddur-sources/sources/tanach/WLC/Books/Ezra.xml
@@ -30,14 +30,14 @@
Unicode/XML Westminster Leningrad Codex
- 4.16
- 30 Apr 2012
+ 4.18
+ 13 Jun 2013
- Transcribed by WLC2XML of 6 Jun 2010 at 05 Jun 2012 @ 21:41.45. Build number: 23.0.
+ Transcribed by WLC2XML of 6 Jun 2010 at 25 Jun 2013 @ 20:24.22. Build number: 24.0.
- 152,041 bytes
+ 152,043 bytesTranscription permitted:
Kirk Lowery
@@ -53,7 +53,7 @@
Freely available
- from the electronic version of the Leningrad Codex maintained by the J. Alan Groves Center for Advanced Biblical Research.
+ From the electronic version of the Leningrad Codex maintained by the J. Alan Groves Center for Advanced Biblical Research.This text began as an electronic transcription by Richard Whitaker (Princeton Seminary, New Jersey) and H. van Parunak (then at the University of Michigan, Ann Arbor) of the 1983 printed edition of Biblia Hebraica Stuttgartensia (BHS). It was continued with the cooperation of Robert Kraft (University of Pennsylvania) and Emmanuel Tov (Hebrew University, Jerusalem), and completed by Alan Groves (Westminster Theological Seminary). The transcription was called the Michigan-Claremont-Westminster electronic Hebrew Bible and was archived at the Oxford Text Archive (OTA) in 1987. It has been variously known as the "CCAT" or "eBHS" text. Since that time, the text has been modified in many hundreds of places to conform to the photo-facsimile of the Leningrad Codex, Firkovich B19A, residing at the Russian National Library, St. Petersberg; hence the change of name.The J. Alan Groves Center for Advanced Biblical Research has continued to scrutinize and correct this electronic text as a part of its continuing work of building morphology and syntax databases of the Hebrew Bible, since correct linguistic analysis requires an accurate text.Vocalized ketib variants are no longer included as they are not part of the original manuscript.
@@ -129,13 +129,13 @@
- Input text file wlc416_ps.txt provided by the J. Alan Groves Center for Advanced
-Biblical Research. The file has the MD5 hash: a941 88e1 3fc3 0b18 8bb4 9ac8 c24f 2946
-and was received on 30 Apr 2012. The WLC text file has been modified by the
+ Input text file wlc418_ps.txt provided by the J. Alan Groves Center for Advanced
+Biblical Research. The file has the MD5 hash: 79fa 8f5a 9957 a0a0 3212 e51e b4c9 fc33
+and was received on 13 Jun 2013. The WLC text file has been modified by the
transcriber to move transcription notes closer to the relevant character in
-exactly six (6) places. The modified file, wlc_4.16_ps_td.txt, has the following
-SHA-1 hash: 79C7 003E 75C9 40B1 DDDE A885 A3A0 06B3 4C48 7140 .
- 05 Jun 2012
+exactly six (6) places. The modified file, wlc_4.18_ps_td.txt, has the following
+SHA-1 hash: 036E 5248 D7E9 522D D62C 1466 C019 8347 A693 60D9 .
+ 25 Jun 2013Hebrew
@@ -1618,7 +1618,7 @@ SHA-1 hash: 79C7 003E 75C9 40B1 DDDE A885 A3A0 06B3 4C48 7140 .
ו/שורי/וְ/שׁוּרַיָּ֣/אאשכללו
- שַׁכְלִ֔לוּ
+ שַׁכְלִ֔ילוּוְ/אֻשַּׁיָּ֖/איַחִֽיטוּ׃
diff --git a/sources/tanach/WLC/Books/Genesis.xml b/opensiddur-sources/sources/tanach/WLC/Books/Genesis.xml
similarity index 99%
rename from sources/tanach/WLC/Books/Genesis.xml
rename to opensiddur-sources/sources/tanach/WLC/Books/Genesis.xml
index 0bafb303..c075850d 100644
--- a/sources/tanach/WLC/Books/Genesis.xml
+++ b/opensiddur-sources/sources/tanach/WLC/Books/Genesis.xml
@@ -30,14 +30,14 @@
Unicode/XML Westminster Leningrad Codex
- 4.16
- 30 Apr 2012
+ 4.18
+ 13 Jun 2013
- Transcribed by WLC2XML of 6 Jun 2010 at 05 Jun 2012 @ 21:41.42. Build number: 23.0.
+ Transcribed by WLC2XML of 6 Jun 2010 at 25 Jun 2013 @ 20:24.19. Build number: 24.0.
- 734,253 bytes
+ 734,245 bytesTranscription permitted:
Kirk Lowery
@@ -53,7 +53,7 @@
Freely available
- from the electronic version of the Leningrad Codex maintained by the J. Alan Groves Center for Advanced Biblical Research.
+ From the electronic version of the Leningrad Codex maintained by the J. Alan Groves Center for Advanced Biblical Research.This text began as an electronic transcription by Richard Whitaker (Princeton Seminary, New Jersey) and H. van Parunak (then at the University of Michigan, Ann Arbor) of the 1983 printed edition of Biblia Hebraica Stuttgartensia (BHS). It was continued with the cooperation of Robert Kraft (University of Pennsylvania) and Emmanuel Tov (Hebrew University, Jerusalem), and completed by Alan Groves (Westminster Theological Seminary). The transcription was called the Michigan-Claremont-Westminster electronic Hebrew Bible and was archived at the Oxford Text Archive (OTA) in 1987. It has been variously known as the "CCAT" or "eBHS" text. Since that time, the text has been modified in many hundreds of places to conform to the photo-facsimile of the Leningrad Codex, Firkovich B19A, residing at the Russian National Library, St. Petersberg; hence the change of name.The J. Alan Groves Center for Advanced Biblical Research has continued to scrutinize and correct this electronic text as a part of its continuing work of building morphology and syntax databases of the Hebrew Bible, since correct linguistic analysis requires an accurate text.Vocalized ketib variants are no longer included as they are not part of the original manuscript.
@@ -129,13 +129,13 @@
- Input text file wlc416_ps.txt provided by the J. Alan Groves Center for Advanced
-Biblical Research. The file has the MD5 hash: a941 88e1 3fc3 0b18 8bb4 9ac8 c24f 2946
-and was received on 30 Apr 2012. The WLC text file has been modified by the
+ Input text file wlc418_ps.txt provided by the J. Alan Groves Center for Advanced
+Biblical Research. The file has the MD5 hash: 79fa 8f5a 9957 a0a0 3212 e51e b4c9 fc33
+and was received on 13 Jun 2013. The WLC text file has been modified by the
transcriber to move transcription notes closer to the relevant character in
-exactly six (6) places. The modified file, wlc_4.16_ps_td.txt, has the following
-SHA-1 hash: 79C7 003E 75C9 40B1 DDDE A885 A3A0 06B3 4C48 7140 .
- 05 Jun 2012
+exactly six (6) places. The modified file, wlc_4.18_ps_td.txt, has the following
+SHA-1 hash: 036E 5248 D7E9 522D D62C 1466 C019 8347 A693 60D9 .
+ 25 Jun 2013Hebrew
@@ -2219,7 +2219,7 @@ SHA-1 hash: 79C7 003E 75C9 40B1 DDDE A885 A3A0 06B3 4C48 7140 .
שְׁמ֛/וֹנֹ֖חַלֵ/אמֹ֑ר
- זֶ֠הc
+ זֶ֠היְנַחֲמֵ֤/נוּמִֽ/מַּעֲשֵׂ֙/נוּ֙וּ/מֵ/עִצְּב֣וֹן
diff --git a/sources/tanach/WLC/Books/Habakkuk.xml b/opensiddur-sources/sources/tanach/WLC/Books/Habakkuk.xml
similarity index 97%
rename from sources/tanach/WLC/Books/Habakkuk.xml
rename to opensiddur-sources/sources/tanach/WLC/Books/Habakkuk.xml
index c751f041..7a4c8244 100644
--- a/sources/tanach/WLC/Books/Habakkuk.xml
+++ b/opensiddur-sources/sources/tanach/WLC/Books/Habakkuk.xml
@@ -30,14 +30,14 @@
Unicode/XML Westminster Leningrad Codex
- 4.16
- 30 Apr 2012
+ 4.18
+ 13 Jun 2013
- Transcribed by WLC2XML of 6 Jun 2010 at 05 Jun 2012 @ 21:41.44. Build number: 23.0.
+ Transcribed by WLC2XML of 6 Jun 2010 at 25 Jun 2013 @ 20:24.21. Build number: 24.0.
- 35,148 bytes
+ 35,164 bytesTranscription permitted:
Kirk Lowery
@@ -53,7 +53,7 @@
Freely available
- from the electronic version of the Leningrad Codex maintained by the J. Alan Groves Center for Advanced Biblical Research.
+ From the electronic version of the Leningrad Codex maintained by the J. Alan Groves Center for Advanced Biblical Research.This text began as an electronic transcription by Richard Whitaker (Princeton Seminary, New Jersey) and H. van Parunak (then at the University of Michigan, Ann Arbor) of the 1983 printed edition of Biblia Hebraica Stuttgartensia (BHS). It was continued with the cooperation of Robert Kraft (University of Pennsylvania) and Emmanuel Tov (Hebrew University, Jerusalem), and completed by Alan Groves (Westminster Theological Seminary). The transcription was called the Michigan-Claremont-Westminster electronic Hebrew Bible and was archived at the Oxford Text Archive (OTA) in 1987. It has been variously known as the "CCAT" or "eBHS" text. Since that time, the text has been modified in many hundreds of places to conform to the photo-facsimile of the Leningrad Codex, Firkovich B19A, residing at the Russian National Library, St. Petersberg; hence the change of name.The J. Alan Groves Center for Advanced Biblical Research has continued to scrutinize and correct this electronic text as a part of its continuing work of building morphology and syntax databases of the Hebrew Bible, since correct linguistic analysis requires an accurate text.Vocalized ketib variants are no longer included as they are not part of the original manuscript.
@@ -129,13 +129,13 @@
- Input text file wlc416_ps.txt provided by the J. Alan Groves Center for Advanced
-Biblical Research. The file has the MD5 hash: a941 88e1 3fc3 0b18 8bb4 9ac8 c24f 2946
-and was received on 30 Apr 2012. The WLC text file has been modified by the
+ Input text file wlc418_ps.txt provided by the J. Alan Groves Center for Advanced
+Biblical Research. The file has the MD5 hash: 79fa 8f5a 9957 a0a0 3212 e51e b4c9 fc33
+and was received on 13 Jun 2013. The WLC text file has been modified by the
transcriber to move transcription notes closer to the relevant character in
-exactly six (6) places. The modified file, wlc_4.16_ps_td.txt, has the following
-SHA-1 hash: 79C7 003E 75C9 40B1 DDDE A885 A3A0 06B3 4C48 7140 .
- 05 Jun 2012
+exactly six (6) places. The modified file, wlc_4.18_ps_td.txt, has the following
+SHA-1 hash: 036E 5248 D7E9 522D D62C 1466 C019 8347 A693 60D9 .
+ 25 Jun 2013Hebrew
@@ -153,7 +153,7 @@ SHA-1 hash: 79C7 003E 75C9 40B1 DDDE A885 A3A0 06B3 4C48 7140 .
- הַ/מַּשָׂא֙Qp
+ הַ/מַּשָׂא֙Qnpאֲשֶׁ֣רחָזָ֔החֲבַקּ֖וּק
@@ -939,7 +939,7 @@ SHA-1 hash: 79C7 003E 75C9 40B1 DDDE A885 A3A0 06B3 4C48 7140 .
יִשְׁעִֽ/י׃
- יְהוִ֤הּQp
+ יְהוִ֤הּQnpאֲדֹנָ/י֙חֵילִ֔/יוַ/יָּ֤שֶׂם
diff --git a/sources/tanach/WLC/Books/Haggai.xml b/opensiddur-sources/sources/tanach/WLC/Books/Haggai.xml
similarity index 97%
rename from sources/tanach/WLC/Books/Haggai.xml
rename to opensiddur-sources/sources/tanach/WLC/Books/Haggai.xml
index a7f0716e..d808ac5e 100644
--- a/sources/tanach/WLC/Books/Haggai.xml
+++ b/opensiddur-sources/sources/tanach/WLC/Books/Haggai.xml
@@ -30,14 +30,14 @@
Unicode/XML Westminster Leningrad Codex
- 4.16
- 30 Apr 2012
+ 4.18
+ 13 Jun 2013
- Transcribed by WLC2XML of 6 Jun 2010 at 05 Jun 2012 @ 21:41.44. Build number: 23.0.
+ Transcribed by WLC2XML of 6 Jun 2010 at 25 Jun 2013 @ 20:24.21. Build number: 24.0.
- 32,187 bytes
+ 32,195 bytesTranscription permitted:
Kirk Lowery
@@ -53,7 +53,7 @@
Freely available
- from the electronic version of the Leningrad Codex maintained by the J. Alan Groves Center for Advanced Biblical Research.
+ From the electronic version of the Leningrad Codex maintained by the J. Alan Groves Center for Advanced Biblical Research.This text began as an electronic transcription by Richard Whitaker (Princeton Seminary, New Jersey) and H. van Parunak (then at the University of Michigan, Ann Arbor) of the 1983 printed edition of Biblia Hebraica Stuttgartensia (BHS). It was continued with the cooperation of Robert Kraft (University of Pennsylvania) and Emmanuel Tov (Hebrew University, Jerusalem), and completed by Alan Groves (Westminster Theological Seminary). The transcription was called the Michigan-Claremont-Westminster electronic Hebrew Bible and was archived at the Oxford Text Archive (OTA) in 1987. It has been variously known as the "CCAT" or "eBHS" text. Since that time, the text has been modified in many hundreds of places to conform to the photo-facsimile of the Leningrad Codex, Firkovich B19A, residing at the Russian National Library, St. Petersberg; hence the change of name.The J. Alan Groves Center for Advanced Biblical Research has continued to scrutinize and correct this electronic text as a part of its continuing work of building morphology and syntax databases of the Hebrew Bible, since correct linguistic analysis requires an accurate text.Vocalized ketib variants are no longer included as they are not part of the original manuscript.
@@ -129,13 +129,13 @@
- Input text file wlc416_ps.txt provided by the J. Alan Groves Center for Advanced
-Biblical Research. The file has the MD5 hash: a941 88e1 3fc3 0b18 8bb4 9ac8 c24f 2946
-and was received on 30 Apr 2012. The WLC text file has been modified by the
+ Input text file wlc418_ps.txt provided by the J. Alan Groves Center for Advanced
+Biblical Research. The file has the MD5 hash: 79fa 8f5a 9957 a0a0 3212 e51e b4c9 fc33
+and was received on 13 Jun 2013. The WLC text file has been modified by the
transcriber to move transcription notes closer to the relevant character in
-exactly six (6) places. The modified file, wlc_4.16_ps_td.txt, has the following
-SHA-1 hash: 79C7 003E 75C9 40B1 DDDE A885 A3A0 06B3 4C48 7140 .
- 05 Jun 2012
+exactly six (6) places. The modified file, wlc_4.18_ps_td.txt, has the following
+SHA-1 hash: 036E 5248 D7E9 522D D62C 1466 C019 8347 A693 60D9 .
+ 25 Jun 2013Hebrew
@@ -307,7 +307,7 @@ SHA-1 hash: 79C7 003E 75C9 40B1 DDDE A885 A3A0 06B3 4C48 7140 .
כֵּ֣ןעֲלֵי/כֶ֔םכָּלְא֥וּ
- שָמַ֖יִםQk
+ שָמַ֖יִםQknמִ/טָּ֑לוְ/הָ/אָ֖רֶץכָּלְאָ֥ה
diff --git a/sources/tanach/WLC/Books/Hosea.xml b/opensiddur-sources/sources/tanach/WLC/Books/Hosea.xml
similarity index 99%
rename from sources/tanach/WLC/Books/Hosea.xml
rename to opensiddur-sources/sources/tanach/WLC/Books/Hosea.xml
index c3efe42d..09786b10 100644
--- a/sources/tanach/WLC/Books/Hosea.xml
+++ b/opensiddur-sources/sources/tanach/WLC/Books/Hosea.xml
@@ -30,14 +30,14 @@
Unicode/XML Westminster Leningrad Codex
- 4.16
- 30 Apr 2012
+ 4.18
+ 13 Jun 2013
- Transcribed by WLC2XML of 6 Jun 2010 at 05 Jun 2012 @ 21:41.44. Build number: 23.0.
+ Transcribed by WLC2XML of 6 Jun 2010 at 25 Jun 2013 @ 20:24.21. Build number: 24.0.
- 96,990 bytes
+ 97,015 bytesTranscription permitted:
Kirk Lowery
@@ -53,7 +53,7 @@
Freely available
- from the electronic version of the Leningrad Codex maintained by the J. Alan Groves Center for Advanced Biblical Research.
+ From the electronic version of the Leningrad Codex maintained by the J. Alan Groves Center for Advanced Biblical Research.This text began as an electronic transcription by Richard Whitaker (Princeton Seminary, New Jersey) and H. van Parunak (then at the University of Michigan, Ann Arbor) of the 1983 printed edition of Biblia Hebraica Stuttgartensia (BHS). It was continued with the cooperation of Robert Kraft (University of Pennsylvania) and Emmanuel Tov (Hebrew University, Jerusalem), and completed by Alan Groves (Westminster Theological Seminary). The transcription was called the Michigan-Claremont-Westminster electronic Hebrew Bible and was archived at the Oxford Text Archive (OTA) in 1987. It has been variously known as the "CCAT" or "eBHS" text. Since that time, the text has been modified in many hundreds of places to conform to the photo-facsimile of the Leningrad Codex, Firkovich B19A, residing at the Russian National Library, St. Petersberg; hence the change of name.The J. Alan Groves Center for Advanced Biblical Research has continued to scrutinize and correct this electronic text as a part of its continuing work of building morphology and syntax databases of the Hebrew Bible, since correct linguistic analysis requires an accurate text.Vocalized ketib variants are no longer included as they are not part of the original manuscript.
@@ -129,13 +129,13 @@
- Input text file wlc416_ps.txt provided by the J. Alan Groves Center for Advanced
-Biblical Research. The file has the MD5 hash: a941 88e1 3fc3 0b18 8bb4 9ac8 c24f 2946
-and was received on 30 Apr 2012. The WLC text file has been modified by the
+ Input text file wlc418_ps.txt provided by the J. Alan Groves Center for Advanced
+Biblical Research. The file has the MD5 hash: 79fa 8f5a 9957 a0a0 3212 e51e b4c9 fc33
+and was received on 13 Jun 2013. The WLC text file has been modified by the
transcriber to move transcription notes closer to the relevant character in
-exactly six (6) places. The modified file, wlc_4.16_ps_td.txt, has the following
-SHA-1 hash: 79C7 003E 75C9 40B1 DDDE A885 A3A0 06B3 4C48 7140 .
- 05 Jun 2012
+exactly six (6) places. The modified file, wlc_4.18_ps_td.txt, has the following
+SHA-1 hash: 036E 5248 D7E9 522D D62C 1466 C019 8347 A693 60D9 .
+ 25 Jun 2013Hebrew
@@ -565,7 +565,7 @@ SHA-1 hash: 79C7 003E 75C9 40B1 DDDE A885 A3A0 06B3 4C48 7140 .
וְ/הֹֽלַכְתִּ֖י/הָהַ/מִּדְבָּ֑רוְ/דִבַּרְתִּ֖י
- עַלQp
+ עַלQnpלִבָּֽ/הּ׃
@@ -1061,7 +1061,7 @@ SHA-1 hash: 79C7 003E 75C9 40B1 DDDE A885 A3A0 06B3 4C48 7140 .
אוֹתָ֖/הּבִּ/כְנָפֶ֑י/הָוְ/יֵבֹ֖שׁוּ
- מִ/זִּבְחוֹתָֽ/םQp
+ מִ/זִּבְחוֹתָֽ/םQnp19
@@ -1748,7 +1748,7 @@ SHA-1 hash: 79C7 003E 75C9 40B1 DDDE A885 A3A0 06B3 4C48 7140 .
ל֑/וֹאֶפְרַ֖יִםהִתְנ֥וּ
- אֲהָבִֽיםQp
+ אֲהָבִֽיםQnpגַּ֛ם
@@ -2714,7 +2714,7 @@ SHA-1 hash: 79C7 003E 75C9 40B1 DDDE A885 A3A0 06B3 4C48 7140 .
תֵדָ֔עוּ/מוֹשִׁ֥יעַאַ֖יִן
- בִּלְתִּֽי׃
+ בִּלְתִּֽ/י׃אֲנִ֥י
diff --git a/sources/tanach/WLC/Books/Isaiah.xml b/opensiddur-sources/sources/tanach/WLC/Books/Isaiah.xml
similarity index 99%
rename from sources/tanach/WLC/Books/Isaiah.xml
rename to opensiddur-sources/sources/tanach/WLC/Books/Isaiah.xml
index 1de5455d..9ef4e42c 100644
--- a/sources/tanach/WLC/Books/Isaiah.xml
+++ b/opensiddur-sources/sources/tanach/WLC/Books/Isaiah.xml
@@ -30,14 +30,14 @@
Unicode/XML Westminster Leningrad Codex
- 4.16
- 30 Apr 2012
+ 4.18
+ 13 Jun 2013
- Transcribed by WLC2XML of 6 Jun 2010 at 05 Jun 2012 @ 21:41.43. Build number: 23.0.
+ Transcribed by WLC2XML of 6 Jun 2010 at 25 Jun 2013 @ 20:24.21. Build number: 24.0.
- 617,162 bytes
+ 617,161 bytesTranscription permitted:
Kirk Lowery
@@ -53,7 +53,7 @@
Freely available
- from the electronic version of the Leningrad Codex maintained by the J. Alan Groves Center for Advanced Biblical Research.
+ From the electronic version of the Leningrad Codex maintained by the J. Alan Groves Center for Advanced Biblical Research.This text began as an electronic transcription by Richard Whitaker (Princeton Seminary, New Jersey) and H. van Parunak (then at the University of Michigan, Ann Arbor) of the 1983 printed edition of Biblia Hebraica Stuttgartensia (BHS). It was continued with the cooperation of Robert Kraft (University of Pennsylvania) and Emmanuel Tov (Hebrew University, Jerusalem), and completed by Alan Groves (Westminster Theological Seminary). The transcription was called the Michigan-Claremont-Westminster electronic Hebrew Bible and was archived at the Oxford Text Archive (OTA) in 1987. It has been variously known as the "CCAT" or "eBHS" text. Since that time, the text has been modified in many hundreds of places to conform to the photo-facsimile of the Leningrad Codex, Firkovich B19A, residing at the Russian National Library, St. Petersberg; hence the change of name.The J. Alan Groves Center for Advanced Biblical Research has continued to scrutinize and correct this electronic text as a part of its continuing work of building morphology and syntax databases of the Hebrew Bible, since correct linguistic analysis requires an accurate text.Vocalized ketib variants are no longer included as they are not part of the original manuscript.
@@ -129,13 +129,13 @@
- Input text file wlc416_ps.txt provided by the J. Alan Groves Center for Advanced
-Biblical Research. The file has the MD5 hash: a941 88e1 3fc3 0b18 8bb4 9ac8 c24f 2946
-and was received on 30 Apr 2012. The WLC text file has been modified by the
+ Input text file wlc418_ps.txt provided by the J. Alan Groves Center for Advanced
+Biblical Research. The file has the MD5 hash: 79fa 8f5a 9957 a0a0 3212 e51e b4c9 fc33
+and was received on 13 Jun 2013. The WLC text file has been modified by the
transcriber to move transcription notes closer to the relevant character in
-exactly six (6) places. The modified file, wlc_4.16_ps_td.txt, has the following
-SHA-1 hash: 79C7 003E 75C9 40B1 DDDE A885 A3A0 06B3 4C48 7140 .
- 05 Jun 2012
+exactly six (6) places. The modified file, wlc_4.18_ps_td.txt, has the following
+SHA-1 hash: 036E 5248 D7E9 522D D62C 1466 C019 8347 A693 60D9 .
+ 25 Jun 2013Hebrew
@@ -16156,7 +16156,7 @@ SHA-1 hash: 79C7 003E 75C9 40B1 DDDE A885 A3A0 06B3 4C48 7140 .
כָּל־הַ/יּ֖וֹםשְׁמִ֥/י
- מִ/נֹּאָֽץ׃
+ מִנֹּאָֽץ׃לָ/כֵ֛ן
diff --git a/sources/tanach/WLC/Books/Jeremiah.xml b/opensiddur-sources/sources/tanach/WLC/Books/Jeremiah.xml
similarity index 99%
rename from sources/tanach/WLC/Books/Jeremiah.xml
rename to opensiddur-sources/sources/tanach/WLC/Books/Jeremiah.xml
index 811845c2..02e636b4 100644
--- a/sources/tanach/WLC/Books/Jeremiah.xml
+++ b/opensiddur-sources/sources/tanach/WLC/Books/Jeremiah.xml
@@ -30,14 +30,14 @@
Unicode/XML Westminster Leningrad Codex
- 4.16
- 30 Apr 2012
+ 4.18
+ 13 Jun 2013
- Transcribed by WLC2XML of 6 Jun 2010 at 05 Jun 2012 @ 21:41.44. Build number: 23.0.
+ Transcribed by WLC2XML of 6 Jun 2010 at 25 Jun 2013 @ 20:24.21. Build number: 24.0.
- 779,906 bytes
+ 779,905 bytesTranscription permitted:
Kirk Lowery
@@ -53,7 +53,7 @@
Freely available
- from the electronic version of the Leningrad Codex maintained by the J. Alan Groves Center for Advanced Biblical Research.
+ From the electronic version of the Leningrad Codex maintained by the J. Alan Groves Center for Advanced Biblical Research.This text began as an electronic transcription by Richard Whitaker (Princeton Seminary, New Jersey) and H. van Parunak (then at the University of Michigan, Ann Arbor) of the 1983 printed edition of Biblia Hebraica Stuttgartensia (BHS). It was continued with the cooperation of Robert Kraft (University of Pennsylvania) and Emmanuel Tov (Hebrew University, Jerusalem), and completed by Alan Groves (Westminster Theological Seminary). The transcription was called the Michigan-Claremont-Westminster electronic Hebrew Bible and was archived at the Oxford Text Archive (OTA) in 1987. It has been variously known as the "CCAT" or "eBHS" text. Since that time, the text has been modified in many hundreds of places to conform to the photo-facsimile of the Leningrad Codex, Firkovich B19A, residing at the Russian National Library, St. Petersberg; hence the change of name.The J. Alan Groves Center for Advanced Biblical Research has continued to scrutinize and correct this electronic text as a part of its continuing work of building morphology and syntax databases of the Hebrew Bible, since correct linguistic analysis requires an accurate text.Vocalized ketib variants are no longer included as they are not part of the original manuscript.
@@ -129,13 +129,13 @@
- Input text file wlc416_ps.txt provided by the J. Alan Groves Center for Advanced
-Biblical Research. The file has the MD5 hash: a941 88e1 3fc3 0b18 8bb4 9ac8 c24f 2946
-and was received on 30 Apr 2012. The WLC text file has been modified by the
+ Input text file wlc418_ps.txt provided by the J. Alan Groves Center for Advanced
+Biblical Research. The file has the MD5 hash: 79fa 8f5a 9957 a0a0 3212 e51e b4c9 fc33
+and was received on 13 Jun 2013. The WLC text file has been modified by the
transcriber to move transcription notes closer to the relevant character in
-exactly six (6) places. The modified file, wlc_4.16_ps_td.txt, has the following
-SHA-1 hash: 79C7 003E 75C9 40B1 DDDE A885 A3A0 06B3 4C48 7140 .
- 05 Jun 2012
+exactly six (6) places. The modified file, wlc_4.18_ps_td.txt, has the following
+SHA-1 hash: 036E 5248 D7E9 522D D62C 1466 C019 8347 A693 60D9 .
+ 25 Jun 2013Hebrew
@@ -22081,7 +22081,7 @@ SHA-1 hash: 79C7 003E 75C9 40B1 DDDE A885 A3A0 06B3 4C48 7140 .
יְהוָֽה׃
- ה/ניס
+ הניסהַ/נָּ֞סמִ/פְּנֵ֤יהַ/פַּ֙חַד֙
diff --git a/sources/tanach/WLC/Books/Job.xml b/opensiddur-sources/sources/tanach/WLC/Books/Job.xml
similarity index 99%
rename from sources/tanach/WLC/Books/Job.xml
rename to opensiddur-sources/sources/tanach/WLC/Books/Job.xml
index b9acbbf9..36697170 100644
--- a/sources/tanach/WLC/Books/Job.xml
+++ b/opensiddur-sources/sources/tanach/WLC/Books/Job.xml
@@ -30,11 +30,11 @@
Unicode/XML Westminster Leningrad Codex
- 4.16
- 30 Apr 2012
+ 4.18
+ 13 Jun 2013
- Transcribed by WLC2XML of 6 Jun 2010 at 05 Jun 2012 @ 21:41.44. Build number: 23.0.
+ Transcribed by WLC2XML of 6 Jun 2010 at 25 Jun 2013 @ 20:24.22. Build number: 24.0. 321,189 bytes
@@ -53,7 +53,7 @@
Freely available
- from the electronic version of the Leningrad Codex maintained by the J. Alan Groves Center for Advanced Biblical Research.
+ From the electronic version of the Leningrad Codex maintained by the J. Alan Groves Center for Advanced Biblical Research.This text began as an electronic transcription by Richard Whitaker (Princeton Seminary, New Jersey) and H. van Parunak (then at the University of Michigan, Ann Arbor) of the 1983 printed edition of Biblia Hebraica Stuttgartensia (BHS). It was continued with the cooperation of Robert Kraft (University of Pennsylvania) and Emmanuel Tov (Hebrew University, Jerusalem), and completed by Alan Groves (Westminster Theological Seminary). The transcription was called the Michigan-Claremont-Westminster electronic Hebrew Bible and was archived at the Oxford Text Archive (OTA) in 1987. It has been variously known as the "CCAT" or "eBHS" text. Since that time, the text has been modified in many hundreds of places to conform to the photo-facsimile of the Leningrad Codex, Firkovich B19A, residing at the Russian National Library, St. Petersberg; hence the change of name.The J. Alan Groves Center for Advanced Biblical Research has continued to scrutinize and correct this electronic text as a part of its continuing work of building morphology and syntax databases of the Hebrew Bible, since correct linguistic analysis requires an accurate text.Vocalized ketib variants are no longer included as they are not part of the original manuscript.
@@ -129,13 +129,13 @@
- Input text file wlc416_ps.txt provided by the J. Alan Groves Center for Advanced
-Biblical Research. The file has the MD5 hash: a941 88e1 3fc3 0b18 8bb4 9ac8 c24f 2946
-and was received on 30 Apr 2012. The WLC text file has been modified by the
+ Input text file wlc418_ps.txt provided by the J. Alan Groves Center for Advanced
+Biblical Research. The file has the MD5 hash: 79fa 8f5a 9957 a0a0 3212 e51e b4c9 fc33
+and was received on 13 Jun 2013. The WLC text file has been modified by the
transcriber to move transcription notes closer to the relevant character in
-exactly six (6) places. The modified file, wlc_4.16_ps_td.txt, has the following
-SHA-1 hash: 79C7 003E 75C9 40B1 DDDE A885 A3A0 06B3 4C48 7140 .
- 05 Jun 2012
+exactly six (6) places. The modified file, wlc_4.18_ps_td.txt, has the following
+SHA-1 hash: 036E 5248 D7E9 522D D62C 1466 C019 8347 A693 60D9 .
+ 25 Jun 2013Hebrew
diff --git a/sources/tanach/WLC/Books/Joel.xml b/opensiddur-sources/sources/tanach/WLC/Books/Joel.xml
similarity index 98%
rename from sources/tanach/WLC/Books/Joel.xml
rename to opensiddur-sources/sources/tanach/WLC/Books/Joel.xml
index 3c30d573..8029ba72 100644
--- a/sources/tanach/WLC/Books/Joel.xml
+++ b/opensiddur-sources/sources/tanach/WLC/Books/Joel.xml
@@ -30,11 +30,11 @@
Unicode/XML Westminster Leningrad Codex
- 4.16
- 30 Apr 2012
+ 4.18
+ 13 Jun 2013
- Transcribed by WLC2XML of 6 Jun 2010 at 05 Jun 2012 @ 21:41.44. Build number: 23.0.
+ Transcribed by WLC2XML of 6 Jun 2010 at 25 Jun 2013 @ 20:24.21. Build number: 24.0. 45,489 bytes
@@ -53,7 +53,7 @@
Freely available
- from the electronic version of the Leningrad Codex maintained by the J. Alan Groves Center for Advanced Biblical Research.
+ From the electronic version of the Leningrad Codex maintained by the J. Alan Groves Center for Advanced Biblical Research.This text began as an electronic transcription by Richard Whitaker (Princeton Seminary, New Jersey) and H. van Parunak (then at the University of Michigan, Ann Arbor) of the 1983 printed edition of Biblia Hebraica Stuttgartensia (BHS). It was continued with the cooperation of Robert Kraft (University of Pennsylvania) and Emmanuel Tov (Hebrew University, Jerusalem), and completed by Alan Groves (Westminster Theological Seminary). The transcription was called the Michigan-Claremont-Westminster electronic Hebrew Bible and was archived at the Oxford Text Archive (OTA) in 1987. It has been variously known as the "CCAT" or "eBHS" text. Since that time, the text has been modified in many hundreds of places to conform to the photo-facsimile of the Leningrad Codex, Firkovich B19A, residing at the Russian National Library, St. Petersberg; hence the change of name.The J. Alan Groves Center for Advanced Biblical Research has continued to scrutinize and correct this electronic text as a part of its continuing work of building morphology and syntax databases of the Hebrew Bible, since correct linguistic analysis requires an accurate text.Vocalized ketib variants are no longer included as they are not part of the original manuscript.
@@ -129,13 +129,13 @@
- Input text file wlc416_ps.txt provided by the J. Alan Groves Center for Advanced
-Biblical Research. The file has the MD5 hash: a941 88e1 3fc3 0b18 8bb4 9ac8 c24f 2946
-and was received on 30 Apr 2012. The WLC text file has been modified by the
+ Input text file wlc418_ps.txt provided by the J. Alan Groves Center for Advanced
+Biblical Research. The file has the MD5 hash: 79fa 8f5a 9957 a0a0 3212 e51e b4c9 fc33
+and was received on 13 Jun 2013. The WLC text file has been modified by the
transcriber to move transcription notes closer to the relevant character in
-exactly six (6) places. The modified file, wlc_4.16_ps_td.txt, has the following
-SHA-1 hash: 79C7 003E 75C9 40B1 DDDE A885 A3A0 06B3 4C48 7140 .
- 05 Jun 2012
+exactly six (6) places. The modified file, wlc_4.18_ps_td.txt, has the following
+SHA-1 hash: 036E 5248 D7E9 522D D62C 1466 C019 8347 A693 60D9 .
+ 25 Jun 2013Hebrew
diff --git a/sources/tanach/WLC/Books/Jonah.xml b/opensiddur-sources/sources/tanach/WLC/Books/Jonah.xml
similarity index 98%
rename from sources/tanach/WLC/Books/Jonah.xml
rename to opensiddur-sources/sources/tanach/WLC/Books/Jonah.xml
index a686b1d6..f8ea4b4c 100644
--- a/sources/tanach/WLC/Books/Jonah.xml
+++ b/opensiddur-sources/sources/tanach/WLC/Books/Jonah.xml
@@ -30,11 +30,11 @@
Unicode/XML Westminster Leningrad Codex
- 4.16
- 30 Apr 2012
+ 4.18
+ 13 Jun 2013
- Transcribed by WLC2XML of 6 Jun 2010 at 05 Jun 2012 @ 21:41.44. Build number: 23.0.
+ Transcribed by WLC2XML of 6 Jun 2010 at 25 Jun 2013 @ 20:24.21. Build number: 24.0. 35,580 bytes
@@ -53,7 +53,7 @@
Freely available
- from the electronic version of the Leningrad Codex maintained by the J. Alan Groves Center for Advanced Biblical Research.
+ From the electronic version of the Leningrad Codex maintained by the J. Alan Groves Center for Advanced Biblical Research.This text began as an electronic transcription by Richard Whitaker (Princeton Seminary, New Jersey) and H. van Parunak (then at the University of Michigan, Ann Arbor) of the 1983 printed edition of Biblia Hebraica Stuttgartensia (BHS). It was continued with the cooperation of Robert Kraft (University of Pennsylvania) and Emmanuel Tov (Hebrew University, Jerusalem), and completed by Alan Groves (Westminster Theological Seminary). The transcription was called the Michigan-Claremont-Westminster electronic Hebrew Bible and was archived at the Oxford Text Archive (OTA) in 1987. It has been variously known as the "CCAT" or "eBHS" text. Since that time, the text has been modified in many hundreds of places to conform to the photo-facsimile of the Leningrad Codex, Firkovich B19A, residing at the Russian National Library, St. Petersberg; hence the change of name.The J. Alan Groves Center for Advanced Biblical Research has continued to scrutinize and correct this electronic text as a part of its continuing work of building morphology and syntax databases of the Hebrew Bible, since correct linguistic analysis requires an accurate text.Vocalized ketib variants are no longer included as they are not part of the original manuscript.
@@ -129,13 +129,13 @@
- Input text file wlc416_ps.txt provided by the J. Alan Groves Center for Advanced
-Biblical Research. The file has the MD5 hash: a941 88e1 3fc3 0b18 8bb4 9ac8 c24f 2946
-and was received on 30 Apr 2012. The WLC text file has been modified by the
+ Input text file wlc418_ps.txt provided by the J. Alan Groves Center for Advanced
+Biblical Research. The file has the MD5 hash: 79fa 8f5a 9957 a0a0 3212 e51e b4c9 fc33
+and was received on 13 Jun 2013. The WLC text file has been modified by the
transcriber to move transcription notes closer to the relevant character in
-exactly six (6) places. The modified file, wlc_4.16_ps_td.txt, has the following
-SHA-1 hash: 79C7 003E 75C9 40B1 DDDE A885 A3A0 06B3 4C48 7140 .
- 05 Jun 2012
+exactly six (6) places. The modified file, wlc_4.18_ps_td.txt, has the following
+SHA-1 hash: 036E 5248 D7E9 522D D62C 1466 C019 8347 A693 60D9 .
+ 25 Jun 2013Hebrew
diff --git a/sources/tanach/WLC/Books/Joshua.xml b/opensiddur-sources/sources/tanach/WLC/Books/Joshua.xml
similarity index 99%
rename from sources/tanach/WLC/Books/Joshua.xml
rename to opensiddur-sources/sources/tanach/WLC/Books/Joshua.xml
index 417efa34..165ca013 100644
--- a/sources/tanach/WLC/Books/Joshua.xml
+++ b/opensiddur-sources/sources/tanach/WLC/Books/Joshua.xml
@@ -30,11 +30,11 @@
Unicode/XML Westminster Leningrad Codex
- 4.16
- 30 Apr 2012
+ 4.18
+ 13 Jun 2013
- Transcribed by WLC2XML of 6 Jun 2010 at 05 Jun 2012 @ 21:41.43. Build number: 23.0.
+ Transcribed by WLC2XML of 6 Jun 2010 at 25 Jun 2013 @ 20:24.20. Build number: 24.0. 368,857 bytes
@@ -53,7 +53,7 @@
Freely available
- from the electronic version of the Leningrad Codex maintained by the J. Alan Groves Center for Advanced Biblical Research.
+ From the electronic version of the Leningrad Codex maintained by the J. Alan Groves Center for Advanced Biblical Research.This text began as an electronic transcription by Richard Whitaker (Princeton Seminary, New Jersey) and H. van Parunak (then at the University of Michigan, Ann Arbor) of the 1983 printed edition of Biblia Hebraica Stuttgartensia (BHS). It was continued with the cooperation of Robert Kraft (University of Pennsylvania) and Emmanuel Tov (Hebrew University, Jerusalem), and completed by Alan Groves (Westminster Theological Seminary). The transcription was called the Michigan-Claremont-Westminster electronic Hebrew Bible and was archived at the Oxford Text Archive (OTA) in 1987. It has been variously known as the "CCAT" or "eBHS" text. Since that time, the text has been modified in many hundreds of places to conform to the photo-facsimile of the Leningrad Codex, Firkovich B19A, residing at the Russian National Library, St. Petersberg; hence the change of name.The J. Alan Groves Center for Advanced Biblical Research has continued to scrutinize and correct this electronic text as a part of its continuing work of building morphology and syntax databases of the Hebrew Bible, since correct linguistic analysis requires an accurate text.Vocalized ketib variants are no longer included as they are not part of the original manuscript.
@@ -129,13 +129,13 @@
- Input text file wlc416_ps.txt provided by the J. Alan Groves Center for Advanced
-Biblical Research. The file has the MD5 hash: a941 88e1 3fc3 0b18 8bb4 9ac8 c24f 2946
-and was received on 30 Apr 2012. The WLC text file has been modified by the
+ Input text file wlc418_ps.txt provided by the J. Alan Groves Center for Advanced
+Biblical Research. The file has the MD5 hash: 79fa 8f5a 9957 a0a0 3212 e51e b4c9 fc33
+and was received on 13 Jun 2013. The WLC text file has been modified by the
transcriber to move transcription notes closer to the relevant character in
-exactly six (6) places. The modified file, wlc_4.16_ps_td.txt, has the following
-SHA-1 hash: 79C7 003E 75C9 40B1 DDDE A885 A3A0 06B3 4C48 7140 .
- 05 Jun 2012
+exactly six (6) places. The modified file, wlc_4.18_ps_td.txt, has the following
+SHA-1 hash: 036E 5248 D7E9 522D D62C 1466 C019 8347 A693 60D9 .
+ 25 Jun 2013Hebrew
diff --git a/sources/tanach/WLC/Books/Judges.xml b/opensiddur-sources/sources/tanach/WLC/Books/Judges.xml
similarity index 99%
rename from sources/tanach/WLC/Books/Judges.xml
rename to opensiddur-sources/sources/tanach/WLC/Books/Judges.xml
index 60e47de5..89609a92 100644
--- a/sources/tanach/WLC/Books/Judges.xml
+++ b/opensiddur-sources/sources/tanach/WLC/Books/Judges.xml
@@ -30,14 +30,14 @@
Unicode/XML Westminster Leningrad Codex
- 4.16
- 30 Apr 2012
+ 4.18
+ 13 Jun 2013
- Transcribed by WLC2XML of 6 Jun 2010 at 05 Jun 2012 @ 21:41.43. Build number: 23.0.
+ Transcribed by WLC2XML of 6 Jun 2010 at 25 Jun 2013 @ 20:24.20. Build number: 24.0.
- 361,425 bytes
+ 361,903 bytesTranscription permitted:
Kirk Lowery
@@ -53,7 +53,7 @@
Freely available
- from the electronic version of the Leningrad Codex maintained by the J. Alan Groves Center for Advanced Biblical Research.
+ From the electronic version of the Leningrad Codex maintained by the J. Alan Groves Center for Advanced Biblical Research.This text began as an electronic transcription by Richard Whitaker (Princeton Seminary, New Jersey) and H. van Parunak (then at the University of Michigan, Ann Arbor) of the 1983 printed edition of Biblia Hebraica Stuttgartensia (BHS). It was continued with the cooperation of Robert Kraft (University of Pennsylvania) and Emmanuel Tov (Hebrew University, Jerusalem), and completed by Alan Groves (Westminster Theological Seminary). The transcription was called the Michigan-Claremont-Westminster electronic Hebrew Bible and was archived at the Oxford Text Archive (OTA) in 1987. It has been variously known as the "CCAT" or "eBHS" text. Since that time, the text has been modified in many hundreds of places to conform to the photo-facsimile of the Leningrad Codex, Firkovich B19A, residing at the Russian National Library, St. Petersberg; hence the change of name.The J. Alan Groves Center for Advanced Biblical Research has continued to scrutinize and correct this electronic text as a part of its continuing work of building morphology and syntax databases of the Hebrew Bible, since correct linguistic analysis requires an accurate text.Vocalized ketib variants are no longer included as they are not part of the original manuscript.
@@ -129,13 +129,13 @@
- Input text file wlc416_ps.txt provided by the J. Alan Groves Center for Advanced
-Biblical Research. The file has the MD5 hash: a941 88e1 3fc3 0b18 8bb4 9ac8 c24f 2946
-and was received on 30 Apr 2012. The WLC text file has been modified by the
+ Input text file wlc418_ps.txt provided by the J. Alan Groves Center for Advanced
+Biblical Research. The file has the MD5 hash: 79fa 8f5a 9957 a0a0 3212 e51e b4c9 fc33
+and was received on 13 Jun 2013. The WLC text file has been modified by the
transcriber to move transcription notes closer to the relevant character in
-exactly six (6) places. The modified file, wlc_4.16_ps_td.txt, has the following
-SHA-1 hash: 79C7 003E 75C9 40B1 DDDE A885 A3A0 06B3 4C48 7140 .
- 05 Jun 2012
+exactly six (6) places. The modified file, wlc_4.18_ps_td.txt, has the following
+SHA-1 hash: 036E 5248 D7E9 522D D62C 1466 C019 8347 A693 60D9 .
+ 25 Jun 2013Hebrew
@@ -462,8 +462,8 @@ SHA-1 hash: 79C7 003E 75C9 40B1 DDDE A885 A3A0 06B3 4C48 7140 .
וַ/יְהִ֤ייְהוָה֙
- אֶת־
- יְהוּדָ֔ה
+ אֶתּ־
+ יְהוּדָ֔הPnpוַ/יֹּ֖רֶשׁאֶת־הָ/הָ֑ר
@@ -980,7 +980,7 @@ SHA-1 hash: 79C7 003E 75C9 40B1 DDDE A885 A3A0 06B3 4C48 7140 .
לָ/הֶ֑םוַ/יַּכְעִ֖סוּאֶת־
- יְהוָֽה׃c
+ יְהוָֽה׃Ccוַ/יַּעַזְב֖וּ
@@ -1610,11 +1610,11 @@ SHA-1 hash: 79C7 003E 75C9 40B1 DDDE A885 A3A0 06B3 4C48 7140 .
וַ/יָּחִ֣ילוּעַד־בּ֔וֹשׁ
- וְ/הִנֵּ֛ה
+ וְ/הְנֵּ֛הQnvאֵינֶ֥/נּוּפֹתֵ֖חַדַּלְת֣וֹת
- הָֽ/עֲלִיָּ֑הc
+ הָֽ/עֲלִיָּ֑הQcוַ/יִּקְח֤וּאֶת־הַ/מַּפְתֵּ֙חַ֙
@@ -1903,7 +1903,7 @@ SHA-1 hash: 79C7 003E 75C9 40B1 DDDE A885 A3A0 06B3 4C48 7140 .
סִֽיסְרָ֑אוַ/תָּ֧קָםדְּבוֹרָ֛ה
- וַ/תֵּ֥לֶךְ
+ וַ/תֵּ֥לֶךQnvעִם־בָּרָ֖קקֶֽדְשָׁ/ה׃
@@ -2055,7 +2055,7 @@ SHA-1 hash: 79C7 003E 75C9 40B1 DDDE A885 A3A0 06B3 4C48 7140 .
אֶל־אֹ֣הֶליָעֵ֔ל
- אֵ֖שֶׁת
+ אֵ֖שֶּׁתQnpחֶ֣בֶרהַ/קֵּינִ֑יכִּ֣י
@@ -2836,7 +2836,7 @@ SHA-1 hash: 79C7 003E 75C9 40B1 DDDE A885 A3A0 06B3 4C48 7140 .
וַ/יֵּרָ֥אאֵלָ֖י/ו
- מַלְאַ֣ךְ
+ מַלְּאַ֣ךְQnpיְהוָ֑הוַ/יֹּ֣אמֶראֵלָ֔י/ו
@@ -3283,7 +3283,7 @@ SHA-1 hash: 79C7 003E 75C9 40B1 DDDE A885 A3A0 06B3 4C48 7140 .
גִּדְע֑וֹןוַ/יִּתְקַע֙בַּ/שּׁוֹפָ֔ר
- וַ/יִּזָּעֵ֥ק
+ וַ/יִזָּעֵ֥קQnpאֲבִיעֶ֖זֶראַחֲרָֽי/ו׃
@@ -3292,7 +3292,7 @@ SHA-1 hash: 79C7 003E 75C9 40B1 DDDE A885 A3A0 06B3 4C48 7140 .
שָׁלַ֣חבְּ/כָל־מְנַשֶּׁ֔ה
- וַ/יִּזָּעֵ֥ק
+ וַ/יִזָּעֵ֥קQnpגַּם־ה֖וּאאַחֲרָ֑י/ו
@@ -3845,7 +3845,7 @@ SHA-1 hash: 79C7 003E 75C9 40B1 DDDE A885 A3A0 06B3 4C48 7140 .
הַ/כַּדִּים֒וַ/יַּחֲזִ֤יקוּבְ/יַד־
- שְׂמאוֹלָ/ם֙1
+ שְׂמאוֹלָ/ם֙Uבַּ/לַּפִּדִ֔יםוּ/בְ/יַ֨ד־יְמִינָ֔/ם
@@ -4280,7 +4280,7 @@ SHA-1 hash: 79C7 003E 75C9 40B1 DDDE A885 A3A0 06B3 4C48 7140 .
אֲשֶׁ֥רהֲרַגְתֶּ֖םבְּ/תָב֑וֹר
- וַֽ/יֹּאמְרוּ֙
+ וַֽ/יֹּאמרוּ֙Qnvכָּמ֣וֹ/ךָכְמוֹ/הֶ֔םאֶחָ֕ד
@@ -4623,9 +4623,9 @@ SHA-1 hash: 79C7 003E 75C9 40B1 DDDE A885 A3A0 06B3 4C48 7140 .
אֶחָ֑דוּ/זְכַרְתֶּ֕םכִּֽי־
- עַצְמֵ/כֶ֥ם
+ עַצְמֵ/כֶ֥םUוּ/בְשַׂרְ/כֶ֖ם
- אָנִֽי׃
+ אָנִֽי׃Uוַ/יְדַבְּר֨וּ
@@ -4654,8 +4654,8 @@ SHA-1 hash: 79C7 003E 75C9 40B1 DDDE A885 A3A0 06B3 4C48 7140 .
ל/וֹ֙שִׁבְעִ֣יםכֶּ֔סֶף
- מִ/בֵּ֖ית
- בַּ֣עַל
+ מִ/בֵּ֖יתּPnp
+ בַ֣עַלPnpבְּרִ֑יתוַ/יִּשְׂכֹּ֨רבָּ/הֶ֜ם
@@ -4676,7 +4676,7 @@ SHA-1 hash: 79C7 003E 75C9 40B1 DDDE A885 A3A0 06B3 4C48 7140 .
אֶחָ֧י/ובְּנֵֽי־יְרֻבַּ֛עַל
- שִׁבְעִ֥ים
+ שִׁבְּעִ֥יםPnpאִ֖ישׁעַל־אֶ֣בֶן
@@ -6465,7 +6465,7 @@ SHA-1 hash: 79C7 003E 75C9 40B1 DDDE A885 A3A0 06B3 4C48 7140 .
עַמּ֖וֹןלְ/הִלָּ֣חֶםבָּ֑/ם
- וַ/יִּתְּנֵ֥/ם
+ וַ/יִתְּנֵ֥/םQnpיְהוָ֖הבְּ/יָדֽ/וֹ׃
@@ -6473,7 +6473,7 @@ SHA-1 hash: 79C7 003E 75C9 40B1 DDDE A885 A3A0 06B3 4C48 7140 .
וַ/יַּכֵּ֡/םמֵ/עֲרוֹעֵר֩וְ/עַד־
- בּוֹאֲ/ךָ֨c
+ בּוֹאֲ/ךָ֨Ccמִנִּ֜יתעֶשְׂרִ֣יםעִ֗יר
@@ -6526,7 +6526,7 @@ SHA-1 hash: 79C7 003E 75C9 40B1 DDDE A885 A3A0 06B3 4C48 7140 .
הַכְרֵ֣עַהִכְרַעְתִּ֔/נִיוְ/אַ֖תְּ
- הָיִ֣יתְ1
+ הָיִ֣יתְUבְּ/עֹֽכְרָ֑/יוְ/אָנֹכִ֗יפָּצִ֤יתִי־
@@ -6686,7 +6686,7 @@ SHA-1 hash: 79C7 003E 75C9 40B1 DDDE A885 A3A0 06B3 4C48 7140 .
וָֽ/אֶרְאֶ֞הכִּֽי־אֵינְ/ךָ֣
- מוֹשִׁ֗יעַ
+ מוֹשִׁ֗יעQnvוָ/אָשִׂ֨ימָ/הנַפְשִׁ֤/יבְ/כַפִּ/י֙
@@ -7221,7 +7221,7 @@ SHA-1 hash: 79C7 003E 75C9 40B1 DDDE A885 A3A0 06B3 4C48 7140 .
וַ/יֹּ֤אמֶר
- ל/וֹ֙
+ לּ/וֹ֙Qnpמַלְאַ֣ךְיְהוָ֔הלָ֥/מָּה
@@ -7229,7 +7229,7 @@ SHA-1 hash: 79C7 003E 75C9 40B1 DDDE A885 A3A0 06B3 4C48 7140 .
תִּשְׁאַ֣ללִ/שְׁמִ֑/יוְ/הוּא־
- פֶֽלִאי׃
+ פֶ֛לִאי׃Qcn
@@ -7956,7 +7956,7 @@ SHA-1 hash: 79C7 003E 75C9 40B1 DDDE A885 A3A0 06B3 4C48 7140 .
וַ/יֹּ֧אמְרוּל֣/וֹלֵ/אמֹ֗ר
- לֹ֚אc
+ לֹ֚אCcכִּֽי־אָסֹ֤רנֶֽאֱסָרְ/ךָ֙
@@ -7978,7 +7978,7 @@ SHA-1 hash: 79C7 003E 75C9 40B1 DDDE A885 A3A0 06B3 4C48 7140 .
בָ֣אעַד־לֶ֔חִי
- וּ/פְלִשְׁתִּ֖ים
+ וּ/פְלִשִׁתִּ֖יםQnvהֵרִ֣יעוּלִ/קְרָאת֑/וֹוַ/תִּצְלַ֨ח
@@ -8130,7 +8130,7 @@ SHA-1 hash: 79C7 003E 75C9 40B1 DDDE A885 A3A0 06B3 4C48 7140 .
עַד־א֥וֹרהַ/בֹּ֖קֶר
- וַ/הֲרְגְנֻֽ/הוּ׃1
+ וַ/הֲרְגְנֻֽ/הוּ׃Uוַ/יִּשְׁכַּ֣ב
@@ -8226,7 +8226,7 @@ SHA-1 hash: 79C7 003E 75C9 40B1 DDDE A885 A3A0 06B3 4C48 7140 .
לַחִ֖יםאֲשֶׁ֣רלֹא־
- חֹרָ֑בוּc
+ חֹרָ֑בוּQcוְ/חָלִ֥יתִיוְ/הָיִ֖יתִיכְּ/אַחַ֥ד
@@ -8434,7 +8434,7 @@ SHA-1 hash: 79C7 003E 75C9 40B1 DDDE A885 A3A0 06B3 4C48 7140 .
וַ/תֵּ֣רֶא
- דְלִילָ֗הp
+ דְלִילָ֗הPpכִּֽי־הִגִּ֣ידלָ/הּ֮
@@ -8529,7 +8529,7 @@ SHA-1 hash: 79C7 003E 75C9 40B1 DDDE A885 A3A0 06B3 4C48 7140 .
וְ/סַרְנֵ֣יפְלִשְׁתִּ֗ים
- נֶֽאֱסְפוּ֙1
+ נֶֽאֱסְפוּ֙Uלִ/זְבֹּ֧חַזֶֽבַח־גָּד֛וֹל
@@ -9805,7 +9805,7 @@ SHA-1 hash: 79C7 003E 75C9 40B1 DDDE A885 A3A0 06B3 4C48 7140 .
וַ/יֹּ֣אמֶרלְ/נַעֲר֔/וֹ
- לְךָ֥/q
+ לְךָ֥/Qqוְ/נִקְרְבָ֖הבְּ/אַחַ֣דהַ/מְּקֹמ֑וֹת
@@ -9873,7 +9873,7 @@ SHA-1 hash: 79C7 003E 75C9 40B1 DDDE A885 A3A0 06B3 4C48 7140 .
בִּ/רְחֹ֣בהָ/עִ֑ירוַ/יֹּ֨אמֶר
- הָ/אִ֧ישׁc
+ הָ/אִ֧ישׁCcהַ/זָּקֵ֛ןאָ֥נָהתֵלֵ֖ךְ
@@ -9949,7 +9949,7 @@ SHA-1 hash: 79C7 003E 75C9 40B1 DDDE A885 A3A0 06B3 4C48 7140 .
וַ/יְבִיאֵ֣/הוּלְ/בֵית֔/וֹ
- וַ/יָּ֖בָולnq
+ וַ/יָּ֖בָולQnqלַ/חֲמוֹרִ֑יםוַֽ/יִּרְחֲצוּ֙רַגְלֵי/הֶ֔ם
@@ -10008,7 +10008,7 @@ SHA-1 hash: 79C7 003E 75C9 40B1 DDDE A885 A3A0 06B3 4C48 7140 .
הָ/אִ֤ישׁהַ/זֶּה֙אַל־
- בֵּיתִ֔/י1
+ בֵּיתִ֔/יUאַֽל־תַּעֲשׂ֖וּאֶת־
@@ -10763,7 +10763,7 @@ SHA-1 hash: 79C7 003E 75C9 40B1 DDDE A885 A3A0 06B3 4C48 7140 .
- וַ/יִּגֹּ֨ףc
+ וַ/יִּגֹּ֨ףCcיְהוָ֥ה ׀אֶֽת־בִּנְיָמִן֮
diff --git a/sources/tanach/WLC/Books/Kings_1.xml b/opensiddur-sources/sources/tanach/WLC/Books/Kings_1.xml
similarity index 99%
rename from sources/tanach/WLC/Books/Kings_1.xml
rename to opensiddur-sources/sources/tanach/WLC/Books/Kings_1.xml
index ded7d3a5..c8ab866a 100644
--- a/sources/tanach/WLC/Books/Kings_1.xml
+++ b/opensiddur-sources/sources/tanach/WLC/Books/Kings_1.xml
@@ -30,11 +30,11 @@
Unicode/XML Westminster Leningrad Codex
- 4.16
- 30 Apr 2012
+ 4.18
+ 13 Jun 2013
- Transcribed by WLC2XML of 6 Jun 2010 at 05 Jun 2012 @ 21:41.43. Build number: 23.0.
+ Transcribed by WLC2XML of 6 Jun 2010 at 25 Jun 2013 @ 20:24.20. Build number: 24.0. 473,224 bytes
@@ -53,7 +53,7 @@
Freely available
- from the electronic version of the Leningrad Codex maintained by the J. Alan Groves Center for Advanced Biblical Research.
+ From the electronic version of the Leningrad Codex maintained by the J. Alan Groves Center for Advanced Biblical Research.This text began as an electronic transcription by Richard Whitaker (Princeton Seminary, New Jersey) and H. van Parunak (then at the University of Michigan, Ann Arbor) of the 1983 printed edition of Biblia Hebraica Stuttgartensia (BHS). It was continued with the cooperation of Robert Kraft (University of Pennsylvania) and Emmanuel Tov (Hebrew University, Jerusalem), and completed by Alan Groves (Westminster Theological Seminary). The transcription was called the Michigan-Claremont-Westminster electronic Hebrew Bible and was archived at the Oxford Text Archive (OTA) in 1987. It has been variously known as the "CCAT" or "eBHS" text. Since that time, the text has been modified in many hundreds of places to conform to the photo-facsimile of the Leningrad Codex, Firkovich B19A, residing at the Russian National Library, St. Petersberg; hence the change of name.The J. Alan Groves Center for Advanced Biblical Research has continued to scrutinize and correct this electronic text as a part of its continuing work of building morphology and syntax databases of the Hebrew Bible, since correct linguistic analysis requires an accurate text.Vocalized ketib variants are no longer included as they are not part of the original manuscript.
@@ -129,13 +129,13 @@
- Input text file wlc416_ps.txt provided by the J. Alan Groves Center for Advanced
-Biblical Research. The file has the MD5 hash: a941 88e1 3fc3 0b18 8bb4 9ac8 c24f 2946
-and was received on 30 Apr 2012. The WLC text file has been modified by the
+ Input text file wlc418_ps.txt provided by the J. Alan Groves Center for Advanced
+Biblical Research. The file has the MD5 hash: 79fa 8f5a 9957 a0a0 3212 e51e b4c9 fc33
+and was received on 13 Jun 2013. The WLC text file has been modified by the
transcriber to move transcription notes closer to the relevant character in
-exactly six (6) places. The modified file, wlc_4.16_ps_td.txt, has the following
-SHA-1 hash: 79C7 003E 75C9 40B1 DDDE A885 A3A0 06B3 4C48 7140 .
- 05 Jun 2012
+exactly six (6) places. The modified file, wlc_4.18_ps_td.txt, has the following
+SHA-1 hash: 036E 5248 D7E9 522D D62C 1466 C019 8347 A693 60D9 .
+ 25 Jun 2013Hebrew
diff --git a/sources/tanach/WLC/Books/Kings_2.xml b/opensiddur-sources/sources/tanach/WLC/Books/Kings_2.xml
similarity index 99%
rename from sources/tanach/WLC/Books/Kings_2.xml
rename to opensiddur-sources/sources/tanach/WLC/Books/Kings_2.xml
index 15e40309..4d84793d 100644
--- a/sources/tanach/WLC/Books/Kings_2.xml
+++ b/opensiddur-sources/sources/tanach/WLC/Books/Kings_2.xml
@@ -30,14 +30,14 @@
Unicode/XML Westminster Leningrad Codex
- 4.16
- 30 Apr 2012
+ 4.18
+ 13 Jun 2013
- Transcribed by WLC2XML of 6 Jun 2010 at 05 Jun 2012 @ 21:41.43. Build number: 23.0.
+ Transcribed by WLC2XML of 6 Jun 2010 at 25 Jun 2013 @ 20:24.21. Build number: 24.0.
- 443,356 bytes
+ 443,348 bytesTranscription permitted:
Kirk Lowery
@@ -53,7 +53,7 @@
Freely available
- from the electronic version of the Leningrad Codex maintained by the J. Alan Groves Center for Advanced Biblical Research.
+ From the electronic version of the Leningrad Codex maintained by the J. Alan Groves Center for Advanced Biblical Research.This text began as an electronic transcription by Richard Whitaker (Princeton Seminary, New Jersey) and H. van Parunak (then at the University of Michigan, Ann Arbor) of the 1983 printed edition of Biblia Hebraica Stuttgartensia (BHS). It was continued with the cooperation of Robert Kraft (University of Pennsylvania) and Emmanuel Tov (Hebrew University, Jerusalem), and completed by Alan Groves (Westminster Theological Seminary). The transcription was called the Michigan-Claremont-Westminster electronic Hebrew Bible and was archived at the Oxford Text Archive (OTA) in 1987. It has been variously known as the "CCAT" or "eBHS" text. Since that time, the text has been modified in many hundreds of places to conform to the photo-facsimile of the Leningrad Codex, Firkovich B19A, residing at the Russian National Library, St. Petersberg; hence the change of name.The J. Alan Groves Center for Advanced Biblical Research has continued to scrutinize and correct this electronic text as a part of its continuing work of building morphology and syntax databases of the Hebrew Bible, since correct linguistic analysis requires an accurate text.Vocalized ketib variants are no longer included as they are not part of the original manuscript.
@@ -129,13 +129,13 @@
- Input text file wlc416_ps.txt provided by the J. Alan Groves Center for Advanced
-Biblical Research. The file has the MD5 hash: a941 88e1 3fc3 0b18 8bb4 9ac8 c24f 2946
-and was received on 30 Apr 2012. The WLC text file has been modified by the
+ Input text file wlc418_ps.txt provided by the J. Alan Groves Center for Advanced
+Biblical Research. The file has the MD5 hash: 79fa 8f5a 9957 a0a0 3212 e51e b4c9 fc33
+and was received on 13 Jun 2013. The WLC text file has been modified by the
transcriber to move transcription notes closer to the relevant character in
-exactly six (6) places. The modified file, wlc_4.16_ps_td.txt, has the following
-SHA-1 hash: 79C7 003E 75C9 40B1 DDDE A885 A3A0 06B3 4C48 7140 .
- 05 Jun 2012
+exactly six (6) places. The modified file, wlc_4.18_ps_td.txt, has the following
+SHA-1 hash: 036E 5248 D7E9 522D D62C 1466 C019 8347 A693 60D9 .
+ 25 Jun 2013Hebrew
@@ -9057,7 +9057,7 @@ SHA-1 hash: 79C7 003E 75C9 40B1 DDDE A885 A3A0 06B3 4C48 7140 .
כָל־חֹזֶ֜הלֵ/אמֹ֗ר
- שֻׁ֝֩בוּ1
+ שֻׁ֝֠בוּמִ/דַּרְכֵי/כֶ֤םהָֽ/רָעִים֙וְ/שִׁמְרוּ֙
diff --git a/sources/tanach/WLC/Books/Lamentations.xml b/opensiddur-sources/sources/tanach/WLC/Books/Lamentations.xml
similarity index 98%
rename from sources/tanach/WLC/Books/Lamentations.xml
rename to opensiddur-sources/sources/tanach/WLC/Books/Lamentations.xml
index c75b0037..971e382d 100644
--- a/sources/tanach/WLC/Books/Lamentations.xml
+++ b/opensiddur-sources/sources/tanach/WLC/Books/Lamentations.xml
@@ -30,14 +30,14 @@
Unicode/XML Westminster Leningrad Codex
- 4.16
- 30 Apr 2012
+ 4.18
+ 13 Jun 2013
- Transcribed by WLC2XML of 6 Jun 2010 at 05 Jun 2012 @ 21:41.45. Build number: 23.0.
+ Transcribed by WLC2XML of 6 Jun 2010 at 25 Jun 2013 @ 20:24.22. Build number: 24.0.
- 68,936 bytes
+ 68,976 bytesTranscription permitted:
Kirk Lowery
@@ -53,7 +53,7 @@
Freely available
- from the electronic version of the Leningrad Codex maintained by the J. Alan Groves Center for Advanced Biblical Research.
+ From the electronic version of the Leningrad Codex maintained by the J. Alan Groves Center for Advanced Biblical Research.This text began as an electronic transcription by Richard Whitaker (Princeton Seminary, New Jersey) and H. van Parunak (then at the University of Michigan, Ann Arbor) of the 1983 printed edition of Biblia Hebraica Stuttgartensia (BHS). It was continued with the cooperation of Robert Kraft (University of Pennsylvania) and Emmanuel Tov (Hebrew University, Jerusalem), and completed by Alan Groves (Westminster Theological Seminary). The transcription was called the Michigan-Claremont-Westminster electronic Hebrew Bible and was archived at the Oxford Text Archive (OTA) in 1987. It has been variously known as the "CCAT" or "eBHS" text. Since that time, the text has been modified in many hundreds of places to conform to the photo-facsimile of the Leningrad Codex, Firkovich B19A, residing at the Russian National Library, St. Petersberg; hence the change of name.The J. Alan Groves Center for Advanced Biblical Research has continued to scrutinize and correct this electronic text as a part of its continuing work of building morphology and syntax databases of the Hebrew Bible, since correct linguistic analysis requires an accurate text.Vocalized ketib variants are no longer included as they are not part of the original manuscript.
@@ -129,13 +129,13 @@
- Input text file wlc416_ps.txt provided by the J. Alan Groves Center for Advanced
-Biblical Research. The file has the MD5 hash: a941 88e1 3fc3 0b18 8bb4 9ac8 c24f 2946
-and was received on 30 Apr 2012. The WLC text file has been modified by the
+ Input text file wlc418_ps.txt provided by the J. Alan Groves Center for Advanced
+Biblical Research. The file has the MD5 hash: 79fa 8f5a 9957 a0a0 3212 e51e b4c9 fc33
+and was received on 13 Jun 2013. The WLC text file has been modified by the
transcriber to move transcription notes closer to the relevant character in
-exactly six (6) places. The modified file, wlc_4.16_ps_td.txt, has the following
-SHA-1 hash: 79C7 003E 75C9 40B1 DDDE A885 A3A0 06B3 4C48 7140 .
- 05 Jun 2012
+exactly six (6) places. The modified file, wlc_4.18_ps_td.txt, has the following
+SHA-1 hash: 036E 5248 D7E9 522D D62C 1466 C019 8347 A693 60D9 .
+ 25 Jun 2013Hebrew
@@ -161,7 +161,7 @@ SHA-1 hash: 79C7 003E 75C9 40B1 DDDE A885 A3A0 06B3 4C48 7140 .
עָ֔םהָיְתָ֖הכְּ/אַלְמָנָ֑ה
- רַּבָּ֣תִיQp
+ רַּבָּ֣תִיQnpבַ/גּוֹיִ֗םשָׂרָ֙תִי֙בַּ/מְּדִינ֔וֹת
@@ -645,7 +645,7 @@ SHA-1 hash: 79C7 003E 75C9 40B1 DDDE A885 A3A0 06B3 4C48 7140 .
גָּדַ֣ע
- בָּֽ/חֳרִיQp
+ בָּֽ/חֳרִיQnpאַ֗ףכֹּ֚לקֶ֣רֶן
@@ -1142,7 +1142,7 @@ SHA-1 hash: 79C7 003E 75C9 40B1 DDDE A885 A3A0 06B3 4C48 7140 .
דָּרַ֤ךְ
- קַשְׁת/וֹ֙Qp
+ קַשְׁת/וֹ֙Qnpוַ/יַּצִּיבֵ֔/נִיכַּ/מַּטָּרָ֖אלַ/חֵֽץ׃
@@ -1315,7 +1315,7 @@ SHA-1 hash: 79C7 003E 75C9 40B1 DDDE A885 A3A0 06B3 4C48 7140 .
מִ/לִּבּ֔/וֹוַ/יַּגֶּ֖הבְנֵי־
- אִֽישׁ׃Qp
+ אִֽישׁ׃Qnp
@@ -1647,7 +1647,7 @@ SHA-1 hash: 79C7 003E 75C9 40B1 DDDE A885 A3A0 06B3 4C48 7140 .
לְשׁ֥וֹןיוֹנֵ֛קאֶל־
- חכּ֖/וֹQv
+ חכּ֖/וֹQnvבַּ/צָּמָ֑אעֽוֹלָלִים֙שָׁ֣אֲלוּ
diff --git a/sources/tanach/WLC/Books/Leviticus.xml b/opensiddur-sources/sources/tanach/WLC/Books/Leviticus.xml
similarity index 99%
rename from sources/tanach/WLC/Books/Leviticus.xml
rename to opensiddur-sources/sources/tanach/WLC/Books/Leviticus.xml
index 2b792944..a5e21f62 100644
--- a/sources/tanach/WLC/Books/Leviticus.xml
+++ b/opensiddur-sources/sources/tanach/WLC/Books/Leviticus.xml
@@ -30,11 +30,11 @@
Unicode/XML Westminster Leningrad Codex
- 4.16
- 30 Apr 2012
+ 4.18
+ 13 Jun 2013
- Transcribed by WLC2XML of 6 Jun 2010 at 05 Jun 2012 @ 21:41.43. Build number: 23.0.
+ Transcribed by WLC2XML of 6 Jun 2010 at 25 Jun 2013 @ 20:24.20. Build number: 24.0. 428,108 bytes
@@ -53,7 +53,7 @@
Freely available
- from the electronic version of the Leningrad Codex maintained by the J. Alan Groves Center for Advanced Biblical Research.
+ From the electronic version of the Leningrad Codex maintained by the J. Alan Groves Center for Advanced Biblical Research.This text began as an electronic transcription by Richard Whitaker (Princeton Seminary, New Jersey) and H. van Parunak (then at the University of Michigan, Ann Arbor) of the 1983 printed edition of Biblia Hebraica Stuttgartensia (BHS). It was continued with the cooperation of Robert Kraft (University of Pennsylvania) and Emmanuel Tov (Hebrew University, Jerusalem), and completed by Alan Groves (Westminster Theological Seminary). The transcription was called the Michigan-Claremont-Westminster electronic Hebrew Bible and was archived at the Oxford Text Archive (OTA) in 1987. It has been variously known as the "CCAT" or "eBHS" text. Since that time, the text has been modified in many hundreds of places to conform to the photo-facsimile of the Leningrad Codex, Firkovich B19A, residing at the Russian National Library, St. Petersberg; hence the change of name.The J. Alan Groves Center for Advanced Biblical Research has continued to scrutinize and correct this electronic text as a part of its continuing work of building morphology and syntax databases of the Hebrew Bible, since correct linguistic analysis requires an accurate text.Vocalized ketib variants are no longer included as they are not part of the original manuscript.
@@ -129,13 +129,13 @@
- Input text file wlc416_ps.txt provided by the J. Alan Groves Center for Advanced
-Biblical Research. The file has the MD5 hash: a941 88e1 3fc3 0b18 8bb4 9ac8 c24f 2946
-and was received on 30 Apr 2012. The WLC text file has been modified by the
+ Input text file wlc418_ps.txt provided by the J. Alan Groves Center for Advanced
+Biblical Research. The file has the MD5 hash: 79fa 8f5a 9957 a0a0 3212 e51e b4c9 fc33
+and was received on 13 Jun 2013. The WLC text file has been modified by the
transcriber to move transcription notes closer to the relevant character in
-exactly six (6) places. The modified file, wlc_4.16_ps_td.txt, has the following
-SHA-1 hash: 79C7 003E 75C9 40B1 DDDE A885 A3A0 06B3 4C48 7140 .
- 05 Jun 2012
+exactly six (6) places. The modified file, wlc_4.18_ps_td.txt, has the following
+SHA-1 hash: 036E 5248 D7E9 522D D62C 1466 C019 8347 A693 60D9 .
+ 25 Jun 2013Hebrew
diff --git a/sources/tanach/WLC/Books/Malachi.xml b/opensiddur-sources/sources/tanach/WLC/Books/Malachi.xml
similarity index 98%
rename from sources/tanach/WLC/Books/Malachi.xml
rename to opensiddur-sources/sources/tanach/WLC/Books/Malachi.xml
index 87f52b09..46be7803 100644
--- a/sources/tanach/WLC/Books/Malachi.xml
+++ b/opensiddur-sources/sources/tanach/WLC/Books/Malachi.xml
@@ -30,14 +30,14 @@
Unicode/XML Westminster Leningrad Codex
- 4.16
- 30 Apr 2012
+ 4.18
+ 13 Jun 2013
- Transcribed by WLC2XML of 6 Jun 2010 at 05 Jun 2012 @ 21:41.44. Build number: 23.0.
+ Transcribed by WLC2XML of 6 Jun 2010 at 25 Jun 2013 @ 20:24.21. Build number: 24.0.
- 41,853 bytes
+ 41,861 bytesTranscription permitted:
Kirk Lowery
@@ -53,7 +53,7 @@
Freely available
- from the electronic version of the Leningrad Codex maintained by the J. Alan Groves Center for Advanced Biblical Research.
+ From the electronic version of the Leningrad Codex maintained by the J. Alan Groves Center for Advanced Biblical Research.This text began as an electronic transcription by Richard Whitaker (Princeton Seminary, New Jersey) and H. van Parunak (then at the University of Michigan, Ann Arbor) of the 1983 printed edition of Biblia Hebraica Stuttgartensia (BHS). It was continued with the cooperation of Robert Kraft (University of Pennsylvania) and Emmanuel Tov (Hebrew University, Jerusalem), and completed by Alan Groves (Westminster Theological Seminary). The transcription was called the Michigan-Claremont-Westminster electronic Hebrew Bible and was archived at the Oxford Text Archive (OTA) in 1987. It has been variously known as the "CCAT" or "eBHS" text. Since that time, the text has been modified in many hundreds of places to conform to the photo-facsimile of the Leningrad Codex, Firkovich B19A, residing at the Russian National Library, St. Petersberg; hence the change of name.The J. Alan Groves Center for Advanced Biblical Research has continued to scrutinize and correct this electronic text as a part of its continuing work of building morphology and syntax databases of the Hebrew Bible, since correct linguistic analysis requires an accurate text.Vocalized ketib variants are no longer included as they are not part of the original manuscript.
@@ -129,13 +129,13 @@
- Input text file wlc416_ps.txt provided by the J. Alan Groves Center for Advanced
-Biblical Research. The file has the MD5 hash: a941 88e1 3fc3 0b18 8bb4 9ac8 c24f 2946
-and was received on 30 Apr 2012. The WLC text file has been modified by the
+ Input text file wlc418_ps.txt provided by the J. Alan Groves Center for Advanced
+Biblical Research. The file has the MD5 hash: 79fa 8f5a 9957 a0a0 3212 e51e b4c9 fc33
+and was received on 13 Jun 2013. The WLC text file has been modified by the
transcriber to move transcription notes closer to the relevant character in
-exactly six (6) places. The modified file, wlc_4.16_ps_td.txt, has the following
-SHA-1 hash: 79C7 003E 75C9 40B1 DDDE A885 A3A0 06B3 4C48 7140 .
- 05 Jun 2012
+exactly six (6) places. The modified file, wlc_4.18_ps_td.txt, has the following
+SHA-1 hash: 036E 5248 D7E9 522D D62C 1466 C019 8347 A693 60D9 .
+ 25 Jun 2013Hebrew
@@ -290,7 +290,7 @@ SHA-1 hash: 79C7 003E 75C9 40B1 DDDE A885 A3A0 06B3 4C48 7140 .
הַקְרִיבֵ֨/הוּנָ֜אלְ/פֶחָתֶ֗/ךָ
- הֲ/יִּרְצְ/ךָ֙Qp
+ הֲ/יִּרְצְ/ךָ֙Qnpא֚וֹהֲ/יִשָּׂ֣אפָנֶ֔י/ךָ
diff --git a/sources/tanach/WLC/Books/Micah.xml b/opensiddur-sources/sources/tanach/WLC/Books/Micah.xml
similarity index 98%
rename from sources/tanach/WLC/Books/Micah.xml
rename to opensiddur-sources/sources/tanach/WLC/Books/Micah.xml
index 58c38e93..f91d1cbf 100644
--- a/sources/tanach/WLC/Books/Micah.xml
+++ b/opensiddur-sources/sources/tanach/WLC/Books/Micah.xml
@@ -30,14 +30,14 @@
Unicode/XML Westminster Leningrad Codex
- 4.16
- 30 Apr 2012
+ 4.18
+ 13 Jun 2013
- Transcribed by WLC2XML of 6 Jun 2010 at 05 Jun 2012 @ 21:41.44. Build number: 23.0.
+ Transcribed by WLC2XML of 6 Jun 2010 at 25 Jun 2013 @ 20:24.21. Build number: 24.0.
- 61,330 bytes
+ 61,354 bytesTranscription permitted:
Kirk Lowery
@@ -53,7 +53,7 @@
Freely available
- from the electronic version of the Leningrad Codex maintained by the J. Alan Groves Center for Advanced Biblical Research.
+ From the electronic version of the Leningrad Codex maintained by the J. Alan Groves Center for Advanced Biblical Research.This text began as an electronic transcription by Richard Whitaker (Princeton Seminary, New Jersey) and H. van Parunak (then at the University of Michigan, Ann Arbor) of the 1983 printed edition of Biblia Hebraica Stuttgartensia (BHS). It was continued with the cooperation of Robert Kraft (University of Pennsylvania) and Emmanuel Tov (Hebrew University, Jerusalem), and completed by Alan Groves (Westminster Theological Seminary). The transcription was called the Michigan-Claremont-Westminster electronic Hebrew Bible and was archived at the Oxford Text Archive (OTA) in 1987. It has been variously known as the "CCAT" or "eBHS" text. Since that time, the text has been modified in many hundreds of places to conform to the photo-facsimile of the Leningrad Codex, Firkovich B19A, residing at the Russian National Library, St. Petersberg; hence the change of name.The J. Alan Groves Center for Advanced Biblical Research has continued to scrutinize and correct this electronic text as a part of its continuing work of building morphology and syntax databases of the Hebrew Bible, since correct linguistic analysis requires an accurate text.Vocalized ketib variants are no longer included as they are not part of the original manuscript.
@@ -129,13 +129,13 @@
- Input text file wlc416_ps.txt provided by the J. Alan Groves Center for Advanced
-Biblical Research. The file has the MD5 hash: a941 88e1 3fc3 0b18 8bb4 9ac8 c24f 2946
-and was received on 30 Apr 2012. The WLC text file has been modified by the
+ Input text file wlc418_ps.txt provided by the J. Alan Groves Center for Advanced
+Biblical Research. The file has the MD5 hash: 79fa 8f5a 9957 a0a0 3212 e51e b4c9 fc33
+and was received on 13 Jun 2013. The WLC text file has been modified by the
transcriber to move transcription notes closer to the relevant character in
-exactly six (6) places. The modified file, wlc_4.16_ps_td.txt, has the following
-SHA-1 hash: 79C7 003E 75C9 40B1 DDDE A885 A3A0 06B3 4C48 7140 .
- 05 Jun 2012
+exactly six (6) places. The modified file, wlc_4.18_ps_td.txt, has the following
+SHA-1 hash: 036E 5248 D7E9 522D D62C 1466 C019 8347 A693 60D9 .
+ 25 Jun 2013Hebrew
@@ -381,7 +381,7 @@ SHA-1 hash: 79C7 003E 75C9 40B1 DDDE A885 A3A0 06B3 4C48 7140 .
יוֹשֶׁ֖בֶתמָֽרֵשָׁ֑העַד־
- עֲדֻּלָּ֥םQp
+ עֲדֻּלָּ֥םQnpיָב֖וֹאכְּב֥וֹדיִשְׂרָאֵֽל׃
@@ -1187,7 +1187,7 @@ SHA-1 hash: 79C7 003E 75C9 40B1 DDDE A885 A3A0 06B3 4C48 7140 .
בְּ/בַהֲמ֣וֹתיַ֔עַרכִּ/כְפִ֖יר
- בְּ/עֶדְרֵיQp
+ בְּ/עֶדְרֵיQnpצֹ֑אןאֲשֶׁ֧ראִם
@@ -1551,7 +1551,7 @@ SHA-1 hash: 79C7 003E 75C9 40B1 DDDE A885 A3A0 06B3 4C48 7140 .
הַ/שַּׂ֣רשֹׁאֵ֔לוְ/הַ/שֹּׁפֵ֖ט
- בַּ/שִׁלּ֑וּםQp
+ בַּ/שִׁלּ֑וּםQnpוְ/הַ/גָּד֗וֹלדֹּבֵ֨רהַוַּ֥ת
diff --git a/sources/tanach/WLC/Books/Nahum.xml b/opensiddur-sources/sources/tanach/WLC/Books/Nahum.xml
similarity index 98%
rename from sources/tanach/WLC/Books/Nahum.xml
rename to opensiddur-sources/sources/tanach/WLC/Books/Nahum.xml
index a1dad2ba..20bb4c85 100644
--- a/sources/tanach/WLC/Books/Nahum.xml
+++ b/opensiddur-sources/sources/tanach/WLC/Books/Nahum.xml
@@ -30,11 +30,11 @@
Unicode/XML Westminster Leningrad Codex
- 4.16
- 30 Apr 2012
+ 4.18
+ 13 Jun 2013
- Transcribed by WLC2XML of 6 Jun 2010 at 05 Jun 2012 @ 21:41.44. Build number: 23.0.
+ Transcribed by WLC2XML of 6 Jun 2010 at 25 Jun 2013 @ 20:24.21. Build number: 24.0. 31,556 bytes
@@ -53,7 +53,7 @@
Freely available
- from the electronic version of the Leningrad Codex maintained by the J. Alan Groves Center for Advanced Biblical Research.
+ From the electronic version of the Leningrad Codex maintained by the J. Alan Groves Center for Advanced Biblical Research.This text began as an electronic transcription by Richard Whitaker (Princeton Seminary, New Jersey) and H. van Parunak (then at the University of Michigan, Ann Arbor) of the 1983 printed edition of Biblia Hebraica Stuttgartensia (BHS). It was continued with the cooperation of Robert Kraft (University of Pennsylvania) and Emmanuel Tov (Hebrew University, Jerusalem), and completed by Alan Groves (Westminster Theological Seminary). The transcription was called the Michigan-Claremont-Westminster electronic Hebrew Bible and was archived at the Oxford Text Archive (OTA) in 1987. It has been variously known as the "CCAT" or "eBHS" text. Since that time, the text has been modified in many hundreds of places to conform to the photo-facsimile of the Leningrad Codex, Firkovich B19A, residing at the Russian National Library, St. Petersberg; hence the change of name.The J. Alan Groves Center for Advanced Biblical Research has continued to scrutinize and correct this electronic text as a part of its continuing work of building morphology and syntax databases of the Hebrew Bible, since correct linguistic analysis requires an accurate text.Vocalized ketib variants are no longer included as they are not part of the original manuscript.
@@ -129,13 +129,13 @@
- Input text file wlc416_ps.txt provided by the J. Alan Groves Center for Advanced
-Biblical Research. The file has the MD5 hash: a941 88e1 3fc3 0b18 8bb4 9ac8 c24f 2946
-and was received on 30 Apr 2012. The WLC text file has been modified by the
+ Input text file wlc418_ps.txt provided by the J. Alan Groves Center for Advanced
+Biblical Research. The file has the MD5 hash: 79fa 8f5a 9957 a0a0 3212 e51e b4c9 fc33
+and was received on 13 Jun 2013. The WLC text file has been modified by the
transcriber to move transcription notes closer to the relevant character in
-exactly six (6) places. The modified file, wlc_4.16_ps_td.txt, has the following
-SHA-1 hash: 79C7 003E 75C9 40B1 DDDE A885 A3A0 06B3 4C48 7140 .
- 05 Jun 2012
+exactly six (6) places. The modified file, wlc_4.18_ps_td.txt, has the following
+SHA-1 hash: 036E 5248 D7E9 522D D62C 1466 C019 8347 A693 60D9 .
+ 25 Jun 2013Hebrew
diff --git a/sources/tanach/WLC/Books/Nehemiah.xml b/opensiddur-sources/sources/tanach/WLC/Books/Nehemiah.xml
similarity index 99%
rename from sources/tanach/WLC/Books/Nehemiah.xml
rename to opensiddur-sources/sources/tanach/WLC/Books/Nehemiah.xml
index 1af894b2..bc778a1d 100644
--- a/sources/tanach/WLC/Books/Nehemiah.xml
+++ b/opensiddur-sources/sources/tanach/WLC/Books/Nehemiah.xml
@@ -30,11 +30,11 @@
Unicode/XML Westminster Leningrad Codex
- 4.16
- 30 Apr 2012
+ 4.18
+ 13 Jun 2013
- Transcribed by WLC2XML of 6 Jun 2010 at 05 Jun 2012 @ 21:41.45. Build number: 23.0.
+ Transcribed by WLC2XML of 6 Jun 2010 at 25 Jun 2013 @ 20:24.22. Build number: 24.0. 208,822 bytes
@@ -53,7 +53,7 @@
Freely available
- from the electronic version of the Leningrad Codex maintained by the J. Alan Groves Center for Advanced Biblical Research.
+ From the electronic version of the Leningrad Codex maintained by the J. Alan Groves Center for Advanced Biblical Research.This text began as an electronic transcription by Richard Whitaker (Princeton Seminary, New Jersey) and H. van Parunak (then at the University of Michigan, Ann Arbor) of the 1983 printed edition of Biblia Hebraica Stuttgartensia (BHS). It was continued with the cooperation of Robert Kraft (University of Pennsylvania) and Emmanuel Tov (Hebrew University, Jerusalem), and completed by Alan Groves (Westminster Theological Seminary). The transcription was called the Michigan-Claremont-Westminster electronic Hebrew Bible and was archived at the Oxford Text Archive (OTA) in 1987. It has been variously known as the "CCAT" or "eBHS" text. Since that time, the text has been modified in many hundreds of places to conform to the photo-facsimile of the Leningrad Codex, Firkovich B19A, residing at the Russian National Library, St. Petersberg; hence the change of name.The J. Alan Groves Center for Advanced Biblical Research has continued to scrutinize and correct this electronic text as a part of its continuing work of building morphology and syntax databases of the Hebrew Bible, since correct linguistic analysis requires an accurate text.Vocalized ketib variants are no longer included as they are not part of the original manuscript.
@@ -129,13 +129,13 @@
- Input text file wlc416_ps.txt provided by the J. Alan Groves Center for Advanced
-Biblical Research. The file has the MD5 hash: a941 88e1 3fc3 0b18 8bb4 9ac8 c24f 2946
-and was received on 30 Apr 2012. The WLC text file has been modified by the
+ Input text file wlc418_ps.txt provided by the J. Alan Groves Center for Advanced
+Biblical Research. The file has the MD5 hash: 79fa 8f5a 9957 a0a0 3212 e51e b4c9 fc33
+and was received on 13 Jun 2013. The WLC text file has been modified by the
transcriber to move transcription notes closer to the relevant character in
-exactly six (6) places. The modified file, wlc_4.16_ps_td.txt, has the following
-SHA-1 hash: 79C7 003E 75C9 40B1 DDDE A885 A3A0 06B3 4C48 7140 .
- 05 Jun 2012
+exactly six (6) places. The modified file, wlc_4.18_ps_td.txt, has the following
+SHA-1 hash: 036E 5248 D7E9 522D D62C 1466 C019 8347 A693 60D9 .
+ 25 Jun 2013Hebrew
diff --git a/sources/tanach/WLC/Books/Numbers.xml b/opensiddur-sources/sources/tanach/WLC/Books/Numbers.xml
similarity index 99%
rename from sources/tanach/WLC/Books/Numbers.xml
rename to opensiddur-sources/sources/tanach/WLC/Books/Numbers.xml
index 21dcaca4..e45016bd 100644
--- a/sources/tanach/WLC/Books/Numbers.xml
+++ b/opensiddur-sources/sources/tanach/WLC/Books/Numbers.xml
@@ -30,11 +30,11 @@
Unicode/XML Westminster Leningrad Codex
- 4.16
- 30 Apr 2012
+ 4.18
+ 13 Jun 2013
- Transcribed by WLC2XML of 6 Jun 2010 at 05 Jun 2012 @ 21:41.43. Build number: 23.0.
+ Transcribed by WLC2XML of 6 Jun 2010 at 25 Jun 2013 @ 20:24.20. Build number: 24.0. 595,538 bytes
@@ -53,7 +53,7 @@
Freely available
- from the electronic version of the Leningrad Codex maintained by the J. Alan Groves Center for Advanced Biblical Research.
+ From the electronic version of the Leningrad Codex maintained by the J. Alan Groves Center for Advanced Biblical Research.This text began as an electronic transcription by Richard Whitaker (Princeton Seminary, New Jersey) and H. van Parunak (then at the University of Michigan, Ann Arbor) of the 1983 printed edition of Biblia Hebraica Stuttgartensia (BHS). It was continued with the cooperation of Robert Kraft (University of Pennsylvania) and Emmanuel Tov (Hebrew University, Jerusalem), and completed by Alan Groves (Westminster Theological Seminary). The transcription was called the Michigan-Claremont-Westminster electronic Hebrew Bible and was archived at the Oxford Text Archive (OTA) in 1987. It has been variously known as the "CCAT" or "eBHS" text. Since that time, the text has been modified in many hundreds of places to conform to the photo-facsimile of the Leningrad Codex, Firkovich B19A, residing at the Russian National Library, St. Petersberg; hence the change of name.The J. Alan Groves Center for Advanced Biblical Research has continued to scrutinize and correct this electronic text as a part of its continuing work of building morphology and syntax databases of the Hebrew Bible, since correct linguistic analysis requires an accurate text.Vocalized ketib variants are no longer included as they are not part of the original manuscript.
@@ -129,13 +129,13 @@
- Input text file wlc416_ps.txt provided by the J. Alan Groves Center for Advanced
-Biblical Research. The file has the MD5 hash: a941 88e1 3fc3 0b18 8bb4 9ac8 c24f 2946
-and was received on 30 Apr 2012. The WLC text file has been modified by the
+ Input text file wlc418_ps.txt provided by the J. Alan Groves Center for Advanced
+Biblical Research. The file has the MD5 hash: 79fa 8f5a 9957 a0a0 3212 e51e b4c9 fc33
+and was received on 13 Jun 2013. The WLC text file has been modified by the
transcriber to move transcription notes closer to the relevant character in
-exactly six (6) places. The modified file, wlc_4.16_ps_td.txt, has the following
-SHA-1 hash: 79C7 003E 75C9 40B1 DDDE A885 A3A0 06B3 4C48 7140 .
- 05 Jun 2012
+exactly six (6) places. The modified file, wlc_4.18_ps_td.txt, has the following
+SHA-1 hash: 036E 5248 D7E9 522D D62C 1466 C019 8347 A693 60D9 .
+ 25 Jun 2013Hebrew
@@ -4532,8 +4532,8 @@ SHA-1 hash: 79C7 003E 75C9 40B1 DDDE A885 A3A0 06B3 4C48 7140 .
קָרְבַּ֥ןגַּמְלִיאֵ֖לבֶּן־
- פְּדָה
- צֽוּר׃p
+ פְּדָהp
+ צֽוּר׃
diff --git a/sources/tanach/WLC/Books/Obadiah.xml b/opensiddur-sources/sources/tanach/WLC/Books/Obadiah.xml
similarity index 96%
rename from sources/tanach/WLC/Books/Obadiah.xml
rename to opensiddur-sources/sources/tanach/WLC/Books/Obadiah.xml
index 69582481..e4f64535 100644
--- a/sources/tanach/WLC/Books/Obadiah.xml
+++ b/opensiddur-sources/sources/tanach/WLC/Books/Obadiah.xml
@@ -30,14 +30,14 @@
Unicode/XML Westminster Leningrad Codex
- 4.16
- 30 Apr 2012
+ 4.18
+ 13 Jun 2013
- Transcribed by WLC2XML of 6 Jun 2010 at 05 Jun 2012 @ 21:41.44. Build number: 23.0.
+ Transcribed by WLC2XML of 6 Jun 2010 at 25 Jun 2013 @ 20:24.21. Build number: 24.0.
- 21,438 bytes
+ 21,446 bytesTranscription permitted:
Kirk Lowery
@@ -53,7 +53,7 @@
Freely available
- from the electronic version of the Leningrad Codex maintained by the J. Alan Groves Center for Advanced Biblical Research.
+ From the electronic version of the Leningrad Codex maintained by the J. Alan Groves Center for Advanced Biblical Research.This text began as an electronic transcription by Richard Whitaker (Princeton Seminary, New Jersey) and H. van Parunak (then at the University of Michigan, Ann Arbor) of the 1983 printed edition of Biblia Hebraica Stuttgartensia (BHS). It was continued with the cooperation of Robert Kraft (University of Pennsylvania) and Emmanuel Tov (Hebrew University, Jerusalem), and completed by Alan Groves (Westminster Theological Seminary). The transcription was called the Michigan-Claremont-Westminster electronic Hebrew Bible and was archived at the Oxford Text Archive (OTA) in 1987. It has been variously known as the "CCAT" or "eBHS" text. Since that time, the text has been modified in many hundreds of places to conform to the photo-facsimile of the Leningrad Codex, Firkovich B19A, residing at the Russian National Library, St. Petersberg; hence the change of name.The J. Alan Groves Center for Advanced Biblical Research has continued to scrutinize and correct this electronic text as a part of its continuing work of building morphology and syntax databases of the Hebrew Bible, since correct linguistic analysis requires an accurate text.Vocalized ketib variants are no longer included as they are not part of the original manuscript.
@@ -129,13 +129,13 @@
- Input text file wlc416_ps.txt provided by the J. Alan Groves Center for Advanced
-Biblical Research. The file has the MD5 hash: a941 88e1 3fc3 0b18 8bb4 9ac8 c24f 2946
-and was received on 30 Apr 2012. The WLC text file has been modified by the
+ Input text file wlc418_ps.txt provided by the J. Alan Groves Center for Advanced
+Biblical Research. The file has the MD5 hash: 79fa 8f5a 9957 a0a0 3212 e51e b4c9 fc33
+and was received on 13 Jun 2013. The WLC text file has been modified by the
transcriber to move transcription notes closer to the relevant character in
-exactly six (6) places. The modified file, wlc_4.16_ps_td.txt, has the following
-SHA-1 hash: 79C7 003E 75C9 40B1 DDDE A885 A3A0 06B3 4C48 7140 .
- 05 Jun 2012
+exactly six (6) places. The modified file, wlc_4.18_ps_td.txt, has the following
+SHA-1 hash: 036E 5248 D7E9 522D D62C 1466 C019 8347 A693 60D9 .
+ 25 Jun 2013Hebrew
@@ -169,7 +169,7 @@ SHA-1 hash: 79C7 003E 75C9 40B1 DDDE A885 A3A0 06B3 4C48 7140 .
שֻׁלָּ֔חק֛וּמוּוְ/נָק֥וּמָה
- עָלֶי/הָQc
+ עָלֶי/הָQcnלַ/מִּלְחָמָֽה׃
diff --git a/sources/tanach/WLC/Books/Proverbs.xml b/opensiddur-sources/sources/tanach/WLC/Books/Proverbs.xml
similarity index 99%
rename from sources/tanach/WLC/Books/Proverbs.xml
rename to opensiddur-sources/sources/tanach/WLC/Books/Proverbs.xml
index 69f6d725..88fbcade 100644
--- a/sources/tanach/WLC/Books/Proverbs.xml
+++ b/opensiddur-sources/sources/tanach/WLC/Books/Proverbs.xml
@@ -30,14 +30,14 @@
Unicode/XML Westminster Leningrad Codex
- 4.16
- 30 Apr 2012
+ 4.18
+ 13 Jun 2013
- Transcribed by WLC2XML of 6 Jun 2010 at 05 Jun 2012 @ 21:41.45. Build number: 23.0.
+ Transcribed by WLC2XML of 6 Jun 2010 at 25 Jun 2013 @ 20:24.22. Build number: 24.0.
- 268,779 bytes
+ 268,819 bytesTranscription permitted:
Kirk Lowery
@@ -53,7 +53,7 @@
Freely available
- from the electronic version of the Leningrad Codex maintained by the J. Alan Groves Center for Advanced Biblical Research.
+ From the electronic version of the Leningrad Codex maintained by the J. Alan Groves Center for Advanced Biblical Research.This text began as an electronic transcription by Richard Whitaker (Princeton Seminary, New Jersey) and H. van Parunak (then at the University of Michigan, Ann Arbor) of the 1983 printed edition of Biblia Hebraica Stuttgartensia (BHS). It was continued with the cooperation of Robert Kraft (University of Pennsylvania) and Emmanuel Tov (Hebrew University, Jerusalem), and completed by Alan Groves (Westminster Theological Seminary). The transcription was called the Michigan-Claremont-Westminster electronic Hebrew Bible and was archived at the Oxford Text Archive (OTA) in 1987. It has been variously known as the "CCAT" or "eBHS" text. Since that time, the text has been modified in many hundreds of places to conform to the photo-facsimile of the Leningrad Codex, Firkovich B19A, residing at the Russian National Library, St. Petersberg; hence the change of name.The J. Alan Groves Center for Advanced Biblical Research has continued to scrutinize and correct this electronic text as a part of its continuing work of building morphology and syntax databases of the Hebrew Bible, since correct linguistic analysis requires an accurate text.Vocalized ketib variants are no longer included as they are not part of the original manuscript.
@@ -129,13 +129,13 @@
- Input text file wlc416_ps.txt provided by the J. Alan Groves Center for Advanced
-Biblical Research. The file has the MD5 hash: a941 88e1 3fc3 0b18 8bb4 9ac8 c24f 2946
-and was received on 30 Apr 2012. The WLC text file has been modified by the
+ Input text file wlc418_ps.txt provided by the J. Alan Groves Center for Advanced
+Biblical Research. The file has the MD5 hash: 79fa 8f5a 9957 a0a0 3212 e51e b4c9 fc33
+and was received on 13 Jun 2013. The WLC text file has been modified by the
transcriber to move transcription notes closer to the relevant character in
-exactly six (6) places. The modified file, wlc_4.16_ps_td.txt, has the following
-SHA-1 hash: 79C7 003E 75C9 40B1 DDDE A885 A3A0 06B3 4C48 7140 .
- 05 Jun 2012
+exactly six (6) places. The modified file, wlc_4.18_ps_td.txt, has the following
+SHA-1 hash: 036E 5248 D7E9 522D D62C 1466 C019 8347 A693 60D9 .
+ 25 Jun 2013Hebrew
@@ -637,7 +637,7 @@ SHA-1 hash: 79C7 003E 75C9 40B1 DDDE A885 A3A0 06B3 4C48 7140 .
כִּֽי־יְשָׁרִ֥ים
- יִשְׁכְּנוּQp
+ יִשְׁכְּנוּQnpאָ֑רֶץוּ֝/תְמִימִ֗יםיִוָּ֥תְרוּ
@@ -3385,7 +3385,7 @@ SHA-1 hash: 79C7 003E 75C9 40B1 DDDE A885 A3A0 06B3 4C48 7140 .
יַד־חָרוּצִ֥יםתִּמְשׁ֑וֹל
- ו֝/רְמִיָּ֗הQp
+ ו֝/רְמִיָּ֗הQnpתִּהְיֶ֥הלָ/מַֽס׃
@@ -4194,7 +4194,7 @@ SHA-1 hash: 79C7 003E 75C9 40B1 DDDE A885 A3A0 06B3 4C48 7140 .
וְ/אִ֥ישׁתְּ֝בוּנָ֗היְיַשֶׁר־
- לָֽכֶת׃Qp
+ לָֽכֶת׃Qnpהָפֵ֣ר
@@ -6842,7 +6842,7 @@ SHA-1 hash: 79C7 003E 75C9 40B1 DDDE A885 A3A0 06B3 4C48 7140 .
צַדִּ֑יקאַֽל־תְּשַׁדֵּ֥ד
- רִבְצ/וֹ׃Qp
+ רִבְצ/וֹ׃Qcnכִּ֤י
@@ -8057,7 +8057,7 @@ SHA-1 hash: 79C7 003E 75C9 40B1 DDDE A885 A3A0 06B3 4C48 7140 .
אָ֭דָםעָשֻׁ֣קבְּ/דַם־
- נָפֶשׁQc
+ נָפֶשׁQcnעַד־בּ֥וֹריָ֝נ֗וּס
diff --git a/sources/tanach/WLC/Books/Psalms.xml b/opensiddur-sources/sources/tanach/WLC/Books/Psalms.xml
similarity index 99%
rename from sources/tanach/WLC/Books/Psalms.xml
rename to opensiddur-sources/sources/tanach/WLC/Books/Psalms.xml
index cc830eb7..8f252d98 100644
--- a/sources/tanach/WLC/Books/Psalms.xml
+++ b/opensiddur-sources/sources/tanach/WLC/Books/Psalms.xml
@@ -30,11 +30,11 @@
Unicode/XML Westminster Leningrad Codex
- 4.16
- 30 Apr 2012
+ 4.18
+ 13 Jun 2013
- Transcribed by WLC2XML of 6 Jun 2010 at 05 Jun 2012 @ 21:41.44. Build number: 23.0.
+ Transcribed by WLC2XML of 6 Jun 2010 at 25 Jun 2013 @ 20:24.22. Build number: 24.0. 754,378 bytes
@@ -53,7 +53,7 @@
Freely available
- from the electronic version of the Leningrad Codex maintained by the J. Alan Groves Center for Advanced Biblical Research.
+ From the electronic version of the Leningrad Codex maintained by the J. Alan Groves Center for Advanced Biblical Research.This text began as an electronic transcription by Richard Whitaker (Princeton Seminary, New Jersey) and H. van Parunak (then at the University of Michigan, Ann Arbor) of the 1983 printed edition of Biblia Hebraica Stuttgartensia (BHS). It was continued with the cooperation of Robert Kraft (University of Pennsylvania) and Emmanuel Tov (Hebrew University, Jerusalem), and completed by Alan Groves (Westminster Theological Seminary). The transcription was called the Michigan-Claremont-Westminster electronic Hebrew Bible and was archived at the Oxford Text Archive (OTA) in 1987. It has been variously known as the "CCAT" or "eBHS" text. Since that time, the text has been modified in many hundreds of places to conform to the photo-facsimile of the Leningrad Codex, Firkovich B19A, residing at the Russian National Library, St. Petersberg; hence the change of name.The J. Alan Groves Center for Advanced Biblical Research has continued to scrutinize and correct this electronic text as a part of its continuing work of building morphology and syntax databases of the Hebrew Bible, since correct linguistic analysis requires an accurate text.Vocalized ketib variants are no longer included as they are not part of the original manuscript.
@@ -129,13 +129,13 @@
- Input text file wlc416_ps.txt provided by the J. Alan Groves Center for Advanced
-Biblical Research. The file has the MD5 hash: a941 88e1 3fc3 0b18 8bb4 9ac8 c24f 2946
-and was received on 30 Apr 2012. The WLC text file has been modified by the
+ Input text file wlc418_ps.txt provided by the J. Alan Groves Center for Advanced
+Biblical Research. The file has the MD5 hash: 79fa 8f5a 9957 a0a0 3212 e51e b4c9 fc33
+and was received on 13 Jun 2013. The WLC text file has been modified by the
transcriber to move transcription notes closer to the relevant character in
-exactly six (6) places. The modified file, wlc_4.16_ps_td.txt, has the following
-SHA-1 hash: 79C7 003E 75C9 40B1 DDDE A885 A3A0 06B3 4C48 7140 .
- 05 Jun 2012
+exactly six (6) places. The modified file, wlc_4.18_ps_td.txt, has the following
+SHA-1 hash: 036E 5248 D7E9 522D D62C 1466 C019 8347 A693 60D9 .
+ 25 Jun 2013Hebrew
diff --git a/sources/tanach/WLC/Books/Ruth.xml b/opensiddur-sources/sources/tanach/WLC/Books/Ruth.xml
similarity index 98%
rename from sources/tanach/WLC/Books/Ruth.xml
rename to opensiddur-sources/sources/tanach/WLC/Books/Ruth.xml
index 3f619aa4..338ece2b 100644
--- a/sources/tanach/WLC/Books/Ruth.xml
+++ b/opensiddur-sources/sources/tanach/WLC/Books/Ruth.xml
@@ -30,14 +30,14 @@
Unicode/XML Westminster Leningrad Codex
- 4.16
- 30 Apr 2012
+ 4.18
+ 13 Jun 2013
- Transcribed by WLC2XML of 6 Jun 2010 at 05 Jun 2012 @ 21:41.45. Build number: 23.0.
+ Transcribed by WLC2XML of 6 Jun 2010 at 25 Jun 2013 @ 20:24.22. Build number: 24.0.
- 56,981 bytes
+ 57,021 bytesTranscription permitted:
Kirk Lowery
@@ -53,7 +53,7 @@
Freely available
- from the electronic version of the Leningrad Codex maintained by the J. Alan Groves Center for Advanced Biblical Research.
+ From the electronic version of the Leningrad Codex maintained by the J. Alan Groves Center for Advanced Biblical Research.This text began as an electronic transcription by Richard Whitaker (Princeton Seminary, New Jersey) and H. van Parunak (then at the University of Michigan, Ann Arbor) of the 1983 printed edition of Biblia Hebraica Stuttgartensia (BHS). It was continued with the cooperation of Robert Kraft (University of Pennsylvania) and Emmanuel Tov (Hebrew University, Jerusalem), and completed by Alan Groves (Westminster Theological Seminary). The transcription was called the Michigan-Claremont-Westminster electronic Hebrew Bible and was archived at the Oxford Text Archive (OTA) in 1987. It has been variously known as the "CCAT" or "eBHS" text. Since that time, the text has been modified in many hundreds of places to conform to the photo-facsimile of the Leningrad Codex, Firkovich B19A, residing at the Russian National Library, St. Petersberg; hence the change of name.The J. Alan Groves Center for Advanced Biblical Research has continued to scrutinize and correct this electronic text as a part of its continuing work of building morphology and syntax databases of the Hebrew Bible, since correct linguistic analysis requires an accurate text.Vocalized ketib variants are no longer included as they are not part of the original manuscript.
@@ -129,13 +129,13 @@
- Input text file wlc416_ps.txt provided by the J. Alan Groves Center for Advanced
-Biblical Research. The file has the MD5 hash: a941 88e1 3fc3 0b18 8bb4 9ac8 c24f 2946
-and was received on 30 Apr 2012. The WLC text file has been modified by the
+ Input text file wlc418_ps.txt provided by the J. Alan Groves Center for Advanced
+Biblical Research. The file has the MD5 hash: 79fa 8f5a 9957 a0a0 3212 e51e b4c9 fc33
+and was received on 13 Jun 2013. The WLC text file has been modified by the
transcriber to move transcription notes closer to the relevant character in
-exactly six (6) places. The modified file, wlc_4.16_ps_td.txt, has the following
-SHA-1 hash: 79C7 003E 75C9 40B1 DDDE A885 A3A0 06B3 4C48 7140 .
- 05 Jun 2012
+exactly six (6) places. The modified file, wlc_4.18_ps_td.txt, has the following
+SHA-1 hash: 036E 5248 D7E9 522D D62C 1466 C019 8347 A693 60D9 .
+ 25 Jun 2013Hebrew
@@ -547,8 +547,8 @@ SHA-1 hash: 79C7 003E 75C9 40B1 DDDE A885 A3A0 06B3 4C48 7140 .
אֵֽלְכָה־נָּ֤אהַ/שָּׂדֶה֙
- וַ/אֲלַקֳטָּ֣הQp
- בַ/שִׁבֳּלִ֔יםQp
+ וַ/אֲלַקֳטָּ֣הQnp
+ בַ/שִׁבֳּלִ֔יםQnpאַחַ֕ראֲשֶׁ֥ראֶמְצָא־
@@ -663,7 +663,7 @@ SHA-1 hash: 79C7 003E 75C9 40B1 DDDE A885 A3A0 06B3 4C48 7140 .
בַּ/שָּׂדֶ֤האֲשֶׁר־יִקְצֹרוּ/ן֙
- וְ/הָלַ֣כְתִּQv
+ וְ/הָלַ֣כְתִּQnvאַחֲרֵי/הֶ֔ןהֲ/ל֥וֹאצִוִּ֛יתִי
@@ -693,7 +693,7 @@ SHA-1 hash: 79C7 003E 75C9 40B1 DDDE A885 A3A0 06B3 4C48 7140 .
חֵ֤ןבְּ/עֵינֶ֙י/ךָ֙לְ/הַכִּירֵ֔/נִי
- וְ/אָּנֹכִ֖יQp
+ וְ/אָּנֹכִ֖יQnpנָכְרִיָּֽה׃
@@ -713,7 +713,7 @@ SHA-1 hash: 79C7 003E 75C9 40B1 DDDE A885 A3A0 06B3 4C48 7140 .
מ֣וֹתאִישֵׁ֑/ךְוַ/תַּֽעַזְבִ֞י
- אָּבִ֣י/ךְQp
+ אָּבִ֣י/ךְQnpוְ/אִמֵּ֗/ךְוְ/אֶ֙רֶץ֙מֽוֹלַדְתֵּ֔/ךְ
diff --git a/sources/tanach/WLC/Books/Samuel_1.xml b/opensiddur-sources/sources/tanach/WLC/Books/Samuel_1.xml
similarity index 99%
rename from sources/tanach/WLC/Books/Samuel_1.xml
rename to opensiddur-sources/sources/tanach/WLC/Books/Samuel_1.xml
index 39a05689..7e24b296 100644
--- a/sources/tanach/WLC/Books/Samuel_1.xml
+++ b/opensiddur-sources/sources/tanach/WLC/Books/Samuel_1.xml
@@ -30,11 +30,11 @@
Unicode/XML Westminster Leningrad Codex
- 4.16
- 30 Apr 2012
+ 4.18
+ 13 Jun 2013
- Transcribed by WLC2XML of 6 Jun 2010 at 05 Jun 2012 @ 21:41.43. Build number: 23.0.
+ Transcribed by WLC2XML of 6 Jun 2010 at 25 Jun 2013 @ 20:24.20. Build number: 24.0. 479,256 bytes
@@ -53,7 +53,7 @@
Freely available
- from the electronic version of the Leningrad Codex maintained by the J. Alan Groves Center for Advanced Biblical Research.
+ From the electronic version of the Leningrad Codex maintained by the J. Alan Groves Center for Advanced Biblical Research.This text began as an electronic transcription by Richard Whitaker (Princeton Seminary, New Jersey) and H. van Parunak (then at the University of Michigan, Ann Arbor) of the 1983 printed edition of Biblia Hebraica Stuttgartensia (BHS). It was continued with the cooperation of Robert Kraft (University of Pennsylvania) and Emmanuel Tov (Hebrew University, Jerusalem), and completed by Alan Groves (Westminster Theological Seminary). The transcription was called the Michigan-Claremont-Westminster electronic Hebrew Bible and was archived at the Oxford Text Archive (OTA) in 1987. It has been variously known as the "CCAT" or "eBHS" text. Since that time, the text has been modified in many hundreds of places to conform to the photo-facsimile of the Leningrad Codex, Firkovich B19A, residing at the Russian National Library, St. Petersberg; hence the change of name.The J. Alan Groves Center for Advanced Biblical Research has continued to scrutinize and correct this electronic text as a part of its continuing work of building morphology and syntax databases of the Hebrew Bible, since correct linguistic analysis requires an accurate text.Vocalized ketib variants are no longer included as they are not part of the original manuscript.
@@ -129,13 +129,13 @@
- Input text file wlc416_ps.txt provided by the J. Alan Groves Center for Advanced
-Biblical Research. The file has the MD5 hash: a941 88e1 3fc3 0b18 8bb4 9ac8 c24f 2946
-and was received on 30 Apr 2012. The WLC text file has been modified by the
+ Input text file wlc418_ps.txt provided by the J. Alan Groves Center for Advanced
+Biblical Research. The file has the MD5 hash: 79fa 8f5a 9957 a0a0 3212 e51e b4c9 fc33
+and was received on 13 Jun 2013. The WLC text file has been modified by the
transcriber to move transcription notes closer to the relevant character in
-exactly six (6) places. The modified file, wlc_4.16_ps_td.txt, has the following
-SHA-1 hash: 79C7 003E 75C9 40B1 DDDE A885 A3A0 06B3 4C48 7140 .
- 05 Jun 2012
+exactly six (6) places. The modified file, wlc_4.18_ps_td.txt, has the following
+SHA-1 hash: 036E 5248 D7E9 522D D62C 1466 C019 8347 A693 60D9 .
+ 25 Jun 2013Hebrew
diff --git a/sources/tanach/WLC/Books/Samuel_2.xml b/opensiddur-sources/sources/tanach/WLC/Books/Samuel_2.xml
similarity index 99%
rename from sources/tanach/WLC/Books/Samuel_2.xml
rename to opensiddur-sources/sources/tanach/WLC/Books/Samuel_2.xml
index 1c4762b5..92c35f68 100644
--- a/sources/tanach/WLC/Books/Samuel_2.xml
+++ b/opensiddur-sources/sources/tanach/WLC/Books/Samuel_2.xml
@@ -30,11 +30,11 @@
Unicode/XML Westminster Leningrad Codex
- 4.16
- 30 Apr 2012
+ 4.18
+ 13 Jun 2013
- Transcribed by WLC2XML of 6 Jun 2010 at 05 Jun 2012 @ 21:41.43. Build number: 23.0.
+ Transcribed by WLC2XML of 6 Jun 2010 at 25 Jun 2013 @ 20:24.20. Build number: 24.0. 400,373 bytes
@@ -53,7 +53,7 @@
Freely available
- from the electronic version of the Leningrad Codex maintained by the J. Alan Groves Center for Advanced Biblical Research.
+ From the electronic version of the Leningrad Codex maintained by the J. Alan Groves Center for Advanced Biblical Research.This text began as an electronic transcription by Richard Whitaker (Princeton Seminary, New Jersey) and H. van Parunak (then at the University of Michigan, Ann Arbor) of the 1983 printed edition of Biblia Hebraica Stuttgartensia (BHS). It was continued with the cooperation of Robert Kraft (University of Pennsylvania) and Emmanuel Tov (Hebrew University, Jerusalem), and completed by Alan Groves (Westminster Theological Seminary). The transcription was called the Michigan-Claremont-Westminster electronic Hebrew Bible and was archived at the Oxford Text Archive (OTA) in 1987. It has been variously known as the "CCAT" or "eBHS" text. Since that time, the text has been modified in many hundreds of places to conform to the photo-facsimile of the Leningrad Codex, Firkovich B19A, residing at the Russian National Library, St. Petersberg; hence the change of name.The J. Alan Groves Center for Advanced Biblical Research has continued to scrutinize and correct this electronic text as a part of its continuing work of building morphology and syntax databases of the Hebrew Bible, since correct linguistic analysis requires an accurate text.Vocalized ketib variants are no longer included as they are not part of the original manuscript.
@@ -129,13 +129,13 @@
- Input text file wlc416_ps.txt provided by the J. Alan Groves Center for Advanced
-Biblical Research. The file has the MD5 hash: a941 88e1 3fc3 0b18 8bb4 9ac8 c24f 2946
-and was received on 30 Apr 2012. The WLC text file has been modified by the
+ Input text file wlc418_ps.txt provided by the J. Alan Groves Center for Advanced
+Biblical Research. The file has the MD5 hash: 79fa 8f5a 9957 a0a0 3212 e51e b4c9 fc33
+and was received on 13 Jun 2013. The WLC text file has been modified by the
transcriber to move transcription notes closer to the relevant character in
-exactly six (6) places. The modified file, wlc_4.16_ps_td.txt, has the following
-SHA-1 hash: 79C7 003E 75C9 40B1 DDDE A885 A3A0 06B3 4C48 7140 .
- 05 Jun 2012
+exactly six (6) places. The modified file, wlc_4.18_ps_td.txt, has the following
+SHA-1 hash: 036E 5248 D7E9 522D D62C 1466 C019 8347 A693 60D9 .
+ 25 Jun 2013Hebrew
@@ -11248,8 +11248,8 @@ SHA-1 hash: 79C7 003E 75C9 40B1 DDDE A885 A3A0 06B3 4C48 7140 .
וַ/יַּ֡ךְאֶלְחָנָן֩בֶּן־
- יַעְרֵ֨י
- אֹרְגִ֜יםc
+ יַעְרֵ֨יc
+ אֹרְגִ֜יםבֵּ֣יתהַלַּחְמִ֗יאֵ֚ת
diff --git a/sources/tanach/WLC/Books/Song_of_Songs.xml b/opensiddur-sources/sources/tanach/WLC/Books/Song_of_Songs.xml
similarity index 98%
rename from sources/tanach/WLC/Books/Song_of_Songs.xml
rename to opensiddur-sources/sources/tanach/WLC/Books/Song_of_Songs.xml
index a0c20d78..dd8d7089 100644
--- a/sources/tanach/WLC/Books/Song_of_Songs.xml
+++ b/opensiddur-sources/sources/tanach/WLC/Books/Song_of_Songs.xml
@@ -30,14 +30,14 @@
Unicode/XML Westminster Leningrad Codex
- 4.16
- 30 Apr 2012
+ 4.18
+ 13 Jun 2013
- Transcribed by WLC2XML of 6 Jun 2010 at 05 Jun 2012 @ 21:41.45. Build number: 23.0.
+ Transcribed by WLC2XML of 6 Jun 2010 at 25 Jun 2013 @ 20:24.22. Build number: 24.0.
- 58,231 bytes
+ 58,287 bytesTranscription permitted:
Kirk Lowery
@@ -53,7 +53,7 @@
Freely available
- from the electronic version of the Leningrad Codex maintained by the J. Alan Groves Center for Advanced Biblical Research.
+ From the electronic version of the Leningrad Codex maintained by the J. Alan Groves Center for Advanced Biblical Research.This text began as an electronic transcription by Richard Whitaker (Princeton Seminary, New Jersey) and H. van Parunak (then at the University of Michigan, Ann Arbor) of the 1983 printed edition of Biblia Hebraica Stuttgartensia (BHS). It was continued with the cooperation of Robert Kraft (University of Pennsylvania) and Emmanuel Tov (Hebrew University, Jerusalem), and completed by Alan Groves (Westminster Theological Seminary). The transcription was called the Michigan-Claremont-Westminster electronic Hebrew Bible and was archived at the Oxford Text Archive (OTA) in 1987. It has been variously known as the "CCAT" or "eBHS" text. Since that time, the text has been modified in many hundreds of places to conform to the photo-facsimile of the Leningrad Codex, Firkovich B19A, residing at the Russian National Library, St. Petersberg; hence the change of name.The J. Alan Groves Center for Advanced Biblical Research has continued to scrutinize and correct this electronic text as a part of its continuing work of building morphology and syntax databases of the Hebrew Bible, since correct linguistic analysis requires an accurate text.Vocalized ketib variants are no longer included as they are not part of the original manuscript.
@@ -129,13 +129,13 @@
- Input text file wlc416_ps.txt provided by the J. Alan Groves Center for Advanced
-Biblical Research. The file has the MD5 hash: a941 88e1 3fc3 0b18 8bb4 9ac8 c24f 2946
-and was received on 30 Apr 2012. The WLC text file has been modified by the
+ Input text file wlc418_ps.txt provided by the J. Alan Groves Center for Advanced
+Biblical Research. The file has the MD5 hash: 79fa 8f5a 9957 a0a0 3212 e51e b4c9 fc33
+and was received on 13 Jun 2013. The WLC text file has been modified by the
transcriber to move transcription notes closer to the relevant character in
-exactly six (6) places. The modified file, wlc_4.16_ps_td.txt, has the following
-SHA-1 hash: 79C7 003E 75C9 40B1 DDDE A885 A3A0 06B3 4C48 7140 .
- 05 Jun 2012
+exactly six (6) places. The modified file, wlc_4.18_ps_td.txt, has the following
+SHA-1 hash: 036E 5248 D7E9 522D D62C 1466 C019 8347 A693 60D9 .
+ 25 Jun 2013Hebrew
@@ -511,7 +511,7 @@ SHA-1 hash: 79C7 003E 75C9 40B1 DDDE A885 A3A0 06B3 4C48 7140 .
הַ/מַּדְרֵגָ֔ההַרְאִ֙י/נִי֙אֶתּ־
- מַרְאַ֔יִ/ךְQp
+ מַרְאַ֔יִ/ךְQnpהַשְׁמִיעִ֖י/נִיאֶת־קוֹלֵ֑/ךְ
@@ -677,7 +677,7 @@ SHA-1 hash: 79C7 003E 75C9 40B1 DDDE A885 A3A0 06B3 4C48 7140 .
עַל־יְרֵכ֔/וֹמִ/פַּ֖חַד
- בַּ/לֵּילּֽוֹת׃Qp
+ בַּ/לֵּילּֽוֹת׃Qnp
@@ -1150,7 +1150,7 @@ SHA-1 hash: 79C7 003E 75C9 40B1 DDDE A885 A3A0 06B3 4C48 7140 .
חִכּ/וֹ֙מַֽמְתַקִּ֔יםוְ/כֻלּ֖/וֹ
- מַחֲּמַדִּ֑יםQp
+ מַחֲּמַדִּ֑יםQnpזֶ֤הדוֹדִ/י֙וְ/זֶ֣ה
@@ -1190,7 +1190,7 @@ SHA-1 hash: 79C7 003E 75C9 40B1 DDDE A885 A3A0 06B3 4C48 7140 .
וְ/דוֹדִ֣/ילִ֔/יהָ/רֹעֶ֖ה
- בַּ/שׁוֹשַׁנִּֽים׃Qp
+ בַּ/שׁוֹשַׁנִּֽים׃Qnp
@@ -1486,7 +1486,7 @@ SHA-1 hash: 79C7 003E 75C9 40B1 DDDE A885 A3A0 06B3 4C48 7140 .
אִמִּ֑/יאֶֽמְצָאֲ/ךָ֤בַ/חוּץ֙
- אֶשָׁ֣קְ/ךָ֔Qp
+ אֶשָׁ֣קְ/ךָ֔Qnpגַּ֖םלֹא־יָב֥וּזוּ
@@ -1649,7 +1649,7 @@ SHA-1 hash: 79C7 003E 75C9 40B1 DDDE A885 A3A0 06B3 4C48 7140 .
כָּֽסֶף׃
- כָּרְמִ֥/יQv
+ כָּרְמִ֥/יQnvשֶׁ/לִּ֖/ילְ/פָנָ֑/יהָ/אֶ֤לֶף
@@ -1661,7 +1661,7 @@ SHA-1 hash: 79C7 003E 75C9 40B1 DDDE A885 A3A0 06B3 4C48 7140 .
פִּרְיֽ/וֹ׃
- הַ/יוֹשֶׁ֣בֶתQp
+ הַ/יוֹשֶׁ֣בֶתQnpבַּ/גַּנִּ֗יםחֲבֵרִ֛יםמַקְשִׁיבִ֥ים
diff --git a/sources/tanach/WLC/Books/Tanach.xml b/opensiddur-sources/sources/tanach/WLC/Books/Tanach.xml
similarity index 98%
rename from sources/tanach/WLC/Books/Tanach.xml
rename to opensiddur-sources/sources/tanach/WLC/Books/Tanach.xml
index d44b5a42..f06b660b 100644
--- a/sources/tanach/WLC/Books/Tanach.xml
+++ b/opensiddur-sources/sources/tanach/WLC/Books/Tanach.xml
@@ -28,14 +28,14 @@
Unicode/XML Westminster Leningrad Codex
- 4.16
- 30 Apr 2012
+ 4.18
+ 13 Jun 2013
- Transcribed by WLC2XML of 6 Jun 2010 at 05 Jun 2012 @ 21:41.45. Build number: 23.0.
+ Transcribed by WLC2XML of 6 Jun 2010 at 25 Jun 2013 @ 20:24.22. Build number: 24.0.
- 36,748 bytes
+ 36,788 bytesTranscription permitted:
Kirk Lowery
@@ -51,7 +51,7 @@
Freely available
- from the electronic version of the Leningrad Codex maintained by the J. Alan Groves Center for Advanced Biblical Research.
+ From the electronic version of the Leningrad Codex maintained by the J. Alan Groves Center for Advanced Biblical Research.This text began as an electronic transcription by Richard Whitaker (Princeton Seminary, New Jersey) and H. van Parunak (then at the University of Michigan, Ann Arbor) of the 1983 printed edition of Biblia Hebraica Stuttgartensia (BHS). It was continued with the cooperation of Robert Kraft (University of Pennsylvania) and Emmanuel Tov (Hebrew University, Jerusalem), and completed by Alan Groves (Westminster Theological Seminary). The transcription was called the Michigan-Claremont-Westminster electronic Hebrew Bible and was archived at the Oxford Text Archive (OTA) in 1987. It has been variously known as the "CCAT" or "eBHS" text. Since that time, the text has been modified in many hundreds of places to conform to the photo-facsimile of the Leningrad Codex, Firkovich B19A, residing at the Russian National Library, St. Petersberg; hence the change of name.The J. Alan Groves Center for Advanced Biblical Research has continued to scrutinize and correct this electronic text as a part of its continuing work of building morphology and syntax databases of the Hebrew Bible, since correct linguistic analysis requires an accurate text.Vocalized ketib variants are no longer included as they are not part of the original manuscript.
@@ -127,13 +127,13 @@
- Input text file wlc416_ps.txt provided by the J. Alan Groves Center for Advanced
-Biblical Research. The file has the MD5 hash: a941 88e1 3fc3 0b18 8bb4 9ac8 c24f 2946
-and was received on 30 Apr 2012. The WLC text file has been modified by the
+ Input text file wlc418_ps.txt provided by the J. Alan Groves Center for Advanced
+Biblical Research. The file has the MD5 hash: 79fa 8f5a 9957 a0a0 3212 e51e b4c9 fc33
+and was received on 13 Jun 2013. The WLC text file has been modified by the
transcriber to move transcription notes closer to the relevant character in
-exactly six (6) places. The modified file, wlc_4.16_ps_td.txt, has the following
-SHA-1 hash: 79C7 003E 75C9 40B1 DDDE A885 A3A0 06B3 4C48 7140 .
- 05 Jun 2012
+exactly six (6) places. The modified file, wlc_4.18_ps_td.txt, has the following
+SHA-1 hash: 036E 5248 D7E9 522D D62C 1466 C019 8347 A693 60D9 .
+ 25 Jun 2013Hebrew
@@ -1218,7 +1218,7 @@ SHA-1 hash: 79C7 003E 75C9 40B1 DDDE A885 A3A0 06B3 4C48 7140 .
/Special
- Morphological divider.
+ Morphological divider. Appears as ' ¦ ' in odt and pdf files.
diff --git a/sources/tanach/WLC/Books/Zechariah.xml b/opensiddur-sources/sources/tanach/WLC/Books/Zechariah.xml
similarity index 99%
rename from sources/tanach/WLC/Books/Zechariah.xml
rename to opensiddur-sources/sources/tanach/WLC/Books/Zechariah.xml
index 5c92750d..c65f9e6f 100644
--- a/sources/tanach/WLC/Books/Zechariah.xml
+++ b/opensiddur-sources/sources/tanach/WLC/Books/Zechariah.xml
@@ -30,14 +30,14 @@
Unicode/XML Westminster Leningrad Codex
- 4.16
- 30 Apr 2012
+ 4.18
+ 13 Jun 2013
- Transcribed by WLC2XML of 6 Jun 2010 at 05 Jun 2012 @ 21:41.44. Build number: 23.0.
+ Transcribed by WLC2XML of 6 Jun 2010 at 25 Jun 2013 @ 20:24.21. Build number: 24.0.
- 122,279 bytes
+ 122,295 bytesTranscription permitted:
Kirk Lowery
@@ -53,7 +53,7 @@
Freely available
- from the electronic version of the Leningrad Codex maintained by the J. Alan Groves Center for Advanced Biblical Research.
+ From the electronic version of the Leningrad Codex maintained by the J. Alan Groves Center for Advanced Biblical Research.This text began as an electronic transcription by Richard Whitaker (Princeton Seminary, New Jersey) and H. van Parunak (then at the University of Michigan, Ann Arbor) of the 1983 printed edition of Biblia Hebraica Stuttgartensia (BHS). It was continued with the cooperation of Robert Kraft (University of Pennsylvania) and Emmanuel Tov (Hebrew University, Jerusalem), and completed by Alan Groves (Westminster Theological Seminary). The transcription was called the Michigan-Claremont-Westminster electronic Hebrew Bible and was archived at the Oxford Text Archive (OTA) in 1987. It has been variously known as the "CCAT" or "eBHS" text. Since that time, the text has been modified in many hundreds of places to conform to the photo-facsimile of the Leningrad Codex, Firkovich B19A, residing at the Russian National Library, St. Petersberg; hence the change of name.The J. Alan Groves Center for Advanced Biblical Research has continued to scrutinize and correct this electronic text as a part of its continuing work of building morphology and syntax databases of the Hebrew Bible, since correct linguistic analysis requires an accurate text.Vocalized ketib variants are no longer included as they are not part of the original manuscript.
@@ -129,13 +129,13 @@
- Input text file wlc416_ps.txt provided by the J. Alan Groves Center for Advanced
-Biblical Research. The file has the MD5 hash: a941 88e1 3fc3 0b18 8bb4 9ac8 c24f 2946
-and was received on 30 Apr 2012. The WLC text file has been modified by the
+ Input text file wlc418_ps.txt provided by the J. Alan Groves Center for Advanced
+Biblical Research. The file has the MD5 hash: 79fa 8f5a 9957 a0a0 3212 e51e b4c9 fc33
+and was received on 13 Jun 2013. The WLC text file has been modified by the
transcriber to move transcription notes closer to the relevant character in
-exactly six (6) places. The modified file, wlc_4.16_ps_td.txt, has the following
-SHA-1 hash: 79C7 003E 75C9 40B1 DDDE A885 A3A0 06B3 4C48 7140 .
- 05 Jun 2012
+exactly six (6) places. The modified file, wlc_4.18_ps_td.txt, has the following
+SHA-1 hash: 036E 5248 D7E9 522D D62C 1466 C019 8347 A693 60D9 .
+ 25 Jun 2013Hebrew
@@ -1494,7 +1494,7 @@ SHA-1 hash: 79C7 003E 75C9 40B1 DDDE A885 A3A0 06B3 4C48 7140 .
וּ/בָנָ֖האֶת־הֵיכַ֥ל
- יְהוָֽהּ׃Qp
+ יְהוָֽהּ׃Qnpוְ֠/הוּא
@@ -3420,7 +3420,7 @@ SHA-1 hash: 79C7 003E 75C9 40B1 DDDE A885 A3A0 06B3 4C48 7140 .
בַּ/גּוֹיִ֣םהָ/הֵ֑םכְּ/י֥וֹם
- הִֽלָּחֲמ֖/וQv
+ הִֽלָּחֲמ֖/וQnvבְּ/י֥וֹםקְרָֽב׃
diff --git a/sources/tanach/WLC/Books/Zephaniah.xml b/opensiddur-sources/sources/tanach/WLC/Books/Zephaniah.xml
similarity index 98%
rename from sources/tanach/WLC/Books/Zephaniah.xml
rename to opensiddur-sources/sources/tanach/WLC/Books/Zephaniah.xml
index 69e5ff18..ed52bd60 100644
--- a/sources/tanach/WLC/Books/Zephaniah.xml
+++ b/opensiddur-sources/sources/tanach/WLC/Books/Zephaniah.xml
@@ -30,14 +30,14 @@
Unicode/XML Westminster Leningrad Codex
- 4.16
- 30 Apr 2012
+ 4.18
+ 13 Jun 2013
- Transcribed by WLC2XML of 6 Jun 2010 at 05 Jun 2012 @ 21:41.44. Build number: 23.0.
+ Transcribed by WLC2XML of 6 Jun 2010 at 25 Jun 2013 @ 20:24.21. Build number: 24.0.
- 38,245 bytes
+ 38,253 bytesTranscription permitted:
Kirk Lowery
@@ -53,7 +53,7 @@
Freely available
- from the electronic version of the Leningrad Codex maintained by the J. Alan Groves Center for Advanced Biblical Research.
+ From the electronic version of the Leningrad Codex maintained by the J. Alan Groves Center for Advanced Biblical Research.This text began as an electronic transcription by Richard Whitaker (Princeton Seminary, New Jersey) and H. van Parunak (then at the University of Michigan, Ann Arbor) of the 1983 printed edition of Biblia Hebraica Stuttgartensia (BHS). It was continued with the cooperation of Robert Kraft (University of Pennsylvania) and Emmanuel Tov (Hebrew University, Jerusalem), and completed by Alan Groves (Westminster Theological Seminary). The transcription was called the Michigan-Claremont-Westminster electronic Hebrew Bible and was archived at the Oxford Text Archive (OTA) in 1987. It has been variously known as the "CCAT" or "eBHS" text. Since that time, the text has been modified in many hundreds of places to conform to the photo-facsimile of the Leningrad Codex, Firkovich B19A, residing at the Russian National Library, St. Petersberg; hence the change of name.The J. Alan Groves Center for Advanced Biblical Research has continued to scrutinize and correct this electronic text as a part of its continuing work of building morphology and syntax databases of the Hebrew Bible, since correct linguistic analysis requires an accurate text.Vocalized ketib variants are no longer included as they are not part of the original manuscript.
@@ -129,13 +129,13 @@
- Input text file wlc416_ps.txt provided by the J. Alan Groves Center for Advanced
-Biblical Research. The file has the MD5 hash: a941 88e1 3fc3 0b18 8bb4 9ac8 c24f 2946
-and was received on 30 Apr 2012. The WLC text file has been modified by the
+ Input text file wlc418_ps.txt provided by the J. Alan Groves Center for Advanced
+Biblical Research. The file has the MD5 hash: 79fa 8f5a 9957 a0a0 3212 e51e b4c9 fc33
+and was received on 13 Jun 2013. The WLC text file has been modified by the
transcriber to move transcription notes closer to the relevant character in
-exactly six (6) places. The modified file, wlc_4.16_ps_td.txt, has the following
-SHA-1 hash: 79C7 003E 75C9 40B1 DDDE A885 A3A0 06B3 4C48 7140 .
- 05 Jun 2012
+exactly six (6) places. The modified file, wlc_4.18_ps_td.txt, has the following
+SHA-1 hash: 036E 5248 D7E9 522D D62C 1466 C019 8347 A693 60D9 .
+ 25 Jun 2013Hebrew
@@ -871,7 +871,7 @@ SHA-1 hash: 79C7 003E 75C9 40B1 DDDE A885 A3A0 06B3 4C48 7140 .
כ֑וּשׁעֲתָרַ/י֙בַּת־
- פוּצַ֔/יQp
+ פוּצַ֔/יQnpיוֹבִל֖וּ/ןמִנְחָתִֽ/י׃
diff --git a/sources/tanach/WLC/License.html b/opensiddur-sources/sources/tanach/WLC/License.html
similarity index 100%
rename from sources/tanach/WLC/License.html
rename to opensiddur-sources/sources/tanach/WLC/License.html
diff --git a/sources/tanach/WLC/Tanach.xml b/opensiddur-sources/sources/tanach/WLC/Tanach.xml
similarity index 100%
rename from sources/tanach/WLC/Tanach.xml
rename to opensiddur-sources/sources/tanach/WLC/Tanach.xml
diff --git a/opensiddur-sources/sources/tanach/WLC/WLCReleaseNotes.html b/opensiddur-sources/sources/tanach/WLC/WLCReleaseNotes.html
new file mode 100644
index 00000000..55050a06
--- /dev/null
+++ b/opensiddur-sources/sources/tanach/WLC/WLCReleaseNotes.html
@@ -0,0 +1,296 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
The
+Westminster Leningrad Codex
+
Version
+4.18
+
Friday
+24 May 2013
+
Release
+Notes
+
Prof. Kirk E. Lowery, Executive
+Editor <Kirk@GrovesCenter.org> Stephen
+K. Salisbury, Editor <Steve@GrovesCenter.org> The
+J. Alan Groves Center for Advanced Biblical Research 2960 Church
+Road Glenside, Pennsylvania 19038-2000 U.S.A.
+
+
Note: In December 2006, the Westminster
+Hebrew Institute was officially renamed the J. Alan
+Groves Center for Advanced Biblical Research in honor of its
+founder, who died shortly thereafter of cancer.
+
In July/August 2009 the Groves Center became an independent
+non-profit organization (and became an official “501(c)3”
+public charity under US Federal law in January 2011) and is no longer
+an official part of Westminster Theological Seminary, though the
+Groves Center continues to reside on the campus of Westminster
+Theological Seminary, which is located in Glenside, Pennsylvania,
+U.S.A., a suburb of Philadelphia.
+
Major
+Changes for this Release
+
· WLC
+4.18 had 16 textual changes with associated changes in bracket notes,
+the addition of the bracket note “]n”
+to almost 100 words, 24 other changes to bracket notes, 5 other
+textual changes, and 5 changes to morphological slashes and/or word
+divisions. For WLC 4.18 we reviewed our text of Judges against the
+Leningrad Codex for all textual errors cited by the apparatus of the
+sixth fascicle of BHQ. All of our existing textual bracket notes in
+the books for which BHQ has been published (The Megilloth,
+Ezra-Nehemiah, Deuteronomy, Proverbs, the Twelve Minor Prophets, and
+Judges) were reviewed against the text of BHQ.
+
+
Additional
+Comments about this Release:
+
· As
+in the previous release, we have the documentation file
+“WLCmanual418.pdf”
+(which describes the lay-out of the Westminster Leningrad Codex
+“wlc418_ps.txt”)
+as well as this file (“WLC_ReleaseNotes418.html”).
+
· As
+in the six previous releases (4.6 – 4.16), the hypothetical
+pointing of Ketiv morphemes that is found in our morphology
+has not been included in the Westminster Leningrad Codex,
+wlc418_ps.txt.
+Hypothetical pointing of Ketiv text is necessary for the
+Westminster Hebrew Morphology, but since such hypothetical pointing
+is an interpretation (rather than a representation) of the text of
+the Leningrad Codex, it is not included in wlc418_ps.txt.
+
· The
+WLC manual has been updated to reflect the content of the WLC as of
+version 4.18.
+
· The
+file wlc418_ps.txt
+contains a header comment of a dozen or so lines beginning with “#”
+that identify the file as coming from the J. Alan Groves Center for
+Advanced Biblical Research and provide identifying information about
+the sources used to create each file (the date and time and the
+internal revision number) as well as copyright and contact
+information. (The header comments on this file were introduced in the
+corresponding file in the WLC 4.8 release.)
+
· In
+this release (as in the previous one), we have included an MD5
+check-sum for the file wlc418_ps.txt.
+
Textual
+Corrections
+
We have also made several changes to the text of WLC in places
+where we found we did not match the Leningrad Codex. This sometimes
+(but not always) causes us to disagree with BHS. This release
+includes a few changes to Ketiv-Qere readings as well as a few
+changes to consonants and vowels, and several changes to accents.
+These changes usually cause us to disagree with BHS, though
+occasionally a change actually causes us to remove a disagreement
+with BHS.
+
Reporting
+Errors
+
Error reports are always
+welcome. Please e-mail Stephen Salisbury
+<Steve@GrovesCenter.org>
+with a description of the error.
“Westminster
+ Leningrad
+ Codex”: one verse
+ per line, including Peh
+ and Samekh
+ marks but without
+ hypothetical pointing of
+ Ketiv
+ words (with a 12-line
+ header comment).
+
+
+
+
+
wlc418_ps.md5sum
+
+
+
Message Digest 5
+ check-sum for “wlc418_ps.txt”
+
+
+
+
+
WLCmanual418.pdf
+
+
+
Primary
+ documentation for “wlc418_ps.txt”
+
+
+
+
+
WLC_ReleaseNotes418.html
+
+
+
Release-specific
+ news for WLC 4.18 (this
+ file)
+
+
+
+
+
Old_WLC_ReleaseNotes416.html
+
+
+
Release-specific
+ news for WLC 4.16 (for customers upgrading to WLC 4.18 from WLC
+ 4.14 or earlier)
+
+
+
+
+
michigan.man
+
+
+
Legacy
+ documentation
+
+
+
+
+
supplmt.wts
+
+
+
Legacy
+ documentation
+
+
+
+
+
+
+
+
+
1See
+ http://en.wikipedia.org/wiki/Md5sum
+ for more information on the "Message Digest 5 checkSUM".
+ Using an associated program, e.g., md5sum.exe,
+ one can verify that the downloaded file is bit-for-bit precisely the
+ same as the official release version.
+
+
+
\ No newline at end of file
diff --git a/opensiddur-sources/src/data/sources/The Holy Scriptures.xml b/opensiddur-sources/src/data/sources/The Holy Scriptures.xml
new file mode 100644
index 00000000..530a6995
--- /dev/null
+++ b/opensiddur-sources/src/data/sources/The Holy Scriptures.xml
@@ -0,0 +1,21 @@
+
+
+
+ The Holy Scriptures
+ According to the Masoretic Text: A New Translation With the Aid of Previous Versions and With Constant Consulation of Jewish Authorities
+ תורה נביאים וכתובים
+
+ Max Margolis
+
+
+ The Jewish Publication Society of America
+ Philadelphia, PA
+ 1917
+
+ The Jewish Publication Society of America
+ Downloadable e-book
+ 2014-06-06
+
+
+
+
diff --git a/data/transliteration/ALA-Library_of_Congress-1997.xml b/opensiddur-sources/src/data/transliteration/ALA-Library_of_Congress-1997.xml
similarity index 100%
rename from data/transliteration/ALA-Library_of_Congress-1997.xml
rename to opensiddur-sources/src/data/transliteration/ALA-Library_of_Congress-1997.xml
diff --git a/data/transliteration/Academy_of_the_Hebrew_Language-2007.xml b/opensiddur-sources/src/data/transliteration/Academy_of_the_Hebrew_Language-2007.xml
similarity index 100%
rename from data/transliteration/Academy_of_the_Hebrew_Language-2007.xml
rename to opensiddur-sources/src/data/transliteration/Academy_of_the_Hebrew_Language-2007.xml
diff --git a/data/transliteration/International_Phonetic_Alphabet-2005.xml b/opensiddur-sources/src/data/transliteration/International_Phonetic_Alphabet-2005.xml
similarity index 100%
rename from data/transliteration/International_Phonetic_Alphabet-2005.xml
rename to opensiddur-sources/src/data/transliteration/International_Phonetic_Alphabet-2005.xml
diff --git a/data/transliteration/James_Strong-1890.xml b/opensiddur-sources/src/data/transliteration/James_Strong-1890.xml
similarity index 100%
rename from data/transliteration/James_Strong-1890.xml
rename to opensiddur-sources/src/data/transliteration/James_Strong-1890.xml
diff --git a/data/transliteration/Michigan-Claremont-1984.xml b/opensiddur-sources/src/data/transliteration/Michigan-Claremont-1984.xml
similarity index 100%
rename from data/transliteration/Michigan-Claremont-1984.xml
rename to opensiddur-sources/src/data/transliteration/Michigan-Claremont-1984.xml
diff --git a/data/transliteration/Modern_Ashkenazi_Dialect-2010.xml b/opensiddur-sources/src/data/transliteration/Modern_Ashkenazi_Dialect-2010.xml
similarity index 95%
rename from data/transliteration/Modern_Ashkenazi_Dialect-2010.xml
rename to opensiddur-sources/src/data/transliteration/Modern_Ashkenazi_Dialect-2010.xml
index 218d85a1..702c6b11 100644
--- a/data/transliteration/Modern_Ashkenazi_Dialect-2010.xml
+++ b/opensiddur-sources/src/data/transliteration/Modern_Ashkenazi_Dialect-2010.xml
@@ -37,10 +37,10 @@
-
+
-
+
@@ -68,4 +68,4 @@
-
\ No newline at end of file
+
diff --git a/data/transliteration/Modern_Israeli_Hebrew-2010.xml b/opensiddur-sources/src/data/transliteration/Modern_Israeli_Hebrew-2010.xml
similarity index 95%
rename from data/transliteration/Modern_Israeli_Hebrew-2010.xml
rename to opensiddur-sources/src/data/transliteration/Modern_Israeli_Hebrew-2010.xml
index 7f270401..7dfc2b5f 100644
--- a/data/transliteration/Modern_Israeli_Hebrew-2010.xml
+++ b/opensiddur-sources/src/data/transliteration/Modern_Israeli_Hebrew-2010.xml
@@ -37,10 +37,10 @@
-
+
-
+
@@ -68,4 +68,4 @@
-
\ No newline at end of file
+
diff --git a/data/transliteration/Society_of_Biblical_Literature-1999.xml b/opensiddur-sources/src/data/transliteration/Society_of_Biblical_Literature-1999.xml
similarity index 100%
rename from data/transliteration/Society_of_Biblical_Literature-1999.xml
rename to opensiddur-sources/src/data/transliteration/Society_of_Biblical_Literature-1999.xml
diff --git a/opensiddur-sources/src/expath-pkg.xml b/opensiddur-sources/src/expath-pkg.xml
new file mode 100644
index 00000000..f25d7895
--- /dev/null
+++ b/opensiddur-sources/src/expath-pkg.xml
@@ -0,0 +1,10 @@
+
+
+ Open Siddur Sources
+
+
diff --git a/opensiddur-sources/src/post-install.xql b/opensiddur-sources/src/post-install.xql
new file mode 100644
index 00000000..8db8bdb7
--- /dev/null
+++ b/opensiddur-sources/src/post-install.xql
@@ -0,0 +1,131 @@
+xquery version "3.0";
+(:~ post-install for opensiddur-sources
+ : loads the sources data into the proper places in the database
+ :
+ : Copyright 2013 Efraim Feinstein, efraim@opensiddur.org
+ : Licensed under the GNU Lesser General Public License, version 3 or later
+ :)
+(: This script has to be post-install, because pre-install cannot access imported modules :)
+import module namespace debug="http://jewishliturgy.org/transform/debug"
+ at "xmldb:exist:///db/apps/opensiddur-server/modules/debug.xqm";
+import module namespace format="http://jewishliturgy.org/modules/format"
+ at "xmldb:exist:///db/apps/opensiddur-server/modules/format.xqm";
+import module namespace notes="http://jewishliturgy.org/api/data/notes"
+ at "xmldb:exist:///db/apps/opensiddur-server/api/data/notes.xqm";
+import module namespace orig="http://jewishliturgy.org/api/data/original"
+ at "xmldb:exist:///db/apps/opensiddur-server/api/data/original.xqm";
+import module namespace src="http://jewishliturgy.org/api/data/sources"
+ at "xmldb:exist:///db/apps/opensiddur-server/api/data/sources.xqm";
+import module namespace tran="http://jewishliturgy.org/api/transliteration"
+ at "xmldb:exist:///db/apps/opensiddur-server/api/data/transliteration.xqm";
+import module namespace user="http://jewishliturgy.org/api/user"
+ at "xmldb:exist:///db/apps/opensiddur-server/api/user.xqm";
+import module namespace ridx="http://jewishliturgy.org/modules/refindex"
+ at "xmldb:exist:///db/apps/opensiddur-server/modules/refindex.xqm";
+
+declare namespace j="http://jewishliturgy.org/ns/jlptei/1.0";
+declare namespace tei="http://www.tei-c.org/ns/1.0";
+declare namespace tr="http://jewishliturgy.org/ns/tr/1.0";
+
+(: file path pointing to the exist installation directory :)
+declare variable $home external;
+(: path to the directory containing the unpacked .xar package :)
+declare variable $dir external;
+(: the target collection into which the app is deployed :)
+declare variable $target external;
+
+declare variable $local:functions := map {
+ "get-notes" := notes:get#1,
+ "put-notes" := notes:put#2,
+ "post-notes" := notes:post#1,
+ "get-original" := orig:get#1,
+ "put-original" := orig:put#2,
+ "post-original" := orig:post#1,
+ "get-sources" := src:get#1,
+ "put-sources" := src:put#2,
+ "post-sources" := src:post#1,
+ "get-transliteration" := tran:get#1,
+ "put-transliteration" := tran:put#2,
+ "post-transliteration" := tran:post#1,
+ "get-user" := user:get#1,
+ "put-user" := user:put#2,
+ "post-user" := local:post-user#1
+ };
+
+declare function local:post-user(
+ $data as document-node()
+ ) {
+ let $name := $data/j:contributor/tei:idno[1]/string()
+ let $resource := encode-for-uri($name) || ".xml"
+ let $uri := xs:anyURI("/db/data/user/" || $resource)
+ return (
+ xmldb:store("/db/data/user", $resource, $data),
+ sm:chmod($uri, "rw-r--r--")
+ )
+};
+
+declare function local:upgrade-or-install(
+ $data as document-node(),
+ $get as function(xs:string) as item()+,
+ $post as function(document-node()) as item()+,
+ $put as function(xs:string, document-node()) as item()+
+ ) {
+ let $title := ($data//(tei:title[not(@type) or @type="main"]|tr:title|tei:idno[parent::j:contributor]))[1]/string()
+ let $name := encode-for-uri(replace($title, "\p{M}", ""))
+ let $null := util:log-system-out(("Name will be:", $name))
+ let $return :=
+ try {
+ if ($get($name) instance of document-node())
+ then (
+ util:log-system-out("put"),
+ $put($name, $data)
+ )
+ else (
+ util:log-system-out("post"),
+ $post($data)
+ )
+ }
+ catch * {
+ (,
+ {
+ debug:print-exception(
+ $err:module, $err:line-number, $err:column-number,
+ $err:code, $err:value, $err:description
+ )
+ })
+ }
+ where $return[2] instance of element(error)
+ return
+ util:log-system-out(("Error: ", $return[2]))
+};
+
+declare function local:upgrade-or-install-by-type(
+ $data as document-node(),
+ $type as xs:string
+ ) {
+ local:upgrade-or-install(
+ $data,
+ $local:functions("get-" || $type),
+ $local:functions("post-" || $type),
+ $local:functions("put-" || $type)
+ )
+};
+
+declare function local:install-data(
+ ) {
+ util:log-system-out("Installing data files..."),
+ for $data-type in ("user", "transliteration", "sources", "original", "notes")
+ let $null := util:log-system-out("Installing " || $data-type || "...")
+ for $document in collection($target || "/data/" || $data-type)
+ order by count(format:get-dependencies($document)/*)
+ return (
+ util:log-system-out("Installing from " || util:document-name($document) || "..."),
+ local:upgrade-or-install-by-type($document, $data-type)
+ )
+};
+
+util:log-system-out("Starting installation of sources..."),
+local:install-data(),
+util:log-system-out("Reindexing reference index..."),
+ridx:reindex(collection("/db/data")),
+util:log-system-out("Done.")
diff --git a/opensiddur-sources/src/repo.xml b/opensiddur-sources/src/repo.xml
new file mode 100644
index 00000000..737d0463
--- /dev/null
+++ b/opensiddur-sources/src/repo.xml
@@ -0,0 +1,14 @@
+
+
+ Open Siddur Sources
+ Efraim Feinstein
+ http://github.com/opensiddur/opensiddur
+ alpha
+ GNU-LGPL
+ true
+ library
+ opensiddur-sources
+
+ post-install.xql
+
+
diff --git a/python/os.py b/python/os.py
new file mode 100755
index 00000000..2db3c2bc
--- /dev/null
+++ b/python/os.py
@@ -0,0 +1,675 @@
+#!/usr/bin/env python3
+import sys
+import argparse
+import base64
+import getpass
+import lxml.etree as et
+import requests
+from collections import namedtuple
+from urllib.parse import unquote, quote
+
+
+data_types = [
+ "conditionals",
+ "dictionaries",
+ "linkage",
+ "notes",
+ "original",
+ "outlines",
+ "sources",
+ "styles",
+ "transliteration"
+]
+
+server_port = namedtuple("server_port", ["protocol", "host", "port"])
+server_location = {
+ "dev": server_port(protocol="https", host="db-dev.jewishliturgy.org", port=443),
+ "feature": server_port(protocol="https", host="db-feature.jewishliturgy.org", port=443),
+ "local": server_port(protocol="http", host="localhost", port=3001),
+ "prod": server_port(protocol="https", host="db-prod.jewishliturgy.org", port=443),
+}
+
+
+def server_url(server):
+ coords = server_location[server]
+ return f"{coords.protocol}://{coords.host}:{coords.port}"
+
+
+namespaces = {
+ "html": "http://www.w3.org/1999/xhtml",
+ "a": "http://jewishliturgy.org/ns/access/1.0",
+ "g": "http://jewishliturgy.org/ns/group/1.0",
+ "status": "http://jewishliturgy.org/modules/status",
+}
+
+
+def auth_headers(args):
+ return ({
+ "Authorization": ("Basic " + base64.b64encode((args.user + ":" + args.password).encode("utf8")).decode())
+ } if args.user and args.password
+ else {})
+
+
+search_result = namedtuple("search_result", ["title", "resource", "href"])
+
+
+def paginate(request_url, request_size=100, params=None, headers=None):
+ """ paginate results from a search-type request URL, return one list element at a time,
+ until there are none left """
+ if params is None:
+ params = {}
+ if headers is None:
+ headers = {}
+ finished = False
+ start_index = 1
+ max_results = request_size
+ while not finished:
+ data = requests.get(request_url, params={
+ "start": start_index,
+ "max_results": max_results,
+ **params
+ }, headers=headers)
+ if data.status_code != 200:
+ raise(RuntimeError(f"{data.status_code} {data.reason}"))
+ xml = et.fromstring(data.content)
+ start_index = int(xml.xpath("html:head/html:meta[@name='startIndex']/@content", namespaces=namespaces)[0])
+ items_per_page = int(xml.xpath("html:head/html:meta[@name='itemsPerPage']/@content", namespaces=namespaces)[0])
+ total_results = int(xml.xpath("html:head/html:meta[@name='totalResults']/@content", namespaces=namespaces)[0])
+
+ for result in xml.xpath("html:body/html:*/html:li/html:a[@class='document']", namespaces=namespaces):
+ href = result.attrib["href"]
+ resource = unquote(href.split("/")[-1])
+ yield search_result(title=result.text, resource=resource, href=href)
+
+ start_index += items_per_page
+ finished = start_index >= total_results
+
+
+def up(args):
+ try:
+ response = requests.get(server_url(args.server), timeout=args.timeout)
+ is_up = response.status_code == 200
+ except requests.exceptions.RequestException:
+ is_up = False
+
+ if is_up:
+ print("Up", file=sys.stderr)
+ else:
+ print("Down", file=sys.stderr)
+ return 0 if is_up else 1
+
+
+def ls(args):
+ """ List or query database resources """
+ ctr = -1
+ for ctr, result in enumerate(paginate(f"{server_url(args.server)}/api/data/{args.data_type}", 500,
+ {"q": quote(args.query)} if args.query else {},
+ headers=auth_headers(args))):
+ print(f"{result.resource}\t{result.title}")
+ print(f"{ctr + 1} results found.", file=sys.stderr)
+ return 0
+
+
+def get(args):
+ api_path = "user" if args.subparser == "user" else f"data/{args.data_type}"
+ request_url = f"{server_url(args.server)}/api/{api_path}/{args.resource}"
+ headers = {
+ **auth_headers(args),
+ }
+
+ data = requests.get(request_url, headers=headers)
+ if data.status_code == 200:
+ with (open(args.output, "w") if args.output else sys.stdout) as f:
+ f.write(data.content.decode("utf8"))
+ else:
+ raise RuntimeError(f"{data.status_code} {data.reason} {data.content.decode('utf8')}")
+ return 0
+
+
+def post(args):
+ request_url = f"{server_url(args.server)}/api/data/{args.data_type}"
+ headers = {
+ **auth_headers(args),
+ "Content-type": "application/xml"
+ }
+
+ with (open(args.file, "r") if args.file else sys.stdin) as f:
+ data = requests.post(request_url, f.read(), headers=headers)
+ if data.status_code < 300:
+ print(f"{data.status_code} {data.reason}")
+ else:
+ raise RuntimeError(f"{data.status_code} {data.reason} {data.content.decode('utf8')}")
+ return 0
+
+
+def put(args):
+ api_path = "user" if args.subparser == "user" else f"data/{args.data_type}"
+ request_url = f"{server_url(args.server)}/api/{api_path}/{args.resource}"
+ headers = {
+ **auth_headers(args),
+ "Content-type": "application/xml"
+ }
+
+ with (open(args.file, "r") if args.file else sys.stdin) as f:
+ data = requests.put(request_url, f.read(), headers=headers)
+ if data.status_code < 300:
+ print(f"{data.status_code} {data.reason}")
+ else:
+ raise RuntimeError(f"{data.status_code} {data.reason} {data.content.decode('utf8')}")
+ return 0
+
+
+def rm(args):
+ request_url = f"{server_url(args.server)}/api/data/{args.data_type}/{args.resource}"
+ headers = {
+ **auth_headers(args)
+ }
+
+ data = requests.delete(request_url, headers=headers)
+ if data.status_code < 300:
+ print(f"{data.status_code} {data.reason}")
+ else:
+ raise RuntimeError(f"{data.status_code} {data.reason} {data.content.decode('utf8')}")
+ return 0
+
+
+def combine(args):
+ request_url = (
+ f"{server_url(args.server)}/api/data/original/{args.resource}/combined"
+ )
+ html_header = {"Accept": "application/xhtml+xml"} if args.html else {}
+ headers = {
+ **auth_headers(args),
+ **html_header
+ }
+
+ params = {
+ **({"transclude": "true"} if args.subparser == "transclude" else {})
+ }
+ data = requests.get(request_url, params=params, headers=headers)
+ if data.status_code == 200:
+ with (open(args.output, "w") if args.output else sys.stdout) as f:
+ f.write(data.content.decode("utf8"))
+ else:
+ raise RuntimeError(f"{data.status_code} {data.reason} {data.content.decode('utf8')}")
+ return 0
+
+
+def validate(args):
+ api_path = "user" if args.subparser == "user" else f"data/{args.data_type}"
+ request_url = (f"{server_url(args.server)}/api/{api_path}" + (
+ f"/{args.resource}" if args.resource else ""))
+ headers = {
+ **auth_headers(args),
+ "Content-type": "application/xml",
+ }
+ params = {
+ "validate": "true"
+ }
+ request = requests.put if args.resource else requests.post
+ with (open(args.file, "r") if args.file else sys.stdin) as f:
+ data = request(request_url, f.read(), params=params, headers=headers)
+ is_valid = False
+ if data.status_code == 200:
+ xml = et.fromstring(data.content)
+ is_valid = xml.xpath("status='valid'", namespaces=namespaces)
+ print(data.content.decode("utf8"))
+ print("Valid" if is_valid else "Invalid", file=sys.stderr)
+ else:
+ raise RuntimeError(f"{data.status_code} {data.reason} {data.content.decode('utf8')}")
+ return 0 if is_valid else 1
+
+
+def access(args):
+ request_url = f"{server_url(args.server)}/api/data/{args.data_type}/{args.resource}/access"
+ headers = {
+ **auth_headers(args),
+ "Content-type": "application/xml",
+ }
+ data = requests.get(request_url, headers=headers)
+ if data.status_code == 200:
+ xml = et.fromstring(data.content)
+ you = args.user or "guest"
+ you_read = "r" if xml.xpath("a:you/@read='true'", namespaces=namespaces) else "-"
+ you_write = "w" if xml.xpath("a:you/@write='true'", namespaces=namespaces) else "-"
+ you_chmod = "m" if xml.xpath("a:you/@chmod='true'", namespaces=namespaces) else "-"
+ you_relicense = "l" if xml.xpath("a:you/@relicense='true'", namespaces=namespaces) else "-"
+
+ owner = xml.xpath("string(a:owner)", namespaces=namespaces)
+ group = xml.xpath("string(a:group)", namespaces=namespaces)
+ group_write = "w" if xml.xpath("a:group/@write = 'true'", namespaces=namespaces) else "-"
+
+ world_read = "r" if xml.xpath("a:world/@read = 'true'", namespaces=namespaces) else "-"
+ world_write = "w" if xml.xpath("a:world/@write = 'true'", namespaces=namespaces) else "-"
+ print(f"{you}:{you_read}{you_write}{you_chmod}{you_relicense} {owner} {group}({group_write}) {world_read}{world_write}")
+ else:
+ raise RuntimeError(f"{data.status_code} {data.reason} {data.content.decode('utf8')}")
+ return 0
+
+
+def chmod(args):
+ request_url = f"{server_url(args.server)}/api/data/{args.data_type}/{args.resource}/access"
+ headers = {
+ **auth_headers(args),
+ "Content-type": "application/xml",
+ }
+ existing_access = requests.get(request_url, headers=headers)
+ if existing_access.status_code == 200:
+ xml = et.fromstring(existing_access.content)
+ you_chmod = xml.xpath("a:you/@chmod='true'", namespaces=namespaces)
+
+ if not you_chmod:
+ print("Permission denied.", file=sys.stderr)
+ return 1
+
+ owner = xml.xpath("string(a:owner)", namespaces=namespaces)
+ group = xml.xpath("string(a:group)", namespaces=namespaces)
+ group_write = xml.xpath("a:group/@write = 'true'", namespaces=namespaces)
+
+ world_read = xml.xpath("a:world/@read = 'true'", namespaces=namespaces)
+ world_write = xml.xpath("a:world/@write = 'true'", namespaces=namespaces)
+
+ new_owner = args.owner or owner
+ new_group = args.group or group
+ new_group_write = str((args.g == "w") if args.g else group_write).lower()
+
+ new_world_read = str(("r" in args.o) if args.o else world_read).lower()
+ new_world_write = str(("w" in args.o) if args.o else world_write).lower()
+
+ new_access = f"""
+ {new_owner}
+ {new_group}
+
+ """
+ response = requests.put(request_url, new_access, headers=headers)
+ if response.status_code < 300:
+ print("Changed.", file=sys.stderr)
+ else:
+ raise RuntimeError(f"{response.status_code} {response.reason} {response.content.decode('utf8')}")
+ else:
+ raise RuntimeError(f"{existing_access.status_code} {existing_access.reason} {existing_access.content.decode('utf8')}")
+ return 0
+
+
+def transliterate(args):
+ request_url = f"{server_url(args.server)}/api/utility/translit/{args.table}"
+ headers = {
+ **auth_headers(args),
+ "Content-type": "text/plain" if args.text else "application/xml",
+ "Accept": "text/plain" if args.text else "application/xml",
+ }
+ with (open(args.file, "r") if args.file else sys.stdin) as f:
+ data = requests.post(request_url, f.read().encode("utf8"), headers=headers)
+
+ if data.status_code == 200:
+ with (open(args.output, "w") if args.output else sys.stdout) as f:
+ f.write(data.content.decode("utf8"))
+ else:
+ raise RuntimeError(f"{data.status_code} {data.reason} {data.content.decode('utf8')}")
+ return 0
+
+
+def jobs_ls(args):
+ """ List or query database resources """
+ data = requests.get(f"{server_url(args.server)}/api/jobs", headers=auth_headers(args))
+ if data.status_code >= 300:
+ raise RuntimeError(f"{data.status_code} {data.reason} {data.content.decode('utf8')}")
+ xml = et.fromstring(data.content)
+ for result in xml.xpath("html:body/html:*/html:li", namespaces=namespaces):
+ id = result.xpath("string(html:a/@href)", namespaces=namespaces).split("/")[-1]
+ title = result.xpath("string(html:span[@class='title'])", namespaces=namespaces)
+ user = result.xpath("string(html:span[@class='user'])", namespaces=namespaces)
+ state = result.xpath("string(html:span[@class='state'])", namespaces=namespaces)
+ started = result.xpath("string(html:span[@class='started'])", namespaces=namespaces)
+ completed = result.xpath("string(html:span[@class='completed'])", namespaces=namespaces)
+ print("\t".join([id, title, user, state, started, completed]))
+ return 0
+
+
+def jobs_status(args):
+ data = requests.get(f"{server_url(args.server)}/api/jobs/{args.id}", headers={
+ **auth_headers(args),
+ "Content-type": "application/xml"
+ })
+ if data.status_code >= 300:
+ raise RuntimeError(f"{data.status_code} {data.reason} {data.content.decode('utf8')}")
+ xml = et.fromstring(data.content)
+
+ user = xml.attrib["user"]
+ started = xml.attrib["started"]
+ state = xml.attrib["state"]
+ completed = xml.attrib.get("completed",
+ xml.attrib.get("failed", "*"))
+ resource = unquote(xml.attrib["resource"]).split("/")[-1]
+
+ print(f"{resource} by {user}: {state} at {started}-{completed}")
+ for action_description in xml.xpath("*", namespaces=namespaces):
+ action = et.QName(action_description).localname
+ timestamp = action_description.attrib["timestamp"]
+ resource = unquote(action_description.attrib["resource"]).replace("/exist/restxq/api/data/", "")
+ data_type, resource_name = resource.split("/")
+ stage = action_description.attrib.get("stage", "-")
+ info = action_description.text or ""
+
+ print(f"{action}:{stage}:{timestamp} {data_type} {resource_name}: {info}")
+
+
+def changes(args):
+ data = requests.get(f"{server_url(args.server)}/api/changes", headers=auth_headers(args))
+ if data.status_code >= 300:
+ raise RuntimeError(f"{data.status_code} {data.reason} {data.content.decode('utf8')}")
+ xml = et.fromstring(data.content)
+
+ for changed_file in xml.xpath("html:body/*/html:li", namespaces=namespaces):
+ title = changed_file.xpath("string(html:a)", namespaces=namespaces)
+ data_type, resource = unquote(changed_file.xpath("string(html:a/@href)", namespaces=namespaces)).split("/")[-2:]
+ print(f"{data_type} {resource}: {title}:")
+ for change in changed_file.xpath("html:ol/html:li", namespaces=namespaces):
+ who = change.xpath("string(html:span[@class='who'])", namespaces=namespaces)
+ change_type = change.xpath("string(html:span[@class='type'])", namespaces=namespaces)
+ when = change.xpath("string(html:span[@class='when'])", namespaces=namespaces)
+ message = change.xpath("string(html:span[@class='message'])", namespaces=namespaces)
+ print(f"\t{change_type} by {who} at {when}: {message}")
+ return 0
+
+
+def login(args):
+ response = requests.get(f"{server_url(args.server)}/api/login", headers={
+ **auth_headers(args),
+ "Accept": "application/xml"
+ })
+ if response.status_code >= 300:
+ raise RuntimeError(f"{response.status_code} {response.reason} {response.content.decode('utf8')}")
+ else:
+ xml = et.fromstring(response.content)
+ print(xml.text or "Not logged in.", file=sys.stderr)
+ return 0
+
+
+def user_ls(args):
+ ctr = -1
+ api = args.subparser
+ for ctr, result in enumerate(paginate(f"{server_url(args.server)}/api/{api}", 500,
+ {"q": quote(args.query)} if args.query else {},
+ headers=auth_headers(args))):
+ print(f"{result.resource}\t{result.title}")
+ print(f"{ctr + 1} results found.", file=sys.stderr)
+ return 0
+
+
+def user_new(args):
+ if not args.passwd:
+ passwd = getpass.getpass()
+ else:
+ passwd = args.passwd
+ response = requests.post(f"{server_url(args.server)}/api/user",
+ data={"user": args.name, "password": passwd},
+ headers=auth_headers(args))
+ if response.status_code >= 300:
+ raise RuntimeError(f"{response.status_code} {response.reason} {response.content.decode('utf8')}")
+ elif response.status_code == 201:
+ print("Created.", file=sys.stderr)
+ else:
+ print("Password changed.", file=sys.stderr)
+ return 0
+
+
+def user_groups(args):
+ data = requests.get(f"{server_url(args.server)}/api/user/{args.resource}/groups", headers=auth_headers(args))
+ if data.status_code >= 300:
+ raise RuntimeError(f"{data.status_code} {data.reason} {data.content.decode('utf8')}")
+ xml = et.fromstring(data.content)
+
+ groups = []
+ for group in xml.xpath("html:body/*/html:li/html:a", namespaces=namespaces):
+ group_name = group.text
+ is_manager = group.attrib.get("property", "") == "manager"
+ groups.append(group_name + ("*" if is_manager else ""))
+ print(f"{args.resource}: {', '.join(groups)}")
+
+ return 0
+
+
+def group_get(args):
+ data = requests.get(f"{server_url(args.server)}/api/group/{args.resource}", headers={
+ **auth_headers(args),
+ "Accept": "application/xml"
+ })
+ if data.status_code >= 300:
+ raise RuntimeError(f"{data.status_code} {data.reason} {data.content.decode('utf8')}")
+ xml = et.fromstring(data.content)
+
+ users = []
+ for group in xml.xpath("//g:member", namespaces=namespaces):
+ user_name = group.text
+ is_manager = group.attrib.get("manager", "").lower() == "true"
+ users.append(user_name + ("*" if is_manager else ""))
+ print(f"{args.resource}: {', '.join(users)}")
+
+ return 0
+
+
+def user_rm(args):
+ api = args.subparser
+ request_url = f"{server_url(args.server)}/api/{api}/{args.resource}"
+ headers = {
+ **auth_headers(args)
+ }
+
+ data = requests.delete(request_url, headers=headers)
+ if data.status_code < 300:
+ print(f"{data.status_code} {data.reason}")
+ else:
+ raise RuntimeError(f"{data.status_code} {data.reason} {data.content.decode('utf8')}")
+ return 0
+
+
+def group_put(args):
+ members = set(args.members)
+ managers = set(args.managers)
+
+ member_xml_lines = [f"""{m}\n"""
+ for m in (members.union(managers))]
+
+ group_definition = f"""{' '.join(member_xml_lines)}"""
+ response = requests.put(f"{server_url(args.server)}/api/group/{args.resource}", group_definition,
+ headers={
+ **auth_headers(args),
+ "Content-type": "application/xml"
+ })
+ if response.status_code < 300:
+ print(f"{response.status_code} {response.reason}")
+ else:
+ raise RuntimeError(f"{response.status_code} {response.reason} {response.content.decode('utf8')}")
+ return 0
+
+
+def main():
+ ap = argparse.ArgumentParser()
+ authentication_group = ap.add_argument_group()
+ authentication_group.add_argument("--user", action="store", help="user name", default=None)
+ authentication_group.add_argument("--password", action="store", help="password", default=None)
+
+ server_type_group = ap.add_mutually_exclusive_group()
+ server_type_group.add_argument("--dev", action="store_const", dest="server", const="dev",
+ help="Use development server (default)", default="dev")
+ server_type_group.add_argument("--feature", action="store_const", dest="server", const="feature",
+ help="Use feature server")
+ server_type_group.add_argument("--local", action="store_const", dest="server", const="local",
+ help="Use local server (port 3001)")
+ server_type_group.add_argument("--prod", action="store_const", dest="server", const="prod",
+ help="Use production server")
+
+ command_parsers = ap.add_subparsers(title="command", dest="subparser", description="Available commands")
+ up_parser = command_parsers.add_parser("up", help="Check if the server is responding")
+ up_parser.add_argument("--timeout", action="store", dest="timeout", type=float, default=10.0,
+ help="Time in seconds to wait for a response")
+ up_parser.set_defaults(func=up)
+
+ data_type_for = lambda subparser: subparser.add_argument("data_type", action="store", type=str,
+ choices=data_types,
+ help="Type of resource")
+ resource_for = lambda subparser: subparser.add_argument("resource", action="store", type=str,
+ help="Name of database resource")
+ file_for = lambda subparser: subparser.add_argument("file", action="store", type=str, nargs="?", default=None,
+ help="File containing data to post (default: stdin)")
+ output_for = lambda subparser: subparser.add_argument("--output", action="store", dest="output",
+ help="Output file (default: stdout)")
+
+ ls_parser = command_parsers.add_parser("ls", aliases=["search"], help="List resources or search the database")
+ data_type_for(ls_parser)
+ ls_parser.add_argument("--query", dest="query", help="Search text (must be quoted if it has whitespace)")
+ ls_parser.set_defaults(func=ls)
+
+ get_parser = command_parsers.add_parser("get", help="Get the content of a resource")
+ data_type_for(get_parser)
+ resource_for(get_parser)
+ output_for(get_parser)
+ get_parser.set_defaults(func=get)
+
+ post_parser = command_parsers.add_parser("post", help="Post a new resource of the given data type")
+ data_type_for(post_parser)
+ file_for(post_parser)
+ post_parser.set_defaults(func=post)
+
+ put_parser = command_parsers.add_parser("put", help="Overwrite the content of the given resource")
+ data_type_for(put_parser)
+ resource_for(put_parser)
+ file_for(put_parser)
+ put_parser.set_defaults(func=put)
+
+ delete_parser = command_parsers.add_parser("delete", aliases=["rm"], help="Remove a resource from the database")
+ data_type_for(delete_parser)
+ resource_for(delete_parser)
+ delete_parser.set_defaults(func=rm)
+
+ combine_parser = command_parsers.add_parser("combine", aliases=["transclude"],
+ help="Retrieve a resource with combined overlapping XML hierarchies "
+ "(or transcluded to include all included data from other resources)")
+ resource_for(combine_parser)
+ combine_parser.add_argument("--html", action="store_true", dest="html", default=False, help="Output in HTML")
+ output_for(combine_parser)
+ combine_parser.set_defaults(func=combine)
+
+ validate_parser = command_parsers.add_parser("validate", help="Validate JLPTEI")
+ data_type_for(validate_parser)
+ resource_for(validate_parser)
+ file_for(validate_parser)
+ validate_parser.set_defaults(func=validate)
+
+ access_parser = command_parsers.add_parser("access", help="Get access constraints",
+ description="Determine access constraints on a resource.\n"
+ "Output format: :() \n"
+ "Permissions are:\n"
+ "r - read\n"
+ "w - write\n"
+ "m - chmod (change permissions)\n"
+ "l - change license",
+ formatter_class=argparse.RawTextHelpFormatter)
+ data_type_for(access_parser)
+ resource_for(access_parser)
+ access_parser.set_defaults(func=access)
+
+ chmod_parser = command_parsers.add_parser("chmod", help="Change access for a resource")
+ data_type_for(chmod_parser)
+ resource_for(chmod_parser)
+ chmod_parser.add_argument("--owner", action="store", default=None, help="Change owner")
+ chmod_parser.add_argument("--group", action="store", default=None, help="Change group")
+ chmod_parser.add_argument("-g", nargs=1, choices=["w", "-"], default=None, help="set group privileges (write)")
+ chmod_parser.add_argument("-o", nargs=1, choices=["rw", "r", "w", "-"], default=None, help="set other read/write privileges")
+ chmod_parser.set_defaults(func=chmod)
+
+ transliterate_parser = command_parsers.add_parser("transliterate", help="Transliterate text")
+ transliterate_parser.add_argument("table", help="transliteration table")
+ file_for(transliterate_parser)
+ output_for(transliterate_parser)
+ transliterate_parser.add_argument("--text", action="store_true", default=False,
+ help="treat the input data as text instead of XML")
+ transliterate_parser.set_defaults(func=transliterate)
+
+ jobs_parser = command_parsers.add_parser("jobs", help="Compilation jobs")
+ jobs_parsers = jobs_parser.add_subparsers(title="jobs_commands", dest="jobs_command", description="Jobs commands")
+
+ jobs_ls_parser = jobs_parsers.add_parser("ls", help="List jobs")
+ jobs_ls_parser.set_defaults(func=jobs_ls)
+
+ jobs_status_parser = jobs_parsers.add_parser("status", help="Get job status")
+ jobs_status_parser.add_argument("id", action="store", type=str, help="Job identifier")
+ jobs_status_parser.set_defaults(func=jobs_status)
+
+ changes_parser = command_parsers.add_parser("changes", help="Show recent changes")
+ changes_parser.set_defaults(func=changes)
+
+ login_parser = command_parsers.add_parser("login", help="Check a username/password")
+ login_parser.set_defaults(func=login)
+
+ user_parser = command_parsers.add_parser("user", help="User commands")
+ user_parsers = user_parser.add_subparsers(title="user_commands", dest="user_command", description="User commands")
+
+ user_ls_parser = user_parsers.add_parser("ls", aliases=["search"], help="List or find users")
+ user_ls_parser.add_argument("--query", action="store", default=None, help="Search query")
+ user_ls_parser.set_defaults(func=user_ls)
+
+ user_new_parser = user_parsers.add_parser("new", help="Sign up as a new user")
+ user_new_parser.add_argument("name", action="store", help="User name")
+ user_new_parser.add_argument("--passwd", dest="passwd", action="store", help="Password (may also be typed)")
+ user_new_parser.set_defaults(func=user_new)
+
+ user_passwd_parser = user_parsers.add_parser("passwd", help="Change a password")
+ user_passwd_parser.add_argument("name", action="store", help="User name")
+ user_passwd_parser.add_argument("--passwd", dest="passwd", action="store", help="Password (may also be typed)")
+ user_passwd_parser.set_defaults(func=user_new)
+
+ user_get = user_parsers.add_parser("get", help="Get a user or contributor profile")
+ resource_for(user_get)
+ output_for(user_get)
+ user_get.set_defaults(func=get)
+
+ user_put = user_parsers.add_parser("put", help="Replace a user or contributor profile")
+ resource_for(user_put)
+ file_for(user_put)
+ user_put.set_defaults(func=put)
+
+ user_validate = user_parsers.add_parser("validate", help="Validate a user or contributor profile")
+ resource_for(user_validate)
+ file_for(user_validate)
+ user_validate.set_defaults(func=validate)
+
+ user_groups_parser = user_parsers.add_parser("groups", help="List the groups a user is a member and manager* of")
+ resource_for(user_groups_parser)
+ user_groups_parser.set_defaults(func=user_groups)
+
+ user_delete_parser = user_parsers.add_parser("delete", aliases=["rm"], help="Remove a user or contributor")
+ resource_for(user_delete_parser)
+ user_delete_parser.set_defaults(func=user_rm)
+
+ group_parser = command_parsers.add_parser("group", help="Group commands")
+ group_parsers = group_parser.add_subparsers(title="group_commands", dest="group_command",
+ description="Group commands")
+
+ group_ls_parser = group_parsers.add_parser("ls", aliases=["search"], help="List or find groups")
+ group_ls_parser.add_argument("--query", action="store", default=None, help=argparse.SUPPRESS)
+ group_ls_parser.set_defaults(func=user_ls)
+
+ group_get_parser = group_parsers.add_parser("get", help="List users and managers* of a group")
+ resource_for(group_get_parser)
+ group_get_parser.set_defaults(func=group_get)
+
+ group_new_parser = group_parsers.add_parser("new", aliases=["put"],
+ help="Create a new group or edit an existing group, "
+ "setting members and managers")
+ resource_for(group_new_parser)
+ group_new_parser.add_argument("members", nargs="+", help="List of group members (users)")
+ group_new_parser.add_argument("--managers", nargs="+", help="List of group managers (users)")
+ group_new_parser.set_defaults(func=group_put)
+
+ group_delete_parser = group_parsers.add_parser("delete", aliases=["rm"], help="Remove a group from the database")
+ resource_for(group_delete_parser)
+ group_delete_parser.set_defaults(func=user_rm)
+
+ args = ap.parse_args()
+ return args.func(args)
+
+
+if __name__ == "__main__":
+ sys.exit(main())
diff --git a/python/removeFromBackup.py b/python/removeFromBackup.py
new file mode 100644
index 00000000..c5e3b942
--- /dev/null
+++ b/python/removeFromBackup.py
@@ -0,0 +1,73 @@
+#!/usr/bin/env python3
+#
+# given a path to a backup, remove a selected set of files/directories by regexp
+#
+# Open Siddur Project
+# Copyright 2010-2014,2019 Efraim Feinstein
+# Licensed under the GNU Lesser General Public License, version 3 or later
+#
+import sys
+import re
+import os
+import shutil
+import argparse
+from lxml import etree
+
+exNS = 'http://exist.sourceforge.net/NS/exist'
+
+verbose = False
+
+def load_regexps(f):
+ return re.compile("|".join([line.strip() for line in f if line.strip()]))
+
+
+def should_remove(pth, remove_regexps, elem, remove_system_files):
+ # return true if the file or collection referenced should be removed
+ return (
+ ( # this is a clue that the file was autoinstalled
+ (pth.startswith("/db/data/") and "owner" in elem.attrib and elem.attrib["owner"] == "SYSTEM")
+ if remove_system_files
+ else False
+ )
+ or remove_regexps.match(pth) is not None
+ )
+
+
+def remove_from_filesystem(directory, filename):
+ full_path = os.path.join(directory, filename)
+ try:
+ if verbose:
+ print("Removing ", full_path)
+ os.remove(full_path)
+ except OSError: # it's a directory
+ shutil.rmtree(full_path)
+
+
+def remove_from_backup(path_to_content_xml, remove_regexps, remove_system_files):
+ content_path = os.path.join(path_to_content_xml, "__contents__.xml")
+ content_xml = etree.parse(content_path)
+ # find all subcollection and resource elements
+ for candidate in content_xml.findall('.//{' + exNS + '}resource') + content_xml.findall('.//{' + exNS + '}subcollection'):
+ db_path = re.sub("^.*/db", "/db", path_to_content_xml)
+ if should_remove(os.path.join(db_path, candidate.attrib["name"]), remove_regexps, candidate, remove_system_files):
+ # if shouldRemove, remove it
+ candidate.getparent().remove(candidate)
+ remove_from_filesystem(path_to_content_xml, candidate.attrib["filename"])
+ elif candidate.tag == "{"+exNS+"}subcollection":
+ # if not and subcollection, recurse to that directory
+ remove_from_backup(os.path.join(path_to_content_xml, candidate.attrib["filename"]),
+ remove_regexps, remove_system_files)
+ # rewrite out content_xml as it now stands:
+ content_xml.write(content_path)
+
+
+if __name__ == "__main__":
+ parser = argparse.ArgumentParser()
+ parser.add_argument('-s', '--include_system_files', action="store_false", dest="remove_system_files", default=True)
+ parser.add_argument('-v', '--verbose', action="store_true", dest="verbose", default=False)
+ parser.add_argument("path", action="store")
+ args = parser.parse_args()
+
+ verbose = args.verbose
+ toRemove = load_regexps(sys.stdin)
+ remove_from_backup(args.path, toRemove, args.remove_system_files)
diff --git a/python/requirements.txt b/python/requirements.txt
new file mode 100644
index 00000000..b4531941
--- /dev/null
+++ b/python/requirements.txt
@@ -0,0 +1,2 @@
+requests
+lxml
\ No newline at end of file
diff --git a/python/wait_for_up.py b/python/wait_for_up.py
new file mode 100755
index 00000000..b1407944
--- /dev/null
+++ b/python/wait_for_up.py
@@ -0,0 +1,51 @@
+#!/usr/bin/env python3
+import argparse
+import http.client
+import sys
+import time
+
+DEFAULT_HOST = "localhost"
+DEFAULT_PORT = 5000
+DEFAULT_PREFIX = "/exist/restxq"
+
+
+def http_request(host, port, request_uri):
+ conn = http.client.HTTPConnection(host, port)
+ conn.request("GET", request_uri)
+
+ response = conn.getresponse()
+ data = response.read()
+ code = response.status
+ conn.close()
+
+ return data, code
+
+
+def wait_for_uptime(host=DEFAULT_HOST, port=DEFAULT_PORT, max_timeout_s=240):
+ up = False
+ start_time = time.time()
+ elapsed_time = 0
+
+ while not up and elapsed_time < max_timeout_s:
+ try:
+ _, code = http_request(host, port, "/") # check if eXist is serving any web page
+ except (ConnectionResetError, ConnectionRefusedError, http.client.BadStatusLine):
+ code = 0
+ elapsed_time = time.time() - start_time
+ up = code == 200
+ if not up:
+ time.sleep(1)
+
+ return up
+
+
+ap = argparse.ArgumentParser()
+ap.add_argument("--host", default="localhost", dest="host", type=str)
+ap.add_argument("--port", default=5000, dest="port", type=int)
+ap.add_argument("--timeout", default=86400, dest="timeout", type=int)
+args = ap.parse_args()
+
+print("Waiting {}s for server {}:{} to be up...".format(args.timeout, args.host, args.port))
+if not wait_for_uptime(host=args.host, port=args.port, max_timeout_s=args.timeout):
+ print("Server is down.")
+ sys.exit(2)
diff --git a/schema/Makefile b/schema/Makefile
deleted file mode 100644
index c48b767c..00000000
--- a/schema/Makefile
+++ /dev/null
@@ -1,75 +0,0 @@
-# Makefile for the schema directory.
-#
-# Sets up dependencies for the XSLT files
-# Assumes that it will be included after the definitions in the top level Makefile
-#
-# Copyright 2008-2012 Efraim Feinstein
-#
-# This program is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Lesser General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU Lesser General Public License
-# along with this program. If not, see http://www.gnu.org/licenses/
-#
-
-# the TEI dependencies include everything
-TEI_DEPENDENCIES:=$(wildcard $(LIBDIR)/tei/P5/Source/Specs/*.xml)
-TEI_ALL_ODD = $(LIBDIR)/tei/P5/Exemplars/tei_all.odd
-
-.PHONY: schema-build-clean
-schema-build-clean:
- rm -fr schema/build
-
-jlptei-schema-clean:
- rm -fr schema/build/jlptei.*
-
-.PHONY: jlptei-schema
-jlptei-schema: schema/build/jlptei.xsl2
-
-.PHONY: p5subset
-p5subset: $(LIBDIR)/tei/P5/p5subset.xml
-
-$(LIBDIR)/tei/P5/p5subset.xml: $(wildcard $(ODDDIR)/*.xml) $(wildcard $(ODDDIR)/*.sch) $(wildcard $(ODDDIR)/*.xsl2) $(ODDDIR)/Makefile
- cd $(LIBDIR)/tei/P5 && make p5subset.xml
-
-schema/build/jlptei.doc.html: schema/build/jlptei.isosch
-schema/build/jlptei.isosch: p5subset schema/jlptei.xml
- $(TEIROMA) --nodtd --noxsd --isoschematron schema/jlptei.xml schema/build
-schema/build/jlptei.xsl2: schema/build/jlptei.isosch
- $(XSLT) -s $< -o $@ lib/iso-schematron/iso_svrl_for_xslt2.xsl
-
-.PHONY: transliteration-schema
-transliteration-schema: schema/build/transliteration.xsl2
-
-schema/build/transliteration.xsl2: schema/transliteration.sch
- $(XSLT) -s $< -o $@ lib/iso-schematron/iso_svrl_for_xslt2.xsl
-
-.PHONY: contributor-schema contributor-schema-clean bibliography-schema bibliography-schema-clean
-contributor-schema: schema/build/contributor.rnc
-
-bibliography-schema: schema/build/bibliography.xsl2
-
-schema/build/contributor.rnc: p5subset schema/build schema/contributor.xml
- $(TEIROMA) --nodtd --noxsd schema/contributor.xml schema/build
-
-schema/build/bibliography.isosch: schema/build/bibliography.rnc
-schema/build/bibliography.rnc: p5subset schema/build schema/bibliography.xml
- $(TEIROMA) --nodtd --noxsd --isoschematron schema/bibliography.xml schema/build
-schema/build/bibliography.xsl2: schema/build/bibliography.isosch
- $(XSLT) -s $< -o $@ lib/iso-schematron/iso_svrl_for_xslt2.xsl
-
-contributor-schema-clean:
- rm -fr schema/build/contributor.*
-
-bibliography-schema-clean:
- rm -fr schema/build/bibliography.*
-
-schema/build:
- mkdir -p schema/build
diff --git a/schema/access.rnc b/schema/access.rnc
deleted file mode 100644
index 086206f8..00000000
--- a/schema/access.rnc
+++ /dev/null
@@ -1,45 +0,0 @@
-# Access rights XML
-# Open Siddur Project
-# Copyright 2012 Efraim Feinstein
-# Licensed under the GNU Lesser General Public License, version 3 or later
-default namespace = "http://jewishliturgy.org/ns/access/1.0"
-
-start = Access
-
-# ThreeWay switch:
-# true, false, inherit. The latter indicates that the given exception should not interfere with
-# other defaults or exceptions
-ThreeWay = ( "true" | "false" | "inherit" )
-
-Permissions = (
- attribute read { xsd:boolean },
- attribute write { xsd:boolean }
-)
-
-Read = (
- attribute read { xsd:boolean }
-)
-
-Write = (
- attribute write { xsd:boolean }
-)
-
-Access = element access {
- # default sets of permissions for owner/owner group/world
- # no permissions for owner because you cannot make something read-only or unreadable for its owner
- element owner { xsd:string },
- element group { Write, xsd:string },
- # default permissions to a user who is not the owner, not in the owning group, or not logged in
- element world { Read, Write },
- # user and group exceptions: which user/group is excepted and what the exceptions are.
- # sharing is processed before denial
- # for sharing, you may share read access read/write access
- # for denial, you may deny write access or read/write access
- # to deny read access, set @read="false"
- (
- element share-user { Write, xsd:string } |
- element deny-user { Read, xsd:string } |
- element share-group { Write, xsd:string } |
- element deny-group { Read, xsd:string }
- )*
-}
diff --git a/schema/jlptei.xml b/schema/jlptei.xml
deleted file mode 100644
index 3f8f5d6c..00000000
--- a/schema/jlptei.xml
+++ /dev/null
@@ -1,734 +0,0 @@
-
-
-
-
-
- Open Siddur Jewish Liturgy TEI extension
- Efraim Feinstein
- Syd Bauman
- Lou Burnard
- Sebastian Rahtz
-
-
-
-
-
-
-
- http://jewishliturgy.org/ns/jlptei/1.0
-
-
-
Initially created on Thursday 12th
- October 2006 by the form at
- http://www.tei-c.org.uk/Roma/.
-
-
-
- Change bare TEI ODD to JLPTEI
- rewrite as new-style ODD
- Removed further elements added
-since this ODD was first created
- Added prose and reorganized
-structure to make it more document-like; changed deletion of attribute
-decls into deletion of att.declaring class; add deletes for elements
-email and floatingText added to P5 since this ODD was first created;
-considered but did not implement removal of all irrelevant datatype specs...
- Made valid: removed empty prefix attributeadded required type attribute to
- classSpecsAlso
- removed extraneous altIdent elements, improved
- sourceDesc, changed the ident of schemaSpec
- to match the filename, and added this revision description.
-
-
-
-
-
-
-
-
This customization produces an extension usable in tagging Jewish liturgy for the Open Siddur Project.
-
Introduction
-On the most basic level, the siddur is simple text. As such, on first thought, a transcription of the material on a wiki, in a word processor document, or in a text file would seem sufficient for its representation. If that is the case, why define an XML encoding? And why does JLPTEI require the features it does? This introduction addresses the essential problems in representing the Jewish liturgy on a computer and how JLPTEI approaches the problems. It also gives the reasons behind some of the tradeoffs that were made in the design of JLPTEI.
-JLPTEI is a technical means to achieving the Open Siddur Project's Mission Statement. As such, it must support "texts and supplemental material that may be accessed, shared, adapted, and improved on by the entire Jewish community," "a non-prescriptive attitude towards the manner in which individuals and communities engage tradition," "pluralism that reflects the multiplicity of creative expressions possible," and "awareness of historical, geographical, and philosophical diversity in Jewish communities." Respect for communal and individual diversity is at the core of the Open Siddur/Jewish Liturgy Project's mission, and guides the project's technological vision.
-There is no such thing as a single text called The Siddur. On the broadest scale, siddur texts may be divided by rite (nusah). However, even accepting that there are multiple base texts, neither is there a single Ashkenazic siddur, Hasidic siddur, Sephardic siddur, etc. A rite is a major division which uniquely specifies a common denominator of customs within a group of customs. Within Ashkenaz, there are differences between the Polish and German customs. The Iraqi custom is not the same as the Yemenite custom, and the Lubavitch custom is not the same as the Breslov custom. There are also divisions within each rite along major the philosophical boundaries that have developed in recent centuries, which lead to differences in custom and text. The traditional-egalitarian rite (usually a variant of the Ashkenazic rite), for example, is still undergoing major evolution. As such, it is impossible to maintain a single source text. It is possible to maintain a bank of source texts, calling each one by the name of a given rite. The latter is the approach taken by many vendors, who will sell an electronic edition of a base-text siddur from a given rite. However, from a philosophical perspective, that approach fails to recognize diversity within Jewish communities, and essentially requires the project to canonize one text over another in the distributed version. Further, from a technical perspective, as more base texts are completed, the project becomes unscalable; with many copies of common texts in the archive, both correcting mistakes and remixing content in novel ways become increasingly difficult.
-In addition, a modern siddur is expected to contain more than simple text. Aligned translations and transliterations and linked commentaries are usual fare. Some siddurim also contain art. As an online project, we also have the opportunity to link additional non-textual material, such as audio or video.
-As a member of the community at large, it is also important to maintain a chain of credit and responsibility for our contributors, and a chain of bibliographic credit for ideas. This necessarily involves maintaining a great deal of metadata in addition to the texts and supplementary material.
-The Open Siddur, therefore, takes a different approach, which is realized in the JLPTEI design. This approach involves (1) minimizing the amount of stored text, (2) storing the differences between the texts and (3) having user-selectable sets of conditions that specify when each variant is selected. If a typo is corrected in one variant, it is naturally corrected for all variants. Any stored metadata is also automatically consistent between all texts. An additional advantage of this approach is that a community with a custom that differs from the “base” custom of the rite only has to make a different choice of variants. No change is required in the text in order to support a slightly differing custom.
-Aside from text versioning, a second major problem in representation is what should be represented. A user working on a word processor or desktop publishing system would first consider presentation. What is considered good presentation form is up to individual taste, and tastes are expected to change far more rapidly than the text. In a system intended for universal use, we must encode, along with the text, sufficient information to present the text. What we encode, however, should be intrinsic to the text, not to any aspect of its presentation. Separating the encoding of document structure from its presentation allows each user to make the presentation conform to his/her own tastes without duplicating effort on the encoding side.
-The primary question then becomes: which structure should be encoded? Prose can be divided into paragraphs and sentences, poetic text can be divided into line groups and verse lines, lists into items and lists, etc. Many parts of the siddur have more than one structure on the same text! XML assumes that a document has a pure hierarchical tree structure. This suggests that XML is not an appropriate encoding technology for the siddur. At the same time, XML encoding is nearly universally standard and more software tools support XML-based formats than other encoding formats. One of the primary innovations of JLPTEI is its particular encoding of concurrent structural hierarchies. While the idea is not novel, the implementation is. The potential for the existence of concurrent structure is a guiding force in JLPTEI design.
-The disadvantage of JLPTEI's encoding solutions is that the archival form of the text is not immediately consumable by humans. We are forced to rely extensively on processing software to make the format editable and displayable. The disadvantage, however, is balanced by the encoding format's extensibility and conservation of human labor.
-The Open Siddur intends to work within open standards whenever possible. In choosing a basis for our encoding, we searched for available encoding standards that would suit our purposes. We seriously considered using Open Scripture Information Standard (OSIS), an XML format used for encoding bibles. It was quickly discovered that representations of some of the more advanced features required to encode the liturgy (such as those discussed above) would have to be "hacked" on top of the standard. The Text Encoding Initiative (TEI) XML format is a de-facto standard within the digital humanities community. It is also is specified in well-documented texts, is actively supported by tools, and has a large community built around its use and development. Further, the standard is deliberately extensible using a relatively simple mechanism. The TEI was therefore a natural choice as a basis for our encoding.
-
-
- File structure
-
-
-
- The header
-
-
-
-
-
- Basic text structure
-
-
-
- The text stream
-
-
-
-
- Concurrent text hierarchies
-
-
-
- Translations and parallel texts
-
-
-
- Instructions and annotations
-
-
-
- Conditional texts
-
-
-
-
-
-
-
- Citations
-
-
-
- Support files
-
-
- Transliteration
-
-
-
Have their own schemas
-
-
-
-
- Formal declaration
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- indicates the default language of the text in the document. Required because it determines how the document will be indexed in the database.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Test that internal #range pointers point to a reasonable range
-
-
- In a #range(lptr,rptr) XPath expression, the left pointer must precede the right pointer.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Group elements that declare responsibility over a portion of text.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Holds features and feature structures pertaining to the conditional system.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Holds standoff markup links
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- A resource that holds annotations, such as notes or standoff annotations.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Generated segment.
-
-
- Type of segment generation that is required.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Indicates the portion of a text that is read in read-written (kri-ktiv) choice.
-
-
-
-
-
-
-
-
-
- Indicates the part of a text that is written
-
-
-
-
-
-
-
-
-
- Marks a section of text, which may be included, depending on the result of a conditional evaluation.
-
-
-
-
-
-
-
-
-
-
-
- Responsibility type, indicated using one of the allowed MARC relator codes, as defined at http://www.loc.gov/marc/relators/relacode.html
-aut (author), edt (editor), fac (facsimilist, scanner?), fnd (funder), pfr (proofreader), spn, (sponsor), trl (translator), trc (transcriber)
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Contains a proper name for the Deity.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- A special type of linkGrp that groups units of parallel text by language. The ptr
- elements must have xml:lang attributes
-
-
-
-
-
-
-
-
-
-
-
- Every tei:ptr inside a parallelGrp requires @xml:lang.
-
-
-
-
- The main body element for a text that consists of a parallelization of multiple texts.
-
-
- The segmentation level at which the parallelization is done, for example, segment, verse, paragraph, line-group, line, etc. Use one of the recommended values unless none of them makes sense.
-
-
-
- other
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- A hierarchic layer of text. @type should indicate what layer is being provided, and all the top level contained elements should be consistent with that type.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Indicates what type of hierarchic layer is being constructed
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Only internal pointers are allowed inside concurrent structures
-
-
- All pointers in layers must point into the text stream.
-
-
-
-
-
- A list of concurrent hierarchies of one or more layers.
-
-
-
-
-
-
-
-
-
-
- A continuous stream of segmented text, suitable for concurrent hierarchies. Every element contained in a textStream must be able to be referenced by @xml:id or using a range XPointer.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- An @xml:id attribute is required on all elements in a text stream.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Prof. Kirk E. Lowery, Executive
-Editor <Kirk@GrovesCenter.org> Stephen
-K. Salisbury, Editor <Steve@GrovesCenter.org> The
-J. Alan Groves Center for Advanced Biblical Research 2960 Church
-Road Glenside, Pennsylvania 19038-2000 U.S.A.
-
-
Note: In December 2006, the Westminster
-Hebrew Institute was officially renamed the J. Alan
-Groves Center for Advanced Biblical Research in honor of its
-founder, who died shortly thereafter of cancer.
-
In July/August 2009 the Groves Center became an independent
-non-profit organization (and became an official “501(c)3”
-public charity under US Federal law in January 2011) and is no longer
-an official part of Westminster Theological Seminary, though the
-Groves Center continues to reside on the campus of Westminster
-Theological Seminary, which is located in Glenside, Pennsylvania,
-U.S.A., a suburb of Philadelphia.
-
Major
-Changes for this Release
-
· We
-have added the new documentation file “WLCmanual416.pdf”
-(which describes the lay-out of the Westminster Leningrad Codex
-“wlc416_ps.txt”)
-as well as this file (“WLC_ReleaseNotes416.html”).
-
· This
-release includes a large number of changes to the text. Our goal,
-like that of Biblia Hebraica Quinta (BHQ), is to represent the text
-of the Leningrad Codex as accurately as possible. This means that we
-will sometimes disagree with Biblia Hebraica Stuttgarentsia (BHS).
-Many of these changes came from a review of the first five volumes
-(#18 – Megilloth, #5 – Deuteronomy, #20 –
-Ezra-Nehemiah, #17 – Proverbs, and #13 – The Twelve Minor
-Prophets) of BHQ, the successor to BHS. The bracket note “]Q”
-(introduced in WLC 4.12) marks each morpheme where we agree with BHQ
-against BHS and is always accompanied by at least one more bracket
-note to indicate the type of difference we have against BHS. We will
-continue to verify our text against the Leningrad Codex with the help
-of future fascicles of BHQ.
-
· We
-have discovered several differences against these first five
-fascicles of BHQ. In WLC 4.14 we introduced the upper case bracket
-notes “]C”
-to indicate accent differences against BHQ, “]P”
-to indicate punctuation differences against BHQ and “]V”
-to indicate vowel differences against BHQ. In the current release we
-encountered a consonant difference against BHQ, and so introduced the
-new bracket note “]K”
-for that purpose. We have also added a new bracket note “]U”
-to indicate that we agree with both BHS 1997 and BHQ on an unexpected
-reading. This is similar to our bracket note “]1”,
-which refers to unexpected readings in BHS (and is still used in
-books for which a fascicle of BHQ has not yet been published).
-
· We
-have completed a major clean-up of bracket notes. We have removed all
-“]2”
-bracket notes, replacing them with “]1” (or, when
-appropriate, “]U”). These notes were of historical value
-only. We have also removed all “]9”
-bracket notes from our text. In each of these cases, our text in WLC
-4.14 and earlier was following BHS instead of the Leningrad Codex. In
-this release we have changed our text to always follow the Leningrad
-Codex, thus there are no more “]9”
-notes. Finally we have removed all “]m”
-bracket notes from our text. The “]m”
-bracket notes were only documented as “miscellaneous” or
-“multiple” bracket notes, but we currently have no
-explanation for the seven words that had that bracket note, so the
-seven words that had a “]m”
-bracket note were reviewed and replaced with a more appropriate
-bracket note or none at all. We have also removed all obsolete “]3”
-bracket notes and replaced the ones that were appropriate with the
-more specific bracket notes “]c”,
-“]k”,
-“]p”, and
-“]v”,
-indicating that we disagree with BHS over an accent, a consonant, a
-piece of punctuation, or a vowel, respectively.
-
NOTE:
-Any users who wish to ignore the new bracket notes “]C”,
-“]K”,
-“]P”,
-“]Q”,
-and “]V”
-can simply delete them. Also in the
-same way, the more specific bracket notes “]M”
-and “]F”
-can be converted back to their old
-form “]m”,
-the new bracket note “]U”
-can be changed back to its older
-form “]1”,
-and the bracket notes “]c”,
-“]k”,
-“]p”
-and “]v”
-can be converted back into their
-old form “]3”.
-
-
-
Additional
-Comments about this Release:
-
· As
-in the five previous releases (4.6, 4.8, 4.10, 4.12 and 4.14), the
-hypothetical pointing of Ketiv morphemes that is found in our
-morphology has not been included in the Westminster Leningrad Codex,
-wlc416_ps.txt. Hypothetical pointing of Ketiv text is
-necessary for the Westminster Hebrew Morphology but since such
-hypothetical pointing is an interpretation (rather than a
-representation) of the text of the Leningrad Codex, it is not
-included in wlc416_ps.txt.
-
· The
-WLC manual has been created to reflect the content of the WLC as of
-version 4.16.
-
· The
-file wlc416_ps.txt contains a header comment of a dozen or so
-lines beginning with “#” that identify the file as coming
-from the J. Alan Groves Center for Advanced Biblical Research and
-provide identifying information about the sources used to create each
-file (the date and time and the internal revision number) as well as
-copyright and contact information. (The header comments on this file
-was introduced in the corresponding file in the WLC 4.8 release.)
-
· In
-this release we have included an MD5 check-sum for the file
-wlc416_ps.txt.
-
Textual
-Corrections
-
We have also made several changes to the text of WLC in places
-where we found we did not match the Leningrad Codex. This sometimes
-(but not always) causes us to disagree with BHS. This release
-includes a number of changes to Ketiv-Qere readings as well as a few
-other consonants, vowels, and many accents. These changes usually
-cause us to disagree with BHS, though occasionally a change actually
-causes us to remove a disagreement with BHS.
-
Contributors
-
We are grateful to the many
-individuals who have taken the time and trouble to report errors or
-suggestions for improvement, both in our morphology database and in
-the underlying text. (We keep track of these error reports and
-suggestions in a database and refer to them all as “issues.”)
- In particular, we want to recognize Marianne
-Brown & A. Philip Brown II (Cincinnati,
-Ohio, U.S.A.), who contributed roughly 275 of the issues
-resolved in the 4.16 release of the Westminster Hebrew Morphology
-that involved changes to the text of the Westminster Leningrad Codex.
- A large number of issues also came from reviewing the Hebrew and
-Aramaic text and the footnotes in the apparatus of the first five
-fascicles of Biblia Hebraica Quinta (BHQ). A few individuals
-submitted an issue or two, and a few contributors have submitted
-several issues, but we have not listed those who contributed fewer
-than a dozen of the text-related issues that we have resolved in this
-release.
-
Reporting
-Errors
-
Error reports are always
-welcome. Please e-mail Stephen Salisbury
-<Steve@GrovesCenter.org>
-with a description of the error.
“Westminster
- Leningrad
- Codex”: one verse
- per line, including Peh
- and Samekh
- marks but without
- hypothetical pointing of
- Ketiv
- words (with a 12-line
- header comment).
-
-
-
-
-
wlc416_ps.md5sum
-
-
-
Message Digest 5
- check-sum for “wlc416_ps.txt”
-
-
-
-
-
WLCmanual416.pdf
-
-
-
Primary
- documentation for “wlc416_ps.txt”
-
-
-
-
-
WLC_ReleaseNotes416.html
-
-
-
Release-specific
- news for WLC 4.16 (this
- file)
-
-
-
-
-
michigan.man
-
-
-
Legacy
- documentation
-
-
-
-
-
supplmt.wts
-
-
-
Legacy
- documentation
-
-
-
-
-
-
-
-
-
1See
- http://en.wikipedia.org/wiki/Md5sum
- for more information on the "Message Digest 5 checkSUM".
- Using an associated program, e.g., md5sum.exe,
- one can verify that the downloaded file is bit-for-bit precisely the
- same as the official release version.
-
-
-
\ No newline at end of file
diff --git a/tests/Makefile b/tests/Makefile
deleted file mode 100644
index b80121cf..00000000
--- a/tests/Makefile
+++ /dev/null
@@ -1,18 +0,0 @@
-# Makefile for staging tests/test cache into the database
-#
-# Copyright 2011 Efraim Feinstein
-#
-# This program is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Lesser General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU Lesser General Public License
-# along with this program. If not, see http://www.gnu.org/licenses/
-db-tests:
- @echo
diff --git a/tests/README b/tests/README
deleted file mode 100644
index 63d4979e..00000000
--- a/tests/README
+++ /dev/null
@@ -1,3 +0,0 @@
-The cache directory contains tests that are staged from other places
-in the directory structure into the database as to be used as pre-cached
-resources, for example, for testing the cache.
diff --git a/tests/cache/__override__.xml b/tests/cache/__override__.xml
deleted file mode 100644
index 55966e76..00000000
--- a/tests/cache/__override__.xml
+++ /dev/null
@@ -1,3 +0,0 @@
-
-
-
diff --git a/tests/cache/code/transforms/data-compiler/tests-with-document-uri/__override__.xml b/tests/cache/code/transforms/data-compiler/tests-with-document-uri/__override__.xml
deleted file mode 100644
index 3ca354ff..00000000
--- a/tests/cache/code/transforms/data-compiler/tests-with-document-uri/__override__.xml
+++ /dev/null
@@ -1,3 +0,0 @@
-
-
-
diff --git a/tests/cache/code/transforms/tests/__override__.xml b/tests/cache/code/transforms/tests/__override__.xml
deleted file mode 100644
index c788fa8f..00000000
--- a/tests/cache/code/transforms/tests/__override__.xml
+++ /dev/null
@@ -1,3 +0,0 @@
-
-
-
diff --git a/text/Makefile b/text/Makefile
deleted file mode 100755
index 2c7a0ad1..00000000
--- a/text/Makefile
+++ /dev/null
@@ -1,88 +0,0 @@
-# Makefile for the text directory.
-#
-# Sets up dependencies for the XSLT files
-# Assumes that it will be included after the definitions in the top level Makefile
-#
-# Copyright 2008-2009 Efraim Feinstein
-#
-# This program is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Lesser General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU Lesser General Public License
-# along with this program. If not, see http://www.gnu.org/licenses/
-#
-# $Id: Makefile 298 2009-11-12 00:13:04Z efraim.feinstein $
-
-
-# this is the file we want to start from building:
-#MAINFILE = haggadah.tei
-MAINFILE = haggadat-mah-zot.tei
-
-# NO NEED TO EDIT BEYOND THIS POINT
-
-REVISIONXML = $(TEXTDIR)/revision.xml
-
-# these are the files that should be validated as TEI
-TEIFILES = $(TEXTDIR)/haggadah.tei \
- $(TEXTDIR)/haggadah-en.tei \
- $(TEXTDIR)/haggadah-notes.tei \
- $(TEXTDIR)/haggadat-mah-zot.tei \
- $(TEXTDIR)/haggadah-instruct.tei
-
-# these are files that shouldn't be validated directly as TEI
-# but should be valid when transcluded into certain parts of TEI files
-HELPERTEXTFILES = $(TEXTDIR)/gpl-3.0.jtei \
- $(TEXTDIR)/settings.xml
-
-TRANSLITERATION_TABLES = $(COMMONDIR)/*.tr.xml
-
-TEXT_DEPEND=$(MAINFILE_DEPEND) $(TEXTDIR)/Makefile $(TRANSLITERATION_TABLES)
-
-text-depend: $(ALL_DEPEND) $(TEMPDIR) $(CODEDIR)/depend.xsl2
- echo MAINFILE_DEPEND=`$(XSLT) -s $(TEXTDIR)/$(MAINFILE) $(CODEDIR)/depend.xsl2` >> Makefile.depend 2> $(TEMPDIR)/dump.depend
- echo TANACH_DEPEND = `$(XSLT) -s $(TEXTDIR)/Tanach.tei $(CODEDIR)/depend.xsl2` >> Makefile.depend 2> $(TEMPDIR)/dump.depend
-
-.INTERMEDIATE: bandits-siddur.xml1
-bandits-siddur.xml1: $(REVISIONXML) $(TEXT_DEPEND) $(STAGE1_DEPEND) $(TEMPDIR)
- $(XSLT) -o $@ -s $(TEXTDIR)/bandits-siddur.tei $(CODEDIR)/stage1.xsl2 2> $(TEMPDIR)/dump.1
-
-
-.INTERMEDIATE: haggadah.xml1
-haggadah.xml1: $(REVISIONXML) $(TEXT_DEPEND) $(STAGE1_DEPEND) $(TEMPDIR)
- $(XSLT) -o $@ -s $(TEXTDIR)/$(MAINFILE) $(CODEDIR)/stage1.xsl2 2> $(TEMPDIR)/dump.1
-
-.INTERMEDIATE: Tanach.xml1
-Tanach.xml1: $(TEXTDIR)/Tanach.tei $(TANACH_DEPEND) $(STAGE1_DEPEND) $(TEMPDIR)
- $(XSLT) -o $@ -s $(TEXTDIR)/Tanach.tei $(CODEDIR)/stage1.xsl2 2> $(TEMPDIR)/dump.1
-
-# revision.xml can't depend on itself, so use subst to make sure it's not in $TEXT_DEPEND
-$(REVISIONXML): TEXT_DEPEND_NOREVISION = $(subst $(REVISIONXML), ,$(TEXT_DEPEND))
-$(REVISIONXML): $(CODEDIR)/revision.xml.sh $(CODE_DEPEND) $(TEXT_DEPEND_NOREVISION) $(ODD_DEPEND)
- $(CODEDIR)/revision.xml.sh $(REVISIONXML) $(TOPDIR)
-
-tanach-text: tanach $(TEXTDIR)/Tanach.html
-
-validate: $(TEIFILES) $(HELPERTEXTFILES) odddoc validate-clean
- for t in $(TEIFILES); do $(RELAXNG) "$${t}" >> $(TEMPDIR)/dump.validate 2>> $(TEMPDIR)/dump.validate.err; done
-
-validate-clean:
- rm -f $(TEMPDIR)/dump.validate $(TEMPDIR)/dump.validate.err
-
-haggadah-postcompile:
- rm -f $(REVISIONXML)
-
-haggadah-clean: validate-clean
- rm -f $(TEMPDIR)/dump*
- rm -f *.xml1 *.xml2 *.texml *.tex
- rm -f *.bib *.bbl *.blg *.aux *.log *.out *.pdf
- rm -f $(REVISIONXML)
-
-#tanach-clean:
-# rm -f Tanach.pdf Tanach.aux Tanach.out Tanach.xml? Tanach.texml Tanach.tex