Digital humanities


Maintained by: David J. Birnbaum (djbpitt@gmail.com) [Creative Commons BY-NC-SA 3.0 Unported License] Last modified: 2023-05-01T01:32:52+0000


Text #5: XSLT answers

The task

Your task was to write XSLT that will create a reading view of our Yellow Fairy collection of stories in HTML. The test instructions provide general guidelines along with a list of required and optional tasks.

Basic solution

The following XSLT implements all of the required tasks. We explain how the parts work with embedded XML comments. (We always comment our stylesheets, but because this is the answer to a test question, it includes more commentary than we would normally use.) You can read our basic output at http://dh.obdurodon.org/2234_basic-output.xhtml.



    
    
    
    
    
        
            
                
                    <xsl:apply-templates select="//metaData/title"/>
                
            
            
                
                

Table of Contents


Stories

,



  • ]]>

    Solution with bonus tasks

    The following enhanced solution implements the bonus tasks. You can read our the output of this bonus implementation at http://dh.obdurodon.org/2234_bonus-output.xhtml.

    
    
        
        
        
        
        
            
                
                    
                        <xsl:apply-templates select="//metaData/title"/>
                    
                
                
                    
                    
                    
                    
                    
                    

    Table of Contents


    Stories


    Contributors

    ,



  • [ ]
  • ]]>