Mirror of the Rel4tion website/wiki source, view at <http://rel4tion.org>
Clone
HTTPS:
git clone https://vervis.peers.community/repos/yEzqv
SSH:
git clone USERNAME@vervis.peers.community:yEzqv
Branches
Tags
04-id-ref.mdwn
[[!meta title=“4.2.4 | Identifier References”]]
Identifier References
Statement components can refer to identifiers of other statements using identifier references, or IDrefs. An IDref begins with an exclamation mark (!
), followed by an offset specification as described in the Concept section. The offsets count individual statements, not blocks.
It’s possible to refer to the identifier of a statement even if it’s not specified directly in the file. In that case it refers to the identifier that would be generated when processing the file. Remember that not specifying the statement identifier is the same as specifying <%>
.
An IDref can be used only as a subject or an object.
Example:
<%> smaoin:type myns:Person
myns:age 34
myns:height 170
!^3 myns:stated_by $^
!^3 myns:stated_by $^^
!^3 myns:stated_by $^^^
There are 6 statements here. The first 3 describe a person. The next 3 state that the first 3 were stated by that person herself/himself. While all the BSrefs point to the subject of the first block, each IDref points to the identifier of the 3rd statement preceding it.
Another way to express the same information could be:
<%> smaoin:type myns:Person
myns:age 34
myns:height 170
myns:states !^3
!^3
!^3