Thinking XML: Using Atom Format Chain News & Other Content

xiaoxiao2021-03-06  14

Thinking XML: Using Atom Format Chain News & Other Content

English original

English original

content:

Create a web resource atom discovery Atom to conclude reference information about the author's evaluation

related information:

RSS for Python from remote RSS file capture title Web service dream

Originally used as RSS alternative, Atom evolved into the core of conference web

Level: primary

Ucher ogbuji (uche.ogbuji@fourtHough.com) Chief Consultant, FourtHough, Inc. 2004 May

There are always some sites to provide a series of articles, events, and other records for sharing and cross-references. As the Web is a large part of the session, many people in the community come together to develop a XML-based standard for such exchanges and cross-references. Atom is the crystallization of these efforts, which is a format and API for swaping web metadata. Uche ogbuji introduced Atom in this article. Please in this article

Discussing the forum and sharing your ideas for this article with author and other readers.

The battle between RSS is known in the XML community. Netscape puts this lightweight format together for chain, which is gathered in the portal to the portal. Since this low-key starting point, even the meaning of this abbreviation is also controversial. WebLogs and next-generation portals have made the exchange of Web resources into a general and important phenomenon. Various genre RSS ruled the world of metadata exchange, and there is no risky RSS dispute. A well-known technical expert who has been involved in this conflict is the Sam Ruby of IBM Emerging Technology Group. In the mid-2003 mid-term, RRS proposed by experts and users in all aspects of the related chain formats jointly developed the next generation format. Part of the purpose is to establish a standard that takes into account various factions, order the RSS dispute. Another goal is to establish a more complete design to replace different RSS style. According to the practical design of many RSS users, this practical design is compromised, so that new formats are consistent with the WEB architecture and cultural coordination. A large number of developers and authors will join the project, which is obviously disappointed because there is no endless smoke and conspiracy in RSS, which expects a new solution to the technical problems discussed. The project is initially referred to as ECHO, but is renamed atom due to trademark issues. As at the Atom Wiki claims, the project is to establish a "Specification for Chain, Archive, and Edit Patient Sites". I think that the definition feature in the ATOM treatment is not only a Web site that naturally breaks down into a plot, but also the Web site that has session nature in interaction with other sites. The plot tend to have a cross index of similar entities on other sites, and atom is to bond this type of exchange. Atom has a lot of reasons, the most prominent point is that although as a community specification, as the result of the most huge organized committee, it remains simply. Atom includes Syndication Format Specification (currently 0.3 version, draft), which is an XML format that represents web resource information; and API Specification (current 0.9 version), based on HTTP retrieval and modify the Web Some of the conventions of resource information. Although there is currently only the API specification is officially submitted to the Internet Engineering Task Force (IETF), both of the specifications are written in the format of Internet Draft, in order to eventually become RFC standards. In addition to XML syntax, Atom has developed RDF in the WEB ONTOLOGY LANGUAGE (OWL). The introduction of Atom is mainly placed on the XML format specification, but will also involve the API in the appropriate place. All ATOM specifications are still actively developed, which may also change before standardization, although the basic Atom style is likely to constantly. Create a web resource assumes that you want to create a Web magazine of a galley, called Stanza Web. You can use Atom update sites to list new poems, articles, and other albums, collect information from related other sites. The first step to do is to upload a popular reader's article. To this end, the Atom API specifies that the content is packaged in an XML document consisting of Atom Entry elements, and the document is sent to a web server on a particular URI Posturi as an HTTP POST message. Listing 1 is a such XML document. Listing 1. Send to Posturi to create an atport atom entry

Welcome to Stanza Web </ Title></p> <p><author></p> <p><name> uche ogbuji </ name></p> <p><! - May Also Contain A URL AND E-mail Address -></p> <p></ author></p> <p><link rel = "alternate" type = "text / html"</p> <p>href = "http://stanzaweb.Art/2004-06-01/welcome" /></p> <p><! - TIME IN UTC -></p> <p><modified> 2004-06-01T10: 11: 12Z </ modified></p> <p><Content Type = "Application / XHTML XML" XML: Lang = "En"></p> <p><div class = "article" xmlns = "http://www.w3.org/1999/xhtml"></p> <p><p> Welcome to</p> <p><a href="http://stanzaweb.Art/"> Stanza Web </a>.</p> <p>Come back offen to keep track of the best in modern poetry.</p> <p></ p></p> <p><p> this site is powerful by</p> <p><a href="http://atomenabled.org"> Atom </A></p> <p></ p></p> <p></ div></p> <p></ content></p> <p></ entry></p> <p>All elements in the Atom format must be in the namespace http://purl.org/atom/ns#, or in an external namespace that has not been set based on the extension rule. The Entry element must contain the following sub-elements:</p> <p>LinkModifiedEntry with Alternate relationships can also contain other elements, such as ID, Contributor, and Content, which usually appear when positioning Posturi, just like this. All of these entry information is very obvious when the server sends information about the existing resources to the customer, but the role of each element is not clear in the specification when positioning Posturi. Title and Author elements are probably used to set relevant metadata when creating resources. The modified element provides the server how to give the entries time stamp, although if the resource timestamp is set according to the server policy instead of the submitter, the server should respond to this situation without a clear specification. Link probably tells the server how to construct URI for the resource of the created, and what INTENET media type is specified for the representation of the resource (at least one), although this will cause more demanding strategic issues. Content elements may be used to establish the body of the created resource. The content can even be a binary form, and all the capabilities of MIME can be used. In this example, the content is set to XHTML DIV. If the uploaded resources will eventually be combined with a larger web page - it is a very common situation inWeblog - this is a good way. In other cases, it may be reasonable to send a complete XHTML document (the root element is HTML) in the content. Of course, other content formats are also fully valid, such as HTML, normal text, or even images or audio files. If you want to do this, you must ensure that you have set a variety of different media type properties. Atom finds a welcome page on the new website now, you want to have the same hobby to find it. Some people may want to put your Atom chain information on their own website. Some people want to comment on your message. In order to enable Atom to implement such functions, you can update the Web site and add some special ATOM dedicated links in the HTML header. The HTML fragment in Listing 2 illustrates the usage of these links. Listing 2. HTML heads used to discover the link <HTML> in the Atom related URI</p> <p><HEAD></p> <p><title> Stanza Web </ Title></p> <p><link rel = "service.post" type = "application / x.atom XML"</p> <p>href = "http://stanzaweb.art/atom-post"</p> <p>Title = "Stanza Web" /> <link rel = "service.feed" type = "Application / x.atom XML"</p> <p>href = "http://stanzaweb.art/atom-feed"</p> <p>Title = "Stanza Web" /></p> <p></ hEAD></p> <p><body> ... </ body></p> <p></ html></p> <p>In Listing 2, the first LINK element (red) has a contact value service.post provides posturi of the entire site, usually used to create new articles. Pages of different articles are likely to have different Posturi links to establish comments in that article. It may have a link rel = "service.edit", providing an edituri. Send an HTTP GET message to this URI to get the representation of the edit, and then use the HTTP POST to send updated content. The second LINK element (blue) has a contact value service.feed, providing feeduri. ATOM customers can send HTTP GET requests to retrieve intact Atoms. There is no direct processing of security issues in the Atom API specification, but it is expected that support for various Atom API operations based on HTTP authentication. ATOM is ideally ideally, the reader will come to Stanza Web, read the article and decide whether it will come back and see. They can then let Atom tools point to this site to read their Atom Feeduri. At any time, you can access the feeduri search site to summary, usually represents the latest or changed metadata. Listing 3 gives an offer in an ATOM format. Listing 3. Full ATOM feed from Feeduri <? XML Version = "1.0" eNCoding = "UTF-8"?></p> <p><feed version = "0.3" xmlns = "http://purl.org/atom/ns#"></p> <p><title> schema Web </ title></p> <p><link rel = "alternate" type = "text / html"</p> <p>href = "http://stanzaweb.Art/" /></p> <p><modified> 2004-06-01T10: 11: 12Z </ modified></p> <p><author></p> <p><name> uche ogbuji </ name></p> <p></ author></p> <p><entry xmlns = "http://purl.org/atom/ns#"></p> <p><Title> Welcome to Stanza Web </ Title></p> <p><author></p> <p><name> uche ogbuji </ name></p> <p></ author></p> <p><link rel = "alternate" type = "text / html"</p> <p>href = "http://stanzaweb.Art/2004-06-01/welcome" /></p> <p><modified> 2004-06-01T10: 11: 12Z </ modified></p> <p><Content Type = "Application / XHTML XML" XML: Lang = "En"></p> <p><div class = "article" xmlns = "http://www.w3.org/1999/xhtml"></p> <p><p> Welcome to</p> <p><a href="http://stanzaweb.Art/"> Stanza Web </a>.</p> <p>Come Back often to Keep Track of The Best in Modern Poetry. </ P></p> <p><p> this site is powerful by</p> <p><a href="http://atomenabled.org"> Atom </A></p> <p></ p></p> <p></ div></p> <p></ content></p> <p></ entry></p> <p></ feed></p> <p>The topmost element is Feed, which includes the Entry element of the new article. The other child elements of Feed convey the metadata about the entire site. LINK with rel = "alternate" type = "text / html" is an alternative to give a read representation of the site. Atom tools can also use the Modified element to determine when the new content of the site is increased. Conclusion The ATOM specification requires a lot of work, and there are still some shortcomings, such as the content of the personal URL with elements, not attribute. There is still a sufficient time to correct these issues before Atom finally become a standard. There are several experimental ATOM implementations, and if you can contribute your talents, Atom communities are very open. Don't forget, if this article causes your attention, please submit your ideas on the Thinking XML discussion forum. Reference</p> <p>Take a look at the Atom Home and Atom Wiki, it is still a focus of the community. On the Atom page, you can track the latest developments in Atom Syndication Format and Atom API. Please read the proposal of ATOM in the OWL format maintained by Danny Ayers. For more information on Atom, please see:</p> <p>Eric Van Der Vlist's "Building a Semantic Web Site" Ucher Ogbuji and Mike Olson written "DEVELOPERWORKS, November 2002) Nicholas Chase" Get Title "from Remote RDF files" April 2002) Nicholas Chase written "Crawling the title from the remote RSS file" (developerWorks, Sep 2003). In the "Web Service Dreamster" (DeveloperWorks, June 2003) written in Robert McMillan, you can further understand the energetic Sam Ruby, and he first launched an Atom Research Program. In the developerWorks XML zone, you can find more information about XML, including the Thinking XML column for previous articles. If you want to comment on this article, please submit to the Thinking XML Forum. Various books on XML can be found at the developerWorks Developer Bookstore. Subscribe to the developerWorks You can develop and test your XML app with the latest IBM tools and middleware: you can get IBM's WebSphere, DB2, Lotus, Rational, and Tivoli software, and 12 months of license, these are expected than you. More cheaper.</p></div><div class="text-center mt-3 text-grey"> 转载请注明原文地址:https://www.9cbs.com/read-49486.html</div><div class="plugin d-flex justify-content-center mt-3"></div><hr><div class="row"><div class="col-lg-12 text-muted mt-2"><i class="icon-tags mr-2"></i><span class="badge border border-secondary mr-2"><h2 class="h6 mb-0 small"><a class="text-secondary" href="tag-2.html">9cbs</a></h2></span></div></div></div></div><div class="card card-postlist border-white shadow"><div class="card-body"><div class="card-title"><div class="d-flex justify-content-between"><div><b>New Post</b>(<span class="posts">0</span>) </div><div></div></div></div><ul class="postlist list-unstyled"> </ul></div></div><div class="d-none threadlist"><input type="checkbox" name="modtid" value="49486" checked /></div></div></div></div></div><footer class="text-muted small bg-dark py-4 mt-3" id="footer"><div class="container"><div class="row"><div class="col">CopyRight © 2020 All Rights Reserved </div><div class="col text-right">Processed: <b>0.049</b>, SQL: <b>9</b></div></div></div></footer><script src="./lang/en-us/lang.js?2.2.0"></script><script src="view/js/jquery.min.js?2.2.0"></script><script src="view/js/popper.min.js?2.2.0"></script><script src="view/js/bootstrap.min.js?2.2.0"></script><script src="view/js/xiuno.js?2.2.0"></script><script src="view/js/bootstrap-plugin.js?2.2.0"></script><script src="view/js/async.min.js?2.2.0"></script><script src="view/js/form.js?2.2.0"></script><script> var debug = DEBUG = 0; var url_rewrite_on = 1; var url_path = './'; var forumarr = {"1":"Tech"}; var fid = 1; var uid = 0; var gid = 0; xn.options.water_image_url = 'view/img/water-small.png'; </script><script src="view/js/wellcms.js?2.2.0"></script><a class="scroll-to-top rounded" href="javascript:void(0);"><i class="icon-angle-up"></i></a><a class="scroll-to-bottom rounded" href="javascript:void(0);" style="display: inline;"><i class="icon-angle-down"></i></a></body></html><script> var forum_url = 'list-1.html'; var safe_token = 'Fd7CyESZJ6vaBaTJBwTaAZdxO3Dz9mCb0_2FJQm3FpDrt_2BPbQcG6ulpCVfePWnXsgmIYes9ys8F771TzYIROpPZg_3D_3D'; var body = $('body'); body.on('submit', '#form', function() { var jthis = $(this); var jsubmit = jthis.find('#submit'); jthis.reset(); jsubmit.button('loading'); var postdata = jthis.serializeObject(); $.xpost(jthis.attr('action'), postdata, function(code, message) { if(code == 0) { location.reload(); } else { $.alert(message); jsubmit.button('reset'); } }); return false; }); function resize_image() { var jmessagelist = $('div.message'); var first_width = jmessagelist.width(); jmessagelist.each(function() { var jdiv = $(this); var maxwidth = jdiv.attr('isfirst') ? first_width : jdiv.width(); var jmessage_width = Math.min(jdiv.width(), maxwidth); jdiv.find('img, embed, iframe, video').each(function() { var jimg = $(this); var img_width = this.org_width; var img_height = this.org_height; if(!img_width) { var img_width = jimg.attr('width'); var img_height = jimg.attr('height'); this.org_width = img_width; this.org_height = img_height; } if(img_width > jmessage_width) { if(this.tagName == 'IMG') { jimg.width(jmessage_width); jimg.css('height', 'auto'); jimg.css('cursor', 'pointer'); jimg.on('click', function() { }); } else { jimg.width(jmessage_width); var height = (img_height / img_width) * jimg.width(); jimg.height(height); } } }); }); } function resize_table() { $('div.message').each(function() { var jdiv = $(this); jdiv.find('table').addClass('table').wrap('<div class="table-responsive"></div>'); }); } $(function() { resize_image(); resize_table(); $(window).on('resize', resize_image); }); var jmessage = $('#message'); jmessage.on('focus', function() {if(jmessage.t) { clearTimeout(jmessage.t); jmessage.t = null; } jmessage.css('height', '6rem'); }); jmessage.on('blur', function() {jmessage.t = setTimeout(function() { jmessage.css('height', '2.5rem');}, 1000); }); $('#nav li[data-active="fid-1"]').addClass('active'); </script>