<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-10261622</id><updated>2011-08-14T12:40:39.626+01:00</updated><title type='text'>CHERUB in PHD</title><subtitle type='html'></subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://cherub325.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10261622/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://cherub325.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>CHERUB</name><uri>http://www.blogger.com/profile/05541000949655411328</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='14' height='32' src='http://static.flickr.com/29/61835177_20e0034f42_t.jpg'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>93</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-10261622.post-114176774994776033</id><published>2006-03-07T21:39:00.000Z</published><updated>2006-03-07T21:42:29.966Z</updated><title type='text'>Report A Google Shut Down</title><content type='html'>&lt;span style="font-size:130%;"&gt;&lt;span style="font-size:100%;"&gt;Suddenly, My Google shut down from about 2000 to 2130, 07/03/2006. I dont know why at all. Only Google involved. &lt;/span&gt;
&lt;/span&gt;&lt;span style="font-size:130%;"&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/10261622-114176774994776033?l=cherub325.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cherub325.blogspot.com/feeds/114176774994776033/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=10261622&amp;postID=114176774994776033' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10261622/posts/default/114176774994776033'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10261622/posts/default/114176774994776033'/><link rel='alternate' type='text/html' href='http://cherub325.blogspot.com/2006/03/report-google-shut-down.html' title='Report A Google Shut Down'/><author><name>CHERUB</name><uri>http://www.blogger.com/profile/05541000949655411328</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='14' height='32' src='http://static.flickr.com/29/61835177_20e0034f42_t.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-10261622.post-113728525160063014</id><published>2006-01-15T00:32:00.000Z</published><updated>2006-01-15T00:34:11.623Z</updated><title type='text'>12.01.2005 - 14.01.20005 What's DONE</title><content type='html'>&lt;span style="font-size:130%;"&gt;Reading&lt;/span&gt;
&lt;ol&gt;&lt;li&gt;Ramsin &lt;a href="http://www.codeproject.com/Purgatory/XML_NotePad.asp"&gt;How to search &amp;amp; modify within XML documents using XPath queries&lt;/a&gt;&lt;/li&gt;&lt;li&gt;Chilkat &lt;a href="http://www.example-code.com/csharp/csXmlFindRecords.asp"&gt;Find XML Records&lt;/a&gt;&lt;/li&gt;&lt;/ol&gt;&lt;span style="font-size:130%;"&gt;Coding&lt;/span&gt;
&lt;ol&gt;&lt;li&gt;ReadPDF project C#&lt;/li&gt;&lt;li&gt; ReferenceManager project C#&lt;/li&gt;&lt;/ol&gt;&lt;span style="font-size:130%;"&gt;Software
&lt;/span&gt;&lt;ol&gt;&lt;li&gt;&lt;a href="http://www.designmeme.com/2006/01/06/new-firefox-extension-x-ray/"&gt;X-Ray&lt;/a&gt;, Firefox Extension, review html tags without checking the source file&lt;/li&gt;&lt;/ol&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/10261622-113728525160063014?l=cherub325.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cherub325.blogspot.com/feeds/113728525160063014/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=10261622&amp;postID=113728525160063014' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10261622/posts/default/113728525160063014'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10261622/posts/default/113728525160063014'/><link rel='alternate' type='text/html' href='http://cherub325.blogspot.com/2006/01/12012005-140120005-whats-done.html' title='12.01.2005 - 14.01.20005 What&apos;s DONE'/><author><name>CHERUB</name><uri>http://www.blogger.com/profile/05541000949655411328</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='14' height='32' src='http://static.flickr.com/29/61835177_20e0034f42_t.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-10261622.post-113707601984312396</id><published>2006-01-12T14:20:00.000Z</published><updated>2006-01-12T14:26:59.863Z</updated><title type='text'>08.01.2005 - 11.01.2005 What's DONE</title><content type='html'>&lt;span style="font-size:130%;"&gt;Reading&lt;/span&gt;
&lt;ol&gt;&lt;li&gt;Norberto Ezquerra, Steve Capell, Larry Klein, and Pieter Duijves, Model-Guided Labeling of Coronary Structure, IEEE Trans. on Medical Imaging, Vol. 17, No. 3, June 1998&lt;/li&gt;&lt;li&gt;James F. O'Brien and Norberto F. Ezquerra, Automated segmentation of coronary vessels in angiographic image sequences utilizing temporal, spatial, and structural constraints, SPIE Visualization in Biomedical Computing Vol. 2359, pp.25-37, 1994&lt;/li&gt;&lt;li&gt;S. L. Lauritzen, The EM Algorithm for Graphical Association Models with Missing Data, Computational Statistics and Data Analysis 19, 191-201, 1995
&lt;/li&gt;&lt;/ol&gt;&lt;span style="font-size:130%;"&gt;Blogging&lt;/span&gt;
&lt;ol&gt;&lt;li&gt;&lt;a href="http://spaces.msn.com/members/sg71cherub/Blog/cns%211pmRDzNq7g5OIfrRAQ-ukmIA%21810.entry"&gt;&lt;span class="bvTitle" id="subjcns!1pmRDzNq7g5OIfrRAQ-ukmIA!810"&gt;回诸友&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;&lt;/ol&gt;&lt;span style="font-size:130%;"&gt;Software
&lt;/span&gt;&lt;ol&gt;&lt;li&gt;&lt;span style="font-size:130%;"&gt;&lt;span style="font-size:100%;"&gt;&lt;a href="http://www.marklyon.org/gmail/download.htm"&gt;Google GMail Loader&lt;/a&gt; (GML) Import existing email to GMail&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-size:130%;"&gt;&lt;span style="font-size:100%;"&gt;&lt;a href="video.google.com"&gt;Google Video Player&lt;/a&gt; save and play gvp file&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-size:130%;"&gt;&lt;span style="font-size:100%;"&gt;&lt;a href="http://fredrik.hubbe.net/win2vnc.html"&gt;win2vnc&lt;/a&gt;, one set of mouse and keyboard to control two  windows desktop, works very cool. &lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-size:130%;"&gt;&lt;span style="font-size:100%;"&gt;&lt;a href="http://www.realvnc.com/download.html"&gt;VNC 4 Free Edition Compatibility&lt;/a&gt;, VNC server, for win2vnc usage&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;/ol&gt;&lt;span style="font-size:130%;"&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-size:130%;"&gt;Writing&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;ol&gt;&lt;li&gt;&lt;span style="font-size:130%;"&gt;&lt;span style="font-size:100%;"&gt;Scheme of Model Based Tracking, roadmap by Viso&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-size:130%;"&gt;&lt;span style="font-size:100%;"&gt;EM approach to learning link matrix of hidden nod&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;/ol&gt;&lt;span style="font-size:130%;"&gt;
&lt;/span&gt;
Technorati Tag: &lt;a href="http://www.technorati.com/tag/cherub" rel="tag"&gt;cherub&lt;/a&gt; &lt;a href="http://www.technorati.com/tag/blog" rel="tag"&gt;blog&lt;/a&gt; &lt;a href="http://www.technorati.com/tag/EM" rel="tag"&gt;EM&lt;/a&gt; &lt;a href="http://www.technorati.com/tag/Bayesian_Network" rel="tag"&gt;Bayesian_Network&lt;/a&gt; &lt;a href="http://www.technorati.com/tag/VNC" rel="tag"&gt;VNC&lt;/a&gt; &lt;a href="http://www.technorati.com/tag/win2vnc" rel="tag"&gt;win2vnc&lt;/a&gt; &lt;a href="http://www.technorati.com/tag/Google_Video" rel="tag"&gt;Google_Video&lt;/a&gt; &lt;a href="http://www.technorati.com/tag/Gmail" rel="tag"&gt;Gmail&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/10261622-113707601984312396?l=cherub325.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cherub325.blogspot.com/feeds/113707601984312396/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=10261622&amp;postID=113707601984312396' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10261622/posts/default/113707601984312396'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10261622/posts/default/113707601984312396'/><link rel='alternate' type='text/html' href='http://cherub325.blogspot.com/2006/01/08012005-11012005-whats-done.html' title='08.01.2005 - 11.01.2005 What&apos;s DONE'/><author><name>CHERUB</name><uri>http://www.blogger.com/profile/05541000949655411328</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='14' height='32' src='http://static.flickr.com/29/61835177_20e0034f42_t.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-10261622.post-113667189189012242</id><published>2006-01-07T17:25:00.000Z</published><updated>2006-01-07T22:11:35.236Z</updated><title type='text'>05.01.2006 - 07.01.2005 What's DONE</title><content type='html'>&lt;span style="font-size:130%;"&gt;Reading&lt;/span&gt;
&lt;ol&gt;&lt;li&gt;Mark A. Peot and Ross D. Shachter, Fusion and Propagation with Multiple Observations in Belief Networks, Artificial Intelligence, 48 (1991) 299-318&lt;/li&gt;&lt;/ol&gt;&lt;span style="font-size:130%;"&gt;Blogging&lt;/span&gt;
&lt;ol&gt;&lt;li&gt;&lt;a href="http://spaces.msn.com/members/sg71cherub/Blog/cns%211pmRDzNq7g5OIfrRAQ-ukmIA%21798.entry"&gt;牙疼！&lt;/a&gt;&lt;/li&gt;&lt;/ol&gt; &lt;span style="font-size:130%;"&gt;Software
&lt;/span&gt;&lt;ol&gt;&lt;li&gt;&lt;a href="http://hamachi.cc/download"&gt;Hamachi&lt;/a&gt; a P2P client&lt;/li&gt;&lt;li&gt;&lt;a href="http://www.skype.com/products/skype/windows/downloading.html"&gt; Skype 2.0&lt;/a&gt;&lt;/li&gt;&lt;/ol&gt;&lt;span style="font-size:130%;"&gt;Writing
&lt;/span&gt;&lt;ol&gt;&lt;li&gt;A General Framework of Using Hidden Nodes in Polytree Bayesian Network&lt;/li&gt;&lt;/ol&gt;
Technorati Tag: &lt;a href="http://www.technorati.com/tag/cherub" rel="tag"&gt;cherub&lt;/a&gt; &lt;a href="http://www.technorati.com/tag/blog" rel="tag"&gt;blog&lt;/a&gt; &lt;a href="http://www.technorati.com/tag/bayesian_network" rel="tag"&gt;bayesian_network&lt;/a&gt; &lt;a href="http://www.technorati.com/tag/skype" rel="tag"&gt;skype&lt;/a&gt; &lt;a href="http://www.technorati.com/tag/hamachi" rel="tag"&gt;hamachi&lt;/a&gt; &lt;a href="http://www.technorati.com/tag/p2p" rel="tag"&gt;p2p&lt;/a&gt; &lt;a href="http://www.technorati.com/tag/hidden_node" rel="tag"&gt;hidden_node&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/10261622-113667189189012242?l=cherub325.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cherub325.blogspot.com/feeds/113667189189012242/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=10261622&amp;postID=113667189189012242' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10261622/posts/default/113667189189012242'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10261622/posts/default/113667189189012242'/><link rel='alternate' type='text/html' href='http://cherub325.blogspot.com/2006/01/05012006-07012005-whats-done.html' title='05.01.2006 - 07.01.2005 What&apos;s DONE'/><author><name>CHERUB</name><uri>http://www.blogger.com/profile/05541000949655411328</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='14' height='32' src='http://static.flickr.com/29/61835177_20e0034f42_t.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-10261622.post-113642202643007148</id><published>2006-01-05T00:45:00.000Z</published><updated>2006-01-05T00:47:06.463Z</updated><title type='text'>04.01.2006 What's DONE</title><content type='html'>&lt;span style="font-size:130%;"&gt;Reading&lt;/span&gt;
&lt;ol&gt;&lt;li&gt;Kevin Murphy, &lt;a href="http://www.cs.ubc.ca/%7Emurphyk/Bayes/bnintro.html"&gt;A Brief Introduction to Graphical Models and Bayesian Networks&lt;/a&gt;&lt;/li&gt;&lt;li&gt;Cecil Huang, Adnan Darwiche, &lt;a href="www.aub.edu.lb/people/darwiche/Papers/ijar95.pdf"&gt;Inference in Bayesian Network a Procedural Guide &lt;/a&gt;&lt;/li&gt;&lt;li&gt;Kevin Murphy, &lt;a href="www.cs.ubc.ca/%7Emurphyk/Papers/pearlmux.ps.gz"&gt;Pearl's Algorithm and Multiplexer Nodes&lt;/a&gt;&lt;/li&gt;&lt;li&gt;Machtelt Garrels, &lt;a href="http://www.tldp.org/LDP/intro-linux/html/"&gt;Introduction to Linux, A Hands on Guide&lt;/a&gt; Chapter 3&lt;/li&gt;&lt;/ol&gt;
Technorati Tag: &lt;a href="http://www.technorati.com/tag/cherub" rel="tag"&gt;cherub&lt;/a&gt; &lt;a href="http://www.technorati.com/tag/blog" rel="tag"&gt;blog&lt;/a&gt; &lt;a href="http://www.technorati.com/tag/reading" rel="tag"&gt;reading&lt;/a&gt; &lt;a href="http://www.technorati.com/tag/bayesian_network" rel="tag"&gt;bayesian_network&lt;/a&gt; &lt;a href="http://www.technorati.com/tag/linux" rel="tag"&gt;linux&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/10261622-113642202643007148?l=cherub325.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cherub325.blogspot.com/feeds/113642202643007148/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=10261622&amp;postID=113642202643007148' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10261622/posts/default/113642202643007148'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10261622/posts/default/113642202643007148'/><link rel='alternate' type='text/html' href='http://cherub325.blogspot.com/2006/01/04012006-whats-done.html' title='04.01.2006 What&apos;s DONE'/><author><name>CHERUB</name><uri>http://www.blogger.com/profile/05541000949655411328</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='14' height='32' src='http://static.flickr.com/29/61835177_20e0034f42_t.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-10261622.post-113632965202129137</id><published>2006-01-03T23:04:00.000Z</published><updated>2006-01-03T23:07:32.040Z</updated><title type='text'>03.01.2006 What's DONE</title><content type='html'>&lt;span style="font-size:130%;"&gt;Reading&lt;/span&gt;
&lt;ol&gt;&lt;li&gt;Machtelt Garrels, &lt;a href="http://www.tldp.org/LDP/intro-linux/html/"&gt;Introduction to Linux, A Hands on Guide&lt;/a&gt; Chapter 1 - Chapter 2&lt;/li&gt;&lt;/ol&gt;&lt;span style="font-size:130%;"&gt;Blogging&lt;/span&gt;
&lt;ol&gt;&lt;li&gt;Try &lt;a href="http://www.mybloglog.com/"&gt;MyBlogLog&lt;/a&gt; free blog stats service&lt;/li&gt;&lt;/ol&gt;&lt;span style="font-size:130%;"&gt;Software
&lt;/span&gt;&lt;ol&gt;&lt;li&gt;&lt;a href="http://www.ttplayer.com/"&gt;千千静音&lt;/a&gt;, recommended by Shuang Feng, very good!&lt;/li&gt;&lt;li&gt;&lt;a href="http://www.stack.nl/%7Edimitri/doxygen/download.html#latestsrc"&gt; Doxygen&lt;/a&gt; Update to 1.4.6&lt;/li&gt;&lt;/ol&gt;
Technorati Tag: &lt;a href="http://www.technorati.com/tag/cherub" rel="tag"&gt;cherub&lt;/a&gt; &lt;a href="http://www.technorati.com/tag/blog" rel="tag"&gt;blog&lt;/a&gt; &lt;a href="http://www.technorati.com/tag/%E5%8D%83%E5%8D%83%E9%9D%99%E9%9F%B3" rel="tag"&gt;千千静音&lt;/a&gt; &lt;a href="http://www.technorati.com/tag/MyBlogLog" rel="tag"&gt;MyBlogLog&lt;/a&gt; &lt;a href="http://www.technorati.com/tag/linux" rel="tag"&gt;linux&lt;/a&gt; &lt;a href="http://www.technorati.com/tag/Doxygen" rel="tag"&gt;Doxygen&lt;/a&gt; &lt;a href="http://www.technorati.com/tag/software" rel="tag"&gt;software&lt;/a&gt; &lt;a href="http://www.technorati.com/tag/read" rel="tag"&gt;read&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/10261622-113632965202129137?l=cherub325.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cherub325.blogspot.com/feeds/113632965202129137/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=10261622&amp;postID=113632965202129137' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10261622/posts/default/113632965202129137'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10261622/posts/default/113632965202129137'/><link rel='alternate' type='text/html' href='http://cherub325.blogspot.com/2006/01/03012006-whats-done.html' title='03.01.2006 What&apos;s DONE'/><author><name>CHERUB</name><uri>http://www.blogger.com/profile/05541000949655411328</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='14' height='32' src='http://static.flickr.com/29/61835177_20e0034f42_t.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-10261622.post-113625069550960959</id><published>2006-01-03T01:08:00.000Z</published><updated>2006-01-03T01:11:35.546Z</updated><title type='text'>31.12.2005 - 02.01.2006 What's DONE</title><content type='html'>&lt;span style="font-size:130%;"&gt;Coding&lt;/span&gt;
&lt;ol&gt;&lt;li&gt;BayesianNetwork Project C++&lt;/li&gt;&lt;ol&gt;&lt;li&gt;Modified CNode &amp;amp; CTreeLookupTable structure&lt;/li&gt;&lt;/ol&gt;&lt;li&gt;TechnoratiTag Project C#&lt;/li&gt;&lt;/ol&gt;&lt;span style="font-size:130%;"&gt;Blogging&lt;/span&gt;
&lt;a href="http://spaces.msn.com/members/sg71cherub/Blog/cns%211pmRDzNq7g5OIfrRAQ-ukmIA%21788.entry"&gt;&lt;span class="bvTitle" id="subjcns!1pmRDzNq7g5OIfrRAQ-ukmIA!788"&gt;Doom  (★★★★★☆☆☆☆☆)&lt;/span&gt;&lt;/a&gt;
&lt;span style="font-size:130%;"&gt;
&lt;/span&gt;
Technorati Tag: &lt;a href="http://www.technorati.com/tag/cherub" rel="tag"&gt;cherub&lt;/a&gt; &lt;a href="http://www.technorati.com/tag/blog" rel="tag"&gt;blog&lt;/a&gt; &lt;a href="http://www.technorati.com/tag/done" rel="tag"&gt;done&lt;/a&gt; &lt;a href="http://www.technorati.com/tag/CSh" rel="tag"&gt;CSh&lt;/a&gt; &lt;a href="http://www.technorati.com/tag/CPP" rel="tag"&gt;CPP&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/10261622-113625069550960959?l=cherub325.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cherub325.blogspot.com/feeds/113625069550960959/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=10261622&amp;postID=113625069550960959' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10261622/posts/default/113625069550960959'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10261622/posts/default/113625069550960959'/><link rel='alternate' type='text/html' href='http://cherub325.blogspot.com/2006/01/31122005-02012006-whats-done.html' title='31.12.2005 - 02.01.2006 What&apos;s DONE'/><author><name>CHERUB</name><uri>http://www.blogger.com/profile/05541000949655411328</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='14' height='32' src='http://static.flickr.com/29/61835177_20e0034f42_t.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-10261622.post-113599375085053698</id><published>2005-12-31T01:43:00.000Z</published><updated>2005-12-31T02:06:42.853Z</updated><title type='text'>30.12.2005 What's DONE</title><content type='html'>&lt;span style="font-size:130%;"&gt;Blogging&lt;/span&gt;
&lt;ol&gt;&lt;li&gt;&lt;a href="http://spaces.msn.com/members/sg71cherub/Blog/cns%211pmRDzNq7g5OIfrRAQ-ukmIA%21778.entry"&gt;&lt;span class="bvTitle" id="subjcns!1pmRDzNq7g5OIfrRAQ-ukmIA!778"&gt;10 of 2005&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;&lt;/ol&gt;&lt;span style="font-size:130%;"&gt;Software
&lt;/span&gt;&lt;ol&gt;&lt;li&gt;&lt;span style="font-size:130%;"&gt;&lt;span style="font-size:100%;"&gt;Civilization IV&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;/ol&gt;&lt;p&gt;&lt;/p&gt;      &lt;div class="tags"&gt; Tags: &lt;ul&gt; &lt;li&gt;&lt;a href="http://www.technorati.com/tag/civilization" rel="tag"&gt;civilization&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a href="http://www.technorati.com/tag/share" rel="tag"&gt;share&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a href="http://www.technorati.com/tag/done" rel="tag"&gt;done&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a href="http://www.technorati.com/tag/software" rel="tag"&gt;software&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a href="http://www.technorati.com/tag/blog" rel="tag"&gt;blog&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a href="http://www.technorati.com/tag/personal" rel="tag"&gt;personal&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a href="http://www.technorati.com/tag/program" rel="tag"&gt;program&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a href="http://www.technorati.com/tag/coding" rel="tag"&gt;coding&lt;/a&gt;&lt;/li&gt; &lt;/ul&gt; &lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/10261622-113599375085053698?l=cherub325.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cherub325.blogspot.com/feeds/113599375085053698/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=10261622&amp;postID=113599375085053698' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10261622/posts/default/113599375085053698'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10261622/posts/default/113599375085053698'/><link rel='alternate' type='text/html' href='http://cherub325.blogspot.com/2005/12/30122005-whats-done.html' title='30.12.2005 What&apos;s DONE'/><author><name>CHERUB</name><uri>http://www.blogger.com/profile/05541000949655411328</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='14' height='32' src='http://static.flickr.com/29/61835177_20e0034f42_t.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-10261622.post-113590472075339988</id><published>2005-12-30T01:04:00.000Z</published><updated>2005-12-30T01:05:20.776Z</updated><title type='text'>29.12.2005 What's DONE</title><content type='html'>&lt;span style="font-size:130%;"&gt;Software
&lt;/span&gt;&lt;ol&gt;&lt;li&gt;&lt;span style="font-size:130%;"&gt;&lt;span style="font-size:100%;"&gt;&lt;a href="http://widgets.yahoo.com/gallery/view.php?widget=36261"&gt;Sing that's iTune!&lt;/a&gt; Wideget&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-size:130%;"&gt;&lt;span style="font-size:100%;"&gt;&lt;a href="http://widgets.yahoo.com/gallery/view.php?widget=37582"&gt; Sudoku Pill&lt;/a&gt; Widget&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;/ol&gt;&lt;span style="font-size:130%;"&gt;
&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/10261622-113590472075339988?l=cherub325.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cherub325.blogspot.com/feeds/113590472075339988/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=10261622&amp;postID=113590472075339988' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10261622/posts/default/113590472075339988'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10261622/posts/default/113590472075339988'/><link rel='alternate' type='text/html' href='http://cherub325.blogspot.com/2005/12/29122005-whats-done.html' title='29.12.2005 What&apos;s DONE'/><author><name>CHERUB</name><uri>http://www.blogger.com/profile/05541000949655411328</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='14' height='32' src='http://static.flickr.com/29/61835177_20e0034f42_t.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-10261622.post-113581641562090908</id><published>2005-12-29T00:29:00.000Z</published><updated>2005-12-29T00:33:35.640Z</updated><title type='text'>22.12.2005 - 28.12.2005 What's DONE</title><content type='html'>&lt;span style="font-size:130%;"&gt;Merry Christmas!

Coding&lt;/span&gt;
&lt;ol&gt;&lt;li&gt;&lt;span style="font-size:130%;"&gt;&lt;span style="font-size:100%;"&gt;PZMath libray C++&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;ol&gt;&lt;li&gt;&lt;span style="font-size:130%;"&gt;&lt;span style="font-size:100%;"&gt; PZCombinationGenerator&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;/ol&gt;&lt;li&gt;&lt;span style="font-size:130%;"&gt;&lt;span style="font-size:100%;"&gt;BayesianNetwork project C++&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;ol&gt;&lt;li&gt;&lt;span style="font-size:130%;"&gt;&lt;span style="font-size:100%;"&gt; version 0.2&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;/ol&gt;&lt;/ol&gt;&lt;span style="font-size:130%;"&gt;Blogging&lt;/span&gt;
&lt;ol&gt;&lt;li&gt;&lt;span style="font-size:130%;"&gt;&lt;span style="font-size:100%;"&gt;&lt;a href="http://spaces.msn.com/members/sg71cherub/Blog/cns%211pmRDzNq7g5OIfrRAQ-ukmIA%21771.entry"&gt;King Kong(★★★★★☆☆☆☆☆)&lt;/a&gt;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://spaces.msn.com/members/sg71cherub/Blog/cns%211pmRDzNq7g5OIfrRAQ-ukmIA%21768.entry"&gt;&lt;span class="bvTitle" id="subjcns!1pmRDzNq7g5OIfrRAQ-ukmIA!768"&gt;19.12.2005 -  21.12.2005 What's DONE&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;&lt;/ol&gt;&lt;span style="font-size:130%;"&gt;Software
&lt;/span&gt;&lt;ol&gt;&lt;li&gt;&lt;span style="font-size:130%;"&gt;&lt;span style="font-size:100%;"&gt;&lt;a href="http://musicbrainz.org/tagger/index.html"&gt;MusicBrainz Tagger&lt;/a&gt; Automatic MP3 files Tagger, but not fully support Chinese albums. :(&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;/ol&gt;&lt;span style="font-size:130%;"&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-size:130%;"&gt;Video&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;ol&gt;&lt;li&gt;&lt;span style="font-size:130%;"&gt;&lt;span style="font-size:100%;"&gt;&lt;a href="http://video.google.com/videoplay?docid=-5555313278261147278"&gt;Power of Ten&lt;/a&gt;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-size:130%;"&gt;&lt;span style="font-size:100%;"&gt;&lt;a href="http://video.google.com/videoplay?docid=877124040670507488"&gt;Wallace and Gromit-Cracking Contraptions&lt;/a&gt;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;/ol&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/10261622-113581641562090908?l=cherub325.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cherub325.blogspot.com/feeds/113581641562090908/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=10261622&amp;postID=113581641562090908' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10261622/posts/default/113581641562090908'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10261622/posts/default/113581641562090908'/><link rel='alternate' type='text/html' href='http://cherub325.blogspot.com/2005/12/22122005-28122005-whats-done.html' title='22.12.2005 - 28.12.2005 What&apos;s DONE'/><author><name>CHERUB</name><uri>http://www.blogger.com/profile/05541000949655411328</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='14' height='32' src='http://static.flickr.com/29/61835177_20e0034f42_t.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-10261622.post-113520670356345907</id><published>2005-12-21T23:07:00.000Z</published><updated>2005-12-21T23:11:43.586Z</updated><title type='text'>21.12.2005 What's DONE</title><content type='html'>&lt;span style="font-size:130%;"&gt;Blogging&lt;/span&gt;
&lt;ol&gt;&lt;li&gt;&lt;a href="http://spaces.msn.com/members/sg71cherub/Blog/cns%211pmRDzNq7g5OIfrRAQ-ukmIA%21763.entry"&gt;March of the Penguins (★★★★★★★★☆☆)&lt;/a&gt;&lt;/li&gt;&lt;/ol&gt;&lt;span style="font-size:130%;"&gt;Software&lt;/span&gt;
&lt;ol&gt;&lt;li&gt;&lt;a href="http://www.orb.com/skype/download.html"&gt;V4S&lt;/a&gt; Send voice messages to  any email or Skype™ contact, Voicemail for Skype everywhere - even on mobile phones!&lt;/li&gt;&lt;li&gt;VMware Workstation 4.5.2&lt;/li&gt;&lt;li&gt;&lt;a href="http://www.linuxiso.org/distro.php?distro=29"&gt;Mandrake Linux 10.1&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://www.knoppix.org/"&gt;KNOPPIX Linux 4.0.2&lt;/a&gt; Live DVD/CD&lt;/li&gt;&lt;li&gt;&lt;a href="http://www.ubuntulinux.org/"&gt;Ubuntu Linux 5.10&lt;/a&gt; Live CD&lt;/li&gt;&lt;li&gt;&lt;a href="http://www.apple.com/itunes/download/"&gt;iTunes 6.0&lt;/a&gt; One of the best app of 200&lt;/li&gt;&lt;/ol&gt;&lt;span style="font-size:130%;"&gt;DONE&lt;/span&gt;
&lt;ol&gt;&lt;li&gt;&lt;a href="http://www.googlemodules.com/module/42/"&gt;To-Do List&lt;/a&gt; Google Module&lt;/li&gt;&lt;/ol&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/10261622-113520670356345907?l=cherub325.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cherub325.blogspot.com/feeds/113520670356345907/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=10261622&amp;postID=113520670356345907' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10261622/posts/default/113520670356345907'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10261622/posts/default/113520670356345907'/><link rel='alternate' type='text/html' href='http://cherub325.blogspot.com/2005/12/21122005-whats-done.html' title='21.12.2005 What&apos;s DONE'/><author><name>CHERUB</name><uri>http://www.blogger.com/profile/05541000949655411328</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='14' height='32' src='http://static.flickr.com/29/61835177_20e0034f42_t.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-10261622.post-113512420021471368</id><published>2005-12-21T00:15:00.000Z</published><updated>2005-12-21T00:16:40.260Z</updated><title type='text'>20.12.2005What's DONE</title><content type='html'>&lt;span style="font-size:130%;"&gt;Software&lt;/span&gt;
&lt;ol&gt;&lt;li&gt;&lt;a href="http://www.quirk.biz/searchstatus/download.php"&gt;SearchStatus&lt;/a&gt; Firefox Exension, provides extensive search-related information about a site&lt;/li&gt;&lt;li&gt;&lt;a href="http://performancing.com/firefox"&gt;Performancing for Firefox&lt;/a&gt; Firefox Extension, a full featured blog editor that sits right within Firefox&lt;/li&gt;&lt;/ol&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/10261622-113512420021471368?l=cherub325.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cherub325.blogspot.com/feeds/113512420021471368/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=10261622&amp;postID=113512420021471368' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10261622/posts/default/113512420021471368'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10261622/posts/default/113512420021471368'/><link rel='alternate' type='text/html' href='http://cherub325.blogspot.com/2005/12/20122005whats-done.html' title='20.12.2005What&apos;s DONE'/><author><name>CHERUB</name><uri>http://www.blogger.com/profile/05541000949655411328</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='14' height='32' src='http://static.flickr.com/29/61835177_20e0034f42_t.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-10261622.post-113504203302269228</id><published>2005-12-20T01:24:00.000Z</published><updated>2005-12-20T01:27:13.043Z</updated><title type='text'>19.12.2005What's DONE</title><content type='html'>&lt;span style="font-size:130%;"&gt;Reading&lt;/span&gt;
&lt;ol&gt;&lt;li&gt;&lt;a href="http://www.okcupid.com/tests/take?testid=9935030990046738815"&gt;The Nerd? Geek? or Dork?&lt;/a&gt;&lt;/li&gt;&lt;/ol&gt;&lt;span style="font-size:130%;"&gt;Coding&lt;/span&gt;
&lt;ol&gt;&lt;li&gt;PZMath Library C#&lt;/li&gt;&lt;ol&gt;&lt;li&gt;PZMath_multimin_fminimizer&lt;/li&gt;&lt;li&gt;PZMath_multimin_fminimizer_nmsimplex&lt;/li&gt;&lt;/ol&gt;&lt;li&gt;TestPZMathMultimin project C#&lt;/li&gt;&lt;/ol&gt;&lt;span style="font-size:130%;"&gt;Blogging&lt;/span&gt;
&lt;ol&gt;&lt;li&gt;&lt;a href="http://spaces.msn.com/members/sg71cherub/Blog/cns%211pmRDzNq7g5OIfrRAQ-ukmIA%21756.entry"&gt;Lassie (★★★★★★★★★☆)&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://spaces.msn.com/members/sg71cherub/Blog/cns%211pmRDzNq7g5OIfrRAQ-ukmIA%21753.entry"&gt;16.12.2005 - 18.12.2005 What's DONE&lt;/a&gt;&lt;/li&gt;&lt;/ol&gt;&lt;span style="font-size:130%;"&gt;DONE&lt;/span&gt;
&lt;ol&gt;&lt;li&gt;&lt;a href="http://www.flickr.com/fun/zeitgeist/"&gt;Flickr Zeitgeist&lt;/a&gt; to my blog&lt;/li&gt;&lt;li&gt;Blogger &lt;a href="http://help.blogger.com/bin/answer.py?answer=84"&gt;Post Template&lt;/a&gt;&lt;/li&gt;&lt;/ol&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/10261622-113504203302269228?l=cherub325.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cherub325.blogspot.com/feeds/113504203302269228/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=10261622&amp;postID=113504203302269228' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10261622/posts/default/113504203302269228'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10261622/posts/default/113504203302269228'/><link rel='alternate' type='text/html' href='http://cherub325.blogspot.com/2005/12/19122005whats-done.html' title='19.12.2005What&apos;s DONE'/><author><name>CHERUB</name><uri>http://www.blogger.com/profile/05541000949655411328</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='14' height='32' src='http://static.flickr.com/29/61835177_20e0034f42_t.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-10261622.post-113498576756551664</id><published>2005-12-19T09:41:00.000Z</published><updated>2005-12-19T09:49:27.590Z</updated><title type='text'>The Nerd? Geek? or Dork?</title><content type='html'>&lt;span style="font-size:130%;"&gt;&lt;span style="font-size:100%;"&gt;I have never expected to be a geek, or a nerd, since I am such an average person. However, driven by the curiosity on how dork I am, I tried a &lt;a href="http://www.okcupid.com/tests/take?testid=9935030990046738815"&gt;60 questions test&lt;/a&gt;. &lt;/span&gt;&lt;/span&gt;&lt;span class="maincolumn"&gt;The 60 % Nerd, 43% Geek, 21% Dork satisfied my average judgement. It is interesting, isn't it? &lt;/span&gt;&lt;span style="font-size:130%;"&gt;

&lt;/span&gt;&lt;span style="font-size:130%;"&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/10261622-113498576756551664?l=cherub325.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cherub325.blogspot.com/feeds/113498576756551664/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=10261622&amp;postID=113498576756551664' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10261622/posts/default/113498576756551664'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10261622/posts/default/113498576756551664'/><link rel='alternate' type='text/html' href='http://cherub325.blogspot.com/2005/12/nerd-geek-or-dork.html' title='The Nerd? Geek? or Dork?'/><author><name>CHERUB</name><uri>http://www.blogger.com/profile/05541000949655411328</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='14' height='32' src='http://static.flickr.com/29/61835177_20e0034f42_t.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-10261622.post-113495446203833283</id><published>2005-12-19T01:03:00.000Z</published><updated>2005-12-19T01:07:42.060Z</updated><title type='text'>16.12.2005 - 18.12.2005 What's DONE</title><content type='html'>&lt;a href="http://www.flickr.com/photos/cherub325/74977193/" title="Photo Sharing"&gt;&lt;img src="http://static.flickr.com/40/74977193_e43e32f2d6_t.jpg" alt="nrlogo" height="37" width="100" /&gt;&lt;/a&gt;
&lt;span style="font-size:130%;"&gt;Reading&lt;/span&gt;
&lt;ol&gt;&lt;li&gt;Numerical Recipes in C&lt;/li&gt;&lt;ol&gt;&lt;li&gt;&lt;a href="http://www.library.cornell.edu/nr/bookcpdf/c15-5.pdf"&gt;15.5 Nonlinear Models&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://www.library.cornell.edu/nr/bookcpdf/c10-4.pdf"&gt;10.4 Downhill Simplex Method in Multidimensions&lt;/a&gt;&lt;/li&gt;&lt;/ol&gt;&lt;li&gt;David Byatt, Ian Coope, Chris Price &lt;a href="http://oldweb.cecm.sfu.ca/AAS/coope.pdf"&gt;40 Years of the Nelder-Mead Algorithm&lt;/a&gt;&lt;/li&gt;&lt;/ol&gt;&lt;span style="font-size:130%;"&gt;Coding&lt;/span&gt;
&lt;ol&gt;&lt;li&gt;Debugging BayesianNetwork project C++&lt;/li&gt;&lt;/ol&gt;&lt;span style="font-size:130%;"&gt;Blogging&lt;/span&gt;
&lt;ol&gt;&lt;li&gt;&lt;a href="http://spaces.msn.com/members/sg71cherub/Blog/cns%211pmRDzNq7g5OIfrRAQ-ukmIA%21748.entry"&gt;14.2005 - 15.2005 What's DONE&lt;/a&gt;&lt;/li&gt;&lt;/ol&gt;&lt;span style="font-size:130%;"&gt;Software&lt;/span&gt;
&lt;ol&gt;&lt;li&gt;BattleField 2
&lt;/li&gt;&lt;li&gt;&lt;a href="http://www.microsoft.com/downloads/details.aspx?FamilyId=7D29004E-7A8D-4F0A-B199-6A740D8F27BB&amp;amp;displaylang=en"&gt;DirectX SDK 10 !!!&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://www.skycn.com/soft/14857.html"&gt;Thunder V5.0.5.98&lt;/a&gt;&lt;/li&gt;&lt;/ol&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/10261622-113495446203833283?l=cherub325.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cherub325.blogspot.com/feeds/113495446203833283/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=10261622&amp;postID=113495446203833283' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10261622/posts/default/113495446203833283'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10261622/posts/default/113495446203833283'/><link rel='alternate' type='text/html' href='http://cherub325.blogspot.com/2005/12/16122005-18122005-whats-done.html' title='16.12.2005 - 18.12.2005 What&apos;s DONE'/><author><name>CHERUB</name><uri>http://www.blogger.com/profile/05541000949655411328</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='14' height='32' src='http://static.flickr.com/29/61835177_20e0034f42_t.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-10261622.post-113469646886419056</id><published>2005-12-16T01:24:00.000Z</published><updated>2005-12-16T01:27:48.880Z</updated><title type='text'>14.12.2005 -15.12.2005 What's DONE</title><content type='html'>&lt;span style="font-size:130%;"&gt;Coding &lt;/span&gt;
&lt;ol&gt;&lt;li&gt;PZMath Library C#&lt;/li&gt;&lt;ol&gt;&lt;li&gt;PZMath_multifit_linear&lt;/li&gt;&lt;/ol&gt;&lt;li&gt;Scanline Tool of iLab project C#&lt;/li&gt;&lt;ol&gt;&lt;li&gt;TrackResult&lt;/li&gt;&lt;li&gt;ConsequtiveScanlineTracking&lt;/li&gt;&lt;li&gt;TaskTryConsequtiveScanlineTracking&lt;/li&gt;&lt;/ol&gt;&lt;li&gt;TestPZMultifit project C#&lt;/li&gt;&lt;ol&gt;&lt;li&gt;multifit_linear&lt;/li&gt;&lt;/ol&gt;&lt;li&gt;TEST_GSL_MULTIFIT_DIF_FULL project C++&lt;/li&gt;&lt;ol&gt;&lt;li&gt;Main_linear&lt;/li&gt;&lt;/ol&gt;&lt;/ol&gt;&lt;span style="font-size:130%;"&gt;Blogging&lt;/span&gt;
&lt;ol&gt;&lt;li&gt;&lt;a href="http://spaces.msn.com/members/sg71cherub/Blog/cns%211pmRDzNq7g5OIfrRAQ-ukmIA%21742.entry"&gt;13.12.2005 What's DONE&lt;/a&gt;&lt;/li&gt;&lt;/ol&gt;&lt;span style="font-size:130%;"&gt;Software&lt;/span&gt;
&lt;ol&gt;&lt;li&gt;&lt;a href="http://www.pcinspector.de/file_recovery/uk/welcome.htm"&gt;Audacity The Free, Cross-Platform Sound Editor&lt;/a&gt;, very professional&lt;/li&gt;&lt;li&gt;&lt;a href="http://www.pcinspector.de/file_recovery/uk/welcome.htm"&gt;File Recovery Version 4.0&lt;/a&gt; for recovery deleted files&lt;/li&gt;&lt;li&gt;&lt;a href="http://www.bitstorm.org/extensions/view-cookies/"&gt;View Cookies&lt;/a&gt; Firefox Extension&lt;/li&gt;&lt;li&gt;&lt;a href="http://www.astec.ac.uk/staff/shepherd/flickr_autodownloadr.html"&gt;FickrDownloadr&lt;/a&gt; download Flickr photos as a batch&lt;/li&gt;&lt;li&gt;&lt;a href="http://extensionroom.mozdev.org/more-info/tabx"&gt;Tab X&lt;/a&gt; Firefox Extension&lt;/li&gt;&lt;li&gt;&lt;a href="http://www.nliteos.com/index.html"&gt;nLite&lt;/a&gt; How to use?&lt;/li&gt;&lt;li&gt;&lt;a href="http://www.veling.nl/anne/enjoy/"&gt;FlickrWallpaper&lt;/a&gt; With C# source code, cool!&lt;/li&gt;&lt;/ol&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/10261622-113469646886419056?l=cherub325.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cherub325.blogspot.com/feeds/113469646886419056/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=10261622&amp;postID=113469646886419056' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10261622/posts/default/113469646886419056'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10261622/posts/default/113469646886419056'/><link rel='alternate' type='text/html' href='http://cherub325.blogspot.com/2005/12/14122005-15122005-whats-done.html' title='14.12.2005 -15.12.2005 What&apos;s DONE'/><author><name>CHERUB</name><uri>http://www.blogger.com/profile/05541000949655411328</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='14' height='32' src='http://static.flickr.com/29/61835177_20e0034f42_t.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-10261622.post-113450732397754845</id><published>2005-12-13T20:48:00.000Z</published><updated>2005-12-13T20:55:23.993Z</updated><title type='text'>13.12.2005 What's DONE</title><content type='html'>&lt;a href="http://www.flickr.com/photos/cherub325/73281795/" title="Photo Sharing"&gt;&lt;img src="http://static.flickr.com/34/73281795_4078ac24cc_o.jpg" alt="NDoc logo" height="48" width="48" /&gt;&lt;/a&gt;

&lt;span style="font-size:130%;"&gt;Coding&lt;/span&gt;
&lt;ol&gt;&lt;li&gt;PZMath Library C#&lt;/li&gt;&lt;ol&gt;&lt;li&gt;PZScanline&lt;/li&gt;&lt;li&gt;PZInterpolate&lt;/li&gt;&lt;/ol&gt;&lt;li&gt;Scanline Tool of iLab project C#&lt;/li&gt;&lt;ol&gt;&lt;li&gt;Interpolate&lt;/li&gt;&lt;li&gt;ExtractScanline&lt;/li&gt;&lt;/ol&gt;&lt;li&gt;Documentation of PZMath Library, by NDoc&lt;/li&gt;&lt;/ol&gt;&lt;span style="font-size:130%;"&gt;Blogging&lt;/span&gt;
&lt;ol&gt;&lt;li&gt;&lt;a href="http://spaces.msn.com/members/sg71cherub/Blog/cns%211pmRDzNq7g5OIfrRAQ-ukmIA%21737.entry"&gt;12.12.2005 What's DONE&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://spaces.msn.com/members/sg71cherub/Blog/cns%211pmRDzNq7g5OIfrRAQ-ukmIA%21738.entry"&gt;In Her Shoes (★★★★★★★☆☆☆)&lt;/a&gt;&lt;/li&gt;&lt;/ol&gt;&lt;span style="font-size:130%;"&gt;Software&lt;/span&gt;
&lt;ol&gt;&lt;li&gt;&lt;a href="http://ndoc.sourceforge.net/"&gt;NDoc C# documentation tools&lt;/a&gt;&lt;/li&gt;&lt;/ol&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/10261622-113450732397754845?l=cherub325.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cherub325.blogspot.com/feeds/113450732397754845/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=10261622&amp;postID=113450732397754845' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10261622/posts/default/113450732397754845'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10261622/posts/default/113450732397754845'/><link rel='alternate' type='text/html' href='http://cherub325.blogspot.com/2005/12/13122005-whats-done.html' title='13.12.2005 What&apos;s DONE'/><author><name>CHERUB</name><uri>http://www.blogger.com/profile/05541000949655411328</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='14' height='32' src='http://static.flickr.com/29/61835177_20e0034f42_t.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-10261622.post-113442656963205998</id><published>2005-12-12T22:23:00.000Z</published><updated>2005-12-12T22:29:29.656Z</updated><title type='text'>12.12.2005 What's DONE</title><content type='html'>&lt;a href="http://www.flickr.com/photos/cherub325/72965698/" title="Photo Sharing"&gt;&lt;img src="http://static.flickr.com/20/72965698_fc84e54596_o.jpg" alt="icon" height="144" width="132" /&gt;&lt;/a&gt;
&lt;span style="font-size:130%;"&gt;Coding&lt;/span&gt;
&lt;ol&gt;&lt;li&gt;Rediculus Float problem: C++&lt;/li&gt;&lt;ol&gt;&lt;li&gt;&lt;span style="color: rgb(204, 0, 0);"&gt;sqrt(4000) != 10.0 * sqrt(40)&lt;/span&gt;;&lt;/li&gt;&lt;li&gt;t = 1.0; tt = exp(-0.1 * t); y1 = 1.0 + 5.0 * tt; y2 = 1.0 + 5.0 * exp(-0.1 * t); &lt;span style="color: rgb(204, 0, 0);"&gt;y1 != y2;&lt;/span&gt;&lt;/li&gt;&lt;/ol&gt;&lt;li&gt;Debugging TestPZMathMultifit project C#&lt;/li&gt;&lt;li&gt;Update PZMath project C#&lt;/li&gt;&lt;/ol&gt;&lt;span style="font-size:130%;"&gt;Blogging&lt;/span&gt;
&lt;ol&gt;&lt;li&gt;&lt;a href="http://spaces.msn.com/members/sg71cherub/Blog/cns%211pmRDzNq7g5OIfrRAQ-ukmIA%21734.entry"&gt;11.10.2005 What's DONE&lt;/a&gt;&lt;/li&gt;&lt;/ol&gt;&lt;span style="font-size:130%;"&gt;Software&lt;/span&gt;
&lt;ol&gt;&lt;li&gt;&lt;a href="http://widgets.yahoo.com/"&gt;Yahoo! Widget Engine 3.0&lt;/a&gt;&lt;/li&gt;&lt;/ol&gt;&lt;span style="font-size:130%;"&gt;Writing&lt;/span&gt;
&lt;ol&gt;&lt;li&gt;Simple Model&lt;/li&gt;&lt;/ol&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/10261622-113442656963205998?l=cherub325.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cherub325.blogspot.com/feeds/113442656963205998/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=10261622&amp;postID=113442656963205998' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10261622/posts/default/113442656963205998'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10261622/posts/default/113442656963205998'/><link rel='alternate' type='text/html' href='http://cherub325.blogspot.com/2005/12/12122005-whats-done.html' title='12.12.2005 What&apos;s DONE'/><author><name>CHERUB</name><uri>http://www.blogger.com/profile/05541000949655411328</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='14' height='32' src='http://static.flickr.com/29/61835177_20e0034f42_t.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-10261622.post-113432316025697176</id><published>2005-12-11T17:41:00.000Z</published><updated>2005-12-11T17:46:00.273Z</updated><title type='text'>11.12.2005 What's DONE</title><content type='html'>&lt;a href="http://www.flickr.com/photos/cherub325/72220191/" title="Photo Sharing"&gt;&lt;img src="http://static.flickr.com/34/72220191_1c938bf172_t.jpg" alt="0131429019.01._AA_SCMZZZZZZZ_" height="100" width="76" /&gt;&lt;/a&gt;&lt;a href="http://www.flickr.com/photos/cherub325/72412216/" title="Photo Sharing"&gt;&lt;img src="http://static.flickr.com/35/72412216_86970690a7_t.jpg" alt="pencil carvings" height="62" width="100" /&gt;&lt;/a&gt;
&lt;span style="font-size:130%;"&gt;
Reading and Notes Taken&lt;/span&gt;
&lt;ol&gt;&lt;li&gt;&lt;a href="http://software-quality.blogspot.com/2005/12/basics-of-unix-philosophy.html"&gt;Basics of the Unix Philosophy&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://news.bbc.co.uk/1/hi/world/asia-pacific/4517706.stm"&gt;China confirms it shot protesters&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://www.infofreako.com/jad/enpitsu-e.html"&gt;Pencil Carving&lt;/a&gt;&lt;/li&gt;&lt;/ol&gt;&lt;span style="font-size:130%;"&gt;Blogging&lt;/span&gt;
&lt;ol&gt;&lt;li&gt;&lt;a href="http://spaces.msn.com/members/sg71cherub/Blog/cns%211pmRDzNq7g5OIfrRAQ-ukmIA%21728.entry"&gt;The Chronicles of Narnia: The Lion, The Witch, and The Wardrobe (★★★★★★☆☆☆☆)&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://spaces.msn.com/members/sg71cherub/Blog/cns%211pmRDzNq7g5OIfrRAQ-ukmIA%21726.entry"&gt;10.12.2005 What's DONE&lt;/a&gt;&lt;/li&gt;&lt;/ol&gt;&lt;span style="font-size:130%;"&gt;Software&lt;/span&gt;
&lt;ol&gt;&lt;li&gt;&lt;a href="http://www.miranda-im.org/"&gt;Miranda IM&lt;/a&gt; A multi protocal instant messenger, but I feel it is ugly and useless due to dis-orgnized and lack of functions.&lt;/li&gt;&lt;/ol&gt;&lt;span style="font-size:130%;"&gt;DONE&lt;/span&gt;
&lt;a href="www.aypwip.org/webnote"&gt;Webnote&lt;/a&gt; is DOWN! and recovered on 11.12.2005

&lt;span style="font-size:130%;"&gt;Visiting&lt;/span&gt;
&lt;a href="http://maps.google.com/local?q=newport+roman+fortress&amp;btnG=Search&amp;amp;sll=37.062500%2C-95.677068&amp;sspn=32.816776%2C59.677734&amp;amp;amp;amp;amp;f=q&amp;hl=en&amp;amp;latlng=51587741,-2998344,17564088779538022285"&gt;Caerleon Roman Fortress Baths&lt;/a&gt;
High Steet, Caerleon, Newport, NP18 1AE, UK&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/10261622-113432316025697176?l=cherub325.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cherub325.blogspot.com/feeds/113432316025697176/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=10261622&amp;postID=113432316025697176' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10261622/posts/default/113432316025697176'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10261622/posts/default/113432316025697176'/><link rel='alternate' type='text/html' href='http://cherub325.blogspot.com/2005/12/11122005-whats-done.html' title='11.12.2005 What&apos;s DONE'/><author><name>CHERUB</name><uri>http://www.blogger.com/profile/05541000949655411328</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='14' height='32' src='http://static.flickr.com/29/61835177_20e0034f42_t.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-10261622.post-113425977912089320</id><published>2005-12-11T00:02:00.000Z</published><updated>2005-12-11T00:24:22.666Z</updated><title type='text'>10.12.2005 What's DONE</title><content type='html'>&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://static.flickr.com/34/72217642_66e1756839_m.jpg"&gt;&lt;img style="cursor: pointer; width: 200px;" src="http://static.flickr.com/34/72217642_66e1756839_m.jpg" alt="" border="0" /&gt;&lt;/a&gt;
&lt;span style="font-size:130%;"&gt;DONE&lt;/span&gt;
&lt;ol&gt;&lt;li&gt;Download "&lt;a href="http://music.jschina.com.cn/zhuanji/1000.html"&gt;The Magic Flute&lt;/a&gt;", Mozart, from &lt;a href="http://hryy.com/album/555t_3282.asp"&gt;华人音乐网&lt;/a&gt;. Cracked the source addresses by tracing down the URL in HTML files.
&lt;/li&gt;&lt;ol&gt;&lt;li&gt;&lt;a href="http://www.hryy.com/no.1/UUAuth/asjdk395/0382/1.Wma?46626eb74b7546d77b094204b8297328"&gt;Ein Madchen&lt;/a&gt;  &lt;/li&gt;&lt;li&gt;&lt;a href="http://www.hryy.com/no.1/UUAuth/asjdk395/0382/2.Wma?46626eb74b7546d77b094204b8297328"&gt;Hm! &lt;/a&gt; &lt;/li&gt;&lt;li&gt;&lt;a href="http://www.hryy.com/no.1/UUAuth/asjdk395/0382/3.Wma?46626eb74b7546d77b094204b8297328"&gt;In diesen &lt;/a&gt; &lt;/li&gt;&lt;li&gt;&lt;a href="http://www.hryy.com/no.1/UUAuth/asjdk395/0382/4.Wma?46626eb74b7546d77b094204b8297328"&gt;Nur stille&lt;/a&gt;  &lt;/li&gt;&lt;li&gt;&lt;a href="http://www.hryy.com/no.1/UUAuth/asjdk395/0382/5.Wma?46626eb74b7546d77b094204b8297328"&gt;O isis&lt;/a&gt;  &lt;/li&gt;&lt;li&gt;&lt;a href="http://www.hryy.com/no.1/UUAuth/asjdk395/0382/6.Wma?46626eb74b7546d77b094204b8297328"&gt;O zittre nicht &lt;/a&gt; &lt;/li&gt;&lt;li&gt;&lt;a href="http://www.hryy.com/no.1/UUAuth/asjdk395/0382/7.Wma?46626eb74b7546d77b094204b8297328"&gt;Pa &lt;/a&gt; &lt;/li&gt;&lt;li&gt;&lt;a href="http://www.hryy.com/no.1/UUAuth/asjdk395/0382/8.Wma?46626eb74b7546d77b094204b8297328"&gt;Schnelle&lt;/a&gt;  &lt;/li&gt;&lt;li&gt;&lt;a href="http://www.hryy.com/no.1/UUAuth/asjdk395/0382/9.Wma?46626eb74b7546d77b094204b8297328"&gt;Soll ich&lt;/a&gt;  &lt;/li&gt;&lt;li&gt;&lt;a href="http://www.hryy.com/no.1/UUAuth/asjdk395/0382/10.Wma?46626eb74b7546d77b094204b8297328"&gt;Wie stark&lt;/a&gt;  &lt;/li&gt;&lt;li&gt;&lt;a href="http://www.hryy.com/no.1/UUAuth/asjdk395/0382/11.Wma?46626eb74b7546d77b094204b8297328"&gt;Wie&lt;/a&gt;  &lt;/li&gt;&lt;li&gt;&lt;a href="http://www.hryy.com/no.1/UUAuth/asjdk395/0382/12.Wma?46626eb74b7546d77b094204b8297328"&gt;Dieis Bildnis&lt;/a&gt;  &lt;/li&gt;&lt;li&gt;&lt;a href="http://www.hryy.com/no.1/UUAuth/asjdk395/0382/13.Wma?46626eb74b7546d77b094204b8297328"&gt;Ach &lt;/a&gt; &lt;/li&gt;&lt;li&gt;&lt;a href="http://www.hryy.com/no.1/UUAuth/asjdk395/0382/14.Wma?46626eb74b7546d77b094204b8297328"&gt;Alles fuhlt&lt;/a&gt;  &lt;/li&gt;&lt;li&gt;&lt;a href="http://www.hryy.com/no.1/UUAuth/asjdk395/0382/15.Wma?46626eb74b7546d77b094204b8297328"&gt;Bei&lt;/a&gt;  &lt;/li&gt;&lt;li&gt;&lt;a href="http://www.hryy.com/no.1/UUAuth/asjdk395/0382/16.Wma?46626eb74b7546d77b094204b8297328"&gt;Der Holle&lt;/a&gt;  &lt;/li&gt;&lt;li&gt;&lt;a href="http://www.hryy.com/no.1/UUAuth/asjdk395/0382/17.Wma?46626eb74b7546d77b094204b8297328"&gt;Der&lt;/a&gt;  &lt;/li&gt;&lt;li&gt;&lt;a href="http://www.hryy.com/no.1/UUAuth/asjdk395/0382/18.Wma?46626eb74b7546d77b094204b8297328"&gt;Die Strahlen&lt;/a&gt;  &lt;/li&gt;&lt;li&gt;&lt;a href="http://www.hryy.com/no.1/UUAuth/asjdk395/0382/19.Wma?46626eb74b7546d77b094204b8297328"&gt;Overture&lt;/a&gt;&lt;/li&gt;&lt;/ol&gt;&lt;/ol&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/10261622-113425977912089320?l=cherub325.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cherub325.blogspot.com/feeds/113425977912089320/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=10261622&amp;postID=113425977912089320' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10261622/posts/default/113425977912089320'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10261622/posts/default/113425977912089320'/><link rel='alternate' type='text/html' href='http://cherub325.blogspot.com/2005/12/10122005-whats-done.html' title='10.12.2005 What&apos;s DONE'/><author><name>CHERUB</name><uri>http://www.blogger.com/profile/05541000949655411328</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='14' height='32' src='http://static.flickr.com/29/61835177_20e0034f42_t.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-10261622.post-113418038088812914</id><published>2005-12-10T02:02:00.000Z</published><updated>2005-12-10T02:08:47.446Z</updated><title type='text'>09.12.2005 What's DONE</title><content type='html'>&lt;span style="font-size:130%;"&gt;Reading and Notes Taken&lt;/span&gt;
&lt;ol&gt;&lt;li&gt;&lt;a href="ftp://ftp.gnu.org/gnu/gsl/"&gt;gsl_multifit source codes&lt;/a&gt;&lt;/li&gt;&lt;/ol&gt;&lt;span style="font-size:130%;"&gt;Coding &lt;/span&gt;
&lt;ol&gt;&lt;li&gt;TEST_GSL_MULTIFIT_FULL project C++&lt;/li&gt;&lt;li&gt;PZMath Library C#&lt;/li&gt;&lt;ol&gt;&lt;li&gt;  PZMath_random&lt;/li&gt;&lt;li&gt;&lt;a href="http://www.firstpr.com.au/dsp/rand31/"&gt;  PZMath_random_ParkMiller&lt;/a&gt;&lt;/li&gt;&lt;li&gt;  PZMath_random_ParkMiller_Normal&lt;/li&gt;&lt;/ol&gt;&lt;li&gt;TestPZMathMultifit project C#&lt;/li&gt;&lt;li&gt;&lt;a href="http://www.cambiaresearch.com/cambia3/snippets/csharp/classes/RandomProvider.aspx"&gt;Steve Lautenschlager C# RandomProvider Class SourceCode&lt;/a&gt;&lt;/li&gt;&lt;/ol&gt;&lt;span style="font-size:130%;"&gt;Blogging&lt;/span&gt;
&lt;ol&gt;&lt;li&gt;&lt;a href="http://spaces.msn.com/members/sg71cherub/Blog/cns%211pmRDzNq7g5OIfrRAQ-ukmIA%21721.entry"&gt;推介一下我老妹的blog&lt;/a&gt;&lt;/li&gt;&lt;/ol&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/10261622-113418038088812914?l=cherub325.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cherub325.blogspot.com/feeds/113418038088812914/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=10261622&amp;postID=113418038088812914' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10261622/posts/default/113418038088812914'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10261622/posts/default/113418038088812914'/><link rel='alternate' type='text/html' href='http://cherub325.blogspot.com/2005/12/09122005-whats-done.html' title='09.12.2005 What&apos;s DONE'/><author><name>CHERUB</name><uri>http://www.blogger.com/profile/05541000949655411328</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='14' height='32' src='http://static.flickr.com/29/61835177_20e0034f42_t.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-10261622.post-113408430870170164</id><published>2005-12-08T23:24:00.000Z</published><updated>2005-12-08T23:25:08.703Z</updated><title type='text'>老婆怀孕日记 （Week 18)</title><content type='html'>发现胎动，老婆很兴致盎然的让我“骚扰”bb然后bb就会动 -_-&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/10261622-113408430870170164?l=cherub325.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cherub325.blogspot.com/feeds/113408430870170164/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=10261622&amp;postID=113408430870170164' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10261622/posts/default/113408430870170164'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10261622/posts/default/113408430870170164'/><link rel='alternate' type='text/html' href='http://cherub325.blogspot.com/2005/12/week-18.html' title='老婆怀孕日记 （Week 18)'/><author><name>CHERUB</name><uri>http://www.blogger.com/profile/05541000949655411328</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='14' height='32' src='http://static.flickr.com/29/61835177_20e0034f42_t.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-10261622.post-113407943042890948</id><published>2005-12-08T21:56:00.000Z</published><updated>2005-12-08T23:22:21.200Z</updated><title type='text'>04.12.2005 - 08.12.2005 What's DONE</title><content type='html'>&lt;span style="font-size:130%;"&gt;Coding &lt;/span&gt;
&lt;ol&gt;&lt;li&gt;gsl_multifit package&lt;/li&gt;&lt;/ol&gt;&lt;span style="font-size:130%;"&gt;Blogging&lt;/span&gt;
&lt;ol&gt;&lt;li&gt;&lt;a href="http://spaces.msn.com/members/sg71cherub/Blog/cns%211pmRDzNq7g5OIfrRAQ-ukmIA%21714.entry"&gt;&lt;span id="BlogViewId"&gt;&lt;span class="bvTitle" id="subjcns!1pmRDzNq7g5OIfrRAQ-ukmIA!714"&gt;The List of List 2005&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;&lt;/ol&gt;&lt;span style="font-size:130%;"&gt;Software&lt;/span&gt;
&lt;ol&gt;&lt;li&gt;&lt;a href="http://mediaportal.sourceforge.net/"&gt;MediaPortal&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://www.rjonna.com/ext/gspace.php"&gt;gSpace FireFox extension&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://www.rjonna.com/ext/dictionarytip.php"&gt;DictionaryTip Firefox extension&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://forums.mozillazine.org/viewtopic.php?t=319438"&gt;RestartFirefox Extension&lt;/a&gt;&lt;/li&gt;&lt;li&gt;Call of Duty 2&lt;/li&gt;&lt;/ol&gt;&lt;span style="font-size:130%;"&gt;DONE&lt;/span&gt;
&lt;ol&gt;&lt;li&gt;One Reference Letter and One Personal Statement for Meng&lt;/li&gt;&lt;/ol&gt;&lt;span style="font-size:130%;"&gt;Download (To Read)&lt;/span&gt;
&lt;ol&gt;&lt;li&gt;&lt;a href="http://www.codeproject.com/tools/leakfinder.asp"&gt;Memory(-Leak) and Exception Trace (CRT and COM Leaks)&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://www.codeproject.com/useritems/FileHelpers.asp"&gt;File Helpers v1.1.4 - An Automatic File Import/Export Engine&lt;/a&gt;&lt;/li&gt;&lt;/ol&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/10261622-113407943042890948?l=cherub325.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cherub325.blogspot.com/feeds/113407943042890948/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=10261622&amp;postID=113407943042890948' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10261622/posts/default/113407943042890948'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10261622/posts/default/113407943042890948'/><link rel='alternate' type='text/html' href='http://cherub325.blogspot.com/2005/12/04122005-08122005-whats-done.html' title='04.12.2005 - 08.12.2005 What&apos;s DONE'/><author><name>CHERUB</name><uri>http://www.blogger.com/profile/05541000949655411328</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='14' height='32' src='http://static.flickr.com/29/61835177_20e0034f42_t.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-10261622.post-113366334238719484</id><published>2005-12-04T02:22:00.000Z</published><updated>2005-12-04T02:29:02.393Z</updated><title type='text'>02.12.2005 - 03.12.2005 What's DONE</title><content type='html'>&lt;span style="font-size:130%;"&gt;Reading and Notes Taken&lt;/span&gt;
&lt;ol&gt;&lt;li&gt;&lt;a href="http://www.stack.nl/%7Edimitri/doxygen/manual.html"&gt;Doxygen Manual&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://www.stack.nl/%7Edimitri/doxygen/docblocks.html"&gt;Documenting the code&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://azureus.aelitis.com/wiki/index.php/Main_Page"&gt;Azureus Wiki&lt;/a&gt;&lt;/li&gt;&lt;/ol&gt;&lt;span style="font-size:130%;"&gt;Coding &lt;/span&gt;
&lt;ol&gt;&lt;li&gt;&lt;span style="font-weight: bold;"&gt;BayesianNetworkMainProcessFlow&lt;/span&gt;  C# project, using Treeview control to display main() thread of BayesianNetwork C++ Project&lt;/li&gt;&lt;li style="font-weight: bold;"&gt;BayesianNetwork C++ Project&lt;/li&gt;&lt;ol&gt;&lt;li&gt;CTreeLookupTable&lt;/li&gt;&lt;/ol&gt;&lt;/ol&gt;&lt;span style="font-size:130%;"&gt;Software&lt;/span&gt;
&lt;ol&gt;&lt;li&gt;&lt;a href="http://azureus.sourceforge.net/"&gt;Azureus &lt;/a&gt;&lt;/li&gt;&lt;/ol&gt;&lt;span style="font-size:130%;"&gt;DONE&lt;/span&gt;
&lt;ol&gt;&lt;li&gt;&lt;span style="font-weight: bold;"&gt;BayesianNetwork Document&lt;/span&gt;, by Doxygen&lt;/li&gt;&lt;/ol&gt;&lt;span style="font-size:130%;"&gt;Download (To Read)&lt;/span&gt;
&lt;ol&gt;&lt;li&gt;Nir Friedman &amp; Moises Goldszmidt &lt;a href="http://ai.stanford.edu/%7Enir/tutorial/Tutorial.ps.gz"&gt;Learning Bayesian Networks From Data&lt;/a&gt;&lt;/li&gt;&lt;li&gt;Nir Friedman, Dan Geiger, Mosies Goldszmidt, &lt;a href="http://citeseer.ist.psu.edu/friedman97bayesian.html"&gt;Bayesian Network Classifiers (1997)&lt;/a&gt;&lt;/li&gt;&lt;li&gt;R. Chen, K. Sivakumar, H. Kargupta, &lt;a href="http://www.siam.org/meetings/sdm03/proceedings/sdm03_31.pdf"&gt;Learning Bayesian Network Structure from Distributed Data&lt;/a&gt;&lt;/li&gt;&lt;li&gt;David Heckerman, &lt;a href="http://psrg.lcs.mit.edu/6892/handouts/tutbayesheckerman.pdf"&gt;A Tutorial on Learning With Bayesian Networks&lt;/a&gt;&lt;/li&gt;&lt;li&gt;Jie Cheng,  David Bell, Weiru Liu, &lt;a href="http://www.cs.ualberta.ca/%7Ejcheng/Doc/report98.pdf"&gt;Learning Bayesian Networks from Data: An Efficient Approach Based on Information Theory&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://www.cs.ubc.ca/%7Emurphyk/Bayes/learn.html"&gt;A Brief Introduction to Learning Bayesian Networks&lt;/a&gt;&lt;/li&gt;&lt;li&gt;K. Murphy and S. Mian, &lt;a href="http://www.cs.ubc.ca/%7Emurphyk/Papers/ismb99.ps.gz"&gt;Modelling Gene Expression Data using Dynamic Bayesian Networks&lt;/a&gt;&lt;/li&gt;&lt;/ol&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/10261622-113366334238719484?l=cherub325.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cherub325.blogspot.com/feeds/113366334238719484/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=10261622&amp;postID=113366334238719484' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10261622/posts/default/113366334238719484'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10261622/posts/default/113366334238719484'/><link rel='alternate' type='text/html' href='http://cherub325.blogspot.com/2005/12/02122005-03122005-whats-done.html' title='02.12.2005 - 03.12.2005 What&apos;s DONE'/><author><name>CHERUB</name><uri>http://www.blogger.com/profile/05541000949655411328</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='14' height='32' src='http://static.flickr.com/29/61835177_20e0034f42_t.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-10261622.post-113346632594067840</id><published>2005-12-01T19:31:00.000Z</published><updated>2005-12-01T19:45:25.990Z</updated><title type='text'>28.11.2005 - 01.12.2005 What is DONE</title><content type='html'>&lt;span style="font-size:130%;"&gt;Reading and Notes Taken&lt;/span&gt;
&lt;ol&gt;&lt;li&gt;&lt;a href="http://www.niedermayer.ca/papers/bayesian/bayes.html"&gt;Daryle Niedermayer, An Introduction to Bayesian Networks and their Contemporary Applications&lt;/a&gt;&lt;/li&gt;&lt;/ol&gt;&lt;span style="font-size:130%;"&gt;Coding &lt;/span&gt;
&lt;ol&gt;&lt;li&gt;BayesianNetwork project C++&lt;/li&gt;&lt;li&gt;PZCodes Library C++&lt;/li&gt;&lt;ol&gt;&lt;li&gt; -- PZError&lt;/li&gt;&lt;li&gt;  -- PZMath&lt;/li&gt;&lt;li&gt;  -- BayesianNetwork&lt;/li&gt;&lt;/ol&gt;&lt;/ol&gt;&lt;span style="font-size:130%;"&gt;Software&lt;/span&gt;
&lt;ol&gt;&lt;li&gt;Doxygen&lt;/li&gt;&lt;li&gt;Peter Jackon's King Kong&lt;/li&gt;&lt;li&gt;Firefox 1.5 (abandon Flock)&lt;/li&gt;&lt;li&gt;del.icio.us extension for Firefox .15&lt;/li&gt;&lt;/ol&gt;&lt;span style="font-size:130%;"&gt;DONE&lt;/span&gt;
&lt;ol&gt;&lt;li&gt;Use &lt;a href="http://www.rememberthemilk.com"&gt;Remember the milk&lt;/a&gt; as Todo List;&lt;/li&gt;&lt;li&gt;Use &lt;a href="http://www.aypwip.org/webnote"&gt;Webnote&lt;/a&gt; as note taking&lt;/li&gt;&lt;li&gt;All have been combined to Google Personal Homepage&lt;/li&gt;&lt;/ol&gt;&lt;span style="font-size:130%;"&gt;Writing&lt;/span&gt;
&lt;ol&gt;&lt;li&gt;Personal Statement&lt;/li&gt;&lt;/ol&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/10261622-113346632594067840?l=cherub325.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cherub325.blogspot.com/feeds/113346632594067840/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=10261622&amp;postID=113346632594067840' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10261622/posts/default/113346632594067840'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10261622/posts/default/113346632594067840'/><link rel='alternate' type='text/html' href='http://cherub325.blogspot.com/2005/12/28112005-01122005-what-is-done.html' title='28.11.2005 - 01.12.2005 What is DONE'/><author><name>CHERUB</name><uri>http://www.blogger.com/profile/05541000949655411328</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='14' height='32' src='http://static.flickr.com/29/61835177_20e0034f42_t.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-10261622.post-113313475174905373</id><published>2005-11-27T23:35:00.000Z</published><updated>2005-11-27T23:39:11.766Z</updated><title type='text'>25.11 - 27.11. 2005 What is DONE</title><content type='html'>&lt;span style="font-size:130%;"&gt;Coding&lt;/span&gt;&lt;br /&gt;&lt;ol&gt;&lt;li&gt;PZMath Project&lt;/li&gt;&lt;ol&gt;&lt;li&gt;SYS -- PZMath_sys.cs&lt;/li&gt;&lt;/ol&gt;&lt;li&gt;C# PhilipPZ Project&lt;/li&gt;&lt;ol&gt;&lt;li&gt;Class DataSet&lt;/li&gt;&lt;ol&gt;&lt;li&gt;Class TestSet&lt;/li&gt;&lt;li&gt;Class TrainingSet&lt;/li&gt;&lt;/ol&gt;&lt;li&gt;Class CountItem&lt;/li&gt;&lt;li&gt;Class CountItemHypo&lt;/li&gt;&lt;li&gt;Class CPT&lt;/li&gt;&lt;li&gt;Class LookupTable&lt;/li&gt;&lt;li&gt;Class TenFoldCrossValidation and Class Generate&lt;/li&gt;&lt;/ol&gt;&lt;li&gt;C++ T5_1P Project&lt;/li&gt;&lt;/ol&gt;&lt;br /&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/10261622-113313475174905373?l=cherub325.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cherub325.blogspot.com/feeds/113313475174905373/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=10261622&amp;postID=113313475174905373' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10261622/posts/default/113313475174905373'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10261622/posts/default/113313475174905373'/><link rel='alternate' type='text/html' href='http://cherub325.blogspot.com/2005/11/2511-2711-2005-what-is-done.html' title='25.11 - 27.11. 2005 What is DONE'/><author><name>CHERUB</name><uri>http://www.blogger.com/profile/05541000949655411328</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='14' height='32' src='http://static.flickr.com/29/61835177_20e0034f42_t.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-10261622.post-113288398313432901</id><published>2005-11-25T01:52:00.000Z</published><updated>2005-11-25T02:01:09.303Z</updated><title type='text'>24.11.2005 What is DONE</title><content type='html'>&lt;div xmlns="http://www.w3.org/1999/xhtml"&gt;&lt;p&gt;&lt;big&gt;&lt;big&gt;Coding &lt;/big&gt;&lt;/big&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;1. PZMath project&lt;/span&gt; (for &lt;span style="font-weight: bold;"&gt;Lab&lt;/span&gt;), translating &lt;a href="http://www.gnu.org/software/gsl/manual/gsl-ref_toc.html"&gt;GSL&lt;/a&gt; include:&lt;br /&gt;-- &lt;span style="font-style: italic;"&gt;Blas &lt;/span&gt;&lt;br /&gt;&lt;/p&gt;&lt;ul&gt;&lt;li&gt; -- PZMath_blas.cs&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;-- &lt;span style="font-style: italic;"&gt;Deriv&lt;/span&gt;&lt;br /&gt;&lt;/p&gt;&lt;ul&gt;&lt;li&gt; -- PZMath_deriv.cs&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;-- &lt;span style="font-style: italic;"&gt;General&lt;/span&gt;&lt;br /&gt;&lt;/p&gt;&lt;ul&gt;&lt;li&gt; -- PZMath_errno.cs&lt;/li&gt;&lt;li&gt; -- PZMath_machine.cs&lt;/li&gt;&lt;li&gt; -- PZMath_math.cs&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;-- &lt;span style="font-style: italic;"&gt;Linalg&lt;/span&gt;&lt;br /&gt;&lt;/p&gt;&lt;ul&gt;&lt;li&gt; -- PZMath_linalg.cs&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;-- &lt;span style="font-style: italic;"&gt;Matrix&lt;/span&gt;&lt;br /&gt;&lt;/p&gt;&lt;ul&gt;&lt;li&gt; -- PZMath_matrix.cs&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;-- &lt;span style="font-style: italic;"&gt;Multifit&lt;/span&gt;&lt;br /&gt;&lt;/p&gt;&lt;ul&gt;&lt;li&gt; -- PZMath_multifit_fdfsolver.cs&lt;/li&gt;&lt;li&gt; -- PZMath_multifit_fdfsolver_lmsder.cs&lt;/li&gt;&lt;li&gt; -- PZMath_multifit_nlin.cs&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;-- &lt;span style="font-style: italic;"&gt;Permutation&lt;/span&gt;&lt;br /&gt;&lt;/p&gt;&lt;ul&gt;&lt;li&gt; -- PZMath_permutation.cs&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;-- &lt;span style="font-style: italic;"&gt;Vector&lt;/span&gt;&lt;br /&gt;&lt;/p&gt;&lt;ul&gt;&lt;li&gt; -- PZMath_vector.cs&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;2. TestPZMath_deriv project&lt;/p&gt;&lt;p&gt;&lt;big&gt;&lt;big&gt;Software&lt;/big&gt;&lt;/big&gt;&lt;br /&gt;&lt;/p&gt;&lt;ol&gt;&lt;li&gt;Age of Empire III&lt;/li&gt;&lt;/ol&gt;&lt;p style="font-size: 10px; text-align: right;"&gt;technorati tags: &lt;a href="http://technorati.com/tag/done" rel="tag"&gt;done&lt;/a&gt;&lt;/p&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/10261622-113288398313432901?l=cherub325.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cherub325.blogspot.com/feeds/113288398313432901/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=10261622&amp;postID=113288398313432901' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10261622/posts/default/113288398313432901'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10261622/posts/default/113288398313432901'/><link rel='alternate' type='text/html' href='http://cherub325.blogspot.com/2005/11/24112005-what-is-done.html' title='24.11.2005 What is DONE'/><author><name>CHERUB</name><uri>http://www.blogger.com/profile/05541000949655411328</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='14' height='32' src='http://static.flickr.com/29/61835177_20e0034f42_t.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-10261622.post-113279505809108524</id><published>2005-11-24T01:03:00.000Z</published><updated>2005-11-24T02:29:24.826Z</updated><title type='text'>23.11.2005 What is Done</title><content type='html'>&lt;div xmlns="http://www.w3.org/1999/xhtml"&gt;&lt;big&gt;&lt;big&gt;Reading and Notes Taken&lt;/big&gt;&lt;/big&gt;&lt;br /&gt;&lt;ol&gt;&lt;li&gt;&lt;a href="http://msdn.microsoft.com/library/default.asp?url=/library/en-us/csref/html/vcwlkdelegatestutorial.asp"&gt;C# tutorial: delegate&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://msdn.microsoft.com/library/default.asp?url=/library/en-us/csref/html/vcwlkdelegatestutorial.asp"&gt;MSDN C# Tutorial: Delegate&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://blog.monstuff.com/archives/000037.html"&gt;The dark side of C# Delegates&lt;/a&gt; &lt;span style="font-style: italic;"&gt;The compiler plays a major role in making the delegates work.&lt;/span&gt; &lt;span style="font-style: italic;"&gt;Encountering a delegate declaration, the compiler actually generates a class with an Invoke method that matches the delegate declaration's signature.&lt;/span&gt; &lt;span style="font-style: italic;"&gt;Then, when a delegate instanciation is compiled, it gets verified (type-wise) and replaced by a call to the delegate constructor passing in an object and a method reference (via an int).&lt;/span&gt; &lt;span style="font-style: italic;"&gt;And last, the compiler recognizes delegates invocations and compiles them as call on the Invoke method.&lt;/span&gt;&lt;br /&gt; &lt;/li&gt;&lt;li&gt;Satya Komatineni, &lt;a href="http://www.ondotnet.com/pub/a/dotnet/2002/11/04/delegates.htm"&gt;Understanding the Nuances of Delegates in C#&lt;/a&gt; &lt;span style="font-style: italic;"&gt;A delegate exhibits the qualities of a class and a function. delegate has more things in common (syntactically) with a class than with a function&lt;/span&gt; &lt;span style="font-style: italic;"&gt;delegates are immutable.&lt;/span&gt; &lt;span style="font-style: italic;"&gt;you can retrieve a target from a delegate, cast the target to an appropriate class, and call the additional methods on that object.&lt;/span&gt; &lt;span style="font-style: italic;"&gt;Member function GetInvocationList() of delegate allows us to iterate through the individual delegates of a composite delegate.&lt;/span&gt;&lt;a href="http://www.ondotnet.com/pub/a/dotnet/2002/11/04/delegates.htm"&gt;&lt;br /&gt;&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://csharpcomputing.com/Tutorials/Lesson12.htm"&gt;C# Tutorial, Lesson 12: Delegates&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://www.c-sharpcorner.com/Code/2002/Aug/StrongTypedCollections.asp"&gt;Creating Strongly Typed Custom Collections in C#&lt;/a&gt;&lt;br /&gt;&lt;/li&gt;&lt;/ol&gt;&lt;p&gt;&lt;big&gt;&lt;big&gt;Coding&lt;/big&gt;&lt;/big&gt; &lt;br /&gt;&lt;/p&gt;&lt;ol&gt;&lt;li&gt;Read through source codes of GSL Multifit Pack&lt;/li&gt;&lt;li&gt;TestReferenceTypeCasting&lt;/li&gt;&lt;/ol&gt;&lt;div style="margin-left: 40px;"&gt;&lt;span style="font-style: italic;"&gt;test delegate as function pointer and reference type downcasting as void *&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;p&gt;&lt;big&gt;&lt;big&gt;Blogging&lt;/big&gt;&lt;/big&gt;&lt;br /&gt;&lt;/p&gt;&lt;ol&gt;&lt;li&gt;&lt;a href="http://spaces.msn.com/members/sg71cherub/Blog/cns%211pmRDzNq7g5OIfrRAQ-ukmIA%21706.entry"&gt;Harry Potter and the Goblet of Fire&lt;/a&gt;&lt;br /&gt;&lt;/li&gt;&lt;/ol&gt;&lt;p&gt;&lt;big&gt;&lt;big&gt;Software&lt;/big&gt;&lt;/big&gt;&lt;br /&gt;&lt;/p&gt;&lt;ol&gt;&lt;li&gt;CHM To PDF Converter&lt;/li&gt;&lt;li&gt;CHM 浏览器&lt;/li&gt;&lt;li&gt;ChmMagic&lt;/li&gt;&lt;li&gt;FreeCHM 1.2&lt;/li&gt;&lt;/ol&gt;&lt;p style="font-size: 10px; text-align: right;"&gt;technorati tags: &lt;a href="http://technorati.com/tag/done" rel="tag"&gt;done&lt;/a&gt;&lt;/p&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/10261622-113279505809108524?l=cherub325.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cherub325.blogspot.com/feeds/113279505809108524/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=10261622&amp;postID=113279505809108524' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10261622/posts/default/113279505809108524'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10261622/posts/default/113279505809108524'/><link rel='alternate' type='text/html' href='http://cherub325.blogspot.com/2005/11/23112005-what-is-done.html' title='23.11.2005 What is Done'/><author><name>CHERUB</name><uri>http://www.blogger.com/profile/05541000949655411328</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='14' height='32' src='http://static.flickr.com/29/61835177_20e0034f42_t.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-10261622.post-113274932802494237</id><published>2005-11-23T12:25:00.000Z</published><updated>2005-11-23T12:40:20.476Z</updated><title type='text'>22.11.2005 What is DONE</title><content type='html'>&lt;div xmlns="http://www.w3.org/1999/xhtml"&gt;&lt;p&gt;&lt;big style="font-weight: bold;"&gt;&lt;big&gt;Reading (Notes Taken)&lt;/big&gt;&lt;/big&gt;&lt;br /&gt;&lt;/p&gt;&lt;ol&gt;&lt;li&gt;Tom Germano, &lt;a href="http://davis.wpi.edu/%7Ematt/courses/wavelets/"&gt;Wavelets in Multiresolution Analysis&lt;/a&gt;, &lt;/li&gt;&lt;li&gt;E. J. Stollnitz, T. D. DeRose, D. H. Salesin, "Wavelets for Computer Graphics: A Primer Part I", IEEE Computer Graphics and Applications, 15, May 1995.&lt;/li&gt;&lt;li&gt;E. J. Stollnitz, T. D. DeRose, D. H. Salesin, "Wavelets for Computer Graphics: A Primer Part II", IEEE Computer Graphics and Applications, 15, July 1995.&lt;br /&gt;&lt;/li&gt;&lt;/ol&gt;&lt;p&gt;&lt;big style="font-weight: bold;"&gt;&lt;big&gt;Done&lt;/big&gt;&lt;/big&gt;&lt;br /&gt;&lt;/p&gt;&lt;ol&gt;&lt;li&gt;Subscribed RSS of PAMI, Medical Image, Signal Processing Magzing, Signal Processing, Signal Processing Letter, Image Processing&lt;br /&gt;&lt;/li&gt;&lt;/ol&gt;&lt;p&gt;&lt;big style="font-weight: bold;"&gt;&lt;big&gt;Coding&lt;/big&gt;&lt;/big&gt;&lt;br /&gt;&lt;/p&gt;&lt;ol&gt;&lt;li&gt;filter MultiresolutionAnalysis_pz&lt;/li&gt;&lt;li&gt;add &lt;a href="http://www.cdrnet.net/projects/nmath/"&gt;MathNet.Numerics&lt;/a&gt; library into project (Math.NET Numerics: Iridium)&lt;br /&gt;&lt;/li&gt;&lt;/ol&gt;&lt;p&gt;&lt;big style="font-weight: bold;"&gt;&lt;big&gt;Blogging&lt;/big&gt;&lt;/big&gt;&lt;br /&gt;&lt;/p&gt;&lt;ol&gt;&lt;li&gt;&lt;a href="http://spaces.msn.com/members/sg71cherub/Blog/cns%211pmRDzNq7g5OIfrRAQ-ukmIA%21697.entry"&gt;ShaPolang&lt;/a&gt;&lt;/li&gt;&lt;/ol&gt;&lt;p&gt;&lt;/p&gt;&lt;p style="font-size: 10px; text-align: right;"&gt;technorati tags: &lt;a href="http://technorati.com/tag/done" rel="tag"&gt;done&lt;/a&gt;&lt;/p&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/10261622-113274932802494237?l=cherub325.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cherub325.blogspot.com/feeds/113274932802494237/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=10261622&amp;postID=113274932802494237' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10261622/posts/default/113274932802494237'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10261622/posts/default/113274932802494237'/><link rel='alternate' type='text/html' href='http://cherub325.blogspot.com/2005/11/22112005-what-is-done.html' title='22.11.2005 What is DONE'/><author><name>CHERUB</name><uri>http://www.blogger.com/profile/05541000949655411328</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='14' height='32' src='http://static.flickr.com/29/61835177_20e0034f42_t.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-10261622.post-113190884764716892</id><published>2005-11-13T19:03:00.000Z</published><updated>2005-11-13T19:07:27.666Z</updated><title type='text'>老婆怀孕日记(Week 14)</title><content type='html'>今天是周六，早上老婆和bb醒来，大概10点，老婆上了厕所，做爱，11点起床。吃完早饭，驱车去了天鹅湖，叫Roth Park，有一个很长的湖，有数不清的天鹅，鸭，鸥，以及不知名的小鸟，湖被绿树环绕，各种各样，由于秋天来了，树的颜色很奇妙，黄，绿，还有白的。看到很多小孩拿着面包喂天鹅，看到很多天鹅围在一起抢面包，蔚为壮观。一路走，看到很多游人和天鹅，还有狗。看到一只小雪橇犬，它上来闻老婆，老婆为了bb没有摸它，我摸了它。老婆吃了个冰淇淋，一边吃冰淇淋一边看天鹅鸭子海鸥争抢吃的，回头突然看到一只小狗，比鸽子还小，但跑得很快。这时，头顶突然漂过一片云，下起淅淅沥沥的小雨。停车时老婆坚持把雨伞放在车里，我们只好冒雨继续步行，有时会在树下避雨。这时会有天鹅走到岸上，走近人，一只眼睛看老婆手里的冰淇淋。这是老婆第二次和天鹅亲密接触，上次是在Cambridge的剑河上。天鹅伸直脖子头可以到我老婆的胸部。天鹅走路是内八字！很多鸟一只脚站着，把脖子藏在身体里睡觉，其实是假睡。天气一会儿晴了，我们继续散步，走的很开心，bb在老婆肚子里也很开心。我们想在湖边买一套房子，带着bb过幸福的生活，还有一只狗。之后开车返回到家里，因为今天说好要去market买鱼。我们停车在家门口后穿过市中心步行去market。这是老婆第一次去，我是向导。但因为今天是周末，光顾顾客太多了，剩的鱼选择很少，所以我们并没有买；后来又去看了看肉、蛋和水果，东西都很贵并且不是很新鲜。最后决定周一再去，空手回来。回来路上在Marker Spenser买了裤子。老婆肚子日益见大：上周去MS的时候试的同样的裤子，试的是八号，感觉还可以，有点余地，由于当时觉得太贵了，就没有下决心，拖到了今天。今天再试，发现裤子已经很紧了，再试了10号，发现效果和一周前8号一样。因为实在没有裤子了，所以咬牙花了25块买了。谁知道下周会不会穿12号了，谁让bb不停的长。但是我出主意：下周如果穿不了了，可以干脆退掉，或者换一条。就在老婆付款的时候，MS的柜员向老婆推荐申请一张MS的信用卡，老婆就申请了，这样她马上会有两张信用卡。她说不会花很多钱，因为要省钱给bb买车，买吃的，买尿布。。。之后，我们欢欣鼓舞的回到家里，我做了红烧肉和西红柿鸡蛋。老婆在做饭之间就睡觉了，我做好饭叫醒她，她和bb都很感动。今天晚上，老婆带bb洗了泡泡浴，虽然浴缸不是很合适，但听音乐泡澡很好。今天老婆和bb都很开心。 （老婆口述，我纪录 -_-）&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/10261622-113190884764716892?l=cherub325.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cherub325.blogspot.com/feeds/113190884764716892/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=10261622&amp;postID=113190884764716892' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10261622/posts/default/113190884764716892'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10261622/posts/default/113190884764716892'/><link rel='alternate' type='text/html' href='http://cherub325.blogspot.com/2005/11/week-14_13.html' title='老婆怀孕日记(Week 14)'/><author><name>CHERUB</name><uri>http://www.blogger.com/profile/05541000949655411328</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='14' height='32' src='http://static.flickr.com/29/61835177_20e0034f42_t.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-10261622.post-113147526207515635</id><published>2005-11-08T18:37:00.000Z</published><updated>2005-11-08T18:41:02.350Z</updated><title type='text'>老婆怀孕日记 (Week 14)</title><content type='html'>&lt;p&gt;13周，老婆和bb独自度过，bb不高兴，老婆也不高兴，老婆坚持为bb做好吃的，保证bb健康生长。仍有壬辰反应。周末看了母婴用品商店，发现老婆想买的我都不想买，bb可能会在一个二手的环境中生长。我终于回来了。。。&lt;/p&gt; &lt;p&gt;14周，第一天 11月7日，壬辰反应显著好转，因为我在中午做宫爆鸡丁，晚上做鱼香肉丝。食量未比之前增加很多，体重未知，但腹部明显变大，需买新的裤子。&lt;/p&gt; &lt;p&gt;11.8，壬辰反应持续好转，之前靠和绿茶抑制口水分泌，现在仍坚持和绿茶。中午吃滑溜鸡片及熏鱼，晚场吃酱爆肉丁及熏鱼，但配通心粉，大为逊色。但菜很美味，bb很开心。现在我和老婆还有bb每天看“24”，大长今已经看完了。未完待续。。。&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/10261622-113147526207515635?l=cherub325.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cherub325.blogspot.com/feeds/113147526207515635/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=10261622&amp;postID=113147526207515635' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10261622/posts/default/113147526207515635'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10261622/posts/default/113147526207515635'/><link rel='alternate' type='text/html' href='http://cherub325.blogspot.com/2005/11/week-14_08.html' title='老婆怀孕日记 (Week 14)'/><author><name>CHERUB</name><uri>http://www.blogger.com/profile/05541000949655411328</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='14' height='32' src='http://static.flickr.com/29/61835177_20e0034f42_t.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-10261622.post-113145629787118997</id><published>2005-11-08T13:23:00.000Z</published><updated>2005-11-08T13:24:57.886Z</updated><title type='text'>老婆怀孕日记 (Week 14)</title><content type='html'>害喜现象明显好转。肚子比较明显涨大。吃得也多起来，我尽量做不同花样的菜。最近运动比较少，需要加强。&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/10261622-113145629787118997?l=cherub325.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cherub325.blogspot.com/feeds/113145629787118997/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=10261622&amp;postID=113145629787118997' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10261622/posts/default/113145629787118997'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10261622/posts/default/113145629787118997'/><link rel='alternate' type='text/html' href='http://cherub325.blogspot.com/2005/11/week-14.html' title='老婆怀孕日记 (Week 14)'/><author><name>CHERUB</name><uri>http://www.blogger.com/profile/05541000949655411328</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='14' height='32' src='http://static.flickr.com/29/61835177_20e0034f42_t.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-10261622.post-113023362390683263</id><published>2005-10-25T10:43:00.000+01:00</published><updated>2005-10-25T10:47:03.953+01:00</updated><title type='text'>老婆怀孕日记(Week 12)</title><content type='html'>&lt;div xmlns="http://www.w3.org/1999/xhtml"&gt;&lt;p&gt;昨天去University Hospital of Wales作了第一次的B超检查。很清楚看到一个小孩的样子，在动胳膊动腿，脑袋很大。身子长67mm，脑袋23mm大小。很神奇，不到10公分的东东已经是人样了，有三张B超照片。体检正常，前一段尿样检验也正常。体重还是42公斤，需要增加体重。一整天没有明显的呕吐现象，害喜基本趋于稳定。晚上吃糖醋鱼片，羊肉和白菜。&lt;br/&gt;&lt;/p&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/10261622-113023362390683263?l=cherub325.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cherub325.blogspot.com/feeds/113023362390683263/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=10261622&amp;postID=113023362390683263' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10261622/posts/default/113023362390683263'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10261622/posts/default/113023362390683263'/><link rel='alternate' type='text/html' href='http://cherub325.blogspot.com/2005/10/week-12.html' title='老婆怀孕日记(Week 12)'/><author><name>CHERUB</name><uri>http://www.blogger.com/profile/05541000949655411328</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='14' height='32' src='http://static.flickr.com/29/61835177_20e0034f42_t.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-10261622.post-112989164347091998</id><published>2005-10-21T11:46:00.000+01:00</published><updated>2005-10-21T11:47:23.480+01:00</updated><title type='text'>老婆怀孕日记(Week 11)</title><content type='html'>&lt;div xmlns="http://www.w3.org/1999/xhtml"&gt;&lt;p&gt;饮食不详，但据说口水情况又趋严重。&lt;br/&gt;&lt;/p&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/10261622-112989164347091998?l=cherub325.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cherub325.blogspot.com/feeds/112989164347091998/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=10261622&amp;postID=112989164347091998' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10261622/posts/default/112989164347091998'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10261622/posts/default/112989164347091998'/><link rel='alternate' type='text/html' href='http://cherub325.blogspot.com/2005/10/week-11_21.html' title='老婆怀孕日记(Week 11)'/><author><name>CHERUB</name><uri>http://www.blogger.com/profile/05541000949655411328</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='14' height='32' src='http://static.flickr.com/29/61835177_20e0034f42_t.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-10261622.post-112976822637441675</id><published>2005-10-20T01:24:00.000+01:00</published><updated>2005-10-20T01:31:17.100+01:00</updated><title type='text'>老婆怀孕日记（Week 11)</title><content type='html'>早 红薯粥，鸡蛋，面包，自己倒一碗牛奶，没喝。中午热昨天的排骨，下新鲜油菜，排骨面。下午吃香蕉苹果梨等水果。晚上牛肉胡萝卜盖饭以及BBQ排骨。晚饭吃 得略少，但临睡前喝了点剩粥。吃一碗葡萄，并睡前把所有碗洗了。放屁很臭，肚子不舒服，疑大便不畅，肠胃不适。近24点才睡觉，稍晚。从晚上看3集大长今 情况看，流口水症状减轻，没有呕吐。但愿是害喜症状开始减轻。
晚洗澡时拍了当前身材的照片。
另，中午收到NHS信件，预约24号下午B超体检。&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/10261622-112976822637441675?l=cherub325.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cherub325.blogspot.com/feeds/112976822637441675/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=10261622&amp;postID=112976822637441675' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10261622/posts/default/112976822637441675'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10261622/posts/default/112976822637441675'/><link rel='alternate' type='text/html' href='http://cherub325.blogspot.com/2005/10/week-11_19.html' title='老婆怀孕日记（Week 11)'/><author><name>CHERUB</name><uri>http://www.blogger.com/profile/05541000949655411328</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='14' height='32' src='http://static.flickr.com/29/61835177_20e0034f42_t.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-10261622.post-112968426525704248</id><published>2005-10-19T02:07:00.000+01:00</published><updated>2005-10-19T02:11:05.266+01:00</updated><title type='text'>老婆怀孕日记（Week 11）</title><content type='html'>早饭白粥，鸡蛋，面包。午饭素菜烩，白饭，酱豆腐过辣。晚餐排骨炖白菜，红薯饭。吃得还算好，还啃了一个玉米，一个西红柿。口水情况也看似比昨天好，似乎 没有呕吐现象。买了些饼干和点心做零食。晚上看三集大长今，耽误了工作。另外因为我，心情不太好。23点过后就寝，这日记是我写的，明天再咨询。&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/10261622-112968426525704248?l=cherub325.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cherub325.blogspot.com/feeds/112968426525704248/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=10261622&amp;postID=112968426525704248' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10261622/posts/default/112968426525704248'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10261622/posts/default/112968426525704248'/><link rel='alternate' type='text/html' href='http://cherub325.blogspot.com/2005/10/week-11_18.html' title='老婆怀孕日记（Week 11）'/><author><name>CHERUB</name><uri>http://www.blogger.com/profile/05541000949655411328</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='14' height='32' src='http://static.flickr.com/29/61835177_20e0034f42_t.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-10261622.post-112959314131571996</id><published>2005-10-18T00:50:00.000+01:00</published><updated>2005-10-18T01:04:32.043+01:00</updated><title type='text'>老婆怀孕日记 (Week 11)</title><content type='html'>16 Oct 2005
从早至晚不停流口水，上午吐少许方便面。早饭方便面，面包，黄油。午饭布丁和茶。晚饭浓鸡汤面。餐前吃玉米一个。去Forest of Dean, walking for 4 hours.

17 Oct 2005
早白粥两鸡蛋，中午白粥蔬菜，下午香蕉苹果，5PM呕吐。中午去诊所体检，体重42KG（毛重），血压（100/65)，尿样有血丝，送进一步化验，尿中无蛋白质。晚饭土豆牛肉，烤鸡腿。流一天口水。临睡前呕吐。&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/10261622-112959314131571996?l=cherub325.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cherub325.blogspot.com/feeds/112959314131571996/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=10261622&amp;postID=112959314131571996' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10261622/posts/default/112959314131571996'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10261622/posts/default/112959314131571996'/><link rel='alternate' type='text/html' href='http://cherub325.blogspot.com/2005/10/week-11.html' title='老婆怀孕日记 (Week 11)'/><author><name>CHERUB</name><uri>http://www.blogger.com/profile/05541000949655411328</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='14' height='32' src='http://static.flickr.com/29/61835177_20e0034f42_t.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-10261622.post-112169461019463210</id><published>2005-07-18T12:34:00.000+01:00</published><updated>2005-07-18T14:50:10.246+01:00</updated><title type='text'>Teach Yourself XML in 21 Days, Day 14</title><content type='html'>&lt;span class="dropcap"&gt;H&lt;/span&gt;&lt;span style="font-weight: bold;font-size:130%;" &gt;andling XLinks, XPointers, and XForms&lt;/span&gt;
Today you're going to take a look at three more XML applications: &lt;span style="color: rgb(255, 0, 0);"&gt;XLinks&lt;/span&gt;, &lt;span style="color: rgb(255, 0, 0);"&gt;XPointers&lt;/span&gt;, and &lt;span style="color: rgb(255, 0, 0);"&gt;XForms&lt;/span&gt;. In HTML, you can use hyperlinks to link documents, but in XML, you have more options, which is what the XLink and XPointer specifications are all about. XForms are desigend to replace the standard forms you see in Web pages, which display buttons, text fields, and so on; XForm is designed to bring that kinds of functionality into the XML world.

You use &lt;span style="color: rgb(255, 0, 0);"&gt;XLinks &lt;/span&gt;to create hyperlinks in XML and &lt;span style="color: rgb(255, 0, 0);"&gt;XPointers &lt;/span&gt;to get even more specific node or node set. &lt;span style="color: rgb(255, 0, 0);"&gt;XForms &lt;/span&gt;brings the idea of Web controls into XML.

&lt;span style="font-style: italic; color: rgb(0, 0, 153);font-size:130%;" &gt;Introducing XLinks&lt;/span&gt;
The &lt;a href="http://www.w3.org/tr/xlink"&gt;XLink 1.0 specification&lt;/a&gt; is a W3C recommendation. You use &lt;span style="color: rgb(255, 0, 0);"&gt;XLinks &lt;/span&gt;to link on document to another or to link one location inside a document to another. e.g.
&lt;blockquote&gt;        &amp;lt;link xmlns:xlink = "http://www.w3.org/1999/xlink"
         xlink:type = "simple"
         xlink:show = "new"
         xlink:href = "http://www.w3c.org"
         onClick="location.href='http://www.w3c.org'"&amp;gt;
         health insurance
     &amp;lt;/link&amp;gt;&lt;/blockquote&gt;In the above example you set the&lt;span style="font-style: italic; color: rgb(255, 0, 0);"&gt; xlink:type&lt;/span&gt; attribute to &lt;span style="color: rgb(255, 0, 0);"&gt;"simple"&lt;/span&gt; and the &lt;span style="font-style: italic;"&gt;xlink:show&lt;/span&gt; attribute to &lt;span style="color: rgb(255, 0, 0);"&gt;"new"&lt;/span&gt;; this means the browser should open the linked-to document in a new window and set the &lt;span style="font-style: italic; color: rgb(255, 0, 0);"&gt;xlink:href&lt;/span&gt; attribute to the URI of the new document. Bear in mind that the form of XML URIs isn't settled yet either and may grow more complex and comprehensive in time.

XLinks can go far beyond the simple. Here are a few of the current implementations of XLinks:
&lt;ul&gt;   &lt;li&gt;&lt;a href="http://www.empolis.co.uk/products/prod_x2x.asp"&gt;X2X&lt;/a&gt;, from empolis GmbH, is a XML XLink engine. It allows linking between documents and information resources.&lt;/li&gt;   &lt;li&gt;&lt;a href="http://www.labs.fujitsu.com/free/xlip/en"&gt;Fujitsu XLink Processor&lt;/a&gt;, developed by Fujitsu Laboratories, Ltd., is an implementation of XLink and XPointer.&lt;/li&gt;   &lt;li&gt;&lt;a href="http://www.xlinkit.com/"&gt;xlinkit.com&lt;/a&gt; is a lightweight application service that provides rule-based XLink generation.&lt;/li&gt;   &lt;li&gt;&lt;a href="http://www.mozilla.org/"&gt;Mozilla&lt;/a&gt; is a browser that supports simple XLinks.&lt;/li&gt;   &lt;li&gt;&lt;a href="http://www.w3c.org/amaya"&gt;Amaya&lt;/a&gt;, the W3C test browser, supports simple XLinks.&lt;/li&gt; &lt;/ul&gt; In fact, any XML element can create an XLink. You create an XLink by using attributes, not by using a particulra element. The XLink attributes specify what kind of XLink you're creating.

&lt;span style="font-weight: bold; color: rgb(0, 0, 0);"&gt;Using xlink:type&lt;/span&gt;
The &lt;span style="font-style: italic; color: rgb(255, 0, 0);"&gt;xlink:type&lt;/span&gt; attribute is the most important XLink attribute because it sets the type of XLink you're creating. Here are the possible values:
&lt;ul&gt;   &lt;li&gt;&lt;span style="font-weight: bold;"&gt;simple &lt;/span&gt;-- Is used to create a simple link.&lt;/li&gt;   &lt;li&gt;&lt;span style="font-weight: bold;"&gt;extended &lt;/span&gt;-- Is used to create an extended link.&lt;/li&gt;   &lt;li&gt;&lt;span style="font-weight: bold;"&gt;locator &lt;/span&gt;-- Is used to create a locator link that points to a resource.&lt;/li&gt;   &lt;li&gt;&lt;span style="font-weight: bold;"&gt;arc &lt;/span&gt;-- Is used to create an arc with multiple resources and various traversal paths.&lt;/li&gt;   &lt;li&gt;&lt;span style="font-weight: bold;"&gt;resource &lt;/span&gt;-- Is used to create a resource link, which indicates a specific resource.&lt;/li&gt;   &lt;li&gt;&lt;span style="font-weight: bold;"&gt;title &lt;/span&gt;-- Is used to create a title link and can hold the location of element markup for further information on a title.&lt;/li&gt; &lt;/ul&gt; &lt;span style="font-weight: bold; color: rgb(0, 0, 0);"&gt;Using xlink:href&lt;/span&gt;
The &lt;span style="font-style: italic; color: rgb(255, 0, 0);"&gt;xlink:href&lt;/span&gt; attribute is called the &lt;span style="color: rgb(255, 0, 0);"&gt;locator &lt;/span&gt;attribute. You use it to give the URI of a remote resource. When you work with simple URLs, the values you can assign to this attribute are fairly simple. But when you work with general URIs, which can include &lt;span style="color: rgb(255, 0, 0);"&gt;XPointers&lt;/span&gt;, things can get pretty complex.

&lt;span style="font-weight: bold; color: rgb(0, 0, 0);"&gt;Using xlink:show&lt;/span&gt;
The&lt;span style="font-style: italic; color: rgb(255, 0, 0);"&gt; xlink:show&lt;/span&gt; attribute specifies how to show the linked resource.

&lt;span style="font-weight: bold; color: rgb(0, 0, 0);"&gt;Using xlink:actuate&lt;/span&gt;
The &lt;span style="font-style: italic; color: rgb(255, 0, 0);"&gt;xlink:actuate&lt;/span&gt; attribute specifies when a link should be traversed. The &lt;span style="font-style: italic; color: rgb(255, 0, 0);"&gt;xlink:actuate&lt;/span&gt; attribute has these predefined values:
&lt;ul&gt;   &lt;li&gt;&lt;span style="font-weight: bold;"&gt;onRequest &lt;/span&gt;-- Means that the link should be traversed on the user's request.&lt;/li&gt;   &lt;li&gt;&lt;span style="font-weight: bold;"&gt;onLodad &lt;/span&gt;-- Means that the link should be traversed when the resource is loaded.&lt;/li&gt;   &lt;li&gt;&lt;span style="font-weight: bold;"&gt;other &lt;/span&gt;-- Specifies a custom preference.&lt;/li&gt;   &lt;li&gt;&lt;span style="font-weight: bold;"&gt;none &lt;/span&gt;-- Specifies that there be no actuation.&lt;/li&gt; &lt;/ul&gt; &lt;span style="font-weight: bold; color: rgb(0, 0, 0);"&gt;Using xlink:role and xlink:title&lt;/span&gt;
You can use the &lt;span style="font-style: italic; color: rgb(255, 0, 0);"&gt;xlink:role&lt;/span&gt; and &lt;span style="font-style: italic; color: rgb(255, 0, 0);"&gt;xlink:title&lt;/span&gt; attributes to describe a remote resource. The &lt;span style="font-style: italic; color: rgb(255, 0, 0);"&gt;xlink:title&lt;/span&gt; attribute is designed to be read by people, whereas the &lt;span style="font-style: italic; color: rgb(255, 0, 0);"&gt;xlink:role&lt;/span&gt; attribute is designed to be read by software.

&lt;span style="font-weight: bold; color: rgb(0, 0, 0);"&gt;Using xlink:arcrole and xlink:label&lt;/span&gt;
The &lt;span style="font-style: italic; color: rgb(255, 0, 0);"&gt;xlink:label&lt;/span&gt; attribute contains a human-readable label for an XLink. The &lt;span style="font-style: italic; color: rgb(255, 0, 0);"&gt;xlink:arcrole&lt;/span&gt; attribute works with XLink &lt;span style="font-style: italic; color: rgb(255, 0, 0);"&gt;arcs&lt;/span&gt;, which are sets of the links that can contain multiple resources and various traversal paths.

&lt;span style="font-style: italic; color: rgb(0, 0, 153);font-size:130%;" &gt;Beyond Simple XLinks&lt;/span&gt;
Extended links can involve multiple resources, multiple paths between those resources, and multidirectional paths. Consequently, actual implementations of extended links are a little vague compared to those of simple links because no one has really determined how extended XLinks will really be supported. In technical terms, an extended link is called a &lt;span style="font-style: italic; color: rgb(255, 0, 0);"&gt;directed labeled graph&lt;/span&gt;, and they are very general constructs.

An extended link can really only be characterized as being made up of connections between resources. Those resources many be &lt;span style="font-style: italic; color: rgb(255, 0, 0);"&gt;local&lt;/span&gt;, which means they're actually part of the extended link element, or &lt;span style="font-style: italic; color: rgb(255, 0, 0);"&gt;remote&lt;/span&gt;, which means they're not part of the extended link element. If a link contains resources, it's called an &lt;span style="font-style: italic; color: rgb(255, 0, 0);"&gt;inline link&lt;/span&gt;; if it does not contain any resources at all, it's called an &lt;span style="font-style: italic; color: rgb(255, 0, 0);"&gt;out-of-line link&lt;/span&gt;. &lt;span style="font-style: italic; color: rgb(255, 0, 0);"&gt;Inline links&lt;/span&gt; have their &lt;span style="font-style: italic; color: rgb(255, 0, 0);"&gt;xlink:tpe&lt;/span&gt; value set to &lt;span style="color: rgb(255, 0, 0);"&gt;"resource"&lt;/span&gt;. &lt;span style="font-style: italic; color: rgb(255, 0, 0);"&gt;Out-of-line links&lt;/span&gt; have there &lt;span style="font-style: italic; color: rgb(255, 0, 0);"&gt;xlink:type&lt;/span&gt; attribute value set to "locator".

&lt;span style="font-weight: bold; color: rgb(0, 0, 0);"&gt;Creating Arcs&lt;/span&gt;
In order too create a extended link, in terms of many conceivable paths between the resources, you can create an &lt;span style="font-style: italic; color: rgb(255, 0, 0);"&gt;arc &lt;/span&gt;to add more direction to what's going on. All the possible paths between resources are &lt;span style="font-style: italic; color: rgb(255, 0, 0);"&gt;arcs&lt;/span&gt;. You represent thos paths in XML elements by setting the &lt;span style="font-style: italic; color: rgb(255, 0, 0);"&gt;xlink:type&lt;/span&gt; attribute to &lt;span style="color: rgb(255, 0, 0);"&gt;"arc"&lt;/span&gt;. Arcs use &lt;span style="font-style: italic; color: rgb(255, 0, 0);"&gt;xlink:from&lt;/span&gt; and &lt;span style="font-style: italic; color: rgb(255, 0, 0);"&gt;xlink:to&lt;/span&gt; elements to specify traversal paths. You set the values of&lt;span style="font-style: italic; color: rgb(255, 0, 0);"&gt; xlink:from&lt;/span&gt; and &lt;span style="font-style: italic; color: rgb(255, 0, 0);"&gt;xlink:to&lt;/span&gt; to match the &lt;span style="font-style: italic; color: rgb(255, 0, 0);"&gt;xlink:role&lt;/span&gt; attribute of the source and target resources. e.g.
&lt;blockquote&gt;      &amp;lt;arc1 xlink:type = "arc" xlink:from = "California"
         xlink:to = "Massachusetts" xlink:show="new"
         xlink:actuate="onRequest"&amp;gt;
     &amp;lt;/arc1&amp;gt;&lt;/blockquote&gt;The way these arcs are actually used or activated depends on the software you're working with or that you've created.

&lt;span style="font-weight: bold; color: rgb(0, 0, 0);"&gt;Creating Linkbases&lt;/span&gt;
When you place &lt;span style="color: rgb(255, 0, 0);"&gt;out-of-line links&lt;/span&gt; in their own documents, those documents are called &lt;span style="font-style: italic; color: rgb(255, 0, 0);"&gt;linkbases&lt;/span&gt;. The set of out-of-line links in a linkbase is called a &lt;span style="font-style: italic; color: rgb(255, 0, 0);"&gt;linkset&lt;/span&gt;. You typically have three types of links in a linkbase: extended links, locator links and arcs.

&lt;span style="font-style: italic; color: rgb(0, 0, 153);font-size:130%;" &gt;Introducing XPointers&lt;/span&gt;
When you use XLinks, you can link to a particular document, but many times, you want to be more precise than that. &lt;span style="color: rgb(255, 0, 0);"&gt;XPointers &lt;/span&gt;let us point to specific locations inside a document, and they are coming into more common use.

Here are 2 other package that support XPointers:
&lt;ul&gt;   &lt;li&gt;&lt;a href="http://www.w3.org/amaya"&gt;Amay&lt;/a&gt;a supports XPointers but does not support the full XPath specification that you can use with general XPointers.&lt;/li&gt;   &lt;li&gt;&lt;a href="http://www.labs.fujitsu.com/free/xlip/en/index.html"&gt;Fujitsu's XLip&lt;/a&gt; has a full implementation.&lt;/li&gt; &lt;/ul&gt; W3C divided the XPointer specifications into three recommendations and a working draft:
&lt;ul&gt;   &lt;li&gt;&lt;a href="http://www.w3.rog/tr/xptr-framework"&gt;The XPointer framework&lt;/a&gt;, which gives general background and points to the other three schemes.&lt;/li&gt;   &lt;li&gt;&lt;a href="http://www.w3.rog/tr/xptr-element"&gt;The element scheme&lt;/a&gt;.&lt;/li&gt;   &lt;li&gt;&lt;a href="http://www.w3.rog/tr/xptr-xmlns"&gt;The namespace scheme&lt;/a&gt;.&lt;/li&gt;   &lt;li&gt;&lt;a href="http://www.w3.rog/tr/xptr-xpointer"&gt;The general XPointer scheme&lt;/a&gt;.&lt;/li&gt; &lt;/ul&gt; &lt;span style="font-weight: bold; color: rgb(0, 0, 0);"&gt;Using Barenames&lt;/span&gt;
The &lt;span style="color: rgb(255, 0, 0);"&gt;XPointer Framework&lt;/span&gt; specification says that you can use &lt;span style="font-style: italic; color: rgb(255, 0, 0);"&gt;barename &lt;/span&gt;-- i.e., just the names of elements -- as XPointers. You can append an XPointer to the end of a URI by precedingit with a&lt;span style="color: rgb(255, 0, 0);"&gt; #&lt;/span&gt;. e.g.
&lt;blockquote&gt;xlink:href = "http://www.xmlpowercorp.com/insurance.xml#data"&amp;gt;&lt;/blockquote&gt;which points at the &lt;span style="color: rgb(255, 0, 0);"&gt;&amp;lt;data&amp;gt;&lt;/span&gt; element in &lt;span style="font-style: italic;"&gt;www.xmlpowercorp.com/insurance.xml&lt;/span&gt;.

&lt;span style="font-weight: bold; color: rgb(0, 0, 0);"&gt;Using the Element Scheme&lt;/span&gt;
The&lt;span style="color: rgb(255, 0, 0);"&gt; element scheme&lt;/span&gt; was broken out of the general XPointer scheme to make XPointer easier to implement. In the element scheme, you use &lt;span style="color: rgb(255, 0, 0);"&gt;element()&lt;/span&gt; to indentify element by &lt;span style="color: rgb(255, 0, 0);"&gt;ID&lt;/span&gt;, not by name. e.g.
&lt;blockquote&gt;xlink:href = "http://www.xmlpowercorp.com/insurance.xml#element(data)"&amp;gt;&lt;/blockquote&gt;You can also specify child sequences by number, e.g., to pick out the &lt;span style="color: rgb(255, 0, 0);"&gt;&amp;lt;data&amp;gt;&lt;/span&gt; element's third child element and then identify that element's first child element:
&lt;blockquote&gt;xlink:href = "http://www.xmlpowercorp.com/insurance.xml#element(data/3/1)"&amp;gt;&lt;/blockquote&gt;&lt;span style="font-weight: bold; color: rgb(0, 0, 0);"&gt;Using the Namespace Scheme&lt;/span&gt;
The &lt;span style="color: rgb(255, 0, 0);"&gt;namespace scheme&lt;/span&gt; indicates how to use &lt;span style="color: rgb(255, 0, 0);"&gt;namespace &lt;/span&gt;when pointing to data. e.g. if the &lt;span style="color: rgb(255, 0, 0);"&gt;&amp;lt;data&amp;gt;&lt;/span&gt; element you want to pick out is part of the &lt;span style="font-style: italic; color: rgb(255, 0, 0);"&gt;xpc &lt;/span&gt;namespace, you could speicify that element this way:
&lt;blockquote&gt;xlink:href = "http://www.xmlpowercorp.com/insurance.xml#xmlns(xpc = "http://xmlpowercorp)xpc:data"&amp;gt;&lt;/blockquote&gt;&lt;span style="font-weight: bold; color: rgb(0, 0, 0);"&gt;Using the XPointer Scheme&lt;/span&gt;
The &lt;span style="color: rgb(255, 0, 0);"&gt;Xpointer scheme&lt;/span&gt; extends XPath. Here's what &lt;span style="color: rgb(255, 0, 0);"&gt;a full XPointer&lt;/span&gt; might look like -- note that you use &lt;span style="color: rgb(255, 0, 0);"&gt;xpointer()&lt;/span&gt; here:
&lt;blockquote&gt;xlink:href = "http://www.xmlpowercorp.com/insurance.xml#xpointer(/child::*[position()=199]/child::*[position()=last()])"&amp;gt;&lt;/blockquote&gt;This pick out the last child of the 119th element in &lt;span style="font-style: italic;"&gt;www.xmlpowercorp.com/insurce.xml&lt;/span&gt;. Here, you can use &lt;span style="color: rgb(255, 0, 0);"&gt;full XPath expressions&lt;/span&gt; with general XPointers.

In addtion, the general XPointer scheme extends XPath by letting us select &lt;span style="color: rgb(255, 0, 0);"&gt;points &lt;/span&gt;and &lt;span style="color: rgb(255, 0, 0);"&gt;ranges &lt;/span&gt;besides normal XPath nodes. A &lt;span style="color: rgb(255, 0, 0);"&gt;point &lt;/span&gt;is a specific location in a document, and a &lt;span style="color: rgb(255, 0, 0);"&gt;range &lt;/span&gt;is made up of everything between two points. To support points and ranges, the general XPointer scheme extends the concept of nodes to locations. A &lt;span style="color: rgb(255, 0, 0);"&gt;location &lt;/span&gt;is an XPath node, a point, or a range. &lt;span style="color: rgb(255, 0, 0);"&gt;Node sets&lt;/span&gt; become location sets in the XPointer sepcification. Although XPointers use the same axes as XPaths, there are some new node tests:
&lt;ul&gt;   &lt;li&gt;&lt;span style="font-weight: bold;"&gt;point()&lt;/span&gt; -- Matchs a point in a resource.&lt;/li&gt;   &lt;li&gt;&lt;span style="font-weight: bold;"&gt;range() &lt;/span&gt;-- Matchs a range in a resource.&lt;/li&gt; &lt;/ul&gt; &lt;span style="font-weight: bold; color: rgb(0, 0, 0);"&gt;Creating XPointer Points&lt;/span&gt;
To define an &lt;span style="color: rgb(255, 0, 0);"&gt;XPointer point&lt;/span&gt;, you use two items -- a &lt;span style="color: rgb(255, 0, 0);"&gt;node &lt;/span&gt;and an &lt;span style="color: rgb(255, 0, 0);"&gt;index &lt;/span&gt;that can hold a positive integer or zero. The node specifies an origin for the point, and the index indicates how far the point you want is from that origin. There are two different way of &lt;span style="color: rgb(255, 0, 0);"&gt;measuring &lt;/span&gt;the index: in terms of &lt;span style="color: rgb(255, 0, 0);"&gt;characters &lt;/span&gt;in the document and in terms of a number of &lt;span style="color: rgb(255, 0, 0);"&gt;nodes&lt;/span&gt;.

&lt;span style="font-weight: bold; color: rgb(0, 0, 0);"&gt;Measuring in Characters&lt;/span&gt;
If the starting node can &lt;span style="color: rgb(255, 0, 0);"&gt;contain only text&lt;/span&gt;, but not any child nodes, then the index is measured in characters. Points like these are called &lt;span style="color: rgb(255, 0, 0);"&gt;character-points&lt;/span&gt;. Character-points do not have proceding or following siblings or children. Note also that the general XPointer specification collapses all consecutive whitespace into a single space for counting purposes.

&lt;span style="font-weight: bold; color: rgb(0, 0, 0);"&gt;Measuring in Nodes&lt;/span&gt;
When the start node, also called the &lt;span style="color: rgb(255, 0, 0);"&gt;container node&lt;/span&gt;, has child nodes, the index of a point is measured in child nodes.

&lt;span style="font-weight: bold; color: rgb(0, 0, 0);"&gt;Using Point Fucntions&lt;/span&gt;
When it comes to creating points, you can use the &lt;span style="color: rgb(255, 0, 0);"&gt;point() &lt;/span&gt;function with a predicate. e.g. you want to locate a point right before the l in California in the state example from ch1001.xml:
&lt;blockquote&gt;xpointer(/states/state[1]/name/text()/point()[position()=2])&lt;/blockquote&gt;&lt;span style="font-weight: bold; color: rgb(0, 0, 0);"&gt;Creating XPointer Ranges&lt;/span&gt;
When it comes to creating ranges, all you need are &lt;span style="color: rgb(255, 0, 0);"&gt;two points&lt;/span&gt;: a start point and an end point. This is true as long as they are in the same document and the start point is before or the same as the end point; if the start point and the end point are the same point, the range you create is called a collapsed range.

The general XPointer specification adds to the function in XPath a number of functions to handle ranges:
&lt;blockquote&gt;&lt;span style="font-weight: bold;"&gt;range&lt;/span&gt;(&lt;span style="font-style: italic;"&gt;location-set&lt;/span&gt;) -- Takes the locations you passed to it and returns a range that completely covers the locations.
&lt;span style="font-weight: bold;"&gt;range-insed&lt;/span&gt;(&lt;span style="font-style: italic;"&gt;location-set&lt;/span&gt;) -- Returns a range or ranges covering each locaiton inside the location set; if you pass an element, the result is a range that encloses all that is inside the element.
&lt;span style="font-weight: bold;"&gt;range-to&lt;/span&gt;(&lt;span style="font-style: italic;"&gt;location-set&lt;/span&gt;) -- Returns a range for each location in the locaiton set.
&lt;/blockquote&gt;Besides these functions, the XPointer specification includes a fucntion for string matching, &lt;span style="color: rgb(255, 0, 0);"&gt;string-range()&lt;/span&gt;. You can use this function to return a range for every match to a search string. e.g.
&lt;blockquote&gt;string-range(location-set, string, [index, [length]])&lt;/blockquote&gt;There's a lot more powe with XLinks and XPointers than you'll find with simple HTML hyperlink.

&lt;span style="font-style: italic; color: rgb(0, 0, 153);font-size:130%;" &gt;Introducing XBase&lt;/span&gt;
&lt;a href="http://www.w3.org/tr/xmlbase"&gt;XBase specification&lt;/a&gt; lets us specify a &lt;span style="color: rgb(255, 0, 0);"&gt;base URI&lt;/span&gt; for XML documents, just like the &lt;span style="color: rgb(255, 0, 0);"&gt;&amp;lt;BASE&amp;gt;&lt;/span&gt; element in HTML documents. You can use the &lt;span style="color: rgb(255, 0, 0); font-style: italic;"&gt;xml:base&lt;/span&gt; attribute in an XML document to set the document's base URI. The other URIs in the document are then considered relative URIs, and the URI specified as the base is used to resolve them.

&lt;span style="font-style: italic; color: rgb(0, 0, 153);font-size:130%;" &gt;Introducing XForms&lt;/span&gt;
XForms comes from a parallel construct in HTML -- Web Forms. A Web form lets us display controls such as buttons or list boxes in an HTML page, and XForms are intended to do the same thing in XML. &lt;a href="http://www.w3.org/tr/xforms"&gt;XForms 1.0&lt;/a&gt; is in candidate recommendataion from.

A number of software packages support XForms to some extent.

&lt;span style="font-weight: bold; color: rgb(0, 0, 0);"&gt;Writing XForms&lt;/span&gt;
XForms are used in XML documents, typically in XHTML, so each one needs to start off with an XML declaration.
The next element, the document element, is the &lt;span style="color: rgb(255, 0, 0);"&gt;&amp;lt;html&amp;gt;&lt;/span&gt; element, and you use it to put everything into the &lt;span style="color: rgb(255, 0, 0);"&gt;XHTML &lt;/span&gt;namespace and define 2 other namespace -- &lt;span style="font-style: italic; color: rgb(255, 0, 0);"&gt;ev&lt;/span&gt; for &lt;span style="color: rgb(255, 0, 0);"&gt;XForms events&lt;/span&gt; (such as button clicks) and &lt;span style="font-style: italic; color: rgb(255, 0, 0);"&gt;xforms &lt;/span&gt;for &lt;span style="color: rgb(255, 0, 0);"&gt;XForms elements&lt;/span&gt;, e.g.:
&lt;blockquote&gt;&amp;lt;html xmlns="http://www.w3.org/1999/xhtml"
 xmlns:ev="http://www.w3.org/2001/xml-events"
 xmlns:xforms="http://www.w3.org/2002/xforms/cr"&amp;gt;&lt;/blockquote&gt;&lt;span style="font-weight: bold; color: rgb(0, 0, 0);"&gt;Separating Data from a Presentation&lt;/span&gt;
A major feature of XForms is the separation of data from presentation; this means that the data for the controls in an XForm is stored separately from the presentation part. You use the &lt;span style="color: rgb(255, 0, 0);"&gt;&amp;lt;xforms:model&amp;gt;&lt;/span&gt; element to specify what data an XForm should hold. You can create an XForms model in the document's &lt;span style="color: rgb(255, 0, 0);"&gt;&amp;lt;head&amp;gt;&lt;/span&gt; element.

Inside the model, you specify the submission mechanism for the data in an &lt;span style="color: rgb(255, 0, 0);"&gt;&amp;lt;xforms:submission&amp;gt;&lt;/span&gt; element. And you store the actual data in an &lt;span style="color: rgb(255, 0, 0);"&gt;&amp;lt;xforms:instance&amp;gt;&lt;/span&gt; element. In this example, you'll have an input control whose data will be stored in an &lt;span style="color: rgb(255, 0, 0);"&gt;&amp;lt;input&amp;gt;&lt;/span&gt; element, a select control whose data will be stored in a &lt;span style="color: rgb(255, 0, 0);"&gt;&amp;lt;select&amp;gt;&lt;/span&gt; element. e.g.
&lt;blockquote&gt;  &amp;lt;head&amp;gt;
     &amp;lt;xforms:model&amp;gt;
         &amp;lt;xforms:submission localfile="data.xml"/&amp;gt;
         &amp;lt;xforms:instance&amp;gt;
             &amp;lt;data xmlns=""&amp;gt;
&amp;lt;input&amp;gt;Hello!&amp;lt;/input&amp;gt;
&amp;lt;select&amp;gt;1&amp;lt;/select&amp;gt;
&amp;lt;selectboolean&amp;gt;true&amp;lt;/selectboolean&amp;gt;
&amp;lt;message&amp;gt;Hello!&amp;lt;/message&amp;gt;
             &amp;lt;/data&amp;gt;
         &amp;lt;/xforms:instance&amp;gt;
     &amp;lt;/xforms:model&amp;gt;
 &amp;lt;/head&amp;gt;&lt;/blockquote&gt;&lt;span style="font-weight: bold; color: rgb(0, 0, 0);"&gt;Creating Input Controls&lt;/span&gt;
In the&lt;span style="color: rgb(255, 0, 0);"&gt; &amp;lt;body&amp;gt;&lt;/span&gt; section, you'll start creating the controls you'll use, starting with the input control. You create an input control by using the &lt;span style="color: rgb(255, 0, 0);"&gt;&amp;lt;xforms:input&amp;gt;&lt;/span&gt; element. You tie this control to the data you've stored in the &lt;span style="color: rgb(255, 0, 0);"&gt;&amp;lt;input&amp;gt;&lt;/span&gt; element in the &lt;span style="color: rgb(255, 0, 0);"&gt;&amp;lt;head&amp;gt;&lt;/span&gt; element by using the &lt;span style="font-style: italic; color: rgb(255, 0, 0);"&gt;ref &lt;/span&gt;attribute, which you'll set to &lt;span style="color: rgb(255, 0, 0);"&gt;"/data/input"&lt;/span&gt; in this example:
&lt;blockquote&gt;&amp;lt;xforms:input ref="/data/input"&amp;gt;&amp;lt;/xforms:input&amp;gt;&lt;/blockquote&gt;&lt;span style="font-weight: bold; color: rgb(0, 0, 0);"&gt;Creating Select Controls&lt;/span&gt;
A select control can display either a list of items to choose from or a drop-down list, and you create these controls by using the &lt;span style="color: rgb(255, 0, 0);"&gt;&amp;lt;xforms:select&amp;gt;&lt;/span&gt; element or the &lt;span style="color: rgb(255, 0, 0);"&gt;&amp;lt;xforms:select1&amp;gt;&lt;/span&gt; element (which creates single-selection select controls). You should display a list of all items in the controls by setting the &lt;span style="font-style: italic; color: rgb(255, 0, 0);"&gt;appearance &lt;/span&gt;attrebute to &lt;span style="color: rgb(255, 0, 0);"&gt;"full"&lt;/span&gt;. e.g.
&lt;blockquote&gt;    &amp;lt;xforms:select appearance="full" ref="/data/select"&amp;gt;
         &amp;lt;xforms:item&amp;gt;
&amp;lt;xforms:value&amp;gt;1&amp;lt;/xforms:value&amp;gt;
&amp;lt;xforms:label&amp;gt;Item 1&amp;lt;/xforms:label&amp;gt;
         &amp;lt;/xforms:item&amp;gt;
         &amp;lt;xforms:item&amp;gt;
&amp;lt;xforms:value&amp;gt;2&amp;lt;/xforms:value&amp;gt;
&amp;lt;xforms:label&amp;gt;Item 2&amp;lt;/xforms:label&amp;gt;
         &amp;lt;/xforms:item&amp;gt;
         &amp;lt;xforms:item&amp;gt;
&amp;lt;xforms:value&amp;gt;3&amp;lt;/xforms:value&amp;gt;
&amp;lt;xforms:label&amp;gt;Item 3&amp;lt;/xforms:label&amp;gt;
         &amp;lt;/xforms:item&amp;gt;
     &amp;lt;/xforms:select&amp;gt;&lt;/blockquote&gt;&lt;span style="font-weight: bold; color: rgb(0, 0, 0);"&gt;Creating Buttons&lt;/span&gt;
Clicking the example button will display a message box that shows the text stored in the &lt;span style="color: rgb(255, 0, 0);"&gt;&amp;lt;message&amp;gt;&lt;/span&gt; element in the doument head's &lt;span style="color: rgb(255, 0, 0);"&gt;&amp;lt;data&amp;gt;&lt;/span&gt; element:
To display text in a message box, you can use the &lt;span style="color: rgb(255, 0, 0);"&gt;&amp;lt;xforms:message&amp;gt;&lt;/span&gt; element. To display a button, you use a &lt;span style="color: rgb(255, 0, 0);"&gt;&amp;lt;xforms:trigger&amp;gt;&lt;/span&gt; element and give it an caption by using &lt;span style="color: rgb(255, 0, 0);"&gt;&amp;lt;xforms:label&amp;gt;&lt;/span&gt; element. To display a message box when the button is clicked, you set the &lt;span style="color: rgb(255, 0, 0);"&gt;&amp;lt;xforms:message&amp;gt;&lt;/span&gt; element's &lt;span style="font-style: italic; color: rgb(255, 0, 0);"&gt;event &lt;/span&gt;attribute to &lt;span style="color: rgb(255, 0, 0);"&gt;"click"&lt;/span&gt;; to display the message, you set the message box's &lt;span style="color: rgb(255, 0, 0); font-style: italic;"&gt;ref &lt;/span&gt;attribute to &lt;span style="color: rgb(255, 0, 0);"&gt;"/data/message"&lt;/span&gt;. To make the message box display pear automatically after a few seconds, you set its &lt;span style="font-style: italic; color: rgb(255, 0, 0);"&gt;level &lt;/span&gt;attribute to &lt;span style="color: rgb(255, 0, 0);"&gt;"ephemeral"&lt;/span&gt;. e.g.
&lt;blockquote&gt;      &amp;lt;xforms:trigger&amp;gt;
&amp;lt;xforms:label&amp;gt;Click Me&amp;lt;/xforms:label&amp;gt;
        &amp;lt;xforms:message ev:event="click" level="ephemeral"
             ref="/data/message"/&amp;gt;
     &amp;lt;/xforms:trigger&amp;gt;&lt;/blockquote&gt;&lt;span style="font-weight: bold; color: rgb(0, 0, 0);"&gt;Creating Select Booleans&lt;/span&gt;
You use the &lt;span style="color: rgb(255, 0, 0);"&gt;&amp;lt;xforms:selectboolean&amp;gt;&lt;/span&gt; element to create one and a &lt;span style="color: rgb(255, 0, 0);"&gt;&amp;lt;xforms:label&amp;gt;&lt;/span&gt; element to give it a label. You can connect the select Boolean to the data in the &lt;span style="color: rgb(255, 0, 0);"&gt;&amp;lt;data&amp;gt;&lt;/span&gt; element's &lt;span style="color: rgb(255, 0, 0);"&gt;&amp;lt;selectboolean&amp;gt;&lt;/span&gt; element by using the &lt;span style="font-style: italic; color: rgb(255, 0, 0);"&gt;ref &lt;/span&gt;attribute. e.g.
&lt;blockquote&gt;      &amp;lt;xforms:selectboolean ref="/data/selectboolean"&amp;gt;
&amp;lt;xforms:label&amp;gt;Click Me&amp;lt;/xforms:label&amp;gt;
     &amp;lt;/xforms:selectboolean&amp;gt;&lt;/blockquote&gt;&lt;span style="font-weight: bold; color: rgb(0, 0, 0);"&gt;Creating Submit and Rest Buttons&lt;/span&gt;
The final controls for the XForms example are &lt;span style="color: rgb(255, 0, 0);"&gt;Submit &lt;/span&gt;and &lt;span style="color: rgb(255, 0, 0);"&gt;Rest &lt;/span&gt;buttons; the Submit button submits the XForm and store its data in data.xml, and the Reset button resets the data in the XForm back to its original value. These controls are supported by their own element: &lt;blockquote&gt;&amp;lt;xforms:submit&amp;gt; and &amp;lt;xforms:reset&amp;gt;. e.g.
   &amp;lt;xforms:submit&amp;gt;
&amp;lt;xforms:label&amp;gt;Submit&amp;lt;/xforms:label&amp;gt;
    &amp;lt;/xforms:submit&amp;gt;

     &amp;lt;xforms:trigger&amp;gt;
&amp;lt;xforms:label&amp;gt;Reset&amp;lt;/xforms:label&amp;gt;
         &amp;lt;xforms:reset ev:event="DOMActivate"/&amp;gt;
     &amp;lt;/xforms:trigger&amp;gt;&lt;/blockquote&gt;BTW: Here's how to declare XLink elements and attributes to make the documents valid:
&lt;blockquote&gt;&amp;lt;!ELEMENT link&amp;gt;
&amp;lt;!ATTLIST link xmlns:xlink CDATA #FIXED "http://www.w3.org/1999/xlink" xlink:type CDATA #FIXED "simple" xlink:href CDATA #REQUIRED xlink:show (new | replace | embed | none | other) #IMPLIED "replace"&amp;gt;&lt;/blockquote&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/10261622-112169461019463210?l=cherub325.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cherub325.blogspot.com/feeds/112169461019463210/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=10261622&amp;postID=112169461019463210' title='7 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10261622/posts/default/112169461019463210'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10261622/posts/default/112169461019463210'/><link rel='alternate' type='text/html' href='http://cherub325.blogspot.com/2005/07/teach-yourself-xml-in-21-days-day-14.html' title='Teach Yourself XML in 21 Days, Day 14'/><author><name>CHERUB</name><uri>http://www.blogger.com/profile/05541000949655411328</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='14' height='32' src='http://static.flickr.com/29/61835177_20e0034f42_t.jpg'/></author><thr:total>7</thr:total></entry><entry><id>tag:blogger.com,1999:blog-10261622.post-112125094673722074</id><published>2005-07-13T00:09:00.000+01:00</published><updated>2005-07-13T11:37:48.660+01:00</updated><title type='text'>Teach Yourself XML in 21 Days, Day 13</title><content type='html'>&lt;span class="dropcap"&gt;C&lt;/span&gt;&lt;span style="font-weight: bold;font-size:130%;" &gt;reating Graphics and Multimedia: SVG and SMIL&lt;/span&gt;
Today you're going to take a look at 2 XML applications -- &lt;span style="color: rgb(255, 0, 0);"&gt;Scalable Vector Graphics (SVG) &lt;/span&gt;and &lt;span style="color: rgb(255, 0, 0);"&gt;Synchronized Multimedia Integration Language (SMIL)&lt;/span&gt;. &lt;span style="color: rgb(255, 0, 0);"&gt;SVG &lt;/span&gt;lets you create 2-dimensional graphics, and &lt;span style="color: rgb(255, 0, 0);"&gt;SMIL &lt;/span&gt;lets you create multimedia presentations, including images, text, and music.

&lt;span style="font-style: italic; color: rgb(0, 0, 153);font-size:130%;" &gt;Introducing SVG&lt;/span&gt;
There have been a number of XML-based 2D graphic languages over the years. One of them -- &lt;span style="color: rgb(255, 0, 0);"&gt;Vector Markup Language (VML)&lt;/span&gt; -- is supported only in Internet Explorer. It's more correct to call VML a semi-XML language, actually. VML has a major drawback: it is supported only in IE.
However, &lt;a href="http://www.google.com/apis/maps/documentation/#Polylines"&gt;Google Map API&lt;/a&gt; using VML to draw polyline on its map.

&lt;span style="color: rgb(255, 0, 0);"&gt;SVG &lt;/span&gt;is more broadly based, and by using the &lt;a href="http://www.adobe.com/svg/viewer/install"&gt;SVG Viewer plug-in from Adobe&lt;/a&gt;, you can use SVG in various Web browsers.

The W3C recommendation for &lt;a href="http://www.w3.org/tr/svg"&gt;SVG 1.0&lt;/a&gt; and &lt;a href="http://www.w3.org/tr/svg11"&gt;SVG 1.1&lt;/a&gt;. SVG is a general-purpose 2D graphic language that supports all kinds of powerful tools. SVG allows for three types of graphic objects: &lt;span style="font-style: italic; color: rgb(255, 0, 0);"&gt;vector graphic shapes&lt;/span&gt;, &lt;span style="font-style: italic; color: rgb(255, 0, 0);"&gt;images &lt;/span&gt;and &lt;span style="font-style: italic; color: rgb(255, 0, 0);"&gt;text&lt;/span&gt;. SVG includes lots of built-in elements and predefined color names. We can only have a very basic understanding of SVG today.

&lt;span style="font-style: italic; color: rgb(0, 0, 153);font-size:130%;" &gt;Creating an SVG Document&lt;/span&gt;
SVG is really XML. You use an &lt;span style="color: rgb(255, 0, 0);"&gt;XML declaration&lt;/span&gt; at the beginning of an SVG document. Each SVG document should be in the official &lt;span style="font-style: italic; color: rgb(255, 0, 0);"&gt;namespace &lt;/span&gt;&lt;span style="font-style: italic;"&gt;http://www.w3.org/2000/svg&lt;/span&gt;. The &lt;span style="color: rgb(255, 0, 0);"&gt;public identifier&lt;/span&gt; for SVG 1.0 is &lt;span style="font-style: italic;"&gt;"PUBLIC "-//W3C//DTD SVG 1.0//EN"&lt;/span&gt;. The &lt;span style="color: rgb(255, 0, 0);"&gt;DTD &lt;/span&gt;for SVG is at &lt;span style="font-style: italic;"&gt;http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg1.0.dtd&lt;/span&gt;. The &lt;span style="color: rgb(255, 0, 0);"&gt;MIME type&lt;/span&gt; for SVG (which is important if you want to create SVG document on a Web server and send them to a browser) is &lt;span style="font-style: italic;"&gt;image/svg+xml&lt;/span&gt;. And you give SVG documents the extension &lt;span style="font-style: italic; color: rgb(255, 0, 0);"&gt;.svg&lt;/span&gt;. Note that you can use the&lt;span style="color: rgb(255, 0, 0);"&gt; &amp;lt;svg&amp;gt;&lt;/span&gt; element's &lt;span style="font-style: italic; color: rgb(255, 0, 0);"&gt;height &lt;/span&gt;and &lt;span style="font-style: italic; color: rgb(255, 0, 0);"&gt;width &lt;/span&gt;attributes to limit an SVG display to a specific box.

All the SVG will go inside the &lt;span style="color: rgb(255, 0, 0);"&gt;&amp;lt;svg&amp;gt;&lt;/span&gt; &lt;span style="color: rgb(255, 0, 0);"&gt;document element&lt;/span&gt;, beginning with the &lt;span style="color: rgb(255, 0, 0);"&gt;&amp;lt;title&amp;gt;&lt;/span&gt; element. e.g.
&lt;blockquote&gt;&amp;lt;?xml version="1.0" encoding="UTF-8"?&amp;gt;
&amp;lt;svg xmlns="http://www.w3.org/2000/svg"&amp;gt;
&amp;lt;!DOCTYPE svg "PUBLIC "-//W3C//DTD SVG 1.0//EN" "http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg1.0.dtd"&amp;gt;
&amp;lt;title&amp;gt; Title &amp;lt;/title&amp;gt;
...
&amp;lt;/svg&amp;gt;&lt;/blockquote&gt;&lt;span style="font-weight: bold; color: rgb(0, 0, 0);"&gt;Creating Rectangles&lt;/span&gt;
To create rectangles, you can use the &lt;span style="color: rgb(255, 0, 0);"&gt;&amp;lt;rect&amp;gt;&lt;/span&gt; element. The required attributes are &lt;span style="font-style: italic; color: rgb(255, 0, 0);"&gt;height &lt;/span&gt;and &lt;span style="font-style: italic; color: rgb(255, 0, 0);"&gt;width&lt;/span&gt;. As in CSS, dimensions in SVG can be specified with &lt;span style="font-style: italic;"&gt;px&lt;/span&gt;, &lt;span style="font-style: italic;"&gt;pt&lt;/span&gt;, &lt;span style="font-style: italic;"&gt;in&lt;/span&gt;, or &lt;span style="font-style: italic;"&gt;cm&lt;/span&gt;; the defalut measurement is pixels. In addtion, you can use abstract units in SVG. e.g.
&lt;blockquote&gt;&amp;lt;rect x="100" y="100" width="300" height="100"/&amp;gt;&lt;/blockquote&gt;&lt;span style="font-weight: bold; color: rgb(0, 0, 0);"&gt;Using CSS Styles&lt;/span&gt;
In turns out that SVG elements have a &lt;span style="font-style: italic; color: rgb(255, 0, 0);"&gt;style &lt;/span&gt;attribute that you can assign CSS styles to. e.g.
&lt;blockquote&gt;&amp;lt;rect x="100" y="100" width="300" height="100" style="fill:none; stroke:blue; stroke-width:2"/&amp;gt;&lt;/blockquote&gt;You can also use many CSS properties directly as attributes of SVG elements. e.g.
&lt;blockquote&gt;&amp;lt;rect x="100" y="100" width="300" height="100" fill="none" stroke="blue" stroke-width="2"/&amp;gt;&lt;/blockquote&gt;&lt;span style="font-weight: bold; color: rgb(0, 0, 0);"&gt;Creating Circles&lt;/span&gt;
You use the &lt;span style="color: rgb(255, 0, 0);"&gt;&amp;lt;circle&amp;gt;&lt;/span&gt; SVG element to create circles. e.g.
&lt;blockquote&gt;&amp;lt;circles r="100" cx="150px" cy="150px" style="stroke:blue"/&amp;gt;&lt;/blockquote&gt;&lt;span style="font-weight: bold; color: rgb(0, 0, 0);"&gt;Creating Ellipses&lt;/span&gt;
You can create an ellipse by using the SVG &lt;span style="color: rgb(255, 0, 0);"&gt;&amp;lt;ellipse&amp;gt;&lt;/span&gt; element. e.g.
&lt;blockquote&gt;&amp;lt;ellipse cx="150" cy="150" rx="150" ry="150" style="stroke:blue"/&amp;gt;&lt;/blockquote&gt;&lt;span style="font-weight: bold; color: rgb(0, 0, 0);"&gt;Creating Lines&lt;/span&gt;
The SVG &lt;span style="color: rgb(255, 0, 0);"&gt;&amp;lt;line&amp;gt;&lt;/span&gt; element lets you draw lines. You can use the &lt;span style="font-style: italic; color: rgb(255, 0, 0);"&gt;x1&lt;/span&gt;, &lt;span style="font-style: italic; color: rgb(255, 0, 0);"&gt;y1&lt;/span&gt;, &lt;span style="font-style: italic; color: rgb(255, 0, 0);"&gt;x2&lt;/span&gt;, and &lt;span style="font-style: italic; color: rgb(255, 0, 0);"&gt;y2 &lt;/span&gt;attributes to draw a line from (x1, y1) to (x2, y2). e.g.
&lt;blockquote&gt;&amp;lt;line x1="180" y1="80" x2="190" y2="50" style="stroke:blue"/&amp;gt;&lt;/blockquote&gt;&lt;span style="font-weight: bold; color: rgb(0, 0, 0);"&gt;Creating Polylines&lt;/span&gt;
SVG has a &lt;span style="color: rgb(255, 0, 0);"&gt;&amp;lt;polyline&amp;gt;&lt;/span&gt; element that lets you draw multiple lines in connect-the-dots fashion. The &lt;span style="font-style: italic; color: rgb(255, 0, 0);"&gt;points &lt;/span&gt;attributes is assigned a list of points like this : "x1, y1 x2, y2 x3, y3......" e.g.
&lt;blockquote&gt;&amp;lt;polyline points="80,80 80,100 100,100" style="stroke:red"/&amp;gt;&lt;/blockquote&gt;&lt;span style="font-weight: bold; color: rgb(0, 0, 0);"&gt;Creating Polygons&lt;/span&gt;
The &lt;span style="color: rgb(255, 0, 0);"&gt;&amp;lt;polygon&amp;gt;&lt;/span&gt; element is the last of the basic shape elements in SVG. It requires a &lt;span style="font-style: italic; color: rgb(255, 0, 0);"&gt;points &lt;/span&gt;attribute that holds a list of points. The &lt;span style="color: rgb(255, 0, 0);"&gt;&amp;lt;polygon&amp;gt;&lt;/span&gt; element connects the dots and creates a closed figure. e.g.
&lt;blockquote&gt;&amp;lt;polygon points="30,120 70,80 110,120 90,180 50,180 30,120" style="fill:red"/&amp;gt;&lt;/blockquote&gt;&lt;span style="color: rgb(0, 0, 0); font-weight: bold;"&gt;Creating Text&lt;/span&gt;
You use &lt;span style="color: rgb(255, 0, 0);"&gt;&amp;lt;text&amp;gt;&lt;/span&gt; element to display text. It isn't empty; you enclose the text you want to display in it. This element has no required attributes, but to position text, you can use the &lt;span style="font-style: italic; color: rgb(255, 0, 0);"&gt;x&lt;/span&gt; and &lt;span style="font-style: italic; color: rgb(255, 0, 0);"&gt;y&lt;/span&gt; attributes to specify the location of the upper-left cornet of the text. e.g.
&lt;blockquote&gt;&amp;lt;text x="40" y="100" style="font-family:sans-serif"&amp;gt;
TEXT
&amp;lt;/text&amp;gt;&lt;/blockquote&gt;&lt;span style="font-weight: bold; color: rgb(0, 0, 0);"&gt;Creating Gradients&lt;/span&gt;
SVG supports many &lt;span style="color: rgb(255, 0, 0);"&gt;sophisticated graphics effects&lt;/span&gt;, such as color gradients. e.g. You start out by defining a gradient in an element named &lt;span style="color: rgb(255, 0, 0);"&gt;&amp;lt;defs&amp;gt;&lt;/span&gt;. You're goint to create a linear gradient and name it &lt;span style="font-style: italic; color: rgb(255, 0, 0);"&gt;gradient1&lt;/span&gt;, and you can do this by using the &lt;span style="color: rgb(255, 0, 0);"&gt;&amp;lt;linearGradient&amp;gt;&lt;/span&gt; element and its &lt;span style="font-style: italic; color: rgb(255, 0, 0);"&gt;id &lt;/span&gt;attribute. This gradient starts with black at a location 5% of the way through the figure, which you can specify with a &lt;span style="color: rgb(255, 0, 0);"&gt;&amp;lt;stop&amp;gt;&lt;/span&gt; element. The gradient becomes pure blue at 95% though the figure. All that remains is to put it to work, and you can do that by referencing it in the &lt;span style="font-style: italic; color: rgb(255, 0, 0);"&gt;fill &lt;/span&gt;attribute as&lt;span style="font-style: italic;"&gt; "url(#gradient1)"&lt;/span&gt;. e.g.
&lt;blockquote&gt;&amp;lt;?xml version="1.0" encoding="UTF-8"?&amp;gt;
&amp;lt;svg xmlns="http://www.w3.org/2000/svg"&amp;gt;
&amp;lt;defs&amp;gt;
&amp;lt;linearGradient id="gradient1"&amp;gt;
&amp;lt;stop offset="5%" stop-color="#000000" /&amp;gt;
&amp;lt;stop offset="95% stop-color="#0000FF" /&amp;gt;
&amp;lt;/linearGradient&amp;gt;
&amp;lt;/defs&amp;gt;
&amp;lt;rect fill="url(#gradient1)" stroke="blue" x="40" y="100" width="300" height="150"/gt;
&amp;lt;/svg&amp;gt;&lt;/blockquote&gt;&lt;span style="font-weight: bold; color: rgb(0, 0, 0);"&gt;Creating Paths&lt;/span&gt;
Another sophisticated aspect of SVG is that it enables you to create &lt;span style="color: rgb(255, 0, 0);"&gt;visual paths&lt;/span&gt;, which you do by using the &lt;span style="color: rgb(255, 0, 0);"&gt;&amp;lt;path&amp;gt;&lt;/span&gt; element. This element has one required attribute, &lt;span style="font-style: italic; color: rgb(255, 0, 0);"&gt;d&lt;/span&gt;, which defines the path. The syntax of this attribute is a little involved; it contains of coordinates and single-letter commands, such as:
&lt;ul&gt;   &lt;li&gt;&lt;span style="font-weight: bold;"&gt;M&lt;/span&gt; -- Indicate a "move to" operation.&lt;/li&gt;   &lt;li&gt;&lt;span style="font-weight: bold;"&gt;L&lt;/span&gt; -- Indicate a "line to" operation.&lt;/li&gt;   &lt;li&gt;&lt;span style="font-weight: bold;"&gt;H&lt;/span&gt; -- Draw a horizontal line.&lt;/li&gt;   &lt;li&gt;&lt;span style="font-weight: bold;"&gt;V&lt;/span&gt; -- Draw a vertical line.&lt;/li&gt;   &lt;li&gt;&lt;span style="font-weight: bold;"&gt;S&lt;/span&gt; -- Draw a cubic Bezier curve from the current point to (x, y). The first control point is assumed to be the reflection of the second control point in the previous command.&lt;/li&gt;   &lt;li&gt;&lt;span style="font-weight: bold;"&gt;C&lt;/span&gt; -- Draw a cubic Bezier curve from the current point to (x, y), using (x1, y1) as the control point at the beginning of the curve and (x2, y2) as the control point at the end of the curve.&lt;/li&gt;&lt;/ul&gt;   e.g.
&lt;blockquote&gt; &amp;lt;path style="stroke:blue" d="M100,160 C100,60 250,60 250,140 S400,260 400,160"/&amp;gt;&lt;/blockquote&gt;
&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://photos1.blogger.com/blogger/3518/785/1600/1.jpg"&gt;&lt;img style="margin: 0pt 10px 10px 0pt; float: left; cursor: pointer;" src="http://photos1.blogger.com/blogger/3518/785/320/1.jpg" alt="" border="0" /&gt;&lt;/a&gt;









&lt;span style="font-weight: bold; color: rgb(0, 0, 0);"&gt;
Creating Text Paths&lt;/span&gt;
You can create text paths to make text flow as you want it to by using the &lt;span style="color: rgb(255, 0, 0);"&gt;&amp;lt;textPath&amp;gt;&lt;/span&gt; and &lt;span style="color: rgb(255, 0, 0);"&gt;&amp;lt;path&amp;gt;&lt;/span&gt; elements.

First, you define the path, giving it the ID &lt;span style="font-style: italic;"&gt;path1&lt;/span&gt;. Next you add a &lt;span style="color: rgb(255, 0, 0);"&gt;&amp;lt;text&amp;gt;&lt;/span&gt; element to enclose the text. Next you use an enclosed &lt;span style="color: rgb(255, 0, 0);"&gt;&amp;lt;textpath&amp;gt;&lt;/span&gt; element to define the path you want the text to follow, refenercing the path, &lt;span style="font-style: italic;"&gt;path1&lt;/span&gt;, by using an &lt;span style="color: rgb(255, 0, 0);"&gt;XLink&lt;/span&gt; (which you'll see more about in Day 13). e.g.
&lt;blockquote&gt;&amp;lt;path id="path1" style="fill:none"
d="M100,160 C100,60 250,60 250,140 S400,260 400,160"/&amp;gt;
&amp;lt;text x="40" y="100" font-family="sans-serif" font-size="16pt"&amp;gt;
&amp;lt;textPath xlink:href="#path1"
xmlns:xlink="http://www.w3.org/1999/xlink"&amp;gt;
     Here's how to create an artful curved text path.
&amp;lt;/textPath&amp;gt;
&amp;lt;/text&amp;gt;&lt;/blockquote&gt;
&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://photos1.blogger.com/blogger/3518/785/1600/2.jpg"&gt;&lt;img style="margin: 0pt 10px 10px 0pt; float: left; cursor: pointer;" src="http://photos1.blogger.com/blogger/3518/785/320/2.jpg" alt="" border="0" /&gt;&lt;/a&gt;









&lt;span style="font-weight: bold; color: rgb(0, 0, 0);"&gt;
Creating Groups and Transformations&lt;/span&gt;
SVG allows you to group visual items together by using the &lt;span style="color: rgb(255, 0, 0);"&gt;&amp;lt;g&amp;gt;&lt;/span&gt; element and treat them as on item. e.g. You can &lt;span style="color: rgb(255, 0, 0);"&gt;rotate &lt;/span&gt;and &lt;span style="color: rgb(255, 0, 0);"&gt;translate &lt;/span&gt;a group that consists of an ellipse and some text. Rotating and translating are seperate operations, and you start by translating the group by +20 pixels in the x direction and +10 pixels in the y directions. Next, you rotate the group by 20 degrees.
&lt;blockquote&gt; &amp;lt;g transform="translate(20, 10)"&amp;gt;
  &amp;lt;g transform="rotate(20)"&amp;gt;
      &amp;lt;ellipse cx="150" cy="100" rx="100" ry="50"
          fill="none" stroke="darkmagenta" stroke-width="4"/&amp;gt;
      &amp;lt;text x="100" y="100" font-size="20"
          font-family="sans-serif" fill="navy" &amp;gt;
          Rotations!
      &amp;lt;/text&amp;gt;
  &amp;lt;/g&amp;gt;
&amp;lt;/g&amp;gt;&lt;/blockquote&gt;
&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://photos1.blogger.com/blogger/3518/785/1600/3.jpg"&gt;&lt;img style="margin: 0pt 10px 10px 0pt; float: left; cursor: pointer;" src="http://photos1.blogger.com/blogger/3518/785/320/3.jpg" alt="" border="0" /&gt;&lt;/a&gt;








&lt;span style="font-weight: bold; color: rgb(0, 0, 0);"&gt;
Creating Animation&lt;/span&gt;
SVG not only draws static 2D images, but it allows you to &lt;span style="color: rgb(255, 0, 0);"&gt;animate &lt;/span&gt;them as well, and Adobes' SVG Viewer supports animation. To animate graphics, you use the&lt;span style="color: rgb(255, 0, 0);"&gt; &amp;lt;animate&amp;gt;&lt;/span&gt; element, along with various attributes. e.g. You use &lt;span style="color: rgb(255, 0, 0);"&gt;&amp;lt;animate&amp;gt;&lt;/span&gt; element inside the &lt;span style="color: rgb(255, 0, 0);"&gt;&amp;lt;rect&amp;gt;&lt;/span&gt; element to animate the rectangle. When you animate an element such as &lt;span style="color: rgb(255, 0, 0);"&gt;&amp;lt;rect&amp;gt;&lt;/span&gt;, you really &lt;span style="color: rgb(255, 0, 0);"&gt;animate its attributes&lt;/span&gt;, such as &lt;span style="font-style: italic; color: rgb(255, 0, 0);"&gt;x&lt;/span&gt;, &lt;span style="font-style: italic; color: rgb(255, 0, 0);"&gt;y&lt;/span&gt;, &lt;span style="font-style: italic; color: rgb(255, 0, 0);"&gt;width&lt;/span&gt;, &lt;span style="font-style: italic; color: rgb(255, 0, 0);"&gt;height&lt;/span&gt;, over a period of time. To animate the &lt;span style="font-style: italic; color: rgb(255, 0, 0);"&gt;x&lt;/span&gt; attribute of the &lt;span style="color: rgb(255, 0, 0);"&gt;&amp;lt;rect&amp;gt;&lt;/span&gt; element, making it change from a value of 200 to 100 over a period of 10 seconds, starting when the rectangle first appears. In the following example, you set the &lt;span style="font-style: italic; color: rgb(255, 0, 0);"&gt;attributeName &lt;/span&gt;attribute to the name of the attribute you want to work with, &lt;span style="color: rgb(255, 0, 0); font-style: italic;"&gt;x&lt;/span&gt;, and then set the &lt;span style="font-style: italic; color: rgb(255, 0, 0);"&gt;attributeType &lt;/span&gt;attribute to "&lt;span style="font-style: italic;"&gt;XML&lt;/span&gt;", meaning that this is an SVG attribute (the other option is "&lt;span style="font-style: italic;"&gt;CSS&lt;/span&gt;", which means you want to work with a CSS property). The &lt;span style="font-style: italic; color: rgb(255, 0, 0);"&gt;freeze &lt;/span&gt;attribute lets you specify whether you want the results of animation to stick around after the animation process is over. Setting freeze to "&lt;span style="font-style: italic;"&gt;fill&lt;/span&gt;" means that you don't want the graphics element you're working with to return to its original appearance when the animation is done.
&lt;blockquote&gt;  &amp;lt;rect x="200" y="100" width="200" height="100" fill="blue"&amp;gt;
   &amp;lt;animate attributeName="x" attributeType="XML"
       begin="0s" dur="10s" fill="freeze" from="200" to="100" /&amp;gt;
&amp;lt;/rect&amp;gt;&lt;/blockquote&gt;&lt;span style="font-weight: bold; color: rgb(0, 0, 0);"&gt;Creating Links&lt;/span&gt;
You can create &lt;span style="color: rgb(255, 0, 0);"&gt;hyperlinks &lt;/span&gt;by using a &lt;span style="color: rgb(255, 0, 0);"&gt;&amp;lt;a&amp;gt;&lt;/span&gt; element in SVG. However, SVG uses &lt;span style="color: rgb(255, 0, 0);"&gt;XLinks&lt;/span&gt;. The &lt;span style="color: rgb(255, 0, 0);"&gt;XLink namespace&lt;/span&gt; is "&lt;span style="font-style: italic;"&gt;http://www.w3.org/1999/xlink&lt;/span&gt;", and you need to define a &lt;span style="color: rgb(255, 0, 0);"&gt;namespace prefix&lt;/span&gt;, &lt;span style="font-style: italic;"&gt;xlink&lt;/span&gt;, to go with that namespace. Then, use &lt;span style="color: rgb(255, 0, 0);"&gt;&amp;lt;a&amp;gt;&lt;/span&gt; element's required &lt;span style="font-style: italic; color: rgb(255, 0, 0);"&gt;XLink href&lt;/span&gt; attribute to specify the URI to link to. e.g. You're going to use an ellipse as a hyperlink and display some underlined text in it to make it clear that the ellipse is a hyperlink.
&lt;blockquote&gt;&amp;lt;?xml version="1.0" standalone="no"?&amp;gt;
&amp;lt;svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"&amp;gt;
&amp;lt;text y="40" style="font-size:24pt"&amp;gt;
   Using links
&amp;lt;/text&amp;gt;
&amp;lt;a xlink:href="http://www.w3.org/TR/SVG/"&amp;gt;
&amp;lt;g&amp;gt;
   &amp;lt;ellipse cx="200" cy="100" rx="100" ry="50" fill="cyan" /&amp;gt;
&amp;lt;text y="105" x="125" style="font-size:24pt" text-decoration="underline"&amp;gt;
       Click here!
   &amp;lt;/text&amp;gt;
&amp;lt;/g&amp;gt;
&amp;lt;/a&amp;gt;
&amp;lt;/svg&amp;gt;&lt;/blockquote&gt;&lt;span style="font-weight: bold; color: rgb(0, 0, 0);"&gt;Creating Scripts&lt;/span&gt;
You can use &lt;span style="color: rgb(255, 0, 0);"&gt;JavaScrpit &lt;/span&gt;to work with SVG. e.g. You can add to a rectangle a script that causes the rectangle to grow when it is &lt;span style="color: rgb(255, 0, 0);"&gt;clicked&lt;/span&gt;. You start by creating the rectangle itself. Note, in particular, the &lt;span style="font-style: italic; color: rgb(255, 0, 0);"&gt;onclick &lt;/span&gt;attribute, which lets the rectangle handle mouse-click &lt;span style="color: rgb(255, 0, 0);"&gt;events&lt;/span&gt;. There are the event attributes that element such as &lt;span style="color: rgb(255, 0, 0);"&gt;&amp;lt;rect&amp;gt;&lt;/span&gt; let you handle:
&lt;ul&gt;   &lt;li&gt;onfocusin&lt;/li&gt;   &lt;li&gt;onfocusout&lt;/li&gt;   &lt;li&gt;onactivate&lt;/li&gt;   &lt;li&gt;onclick&lt;/li&gt;   &lt;li&gt;onmousedown&lt;/li&gt;   &lt;li&gt;onmouseup&lt;/li&gt;   &lt;li&gt;onmouseover&lt;/li&gt;   &lt;li&gt;onmouseout&lt;/li&gt;   &lt;li&gt;onload&lt;/li&gt; &lt;/ul&gt; To handle the mouse-click event in rectangle, you connect a JavaScript &lt;span style="color: rgb(255, 0, 0);"&gt;event handler&lt;/span&gt; called &lt;span style="font-style: italic;"&gt;click_handler&lt;/span&gt; to the click event, using the &lt;span style="color: rgb(255, 0, 0);"&gt;&amp;lt;rect&amp;gt;&lt;/span&gt; element's &lt;span style="font-style: italic; color: rgb(255, 0, 0);"&gt;onclick &lt;/span&gt;attribute. Next, You can set up an SVG &lt;span style="color: rgb(255, 0, 0);"&gt;&amp;lt;script&amp;gt;&lt;/span&gt; element and enclose the JavaScript code in a &lt;span style="color: rgb(255, 0, 0);"&gt;CDATA &lt;/span&gt;section. To get a &lt;span style="color: rgb(255, 0, 0);"&gt;JavaScript object&lt;/span&gt; that corresponds to the rectangle, you can use the &lt;span style="font-style: italic; color: rgb(255, 0, 0);"&gt;target &lt;/span&gt;property of the even object passed to the JavaScript function. Next, you can use its &lt;span style="font-style: italic; color: rgb(255, 0, 0);"&gt;setAttribute &lt;/span&gt;method to set the width of the rectangle to 200 pixels.
&lt;blockquote&gt;&amp;lt;?xml version="1.0" standalone="no"?&amp;gt;
&amp;lt;svg xmlns="http://www.w3.org/2000/svg"&amp;gt;
&amp;lt;script type="text/javascript"&amp;gt;
&amp;lt;![CDATA[
   function click_handler(evt)
   {
       var rect = evt.target;
       rect.setAttribute("width", 200);
   }
]]&amp;gt;
&amp;lt;/script&amp;gt;
&amp;lt;text y="40" style="font-size:24pt"&amp;gt;
   Using JavaScript
&amp;lt;/text&amp;gt;
&amp;lt;rect onclick="click_handler(evt)" x="100" y="100"
   width="100" height="50" fill="steelblue"/&amp;gt;
&amp;lt;/svg&amp;gt;&lt;/blockquote&gt;&lt;span style="font-weight: bold; color: rgb(0, 0, 0);"&gt;Embedding SVG in HTML&lt;/span&gt;
So far, the SVG documents have been dedicate SVG, but by using the &lt;span style="color: rgb(255, 0, 0);"&gt;HTML &amp;lt;EMBED&amp;gt;&lt;/span&gt; element, you can embed SVG documents in HTML pages. Note that the &lt;span style="font-style: italic; color: rgb(255, 0, 0);"&gt;PLUGINSPAGE &lt;/span&gt;attribute lets the browser download the &lt;span style="color: rgb(255, 0, 0);"&gt;plug-in&lt;/span&gt; (after asking the user), if needed. e.g.
&lt;blockquote&gt;&amp;lt;EMBED WIDTH="500" HEIGHT="500" SRC="ch13_03.svg" PLUGINSPAGE="http://www.adobe.com/svg/viewer/install/"&amp;gt;&lt;/blockquote&gt;&lt;span style="font-style: italic; color: rgb(0, 0, 102);font-size:130%;" &gt;Introducing SMIL&lt;/span&gt;
SMIL is all about creating multimedia presentations in XML. It enables simple authoring of interactive audiovisual presentations. You can find the W3C recommendation for &lt;a href="http://www.w3.org/tr/rec-smil"&gt;SMIL 1.0&lt;/a&gt;, and &lt;a href="http://www.w3.org/tr/smil20"&gt;SMIL 2.0&lt;/a&gt;, as well. A SMIL document can be opend in &lt;span style="color: rgb(255, 0, 0);"&gt;RealPlayer&lt;/span&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/10261622-112125094673722074?l=cherub325.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cherub325.blogspot.com/feeds/112125094673722074/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=10261622&amp;postID=112125094673722074' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10261622/posts/default/112125094673722074'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10261622/posts/default/112125094673722074'/><link rel='alternate' type='text/html' href='http://cherub325.blogspot.com/2005/07/teach-yourself-xml-in-21-days-day-13.html' title='Teach Yourself XML in 21 Days, Day 13'/><author><name>CHERUB</name><uri>http://www.blogger.com/profile/05541000949655411328</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='14' height='32' src='http://static.flickr.com/29/61835177_20e0034f42_t.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-10261622.post-112120856468070387</id><published>2005-07-12T23:20:00.000+01:00</published><updated>2005-07-12T23:49:24.690+01:00</updated><title type='text'>Teach Yourself XML in 21 Days, Day 12</title><content type='html'>&lt;span class="dropcap"&gt;P&lt;/span&gt;&lt;span style="font-weight: bold;font-size:130%;" &gt;utting XHTML to Work&lt;/span&gt;
&lt;span style="font-style: italic; color: rgb(0, 0, 153);font-size:130%;" &gt;Creating Hyperlinks: &amp;lt;a&amp;gt;&lt;/span&gt;
In XHTML, you use the &lt;span style="color: rgb(255, 0, 0);"&gt;&amp;lt;a&amp;gt;&lt;/span&gt; element for hyperlinks with the &lt;span style="font-style: italic; color: rgb(255, 0, 0);"&gt;href &lt;/span&gt;attribute or anchors, using the &lt;span style="font-style: italic; color: rgb(255, 0, 0);"&gt;id &lt;/span&gt;attribute. e.g.
&lt;blockquote&gt;&amp;lt;a href="http://www.w3.org/markup/activity.html"&amp;gt; XHTML &amp;lt;/a&amp;gt;&lt;/blockquote&gt;&lt;span style="font-style: italic; color: rgb(0, 0, 153);font-size:130%;" &gt;Link to Other Documents: &amp;lt;link&amp;gt;&lt;/span&gt;
W3C provides no clear way to connect XML documents to other XML documents, so nonstandard elements such as &lt;span style="color: rgb(255, 0, 0);"&gt;&amp;lt;?xml-stylesheet?&amp;gt;&lt;/span&gt; are used. However, the &lt;span style="color: rgb(255, 0, 0);"&gt;&amp;lt;link&amp;gt;&lt;/span&gt; element can be used in XHTML as in HTML. This element is &lt;span style="color: rgb(255, 0, 0);"&gt;empty &lt;/span&gt;and appears in the &lt;span style="color: rgb(255, 0, 0);"&gt;&amp;lt;head&amp;gt;&lt;/span&gt; section of a document.
You can specify a relationship between the current document and others by using the &lt;span style="font-style: italic; color: rgb(255, 0, 0);"&gt;rel &lt;/span&gt;attribute: e.g. &lt;span style="font-weight: bold;"&gt;rel = "stylesheet"&lt;/span&gt; -- An external style sheet.
&lt;blockquote&gt;&amp;lt;link rel="stylesheet" href="ch1203.css"/&amp;gt;&lt;/blockquote&gt;&lt;span style="font-style: italic; color: rgb(0, 0, 153);font-size:130%;" &gt;Handling Images: &amp;lt;img&amp;gt;&lt;/span&gt;
XHTML supports an &lt;span style="color: rgb(255, 0, 0);"&gt;&amp;lt;img&amp;gt;&lt;/span&gt; element, of which, the &lt;span style="font-style: italic; color: rgb(255, 0, 0);"&gt;src &lt;/span&gt;(which contains the images' URI) and &lt;span style="font-style: italic; color: rgb(255, 0, 0);"&gt;alt &lt;/span&gt;(which contains alternate text) attributes are required, and which you have to enclose with &lt;span style="color: rgb(255, 0, 0);"&gt;/&amp;gt;&lt;/span&gt;. Surprisingly, the &lt;span style="font-style: italic; color: rgb(255, 0, 0);"&gt;align &lt;/span&gt;attribute was not deprecated in the &lt;span style="color: rgb(255, 0, 0);"&gt;&amp;lt;img&amp;gt;&lt;/span&gt; element, as it was for just about every other XHTML element that supported it.
&lt;blockquote&gt;&amp;lt;img src="image.jpg" width="400" height="200" alt="The egg!" /&amp;gt;&lt;/blockquote&gt;&lt;span style="font-style: italic; color: rgb(0, 0, 153);font-size:130%;" &gt;Creating Frame Documents: &amp;lt;frameset&amp;gt;&lt;/span&gt;
You use &lt;span style="color: rgb(255, 0, 0);"&gt;&amp;lt;frameset&amp;gt;&lt;/span&gt; to display frames. The &lt;span style="color: rgb(255, 0, 0);"&gt;&amp;lt;frameset&amp;gt;&lt;/span&gt; element replaces the &lt;span style="color: rgb(255, 0, 0);"&gt;&amp;lt;body&amp;gt;&lt;/span&gt; element in XHTML document with frames, and in XHTML 1.0, that means you use the &lt;span style="color: rgb(255, 0, 0);"&gt;XHTML 1.0 Frameset DTD&lt;/span&gt; because the&lt;span style="color: rgb(255, 0, 0);"&gt; &amp;lt;frameset&amp;gt;&lt;/span&gt; element is supported in XHTML 1.0 Frameset only.

To create the frames, you use the &lt;span style="color: rgb(255, 0, 0);"&gt;&amp;lt;frame&amp;gt;&lt;/span&gt; element. To format the display into frames, you use the &lt;span style="font-style: italic; color: rgb(255, 0, 0);"&gt;rows &lt;/span&gt;or &lt;span style="font-style: italic; color: rgb(255, 0, 0);"&gt;cols &lt;/span&gt;attribute of the &lt;span style="color: rgb(255, 0, 0);"&gt;&amp;lt;frameset&amp;gt;&lt;/span&gt; element. You can specify the number of rows or columns you want to use by listing their heights or widths.

&lt;span style="font-weight: bold; color: rgb(0, 0, 0);"&gt;Creating Frames: &amp;lt;frame&amp;gt;&lt;/span&gt;
You use the &lt;span style="color: rgb(255, 0, 0);"&gt;&amp;lt;frame&amp;gt;&lt;/span&gt; element to create individual frames. This element is an empty element, and you use it inside the &lt;span style="color: rgb(255, 0, 0);"&gt;&amp;lt;frameset&amp;gt;&lt;/span&gt; element. The one required attribute in the &lt;span style="color: rgb(255, 0, 0);"&gt;&amp;lt;frame&amp;gt;&lt;/span&gt; element is the &lt;span style="font-style: italic; color: rgb(255, 0, 0);"&gt;src &lt;/span&gt;attribute, which specifies the URI of the document you want to display in the frame. e.g.
&lt;blockquote&gt;&amp;lt;frameset cols="50%, 50%"&amp;gt;
&amp;lt;frame src="ch1206.html"/&amp;gt;
&amp;lt;frame src="ch1207.html"/&amp;gt;
&amp;lt;/frameset&amp;gt;&lt;/blockquote&gt;&lt;span style="font-style: italic; color: rgb(0, 0, 153);font-size:130%;" &gt;Creating Embedded Style Sheets: &amp;lt;style&amp;gt;&lt;/span&gt;
You can use the&lt;span style="color: rgb(255, 0, 0);"&gt; &amp;lt;link&amp;gt;&lt;/span&gt; element to connect an external style sheet. You can also use the XML processing instruction &lt;span style="color: rgb(255, 0, 0);"&gt;&amp;lt;?xml-stylesheet?&amp;gt;&lt;/span&gt; to connect to an external style sheet.
In addition to using external style sheets, you can also use the &lt;span style="color: rgb(255, 0, 0);"&gt;&amp;lt;style&amp;gt;&lt;/span&gt; element to create an &lt;span style="font-style: italic;"&gt;internal&lt;/span&gt;, or &lt;span style="font-style: italic;"&gt;embedded&lt;/span&gt;, style sheet.

You usually put the &lt;span style="color: rgb(255, 0, 0);"&gt;&amp;lt;style&amp;gt;&lt;/span&gt; element in an XHTML document's head. Note the &lt;span style="font-style: italic; color: rgb(255, 0, 0);"&gt;type &lt;/span&gt;attribute is required in XHTML.

In XHTML, you can also create &lt;span style="font-style: italic;"&gt;inline &lt;/span&gt;styles, which means you apply styles to one XHTML element only. You create inline styles by using the &lt;span style="font-style: italic; color: rgb(255, 0, 0);"&gt;style &lt;/span&gt;attributes that most XHTML elements support.

&lt;span style="font-style: italic; color: rgb(255, 0, 0);font-size:130%;" &gt;Extending XHTML&lt;/span&gt;
The name &lt;span style="font-style: italic;"&gt;Extensible Hypertext Markup Language&lt;/span&gt; might give you the impression that XHTML is designed to be extended. e.g. You may extend XHTML by adding to it a new element, &lt;span style="color: rgb(255, 0, 0);"&gt;&amp;lt;bold&amp;gt;&lt;/span&gt;, that will display its text in bold.

Firstly, you should declare this element in DTD. You also need the rest of the XHTML 1.0 Transitional DTD, so you may creating a new &lt;span style="color: rgb(255, 0, 0);"&gt;parameter entity&lt;/span&gt;.

Though you've got a DTD supports not only the &lt;span style="color: rgb(255, 0, 0);"&gt;&amp;lt;bold&amp;gt;&lt;/span&gt; element, but also the rest of XHTML 1.0 Transitional, since you've given the XHTML document the extension &lt;span style="font-style: italic; color: rgb(255, 0, 0);"&gt;.html&lt;/span&gt;, the browser may assume the fixed HTML element set and not even try to read in the DTD. So you can do a better job in this case if you treate the document as an XML file. e.g. (only show the part of DTD)
&lt;blockquote&gt;&amp;lt;!DOCTYPE html [
&amp;lt;!ELEMENT bold (#PCDATA)&amp;gt;
&amp;lt;!ENTITY % XHTML1.0DTDEntity PUBLIC "-//W3C//DTD HTML 1.0 Transitional//EN" "http://www.w3.org/tr/xhtml1/dtd/xhtml1-transitional.dtd"&amp;gt;
%XHTML1.0DTDEntity;
]&amp;gt;&lt;/blockquote&gt;By treating the markup as XML, you are able to extend XHTML.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/10261622-112120856468070387?l=cherub325.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cherub325.blogspot.com/feeds/112120856468070387/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=10261622&amp;postID=112120856468070387' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10261622/posts/default/112120856468070387'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10261622/posts/default/112120856468070387'/><link rel='alternate' type='text/html' href='http://cherub325.blogspot.com/2005/07/teach-yourself-xml-in-21-days-day-12.html' title='Teach Yourself XML in 21 Days, Day 12'/><author><name>CHERUB</name><uri>http://www.blogger.com/profile/05541000949655411328</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='14' height='32' src='http://static.flickr.com/29/61835177_20e0034f42_t.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-10261622.post-112104163256797699</id><published>2005-07-11T00:59:00.000+01:00</published><updated>2005-07-11T23:44:22.950+01:00</updated><title type='text'>Teach Yourself XML in 21 Days, Day 11</title><content type='html'>&lt;span class="dropcap"&gt;E&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;xtending HTML with XHTML&lt;/span&gt;
You'll begin to see XML at work today. You'll start with the XML application that has probably the most authors -- &lt;span style="color: rgb(255, 0, 0);"&gt;Extensible Hypertext Markup Language (XHTML)&lt;/span&gt;. XHTML is the W3C's version of HTML 4.0, written entirely in XML.

&lt;span style="font-style: italic; color: rgb(0, 0, 153);font-size:130%;" &gt;Why XHTML?&lt;/span&gt;
The main reason the W3C introduced &lt;span style="color: rgb(255, 0, 0);"&gt;XHTML &lt;/span&gt;was that HTML has gotten pretty sloppy. HTML browsers tolerate more and more mistakes in HTML. To fix that, the W3C created XHTML, which uses stricter rules.

Another reason that &lt;span style="color: rgb(255, 0, 0);"&gt;XHTML &lt;/span&gt;was introduced was that, as its name indicates, it can be extended. In XHTML, the idea is that you can define and add your own tags.

&lt;span style="font-style: italic; color: rgb(0, 0, 153);font-size:130%;" &gt;Introducing XHTML 1.0&lt;/span&gt;
&lt;span style="color: rgb(255, 0, 0);"&gt;XHTML 1.0&lt;/span&gt; is the current version of XHTML. XHTML is a rewritten version of &lt;span style="color: rgb(255, 0, 0);"&gt;HTML 4.0&lt;/span&gt;. &lt;a href="http://www.w3.org/tr/xhtml1"&gt;The official recommendation for XHTML 1.0&lt;/a&gt;.

There are three version of XHTML 1.0: &lt;span style="font-weight: bold;"&gt;Strict &lt;/span&gt;(omits all elements and attributes deprecated in HTML 4.0), &lt;span style="font-weight: bold;"&gt;Transitional &lt;/span&gt;(a looser version, more like HTML as it's used today), and &lt;span style="font-weight: bold;"&gt;Frameset &lt;/span&gt;(the same as transitional, but for use with frames instead of the &amp;lt;body&amp;gt; element). Each of these versions has its own DTD:
&lt;a href="http://www.w3.org/tr/2000/rec-xhtml1-20000126/dtd/xhtml1-strict.dtd"&gt;The Strict XHTML 1.0 DTD&lt;/a&gt;
&lt;a href="http://http//www.w3.org/tr/2000/rec-xhtml1-20000126/dtd/xhtml1-transitional.dtd"&gt;The Transitional XHTML 1.0 DTD&lt;/a&gt;
&lt;a href="http://www.w3.org/tr/2000/rec-xhtml1-20000126/dtd/xhtml1-frameset.dtd;"&gt;The Frameset XHTML 1.0 DTD&lt;/a&gt;

&lt;a href="http://www.w3.org/tr/xhtml11"&gt;XHTML version 1.1&lt;/a&gt; exists as a W3C recommendation. &lt;span style="color: rgb(255, 0, 0);"&gt;XHTML 1.1&lt;/span&gt; is a strict version of HTML, and has yet to be really accepted among Web page authors. It eliminates all the elements and attributes that were deprecated in HTML 4.0 -- and a few more as well. XHTML 1.1's major difference from XHTML 1.0 is that its DTD is desinged to be &lt;span style="font-style: italic;"&gt;modular&lt;/span&gt;. This means that the XTML 1.1 DTD is really very short; it's simply a &lt;span style="font-style: italic; color: rgb(255, 0, 0);"&gt;DTD driver&lt;/span&gt;.

The newest version of XHTML is &lt;a href="http://www.w3.org/tr/xhtml2"&gt;XHTML 2.0&lt;/a&gt;, currently in working draft form. Like XHTML 1.1, &lt;span style="color: rgb(255, 0, 0);"&gt;XHTML 2.0&lt;/span&gt; is &lt;span style="font-style: italic;"&gt;modular&lt;/span&gt;. It strips out all display elements! XHTML 2.0 is not designed to be backward compatible with HTML or earlier versions of XHTML!

&lt;span style="font-style: italic; color: rgb(0, 0, 153);font-size:130%;" &gt;Writing XHTML Documents&lt;/span&gt;
The follwoing are the basic requirements a document must meet to be an XHTML document, according to the W3C:
&lt;ul&gt;   &lt;li&gt;The document element must be &lt;span style="color: rgb(255, 0, 0);"&gt;&amp;lt;html&amp;gt;&lt;/span&gt;.&lt;/li&gt;   &lt;li&gt;The XHTML document must validate against on of the W3C XHTML DTDs.&lt;/li&gt;   &lt;li&gt;The document element,     &lt;span style="color: rgb(255, 0, 0);"&gt;&amp;lt;html&amp;gt;&lt;/span&gt;, must use the &lt;span style="color: rgb(255, 0, 0);"&gt;http://www.w3.org/1999/xhtml&lt;/span&gt; namespace, using the &lt;span style="font-style: italic; color: rgb(255, 0, 0);"&gt;xlmns &lt;/span&gt;attribute.&lt;/li&gt;   &lt;li&gt;The document must have a     &lt;span style="color: rgb(255, 0, 0);"&gt;&amp;lt;!DOCTYPE&amp;gt;&lt;/span&gt; element, and it must appear before the document element.&lt;/li&gt; &lt;/ul&gt; Here's also a list of main things you, as HTML authors, need to watch out for when writing XHTML documents:
&lt;ul&gt;   &lt;li&gt;Element and attribute names have to be in &lt;span style="color: rgb(255, 0, 0);"&gt;lowercase&lt;/span&gt;.&lt;/li&gt;   &lt;li&gt;Attribute values must be &lt;span style="color: rgb(255, 0, 0);"&gt;in quotes&lt;/span&gt;.&lt;/li&gt;   &lt;li&gt;Non-empty element need end tags.&lt;/li&gt;   &lt;li&gt;You can not use standalone attributes in XHTML. If you have to, you can assign a dummy value to an attribute.&lt;/li&gt;   &lt;li&gt;An empty element needs to be ended with &lt;span style="color: rgb(255, 0, 0);"&gt;/&amp;gt;&lt;/span&gt;.&lt;/li&gt;   &lt;li&gt;The     &lt;span style="color: rgb(255, 0, 0);"&gt;&amp;lt;a&amp;gt;&lt;/span&gt; element may not contain other     &lt;span style="color: rgb(255, 0, 0);"&gt;&amp;lt;a&amp;gt;&lt;/span&gt; elements.&lt;/li&gt;   &lt;li&gt;The     &lt;span style="color: rgb(255, 0, 0);"&gt;&amp;lt;button&amp;gt;&lt;/span&gt; element may not contain the     &lt;span style="color: rgb(255, 0, 0);"&gt;&amp;lt;input&amp;gt;&lt;/span&gt;,     &lt;span style="color: rgb(255, 0, 0);"&gt;&amp;lt;select&amp;gt;&lt;/span&gt;,     &lt;span style="color: rgb(255, 0, 0);"&gt;&amp;lt;textarea&amp;gt;&lt;/span&gt;,     &lt;span style="color: rgb(255, 0, 0);"&gt;&amp;lt;label&amp;gt;&lt;/span&gt;,     &lt;span style="color: rgb(255, 0, 0);"&gt;&amp;lt;button&amp;gt;&lt;/span&gt;,     &lt;span style="color: rgb(255, 0, 0);"&gt;&amp;lt;form&amp;gt;&lt;/span&gt;,     &lt;span style="color: rgb(255, 0, 0);"&gt;&amp;lt;fieldset&amp;gt;&lt;/span&gt;,     &lt;span style="color: rgb(255, 0, 0);"&gt;&amp;lt;iframe&amp;gt;&lt;/span&gt;, or     &lt;span style="color: rgb(255, 0, 0);"&gt;&amp;lt;isindex&amp;gt;&lt;/span&gt; element.&lt;/li&gt;   &lt;li&gt;The     &lt;span style="color: rgb(255, 0, 0);"&gt;&amp;lt;form&amp;gt;&lt;/span&gt; element may not contain other     &lt;span style="color: rgb(255, 0, 0);"&gt;&amp;lt;form&amp;gt;&lt;/span&gt; elements.&lt;/li&gt;   &lt;li&gt;The     &lt;span style="color: rgb(255, 0, 0);"&gt;&amp;lt;label&amp;gt;&lt;/span&gt; element may not contain other     &lt;span style="color: rgb(255, 0, 0);"&gt;&amp;lt;label&amp;gt;&lt;/span&gt; elements.&lt;/li&gt;   &lt;li&gt;the     &lt;span style="color: rgb(255, 0, 0);"&gt;&amp;lt;pre&amp;gt;&lt;/span&gt; element may not contain     &lt;span style="color: rgb(255, 0, 0);"&gt;&amp;lt;img&amp;gt;&lt;/span&gt;,     &lt;span style="color: rgb(255, 0, 0);"&gt;&amp;lt;object&amp;gt;&lt;/span&gt;,     &lt;span style="color: rgb(255, 0, 0);"&gt;&amp;lt;big&amp;gt;&lt;/span&gt;,     &lt;span style="color: rgb(255, 0, 0);"&gt;&amp;lt;small&amp;gt;&lt;/span&gt;,     &lt;span style="color: rgb(255, 0, 0);"&gt;&amp;lt;sub&amp;gt;&lt;/span&gt;, or     &lt;span style="color: rgb(255, 0, 0);"&gt;&amp;lt;sup&amp;gt;&lt;/span&gt; elements.&lt;/li&gt;   &lt;li&gt;You can use the &lt;span style="font-style: italic; color: rgb(255, 0, 0);"&gt;id &lt;/span&gt;attribute, but you can not use the &lt;span style="font-style: italic; color: rgb(255, 0, 0);"&gt;name &lt;/span&gt;attribute.&lt;/li&gt;   &lt;li&gt;You must escape sensitive characters.&lt;/li&gt; &lt;/ul&gt; &lt;span style="font-style: italic; color: rgb(0, 0, 153);font-size:130%;" &gt;Dissecting XHTML document&lt;/span&gt;
You start an XHTML document as you would in any XML document, with an XML declaration:
&lt;blockquote&gt;&amp;lt;?xml version = "1.0" encoding = "UTF-8" ?&amp;gt;&lt;/blockquote&gt;The next element is the &lt;span style="color: rgb(255, 0, 0);"&gt;&amp;lt;!DOCTYPE&amp;gt;&lt;/span&gt; element, to indicate which XHTML DTD you're using. e.g.
&lt;blockquote&gt;&amp;lt;!DOCTYPE html PUBLIC "-//W3c//DTD HTML 1.0 Transitional//EN" "http://www.w3.org/tr/xhtml1/DTD/xhtml1-transitional.dtd"&amp;gt;&lt;/blockquote&gt;If possible, you should download the DTD file and use it locally.

Following the &lt;span style="color: rgb(255, 0, 0);"&gt;&amp;lt;!DOCTYPE&amp;gt;&lt;/span&gt; element is the &lt;span style="color: rgb(255, 0, 0);"&gt;&amp;lt;html&amp;gt;&lt;/span&gt; element, which is the document element for all XHTML documents.
&lt;blockquote&gt;&amp;lt;html xmlns = "http://www.w3.org/1999/xhtml&amp;gt;&lt;/blockquote&gt;In this case, you're putting the entire document into the&lt;span style="color: rgb(255, 0, 0);"&gt; http://www.w3.org/1999/xhtml&lt;/span&gt; namespace.

The rest of the XHTML is very much like its HTML counterpart.

&lt;span style="font-style: italic; color: rgb(0, 0, 153);font-size:130%;" &gt;Validating XHTML Documents&lt;/span&gt;
To validate XHTML documents, you can use the &lt;a href="http://validator.w3.org/"&gt;W3C's own HTML validator&lt;/a&gt;.

&lt;span style="font-style: italic; color: rgb(0, 0, 153);font-size:130%;" &gt;The Basic XHTML Elements&lt;/span&gt;
&lt;span style="font-weight: bold; color: rgb(0, 0, 0);"&gt;Using the Document Element: &amp;lt;html&amp;gt;&lt;/span&gt;
In the XHTML DTDs, the &lt;span style="color: rgb(255, 0, 0);"&gt;&amp;lt;html&amp;gt;&lt;/span&gt; element is declared in such a way that it can contain a &lt;span style="color: rgb(255, 0, 0);"&gt;&amp;lt;head&amp;gt;&lt;/span&gt; element and a &lt;span style="color: rgb(255, 0, 0);"&gt;&amp;lt;body&amp;gt;&lt;/span&gt; element.

&lt;span style="font-weight: bold; color: rgb(0, 0, 0);"&gt;Creating a Document Head: &amp;lt;head&amp;gt;&lt;/span&gt;
In a XHTML document, the &lt;span style="color: rgb(255, 0, 0);"&gt;&amp;lt;head&amp;gt;&lt;/span&gt; element contains the document's head, which holds data about the document, scripting elements, and other data not intended for direct display. In XHTML, every XHTML document should have a &lt;span style="color: rgb(255, 0, 0);"&gt;&amp;lt;head&amp;gt;&lt;/span&gt; element, and every &lt;span style="color: rgb(255, 0, 0);"&gt;&amp;lt;head&amp;gt;&lt;/span&gt; element must contain at least a &lt;span style="color: rgb(255, 0, 0);"&gt;&amp;lt;title&amp;gt;&lt;/span&gt; element.

XHTML also specified that the following elements may appear in the &lt;span style="color: rgb(255, 0, 0);"&gt;&amp;lt;head&amp;gt;&lt;/span&gt; element:
&lt;span style="color: rgb(255, 0, 0);"&gt;&amp;lt;base&amp;gt;&lt;/span&gt;
&lt;span style="color: rgb(255, 0, 0);"&gt;&amp;lt;isindex&amp;gt;&lt;/span&gt;
&lt;span style="color: rgb(255, 0, 0);"&gt;&amp;lt;link&amp;gt;&lt;/span&gt;
&lt;span style="color: rgb(255, 0, 0);"&gt;&amp;lt;meta&amp;gt;&lt;/span&gt;
&lt;span style="color: rgb(255, 0, 0);"&gt;&amp;lt;noscript&amp;gt;&lt;/span&gt;
&lt;span style="color: rgb(255, 0, 0);"&gt;&amp;lt;object&amp;gt;&lt;/span&gt;
&lt;span style="color: rgb(255, 0, 0);"&gt;&amp;lt;script&amp;gt;&lt;/span&gt;
&lt;span style="color: rgb(255, 0, 0);"&gt;&amp;lt;style&amp;gt;&lt;/span&gt; -- style sheet
e.g.
&lt;blockquote&gt;&amp;lt;head&amp;gt;
&amp;lt;title&amp;gt; Title &amp;lt;/title&amp;gt;
&amp;lt;style type = "text/css"&amp;gt;
body {background: coral}
&amp;lt;/style&amp;gt;
&amp;lt;/head&amp;gt;&lt;/blockquote&gt;&lt;span style="font-weight: bold; color: rgb(0, 0, 0);"&gt;Giving a Document a Title: &amp;lt;title&amp;gt;&lt;/span&gt;
The &lt;span style="color: rgb(255, 0, 0);"&gt;&amp;lt;title&amp;gt;&lt;/span&gt; element holds the title of the document. A browser displays the document's title in its title bar.

&lt;span style="color: rgb(0, 0, 0); font-weight: bold;"&gt;Giving a Document a Body: &amp;lt;body&amp;gt;&lt;/span&gt;
The document's body holds the document's content -- all the data that the document is meant to display. The W3C's idea in turing toward&lt;span style="color: rgb(255, 0, 0);"&gt; style sheets&lt;/span&gt; to handle the display is that it wants to separate the display details from the data details. The idea is reaching its zenith in XHTML 2.0, which doesn't support even the usual HTML display elements.
&lt;span style="font-style: italic; color: rgb(51, 51, 153);font-size:130%;" &gt;
Organizing Text&lt;/span&gt;
Whe you want to organize text in an XHTML document, things work very much as they do in HTML. You can use mixed-content model in XHTML. There are a great many character entities in HTML 4.0, which is &lt;a href="http://www.w3.org/tr/html4/sgml/entities.html"&gt;available&lt;/a&gt;.

&lt;span style="font-weight: bold; color: rgb(0, 0, 0);font-size:100%;" &gt;Creating Paragraphs: &amp;lt;p&amp;gt;&lt;/span&gt;
The &lt;span style="color: rgb(255, 0, 0);"&gt;&amp;lt;p&amp;gt;&lt;/span&gt; element lets you create block-level paragraphs in XHTML. Note that because &lt;span style="color: rgb(255, 0, 0);"&gt;&amp;lt;p&amp;gt;&lt;/span&gt; is a &lt;span style="color: rgb(255, 0, 0);"&gt;block-level&lt;/span&gt; element, you can not display other block-level elements inside it. The &lt;span style="color: rgb(255, 0, 0);"&gt;&amp;lt;p&amp;gt;&lt;/span&gt; dlement contains text and makes it into a block-level element; the browser normally uses vertical space to offset it from other element. The &lt;span style="color: rgb(255, 0, 0);"&gt;&amp;lt;br&amp;gt;&lt;/span&gt; element is an empty element that just makes the browser skip to the next line. You can style the text in a &lt;span style="color: rgb(255, 0, 0);"&gt;&amp;lt;p&amp;gt;&lt;/span&gt; element by styling that element, but you can't style text by using the &lt;span style="color: rgb(255, 0, 0);"&gt;&amp;lt;br&amp;gt;&lt;/span&gt; element.

&lt;span style="font-weight: bold; color: rgb(0, 0, 0);font-size:100%;" &gt;Skipping a Line: &amp;lt;br&amp;gt;&lt;/span&gt;
In XHTML, the &lt;span style="color: rgb(255, 0, 0);"&gt;&amp;lt;br&amp;gt;&lt;/span&gt; element is an empty element that inserts a line break in text. e.g.
&lt;blockquote&gt;&amp;lt;br /&amp;gt;&lt;/blockquote&gt;&lt;span style="font-weight: bold; color: rgb(0, 0, 0);font-size:100%;" &gt;Centering Text: &amp;lt;center&amp;gt;&lt;/span&gt;
&lt;span style="color: rgb(255, 0, 0);"&gt;&amp;lt;center&amp;gt;&lt;/span&gt; element was a very popular one. You could use this element to center text and other content in Web pages. Although it has been deprecated, it is also bulit into XHTML 1.0 Transitional.

&lt;span style="font-weight: bold; color: rgb(0, 0, 0);"&gt;Styling Block Content: &amp;lt;div&amp;gt;&lt;/span&gt;
In XHTML, you use the &lt;span style="color: rgb(255, 0, 0);"&gt;&amp;lt;div&amp;gt;&lt;/span&gt; element to enclose sections of text or other elements. This lets you style that content as you like. e.g. The following code equals to &lt;span style="color: rgb(255, 0, 0);"&gt;&amp;lt;center&amp;gt;&lt;/span&gt;
&lt;blockquote&gt;&amp;lt;div align = "center" &amp;gt;&lt;/blockquote&gt;You can also declare &lt;span style="color: rgb(255, 0, 0);"&gt;&amp;lt;div&amp;gt;&lt;/span&gt; style in &lt;span style="color: rgb(255, 0, 0);"&gt;&amp;lt;head&amp;gt;&lt;/span&gt; element. e.g.
&lt;blockquote&gt;&amp;lt;head&amp;gt;
&amp;lt;style&amp;gt;
div {text-align: center}
&amp;lt;/style&amp;gt;
&amp;lt;/head&amp;gt;&lt;/blockquote&gt;&lt;span style="font-weight: bold; color: rgb(0, 0, 0);"&gt;Styling Inline Content: &amp;lt;span&amp;gt;&lt;/span&gt;
You can use the &lt;span style="color: rgb(255, 0, 0);"&gt;&amp;lt;span&amp;gt;&lt;/span&gt; element to apply&lt;span style="color: rgb(255, 0, 0);"&gt; inline styles&lt;/span&gt; in XHTML. The &lt;span style="color: rgb(255, 0, 0);"&gt;&amp;lt;div&amp;gt;&lt;/span&gt; and &lt;span style="color: rgb(255, 0, 0);"&gt;&amp;lt;span&amp;gt;&lt;/span&gt; elements are more important in XHTML than they are in HTML because of the reliance on style sheets to handle formatting in XHTML. By handling block sytling, the &lt;span style="color: rgb(255, 0, 0);"&gt;&amp;lt;div&amp;gt;&lt;/span&gt; element replaces elements such as &lt;span style="color: rgb(255, 0, 0);"&gt;&amp;lt;center&amp;gt;&lt;/span&gt; in XHTML 1.0 Strict and XHTML 1.1, and by handling inline styling, &lt;span style="color: rgb(255, 0, 0);"&gt;&amp;lt;span&amp;gt;&lt;/span&gt; replaces elements such as &lt;span style="color: rgb(255, 0, 0);"&gt;&amp;lt;font&amp;gt;&lt;/span&gt;.

&lt;span style="font-weight: bold; color: rgb(0, 0, 0);"&gt;Creating Headings: &amp;lt;h1&amp;gt; to &amp;lt;h6&amp;gt;&lt;/span&gt;
Headings are block elements that present text in bold font of various sizes, allowing you to organize that text into sections.

&lt;span style="font-style: italic; color: rgb(0, 0, 153);font-size:130%;" &gt;Formatting Text&lt;/span&gt;
XHTML 1.0 and XHTML 1.1 both support the traditional popular HTML formatting elements, such as &lt;span style="color: rgb(255, 0, 0);"&gt;&amp;lt;b&amp;gt;&lt;/span&gt; and &lt;span style="color: rgb(255, 0, 0);"&gt;&amp;lt;i&amp;gt;&lt;/span&gt;.

&lt;span style="font-weight: bold; color: rgb(0, 0, 0);"&gt;Using Bold on Text: &amp;lt;b&amp;gt;&lt;/span&gt;
The &lt;span style="color: rgb(255, 0, 0);"&gt;&amp;lt;b&amp;gt;&lt;/span&gt; element applies boldface to its enclosed text. You use a &lt;span style="color: rgb(255, 0, 0);"&gt;&amp;lt;b&amp;gt;&lt;/span&gt; element to bold text with inline styling.

&lt;span style="font-weight: bold; color: rgb(0, 0, 0);"&gt;Italicizing Text: &amp;lt;i&amp;gt;&lt;/span&gt;
The &lt;span style="color: rgb(255, 0, 0);"&gt;&amp;lt;i&amp;gt;&lt;/span&gt; element, which supports rudimentary inline text formatting, makes text italic.

&lt;span style="font-weight: bold; color: rgb(0, 0, 0);"&gt;Underlining Text: &amp;lt;u&amp;gt;&lt;/span&gt;
The &lt;span style="color: rgb(255, 0, 0);"&gt;&amp;lt;u&amp;gt;&lt;/span&gt; element performs some rudimentary inline formatting by underlining text.

&lt;span style="font-weight: bold; color: rgb(0, 0, 0);"&gt;Selecting Fonts: &amp;lt;font&amp;gt;&lt;/span&gt;
The &lt;span style="color: rgb(255, 0, 0);"&gt;&amp;lt;font&amp;gt;&lt;/span&gt; elements lets you select the font for text, as well as its size and color.

&lt;span style="font-weight: bold; color: rgb(51, 0, 0);"&gt;Comments: &amp;lt;!--&amp;gt;&lt;/span&gt;
You can use the standard XML and HTML style comments in XHTML documents.

XHTML 1.1 and XHTML 2.0 don't appear to support frames. Because frames are formatting elements, they're omitted. However, you can use &lt;span style="color: rgb(255, 0, 0);"&gt;&amp;lt;div&amp;gt;&lt;/span&gt; elements to format text into visible areas as you like.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/10261622-112104163256797699?l=cherub325.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cherub325.blogspot.com/feeds/112104163256797699/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=10261622&amp;postID=112104163256797699' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10261622/posts/default/112104163256797699'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10261622/posts/default/112104163256797699'/><link rel='alternate' type='text/html' href='http://cherub325.blogspot.com/2005/07/teach-yourself-xml-in-21-days-day-11.html' title='Teach Yourself XML in 21 Days, Day 11'/><author><name>CHERUB</name><uri>http://www.blogger.com/profile/05541000949655411328</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='14' height='32' src='http://static.flickr.com/29/61835177_20e0034f42_t.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-10261622.post-112066555992415118</id><published>2005-07-06T15:51:00.000+01:00</published><updated>2005-07-06T16:59:19.940+01:00</updated><title type='text'>Teach Yourself XML in 21 Days, Day 10</title><content type='html'>&lt;span class="dropcap"&gt;W&lt;/span&gt;&lt;span style="font-weight: bold;font-size:130%;" &gt;orking with XSL Formatting Objects&lt;/span&gt;
XSL specification: &lt;span style="color: rgb(255, 0, 0);"&gt;XSL Formatting Objects (XSL-FO)&lt;/span&gt; is fare more involved than &lt;span style="color: rgb(255, 0, 0);"&gt;XSLT&lt;/span&gt;. It lets you format data down to the last little detail, such as what font size to use and what margin size. However, XSL is not in as widespread as XSLT, so &lt;span style="font-style: italic;"&gt;you shouldn't feel that you have to master today's discussion in order to maste XML&lt;/span&gt;.

&lt;span style="font-style: italic; color: rgb(51, 51, 153);font-size:130%;" &gt;Introducing XSL-FO&lt;/span&gt;
To let you format individual sections of an output document, the W3C has defined formatting objects such as &lt;span style="color: rgb(255, 0, 0);"&gt;&amp;lt;root&amp;gt;&lt;/span&gt; and &lt;span style="color: rgb(255, 0, 0);"&gt;&amp;lt;block&amp;gt;&lt;/span&gt; that you use as elements that &lt;span style="color: rgb(255, 0, 0);"&gt;XSL-FO&lt;/span&gt; processor supports. By using these elements, you can specify what parts of the output document you want to format. So that you can actually do the &lt;span style="color: rgb(255, 0, 0);"&gt;formatting&lt;/span&gt;, each objects has built-in &lt;span style="color: rgb(255, 0, 0);"&gt;properties&lt;/span&gt;, which you use as attributes in the corresponding element.

The formatted document can be a Miscrosoft Word document, a PDF document, or anything that supports the visual formatting you've created.

&lt;span style="color: rgb(255, 0, 0);"&gt;XSL Formatting Objects&lt;/span&gt; has their own &lt;span style="font-style: italic; color: rgb(255, 0, 0);"&gt;namespace&lt;/span&gt;, &lt;span style="font-style: italic;"&gt;http://www.w3.org/1999/XSL/Fomat&lt;/span&gt;. This namespace is usually given the prefix &lt;span style="color: rgb(255, 0, 0); font-style: italic;"&gt;fo:&lt;/span&gt;, for &lt;span style="font-style: italic;"&gt;formatting objects&lt;/span&gt;. The W3C recommends the &lt;a href="http://www.w3.org/tr/xsl"&gt;XSL-FO 1.0&lt;/a&gt;, the &lt;a href="http://www.w3.org/tr/xsl/slice6.html"&gt;specification of XSL-FO&lt;/a&gt;, and &lt;a href="http://http//www.w3.org/tr/xsl/slice7.html"&gt;the specification of the properties you can use with the XSL-FO objects.&lt;/a&gt;

Interests in XSL-FO has picked up lately, and a growing number of software packages support it. Here's a sample:
&lt;a href="http://www.adobe.com/"&gt;Adobe Document Server 5.0&lt;/a&gt; from Adobe Systems
&lt;a href="http://www.arbortext.com/"&gt;E3&lt;/a&gt; from Arbortext
&lt;a href="http://xml.apache.org/fop"&gt;FOP&lt;/a&gt; from Apache
&lt;a href="http://www.tei-c.org.uk/software/passivetex"&gt;PassiveTeX&lt;/a&gt; from TEI
&lt;a href="http://www.renderx.com/"&gt;XEP&lt;/a&gt; from RenderX
&lt;a href="http://www.3b2.com/"&gt;XSL-FO Render&lt;/a&gt; from Advent

&lt;span style="font-size:130%;"&gt;&lt;span style="font-style: italic; color: rgb(0, 0, 153);"&gt;Using XSL-FO&lt;/span&gt;&lt;/span&gt;
What usually happens is that you take an &lt;span style="color: rgb(255, 0, 0);"&gt;XML &lt;/span&gt;document, run it through an &lt;span style="color: rgb(255, 0, 0);"&gt;XSLT &lt;/span&gt;processor to create a new XML document that uses &lt;span style="color: rgb(255, 0, 0);"&gt;XSL-FO&lt;/span&gt; (with the extention &lt;span style="font-style: italic; color: rgb(255, 0, 0);"&gt;.fo&lt;/span&gt;), and the use an XSL-FO processor to create the &lt;span style="color: rgb(255, 0, 0);"&gt;formatted dispaly document&lt;/span&gt; (with the extension &lt;span style="font-style: italic; color: rgb(255, 0, 0);"&gt;.pdf&lt;/span&gt;, e.g.). You do things this way because any document except a nontrivial one has many paragraphs of text or data, and to format each on by hand would be a time-consuming process.

In fact, XSLT was originally developed for formatting XML documents by using XSL-FO objects.

&lt;span style="font-style: italic; color: rgb(0, 0, 153);font-size:130%;" &gt;Using XSLT to Create an XSL-FO Document&lt;/span&gt;
Although you could format an XML document by hand, it's easier to use an XSLT sytle sheet to do so. e.g.
&lt;blockquote&gt;&amp;lt;?xml version="1.0"?&amp;gt;
&amp;lt;xsl:stylesheet xmlns:xsl = "http://www.w3.org/1999/xsl/transform" xmlns:fo = "http://www.w3.org/1999/xsl/format" version = "1.0"/&amp;gt;
&lt;/blockquote&gt;&lt;span style="font-style: italic; color: rgb(0, 0, 153);font-size:130%;" &gt;Creating a PDF Document&lt;/span&gt;
To use an XSL-FO document, &lt;span style="font-style: italic; color: rgb(255, 0, 0);"&gt;.fo&lt;/span&gt;, and conver it into a &lt;span style="color: rgb(255, 0, 0);"&gt;PDF &lt;/span&gt;file, you can use what is probably the most popular XSL-FO processor, the &lt;span style="color: rgb(255, 0, 0);"&gt;Apache XML Project's FOP&lt;/span&gt;.

&lt;span style="font-size:130%;"&gt;&lt;span style="color: rgb(0, 0, 153); font-style: italic;"&gt;Using XSL Formatting Objects and Properties&lt;/span&gt;&lt;/span&gt;
There are &lt;span style="color: rgb(255, 0, 0);"&gt;56 XSL-FO formatting objects&lt;/span&gt; having corresponding elements that you can use in XSL-FO documents. Also these formatting objects have &lt;span style="color: rgb(255, 0, 0);"&gt;177 formatting properties&lt;/span&gt;.

&lt;span style="font-style: italic; color: rgb(0, 0, 153);font-size:130%;" &gt;Building an XSL-FO Document&lt;/span&gt;
&lt;span style="font-weight: bold;"&gt;Using &amp;lt;fo:root&amp;gt;&lt;/span&gt;
The &lt;span style="color: rgb(255, 0, 0);"&gt;document element&lt;/span&gt; of XSL-FO document has to be &lt;span style="color: rgb(255, 0, 0);"&gt;&amp;lt;fo:root&amp;gt;&lt;/span&gt;. The &lt;span style="color: rgb(255, 0, 0);"&gt;&amp;lt;fo:root&amp;gt;&lt;/span&gt; element can contain both a &lt;span style="color: rgb(255, 0, 0);"&gt;master set layout&lt;/span&gt; and&lt;span style="color: rgb(255, 0, 0);"&gt; page sequences.&lt;/span&gt;
The &lt;span style="color: rgb(255, 0, 0);"&gt;master set layout&lt;/span&gt;, which uses the &lt;span style="color: rgb(255, 0, 0);"&gt;&amp;lt;fo:layout-master-set&amp;gt;&lt;/span&gt; element, describes the &lt;span style="color: rgb(255, 0, 0);"&gt;masters&lt;/span&gt;, or templates, that you want to use in the document. You can specify the &lt;span style="color: rgb(255, 0, 0);"&gt;default page layout&lt;/span&gt;, such as margin size. You list the masters you want to use in the document in the &lt;span style="color: rgb(255, 0, 0);"&gt;&amp;lt;fo:layout-master-set&amp;gt;&lt;/span&gt; element. e.g. you can create a master for each page by using the &lt;span style="color: rgb(255, 0, 0);"&gt;&amp;lt;fo:simple-page-master&amp;gt;&lt;/span&gt; element. You can create page sequence masters to format pages in a sequence.

&lt;span style="font-weight: bold;"&gt;Using &amp;lt;fo:simple-page-master&amp;gt;&lt;/span&gt;
You use the page master&lt;span style="color: rgb(255, 0, 0);"&gt; &amp;lt;fo:simple-page-master&amp;gt;&lt;/span&gt; to create a template for a page and outline what goes where. &lt;span style="color: rgb(255, 0, 0);"&gt;&amp;lt;fo:simple-page-master&amp;gt;&lt;/span&gt; lays out the overall geometry of the page. You can also lay out &lt;span style="color: rgb(255, 0, 0);"&gt;regions &lt;/span&gt;in a page, such as the header, footer, and body. You can have up to five regions in a page master in the XSL_FO 1.0 specification:
&lt;span style="font-weight: bold;"&gt;Body &lt;/span&gt;-- The body region is the body of the page.  -- &lt;span style="color: rgb(255, 0, 0);"&gt;&amp;lt;fo:region-body&amp;gt;&lt;/span&gt;
&lt;span style="font-weight: bold;"&gt;Before &lt;/span&gt;-- The before region is the header. -- &lt;span style="color: rgb(255, 0, 0);"&gt;&amp;lt;fo:region-before&amp;gt;&lt;/span&gt;
&lt;span style="font-weight: bold;"&gt;After &lt;/span&gt;-- The after region is the footer --&lt;span style="color: rgb(255, 0, 0);"&gt; &amp;lt;fo:region-after&amp;gt;&lt;/span&gt;
&lt;span style="font-weight: bold;"&gt;Start &lt;/span&gt;-- The start region appears to the left of the body -- &lt;span style="color: rgb(255, 0, 0);"&gt;&amp;lt;fo:region-star&amp;gt;&lt;/span&gt;
&lt;span style="font-weight: bold;"&gt;End &lt;/span&gt;-- The end region appears to the right of the body -- &lt;span style="color: rgb(255, 0, 0);"&gt;&amp;lt;fo:region-end&amp;gt;&lt;/span&gt;
e.g.
&lt;blockquote&gt;&amp;lt;fo:layout-master-set&amp;gt;
&amp;lt;fo:simple-page-master master-name = "mainPage" page-height = "300mm"&amp;gt;
&amp;lt;fo:region-body margin-top = "10mm" /&amp;gt;
&amp;lt;fo:region-after extent = "20mm" /&amp;gt;
&amp;lt;/fo:simple-page-master&amp;gt;
&amp;lt;/fo:layout-master-set&amp;gt;&lt;/blockquote&gt;&lt;span style="font-weight: bold;"&gt;Using &amp;lt;fo:page-sequence&amp;gt;&lt;/span&gt;
The &lt;span style="color: rgb(255, 0, 0);"&gt;page sequences&lt;/span&gt;, which use the &lt;span style="color: rgb(255, 0, 0);"&gt;&amp;lt;fo:page-sequence&amp;gt;&lt;/span&gt; element, specify the format for a sequences of pages. e.g. you might give a &lt;span style="color: rgb(255, 0, 0);"&gt;series &lt;/span&gt;of pages the same headers and footers. Each such element refers to a &lt;span style="color: rgb(255, 0, 0);"&gt;page master&lt;/span&gt; such as the one you've already created and uses that page master to format its pages. &lt;span style="color: rgb(255, 0, 0);"&gt;&amp;lt;fo:page-sequence&amp;gt;&lt;/span&gt; element is used after &lt;span style="color: rgb(255, 0, 0);"&gt;&amp;lt;fo:layout-master-set&amp;gt;&lt;/span&gt; element. e.g.
&lt;blockquote&gt;&amp;lt;fo:page-sequence master-reference = "mainPage" &amp;gt;&lt;/blockquote&gt;&lt;span style="font-weight: bold;"&gt;Using &amp;lt;fo:flow&amp;gt;&lt;/span&gt;
The next step is to specify the &lt;span style="color: rgb(255, 0, 0);"&gt;content &lt;/span&gt;of the page sequence, and you do that with the &lt;span style="color: rgb(255, 0, 0);"&gt;&amp;lt;fo:flow&amp;gt;&lt;/span&gt; element. To create a flow, you specify a region, and the document content flows into that region. e.g.
&lt;blockquote&gt;&amp;lt;fo:page-senquence master-reference = "mainPage &amp;gt;
&amp;lt;fo:flow flow-name = "xsl-region-body" &amp;gt;
&amp;xsl:apply-templates/&amp;gt;
&amp;lt;/fo:flow&amp;gt;
&amp;lt;/fo:page-sequence&amp;gt;&lt;/blockquote&gt;Besides &lt;span style="color: rgb(255, 0, 0);"&gt;&amp;lt;fo:flow&amp;gt;&lt;/span&gt;, you can also use &lt;span style="color: rgb(255, 0, 0);"&gt;&amp;lt;fo:static-content&amp;gt;&lt;/span&gt; in page sequences. The content in &lt;span style="color: rgb(255, 0, 0);"&gt;&amp;lt;fo:static-content&amp;gt;&lt;/span&gt; is static, which means it stays as you've arranged it. Static content is often used for headers and footers.

&lt;span style="font-weight: bold;"&gt;Using &amp;lt;fo:block&amp;gt;&lt;/span&gt;
In XSL-FO you can use the &lt;span style="color: rgb(255, 0, 0);"&gt;&amp;lt;fo:block&amp;gt;&lt;/span&gt; element to create &lt;span style="color: rgb(255, 0, 0);"&gt;block-level elements&lt;/span&gt;, much like the ones you created when working with CSS. You use this element to create your own rectangular region that appears on its own line. e.g. To handle the data in the &lt;span style="color: rgb(255, 0, 0);"&gt;&amp;lt;name&amp;gt;&lt;/span&gt; element in XML document:
&lt;blockquote&gt;&amp;lt;xsl:template match = "state/name"&amp;gt;
&amp;lt;fo:block font-weight = "bold" &amp;gt;
Name:
&amp;xsl:value-of select="." /&amp;gt;
&amp;lt;/fo:block&amp;gt;
&amp;lt;/xsl:template&amp;gt;&lt;/blockquote&gt;&lt;span style="font-style: italic; color: rgb(0, 0, 153);font-size:130%;" &gt;Handling Inline Formatting&lt;/span&gt;
You can also create &lt;span style="color: rgb(255, 0, 0);"&gt;inline &lt;/span&gt;formatting. A number of XSL-FO elements are designed to handle inline formatting, e.g.:
&lt;span style="font-weight: bold;"&gt;&amp;lt;fo:bidi-override&amp;lt;&lt;/span&gt;
&lt;span style="font-weight: bold;"&gt;&amp;lt;fo:character&amp;gt;&lt;/span&gt;
&lt;span style="font-weight: bold;"&gt;&amp;lt;fo:inline&amp;gt;&lt;/span&gt;

&lt;span style="font-weight: bold;"&gt;Using &amp;lt;fo:inline&amp;gt;&lt;/span&gt;
The&lt;span style="color: rgb(255, 0, 0);"&gt; &amp;lt;fo:inline&amp;gt;&lt;/span&gt; element lets you perform inline formatting with text. e.g.
&lt;blockquote&gt;&amp;lt;xsl:template match = "state/name"&amp;gt;
&amp;lt;fo:block font-weight = "bold" &amp;gt;
&amp;lt;fo:inline text-decoration = "underline"&amp;gt;
Name:
&amp;lt;/fo:inline&amp;gt;
&amp;xsl:value-of select="." /&amp;gt;
&amp;lt;/fo:block&amp;gt;
&amp;lt;/xsl:template&amp;gt;&lt;/blockquote&gt;&lt;span style="font-weight: bold;"&gt;Using &amp;lt;fo:external-graphic&amp;gt;&lt;/span&gt;
You can use &lt;span style="color: rgb(255, 0, 0);"&gt;&amp;lt;fo:external-graphic&amp;gt;&lt;/span&gt; element to embed &lt;span style="color: rgb(255, 0, 0);"&gt;image &lt;/span&gt;files in output documents.

&lt;span style="font-weight: bold;"&gt;Using &amp;lt;fo:page-number&amp;gt;&lt;/span&gt;
You can use &lt;span style="color: rgb(255, 0, 0);"&gt;&amp;lt;fo:page-number&amp;gt;&lt;/span&gt; element to add &lt;span style="color: rgb(255, 0, 0);"&gt;page numbers&lt;/span&gt; to a document.

&lt;span style="font-weight: bold;"&gt;Formatting Lists&lt;/span&gt;
XSL-FO lets you format data in &lt;span style="color: rgb(255, 0, 0);"&gt;lists&lt;/span&gt;, by using these four list elements:
&lt;span style="font-weight: bold;"&gt;&amp;lt;fo:list-block&amp;gt;&lt;/span&gt;
&lt;span style="font-weight: bold;"&gt;&amp;lt;fo:list-item&amp;gt;&lt;/span&gt;
&lt;span style="font-weight: bold;"&gt;&amp;lt;fo:list-item-label&amp;gt;&lt;/span&gt;
&lt;span style="font-weight: bold;"&gt;&amp;lt;fo:list-item-body&amp;gt;&lt;/span&gt;

To create a list, you use the &lt;span style="color: rgb(255, 0, 0);"&gt;&amp;lt;fo:list-block&amp;gt;&lt;/span&gt; element. You use an &lt;span style="color: rgb(255, 0, 0);"&gt;&amp;lt;fo:list-item&amp;gt;&lt;/span&gt; element to create an item in the list. To create a label for each item, you can use the &lt;span style="color: rgb(255, 0, 0);"&gt;&amp;lt;fo:list-item-label&amp;gt;&lt;/span&gt; element, and to create the body of the list item, you can use the &lt;span style="color: rgb(255, 0, 0);"&gt;&amp;lt;fo:list-item-body&amp;gt;&lt;/span&gt; element. It all sounds simple enough, but as with most things in XSL-FO, even simple things can end up being pretty lengthy.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/10261622-112066555992415118?l=cherub325.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cherub325.blogspot.com/feeds/112066555992415118/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=10261622&amp;postID=112066555992415118' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10261622/posts/default/112066555992415118'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10261622/posts/default/112066555992415118'/><link rel='alternate' type='text/html' href='http://cherub325.blogspot.com/2005/07/teach-yourself-xml-in-21-days-day-10.html' title='Teach Yourself XML in 21 Days, Day 10'/><author><name>CHERUB</name><uri>http://www.blogger.com/profile/05541000949655411328</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='14' height='32' src='http://static.flickr.com/29/61835177_20e0034f42_t.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-10261622.post-112060598791854834</id><published>2005-07-05T22:13:00.000+01:00</published><updated>2005-07-06T00:26:27.953+01:00</updated><title type='text'>Teach Yourself XML in 21 Days, Day 9</title><content type='html'>&lt;span class="dropcap"&gt;F&lt;/span&gt;&lt;span style="font-weight: bold;font-size:130%;" &gt;ormatting XML by Using XSLT&lt;/span&gt;
Besides CSS, there is a native XML way to format XML document for display -- using &lt;span style="color: rgb(255, 0, 0);"&gt;Extensible Stylesheet Language Transformations (XSLT)&lt;/span&gt;.

&lt;span style="font-style: italic; color: rgb(0, 0, 153);font-size:130%;" &gt;Introducing XSLT&lt;/span&gt;
XSLT is actually part of the larger specification &lt;span style="color: rgb(255, 0, 0);"&gt;Extensible Stylesheet Language (XSL)&lt;/span&gt;. It is really easy to use and it lets you &lt;span style="color: rgb(255, 0, 0);"&gt;transform &lt;/span&gt;XML document into other formats, such as HTML or plain text. It is a more general language that lets you format XML in great detail.
XSLT is a specification of the W3C. The W3C recommends &lt;a href="http://www.w3.org/tr/xslt"&gt;XSLT 1.0&lt;/a&gt;, and develops &lt;a href="http://www.w3.org/tr/xslt20"&gt;XSLT 2.0&lt;/a&gt; in progress.
You use XSLT to transform XML documents, and you can reformat the document's data as you want. To transform XML by using XSLT, you need two documents -- an XML document you want to transform and an XSLT style sheet, note that XSLT stylesheets are also XML documents. XSLT style shees usually use the extension &lt;span style="font-style: italic; color: rgb(255, 0, 0);"&gt;.xsl&lt;/span&gt;.

&lt;span style="font-style: italic; color: rgb(0, 0, 153);font-size:130%;" &gt;Transforming XML by Using XSLT&lt;/span&gt;
There are three different places where XSLT transformations can happen:
&lt;span style="font-weight: bold;"&gt;Server-Side XSLT&lt;/span&gt;
There are various ways to handle XSLT on Web Servers. One of the most popular is to use &lt;span style="color: rgb(255, 0, 0);"&gt;JSP &lt;/span&gt;because Java versions 1.4 and later include complete XSLT 1.0 support. The JSP script, of which the extension is &lt;span style="font-style: italic; color: rgb(255, 0, 0);"&gt;.jsp&lt;/span&gt;, works with the &lt;span style="color: rgb(255, 0, 0);"&gt;Tomact JSP server&lt;/span&gt;.
&lt;span style="font-weight: bold;"&gt;Client-Side XSLT&lt;/span&gt;
&lt;span style="color: rgb(255, 0, 0);"&gt;Internet Explorer&lt;/span&gt; lets you perform XSLT 1.o transformation. All you have to do is &lt;span style="color: rgb(255, 0, 0);"&gt;connect &lt;/span&gt;the XSLT style sheet to the XML document by using an &lt;span style="color: rgb(255, 0, 0);"&gt;&amp;lt;?xml-stylesheet?&amp;gt;&lt;/span&gt; processing intruction, e.g.
&lt;blockquote&gt;&amp;lt;?xml-stylesheet type = "text/xsl" href="ch0902.xsl" ?&amp;gt;&lt;/blockquote&gt;&lt;span style="font-weight: bold;"&gt;Standalone Programs and XSLT&lt;/span&gt;
Some programs perform XSLT transformation for you. There's a great deal of XSLT support built in to the &lt;span style="color: rgb(255, 0, 0);"&gt;Java &lt;/span&gt;programming language, so many of the transformation programs use Java.

&lt;span style="font-style: italic; color: rgb(0, 0, 153);font-size:130%;" &gt;Writing XSLT Style Sheet&lt;/span&gt;
In XSLT terms, an XML document is a &lt;span style="color: rgb(255, 0, 0);"&gt;tree of nodes&lt;/span&gt;. The tree starts with the &lt;span style="color: rgb(255, 0, 0);"&gt;root node&lt;/span&gt;, and it branches out from that point. The root node corresponds to the very beginning of the document; it's not the same as the document element. The root node corresponds to the very beginning of the document, so you have access to the document's &lt;span style="color: rgb(255, 0, 0);"&gt;prolog&lt;/span&gt;, which comes before the document element.

Each distinct item in an XML document is considered a &lt;span style="color: rgb(255, 0, 0);"&gt;node&lt;/span&gt;. From XSLT's point of view, there are seven types of nodes:
&lt;span style="font-weight: bold;"&gt;Attribute &lt;/span&gt;-- An attribute
&lt;span style="font-weight: bold;"&gt;Comment &lt;/span&gt;-- The text of a comment (excluding the &lt;span style="color: rgb(255, 0, 0);"&gt;&amp;lt;!--&lt;/span&gt; and &lt;span style="color: rgb(255, 0, 0);"&gt;--&amp;gt;&lt;/span&gt; parts);
&lt;span style="font-weight: bold;"&gt;Element &lt;/span&gt;-- An element
&lt;span style="font-weight: bold;"&gt;Namespace &lt;/span&gt;-- The namespace's URI
&lt;span style="font-weight: bold;"&gt;Processing instruction&lt;/span&gt; -- The text of the processing instruction (excluding &lt;span style="color: rgb(255, 0, 0);"&gt;&amp;lt;?&lt;/span&gt; and &lt;span style="color: rgb(255, 0, 0);"&gt;?&amp;gt;&lt;/span&gt;)
&lt;span style="font-weight: bold;"&gt;Root node&lt;/span&gt; -- The very start of the document, such as XML declaration.
&lt;span style="font-weight: bold;"&gt;Text&lt;/span&gt; -- The text of the node

To handle and search the various nodes in XML documents, the XSLT specification defines a number of elements. It also uses an XML-specific language, &lt;span style="color: rgb(255, 0, 0);"&gt;XML Path Language (XPath)&lt;/span&gt;, to let you specify exactly what nodes you're looking for.

You started a XSLT document with an &lt;span style="color: rgb(255, 0, 0);"&gt;XML declaration&lt;/span&gt; and by using the &lt;span style="color: rgb(255, 0, 0);"&gt;&amp;lt;xsl:stylesheet&amp;gt;&lt;/span&gt; element. Note that this is not the &lt;span style="color: rgb(255, 0, 0);"&gt;&amp;lt;?xsl:stylesheet?&amp;gt;&lt;/span&gt; &lt;span style="color: rgb(255, 0, 0);"&gt;processing instruction&lt;/span&gt; you can use in XML documents to connect style sheets to XML documents. Moreover, you associate the &lt;span style="font-style: italic; color: rgb(255, 0, 0);"&gt;xsl &lt;/span&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;namespace &lt;/span&gt;with the URI &lt;span style="font-style: italic;"&gt;"http://www.w3.org/1999/XSL/Transform"&lt;/span&gt;, which is the official namespace for XSLT. e.g.
&lt;blockquote&gt;&amp;lt;xsl:stylesheet version = "1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"&amp;gt;&lt;/blockquote&gt;To indicate what elements you want to locate and work with, you use the &lt;span style="color: rgb(255, 0, 0);"&gt;&amp;lt;xsl:template&amp;gt;&lt;/span&gt; element to create an &lt;span style="color: rgb(255, 0, 0);"&gt;XSLT template&lt;/span&gt;. A &lt;span style="color: rgb(255, 0, 0);"&gt;template &lt;/span&gt;lets you &lt;span style="color: rgb(255, 0, 0);"&gt;match &lt;/span&gt;a &lt;span style="color: rgb(255, 0, 0);"&gt;node &lt;/span&gt;or nodes in the XML document and specify what you want to do with the contained data. e.g.
&lt;blockquote&gt;&amp;lt;xsl:template match = "states"&amp;gt;&lt;/blockquote&gt;The XSLT processor starts at the &lt;span style="color: rgb(255, 0, 0);"&gt;root node&lt;/span&gt; and searches for &lt;span style="color: rgb(255, 0, 0);"&gt;templates &lt;/span&gt;that match the &lt;span style="color: rgb(255, 0, 0);"&gt;children &lt;/span&gt;of the root node, but not the grandchild of the root node, according this match rule.

&lt;span style="font-style: italic; color: rgb(0, 0, 153);font-size:130%;" &gt;Using &lt;span style="color: rgb(255, 0, 0);"&gt;&amp;lt;xsl:apply-templates&amp;gt;&lt;/span&gt;&lt;/span&gt;
You use the &lt;span style="color: rgb(255, 0, 0);"&gt;&amp;lt;xsl:apply-templates&amp;gt;&lt;/span&gt; element to indicate that you have &lt;span style="color: rgb(255, 0, 0);"&gt;other templates&lt;/span&gt; to use on the child nodes of the current node.

You've already used a template to match the document element &lt;span style="color: rgb(255, 0, 0);"&gt;&amp;lt;states&amp;gt;&lt;/span&gt;. And you've used the &lt;span style="color: rgb(255, 0, 0);"&gt;&amp;lt;xsl:apply-template&amp;gt;&lt;/span&gt; element to indicate that you also want the XSLT processor to process &lt;span style="color: rgb(255, 0, 0);"&gt;the child nodes of the &amp;lt;states&amp;gt; node&lt;/span&gt; by searching for additional templates that match those nodes.

&lt;span style="font-style: italic; color: rgb(0, 0, 153);font-size:130%;" &gt;Using &lt;span style="color: rgb(255, 0, 0);"&gt;&amp;lt;xsl:value-of&amp;gt;&lt;/span&gt; and &lt;span style="color: rgb(255, 0, 0);"&gt;&amp;lt;xsl:for-each&amp;gt;&lt;/span&gt;&lt;/span&gt;
To exact the name of each state, you can use the&lt;span style="color: rgb(255, 0, 0);"&gt; &amp;lt;xsl:value-of&amp;gt;&lt;/span&gt; element in the template to match every &lt;span style="color: rgb(255, 0, 0);"&gt;&amp;lt;state&amp;gt&lt;/span&gt;; element. In particular, you can exact the data in the &lt;span style="color: rgb(255, 0, 0);"&gt;&amp;lt;name&amp;gt;&lt;/span&gt; child node inside each &lt;span style="color: rgb(255, 0, 0);"&gt;&amp;lt;state&amp;gt;&lt;/span&gt; element by using the select attribute, e.g.
&lt;blockquote&gt;&amp;lt;xsl:template match = "state"&amp;gt;
&amp;lt;xsl:value-of select = "name" /&amp;gt;
&amp;lt;/xsl:template&amp;gt;&lt;/blockquote&gt;Note that the select attribute only selects the first node that matches. So if you have &lt;span style="color: rgb(255, 0, 0);"&gt;multiple nodes&lt;/span&gt; that could match, you can use the &lt;span style="color: rgb(255, 0, 0);"&gt;&amp;lt;xsl:for-each&amp;gt;&lt;/span&gt; element. e.g.
&lt;blockquote&gt;&amp;lt;xsl:template match = "state"&amp;gt;
&amp;lt;xsl:for-each select="name"&amp;gt;
&amp;lt;xsl:value-of select = "." /&amp;gt;
&amp;lt;/xsl:for-each&amp;gt;
&amp;lt;/xsl:template&amp;gt;&lt;/blockquote&gt;This example will catch all &lt;span style="color: rgb(255, 0, 0);"&gt;&amp;lt;name&amp;gt;&lt;/span&gt; elements, add their vaules to the output document.

&lt;span style="font-style: italic; color: rgb(0, 0, 153);font-size:130%;" &gt;Matching Nodes by Using the &lt;span style="color: rgb(255, 0, 0);"&gt;match &lt;/span&gt;Attribute&lt;/span&gt;
When you create an XSLT template, you need to specify what you want the &lt;span style="color: rgb(255, 0, 0);"&gt;template &lt;/span&gt;to match, and you do that with the &lt;span style="font-style: italic; color: rgb(255, 0, 0);"&gt;match &lt;/span&gt;attribute.
&lt;span style="font-weight: bold;"&gt;
Handdling Elements&lt;/span&gt;
You can match elements simply by using their names.
You can use the &lt;span style="color: rgb(255, 0, 0);"&gt;/&lt;/span&gt; operator to separate element names when you want to refer to a child of a particular node. e.g.
&lt;blockquote&gt;&amp;lt;xsl:template match="state/name"&amp;gt;&lt;/blockquote&gt;You can use &lt;span style="color: rgb(255, 0, 0);"&gt;*&lt;/span&gt; character as a &lt;span style="color: rgb(255, 0, 0);"&gt;wildcard&lt;/span&gt;; it can stand for any element (&lt;span style="color: rgb(255, 0, 0);"&gt;*&lt;/span&gt; can match only &lt;span style="color: rgb(255, 0, 0);"&gt;elements&lt;/span&gt;). By simply using the expression &lt;span style="font-style: italic;"&gt;"state//name"&lt;/span&gt;, which matches all &lt;span style="color: rgb(255, 0, 0);"&gt;&amp;lt;name&amp;gt;&lt;/span&gt; elements that are inside &lt;span style="color: rgb(255, 0, 0);"&gt;&amp;lt;state&amp;gt;&lt;/span&gt; elements, no matter how many levels deep. (These elements are called &lt;span style="font-style: italic; color: rgb(255, 0, 0);"&gt;descendands &lt;/span&gt;of the &lt;span style="color: rgb(255, 0, 0);"&gt;&amp;lt;state&amp;gt;&lt;/span&gt; element)
&lt;span style="font-weight: bold;"&gt;
Handling Attributes&lt;/span&gt;
You can handle attributes very much like you handle elements. All that's different is that you have to preface the attribute name with &lt;span style="color: rgb(255, 0, 0);"&gt;@&lt;/span&gt;. e.g.
&lt;blockquote&gt;&amp;lt;xsl:template match="population"&amp;gt;
&amp;lt;xsl:value-of select="."/&amp;gt;
&amp;lt;xsl:text&amp;gt; &amp;lt;/xsl:text&amp;gt;
&amp;lt;xsl:value-of select="@units"/&amp;gt;
&amp;lt;/xsl:template&amp;gt;&lt;/blockquote&gt;This example gets the values of the &lt;span style="font-style: italic; color: rgb(255, 0, 0);"&gt;units &lt;/span&gt;attribute of &lt;span style="color: rgb(255, 0, 0);"&gt;&amp;lt;population&amp;gt;&lt;/span&gt; elements. Note that &lt;span style="color: rgb(255, 0, 0);"&gt;&amp;lt;xsl:text&amp;gt;&lt;/span&gt; element performs like inserting a space.
You can use the &lt;span style="color: rgb(255, 0, 0);"&gt;@*&lt;/span&gt; wildcard to select all attributes of an element.

&lt;span style="font-weight: bold;"&gt;Handling &lt;span style="font-style: italic; color: rgb(255, 0, 0);"&gt;ID &lt;/span&gt;Attributes&lt;/span&gt;
If you have given elements an &lt;span style="font-style: italic; color: rgb(255, 0, 0);"&gt;ID &lt;/span&gt;attribute and have declared that attribute in a &lt;span style="color: rgb(255, 0, 0);"&gt;DTD &lt;/span&gt;or &lt;span style="color: rgb(255, 0, 0);"&gt;XML schema&lt;/span&gt;, you can match those element by using the &lt;span style="color: rgb(255, 0, 0);"&gt;id()&lt;/span&gt; expression. e.g.
&lt;blockquote&gt;&amp;lt;xsl:template match="id('Steven')"&amp;gt;&lt;/blockquote&gt;&lt;span style="font-weight: bold;"&gt;Handling Processing Instructions&lt;/span&gt;
You can match &lt;span style="color: rgb(255, 0, 0);"&gt;processing instructions&lt;/span&gt; by using the XPath expression &lt;span style="color: rgb(255, 0, 0);"&gt;processing-instruction()&lt;/span&gt;. e.g.
&lt;blockquote&gt;&amp;lt;xsl:template match="/processing-instruction()"&amp;gt;&lt;/blockquote&gt;You also can specify what &lt;span style="color: rgb(255, 0, 0);"&gt;processing instruction&lt;/span&gt; you want to match if you list its name in the &lt;span style="color: rgb(255, 0, 0);"&gt;parentheses &lt;/span&gt;here. e.g.
&lt;blockquote&gt;&amp;lt;xsl:template match="//processing-instruction(xml-stylesheet)"&amp;gt;&lt;/blockquote&gt;This example matches the processing instruction &lt;span style="color: rgb(255, 0, 0);"&gt;&amp;lt;?xml-stylesheet?&amp;gt;&lt;/span&gt;

&lt;span style="font-weight: bold;"&gt;Handling Multiple Matches&lt;/span&gt;
You can catch more than one match by using one match attribute if you use the OR operator, &lt;span style="color: rgb(255, 0, 0);"&gt;|&lt;/span&gt;. e.g.
&lt;blockquote&gt;&amp;lt;xsl:template match="bird | flower" &amp;gt;&lt;/blockquote&gt;This example matches both &lt;span style="color: rgb(255, 0, 0);"&gt;&amp;lt;bird&amp;gt;&lt;/span&gt; and &lt;span style="color: rgb(255, 0, 0);"&gt;&amp;lt;flower&amp;gt;&lt;/span&gt; elements.

There is a &lt;span style="color: rgb(255, 0, 0);"&gt;default template&lt;/span&gt; built in to XSLT for elements, and it just inserts their values into the resulting document. When you used &lt;span style="color: rgb(255, 0, 0);"&gt;&amp;lt;xsl:apply-templates&amp;gt;&lt;/span&gt; on the child elements of the &lt;span style="color: rgb(255, 0, 0);"&gt;&amp;lt;state&amp;gt;&lt;/span&gt; element, the default template was automatically used for elements, without any explicit template.

&lt;span style="font-style: italic; color: rgb(0, 0, 153);font-size:130%;" &gt;Working with the &lt;span style="color: rgb(255, 0, 0);"&gt;select &lt;/span&gt;Attribute and &lt;span style="color: rgb(255, 0, 0);"&gt;XPath&lt;/span&gt;&lt;/span&gt;
You can assign the &lt;span style="font-style: italic; color: rgb(255, 0, 0);"&gt;select &lt;/span&gt;attribute &lt;span style="color: rgb(255, 0, 0);"&gt;XPath expressions&lt;/span&gt;, which are used to indicate exactly what node or nodes you want to use in an XML document. W3C recommends &lt;a href="http://www.w3.org/tr/xpath"&gt;XPath 1.0&lt;/a&gt;, and current is working with &lt;a href="http://www.w3.org/tr/xpath20"&gt;XPath 2.0&lt;/a&gt;.

&lt;span style="color: rgb(255, 0, 0);"&gt;XPath expressions&lt;/span&gt; are more powerful than the &lt;span style="color: rgb(255, 0, 0);"&gt;match expressions&lt;/span&gt; you've already seen, for one thing, they're not restrict to working with the current node or direct child nodes; you can use them to work with parent nodes, ancestor nodes, and more.

To specify a node or set of nodes in XPath, you use a &lt;span style="color: rgb(255, 0, 0);"&gt;location path&lt;/span&gt;. A &lt;span style="color: rgb(255, 0, 0);"&gt;location path&lt;/span&gt; consists of one or more &lt;span style="color: rgb(255, 0, 0);"&gt;location steps&lt;/span&gt;, seperated by &lt;span style="color: rgb(255, 0, 0);"&gt;/&lt;/span&gt; (to refer to a child node) or &lt;span style="color: rgb(255, 0, 0);"&gt;//&lt;/span&gt; (to refer to any descendant node). If you start the location path with &lt;span style="color: rgb(255, 0, 0);"&gt;/&lt;/span&gt;, the location path is called an &lt;span style="color: rgb(255, 0, 0);"&gt;absolute location path&lt;/span&gt; because you're specifying the path from the &lt;span style="color: rgb(255, 0, 0);"&gt;root node&lt;/span&gt;; otherwise, the location path is &lt;span style="color: rgb(255, 0, 0);"&gt;relative&lt;/span&gt;. And the node an XPath expression is working on is called the &lt;span style="color: rgb(255, 0, 0);"&gt;context node&lt;/span&gt;.
&lt;span style="color: rgb(255, 0, 0);"&gt;Location steps&lt;/span&gt; are made up of an &lt;span style="color: rgb(255, 0, 0);"&gt;axis&lt;/span&gt;, a &lt;span style="color: rgb(255, 0, 0);"&gt;node test&lt;/span&gt;, and zero  or more &lt;span style="color: rgb(255, 0, 0);"&gt;predicates&lt;/span&gt;. e.g.
&lt;blockquote&gt;child:state[position() = 2]&lt;/blockquote&gt;This expression picks out the second &lt;span style="color: rgb(255, 0, 0);"&gt;&amp;lt;state&amp;gt;&lt;/span&gt; child of the context node. Here, &lt;span style="font-style: italic;"&gt;child &lt;/span&gt;is the name of the &lt;span style="color: rgb(255, 0, 0);"&gt;axis&lt;/span&gt;, &lt;span style="font-style: italic;"&gt;state &lt;/span&gt;is the &lt;span style="color: rgb(255, 0, 0);"&gt;node test&lt;/span&gt;, and &lt;span style="font-style: italic;"&gt;[position() = 2]&lt;/span&gt; is a &lt;span style="color: rgb(255, 0, 0);"&gt;predicate&lt;/span&gt;.

&lt;span style="font-style: italic; color: rgb(0, 0, 153);font-size:130%;" &gt;Using Axes&lt;/span&gt;
XPath expression supports many different &lt;span style="color: rgb(255, 0, 0);"&gt;axes&lt;/span&gt;:
&lt;span style="font-weight: bold;"&gt;ancestor &lt;/span&gt;-- This axis contains the ancestors of the context node.
&lt;span style="font-weight: bold;"&gt;ancestor-or-self&lt;/span&gt; -- This axis contains the context node and the ancestors of the context node.
&lt;span style="font-weight: bold;"&gt;attribute &lt;/span&gt;-- This axis contains the attributes of the context node.
&lt;span style="font-weight: bold;"&gt;child&lt;/span&gt;
&lt;span style="font-weight: bold;"&gt;descendant&lt;/span&gt;
&lt;span style="font-weight: bold;"&gt;descendant-or-self&lt;/span&gt;
&lt;span style="font-weight: bold;"&gt;following &lt;/span&gt;-- This axis contains all nodes that come after the context node.
&lt;span style="font-weight: bold;"&gt;following-sibling&lt;/span&gt; -- This axis contains all the following siblings of the context node, &lt;span style="color: rgb(255, 0, 0);"&gt;sibling &lt;/span&gt;refers to an item on the same level as the context node.
&lt;span style="font-weight: bold;"&gt;namespace &lt;/span&gt;-- This axis contains the namespace nodes of the context node.
&lt;span style="font-weight: bold;"&gt;parent&lt;/span&gt;
&lt;span style="font-weight: bold;"&gt;preceding &lt;/span&gt;-- This axis contains all nodes that come before the context node.
&lt;span style="font-weight: bold;"&gt;preceding-sibling&lt;/span&gt;
&lt;span style="font-weight: bold;"&gt;self&lt;/span&gt;

Note that although the &lt;span style="font-style: italic; color: rgb(255, 0, 0);"&gt;match &lt;/span&gt;attribute can only use the &lt;span style="font-weight: bold;"&gt;child &lt;/span&gt;or &lt;span style="font-weight: bold;"&gt;attribute &lt;/span&gt;axes in &lt;span style="color: rgb(255, 0, 0);"&gt;location steps&lt;/span&gt;, which is the major restriction on the &lt;span style="font-style: italic; color: rgb(255, 0, 0);"&gt;match &lt;/span&gt;attribute compare to the &lt;span style="font-style: italic; color: rgb(255, 0, 0);"&gt;select &lt;/span&gt;attribute, the &lt;span style="font-style: italic; color: rgb(255, 0, 0);"&gt;select &lt;/span&gt;attribute can use any of the 13 axes.

&lt;span style="font-style: italic; color: rgb(0, 0, 153);font-size:130%;" &gt;Using Node Tests&lt;/span&gt;
After you specify the axis you want to use in a location step, you specify the &lt;span style="color: rgb(255, 0, 0);"&gt;node test&lt;/span&gt;. A node test indicates what &lt;span style="color: rgb(255, 0, 0);"&gt;type &lt;/span&gt;of node you want to match. You can use &lt;span style="color: rgb(255, 0, 0);"&gt;names of nodes&lt;/span&gt; as node test, or you can use the wildcard &lt;span style="color: rgb(255, 0, 0);"&gt;*&lt;/span&gt; to select element nodes. You can also use these node tests:
&lt;span style="font-weight: bold;"&gt;comment()&lt;/span&gt; -- This node test selects comment nodes
&lt;span style="font-weight: bold;"&gt;node()&lt;/span&gt; -- This node test selects any type of node
&lt;span style="font-weight: bold;"&gt;processing-instruction()&lt;/span&gt; -- This node test selects a processing instruction node.
&lt;span style="font-weight: bold;"&gt;text()&lt;/span&gt; -- This node test selects a text node.

&lt;span style="font-style: italic; color: rgb(0, 0, 153);font-size:130%;" &gt;Using Predicates&lt;/span&gt;
The last part of a location step is the &lt;span style="color: rgb(255, 0, 0);"&gt;predicate&lt;/span&gt;. In a location step, the (optional) &lt;span style="color: rgb(255, 0, 0);"&gt;predicate &lt;/span&gt;narrows the search down even more. &lt;span style="color: rgb(255, 0, 0);"&gt;Predicate &lt;/span&gt;can get pretty involved because there are all kinds of &lt;span style="color: rgb(255, 0, 0);"&gt;XPath expressions&lt;/span&gt; that you can work with in predicates. There are various types of legal XPath expressions:
&lt;span style="font-weight: bold;"&gt;Booleans&lt;/span&gt;
&lt;span style="font-weight: bold;"&gt;Node sets&lt;/span&gt;
&lt;span style="font-weight: bold;"&gt;Numbers&lt;/span&gt;
&lt;span style="font-weight: bold;"&gt;Strings&lt;/span&gt;
&lt;span style="font-weight: bold;"&gt;Boolean Expressions&lt;/span&gt;

XPath &lt;span style="font-weight: bold;"&gt;Boolean &lt;/span&gt;values are &lt;span style="color: rgb(255, 0, 0);"&gt;true&lt;/span&gt;/&lt;span style="color: rgb(255, 0, 0);"&gt;false &lt;/span&gt;values. These are the logical operators:
&lt;span style="font-weight: bold;"&gt;!=&lt;/span&gt;
&lt;span style="font-weight: bold;"&gt;&amp;lt;&lt;/span&gt;
&lt;span style="font-weight: bold;"&gt;&amp;lt;=&lt;/span&gt;
&lt;span style="font-weight: bold;"&gt;=&lt;/span&gt;
&lt;span style="font-weight: bold;"&gt;&amp;gt;&lt;/span&gt;
&lt;span style="font-weight: bold;"&gt;&amp;gt;=&lt;/span&gt;

You can also use the keywords &lt;span style="color: rgb(255, 0, 0); font-style: italic;"&gt;and &lt;/span&gt;and &lt;span style="color: rgb(255, 0, 0); font-style: italic;"&gt;or &lt;/span&gt;to connect Boolean expressions. In addition, you can use the &lt;span style="font-style: italic; color: rgb(255, 0, 0);"&gt;not()&lt;/span&gt; function.

&lt;span style="font-weight: bold;"&gt;Node Sets&lt;/span&gt;
A &lt;span style="color: rgb(255, 102, 102);"&gt;node set&lt;/span&gt; is just a set of nodes. By collecting nodes into a set, XPath lets you work with multiple nodes as once. You can use the following XPath functions to work with node sets:
&lt;span style="font-weight: bold;"&gt;last()&lt;/span&gt; -- Returns the last node in the node set
&lt;span style="font-weight: bold;"&gt;position()&lt;/span&gt; -- Returns the position of the context node in the node set. The first node is Node 1.
&lt;span style="font-weight: bold;"&gt;count(&lt;/span&gt;&lt;span style="font-style: italic;"&gt;node-set&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;)&lt;/span&gt; -- Returns the numbers of nodes in &lt;span style="font-style: italic;"&gt;node-set&lt;/span&gt;.
&lt;span style="font-weight: bold;"&gt;id(&lt;/span&gt;&lt;span style="font-style: italic;"&gt;ID&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;)&lt;/span&gt; -- Returns a node set that contains the element whose &lt;span style="color: rgb(255, 0, 0);"&gt;ID&lt;/span&gt; value matches &lt;span style="font-style: italic;"&gt;ID&lt;/span&gt;.
&lt;span style="font-weight: bold;"&gt;local-name(&lt;/span&gt;&lt;span style="font-style: italic;"&gt;node-set&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;)&lt;/span&gt; -- Returns the name of the first node in &lt;span style="font-style: italic;"&gt;node-set&lt;/span&gt;.
&lt;span style="font-weight: bold;"&gt;namespace-uri(&lt;/span&gt;&lt;span style="font-style: italic;"&gt;node-set&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;)&lt;/span&gt; -- Returns the URI of the namspace of the first node in &lt;span style="font-style: italic;"&gt;node-set&lt;/span&gt;.
&lt;span style="font-weight: bold;"&gt;name(&lt;/span&gt;&lt;span style="font-style: italic;"&gt;node-set&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;)&lt;/span&gt; -- Returns the qualified name of the first node in &lt;span style="font-style: italic;"&gt;node-set&lt;/span&gt;.
e.g. You can use the follow script to numbering items.
&lt;blockquote&gt;&amp;lt;xsl:value-of select="position()"/gt;&lt;/blockquote&gt;&lt;span style="font-weight: bold;"&gt;Numbers&lt;/span&gt;
XPath uses the following operators to hand numbers  in expressions:
&lt;span style="font-weight: bold;"&gt;+&lt;/span&gt;
&lt;span style="font-weight: bold;"&gt;-&lt;/span&gt;
&lt;span style="font-weight: bold;"&gt;*&lt;/span&gt;
&lt;span style="font-weight: bold;"&gt;div&lt;/span&gt; -- Division
&lt;span style="font-weight: bold;"&gt;mod&lt;/span&gt; -- Modulus

Beside the numeric operator, XPath also has these functions that work with numbers:
&lt;span style="font-weight: bold;"&gt;ceiling()&lt;/span&gt;
&lt;span style="font-weight: bold;"&gt;floor()&lt;/span&gt;
&lt;span style="font-weight: bold;"&gt;round()&lt;/span&gt;
&lt;span style="font-weight: bold;"&gt;sum()&lt;/span&gt;

&lt;span style="font-weight: bold;"&gt;Strings&lt;/span&gt;
Strings in XPath are treated as &lt;span style="color: rgb(255, 0, 0);"&gt;Unicode characters&lt;/span&gt;. A number of XPath functions are specially designed to work on strings:
&lt;span style="font-weight: bold;"&gt;concat(&lt;/span&gt;&lt;span style="font-style: italic;"&gt;string1, string2, ...&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;)&lt;/span&gt; -- Returns the strings joined together.
&lt;span style="font-weight: bold;"&gt;contains(&lt;/span&gt;&lt;span style="font-style: italic;"&gt;string1, string2&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;)&lt;/span&gt;
etc...

&lt;span style="font-style: italic; color: rgb(0, 0, 153);font-size:130%;" &gt;XPath Abbreviations and Default Rules&lt;/span&gt;
There are ways to &lt;span style="color: rgb(255, 0, 0);"&gt;abbreviate &lt;/span&gt;location steps to make thing easier:
&lt;span style="font-weight: bold;"&gt;sefl::node()&lt;/span&gt; --&lt;span style="font-weight: bold;"&gt; .&lt;/span&gt;
&lt;span style="font-weight: bold;"&gt;parent::node() &lt;/span&gt;-- &lt;span style="font-weight: bold;"&gt;..&lt;/span&gt;
&lt;span style="font-weight: bold;"&gt;child::childname&lt;/span&gt; -- &lt;span style="font-weight: bold;"&gt;childname&lt;/span&gt;
&lt;span style="font-weight: bold;"&gt;attribute::childname&lt;/span&gt; -- &lt;span style="font-weight: bold;"&gt;@childname&lt;/span&gt;
&lt;span style="font-weight: bold;"&gt;/descentant-or-self::node()&lt;/span&gt; -- &lt;span style="font-weight: bold;"&gt;//&lt;/span&gt;

You can also abbreviate predicate expressions: e.g.
&lt;blockquote&gt;[position() = 8] -- [8]&lt;/blockquote&gt;XSLT also has some bulit-in &lt;span style="color: rgb(255, 0, 0);"&gt;default rules&lt;/span&gt;:
If you don't supply a template for an &lt;span style="color: rgb(255, 0, 0);"&gt;element&lt;/span&gt;, that element is still processed with &lt;span style="color: rgb(255, 0, 0);"&gt;&amp;lt;xsl:apply-templates/&amp;gt;&lt;/span&gt; to handle the element's child nodes.
For attribute, XSLT is to place the vlaue of the &lt;span style="color: rgb(255, 0, 0);"&gt;attribute &lt;/span&gt;in the output document.
For text, XSLT is to just insert the &lt;span style="color: rgb(255, 0, 0);"&gt;text &lt;/span&gt;into the output document.

&lt;span style="font-style: italic; color: rgb(0, 0, 153);font-size:130%;" &gt;XPath Tools&lt;/span&gt;
You can use &lt;a href="http://www.vbxml.com/downloads/default.asp?id=visualiser"&gt;XPath Visualiser&lt;/a&gt; by Dimitre Novatchev. This is a great way to test your XPath expressions until you get them to do what you want; all you need in order to use this tool is a browser.

&lt;span style="font-style: italic; color: rgb(0, 0, 153);font-size:130%;" &gt;Using &lt;span style="color: rgb(255, 0, 0);"&gt;&amp;lt;xsl:copy&amp;gt;&lt;/span&gt;&lt;/span&gt;
The &lt;span style="color: rgb(255, 0, 0);"&gt;&amp;lt;xsl:copy&amp;gt;&lt;/span&gt; element lets you &lt;span style="color: rgb(255, 0, 0);"&gt;copy &lt;/span&gt;nodes; it copies only the nodes that match the XPath expression you want. By using &lt;span style="color: rgb(255, 0, 0);"&gt;&amp;lt;xsl:copy&amp;lt;&lt;/span&gt;, you can copy whatever child elements, text nodes, or attributes you need.

&lt;span style="font-style: italic; color: rgb(0, 0, 153);font-size:130%;" &gt;Using &lt;span style="color: rgb(255, 0, 0);"&gt;&amp;lt;xsl:if&amp;gt;&lt;/span&gt;&lt;/span&gt;
You can use the &lt;span style="color: rgb(255, 0, 0);"&gt;&amp;lt;xsl:if&amp;gt;&lt;/span&gt; element to make &lt;span style="color: rgb(255, 0, 0);"&gt;choices &lt;/span&gt;that depend on the data in an XML document. All you have to do to use this element is assign its test attribute a value that evalutes to a Boolean value of true or false.

&lt;span style="font-style: italic; color: rgb(0, 0, 153);font-size:130%;" &gt;Using &lt;span style="color: rgb(255, 0, 0);"&gt;&amp;lt;xsl:choose&amp;gt;&lt;/span&gt;&lt;/span&gt;
You can also use&lt;span style="color: rgb(255, 0, 0);"&gt; &amp;lt;xsl:choose&amp;gt;&lt;/span&gt; to compare a test value against &lt;span style="color: rgb(255, 0, 0);"&gt;several &lt;/span&gt;possibilities. This element is used with &lt;span style="color: rgb(255, 0, 0);"&gt;&amp;lt;xsl:when&amp;gt;&lt;/span&gt; and &lt;span style="color: rgb(255, 0, 0);"&gt;&amp;lt;xsl:otherwise&amp;gt;&lt;/span&gt; elements.

&lt;span style="font-style: italic; color: rgb(0, 0, 153);font-size:130%;" &gt;Specifying the Output Document Type&lt;/span&gt;
There's actually a special rule: If the document node of the output document is&lt;span style="color: rgb(255, 0, 0);"&gt; &amp;lt;HTML&amp;gt;&lt;/span&gt;, XSLT processors are supposed to treate the output document as &lt;span style="color: rgb(255, 0, 0);"&gt;HTML&lt;/span&gt;.
In fact, you can specify the type of output document you want by using the XSLT &lt;span style="color: rgb(255, 0, 0);"&gt;&amp;lt;xsl:output&amp;gt;&lt;/span&gt; element:
&lt;span style="font-weight: bold;"&gt;xml &lt;/span&gt;-- This is the default. It makes the output documents start with an &lt;span style="color: rgb(255, 0, 0);"&gt;&amp;lt;?xml?&amp;gt;&lt;/span&gt; declaration.
&lt;span style="font-weight: bold;"&gt;html &lt;/span&gt;-- This makes the output document standard &lt;span style="color: rgb(255, 0, 0);"&gt;HTML 4.0&lt;/span&gt;, without an XML declaration.
&lt;span style="font-weight: bold;"&gt;text &lt;/span&gt;-- This makes the output document simple text.
e.g.
&lt;blockquote&gt;&amp;lt;xsl:output method = "text" /&amp;gt;&lt;/blockquote&gt;Here are some addtional useful &lt;span style="color: rgb(255, 0, 0);"&gt;&amp;lt;xsl:output&amp;gt;&lt;/span&gt; attributes:
&lt;span style="font-weight: bold;"&gt;encoding &lt;/span&gt;-- Indicates the value of the XML declaration's encoding attribute.
&lt;span style="font-weight: bold;"&gt;indent &lt;/span&gt;-- Indicates whether the XSLT processor should indent the output. You can set this attribute to "&lt;span style="color: rgb(255, 0, 0);"&gt;yes&lt;/span&gt;" or &lt;span style="color: rgb(255, 0, 0);"&gt;"no&lt;/span&gt;".
&lt;span style="font-weight: bold;"&gt;omit-xml-declaration&lt;/span&gt; -- Indicates whether the processor should omit the XML declaration.
&lt;span style="font-weight: bold;"&gt;standalone&lt;/span&gt;
&lt;span style="font-weight: bold;"&gt;version&lt;/span&gt;
&lt;span style="font-weight: bold;"&gt;doctype-system&lt;/span&gt;
&lt;span style="font-weight: bold;"&gt;doctype-public&lt;/span&gt;

Finally, take a look at both the &lt;a href="http://www.w3.org/tr/xslt"&gt;XSLT specification&lt;/a&gt; and the &lt;a href="http://www.w3.org/tr/xpath"&gt;XPath specification&lt;/a&gt;. To see the using of &lt;span style="color: rgb(255, 0, 0);"&gt;&amp;lt;xsl:sort&amp;gt;&lt;/span&gt; and &lt;span style="color: rgb(255, 0, 0);"&gt;&amp;lt;xsl:element&amp;gt;&lt;/span&gt; elements, and etc.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/10261622-112060598791854834?l=cherub325.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cherub325.blogspot.com/feeds/112060598791854834/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=10261622&amp;postID=112060598791854834' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10261622/posts/default/112060598791854834'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10261622/posts/default/112060598791854834'/><link rel='alternate' type='text/html' href='http://cherub325.blogspot.com/2005/07/teach-yourself-xml-in-21-days-day-9.html' title='Teach Yourself XML in 21 Days, Day 9'/><author><name>CHERUB</name><uri>http://www.blogger.com/profile/05541000949655411328</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='14' height='32' src='http://static.flickr.com/29/61835177_20e0034f42_t.jpg'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-10261622.post-112018115348842745</id><published>2005-07-01T01:10:00.000+01:00</published><updated>2005-07-01T02:49:39.016+01:00</updated><title type='text'>Teach Yourself XML in 21 days, Day 8</title><content type='html'>&lt;span class="dropcap"&gt;F&lt;/span&gt;&lt;span style="font-weight: bold; color: rgb(0, 0, 0);font-size:130%;" &gt;ormatting XML by Using Cascading Style Sheets&lt;/span&gt;
&lt;span style="color: rgb(255, 0, 0);"&gt;Cascading Style Sheets (CSS)&lt;/span&gt;. You use CSS to format the data in XML documents for display. It is convencing standard Web browsers to display XML by telling them how to format the data in various XML elements (and remove all the markup).

&lt;span style="font-style: italic; color: rgb(0, 0, 153);font-size:130%;" &gt;Introducing CSS&lt;/span&gt;
CSS has ben standarized by the W3C. There are three levels of CSS available: &lt;a href="http://www.w3.org/TR/rec-css1"&gt;CSS1&lt;/a&gt;, &lt;a href="http://www.w3.org/tr/rec-css2"&gt;CSS2&lt;/a&gt;, and &lt;a href="http://www.w3.org/style/css/current-work"&gt;CSS3&lt;/a&gt;. CSS3 is still under development. There are also many CSS resources available at the &lt;a href="http://www.w3.org/style/css"&gt;W3C CSS page&lt;/a&gt;, including CSS tutorials and links to free tools.
&lt;span style="font-style: italic; color: rgb(255, 0, 0);"&gt;Style Sheets&lt;/span&gt; are collections of &lt;span style="font-style: italic; color: rgb(255, 0, 0);"&gt;style rules&lt;/span&gt;, each of which shows how to format an XML element. A &lt;span style="font-style: italic; color: rgb(255, 0, 0);"&gt;rule &lt;/span&gt;is made up of a &lt;span style="font-style: italic; color: rgb(255, 0, 0);"&gt;selector&lt;/span&gt;, which is the element(s) you want to format, and the &lt;span style="font-style: italic; color: rgb(255, 0, 0);"&gt;rule specification&lt;/span&gt;, which shows what formatting you want to apply. Here's how a &lt;span style="font-style: italic; color: rgb(255, 0, 0);"&gt;rule &lt;/span&gt;might look if you want to format the text in the &lt;span style="color: rgb(255, 0, 0);"&gt;&amp;lt;title&amp;gt;&lt;/span&gt; element in &lt;span style="font-style: italic;"&gt;bold, centered, underlined 36-point font&lt;/span&gt; (a point is 1/72 inch):
&lt;blockquote&gt;title {display: block; font-size: 36pt; font-weight: bold; text-align: center; text-decoration: underline}&lt;/blockquote&gt;Note that the &lt;span style="font-style: italic; color: rgb(255, 0, 0);"&gt;rule specification&lt;/span&gt; is enclosed in curly braces, &lt;span style="color: rgb(255, 0, 0);"&gt;{&lt;/span&gt; and &lt;span style="color: rgb(255, 0, 0);"&gt;}&lt;/span&gt;. In this rule, &lt;span style="color: rgb(255, 0, 0);"&gt;title&lt;/span&gt;&lt;span style="font-style: italic; color: rgb(255, 0, 0);"&gt; &lt;/span&gt;is the &lt;span style="font-style: italic; color: rgb(255, 0, 0);"&gt;selector &lt;/span&gt;and &lt;span style="color: rgb(255, 0, 0);"&gt;{display: block; font-size: 36pt; font-weight: bold; text-align: center; text-decoration: underline}&lt;/span&gt; is the &lt;span style="font-style: italic; color: rgb(255, 0, 0);"&gt;rule specification&lt;/span&gt;. &lt;span style="color: rgb(255, 0, 0);"&gt;display, font-size, font-weight,&lt;/span&gt; and so on are CSS &lt;span style="font-style: italic; color: rgb(255, 0, 0);"&gt;properties&lt;/span&gt;. In fact, getting to know CSS largly means getting to know what properties, like these, are available.
&lt;span style="font-style: italic; color: rgb(255, 0, 0);"&gt;Rule specifications&lt;/span&gt; are made up of &lt;span style="font-style: italic; color: rgb(255, 0, 0);"&gt;property/value&lt;/span&gt; pairs, such as &lt;span style="color: rgb(255, 0, 0);"&gt;display:block&lt;/span&gt;, seperated with semicolons.
CSS style sheet files use the extension &lt;span style="font-style: italic; color: rgb(255, 0, 0);"&gt;.css&lt;/span&gt;.
Styel sheets don't look much like XML documents, but, as with XML, there are a few CSS validators available on the Web to help you check your CSS:
The &lt;a href="http://jigsaw.w3.org/css-validator"&gt;W3C CSS validator&lt;/a&gt;, checks the CSS in your pages for you;
The &lt;a href="http://tidy.sourceforge.net/"&gt;W3C TIDY&lt;/a&gt; program can conver styles in HTML documents to CSS for you.

&lt;span style="font-style: italic; color: rgb(0, 0, 153);font-size:130%;" &gt;Connecting CSS Style Sheets and XML Documents&lt;/span&gt;
There's really only one way of connecting a style sheet to an XML document: by using the &lt;span style="color: rgb(255, 0, 0);"&gt;&amp;lt;?xml-stylesheet?&amp;gt;&lt;/span&gt; &lt;span style="color: rgb(255, 0, 0);"&gt;processing intruction&lt;/span&gt;. e.g.
&lt;blockquote&gt;&amp;lt;?xml-stylesheet type = "text/css" href="ch0802.css"?&amp;gt;&lt;/blockquote&gt;Actually, there is another way to connect styles to XML elements. You can create &lt;span style="color: rgb(255, 0, 0);"&gt;inline styles&lt;/span&gt; by using the &lt;span style="font-style: italic; color: rgb(255, 0, 0);"&gt;style &lt;/span&gt;attribute. e.g.
&lt;blockquote&gt;He is free who lives as he &amp;lt;i style="font-style: italic"&amp;gt; wishes to live...&amp;lt;/i&amp;gt;&lt;/blockquote&gt;&lt;span style="font-style: italic; color: rgb(0, 0, 153);font-size:130%;" &gt;Creating Style Sheet Selectors&lt;/span&gt;
To specify what XML elements you want to format, you use &lt;span style="font-style: italic; color: rgb(255, 0, 0);"&gt;selectors &lt;/span&gt;in a CSS style sheet. Each &lt;span style="font-style: italic; color: rgb(255, 0, 0);"&gt;selector &lt;/span&gt;is just the name of the element you want to format. You can also group elements together just by seperating them with commas. e.g.
&lt;blockquote&gt;title, book {display:block}&lt;/blockquote&gt;&lt;span style="font-style: italic; color: rgb(0, 0, 153);font-size:130%;" &gt;Creating Style Classes&lt;/span&gt;
You don't need to specify an element name or names in order to create a selector; you can instead use a &lt;span style="color: rgb(255, 0, 0);"&gt;style class&lt;/span&gt; as a selector. You create a class by preceding its name with a &lt;span style="color: rgb(255, 0, 0);"&gt;dot (.).&lt;/span&gt; e.g.
&lt;blockquote&gt;.standout {color:cyan; background-color: coral}&lt;/blockquote&gt;You can apply the &lt;span style="font-style: italic; color: rgb(255, 0, 0);"&gt;standout &lt;/span&gt;class to elements such as &lt;span style="color: rgb(255, 0, 0);"&gt;&amp;lt;title&amp;gt;&lt;/span&gt; by using &lt;span style="font-style: italic; color: rgb(255, 0, 0);"&gt;class &lt;/span&gt;attribute. Note that the &lt;span style="font-style: italic; color: rgb(255, 0, 0);"&gt;class &lt;/span&gt;attribute isn't built in to XML; it's just used by convention. e.g.
&lt;blockquote&gt;&amp;lt;title class = "standout" &amp;gt; The Title &amp;lt;/title&amp;gt;&lt;/blockquote&gt;Note that the new colors are added to the display; they didn't simply replace the other formatting that was already present.
If you want to use the &lt;span style="font-style: italic; color: rgb(255, 0, 0);"&gt;class &lt;/span&gt;attribute in a &lt;span style="color: rgb(255, 0, 0);"&gt;valid document&lt;/span&gt;, you have to declare it. In a &lt;span style="color: rgb(255, 0, 0);"&gt;DTD&lt;/span&gt;, that might look like this:
&lt;blockquote&gt;&amp;lt;!ATTLIST title class CDATA #IMPLIED&amp;gt;&lt;/blockquote&gt;In an &lt;span style="color: rgb(255, 0, 0);"&gt;XML schema&lt;/span&gt;, it might look like this:
&lt;blockquote&gt;&amp;lt;xsd:attribute name="class" type="xsd:text"/&amp;gt;&lt;/blockquote&gt;You can target style classes to specific elements as well. e.g. say that you want to format the first paragraph in the text a particular way:
&lt;blockquote&gt;paragraph.first {text-indent:40;margin-top:30}&lt;/blockquote&gt;You can put the new style class to work with &lt;span style="color: rgb(255, 0, 0);"&gt;&amp;lt;paragraph&amp;gt;&lt;/span&gt; element as shown:
&lt;blockquote&gt;&amp;lt;paragraph class="first"&amp;gt;&lt;/blockquote&gt;&lt;span style="font-style: italic; color: rgb(0, 0, 153);font-size:130%;" &gt;Selecting by ID&lt;/span&gt;
There's another way to select XML elements to format: you can use the element's &lt;span style="color: rgb(255, 0, 0);"&gt;ID &lt;/span&gt;value. You can create selectors that target XML elements that have a certain ID by using this syntax:
&lt;blockquote&gt;&lt;span style="font-style: italic;"&gt;elementName&lt;/span&gt;#&lt;span style="font-style: italic;"&gt;idValue&lt;/span&gt;&lt;/blockquote&gt;e.g. You create a style rule for &lt;span style="color: rgb(255, 0, 0);"&gt;&amp;lt;paragraph&amp;gt;&lt;/span&gt; elements that have the ID "&lt;span style="color: rgb(255, 0, 0);"&gt;first&lt;/span&gt;":
&lt;blockquote&gt;paragraph#first {text-indent:40}&lt;/blockquote&gt;You can use this new ID-based selector in an XML documents as shown:
&lt;blockquote&gt;&amp;lt;paragraph id = "first"&amp;gt;&lt;/blockquote&gt;&lt;span style="font-style: italic; color: rgb(0, 0, 153);font-size:130%;" &gt;Using Inline Styles&lt;/span&gt;
In HTML you can create an &lt;span style="color: rgb(255, 0, 0);"&gt;inline style&lt;/span&gt; to format just one particular element. To do this, you simply assign a style rule spacification to the &lt;span style="font-style: italic; color: rgb(255, 0, 0);"&gt;style &lt;/span&gt;attribute of the element. e.g.
&lt;blockquote&gt;&amp;lt;paragraph&amp;gt;
He is free who lives as he &amp;lt;i style="font-style:italic"&amp;gt; wishes &amp;lt;/i&amp;gt; to live
&amp;lt;/paragraph&amp;gt;&lt;/blockquote&gt;Striclty speaking, this is not valid XML unless you also declare the style attribute in a DTD or an XML schema. Note that here &lt;span style="color: rgb(255, 0, 0);"&gt;&amp;lt;paragraph&amp;gt;&lt;/span&gt; element contains &lt;span style="color: rgb(255, 0, 0);"&gt;mixed-content&lt;/span&gt;.
Some people recommend not using inline style in this way because such styles are then spread throughout the document instead of being collected into a single style sheet.

&lt;span style="font-style: italic; color: rgb(0, 0, 153);font-size:130%;" &gt;Creating Style Rule Specifications in Style Sheets&lt;/span&gt;
The &lt;span style="color: rgb(255, 0, 0);"&gt;style rule specificaiton&lt;/span&gt; is a list of&lt;span style="color: rgb(255, 0, 0);"&gt; property/value pairs&lt;/span&gt; that are saperated by semicolons.
Note that when you assign values to CSS properties, you can speicy a size or a length by using &lt;span style="color: rgb(255, 0, 0);"&gt;points&lt;/span&gt;, indicated with the &lt;span style="color: rgb(255, 0, 0);"&gt;pt&lt;/span&gt; suffix. e.g. 36pt, or &lt;span style="color: rgb(255, 0, 0);"&gt;pixels&lt;/span&gt; (suffix &lt;span style="color: rgb(255, 0, 0);"&gt;px&lt;/span&gt;) , e.g. 20px. Theoretically, browsers are also supposed to be able to handle measurements in &lt;span style="color: rgb(255, 0, 0);"&gt;inches &lt;/span&gt;(suffix &lt;span style="color: rgb(255, 0, 0);"&gt;in&lt;/span&gt;), &lt;span style="color: rgb(255, 0, 0);"&gt;centimeters &lt;/span&gt;(suffix &lt;span style="color: rgb(255, 0, 0);"&gt;cm&lt;/span&gt;), &lt;span style="color: rgb(255, 0, 0);"&gt;millimeters &lt;/span&gt;(suffix &lt;span style="color: rgb(255, 0, 0);"&gt;mm&lt;/span&gt;), and &lt;span style="color: rgb(255, 0, 0);"&gt;picas &lt;/span&gt;(1/6 inch; suffix &lt;span style="color: rgb(255, 0, 0);"&gt;pc&lt;/span&gt;). If you omit the suffix for a length, &lt;span style="color: rgb(255, 0, 0);"&gt;pixels &lt;/span&gt;are assumed. Also, note that when you specify positions, the origin is at the upper left of the display window. That is positive x increases to the right, and positive y increases downward.

&lt;span style="font-style: italic; color: rgb(0, 0, 153);font-size:130%;" &gt;Creating Block Elements&lt;/span&gt;
When you assign the &lt;span style="font-style: italic; color: rgb(255, 0, 0);"&gt;display &lt;/span&gt;property the value &lt;span style="font-style: italic; color: rgb(255, 0, 0);"&gt;block&lt;/span&gt;, the corresponding element will be formatted in a &lt;span style="color: rgb(255, 0, 0);"&gt;block&lt;/span&gt;, which means that the data from the element will start on a new line, and the data from the next element will start on its own line as well.

&lt;span style="font-style: italic; color: rgb(0, 0, 153);font-size:130%;" &gt;Specifying Text Styles&lt;/span&gt;
There are plenty of style properties that you can use with text:
&lt;span style="font-weight: bold;"&gt;font-family&lt;/span&gt; -- Specifies the font face. You can list a number of options, separated by commas.
The first face supported by the browser will be used.
&lt;span style="font-weight: bold;"&gt;font-size&lt;/span&gt; -- Specifies the size of the font. You can set this property to a size; e.g. 36pt.
&lt;span style="font-weight: bold;"&gt;font-style&lt;/span&gt; -- Specifies whether to use &lt;span style="font-style: italic;"&gt;normal&lt;/span&gt;, &lt;span style="font-style: italic;"&gt;italic&lt;/span&gt;, or &lt;span style="font-style: italic;"&gt;oblique &lt;/span&gt;face.
&lt;span style="font-weight: bold;"&gt;font-weight&lt;/span&gt; -- Specifies the boldness of text relative to other fonts in the same font family. You can set it to &lt;span style="font-style: italic;"&gt;bold &lt;/span&gt;for bold text.
&lt;span style="font-weight: bold;"&gt;line-height&lt;/span&gt; -- Specifies the height of each line of text. You can set it to an absolute size or to a percentage, e.g. 150%, which increase 3/2 spacing.
&lt;span style="font-weight: bold;"&gt;text-alig&lt;/span&gt;n -- Specifies the alignment of text. You can assign this property values such as &lt;span style="font-style: italic;"&gt;left&lt;/span&gt;, &lt;span style="font-style: italic;"&gt;right&lt;/span&gt;, &lt;span style="font-style: italic;"&gt;center &lt;/span&gt;and &lt;span style="font-style: italic;"&gt;justify&lt;/span&gt;.
&lt;span style="font-weight: bold;"&gt;text-decoration&lt;/span&gt; -- Specifies underlining and overlining. You can set it to &lt;span style="font-style: italic;"&gt;underline&lt;/span&gt;, &lt;span style="font-style: italic;"&gt;overline&lt;/span&gt;, &lt;span style="font-style: italic;"&gt;line-through&lt;/span&gt;, or &lt;span style="font-style: italic;"&gt;blink&lt;/span&gt;; to get rid of text inherited decorations, you can set it to &lt;span style="font-style: italic;"&gt;none&lt;/span&gt;.
&lt;span style="font-weight: bold;"&gt;text-indent&lt;/span&gt; -- Specifies the indentation of the first line of block-level elements. You can set it to size.
&lt;span style="font-weight: bold;"&gt;text-transform&lt;/span&gt; -- Specifies whether to display text in all uppercase, in all lowercase, or with initial letter capitalized. The possible values are &lt;span style="font-style: italic;"&gt;capitalize&lt;/span&gt;, &lt;span style="font-style: italic;"&gt;uppercase&lt;/span&gt;, &lt;span style="font-style: italic;"&gt;lowercase&lt;/span&gt;, and &lt;span style="font-style: italic;"&gt;none&lt;/span&gt;.
&lt;span style="font-weight: bold;"&gt;vertical-align&lt;/span&gt; -- Specifies the vertical alignment of text. You can set it to &lt;span style="font-style: italic;"&gt;baseline&lt;/span&gt;, &lt;span style="font-style: italic;"&gt;sub&lt;/span&gt;, &lt;span style="font-style: italic;"&gt;super&lt;/span&gt;, &lt;span style="font-style: italic;"&gt;top&lt;/span&gt;, &lt;span style="font-style: italic;"&gt;text-top&lt;/span&gt;, &lt;span style="font-style: italic;"&gt;middle&lt;/span&gt;, &lt;span style="font-style: italic;"&gt;bottom&lt;/span&gt;, or &lt;span style="font-style: italic;"&gt;text-bottom&lt;/span&gt;.

&lt;span style="font-style: italic; color: rgb(0, 0, 153);font-size:130%;" &gt;Styling Colors and Backgrounds&lt;/span&gt;
There are a number of properties that you can use to set color and work with backgrounds:
&lt;span style="font-weight: bold;"&gt;background-attachment&lt;/span&gt; -- Specifies whether the background scrolls with the rest of the document.
&lt;span style="font-weight: bold;"&gt;background-color&lt;/span&gt; -- Specifies the background color. You can set it to a color.
&lt;span style="font-weight: bold;"&gt;background-image&lt;/span&gt; -- Specifies the background image. You can set it to a &lt;span style="font-style: italic;"&gt;URL&lt;/span&gt;.
&lt;span style="font-weight: bold;"&gt;background-repeat&lt;/span&gt; -- Specifies whether the background imag should be titled. You can set it to &lt;span style="font-style: italic;"&gt;repeat&lt;/span&gt;, &lt;span style="font-style: italic;"&gt;repeat-x&lt;/span&gt;, &lt;span style="font-style: italic;"&gt;repeat-y&lt;/span&gt;, or &lt;span style="font-style: italic;"&gt;no-repeat&lt;/span&gt;.
&lt;span style="font-weight: bold;"&gt;color &lt;/span&gt;-- Specifies the foreground color, i.e., the color of text.
The &lt;span style="font-style: italic; color: rgb(255, 0, 0);"&gt;cascading &lt;/span&gt;means that enclosed elements inherit styles from enclosing elements.
When you work with HTML browsers, you can define your own colors as standard &lt;span style="color: rgb(255, 0, 0);"&gt;HTML color triplets&lt;/span&gt;, using this syntax:
&lt;blockquote&gt;#rrggbb&lt;/blockquote&gt;&lt;span style="font-style: italic; color: rgb(0, 0, 153);font-size:130%;" &gt;Styling Borders&lt;/span&gt;
You can format the borders of block element by using a number of styles:
&lt;span style="font-weight: bold;"&gt;border-bottom-width&lt;/span&gt; -- Specifies the width of the bottom of the border. You can set it to a size, or &lt;span style="font-style: italic;"&gt;thin&lt;/span&gt;, &lt;span style="font-style: italic;"&gt;medium&lt;/span&gt;, or &lt;span style="font-style: italic;"&gt;thick&lt;/span&gt;.
&lt;span style="font-weight: bold;"&gt;border-color&lt;/span&gt; -- Specifies the color to use for the border. Setting it sets the color of the whole border.
&lt;span style="font-weight: bold;"&gt;border-left-width&lt;/span&gt; -- Specifies the width of the left edge of the border.
&lt;span style="font-weight: bold;"&gt;border-right-width&lt;/span&gt; -- Specifies the width of the right edge of the border.
&lt;span style="font-weight: bold;"&gt;border-style&lt;/span&gt; -- Specifies the border style. You can set it to &lt;span style="font-style: italic;"&gt;dotted&lt;/span&gt;, &lt;span style="font-style: italic;"&gt;dashed&lt;/span&gt;, &lt;span style="font-style: italic;"&gt;solid&lt;/span&gt;, &lt;span style="font-style: italic;"&gt;double&lt;/span&gt;, &lt;span style="font-style: italic;"&gt;groove&lt;/span&gt;, &lt;span style="font-style: italic;"&gt;ridge&lt;/span&gt;, &lt;span style="font-style: italic;"&gt;inset&lt;/span&gt;, or &lt;span style="font-style: italic;"&gt;outset&lt;/span&gt;. Most browsers only support &lt;span style="font-style: italic;"&gt;solid&lt;/span&gt;.
&lt;span style="font-weight: bold;"&gt;border-top-width&lt;/span&gt; -- Specifies the width of the top edge of the border.
&lt;span style="font-weight: bold;"&gt;border-width&lt;/span&gt; -- Specifiesthe width of the border.
It's also worth nothing that the &lt;span style="font-style: italic; color: rgb(255, 0, 0);"&gt;border &lt;/span&gt;style lets you set an element's &lt;span style="font-style: italic; color: rgb(255, 0, 0);"&gt;width&lt;/span&gt;, &lt;span style="font-style: italic; color: rgb(255, 0, 0);"&gt;style&lt;/span&gt;, and &lt;span style="font-style: italic; color: rgb(255, 0, 0);"&gt;color &lt;/span&gt;in a &lt;span style="color: rgb(255, 0, 0);"&gt;shortcut form&lt;/span&gt;. e.g.
&lt;blockquote&gt;P {border: 6pt solid ret}&lt;/blockquote&gt;&lt;span style="font-style: italic; color: rgb(0, 0, 153);font-size:130%;" &gt;Styling Alignments&lt;/span&gt;
You can customize alignments and margins:
&lt;span style="font-weight: bold;"&gt;line-height&lt;/span&gt;
&lt;span style="font-weight: bold;"&gt;margin-bottom&lt;/span&gt; --Specifies the bottom margin of a block element. You can set it to a size.
&lt;span style="font-weight: bold;"&gt;margin-left&lt;/span&gt;
&lt;span style="font-weight: bold;"&gt;margin-right&lt;/span&gt;
&lt;span style="font-weight: bold;"&gt;margin-top&lt;/span&gt;
&lt;span style="font-weight: bold;"&gt;text-align&lt;/span&gt;
&lt;span style="font-weight: bold;"&gt;text-indent&lt;/span&gt;
&lt;span style="font-weight: bold;"&gt;vertical-align&lt;/span&gt;

&lt;span style="font-style: italic; color: rgb(0, 0, 153);font-size:130%;" &gt;Styling Images&lt;/span&gt;
You can display images in some browsers while formatting XML documents:
&lt;span style="font-weight: bold;"&gt;background-image&lt;/span&gt;
&lt;span style="font-weight: bold;"&gt;background-repeat&lt;/span&gt;
&lt;span style="font-weight: bold;"&gt;background-attachment&lt;/span&gt;
&lt;span style="font-weight: bold;"&gt;background-position&lt;/span&gt; -- Specifies the intital position of the background image. You can set it to an x, y coordination. e.g. background-position: 10px 20px.
In addition to using an image as a background image, you can also display an images as a foreground image. To do that, you create a custom element whose express purpose is to display the image. e.g. you'll create an image element named &lt;span style="color: rgb(255, 0, 0);"&gt;&amp;lt;image&amp;gt;&lt;/span&gt; and make it display the image by using the CSS property &lt;span style="font-style: italic; color: rgb(255, 0, 0);"&gt;background-image&lt;/span&gt;. You can also specify the height and width to use when displaying an element by using the CSS properties &lt;span style="font-style: italic; color: rgb(255, 0, 0);"&gt;height &lt;/span&gt;and &lt;span style="font-style: italic; color: rgb(255, 0, 0);"&gt;width&lt;/span&gt;. Finally, you can indicatae whether the image will float to the right or left of text by using the &lt;span style="font-style: italic; color: rgb(255, 0, 0);"&gt;float &lt;/span&gt;property, as shown:
&lt;blockquote&gt;image {background-image: url(image.jpg); height: 60px; width: 100px; float: left}
&lt;/blockquote&gt;&lt;span style="font-style: italic; color: rgb(0, 0, 153);font-size:130%;" &gt;Positioning Elements&lt;/span&gt;
By using CSS, you can set the position of elements. Before CSS let you position items in a Web pages, HTML authors used HTML talbes to make sure that elements were at the correct locations rather than floating as the Web browser determined.
&lt;span style="font-weight: bold;"&gt;position&lt;/span&gt; -- Specifies  an element's position. You can set it to either &lt;span style="font-style: italic;"&gt;absolute &lt;/span&gt;or &lt;span style="font-style: italic;"&gt;relative&lt;/span&gt;.
&lt;span style="font-weight: bold;"&gt;top&lt;/span&gt; -- Specifies the location of the top of the element.
&lt;span style="font-weight: bold;"&gt;bottom&lt;/span&gt;
&lt;span style="font-weight: bold;"&gt;left&lt;/span&gt;
&lt;span style="font-weight: bold;"&gt;right&lt;/span&gt;
e.g.
&lt;blockquote&gt;image {background-image:url(image.jpg); position:absolute; left:250; top:180}&lt;/blockquote&gt;Besides &lt;span style="color: rgb(255, 0, 0);"&gt;absolute &lt;/span&gt;positioning, there's another option -- &lt;span style="color: rgb(255, 0, 0);"&gt;relative &lt;/span&gt;positioning. In relative positioning, you position items relative to the locations they would have in the usual flow of elements as the browser would display them.
&lt;span style="font-size:130%;"&gt;
&lt;span style="font-style: italic; color: rgb(0, 0, 153);"&gt;Styling Lists&lt;/span&gt;&lt;/span&gt;
You can show HTML-style lists in some browsers when you format an XML document:
&lt;span style="font-weight: bold;"&gt;list-item&lt;/span&gt; -- Creates a list when assigned to the &lt;span style="font-style: italic;"&gt;display &lt;/span&gt;property
&lt;span style="font-weight: bold;"&gt;list-style-image&lt;/span&gt; -- Specifies the image that should appear in front of each item in the list. This property is not support by many browsers.
&lt;span style="font-weight: bold;"&gt;list-style-type&lt;/span&gt; -- Specifies the list item marker, which appears before each list item. You can set it to various values, such as &lt;span style="font-style: italic;"&gt;disc&lt;/span&gt;, &lt;span style="font-style: italic;"&gt;circle&lt;/span&gt;, &lt;span style="font-style: italic;"&gt;square&lt;/span&gt;, &lt;span style="font-style: italic;"&gt;decimal&lt;/span&gt;, &lt;span style="font-style: italic;"&gt;lowercase Roman&lt;/span&gt;, and &lt;span style="font-style: italic;"&gt;uppercase Roman&lt;/span&gt;. Not all values are supported by all browsers.
e.g.
&lt;blockquote&gt;paragraph {display:list-item; margin-left:10px; list-style-type:circle}&lt;/blockquote&gt;&lt;span style="font-size:130%;"&gt;&lt;span style="font-style: italic; color: rgb(0, 0, 153);"&gt;Styling Tables&lt;/span&gt;&lt;/span&gt;
IE doesn't handle this formatting well......&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/10261622-112018115348842745?l=cherub325.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cherub325.blogspot.com/feeds/112018115348842745/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=10261622&amp;postID=112018115348842745' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10261622/posts/default/112018115348842745'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10261622/posts/default/112018115348842745'/><link rel='alternate' type='text/html' href='http://cherub325.blogspot.com/2005/06/teach-yourself-xml-in-21-days-day-8.html' title='Teach Yourself XML in 21 days, Day 8'/><author><name>CHERUB</name><uri>http://www.blogger.com/profile/05541000949655411328</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='14' height='32' src='http://static.flickr.com/29/61835177_20e0034f42_t.jpg'/></author><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-10261622.post-112015008309486991</id><published>2005-06-30T16:10:00.000+01:00</published><updated>2005-06-30T17:48:03.116+01:00</updated><title type='text'>Teach Yourself XML in 21 days, Day 7</title><content type='html'>&lt;span class="dropcap"&gt;C&lt;/span&gt;&lt;span style="font-weight: bold; color: rgb(0, 0, 0);font-size:130%;" &gt;reating Types in XML Schemas&lt;/span&gt;
&lt;span style="font-style: italic; color: rgb(0, 0, 153);font-size:130%;" &gt;Restricting Simple Types by Using XML Schema Facets&lt;/span&gt;
You can restrict the values that are acceptable when defining a &lt;span style="color: rgb(255, 0, 0);"&gt;simple type&lt;/span&gt;. You must base your own simple types on the simple types that are built into XML schemas. You can restrict the possible values of a simple types by using the &lt;span style="color: rgb(255, 0, 0);"&gt;&amp;lt;xsd:restriction&amp;gt;&lt;/span&gt; element. e.g.
&lt;blockquote&gt;&amp;lt;xsd:simpleType name="loanNumberType"&amp;gt;
&amp;lt;xsd:restriction base="xsd:string"&amp;gt;
&amp;lt;xsd:pattern value="\d{2} \d{4} \d{2}"/&amp;gt;
&amp;lt;/xsd:restriction&amp;gt;
&amp;lt;/xsd:simpleType&amp;gt;&lt;/blockquote&gt;You're using the &lt;span style="color: rgb(255, 0, 0);"&gt;&amp;lt;xsd:restriction&amp;gt;&lt;/span&gt; element's &lt;span style="font-style: italic; color: rgb(255, 0, 0);"&gt;base &lt;/span&gt;attribute to indicate that you are basing this type on the &lt;span style="color: rgb(255, 0, 0);"&gt;xsd:string&lt;/span&gt; type. Then you're using an XML schema &lt;span style="font-style: italic; color: rgb(255, 0, 0);"&gt;facet &lt;/span&gt;to restrict the actual text that can be stored in attributes of the type you're creating. In this example, the text in the &lt;span style="color: rgb(255, 0, 0);"&gt;loanNumberType &lt;/span&gt;type must much the&lt;span style="color: rgb(255, 0, 0);"&gt; regular expression pattern&lt;/span&gt; "\d{2} \d{4} \d{2}", which matches text strings made up of two digits, a space, four digits, another space, and two more digits (e.g. "22 6666 99").

&lt;span style="color: rgb(255, 0, 0); font-weight: bold;"&gt;Regular expressions&lt;/span&gt; used with the XML schema &lt;span style="color: rgb(255, 0, 0); font-style: italic;"&gt;pattern &lt;/span&gt;facet are the same as those used in the Perl programming languarage. As of this writing, the complete documentation for Perl regular expressions is &lt;a href="http://www.perldoc.com/perl5.8.0/pod/perlre.html"&gt;here&lt;/a&gt;. The Visual Studio .NET programming languages, such as Visual Basic.NET and visual C#.NET do support regular expression, and so they support the &lt;span style="font-style: italic; color: rgb(255, 0, 0);"&gt;pattern &lt;/span&gt;facet.

The following are the available facets and how they constrain data values:
&lt;span style="font-weight: bold; color: rgb(0, 0, 0);"&gt;totalDigits &lt;/span&gt;-- Specifies the maximum number of digits
&lt;span style="font-weight: bold; color: rgb(0, 0, 0);"&gt;fractionDigits &lt;/span&gt;-- Specifies the maximum number of decimal digits
&lt;span style="font-weight: bold; color: rgb(0, 0, 0);"&gt;pattern &lt;/span&gt;-- Specifies a regular expression that text must match
&lt;span style="font-weight: bold; color: rgb(0, 0, 0);"&gt;whiteSpace &lt;/span&gt;-- Can be se to &lt;span style="font-style: italic;"&gt;preserve &lt;/span&gt;(to preserve white space), &lt;span style="font-style: italic;"&gt;replace&lt;/span&gt;(to replace all white space with &amp;amp;#20;) or &lt;span style="font-style: italic;"&gt;collapse &lt;/span&gt;(to collapse multiple contiguous whitespace to one &amp;amp;#20;)
&lt;span style="font-weight: bold; color: rgb(0, 0, 0);"&gt;enumeration &lt;/span&gt;-- Constrains possible values to a specified set
&lt;span style="font-weight: bold; color: rgb(0, 0, 0);"&gt;maxInclusive &lt;/span&gt;-- Specifies the maximum possible value, inclusive
&lt;span style="font-weight: bold; color: rgb(0, 0, 0);"&gt;maxExclusive &lt;/span&gt;-- Specifies the maximum possible value, exclusive
&lt;span style="font-weight: bold; color: rgb(0, 0, 0);"&gt;minInclusive &lt;/span&gt;-- Specifies the minimum possible value, inclusive
&lt;span style="font-weight: bold; color: rgb(0, 0, 0);"&gt;minExclusive &lt;/span&gt;-- Specifies the minimum possible value, exclusive
&lt;span style="font-weight: bold; color: rgb(0, 0, 0);"&gt;length &lt;/span&gt;-- Specifies the data's length, such as number of characters
&lt;span style="font-weight: bold; color: rgb(0, 0, 0);"&gt;minLength &lt;/span&gt;-- Specifies the minimum possible length
&lt;span style="font-weight: bold; color: rgb(0, 0, 0);"&gt;maxLength &lt;/span&gt;-- Specifies the maximum possible length

Which facets apply to which predefined simple types? There are tables listing what facets you can use with the various simple data types and the addtional facets of the numeric simple types and simples types that can be ordered.

One of the interesting facets is &lt;span style="color: rgb(255, 0, 0);"&gt;enumeration&lt;/span&gt;, which lets you specify a set of values that a data item can select from.

&lt;span style="font-style: italic; color: rgb(0, 0, 153);font-size:130%;" &gt;Creating XML Schema Choices&lt;/span&gt;
XML schema &lt;span style="color: rgb(255, 0, 0);"&gt;choices &lt;/span&gt;let you specify a number of items, only one of which will be chosen. To declare a choice in XML schema, you use the &lt;span style="color: rgb(255, 0, 0);"&gt;&amp;lt;xsd:choice&amp;gt;&lt;/span&gt; element. e.g.
&lt;blockquote&gt;&amp;lt;xsd:choice&amp;gt;
&amp;lt;xsd:element name = "residentialProperty" type="xsd:string"/&amp;gt;
&amp;lt;xsd:element name = "commercialProperty" type = "xsd:string"/&amp;gt;
&amp;lt;/xsd:choice&amp;gt;&lt;/blockquote&gt;This child element can be either a &lt;span style="color: rgb(255, 0, 0);"&gt;&amp;lt;residentialProperty&amp;gt;&lt;/span&gt; element or a &lt;span style="color: rgb(255, 0, 0);"&gt;&amp;lt;commercialProperty&amp;gt;&lt;/span&gt; element.

&lt;span style="font-style: italic; color: rgb(0, 0, 153);font-size:130%;" &gt;Using Anonymous Type Definitions&lt;/span&gt;
When you've created your own types, you've declared elements to be of a certain type and then declared that type. To make use of a type, you give the new type a name and then use that name when decaring an element.
However, there's another way as well: you can use &lt;span style="color: rgb(255, 0, 0);"&gt;anonymous &lt;/span&gt;types. An &lt;span style="color: rgb(255, 0, 0);"&gt;anonymous type&lt;/span&gt; is useful if you want to use a type only once and don't want to create many different elements with the same type. So far, the types you've created ouselves have all had names, but if you want to use a type in only on location, it turns out that you can declare it at that location and you don't need to give it a name. This is called an &lt;span style="color: rgb(255, 0, 0);"&gt;anonymous type&lt;/span&gt;. To create an &lt;span style="color: rgb(255, 0, 0);"&gt;anonymous type&lt;/span&gt; definition, you simply enclose an &lt;span style="color: rgb(255, 0, 0);"&gt;&amp;lt;xsd:simpleType&amp;gt;&lt;/span&gt; or &lt;span style="color: rgb(255, 0, 0);"&gt;&amp;lt;xsd:complexType&amp;gt;&lt;/span&gt; element inside an &lt;span style="color: rgb(255, 0, 0);"&gt;&amp;lt;xsd:element&amp;gt;&lt;/span&gt; element declaration. You can also declare attributes in anonymous types.

&lt;span style="font-style: italic; color: rgb(0, 0, 153);font-size:130%;" &gt;Declaring Empty Elements&lt;/span&gt;
You just declare&lt;span style="color: rgb(255, 0, 0);"&gt; empty elements&lt;/span&gt; by using a &lt;span style="color: rgb(255, 0, 0);"&gt;complex type&lt;/span&gt; that has no child elements. In other words, you indicate that these are elements that do not contain any other elements, which means they are empty. Empty elements can have attributes; if you declare them using complex types, you can give them attributes.

&lt;span style="font-style: italic; color: rgb(0, 0, 153);font-size:130%;" &gt;Declaring Mixed-Content Elements&lt;/span&gt;
XML schemas support &lt;span style="color: rgb(255, 0, 0);"&gt;true mixed-content elements&lt;/span&gt;, in which you can mix text and elements. In other words, character data can appear at the same level as child elements. e.g.
&lt;blockquote&gt;&amp;lt;invoice&amp;gt;
To &amp;lt;name&amp;gt; James Blandings &amp;lt;/name&amp;gt;: Your monthly payment of ... on &amp;lt;property&amp;gt; The Hackeet Place &amp;lt;/property&amp;gt; is due in the three weeks. Thanks.
&amp;lt;/invoice&amp;gt;&lt;/blockquote&gt;As you can see, both text and elements are mixed inside the &lt;span style="color: rgb(255, 0, 0);"&gt;&amp;lt;invoice&amp;gt;&lt;/span&gt; element in this example. To indicate that this element can handle &lt;span style="color: rgb(255, 0, 0);"&gt;mixed content&lt;/span&gt;, you set the &lt;span style="color: rgb(255, 0, 0);"&gt;&amp;lt;complexType&amp;gt;&lt;/span&gt; elment's &lt;span style="font-style: italic; color: rgb(255, 0, 0);"&gt;mixed &lt;/span&gt;attribute to &lt;span style="color: rgb(255, 0, 0);"&gt;"true"&lt;/span&gt;. Then all you have to do now is add the declarations for the for the elements that you can use inside the &lt;span style="color: rgb(255, 0, 0);"&gt;&amp;lt;invoice&amp;gt;&lt;/span&gt; element.
Whereas DTDs provide only partial support for mixed-content models, schemas provide a more complete syntax that allows you to specify the order and number of child elements in mixed-content elements. However, it is important to note that although you can declare mixed-content elements, you should avoid doing so if possible. &lt;span style="font-style: italic;"&gt;Ideally in XML documents, all data is enclosed inside elements. &lt;/span&gt;

&lt;span style="font-style: italic; color: rgb(0, 0, 153);font-size:130%;" &gt;Groupint Elements Together&lt;/span&gt;
A&lt;span style="color: rgb(255, 0, 0);"&gt; elements group&lt;/span&gt; collects elements together, and you can refer to a group by name. e.g.
&lt;blockquote&gt;&amp;lt;xsd:group ref="aElementGroup" /&amp;gt;&lt;/blockquote&gt;To create the group named &lt;span style="font-style: italic;"&gt;aElementGroup&lt;/span&gt;, you can use the &lt;span style="color: rgb(255, 0, 0);"&gt;&amp;lt;xsd:group&amp;gt;&lt;/span&gt; element. By using groups, you can collect elements together and refer to them by name, which means you can use those groups throughout the XML schema as needed.

&lt;span style="font-style: italic; color: rgb(0, 0, 153);font-size:130%;" &gt;Grouping Attributes Together&lt;/span&gt;
Besides grouping elements together, you can also group attributes together. You create &lt;span style="color: rgb(255, 0, 0);"&gt;attribute groups&lt;/span&gt; by using the &lt;span style="color: rgb(255, 0, 0);"&gt;&amp;lt;xsd:attributeGroup&amp;gt;&lt;/span&gt; element. You can use an attribute group named &lt;span style="font-style: italic;"&gt;aAttributeGropu&lt;/span&gt;, and you can refer to that group as follows in the declaration of the an element:
&lt;blockquote&gt;&amp;xsd:attributeGroup ref="aAttributeGroup" /&amp;gt;&lt;/blockquote&gt;The inspiration behind element and attribute groups is &lt;span style="color: rgb(255, 0, 0);"&gt;parameter entities&lt;/span&gt; in DTDs. Parameter netities let you collect declarations together and use them by referring to them simply by using a parameter entity reference.

&lt;span style="font-style: italic; color: rgb(0, 0, 153);font-size:130%;" &gt;Declaring &lt;span style="color: rgb(255, 0, 0);"&gt;all &lt;/span&gt;Groups&lt;/span&gt;
In an &lt;span style="color: rgb(255, 0, 0); font-style: italic;"&gt;all &lt;/span&gt;group, elements may appear in any order, but there's a catch: all the elements in this kind of group may appear only once or not at all (which means that the allowed values of &lt;span style="font-style: italic;"&gt;minOccurs &lt;/span&gt;and &lt;span style="font-style: italic;"&gt;maxOccurs &lt;/span&gt;are 0 and 1 only). This kind of group must be used at the top level of the content model, and the group's children must be individual element -- in other words, this group must itself contain no groups.

&lt;span style="font-style: italic; color: rgb(51, 51, 153);font-size:130%;" &gt;Handling Namespaces in Schemas&lt;/span&gt;
DTD's weren't built specially to handle namespace; as you've seen, they really treat namesapce prefixes as part of an element name. XML schemas, on the other hand, were supposed to improve on that situation, and to meet that goal, they support a new attribute: &lt;span style="font-style: italic; color: rgb(255, 0, 0);"&gt;targetNamespace&lt;/span&gt;. The &lt;span style="font-style: italic; color: rgb(255, 0, 0);"&gt;targetNamepace &lt;/span&gt;attribute can hold the namespaces the XML schema is targeted toward -- i.e. the namspace that the elements in the XML document uses. In other workds, a target namespace lets an XML validator know what XML schema to use to check XML elements in that namespace. It's important that you know that XML schemas treat &lt;span style="font-style: italic;"&gt;global &lt;/span&gt;element declarations differently thant &lt;span style="font-style: italic;"&gt;local &lt;/span&gt;element declarations when it comes to working with namespaces; this is because global elements can be used as document elements, whereas local elements can't.
As you've seen, globally declared elements and attributes are declared at the top level in the XML schema, directly under the &lt;span style="color: rgb(255, 0, 0);"&gt;&amp;lt;schema&amp;gt;&lt;/span&gt; element. All the other elements and attributes delcared in an XML schema are locally declared. When you start working with namespaces, XML schemas allow you to specify whether locals need to be &lt;span style="color: rgb(255, 0, 0); font-style: italic;"&gt;qualified &lt;/span&gt;(that is, whether they need a namespace prefix) when used in an XML document.

&lt;span style="font-style: italic; color: rgb(0, 0, 153);font-size:130%;" &gt;Declaring Locals Without Qualifying Them&lt;/span&gt;
To specify whether elements need to be &lt;span style="font-style: italic; color: rgb(255, 0, 0);"&gt;qualified&lt;/span&gt;, you use the &lt;span style="font-style: italic; color: rgb(255, 0, 0);"&gt;elementFormDefault &lt;/span&gt;attribute of the &lt;span style="color: rgb(255, 0, 0);"&gt;&amp;lt;schema&amp;gt;&lt;/span&gt; element, and to specify whether attributes need to be qualified, you use the &lt;span style="font-style: italic; color: rgb(255, 0, 0);"&gt;attributeFormDefault &lt;/span&gt;attribute of the same element. You can set the &lt;span style="font-style: italic; color: rgb(255, 0, 0);"&gt;elementFormDefault &lt;/span&gt;and &lt;span style="font-style: italic; color: rgb(255, 0, 0);"&gt;atributeFormDefault &lt;/span&gt;attributes to &lt;span style="font-style: italic; color: rgb(255, 0, 0);"&gt;"qualified"&lt;/span&gt; or &lt;span style="font-style: italic; color: rgb(255, 0, 0);"&gt;"unqualified"&lt;/span&gt;. e.g.
&lt;blockquote&gt;&amp;lt;schema xlmns = "http://www.w3.org/2001/XMLSchema" targetNamespace="http://xmlpowercorp" elementFormDefault="unqualified" attributeFormDefault="unqualified"&amp;gt;&lt;/blockquote&gt;Because you're dealing with namespaces now, let's take a look at a shorcut way of handling the XML schema URI &lt;span style="font-style: italic;"&gt;"http://www.w3.org/2001/XMLSchema"&lt;/span&gt; in an XML schema. Up to this point, you've been associating the prefix &lt;span style="font-style: italic; color: rgb(255, 0, 0);"&gt;xsd &lt;/span&gt;with that namespace in the XML schema, e.g.
&lt;blockquote&gt;&amp;lt;xsd:schema xmlns:xsd=//www.w3.org/2001/XMLSchema"&amp;gt;&lt;/blockquote&gt;However, if you make &lt;span style="font-style: italic;"&gt;"http://www.w3.org/2001/XMLSchema"&lt;/span&gt; the &lt;span style="font-style: italic;"&gt;default &lt;/span&gt;namespace in an XML schema, you don't need to use a prefix for the XML schema elements. Though it can save some time, but you have to be a little careful because now the XML validator will assume that everying in the&lt;span style="font-style: italic;"&gt; "http://www.w3.org/2001/XMLSchema"&lt;/span&gt; namespace. That's a problem because when you say, e.g. that the &lt;span style="color: rgb(255, 0, 0);"&gt;&amp;lt;document&amp;gt;&lt;/span&gt; element is of the &lt;span style="font-style: italic; color: rgb(255, 0, 0);"&gt;documentType &lt;/span&gt;type, the XML validator needs to know where to find the &lt;span style="font-style: italic; color: rgb(255, 0, 0);"&gt;documentType &lt;/span&gt;type; it won't find that type defined in the default &lt;span style="font-style: italic;"&gt;"http://www.w3.org/2001/XMLSchema"&lt;/span&gt; namespace. You can indicate that local types are declared locally by using a new namspace prefix, such as &lt;span style="font-style: italic; color: rgb(255, 0, 0);"&gt;xmp &lt;/span&gt;(short for XML Power Corp) . If only two elements that are global in the XML schema, which are &lt;span style="color: rgb(255, 0, 0);"&gt;&amp;lt;document"&amp;gt;&lt;/span&gt; and &lt;span style="color: rgb(255, 0, 0);"&gt;&amp;lt;comment&amp;gt;&lt;/span&gt;, so they're the only ones that need to be qualified with a namespace prefix.

&lt;span style="font-style: italic; color: rgb(0, 0, 153);font-size:130%;" &gt;Declaring and Qaulifying Locals&lt;/span&gt;
We can require that locals be &lt;span style="color: rgb(255, 0, 0);"&gt;qualified &lt;/span&gt;with a namespace prefix. e.g., we can assign the value &lt;span style="color: rgb(255, 0, 0);"&gt;"qualified"&lt;/span&gt; to the &lt;span style="font-style: italic; color: rgb(255, 0, 0);"&gt;elementFormDefault &lt;/span&gt;attribute instead of using &lt;span style="color: rgb(255, 0, 0);"&gt;"unqualified"&lt;/span&gt;. Now you have to qualify both locals and globals in the XML documents. You can also require that attributes be qualified by setting &lt;span style="font-style: italic; color: rgb(255, 0, 0);"&gt;attributeFormDefault &lt;/span&gt;to "&lt;span style="color: rgb(255, 0, 0);"&gt;qualified"&lt;/span&gt;. Now all elements and attributes, both local and global, will have to be qualified. Rather than prefix every element and attribute with &lt;span style="font-style: italic; color: rgb(255, 0, 0);"&gt;xmp:&lt;/span&gt;, however, you can make things easier by just putting the entire XML document into the &lt;span style="font-style: italic;"&gt;"http://xmlpowercorp"&lt;/span&gt; namespace.
Up to this point, you've specified that all locals must be either qualified or unqualifed, but there's also a way of working on locals individually, by using the &lt;span style="font-style: italic; color: rgb(255, 0, 0);"&gt;form &lt;/span&gt;attribute. e.g. you can leave all locals unqualified expect for a single attribute, &lt;span style="font-style: italic; color: rgb(255, 0, 0);"&gt;phone&lt;/span&gt;, which must be qualified:
&lt;blockquote&gt;&amp;lt;xsd:attribute name="phone" type="xsd:string" use="optional" form="qualified"/&amp;gt;
&lt;/blockquote&gt;&lt;span style="font-style: italic; color: rgb(0, 0, 153);font-size:130%;" &gt;Annotating an XML Schema&lt;/span&gt;
As with DTDs and XML documents, you can add documents to XML schemas. You can use the XML comments in XML schema. XML schemas also define three new element that you use to add annotation to schemas: &lt;span style="color: rgb(255, 0, 0);"&gt;&amp;lt;xsd:annotation&amp;gt;&lt;/span&gt;, &lt;span style="color: rgb(255, 0, 0);"&gt;&amp;lt;xsd:documentation&amp;gt;&lt;/span&gt;, &lt;span style="color: rgb(255, 0, 0);"&gt;&amp;lt;xsd:appInfo&amp;gt;&lt;/span&gt;.
The &lt;span style="color: rgb(255, 0, 0);"&gt;&amp;lt;xsd:annotation&amp;gt;&lt;/span&gt; element is a container for the other two. The &lt;span style="color: rgb(255, 0, 0);"&gt;&amp;lt;xsd:documentation&amp;gt;&lt;/span&gt; element holds text intended for human readers, but it's a little more than standard XML comments because the text in &lt;span style="color: rgb(255, 0, 0);"&gt;&amp;lt;xsd:documentation&amp;gt;&lt;/span&gt; elements can be stripped out by an XML processor and used to document an XML schema. The &lt;span style="color: rgb(255, 0, 0);"&gt;&amp;lt;xsd:appInfo&amp;gt;&lt;/span&gt; element can be used to pass along instructions to the XML pocessor that is reading the XML schema.
You can use these elements anywhere you like in an XML schema.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/10261622-112015008309486991?l=cherub325.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cherub325.blogspot.com/feeds/112015008309486991/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=10261622&amp;postID=112015008309486991' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10261622/posts/default/112015008309486991'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10261622/posts/default/112015008309486991'/><link rel='alternate' type='text/html' href='http://cherub325.blogspot.com/2005/06/teach-yourself-xml-in-21-days-day-7.html' title='Teach Yourself XML in 21 days, Day 7'/><author><name>CHERUB</name><uri>http://www.blogger.com/profile/05541000949655411328</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='14' height='32' src='http://static.flickr.com/29/61835177_20e0034f42_t.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-10261622.post-111980141276868393</id><published>2005-06-26T16:44:00.000+01:00</published><updated>2005-06-27T13:14:02.103+01:00</updated><title type='text'>Teach Yourself XML in 21 days, Day 6</title><content type='html'>&lt;span class="dropcap"&gt;C&lt;/span&gt;&lt;span style="font-weight: bold;font-size:130%;" &gt;reating Valid XML Documents: XML Schemas&lt;/span&gt;
A more comprehensive and detailed way of specifying the syntax of XML documents, followed the W3C's response, is XML schemas. A good resource on XML schemas is the &lt;a href="http://www.w3.org/XML/Schema"&gt;W3C XML Schema Activity Page&lt;/a&gt;.

Using XML Schema Tools
More and more software tools are appearing that can generate XML schemas. Such as:
&lt;a href="http://www.hitsw.com/xml_utilites"&gt;HiT Software&lt;/a&gt; -- This is an online automatic XML schema generator and DTD to XML schema converter. You just let it upload a document, and it creates an XML schema for free.

Validating XML Documents by Using XML Schemas
&lt;a href="http://www.w3.org/2001/03/webdata/xsv"&gt;XSV&lt;/a&gt; -- This is the online W3C XML schema validator
&lt;span style="font-weight: bold;"&gt;XML Schema Definition Language -- XSD schema.&lt;/span&gt;
How do you &lt;span style="color: rgb(255, 0, 0);"&gt;connect &lt;/span&gt;an XML schema, such as &lt;span style="font-style: italic; color: rgb(255, 0, 0);"&gt;ch0603.xsd&lt;/span&gt;, to an XML document? Different XML processors do it in different ways, but a standard is emerging. If you define a &lt;span style="font-style: italic;"&gt;namespace&lt;/span&gt;, usually named &lt;span style="font-style: italic; color: rgb(255, 0, 0);"&gt;xsi&lt;/span&gt;, for the URI &lt;span style="font-style: italic; color: rgb(255, 0, 0);"&gt;www.w3.org/2001/XMLSchema-instance&lt;/span&gt;, you can then use an attribute named &lt;span style="font-style: italic; color: rgb(255, 0, 0);"&gt;xsi:schemaLocation&lt;/span&gt; in the document element to specify the URI of the document's XML schema. e.g.
&lt;blockquote&gt;&amp;lt;? xml version = "1.0" &amp;gt;
&amp;lt;document xmlns = "http://xmlpowercorp"
xmlns:xsi = "http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation = "http://xmlpowercorp ch0603.xsd" &amp;gt;
...
&amp;lt;/document&amp;gt;&lt;/blockquote&gt;It turns out that it's actually not necessary to embed an &lt;span style="font-style: italic; color: rgb(255, 0, 0);"&gt;xsi:schemaLocation&lt;/span&gt; attribute in an XML document to validate it by using Internet Exploer -- you can use JavaScript to tell Internet Explorer where to find the XML schema.

&lt;span style="font-style: italic; color: rgb(0, 0, 153);font-size:130%;" &gt;Creating XML Schemas&lt;/span&gt;
The first thing to note about the XML schema is that it's a well-formed XML document. It uses proper XML elemnts to declare the syntax of the XML document. e.g.
&lt;blockquote&gt;&amp;lt;?xml version="1.0" encoding="UTF-8"?&amp;gt;
&amp;lt;xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"&amp;gt;
&amp;lt;xsd:annotation&amp;gt;
   &amp;lt;xsd:documentation&amp;gt;
       Test XML schema.
   &amp;lt;/xsd:documentation&amp;gt;
&amp;lt;/xsd:annotation&amp;gt;
&amp;lt;xsd:element name="document" type="documentType"/&amp;gt;
&amp;lt;xsd:complexType name="documentType"&amp;gt;
   &amp;lt;xsd:sequence&amp;gt;
       &amp;lt;xsd:element ref="comment" minOccurs="1"/&amp;gt;
       &amp;lt;xsd:element name="test1" type="recordType"/&amp;gt;
       &amp;lt;xsd:element name="test2" type="xsd:string"/&amp;gt;
   &amp;lt;/xsd:sequence&amp;gt;
   &amp;lt;xsd:attribute name="documentDate" type="xsd:date"/&amp;gt;
&amp;lt;/xsd:complexType&amp;gt;
&amp;lt;xsd:element name="comment" type="xsd:string"/&amp;gt;
...
&amp;lt;/xsd:schema&amp;gt;&lt;/blockquote&gt;To start, XML schema uses an XML declaration to declare the namespace prefix &lt;span style="font-style: italic; color: rgb(255, 0, 0);"&gt;xsd &lt;/span&gt;(the usual name for this namespace in XML schemas), and it assigns the URI &lt;span style="font-style: italic;"&gt;www.w3.org/2001/XMLSchema&lt;/span&gt; to that prefix, which is how the W3C says you must do things in XML schemas, in a special element named &lt;span style="color: rgb(255, 0, 0);"&gt;&amp;lt;xsd:schema&amp;gt;&lt;/span&gt;.
In the example, you're putting the &lt;span style="color: rgb(255, 0, 0);"&gt;&amp;lt;xsd:documentation&amp;gt;&lt;/span&gt; element with the text "&lt;span style="font-style: italic;"&gt;Text XML Schema&lt;/span&gt;" inside the &lt;span style="color: rgb(255, 0, 0);"&gt;&amp;lt;xsd:annotation&amp;gt;&lt;/span&gt; element, creating a comment in the schema. Annotations like this one are ignored by XML processors.
You use&lt;span style="color: rgb(255, 0, 0);"&gt; &amp;lt;xsd:element&amp;gt;&lt;/span&gt; to declare elements and &lt;span style="color: rgb(255, 0, 0);"&gt;&amp;lt;xsd:attribute&amp;gt;&lt;/span&gt; to declare attributes.

&lt;span style="font-style: italic; color: rgb(0, 0, 153);font-size:130%;" &gt;The Built-in XML Schema Elements&lt;/span&gt;
These are the elements you can use in XML shemas. These elements are usually used with the namespace &lt;span style="font-style: italic;"&gt;www.w3.org/2001/XMLSchema&lt;/span&gt; and namespace prefix &lt;span style="font-style: italic; color: rgb(255, 0, 0);"&gt;xsd&lt;/span&gt;, so, e.g. the &lt;span style="color: rgb(255, 0, 0);"&gt;&amp;lt;all&amp;gt;&lt;/span&gt; element would usually be &lt;span style="color: rgb(255, 0, 0);"&gt;&amp;lt;xsd:all&amp;gt;&lt;/span&gt;, and so on.
&lt;span style="font-weight: bold;"&gt;List -- Legal XML Schema Elements&lt;/span&gt;
&lt;span style="font-weight: bold;"&gt;all &lt;/span&gt;-- Allows elements in a group to be in any order
&lt;span style="font-weight: bold;"&gt;annotation &lt;/span&gt;-- Creates an annotation that lets you add comments to an XML schema
&lt;span style="font-weight: bold;"&gt;any &lt;/span&gt;-- Allows any element to appear in a sequence or choice element
&lt;span style="font-weight: bold;"&gt;anyAttribute &lt;/span&gt;-- Allows any attribute to appear in the containing complex type or in the containing attribute group
&lt;span style="font-weight: bold;"&gt;appinfo &lt;/span&gt;-- Contains information within an annotation element
&lt;span style="font-weight: bold;"&gt;attribute &lt;/span&gt;-- Declares an attribute
&lt;span style="font-weight: bold;"&gt;attributegroup &lt;/span&gt;-- Creates an attribute group, which allows attribute declarations to be used as a group for complex type definitions.
&lt;span style="font-weight: bold;"&gt;choice &lt;/span&gt;-- Allows one, and only one, of the given elements to appear in the containing element
&lt;span style="font-weight: bold;"&gt;complexContent &lt;/span&gt;-- Specifies restrictions on a complex type that contains mixed content or elements.
&lt;span style="font-weight: bold;"&gt;complexType &lt;/span&gt;-- Declares a complex type
&lt;span style="font-weight: bold;"&gt;documentation &lt;/span&gt;-- Contains text that can be placed in an annotation element
&lt;span style="font-weight: bold;"&gt;element &lt;/span&gt;-- Declares an element
&lt;span style="font-weight: bold;"&gt;extension &lt;/span&gt;-- Extends a simple or complex type that has simple content
&lt;span style="font-weight: bold;"&gt;field &lt;/span&gt;-- Contains an XML Path Language (XPath) expression that specifies the value for a constraint
&lt;span style="font-weight: bold;"&gt;group &lt;/span&gt;-- Groups element declarations together so that they can be used as a group in complex type definitions
&lt;span style="font-weight: bold;"&gt;import &lt;/span&gt;-- Imports a namespace whose schema components can be used by a shema
&lt;span style="font-weight: bold;"&gt;include &lt;/span&gt;-- Includes teh given schema document in the current schema
&lt;span style="font-weight: bold;"&gt;key &lt;/span&gt;-- Specifies that an attribute value or element value must be a key
&lt;span style="font-weight: bold;"&gt;keyref &lt;/span&gt;-- Specifies that an attribute value or element value must match the value of the given key
&lt;span style="font-weight: bold;"&gt;list &lt;/span&gt;-- Declares a simple type element as a list of values of a given data type
&lt;span style="font-weight: bold;"&gt;notation &lt;/span&gt;-- Holds a notation to describe the format of non-XML data inside an XML document
&lt;span style="font-weight: bold;"&gt;redefine &lt;/span&gt;-- Allows simple and complex types and groups to be redefined in the current schema
&lt;span style="font-weight: bold;"&gt;restriction &lt;/span&gt;-- Declares constrains, such as restricting the type of data
&lt;span style="font-weight: bold;"&gt;schema &lt;/span&gt;-- Contains a schema definition
&lt;span style="font-weight: bold;"&gt;selector &lt;/span&gt;-- Gives an XPath expression that can select elements for an identity constraint
&lt;span style="font-weight: bold;"&gt;sequence &lt;/span&gt;-- Constrains the given elements to appear in the given sequence in the XML document
&lt;span style="font-weight: bold;"&gt;simpleContent &lt;/span&gt;-- Contains extensions or restrictions on a type
&lt;span style="font-weight: bold;"&gt;simpleType &lt;/span&gt;-- Declares a simple type for use with the type attribute when you declare element or attributes
&lt;span style="font-weight: bold;"&gt;union &lt;/span&gt;-- Declares a simple type as a collection of values of simple data types
&lt;span style="font-weight: bold;"&gt;unique &lt;/span&gt;-- Specifies that an attribute or element value must be unique

&lt;span style="font-style: italic; color: rgb(0, 0, 153);font-size:130%;" &gt;Creating Elements and Types&lt;/span&gt;
To declare elements, you use the &lt;span style="color: rgb(255, 0, 0);"&gt;&amp;lt;xsd:element&amp;gt;&lt;/span&gt; element in XML schemas. When you declare an element, you can specify its &lt;span style="color: rgb(255, 0, 0); font-style: italic;"&gt;type&lt;/span&gt;. e.g. the element named&lt;span style="color: rgb(255, 0, 0);"&gt; &amp;lt;comment&amp;gt;&lt;/span&gt; in the sample XML document you've been working with just contains &lt;span style="color: rgb(255, 0, 0);"&gt;text&lt;/span&gt;, e.g.
&lt;blockquote&gt;&amp;lt;comment&amp;gt; Good Rist &amp;lt;/comment&amp;gt;&lt;/blockquote&gt;You can declare the &lt;span style="color: rgb(255, 0, 0);"&gt;&amp;lt;comment&amp;gt;&lt;/span&gt; element by using &lt;span style="color: rgb(255, 0, 0);"&gt;&amp;lt;xsd:element&amp;gt;&lt;/span&gt; and giving it the name &lt;span style="font-style: italic;"&gt;"comment"&lt;/span&gt; and the type &lt;span style="font-style: italic;"&gt;xsd:string&lt;/span&gt;, like this:
&lt;blockquote&gt;&amp;lt;xsd:element name="comment" type="xsd:string"/&amp;gt;&lt;/blockquote&gt;You've used the&lt;span style="color: rgb(255, 0, 0);"&gt; built-in type&lt;/span&gt; &lt;span style="color: rgb(255, 0, 0);"&gt;xsd:string&lt;/span&gt;. However, you can also define our own types. In fact, there are two types that you can create -- &lt;span style="color: rgb(255, 0, 0);"&gt;simple &lt;/span&gt;and &lt;span style="color: rgb(255, 0, 0);"&gt;complex &lt;/span&gt;types.
Elements that enclose child elements or have attributes are &lt;span style="color: rgb(255, 0, 0);"&gt;complex types&lt;/span&gt;. In other words, complex types can have &lt;span style="font-style: italic;"&gt;internal structure&lt;/span&gt;, such as child elements and attributes, but simple types cannot. For example, &lt;span style="color: rgb(255, 0, 0);"&gt;attributes &lt;/span&gt;are always simple types because attribute values cannot have any internal structure.

&lt;span style="font-style: italic; color: rgb(0, 0, 153);font-size:130%;" &gt;Using Simple Types&lt;/span&gt;
There are some built-in simple types for XML schemas, such as &lt;span style="font-style: italic;"&gt;xsd:string&lt;/span&gt;, &lt;span style="font-style: italic;"&gt;xsd:int&lt;/span&gt;, &lt;span style="font-style: italic;"&gt;xsd:date&lt;/span&gt;, and so on. Note how detailed these types are compared to DTDs; remember that with DTDs, you can't define data types.
Declaring out own types lets you restrict the values those types can take. For example, take a look at the &lt;span style="color: rgb(255, 0, 0);"&gt;&amp;lt;term&amp;gt;&lt;/span&gt; element in the XML document. This element gives the term, i.e. the length parameter, and you want that number to be 30 or less, so you can use a &lt;span style="color: rgb(255, 0, 0);"&gt;&amp;lt;xsd:simpleType&amp;gt;&lt;/span&gt; element, enclosing a &lt;span style="color: rgb(255, 0, 0);"&gt;&amp;lt;xsd:restriction&amp;gt;&lt;/span&gt; element, to restrict the possible values that can be used in the &lt;span style="color: rgb(255, 0, 0);"&gt;&amp;lt;term&amp;gt;&lt;/span&gt; element. Inside the &lt;span style="color: rgb(255, 0, 0);"&gt;&amp;lt;xsd:restriction&amp;gt;&lt;/span&gt; element, you can use the &lt;span style="color: rgb(255, 0, 0);"&gt;&amp;lt;xsd:maxInclusive&amp;gt;&lt;/span&gt; element to restrict possible values in the &lt;span style="color: rgb(255, 0, 0);"&gt;&amp;lt;term&amp;gt;&lt;/span&gt; element to 30 years or less, e.g.
&lt;blockquote&gt;&amp;lt;xsd:element name="term"&amp;gt;
&amp;lt;xsd:simpleType&amp;gt;
&amp;lt;xsd:restriction base="xsd:integer"&amp;gt;
   &amp;lt;xsd:maxInclusive value="30"/&amp;gt;
&amp;lt;/xsd:restriction&amp;gt;
&amp;lt;simpleType&amp;gt;&lt;/blockquote&gt;&lt;span style="font-style: italic; color: rgb(0, 0, 153);font-size:130%;" &gt;Using Complex Type&lt;/span&gt;
You create new &lt;span style="color: rgb(255, 0, 0);"&gt;complex types&lt;/span&gt; by using the&lt;span style="color: rgb(255, 0, 0);"&gt; &amp;lt;xsd:complexType&amp;gt;&lt;/span&gt; element in schemas. For example, the &lt;span style="color: rgb(255, 0, 0);"&gt;&amp;lt;document&amp;gt;&lt;/span&gt; element can contain other elements, so you need to decare it by using a complex type, which you can call &lt;span style="font-style: italic; color: rgb(255, 0, 0);"&gt;documentType&lt;/span&gt; in our XML schema. In the XML schema, you can declare the &lt;span style="color: rgb(255, 0, 0);"&gt;&amp;lt;document&amp;gt;&lt;/span&gt; element to be of the &lt;span style="font-style: italic; color: rgb(255, 0, 0);"&gt;documentType&lt;/span&gt; type:
&lt;blockquote&gt;&amp;lt;xsd:element name="document" type="documentType"/&amp;gt;&lt;/blockquote&gt;You create the &lt;span style="font-style: italic; color: rgb(255, 0, 0);"&gt;documentType &lt;/span&gt;type by using an &lt;span style="color: rgb(255, 0, 0);"&gt;&amp;lt;xsd:complexType&amp;gt;&lt;/span&gt; element. In this case, you want to indicate that the subelements in &lt;span style="color: rgb(255, 0, 0);"&gt;&amp;lt;document&amp;gt;&lt;/span&gt; will be &lt;span style="color: rgb(255, 0, 0);"&gt;&amp;lt;comment&amp;gt;&lt;/span&gt;, &lt;span style="color: rgb(255, 0, 0);"&gt;&amp;lt; test1&amp;gt;&lt;/span&gt; and &lt;span style="color: rgb(255, 0, 0);"&gt;&amp;lt;test2&amp;gt;&lt;/span&gt;, &lt;span style="font-style: italic; color: rgb(255, 0, 0);"&gt;in that order&lt;/span&gt;, so you use the &lt;span style="color: rgb(255, 0, 0);"&gt;&amp;lt;xsd:sequence&amp;gt;&lt;/span&gt; element, such as:
&lt;blockquote&gt;  &amp;lt;xsd:element name="document" type="documentType"/&amp;gt;
&amp;lt;xsd:complexType name="documentType"&amp;gt;
    &amp;lt;xsd:sequence&amp;gt;
        &amp;lt;xsd:element ref="comment" minOccurs="1"/&amp;gt;
        &amp;lt;xsd:element name="test1" type="recordType"/&amp;gt;
        &amp;lt;xsd:element name="test2" type="xsd:string"/&amp;gt;
    &amp;lt;/xsd:sequence&amp;gt;
    &amp;lt;xsd:attribute name="documentDate" type="xsd:date"/&amp;gt;
&amp;lt;/xsd:complexType&amp;gt;&lt;/blockquote&gt;You create a type in an XML schema and then you can declare elements for that type. If you want to use a complex type, you have to create it, and you do that by using the &lt;span style="color: rgb(255, 0, 0);"&gt;&amp;xsd:complexType&amp;gt;&lt;/span&gt; elememt.
One way of declaring elements, as you've seen today, is to specify the element's name and type, as in in following example, which declare the &lt;span style="color: rgb(255, 0, 0);"&gt;&amp;lt;comment&amp;gt;&lt;/span&gt; element;
&lt;blockquote&gt;&amp;lt;xsd:element name="comment" type="xsd:string"/&amp;gt;&lt;/blockquote&gt;Using the &lt;span style="font-style: italic; color: rgb(255, 0, 0);"&gt;ref &lt;/span&gt;attribute lets you make use of an element that has already been declared. Note, however, that you can't just included any element by reference -- the element you refer to must have been declared &lt;span style="color: rgb(255, 0, 0);"&gt;globally&lt;/span&gt;, which means that it is itself not part of any other complex type. The other option is to declare elements inside other declarations, which is declaring them &lt;span style="color: rgb(255, 0, 0);"&gt;locally&lt;/span&gt;. A global element or attribute declaration appears as an immediate child element of the &lt;span style="color: rgb(255, 0, 0);"&gt;&amp;lt;xsd:schema&amp;gt;&lt;/span&gt; element, and when you declare an element or attribute &lt;span style="color: rgb(255, 0, 0);"&gt;globally&lt;/span&gt;, it can be used in any complex type. Using the &lt;span style="font-style: italic; color: rgb(255, 0, 0);"&gt;ref &lt;/span&gt;attribute in this way is a powerful technique.

&lt;span style="font-style: italic; color: rgb(0, 0, 153);font-size:130%;" &gt;Specifying a Number of Elements&lt;/span&gt;
The &lt;span style="color: rgb(255, 0, 0);"&gt;&amp;lt;document&amp;gt;&lt;/span&gt; element is declared to be of the &lt;span style="font-style: italic; color: rgb(255, 0, 0);"&gt;documentType &lt;/span&gt;type, and in that type, you use the &lt;span style="font-style: italic; color: rgb(255, 0, 0);"&gt;minOccurs &lt;/span&gt;attribute to indicate that the &lt;span style="color: rgb(255, 0, 0);"&gt;&amp;lt;comment&amp;gt;&lt;/span&gt; element must occur at least once:
&lt;blockquote&gt;          &amp;lt;xsd:element ref="comment" minOccurs="1"/&amp;gt;&lt;/blockquote&gt;You can specify the minimum number of times an element appears by using the &lt;span style="font-style: italic; color: rgb(255, 0, 0);"&gt;minOccurs &lt;/span&gt;attribute and the maximum number of times it can appear by using the &lt;span style="font-style: italic; color: rgb(255, 0, 0);"&gt;maxOccurs &lt;/span&gt;attribute. Keep in mind that you can use &lt;span style="font-style: italic; color: rgb(255, 0, 0);"&gt;minOccurs &lt;/span&gt;and &lt;span style="font-style: italic; color: rgb(255, 0, 0);"&gt;maxOccurs &lt;/span&gt;only with local declarations, not global ones. The default value for &lt;span style="font-style: italic; color: rgb(255, 0, 0);"&gt;minOccurs &lt;/span&gt;is &lt;span style="font-style: italic; color: rgb(255, 0, 0);"&gt;1&lt;/span&gt;, and the default for &lt;span style="font-style: italic; color: rgb(255, 0, 0);"&gt;maxOccurs &lt;/span&gt;is the value of &lt;span style="font-style: italic; color: rgb(255, 0, 0);"&gt;minOccurs&lt;/span&gt;. To specify that there is no upper bound to the &lt;span style="font-style: italic; color: rgb(255, 0, 0);"&gt;maxOccurs &lt;/span&gt;attribute, you set it to the value &lt;span style="font-style: italic; color: rgb(255, 0, 0);"&gt;"unbounded"&lt;/span&gt;.

&lt;span style="font-style: italic; color: rgb(0, 0, 153);font-size:130%;" &gt;Specifying Element Default Values&lt;/span&gt;
The &lt;span style="color: rgb(255, 0, 0);"&gt;&amp;lt;xsd:element&amp;gt;&lt;/span&gt; element has two attributes, &lt;span style="font-style: italic; color: rgb(255, 0, 0);"&gt;fixed &lt;/span&gt;and &lt;span style="font-style: italic; color: rgb(255, 0, 0);"&gt;default&lt;/span&gt;, that let you specify an element's default value.
The &lt;span style="color: rgb(255, 0, 0); font-style: italic;"&gt;fixed &lt;/span&gt;attribute sets the value of an element; for example, setting the &lt;span style="color: rgb(255, 0, 0);"&gt;&amp;lt;term&amp;gt;&lt;/span&gt; element's &lt;span style="font-style: italic; color: rgb(255, 0, 0);"&gt;fixed &lt;/span&gt;attribute to an integer value of &lt;span style="font-style: italic; color: rgb(255, 0, 0);"&gt;800 &lt;/span&gt;means that the element will always have that vale:
&lt;blockquote&gt;&amp;lt;xsd:element name="term" type="xsd:integer" fixed="800"/&amp;gt;&lt;/blockquote&gt;The &lt;span style="color: rgb(255, 0, 0); font-style: italic;"&gt;default &lt;/span&gt;attribute lets you set the default value of an element -- that is, the value that the element has if you don't specify any other value. For example, here's how you can specify a value of &lt;span style="font-style: italic; color: rgb(255, 0, 0);"&gt;800 &lt;/span&gt;as a default value instead of fixing this element's value at 800:
&lt;blockquote&gt;&amp;lt;xsd:element name="term" type="xsd:integer" default="800"/&amp;gt;&lt;/blockquote&gt;&lt;span style="font-style: italic; color: rgb(0, 0, 153);font-size:130%;" &gt;Creating Attributes&lt;/span&gt;
To declaring an attribute, you use the &lt;span style="color: rgb(255, 0, 0);"&gt;&amp;lt;xsd:attribute&amp;gt;&lt;/span&gt; element as in the examples, which declares an attribute named &lt;span style="font-style: italic; color: rgb(255, 0, 0);"&gt;phone &lt;/span&gt;for the &lt;span style="font-style: italic; color: rgb(255, 0, 0);"&gt;recordType &lt;/span&gt;type.
&lt;blockquote&gt;      &amp;lt;xsd:attribute name="phone" type="xsd:string"/&amp;gt;&lt;/blockquote&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;&amp;lt;xsd:attribute&amp;gt;&lt;/span&gt; has a &lt;span style="font-style: italic; color: rgb(255, 0, 0);"&gt;type &lt;/span&gt;attribute, and its attributes must always be of a &lt;span style="color: rgb(255, 0, 0);"&gt;simple type&lt;/span&gt;. You can also indicate whether an attribute is required or optional, or whether it has a default value. To do that, you use the &lt;span style="color: rgb(255, 0, 0);"&gt;&amp;lt;xsd:attribute&amp;gt;&lt;/span&gt; element's &lt;span style="font-style: italic; color: rgb(255, 0, 0);"&gt;use &lt;/span&gt;and &lt;span style="font-style: italic; color: rgb(255, 0, 0);"&gt;value &lt;/span&gt;attribute. e.g.
&lt;blockquote&gt;&amp;lt;xsd:element name="term" type="xsd:integer" default="800" use="optional"/&amp;gt;&lt;/blockquote&gt;Here are the vaules you can give to the &lt;span style="font-style: italic; color: rgb(255, 0, 0);"&gt;use &lt;/span&gt;attribute:
&lt;span style="font-weight: bold;"&gt;default &lt;/span&gt;-- If you don't use the use attribute, its value is the default vale set with the value attribute. If you do use it, its value is the value you assign it.
&lt;span style="font-weight: bold;"&gt;fixed &lt;/span&gt;-- This value makes the attribute fixed. You can set its value by using the value attribute.
&lt;span style="font-weight: bold;"&gt;optional &lt;/span&gt;-- This value makes the attribute optional, which means the attribute may have any value.
&lt;span style="font-weight: bold;"&gt;prohibited &lt;/span&gt;-- This value means the attribute cannot be used.
&lt;span style="font-weight: bold;"&gt;required &lt;/span&gt;-- This value makes the attribute required. The attribute can have any value.
The &lt;span style="font-style: italic; color: rgb(255, 0, 0);"&gt;value &lt;/span&gt;attribute contains a value if you need to specify one. For example, the following attribute declaration creates an attribute named &lt;span style="font-style: italic; color: rgb(255, 0, 0);"&gt;year &lt;/span&gt;with the integer fixed value "2005":
&lt;blockquote&gt;&amp;lt;xsd:attribute name="year" type="xsd:int" use="fixed" value="2005"&amp;gt;&lt;/blockquote&gt;Here's another example of an attribute declaration. This example gives the integer attribute &lt;span style="font-style: italic; color: rgb(255, 0, 0);"&gt;year &lt;/span&gt;with the default value "2005":
&lt;blockquote&gt;&amp;lt;xsd:attribute name="year" type="xsd:int" use="default" value="2005"&amp;gt;&lt;/blockquote&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/10261622-111980141276868393?l=cherub325.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cherub325.blogspot.com/feeds/111980141276868393/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=10261622&amp;postID=111980141276868393' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10261622/posts/default/111980141276868393'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10261622/posts/default/111980141276868393'/><link rel='alternate' type='text/html' href='http://cherub325.blogspot.com/2005/06/teach-yourself-xml-in-21-days-day-6.html' title='Teach Yourself XML in 21 days, Day 6'/><author><name>CHERUB</name><uri>http://www.blogger.com/profile/05541000949655411328</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='14' height='32' src='http://static.flickr.com/29/61835177_20e0034f42_t.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-10261622.post-111963048067318369</id><published>2005-06-24T16:38:00.000+01:00</published><updated>2005-06-25T00:35:13.280+01:00</updated><title type='text'>Teach Yourself XML in 21 days, Day 5</title><content type='html'>&lt;span class="dropcap"&gt;H&lt;/span&gt;&lt;span style="font-size:130%;"&gt;&lt;span style="font-weight: bold; color: rgb(0, 0, 0);"&gt;andling Attributes and Entities in DTDs
&lt;/span&gt;&lt;/span&gt;
Both &lt;span style="color: rgb(255, 0, 0);"&gt;attributes &lt;/span&gt;and &lt;span style="color: rgb(255, 0, 0);"&gt;entities &lt;/span&gt;are essential parts of XML, this chapter is going to explain how to support them in valid XML documents.

&lt;span style="font-style: italic; color: rgb(0, 0, 153);font-size:130%;" &gt;Declaring Attributes in DTDs&lt;/span&gt;
As in HTML, an &lt;span style="color: rgb(255, 0, 0);"&gt;&lt;span style="font-style: italic;"&gt;attribute&lt;/span&gt; &lt;/span&gt;is a &lt;span style="color: rgb(255, 0, 0);"&gt;name-value pair&lt;/span&gt; that you can use in a start tag or an empty tag to provide additional information for an element.  You can declare a list of attributes for an element by using the &lt;span style="color: rgb(255, 0, 0);"&gt;&amp;lt;!ATTLIST&amp;gt;&lt;/span&gt; element in the DTD. e.g.
&lt;blockquote&gt;&amp;lt;! ATTLIST &lt;span style="font-style: italic;"&gt;element_name&lt;/span&gt; &lt;span style="font-style: italic;"&gt;attribute_name&lt;/span&gt; &lt;span style="font-style: italic;"&gt;type default_value&lt;/span&gt; &amp;gt;&lt;/blockquote&gt;Here, &lt;span style="font-style: italic; color: rgb(255, 0, 0);"&gt;element_name&lt;/span&gt; is the name of the element for which you're declaring attributes, &lt;span style="font-style: italic; color: rgb(255, 0, 0);"&gt;attribute_name&lt;/span&gt; is the name of an attribute you want to declare, &lt;span style="font-style: italic; color: rgb(255, 0, 0);"&gt;type &lt;/span&gt;is the attribute's type, the &lt;span style="font-style: italic; color: rgb(255, 0, 0);"&gt;default_value&lt;/span&gt; sepcifies the default value of the attribute. A real example is:
&lt;blockquote&gt;&amp;lt;! ATTLIST employee supervisor CDATA #IMPLIED
          supervisor CDATA #IMPLIED
         division CDATA #IMPLIED
         fulltime CDATA #IMPLIED &amp;gt;&lt;/blockquote&gt;the use of the above declared attribute can be:
&lt;blockquote&gt;&amp;lt;employee supervisor = "no" division = "plastics" fulltime = "yes"&amp;gt;&lt;/blockquote&gt;All you have to do is use an &lt;span style="color: rgb(255, 0, 0);"&gt;&amp;lt;!ATTLIST&amp;gt;&lt;/span&gt; element to declare the attributes for an element. It's a little more involved to use this element than to use &lt;span style="color: rgb(255, 0, 0);"&gt;&amp;lt;!ELEMENT&amp;gt;&lt;/span&gt;, however, because you're restricted to certain types and default values for attributes in DTDs.

&lt;span style="font-style: italic; color: rgb(0, 0, 153);font-size:130%;" &gt;Using the Legal Default Values and Attributes Types&lt;/span&gt;
When you're declaring attributes in DTDs, these are the possible &lt;span style="font-style: italic; color: rgb(255, 0, 0);"&gt;default_value&lt;/span&gt; settings you can use in &lt;span style="color: rgb(255, 0, 0);"&gt;&amp;lt;!ATTLIST&amp;gt;&lt;/span&gt; elements;
&lt;span style="font-weight: bold; color: rgb(0, 0, 0);"&gt;value&lt;/span&gt; -- Specifies a text value and must be enclosed in quotes
&lt;span style="font-weight: bold; color: rgb(0, 0, 0);"&gt;#IMPLED&lt;/span&gt; -- Makes an attribute optional
&lt;span style="font-weight: bold; color: rgb(0, 0, 0);"&gt;#FIXED value&lt;/span&gt; -- Sets the attribute's value to value
&lt;span style="font-weight: bold; color: rgb(0, 0, 0);"&gt;#REQUIRED&lt;/span&gt; -- Means that this attribute is required and must be given a value
These are the possible &lt;span style="font-style: italic; color: rgb(255, 0, 0);"&gt;type &lt;/span&gt;values you can use
&lt;span style="font-weight: bold; color: rgb(0, 0, 0);"&gt;CDATA &lt;/span&gt;-- Specifies character data, which is just text without markup
&lt;span style="font-weight: bold; color: rgb(0, 0, 0);"&gt;ENTITY &lt;/span&gt;-- Specifies an entity name
&lt;span style="font-weight: bold; color: rgb(0, 0, 0);"&gt;ENTITIES &lt;/span&gt;-- Specifies multiple entity names, which are seperated by whitespace
&lt;span style="font-weight: bold; color: rgb(0, 0, 0);"&gt;Enumerated &lt;/span&gt;-- Specifies one value from a list of values (an enumeration)
&lt;span style="font-weight: bold; color: rgb(0, 0, 0);"&gt;ID &lt;/span&gt;-- Specifies an ID attribute, which holds a proper XML name
&lt;span style="font-weight: bold; color: rgb(0, 0, 0);"&gt;IDREF &lt;/span&gt;-- Holds the ID value of some other element
&lt;span style="font-weight: bold; color: rgb(0, 0, 0);"&gt;IDREFS &lt;/span&gt;-- Holds multiple ID values of elements, seperated by whitespace
&lt;span style="font-weight: bold; color: rgb(0, 0, 0);"&gt;NMTOKEN &lt;/span&gt;-- Specifies text made up of XML name characters, or tokens.
&lt;span style="font-weight: bold; color: rgb(0, 0, 0);"&gt;NMTOKENS &lt;/span&gt;-- Specifies multiple NMTOKEN items, seperated by whitespace
&lt;span style="font-weight: bold; color: rgb(0, 0, 0);"&gt;NOTATION &lt;/span&gt;-- Specifies a notation name that holds a format description (such as a MIME type)

&lt;span style="font-style: italic; color: rgb(0, 0, 153);font-size:130%;" &gt;Specifying Default Values&lt;/span&gt;
&lt;span style="font-weight: bold; color: rgb(0, 0, 0);"&gt;Immediate Values&lt;/span&gt;
You can specify a default value for an attribute simply by listing that value, in quotes, in the attribute's declaration in the &lt;span style="color: rgb(204, 0, 0);"&gt;&amp;lt;!ATTLIST&amp;gt;&lt;/span&gt; element, making it an immediate value. If you give an attribute a default value and then don't use that attribute in an element, the attribute is automatically given the default value.  e.g.
&lt;blockquote&gt;&amp;lt;! ATTLIST employee supervisor CDATA "no" &amp;gt;&lt;/blockquote&gt;&lt;span style="font-weight: bold; color: rgb(0, 0, 0);"&gt;The #REQUIRED&lt;/span&gt;
You can specify a default value of &lt;span style="color: rgb(255, 0, 0);"&gt;#REQUIRED&lt;/span&gt; to indicate that an attribute is &lt;span style="color: rgb(255, 0, 0);"&gt;required&lt;/span&gt;. e.g.
&lt;blockquote&gt;&amp;lt;! ATTLIST employee supervisor CDATA #REQUIRED &amp;gt;&lt;/blockquote&gt;&lt;span style="font-weight: bold; color: rgb(0, 0, 0);"&gt;The #IMPLIED&lt;/span&gt;
Attributes declared with &lt;span style="color: rgb(255, 0, 0);"&gt;#IMPLIED&lt;/span&gt; are &lt;span style="color: rgb(255, 0, 0);"&gt;optional&lt;/span&gt;. For example, you can use the &lt;span style="color: rgb(255, 0, 0);"&gt;#IMPLIED&lt;/span&gt; default value if you want to all the document author to include an attribute, but you don't want to require it. e.g.
&lt;blockquote&gt;&amp;lt;! ATTLIST employee supervisor CDATA #IMPLIED &amp;gt;&lt;/blockquote&gt;All the following examples are valid:
&lt;blockquote&gt;&amp;lt;employee supervisor = "no"&amp;gt;
&amp;lt;employee&amp;gt;&lt;/blockquote&gt;&lt;span style="font-weight: bold; color: rgb(0, 0, 0);"&gt;The #FIXED&lt;/span&gt;
The final default value is &lt;span style="color: rgb(255, 0, 0);"&gt;#FIXED&lt;/span&gt;, which you use when you want to assign a &lt;span style="color: rgb(255, 0, 0);"&gt;fixed &lt;/span&gt;value to an attribute -- a value that the attribute will always have. e.g.
&lt;blockquote&gt;&amp;lt;! ATTLIST employee supervisor CDATA #FIXED "en" &amp;gt;&lt;/blockquote&gt;
&lt;span style="font-style: italic; color: rgb(0, 0, 153);font-size:130%;" &gt;Specifying Attribute Types&lt;/span&gt;
&lt;span style="color: rgb(0, 0, 0); font-weight: bold;"&gt;The CDATA&lt;/span&gt;
As you've already seen, the &lt;span style="color: rgb(255, 0, 0);"&gt;CDATA &lt;/span&gt;data type stands for &lt;span style="font-style: italic; color: rgb(255, 0, 0);"&gt;character data&lt;/span&gt;. Unlike parsed character data (&lt;span style="color: rgb(255, 0, 0);"&gt;PCDATA&lt;/span&gt;), which is assumed to have already been parsed, the &lt;span style="color: rgb(255, 0, 0);"&gt;character data&lt;/span&gt; in attribute values is read and parsed by the XML processor.

 &lt;span style="font-weight: bold; color: rgb(0, 0, 0);"&gt;Enumerated Types&lt;/span&gt;
An attribute &lt;span style="color: rgb(255, 0, 0);"&gt;enumeration &lt;/span&gt;is just a list of possible values that an attribute can take. e.g.
&lt;blockquote&gt;&amp;lt;! ATTLIST employee supervisor (yes | no)  "no" &amp;gt;&lt;/blockquote&gt;&lt;span style="font-weight: bold; color: rgb(0, 0, 0);"&gt;The NMTOKEN Attribute Type&lt;/span&gt;
The attribute type &lt;span style="color: rgb(255, 0, 0);"&gt;NMTOKEN &lt;/span&gt;stands for name token, and it lets you assign to an attribute any value made up of legal XML name characters. Note that &lt;span style="color: rgb(255, 0, 0);"&gt;NMTOKEN &lt;/span&gt;characters can not include &lt;span style="color: rgb(255, 0, 0);"&gt;whitespace&lt;/span&gt;. e.g.
&lt;blockquote&gt;&amp;lt;! ATTLIST employee state NMTOKEN #REQUIRED &amp;gt;&lt;/blockquote&gt;This attribute can be used as:
&lt;blockquote&gt;&amp;lt;employee state = "NY"&amp;gt;&lt;/blockquote&gt;&lt;span style="font-weight: bold; color: rgb(0, 0, 0);"&gt;The NMTOKENS Attribute Type&lt;/span&gt;
You can use the &lt;span style="color: rgb(255, 0, 0);"&gt;NMTOKENS &lt;/span&gt;attribute type when you want to list multiple values made up of NMTOKEN values, seperated by whitespace, so,&lt;span style="color: rgb(255, 0, 0);"&gt; it could include whitespace now&lt;/span&gt;. e.g.
&lt;blockquote&gt;&amp;lt;! ATTLIST employee state NMTOKENS #REQUIRED &amp;gt;&lt;/blockquote&gt;This attribute can be used as:
&lt;blockquote&gt;&amp;lt;employee state = "New York"&amp;gt;&lt;/blockquote&gt;&lt;span style="font-weight: bold; color: rgb(0, 0, 0);"&gt;The ID Attribute Type&lt;/span&gt;
An important attribute type is the &lt;span style="color: rgb(255, 0, 0);"&gt;ID &lt;/span&gt;type. There's a special meaning to an element's &lt;span style="color: rgb(255, 0, 0);"&gt;ID &lt;/span&gt;value because sometimes XML processors use an &lt;span style="color: rgb(255, 0, 0);"&gt;ID &lt;/span&gt;attribute to &lt;span style="color: rgb(255, 0, 0);"&gt;identity &lt;/span&gt;an element. Therefore, XML processors are supposed to make sure that no two elements have the same value for the attribute that is of the type ID in a document; in addtion, you can give an element only on attribute of this type. e.g.
&lt;blockquote&gt;&amp;lt;! ATTLIST employee id ID #REQUIRED &amp;gt;&lt;/blockquote&gt;This attribute can be used as:
&lt;blockquote&gt; &amp;lt;employee id = "A1112"&amp;gt;&lt;/blockquote&gt;&lt;span style="font-weight: bold; color: rgb(0, 0, 0);"&gt;The IDREF Attribute Type&lt;/span&gt;
We can also use &lt;span style="color: rgb(255, 0, 0);"&gt;IDREF &lt;/span&gt;(which stands for &lt;span style="color: rgb(255, 0, 0);"&gt;ID &lt;/span&gt;reference) attributes to tie an element to another element, using the other element's &lt;span style="color: rgb(255, 0, 0);"&gt;ID &lt;/span&gt;value as a &lt;span style="color: rgb(255, 0, 0);"&gt;reference&lt;/span&gt;. The following example gives each employee an &lt;span style="font-style: italic; color: rgb(255, 0, 0);"&gt;id &lt;/span&gt;attribute and also creates an optional &lt;span style="font-style: italic; color: rgb(255, 0, 0);"&gt;supervisor &lt;/span&gt;attribute of type &lt;span style="color: rgb(255, 0, 0);"&gt;IDREF&lt;/span&gt;, which will store the &lt;span style="color: rgb(255, 0, 0);"&gt;ID &lt;/span&gt;value of an employee's supervisor:
&lt;blockquote&gt;&amp;lt;! ATTLIST employee id ID #REQUIRED supervisor IDREF #IMPLIED &amp;gt;&lt;/blockquote&gt;this attribute can be used as:
&lt;blockquote&gt;&amp;lt;employee id = "A1112"&amp;gt;
&amp;lt;employee id = "A1113" supervisor = "A1112"&amp;gt;&lt;/blockquote&gt;&lt;span style="font-weight: bold; color: rgb(0, 0, 0);"&gt;The ENTITY Attribute Type&lt;/span&gt;
The &lt;span style="color: rgb(255, 0, 0);"&gt;ENTITY &lt;/span&gt;type lets you assign to an attribute the name of an &lt;span style="color: rgb(255, 0, 0);"&gt;entity &lt;/span&gt;you've declared. The following example gives the entity name &lt;span style="font-style: italic; color: rgb(255, 0, 0);"&gt;PHOTO1221&lt;/span&gt; to the image file &lt;span style="font-style: italic; color: rgb(255, 0, 0);"&gt;1221.gif&lt;/span&gt; and the entity name &lt;span style="font-style: italic; color: rgb(255, 0, 0);"&gt;PHOTO1222&lt;/span&gt; to the image file &lt;span style="font-style: italic; color: rgb(255, 0, 0);"&gt;1222.gif&lt;/span&gt;:
&lt;blockquote&gt;&amp;lt;! ENTITY PHOTO1221 SYSTEM "1221.gif" &amp;gt;
&amp;lt;! ENTITY PHOTO1222 SYSTEM "1222.gif" &amp;gt;&lt;/blockquote&gt;If &lt;span style="font-style: italic; color: rgb(255, 0, 0);"&gt;1221.gif&lt;/span&gt; and &lt;span style="font-style: italic; color: rgb(255, 0, 0);"&gt;1222.gif&lt;/span&gt; held the photos of various employees, you could indicate that this is the case by using an &lt;span style="color: rgb(255, 0, 0);"&gt;ENTITY &lt;/span&gt;attribute named &lt;span style="font-style: italic; color: rgb(255, 0, 0);"&gt;photo&lt;/span&gt;, like this:
&lt;blockquote&gt;&amp;lt;! ATTLIST employee photo ENTITY #IMPLIED &amp;gt;&lt;/blockquote&gt;this attribute can be used as:
&lt;blockquote&gt;&amp;lt;employee photo = "PHOTO1221"&amp;gt;&lt;/blockquote&gt;Using ENTITY attribute is a good way of working with entities.

&lt;span style="font-weight: bold; color: rgb(0, 0, 0);"&gt;The ENTITIES attribute Type&lt;/span&gt;
Attributes of this type can hold lists of entity names, separated by whitespace.
&lt;span style="font-weight: bold; color: rgb(0, 0, 0);"&gt;
The NOTATION Attribute Type&lt;/span&gt;
You can assign to &lt;span style="color: rgb(255, 0, 0);"&gt;NOTATION &lt;/span&gt;attribute values that you've declared to be notations. &lt;span style="font-style: italic; color: rgb(255, 0, 0);"&gt;Notations &lt;/span&gt;specify the format of &lt;span style="color: rgb(255, 0, 0);"&gt;non-XML data&lt;/span&gt;, and they're typically used to describe the &lt;span style="color: rgb(255, 0, 0);"&gt;storate format of external entities&lt;/span&gt; such as image fiels. e.g. one popular type of notations is &lt;span style="color: rgb(255, 0, 0);"&gt;Multipurpose Internet Mail Extension (MIME) &lt;/span&gt;type, such as &lt;span style="font-style: italic;"&gt;application/xml, text/html, image/jpeg,&lt;/span&gt; and so forth, which are often used to specify data storage formats.
&lt;a href="ftp://ftp.isi.edu/in-notes/iana/assignments/media-types/media-types"&gt;There is a list of all the avaliable MIME types.&lt;/a&gt;
When you want to declare a notation, you use the &lt;span style="color: rgb(255, 0, 0);"&gt;&amp;lt;!NOTATION&amp;gt;&lt;/span&gt; element in a DTD like this:
&lt;blockquote&gt;&amp;lt;! NOTATION &lt;span style="font-style: italic;"&gt;name &lt;/span&gt;SYSTEM "&lt;span style="font-style: italic;"&gt;external_id&lt;/span&gt;" &amp;gt;&lt;/blockquote&gt;You can also use the &lt;span style="color: rgb(255, 0, 0);"&gt;PUBLIC &lt;/span&gt;keyword for public natation if you supply a &lt;span style="color: rgb(255, 0, 0);"&gt;fomal public identifier (FPI)&lt;/span&gt;, like this:
&lt;blockquote&gt;&amp;lt;! NOTATION &lt;span style="font-style: italic;"&gt;name &lt;/span&gt;PUBLIC &lt;span style="font-style: italic;"&gt;FPI&lt;/span&gt; "&lt;span style="font-style: italic;"&gt;external_id&lt;/span&gt;" &amp;gt;&lt;/blockquote&gt;An example is:
&lt;blockquote&gt;&amp;lt;! NOTATION jpg SYSTEM "image/jpeg" &amp;gt;
&amp;lt;! NOTATION gif SYSTEM "image/gif" &amp;gt;
&amp;lt;! ATTLIST employee imagetype NOTATION (jpg | gif) #IMPLIED &amp;gt;&lt;/blockquote&gt;This attribute can be used as:
&lt;blockquote&gt;&amp;lt;employee imagetype = "gif"&amp;gt;&lt;/blockquote&gt;
&lt;span style="font-style: italic; color: rgb(0, 0, 153);font-size:130%;" &gt;Handling Entities&lt;/span&gt;
An &lt;span style="color: rgb(255, 0, 0); font-style: italic;"&gt;entity &lt;/span&gt;in XML is simply a data item. &lt;span style="color: rgb(255, 0, 0);"&gt;Entities &lt;/span&gt;can also be internal or external. An &lt;span style="font-style: italic; color: rgb(255, 0, 0);"&gt;internal &lt;/span&gt;entity is defined completely inside the XML document that uses it. An &lt;span style="font-style: italic; color: rgb(255, 0, 0);"&gt;external&lt;/span&gt;, on the other hand, is stored externally, such as in a file; to refer to an external entity in XML, you can use a &lt;span style="font-style: italic;"&gt;URI&lt;/span&gt;.
You declare an entity in a DTD, and then you can refer to it with an entity ference in the rest of the XML document.

&lt;span style="font-style: italic; color: rgb(0, 0, 153);font-size:130%;" &gt;Creating Internal General Entity References&lt;/span&gt;
You use the &lt;span style="color: rgb(255, 0, 0);"&gt;&amp;lt;!ENTITY&amp;gt;&lt;/span&gt; element to declare an &lt;span style="color: rgb(255, 0, 0);"&gt;entity&lt;/span&gt;. e.g.
&lt;blockquote&gt;&amp;lt;! ENTITY &lt;span style="font-style: italic;"&gt;name definition &lt;/span&gt;&amp;gt;&lt;/blockquote&gt;In this case, the &lt;span style="color: rgb(255, 0, 0); font-style: italic;"&gt;name &lt;/span&gt;of the entity is just the name you want to use to refer to the entity, but an entity's &lt;span style="font-style: italic; color: rgb(255, 0, 0);"&gt;definition &lt;/span&gt;can take several different forms. The simplest way of defining an entity is just to use the text that you want XML processors to replace entiry references with. e.g.
&lt;blockquote&gt;&amp;lt;! ENTITY copyright "(c) XML Power Corp. 2005" &amp;gt;&lt;/blockquote&gt;You can use the entity copyright in the XML document like this:
&lt;blockquote&gt;&amp;lt;copy&amp;gt; &amp;amp;copyright; &amp;lt;/copy&amp;gt;&lt;/blockquote&gt;The replacement text for internal general entity references doesn't have to be quoted text; you can use UTF-8 character codes directly.

You also can &lt;span style="font-style: italic; color: rgb(255, 0, 0);"&gt;nest &lt;/span&gt;entity references. e.g.
&lt;blockquote&gt;&amp;lt;! ENTITY me "Cherub" &amp;gt;
&amp;lt;! ENTITY copyright "(c) &amp;amp;me; 2005" &amp;gt;&lt;/blockquote&gt;Note that although you can &lt;span style="color: rgb(255, 0, 0);"&gt;nest &lt;/span&gt;entity references, they &lt;span style="color: rgb(255, 0, 0);"&gt;can't be circular&lt;/span&gt;, or the XML processor will go nuts. e.g.
&lt;blockquote&gt;&amp;lt;! ENTITY me "&amp;amp;copyright; Cherub" &amp;gt;
&amp;lt;! ENTITY copyright "(c) &amp;amp;me; 2005" &amp;gt;&lt;/blockquote&gt;Circular entity references like the above are illegal in valid documents.

General entity references, such as &lt;span style="color: rgb(255, 0, 0);"&gt;&amp;amp;copyright;&lt;/span&gt;, are valid only in the body of the XML document, not in the DTD itself. e.g. this is not legal:
&lt;blockquote&gt;&amp;lt;! ENTITY employeeContent "(copy, name, hiredate, projects)" &amp;gt;
&amp;lt;! ELEMENT employee &amp;amp;employeeContent; &amp;gt;&lt;/blockquote&gt;The way you should handle a situation like this ,where an entity reference is used in the DTD itself, is by using &lt;span style="color: rgb(255, 0, 0);"&gt;parameter entities&lt;/span&gt;.

&lt;span style="font-style: italic; color: rgb(0, 0, 153);"&gt;Creating External General Entity References&lt;/span&gt;
You can use the &lt;span style="font-style: italic; color: rgb(255, 0, 0);"&gt;SYSTEM &lt;/span&gt;keyword or the &lt;span style="font-style: italic; color: rgb(255, 0, 0);"&gt;PUBLIC &lt;/span&gt;keyword when declaring external general entities. The syntax is:
&lt;blockquote&gt;&amp;lt;! ENTITY name SYSTEM URI &amp;gt;
&amp;lt;! ENTITY name PUBLIC FPI URI &amp;gt;&lt;/blockquote&gt;By using external general entities, you can assemble XML documents together from various pieces stored in their own files. That can be very useful if, for example, you have standard headers or footers or copyright notices that you want to use.

&lt;span style="font-style: italic; color: rgb(0, 0, 153);font-size:130%;" &gt;Associating Non-XML Data with an XML Document&lt;/span&gt;
To declare an &lt;span style="color: rgb(255, 0, 0);"&gt;external unparsed entity&lt;/span&gt;, you use an &lt;span style="color: rgb(255, 0, 0);"&gt;&amp;lt;!ENTITY&amp;gt;&lt;/span&gt; element with either the &lt;span style="color: rgb(255, 0, 0);"&gt;SYSTEM &lt;/span&gt;keyword or the &lt;span style="color: rgb(255, 0, 0);"&gt;PUBLIC &lt;/span&gt;keyword, like this (note the keyword &lt;span style="color: rgb(255, 0, 0);"&gt;NDATA&lt;/span&gt;, which indicates that you're referring to an unparsed entity):
&lt;blockquote&gt;&amp;lt;! ENTITY &lt;span style="font-style: italic;"&gt;name &lt;/span&gt;SYSTEM &lt;span style="font-style: italic;"&gt;value &lt;/span&gt;NDATA &lt;span style="font-style: italic;"&gt;type &lt;/span&gt;&amp;gt;
&amp;lt;! ENTITY &lt;span style="font-style: italic;"&gt;name &lt;/span&gt;PUBLIC &lt;span style="font-style: italic;"&gt;FPI&lt;/span&gt; &lt;span style="font-style: italic;"&gt;value &lt;/span&gt;NDATA &lt;span style="font-style: italic;"&gt;type &lt;/span&gt;&amp;gt;&lt;/blockquote&gt;&lt;span style="color: rgb(255, 0, 0); font-style: italic;"&gt;name &lt;/span&gt;is the name of the external unparsed entity, &lt;span style="font-style: italic; color: rgb(255, 0, 0);"&gt;value &lt;/span&gt;is the value of the entity, such as the name of an external file, and &lt;span style="font-style: italic; color: rgb(255, 0, 0);"&gt;type &lt;/span&gt;is a declared &lt;span style="font-style: italic; color: rgb(255, 0, 0);"&gt;notation&lt;/span&gt;. For example, to explicitly indicate that &lt;span style="font-style: italic;"&gt;1221.gif&lt;/span&gt; is an external entity that should not be parsed, you can create a notation name &lt;span style="font-style: italic;"&gt;gif &lt;/span&gt;for GIF files;
&lt;blockquote&gt;&amp;lt;! NOTION gif SYSTEM "image/gif" &amp;gt;&lt;/blockquote&gt;Next, you can declare &lt;span style="font-style: italic;"&gt;1221.gif&lt;/span&gt; as an unpased entity that uses the &lt;span style="font-style: italic;"&gt;gif &lt;/span&gt;notation;
&lt;blockquote&gt;&amp;lt;! ENTITY PHOTO1221 SYSTEM "1221.gif" NDATA gif &amp;gt;&lt;/blockquote&gt;You can create an &lt;span style="font-style: italic;"&gt;ENTITY &lt;/span&gt;attribute named &lt;span style="font-style: italic;"&gt;photo &lt;/span&gt;for the &lt;span style="font-style: italic;"&gt;&amp;lt;employee&amp;gt;&lt;/span&gt; element;
&lt;blockquote&gt;&amp;lt;! ATTLIST employee photo ENTITY #IMPLIED &amp;gt;&lt;/blockquote&gt;Finally, you can assign the &lt;span style="font-style: italic;"&gt;photo &lt;/span&gt;attribute the value &lt;span style="font-style: italic;"&gt;PHOTO1221&lt;/span&gt;;
&lt;blockquote&gt;&amp;lt;employee photo = "PHOTO1221"&amp;gt;&lt;/blockquote&gt;Note that in this example, you do &lt;span style="color: rgb(255, 0, 0);"&gt;NOT &lt;/span&gt;use an entity reference (that is, &amp;ampPHOTO1221;) because you do NOT want the XML processor to parse 1221.gif.

&lt;span style="font-style: italic; color: rgb(0, 0, 153);font-size:130%;" &gt;Creating Internal Parameter Entities&lt;/span&gt;
It turns out that it can be useful to use parameters in DTDs, and you use &lt;span style="color: rgb(255, 0, 0);"&gt;parameter entities&lt;/span&gt; and&lt;span style="color: rgb(255, 0, 0);"&gt; parameter entity references&lt;/span&gt; (which can only be used in DTDs) for that. In fact, there's one more restriction on DTDs: Parameter entity references that you use insied an already existing DTD declaration can appear only in the DTD's external subset, which means that the part of the DTD that is external.
You can declare a parameter entity by using the &lt;span style="color: rgb(255, 0, 0);"&gt;&amp;lt;!ENTITY&amp;gt;&lt;/span&gt; element, but you include a &lt;span style="color: rgb(255, 0, 0);"&gt;%&lt;/span&gt; to show that you're declaring a parameter reference.  e.g.
&lt;blockquote&gt;&lt;!-- ENTITY % name definition &gt;&lt;/blockquote--&gt;The following is an example that shows how to use an internal parameter entity:
&lt;blockquote&gt;&amp;lt;! ENTITY % project "&amp;lt;! ELEMENT project (product, id, price) &amp;gt;" &amp;gt;&lt;/blockquote&gt;When you use the parameter entity reference &lt;span style="color: rgb(255, 0, 0);"&gt;%project&lt;/span&gt;; in the DTD, it will be replaced with the text &lt;span style="color: rgb(255, 0, 0);"&gt;&amp;lt;! ELEMENT project (product, id, price) &amp;gt;&lt;/span&gt;.

&lt;span style="font-style: italic; color: rgb(0, 0, 153);font-size:130%;" &gt;Using INCLUDE and IGNORE to Parameterize DTDs&lt;/span&gt;
There are two important &lt;span style="color: rgb(255, 0, 0);"&gt;directives &lt;/span&gt;that you need to know abut when it comes to working with DTDs: &lt;span style="font-style: italic; color: rgb(255, 0, 0);"&gt;INCLUDE &lt;/span&gt;and &lt;span style="font-style: italic; color: rgb(255, 0, 0);"&gt;IGNORE&lt;/span&gt;. &lt;span style="color: rgb(255, 0, 0);"&gt;Directives &lt;/span&gt;are special commands to the XML processor, and &lt;span style="font-style: italic; color: rgb(255, 0, 0);"&gt;INCLUDE &lt;/span&gt;and &lt;span style="font-style: italic; color: rgb(255, 0, 0);"&gt;IGNORE &lt;/span&gt;are specially designed to customize a DTD by including or omitting sections of that DTD. The following is the syntax:
&lt;blockquote&gt;&amp;lt;![ INCLUDE [DTD Section]] &amp;gt;
&amp;lt;![ IGNORE [DTD Section]]&amp;gt;&lt;/blockquote&gt;The reason you see &lt;span style="font-style: italic;"&gt;INCLUDE &lt;/span&gt;and &lt;span style="font-style: italic;"&gt;INGORE &lt;/span&gt;in DTDs is that by using these directives, you can create &lt;span style="color: rgb(255, 0, 0);"&gt;parameterized DTDs&lt;/span&gt;.&lt;/blockquote&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/10261622-111963048067318369?l=cherub325.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cherub325.blogspot.com/feeds/111963048067318369/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=10261622&amp;postID=111963048067318369' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10261622/posts/default/111963048067318369'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10261622/posts/default/111963048067318369'/><link rel='alternate' type='text/html' href='http://cherub325.blogspot.com/2005/06/teach-yourself-xml-in-21-days-day-5.html' title='Teach Yourself XML in 21 days, Day 5'/><author><name>CHERUB</name><uri>http://www.blogger.com/profile/05541000949655411328</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='14' height='32' src='http://static.flickr.com/29/61835177_20e0034f42_t.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-10261622.post-111953586424463735</id><published>2005-06-23T14:14:00.000+01:00</published><updated>2005-06-23T16:20:35.850+01:00</updated><title type='text'>Teach Yourself XML in 21 days, Day 4</title><content type='html'>&lt;span class="dropcap" &gt;C&lt;/span&gt;&lt;span style="font-weight: bold;font-size:130%;" &gt;reating Valid XML Documents: DTDs&lt;/span&gt;
We define the &lt;span style="font-style: italic;"&gt;syntax&lt;/span&gt; of an XML document by using a DTD, and we declare that definition in a document by using a document type declaration. We can use a &lt;span style="color: rgb(255, 0, 0);"&gt;&amp;lt;! DOCTYPE &amp;gt;&lt;/span&gt; element to create a DTD, and the DTD appears in that element. The following forms are valid:
&lt;blockquote&gt;&amp;lt;! DOCTYPE &lt;span style="font-style: italic;"&gt;rootname&lt;span style="font-weight: bold;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;&lt;/span&gt;[&lt;span style="font-style: italic;"&gt;DTD&lt;/span&gt;]&lt;span style="font-weight: bold;"&gt;&lt;/span&gt;&lt;span style="font-style: italic; font-weight: bold;"&gt; &lt;/span&gt;&amp;gt;
&amp;lt;! DOCTYPE &lt;span style="font-style: italic;"&gt;rootname &lt;/span&gt;SYSTEM &lt;span style="font-style: italic;"&gt;URI &lt;/span&gt;&amp;gt;
&amp;lt;! DOCTYPE &lt;span style="font-style: italic;"&gt;rootname &lt;/span&gt;SYSTEM &lt;span style="font-style: italic;"&gt;URI &lt;/span&gt;[&lt;span style="font-style: italic;"&gt;DTD&lt;/span&gt;] &amp;gt;
&amp;lt;! DOCTYPE &lt;span style="font-style: italic;"&gt;rootname &lt;/span&gt;PUBLIC &lt;span style="font-style: italic;"&gt;identifier URI &lt;/span&gt;&amp;gt;
&amp;lt;! DOCTYPE &lt;span style="font-style: italic;"&gt;rootname &lt;/span&gt;PUBLIC &lt;span style="font-style: italic;"&gt;identifier URI &lt;/span&gt;[&lt;span style="font-style: italic;"&gt;DTD&lt;/span&gt;] &amp;gt;&lt;/blockquote&gt;The first step in creating that DTD is to declare the elements that appear in the XML document.
To declare the syntax of an element in a DTD, we use the &lt;span style="color: rgb(255, 0, 0);"&gt;&amp;lt;! ELEMENT &amp;gt;&lt;/span&gt; element like this:
&lt;blockquote&gt;&amp;lt;! ELEMENT &lt;span style="font-style: italic;"&gt;name content_model&lt;/span&gt; &amp;gt;&lt;/blockquote&gt;In this syntax, &lt;span style="font-style: italic; color: rgb(255, 0, 0);"&gt;name &lt;/span&gt;is the name of the element we're declaring and &lt;span style="font-style: italic; color: rgb(255, 0, 0);"&gt;content_model&lt;/span&gt; is the content model of the element. A content model indicates what content the element is allowed to have, for example, you can allow &lt;span style="color: rgb(0, 0, 102);"&gt;child elements&lt;/span&gt; or &lt;span style="color: rgb(0, 0, 102);"&gt;text data&lt;/span&gt;, or you can make the element &lt;span style="color: rgb(0, 0, 102);"&gt;empty&lt;/span&gt; by using the &lt;span style="font-style: italic;"&gt;EMPTY &lt;/span&gt;keyword, or you can allow &lt;span style="color: rgb(0, 0, 102);"&gt;any content&lt;/span&gt; by using the &lt;span style="font-style: italic;"&gt;ANY &lt;/span&gt;keyword.e.g.
&lt;blockquote&gt;&amp;lt;! ELEMENT document (employee)* &amp;gt;&lt;/blockquote&gt;&lt;span style="font-style: italic; color: rgb(0, 0, 153);font-size:130%;" &gt;Handling ANY content&lt;/span&gt;
If you give an element the content model &lt;span style="font-style: italic;"&gt;ANY&lt;/span&gt;, that element can contain any content, which means any elements and/or any character data. What this really means is that &lt;span style="color: rgb(255, 0, 0);"&gt;you're turning off validation for this element&lt;/span&gt; because the contents of elements with the content model &lt;span style="font-style: italic;"&gt;ANY &lt;/span&gt;are not even checked.

&lt;span style="color: rgb(0, 0, 153);font-size:130%;" &gt;&lt;span style="font-style: italic;"&gt;Specifying Child Elements&lt;/span&gt;&lt;/span&gt;
You can specify what child elements an element can contain in that element's content model.
The above example specifies that a &lt;span style="color: rgb(255, 0, 0);"&gt;&amp;lt;document&amp;gt;&lt;/span&gt; element can contain &lt;span style="color: rgb(255, 0, 0);"&gt;&amp;lt;employee&amp;gt;&lt;/span&gt; element. The &lt;span style="color: rgb(255, 0, 0);"&gt;*&lt;/span&gt; here means that a &lt;span style="color: rgb(255, 0, 0);"&gt;&amp;lt;document&amp;gt;&lt;/span&gt; element can contain any number, including zero, &lt;span style="color: rgb(255, 0, 0);"&gt;&amp;lt;employee&amp;gt;&lt;/span&gt; elements.
You can list &lt;span style="color: rgb(255, 0, 0);"&gt;multiple elements&lt;/span&gt; in a content model, which is called creating a &lt;span style="font-style: italic;"&gt;sequence&lt;/span&gt;. You use &lt;span style="color: rgb(0, 0, 102);"&gt;commas &lt;/span&gt;to separate the elements you want to have apear, and then the elements have to appear in that sequence in our XML document. For example, if you declare this sequence in the DTD:
&lt;blockquote&gt;&amp;lt;! ELEMENT employee (name, hiredate, projects) &amp;gt;&lt;/blockquote&gt;the &lt;span style="color: rgb(255, 0, 0);"&gt;&amp;lt;employee&amp;gt;&lt;/span&gt; elements can contain &lt;span style="color: rgb(255, 0, 0);"&gt;&amp;lt;name&amp;gt;&lt;/span&gt;, &lt;span style="color: rgb(255, 0, 0);"&gt;&amp;lt;hiredata&amp;gt;&lt;/span&gt;, and &lt;span style="color: rgb(255, 0, 0);"&gt;&amp;lt;projects&amp;gt;&lt;/span&gt; elements, and &lt;span style="color: rgb(255, 0, 0); font-style: italic;"&gt;in that order&lt;/span&gt;.

&lt;span style="font-style: italic; color: rgb(0, 0, 153);font-size:130%;" &gt;Handling Text Content&lt;/span&gt;
In a DTD, we refer to &lt;span style="font-style: italic;"&gt;parsed character data&lt;/span&gt; as&lt;span style="color: rgb(255, 0, 0);"&gt; #PCDATA&lt;/span&gt;. Note that this is the only way to refer to text data in a DTD -- you can't say anything about the actual format of the text, although that might be important if you're dealing with numbers. In fact, &lt;span style="font-style: italic;"&gt;this lack of precision is one of the reasons that XML schemas were introduced&lt;/span&gt;.

&lt;span style="color: rgb(0, 0, 153);font-size:130%;" &gt;&lt;span style="font-style: italic;"&gt;Specifying Multiple Child Elements&lt;/span&gt;&lt;/span&gt;
There are a number of ways of &lt;span style="color: rgb(255, 0, 0);"&gt;specifying multiple children&lt;/span&gt; by using symbols:
&lt;blockquote&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;x+&lt;/span&gt; -- Means x can appear one or more times;
&lt;span style="color: rgb(255, 0, 0);"&gt;x*&lt;/span&gt; -- Means x can appear zero or more times;
&lt;span style="color: rgb(255, 0, 0);"&gt;x?&lt;/span&gt; -- Means x can appear once or not at all;
&lt;span style="color: rgb(255, 0, 0);"&gt;x, y&lt;/span&gt; -- Means x followed by y;
&lt;span style="color: rgb(255, 0, 0);"&gt;x | y&lt;/span&gt; -- Means x or y, but not both.&lt;/blockquote&gt;You can use the &lt;span style="color: rgb(255, 0, 0);"&gt;+&lt;/span&gt;, &lt;span style="color: rgb(255, 0, 0);"&gt;*&lt;/span&gt;, and &lt;span style="color: rgb(255, 0, 0);"&gt;?&lt;/span&gt; symbols in content model sequences. e.g.
&lt;blockquote&gt;&amp;lt;! ELEMENT employee (name+, hiredate?, projects*) &amp;gt;&lt;/blockquote&gt;If fact, you can get even more powerful results by using the +, *, and ? operators inside sequences. By using parenttheses, we can create &lt;span style="font-style: italic; color: rgb(255, 0, 0);"&gt;subsequences&lt;/span&gt; -- that is, sequences inside sequences. e.g.
&lt;blockquote&gt;&amp;lt;! ELEMENT employee ((name, age?, phone*)+, hiredate, projects) &amp;gt;&lt;/blockquote&gt;&lt;span style="color: rgb(0, 0, 153);font-size:130%;" &gt;&lt;span style="font-style: italic;"&gt;Allowing Choices&lt;/span&gt;&lt;/span&gt;
By using (x | y | z), DTDS can support choices of containg either &lt;span style="color: rgb(255, 0, 0);"&gt;&amp;lt;x&amp;gt;&lt;/span&gt;, &lt;span style="color: rgb(255, 0, 0);"&gt;&amp;lt;y&amp;gt;&lt;/span&gt; or &lt;span style="color: rgb(255, 0, 0);"&gt;&amp;lt;z&amp;gt;&lt;/span&gt;.

&lt;span style="color: rgb(0, 0, 153);font-size:130%;" &gt;&lt;span style="font-style: italic;"&gt;Allowing Mixed Content&lt;/span&gt;&lt;/span&gt;
When using a DTD, you can allow an element to contain text &lt;span style="font-style: italic;"&gt;OR&lt;/span&gt; child elements, giving it a &lt;span style="color: rgb(255, 0, 0);"&gt;mixed content model&lt;/span&gt;. Note that even with a mixed content model, and element can't contain child elements &lt;span style="font-style: italic;"&gt;AND&lt;/span&gt; text data at the same level at the same time. However, you can set up a DTD so that an element can contain &lt;span style="font-style: italic;"&gt;EITHER &lt;/span&gt;child elements OR text data. e.g.
&lt;blockquote&gt;&amp;lt;! ELEMENT product (#PCDATA | stocknumber)* &amp;gt; &lt;/blockquote&gt;&lt;span style="color: rgb(0, 0, 153);font-size:130%;" &gt;&lt;span style="font-style: italic;"&gt;Allowing Empty Elements&lt;/span&gt;&lt;/span&gt;
Elements don't need to have any content at all, of course; they can be empty. As you would expect, you can support empty element by using DTDs. In particular, you can create an empty content model with the keyword &lt;span style="font-style: italic;"&gt;EMPTY&lt;/span&gt;. e.g.
&lt;blockquote&gt;&amp;lt;! ELEMENT intern EMPTY &amp;gt; &lt;/blockquote&gt;&lt;span style="color: rgb(0, 0, 153);font-size:130%;" &gt;&lt;span style="font-style: italic;"&gt;Commenting a DTD &lt;/span&gt;&lt;/span&gt;
Commenting a DTD accord to the same syntax with the XML.

&lt;span style="color: rgb(0, 0, 153);font-size:130%;" &gt;&lt;span style="font-style: italic;"&gt;Supporting External DTDs &lt;/span&gt;&lt;/span&gt;
We can also store DTDs &lt;span style="color: rgb(255, 0, 0);"&gt;externally&lt;/span&gt;, in entirely separate files, which usually use the extension &lt;span style="color: rgb(255, 0, 0); font-style: italic;"&gt;.dtd&lt;/span&gt;. That way, if you want to make changes in the XML application, you only need to change the DTD once, not in dozens of separate files. There are two ways to suport external DTDs -- as &lt;span style="font-style: italic; color: rgb(255, 0, 0);"&gt;private &lt;/span&gt;DTDs for personal or limited use and as &lt;span style="font-style: italic; color: rgb(255, 0, 0);"&gt;public &lt;/span&gt;DTDs for public use.

&lt;span style="color: rgb(0, 0, 153);font-size:130%;" &gt;&lt;span style="font-style: italic;"&gt;Creating Private DTDs &lt;/span&gt;&lt;/span&gt;
You specify that we're using an &lt;span style="color: rgb(255, 0, 0);"&gt;external private DTD&lt;/span&gt; by using the &lt;span style="font-style: italic; color: rgb(255, 0, 0);"&gt;SYSTEM &lt;/span&gt;keyword in the element, e.g.
&lt;blockquote&gt;&amp;lt;! DOCTYPE document SYTEM "ch04_07.dtd" &amp;gt;&lt;/blockquote&gt;This example specifies the name of the &lt;span style="color: rgb(255, 0, 0);"&gt;&amp;lt;document&amp;gt;&lt;/span&gt; element, the &lt;span style="color: rgb(255, 0, 0); font-style: italic;"&gt;SYSTEM &lt;/span&gt;keyword to indicate that the example is using a &lt;span style="color: rgb(255, 0, 0);"&gt;private external DTD&lt;/span&gt;, and the name of the external DTD file. We must change the &lt;span style="font-style: italic; color: rgb(255, 0, 0);"&gt;standalone &lt;/span&gt;attribute from "yes" to "no". e.g.
&lt;blockquote&gt;&amp;lt;? xml version = "1.0" encoding = "UTF-8" standalone = "no" ?&amp;gt;&lt;/blockquote&gt;Note that the external DTD simply holds the part of the document that was originally between the [ and ] in the inner version of element.
If you want to use an onlin XML validator, you need to supply a &lt;span style="font-style: italic; color: rgb(255, 0, 0);"&gt;URL &lt;/span&gt;like the following for an external DTD:
&lt;blockquote&gt;&amp;lt;! DOCTYPE document SYSTEM "http://sample.com/sample.dtd" &amp;gt;&lt;/blockquote&gt;&lt;span style="font-style: italic; color: rgb(0, 0, 153);font-size:130%;" &gt;Creating Public DTDs &lt;/span&gt;
Creating and using a &lt;span style="color: rgb(255, 0, 0);"&gt;public external DTD&lt;/span&gt; can take a little more work. In this case, you use the &lt;span style="font-style: italic; color: rgb(255, 0, 0);"&gt;PUBLIC &lt;/span&gt;keyword instead of &lt;span style="font-style: italic;"&gt;SYSTEM &lt;/span&gt;in the &lt;span style="color: rgb(255, 0, 0);"&gt;&amp;lt;!DOCTYPE&amp;gt;&lt;/span&gt; DTD. To use the &lt;span style="font-style: italic; color: rgb(255, 0, 0);"&gt;PUBLIC &lt;/span&gt;keyword, you must also create a &lt;span style="font-style: italic; color: rgb(255, 0, 0);"&gt;formal public identifier&lt;/span&gt; (FPI), which is a quoted string of text, made up of four fields separated by &lt;span style="color: rgb(255, 0, 0);"&gt;//&lt;/span&gt;. e.g. the official &lt;span style="color: rgb(255, 0, 0);"&gt;FPI&lt;/span&gt; for &lt;span style="color: rgb(255, 0, 0);"&gt;transitional XHTML 1.0&lt;/span&gt; is &lt;span style="color: rgb(51, 51, 255);"&gt;-//W3C//DTD XHTML 1.0 Transitional//EN&lt;/span&gt;. Here are the rules for creating the fields in FPIs:
&lt;blockquote&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;1. The first field indicates whether the DTD is for a&lt;span style="color: rgb(255, 0, 0);"&gt; formal standard&lt;/span&gt;.&lt;/span&gt; For DTDs you create on your own, this field should be -. If a non-official standard body has created the DTD, you use +. For formal standard bodies, this field is a reference to the standard itself (such as ISO/IEC 19775:2003)
&lt;span style="color: rgb(0, 0, 0);"&gt;2. The second field holds the &lt;span style="color: rgb(0, 0, 153);"&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;name&lt;/span&gt; &lt;/span&gt;of the group or person responsible for the DTD&lt;/span&gt;. You should use a name that is UNIQUE.
&lt;span style="color: rgb(0, 0, 0);"&gt;3. The third field specifies the &lt;span style="color: rgb(255, 0, 0);"&gt;type&lt;/span&gt; of the document the DTD is for and should be followed by a unique version number of some kind. &lt;/span&gt;
4. The fourth field specifies the &lt;span style="color: rgb(255, 0, 0);"&gt;language &lt;/span&gt;in which the DTD is written.&lt;/blockquote&gt;When you use a &lt;span style="color: rgb(255, 0, 0);"&gt;public external DTD&lt;/span&gt;, we can use the element like this:
&lt;blockquote&gt;&amp;lt;! DOCTYPE &lt;span style="font-style: italic;"&gt;rootname &lt;/span&gt;PUBLIC &lt;span style="font-style: italic;"&gt;FPI URI &lt;/span&gt;&amp;gt;&lt;/blockquote&gt;&lt;span style="font-style: italic; color: rgb(0, 0, 153);font-size:130%;" &gt;Using Internal and External DTDs at the Same Time &lt;/span&gt;
You can also use &lt;span style="color: rgb(255, 0, 0);"&gt;BOTH &lt;/span&gt;internal and external DTDs if you use these forms of the &lt;span style="color: rgb(255, 0, 0);"&gt;&amp;lt;!DOCTYPE&amp;gt;&lt;/span&gt; element:
&lt;blockquote&gt;&amp;lt;! DOCTYPE &lt;span style="font-style: italic;"&gt;rootname &lt;/span&gt;SYSTEM &lt;span style="font-style: italic;"&gt;URI &lt;/span&gt;[&lt;span style="font-style: italic;"&gt;DTD&lt;/span&gt;] &amp;gt;
&amp;lt;! DOCTYPE &lt;span style="font-style: italic;"&gt;rootname &lt;/span&gt;PUBLIC &lt;span style="font-style: italic;"&gt;identifier URI &lt;/span&gt;[&lt;span style="font-style: italic;"&gt;DTD&lt;/span&gt;] &amp;gt;&lt;/blockquote&gt;In these cases, &lt;span style="color: rgb(255, 0, 0);"&gt;the external DTD is specified by URL and the internal on by DTD&lt;/span&gt;. Combining internal and external DTDs like this is a good idea if you have a standard DTD that we share with other XML documents but also want to do some customizatoin in certain XML documents.

&lt;span style="font-style: italic; color: rgb(0, 0, 153);font-size:130%;" &gt;Handling Namespaces in DTDs &lt;/span&gt;
Another important topic when it comes to working with DTDs is how to handle &lt;span style="color: rgb(255, 0, 0);"&gt;namespaces&lt;/span&gt;. As we already know, a &lt;span style="color: rgb(255, 0, 0);"&gt;namespace &lt;/span&gt;name is really just a name prepended to an element or attribute name with a colon. That means that as far as a DTD is concerned, those new names have to be declared. The syntax is to add the following declaration in DTDs when using a namespace, &lt;span style="color: rgb(255, 0, 0);"&gt;(like declare an attribute of a element&lt;/span&gt;, which is concerned in Day 5).
&lt;blockquote&gt;&amp;lt;! ATTLIST emp:document xmlns:emp CDATA #FIXED "http://www.xmlpowercorp.com/dtds/" &amp;gt;&lt;/blockquote&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/10261622-111953586424463735?l=cherub325.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cherub325.blogspot.com/feeds/111953586424463735/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=10261622&amp;postID=111953586424463735' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10261622/posts/default/111953586424463735'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10261622/posts/default/111953586424463735'/><link rel='alternate' type='text/html' href='http://cherub325.blogspot.com/2005/06/teach-yourself-xml-in-21-days-day-4.html' title='Teach Yourself XML in 21 days, Day 4'/><author><name>CHERUB</name><uri>http://www.blogger.com/profile/05541000949655411328</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='14' height='32' src='http://static.flickr.com/29/61835177_20e0034f42_t.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-10261622.post-111878572612750746</id><published>2005-06-14T22:03:00.000+01:00</published><updated>2005-06-14T22:49:36.630+01:00</updated><title type='text'>Teach Yourself XML in 21 days, Day 3</title><content type='html'>&lt;span style="font-weight: bold;"&gt;&lt;span class="dropcap"&gt;C&lt;/span&gt;reating Well-Formed XML Documents&lt;/span&gt;
A XML document is well-formed if:
&lt;blockquote&gt;1. Taken as a whole, it matches the production labeled &lt;span style="color: rgb(0, 0, 153);"&gt;document&lt;/span&gt;;
2. It mees all the well-formedness constraints given in &lt;a href="http://www.w3.org/tr/rec-xml"&gt;XML 1.0 specification&lt;/a&gt;;
3. Each of the parsed entities, which is referenced directly or indirectly within the document, is well-formed. &lt;/blockquote&gt;&lt;span style="color: rgb(0, 0, 102);font-size:130%;" &gt;&lt;span style="font-style: italic;"&gt;Matching the Production Labeled document&lt;/span&gt;&lt;/span&gt;
A XML document, to be well-formed, must follow the document production, which means that the document itself must have three parts:
&lt;blockquote&gt;a prolog
a root element
a miscellaneous part&lt;/blockquote&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;siblings&lt;/span&gt;, &lt;span style="color: rgb(255, 0, 0);"&gt;child&lt;/span&gt;, &lt;span style="color: rgb(255, 0, 0);"&gt;parent &lt;/span&gt;relationships
A &lt;span style="color: rgb(255, 0, 0);"&gt;parent &lt;/span&gt;element can enclose an indefinite number of &lt;span style="color: rgb(255, 0, 0);"&gt;child &lt;/span&gt;elements

&lt;span style="color: rgb(0, 0, 102); font-style: italic;font-size:130%;" &gt;Well-Formedness Constraints&lt;/span&gt;
1. W3C says you should always include the XML declaration first thing;
2. Using only legal character references;
3. A XML document must include &lt;span style="color: rgb(255, 0, 0);"&gt;one &lt;/span&gt;or &lt;span style="color: rgb(255, 0, 0);"&gt;more &lt;/span&gt;elements. The first element is the &lt;span style="color: rgb(255, 0, 0);"&gt;root element&lt;/span&gt;;
4. Every &lt;span style="color: rgb(255, 0, 0);"&gt;non-empty element&lt;/span&gt; in XML must have both a &lt;span style="color: rgb(255, 0, 0);"&gt;start tag&lt;/span&gt; and an &lt;span style="color: rgb(255, 0, 0);"&gt;end tag&lt;/span&gt;;
&lt;span style="color: rgb(255, 0, 0);"&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;5. &lt;/span&gt;Empty elements&lt;/span&gt; which have no content, though they can have attributes, are made up entirely of one tag, and must always end with &lt;span style="color: rgb(255, 0, 0);"&gt;/&amp;lt;&lt;/span&gt;;
6. The &lt;span style="color: rgb(255, 0, 0);"&gt;root element&lt;/span&gt; must contain all the other elements in the document; (It is convenient for a XML processor to navigate the entire document)
&lt;span style="color: rgb(255, 0, 0);"&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;7. &lt;/span&gt;Nesting&lt;/span&gt; elements requires that if an element contains a &lt;span style="color: rgb(255, 0, 0);"&gt;start tag&lt;/span&gt; for a &lt;span style="color: rgb(255, 0, 0);"&gt;non-empty tag&lt;/span&gt;, it must also contain that element's &lt;span style="color: rgb(255, 0, 0);"&gt;end tag&lt;/span&gt;;
8. You can not use the same &lt;span style="color: rgb(255, 0, 0);"&gt;attribute &lt;/span&gt;more than once in one &lt;span style="color: rgb(255, 0, 0);"&gt;start tag&lt;/span&gt; or &lt;span style="color: rgb(255, 0, 0);"&gt;empty element tag&lt;/span&gt;;
9. You must &lt;span style="color: rgb(255, 0, 0);"&gt;quote &lt;/span&gt;every &lt;span style="color: rgb(255, 0, 0);"&gt;value &lt;/span&gt;you assign to an attribute, using either single quotation marks or double quotation marks;
10. You should avoid references to &lt;span style="color: rgb(255, 0, 0);"&gt;external entities&lt;/span&gt; in &lt;span style="color: rgb(255, 0, 0);"&gt;attribute values&lt;/span&gt;. Here the external entities mean XML style references - gengeral entity references or parameter entity references, not just, for example, using an image file's name. It also means that an XML processor doesn't have to replace an attribute value with the contents of an external entity.
11. You are not supposed to use &lt;span style="color: rgb(255, 0, 0);"&gt;&amp;lt;&lt;/span&gt; in &lt;span style="color: rgb(255, 0, 0);"&gt;attribute values&lt;/span&gt;, because an XML processor might mistake it for markup.
12. You should avoid using &amp;lt; and &amp; for anything else than start tag and the start entity reference. For JavaScript, it is maybe a problem... Three optional solutions:
&lt;blockquote&gt;Enclose JavaScript codes in a CDATA section;
Reverse the logical sense that using &lt;span style="color: rgb(255, 0, 0);"&gt;NOT great and equal t0&lt;/span&gt;  instead of &lt;span style="color: rgb(255, 0, 0);"&gt;below&lt;/span&gt;;
Place the JavaScript codes in an external file and like it when necessary; (Recommended)&lt;/blockquote&gt;&lt;span style="font-weight: bold;"&gt;XML Namespaces&lt;/span&gt;
&lt;span style="color: rgb(255, 0, 0);"&gt;Namespace &lt;/span&gt;is derived to handled the problem of &lt;span style="color: rgb(255, 0, 0);"&gt;tag names conflicting&lt;/span&gt;. Namespaces give you a way to make sure that one set of tags will no conflict with another. You &lt;span style="color: rgb(255, 0, 0);"&gt;prefix &lt;/span&gt;a name to &lt;span style="color: rgb(255, 0, 0);"&gt;tag and attribute names&lt;/span&gt;.
To define a new &lt;span style="color: rgb(255, 0, 0);"&gt;namespace&lt;/span&gt;, use the &lt;span style="color: rgb(255, 0, 0);"&gt;xmlns:prefix&lt;/span&gt; attribute, where &lt;span style="color: rgb(255, 0, 0);"&gt;prefix&lt;/span&gt; is the prefix you want to use for the namespace. e.g.
&lt;blockquote&gt;&amp;lt;employee &lt;span style="color: rgb(0, 0, 153);"&gt;xmlns:hr&lt;/span&gt;="http://www.example.com/example"&amp;gt;&lt;/blockquote&gt;&lt;span style="font-weight: bold;"&gt;URI, Uniform Resource Identifiers&lt;/span&gt;
To define a &lt;span style="color: rgb(255, 0, 0);"&gt;namespace&lt;/span&gt;, you assign the &lt;span style="font-style: italic; color: rgb(255, 0, 0);"&gt;xmlns:prefix&lt;/span&gt; attribute to a unique identifier, which in XML is usually a &lt;span style="color: rgb(255, 0, 0);"&gt;URI&lt;/span&gt; that might direct the XML processor to a DTD for the &lt;span style="color: rgb(255, 0, 0);"&gt;namespace&lt;/span&gt;. &lt;span style="color: rgb(255, 0, 0);"&gt;URI&lt;/span&gt;, &lt;span style="color: rgb(255, 0, 0);"&gt;Uniform Resource Identifiers&lt;/span&gt;, is expanded from the idea of standard &lt;span style="color: rgb(255, 0, 0);"&gt;URL, Uniform Resource Locators&lt;/span&gt;. In theory, a &lt;span style="color: rgb(255, 0, 0);"&gt;URI &lt;/span&gt;can point not just to a single resource, but to a cluster of resources, or to arcs of resources along a path. But the truth is that the whole idea of &lt;span style="color: rgb(255, 0, 0);"&gt;URI &lt;/span&gt;as the next step after &lt;span style="color: rgb(255, 0, 0);"&gt;URL &lt;/span&gt;is still being developed.
After defining the &lt;span style="font-style: italic; color: rgb(0, 0, 153);"&gt;hr &lt;/span&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;namespace &lt;/span&gt;in the above example, you can preface every tag and attribute name in this &lt;span style="color: rgb(255, 0, 0);"&gt;namespace &lt;/span&gt;with &lt;span style="font-style: italic; color: rgb(0, 0, 153);"&gt;hr:&lt;/span&gt; like this:
&lt;blockquote&gt;&amp;lt;&lt;span style="color: rgb(0, 0, 153);"&gt;hr:&lt;/span&gt;employee&amp;gt;&lt;/blockquote&gt;Using &lt;span style="color: rgb(255, 0, 0);"&gt;namespaces &lt;/span&gt;keeps elements separate by actually changing tag and attribute names.
Two &lt;span style="color: rgb(255, 0, 0);"&gt;namespace &lt;/span&gt;names are reserved: &lt;span style="font-style: italic; color: rgb(0, 0, 153);"&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;xml&lt;/span&gt; &lt;/span&gt;and &lt;span style="font-style: italic; color: rgb(255, 0, 0);"&gt;xmlns&lt;/span&gt;&lt;span style="font-style: italic;"&gt;.&lt;/span&gt;
You can use the &lt;span style="font-style: italic; color: rgb(255, 0, 0);"&gt;xmlns:prefix&lt;/span&gt; attribute to define a namespace, or you can use the &lt;span style="font-style: italic; color: rgb(255, 0, 0);"&gt;xmlns&lt;/span&gt; attribute by itself to define a &lt;span style="color: rgb(255, 0, 0);"&gt;default namespace&lt;/span&gt;. When you define a &lt;span style="color: rgb(255, 0, 0);"&gt;default namespace&lt;/span&gt;, elements and attributes without a namespace &lt;span style="color: rgb(255, 0, 0);"&gt;prefix &lt;/span&gt;are in that default namespace. e.g.
&lt;blockquote&gt;&amp;lt;html   &lt;span style="color: rgb(0, 0, 153);"&gt;xmlns&lt;/span&gt;="http://www.w3.org/1999/xhtml" &lt;span style="color: rgb(0, 0, 153);"&gt;xml:lang&lt;/span&gt;="en" &lt;span style="color: rgb(0, 0, 153);"&gt;lang&lt;/span&gt;="en"   &lt;span style="color: rgb(0, 0, 153);"&gt;xmlns:m&lt;/span&gt;="http://www.w3.org/1998/Math/MathXML" &amp;gt;&lt;/blockquote&gt;The above example create a &lt;span style="color: rgb(255, 0, 0);"&gt;default namespace&lt;/span&gt; for &lt;span style="color: rgb(255, 0, 0);"&gt;XHTML &lt;/span&gt;tags and a &lt;span style="font-style: italic; color: rgb(0, 0, 153);"&gt;m&lt;/span&gt; &lt;span style="color: rgb(255, 0, 0);"&gt;namespace &lt;/span&gt;for &lt;span style="color: rgb(255, 0, 0);"&gt;MathXML &lt;/span&gt;tags inside element html.
&lt;span style="color: rgb(255, 0, 0);"&gt;Namespaces &lt;/span&gt;aren't used solely to avoid tag and attribute name conflicts, using a &lt;span style="color: rgb(255, 0, 0);"&gt;namespace &lt;/span&gt;also indicates to an XML processor what &lt;span style="color: rgb(255, 0, 0);"&gt;XML application&lt;/span&gt; you're using.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/10261622-111878572612750746?l=cherub325.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cherub325.blogspot.com/feeds/111878572612750746/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=10261622&amp;postID=111878572612750746' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10261622/posts/default/111878572612750746'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10261622/posts/default/111878572612750746'/><link rel='alternate' type='text/html' href='http://cherub325.blogspot.com/2005/06/teach-yourself-xml-in-21-days-day-3.html' title='Teach Yourself XML in 21 days, Day 3'/><author><name>CHERUB</name><uri>http://www.blogger.com/profile/05541000949655411328</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='14' height='32' src='http://static.flickr.com/29/61835177_20e0034f42_t.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-10261622.post-111857329934890092</id><published>2005-06-12T11:47:00.000+01:00</published><updated>2005-06-12T11:48:19.350+01:00</updated><title type='text'>No time</title><content type='html'>Excuse me a break... Too short of time to do more things...&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/10261622-111857329934890092?l=cherub325.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cherub325.blogspot.com/feeds/111857329934890092/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=10261622&amp;postID=111857329934890092' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10261622/posts/default/111857329934890092'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10261622/posts/default/111857329934890092'/><link rel='alternate' type='text/html' href='http://cherub325.blogspot.com/2005/06/no-time.html' title='No time'/><author><name>CHERUB</name><uri>http://www.blogger.com/profile/05541000949655411328</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='14' height='32' src='http://static.flickr.com/29/61835177_20e0034f42_t.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-10261622.post-111827217919307900</id><published>2005-06-08T22:53:00.000+01:00</published><updated>2005-06-14T22:50:01.373+01:00</updated><title type='text'>Teach Yourself XML in 21 days, Day 2</title><content type='html'>&lt;span class="dropcap"&gt;N&lt;/span&gt;ecessary tools necessary to help you develop your XML are &lt;span style="color: rgb(255, 0, 0);"&gt;editors&lt;/span&gt;, &lt;span style="color: rgb(255, 0, 0);"&gt;browsers&lt;/span&gt;, and &lt;span style="color: rgb(255, 0, 0);"&gt;validators&lt;/span&gt;.
&lt;span style="font-weight: bold;"&gt;XML character Encoding: ASCII, Unicode, and UCS&lt;/span&gt;
W3C chose &lt;a style="font-style: italic; color: rgb(255, 0, 0);" href="http://www.unicode.org/"&gt;Unicode&lt;/a&gt;, which holds 65,536 characters, as XML's standard Encoding. The first 256 Unicode characters correspond to the &lt;span style="font-style: italic; color: rgb(255, 0, 0);"&gt;ASCII &lt;/span&gt;character set.
There's another character encoding availabe that has even more space than Unicode - the &lt;span style="font-style: italic; color: rgb(255, 0, 0);"&gt;Universal Character System, UCS&lt;/span&gt;, also called ISO 10646, uses 32 bits - two bytes - per character. This give it a range of two billion symbols - and a good thing, too, since there are more Chinese characters alone than there is space in Unicode. UCS also encompasses the smaller Unicode character set - each Unicode character is represented by the same code in UCS, in much the same way that the Unicode encompasses the smaller ASCII character set.
XML actually supports a compressed version of Unicode created by the UCS group called &lt;span style="font-style: italic; color: rgb(255, 0, 0);"&gt;UCS Transformation Format - 8, UTF-8&lt;/span&gt;. UTF-8 includes all the ASCII codes unchaged, and uses a single byte for the most common Unicode characters.
UCS itself has also been compressed in the same way into a character set named &lt;span style="font-style: italic; color: rgb(255, 0, 0);"&gt;UTF-16&lt;/span&gt;, which uses two bytes (instead of the normal four that UCS uses) for the most common characters, and more bytes for the less common characters.
W3C requires all XML processors to support both UTF-8, and UTF-16, and those are the only two W3C requires.
UTF-8 is so widespread that an XML processor will assume you're using it if you omit the encoding attribute.
&lt;span style="font-style: italic; color: rgb(255, 0, 0);"&gt;Character reference&lt;/span&gt; stands for a Unicode character and begin with &lt;span style="color: rgb(255, 0, 0);"&gt;&amp;&lt;/span&gt;, followed by &lt;span style="color: rgb(255, 0, 0);"&gt;a numeric code&lt;/span&gt; specifying a character, and ends with &lt;span style="color: rgb(255, 0, 0);"&gt;;&lt;/span&gt;.
&lt;span style="font-weight: bold;"&gt;Understanding XML Markup and XML Data&lt;/span&gt;
XML documents are combinations of &lt;span style="font-style: italic; color: rgb(255, 0, 0);"&gt;markup &lt;/span&gt;and &lt;span style="font-style: italic; color: rgb(255, 0, 0);"&gt;text data&lt;/span&gt;.
The &lt;span style="font-style: italic; color: rgb(255, 0, 0);"&gt;markup &lt;/span&gt;in a document gives it its structure. &lt;span style="font-style: italic; color: rgb(255, 0, 0);"&gt;Markup &lt;/span&gt;includes &lt;span style="color: rgb(0, 0, 153);"&gt;start tags&lt;/span&gt;, &lt;span style="color: rgb(0, 0, 153);"&gt;end tags&lt;/span&gt;, &lt;span style="color: rgb(0, 0, 153);"&gt;empty element tags&lt;/span&gt;, &lt;span style="color: rgb(0, 0, 153);"&gt;entity references&lt;/span&gt;, &lt;span style="color: rgb(0, 0, 153);"&gt;character references&lt;/span&gt;, &lt;span style="color: rgb(0, 0, 153);"&gt;comments&lt;/span&gt;, &lt;span style="color: rgb(0, 0, 153);"&gt;CDATA section delimiters&lt;/span&gt;, &lt;span style="color: rgb(0, 0, 153);"&gt;document type declaractions&lt;/span&gt;, and &lt;span style="color: rgb(0, 0, 153);"&gt;processing instructions&lt;/span&gt;.
All the text in an XML document that is not markup is &lt;span style="font-style: italic; color: rgb(255, 0, 0);"&gt;data&lt;/span&gt;.
&lt;blockquote&gt;&lt;span style="font-style: italic; color: rgb(255, 0, 0);"&gt;Tags &lt;/span&gt;begint with &lt;span style="font-style: italic; color: rgb(255, 0, 0);"&gt;&amp;lt;&lt;/span&gt; and end with &lt;span style="font-style: italic; color: rgb(255, 0, 0);"&gt;&amp;gt;&lt;/span&gt;
&lt;span style="font-style: italic; color: rgb(255, 0, 0);"&gt;General entity references&lt;/span&gt; start with &lt;span style="font-style: italic; color: rgb(255, 0, 0);"&gt;&amp;&lt;/span&gt; and end with &lt;span style="font-style: italic; color: rgb(255, 0, 0);"&gt;;&lt;/span&gt;
&lt;span style="font-style: italic; color: rgb(255, 0, 0);"&gt;Parameter entity reference&lt;/span&gt;, which start with &lt;span style="font-style: italic; color: rgb(255, 0, 0);"&gt;%&lt;/span&gt; and end with &lt;span style="font-style: italic; color: rgb(255, 0, 0);"&gt;;&lt;/span&gt;, are used in DTDs.&lt;/blockquote&gt;Before XML document is parsed, text data is called &lt;span style="font-style: italic; color: rgb(255, 0, 0);"&gt;character data&lt;/span&gt;; after it's been parsed and general entity references have been replaced with the entities they refer to, the text data is called &lt;span style="font-style: italic; color: rgb(255, 0, 0);"&gt;parsed character data&lt;/span&gt;.
&lt;span style="font-weight: bold;"&gt;Using Whitespace and Ends of Lines&lt;/span&gt;
Spaces, carriage returns, line feeds, and tabs are all treated as &lt;span style="font-style: italic; color: rgb(255, 0, 0);"&gt;whitespace &lt;/span&gt;in XML.
&lt;blockquote style="color: rgb(0, 0, 153);"&gt;attribute xml:space&lt;/blockquote&gt;&lt;span style="font-weight: bold;"&gt;Creating Prologs&lt;/span&gt;
&lt;span style="font-style: italic; color: rgb(255, 0, 0);"&gt;Prologs &lt;/span&gt;appear at the beginning of XML documents, and contain information about the rest of a the document. A &lt;span style="font-style: italic; color: rgb(255, 0, 0);"&gt;problog &lt;/span&gt;can contain &lt;span style="font-style: italic; color: rgb(255, 0, 0);"&gt;XML declaractions&lt;/span&gt;, &lt;span style="color: rgb(255, 0, 0); font-style: italic;"&gt;XML comments&lt;/span&gt;, &lt;span style="font-style: italic; color: rgb(255, 0, 0);"&gt;processing instructions&lt;/span&gt;, &lt;span style="font-style: italic; color: rgb(255, 0, 0);"&gt;whitespace&lt;/span&gt;, and &lt;span style="font-style: italic; color: rgb(255, 0, 0);"&gt;doctype declaractions&lt;/span&gt;. W3C says you should include at least an XML declaration in all XML documents.
&lt;span style="font-style: italic; color: rgb(0, 102, 0);font-size:130%;" &gt;XML Declaraction&lt;/span&gt;&lt;span style="font-style: italic; color: rgb(255, 0, 0);"&gt;XML declaractions&lt;/span&gt; tell XML processors what version of XML you're using, what character encoding the document is written in, and so on. All XML documents should start with an &lt;span style="font-style: italic; color: rgb(255, 0, 0);"&gt;XML declaraction&lt;/span&gt;, which should be the first line in an XML document.
&lt;blockquote&gt;&lt;span style="color: rgb(51, 51, 255);"&gt;attibute: version, encoding, standalone&lt;/span&gt; (Set to "yes" if the document does not refer to any external documents or entities, "no" otherwise. It is optional)&lt;/blockquote&gt;&lt;span style="font-style: italic; color: rgb(0, 153, 0);font-size:130%;" &gt;XML Comments:&lt;/span&gt; You start a &lt;span style="font-style: italic; color: rgb(255, 0, 0);"&gt;comment &lt;/span&gt;with &lt;span style="color: rgb(255, 0, 0);"&gt;&amp;lt;!--&lt;/span&gt; and end it with &lt;span style="color: rgb(255, 0, 0);"&gt;--&amp;gt;&lt;/span&gt;. You're only supposed to use &lt;span style="font-style: italic; color: rgb(255, 0, 0);"&gt;comments &lt;/span&gt;outside markup. You should not use the character sequence -- in the text of a &lt;span style="font-style: italic; color: rgb(255, 0, 0);"&gt;comment&lt;/span&gt;. In particular, the XML 1.0 specification says that &lt;span style="font-style: italic; color: rgb(255, 0, 0);"&gt;comments &lt;/span&gt;can not end with the sequence &lt;span style="color: rgb(0, 0, 153);"&gt;---&amp;gt;&lt;/span&gt;. Also, &lt;span style="font-style: italic; color: rgb(255, 0, 0);"&gt;comments &lt;/span&gt;can not come before an &lt;span style="font-style: italic; color: rgb(255, 0, 0);"&gt;XML declaraction&lt;/span&gt; (nothing can).In most XML processor, you can use &lt;span style="font-style: italic; color: rgb(255, 0, 0);"&gt;comments &lt;/span&gt;to exclude sections of a document from being treated as markup.
&lt;span style="font-size:130%;"&gt;&lt;span style="font-style: italic; color: rgb(0, 153, 0);"&gt;Processing Instructions:&lt;/span&gt;&lt;/span&gt; &lt;span style="font-style: italic; color: rgb(255, 0, 0);"&gt;Processing instructions&lt;/span&gt; are instructions to the XML processor, not general data-handling items like &lt;span style="font-style: italic; color: rgb(255, 0, 0);"&gt;elements&lt;/span&gt;. A common &lt;span style="font-style: italic; color: rgb(255, 0, 0);"&gt;processing instruction&lt;/span&gt; is &lt;span style="color: rgb(255, 0, 0);"&gt;&amp;lt;?xml-stylesheet?&amp;gt;&lt;/span&gt;, but that's not an official W3C &lt;span style="font-style: italic; color: rgb(255, 0, 0);"&gt;processing instruction&lt;/span&gt; built into XML. In other words, &lt;span style="font-style: italic; color: rgb(255, 0, 0);"&gt;processing instructions&lt;/span&gt; must be understood by the XML processor, so they're processor-dependent.
&lt;span style="font-weight: bold;"&gt;Creating Tags and Elements.&lt;/span&gt;
&lt;span style="font-size:130%;"&gt;&lt;span style="font-style: italic; color: rgb(0, 153, 0);"&gt;Tags and Elements:&lt;/span&gt;&lt;/span&gt; &lt;span style="font-style: italic; color: rgb(255, 0, 0);"&gt;Tag &lt;/span&gt;names are case sensive.
&lt;span style="font-style: italic; color: rgb(0, 153, 0);font-size:130%;" &gt;Empty Elements: &lt;/span&gt;In XML, you close an &lt;span style="font-style: italic; color: rgb(255, 0, 0);"&gt;empty element&lt;/span&gt; with &lt;span style="color: rgb(255, 0, 0);"&gt;/&amp;gt;&lt;/span&gt;. &lt;span style="font-style: italic; color: rgb(255, 0, 0);"&gt;Empty elements&lt;/span&gt; can have attributes.
&lt;span style="font-size:130%;"&gt;&lt;span style="font-style: italic; color: rgb(0, 153, 0);"&gt;Root Element:&lt;/span&gt;&lt;/span&gt; Each well-formed XML document must contain one element that contains all the other elements, and the containing element is called the&lt;span style="font-style: italic; color: rgb(255, 0, 0);"&gt; root element&lt;/span&gt;.
&lt;span style="font-size:130%;"&gt;&lt;span style="font-style: italic; color: rgb(0, 153, 0);"&gt;Attributes:&lt;/span&gt;&lt;/span&gt; The values you assign to &lt;span style="font-style: italic; color: rgb(255, 0, 0);"&gt;attributes &lt;/span&gt;must be quoted, even if they're numbers, and that if you use an &lt;span style="font-style: italic; color: rgb(255, 0, 0);"&gt;attribute&lt;/span&gt;, it must be assigned a value. &lt;span style="font-style: italic; color: rgb(255, 0, 0);"&gt;Attribute &lt;/span&gt;names must follow the same rules as those for &lt;span style="font-style: italic; color: rgb(255, 0, 0);"&gt;element &lt;/span&gt;names. If the &lt;span style="font-style: italic; color: rgb(255, 0, 0);"&gt;attribute &lt;/span&gt;value contains ingle or double quotes or both, you can use the XML-defined &lt;span style="font-style: italic; color: rgb(255, 0, 0);"&gt;general entity references&lt;/span&gt; for a single quotation mark and for a double quotation mark.
&lt;blockquote style="color: rgb(51, 51, 255);"&gt;attribute: xml:lang&lt;/blockquote&gt;&lt;span style="font-size:130%;"&gt;&lt;span style="font-style: italic; color: rgb(0, 153, 0);"&gt;Attributes, Elements, Data:&lt;/span&gt;&lt;/span&gt; &lt;span style="font-style: italic; color: rgb(255, 0, 0);"&gt;Attributes &lt;/span&gt;hold data, and &lt;span style="font-style: italic; color: rgb(255, 0, 0);"&gt;elements &lt;/span&gt;hold data, too. You can't specify document structure using &lt;span style="font-style: italic; color: rgb(255, 0, 0);"&gt;attribute&lt;/span&gt;. A good rule to follow, therefore, is to use &lt;span style="font-style: italic; color: rgb(255, 0, 0);"&gt;elements &lt;/span&gt;to structure your document, and to use &lt;span style="font-style: italic; color: rgb(255, 0, 0);"&gt;attributes &lt;/span&gt;when you have more information to include &lt;span style="font-style: italic;"&gt;&lt;span style="color: rgb(0, 0, 153);"&gt;about&lt;/span&gt; &lt;/span&gt;a specific element.
&lt;!--[CDATA[ and end it with ]]--&gt;&lt;span style="color: rgb(0, 153, 0);font-size:130%;" &gt;&lt;span style="font-style: italic;"&gt;CDATA Sections:&lt;/span&gt;&lt;/span&gt; &lt;span style="font-style: italic; color: rgb(0, 0, 153);"&gt;escaping &lt;/span&gt;means you want XMl processor to avoid to replace the &lt;span style="font-style: italic; color: rgb(255, 0, 0);"&gt;general entity reference&lt;/span&gt; to what it refer to. You can achieve &lt;span style="font-style: italic; color: rgb(51, 51, 255);"&gt;&lt;span style="color: rgb(0, 0, 153);"&gt;escaping&lt;/span&gt; &lt;/span&gt;by placing you text data in a &lt;span style="font-style: italic; color: rgb(255, 0, 0);"&gt;CDATA section&lt;/span&gt;. &lt;span style="color: rgb(255, 0, 0); font-style: italic;"&gt;CDATA&lt;/span&gt; stands for &lt;span style="font-style: italic; color: rgb(255, 0, 0);"&gt;character data&lt;/span&gt;, as opposed to &lt;span style="font-style: italic; color: rgb(255, 0, 0);"&gt;parsed character data&lt;/span&gt;, which is &lt;span style="font-style: italic; color: rgb(255, 0, 0);"&gt;PCDATA&lt;/span&gt;. You use the &lt;span style="font-style: italic; color: rgb(255, 0, 0);"&gt;CDATA section&lt;/span&gt; to tell the XML processer to leave the enclosed text alone, and pass it on uncharged. You cannot nest &lt;span style="font-style: italic; color: rgb(255, 0, 0);"&gt;CDATA sections&lt;/span&gt;. To avoid confusing an XML processor reading an XHTML page with embedded JavaScript operator, which may use the less than (&lt;span style="color: rgb(255, 0, 0);"&gt;&amp;lt;&lt;/span&gt;), you can enclose that JavaScript in a &lt;span style="font-style: italic; color: rgb(255, 0, 0);"&gt;CDATA section&lt;/span&gt;.
&lt;span style="font-size:130%;"&gt;&lt;span style="font-style: italic; color: rgb(0, 153, 0);"&gt;Entities:&lt;/span&gt;&lt;/span&gt; There's another type of item you can work with in XML documents - &lt;span style="font-style: italic; color: rgb(255, 0, 0);"&gt;entities&lt;/span&gt;, which can be &lt;span style="font-style: italic; color: rgb(255, 0, 0);"&gt;parsed &lt;/span&gt;or &lt;span style="font-style: italic; color: rgb(255, 0, 0);"&gt;unparsed&lt;/span&gt;. An &lt;span style="font-style: italic; color: rgb(255, 0, 0);"&gt;entity &lt;/span&gt;simply means a data item, such as a section of text or binary data. A&lt;span style="font-style: italic; color: rgb(255, 0, 0);"&gt; parsed entity&lt;/span&gt; is one that you refer to with an &lt;span style="font-style: italic; color: rgb(255, 0, 0);"&gt;entity reference&lt;/span&gt;. &lt;span style="color: rgb(255, 0, 0);"&gt;Entity references&lt;/span&gt; are replaced by XML processor with the entities they refer to. You can define your own &lt;span style="font-style: italic; color: rgb(255, 0, 0);"&gt;general entity refereneces&lt;/span&gt;. &lt;span style="font-style: italic; color: rgb(255, 0, 0);"&gt;Unparsed entities&lt;/span&gt; can be binary data that you don't want parsed, or even non-XML text, and they're usually external to you XML document. You don't refer to an unparsed entity with an entity reference, but by a &lt;span style="font-style: italic; color: rgb(255, 0, 0);"&gt;name&lt;/span&gt;. When you refer to an entity by &lt;span style="font-style: italic; color: rgb(255, 0, 0);"&gt;name &lt;/span&gt;instead of with an explicit entity reference, that entity will not be parsed or placed into your XML document directly.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/10261622-111827217919307900?l=cherub325.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cherub325.blogspot.com/feeds/111827217919307900/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=10261622&amp;postID=111827217919307900' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10261622/posts/default/111827217919307900'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10261622/posts/default/111827217919307900'/><link rel='alternate' type='text/html' href='http://cherub325.blogspot.com/2005/06/teach-yourself-xml-in-21-days-day-2.html' title='Teach Yourself XML in 21 days, Day 2'/><author><name>CHERUB</name><uri>http://www.blogger.com/profile/05541000949655411328</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='14' height='32' src='http://static.flickr.com/29/61835177_20e0034f42_t.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-10261622.post-111818241022577658</id><published>2005-06-07T22:39:00.000+01:00</published><updated>2005-06-08T00:53:53.763+01:00</updated><title type='text'>Teach Yourself XML in 21 days, Day 1</title><content type='html'>&lt;span class="dropcap"&gt;T&lt;/span&gt;he name of the game in &lt;span style="color: rgb(255, 0, 0);"&gt;XML&lt;/span&gt; is &lt;span style="font-style: italic; color: rgb(255, 0, 0);"&gt;data&lt;/span&gt;, because XML is all about storing your data. Unlike HTML, XML is not about displaying your data - it's about packaging that data to transport it easily.
&lt;span style="font-weight: bold;"&gt;All About Markup Languages&lt;/span&gt;
The term &lt;span style="font-style: italic; color: rgb(255, 0, 0);"&gt;markup &lt;/span&gt;refers to codes or tokens you put into a document to indicate how to interpret the (non-markup) data in the document.
&lt;span style="font-weight: bold;"&gt;All About XML&lt;/span&gt;
XML is a&lt;span style="font-style: italic; color: rgb(255, 0, 0);"&gt; meta-language&lt;/span&gt;, which means it's a language that lets you create your own markup languages.
W3C publishes its specifications using four types of documents:
&lt;blockquote style="font-weight: bold;"&gt;Notes;
Working drafts;
Candidate recommendations;
Recommendations.&lt;/blockquote&gt;
You're free to make up your own element names in XML, and that's XML's whole power - the capability to create your own markup. Comment that, unlike HTML, the &lt;span style="color: rgb(255, 0, 0);"&gt;case &lt;/span&gt;of a tag is important in XML.
XML documents always need a &lt;span style="font-style: italic; color: rgb(255, 0, 0);"&gt;root element&lt;/span&gt;, even if they don't have any other elements or text.
Being able to create your own elements from scratch has advantages and disadvantages - you're not restricted to a predefined and limited set of tags, but on the other hand, a standard Web browser can understand HTML tags but will have no idea what do with a special tag, e.g.&lt;span style="color: rgb(255, 0, 0);"&gt;&amp;lt;message&amp;gt;&lt;/span&gt;.
&lt;span style="font-weight: bold;"&gt;Looking at XML in a Browser&lt;/span&gt;
Internet Explorer hasn't done anything more than display raw XML - it hasn't interpreted that XML in any way, because browsers are specialists at displaying data, not interpreting XML tags.
One of the most popular reasons for using &lt;span style="font-style: italic; color: rgb(255, 0, 0);"&gt;style sheets&lt;/span&gt; with XML is that you store your data in an XML document, and specify how to display that data using a separate document, the style sheet. By &lt;span style="font-weight: bold; color: rgb(255, 0, 0);"&gt;seperating the presentation details from the data&lt;/span&gt;, you can change the entire presentation with a few changes in the style sheet, instead of making multiple changes in your data ifself.
There are 2 kinds of style sheets you can use with XML documents - &lt;span style="font-style: italic; color: rgb(255, 0, 0);"&gt;Cascading Style Sheets (CSS)&lt;/span&gt;, which you can also use with HTML documents, and &lt;span style="font-style: italic; color: rgb(255, 0, 0);"&gt;Extensible Stylesheet Language style Sheets (XSL)&lt;/span&gt;, designed to be used only with XML documents.
All &lt;span style="font-style: italic; color: rgb(255, 0, 0);"&gt;XML processing instructions&lt;/span&gt; start with &lt;span style="color: rgb(255, 0, 0);"&gt;&amp;lt;?&lt;/span&gt; and end with &lt;span style="color: rgb(255, 0, 0);"&gt;?&amp;gt;&lt;/span&gt;.
&lt;span style="font-weight: bold;"&gt;Working with XML Data Yourself&lt;/span&gt;
One way of gaining access to that data in a browser is to use &lt;span style="color: rgb(255, 0, 0); font-style: italic;"&gt;JavaScript&lt;/span&gt;. Moreover, &lt;span style="color: rgb(255, 0, 0); font-style: italic;"&gt;Java &lt;/span&gt;has all kinds of built-in support for working with XML.
&lt;span style="font-weight: bold;"&gt;Structuring Your Data&lt;/span&gt;
An XML document actually can do more than just hold your data; it can let you specify the &lt;span style="font-style: italic; color: rgb(255, 0, 0);"&gt;structure &lt;/span&gt;of that data as well.
The software that reads your XML - called an &lt;span style="font-style: italic; color: rgb(255, 0, 0);"&gt;XML processor&lt;/span&gt; - is supposed to check your document; if there's a problem, the processor is supposed to quit. It should let you know about the problem, but that's as far as it's supposed to do, according to W3C.
There are 2 main checks that XML processors make: checking that your document is &lt;span style="font-style: italic; color: rgb(255, 0, 0);"&gt;well-formed&lt;/span&gt; and checking that it's &lt;span style="font-style: italic; color: rgb(255, 0, 0);"&gt;valid&lt;/span&gt;.
&lt;span style="font-weight: bold;"&gt;Creating Well-Formed XML Documents&lt;/span&gt;
Formally, for an XML document being well-formed, it means that the document must follow the syntax rules specified for XML by the W3C in the &lt;span style="font-style: italic; color: rgb(255, 0, 0);"&gt;XML 1.0 recommendation&lt;/span&gt; or the &lt;span style="font-style: italic; color: rgb(255, 0, 0);"&gt;XML 1.1 candidatae recommendation&lt;/span&gt;. The document must contain one or more elements, and one element, the root element, must contain all the other elements. In addition, each element must nest inside any enclosing elements properly.
&lt;span style="font-weight: bold;"&gt;Creating Valid XML Documents&lt;/span&gt;
An XML processor will usually check whether your XML document is well-formed, but only some are also capable of checking whether it's valid. An XML document is valid if it adheres to the syntax you've specified for it, and you can specify that syntax in either a &lt;span style="font-style: italic; color: rgb(255, 0, 0);"&gt;Document Type Definition (DTD)&lt;/span&gt; or an &lt;span style="font-style: italic; color: rgb(255, 0, 0);"&gt;XML schema&lt;/span&gt;.
Using a DTD, you're able to specify the syntax your XML document should obey - what elements should be inside what other elements, what attributes an element can have, and so on - and if an XML processor can perform validation, it can check your document and head off problems.
&lt;span style="font-weight: bold;"&gt;How XML is Used in the Real World&lt;/span&gt;
XML sublanguages like MathML are called &lt;span style="font-style: italic; color: rgb(255, 0, 0);"&gt;XML applications&lt;/span&gt;.
&lt;span style="font-style: italic; color: rgb(255, 0, 0);"&gt;&lt;/span&gt;&lt;blockquote&gt;&lt;span style="font-style: italic; color: rgb(255, 0, 0);"&gt;Mathematical Markup Language&lt;/span&gt;, &lt;span style="font-style: italic; color: rgb(255, 0, 0);"&gt;MathML&lt;/span&gt;, was designed to let people embed mathematical and scientific equations in Web pages, which can be found at its &lt;a href="http://www.w3.org/tr/mathml2/"&gt;W3C's specification&lt;/a&gt;. the Amaya browser can support MathML.

&lt;span style="color: rgb(255, 0, 0); font-style: italic;"&gt;Chemical Markup Language, CML&lt;/span&gt;, lets you view three-dimensional representations of molecules in a &lt;span style="color: rgb(255, 0, 0); font-style: italic;"&gt;Jumbo browser&lt;/span&gt;.

&lt;span style="font-style: italic; color: rgb(255, 0, 0);"&gt;Synchronized Multimedia Integration Language, SMIL&lt;/span&gt;, lets you customize multimedia presentations, which can be found at its &lt;a href="http://www.w3.org/audiovideo/#smil"&gt;W3C's specification&lt;/a&gt;.

&lt;span style="font-style: italic; color: rgb(255, 0, 0);"&gt;Extensible Hypertext Markup Language, &lt;/span&gt;&lt;a style="font-style: italic; color: rgb(255, 0, 0);" href="http://www.w3.org/markup/activity.html"&gt;XHTML&lt;/a&gt;, makes HTML more rigorous and let you extend it with your own tags. XHTML is HTML 4.01 (the current version of HTML) in XML form. In other words, XHTML is simply an XML application that mimics HTML 4.0 in such a way that you can display the results - true XML documents - in today's Web browsers, as well as extending it with your own new elements. Writing XHTML is a lot like HTML, except that you have to adhere to XML syntax (which means, for example, that every element has a closing tag).

&lt;a style="font-style: italic; color: rgb(255, 0, 0);" href="http://msdn.microsoft.com/workshop/author/behaviors/time.asp"&gt;HTML+TIME&lt;/a&gt;, is another XML application, which was created by Microsoft, Macromedia, and Compaq as an alternative to SMIL for multimedia alternative.

&lt;span style="font-style: italic; color: rgb(255, 0, 0);"&gt;Scalable Vector Graphics, SVG&lt;/span&gt;, is a W3C-based XML application, which revolves around graphics. However, Microsoft had its own XML-style graphics languages for Internet Explorer, &lt;span style="font-style: italic; color: rgb(255, 0, 0);"&gt;Vector Markup Language, VML&lt;/span&gt;, followed by its &lt;span style="font-style: italic; color: rgb(255, 0, 0);"&gt;DirectAnimation&lt;/span&gt; tools.

The XML-based &lt;span style="font-style: italic; color: rgb(255, 0, 0);"&gt;Simple Object Access Protocol, SOAP&lt;/span&gt;, was created to make communication between Web applications easier. SOAP defines a widely accepted lightweight XML protocol that lets you send messages between Web applications, no matter what language such Web applications might have been written in.&lt;/blockquote&gt;&lt;span style="font-weight: bold;"&gt;Using XML: Mircosoft's .NET&lt;/span&gt;
Components in&lt;span style="font-style: italic; color: rgb(255, 0, 0);"&gt; .NET&lt;/span&gt; use XML to communicate, often even when they're on the same machine. You don't usually see the XML in .NET, but each time you communicate between components, it is there.
&lt;span style="font-weight: bold;"&gt;Online XML Resources&lt;/span&gt;
&lt;a href="http://www.w3c.org/xml"&gt;W3C's main XML site.&lt;/a&gt;
&lt;a href="http://www.w3.org/xml/activity"&gt;The W3C activity page listing what's going on with XML these days.&lt;/a&gt;
&lt;a href="http://www.w3.org/xml/1999/xml-in-10-points"&gt;Features a mini-tutorial called "XML in 10 Points". &lt;/a&gt;
&lt;a href="http://www.w3.org/style/css/"&gt;The W3C outline and overview of CSS programming.&lt;/a&gt;
&lt;a href="http://www.xml.com/"&gt;Packed with XML resources, discussions, and schedules of public events. &lt;/a&gt;
&lt;a href="http://www.w3schools.com/xml/default.asp"&gt;A free XML tutorial.&lt;/a&gt;
&lt;a href="http://msdn.microsoft.com/xml/turorial/default.asp"&gt;Microsoft's XML tutorial in ten lessons.&lt;/a&gt;
&lt;a href="http://xmlfiles.com/xml"&gt;An XML tutorial from XMLFiles.com&lt;/a&gt;
&lt;a href="http://www.webdeveloper.com/html/html_xml_1.html"&gt;Webdeveloper.com's XML tutorial&lt;/a&gt;
&lt;a href="http://www.ucc.ie/xml"&gt;A comprehensive FAQ list about XML. &lt;/a&gt;
&lt;a href="http://www.xfront.com/"&gt;An XML schema tutorial by Roger L. Costello.&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/10261622-111818241022577658?l=cherub325.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cherub325.blogspot.com/feeds/111818241022577658/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=10261622&amp;postID=111818241022577658' title='8 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10261622/posts/default/111818241022577658'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10261622/posts/default/111818241022577658'/><link rel='alternate' type='text/html' href='http://cherub325.blogspot.com/2005/06/teach-yourself-xml-in-21-days-day-1.html' title='Teach Yourself XML in 21 days, Day 1'/><author><name>CHERUB</name><uri>http://www.blogger.com/profile/05541000949655411328</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='14' height='32' src='http://static.flickr.com/29/61835177_20e0034f42_t.jpg'/></author><thr:total>8</thr:total></entry><entry><id>tag:blogger.com,1999:blog-10261622.post-111814535445641024</id><published>2005-06-07T12:50:00.000+01:00</published><updated>2005-06-07T12:55:54.460+01:00</updated><title type='text'>Service targeting to China / Chinese market</title><content type='html'>I heard the Chinese version of Engadget firstly from &lt;a href="http://www.azuremedia.net/tech/history/blog/001145.html"&gt;Jan's Tech Bolg. &lt;/a&gt;
Later, I read the following comment from &lt;a href="http://www.blogherald.com/2005/06/07/calacanis-targets-chinese-market-with-engadget-chinese/"&gt;The Blog Herald&lt;/a&gt;:
&lt;blockquote&gt;He states in his post that the new site will lose money but is an interesting experiment in launching into non-English speaking markets. Personally, I think he is either fibbing, or reading the marketplace wrongly. Firstly, Jason Calacanis doesn’t enter marketplaces he doesn’t think he can’t make money from, so in this regard, the new site might be a longer term investment, but it will eventually be successful and make money; secondly he talks only of the Chinese mainland market but conveniently ignores the massive market in Chinese language services through out the world. Even here in Australia there are numerous Chinese language local newspapers and services catering to the local Chinese community: even Telstra publishes a copy of the Yellow Pages in Sydney in Chinese. The same goes throughout the world, large Chinese speaking populations in Canada, the West Coast of the United States, even New Zealand: and guess what, demographically they are more likely to be well off, educated and computer users, and therefore potential markets for the Chinese language version of Engadget. A blog just for China? we don’t think so.&lt;/blockquote&gt;I'd like to see the trend of regarding China / Chinese market more and more.

&lt;a href="http://www.azuremedia.net/tech/history/blog/001145.html"&gt;&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/10261622-111814535445641024?l=cherub325.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cherub325.blogspot.com/feeds/111814535445641024/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=10261622&amp;postID=111814535445641024' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10261622/posts/default/111814535445641024'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10261622/posts/default/111814535445641024'/><link rel='alternate' type='text/html' href='http://cherub325.blogspot.com/2005/06/service-targeting-to-china-chinese.html' title='Service targeting to China / Chinese market'/><author><name>CHERUB</name><uri>http://www.blogger.com/profile/05541000949655411328</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='14' height='32' src='http://static.flickr.com/29/61835177_20e0034f42_t.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-10261622.post-111802093934908598</id><published>2005-06-06T01:09:00.000+01:00</published><updated>2005-06-07T00:44:06.016+01:00</updated><title type='text'>Notes of Effective C++ 2nd Edtition (II)</title><content type='html'>Item 7: &lt;span style="font-weight: bold;"&gt;Be prepared for out-of-memory conditions&lt;/span&gt;
Deep in your heart of hearts, you know that handling out-of-memory exceptions is the only truly moral course of action.
A strategy relies on the convention that when &lt;span style="font-style: italic; color: rgb(255, 0, 0);"&gt;operator new&lt;/span&gt; cannot satisfy a request, it calls a client-specifiable error-handling function - ofen called a &lt;span style="color: rgb(51, 102, 255);"&gt;new-handler&lt;/span&gt; - before it throws an exception.

So, the solution is:
in the header &lt;span style="color: rgb(255, 0, 0);"&gt;&amp;lt;new&gt;&lt;/span&gt;;
&lt;div style="text-align: left;"&gt;&lt;span style="color: rgb(51, 102, 255);"&gt;&lt;/span&gt;&lt;blockquote&gt;&lt;span style="color: rgb(51, 102, 255);"&gt;typedef void &lt;/span&gt;(*new_handler) ();
new_handler set_new_handler(new_handler p) &lt;span style="color: rgb(51, 102, 255);"&gt;throw&lt;/span&gt;();
&lt;/blockquote&gt;&lt;/div&gt; &lt;span style="color: rgb(255, 0, 0);"&gt;new_handler&lt;/span&gt; is a typedef for a pointer to a function that takes and returns nothing;
&lt;span style="color: rgb(255, 0, 0);"&gt;set_new_handler&lt;/span&gt; is a function that takes and returns a &lt;span style="color: rgb(255, 0, 0);"&gt;new_handler&lt;/span&gt;; &lt;span style="color: rgb(255, 0, 0);"&gt;set_new_handler&lt;/span&gt;'s parameter is a pointer ot the function &lt;span style="color: rgb(255, 0, 0);"&gt;operator new&lt;/span&gt; should call if it can't allocate the requested memory. The return value of &lt;span style="color: rgb(255, 0, 0);"&gt;set_new_handler&lt;/span&gt; is a pointer to the function in effect for that purpose before&lt;span style="color: rgb(255, 0, 0);"&gt; set_new_handler&lt;/span&gt; was called.
The usage of &lt;span style="color: rgb(255, 0, 0);"&gt;set_new_handler&lt;/span&gt; like the following:
&lt;span style="color: rgb(0, 153, 0);"&gt;&lt;/span&gt;&lt;blockquote&gt;&lt;span style="color: rgb(0, 153, 0);"&gt;    // function to call if operator new can't allocate enough memory&lt;/span&gt;
&lt;span style="color: rgb(51, 102, 255);"&gt;void &lt;/span&gt;noMoreMemory()
{
 &lt;span style="color: rgb(51, 102, 255);"&gt;cerr &lt;/span&gt;&lt;&lt; "Unable to satisfy request for meomry\n";         &lt;span style="color: rgb(51, 102, 255);"&gt;abort&lt;/span&gt;();
}
&lt;span style="color: rgb(51, 102, 255);"&gt;int main&lt;/span&gt;()
{
 set_new_handler(noMoreMemory);
 &lt;span style="color: rgb(51, 102, 255);"&gt;int &lt;/span&gt;*pBigDataArray = &lt;span style="color: rgb(0, 204, 204);"&gt;&lt;span style="color: rgb(51, 102, 255);"&gt;new&lt;/span&gt; &lt;/span&gt;&lt;span style="color: rgb(51, 102, 255);"&gt;int&lt;/span&gt;[100000000];
 ...
}&lt;/blockquote&gt;
A well-designed new_handler funciton must do one of the following:
&lt;span style="font-weight: bold;"&gt;&lt;/span&gt;&lt;blockquote&gt;&lt;span style="font-weight: bold;"&gt;Make more memory available;&lt;/span&gt;
&lt;span style="font-weight: bold;"&gt;Install a different new_handler;&lt;/span&gt;
&lt;span style="font-weight: bold;"&gt;Deinstall the new_handler;&lt;/span&gt;
&lt;span style="font-weight: bold;"&gt;Throw an exception &lt;/span&gt;of type &lt;span style="color: rgb(255, 0, 0);"&gt;std::bad_alloc&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;;&lt;/span&gt;
&lt;span style="font-weight: bold;"&gt;Not return.
&lt;blockquote&gt;&lt;/blockquote&gt;&lt;blockquote&gt;&lt;/blockquote&gt;&lt;/span&gt;&lt;/blockquote&gt;&lt;span style="font-weight: bold;"&gt;&lt;/span&gt;
A mixin-style base class is useful by combination of both inheritance and templates to create reusable codes.

More comments:
1. There is a version of &lt;span style="color: rgb(255, 0, 0);"&gt;operator new&lt;/span&gt; continues offer traditional (Until 1993) failur-yields-0 behavior. This form is called "&lt;span style="color: rgb(255, 0, 0);"&gt;nothrow&lt;/span&gt;", which is defiend in the standard header &lt;span style="color: rgb(255, 0, 0);"&gt;&amp;lt;new&amp;gt;&lt;/span&gt;. However, to handle memory allocation failures, the easiest way is to take advantage of &lt;span style="color: rgb(255, 0, 0);"&gt;set_new_handler&lt;/span&gt;, because it works with both forms.
e.g.
&lt;blockquote&gt;&lt;span style="color: rgb(51, 102, 255);"&gt;class &lt;/span&gt;Widget { ... }
Widget *pw1 = &lt;span style="color: rgb(51, 102, 255);"&gt;new &lt;/span&gt;Widget;     &lt;span style="color: rgb(0, 153, 0);"&gt;// throws std::bad_alloc if allocation fails&lt;/span&gt;
Widget *pw1 = &lt;span style="color: rgb(51, 102, 255);"&gt;new &lt;/span&gt;(&lt;span style="color: rgb(51, 102, 255);"&gt;nothrow&lt;/span&gt;) Widget;   &lt;span style="color: rgb(0, 153, 0);"&gt;  // return 0 if allocation fails&lt;/span&gt;&lt;/blockquote&gt;
2. It is a lot more attactive than wrapping every use of &lt;span style="color: rgb(255, 0, 0);"&gt;new &lt;/span&gt;inside a &lt;span style="color: rgb(255, 0, 0);"&gt;try &lt;/span&gt;block.

Item 8: &lt;span style="font-weight: bold;"&gt;Adhere to convention when writing &lt;span style="font-style: italic; color: rgb(255, 0, 0);"&gt;operator new&lt;/span&gt; and &lt;span style="color: rgb(255, 0, 0); font-style: italic;"&gt;operator delete&lt;/span&gt;.&lt;/span&gt;
(coming...)
It's not quite that simple, however, because &lt;span style="color: rgb(255, 0, 0);"&gt;operator new&lt;/span&gt; actually tries to allocate memory more than once, calling the error-handling function after each failure, the assumption being that the error-handling function might be able to do somthing to free up some memory. Only when the pointer to the error-handling function is null does &lt;span style="color: rgb(255, 0, 0);"&gt;operator new&lt;/span&gt; throw an exception.
In addtion, the C++ standard requires that&lt;span style="color: rgb(255, 0, 0);"&gt; operator new&lt;/span&gt; return a legitimate pointer even when 0 bytes are requested.
pseudocode for a non-member operator new looks like this:
&lt;blockquote&gt;&lt;span style="color: rgb(51, 102, 255);"&gt;void&lt;/span&gt;* operator &lt;span style="color: rgb(51, 102, 255);"&gt;new&lt;/span&gt;(size_t size)        &lt;span style="color: rgb(51, 204, 0);"&gt;// your operator new might take additional&lt;/span&gt; //params
{
   if (size = 0) {
           size = 1;
   }
   while (&lt;span style="color: rgb(51, 102, 255);"&gt;true&lt;/span&gt;) {
       &lt;span style="font-style: italic;"&gt;attemp to allocate size bytes;&lt;/span&gt;
       if (the allocation was successful)
           return (a pointer to the memory);
 &lt;span style="color: rgb(51, 204, 0);"&gt;// allocation was unsucessful; find out what the current error-handling function is&lt;/span&gt;
new_handler globalHandler = set_new_handler(0);
set_new_handler(globalHandler);
if (globalHandler) (*globalHandler) ();
else &lt;span style="color: rgb(51, 102, 255);"&gt;throw &lt;/span&gt;std::bad_alloc();
}
}&lt;/blockquote&gt;Item 7 remarks that &lt;span style="color: rgb(255, 0, 0);"&gt;operator new&lt;/span&gt; contains an infinite loop, and the code above shows that loop explicitly - &lt;span style="color: rgb(255, 0, 0);"&gt;while (true)&lt;/span&gt; is about as infinite as it gets. The only way out of the loop is for memory to be successfully allocated or for the new-handling function to do one of the things described in Item 7: make more memory available, install a different new-handler, deinstall the new-handler, throw an exception of or derived from &lt;span style="color: rgb(255, 0, 0);"&gt;std::bad_alloc&lt;/span&gt;, or fail to return. It should now be clear why the new-handler must do one of those things. If it doesn't, the loop inside &lt;span style="color: rgb(255, 0, 0);"&gt;operator new&lt;/span&gt; will never teminate.
Given an &lt;span style="color: rgb(255, 0, 0);"&gt;operator new&lt;/span&gt; for a class X, the behavior of that function is almost always carefully tuned for objects of size &lt;span style="color: rgb(255, 0, 0);"&gt;sizeof(X) &lt;/span&gt;- nothing larger and nothing smaller.
The C++ standard works in mysterious ways, and one of whose ways is to decree that all freestanding classes have nonzero size. By definition, &lt;span style="color: rgb(255, 0, 0);"&gt;sizeof(Base)&lt;/span&gt; can never be zero (even if it has no members).
The conventions for &lt;span style="color: rgb(255, 0, 0);"&gt;operator new&lt;/span&gt; and &lt;span style="color: rgb(255, 0, 0);"&gt;operator delete&lt;/span&gt; (and their array counterparts) are not particularly onerous, but it is important that you obey them. If your allocation routines support new-handler functions and correctly deal with zero-sized requests, you're all but finished, and if your deallocation routines cope with null pointers, there's little more to do. Add support for inheritance in member versions of the functions, and &lt;span style="font-style: italic;"&gt;presto&lt;/span&gt;! - you're done.

Item 9: &lt;span style="font-weight: bold;"&gt;Avoid hiding the "normal" form of &lt;span style="font-style: italic; color: rgb(255, 0, 0);"&gt;new&lt;/span&gt;.&lt;/span&gt;

Item 10: &lt;span style="font-weight: bold;"&gt;Write &lt;span style="font-style: italic; color: rgb(255, 0, 0);"&gt;operator delete&lt;/span&gt; if you write &lt;span style="color: rgb(255, 0, 0); font-style: italic;"&gt;operator new&lt;/span&gt;.
&lt;/span&gt;A common way for &lt;span style="color: rgb(255, 0, 0);"&gt;operator new&lt;/span&gt; to tell &lt;span style="color: rgb(255, 0, 0);"&gt;operator delete&lt;/span&gt; how much memory it allocated is by prepending to the memory it returns some addtional data that specifies the size of the allocated block.
For small objects, this additional book-keeping data can more than double the amount of memory needed for each dynamically allocated object (especially if the class containes no virtual functions).
It is easy to be fast when you don't have to be flexible. So one way to implement your class-specific &lt;span style="color: rgb(255, 0, 0);"&gt;operator new&lt;/span&gt; is to ask the default &lt;span style="color: rgb(255, 0, 0);"&gt;operator new&lt;/span&gt; for big blocks of raw memory, each block of sufficient size to hold a large number of class objects. The memory chunks for objects, which will be organized in to a linked &lt;span style="color: rgb(255, 0, 0);"&gt;list&lt;/span&gt;, will be taken from these big blocks.
The problem is that &lt;span style="color: rgb(255, 0, 0);"&gt;operator new&lt;/span&gt; (the one defined in class) returns a pointer to memory &lt;span style="font-style: italic;"&gt;without any header information&lt;/span&gt;, but&lt;span style="color: rgb(255, 0, 0);"&gt; operator delete&lt;/span&gt;(the default, global one) assumes that the memory it is passed &lt;span style="font-style: italic;"&gt;does&lt;/span&gt; contain header information! Surely this is a recipe for disaster.
The general rule:&lt;span style="color: rgb(255, 0, 0);"&gt; operator new&lt;/span&gt; and &lt;span style="color: rgb(255, 0, 0);"&gt;operator delete&lt;/span&gt; must be written in concert so that they share the same assumptions. If you're going to roll your own memory allocation routine, be sure to roll one for deallocation, too.
&lt;blockquote&gt;// operator delete is passed a memory chunk, which,
// if it's the right size, is just added to the front of
// the list of free chunks&lt;/blockquote&gt;Be aware of any semantic mismatch between &lt;span style="color: rgb(255, 0, 0);"&gt;new &lt;/span&gt;and &lt;span style="color: rgb(255, 0, 0);"&gt;delete&lt;/span&gt;.
And note that if you omit virtual destructors in base classes, &lt;span style="color: rgb(255, 0, 0);"&gt;operator delete&lt;/span&gt; functions may not work correctly.
&lt;span style="font-weight: bold;"&gt;&lt;/span&gt;&lt;blockquote&gt;A &lt;span style="color: rgb(255, 0, 0);"&gt;memory leak&lt;/span&gt; arises when memory is allocated, then all pointers to that memory are lost. Absent garbage collection or some other extralinguistic mechanism, such memory cannot be reclaimed.&lt;/blockquote&gt;Nevertheless, the blocks of memory returned by &lt;span style="color: rgb(255, 0, 0);"&gt;::operator new&lt;/span&gt; are never released by &lt;span style="color: rgb(255, 0, 0);"&gt;::operator delelte&lt;/span&gt;, and there has to be some name for that. There is. You've created a &lt;span style="color: rgb(255, 0, 0);"&gt;memory pool&lt;/span&gt;. But there is an important difference between a &lt;span style="color: rgb(255, 0, 0);"&gt;memory leak&lt;/span&gt; and a &lt;span style="color: rgb(255, 0, 0);"&gt;memory pool&lt;/span&gt;. A &lt;span style="color: rgb(255, 0, 0);"&gt;memory leak&lt;/span&gt; may grow indefinitely, even if clients are well-behanved, but a &lt;span style="color: rgb(255, 0, 0);"&gt;memory poo&lt;/span&gt;l never grows larger than the maximum amount of memory requested by its clients.
It's interesting to see how &lt;span style="color: rgb(51, 102, 255);"&gt;custom memory management routines&lt;/span&gt; can improve program performance, and it's worthwhile to see how such routines can &lt;span style="color: rgb(51, 102, 255);"&gt;be encapsulated&lt;/span&gt; inside a class.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/10261622-111802093934908598?l=cherub325.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cherub325.blogspot.com/feeds/111802093934908598/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=10261622&amp;postID=111802093934908598' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10261622/posts/default/111802093934908598'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10261622/posts/default/111802093934908598'/><link rel='alternate' type='text/html' href='http://cherub325.blogspot.com/2005/06/notes-of-effective-c-2nd-edtition-ii.html' title='Notes of Effective C++ 2nd Edtition (II)'/><author><name>CHERUB</name><uri>http://www.blogger.com/profile/05541000949655411328</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='14' height='32' src='http://static.flickr.com/29/61835177_20e0034f42_t.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-10261622.post-111780564240126262</id><published>2005-06-03T14:30:00.000+01:00</published><updated>2005-06-03T15:32:40.706+01:00</updated><title type='text'>Notes of Effective C++ 2nd Edtition (I)</title><content type='html'>Item 1: &lt;span style="font-weight: bold;"&gt;Prefer &lt;span style="font-style: italic; color: rgb(255, 0, 0);"&gt;const &lt;/span&gt;and &lt;span style="font-style: italic; color: rgb(255, 0, 0);"&gt;inline &lt;/span&gt;to &lt;span style="font-style: italic; color: rgb(255, 0, 0);"&gt;#define
&lt;/span&gt;&lt;/span&gt;In particular case, &lt;span style="color: rgb(255, 0, 0);"&gt;inline &lt;/span&gt;can not fully instead of &lt;span style="color: rgb(255, 0, 0);"&gt;#define &lt;/span&gt;conveniently.
e.g.
&lt;span style="color: rgb(51, 102, 255);"&gt;#define&lt;/span&gt; FIT(i) gsl_vector_get(s-&gt;x, i);
I met some problem in revising the above macro with &lt;span style="color: rgb(255, 0, 0);"&gt;inline&lt;/span&gt;:
&lt;span style="color: rgb(51, 102, 255);"&gt;template &lt;/span&gt;&lt;&lt;span style="color: rgb(51, 102, 255);"&gt;class &lt;/span&gt;T&gt;
&lt;span style="color: rgb(51, 102, 255);"&gt;inline &lt;/span&gt;T FIT(T i) { &lt;span style="color: rgb(51, 102, 255);"&gt;return &lt;/span&gt;gsl_vector_get(s-&gt;x, i);}

Item 2: &lt;span style="font-weight: bold;"&gt;Prefer&lt;span style="font-style: italic; color: rgb(255, 0, 0);"&gt;&amp;lt;iostream&amp;gt;&lt;/span&gt; to &lt;span style="font-style: italic; color: rgb(255, 0, 0);"&gt;&amp;lt;stdio.h&amp;gt;&lt;/span&gt;&lt;/span&gt;
If you &lt;span style="color: rgb(255, 0, 0);"&gt;&lt;span style="color: rgb(51, 102, 255);"&gt;#include&lt;/span&gt; &amp;lt;iostream&amp;gt;&lt;/span&gt;, you get the elements of the iostream library ensconced within the namespace &lt;span style="color: rgb(255, 0, 0);"&gt;std&lt;/span&gt;,
but if you &lt;span style="color: rgb(255, 0, 0);"&gt;&lt;span style="color: rgb(51, 102, 255);"&gt;#include &lt;/span&gt;&amp;lt;iostream.h&amp;gt;&lt;/span&gt;, you get those same elements at global scope.
Getting them at global scope can lead to name conflicts.

Item 3: &lt;span style="font-weight: bold;"&gt;Prefer &lt;span style="font-style: italic; color: rgb(255, 0, 0);"&gt;new&lt;/span&gt; and &lt;span style="color: rgb(255, 0, 0); font-style: italic;"&gt;delete&lt;/span&gt; to &lt;span style="font-style: italic; color: rgb(255, 0, 0);"&gt;malloc&lt;/span&gt; and &lt;span style="font-style: italic; color: rgb(255, 0, 0);"&gt;free&lt;/span&gt;&lt;/span&gt;
Given that &lt;span style="color: rgb(255, 0, 0);"&gt;malloc &lt;/span&gt;and &lt;span style="color: rgb(255, 0, 0);"&gt;free &lt;/span&gt;are ignorant of constructors and destructors and that mixing &lt;span style="color: rgb(255, 0, 0);"&gt;malloc&lt;/span&gt;/&lt;span style="color: rgb(255, 0, 0);"&gt;free &lt;/span&gt;with &lt;span style="color: rgb(255, 0, 0);"&gt;new&lt;/span&gt;/&lt;span style="color: rgb(255, 0, 0);"&gt;delete &lt;/span&gt;can be more volatile than a fraternity rush party, you're best off sticking to an exclusive diet of &lt;span style="color: rgb(255, 0, 0);"&gt;new&lt;/span&gt;s and &lt;span style="color: rgb(255, 0, 0);"&gt;delete&lt;/span&gt;s whenever you can.

Item 4: &lt;span style="font-weight: bold;"&gt;Prefer the same from in corresponding uses of &lt;span style="font-style: italic; color: rgb(255, 0, 0);"&gt;new &lt;/span&gt;and &lt;span style="font-style: italic; color: rgb(255, 0, 0);"&gt;delete&lt;/span&gt;&lt;/span&gt;
When you use &lt;span style="color: rgb(255, 0, 0);"&gt;new&lt;/span&gt;, two things happen.
1. memory is allocated via &lt;span style="color: rgb(51, 102, 255);"&gt;operator new&lt;/span&gt;.
2. one or more constructors are called for that memory.
When you use &lt;span style="color: rgb(255, 0, 0);"&gt;delete&lt;/span&gt;, two other things happen.
1. one or more destructors are called for the memory.
2. memory is deallocated via &lt;span style="color: rgb(51, 102, 255);"&gt;operator delte&lt;/span&gt;.
SO
If you use &lt;span style="color: rgb(51, 102, 255);"&gt;[ ]&lt;/span&gt; when you call &lt;span style="color: rgb(255, 0, 0);"&gt;new&lt;/span&gt;, you must use &lt;span style="color: rgb(51, 102, 255);"&gt;[ ]&lt;/span&gt; when you call &lt;span style="color: rgb(255, 0, 0);"&gt;delete&lt;/span&gt;.
If you don't use &lt;span style="color: rgb(51, 102, 255);"&gt;[ ]&lt;/span&gt; when you call &lt;span style="color: rgb(255, 0, 0);"&gt;new&lt;/span&gt;, don't use &lt;span style="color: rgb(51, 102, 255);"&gt;[ ]&lt;/span&gt; when you call &lt;span style="color: rgb(255, 0, 0);"&gt;delete&lt;/span&gt;.
e.g.
string *stringPtr1 = &lt;span style="color: rgb(51, 102, 255);"&gt;new &lt;/span&gt;string;
string *stringPtr2 = &lt;span style="color: rgb(51, 102, 255);"&gt;new &lt;/span&gt;string [100];
...
&lt;span style="color: rgb(51, 102, 255);"&gt;delete &lt;/span&gt;stringPtr1;
&lt;span style="color: rgb(51, 102, 255);"&gt;delete &lt;/span&gt;[ ] stringPtr2;

Try to avoid the confustion intruduced by &lt;span style="color: rgb(255, 0, 0);"&gt;typedef &lt;/span&gt;by using of STL &lt;span style="color: rgb(255, 0, 0);"&gt;string &lt;/span&gt;and &lt;span style="color: rgb(255, 0, 0);"&gt;vector&lt;/span&gt;.

Item 6: &lt;span style="font-weight: bold;"&gt;Use &lt;span style="font-style: italic; color: rgb(255, 0, 0);"&gt;delte &lt;/span&gt;on pointer members in destructors&lt;/span&gt;
Adding a pointer member in a class always requries each of the following:
&lt;span style="font-weight: bold;"&gt;1. Initializaiton of the pointer &lt;span style="color: rgb(255, 0, 0);"&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;in&lt;/span&gt; each of the constructors&lt;/span&gt;. If no memory is to be allocated to the pointer in a particular constructor, the pointer should be initialized to 0 (i.e., the NULL pointer).&lt;/span&gt;
 &lt;span style="font-weight: bold;"&gt;2. Deletion of the existing memory and assignment of new memory in the &lt;span style="color: rgb(255, 0, 0);"&gt;assignment operator&lt;/span&gt;.&lt;/span&gt;
 &lt;span style="font-weight: bold;"&gt;3. Deletion of the pointer in the &lt;span style="color: rgb(255, 0, 0);"&gt;destructor&lt;/span&gt;. &lt;/span&gt;
Note that deleting a null pointer is always safe.
Your class destructor usually shouldn't be using &lt;span style="color: rgb(255, 0, 0);"&gt;delete &lt;/span&gt;unless your class memebers were the ones who used &lt;span style="color: rgb(255, 0, 0);"&gt;new &lt;/span&gt;in the first place.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/10261622-111780564240126262?l=cherub325.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cherub325.blogspot.com/feeds/111780564240126262/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=10261622&amp;postID=111780564240126262' title='6 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10261622/posts/default/111780564240126262'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10261622/posts/default/111780564240126262'/><link rel='alternate' type='text/html' href='http://cherub325.blogspot.com/2005/06/notes-of-effective-c-2nd-edtition-i.html' title='Notes of Effective C++ 2nd Edtition (I)'/><author><name>CHERUB</name><uri>http://www.blogger.com/profile/05541000949655411328</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='14' height='32' src='http://static.flickr.com/29/61835177_20e0034f42_t.jpg'/></author><thr:total>6</thr:total></entry><entry><id>tag:blogger.com,1999:blog-10261622.post-111775198743837772</id><published>2005-06-02T23:39:00.000+01:00</published><updated>2005-06-02T23:42:10.123+01:00</updated><title type='text'>Does Future Belong to China</title><content type='html'>&lt;span class="dropcap"&gt;H&lt;/span&gt;ave a look at this&lt;a href="http://www.msnbc.msn.com/id/7693580/site/newsweek/"&gt; article&lt;/a&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/10261622-111775198743837772?l=cherub325.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cherub325.blogspot.com/feeds/111775198743837772/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=10261622&amp;postID=111775198743837772' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10261622/posts/default/111775198743837772'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10261622/posts/default/111775198743837772'/><link rel='alternate' type='text/html' href='http://cherub325.blogspot.com/2005/06/does-future-belong-to-china.html' title='Does Future Belong to China'/><author><name>CHERUB</name><uri>http://www.blogger.com/profile/05541000949655411328</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='14' height='32' src='http://static.flickr.com/29/61835177_20e0034f42_t.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-10261622.post-111772325761169588</id><published>2005-06-02T15:37:00.000+01:00</published><updated>2005-06-02T15:46:09.793+01:00</updated><title type='text'>Test of Drop and Blog Design using CSS</title><content type='html'>&lt;div style="width:120px;padding:2px;border:medium double; background:#FF3300;text-align:center;"&gt;
Blog Trashed by  &lt;a href="http://www.mandarindesign.com/blogger.html"&gt;Mandarin&lt;/a&gt;
&lt;/div&gt; 
&lt;img class="thinborder" title="Bead art by Cornelia Savory" src="http://www.mandarindesign.com/images/jewels.jpg" alt="Bead art by Cornelia Savory" height="85" width="110" /&gt; &lt;span class="dropcap"&gt;T&lt;/span&gt;here was a post I saw recently that had near perfect balance. It was not in English so I was looking more at the layout than reading. What I noticed was the fine balance of the three simple classes to coordinate the image with the dropcap and the pullquote.&lt;span class="pullout"&gt; ...you don't have to know CSS to use this one  &lt;/span&gt;  It was very nicely done. It looked something like this post.
We are using shorthand CSS here. Using shorthand notation can help keep the size, or weight, of the page to a minimum if the style sheet is growing. For readability we tend to leave our CSS style long and the style sheet is growing too fast. Either way works. And, no you don't have to know CSS to use this one.
It's served copy-and-paste style and with the external CSS.
&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/10261622-111772325761169588?l=cherub325.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cherub325.blogspot.com/feeds/111772325761169588/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=10261622&amp;postID=111772325761169588' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10261622/posts/default/111772325761169588'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10261622/posts/default/111772325761169588'/><link rel='alternate' type='text/html' href='http://cherub325.blogspot.com/2005/06/test-of-drop-and-blog-design-using-css.html' title='Test of Drop and Blog Design using CSS'/><author><name>CHERUB</name><uri>http://www.blogger.com/profile/05541000949655411328</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='14' height='32' src='http://static.flickr.com/29/61835177_20e0034f42_t.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-10261622.post-111770830525123811</id><published>2005-06-02T10:59:00.000+01:00</published><updated>2005-06-02T11:31:45.256+01:00</updated><title type='text'>Blogger Weapons I : BSP</title><content type='html'>&lt;span style="font-weight: bold;"&gt;BSP&lt;/span&gt; is short fro Blog Sevice Provider. BSP provides a novel blogger blank paper and well-aided blogging environment. Moreover, each blog has a unique domain name to be accessed by public, meanwhile, the control pane or the blog edittting interface is different with that blog domain name. e.g. &lt;a href="http://www.blogger.com"&gt;Blogger.com&lt;/a&gt; is one of the most famouse BSP abroad, which is sold to &lt;a href="http://www.google.com"&gt;Google&lt;/a&gt; recently. It provides free blog service. I registed an account and established 2 blogs of my own. One is &lt;a href="http://cherub325.blogspot.com"&gt;Cherub in Sheffield&lt;/a&gt;, the other is &lt;a href="http://cherub325movie.blogspot.com"&gt;Cherub in Movie&lt;/a&gt;. By dashboard, it is easy to choose one of my blog to do modifications, such as adding new post, changing template. To some extent, template is where to depict your own, as well as to utilize the "Blogger Weapons". Some BSP does not support user to modify the templates, such as &lt;span style="font-weight: bold;"&gt;MSN Space&lt;/span&gt;. Though it has provided rich options of themes, it is not suitable for bloggers who are going to pursuing higher lever application and progression.

It is easy to find a BSP to start one's blogging life. But it is difficult to make decision to keep in one BSP. Blog is a creative work for anyone. People want their blogs to be read. Similar to writing diary, no one is gonna write his feeling in 5 or even more notebooks seperatedly during the same period. A short while after one starts blogging, he will consider how to publish his blog, how to improve his blog. So the flexibility of a BSP is the second to be reviewed. Actually, it is also an object of BSPs to try to save the user's &lt;span style="font-style: italic;"&gt;honesty&lt;/span&gt;.

Obviously, it is up to one himself. Since there is no problem in finding a blogging service (in deed, nearly every public web service provides blog nowdays), I won't do more ads here. One thing to mension that, if the following chapters of this topic is interesting to you, please make sure you could modify your blog beyond posts themselves. Template editable is the least required.

By accepting the service from BSP, you are blogger now.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/10261622-111770830525123811?l=cherub325.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cherub325.blogspot.com/feeds/111770830525123811/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=10261622&amp;postID=111770830525123811' title='13 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10261622/posts/default/111770830525123811'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10261622/posts/default/111770830525123811'/><link rel='alternate' type='text/html' href='http://cherub325.blogspot.com/2005/06/blogger-weapons-i-bsp.html' title='Blogger Weapons I : BSP'/><author><name>CHERUB</name><uri>http://www.blogger.com/profile/05541000949655411328</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='14' height='32' src='http://static.flickr.com/29/61835177_20e0034f42_t.jpg'/></author><thr:total>13</thr:total></entry><entry><id>tag:blogger.com,1999:blog-10261622.post-111766821684493289</id><published>2005-06-02T00:18:00.000+01:00</published><updated>2005-06-02T00:28:18.883+01:00</updated><title type='text'>GMail SWAP</title><content type='html'>I can not believe that GMail swap is still a hot hit of current internet. As I known, gmail account is much easier to obtained compared with Wallop account. Now, the gmail invitation of one exisited account is up to 50, from 6 at the very beginning. It won't be a problem to leech a gmail account indeed, I suppose.

And, my goodness, gmail account even is being sold on EBay. Perhapys, only the account cherub@gmail.com is the most valueble one. Maybe it is worth $1 for me.

However, I'd like to provide another little gmail swap chances. Leave me a comment, no swap necessary, however, if you like, a postcard is prefered. :-P

Meantime, Wallop invitations are also available, though they are very rare.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/10261622-111766821684493289?l=cherub325.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cherub325.blogspot.com/feeds/111766821684493289/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=10261622&amp;postID=111766821684493289' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10261622/posts/default/111766821684493289'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10261622/posts/default/111766821684493289'/><link rel='alternate' type='text/html' href='http://cherub325.blogspot.com/2005/06/gmail-swap.html' title='GMail SWAP'/><author><name>CHERUB</name><uri>http://www.blogger.com/profile/05541000949655411328</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='14' height='32' src='http://static.flickr.com/29/61835177_20e0034f42_t.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-10261622.post-111720578932535702</id><published>2005-05-27T14:13:00.000+01:00</published><updated>2005-05-27T15:58:02.093+01:00</updated><title type='text'>XFN - Relationship behind the links.</title><content type='html'>&lt;a href="http://gmpg.org/xfn/intro"&gt;A article&lt;/a&gt; clearly introduced an interesting topic: &lt;a href="http://gmpg.org/xfn/"&gt;XFN&lt;/a&gt;, which is short for XHTML Friends Network.
XFN is suitable to mark the blog-roll of your webpage or blogs. Supported by CSS2, each link with different groups of tag, which demostrate the human relationship behind the links, may display variantly in style.
A very simple example is:
&lt;div style="text-align: center;"&gt;&lt;a href="http://josh.example.com/" rel="friend met"&gt;&lt;code class="eg"&gt;&lt;/code&gt;&lt;/a&gt;&lt;a href="http://josh.example.com/"&gt;&lt;code class="eg"&gt;&lt;/code&gt;&lt;/a&gt;&lt;span style="color: rgb(51, 102, 255);"&gt;&amp;lt;a href="http://josh.example.com/"&lt;span style="color: rgb(255, 102, 102);"&gt; &lt;span style="color: rgb(255, 0, 0);"&gt;rel="friend met"&lt;/span&gt;&lt;/span&gt;&gt;Josh&lt;&amp;/a&gt; &lt;/span&gt;
&lt;span style="color: rgb(51, 102, 255);"&gt;&amp;lt;a href="http://kat.example.com/" &lt;span style="color: rgb(255, 0, 0);"&gt;rel="met acquaintance"&lt;/span&gt;&gt;Kat&lt;&amp;/a&gt; &lt;/span&gt;
&lt;span style="color: rgb(51, 102, 255);"&gt;&amp;lt;a href="http://mary.example.com/"&lt;span style="color: rgb(255, 0, 0);"&gt; rel="co-worker friend met"&lt;/span&gt;&gt;Mary&lt;&amp;/a&gt;&lt;/span&gt;
&lt;span style="color: rgb(51, 102, 255);"&gt; &amp;lt;a href="http://nick.example.com/"&gt;Nick&lt;&amp;/a&gt;&lt;/span&gt;
&lt;/div&gt; The attribute &lt;span style="font-weight: bold;"&gt;rel&lt;/span&gt; indicates the relationship between Josh and me. The value of &lt;span style="font-weight: bold;"&gt;rel&lt;/span&gt; can be as rich as your creativity.
If the browser supports the &lt;a href="http://www.w3.org/TR/CSS21/selector.html#attribute-selectors"&gt;CSS2&lt;/a&gt;, adding the following code in style definition, the above links may display different styles according to atrribute &lt;span style="font-weight: bold;"&gt;rel&lt;/span&gt;.
&lt;code class="eg"&gt;&lt;span style="color: rgb(51, 102, 255);"&gt;a[rel~="friend"] {font-weight: bold;}
&lt;/span&gt;
&lt;span style="color: rgb(51, 102, 255);"&gt;a[rel~="co-worker"] {text-decoration: underline;}

&lt;/span&gt;&lt;span style="color: rgb(51, 102, 255);"&gt;a[rel~="acquaintance"] {font-style: italic;}&lt;/span&gt;
&lt;/code&gt;so the above links will look like:&lt;code class="eg"&gt;
&lt;/code&gt; &lt;div style="text-align: center;"&gt;&lt;code class="eg"&gt;&lt;a href="http://test/"&gt;&lt;span style="font-weight: bold;"&gt;Josh&lt;/span&gt;&lt;/a&gt;&lt;/code&gt;
&lt;code class="eg"&gt;&lt;a href="http://test/"&gt;Kat&lt;/a&gt;&lt;/code&gt;
&lt;code class="eg"&gt;&lt;a href="http://test/"&gt;&lt;span style="font-style: italic;"&gt;Mary&lt;/span&gt;&lt;/a&gt;&lt;/code&gt;
&lt;code class="eg"&gt;&lt;/code&gt;&lt;/div&gt; &lt;code class="eg"&gt;&lt;/code&gt;More details and applications of XFN can be found in &lt;a href="http://gmpg.org/xfn/"&gt;http://gmpg.org/xfn/&lt;/a&gt;. See the sidebar of my blog that links to my other blogs look different (color) with the link to Jie's blog. Glad that &lt;a href="http://www.blogger.com/"&gt;Blogger&lt;/a&gt;'s template is editable and flexible to adapt to  these new things. &lt;code class="eg"&gt;&lt;/code&gt;&lt;code class="eg"&gt;&lt;span style="font-weight: bold;"&gt;

&lt;/span&gt;&lt;/code&gt;&lt;a href="http://nick.example.com/"&gt;&lt;/a&gt;
&lt;a href="http://nick.example.com/"&gt;&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/10261622-111720578932535702?l=cherub325.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cherub325.blogspot.com/feeds/111720578932535702/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=10261622&amp;postID=111720578932535702' title='25 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10261622/posts/default/111720578932535702'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10261622/posts/default/111720578932535702'/><link rel='alternate' type='text/html' href='http://cherub325.blogspot.com/2005/05/xfn-relationship-behind-links.html' title='XFN - Relationship behind the links.'/><author><name>CHERUB</name><uri>http://www.blogger.com/profile/05541000949655411328</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='14' height='32' src='http://static.flickr.com/29/61835177_20e0034f42_t.jpg'/></author><thr:total>25</thr:total></entry><entry><id>tag:blogger.com,1999:blog-10261622.post-111714649014201206</id><published>2005-05-26T22:40:00.000+01:00</published><updated>2005-05-27T00:14:24.606+01:00</updated><title type='text'>BackPackIt -&gt; AJAX</title><content type='html'>CheDong's &lt;a href="http://www.chedong.com/blog/archives/000787.html"&gt;BackPackIt试用手记&lt;/a&gt; lead me to &lt;a href="http://www.backpackit.com/"&gt;BackPackIt&lt;/a&gt; to feel what's online interaction experience. The claimed nice user-friend does not impress me. But the fluent web online interaction, such as adding or deleting a checkbox control, highly spur my interest. The technology behind is called &lt;a href="http://en.wikipedia.org/wiki/AJAX"&gt;&lt;span style="font-weight:bold;"&gt;AJAX&lt;/span&gt;&lt;/a&gt;.

I found the definition and explicit introduction of AJAX in &lt;a href="http://en.wikipedia.org/wiki/Main_Page"&gt;Wikipedia&lt;/a&gt;, (it seems that Wiki is another thing links me to explore in). Moreover, another reference attacted my click. &lt;a href="http://www.adaptivepath.com/team/jjg.php"&gt;Jesse James Garrett&lt;/a&gt;'s &lt;span style="font-weight:bold;"&gt;&lt;a href="http://www.adaptivepath.com/publications/essays/archives/000385.php"&gt;Ajax: A New Approach to Web Applications&lt;/a&gt;&lt;/span&gt;. Nothing could be better to write down reading notes as soon as possible. Here I am right on the money. 

&lt;span style="font-weight:bold;"&gt;AJAX&lt;/span&gt; is short for &lt;span style="font-weight:bold;"&gt;Asynchronous JavaScript and XML&lt;/span&gt;. 

AJAX isn't a technology. It's really several technologies, each flourishing in its own right, coming together in powerful new ways. Ajax incorporates:

    * &lt;span style="font-weight:bold;"&gt;standards-based presentation&lt;/span&gt; using &lt;span style="font-weight:bold;"&gt;XHTML&lt;/span&gt; and &lt;span style="font-weight:bold;"&gt;CSS&lt;/span&gt;;
    * dynamic display and interaction using the &lt;span style="font-weight:bold;"&gt;Document Object Model&lt;/span&gt;;
    * data interchange and manipulation using &lt;span style="font-weight:bold;"&gt;XML&lt;/span&gt; and &lt;a href="http://www-106.ibm.com/developerworks/xml/library/x-xslt/?article=xr"&gt;XSLT&lt;/a&gt;;
    * asynchronous data retrieval using &lt;a href="http://www.xml.com/pub/a/2005/02/09/xml-http-request.html"&gt;XMLHttpRequest&lt;/a&gt;;
    * and &lt;span style="font-weight:bold;"&gt;JavaScript&lt;/span&gt; binding everything together.

An Ajax application eliminates the start-stop-start-stop nature of interaction on the Web by introducing an intermediary — an &lt;span style="font-weight:bold;"&gt;Ajax engine&lt;/span&gt; — between the user and the server. 

It is not necessary for user to exchange the whole webpage contents with server at every request step. XML is in charge of demostrating received page contents. Javascript runs as much applications in user peer as possible, unless they require transfering data to and from the server peer. XMLHttpRequest performs asynchronous data transfering with server and Ajax engine. It may mean the asynchronous procedure between transferting data and displaing the content. So, user takes part in the online application instead of traditional waiting. 

Good &lt;span style="font-weight:bold;"&gt;AJAX experiences&lt;/span&gt; can be obtained from &lt;a href="http://www.google.com/webhp?complete=1&amp;hl=en"&gt;Google Suggest&lt;/a&gt;, seeing how it dymanically recoginize your input key words. From &lt;a href="http://maps.google.com/"&gt;Google Map&lt;/a&gt;, you may have a look at how AJAX does well in such a huge online project. 

&lt;span style="font-weight:bold;"&gt;Criticisms&lt;/span&gt; come while thing is well known. However, most of them are advantage in understing a new burn techique or an idea through different aspects. 

The accessibility of Ajax and the browser compatibility limitations. &lt;blockquote&gt;Can Ajax applications be made to work for users who have JavaScript turned off?&lt;/blockquote&gt;
Security considerations with Ajax development. &lt;blockquote&gt;Are Ajax applications easier to develop than traditional web applications?
Compared with FLASH, which tech is more suitable for next generation web application. (See Microsoft's &lt;a href="http://www.mywallop.com"&gt;Wallop&lt;/a&gt;) (If you ask for a Wallop invitation, leave me a message.)&lt;/blockquote&gt;
&lt;span style="font-style:italic;"&gt;The biggest challenges in creating Ajax applications are not technical. The core Ajax technologies are mature, stable, and well understood. Instead, the challenges are for the designers of these applications: to forget what we think we know about the limitations of the Web, and begin to imagine a wider, richer range of possibilities&lt;/span&gt; -- &lt;span style="font-weight:bold;"&gt;Jesse James Garrett&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/10261622-111714649014201206?l=cherub325.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cherub325.blogspot.com/feeds/111714649014201206/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=10261622&amp;postID=111714649014201206' title='5 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10261622/posts/default/111714649014201206'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10261622/posts/default/111714649014201206'/><link rel='alternate' type='text/html' href='http://cherub325.blogspot.com/2005/05/backpackit-ajax.html' title='BackPackIt -&gt; AJAX'/><author><name>CHERUB</name><uri>http://www.blogger.com/profile/05541000949655411328</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='14' height='32' src='http://static.flickr.com/29/61835177_20e0034f42_t.jpg'/></author><thr:total>5</thr:total></entry><entry><id>tag:blogger.com,1999:blog-10261622.post-111706517051571746</id><published>2005-05-26T00:42:00.000+01:00</published><updated>2005-05-26T00:52:50.516+01:00</updated><title type='text'>Farewell, Google Adsense</title><content type='html'>Yesterday, email from Google Adsense manager board stopped the coming PIN code and check. I admitted the fraud clicks that it is my original target to test Googl Adsense to earn extra money. Many trials have been done such as increasing impressions and clicks, actively updating blog's content to change ads, using auto proxy switcher to mimic different IP clicks. The most effective way is the last one. So, it is clear that the traffic is the base point to earn via Google Adsense. I think it is very easy to detect my clicks are fraud that they are times over visits. 
Happy things include checking the balance every day and discovering the ads content changed. However, they are all gone now. 
Nevertheless, it is not depress my interesting in blog. I'd like to stick in my won field to product paragraphs, recording my dymatically varied interests, experiences, and lives. 
Farewell, Googld Adsense. Farewell, extra money.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/10261622-111706517051571746?l=cherub325.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cherub325.blogspot.com/feeds/111706517051571746/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=10261622&amp;postID=111706517051571746' title='9 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10261622/posts/default/111706517051571746'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10261622/posts/default/111706517051571746'/><link rel='alternate' type='text/html' href='http://cherub325.blogspot.com/2005/05/farewell-google-adsense.html' title='Farewell, Google Adsense'/><author><name>CHERUB</name><uri>http://www.blogger.com/profile/05541000949655411328</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='14' height='32' src='http://static.flickr.com/29/61835177_20e0034f42_t.jpg'/></author><thr:total>9</thr:total></entry><entry><id>tag:blogger.com,1999:blog-10261622.post-111668543331014700</id><published>2005-05-21T15:23:00.000+01:00</published><updated>2005-05-21T15:27:11.336+01:00</updated><title type='text'>Six Degrees of Ocean's Eleven</title><content type='html'>While I was writting my movie blog of Ocean's Eleven, I found an interesting key-word, &lt;span style="font-weight:bold;"&gt;SIX DEGREES&lt;/span&gt;, in &lt;a href="http://www.imdb.com"&gt;imdb&lt;/a&gt;. 

&lt;span style="font-style:italic;"&gt;Started from any actor or actress, end in the one stared in Ocean's Eleven&lt;/span&gt;

For instance:

&lt;span style="font-weight:bold;"&gt;Nicolas Cage was in Con Air with
John Cusack who was in Americas Sweethearts with
Julia Roberts who was in Oceans Eleven.&lt;/span&gt;

&lt;a href="http://www.imdb.com/title/tt0240772/board/nest/6795637"&gt;another interesting result:&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/10261622-111668543331014700?l=cherub325.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cherub325.blogspot.com/feeds/111668543331014700/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=10261622&amp;postID=111668543331014700' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10261622/posts/default/111668543331014700'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10261622/posts/default/111668543331014700'/><link rel='alternate' type='text/html' href='http://cherub325.blogspot.com/2005/05/six-degrees-of-oceans-eleven.html' title='Six Degrees of Ocean&apos;s Eleven'/><author><name>CHERUB</name><uri>http://www.blogger.com/profile/05541000949655411328</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='14' height='32' src='http://static.flickr.com/29/61835177_20e0034f42_t.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-10261622.post-111667659844534291</id><published>2005-05-21T12:54:00.000+01:00</published><updated>2005-05-21T12:56:38.450+01:00</updated><title type='text'>Valuable keywords</title><content type='html'>COPY from &lt;a href="http://rumata.blogspot.com/"&gt;rumata's blog&lt;/a&gt;, very interesting. However, I am puzzled how could she find out these high payed key words. :-D

"increase web traffic"
"pay per click affiliate program"
"pay per click uk"
"pay per click"
"pay per click management"
"pay per clicks"
"increase web traffic"
"pay per click bid management"
"increase traffic"
"pay per click ads"
"pay per click advertising"
"web traffic"
"earn money"
"pay per click through"
"search engine registration"
"pay per click program"
"website promotion"
"pay per click optimization"
"web position gold"
"more customers"
"affiliate programs"
"pay per click search"
"search engine submission"
"web site promotion"
"search engine submissions"
"search engines ranking"
"get listed"
affiliate
"search engine ranking"
"high search engine ranking"
"getting listed"
"website ranking"
"pay per click management software"
"domain name hosting"
"domain name"
"domain names"
"buy domain name"
"buying a domain name"
"buying domain name"
"cheap domain name"
"domain name register"
"domain name registration"
"domain name renewal"
"domain name reseller"
"how to register a domain name"
"register a domain name"
"register domain name"
"domain name search"
"buy domain names"
"buying domain names"
"cheap domain names"&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/10261622-111667659844534291?l=cherub325.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cherub325.blogspot.com/feeds/111667659844534291/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=10261622&amp;postID=111667659844534291' title='28 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10261622/posts/default/111667659844534291'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10261622/posts/default/111667659844534291'/><link rel='alternate' type='text/html' href='http://cherub325.blogspot.com/2005/05/valuable-keywords.html' title='Valuable keywords'/><author><name>CHERUB</name><uri>http://www.blogger.com/profile/05541000949655411328</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='14' height='32' src='http://static.flickr.com/29/61835177_20e0034f42_t.jpg'/></author><thr:total>28</thr:total></entry><entry><id>tag:blogger.com,1999:blog-10261622.post-111667374212801724</id><published>2005-05-21T11:33:00.000+01:00</published><updated>2005-05-21T12:09:02.143+01:00</updated><title type='text'>SNS and 6 Degrees of Seperation</title><content type='html'>SNS：Social Network Sofwaret，社会性网络软件，依据六度理论，以认识朋友的朋友为基础，扩展自己的人脉。并且无限扩张自己的人脉，在需要的时候，可以随时获取一点，得到该人脉的帮助。

SNS网站，就是依据六度理论建立的网站，帮你运营朋友圈的朋友。事实上，在过去Yahoo、Google和微软对社会性网络(SNS)都已经投下巨资， Yahoo的社会性网络项目叫&lt;span style="font-weight:bold;"&gt;Yahoo360&lt;/span&gt;，Google的名为&lt;span style="font-weight:bold;"&gt;orkut&lt;/span&gt;，而微软正在试验的社会性网络项目叫&lt;span style="font-weight:bold;"&gt;Wallop&lt;/span&gt;，目前中文的SNS则主要是&lt;span style="font-weight:bold;"&gt;联络家(Linkist.com)&lt;/span&gt;、&lt;span style="font-weight:bold;"&gt;优友地带&lt;/span&gt;等。However, joining these SNS virtual communities requires an invitation from their members. I've faild to find out the invitation for Wallop for several times. I am suprised to hear that the SNS website is established according to 6 degrees of seperation theory. As I known, several kinds of softwares can be regarded as SNS, such as IMs, webmails, and etc. 

&lt;a href="http://www.techiepundit.com/archives/001564.html"&gt;Six Degrees of Seperation&lt;/a&gt;, 六度关系理论：美国著名社会心理学家Stanley Milgram于20世纪60年代最先提出，在人际脉络中，要结识任何一位陌生的朋友，这中间最多只要通过六个朋友就能达到目的。就是说你想认识一个人，托朋友找朋友找认识他的人，之间不会超过六个人. Most recently, about 2003, a new Stanley Milgram's test by internet email revealing that internet, being a new tools binding people all around the world almost without gap, does no help in decreasing the number of degrees of separation between people. I am also interested about the above conclusion. It may not be rigorously proved even by the combination of mathmatical, statistical and social theories. But, it is irony to refer to social theories, since 6 degrees theroy is one of them... 

SNSs only provided a platform or a virtual society to group as much people together as possible, however, it does not guarantee every one in this group knows each other. 
6 degrees theory is used as a kind advertisement for tempting users interest and making SNSs specially valuable compared with traditional connections.

Moreover, the topic may be diverted to the recent hot hit: MSN vs QQ in Chinese IM market. &lt;a href="http://www.donews.net/fanggang/archive/2005/05/19/388605.aspx"&gt;Some said QQ is definately lost to MSN&lt;/a&gt;.&lt;a href="http://www.donews.net/keso/archive/2005/05/21/390447.aspx"&gt; The others said MSN is adpating itself to meet Chinese hobbies&lt;/a&gt;. Keep an eye on it, since it would be very interesting.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/10261622-111667374212801724?l=cherub325.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cherub325.blogspot.com/feeds/111667374212801724/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=10261622&amp;postID=111667374212801724' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10261622/posts/default/111667374212801724'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10261622/posts/default/111667374212801724'/><link rel='alternate' type='text/html' href='http://cherub325.blogspot.com/2005/05/sns-and-6-degrees-of-seperation.html' title='SNS and 6 Degrees of Seperation'/><author><name>CHERUB</name><uri>http://www.blogger.com/profile/05541000949655411328</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='14' height='32' src='http://static.flickr.com/29/61835177_20e0034f42_t.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-10261622.post-111662194753270113</id><published>2005-05-20T21:45:00.000+01:00</published><updated>2005-05-20T21:45:47.536+01:00</updated><title type='text'>Very Interesting weblink-typo</title><content type='html'>&lt;a href="http://www.tabao.com/"&gt;http://www.tabao.com/&lt;/a&gt;!!! :-D&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/10261622-111662194753270113?l=cherub325.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cherub325.blogspot.com/feeds/111662194753270113/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=10261622&amp;postID=111662194753270113' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10261622/posts/default/111662194753270113'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10261622/posts/default/111662194753270113'/><link rel='alternate' type='text/html' href='http://cherub325.blogspot.com/2005/05/very-interesting-weblink-typo.html' title='Very Interesting weblink-typo'/><author><name>CHERUB</name><uri>http://www.blogger.com/profile/05541000949655411328</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='14' height='32' src='http://static.flickr.com/29/61835177_20e0034f42_t.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-10261622.post-111634412244994802</id><published>2005-05-17T16:31:00.000+01:00</published><updated>2005-05-17T16:35:22.453+01:00</updated><title type='text'>Blogger and the traditional media:</title><content type='html'>A recent survey showed that web blog has performed the equal function to the tradional media, such as newspaper, TV, and etc. However, web blog is not going to take place of those traditional ones. Web blog and the traditional media are good complement to each other.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/10261622-111634412244994802?l=cherub325.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cherub325.blogspot.com/feeds/111634412244994802/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=10261622&amp;postID=111634412244994802' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10261622/posts/default/111634412244994802'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10261622/posts/default/111634412244994802'/><link rel='alternate' type='text/html' href='http://cherub325.blogspot.com/2005/05/blogger-and-traditional-media.html' title='Blogger and the traditional media:'/><author><name>CHERUB</name><uri>http://www.blogger.com/profile/05541000949655411328</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='14' height='32' src='http://static.flickr.com/29/61835177_20e0034f42_t.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-10261622.post-111608264056877934</id><published>2005-05-14T15:56:00.000+01:00</published><updated>2005-05-14T15:57:20.570+01:00</updated><title type='text'>blog营销真的开始了？</title><content type='html'>&lt;a href="http://tech.sina.com.cn/i/2005-05-14/1126607461.shtml"&gt;博客营销&lt;/a&gt;

　　理论界对哪种手法算真博客营销，哪种是伪博客营销有些争论。这里不去考虑。从营销角度，商家和消费者之间的一切都是工具。既然视野中多了一样网络行销工具。我们权且把所有利用博客进行的各种产品、品牌、形象等的营销称为博客营销。

　　博客营销模式“集中营”

　　1.在博客网站上做广告。

　　在博客世界，标准的、口号式的广告，就仿佛是鸡尾酒会上的大声叫唤。广告的设计要把博客考虑进去，要让博客成为广告对话的一部分。

　　2.发表专业文章。

　　作为专业文章的主角——产品一定要有一个知识点，用来和公众沟通，并树立权威感。

　　3.打造博客团队。

　　通过公关公司发布博客日记，来影响主流媒体的报道。

　　4.监测博客网站。

　　通过监测博客网站，及时发觉当前谈论最多的公司或时下民众最关注的话题，为潜在的公关危机做好准备。&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/10261622-111608264056877934?l=cherub325.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cherub325.blogspot.com/feeds/111608264056877934/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=10261622&amp;postID=111608264056877934' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10261622/posts/default/111608264056877934'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10261622/posts/default/111608264056877934'/><link rel='alternate' type='text/html' href='http://cherub325.blogspot.com/2005/05/blog.html' title='blog营销真的开始了？'/><author><name>CHERUB</name><uri>http://www.blogger.com/profile/05541000949655411328</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='14' height='32' src='http://static.flickr.com/29/61835177_20e0034f42_t.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-10261622.post-111594004786967818</id><published>2005-05-13T00:17:00.000+01:00</published><updated>2005-05-13T00:35:09.380+01:00</updated><title type='text'>Add-in My Blog</title><content type='html'>"Feed of my blog" by &lt;span style="font-style:italic;"&gt;Feedburner&lt;/span&gt;
"Alter Me funciton" by &lt;span style="font-style:italic;"&gt;MSN Alert&lt;/span&gt;. However, it seems not workable.
"Add feed of my blog into &lt;span style="font-style:italic;"&gt;My MSN&lt;/span&gt;".
"Visit counting and statistic" by &lt;span style="font-style:italic;"&gt;Site Meter&lt;/span&gt;.
"Visual visit counting" by &lt;span style="font-style:italic;"&gt;Bravenet&lt;/span&gt;

More add-in and advanced developing are coming.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/10261622-111594004786967818?l=cherub325.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cherub325.blogspot.com/feeds/111594004786967818/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=10261622&amp;postID=111594004786967818' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10261622/posts/default/111594004786967818'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10261622/posts/default/111594004786967818'/><link rel='alternate' type='text/html' href='http://cherub325.blogspot.com/2005/05/add-in-my-blog.html' title='Add-in My Blog'/><author><name>CHERUB</name><uri>http://www.blogger.com/profile/05541000949655411328</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='14' height='32' src='http://static.flickr.com/29/61835177_20e0034f42_t.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-10261622.post-111590317598189364</id><published>2005-05-12T13:55:00.000+01:00</published><updated>2005-05-12T14:45:52.496+01:00</updated><title type='text'>Blog, Blogger and Commercial Pattern</title><content type='html'>Actually, it is the commercial potential of blog largely excited my interest in the relative technical regions. POTENTIAL at least means two aspects: ONE is that blog is presenting a new market, which has prepared several basic factors, such as service provider, blog website and thousands of hundreds of clients, blogger. THE OTHER is that besides the traditional web commercial pattern, such as web ad, blog has not clearly figured out a direction on earning money for investments. Today, keso posted &lt;a href="http://www.donews.net/keso/archive/2005/05/12/376079.aspx"&gt;a article&lt;/a&gt; talking about the commercial topic of blog. I recorded some relative references hereby.

1.  
&lt;a href="http://www.donews.com/Content/200504/ba52101ad3e24a8fb20bf2555294e109.shtm"&gt;所以，从本质上说，网民对传统网站是索取，而对博客网站却是给予，索取必有代价，而给予却没有（即使这种给予是建立在博客网站提供平台的基础上），这就是博客网站与传统网站的主要差别，也是为什么博客网站兴盛了几年仍找不到盈利模式的原因。毕竟，博客的核心是自由、个性、张扬以及参与，它的魅力就在于其非商业化，就在于其不经包装的真实性，所以，博客从根本上就排斥商业（虽然它有着巨大的商业价值），即使商业进驻了博客阵地也会水土不服的。&lt;/a&gt;

2.
&lt;a href="http://hengge.blogbus.com/logs/2005/04/1150289.html"&gt;所以，鉴于目前blog的盈利模式大家还都在摸索阶段，要支撑博客中国继续做下去，必须吸引更多的投资进来，但目前无法拿收支盈余来说服投资方的话，只有从规模上讲故事，因而选择blogcn坐下来谈合并，也不是什么意外之事了。&lt;/a&gt;
&lt;a href="http://hengge.blogbus.com/logs/2005/04/1150289.html"&gt;blogbus最大的对手不是其他的BSP，是我们自己——如何保持自身的特点和优势、提供更多更好的服务给用户、不断超越自己，这才是blogbus所面临的真正问题。&lt;/a&gt;

3.
&lt;a href="http://www.donews.net/maozixiansheng/archive/2005/05/02/360473.aspx"&gt;如果孤立地来看blog，它是什么，它也许就是网志。但是如果你把文字blog、图片blog、网摘、rss、wiki、广告插件、即时通讯插件、统计插件、图片链接插件、模板，等等等等串起来看，你会发现它们之间衍生和互相依存的关系。&lt;/a&gt;
&lt;a href="http://www.donews.net/maozixiansheng/archive/2005/05/02/360473.aspx"&gt;但是以blog为核心所展开的模式却是，blogger出内容，blog站出空间，google出广告，天天网摘出标题链接，Flickr出图片，CC创作共享出法律保护，rss出通知，统计网站出统计数据...除了提高了效率之外，网站经营模式的这种转移到底意味着什么&lt;/a&gt;

4.
&lt;a href="http://blog.ex.imio.us/posts/17"&gt;博客世界融资、收购情况不完全汇集&lt;/a&gt;

5.
&lt;a href="http://www.donews.net/bingshu/archive/2005/05/09/371309.aspx"&gt;Blog那是Internet上的文化大革命，破坏多于缔造，个人感情冲动胜于理智购物选择，想造反闹事出名容易，比如木它一下子美。想赢利，等等2008年先。&lt;/a&gt;

6.
&lt;a href="http://www.klogs.org/archives/2005/05/ioeoeoeeeio.html"&gt;我一直闹不明白，为什么很多人会把提供Blog服务的商业服务和blog与商业这个话题联系起来。在我看来，这就好比平面出版繁荣，于是有人跳出来说纸张产业是下一个商业神话，或者电视节目产业的兴旺，有人因此说电视制造业是下一个神话。很可笑。&lt;/a&gt;
&lt;a href="http://www.klogs.org/archives/2005/05/ioeoeoeeeio.html"&gt;在他们看来，所谓的Blog，仅只提供Blog服务的网站/机构，他们眼里，根本就没有Blogger个人，即便有，也是构成Blog的一个分子而已，是为Blog服务商创造价值的奴隶。&lt;/a&gt;

7.
&lt;a href="http://www.donews.com/Content/200505/2c466aae42c64dd6802065919b435946.shtm"&gt;博客无疑有着美好的前景，但它只属于作为blogger的方兴东们，而不属于作为网站管理者和经营者的方兴东。博客能吸引网民们的眼球但不能让他们自愿掏钱，这就是商业价值与盈利模式的矛盾之处，也是所有想投资博客、经营博客的人们不能不面对的现实。&lt;/a&gt;

8.
&lt;a href="http://www.donews.com/Content/200505/64400a36fa484762b717136dfeaa558a.shtm"&gt;而今国内的博客托管站基本上都处于烧钱阶段，而烧钱是为了积聚人气、探询出路并最终赢利，对于商人与资本而言概念永远只是一个赢利商业化的工具而已。&lt;/a&gt;
&lt;a href="http://www.donews.com/Content/200505/64400a36fa484762b717136dfeaa558a.shtm"&gt;商业化可能腐蚀一些博客本真的东西，混入一些传统的垃圾，但这并不能成为阻挡博客商业化、求生存的步伐。&lt;/a&gt;
&lt;a href="http://www.donews.com/Content/200505/64400a36fa484762b717136dfeaa558a.shtm"&gt;只有到了平民化、大众化阶段，这些模式才可能发挥网络注意力经济、眼球效用的特性，才可能成为一种持续的、明确的赢利模式。撇开用户谈应用与撇开用户谈模式都一样，都是水中花，雾中月而已。
&lt;/a&gt;

9.
&lt;a href="http://www4.uuzone.com/blog/yezi/16208.htm"&gt;电视节目那么多，但广告一多，各个怨声载道，于是没有广告的数字电视开始大行其道，&lt;span style="font-weight:bold;"&gt;其实钱照样赚，让你烦他赚了一票，不让你烦他又赚了一票。&lt;/span&gt;&lt;/a&gt;
&lt;a href="http://www4.uuzone.com/blog/yezi/16208.htm"&gt;BLOG还是不如传统媒体成熟，它出不来南方周末，出不来体坛周报，它有媒体的气质，却没有媒体经营的思路。&lt;/a&gt;
&lt;a href="http://www4.uuzone.com/blog/yezi/16208.htm"&gt;DONEWS，有自己的圈子和风格，还有网摘，一赞。
UUZONE，有广泛的合作思路和好的领导人，一赞。
万碟移动博客，有PDA和手机应用渠道，一赞。
其他的……有待发现吧。你有技术，是最不值得一牛的东西，你有应用吗？&lt;/a&gt;

10.
&lt;a href="http://www.donews.com/Content/200505/41735e534b9c44eb80ab4272579555f0.shtm"&gt;曾经被少数批评家喻为“拾人牙慧”的博客，在中国发展状况，不仅引起处于转型期传统媒体的注意，更受中国互联网草根族欢迎。现时情况下，是中国的“博客们”开展转化商业模式行动的时候了&lt;/a&gt;

11.
&lt;a href="http://www.donews.com/Content/200505/5e5098d43aa446a6b81efe5fd1547e0a.shtm"&gt;实际上，同传统媒体或IT新闻网站抢夺新闻，并非博客网站的核心价值。博客网站最大的价值就是能吸引特定客户，并建立很好的忠诚度。尤其是一些优秀博客，可以吸引该领域最有影响力的群体。对于那些急于想打开市场或是关注高科技受众的行销商，这无疑是博客最大的商业价值所在。&lt;/a&gt;
&lt;a href="http://www.donews.com/Content/200505/5e5098d43aa446a6b81efe5fd1547e0a.shtm"&gt;博客中国就表示自己目前并没有成熟的盈利模式，其主要的收入将来自三个方面：广告收入、无线增值服务和向博客用户提供增值服务和应用程序收取的服务费。&lt;/a&gt;

12.
&lt;a href="http://www.donews.com/Content/200505/28ef741830cc4436ba58bea41985ccc1.shtm"&gt;在社会观察家看来，blog重新划分了传统世界的权利格局，帮助草根阶层赢得更多的社会话语权；在媒体从业者看来，blog意味着充满活力的崭新的媒体形式，借助聚合链接功能，blog使信息传播更直接更迅捷；在博客们的眼中，blog则是表达、分享、管理自己思想的工具，代表了互联网时代新的生活态度和生存状态。正是由于这些丰富而迥异的解读，博客世界才如此的五颜六色，引人入胜。而站在商业角度观察，蓬勃发展的blog已经具备商业运作的基础，blog工具所体现出的及时、交互的特点，以及blog内容传播的广度、深度，无不蕴藏着巨大的商业价值。也许正因为如此，商业Blog的发展速度出乎所有人的意料，无论是商业模式介入blog本身，还是blog工具介入商业运作，都正迅速变为现实。&lt;/a&gt;
&lt;a href="http://www.donews.com/Content/200505/28ef741830cc4436ba58bea41985ccc1.shtm"&gt;增值服务是blog服务商保留用户并实现收费的重要手段。blogbus正在探索企业blog应用、移动blog等商业创新领域，为用户提供高附加值的产品，例如域名绑定、功能分类、移动发布等等。&lt;/a&gt;
&lt;a href="http://www.donews.com/Content/200505/28ef741830cc4436ba58bea41985ccc1.shtm"&gt;不过，blog媒体商业模式在中国还没有取得足够的进展。国内一些知名媒体从业人员的blog已经形成blog媒体的雏形，但如何走向商业化尚在争论之中。&lt;/a&gt;

13.
&lt;a href="http://www.donews.com/Content/200505/a86aa018f49943a491f5cae3c4f494c6.shtm"&gt;目前可以想象的博客网站赢利方式，不足以支撑专业博客网站的生存。“它的收益来源具有不可靠性。”&lt;/a&gt;
&lt;a href="http://www.donews.com/Content/200505/a86aa018f49943a491f5cae3c4f494c6.shtm"&gt;虽然博客爱好者每天制造了大量信息，但这些信息的价值量和含金量有限，能够具备文字加工能力，并使之推广的，只是其中的极少数，大量博客文章仍然无法产生社会效益。因此，它只能是一个信息发布平台，而无法成为媒体。&lt;/a&gt;
&lt;a href="http://www.donews.com/Content/200505/a86aa018f49943a491f5cae3c4f494c6.shtm"&gt;当网站尚无收益时，网民会默认网站帮其扩散影响力，但当见到收益时，则会因为版权问题，使得这种模式难以实现。&lt;/a&gt;
&lt;a href="http://www.donews.com/Content/200505/a86aa018f49943a491f5cae3c4f494c6.shtm"&gt;张林强认为，中国的博客爱好者的持续度是有限的，绝大多数网民不会是文字专业制造者，当热潮过去，更多网民只会成为读者，而不是作者。张同时认为，未来的博客形式的发展目前还很难预料。随着新技术的产生，未来的博客，也可能不仅仅是目前的以文字和图片形式来表现。&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/10261622-111590317598189364?l=cherub325.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cherub325.blogspot.com/feeds/111590317598189364/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=10261622&amp;postID=111590317598189364' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10261622/posts/default/111590317598189364'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10261622/posts/default/111590317598189364'/><link rel='alternate' type='text/html' href='http://cherub325.blogspot.com/2005/05/blog-blogger-and-commercial-pattern.html' title='Blog, Blogger and Commercial Pattern'/><author><name>CHERUB</name><uri>http://www.blogger.com/profile/05541000949655411328</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='14' height='32' src='http://static.flickr.com/29/61835177_20e0034f42_t.jpg'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-10261622.post-111586009576169889</id><published>2005-05-12T01:45:00.000+01:00</published><updated>2005-05-12T11:37:43.930+01:00</updated><title type='text'>Tag and Links amone lines</title><content type='html'>"Tag is so hot these days", which comes from &lt;a href="http://www.donews.net/keso/archive/2005/01/30/262073.aspx"&gt;keso's blog in Jan. 2005&lt;/a&gt;. Till now, I think I've made it clear that &lt;span style="font-weight:bold;"&gt;it is &lt;a href="http://del.icio.us"&gt;del.icio.us&lt;/a&gt; spurred the idea of "Tag"&lt;/span&gt;.
Moreover, I can only add one of my comment of the links inside the paragraph of blogger's articles. Such links may reflect that the blogger wrote the blog with full heart that he/she provided the relative references as much as possible. However, I alwasy been diverted by these links, since I can not help find out what happend behind these characters with underline. My point is that, in current internet environment, information has boomed without any control. I have to carefully pick up very few famous or valuable websites or blogs to leech desired information, e.g. I am interested in RSS and blog techniques, so I chose the hottest blogs, such as &lt;a href="http://www.donews.net/keso/"&gt;keso's blog&lt;/a&gt; and etc. However, even when digging into these special choices, I was tempted by willing of longing for the knowledge with intact structure and those links emerged among lines. For instance, When I was reading the artiles named &lt;a href="http://www.smugeek.com/2005/05/11/tag-search-web/"&gt;"Tags对于搜索引擎的作用远大于个人"&lt;/a&gt; in &lt;a href="http://www.smugeek.com/"&gt;Ding Deng's Weblog&lt;/a&gt; for some information about "Tag", I was drawed by a single phrase "Getting Things Done" to keso's blog. Then, I could not stop to click some of other links from keso's articles. Suddenly, I realized such a problem occuring. 
What I've done now is only type this problem here. &lt;span style="font-weight:bold;"&gt;RSS may do well in syndicate the information. However, we are far away from information integration or information fusion.&lt;/span&gt; If it realized, it is not necessary any more for me to click links to dig more relative but only seemly valuable sources, in cost of wasting more time. 
Sorry for that I still conserved so many links inside my post. It's only my &lt;span style="font-weight:bold;"&gt;respect&lt;/span&gt; to those famouse and hottest bloggers.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/10261622-111586009576169889?l=cherub325.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cherub325.blogspot.com/feeds/111586009576169889/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=10261622&amp;postID=111586009576169889' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10261622/posts/default/111586009576169889'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10261622/posts/default/111586009576169889'/><link rel='alternate' type='text/html' href='http://cherub325.blogspot.com/2005/05/tag-and-links-amone-lines.html' title='Tag and Links amone lines'/><author><name>CHERUB</name><uri>http://www.blogger.com/profile/05541000949655411328</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='14' height='32' src='http://static.flickr.com/29/61835177_20e0034f42_t.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-10261622.post-111583542204053643</id><published>2005-05-11T19:00:00.000+01:00</published><updated>2005-05-12T14:06:39.996+01:00</updated><title type='text'>New Touches</title><content type='html'>Recent days, I am very interested in techniques relative to RSS. After browsing sever blogs interior and abroad, it is no doubt that RSS is the hottest topic now exchanged around the whole blog world. In terms of the applications of RSS and potential commercial opportunities, people expressed different ideas and digged into nearly every espects of present RSS. The RSS is firstly introduced years ago, it's my first time to re-touch the peak of current web techniques after so many years hide inside the academic stuffs. So, some terms appear in the literatures with very high frequency still confuse me a lot. Since no more free time can be spent on searching all of them explicitly one by one, I have to record them down here to reminde me. In addition with the unavoidable project research, it is necessary to come to these web-tech closer. 
The unknown or not familiar terms includes (maybe some of them are web application or web service provider, which are all in my continuous attention):
XML
LinkBlog
Tag
XML/RPC
FeedBurner
XSLT
Attention.XML
TechnoRati
SNS Analysis
Lucene
Wiki
OPML
Amazon's Life version
BSP (&lt;span style="font-style:italic;"&gt;Blog Service Provider&lt;/span&gt;)
&lt;a href="http://del.icio.us"&gt;del.icio.us&lt;/a&gt;
Google News Feed Scraper
RRSmix.com
FEDEX PACKAGES
persistent search delivery
Videoblogger
online bookmarks (services)
SPAM
location-tagged photos
Bloglines in addition with GMail
WEB LOG
HillTop searching algorithm

Moreover, I'd like to record my study notes (they can not be regarded as RESEARCH now) later.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/10261622-111583542204053643?l=cherub325.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cherub325.blogspot.com/feeds/111583542204053643/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=10261622&amp;postID=111583542204053643' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10261622/posts/default/111583542204053643'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10261622/posts/default/111583542204053643'/><link rel='alternate' type='text/html' href='http://cherub325.blogspot.com/2005/05/new-touches.html' title='New Touches'/><author><name>CHERUB</name><uri>http://www.blogger.com/profile/05541000949655411328</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='14' height='32' src='http://static.flickr.com/29/61835177_20e0034f42_t.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-10261622.post-111574062323290074</id><published>2005-05-10T16:55:00.000+01:00</published><updated>2005-05-10T16:57:03.236+01:00</updated><title type='text'>My Project</title><content type='html'>I've seen Jie illustrated his project on &lt;a href="http://happybj24210.blogspot.com"&gt;his blog&lt;/a&gt;, I can not help post mine as following. 

Occlusive vascular (e.g. arteriosclerosis) disease is a major and growing health problem worldwide. Traditionally, bypass surgery has been used on this condition but is ultimately unsatisfactory because it does not produce a cure. New drug treatments have attracted much research interest but a key obstacle here is the lack of any objective methodology for assessing the effectiveness of these treatments (before and after studies). 

The aim of this project is to work closely with clinicians at the Sheffield Vascular Institute to establish an methodology to quantitatively assess occlusive vascular disease from the X-ray angiograms which are routinely acquired from patients. This will require the development of novel image processing algorithms to segment the arterial network and estimate its blood carrying capacity using maximal flow graph algorithms. We anticipate this methodology will be important to advancing research in drug treatments and possibly, the routine assessment of patients.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/10261622-111574062323290074?l=cherub325.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cherub325.blogspot.com/feeds/111574062323290074/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=10261622&amp;postID=111574062323290074' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10261622/posts/default/111574062323290074'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10261622/posts/default/111574062323290074'/><link rel='alternate' type='text/html' href='http://cherub325.blogspot.com/2005/05/my-project.html' title='My Project'/><author><name>CHERUB</name><uri>http://www.blogger.com/profile/05541000949655411328</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='14' height='32' src='http://static.flickr.com/29/61835177_20e0034f42_t.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-10261622.post-111550905840465682</id><published>2005-05-08T00:31:00.000+01:00</published><updated>2005-05-08T00:37:38.420+01:00</updated><title type='text'>Tough, but Happy</title><content type='html'>What tough days these days. Though I welcomed my wife to join my difficult life abroad, so many pressures come together around. The agenda of tomorrow is nearly fully filled. I can image the same thing would happen to my calendar in the following weeks. Nevertheless, I should carefully arrange my timetable to fit the busy work, life and leisure time. COME ON!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/10261622-111550905840465682?l=cherub325.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cherub325.blogspot.com/feeds/111550905840465682/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=10261622&amp;postID=111550905840465682' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10261622/posts/default/111550905840465682'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10261622/posts/default/111550905840465682'/><link rel='alternate' type='text/html' href='http://cherub325.blogspot.com/2005/05/tough-but-happy.html' title='Tough, but Happy'/><author><name>CHERUB</name><uri>http://www.blogger.com/profile/05541000949655411328</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='14' height='32' src='http://static.flickr.com/29/61835177_20e0034f42_t.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-10261622.post-111516123618592904</id><published>2005-05-04T00:00:00.000+01:00</published><updated>2005-05-04T00:00:44.006+01:00</updated><title type='text'>Pick up my wife tday</title><content type='html'>JUST FOR MEMORY&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/10261622-111516123618592904?l=cherub325.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cherub325.blogspot.com/feeds/111516123618592904/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=10261622&amp;postID=111516123618592904' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10261622/posts/default/111516123618592904'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10261622/posts/default/111516123618592904'/><link rel='alternate' type='text/html' href='http://cherub325.blogspot.com/2005/05/pick-up-my-wife-tday.html' title='Pick up my wife tday'/><author><name>CHERUB</name><uri>http://www.blogger.com/profile/05541000949655411328</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='14' height='32' src='http://static.flickr.com/29/61835177_20e0034f42_t.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-10261622.post-111504634518787920</id><published>2005-05-02T16:02:00.000+01:00</published><updated>2005-05-02T16:07:40.263+01:00</updated><title type='text'>newSMTH</title><content type='html'>The most recently, good news come that newSMTH, which is nearly the whole copy of the SMTH except boards of departments, is alive. I have luckily activated my IDs. 

Then, I sent a group mail to THU-UK to say that I'd like to help friends on activating there IDs. Till now, I've helped more than 20 IDs alive. Hopefully I could do more!

Nevertheless, losing SMTH is still painful.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/10261622-111504634518787920?l=cherub325.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cherub325.blogspot.com/feeds/111504634518787920/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=10261622&amp;postID=111504634518787920' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10261622/posts/default/111504634518787920'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10261622/posts/default/111504634518787920'/><link rel='alternate' type='text/html' href='http://cherub325.blogspot.com/2005/05/newsmth.html' title='newSMTH'/><author><name>CHERUB</name><uri>http://www.blogger.com/profile/05541000949655411328</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='14' height='32' src='http://static.flickr.com/29/61835177_20e0034f42_t.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-10261622.post-111499551892875213</id><published>2005-05-02T01:47:00.000+01:00</published><updated>2005-05-02T01:58:38.930+01:00</updated><title type='text'>What's Google AdSense?</title><content type='html'>Recently, by chance, I toughted with RRS. Then, I browsed lots of articles about it, and part of my interest extended to the Google AdSense. Thought I've not understand what's the techniqual relationship of Google AdSense and RRs, luckily my application has accepted by Google and its AdSense has appeared on my bolg here. 

I'm going to spend some days tying to dig into it. What's it. How does it work. What's insight techniqual details. Nevertheless, I have to admit that I am and will be very busy these days. I don't know how many space and time left for me to extend a little tiny bit my interest! 

Actually, Blog, RRS... these words are so new to me that I am feeling of being behind of the time. Once, I was so exeprienced in such internet words, even techniques. But NOW...&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/10261622-111499551892875213?l=cherub325.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cherub325.blogspot.com/feeds/111499551892875213/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=10261622&amp;postID=111499551892875213' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10261622/posts/default/111499551892875213'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10261622/posts/default/111499551892875213'/><link rel='alternate' type='text/html' href='http://cherub325.blogspot.com/2005/05/whats-google-adsense.html' title='What&apos;s Google AdSense?'/><author><name>CHERUB</name><uri>http://www.blogger.com/profile/05541000949655411328</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='14' height='32' src='http://static.flickr.com/29/61835177_20e0034f42_t.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-10261622.post-111469432964369723</id><published>2005-04-28T14:18:00.000+01:00</published><updated>2005-04-28T14:19:43.690+01:00</updated><title type='text'>My MSN SPACE</title><content type='html'>See 184 Euro trip pics on my msn space.
&lt;a href="http://spaces.msn.com/members/sg71cherub/"&gt;http://spaces.msn.com/members/sg71cherub/&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/10261622-111469432964369723?l=cherub325.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cherub325.blogspot.com/feeds/111469432964369723/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=10261622&amp;postID=111469432964369723' title='6 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10261622/posts/default/111469432964369723'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10261622/posts/default/111469432964369723'/><link rel='alternate' type='text/html' href='http://cherub325.blogspot.com/2005/04/my-msn-space.html' title='My MSN SPACE'/><author><name>CHERUB</name><uri>http://www.blogger.com/profile/05541000949655411328</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='14' height='32' src='http://static.flickr.com/29/61835177_20e0034f42_t.jpg'/></author><thr:total>6</thr:total></entry><entry><id>tag:blogger.com,1999:blog-10261622.post-111469110889027089</id><published>2005-04-28T13:23:00.000+01:00</published><updated>2005-05-10T16:25:21.036+01:00</updated><title type='text'>How to compile a library? Step by Step</title><content type='html'>As a novice to Visual C++, people may only know about coding itself, but know little about the whole compiling stuffs. Here, I’d like to explicitly share my recent experience in compiling GSL 1.6 into a static library. 

1. Link to the following website: http://sources.redhat.com/gsl/ to download the most recent version of GSL which should be 1.6. Expand gsl-1.6.tar to the ..\temp\gsl-1.6, so we may obtain all the source files of GSL. (e.g. c:\tmep\gsl-1.6)
2. What we are going to do is to build these source into a static library that we may simply include such a library to utilize the necessary mathematical routines or data structures that GSL has provided. Before we start the complex compiling work, let us organize the source files in advantage. Using Windows explorer to search the whole folder gsl-1.6 for files pertaining to key words: “makefile.*”, “TODO”, “Changelog”, and “test*.*”. Delete all the matched files, since they are useless for the library. (As a record, there are 94 files matching keyword “makefile.*”, 29 files matching keyword “TODO”, 45 files matching keyword “Changelog”, and 141 files and a folder matching keyword “test*.*”.)
3. Search files that match keyword “gsl_*.h” in the folder gsl-1.6. These files are header files which would be included in the source files where GSL routines are applied. Create a folder named gsl in the path: ..\temp\. Move these header files into folder gsl. (There are 213 files found.)
4. Now, we have accomplished in organizing source files. Open MS Visual C++ to start our long compiling way. 
5. New a “Win32 Static Library” project, named as gsl_lib, set location as ..\temp\, and ignore the other settings. After the project is automatically established by MFC wizard, it is necessary to adjust some environment settings. Alt + F7, we open the “project setting” dialog. In page “Library”, change the “Output file name:” as “..\temp\gsl\msvcgsld.lib”. In menu Tools-&gt;Options, (“Options dialog”), we change some configures in the page “Directories” by adding path “..\temp” and “..\temp\gsl-1.6” into “Includes files”. Meanwhile, clear all the other non-relative paths. 
6. The last thing to be prepared for starting the kernel work is the config.h file. config.h is used to guide the compiler to compile and link the source files. It may provide different preprocessor configurations. The fault preprocessor header may cause fatal error during compiling procedure. We are going to fight with it, modify it to fit the Visual C++ compiler and MS systems environments throughout the whole compiling procedure. As the attachment of this article, I’ve provided a row version config.h file which is former used for building GSL 1.5 static library. The truth proves that this file has to be modified a lot to successfully accomplish the whole compiling mission. OK, let’s copy the config.h file into folder ../temp/gsl-1.6. 
7. Now, let’s start this tough work. According to the structure of GSL1.6, we firstly add a new folder in the Source Files of the project, named “blas”. Add all source files (C files) in the folder ../temp/gsl-1.6/blas into the folder “blas” of the project. Since the GSL is a very huge library including variant routines covering nearly every facet of mathematics, we can not hope we could compile all the numerous source codes together at once. The best way is to add packages one by one into the library, to limit the compiling errors to minimum. F7 to compile the project. OOPS! If you, the reader, using the same version and the same environment setting as mine, Visual C++ 6.0 development environment now reports 102 errors! However, be cool! The errors comes form the very beginning of gsl_pow_int.h. It’s because of the keyword “inline”. Forget those syntax errors, they are rubbish reports, or I may say they are consequential errors. By requiring helps to MSDN (online version, http://msdn.microsoft.com/library/), it responses the explanation of “inline” that “The inline keyword is available only in C++. The __inline and __forceinline keywords are available in both C and C++. For compatibility with previous versions, _inline is a synonym for __inline.” So, string inline is not defined by default. Hence, the compiler can not recognize inline at all. By help of our experiences (mainly come from my supervisor), we now look into config.h, which is in charge of making compiling stuffs compatible to different compiler. Add preprocessor heard “#define inline __inline” into config.h, commenting with “/* PZ 25.04.2005 */” (It’s a good coding habit). Compile the project again, Creating library…, HAHA, we make it! From now on, we are going to modify some codes and some file’s name to fit the requirement of the compiler. Remember to make a very good record of these adjustments. I’d like to make a summary at the end of each step pertaining to modifications. (The format should be like: Sum: &lt;package name&gt; “filename” action of modification)
Sum:  &lt;blas&gt;  “config.h”  ADD  “#define inline _inline”
8. Though only one package is well build, it is a good start. The second one is “block”. Add a folder named “block” and add in the source files belong to that package. (It is a routine for every package, so I’ll not mention this procedure any more for the reason of saving pages.) Whatever, press F7 and see what will happen. Not bad, only 80 errors reported now, in addition with 8 warnings. The first reported error comes from inti_source.c. Again, experience tells us that inti_source.c may be a dependency source file, which means that such a file has been included in the other files belonging to the same package. It turns out that init.c contains a line of “#include “inti_source.c” ”. So, remove init_source.c from the Source Files. Analogically, we remove files with suffix “_source.c”. Compile successfully now! On compiling the package “block”, we accumulate the experience of handling with the dependencies.
9. The third one, “cblas”. Do not add the header files into the Source Files. F7! No Error report now, instead of 55 warnings. Luckily, all the warnings pertain to the conversion precision lost. Forget it!
10. “cdf”. We now meet new situations! Warning report is “‘log1p’ undefined”, which can not be ignored trivially. Looking back to the MSDN again, there is no record about log1p concerning with C/C++ reference. So, MSVC has no definition about this operation. Carefully looking through config.h, we may find out the following lines: “/* Define to 1 if you have the declaration of `log1p', and to 0 if you don't. */” which continued with a preprocessor head “#define HAVE_DECL_LOG1P 1”. Since MSVC has no definition of log1p, we may set the HAVE_DECL_LOG1P to 0. That’s it! The same thing happens to expm1, so do the similar modification to config.h. OOPS, there are still some errors and warnings reports! Try to delete bata_inc.c from the Source Files since it seems to be the source of errors. (Suspecting it to be dependency!) Bingo! 
Sum: &lt;cdf&gt; “config.h” MODIFY  #define HAVE_DECL_LOG1P 0
&lt;cdf&gt; “config.h” MODIFY  #define HAVE_DECL_EXPM1 0
11. “cheb”. The source files “..\temp\gsl-1.6\cheb\init.c” and “..\temp\gsl-1.6\block\init.c” are both configured to produce the output file “..\temp\gsl_lib\debug\init.obj”. Obviously, MSVC compiler does not allow 2 source files having the same names, even they are in different folders. It’s easy to remove init.c from folder cheb, rename it into cheb_init.c, and add it in again. 
Sum: &lt;cheb&gt; “init.c” RENAME “cheb_init.c”
12. “combination”. Even after we changed init.c and file.c to proper names, there still one compiling error reported. As the error is relative to an undeclared function, it is indeed because of the preprocessor header again! Since function gsl_combination_get(…) has clearly defined in gsl_combination.h, on condition that the HAVE_INLINE_STATIC has defined, we may add a preprocessor header in config.h defining HAVE_INLINE_STATIC: “#ifndef HIDE_INLINE_STATIC”. 
Sum: &lt;combination&gt; “init.c” RENAME “combination_init.c”
  &lt;combination&gt; “file.c” RENAME “combination_file.c”
  &lt;combination&gt; “config.c” ADD “#define HIDE_INLINE_STATIC”
13. “complex”. As discussed about log1p above, the same error report occurs. This time, it is about acosh and atanh, which are not defined in math.h. The solution is to define HAVE_DECL_ACOSH and HAVE_DECL_ATANH in config.h as 0 which means acosh and atanh are not defined by default. Why we could solve the compiling problem by modifying config.h in this way? It’s time to make a deeper exploration into config.h. Let’s look for the last part of config.h. There are codes in the following format:
#if  !HAVE_DECL_ACOSH
#define  acosh  gsl_acosh
#endif
It’s clear that, if acosh or atanh are not defined by default (in math.h), GSL will substitute gsl function for these missing math functions. 
Sum: &lt;complex&gt; “config.c” MODIFY  “#define HAVE_DECL_ACOSH 0”
  &lt;complex&gt; “config.c” MODIFY  “#define HAVE_DECL_ATANH 0”
14. The folder const is empty. Ignore it!
15. “derive”. 
Sum: &lt;derive&gt;  “deriv.c” RENAME “deriv_deriv.c”
16. “dht” and “diff” can be compiled without obstacle. 
17. Folder doc contains some documentaries which are not necessary included into the static library. 
18. “eigen”. isnan is not defined now. Can you solve this now? If still not, refer to the SUM at the end of this step. Moreover, there still are 20 errors come from qrstep.c. It is mostly suspected as dependency. The proof of a source file being a dependency is that it is explicitly included in the other source files. So, the easiest way to find out all the dependencies in one package is looking for keyword “ #include “ ” in the package. Using menu Edit -&gt; Find in Files, the search results show that qrstep.c is included in the other 4 files of eigen package, so it is a dependency. Remove it from the Source Files, and the compiling problem is overcome. At the end of this step, I’d like to make a complement that _isnan is defined by C/C++. So we may substitute the isnan with _isnan or leave the default setting of config.h which substitutes isnan with gsl_isnan. 
Sum: &lt;eigne&gt; “config.c” MODIFY  “#define HAVE_DECL_ISNAN 0”
Optional &lt;eigne&gt; “config.c” MODIFY  “#define isnan _isnan”
19. The compiler is happy with “err”.
20. “fft”. 587 errors and 195 warning in total. Maybe it is the largest trouble we’ve ever met since we decide to give a try on this tough work. Follow me to handle with these errors. Firstly, remove all the dependencies from the Source Files. Only compare_source.c, dft.c, fft.c, real.c, signals.c are left. Secondly, there are a serial of very weird errors reported occurring in compare.h, beginning at FUNCTION(…). Obviously, FUNCTION(…) is a macro which defined in template_on.h. What’s this macro? What is the relationship with the template_on.h and these errors? Here, the weirdest, meanwhile a very important trouble shooting skill is emerging. However, package fft can not clearly explain how we find out where is the problem is and why we could solve the problem by that way. So, follow me, remove compare_source.c and real.c from the Souce Files in order to make the compiling successful. fft package is not well built! Remember it we’ll come back to face this problem later. (Refer to package matrix)
21. “fit” is OK and there is nothing inside folder gsl.
22. “histogram”. It’s time to rebuild the whole project. If you are strictly followed my steps, there are 148 warnings reported and which are all warning C4244. Ignore these precision lost warning. 
Sum: &lt;histogram&gt; “file.c” RENAME “histogram_file.c”
  &lt;histogram&gt; “init.c” RENAME “histogram_init.c”
23. “ieee-utils”. Only remove some dependencies. 
24. “integration”. Since we’ve changed the filename and such file is also included in the other source files, we have to modify part of source file. However, it won’t hurt GSL’s functions and its honor. (However, it’s weird that we changed the name of reset.c in order to add it into the Source Files but we removed it out of the Source Files since it is dependency. So maybe, next time, dependencies checking should be done in advantage.)
Sum: &lt;integration&gt; “reset.c” RENAME “integration_reset.c”
  &lt;integration&gt; “qagp.c” MODIFY  “#include “integration_reset.c”
  &lt;integration&gt; “qags.c” MODIFY  “#include “integration_reset.c”
  &lt;integration&gt; “qawo.c” MODIFY  “#include “integration_reset.c”
Optional: &lt;integration&gt; DO NO MODIFICATION
25. “interpolation”.
Sum: &lt; interpolation&gt; “linear.c”  RENAME “interpolation_linear.c”
26. “linalg”. There is a seemly ridicules non-uniform existing in exponential.c, of which the filename now is linalg_exponential.c. Generally speaking, the header file named like gsl_*.h are saved in folder gsl and included with the path /gsl/. In step 3, we have gathered all these header files into folder gsl. However, gsl_linalg.h is not normally included in linalg_exponential.c. Actually, though I am not very clear whether there is a bug or a special design, I simply modify the path of this sentence. See the SUM. 
Sum: &lt;linalg&gt;  “exponential.c” RENAME “linalg_exponential.c”
  &lt; linalg&gt;  linalg_exponential.c“ MODIFY  “#include &lt;gsl/gsl_linalg.h&gt;”
27. “matrix”. Take a deep breath. We are handling the biggest problem that I’ve met when I compiled the library for the first time. Removing dependencies, we’ll face to lots of errors reports come from rowcol_source.c and the others. If we thoroughly check these errors, we may discover that they are pertaining to a macro, FUNCTION and a keyword, complex. The following figure depicts how the macro FUNCTION works. Firstly, rowcol.c defines BASE_GSL_COMPLEX. Then, it includes template_on.h, which switches to the code block matching BASE_GSL_COMPLEX being defined. In this code block, template_on.h defines SHORT as complex. Meanwhile, it also defines the original structure of the macro FUNCTION in its later part. Next, rowcol.c includes rowcol_source.h, in which, the macro FUNCITON has certain parameters and a body. The macro FUNCTION follows template’s design to generate a function named gsl_matrix__complex_row(). Unfortunately, be ware that there are 2 under-lines between “matrix” and “complex” in the function’s name. By tracing the trail of the preprocessor header “#define”, we may find out what happens indeed. In template_on.h, SHORT is defined as complex. The preprocessor header performs the function as substituting string “SHORT” with string “complex” in the header or source files when compiling them. Nevertheless, rowcol.c also includes gsl_math.h, which includes math.h. Ridiculously, math.h has defined complex as _complex! So, the continuously substitutions results a very secret compiling bug, double under-line, only because MSVC’s stupid preprocessor. 
 
Luckily, we discovered the origin of this problem. However, the way to solve it is not a trivial work at all. Thanks to my supervisor’s proficient memory, he recalled that an isolated library named WinGSL has already overcome this type of compile problem. Hope you could understand the serial lines modifications in template_on.h. (Refer to Sum) GSL is mainly coded in terms of UNIX gcc compiler instead of MSVC. This bug may only occur when compiling GSL with MSVC or may some other bugs occur when utilizing the other compilers. So far, in this step, we improved our understanding of the relationship between the preprocessor headers.
Sum: &lt;matrix&gt;  “copy.c”  RENAME “matrix_copy.c”
  &lt;matrix&gt;  “file.c”  RENAME “matrix_file.c”
  &lt;matrix&gt;  “init.c”  RENAME “matrix_init.c”
  &lt;matrix&gt;  “oper.c”  RENAME “matrix_oper.c”
  &lt;matrix&gt;  “template_on.h” ADD 
      “#ifdef  _MSC_VER
      #define  MSVCPP_MATH_COMPLEX  complex
      #undef  complex
      #endif “
    before  “#elif  defined (BASE_GSL_COMPLEX)”
    and
      “#ifdef  _MSC_VER
      #define  complex   MSVCPP_MATH_COMPLEX
      #endif “
    after the whole “#elif”
28. “min”. Now, we meet a new error report pertaining to finite, which is also not defined in MSVC. However, _finite is well defined. The solution is routine illustrated above. However, config.h has given more complicated solution on keyword finite. We may omit those lines and add one line of “#define finite _finite”.
Sum: &lt;min&gt; “config.h” MODIFY  “#define  finite _finite”
  &lt;min&gt; “config.h” COMMENT 
     “#if  !HAVE_DECL_FINITE
#if   HAVE_DECL_ISFINITE
#define  finite  isfinite
#else
#define  finite  gsl_finite
#endif
#endif “
29. “monte” passes.
30. “multifit” passes after rename some source files. 
Sum: &lt;multifit&gt; “convergence.c” RENAME “multifit_convergence.c”
  &lt;multifit&gt;  “fsolver.c”  RENAME “multifit_fsolver.c”
31.  “multimin” passes.
Sum: &lt;multimin&gt; “convergence.c”  RENAME “multimin_convergence.c”
  &lt;multimin&gt;  “diff.c”   RENAME “multimin_diff.c”
32. “multiroots” passes.
Sum: &lt;multiroots&gt; “convergence.c” RENAME “multiroots_convergence.c”
  &lt;multiroots&gt; “fdfsolver.c”  RENAME “multiroots_fdfsolver.c”
  &lt;multiroots&gt; “fsolver.c”  RENAME “multiroots_fsolver.c”
33. “ntuple”, “ode-initval”, “permutation”, “poly”, “qrng”, “randist”, “rng”, and “roots” pass.
Sum: &lt;ode-initval&gt; “cscal.c”  RENAME “ode-initval_cscal.c”
  &lt;permutation&gt;  “file.c” RENAME “permutation_file.c”
  &lt;permutation&gt;  “init.c” RENAME “permutation_init.c”
  &lt; poly&gt;  “eval.c”  RENAME “poly_eval.c”
  &lt;randist&gt;  “weibull.c” RENAME “radist_weibull.c”
  &lt;randist&gt;  “beta.c”  RENAME “randist_beta.c”
  &lt;randist&gt;  “cauchy.c” RENAME “randist_cauchy.c”
  &lt;randist&gt;  “chisq.c”  RENAME “randist_chisq.c”
  &lt;randist&gt;  “exponential.c” RENAME “randist_exponential.c”
  &lt;randist&gt;  “exppow.c” RENAME “randist_exppow.c”
  &lt;randist&gt;  “fdist.c”  RENAME “randist_fdist.c”
  &lt;randist&gt;  “flat.c”  RENAME “randist_flat.c”
  &lt;randist&gt;  “gamma.c” RENAME “randist_gamma.c”
  &lt;randist&gt;  “gauss.c”  RENAME “randist_gauss.c”
  &lt;randist&gt;  “laplace.c” RENAME “randist_laplace.c”
  &lt;randist&gt;  “logistic.c” RENAME “randist_logistic.c”
  &lt;randist&gt;  “lognormal.c”  RENAME “randist_lognormal.c”
  &lt;randist&gt;  “pareto.c” RENAME “randist_pareto.c”
  &lt;randist&gt;  “rayleigh.c” RENAME “randist_rayleigh.c”
  &lt;randist&gt;  “tdist.c”  RENAME “randist_tdist.c”
  &lt;rng&gt;  “file.c”  RENAME “rng_file.c”
  &lt;roots&gt;  “brent.c”  RENAME “roots_brent.c”
  &lt;roots&gt;  “convergence.c” RENAME “roots_convergence.c”
  &lt;roots&gt;  “fdfsolver.c”  RENAME “roots_fdfsolver.c”
  &lt;roots&gt;  “fsolver.c”  RENAME “roots_fsolver.c”
  &lt;roots&gt;  “newton.c”  RENAME “roots_newton.c”
34. “siman”, “sort”, “specfunc” and “statistics” pass.
Sum: &lt;sort&gt;  “sort.c”  RENAME “sort_sort.c”
  &lt; specfunc&gt; “beta.c”  RENAME “specfunc_beta.c”
  &lt; specfunc&gt; “gamma.c” RENAME “specfunc_gamma.c”
  &lt; specfunc&gt; “hyperg.c” RENAME “specfunc_hyperg.c”
  &lt; statistics&gt;  “minmax.c” RENAME “statistics_minmax.c”
35. “sum”. levin_u.c includes gsl_test.h which has never appeared in the whole GSL. Omit this odd line. 
Sum: &lt;sum&gt; “levin_u.c” COMMENT “#include &lt;gsl/gsl_test.h&gt;”
  &lt;sum&gt; “Levin_utrunc.c” COMMENT ““#include &lt;gsl/gsl_test.h&gt;”
36. “sys” passes.
Sum: &lt; sys&gt; “hypot.c”  RENAME “sys_hypot.c”
&lt; sys&gt; “minmax.c” RENAME “sys_minmax.c”
&lt; sys&gt; “pow_int.c” RENAME “sys_pow_int.c”
37. “util”. memcpy.c provides the body of routine memcpy() which has been well defined in C/C++. So, source files such as memcpy.c, memmove.c, and so on are all not necessary to be added in the library. If you are not sure which routines are defied by C/C++, look them into the MSDN! Moreover, there is not a routine named strdup, but _strdup exists. So, we could carefully comment the body of strdup.c, instead with a line like: “#define strdup _strdup”. At last, only placeholder.c is conserved. 
Sum: &lt;util&gt; “strdup.c” COMMENT the body
  &lt;util&gt; “strdup.c” ADD  “#define strdup _strdup”
  &lt;util&gt; “memcpy.c”  REMOVED
  &lt;util&gt; “memmove.c”  REMOVED
  &lt;util&gt; “strtol.c”   REMOVED
  &lt;util&gt; “strtoul.c”  REMOVED
38. “vector” passes.
Sum: &lt;vector&gt;  “copy.c”  RENAME “vector_copy.c”
  &lt;vector&gt;  “file.c”  RENAME “vector_file.c”
  &lt;vector&gt;  “init.c”  RENAME “vector_init.c”
  &lt;vector&gt;  “minmax.c” RENAME “vector_minmax.c”
  &lt;vector&gt;  “oper.c”  RENAME “vector_oper.c”
  &lt;vector&gt;  “prop.c”  RENAME “vector_prop.c”
  &lt;vector&gt;  “swap.c”  RENAME “vector_swap.c”
  &lt;vector&gt;  “view.c”  RENAME “vector_view.c”
39. And finally, “wavelet” succeeds!
40. Find out msvcgsld.lib in folder gsl, which is my 3 hours work. Till now, the folder gsl can be included whenever you what to utilizing GSL numerous routines to ease your coding work. 

If you, the reader, could follow the above step to overcome variant compiling problems and accomplish building a static library, you may have good mood on solving so many strange difficulties and having a little tiny deep insight of what on earth the compiler does and what on earth the preprocessor header is. Good LUCK for further exploring trip.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/10261622-111469110889027089?l=cherub325.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cherub325.blogspot.com/feeds/111469110889027089/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=10261622&amp;postID=111469110889027089' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10261622/posts/default/111469110889027089'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10261622/posts/default/111469110889027089'/><link rel='alternate' type='text/html' href='http://cherub325.blogspot.com/2005/04/how-to-compile-library-step-by-step.html' title='How to compile a library? Step by Step'/><author><name>CHERUB</name><uri>http://www.blogger.com/profile/05541000949655411328</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='14' height='32' src='http://static.fli
