GitBucket
4.21.2
Toggle navigation
Snippets
Sign in
Files
Branches
1
Releases
1
Issues
Pull requests
Labels
Priorities
Milestones
Wiki
Forks
nigel.stanger
/
XML
Browse code
• Changed expansion of semester codes to match University standard phrasing.
master
1 parent
4218738
commit
8ddba48c3da8d453ddfa8986ef1e5be2c87aee11
Nigel Stanger
authored
on 3 Jul 2014
Patch
Showing
1 changed file
modules/otago-specific.xml
Ignore Space
Show notes
View
modules/otago-specific.xml
<?xml version="1.0" encoding="utf-8"?> <!-- Elements, etc., that are specific to Otago. --> <stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <!-- Format a University paper code. These normally appear in the form "SPOD 123", i.e., a space between the subject code and the paper number. --> <template name="paper" match="paper"> <common> <xsl:apply-templates select="subject-code" /> <xsl:text> </xsl:text> <xsl:apply-templates select="paper-number" /> </common> </template> <template name="subject-code" match="paper/subject-code"> <common><xsl:apply-templates /></common> </template> <template name="paper-number" match="paper/paper-number"> <common><xsl:apply-templates /></common> </template> <!-- Expand an Otago period code (e.g., "S1") into it's full equivalent (e.g., "First Semester"). $period-code: The period code to be expanded. Returns: The expanded period string. --> <function name="infosci:expand-period-code" as="xs:string"> <common> <xsl:param name="period-code" /> <xsl:variable name="period-string"> <xsl:choose> <xsl:when test="$period-code = 'SS'"> <xsl:text>Summer School</xsl:text> </xsl:when> <xsl:when test="$period-code = 'S1'"> <xsl:text>First Semester</xsl:text> </xsl:when> <xsl:when test="$period-code = 'S2'"> <xsl:text>Second Semester</xsl:text> </xsl:when> <xsl:when test="$period-code = 'FY'"> <xsl:text>Full Year</xsl:text> </xsl:when> <xsl:otherwise> <xsl:message terminate="yes"> <xsl:text>Unrecognised period code "</xsl:text> <xsl:value-of select="$period-code" /> <xsl:text>".</xsl:text> </xsl:message> </xsl:otherwise> </xsl:choose> </xsl:variable> <xsl:sequence select="$period-string" /> </common> </function> </stylesheet>
<?xml version="1.0" encoding="utf-8"?> <!-- Elements, etc., that are specific to Otago. --> <stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <!-- Format a University paper code. These normally appear in the form "SPOD 123", i.e., a space between the subject code and the paper number. --> <template name="paper" match="paper"> <common> <xsl:apply-templates select="subject-code" /> <xsl:text> </xsl:text> <xsl:apply-templates select="paper-number" /> </common> </template> <template name="subject-code" match="paper/subject-code"> <common><xsl:apply-templates /></common> </template> <template name="paper-number" match="paper/paper-number"> <common><xsl:apply-templates /></common> </template> <!-- Expand an Otago period code (e.g., "S1") into it's full equivalent (e.g., "Semester One"). $period-code: The period code to be expanded. Returns: The expanded period string. --> <function name="infosci:expand-period-code" as="xs:string"> <common> <xsl:param name="period-code" /> <xsl:variable name="period-string"> <xsl:choose> <xsl:when test="$period-code = 'SS'"> <xsl:text>Summer School</xsl:text> </xsl:when> <xsl:when test="$period-code = 'S1'"> <xsl:text>Semester One</xsl:text> </xsl:when> <xsl:when test="$period-code = 'S2'"> <xsl:text>Semester Two</xsl:text> </xsl:when> <xsl:when test="$period-code = 'FY'"> <xsl:text>Full Year</xsl:text> </xsl:when> <xsl:otherwise> <xsl:message terminate="yes"> <xsl:text>Unrecognised period code "</xsl:text> <xsl:value-of select="$period-code" /> <xsl:text>".</xsl:text> </xsl:message> </xsl:otherwise> </xsl:choose> </xsl:variable> <xsl:sequence select="$period-string" /> </common> </function> </stylesheet>
Show line notes below