⚲
Project
Profile
Help
Tour this page
Frequent Planio Questions
Learning Resources
Sign in
Register
Switch Planio account
Open in Planio App
Share current page
Search
:
Projects
All Projects
Help
Tour this page
Frequent Planio Questions
Learning Resources
Sign in
Register
Switch Planio account
Open in Planio App
Share current page
Saxon
Overview
Roadmap
Issues
Calendar
Blog
Documents
Forums
Files
Repository
Download (1.67 KB)
Bug #3927
» ss5.xsl
stylesheet -
roland civet
, 2018-10-01 11:29
<?xml version="1.0" encoding="UTF-8" ?>
<xsl:stylesheet
version=
"3.0"
xmlns:xsl=
"http://www.w3.org/1999/XSL/Transform"
xmlns:saxon=
"http://icl.com/saxon"
>
<xsl:output
method=
"html"
version=
"5"
encoding=
"UTF-8"
/>
<xsl:template
match=
"/"
>
<xsl:variable
name=
"language_fr"
select=
"'fr'"
/>
<xsl:variable
name=
"language_en"
select=
"'en'"
/>
<html>
<head></head>
<body>
<div>
<xsl:apply-templates
select=
"items"
>
<xsl:with-param
name=
"language"
select=
"$language_fr"
/>
</xsl:apply-templates>
<xsl:apply-templates
select=
"items"
>
<xsl:with-param
name=
"language"
select=
"$language_en"
/>
</xsl:apply-templates>
</div>
</body>
</html>
</xsl:template>
<xsl:template
match=
"items"
>
<xsl:param
name=
"language"
/>
<xsl:result-document
href=
"{$language}/index.html"
>
<html>
<head></head>
<body>
<div>
<ul>
<xsl:apply-templates
select=
"./item"
>
<xsl:with-param
name=
"language"
select=
"$language"
/>
</xsl:apply-templates>
</ul>
</div>
</body>
</html>
</xsl:result-document>
</xsl:template>
<xsl:template
match=
"item"
>
<xsl:param
name=
"language"
/>
<li><a
href=
"item_{./@id}.html"
><xsl:value-of
select=
"./title[@language = $language]"
/></a></li>
<xsl:result-document
href=
"{$language}/item_{./@id}.html"
>
<html>
<head></head>
<body>
<div>
<ul
class=
"nav"
>
<xsl:if
test=
"position() > 1"
>
<li><a
href=
"item_{../item[position() - 1]/@id}.html"
>
prev
</a></li>
</xsl:if>
<xsl:if
test=
"position() < last()"
>
<li><a
href=
"item_{../item[position() + 1]/@id}.html"
>
next
</a></li>
</xsl:if>
</ul>
</div>
</body>
</html>
</xsl:result-document>
</xsl:template>
</xsl:stylesheet>
« Previous
1
2
3
Next »
(1-1/3)
Loading...