
<TEI xmlns="http://www.tei-c.org/ns/1.0" xmlns:h="http://www.w3.org/1999/xhtml">
  <teiHeader xml:lang="de">
    <fileDesc>
      <titleStmt>
        <title type="main">XSLT</title>
        <author>
          <persName>
            <forename>Harald</forename>
            <surname>Lordick</surname>
          </persName>
        </author>
        <respStmt>
          <resp>Projektleitung</resp>
          <persName>
            <forename>Helmut W.</forename>
            <surname>Klug</surname>
          </persName>
        </respStmt>
        <respStmt>
          <resp>Datenmodellierung</resp>
          <persName>
            <forename>Selina</forename>
            <surname>Galka</surname>
          </persName>
        </respStmt>
        <respStmt>
          <resp>Datenmodellierung</resp>
          <persName>
            <forename>Elisabeth</forename>
            <surname>Steiner</surname>
          </persName>
        </respStmt>
        <funder>Bundesministerium für Wissenschaft, Forschung und Wirtschaft
                    </funder>
      </titleStmt>
      <publicationStmt>
        <publisher>
          <orgName corresp="https://informationsmodellierung.uni-graz.at" ref="http://d-nb.info/gnd/1137284463">Zentrum für
                        Informationsmodellierung - Austrian Centre for Digital Humanities,
                        Karl-Franzens-Universität Graz</orgName>
          <country>Austria</country>
        </publisher>
        <authority>
          <orgName corresp="https://informationsmodellierung.uni-graz.at" ref="http://d-nb.info/gnd/1137284463">Zentrum für
                        Informationsmodellierung - Austrian Centre for Digital Humanities,
                        Karl-Franzens-Universität Graz</orgName>
          <country>Austria</country>
        </authority>
        <distributor>
          <orgName ref="https://gams.uni-graz.at">GAMS - Geisteswissenschaftliches
                        Asset Management System</orgName>
        </distributor>
        <availability>
          <licence target="https://creativecommons.org/licenses/by-nc/4.0">Creative Commons
                            BY-NC 4.0</licence>
        </availability>
        <date when="2024">2024</date>
        <pubPlace>Graz</pubPlace>
        <idno type="PID">o:konde.86</idno>
      </publicationStmt>
      <seriesStmt>
        <title ref="http://gams.uni-graz.at/konde">KONDE Weißbuch</title>
        <respStmt>
          <resp>Projektleitung</resp>
          <persName>
            <forename>Helmut W.</forename>
            <surname>Klug</surname>
          </persName>
        </respStmt>
      </seriesStmt>
      <sourceDesc>
        <bibl>
          <title>Weißbuchartikel: XSLT</title>
          <author>Harald Lordick</author>
          <publisher>
                    Herausgegeben von Helmut W. Klug unter Mitarbeit von Selina Galka und Susanne Höfer
                </publisher>
          <date>2024</date>
          <country>Austria</country>
        </bibl>
      </sourceDesc>
    </fileDesc>
    <encodingDesc>
      <projectDesc>
        <ab>
          <ref target="context:konde" type="context">KONDE Weißbuch</ref>
        </ab>
        <p>Im KONDE-Projekt, das aus Hochschulraumstrukturmitteln finanziert wird,
                        beschäftigten sich sieben universitäre Partner und drei weitere
                        Einrichtungen aus unterschiedlichen Blickwinkeln mit theoretischen und
                        praktischen Aspekten der Digitalen Edition. Ein Outcome des Projektes
                        stellt das Weißbuch dar, welches über 200 Artikel zum Thema Digitale
                        Edition umfasst. Die behandelten Themenkomplexe reichen dabei über
                        Digitale Editionswissenschaft im Allgemeinen, Annotation und
                        Modellierung, Interfaces, Archivierung und Metadaten bis hin zu
                        rechtlichen Aspekten.</p>
      </projectDesc>
    </encodingDesc>
    <profileDesc>
      <langUsage>
        <language ident="de">Deutsch</language>
      </langUsage>
    </profileDesc>
    <revisionDesc>
      <listChange prev="TEI_SOURCE.2024-05-17">
        <change when="2024-03">
          <ab>Überarbeitung</ab>
        </change>
      </listChange>
    </revisionDesc>
  </teiHeader>
  <text xml:lang="de">
    <body>
      <div>
        <head>XSLT</head>
        <div>
          <head>Lordick, Harald; lordick@steinheim-institut.org</head>
          <p>XSLT (Extensible Stylesheet Language Transformations) ist mit XPath und XSL-FO Teil der in <ref target="/o:konde.215" type="internal">XML</ref> notierten Extensible Stylesheet Language (XSL) und gehört zu den Web-Standards des W3C. Die Turing-vollständige und dokumentenorientierte Programmiersprache dient insbesondere der Transformation von XML-Daten und findet häufig als Verarbeitungskomponente digitaler Workflows von Editionen Verwendung, etwa in Frameworks wie Apache Cocoon, Kiln, <ref target="/o:konde.178" type="internal">TEI</ref>-Publisher, TEI Boilerplate oder Versioning Machine (siehe auch <ref target="/o:konde.260" type="internal">Web-Architektur für DSE </ref>).</p>
          <p>XSLT benutzt die Abfragesprache <hi rend="italic">XPath</hi>, um durch XML-Dokumente zu navigieren und Teile davon zu adressieren, und XSLT-Elemente- (Programmieranweisungen) eröffnen die Möglichkeit, XML-Eingabedokumente in eine andere Struktur bzw. ein anderes Ausgabeformat zu überführen: Text (Plain Text, Markdown, JSON, CSV, CSS, MIF, Programm / Script-Code ...), XML (XML, XSLT, SVG, PDF via XSL-Fo ...) sowie HTML.</p>

          <p>Eine originäre Eigenschaft von XSLT-Skripten ist die Dokumententransformation durch Templates. Das folgende Beispiel adressiert alle <code ana="no_link">&lt;div&gt;</code>-Elemente eines XML-Eingabedokuments und erzeugt dafür jeweils ein <code ana="no_link">&lt;p&gt;</code>-Element im Ausgabedokument. Die Anweisung <code ana="no_link">&lt;xsl:apply-templates/&gt;</code> stößt dann die Verarbeitung gegebenenfalls enthaltener Kind-Knoten des &lt;div&gt;-Elements an, soweit dafür entsprechende (weitere) Templates vorliegen. </p>
          <p>
            <code ana="block">&lt;xsl:template match=&quot;div&quot;&gt;</code>
          </p>
          <p>
            <code ana="block">&lt;p&gt;</code>
          </p>
          <p>
            <code ana="block">	&lt;xsl:apply-templates/&gt;</code>
          </p>
          <p>
            <code ana="block">&lt;/p&gt;</code>
          </p>
          <p>
            <code ana="block">&lt;/xsl:template&gt;</code>
          </p>
          <p>Im mächtigen <hi rend="italic">Deep-Copy-</hi> bzw. <hi rend="italic">Shallow-Copy-Modus</hi> werden dabei seit XSLT 3.0 Dokumentstrukturen, für die kein Template formuliert ist, unverändert übernommen. Dies erlaubt die gezielte Überarbeitung von Details komplexer XML-Dokumente bei nur geringem Programmieraufwand.</p>

          <p>Die Dokumentenzentrierung von XSLT – und damit auch die besondere Eignung für Editionsdaten – zeigt sich nicht nur in diesem Template-Ansatz, sondern auch etwa in der Konzeption der <hi rend="italic">For-Each</hi>-Schleife, die anders als in anderen Programmiersprachen üblich, ausschließlich auf (durch XPath oder XSLT-Funktionen adressierte) Dokumentstrukturen iteriert.</p>

          <p>Die Entwicklung des XSLT-Sprachumfangs bis hin zu Version 3 hat aber auch Eigenschaften gestärkt, die eine allgemeinere Anwendung von XSLT ermöglichen: erweiterte Unterstützung von Datentypen, Verarbeitung des verbreiteten JSON-Datenformats, Funktionen zur String-Manipulation (einschließlich <ref target="/o:konde.242" type="internal">regulärer Ausdrücke</ref>), Funktionen und Operatoren für Datum, Zeit, Zeitverlauf sowie erweiterte Möglichkeiten der Sortierung, Filterung und Gruppierung von Dokumentstrukturen. Die direkte Einbindung (d. h. die clientseitige Ausführung) in Webbrowsern blieb allerdings auf Version 1 beschränkt.</p>
          <p>XSLT unterstützt konzeptbedingt die klare Trennung von Editionsdaten von ihrer Präsentation und hat über XML-strukturierte Dokumente hinaus mittlerweile breite Einsatzmöglichkeiten im Editionsworkflow: Bereinigung, Strukturierung und Anreicherung von Daten, Splitten und Zusammenführen von Dokumenten, Aufbereitung für Datenaustausch sowie Transformation in Darstellungs- und Publikationsformate.</p>
          <div type="literature">
            <listBibl>
              <biblStruct corresp="http://zotero.org/groups/1332658/items/G88VJ3A7" type="webpage" xml:id="Clark1999">
                <analytic>
                  <title level="a">Xsl transformations (xslt)</title>
                  <author>
                    <forename>James</forename>
                    <surname>Clark</surname>
                  </author>
                  <author>
                    <name>others</name>
                  </author>
                </analytic>
                <monogr>
                  <title level="m">World Wide Web Consortium (W3C). URL http://www. w3.
                              org/TR/xslt</title>
                  <imprint>
                    <date>1999</date>
                    <note type="accessed">2014-07-25T09:06:22Z</note>
                    <note type="url">http://new.renderx.com/files/demos/xmlspec/xslt/REC-xslt-19991116.pdf</note>
                  </imprint>
                </monogr>
              </biblStruct>
              <biblStruct corresp="http://zotero.org/groups/1332658/items/KG7I3J48" type="conferencePaper" xml:id="Bia2003">
                <analytic>
                  <title level="a">Multilingual markup of digital library texts using XML, TEI and
                              XSLT</title>
                  <author>
                    <forename>Alejandro</forename>
                    <surname>Bia</surname>
                  </author>
                  <author>
                    <forename>Manuel</forename>
                    <surname>Sanchez-Quero</surname>
                  </author>
                  <author>
                    <forename>Regis</forename>
                    <surname>Deau</surname>
                  </author>
                </analytic>
                <monogr>
                  <title level="m">XML Europe 2003 Conference and Exposition</title>
                  <title type="conferenceName">XML Europe 2003 Conference and Exposition</title>
                  <imprint>
                    <pubPlace>London</pubPlace>
                    <biblScope unit="page">63-68</biblScope>
                    <publisher>IDEAlliance</publisher>
                    <date>2003</date>
                    <note type="accessed">2014-07-25T09:13:14Z</note>
                    <note type="url">http://mti.ugm.ac.id/~adji/courses/resources/doctor/scholargoogle/03-01-03.PDF</note>
                  </imprint>
                </monogr>
              </biblStruct>
              <biblStruct corresp="http://zotero.org/groups/1332658/items/6JV5HJ7J" type="book" xml:id="Mangano2006">
                <monogr>
                  <title level="m">XSLT Cookbook: Solutions and Examples for XML and XSLT
                              Developers</title>
                  <idno type="ISBN">978-0596009748</idno>
                  <author>
                    <forename>Sal</forename>
                    <surname>Mangano</surname>
                  </author>
                  <edition>2. Auflage</edition>
                  <imprint>
                    <pubPlace>Köln</pubPlace>
                    <publisher>O&apos;Reilly &amp; Associates</publisher>
                    <date>2006</date>
                  </imprint>
                </monogr>
                <series>
                  <title level="s">Cookbooks (O&apos;Reilly)</title>
                </series>
              </biblStruct>
              <biblStruct corresp="http://zotero.org/groups/1332658/items/TQAIS6J2" type="book" xml:id="Kay2002">
                <monogr>
                  <title level="m">XSLT programmer&apos;s reference</title>
                  <idno type="ISBN">978-1861003126</idno>
                  <author>
                    <forename>Michael</forename>
                    <surname>Kay</surname>
                  </author>
                  <edition>1</edition>
                  <imprint>
                    <pubPlace>New York</pubPlace>
                    <publisher>Apress</publisher>
                    <date>2002</date>
                  </imprint>
                </monogr>
              </biblStruct>
              <biblStruct corresp="http://zotero.org/groups/1332658/items/TFXPN8UE" type="webpage" xml:id="Kay2017">
                <analytic>
                  <title level="a">W3C Recommendation: XSL Transformations (XSLT) Version 3.0</title>
                  <respStmt>
                    <resp>contributor</resp>
                    <persName>
                      <forename>Michael</forename>
                      <surname>Kay</surname>
                    </persName>
                  </respStmt>
                </analytic>
                <monogr>
                  <title level="m">W3C</title>
                  <imprint>
                    <date>2017</date>
                    <note type="accessed">2020-06-03</note>
                    <note type="url">https://www.w3.org/TR/2017/REC-xslt-30-20170608/</note>
                  </imprint>
                </monogr>
              </biblStruct>
              <biblStruct corresp="http://zotero.org/groups/1332658/items/I2K6F4PG" type="book" xml:id="Tennison2005">
                <monogr>
                  <title level="m">Beginning XSLT 2.0: from novice to professional</title>
                  <title type="short">Beginning XSLT 2.0</title>
                  <idno type="ISBN">978-1-59059-324-0</idno>
                  <author>
                    <forename>Jeni</forename>
                    <surname>Tennison</surname>
                  </author>
                  <edition>2</edition>
                  <imprint>
                    <pubPlace>Berkeley, CA : New York</pubPlace>
                    <publisher>Apress</publisher>
                    <date>2005</date>
                    <note type="url">http://it-ebooks.info/book/1789/</note>
                  </imprint>
                </monogr>
              </biblStruct>
              <biblStruct corresp="http://zotero.org/groups/1332658/items/ZG3AQI7E" type="book" xml:id="Tidwell2002">
                <monogr>
                  <title level="m">XSLT: XML-Dokumente transformieren</title>
                  <idno type="ISBN">9783897212923</idno>
                  <author>
                    <forename>Doug</forename>
                    <surname>Tidwell</surname>
                  </author>
                  <edition>1. Auflage</edition>
                  <imprint>
                    <pubPlace>Köln</pubPlace>
                    <publisher>O&apos;Reilly</publisher>
                    <date>2002</date>
                  </imprint>
                </monogr>
              </biblStruct>
              <biblStruct corresp="http://zotero.org/groups/1332658/items/MW9D6QEH" type="journalArticle" xml:id="Wadler2000">
                <analytic>
                  <title level="a">A formal semantics of patterns in XSLT and XPath</title>
                  <idno type="DOI">https://doi.org/10.1162/10996620052104302</idno>
                  <author>
                    <forename>Philip</forename>
                    <surname>Wadler</surname>
                  </author>
                </analytic>
                <monogr>
                  <title level="j">Markup Languages</title>
                  <imprint>
                    <biblScope unit="volume">2</biblScope>
                    <biblScope unit="issue">2</biblScope>
                    <biblScope unit="page">183-202</biblScope>
                    <date>2000</date>
                    <note type="accessed">2014-04-18T10:00:04Z</note>
                    <note type="url">http://courses.cs.washington.edu/courses/cse544/02sp/papers/wadler00.pdf</note>
                  </imprint>
                </monogr>
              </biblStruct>
              <biblStruct corresp="http://zotero.org/groups/1332658/items/ENZVS2E3" type="webpage" xml:id="zoteroItem_ENZVS2E3">
                <analytic>
                  <title level="a">XSL Transformation</title>
                </analytic>
                <monogr>
                  <title level="m">Wikipedia</title>
                  <imprint>
                    <date>2020</date>
                    <note type="accessed">2020-07-21</note>
                    <note type="url">https://de.wikipedia.org/wiki/XSL_Transformation</note>
                  </imprint>
                </monogr>
              </biblStruct>
            </listBibl>
          </div>
          <div type="subsection" xml:id="software">
            <list>
              <item>
                <ref target="http://oxygenxml.com/" type="external">Oxygen</ref>
              </item>
              <item>
                <ref target="https://github.com/acdh-oeaw/xsl-tokenizer" type="external">xsl-tokenizer</ref>
              </item>
              <item>
                <ref target="https://github.com/KONDE-AT" type="external">Wippets - XSLT/HTML/JS-Fragmente für GAMS</ref>
              </item>
            </list>
          </div>
          <div type="subsection" xml:id="links">
            <list>
              <item>
                <ref target="/o:konde.215" type="internal">XML</ref>
              </item>
            </list>
          </div>
          <div type="subsection" xml:id="topics">
            <list>
              <item>Einführung</item>
              <item>Datenanalyse</item>
              <item>Software und Softwareentwicklung</item>
            </list>
          </div>
        </div>
      </div>
    </body>
  </text>
</TEI>
