<?xml version="1.0" encoding="UTF-8" ?>
<xsl:stylesheet 
	xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
	xmlns:xs="http://www.w3.org/2001/XMLSchema"
	xpath-default-namespace="http://wulfila.be/namespace/dictionary/streiberg"
	exclude-result-prefixes="#all"
	version="3.0">
<!--
	===========================================================================
	Generates HTML version of the XML transcription of Streitberg's dictionary 
	===========================================================================
	
	Revision history:
	[2006-11-29] First version.
	[2026-04-11] XSLT 3.0 and HTML5; various edits.
	[2026-06-03] Minor edits (changes to source format).
	[2026-06-07] Default namespace; moved entry templates to imported file.
	
	Tom De Herdt
	https://www.wulfila.be/
	
	===========================================================================
-->
	
	<xsl:import href="dictionary.entry.xsl"/>
	
	<xsl:output 
		method="html"
		html-version="5.0"
		encoding="UTF-8"
		omit-xml-declaration="yes"
		include-content-type="no"
		indent="yes"
	/>
	
	<!-- path to website root (override on pages with relative path, so links still work when browsing *.html files locally): -->
	<xsl:param name="root" as="xs:string">/</xsl:param>
	
	<xsl:preserve-space elements="*"/>
	<xsl:strip-space elements="entry hom related"/>
	
	<xsl:template match="/">
		<html lang="de">
			<head>
				<meta charset="utf-8"/>
				<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
				<title>Wilhelm Streitberg: Gotisch-Griechisch-Deutsches Wörterbuch (1910)</title>
				<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Noto+Serif:wght@400;700&amp;display=swap"/>
				<link rel="stylesheet" href="dictionary.css"/>
			</head>
			<body>
				<h1 lang="de">Wilhelm Streitberg: <strong>Gotisch-Griechisch-Deutsches Wörterbuch</strong> (1910)</h1>
				<div id="info" lang="en">
					<p class="HTMLmeta">This document was generated with <abbr title="Extensible Stylesheet Language Transformations">XSLT</abbr> from an XML encoding of Streitberg's dictionary. The source files can be found <a href="https://www.wulfila.be/lib/streitberg/1910/#XML">here</a>.</p>
					<xsl:apply-templates select="dictionary/meta"/>
				</div>
				<div id="entries">
					<xsl:apply-templates select="dictionary/entry"/>
				</div>
			</body>
		</html>
	</xsl:template>
	
	<xsl:template match="meta">
	<!-- Contains a valid subset of HTML. -->
		<xsl:apply-templates mode="info"/>
	</xsl:template>
	
	<xsl:template match="*" mode="info">
		<xsl:element name="{local-name()}">
			<xsl:apply-templates select="@*|node()" mode="info"/>
		</xsl:element>
	</xsl:template>
	
	<xsl:template match="@*" mode="info">
		<xsl:copy-of select="."/>
	</xsl:template>
	
	<xsl:template match="@xml:lang" mode="#all">
		<xsl:attribute name="lang" select="."/>
	</xsl:template>
	
</xsl:stylesheet>