Skip to content

Commit

Permalink
ODATA-1496 (#228)
Browse files Browse the repository at this point in the history
  • Loading branch information
mikepizzo authored Jan 31, 2024
2 parents 6dd0bc2 + fc28934 commit 14e3b0f
Show file tree
Hide file tree
Showing 5 changed files with 70 additions and 72 deletions.
12 changes: 6 additions & 6 deletions docs/odata-csdl-json/odata-csdl-json.html
Original file line number Diff line number Diff line change
Expand Up @@ -1980,7 +1980,7 @@ <h1 id="14-vocabulary-and-annotation"><a name="VocabularyandAnnotation" href="#V
<p>A <em>vocabulary</em> is a schema containing a set of terms where each <a href="#Term">term</a> is a named metadata extension. Anyone can define a vocabulary (a set of terms) that is scenario-specific or company-specific; more commonly used terms can be published as shared vocabularies such as the OData Core vocabulary <a href="#ODataVocCore">OData-VocCore</a>.</p>
<p>A <a href="#Term">term</a> can be used to:</p>
<ul>
<li>Extend model elements and type instances with additional information.</li>
<li>Extend model elements and type instances with additional information. Type instances are instances of a <a href="#PrimitiveTypes">primitive type</a>, including <a href="#TypeDefinition">type definitions</a> and <a href="#EnumerationType">enumeration types</a>, of an <a href="#EntityType">entity type</a>, or of a <a href="#ComplexType">complex type</a>.</li>
<li>Map instances of annotated structured types to an interface defined by the term type; i.e. annotations allow viewing instances of a structured type as instances of a differently structured type specified by the applied term.</li>
</ul>
<p>A service SHOULD NOT require a client to interpret annotations. Clients SHOULD ignore invalid or unknown terms and silently treat unexpected or invalid values (including invalid type, invalid literal expression, invalid targets, etc.) as an unknown value for the term. Unknown or invalid annotations should never result in an error, as long as the payload remains well-formed.</p>
Expand Down Expand Up @@ -2520,8 +2520,8 @@ <h2 id="144-dynamic-expression"><a name="DynamicExpression" href="#DynamicExpres
<h3 id="1441-path-expressions"><a name="PathExpressions" href="#PathExpressions">14.4.1 Path Expressions</a></h3>
<p>Path expressions allow assigning a value to an applied term or term component. There are two kinds of path expressions:</p>
<ul>
<li>A <em>model path</em> is used within <a href="#AnnotationPath">Annotation Path</a>, <a href="#ModelElementPath">Model Element Path</a>, <a href="#NavigationPropertyPath">Navigation Property Path</a>, and <a href="#PropertyPath">Property Path</a> expressions to traverse the model of a service and resolves to the model element identified by the path. It allows assigning values to terms or term properties of the <a href="#BuiltInTypesfordefiningVocabularyTerms">built-in types</a> <code>Edm.AnnotationPath</code>, <code>Edm.NavigationPropertyPath</code>, <code>Edm.PropertyPath</code>, and their base types <code>Edm.AnyPropertyPath</code> and <code>Edm.ModelElementPath</code>.</li>
<li>An <em>instance path</em> is used within a <a href="#ValuePath">Value Path</a> expression to traverse a graph of type instances and resolves to the value identified by the path. It allows assigning values to terms or term properties of built-in types other than the <code>Edm.*Path</code> types, or of any model-defined type.</li>
<li>A <em>model path</em> is evaluated on the entity model of a service and resolves to a model element. Model paths are used within <a href="#AnnotationPath">Annotation Path</a>, <a href="#ModelElementPath">Model Element Path</a>, <a href="#NavigationPropertyPath">Navigation Property Path</a>, and <a href="#PropertyPath">Property Path</a> expressions. They allow assigning values to terms or term properties of the <a href="#BuiltInTypesfordefiningVocabularyTerms">built-in types</a> <code>Edm.AnnotationPath</code>, <code>Edm.ModelElementPath</code>, <code>Edm.NavigationPropertyPath</code>, <code>Edm.PropertyPath</code>, and <code>Edm.AnyPropertyPath</code>.</li>
<li>An <em>instance path</em> is evaluated on a type instance and its nested or related type instances and resolves to the instance or collection of instances identified by the path. Instance paths are used within <a href="#ValuePath">Value Path</a> expressions. They allow assigning values to terms or term properties of model-defined types or of built-in types other than the <code>Edm.*Path</code> types.</li>
</ul>
<h4 id="14411-path-syntax"><a name="PathSyntax" href="#PathSyntax">14.4.1.1 Path Syntax</a></h4>
<p>Model paths and instance paths share a common syntax which is derived from the path expression syntax of URLs, see <a href="#ODataURL">OData-URL</a>.</p>
Expand Down Expand Up @@ -2664,10 +2664,10 @@ <h4 id="14412-path-evaluation"><a name="PathEvaluation" href="#PathEvaluation">1
<h4 id="14413-annotation-path"><a name="AnnotationPath" href="#AnnotationPath">14.4.1.3 Annotation Path</a></h4>
<p>The annotation path expression provides a value for terms or term properties that specify the <a href="#BuiltInTypesfordefiningVocabularyTerms">built-in types</a> <code>Edm.AnnotationPath</code> or <code>Edm.ModelElementPath</code>. Its argument is a <a href="#PathExpressions">model path</a> with the following restriction:</p>
<ul>
<li>A non-null path MUST resolve to an annotation.</li>
<li>A non-null path MUST resolve to an <a href="#Annotation">annotation</a>.</li>
</ul>
<p>The value of the annotation path expression is the <em>path</em> to the annotation, not its instance value. This is useful for terms that reuse or refer to other terms.</p>
<p>A term or term property of type <code>Edm.AnnotationPath</code> can be annotated with the term <code>Validation.AllowedTerms</code> (see <a href="#ODataVocValidation">OData-VocValidation</a>) if its intended value is an annotation path that ends in a term cast with one of the listed terms.</p>
<p>The value of the annotation path expression is the path itself, not the value of the annotation identified by the path. This is useful for terms that reuse or refer to other terms.</p>
<div class="varjson rep">
<p>Annotation path expressions are represented as a string containing a path.</p>
</div>
Expand Down Expand Up @@ -2713,7 +2713,7 @@ <h4 id="14416-property-path"><a name="PropertyPath" href="#PropertyPath">14.4.1.
<ul>
<li>A non-null path MUST resolve to a model element whose type is a primitive or complex type, an enumeration type, a type definition, or a collection of one of these types.</li>
</ul>
<p>The value of the property path expression is the path itself, not the value of the structural property or the value of the term cast identified by the path.</p>
<p>The value of the property path expression is the path itself, not the value of the structural property or annotation identified by the path.</p>
<div class="varjson rep">
<p>Property path expressions are represented as a string containing a path.</p>
</div>
Expand Down
39 changes: 19 additions & 20 deletions docs/odata-csdl-json/odata-csdl-json.md
Original file line number Diff line number Diff line change
Expand Up @@ -3523,7 +3523,9 @@ vocabularies such as the OData Core vocabulary

A [term](#Term) can be used to:
- Extend model elements and type instances
with additional information.
with additional information. Type instances are instances of a [primitive type](#PrimitiveTypes),
including [type definitions](#TypeDefinition) and [enumeration types](#EnumerationType),
of an [entity type](#EntityType), or of a [complex type](#ComplexType).
- Map instances of annotated structured
types to an interface defined by the term type; i.e. annotations allow
viewing instances of a structured type as instances of a differently
Expand Down Expand Up @@ -4163,20 +4165,18 @@ term.

Path expressions allow assigning a value to an applied term or term
component. There are two kinds of path expressions:
- A *model path* is used within
- A *model path* is evaluated on the entity model of a service and resolves to a model element.
Model paths are used within
[Annotation Path](#AnnotationPath), [Model Element Path](#ModelElementPath),
[Navigation Property Path](#NavigationPropertyPath), and [Property
Path](#PropertyPath) expressions to traverse the model of a service and
resolves to the model element identified by the path. It allows
assigning values to terms or term properties of the [built-in
types](#BuiltInTypesfordefiningVocabularyTerms) `Edm.AnnotationPath`,
`Edm.NavigationPropertyPath`, `Edm.PropertyPath`, and their base types
`Edm.AnyPropertyPath` and `Edm.ModelElementPath`.
- An *instance path* is used within a
[Value Path](#ValuePath) expression to traverse a graph of type
instances and resolves to the value identified by the path. It allows
assigning values to terms or term properties of built-in types other
than the `Edm.*Path` types, or of any model-defined type.
[Navigation Property Path](#NavigationPropertyPath), and [Property Path](#PropertyPath) expressions.
They allow assigning values to terms or term properties of the [built-in types](#BuiltInTypesfordefiningVocabularyTerms) `Edm.AnnotationPath`,
`Edm.ModelElementPath`, `Edm.NavigationPropertyPath`, `Edm.PropertyPath`, and
`Edm.AnyPropertyPath`.
- An *instance path* is evaluated on a type instance and its nested or related type instances
and resolves to the instance or collection of instances identified by the path.
Instance paths are used within [Value Path](#ValuePath) expressions.
They allow assigning values to terms or term properties of model-defined types or of built-in types other
than the `Edm.*Path` types.

#### <a name="PathSyntax" href="#PathSyntax">14.4.1.1 Path Syntax</a>

Expand Down Expand Up @@ -4510,17 +4510,16 @@ properties that specify the [built-in
types](#BuiltInTypesfordefiningVocabularyTerms)
`Edm.AnnotationPath` or `Edm.ModelElementPath`. Its argument is a [model
path](#PathExpressions) with the following restriction:
- A non-null path MUST resolve to an annotation.
- A non-null path MUST resolve to an [annotation](#Annotation).

The value of the annotation path expression is the _path_ to the annotation, not its instance value.
This is useful for terms that reuse or refer to other terms.

A term or term property of type `Edm.AnnotationPath` can be annotated
with the term `Validation.AllowedTerms` (see
[OData-VocValidation](#ODataVocValidation)) if its intended value is an
annotation path that ends in a term cast with one of the listed terms.

The value of the annotation path expression is the path itself, not the
value of the annotation identified by the path. This is useful for terms
that reuse or refer to other terms.

::: {.varjson .rep}
Annotation path expressions are represented as a string containing a
path.
Expand Down Expand Up @@ -4611,7 +4610,7 @@ element whose type is a primitive or complex type, an enumeration type,
a type definition, or a collection of one of these types.

The value of the property path expression is the path itself, not the
value of the structural property or the value of the term cast
value of the structural property or annotation
identified by the path.

::: {.varjson .rep}
Expand Down
12 changes: 6 additions & 6 deletions docs/odata-csdl-xml/odata-csdl-xml.html
Original file line number Diff line number Diff line change
Expand Up @@ -1810,7 +1810,7 @@ <h1 id="14-vocabulary-and-annotation"><a name="VocabularyandAnnotation" href="#V
<p>A <em>vocabulary</em> is a schema containing a set of terms where each <a href="#Term">term</a> is a named metadata extension. Anyone can define a vocabulary (a set of terms) that is scenario-specific or company-specific; more commonly used terms can be published as shared vocabularies such as the OData Core vocabulary <a href="#ODataVocCore">OData-VocCore</a>.</p>
<p>A <a href="#Term">term</a> can be used to:</p>
<ul>
<li>Extend model elements and type instances with additional information.</li>
<li>Extend model elements and type instances with additional information. Type instances are instances of a <a href="#PrimitiveTypes">primitive type</a>, including <a href="#TypeDefinition">type definitions</a> and <a href="#EnumerationType">enumeration types</a>, of an <a href="#EntityType">entity type</a>, or of a <a href="#ComplexType">complex type</a>.</li>
<li>Map instances of annotated structured types to an interface defined by the term type; i.e. annotations allow viewing instances of a structured type as instances of a differently structured type specified by the applied term.</li>
</ul>
<p>A service SHOULD NOT require a client to interpret annotations. Clients SHOULD ignore invalid or unknown terms and silently treat unexpected or invalid values (including invalid type, invalid literal expression, invalid targets, etc.) as an unknown value for the term. Unknown or invalid annotations should never result in an error, as long as the payload remains well-formed.</p>
Expand Down Expand Up @@ -2408,8 +2408,8 @@ <h2 id="144-dynamic-expression"><a name="DynamicExpression" href="#DynamicExpres
<h3 id="1441-path-expressions"><a name="PathExpressions" href="#PathExpressions">14.4.1 Path Expressions</a></h3>
<p>Path expressions allow assigning a value to an applied term or term component. There are two kinds of path expressions:</p>
<ul>
<li>A <em>model path</em> is used within <a href="#AnnotationPath">Annotation Path</a>, <a href="#ModelElementPath">Model Element Path</a>, <a href="#NavigationPropertyPath">Navigation Property Path</a>, and <a href="#PropertyPath">Property Path</a> expressions to traverse the model of a service and resolves to the model element identified by the path. It allows assigning values to terms or term properties of the <a href="#BuiltInTypesfordefiningVocabularyTerms">built-in types</a> <code>Edm.AnnotationPath</code>, <code>Edm.NavigationPropertyPath</code>, <code>Edm.PropertyPath</code>, and their base types <code>Edm.AnyPropertyPath</code> and <code>Edm.ModelElementPath</code>.</li>
<li>An <em>instance path</em> is used within a <a href="#ValuePath">Value Path</a> expression to traverse a graph of type instances and resolves to the value identified by the path. It allows assigning values to terms or term properties of built-in types other than the <code>Edm.*Path</code> types, or of any model-defined type.</li>
<li>A <em>model path</em> is evaluated on the entity model of a service and resolves to a model element. Model paths are used within <a href="#AnnotationPath">Annotation Path</a>, <a href="#ModelElementPath">Model Element Path</a>, <a href="#NavigationPropertyPath">Navigation Property Path</a>, and <a href="#PropertyPath">Property Path</a> expressions. They allow assigning values to terms or term properties of the <a href="#BuiltInTypesfordefiningVocabularyTerms">built-in types</a> <code>Edm.AnnotationPath</code>, <code>Edm.ModelElementPath</code>, <code>Edm.NavigationPropertyPath</code>, <code>Edm.PropertyPath</code>, and <code>Edm.AnyPropertyPath</code>.</li>
<li>An <em>instance path</em> is evaluated on a type instance and its nested or related type instances and resolves to the instance or collection of instances identified by the path. Instance paths are used within <a href="#ValuePath">Value Path</a> expressions. They allow assigning values to terms or term properties of model-defined types or of built-in types other than the <code>Edm.*Path</code> types.</li>
</ul>
<h4 id="14411-path-syntax"><a name="PathSyntax" href="#PathSyntax">14.4.1.1 Path Syntax</a></h4>
<p>Model paths and instance paths share a common syntax which is derived from the path expression syntax of URLs, see <a href="#ODataURL">OData-URL</a>.</p>
Expand Down Expand Up @@ -2532,10 +2532,10 @@ <h4 id="14412-path-evaluation"><a name="PathEvaluation" href="#PathEvaluation">1
<h4 id="14413-annotation-path"><a name="AnnotationPath" href="#AnnotationPath">14.4.1.3 Annotation Path</a></h4>
<p>The annotation path expression provides a value for terms or term properties that specify the <a href="#BuiltInTypesfordefiningVocabularyTerms">built-in types</a> <code>Edm.AnnotationPath</code> or <code>Edm.ModelElementPath</code>. Its argument is a <a href="#PathExpressions">model path</a> with the following restriction:</p>
<ul>
<li>A non-null path MUST resolve to an annotation.</li>
<li>A non-null path MUST resolve to an <a href="#Annotation">annotation</a>.</li>
</ul>
<p>The value of the annotation path expression is the <em>path</em> to the annotation, not its instance value. This is useful for terms that reuse or refer to other terms.</p>
<p>A term or term property of type <code>Edm.AnnotationPath</code> can be annotated with the term <code>Validation.AllowedTerms</code> (see <a href="#ODataVocValidation">OData-VocValidation</a>) if its intended value is an annotation path that ends in a term cast with one of the listed terms.</p>
<p>The value of the annotation path expression is the path itself, not the value of the annotation identified by the path. This is useful for terms that reuse or refer to other terms.</p>
<section id="expression-edmannotationpath" class="varxml rep">
<h3><a name="ExpressionedmAnnotationPath.44" href="#ExpressionedmAnnotationPath.44">Expression <code>edm:AnnotationPath</code></a></h3>
<p>The <code>edm:AnnotationPath</code> expression MAY be provided using element notation or attribute notation.</p>
Expand Down Expand Up @@ -2598,7 +2598,7 @@ <h4 id="14416-property-path"><a name="PropertyPath" href="#PropertyPath">14.4.1.
<ul>
<li>A non-null path MUST resolve to a model element whose type is a primitive or complex type, an enumeration type, a type definition, or a collection of one of these types.</li>
</ul>
<p>The value of the property path expression is the path itself, not the value of the structural property or the value of the term cast identified by the path.</p>
<p>The value of the property path expression is the path itself, not the value of the structural property or annotation identified by the path.</p>
<section id="expression-edmpropertypath" class="varxml rep">
<h3><a name="ExpressionedmPropertyPath.47" href="#ExpressionedmPropertyPath.47">Expression <code>edm:PropertyPath</code></a></h3>
<p>The <code>edm:PropertyPath</code> MAY be provided using either element notation or attribute notation.</p>
Expand Down
Loading

0 comments on commit 14e3b0f

Please sign in to comment.