This page provides an annotated description of an example PFIF document.
In this example, we are looking at two person records exported from the salesforce.com database. The first is an original record, the second is a clone record.
The first record was posted directly to salesforce.com by Bill Mandil on 2005-09-03 at 09:21:12 UTC, looking for a missing person named Katherine Doe. Jane Peters spoke to her on the phone and posted a note about it at 20:52:25 UTC. Jane posted the note on a different site, example.com, where the record was copied. Jane also happens to know that there is a duplicate record for Katherine Doe at the icrc.org site, and entered this indication when posting her note. The note was exported on a feed where salesforce.com picked it up, and attached it to the original record (thus, this is a clone note attached to an original record).
The second record was originally posted to icrc.org by Mary Jacobs on 2005-09-03 at 22:07:59 UTC, looking for a missing person named John Doe. Attached to the record is a note from Mary Jacobs asking for people to contact her if they know anything about John. The record and note were both scraped from icrc.org by a program named RCScraper, and the PFIF output from RCScraper was loaded into the salesforce.com database at 23:00:00 UTC.
<?xml version="1.0" encoding="utf-8"?>
This tag appears at the top of an XML document. The encoding should be UTF-8.
<pfif:pfif xmlns:pfif="http://zesty.ca/pfif/1.2">
This is the start tag for the pfif:pfif
element that surounds the entire PFIF document.
The xmlns:pfif
attribute associates the pfif:
prefix
with the PFIF 1.2 namespace, which is a URL pointing at the PFIF 1.2 specification.
<pfif:person>
A PFIF document consists of a pfif:pfif
element
containing a series of pfif:person
elements.
This example contains two person records.
This record, the first of the two, is a record that was entered directly
into a database at salesforce.com (not copied from anywhere else).
We call this an original record in the salesforce.com database.
<pfif:person_record_id>salesforce.com/a0030000001TRYR</pfif:person_record_id>
Each record must have a unique ID in its person_record_id field. The ID should begin with the domain name of the record's home repository and a slash. Since this record was created for the first time at salesforce.com and not copied from anywhere else, salesforce.com is the home repository for the record. The slash is followed by an ID that was chosen by salesforce.com, such as the primary key of the record in the salesforce.com database.
<pfif:entry_date>2005-09-03T09:21:12Z</pfif:entry_date>
This is the date that this copy of the record was stored in the salesforce.com database. Since this is an original record, this is the same as the date it was originally created, that is, the entry_date is equal to the source_date. Notice that all the dates are in YYYY-MM-DD format and all the times are 24-hour times, HH:MM:SS. The date and time are joined by a capital "T" and a "Z" is added to the end to indicate that the time is in UTC (also known as Greenwich Mean Time). All dates and times in PFIF must be given in UTC.
<pfif:author_name>Bill Mandil</pfif:author_name> <pfif:author_email>bmd67893@example.com</pfif:author_email> <pfif:author_phone>(555) 258-6902</pfif:author_phone>
These three elements identify the person who entered the original record.
<pfif:source_name>salesforce.com</pfif:source_name> <pfif:source_date>2005-09-03T09:21:12Z</pfif:source_date> <pfif:source_url>http://www.salesforce.com/person/a0030000001TRYR</pfif:source_url>
These three elements identify the original record. They show that the record was created at salesforce.com on September 3, 2005 at 09:21:12 GMT, and give a URL for viewing the record at its home repository, salesforce.com.
<pfif:first_name>Katherine</pfif:first_name> <pfif:last_name>Doe</pfif:last_name>
This is the name of the missing or found person. Any non-ASCII characters should be encoded as UTF-8.
<pfif:sex>female</pfif:sex> <pfif:date_of_birth>1971-02</pfif:date_of_birth> <pfif:age>30-45</pfif:age>
These fields describe the physical characteristics of the person. Note that the pfif:date_of_birth field can specify an approximate date (February 1971 in this example), and the pfif:age field can specify an age range.
<pfif:home_street>Cotton Lane</pfif:home_street> <pfif:home_neighborhood/> <pfif:home_city>Tuscaloosa</pfif:home_city> <pfif:home_state>AL</pfif:home_state> <pfif:home_postal_code>94305</pfif:home_postal_code> <pfif:home_country>US</pfif:home_country>
This describes the home location of the missing or found person — the place where they resided before the disaster. This information is here to help identify which person we are talking about, not necessarily to locate where they are now; that's why only the street name is given, not the house number.
<pfif:photo_url>http://flickr.com/photo/12345678.jpg</pfif:photo_url>
This field provides a URL to an identifying photo of the person. It is best to use a permanent URL for the photo, for example, at an established photo hosting service.
<pfif:other> description: Dark hair, in her late thirties. Also goes by the names "Kate" or "Katie". salesforce.com/company: Generic Savings Bank </pfif:other>
This field contains any other information that did not fit in PFIF fields.
In this example, we assume that salesforce.com has a
company field,
and when we bring it in we prefix it with salesforce.com/
to indicate who defined the field.
The description:
tag is for text describing the person.
The line breaks are important:
each field should start on a new line,
with the value either on the same line or indented on the following lines.
<pfif:note>
This person record
has an associated note record,
which goes in a pfif:note
element
contained within the pfif:person
element.
<pfif:note_record_id>example.com/12345</pfif:note_record_id>
This is a unique ID for the note, prefixed with the domain name of its home repository, like the person_record_id. Notice that this note has a different home repository than the person. This means the person record was entered at salesforce.com, then copied to example.com, where someone posted a note on it.
<pfif:person_record_id>salesforce.com/a0030000001TRYR</pfif:person_record_id>
This is the ID of the person again. When the pfif:note element is nested inside the pfif:person element, this is redundant and can be omitted. But notes can also be transferred separately in their own file, and for such notes the pfif:person_record_id field is necessary.
<pfif:linked_person_record_id>icrc.org/83.4</pfif:linked_person_record_id>
This field indicates that there is a record at icrc.org, with ID icrc/83.4, which is also for the same person as this one.
<pfif:entry_date>2005-09-03T20:52:25Z</pfif:entry_date>
This is the date that the note was stored at example.com.
<pfif:author_name>Jane Peters</pfif:author_name> <pfif:author_email>jp123@example.com</pfif:author_email> <pfif:author_phone>(555) 493-2342</pfif:author_phone>
These three fields identify the person who posted the original note.
<pfif:source_date>2005-09-03T20:52:25Z</pfif:source_date>
This is the date of the original note. Since the note is in its home repository, the date of storage (entry_date) matches the date of creation (source_date).
<pfif:status>believed_alive</pfif:status>
This field indicates the status of the person, according to the author of the note. Jane spoke to Katie, so this field is present to indicate that Jane knows that Katie is alive.
<pfif:found>true</pfif:found>
This field is true
to indicate that the missing person
has been seen or contacted.
<pfif:email_of_found_person>katie_doe@randomsite.biz</pfif:email_of_found_person> <pfif:phone_of_found_person>(555) 904-9095</pfif:phone_of_found_person>
These fields provide contact information for the person who has been found.
<pfif:last_known_location>on a cot somewhere, AstroDome, Houston TX</pfif:last_known_location>
This field describes where the person was last known to have been, and should include as much detail as possible.
<pfif:text> I spoke to Katie on the phone today at around noon EST. She is tired and worried but otherwise okay. </pfif:text>
This is the text of the message posted by Jane.
</pfif:note> </pfif:person>
That's the end of the first person record.
<pfif:person>
Here's the second person record.
<pfif:person_record_id>icrc.org/162537</pfif:person_record_id>
This ID begins with icrc.org/
to indicate
that this record was originally created at icrc.org.
Since this record, stored at salesforce.com, is a copy of a record
created somewhere else, we call it a clone record.
<pfif:entry_date>2005-09-03T23:00:00Z</pfif:entry_date>
This is the date that this copy of the record was stored in its current location, salesforce.com.
<pfif:author_name>Mary Jacobs</pfif:author_name> <pfif:author_email>mdj@geocities.com</pfif:author_email> <pfif:author_phone>(555) 736-1148</pfif:author_phone>
These three fields identify the author of the original record at icrc.org.
<pfif:source_name>ICRC FamilyLinks</pfif:source_name> <pfif:source_date>2005-09-03T22:07:59Z</pfif:source_date> <pfif:source_url>http://www.familylinks.icrc.org/example?id=162537</pfif:source_url>
These three fields identify the original record at icrc.org. Since this is a clone record, the source_date and entry_date are different. The source_date is the date of the original posting at icrc.org. So this tells us that the record was originally posted at icrc.org at 22:07:59, then later copied into the salesforce.com database at 23:00:00. The source_url field provides a URL to the original post at icrc.org.
<pfif:first_name>John</pfif:first_name> <pfif:last_name>Smith</pfif:last_name> <pfif:sex>male<pfif:sex> <pfif:date_of_birth>1980<pfif:date_of_birth> <pfif:age>25<pfif:age> <pfif:home_street>Chestnut</pfif:home_street> <pfif:home_neighborhood>Herringbone Parish</pfif:home_neighborhood> <pfif:home_city>New Orleans</pfif:home_city> <pfif:home_state>LA</pfif:home_state> <pfif:home_postal_code>80540</pfif:home_postal_code> <pfif:home_country>US</pfif:home_country>
These fields give the missing person's name, details, and address, as before. Note in this case only the year of birth is specified, along with an exact age.
<pfif:other> automated-pfif-author: RCScraper 0.4, http://example.org/rcscraper icrc.org/birthdate: 1976-02-26 </pfif:other>
The ICRC database happens to have a birthdate field,
which is not part of PFIF, so the birthdate goes here in the other field.
Since the birthdate field is defined by ICRC,
the field name is icrc.org/birthdate
.
The automated-pfif-author
field should be added by any program
that automatically converts from another format to PFIF;
in this example, this record was scraped from the ICRC site by a program called RCScraper.
<pfif:note> <pfif:note_record_id>icrc.org/162537.1</pfif:note_record_id>
The note came from ICRC as well, so its ID also begins with icrc.org/
.
<pfif:person_record_id>icrc.org/162537<pfif:person_record_id> <pfif:entry_date>2005-09-03T23:00:00Z</pfif:entry_date>
The note was imported into salesforce.com at the same time as the person record.
<pfif:author_name>Mary Jacobs</pfif:author_name> <pfif:author_email>mdj@geocities.com</pfif:author_email> <pfif:author_phone>(555) 736-1148</pfif:author_phone>
This is the original author of the note on icrc.org
.
<pfif:source_date>2005-09-03T22:07:59Z</pfif:source_date>
This is the date the note was originally posted at icrc.org
.
In this example, the note was scraped from the same record,
so it is recorded as having the same original posting time.
<pfif:found>false</pfif:found> <pfif:last_known_location>at home in New Orleans</pfif:last_known_location>
The last_known_location can be filled in even if the person has not been found yet.
<pfif:text> If you have any information on John, please contact me. </pfif:text>
This is Mary's note that will appear on John's record.
</pfif:note> </pfif:person>
This is the end of the second person record.
</pfif:pfif>
And this is the end of the PFIF document.