Index: in/trunk/model-sites-dev/waikato-edu/TC4.12_Math Resources_Activities/README.txt
===================================================================
--- /main/trunk/model-sites-dev/waikato-edu/TC4.12_Math Resources_Activities/README.txt	(revision 33690)
+++ 	(revision )
@@ -1,121 +1,0 @@
-------------------------------------------
-README FOR THE MATH ACTIVITIES COLLECTION
-------------------------------------------
-INDEX:
-A. RECREATING THE math.gs3coll GREENSTONE COLLECTION's import FOLDER'S CONTENTS FROM SCRATCH
-B. INSTRUCTIONS ON REBUILDING THE math.gs3coll GREENSTONE COLLECTION, IF THE COLLECTION'S import FOLDER IS NON-EMPTY
-C. HOW TO CREATE ANOTHER EDUCATION DEPT'S ACTIVITY COLLECTION
-D. FOR FURTHER INFORMATION ON GREENSTONE
-
-
-
-A. RECREATING THE math.gs3coll GREENSTONE COLLECTION's import FOLDER'S CONTENTS FROM SCRATCH
----------------------------------------------------------------------------------------------
-This section deals with preparing the import folder of the math.gs3coll so you can rebuild it with updated data.
-This section of the README contains instructions exclusive to Windows machines. However, a Greenstone collection's "import" folder that's prepared according to these instructions on a Windows machine, can then be moved into a "math.gs3coll" collection on Unix (Linux and Mac) operating systems that run Greenstone 3.09 or later.
-
-You would choose to recreate the import folder's contents of the math.gs3coll from scratch if:
-- the math.gs3coll/import subfolder is empty
-- you have moved about some files and folders of the Math Resource Activities folder that serves as source (input) to creating the math.gs3coll's import subfolder.
-
-To prepare the math.gs3coll/import folder's contents from scratch,
-
-0. Inspect the image "screenshot-input-mathfolder-organisation.png" which is a screengrab of how the contents of the Math Resource Activities folder could be organised. In the screenshot:
-- The top-level folder structure of the Math Resource Activities is shown to the right within the screenshot, and to the left you can see that one of the primary Activities, Algebra, has been expanded revealing the folder structure underneath.
-- A further subfolder is also expanded on the left: "Hooked on Algebra". Not shown is that this subfolder, expanded as an example, contains the files "Fishy Algebra.jpg" and "Hooked on Algebra.pdf".
-
-Liang Li organised the contents of the Math Resource Activities folder as seen in the screenshot. Others may decide on a different organisation of its contents. 
-In that case, you want to make sure that your Math Resources Activities folder is hierarchically organised in a similarly sensible fashion. You're free to move across folders and subfolders as you please, and add new ones, just be aware that the folder and subfolder hierarchical structure you create within Math Resources Activities will be reflected in the final Greenstone collection. 
-IMPORTANT: Also be aware that while the code can cope with spaces, you want to avoid "&" and other tricky characters (e.g. proper quote marks) in names of files and folders. Naming things correctly at this stage will save a lot of grief later. Use "and" in place of "&" for instance in file/folder names, drop quotation marks and colons. If in doubt about any character, replace with a simpler one. Hyphens and underscores are fine. Replace forward slashes, "/", in file/folder names, because "/" has a special meaning in Greenstone.
-
-1. Once you've finished reorganising the Math Resources Activities folder, copy the file "procMath.bat" (a custom made Windows specific script) into the top level of the Math Resources Activities folder.
-
-2. Double-click the procMath.bat file and it should run against the structured contents within your Math Resources Activities folder. You can see it's doing something because a black window should pop up wherein lots of text is displayed.
-
-NOTE: If you have heard of something called the "Windows DOS prompt" and know how to use it, you can use the DOS prompt to run the procMath.bat file too, instead of double clicking it as described above. This is useful for finding any issues (a process known as "debugging") in the event that something goes wrong in processing your Math Resources Activities folder. For example if you used unacceptable characters in file and folder names.
-
-3. After a little while the black window that popped up should disappear again, meaning the procMath.bat script has finished processing your Math Resources Activities folder. 
-
-As a result of running procMath.bat successfully, you'll now have a folder called "import" residing at the same level as your Math Resources Activities folder.
-
-4. Move all the contents of this import folder, except its toplevel "metadata.xml" file into your "math.gs3coll/import" subfolder. Then you may delete the "import" folder produced in steps 2 and 3 above.
-
-5. Proceed with the "B. INSTRUCTIONS ON REBUILDING THE math.gs3coll GREENSTONE COLLECTION, IF THE COLLECTION'S import FOLDER IS NON-EMPTY" below.
-
-
-
-B. INSTRUCTIONS ON REBUILDING THE math.gs3coll GREENSTONE COLLECTION, IF THE COLLECTION'S import FOLDER IS NON-EMPTY
----------------------------------------------------------------------------------------------------------------------
-
-To build the math.gs3coll Greenstone collection (the Math Activities collection), assuming you already have the contents of the collection "import" folder (if not, see instructions under section A above):
-
-0. Follow any instructions in the EducationDept/README.txt file first.
-
-1. Move the math.gs3coll into a Greenstone 3.09 installation's web/sites/localsite/collect/ folder.
-
-2. Run the GLI (Greenstone Librarian Interface) application.
-
-3. Open the math.gs3coll collection in GLI. 
-
-4. Go into the Create panel and press the Build collection button.
-Some minutes later, the Preview Collection button will become active, meaning your collection has been built and is ready to preview. (If the Preview button does not become active despite the build process indicating that it finished "successfully", quit GLI, reopen the collection and repeat steps 2-4. You can always email us on the mailing list at greenstone_team@cs.waikato.ac.nz.)
-
-
-
-C. HOW TO CREATE ANOTHER EDUCATION DEPT'S ACTIVITY COLLECTION
--------------------------------------------------------------
-You can create a different, new Greenstone collection similar to the Math collection by following the steps below.
-Note that step 2 below requires a Windows machine, but the remainding steps can be done on other operating systems such as Linux and Mac.
-
-1. Organise your content in a sensible hierarchical folder structure. As mentioned earlier in this README, check your file and folder names don't have "&", "/", quotes and any other characters that you think might be problematic (replace them with other characters or indicative words, e.g. replace "&" with "and").
-
-2.  THE SCRIPT IN THIS STEP REQUIRES A Windows MACHINE.
-Put the script file "procMath.bat" into the toplevel folder of the material you organised in step 1.
-
-3. Double click on the procMath.bat script. A black window will pop up. It will disappear once the script has finished processing your folder's contents.
-At the end of this process, you'll have ended up with a folder called "import" at the same level as the toplevel folder of the material you organised in step 1.
-
-4. Ensure that your Greenstone 3 installation's web/sites/localsite/collect subfolder contains the math.gs3coll folder. If it doesn't already exist there, copy it into there.
-
-5. Run the Greenstone Librarian Interface, GLI. You'll now create a new collection based on the math.gs3coll:
-Go to GLI's File > New... menu. Give the new collection a name, optionally add a description. Then in the drop-down box for "Base This Collection On", choose the Maths Activities collection (math.gs3coll). Press OK.
-Your new collection will now have inherited the custom metadata set and overall collection design of the Math Activities collection. So you don't need to put in any effort to get the same behaviour from your new collection.
-
-IMPORTANT NOTE: if you however have scanned in documents with "OCR" on (character recognition), rather than just scanned them in as pure images, your collection and its users will greatly benefit from enabling full text searching for the new collection. To provide full text searching for your collection, click on the Design pane within GLI, then select "Search Indexes" to the left and press the "New Index..." button the right. At the top of the New Index dialog that appears, tick the topmost box, which should be labelled "Full text". Then press the "Add Index" button.
-
-You can now quit GLI. 
-
-6. Move all the contents of the "import" folder produced at the end of step 3 above, excluding its toplevel "metadata.xml" file, into your Greenstone 3 installation's web/sites/localsite/collect/<new collection's name>/import folder. (Where "new collection's name" is the simplified name that got assigned to the new collection you created in step 5.)
-You can now delete the "import" folder you created in step 3.
-
-7. Run GLI again and use File > Open... to open the collection you created in step 5. 
-
-8. OPTIONAL STEP: If you want to add additional "tags" to documents or folders, to allow browsing or searching by them, then go to GLI's Enrich pane. On the left, select all files/folders for which a particular tag value is applicable and, on the right, assign this to the field labelled "er.Tag". You can create multiple er.Tags for any file/folder (or selection thereof) by hitting Enter after assigning a value for an er.Tag. This will allow you to enter a second Tag value, and so on.
-Then select other files and folders for which other tag(s) apply, and assign them similarly, until you've assigned all the tag metadata you want to the various files and folders.
-
-BEWARE: if you ever recreate your collection's "import" folder contents as in steps 3 and 6, you will lose any er.Tag values you assigned through GLI.
-
-In order to be enable Searching and Browsing by the tags you assigned, go to GLI > Design pane.
-- Choose "Search Indexes" on the right, then press the "New Index" button. In the popup dialog, scroll down until you see "er.Tag" and tick its box. Press "Add Index". Now you've prepared your collection to allow searching by tags.
-- Next, choose "Browsing Classifiers" on the left, then at the bottom on the right set "Select classifier to add" to "List" and press "Add Classifier". The dialog that pops up, next to the "metadata" configuration option at the top, choose "er.Tag" from its drop down values. Scroll further down in the dialog until you see the "buttonname" option and type "tags" as its value. Press "OK" to close the dialog. You've now configured your collection to allow users to browse by the tagging metadata that you've assigned.
-- One last thing to improve the display, go to the Format pane, select "Search" on the LEFT then you should see an Index on "er.Tag" to the right. Type "tags" in its value field, so that when the user wants to search by tags, they see the word "tags" for the index name and not "er.Tag" which will be meaningless to them.
-("er" stands for the custom EducationResources.mds metadata set created for the education department.)
-
-9. You're finally ready to rebuild your collection. Still within GLI, click on the Create pane near the top and press the "Build Collection" button. Depending on the size of your collection, this can take some time. Wait until your collection has built successfully and then press the Preview collection which should have become active at this point. Your browser should open up and you should be able to start inspecting the collection you created.
-
-
-
-D. FOR FURTHER INFORMATION ON GREENSTONE
------------------------------------------
-
-a. The instructions above were devised based on the instructions in the many Greenstone 3 tutorials at http://wiki.greenstone.org/doku.php?id=en:tutorials (make sure to click on the "Greenstone 3" tab near the top of that page).
-The Greenstone tutorials are recommended to learn more about Greenstone. For example, you can use what you learn in the "Using UnknownPlugin" section of the "Building a multimedia collection" to learn the basics of using the UnknownPlugin and from there it's a small step to figuring out how to configure the UnknownPlugin in your collection to add support for videos.
-
-b. Once you've gone through the Greenstone 3 tutorials, your understanding of the Greenstone software will be sufficient to understand some more advanced instructions in the Greenstone wiki. For instance, if you want use a CSV file to prepare metadata that is to be assigned to documents by Greenstone (rather than using GLI's Enrich pane), then check out the configuration options for the MetadataCSVPlugin listed at http://wiki.greenstone.org/doku.php?id=en:plugin:metadatacsvplugin
-Assigning er.Tags per filename using a CSV file will allow you to recreate your collection from scratch (by recreating the import folder) as often as you want.
-
-c. You can also join the greenstone-users mailing list to ask Greenstone questions, see http://wiki.greenstone.org/doku.php?id=en:support#central_english_mailing_lists
-Waikato University Education department staff are also welcome to write to us directly, if that's preferred, at greenstone_team@cs.waikato.ac.nz
-
-
-
Index: /main/trunk/model-sites-dev/waikato-edu/TC4.12_Math Resources_Activities/maths-activities/DATA-PREPARATION/README.txt
===================================================================
--- /main/trunk/model-sites-dev/waikato-edu/TC4.12_Math Resources_Activities/maths-activities/DATA-PREPARATION/README.txt	(revision 33691)
+++ /main/trunk/model-sites-dev/waikato-edu/TC4.12_Math Resources_Activities/maths-activities/DATA-PREPARATION/README.txt	(revision 33691)
@@ -0,0 +1,121 @@
+------------------------------------------
+README FOR THE MATH ACTIVITIES COLLECTION
+------------------------------------------
+INDEX:
+A. RECREATING THE math.gs3coll GREENSTONE COLLECTION's import FOLDER'S CONTENTS FROM SCRATCH
+B. INSTRUCTIONS ON REBUILDING THE math.gs3coll GREENSTONE COLLECTION, IF THE COLLECTION'S import FOLDER IS NON-EMPTY
+C. HOW TO CREATE ANOTHER EDUCATION DEPT'S ACTIVITY COLLECTION
+D. FOR FURTHER INFORMATION ON GREENSTONE
+
+
+
+A. RECREATING THE math.gs3coll GREENSTONE COLLECTION's import FOLDER'S CONTENTS FROM SCRATCH
+---------------------------------------------------------------------------------------------
+This section deals with preparing the import folder of the math.gs3coll so you can rebuild it with updated data.
+This section of the README contains instructions exclusive to Windows machines. However, a Greenstone collection's "import" folder that's prepared according to these instructions on a Windows machine, can then be moved into a "math.gs3coll" collection on Unix (Linux and Mac) operating systems that run Greenstone 3.09 or later.
+
+You would choose to recreate the import folder's contents of the math.gs3coll from scratch if:
+- the math.gs3coll/import subfolder is empty
+- you have moved about some files and folders of the Math Resource Activities folder that serves as source (input) to creating the math.gs3coll's import subfolder.
+
+To prepare the math.gs3coll/import folder's contents from scratch,
+
+0. Inspect the image "screenshot-input-mathfolder-organisation.png" which is a screengrab of how the contents of the Math Resource Activities folder could be organised. In the screenshot:
+- The top-level folder structure of the Math Resource Activities is shown to the right within the screenshot, and to the left you can see that one of the primary Activities, Algebra, has been expanded revealing the folder structure underneath.
+- A further subfolder is also expanded on the left: "Hooked on Algebra". Not shown is that this subfolder, expanded as an example, contains the files "Fishy Algebra.jpg" and "Hooked on Algebra.pdf".
+
+Liang Li organised the contents of the Math Resource Activities folder as seen in the screenshot. Others may decide on a different organisation of its contents. 
+In that case, you want to make sure that your Math Resources Activities folder is hierarchically organised in a similarly sensible fashion. You're free to move across folders and subfolders as you please, and add new ones, just be aware that the folder and subfolder hierarchical structure you create within Math Resources Activities will be reflected in the final Greenstone collection. 
+IMPORTANT: Also be aware that while the code can cope with spaces, you want to avoid "&" and other tricky characters (e.g. proper quote marks) in names of files and folders. Naming things correctly at this stage will save a lot of grief later. Use "and" in place of "&" for instance in file/folder names, drop quotation marks and colons. If in doubt about any character, replace with a simpler one. Hyphens and underscores are fine. Replace forward slashes, "/", in file/folder names, because "/" has a special meaning in Greenstone.
+
+1. Once you've finished reorganising the Math Resources Activities folder, copy the file "procMath.bat" (a custom made Windows specific script) into the top level of the Math Resources Activities folder.
+
+2. Double-click the procMath.bat file and it should run against the structured contents within your Math Resources Activities folder. You can see it's doing something because a black window should pop up wherein lots of text is displayed.
+
+NOTE: If you have heard of something called the "Windows DOS prompt" and know how to use it, you can use the DOS prompt to run the procMath.bat file too, instead of double clicking it as described above. This is useful for finding any issues (a process known as "debugging") in the event that something goes wrong in processing your Math Resources Activities folder. For example if you used unacceptable characters in file and folder names.
+
+3. After a little while the black window that popped up should disappear again, meaning the procMath.bat script has finished processing your Math Resources Activities folder. 
+
+As a result of running procMath.bat successfully, you'll now have a folder called "import" residing at the same level as your Math Resources Activities folder.
+
+4. Move all the contents of this import folder, except its toplevel "metadata.xml" file into your "math.gs3coll/import" subfolder. Then you may delete the "import" folder produced in steps 2 and 3 above.
+
+5. Proceed with the "B. INSTRUCTIONS ON REBUILDING THE math.gs3coll GREENSTONE COLLECTION, IF THE COLLECTION'S import FOLDER IS NON-EMPTY" below.
+
+
+
+B. INSTRUCTIONS ON REBUILDING THE math.gs3coll GREENSTONE COLLECTION, IF THE COLLECTION'S import FOLDER IS NON-EMPTY
+---------------------------------------------------------------------------------------------------------------------
+
+To build the math.gs3coll Greenstone collection (the Math Activities collection), assuming you already have the contents of the collection "import" folder (if not, see instructions under section A above):
+
+0. Follow any instructions in the EducationDept/README.txt file first.
+
+1. Move the math.gs3coll into a Greenstone 3.09 installation's web/sites/localsite/collect/ folder.
+
+2. Run the GLI (Greenstone Librarian Interface) application.
+
+3. Open the math.gs3coll collection in GLI. 
+
+4. Go into the Create panel and press the Build collection button.
+Some minutes later, the Preview Collection button will become active, meaning your collection has been built and is ready to preview. (If the Preview button does not become active despite the build process indicating that it finished "successfully", quit GLI, reopen the collection and repeat steps 2-4. You can always email us on the mailing list at greenstone_team@cs.waikato.ac.nz.)
+
+
+
+C. HOW TO CREATE ANOTHER EDUCATION DEPT'S ACTIVITY COLLECTION
+-------------------------------------------------------------
+You can create a different, new Greenstone collection similar to the Math collection by following the steps below.
+Note that step 2 below requires a Windows machine, but the remainding steps can be done on other operating systems such as Linux and Mac.
+
+1. Organise your content in a sensible hierarchical folder structure. As mentioned earlier in this README, check your file and folder names don't have "&", "/", quotes and any other characters that you think might be problematic (replace them with other characters or indicative words, e.g. replace "&" with "and").
+
+2.  THE SCRIPT IN THIS STEP REQUIRES A Windows MACHINE.
+Put the script file "procMath.bat" into the toplevel folder of the material you organised in step 1.
+
+3. Double click on the procMath.bat script. A black window will pop up. It will disappear once the script has finished processing your folder's contents.
+At the end of this process, you'll have ended up with a folder called "import" at the same level as the toplevel folder of the material you organised in step 1.
+
+4. Ensure that your Greenstone 3 installation's web/sites/localsite/collect subfolder contains the math.gs3coll folder. If it doesn't already exist there, copy it into there.
+
+5. Run the Greenstone Librarian Interface, GLI. You'll now create a new collection based on the math.gs3coll:
+Go to GLI's File > New... menu. Give the new collection a name, optionally add a description. Then in the drop-down box for "Base This Collection On", choose the Maths Activities collection (math.gs3coll). Press OK.
+Your new collection will now have inherited the custom metadata set and overall collection design of the Math Activities collection. So you don't need to put in any effort to get the same behaviour from your new collection.
+
+IMPORTANT NOTE: if you however have scanned in documents with "OCR" on (character recognition), rather than just scanned them in as pure images, your collection and its users will greatly benefit from enabling full text searching for the new collection. To provide full text searching for your collection, click on the Design pane within GLI, then select "Search Indexes" to the left and press the "New Index..." button the right. At the top of the New Index dialog that appears, tick the topmost box, which should be labelled "Full text". Then press the "Add Index" button.
+
+You can now quit GLI. 
+
+6. Move all the contents of the "import" folder produced at the end of step 3 above, excluding its toplevel "metadata.xml" file, into your Greenstone 3 installation's web/sites/localsite/collect/<new collection's name>/import folder. (Where "new collection's name" is the simplified name that got assigned to the new collection you created in step 5.)
+You can now delete the "import" folder you created in step 3.
+
+7. Run GLI again and use File > Open... to open the collection you created in step 5. 
+
+8. OPTIONAL STEP: If you want to add additional "tags" to documents or folders, to allow browsing or searching by them, then go to GLI's Enrich pane. On the left, select all files/folders for which a particular tag value is applicable and, on the right, assign this to the field labelled "er.Tag". You can create multiple er.Tags for any file/folder (or selection thereof) by hitting Enter after assigning a value for an er.Tag. This will allow you to enter a second Tag value, and so on.
+Then select other files and folders for which other tag(s) apply, and assign them similarly, until you've assigned all the tag metadata you want to the various files and folders.
+
+BEWARE: if you ever recreate your collection's "import" folder contents as in steps 3 and 6, you will lose any er.Tag values you assigned through GLI.
+
+In order to be enable Searching and Browsing by the tags you assigned, go to GLI > Design pane.
+- Choose "Search Indexes" on the right, then press the "New Index" button. In the popup dialog, scroll down until you see "er.Tag" and tick its box. Press "Add Index". Now you've prepared your collection to allow searching by tags.
+- Next, choose "Browsing Classifiers" on the left, then at the bottom on the right set "Select classifier to add" to "List" and press "Add Classifier". The dialog that pops up, next to the "metadata" configuration option at the top, choose "er.Tag" from its drop down values. Scroll further down in the dialog until you see the "buttonname" option and type "tags" as its value. Press "OK" to close the dialog. You've now configured your collection to allow users to browse by the tagging metadata that you've assigned.
+- One last thing to improve the display, go to the Format pane, select "Search" on the LEFT then you should see an Index on "er.Tag" to the right. Type "tags" in its value field, so that when the user wants to search by tags, they see the word "tags" for the index name and not "er.Tag" which will be meaningless to them.
+("er" stands for the custom EducationResources.mds metadata set created for the education department.)
+
+9. You're finally ready to rebuild your collection. Still within GLI, click on the Create pane near the top and press the "Build Collection" button. Depending on the size of your collection, this can take some time. Wait until your collection has built successfully and then press the Preview collection which should have become active at this point. Your browser should open up and you should be able to start inspecting the collection you created.
+
+
+
+D. FOR FURTHER INFORMATION ON GREENSTONE
+-----------------------------------------
+
+a. The instructions above were devised based on the instructions in the many Greenstone 3 tutorials at http://wiki.greenstone.org/doku.php?id=en:tutorials (make sure to click on the "Greenstone 3" tab near the top of that page).
+The Greenstone tutorials are recommended to learn more about Greenstone. For example, you can use what you learn in the "Using UnknownPlugin" section of the "Building a multimedia collection" to learn the basics of using the UnknownPlugin and from there it's a small step to figuring out how to configure the UnknownPlugin in your collection to add support for videos.
+
+b. Once you've gone through the Greenstone 3 tutorials, your understanding of the Greenstone software will be sufficient to understand some more advanced instructions in the Greenstone wiki. For instance, if you want use a CSV file to prepare metadata that is to be assigned to documents by Greenstone (rather than using GLI's Enrich pane), then check out the configuration options for the MetadataCSVPlugin listed at http://wiki.greenstone.org/doku.php?id=en:plugin:metadatacsvplugin
+Assigning er.Tags per filename using a CSV file will allow you to recreate your collection from scratch (by recreating the import folder) as often as you want.
+
+c. You can also join the greenstone-users mailing list to ask Greenstone questions, see http://wiki.greenstone.org/doku.php?id=en:support#central_english_mailing_lists
+Waikato University Education department staff are also welcome to write to us directly, if that's preferred, at greenstone_team@cs.waikato.ac.nz
+
+
+
Index: /main/trunk/model-sites-dev/waikato-edu/TC4.12_Math Resources_Activities/maths-activities/DATA-PREPARATION/procMath.bat
===================================================================
--- /main/trunk/model-sites-dev/waikato-edu/TC4.12_Math Resources_Activities/maths-activities/DATA-PREPARATION/procMath.bat	(revision 33691)
+++ /main/trunk/model-sites-dev/waikato-edu/TC4.12_Math Resources_Activities/maths-activities/DATA-PREPARATION/procMath.bat	(revision 33691)
@@ -0,0 +1,127 @@
+@ECHO OFF
+SETLOCAL enabledelayedexpansion
+
+:: THIS SCRIPT FILE NEEDS TO BE IN ASCII FOR THE CHARACTER REPLACEMENTS TO WORK
+:: If working with utf8 chars to be replaced, set this script file to be in utf-8 and change the codepage, see
+:: https://stackoverflow.com/questions/5273937/how-to-replace-substrings-in-windows-batch-file
+::chcp 65001
+
+set origdir=%CD%
+
+set odir=..\import
+if exist %odir% rmdir /S /Q "%odir%"
+
+if not exist %odir% mkdir %odir%
+pushd %odir%
+set odir=%CD%
+popd
+
+echo ORIG DIR: !origdir!
+echo OUTPUT DIR: !odir!
+call :procDir
+
+:procDir
+if not [%1]==[] (	
+	set dirname=%1
+	rem echo Dirname: !dirname!
+	set dirname=!dirname:"=!
+	rem echo Dirname 2: !dirname!
+) else (
+	set dirname=
+	rem echo empty dir
+)
+::if not [%dirname%]==[] (set dirname=!dirname:"=!) else (set dirname=)
+
+::echo Dirname is %dirname%
+
+
+:: Recurse through current directory, writing out the metadata.xml file
+:: https://ss64.com/nt/for_r.html - Recurse through subfolders
+:: https://ss64.com/nt/syntax-args.html use of parameters
+:: https://ss64.com/nt/syntax-substring.html
+:: https://stackoverflow.com/questions/2772456/string-replacement-in-batch-file/2772498
+for /r . %%G in (.,*.pdf,*.jpg) do (
+	set fullpath=%%~fG
+
+	rem Remove the prefix path of the starting directory denoted by var origdir
+	rem to get the relative path
+	set relpath=%%~fG
+	set foldername=%%~nG
+
+
+	rem If dealing with directory, create a folder by the same name inside the output directory
+	rem and write out a metadata.xml file there
+	IF EXIST %%G\NUL (
+	
+		if "!relpath!" == "!origdir!" (
+			set relpath=
+			set metapath="!odir!\metadata.xml"
+		) else (	
+			CALL SET relpath=!!relpath:%origdir%\=!!
+			set metapath="!odir!\!relpath!\metadata.xml"
+		)
+		echo RELPATH: !relpath!
+		rem echo OUTPUT DIR: "!odir!\!relpath!"
+		echo METAPATH: !metapath!
+	
+		if not exist "!odir!\!relpath!" mkdir "!odir!\!relpath!"
+		
+		echo ^<?xml version="1.0" encoding="UTF-8"?^> > !metapath!
+		echo ^<^^!DOCTYPE DirectoryMetadata SYSTEM "http://greenstone.org/dtd/DirectoryMetadata/1.0/DirectoryMetadata.dtd"^> >> !metapath!
+		echo ^<DirectoryMetadata^> >> !metapath!
+		echo 	^<FileSet^> >> !metapath!
+		echo 		^<FileName^>.*^</FileName^> >> !metapath!
+		echo 		^<Description^> >> !metapath!
+		echo				^<Metadata mode="accumulate" name="er.Crate"^>!foldername!^</Metadata^> >> !metapath!
+		echo				^<Metadata mode="accumulate" name="er.CrateName"^>!foldername!^</Metadata^> >> !metapath!
+		echo 		^</Description^> >> !metapath!
+		echo 	^</FileSet^> >> !metapath!
+		echo ^</DirectoryMetadata^> >> !metapath!
+	) else (
+		rem Dealing with (PDF) files:
+		rem Create a subfolder in import by the same name as the PDF
+		rem then copy the PDF into it
+		rem And create a metadata.xml file in here for it
+		
+		if "!relpath!" == "!origdir!" (
+			set relpath=
+			set metapath="!odir!\metadata.xml"
+		) else (	
+			CALL SET relpath=!!relpath:%origdir%\=!!
+			rem Remove .pdf extension from relative path
+			CALL SET relpath=!!relpath:~0,-4!!
+			set metapath="!odir!\!relpath!\metadata.xml"
+		)
+		echo RELPATH: !relpath!
+		rem echo OUTPUT DIR: "!odir!\!relpath!"
+		echo METAPATH: !metapath!
+		
+		rem foldername is PDF's filename without .pdf extension
+		echo @@@ GOT FILE: !foldername!
+		if not exist "!odir!\!relpath!" mkdir "!odir!\!relpath!"
+		rem if not exist "!odir!\!relpath!\!foldername!\!foldername!.pdf" copy "!fullpath!" "!odir!\!relpath!\!foldername!\."
+		copy "!fullpath!" "!odir!\!relpath!\."
+		
+		rem Replace relative path to file with vertical bars to create the hierarchy classifier meta value needed
+		set line=!relpath:\=^|!
+		echo LINE: !line! to be written out to !metapath!
+		
+		echo ^<?xml version="1.0" encoding="UTF-8"?^> > !metapath!
+		echo ^<^^!DOCTYPE DirectoryMetadata SYSTEM "http://greenstone.org/dtd/DirectoryMetadata/1.0/DirectoryMetadata.dtd"^> >> !metapath!
+		echo ^<DirectoryMetadata^> >> !metapath!
+		echo 	^<FileSet^> >> !metapath!
+		echo 		^<FileName^>.*^</FileName^> >> !metapath!
+		echo 		^<Description^> >> !metapath!
+		echo				^<Metadata mode="accumulate" name="er.CrateHierarchy"^>!line!^</Metadata^> >> !metapath!
+		echo				^<Metadata mode="accumulate" name="er.Activity"^>!foldername!^</Metadata^> >> !metapath!
+		echo				^<Metadata mode="accumulate" name="er.ActivityName"^>!foldername!^</Metadata^> >> !metapath!
+		echo 		^</Description^> >> !metapath!
+		echo 	^</FileSet^> >> !metapath!
+		echo ^</DirectoryMetadata^> >> !metapath!
+		
+	)
+
+)
+
+
+rem exit
Index: /main/trunk/model-sites-dev/waikato-edu/TC4.12_Math Resources_Activities/maths-activities/etc/collectionConfig.bak
===================================================================
--- /main/trunk/model-sites-dev/waikato-edu/TC4.12_Math Resources_Activities/maths-activities/etc/collectionConfig.bak	(revision 33691)
+++ /main/trunk/model-sites-dev/waikato-edu/TC4.12_Math Resources_Activities/maths-activities/etc/collectionConfig.bak	(revision 33691)
@@ -0,0 +1,261 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<CollectionConfig xmlns:gsf="http://www.greenstone.org/greenstone3/schema/ConfigFormat" xmlns:gslib="http://www.greenstone.org/skinning" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+	<metadataList>
+		<metadata lang="en" name="creator"/>
+		<metadata lang="en" name="maintainer"/>
+		<metadata lang="en" name="public">true</metadata>
+	</metadataList>
+	<displayItemList>
+		<displayItem assigned="true" lang="en" name="description">Math activities in TC4.12</displayItem>
+		<displayItem assigned="true" lang="en" name="name">mathgs3coll</displayItem>
+		<displayItem assigned="true" lang="en" name="er.ActivityName">Activity Name</displayItem>
+		<displayItem assigned="true" lang="en" name="document:text">text</displayItem>
+		<displayItem assigned="true" lang="en" name="document:ex.Title">Title</displayItem>
+		<displayItem assigned="true" lang="en" name="document:ex.Source">Source</displayItem>
+		<displayItem assigned="true" lang="en" name="document">document</displayItem>
+		<displayItem assigned="true" lang="en" name="section">section</displayItem>
+		<displayItem assigned="true" lang="en" name="text">text</displayItem>
+		<displayItem assigned="true" lang="en" name="dc.Title,ex.dc.Title,Title">titles</displayItem>
+		<displayItem assigned="true" lang="en" name="Source">filenames</displayItem>
+		<displayItem assigned="true" lang="en" name="shortDescription">science1</displayItem>
+		<displayItem assigned="true" lang="en" name=".er.ActivityName">er.ActivityName</displayItem>
+	</displayItemList>
+	<format>
+			<gsf:template name="choose-title">
+				<gsf:choose-metadata>
+<!--
+<gsf:metadata name="er.ActivityName"/>
+-->
+					<gsf:metadata name="Source"/>
+					<gsf:default>Untitled</gsf:default>
+				</gsf:choose-metadata>
+			</gsf:template>
+		</format>
+	<search type="lucene">
+		<level name="document">
+			<displayItem lang="en" name="name">document</displayItem>
+		</level>
+		<defaultLevel name="document"/>
+		<index name="er.ActivityName">
+			<displayItem lang="en" name="name">Activity Name</displayItem>
+		</index>
+		<defaultIndex name="er.ActivityName"/>
+		<sort name="rank">
+			<displayItem lang="en" name="name">rank</displayItem>
+		</sort>
+		<sort name="none">
+			<displayItem lang="en" name="name">natural (build) order</displayItem>
+		</sort>
+		<searchType name="plain"/>
+		<searchType name="simpleform"/>
+		<searchType name="advancedform"/>
+		<format>
+			<gsf:template match="documentNode">
+<!--
+<td valign="top">
+      <gsf:link type="document">
+        <gsf:icon type="document"/>
+      </gsf:link>
+    </td>
+-->
+				<td valign="top">
+					<gsf:switch>
+						<gsf:metadata name="equivDocLink"/>
+						<gsf:when test="exists">
+							<gsf:metadata name="equivDocLink"/>
+							<gsf:metadata name="equivDocIcon"/>
+							<gsf:metadata name="/equivDocLink"/>
+						</gsf:when>
+					</gsf:switch>
+				</td>
+				<td valign="top">
+					<gsf:link type="source">
+						<gsf:choose-metadata>
+							<gsf:metadata name="thumbicon"/>
+							<gsf:metadata name="srcicon"/>
+						</gsf:choose-metadata>
+					</gsf:link>
+				</td>
+				<td><gsf:metadata name="er.Crate"/>:<gsf:metadata name="er.CrateName"/> &gt;<br/><gsf:link type="document"><!--
+<xsl:call-template name="choose-title"/>
+-->
+<gsf:metadata name="er.Activity"/>:<gsf:metadata name="er.ActivityName"/></gsf:link> (<gsf:metadata name="Source"/>)</td>
+			</gsf:template>
+		</format>
+	</search>
+	<infodb type="jdbm"/>
+	<import>
+		<pluginList>
+			<plugin name="ZIPPlugin"/>
+			<plugin name="GreenstoneXMLPlugin"/>
+			<plugin name="TextPlugin"/>
+			<plugin name="HTMLPlugin"/>
+			<plugin name="EmailPlugin"/>
+			<plugin name="PDFv2Plugin">
+				<option name="-convert_to" value="pretty_html"/>
+				<option name="-associate_ext" value="jpg"/>
+			</plugin>
+			<plugin name="RTFPlugin"/>
+			<plugin name="WordPlugin">
+				<option name="-windows_scripting"/>
+				<option name="-convert_to" value="auto"/>
+			</plugin>
+			<plugin name="PostScriptPlugin"/>
+			<plugin name="PowerPointPlugin"/>
+			<plugin name="ExcelPlugin"/>
+			<plugin name="ImagePlugin"/>
+			<plugin name="ISISPlugin"/>
+			<plugin name="NulPlugin"/>
+			<plugin name="OAIPlugin"/>
+			<plugin name="MetadataXMLPlugin"/>
+			<plugin name="ArchivesInfPlugin"/>
+			<plugin name="DirectoryPlugin"/>
+		</pluginList>
+	</import>
+	<browse>
+		<classifier name="Hierarchy">
+			<option name="-metadata" value="er.CrateHierarchy"/>
+			<option name="-sort" value="er.ActivityName"/>
+			<option name="-buttonname" value="Browse by crate"/>
+		</classifier>
+		<format>
+			<gsf:template match="documentNode">
+<!--
+<td valign="top">
+<gsf:link type="document">
+<gsf:icon type="document"/>
+</gsf:link>
+</td>
+-->
+				<gsf:switch>
+					<gsf:metadata name="equivDocLink"/>
+					<gsf:when test="exists">
+						<td valign="top">
+							<gsf:metadata name="equivDocLink"/>
+							<gsf:metadata name="equivDocIcon"/>
+							<gsf:metadata name="/equivDocLink"/>
+						</td>
+					</gsf:when>
+				</gsf:switch>
+				<td valign="top">
+					<gsf:link type="source">
+						<gsf:choose-metadata>
+							<gsf:metadata name="thumbicon"/>
+							<gsf:metadata name="srcicon"/>
+						</gsf:choose-metadata>
+					</gsf:link>
+				</td>
+				<td valign="top">
+					<gsf:link type="document">
+<!--
+Defined in the global format statement
+-->
+<!--
+<gsf:metadata name="er.Activity"/>:
+-->
+						<xsl:call-template name="choose-title"/>
+<!--
+<gsf:switch>
+<gsf:metadata name="Source"/>
+<gsf:when test="exists">
+<br/>
+<i>(
+<gsf:metadata name="Source"/>)
+</i>
+</gsf:when>
+</gsf:switch>
+-->
+					</gsf:link>
+				</td>
+			</gsf:template>
+			<gsf:template match="classifierNode[@classifierStyle = 'VList']">
+				<td valign="top">
+					<gsf:link style="static" type="classifier">
+						<gsf:icon type="classifier"/>
+					</gsf:link>
+				</td>
+				<td valign="top">
+					<gsf:link type="classifier">
+						<gsf:metadata name="Title"/>
+					</gsf:link>
+				</td>
+				<td valign="top">(<gsf:metadata name="numleafdocs"/>)</td>
+			</gsf:template>
+			<gsf:template match="classifierNode[@classifierStyle = 'HList']">
+				<gsf:link style="static" type="classifier">
+					<gsf:metadata name="Title"/>
+				</gsf:link>
+			</gsf:template>
+		</format>
+	</browse>
+	<display>
+		<format>
+			<gsf:option name="TOC" value="true"/>
+			<gsf:option name="AllowUserComments" value="false"/>
+<!--
+Overwriting this template allows you to change the heading of the document.
+-->
+<!--
+<gsf:template name="documentHeading">
+<span style="font-weight:bold; font-size: 120%;">
+<xsl:call-template name="choose-title"/>
+</span>
+</gsf:template>
+-->
+<!--
+Overwriting this template can be used to redefine the content of the whole document. This is useful for simple documents, but not recommended for more complex documents (e.g. hierachical and paged documents) as it can prevent any sub-sections from showing.
+-->
+<!--
+<gsf:template name="documentContent">
+<div id="gs-document">
+<xsl:call-template name="documentPre"/>
+<xsl:call-template name="wrappedSectionImage"/>
+<div id="gs-document-text">
+<xsl:call-template name="documentNodeText"/>
+</div>
+</div>
+</gsf:template>
+-->
+<!--
+Overwriting this template can be used to change the content of section headings.
+-->
+<!--
+<gsf:template name="sectionHeading">
+<xsl:call-template name="choose-title"/>
+</gsf:template>
+-->
+<!--
+Overwriting this template can be used to change the content of the top-level section.
+-->
+<!--
+<gsf:template name="topLevelSectionContent">
+<xsl:call-template name="wrappedSectionImage"/>
+<xsl:call-template name="wrappedSectionText"/>
+</gsf:template>
+-->
+<!--
+Overwriting this template can be used to change the content of sections.
+-->
+<!--
+<gsf:template name="sectionContent">
+<xsl:call-template name="wrappedSectionImage"/>
+<xsl:call-template name="wrappedSectionText"/>
+</gsf:template>
+-->
+		</format>
+	</display>
+	<replaceListRef id="gs2-standard"/>
+	<replaceListRef id="gs2-image"/>
+	<serviceRackList><!-- comment out the following serviceRack if you want to disable RSS for this collection -->
+		<serviceRack name="RSSRetrieve"/><!-- comment out the following serviceRack if you want to disable OAI for this collection -->
+		<serviceRack name="OAIPMH">
+			<setName>science1</setName>
+			<setDescription/><!-- uncomment the following and set the name attribute if 
+		       you want this collection to be part of a super set. --><!--<oaiSuperSet name="xxx"/>-->
+			<ListMetadataFormats><!--What metadata sets to support for this collection. You can select any set that is specified in OAIConfig.xml. To use a new set, you need to add a set definition in OAIConfig.xml, then reference it here, like:
+				   <metadataFormat metadataPrefix="prefix"/> -->
+				<metadataFormat metadataPrefix="oai_dc"><!-- you can customize the mappings by adding elements in here. See resources/oai/OAIConfig.xml for the format--></metadataFormat>
+			</ListMetadataFormats>
+		</serviceRack>
+	</serviceRackList>
+</CollectionConfig>
Index: /main/trunk/model-sites-dev/waikato-edu/TC4.12_Math Resources_Activities/maths-activities/etc/collectionConfig.xml
===================================================================
--- /main/trunk/model-sites-dev/waikato-edu/TC4.12_Math Resources_Activities/maths-activities/etc/collectionConfig.xml	(revision 33691)
+++ /main/trunk/model-sites-dev/waikato-edu/TC4.12_Math Resources_Activities/maths-activities/etc/collectionConfig.xml	(revision 33691)
@@ -0,0 +1,261 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<CollectionConfig xmlns:gsf="http://www.greenstone.org/greenstone3/schema/ConfigFormat" xmlns:gslib="http://www.greenstone.org/skinning" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+	<metadataList>
+		<metadata lang="en" name="creator"/>
+		<metadata lang="en" name="maintainer"/>
+		<metadata lang="en" name="public">true</metadata>
+	</metadataList>
+	<displayItemList>
+		<displayItem assigned="true" lang="en" name="description">Math activities in TC4.12</displayItem>
+		<displayItem assigned="true" lang="en" name="name">Maths Activities</displayItem>
+		<displayItem assigned="true" lang="en" name="er.ActivityName">Activity Name</displayItem>
+		<displayItem assigned="true" lang="en" name="document:text">text</displayItem>
+		<displayItem assigned="true" lang="en" name="document:ex.Title">Title</displayItem>
+		<displayItem assigned="true" lang="en" name="document:ex.Source">Source</displayItem>
+		<displayItem assigned="true" lang="en" name="document">document</displayItem>
+		<displayItem assigned="true" lang="en" name="section">section</displayItem>
+		<displayItem assigned="true" lang="en" name="text">text</displayItem>
+		<displayItem assigned="true" lang="en" name="dc.Title,ex.dc.Title,Title">titles</displayItem>
+		<displayItem assigned="true" lang="en" name="Source">filenames</displayItem>
+		<displayItem assigned="true" lang="en" name="shortDescription">science1</displayItem>
+		<displayItem assigned="true" lang="en" name=".er.ActivityName">er.ActivityName</displayItem>
+	</displayItemList>
+	<format>
+			<gsf:template name="choose-title">
+				<gsf:choose-metadata>
+<!--
+<gsf:metadata name="er.ActivityName"/>
+-->
+					<gsf:metadata name="Source"/>
+					<gsf:default>Untitled</gsf:default>
+				</gsf:choose-metadata>
+			</gsf:template>
+		</format>
+	<search type="lucene">
+		<level name="document">
+			<displayItem lang="en" name="name">document</displayItem>
+		</level>
+		<defaultLevel name="document"/>
+		<index name="er.ActivityName">
+			<displayItem lang="en" name="name">Activity Name</displayItem>
+		</index>
+		<defaultIndex name="er.ActivityName"/>
+		<sort name="rank">
+			<displayItem lang="en" name="name">rank</displayItem>
+		</sort>
+		<sort name="none">
+			<displayItem lang="en" name="name">natural (build) order</displayItem>
+		</sort>
+		<searchType name="plain"/>
+		<searchType name="simpleform"/>
+		<searchType name="advancedform"/>
+		<format>
+			<gsf:template match="documentNode">
+<!--
+<td valign="top">
+      <gsf:link type="document">
+        <gsf:icon type="document"/>
+      </gsf:link>
+    </td>
+-->
+				<td valign="top">
+					<gsf:switch>
+						<gsf:metadata name="equivDocLink"/>
+						<gsf:when test="exists">
+							<gsf:metadata name="equivDocLink"/>
+							<gsf:metadata name="equivDocIcon"/>
+							<gsf:metadata name="/equivDocLink"/>
+						</gsf:when>
+					</gsf:switch>
+				</td>
+				<td valign="top">
+					<gsf:link type="source">
+						<gsf:choose-metadata>
+							<gsf:metadata name="thumbicon"/>
+							<gsf:metadata name="srcicon"/>
+						</gsf:choose-metadata>
+					</gsf:link>
+				</td>
+				<td><gsf:metadata name="er.Crate"/>:<gsf:metadata name="er.CrateName"/> &gt;<br/><gsf:link type="document"><!--
+<xsl:call-template name="choose-title"/>
+-->
+<gsf:metadata name="er.Activity"/>:<gsf:metadata name="er.ActivityName"/></gsf:link> (<gsf:metadata name="Source"/>)</td>
+			</gsf:template>
+		</format>
+	</search>
+	<infodb type="jdbm"/>
+	<import>
+		<pluginList>
+			<plugin name="ZIPPlugin"/>
+			<plugin name="GreenstoneXMLPlugin"/>
+			<plugin name="TextPlugin"/>
+			<plugin name="HTMLPlugin"/>
+			<plugin name="EmailPlugin"/>
+			<plugin name="PDFv2Plugin">
+				<option name="-convert_to" value="pretty_html"/>
+				<option name="-associate_ext" value="jpg"/>
+			</plugin>
+			<plugin name="RTFPlugin"/>
+			<plugin name="WordPlugin">
+				<option name="-windows_scripting"/>
+				<option name="-convert_to" value="auto"/>
+			</plugin>
+			<plugin name="PostScriptPlugin"/>
+			<plugin name="PowerPointPlugin"/>
+			<plugin name="ExcelPlugin"/>
+			<plugin name="ImagePlugin"/>
+			<plugin name="ISISPlugin"/>
+			<plugin name="NulPlugin"/>
+			<plugin name="OAIPlugin"/>
+			<plugin name="MetadataXMLPlugin"/>
+			<plugin name="ArchivesInfPlugin"/>
+			<plugin name="DirectoryPlugin"/>
+		</pluginList>
+	</import>
+	<browse>
+		<classifier name="Hierarchy">
+			<option name="-metadata" value="er.CrateHierarchy"/>
+			<option name="-sort" value="er.ActivityName"/>
+			<option name="-buttonname" value="Browse by crate"/>
+		</classifier>
+		<format>
+			<gsf:template match="documentNode">
+<!--
+<td valign="top">
+<gsf:link type="document">
+<gsf:icon type="document"/>
+</gsf:link>
+</td>
+-->
+				<gsf:switch>
+					<gsf:metadata name="equivDocLink"/>
+					<gsf:when test="exists">
+						<td valign="top">
+							<gsf:metadata name="equivDocLink"/>
+							<gsf:metadata name="equivDocIcon"/>
+							<gsf:metadata name="/equivDocLink"/>
+						</td>
+					</gsf:when>
+				</gsf:switch>
+				<td valign="top">
+					<gsf:link type="source">
+						<gsf:choose-metadata>
+							<gsf:metadata name="thumbicon"/>
+							<gsf:metadata name="srcicon"/>
+						</gsf:choose-metadata>
+					</gsf:link>
+				</td>
+				<td valign="top">
+					<gsf:link type="document">
+<!--
+Defined in the global format statement
+-->
+<!--
+<gsf:metadata name="er.Activity"/>:
+-->
+						<xsl:call-template name="choose-title"/>
+<!--
+<gsf:switch>
+<gsf:metadata name="Source"/>
+<gsf:when test="exists">
+<br/>
+<i>(
+<gsf:metadata name="Source"/>)
+</i>
+</gsf:when>
+</gsf:switch>
+-->
+					</gsf:link>
+				</td>
+			</gsf:template>
+			<gsf:template match="classifierNode[@classifierStyle = 'VList']">
+				<td valign="top">
+					<gsf:link style="static" type="classifier">
+						<gsf:icon type="classifier"/>
+					</gsf:link>
+				</td>
+				<td valign="top">
+					<gsf:link type="classifier">
+						<gsf:metadata name="Title"/>
+					</gsf:link>
+				</td>
+				<td valign="top">(<gsf:metadata name="numleafdocs"/>)</td>
+			</gsf:template>
+			<gsf:template match="classifierNode[@classifierStyle = 'HList']">
+				<gsf:link style="static" type="classifier">
+					<gsf:metadata name="Title"/>
+				</gsf:link>
+			</gsf:template>
+		</format>
+	</browse>
+	<display>
+		<format>
+			<gsf:option name="TOC" value="true"/>
+			<gsf:option name="AllowUserComments" value="false"/>
+<!--
+Overwriting this template allows you to change the heading of the document.
+-->
+<!--
+<gsf:template name="documentHeading">
+<span style="font-weight:bold; font-size: 120%;">
+<xsl:call-template name="choose-title"/>
+</span>
+</gsf:template>
+-->
+<!--
+Overwriting this template can be used to redefine the content of the whole document. This is useful for simple documents, but not recommended for more complex documents (e.g. hierachical and paged documents) as it can prevent any sub-sections from showing.
+-->
+<!--
+<gsf:template name="documentContent">
+<div id="gs-document">
+<xsl:call-template name="documentPre"/>
+<xsl:call-template name="wrappedSectionImage"/>
+<div id="gs-document-text">
+<xsl:call-template name="documentNodeText"/>
+</div>
+</div>
+</gsf:template>
+-->
+<!--
+Overwriting this template can be used to change the content of section headings.
+-->
+<!--
+<gsf:template name="sectionHeading">
+<xsl:call-template name="choose-title"/>
+</gsf:template>
+-->
+<!--
+Overwriting this template can be used to change the content of the top-level section.
+-->
+<!--
+<gsf:template name="topLevelSectionContent">
+<xsl:call-template name="wrappedSectionImage"/>
+<xsl:call-template name="wrappedSectionText"/>
+</gsf:template>
+-->
+<!--
+Overwriting this template can be used to change the content of sections.
+-->
+<!--
+<gsf:template name="sectionContent">
+<xsl:call-template name="wrappedSectionImage"/>
+<xsl:call-template name="wrappedSectionText"/>
+</gsf:template>
+-->
+		</format>
+	</display>
+	<replaceListRef id="gs2-standard"/>
+	<replaceListRef id="gs2-image"/>
+	<serviceRackList><!-- comment out the following serviceRack if you want to disable RSS for this collection -->
+		<serviceRack name="RSSRetrieve"/><!-- comment out the following serviceRack if you want to disable OAI for this collection -->
+		<serviceRack name="OAIPMH">
+			<setName>science1</setName>
+			<setDescription/><!-- uncomment the following and set the name attribute if 
+		       you want this collection to be part of a super set. --><!--<oaiSuperSet name="xxx"/>-->
+			<ListMetadataFormats><!--What metadata sets to support for this collection. You can select any set that is specified in OAIConfig.xml. To use a new set, you need to add a set definition in OAIConfig.xml, then reference it here, like:
+				   <metadataFormat metadataPrefix="prefix"/> -->
+				<metadataFormat metadataPrefix="oai_dc"><!-- you can customize the mappings by adding elements in here. See resources/oai/OAIConfig.xml for the format--></metadataFormat>
+			</ListMetadataFormats>
+		</serviceRack>
+	</serviceRackList>
+</CollectionConfig>
Index: /main/trunk/model-sites-dev/waikato-edu/TC4.12_Math Resources_Activities/maths-activities/gli.col
===================================================================
--- /main/trunk/model-sites-dev/waikato-edu/TC4.12_Math Resources_Activities/maths-activities/gli.col	(revision 33691)
+++ /main/trunk/model-sites-dev/waikato-edu/TC4.12_Math Resources_Activities/maths-activities/gli.col	(revision 33691)
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE GathererCollection [<!ELEMENT GathererCollection (Argument*,GathererConfig,BuildConfig)>
+<!ELEMENT GathererConfig (Arguments*)>
+<!ELEMENT BuildConfig (Build,Import)>
+<!ELEMENT Build (Arguments*)>
+<!ELEMENT Import (Arguments*)>
+<!ELEMENT Schedule (Arguments*)>
+<!ELEMENT Argument (#PCDATA)>
+<!ATTLIST Argument name CDATA #REQUIRED>
+<!ATTLIST Argument enabled CDATA 'true'>
+]>
+<GathererCollection>
+	<Argument name="built">false</Argument>
+	<Argument name="imported">true</Argument>
+	<Argument name="skimfile">true</Argument>
+	<GathererConfig/>
+	<BuildConfig>
+		<Build/>
+		<Import/>
+		<Schedule/>
+	</BuildConfig>
+	<Argument name="base_collection">C:\Users\Anupama\GS309\web\sites\localsite\collect\scienceags3coll</Argument>
+</GathererCollection>
Index: /main/trunk/model-sites-dev/waikato-edu/TC4.12_Math Resources_Activities/maths-activities/import/metadata.xml
===================================================================
--- /main/trunk/model-sites-dev/waikato-edu/TC4.12_Math Resources_Activities/maths-activities/import/metadata.xml	(revision 33691)
+++ /main/trunk/model-sites-dev/waikato-edu/TC4.12_Math Resources_Activities/maths-activities/import/metadata.xml	(revision 33691)
@@ -0,0 +1,46 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE DirectoryMetadata SYSTEM "http://greenstone.org/dtd/DirectoryMetadata/1.0/DirectoryMetadata.dtd">
+<DirectoryMetadata>
+
+    <!-- 
+	 Two examples of the syntax to use to attach metadata to files in a
+         given directory within the 'import' area.
+
+         Copy this file to the folder where the files or interest are, and
+	 then uncomment (or copy and paste) the <FileSet> block and
+	 edit to suit the file name(s) and metadata values required
+    -->
+
+
+    <!-- 
+	 Example 1:
+	   Attached dc.Title and dc.Subject (x 2) to a single, named file
+    -->
+
+<!--
+    <FileSet>
+        <FileName>sample-file1\.txt</FileName>
+        <Description>
+            <Metadata name="dc.Title">Sample Title</Metadata>
+            <Metadata name="dc.Subject">Subject A</Metadata>
+            <Metadata mode="accumulate" name="dc.Subject">Subject B</Metadata>
+        </Description>
+    </FileSet>
+-->
+
+    <!-- 
+	 Example 2:
+	   Attached dc.Subject to all files in this folder that match the given
+	   regular expression 
+    -->
+
+<!--
+    <FileSet>
+        <FileName>.*</FileName>
+        <Description>
+            <Metadata mode="accumulate" name="dc.Subject">Subject X</Metadata>
+        </Description>
+    </FileSet>
+-->
+
+</DirectoryMetadata>
Index: /main/trunk/model-sites-dev/waikato-edu/TC4.12_Math Resources_Activities/maths-activities/metadata/educationresources.mds
===================================================================
--- /main/trunk/model-sites-dev/waikato-edu/TC4.12_Math Resources_Activities/maths-activities/metadata/educationresources.mds	(revision 33691)
+++ /main/trunk/model-sites-dev/waikato-edu/TC4.12_Math Resources_Activities/maths-activities/metadata/educationresources.mds	(revision 33691)
@@ -0,0 +1,76 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE MetadataSet SYSTEM "http://www.greenstone.org/dtd/MetadataSet/1.0/MetadataSet.dtd">
+<MetadataSet contact="" creator="" family="" lastchanged="" namespace="er">
+	<SetLanguage code="en">
+		<Name>Education Resources</Name>
+		<Description>Education Resources Metadata Set</Description>
+	</SetLanguage>
+	
+	
+	
+	
+
+	<Element name="Crate">
+		<Language code="en">
+			<Attribute name="label">Crate</Attribute>
+			<Attribute name="definition"/>
+			<Attribute name="comment"/>
+		</Language>
+	</Element>
+	<Element name="CrateName">
+		<Language code="en">
+			<Attribute name="label">CrateName</Attribute>
+			<Attribute name="definition"/>
+			<Attribute name="comment"/>
+		</Language>
+	</Element>
+	<Element name="Activity">
+		<Language code="en">
+			<Attribute name="label">Activity</Attribute>
+			<Attribute name="definition"/>
+			<Attribute name="comment"/>
+		</Language>
+	</Element>
+	<Element name="ActivityName">
+		<Language code="en">
+			<Attribute name="label">ActivityName</Attribute>
+			<Attribute name="definition"/>
+			<Attribute name="comment"/>
+		</Language>
+	</Element>
+	<Element name="Copyright">
+		<Language code="en">
+			<Attribute name="label">Copyright</Attribute>
+			<Attribute name="definition"/>
+			<Attribute name="comment"/>
+		</Language>
+	</Element>
+	<Element name="Location">
+		<Language code="en">
+			<Attribute name="label">Location</Attribute>
+			<Attribute name="definition"/>
+			<Attribute name="comment"/>
+		</Language>
+	</Element>
+	<Element name="Notes">
+		<Language code="en">
+			<Attribute name="label">Notes</Attribute>
+			<Attribute name="definition"/>
+			<Attribute name="comment"/>
+		</Language>
+	</Element>
+	<Element name="CrateHierarchy">
+		<Language code="en">
+			<Attribute name="label">CrateHierarchy</Attribute>
+			<Attribute name="definition"/>
+			<Attribute name="comment"/>
+		</Language>
+	</Element>
+	<Element name="Tag">
+		<Language code="en">
+			<Attribute name="label">Tag</Attribute>
+			<Attribute name="definition"/>
+			<Attribute name="comment"/>
+		</Language>
+	</Element>
+</MetadataSet>
Index: /main/trunk/model-sites-dev/waikato-edu/TC4.12_Math Resources_Activities/maths-activities/metadata/ex.mds
===================================================================
--- /main/trunk/model-sites-dev/waikato-edu/TC4.12_Math Resources_Activities/maths-activities/metadata/ex.mds	(revision 33691)
+++ /main/trunk/model-sites-dev/waikato-edu/TC4.12_Math Resources_Activities/maths-activities/metadata/ex.mds	(revision 33691)
@@ -0,0 +1,496 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE MetadataSet SYSTEM "http://www.greenstone.org/dtd/MetadataSet/1.0/MetadataSet.dtd">
+<MetadataSet contact="nzdl.org" creator="New Zealand Digital Libraries Project: Greenstone" family="Extracted Greenstone" lastchanged="Tue Sep 05 14:40:36 NZST 2006 - kjdon on kanuka" namespace="ex">
+    <SetLanguage code="en">
+        <Name>Extracted Greenstone Metadata 1.1</Name>
+        <Description>This document is the reference description, version 1.1 of the automatically extracted Greenstone Metadata Element Set. Most of the possible extracted metadata elements have been added.</Description>
+    </SetLanguage>
+    <SetLanguage code="vi">
+        <Name>Bá» siÃªu dá»¯ liá»u Greenstone</Name>
+        <Description>MÃŽ táº£ vá» bá» siÃªu dá»¯ liá»u Greenstone phiÃªn báº£n 1.1 cho yáº¿u tá» siÃªu dá»¯ liá»u Greenstone ÄÆ°á»£c triáº¿t rÃºt tá»± Äá»ng</Description>
+    </SetLanguage>
+    <SetLanguage code="ar">
+    	<Name language="ar">ÙØ§ØµÙØ§Øª ØšÙØ§ÙØ§Øª Greenstone Ø§ÙÙ
+Ø³ØªØ®Ø±Ø¬Ø© 1.0</Name>
+    	<Description language="ar">ÙØ§ØµÙØ§Øª ØšÙØ§ÙØ§Øª ÙØ±ÙÙØ³ØªÙÙ</Description>
+       </SetLanguage>
+
+    <Element name="Title">
+        <Language code="en">
+            <Attribute name="comment">Not always available.</Attribute>
+            <Attribute name="definition">The title of the imported document as extracted by Greenstone.</Attribute>
+            <Attribute name="label">Title</Attribute>
+        </Language>
+        <Language code="vi">
+            <Attribute name="label">Nhan Äá»</Attribute>
+            <Attribute name="definition">Nhan Äá» cá»§a tÃ i liá»u nháº­p kháº©u vÃ o Há» thá»ng vÃ  ÄÆ°á»£c Greenstone triáº¿t rÃºt tá»± Äá»ng</Attribute>
+            <Attribute name="comment">KhÃŽng pháº£i lÃºc nÃ o cÅ©ng sáºµn cÃ³</Attribute>
+        </Language>
+        <Language code="ar">
+             <Attribute name="label">Ø§ÙØ¹ÙÙØ§Ù</Attribute>
+             <Attribute name="definition">Ø§ÙØ¹ÙÙØ§Ù</Attribute>
+              <Attribute name="comment">ØºÙØ± Ù
+ØªÙÙØ± Ø¯Ø§ØŠÙ
+Ø§.</Attribute>
+        </Language>
+
+    </Element>
+    <Element name="Encoding">
+        <Language code="en">
+            <Attribute name="comment">Not always available.</Attribute>
+            <Attribute name="definition">The encoding of the imported document as extracted by Greenstone.</Attribute>
+            <Attribute name="label">Encoding</Attribute>
+        </Language>
+        <Language code="vi">
+            <Attribute name="label">Bá» mÃ£ kÃœ tá»±</Attribute>
+            <Attribute name="definition">ThÃŽng tin bá» mÃ£ kÃœ tá»± cá»§a tÃ i liá»u ÄÆ°á»£c nháº­p kháº©u mÃ  Greenstone tá»± Äá»ng triáº¿t rut ÄÆ°á»£c</Attribute>
+            <Attribute name="comment">KhÃŽng pháº£i lÃºc nÃ o cÅ©ng cÃ³ sáºµn</Attribute>
+        </Language>
+        <Language code="ar">
+            <Attribute name="label">Ø§ÙØªØŽÙÙØ±</Attribute>
+            <Attribute name="definition">Ø§ÙØªØŽÙÙØ±</Attribute>
+            <Attribute name="comment">ØºÙØ± Ù
+ØªÙÙØ± Ø¯Ø§ØŠÙ
+Ø§.</Attribute>
+    </Language>
+
+    </Element>
+    <Element name="Language">
+        <Language code="en">
+            <Attribute name="comment">Not always available.</Attribute>
+            <Attribute name="definition">The language of the imported document as extracted by Greenstone.</Attribute>
+            <Attribute name="label">Language</Attribute>
+        </Language>
+        <Language code="vi">
+            <Attribute name="label">NgÃŽn ngá»¯</Attribute>
+            <Attribute name="definition">TÃªn ngÃŽn ngá»¯ cá»§a tÃ i liá»u mÃ  Greenstone tá»± Äá»ng triáº¿t rÃºt ÄÆ°á»£c.</Attribute>
+            <Attribute name="comment">KhÃŽng pháº£i lÃºc nÃ o cÅ©ng cÃ³ sáºµn</Attribute>
+        </Language>
+        <Language code="ar">
+            <Attribute name="label">Ø§ÙÙØºØ©</Attribute>
+            <Attribute name="definition">Ø§ÙÙØºØ©</Attribute>
+            <Attribute name="comment">ØºÙØ± Ù
+ØªÙÙØ± Ø¯Ø§ØŠÙ
+Ø§.</Attribute>
+        </Language>
+
+    </Element>
+    <Element name="Source">
+        <Language code="en">
+            <Attribute name="comment"/>
+            <Attribute name="definition">The filename of the document imported by Greenstone, suitable for display.</Attribute>
+            <Attribute name="label">Source</Attribute>
+        </Language>
+        <Language code="vi">
+            <Attribute name="label">TÃªn tá»p tin</Attribute>
+            <Attribute name="definition">TÃªn tá»p tin cá»§Ã¢tÃ¬ liá»u ÄÆ°á»£c Greenstone nháº­p kháº©u vÃ o há» thá»ng.</Attribute>
+            <Attribute name="comment">áºšn Äá»i vá»i GLI bá»i ÄÃ£ ÄÆ°á»£c hiá»n thá» trong cÃ¢y thÆ° má»¥c</Attribute>
+        </Language>
+        <Language code="ar">
+            <Attribute name="label">Ø§Ø³Ù
+Ø§Ø¡ Ø§ÙÙ
+ÙÙØ§Øª</Attribute>
+            <Attribute name="definition"></Attribute>
+            <Attribute name="comment">ØºÙØ± Ù
+ØªÙÙØ± Ø¯Ø§ØŠÙ
+Ø§.</Attribute>
+        </Language>
+
+    </Element>
+    <Element name="SourceFile">
+        <Language code="en">
+            <Attribute name="label">SourceFile</Attribute>
+            <Attribute name="definition">The file the metadata has been extracted from</Attribute>
+            <Attribute name="comment"/>
+        </Language>
+    </Element>
+    <Element name="FileSize">
+        <Language code="en">
+            <Attribute name="label">FileSize</Attribute>
+            <Attribute name="definition">The size of the source file in bytes</Attribute>
+            <Attribute name="comment"/>
+        </Language>
+    </Element>
+    <Element name="FileFormat">
+        <Language code="en">
+            <Attribute name="label">FileFormat</Attribute>
+            <Attribute name="definition">The format of the source file</Attribute>
+            <Attribute name="comment"/>
+        </Language>
+    </Element>
+    <Element name="MimeType">
+        <Language code="en">
+            <Attribute name="label">MimeType</Attribute>
+            <Attribute name="definition">The MIME type of the source file</Attribute>
+            <Attribute name="comment"/>
+        </Language>
+    </Element>
+    <Element name="Identifier">
+        <Language code="en">
+            <Attribute name="label">Identifier</Attribute>
+            <Attribute name="definition">Identifier assigned by Greenstone</Attribute>
+            <Attribute name="comment"/>
+        </Language>
+        <Language code="ab">
+            <Attribute name="label"/>
+            <Attribute name="definition"/>
+            <Attribute name="comment"/>
+        </Language>
+    </Element>
+    <Element name="Plugin">
+        <Language code="en">
+            <Attribute name="label">Plugin</Attribute>
+            <Attribute name="definition">The Greenstone plugin used to extract metadata</Attribute>
+            <Attribute name="comment"/>
+        </Language>
+    </Element>
+    <Element name="URL">
+        <Language code="en">
+            <Attribute name="label">URL</Attribute>
+            <Attribute name="definition">The URL the source file was retrieved from</Attribute>
+            <Attribute name="comment"/>
+        </Language>
+    </Element>
+    <Element name="assocfilepath">
+        <Language code="en">
+            <Attribute name="label">assocfilepath</Attribute>
+            <Attribute name="definition">The filepath of any associated files</Attribute>
+            <Attribute name="comment"/>
+        </Language>
+    </Element>
+    <Element name="lastmodified">
+        <Language code="en">
+            <Attribute name="label">lastmodified</Attribute>
+            <Attribute name="definition">The date of the last modification of the source file</Attribute>
+            <Attribute name="comment"/>
+        </Language>
+    </Element>
+    <Element name="hascover">
+        <Language code="en">
+            <Attribute name="label">hascover</Attribute>
+            <Attribute name="definition">Whether or not a cover has been defined for the source file</Attribute>
+            <Attribute name="comment"/>
+        </Language>
+    </Element>
+    <Element name="NoText">
+        <Language code="en">
+            <Attribute name="label">NoText</Attribute>
+            <Attribute name="definition">True if the source file has no text</Attribute>
+            <Attribute name="comment"/>
+        </Language>
+    </Element>
+    <Element name="Date">
+        <Language code="en">
+            <Attribute name="label">Date</Attribute>
+            <Attribute name="definition">The date of the source file</Attribute>
+            <Attribute name="comment"/>
+        </Language>
+    </Element>
+    <Element name="Image">
+        <Language code="en">
+            <Attribute name="label">Image</Attribute>
+            <Attribute name="definition">Image</Attribute>
+            <Attribute name="comment"/>
+        </Language>
+    </Element>
+    <Element name="ImageType">
+        <Language code="en">
+            <Attribute name="label">ImageType</Attribute>
+            <Attribute name="definition">The type of the image</Attribute>
+            <Attribute name="comment"/>
+        </Language>
+    </Element>
+    <Element name="ImageSize">
+        <Language code="en">
+            <Attribute name="label">ImageSize</Attribute>
+            <Attribute name="definition">The size of the image in bytes</Attribute>
+            <Attribute name="comment"/>
+        </Language>
+    </Element>
+    <Element name="ImageHeight">
+        <Language code="en">
+            <Attribute name="label">ImageHeight</Attribute>
+            <Attribute name="definition">The height of the image in pixels</Attribute>
+            <Attribute name="comment"/>
+        </Language>
+    </Element>
+    <Element name="ImageWidth">
+        <Language code="en">
+            <Attribute name="label">ImageWidth</Attribute>
+            <Attribute name="definition">The width of the image in pixels</Attribute>
+            <Attribute name="comment"/>
+        </Language>
+    </Element>
+    <Element name="Thumb">
+        <Language code="en">
+            <Attribute name="label">Thumb</Attribute>
+            <Attribute name="definition">Thumbnail image</Attribute>
+            <Attribute name="comment"/>
+        </Language>
+    </Element>
+    <Element name="ThumbType">
+        <Language code="en">
+            <Attribute name="label">ThumbType</Attribute>
+            <Attribute name="definition">The file type of the thumbnail image</Attribute>
+            <Attribute name="comment"/>
+        </Language>
+    </Element>
+    <Element name="ThumbWidth">
+        <Language code="en">
+            <Attribute name="label">ThumbWidth</Attribute>
+            <Attribute name="definition">The width of the thumbnail image in pixels</Attribute>
+            <Attribute name="comment"/>
+        </Language>
+    </Element>
+    <Element name="ThumbHeight">
+        <Language code="en">
+            <Attribute name="label">ThumbHeight</Attribute>
+            <Attribute name="definition">The height of the thumbnail image in pixels</Attribute>
+            <Attribute name="comment"/>
+        </Language>
+    </Element>
+    <Element name="Screen">
+        <Language code="en">
+            <Attribute name="label">Screen</Attribute>
+            <Attribute name="definition">Screen</Attribute>
+            <Attribute name="comment"/>
+        </Language>
+    </Element>
+    <Element name="ScreenType">
+        <Language code="en">
+            <Attribute name="label">ScreenType</Attribute>
+            <Attribute name="definition">The type of the screen</Attribute>
+            <Attribute name="comment"/>
+        </Language>
+    </Element>
+    <Element name="ScreenWidth">
+        <Language code="en">
+            <Attribute name="label">ScreenWidth</Attribute>
+            <Attribute name="definition">The width of the screen in pixels</Attribute>
+            <Attribute name="comment"/>
+        </Language>
+    </Element>
+    <Element name="ScreenHeight">
+        <Language code="en">
+            <Attribute name="label">ScreenHeight</Attribute>
+            <Attribute name="definition">The height of the screen in pixels</Attribute>
+            <Attribute name="comment"/>
+        </Language>
+    </Element>
+    <Element name="SourceSegment">
+        <Language code="en">
+            <Attribute name="label">SourceSegment</Attribute>
+            <Attribute name="definition">Source segment</Attribute>
+            <Attribute name="comment"/>
+        </Language>
+    </Element>
+    <Element name="NumPages">
+        <Language code="en">
+            <Attribute name="label">NumPages</Attribute>
+            <Attribute name="definition">Number of pages</Attribute>
+            <Attribute name="comment"/>
+        </Language>
+    </Element>
+    <Element name="HTMLDisplay">
+        <Language code="en">
+            <Attribute name="label">HTMLDisplay</Attribute>
+            <Attribute name="definition">from procite plugin</Attribute>
+            <Attribute name="comment"/>
+        </Language>
+    </Element>
+    <Element name="RecordNumber">
+        <Language code="en">
+            <Attribute name="label">RecordNumber</Attribute>
+            <Attribute name="definition">from procite plugin</Attribute>
+            <Attribute name="comment"/>
+        </Language>
+    </Element>
+    <Element name="Workform">
+        <Language code="en">
+            <Attribute name="label">Workform</Attribute>
+            <Attribute name="definition">from procite plugin</Attribute>
+            <Attribute name="comment"/>
+        </Language>
+    </Element>
+    <Element name="Pages">
+        <Language code="en">
+            <Attribute name="label">Pages</Attribute>
+            <Attribute name="definition">Pages</Attribute>
+            <Attribute name="comment"/>
+        </Language>
+    </Element>
+    <Element name="PageNum">
+        <Language code="en">
+            <Attribute name="label">PageNum</Attribute>
+            <Attribute name="definition">Number of pages</Attribute>
+            <Attribute name="comment"/>
+        </Language>
+    </Element>
+    <Element name="GENERATOR">
+        <Language code="en">
+            <Attribute name="label">GENERATOR</Attribute>
+            <Attribute name="definition">GENERATOR</Attribute>
+            <Attribute name="comment"/>
+        </Language>
+    </Element>
+    <Element name="ISISRawRecord">
+        <Language code="en">
+            <Attribute name="label">ISISRawRecord</Attribute>
+            <Attribute name="definition">ISISRawRecord</Attribute>
+            <Attribute name="comment"/>
+        </Language>
+    </Element>
+    <Element name="Creator">
+        <Language code="en">
+            <Attribute name="label">Creator</Attribute>
+            <Attribute name="definition">The Creator of a record, as extracted by Latex, Bibtex, and Refer plugins. Contains a concatenated set of all Authors.</Attribute>
+            <Attribute name="comment">Not always available.</Attribute>
+        </Language>
+    </Element>
+    <Element name="Author">
+        <Language code="en">
+            <Attribute name="label">Author</Attribute>
+            <Attribute name="definition">The Author of a record, as extracted byLatex, Bibtex, and Refer plugins. Each Author specified individually.</Attribute>
+            <Attribute name="comment">Not always available.</Attribute>
+        </Language>
+        <Language code="ar">
+            <Attribute name="label">Ø§ÙÙ
+Ø€ÙÙ ØŽØ®Øµ</Attribute>
+            <Attribute name="definition">Ø§ÙÙ
+Ø€ÙÙ ØŽØ®Øµ</Attribute>
+            <Attribute name="comment">ØºÙØ± Ù
+ØªÙÙØ± Ø¯Ø§ØŠÙ
+Ø§.</Attribute>
+        </Language>
+    </Element>
+    <Element name="Placename">
+        <Language code="en">
+            <Attribute name="label">Placename</Attribute>
+            <Attribute name="definition">from gis plugin</Attribute>
+            <Attribute name="comment"/>
+        </Language>
+    </Element>
+    <Element name="Headers">
+        <Language code="en">
+            <Attribute name="label">Headers</Attribute>
+            <Attribute name="definition">from email plugin</Attribute>
+            <Attribute name="comment"/>
+        </Language>
+    </Element>
+    <Element name="InReplyTo">
+        <Language code="en">
+            <Attribute name="label">InReplyTo</Attribute>
+            <Attribute name="definition">from email plugin</Attribute>
+            <Attribute name="comment"/>
+        </Language>
+    </Element>
+    <Element name="FromName">
+        <Language code="en">
+            <Attribute name="label">FromName</Attribute>
+            <Attribute name="definition">from email plugin</Attribute>
+            <Attribute name="comment"/>
+        </Language>
+    </Element>
+    <Element name="FromAddr">
+        <Language code="en">
+            <Attribute name="label">FromAddr</Attribute>
+            <Attribute name="definition">from email plugin</Attribute>
+            <Attribute name="comment"/>
+        </Language>
+    </Element>
+    <Element name="EmailAddress">
+        <Language code="en">
+            <Attribute name="label">EmailAddress</Attribute>
+            <Attribute name="definition">Email address</Attribute>
+            <Attribute name="comment"/>
+        </Language>
+    </Element>
+    <Element name="EntryType">
+        <Language code="en">
+            <Attribute name="label">EntryType</Attribute>
+            <Attribute name="definition">from bibtex plugin</Attribute>
+            <Attribute name="comment"/>
+        </Language>
+    </Element>
+    <Element name="Keyword">
+        <Language code="en">
+            <Attribute name="label">Keyword</Attribute>
+            <Attribute name="definition">Keywords for a record, as extracted by Bibtex and Refer plugins.</Attribute>
+            <Attribute name="comment">Not always available.</Attribute>
+        </Language>
+        <Language code="ar">
+            <Attribute name="label">Ø§ÙÙÙÙ
+Ø§Øª Ø§ÙÙ
+ÙØªØ§Ø­ÙØ©</Attribute>
+            <Attribute name="definition">Ø§ÙÙÙÙ
+Ø§Øª Ø§ÙÙ
+ÙØªØ§Ø­ÙØ©</Attribute>
+            <Attribute name="comment">ØºÙØ± Ù
+ØªÙÙØ± Ø¯Ø§ØŠÙ
+Ø§.</Attribute>
+        </Language>
+    </Element>
+    <Element name="BookConfOnly">
+        <Language code="en">
+            <Attribute name="label">BookConfOnly</Attribute>
+            <Attribute name="definition">from bibtex, refer plugin</Attribute>
+            <Attribute name="comment"/>
+        </Language>
+    </Element>
+    <Element name="JournalsOnly">
+        <Language code="en">
+            <Attribute name="label">JournalsOnly</Attribute>
+            <Attribute name="definition">from bibtex, refer plugin</Attribute>
+            <Attribute name="comment"/>
+        </Language>
+    </Element>
+    <Element name="equivlink">
+        <Language code="en">
+            <Attribute name="label">equivlink</Attribute>
+            <Attribute name="definition">equivlink</Attribute>
+            <Attribute name="comment"/>
+        </Language>
+    </Element>
+    <Element name="Acronym">
+        <Language code="en">
+            <Attribute name="label">Acronym</Attribute>
+            <Attribute name="definition">Acronym</Attribute>
+            <Attribute name="comment"/>
+        </Language>
+    </Element>
+    <Element name="mp3applet">
+        <Language code="en">
+            <Attribute name="label">mp3applet</Attribute>
+            <Attribute name="definition">from mp3 plugin</Attribute>
+            <Attribute name="comment"/>
+        </Language>
+    </Element>
+    <Element name="giquery">
+        <Language code="en">
+            <Attribute name="label">giquery</Attribute>
+            <Attribute name="definition">from mp3 plugin</Attribute>
+            <Attribute name="comment"/>
+        </Language>
+    </Element>
+    <Element name="srcurl">
+        <Language code="en">
+            <Attribute name="label">srcurl</Attribute>
+            <Attribute name="definition">from mp3 plugin</Attribute>
+            <Attribute name="comment"/>
+        </Language>
+    </Element>
+    <Element name="Keyphrase">
+        <Language code="en">
+            <Attribute name="label">Keyphrase</Attribute>
+            <Attribute name="definition">Keyphrase</Attribute>
+            <Attribute name="comment"/>
+        </Language>
+    </Element>
+    <Element name="Keyphrases">
+        <Language code="en">
+            <Attribute name="label">Keyphrases</Attribute>
+            <Attribute name="definition">Keyphrases</Attribute>
+            <Attribute name="comment"/>
+        </Language>
+    </Element>
+</MetadataSet>
Index: /main/trunk/model-sites-dev/waikato-edu/TC4.12_Math Resources_Activities/maths-activities/metadata/greenstone.mds
===================================================================
--- /main/trunk/model-sites-dev/waikato-edu/TC4.12_Math Resources_Activities/maths-activities/metadata/greenstone.mds	(revision 33691)
+++ /main/trunk/model-sites-dev/waikato-edu/TC4.12_Math Resources_Activities/maths-activities/metadata/greenstone.mds	(revision 33691)
@@ -0,0 +1,50 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE MetadataSet SYSTEM "http://www.greenstone.org/dtd/MetadataSet/1.0/MetadataSet.dtd">
+<MetadataSet contact="" creator="" family="" lastchanged="Tue Sep 05 14:40:36 NZST 2006 - kjdon on kanuka" namespace="gs">
+  <SetLanguage code="en">
+    <Name>Greenstone metadata set</Name>
+    <Description>Some special elements particular to Greenstone.</Description>
+  </SetLanguage>
+  <SetLanguage code="vi">
+    <Name>Bá» siÃªu dá»¯ liá»u riÃªng cá»§a Greenstone</Name>
+    <Description>Má»t sá» yáº¿u tá» riÃªng biá»t cho Greenstone.</Description>
+  </SetLanguage>
+  <Element name="DocumentHeader">
+    <Language code="en">
+      <Attribute name="label">Document Header</Attribute>
+      <Attribute name="definition">Headers that will be added to document display. For example, use this to include stylesheets in the document display. The content should be escaped HTML.</Attribute>
+      <Attribute name="comment">The _document:documentheader_ macro will be set to the value of this metadata.</Attribute>
+    </Language>
+    <Language code="vi">
+      <Attribute name="label">TiÃªu Äá» tÃ i liá»u</Attribute>
+      <Attribute name="definition">TiÃªu Äá» ÄÆ°á»£c bá» sung vÃ o pháº§n hiá»n thá» cá»§a tÃ i liá»u. ThÃ­ dá»¥, sá»­ dá»¥ng Äiá»u nÃ y Äá» ÄÆ°a stylesheets vÃ o trong viá»c hiá»n thá» tÃ i liá»u. Ná»i dung cáº§n lÃ  escaped HTML.</Attribute>
+      <Attribute name="comment">Macro  _document:documentheader_ sáºœ ÄÆ°á»£c thiáº¿t láº­p cho giÃ¡ trá» cá»§a siÃªu dá»¯ liá»u nÃ y</Attribute>
+    </Language>
+  </Element>
+  <Element name="OAIDateStamp">
+    <Language code="en">
+      <Attribute name="label">OAI DateStamp</Attribute>
+      <Attribute name="definition">The datestamp of the document to be used by the OAI server. Format must be YYYY-MM-DD. If not defined, oailastmodified will be used instead.</Attribute>
+    </Language>
+  </Element>
+  <Element name="OAIResourceURL">
+    <Language code="en">
+      <Attribute name="label">OAI Resource URL</Attribute>
+      <Attribute name="definition">The URL for the document to be used for dc:identifier. If not defined, a URL to the file defined by srclinkFile metadata will be used instead. If no srclinkFile either, then a URL to the Greenstone version of the document will be used.</Attribute>
+    </Language>
+  </Element>
+  <Element name="allowPrinting">
+    <Language code="en">
+      <Attribute name="label">Allow Printing</Attribute>
+      <Attribute name="definition">Controls whether or not a particular document can be printed from within the Realistic Books software.  Defaults to 'true' (i.e allow printing); set to 'false' to prevent this.</Attribute>
+    </Language>
+  </Element>
+  <Element name="filenameEncoding" accumulating="false">
+    <Language code="en">
+      <Attribute name="label">Filename Encoding</Attribute>
+      <Attribute name="definition">The encoding of the filename. If this is known, it can be manually set here.</Attribute>
+      <Attribute name="comment">If not manually specified, Greenstone will try to guess the encoding of the filename upon building, which may or may not be correct.</Attribute>
+    </Language>
+  </Element>
+  
+</MetadataSet>
Index: /main/trunk/model-sites-dev/waikato-edu/TC4.12_Math Resources_Activities/maths-activities/metadata/profile.xml
===================================================================
--- /main/trunk/model-sites-dev/waikato-edu/TC4.12_Math Resources_Activities/maths-activities/metadata/profile.xml	(revision 33691)
+++ /main/trunk/model-sites-dev/waikato-edu/TC4.12_Math Resources_Activities/maths-activities/metadata/profile.xml	(revision 33691)
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE Profiles [<!ELEMENT Profiles (Action*)>
+<!ELEMENT Action (#PCDATA)>
+<!ATTLIST Action source CDATA #REQUIRED>
+<!ATTLIST Action target CDATA ''>
+]>
+<Profiles/>
Index: in/trunk/model-sites-dev/waikato-edu/TC4.12_Math Resources_Activities/procMath.bat
===================================================================
--- /main/trunk/model-sites-dev/waikato-edu/TC4.12_Math Resources_Activities/procMath.bat	(revision 33690)
+++ 	(revision )
@@ -1,127 +1,0 @@
-@ECHO OFF
-SETLOCAL enabledelayedexpansion
-
-:: THIS SCRIPT FILE NEEDS TO BE IN ASCII FOR THE CHARACTER REPLACEMENTS TO WORK
-:: If working with utf8 chars to be replaced, set this script file to be in utf-8 and change the codepage, see
-:: https://stackoverflow.com/questions/5273937/how-to-replace-substrings-in-windows-batch-file
-::chcp 65001
-
-set origdir=%CD%
-
-set odir=..\import
-if exist %odir% rmdir /S /Q "%odir%"
-
-if not exist %odir% mkdir %odir%
-pushd %odir%
-set odir=%CD%
-popd
-
-echo ORIG DIR: !origdir!
-echo OUTPUT DIR: !odir!
-call :procDir
-
-:procDir
-if not [%1]==[] (	
-	set dirname=%1
-	rem echo Dirname: !dirname!
-	set dirname=!dirname:"=!
-	rem echo Dirname 2: !dirname!
-) else (
-	set dirname=
-	rem echo empty dir
-)
-::if not [%dirname%]==[] (set dirname=!dirname:"=!) else (set dirname=)
-
-::echo Dirname is %dirname%
-
-
-:: Recurse through current directory, writing out the metadata.xml file
-:: https://ss64.com/nt/for_r.html - Recurse through subfolders
-:: https://ss64.com/nt/syntax-args.html use of parameters
-:: https://ss64.com/nt/syntax-substring.html
-:: https://stackoverflow.com/questions/2772456/string-replacement-in-batch-file/2772498
-for /r . %%G in (.,*.pdf,*.jpg) do (
-	set fullpath=%%~fG
-
-	rem Remove the prefix path of the starting directory denoted by var origdir
-	rem to get the relative path
-	set relpath=%%~fG
-	set foldername=%%~nG
-
-
-	rem If dealing with directory, create a folder by the same name inside the output directory
-	rem and write out a metadata.xml file there
-	IF EXIST %%G\NUL (
-	
-		if "!relpath!" == "!origdir!" (
-			set relpath=
-			set metapath="!odir!\metadata.xml"
-		) else (	
-			CALL SET relpath=!!relpath:%origdir%\=!!
-			set metapath="!odir!\!relpath!\metadata.xml"
-		)
-		echo RELPATH: !relpath!
-		rem echo OUTPUT DIR: "!odir!\!relpath!"
-		echo METAPATH: !metapath!
-	
-		if not exist "!odir!\!relpath!" mkdir "!odir!\!relpath!"
-		
-		echo ^<?xml version="1.0" encoding="UTF-8"?^> > !metapath!
-		echo ^<^^!DOCTYPE DirectoryMetadata SYSTEM "http://greenstone.org/dtd/DirectoryMetadata/1.0/DirectoryMetadata.dtd"^> >> !metapath!
-		echo ^<DirectoryMetadata^> >> !metapath!
-		echo 	^<FileSet^> >> !metapath!
-		echo 		^<FileName^>.*^</FileName^> >> !metapath!
-		echo 		^<Description^> >> !metapath!
-		echo				^<Metadata mode="accumulate" name="er.Crate"^>!foldername!^</Metadata^> >> !metapath!
-		echo				^<Metadata mode="accumulate" name="er.CrateName"^>!foldername!^</Metadata^> >> !metapath!
-		echo 		^</Description^> >> !metapath!
-		echo 	^</FileSet^> >> !metapath!
-		echo ^</DirectoryMetadata^> >> !metapath!
-	) else (
-		rem Dealing with (PDF) files:
-		rem Create a subfolder in import by the same name as the PDF
-		rem then copy the PDF into it
-		rem And create a metadata.xml file in here for it
-		
-		if "!relpath!" == "!origdir!" (
-			set relpath=
-			set metapath="!odir!\metadata.xml"
-		) else (	
-			CALL SET relpath=!!relpath:%origdir%\=!!
-			rem Remove .pdf extension from relative path
-			CALL SET relpath=!!relpath:~0,-4!!
-			set metapath="!odir!\!relpath!\metadata.xml"
-		)
-		echo RELPATH: !relpath!
-		rem echo OUTPUT DIR: "!odir!\!relpath!"
-		echo METAPATH: !metapath!
-		
-		rem foldername is PDF's filename without .pdf extension
-		echo @@@ GOT FILE: !foldername!
-		if not exist "!odir!\!relpath!" mkdir "!odir!\!relpath!"
-		rem if not exist "!odir!\!relpath!\!foldername!\!foldername!.pdf" copy "!fullpath!" "!odir!\!relpath!\!foldername!\."
-		copy "!fullpath!" "!odir!\!relpath!\."
-		
-		rem Replace relative path to file with vertical bars to create the hierarchy classifier meta value needed
-		set line=!relpath:\=^|!
-		echo LINE: !line! to be written out to !metapath!
-		
-		echo ^<?xml version="1.0" encoding="UTF-8"?^> > !metapath!
-		echo ^<^^!DOCTYPE DirectoryMetadata SYSTEM "http://greenstone.org/dtd/DirectoryMetadata/1.0/DirectoryMetadata.dtd"^> >> !metapath!
-		echo ^<DirectoryMetadata^> >> !metapath!
-		echo 	^<FileSet^> >> !metapath!
-		echo 		^<FileName^>.*^</FileName^> >> !metapath!
-		echo 		^<Description^> >> !metapath!
-		echo				^<Metadata mode="accumulate" name="er.CrateHierarchy"^>!line!^</Metadata^> >> !metapath!
-		echo				^<Metadata mode="accumulate" name="er.Activity"^>!foldername!^</Metadata^> >> !metapath!
-		echo				^<Metadata mode="accumulate" name="er.ActivityName"^>!foldername!^</Metadata^> >> !metapath!
-		echo 		^</Description^> >> !metapath!
-		echo 	^</FileSet^> >> !metapath!
-		echo ^</DirectoryMetadata^> >> !metapath!
-		
-	)
-
-)
-
-
-rem exit
