• No results found

PATHREF ELEMENT

APPENDIX I – REFERENCE: DATA MODEL XML SCHEMA

I.13 DATA TYPE FACETS

I.13.3 PATHREF ELEMENT

PathRef facets specify how a parameter can reference another parameter or object via a path name. The pathRef facet can only be specified for data types that are derived from string (i.e. string and its derived types).

Table 45 lists the attributes that are available within a pathRef element. Table 45 – DM pathRef attributes

Attribute Type Use Description

targetParent list of Path Names optional An XML list of path names that can

restrict the set of parameters and objects that can be referenced. If the list is empty (the default), then anything can be

referenced. Otherwise, only the immediate children of one of the specified objects can be referenced, A “{i}” placeholder in a path name acts as a wild card, and can therefore

reference multiple objects. Path names cannot contain explicit instance numbers. Each path name will follow the

requirements of Section A.2.3.4/TR-106 (with path name scope specified by the targetParentScope attribute).

targetParentScope One of: normal model object

optional Object/parameter path name scope.

Specifies the point in the naming hierarchy relative to which

targetParent applies (see Section A.2.3.4/TR-106).

normal: This is a hybrid scope which usually gives the desired behavior. If the targetParent path(s) begins with "Device" or "InternetGatewayDevice" then it is relative to the top of the naming hierarchy. If the targetParent

path(s) begins with a dot then it is relative to the Root or Service Object. Otherwise, the targetParent path(s) is relative to the current object.

model: The targetParent path(s) is relative to the Root or Service Object. object: The targetParent path(s) is relative to the current object.

The default is normal if not specified. Note – The preference is to omit this attribute and to set targetParent with a value that is formatted to imply a path scope.

targetType One of:

any parameter object single table row

optional Specifies the type of item that can be

referenced by targetParent (see Section A.2.3.7/TR-106).

any: Either a parameter or an object can be referenced.

parameter: Only a parameter can be referenced.

object: Any type of object can be referenced.

single: Only a single-instance object can be referenced.

(table) can be referenced.

row: Only a multi-instance object instance (table row) can be referenced. The default is any if not specified.

targetDataType One of:

any base64 boolean dateTime hexBinary integer int long string unsignedInt unsignedLong <named data type>

optional Specifies the valid data types for a

referenced parameter (see Section A.2.3.7/TR-106). Is relevant only when targetType is any or parameter. The default is any if not specified.

For named data types, see Section I.4. For primitive data types, see Section I.12. Note that any and integer are not valid parameter data types. They are included in order to support “can reference any data type” and “can reference any numeric data type”.

refType One of:

weak strong

required Specifies the type of reference (Section

A.2.3.6/TR-106).

If weak, the referenced parameter or object might not exist (e.g. referenced object was deleted by ACS). If strong, the referenced parameter or object will exist, otherwise the CPE will set the parameter to a null reference (see Section A.2.3.5/TR-106).

status One of:

current deprecated obsoleted deleted

optional The status of the pathRef element.

The values deprecated and obsoleted are as described in Section 2.2/TR-106; deleted indicates the element is no longer present in the current Data Model;

current indicates the element is present in the current Data Model.

The default is current if not specified. New elements are usually current, in which case this attribute can be omitted.

The following example defines a pathRef which can reference any parameter. This is a weak reference.

<pathRef refType="weak" targetType="parameter"/>

The following example defines a pathRef which can only reference a boolean-typed parameter. This example is similar to the previous except for the addition of the targetDataType attribute.

<pathRef refType="weak" targetType="parameter" targetDataType="boolean"/>

The following example defines a pathRef which can only reference an object instance (row) within the Bridge or VLAN tables. This is a strong reference. Note that the

targetParentScope attribute could have been omitted, since the targetParent’s path names start with a dot and therefore already imply that they are relative to the Root (or Service) Object.

<pathRef refType="strong"

targetParent=".Bridging.Bridge. .Bridging.Bridge.{i}.VLAN." targetParentScope="model"

targetType="row"/>

The following example defines a pathRef which can only reference a row in the Router table. This example differs from the previous in that the targetParentScope attribute has been omitted; however, since the targetParent attribute value starts with a dot, the target path name is relative to the Root Object by default.

<pathRef refType="strong"

targetParent=".Routing.Router." targetType="row"/>

The following example defines a pathRef which can only reference a row within the Profile table. Since the targetParentScope attribute is omitted, and the targetParent attribute value does not start with “Device” or “InternetGatewayDevice” or a dot, the target path name is relative to the current object by default.

<pathRef refType="strong"

targetParent="Profile." targetType="row"/>