Test sort/config
authorAdam Dickmeiss <adam@indexdata.dk>
Tue, 16 Sep 2003 12:18:24 +0000 (12:18 +0000)
committerAdam Dickmeiss <adam@indexdata.dk>
Tue, 16 Sep 2003 12:18:24 +0000 (12:18 +0000)
configure.in
recctrl/recgrs.c
test/Makefile.am
test/config/Makefile.am [new file with mode: 0644]
test/config/g.abs [new file with mode: 0644]
test/config/g.rec [new file with mode: 0644]
test/config/test1.sh [new file with mode: 0755]
test/config/zebra.cfg [new file with mode: 0644]

index 3c048ef..8dc9334 100644 (file)
@@ -1,5 +1,5 @@
 dnl Zebra, Index Data Aps, 1995-2003
-dnl $Id: configure.in,v 1.82 2003-09-08 09:30:17 adam Exp $
+dnl $Id: configure.in,v 1.83 2003-09-16 12:18:24 adam Exp $
 dnl
 AC_INIT(include/zebraver.h)
 AM_INIT_AUTOMAKE(idzebra,1.3.12)
@@ -391,7 +391,8 @@ AC_OUTPUT([
   doc/zebraphp.dsl
   doc/tkl.xsl
   test/Makefile test/gils/Makefile test/usmarc/Makefile test/api/Makefile
-  test/rusmarc/Makefile test/cddb/Makefile test/malxml/Makefile
+  test/rusmarc/Makefile test/cddb/Makefile test/malxml/Makefile 
+  test/config/Makefile
   perl/Makefile.PL test/xelm/Makefile
   test/dmoz/Makefile test/xpath/Makefile test/sort/Makefile test/zsh/Makefile
   examples/Makefile examples/gils/Makefile examples/zthes/Makefile
index 1bae99d..ee875f9 100644 (file)
@@ -1,4 +1,4 @@
-/* $Id: recgrs.c,v 1.82 2003-08-21 10:29:00 adam Exp $
+/* $Id: recgrs.c,v 1.83 2003-09-16 12:18:24 adam Exp $
    Copyright (C) 1995,1996,1997,1998,1999,2000,2001,2002,2003
    Index Data Aps
 
@@ -390,7 +390,7 @@ static void index_xpath (data1_node *n, struct recExtractCtrl *p,
             tag_path_full[flen] = 0;
             
             /* If we have a matching termlist... */
-            if ((tl = xpath_termlist_by_tagpath(tag_path_full, n))) {
+            if (n->root->u.root.absyn && (tl = xpath_termlist_by_tagpath(tag_path_full, n))) {
                 for (; tl; tl = tl->next) {
                     wrd->reg_type = *tl->structure;
                     /* this is the ! case, so structure is for the xpath index */
index ce2eb2f..f4141bc 100644 (file)
@@ -1,3 +1,3 @@
 
-SUBDIRS=api gils malxml usmarc dmoz xpath sort xelm cddb rusmarc zsh
+SUBDIRS=api gils malxml config usmarc dmoz xpath sort xelm cddb rusmarc zsh
 
diff --git a/test/config/Makefile.am b/test/config/Makefile.am
new file mode 100644 (file)
index 0000000..35c7e9f
--- /dev/null
@@ -0,0 +1,6 @@
+# $Id: Makefile.am,v 1.1 2003-09-16 12:18:25 adam Exp $
+
+check_SCRIPTS = test1.sh
+TESTS = test1.sh
+
+EXTRA_DIST = zebra.cfg $(check_SCRIPTS) g.grs g.abs
diff --git a/test/config/g.abs b/test/config/g.abs
new file mode 100644 (file)
index 0000000..b2290ad
--- /dev/null
@@ -0,0 +1,146 @@
+# Slight modification of gils.abs with errors!
+# $Id: g.abs,v 1.1 2003-09-16 12:18:25 adam Exp $
+
+name gils
+reference GILS-schema
+attset gils.att
+tagset bad.tag
+varset var1.var
+
+maptab gils-usmarc.map
+maptab gils-summary.map
+
+# Element set names
+
+esetname VARIANT gils-variant.est  # for WAIS-compliance
+esetname B gils-b.est
+esetname G gils-g.est
+esetname W gils-b.est   # We don't really do bodyOfDisplay yet.
+esetname F @
+
+systag sysno none
+
+#all Any
+
+elm (1,1)                   schemaIdentifier           -
+elm (1,10)                  rank                       -
+elm (1,12)                  url                                -
+elm (1,14)                  localControlNumber         -
+elm (2,1)                   title                      !:w,!:p,!:s
+elm (4,52)                  originator                 author-name-corporate
+#
+# Additional structuring of originator non-standard.
+#
+elm (4,52)/(2,7)            originatorName             author-name-corporate
+elm (4,52)/(2,10)           originatorOrganization     author-name-corporate
+elm (4,52)/(4,2)            originatorStreetAddress    author-name-corporate
+elm (4,52)/(4,3)            originatorCity             author-name-corporate
+elm (4,52)/(4,4)            originatorStateOrProvince  author-name-corporate
+elm (4,52)/(4,5)            originatorZipOrPostalCode  author-name-corporate
+elm (4,52)/(2,16)           originatorCountry          author-name-corporate
+elm (4,52)/(2,12)           originatorNetworkAddress   author-name-corporate
+elm (4,52)/(4,6)            originatorHoursofService   author-name-corporate
+elm (4,52)/(2,14)           originatorTelephone                author-name-corporate
+elm (4,52)/(2,15)           originatorFax              author-name-corporate
+elm (2,2)                   author                     !
+#
+# Additional structuring of author non-standard.
+#
+elm (2,2)/(2,7)             authorName                 author
+elm (2,2)/(2,10)            authorOrganization         author
+elm (2,2)/(4,2)             authorStreetAddress                author
+elm (2,2)/(4,3)             authorCity                 author
+elm (2,2)/(4,4)             authorStateOrProvince      author
+elm (2,2)/(4,5)             authorZipOrPostalCode      author
+elm (2,2)/(2,16)            authorCountry              author
+elm (2,2)/(2,12)            authorNetworkAddress       author
+elm (2,2)/(4,6)             authorHoursofService       author
+elm (2,2)/(2,14)            authorTelephone            author
+elm (2,2)/(2,15)            authorFax                  author
+elm (2,4)                   dateOfPublication          !
+elm (2,3)                   placeOfPublication          place-publication
+elm (4,32)                  languageOfResource         code-language
+elm (2,6)                   abstract                   !
+elm (4,95)                  controlledSubjectIndex     -
+elm (4,95)/(4,21)           subjectThesaurus           -
+elm (4,95)/(4,96)           subjectTermsControlled     controlled-subject-index
+elm (4,95)/(4,96)/(4,20)    controlledTerm             index-terms
+elm (4,97)                  subjectTermsUncontrolled    uncontrolled-term
+elm (4,97)/(4,22)           uncontrolledTerm           uncontrolled-term
+elm (4,71)                  spatialDomain              !
+elm (4,71)/(4,91)           boundingCoordinates                !
+elm (4,71)/(4,91)/(4,9)     westBoundingCoordinate      !:n
+elm (4,71)/(4,91)/(4,10)    eastBoundingCoordinate     !:n
+elm (4,71)/(4,91)/(4,11)    northBoundingCoordinate    !:n
+elm (4,71)/(4,91)/(4,12)    southBoundingCoordinate    !:n
+elm (4,71)/(4,92)           place                      !
+elm (4,71)/(4,92)/(4,14)    placeKeywordThesaurus      -
+elm (4,71)/(4,92)/(4,13)    placeKeyword               place
+elm (4,93)                  timePeriod                 !
+elm (4,93)/(4,16)           timePeriodTextual          !
+elm (4,93)/(4,101)          timePeriodStructured       !
+elm (4,93)/(4,101)/(4,15)   beginningDate              !
+elm (4,93)/(4,101)/(4,36)   endingDate                 !
+elm (4,70)                  availability               !
+elm (4,70)/(4,33)           medium                     material-type
+elm (4,70)/(4,90)           distributor                        !
+elm (4,70)/(4,90)/(2,7)     distributorName            !
+elm (4,70)/(4,90)/(2,10)    distributorOrganization    !
+elm (4,70)/(4,90)/(4,2)     distributorStreetAddress   !
+elm (4,70)/(4,90)/(4,3)     distributorCity            !
+elm (4,70)/(4,90)/(4,4)     distributorStateOrProvince !
+elm (4,70)/(4,90)/(4,5)     distributorZipOrPostalCode !
+elm (4,70)/(4,90)/(2,16)    distributorCountry         !
+elm (4,70)/(4,90)/(2,12)    distributorNetworkAddress  !
+elm (4,70)/(4,90)/(4,6)     distributorHoursofService  !
+elm (4,70)/(4,90)/(2,14)    distributorTelephone       !
+elm (4,70)/(4,90)/(2,15)    distributorFax             !
+elm (4,70)/(4,7)            resourceDescription                !
+elm (4,70)/(4,55)           orderProcess               !
+elm (4,70)/(4,55)/(4,28)    orderInformation           !
+elm (4,70)/(4,55)/(4,29)    cost                       !
+elm (4,70)/(4,55)/(4,30)    costInformation            !
+elm (4,70)/(4,8)            technicalPrerequisites     !
+elm (4,70)/(4,93)           availableTimePeriod                !
+elm (4,70)/(4,93)/(4,16)    availableTimeTextual       !
+elm (4,70)/(4,93)/(4,102)   availableTimeStructured    !
+elm (4,70)/(4,93)/(4,102)/(4,15)  beginningDate        available-time-structured
+elm (4,70)/(4,93)/(4,102)/(4,36)  endingDate           available-time-structured
+elm (4,70)/(4,99)           availableLinkage           !
+elm (4,70)/(4,99)/(4,18)    linkageType                        !
+elm (4,70)/(4,99)/(4,17)    linkage                   available-linkage:u,linkage:u
+elm (4,57)                  sourcesOfData              !
+elm (4,58)                  methodology                        !
+elm (4,53)                  accessConstraints          !
+elm (4,53)/(4,25)           generalAccessConstraints   !
+elm (4,53)/(4,26)           originatorDisseminationControl     !
+elm (4,53)/(4,27)           securityClassificationControl      !
+elm (4,54)                  useConstraints                     !
+elm (4,94)                  pointOfContact             !
+elm (4,94)/(2,7)            contactName                        !
+elm (4,94)/(2,10)           contactOrganization                !
+elm (4,94)/(4,2)            contactStreetAddress       !
+elm (4,94)/(4,3)            contactCity                        !
+elm (4,94)/(4,4)            contactStateOrProvince     !
+elm (4,94)/(4,5)            contactZipOrPostalCode     !
+elm (4,94)/(2,16)           contactCountry             !
+elm (4,94)/(2,12)           contactNetworkAddress      !
+elm (4,94)/(4,6)            contactHoursOfService      !
+elm (4,94)/(2,14)           contactTelephone           !
+elm (4,94)/(2,15)           contactFax                 !
+elm (4,59)                  supplementalInformation    -
+elm (4,51)                  purpose                    !
+elm (4,56)                  agencyProgram              !
+elm (4,98)                  crossReference             !
+elm (4,98)/(2,1)            crossReferenceTitle                !
+elm (4,98)/(4,35)           crossReferenceRelationship !
+elm (4,98)/(4,100)          crossReferenceLinkage      !
+elm (4,98)/(4,100)/(4,18)    linkageType               -
+elm (4,98)/(4,100)/(4,17)    linkage                   cross-reference-linkage:u
+elm (4,31)                  scheduleNumber             !
+elm (4,1)                   controlIdentifier          identifier-standard
+elm (4,23)                  originalControlIdentifier  !
+elm (4,19)                  recordSource               !
+elm (4,34)                  languageOfRecord           !
+elm (1,16)                  dateOfLastModification     date/time-last-modified:w,date/time-last-modified:s
+elm (4,24)                  recordReviewDate           !
diff --git a/test/config/g.rec b/test/config/g.rec
new file mode 100644 (file)
index 0000000..e3a0f01
--- /dev/null
@@ -0,0 +1,196 @@
+<g>
+
+<Title>
+UTAH EARTHQUAKE EPICENTERS
+<Acronym>
+UUCCSEIS
+</Acronym>
+</Title>
+
+<Originator>
+UTAH GEOLOGICAL AND MINERAL SURVEY
+</Originator>
+
+<Local-Subject-Index>
+APPALACHIAN VALLEY; EARTHQUAKE; EPICENTER; SEISMOLOGY; UTAH
+</Local-Subject-Index>
+
+<Abstract>
+Five files of epicenter data arranged by date comprise this data set.  These 
+files are searchable by magnitude and longitude/latitude.  Hardcopy of listing 
+and plot of requested area available.  Epicenter location and date, magnitude, 
+and focal depth available.
+<Format>
+DIGITAL DATA SETS
+</Format>
+
+<Data-Category>
+TERRESTRIAL
+</Data-Category>
+
+<Comments>
+Data are supplied by the University of Utah Seismograph Station. The Utah 
+Geologcial and Mineral Survey (UGMS) is merely a clearinghouse of the data.
+</Comments>
+</Abstract>
+
+<Spatial-Domain>
+
+<Geographic-Coverage>
+US STATE
+</Geographic-Coverage>
+
+<Coverage-Description>
+UTAH
+</Coverage-Description>
+
+<Bounding-Coordinates>
+
+<West-Bounding-Coordinate>
+-114
+</West-Bounding-Coordinate>
+
+<East-Bounding-Coordinate>
+-109
+</East-Bounding-Coordinate>
+
+<North-Bounding-Coordinate>
+42
+</North-Bounding-Coordinate>
+
+<South-Bounding-Coordinate>
+37
+</South-Bounding-Coordinate>
+</Bounding-Coordinates>
+</Spatial-Domain>
+
+<Time-Period>
+
+<Time-Period-Textual>
+-PRESENT
+</Time-Period-Textual>
+</Time-Period>
+
+<Availability>
+
+<Distributor>
+
+<Organization>
+UTAH GEOLOGICAL AND MINERAL SURVEY
+</Organization>
+
+<Street-Address>
+606 BLACK HAWK WAY
+</Street-Address>
+
+<City>
+SALT LAKE CITY
+</City>
+
+<State>
+UT
+</State>
+
+<Zip-Code>
+84108
+</Zip-Code>
+
+<Country>
+USA
+</Country>
+
+<Telephone>
+(801) 581-6831
+</Telephone>
+</Distributor>
+
+<Resource-Description>
+UTAH EARTHQUAKE EPICENTERS
+</Resource-Description>
+
+<Technical-Prerequisites>
+
+<Data-Set-Type>
+AUTOMATED
+</Data-Set-Type>
+
+<Access-Method>
+BATCH
+</Access-Method>
+
+<Number-of-Records>
+8,700
+</Number-of-Records>
+
+<Computer-Type>
+PC NETWORK
+</Computer-Type>
+
+<Computer-Location>
+SALT LAKE CITY, UT
+</Computer-Location>
+</Technical-Prerequisites>
+</Availability>
+
+<Access-Constraints>
+
+<Documentation>
+NONE
+</Documentation>
+</Access-Constraints>
+
+<Use-Constraints>
+
+<Status>
+OPERATIONAL
+</Status>
+</Use-Constraints>
+
+<Point-of-Contact>
+
+<Name>
+BILL CASE
+</Name>
+
+<Organization>
+UTAH GEOLOGICAL AND MINERAL SURVEY
+</Organization>
+
+<Street-Address>
+606 BLACK HAWK WAY
+</Street-Address>
+
+<City>
+SALT LAKE CITY
+</City>
+
+<State>
+UT
+</State>
+
+<Zip-Code>
+84108
+</Zip-Code>
+
+<Country>
+USA
+</Country>
+
+<Telephone>
+(801) 581-6831
+</Telephone>
+</Point-of-Contact>
+
+<Control-Identifier>
+ESDD0006
+</Control-Identifier>
+
+<Record-Source>
+UTAH GEOLOGICAL AND MINERAL SURVEY
+</Record-Source>
+
+<Date-of-Last-Modification>
+198903
+</Date-of-Last-Modification>
+</g>
+
diff --git a/test/config/test1.sh b/test/config/test1.sh
new file mode 100755 (executable)
index 0000000..92f67d9
--- /dev/null
@@ -0,0 +1,3 @@
+#!/bin/sh
+../../index/zebraidx init
+../../index/zebraidx update g.rec
diff --git a/test/config/zebra.cfg b/test/config/zebra.cfg
new file mode 100644 (file)
index 0000000..486d510
--- /dev/null
@@ -0,0 +1,17 @@
+# Simple Zebra configuration file
+# $Id: zebra.cfg,v 1.1 2003-09-16 12:18:25 adam Exp $
+#
+# Where the schema files, attribute files, etc are located.
+profilePath: .:../../tab
+
+# Files that describe the attribute sets supported.
+attset: bib1.att
+attset: gils.att
+attset: explain.att
+
+recordtype: grs.sgml
+
+#storekeys: 1
+#storedata: 1
+#recordId: (bib1,identifier-standard)
+isam: b