Christoph Dahlen created SLING-3671:
---------------------------------------

             Summary: Atom Taglib: tag attribute requirements to do not reflect 
standard's definition
                 Key: SLING-3671
                 URL: https://issues.apache.org/jira/browse/SLING-3671
             Project: Sling
          Issue Type: Improvement
          Components: Scripting
    Affects Versions: Scripting JSP-Atom-Taglib 1.0.0
            Reporter: Christoph Dahlen


The current 
[TLD|http://svn.apache.org/repos/asf/sling/trunk/contrib/scripting/jsp-taglib-atom/src/main/resources/META-INF/atom.tld]
 for the Atom taglib allows creating Atom Feeds that do not meet the standard's 
requirements.

Most simple example: 
{code:xml}
<atom:feed><atom:entry /></atom:feed>
{code}

will create the following output 
{code:xml}
<feed 
xmlns="http://www.w3.org/2005/Atom";><updated>2014-06-16T12:39:03.382Z</updated><entry
 /></feed>
{code}

This output fails to [validate|http://validator.w3.org/feed/] due to missing, 
but mandatory elements "id" and "title" for _feed_ and _entry_ and missing 
element "updated" for _entry_.

According to http://atomenabled.org/ the required elements for both 
[feed|http://atomenabled.org/developers/syndication/#requiredFeedElements] and 
[entry|developers/syndication/#requiredEntryElements] are:
* id
* title
* updated

Enforcing this requirements would require the following changes:
# make the "id" attribute required for _feed_ and _entry_ element
# either
## make the "updated" attribute required for _feed_ and _entry_ OR
## auto-compute the updated attribute for _entry_, as it is obviously done for 
the _feed_ element
# replace the "title" element by a "title" attribute for _entry_ and _feed_ and 
make it mandatory.

Comments on the feasibility are very welcome.



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Reply via email to