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

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

    Resolution: Invalid

I know, I just show an alternative way to add opeanSearch elements properly 
with abdera 0.3.

Your code works fine with the development version, I get the next feed:

<feed 
xmlns="http://www.w3.org/2005/Atom";><id>http://example.com/opensearch+example</id><title
 type="text">QNames without 
prefix</title><updated>2008-08-20T09:27:36.585Z</updated><totalResults 
xmlns="http://a9.com/-/spec/opensearch/1.1/";>47</totalResults><itemsPerPage 
xmlns="http://a9.com/-/spec/opensearch/1.1/";>1</itemsPerPage></feed>

Thus, this is a problem that just affects to an older version and it shouldn't 
be a bug.

> 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.

Reply via email to