---
title: "15.3 XSD"
chapter: "15 Exchange Formats"
source: "OMG BPMN 2.0.2 — formal/2013-12-09"
pages: "475-477"
---

> 15 Exchange Formats · páginas 475-477 · [índice](../README.md)


<a id="sec-15-3"></a>
## 15.3 XSD


<a id="sec-15-3-1"></a>
### 15.3.1 Document Structure


A domain-specific set of model elements is interchanged in one or more **BPMN** files. The root element of each file MUST be <bpmn:definitions>. The set of files MUST be self-contained, i.e., all definitions that are used in a file MUST be imported directly or indirectly using the <bpmn:import> element. Each file MUST declare a “targetNamespace” that MAY differ between multiple files of one model. **BPMN** files MAY import non-**BPMN** files (such as XSDs and WSDLs) if the contained elements use external definitions. **Example: main.bpmn**


targetNamespace="sample1.main" xmlns:main="sample1.main" xmlns:s1="sample1.semantic1"> importType="http://www.omg.org/spec/BPMN/20100524/MODEL” /> importType="http://www.omg.org/spec/BPMN/20100524/MODEL” />


**semantic1.bpmn**


targetNamespace="sample1.semantic1"


**diagram1.bpmn**


xmlns:bpmndi="http://www.omg.org/spec/BPMNDI/1.0.0" xmlns:d1="sample1.diagram1" xmlns:s1="sample1.semantic1"


<a id="sec-15-3-2"></a>
### 15.3.2 References within the BPMN XSD


All **BPMN** elements contain IDs and within the **BPMN** XSD, references to elements are expressed via these IDs. The XSD IDREF type is the traditional mechanism for referencing by IDs, however it can only reference an element within the same file. The **BPMN** XSD supports referencing by ID, across files, by utilizing QNames. A QName consists of two parts: an optional namespace prefix and a local part. When used to reference a **BPMN** element, the local part is expected to be the ID of the element. For example, consider the following **Process** <process name="Patient Handling" id="Patient_Handling_Process_ID1"> ... </process> When this **Process** is referenced from another file, the reference would take the following form:


- processRef="process_ns: Patient_Handling_Process_ID1"


where “process_ns” is the namespace prefix associated with the process namespace upon import, and “Patient_Handling_Process_ID1” is the value of the id attribute for the **Process**.


The **BPMN** XSD utilizes IDREFs wherever possible and resorts to QName only when references can span files. In both situations however, the reference is still based on IDs.

