Coder Social home page Coder Social logo

joewiz / tei-simple-pm Goto Github PK

View Code? Open in Web Editor NEW

This project forked from wolfgangmm/tei-simple-pm

0.0 3.0 0.0 19.84 MB

An implementation of the TEI Simple ODD extensions for processing models in XQuery.

XQuery 77.85% HTML 4.64% CSS 4.58% JavaScript 1.77% XSLT 11.16%

tei-simple-pm's Introduction

TEI Simple ODD Extensions for Processing Models in XQuery

TEI Simple adds a processing model for TEI documents which can be expressed with the TEI vocabulary itself, and without requiring any knowledge about the specific target media.

The TEI Simple Processing Model library for eXist facilitates the integration of the TEI Simple processing model into existing applications, supporting a range of different output media without requiring advanced coding skills. Customising the appearance of the text is all done in TEI by mapping each TEI element to a limited set of well-defined behaviour functions, e.g. “paragraph”, “heading”, “note”, “alternate”, etc. TEI Simple includes a standard mapping, which can be extended by overwriting selected elements. Rendition styles are transparently translated into the different output media types like HTML, XSL-FO, LaTeX, or ePUB. Compared to traditional approaches with XSLT or XQuery, TEI Simple may thus easily save a few thousand lines of code for media specific stylesheets.

Demo

A demo of the app is available on

http://showcases.exist-db.org/exist/apps/tei-simple/index.html

The library modules are also used by the Early English Books demo which includes more than 30,000 documents:

http://showcases.exist-db.org/exist/apps/eebo/

Installation

A prebuilt version of the app can be installed from eXist's central app repository. On your eXist installation, open the package manager in the dashboard and select "TEI Simple Processing Model" for installation. Dependencies should be installed automatically.

Important: Due to a bug in the 2.2 release, the tei-simple module requires eXistdb 3.0RC1 or later.

Documentation

For an overview of the app and library, please refer to my presentation. There's also some preliminary documentation available.

Building

For PDF output, you need to enable the Apache FOP extension as follows:

  • in extensions/build.properties, set "include.module.xslfo = true"
  • rebuild eXist to install the Apache FOP libraries
  • edit conf.xml and uncomment the fo module:
<module uri="http://exist-db.org/xquery/xslfo" class="org.exist.xquery.modules.xslfo.XSLFOModule">
    <parameter name="processorAdapter" value="org.exist.xquery.modules.xslfo.ApacheFopProcessorAdapter"/>
</module>

tei-simple-pm ships as a .xar package which can be installed into any eXist instance using the dashboard. You may get the latest .xar here:

https://github.com/wolfgangmm/tei-simple-pm/releases/tag/0.4

To build tei-simple-pm, clone the repository and call "ant" in the root directory. This will create a .xar inside the build directory.

License

This software is dual-licensed:

  1. Distributed under a Creative Commons Attribution-ShareAlike 3.0 Unported License http://creativecommons.org/licenses/by-sa/3.0/

  2. http://www.opensource.org/licenses/BSD-2-Clause

All rights reserved. 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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.