IIIF-International image interoperability Framework
XML-Related languages
My experience in data modeling and digital textual scholarship
PhD at University of Reading and King's College on Digital Humanities and Italian Studies
I have mainly worked w
CCeH - Cologne Centre for eHumanities
ERC project - University of Venice
VeDPH - Venice Centre for Digital and Public Humanities
Interdisciplinary and intersectionality
Technologies & Objectives
-
Learning technologies for managing images exposed using IIIF
-
Transform and visualise our TEI/XML documents
-
Learning XML-related languages such as XSLT and XPATH, and XQUERY
-
Using all of the above technologies together
IIIF (International Image Interoperability Framework)
Access to image-based resources is fundamental to many research disciplines, scholarship and the transmission of cultural knowledge.
IIIF (International Image Interoperability Framework)
The principles of Linked Data and the Architecture of the Web are adopted in order to provide a distributed and interoperable system.
The Shared Canvas data model and JSON-LD are leveraged to create an easy-to-implement, JSON-based format. (https://iiif.io/)
IIIF (International Image Interoperability Framework)
The objective of the IIIF (pronounced “Triple-Eye-Eff”) Presentation API is to provide the information necessary to allow a rich, online viewing environment for primarily image-based objects to be presented to a human user, likely in conjunction with the IIIF Image API.
IIIF (International Image Interoperability Framework)
In particular, we are going to work with the Presentation API. It is to provide the information necessary to allow a rich, online viewing environment for primarily image-based objects to be presented to a human user [...]. This is the sole purpose of the API and therefore the descriptive information is given in a way that is intended for humans to read, but not semantically available to machines. [... It] explicitly does not aim to provide metadata that would drive discovery of the digitized objects
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:tei="http://www.tei-c.org/ns/1.0"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
exclude-result-prefixes="xs"
version="2.0">
<xsl:output method="html"/>
<xsl:template match="tei:TEI">
<html>
<head>
<meta charset="UTF-8"/>
</head>
<body>
<xsl:apply-templates/>
</body>
</html>
</xsl:template>
XSLT: What is about?
XSL (eXtensible Stylesheet Language) is a styling language for XML.
XSLT stands for XSL Transformations.
This tutorial will teach you how to use XSLT to transform XML documents into other formats (like transforming XML into HTML).
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:tei="http://www.tei-c.org/ns/1.0"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
exclude-result-prefixes="xs"
version="2.0">
<xsl:output method="html"/>
<xsl:template match="tei:TEI">
<html>
<head>
<meta charset="UTF-8"/>
</head>
<body>
<xsl:apply-templates/>
</body>
</html>
</xsl:template>
Transformation XSLT
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="2.0">
<xsl:output method="xhtml"
doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"/>
<xsl:template match="/">
<html>
<head>
<title><xsl:value-of select="//title"/>
written by <xsl:value-of select="//author"/></title>
</head>
<body>
<xsl:apply-templates/>
</body>
</html>
</xsl:template>
<xsl:template match="title">
<h1>
<xsl:apply-templates/>
</h1>
</xsl:template>
<xsl:template match="author">
<p><i>
<xsl:apply-templates/>
</i></p>
</xsl:template>
<xsl:template match="stanza">
<xsl:apply-templates/>
<br/>
</xsl:template>
<xsl:template match="line">
<div>
<xsl:apply-templates/>
</div>
</xsl:template>
</xsl:stylesheet>
An example:
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:tei="http://www.tei-c.org/ns/1.0"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
exclude-result-prefixes="xs"
version="2.0">
<xsl:output method="html"/>
<xsl:template match="tei:TEI">
<html>
<head>
<meta charset="UTF-8"/>
</head>
<body>
<xsl:apply-templates/>
</body>
</html>
</xsl:template>
XSL (eXtensible Stylesheet Language)
is a styling language for XML.
XSLT stands for XSL Transformations.
FROM XML to DIFFERENT OUTPUT
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:tei="http://www.tei-c.org/ns/1.0"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
exclude-result-prefixes="xs"
version="2.0">
<xsl:output method="html"/>
<xsl:template match="tei:TEI">
<html>
<head>
<meta charset="UTF-8"/>
</head>
<body>
<xsl:apply-templates/>
</body>
</html>
</xsl:template>
XSL (eXtensible Stylesheet Language)
is a styling language for XML.
Transformations
to DIFFERENT OUTPUT
HTML
epub
XML!
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:tei="http://www.tei-c.org/ns/1.0"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
exclude-result-prefixes="xs"
version="2.0">
<xsl:output method="html"/>
<xsl:template match="tei:TEI">
<html>
<head>
<meta charset="UTF-8"/>
</head>
<body>
<xsl:apply-templates/>
</body>
</html>
</xsl:template>
- Xpath interrogates and navigates XML documents
- xslt and xquery depends on it
What is XPath?
- XPath is a major element in the XSLT standard.
- XPath can be used to navigate through elements and attributes in an XML document.
- A language to describe how to locate a part of an XML document
- Used in many XML-based technologies and tools
Xquery
Xquery is a query and functional programming language that queries and transforms collections of structured and unstructured data
XQuery is to XML what SQL is to databases.
XQuery is designed to query XML data.
Xquery
- XQuery is an XML-database query language
- System Basics Like SQL for Relational databases
- W3C Recommendation
Xquery
XQuery was devised primarily as a query language for data stored in XML form. So its main role is to get information out of XML databases — this includes relational databases that store XML data, or that present an XML view of the data they hold.
declare function epidoc:createObjectSourceDesc($id as xs:string, $funcName as xs:string) {
element tei:sourceDesc {
element tei:msDesc {
element tei:msIdentifier {
for $component in $components:components
return
try {
let $funcSetComponentValue := function-lookup(xs:QName(concat($component, ":setComponentValueInMsIdentifier")), 1)
let $funcGetRequestValue := function-lookup(xs:QName(concat($component, $funcName)), 1)
return $funcSetComponentValue($funcGetRequestValue($id))
} catch * {
()
}
},
I instantly like XQuery knowing that the comments are written between smiley faces (: comment :)
Contacts: @tizmancinelli
tiziana.mancinelli@unive.it
Intro XML related languages and IIIF - Bologna, May 2020
By Tiziana Mancinelli
Intro XML related languages and IIIF - Bologna, May 2020
- 858