Annotated PFIF 1.1 Example

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.

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.1"
           xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
           xsi:schemaLocation="http://zesty.ca/pfif/1.1
                               http://zesty.ca/pfif/1.1/pfif-1.1.xsd">

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.1 namespace, which is a URL pointing at the PFIF 1.1 specification. The xmlns:xsi attribute defines the xsi: prefix, thus allowing the xsi:schemaLocation attribute to identify the schema document associated with PFIF. The value of the xsi:schemaLocation attribute is a pair of URLs: the URL identifying the namespace and the URL to the schema document.

  <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. We use all capital letters and convert all accented letters to unaccented letters to reduce the likelihood of mismatches.

    <pfif:home_city>TUSCALOOSA</pfif:home_city>
    <pfif:home_state>AL</pfif:home_state>
    <pfif:home_neighborhood/>
    <pfif:home_street>COTTON LANE</pfif:home_street>
    <pfif:home_zip>94305</pfif:home_zip>

This is the home address 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.

    <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/gender: female
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 gender and company fields, and when we bring them in we prefix them with salesforce.com/ to indicate whose fields they are. The description: tag is for text describing the person. The line breaks are important here. 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>salesforce.com/00N30000000tO5N</pfif:note_record_id>

This is a unique ID for the note, again prefixed with the domain name of its home respository, like the person_record_id.

      <pfif:entry_date>2005-09-03T20:52:25Z</pfif:entry_date>

This is the date that the note was stored at salesforce.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: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>DOE</pfif:last_name>
    <pfif:home_city>NEW ORLEANS</pfif:home_city>
    <pfif:home_state>LA</pfif:home_state>
    <pfif:home_neighborhood>HERRINGBONE PARISH</pfif:home_neighborhood>
    <pfif:home_street>CHESTNUT</pfif:home_street>
    <pfif:home_zip>80540</pfif:home_zip>

These fields give the missing person's name and address, as before.

    <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: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.