[ 
https://issues.apache.org/jira/browse/ABDERA-213?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12705737#action_12705737
 ] 

James M Snell commented on ABDERA-213:
--------------------------------------

Fix is implemented and will be committed once access to svn.apache.org has been 
restored.

> Abdera not outputting correct namespace for <atom:link/> element in service 
> documents
> -------------------------------------------------------------------------------------
>
>                 Key: ABDERA-213
>                 URL: https://issues.apache.org/jira/browse/ABDERA-213
>             Project: Abdera
>          Issue Type: Bug
>    Affects Versions: 0.4.0
>         Environment: Windows XP Pro; IBM JRE 1.5; IBM XLXP 1.1.1 STAX 
> implementation.
>            Reporter: Michael Ahern
>            Priority: Blocker
>             Fix For: 0.4.0
>
>
> When outputting a set of <atom:link> elements inside a service document, the 
> first element has the correct namespace while subsequent elements do not.
> Here is my output:
> <?xml version="1.0" encoding="UTF-8"?>
> <service xmlns:atom="http://www.w3.org/2005/Atom"; 
> xmlns="http://www.w3.org/2007/app";>
>   <generator xmlns="http://www.w3.org/2005/Atom"; version="2.5.0" 
> uri="http://www.ibm.com/xmlns/prod/sn";>Lotus Connections - 
> Profiles</generator>
>   <workspace xmlns="http://www.w3.org/2007/app";>
>     <title xmlns="http://www.w3.org/2005/Atom"; type="text">MICHAEL I. 
> AHERN</title>
>     <collection xmlns="http://www.w3.org/2007/app"; 
> href="http://ahernmt60.dyn.webahead.ibm.com:9080/profiles/atom/profile.do?email=ahernm%40us.ibm.com&amp;output=vcard";>
>       <title xmlns="http://www.w3.org/2005/Atom"; type="text">MICHAEL I. 
> AHERN</title>
>       <userid 
> xmlns="http://www.ibm.com/xmlns/prod/sn";>ab41d440-773f-1029-9e32-882a644e52b4</userid>
>       <editableFields>
>          ....
>       </editableFields>
>     </collection>
>     <link xmlns="http://www.w3.org/2005/Atom"; 
> href="http://ahernmt60.dyn.webahead.ibm.com:9080/profiles/atom/profileTags.do?targetKey=0a98ecd7-596d-4daf-8ace-e877bf24a6dc&amp;lastMod=1231178866875";
>  rel="http://www.ibm.com/xmlns/prod/sn/tag-cloud"; 
> type="application/atomcat+xml"></link>
>     <link 
> href="http://ahernmt60.dyn.webahead.ibm.com:9080/profiles/atom/connections.do?connectionType=colleague&amp;key=0a98ecd7-596d-4daf-8ace-e877bf24a6dc&amp;lastMod=1231178866875";
>  rel="http://www.ibm.com/xmlns/prod/sn/connections/colleague"; 
> type="application/atom+xml"></link>
>     <link xmlns:snx="http://www.ibm.com/xmlns/prod/sn"; 
> href="http://ahernmt60.dyn.webahead.ibm.com:9080/profiles/atom/profileExtension.do?key=0a98ecd7-596d-4daf-8ace-e877bf24a6dc&amp;extensionId=profileLinks&amp;lastMod=1231178866875";
>  rel="http://www.ibm.com/xmlns/prod/sn/ext-attr"; type="text/xml" 
> snx:extensionId="profileLinks"></link>
>     <link xmlns:snx="http://www.ibm.com/xmlns/prod/sn"; 
> href="http://ahernmt60.dyn.webahead.ibm.com:9080/profiles/atom/profileExtension.do?key=0a98ecd7-596d-4daf-8ace-e877bf24a6dc&amp;extensionId=tieline&amp;lastMod=1231178866875";
>  rel="http://www.ibm.com/xmlns/prod/sn/ext-attr"; type="text/plain" 
> snx:extensionId="tieline"></link>
>     <link xmlns:snx="http://www.ibm.com/xmlns/prod/sn"; 
> href="http://ahernmt60.dyn.webahead.ibm.com:9080/profiles/atom/profileExtension.do?key=0a98ecd7-596d-4daf-8ace-e877bf24a6dc&amp;extensionId=lifestory&amp;lastMod=1231178866875";
>  rel="http://www.ibm.com/xmlns/prod/sn/ext-attr"; type="text/html" 
> snx:extensionId="lifestory"></link>
>   </workspace>
> </service>
> And here is the code to generate this:
> sw.startDocument();           
>               
>               sw.startService();
>               //sw.writeAttribute(XMLNS_ATOM, NS_ATOM);
>               
>               sw.writeGenerator("2.5.0",NS_SNX,"Lotus Connections - 
> Profiles");
>               sw.startWorkspace();
>               sw.writeTitle(bean.userRecord.getDisplayName()); // 
> ResourceManager.getString(request.getLocale(), "lc.author")
>                                               
>               sw.startCollection(getProfileUrl(request,true));        // 
> START - Collection
>               sw.writeTitle(bean.userRecord.getDisplayName());
>               sw.writeAccepts();
>               
>               // Stuff for ST support
>               
> sw.startElement(AtomGenerator2.QN_USERID).writeElementText(bean.userRecord.getUserid()).endElement();
>               
>               sw.startElement(QN_EDITABLE_FIELDS);
>               {
>                      // ...
>               }
>               sw.endElement();                                // END - 
> QN_EDITABLE_FIELDS
>               sw.endCollection();                             // END - 
> Collection
>               
>               //
>               // Write various links
>               //
>               String profilesUrl = FeedUtils.getProfilesURL(request);
>               Date profileLastMod = bean.userRecord.getLastUpdate();
>               
>               // link to tag cloud
>               sw.writeLink(
>                       
> FeedUtils.calculateTagCloudUrl(bean.userRecord.getKey(), profilesUrl, 
> profileLastMod),
>                       LINK_REL_TAG_CLOUD, APP_MIME_TYPE);
>               
>               // link to colleagues
>               sw.writeLink(
>                       
> FeedUtils.calculateColleaguesConnectionsUrl(bean.userRecord.getKey(), 
> profilesUrl, profileLastMod),
>                       LINK_REL_COLLEAGUE_CONNECTIONS, ATOM_MIME_TYPE);
>               
>               // links to extension attributes
>                // ....
>               
>               sw.endWorkspace();              
>               sw.endService();
>               
>               sw.endDocument();

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to