Changeset 871

Show
Ignore:
Timestamp:
08/02/07 12:48:31 (1 year ago)
Author:
thomase
Message:

Assume mod_rewrite rules will handle canonical urls / linking, so don't explicitly expose literal paths. Also add a baseurl parameter, and use it to make some absolute urls.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • BibIt/trunk/ProcModsCollection.xsl

    r870 r871  
    3030    <xsl:param name="modsout">mods/</xsl:param> 
    3131    <xsl:param name="citout">citations/</xsl:param> 
    32      
     32    <xsl:param name="baseurl">http://www.unc.edu/awmc/pleiades/bibl/</xsl:param> 
    3333     
    3434     
     
    8989                    <xsl:element name="a"> 
    9090                        <xsl:attribute name="class">abbreviatedtitle</xsl:attribute> 
    91                         <xsl:attribute name="href"><xsl:value-of select="$thisouturl"/><xsl:value-of select="$newid"/>.html</xsl:attribute> 
     91                        <xsl:attribute name="href"><xsl:value-of select="$baseurl"/><xsl:value-of select="$newid"/>.html</xsl:attribute> 
    9292                        <xsl:if test="mods:titleInfo[@type='abbreviated' and @xml:lang]"><xsl:copy-of select="mods:titleInfo[@type='abbreviated']/@xml:lang"/></xsl:if> 
    9393                        <xsl:if test="mods:titleInfo[@type='uniform']"> 
     
    9999                    <xsl:element name="a"> 
    100100                        <xsl:attribute name="class">uniformtitle</xsl:attribute> 
    101                         <xsl:attribute name="href"><xsl:value-of select="$thisouturl"/><xsl:value-of select="$newid"/>.html</xsl:attribute> 
     101                        <xsl:attribute name="href"><xsl:value-of select="$baseurl"/><xsl:value-of select="$newid"/>.html</xsl:attribute> 
    102102                        <xsl:if test="mods:titleInfo[@type='uniform' and @xml:lang]"><xsl:copy-of select="mods:titleInfo[@type='uniform']/@xml:lang"/></xsl:if> 
    103103                        <xsl:value-of select="mods:titleInfo[@type='uniform'][1]/mods:title"/></xsl:element> 
     
    155155                        <xsl:apply-templates select="." mode="coins"/> 
    156156                        <xsl:variable name="modsrelurl"><xsl:for-each select="tokenize($htmlout, '/')">../</xsl:for-each><xsl:if test="$outchunk != '' and $outchunk != 'no'">../</xsl:if></xsl:variable> 
    157                         <p id="modsxml">MODS XML file: <a href="{$modsrelurl}{$thisouturl}{$modsout}{$newid}.xml"><xsl:value-of select="$newid"/>.xml</a></p> 
     157                        <p id="modsxml">MODS XML file: <a href="{$baseurl}{$newid}.xml"><xsl:value-of select="$newid"/>.xml</a></p> 
    158158                    </div> 
    159159                    <div id="searchforit"> 
     
    175175                        <p>We encourage you, in accordance with standard scholarly practice, to cite the source of this data if you copy and  
    176176                        redistribute it en masse. Use of individual citations in articles, papers and books need not be cited, but you should  
    177                         check them yourself for accuracy. <a href="{$rightsrelurl}rights.html">This  
     177                        check them yourself for accuracy. <a href="rights.html">This  
    178178                            data is in  
    179179                        the public domain</a>.</p> 
     
    260260        <xsl:variable name="parent" select="//mods:mods[@ID=$parentref]"/> 
    261261        <xsl:variable name="parentid"><xsl:for-each select="$parent"><xsl:call-template name="makenewid"/></xsl:for-each></xsl:variable> 
    262         <xsl:attribute name="xlink:href"><xsl:value-of select="$parentid"/>.xml</xsl:attribute> 
     262        <xsl:attribute name="xlink:href"><xsl:value-of select="$baseurl"/><xsl:value-of select="$parentid"/>.xml</xsl:attribute> 
    263263    </xsl:template> 
    264264