UserPreferences

PaceCategoryListing


Abstract

Provide a simple, extensible mechanism for retrieving a listing of available categories. (see examples)

Status

Proposal

Rationale

This meets the minimum requirement and is still extensible enough to meet much broader use cases.

Proposal

Add a new element definition to the Introspection doc:

  appInlineCategories =
    element app:categories {
      attribute fixed { 'yes' | 'no' }?,
      (atomCategory*)
    }

  appOutOfLineCategories = 
    element app:categories {
      attribute fixed { 'yes' | 'no' }?,
      attribute type { media-type }?,
      attribute href { atomURI },
      (empty)
    }

  appCategories = appInlineCategories | appOutOfLineCategories

The "fixed" attribute indicates whether or not the listing of categories is a fixed, or closed set. If missing, default is "no"

The format of the representation identified by the href attribute is specified by the type attribute. No standard format for out of line category lists is defined.

Modify the service, workspace and category elements to include zero or more categories element.

appService =
   element app:service {
      appCommonAttributes,
      ( appWorkspace+
        & appCategories*
        & extensionElement* )
   }

appWorkspace =
   element app:workspace {
      appCommonAttributes,
      attribute title { text },
      ( appCollection+
        & appCategories*
        & extensionElement* )
   }

appCollection =
   element app:collection {
      appCommonAttributes,
      attribute title { text },
      attribute href { text },
      ( appMemberType
        & appCategories*
        & extensionElement* )
   }

Examples

Simple fixed-set of categories listed in-line

<service>
  <workspace ...>
    <collection ...>
      <member-type>entry</member-type>
      <categories fixed="yes">
        <atom:category scheme="http://example.org/" term="foo" />
        <atom:category scheme="http://example.org/" term="bar" />
      </categories>
    </collection>
  </workspace>
</service>

Extended open-set, out-of-line, dmoz categories example

<service>
  <workspace ...>
    <collection ...>
      <member-type>entry</member-type>
      <!-- client would have to understand the dmoz structure to use this -->
      <categories type="application/rdf+xml" href="http://rdf.dmoz.org/rdf/structure.rdf.u8.gz"/>
    </collection>
  </workspace>
</service>

What if someone wants to do APP-based category management?

<service>
  <workspace ...>
    <collection title="Main Blog with Open Category Set">
      <member-type>entry</member-type>
      <categories fixed="no" type="application/atom+xml" href="http://example.org/categories"/>
    </collection>
    <collection title="Side Blog with Fixed Category Set">
      <member-type>entry</member-type>
      <categories fixed="yes" type="application/atom+xml" href="http://example.org/categories" />
    </collection>
    <collection title="categories" href="http://example.org/categories">
      <member-type>entry</member-type>
    </collection>
  </workspace>
</service>


CategoryProposals