The Path element in the view query definition file appends a new path segment to the current path fragment of the containing element.
The behavior of a Path element in a query is identical to that of a Relationship element, except that it does not initiate a new predicate in the XPath.
The Path element must be contained in a Relationship element or another Path element.
| Attribute | Description |
|---|---|
| name | The name of the path to append. The name attribute is optional. If you do not supply a name attribute, an empty path fragment is appended to the query. Note that if you want to append a relationship to the current path fragment, you supply only the relationship name as the value of the name attribute; the parent object type is used to determine whether or not the relationship is a containment relationship, and the corresponding XPath syntax is constructed automatically (see Example 3). |
| treat-as | Defines the specific type to be applied to the given path where the implicit type of the path is ambiguous. |
/WSRR/WSDLService[ports[@name=’mainPort’]]
Query
definition:<Query>
<ObjectType>WSDLService</ObjectType>
<Relationship name=”ports”>
<Target>
<Property name=”name” value=”mainPort”/>
</Target>
</Relationship>
</Query>
/WSRR/WSDLService/ports[@name=’mainPort’]
Query
definition:<Query>
<ObjectType>WSDLService</ObjectType>
<Path name=”ports”>
<Target>
<Property name=”name” value=”mainPort”/>
</Target>
</Path>
</Query>
/WSRR/WSDLService/ports[@name=’mainPort’]/binding(.)
Query
definition:<Query>
<ObjectType>WSDLService</ObjectType>
<Path name=”ports”>
<Target>
<Property name=”name” value=”mainPort”/>
<Path name=”binding”/>
</Target>
</Path>
</Query>