<?xml version="1.0" encoding="utf-8"?>
<rss xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:pingback="http://madskills.com/public/xml/rss/module/pingback/" version="2.0">
  <channel>
    <title>Clemens Vasters - Technology|XML</title>
    <link>http://vasters.com/clemensv/</link>
    <description>Cloud Development and Alien Abductions</description>
    <language>en-us</language>
    <copyright>Clemens Vasters</copyright>
    <lastBuildDate>Fri, 27 Apr 2007 23:53:15 GMT</lastBuildDate>
    <generator>newtelligence dasBlog 1.9.7067.0</generator>
    <managingEditor>cvasters@guhhome.com</managingEditor>
    <webMaster>cvasters@guhhome.com</webMaster>
    <item>
      <trackback:ping>http://vasters.com/clemensv/Trackback.aspx?guid=b2d16e20-c2d6-4a8c-b59a-640cd7dbc0ae</trackback:ping>
      <pingback:server>http://vasters.com/clemensv/pingback.aspx</pingback:server>
      <pingback:target>http://vasters.com/clemensv/PermaLink,guid,b2d16e20-c2d6-4a8c-b59a-640cd7dbc0ae.aspx</pingback:target>
      <dc:creator>
      </dc:creator>
      <wfw:comment>http://vasters.com/clemensv/CommentView,guid,b2d16e20-c2d6-4a8c-b59a-640cd7dbc0ae.aspx</wfw:comment>
      <wfw:commentRss>http://vasters.com/clemensv/SyndicationService.asmx/GetEntryCommentsRss?guid=b2d16e20-c2d6-4a8c-b59a-640cd7dbc0ae</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
          <a href="http://blogs.thinktecture.com/cweyer/archive/2007/04/27/414819.aspx">Christian
Weyer shows</a> off the few lines of pretty straightforward WCF code &amp; config he
needed to figure out in order to set up a duplex conversation through BizTalk
Services. 
</p>
        <img width="0" height="0" src="http://vasters.com/clemensv/aggbug.ashx?id=b2d16e20-c2d6-4a8c-b59a-640cd7dbc0ae" />
      </body>
      <title>BizTalk Services: Christian shuttling back and forth on the bus</title>
      <guid isPermaLink="false">http://vasters.com/clemensv/PermaLink,guid,b2d16e20-c2d6-4a8c-b59a-640cd7dbc0ae.aspx</guid>
      <link>http://vasters.com/clemensv/2007/04/27/BizTalk+Services+Christian+Shuttling+Back+And+Forth+On+The+Bus.aspx</link>
      <pubDate>Fri, 27 Apr 2007 23:53:15 GMT</pubDate>
      <description>&lt;p&gt;
&lt;a href="http://blogs.thinktecture.com/cweyer/archive/2007/04/27/414819.aspx"&gt;Christian
Weyer shows&lt;/a&gt; off the few lines of pretty straightforward WCF code &amp;amp; config&amp;nbsp;he
needed to figure out in order to&amp;nbsp;set up a duplex conversation through BizTalk
Services. 
&lt;/p&gt;
&lt;img width="0" height="0" src="http://vasters.com/clemensv/aggbug.ashx?id=b2d16e20-c2d6-4a8c-b59a-640cd7dbc0ae" /&gt;</description>
      <comments>http://vasters.com/clemensv/CommentView,guid,b2d16e20-c2d6-4a8c-b59a-640cd7dbc0ae.aspx</comments>
      <category>Architecture</category>
      <category>Architecture/SOA</category>
      <category>Technology/BizTalk</category>
      <category>Technology/WCF</category>
      <category>Technology/Web Services</category>
      <category>Technology/XML</category>
    </item>
    <item>
      <trackback:ping>http://vasters.com/clemensv/Trackback.aspx?guid=74664ef9-3eb3-408b-8fa3-69d36adf4fd7</trackback:ping>
      <pingback:server>http://vasters.com/clemensv/pingback.aspx</pingback:server>
      <pingback:target>http://vasters.com/clemensv/PermaLink,guid,74664ef9-3eb3-408b-8fa3-69d36adf4fd7.aspx</pingback:target>
      <dc:creator>
      </dc:creator>
      <wfw:comment>http://vasters.com/clemensv/CommentView,guid,74664ef9-3eb3-408b-8fa3-69d36adf4fd7.aspx</wfw:comment>
      <wfw:commentRss>http://vasters.com/clemensv/SyndicationService.asmx/GetEntryCommentsRss?guid=74664ef9-3eb3-408b-8fa3-69d36adf4fd7</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
          <a href="http://www.markbaker.ca/2002/09/Blog/2006/04/02#2006-04-wish">Mark</a>, I
care deeply about the hobbyist who writes some code on the side, the programmer
who works from 9-5 and has a life and just as deeply about those who work 24/7 and
about everybody in between ;-) 
</p>
        <p>
That said: now that we're getting close to being done with the "this vs.
that" debate, we can most certainly figure out the "how can we optimize the programming
experience" story. For very many people I've talked to in the past 4 years or so,
reducing complexity is an important thing. I firmly believe that we can do enterprise
messaging and Web-Style/Lo-REST/POX with a single technology stack that
scales up and down in terms of its capabilities.  
</p>
        <p align="left">
Since I take that you are worried about code-bloat on the app-level, how would
you think about the following client-side one-liners?
</p>
        <ul>
          <li>
            <div align="left">T data = Pox.Get&lt;T&gt;("myCfg")
</div>
          </li>
          <li>
            <div align="left">T data = Pox.Get&lt;T&gt;("myCfg", new Uri("/customer/8929", UriKind.Relative));
</div>
          </li>
          <li>
            <div align="left">T data = Pox.Get&lt;T&gt;("myCfg", new Uri("http: //example.com/customer/8929"));
</div>
          </li>
          <li>
            <div align="left">T data = Pox.Get&lt;T&gt;(new Uri("http: //example.com/customer/8929")); 
</div>
          </li>
          <li>
            <div align="left">
              <div align="left">U reply = Pox.Put&lt;T,U&gt;( new Uri("http: //example.com/customer/8929"),
data, ref location));
</div>
            </div>
          </li>
          <li>
            <div align="left">
              <div align="left">U reply = Pox.Post&lt;T,U&gt;( new Uri("http: //example.com/customer/"),
data, out location));
</div>
            </div>
          </li>
          <li>
            <div align="left">
              <div align="left">Pox.Delete(settings, new Uri("http: //example.com/customer/8929"));
</div>
            </div>
          </li>
        </ul>
        <p>
Whereby <em>"myCfg"</em> refers to a set of config to specify security, proxies, and
so forth; <em>settings</em> would refer to an in-memory object with the same reusable
info. Our stack lets me code that sort of developer experience in a quite straightforward
fashion and I can throw SOAPish WS-Transfer under it and make the call flow
on a reliable, routed TCP session with binary encoding without changing the least
bit.
</p>
        <p>
If I am still missing your point in terms of ease of use and line count, make a wish,
Mark. :-)
</p>
        <img width="0" height="0" src="http://vasters.com/clemensv/aggbug.ashx?id=74664ef9-3eb3-408b-8fa3-69d36adf4fd7" />
      </body>
      <title>POVs</title>
      <guid isPermaLink="false">http://vasters.com/clemensv/PermaLink,guid,74664ef9-3eb3-408b-8fa3-69d36adf4fd7.aspx</guid>
      <link>http://vasters.com/clemensv/2006/04/03/POVs.aspx</link>
      <pubDate>Mon, 03 Apr 2006 15:39:16 GMT</pubDate>
      <description>&lt;p&gt;
&lt;a href="http://www.markbaker.ca/2002/09/Blog/2006/04/02#2006-04-wish"&gt;Mark&lt;/a&gt;, I
care deeply&amp;nbsp;about the hobbyist who writes some code on the side, the programmer
who works from 9-5 and has a life and just as deeply about those who work 24/7 and
about everybody in between ;-) 
&lt;/p&gt;
&lt;p&gt;
That said: now that we're getting close to&amp;nbsp;being done with&amp;nbsp;the "this vs.
that" debate, we can most certainly figure out the "how can we optimize the programming
experience" story. For very many people I've talked to in the past 4 years or so,
reducing complexity is an important thing. I firmly believe that we can do enterprise
messaging and Web-Style/Lo-REST/POX with a single&amp;nbsp;technology stack&amp;nbsp;that
scales&amp;nbsp;up and down in terms of its capabilities. &amp;nbsp;
&lt;/p&gt;
&lt;p align=left&gt;
Since&amp;nbsp;I take that&amp;nbsp;you are worried about code-bloat on the app-level, how&amp;nbsp;would
you think about the following client-side one-liners?
&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;div align=left&gt;T data&amp;nbsp;= Pox.Get&amp;lt;T&amp;gt;("myCfg")
&lt;/div&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;div align=left&gt;T data = Pox.Get&amp;lt;T&amp;gt;("myCfg", new Uri("/customer/8929", UriKind.Relative));
&lt;/div&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;div align=left&gt;T data&amp;nbsp;= Pox.Get&amp;lt;T&amp;gt;("myCfg", new Uri("http: //example.com/customer/8929"));
&lt;/div&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;div align=left&gt;T data&amp;nbsp;= Pox.Get&amp;lt;T&amp;gt;(new Uri("http: //example.com/customer/8929")); 
&lt;/div&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;div align=left&gt;
&lt;div align=left&gt;U reply = Pox.Put&amp;lt;T,U&amp;gt;( new Uri("http: //example.com/customer/8929"),
data, ref location));
&lt;/div&gt;
&lt;/div&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;div align=left&gt;
&lt;div align=left&gt;U reply = Pox.Post&amp;lt;T,U&amp;gt;( new Uri("http: //example.com/customer/"),
data, out location));
&lt;/div&gt;
&lt;/div&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;div align=left&gt;
&lt;div align=left&gt;Pox.Delete(settings, new Uri("http: //example.com/customer/8929"));
&lt;/div&gt;
&lt;/div&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;
Whereby &lt;em&gt;"myCfg"&lt;/em&gt; refers to a set of config to specify security, proxies, and
so forth; &lt;em&gt;settings&lt;/em&gt; would refer to an in-memory object with the same reusable
info. Our stack lets me code that sort of developer experience&amp;nbsp;in a quite straightforward
fashion&amp;nbsp;and I can&amp;nbsp;throw SOAPish WS-Transfer under it and make the call flow
on a reliable, routed TCP session with binary encoding without changing the least
bit.
&lt;/p&gt;
&lt;p&gt;
If I am still missing your point in terms of ease of use and line count, make a wish,
Mark.&amp;nbsp;:-)
&lt;/p&gt;
&lt;img width="0" height="0" src="http://vasters.com/clemensv/aggbug.ashx?id=74664ef9-3eb3-408b-8fa3-69d36adf4fd7" /&gt;</description>
      <comments>http://vasters.com/clemensv/CommentView,guid,74664ef9-3eb3-408b-8fa3-69d36adf4fd7.aspx</comments>
      <category>Technology/Indigo</category>
      <category>Technology/Web Services</category>
      <category>Technology/XML</category>
    </item>
    <item>
      <trackback:ping>http://vasters.com/clemensv/Trackback.aspx?guid=d88c1112-d8da-496e-9fd0-8cf03cf55c32</trackback:ping>
      <pingback:server>http://vasters.com/clemensv/pingback.aspx</pingback:server>
      <pingback:target>http://vasters.com/clemensv/PermaLink,guid,d88c1112-d8da-496e-9fd0-8cf03cf55c32.aspx</pingback:target>
      <dc:creator>
      </dc:creator>
      <wfw:comment>http://vasters.com/clemensv/CommentView,guid,d88c1112-d8da-496e-9fd0-8cf03cf55c32.aspx</wfw:comment>
      <wfw:commentRss>http://vasters.com/clemensv/SyndicationService.asmx/GetEntryCommentsRss?guid=d88c1112-d8da-496e-9fd0-8cf03cf55c32</wfw:commentRss>
      <slash:comments>3</slash:comments>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
          <a href="http://blogs.zdnet.com/service-oriented/?p=466">Joe McKendrick</a> at ZDNet
cites <a href="http://www.joelonsoftware.com/items/2005/10/21.html">Joel Spolsky</a> and
his "Web 2.0" rant. 
</p>
        <p>
What is particularly interesting about this new hype-term that this is the first technology
term that describes nothing at all about technology. It rather seems to describe that a suffiently
large, critical mass of people has grasped a sufficiently broad set
of technologies (most of which have been available for the past 4-5 years) for
DHTML and XML to actually go mainstream. And clearly contributing to that
is (even though everybody seems to complain mostly about IE and its gaps in standards
support) that Mozilla seems to have managed to clear the dreaded Netscape
4 garbage off the net.
</p>
        <p>
AJAX is the same buzzword b/s. I am currently building an AJAX app, yay! In order
to remember a few things and how they worked, I dug in code dating a few years
back that sits in my "OldStuff" directory. Innovation!
</p>
        <p>
And VCs <a href="http://online.wsj.com/public/article/SB113098635587487074-3diFzslPm_iutdYLU2C5e4DinUA_20061103.html?mod=blogs">going
crazy</a> about this is something that absolutely shocks me. 
</p>
        <img width="0" height="0" src="http://vasters.com/clemensv/aggbug.ashx?id=d88c1112-d8da-496e-9fd0-8cf03cf55c32" />
      </body>
      <title>Web 2.0 yaddayadda AJAX yaddayadda Profit!(?)</title>
      <guid isPermaLink="false">http://vasters.com/clemensv/PermaLink,guid,d88c1112-d8da-496e-9fd0-8cf03cf55c32.aspx</guid>
      <link>http://vasters.com/clemensv/2005/11/05/Web+20+Yaddayadda+AJAX+Yaddayadda+Profit.aspx</link>
      <pubDate>Sat, 05 Nov 2005 10:09:15 GMT</pubDate>
      <description>&lt;p&gt;
&lt;a href="http://blogs.zdnet.com/service-oriented/?p=466"&gt;Joe McKendrick&lt;/a&gt; at ZDNet
cites &lt;a href="http://www.joelonsoftware.com/items/2005/10/21.html"&gt;Joel Spolsky&lt;/a&gt; and
his "Web 2.0" rant. 
&lt;/p&gt;
&lt;p&gt;
What is particularly interesting about this new hype-term that this is the first technology
term that describes nothing at all about technology. It rather seems to describe that&amp;nbsp;a&amp;nbsp;suffiently
large,&amp;nbsp;critical mass of people has&amp;nbsp;grasped a sufficiently broad&amp;nbsp;set
of technologies (most of which have been available for the past 4-5 years)&amp;nbsp;for
DHTML and XML to&amp;nbsp;actually&amp;nbsp;go mainstream. And clearly contributing to that
is (even though everybody seems to complain mostly about IE and its gaps in standards
support) that Mozilla&amp;nbsp;seems to have&amp;nbsp;managed to clear the dreaded Netscape
4 garbage off the net.
&lt;/p&gt;
&lt;p&gt;
AJAX is the same buzzword b/s. I am currently building an AJAX app, yay! In order
to remember a few things and how they worked, I dug&amp;nbsp;in code dating a few years
back that sits in my "OldStuff" directory. Innovation!
&lt;/p&gt;
&lt;p&gt;
And VCs &lt;a href="http://online.wsj.com/public/article/SB113098635587487074-3diFzslPm_iutdYLU2C5e4DinUA_20061103.html?mod=blogs"&gt;going
crazy&lt;/a&gt; about this is something that absolutely shocks me. 
&lt;/p&gt;
&lt;img width="0" height="0" src="http://vasters.com/clemensv/aggbug.ashx?id=d88c1112-d8da-496e-9fd0-8cf03cf55c32" /&gt;</description>
      <comments>http://vasters.com/clemensv/CommentView,guid,d88c1112-d8da-496e-9fd0-8cf03cf55c32.aspx</comments>
      <category>Technology/XML</category>
    </item>
    <item>
      <trackback:ping>http://vasters.com/clemensv/Trackback.aspx?guid=46715ffd-2470-4396-a63c-f037ecd2fa0a</trackback:ping>
      <pingback:server>http://vasters.com/clemensv/pingback.aspx</pingback:server>
      <pingback:target>http://vasters.com/clemensv/PermaLink,guid,46715ffd-2470-4396-a63c-f037ecd2fa0a.aspx</pingback:target>
      <dc:creator />
      <wfw:comment>http://vasters.com/clemensv/CommentView,guid,46715ffd-2470-4396-a63c-f037ecd2fa0a.aspx</wfw:comment>
      <wfw:commentRss>http://vasters.com/clemensv/SyndicationService.asmx/GetEntryCommentsRss?guid=46715ffd-2470-4396-a63c-f037ecd2fa0a</wfw:commentRss>
      <slash:comments>6</slash:comments>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <div class="Section1">
          <p class="MsoNormal">
            <span style="font-size:10.0pt;font-family:Tahoma">Just had to figure this out and
thought I’d share. With the XmlSerializer (.NET v1.1), one would think that
TimeSpan maps to the XML Schema type <a href="http://www.w3.org/TR/2001/REC-xmlschema-2-20010502/#duration">duration</a>,
but it doesn’t – for whatever reason. Anyways … here’s a trick
to make it work. Interestingly enough, the XmlConvert class understands TimeSpan.
However it does not work correctly with fractional seconds and ignores them. That’s
enough for my purposes in the given app and therefore I am ignoring that issue in
the snippet below and treat all times of less than one second as equivalent to zero.
If it isn’t enough for you, you’d have to write an alternate implementation
for the respective XmlConvert functionality or beg Microsoft to fix it. (Doug? ;-)</span>
          </p>
          <p class="MsoNormal">
            <span style="font-size:10.0pt;font-family:Tahoma"> </span>
          </p>
          <table class="MsoNormalTable" border="0" cellspacing="0" cellpadding="0" width="100%" style="width:100.0%;background:#E6E6E6;border-collapse:collapse">
            <tr>
              <td width="100%" valign="top" style="width:100.0%;border:solid windowtext 1.0pt;&#xD;&#xA;  padding:0in 5.4pt 0in 5.4pt">
                <p class="MsoNormal" style="margin-bottom:12.0pt">
                  <span style="font-size:10.0pt;&#xD;&#xA;  font-family:&quot;Lucida Console&quot;;color:blue">private</span>
                  <span style="font-size:10.0pt;font-family:&quot;Lucida Console&quot;"> TimeSpan
interval;<br /><br />
[XmlElement("Interval", DataType="duration")]<br /><span style="color:blue">public</span><span style="color:blue">string</span> IntervalXml<br />
{<br />
    <span style="color:blue">get<br /></span>    {<br />
        <span style="color:blue">if</span> (Interval
&lt; TimeSpan.FromSeconds(1) )<br />
        {<br />
            <span style="color:blue">return</span><span style="color:blue">null</span>;<br />
        }<br />
        <span style="color:blue">else<br /></span>        {<br />
            <span style="color:blue">return</span> XmlConvert.ToString(interval);<br />
        }<br />
    }<br />
    <span style="color:blue">set<br /></span>    {<br />
        <span style="color:blue">if</span> (<span style="color:blue">value</span> == <span style="color:blue">null</span> )<br />
        {<br />
            interval = TimeSpan.Zero;<br />
            <span style="color:blue">return</span>;<br />
        }<br />
        TimeSpan newInterval = XmlConvert.ToTimeSpan(<span style="color:blue">value</span>);<br />
        <span style="color:blue">if</span> (interval
== newInterval)<br />
            <span style="color:blue">return</span>;<br />
        interval = newInterval;<br />
    }<br />
}<br /><br />
[XmlIgnore]<br /><span style="color:blue">public</span> TimeSpan Interval<br />
{<br />
    <span style="color:blue">get<br /></span>    {<br />
        <span style="color:blue">return</span> interval;<br />
    }<br />
    <span style="color:blue">set<br /></span>    {<br />
        <span style="color:blue">if</span> (interval
== <span style="color:blue">value</span>)<br />
            <span style="color:blue">return</span>;<br />
        interval = <span style="color:&#xD;&#xA;  blue">value</span>;<br />
    }<br />
}</span>
                </p>
              </td>
            </tr>
          </table>
          <p class="MsoNormal">
            <span style="font-size:10.0pt;font-family:Tahoma"> </span>
          </p>
          <p class="MsoNormal">
            <span style="font-size:10.0pt;font-family:Tahoma"> </span>
          </p>
        </div>
        <img width="0" height="0" src="http://vasters.com/clemensv/aggbug.ashx?id=46715ffd-2470-4396-a63c-f037ecd2fa0a" />
      </body>
      <title>XmlSerializer and TimeSpan</title>
      <guid isPermaLink="false">http://vasters.com/clemensv/PermaLink,guid,46715ffd-2470-4396-a63c-f037ecd2fa0a.aspx</guid>
      <link>http://vasters.com/clemensv/2004/12/15/XmlSerializer+And+TimeSpan.aspx</link>
      <pubDate>Wed, 15 Dec 2004 12:37:58 GMT</pubDate>
      <description>

&lt;div class=Section1&gt;
&lt;p class=MsoNormal&gt;
&lt;span style='font-size:10.0pt;font-family:Tahoma'&gt;Just had to figure this out and
thought I&amp;#8217;d share. With the XmlSerializer (.NET v1.1), one would think that
TimeSpan maps to the XML Schema type &lt;a href="http://www.w3.org/TR/2001/REC-xmlschema-2-20010502/#duration"&gt;duration&lt;/a&gt;,
but it doesn&amp;#8217;t &amp;#8211; for whatever reason. Anyways &amp;#8230; here&amp;#8217;s a trick
to make it work. Interestingly enough, the XmlConvert class understands TimeSpan.
However it does not work correctly with fractional seconds and ignores them. That&amp;#8217;s
enough for my purposes in the given app and therefore I am ignoring that issue in
the snippet below and treat all times of less than one second as equivalent to zero.
If it isn&amp;#8217;t enough for you, you&amp;#8217;d have to write an alternate implementation
for the respective XmlConvert functionality or beg Microsoft to fix it. (Doug? ;-)&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal&gt;
&lt;span style='font-size:10.0pt;font-family:Tahoma'&gt;&amp;nbsp;&lt;/span&gt;
&lt;/p&gt;
&lt;table class=MsoNormalTable border=0 cellspacing=0 cellpadding=0 width="100%" style='width:100.0%;background:#E6E6E6;border-collapse:collapse'&gt;
&lt;tr&gt;
&lt;td width="100%" valign=top style='width:100.0%;border:solid windowtext 1.0pt;
  padding:0in 5.4pt 0in 5.4pt'&gt;
&lt;p class=MsoNormal style='margin-bottom:12.0pt'&gt;
&lt;span style='font-size:10.0pt;
  font-family:"Lucida Console";color:blue'&gt;private&lt;/span&gt;&lt;span style='font-size:10.0pt;font-family:"Lucida Console"'&gt; TimeSpan
interval;&lt;br&gt;
&lt;br&gt;
[XmlElement(&amp;quot;Interval&amp;quot;, DataType=&amp;quot;duration&amp;quot;)]&lt;br&gt;
&lt;span style='color:blue'&gt;public&lt;/span&gt; &lt;span style='color:blue'&gt;string&lt;/span&gt; IntervalXml&lt;br&gt;
{&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style='color:blue'&gt;get&lt;br&gt;
&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style='color:blue'&gt;if&lt;/span&gt; (Interval
&amp;lt; TimeSpan.FromSeconds(1) )&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style='color:blue'&gt;return&lt;/span&gt; &lt;span style='color:blue'&gt;null&lt;/span&gt;;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style='color:blue'&gt;else&lt;br&gt;
&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style='color:blue'&gt;return&lt;/span&gt; XmlConvert.ToString(interval);&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style='color:blue'&gt;set&lt;br&gt;
&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style='color:blue'&gt;if&lt;/span&gt; (&lt;span style='color:blue'&gt;value&lt;/span&gt; == &lt;span style='color:blue'&gt;null&lt;/span&gt; )&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; interval = TimeSpan.Zero;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style='color:blue'&gt;return&lt;/span&gt;;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; TimeSpan newInterval = XmlConvert.ToTimeSpan(&lt;span style='color:blue'&gt;value&lt;/span&gt;);&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style='color:blue'&gt;if&lt;/span&gt; (interval
== newInterval)&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style='color:blue'&gt;return&lt;/span&gt;;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; interval = newInterval;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br&gt;
}&lt;br&gt;
&lt;br&gt;
[XmlIgnore]&lt;br&gt;
&lt;span style='color:blue'&gt;public&lt;/span&gt; TimeSpan Interval&lt;br&gt;
{&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style='color:blue'&gt;get&lt;br&gt;
&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style='color:blue'&gt;return&lt;/span&gt; interval;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style='color:blue'&gt;set&lt;br&gt;
&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style='color:blue'&gt;if&lt;/span&gt; (interval
== &lt;span style='color:blue'&gt;value&lt;/span&gt;)&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style='color:blue'&gt;return&lt;/span&gt;;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; interval = &lt;span style='color:
  blue'&gt;value&lt;/span&gt;;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br&gt;
}&lt;/span&gt;
&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;/table&gt;
&lt;p class=MsoNormal&gt;
&lt;span style='font-size:10.0pt;font-family:Tahoma'&gt;&amp;nbsp;&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal&gt;
&lt;span style='font-size:10.0pt;font-family:Tahoma'&gt;&amp;nbsp;&lt;/span&gt;
&lt;/p&gt;
&lt;/div&gt;
&lt;img width="0" height="0" src="http://vasters.com/clemensv/aggbug.ashx?id=46715ffd-2470-4396-a63c-f037ecd2fa0a" /&gt;</description>
      <comments>http://vasters.com/clemensv/CommentView,guid,46715ffd-2470-4396-a63c-f037ecd2fa0a.aspx</comments>
      <category>Technology/XML</category>
    </item>
    <item>
      <trackback:ping>http://vasters.com/clemensv/Trackback.aspx?guid=e643292d-b16a-470b-8b2b-64f69c471e46</trackback:ping>
      <pingback:server>http://vasters.com/clemensv/pingback.aspx</pingback:server>
      <pingback:target>http://vasters.com/clemensv/PermaLink,guid,e643292d-b16a-470b-8b2b-64f69c471e46.aspx</pingback:target>
      <dc:creator>
      </dc:creator>
      <wfw:comment>http://vasters.com/clemensv/CommentView,guid,e643292d-b16a-470b-8b2b-64f69c471e46.aspx</wfw:comment>
      <wfw:commentRss>http://vasters.com/clemensv/SyndicationService.asmx/GetEntryCommentsRss?guid=e643292d-b16a-470b-8b2b-64f69c471e46</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
"My Lists", "My Photos", "My Profile" .... sounds all very familiar over there
in <a href="http://spaces.msn.com">MSN Spaces</a>. So ... roll in the Web service
interfaces, please.
</p>
        <img width="0" height="0" src="http://vasters.com/clemensv/aggbug.ashx?id=e643292d-b16a-470b-8b2b-64f69c471e46" />
      </body>
      <title>.NET My Services goes live.</title>
      <guid isPermaLink="false">http://vasters.com/clemensv/PermaLink,guid,e643292d-b16a-470b-8b2b-64f69c471e46.aspx</guid>
      <link>http://vasters.com/clemensv/2004/12/05/NET+My+Services+Goes+Live.aspx</link>
      <pubDate>Sun, 05 Dec 2004 14:33:39 GMT</pubDate>
      <description>&lt;p&gt;
"My Lists", "My Photos", "My Profile"&amp;nbsp;.... sounds all very familiar over there
in &lt;a href="http://spaces.msn.com"&gt;MSN Spaces&lt;/a&gt;. So ...&amp;nbsp;roll in the Web service
interfaces, please.
&lt;/p&gt;
&lt;img width="0" height="0" src="http://vasters.com/clemensv/aggbug.ashx?id=e643292d-b16a-470b-8b2b-64f69c471e46" /&gt;</description>
      <comments>http://vasters.com/clemensv/CommentView,guid,e643292d-b16a-470b-8b2b-64f69c471e46.aspx</comments>
      <category>Technology/Web Services</category>
      <category>Technology/Weblogs</category>
      <category>Technology/XML</category>
    </item>
    <item>
      <trackback:ping>http://vasters.com/clemensv/Trackback.aspx?guid=91217202-8d08-4330-9163-1143acbe8259</trackback:ping>
      <pingback:server>http://vasters.com/clemensv/pingback.aspx</pingback:server>
      <pingback:target>http://vasters.com/clemensv/PermaLink,guid,91217202-8d08-4330-9163-1143acbe8259.aspx</pingback:target>
      <dc:creator />
      <wfw:comment>http://vasters.com/clemensv/CommentView,guid,91217202-8d08-4330-9163-1143acbe8259.aspx</wfw:comment>
      <wfw:commentRss>http://vasters.com/clemensv/SyndicationService.asmx/GetEntryCommentsRss?guid=91217202-8d08-4330-9163-1143acbe8259</wfw:commentRss>
      <slash:comments>2</slash:comments>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
While I wasn't looking, <a href="http://www.douglasp.com/2003/08/15.html#a351">Doug
Purdy</a>, who is the PM for the team in charge of the XmlSerializer
has posted this little cryptic answer to my initial question:
</p>
        <blockquote dir="ltr" style="MARGIN-RIGHT: 0px">
          <p>
            <font face="Courier New,Courier, Monospace" size="2">String serializedDateTime = XmlConvert.ToString(
someDateTime ); </font>
          </p>
          <p>
            <font face="Courier New,Courier, Monospace" size="2">DateTime deserializedDateTime
= XmlConvert.ToDateTime( serializedDateTime );</font>
          </p>
        </blockquote>
        <p>
What Doug is showing is really what the serializer is doing with dates under the hood
and that I am incorrectly <a href="http://staff.newtelligence.net/clemensv/PermaLink.aspx?guid=77bd9cef-bfeb-464c-bc72-2c849e1e8616">blaming</a> the
XmlSerializer for the lack of UTC support. [XmlConvert.ToString() also does nothing
more than calling DateTime.ToString() with the appropriate format string]. As I was
already saying in yesterday's post, but what I want to make a bit clearer here again
is that the actual problem is the lack of time-zone awareness in DateTime. 
</p>
        <p>
So the proper thing more me to do is to ask the base-class library team for time-zone
support in the base-class library for Whidbey so that Doug can fix this for us
;)
</p>
        <img width="0" height="0" src="http://vasters.com/clemensv/aggbug.ashx?id=91217202-8d08-4330-9163-1143acbe8259" />
      </body>
      <title>XmlSerializer &amp; UTC once more</title>
      <guid isPermaLink="false">http://vasters.com/clemensv/PermaLink,guid,91217202-8d08-4330-9163-1143acbe8259.aspx</guid>
      <link>http://vasters.com/clemensv/2003/08/20/XmlSerializer+UTC+Once+More.aspx</link>
      <pubDate>Wed, 20 Aug 2003 13:43:30 GMT</pubDate>
      <description>&lt;p&gt;
While&amp;nbsp;I wasn't looking, &lt;a href="http://www.douglasp.com/2003/08/15.html#a351"&gt;Doug
Purdy&lt;/a&gt;,&amp;nbsp;who is the&amp;nbsp;PM for the&amp;nbsp;team in charge&amp;nbsp;of the XmlSerializer
has posted this little cryptic answer to my initial question:
&lt;/p&gt;
&lt;blockquote dir=ltr style="MARGIN-RIGHT: 0px"&gt; 
&lt;p&gt;
&lt;font face="Courier New,Courier, Monospace" size=2&gt;String serializedDateTime = XmlConvert.ToString(
someDateTime ); &lt;/font&gt; 
&lt;p&gt;
&lt;font face="Courier New,Courier, Monospace" size=2&gt;DateTime deserializedDateTime =
XmlConvert.ToDateTime( serializedDateTime );&lt;/font&gt;
&lt;/p&gt;
&lt;/blockquote&gt; 
&lt;p&gt;
What Doug is showing is really what the serializer is doing with dates under the hood
and that I am incorrectly &lt;a href="http://staff.newtelligence.net/clemensv/PermaLink.aspx?guid=77bd9cef-bfeb-464c-bc72-2c849e1e8616"&gt;blaming&lt;/a&gt; the
XmlSerializer for the lack of UTC support. [XmlConvert.ToString() also does nothing
more than calling DateTime.ToString() with the appropriate format string]. As I was
already saying in yesterday's post, but what I want to make a bit clearer here again
is that the actual problem is the lack of time-zone awareness in DateTime. 
&lt;/p&gt;
&lt;p&gt;
So the proper thing more me to do is to ask the base-class library team&amp;nbsp;for time-zone
support in the base-class library for Whidbey so that Doug can fix&amp;nbsp;this for us
;)
&lt;/p&gt;
&lt;img width="0" height="0" src="http://vasters.com/clemensv/aggbug.ashx?id=91217202-8d08-4330-9163-1143acbe8259" /&gt;</description>
      <comments>http://vasters.com/clemensv/CommentView,guid,91217202-8d08-4330-9163-1143acbe8259.aspx</comments>
      <category>Technology/XML</category>
      <category>Technology/CLR</category>
    </item>
    <item>
      <trackback:ping>http://vasters.com/clemensv/Trackback.aspx?guid=77bd9cef-bfeb-464c-bc72-2c849e1e8616</trackback:ping>
      <pingback:server>http://vasters.com/clemensv/pingback.aspx</pingback:server>
      <pingback:target>http://vasters.com/clemensv/PermaLink,guid,77bd9cef-bfeb-464c-bc72-2c849e1e8616.aspx</pingback:target>
      <dc:creator />
      <wfw:comment>http://vasters.com/clemensv/CommentView,guid,77bd9cef-bfeb-464c-bc72-2c849e1e8616.aspx</wfw:comment>
      <wfw:commentRss>http://vasters.com/clemensv/SyndicationService.asmx/GetEntryCommentsRss?guid=77bd9cef-bfeb-464c-bc72-2c849e1e8616</wfw:commentRss>
      <slash:comments>2</slash:comments>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
I posted a little question <a href="http://staff.newtelligence.net/clemensv/PermaLink.aspx?guid=39ed85fd-bd6d-4dd9-b5e1-a56bf3847f6a">here</a>,
just asking "Why?". For your reading convenience, I pull the code in here once more:
</p>
        <p class="MsoNormal" style="MARGIN-BOTTOM: 12pt">
          <span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Lucida Console'">DateTime issued;</span>
        </p>
        <p class="MsoNormal">
          <span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Lucida Console'">[XmlIgnore]<br /></span>
          <span style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Lucida Console'">public</span>
          <span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Lucida Console'"> DateTime
IssuedUtc 
<br />
{ <span style="COLOR: blue">get</span> { <span style="COLOR: blue">return</span> issued;
} <span style="COLOR: blue">set</span> { issued = <span style="COLOR: blue">value</span>;
} }<br /><br />
[XmlElement("issued")]<br /><span style="COLOR: blue">public</span> DateTime IssuedLocalTime 
<br />
{ <span style="COLOR: blue">get</span> { <span style="COLOR: blue">return</span> Issued.ToLocalTime();
} <span style="COLOR: blue">set</span> { Issued = <span style="COLOR: blue">value</span>.ToUniversalTime();
} }</span>
        </p>
        <p>
So, indeed, why am I doing this? Well, when I decided to normalize all times
handled by the backend engine of dasBlog into the UTC timezone, I really didn't
think of the XML Serializer being a problem at first. It turned out to be one. 
</p>
        <p>
The reason why I wanted all times to be handled internally as UTC is quite
simple: Too many time zones to deal with and I need to have a proper reference to
do forward and backward time calculations. dasBlog deals with four time-zones: 
</p>
        <ul>
          <li>
            <strong>"Reader Time":</strong> The "&lt;%userWhen%&gt; macro emits a block of script
that will cause the browser to emit the time of a post local to the reader's time
zone. That one is easy, because the calculation happens on the client, but I need
to feed it UTC (GMT). 
</li>
          <li>
            <strong>"Display Time"</strong>: This is the time zone the blog owner selects for
his/her blog. All times displayed on the weblog pages are shown in that time zone
(complete with the TZ name and the GMT offset). This also applies to the
"admin pages" such as referrals and events (which both roll over in synch with
the display time zone). Display time is calculated dynamically and you will notice
that it also automatically adjusts for daylight savings time. The display time zone
is also by no means fixed. If the blog author travels (and you will see this on my
blog starting next week), he/she can adjust the blog to his/her present time
zone. When I am going to be at TechEd Malaysia, my blog will show UTC+0800. To
make this time-zone shifting work, the absolute time must be stored in UTC. 
</li>
          <li>
            <strong>"Engine Time": </strong>This is UTC. All of the dasBlog runtime handles everything
in UTC. 
</li>
          <li>
            <strong>"Server Time":</strong> Now were getting to the point. The engine runs on
a server that has it's own local time zone setting: "server local time". That's something
that the user who's running his engine at some ISP can't control and that's the one
of all the time zones that really nobody is ever interested in. You shouldn't care
whether your blog is hosted in Germany, the U.S. East Coast or Singapore. That's even
more of an issue because one could expect that hosted sites may get moved around between
ISP locations. The only little thing we're interested in is that the server knows
its offset to UTC.</li>
        </ul>
        <p>
So ... I was thinking.... ask for DateTime.Now.ToUniversalTime(), handle everything
in UTC from there on and everything's good. (Btw, I know about DateTime.UtcNow,
but I like the expressiveness of this better).
</p>
        <p>
What I wasn't considering is the way the XmlSerializer works, which I am using both
for storage and for the various web services (including the Atom feed). What I also
found is that the DateTime class in the framework isn't time-zone aware.
</p>
        <p>
The workaround above is used because the XML Serialization infrastructure <strong>always</strong> assumes
local time ("Server time") for serialization and will <strong>always </strong>emit
ISO 8601 dates with a time-zone suffix like this: <span class="tx">2003-08-19T15:15:58.0781250+02:00.
So when you are handling UTC times internally and use them blindly with XML serialization
for both storage and web services, the serializer will assume you are using local
time and throw you off by your own time-zone difference to UTC.</span></p>
        <p>
          <span class="tx">This isn't "too bad" when you store stuff in local XML files, because
when you write something wrong from the same place you read it back into and your
time-zones don't change you are in ok in memory, but you are nevertheless wrong on
disk. What happened to me in dasBlog version 1.1 was that I was thinking that I stored
UTC, but in fact I stored everything in local time. My UTC time <span class="tx">2003-08-19T15:15:58
always turned into <span class="tx">2003-08-19T15:15:58</span><strong>+02:00</strong>,<strong></strong>because
the DateTime class doesn't keep time-zone information around that the serializer could
use. Therefore the serializer must always assume local time and that causes the
offset to be emitted. </span>That's of course much worse for UTC+12.</span>
        </p>
        <p>
          <span class="tx">The fix:</span>
        </p>
        <p>
          <span class="tx">The field  </span>
          <span class="tx">
            <span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Lucida Console'">DateTime
issued; </span>
          </span>
          <span class="tx">holds the "engine time", which is always UTC.  </span>
        </p>
        <p>
          <span class="tx">The property </span>
        </p>
        <p>
          <span class="tx">
            <span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Lucida Console'">
            </span>
            <span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Lucida Console'">[XmlIgnore]<br /></span>
            <span style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Lucida Console'">public</span>
            <span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Lucida Console'"> DateTime
IssuedUtc 
<br />
{ <span style="COLOR: blue">get</span> { <span style="COLOR: blue">return</span> issued;
} <span style="COLOR: blue">set</span> { issued = <span style="COLOR: blue">value</span>;
} }</span>
          </span>
        </p>
        <p>
          <span class="tx">wraps this value and is the property that the engine works with internally.
The XmlSerializer is instructed to ignore this value in the serialization process
by declaration of the [XmlIgnore] attribute. Instead, we tell the serializer to look
at the following property, which is not used by the engine itself and also indicates
that by its name suffix "LocalTime", which essentially declares it as "off limits"
for direct access to everyone knowing the project:</span>
        </p>
        <p>
          <span class="tx">
            <span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Lucida Console'">
              <br />
[XmlElement("issued")]<br /><span style="COLOR: blue">public</span> DateTime IssuedLocalTime 
<br />
{ <span style="COLOR: blue">get</span> { <span style="COLOR: blue">return</span> Issued.ToLocalTime();
} <span style="COLOR: blue">set</span> { Issued = <span style="COLOR: blue">value</span>.ToUniversalTime();
} }</span>
          </span>
        </p>
        <p>
          <span class="tx">This property is the one that the serializer grabs and it does the
proper conversion to and from server local time that the serializer requires. The
actual dasBlog code is using a variant of this property that is a bit larger in code
size because it also checks for DateTime.MinValue and DateTime.MaxValue occurrences,
which, depending on the server time zone, would cause the time zone shifting to fail
with an overflow/underflow exception (and no, I am not checking <em>near</em> MinValue
and MaxValue):</span>
        </p>
        <span class="tx">
          <font size="2">
            <p>
              <font face="Lucida Console,Courier New,Courier, Monospace">[XmlElement("Date")]<br /></font>
            </p>
          </font>
          <font face="Lucida Console,Courier New,Courier, Monospace">
            <font color="#0000ff" size="2">public</font>
            <font size="2"> DateTime
DateLocalTime<br />
{ 
<br />
    </font>
            <font color="#0000ff" size="2">get</font>
            <font size="2">
              <br />
    { 
<br />
       </font>
            <font color="#0000ff" size="2">return</font>
            <font size="2"> (DateUtc==DateTime.MinValue||DateUtc==DateTime.MaxValue)?<br />
              
DateUtc:DateUtc.ToLocalTime(); 
<br />
    } 
<br />
    </font>
            <font color="#0000ff" size="2">set</font>
            <font size="2">
              <br />
    { 
<br />
        DateUtc = (</font>
            <font color="#0000ff" size="2">value</font>
            <font size="2">==DateTime.MinValue||</font>
            <font color="#0000ff" size="2">value</font>
            <font size="2">==DateTime.MaxValue)?</font>
            <font color="#0000ff" size="2">
              <br />
                 
value</font>
            <font size="2">:</font>
            <font color="#0000ff" size="2">value</font>
            <font size="2">.Date.ToUniversalTime(); 
<br />
    } 
<br />
}
</font>
          </font>
        </span>
        <p>
          <span class="tx">So, that's why.</span>
        </p>
        <p>
          <span class="tx">Be aware that all of this applies to ASP.NET Web Services, too, and
if you are dealing with multiple time zones are you are using UTC normalized times
in your app, you will have to deal with this. If "server time" makes you happy, you
won't need to worry.</span>
        </p>
        <img width="0" height="0" src="http://vasters.com/clemensv/aggbug.ashx?id=77bd9cef-bfeb-464c-bc72-2c849e1e8616" />
      </body>
      <title>XmlSerializer Quiz: The solution</title>
      <guid isPermaLink="false">http://vasters.com/clemensv/PermaLink,guid,77bd9cef-bfeb-464c-bc72-2c849e1e8616.aspx</guid>
      <link>http://vasters.com/clemensv/2003/08/19/XmlSerializer+Quiz+The+Solution.aspx</link>
      <pubDate>Tue, 19 Aug 2003 18:41:11 GMT</pubDate>
      <description>&lt;p&gt;
I&amp;nbsp;posted a little question &lt;a href="http://staff.newtelligence.net/clemensv/PermaLink.aspx?guid=39ed85fd-bd6d-4dd9-b5e1-a56bf3847f6a"&gt;here&lt;/a&gt;,
just asking "Why?". For your reading convenience, I pull the code in here once more:
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN-BOTTOM: 12pt"&gt;
&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Lucida Console'"&gt;DateTime issued;&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal&gt;
&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Lucida Console'"&gt;[XmlIgnore]&lt;br&gt;
&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Lucida Console'"&gt;public&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Lucida Console'"&gt; DateTime
IssuedUtc 
&lt;br&gt;
{ &lt;span style="COLOR: blue"&gt;get&lt;/span&gt; { &lt;span style="COLOR: blue"&gt;return&lt;/span&gt; issued;
} &lt;span style="COLOR: blue"&gt;set&lt;/span&gt; { issued = &lt;span style="COLOR: blue"&gt;value&lt;/span&gt;;
} }&lt;br&gt;
&lt;br&gt;
[XmlElement("issued")]&lt;br&gt;
&lt;span style="COLOR: blue"&gt;public&lt;/span&gt; DateTime IssuedLocalTime 
&lt;br&gt;
{ &lt;span style="COLOR: blue"&gt;get&lt;/span&gt; { &lt;span style="COLOR: blue"&gt;return&lt;/span&gt; Issued.ToLocalTime();
} &lt;span style="COLOR: blue"&gt;set&lt;/span&gt; { Issued = &lt;span style="COLOR: blue"&gt;value&lt;/span&gt;.ToUniversalTime();
} }&lt;/span&gt;
&lt;/p&gt;
&lt;p&gt;
So, indeed, why am I doing this? Well, when I decided to&amp;nbsp;normalize all times
handled by&amp;nbsp;the backend engine of dasBlog into the UTC timezone, I really didn't
think of the XML Serializer being a problem at first. It turned out to be one. 
&lt;p&gt;
The reason why I wanted&amp;nbsp;all times&amp;nbsp;to be handled internally as UTC is quite
simple: Too many time zones to deal with and I need to have a proper reference to
do forward and backward time calculations. dasBlog deals with four time-zones: 
&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;"Reader Time":&lt;/strong&gt; The "&amp;lt;%userWhen%&amp;gt; macro emits a block of script
that will cause the browser to emit the time of a post local to the reader's time
zone. That one is easy, because the calculation happens on the client, but I need
to feed it UTC (GMT). 
&lt;li&gt;
&lt;strong&gt;"Display Time"&lt;/strong&gt;: This is the time zone the blog owner selects for
his/her blog. All times displayed on the weblog pages are shown in that time zone
(complete with&amp;nbsp;the TZ name&amp;nbsp;and the GMT offset). This also&amp;nbsp;applies to&amp;nbsp;the
"admin pages" such as referrals and events (which&amp;nbsp;both roll over in synch with
the display time zone).&amp;nbsp;Display time is calculated dynamically and you will notice
that it also automatically adjusts for daylight savings time. The display time zone
is also by no means fixed. If the blog author travels (and you will see this on my
blog starting next week),&amp;nbsp;he/she can adjust the blog to his/her present time
zone. When I am going to be&amp;nbsp;at TechEd Malaysia,&amp;nbsp;my blog will show UTC+0800.&amp;nbsp;To
make this time-zone shifting&amp;nbsp;work, the absolute time must be stored in UTC. 
&lt;li&gt;
&lt;strong&gt;"Engine Time": &lt;/strong&gt;This is UTC. All of the dasBlog runtime handles everything
in UTC. 
&lt;li&gt;
&lt;strong&gt;"Server Time":&lt;/strong&gt; Now were getting to the point. The engine runs on
a server that has it's own local time zone setting: "server local time". That's something
that the user who's running his engine at some ISP can't control and that's the one
of all the time zones that really nobody is ever interested in. You shouldn't care
whether your blog is hosted in Germany, the U.S. East Coast or Singapore. That's even
more of an issue because one could expect that hosted sites may get moved around between
ISP locations. The only little thing we're interested in is that the server knows
its offset to UTC.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;
So ... I was thinking.... ask for DateTime.Now.ToUniversalTime(), handle everything
in UTC from there on and everything's good.&amp;nbsp;(Btw, I know about DateTime.UtcNow,
but I like the expressiveness of this better).
&lt;/p&gt;
&lt;p&gt;
What I wasn't considering is the way the XmlSerializer works, which I am using both
for storage and for the various web services (including the Atom feed). What I also
found is that the DateTime class in the framework isn't time-zone aware.
&lt;/p&gt;
&lt;p&gt;
The workaround above is used because the XML Serialization infrastructure &lt;strong&gt;always&lt;/strong&gt; assumes
local time ("Server time") for serialization and will &lt;strong&gt;always &lt;/strong&gt;emit
ISO 8601 dates with a time-zone suffix like this:&amp;nbsp;&lt;span class=tx&gt;2003-08-19T15:15:58.0781250+02:00.
So when you are handling UTC times internally and use them blindly with XML serialization
for both storage and web services, the serializer will assume you are using local
time and throw you off by your own time-zone difference to UTC.&lt;/span&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;span class=tx&gt;This isn't "too bad" when you store stuff in local XML files, because
when you write something wrong from the same place you read it back into and your
time-zones don't change you are in ok in memory, but you are nevertheless wrong on
disk. What happened to me in dasBlog version 1.1 was that I was thinking that I stored
UTC, but in fact I stored everything in local time. My&amp;nbsp;UTC time &lt;span class=tx&gt;2003-08-19T15:15:58
always turned into &lt;span class=tx&gt;2003-08-19T15:15:58&lt;/span&gt;&lt;strong&gt;+02:00&lt;/strong&gt;,&lt;strong&gt; &lt;/strong&gt;because
the DateTime class doesn't keep time-zone information around that the serializer could
use. Therefore the serializer must always assume local time&amp;nbsp;and that causes the
offset to be emitted.&amp;nbsp;&lt;/span&gt;That's of course much worse for UTC+12.&lt;/span&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;span class=tx&gt;The fix:&lt;/span&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;span class=tx&gt;The field&amp;nbsp; &lt;/span&gt;&lt;span class=tx&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Lucida Console'"&gt;DateTime
issued; &lt;/span&gt;&lt;/span&gt;&lt;span class=tx&gt;holds the "engine time", which is always UTC.&amp;nbsp; &lt;/span&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;span class=tx&gt;The property &lt;/span&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;span class=tx&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Lucida Console'"&gt;&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Lucida Console'"&gt;[XmlIgnore]&lt;br&gt;
&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Lucida Console'"&gt;public&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Lucida Console'"&gt; DateTime
IssuedUtc 
&lt;br&gt;
{ &lt;span style="COLOR: blue"&gt;get&lt;/span&gt; { &lt;span style="COLOR: blue"&gt;return&lt;/span&gt; issued;
} &lt;span style="COLOR: blue"&gt;set&lt;/span&gt; { issued = &lt;span style="COLOR: blue"&gt;value&lt;/span&gt;;
} }&lt;/span&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;span class=tx&gt;wraps this value and is the property that the engine works with internally.
The XmlSerializer is instructed to ignore this value in the serialization process
by declaration of the [XmlIgnore] attribute. Instead, we tell the serializer to look
at the following property, which is not used by the engine itself and also indicates
that by its name suffix "LocalTime", which essentially declares it as "off limits"
for direct access to everyone knowing the project:&lt;/span&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;span class=tx&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Lucida Console'"&gt;
&lt;br&gt;
[XmlElement("issued")]&lt;br&gt;
&lt;span style="COLOR: blue"&gt;public&lt;/span&gt; DateTime IssuedLocalTime 
&lt;br&gt;
{ &lt;span style="COLOR: blue"&gt;get&lt;/span&gt; { &lt;span style="COLOR: blue"&gt;return&lt;/span&gt; Issued.ToLocalTime();
} &lt;span style="COLOR: blue"&gt;set&lt;/span&gt; { Issued = &lt;span style="COLOR: blue"&gt;value&lt;/span&gt;.ToUniversalTime();
} }&lt;/span&gt;
&lt;/p&gt;
&gt; 
&lt;p&gt;
&lt;span class=tx&gt;This property is the one that the serializer grabs and it does the
proper conversion to and from server local time that the serializer requires. The
actual dasBlog code is using a variant of this property that is a bit larger in code
size because it also checks for DateTime.MinValue and DateTime.MaxValue occurrences,
which, depending on the server time zone, would cause the time zone shifting to fail
with an overflow/underflow exception (and no, I am not checking &lt;em&gt;near&lt;/em&gt; MinValue
and MaxValue):&lt;/span&gt;
&lt;/p&gt;
&lt;span class=tx&gt;&lt;font size=2&gt; 
&lt;p&gt;
&lt;font face="Lucida Console,Courier New,Courier, Monospace"&gt;[XmlElement("Date")]&lt;br&gt;
&lt;/font&gt;
&lt;/font&gt;&lt;font face="Lucida Console,Courier New,Courier, Monospace"&gt;&lt;font color=#0000ff size=2&gt;public&lt;/font&gt;&lt;font size=2&gt; DateTime
DateLocalTime&lt;br&gt;
{ 
&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/font&gt;&lt;font color=#0000ff size=2&gt;get&lt;/font&gt;&lt;font size=2&gt; 
&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; { 
&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/font&gt;&lt;font color=#0000ff size=2&gt;return&lt;/font&gt;&lt;font size=2&gt; (DateUtc==DateTime.MinValue||DateUtc==DateTime.MaxValue)?&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
DateUtc:DateUtc.ToLocalTime(); 
&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; } 
&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/font&gt;&lt;font color=#0000ff size=2&gt;set&lt;/font&gt;&lt;font size=2&gt; 
&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; { 
&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; DateUtc = (&lt;/font&gt;&lt;font color=#0000ff size=2&gt;value&lt;/font&gt;&lt;font size=2&gt;==DateTime.MinValue||&lt;/font&gt;&lt;font color=#0000ff size=2&gt;value&lt;/font&gt;&lt;font size=2&gt;==DateTime.MaxValue)?&lt;/font&gt;&lt;font color=#0000ff size=2&gt;
&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
value&lt;/font&gt;&lt;font size=2&gt;:&lt;/font&gt;&lt;font color=#0000ff size=2&gt;value&lt;/font&gt;&lt;font size=2&gt;.Date.ToUniversalTime(); 
&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; } 
&lt;br&gt;
}&gt;
&lt;/font&gt;&lt;/font&gt;&lt;/span&gt; 
&lt;p&gt;
&lt;span class=tx&gt;So, that's why.&lt;/span&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;span class=tx&gt;Be aware that all of this applies to ASP.NET Web Services, too, and
if you are dealing with multiple time zones are you are using UTC normalized times
in your app, you will have to deal with this. If "server time" makes you happy, you
won't need to worry.&lt;/span&gt;
&lt;/p&gt;
&lt;img width="0" height="0" src="http://vasters.com/clemensv/aggbug.ashx?id=77bd9cef-bfeb-464c-bc72-2c849e1e8616" /&gt;</description>
      <comments>http://vasters.com/clemensv/CommentView,guid,77bd9cef-bfeb-464c-bc72-2c849e1e8616.aspx</comments>
      <category>Technology/XML</category>
      <category>Technology/CLR</category>
    </item>
    <item>
      <trackback:ping>http://vasters.com/clemensv/Trackback.aspx?guid=39ed85fd-bd6d-4dd9-b5e1-a56bf3847f6a</trackback:ping>
      <pingback:server>http://vasters.com/clemensv/pingback.aspx</pingback:server>
      <pingback:target>http://vasters.com/clemensv/PermaLink,guid,39ed85fd-bd6d-4dd9-b5e1-a56bf3847f6a.aspx</pingback:target>
      <dc:creator />
      <wfw:comment>http://vasters.com/clemensv/CommentView,guid,39ed85fd-bd6d-4dd9-b5e1-a56bf3847f6a.aspx</wfw:comment>
      <wfw:commentRss>http://vasters.com/clemensv/SyndicationService.asmx/GetEntryCommentsRss?guid=39ed85fd-bd6d-4dd9-b5e1-a56bf3847f6a</wfw:commentRss>
      <slash:comments>2</slash:comments>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <div class="Section1">
          <p class="MsoNormal" style="MARGIN-BOTTOM: 12pt">
            <span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Lucida Console'">DateTime issued;</span>
          </p>
          <p class="MsoNormal">
            <span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Lucida Console'">[XmlIgnore]<br /></span>
            <span style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Lucida Console'">public</span>
            <span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Lucida Console'"> DateTime
IssuedUtc 
<br />
{ <span style="COLOR: blue">get</span> { <span style="COLOR: blue">return</span> issued;
} <span style="COLOR: blue">set</span> { issued = <span style="COLOR: blue">value</span>;
} }<br /><br />
[XmlElement("issued")]<br /><span style="COLOR: blue">public</span> DateTime IssuedLocalTime 
<br />
{ <span style="COLOR: blue">get</span> { <span style="COLOR: blue">return</span> Issued.ToLocalTime();
} <span style="COLOR: blue">set</span> { Issued = <span style="COLOR: blue">value</span>.ToUniversalTime();
} }</span>
          </p>
          <p class="MsoNormal">
            <span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Lucida Console'">
            </span> 
</p>
          <p>
Why?
</p>
        </div>
        <img width="0" height="0" src="http://vasters.com/clemensv/aggbug.ashx?id=39ed85fd-bd6d-4dd9-b5e1-a56bf3847f6a" />
      </body>
      <title>A little XmlSerializer Quiz.</title>
      <guid isPermaLink="false">http://vasters.com/clemensv/PermaLink,guid,39ed85fd-bd6d-4dd9-b5e1-a56bf3847f6a.aspx</guid>
      <link>http://vasters.com/clemensv/2003/08/14/A+Little+XmlSerializer+Quiz.aspx</link>
      <pubDate>Thu, 14 Aug 2003 17:51:49 GMT</pubDate>
      <description>&lt;div class=Section1&gt;
&lt;p class=MsoNormal style="MARGIN-BOTTOM: 12pt"&gt;
&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Lucida Console'"&gt;DateTime issued;&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal&gt;
&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Lucida Console'"&gt;[XmlIgnore]&lt;br&gt;
&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Lucida Console'"&gt;public&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Lucida Console'"&gt; DateTime
IssuedUtc 
&lt;br&gt;
{ &lt;span style="COLOR: blue"&gt;get&lt;/span&gt; { &lt;span style="COLOR: blue"&gt;return&lt;/span&gt; issued;
} &lt;span style="COLOR: blue"&gt;set&lt;/span&gt; { issued = &lt;span style="COLOR: blue"&gt;value&lt;/span&gt;;
} }&lt;br&gt;
&lt;br&gt;
[XmlElement("issued")]&lt;br&gt;
&lt;span style="COLOR: blue"&gt;public&lt;/span&gt; DateTime IssuedLocalTime 
&lt;br&gt;
{ &lt;span style="COLOR: blue"&gt;get&lt;/span&gt; { &lt;span style="COLOR: blue"&gt;return&lt;/span&gt; Issued.ToLocalTime();
} &lt;span style="COLOR: blue"&gt;set&lt;/span&gt; { Issued = &lt;span style="COLOR: blue"&gt;value&lt;/span&gt;.ToUniversalTime();
} }&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal&gt;
&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Lucida Console'"&gt;&lt;/span&gt;&amp;nbsp;
&lt;/p&gt;
&lt;p&gt;
Why?
&lt;/p&gt;
&lt;/div&gt;
&lt;img width="0" height="0" src="http://vasters.com/clemensv/aggbug.ashx?id=39ed85fd-bd6d-4dd9-b5e1-a56bf3847f6a" /&gt;</description>
      <comments>http://vasters.com/clemensv/CommentView,guid,39ed85fd-bd6d-4dd9-b5e1-a56bf3847f6a.aspx</comments>
      <category>Technology/XML</category>
      <category>Technology/CLR</category>
    </item>
    <item>
      <trackback:ping>http://vasters.com/clemensv/Trackback.aspx?guid=af4f5b5c-cce5-4a66-bf57-6ec01c5cc17c</trackback:ping>
      <pingback:server>http://vasters.com/clemensv/pingback.aspx</pingback:server>
      <pingback:target>http://vasters.com/clemensv/PermaLink,guid,af4f5b5c-cce5-4a66-bf57-6ec01c5cc17c.aspx</pingback:target>
      <dc:creator />
      <wfw:comment>http://vasters.com/clemensv/CommentView,guid,af4f5b5c-cce5-4a66-bf57-6ec01c5cc17c.aspx</wfw:comment>
      <wfw:commentRss>http://vasters.com/clemensv/SyndicationService.asmx/GetEntryCommentsRss?guid=af4f5b5c-cce5-4a66-bf57-6ec01c5cc17c</wfw:commentRss>
      <slash:comments>1</slash:comments>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Dan Farino, who wrote the CLR based, Regex extended stored procedure on which I
put a <a href="http://staff.newtelligence.net/clemensv/PermaLink.aspx?guid=4384d23c-eb50-48f8-92ba-93718d842062">warning
sign</a> yesterday, wrote me an email back (I notified him that I wrote
that blog entry) and told me that he just <a href="http://www.codeproject.com/database/xp_pcre.asp?target=xp%5Fpcre">uploaded
an unmanaged version</a>. Haven't downloaded it, yet, but it seems to be
functionally equivalent. If it's stable and quick, I can think of 2 bazillon
uses for this -- including, of course, Regex based XML parsing inside SQL Server
(while we wait for Yukon). 
</p>
        <img width="0" height="0" src="http://vasters.com/clemensv/aggbug.ashx?id=af4f5b5c-cce5-4a66-bf57-6ec01c5cc17c" />
      </body>
      <title>Regular expressions for SQL Server, 2nd try</title>
      <guid isPermaLink="false">http://vasters.com/clemensv/PermaLink,guid,af4f5b5c-cce5-4a66-bf57-6ec01c5cc17c.aspx</guid>
      <link>http://vasters.com/clemensv/2003/08/11/Regular+Expressions+For+SQL+Server+2nd+Try.aspx</link>
      <pubDate>Mon, 11 Aug 2003 03:55:15 GMT</pubDate>
      <description>&lt;p&gt;
Dan Farino, who wrote the CLR based, Regex extended stored procedure&amp;nbsp;on which&amp;nbsp;I
put a &lt;a href="http://staff.newtelligence.net/clemensv/PermaLink.aspx?guid=4384d23c-eb50-48f8-92ba-93718d842062"&gt;warning
sign&lt;/a&gt;&amp;nbsp;yesterday, wrote&amp;nbsp;me an email back (I notified him that I wrote
that blog entry) and&amp;nbsp;told me&amp;nbsp;that he just &lt;a href="http://www.codeproject.com/database/xp_pcre.asp?target=xp%5Fpcre"&gt;uploaded
an unmanaged version&lt;/a&gt;.&amp;nbsp;Haven't&amp;nbsp;downloaded it, yet, but it seems to be
functionally equivalent.&amp;nbsp;If it's&amp;nbsp;stable and quick, I can think of 2 bazillon
uses for this -- including, of course,&amp;nbsp;Regex based XML parsing inside SQL Server
(while we wait for Yukon). 
&lt;/p&gt;
&lt;img width="0" height="0" src="http://vasters.com/clemensv/aggbug.ashx?id=af4f5b5c-cce5-4a66-bf57-6ec01c5cc17c" /&gt;</description>
      <comments>http://vasters.com/clemensv/CommentView,guid,af4f5b5c-cce5-4a66-bf57-6ec01c5cc17c.aspx</comments>
      <category>Technology/CLR</category>
      <category>Technology</category>
      <category>Technology/XML</category>
    </item>
    <item>
      <trackback:ping>http://vasters.com/clemensv/Trackback.aspx?guid=236811aa-17d5-478b-b017-d99b5cc00e40</trackback:ping>
      <pingback:server>http://vasters.com/clemensv/pingback.aspx</pingback:server>
      <pingback:target>http://vasters.com/clemensv/PermaLink,guid,236811aa-17d5-478b-b017-d99b5cc00e40.aspx</pingback:target>
      <dc:creator />
      <wfw:comment>http://vasters.com/clemensv/CommentView,guid,236811aa-17d5-478b-b017-d99b5cc00e40.aspx</wfw:comment>
      <wfw:commentRss>http://vasters.com/clemensv/SyndicationService.asmx/GetEntryCommentsRss?guid=236811aa-17d5-478b-b017-d99b5cc00e40</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Tim Bray, author of the Namespace spec, <a href="http://tbray.org/ongoing/When/200x/2003/08/08/NamespaceOrNot">enlightens
us here</a> that I am technically wrong by <a href="http://staff.newtelligence.net/clemensv/PermaLink.aspx?guid=47c865b9-48d4-473d-9c0e-a90a35f2bf52">using
the term "empty namespace"</a>. Yes. Absolutely. But the "not member of any namespace"
vs. "member of the empty namespace" distinction becomes meaningless once you
start coding against an XML infrastructure, because in the programming models,
there is pretty much always a namespace qualifier. In the .NET Framework,
for instance, the NamespaceURI is an empty string in such cases (... and
it should really be <em>null).</em></p>
        <img width="0" height="0" src="http://vasters.com/clemensv/aggbug.ashx?id=236811aa-17d5-478b-b017-d99b5cc00e40" />
      </body>
      <title>Namespaces continued</title>
      <guid isPermaLink="false">http://vasters.com/clemensv/PermaLink,guid,236811aa-17d5-478b-b017-d99b5cc00e40.aspx</guid>
      <link>http://vasters.com/clemensv/2003/08/10/Namespaces+Continued.aspx</link>
      <pubDate>Sun, 10 Aug 2003 07:21:44 GMT</pubDate>
      <description>&lt;p&gt;
Tim Bray, author of the Namespace spec, &lt;a href="http://tbray.org/ongoing/When/200x/2003/08/08/NamespaceOrNot"&gt;enlightens
us here&lt;/a&gt; that I am technically wrong by &lt;a href="http://staff.newtelligence.net/clemensv/PermaLink.aspx?guid=47c865b9-48d4-473d-9c0e-a90a35f2bf52"&gt;using
the term "empty namespace"&lt;/a&gt;. Yes. Absolutely. But the "not member of any namespace"
vs. "member of the empty namespace" distinction&amp;nbsp;becomes meaningless once you
start coding against an XML infrastructure, because&amp;nbsp;in the programming models,
there is&amp;nbsp;pretty much always a namespace qualifier.&amp;nbsp;In the .NET Framework,
for instance, the NamespaceURI&amp;nbsp;is an empty string in such&amp;nbsp;cases (... and
it should really be &lt;em&gt;null).&lt;/em&gt;
&lt;/p&gt;
&lt;img width="0" height="0" src="http://vasters.com/clemensv/aggbug.ashx?id=236811aa-17d5-478b-b017-d99b5cc00e40" /&gt;</description>
      <comments>http://vasters.com/clemensv/CommentView,guid,236811aa-17d5-478b-b017-d99b5cc00e40.aspx</comments>
      <category>Technology</category>
      <category>Technology/XML</category>
    </item>
    <item>
      <trackback:ping>http://vasters.com/clemensv/Trackback.aspx?guid=47c865b9-48d4-473d-9c0e-a90a35f2bf52</trackback:ping>
      <pingback:server>http://vasters.com/clemensv/pingback.aspx</pingback:server>
      <pingback:target>http://vasters.com/clemensv/PermaLink,guid,47c865b9-48d4-473d-9c0e-a90a35f2bf52.aspx</pingback:target>
      <dc:creator />
      <wfw:comment>http://vasters.com/clemensv/CommentView,guid,47c865b9-48d4-473d-9c0e-a90a35f2bf52.aspx</wfw:comment>
      <wfw:commentRss>http://vasters.com/clemensv/SyndicationService.asmx/GetEntryCommentsRss?guid=47c865b9-48d4-473d-9c0e-a90a35f2bf52</wfw:commentRss>
      <slash:comments>1</slash:comments>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
          <a href="http://www.infoworld.com/article/03/08/08/31OPstrategic_1.html">Jon Udell
writes</a> in his most recent column that some think that there is a "controversy"
about the use of XML namespaces. This seems to stem from the sad fact that RSS never
got a proper namespace assigned to it and is one of the hottest <s>schemas</s> specs
in the XML space right now. Sorry, there may people in disbelief, but the <a href="http://www.w3.org/TR/REC-xml-names/">XML
Namespaces</a> spec is normative and referenced in the current <a href="http://www.w3.org/TR/2000/REC-xml-20001006">XML
1.0 (Second Edition)</a> spec. The empty namespace is a namespace. 
</p>
        <blockquote dir="ltr" style="MARGIN-RIGHT: 0px">
          <p>
            <em>Some notable experts — including Sean McGrath, CTO of Propylon in Dublin, Ireland
— argue that namespaces should be avoided for that reason. </em>
          </p>
        </blockquote>
        <p>
You can't avoid namespaces, they are automatic if you use XML today. If you don't
declare one for your vocabulary/schema, you are contributing to a large cloud of "stuff"
sitting in the "not part of any" namespace. The "empty" namespace (which essentially
says "not part of any namespace") is the XML equivalent of a the "these are just some
tags" garbage dump. 
</p>
        <img width="0" height="0" src="http://vasters.com/clemensv/aggbug.ashx?id=47c865b9-48d4-473d-9c0e-a90a35f2bf52" />
      </body>
      <title>XML namespaces are a discussion topic ?!?!</title>
      <guid isPermaLink="false">http://vasters.com/clemensv/PermaLink,guid,47c865b9-48d4-473d-9c0e-a90a35f2bf52.aspx</guid>
      <link>http://vasters.com/clemensv/2003/08/09/XML+Namespaces+Are+A+Discussion+Topic.aspx</link>
      <pubDate>Sat, 09 Aug 2003 18:39:25 GMT</pubDate>
      <description>&lt;p&gt;
&lt;a href="http://www.infoworld.com/article/03/08/08/31OPstrategic_1.html"&gt;Jon Udell
writes&lt;/a&gt;&amp;nbsp;in his most recent column that some think that there is&amp;nbsp;a "controversy"
about the use of XML namespaces. This seems to stem from the sad fact that RSS never
got a proper namespace assigned to it and is one of the hottest &lt;s&gt;schemas&lt;/s&gt; specs
in the XML space right now. Sorry, there may people in disbelief, but the &lt;a href="http://www.w3.org/TR/REC-xml-names/"&gt;XML
Namespaces&lt;/a&gt; spec is normative and referenced in the current &lt;a href="http://www.w3.org/TR/2000/REC-xml-20001006"&gt;XML
1.0 (Second Edition)&lt;/a&gt;&amp;nbsp;spec.&amp;nbsp;The empty namespace is a namespace. 
&lt;/p&gt;
&lt;blockquote dir=ltr style="MARGIN-RIGHT: 0px"&gt; 
&lt;p&gt;
&lt;em&gt;Some notable experts — including Sean McGrath, CTO of Propylon in Dublin, Ireland
— argue that namespaces should be avoided for that reason. &lt;/em&gt;
&lt;/p&gt;
&lt;/blockquote&gt; 
&lt;p&gt;
You can't avoid namespaces, they are automatic&amp;nbsp;if you use XML today. If you don't
declare one for your vocabulary/schema, you are contributing to a large cloud of "stuff"
sitting in the "not part of any" namespace. The "empty" namespace (which essentially
says "not part of any namespace") is the XML equivalent of a the "these are just some
tags" garbage dump. 
&lt;/p&gt;
&lt;img width="0" height="0" src="http://vasters.com/clemensv/aggbug.ashx?id=47c865b9-48d4-473d-9c0e-a90a35f2bf52" /&gt;</description>
      <comments>http://vasters.com/clemensv/CommentView,guid,47c865b9-48d4-473d-9c0e-a90a35f2bf52.aspx</comments>
      <category>Technology/Web Services</category>
      <category>Technology</category>
      <category>Technology/XML</category>
    </item>
  </channel>
</rss>