A B C D E F G H I J K L M N O P Q R S T U V W X Z

CETEIcean ? / XML-TEI zu HTML5 Transformation

https://github.com/TEIC/CETEIcean

CETEIcean lets you display unmodified TEI documents in a web browser! Examples may be found here.

CETEIcean is a Javascript library that allows TEI documents to be displayed in a web browser without first transforming them to HTML. It uses the emerging Web Components standards, especially Custom Elements. It works by loading the TEI file dynamically, renaming the elements to follow the Custom Elements conventions, and registering them with the browser. Browsers that support Web Components will use them to add the appropriate display and behaviors to the TEI elements; other browsers will use fallback methods to achieve the same result.

Because it preserves the full structure and information from your TEI data model, CETEIcean allows you to build rich web applications from your source documents using standard tools like CSS and Javascript.

CETEIcean was inspired by TEI Boilerplate, which also displays TEI in the browser, but differs from it in a couple of important ways. CETEIcean does not rely on an in-browser XSLT transformation, triggered by an XSLT directive in the source, so no modification to the source XML is necessary for it to work. Because it follows the Custom Elements standard, the HTML it produces is valid and there are no possibilities of element name collisions (like HTML <p> vs. TEI <p> for example).

Usage

You can use CETEIcean in your projects just by grabbing the CETEI.js file from the latest release and linking to it in an HTML file like the examples do. Note that you’ll want also to grab the example CSS or make your own. If you want to build and play with it on your own, follow the steps below.

Simple Usage Example

This code fetches a TEI file, transforms it into HTML Custom Elements, and places the result in a div with id „TEI“.

var CETEIcean = new CETEI()
CETEIcean.getHTML5("URL_TO_YOUR_TEI.xml", function(data) {
  document.getElementById("TEI").appendChild(data)
})

Other methods

getHTML5( url, callback, perElementFn )

Returns a Promise that fetches an XML source document then calls the makeHTML5 method on the returned document.

Parameters:

  • url: The XML document will be fetched from the provided URL.
  • callback: A function to be called on the results.
  • perElementFn: A function to be called on each resulting element.

makeHTML5( XML, callback, perElementFn )

Converts the supplied XML string into HTML5 Custom Elements.

Parameters:

  • XML: The XML document serialized to string.
  • callback: A function to be called on the results.
  • perElementFn: A function to be called on each resulting element.

domToHTML5( XML_dom, callback, perElementFn )

Converts the supplied XML string into HTML5 Custom Elements.

Parameters:

  • XML_dom: The XML document as DOM.
  • callback: A function to be called on the results.
  • perElementFn: A function to be called on each resulting element.

unsetNamespace( ns )

To change a namespace to prefix mapping, the namespace must first be unset. Takes a namespace URI. In order to process a TEI P4 document, e.g., the TEI namespace must be unset before it can be set to the empty string.

setBaseUrl( base )

Sets the base URL for the document. Used to rewrite relative links in the XML source (which may be in a completely different location from the HTML wrapper).

Install

Get NodeJS.

Run

npm i

Build

npm run build

puts a copy of CETEI.js in the dist/ folder

Develop

npm run dev

runs a local web server on port 8888. Browse to the examples in the test/ folder. Make changes and they’ll show up when you reload.

Use

Run the build process and then include the generated CETEI.js file in an HTML document like the simpleTest.html file in the test/ folder. Or, use the server-side language and framework of your choice to generate such files on demand.

Customize

TEI documents displayed using CETEIcean can be customized via CSS or by specifying behaviors for individual elements. For documentation on behaviors see the wiki.

Change default Media upload location in WordPress

„In order to change the default media upload location, you need to edit the wp-config.php file located in the root directory of your WordPress installation. If you want upload directory to be wp-content/files then you will need to place the following code in wp-config.php
1

define( ‚UPLOADS‘, ‚wp-content/‘.’files‘ );

If you want the upload directory to be outside wp-content, like http://www.example.com/files/ then you need to set upload path in wp-config.php like this:
1

define( ‚UPLOADS‘, “.’files‘ );

Remember you can still choose whether or not you want uploaded files to be organized in month/year folders in Settings » Media.“

from: https://www.wpbeginner.com/wp-tutorials/how-to-change-the-default-media-upload-location-in-wordpress-3-5/

CLARIN Standards Information System

Die Datenbank CLARIN SIP enthält Informationen zu Standards und Dateiformaten aus den digitalen Textwissenschaften.

Beischreibung von der Projektwebsite:

The CLARIN Standards Information System lists language-technology-related standards that CLARIN centres are willing to accept and recognize, and visualizes some of their interdependencies.

Link zur Website: https://clarin.ids-mannheim.de/standards/

Composer (PHP)

 

So you ran composer as root…

https://getcomposer.org/doc/01-basic-usage.md

https://php-de.github.io/jumpto/composer/#composer-installation

https://linuxize.com/post/how-to-install-and-use-composer-on-ubuntu-18-04/

Converting a Dockerfile to a docker-compose.yml

Let’s assume you have a folder structure for your project like this (directory names are bold) and it is a project thats exposing port 80:

(project root) /
├── index.html
├── script.js
├── style.css
└── Dockerfile

I would encourage you to put all your project related stuff to a subfolder (it is easier to keep track of what folder belongs to which container) so it looks like this:

(project root) /
└── Super cool project /
    ├── index.html
    ├── script.js
    ├── style.css
    └── Dockerfile

A very basic way to „convert“ (or more integrate) your Dockerfile into a docker-compose.yml is the following:

Create a file called „docker-compose.yml“ in your project’s root folder:

(project root) /
├── Super cool project /
│   ├── index.html
│   ├── script.js
│   ├── style.css
│   └── Dockerfile
└── docker-compose.yml

In your docker-compose.yml you now put in the following content:

version: "3.8"
services:
  super-cool-container:
    build: "./Super cool project"
    ports:
      - 80:80

Now you are already good to go! Just go to the folder where your docker-compose.yml is located and run the following command to start all the containers listed in this file as a service:

docker compose up -d

To shut down all the containers just run:

docker compose down

Now you’re good to go! If your container is started with more parameters  etc. you can look up the documentation for docker compose and have a look on how you have to edit your docker compose file to include those parameters.

CQL: Contextual Query Language

https://www.loc.gov/standards/sru/cql/

https://de.wikipedia.org/wiki/Contextual_Query_Language

The Contextual Query Language

CQL, the Contextual Query Language, is a formal language for representing queries to information retrieval systems such as web indexes, bibliographic catalogs and museum collection information. The design objective is that queries be human readable and writable, and that the language be intuitive while maintaining the expressiveness of more complex languages.

Traditionally, query languages have fallen into two camps: Powerful, expressive languages, not easily readable nor writable by non-experts (e.g. SQL, PQF, and XQuery);or simple and intuitive languages not powerful enough to express complex concepts (e.g. CCL and google). CQL tries to combine simplicity and intuitiveness of expression for simple, every day queries, with the richness of more expressive languages to accomodate complex concepts when necessary.

CRMgeo

http://www.cidoc-crm.org/crmgeo/home-5

CRMgeo is a formal ontology intended to be used as a global schema for integrating spatiotemporal properties of temporal entities and persistent items. Its primary purpose is to provide a schema consistent with the CIDOC CRM to integrate geoinformation using the conceptualizations, formal definitions, encoding standards and topological relations defined by the Open Geospatial Consortium (OGC). In order to do this it links the CIDOC CRM to the OGC standard of GeoSPARQL.

CRMgeo provides a refinement of spatial and temporal classes and properties of the CIDOC CRM. It relates them to the classes, topological relations and encodings provided by GeoSPARQL and thus allows spatiotemporal analysis offered by geoinformation systems based on the semantic distinctions of the CIDOC CRM.