Each link belonging to a note (basic, text or web) is started as discrete 'link' tag. Note that aliases may have their own (intrinsic) basic links, but share text/web links (web links can only be created from $Text unless differently stored as URL-type attributes). Links use a subset of possible tag attributes
A basic link to another note:
<link name="prototype" sourceid="3176208968" sourcecreator="John Doe" sstart="-1" slen="0" style="0" destid="3197542267" destcreator="John Doe" />
A text link to a text target:
<link name="clarify" sourceid="3175851881" sourcecreator="John Doe" sstart="220" slen="13" style="0" destid="3175179052" destcreator="John Doe" dstart="0" dlen="12" />
A web link from $Text:
<link name="web reference" sourceid="3197539691" sourcecreator="John Doe" sstart="110" slen="7" style="0" destid="3162983401" destcreator="John Doe" URL="http://c-command.com/dropdmg/" target="new" />
name. The linkType name.
sourceid. $ID of the source item.
sourcecreator. $Creator for the source object.
sstart.
slen. The length (number of characters) in the link anchor counting from the start sstart offset within the source $Text. A value of -1 implies no anchor, such as for the start of basic links or the destination of most text links.
style. Purpose unknown. By observation, always '0', zero.
destid. $ID of the destination object
destcreator. $Creator for the destination object.
dstart. Optional - only used if there is a target anchor.
dlen. Optional - only used if there is a target anchor. The length (number of characters) in the link anchor counting from the start dStart offset within the destination $Text. A value of -1 implies no anchor.
URL. Only used for web links. The target URL, and the HTML href
tag attribute value to use on export.
class. Only used for web links, and then only used if populated. The HTML class
tag attribute value to use on export.
target. Only used for web links, and then only used if populated. The HTML target
tag attribute value to use on export.
title. Only used for web links, and then only used if populated. The HTML title
tag attribute value to use on export.