fnp
/
redakcja.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
3497032
)
transform match exercise to WL1
author
Jan Szejko
<janek37@gmail.com>
Tue, 12 Sep 2017 16:17:42 +0000
(18:17 +0200)
committer
Jan Szejko
<janek37@gmail.com>
Tue, 12 Sep 2017 16:17:42 +0000
(18:17 +0200)
redakcja/xslt/wl2to1.xslt
patch
|
blob
|
history
diff --git
a/redakcja/xslt/wl2to1.xslt
b/redakcja/xslt/wl2to1.xslt
index
e88412a
..
6882a75
100644
(file)
--- a/
redakcja/xslt/wl2to1.xslt
+++ b/
redakcja/xslt/wl2to1.xslt
@@
-56,7
+56,7
@@
</xsl:template>
<!-- TODO language-dependent: description, audience, requires (subject.competence?) -->
</xsl:template>
<!-- TODO language-dependent: description, audience, requires (subject.competence?) -->
-<xsl:template match="dc:creator.expert|dc:creator.scenario|dc:creator.textbook|dc:description|dc:subject.curriculum|dc:creator.methodologist|dc:subject.competence|dc:audience|dc:type|dc:requires" mode="meta">
+<xsl:template match="dc:creator.expert|dc:creator.scenario|dc:creator.textbook|dc:description|dc:subject.curriculum|dc:
subject.curriculum.new|dc:
creator.methodologist|dc:subject.competence|dc:audience|dc:type|dc:requires" mode="meta">
<xsl:copy><xsl:apply-templates /></xsl:copy>
</xsl:template>
<xsl:copy><xsl:apply-templates /></xsl:copy>
</xsl:template>
@@
-92,7
+92,15
@@
<akap><xsl:apply-templates /></akap>
</xsl:when>
<xsl:when test="@class = 'list'">
<akap><xsl:apply-templates /></akap>
</xsl:when>
<xsl:when test="@class = 'list'">
- <lista typ="punkt"><xsl:apply-templates /></lista>
+ <lista typ="punkt">
+ <xsl:if test="@name">
+ <xsl:attribute name="nazwa"><xsl:value-of select="@name"/></xsl:attribute>
+ </xsl:if>
+ <xsl:if test="@dest">
+ <xsl:attribute name="cel"><xsl:value-of select="@dest"/></xsl:attribute>
+ </xsl:if>
+ <xsl:apply-templates />
+ </lista>
</xsl:when>
<xsl:when test="@class = 'list.itemized'">
<lista typ="punkt"><xsl:apply-templates /></lista>
</xsl:when>
<xsl:when test="@class = 'list.itemized'">
<lista typ="punkt"><xsl:apply-templates /></lista>
@@
-119,8
+127,11
@@
<xsl:when test="@class = 'item'">
<punkt><xsl:apply-templates /></punkt>
</xsl:when>
<xsl:when test="@class = 'item'">
<punkt><xsl:apply-templates /></punkt>
</xsl:when>
+ <xsl:when test="@class = 'item.category'">
+ <punkt nazwa="{@name}"><xsl:apply-templates /></punkt>
+ </xsl:when>
<xsl:when test="@class = 'item.answer'">
<xsl:when test="@class = 'item.answer'">
- <
xsl:element name="punkt"
>
+ <
punkt
>
<xsl:attribute name="rozw">
<xsl:choose>
<xsl:when test="@answer = 'true'">prawda</xsl:when>
<xsl:attribute name="rozw">
<xsl:choose>
<xsl:when test="@answer = 'true'">prawda</xsl:when>
@@
-129,7
+140,7
@@
</xsl:choose>
</xsl:attribute>
<xsl:apply-templates />
</xsl:choose>
</xsl:attribute>
<xsl:apply-templates />
- </
xsl:elemen
t>
+ </
punk
t>
</xsl:when>
<xsl:when test="@class = 'question'">
<pytanie>
</xsl:when>
<xsl:when test="@class = 'question'">
<pytanie>
@@
-169,6
+180,11
@@
<xsl:call-template name="cwiczenie"/>
</cwiczenie>
</xsl:when>
<xsl:call-template name="cwiczenie"/>
</cwiczenie>
</xsl:when>
+ <xsl:when test="@class = 'exercise.match'">
+ <cwiczenie typ="przyporzadkuj">
+ <xsl:call-template name="cwiczenie"/>
+ </cwiczenie>
+ </xsl:when>
<xsl:when test="@class = 'exercise.gap'">
<cwiczenie typ="luki">
<opis><akap>Uzupełnij luki:</akap></opis>
<xsl:when test="@class = 'exercise.gap'">
<cwiczenie typ="luki">
<opis><akap>Uzupełnij luki:</akap></opis>
@@
-269,6
+285,7
@@
<xsl:choose>
<xsl:when test="@class = 'p'">
<opis><xsl:apply-templates select="."/></opis>
<xsl:choose>
<xsl:when test="@class = 'p'">
<opis><xsl:apply-templates select="."/></opis>
+ <!-- https://stackoverflow.com/questions/27374493/grouping-the-consecutive-elements-in-xslt -->
</xsl:when>
<xsl:otherwise>
<xsl:apply-templates select="."/>
</xsl:when>
<xsl:otherwise>
<xsl:apply-templates select="."/>