XML technologies / XSLT / XSLT 3.0 / XSLT streaming / XML sample data / People directory

The people directory contains information such as first and last names, telephone numbers, email addresses, dates of birth and credit-card details. An employee is associated with an employer through the enclosing <Company> element.

Warning!
All personal and company data used on this page and in the associated exercises and solutions is fictional and comes from Fake Name Generator.

There are two different demonstration datasets:

5-Companies.xml

A collection of several employers and information about their employees. This file is used for exercises 4 (Address list) and 10 (Reading employee activities).

Note from the data2type editors:
As the complete code examples would be too large to include here, only excerpts from the input files are shown.

 

Code example: 5-Companies.xml (excerpt).

<?xml version="1.0" encoding="UTF-8"?>
<Companylist>
  <Company Name="Flexus">
    <Person>
      <Name Title="Ms." Gender="female">
        <Firstname>Laura</Firstname>
        <Surname>Ackermann</Surname>
      </Name>
      <ContactData>
        <Address>
          <Zip>45699</Zip>
          <City>Herten</City>
          <Street>Friedrichstrasse 55</Street>
          <State>Nordrhein-Westfalen</State>
          <Country>Germany</Country>
        </Address>
        <Phone TelephoneCountryCode="49">0209 90 72 65</Phone>
        <Email>LauraAckermann@teleworm.de</Email>
      </ContactData>
      <Birthday>2/21/1963</Birthday>
      <Account>
        <Username>Prompoing</Username>
        <Password>EeF6efeuWa</Password>
      </Account>
      <CreditCard Type="Visa">
        <CardNumber>4539109344627147</CardNumber>
        <SecurityCode>043</SecurityCode>
        <ExpirationDate>2/2018</ExpirationDate>
      </CreditCard>
      <Occupation>Prosecutor</Occupation>
      <Weight Unit="kg">65.8</Weight>
      <Size Unit="cm">156</Size>
      <Vehicle>2000 Ford Windstar</Vehicle>
    </Person>
    <Person>
      <Name Title="Ms." Gender="female">
        <Firstname>Lena</Firstname>
        <Surname>Bar</Surname>
      </Name>
      <ContactData>
        <Address>
          <Zip>08142</Zip>
          <City>Crossen</City>
          <Street>Oldesloer Strasse 10</Street>
          <State>Freistaat Sachsen</State>
          <Country>Germany</Country>
        </Address>
        <Phone TelephoneCountryCode="49">036693 85 54</Phone>
        <Email>LenaBar@jourrapide.de</Email>
      </ContactData>
      <Birthday>1/29/1973</Birthday>
      <Account>
        <Username>Wouls1973</Username>
        <Password>AeRehash4</Password>
      </Account>
      <CreditCard Type="MasterCard">
        <CardNumber>5142934393736739</CardNumber>
        <SecurityCode>376</SecurityCode>
        <ExpirationDate>5/2016</ExpirationDate>
      </CreditCard>
      <Occupation>Blaster</Occupation>
      <Weight Unit="kg">67.0</Weight>
      <Size Unit="cm">155</Size>
      <Vehicle>1999 Kia Clarus</Vehicle>
    </Person>
    <Person>
      <Name Title="Mrs." Gender="female">
        <Firstname>Jennifer</Firstname>
        <Surname>Bayer</Surname>
      </Name>
      <ContactData>
        <Address>
          <Zip>48366</Zip>
          <City>Laer</City>
          <Street>Stuttgarter Platz 24</Street>
          <State>Nordrhein-Westfalen</State>
          <Country>Germany</Country>
        </Address>
        <Phone TelephoneCountryCode="49">02554 90 47 76</Phone>
        <Email>JenniferBayer@teleworm.de</Email>
      </ContactData>
      <Birthday>6/21/1953</Birthday>
      <Account>
        <Username>Diagat</Username>
        <Password>Eph4oozo8ael</Password>
      </Account>
      <CreditCard Type="Visa">
        <CardNumber>4532590965230419</CardNumber>
        <SecurityCode>854</SecurityCode>
        <ExpirationDate>5/2017</ExpirationDate>
      </CreditCard>
      <Occupation>Information and record clerk</Occupation>
      <Weight Unit="kg">91.1</Weight>
      <Size Unit="cm">155</Size>
      <Vehicle>1996 Chevrolet APV</Vehicle>
    </Person>
    <Person>
      <Name Title="Ms." Gender="female">
        <Firstname>Anna</Firstname>
        <Surname>Beckenbauer</Surname>
      </Name>
      <ContactData>
        <Address>
          <Zip>66130</Zip>
          <City>Saarbrücken Güdingen</City>
          <Street>Neue Roßstr. 8</Street>
          <State>Saarland</State>
          <Country>Germany</Country>
        </Address>
        <Phone TelephoneCountryCode="49">0681 66 77 80</Phone>
        <Email>AnnaBeckenbauer@dayrep.de</Email>
      </ContactData>
      <Birthday>6/27/1994</Birthday>
      <Account>
        <Username>Inglan</Username>
        <Password>FeeV3AhDa</Password>
      </Account>
      <CreditCard Type="Visa">
        <CardNumber>4556606809149663</CardNumber>
        <SecurityCode>897</SecurityCode>
        <ExpirationDate>8/2018</ExpirationDate>
      </CreditCard>
      <Occupation>Dressmaker</Occupation>
      <Weight Unit="kg">64.1</Weight>
      <Size Unit="cm">171</Size>
      <Vehicle>2014 Lexus IS F</Vehicle>
    </Person>
    ...
  </Company>
  ...
</CompanyList>

A single-file collection of any number of employers and their employees.

Line 3: Any number of <Company> elements is allowed.

Line 4: Any number of <Person> elements is allowed.

Lines 5–33: Information about a person, such as first and last names, telephone number, email address, date of birth and credit-card details.

XML files for individual companies

An employer’s people directory containing information about employees. These are XML input files for five companies (Flexus.xml, MatrixArchitecturalService.xml, Maxi-Tech.xml, Naugles.xml and Stratapro.xml). These files are used for exercises 7 (Merging employee lists) and 11 (Splitting an employee list).

 

Code example: Flexus.xml (excerpt).

<?xml version="1.0" encoding="UTF-8"?>
<Company Name="Flexus">
  <Person>
    <Name Title="Ms." Gender="female">
      <Firstname>Laura</Firstname>
      <Surname>Ackermann</Surname>
    </Name>
    <ContactData>
      <Address>
        <Zip>45699</Zip>
        <City>Herten</City>
        <Street>Friedrichstrasse 55</Street>
        <State>Nordrhein-Westfalen</State>
        <Country>Germany</Country>
      </Address>
      <Phone TelephoneCountryCode="49">0209 90 72 65</Phone>
      <Email>LauraAckermann@teleworm.de</Email>
    </ContactData>
    <Birthday>2/21/1963</Birthday>
    <Account>
      <Username>Prompoing</Username>
      <Password>EeF6efeuWa</Password>
    </Account>
    <CreditCard Type="Visa">
      <CardNumber>4539109344627147</CardNumber>
      <SecurityCode>043</SecurityCode>
      <ExpirationDate>2/2018</ExpirationDate>
    </CreditCard>
    <Occupation>Prosecutor</Occupation>
    <Weight Unit="kg">65.8</Weight>
    <Size Unit="cm">156</Size>
    <Vehicle>2000 Ford Windstar</Vehicle>
  </Person>
  <Person>
    <Name Title="Ms." Gender="female">
      <Firstname>Lena</Firstname>
      <Surname>Bar</Surname>
    </Name>
    <ContactData>
      <Address>
        <Zip>08142</Zip>
        <City>Crossen</City>
        <Street>Oldesloer Strasse 10</Street>
        <State>Freistaat Sachsen</State>
        <Country>Germany</Country>
      </Address>
      <Phone TelephoneCountryCode="49">036693 85 54</Phone>
      <Email>LenaBar@jourrapide.de</Email>
    </ContactData>
    <Birthday>1/29/1973</Birthday>
    <Account>
      <Username>Wouls1973</Username>
      <Password>AeRehash4</Password>
    </Account>
    <CreditCard Type="MasterCard">
      <CardNumber>5142934393736739</CardNumber>
      <SecurityCode>376</SecurityCode>
      <ExpirationDate>5/2016</ExpirationDate>
    </CreditCard>
    <Occupation>Blaster</Occupation>
    <Weight Unit="kg">67.0</Weight>
    <Size Unit="cm">155</Size>
    <Vehicle>1999 Kia Clarus</Vehicle>
  </Person>
  ...
</Company>

An employer’s people directory.

Line 2: Employee list for the employer "Flexus".

Line 3: Any number of <Person> elements is allowed.

Lines 4–32: Information about a person, such as first and last names, telephone number, email address, date of birth and credit-card details.

 

MatrixArchitecturalService.xml (excerpt).

<?xml version="1.0" encoding="UTF-8"?>
<Company Name="Matrix Architectural Service">
  <Person>
    <Name Title="Mrs." Gender="female">
      <Firstname>Stefanie</Firstname>
      <Surname>Aachen</Surname>
    </Name>
    <ContactData>
      <Address>
        <Zip>92250</Zip>
        <City>Schnaittenbach</City>
        <Street>Borstelmannsweg 21</Street>
        <State>Freistaat Bayern</State>
        <Country>Germany</Country>
      </Address>
      <Phone TelephoneCountryCode="49">09604 51 04 35</Phone>
      <Email>StefanieAachen@cuvox.de</Email>
    </ContactData>
    <Birthday>11/11/1974</Birthday>
    <Account>
      <Username>Wiltow</Username>
      <Password>oGooCa6iet</Password>
    </Account>
    <CreditCard Type="MasterCard">
      <CardNumber>5191904403734560</CardNumber>
      <SecurityCode>641</SecurityCode>
      <ExpirationDate>11/2018</ExpirationDate>
    </CreditCard>
    <Occupation>Structural and reinforcing iron and metal worker</Occupation>
    <Weight Unit="kg">78.0</Weight>
    <Size Unit="cm">155</Size>
    <Vehicle>1993 Toyota Century</Vehicle>
  </Person>
  <Person>
    <Name Title="Mr." Gender="male">
      <Firstname>Jonas</Firstname>
      <Surname>Baecker</Surname>
    </Name>
    <ContactData>
      <Address>
        <Zip>83122</Zip>
        <City>Samerberg</City>
        <Street>Gubener Str. 31</Street>
        <State>Freistaat Bayern</State>
        <Country>Germany</Country>
      </Address>
      <Phone TelephoneCountryCode="49">08032 32 03 22</Phone>
      <Email>JonasBaecker@jourrapide.de</Email>
    </ContactData>
    <Birthday>9/24/1956</Birthday>
    <Account>
      <Username>Whanderharty</Username>
      <Password>ui5bieph8Oo</Password>
    </Account>
    <CreditCard Type="Visa">
      <CardNumber>4532887965807380</CardNumber>
      <SecurityCode>547</SecurityCode>
      <ExpirationDate>8/2019</ExpirationDate>
    </CreditCard>
    <Occupation>Residential electrician</Occupation>
    <Weight Unit="kg">76.4</Weight>
    <Size Unit="cm">173</Size>
    <Vehicle>2003 Fiat Stilo</Vehicle>
  </Person>
  ...
</Company>

 

Maxi-Tech.xml (excerpt).

<?xml version="1.0" encoding="UTF-8"?>
<Company Name="Maxi-Tech">
  <Person>
    <Name Title="Ms." Gender="female">
      <Firstname>Kristin</Firstname>
      <Surname>Abendroth</Surname>
    </Name>
    <ContactData>
      <Address>
        <Zip>78144</Zip>
        <City>Tennenbronn</City>
        <Street>Bleibtreustraße 94</Street>
        <State>Baden-Württemberg</State>
        <Country>Germany</Country>
      </Address>
      <Phone TelephoneCountryCode="49">07729 82 94 54</Phone>
      <Email>KristinAbendroth@rhyta.de</Email>
    </ContactData>
    <Birthday>9/16/1977</Birthday>
    <Account>
      <Username>Frenjudipt</Username>
      <Password>Edo8uF3ch</Password>
    </Account>
    <CreditCard Type="Visa">
      <CardNumber>4556691617526864</CardNumber>
      <SecurityCode>141</SecurityCode>
      <ExpirationDate>6/2016</ExpirationDate>
    </CreditCard>
    <Occupation>Ambulance attendant</Occupation>
    <Weight Unit="kg">100.9</Weight>
    <Size Unit="cm">173</Size>
    <Vehicle>2004 Honda Avancier</Vehicle>
  </Person>
  <Person>
    <Name Title="Ms." Gender="female">
      <Firstname>Martina</Firstname>
      <Surname>Ackermann</Surname>
    </Name>
    <ContactData>
      <Address>
        <Zip>31249</Zip>
        <City>Hohenhameln</City>
        <Street>Luckenwalder Strasse 46</Street>
        <State>Niedersachsen</State>
        <Country>Germany</Country>
      </Address>
      <Phone TelephoneCountryCode="49">05128 42 67 42</Phone>
      <Email>MartinaAckermann@einrot.de</Email>
    </ContactData>
    <Birthday>3/19/1986</Birthday>
    <Account>
      <Username>Thaignim</Username>
      <Password>AeS3aeghusee</Password>
    </Account>
    <CreditCard Type="Visa">
      <CardNumber>4539451419721425</CardNumber>
      <SecurityCode>932</SecurityCode>
      <ExpirationDate>1/2018</ExpirationDate>
    </CreditCard>
    <Occupation>Cryptanalyst</Occupation>
    <Weight Unit="kg">55.0</Weight>
    <Size Unit="cm">170</Size>
    <Vehicle>2000 Chrysler PT Cruiser</Vehicle>
  </Person>
  ...
</Company>

 

Naugles.xml (excerpt).

<?xml version="1.0" encoding="UTF-8"?>
<Company Name="Naugles">
  <Person>
    <Name Title="Mr." Gender="male">
      <Firstname>Bernd</Firstname>
      <Surname>Bach</Surname>
    </Name>
    <ContactData>
      <Address>
        <Zip>64572</Zip>
        <City>Büttelborn</City>
        <Street>Mollstrasse 82</Street>
        <State>Hessen</State>
        <Country>Germany</Country>
      </Address>
      <Phone TelephoneCountryCode="49">06152 73 50 36</Phone>
      <Email>BerndBach@superrito.de</Email>
    </ContactData>
    <Birthday>9/15/1955</Birthday>
    <Account>
      <Username>Virinarlecou</Username>
      <Password>quii1Cae8fae</Password>
    </Account>
    <CreditCard Type="Visa">
      <CardNumber>4929558384107162</CardNumber>
      <SecurityCode>371</SecurityCode>
      <ExpirationDate>9/2016</ExpirationDate>
    </CreditCard>
    <Occupation>Employment interviewer</Occupation>
    <Weight Unit="kg">88.6</Weight>
    <Size Unit="cm">176</Size>
    <Vehicle>1998 Ferrari Mondial</Vehicle>
  </Person>
  <Person>
    <Name Title="Mrs." Gender="female">
      <Firstname>Heike</Firstname>
      <Surname>Bachmeier</Surname>
    </Name>
    <ContactData>
      <Address>
        <Zip>53115</Zip>
        <City>Bonn</City>
        <Street>Straße der Pariser Kommune 19</Street>
        <State>Nordrhein-Westfalen</State>
        <Country>Germany</Country>
      </Address>
      <Phone TelephoneCountryCode="49">0228 53 42 64</Phone>
      <Email>HeikeBachmeier@cuvox.de</Email>
    </ContactData>
    <Birthday>1/11/1966</Birthday>
    <Account>
      <Username>Nust1966</Username>
      <Password>ni5dee3Ei</Password>
    </Account>
    <CreditCard Type="MasterCard">
      <CardNumber>5309974345741501</CardNumber>
      <SecurityCode>760</SecurityCode>
      <ExpirationDate>5/2017</ExpirationDate>
    </CreditCard>
    <Occupation>Purchasing manager</Occupation>
    <Weight Unit="kg">60.6</Weight>
    <Size Unit="cm">154</Size>
    <Vehicle>2008 Jaguar XKR</Vehicle>
  </Person>
  ...
</Company>

 

Stratapro.xml (excerpt).

<?xml version="1.0" encoding="UTF-8"?>
<Company Name="Stratapro">
  <Person>
    <Name Title="Mr." Gender="male">
      <Firstname>Maik</Firstname>
      <Surname>Abendroth</Surname>
    </Name>
    <ContactData>
      <Address>
        <Zip>04921</Zip>
        <City>Bad Liebenwerda</City>
        <Street>Amsinckstrasse 1</Street>
        <State>Brandenburg</State>
        <Country>Germany</Country>
      </Address>
      <Phone TelephoneCountryCode="49">035341 76 23</Phone>
      <Email>MaikAbendroth@cuvox.de</Email>
    </ContactData>
    <Birthday>5/22/1996</Birthday>
    <Account>
      <Username>Gairly</Username>
      <Password>Ua8shohK</Password>
    </Account>
    <CreditCard Type="MasterCard">
      <CardNumber>5379458169783703</CardNumber>
      <SecurityCode>538</SecurityCode>
      <ExpirationDate>2/2017</ExpirationDate>
    </CreditCard>
    <Occupation>Metal-refining furnace operator</Occupation>
    <Weight Unit="kg">84.9</Weight>
    <Size Unit="cm">170</Size>
    <Vehicle>2008 Tata Safari</Vehicle>
  </Person>
  <Person>
    <Name Title="Mrs." Gender="female">
      <Firstname>Brigitte</Firstname>
      <Surname>Ackermann</Surname>
    </Name>
    <ContactData>
      <Address>
        <Zip>72393</Zip>
        <City>Burladingen</City>
        <Street>Eichendorffstr. 40</Street>
        <State>Baden-Württemberg</State>
        <Country>Germany</Country>
      </Address>
      <Phone TelephoneCountryCode="49">07475 83 53 69</Phone>
      <Email>BrigitteAckermann@gustr.de</Email>
    </ContactData>
    <Birthday>4/9/1953</Birthday>
    <Account>
      <Username>Reflud</Username>
      <Password>joo3faeSh</Password>
    </Account>
    <CreditCard Type="Visa">
      <CardNumber>4716408158961815</CardNumber>
      <SecurityCode>054</SecurityCode>
      <ExpirationDate>5/2016</ExpirationDate>
    </CreditCard>
    <Occupation>Law clerk</Occupation>
    <Weight Unit="kg">65.5</Weight>
    <Size Unit="cm">171</Size>
    <Vehicle>2004 McLaren F1</Vehicle>
  </Person>
  ...
</Company>

   

back to top