((p "Zettel in a " (a ((href . "00001012920516")) "Sz encoding") " are represented as a " (a ((href . "00001012930000")) "symbolic expression") "." " " "To process these symbolic expressions, you need to know, how a specific part of a zettel is represented by a symbolic expression.") (p "Basically, each part of a zettel is represented as a list, often a nested list." " " "The first element of that list is always a unique symbol, which denotes that part." " " "The meaning / semantic of all other elements depend on that symbol.") (h2 ((id . "zettel")) "Zettel") (p "A full zettel is represented by a list of two elements." " " "The first elements represents the metadata, the second element represents the zettel content.") (div ((class . "syntax")) (p (em "Zettel") " " (strong "=") " " (kbd "(") " " (a ((href . "#metadata")) (em "Metadata")) " " (a ((href . "#content")) (em "Content")) " " (kbd ")") ".")) (h2 ((id . "metadata")) "Metadata") (p "Metadata is represented by a list, where the first element is the symbol " (kbd "META") "." " " "Following elements represent each metadatum" (sup ((id . "fnref:1")) (a ((class . "zs-noteref") (href . "#fn:1") (role . "doc-noteref")) "1")) " of a zettel in standard order.") (p "Standard order is: " (a ((href . "00001006020000#title")) "Title") ", " (a ((href . "00001006020000#role")) "Role") ", " (a ((href . "00001006020000#tags")) "Tags") ", " (a ((href . "00001006020000#syntax")) "Syntax") ", all other " (a ((href . "00001006020000")) "keys") " in alphabetic order.") (div ((class . "syntax")) (p (em "Metadata") " " (strong "=") " " (kbd "(META") " " (a ((href . "00001012931200")) (em "Metadatum")) " … " (kbd ")") ".")) (h2 ((id . "content")) "Content") (p "Zettel content is represented by a block.") (div ((class . "syntax")) (p (em "Content") " " (strong "=") " " (a ((href . "#block")) (em "Block")) ".")) (h3 ((id . "block")) "Block") (p "A block is represented by a list with the symbol " (kbd "BLOCK") " as the first element." " " "All following elements represent a nested " (a ((href . "00001007030000")) "block-structured element") ".") (div ((class . "syntax")) (p (a ((id . "block-1")) (em "Block")) " " (strong "=") " " (kbd "(BLOCK") " " (a ((href . "00001012931400")) (em "BlockElement")) " … " (kbd ")") ".")) (h3 ((id . "inline")) "Inline") (p "Both block-structured elements and some metadata values may contain " (a ((href . "00001007040000")) "inline-structured elements") "." " " "Similar, inline-structured elements are represented as follows:") (div ((class . "syntax")) (p (em "Inline") " " (strong "=") " " (kbd "(INLINE") " " (a ((href . "00001012931600")) (em "InlineElement")) " … " (kbd ")") ".")) (h3 ((id . "attribute")) "Attribute") (p (a ((href . "00001007050000")) "Attributes") " may be specified for both block- and inline- structured elements." " " "Attributes are represented by the following schema.") (div ((class . "syntax")) (p (em "Attribute") " " (strong "=") " " (kbd "(") " " (strong "[") " " (a ((href . "00001012931800")) (em "AttributeKeyValue")) " … " (strong "]") " ')'.")) (p "Either, there are no attributes." " " "These are specified by the empty list " (kbd "()") "." " " "Or there are attributes." " " "In this case, the first element of the list must be the symbol " (kbd "quote") ": " (kbd "(quote") " " (kbd "(") " A" (sub "1") " A" (sub "2") " … A" (sub "n") " " (kbd ")") (kbd ")") ".") (h2 ((id . "other")) "Other") (h3 ((id . "unknown")) (kbd "UNKNOWN")) (p "A list with " (kbd "UNKNOWN") " as its first element signals an internal error during transforming a zettel into the Sz encoding." " " "It may be ignored or may result in an error.") (div ((class . "syntax")) (p (em "Unknown") " " (strong "=") " " (kbd "(UNKNOWN") " Object … " (kbd ")") ".")) (p "The list may only contain the symbol " (kbd "UNKNOWN") ", or, in addition, an unlimited amount of other objects.") (h3 ((id . "xyz-not-found")) (kbd "**xyz:NOT-FOUND**")) (p "Any symbol with the pattern " (kbd "**xyz:NOT-FOUND**") ", where " (@L (@H "“") (kbd "xyz") (@H "”")) " is any string, signals an internal error.") (h3 ((id . "splice-nodes")) (kbd "*SPLICE-NODES*")) (p "A list with " (kbd "*SPLICE-NODES*") " as its first element may occur during internal processing." " " "It signals that some processing routine intends to return more than one object instead of just one " (a ((href . "00001012931400")) (em "BlockElement")) " or one " (a ((href . "00001012931600")) (em "InlineElement")) "." " " "The elements of such a list should be " (@L (@H "“") "spliced" (@H "”")) " into the parent list.") (h3 ((id . "nil-or")) "NIL (or " (kbd "()") ")") (p "Analogous to a splice node, which signal that more than one values is about to be returned, a " (@L (@H "“") "NIL" (@H "”")) " value (denoted as " (@L (@H "“") (kbd "()") (@H "”")) ") signals that no object should be returned." " " "Therefore, a " (a ((href . "00001012931400")) (em "BlockElement")) " or an " (a ((href . "00001012931600")) (em "InlineElement")) " may be " (@L (@H "“") "NIL" (@H "”")) "."))