abdera-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andrei Filimonov <afilimo...@gmail.com>
Subject Specification support clarification
Date Wed, 08 Nov 2006 17:30:28 GMT

I'm working on example code for service document and stuck with the getting
workspace and collection titles. It appears there is a discrepancy in
specification support. E.g. javadoc for Workspace interfaces says:

 * <pre>
 *  The "app:workspace" element contains information elements about the
 *  collections of resources available for editing.  The app:workspace
 *  element MUST contain one or more app:collection elements.
 *  appWorkspace =
 *     element app:workspace {
 *        appCommonAttributes,
 *        attribute title { text },
 *        ( appCollection+
 *          &amp; extensionElement* )
 *     }

But if you look at the APP draft it is supposed to be:

   appWorkspace =
      element app:workspace {
         ( atomTitle
           & appCollection*
           & extensionElement* )

   atomTitle = element atom:title { atomTextConstruct }

The difference is that title is not an attribute but child node.
Implementation assumes that it is attribute and when I try to parse
following example from the draft:

8.1  Example

   <?xml version="1.0" encoding='utf-8'?>
   <service xmlns="http://purl.org/atom/app#"
       <atom:title>Main Site</atom:title>
           href="http://example.org/reilly/main" >
         <atom:title>My Blog Entries</atom:title>
            href="http://example.com/cats/forMain.cats" />
           href="http://example.org/reilly/pic" >
       <atom:title>Side Bar Blog</atom:title>
           href="http://example.org/reilly/list" >
         <atom:title>Remaindered Links</atom:title>
         <categories fixed="yes">
             term="joke" />
             term="serious" />

I get nulls for workspace title. The same problem is with collection titles
as well. If I change FOMWorkspace implementation to:

  public String getTitle() {
    //return getAttributeValue(ATITLE);
	  return getText(TITLE);

everything works as expected.


View this message in context: http://www.nabble.com/Specification-support-clarification-tf2596643.html#a7242948
Sent from the abdera-dev mailing list archive at Nabble.com.

View raw message