Alternate Structures for specific types or type hierarchies (can be applied to specific types)
Description
General Rules for transforming XML into JSON originally taken from OGC 14-009r1 ~ Engineering Report: “OGC 14-009r1, OGC Testbed-10 Rules for JSON and GeoJSON Adoption: Focus on OWSContext" and amended in OGC 15-053r1 ~ Testbed 11 Implementing JSON/GeoJSON in an OGC Standard Engineering Report
UML Model
Example instance in default encoding:
TODO: GeoSciML-Lite GeoJSON encoding variant,
Example instance in simplified encoding:
Model transformation rule:
The XML element local name is the JSON object name
The XML element single text node is the JSON object value
The XML element attributes nodes are transformed in JSON nested objects
The XML nested elements are transformed in JSON nested objects
An XML element text node is transformed in a JSON nested object when other types of nodes are present
The XML element text value can be casted to a JSON object value type
XML fragments can be transformed in text members
XML repeated elements (or attributes) are transformed into JSON arrays. The JSON array name could be changed to plural when convenient
XML namespaces are ignored
Instance transformation rule:
Describe how data in a property needs to be transformed, if necessary. As an example, there are rules which concatenate values (e.g. in the GeoSciML Lite approach).
Solves usability issues:
Provides a rule-set for a different encoding
Known usability issues:
Doesn't solve CRS issue for GeoJSON.
Introduces issues inherent to JSON (no validation...,)
Reversibility:
Reversibility will depend on XML to be transformed, For GeoSciML-Lite will be partially reversed.
Simplification Model Transformation Rule
Name of the Rule
Rule for transforming XML into JSON
Category
Description
General Rules for transforming XML into JSON originally taken from OGC 14-009r1 ~ Engineering Report: “OGC 14-009r1, OGC Testbed-10 Rules for JSON and GeoJSON Adoption: Focus on OWSContext" and amended in OGC 15-053r1 ~ Testbed 11 Implementing JSON/GeoJSON in an OGC Standard Engineering Report
UML Model
Example instance in default encoding:
TODO: GeoSciML-Lite GeoJSON encoding variant,
Example instance in simplified encoding:
Model transformation rule:
Instance transformation rule:
Describe how data in a property needs to be transformed, if necessary. As an example, there are rules which concatenate values (e.g. in the GeoSciML Lite approach).
Solves usability issues:
Provides a rule-set for a different encoding
Known usability issues:
Doesn't solve CRS issue for GeoJSON. Introduces issues inherent to JSON (no validation...,)
Reversibility:
Reversibility will depend on XML to be transformed, For GeoSciML-Lite will be partially reversed.