(((meta (@ (content . "Encoding of Sz") (name . "title"))) (meta (@ (content . "manual") (name . "role"))) (meta (@ (content . "#api #manual #reference #zettelstore") (name . "tags"))) (meta (@ (content . "zmk") (name . "syntax"))) (meta (@ (content . "00001012920516 00001012931400 00001012931600") (name . "backward"))) (meta (@ (content . "1") (name . "box-number"))) (meta (@ (content . "(c) 2020-present by Detlef Stern ") (name . "copyright"))) (meta (@ (content . "20230403153903") (name . "created"))) (meta (@ (content . "00001006020000 00001007030000 00001007040000 00001007050000 00001012920516 00001012930000 00001012931200 00001012931400 00001012931600 00001012931800") (name . "forward"))) (meta (@ (content . "en") (name . "lang"))) (meta (@ (content . "EUPL-1.2-or-later") (name . "license"))) (meta (@ (content . "20240123120319") (name . "modified"))) (meta (@ (content . "20240123120319") (name . "published"))) (meta (@ (content . "public") (name . "visibility")))) (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 an 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") (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 it may produce an error.") (div (@ (class . "syntax")) (p (em "Unknown") " " (strong "=") " " (kbd "(UNKNOWN") " Object … " (kbd ")") ".")) (p "The list may only contain the symbol " (kbd "UNKNOWN") ", or additionally an unlimited amount of other objects.") (p "Similar, any symbol with the pattern " (kbd "**xyz:NOT-FOUND**") ", where " (kbd "xyz") " is any string, signals an internal error."))