Purple Number Identity
June 05, 2003
I sat down tonight to write something about PurpleNumbers, as I have several things I need to write for the 0.2 release of PurpleWiki. This is what came out. It fills a different, but similar, purpose to the coolness draft. (000103)
What is a purple number? (000104)
A purple number is an identifier unique to a document or set of documents used to indicate and provide direct access to segments of content in a document. (000105)
In practice a purple number identifies structural elements in a document such as headers, list items and paragraphs. When a new document is created or content is added to an existing document, the document is parsed to add identifiers where they are not already present. When a document is processed for presentation (usually, but not always, to HTML) these identifiers are used to create anchors and links in the document that can be used for later reference. (000106)
Purple number identifiers are known, for reasons of history, as node identifiers, or 'NIDs' for short. (000107)
In simple implementations NIDs are unique per document and may be generated per page, perhaps as a series of integers. More complex implementations create NIDs that are unique across a domain of documents. These NIDs are generated from a central sequencing source or service that provides the next available NID. If NIDs are paired with document identifiers (usually URLs) to create an index, references may be made by NID alone (some uses for this are described below). (000108)
When a document that has been processed to add NIDs is presented as HTML, the NIDs are shown as links (<a href>) to named anchors (<a name>) within a stable URL for the current document. In some current implementations these links are shown in a purple color (thus the name). (000109)
If the identifiers used are human readable (short, sensible), there are benefits to displaying the identifier as the text of the link: reference can be made to the identified segment of content in speech. When the identifiers are more complex a single character, such as the '#' popularized as a permanent link in some weblogs, has proven to work well. (00010A)
Current purple number implementations process text, wiki formatted text, or HTML to either specially formatted wiki text or HTML. The resulting wiki text or HTML embeds text containing the NIDs for each segment of the document. When HTML or wiki text that contains NIDs is reprocessed that text which has already been assigned a NID keeps it's existing NID and that text which is new gets the next NIDs provided by the sequencing service. If content is deleted, NIDs must not be reused as references to NIDs must be allowed to go stale when content is removed. (00010B)
HTML presentations of content with purple numbers adjusts the content in two ways to provide two different functions: the href provides the text of the URL that can be copied to make reference from other environments; the named anchor provides the location to which that reference points. The value of the name attribute of the anchor is the NID. (00010C)
When NIDs for a set of documents are created from the same central source and the NIDs are paired with the URLs of the document in which they are to be presented the resulting index can be used to remotely make reference to content by NID alone. This has several benefits: (00010D)
- Simplified URLs can be used to refer to content. (00010E)
- By updating the index, content addressed by NID can remain addressable even when moved to a new URL. (00010F)
- Content can be referenced and retrieved by NID and then easily parsed out of its context by NID. This allows for transclusion (include by reference rather than copy) of content from one document in another. (00010G)
There are several existing implementations of purple numbers. Some examples are: (00010H)
- PurpleWiki (00010I)
- A descendant of UseModWiki that supports purple numbers. Version 0.1 with support for document based NIDs has been released. Version 0.2 with multi-document NIDs, document authoring features (metadata management), more modular code and transclusion support is being developed. Update 2003/06/02: PurpleWiki 0.9.2, faster, better stronger, has been released to CPAN. (00010J)
- PurplePlugin (00010K)
- A MovableType plugin that uses PurpleWiki 0.2 to format entries with purple numbers, to support transclusions and to provide WikiBlog functionality to MovableType. (00010L)
- Mhonarc purple plugin (00010M)
- An addition to the mhonarc mail archiving system that provides purple numbers on mail messages. source, demo. (00010N)
- Purple ZWiki (00010O)
- Modifications to ZWiki to support purple numbers. demo. (00010P)
- PurpleSlurple (000111)
- A proxy system that adds purple numbers to existing HTML documents anywhere on the net. (000112)
- Purple (000113)
- A processing system for creating documents with purple numbers. source (000114)
See also: PurpleNumbers, PurpleWiki, PurplePlugin, TransClusion and the rest of the geek-glaxon category. (00010Q)
Comments
stuff, like. (00010Y)
1. if the purple number functions as an inline anchor, shoudn't they precede rather than follow the graf to which they cling, so that the physical placement of the link is transparent to the location of the target? Perhaps not, but I'm asking. (00010Z)
2. if the visible link preceded the graf, you might have the opportunity to use a traditional typographic sigil, such as a paragraph marker (¶), or section marker (§), or even combinations thereof based on CSS/XML (000110)