<?xml version="1.0" encoding="utf-8"?>
<rss xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:pingback="http://madskills.com/public/xml/rss/module/pingback/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" version="2.0">
  <channel>
    <title>Matevž Gačnik's Weblog - XML</title>
    <link>https://www.request-response.com/blog/</link>
    <description>Technology Philanthropy</description>
    <image>
      <url>http://www.request-response.com/blog/images/favicon.jpg</url>
      <title>Matevž Gačnik's Weblog - XML</title>
      <link>https://www.request-response.com/blog/</link>
    </image>
    <language>en-us</language>
    <copyright>Matevz Gacnik</copyright>
    <lastBuildDate>Mon, 06 Apr 2009 12:22:33 GMT</lastBuildDate>
    <generator>newtelligence dasBlog 2.1.8102.813</generator>
    <managingEditor>matevz.gacnik@gmail.com</managingEditor>
    <webMaster>matevz.gacnik@gmail.com</webMaster>
    <item>
      <trackback:ping>https://www.request-response.com/blog/Trackback.aspx?guid=d27d4672-92f5-4944-8fc9-1f7f098d36e9</trackback:ping>
      <pingback:server>https://www.request-response.com/blog/pingback.aspx</pingback:server>
      <pingback:target>https://www.request-response.com/blog/PermaLink,guid,d27d4672-92f5-4944-8fc9-1f7f098d36e9.aspx</pingback:target>
      <dc:creator>Matevz Gacnik</dc:creator>
      <wfw:comment>https://www.request-response.com/blog/CommentView,guid,d27d4672-92f5-4944-8fc9-1f7f098d36e9.aspx</wfw:comment>
      <wfw:commentRss>https://www.request-response.com/blog/SyndicationService.asmx/GetEntryCommentsRss?guid=d27d4672-92f5-4944-8fc9-1f7f098d36e9</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
          <font face="Courier New">XmlSerializer</font> is a great peace of technology. Combined
with <font face="Courier New">xsd.exe</font> and friends (<font face="Courier New">XmlSerializerNamespaces</font>,
et al.) it's a powerful tool for one to get around XML instance serialization/deserialization.
</p>
        <p>
But, there is a potentially serious bug present, even in 3.5 SP1 version of the .NET
Framework.
</p>
        <p>
Suppose we have the following XML structure:
</p>
        <p>
          <font face="Courier New">&lt;Envelope xmlns="NamespaceA" 
<br />
          xmlns:B="NamespaceB"&gt;<br />
  &lt;B:Header&gt;&lt;/B:Header&gt;<br />
  &lt;Body&gt;&lt;/Body&gt;<br />
&lt;/Envelope&gt;</font>
        </p>
        <p>
This tells you that <font face="Courier New">Envelope</font>, and <font face="Courier New">Body</font> elements
are in the same namespace (namely <font face="Courier New">'NamespaceA'</font>), while <font face="Courier New">Header</font> is
qualified with <font face="Courier New">'NamespaceB'</font>.
</p>
        <p>
Now suppose we need to programmatically insert <font face="Courier New">&lt;B:Header&gt;</font> element
into an empty, <em>core</em>, document.
</p>
        <p>
Core document:
</p>
        <p>
          <font face="Courier New">&lt;Envelope xmlns="NamespaceA" 
<br />
          xmlns:B="NamespaceB"&gt;<br />
  &lt;Body&gt;&lt;/Body&gt;<br />
&lt;/Envelope&gt;</font>
        </p>
        <p>
Now do an <font face="Courier New">XmlNode.InsertNode()</font> of the following:
</p>
        <p>
          <font face="Courier New">&lt;B:Header&gt;...&lt;/B:Header&gt;</font>
        </p>
        <p>
We should get:
</p>
        <p>
          <font face="Courier New">&lt;Envelope xmlns="NamespaceA" 
<br />
          xmlns:B="NamespaceB"&gt;<br />
  &lt;B:Header&gt;...&lt;/B:Header&gt;<br />
  &lt;Body&gt;&lt;/Body&gt;<br />
&lt;/Envelope&gt;</font>
        </p>
        <p>
To get the <em>to be inserted part</em> one would serialize (using <font face="Courier New">XmlSerializer</font>)
the following <font face="Courier New">Header</font> document:
</p>
        <p>
          <font face="Courier New">&lt;B: Header xmlns:B="NamespaceB"&gt;<br />
  ...<br />
&lt;/B:Header&gt;</font>
        </p>
        <p>
To do this, a simple <font face="Courier New">XmlSerializer</font> magic will do the
trick:
</p>
        <p>
          <font face="Courier New">XmlSerializerNamespaces xsn = new XmlSerializerNamespaces();<br />
xsn.Add("B", "NamespaceB");</font>
        </p>
        <p>
          <font face="Courier New">XmlSerializer xSer = new XmlSerializer(typeof(Header));<br />
XmlTextWriter tw = new XmlTextWriter(ms, null);<br />
xSer.Serialize(tw, h, xsn);</font>
        </p>
        <p>
          <font face="Courier New">ms.Seek(0, SeekOrigin.Begin);</font>
        </p>
        <p>
          <font face="Courier New">XmlDocument doc = new XmlDocument()<br />
doc.Load(ms);<br />
ms.Close();</font>
        </p>
        <p>
This would generate exactly what we wanted. A prefixed namespace based XML document,
with the <font face="Courier New">B</font> prefix bound to <font face="Courier New">'NamespaceB'</font>.
</p>
        <p>
Now, if we would import this document fragment into our core document using <font face="Courier New">XmlNode.ImportNode()</font>,
we would get:
</p>
        <p>
          <font face="Courier New">&lt;Envelope xmlns="NamespaceA" 
<br />
          xmlns:B="NamespaceB"&gt;<br />
  &lt;B:Header <font color="#ff0000">xmlns:B="NamespaceB"</font>&gt;...&lt;/B:Header&gt;<br />
  &lt;Body&gt;&lt;/Body&gt;<br />
&lt;/Envelope&gt;</font>
        </p>
        <p>
Which is valid and actually, from an XML Infoset view, an <em>isomorphic</em> document
to the original. So what if it's got the same namespace declared twice, right?
</p>
        <p>
Right - until you involve digital signatures. I have described a specific problem
with ambient namespaces in length in this blog entry: <a href="http://www.request-response.com/blog/PermaLink,guid,26149053-63bc-495e-bab0-8d14e7e46190.aspx">XmlSerializer,
Ambient XML Namespaces and Digital Signatures</a>.
</p>
        <p>
When importing a node from another context, <font face="Courier New">XmlNode</font> and
friends do a resolve against all namespace declarations in scope. So, when importing
such a header, <strong>we shouldn't get</strong> a duplicate namespace declaration.
</p>
        <p>
The problem is, we don't get a duplicate namespace declaration, since <font face="Courier New">XmlSerializer</font> actually
inserts a normal XML attribute into the <font face="Courier New">Header</font> element.
That's why we <strong>seem to get</strong> another namespace declaration. It's actually
not a declaration but a plain old attribute. It's even visible (in this
case in <font face="Courier New">XmlElement.Attributes</font>), and it definitely
shouldn't be there.
</p>
        <p>
So if you hit this special case, remove all attributes before importing the node into
your core document. Like this:
</p>
        <p>
          <font face="Courier New">XmlSerializerNamespaces xsn = new XmlSerializerNamespaces();<br />
xsn.Add("B", "NamespaceB");</font>
        </p>
        <p>
          <font face="Courier New">XmlSerializer xSer = new XmlSerializer(typeof(Header));<br />
XmlTextWriter tw = new XmlTextWriter(ms, null);<br />
xSer.Serialize(tw, h, xsn);</font>
        </p>
        <p>
          <font face="Courier New">ms.Seek(0, SeekOrigin.Begin);</font>
        </p>
        <p>
          <font face="Courier New">XmlDocument doc = new XmlDocument()<br />
doc.Load(ms);<br />
ms.Close();<br /><font color="#ff0000">doc.DocumentElement.Attributes.RemoveAll();</font></font>
        </p>
        <p>
Note that the <strong>serialized document representation will not change</strong>,
since an ambient namespace declaration (B linked to 'NamespaceB') still exists in
the XML Infoset of <font face="Courier New">doc</font> XML document.<br /></p>
        <img width="0" height="0" src="https://www.request-response.com/blog/aggbug.ashx?id=d27d4672-92f5-4944-8fc9-1f7f098d36e9" />
      </body>
      <title>Bug in XmlSerializer, XmlSerializerNamespaces</title>
      <guid isPermaLink="false">https://www.request-response.com/blog/PermaLink,guid,d27d4672-92f5-4944-8fc9-1f7f098d36e9.aspx</guid>
      <link>https://www.request-response.com/blog/PermaLink,guid,d27d4672-92f5-4944-8fc9-1f7f098d36e9.aspx</link>
      <pubDate>Mon, 06 Apr 2009 12:22:33 GMT</pubDate>
      <description>&lt;p&gt;
&lt;font face="Courier New"&gt;XmlSerializer&lt;/font&gt; is a great peace of technology. Combined
with &lt;font face="Courier New"&gt;xsd.exe&lt;/font&gt; and friends (&lt;font face="Courier New"&gt;XmlSerializerNamespaces&lt;/font&gt;,
et al.) it's a powerful tool for one to get around XML instance serialization/deserialization.
&lt;/p&gt;
&lt;p&gt;
But, there is a potentially serious bug present, even in 3.5 SP1 version of the .NET
Framework.
&lt;/p&gt;
&lt;p&gt;
Suppose we have the following XML structure:
&lt;/p&gt;
&lt;p&gt;
&lt;font face="Courier New"&gt;&amp;lt;Envelope xmlns="NamespaceA" 
&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; xmlns:B="NamespaceB"&amp;gt;&lt;br&gt;
&amp;nbsp; &amp;lt;B:Header&amp;gt;&amp;lt;/B:Header&amp;gt;&lt;br&gt;
&amp;nbsp; &amp;lt;Body&amp;gt;&amp;lt;/Body&amp;gt;&lt;br&gt;
&amp;lt;/Envelope&amp;gt;&lt;/font&gt;
&lt;/p&gt;
&lt;p&gt;
This tells you that &lt;font face="Courier New"&gt;Envelope&lt;/font&gt;, and &lt;font face="Courier New"&gt;Body&lt;/font&gt; elements
are in the same namespace (namely &lt;font face="Courier New"&gt;'NamespaceA'&lt;/font&gt;), while &lt;font face="Courier New"&gt;Header&lt;/font&gt; is
qualified with &lt;font face="Courier New"&gt;'NamespaceB'&lt;/font&gt;.
&lt;/p&gt;
&lt;p&gt;
Now suppose we need to programmatically insert &lt;font face="Courier New"&gt;&amp;lt;B:Header&amp;gt;&lt;/font&gt; element
into an empty, &lt;em&gt;core&lt;/em&gt;, document.
&lt;/p&gt;
&lt;p&gt;
Core document:
&lt;/p&gt;
&lt;p&gt;
&lt;font face="Courier New"&gt;&amp;lt;Envelope xmlns="NamespaceA" 
&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; xmlns:B="NamespaceB"&amp;gt;&lt;br&gt;
&amp;nbsp; &amp;lt;Body&amp;gt;&amp;lt;/Body&amp;gt;&lt;br&gt;
&amp;lt;/Envelope&amp;gt;&lt;/font&gt;
&lt;/p&gt;
&lt;p&gt;
Now do an &lt;font face="Courier New"&gt;XmlNode.InsertNode()&lt;/font&gt; of the following:
&lt;/p&gt;
&lt;p&gt;
&lt;font face="Courier New"&gt;&amp;lt;B:Header&amp;gt;...&amp;lt;/B:Header&amp;gt;&lt;/font&gt;
&lt;/p&gt;
&lt;p&gt;
We should get:
&lt;/p&gt;
&lt;p&gt;
&lt;font face="Courier New"&gt;&amp;lt;Envelope xmlns="NamespaceA" 
&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; xmlns:B="NamespaceB"&amp;gt;&lt;br&gt;
&amp;nbsp; &amp;lt;B:Header&amp;gt;...&amp;lt;/B:Header&amp;gt;&lt;br&gt;
&amp;nbsp; &amp;lt;Body&amp;gt;&amp;lt;/Body&amp;gt;&lt;br&gt;
&amp;lt;/Envelope&amp;gt;&lt;/font&gt;
&lt;/p&gt;
&lt;p&gt;
To get the &lt;em&gt;to be inserted part&lt;/em&gt; one would serialize (using &lt;font face="Courier New"&gt;XmlSerializer&lt;/font&gt;)
the following &lt;font face="Courier New"&gt;Header&lt;/font&gt; document:
&lt;/p&gt;
&lt;p&gt;
&lt;font face="Courier New"&gt;&amp;lt;B: Header xmlns:B="NamespaceB"&amp;gt;&lt;br&gt;
&amp;nbsp; ...&lt;br&gt;
&amp;lt;/B:Header&amp;gt;&lt;/font&gt;
&lt;/p&gt;
&lt;p&gt;
To do this, a simple &lt;font face="Courier New"&gt;XmlSerializer&lt;/font&gt; magic will do the
trick:
&lt;/p&gt;
&lt;p&gt;
&lt;font face="Courier New"&gt;XmlSerializerNamespaces xsn = new XmlSerializerNamespaces();&lt;br&gt;
xsn.Add("B", "NamespaceB");&lt;/font&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;font face="Courier New"&gt;XmlSerializer xSer = new XmlSerializer(typeof(Header));&lt;br&gt;
XmlTextWriter tw = new XmlTextWriter(ms, null);&lt;br&gt;
xSer.Serialize(tw, h, xsn);&lt;/font&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;font face="Courier New"&gt;ms.Seek(0, SeekOrigin.Begin);&lt;/font&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;font face="Courier New"&gt;XmlDocument doc = new XmlDocument()&lt;br&gt;
doc.Load(ms);&lt;br&gt;
ms.Close();&lt;/font&gt;
&lt;/p&gt;
&lt;p&gt;
This would generate exactly what we wanted. A prefixed namespace&amp;nbsp;based XML document,
with the &lt;font face="Courier New"&gt;B&lt;/font&gt; prefix bound to &lt;font face="Courier New"&gt;'NamespaceB'&lt;/font&gt;.
&lt;/p&gt;
&lt;p&gt;
Now, if we would import this document fragment into our core document using &lt;font face="Courier New"&gt;XmlNode.ImportNode()&lt;/font&gt;,
we would get:
&lt;/p&gt;
&lt;p&gt;
&lt;font face="Courier New"&gt;&amp;lt;Envelope xmlns="NamespaceA" 
&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; xmlns:B="NamespaceB"&amp;gt;&lt;br&gt;
&amp;nbsp; &amp;lt;B:Header &lt;font color=#ff0000&gt;xmlns:B="NamespaceB"&lt;/font&gt;&amp;gt;...&amp;lt;/B:Header&amp;gt;&lt;br&gt;
&amp;nbsp; &amp;lt;Body&amp;gt;&amp;lt;/Body&amp;gt;&lt;br&gt;
&amp;lt;/Envelope&amp;gt;&lt;/font&gt;
&lt;/p&gt;
&lt;p&gt;
Which is valid and actually, from an XML Infoset view, an &lt;em&gt;isomorphic&lt;/em&gt; document
to the original. So what if it's got the same namespace declared twice, right?
&lt;/p&gt;
&lt;p&gt;
Right - until you involve digital signatures. I have described a specific problem
with ambient namespaces in length in this blog entry: &lt;a href="http://www.request-response.com/blog/PermaLink,guid,26149053-63bc-495e-bab0-8d14e7e46190.aspx"&gt;XmlSerializer,
Ambient XML Namespaces and Digital Signatures&lt;/a&gt;.
&lt;/p&gt;
&lt;p&gt;
When importing a node from another context, &lt;font face="Courier New"&gt;XmlNode&lt;/font&gt; and
friends do a resolve against all namespace declarations in scope. So, when importing
such a header, &lt;strong&gt;we shouldn't get&lt;/strong&gt; a duplicate namespace declaration.
&lt;/p&gt;
&lt;p&gt;
The problem is, we don't get a duplicate namespace declaration, since &lt;font face="Courier New"&gt;XmlSerializer&lt;/font&gt; actually
inserts a normal&amp;nbsp;XML attribute into the &lt;font face="Courier New"&gt;Header&lt;/font&gt; element.
That's why we &lt;strong&gt;seem to get&lt;/strong&gt; another namespace declaration. It's actually
not a declaration but a&amp;nbsp;plain old&amp;nbsp;attribute. It's even visible (in this
case&amp;nbsp;in &lt;font face="Courier New"&gt;XmlElement.Attributes&lt;/font&gt;), and it definitely
shouldn't be there.
&lt;/p&gt;
&lt;p&gt;
So if you hit this special case, remove all attributes before importing the node into
your core document. Like this:
&lt;/p&gt;
&lt;p&gt;
&lt;font face="Courier New"&gt;XmlSerializerNamespaces xsn = new XmlSerializerNamespaces();&lt;br&gt;
xsn.Add("B", "NamespaceB");&lt;/font&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;font face="Courier New"&gt;XmlSerializer xSer = new XmlSerializer(typeof(Header));&lt;br&gt;
XmlTextWriter tw = new XmlTextWriter(ms, null);&lt;br&gt;
xSer.Serialize(tw, h, xsn);&lt;/font&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;font face="Courier New"&gt;ms.Seek(0, SeekOrigin.Begin);&lt;/font&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;font face="Courier New"&gt;XmlDocument doc = new XmlDocument()&lt;br&gt;
doc.Load(ms);&lt;br&gt;
ms.Close();&lt;br&gt;
&lt;font color=#ff0000&gt;doc.DocumentElement.Attributes.RemoveAll();&lt;/font&gt;&lt;/font&gt;
&lt;/p&gt;
&lt;p&gt;
Note that the &lt;strong&gt;serialized document representation will not change&lt;/strong&gt;,
since an ambient namespace declaration (B linked to 'NamespaceB') still exists in
the XML Infoset of &lt;font face="Courier New"&gt;doc&lt;/font&gt; XML document.&lt;br&gt;
&lt;/p&gt;
&lt;img width="0" height="0" src="https://www.request-response.com/blog/aggbug.ashx?id=d27d4672-92f5-4944-8fc9-1f7f098d36e9" /&gt;</description>
      <comments>https://www.request-response.com/blog/CommentView,guid,d27d4672-92f5-4944-8fc9-1f7f098d36e9.aspx</comments>
      <category>.NET 3.5 - General</category>
      <category>XML</category>
    </item>
    <item>
      <trackback:ping>https://www.request-response.com/blog/Trackback.aspx?guid=efa4e231-ddf1-48f4-9a26-54363e799d42</trackback:ping>
      <pingback:server>https://www.request-response.com/blog/pingback.aspx</pingback:server>
      <pingback:target>https://www.request-response.com/blog/PermaLink,guid,efa4e231-ddf1-48f4-9a26-54363e799d42.aspx</pingback:target>
      <dc:creator>Matevz Gacnik</dc:creator>
      <wfw:comment>https://www.request-response.com/blog/CommentView,guid,efa4e231-ddf1-48f4-9a26-54363e799d42.aspx</wfw:comment>
      <wfw:commentRss>https://www.request-response.com/blog/SyndicationService.asmx/GetEntryCommentsRss?guid=efa4e231-ddf1-48f4-9a26-54363e799d42</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Recently I needed to specify exactly how I would like a <em>specific class</em> serialized.
Suppose we have the following simple schema:
</p>
        <p>
          <font face="Courier New">&lt;xs:schema targetNamespace="</font>
          <font face="Courier New">http://my.favourite.ns/person.xsd</font>
          <font face="Courier New">"<br />
   elementFormDefault="qualified"<br />
   xmlns:xs="</font>
          <font face="Courier New">http://www.w3.org/2001/XMLSchema</font>
          <font face="Courier New">"<br />
   </font>
          <font face="Courier New">xmlns="</font>
          <font face="Courier New">http://my.favourite.ns/person.xsd"</font>
          <font face="Courier New">&gt;<br /><strong>  &lt;xs:complexType name="Person"&gt;</strong><br />
    &lt;xs:sequence&gt;<br />
      &lt;xs:element name="Name" type="xs:string" /&gt;<br />
      &lt;xs:element name="Surname" type="xs:string" /&gt;<br />
      &lt;xs:element name="Age" type="xs:int" minOccurs="0"
/&gt;<br />
    &lt;/xs:sequence&gt;<br /><strong>  &lt;/xs:complexType&gt;<br /></strong>&lt;/xs:schema&gt;</font>
        </p>
        <p>
Let's call this schema <font face="Courier New">President.xsd</font>.
</p>
        <p>
A valid XML instance against this schema would be, for example:
</p>
        <p>
          <font face="Courier New">&lt;Person xmlns="http://my.favourite.ns/person.xsd"&gt;<br />
   &lt;Name&gt;Barrack&lt;/Name&gt;<br />
   &lt;Surname&gt;Obama&lt;/Surname&gt;<br />
   &lt;Age&gt;47&lt;/Age&gt;<br />
&lt;/Person&gt;</font>
        </p>
        <p>
Since we are serializing against a specific <a href="http://www.w3.org/XML/Schema">XML
schema</a> (XSD), we have an option of schema compilation:
</p>
        <p>
          <font face="Courier New">xsd /c President.xsd</font>
        </p>
        <p>
This, obviously, yields a programmatic type system result in a form of a C# class.
All well and done.
</p>
        <p>
Now.
</p>
        <p>
If we serialize the filled up class instance back to XML, we get a valid XML instance.
It's valid against <font face="Courier New">President.xsd</font>.
</p>
        <p>
There is a case where your schema changes ever so slightly - read, the namespaces
change, and you don't want to recompile the entire solution to support this, but you
still want to use XML serialization. Who doesn't - what do you do?
</p>
        <p>
Suppose we want to get <strong>the following back</strong>, when serializing:
</p>
        <p>
          <font face="Courier New">&lt;PresidentPerson xmlns="</font>
          <font face="Courier New">http://schemas.gama-system.com/<br />
      president.xsd"</font>
          <font face="Courier New">&gt;<br />
   &lt;Name&gt;Barrack&lt;/Name&gt;<br />
   &lt;Surname&gt;Obama&lt;/Surname&gt;<br />
   &lt;Age&gt;47&lt;/Age&gt;<br />
&lt;/PresidentPerson&gt;</font>
        </p>
        <p>
There is an option to override the default serialization technique of <font face="Courier New">XmlSerializer</font>.
Enter  the world of <font face="Courier New">XmlAttributes</font> and <font face="Courier New">XmlAttributeOverrides</font>:
</p>
        <p>
          <font face="Courier New">private XmlSerializer GetOverridedSerializer()<br />
{<br />
   // set overrides for person element<br />
   XmlAttributes attrsPerson = new XmlAttributes();<br />
   XmlRootAttribute rootPerson = 
<br />
      new XmlRootAttribute("<strong>PresidentPerson</strong>");<br />
   rootPerson.Namespace = "</font>
          <font face="Courier New">
            <strong>http://schemas.gama-system.com/<br />
      president.xsd</strong>
          </font>
          <font face="Courier New">";<br />
   attrsPerson.XmlRoot = rootPerson;</font>
        </p>
        <p>
          <font face="Courier New">   // create overrider<br />
   XmlAttributeOverrides xOver = new XmlAttributeOverrides();<br />
   xOver.Add(typeof(Person), attrsPerson);</font>
        </p>
        <p>
          <font face="Courier New">   XmlSerializer xSer = new XmlSerializer(typeof(Person),
xOver);<br />
   return xSer;<br />
}</font>
        </p>
        <p>
Now serialize normally:
</p>
        <p>
          <font face="Courier New">Stream ms = new MemoryStream();<br />
XmlTextWriter tw = new XmlTextWriter(ms, null);<br />
xSer.Serialize(tw, person);</font>
        </p>
        <p>
This will work even if you only have a compiled version of your object graph, and
you don't have any sources. <font face="Courier New">System.Xml.Serialization.XmlAttributeOverrides</font> class
allows you to adorn any XML serializable class with your own XML syntax - element
names, attribute names, namespaces and types.
</p>
        <p>
Remember - you can override them all and <em>still</em> serialize <em>your</em> angle
brackets.<br /></p>
        <br />
        <img width="0" height="0" src="https://www.request-response.com/blog/aggbug.ashx?id=efa4e231-ddf1-48f4-9a26-54363e799d42" />
      </body>
      <title>XmlSerializer: Serialized Syntax and How to Override It</title>
      <guid isPermaLink="false">https://www.request-response.com/blog/PermaLink,guid,efa4e231-ddf1-48f4-9a26-54363e799d42.aspx</guid>
      <link>https://www.request-response.com/blog/PermaLink,guid,efa4e231-ddf1-48f4-9a26-54363e799d42.aspx</link>
      <pubDate>Fri, 29 Aug 2008 18:38:07 GMT</pubDate>
      <description>&lt;p&gt;
Recently I needed to specify exactly how I would like a &lt;em&gt;specific class&lt;/em&gt; serialized.
Suppose we have the following simple schema:
&lt;/p&gt;
&lt;p&gt;
&lt;font face="Courier New"&gt;&amp;lt;xs:schema targetNamespace="&lt;/font&gt;&lt;font face="Courier New"&gt;http://my.favourite.ns/person.xsd&lt;/font&gt;&lt;font face="Courier New"&gt;"&lt;br&gt;
&amp;nbsp;&amp;nbsp; elementFormDefault="qualified"&lt;br&gt;
&amp;nbsp;&amp;nbsp; xmlns:xs="&lt;/font&gt;&lt;font face="Courier New"&gt;http://www.w3.org/2001/XMLSchema&lt;/font&gt;&lt;font face="Courier New"&gt;"&lt;br&gt;
&amp;nbsp;&amp;nbsp; &lt;/font&gt;&lt;font face="Courier New"&gt;xmlns="&lt;/font&gt;&lt;font face="Courier New"&gt;http://my.favourite.ns/person.xsd"&lt;/font&gt;&lt;font face="Courier New"&gt;&amp;gt;&lt;br&gt;
&lt;strong&gt;&amp;nbsp; &amp;lt;xs:complexType name="Person"&amp;gt;&lt;/strong&gt;
&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;xs:sequence&amp;gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;xs:element name="Name" type="xs:string" /&amp;gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;xs:element name="Surname" type="xs:string" /&amp;gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;xs:element name="Age" type="xs:int" minOccurs="0"
/&amp;gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/xs:sequence&amp;gt;&lt;br&gt;
&lt;strong&gt;&amp;nbsp; &amp;lt;/xs:complexType&amp;gt;&lt;br&gt;
&lt;/strong&gt;&amp;lt;/xs:schema&amp;gt;&lt;/font&gt;
&lt;/p&gt;
&lt;p&gt;
Let's call this schema &lt;font face="Courier New"&gt;President.xsd&lt;/font&gt;.
&lt;/p&gt;
&lt;p&gt;
A valid XML instance against this schema would be, for example:
&lt;/p&gt;
&lt;p&gt;
&lt;font face="Courier New"&gt;&amp;lt;Person xmlns="http://my.favourite.ns/person.xsd"&amp;gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp; &amp;lt;Name&amp;gt;Barrack&amp;lt;/Name&amp;gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp; &amp;lt;Surname&amp;gt;Obama&amp;lt;/Surname&amp;gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp; &amp;lt;Age&amp;gt;47&amp;lt;/Age&amp;gt;&lt;br&gt;
&amp;lt;/Person&amp;gt;&lt;/font&gt;
&lt;/p&gt;
&lt;p&gt;
Since we are serializing against a specific &lt;a href="http://www.w3.org/XML/Schema"&gt;XML
schema&lt;/a&gt; (XSD), we have an option of schema compilation:
&lt;/p&gt;
&lt;p&gt;
&lt;font face="Courier New"&gt;xsd /c President.xsd&lt;/font&gt;
&lt;/p&gt;
&lt;p&gt;
This, obviously,&amp;nbsp;yields a programmatic type system result in a form of a C# class.
All well and done.
&lt;/p&gt;
&lt;p&gt;
Now.
&lt;/p&gt;
&lt;p&gt;
If we serialize the filled up class instance back to XML, we get a valid XML instance.
It's valid against &lt;font face="Courier New"&gt;President.xsd&lt;/font&gt;.
&lt;/p&gt;
&lt;p&gt;
There is a case where your schema changes ever so slightly - read, the namespaces
change, and you don't want to recompile the entire solution to support this, but you
still want to use XML serialization. Who doesn't&amp;nbsp;-&amp;nbsp;what do you do?
&lt;/p&gt;
&lt;p&gt;
Suppose we want to get &lt;strong&gt;the following back&lt;/strong&gt;, when serializing:
&lt;/p&gt;
&lt;p&gt;
&lt;font face="Courier New"&gt;&amp;lt;PresidentPerson xmlns="&lt;/font&gt;&lt;font face="Courier New"&gt;http://schemas.gama-system.com/&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; president.xsd"&lt;/font&gt;&lt;font face="Courier New"&gt;&amp;gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp; &amp;lt;Name&amp;gt;Barrack&amp;lt;/Name&amp;gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp; &amp;lt;Surname&amp;gt;Obama&amp;lt;/Surname&amp;gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp; &amp;lt;Age&amp;gt;47&amp;lt;/Age&amp;gt;&lt;br&gt;
&amp;lt;/PresidentPerson&amp;gt;&lt;/font&gt;
&lt;/p&gt;
&lt;p&gt;
There is an option to override the default serialization technique of &lt;font face="Courier New"&gt;XmlSerializer&lt;/font&gt;.
Enter&amp;nbsp; the world of &lt;font face="Courier New"&gt;XmlAttributes&lt;/font&gt; and &lt;font face="Courier New"&gt;XmlAttributeOverrides&lt;/font&gt;:
&lt;/p&gt;
&lt;p&gt;
&lt;font face="Courier New"&gt;private XmlSerializer GetOverridedSerializer()&lt;br&gt;
{&lt;br&gt;
&amp;nbsp;&amp;nbsp; // set overrides for person element&lt;br&gt;
&amp;nbsp;&amp;nbsp; XmlAttributes attrsPerson = new XmlAttributes();&lt;br&gt;
&amp;nbsp;&amp;nbsp; XmlRootAttribute rootPerson = 
&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; new XmlRootAttribute("&lt;strong&gt;PresidentPerson&lt;/strong&gt;");&lt;br&gt;
&amp;nbsp;&amp;nbsp; rootPerson.Namespace = "&lt;/font&gt;&lt;font face="Courier New"&gt;&lt;strong&gt;http://schemas.gama-system.com/&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; president.xsd&lt;/strong&gt;&lt;/font&gt;&lt;font face="Courier New"&gt;";&lt;br&gt;
&amp;nbsp;&amp;nbsp; attrsPerson.XmlRoot = rootPerson;&lt;/font&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;font face="Courier New"&gt;&amp;nbsp;&amp;nbsp; // create overrider&lt;br&gt;
&amp;nbsp;&amp;nbsp; XmlAttributeOverrides xOver = new XmlAttributeOverrides();&lt;br&gt;
&amp;nbsp;&amp;nbsp; xOver.Add(typeof(Person), attrsPerson);&lt;/font&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;font face="Courier New"&gt;&amp;nbsp;&amp;nbsp; XmlSerializer xSer = new XmlSerializer(typeof(Person),
xOver);&lt;br&gt;
&amp;nbsp;&amp;nbsp; return xSer;&lt;br&gt;
}&lt;/font&gt;
&lt;/p&gt;
&lt;p&gt;
Now serialize normally:
&lt;/p&gt;
&lt;p&gt;
&lt;font face="Courier New"&gt;Stream ms = new MemoryStream();&lt;br&gt;
XmlTextWriter tw = new XmlTextWriter(ms, null);&lt;br&gt;
xSer.Serialize(tw, person);&lt;/font&gt;
&lt;/p&gt;
&lt;p&gt;
This will work even if you only have a compiled version of your object graph, and
you don't have any sources. &lt;font face="Courier New"&gt;System.Xml.Serialization.XmlAttributeOverrides&lt;/font&gt; class
allows you to adorn any XML serializable class with your own XML syntax - element
names, attribute names, namespaces and types.
&lt;/p&gt;
&lt;p&gt;
Remember - you can override them all and &lt;em&gt;still&lt;/em&gt; serialize &lt;em&gt;your&lt;/em&gt; angle
brackets.&lt;br&gt;
&lt;/p&gt;
&lt;br&gt;
&lt;img width="0" height="0" src="https://www.request-response.com/blog/aggbug.ashx?id=efa4e231-ddf1-48f4-9a26-54363e799d42" /&gt;</description>
      <comments>https://www.request-response.com/blog/CommentView,guid,efa4e231-ddf1-48f4-9a26-54363e799d42.aspx</comments>
      <category>XML</category>
    </item>
    <item>
      <trackback:ping>https://www.request-response.com/blog/Trackback.aspx?guid=a6f0a54f-31ae-4ccd-ad90-fdfbabba5d95</trackback:ping>
      <pingback:server>https://www.request-response.com/blog/pingback.aspx</pingback:server>
      <pingback:target>https://www.request-response.com/blog/PermaLink,guid,a6f0a54f-31ae-4ccd-ad90-fdfbabba5d95.aspx</pingback:target>
      <dc:creator>Matevz Gacnik</dc:creator>
      <wfw:comment>https://www.request-response.com/blog/CommentView,guid,a6f0a54f-31ae-4ccd-ad90-fdfbabba5d95.aspx</wfw:comment>
      <wfw:commentRss>https://www.request-response.com/blog/SyndicationService.asmx/GetEntryCommentsRss?guid=a6f0a54f-31ae-4ccd-ad90-fdfbabba5d95</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
As promised, here are the sources from my <a href="http://www.ntk.si">NTK 2008</a> sessions <font size="1">[1]</font>.
</p>
        <p>
          <strong>Talk: Document Style Service Interfaces</strong>
        </p>
        <p>
Read the following <a href="http://www.request-response.com/blog/PermaLink,guid,ab874bc2-1546-48d1-a8aa-46f0bf876d93.aspx">blog
entry</a>, I tried to describe the concept in detail. Also, this <a href="http://www.request-response.com/blog/PermaLink,guid,a510f1dc-23bb-42aa-b683-a70c4740bfe5.aspx">blog post</a> discusses
issues when using large document parameters with reliable transport  (WS-RM)
channels.
</p>
        <p>
Demo: Document Style Service Interfaces [<a href="http://www.request-response.com/blog/content/binary/NTK2008DocStyleParamModels.zip">Download</a>]
</p>
        <p>
This demo defines a service interface with the document parameter model, ie. <font face="Courier New">Guid
CreatePerson(XmlDocument person)</font>. It shows three different approaches to creation
of the passed document:
</p>
        <ol>
          <li>
Raw XML creation 
</li>
          <li>
XML Serialization of the (attribute annotated) object graph 
</li>
          <li>
XML Serialization using the <em>client object model</em></li>
        </ol>
        <p>
Also, versioned schemas for the <font face="Courier New">Person</font> document are
shown, including the support for document validation and version independence.
</p>
        <p>
          <strong>Talk: Windows Server 2008 and Transactional NTFS</strong>
        </p>
        <p>
This <a href="http://www.request-response.com/blog/PermaLink,guid,bca19fa8-7ba8-43d8-873e-3a8cf03335cb.aspx">blog
entry</a> describes the concept.
</p>
        <p>
Demo 1: Logging using CLFS (Common Log File System) [<a href="http://www.request-response.com/blog/content/binary/NTK2008TxFCLFS.zip">Download</a>]<br />
Demo 2: NTFS Transactions using the File System, SQL, WCF [<a href="http://www.request-response.com/blog/content/binary/NTK2008TxFFSSQLWCF.zip">Download</a>]<br />
Demo 3: NTFS Transactions using the WCF, MTOM Transport [<a href="http://www.request-response.com/blog/content/binary/NTK2008TxFWCFMTOM.zip">Download</a>] <font size="1">[2]</font></p>
        <p>
          <font size="1">[1] All sources are in VS 2008 solution file format.<br />
[2] This transaction spans from the client, through the service boundary, to the server.</font>
        </p>
        <img width="0" height="0" src="https://www.request-response.com/blog/aggbug.ashx?id=a6f0a54f-31ae-4ccd-ad90-fdfbabba5d95" />
      </body>
      <title>Demos from the NT Conference 2008</title>
      <guid isPermaLink="false">https://www.request-response.com/blog/PermaLink,guid,a6f0a54f-31ae-4ccd-ad90-fdfbabba5d95.aspx</guid>
      <link>https://www.request-response.com/blog/PermaLink,guid,a6f0a54f-31ae-4ccd-ad90-fdfbabba5d95.aspx</link>
      <pubDate>Thu, 15 May 2008 15:24:19 GMT</pubDate>
      <description>&lt;p&gt;
As promised, here are the sources from&amp;nbsp;my &lt;a href="http://www.ntk.si"&gt;NTK 2008&lt;/a&gt; sessions &lt;font size=1&gt;[1]&lt;/font&gt;.
&lt;/p&gt;
&lt;p&gt;
&lt;strong&gt;Talk: Document Style Service Interfaces&lt;/strong&gt;
&lt;/p&gt;
&lt;p&gt;
Read the following &lt;a href="http://www.request-response.com/blog/PermaLink,guid,ab874bc2-1546-48d1-a8aa-46f0bf876d93.aspx"&gt;blog
entry&lt;/a&gt;, I tried to describe the concept in detail. Also, this &lt;a href="http://www.request-response.com/blog/PermaLink,guid,a510f1dc-23bb-42aa-b683-a70c4740bfe5.aspx"&gt;blog&amp;nbsp;post&lt;/a&gt; discusses
issues when using large document parameters with reliable transport&amp;nbsp; (WS-RM)
channels.
&lt;/p&gt;
&lt;p&gt;
Demo: Document Style Service Interfaces [&lt;a href="http://www.request-response.com/blog/content/binary/NTK2008DocStyleParamModels.zip"&gt;Download&lt;/a&gt;]
&lt;/p&gt;
&lt;p&gt;
This demo defines a service interface with the document parameter model, ie. &lt;font face="Courier New"&gt;Guid
CreatePerson(XmlDocument person)&lt;/font&gt;. It shows three different approaches to creation
of the passed document:
&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
Raw XML creation 
&lt;li&gt;
XML Serialization of the (attribute annotated) object graph 
&lt;li&gt;
XML Serialization using the &lt;em&gt;client object model&lt;/em&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;
Also, versioned schemas for the &lt;font face="Courier New"&gt;Person&lt;/font&gt; document are
shown, including the support for document validation and version independence.
&lt;/p&gt;
&lt;p&gt;
&lt;strong&gt;Talk: Windows Server 2008 and Transactional NTFS&lt;/strong&gt;
&lt;/p&gt;
&lt;p&gt;
This &lt;a href="http://www.request-response.com/blog/PermaLink,guid,bca19fa8-7ba8-43d8-873e-3a8cf03335cb.aspx"&gt;blog
entry&lt;/a&gt; describes the concept.
&lt;/p&gt;
&lt;p&gt;
Demo 1: Logging&amp;nbsp;using CLFS (Common Log File System)&amp;nbsp;[&lt;a href="http://www.request-response.com/blog/content/binary/NTK2008TxFCLFS.zip"&gt;Download&lt;/a&gt;]&lt;br&gt;
Demo 2:&amp;nbsp;NTFS Transactions using the File System, SQL, WCF&amp;nbsp;[&lt;a href="http://www.request-response.com/blog/content/binary/NTK2008TxFFSSQLWCF.zip"&gt;Download&lt;/a&gt;]&lt;br&gt;
Demo 3:&amp;nbsp;NTFS Transactions using the&amp;nbsp;WCF, MTOM Transport&amp;nbsp;[&lt;a href="http://www.request-response.com/blog/content/binary/NTK2008TxFWCFMTOM.zip"&gt;Download&lt;/a&gt;] &lt;font size=1&gt;[2]&lt;/font&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;font size=1&gt;[1] All sources are in VS 2008 solution file format.&lt;br&gt;
[2] This transaction spans from the client, through the service boundary, to the server.&lt;/font&gt;
&lt;/p&gt;
&lt;img width="0" height="0" src="https://www.request-response.com/blog/aggbug.ashx?id=a6f0a54f-31ae-4ccd-ad90-fdfbabba5d95" /&gt;</description>
      <comments>https://www.request-response.com/blog/CommentView,guid,a6f0a54f-31ae-4ccd-ad90-fdfbabba5d95.aspx</comments>
      <category>.NET 3.5 - WCF</category>
      <category>Transactions</category>
      <category>XML</category>
    </item>
    <item>
      <trackback:ping>https://www.request-response.com/blog/Trackback.aspx?guid=f37eda08-845c-4b0a-a66c-ea9cec03c06b</trackback:ping>
      <pingback:server>https://www.request-response.com/blog/pingback.aspx</pingback:server>
      <pingback:target>https://www.request-response.com/blog/PermaLink,guid,f37eda08-845c-4b0a-a66c-ea9cec03c06b.aspx</pingback:target>
      <dc:creator>Matevz Gacnik</dc:creator>
      <wfw:comment>https://www.request-response.com/blog/CommentView,guid,f37eda08-845c-4b0a-a66c-ea9cec03c06b.aspx</wfw:comment>
      <wfw:commentRss>https://www.request-response.com/blog/SyndicationService.asmx/GetEntryCommentsRss?guid=f37eda08-845c-4b0a-a66c-ea9cec03c06b</wfw:commentRss>
      <slash:comments>2</slash:comments>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Suppose we have a document like this:
</p>
        <p>
          <font face="Courier New">&lt;?xml version="1.0"?&gt;<br />
&lt;root xmlns="urn-foo-bar"&gt;<br />
  &lt;subroot&gt;<br />
    &lt;value1&gt;value1&lt;/value1&gt;<br />
    &lt;value2&gt;value2&lt;/value2&gt;<br />
  &lt;/subroot&gt;<br />
  &lt;Signature xmlns="h</font>
          <font face="Courier New">ttp://www.w3.org/2000/09/xmldsig</font>
          <font face="Courier New">#"&gt;<br />
    &lt;SignedInfo&gt;<br />
      &lt;CanonicalizationMethod 
<br />
        Algorithm="</font>
          <font face="Courier New">http://www.w3.org/TR/2001/REC-xml-c14n-20010315</font>
          <font face="Courier New">"
/&gt;<br />
      &lt;SignatureMethod<br />
        Algorithm="</font>
          <font face="Courier New">http://www.w3.org/2000/09/xmldsig#rsa-sha1</font>
          <font face="Courier New">"
/&gt;<br />
      &lt;Reference URI=""&gt;<br />
        &lt;Transforms&gt;<br />
          &lt;Transform <br />
            Algorithm="</font>
          <font face="Courier New">http://www.w3.org/2000/09/<br />
              xmldsig#enveloped-signature</font>
          <font face="Courier New">"/&gt;<br />
        &lt;/Transforms&gt;<br />
        &lt;DigestMethod<br />
          Algorithm="</font>
          <font face="Courier New">http://www.w3.org/2000/09/xmldsig#sha1</font>
          <font face="Courier New">"
/&gt;<br />
        &lt;DigestValue&gt;1Xp...EOko=&lt;/DigestValue&gt;<br />
      &lt;/Reference&gt;<br />
    &lt;/SignedInfo&gt;<br />
    &lt;SignatureValue&gt;nls...cH0k=&lt;/SignatureValue&gt;<br />
    &lt;KeyInfo&gt;<br />
      &lt;KeyValue&gt;<br />
        &lt;RSAKeyValue&gt;<br />
          &lt;Modulus&gt;9f3W...fxG0E=&lt;/Modulus&gt;<br />
          &lt;Exponent&gt;AQAB&lt;/Exponent&gt;<br />
        &lt;/RSAKeyValue&gt;<br />
      &lt;/KeyValue&gt;<br />
      &lt;X509Data&gt;<br />
        &lt;X509Certificate&gt;MIIEi...ktYgN&lt;/X509Certificate&gt;<br />
      &lt;/X509Data&gt;<br />
    &lt;/KeyInfo&gt;<br />
  &lt;/Signature&gt;<br />
&lt;/root&gt;</font>
        </p>
        <p>
This document represents data and an <em>enveloped digital signature</em> over the
complete XML document. The <em>digital signature completeness</em> is defined in the <font face="Courier New">Reference</font> element,
which has <font face="Courier New">URI</font> attribute set to empty string (<font face="Courier New">Reference
Uri=""</font>).
</p>
        <p>
          <strong>Checking the Signature</strong>
        </p>
        <p>
The following should always be applied during signature validation:
</p>
        <ol>
          <li>
Validating the digital signature 
</li>
          <li>
Validating the certificate(s) used to create the signature 
</li>
          <li>
Validating the certificate(s) chain(s)</li>
        </ol>
        <p>
          <strong>
            <em>Note:</em>
          </strong> In most situations this is the optimal validation
sequence. Why? Signatures are broken far more frequently then certificates are revoked/expired.
And certificates are revoked/expired far more frequently then their chains.
</p>
        <p>
          <em>1. Validating the digital signature</em>
        </p>
        <blockquote dir="ltr" style="MARGIN-RIGHT: 0px">
          <p>
First, get it out of there:
</p>
          <p>
            <font face="Courier New">XmlNamespaceManager xmlns = new XmlNamespaceManager(xdkDocument.NameTable);
[1]<br />
xmlns.AddNamespace("ds", "</font>
            <font face="Courier New">http://www.w3.org/2000/09/xmldsig</font>
            <font face="Courier New">#");<br />
XmlNodeList nodeList = xdkDocument.SelectNodes("//ds:Signature", xmlns);<br /></font> <br /><font size="1">[1] <font face="Courier New">xdkDocument </font>should be an <font face="Courier New">XmlDocument</font> instance
representing your document.</font></p>
          <p>
Second, construct a <font face="Courier New">SignedXml</font> instance:
</p>
          <p>
            <font face="Courier New">foreach (XmlNode xmlNode in nodeList)<br />
{<br />
  // create signed xml object<br />
  SignedXml signedXml = new SignedXml(xdkDocument); [2]</font>
          </p>
          <p>
            <font face="Courier New">  // verify signature<br />
  signedXml.LoadXml((XmlElement)xmlNode);<br />
}</font>
          </p>
          <p>
            <font size="1">[2] Note that we are constructing the <font face="Courier New">SignedXml</font> instance
from a complete document, not only the signature. Read this.</font>
          </p>
          <p>
Third, validate:
</p>
          <p>
            <font face="Courier New">bool booSigValid = signedXml.CheckSignature();</font>
          </p>
          <p>
If <font face="Courier New">booSigValid</font> is <font face="Courier New">true</font>,
proceed.
</p>
        </blockquote>
        <p>
          <em>2. Validating the certificate(s) used to create the signature</em>
        </p>
        <blockquote dir="ltr" style="MARGIN-RIGHT: 0px">
          <p>
First, get it out of there:
</p>
          <p>
            <font face="Courier New">XmlNode xndCert = xmlNode.SelectSingleNode(".//ds:X509Certificate",
xmlns); [3]</font>
          </p>
          <p>
            <font size="1">[3] There can be multiple <font face="Courier New">X509Certificate</font> elements
qualified with <font face="Courier New">h</font></font>
            <font face="Courier New" size="1">ttp://www.w3.org/2000/09/xmldsig</font>
            <font size="1">
              <font face="Courier New">#</font> namespace
in there. Xml Digital Signature specification is allowing the serialization of a complete
certificate chain of the certificate used to sign the document. Normally, the signing
certificate should be the first to be serialized.</font>
          </p>
          <p>
Second, get the <font face="Courier New">X509Certificate2</font> instance:
</p>
          <p>
            <font face="Courier New">byte[] bytCert = Convert.FromBase64String(xndCert.InnerText);<br />
X509Certificate2 x509cert = new X509Certificate2(bytCert);</font>
          </p>
          <p>
Third, validate:
</p>
          <p>
            <font face="Courier New">bool booCertValid = x509cert.Verify();</font>
          </p>
          <p>
If <font face="Courier New">booCertValid</font> is <font face="Courier New">true</font>,
proceed.
</p>
        </blockquote>
        <p>
          <em>3. Validating the certificate(s) chain(s)</em>
        </p>
        <blockquote dir="ltr" style="MARGIN-RIGHT: 0px">
          <p>
Building and validating the chain:
</p>
          <p>
            <font face="Courier New">X509Chain certChain = new X509Chain();<br />
bool booChainValid = certChain.Build(x509cert);<br />
int intChainLength = certChain.ChainElements.Count; [4]</font>
          </p>
          <p>
If <font face="Courier New">booChainValid</font> is <font face="Courier New">true</font>,
your signature is <strong>valid</strong>.
</p>
        </blockquote>
        <p dir="ltr">
          <strong>Some Rules and Some Laws</strong>
        </p>
        <p dir="ltr" style="MARGIN-RIGHT: 0px">
We have three booleans:
</p>
        <p dir="ltr" style="MARGIN-RIGHT: 0px">
        </p>
        <ul>
          <li>
            <font face="Courier New">booSigValid</font> - signature validity 
</li>
          <li>
            <font face="Courier New">booCertValid</font> - certificate validity 
</li>
          <li>
            <font face="Courier New">booChainValid</font> - certificate's chain validity</li>
        </ul>
        <p>
        </p>
        <p>
If <font face="Courier New">booSigValid</font> evaluates to <font face="Courier New">false</font>,
there is no discussion. Someone <strong>changed the document</strong>.
</p>
        <p>
What happens if one of the following two expressions evaluates to <font face="Courier New">true</font>:
</p>
        <p>
1. <font face="Courier New">((booSigValid) &amp;&amp; (!booCertValid) &amp;&amp; (!booChainValid))<br /></font>2. <font face="Courier New">((booSigValid) &amp;&amp; (booCertValid) &amp;&amp;
(!booChainValid))</font></p>
        <p>
This normally means that either the certificate is not valid (CRLed or expired) [4],
or one of the chain's certificate is not valid/expired.
</p>
        <p>
          <font size="1">[4] The premise is that one checked the signature according to 1, 2,
3 schema described above.</font>
        </p>
        <p>
          <strong>The Question</strong>
        </p>
        <p>
Is digital signature valid even if CA revoked the certificate after the
signature has already been done? Is it valid even after the certificate expires? If
signature is valid and certificate has been revoked, what is the legal validity of
the signature?
</p>
        <p>
In legal terms, the signature would be <strong>invalid</strong> on both upper assertions,
1 and 2. 
</p>
        <p>
This means, that once the generator of the signature is dead, or one of his predecessors
is dead, all his children die too.
</p>
        <p>
          <strong>Timestamps to the Rescue</strong>
        </p>
        <p>
According to most country's digital signature laws the signature is valid only during
the validity of the signing certificate and validity of the signing certificate's
chain, both being checked for revocation and expiry date ... if you don't timestamp
it.
</p>
        <p>
If the source document has <em>another signature</em> from a trusted authority, and
that authority is a timestamp authority, it would look like this:
</p>
        <p>
          <font face="Courier New">&lt;?xml version="1.0"?&gt;<br />
&lt;root xmlns="urn-foo-bar"&gt;<br />
  &lt;subroot&gt;<br />
    &lt;value1&gt;value1&lt;/value1&gt;<br />
    &lt;value2&gt;value2&lt;/value2&gt;<br />
  &lt;/subroot&gt;<br />
  &lt;Signature xmlns="</font>
          <font face="Courier New">http://www.w3.org/2000/09/xmldsig</font>
          <font face="Courier New">#"&gt;<br />
    ...<br />
  &lt;/Signature&gt;<br />
  &lt;dsig:Signature Id="TimeStampToken"<br />
    </font>
          <font face="Courier New">xmlns:dsig="</font>
          <font face="Courier New">http://www.w3.org/2000/09/xmldsig</font>
          <font face="Courier New">#"&gt;<br />
    &lt;dsig:SignedInfo&gt;<br />
      &lt;dsig:CanonicalizationMethod<br />
        Algorithm="</font>
          <font face="Courier New">http://www.w3.org/TR/2001/REC-xml-c14n-20010315</font>
          <font face="Courier New">"
/&gt;<br />
      &lt;dsig:SignatureMethod<br />
        Algorithm="</font>
          <font face="Courier New">http://www.w3.org/2000/09/xmldsig#rsa-sha1"</font>
          <font face="Courier New"> /&gt;<br />
      &lt;dsig:Reference<br />
        URI="#TimeStampInfo-113D2EEB158BBB2D7CC000000000004DF65"&gt;<br />
        &lt;dsig:DigestMethod<br />
          Algorithm="</font>
          <font face="Courier New">http://www.w3.org/2000/09/xmldsig#sha1"</font>
          <font face="Courier New"> /&gt;<br />
          &lt;dsig:DigestValue&gt;y+xw...scKg=&lt;/dsig:DigestValue&gt;<br />
      &lt;/dsig:Reference&gt;<br />
      &lt;dsig:Reference URI="#TimeStampAuthority"&gt;<br />
        &lt;dsig:DigestMethod<br />
          Algorithm="</font>
          <font face="Courier New">http://www.w3.org/2000/09/xmldsig#sha1"</font>
          <font face="Courier New"> /&gt;<br />
        &lt;dsig:DigestValue&gt;KhFIr...Sv4=&lt;/dsig:DigestValue&gt;<br />
      &lt;dsig:/Reference&gt;<br />
    &lt;/dsig:SignedInfo&gt;<br />
    &lt;dsig:SignatureValue&gt;R4m...k3aQ==&lt;/dsig:SignatureValue&gt;<br />
    &lt;dsig:KeyInfo Id="TimeStampAuthority"&gt;<br />
      &lt;dsig:X509Data&gt;<br />
        &lt;dsig:X509Certificate&gt;MII...Osmg==&lt;/dsig:X509Certificate&gt;<br />
      &lt;/dsig:X509Data&gt;<br />
    &lt;/dsig:KeyInfo&gt;<br />
    &lt;dsig:Object<br />
      Id="TimeStampInfo-113D2EEB158BBB2D7CC000000000004DF65"&gt;<br />
      &lt;ts:TimeStampInfo<br />
         xmlns:ts="</font>
          <font face="Courier New">http://www.provider.com/schemas<font color="#003300"><br />
           </font>/timestamp-protocol-20020207</font>
          <font face="Courier New">"<br />
         xmlns:ds="</font>
          <font face="Courier New">http://www.w3.org/2000/09/xmldsig</font>
          <font face="Courier New">#"&gt;<br />
        &lt;ts:Policy id="</font>
          <font face="Courier New">http://provider.tsa.com/documents"</font>
          <font face="Courier New"> /&gt;<br />
          &lt;ts:Digest&gt;<br />
            &lt;ds:DigestMethod
Algorithm="</font>
          <font face="Courier New">http://www.w3.org/2000/<br />
              09/xmldsig#sha1"</font>
          <font face="Courier New"> /&gt;<br />
            &lt;ds:DigestValue&gt;V7+bH...Kmsec=&lt;/ds:DigestValue&gt;<br />
          &lt;/ts:Digest&gt;<br />
          &lt;ts:SerialNumber&gt;938...045&lt;/ts:SerialNumber&gt;<br />
          &lt;ts:CreationTime&gt;2008-04-13T11:31:42.004Z&lt;/ts:CreationTime&gt;<br />
          &lt;ts:Nonce&gt;121...780&lt;/ts:Nonce&gt;<br />
      &lt;/ts:TimeStampInfo&gt;<br />
    &lt;/dsig:Object&gt;<br />
  &lt;/dsig:Signature&gt;<br />
&lt;/root&gt;</font>
        </p>
        <p>
The second signature would be performed by an out-of-band authority, normally a <strong>TSA
authority</strong>. It would only sign a <em>hash value</em> (in this case SHA1 hash)
which was constructed by hashing the original document and the included digital signature.
</p>
        <p>
This (second) signature should be checked using the same 1, 2, 3 steps. For the purpose
of this mind experiment, let's say it would generate a <font face="Courier New">booTimestampValid</font> boolean.
</p>
        <p>
Now, let's reexamine the booleans:
</p>
        <ol>
          <li>
            <font face="Courier New">((booSigValid) &amp;&amp; (!booCertValid) &amp;&amp; (!booChainValid)
&amp;&amp; (booTimestampValid))</font>
          </li>
          <li>
            <font face="Courier New">((booSigValid) &amp;&amp; (booCertValid) &amp;&amp; (!booChainValid)
&amp;&amp; (booTimestampValid))</font>
          </li>
        </ol>
        <p>
In this case, <em>even though the signature's certificate (or its chain) is invalid,
the signature would pass legal validity</em> if the timesamp's signature is valid,
together with its certificate and certificate chain. Note that the TSA signature is
generated with a different set of keys than the original digital signature.
</p>
        <p>
Actually <font face="Courier New">booTimestampValid</font> is defined as <font face="Courier New">((booSigValid)
&amp;&amp; (booCertValid) &amp;&amp; (booChainValid))</font> for the timestamp signature/certificate/certificate
chain [5].
</p>
        <p>
          <font size="1">[5] Legal validity is guaranteed only in cases where 1 or 2 are true.</font>
        </p>
        <img width="0" height="0" src="https://www.request-response.com/blog/aggbug.ashx?id=f37eda08-845c-4b0a-a66c-ea9cec03c06b" />
      </body>
      <title>Laws and Digital Signatures</title>
      <guid isPermaLink="false">https://www.request-response.com/blog/PermaLink,guid,f37eda08-845c-4b0a-a66c-ea9cec03c06b.aspx</guid>
      <link>https://www.request-response.com/blog/PermaLink,guid,f37eda08-845c-4b0a-a66c-ea9cec03c06b.aspx</link>
      <pubDate>Wed, 16 Apr 2008 17:32:29 GMT</pubDate>
      <description>&lt;p&gt;
Suppose we have a document like this:
&lt;/p&gt;
&lt;p&gt;
&lt;font face="Courier New"&gt;&amp;lt;?xml version="1.0"?&amp;gt;&lt;br&gt;
&amp;lt;root xmlns="urn-foo-bar"&amp;gt;&lt;br&gt;
&amp;nbsp; &amp;lt;subroot&amp;gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;value1&amp;gt;value1&amp;lt;/value1&amp;gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;value2&amp;gt;value2&amp;lt;/value2&amp;gt;&lt;br&gt;
&amp;nbsp; &amp;lt;/subroot&amp;gt;&lt;br&gt;
&amp;nbsp; &amp;lt;Signature xmlns="h&lt;/font&gt;&lt;font face="Courier New"&gt;ttp://www.w3.org/2000/09/xmldsig&lt;/font&gt;&lt;font face="Courier New"&gt;#"&amp;gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;SignedInfo&amp;gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;CanonicalizationMethod 
&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Algorithm="&lt;/font&gt;&lt;font face="Courier New"&gt;http://www.w3.org/TR/2001/REC-xml-c14n-20010315&lt;/font&gt;&lt;font face="Courier New"&gt;"
/&amp;gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;SignatureMethod&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Algorithm="&lt;/font&gt;&lt;font face="Courier New"&gt;http://www.w3.org/2000/09/xmldsig#rsa-sha1&lt;/font&gt;&lt;font face="Courier New"&gt;"
/&amp;gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;Reference URI=""&amp;gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;Transforms&amp;gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;Transform&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; Algorithm="&lt;/font&gt;&lt;font face="Courier New"&gt;http://www.w3.org/2000/09/&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;xmldsig#enveloped-signature&lt;/font&gt;&lt;font face="Courier New"&gt;"/&amp;gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/Transforms&amp;gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;DigestMethod&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Algorithm="&lt;/font&gt;&lt;font face="Courier New"&gt;http://www.w3.org/2000/09/xmldsig#sha1&lt;/font&gt;&lt;font face="Courier New"&gt;"
/&amp;gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;DigestValue&amp;gt;1Xp...EOko=&amp;lt;/DigestValue&amp;gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/Reference&amp;gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/SignedInfo&amp;gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;SignatureValue&amp;gt;nls...cH0k=&amp;lt;/SignatureValue&amp;gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;KeyInfo&amp;gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;KeyValue&amp;gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;RSAKeyValue&amp;gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;Modulus&amp;gt;9f3W...fxG0E=&amp;lt;/Modulus&amp;gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;Exponent&amp;gt;AQAB&amp;lt;/Exponent&amp;gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/RSAKeyValue&amp;gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/KeyValue&amp;gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;X509Data&amp;gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;X509Certificate&amp;gt;MIIEi...ktYgN&amp;lt;/X509Certificate&amp;gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/X509Data&amp;gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/KeyInfo&amp;gt;&lt;br&gt;
&amp;nbsp; &amp;lt;/Signature&amp;gt;&lt;br&gt;
&amp;lt;/root&amp;gt;&lt;/font&gt;
&lt;/p&gt;
&lt;p&gt;
This document represents data and an &lt;em&gt;enveloped digital signature&lt;/em&gt; over the
complete XML document. The &lt;em&gt;digital signature completeness&lt;/em&gt; is defined in the &lt;font face="Courier New"&gt;Reference&lt;/font&gt; element,
which has &lt;font face="Courier New"&gt;URI&lt;/font&gt; attribute set to empty string (&lt;font face="Courier New"&gt;Reference
Uri=""&lt;/font&gt;).
&lt;/p&gt;
&lt;p&gt;
&lt;strong&gt;Checking the Signature&lt;/strong&gt;
&lt;/p&gt;
&lt;p&gt;
The following should always be applied during signature validation:
&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
Validating the digital signature 
&lt;li&gt;
Validating the certificate(s) used to create the signature 
&lt;li&gt;
Validating the certificate(s) chain(s)&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;
&lt;strong&gt;&lt;em&gt;Note:&lt;/em&gt;&lt;/strong&gt; In most situations this is the optimal validation
sequence. Why? Signatures are broken far more frequently then certificates are revoked/expired.
And certificates are revoked/expired far more frequently then their chains.
&lt;/p&gt;
&lt;p&gt;
&lt;em&gt;1. Validating the digital signature&lt;/em&gt;
&lt;/p&gt;
&lt;blockquote dir=ltr style="MARGIN-RIGHT: 0px"&gt; 
&lt;p&gt;
First, get it out of there:
&lt;/p&gt;
&lt;p&gt;
&lt;font face="Courier New"&gt;XmlNamespaceManager xmlns = new XmlNamespaceManager(xdkDocument.NameTable);
[1]&lt;br&gt;
xmlns.AddNamespace("ds", "&lt;/font&gt;&lt;font face="Courier New"&gt;http://www.w3.org/2000/09/xmldsig&lt;/font&gt;&lt;font face="Courier New"&gt;#");&lt;br&gt;
XmlNodeList nodeList = xdkDocument.SelectNodes("//ds:Signature", xmlns);&lt;br&gt;
&lt;/font&gt;&amp;nbsp;&lt;br&gt;
&lt;font size=1&gt;[1] &lt;font face="Courier New"&gt;xdkDocument &lt;/font&gt;should be an &lt;font face="Courier New"&gt;XmlDocument&lt;/font&gt; instance
representing your document.&lt;/font&gt;
&lt;/p&gt;
&lt;p&gt;
Second, construct a &lt;font face="Courier New"&gt;SignedXml&lt;/font&gt; instance:
&lt;/p&gt;
&lt;p&gt;
&lt;font face="Courier New"&gt;foreach (XmlNode xmlNode in nodeList)&lt;br&gt;
{&lt;br&gt;
&amp;nbsp; // create signed xml object&lt;br&gt;
&amp;nbsp; SignedXml signedXml = new SignedXml(xdkDocument); [2]&lt;/font&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;font face="Courier New"&gt;&amp;nbsp; // verify signature&lt;br&gt;
&amp;nbsp; signedXml.LoadXml((XmlElement)xmlNode);&lt;br&gt;
}&lt;/font&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;font size=1&gt;[2] Note that we are constructing the &lt;font face="Courier New"&gt;SignedXml&lt;/font&gt; instance
from a complete document, not only the signature. Read this.&lt;/font&gt;
&lt;/p&gt;
&lt;p&gt;
Third, validate:
&lt;/p&gt;
&lt;p&gt;
&lt;font face="Courier New"&gt;bool booSigValid = signedXml.CheckSignature();&lt;/font&gt;
&lt;/p&gt;
&lt;p&gt;
If &lt;font face="Courier New"&gt;booSigValid&lt;/font&gt; is &lt;font face="Courier New"&gt;true&lt;/font&gt;,
proceed.
&lt;/p&gt;
&lt;/blockquote&gt; 
&lt;p&gt;
&lt;em&gt;2. Validating the certificate(s) used to create the signature&lt;/em&gt;
&lt;/p&gt;
&lt;blockquote dir=ltr style="MARGIN-RIGHT: 0px"&gt; 
&lt;p&gt;
First, get it out of there:
&lt;/p&gt;
&lt;p&gt;
&lt;font face="Courier New"&gt;XmlNode xndCert = xmlNode.SelectSingleNode(".//ds:X509Certificate",
xmlns); [3]&lt;/font&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;font size=1&gt;[3] There can be multiple &lt;font face="Courier New"&gt;X509Certificate&lt;/font&gt; elements
qualified with &lt;font face="Courier New"&gt;h&lt;/font&gt;&lt;/font&gt;&lt;font face="Courier New" size=1&gt;ttp://www.w3.org/2000/09/xmldsig&lt;/font&gt;&lt;font size=1&gt;&lt;font face="Courier New"&gt;#&lt;/font&gt; namespace
in there. Xml Digital Signature specification is allowing the serialization of a complete
certificate chain of the certificate used to sign the document. Normally, the signing
certificate should be the first to be serialized.&lt;/font&gt;
&lt;/p&gt;
&lt;p&gt;
Second, get the &lt;font face="Courier New"&gt;X509Certificate2&lt;/font&gt; instance:
&lt;/p&gt;
&lt;p&gt;
&lt;font face="Courier New"&gt;byte[] bytCert = Convert.FromBase64String(xndCert.InnerText);&lt;br&gt;
X509Certificate2 x509cert = new X509Certificate2(bytCert);&lt;/font&gt;
&lt;/p&gt;
&lt;p&gt;
Third, validate:
&lt;/p&gt;
&lt;p&gt;
&lt;font face="Courier New"&gt;bool booCertValid = x509cert.Verify();&lt;/font&gt;
&lt;/p&gt;
&lt;p&gt;
If &lt;font face="Courier New"&gt;booCertValid&lt;/font&gt; is &lt;font face="Courier New"&gt;true&lt;/font&gt;,
proceed.
&lt;/p&gt;
&lt;/blockquote&gt; 
&lt;p&gt;
&lt;em&gt;3. Validating the certificate(s) chain(s)&lt;/em&gt;
&lt;/p&gt;
&lt;blockquote dir=ltr style="MARGIN-RIGHT: 0px"&gt; 
&lt;p&gt;
Building and validating the chain:
&lt;/p&gt;
&lt;p&gt;
&lt;font face="Courier New"&gt;X509Chain certChain = new X509Chain();&lt;br&gt;
bool booChainValid = certChain.Build(x509cert);&lt;br&gt;
int intChainLength = certChain.ChainElements.Count; [4]&lt;/font&gt;
&lt;/p&gt;
&lt;p&gt;
If &lt;font face="Courier New"&gt;booChainValid&lt;/font&gt; is &lt;font face="Courier New"&gt;true&lt;/font&gt;,
your signature is &lt;strong&gt;valid&lt;/strong&gt;.
&lt;/p&gt;
&lt;/blockquote&gt; 
&lt;p dir=ltr&gt;
&lt;strong&gt;Some Rules and Some Laws&lt;/strong&gt;
&lt;/p&gt;
&lt;p dir=ltr style="MARGIN-RIGHT: 0px"&gt;
We have three booleans:
&lt;/p&gt;
&lt;p dir=ltr style="MARGIN-RIGHT: 0px"&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;font face="Courier New"&gt;booSigValid&lt;/font&gt; - signature validity 
&lt;li&gt;
&lt;font face="Courier New"&gt;booCertValid&lt;/font&gt; - certificate validity 
&lt;li&gt;
&lt;font face="Courier New"&gt;booChainValid&lt;/font&gt; - certificate's chain validity&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;
&lt;/p&gt;
&lt;p&gt;
If &lt;font face="Courier New"&gt;booSigValid&lt;/font&gt; evaluates to &lt;font face="Courier New"&gt;false&lt;/font&gt;,
there is no discussion. Someone &lt;strong&gt;changed the document&lt;/strong&gt;.
&lt;/p&gt;
&lt;p&gt;
What happens if one of the following two expressions evaluates to &lt;font face="Courier New"&gt;true&lt;/font&gt;:
&lt;/p&gt;
&lt;p&gt;
1. &lt;font face="Courier New"&gt;((booSigValid) &amp;amp;&amp;amp; (!booCertValid) &amp;amp;&amp;amp; (!booChainValid))&lt;br&gt;
&lt;/font&gt;2. &lt;font face="Courier New"&gt;((booSigValid) &amp;amp;&amp;amp; (booCertValid) &amp;amp;&amp;amp;
(!booChainValid))&lt;/font&gt;
&lt;/p&gt;
&lt;p&gt;
This normally means that either the certificate is not valid (CRLed or expired) [4],
or one of the chain's certificate is not valid/expired.
&lt;/p&gt;
&lt;p&gt;
&lt;font size=1&gt;[4] The premise is that one checked the signature according to 1, 2,
3 schema described above.&lt;/font&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;strong&gt;The Question&lt;/strong&gt;
&lt;/p&gt;
&lt;p&gt;
Is&amp;nbsp;digital signature&amp;nbsp;valid even if CA revoked the certificate after the
signature has already been done? Is it valid even after the certificate expires? If
signature is valid and certificate has been revoked, what is the legal validity of
the signature?
&lt;/p&gt;
&lt;p&gt;
In legal terms, the signature would be &lt;strong&gt;invalid&lt;/strong&gt; on both upper assertions,
1 and 2. 
&lt;/p&gt;
&lt;p&gt;
This means, that once the generator of the signature is dead, or one of his predecessors
is dead, all&amp;nbsp;his children die too.
&lt;/p&gt;
&lt;p&gt;
&lt;strong&gt;Timestamps to the Rescue&lt;/strong&gt;
&lt;/p&gt;
&lt;p&gt;
According to most country's digital signature laws the signature is valid only during
the validity of the signing certificate and validity of the signing certificate's
chain, both being checked for revocation and expiry date ... if you don't timestamp
it.
&lt;/p&gt;
&lt;p&gt;
If the source document has &lt;em&gt;another signature&lt;/em&gt; from a trusted authority, and
that authority is a timestamp authority, it would look like this:
&lt;/p&gt;
&lt;p&gt;
&lt;font face="Courier New"&gt;&amp;lt;?xml version="1.0"?&amp;gt;&lt;br&gt;
&amp;lt;root xmlns="urn-foo-bar"&amp;gt;&lt;br&gt;
&amp;nbsp; &amp;lt;subroot&amp;gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;value1&amp;gt;value1&amp;lt;/value1&amp;gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;value2&amp;gt;value2&amp;lt;/value2&amp;gt;&lt;br&gt;
&amp;nbsp; &amp;lt;/subroot&amp;gt;&lt;br&gt;
&amp;nbsp; &amp;lt;Signature xmlns="&lt;/font&gt;&lt;font face="Courier New"&gt;http://www.w3.org/2000/09/xmldsig&lt;/font&gt;&lt;font face="Courier New"&gt;#"&amp;gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; ...&lt;br&gt;
&amp;nbsp; &amp;lt;/Signature&amp;gt;&lt;br&gt;
&amp;nbsp; &amp;lt;dsig:Signature Id="TimeStampToken"&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/font&gt;&lt;font face="Courier New"&gt;xmlns:dsig="&lt;/font&gt;&lt;font face="Courier New"&gt;http://www.w3.org/2000/09/xmldsig&lt;/font&gt;&lt;font face="Courier New"&gt;#"&amp;gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;dsig:SignedInfo&amp;gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;dsig:CanonicalizationMethod&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Algorithm="&lt;/font&gt;&lt;font face="Courier New"&gt;http://www.w3.org/TR/2001/REC-xml-c14n-20010315&lt;/font&gt;&lt;font face="Courier New"&gt;"
/&amp;gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;dsig:SignatureMethod&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Algorithm="&lt;/font&gt;&lt;font face="Courier New"&gt;http://www.w3.org/2000/09/xmldsig#rsa-sha1"&lt;/font&gt;&lt;font face="Courier New"&gt; /&amp;gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;dsig:Reference&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; URI="#TimeStampInfo-113D2EEB158BBB2D7CC000000000004DF65"&amp;gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;dsig:DigestMethod&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Algorithm="&lt;/font&gt;&lt;font face="Courier New"&gt;http://www.w3.org/2000/09/xmldsig#sha1"&lt;/font&gt;&lt;font face="Courier New"&gt; /&amp;gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;dsig:DigestValue&amp;gt;y+xw...scKg=&amp;lt;/dsig:DigestValue&amp;gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/dsig:Reference&amp;gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;dsig:Reference URI="#TimeStampAuthority"&amp;gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;dsig:DigestMethod&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Algorithm="&lt;/font&gt;&lt;font face="Courier New"&gt;http://www.w3.org/2000/09/xmldsig#sha1"&lt;/font&gt;&lt;font face="Courier New"&gt; /&amp;gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;dsig:DigestValue&amp;gt;KhFIr...Sv4=&amp;lt;/dsig:DigestValue&amp;gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;dsig:/Reference&amp;gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/dsig:SignedInfo&amp;gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;dsig:SignatureValue&amp;gt;R4m...k3aQ==&amp;lt;/dsig:SignatureValue&amp;gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;dsig:KeyInfo Id="TimeStampAuthority"&amp;gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;dsig:X509Data&amp;gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;dsig:X509Certificate&amp;gt;MII...Osmg==&amp;lt;/dsig:X509Certificate&amp;gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/dsig:X509Data&amp;gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/dsig:KeyInfo&amp;gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;dsig:Object&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Id="TimeStampInfo-113D2EEB158BBB2D7CC000000000004DF65"&amp;gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;ts:TimeStampInfo&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; xmlns:ts="&lt;/font&gt;&lt;font face="Courier New"&gt;http://www.provider.com/schemas&lt;font color=#003300&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;/font&gt;/timestamp-protocol-20020207&lt;/font&gt;&lt;font face="Courier New"&gt;"&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; xmlns:ds="&lt;/font&gt;&lt;font face="Courier New"&gt;http://www.w3.org/2000/09/xmldsig&lt;/font&gt;&lt;font face="Courier New"&gt;#"&amp;gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;ts:Policy id="&lt;/font&gt;&lt;font face="Courier New"&gt;http://provider.tsa.com/documents"&lt;/font&gt;&lt;font face="Courier New"&gt; /&amp;gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;ts:Digest&amp;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;lt;ds:DigestMethod
Algorithm="&lt;/font&gt;&lt;font face="Courier New"&gt;http://www.w3.org/2000/&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; 09/xmldsig#sha1"&lt;/font&gt;&lt;font face="Courier New"&gt; /&amp;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;lt;ds:DigestValue&amp;gt;V7+bH...Kmsec=&amp;lt;/ds:DigestValue&amp;gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/ts:Digest&amp;gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;ts:SerialNumber&amp;gt;938...045&amp;lt;/ts:SerialNumber&amp;gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;ts:CreationTime&amp;gt;2008-04-13T11:31:42.004Z&amp;lt;/ts:CreationTime&amp;gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;ts:Nonce&amp;gt;121...780&amp;lt;/ts:Nonce&amp;gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/ts:TimeStampInfo&amp;gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/dsig:Object&amp;gt;&lt;br&gt;
&amp;nbsp; &amp;lt;/dsig:Signature&amp;gt;&lt;br&gt;
&amp;lt;/root&amp;gt;&lt;/font&gt;
&lt;/p&gt;
&lt;p&gt;
The second signature would be performed by an out-of-band authority, normally a &lt;strong&gt;TSA
authority&lt;/strong&gt;. It would only sign a &lt;em&gt;hash value&lt;/em&gt; (in this case SHA1 hash)
which was constructed by hashing the original document and the included digital signature.
&lt;/p&gt;
&lt;p&gt;
This (second) signature should be checked using the same 1, 2, 3 steps. For the purpose
of this mind experiment, let's say it would generate a &lt;font face="Courier New"&gt;booTimestampValid&lt;/font&gt; boolean.
&lt;/p&gt;
&lt;p&gt;
Now, let's reexamine the booleans:
&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;font face="Courier New"&gt;((booSigValid) &amp;amp;&amp;amp; (!booCertValid) &amp;amp;&amp;amp; (!booChainValid)
&amp;amp;&amp;amp; (booTimestampValid))&lt;/font&gt; 
&lt;li&gt;
&lt;font face="Courier New"&gt;((booSigValid) &amp;amp;&amp;amp; (booCertValid) &amp;amp;&amp;amp; (!booChainValid)
&amp;amp;&amp;amp; (booTimestampValid))&lt;/font&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;
In this case, &lt;em&gt;even though the signature's certificate (or its chain) is invalid,
the signature would pass legal validity&lt;/em&gt; if the timesamp's signature is valid,
together with its certificate and certificate chain. Note that the TSA signature is
generated with a different set of&amp;nbsp;keys than the original digital signature.
&lt;/p&gt;
&lt;p&gt;
Actually &lt;font face="Courier New"&gt;booTimestampValid&lt;/font&gt; is defined as &lt;font face="Courier New"&gt;((booSigValid)
&amp;amp;&amp;amp; (booCertValid) &amp;amp;&amp;amp; (booChainValid))&lt;/font&gt; for the timestamp signature/certificate/certificate
chain&amp;nbsp;[5].
&lt;/p&gt;
&lt;p&gt;
&lt;font size=1&gt;[5] Legal validity is guaranteed only in cases where 1 or 2 are true.&lt;/font&gt;
&lt;/p&gt;
&lt;img width="0" height="0" src="https://www.request-response.com/blog/aggbug.ashx?id=f37eda08-845c-4b0a-a66c-ea9cec03c06b" /&gt;</description>
      <comments>https://www.request-response.com/blog/CommentView,guid,f37eda08-845c-4b0a-a66c-ea9cec03c06b.aspx</comments>
      <category>Other</category>
      <category>XML</category>
    </item>
    <item>
      <trackback:ping>https://www.request-response.com/blog/Trackback.aspx?guid=b8fa5b93-1d54-4cdb-a353-5febb4232890</trackback:ping>
      <pingback:server>https://www.request-response.com/blog/pingback.aspx</pingback:server>
      <pingback:target>https://www.request-response.com/blog/PermaLink,guid,b8fa5b93-1d54-4cdb-a353-5febb4232890.aspx</pingback:target>
      <dc:creator>Matevz Gacnik</dc:creator>
      <wfw:comment>https://www.request-response.com/blog/CommentView,guid,b8fa5b93-1d54-4cdb-a353-5febb4232890.aspx</wfw:comment>
      <wfw:commentRss>https://www.request-response.com/blog/SyndicationService.asmx/GetEntryCommentsRss?guid=b8fa5b93-1d54-4cdb-a353-5febb4232890</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
This week XML is <a href="http://www.tbray.org/ongoing/When/200x/2008/02/10/XML-People">ten
years old</a>. The core XML 1.0 specification was released in February 1998. 
</p>
        <p>
It's a nice anniversary to have.
</p>
        <p>
The XML + Namespaces specification has a built in namespace declaration of <font face="Courier New">http://www.w3.org/XML/1998/namespace</font>.
That's an implicit namespace declaration, a special one, governing all other. One
namespace declaration to rule them all. Bound to <font face="Courier New"><a href="http://www.w3.org/XML/1998/namespace">xml:</a></font> prefix.
</p>
        <p>
          <img src="http://www.request-response.com/blog/images/originalxmlnamespace.jpg" />
        </p>
        <p>
XML was born and published as a W3C Recommendation on 10<sup>th</sup> of February
1998.
</p>
        <p>
So, well done XML. You did <strong>a lot</strong> for IT industry in the past decade.
</p>
        <img width="0" height="0" src="https://www.request-response.com/blog/aggbug.ashx?id=b8fa5b93-1d54-4cdb-a353-5febb4232890" />
      </body>
      <title>Happy Birthday XML</title>
      <guid isPermaLink="false">https://www.request-response.com/blog/PermaLink,guid,b8fa5b93-1d54-4cdb-a353-5febb4232890.aspx</guid>
      <link>https://www.request-response.com/blog/PermaLink,guid,b8fa5b93-1d54-4cdb-a353-5febb4232890.aspx</link>
      <pubDate>Wed, 13 Feb 2008 19:36:09 GMT</pubDate>
      <description>&lt;p&gt;
This week XML is &lt;a href="http://www.tbray.org/ongoing/When/200x/2008/02/10/XML-People"&gt;ten
years old&lt;/a&gt;. The core XML 1.0 specification was released in February 1998. 
&lt;/p&gt;
&lt;p&gt;
It's a nice anniversary to have.
&lt;/p&gt;
&lt;p&gt;
The XML + Namespaces specification has a built in namespace declaration of &lt;font face="Courier New"&gt;http://www.w3.org/XML/1998/namespace&lt;/font&gt;.
That's an implicit namespace declaration, a special one, governing all other. One
namespace declaration to rule them all. Bound to &lt;font face="Courier New"&gt;&lt;a href="http://www.w3.org/XML/1998/namespace"&gt;xml:&lt;/a&gt;&lt;/font&gt; prefix.
&lt;/p&gt;
&lt;p&gt;
&lt;img src="http://www.request-response.com/blog/images/originalxmlnamespace.jpg"&gt;
&lt;/p&gt;
&lt;p&gt;
XML was born and published as a W3C Recommendation on 10&lt;sup&gt;th&lt;/sup&gt; of February
1998.
&lt;/p&gt;
&lt;p&gt;
So, well done XML. You did &lt;strong&gt;a lot&lt;/strong&gt; for IT industry in the past decade.
&lt;/p&gt;
&lt;img width="0" height="0" src="https://www.request-response.com/blog/aggbug.ashx?id=b8fa5b93-1d54-4cdb-a353-5febb4232890" /&gt;</description>
      <comments>https://www.request-response.com/blog/CommentView,guid,b8fa5b93-1d54-4cdb-a353-5febb4232890.aspx</comments>
      <category>XML</category>
    </item>
    <item>
      <trackback:ping>https://www.request-response.com/blog/Trackback.aspx?guid=ab874bc2-1546-48d1-a8aa-46f0bf876d93</trackback:ping>
      <pingback:server>https://www.request-response.com/blog/pingback.aspx</pingback:server>
      <pingback:target>https://www.request-response.com/blog/PermaLink,guid,ab874bc2-1546-48d1-a8aa-46f0bf876d93.aspx</pingback:target>
      <dc:creator>Matevz Gacnik</dc:creator>
      <wfw:comment>https://www.request-response.com/blog/CommentView,guid,ab874bc2-1546-48d1-a8aa-46f0bf876d93.aspx</wfw:comment>
      <wfw:commentRss>https://www.request-response.com/blog/SyndicationService.asmx/GetEntryCommentsRss?guid=ab874bc2-1546-48d1-a8aa-46f0bf876d93</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
I'm a huge fan of document style parameter models when implementing a public, programmatic <a href="http://en.wikipedia.org/wiki/Facade_pattern">façade</a> to
a business functionality that often changes.
</p>
        <p>
          <font face="Courier New">public interface IDocumentParameterModel<br />
{<br />
   [OperationContract]<br />
   [FaultContract(typeof(XmlInvalidException))]<br />
   XmlDocument Process(XmlDocument doc);<br />
}</font>
        </p>
        <p>
This contract defines a simple method, called <font face="Courier New">Process</font>,
which processes the input document. The idea is to define the <a href="http://www.w3.org/TR/xmlschema-1/">document
schema</a> and validate inbound XML documents, while throwing exceptions on <em>validation
errors</em>. The processing semantics is arbitrary and can support any kind of action,
depending on the defined <em>invoke document </em>schema.
</p>
        <p>
A simple instance document which validates against a version 1.0 <em>processing schema</em> could
look like this:
</p>
        <p>
          <font face="Courier New">&lt;?xml version="1.0?&gt;<br />
&lt;Process xmlns="http://www.gama-system.com/process10.xsd" version="1.0"&gt;<br />
   &lt;Instruction&gt;Add&lt;/Instruction&gt;<br />
   &lt;Parameter1&gt;10&lt;/Parameter1&gt;<br />
   &lt;Parameter2&gt;21&lt;/Parameter2&gt;<br />
&lt;/Process&gt;</font>
        </p>
        <p>
Another processing instruction, supported in version 1.1 of the <em>processing schema</em>,
with different semantics could be:
</p>
        <p>
          <font face="Courier New">&lt;?xml version="1.0?&gt;<br />
&lt;Process xmlns="http://www.gama-system.com/process11.xsd" version="1.1"&gt;<br />
   &lt;Instruction&gt;Store&lt;/Instruction&gt;<br />
   &lt;Content&gt;77u/PEFwcGxpY2F0aW9uIHhtbG5zPSJod...mdVcCI&lt;/Content&gt;<br />
&lt;/Process&gt;</font>
        </p>
        <p>
Note that the default XML namespace changed, but that is <strong>not a norm</strong>.
It only allows you to automate schema retrieval using the schema repository (think <font face="Courier New">System.Xml.Schema.XmlSchemaSet</font>),
load all supported schemas and validate automatically.
</p>
        <p>
          <font face="Courier New">public class ProcessService : IDocumentParameterModel<br />
{<br />
   public XmlDocument Process(XmlDocument doc)<br />
   {<br />
      XmlReaderSettings sett = new XmlReaderSettings();</font>
        </p>
        <p>
          <font face="Courier New">
            <strong>      sett.Schemas.Add(&lt;document
namespace 1&gt;, &lt;schema uri 1&gt;);<br />
      ...<br />
      sett.Schemas.Add(&lt;document namespace n&gt;, &lt;schema
uri n&gt;);</strong>
          </font>
        </p>
        <p>
          <font face="Courier New">      sett.ValidationType = ValidationType.Schema;<br />
      sett.ValidationEventHandler += new 
<br />
         ValidationEventHandler(XmlInvalidHandler);<br /></font>
          <font face="Courier New">      XmlReader books = XmlReader.Create(doc.OuterXml,
sett);<br /></font>
          <font face="Courier New">      while (books.Read())
{ }</font>
        </p>
        <p>
          <font face="Courier New">      // processing goes here<br />
      ...<br />
   }</font>
        </p>
        <p>
          <font face="Courier New">   static void XmlInvalidHandler(object sender,
ValidationEventArgs e)<br />
   {<br />
      if (e.Severity == XmlSeverityType.Error)<br />
         throw new XmlInvalidException(e.Message);<br />
   }<br />
}</font>
        </p>
        <p>
The main benefit of this approach is <em>decoupling</em> the parameter model and method
processing version from the <em>communication contract</em>. A service maintainer
has an option to change the terms of processing over time, while supporting older
version-aware document instances.
</p>
        <p>
This notion is of course most beneficial in situations where your processing syntax <strong>changes
frequently</strong> and has complex validation schemas. A simple case presented here
is informational only.
</p>
        <p>
So, how do we validate?
</p>
        <ul>
          <li>
We need to check the instance document version first. This is especially true in cases
where the document is <em>not qualified with a different namespace</em> when the version
changes.</li>
          <li>
We grab the appropriate schema or schema set</li>
          <li>
We validate the inbound XML document, throw a typed <font face="Courier New">XmlInvalidException</font> if
invalid</li>
          <li>
We process the call</li>
        </ul>
        <p>
The service side is quite straightforward.
</p>
        <p>
Let's look at the <strong>client</strong> and what are the options for painless generation
of service calls using this mechanism.
</p>
        <p>
Generally, one can always produce an instance <em>invoke document</em> by hand on
the client. <em>By hand</em> meaning using <font face="Courier New">System.Xml</font> classes
and DOM concepts. Since this is higly error prone and gets tedious with increasing
complexity, there is a notion of a schema compiler, which automatically translates
your XML Schema into the CLR type system. <font face="Courier New">Xsd.exe</font> and <font face="Courier New">XmlSerializer</font> are
your friends. 
</p>
        <p>
If your schema requires parts of the instance document to be digitally signed or encrypted,
you will need to adorn the serializer output with some manual DOM work. This might
also be a reason to use the third option.
</p>
        <p>
The third, and easiest option for the general developer, is to provide a <strong>local
object model</strong>, which serializes the requests on the client. This is an example:
</p>
        <p>
          <font face="Courier New">ProcessInstruction pi = new ProcessInstruction();<br />
pi.Instruction = "Add";<br />
pi.Parameter1 = 10;<br />
pi.Parameter2 = 21;<br />
pi.Sign(cert); // pi.Encrypt(cert);<br />
pi.Serialize();<br />
proxy.Process(pi.SerializedForm);</font>
        </p>
        <p>
The main benefit of this approach comes down to having an option on the server and
the client. Client developers have three different levels of complexity for generating
service calls. The model allows them to be as close to the wire as they see fit. Or
they can be abstracted completely from the wire representation if you provide a local
object model to access your services.
</p>
        <img width="0" height="0" src="https://www.request-response.com/blog/aggbug.ashx?id=ab874bc2-1546-48d1-a8aa-46f0bf876d93" />
      </body>
      <title>Approaches to Document Style Parameter Models</title>
      <guid isPermaLink="false">https://www.request-response.com/blog/PermaLink,guid,ab874bc2-1546-48d1-a8aa-46f0bf876d93.aspx</guid>
      <link>https://www.request-response.com/blog/PermaLink,guid,ab874bc2-1546-48d1-a8aa-46f0bf876d93.aspx</link>
      <pubDate>Mon, 24 Sep 2007 10:19:10 GMT</pubDate>
      <description>&lt;p&gt;
I'm a huge fan of document style parameter models when implementing a public, programmatic &lt;a href="http://en.wikipedia.org/wiki/Facade_pattern"&gt;façade&lt;/a&gt; to
a business functionality that often changes.
&lt;/p&gt;
&lt;p&gt;
&lt;font face="Courier New"&gt;public interface IDocumentParameterModel&lt;br&gt;
{&lt;br&gt;
&amp;nbsp;&amp;nbsp; [OperationContract]&lt;br&gt;
&amp;nbsp;&amp;nbsp; [FaultContract(typeof(XmlInvalidException))]&lt;br&gt;
&amp;nbsp;&amp;nbsp; XmlDocument Process(XmlDocument doc);&lt;br&gt;
}&lt;/font&gt;
&lt;/p&gt;
&lt;p&gt;
This contract defines a simple method, called &lt;font face="Courier New"&gt;Process&lt;/font&gt;,
which processes the input document. The idea is to define the &lt;a href="http://www.w3.org/TR/xmlschema-1/"&gt;document
schema&lt;/a&gt; and validate inbound XML documents, while throwing exceptions on &lt;em&gt;validation
errors&lt;/em&gt;. The processing semantics is arbitrary and can support any kind of action,
depending on the defined &lt;em&gt;invoke document &lt;/em&gt;schema.
&lt;/p&gt;
&lt;p&gt;
A simple instance document which validates against a version 1.0 &lt;em&gt;processing schema&lt;/em&gt; could
look like this:
&lt;/p&gt;
&lt;p&gt;
&lt;font face="Courier New"&gt;&amp;lt;?xml version="1.0?&amp;gt;&lt;br&gt;
&amp;lt;Process xmlns="http://www.gama-system.com/process10.xsd" version="1.0"&amp;gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp; &amp;lt;Instruction&amp;gt;Add&amp;lt;/Instruction&amp;gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp; &amp;lt;Parameter1&amp;gt;10&amp;lt;/Parameter1&amp;gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp; &amp;lt;Parameter2&amp;gt;21&amp;lt;/Parameter2&amp;gt;&lt;br&gt;
&amp;lt;/Process&amp;gt;&lt;/font&gt;
&lt;/p&gt;
&lt;p&gt;
Another processing instruction, supported in version 1.1 of the &lt;em&gt;processing schema&lt;/em&gt;,
with different semantics could be:
&lt;/p&gt;
&lt;p&gt;
&lt;font face="Courier New"&gt;&amp;lt;?xml version="1.0?&amp;gt;&lt;br&gt;
&amp;lt;Process xmlns="http://www.gama-system.com/process11.xsd" version="1.1"&amp;gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp; &amp;lt;Instruction&amp;gt;Store&amp;lt;/Instruction&amp;gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp; &amp;lt;Content&amp;gt;77u/PEFwcGxpY2F0aW9uIHhtbG5zPSJod...mdVcCI&amp;lt;/Content&amp;gt;&lt;br&gt;
&amp;lt;/Process&amp;gt;&lt;/font&gt;
&lt;/p&gt;
&lt;p&gt;
Note that the default XML namespace changed, but that is &lt;strong&gt;not a norm&lt;/strong&gt;.
It only allows you to automate schema retrieval using the schema repository (think &lt;font face="Courier New"&gt;System.Xml.Schema.XmlSchemaSet&lt;/font&gt;),
load all supported schemas and validate automatically.
&lt;/p&gt;
&lt;p&gt;
&lt;font face="Courier New"&gt;public class ProcessService : IDocumentParameterModel&lt;br&gt;
{&lt;br&gt;
&amp;nbsp;&amp;nbsp; public XmlDocument Process(XmlDocument doc)&lt;br&gt;
&amp;nbsp;&amp;nbsp; {&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; XmlReaderSettings sett = new XmlReaderSettings();&lt;/font&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;font face="Courier New"&gt;&lt;strong&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; sett.Schemas.Add(&amp;lt;document
namespace 1&amp;gt;, &amp;lt;schema uri 1&amp;gt;);&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ...&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; sett.Schemas.Add(&amp;lt;document namespace n&amp;gt;, &amp;lt;schema
uri n&amp;gt;);&lt;/strong&gt;&lt;/font&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;font face="Courier New"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; sett.ValidationType = ValidationType.Schema;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; sett.ValidationEventHandler += new 
&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ValidationEventHandler(XmlInvalidHandler);&lt;br&gt;
&lt;/font&gt;&lt;font face="Courier New"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; XmlReader books = XmlReader.Create(doc.OuterXml,
sett);&lt;br&gt;
&lt;/font&gt;&lt;font face="Courier New"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; while (books.Read())
{ }&lt;/font&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;font face="Courier New"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // processing goes here&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ...&lt;br&gt;
&amp;nbsp;&amp;nbsp; }&lt;/font&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;font face="Courier New"&gt;&amp;nbsp;&amp;nbsp; static void XmlInvalidHandler(object sender,
ValidationEventArgs e)&lt;br&gt;
&amp;nbsp;&amp;nbsp; {&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (e.Severity == XmlSeverityType.Error)&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; throw new XmlInvalidException(e.Message);&lt;br&gt;
&amp;nbsp;&amp;nbsp; }&lt;br&gt;
}&lt;/font&gt;
&lt;/p&gt;
&lt;p&gt;
The main benefit of this approach is &lt;em&gt;decoupling&lt;/em&gt; the parameter model and method
processing version from the &lt;em&gt;communication contract&lt;/em&gt;. A service maintainer
has an option to change the terms of processing over time, while supporting older
version-aware document instances.
&lt;/p&gt;
&lt;p&gt;
This notion is of course most beneficial in situations where your processing syntax &lt;strong&gt;changes
frequently&lt;/strong&gt; and has complex validation schemas. A simple case presented here
is informational only.
&lt;/p&gt;
&lt;p&gt;
So, how do we validate?
&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
We need to check the instance document version first. This is especially true in cases
where the document is &lt;em&gt;not qualified with a different namespace&lt;/em&gt; when the version
changes.&lt;/li&gt;
&lt;li&gt;
We grab the appropriate schema or schema set&lt;/li&gt;
&lt;li&gt;
We validate the inbound XML document, throw a typed &lt;font face="Courier New"&gt;XmlInvalidException&lt;/font&gt; if
invalid&lt;/li&gt;
&lt;li&gt;
We process the call&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;
The service side is quite straightforward.
&lt;/p&gt;
&lt;p&gt;
Let's look at the &lt;strong&gt;client&lt;/strong&gt; and what are the options for painless generation
of service calls using this mechanism.
&lt;/p&gt;
&lt;p&gt;
Generally, one can always produce an instance &lt;em&gt;invoke document&lt;/em&gt; by hand on
the client. &lt;em&gt;By hand&lt;/em&gt; meaning using &lt;font face="Courier New"&gt;System.Xml&lt;/font&gt; classes
and DOM concepts. Since this is higly error prone and gets tedious with increasing
complexity, there is a notion of a schema compiler, which automatically translates
your XML Schema into the CLR type system. &lt;font face="Courier New"&gt;Xsd.exe&lt;/font&gt; and &lt;font face="Courier New"&gt;XmlSerializer&lt;/font&gt; are
your friends. 
&lt;/p&gt;
&lt;p&gt;
If your schema requires parts of the instance document to be digitally signed or encrypted,
you will need to adorn the serializer output with some manual DOM work. This might
also be a reason to use the third option.
&lt;/p&gt;
&lt;p&gt;
The third, and easiest option for the general developer, is to provide a &lt;strong&gt;local
object model&lt;/strong&gt;, which serializes the requests on the client. This is an example:
&lt;/p&gt;
&lt;p&gt;
&lt;font face="Courier New"&gt;ProcessInstruction pi = new ProcessInstruction();&lt;br&gt;
pi.Instruction = "Add";&lt;br&gt;
pi.Parameter1 = 10;&lt;br&gt;
pi.Parameter2 = 21;&lt;br&gt;
pi.Sign(cert); // pi.Encrypt(cert);&lt;br&gt;
pi.Serialize();&lt;br&gt;
proxy.Process(pi.SerializedForm);&lt;/font&gt;
&lt;/p&gt;
&lt;p&gt;
The main benefit of this approach comes down to having an option on the server and
the client. Client developers have three different levels of complexity for generating
service calls. The model allows them to be as close to the wire as they see fit. Or
they can be abstracted completely from the wire representation if you provide a local
object model to access your services.
&lt;/p&gt;
&lt;img width="0" height="0" src="https://www.request-response.com/blog/aggbug.ashx?id=ab874bc2-1546-48d1-a8aa-46f0bf876d93" /&gt;</description>
      <comments>https://www.request-response.com/blog/CommentView,guid,ab874bc2-1546-48d1-a8aa-46f0bf876d93.aspx</comments>
      <category>.NET 3.0 - WCF</category>
      <category>.NET 3.5 - WCF</category>
      <category>Architecture</category>
      <category>Web Services</category>
      <category>XML</category>
    </item>
    <item>
      <trackback:ping>https://www.request-response.com/blog/Trackback.aspx?guid=26149053-63bc-495e-bab0-8d14e7e46190</trackback:ping>
      <pingback:server>https://www.request-response.com/blog/pingback.aspx</pingback:server>
      <pingback:target>https://www.request-response.com/blog/PermaLink,guid,26149053-63bc-495e-bab0-8d14e7e46190.aspx</pingback:target>
      <dc:creator>Matevz Gacnik</dc:creator>
      <wfw:comment>https://www.request-response.com/blog/CommentView,guid,26149053-63bc-495e-bab0-8d14e7e46190.aspx</wfw:comment>
      <wfw:commentRss>https://www.request-response.com/blog/SyndicationService.asmx/GetEntryCommentsRss?guid=26149053-63bc-495e-bab0-8d14e7e46190</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
If you use <font face="Courier New">XmlSerializer</font> type to perform serialization
of documents which are digitally signed later on, you should be <strong>careful</strong>.
</p>
        <p>
XML namespaces which are included in the serialized form could cause trouble for anyone
signing the document after serialization, especially in the case of normalized signature
checks.
</p>
        <p>
Let's go step by step.
</p>
        <p>
Suppose we have this simple schema, let's call it <font face="Courier New">problem.xsd</font>:
</p>
        <p>
          <font face="Courier New">&lt;?xml version="1.0" encoding="utf-8"?&gt;<br />
&lt;xs:schema targetNamespace="</font>
          <font face="Courier New">http://www.gama-system.com/problems.xsd</font>
          <font face="Courier New">" 
<br />
           elementFormDefault="qualified"<br />
           xmlns="</font>
          <font face="Courier New">http://www.gama-system.com/problems.xsd</font>
          <font face="Courier New">"<br />
           xmlns:xs="</font>
          <font face="Courier New">http://www.w3.org/2001/XMLSchema</font>
          <font face="Courier New">"&gt;<br />
  &lt;xs:element name="Problem" type="ProblemType"/&gt;<br />
  &lt;xs:complexType name="<font color="#a52a2a">ProblemType</font>"&gt;<br />
    &lt;xs:sequence&gt;<br />
      &lt;xs:element name="Name" type="xs:string" /&gt;<br />
      &lt;xs:element name="Severity" type="xs:int" /&gt;<br />
      &lt;xs:element name="Definition" type="DefinitionType"/&gt;<br />
      &lt;xs:element name="Description" type="xs:string"
/&gt;<br />
    &lt;/xs:sequence&gt;<br />
  &lt;/xs:complexType&gt;<br />
  &lt;xs:complexType name="<font color="#a52a2a">DefinitionType</font>"&gt;<br />
    &lt;xs:simpleContent&gt;<br />
      &lt;xs:extension base="xs:base64Binary"&gt;<br />
        &lt;xs:attribute name="Id" type="GUIDType"
use="required"/&gt;<br />
      &lt;/xs:extension&gt;<br />
    &lt;/xs:simpleContent&gt;<br />
  &lt;/xs:complexType&gt;<br />
  &lt;xs:simpleType name="<font color="#a52a2a">GUIDType</font>"&gt;<br />
    &lt;xs:restriction base="xs:string"&gt;<br />
      &lt;xs:pattern value="Id-[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-<br />
                        
[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}"/&gt;<br />
    &lt;/xs:restriction&gt;<br />
  &lt;/xs:simpleType&gt;<br />
&lt;/xs:schema&gt;</font>
        </p>
        <p>
This schema describes <em>a problem</em>, which is defined by a <strong>name</strong> (typed
as <font face="Courier New">string</font>), <strong>severity</strong> (typed as <font face="Courier New">integer</font>), <strong>definition</strong> (typed
as <font face="Courier New">byte array</font>) and <strong>description</strong> (typed
as <font face="Courier New">string</font>). The schema also says that the definition
of a problem has an <font face="Courier New">Id</font> attribute, which we will use
when digitally signing a specific problem definition. This <font face="Courier New">Id</font> attribute
is defined as GUID, as the simple type <font face="Courier New">GUIDType</font> defines.
</p>
        <p>
Instance documents validating against this schema would look like this:
</p>
        <p>
          <font face="Courier New">&lt;?xml version="1.0"?&gt;<br />
&lt;Problem xmlns="</font>
          <font face="Courier New">http://www.gama-system.com/problems.xsd</font>
          <font face="Courier New">"&gt;<br />
  &lt;Name&gt;Specific problem&lt;/Name&gt;<br />
  &lt;Severity&gt;4&lt;/Severity&gt;<br />
  &lt;Definition Id="c31dd112-dd42-41da-c11d-33ff7d2112s2"&gt;MD1sDQ8=&lt;/Definition&gt;<br />
  &lt;Description&gt;This is a specific problem.&lt;/Description&gt;<br />
&lt;/Problem&gt;</font>
        </p>
        <p>
Or this:
</p>
        <p>
          <font face="Courier New">&lt;?xml version="1.0"?&gt;<br />
&lt;Problem xmlns="http://www.gama-system.com/problems.xsd"&gt;<br />
  &lt;Name&gt;XML DigSig Problem&lt;/Name&gt;<br />
  &lt;Severity&gt;5&lt;/Severity&gt;<br />
  &lt;Definition Id="b01cb152-cf93-48df-b07e-97ea7f2ec2e9"&gt;CgsMDQ8=&lt;/Definition&gt;<br />
  &lt;Description&gt;Ambient namespaces break digsigs.&lt;/Description&gt;<br />
&lt;/Problem&gt;</font>
        </p>
        <p>
Mark this one as <strong>exhibit A</strong>.
</p>
        <p>
Only a few of you out there are still generating XML documents by hand, since there
exists a notion of schema compilers. In the .NET Framework world, there is <font face="Courier New">xsd.exe</font>,
which bridges the gap between the XML type system and the CLR type system.
</p>
        <p>
          <font face="Courier New">xsd.exe /c problem.xsd</font>
        </p>
        <p>
The tool compiles <font face="Courier New">problem.xsd</font> schema into the CLR
type system. This allows you to use in-schema defined classes and serialize them later
on with the <font face="Courier New">XmlSerializer</font> class. The second instance
document (exhibit A) serialization program would look like this:
</p>
        <p>
          <font face="Courier New">// generate problem<br />
ProblemType problem = new ProblemType();<br />
problem.Name = "XML DigSig Problem";<br />
problem.Severity = 5;<br />
DefinitionType dt = new DefinitionType();<br />
dt.Id = Guid.NewGuid().ToString();<br />
dt.Value = new byte[] { 0xa, 0xb, 0xc, 0xd, 0xf };<br />
problem.Definition = dt;<br />
problem.Description = "Ambient namespaces break digsigs.";</font>
        </p>
        <p>
          <font face="Courier New">// serialize problem<br />
XmlSerializer ser = new XmlSerializer(typeof(ProblemType));<br />
FileStream stream = new FileStream("Problem.xml", FileMode.Create, FileAccess.Write);<br />
ser.Serialize(stream, problem);<br />
stream.Close();<br /></font>            
<br />
Here <strong>lie </strong>the dragons.
</p>
        <p>
          <font face="Courier New">XmlSerializer</font> class default serialization mechanism
would output this:
</p>
        <p>
          <font face="Courier New">&lt;?xml version="1.0"?&gt;<br />
&lt;Problem <font color="#a52a2a">xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"</font><br />
         <font color="#a52a2a">xmlns:xsd="http://www.w3.org/2001/XMLSchema"<br /></font><font color="#000000">         xmlns="http://www.gama-system.com/problems.xsd"&gt;</font><br />
  &lt;Name&gt;XML DigSig Problem&lt;/Name&gt;<br />
  &lt;Severity&gt;5&lt;/Severity&gt;<br />
  &lt;Definition Id="b01cb152-cf93-48df-b07e-97ea7f2ec2e9"&gt;CgsMDQ8=&lt;/Definition&gt;<br />
  &lt;Description&gt;Ambient namespaces break digsigs.&lt;/Description&gt;<br />
&lt;/Problem&gt;</font>
        </p>
        <p>
Mark this one as <strong>exhibit B</strong>.
</p>
        <p>
If you look closely, you will notice two additional prefix namespace declarations
in exhibit B bound to <font face="Courier New">xsi</font> and <font face="Courier New">xsd</font> prefixes,
against exhibit A.
</p>
        <p>
The fact is, that both documents (exhibit B, and exhibit A) are valid against the <font face="Courier New">problem.xsd</font> schema.
</p>
        <p dir="ltr" style="MARGIN-RIGHT: 0px">
          <font face="Courier New">&lt;theory&gt;</font>
        </p>
        <blockquote dir="ltr" style="MARGIN-RIGHT: 0px">
          <p dir="ltr" style="MARGIN-RIGHT: 0px">
Prefixed namespaces are part of the <a href="http://www.w3.org/TR/xml-infoset/">XML
Infoset</a>. All XML processing is done on XML Infoset level. Since only declarations
(look at prefixes <font face="Courier New">xsi</font> and <font face="Courier New">xsd</font>)
are made in exhibit B, the document itself is not semantically different from exhibit
A. That stated, instance documents are equivalent and should validate against the
same schema.
</p>
        </blockquote>
        <p dir="ltr" style="MARGIN-RIGHT: 0px">
          <font face="Courier New">&lt;/theory&gt;</font>
        </p>
        <p>
What happens if we sign the <font face="Courier New">Definition</font> element of
exhibit B (<font face="Courier New">XmlSerializer</font> generated, prefixed namespaces
present)?
</p>
        <p>
We get this:
</p>
        <p>
          <font face="Courier New">&lt;?xml version="1.0"?&gt;<br />
&lt;Problem <font color="#a52a2a">xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"</font><br />
         <font color="#a52a2a">xmlns:xsd="http://www.w3.org/2001/XMLSchema"<br /></font><font color="#000000">         xmlns="http://www.gama-system.com/problems.xsd"&gt;</font><br />
  &lt;Name&gt;XML DigSig Problem&lt;/Name&gt;<br />
  &lt;Severity&gt;5&lt;/Severity&gt;<br />
  &lt;Definition <font color="#a52a2a"><strong>Id="b01cb152-cf93-48df-b07e-97ea7f2ec2e9"</strong></font>&gt;CgsMDQ8=&lt;/Definition&gt;<br />
  &lt;Description&gt;Ambient namespaces break digsigs.&lt;/Description&gt;<br /><font color="#000000"><strong>  &lt;Signature xmlns="http://www.w3.org/2000/09/xmldsig#"&gt;<br />
    &lt;SignedInfo&gt;<br />
      &lt;CanonicalizationMethod Algorithm="http://www.w3.org/TR/...20010315"
/&gt;<br />
      &lt;SignatureMethod Algorithm="http://www.w3.org/...rsa-sha1"
/&gt;<br />
      &lt;Reference <font color="#a52a2a">URI="#Id-b01cb152-cf93-48df-b07e-97ea7f2ec2e9"&gt;</font><br />
        &lt;DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"
/&gt;<br />
        &lt;DigestValue&gt;k3gbdFVJEpv4LWJAvvHUZZo/VUQ=&lt;/DigestValue&gt;<br />
      &lt;/Reference&gt;<br />
    &lt;/SignedInfo&gt;<br />
    &lt;SignatureValue&gt;K8f...p14=&lt;/SignatureValue&gt;<br />
    &lt;KeyInfo&gt;<br />
      &lt;KeyValue&gt;<br />
        &lt;RSAKeyValue&gt;<br />
          &lt;Modulus&gt;eVs...rL4=&lt;/Modulus&gt;<br />
          &lt;Exponent&gt;AQAB&lt;/Exponent&gt;<br />
        &lt;/RSAKeyValue&gt;<br />
      &lt;/KeyValue&gt;<br />
      &lt;X509Data&gt;<br />
        &lt;X509Certificate&gt;MIIF...Bw==&lt;/X509Certificate&gt;<br />
      &lt;/X509Data&gt;<br />
    &lt;/KeyInfo&gt;<br />
  &lt;/Signature&gt;</strong><br /></font>&lt;/Problem&gt;</font>
        </p>
        <p>
Let's call this document <strong>exhibit D</strong>.
</p>
        <p>
This document is the same as exhibit B, but has the <font face="Courier New">Definition</font> element
digitally signed. Note the <font face="Courier New">/Problem/Signature/SingedInfo/Reference[@URI]</font> value.
Digital signature is performed only on the <font face="Courier New">Definition</font> element
and not the complete document.
</p>
        <p>
Now, if one would validate the same document without the prefixed namespace declarations,
as in:
</p>
        <p>
          <font face="Courier New">&lt;?xml version="1.0"?&gt;<br />
&lt;Problem xmlns="http://www.gama-system.com/problems.xsd"&gt;<br />
  &lt;Name&gt;XML DigSig Problem&lt;/Name&gt;<br />
  &lt;Severity&gt;5&lt;/Severity&gt;<br />
  &lt;Definition <strong>Id="b01cb152-cf93-48df-b07e-97ea7f2ec2e9"&gt;</strong>CgsMDQ8=&lt;/Definition&gt;<br />
  &lt;Description&gt;Ambient namespaces break digsigs.&lt;/Description&gt;<br /><strong>  &lt;Signature xmlns="http://www.w3.org/2000/09/xmldsig#"&gt;<br />
    ...<br />
  &lt;/Signature&gt;</strong><br />
&lt;/Problem&gt;</font>
        </p>
        <p>
... the signature verification <strong>would fail</strong>. Let's call this document <strong>exhibit
C</strong>.
</p>
        <p>
          <font face="Courier New">&lt;theory&gt;</font>
        </p>
        <blockquote dir="ltr" style="MARGIN-RIGHT: 0px">
          <p>
As said earlier, all XML processing is done on the XML Infoset level. Since ambient
prefixed namespace declarations are visible in all child elements of the declaring
element, exhibits C and D are different. Explicitly, element contexts are different
for element <font face="Courier New">Definition</font>, since exhibit C does not have
ambient declarations present and exhibit D does. The signature verification <strong>fails</strong>.
</p>
        </blockquote>
        <p>
          <font face="Courier New">&lt;/theory&gt;</font>
        </p>
        <p>
Solution?
</p>
        <p>
Much simpler than what's written above. Force <font face="Courier New">XmlSerializer</font> class
to serialize what should be serialized in the first place. We need to declare the
namespace definition of the serialized document and prevent <font face="Courier New">XmlSerializer</font> to
be too smart. The .NET Framework serialization mechanism contains a <font face="Courier New">XmlSerializerNamespaces</font> class
which can be specified during serialization process.
</p>
        <p>
Since we know the only (and by the way, default) namespace of the serialized document,
this makes things work out OK:
</p>
        <p>
          <font face="Courier New">// generate problem<br />
ProblemType problem = new ProblemType();<br />
problem.Name = "XML DigSig Problem";<br />
problem.Severity = 5;<br />
DefinitionType dt = new DefinitionType();<br />
dt.Id = Guid.NewGuid().ToString();<br />
dt.Value = new byte[] { 0xa, 0xb, 0xc, 0xd, 0xf };<br />
problem.Definition = dt;<br />
problem.Description = "Ambient namespaces break digsigs.";</font>
        </p>
        <p>
          <font face="Courier New">// serialize problem<br /><strong><font color="#a52a2a">XmlSerializerNamespaces xsn = new XmlSerializerNamespaces();<br />
xsn.Add(String.Empty, "http://www.gama-system.com/problem.xsd");</font></strong></font>
        </p>
        <p>
          <font face="Courier New">XmlSerializer ser = new XmlSerializer(typeof(ProblemType));<br />
FileStream stream = new FileStream("Problem.xml", FileMode.Create, FileAccess.Write);<br />
ser.Serialize(stream, problem, <strong><font color="#a52a2a">xsn</font></strong>);<br />
stream.Close();</font>
        </p>
        <p>
This will force <font face="Courier New">XmlSerializer</font> to produce a valid document
- with valid XML element contexts, without any ambient namespaces.
</p>
        <p>
The question is, why does <font face="Courier New">XmlSerialzer</font> produce this
namespaces by default? That should be a topic for another post.
</p>
        <img width="0" height="0" src="https://www.request-response.com/blog/aggbug.ashx?id=26149053-63bc-495e-bab0-8d14e7e46190" />
      </body>
      <title>XmlSerializer, Ambient XML Namespaces and Digital Signatures</title>
      <guid isPermaLink="false">https://www.request-response.com/blog/PermaLink,guid,26149053-63bc-495e-bab0-8d14e7e46190.aspx</guid>
      <link>https://www.request-response.com/blog/PermaLink,guid,26149053-63bc-495e-bab0-8d14e7e46190.aspx</link>
      <pubDate>Wed, 19 Sep 2007 20:57:57 GMT</pubDate>
      <description>&lt;p&gt;
If you use &lt;font face="Courier New"&gt;XmlSerializer&lt;/font&gt; type to perform serialization
of documents which are digitally signed later on, you should be &lt;strong&gt;careful&lt;/strong&gt;.
&lt;/p&gt;
&lt;p&gt;
XML namespaces which are included in the serialized form could cause trouble for anyone
signing the document after serialization, especially in the case of normalized signature
checks.
&lt;/p&gt;
&lt;p&gt;
Let's go step by step.
&lt;/p&gt;
&lt;p&gt;
Suppose we have this simple schema, let's call it &lt;font face="Courier New"&gt;problem.xsd&lt;/font&gt;:
&lt;/p&gt;
&lt;p&gt;
&lt;font face="Courier New"&gt;&amp;lt;?xml version="1.0" encoding="utf-8"?&amp;gt;&lt;br&gt;
&amp;lt;xs:schema targetNamespace="&lt;/font&gt;&lt;font face="Courier New"&gt;http://www.gama-system.com/problems.xsd&lt;/font&gt;&lt;font face="Courier New"&gt;" 
&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; elementFormDefault="qualified"&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; xmlns="&lt;/font&gt;&lt;font face="Courier New"&gt;http://www.gama-system.com/problems.xsd&lt;/font&gt;&lt;font face="Courier New"&gt;"&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; xmlns:xs="&lt;/font&gt;&lt;font face="Courier New"&gt;http://www.w3.org/2001/XMLSchema&lt;/font&gt;&lt;font face="Courier New"&gt;"&amp;gt;&lt;br&gt;
&amp;nbsp; &amp;lt;xs:element name="Problem" type="ProblemType"/&amp;gt;&lt;br&gt;
&amp;nbsp; &amp;lt;xs:complexType name="&lt;font color=#a52a2a&gt;ProblemType&lt;/font&gt;"&amp;gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;xs:sequence&amp;gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;xs:element name="Name" type="xs:string" /&amp;gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;xs:element name="Severity" type="xs:int" /&amp;gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;xs:element name="Definition" type="DefinitionType"/&amp;gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;xs:element name="Description" type="xs:string"
/&amp;gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/xs:sequence&amp;gt;&lt;br&gt;
&amp;nbsp; &amp;lt;/xs:complexType&amp;gt;&lt;br&gt;
&amp;nbsp; &amp;lt;xs:complexType name="&lt;font color=#a52a2a&gt;DefinitionType&lt;/font&gt;"&amp;gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;xs:simpleContent&amp;gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;xs:extension base="xs:base64Binary"&amp;gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;xs:attribute name="Id" type="GUIDType"
use="required"/&amp;gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/xs:extension&amp;gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/xs:simpleContent&amp;gt;&lt;br&gt;
&amp;nbsp; &amp;lt;/xs:complexType&amp;gt;&lt;br&gt;
&amp;nbsp; &amp;lt;xs:simpleType name="&lt;font color=#a52a2a&gt;GUIDType&lt;/font&gt;"&amp;gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;xs:restriction base="xs:string"&amp;gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;xs:pattern value="Id-[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-&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;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}"/&amp;gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/xs:restriction&amp;gt;&lt;br&gt;
&amp;nbsp; &amp;lt;/xs:simpleType&amp;gt;&lt;br&gt;
&amp;lt;/xs:schema&amp;gt;&lt;/font&gt;
&lt;/p&gt;
&lt;p&gt;
This schema describes &lt;em&gt;a problem&lt;/em&gt;, which is defined by a &lt;strong&gt;name&lt;/strong&gt; (typed
as &lt;font face="Courier New"&gt;string&lt;/font&gt;), &lt;strong&gt;severity&lt;/strong&gt; (typed as &lt;font face="Courier New"&gt;integer&lt;/font&gt;), &lt;strong&gt;definition&lt;/strong&gt; (typed
as &lt;font face="Courier New"&gt;byte array&lt;/font&gt;) and &lt;strong&gt;description&lt;/strong&gt; (typed
as &lt;font face="Courier New"&gt;string&lt;/font&gt;). The schema also says that the definition
of a problem has an &lt;font face="Courier New"&gt;Id&lt;/font&gt; attribute, which we will use
when digitally signing a specific problem definition. This &lt;font face="Courier New"&gt;Id&lt;/font&gt; attribute
is defined as GUID, as the simple type &lt;font face="Courier New"&gt;GUIDType&lt;/font&gt; defines.
&lt;/p&gt;
&lt;p&gt;
Instance documents validating against this schema would look like this:
&lt;/p&gt;
&lt;p&gt;
&lt;font face="Courier New"&gt;&amp;lt;?xml version="1.0"?&amp;gt;&lt;br&gt;
&amp;lt;Problem xmlns="&lt;/font&gt;&lt;font face="Courier New"&gt;http://www.gama-system.com/problems.xsd&lt;/font&gt;&lt;font face="Courier New"&gt;"&amp;gt;&lt;br&gt;
&amp;nbsp; &amp;lt;Name&amp;gt;Specific problem&amp;lt;/Name&amp;gt;&lt;br&gt;
&amp;nbsp; &amp;lt;Severity&amp;gt;4&amp;lt;/Severity&amp;gt;&lt;br&gt;
&amp;nbsp; &amp;lt;Definition Id="c31dd112-dd42-41da-c11d-33ff7d2112s2"&amp;gt;MD1sDQ8=&amp;lt;/Definition&amp;gt;&lt;br&gt;
&amp;nbsp; &amp;lt;Description&amp;gt;This is a specific problem.&amp;lt;/Description&amp;gt;&lt;br&gt;
&amp;lt;/Problem&amp;gt;&lt;/font&gt;
&lt;/p&gt;
&lt;p&gt;
Or this:
&lt;/p&gt;
&lt;p&gt;
&lt;font face="Courier New"&gt;&amp;lt;?xml version="1.0"?&amp;gt;&lt;br&gt;
&amp;lt;Problem xmlns="http://www.gama-system.com/problems.xsd"&amp;gt;&lt;br&gt;
&amp;nbsp; &amp;lt;Name&amp;gt;XML DigSig Problem&amp;lt;/Name&amp;gt;&lt;br&gt;
&amp;nbsp; &amp;lt;Severity&amp;gt;5&amp;lt;/Severity&amp;gt;&lt;br&gt;
&amp;nbsp; &amp;lt;Definition Id="b01cb152-cf93-48df-b07e-97ea7f2ec2e9"&amp;gt;CgsMDQ8=&amp;lt;/Definition&amp;gt;&lt;br&gt;
&amp;nbsp; &amp;lt;Description&amp;gt;Ambient namespaces break digsigs.&amp;lt;/Description&amp;gt;&lt;br&gt;
&amp;lt;/Problem&amp;gt;&lt;/font&gt;
&lt;/p&gt;
&lt;p&gt;
Mark this one as &lt;strong&gt;exhibit A&lt;/strong&gt;.
&lt;/p&gt;
&lt;p&gt;
Only a few of you out there are still generating XML documents by hand, since there
exists a notion of schema compilers. In the .NET Framework world, there is &lt;font face="Courier New"&gt;xsd.exe&lt;/font&gt;,
which bridges the gap between the XML type system and the CLR type system.
&lt;/p&gt;
&lt;p&gt;
&lt;font face="Courier New"&gt;xsd.exe /c problem.xsd&lt;/font&gt;
&lt;/p&gt;
&lt;p&gt;
The tool compiles &lt;font face="Courier New"&gt;problem.xsd&lt;/font&gt; schema into the CLR
type system. This allows you to use in-schema defined classes and serialize them later
on with the &lt;font face="Courier New"&gt;XmlSerializer&lt;/font&gt; class. The second instance
document (exhibit A) serialization program would look like this:
&lt;/p&gt;
&lt;p&gt;
&lt;font face="Courier New"&gt;// generate problem&lt;br&gt;
ProblemType problem = new ProblemType();&lt;br&gt;
problem.Name = "XML DigSig Problem";&lt;br&gt;
problem.Severity = 5;&lt;br&gt;
DefinitionType dt = new DefinitionType();&lt;br&gt;
dt.Id = Guid.NewGuid().ToString();&lt;br&gt;
dt.Value = new byte[] { 0xa, 0xb, 0xc, 0xd, 0xf };&lt;br&gt;
problem.Definition = dt;&lt;br&gt;
problem.Description = "Ambient namespaces break digsigs.";&lt;/font&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;font face="Courier New"&gt;// serialize problem&lt;br&gt;
XmlSerializer ser = new XmlSerializer(typeof(ProblemType));&lt;br&gt;
FileStream stream = new FileStream("Problem.xml", FileMode.Create, FileAccess.Write);&lt;br&gt;
ser.Serialize(stream, problem);&lt;br&gt;
stream.Close();&lt;br&gt;
&lt;/font&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&lt;br&gt;
Here &lt;strong&gt;lie &lt;/strong&gt;the dragons.
&lt;/p&gt;
&lt;p&gt;
&lt;font face="Courier New"&gt;XmlSerializer&lt;/font&gt; class default serialization mechanism
would output this:
&lt;/p&gt;
&lt;p&gt;
&lt;font face="Courier New"&gt;&amp;lt;?xml version="1.0"?&amp;gt;&lt;br&gt;
&amp;lt;Problem &lt;font color=#a52a2a&gt;xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"&lt;/font&gt;
&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;font color=#a52a2a&gt;xmlns:xsd="http://www.w3.org/2001/XMLSchema"&lt;br&gt;
&lt;/font&gt;&lt;font color=#000000&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; xmlns="http://www.gama-system.com/problems.xsd"&amp;gt;&lt;/font&gt;
&lt;br&gt;
&amp;nbsp; &amp;lt;Name&amp;gt;XML DigSig Problem&amp;lt;/Name&amp;gt;&lt;br&gt;
&amp;nbsp; &amp;lt;Severity&amp;gt;5&amp;lt;/Severity&amp;gt;&lt;br&gt;
&amp;nbsp; &amp;lt;Definition Id="b01cb152-cf93-48df-b07e-97ea7f2ec2e9"&amp;gt;CgsMDQ8=&amp;lt;/Definition&amp;gt;&lt;br&gt;
&amp;nbsp; &amp;lt;Description&amp;gt;Ambient namespaces break digsigs.&amp;lt;/Description&amp;gt;&lt;br&gt;
&amp;lt;/Problem&amp;gt;&lt;/font&gt;
&lt;/p&gt;
&lt;p&gt;
Mark this one as &lt;strong&gt;exhibit B&lt;/strong&gt;.
&lt;/p&gt;
&lt;p&gt;
If you look closely, you will notice two additional prefix namespace declarations
in exhibit B bound to &lt;font face="Courier New"&gt;xsi&lt;/font&gt; and &lt;font face="Courier New"&gt;xsd&lt;/font&gt; prefixes,
against exhibit A.
&lt;/p&gt;
&lt;p&gt;
The fact is, that both documents (exhibit B, and exhibit A) are valid against the &lt;font face="Courier New"&gt;problem.xsd&lt;/font&gt; schema.
&lt;/p&gt;
&lt;p dir=ltr style="MARGIN-RIGHT: 0px"&gt;
&lt;font face="Courier New"&gt;&amp;lt;theory&amp;gt;&lt;/font&gt;
&lt;/p&gt;
&lt;blockquote dir=ltr style="MARGIN-RIGHT: 0px"&gt; 
&lt;p dir=ltr style="MARGIN-RIGHT: 0px"&gt;
Prefixed namespaces are part of the &lt;a href="http://www.w3.org/TR/xml-infoset/"&gt;XML
Infoset&lt;/a&gt;. All XML processing is done on XML Infoset level. Since only declarations
(look at prefixes &lt;font face="Courier New"&gt;xsi&lt;/font&gt; and &lt;font face="Courier New"&gt;xsd&lt;/font&gt;)
are made in exhibit B, the document itself is not semantically different from exhibit
A. That stated, instance documents are equivalent and should validate against the
same schema.
&lt;/p&gt;
&lt;/blockquote&gt; 
&lt;p dir=ltr style="MARGIN-RIGHT: 0px"&gt;
&lt;font face="Courier New"&gt;&amp;lt;/theory&amp;gt;&lt;/font&gt;
&lt;/p&gt;
&lt;p&gt;
What happens if we sign the &lt;font face="Courier New"&gt;Definition&lt;/font&gt; element of
exhibit B (&lt;font face="Courier New"&gt;XmlSerializer&lt;/font&gt; generated, prefixed namespaces
present)?
&lt;/p&gt;
&lt;p&gt;
We get this:
&lt;/p&gt;
&lt;p&gt;
&lt;font face="Courier New"&gt;&amp;lt;?xml version="1.0"?&amp;gt;&lt;br&gt;
&amp;lt;Problem &lt;font color=#a52a2a&gt;xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"&lt;/font&gt;
&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;font color=#a52a2a&gt;xmlns:xsd="http://www.w3.org/2001/XMLSchema"&lt;br&gt;
&lt;/font&gt;&lt;font color=#000000&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; xmlns="http://www.gama-system.com/problems.xsd"&amp;gt;&lt;/font&gt;
&lt;br&gt;
&amp;nbsp; &amp;lt;Name&amp;gt;XML DigSig Problem&amp;lt;/Name&amp;gt;&lt;br&gt;
&amp;nbsp; &amp;lt;Severity&amp;gt;5&amp;lt;/Severity&amp;gt;&lt;br&gt;
&amp;nbsp; &amp;lt;Definition &lt;font color=#a52a2a&gt;&lt;strong&gt;Id="b01cb152-cf93-48df-b07e-97ea7f2ec2e9"&lt;/strong&gt;&lt;/font&gt;&amp;gt;CgsMDQ8=&amp;lt;/Definition&amp;gt;&lt;br&gt;
&amp;nbsp; &amp;lt;Description&amp;gt;Ambient namespaces break digsigs.&amp;lt;/Description&amp;gt;&lt;br&gt;
&lt;font color=#000000&gt;&lt;strong&gt;&amp;nbsp; &amp;lt;Signature xmlns="http://www.w3.org/2000/09/xmldsig#"&amp;gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;SignedInfo&amp;gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;CanonicalizationMethod Algorithm="http://www.w3.org/TR/...20010315"
/&amp;gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;SignatureMethod Algorithm="http://www.w3.org/...rsa-sha1"
/&amp;gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;Reference &lt;font color=#a52a2a&gt;URI="#Id-b01cb152-cf93-48df-b07e-97ea7f2ec2e9"&amp;gt;&lt;/font&gt;
&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"
/&amp;gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;DigestValue&amp;gt;k3gbdFVJEpv4LWJAvvHUZZo/VUQ=&amp;lt;/DigestValue&amp;gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/Reference&amp;gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/SignedInfo&amp;gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;SignatureValue&amp;gt;K8f...p14=&amp;lt;/SignatureValue&amp;gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;KeyInfo&amp;gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;KeyValue&amp;gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;RSAKeyValue&amp;gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;Modulus&amp;gt;eVs...rL4=&amp;lt;/Modulus&amp;gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;Exponent&amp;gt;AQAB&amp;lt;/Exponent&amp;gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/RSAKeyValue&amp;gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/KeyValue&amp;gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;X509Data&amp;gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;X509Certificate&amp;gt;MIIF...Bw==&amp;lt;/X509Certificate&amp;gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/X509Data&amp;gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/KeyInfo&amp;gt;&lt;br&gt;
&amp;nbsp; &amp;lt;/Signature&amp;gt;&lt;/strong&gt;
&lt;br&gt;
&lt;/font&gt;&amp;lt;/Problem&amp;gt;&lt;/font&gt;
&lt;/p&gt;
&lt;p&gt;
Let's call this document &lt;strong&gt;exhibit D&lt;/strong&gt;.
&lt;/p&gt;
&lt;p&gt;
This document is the same as exhibit B, but has the &lt;font face="Courier New"&gt;Definition&lt;/font&gt; element
digitally signed. Note the &lt;font face="Courier New"&gt;/Problem/Signature/SingedInfo/Reference[@URI]&lt;/font&gt; value.
Digital signature is performed only on the &lt;font face="Courier New"&gt;Definition&lt;/font&gt; element
and not the complete document.
&lt;/p&gt;
&lt;p&gt;
Now, if one would validate the same document without the prefixed namespace declarations,
as in:
&lt;/p&gt;
&lt;p&gt;
&lt;font face="Courier New"&gt;&amp;lt;?xml version="1.0"?&amp;gt;&lt;br&gt;
&amp;lt;Problem xmlns="http://www.gama-system.com/problems.xsd"&amp;gt;&lt;br&gt;
&amp;nbsp; &amp;lt;Name&amp;gt;XML DigSig Problem&amp;lt;/Name&amp;gt;&lt;br&gt;
&amp;nbsp; &amp;lt;Severity&amp;gt;5&amp;lt;/Severity&amp;gt;&lt;br&gt;
&amp;nbsp; &amp;lt;Definition &lt;strong&gt;Id="b01cb152-cf93-48df-b07e-97ea7f2ec2e9"&amp;gt;&lt;/strong&gt;CgsMDQ8=&amp;lt;/Definition&amp;gt;&lt;br&gt;
&amp;nbsp; &amp;lt;Description&amp;gt;Ambient namespaces break digsigs.&amp;lt;/Description&amp;gt;&lt;br&gt;
&lt;strong&gt;&amp;nbsp; &amp;lt;Signature xmlns="http://www.w3.org/2000/09/xmldsig#"&amp;gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; ...&lt;br&gt;
&amp;nbsp; &amp;lt;/Signature&amp;gt;&lt;/strong&gt;
&lt;br&gt;
&amp;lt;/Problem&amp;gt;&lt;/font&gt;
&lt;/p&gt;
&lt;p&gt;
... the signature verification &lt;strong&gt;would fail&lt;/strong&gt;. Let's call this document &lt;strong&gt;exhibit
C&lt;/strong&gt;.
&lt;/p&gt;
&lt;p&gt;
&lt;font face="Courier New"&gt;&amp;lt;theory&amp;gt;&lt;/font&gt;
&lt;/p&gt;
&lt;blockquote dir=ltr style="MARGIN-RIGHT: 0px"&gt; 
&lt;p&gt;
As said earlier, all XML processing is done on the XML Infoset level. Since ambient
prefixed namespace declarations are visible in all child elements of the declaring
element, exhibits C and D are different. Explicitly, element contexts are different
for element &lt;font face="Courier New"&gt;Definition&lt;/font&gt;, since exhibit C does not have
ambient declarations present and exhibit D does. The signature verification &lt;strong&gt;fails&lt;/strong&gt;.
&lt;/p&gt;
&lt;/blockquote&gt; 
&lt;p&gt;
&lt;font face="Courier New"&gt;&amp;lt;/theory&amp;gt;&lt;/font&gt;
&lt;/p&gt;
&lt;p&gt;
Solution?
&lt;/p&gt;
&lt;p&gt;
Much simpler than what's written above. Force &lt;font face="Courier New"&gt;XmlSerializer&lt;/font&gt; class
to serialize what should be serialized in the first place. We need to declare the
namespace definition of the serialized document and prevent &lt;font face="Courier New"&gt;XmlSerializer&lt;/font&gt; to
be too smart. The .NET Framework serialization mechanism contains a &lt;font face="Courier New"&gt;XmlSerializerNamespaces&lt;/font&gt; class
which can be specified during serialization process.
&lt;/p&gt;
&lt;p&gt;
Since we know the only (and by the way, default) namespace of the serialized document,
this makes things work out OK:
&lt;/p&gt;
&lt;p&gt;
&lt;font face="Courier New"&gt;// generate problem&lt;br&gt;
ProblemType problem = new ProblemType();&lt;br&gt;
problem.Name = "XML DigSig Problem";&lt;br&gt;
problem.Severity = 5;&lt;br&gt;
DefinitionType dt = new DefinitionType();&lt;br&gt;
dt.Id = Guid.NewGuid().ToString();&lt;br&gt;
dt.Value = new byte[] { 0xa, 0xb, 0xc, 0xd, 0xf };&lt;br&gt;
problem.Definition = dt;&lt;br&gt;
problem.Description = "Ambient namespaces break digsigs.";&lt;/font&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;font face="Courier New"&gt;// serialize problem&lt;br&gt;
&lt;strong&gt;&lt;font color=#a52a2a&gt;XmlSerializerNamespaces xsn = new XmlSerializerNamespaces();&lt;br&gt;
xsn.Add(String.Empty, "http://www.gama-system.com/problem.xsd");&lt;/font&gt;&lt;/strong&gt;&lt;/font&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;font face="Courier New"&gt;XmlSerializer ser = new XmlSerializer(typeof(ProblemType));&lt;br&gt;
FileStream stream = new FileStream("Problem.xml", FileMode.Create, FileAccess.Write);&lt;br&gt;
ser.Serialize(stream, problem, &lt;strong&gt;&lt;font color=#a52a2a&gt;xsn&lt;/font&gt;&lt;/strong&gt;);&lt;br&gt;
stream.Close();&lt;/font&gt;
&lt;/p&gt;
&lt;p&gt;
This will force &lt;font face="Courier New"&gt;XmlSerializer&lt;/font&gt; to produce a valid document
- with valid XML element contexts, without any ambient namespaces.
&lt;/p&gt;
&lt;p&gt;
The question is, why does &lt;font face="Courier New"&gt;XmlSerialzer&lt;/font&gt; produce this
namespaces by default? That should be a topic for another post.
&lt;/p&gt;
&lt;img width="0" height="0" src="https://www.request-response.com/blog/aggbug.ashx?id=26149053-63bc-495e-bab0-8d14e7e46190" /&gt;</description>
      <comments>https://www.request-response.com/blog/CommentView,guid,26149053-63bc-495e-bab0-8d14e7e46190.aspx</comments>
      <category>CLR</category>
      <category>XML</category>
    </item>
    <item>
      <trackback:ping>https://www.request-response.com/blog/Trackback.aspx?guid=5931743c-c218-42a6-8cf2-468cf77686cb</trackback:ping>
      <pingback:server>https://www.request-response.com/blog/pingback.aspx</pingback:server>
      <pingback:target>https://www.request-response.com/blog/PermaLink,guid,5931743c-c218-42a6-8cf2-468cf77686cb.aspx</pingback:target>
      <dc:creator>Matevz Gacnik</dc:creator>
      <wfw:comment>https://www.request-response.com/blog/CommentView,guid,5931743c-c218-42a6-8cf2-468cf77686cb.aspx</wfw:comment>
      <wfw:commentRss>https://www.request-response.com/blog/SyndicationService.asmx/GetEntryCommentsRss?guid=5931743c-c218-42a6-8cf2-468cf77686cb</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
I just analyzed my design work for the past day.
</p>
        <p>
It turns out that I implemented simple two level hierarchy in <em>strings</em>, rather
than <em>XML</em>, which is <em>strange</em> for my liking.
</p>
        <p>
I had to implement this: <font face="Courier New">A</font>, where <font face="Courier New">A</font> has
children <font face="Courier New">a<sub>1</sub></font>, <font face="Courier New">a<sub>2</sub></font>, <font face="Courier New">...</font>, <font face="Courier New">a<sup><sub>n</sub></sup></font>, <font face="Courier New">B</font>,
where <font face="Courier New">B</font> has children <font face="Courier New">b<sub>1</sub></font>, <font face="Courier New">b<sub>2</sub></font>,
..., <font face="Courier New">b<sub>m</sub></font>, <font face="Courier New">C</font>,
where ... and so on. Had to save the definition somewhere.
</p>
        <p>
What was the first implementation like?
</p>
        <p>
          <font face="Courier New">"A:a1:a2:a3|B:b1:b2:b3:b4:b5|C:c1:c2:c3:c4:c5:c6"</font>
          <font face="Verdana">,
where first-level node was always <font face="Courier New">array[i][0]</font> if I
just parsed the string with is-everywhere <font face="Courier New">split()</font> method,
passing <font face="Courier New">"|"</font> as the second parameter.</font>
        </p>
        <p>
This is how it went:
</p>
        <p>
          <font face="Courier New">var firstLevel = split(array, "|");</font>
          <font face="Courier New">
            <br />
          </font>
          <font face="Courier New">var secondLevel = split(firstLevel[i], ":");<br /></font>
          <font face="Courier New">var item = secondLevel(j);</font>
        </p>
        <p>
Why?
</p>
        <p>
My <em>&lt;insert worship preference&gt;,</em> it is still easier to parse strings
than XML in JavaScript.
</p>
        <img width="0" height="0" src="https://www.request-response.com/blog/aggbug.ashx?id=5931743c-c218-42a6-8cf2-468cf77686cb" />
      </body>
      <title>XML - Are parsing APIs too complex?</title>
      <guid isPermaLink="false">https://www.request-response.com/blog/PermaLink,guid,5931743c-c218-42a6-8cf2-468cf77686cb.aspx</guid>
      <link>https://www.request-response.com/blog/PermaLink,guid,5931743c-c218-42a6-8cf2-468cf77686cb.aspx</link>
      <pubDate>Mon, 11 Dec 2006 16:53:39 GMT</pubDate>
      <description>&lt;p&gt;
I just analyzed my design work for the past day.
&lt;/p&gt;
&lt;p&gt;
It turns out that I implemented simple two level hierarchy in &lt;em&gt;strings&lt;/em&gt;, rather
than &lt;em&gt;XML&lt;/em&gt;, which is &lt;em&gt;strange&lt;/em&gt; for my liking.
&lt;/p&gt;
&lt;p&gt;
I had to implement this: &lt;font face="Courier New"&gt;A&lt;/font&gt;, where &lt;font face="Courier New"&gt;A&lt;/font&gt; has
children &lt;font face="Courier New"&gt;a&lt;sub&gt;1&lt;/sub&gt;&lt;/font&gt;, &lt;font face="Courier New"&gt;a&lt;sub&gt;2&lt;/sub&gt;&lt;/font&gt;, &lt;font face="Courier New"&gt;...&lt;/font&gt;, &lt;font face="Courier New"&gt;a&lt;sup&gt;&lt;sub&gt;n&lt;/sub&gt;&lt;/sup&gt;&lt;/font&gt;, &lt;font face="Courier New"&gt;B&lt;/font&gt;,
where &lt;font face="Courier New"&gt;B&lt;/font&gt; has children &lt;font face="Courier New"&gt;b&lt;sub&gt;1&lt;/sub&gt;&lt;/font&gt;, &lt;font face="Courier New"&gt;b&lt;sub&gt;2&lt;/sub&gt;&lt;/font&gt;,
..., &lt;font face="Courier New"&gt;b&lt;sub&gt;m&lt;/sub&gt;&lt;/font&gt;, &lt;font face="Courier New"&gt;C&lt;/font&gt;,
where ... and so on. Had to save the definition somewhere.
&lt;/p&gt;
&lt;p&gt;
What was the first implementation like?
&lt;/p&gt;
&lt;p&gt;
&lt;font face="Courier New"&gt;"A:a1:a2:a3|B:b1:b2:b3:b4:b5|C:c1:c2:c3:c4:c5:c6"&lt;/font&gt;&lt;font face=Verdana&gt;,
where first-level node was always &lt;font face="Courier New"&gt;array[i][0]&lt;/font&gt;&amp;nbsp;if&amp;nbsp;I
just&amp;nbsp;parsed the string with is-everywhere &lt;font face="Courier New"&gt;split()&lt;/font&gt; method,
passing &lt;font face="Courier New"&gt;"|"&lt;/font&gt; as&amp;nbsp;the second&amp;nbsp;parameter.&lt;/font&gt;
&lt;/p&gt;
&lt;p&gt;
This is how it went:
&lt;/p&gt;
&lt;p&gt;
&lt;font face="Courier New"&gt;var&amp;nbsp;firstLevel = split(array, "|");&lt;/font&gt;&lt;font face="Courier New"&gt;
&lt;br&gt;
&lt;/font&gt;&lt;font face="Courier New"&gt;var secondLevel = split(firstLevel[i], ":");&lt;br&gt;
&lt;/font&gt;&lt;font face="Courier New"&gt;var item = secondLevel(j);&lt;/font&gt;
&lt;/p&gt;
&lt;p&gt;
Why?
&lt;/p&gt;
&lt;p&gt;
My &lt;em&gt;&amp;lt;insert&amp;nbsp;worship preference&amp;gt;,&lt;/em&gt; it is still easier to parse strings
than XML in JavaScript.
&lt;/p&gt;
&lt;img width="0" height="0" src="https://www.request-response.com/blog/aggbug.ashx?id=5931743c-c218-42a6-8cf2-468cf77686cb" /&gt;</description>
      <comments>https://www.request-response.com/blog/CommentView,guid,5931743c-c218-42a6-8cf2-468cf77686cb.aspx</comments>
      <category>XML</category>
    </item>
    <item>
      <trackback:ping>https://www.request-response.com/blog/Trackback.aspx?guid=e4b39cdf-4ff2-49b2-89c8-a0d61889dc61</trackback:ping>
      <pingback:server>https://www.request-response.com/blog/pingback.aspx</pingback:server>
      <pingback:target>https://www.request-response.com/blog/PermaLink,guid,e4b39cdf-4ff2-49b2-89c8-a0d61889dc61.aspx</pingback:target>
      <dc:creator>Matevz Gacnik</dc:creator>
      <wfw:comment>https://www.request-response.com/blog/CommentView,guid,e4b39cdf-4ff2-49b2-89c8-a0d61889dc61.aspx</wfw:comment>
      <wfw:commentRss>https://www.request-response.com/blog/SyndicationService.asmx/GetEntryCommentsRss?guid=e4b39cdf-4ff2-49b2-89c8-a0d61889dc61</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Great tool was released today by the XML Team (Webdata), from Microsoft.
</p>
        <p>
Find it here: <a href="http://www.microsoft.com/downloads/details.aspx?FamilyID=72D6AA49-787D-4118-BA5F-4F30FE913628&amp;displaylang=en">http://www.microsoft.com/downloads/details.aspx?FamilyID=72D6AA49-787D-4118-BA5F-4F30FE913628&amp;displaylang=en</a></p>
        <p>
It's a .NET Framework 2.0 application which can be used as a simple raw XML editor.
It's got XSL support, XML differentiation, XML Schema validation, entity name intellisense,
and, as the name suggests, it's as simple as <font face="Courier New">notepad.exe</font>.
Superb performance on large documents, too.
</p>
        <p>
Great. Tune it up, change the icons and layout then ship it with Vista, I say.
</p>
        <p>
I find it quite attractive, since nowadays I don't spend as much time looking at angle
brackets anymore.
</p>
        <img width="0" height="0" src="https://www.request-response.com/blog/aggbug.ashx?id=e4b39cdf-4ff2-49b2-89c8-a0d61889dc61" />
      </body>
      <title>XML Notepad 2006</title>
      <guid isPermaLink="false">https://www.request-response.com/blog/PermaLink,guid,e4b39cdf-4ff2-49b2-89c8-a0d61889dc61.aspx</guid>
      <link>https://www.request-response.com/blog/PermaLink,guid,e4b39cdf-4ff2-49b2-89c8-a0d61889dc61.aspx</link>
      <pubDate>Tue, 05 Sep 2006 19:25:25 GMT</pubDate>
      <description>&lt;p&gt;
Great tool was released today by the XML Team (Webdata), from Microsoft.
&lt;/p&gt;
&lt;p&gt;
Find it here: &lt;a href="http://www.microsoft.com/downloads/details.aspx?FamilyID=72D6AA49-787D-4118-BA5F-4F30FE913628&amp;amp;displaylang=en"&gt;http://www.microsoft.com/downloads/details.aspx?FamilyID=72D6AA49-787D-4118-BA5F-4F30FE913628&amp;amp;displaylang=en&lt;/a&gt;
&lt;/p&gt;
&lt;p&gt;
It's a .NET Framework 2.0 application which can be used as a simple raw XML editor.
It's got XSL support, XML differentiation, XML Schema validation, entity name intellisense,
and, as the name suggests, it's as simple as &lt;font face="Courier New"&gt;notepad.exe&lt;/font&gt;.
Superb performance on large documents, too.
&lt;/p&gt;
&lt;p&gt;
Great. Tune it up, change the icons and layout&amp;nbsp;then ship it with Vista, I say.
&lt;/p&gt;
&lt;p&gt;
I find it quite attractive, since nowadays I don't spend as much time looking at angle
brackets anymore.
&lt;/p&gt;
&lt;img width="0" height="0" src="https://www.request-response.com/blog/aggbug.ashx?id=e4b39cdf-4ff2-49b2-89c8-a0d61889dc61" /&gt;</description>
      <comments>https://www.request-response.com/blog/CommentView,guid,e4b39cdf-4ff2-49b2-89c8-a0d61889dc61.aspx</comments>
      <category>XML</category>
    </item>
    <item>
      <trackback:ping>https://www.request-response.com/blog/Trackback.aspx?guid=e77d7831-b76f-4750-a650-1503b425467e</trackback:ping>
      <pingback:server>https://www.request-response.com/blog/pingback.aspx</pingback:server>
      <pingback:target>https://www.request-response.com/blog/PermaLink,guid,e77d7831-b76f-4750-a650-1503b425467e.aspx</pingback:target>
      <dc:creator>Matevz Gacnik</dc:creator>
      <wfw:comment>https://www.request-response.com/blog/CommentView,guid,e77d7831-b76f-4750-a650-1503b425467e.aspx</wfw:comment>
      <wfw:commentRss>https://www.request-response.com/blog/SyndicationService.asmx/GetEntryCommentsRss?guid=e77d7831-b76f-4750-a650-1503b425467e</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Next article in XML series is discussing XML Schema. This is a two part article.
</p>
        <p>
Language: <strong><em>Slovenian</em></strong></p>
        <hr />
        <p>
Naslov:
</p>
        <p>
          <a href="http://www.request-response.com/blog/content/binary/MatevzGacnik-XMLSchema1.doc">XML
Schema (1/2)</a>
        </p>
        <p>
          <a href="http://www.request-response.com/blog/content/binary/MatevzGacnik-XMLSchema2.doc">XML
Schema (2/2)</a>
        </p>
        <p>
          <img alt="XML Schema" hspace="0" src="http://www.request-response.com/blog/images/matevzgacnik-xmlschema.jpg" align="baseline" border="1" />
        </p>
        <img width="0" height="0" src="https://www.request-response.com/blog/aggbug.ashx?id=e77d7831-b76f-4750-a650-1503b425467e" />
      </body>
      <title>Article: XML Schema - Specification Primer</title>
      <guid isPermaLink="false">https://www.request-response.com/blog/PermaLink,guid,e77d7831-b76f-4750-a650-1503b425467e.aspx</guid>
      <link>https://www.request-response.com/blog/PermaLink,guid,e77d7831-b76f-4750-a650-1503b425467e.aspx</link>
      <pubDate>Sun, 04 Jun 2006 07:50:18 GMT</pubDate>
      <description>&lt;p&gt;
Next article in XML series is discussing XML Schema. This is a two part article.
&lt;/p&gt;
&lt;p&gt;
Language:&amp;nbsp;&lt;strong&gt;&lt;em&gt;Slovenian&lt;/em&gt;&lt;/strong&gt;
&lt;/p&gt;
&lt;hr&gt;
&lt;p&gt;
Naslov:
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://www.request-response.com/blog/content/binary/MatevzGacnik-XMLSchema1.doc"&gt;XML
Schema (1/2)&lt;/a&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://www.request-response.com/blog/content/binary/MatevzGacnik-XMLSchema2.doc"&gt;XML
Schema (2/2)&lt;/a&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;img alt="XML Schema" hspace=0 src="http://www.request-response.com/blog/images/matevzgacnik-xmlschema.jpg" align=baseline border=1&gt;
&lt;/p&gt;
&lt;img width="0" height="0" src="https://www.request-response.com/blog/aggbug.ashx?id=e77d7831-b76f-4750-a650-1503b425467e" /&gt;</description>
      <comments>https://www.request-response.com/blog/CommentView,guid,e77d7831-b76f-4750-a650-1503b425467e.aspx</comments>
      <category>Articles</category>
      <category>XML</category>
    </item>
    <item>
      <trackback:ping>https://www.request-response.com/blog/Trackback.aspx?guid=ae74f150-da30-4ea0-a944-cd70daef0025</trackback:ping>
      <pingback:server>https://www.request-response.com/blog/pingback.aspx</pingback:server>
      <pingback:target>https://www.request-response.com/blog/PermaLink,guid,ae74f150-da30-4ea0-a944-cd70daef0025.aspx</pingback:target>
      <dc:creator>Matevz Gacnik</dc:creator>
      <wfw:comment>https://www.request-response.com/blog/CommentView,guid,ae74f150-da30-4ea0-a944-cd70daef0025.aspx</wfw:comment>
      <wfw:commentRss>https://www.request-response.com/blog/SyndicationService.asmx/GetEntryCommentsRss?guid=ae74f150-da30-4ea0-a944-cd70daef0025</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Next article in XML series is discussing XML Namespaces and PSVI problems.
</p>
        <p>
Language: <strong><em>Slovenian</em></strong></p>
        <hr />
        <p>
Naslov:
</p>
        <p>
          <a href="http://www.request-response.com/blog/content/binary/MatevzGacnik-XMLNamespacesPSVI.doc">Imenski
prostori XML in problemi v PSVI</a>
        </p>
        <p>
          <em>
            <a href="http://www.request-response.com/blog/content/binary/MatevzGacnik-XMLNamespacesPSVI.doc">
              <img alt="Imenski prostori XML in problemi v PSVI" hspace="0" src="http://www.request-response.com/blog/images/matevzgacnik-xmlnamespacespsvi.jpg" align="baseline" border="1" />
            </a>
          </em>
        </p>
        <img width="0" height="0" src="https://www.request-response.com/blog/aggbug.ashx?id=ae74f150-da30-4ea0-a944-cd70daef0025" />
      </body>
      <title>Article: XML Namespaces and PSVI Problems</title>
      <guid isPermaLink="false">https://www.request-response.com/blog/PermaLink,guid,ae74f150-da30-4ea0-a944-cd70daef0025.aspx</guid>
      <link>https://www.request-response.com/blog/PermaLink,guid,ae74f150-da30-4ea0-a944-cd70daef0025.aspx</link>
      <pubDate>Sat, 03 Jun 2006 10:50:01 GMT</pubDate>
      <description>&lt;p&gt;
Next article in XML series is discussing XML Namespaces and PSVI problems.
&lt;/p&gt;
&lt;p&gt;
Language:&amp;nbsp;&lt;strong&gt;&lt;em&gt;Slovenian&lt;/em&gt;&lt;/strong&gt;
&lt;/p&gt;
&lt;hr&gt;
&lt;p&gt;
Naslov:
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://www.request-response.com/blog/content/binary/MatevzGacnik-XMLNamespacesPSVI.doc"&gt;Imenski
prostori XML in problemi v PSVI&lt;/a&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;em&gt;&lt;a href="http://www.request-response.com/blog/content/binary/MatevzGacnik-XMLNamespacesPSVI.doc"&gt;&lt;img alt="Imenski prostori XML in problemi v PSVI" hspace=0 src="http://www.request-response.com/blog/images/matevzgacnik-xmlnamespacespsvi.jpg" align=baseline border=1&gt;&lt;/a&gt;&lt;/em&gt;
&lt;/p&gt;
&lt;img width="0" height="0" src="https://www.request-response.com/blog/aggbug.ashx?id=ae74f150-da30-4ea0-a944-cd70daef0025" /&gt;</description>
      <comments>https://www.request-response.com/blog/CommentView,guid,ae74f150-da30-4ea0-a944-cd70daef0025.aspx</comments>
      <category>Articles</category>
      <category>XML</category>
    </item>
    <item>
      <trackback:ping>https://www.request-response.com/blog/Trackback.aspx?guid=d6531997-2522-4136-ae25-2c4ec349fa27</trackback:ping>
      <pingback:server>https://www.request-response.com/blog/pingback.aspx</pingback:server>
      <pingback:target>https://www.request-response.com/blog/PermaLink,guid,d6531997-2522-4136-ae25-2c4ec349fa27.aspx</pingback:target>
      <dc:creator>Matevz Gacnik</dc:creator>
      <wfw:comment>https://www.request-response.com/blog/CommentView,guid,d6531997-2522-4136-ae25-2c4ec349fa27.aspx</wfw:comment>
      <wfw:commentRss>https://www.request-response.com/blog/SyndicationService.asmx/GetEntryCommentsRss?guid=d6531997-2522-4136-ae25-2c4ec349fa27</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
This article is starting the XML series. First we dive into XML typization importance
and XML Infoset.
</p>
        <p>
Language: <strong><em>Slovenian</em></strong></p>
        <hr />
        <p>
Naslov:
</p>
        <p>
          <a href="http://www.request-response.com/blog/content/binary/MatevzGacnik-XMLTypization.doc">Pomembnost
tipizacije XML</a>
        </p>
        <p>
          <em>
            <a href="http://www.request-response.com/blog/content/binary/MatevzGacnik-XMLTypization.doc">
              <img alt="Pomembnost tipizacije XML" hspace="0" src="http://www.request-response.com/blog/images/matevzgacnik-xmltypization.jpg" align="baseline" border="1" />
            </a>
          </em>
        </p>
        <img width="0" height="0" src="https://www.request-response.com/blog/aggbug.ashx?id=d6531997-2522-4136-ae25-2c4ec349fa27" />
      </body>
      <title>Article: The Importance of XML Typization</title>
      <guid isPermaLink="false">https://www.request-response.com/blog/PermaLink,guid,d6531997-2522-4136-ae25-2c4ec349fa27.aspx</guid>
      <link>https://www.request-response.com/blog/PermaLink,guid,d6531997-2522-4136-ae25-2c4ec349fa27.aspx</link>
      <pubDate>Sat, 03 Jun 2006 09:29:29 GMT</pubDate>
      <description>&lt;p&gt;
This article is starting the XML series. First we dive into XML typization importance
and XML Infoset.
&lt;/p&gt;
&lt;p&gt;
Language:&amp;nbsp;&lt;strong&gt;&lt;em&gt;Slovenian&lt;/em&gt;&lt;/strong&gt;
&lt;/p&gt;
&lt;hr&gt;
&lt;p&gt;
Naslov:
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://www.request-response.com/blog/content/binary/MatevzGacnik-XMLTypization.doc"&gt;Pomembnost
tipizacije XML&lt;/a&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;em&gt;&lt;a href="http://www.request-response.com/blog/content/binary/MatevzGacnik-XMLTypization.doc"&gt;&lt;img alt="Pomembnost tipizacije XML" hspace=0 src="http://www.request-response.com/blog/images/matevzgacnik-xmltypization.jpg" align=baseline border=1&gt;&lt;/a&gt;&lt;/em&gt;
&lt;/p&gt;
&lt;img width="0" height="0" src="https://www.request-response.com/blog/aggbug.ashx?id=d6531997-2522-4136-ae25-2c4ec349fa27" /&gt;</description>
      <comments>https://www.request-response.com/blog/CommentView,guid,d6531997-2522-4136-ae25-2c4ec349fa27.aspx</comments>
      <category>Articles</category>
      <category>XML</category>
    </item>
    <item>
      <trackback:ping>https://www.request-response.com/blog/Trackback.aspx?guid=baaf6646-162a-4557-9d7e-10e4953ab627</trackback:ping>
      <pingback:server>https://www.request-response.com/blog/pingback.aspx</pingback:server>
      <pingback:target>https://www.request-response.com/blog/PermaLink,guid,baaf6646-162a-4557-9d7e-10e4953ab627.aspx</pingback:target>
      <dc:creator>Matevz Gacnik</dc:creator>
      <wfw:comment>https://www.request-response.com/blog/CommentView,guid,baaf6646-162a-4557-9d7e-10e4953ab627.aspx</wfw:comment>
      <wfw:commentRss>https://www.request-response.com/blog/SyndicationService.asmx/GetEntryCommentsRss?guid=baaf6646-162a-4557-9d7e-10e4953ab627</wfw:commentRss>
      <slash:comments>1</slash:comments>
      <title>Article: Type Systems Compared, XML, CLR</title>
      <guid isPermaLink="false">https://www.request-response.com/blog/PermaLink,guid,baaf6646-162a-4557-9d7e-10e4953ab627.aspx</guid>
      <link>https://www.request-response.com/blog/PermaLink,guid,baaf6646-162a-4557-9d7e-10e4953ab627.aspx</link>
      <pubDate>Thu, 01 Jun 2006 13:38:54 GMT</pubDate>
      <description>&lt;p&gt;
I'm going to publish a series of my articles, which went out the door a couple of
months ago.
&lt;/p&gt;
&lt;p&gt;
All articles are in &lt;strong&gt;&lt;em&gt;Slovene language&lt;/em&gt;&lt;/strong&gt;.
&lt;/p&gt;
&lt;p&gt;
Here goes the first one.
&lt;/p&gt;
&lt;hr&gt;
&lt;p&gt;
Naslov:
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://www.request-response.com/blog/content/binary/MatevzGacnik-XMLCLRTypeSystem.doc"&gt;Tipski
sistem XML &amp;lt;&amp;gt; Tipski sistem CLR&lt;/a&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;em&gt;&lt;a href="http://www.request-response.com/blog/content/binary/MatevzGacnik-XMLCLRTypeSystem.doc"&gt;&lt;img alt="Tipski sistem XML &lt;&gt; Tipski sistem CLR" hspace=0 src="http://www.request-response.com/blog/images/matevzgacnik-xmlclrtypesystem.jpg" align=baseline border=1&gt;&lt;/a&gt;&lt;/em&gt;
&lt;/p&gt;
&lt;img width="0" height="0" src="https://www.request-response.com/blog/aggbug.ashx?id=baaf6646-162a-4557-9d7e-10e4953ab627" /&gt;</description>
      <comments>https://www.request-response.com/blog/CommentView,guid,baaf6646-162a-4557-9d7e-10e4953ab627.aspx</comments>
      <category>Articles</category>
      <category>CLR</category>
      <category>XML</category>
    </item>
    <item>
      <trackback:ping>https://www.request-response.com/blog/Trackback.aspx?guid=4d6fe2c7-6177-4f69-b19e-4d5315e0db21</trackback:ping>
      <pingback:server>https://www.request-response.com/blog/pingback.aspx</pingback:server>
      <pingback:target>https://www.request-response.com/blog/PermaLink,guid,4d6fe2c7-6177-4f69-b19e-4d5315e0db21.aspx</pingback:target>
      <dc:creator>Matevz Gacnik</dc:creator>
      <wfw:comment>https://www.request-response.com/blog/CommentView,guid,4d6fe2c7-6177-4f69-b19e-4d5315e0db21.aspx</wfw:comment>
      <wfw:commentRss>https://www.request-response.com/blog/SyndicationService.asmx/GetEntryCommentsRss?guid=4d6fe2c7-6177-4f69-b19e-4d5315e0db21</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
A fellow MVP, Daniel Cazzulino, has a <a href="http://weblogs.asp.net/cazzu/archive/2006/05/25/AjaxIsDead.aspx">post</a> titled <em>AJAX
may be the biggest waste of time for the web</em>. While I agree with most of the
points there, one should think about what Microsoft is doing to lower the AJAX development
experience boundary.
</p>
        <p>
Having to deal with JavaScript, raw (D)HTML and XML is definitely not going to scale
from the developer penetration perspective. Nobody wants to do this is 2006. Therefore
if Atlas guys make their magic happen, this would actually not be neccessary. It they
achieve what they started, one would be abstracted from client side programming in
most of the situations.
</p>
        <p>
          <font face="Courier New">&lt;atlas:UpdatePanel/&gt;</font> and <font face="Courier New">&lt;atlas:ScriptManager/&gt;</font> are
your friends. And they could go a long way.
</p>
        <p>
If this actually happens then we are actually discussing whether rich web based apps
are more appropriate for the future web. There are scenarios that benefit from all
these technologies, obviously. And if the industry concludes that DHTML with XmlHttpRequests
is not powerful enough, who would stop the same model to produce rich WPF/E code from
being emitted out of an Atlas enabled app.
</p>
        <p>
We have, for the most part, been able to <em>abstract the plumbing </em>that is going
on behind the scenes. If it's server side generated code, that should be running on
a client, and if it is JavaScript, because all browsers run it, so be it.
</p>
        <p>
We have swallowed the pill on the SOAP stacks already. We don't care if the communication
starts with a SCT Request+Response messages, following by the key exchange. We do
not care that a simple request-response model produces 15 messages while starting
up. We do not care that there is raw XML being transfered. After all, it is all a
fog, doing what it is supposed to do best - hiding the abstraction behind our
beautiful SOAP/Services stack API.
</p>
        <img width="0" height="0" src="https://www.request-response.com/blog/aggbug.ashx?id=4d6fe2c7-6177-4f69-b19e-4d5315e0db21" />
      </body>
      <title>On AJAX being dead</title>
      <guid isPermaLink="false">https://www.request-response.com/blog/PermaLink,guid,4d6fe2c7-6177-4f69-b19e-4d5315e0db21.aspx</guid>
      <link>https://www.request-response.com/blog/PermaLink,guid,4d6fe2c7-6177-4f69-b19e-4d5315e0db21.aspx</link>
      <pubDate>Sat, 27 May 2006 10:07:39 GMT</pubDate>
      <description>&lt;p&gt;
A fellow MVP, Daniel Cazzulino, has a &lt;a href="http://weblogs.asp.net/cazzu/archive/2006/05/25/AjaxIsDead.aspx"&gt;post&lt;/a&gt; titled &lt;em&gt;AJAX
may be the biggest waste of time for the web&lt;/em&gt;. While I agree with most of the
points there, one should think about what Microsoft is doing to lower the AJAX development
experience boundary.
&lt;/p&gt;
&lt;p&gt;
Having to deal with JavaScript, raw (D)HTML and XML is definitely not going to scale
from the developer penetration perspective. Nobody wants to do this is 2006. Therefore
if Atlas guys make their magic happen, this would actually not be neccessary. It they
achieve what they started, one would be abstracted from client side programming in
most of the situations.
&lt;/p&gt;
&lt;p&gt;
&lt;font face="Courier New"&gt;&amp;lt;atlas:UpdatePanel/&amp;gt;&lt;/font&gt; and &lt;font face="Courier New"&gt;&amp;lt;atlas:ScriptManager/&amp;gt;&lt;/font&gt; are
your friends. And they could go a long way.
&lt;/p&gt;
&lt;p&gt;
If this actually happens then we are actually discussing whether rich web based apps
are more appropriate for the future web. There are scenarios that benefit from all
these technologies, obviously. And if the industry concludes that DHTML with XmlHttpRequests
is not powerful enough, who would stop the same model to produce rich WPF/E code from
being emitted out of an Atlas enabled app.
&lt;/p&gt;
&lt;p&gt;
We have, for the most part, been able to &lt;em&gt;abstract the plumbing &lt;/em&gt;that is going
on behind the scenes. If it's server side generated code, that should be running on
a client, and if it is JavaScript, because all browsers run it, so be it.
&lt;/p&gt;
&lt;p&gt;
We have swallowed the pill on the SOAP stacks already. We don't care if the communication
starts with a SCT Request+Response messages, following by the key exchange. We do
not care that a simple request-response model produces 15 messages while starting
up. We do not care that there is raw XML being transfered. After all, it is all a
fog, doing what it is supposed to do best - hiding the abstraction behind&amp;nbsp;our
beautiful SOAP/Services stack API.
&lt;/p&gt;
&lt;img width="0" height="0" src="https://www.request-response.com/blog/aggbug.ashx?id=4d6fe2c7-6177-4f69-b19e-4d5315e0db21" /&gt;</description>
      <comments>https://www.request-response.com/blog/CommentView,guid,4d6fe2c7-6177-4f69-b19e-4d5315e0db21.aspx</comments>
      <category>Other</category>
      <category>Web Services</category>
      <category>XML</category>
    </item>
    <item>
      <trackback:ping>https://www.request-response.com/blog/Trackback.aspx?guid=b4659712-ebb2-4a5b-98a4-fd6c47ed42bf</trackback:ping>
      <pingback:server>https://www.request-response.com/blog/pingback.aspx</pingback:server>
      <pingback:target>https://www.request-response.com/blog/PermaLink,guid,b4659712-ebb2-4a5b-98a4-fd6c47ed42bf.aspx</pingback:target>
      <dc:creator>Matevz Gacnik</dc:creator>
      <wfw:comment>https://www.request-response.com/blog/CommentView,guid,b4659712-ebb2-4a5b-98a4-fd6c47ed42bf.aspx</wfw:comment>
      <wfw:commentRss>https://www.request-response.com/blog/SyndicationService.asmx/GetEntryCommentsRss?guid=b4659712-ebb2-4a5b-98a4-fd6c47ed42bf</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Congratulations go to <a href="http://blogs.msdn.com/xmlteam/default.aspx">System.Xml</a> team.
</p>
        <p>
          <a href="http://msdn.microsoft.com/vstudio/java/compare/xmlperf/default.aspx">This</a> is
fabulous! It's kicking buts, that's what it is.
</p>
        <img width="0" height="0" src="https://www.request-response.com/blog/aggbug.ashx?id=b4659712-ebb2-4a5b-98a4-fd6c47ed42bf" />
      </body>
      <title>System.Xml v2 Performance: Blazing</title>
      <guid isPermaLink="false">https://www.request-response.com/blog/PermaLink,guid,b4659712-ebb2-4a5b-98a4-fd6c47ed42bf.aspx</guid>
      <link>https://www.request-response.com/blog/PermaLink,guid,b4659712-ebb2-4a5b-98a4-fd6c47ed42bf.aspx</link>
      <pubDate>Tue, 07 Jun 2005 23:49:47 GMT</pubDate>
      <description>&lt;p&gt;
Congratulations go to &lt;a href="http://blogs.msdn.com/xmlteam/default.aspx"&gt;System.Xml&lt;/a&gt; team.
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://msdn.microsoft.com/vstudio/java/compare/xmlperf/default.aspx"&gt;This&lt;/a&gt; is
fabulous! It's kicking buts, that's what it is.
&lt;/p&gt;
&lt;img width="0" height="0" src="https://www.request-response.com/blog/aggbug.ashx?id=b4659712-ebb2-4a5b-98a4-fd6c47ed42bf" /&gt;</description>
      <comments>https://www.request-response.com/blog/CommentView,guid,b4659712-ebb2-4a5b-98a4-fd6c47ed42bf.aspx</comments>
      <category>XML</category>
    </item>
    <item>
      <trackback:ping>https://www.request-response.com/blog/Trackback.aspx?guid=687ffbb7-b155-4d25-82b1-91cb5e363ca8</trackback:ping>
      <pingback:server>https://www.request-response.com/blog/pingback.aspx</pingback:server>
      <pingback:target>https://www.request-response.com/blog/PermaLink,guid,687ffbb7-b155-4d25-82b1-91cb5e363ca8.aspx</pingback:target>
      <dc:creator>Matevz Gacnik</dc:creator>
      <wfw:comment>https://www.request-response.com/blog/CommentView,guid,687ffbb7-b155-4d25-82b1-91cb5e363ca8.aspx</wfw:comment>
      <wfw:commentRss>https://www.request-response.com/blog/SyndicationService.asmx/GetEntryCommentsRss?guid=687ffbb7-b155-4d25-82b1-91cb5e363ca8</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Based on my <a href="http://www.request-response.com/blog/PermaLink.aspx?guid=3ad72a73-b1d1-4e9f-aad0-e5010984153d">previous
post</a> about <a href="http://www.stylusstudio.com">Stylus Studio</a>'s <a href="http://www.stylusstudio.com/xquery/xquery_for_all.html">XQuery
support petition</a>, <a href="http://blogs.datadirect.com/jonathan_robie/">Jonathan
Robie</a> writes:
</p>
        <blockquote dir="ltr" style="MARGIN-RIGHT: 0px">
          <p>
            <em>Does Matevz really believe that the lack of a Microsoft editor on the XQuery spec
is the reason it's taken so long?</em>
          </p>
        </blockquote>
        <p>
No (that's why there's a 'maybe' and 'helps' in there). But it doesn't help either.
From my point of view there are three real limiting factors for limping with XQuery
for more than 6 years (1998 workshop, 1999 working group gathered):
</p>
        <ol>
          <li>
Competitive corporate agendas</li>
          <li>
Becoming tightly coupled with other XML specs</li>
          <li>
Ambitious spec in the first place</li>
        </ol>
        <p>
In that order. Microsoft's reasons right now are completely transparent. They would
be more than thankful if the spec reached Recommendation status. Including partial
support in SQL Server 2005 is a bit of a gamble with development dollars. But holding
it back, on the contrary, can backfire too.
</p>
        <p>
Going back to my statement:
</p>
        <blockquote dir="ltr" style="MARGIN-RIGHT: 0px">
          <p>
            <em>I'm wondering why the XQuery spec isn't moving anywhere. Maybe the lack of Microsoft
editor in the editor list helps ignoring the importance of this technology in the
soon-to-be-released products. Current editors don't seem to be bothered with the decisions
Microsoft has to take. I'm sure though, that Jonathan Robie (DataDirect Technologies)
is pushing hard on Microsoft's behalf.</em>
          </p>
        </blockquote>
        <p>
From Jonathan's response I believe he doesn't agree with the editor part and not him
pushing on Microsoft's behalf.
</p>
        <p>
From my perception, major mainstream platform support for XQuery would do well both
for the vendors and the XQuery in general. It's been cooking so long that it needs
solid support, before becoming overcooked, like <a href="http://www.w3.org/TR/xmlschema-1/">XML
Schema</a>. And yes, I agree that there are some wonderful implementations out in
the wild already. Developer penetration is what this technology still has to
achieve. 
</p>
        <p>
I'm sure, Jonathan, that <a href="http://www.gotdotnet.com/team/pcotton/">Paul Cotton</a> &amp;
Co, would be more than willing to wrap up, if things aligned. Looking forward to your
viewpoint on why it's taking so long. The <a href="http://lists.xml.org/archives/xml-dev/200410/msg00133.html">last
one</a> found is already a bit stale.
</p>
        <img width="0" height="0" src="https://www.request-response.com/blog/aggbug.ashx?id=687ffbb7-b155-4d25-82b1-91cb5e363ca8" />
      </body>
      <title>XQuery petition feedback</title>
      <guid isPermaLink="false">https://www.request-response.com/blog/PermaLink,guid,687ffbb7-b155-4d25-82b1-91cb5e363ca8.aspx</guid>
      <link>https://www.request-response.com/blog/PermaLink,guid,687ffbb7-b155-4d25-82b1-91cb5e363ca8.aspx</link>
      <pubDate>Wed, 04 May 2005 11:44:01 GMT</pubDate>
      <description>&lt;p&gt;
Based on my &lt;a href="http://www.request-response.com/blog/PermaLink.aspx?guid=3ad72a73-b1d1-4e9f-aad0-e5010984153d"&gt;previous
post&lt;/a&gt; about &lt;a href="http://www.stylusstudio.com"&gt;Stylus Studio&lt;/a&gt;'s &lt;a href="http://www.stylusstudio.com/xquery/xquery_for_all.html"&gt;XQuery
support petition&lt;/a&gt;, &lt;a href="http://blogs.datadirect.com/jonathan_robie/"&gt;Jonathan
Robie&lt;/a&gt; writes:
&lt;/p&gt;
&lt;blockquote dir=ltr style="MARGIN-RIGHT: 0px"&gt; 
&lt;p&gt;
&lt;em&gt;Does Matevz really believe that the lack of a Microsoft editor on the XQuery spec
is the reason it's taken so long?&lt;/em&gt;
&lt;/p&gt;
&lt;/blockquote&gt; 
&lt;p&gt;
No (that's why there's a 'maybe' and 'helps' in there).&amp;nbsp;But it doesn't help either.
From my point of view there are three real limiting factors for limping with XQuery
for more than 6 years (1998 workshop, 1999 working group gathered):
&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
Competitive corporate agendas&lt;/li&gt;
&lt;li&gt;
Becoming tightly coupled with other XML specs&lt;/li&gt;
&lt;li&gt;
Ambitious spec in the first place&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;
In that order. Microsoft's reasons right now are completely transparent. They would
be more than thankful if the spec&amp;nbsp;reached Recommendation status. Including partial
support in SQL Server 2005 is a bit of a gamble with development dollars. But holding
it back, on the contrary, can backfire too.
&lt;/p&gt;
&lt;p&gt;
Going back to my statement:
&lt;/p&gt;
&lt;blockquote dir=ltr style="MARGIN-RIGHT: 0px"&gt; 
&lt;p&gt;
&lt;em&gt;I'm wondering why the XQuery spec isn't moving anywhere. Maybe the lack of Microsoft
editor in the editor list helps ignoring the importance of this technology in the
soon-to-be-released products. Current editors don't seem to be bothered with the decisions
Microsoft has to take. I'm sure though, that Jonathan Robie (DataDirect Technologies)
is pushing hard on Microsoft's behalf.&lt;/em&gt;
&lt;/p&gt;
&lt;/blockquote&gt; 
&lt;p&gt;
From Jonathan's response I believe he doesn't agree with the editor part and not him
pushing on Microsoft's behalf.
&lt;/p&gt;
&lt;p&gt;
From my perception, major mainstream platform support for XQuery would do well both
for the vendors and the XQuery in general. It's been cooking so long that it needs
solid support, before becoming overcooked, like &lt;a href="http://www.w3.org/TR/xmlschema-1/"&gt;XML
Schema&lt;/a&gt;. And yes, I agree that there are some wonderful implementations out in
the wild already. Developer penetration is what&amp;nbsp;this technology still has to
achieve. 
&lt;/p&gt;
&lt;p&gt;
I'm sure, Jonathan, that &lt;a href="http://www.gotdotnet.com/team/pcotton/"&gt;Paul Cotton&lt;/a&gt;&amp;nbsp;&amp;amp;
Co, would be more than willing to wrap up, if things aligned. Looking forward to your
viewpoint on why it's taking so long. The &lt;a href="http://lists.xml.org/archives/xml-dev/200410/msg00133.html"&gt;last
one&lt;/a&gt; found is already a bit stale.
&lt;/p&gt;
&lt;img width="0" height="0" src="https://www.request-response.com/blog/aggbug.ashx?id=687ffbb7-b155-4d25-82b1-91cb5e363ca8" /&gt;</description>
      <comments>https://www.request-response.com/blog/CommentView,guid,687ffbb7-b155-4d25-82b1-91cb5e363ca8.aspx</comments>
      <category>XML</category>
    </item>
    <item>
      <trackback:ping>https://www.request-response.com/blog/Trackback.aspx?guid=3ad72a73-b1d1-4e9f-aad0-e5010984153d</trackback:ping>
      <pingback:server>https://www.request-response.com/blog/pingback.aspx</pingback:server>
      <pingback:target>https://www.request-response.com/blog/PermaLink,guid,3ad72a73-b1d1-4e9f-aad0-e5010984153d.aspx</pingback:target>
      <dc:creator>Matevz Gacnik</dc:creator>
      <wfw:comment>https://www.request-response.com/blog/CommentView,guid,3ad72a73-b1d1-4e9f-aad0-e5010984153d.aspx</wfw:comment>
      <wfw:commentRss>https://www.request-response.com/blog/SyndicationService.asmx/GetEntryCommentsRss?guid=3ad72a73-b1d1-4e9f-aad0-e5010984153d</wfw:commentRss>
      <slash:comments>2</slash:comments>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
I just received an email from <a href="http://www.stylusstudio.com/index.html">Stylus
Studio</a> creators asking me to sign a <a href="http://www.stylusstudio.com/xquery/xquery_for_all.html">petition</a> on
the <a href="http://msdn.microsoft.com/XML/XQueryStatus/default.aspx">lack</a> of
XQuery support in .NET Framework 2.0.
</p>
        <p>
I'm sorry. I cannot do that. <em>It's just the rule I have.</em></p>
        <p>
Implementing a working draft version of an XML-based technology in a wide-spread product,
like .NET Framework 2.0 is just out of the question. It has been done before with
the XSL implementation in IE5, which then split to XSLT and XSL-FO, causing havoc
for Microsoft.
</p>
        <p>
On the other hand, implementing a stable subset of XQuery in SQL Server 2005 is <a href="http://sqljunkies.com/WebLog/mrys/archive/2004/12/20/5654.aspx">another
thing</a>. While I don't necessarily agree with the necessity, I do agree that SQL
2005 and .NET Framework are two completely different beasts having different life
cycle characteristics and flop-survival methods.
</p>
        <p>
I'm wondering why the XQuery spec isn't moving anywhere. Maybe the lack of Microsoft
editor in the <a href="http://www.w3.org/TR/2005/WD-xquery-20050404/">editor
list</a>, helps ignoring the importance of this technology in the soon-to-be-released
products. Current editors don't seem to be bothered with the decisions Microsoft has
to take. I'm sure though, that Jonathan Robie (DataDirect Technologies) is pushing
hard on Microsoft's behalf.
</p>
        <p>
In any case, it's <a href="http://blogs.msdn.com/arpande/archive/2005/04/29/413347.aspx">too
late</a> anyway.
</p>
        <img width="0" height="0" src="https://www.request-response.com/blog/aggbug.ashx?id=3ad72a73-b1d1-4e9f-aad0-e5010984153d" />
      </body>
      <title>XQuery Support Petition</title>
      <guid isPermaLink="false">https://www.request-response.com/blog/PermaLink,guid,3ad72a73-b1d1-4e9f-aad0-e5010984153d.aspx</guid>
      <link>https://www.request-response.com/blog/PermaLink,guid,3ad72a73-b1d1-4e9f-aad0-e5010984153d.aspx</link>
      <pubDate>Fri, 29 Apr 2005 07:01:35 GMT</pubDate>
      <description>&lt;p&gt;
I just received an email from &lt;a href="http://www.stylusstudio.com/index.html"&gt;Stylus
Studio&lt;/a&gt; creators asking me to sign a &lt;a href="http://www.stylusstudio.com/xquery/xquery_for_all.html"&gt;petition&lt;/a&gt; on
the &lt;a href="http://msdn.microsoft.com/XML/XQueryStatus/default.aspx"&gt;lack&lt;/a&gt; of
XQuery support in .NET Framework 2.0.
&lt;/p&gt;
&lt;p&gt;
I'm sorry. I cannot do that. &lt;em&gt;It's just the rule I have.&lt;/em&gt;
&lt;/p&gt;
&lt;p&gt;
Implementing a working draft version of an XML-based technology in a wide-spread product,
like .NET Framework 2.0 is just out of the question. It has been done before with
the XSL implementation in IE5, which then split to XSLT and XSL-FO, causing havoc
for Microsoft.
&lt;/p&gt;
&lt;p&gt;
On the other hand, implementing a stable subset of XQuery in SQL Server 2005 is &lt;a href="http://sqljunkies.com/WebLog/mrys/archive/2004/12/20/5654.aspx"&gt;another
thing&lt;/a&gt;. While I don't necessarily agree with the necessity, I do agree that SQL
2005 and .NET Framework are two completely different beasts having different life
cycle characteristics and flop-survival methods.
&lt;/p&gt;
&lt;p&gt;
I'm wondering why the XQuery spec isn't moving anywhere. Maybe the lack of Microsoft
editor&amp;nbsp;in the &lt;a href="http://www.w3.org/TR/2005/WD-xquery-20050404/"&gt;editor
list&lt;/a&gt;, helps ignoring the importance of this technology in the soon-to-be-released
products. Current editors don't seem to be bothered with the decisions Microsoft has
to take. I'm sure though, that Jonathan Robie (DataDirect Technologies) is pushing
hard on Microsoft's behalf.
&lt;/p&gt;
&lt;p&gt;
In any case, it's &lt;a href="http://blogs.msdn.com/arpande/archive/2005/04/29/413347.aspx"&gt;too
late&lt;/a&gt; anyway.
&lt;/p&gt;
&lt;img width="0" height="0" src="https://www.request-response.com/blog/aggbug.ashx?id=3ad72a73-b1d1-4e9f-aad0-e5010984153d" /&gt;</description>
      <comments>https://www.request-response.com/blog/CommentView,guid,3ad72a73-b1d1-4e9f-aad0-e5010984153d.aspx</comments>
      <category>XML</category>
    </item>
    <item>
      <trackback:ping>https://www.request-response.com/blog/Trackback.aspx?guid=29ce1544-a0b6-423b-bccd-dc810fdcbf4e</trackback:ping>
      <pingback:server>https://www.request-response.com/blog/pingback.aspx</pingback:server>
      <pingback:target>https://www.request-response.com/blog/PermaLink,guid,29ce1544-a0b6-423b-bccd-dc810fdcbf4e.aspx</pingback:target>
      <dc:creator>Matevz Gacnik</dc:creator>
      <wfw:comment>https://www.request-response.com/blog/CommentView,guid,29ce1544-a0b6-423b-bccd-dc810fdcbf4e.aspx</wfw:comment>
      <wfw:commentRss>https://www.request-response.com/blog/SyndicationService.asmx/GetEntryCommentsRss?guid=29ce1544-a0b6-423b-bccd-dc810fdcbf4e</wfw:commentRss>
      <title>XMLisms and binary XML rants</title>
      <guid isPermaLink="false">https://www.request-response.com/blog/PermaLink,guid,29ce1544-a0b6-423b-bccd-dc810fdcbf4e.aspx</guid>
      <link>https://www.request-response.com/blog/PermaLink,guid,29ce1544-a0b6-423b-bccd-dc810fdcbf4e.aspx</link>
      <pubDate>Tue, 12 Apr 2005 14:59:39 GMT</pubDate>
      <description>&lt;p class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;
&lt;span lang=EN-US style="mso-ansi-language: EN-US"&gt;&lt;font color=#000000&gt;There is a furious
discussion going on (again) on the &lt;a href="http://lists.xml.org/archives/xml-dev/"&gt;XML-DEV&lt;/a&gt; mailing
list about the necessity of binary XML representation format. &lt;a href="http://searchwebservices.techtarget.com/qna/0,289202,sid26_gci1027594,00.html"&gt;Tons&lt;/a&gt; &lt;a href="http://news.com.com/Putting+XML+in+the+fast+lane/2100-7345_3-5534249.html"&gt;of&lt;/a&gt; &lt;a href="http://news.com.com/Faster+XML+ahead/2100-1007_3-5630957.html"&gt;press&lt;/a&gt; &lt;a href="http://www.xml.com/pub/a/2003/08/13/deviant.html"&gt;ink&lt;/a&gt;&lt;?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /&gt; has
also been spilled on this issue.&lt;o:p&gt;&lt;/o:p&gt;
&lt;/font&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;
&lt;span lang=EN-US style="mso-ansi-language: EN-US"&gt;
&lt;o:p&gt;
&lt;font color=#000000&gt;&amp;nbsp;&lt;/font&gt;
&lt;/o:p&gt;
&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;
&lt;span lang=EN-US style="mso-ansi-language: EN-US"&gt;&lt;font color=#000000&gt;In essence,
the XML data model consists of three layers:&lt;o:p&gt;&lt;/o:p&gt;
&lt;/font&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;div class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;span lang=EN-US style="mso-ansi-language: EN-US"&gt;&lt;font color=#000000&gt;XML
Serialization Syntax (often called XML 1.0, XML 1.1)&lt;o:p&gt;&lt;/o:p&gt;
&lt;/font&gt;&lt;/span&gt;
&lt;/div&gt;
&lt;li&gt;
&lt;div class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;span lang=EN-US style="mso-ansi-language: EN-US"&gt;&lt;font color=#000000&gt;XML
Infoset (abstract data model)&lt;o:p&gt;&lt;/o:p&gt;
&lt;/font&gt;&lt;/span&gt;
&lt;/div&gt;
&lt;li&gt;
&lt;div class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;&lt;span lang=EN-US style="mso-ansi-language: EN-US"&gt;&lt;font color=#000000&gt;PSVI
(Post Schema Validation Infoset), (typed data model, brought by XML Schema)&lt;o:p&gt;&lt;/o:p&gt;
&lt;/font&gt;&lt;/span&gt;
&lt;/div&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;p class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;
&lt;span lang=EN-US style="mso-ansi-language: EN-US"&gt;
&lt;o:p&gt;
&lt;font color=#000000&gt;&lt;/font&gt;
&lt;/o:p&gt;
&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;
&lt;span lang=EN-US style="mso-ansi-language: EN-US"&gt;&lt;font color=#000000&gt;The problem
lies in &lt;em&gt;number 1&lt;/em&gt;. XML serialization stacks produce nasty angle bracket wire
serialization format which needs to be parsed into the XML Infoset before it can be
exposed by any programmatic XML-exposing technology, like a DOM, SAX or what have
you. In the reverse things get done in the opposite direction.&lt;o:p&gt;&lt;/o:p&gt;
&lt;/font&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;
&lt;span lang=EN-US style="mso-ansi-language: EN-US"&gt;
&lt;o:p&gt;
&lt;font color=#000000&gt;&amp;nbsp;&lt;/font&gt;
&lt;/o:p&gt;
&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;
&lt;span lang=EN-US style="mso-ansi-language: EN-US"&gt;&lt;font color=#000000&gt;If we rule schema
out of the view temporarily, there are currently two ways to encode a single XML document.
One being the ordinary &lt;a href="http://www.w3.org/TR/REC-xml/"&gt;XML 1.0 + Namespaces
1.0&lt;/a&gt; wire syntax, represented in XML Infoset 1.0 form by the parsers/stacks. The
second one is &lt;a href="http://www.w3.org/TR/xml11/"&gt;XML 1.1 + Namespaces 1.1&lt;/a&gt; wire
syntax, represented in &lt;a href="http://www.w3.org/TR/xml-infoset/"&gt;XML Infoset 1.1&lt;/a&gt; form,
which &lt;a href="http://www.xml.com/pub/a/2004/09/29/deviant.html"&gt;didn't gain&amp;nbsp;enough
momentum&lt;/a&gt; and it's a question whether it will in the future.&lt;o:p&gt;&lt;/o:p&gt;
&lt;/font&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;
&lt;span lang=EN-US style="mso-ansi-language: EN-US"&gt;
&lt;o:p&gt;
&lt;font color=#000000&gt;&amp;nbsp;&lt;/font&gt;
&lt;/o:p&gt;
&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;
&lt;span lang=EN-US style="mso-ansi-language: EN-US"&gt;&lt;font color=#000000&gt;Question still
remains about whether the XML industry has reached a sweet spot in the (non)complexity
of the serialization syntax to allow fast processing in the future. It is my belief
that we will not see a great adoption of any binary XML serialization format, like &lt;a href="http://www.w3.org/TR/2005/REC-xop10-20050125/"&gt;XOP&lt;/a&gt; or
BinaryXML outside the &lt;a href="http://www.w3.org/TR/2005/REC-soap12-mtom-20050125/"&gt;MTOM&lt;/a&gt;&lt;?xml:namespace prefix = st1 ns = "urn:schemas-microsoft-com:office:smarttags" /&gt; area,
which pushes XOP into SOAP. That stated, one should recognize the importance of main
vendors not reaching the agreement for quite some time. Even if they do reach it some
time in the future, the processing time gap will long be gone, squashed by the 
&lt;st1:City w:st="on"&gt;
&lt;st1:place w:st="on"&gt;Moore&lt;/st1:place&gt;
&lt;/st1:City&gt;
's law. This will essentially kill the push behind binary serialization advantages
outside the transport mechanisms (read SOAP). Actually, having a 33% penalty on base64
encoded data is not something the industry could really be concerned about.&lt;o:p&gt;&lt;/o:p&gt;
&lt;/font&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;
&lt;span lang=EN-US style="mso-ansi-language: EN-US"&gt;
&lt;o:p&gt;
&lt;font color=#000000&gt;&amp;nbsp;&lt;/font&gt;
&lt;/o:p&gt;
&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;
&lt;span lang=EN-US style="mso-ansi-language: EN-US"&gt;&lt;font color=#000000&gt;There are &lt;em&gt;numerous
limiting factors&lt;/em&gt; in designing an interoperable serialization syntax for binary
XML. It all comes down to optimization space. What do we want to optimize? Parsing
speed? Transfer speed? Wire size? Generation speed? Even if those don't seem connected,
it turns out that they are sometimes orthogonal. You cannot optimize for generation
speed and expect small wire size.&lt;o:p&gt;&lt;/o:p&gt;
&lt;/font&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;
&lt;span lang=EN-US style="mso-ansi-language: EN-US"&gt;
&lt;o:p&gt;
&lt;font color=#000000&gt;&amp;nbsp;&lt;/font&gt;
&lt;/o:p&gt;
&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;
&lt;span lang=EN-US style="mso-ansi-language: EN-US"&gt;&lt;font color=#000000&gt;We will, in
contrary, see a lot more XML Infoset binary representations that are vendor-centric,
being only compatible in &lt;em&gt;intra-vendor-technology scenarios&lt;/em&gt;. &lt;a href="http://msdn.microsoft.com/Longhorn/understanding/pillars/Indigo/default.aspx"&gt;Microsoft's
Indigo&lt;/a&gt; is one such technology, which will allow proprietary binary XML encoding
(see &lt;a href="http://winfx.msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/winfx/ref/ns/system.servicemodel.channels/c/binarymessageencoderfactory/binarymessageencoderfactory.asp"&gt;System.ServiceModel.Channels.BinaryMessageEncoderFactory&lt;/a&gt; class)
for all SOAP envelopes traveling between Indigo endpoints being on the same or different
machines.&lt;o:p&gt;&lt;/o:p&gt;
&lt;/font&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;img width="0" height="0" src="https://www.request-response.com/blog/aggbug.ashx?id=29ce1544-a0b6-423b-bccd-dc810fdcbf4e" /&gt;</description>
      <comments>https://www.request-response.com/blog/CommentView,guid,29ce1544-a0b6-423b-bccd-dc810fdcbf4e.aspx</comments>
      <category>XML</category>
    </item>
    <item>
      <trackback:ping>https://www.request-response.com/blog/Trackback.aspx?guid=4faf505c-9a23-4b5f-afc3-0d495852b272</trackback:ping>
      <pingback:server>https://www.request-response.com/blog/pingback.aspx</pingback:server>
      <pingback:target>https://www.request-response.com/blog/PermaLink,guid,4faf505c-9a23-4b5f-afc3-0d495852b272.aspx</pingback:target>
      <dc:creator />
      <wfw:comment>https://www.request-response.com/blog/CommentView,guid,4faf505c-9a23-4b5f-afc3-0d495852b272.aspx</wfw:comment>
      <wfw:commentRss>https://www.request-response.com/blog/SyndicationService.asmx/GetEntryCommentsRss?guid=4faf505c-9a23-4b5f-afc3-0d495852b272</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Microsoft “Indigo” is now available for general public.
</p>
        <p>
If you are an MSDN Subscriber, you can download the bits from <a href="http://msdn.microsoft.com/subscriptions">here</a>.
</p>
        <img width="0" height="0" src="https://www.request-response.com/blog/aggbug.ashx?id=4faf505c-9a23-4b5f-afc3-0d495852b272" />
      </body>
      <title>Indigo CTP</title>
      <guid isPermaLink="false">https://www.request-response.com/blog/PermaLink,guid,4faf505c-9a23-4b5f-afc3-0d495852b272.aspx</guid>
      <link>https://www.request-response.com/blog/PermaLink,guid,4faf505c-9a23-4b5f-afc3-0d495852b272.aspx</link>
      <pubDate>Sun, 20 Mar 2005 17:34:26 GMT</pubDate>
      <description>&lt;p&gt;
Microsoft &amp;#8220;Indigo&amp;#8221; is now available for general public.
&lt;/p&gt;
&lt;p&gt;
If you are an MSDN Subscriber, you can download the bits from &lt;a href="http://msdn.microsoft.com/subscriptions"&gt;here&lt;/a&gt;.
&lt;/p&gt;
&lt;img width="0" height="0" src="https://www.request-response.com/blog/aggbug.ashx?id=4faf505c-9a23-4b5f-afc3-0d495852b272" /&gt;</description>
      <comments>https://www.request-response.com/blog/CommentView,guid,4faf505c-9a23-4b5f-afc3-0d495852b272.aspx</comments>
      <category>Web Services</category>
      <category>Work</category>
      <category>XML</category>
    </item>
    <item>
      <trackback:ping>https://www.request-response.com/blog/Trackback.aspx?guid=09091321-da76-4511-b842-c686f2d7c6fe</trackback:ping>
      <pingback:server>https://www.request-response.com/blog/pingback.aspx</pingback:server>
      <pingback:target>https://www.request-response.com/blog/PermaLink,guid,09091321-da76-4511-b842-c686f2d7c6fe.aspx</pingback:target>
      <dc:creator />
      <wfw:comment>https://www.request-response.com/blog/CommentView,guid,09091321-da76-4511-b842-c686f2d7c6fe.aspx</wfw:comment>
      <wfw:commentRss>https://www.request-response.com/blog/SyndicationService.asmx/GetEntryCommentsRss?guid=09091321-da76-4511-b842-c686f2d7c6fe</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
XML industry has reached the mountain top: <a href="http://news.com.com/Putting+XML+in+the+fast+lane/2100-7345_3-5534249.html?tag=st.prev">http://news.com.com/Putting+XML+in+the+fast+lane/2100-7345_3-5534249.html?tag=st.prev</a></p>
        <p>
If this thing continues, and adds another <a href="https://fi.dev.java.net/">stupidity</a> on
top of a base stack, we'll be back in the 70s.
</p>
        <p>
Processing power and network throughput will handle the load of cross boundary XML
being serialized as XML 1.0 + Namespaces. We do not need XML 1.1, which is a flop
anyway, and for sure, we don't need another Infoset.
</p>
        <p>
Let the major vendors deliver binary Infoset for intra-firewall scenarios. Every other
form of communication mechanism should use the d*mn angle brackets, if it chooses
the XML dialect for the payload.
</p>
        <p>
        </p>
        <img width="0" height="0" src="https://www.request-response.com/blog/aggbug.ashx?id=09091321-da76-4511-b842-c686f2d7c6fe" />
      </body>
      <title>Binary XML</title>
      <guid isPermaLink="false">https://www.request-response.com/blog/PermaLink,guid,09091321-da76-4511-b842-c686f2d7c6fe.aspx</guid>
      <link>https://www.request-response.com/blog/PermaLink,guid,09091321-da76-4511-b842-c686f2d7c6fe.aspx</link>
      <pubDate>Fri, 14 Jan 2005 13:46:42 GMT</pubDate>
      <description>&lt;p&gt;
XML industry has reached the mountain top: &lt;a href="http://news.com.com/Putting+XML+in+the+fast+lane/2100-7345_3-5534249.html?tag=st.prev"&gt;http://news.com.com/Putting+XML+in+the+fast+lane/2100-7345_3-5534249.html?tag=st.prev&lt;/a&gt;
&lt;/p&gt;
&lt;p&gt;
If this thing continues, and adds another &lt;a href="https://fi.dev.java.net/"&gt;stupidity&lt;/a&gt; on
top of a base stack, we'll be back in the 70s.
&lt;/p&gt;
&lt;p&gt;
Processing power and network throughput will handle the load of cross boundary XML
being serialized as XML 1.0 + Namespaces. We do not need XML 1.1, which is a flop
anyway, and for sure, we don't need another Infoset.
&lt;/p&gt;
&lt;p&gt;
Let the major vendors deliver binary Infoset for intra-firewall scenarios. Every other
form of communication mechanism should use the d*mn angle brackets, if it chooses
the XML dialect for the payload.
&lt;/p&gt;
&lt;p&gt;
&lt;/p&gt;
&lt;img width="0" height="0" src="https://www.request-response.com/blog/aggbug.ashx?id=09091321-da76-4511-b842-c686f2d7c6fe" /&gt;</description>
      <comments>https://www.request-response.com/blog/CommentView,guid,09091321-da76-4511-b842-c686f2d7c6fe.aspx</comments>
      <category>XML</category>
    </item>
    <item>
      <trackback:ping>https://www.request-response.com/blog/Trackback.aspx?guid=3a8ea029-3c12-4f38-b089-44516b8b1376</trackback:ping>
      <pingback:server>https://www.request-response.com/blog/pingback.aspx</pingback:server>
      <pingback:target>https://www.request-response.com/blog/PermaLink,guid,3a8ea029-3c12-4f38-b089-44516b8b1376.aspx</pingback:target>
      <dc:creator />
      <wfw:comment>https://www.request-response.com/blog/CommentView,guid,3a8ea029-3c12-4f38-b089-44516b8b1376.aspx</wfw:comment>
      <wfw:commentRss>https://www.request-response.com/blog/SyndicationService.asmx/GetEntryCommentsRss?guid=3a8ea029-3c12-4f38-b089-44516b8b1376</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
          <strong>
            <em>Update: Memory persistance included</em>
          </strong>
        </p>
        <p>
In my <a href="/blog/PermaLink.aspx?guid=ececbe12-14c8-4b4e-9782-ea5f05512139">previous
posts</a> I said I will write a SQL based persistence provider for <a href="http://www.gotdotnet.com/community/workspaces/workspace.aspx?ID=B700AF79-5B27-4D71-BFBD-8DF74FA68ABE">Plumbwork.Orange</a><a href="http://msdn.microsoft.com/webservices/understanding/specs/default.aspx?pull=/library/en-us/dnglobspec/html/ws-eventing.asp">WS-Eventing</a> implementation
and help <a href="http://www.bristowe.com/blog/PermaLink.aspx?guid=700bf884-dd72-4214-9fb5-e1daf9d6e4b2">John
Bristowe</a> a bit.
</p>
        <p>
It's done now, as is memory based persistance option, but since <a href="http://www.gotdotnet.com">http://www.gotdotnet.com</a> still
has problems with workspaces, I cannot upload it.
</p>
        <p>
Classes can be downloaded here:
</p>
        <ul>
          <li>
            <a href="http://downloads.request-response.com/SqlSubscriptionManager.cs.zip">SqlSubscriptionManager.cs.zip</a>
          </li>
          <li>
            <a href="http://downloads.request-response.com/MemorySubscriptionManager.cs.zip">MemorySubscriptionManager.cs.zip</a>.</li>
        </ul>
        <p>
All you need to do is replace one line in <font face="Courier New">SubscriptionManagerFactory.cs</font>:
</p>
        <blockquote dir="ltr" style="MARGIN-RIGHT: 0px">
          <p>
            <font face="Courier New">return new XmlSubscriptionManager() as ISubscriptionManager;</font>
          </p>
        </blockquote>
        <p>
With:
</p>
        <blockquote dir="ltr" style="MARGIN-RIGHT: 0px">
          <p>
            <font face="Courier New">return new SqlSubscriptionManager() as ISubscriptionManager;</font>
          </p>
          <p>
or
</p>
          <p>
            <font face="Courier New">return new MemorySubscriptionManager() as ISubscriptionManager;</font>
          </p>
        </blockquote>
        <p>
Since some members of the workspace are already working on configuration application
block integration, all config data should go in there someday.
</p>
        <p>
My implementation now uses SQL Server as a subscription storage for durable WS-Eventing
subscriptions. System.Collections.Hashtable is used in memory based persistance model.
Complete support includes:
</p>
        <ul>
          <li>
Creating a subscription 
</li>
          <li>
Removing a subscription 
</li>
          <li>
Renewing a subscription 
</li>
          <li>
Expiring a subscription</li>
        </ul>
        <p>
When GDN Workspaces come back online, I will post this to <a href="http://www.gotdotnet.com/community/workspaces/workspace.aspx?ID=B700AF79-5B27-4D71-BFBD-8DF74FA68ABE">Plumbwork.Orange</a>.
</p>
        <img width="0" height="0" src="https://www.request-response.com/blog/aggbug.ashx?id=3a8ea029-3c12-4f38-b089-44516b8b1376" />
      </body>
      <title>WS-Eventing: SQL Persistance Provider</title>
      <guid isPermaLink="false">https://www.request-response.com/blog/PermaLink,guid,3a8ea029-3c12-4f38-b089-44516b8b1376.aspx</guid>
      <link>https://www.request-response.com/blog/PermaLink,guid,3a8ea029-3c12-4f38-b089-44516b8b1376.aspx</link>
      <pubDate>Fri, 27 Aug 2004 09:48:47 GMT</pubDate>
      <description>&lt;p&gt;
&lt;strong&gt;&lt;em&gt;Update: Memory persistance included&lt;/em&gt;&lt;/strong&gt;
&lt;/p&gt;
&lt;p&gt;
In my&amp;nbsp;&lt;a href="/blog/PermaLink.aspx?guid=ececbe12-14c8-4b4e-9782-ea5f05512139"&gt;previous
posts&lt;/a&gt; I said I will write a SQL based persistence provider for &lt;a href="http://www.gotdotnet.com/community/workspaces/workspace.aspx?ID=B700AF79-5B27-4D71-BFBD-8DF74FA68ABE"&gt;Plumbwork.Orange&lt;/a&gt; &lt;a href="http://msdn.microsoft.com/webservices/understanding/specs/default.aspx?pull=/library/en-us/dnglobspec/html/ws-eventing.asp"&gt;WS-Eventing&lt;/a&gt; implementation
and help &lt;a href="http://www.bristowe.com/blog/PermaLink.aspx?guid=700bf884-dd72-4214-9fb5-e1daf9d6e4b2"&gt;John
Bristowe&lt;/a&gt; a bit.
&lt;/p&gt;
&lt;p&gt;
It's done now, as is memory based persistance option, but since &lt;a href="http://www.gotdotnet.com"&gt;http://www.gotdotnet.com&lt;/a&gt; still
has problems with workspaces, I cannot upload it.
&lt;/p&gt;
&lt;p&gt;
Classes can be downloaded&amp;nbsp;here:
&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;a href="http://downloads.request-response.com/SqlSubscriptionManager.cs.zip"&gt;SqlSubscriptionManager.cs.zip&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;a href="http://downloads.request-response.com/MemorySubscriptionManager.cs.zip"&gt;MemorySubscriptionManager.cs.zip&lt;/a&gt;.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;
All you need to do is replace one line in &lt;font face="Courier New"&gt;SubscriptionManagerFactory.cs&lt;/font&gt;:
&lt;/p&gt;
&lt;blockquote dir=ltr style="MARGIN-RIGHT: 0px"&gt; 
&lt;p&gt;
&lt;font face="Courier New"&gt;return new XmlSubscriptionManager() as ISubscriptionManager;&lt;/font&gt;
&lt;/p&gt;
&lt;/blockquote&gt; 
&lt;p&gt;
With:
&lt;/p&gt;
&lt;blockquote dir=ltr style="MARGIN-RIGHT: 0px"&gt; 
&lt;p&gt;
&lt;font face="Courier New"&gt;return new SqlSubscriptionManager() as ISubscriptionManager;&lt;/font&gt;
&lt;/p&gt;
&lt;p&gt;
or
&lt;/p&gt;
&lt;p&gt;
&lt;font face="Courier New"&gt;return new MemorySubscriptionManager() as ISubscriptionManager;&lt;/font&gt;
&lt;/p&gt;
&lt;/blockquote&gt; 
&lt;p&gt;
Since some members of the workspace are already working on configuration application
block integration, all config data should go in there someday.
&lt;/p&gt;
&lt;p&gt;
My implementation now uses SQL Server as a subscription storage for durable WS-Eventing
subscriptions. System.Collections.Hashtable is used in memory based persistance model.
Complete support includes:
&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
Creating a subscription 
&lt;li&gt;
Removing a subscription 
&lt;li&gt;
Renewing a subscription 
&lt;li&gt;
Expiring a subscription&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;
When GDN Workspaces come back online, I will post this to &lt;a href="http://www.gotdotnet.com/community/workspaces/workspace.aspx?ID=B700AF79-5B27-4D71-BFBD-8DF74FA68ABE"&gt;Plumbwork.Orange&lt;/a&gt;.
&lt;/p&gt;
&lt;img width="0" height="0" src="https://www.request-response.com/blog/aggbug.ashx?id=3a8ea029-3c12-4f38-b089-44516b8b1376" /&gt;</description>
      <comments>https://www.request-response.com/blog/CommentView,guid,3a8ea029-3c12-4f38-b089-44516b8b1376.aspx</comments>
      <category>Web Services</category>
      <category>XML</category>
    </item>
    <item>
      <trackback:ping>https://www.request-response.com/blog/Trackback.aspx?guid=ececbe12-14c8-4b4e-9782-ea5f05512139</trackback:ping>
      <pingback:server>https://www.request-response.com/blog/pingback.aspx</pingback:server>
      <pingback:target>https://www.request-response.com/blog/PermaLink,guid,ececbe12-14c8-4b4e-9782-ea5f05512139.aspx</pingback:target>
      <dc:creator />
      <wfw:comment>https://www.request-response.com/blog/CommentView,guid,ececbe12-14c8-4b4e-9782-ea5f05512139.aspx</wfw:comment>
      <wfw:commentRss>https://www.request-response.com/blog/SyndicationService.asmx/GetEntryCommentsRss?guid=ececbe12-14c8-4b4e-9782-ea5f05512139</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
John <a href="http://www.bristowe.com/blog/PermaLink.aspx?guid=700bf884-dd72-4214-9fb5-e1daf9d6e4b2">writes</a>:
</p>
        <blockquote dir="ltr" style="MARGIN-RIGHT: 0px">
          <p xmlns="http://www.w3.org/1999/xhtml">
I'm thankful Matevz didn't blast me for my über-crappy persistance model (read
"save to C:\subscriptions.xml"): 
</p>
          <blockquote dir="ltr" style="MARGIN-RIGHT: 0px" xmlns="http://www.w3.org/1999/xhtml">
            <p>
              <em>Give LOCAL SERVICE account permissions to write/modify the c:\ directory. By default
Plumbwork.Orange.Eventing.dll will write subscriptions file (called subscriptions.xml)
there.</em>
            </p>
          </blockquote>
          <p dir="ltr" xmlns="http://www.w3.org/1999/xhtml">
This line (above) - due to my extreme laziness while coding - makes me shudder. This
is something I really, really, really need to clean up.<br /><br />
[Via <a href="http://www.bristowe.com">http://www.bristowe.com</a>]
</p>
        </blockquote>
        <p dir="ltr" xmlns="http://www.w3.org/1999/xhtml">
I agree that next version should include a config option to use Plumbwork.Orange.Eventing.MemorySubscriptionManager
instead of Plumbwork.Orange.Eventing.XmlSubscriptionManager.
</p>
        <p dir="ltr" xmlns="http://www.w3.org/1999/xhtml">
Even better would be to add SqlSubscriptionManager, which I can do, when I get into
the <a href="http://www.gotdotnet.com/community/workspaces/workspace.aspx?ID=B700AF79-5B27-4D71-BFBD-8DF74FA68ABE">GDN
workspace</a>.
</p>
        <img width="0" height="0" src="https://www.request-response.com/blog/aggbug.ashx?id=ececbe12-14c8-4b4e-9782-ea5f05512139" />
      </body>
      <title>WS-Eventing</title>
      <guid isPermaLink="false">https://www.request-response.com/blog/PermaLink,guid,ececbe12-14c8-4b4e-9782-ea5f05512139.aspx</guid>
      <link>https://www.request-response.com/blog/PermaLink,guid,ececbe12-14c8-4b4e-9782-ea5f05512139.aspx</link>
      <pubDate>Tue, 24 Aug 2004 08:11:21 GMT</pubDate>
      <description>&lt;p&gt;
John &lt;a href="http://www.bristowe.com/blog/PermaLink.aspx?guid=700bf884-dd72-4214-9fb5-e1daf9d6e4b2"&gt;writes&lt;/a&gt;:
&lt;/p&gt;
&lt;blockquote dir=ltr style="MARGIN-RIGHT: 0px"&gt; 
&lt;p xmlns="http://www.w3.org/1999/xhtml"&gt;
I'm thankful Matevz didn't blast me for my &amp;#252;ber-crappy persistance model (read
"save to C:\subscriptions.xml"): 
&lt;/p&gt;
&lt;blockquote dir=ltr style="MARGIN-RIGHT: 0px" xmlns="http://www.w3.org/1999/xhtml"&gt; 
&lt;p&gt;
&lt;em&gt;Give LOCAL SERVICE account permissions to write/modify the c:\ directory. By default
Plumbwork.Orange.Eventing.dll will write subscriptions file (called subscriptions.xml)
there.&lt;/em&gt; 
&lt;/p&gt;
&lt;/blockquote&gt; 
&lt;p dir=ltr xmlns="http://www.w3.org/1999/xhtml"&gt;
This line (above) - due to my extreme laziness while coding - makes me shudder. This
is something I really, really, really need to clean up.&lt;br&gt;
&lt;br&gt;
[Via &lt;a href="http://www.bristowe.com"&gt;http://www.bristowe.com&lt;/a&gt;]
&lt;/p&gt;
&lt;/blockquote&gt; 
&lt;p dir=ltr xmlns="http://www.w3.org/1999/xhtml"&gt;
I agree that next version should include a config option to use Plumbwork.Orange.Eventing.MemorySubscriptionManager
instead of Plumbwork.Orange.Eventing.XmlSubscriptionManager.
&lt;/p&gt;
&lt;p dir=ltr xmlns="http://www.w3.org/1999/xhtml"&gt;
Even better would be to add SqlSubscriptionManager, which I can do, when I get into
the &lt;a href="http://www.gotdotnet.com/community/workspaces/workspace.aspx?ID=B700AF79-5B27-4D71-BFBD-8DF74FA68ABE"&gt;GDN
workspace&lt;/a&gt;.
&lt;/p&gt;
&lt;img width="0" height="0" src="https://www.request-response.com/blog/aggbug.ashx?id=ececbe12-14c8-4b4e-9782-ea5f05512139" /&gt;</description>
      <comments>https://www.request-response.com/blog/CommentView,guid,ececbe12-14c8-4b4e-9782-ea5f05512139.aspx</comments>
      <category>Web Services</category>
      <category>Work</category>
      <category>XML</category>
    </item>
    <item>
      <trackback:ping>https://www.request-response.com/blog/Trackback.aspx?guid=15419938-4d67-435c-80df-838034a63136</trackback:ping>
      <pingback:server>https://www.request-response.com/blog/pingback.aspx</pingback:server>
      <pingback:target>https://www.request-response.com/blog/PermaLink,guid,15419938-4d67-435c-80df-838034a63136.aspx</pingback:target>
      <dc:creator />
      <wfw:comment>https://www.request-response.com/blog/CommentView,guid,15419938-4d67-435c-80df-838034a63136.aspx</wfw:comment>
      <wfw:commentRss>https://www.request-response.com/blog/SyndicationService.asmx/GetEntryCommentsRss?guid=15419938-4d67-435c-80df-838034a63136</wfw:commentRss>
      <slash:comments>2</slash:comments>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
          <strong>WS-Eventing Application</strong>
        </p>
        <p>
It took me half of today to implement a WS-Eventing based service, together with service
control application and demonstration client.
</p>
        <p>
I took <a href="http://www.gotdotnet.com/community/workspaces/workspace.aspx?ID=B700AF79-5B27-4D71-BFBD-8DF74FA68ABE">Plumbwork.Orange</a> implementation
of WS-Eventing stack. It includes WSE 2.0 based implementation of <a href="http://msdn.microsoft.com/webservices/understanding/specs/default.aspx?pull=/library/en-us/dnglobspec/html/ws-eventing.asp">WS-Eventing</a> specification,
written by <a href="http://www.bristowe.com/">John Bristowe</a>. Latest post
about updates can be found <a href="http://www.bristowe.com/blog/PermaLink.aspx?guid=72e358ee-45da-46e5-852b-fabfc6cfc504">here</a>.
</p>
        <p>
          <strong>How it works</strong>
        </p>
        <p>
Windows service queries message queue (MSMQ) after the period elapses. If it finds
any messages, they are dispatched to all registered clients.
</p>
        <p>
There is a service control application, which can enroll new messages into the queue.
</p>
        <p>
There's also a simple client which you can use to register and receive notifications.
</p>
        <p>
          <strong>Availability</strong>
        </p>
        <p>
You can download the bits from here:
</p>
        <ul>
          <li>
Installer package for <em>WS-Eventing windows service</em>, which does registrations
and sends notifications back. Grab it <a href="http://downloads.request-response.com/WSEventingServiceSetup.msi">here</a>.
Source is available <a href="http://downloads.request-response.com/WSEventingService.zip">here</a>.</li>
          <li>
Source code, which you can use to compile the <em>service control application</em>.
Grab it <a href="http://downloads.request-response.com/WSEventingServiceApp.zip">here</a>.</li>
          <li>
Source code, which you can use to compile the <em>WS-Eventing client</em>. Grab it <a href="http://downloads.request-response.com/WSEventingClient.zip">here</a>.</li>
        </ul>
        <p>
Do the following:
</p>
        <ul>
          <li>
Install WS-Eventing service.</li>
          <li>
Update WSEventingService.exe.config with desired endpoint address, MSMQ query period
and queue name</li>
          <li>
Give LOCAL SERVICE account permissions to write/modify the c:\ directory. By default
Plumbwork.Orange.Eventing.dll will write subscriptions file (called subscriptions.xml)
there.</li>
          <li>
Start the service using SCM (Service Control Manager). Service will automatically
create the specified queue. <em>Note: You should have Message Queuing installed.</em></li>
          <li>
Start the service control application.</li>
          <li>
Start the client. It will register automatically.</li>
          <li>
Send notification using the service control application and watch it emerge on the
client side.</li>
        </ul>
        <p>
If you get into trouble, please email me. Have fun!
</p>
        <img width="0" height="0" src="https://www.request-response.com/blog/aggbug.ashx?id=15419938-4d67-435c-80df-838034a63136" />
      </body>
      <title>WS-Eventing Implementation</title>
      <guid isPermaLink="false">https://www.request-response.com/blog/PermaLink,guid,15419938-4d67-435c-80df-838034a63136.aspx</guid>
      <link>https://www.request-response.com/blog/PermaLink,guid,15419938-4d67-435c-80df-838034a63136.aspx</link>
      <pubDate>Sun, 22 Aug 2004 21:49:46 GMT</pubDate>
      <description>&lt;p&gt;
&lt;strong&gt;WS-Eventing Application&lt;/strong&gt;
&lt;/p&gt;
&lt;p&gt;
It took me half of today to implement a WS-Eventing based service, together with service
control application and demonstration client.
&lt;/p&gt;
&lt;p&gt;
I took &lt;a href="http://www.gotdotnet.com/community/workspaces/workspace.aspx?ID=B700AF79-5B27-4D71-BFBD-8DF74FA68ABE"&gt;Plumbwork.Orange&lt;/a&gt; implementation
of WS-Eventing stack. It&amp;nbsp;includes&amp;nbsp;WSE 2.0 based implementation of &lt;a href="http://msdn.microsoft.com/webservices/understanding/specs/default.aspx?pull=/library/en-us/dnglobspec/html/ws-eventing.asp"&gt;WS-Eventing&lt;/a&gt; specification,
written by &lt;a href="http://www.bristowe.com/"&gt;John Bristowe&lt;/a&gt;.&amp;nbsp;Latest post
about updates can be found &lt;a href="http://www.bristowe.com/blog/PermaLink.aspx?guid=72e358ee-45da-46e5-852b-fabfc6cfc504"&gt;here&lt;/a&gt;.
&lt;/p&gt;
&lt;p&gt;
&lt;strong&gt;How it works&lt;/strong&gt;
&lt;/p&gt;
&lt;p&gt;
Windows service queries message queue (MSMQ) after the period elapses. If it finds
any messages, they are dispatched to all registered clients.
&lt;/p&gt;
&lt;p&gt;
There is a service control application, which can enroll new messages into the queue.
&lt;/p&gt;
&lt;p&gt;
There's also a simple client which you can use to register and receive notifications.
&lt;/p&gt;
&lt;p&gt;
&lt;strong&gt;Availability&lt;/strong&gt;
&lt;/p&gt;
&lt;p&gt;
You can download the bits from here:
&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
Installer package for &lt;em&gt;WS-Eventing windows service&lt;/em&gt;, which does registrations
and sends notifications back. Grab it &lt;a href="http://downloads.request-response.com/WSEventingServiceSetup.msi"&gt;here&lt;/a&gt;.
Source is available &lt;a href="http://downloads.request-response.com/WSEventingService.zip"&gt;here&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;
Source code, which you can use to compile the &lt;em&gt;service control application&lt;/em&gt;.
Grab it &lt;a href="http://downloads.request-response.com/WSEventingServiceApp.zip"&gt;here&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;
Source code, which you can use to compile the &lt;em&gt;WS-Eventing client&lt;/em&gt;. Grab it &lt;a href="http://downloads.request-response.com/WSEventingClient.zip"&gt;here&lt;/a&gt;.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;
Do the following:
&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
Install WS-Eventing service.&lt;/li&gt;
&lt;li&gt;
Update WSEventingService.exe.config with desired endpoint address, MSMQ query period
and queue name&lt;/li&gt;
&lt;li&gt;
Give LOCAL SERVICE account permissions to write/modify the c:\ directory. By default
Plumbwork.Orange.Eventing.dll will write subscriptions file (called subscriptions.xml)
there.&lt;/li&gt;
&lt;li&gt;
Start the service using SCM (Service Control Manager). Service will automatically
create the specified queue. &lt;em&gt;Note: You should have Message Queuing installed.&lt;/em&gt;
&lt;/li&gt;
&lt;li&gt;
Start the service control application.&lt;/li&gt;
&lt;li&gt;
Start the client. It will register automatically.&lt;/li&gt;
&lt;li&gt;
Send notification using the service control application and watch it emerge on the
client side.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;
If you get into trouble, please email me. Have fun!
&lt;/p&gt;
&lt;img width="0" height="0" src="https://www.request-response.com/blog/aggbug.ashx?id=15419938-4d67-435c-80df-838034a63136" /&gt;</description>
      <comments>https://www.request-response.com/blog/CommentView,guid,15419938-4d67-435c-80df-838034a63136.aspx</comments>
      <category>Web Services</category>
      <category>Work</category>
      <category>XML</category>
    </item>
    <item>
      <trackback:ping>https://www.request-response.com/blog/Trackback.aspx?guid=bae8b7ca-96fa-4476-bd3c-89441c0b4fae</trackback:ping>
      <pingback:server>https://www.request-response.com/blog/pingback.aspx</pingback:server>
      <pingback:target>https://www.request-response.com/blog/PermaLink,guid,bae8b7ca-96fa-4476-bd3c-89441c0b4fae.aspx</pingback:target>
      <dc:creator />
      <wfw:comment>https://www.request-response.com/blog/CommentView,guid,bae8b7ca-96fa-4476-bd3c-89441c0b4fae.aspx</wfw:comment>
      <wfw:commentRss>https://www.request-response.com/blog/SyndicationService.asmx/GetEntryCommentsRss?guid=bae8b7ca-96fa-4476-bd3c-89441c0b4fae</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
A great post by <a href="http://staff.newtelligence.net/clemensv">Clemens</a> in which
he does a beautiful distinction between <a href="http://staff.newtelligence.net/clemensv/PermaLink.aspx?guid=0339fe35-2328-44be-93e6-f004bd869a84">services
and web services</a>.
</p>
        <p>
My thoughts would be:
</p>
        <ul>
          <li>
            <em>Service is a self consistent piece of software which MAY use one or more
web services for communication with the outside world.</em>
          </li>
          <li>
            <em>As always, web services MUST be considered to be within the presentation
layer of the solution. They just do not spit HTML out, they prefer XML.</em>
          </li>
        </ul>
        <p>
MAY and MUST are to be interpreted as defined in <a href="http://www.ietf.org/rfc/rfc2119.txt">RFC
2119</a>.
</p>
        <img width="0" height="0" src="https://www.request-response.com/blog/aggbug.ashx?id=bae8b7ca-96fa-4476-bd3c-89441c0b4fae" />
      </body>
      <title>Services &lt;&gt; Web Services</title>
      <guid isPermaLink="false">https://www.request-response.com/blog/PermaLink,guid,bae8b7ca-96fa-4476-bd3c-89441c0b4fae.aspx</guid>
      <link>https://www.request-response.com/blog/PermaLink,guid,bae8b7ca-96fa-4476-bd3c-89441c0b4fae.aspx</link>
      <pubDate>Wed, 18 Aug 2004 12:06:45 GMT</pubDate>
      <description>&lt;p&gt;
A great post by &lt;a href="http://staff.newtelligence.net/clemensv"&gt;Clemens&lt;/a&gt; in which
he does a beautiful distinction between &lt;a href="http://staff.newtelligence.net/clemensv/PermaLink.aspx?guid=0339fe35-2328-44be-93e6-f004bd869a84"&gt;services
and web services&lt;/a&gt;.
&lt;/p&gt;
&lt;p&gt;
My thoughts would be:
&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;em&gt;Service is a self consistent piece of software which&amp;nbsp;MAY use one or more
web services for communication with the outside world.&lt;/em&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;em&gt;As always, web services&amp;nbsp;MUST be&amp;nbsp;considered&amp;nbsp;to be within the&amp;nbsp;presentation
layer of the solution. They just do not spit HTML out,&amp;nbsp;they prefer&amp;nbsp;XML.&lt;/em&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;
MAY and MUST&amp;nbsp;are to be interpreted as defined in &lt;a href="http://www.ietf.org/rfc/rfc2119.txt"&gt;RFC
2119&lt;/a&gt;.
&lt;/p&gt;
&lt;img width="0" height="0" src="https://www.request-response.com/blog/aggbug.ashx?id=bae8b7ca-96fa-4476-bd3c-89441c0b4fae" /&gt;</description>
      <comments>https://www.request-response.com/blog/CommentView,guid,bae8b7ca-96fa-4476-bd3c-89441c0b4fae.aspx</comments>
      <category>Web Services</category>
      <category>XML</category>
    </item>
    <item>
      <trackback:ping>https://www.request-response.com/blog/Trackback.aspx?guid=1c3f7917-0e66-478e-bcaf-df05d354994e</trackback:ping>
      <pingback:server>https://www.request-response.com/blog/pingback.aspx</pingback:server>
      <pingback:target>https://www.request-response.com/blog/PermaLink,guid,1c3f7917-0e66-478e-bcaf-df05d354994e.aspx</pingback:target>
      <dc:creator />
      <wfw:comment>https://www.request-response.com/blog/CommentView,guid,1c3f7917-0e66-478e-bcaf-df05d354994e.aspx</wfw:comment>
      <wfw:commentRss>https://www.request-response.com/blog/SyndicationService.asmx/GetEntryCommentsRss?guid=1c3f7917-0e66-478e-bcaf-df05d354994e</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Dare wants to get <a href="http://blogs.msdn.com/dareobasanjo/archive/2004/06/24/164786.aspx">feedback</a> on
System.Xml 3.0 features.
</p>
        <p>
          <a href="http://www.relaxng.org/spec-20011203.html">What is wrong with this one?</a>
        </p>
        <img width="0" height="0" src="https://www.request-response.com/blog/aggbug.ashx?id=1c3f7917-0e66-478e-bcaf-df05d354994e" />
      </body>
      <title>Why only Schematron</title>
      <guid isPermaLink="false">https://www.request-response.com/blog/PermaLink,guid,1c3f7917-0e66-478e-bcaf-df05d354994e.aspx</guid>
      <link>https://www.request-response.com/blog/PermaLink,guid,1c3f7917-0e66-478e-bcaf-df05d354994e.aspx</link>
      <pubDate>Fri, 25 Jun 2004 08:33:24 GMT</pubDate>
      <description>&lt;p&gt;
Dare wants to get &lt;a href="http://blogs.msdn.com/dareobasanjo/archive/2004/06/24/164786.aspx"&gt;feedback&lt;/a&gt; on
System.Xml 3.0 features.
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://www.relaxng.org/spec-20011203.html"&gt;What is wrong with this one?&lt;/a&gt;
&lt;/p&gt;
&lt;img width="0" height="0" src="https://www.request-response.com/blog/aggbug.ashx?id=1c3f7917-0e66-478e-bcaf-df05d354994e" /&gt;</description>
      <comments>https://www.request-response.com/blog/CommentView,guid,1c3f7917-0e66-478e-bcaf-df05d354994e.aspx</comments>
      <category>XML</category>
    </item>
    <item>
      <trackback:ping>https://www.request-response.com/blog/Trackback.aspx?guid=28e98208-4499-4b16-9f13-0b61fe793708</trackback:ping>
      <pingback:server>https://www.request-response.com/blog/pingback.aspx</pingback:server>
      <pingback:target>https://www.request-response.com/blog/PermaLink,guid,28e98208-4499-4b16-9f13-0b61fe793708.aspx</pingback:target>
      <dc:creator />
      <wfw:comment>https://www.request-response.com/blog/CommentView,guid,28e98208-4499-4b16-9f13-0b61fe793708.aspx</wfw:comment>
      <wfw:commentRss>https://www.request-response.com/blog/SyndicationService.asmx/GetEntryCommentsRss?guid=28e98208-4499-4b16-9f13-0b61fe793708</wfw:commentRss>
      <slash:comments>2</slash:comments>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
          <a href="http://weblogs.asp.net/cazzu/">Daniel Cazzulino</a>, one of <a href="http://www.microsoft.com/mvp">our
breed</a>, shares this <a href="http://weblogs.asp.net/cazzu/archive/2004/05/31/144922.aspx">perfect
blog posting</a> about a super efficient way of passing XML data as XML, but without
loading full DOM on the server side.
</p>
        <p>
Started <a href="http://blogs.msdn.com/mpowell/archive/2004/05/12/130637.aspx">here</a> and <a href="/blog/PermaLink.aspx?guid=40377625-162c-4072-a5f2-8cde75d3231a">here</a>.
</p>
        <p>
I especially like the availability of arbitrary positioning of XPathNavigator to only
serialize the bits you are interested in.
</p>
        <p>
The only limitation of this solution is that it does not ship with FX 1.0/1.1 and
you have to be a master in XML to fully grok it. But hey, if you don't, you can still
use XmlDocument as a return type. :)
</p>
        <img width="0" height="0" src="https://www.request-response.com/blog/aggbug.ashx?id=28e98208-4499-4b16-9f13-0b61fe793708" />
      </body>
      <title>Daniel does it the right way</title>
      <guid isPermaLink="false">https://www.request-response.com/blog/PermaLink,guid,28e98208-4499-4b16-9f13-0b61fe793708.aspx</guid>
      <link>https://www.request-response.com/blog/PermaLink,guid,28e98208-4499-4b16-9f13-0b61fe793708.aspx</link>
      <pubDate>Mon, 31 May 2004 18:06:03 GMT</pubDate>
      <description>&lt;p&gt;
&lt;a href="http://weblogs.asp.net/cazzu/"&gt;Daniel Cazzulino&lt;/a&gt;, one of &lt;a href="http://www.microsoft.com/mvp"&gt;our
breed&lt;/a&gt;,&amp;nbsp;shares this &lt;a href="http://weblogs.asp.net/cazzu/archive/2004/05/31/144922.aspx"&gt;perfect
blog posting&lt;/a&gt; about a super efficient way of passing XML data as XML, but without
loading full DOM on the server side.
&lt;/p&gt;
&lt;p&gt;
Started&amp;nbsp;&lt;a href="http://blogs.msdn.com/mpowell/archive/2004/05/12/130637.aspx"&gt;here&lt;/a&gt; and &lt;a href="/blog/PermaLink.aspx?guid=40377625-162c-4072-a5f2-8cde75d3231a"&gt;here&lt;/a&gt;.
&lt;/p&gt;
&lt;p&gt;
I especially like the availability of arbitrary positioning of XPathNavigator to only
serialize the bits you are interested in.
&lt;/p&gt;
&lt;p&gt;
The only limitation of this solution is that it does not ship with FX 1.0/1.1 and
you have to be a master in XML to fully grok it. But hey, if you don't, you can still
use XmlDocument as a return type. :)
&lt;/p&gt;
&lt;img width="0" height="0" src="https://www.request-response.com/blog/aggbug.ashx?id=28e98208-4499-4b16-9f13-0b61fe793708" /&gt;</description>
      <comments>https://www.request-response.com/blog/CommentView,guid,28e98208-4499-4b16-9f13-0b61fe793708.aspx</comments>
      <category>MVP</category>
      <category>XML</category>
    </item>
    <item>
      <trackback:ping>https://www.request-response.com/blog/Trackback.aspx?guid=6b1041f6-6f52-4f84-8da1-551140e28a05</trackback:ping>
      <pingback:server>https://www.request-response.com/blog/pingback.aspx</pingback:server>
      <pingback:target>https://www.request-response.com/blog/PermaLink,guid,6b1041f6-6f52-4f84-8da1-551140e28a05.aspx</pingback:target>
      <dc:creator />
      <wfw:comment>https://www.request-response.com/blog/CommentView,guid,6b1041f6-6f52-4f84-8da1-551140e28a05.aspx</wfw:comment>
      <wfw:commentRss>https://www.request-response.com/blog/SyndicationService.asmx/GetEntryCommentsRss?guid=6b1041f6-6f52-4f84-8da1-551140e28a05</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
          <a href="http://www.dynamic-cast.com/">Harwey</a>
          <a href="http://www.dynamic-cast.com/mt-archives/000042.html">said</a> it's
code complete around March 1st. 
</p>
        <p>
As I got the confirmation today that first bits from the Indigo team will be available
to the selected ones in late July/early August, this is definitely something to look
for.
</p>
        <p>
Why...
</p>
        <p>
Why is...
</p>
        <p>
Why is it...
</p>
        <p>
Why is it still...
</p>
        <p>
Why is it still brewing?
</p>
        <img width="0" height="0" src="https://www.request-response.com/blog/aggbug.ashx?id=6b1041f6-6f52-4f84-8da1-551140e28a05" />
      </body>
      <title>What happened?</title>
      <guid isPermaLink="false">https://www.request-response.com/blog/PermaLink,guid,6b1041f6-6f52-4f84-8da1-551140e28a05.aspx</guid>
      <link>https://www.request-response.com/blog/PermaLink,guid,6b1041f6-6f52-4f84-8da1-551140e28a05.aspx</link>
      <pubDate>Mon, 17 May 2004 17:29:13 GMT</pubDate>
      <description>&lt;p&gt;
&lt;a href="http://www.dynamic-cast.com/"&gt;Harwey&lt;/a&gt; &lt;a href="http://www.dynamic-cast.com/mt-archives/000042.html"&gt;said&lt;/a&gt; it's
code complete around March 1st. 
&lt;/p&gt;
&lt;p&gt;
As I got the confirmation today that first bits from the Indigo team will be available
to the selected ones in late July/early August, this is definitely something to look
for.
&lt;/p&gt;
&lt;p&gt;
Why...
&lt;/p&gt;
&lt;p&gt;
Why is...
&lt;/p&gt;
&lt;p&gt;
Why is it...
&lt;/p&gt;
&lt;p&gt;
Why is it still...
&lt;/p&gt;
&lt;p&gt;
Why is it still brewing?
&lt;/p&gt;
&lt;img width="0" height="0" src="https://www.request-response.com/blog/aggbug.ashx?id=6b1041f6-6f52-4f84-8da1-551140e28a05" /&gt;</description>
      <comments>https://www.request-response.com/blog/CommentView,guid,6b1041f6-6f52-4f84-8da1-551140e28a05.aspx</comments>
      <category>Web Services</category>
      <category>XML</category>
    </item>
    <item>
      <trackback:ping>https://www.request-response.com/blog/Trackback.aspx?guid=40377625-162c-4072-a5f2-8cde75d3231a</trackback:ping>
      <pingback:server>https://www.request-response.com/blog/pingback.aspx</pingback:server>
      <pingback:target>https://www.request-response.com/blog/PermaLink,guid,40377625-162c-4072-a5f2-8cde75d3231a.aspx</pingback:target>
      <dc:creator />
      <wfw:comment>https://www.request-response.com/blog/CommentView,guid,40377625-162c-4072-a5f2-8cde75d3231a.aspx</wfw:comment>
      <wfw:commentRss>https://www.request-response.com/blog/SyndicationService.asmx/GetEntryCommentsRss?guid=40377625-162c-4072-a5f2-8cde75d3231a</wfw:commentRss>
      <slash:comments>1</slash:comments>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
With <a href="http://blogs.msdn.com/mpowell/archive/2004/05/12/130637.aspx">all the
talk going</a> on I agree that this is bad:
</p>
        <p>
          <font face="Courier New">[WebService]<br /></font>
          <font face="Courier New">public class MyWebService<br /></font>
          <font face="Courier New">{<br />
   [WebMethod]<br />
   public string GetSomeXML()<br />
   {<br />
     // get some xml<br />
     return xml;<br />
   }</font>
          <font face="Courier New">
            <br />
}</font>
        </p>
        <p>
And:
</p>
        <p>
          <font face="Courier New">public class MyClient<br />
{<br />
   public static void Main()<br />
   {<br />
      MyWebService objWS = new MyWebService();<br />
      string strXML = objWS.GetSomeXML();<br />
      XmlDocument doc = new XmlDocument();<br />
      doc.LoadXml(strXml);<br />
      // processing<br />
   }<br />
}</font>
        </p>
        <p>
A lot better (in most situations) is:
</p>
        <p>
          <font face="Courier New">[WebService]<br />
public class MyWebService<br />
{<br />
   [WebMethod]<br />
   public XmlDocument GetSomeXML()<br />
   {<br />
     // return xml<br />
   }<br />
}</font>
        </p>
        <p>
The former scenario serializes the document directly into the output SOAP stream,
therefore bypassing double string (de)serialization.
</p>
        <p>
There are special cases, when one would like to bypass the other approach (passing
XML as XmlDocument) on the server side. If you have all the data ready and want to
pass it as quickly as humanly possible, without rehydrating the entire full blown
DOM-capable object, you would use System.String (<a href="http://www.w3.org/TR/xmlschema-2/#string">xsd:string</a> in
the XML world) and System.Text.StringBuilder to contacenate it.
</p>
        <p>
If you don't know what to choose I propose this:
</p>
        <ul>
          <li>
It is year 2004, therefore platform and tool support is available in a way that XML
processing is not a limitation from the XSD type system -&gt; platform type system
conversion side. Therefore choose XmlDocument.</li>
          <li>
Choose XmlDocument.</li>
          <li>
Choose the string way if and only if you are expecting clients which have no other
way to bridge/decouple the raw SOAP XML string into something programmatic inside
your platform.</li>
        </ul>
        <p>
In any case, things will change in late July or early August.
</p>
        <img width="0" height="0" src="https://www.request-response.com/blog/aggbug.ashx?id=40377625-162c-4072-a5f2-8cde75d3231a" />
      </body>
      <title>Do it the right way</title>
      <guid isPermaLink="false">https://www.request-response.com/blog/PermaLink,guid,40377625-162c-4072-a5f2-8cde75d3231a.aspx</guid>
      <link>https://www.request-response.com/blog/PermaLink,guid,40377625-162c-4072-a5f2-8cde75d3231a.aspx</link>
      <pubDate>Mon, 17 May 2004 17:17:32 GMT</pubDate>
      <description>&lt;p&gt;
With &lt;a href="http://blogs.msdn.com/mpowell/archive/2004/05/12/130637.aspx"&gt;all the
talk going&lt;/a&gt; on I agree that this is bad:
&lt;/p&gt;
&lt;p&gt;
&lt;font face="Courier New"&gt;[WebService]&lt;br&gt;
&lt;/font&gt;&lt;font face="Courier New"&gt;public class MyWebService&lt;br&gt;
&lt;/font&gt;&lt;font face="Courier New"&gt;{&lt;br&gt;
&amp;nbsp;&amp;nbsp; [WebMethod]&lt;br&gt;
&amp;nbsp;&amp;nbsp; public string GetSomeXML()&lt;br&gt;
&amp;nbsp;&amp;nbsp; {&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // get some xml&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; return xml;&lt;br&gt;
&amp;nbsp;&amp;nbsp; }&lt;/font&gt;&lt;font face="Courier New"&gt;
&lt;br&gt;
}&lt;/font&gt;
&lt;/p&gt;
&lt;p&gt;
And:
&lt;/p&gt;
&lt;p&gt;
&lt;font face="Courier New"&gt;public class MyClient&lt;br&gt;
{&lt;br&gt;
&amp;nbsp;&amp;nbsp; public static void Main()&lt;br&gt;
&amp;nbsp;&amp;nbsp; {&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; MyWebService objWS = new MyWebService();&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; string strXML&amp;nbsp;= objWS.GetSomeXML();&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; XmlDocument doc = new XmlDocument();&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; doc.LoadXml(strXml);&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // processing&lt;br&gt;
&amp;nbsp;&amp;nbsp; }&lt;br&gt;
}&lt;/font&gt;
&lt;/p&gt;
&lt;p&gt;
A lot better (in most situations) is:
&lt;/p&gt;
&lt;p&gt;
&lt;font face="Courier New"&gt;[WebService]&lt;br&gt;
public class MyWebService&lt;br&gt;
{&lt;br&gt;
&amp;nbsp;&amp;nbsp; [WebMethod]&lt;br&gt;
&amp;nbsp;&amp;nbsp; public XmlDocument GetSomeXML()&lt;br&gt;
&amp;nbsp;&amp;nbsp; {&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //&amp;nbsp;return&amp;nbsp;xml&lt;br&gt;
&amp;nbsp;&amp;nbsp; }&lt;br&gt;
}&lt;/font&gt;
&lt;/p&gt;
&lt;p&gt;
The former scenario serializes the document directly into the output SOAP stream,
therefore bypassing double string (de)serialization.
&lt;/p&gt;
&lt;p&gt;
There are special cases, when one would like to bypass the other approach (passing
XML as XmlDocument) on the server side. If you have all the data ready and want to
pass it as quickly as humanly possible, without rehydrating the entire full blown
DOM-capable object, you would use System.String (&lt;a href="http://www.w3.org/TR/xmlschema-2/#string"&gt;xsd:string&lt;/a&gt; in
the XML world) and System.Text.StringBuilder to contacenate it.
&lt;/p&gt;
&lt;p&gt;
If you don't know what to choose I propose this:
&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
It is year 2004, therefore platform and tool support is available in a way that XML
processing is not a limitation from the XSD type system -&amp;gt; platform type system
conversion side. Therefore choose XmlDocument.&lt;/li&gt;
&lt;li&gt;
Choose XmlDocument.&lt;/li&gt;
&lt;li&gt;
Choose the string way if and only if you are expecting clients which have no other
way to bridge/decouple the raw SOAP XML string into something programmatic inside
your platform.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;
In any case, things will change in late July or early August.
&lt;/p&gt;
&lt;img width="0" height="0" src="https://www.request-response.com/blog/aggbug.ashx?id=40377625-162c-4072-a5f2-8cde75d3231a" /&gt;</description>
      <comments>https://www.request-response.com/blog/CommentView,guid,40377625-162c-4072-a5f2-8cde75d3231a.aspx</comments>
      <category>XML</category>
    </item>
    <item>
      <trackback:ping>https://www.request-response.com/blog/Trackback.aspx?guid=ad186105-b0d8-469e-bd8b-3b4ebfca631e</trackback:ping>
      <pingback:server>https://www.request-response.com/blog/pingback.aspx</pingback:server>
      <pingback:target>https://www.request-response.com/blog/PermaLink,guid,ad186105-b0d8-469e-bd8b-3b4ebfca631e.aspx</pingback:target>
      <dc:creator />
      <wfw:comment>https://www.request-response.com/blog/CommentView,guid,ad186105-b0d8-469e-bd8b-3b4ebfca631e.aspx</wfw:comment>
      <wfw:commentRss>https://www.request-response.com/blog/SyndicationService.asmx/GetEntryCommentsRss?guid=ad186105-b0d8-469e-bd8b-3b4ebfca631e</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
I wrote about <a href="/blog/PermaLink.aspx?guid=18a8a3ac-a698-4d77-86f4-0b90b665a261">a
bug in validation engine</a> of .NET Framework 1.0/1.1 a couple of weeks ago.
There was a lot of posts/discussions/emails about this issue later on.
</p>
        <p>
As <a href="http://www.25hoursaday.com/weblog/PermaLink.aspx?guid=35170d55-2685-43c3-8c47-22284b39598c">Dare</a>, Web
Data Team PM, points out, it turns that this anomaly is manifesting itself through
System.Xml.XmlValidaingReader, because System.Uri class has a problem. And System.Uri
has a problem, because RFC 2396 does not support empty values in BNF notation of URI.
</p>
        <p>
So, what I propose is that if you end up in a similiar situation that we did
in a production environment and want to validate XML instances or XML digital signatures
(which are likely to be prone to this problem too, depends on a generation engine)
and current Whidbey release is not your cup of tea, THEN CHANGE THE SPECIFICATION/SCHEMA.
</p>
        <p>
Simply change xsd:anyURI with xsd:string. It will help. :)
</p>
        <p>
I know this is architecturally a bad idea. But there is no other way to get around
this bug until Whidbey ships (unless you want to change platforms).
</p>
        <p>
I'm glad that usability is driving the ambiguity choice in this case. I'm glad that
decision has been made to support empty strings in System.Uri even though the spec
is not clear. Some things are just more natural than others.
</p>
        <img width="0" height="0" src="https://www.request-response.com/blog/aggbug.ashx?id=ad186105-b0d8-469e-bd8b-3b4ebfca631e" />
      </body>
      <title>Validation bug in .NET Fx 1/1.1</title>
      <guid isPermaLink="false">https://www.request-response.com/blog/PermaLink,guid,ad186105-b0d8-469e-bd8b-3b4ebfca631e.aspx</guid>
      <link>https://www.request-response.com/blog/PermaLink,guid,ad186105-b0d8-469e-bd8b-3b4ebfca631e.aspx</link>
      <pubDate>Thu, 13 May 2004 18:37:30 GMT</pubDate>
      <description>&lt;p&gt;
I wrote about&amp;nbsp;&lt;a href="/blog/PermaLink.aspx?guid=18a8a3ac-a698-4d77-86f4-0b90b665a261"&gt;a
bug in validation engine&lt;/a&gt;&amp;nbsp;of .NET Framework 1.0/1.1 a couple of weeks ago.
There was a lot of posts/discussions/emails about this issue later on.
&lt;/p&gt;
&lt;p&gt;
As &lt;a href="http://www.25hoursaday.com/weblog/PermaLink.aspx?guid=35170d55-2685-43c3-8c47-22284b39598c"&gt;Dare&lt;/a&gt;,&amp;nbsp;Web
Data Team PM, points out, it turns that this anomaly is manifesting itself through
System.Xml.XmlValidaingReader, because System.Uri class has a problem. And System.Uri
has a problem, because RFC 2396 does not support empty values in BNF notation of URI.
&lt;/p&gt;
&lt;p&gt;
So, what I propose is that if you end up&amp;nbsp;in a similiar situation that we did
in a production environment and want to validate XML instances or XML digital signatures
(which are likely to be prone to this problem too, depends on a generation engine)
and current Whidbey release is not your cup of tea, THEN CHANGE THE SPECIFICATION/SCHEMA.
&lt;/p&gt;
&lt;p&gt;
Simply change xsd:anyURI with xsd:string. It will help. :)
&lt;/p&gt;
&lt;p&gt;
I know this&amp;nbsp;is architecturally a bad idea. But there is no other way to get around
this bug until Whidbey ships (unless you want to change platforms).
&lt;/p&gt;
&lt;p&gt;
I'm glad that usability is driving the ambiguity choice in this case. I'm glad that
decision has been made to support empty strings in System.Uri even though the spec
is not clear. Some things are just more natural than others.
&lt;/p&gt;
&lt;img width="0" height="0" src="https://www.request-response.com/blog/aggbug.ashx?id=ad186105-b0d8-469e-bd8b-3b4ebfca631e" /&gt;</description>
      <comments>https://www.request-response.com/blog/CommentView,guid,ad186105-b0d8-469e-bd8b-3b4ebfca631e.aspx</comments>
      <category>XML</category>
    </item>
    <item>
      <trackback:ping>https://www.request-response.com/blog/Trackback.aspx?guid=afd741a1-72a5-4e3f-a1df-53e8a8cc8bba</trackback:ping>
      <pingback:server>https://www.request-response.com/blog/pingback.aspx</pingback:server>
      <pingback:target>https://www.request-response.com/blog/PermaLink,guid,afd741a1-72a5-4e3f-a1df-53e8a8cc8bba.aspx</pingback:target>
      <dc:creator />
      <wfw:comment>https://www.request-response.com/blog/CommentView,guid,afd741a1-72a5-4e3f-a1df-53e8a8cc8bba.aspx</wfw:comment>
      <wfw:commentRss>https://www.request-response.com/blog/SyndicationService.asmx/GetEntryCommentsRss?guid=afd741a1-72a5-4e3f-a1df-53e8a8cc8bba</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Today I spent the whole day with Microsoft Webdata team, which is responsible
for the majority of System.Xml namespace.
</p>
        <p>
We discussed new features in System.Xml v2, <a href="http://apps.gotdotnet.com/xmltools/xsdinference/">some</a> of
them have already been mentioned.
</p>
        <p>
          <a href="http://blogs.msdn.com/dareobasanjo/">Dare</a>, <a href="http://blogs.msdn.com/mfussell">Mark</a>, <a href="http://blogs.msdn.com/arpande/">Arpan</a>,
thank you for the insight. I hope we helped you make some decisions.
</p>
        <img width="0" height="0" src="https://www.request-response.com/blog/aggbug.ashx?id=afd741a1-72a5-4e3f-a1df-53e8a8cc8bba" />
      </body>
      <title>WebData team</title>
      <guid isPermaLink="false">https://www.request-response.com/blog/PermaLink,guid,afd741a1-72a5-4e3f-a1df-53e8a8cc8bba.aspx</guid>
      <link>https://www.request-response.com/blog/PermaLink,guid,afd741a1-72a5-4e3f-a1df-53e8a8cc8bba.aspx</link>
      <pubDate>Thu, 08 Apr 2004 00:46:10 GMT</pubDate>
      <description>&lt;p&gt;
Today I spent&amp;nbsp;the whole day with Microsoft Webdata team, which is responsible
for the majority of System.Xml namespace.
&lt;/p&gt;
&lt;p&gt;
We discussed new features in System.Xml v2, &lt;a href="http://apps.gotdotnet.com/xmltools/xsdinference/"&gt;some&lt;/a&gt; of
them have already been mentioned.
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://blogs.msdn.com/dareobasanjo/"&gt;Dare&lt;/a&gt;, &lt;a href="http://blogs.msdn.com/mfussell"&gt;Mark&lt;/a&gt;, &lt;a href="http://blogs.msdn.com/arpande/"&gt;Arpan&lt;/a&gt;,
thank you for the insight. I hope we helped you make some decisions.
&lt;/p&gt;
&lt;img width="0" height="0" src="https://www.request-response.com/blog/aggbug.ashx?id=afd741a1-72a5-4e3f-a1df-53e8a8cc8bba" /&gt;</description>
      <comments>https://www.request-response.com/blog/CommentView,guid,afd741a1-72a5-4e3f-a1df-53e8a8cc8bba.aspx</comments>
      <category>XML</category>
    </item>
    <item>
      <trackback:ping>https://www.request-response.com/blog/Trackback.aspx?guid=18a8a3ac-a698-4d77-86f4-0b90b665a261</trackback:ping>
      <pingback:server>https://www.request-response.com/blog/pingback.aspx</pingback:server>
      <pingback:target>https://www.request-response.com/blog/PermaLink,guid,18a8a3ac-a698-4d77-86f4-0b90b665a261.aspx</pingback:target>
      <dc:creator />
      <wfw:comment>https://www.request-response.com/blog/CommentView,guid,18a8a3ac-a698-4d77-86f4-0b90b665a261.aspx</wfw:comment>
      <wfw:commentRss>https://www.request-response.com/blog/SyndicationService.asmx/GetEntryCommentsRss?guid=18a8a3ac-a698-4d77-86f4-0b90b665a261</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <font size="2">
          <p>
There is a problem with schema validation of xs:anyURI data type in System.Xml.XmlValidatingReader.
</p>
          <p>
The <a href="http://www.w3.org/TR/2001/REC-xmlschema-2-20010502/#anyURI">schema spec</a> and
especially <a href="http://www.ietf.org/rfc/rfc2396.txt">RFC 2396</a> state that xs:anyURI
instance can be empty, but System.Xml.XmlValidatingReader keeps failing on such an
instance.
</p>
          <p>
To reproduce the error use the following schema:
</p>
          <p>
            <font face="Courier New">&lt;?xml version="1.0" encoding="UTF-8"?&gt;<br />
&lt;xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"&gt;<br />
  &lt;xs:element name="AnyURI" type="xs:anyURI"&gt;<br />
  &lt;/xs:element&gt;<br />
&lt;/xs:schema&gt;</font>
          </p>
          <p>
And this instance document:
</p>
          <p>
            <font face="Courier New">&lt;?xml version="1.0" encoding="UTF-8"?&gt;<br />
&lt;AnyURI/&gt;</font>
          </p>
          <p>
There is currently no workaround for .NET FX 1.0/1.1. Actually Whidbey is the only
patch that fixes this. :)
</p>
          <p>
The problem is even more troublesome when one does not have direct control over instance
document syntax/serialization. For example in case of auto generated XML by Microsoft
Office InfoPath during digital signature insertion. Attribute <a><font face="Courier New">/Signature/SignedInfo/Reference/@URI</font></a> is
(according to XML Signature schema) typed as xs:anyURI. 
</p>
          <p>
Validation problem therefore manifests itself as inability to validate any digitally
signed InfoPath documents.
</p>
        </font>
        <img width="0" height="0" src="https://www.request-response.com/blog/aggbug.ashx?id=18a8a3ac-a698-4d77-86f4-0b90b665a261" />
      </body>
      <title>Serious bug in System.Xml.XmlValidatingReader</title>
      <guid isPermaLink="false">https://www.request-response.com/blog/PermaLink,guid,18a8a3ac-a698-4d77-86f4-0b90b665a261.aspx</guid>
      <link>https://www.request-response.com/blog/PermaLink,guid,18a8a3ac-a698-4d77-86f4-0b90b665a261.aspx</link>
      <pubDate>Mon, 08 Mar 2004 17:31:39 GMT</pubDate>
      <description>&lt;font size=2&gt; 
&lt;p&gt;
There is a problem with schema validation of xs:anyURI data type in System.Xml.XmlValidatingReader.
&lt;/p&gt;
&lt;p&gt;
The &lt;a href="http://www.w3.org/TR/2001/REC-xmlschema-2-20010502/#anyURI"&gt;schema spec&lt;/a&gt; and
especially &lt;a href="http://www.ietf.org/rfc/rfc2396.txt"&gt;RFC 2396&lt;/a&gt; state that xs:anyURI
instance can be empty, but System.Xml.XmlValidatingReader keeps failing on such an
instance.
&lt;/p&gt;
&lt;p&gt;
To reproduce the error use the following schema:
&lt;/p&gt;
&lt;p&gt;
&lt;font face="Courier New"&gt;&amp;lt;?xml version="1.0" encoding="UTF-8"?&amp;gt;&lt;br&gt;
&amp;lt;xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"&amp;gt;&lt;br&gt;
&amp;nbsp; &amp;lt;xs:element name="AnyURI" type="xs:anyURI"&amp;gt;&lt;br&gt;
&amp;nbsp; &amp;lt;/xs:element&amp;gt;&lt;br&gt;
&amp;lt;/xs:schema&amp;gt;&lt;/font&gt;
&lt;/p&gt;
&lt;p&gt;
And this instance document:
&lt;/p&gt;
&lt;p&gt;
&lt;font face="Courier New"&gt;&amp;lt;?xml version="1.0" encoding="UTF-8"?&amp;gt;&lt;br&gt;
&amp;lt;AnyURI/&amp;gt;&lt;/font&gt;
&lt;/p&gt;
&lt;p&gt;
There is currently no workaround for .NET FX 1.0/1.1. Actually Whidbey is the only
patch that fixes this. :)
&lt;/p&gt;
&lt;p&gt;
The problem is even more troublesome when one does not have direct control over instance
document syntax/serialization. For example in case of auto generated XML by Microsoft
Office InfoPath during digital signature insertion. Attribute &lt;a&gt;&lt;font face="Courier New"&gt;/Signature/SignedInfo/Reference/@URI&lt;/font&gt;&lt;/a&gt; is
(according to XML Signature schema) typed as xs:anyURI. 
&lt;/p&gt;
&lt;p&gt;
Validation problem therefore manifests itself as inability to validate any digitally
signed InfoPath documents.
&lt;/font&gt;&gt;
&lt;img width="0" height="0" src="https://www.request-response.com/blog/aggbug.ashx?id=18a8a3ac-a698-4d77-86f4-0b90b665a261" /&gt;</description>
      <comments>https://www.request-response.com/blog/CommentView,guid,18a8a3ac-a698-4d77-86f4-0b90b665a261.aspx</comments>
      <category>XML</category>
    </item>
    <item>
      <trackback:ping>https://www.request-response.com/blog/Trackback.aspx?guid=51656822-1229-41f9-bdbe-821f04a92930</trackback:ping>
      <pingback:server>https://www.request-response.com/blog/pingback.aspx</pingback:server>
      <pingback:target>https://www.request-response.com/blog/PermaLink,guid,51656822-1229-41f9-bdbe-821f04a92930.aspx</pingback:target>
      <dc:creator />
      <wfw:comment>https://www.request-response.com/blog/CommentView,guid,51656822-1229-41f9-bdbe-821f04a92930.aspx</wfw:comment>
      <wfw:commentRss>https://www.request-response.com/blog/SyndicationService.asmx/GetEntryCommentsRss?guid=51656822-1229-41f9-bdbe-821f04a92930</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
          <a href="http://www.w3.org">W3C</a> yesterday released a v1.1 of complete
XML data model and serialization syntax stack. You can get <a href="http://www.w3.org/TR/2004/REC-xml-infoset-20040204/">XML
Infoset 1.1</a>, <a href="http://www.w3.org/TR/2004/REC-xml-names11-20040204/">XML
Namespaces 1.1</a> and <a href="http://www.w3.org/TR/2004/REC-xml11-20040204/">XML
1.1</a> specifications.
</p>
        <p>
Now the fun begins.
</p>
        <img width="0" height="0" src="https://www.request-response.com/blog/aggbug.ashx?id=51656822-1229-41f9-bdbe-821f04a92930" />
      </body>
      <title>XML 1.1 is alive</title>
      <guid isPermaLink="false">https://www.request-response.com/blog/PermaLink,guid,51656822-1229-41f9-bdbe-821f04a92930.aspx</guid>
      <link>https://www.request-response.com/blog/PermaLink,guid,51656822-1229-41f9-bdbe-821f04a92930.aspx</link>
      <pubDate>Thu, 05 Feb 2004 08:21:52 GMT</pubDate>
      <description>&lt;p&gt;
&lt;a href="http://www.w3.org"&gt;W3C&lt;/a&gt;&amp;nbsp;yesterday released a&amp;nbsp;v1.1&amp;nbsp;of complete
XML&amp;nbsp;data model and serialization syntax stack.&amp;nbsp;You can get &lt;a href="http://www.w3.org/TR/2004/REC-xml-infoset-20040204/"&gt;XML
Infoset 1.1&lt;/a&gt;, &lt;a href="http://www.w3.org/TR/2004/REC-xml-names11-20040204/"&gt;XML
Namespaces 1.1&lt;/a&gt; and&amp;nbsp;&lt;a href="http://www.w3.org/TR/2004/REC-xml11-20040204/"&gt;XML
1.1&lt;/a&gt; specifications.
&lt;/p&gt;
&lt;p&gt;
Now the fun begins.
&lt;/p&gt;
&lt;img width="0" height="0" src="https://www.request-response.com/blog/aggbug.ashx?id=51656822-1229-41f9-bdbe-821f04a92930" /&gt;</description>
      <comments>https://www.request-response.com/blog/CommentView,guid,51656822-1229-41f9-bdbe-821f04a92930.aspx</comments>
      <category>XML</category>
    </item>
    <item>
      <trackback:ping>https://www.request-response.com/blog/Trackback.aspx?guid=ddb390d1-ee45-47ff-b823-4ab08121a1d8</trackback:ping>
      <pingback:server>https://www.request-response.com/blog/pingback.aspx</pingback:server>
      <pingback:target>https://www.request-response.com/blog/PermaLink,guid,ddb390d1-ee45-47ff-b823-4ab08121a1d8.aspx</pingback:target>
      <dc:creator />
      <wfw:comment>https://www.request-response.com/blog/CommentView,guid,ddb390d1-ee45-47ff-b823-4ab08121a1d8.aspx</wfw:comment>
      <wfw:commentRss>https://www.request-response.com/blog/SyndicationService.asmx/GetEntryCommentsRss?guid=ddb390d1-ee45-47ff-b823-4ab08121a1d8</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p dir="ltr">
This got my attention today:
</p>
        <blockquote dir="ltr" style="MARGIN-RIGHT: 0px">
          <p>
            <em>Ultimately, I think the question is really a distraction. One of the great strengths
of XML is that the instances exist independently not only from individual schema definitions,
but also independently from the schema language of the day. [From: </em>
            <a href="http://www.gotdotnet.com/team/dbox/default.aspx?key=2004-01-24T09:58:46Z">
              <em>Don
Box</em>
            </a>
            <em>]</em>
          </p>
        </blockquote>
        <p>
True indeed. In case of industry shifting to <a href="http://www.relaxng.org">RelaxNG</a> (very
unlikely), instance documents would survive nicely. As long as there is a schema,
that describes an instance document, everything is fine. When the connection is lost
somehow, we can't talk about instances any more.
</p>
        <p>
XML without a defined schema is no better than CSV. It's not even <a href="http://www.xoltar.org/2002/oct/17/haskellCSV.html">easier
to parse</a>.
</p>
        <img width="0" height="0" src="https://www.request-response.com/blog/aggbug.ashx?id=ddb390d1-ee45-47ff-b823-4ab08121a1d8" />
      </body>
      <title>XML instance document survival</title>
      <guid isPermaLink="false">https://www.request-response.com/blog/PermaLink,guid,ddb390d1-ee45-47ff-b823-4ab08121a1d8.aspx</guid>
      <link>https://www.request-response.com/blog/PermaLink,guid,ddb390d1-ee45-47ff-b823-4ab08121a1d8.aspx</link>
      <pubDate>Sat, 24 Jan 2004 19:21:14 GMT</pubDate>
      <description>&lt;p dir=ltr&gt;
This got my attention today:
&lt;/p&gt;
&lt;blockquote dir=ltr style="MARGIN-RIGHT: 0px"&gt; 
&lt;p&gt;
&lt;em&gt;Ultimately, I think the question is really a distraction. One of the great strengths
of XML is that the instances exist independently not only from individual schema definitions,
but also independently from&amp;nbsp;the schema language of the day. [From: &lt;/em&gt;&lt;a href="http://www.gotdotnet.com/team/dbox/default.aspx?key=2004-01-24T09:58:46Z"&gt;&lt;em&gt;Don
Box&lt;/em&gt;&lt;/a&gt;&lt;em&gt;]&lt;/em&gt;
&lt;/p&gt;
&lt;/blockquote&gt; 
&lt;p&gt;
True indeed. In case of industry shifting to &lt;a href="http://www.relaxng.org"&gt;RelaxNG&lt;/a&gt;&amp;nbsp;(very
unlikely), instance documents would survive nicely. As long as there is a schema,
that describes an instance document, everything is fine. When the connection is lost
somehow, we can't talk about instances any more.
&lt;/p&gt;
&lt;p&gt;
XML without a defined schema is no better than CSV. It's not even &lt;a href="http://www.xoltar.org/2002/oct/17/haskellCSV.html"&gt;easier
to parse&lt;/a&gt;.
&lt;/p&gt;
&lt;img width="0" height="0" src="https://www.request-response.com/blog/aggbug.ashx?id=ddb390d1-ee45-47ff-b823-4ab08121a1d8" /&gt;</description>
      <comments>https://www.request-response.com/blog/CommentView,guid,ddb390d1-ee45-47ff-b823-4ab08121a1d8.aspx</comments>
      <category>XML</category>
    </item>
    <item>
      <trackback:ping>https://www.request-response.com/blog/Trackback.aspx?guid=a85f9423-5f48-4c02-a3ef-d1018fc2788e</trackback:ping>
      <pingback:server>https://www.request-response.com/blog/pingback.aspx</pingback:server>
      <pingback:target>https://www.request-response.com/blog/PermaLink,guid,a85f9423-5f48-4c02-a3ef-d1018fc2788e.aspx</pingback:target>
      <dc:creator />
      <wfw:comment>https://www.request-response.com/blog/CommentView,guid,a85f9423-5f48-4c02-a3ef-d1018fc2788e.aspx</wfw:comment>
      <wfw:commentRss>https://www.request-response.com/blog/SyndicationService.asmx/GetEntryCommentsRss?guid=a85f9423-5f48-4c02-a3ef-d1018fc2788e</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
We'll see how <a href="http://www.douglasp.com/PermaLink.aspx?guid=d9f3d399-7661-455d-8246-987b0f0e30b5">this</a> works
out. I have been at the PDC, seen <a href="http://www.douglasp.com/default.aspx">Doug's</a> talk
and I agree that this allows schema to be versioned over time. What is bothering me
is the structural extension of the schema itself, just to support versioning.
</p>
        <p>
And yes, I know this is the only way, since W3C didn't pay attention to versioning
in the first place. It still bothers me, since I like my content models clean.
</p>
        <img width="0" height="0" src="https://www.request-response.com/blog/aggbug.ashx?id=a85f9423-5f48-4c02-a3ef-d1018fc2788e" />
      </body>
      <title>Major problem supposed to be fixed: XML Schema versioning</title>
      <guid isPermaLink="false">https://www.request-response.com/blog/PermaLink,guid,a85f9423-5f48-4c02-a3ef-d1018fc2788e.aspx</guid>
      <link>https://www.request-response.com/blog/PermaLink,guid,a85f9423-5f48-4c02-a3ef-d1018fc2788e.aspx</link>
      <pubDate>Fri, 23 Jan 2004 08:51:54 GMT</pubDate>
      <description>&lt;p&gt;
We'll see how &lt;a href="http://www.douglasp.com/PermaLink.aspx?guid=d9f3d399-7661-455d-8246-987b0f0e30b5"&gt;this&lt;/a&gt; works
out. I have been at the PDC, seen &lt;a href="http://www.douglasp.com/default.aspx"&gt;Doug's&lt;/a&gt; talk
and I agree that this allows schema to be versioned over time. What is bothering me
is the structural extension of the schema itself, just to support versioning.
&lt;/p&gt;
&lt;p&gt;
And yes, I know&amp;nbsp;this is the only way, since W3C didn't pay attention to versioning
in the first place. It still bothers me, since I like my content models clean.
&lt;/p&gt;
&lt;img width="0" height="0" src="https://www.request-response.com/blog/aggbug.ashx?id=a85f9423-5f48-4c02-a3ef-d1018fc2788e" /&gt;</description>
      <comments>https://www.request-response.com/blog/CommentView,guid,a85f9423-5f48-4c02-a3ef-d1018fc2788e.aspx</comments>
      <category>XML</category>
    </item>
    <item>
      <trackback:ping>https://www.request-response.com/blog/Trackback.aspx?guid=e11b1005-219a-4095-91ef-45b2de8acac9</trackback:ping>
      <pingback:server>https://www.request-response.com/blog/pingback.aspx</pingback:server>
      <pingback:target>https://www.request-response.com/blog/PermaLink,guid,e11b1005-219a-4095-91ef-45b2de8acac9.aspx</pingback:target>
      <dc:creator />
      <wfw:comment>https://www.request-response.com/blog/CommentView,guid,e11b1005-219a-4095-91ef-45b2de8acac9.aspx</wfw:comment>
      <wfw:commentRss>https://www.request-response.com/blog/SyndicationService.asmx/GetEntryCommentsRss?guid=e11b1005-219a-4095-91ef-45b2de8acac9</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Can't get one of my solutions to work on a Windows Server 2003 based server. Client
works fine, but server side X509-based decryption fails with an error that should
not happen (Cannot find the certificate and private key for decrtyption).
</p>
        <p>
Everything installed and correctly setup. Even permissions. :)
</p>
        <p>
Since even the official Microsoft newsgroup didn't help, I'm really stuck. The
funny thing is, that if I disallow access to private key and/or remove the certificate,
error message changes giving me a clue that WSE looks at the cert unsuccessfully.
</p>
        <img width="0" height="0" src="https://www.request-response.com/blog/aggbug.ashx?id=e11b1005-219a-4095-91ef-45b2de8acac9" />
      </body>
      <title>WSE on Windows Server 2003</title>
      <guid isPermaLink="false">https://www.request-response.com/blog/PermaLink,guid,e11b1005-219a-4095-91ef-45b2de8acac9.aspx</guid>
      <link>https://www.request-response.com/blog/PermaLink,guid,e11b1005-219a-4095-91ef-45b2de8acac9.aspx</link>
      <pubDate>Wed, 26 Nov 2003 13:32:11 GMT</pubDate>
      <description>&lt;p&gt;
Can't get one of my solutions to work on a Windows Server 2003 based server. Client
works fine, but server side X509-based decryption fails with an error that should
not happen (Cannot find the certificate and private key for decrtyption).
&lt;/p&gt;
&lt;p&gt;
Everything installed and correctly setup. Even permissions. :)
&lt;/p&gt;
&lt;p&gt;
Since&amp;nbsp;even the official Microsoft newsgroup didn't help, I'm really stuck. The
funny thing is, that if I disallow access to private key and/or remove the certificate,
error message changes giving me a clue that WSE looks at the cert unsuccessfully.
&lt;/p&gt;
&lt;img width="0" height="0" src="https://www.request-response.com/blog/aggbug.ashx?id=e11b1005-219a-4095-91ef-45b2de8acac9" /&gt;</description>
      <comments>https://www.request-response.com/blog/CommentView,guid,e11b1005-219a-4095-91ef-45b2de8acac9.aspx</comments>
      <category>Web Services</category>
      <category>XML</category>
    </item>
    <item>
      <trackback:ping>https://www.request-response.com/blog/Trackback.aspx?guid=b7c1102c-8b16-41e9-9f51-4792f76cfb24</trackback:ping>
      <pingback:server>https://www.request-response.com/blog/pingback.aspx</pingback:server>
      <pingback:target>https://www.request-response.com/blog/PermaLink,guid,b7c1102c-8b16-41e9-9f51-4792f76cfb24.aspx</pingback:target>
      <dc:creator />
      <wfw:comment>https://www.request-response.com/blog/CommentView,guid,b7c1102c-8b16-41e9-9f51-4792f76cfb24.aspx</wfw:comment>
      <wfw:commentRss>https://www.request-response.com/blog/SyndicationService.asmx/GetEntryCommentsRss?guid=b7c1102c-8b16-41e9-9f51-4792f76cfb24</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
We are unsuccessful with our emails to Microsoft UDDI team to upgrade our UDDI account
to level 2 status. If anyone knows an appropriate contact or is able to help directly,
please do so.
</p>
        <p>
UDDI Provider name: Gama System<br />
Current UDDI level: 1
</p>
        <img width="0" height="0" src="https://www.request-response.com/blog/aggbug.ashx?id=b7c1102c-8b16-41e9-9f51-4792f76cfb24" />
      </body>
      <title>UDDI level 2 status</title>
      <guid isPermaLink="false">https://www.request-response.com/blog/PermaLink,guid,b7c1102c-8b16-41e9-9f51-4792f76cfb24.aspx</guid>
      <link>https://www.request-response.com/blog/PermaLink,guid,b7c1102c-8b16-41e9-9f51-4792f76cfb24.aspx</link>
      <pubDate>Sat, 04 Oct 2003 12:54:35 GMT</pubDate>
      <description>&lt;p&gt;
We are unsuccessful with our emails to Microsoft UDDI team to upgrade our UDDI account
to level 2 status. If anyone knows an appropriate contact or is able to help directly,
please do so.
&lt;/p&gt;
&lt;p&gt;
UDDI Provider name: Gama System&lt;br&gt;
Current UDDI level: 1
&lt;/p&gt;
&lt;img width="0" height="0" src="https://www.request-response.com/blog/aggbug.ashx?id=b7c1102c-8b16-41e9-9f51-4792f76cfb24" /&gt;</description>
      <comments>https://www.request-response.com/blog/CommentView,guid,b7c1102c-8b16-41e9-9f51-4792f76cfb24.aspx</comments>
      <category>Web Services</category>
      <category>Work</category>
      <category>XML</category>
    </item>
    <item>
      <trackback:ping>https://www.request-response.com/blog/Trackback.aspx?guid=58e9eace-7a3b-42f0-a0a7-2bbe7071661c</trackback:ping>
      <pingback:server>https://www.request-response.com/blog/pingback.aspx</pingback:server>
      <pingback:target>https://www.request-response.com/blog/PermaLink,guid,58e9eace-7a3b-42f0-a0a7-2bbe7071661c.aspx</pingback:target>
      <dc:creator />
      <wfw:comment>https://www.request-response.com/blog/CommentView,guid,58e9eace-7a3b-42f0-a0a7-2bbe7071661c.aspx</wfw:comment>
      <wfw:commentRss>https://www.request-response.com/blog/SyndicationService.asmx/GetEntryCommentsRss?guid=58e9eace-7a3b-42f0-a0a7-2bbe7071661c</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
While preparing for my <a href="http://www.microsoft.com/slovenija/dogodki/MsdnTech/MsdnTechSept2003.asp">Tuesday
demonstration</a> of XML features in Office 2003 I found out that Word XML namespace
changed from: <a href="http://schemas.microsoft.com/office/word/2003/2/wordml"><font face="Courier New,Courier, Monospace">http://schemas.microsoft.com/office/word/2003/2/wordml</font></a> to <a href="http://schemas.microsoft.com/office/word/2003/wordml"><font face="Courier New,Courier, Monospace">http://schemas.microsoft.com/office/word/2003/wordml</font></a>.
</p>
        <p>
It's not that I'm opposed to changing beta-time namespaces but all my documents, saved
in Office 2003 beta2 as XML, won't open up properly in Office 2003 RTM. I have to
change them by hand.
</p>
        <p>
Another thing that pops a question is: What if Microsoft releases two Word versions
within a year that need different namespaces? That has not happened yet, but this
kind of namespace naming convention is not as flexible as a standard year/month, W3C
like one.
</p>
        <p>
Changing the namespace to <a href="http://schemas.microsoft.com/office/word/2003/10/wordml"><font face="Courier New,Courier, Monospace">http://schemas.microsoft.com/office/word/2003/10/wordml</font></a> would
break things too, but wouldn't brake the convention.
</p>
        <p>
Conventions, especially namespace declarations, carry a semantic meaning and one should
avoid breaking them.
</p>
        <img width="0" height="0" src="https://www.request-response.com/blog/aggbug.ashx?id=58e9eace-7a3b-42f0-a0a7-2bbe7071661c" />
      </body>
      <title>Word 2003 namespace change</title>
      <guid isPermaLink="false">https://www.request-response.com/blog/PermaLink,guid,58e9eace-7a3b-42f0-a0a7-2bbe7071661c.aspx</guid>
      <link>https://www.request-response.com/blog/PermaLink,guid,58e9eace-7a3b-42f0-a0a7-2bbe7071661c.aspx</link>
      <pubDate>Sun, 28 Sep 2003 18:58:23 GMT</pubDate>
      <description>&lt;p&gt;
While preparing for my &lt;a href="http://www.microsoft.com/slovenija/dogodki/MsdnTech/MsdnTechSept2003.asp"&gt;Tuesday
demonstration&lt;/a&gt; of XML features in Office 2003 I found out that Word XML namespace
changed from: &lt;a href="http://schemas.microsoft.com/office/word/2003/2/wordml"&gt;&lt;font face="Courier New,Courier, Monospace"&gt;http://schemas.microsoft.com/office/word/2003/2/wordml&lt;/font&gt;&lt;/a&gt; to &lt;a href="http://schemas.microsoft.com/office/word/2003/wordml"&gt;&lt;font face="Courier New,Courier, Monospace"&gt;http://schemas.microsoft.com/office/word/2003/wordml&lt;/font&gt;&lt;/a&gt;.
&lt;/p&gt;
&lt;p&gt;
It's not that I'm opposed to changing beta-time namespaces but all my documents, saved
in Office 2003 beta2 as XML, won't open up properly in Office 2003 RTM. I have to
change them by hand.
&lt;/p&gt;
&lt;p&gt;
Another thing that pops a question is: What if Microsoft releases two Word versions
within a year that need different namespaces? That has not happened yet, but this
kind of namespace naming convention is not as flexible as a standard year/month, W3C
like one.
&lt;/p&gt;
&lt;p&gt;
Changing the namespace to &lt;a href="http://schemas.microsoft.com/office/word/2003/10/wordml"&gt;&lt;font face="Courier New,Courier, Monospace"&gt;http://schemas.microsoft.com/office/word/2003/10/wordml&lt;/font&gt;&lt;/a&gt; would
break things too, but wouldn't brake the convention.
&lt;/p&gt;
&lt;p&gt;
Conventions, especially namespace declarations, carry a semantic meaning and one should
avoid breaking them.
&lt;/p&gt;
&lt;img width="0" height="0" src="https://www.request-response.com/blog/aggbug.ashx?id=58e9eace-7a3b-42f0-a0a7-2bbe7071661c" /&gt;</description>
      <comments>https://www.request-response.com/blog/CommentView,guid,58e9eace-7a3b-42f0-a0a7-2bbe7071661c.aspx</comments>
      <category>XML</category>
    </item>
    <item>
      <trackback:ping>https://www.request-response.com/blog/Trackback.aspx?guid=53460959-de2e-4439-8282-19dc63c1d173</trackback:ping>
      <pingback:server>https://www.request-response.com/blog/pingback.aspx</pingback:server>
      <pingback:target>https://www.request-response.com/blog/PermaLink,guid,53460959-de2e-4439-8282-19dc63c1d173.aspx</pingback:target>
      <dc:creator />
      <wfw:comment>https://www.request-response.com/blog/CommentView,guid,53460959-de2e-4439-8282-19dc63c1d173.aspx</wfw:comment>
      <wfw:commentRss>https://www.request-response.com/blog/SyndicationService.asmx/GetEntryCommentsRss?guid=53460959-de2e-4439-8282-19dc63c1d173</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Latest daily build of <a href="http://www.go-mono.com">Mono</a> already allows web
service proxy creation, compilation and execution. I had to manually compile the wsdl.exe
equivalent (called MonoWSDL.exe) and then do:
</p>
        <ul>
          <li>
mono MonoWSDL.exe http://www.gama-system.com/webservices/stockquotes.asmx?wsdl (outputs
StockQuotes.cs proxy) 
</li>
          <li>
mcs /r:/usr/local/lib/System.Web.Services.dll /t:library StockQuotes.cs 
</li>
          <li>
write a simple console web service client app (StockQuotesClient.cs) 
</li>
          <li>
compile it using mcs /r:StockQuotes.dll StockQuotesClient.cs 
</li>
          <li>
run it with mono StockQuotesClient.exe NASDAQ MSFT</li>
        </ul>
        <p>
What did I get?
</p>
        <p>
This:
</p>
        <p>
          <img src="http://www.request-response.com/blog/content/binary/mono3.jpg" border="0" />
        </p>
        <p>
That's sweet. But Mono can now also do it the other way around. I can generate proxies
on our platform using the standard wsdl.exe tool. Mono web services test page looks
like this:
</p>
        <p>
          <img src="http://www.request-response.com/blog/content/binary/mono4.jpg" border="0" />
        </p>
        <p>
When one adds the "?wsdl" suffix to a web service endpoint WSDL is returned as expected.
</p>
        <p>
I like it.
</p>
        <p>
          <em>[Note: </em>
          <a href="http://www.gama-system.com/webservices/stockquotes.asmx">
            <em>http://www.gama-system.com/webservices/stockquotes.asmx</em>
          </a>
          <em> is our
free stock ticker web service]</em>
        </p>
        <img width="0" height="0" src="https://www.request-response.com/blog/aggbug.ashx?id=53460959-de2e-4439-8282-19dc63c1d173" />
      </body>
      <title>Mono web services</title>
      <guid isPermaLink="false">https://www.request-response.com/blog/PermaLink,guid,53460959-de2e-4439-8282-19dc63c1d173.aspx</guid>
      <link>https://www.request-response.com/blog/PermaLink,guid,53460959-de2e-4439-8282-19dc63c1d173.aspx</link>
      <pubDate>Fri, 12 Sep 2003 23:29:49 GMT</pubDate>
      <description>&lt;p&gt;
Latest daily build of &lt;a href="http://www.go-mono.com"&gt;Mono&lt;/a&gt; already allows web
service proxy creation, compilation and execution. I had to manually compile the wsdl.exe
equivalent (called MonoWSDL.exe) and then do:
&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
mono MonoWSDL.exe http://www.gama-system.com/webservices/stockquotes.asmx?wsdl&amp;nbsp;(outputs
StockQuotes.cs proxy) 
&lt;li&gt;
mcs /r:/usr/local/lib/System.Web.Services.dll /t:library StockQuotes.cs 
&lt;li&gt;
write a simple console web service client app (StockQuotesClient.cs) 
&lt;li&gt;
compile it using mcs /r:StockQuotes.dll StockQuotesClient.cs 
&lt;li&gt;
run it with mono StockQuotesClient.exe NASDAQ MSFT&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;
What did I get?
&lt;/p&gt;
&lt;p&gt;
This:
&lt;/p&gt;
&lt;p&gt;
&lt;img src="http://www.request-response.com/blog/content/binary/mono3.jpg" border=0&gt;
&lt;/p&gt;
&lt;p&gt;
That's sweet. But Mono can now also do it the other way around. I can generate proxies
on our platform using the standard wsdl.exe tool. Mono web services test page looks
like this:
&lt;/p&gt;
&lt;p&gt;
&lt;img src="http://www.request-response.com/blog/content/binary/mono4.jpg" border=0&gt;
&lt;/p&gt;
&lt;p&gt;
When one adds the "?wsdl" suffix to a web service endpoint WSDL is returned as expected.
&lt;/p&gt;
&lt;p&gt;
I like it.
&lt;/p&gt;
&lt;p&gt;
&lt;em&gt;[Note: &lt;/em&gt;&lt;a href="http://www.gama-system.com/webservices/stockquotes.asmx"&gt;&lt;em&gt;http://www.gama-system.com/webservices/stockquotes.asmx&lt;/em&gt;&lt;/a&gt;&lt;em&gt; is&amp;nbsp;our
free stock ticker web service]&lt;/em&gt;
&lt;/p&gt;
&lt;img width="0" height="0" src="https://www.request-response.com/blog/aggbug.ashx?id=53460959-de2e-4439-8282-19dc63c1d173" /&gt;</description>
      <comments>https://www.request-response.com/blog/CommentView,guid,53460959-de2e-4439-8282-19dc63c1d173.aspx</comments>
      <category>XML</category>
      <category>Web Services</category>
      <category>Mono</category>
    </item>
    <item>
      <trackback:ping>https://www.request-response.com/blog/Trackback.aspx?guid=5dba4d21-fdcf-4b79-ba94-48f54a217652</trackback:ping>
      <pingback:server>https://www.request-response.com/blog/pingback.aspx</pingback:server>
      <pingback:target>https://www.request-response.com/blog/PermaLink,guid,5dba4d21-fdcf-4b79-ba94-48f54a217652.aspx</pingback:target>
      <dc:creator />
      <wfw:comment>https://www.request-response.com/blog/CommentView,guid,5dba4d21-fdcf-4b79-ba94-48f54a217652.aspx</wfw:comment>
      <wfw:commentRss>https://www.request-response.com/blog/SyndicationService.asmx/GetEntryCommentsRss?guid=5dba4d21-fdcf-4b79-ba94-48f54a217652</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Here's my implementation of Microsoft.com Web Services client: <a href="http://www.request-response.com/playground/mscomws">http://www.request-response.com/playground/mscomws</a>.
</p>
        <p>
It's done manually:
</p>
        <ol>
          <li>
Create SOAP Request 
</li>
          <li>
Get response 
</li>
          <li>
Scrape through response using XSLT 
</li>
          <li>
Generate HTML, using XSLT's for-each, value-of, concat, substring-before, ... 
</li>
          <li>
Insert HTML into .aspx page</li>
        </ol>
        <img width="0" height="0" src="https://www.request-response.com/blog/aggbug.ashx?id=5dba4d21-fdcf-4b79-ba94-48f54a217652" />
      </body>
      <title>Microsoft.com Web Services</title>
      <guid isPermaLink="false">https://www.request-response.com/blog/PermaLink,guid,5dba4d21-fdcf-4b79-ba94-48f54a217652.aspx</guid>
      <link>https://www.request-response.com/blog/PermaLink,guid,5dba4d21-fdcf-4b79-ba94-48f54a217652.aspx</link>
      <pubDate>Sat, 06 Sep 2003 20:13:21 GMT</pubDate>
      <description>&lt;p&gt;
Here's my implementation of Microsoft.com Web Services client: &lt;a href="http://www.request-response.com/playground/mscomws"&gt;http://www.request-response.com/playground/mscomws&lt;/a&gt;.
&lt;/p&gt;
&lt;p&gt;
It's done manually:
&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
Create SOAP Request 
&lt;li&gt;
Get response 
&lt;li&gt;
Scrape through response using XSLT 
&lt;li&gt;
Generate HTML, using XSLT's for-each, value-of, concat, substring-before, ... 
&lt;li&gt;
Insert HTML into .aspx page&lt;/li&gt;
&lt;/ol&gt;
&lt;img width="0" height="0" src="https://www.request-response.com/blog/aggbug.ashx?id=5dba4d21-fdcf-4b79-ba94-48f54a217652" /&gt;</description>
      <comments>https://www.request-response.com/blog/CommentView,guid,5dba4d21-fdcf-4b79-ba94-48f54a217652.aspx</comments>
      <category>XML</category>
      <category>Web Services</category>
    </item>
    <item>
      <trackback:ping>https://www.request-response.com/blog/Trackback.aspx?guid=bfcba64d-affc-4483-9037-595e3f5874c8</trackback:ping>
      <pingback:server>https://www.request-response.com/blog/pingback.aspx</pingback:server>
      <pingback:target>https://www.request-response.com/blog/PermaLink,guid,bfcba64d-affc-4483-9037-595e3f5874c8.aspx</pingback:target>
      <dc:creator />
      <wfw:comment>https://www.request-response.com/blog/CommentView,guid,bfcba64d-affc-4483-9037-595e3f5874c8.aspx</wfw:comment>
      <wfw:commentRss>https://www.request-response.com/blog/SyndicationService.asmx/GetEntryCommentsRss?guid=bfcba64d-affc-4483-9037-595e3f5874c8</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <body xmlns="http://www.w3.org/1999/xhtml">
          <p>
I just finished a review of a huge XML schema for the biggest mobile operator
in Slovenia. 
</p>
          <p>
By huge, I mean around 2000 lines. It takes XML Spy one second to validate an instance
document on my machine. Element nesting goes ten levels deep. 
</p>
        </body>
        <img width="0" height="0" src="https://www.request-response.com/blog/aggbug.ashx?id=bfcba64d-affc-4483-9037-595e3f5874c8" />
      </body>
      <title>XML schema review done</title>
      <guid isPermaLink="false">https://www.request-response.com/blog/PermaLink,guid,bfcba64d-affc-4483-9037-595e3f5874c8.aspx</guid>
      <link>https://www.request-response.com/blog/PermaLink,guid,bfcba64d-affc-4483-9037-595e3f5874c8.aspx</link>
      <pubDate>Wed, 06 Aug 2003 17:37:30 GMT</pubDate>
      <description>&lt;body xmlns="http://www.w3.org/1999/xhtml"&gt;
&lt;p&gt;
I just finished a review of a&amp;#160;huge XML schema for the biggest mobile operator
in Slovenia. 
&lt;/p&gt;
&lt;p&gt;
By huge, I mean around 2000 lines. It takes XML Spy one second to validate an instance
document on my machine. Element nesting goes&amp;#160;ten levels deep. 
&lt;/p&gt;
&lt;/body&gt;
&lt;img width="0" height="0" src="https://www.request-response.com/blog/aggbug.ashx?id=bfcba64d-affc-4483-9037-595e3f5874c8" /&gt;</description>
      <comments>https://www.request-response.com/blog/CommentView,guid,bfcba64d-affc-4483-9037-595e3f5874c8.aspx</comments>
      <category>Work</category>
      <category>XML</category>
    </item>
    <item>
      <trackback:ping>https://www.request-response.com/blog/Trackback.aspx?guid=0acff09b-fb3c-42d7-9d39-e28491c4cb74</trackback:ping>
      <pingback:server>https://www.request-response.com/blog/pingback.aspx</pingback:server>
      <pingback:target>https://www.request-response.com/blog/PermaLink,guid,0acff09b-fb3c-42d7-9d39-e28491c4cb74.aspx</pingback:target>
      <dc:creator />
      <wfw:comment>https://www.request-response.com/blog/CommentView,guid,0acff09b-fb3c-42d7-9d39-e28491c4cb74.aspx</wfw:comment>
      <wfw:commentRss>https://www.request-response.com/blog/SyndicationService.asmx/GetEntryCommentsRss?guid=0acff09b-fb3c-42d7-9d39-e28491c4cb74</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <body xmlns="http://www.w3.org/1999/xhtml">
          <p>
            <a href="http://msdn.microsoft.com/vstudio/productinfo/roadmap.aspx">This</a> just
came through:  <em>Finally, Whidbey will provide increased power for performing
common tasks involving the manipulation of XML. In addition to delivering increased
performance when accessing and managing XML, Whidbey will include support for XML-based
data processing using <strong>XML Query Language (XQuery)</strong>.</em></p>
          <p>
It just seems strange to me, since <a href="http://www.w3.org/TR/xquery/">XQuery</a> is
still in working draft status and will probably stay that way for quite some time. 
</p>
        </body>
        <img width="0" height="0" src="https://www.request-response.com/blog/aggbug.ashx?id=0acff09b-fb3c-42d7-9d39-e28491c4cb74" />
      </body>
      <title>XQuery in Whidbey</title>
      <guid isPermaLink="false">https://www.request-response.com/blog/PermaLink,guid,0acff09b-fb3c-42d7-9d39-e28491c4cb74.aspx</guid>
      <link>https://www.request-response.com/blog/PermaLink,guid,0acff09b-fb3c-42d7-9d39-e28491c4cb74.aspx</link>
      <pubDate>Tue, 29 Jul 2003 18:23:36 GMT</pubDate>
      <description>&lt;body xmlns="http://www.w3.org/1999/xhtml"&gt;
&lt;p&gt;
&lt;a href="http://msdn.microsoft.com/vstudio/productinfo/roadmap.aspx"&gt;This&lt;/a&gt; just
came through:&amp;#160; &lt;em&gt;Finally, Whidbey will provide increased power for performing
common tasks involving the manipulation of XML. In addition to delivering increased
performance when accessing and managing XML, Whidbey will include support for XML-based
data processing using &lt;strong&gt;XML Query Language (XQuery)&lt;/strong&gt;.&lt;/em&gt; 
&lt;/p&gt;
&lt;p&gt;
It just seems strange to me, since &lt;a href="http://www.w3.org/TR/xquery/"&gt;XQuery&lt;/a&gt; is
still in working draft status and will probably stay that way for quite some time. 
&lt;/p&gt;
&lt;/body&gt;
&lt;img width="0" height="0" src="https://www.request-response.com/blog/aggbug.ashx?id=0acff09b-fb3c-42d7-9d39-e28491c4cb74" /&gt;</description>
      <comments>https://www.request-response.com/blog/CommentView,guid,0acff09b-fb3c-42d7-9d39-e28491c4cb74.aspx</comments>
      <category>XML</category>
    </item>
    <item>
      <trackback:ping>https://www.request-response.com/blog/Trackback.aspx?guid=bbfc499e-edc5-417d-a2cb-9fe90cfc256f</trackback:ping>
      <pingback:server>https://www.request-response.com/blog/pingback.aspx</pingback:server>
      <pingback:target>https://www.request-response.com/blog/PermaLink,guid,bbfc499e-edc5-417d-a2cb-9fe90cfc256f.aspx</pingback:target>
      <dc:creator />
      <wfw:comment>https://www.request-response.com/blog/CommentView,guid,bbfc499e-edc5-417d-a2cb-9fe90cfc256f.aspx</wfw:comment>
      <wfw:commentRss>https://www.request-response.com/blog/SyndicationService.asmx/GetEntryCommentsRss?guid=bbfc499e-edc5-417d-a2cb-9fe90cfc256f</wfw:commentRss>
      <title>XPathNavigator discussions</title>
      <guid isPermaLink="false">https://www.request-response.com/blog/PermaLink,guid,bbfc499e-edc5-417d-a2cb-9fe90cfc256f.aspx</guid>
      <link>https://www.request-response.com/blog/PermaLink,guid,bbfc499e-edc5-417d-a2cb-9fe90cfc256f.aspx</link>
      <pubDate>Mon, 28 Jul 2003 08:33:44 GMT</pubDate>
      <description>&lt;body xmlns="http://www.w3.org/1999/xhtml"&gt;
&lt;p&gt;
I just had another lenghty discussion with another developer trying to convey the
benefits of XPathNavigator usage. 
&lt;/p&gt;
&lt;p&gt;
It seems to me, that Infoset-based access to SQL Server&amp;#160;data can only be done
using this: 
&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;font face="Courier New" size="2"&gt;&lt;font face="Arial"&gt;Get&amp;#160;&lt;/font&gt;&lt;font face="Courier New"&gt;DataSet&lt;/font&gt;&lt;/font&gt; 
&lt;/li&gt;
&lt;li&gt;
&lt;font size=+0&gt;&lt;font face="Arial" size="2"&gt;&lt;font face="Courier New"&gt;DataSet&lt;/font&gt; -&amp;gt; &lt;font face="Courier New"&gt;XmlDataDocument&lt;/font&gt; (constructor,&amp;#160;which
takes&amp;#160;&lt;font face="Courier New"&gt;DataSet&lt;/font&gt;, &lt;font face="Courier New"&gt;public
XmlDataDocument(DataSet)&lt;/font&gt;)&lt;/font&gt;&lt;/font&gt; 
&lt;/li&gt;
&lt;li&gt;
&lt;font size=+0&gt;&lt;font face="Arial" size="2"&gt;&lt;font face="Courier New"&gt;XmlDataDocument&lt;/font&gt; -&amp;gt; &lt;font face="Courier New"&gt;XPathNavigator&lt;/font&gt; (&lt;font face="Courier New"&gt;XmlDataDocument.CreateNavigator&lt;/font&gt;)&lt;/font&gt;&lt;/font&gt; 
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;
&lt;font face="Arial" size="2"&gt;One can also create an XmlNode instead of XPathNavigator,
but I prefer the &lt;a href="http://www.w3c.org/TR/xpath#data-model"&gt;XPath data model&lt;/a&gt;. &lt;/font&gt; 
&lt;/p&gt;
&lt;p&gt;
&lt;font face="Arial" size="2"&gt;This seems a much more scalable solution than using "FOR
XML RAW/AUTO/EXPLICIT" and populating an XmlReader with SqlCommand.ExecuteXmlReader.
"FOR XML RAW/AUTO/EXPLICIT" is slow and requires an XML&amp;#160;serialization/deserialization
pair.&lt;/font&gt; 
&lt;/p&gt;
&lt;p&gt;
&lt;font face="Arial" size="2"&gt;It's bad/wrong/sloppy, when people do that between app
tiers.&lt;/font&gt; 
&lt;/p&gt;
&lt;/body&gt;
&lt;img width="0" height="0" src="https://www.request-response.com/blog/aggbug.ashx?id=bbfc499e-edc5-417d-a2cb-9fe90cfc256f" /&gt;</description>
      <comments>https://www.request-response.com/blog/CommentView,guid,bbfc499e-edc5-417d-a2cb-9fe90cfc256f.aspx</comments>
      <category>XML</category>
    </item>
    <item>
      <trackback:ping>https://www.request-response.com/blog/Trackback.aspx?guid=0b64c982-822d-434e-b6ae-7f7df0519f82</trackback:ping>
      <pingback:server>https://www.request-response.com/blog/pingback.aspx</pingback:server>
      <pingback:target>https://www.request-response.com/blog/PermaLink,guid,0b64c982-822d-434e-b6ae-7f7df0519f82.aspx</pingback:target>
      <dc:creator />
      <wfw:comment>https://www.request-response.com/blog/CommentView,guid,0b64c982-822d-434e-b6ae-7f7df0519f82.aspx</wfw:comment>
      <wfw:commentRss>https://www.request-response.com/blog/SyndicationService.asmx/GetEntryCommentsRss?guid=0b64c982-822d-434e-b6ae-7f7df0519f82</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <body xmlns="http://www.w3.org/1999/xhtml">
          <p>
Based on <a href="http://www.request-response.com/permalink.aspx/57f09c86-34ab-4ee9-8172-205cf3ca4a3c">this</a> and <a href="http://staff.newtelligence.net/clemensv/permalink.aspx?guid=17e6df2f-48cc-4fb0-8e83-15f4bc96c330">this</a> I just
wrote a web service, which enables RSS URL lookup for web logs registered at <a href="http://uddi.microsoft.com">UDDI</a>. 
</p>
          <p>
It should be simple to integrate this into current RSS aggregators. Email me for code. 
</p>
          <p>
Web service URL: <a href="http://www.request-response.com/webservices/rssquery/rssquery.asmx">http://www.request-response.com/webservices/rssquery/rssquery.asmx</a></p>
          <p>
There are two metods. One returns an RSS URL based on UDDI service key. One returns
an RSS URL based on UDDI service name. If multiple versions of RSS feeds are found,
service looks for RSS 2.0 feed first. Then RSS 1.0, then RSS 0.9x. It returns '-1'
if no feed is found. 
</p>
          <p>
Web service does dynamic queries against Microsoft's UDDI server <a href="http://uddi.microsoft.com/inquire">inquire
API</a>. 
</p>
        </body>
        <img width="0" height="0" src="https://www.request-response.com/blog/aggbug.ashx?id=0b64c982-822d-434e-b6ae-7f7df0519f82" />
      </body>
      <title>Querying RSS URLs on UDDI</title>
      <guid isPermaLink="false">https://www.request-response.com/blog/PermaLink,guid,0b64c982-822d-434e-b6ae-7f7df0519f82.aspx</guid>
      <link>https://www.request-response.com/blog/PermaLink,guid,0b64c982-822d-434e-b6ae-7f7df0519f82.aspx</link>
      <pubDate>Thu, 24 Jul 2003 14:45:33 GMT</pubDate>
      <description>&lt;body xmlns="http://www.w3.org/1999/xhtml"&gt;
&lt;p&gt;
Based on &lt;a href="http://www.request-response.com/permalink.aspx/57f09c86-34ab-4ee9-8172-205cf3ca4a3c"&gt;this&lt;/a&gt; and &lt;a href="http://staff.newtelligence.net/clemensv/permalink.aspx?guid=17e6df2f-48cc-4fb0-8e83-15f4bc96c330"&gt;this&lt;/a&gt; I&amp;#160;just
wrote a web service, which enables RSS URL lookup for web logs registered at &lt;a href="http://uddi.microsoft.com"&gt;UDDI&lt;/a&gt;. 
&lt;/p&gt;
&lt;p&gt;
It should be simple to integrate this into current RSS aggregators. Email me for code. 
&lt;/p&gt;
&lt;p&gt;
Web service URL: &lt;a href="http://www.request-response.com/webservices/rssquery/rssquery.asmx"&gt;http://www.request-response.com/webservices/rssquery/rssquery.asmx&lt;/a&gt; 
&lt;/p&gt;
&lt;p&gt;
There are two metods. One returns an RSS URL based on UDDI service key. One returns
an RSS URL based on UDDI service name. If multiple versions of RSS feeds are found,
service looks for RSS 2.0 feed first. Then RSS 1.0, then RSS 0.9x. It returns '-1'
if no feed is found. 
&lt;/p&gt;
&lt;p&gt;
Web service&amp;#160;does&amp;#160;dynamic queries&amp;#160;against Microsoft's UDDI server &lt;a href="http://uddi.microsoft.com/inquire"&gt;inquire
API&lt;/a&gt;. 
&lt;/p&gt;
&lt;/body&gt;
&lt;img width="0" height="0" src="https://www.request-response.com/blog/aggbug.ashx?id=0b64c982-822d-434e-b6ae-7f7df0519f82" /&gt;</description>
      <comments>https://www.request-response.com/blog/CommentView,guid,0b64c982-822d-434e-b6ae-7f7df0519f82.aspx</comments>
      <category>RSS</category>
      <category>Web Services</category>
      <category>XML</category>
    </item>
    <item>
      <trackback:ping>https://www.request-response.com/blog/Trackback.aspx?guid=57f09c86-34ab-4ee9-8172-205cf3ca4a3c</trackback:ping>
      <pingback:server>https://www.request-response.com/blog/pingback.aspx</pingback:server>
      <pingback:target>https://www.request-response.com/blog/PermaLink,guid,57f09c86-34ab-4ee9-8172-205cf3ca4a3c.aspx</pingback:target>
      <dc:creator />
      <wfw:comment>https://www.request-response.com/blog/CommentView,guid,57f09c86-34ab-4ee9-8172-205cf3ca4a3c.aspx</wfw:comment>
      <wfw:commentRss>https://www.request-response.com/blog/SyndicationService.asmx/GetEntryCommentsRss?guid=57f09c86-34ab-4ee9-8172-205cf3ca4a3c</wfw:commentRss>
      <slash:comments>1</slash:comments>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <body xmlns="http://www.w3.org/1999/xhtml">
          <p>
I just updated <a href="http://uddi.microsoft.com/search/frames.aspx?frames=true&amp;search=75f9c6aa-7924-4ae6-ae34-9891aa2d04df">our
UDDI profile</a>, which until now included only web services that we provide to general
public. Now it includes my personal web log as a service linked to RSS 2.0 tModel. 
</p>
          <p>
            <a href="http://staff.newtelligence.net/clemensv/">Clemens</a>
            <a href="http://staff.newtelligence.net/clemensv/permalink.aspx?guid=17e6df2f-48cc-4fb0-8e83-15f4bc96c330">implemented</a> an <a href="http://staff.newtelligence.net/playground/clemensv/rssinuddi/rss_in_uddi.aspx">OMPL
view</a> over this, which makes it damn simple for aggregator folks to do what seems
logical... 
</p>
          <p>
... implement UDDI lookup features, so people can change their virtual addresses
without a headache. 
</p>
        </body>
        <img width="0" height="0" src="https://www.request-response.com/blog/aggbug.ashx?id=57f09c86-34ab-4ee9-8172-205cf3ca4a3c" />
      </body>
      <title>UDDI registration</title>
      <guid isPermaLink="false">https://www.request-response.com/blog/PermaLink,guid,57f09c86-34ab-4ee9-8172-205cf3ca4a3c.aspx</guid>
      <link>https://www.request-response.com/blog/PermaLink,guid,57f09c86-34ab-4ee9-8172-205cf3ca4a3c.aspx</link>
      <pubDate>Tue, 22 Jul 2003 11:27:32 GMT</pubDate>
      <description>&lt;body xmlns="http://www.w3.org/1999/xhtml"&gt;
&lt;p&gt;
I just updated &lt;a href="http://uddi.microsoft.com/search/frames.aspx?frames=true&amp;amp;search=75f9c6aa-7924-4ae6-ae34-9891aa2d04df"&gt;our
UDDI profile&lt;/a&gt;, which until now included only web services that we provide to general
public. Now it includes my personal web log as a service linked to RSS 2.0 tModel. 
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://staff.newtelligence.net/clemensv/"&gt;Clemens&lt;/a&gt; &lt;a href="http://staff.newtelligence.net/clemensv/permalink.aspx?guid=17e6df2f-48cc-4fb0-8e83-15f4bc96c330"&gt;implemented&lt;/a&gt; an &lt;a href="http://staff.newtelligence.net/playground/clemensv/rssinuddi/rss_in_uddi.aspx"&gt;OMPL
view&lt;/a&gt; over this, which makes it damn simple for aggregator folks to do what seems
logical... 
&lt;/p&gt;
&lt;p&gt;
... implement UDDI&amp;#160;lookup features, so people can change their virtual addresses
without a headache. 
&lt;/p&gt;
&lt;/body&gt;
&lt;img width="0" height="0" src="https://www.request-response.com/blog/aggbug.ashx?id=57f09c86-34ab-4ee9-8172-205cf3ca4a3c" /&gt;</description>
      <comments>https://www.request-response.com/blog/CommentView,guid,57f09c86-34ab-4ee9-8172-205cf3ca4a3c.aspx</comments>
      <category>RSS</category>
      <category>XML</category>
    </item>
    <item>
      <trackback:ping>https://www.request-response.com/blog/Trackback.aspx?guid=f0369200-2fd3-4cb7-8cf7-180ffbd6bd04</trackback:ping>
      <pingback:server>https://www.request-response.com/blog/pingback.aspx</pingback:server>
      <pingback:target>https://www.request-response.com/blog/PermaLink,guid,f0369200-2fd3-4cb7-8cf7-180ffbd6bd04.aspx</pingback:target>
      <dc:creator />
      <wfw:comment>https://www.request-response.com/blog/CommentView,guid,f0369200-2fd3-4cb7-8cf7-180ffbd6bd04.aspx</wfw:comment>
      <wfw:commentRss>https://www.request-response.com/blog/SyndicationService.asmx/GetEntryCommentsRss?guid=f0369200-2fd3-4cb7-8cf7-180ffbd6bd04</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <body xmlns="http://www.w3.org/1999/xhtml">
          <p>
WSE 2.0 Tech Preview is <a href="http://microsoft.com/downloads/details.aspx?FamilyId=21FB9B9A-C5F6-4C95-87B7-FC7AB49B3EDD&amp;displaylang=en">out</a>.
Finally. 
</p>
          <p>
Got a few sleepless nights ahead and some thinking to do. Looks like we will
have an option to abandon lonely hosting of web services in IIS, which is fun to have. 
</p>
          <p>
I like options. Options make people think. 
</p>
        </body>
        <img width="0" height="0" src="https://www.request-response.com/blog/aggbug.ashx?id=f0369200-2fd3-4cb7-8cf7-180ffbd6bd04" />
      </body>
      <title>WSE 2.0 is in the building</title>
      <guid isPermaLink="false">https://www.request-response.com/blog/PermaLink,guid,f0369200-2fd3-4cb7-8cf7-180ffbd6bd04.aspx</guid>
      <link>https://www.request-response.com/blog/PermaLink,guid,f0369200-2fd3-4cb7-8cf7-180ffbd6bd04.aspx</link>
      <pubDate>Tue, 15 Jul 2003 10:12:50 GMT</pubDate>
      <description>&lt;body xmlns="http://www.w3.org/1999/xhtml"&gt;
&lt;p&gt;
WSE 2.0 Tech Preview is &lt;a href="http://microsoft.com/downloads/details.aspx?FamilyId=21FB9B9A-C5F6-4C95-87B7-FC7AB49B3EDD&amp;amp;displaylang=en"&gt;out&lt;/a&gt;.
Finally. 
&lt;/p&gt;
&lt;p&gt;
Got a&amp;#160;few sleepless nights ahead and some thinking to do. Looks like we will
have an option to abandon lonely hosting of web services in IIS, which is fun to have. 
&lt;/p&gt;
&lt;p&gt;
I like options. Options make people think. 
&lt;/p&gt;
&lt;/body&gt;
&lt;img width="0" height="0" src="https://www.request-response.com/blog/aggbug.ashx?id=f0369200-2fd3-4cb7-8cf7-180ffbd6bd04" /&gt;</description>
      <comments>https://www.request-response.com/blog/CommentView,guid,f0369200-2fd3-4cb7-8cf7-180ffbd6bd04.aspx</comments>
      <category>XML</category>
    </item>
    <item>
      <trackback:ping>https://www.request-response.com/blog/Trackback.aspx?guid=e134e9dc-140f-42b5-beb4-a768a1b6e1e8</trackback:ping>
      <pingback:server>https://www.request-response.com/blog/pingback.aspx</pingback:server>
      <pingback:target>https://www.request-response.com/blog/PermaLink,guid,e134e9dc-140f-42b5-beb4-a768a1b6e1e8.aspx</pingback:target>
      <dc:creator />
      <wfw:comment>https://www.request-response.com/blog/CommentView,guid,e134e9dc-140f-42b5-beb4-a768a1b6e1e8.aspx</wfw:comment>
      <wfw:commentRss>https://www.request-response.com/blog/SyndicationService.asmx/GetEntryCommentsRss?guid=e134e9dc-140f-42b5-beb4-a768a1b6e1e8</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <body xmlns="http://www.w3.org/1999/xhtml">
          <p>
SOAP 1.2 is a <a href="http://www.w3.org/Consortium/Process-20010719/tr.html#RecsW3C">Recommendation</a>.
Definitely <a href="http://www.w3c.org/2003/06/soap12-pressrelease.html.en">newsworthy</a>. 
</p>
          <p>
Go fetch: <a href="http://www.w3c.org/TR/2003/REC-soap12-part0-20030624/">Part 0:
Primer</a>, <a href="http://www.w3.org/TR/2003/REC-soap12-part1-20030624/">Part1:
Messaging framework</a>, <a href="http://www.w3.org/TR/2003/REC-soap12-part2-20030624/">Part
2: Adjuncts</a>, <a href="http://www.w3c.org/TR/2003/REC-soap12-testcollection-20030624/">Specification
assertions and test collection</a>. 
</p>
        </body>
        <img width="0" height="0" src="https://www.request-response.com/blog/aggbug.ashx?id=e134e9dc-140f-42b5-beb4-a768a1b6e1e8" />
      </body>
      <title>Hell just froze over</title>
      <guid isPermaLink="false">https://www.request-response.com/blog/PermaLink,guid,e134e9dc-140f-42b5-beb4-a768a1b6e1e8.aspx</guid>
      <link>https://www.request-response.com/blog/PermaLink,guid,e134e9dc-140f-42b5-beb4-a768a1b6e1e8.aspx</link>
      <pubDate>Tue, 24 Jun 2003 18:29:45 GMT</pubDate>
      <description>&lt;body xmlns="http://www.w3.org/1999/xhtml"&gt;
&lt;p&gt;
SOAP 1.2 is a &lt;a href="http://www.w3.org/Consortium/Process-20010719/tr.html#RecsW3C"&gt;Recommendation&lt;/a&gt;.
Definitely &lt;a href="http://www.w3c.org/2003/06/soap12-pressrelease.html.en"&gt;newsworthy&lt;/a&gt;. 
&lt;/p&gt;
&lt;p&gt;
Go fetch: &lt;a href="http://www.w3c.org/TR/2003/REC-soap12-part0-20030624/"&gt;Part 0:
Primer&lt;/a&gt;, &lt;a href="http://www.w3.org/TR/2003/REC-soap12-part1-20030624/"&gt;Part1:
Messaging framework&lt;/a&gt;, &lt;a href="http://www.w3.org/TR/2003/REC-soap12-part2-20030624/"&gt;Part
2: Adjuncts&lt;/a&gt;, &lt;a href="http://www.w3c.org/TR/2003/REC-soap12-testcollection-20030624/"&gt;Specification
assertions and test collection&lt;/a&gt;. 
&lt;/p&gt;
&lt;/body&gt;
&lt;img width="0" height="0" src="https://www.request-response.com/blog/aggbug.ashx?id=e134e9dc-140f-42b5-beb4-a768a1b6e1e8" /&gt;</description>
      <comments>https://www.request-response.com/blog/CommentView,guid,e134e9dc-140f-42b5-beb4-a768a1b6e1e8.aspx</comments>
      <category>XML</category>
    </item>
    <item>
      <trackback:ping>https://www.request-response.com/blog/Trackback.aspx?guid=109493c0-c965-40d8-84de-a7de01f3921f</trackback:ping>
      <pingback:server>https://www.request-response.com/blog/pingback.aspx</pingback:server>
      <pingback:target>https://www.request-response.com/blog/PermaLink,guid,109493c0-c965-40d8-84de-a7de01f3921f.aspx</pingback:target>
      <dc:creator />
      <wfw:comment>https://www.request-response.com/blog/CommentView,guid,109493c0-c965-40d8-84de-a7de01f3921f.aspx</wfw:comment>
      <wfw:commentRss>https://www.request-response.com/blog/SyndicationService.asmx/GetEntryCommentsRss?guid=109493c0-c965-40d8-84de-a7de01f3921f</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <body xmlns="http://www.w3.org/1999/xhtml">
          <p>
What seemed to be no obstacle at all is turning out to complicate my architectural
designs lately. 
</p>
          <p>
Microsoft Message Queuing (MSMQ) has this strange limitation (<em>at least</em> for
year 2003) which prevents you to have messages longer than 4MB. Since most of .NET
architects are dumping object instances into MSMQ, which get serialized into XML,
we all have a problem with binary data. The problem lies in binary XML serialization,
 XML Schema and its <a href="http://www.w3.org/TR/xmlschema-2/#base64Binary">base64Binary</a> datatype,
which is used in encoding. We do not get 4MB, but ~3MB message content limitation,
due to a well known 1.333 factor of base64 encoding. 
</p>
          <p>
Architectural design is now vastly different, since I have to split the binary documents,
while allowing them to be linked appropriately with their parent messages. And since
I'm building a document management system which will push .doc, .xls and friends on
a MSMQ stack, 4MB is often not enough. 
</p>
        </body>
        <img width="0" height="0" src="https://www.request-response.com/blog/aggbug.ashx?id=109493c0-c965-40d8-84de-a7de01f3921f" />
      </body>
      <title>MSMQ limitations</title>
      <guid isPermaLink="false">https://www.request-response.com/blog/PermaLink,guid,109493c0-c965-40d8-84de-a7de01f3921f.aspx</guid>
      <link>https://www.request-response.com/blog/PermaLink,guid,109493c0-c965-40d8-84de-a7de01f3921f.aspx</link>
      <pubDate>Tue, 24 Jun 2003 14:17:59 GMT</pubDate>
      <description>&lt;body xmlns="http://www.w3.org/1999/xhtml"&gt;
&lt;p&gt;
What seemed to be no obstacle at all is turning out to complicate my architectural
designs lately. 
&lt;/p&gt;
&lt;p&gt;
Microsoft Message Queuing (MSMQ) has this strange limitation (&lt;em&gt;at least&lt;/em&gt; for
year 2003) which prevents you to have messages longer than 4MB. Since most of .NET
architects are dumping object instances into MSMQ, which get serialized into XML,
we all have a problem with binary data. The problem lies in binary XML serialization,
&amp;#160;XML Schema&amp;#160;and its &lt;a href="http://www.w3.org/TR/xmlschema-2/#base64Binary"&gt;base64Binary&lt;/a&gt;&amp;#160;datatype,
which is used in encoding. We do not get 4MB, but ~3MB message content limitation,
due to a well known 1.333 factor of base64 encoding. 
&lt;/p&gt;
&lt;p&gt;
Architectural design is now vastly different, since I have to split the binary documents,
while allowing them to be linked appropriately with their parent messages. And since
I'm building a document management system which will push .doc, .xls and friends on
a MSMQ stack, 4MB is often not enough. 
&lt;/p&gt;
&lt;/body&gt;
&lt;img width="0" height="0" src="https://www.request-response.com/blog/aggbug.ashx?id=109493c0-c965-40d8-84de-a7de01f3921f" /&gt;</description>
      <comments>https://www.request-response.com/blog/CommentView,guid,109493c0-c965-40d8-84de-a7de01f3921f.aspx</comments>
      <category>Work</category>
      <category>XML</category>
    </item>
    <item>
      <trackback:ping>https://www.request-response.com/blog/Trackback.aspx?guid=99f5efca-a436-4699-a45c-258f86e72d32</trackback:ping>
      <pingback:server>https://www.request-response.com/blog/pingback.aspx</pingback:server>
      <pingback:target>https://www.request-response.com/blog/PermaLink,guid,99f5efca-a436-4699-a45c-258f86e72d32.aspx</pingback:target>
      <dc:creator />
      <wfw:comment>https://www.request-response.com/blog/CommentView,guid,99f5efca-a436-4699-a45c-258f86e72d32.aspx</wfw:comment>
      <wfw:commentRss>https://www.request-response.com/blog/SyndicationService.asmx/GetEntryCommentsRss?guid=99f5efca-a436-4699-a45c-258f86e72d32</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">Sure enough, it was it's 8th <a href="http://cot.uni-mb.si/ots2003/">reincarnation</a>.
It finished yesterday and I gave a talk on Wednesday. Talked about <a href="http://cot.uni-mb.si/ots2003/povzetki.html#gacnik">XML
versus CLR type system</a>, dived into XML Schema specifics and compared early programmatic
type systems with modern ones, including JVM and CLR. 
<br /><br />
Later on, I joined in and answered questions on a <a href="http://cot.uni-mb.si/ots2003/okrogla_miza.html">e-business
related roundtable</a>. The conference room was half full (~100 folks), which wasn't
that bad. See you next year Maribor guys...<img width="0" height="0" src="https://www.request-response.com/blog/aggbug.ashx?id=99f5efca-a436-4699-a45c-258f86e72d32" /></body>
      <title>OTS 2003</title>
      <guid isPermaLink="false">https://www.request-response.com/blog/PermaLink,guid,99f5efca-a436-4699-a45c-258f86e72d32.aspx</guid>
      <link>https://www.request-response.com/blog/PermaLink,guid,99f5efca-a436-4699-a45c-258f86e72d32.aspx</link>
      <pubDate>Fri, 20 Jun 2003 10:19:06 GMT</pubDate>
      <description>Sure enough, it was it's 8th &lt;a href="http://cot.uni-mb.si/ots2003/"&gt;reincarnation&lt;/a&gt;.
It finished yesterday and I gave a talk on Wednesday. Talked about &lt;a href="http://cot.uni-mb.si/ots2003/povzetki.html#gacnik"&gt;XML
versus CLR type system&lt;/a&gt;, dived into XML Schema specifics and compared early programmatic
type systems with modern ones, including JVM and CLR. 
&lt;br /&gt;
&lt;br /&gt;
Later on, I joined in and answered questions on a &lt;a href="http://cot.uni-mb.si/ots2003/okrogla_miza.html"&gt;e-business
related roundtable&lt;/a&gt;. The conference room was half full (~100 folks), which wasn't
that bad. See you next year Maribor guys...&lt;img width="0" height="0" src="https://www.request-response.com/blog/aggbug.ashx?id=99f5efca-a436-4699-a45c-258f86e72d32" /&gt;</description>
      <comments>https://www.request-response.com/blog/CommentView,guid,99f5efca-a436-4699-a45c-258f86e72d32.aspx</comments>
      <category>XML</category>
      <category>Work</category>
    </item>
  </channel>
</rss>