Date Finder
See
http://taporware.mcmaster.ca/~taporware/xmlTools/datefinder.shtml
Description
This tool extracts dates from an HTML document. Dates can be limited to all dates, years, months, weeks, seasons, North American holidays or user defined dates (e.g. specific month(s), week(s), season(s), holiday(s)).
Pseudocode
- Obtain XML string by URL or from user's local disk
- Obtain text contained in user specified element and/or attribute
- Use pattern match to get the sentences containing the user specified date (all date, years, months, weeks etc.)
- Generate html output to display
Ways of Using
- Enter a valid URL pointing to an xml document in the URL field or enter a local upload xml text
- Enter a valid xml element name and/or attribute name with its value
- Select a date format you want to investigate. If you select "user date", you have to enter the date in the related text field.
- Select output format (current, only html format is supported)
- If you want the results displayed in the same window with taporware interface, uncheck the check box - "Open results in new window"
- Finally, click the "Submit" button
CGI Interface
If you want to use this tool from your web site, here is the CGI Interface:
(
Note: If you want to upload local xml text to the tool, you need to use attribute name/value pair: enctype="multipart/form-data" within the form tag)
Here are the parameters:
| Parameter Name | Parameter Value | Control Type | Default | Discription |
| source | url/local | radio button | url | Let user select input text (either a url or upload local html text) |
| xmlurl | | text | | A Valid URL that the pointed document should be an xml text |
| localFile | | file | | The path to your local xml text file |
| xmlpath | | text | // | Valid xpath or multple xml element name separated by comma |
| attr_name | | text | | valid attribute name |
| attr_value | | text | | An attribute value. If this field is not empty, you have to specified an attribute name in the corresponding field |
| date | all/year/month/week/season/holiday/user | radio button | all | Date type to be searched |
| userdate | | text | | Fill this field if select "user date", must be name of month, year, week, season or holiday |
| display | 1 | selection | 1 | Display format which is HTML current |
| taporface | | checkbox | checked | display result in a new window without graphics interface (default) or with taporware interface in the same window |
Web Service Interface
Taporware provides web services to any non-benefit organizations. here is the taporware web services infomation:
- Endpoint URL: http://taporware.mcmaster.ca:9982
- Service URI: http://taporware.mcmaster.ca/~taporware/webservice
- Service Method: date_finder_XML
- parameters:
- xmlInput -- any well-formed xml string
- element -- any valid xml element or xpath
- dateOption -- a seletion list of date formats user can select. The selectiona are; all date, years, months, weeks, seasons, holidays and user date with the values of all/year/month/week/season/holiday/user respectively.
- userDate -- name of year, month, week day, etc. Used when user select "use date"
- outFormat -- value is html since only HTML format is support currently.
Known Bugs
To Do
--
LianYan - 27 Mar 2007