diff --git a/docs/odata-protocol/odata-protocol.html b/docs/odata-protocol/odata-protocol.html index dc4f25d5..0eaa4c29 100644 --- a/docs/odata-protocol/odata-protocol.html +++ b/docs/odata-protocol/odata-protocol.html @@ -1302,15 +1302,15 @@
The following subsections describe how the context URL is constructed for each category of payload by providing a context URL template. The context URL template uses the following terms:
{context-url}
is the canonical resource path to the $metadata
document,{entity-set}
is the name of an entity set or the canonical path to a collection-valued containment navigation property,{entity}
is the canonical URL for an entity,{entity-set}
is the name of an entity set OData-CSDL, section 13.2 or the canonical path to a collection-valued containment navigation property (implicit entity set OData-CSDL, section 8.4),{single-entity}
is the name of a singleton or the canonical path to a single-valued containment navigation property,{entity}
is the canonical URL for an entity,{select-list}
is an optional parenthesized comma-separated list of selected properties, instance annotations, functions, and actions,{property-path}
is the path to a structural property of the entity,{type-name}
is a qualified type name,{/type-name}
is an optional type-cast segment containing the qualified name of a derived or implemented type prefixed with a forward slash.Key values in the canonical path in {entity-set}
and {single-entity}
are represented in canonical form (parentheses-style) without percent-encoding.
Key values in the canonical path in {entity-set}
, {single-entity}
, and {entity}
are represented in canonical form (parentheses-style) without percent-encoding.
The full grammar for the context URL is defined in OData-ABNF. Note that the syntax of the context URL is independent of whatever URL conventions the service uses for addressing individual entities.
Example 11: resource URL and corresponding context URL
http://host/service/Customers
http://host/service/$metadata#Customers
-If the entities are contained, then {entity-set}
is the top-level entity set or singleton followed by the canonical path to the containment navigation property of the containing entity.
Example 12: resource URL and corresponding context URL for contained entities
http://host/service/Orders(4711)/Items
@@ -1351,19 +1350,18 @@ 10.3 Entity
{context-url}#{entity-set}/$entity
{context-url}#{single-entity}
{context-url}#{type-name}
-If a response or response part is a single entity of the declared type of an entity set, the context URL fragment is the entity set’s name with /$entity
appended.
+If a response or response part is an entity of the declared type of a (named or implicit) entity set, the context URL fragment is the canonical path {entity-set}
to the entity set with /$entity
appended.
-Example 13: resource URL and corresponding context URL
+Example 13: resource URL and corresponding context URL for named entity set. Note the absence of the key predicate (1)
in the context URL.
http://host/service/Customers(1)
http://host/service/$metadata#Customers/$entity
-If the entity is bound to a contained entity set, then {entity-set}
is the canonical path to the collection-valued containment navigation property of the containing entity.
-Example 14: resource URL and corresponding context URL for contained entity
+Example 14: resource URL and corresponding context URL for contained entity (implicit entity set)
http://host/service/Orders(4711)/Items(1)
http://host/service/$metadata#Orders(4711)/Items/$entity
-If the entity is the target of a single-valued containment navigation property, then the context URL fragment is the canonical path {single-entity}
to the single-valued containment navigation property of the containing entity without /$entity
appended.
+If a response or response part is an entity of the declared type of a single-valued containment navigation property, the context URL fragment is the canonical path {single-entity}
to that navigation property without /$entity
appended.
Example 15: resource URL and corresponding context URL for entity targeted by a single-valued containment navigation property
http://host/service/Orders(4711)/DeliveryAddress
@@ -1400,7 +1398,7 @@ 10.6 Der
Context URL template:
{context-url}#{entity-set}{/type-name}/$entity
-If a response or response part is a single entity of a type derived from the declared type of an entity set, a type-cast segment is appended to the entity set name.
+If a response or response part is an entity of a type derived from the declared type of an entity set, a type-cast segment is appended to the entity set name.
Example 18: resource URL and corresponding context URL
http://host/service/Customers(2)/Model.VipCustomer
@@ -1432,7 +1430,7 @@ 10
{context-url}#{entity-set}{/type-name}{select-list}/$entity
{context-url}#{single-entity}{select-list}
{context-url}#{type-name}{select-list}
-If a single entity contains a subset of properties, the parenthesized comma-separated list of the selected defined or dynamic properties, instance annotations, navigation properties, functions, and actions is appended to the {entity-set}
after an optional type-cast segment and prior to appending /$entity
. If the response is not a subset of a single entity set, the {select-list}
is instead appended to the {type-name}
of the returned entity.
+If an entity contains a subset of properties, the parenthesized comma-separated list of the selected defined or dynamic properties, instance annotations, navigation properties, functions, and actions is appended to the {entity-set}
after an optional type-cast segment and prior to appending /$entity
, or to the {single-entity}
. If the response is not a subset of a single entity set, the {select-list}
is instead appended to the {type-name}
of the returned entity.
Regardless of how contained structural properties are represented in the request URL (as paths or as select options) they are represented in the context URL using path syntax, as defined in OData 4.0.
The shortcut *
represents the list of all structural properties. Properties defined on types derived from the type of the entity set (or type specified in the type-cast segment if specified) are prefixed with the qualified name of the derived type as defined in OData-ABNF. Note that expanded properties are automatically included in the response.
The list also contains explicitly selected or expanded instance annotations. It is possible to select or expand only instance annotations, in which case only those selected or expanded annotations appear in the result. Note that annotations specified only in the include-annotations
preference do not appear in the context URL and do not affect the selected/expanded properties.
diff --git a/docs/odata-protocol/odata-protocol.md b/docs/odata-protocol/odata-protocol.md
index 5590a036..5ba8b573 100644
--- a/docs/odata-protocol/odata-protocol.md
+++ b/docs/odata-protocol/odata-protocol.md
@@ -1999,10 +1999,12 @@ for each category of payload by providing a *context URL template*. The
context URL template uses the following terms:
- `{context-url}` is the canonical
resource path to the `$metadata` document,
-- `{entity-set}` is the name of an entity set or the canonical path to a collection-valued containment navigation property,
+- `{entity-set}` is the name of an entity set [OData-CSDL, section 13.2](https://docs.oasis-open.org/odata/odata-csdl-json/v4.02/odata-csdl-json-v4.02.html#EntitySet)
+or the canonical path to a collection-valued containment navigation property
+(implicit entity set [OData-CSDL, section 8.4](https://docs.oasis-open.org/odata/odata-csdl-json/v4.02/odata-csdl-json-v4.02.html#ContainmentNavigationProperty)),
+- `{single-entity}` is the name of a singleton or the canonical path to a single-valued containment navigation property,
- `{entity}` is the canonical URL for an
entity,
-- `{single-entity}` is the name of a singleton or the canonical path to a single-valued containment navigation property,
- `{select-list}` is an optional
parenthesized comma-separated list of selected properties, instance
annotations, functions, and actions,
@@ -2013,7 +2015,7 @@ path to a structural property of the entity,
segment containing the qualified name of a derived or implemented type
prefixed with a forward slash.
-Key values in the canonical path in `{entity-set}` and `{single-entity}` are represented in canonical form
+Key values in the canonical path in `{entity-set}`, `{single-entity}`, and `{entity}` are represented in canonical form
(parentheses-style) without percent-encoding.
The full grammar for the context URL is defined in
@@ -2045,8 +2047,9 @@ Context URL template:
{context-url}#{entity-set}
{context-url}#Collection({type-name})
-If all entities in the collection are members of one entity set, its
-name is the context URL fragment.
+If all entities in the collection are members of one (named or implicit)
+entity set, the context URL fragment is the canonical path `{entity-set}` to the
+entity set.
::: example
Example 11: resource URL and corresponding context URL
@@ -2056,10 +2059,6 @@ http://host/service/$metadata#Customers
```
:::
-If the entities are contained, then `{entity-set}` is the top-level entity
-set or singleton followed by the canonical path to the containment navigation
-property of the containing entity.
-
::: example
Example 12: resource URL and corresponding context URL for contained
entities
@@ -2083,35 +2082,32 @@ Context URL template:
{context-url}#{single-entity}
{context-url}#{type-name}
-If a response or response part is a single entity of the declared type
-of an entity set, the context URL fragment is the entity set's
-name with `/$entity` appended.
+If a response or response part is an entity of the declared type
+of a (named or implicit) entity set, the context URL fragment is the canonical path
+`{entity-set}` to the entity set with `/$entity` appended.
::: example
-Example 13: resource URL and corresponding context URL
+Example 13: resource URL and corresponding context URL for named entity set.
+Note the absence of the key predicate `(1)` in the context URL.
```
http://host/service/Customers(1)
http://host/service/$metadata#Customers/$entity
```
:::
-If the entity is bound to a contained entity set, then `{entity-set}` is the
-canonical path to the collection-valued containment navigation
-property of the containing entity.
-
::: example
Example 14: resource URL and corresponding context URL for contained
-entity
+entity (implicit entity set)
```
http://host/service/Orders(4711)/Items(1)
http://host/service/$metadata#Orders(4711)/Items/$entity
```
:::
-If the entity is the target of a single-valued containment navigation property,
-then the context URL fragment is the canonical path `{single-entity}`
-to the single-valued containment navigation
-property of the containing entity without `/$entity` appended.
+If a response or response part is an entity of the declared type of
+a single-valued containment navigation property,
+the context URL fragment is the canonical path `{single-entity}`
+to that navigation property without `/$entity` appended.
::: example
Example 15: resource URL and corresponding context URL for
@@ -2168,7 +2164,7 @@ Context URL template:
{context-url}#{entity-set}{/type-name}/$entity
-If a response or response part is a single entity of a type derived from
+If a response or response part is an entity of a type derived from
the declared type of an entity set, a type-cast segment is appended to
the entity set name.
@@ -2237,11 +2233,12 @@ Context URL templates:
{context-url}#{single-entity}{select-list}
{context-url}#{type-name}{select-list}
-If a single entity contains a subset of properties, the parenthesized
+If an entity contains a subset of properties, the parenthesized
comma-separated list of the selected defined or dynamic properties,
instance annotations, navigation properties, functions, and actions is
appended to the `{entity-set}` after an optional type-cast segment and
-prior to appending `/$entity`. If the response is not a subset of a
+prior to appending `/$entity`, or to the `{single-entity}`.
+If the response is not a subset of a
single entity set, the `{select-list}` is instead appended to the
`{type-name}` of the returned entity.
diff --git a/odata-protocol/10 Context URL.md b/odata-protocol/10 Context URL.md
index 3c26c448..c5f7539d 100644
--- a/odata-protocol/10 Context URL.md
+++ b/odata-protocol/10 Context URL.md
@@ -22,10 +22,12 @@ for each category of payload by providing a *context URL template*. The
context URL template uses the following terms:
- `{context-url}` is the canonical
resource path to the `$metadata` document,
-- `{entity-set}` is the name of an entity set or the canonical path to a collection-valued containment navigation property,
+- `{entity-set}` is the name of an entity set [#OData-CSDL#EntitySet]
+or the canonical path to a collection-valued containment navigation property
+(implicit entity set [#OData-CSDL#ContainmentNavigationProperty]),
+- `{single-entity}` is the name of a singleton or the canonical path to a single-valued containment navigation property,
- `{entity}` is the canonical URL for an
entity,
-- `{single-entity}` is the name of a singleton or the canonical path to a single-valued containment navigation property,
- `{select-list}` is an optional
parenthesized comma-separated list of selected properties, instance
annotations, functions, and actions,
@@ -36,7 +38,7 @@ path to a structural property of the entity,
segment containing the qualified name of a derived or implemented type
prefixed with a forward slash.
-Key values in the canonical path in `{entity-set}` and `{single-entity}` are represented in canonical form
+Key values in the canonical path in `{entity-set}`, `{single-entity}`, and `{entity}` are represented in canonical form
(parentheses-style) without percent-encoding.
The full grammar for the context URL is defined in
@@ -68,8 +70,9 @@ Context URL template:
{context-url}#{entity-set}
{context-url}#Collection({type-name})
-If all entities in the collection are members of one entity set, its
-name is the context URL fragment.
+If all entities in the collection are members of one (named or implicit)
+entity set, the context URL fragment is the canonical path `{entity-set}` to the
+entity set.
::: example
Example ##ex: resource URL and corresponding context URL
@@ -79,10 +82,6 @@ http://host/service/$metadata#Customers
```
:::
-If the entities are contained, then `{entity-set}` is the top-level entity
-set or singleton followed by the canonical path to the containment navigation
-property of the containing entity.
-
::: example
Example ##ex: resource URL and corresponding context URL for contained
entities
@@ -106,35 +105,32 @@ Context URL template:
{context-url}#{single-entity}
{context-url}#{type-name}
-If a response or response part is a single entity of the declared type
-of an entity set, the context URL fragment is the entity set's
-name with `/$entity` appended.
+If a response or response part is an entity of the declared type
+of a (named or implicit) entity set, the context URL fragment is the canonical path
+`{entity-set}` to the entity set with `/$entity` appended.
::: example
-Example ##ex: resource URL and corresponding context URL
+Example ##ex: resource URL and corresponding context URL for named entity set.
+Note the absence of the key predicate `(1)` in the context URL.
```
http://host/service/Customers(1)
http://host/service/$metadata#Customers/$entity
```
:::
-If the entity is bound to a contained entity set, then `{entity-set}` is the
-canonical path to the collection-valued containment navigation
-property of the containing entity.
-
::: example
Example ##ex: resource URL and corresponding context URL for contained
-entity
+entity (implicit entity set)
```
http://host/service/Orders(4711)/Items(1)
http://host/service/$metadata#Orders(4711)/Items/$entity
```
:::
-If the entity is the target of a single-valued containment navigation property,
-then the context URL fragment is the canonical path `{single-entity}`
-to the single-valued containment navigation
-property of the containing entity without `/$entity` appended.
+If a response or response part is an entity of the declared type of
+a single-valued containment navigation property,
+the context URL fragment is the canonical path `{single-entity}`
+to that navigation property without `/$entity` appended.
::: example
Example ##ex: resource URL and corresponding context URL for
@@ -191,7 +187,7 @@ Context URL template:
{context-url}#{entity-set}{/type-name}/$entity
-If a response or response part is a single entity of a type derived from
+If a response or response part is an entity of a type derived from
the declared type of an entity set, a type-cast segment is appended to
the entity set name.
@@ -260,11 +256,12 @@ Context URL templates:
{context-url}#{single-entity}{select-list}
{context-url}#{type-name}{select-list}
-If a single entity contains a subset of properties, the parenthesized
+If an entity contains a subset of properties, the parenthesized
comma-separated list of the selected defined or dynamic properties,
instance annotations, navigation properties, functions, and actions is
appended to the `{entity-set}` after an optional type-cast segment and
-prior to appending `/$entity`. If the response is not a subset of a
+prior to appending `/$entity`, or to the `{single-entity}`.
+If the response is not a subset of a
single entity set, the `{select-list}` is instead appended to the
`{type-name}` of the returned entity.
diff --git a/scripts/folding.html b/scripts/folding.html
index 2b925e7b..31ab642c 100644
--- a/scripts/folding.html
+++ b/scripts/folding.html
@@ -3,7 +3,7 @@
var page = location.href.match(/:\/\/.*?(\/.*?)(#|$)/)[1];
var folding = JSON.parse(localStorage.getItem(page) || "{}");
for (var id in folding) {
- var target = document.getElementById(id).parentElement.parentElement;
+ var target = document.getElementById(id)?.parentElement.parentElement;
if (target) {
if (folding[id]) target.removeAttribute("open");
else target.setAttribute("open", "");