An identifier is a location-based reference for addressing elements in markdown documents. It consists of a file path and optionally an element name (fragment).
Distinction from Element ID:
file.md#element-name)Identifiers are used for writing relations in markdown and cross-referencing between elements. The system resolves identifiers to Element IDs during parsing for internal tracking and change detection. When an element is relocated to a different file or section, its identifier changes but its Element ID remains stable.
-Identifier
derivedFrom, verifiedBy, verify)"file.md#element-name""https://example.com"satisfiedBy, satisfy, trace)"../../core/src/diagrams.rs"/, it is considered relative to the git repository root folder./, it is considered relative to the path of the document in which it appears.Each identifier must uniquely reference either:
Assuming the project and a file exists at /path/to/project/documents/File1.md:
| Identifier | Resolves to | Type |
|---|---|---|
File2.md | project/documents/File2.md | InternalPath |
subfolder/File3.md | project/documents/subfolder/File3.md | InternalPath |
../File4.md | project/File4.md | InternalPath |
/project/File4.md | project/File4.md | InternalPath |
https://example.com | https://example.com | ExternalUrl |
../Requirments#element-name | project/Requirments#element-name | Identifier |
System recognises 2 kinds of identifier that may appear in documents and relations:
Both Simple identifier and link part of GitHub-style markdown identifier can be etiher internal internal paths or external links (eg. starting with known scheme eg. https://)
When parsing identifiers, both styles are nomarlized into the same form used internally by the system.
As part of normailization process, element names are converted to GitHub-style anchor link fragments which are internal identifer representations:
-).Plain file or element references, following the path resolution rules.
Examples:
file.md
Normalized to ‘
File with an element fragment in the document ‘
file.md#element name
Normalized to ‘
Relative path with an element fragment in the document ‘
../relative_path/file.md#element name
Normalized to ‘
Element name fragment only (within the same file) in the document ‘
#element name
Normalized to ‘
Relative path with the element fragment with special characters in the document ‘
path/file.md#My Element (Draft)
Normalized to ‘
Absolute path with the element fragment in any document:
/path/file.md#Elements
A valid GitHub-style Markdown link to a file or a fragment within a file. Identifier is considered the link part of the markdown link: everything inside ‘(identifier)’.
Once link part is obtained from GitHub-style Markdown link, it is following same rules for normalization as simple identifiers.
Examples:
[Specification](documents/specification.html)
Normalized to ‘
Fragment link in ‘
[My Element](documents/specification.html#my-element)
The #### Relations subsection specifies associations between elements, files, or other resources, forming the logical and dependency structure of the model.
The #### Relations subsection:
#### Relations header.The #### Relations subsection must be located within an element chunk.
Each element chunk can have at most one #### Relations subsection.
The #### Relations header marks the beginning of the subsection.
The #### Relations subsection must appear directly within an element chunk.
It must follow the ### header of the parent element and any preceding content.
*), with two spaces ( *) of indentation.* relationType: **identifier**
* dependsOn: [Element2](#element2)
[a-zA-Z]#### Relations
### My Element
This is the content of My Element.
#### Relations
* dependsOn: [Element2](#element2)
* relatedTo: [path/to/anotherFile.md/Section3](path/to/anotherFile.html#section3)
* uses: [file.html](file.html)
### API v2.0
Details about API version 2.0.
#### Relations
* satisfies: [documents/specification.md#API: v2.0](documents/specification.html#api-v20)
If the referenced element exists within the same file, the identifier can be a fragment only.
#### Relations
* extends: [Another Section](#another-section)
If the referenced file is located in a subfolder relative to the current document, use a relative path.
#### Relations
* derive: [subfolder/details.md#refined-section](subfolder/details.html#refined-section)
If the reference starts with /, it points to a file or element relative to the git repository root folder.
#### Relations
* verifiedBy: [/specifications.md#verification-steps](/specifications.html#verification-steps)
This element contains invalid relation entries.
#### Relations
* derivedFrom: [Element2](#element2)
* InvalidEntry
* : MissingRelationType
* trace: [path/to/file.html](path/to/file.html)
Identifiers are used in relations to reference files or specific elements within files. Examples:
Relation to a File:
#### Relations
* satisfiedBy: [documents/specification.html](documents/specification.html)
Relation to an Element:
#### Relations
* derivedFrom: [documents/specification.md/section one](documents/specification.html#section-one)
The system must validate relation usage according to these rules: