Recommendation for Interstate Criminal History Transmission 

Specification 

NISTIR 6820

Michael D. Garris 

National Institute of Standards and Technology 

Building 225, Room A216 

Gaithersburg, MD 20899 

Recommendation for Interstate Criminal History Transmission 

Specification

Michael D. Garris (mgarris@nist.gov) 

ABSTRACT 

This report contains technical comments and recommendations regarding the “Interstate 

Criminal History Transmission Specification – XML Version 2.01” published June 2001. This 

specification was written by a national task force, the Joint Task Force on Rap Sheet 

Standardization (JTF), composed of members representing federal, state, and local criminal 

justice agencies. The Federal Bureau of Investigation (FBI) presented the National Institute of 

Standards and Technology (NIST) with of copy of the JTF’s specification and requested an 

independent review and comment. Upon technical review, NIST determined that the JTF’s

published XML schema was out of date with current standards. It was also observed that the 

published schema was developed using a single validating parser. NIST discovered that the 

same schema failed to work when used by a different parser written to the same schema

standards. From these discoveries, NIST set out to revise the JTF’s published schema, rap sheet, 

and stylesheet in an effort to bring them up to current standards and demonstrate their 

interoperability with a variety of tools. NIST was successful in achieving these objectives, and

revised files are provided in the appendices. This report describes the technical issues raised and 

the solutions implemented in the process of achieving these objectives. 

Keywords: criminal, force, history, joint, namespace, rap, schema, sheet, standard, stylesheet, 

task, transmission, XML, XPath, XSLT 

1. INTRODUCTION 

This report contains technical comments and recommendations regarding the “Interstate 

Criminal History Transmission Specification – XML Version 2.01” published June 2001.[1] 

This specification was written by a national task force, the Joint Task Force on Rap Sheet 

Standardization (JTF), composed of members representing the Federal Bureau of Investigation’s 

(FBI) Criminal Justice Information Services Division (CJIS) and its Advisory Policy Board

(CJIS APB), the National Law Enforcement Telecommunications System (NLETS), SEARCH, 

the National Consortium for Justice Information and Statistics and state and local criminal justice

agencies. 

Participants in the JTF recognize the need for a standardized electronic rap sheet that can be 

generated upon demand from multiple sources, compiling an accurate and comprehensive 

criminal history on a given suspect. The JTF identified the following challenges:[1]

• States and the FBI employ different formats and codes, which make the interstate

exchange and interpretation of criminal history information difficult.

• Criminal records are used for many purposes. The inability to extract only the 

information that is needed creates problems for both data providers and the end users of 

this information.

• There is no method of combining or electronically collating criminal records from

multiple sources (i.e., states and the FBI) into a single chronological record of events.

1
The National Institute of Standards and Technology (NIST), continuing in its role as technology 

and standards advisor to the FBI, was provided by FBI/CJIS with a copy of the JTF’s rap sheet

specification for the purpose of review and comment. NIST has a long standing relationship 

with the FBI. Researchers at NIST began work on the first version of the FBI's Automated

Fingerprint Identification System (AFIS) system back in the late 60's.[2] Over the years, NIST 

has conducted fingerprint research, developed fingerprint technology, developed methods for 

measuring the quality and performance of fingerprint scanners and imaging systems, and has

produced a large repository of databases of FBI fingerprint images.[3] In this case, the most 

important and relevant work NIST has done for the FBI is in the area of developing fingerprint 

transmission standards.[4] 

NIST supports the JTF’s decision to express its standardized rap sheet in XML [5]. The

transmission specification is concise and comprehensive; the document is well-organized and

structured; and as such, it is an excellent example of how an XML application is defined, 

designed, and documented. The specification provides an example XML rap sheet, a 

corresponding XML schema file to validate the rap sheet, and an XSL stylesheet [6] for

converting the rap sheet into HTML [7]. These files types are described further in Section 2. 

Upon review, technical issues were discovered. These issues primarily hinge around two facts. 

First, it was discovered that the rap sheet specification was written based on an old W3C 

(www.w3.org) working draft for XML schema, dated April 2000.[8][9][10] (In the remainder of 

this report, this working draft is referred to as the Schema Draft.) In May of 2001, just a month 

prior to the JTF publishing version 2.01 of its rap sheet specification, W3C adopted a 

recommendation for XML schema.[11][12][13] This represents a significant milestone in 

stabilizing the specification of XML schema. (In the remainder of this report, this 

recommendation is referred to as Schema Reommendation.) Therefore, the JTF files are not 

compatible with tools implemented according to this new recommendation. To validate the 

XML rap sheet with current tools, the JTF’s schema required several syntax changes discussed in

Section 3.2.1, and a target namespace [14] was implemented as discussed in Section 3.2.3. 

Specifying a target namespace, in turn, required changes to the XML rap sheet and the XSL 

stylesheet. 

Second, it was discovered that the JTF’s XML rap sheet was validated against its published 

schema using only a single XML implementation. Successful validation results were confirmed 

by NIST using Apache’s Xerces-j 1.3.01

 validating parser.[15] (Xerces-j 1.3.0 is implemented 

based on the Schema Draft.) Additional tests by NIST demonstrated that the JTF’s schema 

failed to work with a different validating parser. Altova’s proprietary XMLSpy 3.5 parser [16] 

references the Schema Draft just as Xerces-j 1.3.0, but it fails to validate the JTF’s rap sheet. 

These findings are discussed further in Section 3.1. 

As a result of these discoveries, NIST proposes an updated set of XML files for use in the JTF’s 

rap sheet specification, including a revised schema, rap sheet, and stylesheet. The contents of 

these proposed files are listed in the appendices along with the HTML output as rendered by 

Microsoft’s (www.microsoft.com) Internet Explorer (IE) 5.0 browser. 

 

1

 Specific software products and equipment identified in this paper were used in order to adequately support the 

development of the application described in this document. In no case does such identification imply 

recommendation or endorsement by the National Institute of Standards and Technology, nor does it imply that the 

software or equipment identified is necessarily the best available for the purpose. 

2 
The files proposed in this report, if adopted, ensure a more seamless interchange of XML-based 

rap sheets using a variety of different XML tools across the internet. The updated XML schema

passes IBM’s Schema Quality Checker 1.2 [17] with no warnings or errors. This Schema also 

validates the revised XML rap sheet using Apache’s Xerces-j 1.4.3 [15] validating parser and 

Altova’s XMLSpy 4.0 [16] validating parser. In addition, the revised XSL stylesheet 

consistently transforms the XML rap sheet to HTML using Microsoft’s MSXML 3.0 parser [18], 

Infoteria’s iXSLT 2.0c [19], and Michael Kay’s Instant-Saxon 6.02 [20] (all of which are 

bundled with XMLSpy 4.0). 

The revised XML schema, XML rap sheet, and XSL stylesheet files are available via anonymous 

FTP at ftp://sequoyah.nist.gov/pub/miscellaneous/jtf_xml/. 

In this report, Section 2 briefly describes the current state of XML standards and technologies; 

Section 3 contains specific recommendations for updating the JTF’s schema, rap sheet, and 

stylesheet files; results are summarized in Section 4; and revised versions of the JTF’s files are 

listed in the appendices. 

2. XML, SCHEMA, AND XSLT TECHNOLOGIES 

This section briefly describes, for those who are not XML savvy, the three types of files 

distributed with the JTF’s rap sheet specification. For more in-depth descriptions, the reader can

refer to Reference [21]. 

The Extensible Markup Language (XML) in most simple terms is a language used to delimit or 

tag portions of a document. Document is being used here in very general terms. It may refer to 

an electronic file, a collection of database records, a data stream, etc. Unlike HTML, which tags

a document primarily with markup used for presentation (eg. font size, typeface, headings, 

paragraphs, tables, etc.), XML tags a document based on its content (eg. address, street, city, 

state, zip code, etc.). In fact, XML represents the hierarchical content of a document, where in 

the example: street, city, state, and zip code are children of a parent structure, address. 

XML is extensible in the sense that custom tags may be defined to represent the contents of a 

specific document. With its ability to represent hierarchical relationships and its extensibility,

XML provides a powerful method for representing complex collections of data. With its

flexibility and specificity, it becomes very important to be able to automatically determine if the 

contents of an XML document is acceptable and in its proper order/relationship. This is known 

as validation, and this is accomplished using an XML schema. 

An XML schema defines and dictates what content is permitted in an XML document, called the 

instance. Schemas may be quite general, but they may also be very exact and sophisticated in

defining the content of an XML document. In the case of interchanging criminal history 

information, a well-formed schema will automatically ensure that the rap sheet being transferred

conforms to a specified format enabling its contents to be reliably processed by the recipient. 

Distributed in the rap sheet specification is an Extensible Stylesheet Language (XSL) file or XSL 

stylesheet. The purpose of a stylesheet is to separate presentation mark-up from document

content. A transform process, known as XSLT, takes a validated XML instance document, and 

based on the transformation rules included in the associated stylesheet, extracts specified data 

from the instance document, marking it up with HTML presentation tags. The result is an 

HTML file containing original XML data that can be viewed using a common internet browser. 

3
The capabilities of XML, XML schema, and XSLT, together present a very effective solution for

implementing a standardized electronic rap sheet. On the other hand, XML and its supporting 

technologies are relatively young, and standardization efforts actively continue within W3C. At 

the time of writing this report, XML 1.0 was widely in use based on a 2nd edition, October 2000, 

W3C recommendation.[5] The current XML schema specification is a May 2001 W3C 

recommendation.[11][12][13] Stylesheets typically refer to XSLT 1.0, a November 1999 W3C 

recommendation.[6] These technologies continue to be developed and advanced, which poses 

challenges when implementing and deploying XML-based systems. 

3. NIST REVIEW AND COMMENT 

It is important to realize that the JTF’s rap sheet specification was drafted just as W3C was 

preparing to release their May 2001 schema recommendation. Due to the timeframe of the JTF’s 

efforts, this was likely unavoidable. As a result, the JTF’s published schema was instantly out of 

date. This is a prime example of the challenges introduced when implementing these young 

technologies. 

3.1 Schema References Old W3C Specification 

The JTF’s published schema references the Schema Draft. In this section, revisions are 

discussed to update the JTF’s schema to the current Schema Recommendation. 

In comparison to the 1st edition 1998 recommendation of XML and to the 1999 recommendation 

of XSLT, the XML schema (with its 2001 recommendation) is the youngest and least mature of 

the three technologies. With infancy comes frequent changes, and implementers of a frequently 

changing technology are faced with the challenge of choosing which aspects of the technology to

implement, and in what order of priority. To do this, one must evaluate which aspects are more

stable, which aspects are more critical, and which can be implemented later without jeopardizing

their application of the technology. One technology implementer will likely be operating under 

different application criteria than another technology implementer. As a result, it is not 

surprising to find different implementations referencing the same technology specification, yet 

functioning significantly different. This is very much the case with respect to tools operating on 

the JTF’s published schema. 

The JTF drafted their schema according to the Schema Draft, and they subsequently used 

Apache’s free Xerces-j 1.3.0 validating parser to test the integrity of their schema. Xerces-j 1.3.0 

likewise references the Schema Draft, and NIST has verified that this version of the parser does 

apply the JTF’s schema and the XML rap sheet is successfully validated. One may conclude 

from this exercise that the JTF’s schema conforms to the Schema Draft. 

To test this postulation further, NIST acquired Altova’s XMLSpy 3.5, which contains a 

proprietary validating parser. This parser also references the Schema Draft. Somewhat to 

NIST’s surprise, the JTF’s schema does not successfully validate the XML rap sheet. The 

following error is generated: 

“The file is not valid: Schema error – you have not specified a

targetNamespace, but the XML Schema namespace is used as the

default ...”

4 
Apparently, there is a discrepancy in how namespaces [14] are implemented between Xerces-j 

1.3.0 and XMLSpy 3.5. XMLSpy 3.5 believes required information is missing from the schema. 

The goal here is not to determine which implementation is more true to the standard 

specifications, but rather to point out the discrepancy between vendor implementations. These 

factors must be considered in order to seamlessly interoperate across the internet using various 

XML vendor technologies and tools. 

It should also be mentioned that Microsoft’s IE 5.0, using their MSXML 3.0 parser, renders the 

JTF’s XML rap sheet data into the browser’s window without warning or error. However, this 

too is not conclusive that the XML rap sheet is valid and conforming, as MSXML 3.0 is a nonvalidating parser. In other words, the parser in the IE browser has been specifically programmed 

to tolerate and compensate for near-compliant files. 

3.2 Revising XML Schema, XML Rap Sheet, and XSL Stylesheet 

Given the facts that the JTF’s schema was written to a draft specification and inconsistent results

were observed using different validating parsers, NIST set out to revise the JTF’s files in order to

bring them up to date and establish versions that operate reliably using a variety of different

tools. 

3.2.1 Schema Syntax Change

The first change required to update the JTF’s schema to the Schema Recommendation, involved 

changes in syntax. According to the Schema Draft, an optional attribute with a default value was

specified as: 

<attribute name="format" type="string" default="CCYYMMDD"/>

With the Schema Recommendation, the same attribute is specified: 

<attribute name="format" type="string" use="optional"

default="CCYYMMDD"/>

Under the new recommendation, the use=”...” attribute is required for optional elements (as well 

as attributes) with a default value. There were three occurrences of this type of syntax change in 

the JTF’s schema. 

3.2.2 Group Logic Change 

IBM offers a free tool, Schema Quality Checker (SQC) 1.2, that analyzes the contents of a given

schema for compliance to the Schema Recommendation. After incorporating the syntax changes 

of Section 3.2.1, SQC flagged the following group definition:

5
<!-- Agency ORI and Name Elements -->

<group name="agencyIdGroup">

<choice>

<sequence>

<element name="agencyORI" type="string"/>

<element name="agencyName" type="string" minOccurs="0"/>

</sequence>

<sequence>

<element name="agencyORI" type="string" minOccurs="0"/>

<element name="agencyName" type="string"/>

</sequence>

</choice>

</group>

with the following error:

Ambiguous content model : the following particles overlap :

<element maxOccurs="1" minOccurs="1" name="agencyORI" type="string"/>

from group agencyIdGroup,

<element maxOccurs="1" minOccurs="0" name="agencyORI" type="string"/>

from group agencyIdGroup,

The logic of the group definition above is: 

((agencyORI, agencyName?) | (agencyORI?, agencyName))

where ‘,’ represents a sequence, ‘?’ represents optional, and ‘|’ represents a logical OR. As a

parser processes this expression left-to-right, and as it encounters the first occurrence of 

agencyORI, it doesn’t have enough information to determine how the element should be 

handled without looking further ahead to the second (optional) occurrence of agencyORI. The 

forward-looking dependency violates the following constraint in schema reference [12]: 

Section 3.8.6 Constraints on Model Group Schema Components

Schema Component Constraint: Unique Particle Attribution

A content model must be formed such that during ·validation· of an

element information item sequence, the particle contained directly,

indirectly or ·implicitly· therein with which to attempt to ·validate·

each item in the sequence in turn can be uniquely determined without

examining the content or attributes of that item, and without any

information about the items in the remainder of the sequence...

Therefore, SQC flags an ambiguous content model error. 

A simplified expression producing the same possible sequence of elements is: 

((agencyORI, agencyName?) | agencyName)

6 
In this expression, the ambiguity with the first occurrence of agencyORI is obviated. Using this 

logic, the following group definition was substituted, and the resulting schema passes SQC 

without any warnings or errors: 

<!-- Agency ORI and Name Elements -->

<group name="agencyIdGroup">

<choice>

<sequence>

<element name="agencyORI" type="string"/>

<element name="agencyName" type="string" minOccurs="0"/>

</sequence>

<sequence>

<element name="agencyName" type="string"/>

</sequence>

</choice>

</group>

3.2.3 Target Namespace Added 

The next step taken to revise the JTF’s files was to address the issues preventing the published 

schema from working with XMLSpy 3.5, while the same schema successfully worked using 

Xerces-j 1.3.0. The error message generated by XMLSpy 3.5 (listed in Section 3.1) points to the

fact that no target namespace is declared in the schema. As a result, the use of target 

namespaces became a focus.[14] 

The benefits of defining a schema have already been discussed. Through the publishing of a 

schema, an organization provides documentation regarding the format of a document for their

particular application, and more importantly, they provide an automated means for users to 

validate instances of this format. One of the fundamental pieces of information included in a 

schema is the set of application-specific tags (elements and attributes) permitted to be a part of

that document. (Remember a key capability of XML is the extensibility of defining customized 

tags.) 

For an in-depth understanding of namespaces, please refer to reference [14]. Regardless of the

discrepancy over the declaration of a target namespace, the JTF should not only publish a 

schema, but it should also establish its own target namespace for its standardized rap sheet. This 

way, ownership of the tags used in the standardized rap sheet is clearly established. 

The JTF’s published schema does not declare a target namespace. It only references the XML

Schema namespace (http://www.w3.org/2001/XMLSchema) and all new tags defined for the 

standardized rap sheet are assumed to be additions to this namespace. This default association is

somewhat lacking. 

It should be noted that the JTF introduces a namespace declaration at the top of their XML rap 

sheet referring to (http://www.nlets.org/formats/rapsheet), but this namespace is never actually

used in the document. It is believed this is an indication that the JTF was considering the use of 

a target namespace, but stopped short of formally implementing it in their current rap sheet 

specification.

Keep in mind that in coordination with resolving namespace issues, the JTF schema was being 

updated to the Schema Recommendation. Tests were conducted on versions of the JTF files

7
where namespace declarations and usage remained unchanged. Xerces-j 1.4.3 and XMLSpy 4.0 

validating parsers were used, both of which are implemented according to the Schema

Recommendation, and in both cases, the validating parsers were unable to resolve rap sheetspecific element and attribute names. It was determined that the default namespace conventions

used in the JTF files had to be changed. 

To implement a target namespace in the schema, the following line at the top of the file: 

<schema xmlns="http://www.w3.org/2000/10/XMLSchema">

was changed to: 

<schema targetNamespace=http://www.nlets.org/formats/rapsheet

xmlns=http://www.w3.org/2001/XMLSchema

xmlns:rap=http://www.nlets.org/formats/rapsheet

elementFormDefault="qualified">

Notice the introduction of the targetNamespace attribute as well as the change from the 

Schema Draft (www.w3.org/2000/10/XMLSchema) to the Schema Recommendation 

(www.w3.org/2001/XMLSchema). 

Subsequently, all local references in the schema to names within the target namespace were 

modified to have the prefix “rap:”. For example, the line: 

<element name="introduction" type="introductionType"/>

was changed to: 

<element name="introduction" type="rap:introductionType"/>

Introducing a target namespace required changes to the XML rap sheet as well. The root 

element declaration: 

<rapSheet xmlns:xsi=”http://www.w3.org/2000/10/XMLSchema-instance”

xmlns:rap=”http://www.nlets.org/formats/rapsheet”

xsi:noNamespaceSchemaLocation=”Schema-0200.xsd”

version=”2.00”>

8 
was changed to: 

<rapSheet xmlns="http://www.nlets.org/formats/rapsheet"

xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xsi:schemaLocation="http://www.nlets.org/formats/rapsheet

Schema-0201.xsd"

version="2.00">

Here, the rap sheet namespace is declared to be the default namespace, so local references to

names within this namespace do not require a namespace prefix. A default namespace is 

declared using the “xmlns” attribute where there is no “:prefix” included between “xmlns” 

and the “=”.

Namespace changes were also required in the XSL stylesheet. The line: 

<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"

version="1.0">

was changed to include the target namespace declaration:

<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"

xmlns:rap="http://www.nlets.org/formats/rapsheet"

version="1.0">

The JTF stylesheet makes reference to specific portions of the standardized rap sheet using 

XPath notation.[22] XPath represents the hierarchical structure of a document using notation 

similar to that of a directory path under UNIX operating systems. Each node in the path must 

pass the Node Tests as specified in Section 2.3 of Reference [22]. One of these tests requires a 

node name to include a namespace prefix if the name belongs to a targeted namespace. In this 

case, no default namespace declaration may be used, and the prefix is mandatory. As a result,

the prefix “rap”, had to be declared in the “xmlns” attribute for the rap sheet namespace above, 

and all local references to names within the rap sheet namespace occurring within an XPath had 

to be prefixed with “rap:”. 

For example, the line in the stylesheet: 

<xsl:when test="/rapSheet/introduction/request/name!=''">

was changed to: 

<xsl:when

test="/rap:rapSheet/rap:introduction/rap:request/rap:name!=''">

9
To link the application of the XSL stylesheet to the XML rap sheet, the following processing 

instruction was added to the top of the revised rap sheet: 

<?xml-stylesheet type="text/xsl" href="Stylesheet-0201.xsl"?>

3.2.4 Explicit Namespace Declarations 

At this point, a revised set of files (an updated schema, rap sheet, and stylesheet) existed. These 

files passed all previously applied tests and worked successfully with current tools. All the 

changes discussed above were necessary to bring the JTF files up to date with current standards

and tools. 

Knowledge and experience gained with resolving namespace issues, and observing how these

changes impacted all three JTF files, prompted one final set of revisions. It should be noted that

these final changes are a matter of style and not necessity. Their adoption is strongly 

encouraged, but they are technically optional. 

Looking at the declaration and use of namespaces in the revised files described in the previous 

section, the following observations are made. 1. In the updated schema, the target namespace is 

explicitly defined by a prefix while the XML Schema namespace is declared the default. 2. In 

the updated rap sheet, the XML Schema-instance namespace is explicitly defined by a prefix, 

while the rap sheet namespace is declared the default. 3. In the stylesheet, XPath requires a 

prefix for names belonging to the target namespace, so both the rap sheet namespace and the 

XSL Transform namespace are explicitly defined by prefixes. As can be seen, there is an 

inconsistent use of explicitly defined and defaulted namespaces across the revised files.

It is important to note that in the process of evaluating necessary changes to the JTF’s original

files, a significant amount of effort was spent working through namespace issues. Due to the 

potential for confusion and introducing unnecessary complexity, it is recommended that the JTF 

adopt a style convention whereby no default namespaces are used and all namespaces are 

explicitly defined by a corresponding prefix. This convention ensures that every element and 

attribute name is self-referenced, and the reader of the file needs no external context in order to

infer the namespace to which the element or attribute belongs. Potential pitfalls with using

XPath will be avoided as well. 

Using this namespace convention, the schema’s root element was changed to: 

<xsd:schema targetNamespace="http://www.nlets.org/formats/rapsheet"

xmlns:rap="http://www.nlets.org/formats/rapsheet"

xmlns:xsd="http://www.w3.org/2001/XMLSchema"

elementFormDefault="qualified">

Note that the XML Schema namespace is defined by the prefix “xsd”, and it has been applied to 

the root element’s name “xsd:schema”. The complete effect of applying this namespace 

convention can be seen in Appendix A. 

10 
Applying this convention to the XML rap sheet, its root element is changed to: 

<rap:rapSheet xmlns:rap="http://www.nlets.org/formats/rapsheet"

xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xsi:schemaLocation="http://www.nlets.org/formats/rapsheet

Schema-0201.xsd"

version="2.00">

Note the rap sheet namespace is now explicitly defined by the prefix “rap”, and it has been

applied to the root element’s name “rap:rapSheet”. The complete effect of applying this

namespace convention can be seen in Appendix B. 

Finally, the stylesheet already uses the explicit declaration of all namespaces so no further 

revisions are required. The revised stylesheet file is listed in Appendix C. 

3.3 Testing and Validating Proposed XML Files 

As implied in the previous section, a substantial amount of testing was conducted by NIST in the 

process of revising the JTF’s files. The primary objectives were to bring the JTF files up to 

current standards, and to create a collection of files that would successfully work with a variety

of tools implemented according to the latest standards. The proposed files listed in the

appendices achieve these objectives. To recap, the tools successfully applied are listed here. 

3.3.1 Proposed Schema 

The proposed schema in Appendix A has been tested using three different tools. 

1. The proposed XML schema passes IBM’s Schema Quality Checker 1.2 with no warnings 

or errors. 

2. The revised XML rap sheet is successfully validated when applying the proposed schema

using Apache’s Xerces-j 1.4.3 validating parser. 

3. The revised XML rap sheet is successfully validated when applying the proposed schema

using Altova’s XMLSpy 4.0 validating parser. 

3.3.2 Proposed Stylesheet 

The proposed stylesheet in Appendix C has been tested using three different XSLT tools. 

1. The revised XML rap sheet is successfully transformed using Microsoft’s MSXML 3.0 

parser. 

2. The revised XML rap sheet is successfully transformed using Infoteria iXSLT 2.0c. 

3. The revised XML rap sheet is successfully transformed using Michael Kay’s InstantSaxon 6.02 XSLT. 

4. SUMMARY

Per request from the FBI, NIST has reviewed the Joint Task Force on Rap Sheet 

Standardization’s “Interstate Criminal History Transmission Specification – XML Version 2.01”, 

dated June 2001. Upon review, several technical issues were raised and revisions were

11
subsequently made to the XML schema, XML rap sheet, and XSL stylesheet originally

distributed in the JTF’s specification. These revised files are listed in the appendices and are 

available via anonymous FTP at ftp://sequoyah.nist.gov/pub/miscellaneous/jtf_xml. 

Revisions to these files primarily reflect an effort to update them according to the latest W3C 

standards, and to enable them to be successfully processed by a number of different tools. As 

these objectives were achieved, it is recommended that the JTF consider adopting these files for 

use in their rap sheet standardization efforts. 

In conclusion, XML technologies continue to be actively developed. Therefore, successful 

deployment of an XML-based rap sheet will require the JTF to establish an ongoing maintenance 

process whereby their specification is periodically reviewed and updated in order to remain 

consistent with evolving XML standards and implementations. 

5. REFERENCES 

[1] Joint Task Force on Rap Sheet Standardization, “Interstate Criminal History Transmission 

Specification – XML Version 2.01”, June 2001, PDF version available at http://www.search.org, 

Microsoft Word version available at http://www.nlets.org. 

[2] J.H. Wegstein, “A Semi-automated Single Fingerprint Identification System”, NBS 

Technical Note 481, April 1969. 

[3] M.D. Garris, C.I. Watson, R.M. McCabe, and C.L. Wilson, “User’s Guide to NIST 

Fingerprint Image Software,” NIST Technical Report and CD-ROM, to be published. 

[4] R.M. McCabe, "Data Format for the Interchange of Fingerprint, Facial, Scar Mark & Tattoo 

(SMT) Information," American National Standard ANSI/NIST-ITL 1-2000, July 2000. Available

from R.M. McCabe at NIST, 100 Bureau Drive, Stop 8940, Gaithersburg, MD 20899-8940. 

[5] Extensible Markup Language (XML) 1.0, W3C Recommendation (Second Edition), October 

2000, http://www.w3.org/TR/2000/REC-xml-20001006. 

[6] XSL Transformations (XSLT) 1.0, W3C Recommendation, November 1999, 

http://www.w3.org/TR/1999/REC-xslt-19991116. 

[7] HTML 4.01, W3C Recommendation, December 1999, http://www.w3.org/TR/1999/REChtml401-19991224. 

[8] XML Schema Part 0: Primer, W3C Working Draft, April 2000,

http://www.w3.org/TR/2000/WD-xmlschema-0-20000407. 

[9] XML Schema Part 1: Structures W3C Working Draft, April 2000,

http://www.w3.org/TR/2000/WD-xmlschema-1-20000407. 

[10] XML Schema Part 2: Datatypes, W3C Working Draft, April 2000,

http://www.w3.org/TR/2000/WD-xmlschema-2-20000407 

[11] XML Schema Part 0: Primer, W3C Recommendation, May 2001, 

http://www.w3.org/TR/2001/REC-xmlschema-0-20010502. 

[12] XML Schema Part 1: Structures, W3C Recommendation, May 2001, 

http://www.w3.org/TR/2001/REC-xmlschema-1-20010502. 

12 
[13] XML Schema Part 2: Datatypes, W3C Recommendation, May 2001, 

http://www.w3.org/TR/2001/REC-xmlschema-2-20010502. 

[14] Namespaces in XML, W3C Recommendation, January 1999, 

http://www.w3.org/TR/1999/REC-xml-names-19990114 

[15] Apache’s Xerces-j 1.3.0 and 1.4.3 validating parsers are available free of charge at

http://www.apache.org. 

[16] Altova’s XMLSpy 3.5 and 4.0 are available for purchase at http://www.xmlspy.com. 

[17] IBM’s Schema Quality Checker 1.2 is available free of charge at alphaworks.ibm.com. 

[18] Microsoft’s XML Parser (MSXML) 3.0 is available free of charge at 

http://msdn.microsoft.com/xml. 

[19] Infoteria iXSLT 2.0c is available for purchase at http://www.infoteria.com, and it is 

bundled with XMLSpy 4.0. 

[20] Michael Kay’s Instant-Saxon 6.02 is available free of charge at 

http://users.iclway.co.uk/mhkay, and it is bundled with XMLSpy 4.0. 

[21] M. Birbeck, et. al., Professional XML 2nd Edition, Wrox Press Ltd, Birmingham, UK, 

2001. 

[22] XML Path Language (Xpath) 1.0, W3C Recommendation, November 1999, 

http://www.w3.org/TR/1999/REC-xpath-19991116. 

13
APPENDIX A. Revised XML Schema 

(File name: Schema-0201.xsd) 

<?xml version="1.0" encoding="UTF-8"?>

<xsd:schema targetNamespace="http://www.nlets.org/formats/rapsheet"

xmlns:rap="http://www.nlets.org/formats/rapsheet"

xmlns:xsd="http://www.w3.org/2001/XMLSchema"

elementFormDefault="qualified">

<!-- Interstate Rap Sheet XML Schema v 2.00 -->

<!-- Name Element -->

<xsd:complexType name="lfmisfxName">

<xsd:sequence>

<xsd:element name="last" type="xsd:string"/>

<xsd:element name="first" type="xsd:string" minOccurs="0"/>

<xsd:element name="middle" type="xsd:string" minOccurs="0"/>

<xsd:element name="suffix" type="xsd:string" minOccurs="0"/>

</xsd:sequence>

</xsd:complexType>

<!-- Date Element -->

<xsd:complexType name="dateType">

<xsd:simpleContent>

<xsd:extension base="xsd:nonNegativeInteger">

<xsd:attribute name="format" type="xsd:string" use="optional"

default="CCYYMMDD"/>

</xsd:extension>

</xsd:simpleContent>

</xsd:complexType>

<!-- Agency ORI and Name Elements -->

<xsd:group name="agencyIdGroup">

<xsd:choice>

<xsd:sequence>

<xsd:element name="agencyORI" type="xsd:string"/>

<xsd:element name="agencyName" type="xsd:string" minOccurs="0"/>

</xsd:sequence>

<xsd:sequence>

<xsd:element name="agencyName" type="xsd:string"/>

</xsd:sequence>

</xsd:choice>

</xsd:group>

<!-- Top Level RapSheet Element -->

<xsd:element name="rapSheet">

<xsd:complexType>

<xsd:sequence>

<xsd:element name="introduction" type="rap:introductionType"/>

<xsd:element name="identification"

type="rap:identificationType"/>

<xsd:element name="cycle" type="rap:cycleType"

maxOccurs="unbounded"/>

<xsd:element name="agencyIndex" type="rap:agencyIndexType"/>

<xsd:element name="summary" type="rap:summaryType"

minOccurs="0"/>

</xsd:sequence>

<xsd:attribute name="version" type="xsd:string"/>

</xsd:complexType>

14 
</xsd:element>

<!-- Rap Sheet Introduction -->

<xsd:complexType name="introductionType">

<xsd:sequence>

<xsd:element name="request" maxOccurs="unbounded">

<xsd:complexType>

<xsd:sequence>

<xsd:choice>

<xsd:sequence>

<xsd:element name="fbiNumber" type="xsd:string"/>

<xsd:element name="sidNumber" type="xsd:string"

minOccurs="0"/>

</xsd:sequence>

<xsd:sequence>

<xsd:element name="fbiNumber" type="xsd:string"

minOccurs="0"/>

<xsd:element name="sidNumber" type="xsd:string"/>

</xsd:sequence>

</xsd:choice>

<xsd:element name="name" type="xsd:string"/>

<xsd:element name="purposeCode" type="xsd:string"/>

<xsd:element name="attention" type="xsd:string"/>

</xsd:sequence>

</xsd:complexType>

</xsd:element>

<xsd:element name="caveatInfo" minOccurs="0" maxOccurs="unbounded">

<xsd:complexType>

<xsd:sequence>

<xsd:element name="state" type="xsd:string"/>

<xsd:choice>

<xsd:element name="caveat" type="xsd:string"/>

<xsd:element name="index"

type="xsd:nonNegativeInteger"/>

</xsd:choice>

</xsd:sequence>

</xsd:complexType>

</xsd:element>

</xsd:sequence>

</xsd:complexType>

<!-- Rap Sheet Identification -->

<xsd:complexType name="identificationType">

<xsd:sequence>

<xsd:element name="subjectName" type="rap:lfmisfxName"

maxOccurs="unbounded"/>

<xsd:choice>

<xsd:sequence>

<xsd:element name="fbiNumber" type="xsd:string"/>

<xsd:element name="sidNumber" type="xsd:string" minOccurs="0"

maxOccurs="unbounded"/>

</xsd:sequence>

<xsd:sequence>

<xsd:element name="fbiNumber" type="xsd:string"

minOccurs="0"/>

<xsd:element name="sidNumber" type="xsd:string"

maxOccurs="unbounded"/>

</xsd:sequence>

</xsd:choice>

15
<xsd:element name="correctionalNumber" minOccurs="0"

maxOccurs="unbounded">

<xsd:complexType>

<xsd:sequence>

<xsd:element name="number" type="xsd:string"/>

<xsd:element name="state" type="xsd:string"/>

</xsd:sequence>

</xsd:complexType>

</xsd:element>

<xsd:element name="ssn" type="xsd:nonNegativeInteger" minOccurs="0"

maxOccurs="unbounded"/>

<xsd:element name="miscId" minOccurs="0" maxOccurs="unbounded">

<xsd:complexType>

<xsd:sequence>

<xsd:element name="type" type="xsd:string" minOccurs="0"/>

<xsd:element name="number" type="xsd:string"/>

</xsd:sequence>

</xsd:complexType>

</xsd:element>

<xsd:element name="driversLicense" minOccurs="0"

maxOccurs="unbounded">

<xsd:complexType>

<xsd:sequence>

<xsd:element name="number" type="xsd:string"/>

<xsd:element name="state" type="xsd:string"/>

</xsd:sequence>

</xsd:complexType>

</xsd:element>

<xsd:element name="birthplace" type="xsd:string" minOccurs="0"

maxOccurs="unbounded"/>

<xsd:element name="birthdate" type="rap:dateType"

maxOccurs="unbounded"/>

<xsd:element name="citizenship" type="xsd:string" minOccurs="0"

maxOccurs="unbounded"/>

<xsd:element name="sex" type="xsd:string" maxOccurs="unbounded"/>

<xsd:element name="race" type="xsd:string" maxOccurs="unbounded"/>

<xsd:element name="heightInfo" minOccurs="0" maxOccurs="unbounded">

<xsd:complexType>

<xsd:sequence>

<xsd:element name="height">

<xsd:complexType>

<xsd:simpleContent>

<xsd:extension base="xsd:nonNegativeInteger">

<xsd:attribute name="unit" type="xsd:string"

use="optional"

default="feetinches"/>

</xsd:extension>

</xsd:simpleContent>

</xsd:complexType>

</xsd:element>

<xsd:element name="date" type="rap:dateType"

minOccurs="0"/>

</xsd:sequence>

</xsd:complexType>

</xsd:element>

<xsd:element name="weightInfo" minOccurs="0" maxOccurs="unbounded">

<xsd:complexType>

16 
<xsd:sequence>

<xsd:element name="weight">

<xsd:complexType>

<xsd:simpleContent>

<xsd:extension base="xsd:nonNegativeInteger">

<xsd:attribute name="unit" type="xsd:string"

use="optional"

default="pounds"/>

</xsd:extension>

</xsd:simpleContent>

</xsd:complexType>

</xsd:element>

<xsd:element name="date" type="rap:dateType"

minOccurs="0"/>

</xsd:sequence>

</xsd:complexType>

</xsd:element>

<xsd:element name="eyeColorInfo" minOccurs="0"

maxOccurs="unbounded">

<xsd:complexType>

<xsd:sequence>

<xsd:element name="eyeColor" type="xsd:string"/>

<xsd:element name="date" type="rap:dateType"

minOccurs="0"/>

</xsd:sequence>

</xsd:complexType>

</xsd:element>

<xsd:element name="hairColorInfo" minOccurs="0"

maxOccurs="unbounded">

<xsd:complexType>

<xsd:sequence>

<xsd:element name="hairColor" type="xsd:string"/>

<xsd:element name="date" type="rap:dateType"

minOccurs="0"/>

</xsd:sequence>

</xsd:complexType>

</xsd:element>

<xsd:element name="skinTone" type="xsd:string" minOccurs="0"

maxOccurs="unbounded"/>

<xsd:element name="fpPatternClass" type="xsd:string" minOccurs="0"

maxOccurs="unbounded"/>

<xsd:element name="palmPrints" minOccurs="0" maxOccurs="unbounded">

<xsd:complexType>

<xsd:sequence>

<xsd:group ref="rap:agencyIdGroup"/>

<xsd:element name="format" type="xsd:string"

minOccurs="0"/>

<xsd:element name="link" type="xsd:string" minOccurs="0"/>

<xsd:element name="date" type="rap:dateType"

minOccurs="0"/>

</xsd:sequence>

</xsd:complexType>

</xsd:element>

<xsd:element name="photo" minOccurs="0" maxOccurs="unbounded">

<xsd:complexType>

<xsd:sequence>

17
<xsd:group ref="rap:agencyIdGroup"/>

<xsd:element name="format" type="xsd:string"

minOccurs="0"/>

<xsd:element name="link" type="xsd:string" minOccurs="0"/>

<xsd:element name="date" type="rap:dateType"

minOccurs="0"/>

</xsd:sequence>

</xsd:complexType>

</xsd:element>

<xsd:element name="dna" minOccurs="0" maxOccurs="unbounded">

<xsd:complexType>

<xsd:sequence>

<xsd:group ref="rap:agencyIdGroup"/>

<xsd:element name="format" type="xsd:string"

minOccurs="0"/>

<xsd:element name="link" type="xsd:string" minOccurs="0"/>

<xsd:element name="date" type="rap:dateType"

minOccurs="0"/>

</xsd:sequence>

</xsd:complexType>

</xsd:element>

<xsd:element name="smtInfo" minOccurs="0" maxOccurs="unbounded">

<xsd:complexType>

<xsd:sequence>

<xsd:group ref="rap:agencyIdGroup"/>

<xsd:choice>

<xsd:element name="smt" type="xsd:string"/>

<xsd:element name="code" type="xsd:string"/>

</xsd:choice>

<xsd:element name="format" type="xsd:string"

minOccurs="0"/>

<xsd:element name="link" type="xsd:string" minOccurs="0"/>

<xsd:element name="date" type="rap:dateType"

minOccurs="0"/>

</xsd:sequence>

</xsd:complexType>

</xsd:element>

<xsd:element name="employment" minOccurs="0" maxOccurs="unbounded">

<xsd:complexType>

<xsd:sequence>

<xsd:element name="occupation" type="xsd:string"

minOccurs="0"/>

<xsd:element name="employerName" type="xsd:string"/>

<xsd:element name="date" type="rap:dateType"

minOccurs="0"/>

</xsd:sequence>

</xsd:complexType>

</xsd:element>

<xsd:element name="residence" minOccurs="0" maxOccurs="unbounded">

<xsd:complexType>

<xsd:sequence>

<xsd:element name="address" type="xsd:string"/>

<xsd:element name="date" type="rap:dateType"

minOccurs="0"/>

</xsd:sequence>

</xsd:complexType>

</xsd:element>

18 
<xsd:element name="cautionInfo" minOccurs="0" maxOccurs="unbounded">

<xsd:complexType>

<xsd:sequence>

<xsd:element name="caution" type="xsd:string"/>

<xsd:element name="state" type="xsd:string"/>

<xsd:element name="date" type="rap:dateType"

minOccurs="0"/>

</xsd:sequence>

</xsd:complexType>

</xsd:element>

<xsd:element name="iffsDisqualified" type="xsd:string"

minOccurs="0"/>

<xsd:element name="offenderNoticeInfo" minOccurs="0"

maxOccurs="unbounded">

<xsd:complexType>

<xsd:sequence>

<xsd:choice>

<xsd:element name="offenderNotice" type="xsd:string"/>

<xsd:element name="index" type="xsd:string"/>

</xsd:choice>

<xsd:element name="state" type="xsd:string"/>

</xsd:sequence>

</xsd:complexType>

</xsd:element>

<xsd:element name="commentsInfo" minOccurs="0"

maxOccurs="unbounded">

<xsd:complexType>

<xsd:sequence>

<xsd:element name="comments" type="xsd:string"/>

<xsd:element name="state" type="xsd:string"/>

</xsd:sequence>

</xsd:complexType>

</xsd:element>

</xsd:sequence>

</xsd:complexType>

<!-- Rap Sheet Cycle -->

<xsd:complexType name="cycleType">

<xsd:sequence>

<xsd:element name="earliestDate" type="rap:dateType"/>

<xsd:element name="trackingNumber" type="xsd:string" minOccurs="0"/>

<xsd:element name="arrest" minOccurs="0">

<xsd:complexType>

<xsd:sequence>

<xsd:group ref="rap:agencyIdGroup"/>

<xsd:element name="subjectName" type="rap:lfmisfxName"

minOccurs="0"/>

<xsd:element name="date" type="rap:dateType"/>

<xsd:element name="type" type="xsd:string" minOccurs="0"/>

<xsd:element name="arrestCaseNumber" type="xsd:string"

minOccurs="0"/>

<xsd:element name="offenderId" type="xsd:string"

minOccurs="0"/>

<xsd:element name="comments" type="xsd:string"

minOccurs="0"/>

<xsd:element name="arrestCharge" maxOccurs="unbounded">

<xsd:complexType>

19
<xsd:sequence>

<xsd:element name="arrestChargeSequence"

type="xsd:string" minOccurs="0"/>

<xsd:element name="chargeCaseNumber"

type="xsd:string" minOccurs="0"/>

<xsd:element name="offenseDate"

type="rap:dateType" minOccurs="0"/>

<xsd:element name="literal" type="xsd:string"/>

<xsd:element name="statute" type="xsd:string"

minOccurs="0"/>

<xsd:element name="offenseCode" type="xsd:string"

minOccurs="0"/>

<xsd:element name="ncicCode"

type="xsd:nonNegativeInteger"

minOccurs="0"/>

<xsd:element name="counts"

type="xsd:nonNegativeInteger"

minOccurs="0"/>

<xsd:element name="severity" type="xsd:string"/>

<xsd:element name="actionLiteral"

type="xsd:string" minOccurs="0"/>

<xsd:element name="actionDate" type="rap:dateType"

minOccurs="0"/>

<xsd:element name="comments" type="xsd:string"

minOccurs="0"/>

</xsd:sequence>

</xsd:complexType>

</xsd:element>

</xsd:sequence>

</xsd:complexType>

</xsd:element>

<xsd:element name="prosecutorDisposition" minOccurs="0"

maxOccurs="unbounded">

<xsd:complexType>

<xsd:sequence>

<xsd:group ref="rap:agencyIdGroup"/>

<xsd:element name="subjectName" type="rap:lfmisfxName"

minOccurs="0"/>

<xsd:element name="prosecutorCaseNumber" type="xsd:string"

minOccurs="0"/>

<xsd:element name="prosecutorCharge" maxOccurs="unbounded">

<xsd:complexType>

<xsd:sequence>

<xsd:element name="arrestChargeSequence"

type="xsd:string" minOccurs="0"/>

<xsd:element name="offenseDate"

type="rap:dateType" minOccurs="0"/>

<xsd:element name="literal" type="xsd:string"/>

<xsd:element name="statute" type="xsd:string"

minOccurs="0"/>

<xsd:element name="offenseCode" type="xsd:string"

minOccurs="0"/>

<xsd:element name="ncicCode"

type="xsd:nonNegativeInteger"

minOccurs="0"/>

<xsd:element name="counts"

type="xsd:nonNegativeInteger"

20 
minOccurs="0"/>

<xsd:element name="severity" type="xsd:string"/>

<xsd:element name="actionLiteral"

type="xsd:string"/>

<xsd:element name="actionDate"

type="rap:dateType"/>

<xsd:element name="comments" type="xsd:string"

minOccurs="0"/>

</xsd:sequence>

</xsd:complexType>

</xsd:element>

</xsd:sequence>

</xsd:complexType>

</xsd:element>

<xsd:element name="courtDisposition" minOccurs="0"

maxOccurs="unbounded">

<xsd:complexType>

<xsd:sequence>

<xsd:group ref="rap:agencyIdGroup"/>

<xsd:element name="subjectName" type="rap:lfmisfxName"

minOccurs="0"/>

<xsd:element name="courtCaseNumber" type="xsd:string"

minOccurs="0"/>

<xsd:element name="courtCharge" maxOccurs="unbounded">

<xsd:complexType>

<xsd:sequence>

<xsd:element name="arrestChargeSequence"

type="xsd:string" minOccurs="0"/>

<xsd:element name="offenseDate"

type="rap:dateType" minOccurs="0"/>

<xsd:element name="literal" type="xsd:string"/>

<xsd:element name="statute" type="xsd:string"

minOccurs="0"/>

<xsd:element name="offenseCode" type="xsd:string"

minOccurs="0"/>

<xsd:element name="ncicCode"

type="xsd:nonNegativeInteger"

minOccurs="0"/>

<xsd:element name="counts"

type="xsd:nonNegativeInteger"

minOccurs="0"/>

<xsd:element name="severity" type="xsd:string"/>

<xsd:element name="actionLiteral"

type="xsd:string"/>

<xsd:element name="actionType" type="xsd:string"/>

<xsd:element name="actionDate"

type="rap:dateType"/>

<xsd:element name="comments" type="xsd:string"

minOccurs="0"/>

</xsd:sequence>

</xsd:complexType>

</xsd:element>

</xsd:sequence>

</xsd:complexType>

</xsd:element>

<xsd:element name="sentencing" minOccurs="0" maxOccurs="unbounded">

<xsd:complexType>

21
<xsd:sequence>

<xsd:group ref="rap:agencyIdGroup"/>

<xsd:element name="courtCaseNumber" type="xsd:string"

minOccurs="0"/>

<xsd:element name="arrestChargeSequence" type="xsd:string"

minOccurs="0"/>

<xsd:element name="sentence" type="xsd:string"/>

<xsd:element name="date" type="rap:dateType"/>

<xsd:element name="comments" type="xsd:string"

minOccurs="0"/>

</xsd:sequence>

</xsd:complexType>

</xsd:element>

<xsd:element name="corrections" minOccurs="0" maxOccurs="unbounded">

<xsd:complexType>

<xsd:sequence>

<xsd:group ref="rap:agencyIdGroup"/>

<xsd:element name="subjectName" type="rap:lfmisfxName"

minOccurs="0"/>

<xsd:element name="correctionalNumber" type="xsd:string"

minOccurs="0"/>

<xsd:element name="courtCaseNumber" type="xsd:string"

minOccurs="0"/>

<xsd:element name="actionLiteral" type="xsd:string"/>

<xsd:element name="actionDate" type="rap:dateType"/>

<xsd:element name="comments" type="xsd:string"

minOccurs="0"/>

</xsd:sequence>

</xsd:complexType>

</xsd:element>

</xsd:sequence>

</xsd:complexType>

<!-- Rap Sheet Agency Index -->

<xsd:complexType name="agencyIndexType">

<xsd:sequence>

<xsd:element name="agencyInfo" maxOccurs="unbounded">

<xsd:complexType>

<xsd:sequence>

<xsd:group ref="rap:agencyIdGroup"/>

<xsd:element name="department" type="xsd:string"

minOccurs="0"/>

<xsd:element name="phone" type="xsd:string" minOccurs="0"/>

<xsd:element name="fax" type="xsd:string" minOccurs="0"/>

<xsd:element name="internetEmail" type="xsd:string"

minOccurs="0"/>

<xsd:element name="contactPerson" type="xsd:string"

minOccurs="0"/>

<xsd:element name="addressInfo" minOccurs="0">

<xsd:complexType>

<xsd:sequence>

<xsd:choice>

<xsd:element name="address" type="xsd:string"/>

<xsd:sequence>

<xsd:element name="buildingName"

type="xsd:string"

22 
minOccurs="0"/>

<xsd:element name="roomNumber"

type="xsd:string"

minOccurs="0"/>

<xsd:element name="postOfficeBox"

type="xsd:string"

minOccurs="0"/>

<xsd:element name="streetNumber"

type="xsd:string"

minOccurs="0"/>

<xsd:element name="street" type="xsd:string"

minOccurs="0"/>

<xsd:element name="city" type="xsd:string"

minOccurs="0"/>

<xsd:element name="state" type="xsd:string"

minOccurs="0"/>

<xsd:element name="zipcode"

type="xsd:string"

minOccurs="0"/>

<xsd:element name="county" type="xsd:string"

minOccurs="0"/>

<xsd:element name="country"

type="xsd:string"

minOccurs="0"/>

<xsd:element name="foreignPostalCode"

type="xsd:string"

minOccurs="0"/>

</xsd:sequence>

</xsd:choice>

</xsd:sequence>

</xsd:complexType>

</xsd:element>

</xsd:sequence>

</xsd:complexType>

</xsd:element>

</xsd:sequence>

</xsd:complexType>

<!-- Rap Sheet Summary -->

<xsd:complexType name="summaryType">

<xsd:sequence>

<xsd:element name="cautionInfo" minOccurs="0" maxOccurs="unbounded">

<xsd:complexType>

<xsd:sequence>

<xsd:element name="caution" type="xsd:string"/>

<xsd:element name="date" type="rap:dateType"

minOccurs="0"/>

</xsd:sequence>

</xsd:complexType>

</xsd:element>

<xsd:element name="iffsDisqualified" type="xsd:string"

minOccurs="0"/>

<xsd:element name="totalArrests" type="xsd:nonNegativeInteger"/>

<xsd:element name="totalCharges">

<xsd:complexType>

<xsd:sequence>

<xsd:element name="felony" type="xsd:nonNegativeInteger"/>

<xsd:element name="misdemeanor"

23
type="xsd:nonNegativeInteger"/>

<xsd:element name="localOrdinance"

type="xsd:nonNegativeInteger"/>

<xsd:element name="other" type="xsd:nonNegativeInteger"/>

<xsd:element name="unknown" type="xsd:nonNegativeInteger"/>

</xsd:sequence>

</xsd:complexType>

</xsd:element>

<xsd:element name="totalConvictions">

<xsd:complexType>

<xsd:sequence>

<xsd:element name="felony" type="xsd:nonNegativeInteger"/>

<xsd:element name="misdemeanor"

type="xsd:nonNegativeInteger"/>

<xsd:element name="localOrdinance"

type="xsd:nonNegativeInteger"/>

<xsd:element name="other" type="xsd:nonNegativeInteger"/>

<xsd:element name="unknown" type="xsd:nonNegativeInteger"/>

</xsd:sequence>

</xsd:complexType>

</xsd:element>

<xsd:element name="totalFailuresToAppear"

type="xsd:nonNegativeInteger"/>

<xsd:element name="totalRevocations" type="xsd:nonNegativeInteger"/>

<xsd:element name="firstEventDate" type="rap:dateType"/>

<xsd:element name="lastEventDate" type="rap:dateType"/>

</xsd:sequence>

</xsd:complexType>

</xsd:schema>

24 
APPENDIX B. Revised XML Rap Sheet 

(File name: Rapsheet-0201.xml) 

<?xml version="1.0" encoding="UTF-8"?>

<?xml-stylesheet type="text/xsl" href="Stylesheet-0201.xsl"?>

<rap:rapSheet xmlns:rap="http://www.nlets.org/formats/rapsheet"

xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xsi:schemaLocation="http://www.nlets.org/formats/rapsheet

Schema-0201.xsd"

version="2.00">

<rap:introduction>

<rap:request>

<rap:fbiNumber>900660</rap:fbiNumber>

<rap:sidNumber>CA99999978</rap:sidNumber>

<rap:name>Jones, John P</rap:name>

<rap:purposeCode>C</rap:purposeCode>

<rap:attention>AL 911137</rap:attention>

</rap:request>

<rap:caveatInfo>

<rap:state>CA</rap:state>

<rap:caveat>This record is provided in response to your request.

Use of the information contained on this record is governed by

state and federal law.

</rap:caveat>

</rap:caveatInfo>

<rap:caveatInfo>

<rap:state>CA</rap:state>

<rap:caveat>If the request for this information did not include

fingerprints, this record may not describe the subject of the

inquiry. There may be further information concerning this

subject in local files.

</rap:caveat>

</rap:caveatInfo>

<rap:caveatInfo>

<rap:state>CA</rap:state>

<rap:index>001</rap:index>

</rap:caveatInfo>

</rap:introduction>

<rap:identification>

<rap:subjectName>

<rap:last>Jones</rap:last>

<rap:first>John</rap:first>

<rap:middle>P</rap:middle>

<rap:suffix>Jr</rap:suffix>

</rap:subjectName>

<rap:subjectName>

<rap:last>Jones</rap:last>

<rap:first>John</rap:first>

<rap:middle>Quincy</rap:middle>

<rap:suffix>Jr</rap:suffix>

</rap:subjectName>

<rap:fbiNumber>62660CA12</rap:fbiNumber>

<rap:sidNumber>CA99999978</rap:sidNumber>

<rap:sidNumber>AZ12345678</rap:sidNumber>

25
<rap:correctionalNumber>

<rap:number>742786</rap:number>

<rap:state>CA</rap:state>

</rap:correctionalNumber>

<rap:ssn>220565860</rap:ssn>

<rap:miscId>

<rap:type>Army Serial</rap:type>

<rap:number>24680357</rap:number>

</rap:miscId>

<rap:miscId>

<rap:type>Passport</rap:type>

<rap:number>DC297138</rap:number>

</rap:miscId>

<rap:driversLicense>

<rap:number>220565860</rap:number>

<rap:state>CA</rap:state>

</rap:driversLicense>

<rap:birthplace>CA</rap:birthplace>

<rap:birthdate format="CCYYMMDD">19530212</rap:birthdate>

<rap:birthdate>19531202</rap:birthdate>

<rap:citizenship>US</rap:citizenship>

<rap:sex>Female</rap:sex>

<rap:race>White</rap:race>

<rap:race>Asian</rap:race>

<rap:heightInfo>

<rap:height unit="feetinches">601</rap:height>

<rap:date>19940704</rap:date>

</rap:heightInfo>

<rap:heightInfo>

<rap:height unit="inches">75</rap:height>

<rap:date>19960311</rap:date>

</rap:heightInfo>

<rap:weightInfo>

<rap:weight unit="pounds">180</rap:weight>

<rap:date>19970321</rap:date>

</rap:weightInfo>

<rap:eyeColorInfo>

<rap:eyeColor>Blue</rap:eyeColor>

<rap:date>19880321</rap:date>

</rap:eyeColorInfo>

<rap:hairColorInfo>

<rap:hairColor>Brown</rap:hairColor>

<rap:date>19890704</rap:date>

</rap:hairColorInfo>

<rap:hairColorInfo>

<rap:hairColor>Black</rap:hairColor>

<rap:date>19951204</rap:date>

</rap:hairColorInfo>

<rap:skinTone>Fair</rap:skinTone>

<rap:fpPatternClass>LLLWLAWWRA</rap:fpPatternClass>

<rap:palmPrints>

<rap:agencyORI>CA0000041</rap:agencyORI>

<rap:agencyName>Travis County Sheriff</rap:agencyName>

<rap:format>HC</rap:format>

<rap:link>

http://www.nlets.org/image/123.jpg

</rap:link>

26 
<rap:date>19920704</rap:date>

</rap:palmPrints>

<rap:photo>

<rap:agencyORI>CA0000012</rap:agencyORI>

<rap:format>NIST</rap:format>

<rap:link>

http://www.nlets.org/image/123.jpg

</rap:link>

<rap:date>19920704</rap:date>

</rap:photo>

<rap:dna>

<rap:agencyORI>CA0000012</rap:agencyORI>

<rap:format>HC</rap:format>

<rap:link>

Send Fax request to 602-555-1234 with SID and return Fax number

</rap:link>

<rap:date>19920704</rap:date>

</rap:dna>

<rap:smtInfo>

<rap:agencyORI>CA0000041</rap:agencyORI>

<rap:smt>Dragon with blue band around its neck and a rose

in background with green stem

</rap:smt>

<rap:format>NIST</rap:format>

<rap:date>19910111</rap:date>

</rap:smtInfo>

<rap:smtInfo>

<rap:agencyORI>CA0000012</rap:agencyORI>

<rap:code>TAT RF ARM</rap:code>

<rap:date>19910111</rap:date>

</rap:smtInfo>

<rap:employment>

<rap:occupation>Taxi Driver</rap:occupation>

<rap:employerName>Unknown</rap:employerName>

<rap:date>19870915</rap:date>

</rap:employment>

<rap:residence>

<rap:address>105 Fourth St, El Cajon, CA</rap:address>

<rap:date>19641128</rap:date>

</rap:residence>

<rap:residence>

<rap:address>2920 Old Fork Rd. Los Arboles CA</rap:address>

</rap:residence>

<rap:cautionInfo>

<rap:caution>Armed and dangerous</rap:caution>

<rap:state>CA</rap:state>

<rap:date>19951102</rap:date>

</rap:cautionInfo>

<rap:iffsDisqualified>F</rap:iffsDisqualified>

<rap:offenderNoticeInfo>

<rap:offenderNotice>Authorized Text</rap:offenderNotice>

<rap:state>CA</rap:state>

</rap:offenderNoticeInfo>

<rap:offenderNoticeInfo>

<rap:index>002</rap:index>

<rap:state>CA</rap:state>

</rap:offenderNoticeInfo>

27
<rap:commentsInfo>

<rap:comments>Subject stutters</rap:comments>

<rap:state>CA</rap:state>

</rap:commentsInfo>

</rap:identification>

<rap:cycle>

<rap:earliestDate>19950704</rap:earliestDate>

<rap:trackingNumber>AD486</rap:trackingNumber>

<rap:arrest>

<rap:agencyORI>CA0000041</rap:agencyORI>

<rap:subjectName>

<rap:last>Jones</rap:last>

<rap:first>John</rap:first>

<rap:middle>M</rap:middle>

<rap:suffix>Jr</rap:suffix>

</rap:subjectName>

<rap:date>19950704</rap:date>

<rap:type>ADULT</rap:type>

<rap:arrestCaseNumber>C4-995207</rap:arrestCaseNumber>

<rap:offenderId>987-876543</rap:offenderId>

<rap:comments>Resisted arrest. Attempted to flee on

foot.</rap:comments>

<rap:arrestCharge>

<rap:arrestChargeSequence>1</rap:arrestChargeSequence>

<rap:chargeCaseNumber>1</rap:chargeCaseNumber>

<rap:offenseDate>19960704</rap:offenseDate>

<rap:literal>Disord Conduct</rap:literal>

<rap:statute>CA877-3</rap:statute>

<rap:offenseCode>876-431</rap:offenseCode>

<rap:ncicCode>1304</rap:ncicCode>

<rap:counts>1</rap:counts>

<rap:severity>M</rap:severity>

<rap:actionLiteral>

Referred for prosecution

</rap:actionLiteral>

<rap:actionDate>19960707</rap:actionDate>

<rap:comments>Here is a sample charge comment which pertains

only to this single charge and not to the overall

arrest segment

</rap:comments>

</rap:arrestCharge>

<rap:arrestCharge>

<rap:arrestChargeSequence>2</rap:arrestChargeSequence>

<rap:chargeCaseNumber>2</rap:chargeCaseNumber>

<rap:offenseDate>19960704</rap:offenseDate>

<rap:literal>Breaking and entering</rap:literal>

<rap:statute>CA877-16</rap:statute>

<rap:offenseCode>876-889</rap:offenseCode>

<rap:ncicCode>1305</rap:ncicCode>

<rap:counts>2</rap:counts>

<rap:severity>M</rap:severity>

<rap:comments>This charge comment also pertains only to this

single charge and not to the overall arrest segment

</rap:comments>

</rap:arrestCharge>

</rap:arrest>

28 
<rap:prosecutorDisposition>

<rap:agencyORI>CA0003451</rap:agencyORI>

<rap:agencyName>District 7 Prosecutor</rap:agencyName>

<rap:subjectName>

<rap:last>Jones</rap:last>

<rap:first>John</rap:first>

<rap:middle>Paul</rap:middle>

<rap:suffix>Sr</rap:suffix>

</rap:subjectName>

<rap:prosecutorCaseNumber>D4661</rap:prosecutorCaseNumber>

<rap:prosecutorCharge>

<rap:arrestChargeSequence>01</rap:arrestChargeSequence>

<rap:offenseDate>19950814</rap:offenseDate>

<rap:literal>Disord Conduct</rap:literal>

<rap:statute>PC843-21A</rap:statute>

<rap:offenseCode>9961</rap:offenseCode>

<rap:ncicCode>1307</rap:ncicCode>

<rap:counts>1</rap:counts>

<rap:severity>M</rap:severity>

<rap:actionLiteral>Charge Filed</rap:actionLiteral>

<rap:actionDate>19950920</rap:actionDate>

<rap:comments>Prosecution went smoothly</rap:comments>

</rap:prosecutorCharge>

</rap:prosecutorDisposition>

<rap:courtDisposition>

<rap:agencyORI>CA0002221</rap:agencyORI>

<rap:agencyName>County Court at Law # 4</rap:agencyName>

<rap:subjectName>

<rap:last>Jones</rap:last>

<rap:first>John</rap:first>

<rap:middle>M</rap:middle>

<rap:suffix>Sr</rap:suffix>

</rap:subjectName>

<rap:courtCaseNumber>JJ949</rap:courtCaseNumber>

<rap:courtCharge>

<rap:arrestChargeSequence>02</rap:arrestChargeSequence>

<rap:offenseDate>19960704</rap:offenseDate>

<rap:literal>Assault</rap:literal>

<rap:statute>MCL 333.14327A</rap:statute>

<rap:offenseCode>9961</rap:offenseCode>

<rap:ncicCode>1307</rap:ncicCode>

<rap:counts>1</rap:counts>

<rap:severity>F</rap:severity>

<rap:actionLiteral>Convicted</rap:actionLiteral>

<rap:actionType>310</rap:actionType>

<rap:actionDate>19950721</rap:actionDate>

<rap:comments>None</rap:comments>

</rap:courtCharge>

<rap:courtCharge>

<rap:arrestChargeSequence>02</rap:arrestChargeSequence>

<rap:offenseDate>19960704</rap:offenseDate>

<rap:literal>Assault</rap:literal>

<rap:statute>MCL 333.14327A</rap:statute>

<rap:offenseCode>9961</rap:offenseCode>

<rap:ncicCode>1307</rap:ncicCode>

<rap:counts>1</rap:counts>

29
<rap:severity>L</rap:severity>

<rap:actionLiteral>Convicted</rap:actionLiteral>

<rap:actionType>310</rap:actionType>

<rap:actionDate>19950721</rap:actionDate>

<rap:comments>None</rap:comments>

</rap:courtCharge>

</rap:courtDisposition>

<rap:sentencing>

<rap:agencyORI>CA0002221</rap:agencyORI>

<rap:agencyName>County Court at Law # 4</rap:agencyName>

<rap:courtCaseNumber>CD462</rap:courtCaseNumber>

<rap:arrestChargeSequence>2</rap:arrestChargeSequence>

<rap:sentence>3Y Prison, $500 fine and costs</rap:sentence>

<rap:date>19950312</rap:date>

<rap:comments>None</rap:comments>

</rap:sentencing>

<rap:corrections>

<rap:agencyORI>CA0000012</rap:agencyORI>

<rap:agencyName>California Dept. of Criminal

Justice</rap:agencyName>

<rap:subjectName>

<rap:last>Jones</rap:last>

<rap:first>John</rap:first>

<rap:middle>Q</rap:middle>

</rap:subjectName>

<rap:correctionalNumber>CA742786</rap:correctionalNumber>

<rap:courtCaseNumber>CD462</rap:courtCaseNumber>

<rap:actionLiteral>Incarcerated</rap:actionLiteral>

<rap:actionDate>19961029</rap:actionDate>

</rap:corrections>

<rap:corrections>

<rap:agencyORI>CA0000012</rap:agencyORI>

<rap:agencyName>California Dept. of Criminal

Justice</rap:agencyName>

<rap:subjectName>

<rap:last>Jones</rap:last>

<rap:first>John</rap:first>

<rap:middle>Q</rap:middle>

</rap:subjectName>

<rap:correctionalNumber>CA742786</rap:correctionalNumber>

<rap:courtCaseNumber>CD462</rap:courtCaseNumber>

<rap:actionLiteral>Released</rap:actionLiteral>

<rap:actionDate>19970712</rap:actionDate>

<rap:comments>Early release</rap:comments>

</rap:corrections>

</rap:cycle>

<rap:agencyIndex>

<rap:agencyInfo>

<rap:agencyORI>CA0000041</rap:agencyORI>

<rap:agencyName>Travis County Sheriff</rap:agencyName>

<rap:phone>512-424-2000</rap:phone>

<rap:fax>512-424-5911</rap:fax>

<rap:internetEmail>records@catcs.state.ca.us</rap:internetEmail>

<rap:contactPerson>Joe Rap Sheet</rap:contactPerson>

<rap:addressInfo>

<rap:buildingName>Rabung Building</rap:buildingName>

<rap:roomNumber>4B20</rap:roomNumber>

30 
<rap:postOfficeBox/>

<rap:streetNumber>5805</rap:streetNumber>

<rap:street>N. Lamar</rap:street>

<rap:city>Tustin</rap:city>

<rap:state>CA</rap:state>

<rap:zipcode>78765</rap:zipcode>

<rap:county>Travis</rap:county>

<rap:country>US</rap:country>

</rap:addressInfo>

</rap:agencyInfo>

<rap:agencyInfo>

<rap:agencyORI>CA0003451</rap:agencyORI>

<rap:agencyName>District 7 Prosecutor</rap:agencyName>

<rap:phone>512-505-2000</rap:phone>

<rap:addressInfo>

<rap:address>1000 S. Alexander St. Logan CA 81002</rap:address>

</rap:addressInfo>

</rap:agencyInfo>

<rap:agencyInfo>

<rap:agencyORI>CA0002221</rap:agencyORI>

<rap:agencyName>County Court at Law # 4</rap:agencyName>

<rap:phone>512-632-8882</rap:phone>

<rap:fax>512-632-1999</rap:fax>

<rap:addressInfo>

<rap:streetNumber>1000</rap:streetNumber>

<rap:street>S. Alexander St.</rap:street>

<rap:city>Logan</rap:city>

<rap:state>CA</rap:state>

<rap:zipcode>81002</rap:zipcode>

<rap:country>US</rap:country>

</rap:addressInfo>

</rap:agencyInfo>

<rap:agencyInfo>

<rap:agencyORI>CA0000012</rap:agencyORI>

<rap:agencyName>California Dept. of Criminal

Justice</rap:agencyName>

<rap:phone>512-424-1003</rap:phone>

<rap:internetEmail>records@cadcj.state.ca.us</rap:internetEmail>

<rap:addressInfo>

<rap:postOfficeBox>5311</rap:postOfficeBox>

<rap:city>Riverdale</rap:city>

<rap:state>CA</rap:state>

<rap:zipcode>92021</rap:zipcode>

<rap:county>River</rap:county>

<rap:country>US</rap:country>

</rap:addressInfo>

</rap:agencyInfo>

</rap:agencyIndex>

<rap:summary>

<rap:cautionInfo>

<rap:caution>Known to carry a weapon.</rap:caution>

<rap:date>19961017</rap:date>

</rap:cautionInfo>

<rap:cautionInfo>

<rap:caution>Has threatened police officer and

fought with fellow inmates while incarcerated.

</rap:caution>

31
<rap:date>19961018</rap:date>

</rap:cautionInfo>

<rap:iffsDisqualified>F</rap:iffsDisqualified>

<rap:totalArrests>2</rap:totalArrests>

<rap:totalCharges>

<rap:felony>0</rap:felony>

<rap:misdemeanor>1</rap:misdemeanor>

<rap:localOrdinance>1</rap:localOrdinance>

<rap:other>0</rap:other>

<rap:unknown>0</rap:unknown>

</rap:totalCharges>

<rap:totalConvictions>

<rap:felony>0</rap:felony>

<rap:misdemeanor>1</rap:misdemeanor>

<rap:localOrdinance>0</rap:localOrdinance>

<rap:other>0</rap:other>

<rap:unknown>0</rap:unknown>

</rap:totalConvictions>

<rap:totalFailuresToAppear>2</rap:totalFailuresToAppear>

<rap:totalRevocations>0</rap:totalRevocations>

<rap:firstEventDate>19970712</rap:firstEventDate>

<rap:lastEventDate>19970712</rap:lastEventDate>

</rap:summary>

</rap:rapSheet>

32 
APPENDIX C. Revised XML Stylesheet 

(File name: Stylesheet-0201.xsl) 

<?xml version="1.0"?>

<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"

xmlns:rap="http://www.nlets.org/formats/rapsheet"

version="1.0">

<!------------------+------------------->

<!-- root -->

<!------------------+------------------->

<!-- This template controls formatting of the rap sheet by matching the

document root. The second tier of formatting is controlled by the

/rapSheet template.

-->

<xsl:template match="/">

<HTML>

<HEAD>

<TITLE>

<xsl:choose>

<xsl:when

test="/rap:rapSheet/rap:introduction/rap:request/rap:name!=''">

<xsl:text>Rap Sheet for </xsl:text>

<xsl:value-of

select="/rap:rapSheet/rap:introduction/rap:request/rap:name"/>

</xsl:when>

<xsl:otherwise>Rap Sheet for Unnamed Subject</xsl:otherwise>

</xsl:choose>

</TITLE>

</HEAD>

<BODY BGCOLOR="#B0C4DE">

<xsl:apply-templates select="/rap:rapSheet"/>

</BODY>

</HTML>

</xsl:template>

<!------------------+------------------->

<!-- format-subjectName -->

<!------------------+------------------->

<!-- This template controls formatting of subject names.

-->

<xsl:template name="rap:format-subjectName">

<xsl:param name="subject" select="."/>

<xsl:value-of select="$subject/rap:last"/>

<xsl:if test="$subject/rap:first!=''">

<xsl:text>, </xsl:text><xsl:value-of select="$subject/rap:first"/>

</xsl:if>

<xsl:if test="$subject/rap:middle!=''">

33
<xsl:text> </xsl:text> <xsl:value-of select="$subject/rap:middle"/>

</xsl:if>

<xsl:if test="$subject/rap:suffix!=''">

<xsl:text> </xsl:text> <xsl:value-of select="$subject/rap:suffix"/>

</xsl:if>

</xsl:template>

<!------------------+------------------->

<!-- format-date -->

<!------------------+------------------->

<!-- The following template does all standard formatting of dates in

the stylesheet. The optional parameter date can be used to

select which date field to format but the default is to format

the field named date with the current element as parent.

-->

<xsl:template name="rap:format-date">

<xsl:param name="date" select="./rap:date"/>

<xsl:choose>

<xsl:when test="$date!=''">

<xsl:value-of select="substring($date,7,2)"/>

<xsl:text>-</xsl:text>

<xsl:value-of select="substring-before(substring-after('01Jan 02Feb

03Mar 04Apr 05May 06Jun 07Jul 08Aug 09Sep 10Oct 11Nov 12Dec

',substring($date,5,2)),' ')"/>

<xsl:text>-</xsl:text>

<xsl:value-of select="substring($date,1,4)"/>

</xsl:when>

<xsl:otherwise>No Date Given</xsl:otherwise>

</xsl:choose>

</xsl:template>

<!------------------+------------------->

<!-- rapSheet -->

<!------------------+------------------->

<!-- This template controls second tier formatting of the rap sheet

by generating the top level headings and then calling next tier

templates for format those sections.

-->

<xsl:template match="/rap:rapSheet">

<CENTER>

<H1><FONT COLOR="000080">Criminal History Record</FONT></H1>

</CENTER>

<BR/><BR/><H2><A NAME="introduction">Introduction</A></H2>

<xsl:apply-templates select="rap:introduction"/>

<BR/><BR/><H2><A NAME="identification">Identification</A></H2>

<xsl:apply-templates select="rap:identification"/>

34 
<BR/><BR/><H2><A NAME="summary">Summary</A></H2>

<xsl:choose>

<xsl:when test="rap:summary!=''">

<xsl:apply-templates select="rap:summary"/>

</xsl:when>

<xsl:otherwise>

<xsl:call-template name="rap:generate-summary"/>

</xsl:otherwise>

</xsl:choose>

<BR/><BR/><H2><A NAME="arrests">Criminal History</A></H2>

<xsl:call-template name="rap:cycle"/>

<BR/><BR/><H2><A NAME="index">Index of Agencies</A></H2>

<xsl:apply-templates select="rap:agencyIndex"/>

</xsl:template>

<!------------------+------------------->

<!-- navigation-bar -->

<!------------------+------------------->

<!-- This template controls formatting of a navigation bar of hyperlinks

to the various sections. This allows easy switching from one part

to another.

This version is actually null and the real navigation bar is

generated in the following template.

-->

<xsl:template name="rap:navigation-bar">

</xsl:template>

<!------------------+------------------->

<!-- navigation-bar -->

<!------------------+------------------->

<!-- This template controls formatting of a navigation bar of hyperlinks

to the various sections. This allows easy switching from one part

to another.

-->

<xsl:template name="rap:navigation-bar-for-real">

<HR/>

<TABLE BORDER="0" CELLPADDING="0" WIDTH="100%">

<TR>

<TD><A HREF="#introduction"><strong>Introduction</strong></A></TD>

<TD><A HREF="#identification"><strong>Identification</strong></A></TD>

<TD><A HREF="#summary"><strong>Summary</strong></A></TD>

<TD><A HREF="#corrections"><strong>Corrections</strong></A></TD>

<TD><A HREF="#arrests"><strong>Criminal History</strong></A></TD>

<TD><A HREF="#index"><strong>Agencies</strong></A></TD>

</TR>

</TABLE>

35
<HR/>

</xsl:template>

<!------------------+------------------->

<!-- introduction -->

<!------------------+------------------->

<!-- This template controls formatting of information from the

introduction element. It is called from the /rapSheet template.

-->

<xsl:template match="rap:introduction">

<H4>This rap sheet was produced in response to the following request:</H4>

<BLOCKQUOTE>

<TABLE BORDER="0" CELLPADDING="0" WIDTH="90%" BGCOLOR="E4E4E4">

<TR>

<TD>Subject Name</TD>

<TD>

<xsl:choose>

<xsl:when

test="/rap:rapSheet/rap:introduction/rap:request/rap:name!=''">

<xsl:value-of

select="/rap:rapSheet/rap:introduction/rap:request/rap:name"/>

</xsl:when>

<xsl:otherwise>Unnamed Subject</xsl:otherwise>

</xsl:choose>

</TD>

</TR>

<xsl:if test="rap:request/rap:fbiNumber!=''">

<TR><TD>FBI Number</TD>

<TD><xsl:value-of select="rap:request/rap:fbiNumber"/></TD></TR>

</xsl:if>

<xsl:if test="rap:request/rap:sidNumber!=''">

<TR><TD>SID Number</TD>

<TD><xsl:value-of select="rap:request/rap:sidNumber"/></TD></TR>

</xsl:if>

<TR>

<TD>Attention</TD>

<TD><xsl:value-of select="rap:request/rap:attention"/></TD>

</TR><TR>

<TD>Purpose Code</TD>

<TD><xsl:value-of select="rap:request/rap:purposeCode"/></TD>

</TR>

</TABLE>

</BLOCKQUOTE>

<H4>The information in this rap sheet is provided

subject to the following:</H4>

<BLOCKQUOTE>

<TABLE BORDER="0" CELLPADDING="3" WIDTH="90%" BGCOLOR="E4E4E4">

<TR><TH ALIGN="LEFT">Source</TH>

<TH ALIGN="LEFT">Restriction, Warning, or Notice</TH>

</TR>

36 
<xsl:for-each select="rap:caveatInfo">

<TR VALIGN="TOP">

<TD WIDTH="10%"><STRONG>(<xsl:value-of

select="rap:state"/>)</STRONG></TD>

<xsl:if test="rap:caveat!=''">

<TD><xsl:value-of select="rap:caveat"/></TD>

</xsl:if>

<xsl:if test="rap:index!=''">

<TD>Standard Caveat Number <xsl:value-of select="rap:index"/><BR/>

This should be turned into a hyperlink really.</TD>

</xsl:if>

</TR>

</xsl:for-each>

</TABLE>

</BLOCKQUOTE>

<xsl:call-template name="rap:navigation-bar"/>

</xsl:template>

<!------------------+------------------->

<!-- identification -->

<!------------------+------------------->

<!-- This template controls formatting of information from the

identification element. It is called from the /rapSheet template.

-->

<xsl:template match="rap:identification">

<BLOCKQUOTE>

<TABLE BORDER="0" CELLPADDING="2" WIDTH="90%">

<TR ALIGN="LEFT">

<TH WIDTH="25%">FBI Number</TH>

<TH WIDTH="25%">SID Number</TH>

<TH WIDTH="25%">Driver's License</TH>

<TH WIDTH="25%">Social Security</TH></TR>

<TR VALIGN="TOP">

<TD>

<xsl:choose>

<xsl:when test="rap:fbiNumber!=''">

<xsl:value-of select="rap:fbiNumber"/>

</xsl:when>

<xsl:otherwise>Unknown</xsl:otherwise>

</xsl:choose>

</TD><TD>

<xsl:choose>

<xsl:when test="rap:sidNumber!=''">

<xsl:for-each select="rap:sidNumber">

<xsl:if test="position()>1"><BR/></xsl:if>

<xsl:value-of select="."/>

</xsl:for-each>

</xsl:when>

<xsl:otherwise>Unknown</xsl:otherwise>

</xsl:choose>

37
</TD><TD>

<xsl:choose>

<xsl:when test="rap:driversLicense!=''">

<xsl:for-each select="rap:driversLicense">

<xsl:if test="position()>1"><BR/></xsl:if>

<!--xsl:call-template name="DL-number"/-->

<xsl:value-of select="./rap:state"/>

<xsl:value-of select="./rap:number"/>

</xsl:for-each>

</xsl:when>

<xsl:otherwise></xsl:otherwise>

</xsl:choose>

</TD><TD>

<xsl:choose>

<xsl:when test="rap:ssn!=''">

<xsl:for-each select="rap:ssn">

<xsl:if test="position()>1"><BR/></xsl:if>

<xsl:value-of select="."/>

</xsl:for-each>

</xsl:when>

<xsl:otherwise>None</xsl:otherwise>

</xsl:choose>

</TD>

</TR>

<TR><TD COLSPAN="4"><HR/></TD></TR>

<TR ALIGN="LEFT">

<TH COLSPAN="2">Names Used</TH>

<TH>IFFS Disqualified</TH>

<TH>Dates of Birth</TH>

</TR>

<TR VALIGN="TOP">

<TD COLSPAN="2">

<xsl:choose>

<xsl:when test="rap:subjectName!=''">

<xsl:for-each select="rap:subjectName">

<xsl:if test="position()>1"><BR/></xsl:if>

<xsl:call-template name="rap:format-subjectName"/>

</xsl:for-each>

</xsl:when>

<xsl:otherwise>Unknown</xsl:otherwise>

</xsl:choose>

</TD>

<TD>

<xsl:choose>

<xsl:when test="rap:iffsDisqualified!=''">

<xsl:call-template name="rap:format-severity">

<xsl:with-param name="severity" select="rap:iffsDisqualified"/>

</xsl:call-template>

</xsl:when>

<xsl:otherwise>

None Given

</xsl:otherwise>

</xsl:choose>

</TD>

38 
<TD VALIGN="TOP">

<xsl:choose>

<xsl:when test="rap:birthdate!=''">

<xsl:for-each select="rap:birthdate">

<xsl:if test="position()>1"><BR/></xsl:if>

<!--xsl:value-of select="."/-->

<xsl:call-template name="rap:format-date">

<xsl:with-param name="date" select="."/>

</xsl:call-template>

</xsl:for-each>

</xsl:when>

<xsl:otherwise>Unknown</xsl:otherwise>

</xsl:choose>

</TD>

</TR>

<TR><TD COLSPAN="4"><HR/></TD></TR>

<TR ALIGN="LEFT">

<TH>Sex</TH>

<TH>Race</TH>

<TH>Height</TH>

<TH>Weight</TH></TR>

<TR VALIGN="TOP">

<TD>

<xsl:choose>

<xsl:when test="rap:sex!=''">

<xsl:for-each select="rap:sex">

<xsl:if test="position()>1"><BR/></xsl:if>

<xsl:value-of select="."/>

</xsl:for-each>

</xsl:when>

<xsl:otherwise>Unknown</xsl:otherwise>

</xsl:choose>

</TD><TD>

<xsl:choose>

<xsl:when test="rap:race!=''">

<xsl:for-each select="rap:race">

<xsl:if test="position()>1"><BR/></xsl:if>

<xsl:value-of select="."/>

</xsl:for-each>

</xsl:when>

<xsl:otherwise>Unknown</xsl:otherwise>

</xsl:choose>

</TD><TD>

<xsl:choose>

<xsl:when test="rap:heightInfo!=''">

<xsl:for-each select="rap:heightInfo">

<xsl:if test="position()>1"><BR/></xsl:if>

<!--xsl:value-of select="./height"/-->

<xsl:choose>

<xsl:when test="./rap:height/@unit='inches'">

<xsl:value-of select="floor((./rap:height) div 12)"/>

<xsl:text>'</xsl:text>

<xsl:value-of select="(./rap:height) mod 12"/>

<xsl:text>"</xsl:text>

</xsl:when>

39
<xsl:otherwise>

<xsl:value-of select="floor((./rap:height) div 100)"/>

<xsl:text>'</xsl:text>

<xsl:value-of select="(./rap:height) mod 100"/>

<xsl:text>"</xsl:text>

</xsl:otherwise>

</xsl:choose>

(<xsl:call-template name="rap:format-date"/>)

</xsl:for-each>

</xsl:when>

<xsl:otherwise>Unknown</xsl:otherwise>

</xsl:choose>

</TD><TD>

<xsl:choose>

<xsl:when test="rap:weightInfo!=''">

<xsl:for-each select="rap:weightInfo">

<xsl:if test="position()>1"><BR/></xsl:if>

<xsl:value-of select="./rap:weight"/>

(<xsl:call-template name="rap:format-date"/>)

</xsl:for-each>

</xsl:when>

<xsl:otherwise>Unknown</xsl:otherwise>

</xsl:choose>

</TD>

</TR>

<TR><TD COLSPAN="4"><HR/></TD></TR>

<TR ALIGN="LEFT">

<TH>Eye Color</TH>

<TH>Hair Color</TH>

<TH>Place of Birth</TH>

<TH>Citizenship</TH></TR>

<TR VALIGN="TOP">

<TD>

<xsl:choose>

<xsl:when test="rap:eyeColorInfo!=''">

<xsl:for-each select="rap:eyeColorInfo">

<xsl:if test="position()>1"><BR/></xsl:if>

<!-- The use of codes is not part of the standard -->

<xsl:choose>

<xsl:when test="./rap:eyeColor='BLU'">Blue</xsl:when>

<xsl:when test="./rap:eyeColor='BRO'">Brown</xsl:when>

<xsl:otherwise>

<xsl:value-of select="./rap:eyeColor"/>

</xsl:otherwise>

</xsl:choose>

(<xsl:call-template name="rap:format-date"/>)

</xsl:for-each>

</xsl:when>

<xsl:otherwise>Unknown</xsl:otherwise>

</xsl:choose>

</TD><TD>

<xsl:choose>

<xsl:when test="rap:hairColorInfo!=''">

<xsl:for-each select="rap:hairColorInfo">

<xsl:if test="position()>1"><BR/></xsl:if>

40 
<xsl:choose>

<xsl:when test="./rap:hairColor='BLK'">Black</xsl:when>

<xsl:when test="./rap:hairColor='BRO'">Brown</xsl:when>

<xsl:otherwise>

<xsl:value-of select="./rap:hairColor"/>

</xsl:otherwise>

</xsl:choose>

(<xsl:call-template name="rap:format-date"/>)

</xsl:for-each>

</xsl:when>

<xsl:otherwise>Unknown</xsl:otherwise>

</xsl:choose>

</TD><TD>

<xsl:choose>

<xsl:when test="rap:birthplace!=''">

<xsl:for-each select="rap:birthplace">

<xsl:if test="position()>1"><BR/></xsl:if>

<xsl:value-of select="."/>

</xsl:for-each>

</xsl:when>

<xsl:otherwise>Unknown</xsl:otherwise>

</xsl:choose>

</TD><TD>

<xsl:choose>

<xsl:when test="rap:citizenship!=''">

<xsl:for-each select="rap:citizenship">

<xsl:if test="position()>1"><BR/></xsl:if>

<xsl:value-of select="."/>

</xsl:for-each>

</xsl:when>

<xsl:otherwise>Unknown</xsl:otherwise>

</xsl:choose>

</TD>

</TR>

<TR><TD COLSPAN="4"><HR/></TD></TR>

<TR ALIGN="LEFT">

<TH>Eye Color</TH>

<TH>Hair Color</TH>

<TH>Place of Birth</TH>

<TH>Citizenship</TH></TR>

<TR VALIGN="TOP">

<TD>

<xsl:choose>

<xsl:when test="rap:eyeColorInfo!=''">

<xsl:for-each select="rap:eyeColorInfo">

<xsl:if test="position()>1"><BR/></xsl:if>

<!-- The use of codes is not part of the standard -->

<xsl:choose>

<xsl:when test="./rap:eyeColor='BLU'">Blue</xsl:when>

<xsl:when test="./rap:eyeColor='BRO'">Brown</xsl:when>

<xsl:otherwise>

<xsl:value-of select="./rap:eyeColor"/>

</xsl:otherwise>

</xsl:choose>

(<xsl:call-template name="rap:format-date"/>)

41
</xsl:for-each>

</xsl:when>

<xsl:otherwise>Unknown</xsl:otherwise>

</xsl:choose>

</TD><TD>

<xsl:choose>

<xsl:when test="rap:hairColorInfo!=''">

<xsl:for-each select="rap:hairColorInfo">

<xsl:if test="position()>1"><BR/></xsl:if>

<xsl:choose>

<xsl:when test="./rap:hairColor='BLK'">Black</xsl:when>

<xsl:when test="./rap:hairColor='BRO'">Brown</xsl:when>

<xsl:otherwise>

<xsl:value-of select="./rap:hairColor"/>

</xsl:otherwise>

</xsl:choose>

(<xsl:call-template name="rap:format-date"/>)

</xsl:for-each>

</xsl:when>

<xsl:otherwise>Unknown</xsl:otherwise>

</xsl:choose>

</TD><TD>

<xsl:choose>

<xsl:when test="rap:birthplace!=''">

<xsl:for-each select="rap:birthplace">

<xsl:if test="position()>1"><BR/></xsl:if>

<xsl:value-of select="."/>

</xsl:for-each>

</xsl:when>

<xsl:otherwise>Unknown</xsl:otherwise>

</xsl:choose>

</TD><TD>

<xsl:choose>

<xsl:when test="rap:citizenship!=''">

<xsl:for-each select="rap:citizenship">

<xsl:if test="position()>1"><BR/></xsl:if>

<xsl:value-of select="."/>

</xsl:for-each>

</xsl:when>

<xsl:otherwise>Unknown</xsl:otherwise>

</xsl:choose>

</TD>

</TR>

<TR><TD COLSPAN="4"><HR/></TD></TR>

<TR ALIGN="LEFT">

<TH COLSPAN="2">Correctional Number</TH>

<TH COLSPAN="2">Skin Tone</TH>

</TR>

<TR VALIGN="TOP">

<TD COLSPAN="2">

<xsl:choose>

<xsl:when test="rap:correctionalNumber!=''">

<xsl:for-each select="rap:correctionalNumber">

<xsl:if test="position()>1"><BR/></xsl:if>

(<xsl:value-of select="./rap:state"/>)

<xsl:text> </xsl:text>

42 
<xsl:value-of select="./rap:number"/>

</xsl:for-each>

</xsl:when>

<xsl:otherwise>None</xsl:otherwise>

</xsl:choose>

</TD><TD COLSPAN="2">

<xsl:choose>

<xsl:when test="rap:skinTone!=''">

<xsl:for-each select="rap:skinTone">

<xsl:if test="position()>1"><BR/></xsl:if>

<xsl:value-of select="."/>

</xsl:for-each>

</xsl:when>

<xsl:otherwise>Unknown</xsl:otherwise>

</xsl:choose>

</TD>

</TR>

<TR><TD COLSPAN="4"><HR/></TD></TR>

<TR ALIGN="LEFT">

<TH COLSPAN="2">Miscellaneous Ids</TH>

<TH COLSPAN="2">Fingerprint Clasification</TH></TR>

<TR VALIGN="TOP">

<TD COLSPAN="2">

<xsl:choose>

<xsl:when test="rap:miscId!=''">

<xsl:for-each select="rap:miscId">

<xsl:if test="position()>1"><BR/></xsl:if>

<xsl:value-of select="./rap:type"/>

<xsl:text> </xsl:text>

<xsl:value-of select="./rap:number"/>

</xsl:for-each>

</xsl:when>

<xsl:otherwise>None</xsl:otherwise>

</xsl:choose>

</TD><TD COLSPAN="2">

<xsl:choose>

<xsl:when test="rap:fpPatternClass!=''">

<xsl:for-each select="rap:fpPatternClass">

<xsl:if test="position()>1"><BR/></xsl:if>

<xsl:value-of select="."/>

</xsl:for-each>

</xsl:when>

<xsl:otherwise>Unknown</xsl:otherwise>

</xsl:choose>

</TD>

</TR>

<TR><TD COLSPAN="4"><HR/></TD></TR>

<TR ALIGN="LEFT">

<TH COLSPAN="4">Scars, Marks, and Tattoos</TH>

</TR>

<xsl:choose>

<xsl:when test="rap:smtInfo!=''">

<xsl:for-each select="rap:smtInfo">

43
<TR VALIGN="TOP">

<TD>

<xsl:if test="./rap:agencyORI!=''">

<xsl:value-of select="./rap:agencyORI"/>

</xsl:if>

<xsl:if test="./rap:agencyName!=''">

<BR/><xsl:value-of select="./rap:agencyName"/>

</xsl:if>

<xsl:if test="./rap:format!=''">

<BR/><xsl:value-of select="./rap:format"/>

</xsl:if>

<xsl:if test="./rap:link!=''">

<BR/>

<xsl:choose>

<xsl:when test="starts-with(

normalize-space(

translate(./rap:link,'htp', 'HTP')),

'HTTP')">

<A HREF="./rap:link">Image</A>

</xsl:when>

<xsl:otherwise>

<xsl:value-of select="./rap:link"/>

</xsl:otherwise>

</xsl:choose>

</xsl:if>

</TD>

<TD><xsl:call-template name="rap:format-date"/></TD>

<TD COLSPAN="2">

<xsl:if test="./rap:smt!=''">

<xsl:value-of select="./rap:smt"/>

</xsl:if>

<xsl:if test="./rap:code!=''">

Code <xsl:value-of select="./rap:code"/>

</xsl:if>

</TD>

</TR>

</xsl:for-each>

</xsl:when>

<xsl:otherwise><TR><TD COLSPAN="4">None</TD></TR></xsl:otherwise>

</xsl:choose>

<TR><TD COLSPAN="4"><HR/></TD></TR>

<TR ALIGN="LEFT">

<TH COLSPAN="2">Palm Prints Available</TH>

<TH COLSPAN="2">DNA Samples Available</TH></TR>

<TR VALIGN="TOP">

<TD COLSPAN="2">

<xsl:choose>

<xsl:when test="rap:palmPrints!=''">

<xsl:for-each select="rap:palmPrints">

<xsl:if test="position()>1"><BR/><BR/></xsl:if>

<xsl:if test="./rap:agencyORI!=''">

<xsl:value-of select="./rap:agencyORI"/>

</xsl:if>

<xsl:if test="./rap:agencyName!=''">

44 
<xsl:text> </xsl:text>

<xsl:value-of select="./rap:agencyName"/>

</xsl:if>

<xsl:if test="./rap:format!=''">

<BR/><xsl:value-of select="./rap:format"/>

</xsl:if>

<xsl:if test="./rap:date!=''">

<xsl:choose>

<xsl:when test="./rap:format!=''">

<xsl:text> </xsl:text><xsl:call-template

name="rap:format-date"/>

</xsl:when>

<xsl:otherwise>

<BR/><xsl:call-template name="rap:format-date"/>

</xsl:otherwise>

</xsl:choose>

</xsl:if>

<xsl:if test="./rap:link!=''">

<BR/>

<xsl:choose>

<xsl:when test="starts-with(

normalize-space(

translate(./rap:link,'htp', 'HTP')),

'HTTP')">

<A HREF="{normalize-space(./rap:link)}">Image</A>

</xsl:when>

<xsl:otherwise>

<xsl:value-of select="./rap:link"/>

</xsl:otherwise>

</xsl:choose>

</xsl:if>

</xsl:for-each>

</xsl:when>

<xsl:otherwise>None</xsl:otherwise>

</xsl:choose>

</TD><TD COLSPAN="2">

<xsl:choose>

<xsl:when test="rap:dna!=''">

<xsl:for-each select="rap:dna">

<xsl:if test="position()>1"><BR/><BR/></xsl:if>

<xsl:if test="./rap:agencyORI!=''">

<xsl:value-of select="./rap:agencyORI"/>

</xsl:if>

<xsl:if test="./rap:agencyName!=''">

<xsl:text> </xsl:text>

<xsl:value-of select="./rap:agencyName"/>

</xsl:if>

<xsl:if test="./rap:format!=''">

<BR/><xsl:value-of select="./rap:format"/>

</xsl:if>

<xsl:if test="./rap:date!=''">

<xsl:choose>

<xsl:when test="./rap:format!=''">

<xsl:text> </xsl:text><xsl:call-template

name="rap:format-date"/>

45
</xsl:when>

<xsl:otherwise>

<BR/><xsl:call-template name="rap:format-date"/>

</xsl:otherwise>

</xsl:choose>

</xsl:if>

<xsl:if test="./rap:link!=''">

<BR/>

<xsl:choose>

<xsl:when test="starts-with(

normalize-space(

translate(./rap:link,'htp', 'HTP')),

'HTTP')">

<A HREF="{normalize-space(./rap:link)}">Image</A>

</xsl:when>

<xsl:otherwise>

<xsl:value-of select="./rap:link"/>

</xsl:otherwise>

</xsl:choose>

</xsl:if>

</xsl:for-each>

</xsl:when>

<xsl:otherwise>Unknown</xsl:otherwise>

</xsl:choose>

</TD>

</TR>

<TR><TD COLSPAN="4"><HR/></TD></TR>

<TR ALIGN="LEFT">

<TH COLSPAN="4">Photos Available</TH>

</TR>

<xsl:choose>

<xsl:when test="rap:photo!=''">

<xsl:for-each select="rap:photo">

<TR VALIGN="TOP">

<TD COLSPAN="4">

<xsl:if test="position()>1"><BR/></xsl:if>

<xsl:if test="./rap:agencyORI!=''">

<xsl:value-of select="./rap:agencyORI"/>

</xsl:if>

<xsl:if test="./rap:agencyName!=''">

<xsl:text> </xsl:text>

<xsl:value-of select="./rap:agencyName"/>

</xsl:if>

<xsl:if test="./rap:format!=''">

<BR/><xsl:value-of select="./rap:format"/>

</xsl:if>

<xsl:if test="./rap:date!=''">

<xsl:choose>

<xsl:when test="./rap:format!=''">

<xsl:text> </xsl:text><xsl:call-template

name="rap:format-date"/>

</xsl:when>

<xsl:otherwise>

<BR/><xsl:call-template name="rap:format-date"/>

</xsl:otherwise>

46 
</xsl:choose>

</xsl:if>

<xsl:if test="./rap:link!=''">

<BR/>

<xsl:choose>

<xsl:when test="starts-with(

normalize-space(

translate(./rap:link,'htp', 'HTP')),

'HTTP')">

<A HREF="{normalize-space(./rap:link)}">Image</A>

</xsl:when>

<xsl:otherwise>

<xsl:value-of select="./rap:link"/>

</xsl:otherwise>

</xsl:choose>

</xsl:if>

</TD>

</TR>

</xsl:for-each>

</xsl:when>

<xsl:otherwise>None</xsl:otherwise>

</xsl:choose>

<TR><TD COLSPAN="4"><HR/></TD></TR>

<TR ALIGN="LEFT">

<TH COLSPAN="4">Employment</TH>

</TR>

<xsl:choose>

<xsl:when test="rap:employment!=''">

<xsl:for-each select="rap:employment">

<TR VALIGN="TOP">

<TD><xsl:call-template name="rap:format-date"/></TD>

<TD COLSPAN="3">

<xsl:if test="./rap:occupation!=''">

<xsl:value-of select="./rap:occupation"/>

<xsl:text>, </xsl:text>

</xsl:if>

<xsl:value-of select="./rap:employerName"/>

</TD>

</TR>

</xsl:for-each>

</xsl:when>

<xsl:otherwise>Unknown</xsl:otherwise>

</xsl:choose>

<TR><TD COLSPAN="4"><HR/></TD></TR>

<TR ALIGN="LEFT">

<TH COLSPAN="4">Residences</TH>

</TR>

<xsl:choose>

<xsl:when test="rap:residence!=''">

<xsl:for-each select="rap:residence">

<TR VALIGN="TOP">

<TD><xsl:call-template name="rap:format-date"/></TD>

47
<TD COLSPAN="3"><xsl:value-of select="./rap:address"/></TD>

</TR>

</xsl:for-each>

</xsl:when>

<xsl:otherwise><TR><TD COLSPAN="4">Unknown</TD></TR></xsl:otherwise>

</xsl:choose>

<TR><TD COLSPAN="4"><HR/></TD></TR>

<TR ALIGN="LEFT">

<TH COLSPAN="4">Offender Caveats, Notices, and Comments</TH>

</TR>

<TR VALIGN="TOP">

<TD COLSPAN="4">

<xsl:choose>

<xsl:when test="rap:cautionInfo!= '' or

rap:offenderNoticeInfo!='' or rap:commentsInfo!=''">

<xsl:if test="rap:cautionInfo!=''">

<xsl:for-each select="rap:cautionInfo">

<xsl:if test="position()>1"><BR/></xsl:if>

<xsl:if test="rap:state!=''">

(<xsl:value-of select="rap:state"/>)

<xsl:text> </xsl:text>

</xsl:if>

<xsl:value-of select="rap:caution"/>

<xsl:text> </xsl:text>

(<xsl:call-template name="rap:format-date"/>)

</xsl:for-each>

</xsl:if>

<xsl:if test="rap:offenderNoticeInfo!=''">

<xsl:for-each select="rap:offenderNoticeInfo">

<xsl:if test="position()>1 or ../rap:cautionInfo!=''">

<BR/>

</xsl:if>

(<xsl:value-of select="rap:state"/>)

<xsl:text> </xsl:text>

<xsl:choose>

<xsl:when test="rap:offenderNotice!=''">

<xsl:value-of select="rap:offenderNotice"/>

</xsl:when>

<xsl:otherwise>

<xsl:text>Index </xsl:text>

<xsl:value-of select="rap:index"/>

</xsl:otherwise>

</xsl:choose>

</xsl:for-each>

</xsl:if>

<xsl:if test="rap:commentsInfo!=''">

<xsl:for-each select="rap:commentsInfo">

<xsl:if test="position()>1 or

../rap:offenderNoticeInfo!='' or ../rap:cautionInfo!=''">

<BR/>

</xsl:if>

(<xsl:value-of select="rap:state"/>)

<xsl:text> </xsl:text>

<xsl:value-of select="rap:comments"/>

</xsl:for-each>

48 
</xsl:if>

</xsl:when>

<xsl:otherwise>None</xsl:otherwise>

</xsl:choose>

</TD>

</TR>

</TABLE>

</BLOCKQUOTE>

<xsl:call-template name="rap:navigation-bar"/>

</xsl:template>

<!------------------+------------------->

<!-- cycle -->

<!------------------+------------------->

<!-- This template controls formatting of information from cycle

elements. It is called from the /rapSheet template.

-->

<xsl:template name="rap:cycle">

<BLOCKQUOTE>

<TABLE BORDER="0" CELLPADDING="2" WIDTH="90%">

<xsl:for-each select="rap:cycle">

<xsl:sort select="rap:earliestDate"/>

<TR VALIGN="TOP">

<TD COLSPAN="4">

<xsl:if test="position()>1">

<HR/>

</xsl:if>

<H3>

<xsl:text>Arrest Cycle Tracking Number </xsl:text>

<xsl:value-of select="rap:trackingNumber"/>

</H3>

</TD>

</TR>

<xsl:call-template name="rap:arrest"/>

<TR><TD COLSPAN="4"><HR/></TD></TR>

<xsl:for-each select="rap:prosecutorDisposition">

<xsl:call-template name="rap:prosecutorDisposition"/>

</xsl:for-each> <!-- prosecutorDisposition -->

<TR><TD COLSPAN="4"><HR/></TD></TR>

<xsl:for-each select="rap:courtDisposition">

<xsl:call-template name="rap:courtDisposition"/>

</xsl:for-each> <!-- courtDisposition -->

<TR><TD COLSPAN="4"><HR/></TD></TR>

49
<xsl:for-each select="rap:sentencing">

<xsl:choose>

<xsl:when test="position()=1">

<TR ALIGN="LEFT">

<TD COLSPAN="4"><H3>Sentencing</H3></TD>

</TR>

</xsl:when>

<xsl:otherwise>

<TR ALIGN="LEFT"><TD COLSPAN="4"><BR/></TD></TR>

</xsl:otherwise>

</xsl:choose>

<xsl:call-template name="rap:sentencing"/>

</xsl:for-each> <!-- sentencing -->

<TR><TD COLSPAN="4"><HR/></TD></TR>

<xsl:for-each select="rap:corrections">

<xsl:choose>

<xsl:when test="position()=1">

<TR ALIGN="LEFT">

<TD COLSPAN="4"><H3>Corrections</H3></TD>

</TR>

</xsl:when>

<xsl:otherwise>

<TR ALIGN="LEFT"><TD COLSPAN="4"><BR/></TD></TR>

</xsl:otherwise>

</xsl:choose>

<xsl:call-template name="rap:corrections"/>

</xsl:for-each> <!-- corrections -->

</xsl:for-each> <!-- cycle -->

</TABLE>

</BLOCKQUOTE>

<xsl:call-template name="rap:navigation-bar"/>

</xsl:template>

<!------------------+------------------->

<!-- format-severity -->

<!------------------+------------------->

<!-- This template formats the severity codes into full words. -->

<xsl:template name="rap:format-severity">

<xsl:param name="severity" select="./rap:severity"/>

<xsl:choose>

<xsl:when test="$severity!=''">

<xsl:choose>

<xsl:when test="$severity='L'">

<xsl:text>Local Ordinance</xsl:text>

</xsl:when>

<xsl:when test="$severity='M'">

<xsl:text>Misdemeanor</xsl:text>

</xsl:when>

50 
<xsl:when test="$severity='F'">

<xsl:text>Felony</xsl:text>

</xsl:when>

<xsl:when test="$severity='O'">

<xsl:text>Other</xsl:text>

</xsl:when>

<xsl:when test="$severity='U'">

<xsl:text>Unknown</xsl:text>

</xsl:when>

<xsl:otherwise>

<xsl:value-of select="$severity"/>

</xsl:otherwise>

</xsl:choose>

</xsl:when>

<xsl:otherwise>

(Missing)

</xsl:otherwise>

</xsl:choose>

</xsl:template>

<!------------------+------------------->

<!-- arrest -->

<!------------------+------------------->

<!-- This template formats the arrest information including charges.

It presumes that a table with four columns is currently open.

-->

<xsl:template name="rap:arrest">

<TR ALIGN="LEFT">

<TD COLSPAN="4"><H3>Arrest</H3></TD>

</TR>

<TR VALIGN="TOP">

<TD><STRONG>Arrest Agency</STRONG></TD>

<TD COLSPAN="3">

<xsl:if test="rap:arrest/rap:agencyORI!=''">

<xsl:value-of select="rap:arrest/rap:agencyORI"/>

</xsl:if>

<xsl:if test="rap:arrest/rap:agencyName!=''">

<xsl:if test="rap:arrest/rap:agencyORI!=''">

<xsl:text> </xsl:text>

</xsl:if>

<xsl:value-of select="rap:arrest/rap:agencyName"/>

</xsl:if>

</TD>

</TR>

<TR>

<TD><STRONG>Arrest Name</STRONG></TD>

<TD COLSPAN="3">

<xsl:call-template name="rap:format-subjectName">

<xsl:with-param name="subject"

select="./rap:arrest/rap:subjectName"/>

</xsl:call-template>

</TD>

</TR>

51
<TR ALIGN="LEFT">

<TH WIDTH="25%">Arrest Date</TH>

<TH WIDTH="25%">Arrest Type</TH>

<TH WIDTH="25%">Arrest Case Number</TH>

<TH WIDTH="25%">Offender Id</TH>

</TR>

<TR>

<TD>

<xsl:call-template name="rap:format-date">

<xsl:with-param name="date" select="./rap:arrest/rap:date"/>

</xsl:call-template>

</TD>

<xsl:choose>

<xsl:when test="rap:arrest/rap:type!=''">

<TD><xsl:value-of select="rap:arrest/rap:type"/></TD>

</xsl:when>

<xsl:otherwise>

<TD>Unknown</TD>

</xsl:otherwise>

</xsl:choose>

<xsl:choose>

<xsl:when test="rap:arrest/rap:arrestCaseNumber!=''">

<TD><xsl:value-of select="rap:arrest/rap:arrestCaseNumber"/></TD>

</xsl:when>

<xsl:otherwise>

<TD>Unknown</TD>

</xsl:otherwise>

</xsl:choose>

<xsl:choose>

<xsl:when test="rap:arrest/rap:offenderId!=''">

<TD><xsl:value-of select="rap:arrest/rap:offenderId"/></TD>

</xsl:when>

<xsl:otherwise>

<TD>Unknown</TD>

</xsl:otherwise>

</xsl:choose>

</TR>

<xsl:if test="rap:arrest/rap:comments!=''">

<TR VALIGN="TOP">

<TD><STRONG>Comments</STRONG></TD>

<TD COLSPAN="3"><xsl:value-of select="rap:arrest/rap:comments"/></TD>

</TR>

</xsl:if>

<TR><TD COLSPAN="4"><BR/></TD></TR>

<TR ALIGN="LEFT">

<TD COLSPAN="4"><H3>Charges</H3></TD>

</TR>

<xsl:for-each select="rap:arrest/rap:arrestCharge">

<xsl:if test="position()>1">

<TR><TD COLSPAN="4"><BR/></TD></TR>

</xsl:if>

<TR ALIGN="LEFT">

<TH WIDTH="25%">Sequence Number</TH>

52 
<TH WIDTH="25%">Charge Case Number</TH>

<TH WIDTH="25%">Offense Date</TH>

<TH WIDTH="25%">NCIC Code</TH>

</TR>

<TR>

<xsl:choose>

<xsl:when test="rap:arrestChargeSequence!=''">

<TD><xsl:value-of select="rap:arrestChargeSequence"/></TD>

</xsl:when>

<xsl:otherwise>

<TD>None</TD>

</xsl:otherwise>

</xsl:choose>

<xsl:choose>

<xsl:when test="rap:chargeCaseNumber!=''">

<TD><xsl:value-of select="rap:chargeCaseNumber"/></TD>

</xsl:when>

<xsl:otherwise>

<TD>None</TD>

</xsl:otherwise>

</xsl:choose>

<TD>

<xsl:call-template name="rap:format-date">

<xsl:with-param name="date" select="rap:offenseDate"/>

</xsl:call-template>

</TD>

<xsl:choose>

<xsl:when test="rap:ncicCode!=''">

<TD><xsl:value-of select="rap:ncicCode"/></TD>

</xsl:when>

<xsl:otherwise>

<TD>Unknown</TD>

</xsl:otherwise>

</xsl:choose>

</TR>

<TR>

<TD><STRONG>Charge</STRONG></TD>

<TD COLSPAN="3">

<xsl:choose>

<xsl:when test="rap:literal!=''">

<xsl:value-of select="rap:literal"/>

</xsl:when>

<xsl:otherwise>Missing</xsl:otherwise>

</xsl:choose>

</TD>

</TR>

<TR ALIGN="LEFT">

<TH WIDTH="25%">Statute</TH>

<TH WIDTH="25%">Offense Code</TH>

<TH WIDTH="25%">Counts</TH>

<TH WIDTH="25%">Severity</TH>

</TR>

<TR>

<xsl:choose>

<xsl:when test="rap:statute!=''">

53
<TD><xsl:value-of select="rap:statute"/></TD>

</xsl:when>

<xsl:otherwise>

<TD>Unknown</TD>

</xsl:otherwise>

</xsl:choose>

<xsl:choose>

<xsl:when test="rap:offenseCode!=''">

<TD><xsl:value-of select="rap:offenseCode"/></TD>

</xsl:when>

<xsl:otherwise>

<TD>Unknown</TD>

</xsl:otherwise>

</xsl:choose>

<xsl:choose>

<xsl:when test="rap:counts!=''">

<TD><xsl:value-of select="rap:counts"/></TD>

</xsl:when>

<xsl:otherwise>

<TD>Unknown</TD>

</xsl:otherwise>

</xsl:choose>

<TD><xsl:call-template name="rap:format-severity"/></TD>

</TR>

<xsl:if test="rap:actionLiteral!=''">

<TR>

<TD><STRONG>Action</STRONG></TD>

<TD COLSPAN="3"><xsl:value-of select="rap:actionLiteral"/></TD>

</TR>

<TR>

<TD><STRONG>Action Date</STRONG></TD>

<TD>

<xsl:call-template name="rap:format-date">

<xsl:with-param name="date" select="rap:actionDate"/>

</xsl:call-template>

</TD>

</TR>

</xsl:if>

<xsl:if test="rap:comments!=''">

<TR VALIGN="TOP">

<TD><STRONG>Comments</STRONG></TD>

<TD COLSPAN="3"><xsl:value-of select="rap:comments"/></TD>

</TR>

</xsl:if>

</xsl:for-each> <!-- arrestCharge -->

</xsl:template> <!-- arrest -->

<!------------------+------------------->

<!-- prosecutorDisposition -->

<!------------------+------------------->

54 
<!-- This template formats the prosecutor disposition information.

It presumes that a table with four columns is currently open.

-->

<xsl:template name="rap:prosecutorDisposition">

<TR ALIGN="LEFT">

<TD COLSPAN="4"><H3>Prosecutor Disposition</H3></TD>

</TR>

<TR VALIGN="TOP">

<TD><STRONG>Prosecuting Agency</STRONG></TD>

<TD COLSPAN="3">

<xsl:if test="rap:agencyORI!=''">

<xsl:value-of select="rap:agencyORI"/>

</xsl:if>

<xsl:if test="rap:agencyName!=''">

<xsl:if test="rap:agencyORI!=''">

<xsl:text> </xsl:text>

</xsl:if>

<xsl:value-of select="rap:agencyName"/>

</xsl:if>

</TD>

</TR>

<TR>

<TD><STRONG>Prosecution Name</STRONG></TD>

<TD COLSPAN="3">

<xsl:call-template name="rap:format-subjectName">

<xsl:with-param name="subject"

select="./rap:subjectName"/>

</xsl:call-template>

</TD>

</TR>

<xsl:if test="rap:prosecutorCaseNumber!=''">

<TR>

<TD><STRONG>Prosecutor Case Number</STRONG></TD>

<TD COLSPAN="3"><xsl:value-of select="rap:prosecutorCaseNumber"/></TD>

</TR>

</xsl:if>

<TR><TD COLSPAN="4"><BR/></TD></TR>

<TR ALIGN="LEFT">

<TD COLSPAN="4"><H3>Charges</H3></TD>

</TR>

<xsl:for-each select="rap:prosecutorCharge">

<xsl:if test="position()>1">

<TR><TD COLSPAN="4"><BR/></TD></TR>

</xsl:if>

<TR ALIGN="LEFT">

<TH COLSPAN="2">Arrest Charge Sequence Number</TH>

<TH>Offense Date</TH>

<TH>NCIC Code</TH>

</TR>

<TR>

<xsl:choose>

55
<xsl:when test="rap:arrestChargeSequence!=''">

<TD COLSPAN="2"><xsl:value-of

select="rap:arrestChargeSequence"/></TD>

</xsl:when>

<xsl:otherwise>

<TD>None</TD>

</xsl:otherwise>

</xsl:choose>

<TD>

<xsl:call-template name="rap:format-date">

<xsl:with-param name="date" select="rap:offenseDate"/>

</xsl:call-template>

</TD>

<xsl:choose>

<xsl:when test="rap:ncicCode!=''">

<TD><xsl:value-of select="rap:ncicCode"/></TD>

</xsl:when>

<xsl:otherwise>

<TD>Unknown</TD>

</xsl:otherwise>

</xsl:choose>

</TR>

<TR>

<TD><STRONG>Prosecution Charge</STRONG></TD>

<TD COLSPAN="3">

<xsl:choose>

<xsl:when test="rap:literal!=''">

<xsl:value-of select="rap:literal"/>

</xsl:when>

<xsl:otherwise>Missing</xsl:otherwise>

</xsl:choose>

</TD>

</TR>

<TR ALIGN="LEFT">

<TH WIDTH="25%">Statute</TH>

<TH WIDTH="25%">Offense Code</TH>

<TH WIDTH="25%">Counts</TH>

<TH WIDTH="25%">Severity</TH>

</TR>

<TR>

<xsl:choose>

<xsl:when test="rap:statute!=''">

<TD><xsl:value-of select="rap:statute"/></TD>

</xsl:when>

<xsl:otherwise>

<TD>Unknown</TD>

</xsl:otherwise>

</xsl:choose>

<xsl:choose>

<xsl:when test="rap:offenseCode!=''">

<TD><xsl:value-of select="rap:offenseCode"/></TD>

</xsl:when>

<xsl:otherwise>

<TD>Unknown</TD>

</xsl:otherwise>

56 
</xsl:choose>

<xsl:choose>

<xsl:when test="rap:counts!=''">

<TD><xsl:value-of select="rap:counts"/></TD>

</xsl:when>

<xsl:otherwise>

<TD>Unknown</TD>

</xsl:otherwise>

</xsl:choose>

<TD><xsl:call-template name="rap:format-severity"/></TD>

</TR>

<TR>

<TD><STRONG>Action</STRONG></TD>

<TD COLSPAN="3"><xsl:value-of select="rap:actionLiteral"/></TD>

</TR>

<TR>

<TD><STRONG>Action Date</STRONG></TD>

<TD>

<xsl:call-template name="rap:format-date">

<xsl:with-param name="date" select="rap:actionDate"/>

</xsl:call-template>

</TD>

</TR>

<xsl:if test="rap:comments!=''">

<TR VALIGN="TOP">

<TD><STRONG>Comments</STRONG></TD>

<TD COLSPAN="3"><xsl:value-of select="rap:comments"/></TD>

</TR>

</xsl:if>

</xsl:for-each> <!-- prosecutorCharge -->

</xsl:template> <!-- prosecutorDisposition -->

<!------------------+------------------->

<!-- courtDisposition -->

<!------------------+------------------->

<!-- This template formats the court disposition information.

It presumes that a table with four columns is currently open.

-->

<xsl:template name="rap:courtDisposition">

<TR ALIGN="LEFT">

<TD COLSPAN="4"><H3>Court Disposition</H3></TD>

</TR>

<TR VALIGN="TOP">

<TD><STRONG>Court</STRONG></TD>

<TD COLSPAN="3">

<xsl:if test="rap:agencyORI!=''">

<xsl:value-of select="rap:agencyORI"/>

</xsl:if>

57
<xsl:if test="rap:agencyName!=''">

<xsl:if test="rap:agencyORI!=''">

<xsl:text> </xsl:text>

</xsl:if>

<xsl:value-of select="rap:agencyName"/>

</xsl:if>

</TD>

</TR>

<TR>

<TD><STRONG>Subject Name</STRONG></TD>

<TD COLSPAN="3">

<xsl:call-template name="rap:format-subjectName">

<xsl:with-param name="subject"

select="./rap:subjectName"/>

</xsl:call-template>

</TD>

</TR>

<xsl:if test="rap:courtCaseNumber!=''">

<TR>

<TD><STRONG>Court Case Number</STRONG></TD>

<TD COLSPAN="3"><xsl:value-of select="rap:courtCaseNumber"/></TD>

</TR>

</xsl:if>

<TR><TD COLSPAN="4"><BR/></TD></TR>

<TR ALIGN="LEFT">

<TD COLSPAN="4"><H3>Charges</H3></TD>

</TR>

<xsl:for-each select="rap:courtCharge">

<xsl:if test="position()>1">

<TR><TD COLSPAN="4"><BR/></TD></TR>

</xsl:if>

<TR ALIGN="LEFT">

<TH COLSPAN="2">Arrest Charge Sequence Number</TH>

<TH>Offense Date</TH>

<TH>NCIC Code</TH>

</TR>

<TR>

<xsl:choose>

<xsl:when test="rap:arrestChargeSequence!=''">

<TD COLSPAN="2"><xsl:value-of

select="rap:arrestChargeSequence"/></TD>

</xsl:when>

<xsl:otherwise>

<TD>None</TD>

</xsl:otherwise>

</xsl:choose>

<TD>

<xsl:call-template name="rap:format-date">

<xsl:with-param name="date" select="rap:offenseDate"/>

</xsl:call-template>

</TD>

<xsl:choose>

<xsl:when test="rap:ncicCode!=''">

<TD><xsl:value-of select="rap:ncicCode"/></TD>

58 
</xsl:when>

<xsl:otherwise>

<TD>Unknown</TD>

</xsl:otherwise>

</xsl:choose>

</TR>

<TR>

<TD><STRONG>Court Charge</STRONG></TD>

<TD COLSPAN="3">

<xsl:choose>

<xsl:when test="rap:literal!=''">

<xsl:value-of select="rap:literal"/>

</xsl:when>

<xsl:otherwise>Missing</xsl:otherwise>

</xsl:choose>

</TD>

</TR>

<TR ALIGN="LEFT">

<TH WIDTH="25%">Statute</TH>

<TH WIDTH="25%">Offense Code</TH>

<TH WIDTH="25%">Counts</TH>

<TH WIDTH="25%">Severity</TH>

</TR>

<TR>

<xsl:choose>

<xsl:when test="rap:statute!=''">

<TD><xsl:value-of select="rap:statute"/></TD>

</xsl:when>

<xsl:otherwise>

<TD>Unknown</TD>

</xsl:otherwise>

</xsl:choose>

<xsl:choose>

<xsl:when test="rap:offenseCode!=''">

<TD><xsl:value-of select="rap:offenseCode"/></TD>

</xsl:when>

<xsl:otherwise>

<TD>Unknown</TD>

</xsl:otherwise>

</xsl:choose>

<xsl:choose>

<xsl:when test="rap:counts!=''">

<TD><xsl:value-of select="rap:counts"/></TD>

</xsl:when>

<xsl:otherwise>

<TD>Unknown</TD>

</xsl:otherwise>

</xsl:choose>

<TD><xsl:call-template name="rap:format-severity"/></TD>

</TR>

<TR>

<TD><STRONG>Action</STRONG></TD>

<TD COLSPAN="3">

(<xsl:value-of select="rap:actionType"/>)

59
<xsl:text> </xsl:text>

<xsl:value-of select="rap:actionLiteral"/>

</TD>

</TR>

<TR>

<TD><STRONG>Action Date</STRONG></TD>

<TD>

<xsl:call-template name="rap:format-date">

<xsl:with-param name="date" select="rap:actionDate"/>

</xsl:call-template>

</TD>

</TR>

<xsl:if test="rap:comments!=''">

<TR VALIGN="TOP">

<TD><STRONG>Comments</STRONG></TD>

<TD COLSPAN="3"><xsl:value-of select="rap:comments"/></TD>

</TR>

</xsl:if>

</xsl:for-each> <!-- courtCharge -->

</xsl:template> <!-- courtDisposition -->

<!------------------+------------------->

<!-- sentencing -->

<!------------------+------------------->

<!-- This template formats the sentencing information.

It presumes that a table with four columns is currently open.

-->

<xsl:template name="rap:sentencing">

<TR VALIGN="TOP">

<TD><STRONG>Sentencing Agency</STRONG></TD>

<TD COLSPAN="3">

<xsl:if test="rap:agencyORI!=''">

<xsl:value-of select="rap:agencyORI"/>

</xsl:if>

<xsl:if test="rap:agencyName!=''">

<xsl:if test="rap:agencyORI!=''">

<xsl:text> </xsl:text>

</xsl:if>

<xsl:value-of select="rap:agencyName"/>

</xsl:if>

</TD>

</TR>

<xsl:if test="rap:courtCaseNumber!=''">

<TR>

<TD><STRONG>Court Case Number</STRONG></TD>

<TD COLSPAN="3"><xsl:value-of select="rap:courtCaseNumber"/></TD>

</TR>

</xsl:if>

60 
<TR>

<TD COLSPAN="2"><STRONG>Arrest Charge Sequence Number</STRONG></TD>

<TD COLSPAN="2"><xsl:value-of select="rap:arrestChargeSequence"/></TD>

</TR>

<TR>

<TD><STRONG>Sentence</STRONG></TD>

<TD COLSPAN="3">

<xsl:value-of select="rap:sentence"/>

</TD>

</TR>

<TR>

<TD><STRONG>Sentence Date</STRONG></TD>

<TD><xsl:call-template name="rap:format-date"/></TD>

</TR>

<xsl:if test="rap:comments!=''">

<TR VALIGN="TOP">

<TD><STRONG>Comments</STRONG></TD>

<TD COLSPAN="3"><xsl:value-of select="rap:comments"/></TD>

</TR>

</xsl:if>

</xsl:template> <!-- sentencing -->

<!------------------+------------------->

<!-- corrections -->

<!------------------+------------------->

<!-- This template formats the corrections information.

It presumes that a table with four columns is currently open.

-->

<xsl:template name="rap:corrections">

<TR VALIGN="TOP">

<TD><STRONG>Corrections Agency</STRONG></TD>

<TD COLSPAN="3">

<xsl:if test="rap:agencyORI!=''">

<xsl:value-of select="rap:agencyORI"/>

</xsl:if>

<xsl:if test="rap:agencyName!=''">

<xsl:if test="rap:agencyORI!=''">

<xsl:text> </xsl:text>

</xsl:if>

<xsl:value-of select="rap:agencyName"/>

</xsl:if>

</TD>

</TR>

<TR>

<TD><STRONG>Corrections Name</STRONG></TD>

<TD COLSPAN="3">

<xsl:call-template name="rap:format-subjectName">

<xsl:with-param name="subject"

61
select="./rap:subjectName"/>

</xsl:call-template>

</TD>

</TR>

<xsl:if test="rap:correctionalNumber!=''">

<TR>

<TD><STRONG>Corrections Number</STRONG></TD>

<TD COLSPAN="3"><xsl:value-of select="rap:correctionalNumber"/></TD>

</TR>

</xsl:if>

<xsl:if test="rap:courtCaseNumber!=''">

<TR>

<TD><STRONG>Court Case Number</STRONG></TD>

<TD COLSPAN="3"><xsl:value-of select="rap:courtCaseNumber"/></TD>

</TR>

</xsl:if>

<TR>

<TD><STRONG>Corrections Action</STRONG></TD>

<TD COLSPAN="3">

<xsl:value-of select="rap:actionLiteral"/>

</TD>

</TR>

<TR>

<TD><STRONG>Action Date</STRONG></TD>

<TD>

<xsl:call-template name="rap:format-date">

<xsl:with-param name="date" select="rap:actionDate"/>

</xsl:call-template>

</TD>

</TR>

<xsl:if test="rap:comments!=''">

<TR VALIGN="TOP">

<TD><STRONG>Comments</STRONG></TD>

<TD COLSPAN="3"><xsl:value-of select="rap:comments"/></TD>

</TR>

</xsl:if>

</xsl:template> <!-- corrections -->

<!------------------+------------------->

<!-- summary -->

<!------------------+------------------->

<!-- This template controls formatting of information from the summary

element. It is called from the /rapSheet template. If the

summary element is not present, this template is not used and the

generate-template is called instead.

-->

<xsl:template match="rap:summary">

62 
<BLOCKQUOTE>

<TABLE BORDER="0" CELLPADDING="2" WIDTH="90%">

<xsl:for-each select="rap:cautionInfo">

<TR VALIGN="TOP">

<TD><STRONG>Caution</STRONG></TD>

<TD><xsl:call-template name="rap:format-date"/></TD>

<TD><xsl:value-of select="rap:caution"/></TD>

</TR>

</xsl:for-each>

<TR>

<xsl:if test="rap:iffsDisqualified!=''">

<TD><STRONG>IFFS Disqualified</STRONG></TD>

<TD COLSPAN="2">

<xsl:call-template name="rap:format-severity">

<xsl:with-param name="severity" select="rap:iffsDisqualified"/>

</xsl:call-template>

</TD>

</xsl:if>

</TR>

<TR>

<TD><STRONG>Total Arrests</STRONG></TD>

<TD COLSPAN="2">

<xsl:value-of select="rap:totalArrests"/>

</TD>

</TR>

<TR VALIGN="TOP">

<TD WIDTH="25%"><STRONG>Total Charges</STRONG></TD>

<TD WIDTH="25%">Felonies<BR/>Misdemeanors<BR/>

Local Ordinances<BR/>Other<BR/>Unknown</TD>

<TD WIDTH="50%">

<xsl:value-of select="rap:totalCharges/rap:felony"/><BR/>

<xsl:value-of select="rap:totalCharges/rap:misdemeanor"/><BR/>

<xsl:value-of select="rap:totalCharges/rap:localOrdinance"/><BR/>

<xsl:value-of select="rap:totalCharges/rap:other"/><BR/>

<xsl:value-of select="rap:totalCharges/rap:unknown"/>

</TD>

</TR>

<TR VALIGN="TOP">

<TD WIDTH="25%"><STRONG>Total Convictions</STRONG></TD>

<TD WIDTH="25%">Felonies<BR/>Misdemeanors<BR/>

Local Ordinances<BR/>Other<BR/>Unknown</TD>

<TD WIDTH="50%">

<xsl:value-of select="rap:totalConvictions/rap:felony"/><BR/>

<xsl:value-of select="rap:totalConvictions/rap:misdemeanor"/><BR/>

<xsl:value-of select="rap:totalConvictions/rap:localOrdinance"/><BR/>

<xsl:value-of select="rap:totalConvictions/rap:other"/><BR/>

<xsl:value-of select="rap:totalConvictions/rap:unknown"/>

</TD>

</TR>

<TR>

<TD WIDTH="25%"><STRONG>Failures to Appear</STRONG></TD>

<TD COLSPAN="2">

<xsl:value-of select="rap:totalFailuresToAppear"/>

</TD>

</TR>

<TR>

<TD><STRONG>Total Revocations</STRONG></TD>

63
<TD COLSPAN="2">

<xsl:value-of select="rap:totalRevocations"/>

</TD>

</TR>

<TR>

<TD><STRONG>First Event Date</STRONG></TD>

<TD COLSPAN="2">

<xsl:call-template name="rap:format-date">

<xsl:with-param name="date" select="rap:firstEventDate"/>

</xsl:call-template>

</TD>

</TR>

<TR>

<TD><STRONG>Last Event Date</STRONG></TD>

<TD COLSPAN="2">

<xsl:call-template name="rap:format-date">

<xsl:with-param name="date" select="rap:lastEventDate"/>

</xsl:call-template>

</TD>

</TR>

</TABLE>

</BLOCKQUOTE>

<xsl:call-template name="rap:navigation-bar"/>

</xsl:template>

<!------------------+------------------->

<!-- count-items -->

<!------------------+------------------->

<!-- This template generates a count of numeric items from a node set

that fall within a given (inclusive) range [low, high].

-->

<xsl:template name="rap:count-items">

<xsl:param name="nodes" select="."/>

<xsl:param name="low" select="0"/>

<xsl:param name="high" select="0"/>

<xsl:choose>

<xsl:when test="$nodes">

<xsl:variable name="this"

select="$nodes[1]>=$low and $nodes[1]<=$high"/>

<xsl:variable name="rest">

<xsl:call-template name="rap:count-items">

<xsl:with-param name="nodes" select="$nodes[position()!=1]"/>

<xsl:with-param name="low" select="$low"/>

<xsl:with-param name="high" select="$high"/>

</xsl:call-template>

</xsl:variable>

<xsl:value-of select="number($this) + $rest"/>

</xsl:when>

<xsl:otherwise>0</xsl:otherwise>

</xsl:choose>

</xsl:template>

64 
<!------------------+------------------->

<!-- count-charges -->

<!------------------+------------------->

<!-- This template generates a count of charges from a node set

that have actionType=310 and the given severity.

-->

<xsl:template name="rap:count-charges">

<xsl:param name="nodes" select="."/>

<xsl:param name="severity" select="F"/>

<xsl:choose>

<xsl:when test="$nodes">

<xsl:variable name="this">

<xsl:value-of select="number($nodes[1]/severity=$severity)"/>

</xsl:variable>

<xsl:variable name="rest">

<xsl:call-template name="rap:count-charges">

<xsl:with-param name="nodes" select="$nodes[position()!=1]"/>

<xsl:with-param name="severity" select="$severity"/>

</xsl:call-template>

</xsl:variable>

<xsl:value-of select="$this + $rest"/>

</xsl:when>

<xsl:otherwise>0</xsl:otherwise>

</xsl:choose>

</xsl:template>

<!------------------+------------------->

<!-- count-convictions -->

<!------------------+------------------->

<!-- This template generates a count of convictions from a node set

that have actionType=310 and the given severity.

-->

<xsl:template name="rap:count-convictions">

<xsl:param name="nodes" select="."/>

<xsl:param name="severity" select="F"/>

<xsl:choose>

<xsl:when test="$nodes">

<xsl:variable name="this">

<xsl:value-of select="number($nodes[1]/severity=$severity and

$nodes[1]/actionType='310')"/>

</xsl:variable>

<xsl:variable name="rest">

<xsl:call-template name="rap:count-convictions">

<xsl:with-param name="nodes" select="$nodes[position()!=1]"/>

<xsl:with-param name="severity" select="$severity"/>

</xsl:call-template>

</xsl:variable>

<xsl:value-of select="$this + $rest"/>

</xsl:when>

<xsl:otherwise>0</xsl:otherwise>

</xsl:choose>

65
</xsl:template>

<!------------------+------------------->

<!-- generate-summary -->

<!------------------+------------------->

<!-- This template generates summary information from other elements.

It is called from the /rapSheet template when the summary element

is not included in the rapSheet.

-->

<xsl:template name="rap:generate-summary">

<BLOCKQUOTE>

<TABLE BORDER="0" CELLPADDING="2" WIDTH="90%">

<xsl:for-each select="rap:identification/rap:caution">

<TR VALIGN="TOP">

<TD><STRONG>Caution</STRONG></TD>

<TD><xsl:call-template name="rap:format-date"/></TD>

<TD>(<xsl:value-of select="rap:state"/>) <xsl:value-of

select="rap:text"/></TD>

</TR>

</xsl:for-each>

<TR>

<xsl:if test="rap:identification/fifsSeverity!=''">

<TD><STRONG>IFFS Disqualified</STRONG></TD>

<TD COLSPAN="2">

<xsl:call-template name="rap:format-severity">

<xsl:with-param name="severity"

select="rap:identification/rap:fifsSeverity"/>

</xsl:call-template>

</TD>

</xsl:if>

</TR>

<TR>

<TD><STRONG>Total Arrests</STRONG></TD>

<TD COLSPAN="2">

<xsl:value-of select="count(rap:cycle/rap:arrest)"/>

</TD>

</TR>

<TR VALIGN="TOP">

<TD WIDTH="25%"><STRONG>Total Charges</STRONG></TD>

<TD WIDTH="25%">Felonies<BR/>Misdemeanors<BR/>

Local Ordinances<BR/>Other<BR/>Unknown</TD>

<TD WIDTH="50%">

<xsl:call-template name="rap:count-charges">

<xsl:with-param name="nodes"

select="rap:cycle/rap:arrest/rap:arrestCharge"/>

<xsl:with-param name="severity" select="'F'"/>

</xsl:call-template><BR/>

<xsl:call-template name="rap:count-charges">

<xsl:with-param name="nodes"

select="rap:cycle/rap:arrest/rap:arrestCharge"/>

<xsl:with-param name="severity" select="'M'"/>

</xsl:call-template><BR/>

66 
<xsl:call-template name="rap:count-charges">

<xsl:with-param name="nodes"

select="rap:cycle/rap:arrest/rap:arrestCharge"/>

<xsl:with-param name="severity" select="'L'"/>

</xsl:call-template><BR/>

<xsl:call-template name="rap:count-charges">

<xsl:with-param name="nodes"

select="rap:cycle/rap:arrest/rap:arrestCharge"/>

<xsl:with-param name="severity" select="'O'"/>

</xsl:call-template><BR/>

<xsl:call-template name="rap:count-charges">

<xsl:with-param name="nodes"

select="rap:cycle/rap:arrest/rap:arrestCharge"/>

<xsl:with-param name="severity" select="'U'"/>

</xsl:call-template>

</TD>

</TR>

<TR VALIGN="TOP">

<TD WIDTH="25%"><STRONG>Total Convictions</STRONG></TD>

<TD WIDTH="25%">Felonies<BR/>Misdemeanors<BR/>

Local Ordinances<BR/>Other<BR/>Unknown</TD>

<TD WIDTH="50%">

<xsl:call-template name="rap:count-convictions">

<xsl:with-param name="nodes"

select="rap:cycle/rap:courtDisposition/rap:courtCharge"/>

<xsl:with-param name="severity" select="'F'"/>

</xsl:call-template><BR/>

<xsl:call-template name="rap:count-convictions">

<xsl:with-param name="nodes"

select="rap:cycle/rap:courtDisposition/rap:courtCharge"/>

<xsl:with-param name="severity" select="'M'"/>

</xsl:call-template><BR/>

<xsl:call-template name="rap:count-convictions">

<xsl:with-param name="nodes"

select="rap:cycle/rap:courtDisposition/rap:courtCharge"/>

<xsl:with-param name="severity" select="'L'"/>

</xsl:call-template><BR/>

<xsl:call-template name="rap:count-convictions">

<xsl:with-param name="nodes"

select="rap:cycle/rap:courtDisposition/rap:courtCharge"/>

<xsl:with-param name="severity" select="'O'"/>

</xsl:call-template><BR/>

<xsl:call-template name="rap:count-convictions">

<xsl:with-param name="nodes"

select="rap:cycle/rap:courtDisposition/rap:courtCharge"/>

<xsl:with-param name="severity" select="'U'"/>

</xsl:call-template>

</TD>

</TR>

<TR>

<TD WIDTH="25%"><STRONG>Failures to Appear</STRONG></TD>

<TD COLSPAN="2">

<xsl:call-template name="rap:count-items">

<xsl:with-param name="nodes"

select="rap:cycle/rap:courtDisposition/rap:courtCharge/rap:actionType"/>

<xsl:with-param name="low" select="401"/>

67
<xsl:with-param name="high" select="401"/>

</xsl:call-template>

</TD>

</TR>

<TR>

<TD><STRONG>Total Revocations</STRONG></TD>

<TD COLSPAN="2">

<xsl:call-template name="rap:count-items">

<xsl:with-param name="nodes"

select="rap:cycle/rap:courtDisposition/rap:courtCharge/rap:actionType"/>

<xsl:with-param name="low" select="501"/>

<xsl:with-param name="high" select="504"/>

</xsl:call-template>

</TD>

</TR>

<TR>

<TD><STRONG>Last Event Date</STRONG></TD>

<TD COLSPAN="2">

<xsl:for-each select="rap:cycle">

<xsl:sort select="rap:earliestDate"/>

<xsl:if test="position()=1">

<xsl:call-template name="rap:format-date">

<xsl:with-param name="date" select="rap:earliestDate"/>

</xsl:call-template>

</xsl:if>

</xsl:for-each>

</TD>

</TR>

</TABLE>

</BLOCKQUOTE>

<xsl:call-template name="rap:navigation-bar"/>

</xsl:template>

<!------------------+------------------->

<!-- index -->

<!------------------+------------------->

<!-- This template controls formatting of information from index

elements. It is called from the /rapSheet template.

-->

<xsl:template match="rap:agencyIndex">

<BLOCKQUOTE>

<TABLE BORDER="0" CELLPADDING="0" WIDTH="90%">

<xsl:for-each select="rap:agencyInfo">

<xsl:if test="position()>1">

<TR><TD COLSPAN="2"><BR/></TD></TR>

</xsl:if>

<TR>

<TD><STRONG>Agency</STRONG></TD>

<TD>

68 
<xsl:if test="rap:agencyORI!=''">

<xsl:value-of select="rap:agencyORI"/>

<xsl:text> </xsl:text>

</xsl:if>

<xsl:if test="rap:agencyName!=''">

<xsl:value-of select="rap:agencyName"/>

</xsl:if>

</TD>

</TR>

<TR>

<xsl:if test="rap:department!=''">

<TD><STRONG>Department</STRONG></TD>

<TD>

<xsl:value-of select="rap:department"/>

</TD>

</xsl:if>

</TR>

<TR>

<xsl:if test="rap:phone!=''">

<TD><STRONG>Phone Number</STRONG></TD>

<TD>

<xsl:value-of select="rap:phone"/>

</TD>

</xsl:if>

</TR>

<TR>

<xsl:if test="rap:fax!=''">

<TD><STRONG>Fax Number</STRONG></TD>

<TD>

<xsl:value-of select="rap:fax"/>

</TD>

</xsl:if>

</TR>

<TR>

<xsl:if test="rap:internetEmail!=''">

<TD><STRONG>Internet Email</STRONG></TD>

<TD>

<xsl:value-of select="rap:internetEmail"/>

</TD>

</xsl:if>

</TR>

<TR>

<xsl:if test="rap:contactPerson!=''">

<TD><STRONG>Contact Person</STRONG></TD>

<TD>

<xsl:value-of select="rap:contactPerson"/>

</TD>

</xsl:if>

</TR>

<TR>

<xsl:if test="rap:addressInfo/rap:address!=''">

<TD><STRONG>Address</STRONG></TD>

<TD>

<xsl:value-of select="rap:addressInfo/rap:address"/>

</TD>

</xsl:if>

</TR>

69
<TR>

<xsl:if test="rap:addressInfo/rap:buildingName!=''">

<TD><STRONG>Building and Room Number</STRONG></TD>

<TD>

<xsl:value-of select="rap:addressInfo/rap:buildingName"/>

<xsl:if test="rap:addressInfo/rap:roomNumber!=''">

<xsl:text>, Room </xsl:text>

<xsl:value-of select="rap:addressInfo/rap:roomNumber"/>

</xsl:if>

</TD>

</xsl:if>

</TR>

<TR>

<xsl:if test="rap:addressInfo/rap:postOfficeBox!=''">

<TD><STRONG>Post Office Box</STRONG></TD>

<TD>

<xsl:value-of select="rap:addressInfo/rap:postOfficeBox"/>

</TD>

</xsl:if>

</TR>

<TR>

<xsl:if test="rap:addressInfo/rap:streetNumber!=''">

<TD><STRONG>Street Address</STRONG></TD>

<TD>

<xsl:value-of select="rap:addressInfo/rap:streetNumber"/>

<xsl:text> </xsl:text>

<xsl:value-of select="rap:addressInfo/rap:street"/>

</TD>

</xsl:if>

</TR>

<TR>

<xsl:if test="rap:addressInfo/rap:city!=''">

<TD><STRONG>City, State, Zipcode </STRONG></TD>

<TD>

<xsl:value-of select="rap:addressInfo/rap:city"/>

<xsl:text>, </xsl:text>

<xsl:value-of select="rap:addressInfo/rap:state"/>

<xsl:text> </xsl:text>

<xsl:value-of select="rap:addressInfo/rap:zipcode"/>

</TD>

</xsl:if>

</TR>

<TR>

<xsl:if test="rap:addressInfo/rap:county!=''">

<TD><STRONG>County</STRONG></TD>

<TD>

<xsl:value-of select="rap:addressInfo/rap:county"/>

</TD>

</xsl:if>

</TR>

<TR>

<xsl:if test="rap:addressInfo/rap:country!=''">

<TD><STRONG>Country</STRONG></TD>

<TD>

<xsl:value-of select="rap:addressInfo/rap:country"/>

</TD>

70 
</xsl:if>

</TR>

<TR>

<xsl:if test="rap:addressInfo/rap:foreignPostalCode!=''">

<TD><STRONG>Foreign Postal Code</STRONG></TD>

<TD>

<xsl:value-of select="rap:addressInfo/rap:foreignPostalCode"/>

</TD>

</xsl:if>

</TR>

</xsl:for-each>

</TABLE>

</BLOCKQUOTE>

<xsl:call-template name="rap:navigation-bar"/>

</xsl:template>

</xsl:stylesheet>

71
APPENDIX D. XSLT Results 

(File name: Rapsheet-0201.html – Screens produced by Netscape 6.1) 

72 
73
74 
75
76 
77
78 
79
80 
81
82