Appendix E

Start      Previous      Next  

In this section we consider the process used to create  Per0.xml  from the  foaf:Person  triples in VIVO. We begin with the Sparql query shown in the next figure. Note that the  aka  attribute has no role in the example.

  • [F25H0] This is the section where prefixes are declared.
  • [F25H1] In the construct clause the potential triple set is specified.
  • [F25H2] This section of the where clause declares the mandatory triples:
    • personURI  must be a foaf:Person and
    • have both a first and last name
  • [F25H3] The optional triples are listed here: netid, middle name, label and any  aka:nameParts  triples. These express the list of aliases for the  personURI.


The Sparql Query for Per0.xml - Figure 25

This query is invoked with a selection of RDF/XML as the result set format. This XML is transformed into the form used in  Per0.xml  by the transform shown in the next two figures.

  • [F26H0] Set up to collect a node list of person information in the  allpeeps  variable.
  • [F26H1] Extract the URI from the  rdfsyn:about  attribute and
    • [F26H1a] Create a person element from the  foaf core  and  rdfs  elements and set the  aka  attribute to ‘ N ' indicating that this data is not from  aka:nameParts  triples;
    • [F26H1b] For each aka:nameParts triple with this URI as a subject create a person element with the  aka  attribute set to ‘ Y ’.


Per0 XSLT Part 1 Figure 26

The next figure shows the portion of the transform that outputs the XML  Per0.xml  and the  vfx:stripSuffix  function used to remove such data from the last name of each person.

  • [F27H0] This outputs the person elements that have last and first names.
  • [F27H1] This function removes common suffixes from the end of a string. These often cause mismatches because they are employed inconsistently.


Per0 XSLT Part 2 Figure 27

Start      Previous      Next

  • No labels