Prefixed S-expressions and Related Markup Techniques #6
AdamSobieski
started this conversation in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Introduction
What if S-expressions could be prefixed with symbols like
#and@to represent attributes and metadata of their parent elements?Mapping between Prefixed S-expressions and Markup
Using the
:symbol as XML does, what if the#symbol indicated that an S-expression was an attribute of its parent expression and the@symbol indicated that an S-expression was metadata, e.g., an annotation, for its parent expression?The S-expression, above, could be serialized to XML content resembling:
Above, the
x:mode="attribute"simple attribute and value signals that an element is an extended attribute of its parent element. While simple attributes allow only text-string values, extended attributes allow markup and other content to be used for attributes' values.Above, the
x:mode="metadata"simple attribute and value signals that an element is metadata of its parent element.Inclusions
Also, drawing inspiration from XML inclusions, perhaps the
*symbol could be of use for retrieving referenced S-expression content.Markup Examples
Using the above XML serialization for the indicated variety of S-expressions, a number of examples are indicated below, showing the usefulness of the expressiveness.
Outlines
The following examples intend to show that one could readily represent outlines with a format supporting extended attributes and metadata.
Starting with a simple representational skeleton:
one could add education-related metadata and use extended attributes to allow formats other than text strings for outline nodes' contents:
Above, the special element
<x:value>signals that a metadata or an attribute has a value of a type other than defaulttext/plaintext strings.Workflows
The following example intends to show that one could readily represent workflows with a format supporting extended attributes and metadata.
Abstract Syntax Trees
The following example intends to show that one could readily represent abstract syntax trees with a format supporting extended attributes and metadata.
Multipart Data
See also: #5
The
<x:value>special element, having ax:srcattribute, is well-suited for utilization within multipart MIME messages. Using RFC 2392'smid:andcid:URL schemes, data could be stored as other message parts and referenced by URL in messages' parts.Click here to toggle view of a multipart MIME message containing a part using these markup features.
The
<x:value>special element could, itself, be used to represent multipart data for content-negotiation scenarios, internationalization and localization scenarios, and other use-case scenarios.The following example shows a markup representation of some preliminary "MIME-LD" concepts, explored in greater detail in #5 .
Extensibility and MIME Headers
Drawing inspiration from the HTTP Vocabulary in RDF, the expressiveness to make use of an extensible, open-ended set of MIME headers could be provided for the
<x:value>special element.Artificial Intelligence Multimodal Chat Messages and Histories
See also: vCon,
ChatMessageContent,ChatHistoryComing soon.
Conclusion
What do you think about these ideas? Thank you.
All reactions