All of my comments are RefactorOk unless specified otherwise.
-
Home page/weblog: http://bitsko.slc.ut.us/
-
Email and jabber: ken@bitsko.slc.ut.us
Praise:
-
[BryantDurrell] +1 for massive wiki organizational work this Saturday -- thank you.
-
[JonathanSmith] +1 Super, Boopsie, Super!
-
[PhilWolff] +1 great wiki gardening, Ken. Thanks!
CategoryHomePage, CategoryWeblog
- CarrotVsOrangeDiscuss . . . . 17 matches
- ContentDiscussion . . . . 14 matches
- EscapedHtmlDiscussion . . . . 9 matches
- ContentProblems . . . . 6 matches
- PaceReformedContent . . . . 5 matches
- EchoInDublinCore . . . . 4 matches
- ElementsVsAttributes . . . . 4 matches
- PermaLinks . . . . 4 matches
- RestAspNetExample . . . . 4 matches
- SuperSimpleFeedFormat . . . . 4 matches
- XmlRpcDiscussion . . . . 4 matches
- WebDav . . . . 3 matches
- ContentAsElements . . . . 2 matches
- DublinCore . . . . 2 matches
- EchoExampleProcess . . . . 2 matches
- IsaCommentAnEntryDiscussion . . . . 2 matches
- MultipleContentDiscussion . . . . 2 matches
- PaceExtendedResourcePosting . . . . 2 matches
- PaceMinimalEntryVersioning . . . . 2 matches
- PaceSimplifiedFeedFormat . . . . 2 matches
- ProjectLegal . . . . 2 matches
- RelatedDiscussion . . . . 2 matches
- UseCases . . . . 2 matches
- VersionNo . . . . 2 matches
- AggregatorApi . . . . 1 match
- AggregatorApiArchived . . . . 1 match
- AlternativeRepresentation . . . . 1 match
- ApiFacets . . . . 1 match
- AtomArtwork . . . . 1 match
- AtomPubIssuesList . . . . 1 match
- AuthorElementDiscussion . . . . 1 match
- BloggerProposals . . . . 1 match
- CarrotVsOrange . . . . 1 match
- CommentAuthentication . . . . 1 match
- ComponentBlog . . . . 1 match
- ConceptualModel . . . . 1 match
- ContentNegotiation . . . . 1 match
- ContributorsList . . . . 1 match
- DateSurvey . . . . 1 match
- EchoApiContentOwnership . . . . 1 match
- EntryAccountability . . . . 1 match
- EntryIdentifier . . . . 1 match
- HelpOnLinking . . . . 1 match
- HowToFindAnEntry . . . . 1 match
- IDSurvey . . . . 1 match
- IetfVersusW3cVote . . . . 1 match
- IrcChannel . . . . 1 match
- License . . . . 1 match
- LinkingStyles . . . . 1 match
- MultipleSyntaxDiscussion . . . . 1 match
- NameFinalVote . . . . 1 match
- NameFinalVoteArchive . . . . 1 match
- NameItProposals . . . . 1 match
- NamespaceDiscussion . . . . 1 match
- NoToRdf . . . . 1 match
- NoneOfTheAboveDiscuss . . . . 1 match
- NumberOfAuthorsDiscussion . . . . 1 match
- PaSS . . . . 1 match
- PaceEntryTopLevel . . . . 1 match
- PaceEquivalents . . . . 1 match
- PaceItemLang . . . . 1 match
- PaceLinkParent . . . . 1 match
- PaceNoInfoSet . . . . 1 match
- PaceReduceMustMay . . . . 1 match
- PaceReformedContent3 . . . . 1 match
- PaceReformedContentRedux . . . . 1 match
- PaceSimpleContentType . . . . 1 match
- ParticipantsWeblogs . . . . 1 match
- PostIdAndPermaLinkRequired . . . . 1 match
- PropertiesVsRoles . . . . 1 match
- RestAndRpc . . . . 1 match
- RestEchoApiDiscuss . . . . 1 match
- RssHistory . . . . 1 match
- SchemaPatterns . . . . 1 match
- Security . . . . 1 match
- SiteAndSyndication . . . . 1 match
- SoapInOnePointAfter . . . . 1 match
- TimestampVsCreationDateTime . . . . 1 match
- WeblogLifeCycleApi . . . . 1 match
- WhatIsAnEntry . . . . 1 match
- XmlAndRdf . . . . 1 match
Content
<content>
-
Definition: Content is the body of an entry.
Comments: Content may be empty. Content can be of any media type, including multipart content. Content may be empty when other metadata elements provide the definition of the entry.
Examples:
<content type="application/xhtml+xml" xml:lang="en-us" rel="fragment"> <p xmlns="...">Hello, <em>weblog</em> world! 2 < 4!</p> </content>
<content type="audio/mpeg" src="http://example.org/blog/commentary.mp3" />
<content type="multipart/alternative">
<content type="image/jpeg" encoding="base64">
xo+Hello0AFWeblogh5FWorldh1mImagedsTbrVbF3
</content>
<content type="text/html" xml:lang="en-us" mode="escaped" rel="fragment">
<![CDATA[<p>Hello, <em>weblog</em> world! 2 < 4!</p>]]>
</content>
<content type="application/xhtml+xml" xml:lang="en-us" rel="fragment">
<p xmlns="http://www.w3.org/1999/xhtml">
Hello, <em>weblog</em> world! 2 < 4!</p>
</content>
</content>
content, ContentDiscussion, ContentAndPermalink, MultipleContentDiscussion, MimeContent, EscapedHtmlDiscussion, ContentProblems, ComponentBlog, AdaptiveBlogosphere
In a syndicated feed, "content" is the body of an entry a publisher chooses to share, for readers and aggregators to present to the user within the reader/aggregator. In a PieApi, "content" is the body being posted or retrieved. An entry may contain all sorts of content: text, images, audio, video, etc.
Media types (ne้ MIME types) can be used to distinguish between these various types of content.
-
By comparison, <link> is a reference to the entry in the context of the publisher's site, where the entry can be viewed in the publisher's style and with their site navigation. Readers and aggregators are not intended to use the link to "grab" content for display. See ContentAndPermalink.
Some content types are XML fragments from other XML formats, some developed for weblogging, groupware, or social software, some developed for other purposes. XML fragments are placed in <content>.
-
By comparison, some types of applications will merely define new properties for entries or feeds and place them directly as children of the <entry>, <feed>, or other entity elements. Those elements do not go in <content>.
'content' has the following attributes:
type
-
Definition: The
Comment: If used with 'src' is only advisory. Potentially also using URIs for identifying content types.
language
-
Definition: The language(s) of the value.
Comment: Defined by ISO 639, ISO 3166, RFC3066. If used with 'src' is only advisory.
mode
-
Definiton: The mode of encoding of the value, 'escaped' or 'base64'.
Comment: A mode attribute is used of the content value is not an XML fragment. New modes may be defined in the future and applications should ignore content with modes they don't recognize. Cannot be used with 'src'.
rel
-
Definition: 'rel' describes the relationship of the content. A space-separated list of link types.
Comment: Possible relations include 'fragment', 'excerpt', 'thumbnail', 'small', 'large', etc. In a multipart content, 'rel' can be used to select between content parts of the same media type for default presentation. 'fragment' is the relationship typically used for weblog entries with plain text or (X)HTML content that are not complete resource entities (no <html>, <head>, or <body>, in the case of (X)HTML).
KevinMarks - there is a key distinction missing here that needs specifying. A machine generated excerpt is very different from a human summary or abstract. A parser should be able to know the difference - this is a key flaw in current RSS. Similarly, knowing whether the content is an abstract or the full post is very important for human readers (who can usually tell machine truncated pieces). See ContentMustHaveRel for more.
value
-
Definition: The value of the content, embedded.
Comment: In XML, the value is the element content. Cannot be used with 'src'.
src
-
Definition: The value of the content, URI location reference.
Comment: Cannot be used with 'value' (XML content). The type, language, and length provided by the resolver of the URI takes precedence over those defined on 'content'.
length
-
Definition: The size of src data.
Comment: Advisory only.
The default mode of encoding is parsed-XML content and may consist of arbitrary XML elements and character data. escaped means the value consists of only XML character data, no special processing beyond that expected from that the content type, using either entity escaping or CDATA sections. base64 indicates that the value is encoded using Base64,
RFC2045, section 6.8.
'src' is a URI location reference to the content of this entry; it is not a reference to another resource that is the subject of or related to this entry. A reader may retrieve the value of the reference and later pass it embedded to another reader.
There is only one <content> element in an entry. Multipart media types (
RFC2046 section 5.1) can be used to represent alternatives (pick the best, with the publisher's best at the end), related (one or more are primary, the rest are used by reference), mixed (don't know which is primary or the publisher's best), and parallel (try to present all simultaneously, like an image and audio). Unknown multipart media types should be treated as mixed.
Entry <content> elements do not contain other feeds, entries, or comments. See Related for creating relationships between entries and other resources.
Content always refers to complete resource entities unless a 'rel' attribute is provided to indicate otherwise. It is common in syndicated feeds to only include an (X)HTML fragment as the content that forms the body of an entry. In that case, feed providers should use rel="fragment".
Examples
This is an example of using XHTML as a content value, parsed as XML (no 'mode' attribute).
<content type="application/xhtml+xml" xml:lang="en-us" rel="fragment"> <p xmlns="...">Hello, <em>weblog</em> world! 2 < 4!</p> </content>
In the following, the content is escaped. The value is a sequence of characters that the reader processes according to it's type.
<content type="text/html" xml:lang="en-us" mode="escaped" rel="fragment"> <![CDATA[<p>Hello, <em>weblog</em> world! 2 < 4!</p>]]> </content>
And is equivalent to:
<content type="text/html" xml:lang="en-us" mode="escaped" rel="fragment"> <p>Hello, <em>weblog</em> world! 2 &lt; 4!</p> </content>
What a reader does with "HTML in content" is based on the content type of the entry, there is no concept of "embedded markup". The value of content is a sequence of characters that the reader chooses to display according to the content type. See EscapedHtmlDiscussion.
A text/plain content:
<content type="text/plain" xml:lang="en-us"> <![CDATA[ Hello, _weblog_ world! 2 < 4! ]]> </content>
A image/jpeg content (not real data):
<content type="image/jpeg" encoding="base64"> xo+0AFh5Fh1mdsTbTRt781hrVbF3 </content>
An MPEG video included by reference:
<content type="video/mpeg" src="http://example.com/funny.mpeg" />
multipart/alternative
<content type="multipart/alternative">
<content type="image/jpeg" encoding="base64">
xo+Hello0AFWeblogh5FWorldh1mImagedsTbrVbF3
</content>
<content type="text/html" xml:lang="en-us" mode="escaped" rel="fragment">
<![CDATA[<p>Hello, <em>weblog</em> world! 2 < 4!</p>]]>
</content>
<content type="application/xhtml+xml" xml:lang="en-us" rel="fragment">
<p xmlns="http://www.w3.org/1999/xhtml">
Hello, <em>weblog</em> world! 2 < 4!</p>
</content>
</content>
