/Docs/G/ProseObject-Stack/Cmacc_1.md
  Source views: Source JSON(ish) on GitHub (VSCode)   Doc views: Document (&k=Doc.r00t): Visual Print Technical: OpenParameters Xray
Rendering Documents
A File can be rendered into a text (the "Doc" view of the File).
  1. Rendering starts with a specific Key (currently "r00t") and expands its Value. Expansion is done by replacing any strings wrapped in {braces} (Variable).
  2. The replacement is based on matching the Variable name with the first matching Key name.
  3. The notion of "first" is based on the File. The first Key in the File (reading down from the top) is the first. If there is no Key that matches, then referenced Files are searched, in the order they appear (reading from the top), recursively, depth-first. The match of a Key in a referenced File is, of course, based on the "prefixed" Key (see the next two items).
  4. A [Path/Name_of_Another_File] is matched with a file path and name. The effect is as if the list of Key/Values in that File was copied into the current File.
  5. The only other feature is "prefixing." When referencing another File, the Key for the reference can be empty (see below in the source view of this File) or it can be a string (see 2.= in this File). If the Key has a string, then the string is added to the front of each Key and to the front of each Variable in the referenced File. This is chained, so that if a File3 uses a prefix "Buyer." when referencing File2, and File2 uses a prefix "CEO." when referencing File1, then each of the Keys in File1 is treated as being prefixed by "Buyer.CEO." This chaining can be as long as you want. When expanding a prefixed Variable, if no match is found, then the right-most prefixing link is removed and it is tried again. ("Buyer.") (This sounds complicated, but is extremely convenient and comports with our instincts the great majority of the time.)