PurpData-D16 === 14.05.28 DATA STRUCTURES OF XANADU® PURPLE (informal) Theodor H. Nelson, Founding Designer, Project Xanadu Note: “Xanadu” is a registered trademark of Project Xanadu. A xanadoc is built of content portions, or segments, brought from elsewhere. Even the content you yourself write is brought in from a separate file. We are only working with text content right now, and the content must be brought in from stabilized textfiles— “stabilized” meaning that we don’t expect it to be changed on the server where it lives. === THE TWO FILE TYPES (links not working yet) There are two file types in the current Xanadu— The .xanadoc file, which brings in the content, And the .xanalink files, each representing some connection or relation. The overall document, or xanadoc, is generated by a .xanadoc file. A .xanadoc file is a list of - portions of media content to assemble - free-standing links to bring in and apply to the content (xanalinks) The .xanadoc file pulls the content in, then pulls in the xanalinks to arrange the content. We don't have xanalinks working yet, so that makes it easier. Since we don't have xanalinks yet, the current OpenXanadu simply pulls the content in, but that's enough to show all the origins connected. === XANADOC FILE SPECIFICS [leaving out xanalinks] Today’s .xanadoc file is a listing of media content pointers, which we call xanapointers, each specifying a span of text to bring in. It looks like this-- FILENAME.xanadoc MediaContent = xanapointer MediaContent = xanapointer # Comment MediaContent = xanapointer ... where the phrase "MediaContent = " is the same each time, and each xanapointer is different. You may also put in comments, using the # (“hash-mark”) to indicate the beginning of a comment line, which is conventional in many programming languages. When we have a decent editor, there should be less need for comments. === THE XANAPOINTER, A MEDIA SELECTOR A xanapointer is an expression intended to fetch a consecutive segment of content. Each xanapointer specifies a set of media elements to bring in (currently, only spans of text). Each xanapointer tells - the type of content-- right now only text (8BIT, ASCII, UTF8) - where to start quoting-- how many character positions to step before taking content from the file - the length of the excerpt-- how many elements to take from the file - the network address (URL) of the source This puts into one expression everything needed to obtain the span of content-- TYPE,START,LENGTH,URL We separate these by commas. Example: UTF8,27,33,http://xanadu.com/PurpData-D16 should bring in the title of this document. (There are counting issuess to be resolved.) As additional media types are added, such as pictures and audio, instead of “start” and “length”, they will use timing (for audio) or subrectangles (for pictures). =30=