bold zle dziala

This commit is contained in:
Piotr Baranowski 2020-05-17 19:43:07 +02:00
parent 97aa42d9de
commit 6389417973

View File

@ -1,12 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:fo="http://www.w3.org/1999/XSL/Format">
<xsl:template match="CollectionOfPoems">
<html>
<head>
<style>
.inline h2 {
div h2 {
display: inline-block;
}
@ -15,31 +15,45 @@
}
.verse {
margin: 5px 0;
margin: 0;
}
</style>
</head>
<body>
<h1>Zbiór Wierszy</h1>
<xsl:for-each select="Poem">
<div class="inline">
<h2><xsl:value-of select="Author/FirstName"/></h2>
<h2><xsl:value-of select="Author/LastName"/></h2>
<h2>-</h2>
<h2 class="title"><xsl:value-of select="Title"/></h2>
<xsl:if test="Subtitle">
<h2 class="title">(<xsl:value-of select="Subtitle"/>)</h2>
</xsl:if>
</div>
<xsl:for-each select="Strophe">
<p> <xsl:for-each select="Verse">
<p class="verse"> <xsl:value-of select="."/> </p>
</xsl:for-each></p>
</xsl:for-each>
</xsl:for-each>
<xsl:apply-templates select="Poem"/>
</body>
</html>
</xsl:template>
<xsl:template match="Poem">
<div>
<h2><xsl:value-of select="Author/FirstName"/></h2>
<h2><xsl:value-of select="Author/LastName"/></h2>
<h2> - </h2>
<h2 class="title"><xsl:value-of select="Title"/></h2>
<xsl:if test="Subtitle">
<h2 class="title">(<xsl:value-of select="Subtitle"/>)</h2>
</xsl:if>
</div>
<xsl:apply-templates select="Strophe"/>
</xsl:template>
<xsl:template match="Strophe">
<p><xsl:apply-templates select="Verse"/></p>
</xsl:template>
<xsl:template match="Verse">
<p class="verse">
<xsl:value-of select="."/>
<xsl:apply-templates select="Bold"/>
</p>
</xsl:template>
<xsl:template match="Bold">
<b>
<xsl:apply-templates/>
</b>
</xsl:template>
</xsl:stylesheet>