You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@abdera.apache.org by "David Calavera (JIRA)" <ji...@apache.org> on 2008/08/19 15:03:44 UTC

[jira] Closed: (ABDERA-198) Done't declare namespace correctly when calling addSimpleExtension(QName, String) many times to add a set of extension elements with same namespace.

     [ https://issues.apache.org/jira/browse/ABDERA-198?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

David Calavera closed ABDERA-198.
---------------------------------

    Resolution: Invalid

That code works fine in trunk. If you have to use 0.3.0 version I'm sure that the next code also works fine in that version:

IntegerElement items = feed.addExtension(OpenSearchExtensionFactory.ITEMS_PER_PAGE );
items.setText(itemsPerPage);
IntegerElement total = feed.addExtension(OpenSearchExtensionFactory.TOTAL_RESULTS );
total.setText(totalResults);
IntegerElement start = feed.addExtension(OpenSearchExtensionFactory.START_INDEX );
start.setText(startItem);

> Done't declare namespace correctly when calling addSimpleExtension(QName, String)  many times to add a set of extension elements with same namespace.
> -----------------------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: ABDERA-198
>                 URL: https://issues.apache.org/jira/browse/ABDERA-198
>             Project: Abdera
>          Issue Type: Bug
>    Affects Versions: 0.3.0
>            Reporter: machune
>
>  Code snapshot is as follows:
> final String OpenSearch_NS = "http://a9.com/-/spec/opensearch/1.1/";
>  final String Total_Results = "totalResults";
> final QName Total_Results_QN = new QName(OpenSearch_NS,"totalResults");
> final String Items_Per_Pages = "itemsPerPage";
> final QName Items_Per_Pages_QN = new QName(OpenSearch_NS,"itemsPerPage");
> final int Item_Num_Per_Pages = 200;
> Feed newFeed = new Abdera().newFeed();
> newFeed.addSimpleExtension(Total_Results_QN,String.valueOf(getEntriesCount()));
> newFeed.addSimpleExtension(Items_Per_Pages_QN,String.valueOf(Item_Num_Per_Pages));
> the result is:
> <feed xmlns="http://www.w3.org/2005/Atom">
> <totalResults xmlns="http://a9.com/-/spec/opensearch/1.1/">23</totalResults >
> <itemsPerPage>200</itemsPerPage>
> </feed>
> the element "itemsPerPage" has not correct namespace declaration.

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