Export xsl into seperate file via embedding

This commit is contained in:
Simon Martens
2024-12-28 10:53:17 +01:00
parent 58df7cc1cb
commit 579ce63ee2
8 changed files with 152 additions and 73 deletions

View File

@@ -66,12 +66,10 @@
<div>
{{ range $_, $w := $a.Works }}
{{- if ne (len $w.Citation.InnerXML ) 0 -}}
<div hx-ext="client-side-templates">
<div xslt-template="citation-xslt" xslt-onload>
<xml>
{{- Safe $w.Citation.InnerXML -}}
</xml>
</div>
<div xslt-template="citation-xslt" xslt-onload>
<xml>
{{- Safe $w.Citation.InnerXML -}}
</xml>
</div>
{{- end -}}
{{ end }}
@@ -94,4 +92,6 @@
{{ end }}
{{ end }}
{{ template "_xslt_citation" . }}
<script id="citation-xslt" type="application/xml">
{{ EmbedSafe "xslt/citation.xsl" }}
</script>

View File

@@ -1,15 +0,0 @@
<script id="citation-xslt" type="application/xml">
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="html" indent="yes" />
<xsl:template match="title">
<em>
<xsl:apply-templates />
</em>
</xsl:template>
<xsl:template match="year">
<span class="">
<xsl:apply-templates />
</span>
</xsl:template>
</xsl:stylesheet>
</script>