digital media technology week 7: xslt 3. characteristics of digital models □ “a set of...
TRANSCRIPT
Digital Media Technology
Week 7: XSLT 3
Characteristics of digital models
□ “a set of ontological commitments”□ Expressed in a “formal language”
□ Based on a “fragmentary theory of intelligent reasoning” and “shaped by the need for efficient computation”
John Unsworth, “What is Humanities Computing and What is Not?”, 2002.
Text encoding
□ Ontology: DTD□ Formal language: XML
□ Manipulations: XSLT
Artificial Intelligence
□ Reliant on algorithms
□ Alan Turing’s concept of “The Universal Machine”
□ John Searle’s “Chinese Room Argument”
□Exports from UBL catalogue
□Records contain data books and about correspondence
□Groups firstly work separately on assignments; results discussed during presentations
Research project during the Seminar
MARC-XML
SVG
XPath
□ Language for finding information in an XML document
□ Nodes and tokens
□ Xpath expressions are always interpreted in a context
e.g. if context is set at “literatureList”:item/fullTitle/title
e.g. All elements below “imprint”:item/imprint/*
e.g. Elements on any location//title
e.g. Selecting the value of an attribute:item/language/@languageCode
e.g. Selecting only if a condition is true:item/language[ @languageCode = ‘eng’ ]
Counts the number of elements on a particular location
<xsl:value-of select=“count(item)” />
count() function
<xsl:for-each>
□ Use <xsl:for-each> to select all the elements of the same type on a certain level
□ Takes @select, to point to the node
□ Note: <xsl:for-each> changes the context of its children!
<xsl:sort>
□ Use <xsl:sort> to sort a list alphabeticaly or numerically, by the element in the @select attribute
□ <xsl:sort> must be the direct child of <xsl:for-each> (or <xsl:apply-templates>)
<xsl:for-each select=”letter”>
<xsl:sort select=”recipient”/><xsl:value-of select=”year”/>
</xsl:for-each>
<xsl:if>
□ Select an element on the condition that it is present
<xsl:if test=”imprint/date”>
<text>Date: </text><xsl:value-of select=”imprint/date”/>
</xsl:if>