Changeset 15

Show
Ignore:
Timestamp:
09/04/08 13:20:42 (4 months ago)
Author:
gbodard
Message:

fixed XSLT; added .bat hack to test

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • ala2iaph-concordance/trunk/xslt/extract-concordance.xsl

    r14 r15  
    22<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="2.0"> 
    33 
     4<xsl:output method="xml" version="1.0" indent="yes"/> 
     5 
    46<xsl:template match="xquery"> 
    57    <list> 
    6         <xsl:for-each select="word/bibl[@n='ALA' or @n='ala2004']"> 
     8        <xsl:for-each select="//bibl[@n='ALA' or @n='ala2004']"> 
    79            <item> 
    810                <ref n="ala2004"> 
    9                     <xsl:text>eAla</xsl:text> 
    10                     <xsl:number select="biblScope[1]" format="000"/> 
     11                    <xsl:text>eAla</xsl:text><xsl:choose> 
     12                        <xsl:when test="number(biblScope[1])"> 
     13                            <xsl:number value=".//biblScope[1]" format="001" /> 
     14                        </xsl:when> 
     15                        <xsl:when test="contains(.//biblScope[1], '.')"> 
     16                            <xsl:number value="substring-before(.//biblScope[1], '.')" format="001" /> 
     17                        </xsl:when> 
     18                        <xsl:otherwise> 
     19                            <xsl:number value="translate(.//biblScope[1], 'abc', '')" format="001" /> 
     20                        </xsl:otherwise> 
     21                    </xsl:choose> 
    1122                </ref> 
    1223                <ref n="IAph2007">