-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathndr-doc.txt
6413 lines (4149 loc) · 370 KB
/
ndr-doc.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
National Information Exchange Model Naming and Design Rules
Version 3.0rc1
July 30, 2014
NIEM Technical Architecture Committee (NTAC)
Contents
The table of contents is omitted from this edition.
Table of Figures
The table of figures is omitted from this edition.
Table of Tables
The table of tables is omitted from this edition.
Authors
Webb Roberts, Georgia Tech Research Institute
Abstract
This document specifies the data model, XML Schema components, and XML data for use with the National Information Exchange Model (NIEM) version 3.0.
Status
This document is a draft of the specification for XML Schema documents, components, and instances for use with NIEM. It represents the design that has evolved from the collaborative work of the NIEM Business Architecture Committee (NBAC), the NIEM Technical Architecture Committee (NTAC), and their predecessors.
This specification is a product of the NIEM Program Management Office (PMO).
Send comments on this specification via email to [email protected].
1. Introduction
This Naming and Design Rules (NDR) document specifies XML Schema documents for use with the National Information Exchange Model (NIEM). NIEM is an information sharing framework based on the World Wide Web Consortium (W3C) Extensible Markup Language (XML) Schema standard. In February 2005, the U.S. Departments of Justice (DOJ) and Homeland Security (DHS) signed a cooperative agreement to jointly develop NIEM by leveraging and expanding the Global Justice XML Data Model (GJXDM) into multiple domains. NIEM is a result of a combined government and industry effort to improve information interoperability and exchange within the United States at federal, state, tribal, and local levels of government.
NIEM specifies a set of reusable information components for defining standard information exchange messages, transactions, and documents on a large scale: across multiple communities of interest and lines of business. These reusable components are rendered in XML Schema documents as type, element, and attribute declarations that comply with the W3C XML Schema specification. The resulting reference schemas are available to government practitioners and developers at http://niem.gov/.
The W3C XML Schema standard enables information interoperability and sharing by providing a common language for describing data precisely. The constructs it defines are basic metadata building blocks -- baseline data types and structural components. Developers employ these building blocks to describe their own domain-oriented data semantics and structures, as well as structures for specific information exchanges and components for reuse across multiple information exchanges. Rules that profile allowable XML Schema constructs and describe how to use them help ensure that those components are consistent and reusable.
This document specifies principles and enforceable rules for NIEM data components and schemas. Schemas and components that obey the rules set forth here are considered to be conformant to specific conformance targets. These targets are defined in order that they may be leveraged for comprehensive definitions of NIEM conformance. Such definitions may include more than the level of conformance defined by this NDR, and may include specific patterns of use, additional quality criteria, and requirements to reuse NIEM release schemas.
1.1. Scope
This document was developed to specify NIEM 3.0. Later releases of NIEM may be specified by later versions of this document. The document covers the following issues in depth:
* The underlying NIEM data model
* Guiding principles behind the design of NIEM
* Rules for using XML Schema constructs in NIEM
* Rules for modeling and structuring NIEM-conformant schemas
* Rules for creating NIEM-conformant instances
* Rules for naming NIEM components
* Rules for extending NIEM-conformant components
This document does NOT address the following:
* A formal definition of the NIEM data model.
Such a definition would focus on the Resource Definition Framework (RDF) and concepts not strictly required for interoperability. This document instead focuses on definition of schemas that work with the data model, to ensure translatability and interoperability.
* A detailed discussion of NIEM architecture and schema versioning.
* Aggregate artifacts that define information exchanges and models, including information exchange packages (IEPs) and their specifications, information exchange package descriptions (IEPDs) or other forms of information exchange specifications (IESs), as well as enterprise information exchange models (EIEMs), and other other forms of model package descriptions (MPDs).
* Normative guidance for the location of [schema documents] or for schema assembly.
This document is intended as a technical specification. It is not intended to be a tutorial or a user guide.
1.2. Audience
This document targets practitioners and developers who employ NIEM for information exchange and interoperability. Such information exchanges may be between organizations or within an organization. The NIEM reference schemas provide system implementers much content on which to build specific exchanges. However, there is a need for extended and additional content. The purpose of this document is to define the rules for such new content, so that it will be consistent with the NIEM reference schemas. These rules are intended to establish and, more importantly, enforce a degree of standardization across a broad set of users.
2. Document conventions and normative content
This document uses formatting and syntactic conventions to clarify meaning and avoid ambiguity.
2.1. Document references
This document relies on references to many outside documents. Such references are noted by bold, bracketed inline terms. For example, a reference to RFC 2119 is shown as [RFC 2119]. All reference documents are recorded in Appendix A, References, below.
2.2. Clark notation and qualified names
This document uses both Clark notation and QName notation to represent qualified names.
QName notation is defined by [XML Namespaces] Section 4, Qualified Names. A QName for the XML Schema string datatype is xs:string. Namespace prefixes used within this specification are listed in Section 2.3, Use of namespaces and namespace prefixes, below.
This document sometimes uses Clark notation to represent qualified names in normative text. Clark notation is described by [ClarkNS], and provides the information in a QName without the need to first define a namespace prefix, and then to reference that namespace prefix. A Clark notation representation for the qualified name for the XML Schema string datatype is {http://www.w3.org/2001/XMLSchema}string.
Each Clark notation value usually consists of a namespace URI surrounded by curly braces, concatenated with a local name. The exception to this is when Clark notation is used to represent the qualified name for an attribute with no namespace, which is ambiguous when represented using QName notation. For example, the element targetNamespace, which has no [namespace name] property, is represented in Clark notation as {}targetNamespace.
2.3. Use of namespaces and namespace prefixes
The following namespace prefixes are used consistently within this specification. These prefixes are not normative; this document issues no requirement that these prefixes be used in any conformant artifact. Although there is no requirement for a schema or XML document to use a particular namespace prefix, the meaning of the following namespace prefixes have fixed meaning in this document.
* xs: The namespace for the XML Schema definition language as defined by [XML Schema Structures] and [XML Schema Datatypes], "http://www.w3.org/2001/XMLSchema".
* xsi: The XML Schema instance namespace, defined by [XML Schema Structures] Section 2.6, Schema-Related Markup in Documents Being Validated, for use in XML documents, "http://www.w3.org/2001/XMLSchema-instance".
* sch: The Schematron namespace, as defined by [Schematron], "http://purl.oclc.org/dsdl/schematron".
* nf: The namespace defined by this specification for XPath functions, "http://reference.niem.gov/niem/specification/naming-and-design-rules/3.0/#NDRFunctions".
* ct: The namespace defined by [CTAS] for the conformanceTargets attribute, "http://release.niem.gov/niem/conformanceTargets/3.0/".
* appinfo: The namespace for the [appinfo namespace], "http://release.niem.gov/niem/appinfo/3.0/".
* structures: The namespace for the [structures namespace], "http://release.niem.gov/niem/structures/3.0/".
* term: The namespace for the [local terminology appinfo namespace], "http://release.niem.gov/niem/localTerminology/3.0/".
2.4. Normative and informative content
This document includes a variety of content. Some content of this document is [normative], while other content is [informative]. In general, the informative material appears as supporting text, description, and rationales for the normative material.
[Definition: normative]
The term "normative" is as defined by [ConfReq] Section 7.2, Conformance by key words, which states:
NORMATIVE -- statements provided for the prescriptive parts of the specification, providing that which is necessary in order to be able to claim conformance to the specification.
[Definition: informative]
The term "informative" is as defined by [ConfReq] Section 7.2, Conformance by key words, which states:
INFORMATIVE (NON-NORMATIVE) -- statements provided for informational purposes, intended to assist the understanding or use of the specification and shall not contain provisions that are required for conformance.
Conventions used within this document include:
[Definition: <term>]
A formal definition of a term associated with NIEM.
Definitions are [normative]. Uses of these terms are given special formatting, using raised dots to identify the term, for example this use of the term [conformance target].
[Principle <number>]
A guiding principle for NIEM.
The principles represent requirements, concepts, and goals that have helped shape NIEM. Principles are informative, not normative, but act as the basis on which the rules are defined.
Accompanying each principle is a short discussion that justifies the application of the principle to NIEM design.
Principles are numbered in the order in which they appear in the document.
2.4.1. Rules
A rule states a specific requirement on an artifact or on the interpretation of an artifact. The classes of artifacts are identified by [conformance targets] that are enumerated by this document in Section 4.1, Conformance targets defined, below. The rules are normative. Human-readable text in rules uses [RFC 2119] terminology as described in Section 3.1, RFC 2119 terminology, below, for normative requirements and recommendations.
[Rule <section>-<number>] (<applicability>)
An enforceable rule for NIEM.
Each rule has a classification, which is either "Constraint" or "Interpretation". If the classification is "Constraint", then the rule is a [constraint rule]. If the classification is "Interpretation", then the rule is an [interpretation rule].
[Definition: constraint rule]
A constraint rule is a rule that sets a requirement on an artifact with respect to its conformance to a [conformance target].
[Definition: interpretation rule]
An interpretation rule is a rule that sets the methodology, pattern, or procedure for understanding some aspect of an instance of a conformance target.
Each rule identifies its applicability. This identifies the conformance targets to which the rule applies. Each entry in the list is a code from Table Table 4-1, Codes representing conformance targets, below. If a code appears in the applicability list for a rule, then the rule applies to the corresponding conformance target. The conformance targets are defined in Section 4, Conformance targets, below. For example, a rule with applicability "(REF, EXT)" would be applicable to a [reference schema document], as well as to an [extension schema document].
Rules are stated with the help of XML Infoset terminology (e.g., elements and attributes), as described by Section 3.3, XML Information Set terminology, below, and XML Schema terminology (e.g., schema components), as described by Section 3.4, XML Schema terminology, below. The choice of terminology is driven by which terms best express a concept. Certain concepts are more clearly expressed using XML Infoset terms items, others using XML Schema terms; still others are best expressed using a combination of terminology drawn from each standard.
Rules are numbered according to the section in which they appear and the order in which they appear within that section. For example, the first rule in Section 7 is Rule 7-1.
2.4.2. Use of normative Schematron
This document defines many normative rules using Schematron rule-based validation syntax, as defined by [Schematron]. For example, see Rule 9-28, Complex type content is explicitly simple or complex. Effort has been made to make the rules precise and unambiguous. Very detailed text descriptions of rules can introduce ambiguity, and they are not directly executable by users. Providing NDR rules that are expressed as Schematron rules ensures that the rules are precise, and that they are directly executable through commercially-available and free tools.
Many rules herein do not have executable Schematron supporting them. Some are not fit for automatic validation, and others may be difficult or cumbersome to express in Schematron. In neither case are such rules any less normative. A rule that has no Schematron is just as normative as a rule that does have Schematron. The level of requirements and recommendations within a rule is expressed using terminology from [RFC 2119] as described in Section 3.1, RFC 2119 terminology, below.
The Schematron rules are written using XPath2 as defined by [XPath 2]. These executable rules are normative.
An execution of a Schematron pattern that issues a failed assertion (represented via sch:assert) represents a validation error, and signifies that the assessed artifact violates a requirement of a conformance rule. An example of a constraint rule that uses schematron is Rule 9-10, Simple type definition is top-level.
An execution of a Schematron pattern that issues a report (represented via sch:report) indicates cause for concern. This may be:
* An indication that the automated rules are not sufficient to validate a conformance rule, and that another means is required to ensure conformance. This is frequently a reference to another specification. For example, see Rule 9-83, Target namespace is absolute URI, which references [RFC 3986].
* an indication that an automated rule has found that the assessed artifact violates a recommendation of the specification (e.g., a SHOULD, rather than a MUST), and that attention should be paid to ensure that the artifact maintains the spirit of the specification. For example, see Rule 10-41, Name of element that ends in "Representation" is abstract.
In either case, a diagnostic report generated by testing an XML document against the Schematron rules may identify specific locations (e.g., line numbers) within the document that need further attention.
2.4.3. Normative XPath functions
The Schematron within this document is supported by functions, to make the rules more comprehensible, and to abstract away process-specific operations. Each function has a normative XPath interface and a normative text definition. Any implementation provided for these functions should be considered informative, not normative, but may be useful for certain implementations of the rules.
The following XPath functions are defined normatively when used within Schematron by this specification:
* nf:get-document-element($context as element()) as element()
Yields the document element of the XML document in which $context occurs.
This function provides the ability for a validator to consolidate multiple XML Schema documents and XML instance documents into a single XML document, which may simplify validation, and allow for preprocessing of xs:include elements.
* nf:get-target-namespace($element as element()) as xs:anyURI?
Yields the target namespace of the XML Schema document in which $element appears. If it is a [schema document] with no target namespace defined, then it yields the zero-length xs:anyURI value (xs:anyURI('')). If the [XML document] in which $element appears is not a [schema document], then the function yields the empty sequence (()).
* nf:resolve-namespace($context as element(), $namespace-uri as xs:anyURI) as element(xs:schema)?
Yields the document element of the first available [schema document] that has the target namespace $namespace-uri. If there is no such [schema document] available, it yields the empty sequence (()).
* nf:resolve-type($context as element(), $qname as xs:QName) as element()?
Yields the first occurence of an element xs:simpleType or xs:complexType that defines a type with a {target namespace} and {name} matching $qname, that is a [child] of the element yielded by nf:resolve-namespace(), above. If there is no such occurrence, it yields the empty sequence (()).
* nf:resolve-element($context as element(), $qname as xs:QName) as element(xs:element)?
Yields the first occurrence of an element xs:element that declares an element with a {target namespace} and {name} matching $qname, that is a [child] of the element yielded by nf:resolve-namespace(), above. If there is no occurrence available, it yields the empty sequence. (())
* nf:has-effective-conformance-target-identifier($context as element(), $match as xs:anyURI) as xs:boolean
Yields true if and only if an [effective conformance target identifier] of the XML document containing $context is $match.
2.4.4. Normative Schematron namespace declarations
The following Schematron namespace declarations are normative for the Schematron rules and supporting Schematron code within this specification:
Figure 2-1: Normative Schematron namespace declarations
<sch:ns prefix="xs" uri="http://www.w3.org/2001/XMLSchema"/>
<sch:ns prefix="xsl" uri="http://www.w3.org/1999/XSL/Transform"/>
<sch:ns prefix="nf" uri="http://reference.niem.gov/niem/specification/naming-and-design-rules/3.0/#NDRFunctions"/>
<sch:ns prefix="ct" uri="http://release.niem.gov/niem/conformanceTargets/3.0/"/>
<sch:ns prefix="xsi" uri="http://www.w3.org/2001/XMLSchema-instance"/>
<sch:ns prefix="appinfo" uri="http://release.niem.gov/niem/appinfo/3.0/"/>
<sch:ns prefix="structures" uri="http://release.niem.gov/niem/structures/3.0/"/>
<sch:ns prefix="term" uri="http://release.niem.gov/niem/localTerminology/3.0/"/>
Note that the binding of the prefix xml to the XML namespace ("http://www.w3.org/XML/1998/namespace") is implicit.
2.5. Additional formatting
In addition to the special formatting above, this document uses additional formatting conventions.
[square brackets]: Terms in plain [square brackets] are properties of XML information set information items, as defined by [XML Infoset]. The information items and many of the information items' properties are defined in that document. [XML Schema Structures] defines additional information item properties that are contributed by validation of an [XML document] against an [XML Schema].
{curly brackets}: Terms in plain {curly brackets} are properties of [schema components], as defined by [XML Schema Structures].
Courier: All words appearing in Courier font are values, objects, keywords, or literal XML text.
Italics: A phrase appearing in italics is one of:
* a title of a section of document or a rule,
* a locally-defined term, often one that is not normatively defined, or
* is emphasized for importance or prominence.
Bold: A phrase appearing in bold is one of:
* a term being defined within a definition,
* a term that was bold in the original source text for a quote
* a heading, such as for a section, a figure, a principle, definition, or rule, or
* a cross-reference within the document, to a reference to an outside document, or to a normative heading.
Throughout the document, fragments of XML Schema or XML instances are used to clarify a principle or rule. These fragments are specially formatted in Courier font and appear in text boxes. An example of such a fragment follows:
Figure 2-2: Example of an XML fragment
<xs:complexType name="PersonType">
...
</xs:complexType>
3. Terminology
This document uses standard terminology from other standards to explain the principles and rules that describe NIEM. In addition, it defines terms related to these other standards. This section enumerates this externally-dependent terminology.
3.1. RFC 2119 terminology
Within normative content (rules and definitions), the key words MUST, MUST NOT, REQUIRED, SHALL, SHALL NOT, SHOULD, SHOULD NOT, RECOMMENDED, MAY, and OPTIONAL in this document are to be interpreted as described in [RFC 2119].
3.2. XML terminology
[Definition: XML document]
The term "XML document" is as defined by [XML] Section 2, Documents, which states:
A data object is an XML document if it is well-formed, as defined in this specification. In addition, the XML document is valid if it meets certain further constraints.
3.3. XML Information Set terminology
When discussing XML documents, this document uses terminology and language as defined by [XML Infoset].
[XML Infoset] uses the term "information item" to describe pieces of XML documents. Documents, elements, and attributes are types of information items. The use of the term "element information item", for example, refers to the term as defined by [XML Infoset]. Shorthand terms may also be used to refer to information items, such as [element], as defined below. The information items are identified and defined by [XML Infoset] Section 2, Information Items.
[Definition: element]
An element is an element information item, as defined by [XML Infoset] Section 2.2, Element Information Items
[Definition: attribute]
An attribute is an attribute information item, as defined by [XML Infoset] Section 2.3, Attribute Information Items
[XML Infoset] also describes properties of information items. Each class of information item carries a set of properties. Each property has a name, and the property is identified by putting the name into square brackets. For example, the element that contains an attribute is described as the [owner element] of an attribute information item, as defined in [XML Infoset] Section 2.3, Attribute Information Items.
Shorthand terms for properties of information items include:
* parent (of an element): the value of the [parent] property of an element information item
* child (of an element): a member of the list of information items that is the value of the [children] property of an element information item
* owner (of an attribute): the value of the [owner element] property of an attribute information item
* document element: the value of the [document element] property of a document information item; preferred over the term "root element".
3.4. XML Schema terminology
This document uses many terms from [XML Schema Structures] and [XML Schema Datatypes] in a normative way.
[Definition: schema component]
The term "schema component" is as defined by [XML Schema Structures] Section 2.2, XML Schema Abstract Data Model, which states:
Schema component is the generic term for the building blocks that comprise the abstract data model of the schema.
Note that this defines an abstract concept. This is not a direct reference to elements that are defined by the [XML Schema definition language]; this is an abstract concept that might be realized within a tool as an in-memory model of data objects.
[Definition: XML Schema]
The term "XML Schema" is as defined by [XML Schema Structures] Section 2.2, XML Schema Abstract Data Model, which states:
An XML Schema is a set of schema components.
Note, again, that this is an abstract concept: the set of abstract [schema components] that are put together to define a schema against which an XML document might be validated.
[Definition: XML Schema definition language]
The term "XML Schema definition language" is as defined by [XML Schema Structures] subsection Abstract, which states:
XML Schema: Structures specifies the XML Schema definition language, which offers facilities for describing the structure and constraining the contents of XML 1.0 documents, including those which exploit the XML Namespace facility. The schema language, which is itself represented in XML 1.0 and uses namespaces, substantially reconstructs and considerably extends the capabilities found in XML 1.0 document type definitions (DTDs).
This describes the XML syntax (and related semantics) defined by the XML Schema specifications. It is through the [XML Schema definition language] that a complex type definition schema component is created using the xs:complexType element.
[Definition: schema document]
The term "schema document" is as defined by [XML Schema Structures] Section 3.1.2, XML Representations of Components, which states:
A document in this form (i.e. a <schema> element information item) is a schema document.
This definition describes an [XML document] that follows the syntax of the [XML Schema definition language].
[Definition: valid]
The term "valid" is as defined by [XML Schema Structures] Section 2.1, Overview of XML Schema, which states:
[Definition:] the word valid and its derivatives are used to refer to clause 1 above, the determination of local schema-validity.
The referenced clause 1 is a part of a description of schema-validity:
Schema-validity assessment has two aspects:
1. Determining local schema-validity, that is whether an element or attribute information item satisfies the constraints embodied in the relevant components of an XML Schema;
2. Synthesizing an overall validation outcome for the item, combining local schema-validity with the results of schema-validity assessments of its descendants, if any, and adding appropriate augmentations to the infoset to record this outcome.
In addition, this specification locally defines terms relevant to XML Schema concepts:
[Definition: instance document]
An instance document (of an [XML Schema]) is an [XML document] that is [valid] against the [XML Schema].
The term "instance document" is used with [XML Schema Structures], but is not defined therein.
[Definition: XML Schema document set]
An XML Schema document set is a set of [schema documents] that together define an [XML Schema] suitable for assessing the [validity] of an [XML document].
Schema assembly is a tricky topic that is not resolved by this document. Other specifications may express specifics about the process of turning a set of [schema documents] into an [XML Schema]. Methods used may include use of tool-specific schema caches and mappings, use of XML catalogs and entity resolvers, use of schemaLocation attributes on xs:import elements, and xsi:schemaLocation attributes in XML documents, among others. The topic of schema assembly is discussed in Section 6.2.10, Schema locations provided in schema documents are hints, below. This specification abstracts away details of schema assembly through the use of XPath functions described by Section 2.4.3, Normative XPath functions, above.
3.4.1. Schema components
In this document, the name of a referenced schema component may appear without the suffix "schema component" to enhance readability of the text. For example, the term "complex type definition" may be used instead of "complex type definition schema component".
[Definition: base type definition]
The term "base type definition" is as defined by [XML Schema Structures] Section 2.2.1.1, Type Definition Hierarchy, which states:
A type definition used as the basis for an extension or restriction is known as the base type definition of that definition.
[Definition: simple type definition]
The term "simple type definition" is as defined by [XML Schema Structures] Section 2.2.1.2, Simple Type Definition.
[Definition: complex type definition]
The term "complex type definition" is as defined by [XML Schema Structures] Section 2.2.1.3, Complex Type Definition.
[Definition: element declaration]
The term "element declaration" is as defined by [XML Schema Structures] Section 2.2.2.1, Element Declaration.
3.5. XML Namespaces terminology
This document uses XML Namespaces as defined by [XML Namespaces] and [XML Namespaces Errata].
3.6. Conformance Targets Attribute Specification terminology
[CTAS] defines several terms used normatively within this specification.
[Definition: conformance target]
The term "conformance target" is as defined by [CTAS], which states:
A conformance target is a class of artifact, such as an interface, protocol, document, platform, process or service, that is the subject of conformance clauses and normative statements. There may be several conformance targets defined within a specification, and these targets may be diverse so as to reflect different aspects of a specification. For example, a protocol message and a protocol engine may be different conformance targets.
[Definition: conformance target identifier]
The term "conformance target identifier" is as defined by [CTAS], which states:
A conformance target identifier is an internationalized resource identifier that uniquely identifies a conformance target.
[Definition: effective conformance target identifier]
The term "effective conformance target identifier" is as defined by [CTAS] Section 4, Semantics and Use, which states:
An effective conformance target identifier of a conformant document is an internationalized resource identifier reference that occurs in the document's effective conformance targets attribute.
4. Conformance targets
4.1. Conformance targets defined
This section defines and describes conformance targets of this specification. Each conformance target has a formal definition, along with a notional description of the characterstics and intent of each. These include:
* Section 4.1.1, Reference schema document
* Section 4.1.2, Extension schema document
* Section 4.1.3, Schema document set
* Section 4.1.4, Instance documents and elements
4.1.1. Reference schema document
[Definition: reference schema document]
A reference schema document is a [schema document] that is intended to provide the authoritative definitions of broadly reusable [schema components]. It is a [conformance target] of this specification. A reference schema document MUST conform to all rules of this specification that apply to this conformance target. An [XML document] with a [conformance target identifier] of http://reference.niem.gov/niem/specification/naming-and-design-rules/3.0/#ReferenceSchemaDocument MUST be a conformant reference schema document.
A [reference schema document] is a [schema document] that is intended to be the authoritative definition schema for a namespace. Examples include NIEM Core and NIEM domains.
Some characteristics of a [reference schema document]:
* It is explicitly designated as a reference schema via the conformance targets attribute, per Rule 4-5, Schema claims reference schema conformance target.
* It provides the broadest, most fundamental definitions of components in its namespace.
* It provides the authoritative definition of business semantics for components in its namespace.
* It is intended to serve as the basis for components in information exchanges and extension schema documents.
* It satisfies all rules specified in the Naming and Design Rules for reference schemas.
Any schema that defines components that are intended to be incorporated into NIEM Core or a NIEM domain will be defined as a reference schema.
The rules for reference schema documents are more stringent than are the rules for other classes of NIEM-conformant schemas. Reference schema documents are intended to support the broadest reuse. They are very uniform in their structure. As they are the primary definitions for schema components, they do not need to restrict other data definitions, and they are not allowed to use XML Schema's restriction mechanism (e.g., Rule 9-29, Complex content uses extension). Reference schema documents are intended to be as regular and simple as possible.
4.1.2. Extension schema document
[Definition: extension schema document]
An extension schema document is a [schema document] that is intended to provide definitions of [schema components] that are intended for reuse within a more narrow scope than those defined by a [reference schema document]. It is a [conformance target] of this specification. An extension schema document MUST conform to all rules of this specification that apply to this conformance target. An XML document with a [conformance target identifier] of http://reference.niem.gov/niem/specification/naming-and-design-rules/3.0/#ExtensionSchemaDocument MUST be an extension schema document.
Characteristics of an [extension schema document] include:
* It is explicitly designated as an [extension schema document] via the conformance targets attribute.
* It provides the broadest, most fundamental definitions of components in its namespace.
* It provides the authoritative definition of business semantics for components in its namespace.
* It contains components that, when appropriate, use or are derived from the components in [reference schema documents].
* It is intended to express the additional vocabulary required for an information exchange, above and beyond the vocabulary available from reference schemas, and to also support additional XML Schema validation requirements for an exchange.
* It satisfies all rules specified in this document for [extension schema documents].
An extension schema in an information exchange specification serves several functions. First, it defines new content within a new namespace, which may be an exchange-specific namespace or a namespace shared by several exchanges. This content is NIEM-conformant but has fewer restrictions on it than do [reference schema documents]. Second, the [extension schema document] bases its content on content from [reference schema documents], where appropriate. Methods of deriving content include using (by reference) existing [schema components], as well as creating extensions and restrictions of existing components.
For example, an information exchange specification may define a type for an exchange-specific phone number and base that type on a type defined by the NIEM Core reference schema document. This exchange-specific phone number type may restrict the NIEM Core type to limit those possibilities that are permitted of the base type. Exchange extensions and restrictions must include annotations and documentation to be conformant, but they are allowed to use restriction, choice, and some other constructs that are not allowed in [reference schema documents].
Note that exchange specifications may define schemas that meet the criteria of reference schemas for those components that its developers wish to nominate for later inclusion in NIEM Core or in domains.
4.1.3. Schema document set
A [conformant schema document set] is a set of schema documents that are capable of validating XML docments.
[Definition: conformant schema document set]
A conformant schema document set is a collection of [schema documents] that together are capable of [validating] a [conformant instance XML document]. It is a [conformance target] of this specification. A conformant schema document set MUST conform to all rules of this specification that apply to this conformance target.
A [conformant schema document set] has strong dependencies on [reference schema documents] and [extension schema documents]. Without the guarantees provided by those conformance targets, the rules for a [conformant schema document set] would not be helpful. Those schemas in a schema set that are marked as reference or extension schemas are required to conform to the appropriate conformance targets.
Rule 4-1. Schema marked as reference schema document must conform
[Rule 4-1] (SET)
Any [schema document] with an [effective conformance target identifier] of http://reference.niem.gov/niem/specification/naming-and-design-rules/3.0/#ReferenceSchemaDocument MUST be a [reference schema document].
Rule 4-2. Schema marked as extension schema document must conform
[Rule 4-2] (SET)
Any [schema document] with an [effective conformance target identifier] of http://reference.niem.gov/niem/specification/naming-and-design-rules/3.0/#ExtensionSchemaDocument MUST be an [extension schema document].
4.1.4. Instance documents and elements
This document has specific rules about how NIEM content should be used in XML documents. As well as containing rules for XML Schema documents, this NDR contains rules for NIEM-conformant XML content at a finer granularity than the XML document.
[Definition: conformant instance XML document]
A conformant instance XML document is an [XML document] that is [instance document] [valid] to a [conformant schema document set]. It is a [conformance target] of this specification. A conformant instance XML document MUST conform to all rules of this specification that apply to this conformance target.
Characteristics of a [conformant instance XML document] include:
* The document element is locally schema-valid.
* Each element information item within the [XML document] that has property [namespace name] matching the target namespace of a [reference schema document] or [extension schema document] is a [conformant element information item].
Schema-validity may be assessed against a single set of schemas or against multiple sets of schemas.
Assessment against schemas may be directed by a Model Package Description (MPD), by other instructions, or by other tools.
Note that this specification does not require the document element of a [conformant instance XML document] to be a [conformant element information item]. Other specifications, such as the MPD specification, may add additional constraints to these in order to specify MPD-specific or exchange-specific conformance contraints.
[Definition: conformant element information item]
A conformant element information item is an element information item that satisfies all of the following criteria:
* Its [namespace name] and [local name] matches an element declared by a [reference schema document] or [extension schema document].
* It occurs within a [conformant instance XML document].
* It is locally schema-valid.
* It satisfies all rules specified in this document applicable to an element in a [conformant instance XML document].
Because each NIEM-conformant element information item must be locally schema-valid, each element must validate against the schema definition of the element, even if the element information item is allowed within the document because of a wildcard that the {process contents} with a value of "skip". As described by [XML Schema Structures] Section 3.10.1, The Wildcard Schema Component, the content of an element introduced by a wildcard with {process contents} set to "skip" does not have any schema validity constraint; it is only required to be well-formed XML. Within a NIEM-conformant XML document, each element that is from a NIEM namespace conforms to its schema specification.
4.2. Applicability of rules to conformance targets
Each rule within this document is applicable to one or more of the conformance targets identified by Section 4.1, Conformance targets defined, above. Each rule identifies its applicability as described in Section 2.4.1, Rules, above. The applicability field of each rule will contain one or more code values from Table Table 4-1, Codes representing conformance targets, below. A rule is applicable to the identified conformance targets.
Table 4-1: Codes representing conformance targets
Code|Conformance target
REF|reference schema document
EXT|extension schema document
SET|Conformant schema document set
INS|Conformant instance XML document
4.3. Conformance target identifiers
A conformant schema document claims to be conformant thorough the use of a set of [conformance target identifiers].
Rule 4-3. Schema is CTAS-conformant
[Rule 4-3] (REF, EXT)
<sch:pattern>
<sch:rule context="*[. is nf:get-document-element(.)]">
<sch:report test="true()">The document MUST be a conformant document as defined by the NIEM Conformance Targets Attribute Specification.</sch:report>
</sch:rule>
</sch:pattern>
The term "conformant document" is defined by [CTAS] Section 3.2, Conformance to this Specification. Note that this rule uses sch:report to provide a location that must be checked for conformance to an external standard, and does not itself provide any enforcement or checking of the actual rule.
Rule 4-4. Document element has attribute ct:conformanceTargets
[Rule 4-4] (REF, EXT)
<sch:pattern>
<sch:rule context="*[. is nf:get-document-element(.)
or exists(@ct:conformanceTargets)]">
<sch:assert test="(. is nf:get-document-element(.)) = exists(@ct:conformanceTargets)"
>The [document element] of the XML document, and only the [document element], MUST own an attribute {http://release.niem.gov/niem/conformanceTargets/3.0/}conformanceTargets.</sch:assert>
</sch:rule>
</sch:pattern>
Rule 4-5. Schema claims reference schema conformance target
[Rule 4-5] (REF)
<sch:pattern>
<sch:rule context="*[. is nf:get-document-element(.)]">
<sch:assert test="nf:has-effective-conformance-target-identifier(., xs:anyURI('http://reference.niem.gov/niem/specification/naming-and-design-rules/3.0/#ReferenceSchemaDocument'))"
>The document MUST have an effective conformance target identifier of http://reference.niem.gov/niem/specification/naming-and-design-rules/3.0/#ReferenceSchemaDocument.</sch:assert>
</sch:rule>
</sch:pattern>
This document defines the term [effective conformance target identifier].
Rule 4-6. Schema claims extension conformance target
[Rule 4-6] (EXT)
<sch:pattern>
<sch:rule context="*[. is nf:get-document-element(.)]">
<sch:assert test="nf:has-effective-conformance-target-identifier(., xs:anyURI('http://reference.niem.gov/niem/specification/naming-and-design-rules/3.0/#ExtensionSchemaDocument'))"
>The document MUST have an effective conformance target identifier of http://reference.niem.gov/niem/specification/naming-and-design-rules/3.0/#ExtensionSchemaDocument.</sch:assert>
</sch:rule>
</sch:pattern>
This document defines the term [effective conformance target identifier].
5. The NIEM conceptual model
This section describes aspets of the RDF model, and provides a mapping between NIEM concepts and the RDF model.
* Section 5.1, Purpose of the NIEM conceptual model
* Section 5.2, The RDF model
* Section 5.3, NIEM in terms of RDF
* Section 5.4, Unique identification of data objects
* Section 5.5, NIEM data is explicit, not implicit
* Section 5.6, Mapping of NIEM concepts to RDF concepts
5.1. Purpose of the NIEM conceptual model
Each release of NIEM provides a concrete data model, in the form of a set of [schema documents]. These schema documents may be used to build messages and information exchanges. The schema documents spell out what kinds of objects exist and how those objects may be related. A set of XML data that follows the rules of NIEM implies specific meaning. The varieties of [schema components] used within conformant schema documents are selected to clarify the meaning of XML data. That is, schema components that do not have a clear meaning have been avoided. NIEM provides a framework within which XML data has a specific meaning.
One limitation of XML and XML Schema is that they do not describe the meaning of an XML document. The XML specification defines XML documents and defines their syntax but does not address the meaning of those documents. The XML Schema specification defines the XML Schema definition language, which describes the structure and constrains the contents of XML documents through the construction and use of schema components.
In a schema, the meaning of a schema component may be described using the xs:documentation element, or additional information may be included via use of the xs:appinfo element. Although this may enable humans to understand XML data, more information is needed to support the machine-understandable meaning of XML data. In addition, inconsistency among the ways that schema components may be put together may be a source of confusion.
The RDF Core Working Group of the World Wide Web consortium has developed a simple, consistent conceptual model, the RDF model. The RDF model is described and specified through a set of W3C Recommendations, the Resource Description Framework (RDF) specifications, making it a very well defined standard. The NIEM model and the rules contained in this NDR are based on the RDF model. This provides numerous advantages:
* NIEM's conceptual model is defined by a recognized standard.
* NIEM's conceptual model is very well defined.
* NIEM's conceptual model provides a consistent basis for relating attributes, elements, types, and other XML Schema components.
* NIEM's use of the RDF model defines what a set of NIEM data means. The RDF specification provides a detailed description of what a statement means. This meaning is leveraged by NIEM.
* NIEM's use of the RDF model provides a basis for inferencing and reasoning about XML data that uses NIEM. That is, using the rules defined for the RDF model, programs can determine implications of relationships between NIEM-defined objects.
With the exception of this section, NIEM rules are explained in this document without reference to RDF or RDF concepts. Understanding RDF is not required to understand NIEM-conformant schemas or data based on NIEM. However, understanding RDF concepts may deepen understanding of NIEM.
The goal of this section is to clarify the meaning of XML data that is NIEM-conformant and to outline the implications of various modeling constructs in NIEM. The rules for NIEM- conformant schemas and instances are in place to ensure that a specific meaning can be derived from data. That is, the data makes specific assertions, which are well understood since they are derived from the rules for NIEM.
5.2. The RDF model
This section identifies features of RDF and RDFS, in order to establish a mapping between RDF semantics and NIEM. A reader should read the referenced source documents to obtain a full understanding of the concepts mentioned in this section.
RDF establishes a graph-based data model, as described by [RDF Concepts] Section 1.1, Graph-based Data Model, which states:
The core structure of the abstract syntax is a set of triples, each consisting of a subject, a predicate and an object. A set of such triples is called an RDF graph.
[RDF Concepts] also states:
There can be three kinds of nodes in an RDF graph: IRIs, literals, and blank nodes.
[RDF Concepts] Section 1.2, Resources and Statements describes resources:
Any IRI or literal denotes something in the world (the "universe of discourse"). These things are called resources. Anything can be a resource, including physical things, documents, abstract concepts, numbers and strings; the term is synonymous with "entity" as it is used in the RDF Semantics specification. The resource denoted by an IRI is called its referent, and the resource denoted by a literal is called its literal value.
[RDF Concepts] also describes relationships and blank nodes.
Asserting an RDF triple says that some relationship, indicated by the predicate, holds between the resources denoted by the subject and object. This statement corresponding to an RDF triple is known as an RDF statement. The predicate itself is an IRI and denotes a property, that is, a resource that can be thought of as a binary relation. (Relations that involve more than two entities can only be indirectly expressed in RDF.)
Unlike IRIs and literals, blank nodes do not identify specific resources. Statements involving blank nodes say that something with the given relationships exists, without explicitly naming it.
[RDF Concepts] Section 1.7, Equivalence, Entailment and Inconsistency describes the meaning of an RDF triple:
An RDF triple encodes a statement--a simple logical expression, or claim about the world. An RDF graph is the conjunction (logical AND) of its triples.
[RDF Concepts] Section 3.1, Triples defines an RDF triple:
An RDF triple consists of three components:
* the subject, which is an IRI or a blank node
* the predicate, which is an IRI
* the object, which is an IRI, a literal or a blank node
An RDF triple is conventionally written in the order subject, predicate, object.
5.3. NIEM in terms of RDF
The RDF view of the meaning of data carries into NIEM: NIEM elements form statements that make claims about the world: that a person has a name, a residence location, a spouse, etc. The assertion of one set of facts does not necessarily rule out other statements: A person could have multiple names, could have moved, or could be divorced. Each statement is a claim asserted to be true by the originator of the statement.
This NDR discusses defines NIEM data in XML terminology, complex types and elements, rather than using RDF terms, resources and properties. NIEM NIEM objects and associations conincide with RDF resources; both objects and associations correspond to RDF resources with additional constraints:
NIEM associations are defined as n-ary properties, as described in [N-ary], "Use Case 3: N-ary relation with no distinguished participant". NIEM associations are defined in Section 10.3, Associations, below. Assertions are made via NIEM-conformant XML data, described by Section 12, XML instance document rules, below.
The XML Schema types that define NIEM objects and associations are related to each other via elements and attributes. That is, a type contains elements and attributes, and an element or attribute has a value that is an instance of an XML Schema type. These elements and attributes are XML Schema representations, which correspond to RDF properties. NIEM-conformant XML Schemas describe things and their properties. NIEM-conformant data contains elements and attributes. These correspond to RDF resources and their properties, which describe their characteristics and relationships.
5.4. Unique identification of data objects
In NIEM, an exchange is generally adhoc. That is, a message may be generated without any persistence. It exists only to exchange data and may not have any universal meaning beyond that specific exchange. As such, a message may or may not have a URI as an identifier. NIEM was designed with the assumption that a given exchange need not have any unique identifier; NIEM does not require a unique identifier. NIEM also does not require any object (data instance) to be identified by a URI. This differs from RDF, in which all entities (other than literal values) are identified by globally meaningful URIs.
A NIEM-conformant instance XML document may use XML IDs to identify objects within it; The NIEM XML ID is an attribute structures:id of type xs:ID. These IDs are not assumed by NIEM to have any universal significance; they need only be unique within the XML document. The use of an ID is required only when an object must be referenced within the document. NIEM recognizes no correlation between these local IDs and any URI.
As a result, the basic mapping of NIEM data to RDF involves the use of blank nodes, not universally-meaningful resource IRIS.
Any given implementation, message, or MPD may be defined to apply a URI or other universally meaningful identifier to an object or message. However, NIEM has no such requirement.
5.5. NIEM data is explicit, not implicit
In NIEM data, that which is not stated is not implied. If data says a person's name is "John," it is not implicitly saying that he does not have other names, or that "John" is his legal name, or that he is different from a person known as "Bob." The only assertion being made is that one of the names by which this person is known is "John".
This is one reason that definitions of NIEM content are so important. The definitions must state exactly what any given statement implies. The concept of "legal name" may be defined that makes additional assertions about a name of a person. Such assertions must be made explicit in the definition of the relationship.
5.6. Mapping of NIEM concepts to RDF concepts
This section provides RDF implementations for many aspects of NIEM-conformant scheamas and instance documents.
5.6.1. Resource IRIs for XML Schema components and information items
The term "qualified name" is defined by [XML Namespaces] Section 2.1, Basic Concepts, which states:
A qualified name is a name subject to namespace interpretation.
A Qname is used to represent a qualified name, as described by [XML Schema Datatypes] Section 3.2.18, QName, which states:
The value space of QName is the set of tuples {namespace name, local part}, where namespace name is an anyURI and local part is an NCName.
Certain components defined by NIEM schemas and instances have corresponding resource IRIs. Each IRI is taken from a qualified name, as follows:
* If namespace name ends with "#": concatenate(namespace name, local part)
* Otherwise: concatenate(namespace name, "#", local part)
Note that this is only meaningful when the namespace name is not empty and is an absolute URI.
The corresponding RDF resource IRIs for information items and schema components are:
* element information item or attribute information item: the resource IRI is built from the qualified name constructed from its [namespace name] and [local name] properties.
* schema component: the resource IRI is built from the qualified name constructed from its {target namespace} and {name} properties.
5.6.2. Blank nodes for instances and schemas
A blank node may correspond to an occurrence of an element information item, which represents the relationship established by the element.
A blank node may correspond to the content of an element, which represents an instance of a type. This is distinct from the occurrence of the element itself. This includes resolution of structures:ref to structures:id attributes, in which case the content of the referred-to element is considered the content of the element.
A blank node may correspond to a combination of factors. For example, a blank node is used for each application of an element to a base object via an augmentation, as a single augmentation may be applied to multiple base objects.
A blank node may also correspond to the above, but for attributes.
5.6.3. RDF Literals
A simple value may be incorporated into a [conformant instance XML document] as the value of an attribute information item, or as a child of an element information item. This section describes how a simple value is mapped to an RDF literal. Note that there is no mapping for the simple content of an element that is not a [conformant element information item], nor for attributes defined by non-conformant schema documents, so there is no accommodation of mixed content, untyped values, or other cases outside of what conformant schema documents define.
For each occurrence of a simple value, the following may be relevant:
* The value of the literal, which is a normalized value of an attribute or element information item processed in accordance with [XML] Section 2.10, White Space Handling and [XML Schema Structures] Section 3.1.4, White Space Normalization during Validation.
* The occurrence of an attribute xml:lang applicable to the value (described by [XML] Section 2.12, Language Identification), which may entail a language tag on the literal (described by [RDF Concepts] Section 3.3, Literal).
* The XML Schema-defined base type of the simple value, which may be an attribute's {type definition}, or a simple type base type of an element's {type definition}.
The literal for a simple value $value is:
* If $value has a base type definition that is derived from type xs:string (and not a XML Schema-defined type derived from xs:string), and a non-empty language specification is applied to $value using xml:lang, as described by [XML] Section 2.12, Language Identification, then the literal is a language-tagged string, as described by [RDF Concepts] Section 3.3, Literals:
"$lexical-form"@$language-tag
Where:
* $lexical-form is a Unicode string for $value.
* $language-tag is the in-scope value of attribute xml:lang.
* Otherwise, if $value has a base type definition $base-type that is listed as an RDF-compatible XSD type in [RDF Concepts] Section 5.1, The XML Schema Built-in Datatypes, then the literal is:
"$lexical-form"^^$datatype-IRI
Where:
* $lexical-form is a Unicode string for $value.
* $datatype-IRI is the QName of $base-type.
* Otherwise, the literal is a simple literal, which is:
"$lexical-form"
Where: $lexical-form is a Unicode string for $value.
5.6.4. Resolved element
This document defines two attributes, structures:id and structures:ref that, together, define a reference mechanism for conformant elements. This enables the use of references to date in place of directly-contained data, which loops in data graphs, as well as for multiple relationships to be defined to a single object. This mechanism uses XML IDs and IDREFs as provided by the XML Schema language. As this document defines the mechanism, a structures:ref attribute may refer to a structures:id; this reference means that the element that has the structures:ref attribute refers to the element that has the structures:id attribute.
This section defines an operation, resolving an element information item to obtain whatever element is referred to by it. This is put in terms of taking an element and finding the resolved element to which it refers. In a case where there is no reference, the resolved element is the same as the original element.
[Definition: resolved element information item]
Within an XML document $document, for any element information item $element there is a resolved element information item, which is:
* If all of the following are true:
* $document is a [conformant instance XML document].
* $element and $referent are [conformant element information items] within $document.
* $element owns attribute information item structures:ref with a value $ref.
* $referent owns attribute information item structures:id with a value $id.
* $ref is equal to $id.
Then the resolved element information item for $element is $referent.
* Otherwise, the resolved element information item for $element is $element.
5.6.5. NIEM instance mappings to RDF
This section has the following subsections:
* Section 5.6.5.1, XML document mapping
* Section 5.6.5.2, Content of an element
* Section 5.6.5.3, Element as a property with unknown context
* Section 5.6.5.4, Element as a simple property of an object or association
* Section 5.6.5.5, Attribute as a simple property of an object or association
* Section 5.6.5.6, Elements via an augmentation type
* Section 5.6.5.7, Attributes via an augmentation type
* Section 5.6.5.8, Elements applied to an object via a metadata type
* Section 5.6.5.9, Attributes applied to an object via a metadata type
* Section 5.6.5.10, Elements applied to a relationship via a metadata type
* Section 5.6.5.11, Attributes applied to a relationship via a metadata type
5.6.5.1. XML document mapping
A [conformant instance XML document] entails a corresponding RDF graph, which is a set of triples, which are entailed by the mapping of the contents of the XML document to RDF.
5.6.5.2. Content of an element
A [conformant element information item] $element that has property [type definition] that is an [object type] or an [association type], entails the RDF:
$content rdf:type $type .
Where:
* $content is a blank node corresponding to the content of $element.
* $type is resource IRI for the value of the [type definition] property of $element.
If $element has a non-empty simple value, then it also entails the RDF:
$content rdf:value $literal .
Where:
* $content is as above.
* $literal is the literal value for $element, as described in Section 5.6.3, RDF Literals, above.
5.6.5.3. Element as a property with unknown context
A [conformant element information item] $element that
* has [type definition] that is the ur-type, an [object type], or an [association type], and that
* has a [parent] that is not an element information item, or that is an element information item that is not a [conformant element information item]
entails the RDF:
$element-node rdf:type rdf:Statement .
$element-node rdf:subject $blank-node .
$element-node rdf:predicate $predicate .
$element-node rdf:object $element-content-blank-node .
Where:
* $element-node is a blank node corresponding to $element, to represent the relationship being established.
* $blank-node is a blank node, to represent the unknown context in which $element occurs.
* $predicate is the IRI for element information item $element, to respresent the semantics of the relationship.
* $element-content-blank-node is a blank node corresponding to the content of the resolved element information item for $element.
5.6.5.4. Element as a simple property of an object or association
A [conformant element information item] $context that is an instance of an [object type] or [association type], and that has a child [conformant element information item] $element that is an instance of an [object type] or an [association type], entails the RDF:
$element-node rdf:type rdf:Statement .
$element-node rdf:subject $subject .
$element-node rdf:predicate $predicate .
$element-node rdf:object $object .
Where:
* $element-node is a blank node corresponding to $element.
* $subject is a blank node corresponding to the content of $context.
* $predicate is the IRI for $element.
* $object is a blank node corresponding to the content of the [resolved element information item] for $child.
5.6.5.5. Attribute as a simple property of an object or association
An attribute information item $attribute where:
* $attribute is owned by a [conformant element information item] $context that has property [type definition] that is an [object type] or an [association type], and
* $attribute has property [attribute declaration] $attribute-declaration that is defined by a [reference schema document] or an [extension schema document]
entails the RDF:
$attribute-node rdf:type rdf:Statement .
$attribute-node rdf:subject $subject .
$attribute-node rdf:predicate $predicate .
$attribute-node rdf:object $literal .
Where:
* $attribute-node is a blank node corresponding to $attribute.
* $subject is a blank node corresponding to the content of $context.
* $predicate is the resource IRI for $attribute-declaration.
* $literal is the literal value for $attribute, as described in Section 5.6.3, RDF Literals, above.
5.6.5.6. Elements via an augmentation type
An element of a augmentation type contains a set of elements and attributes that are applied to some base object or association.
For each element applied to a type via an augmentation type:
* Element information item $base that is an an instance of an [object type] or [association type],
* Element information item $augmentation that is a child of $base that has [type definition] that is an [augmentation type],
* Element information item $resolved-augmentation that is the [resolved element information item] for $augmentation,
* Element information item $element that is a child of $resolved-augmentation, that has [type definition] that is an [object type] or an [association type], and
* Element information item $resolved-element that is the [resolved element information item] for $element
entails the RDF:
$element-node rdf:type rdf:Statement .
$element-node rdf:subject $subject .
$element-node rdf:predicate $predicate .
$element-node rdf:object $object .
Where:
* $element-node is a blank node corresponding to $element applied to $base via $augmentation.
* $subject is a blank node corresponding to the content of $base.
* $predicate is a the resource IRI for [element declaration] of $element.
* $object is a blank node corresponding to the content of $resolved-element
5.6.5.7. Attributes via an augmentation type
An element of an augmentation type contains a set of elements and attributes that are applied to some base object or association.
For each attribute applied to a type via an augmentation type:
* Element information item $base that is an an instance of an [object type] or [association type],
* Element information item $augmentation that is a child of $base that has [type definition] that is an [augmentation type],
* Element information item $resolved-augmentation that is the [resolved element information item] for $augmentation,
* Attribute information item $attribute that is owned by $resolved-augmentation, that has an [attribute declaration] that is defined by a [reference schema document] or an [extension schema document]
entails the RDF:
$attribute-node rdf:type rdf:Statement .
$attribute-node rdf:subject $subject .
$attribute-node rdf:predicate $predicate .
$attribute-node rdf:object $literal .
Where:
* $attribute-node is a blank node corresponding to $attribute applied to $base via $augmentation.
* $subject is a blank node corresponding to the content of $base.
* $predicate is a the resource IRI for [attribute declaration] of $attribute.
* $literal is the literal value for $attribute, as described in Section 5.6.3, RDF Literals, above.