digital media technology week 7: xslt 3. characteristics of digital models □ “a set of...

22
Digital Media Technology Week 7: XSLT 3

Upload: maude-carpenter

Post on 17-Jan-2018

221 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Digital Media Technology Week 7: XSLT 3. Characteristics of digital models □ “a set of ontological commitments” □ Expressed in a “formal language”

Digital Media Technology

Week 7: XSLT 3

Page 2: Digital Media Technology Week 7: XSLT 3. Characteristics of digital models □ “a set of ontological commitments” □ Expressed in a “formal language”
Page 3: Digital Media Technology Week 7: XSLT 3. Characteristics of digital models □ “a set of ontological commitments” □ Expressed in a “formal language”
Page 4: Digital Media Technology Week 7: XSLT 3. Characteristics of digital models □ “a set of ontological commitments” □ Expressed in a “formal language”

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.

Page 5: Digital Media Technology Week 7: XSLT 3. Characteristics of digital models □ “a set of ontological commitments” □ Expressed in a “formal language”

Text encoding

□ Ontology: DTD□ Formal language: XML

□ Manipulations: XSLT

Page 6: Digital Media Technology Week 7: XSLT 3. Characteristics of digital models □ “a set of ontological commitments” □ Expressed in a “formal language”

Artificial Intelligence

□ Reliant on algorithms

□ Alan Turing’s concept of “The Universal Machine”

□ John Searle’s “Chinese Room Argument”

Page 8: Digital Media Technology Week 7: XSLT 3. Characteristics of digital models □ “a set of ontological commitments” □ Expressed in a “formal language”

□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

Page 9: Digital Media Technology Week 7: XSLT 3. Characteristics of digital models □ “a set of ontological commitments” □ Expressed in a “formal language”

MARC-XML

SVG

Page 10: Digital Media Technology Week 7: XSLT 3. Characteristics of digital models □ “a set of ontological commitments” □ Expressed in a “formal language”

XPath

□ Language for finding information in an XML document

□ Nodes and tokens

□ Xpath expressions are always interpreted in a context

Page 11: Digital Media Technology Week 7: XSLT 3. Characteristics of digital models □ “a set of ontological commitments” □ Expressed in a “formal language”

e.g. if context is set at “literatureList”:item/fullTitle/title

Page 12: Digital Media Technology Week 7: XSLT 3. Characteristics of digital models □ “a set of ontological commitments” □ Expressed in a “formal language”

e.g. All elements below “imprint”:item/imprint/*

Page 13: Digital Media Technology Week 7: XSLT 3. Characteristics of digital models □ “a set of ontological commitments” □ Expressed in a “formal language”

e.g. Elements on any location//title

Page 14: Digital Media Technology Week 7: XSLT 3. Characteristics of digital models □ “a set of ontological commitments” □ Expressed in a “formal language”

e.g. Selecting the value of an attribute:item/language/@languageCode

Page 15: Digital Media Technology Week 7: XSLT 3. Characteristics of digital models □ “a set of ontological commitments” □ Expressed in a “formal language”

e.g. Selecting only if a condition is true:item/language[ @languageCode = ‘eng’ ]

Page 16: Digital Media Technology Week 7: XSLT 3. Characteristics of digital models □ “a set of ontological commitments” □ Expressed in a “formal language”

Counts the number of elements on a particular location

<xsl:value-of select=“count(item)” />

count() function

Page 17: Digital Media Technology Week 7: XSLT 3. Characteristics of digital models □ “a set of ontological commitments” □ Expressed in a “formal language”
Page 18: Digital Media Technology Week 7: XSLT 3. Characteristics of digital models □ “a set of ontological commitments” □ Expressed in a “formal language”
Page 19: Digital Media Technology Week 7: XSLT 3. Characteristics of digital models □ “a set of ontological commitments” □ Expressed in a “formal language”
Page 20: Digital Media Technology Week 7: XSLT 3. Characteristics of digital models □ “a set of ontological commitments” □ Expressed in a “formal language”

<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!

Page 21: Digital Media Technology Week 7: XSLT 3. Characteristics of digital models □ “a set of ontological commitments” □ Expressed in a “formal language”

<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>

Page 22: Digital Media Technology Week 7: XSLT 3. Characteristics of digital models □ “a set of ontological commitments” □ Expressed in a “formal language”

<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>