Project

General

Profile

« Previous | Next » 

Revision 694b055b

Added by Sybille Bürs over 11 years ago

image galery works but looks really ugly with really long captions

View differences:

cdmlib-print/src/main/resources/stylesheets/mediawiki/multipages.xsl
1 1

  
2
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="2.0">
2
<xsl:stylesheet version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"  xmlns:functx="http://www.functx.com">
3
    
4
    <xsl:import href="functx-1.0-doc-2007-01.xsl"/>
3 5
    <xsl:output method="xml" indent="yes"/>
6
 
4 7
    <!-- Authors: Sybille & Lorna -->
5 8
    <!-- Date: March/April 2013 -->
6 9

  
......
238 241
        <xsl:apply-templates select="key"/>
239 242
        <xsl:apply-templates select="descriptions"/>
240 243
        <xsl:call-template name="gallery"/>
241
        
244

  
242 245

  
243 246
    </xsl:template>
244 247

  
245 248
    <!--+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->
246
    
249

  
247 250
    <!-- these templates provide the citations -->
248
    
251

  
249 252
    <xsl:template name="display-references">
250 253
        <xsl:call-template name="chapter">
251 254
            <xsl:with-param name="title">References</xsl:with-param>
252 255
        </xsl:call-template>
253
       <xsl:text>{{Show_References}}</xsl:text>
256
        <xsl:text>{{Show_References}}</xsl:text>
254 257
    </xsl:template>
255 258

  
259

  
256 260
    <xsl:template name="citationsold">
261

  
257 262
        <xsl:param name="name-uuid"/>
258
        <xsl:param name="descriptionelements" />
259
        
263
        <xsl:param name="descriptionelements"/>
264

  
260 265
        <!--only calling this for ag salcifolia what about the other uuids???-->
261
        <xsl:value-of select="concat('{{ViBRANT_Reference|Name=',$name-uuid,'|Content=')"></xsl:value-of>
266
        <xsl:value-of select="concat('{{ViBRANT_Reference|Name=',$name-uuid,'|Content=')"/>
262 267
        <!--<ref name="{$name-uuid}">-->
263
            <!-- iterate through all the description elements fo the citation feature -->
264
        <xsl:for-each select="$descriptionelements/descriptionelement">          
268
        <!-- iterate through all the description elements fo the citation feature -->
269
        <xsl:for-each select="$descriptionelements/descriptionelement">
265 270
            <!-- TODO sorting only works for the first citation, implement correctly -->
266 271
            <xsl:sort select="sources/e[1]/citation/datePublished/start"/>
267 272

  
......
274 279
                    </xsl:call-template>
275 280
                    <!-- use the citation-uuid as a unique name for the reference -->
276 281

  
282

  
277 283
                </xsl:if>
278 284
            </xsl:for-each>
279 285
            <!--</ref>-->
......
365 371
        <!--</ref>-->
366 372

  
367 373
    </xsl:template>
374

  
375

  
368 376
    <!--+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->
369 377

  
370 378
    <!-- these templates provide the polytomous key 
......
472 480
        <xsl:apply-templates select="homotypicSynonymsByHomotypicGroup"/>
473 481
        <xsl:apply-templates select="heterotypicSynonymyGroups"/>
474 482
        <!--xsl:call-template name="citations">
475
            <xsl:with-param name="descriptionelements" select="../descriptions/features/feature[uuid='99b2842f-9aa7-42fa-bd5f-7285311e0101']/descriptionelements"/>
483
            <xsl:with-param name="descriptionelements"
484
                select="../descriptions/features/feature[uuid='99b2842f-9aa7-42fa-bd5f-7285311e0101']/descriptionelements"/>
476 485
            <xsl:with-param name="name-uuid" select="../name/uuid"/>
477 486
        </xsl:call-template-->
478 487
    </xsl:template>
......
640 649

  
641 650
        <xsl:value-of
642 651
            select="concat('{{Tax_Feature|Name=',representation_L10n, '|Elements={{Feature_Text|' )"/>
652
        <!--
643 653
        <xsl:choose>
644
            <xsl:when test="uuid!='9fc9d10c-ba50-49ee-b174-ce83fc3f80c6'">
645
                <!-- feature is not "Distribution" -->
646
                <xsl:apply-templates
647
                    select="descriptionelements/descriptionelement[1]/multilanguageText_L10n/text"/>
654
            <xsl:when test="uuid!='9fc9d10c-ba50-49ee-b174-ce83fc3f80c6'">-->
655
        <!-- feature is not "Distribution" -->
656

  
657
        <xsl:apply-templates
658
            select="descriptionelements/descriptionelement[1]/multilanguageText_L10n/text"/>
659
        <!--
648 660
            </xsl:when>
649 661
        </xsl:choose>
650

  
662
        -->
651 663
        <xsl:text>}}}}</xsl:text>
652 664

  
653 665

  
......
683 695

  
684 696
    <!--+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->
685 697
    <!-- image gallery -->
686
    
698

  
687 699
    <xsl:template name="gallery">
688
        <!--<xsl:text>{{ViBRANT_Gallery|Files=</xsl:text>--> {{chapter|Images}} <xsl:value-of
689
            select="concat('===',./name/titleCache,'===')"/>
690
        <xsl:apply-templates select="//media/e/representations/e/parts/e/uri"/>
691
        <!--<xsl:text>}}</xsl:text>-->
700
        <xsl:text>{{ViBRANT_Gallery|Files=</xsl:text>
701

  
702
        <xsl:apply-templates select=".//media/e/representations/e/parts/e/uri"/>
703
        <xsl:text>}}</xsl:text>
692 704
    </xsl:template>   
705

  
706

  
707
    <xsl:template name="gallery_file"/>
708

  
709
    <xsl:template match="media/e/representations/e/parts/e/uri">
710
        
711
        <xsl:value-of select="concat('{{Gallery_File|Filename=',functx:substring-after-last(.,'/'), '|Caption=')"/>
712
            <!--,'}}')"/>--> 
713
        <!--go back up to the description element and get the text for the Figure legend -->
714
        <xsl:apply-templates select="../../../../../../../multilanguageText_L10n/text"/>
715
        <xsl:text>}}</xsl:text>
716
    </xsl:template>
717

  
718

  
693 719
    
720

  
694 721
    <!--+++++++++++++++++++++++++++++L A Y O U T ++++++++++++++++++++++++++++++++++++++ -->
695 722

  
696 723

  
......
823 850
    </xsl:template>
824 851

  
825 852
    <!--+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->
853
    
854

  
855
    
826 856

  
827 857
</xsl:stylesheet>

Also available in: Unified diff