From: Joseph S. <acr...@io...> - 2003-02-25 12:57:16
|
On Tue, 25 Feb 2003, Joseph Ottinger wrote: actually, 2 things are fixed: what i was getting was <item/> what i should get is <li rdf:resource="uri"/> getAbout() seems to be empty. even when i used it first with the li tag, i got <li rdf:resource=""/> or <li/> (when EXML nicely ignored an attribute with a null value). again, if the about property isn't set by something, its empty and that's causing problems. My reading of the O'Reilly article is that the uri needs to be the same as the one in the Item tag, so why not use getLink in both?. The reason is that in RDF, the order of elements technically doesn't matter, unless the elements are wrapped in an rdf:Seq container. Even if RSS 1.0 were to specify that that the Item tags are in the right order, to be RDF compliant (which I need to work with existing RDF tools here @ my company), the Seq is all that matters in the order of things. Joe > Joe, the only issue with applying this patch is that I'm not sure what > it's solving. You're adding the item to the sequence, and the *main* > difference I see is that you're using the item LINK instead of the item > ABOUT data... and those should be the same reference. Am I missing > something? > > On Mon, 24 Feb 2003, Joseph Shelby wrote: > > > private void addItemsRef(Element channel, List is) { > > if(is!=null && is.size()>0) { > > Element items=channel.addElement("items"); > > Element seq=items.addElement("rdf", "Seq"); > > Iterator iter=is.iterator(); > > while(iter.hasNext()) { > > Item item=(Item)iter.next(); > > // addItem(seq, item, "resource"); > > Element li = seq.addElement("li"); > > li.setAttribute("rdf", "resource", item.getLink()); > > } > > } > > } > > > > that now follows the rdf:Seq->li syntax described by O'Reilly's > > page > > > > http://www.oreillynet.com/pub/a/network/2000/08/25/magazine/rss_tut.html?page=3 > > > > Joe > > > > --------------------------------------------------------- > Joseph B. Ottinger jo...@en... > http://enigmastation.com IT Consultant > > > > ------------------------------------------------------- > This sf.net email is sponsored by:ThinkGeek > Welcome to geek heaven. > http://thinkgeek.com/sf > _______________________________________________ > Rsslibj-developer mailing list > Rss...@li... > https://lists.sourceforge.net/lists/listinfo/rsslibj-developer > -- ------------------------------------------------------------------- Joseph Shelby mailto:acr...@io... http://www.celticdistrict.com/ http://www.io.com/~acroyear ------------------------------------------------------------------- |