diff --git a/docs/odata-csdl-json/odata-csdl-json.html b/docs/odata-csdl-json/odata-csdl-json.html index e83140bf..14bf5188 100644 --- a/docs/odata-csdl-json/odata-csdl-json.html +++ b/docs/odata-csdl-json/odata-csdl-json.html @@ -410,26 +410,31 @@
If
without else part in collectionsExample 42: Target expressions
Example 42: Target expressions
MySchema.MyEntityContainer/MyEntitySet
/MyProperty
MySchema.MyEntityContainer/MyEntitySet
/MySchema.MyEntityType/MyProperty
MySchema.MyEntityContainer/MyEntitySet
/MyComplexProperty/MyProperty
MySchema.MyEntityContainer/MyEntitySet
/MyProperty
MySchema.MyEntityContainer/MyEntitySet
/MySchema.MyEntityType/MyProperty
MySchema.MyEntityContainer/MyEntitySet
/MyComplexProperty/MyProperty
All qualified names used in a target expression MUST be in scope.
External targeting is possible for properties and navigation properties of singletons or entities in a particular entity set. These annotations override annotations on the properties or navigation properties targeted via the declaring structured type.
+External targeting is also possible for bound action and function overloads whose binding parameter is addressed via a certain path or has a certain type, as well as for parameters and return types thereof. The targeting expression then consists of two path expressions from the table above separated by a forward slash. The first path expression references one of the following model elements:
+Model element | +means the binding parameter must be | +
---|---|
Entity Set | +an instance or collection of instances from the entity set | +
Singleton | +the singleton | +
Navigation Property via container | +addressed via a resource path to the navigation property | +
Property via container | +addressed via a resource path to the structural property | +
Navigation Property via structured type | +addressed via a resource path to the navigation property that traverses an instance or collection of the structured type | +
Property via structured type | +addressed via a resource path to the structural property that traverses an instance or collection of the structured type | +
Complex Type | +an instance or collection of the type or a subtype thereof | +
Entity Type | +an instance or collection of the type or a subtype thereof | +
A binding parameter is “addressed via a resource path” if the path expression addressing the binding parameter starts with the resource path, it may then continue with segments described in OData-URL, sections 4.6 through 4.12. If the resource path addresses a collection, the binding parameter can also be a single instance of that collection if a segment described in OData-URL, sections 4.9 and 4.10, follows.
+The second path expression references one of the following model elements:
+where the overload is bound and the binding parameter meets the condition imposed by the first path expression.
+These annotations override annotations targeting the action or function overloads directly.
Example 42: Target expressions
Example 42: Target expressions
`MySchema.MyAction(MySchema.MyBindingType)`all overloads of an [Action](#Action)| qualified name of action|
`MySchema.MyAction(Collection(MySchema.BindingType))`
`MySchema.MyAction()`
`MySchema.MyAction`@@ -3906,7 +3907,7 @@ all overloads of a [Function](#Function)| qualified name of function|
`MySc [Navigation Property](#NavigationProperty) via structured type| qualified name of structured type followed by zero or more segments containing the name of a structural or navigation property, or a type-cast or term-cast|`MySchema.MyEntityType/MyNavigationProperty`[Parameter](#Parameter)| qualified name of entity container followed by a segment containing an action or function import name followed by a segment containing a parameter name|
`MySchema.MyComplexType/MyNavigationProperty``MySchema.MyEntityContainer/MyFunctionImport/MyParameter`[Parameter](#Parameter)| qualified name of action or function optionally followed by a parenthesized expression as in the first row followed by a segment containing the name of a child element|`MySchema.MyFunction/MyParameter`-[Property](#StructuralProperty) via container| qualified name of entity container followed by a segment containing a singleton or entity set name and zero or more segments containing the name of a structural or navigation property, or a type-cast or term-cast|`MySchema.MyEntityContainer/MyEntitySet`+[Property](#StructuralProperty) via container| qualified name of entity container followed by a segment containing a singleton or entity set name and zero or more segments containing the name of a structural or navigation property, or a type-cast or term-cast|
` /MyProperty`
`MySchema.MyEntityContainer/MyEntitySet`
` /MySchema.MyEntityType/MyProperty`
`MySchema.MyEntityContainer/MyEntitySet`
` /MyComplexProperty/MyProperty``MySchema.MyEntityContainer/MyEntitySet`[Property](#StructuralProperty) via structured type| qualified name of structured type followed by zero or more segments containing the name of a structural or navigation property, or a type-cast or term-cast|
` /MyProperty`
`MySchema.MyEntityContainer/MyEntitySet`
` /MySchema.MyEntityType/MyProperty`
`MySchema.MyEntityContainer/MyEntitySet`
` /MyComplexProperty/MyProperty``MySchema.MyEntityType/MyProperty`[Return Type](#ReturnType)| qualified name of entity container followed by a segment containing an action or function import name followed by a segment containing `$ReturnType`|
`MySchema.MyComplexType/MyProperty``MySchema.MyEntityContainer/MyFunctionImport/$ReturnType`[Return Type](#ReturnType)| qualified name of action or function optionally followed by a parenthesized expression as in the first row followed by a segment containing `$ReturnType`|`MySchema.MyFunction/$ReturnType`@@ -3921,6 +3922,44 @@ properties of singletons or entities in a particular entity set. These annotations override annotations on the properties or navigation properties targeted via the declaring structured type. +External targeting is also possible for bound action and function overloads +whose binding parameter is addressed via a certain path or has a certain type, +as well as for parameters and return types thereof. The targeting expression then +consists of two path expressions from the table above separated by a forward +slash. The first path expression references one of the following model +elements: + +Model element|means the binding parameter must be +-------------|----------------------------------- +Entity Set|an instance or collection of instances from the entity set +Singleton|the singleton +Navigation Property via container|addressed via a resource path to the navigation property +Property via container|addressed via a resource path to the structural property +Navigation Property via structured type|addressed via a resource path to the navigation property that traverses an instance or collection of the structured type +Property via structured type|addressed via a resource path to the structural property that traverses an instance or collection of the structured type +Complex Type|an instance or collection of the type or a subtype thereof +Entity Type|an instance or collection of the type or a subtype thereof + +A binding parameter is "addressed via a resource path" if the path expression addressing the +binding parameter starts with the resource path, it may then continue with segments +described in [OData-URL](#ODataURL), sections 4.6 through 4.12. If the resource path +addresses a collection, the binding parameter can also be a single instance of that +collection if a segment described in [OData-URL](#ODataURL), sections 4.9 and 4.10, follows. + +The second path expression references one of the following model elements: +- Action overload +- all overloads of an Action +- Function overload +- all overloads of a Function +- Parameter +- Return Type + +where the overload is bound and the binding parameter meets the condition +imposed by the first path expression. + +These annotations override annotations targeting the action or function +overloads directly. + ## 14.3 Constant Expression Constant expressions allow assigning a constant value to an applied diff --git a/docs/odata-csdl-xml/odata-csdl-xml.html b/docs/odata-csdl-xml/odata-csdl-xml.html index 3cc4f2dc..1aa799ab 100644 --- a/docs/odata-csdl-xml/odata-csdl-xml.html +++ b/docs/odata-csdl-xml/odata-csdl-xml.html @@ -414,26 +414,31 @@
`MySchema.MyFunction(MySchema.MyBindingParamType,`
` First.NonBinding.ParamType)/$ReturnType`464
If
without else part in collectionsExample 42: Target expressions
Example 42: Target expressions
MySchema.MyEntityContainer/MyEntitySet
/MyProperty
MySchema.MyEntityContainer/MyEntitySet
/MySchema.MyEntityType/MyProperty
MySchema.MyEntityContainer/MyEntitySet
/MyComplexProperty/MyProperty
MySchema.MyEntityContainer/MyEntitySet
/MyProperty
MySchema.MyEntityContainer/MyEntitySet
/MySchema.MyEntityType/MyProperty
MySchema.MyEntityContainer/MyEntitySet
/MyComplexProperty/MyProperty
All qualified names used in a target expression MUST be in scope.
External targeting is possible for properties and navigation properties of singletons or entities in a particular entity set. These annotations override annotations on the properties or navigation properties targeted via the declaring structured type.
+External targeting is also possible for bound action and function overloads whose binding parameter is addressed via a certain path or has a certain type, as well as for parameters and return types thereof. The targeting expression then consists of two path expressions from the table above separated by a forward slash. The first path expression references one of the following model elements:
+Model element | +means the binding parameter must be | +
---|---|
Entity Set | +an instance or collection of instances from the entity set | +
Singleton | +the singleton | +
Navigation Property via container | +addressed via a resource path to the navigation property | +
Property via container | +addressed via a resource path to the structural property | +
Navigation Property via structured type | +addressed via a resource path to the navigation property that traverses an instance or collection of the structured type | +
Property via structured type | +addressed via a resource path to the structural property that traverses an instance or collection of the structured type | +
Complex Type | +an instance or collection of the type or a subtype thereof | +
Entity Type | +an instance or collection of the type or a subtype thereof | +
A binding parameter is “addressed via a resource path” if the path expression addressing the binding parameter starts with the resource path, it may then continue with segments described in OData-URL, sections 4.6 through 4.12. If the resource path addresses a collection, the binding parameter can also be a single instance of that collection if a segment described in OData-URL, sections 4.9 and 4.10, follows.
+The second path expression references one of the following model elements:
+where the overload is bound and the binding parameter meets the condition imposed by the first path expression.
+These annotations override annotations targeting the action or function overloads directly.
Example 42: Target expressions
Example 42: Target expressions
`MySchema.MyAction(MySchema.MyBindingType)`all overloads of an [Action](#Action)| qualified name of action|
`MySchema.MyAction(Collection(MySchema.BindingType))`
`MySchema.MyAction()`
`MySchema.MyAction`@@ -3715,7 +3716,7 @@ all overloads of a [Function](#Function)| qualified name of function|
`MySc [Navigation Property](#NavigationProperty) via structured type| qualified name of structured type followed by zero or more segments containing the name of a structural or navigation property, or a type-cast or term-cast|`MySchema.MyEntityType/MyNavigationProperty`[Parameter](#Parameter)| qualified name of entity container followed by a segment containing an action or function import name followed by a segment containing a parameter name|
`MySchema.MyComplexType/MyNavigationProperty``MySchema.MyEntityContainer/MyFunctionImport/MyParameter`[Parameter](#Parameter)| qualified name of action or function optionally followed by a parenthesized expression as in the first row followed by a segment containing the name of a child element|`MySchema.MyFunction/MyParameter`-[Property](#StructuralProperty) via container| qualified name of entity container followed by a segment containing a singleton or entity set name and zero or more segments containing the name of a structural or navigation property, or a type-cast or term-cast|`MySchema.MyEntityContainer/MyEntitySet`+[Property](#StructuralProperty) via container| qualified name of entity container followed by a segment containing a singleton or entity set name and zero or more segments containing the name of a structural or navigation property, or a type-cast or term-cast|
` /MyProperty`
`MySchema.MyEntityContainer/MyEntitySet`
` /MySchema.MyEntityType/MyProperty`
`MySchema.MyEntityContainer/MyEntitySet`
` /MyComplexProperty/MyProperty``MySchema.MyEntityContainer/MyEntitySet`[Property](#StructuralProperty) via structured type| qualified name of structured type followed by zero or more segments containing the name of a structural or navigation property, or a type-cast or term-cast|
` /MyProperty`
`MySchema.MyEntityContainer/MyEntitySet`
` /MySchema.MyEntityType/MyProperty`
`MySchema.MyEntityContainer/MyEntitySet`
` /MyComplexProperty/MyProperty``MySchema.MyEntityType/MyProperty`[Return Type](#ReturnType)| qualified name of entity container followed by a segment containing an action or function import name followed by a segment containing `$ReturnType`|
`MySchema.MyComplexType/MyProperty``MySchema.MyEntityContainer/MyFunctionImport/$ReturnType`[Return Type](#ReturnType)| qualified name of action or function optionally followed by a parenthesized expression as in the first row followed by a segment containing `$ReturnType`|`MySchema.MyFunction/$ReturnType`@@ -3730,6 +3731,44 @@ properties of singletons or entities in a particular entity set. These annotations override annotations on the properties or navigation properties targeted via the declaring structured type. +External targeting is also possible for bound action and function overloads +whose binding parameter is addressed via a certain path or has a certain type, +as well as for parameters and return types thereof. The targeting expression then +consists of two path expressions from the table above separated by a forward +slash. The first path expression references one of the following model +elements: + +Model element|means the binding parameter must be +-------------|----------------------------------- +Entity Set|an instance or collection of instances from the entity set +Singleton|the singleton +Navigation Property via container|addressed via a resource path to the navigation property +Property via container|addressed via a resource path to the structural property +Navigation Property via structured type|addressed via a resource path to the navigation property that traverses an instance or collection of the structured type +Property via structured type|addressed via a resource path to the structural property that traverses an instance or collection of the structured type +Complex Type|an instance or collection of the type or a subtype thereof +Entity Type|an instance or collection of the type or a subtype thereof + +A binding parameter is "addressed via a resource path" if the path expression addressing the +binding parameter starts with the resource path, it may then continue with segments +described in [OData-URL](#ODataURL), sections 4.6 through 4.12. If the resource path +addresses a collection, the binding parameter can also be a single instance of that +collection if a segment described in [OData-URL](#ODataURL), sections 4.9 and 4.10, follows. + +The second path expression references one of the following model elements: +- Action overload +- all overloads of an Action +- Function overload +- all overloads of a Function +- Parameter +- Return Type + +where the overload is bound and the binding parameter meets the condition +imposed by the first path expression. + +These annotations override annotations targeting the action or function +overloads directly. + ## 14.3 Constant Expression Constant expressions allow assigning a constant value to an applied diff --git a/odata-csdl/1 Introduction.md b/odata-csdl/1 Introduction.md index 3ff3e739..da778e79 100644 --- a/odata-csdl/1 Introduction.md +++ b/odata-csdl/1 Introduction.md @@ -46,6 +46,9 @@ SRID value `variable` is deprecated| All children of `edm:EntityContainer` are optional| [464](https://github.com/oasis-tcs/odata-specs/issues/464) : +[Section ##Target]| +External targeting of bound action/function overloads via container or structured type| +[393](https://github.com/oasis-tcs/odata-specs/issues/393) [Section ##GeoValues] | Constant Geo values in annotations | [654](https://github.com/oasis-tcs/odata-specs/issues/654) [Section ##StreamValues] | Constant Stream values in annotations | [654](https://github.com/oasis-tcs/odata-specs/issues/654) [Section ##PathEvaluation]| diff --git a/odata-csdl/14 Vocabulary and Annotation.md b/odata-csdl/14 Vocabulary and Annotation.md index 0124b372..f513cfab 100644 --- a/odata-csdl/14 Vocabulary and Annotation.md +++ b/odata-csdl/14 Vocabulary and Annotation.md @@ -578,8 +578,8 @@ except actions and functions whose overloads to not possess a natural identifier), and all direct children of an entity container. Model element| -External targeting syntax| -
`MySchema.MyFunction(MySchema.MyBindingParamType,`
` First.NonBinding.ParamType)/$ReturnType`+Can be targeted with path expression (see also [section ##PathSyntax])| +Example ##ex: Target expressions
-----|-----|----- [Action](#Action) overload| qualified name of action followed by parentheses containing the binding parameter type of a bound action overload to identify that bound overload, or by empty parentheses to identify the unbound overload| @@ -649,9 +649,9 @@ qualified name of action or function optionally followed by a parenthesized expr [Property](#StructuralProperty) via container| qualified name of entity container followed by a segment containing a singleton or entity set name and zero or more segments containing the name of a structural or navigation property, or a type-cast or term-cast|Example ##ex: Target expressions
`MySchema.MyEntityContainer/MyEntitySet` -[Property](#StructuralProperty) via structured type| @@ -683,6 +683,44 @@ properties of singletons or entities in a particular entity set. These annotations override annotations on the properties or navigation properties targeted via the declaring structured type. +External targeting is also possible for bound action and function overloads +whose binding parameter is addressed via a certain path or has a certain type, +as well as for parameters and return types thereof. The targeting expression then +consists of two path expressions from the table above separated by a forward +slash. The first path expression references one of the following model +elements: + +Model element|means the binding parameter must be +-------------|----------------------------------- +Entity Set|an instance or collection of instances from the entity set +Singleton|the singleton +Navigation Property via container|addressed via a resource path to the navigation property +Property via container|addressed via a resource path to the structural property +Navigation Property via structured type|addressed via a resource path to the navigation property that traverses an instance or collection of the structured type +Property via structured type|addressed via a resource path to the structural property that traverses an instance or collection of the structured type +Complex Type|an instance or collection of the type or a subtype thereof +Entity Type|an instance or collection of the type or a subtype thereof + +A binding parameter is "addressed via a resource path" if the path expression addressing the +binding parameter starts with the resource path, it may then continue with segments +described in [OData-URL](#ODataURL), sections 4.6 through 4.12. If the resource path +addresses a collection, the binding parameter can also be a single instance of that +collection if a segment described in [OData-URL](#ODataURL), sections 4.9 and 4.10, follows. + +The second path expression references one of the following model elements: +- Action overload +- all overloads of an Action +- Function overload +- all overloads of a Function +- Parameter +- Return Type + +where the overload is bound and the binding parameter meets the condition +imposed by the first path expression. + +These annotations override annotations targeting the action or function +overloads directly. + ## ##subsec Constant Expression Constant expressions allow assigning a constant value to an applied
` /MyProperty` +
` /MyProperty`
`MySchema.MyEntityContainer/MyEntitySet` -
` /MySchema.MyEntityType/MyProperty` +
` /MySchema.MyEntityType/MyProperty`
`MySchema.MyEntityContainer/MyEntitySet`
` /MyComplexProperty/MyProperty`