Skip to content
Snippets Groups Projects
Commit 16a71022 authored by Max-Ferdinand Zeterberg's avatar Max-Ferdinand Zeterberg
Browse files

feat(hi): implement serialization to HTML

feat(p): implement serialization to HTML
parent a30eb942
No related branches found
No related tags found
1 merge request!29Resolve "implement schema changes to serialization"
<?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"
xmlns="http://www.w3.org/1999/xhtml"
exclude-result-prefixes="xs"
version="2.0" xpath-default-namespace="http://sub.uni-goettingen.de/edxml#">
<!-- Highlightings -->
<xsl:template match="hi[@rend='italics']|hi[not(@rend)]">
<span class="hi italics"
id="{if(@xml:id) then (@xml:id) else ('part_'||generate-id(.))}">
<xsl:apply-templates/>
</span>
</xsl:template>
<xsl:template match="hi[@rend='bold']">
<span class="hi bold"
id="{if(@xml:id) then (@xml:id) else ('part_'||generate-id(.))}">
<xsl:apply-templates/>
</span>
</xsl:template>
<xsl:template match="hi[@rend='sub']">
<sub class="hi sub"
id="{if(@xml:id) then (@xml:id) else ('part_'||generate-id(.))}">
<xsl:apply-templates/>
</sub>
</xsl:template>
<xsl:template match="hi[@rend='super']">
<sup class="hi sup"
id="{if(@xml:id) then (@xml:id) else ('part_'||generate-id(.))}">
<xsl:apply-templates/>
</sup>
</xsl:template>
<xsl:template match="hi[@rend='under']">
<span class="hi under"
id="{if(@xml:id) then (@xml:id) else ('part_'||generate-id(.))}">
<xsl:apply-templates/>
</span>
</xsl:template>
<!-- Paragraphs -->
<xsl:template match="p">
<p id="{if(@xml:id) then (@xml:id) else ('part_'||generate-id(.))}">
<xsl:apply-templates/>
</p>
</xsl:template>
</xsl:stylesheet>
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment