-
Notifications
You must be signed in to change notification settings - Fork 0
/
title.xslt
34 lines (29 loc) · 967 Bytes
/
title.xslt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns="http://www.w3.org/1999/xhtml"
xmlns:px="http://panax.io/entity"
xmlns:site="http://panax.io/site"
exclude-result-prefixes="#default xsl px site"
>
<xsl:output method="xml"
omit-xml-declaration="yes"
indent="yes"/>
<xsl:param name="site:seed">''</xsl:param>
<xsl:template match="/">
<h1>
<xsl:apply-templates/>
</h1>
</xsl:template>
<xsl:template match="*">
<xsl:value-of select="substring-before(concat(substring-before(translate(concat($site:seed,'~'),'_#',' '),'~'),'?'),'?')"/>
</xsl:template>
<xsl:template match="*[@headerText]">
<xsl:apply-templates select="@headerText"/>
</xsl:template>
<xsl:template match="@headerText">
<xsl:value-of select="."/>
</xsl:template>
<xsl:template match="@headerText[starts-with(.,'Tipo')]">
<xsl:value-of select="concat(substring(.,1,5), 'de ', substring(.,6))"/>
</xsl:template>
</xsl:stylesheet>