Changeset 307

Show
Ignore:
Timestamp:
09/20/06 15:10:06 (2 years ago)
Author:
thomase
Message:

Added some automation for batch transformation, dependent on windows batch files and xsltproc. Also added draft standard header insertion to transform.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • system/trunk/data/geoentities

    • Property svn:ignore set to
      xformbatlas065.bat
  • system/trunk/data/geoentities/xslt/dir2xformbat.xsl

    r293 r307  
    11<?xml version="1.0" encoding="UTF-8"?> 
    22<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"> 
    3     <xsl:output method="text"  encoding="UTF-8"/> 
     3    <xsl:output method="text"  encoding="UTF-8" indent="no"/> 
     4    <xsl:param name="baseabsolute"/> 
     5    <xsl:param name="mapnum"/> 
     6    <xsl:param name="osdelim">/</xsl:param> 
    47    <xsl:template match="/"> 
    58        <xsl:apply-templates/> 
     
    912    </xsl:template> 
    1013    <xsl:template match="object"> 
     14        <xsl:variable name="filename"><xsl:value-of select="."/>.xml</xsl:variable> 
     15        <xsl:variable name="mappath"><xsl:value-of select="$baseabsolute"/><xsl:value-of select="$osdelim"/>xml<xsl:value-of select="$osdelim"/><xsl:value-of select="$mapnum"/><xsl:value-of select="$osdelim"/></xsl:variable> 
     16        <xsl:variable name="xsltpath"><xsl:value-of select="$baseabsolute"/><xsl:value-of select="$osdelim"/>xslt<xsl:value-of select="$osdelim"/>raw2cooked.xsl</xsl:variable> 
     17        <xsl:variable name="inputpath"><xsl:value-of select="$mappath"/>xml-raw<xsl:value-of select="$osdelim"/><xsl:value-of select="$filename"/></xsl:variable> 
     18        <xsl:variable name="outputpath"><xsl:value-of select="$mappath"/>xml-cooked<xsl:value-of select="$osdelim"/><xsl:value-of select="$filename"/></xsl:variable> 
    1119         
    12 xsltproc -nonet -o xml-full\<xsl:value-of select="."/>.xml xslt\tackon.xsl xml-raw\<xsl:value-of select="."/>.xml 
    13 xsltproc -nonet -o xml-sorted\<xsl:value-of select="."/>.xml xslt\sortbib.xsl xml-full\<xsl:value-of select="."/>.xml 
    14 xsltproc -nonet -o xml-named\<xsl:value-of select="."/>.xml xslt\forcenamespaces.xsl xml-sorted\<xsl:value-of select="."/>.xml 
    15 xsltproc -nonet -o xml\<xsl:value-of select="."/>.xml xslt\gazindenter.xsl xml-named\<xsl:value-of select="."/>.xml 
    16 xsltproc -nonet -o html-raw\<xsl:value-of select="."/>.html xslt\gaz2html.xsl xml\<xsl:value-of select="."/>.xml 
    17 xsltproc -nonet -o html\<xsl:value-of select="."/>.html xslt\xhtmlindenter.xsl html-raw\<xsl:value-of select="."/>.html 
     20<xsl:text> </xsl:text>xsltproc -nonet -o <xsl:value-of select="$outputpath"/><xsl:text> </xsl:text><xsl:value-of select="$xsltpath"/><xsl:text> </xsl:text><xsl:value-of select="$inputpath"/>       
    1821    </xsl:template> 
    1922</xsl:stylesheet> 
  • system/trunk/data/geoentities/xslt/raw2cooked.xsl

    r293 r307  
    11<?xml version="1.0" encoding="UTF-8"?> 
     2<!-- 
     3     =========================================================================== 
     4     Copyright (C) 2006 Ancient World Mapping Center 
     5     
     6     This program is free software; you can redistribute it and/or modify 
     7     it under the terms of the GNU General Public License as published by 
     8     the Free Software Foundation; either version 2 of the License, or 
     9     (at your option) any later version. 
     10     
     11     This program is distributed in the hope that it will be useful, 
     12     but WITHOUT ANY WARRANTY; without even the implied warranty of 
     13     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the 
     14     GNU General Public License for more details. 
     15     
     16     You should have received a copy of the GNU General Public License along 
     17     with this program; if not, write to the Free Software Foundation, Inc., 
     18     51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 
     19      
     20     About Pleiades 
     21     
     22     Pleiades is an international research network and associated web portal and 
     23     content management system devoted to the study of ancient geography.  
     24     
     25     See http://icon.stoa.org/trac/pleiades/wiki. 
     26     
     27     Funding for the creation of this software was provided by a grant from the  
     28     U.S. National Endowment for the Humanities (http://www.neh.gov). 
     29     =========================================================================== 
     30--> 
    231<xsl:stylesheet xmlns="http://www.unc.edu/awmc/gazetteer/schemata/ns/0.3" 
    332    xmlns:georss="http://www.georss.org/georss" xmlns:tei="http://www.tei-c.org/ns/1.0" 
     
    736     
    837    <xsl:template match="/"> 
     38        <xsl:comment> 
     39     =========================================================================== 
     40     Copyright (C) 2006 Ancient World Mapping Center  
     41             
     42     This data is derived from compilations prepared for the American Philological 
     43     Association's Classical Atlas Project (1988-2000).  
     44      
     45     It is intended solely for testing purposes in the context of the Ancient World 
     46     Mapping Center's Pleiades Project and may not be reused or redistributed.  
     47             
     48     In its current state, it may contain errors and ommissions and is not appropriate 
     49     for citation or scholarly use. Any errors or ommissions are the result of  
     50     prototype conversion software, still under development by the AWMC's Pleiades 
     51     Project, and do not reflect the quality and completeness of the original data 
     52     nor the opinions of its scholarly compilers and editors.  
     53      
     54     About Pleiades 
     55     
     56     Pleiades is an international research network and associated web portal and 
     57     content management system devoted to the study of ancient geography.  
     58     
     59     See http://icon.stoa.org/trac/pleiades/wiki. 
     60     
     61     Funding for the conversion of this data was provided by a grant from the  
     62     U.S. National Endowment for the Humanities (http://www.neh.gov). 
     63     =========================================================================== 
     64        </xsl:comment> 
    965        <xsl:apply-templates /> 
    1066    </xsl:template>