-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added new section that provides an example of literal-to-object conve…
…rsion. Closes #4.
- Loading branch information
Showing
17 changed files
with
442 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,3 +4,4 @@ | |
/config.log | ||
/config.status | ||
/run | ||
/resources/literal-to-object-conversion/tmp |
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
|
||
xml_files = example-1.xml | ||
xml_valid_tokens = ${xml_files:%.xml=tmp/valid/%.xml} | ||
|
||
.PHONY: valid | ||
valid: ${xml_valid_tokens} | ||
|
||
tmp/valid/%.xml: %.xml | ||
xs-validate -c niem/xml-catalog.xml $< | ||
mkdir -p ${dir $@} | ||
touch $@ | ||
|
||
|
||
|
4 changes: 4 additions & 0 deletions
4
resources/literal-to-object-conversion/example-1-context.jsonld
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
{ | ||
"nc" : "http://release.niem.gov/niem/niem-core/4.0/", | ||
"rdf" : "http://www.w3.org/1999/02/22-rdf-syntax-ns#" | ||
} |
9 changes: 9 additions & 0 deletions
9
resources/literal-to-object-conversion/example-1-converted.jsonld
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
{ | ||
"@context": { | ||
"nc" : "http://release.niem.gov/niem/niem-core/4.0/", | ||
"rdf" : "http://www.w3.org/1999/02/22-rdf-syntax-ns#" | ||
}, | ||
"nc:PersonFullName" : { | ||
"rdf:value": "Sherlock Holmes" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{ | ||
"@context": { | ||
"nc" : "http://release.niem.gov/niem/niem-core/4.0/" | ||
}, | ||
"nc:PersonFullName" : "Sherlock Holmes" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
<nc:PersonFullName | ||
xmlns:nc="http://release.niem.gov/niem/niem-core/4.0/" | ||
>Sherlock Holmes</nc:PersonFullName> |
37 changes: 37 additions & 0 deletions
37
resources/literal-to-object-conversion/niem/niem-core/4.0/niem-core.xsd
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
<?xml version="1.0" encoding="US-ASCII"?> | ||
<xs:schema targetNamespace="http://release.niem.gov/niem/niem-core/4.0/" version="1" xsi:schemaLocation="http://release.niem.gov/niem/appinfo/4.0/ ../../utility/appinfo/4.0/appinfo.xsd http://release.niem.gov/niem/conformanceTargets/3.0/ ../../utility/conformanceTargets/3.0/conformanceTargets.xsd" ct:conformanceTargets="http://reference.niem.gov/niem/specification/naming-and-design-rules/4.0/#ReferenceSchemaDocument" xmlns:appinfo="http://release.niem.gov/niem/appinfo/4.0/" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:nc="http://release.niem.gov/niem/niem-core/4.0/" xmlns:ct="http://release.niem.gov/niem/conformanceTargets/3.0/" xmlns:niem-xs="http://release.niem.gov/niem/proxy/xsd/4.0/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:structures="http://release.niem.gov/niem/structures/4.0/"> | ||
<xs:annotation> | ||
<xs:documentation>NIEM Core.</xs:documentation> | ||
</xs:annotation> | ||
<xs:import schemaLocation="../../proxy/xsd/4.0/xs.xsd" namespace="http://release.niem.gov/niem/proxy/xsd/4.0/"/> | ||
<xs:import schemaLocation="../../utility/structures/4.0/structures.xsd" namespace="http://release.niem.gov/niem/structures/4.0/"/> | ||
<xs:complexType name="PersonNameTextType"> | ||
<xs:annotation> | ||
<xs:documentation>A data type for a name by which a person is known, referred, or addressed.</xs:documentation> | ||
</xs:annotation> | ||
<xs:simpleContent> | ||
<xs:extension base="nc:ProperNameTextType"/> | ||
</xs:simpleContent> | ||
</xs:complexType> | ||
<xs:complexType name="ProperNameTextType"> | ||
<xs:annotation> | ||
<xs:documentation>A data type for a word or phrase by which a person or thing is known, referred, or addressed.</xs:documentation> | ||
</xs:annotation> | ||
<xs:simpleContent> | ||
<xs:extension base="nc:TextType"/> | ||
</xs:simpleContent> | ||
</xs:complexType> | ||
<xs:complexType name="TextType"> | ||
<xs:annotation> | ||
<xs:documentation>A data type for a character string.</xs:documentation> | ||
</xs:annotation> | ||
<xs:simpleContent> | ||
<xs:extension base="niem-xs:string"/> | ||
</xs:simpleContent> | ||
</xs:complexType> | ||
<xs:element name="PersonFullName" type="nc:PersonNameTextType" nillable="true"> | ||
<xs:annotation> | ||
<xs:documentation>A complete name of a person.</xs:documentation> | ||
</xs:annotation> | ||
</xs:element> | ||
</xs:schema> |
17 changes: 17 additions & 0 deletions
17
resources/literal-to-object-conversion/niem/proxy/xsd/4.0/xs.xsd
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
<?xml version="1.0" encoding="US-ASCII"?> | ||
<xs:schema targetNamespace="http://release.niem.gov/niem/proxy/xsd/4.0/" version="1" xsi:schemaLocation="http://release.niem.gov/niem/appinfo/4.0/ ../../../utility/appinfo/4.0/appinfo.xsd http://release.niem.gov/niem/conformanceTargets/3.0/ ../../../utility/conformanceTargets/3.0/conformanceTargets.xsd" ct:conformanceTargets="http://reference.niem.gov/niem/specification/naming-and-design-rules/4.0/#ReferenceSchemaDocument" xmlns:appinfo="http://release.niem.gov/niem/appinfo/4.0/" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:ct="http://release.niem.gov/niem/conformanceTargets/3.0/" xmlns:niem-xs="http://release.niem.gov/niem/proxy/xsd/4.0/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:structures="http://release.niem.gov/niem/structures/4.0/"> | ||
<xs:annotation> | ||
<xs:documentation>Proxy types that carry dictionary metadata and have XML data type simple contents.</xs:documentation> | ||
</xs:annotation> | ||
<xs:import schemaLocation="../../../utility/structures/4.0/structures.xsd" namespace="http://release.niem.gov/niem/structures/4.0/"/> | ||
<xs:complexType name="string"> | ||
<xs:annotation> | ||
<xs:documentation>A data type for character strings in XML.</xs:documentation> | ||
</xs:annotation> | ||
<xs:simpleContent> | ||
<xs:extension base="xs:string"> | ||
<xs:attributeGroup ref="structures:SimpleObjectAttributeGroup"/> | ||
</xs:extension> | ||
</xs:simpleContent> | ||
</xs:complexType> | ||
</xs:schema> |
91 changes: 91 additions & 0 deletions
91
resources/literal-to-object-conversion/niem/utility/appinfo/4.0/appinfo.xsd
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,91 @@ | ||
<?xml version="1.0" encoding="US-ASCII"?> | ||
<xs:schema | ||
targetNamespace="http://release.niem.gov/niem/appinfo/4.0/" | ||
version="4.0" | ||
xmlns:appinfo="http://release.niem.gov/niem/appinfo/4.0/" | ||
xmlns:xs="http://www.w3.org/2001/XMLSchema"> | ||
|
||
<xs:annotation> | ||
<xs:documentation>The appinfo schema provides support for high level data model concepts and additional syntax to support the NIEM conceptual model and validation of NIEM-conformant instances.</xs:documentation> | ||
</xs:annotation> | ||
|
||
<xs:attribute name="deprecated"> | ||
<xs:annotation> | ||
<xs:documentation>The Deprecated element provides a method for identifying schema components as being deprecated. A deprecated component is one that is provided, but the use of which is not recommended.</xs:documentation> | ||
</xs:annotation> | ||
<xs:simpleType> | ||
<xs:restriction base="xs:boolean"> | ||
<xs:pattern value="true"/> | ||
</xs:restriction> | ||
</xs:simpleType> | ||
</xs:attribute> | ||
|
||
<xs:attribute name="appliesToTypes"> | ||
<xs:annotation> | ||
<xs:documentation>The appliesToTypes attribute appears on the element declaration of a metadata element. It indicates a set of types to which the metadata element may be applied. The metadata element will also be applicable to any type that is derived from a listed type.</xs:documentation> | ||
</xs:annotation> | ||
<xs:simpleType> | ||
<xs:list itemType="xs:QName"/> | ||
</xs:simpleType> | ||
</xs:attribute> | ||
|
||
<xs:attribute name="appliesToElements"> | ||
<xs:annotation> | ||
<xs:documentation>The appliesToElements attribute appears on the element declaration of a metadata element. It indicates a set of elements to which the metadata element may be applied. The metadata element will also be applicable to any element that is in the substitution group of a listed element.</xs:documentation> | ||
</xs:annotation> | ||
<xs:simpleType> | ||
<xs:list itemType="xs:QName"/> | ||
</xs:simpleType> | ||
</xs:attribute> | ||
|
||
<xs:attribute name="externalAdapterTypeIndicator"> | ||
<xs:annotation> | ||
<xs:documentation>The externalAdapterTypeIndicator attribute indicates that a complex type is an external adapter type. An external adapter type is composed of elements and attributes from non-NIEM-conformant schemas.</xs:documentation> | ||
</xs:annotation> | ||
<xs:simpleType> | ||
<xs:restriction base="xs:boolean"> | ||
<xs:pattern value="true"/> | ||
</xs:restriction> | ||
</xs:simpleType> | ||
</xs:attribute> | ||
|
||
<xs:attribute name="externalImportIndicator"> | ||
<xs:annotation> | ||
<xs:documentation>The externalImportIndicator attribute is true if and only if a namespace identified via xs:import is expected to be non-conformant.</xs:documentation> | ||
</xs:annotation> | ||
<xs:simpleType> | ||
<xs:restriction base="xs:boolean"> | ||
<xs:pattern value="true"/> | ||
</xs:restriction> | ||
</xs:simpleType> | ||
</xs:attribute> | ||
|
||
<xs:element name="LocalTerm"> | ||
<xs:complexType> | ||
<xs:sequence> | ||
<xs:element name="SourceText" type="appinfo:NonemptyStringSimpleType" | ||
minOccurs="0" maxOccurs="unbounded" form="qualified"/> | ||
</xs:sequence> | ||
<xs:attribute name="term" type="appinfo:NonemptyStringSimpleType" use="required"/> | ||
<xs:attribute name="literal" type="appinfo:NonemptyStringSimpleType"/> | ||
<xs:attribute name="definition" type="appinfo:NonemptyStringSimpleType"/> | ||
<xs:attribute name="sourceURIs"> | ||
<xs:simpleType> | ||
<xs:restriction> | ||
<xs:simpleType> | ||
<xs:list itemType="xs:anyURI"/> | ||
</xs:simpleType> | ||
<xs:minLength value="1"/> | ||
</xs:restriction> | ||
</xs:simpleType> | ||
</xs:attribute> | ||
</xs:complexType> | ||
</xs:element> | ||
|
||
<xs:simpleType name="NonemptyStringSimpleType"> | ||
<xs:restriction base="xs:string"> | ||
<xs:minLength value="1"/> | ||
</xs:restriction> | ||
</xs:simpleType> | ||
|
||
</xs:schema> |
12 changes: 12 additions & 0 deletions
12
...s/literal-to-object-conversion/niem/utility/conformanceTargets/3.0/conformanceTargets.xsd
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
<?xml version="1.0" encoding="US-ASCII"?> | ||
<xs:schema | ||
targetNamespace="http://release.niem.gov/niem/conformanceTargets/3.0/" | ||
xmlns:xs="http://www.w3.org/2001/XMLSchema"> | ||
|
||
<xs:attribute name="conformanceTargets"> | ||
<xs:simpleType> | ||
<xs:list itemType="xs:anyURI"/> | ||
</xs:simpleType> | ||
</xs:attribute> | ||
|
||
</xs:schema> |
74 changes: 74 additions & 0 deletions
74
resources/literal-to-object-conversion/niem/utility/structures/4.0/structures.xsd
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,74 @@ | ||
<?xml version="1.0" encoding="US-ASCII"?> | ||
<xs:schema | ||
targetNamespace="http://release.niem.gov/niem/structures/4.0/" | ||
version="4.0" | ||
xmlns:structures="http://release.niem.gov/niem/structures/4.0/" | ||
xmlns:xs="http://www.w3.org/2001/XMLSchema"> | ||
|
||
<xs:attribute name="id" type="xs:ID"/> | ||
<xs:attribute name="ref" type="xs:IDREF"/> | ||
<xs:attribute name="uri" type="xs:anyURI"/> | ||
<xs:attribute name="metadata" type="xs:IDREFS"/> | ||
<xs:attribute name="relationshipMetadata" type="xs:IDREFS"/> | ||
|
||
<xs:attributeGroup name="SimpleObjectAttributeGroup"> | ||
<xs:attribute ref="structures:id"/> | ||
<xs:attribute ref="structures:ref"/> | ||
<xs:attribute ref="structures:uri"/> | ||
<xs:attribute ref="structures:metadata"/> | ||
<xs:attribute ref="structures:relationshipMetadata"/> | ||
<xs:anyAttribute namespace="urn:us:gov:ic:ism urn:us:gov:ic:ntk" processContents="lax"/> | ||
</xs:attributeGroup> | ||
|
||
<xs:complexType name="ObjectType" abstract="true"> | ||
<xs:sequence> | ||
<xs:element ref="structures:ObjectAugmentationPoint" minOccurs="0" maxOccurs="unbounded"/> | ||
</xs:sequence> | ||
<xs:attribute ref="structures:id"/> | ||
<xs:attribute ref="structures:ref"/> | ||
<xs:attribute ref="structures:uri"/> | ||
<xs:attribute ref="structures:metadata"/> | ||
<xs:attribute ref="structures:relationshipMetadata"/> | ||
<xs:anyAttribute namespace="urn:us:gov:ic:ism urn:us:gov:ic:ntk" processContents="lax"/> | ||
</xs:complexType> | ||
|
||
<xs:element name="ObjectAugmentationPoint" abstract="true"> | ||
<xs:annotation> | ||
<xs:documentation>An augmentation point for ObjectType</xs:documentation> | ||
</xs:annotation> | ||
</xs:element> | ||
|
||
<xs:complexType name="AssociationType" abstract="true"> | ||
<xs:sequence> | ||
<xs:element ref="structures:AssociationAugmentationPoint" minOccurs="0" maxOccurs="unbounded"/> | ||
</xs:sequence> | ||
<xs:attribute ref="structures:id"/> | ||
<xs:attribute ref="structures:ref"/> | ||
<xs:attribute ref="structures:uri"/> | ||
<xs:attribute ref="structures:metadata"/> | ||
<xs:attribute ref="structures:relationshipMetadata"/> | ||
<xs:anyAttribute namespace="urn:us:gov:ic:ism urn:us:gov:ic:ntk" processContents="lax"/> | ||
</xs:complexType> | ||
|
||
<xs:element name="AssociationAugmentationPoint" abstract="true"> | ||
<xs:annotation> | ||
<xs:documentation>An augmentation point for AssociationType</xs:documentation> | ||
</xs:annotation> | ||
</xs:element> | ||
|
||
<xs:complexType name="MetadataType" abstract="true"> | ||
<xs:attribute ref="structures:id"/> | ||
<xs:attribute ref="structures:ref"/> | ||
<xs:attribute ref="structures:uri"/> | ||
<xs:anyAttribute namespace="urn:us:gov:ic:ism urn:us:gov:ic:ntk" processContents="lax"/> | ||
</xs:complexType> | ||
|
||
<xs:complexType name="AugmentationType" abstract="true"> | ||
<xs:attribute ref="structures:id"/> | ||
<xs:attribute ref="structures:ref"/> | ||
<xs:attribute ref="structures:uri"/> | ||
<xs:attribute ref="structures:metadata"/> | ||
<xs:anyAttribute namespace="urn:us:gov:ic:ism urn:us:gov:ic:ntk" processContents="lax"/> | ||
</xs:complexType> | ||
|
||
</xs:schema> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<w:WantList w:release="4.2" w:product="NIEM" w:nillableDefault="true" | ||
xmlns:w="http://niem.gov/niem/wantlist/2.2" xmlns:nc="http://release.niem.gov/niem/niem-core/4.0/"> | ||
<w:Element w:name="nc:PersonFullName" w:isReference="false" w:nillable="true"/> | ||
</w:WantList> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
<?xml version="1.0" encoding="US-ASCII"?> | ||
<!DOCTYPE catalog PUBLIC "-//OASIS//DTD Entity Resolution XML Catalog V1.0//EN" "http://www.oasis-open.org/committees/entity/release/1.0/catalog.dtd"> | ||
<catalog prefer="public" xmlns="urn:oasis:names:tc:entity:xmlns:xml:catalog"> | ||
<uri name="http://release.niem.gov/niem/appinfo/4.0/" uri="utility/appinfo/4.0/appinfo.xsd"/> | ||
<uri name="http://release.niem.gov/niem/conformanceTargets/3.0/" uri="utility/conformanceTargets/3.0/conformanceTargets.xsd"/> | ||
<uri name="http://release.niem.gov/niem/niem-core/4.0/" uri="niem-core/4.0/niem-core.xsd"/> | ||
<uri name="http://release.niem.gov/niem/proxy/xsd/4.0/" uri="proxy/xsd/4.0/xs.xsd"/> | ||
<uri name="http://release.niem.gov/niem/structures/4.0/" uri="utility/structures/4.0/structures.xsd"/> | ||
</catalog> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.