<?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-7558659723241238651</id><updated>2012-01-31T10:13:56.925+01:00</updated><category term='install'/><category term='Python'/><category term='XSD'/><category term='XSLT'/><category term='RDF'/><category term='CSS'/><category term='cache'/><category term='REST'/><category term='bug'/><category term='PUT'/><category term='Snow leopard'/><category term='W3C'/><category term='schema'/><category term='CherryPy'/><category term='parameters'/><category term='XML'/><category term='UDDI'/><category term='date'/><category term='Java'/><category term='HttpClient'/><category term='Ajax'/><category term='libxml2'/><category term='OS X'/><category term='RFC1123'/><category term='Acid 3'/><category term='PHP'/><category term='webstart'/><category term='format-number'/><category term='Safari'/><category term='jnlp'/><category term='xml iostream c++'/><category term='JavaScript'/><category term='WSDL 2.0'/><category term='prototype'/><category term='Saxon'/><category term='Erlang'/><title type='text'>SROE: Standing Rules Of Engagement</title><subtitle type='html'>Shaun's software journal</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://shaunroe.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7558659723241238651/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://shaunroe.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>sroe</name><uri>http://www.blogger.com/profile/16070735661039267060</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>42</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-7558659723241238651.post-9073803536603305188</id><published>2010-04-26T09:32:00.004+02:00</published><updated>2010-04-26T09:58:31.723+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Snow leopard'/><category scheme='http://www.blogger.com/atom/ns#' term='OS X'/><category scheme='http://www.blogger.com/atom/ns#' term='install'/><category scheme='http://www.blogger.com/atom/ns#' term='Erlang'/><title type='text'>Installed Erlang on OS X 10.6.3 Snow Leopard</title><content type='html'>I bought '&lt;a href="http://pragprog.com/titles/btlang/seven-languages-in-seven-weeks"&gt;Seven Languages in Seven Weeks&lt;/a&gt;' and one of those languages is Erlang. The version on Fink is v.12, but the latest is version 13, so I decided to install it myself from source. I discovered the directory path for installation is not allowed to have a space in it, so I made a path with no spaces and downloaded there. First the download and unpack; OS X doesnt have wget by default, but curl is there:&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;curl 'http://www.erlang.org/download/otp_src_R13B04.tar.gz' -o 'otp_src_R13B04.tar.gz'&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;tar -xzvf otp_src_R13B04.tar.gz &lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;curl 'http://www.erlang.org/download/otp_doc_man_R13B04.tar.gz' -o 'otp_doc_man_R13B04.tar.gz'&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Create the directory for installation:&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;sudo mkdir -p /sw/erlang&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Now configure, make and install:&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;cd otp_src_R13B04&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;./configure --prefix=/sw/erlang --enable-threads -enable-smp-support --enable-kernel-poll&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;make&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;sudo make install&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Copy the documentation into place and extract it there:&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;cp&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt; ../otp_doc_man_R13B04.tar.gz /sw/erlang/&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;cd /sw/erlang&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;sudo tar -xzvf otp_doc_man_R13B04.tar.gz&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;sudo rm otp_doc_man_R13B04.tar.gz&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new', serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new', serif;"&gt;&lt;span class="Apple-style-span"  style=" ;font-family:Georgia, serif;"&gt;Edit your ~/.bashrc to include the documentation and the new erlang binary in the appropriate paths; I use the 'pico' editor, but the lines you add are:&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;export PATH=$PATH:/sw/erlang/bin&lt;/div&gt;&lt;div&gt;export MANPATH=$MANPATH:/sw/erlang/man&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;...and source that script to get the new paths with . ~/.bashrc.&lt;/div&gt;&lt;div&gt;Now type 'erl' to get in the Erlang repl, and 'ctrl-C a' to exit.&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7558659723241238651-9073803536603305188?l=shaunroe.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://shaunroe.blogspot.com/feeds/9073803536603305188/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7558659723241238651&amp;postID=9073803536603305188' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7558659723241238651/posts/default/9073803536603305188'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7558659723241238651/posts/default/9073803536603305188'/><link rel='alternate' type='text/html' href='http://shaunroe.blogspot.com/2010/04/installed-erlang-on-os-x-1063-snow.html' title='Installed Erlang on OS X 10.6.3 Snow Leopard'/><author><name>sroe</name><uri>http://www.blogger.com/profile/16070735661039267060</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7558659723241238651.post-6183510364373792877</id><published>2010-04-22T17:35:00.006+02:00</published><updated>2010-04-22T17:45:32.878+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='schema'/><category scheme='http://www.blogger.com/atom/ns#' term='XSD'/><category scheme='http://www.blogger.com/atom/ns#' term='XML'/><category scheme='http://www.blogger.com/atom/ns#' term='date'/><category scheme='http://www.blogger.com/atom/ns#' term='W3C'/><category scheme='http://www.blogger.com/atom/ns#' term='RFC1123'/><title type='text'>W3C schema for the RFC 1123 date format</title><content type='html'>Here's a quickie I didn't find anywhere: XSD for the RFC 1123 date format, as used in http headers; note its only for GMT and years 2000 -2099 (my particular case):&lt;div&gt;&lt;span class="Apple-style-span"   style="font-family:Helvetica, serif;font-size:100%;"&gt;&lt;span class="Apple-style-span"  style="font-size:12px;"&gt;&lt;span class="Apple-style-span"   style="font-family:Georgia, serif;font-size:130%;"&gt;&lt;span class="Apple-style-span"  style="font-size:16px;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;p  style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Helvetica; color:#001ea7;"&gt;&lt;xs:schema&gt;&lt;span style="color:#000000;"&gt;&lt;/span&gt;&lt;/xs:schema&gt;&lt;/p&gt;&lt;span style="color:#000000;"&gt;&lt;p  style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Helvetica; color:#001ea7;"&gt;&lt;span style="color:#9e45d3;"&gt;&lt;/span&gt;&lt;span&gt;&lt;span&gt;&amp;lt;?xml version="1.0" encoding="UTF-8"?&gt;&lt;br /&gt;&amp;lt;xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"&gt;&lt;br /&gt;&amp;lt;xs:annotation&gt;&amp;lt;xs:documentation&gt;Schema for RFC 1123 date format type&amp;lt;/xs:documentation&gt;&amp;lt;/xs:annotation&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p color="#001ea7" style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Helvetica; "&gt;&lt;span&gt;&lt;span&gt;   &amp;lt;xs:simpleType name="RFC1123_date"&gt;&lt;br /&gt;  &amp;lt;xs:annotation&gt;&amp;lt;xs:documentation&gt;RFC 1123 date format.&amp;lt;/xs:documentation&gt;&amp;lt;/xs:annotation&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p color="#001ea7" style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Helvetica; "&gt;&lt;span&gt;&lt;span&gt;       &amp;lt;xs:restriction base="xs:string"&gt;&lt;br /&gt;      &amp;lt;xs:pattern value="(Mon|Tue|Wed|Thu|Fri|Sat|Sun), [0-3][0-9] (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) 20[0-9][0-9] [0-2][0-9]:[0-5][0-9]:[0-5][0-9] GMT"&gt;&lt;br /&gt;     &amp;lt;/xs:restriction&gt;&lt;br /&gt;  &amp;lt;/xs:simpleType&gt;&lt;br /&gt;&amp;lt;/xs:schema&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;/span&gt;&lt;p&gt;&lt;/p&gt;&lt;div&gt;&lt;span class="Apple-style-span"   style="  color: rgb(0, 30, 167); font-family:Helvetica, serif;font-size:12px;"&gt;&lt;/span&gt; &lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7558659723241238651-6183510364373792877?l=shaunroe.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://shaunroe.blogspot.com/feeds/6183510364373792877/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7558659723241238651&amp;postID=6183510364373792877' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7558659723241238651/posts/default/6183510364373792877'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7558659723241238651/posts/default/6183510364373792877'/><link rel='alternate' type='text/html' href='http://shaunroe.blogspot.com/2010/04/w3c-schema-for-rfc-1123-date-format.html' title='W3C schema for the RFC 1123 date format'/><author><name>sroe</name><uri>http://www.blogger.com/profile/16070735661039267060</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7558659723241238651.post-7634833393338340173</id><published>2010-03-17T13:41:00.004+01:00</published><updated>2010-03-17T14:32:24.708+01:00</updated><title type='text'>Python http PUT request</title><content type='html'>I have a CherryPy service which accepts 'PUT' requests with a named payload parameter (it's name is , surprisingly, 'payload'). From cURL, this is easy to specify with the -F option, but I couldn't find anywhere how to do this with Python. I discovered something a bit odd, which seems to be that the payload needs to be specified twice:&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;import urllib, httplib&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;import time, calendar&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;import base64&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;if __name__=='__main__':&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;  timenow=time.gmtime()&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;  t=time.asctime(timenow)&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;  iov1=str(calendar.timegm(timenow))+'000000000'&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;  iov2=str(calendar.timegm(timenow) + 1) +'000000000'&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;  p='&lt;channels&gt;&lt;channel id="0"&gt;&lt;value name="TestString255"&gt;'+t+'&lt;/value&gt;&lt;/channel&gt;&lt;/channels&gt;'&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;  px=urllib.quote_plus(p)&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;  pe=urllib.urlencode({"payload":p})&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;  urlbase='putserver.cern.ch:8081'&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;  testPut='DEVDB10/ATLAS_SCT_COMMCOND_DEV/PUTS200/TEST/PUT/Multi/timespan/'+iov1+''+iov2+"?payload="+px&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;  test='/cooldb'&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;  testMerge='/cooldb/merge'&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;  print px&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;  print urlbase&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;  authHeader={"Authorization": "Basic "+base64.encodestring('name:pwd'), "Content-Length":str(len(px))}&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;  #payload=px&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;  h=httplib.HTTPConnection(urlbase)&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;  h.request('PUT',testPut,px,authHeader)&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;  r=h.getresponse()&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;  print r.status, r.reason&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;  print r.read()&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;  h.close()&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7558659723241238651-7634833393338340173?l=shaunroe.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://shaunroe.blogspot.com/feeds/7634833393338340173/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7558659723241238651&amp;postID=7634833393338340173' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7558659723241238651/posts/default/7634833393338340173'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7558659723241238651/posts/default/7634833393338340173'/><link rel='alternate' type='text/html' href='http://shaunroe.blogspot.com/2010/03/python-http-put-request.html' title='Python http PUT request'/><author><name>sroe</name><uri>http://www.blogger.com/profile/16070735661039267060</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7558659723241238651.post-1186512852608853672</id><published>2010-03-03T21:46:00.006+01:00</published><updated>2010-03-07T21:16:13.380+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='xml iostream c++'/><title type='text'>I wanted an iomanipulator to escape XML</title><content type='html'>&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;...and so began a steep learning curve. I had some strings to insert into XML being output on the cout stream, and ideally I would simply like to do something like this:&lt;/span&gt;&lt;/span&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;  string myXml("xml&amp;amp;&lt;&gt;");&lt;/span&gt;&lt;/span&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;  cout&amp;lt;&amp;lt;escapexml&amp;lt;&amp;lt;myXml;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new', serif;"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;..and the output should be 'escaped'.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;Of course I could have made a function and simply transformed one string into another, but I was also keen to learn about the iostream framework. Here are a few ways which iterate towards the final goal&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;1. 'Adapt' the string&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;Custom inserters can be made for a given class, so by wrapping the string in a class, I cold simply make an inserter for that class:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;Here is the header:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 10.0px Monaco"&gt;&lt;span style="color:#760f50;"&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;class&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt; Wrapper{&lt;/span&gt;&lt;/span&gt;&lt;/p&gt; &lt;p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 10.0px Monaco"&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;  std::string &amp;amp;m_data;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt; &lt;p  style="margin: 0.0px 0.0px 0.0px 0.0px; font: 10.0px Monaco; color:#760f50;"&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;public&lt;/span&gt;&lt;/span&gt;&lt;span style="color:#000000;"&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;:&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt; &lt;p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 10.0px Monaco"&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;  &lt;/span&gt;&lt;/span&gt;&lt;span style="color:#760f50;"&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;typedef&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt; std::string::value_type value_type;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-family:Georgia, serif;"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;&lt;img src="http://www.blogger.com/img/blank.gif" alt="Font size" border="0" class="gl_size" /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt; &lt;p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 10.0px Monaco"&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;  Wrapper(std::string &amp;amp; data):m_data(data){  }&lt;/span&gt;&lt;/span&gt;&lt;/p&gt; &lt;p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 10.0px Monaco"&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;  std::string &amp;amp;str(){&lt;/span&gt;&lt;/span&gt;&lt;/p&gt; &lt;p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 10.0px Monaco"&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;    &lt;/span&gt;&lt;/span&gt;&lt;span style="color:#760f50;"&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;return&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt; m_data;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt; &lt;p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 10.0px Monaco"&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;  }&lt;/span&gt;&lt;/span&gt;&lt;/p&gt; &lt;p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 10.0px Monaco"&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;};&lt;/span&gt;&lt;/span&gt;&lt;/p&gt; &lt;p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 10.0px Monaco; min-height: 14.0px"&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt; &lt;p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 10.0px Monaco"&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;std::ostream &amp;amp; &lt;/span&gt;&lt;/span&gt;&lt;/p&gt; &lt;p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 10.0px Monaco"&gt;&lt;span style="color:#760f50;"&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;operator&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt; &lt;/span&gt;&lt;span class="Apple-style-span"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;&amp;lt;&amp;lt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt; (std::ostream &amp;amp; os,  Wrapper &amp;amp; s);&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:Monaco, serif;"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;...and the definition for that inserter:&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 10.0px Monaco"&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;std::ostream &amp;amp; &lt;/span&gt;&lt;/span&gt;&lt;/p&gt; &lt;p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 10.0px Monaco"&gt;&lt;span style="color:#760f50;"&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;operator&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;&amp;lt;&amp;lt; (std::ostream &amp;amp; os, Wrapper &amp;amp; s){&lt;/span&gt;&lt;/span&gt;&lt;/p&gt; &lt;p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 10.0px Monaco"&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;  XmlEscape x(os);&lt;/span&gt;&lt;/span&gt;&lt;/p&gt; &lt;p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 10.0px Monaco"&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;  for_each(s.str().begin(),s.str().end(),x);&lt;/span&gt;&lt;/span&gt;&lt;/p&gt; &lt;p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 10.0px Monaco"&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;  &lt;/span&gt;&lt;/span&gt;&lt;span style="color:#760f50;"&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;return&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt; os;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt; &lt;p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 10.0px Monaco"&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;}&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 10.0px Monaco"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 10.0px Monaco"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;where XmlEscape is a functor:&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 10.0px Monaco"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia, serif;"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 10.0px Monaco"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia, serif;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;span class="Apple-style-span"  style="font-family:georgia, serif;"&gt;&lt;p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 10.0px Monaco"&gt;&lt;span style="color:#760f50;"&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;class&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt; XmlEscape{&lt;/span&gt;&lt;/span&gt;&lt;/p&gt; &lt;p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 10.0px Monaco"&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;  &lt;/span&gt;&lt;/span&gt;&lt;span style="color:#760f50;"&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;static&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;span style="color:#760f50;"&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;const&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;span style="color:#760f50;"&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;char&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt; * m_chars;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt; &lt;p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 10.0px Monaco"&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;  &lt;/span&gt;&lt;/span&gt;&lt;span style="color:#760f50;"&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;static&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;span style="color:#760f50;"&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;const&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;span style="color:#760f50;"&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;char&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt; * m_replacements[];&lt;/span&gt;&lt;/span&gt;&lt;/p&gt; &lt;p  style="margin: 0.0px 0.0px 0.0px 0.0px; font: 10.0px Monaco; color:#760f50;"&gt;&lt;span style="color:#000000;"&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;  &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;static&lt;/span&gt;&lt;/span&gt;&lt;span style="color:#000000;"&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;const&lt;/span&gt;&lt;/span&gt;&lt;span style="color:#000000;"&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;unsigned&lt;/span&gt;&lt;/span&gt;&lt;span style="color:#000000;"&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;int&lt;/span&gt;&lt;/span&gt;&lt;span style="color:#000000;"&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt; m_nchars=&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;5&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="color:#000000;"&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt; &lt;p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 10.0px Monaco"&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;  std::ostream &amp;amp; m_os;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt; &lt;p  style="margin: 0.0px 0.0px 0.0px 0.0px; font: 10.0px Monaco; color:#760f50;"&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;public&lt;/span&gt;&lt;/span&gt;&lt;span style="color:#000000;"&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;:&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt; &lt;p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 10.0px Monaco"&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;  XmlEscape(std::ostream &amp;amp; os);&lt;/span&gt;&lt;/span&gt;&lt;/p&gt; &lt;p  style="margin: 0.0px 0.0px 0.0px 0.0px; font: 10.0px Monaco; color:#760f50;"&gt;&lt;span style="color:#000000;"&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;  &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;void&lt;/span&gt;&lt;/span&gt;&lt;span style="color:#000000;"&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;operator&lt;/span&gt;&lt;/span&gt;&lt;span style="color:#000000;"&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;()(&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;char&lt;/span&gt;&lt;/span&gt;&lt;span style="color:#000000;"&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt; c);&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt; &lt;p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 10.0px Monaco"&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;  std::ostream &amp;amp; ostream();&lt;/span&gt;&lt;/span&gt;&lt;/p&gt; &lt;p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 10.0px Monaco"&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;};&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 10.0px Monaco"&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new', serif;"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 10.0px Monaco"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;with implementation:&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 10.0px Monaco"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia, serif;"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 10.0px Monaco"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia, serif;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;span class="Apple-style-span"  style="font-family:georgia, serif;"&gt;&lt;p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 10.0px Monaco"&gt;&lt;span style="color:#760f50;"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;const&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt; &lt;/span&gt;&lt;/span&gt;&lt;span style="color:#760f50;"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;char&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt; * XmlEscape::m_chars =&lt;/span&gt;&lt;/span&gt;&lt;span style="color:#891315;"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;"&amp;amp;\'\"&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="color: rgb(0, 0, 0);  "&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&amp;lt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;"&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt; &lt;p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 10.0px Monaco"&gt;&lt;span style="color:#760f50;"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;const&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt; &lt;/span&gt;&lt;/span&gt;&lt;span style="color:#760f50;"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;char&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt; * XmlEscape::m_replacements[]={&lt;/span&gt;&lt;/span&gt;&lt;span style="color:#891315;"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;"&amp;amp;amp;"&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;, &lt;/span&gt;&lt;/span&gt;&lt;span style="color:#891315;"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;"&amp;amp;apos;"&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;, &lt;/span&gt;&lt;/span&gt;&lt;span style="color:#891315;"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;"&amp;amp;quot;"&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;, &lt;/span&gt;&lt;/span&gt;&lt;span style="color:#891315;"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;"&amp;amp;gt;"&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;, &lt;/span&gt;&lt;/span&gt;&lt;span style="color:#891315;"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;"&amp;amp;lt;"&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;};&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/span&gt;&lt;p&gt;&lt;/p&gt;&lt;p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 10.0px Monaco"&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 10.0px Monaco"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;XmlEscape::XmlEscape(std::ostream &lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="color: rgb(137, 19, 21); "&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&amp;amp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt; os):m_os(os){&lt;/span&gt;&lt;/span&gt;&lt;/p&gt; &lt;p  style="margin: 0.0px 0.0px 0.0px 0.0px; font: 10.0px Monaco; color:#236e25;"&gt;&lt;span style="color:#000000;"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt; &lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;//nop&lt;/span&gt;&lt;/span&gt;&lt;/p&gt; &lt;p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 10.0px Monaco"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;}&lt;/span&gt;&lt;/span&gt;&lt;/p&gt; &lt;p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 10.0px Monaco; min-height: 14.0px"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt; &lt;p  style="margin: 0.0px 0.0px 0.0px 0.0px; font: 10.0px Monaco; color:#760f50;"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;void&lt;/span&gt;&lt;/span&gt;&lt;/p&gt; &lt;p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 10.0px Monaco"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;XmlEscape::&lt;/span&gt;&lt;/span&gt;&lt;span style="color:#760f50;"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;operator&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;()(&lt;/span&gt;&lt;/span&gt;&lt;span style="color:#760f50;"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;char&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt; c){&lt;/span&gt;&lt;/span&gt;&lt;/p&gt; &lt;p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 10.0px Monaco"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;  &lt;/span&gt;&lt;/span&gt;&lt;span style="color:#760f50;"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;unsigned&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt; &lt;/span&gt;&lt;/span&gt;&lt;span style="color:#760f50;"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;int&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt; i(m_nchars);&lt;/span&gt;&lt;/span&gt;&lt;/p&gt; &lt;p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 10.0px Monaco"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;  &lt;/span&gt;&lt;/span&gt;&lt;span style="color:#760f50;"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;while&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;(i--){&lt;/span&gt;&lt;/span&gt;&lt;/p&gt; &lt;p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 10.0px Monaco"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;    &lt;/span&gt;&lt;/span&gt;&lt;span style="color:#760f50;"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;if&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt; (c==m_chars[i]) {&lt;/span&gt;&lt;/span&gt;&lt;/p&gt; &lt;p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 10.0px Monaco"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;      m_os&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&amp;lt;&amp;lt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;m_replacements[i];&lt;/span&gt;&lt;/span&gt;&lt;/p&gt; &lt;p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 10.0px Monaco"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;      &lt;/span&gt;&lt;/span&gt;&lt;span style="color:#760f50;"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;return&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt; &lt;p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 10.0px Monaco"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;    }&lt;/span&gt;&lt;/span&gt;&lt;/p&gt; &lt;p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 10.0px Monaco"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;  }&lt;/span&gt;&lt;/span&gt;&lt;/p&gt; &lt;p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 10.0px Monaco"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;  m_os&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&amp;lt;&amp;lt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;c;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt; &lt;p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 10.0px Monaco"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;}&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 10.0px Monaco"&gt;&lt;span class="Apple-style-span" style="font-size: medium;"&gt;&lt;b&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;2. Adapt the stream&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/p&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/span&gt;&lt;p&gt;&lt;/p&gt;&lt;p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 10.0px Monaco"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia, serif;"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new', serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7558659723241238651-1186512852608853672?l=shaunroe.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://shaunroe.blogspot.com/feeds/1186512852608853672/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7558659723241238651&amp;postID=1186512852608853672' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7558659723241238651/posts/default/1186512852608853672'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7558659723241238651/posts/default/1186512852608853672'/><link rel='alternate' type='text/html' href='http://shaunroe.blogspot.com/2010/03/i-wanted-iomanipulator-to-escape-xml.html' title='I wanted an iomanipulator to escape XML'/><author><name>sroe</name><uri>http://www.blogger.com/profile/16070735661039267060</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7558659723241238651.post-5508146333271870811</id><published>2009-07-07T17:44:00.001+02:00</published><updated>2009-07-08T11:35:05.565+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='REST'/><category scheme='http://www.blogger.com/atom/ns#' term='UDDI'/><category scheme='http://www.blogger.com/atom/ns#' term='RDF'/><category scheme='http://www.blogger.com/atom/ns#' term='WSDL 2.0'/><title type='text'>WSDL 2.0 and all that</title><content type='html'>I'm trying to make a directory of my web services to make them more visible (findable) and started with this:&lt;br /&gt;&lt;a href="http://www.keith-chapman.org/2008/09/restfull-mashup-with-wsdl-20-wso2.html"&gt;Keith Chapman&amp;#39;s Blog: RESTfull Mashup with WSDL 2.0 - WSO2 Mashup Server&lt;/a&gt;&lt;br /&gt;and the &lt;a href="http://mooshup.com/services/keith/RESTDemo?wsdl2&amp;annotation=true#_binding_keith-RESTDemo-HttpBinding"&gt;referenced WSDL file&lt;/a&gt; he uses. I think he in turn uses &lt;a href="http://www.ibm.com/developerworks/webservices/library/ws-restwsdl/"&gt;the useful IBM page on this subject&lt;/a&gt;, and the WSDL &lt;a href="http://www.w3.org/TR/wsdl20-primer/"&gt;primer&lt;/a&gt;, &lt;a href="http://www.w3.org/TR/wsdl20/"&gt;core definition&lt;/a&gt; and &lt;a href="http://www.w3.org/TR/wsdl20-adjuncts/"&gt;adjunct&lt;/a&gt; pages. Apart from that, there's not much out there on using WSDL for RESTful services.&lt;br /&gt;&lt;br /&gt;In theory this could all also be done in &lt;a href="http://www.w3.org/RDF/"&gt;RDF&lt;/a&gt;, or even a mixture of the two... this might provide both the functional definition in WSDL and the ontological framework ('find me all the atlas web services which give run information') in RDF. I'll start with WSDL, progress to &lt;a href="http://en.wikipedia.org/wiki/Universal_Description_Discovery_and_Integration"&gt;UDDI&lt;/a&gt; and then try to backtrack and insert some RDF.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7558659723241238651-5508146333271870811?l=shaunroe.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://shaunroe.blogspot.com/feeds/5508146333271870811/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7558659723241238651&amp;postID=5508146333271870811' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7558659723241238651/posts/default/5508146333271870811'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7558659723241238651/posts/default/5508146333271870811'/><link rel='alternate' type='text/html' href='http://shaunroe.blogspot.com/2009/07/keith-chapmans-blog-restfull-mashup.html' title='WSDL 2.0 and all that'/><author><name>sroe</name><uri>http://www.blogger.com/profile/16070735661039267060</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7558659723241238651.post-6333919619385431535</id><published>2009-07-07T17:41:00.000+02:00</published><updated>2009-07-07T17:41:29.357+02:00</updated><title type='text'>Sweetxml: My first WSDL 2.0 - generating Axis2 client code for a REST API</title><content type='html'>&lt;a href="http://blog.sweetxml.org/2009/03/my-first-wsdl-20-generating-axis2.html"&gt;Sweetxml: My first WSDL 2.0 - generating Axis2 client code for a REST API&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7558659723241238651-6333919619385431535?l=shaunroe.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='related' href='http://blog.sweetxml.org/2009/03/my-first-wsdl-20-generating-axis2.html' title='Sweetxml: My first WSDL 2.0 - generating Axis2 client code for a REST API'/><link rel='replies' type='application/atom+xml' href='http://shaunroe.blogspot.com/feeds/6333919619385431535/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7558659723241238651&amp;postID=6333919619385431535' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7558659723241238651/posts/default/6333919619385431535'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7558659723241238651/posts/default/6333919619385431535'/><link rel='alternate' type='text/html' href='http://shaunroe.blogspot.com/2009/07/sweetxml-my-first-wsdl-20-generating.html' title='Sweetxml: My first WSDL 2.0 - generating Axis2 client code for a REST API'/><author><name>sroe</name><uri>http://www.blogger.com/profile/16070735661039267060</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7558659723241238651.post-5800150006251076124</id><published>2009-06-09T09:25:00.006+02:00</published><updated>2009-06-09T09:46:17.666+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Acid 3'/><category scheme='http://www.blogger.com/atom/ns#' term='bug'/><category scheme='http://www.blogger.com/atom/ns#' term='XML'/><category scheme='http://www.blogger.com/atom/ns#' term='Safari'/><category scheme='http://www.blogger.com/atom/ns#' term='CSS'/><category scheme='http://www.blogger.com/atom/ns#' term='XSLT'/><title type='text'>Safari 4: Does Acid pass the Acid test?</title><content type='html'>OK, so I updated to Safari 4 and yes, sure enough it passes the &lt;a href="http://acid3.acidtests.org/"&gt;Acid3&lt;/a&gt; test with flying colours. Must be good, then. So I tested it against my two outstanding bugs which I stumbled across:&lt;br /&gt;&lt;a href="http://sroe.home.cern.ch/sroe/test/test.xml"&gt;Corrupt screen memory&lt;/a&gt;: Go to that link after visting another page and you'll see the new page just billboarded on top of the one you were looking at. &lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_7pZc2YJRCkA/Si4QbgecXpI/AAAAAAAAAAM/Z0k0G-eQ9DA/s1600-h/Picture+2.png"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 320px; height: 175px;" src="http://3.bp.blogspot.com/_7pZc2YJRCkA/Si4QbgecXpI/AAAAAAAAAAM/Z0k0G-eQ9DA/s320/Picture+2.png" border="0" alt=""id="BLOGGER_PHOTO_ID_5345227872495492754" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Try resizing the window to see ugly stuttering visual history as the window moves...&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_7pZc2YJRCkA/Si4QwLyS6oI/AAAAAAAAAAU/N6s0bwbrqm8/s1600-h/Picture+3.png"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 320px; height: 243px;" src="http://3.bp.blogspot.com/_7pZc2YJRCkA/Si4QwLyS6oI/AAAAAAAAAAU/N6s0bwbrqm8/s320/Picture+3.png" border="0" alt=""id="BLOGGER_PHOTO_ID_5345228227718867586" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;...and then there's simple (but big number) arithmetic inside XSLT. Safari just gets it wrong. Come on guys, where are those 64 bits you promised us? &lt;a href="http://sroe.home.cern.ch/sroe/test/hextest.xml"&gt;Heres&lt;/a&gt; an example of hex conversion, where the large integer here simply gets converted to zero inside safari, but the correct answer is given in Firefox.&lt;br /&gt;&lt;br /&gt;So Acid 3 is all very well at testing the fancy new features, but I would have thought that CSS styling of Plain Old Xml would be &lt;i&gt;even more&lt;/i&gt; fundamental than testing the new selectors.. so Acid 3 is failing my acid test, at least.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7558659723241238651-5800150006251076124?l=shaunroe.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://shaunroe.blogspot.com/feeds/5800150006251076124/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7558659723241238651&amp;postID=5800150006251076124' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7558659723241238651/posts/default/5800150006251076124'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7558659723241238651/posts/default/5800150006251076124'/><link rel='alternate' type='text/html' href='http://shaunroe.blogspot.com/2009/06/safari-4-does-acid-pass-acid-test.html' title='Safari 4: Does Acid pass the Acid test?'/><author><name>sroe</name><uri>http://www.blogger.com/profile/16070735661039267060</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/_7pZc2YJRCkA/Si4QbgecXpI/AAAAAAAAAAM/Z0k0G-eQ9DA/s72-c/Picture+2.png' height='72' width='72'/><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7558659723241238651.post-2455747384388037242</id><published>2009-06-05T13:14:00.005+02:00</published><updated>2009-06-05T13:26:19.317+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='JavaScript'/><category scheme='http://www.blogger.com/atom/ns#' term='parameters'/><category scheme='http://www.blogger.com/atom/ns#' term='Ajax'/><category scheme='http://www.blogger.com/atom/ns#' term='prototype'/><category scheme='http://www.blogger.com/atom/ns#' term='XSLT'/><title type='text'>Parametrized Xslt from javascript, using prototype</title><content type='html'>Here's the final product; the original page has 'a' links in a tag with id="displayableModules". The links have the form href="BadChannelsFile.xml#12345.0" where the module id is indicated after the file. This is a kind of &lt;a href="http://www.w3.org/TR/WD-xptr"&gt;xpointer&lt;/a&gt; syntax, but I remould it so the id gives the module part and then listen for 'click' events on those ids; this causes an XSLT to be run with the id as a parameter and a new window contains the SVG which results. Along the way, I experimented with various file loading mechanisms (so I made a separate loading class) but stuck with a synchronous Ajax request, although discovered that Safari requires the method to explicitly stated as 'get' in lower case. Enjoy...&lt;div&gt;&lt;br /&gt;&lt;div&gt;&lt;p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Monaco"&gt;&lt;span style="color: #a61700"&gt;var&lt;/span&gt; Loader = Class.create({&lt;/p&gt; &lt;p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Monaco"&gt;  initialize: &lt;span style="color: #a61700"&gt;function&lt;/span&gt;(){&lt;/p&gt; &lt;p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Monaco"&gt;    &lt;span style="color: #a61700"&gt;this&lt;/span&gt;.result=&lt;span style="color: #8012b3"&gt;""&lt;/span&gt;;&lt;/p&gt; &lt;p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Monaco"&gt;  },&lt;/p&gt; &lt;p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Monaco; min-height: 15.0px"&gt;  &lt;/p&gt; &lt;p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Monaco"&gt;  loadXml: &lt;span style="color: #a61700"&gt;function&lt;/span&gt;(docPath){&lt;/p&gt; &lt;p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Monaco"&gt;    &lt;span style="color: #a61700"&gt;this&lt;/span&gt;.ajaxLoad(docPath);&lt;/p&gt; &lt;p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Monaco"&gt;  },&lt;/p&gt; &lt;p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Monaco; min-height: 15.0px"&gt;  &lt;/p&gt; &lt;p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Monaco"&gt;  ajaxLoad: &lt;span style="color: #a61700"&gt;function&lt;/span&gt;(docPath){&lt;/p&gt; &lt;p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Monaco; color: #236e25"&gt;&lt;span style="color: #000000"&gt;  &lt;/span&gt;//bind the passed function to the original class&lt;/p&gt; &lt;p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Monaco; color: #236e25"&gt;&lt;span style="color: #000000"&gt;  &lt;/span&gt;//the method (get) needs to be explicitly written in lowercase for the Safari browser!&lt;/p&gt; &lt;p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Monaco"&gt;    &lt;span style="color: #a61700"&gt;new&lt;/span&gt; Ajax.Request(docPath, {asynchronous: &lt;span style="color: #a61700"&gt;false&lt;/span&gt;, onSuccess: &lt;span style="color: #a61700"&gt;this&lt;/span&gt;._callback.bind(&lt;span style="color: #a61700"&gt;this&lt;/span&gt;), method: &lt;span style="color: #8012b3"&gt;"get"&lt;/span&gt;,&lt;/p&gt; &lt;p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Monaco"&gt;    onFailure: &lt;span style="color: #a61700"&gt;function&lt;/span&gt;(r){alert(&lt;span style="color: #8012b3"&gt;"load failed"&lt;/span&gt;);}})&lt;/p&gt; &lt;p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Monaco"&gt;  },&lt;/p&gt; &lt;p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Monaco; min-height: 15.0px"&gt;  &lt;/p&gt; &lt;p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Monaco"&gt;  _callback: &lt;span style="color: #a61700"&gt;function&lt;/span&gt;(r){&lt;/p&gt; &lt;p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Monaco"&gt;    &lt;span style="color: #a61700"&gt;this&lt;/span&gt;.result=r.responseXML;&lt;/p&gt; &lt;p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Monaco"&gt;  },&lt;/p&gt; &lt;p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Monaco; min-height: 15.0px"&gt;  &lt;/p&gt; &lt;p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Monaco"&gt;  doc: &lt;span style="color: #a61700"&gt;function&lt;/span&gt;(){&lt;/p&gt; &lt;p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Monaco"&gt;    &lt;span style="color: #a61700"&gt;if&lt;/span&gt; (&lt;span style="color: #a61700"&gt;this&lt;/span&gt;.result==&lt;span style="color: #8012b3"&gt;""&lt;/span&gt;){&lt;/p&gt; &lt;p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Monaco"&gt;      alert(&lt;span style="color: #8012b3"&gt;"no doc"&lt;/span&gt;);&lt;/p&gt; &lt;p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Monaco"&gt;    }&lt;/p&gt; &lt;p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Monaco"&gt;    &lt;span style="color: #a61700"&gt;return&lt;/span&gt; &lt;span style="color: #a61700"&gt;this&lt;/span&gt;.result;&lt;/p&gt; &lt;p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Monaco"&gt;  }&lt;/p&gt; &lt;p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Monaco"&gt;});&lt;/p&gt; &lt;p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Monaco; min-height: 15.0px"&gt;&lt;br /&gt;&lt;/p&gt; &lt;p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Monaco"&gt;&lt;span style="color: #a61700"&gt;var&lt;/span&gt; Transformer = Class.create({&lt;/p&gt; &lt;p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Monaco"&gt;initialize: &lt;span style="color: #a61700"&gt;function&lt;/span&gt;(){&lt;/p&gt; &lt;p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Monaco"&gt;  &lt;span style="color: #a61700"&gt;this&lt;/span&gt;.processor = &lt;span style="color: #a61700"&gt;new&lt;/span&gt; XSLTProcessor();&lt;/p&gt; &lt;p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Monaco"&gt;  &lt;span style="color: #a61700"&gt;this&lt;/span&gt;.paramNames=[];&lt;/p&gt; &lt;p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Monaco"&gt;  &lt;span style="color: #a61700"&gt;this&lt;/span&gt;.paramValues=[];&lt;/p&gt; &lt;p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Monaco"&gt;  &lt;span style="color: #a61700"&gt;this&lt;/span&gt;.xslPath=&lt;span style="color: #8012b3"&gt;""&lt;/span&gt;;&lt;/p&gt; &lt;p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Monaco"&gt;  &lt;span style="color: #a61700"&gt;this&lt;/span&gt;.xmlPath=&lt;span style="color: #8012b3"&gt;""&lt;/span&gt;;&lt;/p&gt; &lt;p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Monaco"&gt;  &lt;span style="color: #a61700"&gt;this&lt;/span&gt;.fileLoader = &lt;span style="color: #a61700"&gt;new&lt;/span&gt; Loader();&lt;/p&gt; &lt;p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Monaco"&gt;},&lt;/p&gt; &lt;p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Monaco; min-height: 15.0px"&gt;&lt;br /&gt;&lt;/p&gt; &lt;p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Monaco"&gt;setXslt: &lt;span style="color: #a61700"&gt;function&lt;/span&gt;(xslPath){&lt;/p&gt; &lt;p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Monaco"&gt;  &lt;span style="color: #a61700"&gt;this&lt;/span&gt;.xslPath = xslPath;&lt;/p&gt; &lt;p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Monaco"&gt;  &lt;span style="color: #a61700"&gt;this&lt;/span&gt;.fileLoader.loadXml(xslPath);&lt;/p&gt; &lt;p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Monaco"&gt;  &lt;span style="color: #a61700"&gt;this&lt;/span&gt;.stylesheet = &lt;span style="color: #a61700"&gt;this&lt;/span&gt;.fileLoader.doc();&lt;/p&gt; &lt;p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Monaco"&gt;},&lt;/p&gt; &lt;p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Monaco; min-height: 15.0px"&gt;&lt;br /&gt;&lt;/p&gt; &lt;p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Monaco"&gt;setXml: &lt;span style="color: #a61700"&gt;function&lt;/span&gt;(docPath){&lt;/p&gt; &lt;p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Monaco"&gt;  &lt;span style="color: #a61700"&gt;this&lt;/span&gt;.xmlPath = docPath;&lt;/p&gt; &lt;p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Monaco"&gt;  &lt;span style="color: #a61700"&gt;this&lt;/span&gt;.fileLoader.loadXml(docPath);&lt;/p&gt; &lt;p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Monaco"&gt;  &lt;span style="color: #a61700"&gt;this&lt;/span&gt;.xmlDoc = &lt;span style="color: #a61700"&gt;this&lt;/span&gt;.fileLoader.doc();&lt;/p&gt; &lt;p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Monaco"&gt;},&lt;/p&gt; &lt;p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Monaco; min-height: 15.0px"&gt;&lt;br /&gt;&lt;/p&gt; &lt;p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Monaco"&gt;setParam: &lt;span style="color: #a61700"&gt;function&lt;/span&gt;(paramName, paramValue){&lt;/p&gt; &lt;p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Monaco"&gt;  &lt;span style="color: #a61700"&gt;this&lt;/span&gt;.paramNames.push(paramName);&lt;/p&gt; &lt;p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Monaco"&gt;  &lt;span style="color: #a61700"&gt;this&lt;/span&gt;.paramValues.push(paramValue);&lt;/p&gt; &lt;p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Monaco"&gt;},&lt;/p&gt; &lt;p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Monaco; min-height: 15.0px"&gt;&lt;br /&gt;&lt;/p&gt; &lt;p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Monaco"&gt;exec: &lt;span style="color: #a61700"&gt;function&lt;/span&gt;(thisdoc){&lt;/p&gt; &lt;p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Monaco"&gt;   &lt;span style="color: #a61700"&gt;this&lt;/span&gt;.processor.importStylesheet(&lt;span style="color: #a61700"&gt;this&lt;/span&gt;.stylesheet);&lt;/p&gt; &lt;p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Monaco"&gt;  &lt;span style="color: #a61700"&gt;for&lt;/span&gt; (&lt;span style="color: #a61700"&gt;var&lt;/span&gt; i=&lt;span style="color: #0000ff"&gt;0&lt;/span&gt;;i&lt;&lt;span style="color: #a61700"&gt;this&lt;/span&gt;.paramValues.length;i++){&lt;/p&gt; &lt;p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Monaco"&gt;    &lt;span style="color: #a61700"&gt;this&lt;/span&gt;.processor.setParameter(&lt;span style="color: #8012b3"&gt;""&lt;/span&gt;,&lt;span style="color: #a61700"&gt;this&lt;/span&gt;.paramNames[i], &lt;span style="color: #a61700"&gt;this&lt;/span&gt;.paramValues[i]);&lt;/p&gt; &lt;p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Monaco"&gt;  }&lt;/p&gt; &lt;p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Monaco"&gt;  &lt;span style="color: #a61700"&gt;var&lt;/span&gt; fragment = &lt;span style="color: #a61700"&gt;this&lt;/span&gt;.processor.transformToFragment(&lt;span style="color: #a61700"&gt;this&lt;/span&gt;.xmlDoc, thisdoc);&lt;/p&gt; &lt;p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Monaco"&gt;  &lt;span style="color: #a61700"&gt;return&lt;/span&gt; fragment;&lt;/p&gt; &lt;p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Monaco"&gt;}&lt;/p&gt; &lt;p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Monaco; min-height: 15.0px"&gt;&lt;br /&gt;&lt;/p&gt; &lt;p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Monaco"&gt;});&lt;/p&gt; &lt;p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Monaco; color: #236e25"&gt;//global functions&lt;/p&gt; &lt;p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Monaco"&gt;&lt;span style="color: #a61700"&gt;function&lt;/span&gt; changeLinks(){&lt;/p&gt; &lt;p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Monaco; color: #236e25"&gt;&lt;span style="color: #000000"&gt;  &lt;/span&gt;//take existing links in the div 'displayableModules' and add an id, and suppress the href link&lt;/p&gt; &lt;p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Monaco"&gt;  &lt;span style="color: #a61700"&gt;var&lt;/span&gt; allLinks=$(&lt;span style="color: #8012b3"&gt;"displayableModules"&lt;/span&gt;).getElementsByTagName(&lt;span style="color: #8012b3"&gt;"a"&lt;/span&gt;);&lt;/p&gt; &lt;p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Monaco"&gt;  &lt;span style="color: #a61700"&gt;for&lt;/span&gt; (&lt;span style="color: #a61700"&gt;var&lt;/span&gt; i=&lt;span style="color: #0000ff"&gt;0&lt;/span&gt;;i&lt;alllinks.length;i++){&lt;/p&gt; &lt;p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Monaco"&gt;    &lt;span style="color: #a61700"&gt;var&lt;/span&gt; thisElement=$(allLinks[i]);&lt;/p&gt; &lt;p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Monaco"&gt;    &lt;span style="color: #a61700"&gt;var&lt;/span&gt; thisElementUrl=String(thisElement.href);&lt;/p&gt; &lt;p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Monaco"&gt;    &lt;span style="color: #a61700"&gt;var&lt;/span&gt; moduleId=&lt;span style="color: #8012b3"&gt;"module_"&lt;/span&gt;.concat(thisElementUrl.substring(thisElementUrl.lastIndexOf(&lt;span style="color: #8012b3"&gt;'#'&lt;/span&gt;) + &lt;span style="color: #0000ff"&gt;1&lt;/span&gt;));&lt;/p&gt; &lt;p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Monaco"&gt;    thisElement.setAttribute(&lt;span style="color: #8012b3"&gt;"id"&lt;/span&gt;, moduleId);&lt;/p&gt; &lt;p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Monaco"&gt;    thisElement.setAttribute(&lt;span style="color: #8012b3"&gt;"name"&lt;/span&gt;, thisElementUrl.substring(&lt;span style="color: #0000ff"&gt;0&lt;/span&gt;,thisElementUrl.lastIndexOf(&lt;span style="color: #8012b3"&gt;'#'&lt;/span&gt;)));&lt;/p&gt; &lt;p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Monaco"&gt;    thisElement.setAttribute(&lt;span style="color: #8012b3"&gt;"href"&lt;/span&gt;,&lt;span style="color: #8012b3"&gt;""&lt;/span&gt;);&lt;/p&gt; &lt;p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Monaco"&gt;  }&lt;/p&gt; &lt;p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Monaco"&gt;  listenToLinks();&lt;/p&gt; &lt;p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Monaco"&gt; }&lt;/p&gt; &lt;p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Monaco; min-height: 15.0px"&gt;&lt;br /&gt;&lt;/p&gt; &lt;p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Monaco"&gt;&lt;span style="color: #a61700"&gt;function&lt;/span&gt; listenToLinks(){&lt;/p&gt; &lt;p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Monaco; color: #236e25"&gt;//take existing links in the div 'displayableModules' and listen to them...&lt;/p&gt; &lt;p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Monaco"&gt;&lt;span style="color: #a61700"&gt;var&lt;/span&gt; allLinks=$(&lt;span style="color: #8012b3"&gt;"displayableModules"&lt;/span&gt;).getElementsByTagName(&lt;span style="color: #8012b3"&gt;"a"&lt;/span&gt;);&lt;/p&gt; &lt;p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Monaco"&gt;  &lt;span style="color: #a61700"&gt;for&lt;/span&gt; (&lt;span style="color: #a61700"&gt;var&lt;/span&gt; i=&lt;span style="color: #0000ff"&gt;0&lt;/span&gt;;i&lt;alllinks.length;i++){&lt;/p&gt; &lt;p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Monaco"&gt;    &lt;span style="color: #a61700"&gt;var&lt;/span&gt; thisElement=$(allLinks[i]);&lt;/p&gt; &lt;p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Monaco"&gt;    &lt;span style="color: #a61700"&gt;var&lt;/span&gt; thisModule=String(thisElement.id);&lt;/p&gt; &lt;p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Monaco"&gt;    thisElement.observe(&lt;span style="color: #8012b3"&gt;'click'&lt;/span&gt;,transform);&lt;/p&gt; &lt;p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Monaco"&gt;  }&lt;/p&gt; &lt;p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Monaco"&gt;}&lt;/p&gt; &lt;p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Monaco; min-height: 15.0px"&gt;&lt;br /&gt;&lt;/p&gt; &lt;p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Monaco"&gt;&lt;span style="color: #a61700"&gt;function&lt;/span&gt; transform(e) {&lt;/p&gt; &lt;p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Monaco"&gt;  &lt;span style="color: #a61700"&gt;var&lt;/span&gt; moduleElement=e.element();&lt;/p&gt; &lt;p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Monaco"&gt;  &lt;span style="color: #a61700"&gt;var&lt;/span&gt; thisModule=moduleElement.id;&lt;/p&gt; &lt;p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Monaco"&gt;  &lt;span style="color: #a61700"&gt;var&lt;/span&gt; sourceFile=moduleElement.name;&lt;/p&gt; &lt;p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Monaco"&gt;  &lt;span style="color: #a61700"&gt;var&lt;/span&gt; transformer = &lt;span style="color: #a61700"&gt;new&lt;/span&gt; Transformer();&lt;/p&gt; &lt;p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Monaco"&gt;  transformer.setXslt(&lt;span style="color: #8012b3"&gt;"./xsl/graph.xsl"&lt;/span&gt;);&lt;/p&gt; &lt;p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Monaco"&gt;  transformer.setXml(sourceFile);&lt;/p&gt; &lt;p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Monaco"&gt;  transformer.setParam(&lt;span style="color: #8012b3"&gt;"id"&lt;/span&gt;,thisModule.substring(&lt;span style="color: #0000ff"&gt;7&lt;/span&gt;));&lt;/p&gt; &lt;p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Monaco"&gt;  w=window.open(&lt;span style="color: #8012b3"&gt;""&lt;/span&gt;,thisModule,&lt;span style="color: #8012b3"&gt;"width=670,height=500"&lt;/span&gt;);&lt;/p&gt; &lt;p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Monaco"&gt;  w.document.open();&lt;/p&gt; &lt;p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Monaco; color: #8012b3"&gt;&lt;span style="color: #000000"&gt;  w.document.write(&lt;/span&gt;'&lt;html&gt;&lt;head&gt;&lt;title&gt;'&lt;span style="color: #000000"&gt; + thisModule + &lt;/span&gt;'&lt;/title&gt;&lt;/head&gt;&lt;body&gt;&lt;p id="insert"&gt;&lt;/p&gt;&lt;p style="text-align: center;"&gt;Bad channels for module '&lt;span style="color: #000000"&gt; + thisModule.substring(&lt;/span&gt;&lt;span style="color: #0000ff"&gt;7&lt;/span&gt;&lt;span style="color: #000000"&gt;) + &lt;/span&gt;'&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;'&lt;span style="color: #000000"&gt;);&lt;/span&gt;&lt;/p&gt; &lt;p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Monaco"&gt;  f=transformer.exec(w.document);&lt;/p&gt; &lt;p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Monaco"&gt;  w.document.getElementById(&lt;span style="color: #8012b3"&gt;'insert'&lt;/span&gt;).appendChild(f);&lt;/p&gt; &lt;p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Monaco"&gt;  w.document.close();&lt;/p&gt; &lt;p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Monaco"&gt;}&lt;/p&gt; &lt;p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Monaco"&gt;document.observe(&lt;span style="color: #8012b3"&gt;'dom:loaded'&lt;/span&gt;, changeLinks);&lt;/p&gt; &lt;p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Monaco; min-height: 15.0px"&gt;&lt;br /&gt;&lt;/p&gt; &lt;p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Monaco; min-height: 15.0px"&gt;&lt;br /&gt;&lt;/p&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7558659723241238651-2455747384388037242?l=shaunroe.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://shaunroe.blogspot.com/feeds/2455747384388037242/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7558659723241238651&amp;postID=2455747384388037242' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7558659723241238651/posts/default/2455747384388037242'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7558659723241238651/posts/default/2455747384388037242'/><link rel='alternate' type='text/html' href='http://shaunroe.blogspot.com/2009/06/parametrized-xslt-from-javascript-using.html' title='Parametrized Xslt from javascript, using prototype'/><author><name>sroe</name><uri>http://www.blogger.com/profile/16070735661039267060</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7558659723241238651.post-3029727286766672392</id><published>2009-06-03T11:44:00.004+02:00</published><updated>2009-06-03T11:58:32.758+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='JavaScript'/><category scheme='http://www.blogger.com/atom/ns#' term='prototype'/><category scheme='http://www.blogger.com/atom/ns#' term='XSLT'/><title type='text'>Prototype and running XSLT from JavaScript</title><content type='html'>I had some problem marrying the usual method of running an XSLT with &lt;a href="http://www.prototypejs.org/"&gt;prototyp&lt;/a&gt;e's library. Here's my project: Given an xml file of 'bad channel identifiers' for a module (where channels run 0-767), display the bad channels as bars on a graph in SVG in response to a user clicking on another web page link somewhere. I chose to generate the SVG using a parametrised XSLT, but I need to pass the parameters...so I'll be running the XSLT 'manually' from JavaScript instead of using the stylesheet association.&lt;div&gt;Step 1. : Perform a transform manually using a loaded stylesheet and xml. I'll load both via an Ajax request... (this is not production code, but might help someone... and note that I already loaded the prototype library)&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;var Transformer = Class.create({&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;initialize: function(){&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;  this.processor = new XSLTProcessor();&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;},&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;setXslt: function(xslPath){&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;  //need to bind, otherwise 'this' refers to the event context, not the class&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;  new Ajax.Request(xslPath, {asynchronous: false, onSuccess: this._setXsl.bind(this),&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;  onFailure: function(r){alert("failure to load xsl");}});&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;  &lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;},&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;_setXsl: function(r){&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;  this.stylesheet=r.responseXML;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;  if (this.stylesheet==''){&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;    alert("Empty stylesheet");&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;  }&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;  this.processor.importStylesheet(this.stylesheet);&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;},&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;setXml: function(docPath){&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;  //need to bind, otherwise 'this' refers to the event context, not the class&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;   new Ajax.Request(docPath, {asynchronous: false, onSuccess: this._setXml.bind(this),&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;  onFailure: function(r){alert("failure to load xml");}});&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;},&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;_setXml: function(r){&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;  this.xmlDoc = r.responseXML;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;  if (this.xmlDoc==''){&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;    alert("Empty xml doc");&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;  }&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt; },&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;exec: function(){&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;  var fragment = this.processor.transformToFragment(this.xmlDoc, document);&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;  return fragment;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;}&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;});&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;function transform() {&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;var transformer = new Transformer();&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;transformer.setXslt("xsl/test.xsl");&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;transformer.setXml("xml/hello.xml");&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;f = transformer.exec();&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;$('insert').appendChild(f);&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;}&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7558659723241238651-3029727286766672392?l=shaunroe.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://shaunroe.blogspot.com/feeds/3029727286766672392/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7558659723241238651&amp;postID=3029727286766672392' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7558659723241238651/posts/default/3029727286766672392'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7558659723241238651/posts/default/3029727286766672392'/><link rel='alternate' type='text/html' href='http://shaunroe.blogspot.com/2009/06/prototype-and-running-xslt-from.html' title='Prototype and running XSLT from JavaScript'/><author><name>sroe</name><uri>http://www.blogger.com/profile/16070735661039267060</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7558659723241238651.post-3579761772459213263</id><published>2009-05-28T09:02:00.004+02:00</published><updated>2009-06-03T11:53:42.162+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='HttpClient'/><category scheme='http://www.blogger.com/atom/ns#' term='Java'/><category scheme='http://www.blogger.com/atom/ns#' term='REST'/><category scheme='http://www.blogger.com/atom/ns#' term='PUT'/><title type='text'>Java 'PUT' for RESTful service</title><content type='html'>I was looking around for a Java example of 'PUT' for  the CherryPy/COOL server, and at least came across a &lt;a href="http://www.josesandoval.com/2009/03/simple-restful-java-client-and-why.html"&gt;'GET' at Jose Sandovals blog&lt;/a&gt;... but not much on the other methods. Andrea Formica (&lt;a href="http://atlas.ch/muon.html"&gt;Atlas Muons&lt;/a&gt;) is trying to use it to upload calibrations. Here's the solution he came up with, using &lt;a href="http://hc.apache.org/httpclient-3.x/index.html"&gt;Apache's library&lt;/a&gt;:&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"   style="  ;font-family:Helvetica;font-size:12px;"&gt;&lt;div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Monaco; "&gt;&lt;span style="color: rgb(127, 0, 85); "&gt;public&lt;/span&gt; String coolPutCherryPyHttpClient() &lt;span style="color: rgb(127, 0, 85); "&gt;throws&lt;/span&gt; IOException, FileNotFoundException{&lt;/div&gt;&lt;div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Monaco; "&gt;&lt;span class="Apple-tab-span" style="white-space: pre; "&gt;  &lt;/span&gt;String res = &lt;span style="color: rgb(42, 0, 255); "&gt;"none"&lt;/span&gt;;&lt;/div&gt;&lt;div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Monaco; color: rgb(63, 127, 95); "&gt;&lt;span class="Apple-style-span" style="color: rgb(0, 0, 0); "&gt;&lt;span class="Apple-tab-span" style="white-space: pre; "&gt;  &lt;/span&gt;HttpClient client = &lt;span style="color: rgb(127, 0, 85); "&gt;new&lt;/span&gt; HttpClient();&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Monaco; "&gt;&lt;span class="Apple-tab-span" style="white-space: pre; "&gt;  &lt;/span&gt;PutMethod put = &lt;span style="color: rgb(127, 0, 85); "&gt;new&lt;/span&gt; PutMethod(&lt;span style="color: rgb(127, 0, 85); "&gt;this&lt;/span&gt;.&lt;span style="color: rgb(0, 0, 192); "&gt;writenodeUrl&lt;/span&gt;);&lt;/div&gt;&lt;div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Monaco; "&gt;&lt;span class="Apple-tab-span" style="white-space: pre; "&gt; &lt;/span&gt;    &lt;span style="color: rgb(127, 0, 85); "&gt;try&lt;/span&gt; {&lt;/div&gt;&lt;div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Monaco; color: rgb(42, 0, 255); "&gt;&lt;span style="color: rgb(0, 0, 0); "&gt;&lt;span class="Apple-tab-span" style="white-space: pre; "&gt;   &lt;/span&gt;String payloaddata = &lt;/span&gt;"&lt;channels&gt;&lt;channel id="\"&gt; &lt;value name="\"&gt;999&lt;/value&gt;&lt;value name="\"&gt;999.&lt;/value&gt; &lt;/channel&gt;"&lt;/channels&gt;&lt;/div&gt;&lt;div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Monaco; color: rgb(42, 0, 255); "&gt;&lt;span style="color: rgb(0, 0, 0); "&gt;&lt;span class="Apple-tab-span" style="white-space: pre; "&gt;     &lt;/span&gt;+ &lt;/span&gt;""&lt;span style="color: rgb(0, 0, 0); "&gt;;&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Monaco; "&gt;&lt;span class="Apple-tab-span" style="white-space: pre; "&gt;   &lt;/span&gt;client.getParams().setAuthenticationPreemptive(&lt;span style="color: rgb(127, 0, 85); "&gt;true&lt;/span&gt;);&lt;/div&gt;&lt;div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Monaco; "&gt;&lt;span class="Apple-tab-span" style="white-space: pre; "&gt;   &lt;/span&gt;Credentials defaultcreds = &lt;span style="color: rgb(127, 0, 85); "&gt;new&lt;/span&gt; UsernamePasswordCredentials(&lt;span style="color: rgb(127, 0, 85); "&gt;this&lt;/span&gt;.&lt;span style="color: rgb(0, 0, 192); "&gt;name&lt;/span&gt;, &lt;span style="color: rgb(127, 0, 85); "&gt;this&lt;/span&gt;.&lt;span style="color: rgb(0, 0, 192); "&gt;psswd&lt;/span&gt;);&lt;/div&gt;&lt;div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Monaco; "&gt;&lt;span class="Apple-tab-span" style="white-space: pre; "&gt;   &lt;/span&gt;client.getState().setCredentials(&lt;span style="color: rgb(127, 0, 85); "&gt;new&lt;/span&gt; AuthScope(&lt;span class="Apple-style-span" style="color: rgb(42, 0, 255);"&gt;serverUrl&lt;/span&gt;, portNumber, AuthScope.&lt;span style="color: rgb(0, 0, 192); "&gt;ANY_REALM&lt;/span&gt;), defaultcreds);&lt;/div&gt;&lt;div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Monaco; min-height: 15px; "&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Monaco; color: rgb(63, 127, 95); "&gt;&lt;span class="Apple-style-span" style="color: rgb(0, 0, 0); "&gt;&lt;span class="Apple-tab-span" style="white-space: pre; "&gt;   &lt;/span&gt;NameValuePair par = &lt;span style="color: rgb(127, 0, 85); "&gt;new&lt;/span&gt; NameValuePair();&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Monaco; "&gt;&lt;span class="Apple-tab-span" style="white-space: pre; "&gt;   &lt;/span&gt;par.setName(&lt;span style="color: rgb(42, 0, 255); "&gt;"payload"&lt;/span&gt;);&lt;/div&gt;&lt;div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Monaco; "&gt;&lt;span class="Apple-tab-span" style="white-space: pre; "&gt;   &lt;/span&gt;par.setValue(payloaddata);&lt;/div&gt;&lt;div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Monaco; "&gt;&lt;span class="Apple-tab-span" style="white-space: pre; "&gt;   &lt;/span&gt;NameValuePair[] params = &lt;span style="color: rgb(127, 0, 85); "&gt;new&lt;/span&gt; NameValuePair[1];&lt;/div&gt;&lt;div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Monaco; "&gt;&lt;span class="Apple-tab-span" style="white-space: pre; "&gt;   &lt;/span&gt;params[0] = par;&lt;/div&gt;&lt;div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Monaco; "&gt;&lt;span class="Apple-tab-span" style="white-space: pre; "&gt;   &lt;/span&gt;put.setQueryString(params);&lt;/div&gt;&lt;p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Monaco; min-height: 15px; "&gt;&lt;span class="Apple-tab-span" style="white-space: pre; "&gt;   &lt;/span&gt;&lt;br /&gt;&lt;/p&gt;&lt;div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Monaco; color: rgb(63, 127, 95); "&gt;&lt;span style="color: rgb(0, 0, 0); "&gt;&lt;span class="Apple-tab-span" style="white-space: pre; "&gt;   &lt;/span&gt;&lt;/span&gt;// Execute the method.&lt;/div&gt;&lt;div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Monaco; "&gt;&lt;span class="Apple-tab-span" style="white-space: pre; "&gt; &lt;/span&gt;        &lt;span style="color: rgb(127, 0, 85); "&gt;int&lt;/span&gt; statusCode = client.executeMethod(put);&lt;/div&gt;&lt;div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Monaco; min-height: 15px; "&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Monaco; "&gt;&lt;span class="Apple-tab-span" style="white-space: pre; "&gt; &lt;/span&gt;        &lt;span style="color: rgb(127, 0, 85); "&gt;if&lt;/span&gt; (statusCode != HttpStatus.&lt;span style="color: rgb(0, 0, 192); "&gt;SC_OK&lt;/span&gt;) {&lt;/div&gt;&lt;div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Monaco; "&gt;&lt;span class="Apple-tab-span" style="white-space: pre; "&gt; &lt;/span&gt;          System.&lt;span style="color: rgb(0, 0, 192); "&gt;err&lt;/span&gt;.println(&lt;span style="color: rgb(42, 0, 255); "&gt;"Method failed: "&lt;/span&gt; + put.getStatusLine());&lt;/div&gt;&lt;div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Monaco; "&gt;&lt;span class="Apple-tab-span" style="white-space: pre; "&gt; &lt;/span&gt;        }&lt;/div&gt;&lt;div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Monaco; min-height: 15px; "&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Monaco; color: rgb(63, 127, 95); "&gt;&lt;span style="color: rgb(0, 0, 0); "&gt;&lt;span class="Apple-tab-span" style="white-space: pre; "&gt; &lt;/span&gt;        &lt;/span&gt;// Read the response body.&lt;/div&gt;&lt;div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Monaco; "&gt;&lt;span class="Apple-tab-span" style="white-space: pre; "&gt; &lt;/span&gt;        &lt;span style="color: rgb(127, 0, 85); "&gt;byte&lt;/span&gt;[] responseBody = put.getResponseBody();&lt;/div&gt;&lt;div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Monaco; min-height: 15px; "&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Monaco; color: rgb(63, 127, 95); "&gt;&lt;span style="color: rgb(0, 0, 0); "&gt;&lt;span class="Apple-tab-span" style="white-space: pre; "&gt; &lt;/span&gt;        &lt;/span&gt;// Deal with the response.&lt;/div&gt;&lt;div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Monaco; color: rgb(63, 127, 95); "&gt;&lt;span style="color: rgb(0, 0, 0); "&gt;&lt;span class="Apple-tab-span" style="white-space: pre; "&gt; &lt;/span&gt;        &lt;/span&gt;// Use caution: ensure correct character encoding and is not binary data&lt;/div&gt;&lt;div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Monaco; "&gt;&lt;span class="Apple-tab-span" style="white-space: pre; "&gt; &lt;/span&gt;        res = &lt;span style="color: rgb(127, 0, 85); "&gt;new&lt;/span&gt; String(responseBody);&lt;/div&gt;&lt;div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Monaco; "&gt;&lt;span class="Apple-tab-span" style="white-space: pre; "&gt; &lt;/span&gt;        System.&lt;span style="color: rgb(0, 0, 192); "&gt;out&lt;/span&gt;.println(&lt;span style="color: rgb(127, 0, 85); "&gt;new&lt;/span&gt; String(responseBody));&lt;/div&gt;&lt;div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Monaco; min-height: 15px; "&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Monaco; "&gt;&lt;span class="Apple-tab-span" style="white-space: pre; "&gt; &lt;/span&gt;      } &lt;span style="color: rgb(127, 0, 85); "&gt;catch&lt;/span&gt; (HttpException e) {&lt;/div&gt;&lt;div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Monaco; "&gt;&lt;span class="Apple-tab-span" style="white-space: pre; "&gt; &lt;/span&gt;        System.&lt;span style="color: rgb(0, 0, 192); "&gt;err&lt;/span&gt;.println(&lt;span style="color: rgb(42, 0, 255); "&gt;"Fatal protocol violation: "&lt;/span&gt; + e.getMessage());&lt;/div&gt;&lt;div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Monaco; "&gt;&lt;span class="Apple-tab-span" style="white-space: pre; "&gt; &lt;/span&gt;        e.printStackTrace();&lt;/div&gt;&lt;div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Monaco; "&gt;&lt;span class="Apple-tab-span" style="white-space: pre; "&gt; &lt;/span&gt;      } &lt;span style="color: rgb(127, 0, 85); "&gt;catch&lt;/span&gt; (IOException e) {&lt;/div&gt;&lt;div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Monaco; "&gt;&lt;span class="Apple-tab-span" style="white-space: pre; "&gt; &lt;/span&gt;        System.&lt;span style="color: rgb(0, 0, 192); "&gt;err&lt;/span&gt;.println(&lt;span style="color: rgb(42, 0, 255); "&gt;"Fatal transport error: "&lt;/span&gt; + e.getMessage());&lt;/div&gt;&lt;div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Monaco; "&gt;&lt;span class="Apple-tab-span" style="white-space: pre; "&gt; &lt;/span&gt;        e.printStackTrace();&lt;/div&gt;&lt;div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Monaco; "&gt;&lt;span class="Apple-tab-span" style="white-space: pre; "&gt; &lt;/span&gt;      } &lt;span style="color: rgb(127, 0, 85); "&gt;finally&lt;/span&gt; {&lt;/div&gt;&lt;div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Monaco; color: rgb(63, 127, 95); "&gt;&lt;span style="color: rgb(0, 0, 0); "&gt;&lt;span class="Apple-tab-span" style="white-space: pre; "&gt; &lt;/span&gt;        &lt;/span&gt;// Release the connection.&lt;/div&gt;&lt;div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Monaco; "&gt;&lt;span class="Apple-tab-span" style="white-space: pre; "&gt; &lt;/span&gt;        put.releaseConnection();&lt;/div&gt;&lt;div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Monaco; "&gt;&lt;span class="Apple-tab-span" style="white-space: pre; "&gt; &lt;/span&gt;      }  &lt;/div&gt;&lt;div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Monaco; "&gt;&lt;span class="Apple-tab-span" style="white-space: pre; "&gt;  &lt;/span&gt;&lt;span style="color: rgb(127, 0, 85); "&gt;return&lt;/span&gt; res;&lt;/div&gt;&lt;div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Monaco; "&gt;&lt;span class="Apple-tab-span" style="white-space: pre; "&gt; &lt;/span&gt;}&lt;/div&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7558659723241238651-3579761772459213263?l=shaunroe.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://shaunroe.blogspot.com/feeds/3579761772459213263/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7558659723241238651&amp;postID=3579761772459213263' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7558659723241238651/posts/default/3579761772459213263'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7558659723241238651/posts/default/3579761772459213263'/><link rel='alternate' type='text/html' href='http://shaunroe.blogspot.com/2009/05/java-put-for-restful-service.html' title='Java &apos;PUT&apos; for RESTful service'/><author><name>sroe</name><uri>http://www.blogger.com/profile/16070735661039267060</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7558659723241238651.post-3856417988400210983</id><published>2009-05-27T16:33:00.007+02:00</published><updated>2009-06-03T11:54:26.788+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='format-number'/><category scheme='http://www.blogger.com/atom/ns#' term='Saxon'/><category scheme='http://www.blogger.com/atom/ns#' term='XSLT'/><title type='text'>Saxon XSLT 2.0 format-number problem (update!)</title><content type='html'>&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://books.google.com/books?id=Vzy8ap4YYW8C&amp;amp;printsec=frontcover&amp;amp;img=1&amp;amp;zoom=1&amp;amp;sig=ACfU3U3rAkKpN48swgPTEC3xAwrp4RFE2A"&gt;&lt;img style="float:right; margin:0 0 10px 10px;cursor:pointer; cursor:hand;width: 128px; height: 161px;" src="http://books.google.com/books?id=Vzy8ap4YYW8C&amp;amp;printsec=frontcover&amp;amp;img=1&amp;amp;zoom=1&amp;amp;sig=ACfU3U3rAkKpN48swgPTEC3xAwrp4RFE2A" border="0" alt="" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;div&gt;Later: following the post below, I managed to ask on the saxon-help list about this. The reply from Michael Kay (He Should Know!) &lt;/div&gt;&lt;div&gt;is that this is the expected behaviour. Looking in the &lt;a href="http://www.w3.org/TR/xslt#function-format-number"&gt;W3C recommendation&lt;/a&gt;,  it refers to the JDK 1.1 DecimalFormat class,  which indeed states:&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style=" ;font-family:Times;"&gt;&lt;pre&gt;Symbol Meaning  &lt;/pre&gt;&lt;pre&gt;0      a digit  &lt;/pre&gt;&lt;pre&gt;#      a digit, zero shows as absent  &lt;/pre&gt;&lt;pre&gt;.      placeholder for decimal separator  &lt;/pre&gt;&lt;pre&gt;,      placeholder for grouping separator.  &lt;/pre&gt;&lt;pre&gt;;      separates formats.  &lt;/pre&gt;&lt;pre&gt;-      default negative prefix.  &lt;/pre&gt;&lt;pre&gt;%      multiply by 100 and show as percentage  &lt;/pre&gt;&lt;pre&gt;? multiply by 1000 and show as per mille  &lt;/pre&gt;&lt;pre&gt;¤ currency sign; replaced by currency symbol; if&lt;/pre&gt;&lt;pre&gt;         doubled, replaced by international currency symbol.&lt;/pre&gt;&lt;pre&gt;         If present in a pattern, the monetary decimal separator&lt;/pre&gt;&lt;pre&gt;         is used instead of the decimal separator.  &lt;/pre&gt;&lt;pre&gt;X      any other characters can be used in the prefix or suffix  &lt;/pre&gt;&lt;pre&gt;'      used to quote special characters in a prefix or suffix.  &lt;/pre&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;...so , perverse as it seems, the behaviour is as advertised.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;Original post:&lt;/b&gt;&lt;/div&gt;One of the (many) advantages of using XSLT 2.0 is its supposed ability to understand scientific notation, e.g. 1E-2 is correctly interpreted as 0.01. However the only implementation I know of for XSLT 2.0 is &lt;a href="http://www.saxonica.com/"&gt;Saxon&lt;/a&gt;, so the XSLT 2.0 standard basically defines this one application. Here's a nasty I discovered while trying to format exponential numbers using Saxon 9.1.0.6: Formatting zero with&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;format-number(xs:double($myNumber),'#.#######')&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"&gt;causes an empty string to be output. &lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"&gt;Heres a sample xml:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;p  style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Helvetica; color:#000096;"&gt;&lt;span class="Apple-style-span" style="color: rgb(51, 51, 255);"&gt;&amp;lt;numbers&gt;&lt;/span&gt;&lt;span&gt;&lt;span class="Apple-style-span" style="color: rgb(51, 51, 255);"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="color: rgb(51, 51, 255);"&gt;&amp;lt;test&gt;&lt;/span&gt;&lt;span&gt;&lt;span class="Apple-style-span" style="color: rgb(51, 51, 255);"&gt; id&lt;/span&gt;&lt;/span&gt;&lt;span&gt;&lt;span class="Apple-style-span" style="color: rgb(51, 51, 255);"&gt;=&lt;/span&gt;&lt;/span&gt;&lt;span&gt;&lt;span class="Apple-style-span" style="color: rgb(51, 51, 255);"&gt;"1"&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="color: rgb(51, 51, 255);"&gt;&gt;&lt;/span&gt;&lt;span&gt;&lt;span class="Apple-style-span" style="color: rgb(51, 51, 255);"&gt;1.3&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="color: rgb(51, 51, 255);"&gt;&amp;lt;/test&gt;&lt;/span&gt;&lt;span&gt;&lt;span class="Apple-style-span" style="color: rgb(51, 51, 255);"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="color: rgb(51, 51, 255);"&gt;&amp;lt;test&gt;&lt;/span&gt;&lt;span&gt;&lt;span class="Apple-style-span" style="color: rgb(51, 51, 255);"&gt; id&lt;/span&gt;&lt;/span&gt;&lt;span&gt;&lt;span class="Apple-style-span" style="color: rgb(51, 51, 255);"&gt;=&lt;/span&gt;&lt;/span&gt;&lt;span&gt;&lt;span class="Apple-style-span" style="color: rgb(51, 51, 255);"&gt;"2"&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="color: rgb(51, 51, 255);"&gt;&gt;&lt;/span&gt;&lt;span&gt;&lt;span class="Apple-style-span" style="color: rgb(51, 51, 255);"&gt;8E-4&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="color: rgb(51, 51, 255);"&gt;&amp;lt;/test&gt;&lt;/span&gt;&lt;span&gt;&lt;span class="Apple-style-span" style="color: rgb(51, 51, 255);"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="color: rgb(51, 51, 255);"&gt;&amp;lt;test&gt;&lt;/span&gt;&lt;span&gt;&lt;span class="Apple-style-span" style="color: rgb(51, 51, 255);"&gt; id&lt;/span&gt;&lt;/span&gt;&lt;span&gt;&lt;span class="Apple-style-span" style="color: rgb(51, 51, 255);"&gt;=&lt;/span&gt;&lt;/span&gt;&lt;span&gt;&lt;span class="Apple-style-span" style="color: rgb(51, 51, 255);"&gt;"3"&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="color: rgb(51, 51, 255);"&gt;&gt;&lt;/span&gt;&lt;span&gt;&lt;span class="Apple-style-span" style="color: rgb(51, 51, 255);"&gt;8E-8&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="color: rgb(51, 51, 255);"&gt;&amp;lt;/test&gt;&lt;/span&gt;&lt;span&gt;&lt;span class="Apple-style-span" style="color: rgb(51, 51, 255);"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="color: rgb(51, 51, 255);"&gt;&amp;lt;test&gt;&lt;/span&gt;&lt;span&gt;&lt;span class="Apple-style-span" style="color: rgb(51, 51, 255);"&gt; id&lt;/span&gt;&lt;/span&gt;&lt;span&gt;&lt;span class="Apple-style-span" style="color: rgb(51, 51, 255);"&gt;=&lt;/span&gt;&lt;/span&gt;&lt;span&gt;&lt;span class="Apple-style-span" style="color: rgb(51, 51, 255);"&gt;"4"&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="color: rgb(51, 51, 255);"&gt;&gt;&lt;/span&gt;&lt;span&gt;&lt;span class="Apple-style-span" style="color: rgb(51, 51, 255);"&gt;0.0&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="color: rgb(51, 51, 255);"&gt;&amp;lt;/test&gt;&lt;/span&gt;&lt;span&gt;&lt;span class="Apple-style-span" style="color: rgb(51, 51, 255);"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="color: rgb(51, 51, 255);"&gt;&amp;lt;test&gt;&lt;/span&gt;&lt;span&gt;&lt;span class="Apple-style-span" style="color: rgb(51, 51, 255);"&gt; id&lt;/span&gt;&lt;/span&gt;&lt;span&gt;&lt;span class="Apple-style-span" style="color: rgb(51, 51, 255);"&gt;=&lt;/span&gt;&lt;/span&gt;&lt;span&gt;&lt;span class="Apple-style-span" style="color: rgb(51, 51, 255);"&gt;"5"&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="color: rgb(51, 51, 255);"&gt;&gt;&lt;/span&gt;&lt;span&gt;&lt;span class="Apple-style-span" style="color: rgb(51, 51, 255);"&gt;0&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="color: rgb(51, 51, 255);"&gt;&amp;lt;/test&gt;&lt;/span&gt;&lt;span&gt;&lt;span class="Apple-style-span" style="color: rgb(51, 51, 255);"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="color: rgb(51, 51, 255);"&gt;&amp;lt;/numbers&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Helvetica; color: #000096"&gt;&lt;br /&gt;&lt;/p&gt;&lt;p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 12px/normal Helvetica; "&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;and an xslt:&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Helvetica; color: #000096"&gt;&lt;/p&gt;&lt;p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Helvetica"&gt;&lt;span&gt;&lt;span class="Apple-style-span" style="color: rgb(51, 51, 255);"&gt;&amp;lt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="color: rgb(51, 51, 255);"&gt;?xml version="1.0" encoding="UTF-8"?&gt;&lt;br /&gt;&lt;/span&gt;&lt;span&gt;&lt;span class="Apple-style-span" style="color: rgb(51, 51, 255);"&gt;&amp;lt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="color: rgb(51, 51, 255);"&gt;xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"&lt;br /&gt;  xmlns:xs="http://www.w3.org/2001/XMLSchema"&lt;br /&gt;  exclude-result-prefixes="xs"&lt;br /&gt;  version="2.0"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span&gt;&lt;span class="Apple-style-span" style="color: rgb(51, 51, 255);"&gt;&amp;lt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="color: rgb(51, 51, 255);"&gt;xsl:output method="text"/&gt;&lt;br /&gt;&lt;/span&gt;&lt;span&gt;&lt;span class="Apple-style-span" style="color: rgb(51, 51, 255);"&gt;&amp;lt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="color: rgb(51, 51, 255);"&gt;xsl:template match="numbers"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span&gt;&lt;span class="Apple-style-span" style="color: rgb(51, 51, 255);"&gt;&amp;lt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="color: rgb(51, 51, 255);"&gt;xsl:apply-templates/&gt;&lt;br /&gt;&lt;/span&gt;&lt;span&gt;&lt;span class="Apple-style-span" style="color: rgb(51, 51, 255);"&gt;&amp;lt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="color: rgb(51, 51, 255);"&gt;/xsl:template&gt;&lt;br /&gt;&lt;/span&gt;&lt;span&gt;&lt;span class="Apple-style-span" style="color: rgb(51, 51, 255);"&gt;&amp;lt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="color: rgb(51, 51, 255);"&gt;xsl:template match="test"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span&gt;&lt;span class="Apple-style-span" style="color: rgb(51, 51, 255);"&gt;&amp;lt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="color: rgb(51, 51, 255);"&gt;xsl:value-of select="concat('Original: ',text())"/&gt;&lt;br /&gt;    Format with #.#####&lt;br /&gt;    '&lt;/span&gt;&lt;span&gt;&lt;span class="Apple-style-span" style="color: rgb(51, 51, 255);"&gt;&amp;lt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="color: rgb(51, 51, 255);"&gt;xsl:value-of select="format-number(xs:double(.), '#.#####')"/&gt;'&lt;br /&gt;    Format with #.#########&lt;br /&gt;    '&lt;/span&gt;&lt;span&gt;&lt;span class="Apple-style-span" style="color: rgb(51, 51, 255);"&gt;&amp;lt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="color: rgb(51, 51, 255);"&gt;xsl:value-of select="format-number(xs:double(.), '#.#########')"/&gt;'&lt;br /&gt;&lt;/span&gt;&lt;span&gt;&lt;span class="Apple-style-span" style="color: rgb(51, 51, 255);"&gt;&amp;lt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="color: rgb(51, 51, 255);"&gt;/xsl:template&gt;&lt;br /&gt;&lt;/span&gt;&lt;span&gt;&lt;span class="Apple-style-span" style="color: rgb(51, 51, 255);"&gt;&amp;lt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="color: rgb(51, 51, 255);"&gt;/xsl:stylesheet&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Helvetica; color: #000096"&gt;&lt;br /&gt;&lt;/p&gt;&lt;/span&gt;&lt;p  style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Helvetica; color:#993300;"&gt;&lt;span class="Apple-style-span" style=""&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;But the output is not what one would expect:&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p  style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Helvetica; color:#993300;"&gt;&lt;span class="Apple-style-span" style="color: rgb(0, 100, 200);"&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Helvetica"&gt; &lt;span class="Apple-style-span" style="color: rgb(0, 0, 153);"&gt;Original: 1.3&lt;br /&gt;    Format with #.#####&lt;br /&gt;    '1.3'&lt;br /&gt;    Format with #.#########&lt;br /&gt;    '1.3'&lt;br /&gt;&lt;br /&gt;Original: 8E-4&lt;br /&gt;    Format with #.#####&lt;br /&gt;    '.0008'&lt;br /&gt;    Format with #.#########&lt;br /&gt;    '.0008'&lt;br /&gt;&lt;br /&gt;Original: 8E-8&lt;br /&gt;    Format with #.#####&lt;br /&gt;    ''&lt;br /&gt;    Format with #.#########&lt;br /&gt;    '.00000008'&lt;br /&gt;&lt;br /&gt;Original: 0.0&lt;br /&gt;    Format with #.#####&lt;br /&gt;    ''&lt;br /&gt;    Format with #.#########&lt;br /&gt;    ''&lt;br /&gt;&lt;br /&gt;Original: 0&lt;br /&gt;    Format with #.#####&lt;br /&gt;    ''&lt;br /&gt;    Format with #.#########&lt;br /&gt;    ''&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Helvetica; color: #000096"&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/7558659723241238651-3856417988400210983?l=shaunroe.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://shaunroe.blogspot.com/feeds/3856417988400210983/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7558659723241238651&amp;postID=3856417988400210983' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7558659723241238651/posts/default/3856417988400210983'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7558659723241238651/posts/default/3856417988400210983'/><link rel='alternate' type='text/html' href='http://shaunroe.blogspot.com/2009/05/saxon-xslt-20-format-number-problem.html' title='Saxon XSLT 2.0 format-number problem (update!)'/><author><name>sroe</name><uri>http://www.blogger.com/profile/16070735661039267060</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7558659723241238651.post-4732776725047440051</id><published>2009-05-26T18:21:00.003+02:00</published><updated>2009-06-03T11:54:39.905+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='cache'/><category scheme='http://www.blogger.com/atom/ns#' term='CherryPy'/><title type='text'>CherryPy Caching: reprise</title><content type='html'>Finally I had to turn off caching, even with my fix in place. Users reported a malformed xml being returned for certain queries, and it turned out that anything longer than the maxobjectsize was being cached and returned truncated. I'm sure there's an easy way around this, but not sure I want to spend more time on it just now.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7558659723241238651-4732776725047440051?l=shaunroe.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://shaunroe.blogspot.com/feeds/4732776725047440051/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7558659723241238651&amp;postID=4732776725047440051' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7558659723241238651/posts/default/4732776725047440051'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7558659723241238651/posts/default/4732776725047440051'/><link rel='alternate' type='text/html' href='http://shaunroe.blogspot.com/2009/05/cherrypy-caching-reprise.html' title='CherryPy Caching: reprise'/><author><name>sroe</name><uri>http://www.blogger.com/profile/16070735661039267060</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7558659723241238651.post-3538834449616500051</id><published>2009-05-15T10:01:00.008+02:00</published><updated>2009-06-03T11:55:18.410+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='cache'/><category scheme='http://www.blogger.com/atom/ns#' term='CherryPy'/><title type='text'>CherryPy Caching</title><content type='html'>&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://www.cherrypyessentials.com/images/cherrypyessentialscover.jpg"&gt;&lt;img style="float:right; margin:0 10px 10px 0;cursor:pointer; cursor:hand;width: 150px; height: 191px;" src="http://www.cherrypyessentials.com/images/cherrypyessentialscover.jpg" border="0" alt="" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;I just tried turning on &lt;/span&gt;&lt;a href="http://www.cherrypy.org/"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;CherryP&lt;/span&gt;&lt;/a&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;y web caching, this is one of the few things which receives only very cursory treatment in &lt;/span&gt;&lt;a href="http://www.defuze.org/"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;Sylvain Hellegouarch&lt;/span&gt;&lt;/a&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;'s  excellent book, '&lt;/span&gt;&lt;a href="http://www.cherrypyessentials.com/"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;CherryPy Essentials&lt;/span&gt;&lt;/a&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;'. I managed by incorporating the &lt;/span&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;conf = {'/':{'tools.caching.on':True}}&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;line in my code, however I was dismayed to discover that once on, I couldn't form a request would &lt;/span&gt;&lt;span class="Apple-style-span" style="font-style: italic;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;not&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt; get the cached result. Neither 'Cache-Control:max-age=0' nor 'Pragma: no-cache' would do it. Looking into the code (I'm using v. 3.1.1), I found the caching.py tool and indeed saw it pays pretty much no attention to the http request headers except (bizarrely, I think) the 'Vary' header. I've inserted a few lines into caching.py to fix this and submitted a &lt;/span&gt;&lt;a href="http://www.cherrypy.org/ticket/918"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;trac bug&lt;/span&gt;&lt;/a&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;, so we'll see whether this changes. The code lines are reproduced here:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-style-span"  style="font-size:x-small;"&gt;#some people still use Pragma : no-cache to demand a fresh resource&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-style-span"  style="font-size:x-small;"&gt;        pragma_no_cache=False&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-style-span"  style="font-size:x-small;"&gt;        pragma_header=request.headers.get('Pragma')&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-style-span"  style="font-size:x-small;"&gt;        if pragma_header:&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-style-span"  style="font-size:x-small;"&gt;            pragma_values=[header.strip() for header in pragma_header.split(',')]&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-style-span"  style="font-size:x-small;"&gt;            for this_value in pragma_values:&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-style-span"  style="font-size:x-small;"&gt;                if 'no-cache' in this_value:&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-style-span"  style="font-size:x-small;"&gt;                    pragma_no_cache=True&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-style-span"  style="font-size:x-small;"&gt;                    break&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-style-span"  style="font-size:x-small;"&gt;        #added by shaun, look at cache-control&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-style-span"  style="font-size:x-small;"&gt;        max_acceptable_age=MemoryCache.delay&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-style-span"  style="font-size:x-small;"&gt;        age_seconds=int(response.time - create_time)&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-style-span"  style="font-size:x-small;"&gt;        cache_control_header=request.headers.get('Cache-Control')&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-style-span"  style="font-size:x-small;"&gt;        if cache_control_header:&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-style-span"  style="font-size:x-small;"&gt;            #split string on commas to get the multiple words&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-style-span"  style="font-size:x-small;"&gt;            cache_control_values=[header.strip() for header in cache_control_header.split(',')]&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-style-span"  style="font-size:x-small;"&gt;            #look for max-age&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-style-span"  style="font-size:x-small;"&gt;            for this_value in cache_control_values:&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-style-span"  style="font-size:x-small;"&gt;                if ('max-age' in this_value) and ('=' in this_value):&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-style-span"  style="font-size:x-small;"&gt;                    age_pair=[age.strip() for age in this_value.split('=')]&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-style-span"  style="font-size:x-small;"&gt;                    if age_pair[1].isdigit():&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-style-span"  style="font-size:x-small;"&gt;                      max_acceptable_age=int(age_pair[1])&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-style-span"  style="font-size:x-small;"&gt;                    break&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-style-span"  style="font-size:x-small;"&gt;                  &lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-style-span"  style="font-size:x-small;"&gt;        #return if the cache is older than the acceptable age&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-style-span"  style="font-size:x-small;"&gt;        if (age_seconds &gt; max_acceptable_age) or pragma_no_cache:&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-style-span"  style="font-size:x-small;"&gt;            request.cached = False&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-style-span"  style="font-size:x-small;"&gt;            request.cacheable = True&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-style-span"  style="font-size:x-small;"&gt;            return False&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-style-span"  style="font-size:x-small;"&gt;            &lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-style-span"  style="font-size:x-small;"&gt;        # Add the required Age header&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-style-span"  style="font-size:x-small;"&gt;        response.headers["Age"] = str(age_seconds)&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7558659723241238651-3538834449616500051?l=shaunroe.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://shaunroe.blogspot.com/feeds/3538834449616500051/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7558659723241238651&amp;postID=3538834449616500051' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7558659723241238651/posts/default/3538834449616500051'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7558659723241238651/posts/default/3538834449616500051'/><link rel='alternate' type='text/html' href='http://shaunroe.blogspot.com/2009/05/cherrypy-caching.html' title='CherryPy Caching'/><author><name>sroe</name><uri>http://www.blogger.com/profile/16070735661039267060</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7558659723241238651.post-8160630049886729888</id><published>2008-06-04T09:32:00.003+02:00</published><updated>2008-06-04T09:36:37.197+02:00</updated><title type='text'>Reviews and DB</title><content type='html'>I've been reviewing the InDetGlobalMonitoring code for Heidi, and trying to get more info into my 'run summary' page for the FDR. This second has not been easy, I need to understand the Tier0 database a lot better!&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;On the bright side, I had my SEDUX paper accepted for the SVG conference in Nuremberg in August.&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7558659723241238651-8160630049886729888?l=shaunroe.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://shaunroe.blogspot.com/feeds/8160630049886729888/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7558659723241238651&amp;postID=8160630049886729888' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7558659723241238651/posts/default/8160630049886729888'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7558659723241238651/posts/default/8160630049886729888'/><link rel='alternate' type='text/html' href='http://shaunroe.blogspot.com/2008/06/reviews-and-db.html' title='Reviews and DB'/><author><name>sroe</name><uri>http://www.blogger.com/profile/16070735661039267060</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7558659723241238651.post-8975498022621619281</id><published>2008-05-22T14:01:00.004+02:00</published><updated>2009-06-03T11:54:54.065+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='jnlp'/><category scheme='http://www.blogger.com/atom/ns#' term='webstart'/><category scheme='http://www.blogger.com/atom/ns#' term='PHP'/><title type='text'>Serving jnlp from PHP for WebStart applications</title><content type='html'>So... I had to incorporate the TriggerTool information in the runlist summary, but it is served as a jnlp with arguments in the jnlp format. My first attempts at generating the jnlp dynamically would work either in Safari or in Firefox, but not both until I renamed the web application to 'test.php.jnlp'.. this worked but is ugly. Finally I hit on the solution: not only making the http header into 'Content-Type: application/x-java-jnlp-file' but also adding '; name=smtp.jnlp' onto the end of that. Now the file comes back as a .jnlp which is recognised by both browsers.&lt;div&gt;This last week, meanwhile has been a hectic rush as I was initially blamed for submitting broken tags into Athena. It turned out it was a subtle bug in the pixel software which went something like this:&lt;/div&gt;&lt;div&gt;Gaudi has a templated stream insertion operator for all types.&lt;/div&gt;&lt;div&gt;A PixelDcsData class also had a stream insertion operator.&lt;/div&gt;&lt;div&gt;A PixelDcsData class also had a &lt;span class="Apple-style-span" style="font-style: italic;"&gt;single argument constructor, &lt;/span&gt;that argument being 'Identifier'.&lt;/div&gt;&lt;div&gt;Now, when trying to output 'Identifier' with stream insertion, the compiler complained of an ambiguously overloaded '&lt;&lt;' because it couldn't decide whether to convert Identifier to a PixelDcsData class and then use the custom '&lt;&lt;' or use the intrinsic templated '&lt;&lt;'. &lt;span class="Apple-style-span" style="font-weight: bold;"&gt;Constructors with a single argument act as conversion operators&lt;/span&gt;. To avoid this, qualify the constructor with 'explicit'.&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7558659723241238651-8975498022621619281?l=shaunroe.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://shaunroe.blogspot.com/feeds/8975498022621619281/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7558659723241238651&amp;postID=8975498022621619281' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7558659723241238651/posts/default/8975498022621619281'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7558659723241238651/posts/default/8975498022621619281'/><link rel='alternate' type='text/html' href='http://shaunroe.blogspot.com/2008/05/serving-jnlp-from-php-for-webstart.html' title='Serving jnlp from PHP for WebStart applications'/><author><name>sroe</name><uri>http://www.blogger.com/profile/16070735661039267060</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7558659723241238651.post-5497629810659055048</id><published>2008-05-07T17:50:00.002+02:00</published><updated>2008-05-07T17:56:17.637+02:00</updated><title type='text'>Tier0 and other animals</title><content type='html'>Managed to get the data filenames from Tier0; wrote a PHP service which returns plain text, html or xml according to the 'Accept' header sent in the request. Wrote documentation and an example application, then incorporated this into my 'run details' service.&lt;div&gt;Created an /SCT/Derived/Monitoring folder in Cool for Kazu. &lt;/div&gt;&lt;div&gt;Over the last week: created a Plone site at home and made this visible via dyndns as a  demo of what it can do, following from a presentation on collaborative tools last week. It seems that CERN is opting for Sharepoint as a CMS; a very bad decision, given that all our data and programs are running under linux...&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7558659723241238651-5497629810659055048?l=shaunroe.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://shaunroe.blogspot.com/feeds/5497629810659055048/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7558659723241238651&amp;postID=5497629810659055048' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7558659723241238651/posts/default/5497629810659055048'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7558659723241238651/posts/default/5497629810659055048'/><link rel='alternate' type='text/html' href='http://shaunroe.blogspot.com/2008/05/tier0-and-other-animals.html' title='Tier0 and other animals'/><author><name>sroe</name><uri>http://www.blogger.com/profile/16070735661039267060</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7558659723241238651.post-3774324175363204594</id><published>2008-04-23T08:34:00.002+02:00</published><updated>2008-04-23T08:40:44.647+02:00</updated><title type='text'>Absence</title><content type='html'>Long time since I updated this... I missed some Wednesdays due to meetings, then was in &lt;a href="http://indico.cern.ch/conferenceTimeTable.py?confId=23706"&gt;Ringberg&lt;/a&gt; ... now ill !&lt;div&gt;I managed to get the SCT Configurations to read dead strips and inserted this in SiClusterizationTool for release 14.1.0 before I went to Ringberg; however that release still has not been built due to various problems. Carl Gwilliam has been testing it and patching it since then.&lt;/div&gt;&lt;div&gt;I volunteered to help the Muons insert their cabling into Cool, although I have to wonder about the methodology they are using: of 1.3 million table entries, 70% of them are empty.&lt;/div&gt;&lt;div&gt;Today I'll fix the detector mask interpretation in runlist and see where I get to ...&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7558659723241238651-3774324175363204594?l=shaunroe.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://shaunroe.blogspot.com/feeds/3774324175363204594/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7558659723241238651&amp;postID=3774324175363204594' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7558659723241238651/posts/default/3774324175363204594'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7558659723241238651/posts/default/3774324175363204594'/><link rel='alternate' type='text/html' href='http://shaunroe.blogspot.com/2008/04/absence.html' title='Absence'/><author><name>sroe</name><uri>http://www.blogger.com/profile/16070735661039267060</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7558659723241238651.post-2643007930648167458</id><published>2008-03-06T14:30:00.003+01:00</published><updated>2008-03-06T14:39:35.668+01:00</updated><title type='text'>M6 and all that</title><content type='html'>Busy week. Spent all weekend making a &lt;a href="http://atlas-service-runinformation.web.cern.ch/atlas-service-runinformation/"&gt;run portal for run information&lt;/a&gt;, incorporating an rss 2.0 feed. This meant lots of changes: date input for the run list, 'breadcrumb trail' in all the xsl transforms to produce the web pages, cron job producing rss feed and extra xsl to transform an rss feed to html for ajax injection into the original page. Along the way, found a &lt;a href="http://sroe.home.cern.ch/sroe/test/test.xml"&gt;nasty bug&lt;/a&gt; in Safari 3.0.4 concerning css styling of xml. Monday, Tuesday: introduced tagging in the CherryPy 'PUT' interface, and started debugging some problems which Else had. Finally finished this on Wednesday, and started to tidy up SCT_Clusterization, adding an IdentifierHash method in the SCT_ConditionsSummary interface and testing it. Today spent time debugging the new date input to runlist, since it turns out that runs can overlap in time intervals if they run in different partitions.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7558659723241238651-2643007930648167458?l=shaunroe.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://shaunroe.blogspot.com/feeds/2643007930648167458/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7558659723241238651&amp;postID=2643007930648167458' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7558659723241238651/posts/default/2643007930648167458'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7558659723241238651/posts/default/2643007930648167458'/><link rel='alternate' type='text/html' href='http://shaunroe.blogspot.com/2008/03/m6-and-all-that.html' title='M6 and all that'/><author><name>sroe</name><uri>http://www.blogger.com/profile/16070735661039267060</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7558659723241238651.post-3753570440020491968</id><published>2008-02-27T17:12:00.002+01:00</published><updated>2008-02-27T17:20:20.194+01:00</updated><title type='text'>Pleas and deadlines</title><content type='html'>Spent the last four days trying to write new SCT conditions services, with a new interface for all indet services. This was finally tagged yesterday, in theory for release 14 deadline at 18:00 yesterday. However it looks like there were lots of (other) problems with the nightly, so I guess the deadline shifted a bit. It all works and I wrote some example code for both the summary interface and one of the derived tools. Today I made some cabling representations for the SCT with an xsl layer displaying the cabling files, e.g.&lt;a href="http://sroe.home.cern.ch/sroe/mapping/barrel.xml"&gt; the barrel&lt;/a&gt;, and similar files exist for endcap C and A. Looks like Bruce is close to uploading to the official database, so maybe I have to get busy with cabling soon. Cabling had new methods injected by Nick Barlow to use the identifier hash instead of identifier, the test code needs updating.&lt;div&gt;Next: runlist needs a date input, and the trigger people want a db 'front door' page from me (when did I volunteer for that?)&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7558659723241238651-3753570440020491968?l=shaunroe.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://shaunroe.blogspot.com/feeds/3753570440020491968/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7558659723241238651&amp;postID=3753570440020491968' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7558659723241238651/posts/default/3753570440020491968'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7558659723241238651/posts/default/3753570440020491968'/><link rel='alternate' type='text/html' href='http://shaunroe.blogspot.com/2008/02/pleas-and-deadlines.html' title='Pleas and deadlines'/><author><name>sroe</name><uri>http://www.blogger.com/profile/16070735661039267060</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7558659723241238651.post-3484431566700601859</id><published>2008-02-20T19:31:00.002+01:00</published><updated>2008-02-20T19:36:29.423+01:00</updated><title type='text'>SCT conditions et al.</title><content type='html'>Monday I was debugging Else's code, which uses CherryPy 'PUT' from PHP. Discovered some useful things about PHP CUrl (quirks, shall we say?) such as specifying the PUT method means a file must be provided... and then my CherryPy hangs with a 'Continue 100' message...unless one uses the 'custom' http method and declares it to be 'PUT', so then its possible to use the POSTFIELDs.&lt;div&gt;Yetserday decided on new SCT and InDet conditions reporting service, so I've started to program that. Today I updated a lot of documentation (how to write services, CherryPy, and InDetConditionsDB)  and continued in the implementation.&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7558659723241238651-3484431566700601859?l=shaunroe.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://shaunroe.blogspot.com/feeds/3484431566700601859/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7558659723241238651&amp;postID=3484431566700601859' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7558659723241238651/posts/default/3484431566700601859'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7558659723241238651/posts/default/3484431566700601859'/><link rel='alternate' type='text/html' href='http://shaunroe.blogspot.com/2008/02/sct-conditions-et-al.html' title='SCT conditions et al.'/><author><name>sroe</name><uri>http://www.blogger.com/profile/16070735661039267060</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7558659723241238651.post-8143522580786089378</id><published>2008-02-08T10:29:00.000+01:00</published><updated>2008-02-08T10:35:00.385+01:00</updated><title type='text'>FDR and all that</title><content type='html'>In the midst of the Full Dress Rehearsal, and the runlist is being used a lot; I had to make a special version just for FDR data as well. Over the last couple of weeks I've created a new cabling file and made utilities to check consistency with Dave Robinsons output, investigated (and implemented) some ways of making the bytestream converter quicker and implemented a monitor program for the CherryPy server, so it mails me if the server stops working or the machine become unreachable. This Wednesday was mostly spent investigating Kazu's problem with the DCS data access; it seems that the folders were being transferred into the database with the wrong folder dscription. I alerted Jim Cook, who fixed it pretty quickly.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7558659723241238651-8143522580786089378?l=shaunroe.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://shaunroe.blogspot.com/feeds/8143522580786089378/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7558659723241238651&amp;postID=8143522580786089378' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7558659723241238651/posts/default/8143522580786089378'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7558659723241238651/posts/default/8143522580786089378'/><link rel='alternate' type='text/html' href='http://shaunroe.blogspot.com/2008/02/fdr-and-all-that.html' title='FDR and all that'/><author><name>sroe</name><uri>http://www.blogger.com/profile/16070735661039267060</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7558659723241238651.post-7158040428212966418</id><published>2008-01-23T09:34:00.000+01:00</published><updated>2008-01-23T09:52:27.683+01:00</updated><title type='text'>Cabling, decisions, CherryPy</title><content type='html'>Cabling: The cabling was slightly more of a headache than I at first thought...an error in my xsl produced empty slots in the cabling file which then made Athena crash, because I had enabled conversion exceptions in the input stream and then never trapped the exception. Both the file and the reading package are now fixed, although its clear I need better checking of the file so I made a quick C++ command line utility to do that. There is still at least one funny on disk 9c (a duplicated identifier), which probably means there's another funny I haven't spotted yet. &lt;span class="Apple-style-span" style="font-weight: bold;"&gt;We really need this info in the database&lt;/span&gt;, I've given up asking and I'm trying to find another way to get the configuration info.&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Decisions: The CERN group is being reorganized and my activities straddle both camps (i.e. two different sections): the detector subsystem and the database infrastructure. So where will I end up? The detectors need software people &lt;span class="Apple-style-span" style="font-style: italic;"&gt;in the systems themselves&lt;/span&gt;, but the software work I do also needs 'expert' direction and supervision... watch this space.&lt;br /&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;CherryPy: &lt;a href="http://sroe.home.cern.ch/sroe/dbstatus/COOL_PUT_interface.pdf"&gt;Documented the 'PUT' interface&lt;/a&gt; and made a &lt;a href="https://twiki.cern.ch/twiki/bin/view/Atlas/CoolCherryPy"&gt;wiki&lt;/a&gt; for both the GET and PUT methods. It seems the Muon people are interested in using it and Andrea Formica very quickly made a Java app which demonstrates its usage.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7558659723241238651-7158040428212966418?l=shaunroe.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://shaunroe.blogspot.com/feeds/7158040428212966418/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7558659723241238651&amp;postID=7158040428212966418' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7558659723241238651/posts/default/7158040428212966418'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7558659723241238651/posts/default/7158040428212966418'/><link rel='alternate' type='text/html' href='http://shaunroe.blogspot.com/2008/01/cabling-decisions-cherrypy.html' title='Cabling, decisions, CherryPy'/><author><name>sroe</name><uri>http://www.blogger.com/profile/16070735661039267060</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7558659723241238651.post-8215461504975847422</id><published>2008-01-16T08:55:00.000+01:00</published><updated>2008-01-16T08:59:22.529+01:00</updated><title type='text'>Happy New Year...</title><content type='html'>First task was to review the Bytestream converter package and introduce some documentation. This is not complete, but certainly better. Things are starting to get more exciting now the SCT can actually be cooled and run. Yesterday I had to make a cabling file from the configuration... still no database info available; I should try to find a work around. Also implemented a multi-channel 'PUT' on the CherryPy interface for Sergey...all in all, a fairly productive start to the year.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7558659723241238651-8215461504975847422?l=shaunroe.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://shaunroe.blogspot.com/feeds/8215461504975847422/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7558659723241238651&amp;postID=8215461504975847422' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7558659723241238651/posts/default/8215461504975847422'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7558659723241238651/posts/default/8215461504975847422'/><link rel='alternate' type='text/html' href='http://shaunroe.blogspot.com/2008/01/happy-new-year.html' title='Happy New Year...'/><author><name>sroe</name><uri>http://www.blogger.com/profile/16070735661039267060</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7558659723241238651.post-7587213019445237375</id><published>2007-12-06T16:23:00.001+01:00</published><updated>2007-12-06T16:27:28.815+01:00</updated><title type='text'>PUT in place</title><content type='html'>Reverted to allowing only 'PUT' for a pure RESTful interface, and made a demo editor (very simple) which takes the payload of a COOL folder and uses XSL to create an XHTML form for input of new parameters. The data 'PUT' method I implemented accepts either a file or a string, so it is feasible to use it with an XmlHttpRequest object to PUT a URL with the conventional ?payload=xxxxxx kind of notation. All this is protected with basic authentication over the internal network.&lt;div&gt;Else Lytken tried it out, it seems ok. &lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7558659723241238651-7587213019445237375?l=shaunroe.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://shaunroe.blogspot.com/feeds/7587213019445237375/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7558659723241238651&amp;postID=7587213019445237375' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7558659723241238651/posts/default/7587213019445237375'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7558659723241238651/posts/default/7587213019445237375'/><link rel='alternate' type='text/html' href='http://shaunroe.blogspot.com/2007/12/put-in-place.html' title='PUT in place'/><author><name>sroe</name><uri>http://www.blogger.com/profile/16070735661039267060</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7558659723241238651.post-4041242665460007426</id><published>2007-11-29T15:59:00.000+01:00</published><updated>2007-11-29T16:04:11.071+01:00</updated><title type='text'>PUT, POST and CherryPy</title><content type='html'>I spent yesterday implementing a 'PUT' of data to the COOL database, using an xml description for the updated data. This now works fine, and today I introduced authentication. The method I implemented first used 'PUT' , since i shall only be updating existing channels, however (unfortunately) html forms always send a file with 'POST' so I have since had to allow POST too. The only way I could 'PUT' a file to a RESTful address was with cURL. I'm now making the cherrypy server produce a form from the payload description so that the data can be edited in a dynamic way.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7558659723241238651-4041242665460007426?l=shaunroe.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://shaunroe.blogspot.com/feeds/4041242665460007426/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7558659723241238651&amp;postID=4041242665460007426' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7558659723241238651/posts/default/4041242665460007426'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7558659723241238651/posts/default/4041242665460007426'/><link rel='alternate' type='text/html' href='http://shaunroe.blogspot.com/2007/11/put-post-and-cherrypy.html' title='PUT, POST and CherryPy'/><author><name>sroe</name><uri>http://www.blogger.com/profile/16070735661039267060</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7558659723241238651.post-5037005305288371306</id><published>2007-11-21T09:20:00.000+01:00</published><updated>2007-11-21T09:35:51.400+01:00</updated><title type='text'>CSS tables, speed</title><content type='html'>I need a table which has a fixed header and scrollable content. I found a couple of links: &lt;a href="http://www.imaputz.com/cssStuff/bigFourVersion.html"&gt;here &lt;/a&gt;and &lt;a href="http://www.cssplay.co.uk/menu/tablescroll.html"&gt;her&lt;/a&gt;e, but I get strange effects in Safari: it is difficult to make the heading columns line up with the data columns...there seems to be  2px offset between Firefox and Safari, accumulating with each column. I'll finish this today so it looks ok at least in Firefox.&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;The RunList application is up now, link &lt;a href="http://sroe.home.cern.ch/sroe/runlist/query.html"&gt;here&lt;/a&gt;, with run details added in the links. One worry has been speed, and this seems to be down to pyCool. A &lt;a href="http://savannah.cern.ch/bugs/?31370"&gt;bug was file&lt;/a&gt;d to look into this.&lt;br /&gt;&lt;div&gt;&lt;br /&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7558659723241238651-5037005305288371306?l=shaunroe.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://shaunroe.blogspot.com/feeds/5037005305288371306/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7558659723241238651&amp;postID=5037005305288371306' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7558659723241238651/posts/default/5037005305288371306'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7558659723241238651/posts/default/5037005305288371306'/><link rel='alternate' type='text/html' href='http://shaunroe.blogspot.com/2007/11/css-tables-speed.html' title='CSS tables, speed'/><author><name>sroe</name><uri>http://www.blogger.com/profile/16070735661039267060</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7558659723241238651.post-7501757046645179572</id><published>2007-11-14T19:21:00.002+01:00</published><updated>2009-06-03T11:56:04.420+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='libxml2'/><category scheme='http://www.blogger.com/atom/ns#' term='CherryPy'/><category scheme='http://www.blogger.com/atom/ns#' term='Python'/><title type='text'>Python, libxml2 and run lists</title><content type='html'>So this last week I've been working on the run list as a web application. The front end is not so difficult, although I was requested to make the server side in Python; not my first choice... particularly as CERN's web server is not set up to use python as flexibly as PHP. So I run it as a python script in cgi-bin. This in turn uses my CherryPy server to retrieve xml. Then the fun begins: I am using libxml2 which is really &lt;span class="Apple-style-span" style="font-style: italic;"&gt;not &lt;/span&gt;well documented. I'm compiling some notes on my &lt;a href="http://sroe.home.cern.ch/sroe/wiki/index.html"&gt;wiki&lt;/a&gt; which might be helpful... difficult to believe that in the whole world there might be only a handful of programmers who have tried this.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7558659723241238651-7501757046645179572?l=shaunroe.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://shaunroe.blogspot.com/feeds/7501757046645179572/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7558659723241238651&amp;postID=7501757046645179572' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7558659723241238651/posts/default/7501757046645179572'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7558659723241238651/posts/default/7501757046645179572'/><link rel='alternate' type='text/html' href='http://shaunroe.blogspot.com/2007/11/python-libxml2-and-run-lists.html' title='Python, libxml2 and run lists'/><author><name>sroe</name><uri>http://www.blogger.com/profile/16070735661039267060</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7558659723241238651.post-5460708934329635568</id><published>2007-11-07T08:12:00.000+01:00</published><updated>2007-11-07T08:17:26.307+01:00</updated><title type='text'>RESTful Interest</title><content type='html'>I didn't write up last Wednesday or the one before, so what has happened? For a start the server where all the CherryPy stuff was based went down (hardware fault) and I didn't have a backup of my work, so that was painful. The CherryPy server and my demo application now work again, having installed them on atlmysql02 instead. I gave a &lt;a href="http://indico.cern.ch/conferenceDisplay.py?confId=21523"&gt;presentation yesterday&lt;/a&gt; on this stuff, which seems to have generated quite some interest, and I started to produce a RunList web application reproducing the functionality in Richards python script.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7558659723241238651-5460708934329635568?l=shaunroe.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://shaunroe.blogspot.com/feeds/5460708934329635568/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7558659723241238651&amp;postID=5460708934329635568' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7558659723241238651/posts/default/5460708934329635568'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7558659723241238651/posts/default/5460708934329635568'/><link rel='alternate' type='text/html' href='http://shaunroe.blogspot.com/2007/11/restful-interest.html' title='RESTful Interest'/><author><name>sroe</name><uri>http://www.blogger.com/profile/16070735661039267060</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7558659723241238651.post-1162361995960165945</id><published>2007-10-24T13:06:00.000+02:00</published><updated>2007-10-24T13:10:39.539+02:00</updated><title type='text'>CherryPy done</title><content type='html'>The initial stab at implementing a CherryPy server is complete, along with &lt;a href="http://sroe.home.cern.ch/sroe/dbstatus/COOL_interface.pdf"&gt;documentation&lt;/a&gt; and a &lt;a href="http://sroe.home.cern.ch/sroe/dbstatus/query.html"&gt;sample application&lt;/a&gt; to show how to use it. Last Wednesday was largely spent in meetings of various kinds, for a change. Today I'm cleaning up at looking at new projects.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7558659723241238651-1162361995960165945?l=shaunroe.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://shaunroe.blogspot.com/feeds/1162361995960165945/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7558659723241238651&amp;postID=1162361995960165945' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7558659723241238651/posts/default/1162361995960165945'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7558659723241238651/posts/default/1162361995960165945'/><link rel='alternate' type='text/html' href='http://shaunroe.blogspot.com/2007/10/cherrypy-done.html' title='CherryPy done'/><author><name>sroe</name><uri>http://www.blogger.com/profile/16070735661039267060</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7558659723241238651.post-743191079989955492</id><published>2007-10-10T19:25:00.000+02:00</published><updated>2007-10-10T19:33:31.099+02:00</updated><title type='text'>Slow going with CherryPy</title><content type='html'>Gradually augmenting the interface put up by Georg Stach for his GWT/Java application which uses cherrypy as the RPC server interface to the Cool database. I've been slightly hampered by the fact that: The cherrypy server is only accessible on atlmysql04 and I get thrown out of this machine every time I stop the server. Eventually made an applescript to stop the server, log me back in, start the server and change to the development directory. I've been slow picking up the PyCool methods as well, and the vagaries of different code editors when editing python (aargh, spaces or tabs!! I need a python IDE!) are frustrating. Slow progress, but progress nonetheless: now I know can return proper xml entries for things like cool folder descriptions. &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7558659723241238651-743191079989955492?l=shaunroe.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://shaunroe.blogspot.com/feeds/743191079989955492/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7558659723241238651&amp;postID=743191079989955492' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7558659723241238651/posts/default/743191079989955492'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7558659723241238651/posts/default/743191079989955492'/><link rel='alternate' type='text/html' href='http://shaunroe.blogspot.com/2007/10/slow-going-with-cherrypy.html' title='Slow going with CherryPy'/><author><name>sroe</name><uri>http://www.blogger.com/profile/16070735661039267060</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7558659723241238651.post-5914740687398214114</id><published>2007-10-03T10:31:00.000+02:00</published><updated>2007-10-03T10:36:30.609+02:00</updated><title type='text'>CherryPy et al.</title><content type='html'>Past week: Made the XSLT for Luca's XML -&gt; hierarchical XML transformation, and this seems to work on the restructured web interface (reduces the total code to about the quarter of it's original length). Got a CherryPy server going locally and served a demo python application (this is intended as a solution for a COOL database gateway). I&lt;span class="Apple-style-span" style="font-style: italic;"&gt; sort of&lt;/span&gt; managed to get the same thing going behind an apache server, wreaking all kinds of chaos on my httpd.conf file, but the stylesheets somehow went awry.&lt;div&gt;Today I managed to get Saverio's query tacked onto Luca's original code for the interface. The next step is to make a plot appear in the same interface.&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7558659723241238651-5914740687398214114?l=shaunroe.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://shaunroe.blogspot.com/feeds/5914740687398214114/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7558659723241238651&amp;postID=5914740687398214114' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7558659723241238651/posts/default/5914740687398214114'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7558659723241238651/posts/default/5914740687398214114'/><link rel='alternate' type='text/html' href='http://shaunroe.blogspot.com/2007/10/cherrypy-et-al.html' title='CherryPy et al.'/><author><name>sroe</name><uri>http://www.blogger.com/profile/16070735661039267060</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7558659723241238651.post-4298910664639407844</id><published>2007-09-26T09:49:00.000+02:00</published><updated>2007-09-26T10:04:41.772+02:00</updated><title type='text'>Importing XML to a web page and using ID</title><content type='html'>I've been working on the web  display of the online database for DCS, starting from &lt;a href="http://luca.home.cern.ch/luca/"&gt;Luca's code&lt;/a&gt;, and then I shall put the backend from Satoru's on it. It seems the best way (most robust) to import XML into a web page is using an Ajax method and retrieve the .xml file. &lt;span class="Apple-style-span" style="font-style: italic;"&gt;However &lt;/span&gt;I was surprised at first to find that the 'id' attribute didn't work with 'getElementById()', until I remembered that one of the few remaining places where a DTD is preferable over a W3C schema is in defining the id attribute to be of type 'ID'. Once done, it seems to work (tiddler article in preparation).&lt;div&gt;Today I need an XSLT to go from Luca's existing Atlas.xml file format to the new menu.xml format I made, which is less wordy and separates the menu definition from the hierarchy, using xlink:href references to bind the two.&lt;/div&gt;&lt;div&gt;On the back burner for now: On Monday, after reviewing a few web apps in Atlas which access Cool, it became apparent that everyone is doing their own ugly thing to get the COOL environment set up before accessing the database...better would be to have a centralized service. I'll accept the received wisdom that SOAP is too wordy, and now I've downloaded and locally installed &lt;a href="http://www.cherrypy.org/"&gt;CherryPy&lt;/a&gt; to expose the python interface to COOL via URLs.&lt;/div&gt;&lt;div&gt;Metadata: Atlas has it, but it seems that we have a homegrown solution; why aren't they using &lt;a href="http://www.xml.com/pub/a/2003/02/12/rdflib.html"&gt;RDF&lt;/a&gt;?&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7558659723241238651-4298910664639407844?l=shaunroe.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://shaunroe.blogspot.com/feeds/4298910664639407844/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7558659723241238651&amp;postID=4298910664639407844' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7558659723241238651/posts/default/4298910664639407844'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7558659723241238651/posts/default/4298910664639407844'/><link rel='alternate' type='text/html' href='http://shaunroe.blogspot.com/2007/09/importing-xml-to-web-page-and-using-id.html' title='Importing XML to a web page and using ID'/><author><name>sroe</name><uri>http://www.blogger.com/profile/16070735661039267060</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7558659723241238651.post-1876798834811005205</id><published>2007-09-19T09:28:00.000+02:00</published><updated>2007-09-19T09:39:02.955+02:00</updated><title type='text'>IFrame vs Div in WebDisplay</title><content type='html'>I spent the last couple of days trying to work out how to use the XSLT I made for displaying a JiveXML file for a web interface. I thought I would have to load the document, get the transform from the server and then manually instantiate the XSLT processor in javascript. This turns out &lt;span class="Apple-style-span" style="font-style: italic;"&gt;not&lt;/span&gt; to be the case; because the JiveXML is associated with a stylesheet, I need only load it into an IFrame window directly from the server. In any case, changing the content of an IFrame programmatically turns out to be difficult.&lt;div&gt;It seems that Javascript cannot, however, access a local file directly from within itself: it needs to send it to the server, which then echoes it back to the web page. I gave &lt;a href="http://indico.cern.ch/getFile.py/access?subContId=1&amp;amp;contribId=5&amp;amp;resId=0&amp;amp;materialId=slides&amp;amp;confId=20293"&gt;a talk&lt;/a&gt; on the web display, which seemed to go very well (if people have not seen XSLT before, its effect can seem pretty amazing). A tiddlyWiki update is in preparation...&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;In the mean time, Richard Hawkings has asked for some help on the databases, which is exactly what I want to do. I need to familiarise myself with PyCool and look at the AtlCool console, too (todays work). &lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7558659723241238651-1876798834811005205?l=shaunroe.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://shaunroe.blogspot.com/feeds/1876798834811005205/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7558659723241238651&amp;postID=1876798834811005205' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7558659723241238651/posts/default/1876798834811005205'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7558659723241238651/posts/default/1876798834811005205'/><link rel='alternate' type='text/html' href='http://shaunroe.blogspot.com/2007/09/iframe-vs-div-in-webdisplay.html' title='IFrame vs Div in WebDisplay'/><author><name>sroe</name><uri>http://www.blogger.com/profile/16070735661039267060</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7558659723241238651.post-4734813141098218864</id><published>2007-09-12T09:58:00.000+02:00</published><updated>2007-09-12T10:01:50.843+02:00</updated><title type='text'>DCS Viewer Interface</title><content type='html'>I've been involved in the Database documentation review, so have a meeting this afternoon from 15:00. In the mean time, I've also been looking at Luca's code. I think that the problem is very difficult: How to generally define a navigational interface for all subsystems. We've started with an XML definition file, but I think it needs revamping. All of this has been committed in &lt;a href="http://atlas-sw.cern.ch/cgi-bin/viewcvs-atlas.cgi/groups/Database/WebDCSViewer/"&gt;CVS&lt;/a&gt; now, so this should at least make versioning easier.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7558659723241238651-4734813141098218864?l=shaunroe.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://shaunroe.blogspot.com/feeds/4734813141098218864/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7558659723241238651&amp;postID=4734813141098218864' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7558659723241238651/posts/default/4734813141098218864'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7558659723241238651/posts/default/4734813141098218864'/><link rel='alternate' type='text/html' href='http://shaunroe.blogspot.com/2007/09/dcs-viewer-interface.html' title='DCS Viewer Interface'/><author><name>sroe</name><uri>http://www.blogger.com/profile/16070735661039267060</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7558659723241238651.post-4091417957813880508</id><published>2007-09-05T09:14:00.000+02:00</published><updated>2007-09-05T11:38:43.646+02:00</updated><title type='text'>Testing</title><content type='html'>Have to test a number of fixes:&lt;div&gt;latest cabling in 13.0.X&lt;/div&gt;&lt;div&gt;both InDetPrepRawDataFormation and SiClusterizationTool in 13.0.30. Unfortunately, I can only test the compilation on this last one... I still need a good routine way to test clusterization...&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Compiled/tested the cabling: ok, requested tag approval&lt;/div&gt;&lt;div&gt;Compiled InDetPrepRawDataFormation and SiClusterizationTool (dont have a unit test: have to figure out how to introduce one). ok, requested tag approval.&lt;/div&gt;&lt;div&gt;Diagnosed DB problem of Auke-Pieter Colijn, updated a simple DB query program (Ajax style) for him, &lt;a href="http://sroe.home.cern.ch/sroe/ajax/ewa/queryDCS.html"&gt;here&lt;/a&gt;.&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7558659723241238651-4091417957813880508?l=shaunroe.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://shaunroe.blogspot.com/feeds/4091417957813880508/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7558659723241238651&amp;postID=4091417957813880508' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7558659723241238651/posts/default/4091417957813880508'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7558659723241238651/posts/default/4091417957813880508'/><link rel='alternate' type='text/html' href='http://shaunroe.blogspot.com/2007/09/testing.html' title='Testing'/><author><name>sroe</name><uri>http://www.blogger.com/profile/16070735661039267060</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7558659723241238651.post-4266599621710258151</id><published>2007-09-04T11:01:00.000+02:00</published><updated>2007-09-04T11:08:39.780+02:00</updated><title type='text'>Broadening display, bad news</title><content type='html'>I managed to separate out the styles of &lt;a href="https://twiki.cern.ch/twiki/bin/view/Atlas/InDetWebDisplay"&gt;InDetWebDisplay&lt;/a&gt; such that they can be edited separately and then introduced panning and zooming. Once the coordinate system had been fixed, this was fairly trivial. Unfortunately there are still people out there using internet explorer, which doesnt understand SVG (it uses a proprietary format called VML) so I may need to introduce another level of transform for them...&lt;div&gt;Today I'll fix the &lt;a href="http://savannah.cern.ch/bugs/?29148"&gt;savannah bug&lt;/a&gt; about &lt;a href="https://twiki.cern.ch/twiki/bin/view/Atlas/InDetCabling"&gt;InDetCabling&lt;/a&gt; warnings and try a few things in VML to see what happens.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-weight: bold;"&gt;Bad News&lt;/span&gt;&lt;/div&gt;&lt;div&gt;I've been asked to take on a job which would essentially mean the end of any serious software activity. I'm not sure that my initial refusal has been accepted. :-(&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7558659723241238651-4266599621710258151?l=shaunroe.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://shaunroe.blogspot.com/feeds/4266599621710258151/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7558659723241238651&amp;postID=4266599621710258151' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7558659723241238651/posts/default/4266599621710258151'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7558659723241238651/posts/default/4266599621710258151'/><link rel='alternate' type='text/html' href='http://shaunroe.blogspot.com/2007/09/broadening-display-bad-news.html' title='Broadening display, bad news'/><author><name>sroe</name><uri>http://www.blogger.com/profile/16070735661039267060</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7558659723241238651.post-7993134703784329970</id><published>2007-08-30T10:01:00.000+02:00</published><updated>2007-08-30T10:12:41.984+02:00</updated><title type='text'>Aural Display</title><content type='html'>Just back from holidays, trying to get back into work. A couple of pressing things: &lt;br /&gt;&lt;div&gt;&lt;ul id=""&gt;&lt;li&gt;Update the InDetWebDisplay - separate style information into a separate stylesheet, ensure it works in Safari and Firefox, at least (see &lt;a href="http://sroe.home.cern.ch/sroe/xml/JiveXML_3007_00007.xml"&gt;here&lt;/a&gt;).&lt;/li&gt;&lt;li&gt;Try to introduce pan and zoom to this display.&lt;/li&gt;&lt;li&gt;Look at Satoru's code for querying the DB, and marry this with &lt;a href="http://luca.web.cern.ch/luca/"&gt;Luca's interface&lt;/a&gt;.&lt;/li&gt;&lt;li&gt;Fix warning messages in InDetCabling.&lt;/li&gt;&lt;/ul&gt;I've also discovered how to put a file in voice XML format on lxplus such that it can be telephoned (thanks to &lt;a href="http://www.vxml.org/"&gt;voxeo at vxml.org&lt;/a&gt;). This may be just a bit of fun just now, but I can see the possibilities for DCS monitoring. I'll try an xslt which creates an aural description of an event display to start with, to see what is possible.&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7558659723241238651-7993134703784329970?l=shaunroe.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://shaunroe.blogspot.com/feeds/7993134703784329970/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7558659723241238651&amp;postID=7993134703784329970' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7558659723241238651/posts/default/7993134703784329970'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7558659723241238651/posts/default/7993134703784329970'/><link rel='alternate' type='text/html' href='http://shaunroe.blogspot.com/2007/08/aural-display.html' title='Aural Display'/><author><name>sroe</name><uri>http://www.blogger.com/profile/16070735661039267060</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7558659723241238651.post-2858655209820730207</id><published>2007-08-15T09:00:00.000+02:00</published><updated>2007-08-15T18:15:03.112+02:00</updated><title type='text'>Part timer</title><content type='html'>Had lots of time out to try to cover the kids holidays, but can report modest success in trying to read CoraCool cabling. There are still some wrinkles, but I think I'm ready to try it with the full database (the test database only has the four modules for M3/M4 running).&lt;div&gt;Today I'll look over Luca's web browser for DCS conditions and give detailed comments, and Make an XSLT for the 'NICOS' nightly xml to show to Alex Undrus as an example of what could be done.&lt;/div&gt;&lt;div&gt;There have been some recent problems with the clusterization package in the development nightlies due to the wrong tag being collected. Hopefully this will be fixed, I'll find out later this morning.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;pm: Managed to make a stylesheet for the NICOS web page, and posted it &lt;a href="http://sroe.home.cern.ch/sroe/xml/ATNComboSummary_1.xml"&gt;here&lt;/a&gt;. Also extensively commented Luca's browser interface, which he has since updated, and provided comments on the documentation. This is quite extensive: 25 pages. The latest nightly had some problems again, finally works this evening.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;e'en: Finally managed to read all the cabling data I need from the CoraCool database and insert them into the identifier map.&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7558659723241238651-2858655209820730207?l=shaunroe.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://shaunroe.blogspot.com/feeds/2858655209820730207/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7558659723241238651&amp;postID=2858655209820730207' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7558659723241238651/posts/default/2858655209820730207'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7558659723241238651/posts/default/2858655209820730207'/><link rel='alternate' type='text/html' href='http://shaunroe.blogspot.com/2007/08/part-timer.html' title='Part timer'/><author><name>sroe</name><uri>http://www.blogger.com/profile/16070735661039267060</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7558659723241238651.post-5506581335609468905</id><published>2007-08-08T08:51:00.000+02:00</published><updated>2007-08-08T09:03:27.864+02:00</updated><title type='text'>Good release?</title><content type='html'>I've had some time off, babysitting, but also been battling the database this week, trying to read the cabling. The original database I was working with turned out to be inconsistent, have to try again today.&lt;div&gt;Yesterday  was a bit frustrating because the release failed fairly fundamentally. How are we supposed to know this in a reasonably automated way so that we don't start to work with a broken release? I think I found a way, by interrogating the release web pages automatically; of course these pages are in (not very good) html, so I have to find a way to tidy them to good xml before interrogating. It turns out that 'xmllint' willl do this. I've added a &lt;a href="http://sroe.home.cern.ch/sroe/wiki/index.html#XmlUtilities"&gt;tiddle&lt;/a&gt;r on my notebook page.&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7558659723241238651-5506581335609468905?l=shaunroe.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://shaunroe.blogspot.com/feeds/5506581335609468905/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7558659723241238651&amp;postID=5506581335609468905' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7558659723241238651/posts/default/5506581335609468905'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7558659723241238651/posts/default/5506581335609468905'/><link rel='alternate' type='text/html' href='http://shaunroe.blogspot.com/2007/08/good-release.html' title='Good release?'/><author><name>sroe</name><uri>http://www.blogger.com/profile/16070735661039267060</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7558659723241238651.post-7217307713009005419</id><published>2007-07-25T09:59:00.000+02:00</published><updated>2007-07-25T12:16:48.127+02:00</updated><title type='text'>Root libs and bytestreams</title><content type='html'>A couple of one-off tasks today: &lt;div&gt;&lt;ol id=""&gt;&lt;li&gt;Make sure I can compile against root libraries in xcode in the latest version of root.&lt;/li&gt;&lt;li&gt;Create a bytestream readable by clusterization, for testing.&lt;/li&gt;&lt;/ol&gt;The idea with (2) would be eventually to make an xml file with a schema which describes SCT hits for a few vents (max 10) for testing various parts of the SCT code. Initially I'll make one which refers to events using rod/link notation and then finally one which can use detector coordinates, although this will need an additional cabling file.&lt;/div&gt;&lt;div&gt;So stages of this task (for today) are:&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;ul id=""&gt;&lt;li&gt;chop an existing bytestream file, read it&lt;/li&gt;&lt;li&gt;change parts of the file programatically, read it&lt;/li&gt;&lt;li&gt;change the file using an xml event description, read it&lt;/li&gt;&lt;li&gt;make an xml schema for the event description&lt;/li&gt;&lt;/ul&gt;...and for the future:&lt;/div&gt;&lt;div&gt;&lt;ul id=""&gt;&lt;li&gt;read a cabling file in the same program&lt;/li&gt;&lt;li&gt;change the xml schema to allow detector coordinates&lt;/li&gt;&lt;li&gt;read and create events using detector coordinates&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;div&gt;Side tasks today include: looking at the OKS database to see whether we can use it, either directly or in its COOL form, and possibly looking at how to make a SOAP request to the AMI database.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Noon: Task (1) complete and written up &lt;a href="http://sroe.home.cern.ch/sroe/wiki/index.html"&gt;here&lt;/a&gt;, under 'ROOT and XCode'.&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7558659723241238651-7217307713009005419?l=shaunroe.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://shaunroe.blogspot.com/feeds/7217307713009005419/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7558659723241238651&amp;postID=7217307713009005419' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7558659723241238651/posts/default/7217307713009005419'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7558659723241238651/posts/default/7217307713009005419'/><link rel='alternate' type='text/html' href='http://shaunroe.blogspot.com/2007/07/root-libs-and-bytestreams.html' title='Root libs and bytestreams'/><author><name>sroe</name><uri>http://www.blogger.com/profile/16070735661039267060</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7558659723241238651.post-6664748546444915393</id><published>2007-07-11T09:20:00.000+02:00</published><updated>2007-07-11T09:27:17.234+02:00</updated><title type='text'>Clusterization and dashcode</title><content type='html'>Awaiting Bruce's new (COOL version 2.0) database, I'll update &lt;a href="http://atlas-sw.cern.ch/cgi-bin/viewcvs-atlas.cgi/offline/InnerDetector/InDetRecTools/SiClusterizationTool/"&gt;clusterization&lt;/a&gt; to rip out any reference to ChannelStatusAlg. I have already taken all the functional code from the CTB04 algorithms.&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;I should also make a couple of desktop widgets for detector navigation using Dashcode, since the license for this runs out on the 15th and the new replacement version looks like its part of a ~$500 budle, at least until Leopard arrives.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Over the past week I've been helping Luca to understand dynamic html pages. I'll put the tutorial material on my TiddlyWiki.&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7558659723241238651-6664748546444915393?l=shaunroe.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://shaunroe.blogspot.com/feeds/6664748546444915393/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7558659723241238651&amp;postID=6664748546444915393' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7558659723241238651/posts/default/6664748546444915393'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7558659723241238651/posts/default/6664748546444915393'/><link rel='alternate' type='text/html' href='http://shaunroe.blogspot.com/2007/07/clusterization-and-dashcode.html' title='Clusterization and dashcode'/><author><name>sroe</name><uri>http://www.blogger.com/profile/16070735661039267060</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7558659723241238651.post-2182036234546704551</id><published>2007-07-10T13:48:00.000+02:00</published><updated>2007-07-10T16:21:03.183+02:00</updated><title type='text'>New Beginnings</title><content type='html'>This blog will take over from the &lt;a href="https://twiki.cern.ch/twiki/bin/view/Main/ShaunRoe"&gt;local wiki page&lt;/a&gt; at CERN, and should be used in conjunction with &lt;a href="http://sroe.home.cern.ch/sroe/wiki/index.html"&gt;my TiddlyWiki notebook&lt;/a&gt; , the idea being that this will be a kind of diary and the notebook will keep track of the 'products' I make and the gems of information I need to keep track of.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7558659723241238651-2182036234546704551?l=shaunroe.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://shaunroe.blogspot.com/feeds/2182036234546704551/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7558659723241238651&amp;postID=2182036234546704551' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7558659723241238651/posts/default/2182036234546704551'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7558659723241238651/posts/default/2182036234546704551'/><link rel='alternate' type='text/html' href='http://shaunroe.blogspot.com/2007/07/new-beginnings.html' title='New Beginnings'/><author><name>sroe</name><uri>http://www.blogger.com/profile/16070735661039267060</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry></feed>
