Index: /trunk/gsdl/collect/demo/etc/org.txt
===================================================================
--- /trunk/gsdl/collect/demo/etc/org.txt	(revision 2817)
+++ /trunk/gsdl/collect/demo/etc/org.txt	(revision 2818)
@@ -1,60 +1,4 @@
-accu	1	ACCU
-ag21	2	"Agenda 21"
-bgz	3	"BASIN - GTZ - SKAT"
-bostid	4	BOSTID
-cps	5	CPS
-cpas	6	"CTA Spore"
-cf	7	"Commonwealth Foundation"
-csu	8	"Computer Science Unplugged"
-dcs	9	"Development Consultancy Services"
-1echo	0	E.C.H.O
-ecc	11	"EC Courier"
-ecdg8	12	"EC DG8"
-echo	13	"Educational Concerns for Hunger Organization"
-fao	14	FAO
-faobfs	15	"FAO Better Farming series"
-ceres	16	"FAO Ceres"
-ff	17	"Food First"
-ghp	18	GHP
-grain	19	GRAIN
-gret	20	GRET
-gtz	21	GTZ
-gate	22	"GTZ GATE Magazine"
-habitat	23	Habitat
-idrc	24	IDRC
-iisd	25	IISD
-irma	26	IRMA
-bp	27	"ITDG Boiling Point"
-itdg	28	"ITDG Food Chain"
-iis	29	"Indian Institute of Sciences"
-chandra	30	"Individual Contributor Chandrakant"
-alkire	31	"Individual Contributor S. Alkire"
-inforse	32	Inforse
-iirr	33	"International Institute for Rural Reconstruction (IIRR)"
-msf	34	MSF
-ngls	35	NGLS
-norad	36	NORAD
-nri	37	NRI
-nsc	38	"North South Centre"
-op	39	"Orbi Pharma"
-oxfam	40	Oxfam
-pace	41	PACE
-paho	42	PAHO
-pc	43	"Peace Corps"
-pelum	44	Pelum
-sida	45	SIDA
-skat	46	SKAT
-tool	47	Tool
-un	48	UN
-unesco	49	UNESCO
-unicef	50	UNICEF
-fnb	51	"UNU Food and Nutrition Bulletin"
-unu	52	"UNU United Nations University"
-vso	53	VSO
-who	54	WHO
-wwf	55	WWF
-wwsf	56	WWSF
-wa	57	"Water Aid"
-winrock	58	Winrock
-ws	59	Workshop
-wb	60	"World Bank"
+"BOSTID"                    1  BOSTID
+"EC Courier"                2  "EC Courier"
+"FAO Better Farming series" 3  "FAO Better Farming series"
+"World Bank"                4  "World Bank"
Index: /trunk/gsdl/collect/demo/etc/sub.txt
===================================================================
--- /trunk/gsdl/collect/demo/etc/sub.txt	(revision 2817)
+++ /trunk/gsdl/collect/demo/etc/sub.txt	(revision 2818)
@@ -1,245 +1,245 @@
-1        1        "General reference"
-1.2      1.2      "Dictionaries, glossaries, language courses, terminology (all languages)"
-2        2        "Sustainable Development, International cooperation, Projects; NGO, Organizations, Poverty and Hunger Alleviation, Basic Human Needs"
-2.1      2.1      "Development policy and theory, international cooperation, national planning, national plans"
-2.2      2.2      "Development, national planning, national plans"
-2.3      2.3      "Project planning and evaluation (incl. project management and dissemination strategies)"
-2.4      2.4      "Regional development and planning incl. regional profiles"
-2.5      2.5      "Nongovernmental organizations (NGOs) in general, self- help organizations (their role in development). For specific organizations such as women's or peasants' see respective class within 06."
-2.6      2.6      "Organizations, institutions, United Nations (general, directories, yearbooks, annual reports, etc.)"
-2.6.1    2.6.1    "United Nations"
-2.6.2    2.6.2    "International organizations"
-2.6.3    2.6.3    "Regional organizations"
-2.6.5    2.6.5    "European Community - European Union"
-2.7      2.7      "Sustainable Development, Development models and examples; Best practices (general)"
-2.8      2.8      "Basic Human Needs"
-2.9      2.9      "Hunger and Poverty Alleviation"
-3        3        "Economics, Economic policies, Finance, Trade, Structural Adjustment"
-3.2      3.2      "Economic and social situation, economic policy, country reports (incl. national statistical yearbooks)"
-3.4      3.4      "Industrial economics, industrial development, foreign investment (incl. investment policy, investment promotion) incl.multinational corporations"
-3.6     3.6       "Trade and commerce, Export policy and reglementations"
-3.7     3.7       "Tourism (economic and social aspects)"
-3.8     3.8       "Labour economics"
-3.8.1   3.8.1     "Employment policy"
-3.10    3.10      "Structural Adjustment"
-4       4         "Business, Micro-entreprises, Management, Marketing, Finance, Microfinance, Cooperatives"
-4.1     4.1       "Business economics (general works, textbooks)"
-4.2     4.2       "Microeconomic planning techniques, Micro-entreprises"
-4.3     4.3       "Management and personnel management"
-4.4     4.4       "Business organization and administration, office management"
-4.5     4.5       "Marketing and commercialisation, export (from businesses viewpoint)"
-4.6     4.6       "Accounting"
-4.7     4.7       "Finance and microfinance / microcredit"
-4.8     4.8       "Cooperatives, cooperative movement"
-4.8.1   4.8.1     "Agricultural cooperatives"
-4.8.4   4.8.4     "Housing cooperatives"
-4.8.5   4.8.5     "Other specific cooperatives"
-5       5         "Politics, Public administration, Law and Legislation, Peace, Human Rights"
-5.2     5.2       "Public administration, Tasks of councillors"
-5.4     5.4       "Human rights, humanitarian law"
-5.4     5.5       "Disarmament, Peace, Conflict and Conflict Resolutions"
-6       6         "Society, Culture, Community, Woman, Youth, Population"
-6.1     6.1       "Social sciences, sociology (works comprising several subgroups) incl. participatory research and training"
-6.2     6.2       "Society, social structure, social change, social services, social movements, social groups, Minorities"
-6.3     6.3       "Community development, community organizing"
-6.4     6.4       "Women, gender and development, women's organizations"
-6.5     6.5       "Children and youth (youth centres)"
-6.6     6.6       "Demography and population"
-6.7     6.7       "Philosophy"
-6.8     6.8       "History, Cultural Heritage and Language"
-6.9     6.9       "Psychology"
-6.10    6.10      "Anthropology, ethnology"
-6.11    6.11      "Religion - Spirituality - Yoga"
-6.12    6.12      "Art, Literature, Creativity, Traditional Cultures, Fashion"
-7       7         "Education and Training"
-7.1     7.1       "Education and training (general works, theories, methods)"
-7.3     7.3       "Teaching methods and aids"
-7.4     7.4       "Adult education, Literacy training"
-7.5     7.5       "Early education, Primary education, Secondary education"
-7.6     7.6       "Specific courses or subjects, educational games"
-7.7     7.7       "Higher education"
-7.8     7.8       "Vocational, professional and practical training - for specific training- curricula, textbooks- see specific subject."
-7.9     7.9       "Health Education and Training (see under health and Nutrition)"
-7.10    7.10      "Environmental education, Global education, Psychological and assertiveness education, Non-formal education etc"
-7.11    7.11      "Language education"
-7.12    7.12      "Specialised education: see also under the subject"
-7.13    7.13      "Teacher Training"
-8       8         "Communication, Information and Documentation"
-8.1     8.1       "Communication, telecommunication, mass communication, mass media, film-making"
-8.2     8.2       "Information for development, Information transfer, Information policy"
-8.3     8.3       "Documentation, Library science and management, see also RAMP studies under 08.06"
-8.4     8.4       "Information technology, Computer science, Computer use, Use of computers for developing countries"
-8.5     8.5       "Internet, e-mail"
-8.6     8.6       "Records and Archives Management Programme (RAMP) of  UNESCO, Archive Management"
-9       9         "Transport"
-9.1     9.1       "Transport (rural and urban) (general works)"
-9.2     9.2       "Land transport"
-10      10        "Science, Research and Technology"
-10.1    10.1      "Natural science, technology, engineering, research and development, research methods and theory (general works, directories, encyclopedias)"
-10.2    10.2      "Transfer of technology and scientific cooperation"
-10.2.1  10.2.1    "Technology transfer and scientific cooperation for developing countries"
-10.3    10.3      "Appropriate/ Alternative/ Applied technology (AT), traditional, intermediate technology,  economic and social aspect, directories"
-10.8    10.8      "Biology"
-10.9    10.9      "Biotechnology, genetic engineering"
-10.10   10.10     "Medicine and Health : science and research"
-11      11        "Ecology, Biodiversity, Natural resources, Environment, Waste Disposal"
-11.1    11.1      "Natural resources, geography"
-11.1.1  11.1.1    "Climate, weather, meteorology . Climatologic Changes. Global warming"
-11.2    11.2      "Ecology, environmental policy, eco- development studies"
-11.3    11.3      "Resources conservation, environmental protection, biodiversity"
-11.3.1  11.3.1    "Arid zones, desertification"
-11.3.2  11.3.2    "Nature reserve, game reserve"
-11.3.3  11.3.3    "Rainforests and rainforest conservation"
-11.3.4  11.3.4    "Biodiversity conservation"
-11.4    11.4      "Erosion and erosion control - for techniques see agriculture and forestry."
-11.5    11.5      "Pollution, Pollution control, Pesticides, Biological monitoring, Asbestos"
-11.5.2  11.5.2    "Water pollution"
-11.5.4  11.5.4    "Pesticide pollution"
-11.5.5  11.5.5    "Asbestos"
-11.6    11.6      "Solid waste disposal"
-11.7    11.7      "Environmental Handbook of GTZ-BMZ"
-12      12        "Water, Sanitation and Sewage Disposal"
-12.1    12.1      "Water and sanitation, hydrology"
-12.2    12.2      "Water resources (surface water, groundwater)"
-12.3    12.3      "Hydraulic structures (dams, intakes, wells, ponds, cisterns)"
-12.4    12.4      "Pumps and other water- lifting devices"
-12.5    12.5      "Water supply and storage"
-12.6    12.6      "Water treatment and purification (biological, chemical, physical)"
-12.7    12.7      "Sanitation. Waste water and sewage disposal"
-13      13        "Health, Nutrition, Medicine"
-13.1    13.1      "Health (general works, incl. health economics and sociology, health statistics, health and community development)"
-13.1.1  13.1.1    "Health planning and policy"
-13.1.6  13.1.6    "Disasters, medicine in humanitarian emergencies"
-13.2    13.2      "Food, Nutrition and Malnutrition"
-13.3    13.3      "Family health,  Mother and Child care, Family planning, Pregnancy and Childbirth"
-13.4    13.4      "Community Health, Health Care Delivery, Extension workers and training"
-13.5    13.5      "Medicine, Clinical Care, Diseases, Hygiene, Emergencies (treatment of specific diseases, injuries, accidents)"
-13.6    13.6      "Health Education, Promotion, Prevention, AIDS Prevention, Safety, Books covering multiple health dimensions"
-13.7    13.7      "Production and use of medicines, essential drugs"
-13.7.1  13.7.1    "Pharmaceuticals and essential drugs"
-13.7.2  13.7.2"   "Herbal medicines, medicinal plants"
-13.8    13.8      "Health material and equipment; aids for disabled people"
-13.9    13.9      "Medical an nutrition research papers, medical and nutrition scientific studies, specialised tropical medicine publications"
-14      14        "Agriculture and Food Processing"
-14.1    14.1      "Agriculture (general works), Economics,  Policies, Development, Research, Management"
-14.1.1  14.1.1    "Land reform, Settlements, Rural Development and related topics"
-14.1.2  14.1.2    "Agricultural training and education"
-14.1.3  14.1.3    "Agricultural Science and Research"
-14.1.4  14.1.4    "Rural and Farm management"
-14.1.5  14.1.5    "Policies and Planning in agriculture"
-14.1.6  14.1.6    "Biotechnology and agriculture"
-14.1.7  14.1.7    "Agricultural finance systems"
-14.2    14.2      "Agricultural production systems (shifting cultivation, wet- land farming, dry- land farming, agroforestry), Sustainable Agriculture"
-14.3    14.3      "Organic farming, Eco-farming"
-14.4    14.4      "Agricultural implements, tools and machinery (incl. mechanization, agricultural transport) - for implements specific to particular plants see respective plant."
-14.5    14.5      "Soil and land management, improvement and treatment (incl. terracing, erosion control techniques, rangeland improvement)"
-14.6    14.6      "Irrigation and drainage - for hydraulic structures see 12.03."
-14.7    14.7      "Fertilization and composting"
-14.8    14.8      "Storage and packaging of agricultural products, Post-Harvest management"
-14.9    14.9      "Agricultural waste processing - for energy use see 20.06."
-14.10   14.10     "Food processing and preservation"
-14.10.2 14.10.2   "Food drying (all kinds)"
-14.10.3 14.10.3   "Fermented Foods"
-14.10.4 14.10.4   "Oil production and processing"
-14.12   14.12     "Better Farming series of FAO and INADES"
-15      15        "Plant and Crop Production, Protection, and Processing"
-15.1    15.1      "Plant/crop production and processing, vegetable gardening, botany (general works, publications comprising several plants and practical how to books, intercropping)"
-15.2    15.2      "Plant protection (incl. insecticidinal plants), Pests and Pest Control, Integrated Pest Management"
-15.4    15.4      "Cereals (rice, corn/maize, millet, sorghum, wheat, etc.)"
-15.5    15.5      "Starchy crops and root crops (cassava, potatoes, etc.)"
-15.6    15.6      "Oil- producing plants, vegetable oil, nuts"
-15.7    15.7      "Garden vegetables, legumes, mushrooms"
-15.8    15.8      "Fruits and wine (bananas, mango's, apple's etc)"
-15.10   15.10     "Coffee, Tea, Cocoa, Coca and other stimulants"
-15.12   15.12     "Rubber, resin, wax plants"
-15.14   15.14     "Fodder and pasture plants"
-15.15   15.15     "Other plants/crops, intercropping (for intercropping, see also under 15.01)"
-16      16        "Animal Husbandry and Animal Product Processing"
-16.1    16.1      "Animal husbandry (general,works) incl. animal feed, works covering several aspects and animals, zoology, see also other animals 6.11"
-16.2    16.2      "Veterinary medicine, animal diseases"
-16.3    16.3      "Animal traction (excl. implements), animal training"
-16.5    16.5      "Cattle"
-16.6    16.6      "Goats, sheep, camels"
-16.8    16.8      "Rabbits and guinea pigs"
-16.9    16.9      "Poultry, ducks and other birds"
-16.10   16.10     "Beekeeping and honey extraction"
-16.11   16.11     "Other animals (micro-livestock, little known animals, silkworms, reptiles, frogs, snails, game, etc.)"
-16.12   16.12     "Animal product processing - for processing of wool and silk see 19.08 - for processing of leather see 19.09"
-16.12.2 16.12.2   "Milk and egg processing (dairy, cheese)"
-17      17        "Fishery and Aquaculture"
-17.1    17.1      "Fishery and aquaculture (general works), fishery resources"
-17.2    17.2      "Fishing techniques and equipment"
-17.3    17.3      "Aquaculture, fish farming, fish production (fish ponds, feeding, etc.)"
-17.6    17.6      "Fishery product processing, storage, and marketing"
-18      18        "Forestry and Agroforestry"
-18.1    18.1      "Forestry, general works, Forest conservation"
-18.2    18.2      "Reforestation - for erosion control see 11.04 and 14.05."
-18.3    18.3      "Cultivation and conservation (nurseries), protection and pest resistance"
-18.4    18.4      "Forests, Cloud Forests"
-18.5    18.5      "Specific trees and other forestry plants (incl. bamboo)"
-18.6    18.6      "Agroforestry"
-18.7    18.7      "Sustainable exploitation and commercialisation of forest products"
-19      19        "Industry, Manufacture and Services"
-19.1    19.1      "Industry (general works, textbooks, directories) incl. industrial planning"
-19.2    19.2      "Industrial training, consulting - for vocational training see 07.08."
-19.3    19.3      "Small- scale industry, handicraft, home industry"
-19.4    19.4      "Industrial profiles and studies covering several sectors"
-19.5    19.5      "Recycling and solid waste services"
-19.7    19.7      "Mining and quarrying"
-19.8    19.8      "Textile industry, manufacture of wearing apparel (incl. processing of natural fibres)"
-19.11   19.11     "Pulp and paper products (incl. printing and bookbinding)"
-19.12   19.12     "Chemical and chemical products industry incl. soap and candle production, salt"
-19.13   19.13     "Pottery, ceramics, glass and glass products (incl. jewellery, buttons, chalk)"
-19.14   19.14     "Metal industry"
-19.14.1 19.14.1   "Forging and blacksmithing"
-19.17   19.17     "Packing Industry"
-20      20        "Energy , Renewable energies, Household energy"
-20.1    20.1      "Energy and power (general works) incl. energy per country, energy savings, and publications covering several sources of energy, rural energy"
-20.2    20.2      "Transformation, distribution and storage of energy and electricity"
-20.2.1  20.2.1    "Rural electrification"
-20.3    20.3      "Conventional energy resources (oil, petroleum, coal, natural gas, peat, nuclear energy)"
-20.4    20.4      "Renewable energy resources"
-20.4.1  20.4.1    "Bio-mass (general works)"
-20.5    20.5      "Wood and charcoal (incl. kilns and activated charcoal)"
-20.6    20.6      "Solid fuels from agricultural wastes and other organic material (pellets, eco- bricks, briquets)"
-20.7    20.7      "Biogas (incl. biogas equipment)"
-20.8    20.8      "Cookstoves, Fuel-saving cookstoves, Household Energy"
-20.10   20.10     "Alcohol and other liquid fuels"
-20.11   20.11     "Solar energy, photovoltaic energy"
-20.12   20.12     "Wind energy"
-20.13   20.13     "Hydropower"
-20.14   20.14     "New Energy technology and research, Planetary Association for Clean Energy publications"
-21      21        "Settlements, Housing, Building -  Infrastructure Construction (Roads etc)"
-21.1    21.1      "Settlements and housing: general works incl. low- cost housing, planning techniques, surveying, etc."
-21.2    21.2      "Urban settlements (urban housing programmes, urbanization, squatters, slums, slum improvement)"
-21.3    21.3      "Rural settlements"
-21.4    21.4      "Architecture and Building design"
-21.4.2  21.4.2    "Solar and climate responsive architecture"
-21.5    21.5      "Construction materials"
-21.6    21.6      "Building machinery and equipment"
-21.7    21.7      "Building and construction (building components, construction techniques)"
-21.7.1  21.7.1    "Roofing"
-21.9    21.9      "Civil engineering (roads, bridges, etc.) - Road Construction"
-22      22        "Disasters, Disaster Mitigation, Humanitarian and Food Aid, Humanitarian Interventions, Refugees"
-22.1    22.1      "Disasters and Disaster Mitigation, Organisation"
-22.2    22.2      "Humanitarian Aid, Food Aid"
-22.3    22.3      "Humanitarian Interventions and Conflicts"
-22.5    22.5      "Refugees"
-23      23        "Development Periodicals and Magazines"
-23.1    23.1      "BASIN-NEWS - Building Advisory Service and Information Network by GTZ- GATE, SKAT,  ITDG and CRATerre"
-23.2    23.2      "Boiling Point Newsletters on Household Energy of Intermediate Technology Development Group.and GTZ"
-23.3    23.3      "CERES - FAO Review on Agriculture and Development: 1976 - 1997"
-23.4    23.4      "Developing Ideas - Bi-monthly Digests by the International Institute for Sustainable Development"
-23.5    23.5      "ECHO's Human Development Notes by the Educational Concerns for Hunger network"
-23.6    23.6      "Food and Nutrition Bulletins 1978-1996 - United Nations University"
-23.7    23.7      "Food Chain, newsletters on Food Processing of Intermediate Technology Development Group."
-23.8    23.8      "GATE Development magazine of GTZ"
-23.9    23.9      "HDD-FLASH, newsletter on Population, Health and Nutrition of the Worldbank Human Development Department"
-23.10   23.10     "IDRC monthly and weekly reports 1993 - 1997"
-23.11   23.11     "New and Noteworthy in Nutrition - World Bank"
-23.12   23.12     "SEEDLING: bi-montly publication of GRAIN - Genetic Resources International - Spain"
-23.13   23.13     "SPORE Bulletins 1986-1996 of the CTA - Technical and Agricultural Centre of the European Union"
-23.14   23.14     "Sustainable Energy Newsletters of the INFORSE network"
-23.15   23.15     "The Courier ACP 1990 - 1996 Africa-Caribbean-Pacific - European Union"
-23.16   23.16     "The NGLS Magazine Go Between"
-24      24        "Resources, Product Lists, Catalogues, Internet Sites"
+"General reference" 1 "General reference"
+"Dictionaries, glossaries, language courses, terminology (all languages)" 1.2 "Dictionaries, glossaries, language courses, terminology (all languages)"
+"Sustainable Development, International cooperation, Projects; NGO, Organizations, Poverty and Hunger Alleviation, Basic Human Needs" 2 "Sustainable Development, International cooperation, Projects; NGO, Organizations, Poverty and Hunger Alleviation, Basic Human Needs"
+"Development policy and theory, international cooperation, national planning, national plans" 2.1 "Development policy and theory, international cooperation, national planning, national plans"
+"Development, national planning, national plans" 2.2 "Development, national planning, national plans"
+"Project planning and evaluation (incl. project management and dissemination strategies)" 2.3 "Project planning and evaluation (incl. project management and dissemination strategies)"
+"Regional development and planning incl. regional profiles" 2.4 "Regional development and planning incl. regional profiles"
+"Nongovernmental organizations (NGOs) in general, self- help organizations (their role in development). For specific organizations such as women's or peasants' see respective class within 06." 2.5 "Nongovernmental organizations (NGOs) in general, self- help organizations (their role in development). For specific organizations such as women's or peasants' see respective class within 06."
+"Organizations, institutions, United Nations (general, directories, yearbooks, annual reports, etc.)" 2.6 "Organizations, institutions, United Nations (general, directories, yearbooks, annual reports, etc.)"
+"United Nations" 2.6.1 "United Nations"
+"International organizations" 2.6.2 "International organizations"
+"Regional organizations" 2.6.3 "Regional organizations"
+"European Community - European Union" 2.6.5 "European Community - European Union"
+"Sustainable Development, Development models and examples; Best practices (general)" 2.7 "Sustainable Development, Development models and examples; Best practices (general)"
+"Basic Human Needs" 2.8 "Basic Human Needs"
+"Hunger and Poverty Alleviation" 2.9 "Hunger and Poverty Alleviation"
+"Economics, Economic policies, Finance, Trade, Structural Adjustment" 3 "Economics, Economic policies, Finance, Trade, Structural Adjustment"
+"Economic and social situation, economic policy, country reports (incl. national statistical yearbooks)" 3.2 "Economic and social situation, economic policy, country reports (incl. national statistical yearbooks)"
+"Industrial economics, industrial development, foreign investment (incl. investment policy, investment promotion) incl.multinational corporations" 3.4 "Industrial economics, industrial development, foreign investment (incl. investment policy, investment promotion) incl.multinational corporations"
+"Trade and commerce, Export policy and reglementations" 3.6 "Trade and commerce, Export policy and reglementations"
+"Tourism (economic and social aspects)" 3.7 "Tourism (economic and social aspects)"
+"Labour economics" 3.8 "Labour economics"
+"Employment policy" 3.8.1 "Employment policy"
+"Structural Adjustment" 3.10 "Structural Adjustment"
+"Business, Micro-entreprises, Management, Marketing, Finance, Microfinance, Cooperatives" 4 "Business, Micro-entreprises, Management, Marketing, Finance, Microfinance, Cooperatives"
+"Business economics (general works, textbooks)" 4.1 "Business economics (general works, textbooks)"
+"Microeconomic planning techniques, Micro-entreprises" 4.2 "Microeconomic planning techniques, Micro-entreprises"
+"Management and personnel management" 4.3 "Management and personnel management"
+"Business organization and administration, office management" 4.4 "Business organization and administration, office management"
+"Marketing and commercialisation, export (from businesses viewpoint)" 4.5 "Marketing and commercialisation, export (from businesses viewpoint)"
+"Accounting" 4.6 "Accounting"
+"Finance and microfinance / microcredit" 4.7 "Finance and microfinance / microcredit"
+"Cooperatives, cooperative movement" 4.8 "Cooperatives, cooperative movement"
+"Agricultural cooperatives" 4.8.1 "Agricultural cooperatives"
+"Housing cooperatives" 4.8.4 "Housing cooperatives"
+"Other specific cooperatives" 4.8.5 "Other specific cooperatives"
+"Politics, Public administration, Law and Legislation, Peace, Human Rights" 5 "Politics, Public administration, Law and Legislation, Peace, Human Rights"
+"Public administration, Tasks of councillors" 5.2 "Public administration, Tasks of councillors"
+"Human rights, humanitarian law" 5.4 "Human rights, humanitarian law"
+"Disarmament, Peace, Conflict and Conflict Resolutions" 5.5 "Disarmament, Peace, Conflict and Conflict Resolutions"
+"Society, Culture, Community, Woman, Youth, Population" 6 "Society, Culture, Community, Woman, Youth, Population"
+"Social sciences, sociology (works comprising several subgroups) incl. participatory research and training" 6.1 "Social sciences, sociology (works comprising several subgroups) incl. participatory research and training"
+"Society, social structure, social change, social services, social movements, social groups, Minorities" 6.2 "Society, social structure, social change, social services, social movements, social groups, Minorities"
+"Community development, community organizing" 6.3 "Community development, community organizing"
+"Women, gender and development, women's organizations" 6.4 "Women, gender and development, women's organizations"
+"Children and youth (youth centres)" 6.5 "Children and youth (youth centres)"
+"Demography and population" 6.6 "Demography and population"
+"Philosophy" 6.7 "Philosophy"
+"History, Cultural Heritage and Language" 6.8 "History, Cultural Heritage and Language"
+"Psychology" 6.9 "Psychology"
+"Anthropology, ethnology" 6.10 "Anthropology, ethnology"
+"Religion - Spirituality - Yoga" 6.11 "Religion - Spirituality - Yoga"
+"Art, Literature, Creativity, Traditional Cultures, Fashion" 6.12 "Art, Literature, Creativity, Traditional Cultures, Fashion"
+"Education and Training" 7 "Education and Training"
+"Education and training (general works, theories, methods)" 7.1 "Education and training (general works, theories, methods)"
+"Teaching methods and aids" 7.3 "Teaching methods and aids"
+"Adult education, Literacy training" 7.4 "Adult education, Literacy training"
+"Early education, Primary education, Secondary education" 7.5 "Early education, Primary education, Secondary education"
+"Specific courses or subjects, educational games" 7.6 "Specific courses or subjects, educational games"
+"Higher education" 7.7 "Higher education"
+"Vocational, professional and practical training - for specific training- curricula, textbooks- see specific subject." 7.8 "Vocational, professional and practical training - for specific training- curricula, textbooks- see specific subject."
+"Health Education and Training (see under health and Nutrition)" 7.9 "Health Education and Training (see under health and Nutrition)"
+"Environmental education, Global education, Psychological and assertiveness education, Non-formal education etc" 7.10 "Environmental education, Global education, Psychological and assertiveness education, Non-formal education etc"
+"Language education" 7.11 "Language education"
+"Specialised education: see also under the subject" 7.12 "Specialised education: see also under the subject"
+"Teacher Training" 7.13 "Teacher Training"
+"Communication, Information and Documentation" 8 "Communication, Information and Documentation"
+"Communication, telecommunication, mass communication, mass media, film-making" 8.1 "Communication, telecommunication, mass communication, mass media, film-making"
+"Information for development, Information transfer, Information policy" 8.2 "Information for development, Information transfer, Information policy"
+"Documentation, Library science and management, see also RAMP studies under 08.06" 8.3 "Documentation, Library science and management, see also RAMP studies under 08.06"
+"Information technology, Computer science, Computer use, Use of computers for developing countries" 8.4 "Information technology, Computer science, Computer use, Use of computers for developing countries"
+"Internet, e-mail" 8.5 "Internet, e-mail"
+"Records and Archives Management Programme (RAMP) of UNESCO, Archive Management" 8.6 "Records and Archives Management Programme (RAMP) of UNESCO, Archive Management"
+"Transport" 9 "Transport"
+"Transport (rural and urban) (general works)" 9.1 "Transport (rural and urban) (general works)"
+"Land transport" 9.2 "Land transport"
+"Science, Research and Technology" 10 "Science, Research and Technology"
+"Natural science, technology, engineering, research and development, research methods and theory (general works, directories, encyclopedias)" 10.1 "Natural science, technology, engineering, research and development, research methods and theory (general works, directories, encyclopedias)"
+"Transfer of technology and scientific cooperation" 10.2 "Transfer of technology and scientific cooperation"
+"Technology transfer and scientific cooperation for developing countries" 10.2.1 "Technology transfer and scientific cooperation for developing countries"
+"Appropriate/ Alternative/ Applied technology (AT), traditional, intermediate technology, economic and social aspect, directories" 10.3 "Appropriate/ Alternative/ Applied technology (AT), traditional, intermediate technology, economic and social aspect, directories"
+"Biology" 10.8 "Biology"
+"Biotechnology, genetic engineering" 10.9 "Biotechnology, genetic engineering"
+"Medicine and Health : science and research" 10.10 "Medicine and Health : science and research"
+"Ecology, Biodiversity, Natural resources, Environment, Waste Disposal" 11 "Ecology, Biodiversity, Natural resources, Environment, Waste Disposal"
+"Natural resources, geography" 11.1 "Natural resources, geography"
+"Climate, weather, meteorology . Climatologic Changes. Global warming" 11.1.1 "Climate, weather, meteorology . Climatologic Changes. Global warming"
+"Ecology, environmental policy, eco- development studies" 11.2 "Ecology, environmental policy, eco- development studies"
+"Resources conservation, environmental protection, biodiversity" 11.3 "Resources conservation, environmental protection, biodiversity"
+"Arid zones, desertification" 11.3.1 "Arid zones, desertification"
+"Nature reserve, game reserve" 11.3.2 "Nature reserve, game reserve"
+"Rainforests and rainforest conservation" 11.3.3 "Rainforests and rainforest conservation"
+"Biodiversity conservation" 11.3.4 "Biodiversity conservation"
+"Erosion and erosion control - for techniques see agriculture and forestry." 11.4 "Erosion and erosion control - for techniques see agriculture and forestry."
+"Pollution, Pollution control, Pesticides, Biological monitoring, Asbestos" 11.5 "Pollution, Pollution control, Pesticides, Biological monitoring, Asbestos"
+"Water pollution" 11.5.2 "Water pollution"
+"Pesticide pollution" 11.5.4 "Pesticide pollution"
+"Asbestos" 11.5.5 "Asbestos"
+"Solid waste disposal" 11.6 "Solid waste disposal"
+"Environmental Handbook of GTZ-BMZ" 11.7 "Environmental Handbook of GTZ-BMZ"
+"Water, Sanitation and Sewage Disposal" 12 "Water, Sanitation and Sewage Disposal"
+"Water and sanitation, hydrology" 12.1 "Water and sanitation, hydrology"
+"Water resources (surface water, groundwater)" 12.2 "Water resources (surface water, groundwater)"
+"Hydraulic structures (dams, intakes, wells, ponds, cisterns)" 12.3 "Hydraulic structures (dams, intakes, wells, ponds, cisterns)"
+"Pumps and other water- lifting devices" 12.4 "Pumps and other water- lifting devices"
+"Water supply and storage" 12.5 "Water supply and storage"
+"Water treatment and purification (biological, chemical, physical)" 12.6 "Water treatment and purification (biological, chemical, physical)"
+"Sanitation. Waste water and sewage disposal" 12.7 "Sanitation. Waste water and sewage disposal"
+"Health, Nutrition, Medicine" 13 "Health, Nutrition, Medicine"
+"Health (general works, incl. health economics and sociology, health statistics, health and community development)" 13.1 "Health (general works, incl. health economics and sociology, health statistics, health and community development)"
+"Health planning and policy" 13.1.1 "Health planning and policy"
+"Disasters, medicine in humanitarian emergencies" 13.1.6 "Disasters, medicine in humanitarian emergencies"
+"Food, Nutrition and Malnutrition" 13.2 "Food, Nutrition and Malnutrition"
+"Family health, Mother and Child care, Family planning, Pregnancy and Childbirth" 13.3 "Family health, Mother and Child care, Family planning, Pregnancy and Childbirth"
+"Community Health, Health Care Delivery, Extension workers and training" 13.4 "Community Health, Health Care Delivery, Extension workers and training"
+"Medicine, Clinical Care, Diseases, Hygiene, Emergencies (treatment of specific diseases, injuries, accidents)" 13.5 "Medicine, Clinical Care, Diseases, Hygiene, Emergencies (treatment of specific diseases, injuries, accidents)"
+"Health Education, Promotion, Prevention, AIDS Prevention, Safety, Books covering multiple health dimensions" 13.6 "Health Education, Promotion, Prevention, AIDS Prevention, Safety, Books covering multiple health dimensions"
+"Production and use of medicines, essential drugs" 13.7 "Production and use of medicines, essential drugs"
+"Pharmaceuticals and essential drugs" 13.7.1 "Pharmaceuticals and essential drugs"
+"Herbal medicines, medicinal plants" 13.7.2" "Herbal medicines, medicinal plants"
+"Health material and equipment; aids for disabled people" 13.8 "Health material and equipment; aids for disabled people"
+"Medical an nutrition research papers, medical and nutrition scientific studies, specialised tropical medicine publications" 13.9 "Medical an nutrition research papers, medical and nutrition scientific studies, specialised tropical medicine publications"
+"Agriculture and Food Processing" 14 "Agriculture and Food Processing"
+"Agriculture (general works), Economics, Policies, Development, Research, Management" 14.1 "Agriculture (general works), Economics, Policies, Development, Research, Management"
+"Land reform, Settlements, Rural Development and related topics" 14.1.1 "Land reform, Settlements, Rural Development and related topics"
+"Agricultural training and education" 14.1.2 "Agricultural training and education"
+"Agricultural Science and Research" 14.1.3 "Agricultural Science and Research"
+"Rural and Farm management" 14.1.4 "Rural and Farm management"
+"Policies and Planning in agriculture" 14.1.5 "Policies and Planning in agriculture"
+"Biotechnology and agriculture" 14.1.6 "Biotechnology and agriculture"
+"Agricultural finance systems" 14.1.7 "Agricultural finance systems"
+"Agricultural production systems (shifting cultivation, wet- land farming, dry- land farming, agroforestry), Sustainable Agriculture" 14.2 "Agricultural production systems (shifting cultivation, wet- land farming, dry- land farming, agroforestry), Sustainable Agriculture"
+"Organic farming, Eco-farming" 14.3 "Organic farming, Eco-farming"
+"Agricultural implements, tools and machinery (incl. mechanization, agricultural transport) - for implements specific to particular plants see respective plant." 14.4 "Agricultural implements, tools and machinery (incl. mechanization, agricultural transport) - for implements specific to particular plants see respective plant."
+"Soil and land management, improvement and treatment (incl. terracing, erosion control techniques, rangeland improvement)" 14.5 "Soil and land management, improvement and treatment (incl. terracing, erosion control techniques, rangeland improvement)"
+"Irrigation and drainage - for hydraulic structures see 12.03." 14.6 "Irrigation and drainage - for hydraulic structures see 12.03."
+"Fertilization and composting" 14.7 "Fertilization and composting"
+"Storage and packaging of agricultural products, Post-Harvest management" 14.8 "Storage and packaging of agricultural products, Post-Harvest management"
+"Agricultural waste processing - for energy use see 20.06." 14.9 "Agricultural waste processing - for energy use see 20.06."
+"Food processing and preservation" 14.10 "Food processing and preservation"
+"Food drying (all kinds)" 14.10.2 "Food drying (all kinds)"
+"Fermented Foods" 14.10.3 "Fermented Foods"
+"Oil production and processing" 14.10.4 "Oil production and processing"
+"Better Farming series of FAO and INADES" 14.12 "Better Farming series of FAO and INADES"
+"Plant and Crop Production, Protection, and Processing" 15 "Plant and Crop Production, Protection, and Processing"
+"Plant/crop production and processing, vegetable gardening, botany (general works, publications comprising several plants and practical how to books, intercropping)" 15.1 "Plant/crop production and processing, vegetable gardening, botany (general works, publications comprising several plants and practical how to books, intercropping)"
+"Plant protection (incl. insecticidinal plants), Pests and Pest Control, Integrated Pest Management" 15.2 "Plant protection (incl. insecticidinal plants), Pests and Pest Control, Integrated Pest Management"
+"Cereals (rice, corn/maize, millet, sorghum, wheat, etc.)" 15.4 "Cereals (rice, corn/maize, millet, sorghum, wheat, etc.)"
+"Starchy crops and root crops (cassava, potatoes, etc.)" 15.5 "Starchy crops and root crops (cassava, potatoes, etc.)"
+"Oil- producing plants, vegetable oil, nuts" 15.6 "Oil- producing plants, vegetable oil, nuts"
+"Garden vegetables, legumes, mushrooms" 15.7 "Garden vegetables, legumes, mushrooms"
+"Fruits and wine (bananas, mango's, apple's etc)" 15.8 "Fruits and wine (bananas, mango's, apple's etc)"
+"Coffee, Tea, Cocoa, Coca and other stimulants" 15.10 "Coffee, Tea, Cocoa, Coca and other stimulants"
+"Rubber, resin, wax plants" 15.12 "Rubber, resin, wax plants"
+"Fodder and pasture plants" 15.14 "Fodder and pasture plants"
+"Other plants/crops, intercropping (for intercropping, see also under 15.01)" 15.15 "Other plants/crops, intercropping (for intercropping, see also under 15.01)"
+"Animal Husbandry and Animal Product Processing" 16 "Animal Husbandry and Animal Product Processing"
+"Animal husbandry (general,works) incl. animal feed, works covering several aspects and animals, zoology, see also other animals 6.11" 16.1 "Animal husbandry (general,works) incl. animal feed, works covering several aspects and animals, zoology, see also other animals 6.11"
+"Veterinary medicine, animal diseases" 16.2 "Veterinary medicine, animal diseases"
+"Animal traction (excl. implements), animal training" 16.3 "Animal traction (excl. implements), animal training"
+"Cattle" 16.5 "Cattle"
+"Goats, sheep, camels" 16.6 "Goats, sheep, camels"
+"Rabbits and guinea pigs" 16.8 "Rabbits and guinea pigs"
+"Poultry, ducks and other birds" 16.9 "Poultry, ducks and other birds"
+"Beekeeping and honey extraction" 16.10 "Beekeeping and honey extraction"
+"Other animals (micro-livestock, little known animals, silkworms, reptiles, frogs, snails, game, etc.)" 16.11 "Other animals (micro-livestock, little known animals, silkworms, reptiles, frogs, snails, game, etc.)"
+"Animal product processing - for processing of wool and silk see 19.08 - for processing of leather see 19.09" 16.12 "Animal product processing - for processing of wool and silk see 19.08 - for processing of leather see 19.09"
+"Milk and egg processing (dairy, cheese)" 16.12.2 "Milk and egg processing (dairy, cheese)"
+"Fishery and Aquaculture" 17 "Fishery and Aquaculture"
+"Fishery and aquaculture (general works), fishery resources" 17.1 "Fishery and aquaculture (general works), fishery resources"
+"Fishing techniques and equipment" 17.2 "Fishing techniques and equipment"
+"Aquaculture, fish farming, fish production (fish ponds, feeding, etc.)" 17.3 "Aquaculture, fish farming, fish production (fish ponds, feeding, etc.)"
+"Fishery product processing, storage, and marketing" 17.6 "Fishery product processing, storage, and marketing"
+"Forestry and Agroforestry" 18 "Forestry and Agroforestry"
+"Forestry, general works, Forest conservation" 18.1 "Forestry, general works, Forest conservation"
+"Reforestation - for erosion control see 11.04 and 14.05." 18.2 "Reforestation - for erosion control see 11.04 and 14.05."
+"Cultivation and conservation (nurseries), protection and pest resistance" 18.3 "Cultivation and conservation (nurseries), protection and pest resistance"
+"Forests, Cloud Forests" 18.4 "Forests, Cloud Forests"
+"Specific trees and other forestry plants (incl. bamboo)" 18.5 "Specific trees and other forestry plants (incl. bamboo)"
+"Agroforestry" 18.6 "Agroforestry"
+"Sustainable exploitation and commercialisation of forest products" 18.7 "Sustainable exploitation and commercialisation of forest products"
+"Industry, Manufacture and Services" 19 "Industry, Manufacture and Services"
+"Industry (general works, textbooks, directories) incl. industrial planning" 19.1 "Industry (general works, textbooks, directories) incl. industrial planning"
+"Industrial training, consulting - for vocational training see 07.08." 19.2 "Industrial training, consulting - for vocational training see 07.08."
+"Small- scale industry, handicraft, home industry" 19.3 "Small- scale industry, handicraft, home industry"
+"Industrial profiles and studies covering several sectors" 19.4 "Industrial profiles and studies covering several sectors"
+"Recycling and solid waste services" 19.5 "Recycling and solid waste services"
+"Mining and quarrying" 19.7 "Mining and quarrying"
+"Textile industry, manufacture of wearing apparel (incl. processing of natural fibres)" 19.8 "Textile industry, manufacture of wearing apparel (incl. processing of natural fibres)"
+"Pulp and paper products (incl. printing and bookbinding)" 19.11 "Pulp and paper products (incl. printing and bookbinding)"
+"Chemical and chemical products industry incl. soap and candle production, salt" 19.12 "Chemical and chemical products industry incl. soap and candle production, salt"
+"Pottery, ceramics, glass and glass products (incl. jewellery, buttons, chalk)" 19.13 "Pottery, ceramics, glass and glass products (incl. jewellery, buttons, chalk)"
+"Metal industry" 19.14 "Metal industry"
+"Forging and blacksmithing" 19.14.1 "Forging and blacksmithing"
+"Packing Industry" 19.17 "Packing Industry"
+"Energy , Renewable energies, Household energy" 20 "Energy , Renewable energies, Household energy"
+"Energy and power (general works) incl. energy per country, energy savings, and publications covering several sources of energy, rural energy" 20.1 "Energy and power (general works) incl. energy per country, energy savings, and publications covering several sources of energy, rural energy"
+"Transformation, distribution and storage of energy and electricity" 20.2 "Transformation, distribution and storage of energy and electricity"
+"Rural electrification" 20.2.1 "Rural electrification"
+"Conventional energy resources (oil, petroleum, coal, natural gas, peat, nuclear energy)" 20.3 "Conventional energy resources (oil, petroleum, coal, natural gas, peat, nuclear energy)"
+"Renewable energy resources" 20.4 "Renewable energy resources"
+"Bio-mass (general works)" 20.4.1 "Bio-mass (general works)"2
+"Wood and charcoal (incl. kilns and activated charcoal)" 20.5 "Wood and charcoal (incl. kilns and activated charcoal)"
+"Solid fuels from agricultural wastes and other organic material (pellets, eco- bricks, briquets)" 20.6 "Solid fuels from agricultural wastes and other organic material (pellets, eco- bricks, briquets)"
+"Biogas (incl. biogas equipment)" 20.7 "Biogas (incl. biogas equipment)"
+"Cookstoves, Fuel-saving cookstoves, Household Energy" 20.8 "Cookstoves, Fuel-saving cookstoves, Household Energy"
+"Alcohol and other liquid fuels" 20.10 "Alcohol and other liquid fuels"
+"Solar energy, photovoltaic energy" 20.11 "Solar energy, photovoltaic energy"
+"Wind energy" 20.12 "Wind energy"
+"Hydropower" 20.13 "Hydropower"
+"New Energy technology and research, Planetary Association for Clean Energy publications" 20.14 "New Energy technology and research, Planetary Association for Clean Energy publications"
+"Settlements, Housing, Building - Infrastructure Construction (Roads etc)" 21 "Settlements, Housing, Building - Infrastructure Construction (Roads etc)"
+"Settlements and housing: general works incl. low- cost housing, planning techniques, surveying, etc." 21.1 "Settlements and housing: general works incl. low- cost housing, planning techniques, surveying, etc."
+"Urban settlements (urban housing programmes, urbanization, squatters, slums, slum improvement)" 21.2 "Urban settlements (urban housing programmes, urbanization, squatters, slums, slum improvement)"
+"Rural settlements" 21.3 "Rural settlements"
+"Architecture and Building design" 21.4 "Architecture and Building design"
+"Solar and climate responsive architecture" 21.4.2 "Solar and climate responsive architecture"
+"Construction materials" 21.5 "Construction materials"
+"Building machinery and equipment" 21.6 "Building machinery and equipment"
+"Building and construction (building components, construction techniques)" 21.7 "Building and construction (building components, construction techniques)"
+"Roofing" 21.7.1 "Roofing"
+"Civil engineering (roads, bridges, etc.) - Road Construction" 21.9 "Civil engineering (roads, bridges, etc.) - Road Construction"
+"Disasters, Disaster Mitigation, Humanitarian and Food Aid, Humanitarian Interventions, Refugees" 22 "Disasters, Disaster Mitigation, Humanitarian and Food Aid, Humanitarian Interventions, Refugees"
+"Disasters and Disaster Mitigation, Organisation" 22.1 "Disasters and Disaster Mitigation, Organisation"
+"Humanitarian Aid, Food Aid" 22.2 "Humanitarian Aid, Food Aid"
+"Humanitarian Interventions and Conflicts" 22.3 "Humanitarian Interventions and Conflicts"
+"Refugees" 22.5 "Refugees"
+"Development Periodicals and Magazines" 23 "Development Periodicals and Magazines"
+"BASIN-NEWS - Building Advisory Service and Information Network by GTZ- GATE, SKAT, ITDG and CRATerre" 23.1 "BASIN-NEWS - Building Advisory Service and Information Network by GTZ- GATE, SKAT, ITDG and CRATerre"
+"Boiling Point Newsletters on Household Energy of Intermediate Technology Development Group.and GTZ" 23.2 "Boiling Point Newsletters on Household Energy of Intermediate Technology Development Group.and GTZ"
+"CERES - FAO Review on Agriculture and Development: 1976 - 1997" 23.3 "CERES - FAO Review on Agriculture and Development: 1976 - 1997"
+"Developing Ideas - Bi-monthly Digests by the International Institute for Sustainable Development" 23.4 "Developing Ideas - Bi-monthly Digests by the International Institute for Sustainable Development"
+"ECHO's Human Development Notes by the Educational Concerns for Hunger network" 23.5 "ECHO's Human Development Notes by the Educational Concerns for Hunger network"
+"Food and Nutrition Bulletins 1978-1996 - United Nations University" 23.6 "Food and Nutrition Bulletins 1978-1996 - United Nations University"
+"Food Chain, newsletters on Food Processing of Intermediate Technology Development Group." 23.7 "Food Chain, newsletters on Food Processing of Intermediate Technology Development Group."
+"GATE Development magazine of GTZ" 23.8 "GATE Development magazine of GTZ"
+"HDD-FLASH, newsletter on Population, Health and Nutrition of the Worldbank Human Development Department" 23.9 "HDD-FLASH, newsletter on Population, Health and Nutrition of the Worldbank Human Development Department"
+"IDRC monthly and weekly reports 1993 - 1997" 23.10 "IDRC monthly and weekly reports 1993 - 1997"
+"New and Noteworthy in Nutrition - World Bank" 23.11 "New and Noteworthy in Nutrition - World Bank"
+"SEEDLING: bi-montly publication of GRAIN - Genetic Resources International - Spain" 23.12 "SEEDLING: bi-montly publication of GRAIN - Genetic Resources International - Spain"
+"SPORE Bulletins 1986-1996 of the CTA - Technical and Agricultural Centre of the European Union" 23.13 "SPORE Bulletins 1986-1996 of the CTA - Technical and Agricultural Centre of the European Union"
+"Sustainable Energy Newsletters of the INFORSE network" 23.14 "Sustainable Energy Newsletters of the INFORSE network"
+"The Courier ACP 1990 - 1996 Africa-Caribbean-Pacific - European Union" 23.15 "The Courier ACP 1990 - 1996 Africa-Caribbean-Pacific - European Union"
+"The NGLS Magazine Go Between" 23.16 "The NGLS Magazine Go Between"
+"Resources, Product Lists, Catalogues, Internet Sites" 24 "Resources, Product Lists, Catalogues, Internet Sites"
Index: unk/gsdl/perllib/plugins/HTMLPlug2.pm
===================================================================
--- /trunk/gsdl/perllib/plugins/HTMLPlug2.pm	(revision 2817)
+++ 	(revision )
@@ -1,725 +1,0 @@
-###########################################################################
-#
-# HTMLPlug2.pm -- basic html plugin
-
-
-# HTMLPlug2 is the same as HTMLPlug but has a -extract_subsections
-# option. This option will be added to HTMLPlug and HTMLPlug2 will
-# be removed once the wrinkles have been ironed out
-
-
-#
-# A component of the Greenstone digital library software
-# from the New Zealand Digital Library Project at the 
-# University of Waikato, New Zealand.
-#
-# Copyright (C) 1999 New Zealand Digital Library Project
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
-#
-###########################################################################
-
-# 
-# Note that this plugin handles frames only in a very simple way
-# i.e. each frame is treated as a separate document. This means
-# search results will contain links to individual frames rather
-# than linking to the top level frameset.
-# There may also be some problems caused by the _parent target
-# (it's removed by this plugin)
-# To use frames properly you'll need to use the WebPlug plugin.
-#
-
-
-package HTMLPlug2;
-
-use BasPlug;
-use ghtml;
-use unicode;
-use util;
-use parsargv;
-
-sub BEGIN {
-    @ISA = ('BasPlug');
-}
-
-sub print_usage {
-    print STDERR "\n  usage: plugin HTMLPlug [options]\n\n";
-    print STDERR "  options:\n";
-    print STDERR "   -nolinks               Don't make any attempt to trap links (setting this flag may\n";
-    print STDERR "                          improve speed of building/importing but any relative links within\n";
-    print STDERR "                          documents will be broken).\n";
-    print STDERR "   -keep_head             Don't remove headers from html files.\n";
-    print STDERR "   -no_metadata           Don't attempt to extract any metadata from files.\n";
-    print STDERR "   -metadata_fields       Comma separated list of metadata fields to attempt to extract.\n";
-    print STDERR "                          Defaults to 'Title'.\n";
-    print STDERR "                          Use 'tag<tagname>' to have the contents of the first <tagname>\n";
-    print STDERR "                          pair put in a metadata element called 'tagname' Capitalise \n";
-    print STDERR "                          'tagname' as you want the metadata capitalised in the GML \n";
-    print STDERR "                          file, since the tag extraction is case insensitive.\n";
-    print STDERR "   -hunt_creator_metadata Find as much metadata as possible on authorship and place it in the\n ";
-    print STDERR "                          'Creator' field. Requires the -metadata_fields flag.\n ";
-    print STDERR "   -file_is_url           Set if input filenames make up url of original source documents\n";
-    print STDERR "                          e.g. if a web mirroring tool was used to create the import\n";
-    print STDERR "                          directory structure\n";
-    print STDERR "   -assoc_files           Perl regular expression of file extensions to associate with\n";
-    print STDERR "                          html documents. Defaults to '(?i)\.(jpe?g|gif|png|css)\$'\n";
-    print STDERR "   -rename_assoc_files    Renames files associated with documents (e.g. images). Also\n";
-    print STDERR "                          creates much shallower directory structure (useful when creating\n";
-    print STDERR "                          collections to go on cd-rom).\n\n";
-    print STDERR "   -title_sub             Substitution expression to modify string stored as Title.\n";
-    print STDERR "                          Used by, for example, PDFHtml to remove Page 1 etc from text\n";
-    print STDERR "                          chosen to be used as the title.\n";
-    print STDERR "   -extract_subsections   Split document into subsections where <GSDLSection> tags are found.\n";
-    print STDERR "                          Note that by setting this option you implicitly set -no_metadata\n";
-    print STDERR "                          as all metadata should be included within the <GSDLSection> tags.\n";
-    print STDERR "                          Also, -keep_head will have no effect when this option is set.\n";
-}
-
-sub new {
-    my $class = shift (@_);
-    my $self = new BasPlug ($class, @_);
-
-    if (!parsargv::parse(\@_, 
-			 q^nolinks^, \$self->{'nolinks'},
-			 q^keep_head^, \$self->{'keep_head'},
-			 q^no_metadata^, \$self->{'no_metadata'},
-			 q^metadata_fields/.*/Title^, \$self->{'metadata_fields'},
-			 q^hunt_creator_metadata^, \$self->{'hunt_creator_metadata'},
-			 q^w3mir^, \$self->{'w3mir'},
-			 q^file_is_url^, \$self->{'file_is_url'},
-			 q^assoc_files/.*/(?i)\.(jpe?g|gif|png|css)$^, \$self->{'assoc_files'},
-			 q^rename_assoc_files^, \$self->{'rename_assoc_files'},
-			 q^title_sub/.*/^, \$self->{'title_sub'},
-			 q^extract_subsections^, \$self->{'extract_subsections'},
-			 "allow_extra_options")) {
-
-	print STDERR "\nIncorrect options passed to HTMLPlug, check your collect.cfg configuration file\n";
-	&print_usage();
-	die "\n";
-    }
-
-    # retain this for backward compatibility (w3mir option was replaced by
-    # file_is_url)
-    if ($self->{'w3mir'}) {
-	$self->{'file_is_url'} = 1;
-    }
-    
-    $self->{'aux_files'} = {};
-    $self->{'dir_num'} = 0;
-    $self->{'file_num'} = 0;
-
-    return bless $self, $class;
-}
-
-
-sub get_default_block_exp {
-    my $self = shift (@_);
-
-    return q^(?i)\.(gif|jpe?g|png|css)$^;
-}
-
-sub get_default_process_exp {
-    my $self = shift (@_);
-
-    # the last option is an attempt to encode the concept of an html query ...
-    return q^(?i)(\.html?|\.shtml|\.shm|\.asp|\.php|\.cgi|.+\?.+=.*)$^;
-}
-
-
-# do plugin specific processing of doc_obj
-sub process {
-    my $self = shift (@_);
-    my ($textref, $pluginfo, $base_dir, $file, $metadata, $doc_obj) = @_;
-    my $outhandle = $self->{'outhandle'};
-
-    print $outhandle "HTMLPlug: processing $file\n"
-	if $self->{'verbosity'} > 1;
-
-    my $cursection = $doc_obj->get_top_section();
-
-    $self->extract_metadata ($textref, $metadata, $doc_obj, $cursection) 
-	unless $self->{'no_metadata'} || $self->{'extract_subsections'};
-
-    # Store URL for page as metadata - this can be used for an
-    # altavista style search interface. The URL won't be valid
-    # unless the file structure contains the domain name (i.e.
-    # like when w3mir is used to download a website).
-    my $web_url = "http://$file";
-    $web_url =~ s/\\/\//g; # for windows
-    $doc_obj->add_utf8_metadata($cursection, "URL", $web_url);
-
-    # remove header and footer (if -extract_subsections was set the header
-    # and footer will be removed later)
-    unless ($self->{'keep_head'} || $self->{'extract_subsections'}) {
-	$$textref =~ s/^.*?<body[^>]*>//is;
-	$$textref =~ s/(<\/body[^>]*>|<\/html[^>]*>)//isg;
-    }
-
-    if ($self->{'extract_subsections'}) {
-
-	my $lt = '(?:&lt;|<)';
-	my $gt = '(?:&gt;|>)';
-	my $quot = '(?:&quot;|&rdquo;|"|\')';
-
-	my @sections = split( /(${lt}GSDLSection.*?${gt}.*?${lt}\/GSDLSection${gt})/si, $$textref);
-	if (scalar(@sections) == 1) {
-	    # appears to be a single section document (presumably we're
-	    # processing an HTML file that has not been marked up with
-	    # GSDLSection tags) - print warning and carry on
-	    print $outhandle "HTMLPlug: Warning: $file appears to consist of only one section\n";
-	    $self->process_section($textref, $base_dir, $file, $doc_obj, $cursection);
-
-	} else {
-	    # multiple section document (or single section document
-	    # beginning with <GSDLSection> tags)
-	    my $first = 1; 
-	    my $first_gsdlsection = 1;
-	    my $first_level = 0;
-	    my $lastlevel = 0;
-	    foreach $section (@sections) {
-		if ($section =~ /${lt}GSDLSection(.*?)${gt}(.*?)${lt}\/GSDLSection${gt}/si) {
-		    my $sec_attrs = $1;
-		    my $sec_content = $2;
-
-		    my $thislevel = $lastlevel;
-
-		    if ($sec_attrs =~ /level\s*=\s*(${quot}?)(\d+)\1/si) {
-			$thislevel = $2;
-		    } else {
-			$thislevel = 1 if $lastlevel == 0;
-			print $outhandle "HTMLPlug: Warning: $file contains a <GSDLSection> tag without\n";
-			print $outhandle "          a 'level' attribute. Setting level to $thislevel\n";
-		    }
-		    
-		    if ($first_gsdlsection) {
-			# top level section
-			$first_level = $thislevel;
-			$first_gsdlsection = 0;
-
-			$self->add_gsdlsection_metadata($sec_content, $doc_obj, $cursection);
-
-		    } else {
-			if ($thislevel <= $first_level) {
-			    $thislevel++;
-			    print $outhandle "HTMLPlug: Warning: $file contains more than one top level (level $first_level\n";
-			    print $outhandle "          or lower) section. All those after the first will be reclassified as\n";
-			    print $outhandle "          level $thislevel sections\n";
-			} elsif ($thislevel > ($lastlevel+1)) {
-			    print $outhandle "HTMLPlug: Warning: $file contains a jump in section levels from\n";
-			    print $outhandle "          $lastlevel to $thislevel. Level $thislevel section will be\n";
-			    print $outhandle "          reclassified as a level " . $lastlevel+1 . " section\n";
-			    $thislevel = $lastlevel + 1;
-			}
-			
-			# close open sections if we're going down some levels
-			while ($thislevel <= $lastlevel) {
-			    $cursection = $doc_obj->get_parent_section ($cursection);
-			    $lastlevel--;
-			}
-			$cursection = 
-			    $doc_obj->insert_section($doc_obj->get_end_child($cursection));
-
-			$self->add_gsdlsection_metadata($sec_content, $doc_obj, $cursection);
-		    }
-		    
-		    $lastlevel = $thislevel;
-
-		} else {
-		    # remove headers and footers
-		    $section =~ s/<head[^>]*>.*?<\/head>//isg;
-		    $section =~ s/(<body[^>]*>|<\/body>)//isg;
-		    $section =~ s/(<html[^>]*>|<\/html>)//isg;
-		    
-		    if ($first) {
-			# content before a GSDLSection tag is an error
-			if ($section =~ /\S/) {
-			    print $outhandle "HTMLPlug: Warning: $file contains the following text before any\n";
-			    print $outhandle "          valid GSDLSection tag. This text will be ignored.\n";
-			    print $outhandle "'$section'\n";
-			}
-		    } else {
-			# this is the text of our current section
-			$self->process_section(\$section, $base_dir, $file, $doc_obj, $cursection);
-		    }
-		}
-		$first = 0;
-	    }
-	}
-    } else {
-	# single section document
-	$self->process_section($textref, $base_dir, $file, $doc_obj, $cursection);
-    }
-    return 1;
-}
-
-sub add_gsdlsection_metadata {
-    my $self = shift (@_);
-    my ($metastring, $doc_obj, $cursection) = @_;
-
-    my $lt = '(?:&lt;|<)';
-    my $gt = '(?:&gt;|>)';
-    my $quot = '(?:&quot;|&rdquo;|"|\')';
-
-    $metastring =~ s/(${lt})metadata${gt}(.*?)${lt}\/metadata${gt}/$2/is;
-
-    if ($1 ne "<") {
-	# this html file is the result of a conversion from something elese
-	# (i.e. <metadata> has become &lt;metadata&lt;) so we'll remove any
-	# excess html tags that the conversion process may have added for
-	# us
-	$metastring =~ s/<[^>]+>//gs;
-    }
-
-    while ($metastring =~ s/\s*${lt}(\w+)(.*?)${gt}(.*?)${lt}\/\1${gt}//is) {
-	my $field = $1;
-	my $meta_attrs = $2 if defined $2;
-	my $value = $3;
-
-	# mode attribute works in the same way as for RecPlug - i.e. the
-	# default is to override any previous values for this metadata
-	# field - if mode is set to accumulate we allow for multiple
-	# metadata values
-	if (defined $meta_attrs && $meta_attrs =~ /mode\s*=\s*(${quot}?)accumulate\1/is) {
-	    $doc_obj->add_utf8_metadata($cursection, $field, $value);
-	} else {
-	    $doc_obj->set_utf8_metadata_element($cursection, $field, $value);
-	}
-    }
-}
-
-sub process_section {
-    my $self = shift (@_);
-    my ($textref, $base_dir, $file, $doc_obj, $cursection) = @_;
-
-    # trap links
-    if (!$self->{'nolinks'}) {
-
-	# usemap="./#index" not handled correctly => change to "#index"
-	$$textref =~ s/(<img[^>]*?usemap\s*=\s*\"?)([^\">\s]+)(\"?[^>]*>)/
-	    $self->replace_usemap_links($1, $2, $3)/isge;
-
-	$$textref =~ s/(<(?:a|area|frame|link)\s+[^>]*?\s*(?:href|src)\s*=\s*\"?)([^\">\s]+)(\"?[^>]*>)/
-	    $self->replace_href_links ($1, $2, $3, $base_dir, $file, $doc_obj, $cursection)/isge;
-    }
-
-    # trap images
-
-    # allow spaces if inside quotes - jrm21
-    $$textref =~ s/(<img[^>]*?src\s*=\s*)(\"[^\"]+\"|[^\s>]+)([^>]*>)/
-	$self->replace_images ($1, $2, $3, $base_dir, $file, $doc_obj, $cursection)/isge;
-
-    # add text to document object
-    $doc_obj->add_utf8_text($cursection, $$textref);
-}
-
-
-
-
-sub replace_images {
-    my $self = shift (@_);
-    my ($front, $link, $back, $base_dir, 
-	$file, $doc_obj, $section) = @_;
-    # remove quotes from link at start and end if necessary
-    if ($link=~/^\"/) {
-	$link=~s/^\"//;$link=~s/\"$//;
-	$front.='"';
-	$back="\"$back";
-    }
-
-    $link =~ s/\n/ /g;
-    my ($href, $hash_part, $rl) = $self->format_link ($link, $base_dir, $file);
-    return $front . $self->add_file ($href, $rl, $hash_part, $base_dir, $doc_obj, $section) . $back;
-}
-
-sub replace_href_links {
-    my $self = shift (@_);
-    my ($front, $link, $back, $base_dir, $file, $doc_obj, $section) = @_;
-
-    # attempt to sort out targets - frames are not handled 
-    # well in this plugin and some cases will screw things
-    # up - e.g. the _parent target (so we'll just remove 
-    # them all ;-)
-    $front =~ s/(target=\"?)_top(\"?)/$1_gsdltop_$2/is;
-    $back =~ s/(target=\"?)_top(\"?)/$1_gsdltop_$2/is;
-    $front =~ s/target=\"?_parent\"?//is;
-    $back =~ s/target=\"?_parent\"?//is;
-
-    return $front . $link . $back if $link =~ /^\#/s;
-    $link =~ s/\n/ /g;
-
-    my ($href, $hash_part, $rl) = $self->format_link ($link, $base_dir, $file);
-    # href may use '\'s where '/'s should be on Windows
-    $href =~ s/\\/\//g;
-
-    my ($filename) = $href =~ /^(?:.*?):(?:\/\/)?(.*)/;
-
-    ##### leave all these links alone (they won't be picked up by intermediate 
-    ##### pages). I think that's safest when dealing with frames, targets etc.
-    ##### (at least until I think of a better way to do it). Problems occur with
-    ##### mailto links from within small frames, the intermediate page is displayed
-    ##### within that frame and can't be seen. There is still potential for this to
-    ##### happen even with html pages - the solution seems to be to somehow tell
-    ##### the browser from the server side to display the page being sent (i.e. 
-    ##### the intermediate page) in the top level window - I'm not sure if that's 
-    ##### possible - the following line should probably be deleted if that can be done
-    return $front . $link . $back if $href =~ /^(mailto|news|gopher|nntp|telnet|javascript):/is;
-
-
-    if (($rl == 0) || ($filename =~ /$self->{'process_exp'}/) || 
-	($href =~ /\/$/) || ($href =~ /^(mailto|news|gopher|nntp|telnet|javascript):/i)) {
-	&ghtml::urlsafe ($href);
-	return $front . "_httpextlink_&rl=" . $rl . "&href=" . $href . $hash_part . $back;
-	
-    } else {
-	# link is to some other type of file (eg image) so we'll
-	# need to associate that file
-	return $front . $self->add_file ($href, $rl, $hash_part, $base_dir, $doc_obj, $section) . $back;
-    }
-}
-
-sub add_file {
-    my $self = shift (@_);
-    my ($href, $rl, $hash_part, $base_dir, $doc_obj, $section) = @_;
-    my ($newname);
-
-    my $filename = $href;
-    $filename =~ s/^[^:]*:\/\///;
-    $filename = &util::filename_cat($base_dir, $filename);
-    
-    my ($ext) = $filename =~ /(\.[^\.]*)$/;
-
-    if ((!defined $ext) || ($ext !~ /$self->{'assoc_files'}/)) {
-	return "_httpextlink_&rl=" . $rl . "&href=" . $href . $hash_part;
-    }
-
-    if ($self->{'rename_assoc_files'}) {
-	if (defined $self->{'aux_files'}->{$href}) {
-	    $newname = $self->{'aux_files'}->{$href}->{'dir_num'} . "/" .
-		$self->{'aux_files'}->{$href}->{'file_num'} . $ext;
-	} else {
-	    $newname = $self->{'dir_num'} . "/" . $self->{'file_num'} . $ext;
-	    $self->{'aux_files'}->{$href} = {'dir_num' => $self->{'dir_num'}, 'file_num' => $self->{'file_num'}};
-	    $self->inc_filecount ();
-	}
-	$doc_obj->associate_file($filename, $newname, undef, $section);
-	return "_httpcollimg_/$newname";
-
-    } else {
-	($newname) = $filename =~ /([^\/\\]*)$/;
-	$doc_obj->associate_file($filename, $newname, undef, $section);
-	return "_httpdocimg_/$newname";
-    }
-}
-
-
-sub format_link {
-    my $self = shift (@_);
-    my ($link, $base_dir, $file) = @_;
-
-    my ($before_hash, $hash_part) = $link =~ /^([^\#]*)(\#?.*)$/;
-
-    $hash_part = "" if !defined $hash_part;
-    if (!defined $before_hash || $before_hash !~ /[\w\.\/]/) {
-	my $outhandle = $self->{'outhandle'};
-	print $outhandle "HTMLPlug: ERROR - badly formatted tag ignored ($link)\n"
-	    if $self->{'verbosity'};
-	return ($link, "", 0);
-    }
-    
-    if ($before_hash =~ s/^((?:http|ftp|file):\/\/)//i) {
-	my $type = $1;
-
-	if ($link =~ /^(http|ftp):/i) {
-	    # Turn url (using /) into file name (possibly using \ on windows)
-	    my @http_dir_split = split('/', $before_hash);
-	    $before_hash = &util::filename_cat(@http_dir_split);
-	}
-
-	$before_hash = $self->eval_dir_dots($before_hash);
-					 
-	my $linkfilename = &util::filename_cat ($base_dir, $before_hash);
-
-	my $rl = 0;
-	$rl = 1 if (-e $linkfilename);
-
-	# make sure there's a slash on the end if it's a directory
-	if ($before_hash !~ /\/$/) {
-	    $before_hash .= "/" if (-d $linkfilename);
-	}
-
-	return ($type . $before_hash, $hash_part, $rl);
-    
-    } elsif ($link !~ /^(mailto|news|gopher|nntp|telnet|javascript):/i) {
-	if ($before_hash =~ s/^\/// || $before_hash =~ /\\/) {
-
-	    # the first directory will be the domain name if file_is_url
-	    # to generate archives, otherwise we'll assume all files are
-	    # from the same site and base_dir is the root
-            # This is not called in Windows
-	    if ($self->{'file_is_url'}) {
-		my @dirs = split /[\/\\]/, $file;
-		my $domname = shift (@dirs);
-		$before_hash = &util::filename_cat($domname, $before_hash);
-		$before_hash =~ s/\\/\//g; # for windows
-	    }
-	    else
-	    {
-		# see if link shares directory with source document
-		# => turn into relative link if this is so!
-		my $before_hash_fix = "";
-		
-		# filename_cat appends / or \ to the beginning of the
-		# file pathname but in Windows we don't want to do that
-		if ($ENV{'GSDLOS'} =~ /^windows/i) {
-		    $before_hash_fix = $before_hash;
-		}
-		else {
-		    $before_hash_fix = &util::filename_cat("",$before_hash);
-		}
-
-		my $base_dir_win_match = $base_dir;
-		$base_dir_win_match =~ s/\\/\\\\/g;
-
-		$before_hash_fix =~ s/^$base_dir_win_match(\\|\/)//;
-		$before_hash = $before_hash_fix;
-
-	    }
-
-	} else {
-	    # Turn relative file path into full path
-	    my $dirname = &File::Basename::dirname($file);
-	    $before_hash = &util::filename_cat($dirname, $before_hash);
-	    $before_hash = $self->eval_dir_dots($before_hash);
-	}
-
-	my $linkfilename = &util::filename_cat ($base_dir, $before_hash); 
-
-	# make sure there's a slash on the end if it's a directory
-	if ($before_hash !~ /\/$/) {
-	    $before_hash .= "/" if (-d $linkfilename);
-	}
-	
-	return ("http://" . $before_hash, $hash_part, 1);
-
-    } else {
-	# mailto, news, nntp, telnet, javascript or gopher link
-	return ($before_hash, "", 0);
-    }
-}
-
-sub extract_first_NNNN_characters {
-    my $self = shift (@_);
-    my ($textref, $doc_obj, $thissection) = @_;
-    
-    foreach my $size (split /,/, $self->{'first'}) {
-	my $tmptext =  $$textref;
-	$tmptext =~ s/.*<body[^>]*>//i;
-	$tmptext =~ s/$self->{'title_sub'}// if (defined $self->{'title_sub'});
-	$tmptext =~ s/<[^>]*>/ /g;
-	$tmptext =~ s/&nbsp;/ /g;
-	$tmptext =~ s/^\s+//;
-	$tmptext =~ s/\s+$//;
-	$tmptext =~ s/\s+/ /gs;
-	$tmptext = substr ($tmptext, 0, $size);
-	$tmptext =~ s/\s\S*$/&#8230;/;
-	$doc_obj->add_utf8_metadata ($thissection, "First$size", $tmptext);
-    }
-}
-
-sub extract_metadata {
-    my $self = shift (@_);
-    my ($textref, $metadata, $doc_obj, $section) = @_;
-    my $outhandle = $self->{'outhandle'};
-
-    # if we don't want metadata, we may as well not be here ...
-    return if (!defined $self->{'metadata_fields'});
-
-    # hunt for an author look in the metadata elements:
-    if (defined $self->{'hunt_creator_metadata'}) {
-	for my $name (split /,/, "AUTHOR,AUTHOR.EMAIL,CREATOR,DC.CREATOR,DC.CREATOR.CORPORATENAME") {
-	    if ($$textref =~ /<meta(\s*?)(?:name|http-equiv)\s*=\s*\"?$name\"?([^>]*)/is) {
-		my $content = $1 . $2;
-		if ($content =~ /content\s*=\s*\"?(.*)\"?/is) {
-		    if (defined $1) {
-			my $value = $1;
-			$value =~ s/\"$//;
-			$value =~ s/\s+/ /gs;
-			$doc_obj->add_utf8_metadata($section, "Creator", $value);
-			print $outhandle " extracted Creator metadata \"$value\"\n" 
-			    if ($self->{'verbosity'} > 2);
-			next;
-		    }
-		}
-	    }
-	}
-    }
-
-    foreach my $field (split /,/, $self->{'metadata_fields'}) {
-
-	# don't need to extract field if it was passed in from a previous 
-	# (recursive) plugin
-	next if defined $metadata->{$field};
-
-	# see if there's a <meta> tag for this field
-	if ($$textref =~ /<meta(\s*?)(?:name|http-equiv)\s*=\s*\"?$field\"?([^>]*)/is) {
-	    my $content = $1 . $2;
-	    if ($content =~ /content\s*=\s*\"?(.*)\"?/is) {
-		if (defined $1) {
-		    my $value = $1;
-		    $value =~ s/\"$//;
-		    $value =~ s/\s+/ /gs;
-		    $value =~ s/\".*//gs;
-		    $doc_obj->add_utf8_metadata($section, $field, $value);
-		    print $outhandle " extracted \"$field\" metadata \"$value\"\n" 
-			if ($self->{'verbosity'} > 2);
-		    next;
-		}
-	    }
-	}
-	
-	# TITLE: extract the document title
-	
-	if ($field =~ /^title$/i) {
-
-	    # see if there's a <title> tag
-	    if ($$textref =~ /<title[^>]*>([^<]*)<\/title[^>]*>/is) {
-		if (defined $1) {
-		    my $title = $1;
-		    if ($title =~ /\w/) {
-			$title =~ s/<[^>]*>/ /g;
-			$title =~ s/&nbsp;/ /g;
-			$title =~ s/\s+/ /gs;
-			$title =~ s/^\s+//;
-			$title =~ s/\s+$//;
-			$doc_obj->add_utf8_metadata ($section, $field, $title);
-			print $outhandle " extracted \"$field\" metadata \"$title\"\n" 
-			    if ($self->{'verbosity'} > 2);
-			next;
-		    }
-		}
-	    }
-	    
-	    # if no title use first 100 characters
-	    my $tmptext = $$textref;
-	    $tmptext =~ s/<\/([^>]+)><\1>//g; # (eg) </b><b> - no space
-	    $tmptext =~ s/<[^>]*>/ /g;
-	    $tmptext =~ s/&nbsp;/ /g;
-	    $tmptext =~ s/^\s+//s;
-	    $tmptext =~ s/\s+$//;
-	    $tmptext =~ s/\s+/ /gs;
-	    $tmptext =~ s/$self->{'title_sub'}// if (defined $self->{'title_sub'});
-	    $tmptext = substr ($tmptext, 0, 100);
-	    $tmptext =~ s/\s\S*$/.../;
-	    $doc_obj->add_utf8_metadata ($section, $field, $tmptext);
-	    print $outhandle " extracted \"$field\" metadata \"$tmptext\"\n" 
-		if ($self->{'verbosity'} > 2);
-	    next;
-	}
-
-
-        # tag: extract the text between the first <H1> and </H1> tags
-        if ($field =~ /^tag[a-z0-9]+$/i) {
-	    
-	    my $tag = $field;
-	    $tag =~ s/^tag//i;
-            my $tmptext = $$textref;
-            $tmptext =~ s/\s+/ /gs;
-            if ($tmptext =~ /<$tag[^>]*>/i) {		
-		foreach my $word ($tmptext =~ m/<$tag[^>]*>(.*?)<\/$tag[^>]*>/g) {
-		    $word =~ s/&nbsp;/ /g;
-		    $word =~ s/<[^>]*>/ /g;
-		    $word =~ s/^\s+//;
-		    $word =~ s/\s+$//;
-		    $word =~ s/\s+/ /gs;
-		    if ($word ne "") {
-			$doc_obj->add_utf8_metadata ($section, $tag, $word);
-			print $outhandle " extracted \"$tag\" metadata \"$word\"\n" 
-			    if ($self->{'verbosity'} > 2);
-		    }
-		}
-            }
-            next;
-        }
-    }
-}
-
-
-# evaluate any "../" to next directory up
-# evaluate any "./" as here
-sub eval_dir_dots {
-    my $self = shift (@_);
-    my ($filename) = @_;
-
-    my $dirsep_os = &util::get_os_dirsep();
-    my @dirsep = split(/$dirsep_os/,$filename);
-
-    my @eval_dirs = ();
-    foreach my $d (@dirsep) {
-	if ($d eq "..") {
-	    pop(@eval_dirs);
-
-	} elsif ($d eq ".") {
-	    # do nothing!
-
-	} else {
-	    push(@eval_dirs,$d);
-	}
-    }
-
-    return &util::filename_cat(@eval_dirs);
-}
-
-sub replace_usemap_links {
-    my $self = shift (@_);
-    my ($front, $link, $back) = @_;
-
-    $link =~ s/^\.\///;
-    return $front . $link . $back;
-}
-
-sub inc_filecount {
-    my $self = shift (@_);
-
-    if ($self->{'file_num'} == 1000) {
-	$self->{'dir_num'} ++;
-	$self->{'file_num'} = 0;
-    } else {
-	$self->{'file_num'} ++;
-    }
-}
-
-
-# Extend the BasPlug read_file so that strings like &eacute; are
-# converted to UTF8 internally.  
-#
-# We don't convert &lt; or &gt; or &amp; or &quot; in case
-# they interfere with the GML files
-
-sub read_file {
-    my ($self, $filename, $encoding, $language, $textref) = @_;
-
-    &BasPlug::read_file($self, $filename, $encoding, $language, $textref);
-
-    # turn \ into \\ so that the rest of greenstone doesn't think there
-    # is an escape code following.
-    $$textref =~ s/\\/\\\\/go;
-
-    # Convert things like &eacute; to their UTF8 equivalents
-    $$textref =~ s/&(lt|gt|amp|quot);/&z$1;/go;
-    $$textref =~ s/&([^;]+);/&unicode::ascii2utf8(\&ghtml::getcharequiv($1,1))/gseo;
-    $$textref =~ s/&z(lt|gt|amp|quot);/&$1;/go;
-}
-
-1;
Index: /trunk/gsdl/perllib/plugins/RecPlug.pm
===================================================================
--- /trunk/gsdl/perllib/plugins/RecPlug.pm	(revision 2817)
+++ /trunk/gsdl/perllib/plugins/RecPlug.pm	(revision 2818)
@@ -256,5 +256,5 @@
 	    my ($filespec, $mdref);
 	    foreach $filespec (@extrametakeys) {
-		if ($subfile =~ /$filespec/) {
+		if ($subfile =~ /^$filespec$/) {
 		    print $outhandle "File \"$subfile\" matches filespec \"$filespec\"\n" 
 			if ($verbosity > 2);
