| Specifying location records |
| Each location record is specified by the <location> tag. Attributes specify the field name and attribute values contain the field data. One XML file may contain many <location> records and multiple files may be used in setting all location data. Keep the XML file size to no more than 50 kilobytes, about 50 location records per file. Figure 3.4.1 is an example of a single location record, note the id attribute used for record identification. |
<location id="448
contact="Katrina Simmons"
address1="466 Holton Blvd"
address2="Building H44"
city="Pocahontas"
state_code="MS"
zip="39072"
country_name="United States"
country_code="US"
tel="800-239-7244"
email="katrina@example.com"
website="http://www.example.com"
lat="32.3113"
lon="-90.3972"
/> |
| Fig 3.4.1a Example single location |
|
| The attribute names used by the system are outlined in the table below. Attributes such as city and state must be specified since the system uses them to perform a search. Other attributes may be omitted such as contact or company if no data is associated with the field. |
| |
| |
| MT1207 Application |
<location> |
|
| Attribute | Values / Range | Default 1 | Notes |
| id |
text / number |
|
7 |
| contact |
text |
|
|
| company |
text |
|
|
| address1 |
text |
|
|
| address2 |
text |
|
|
| address3 |
text |
|
|
| city |
text |
|
|
| state_code |
text |
|
5 |
| zip |
5 digit numerical |
|
6 |
| country_name |
text |
|
|
| country_code |
text |
|
4 |
| tel |
text |
|
|
| fax |
text |
|
|
| email |
text |
|
9 |
| website |
text, URL |
|
2,9 |
| info_link |
text, URL |
|
2,9 |
| map_link |
text, URL |
|
2,9 |
| lat |
+/- decimal degrees |
|
3, 8 |
| lon |
+/- decimal degrees |
|
3, 8 |
| Notes |
- Default value persists if attribute is omitted from tag.
- Data should be URL encoded.
- Latitude and longitude are specified in decimal degrees. West longitudes are negative. Southern latitudes are negative.
- Two letter internet country code, capitals.
- Two letter state code, capitals.
- Five digit US zip code, numerical.
- Each location record must have an unique identifier.
- Latitude and longitude coordinates are only needed when system is setup to search by distance from a zip code.
- Module RLV1 (Results List View) uses these attributes in setting the buttons on the list item. Button appears dimmed should the attribute be omitted.
|
|
| Table 3.4.1b Tag Reference |
|
| |