<feed xmlns="http://www.w3.org/2005/Atom" xmlns:foaf="http://xmlns.com/foaf/0.1/"><title>norman.walsh.name: Comments on /2004/01/29/trainwreck</title><link rel="alternate" type="text/html" href="http://norman.walsh.name/2004/01/29/trainwreck"/><id>http://norman.walsh.name/2004/01/29/trainwreck/comments.atom</id><updated>2012-02-13T08:39:33.612957Z</updated><entry><title>Comment 1 on /2004/01/29/trainwreck</title><link rel="alternate" type="text/html" href="http://norman.walsh.name/2004/01/29/trainwreck#comment0001"/><id>http://norman.walsh.name/2010/09/25/oauth#comment0001</id><published>2004-01-29T19:15:03Z</published><updated>2004-01-29T19:15:03Z</updated><author><name>Bill Humphries</name><foaf:mbox_sha1sum>da39a3ee5e6b4b0d3255bfef95601890afd80709</foaf:mbox_sha1sum></author><content type="xhtml"><div xmlns="http://www.w3.org/1999/xhtml">
    <p>Yet another reason to avoid XSD like the plague. XML development shouldn't require one to buy a thousand-dollar IDE to understand what you're doing.</p>
  </div></content></entry><entry><title>Comment 2 on /2004/01/29/trainwreck</title><link rel="alternate" type="text/html" href="http://norman.walsh.name/2004/01/29/trainwreck#comment0002"/><id>http://norman.walsh.name/2010/09/25/oauth#comment0002</id><published>2004-01-29T23:10:15Z</published><updated>2004-01-29T23:10:15Z</updated><author><name>Bob DuCharme</name><foaf:mbox_sha1sum>da39a3ee5e6b4b0d3255bfef95601890afd80709</foaf:mbox_sha1sum></author><content type="xhtml"><div xmlns="http://www.w3.org/1999/xhtml">
    <p>"Avoid like the plague" is a bit much. I consider it a reason to discourage the use of XSD outside of the domains it was optimized for: XMLization of transaction-oriented data and/or data from relational databases. (This is a bit of a simplification, but only a bit.) I don't have much problem with</p>
<p>&amp;lt;xs:element name="quantity" type="xs:integer"/&amp;gt;</p>
<p>but when dealing with data more oriented toward publishable content, then, as Norm shows, XSD gets messier and messier.</p>
<p>I've been thinking for a while that a distinction between publishable content and transaction-oriented data is more useful than the traditional distinction in the XML world between "documents" and "data", since all well-formed XML is both.</p>
  </div></content></entry><entry><title>Comment 3 on /2004/01/29/trainwreck</title><link rel="alternate" type="text/html" href="http://norman.walsh.name/2004/01/29/trainwreck#comment0003"/><id>http://norman.walsh.name/2010/09/25/oauth#comment0003</id><published>2004-01-30T03:20:58Z</published><updated>2004-01-30T03:20:58Z</updated><author><name>Norman  Walsh</name><foaf:mbox_sha1sum>da39a3ee5e6b4b0d3255bfef95601890afd80709</foaf:mbox_sha1sum></author><content type="xhtml"><div xmlns="http://www.w3.org/1999/xhtml">
    <p>I think it's definitely a question of choosing the right tool for the job, and that means known the strengths and limitations of your tools.</p>
<p>But your example strikes me as a little off-topic, Bob. It was never my intent to suggest it was bad to declare types. The tricky bit occurs when someone says:</p>
<p>&amp;lt;quantity xsi:type="byte"&amp;gt;34&amp;lt;/quantity&amp;gt;</p>
<p>in a document. And even then, it's probably harmless because byte is a restriction of integer. In fact, for simple types it may not matter very much (though I haven't thought through all the possibilities).</p>
  </div></content></entry><entry><title>Comment 4 on /2004/01/29/trainwreck</title><link rel="alternate" type="text/html" href="http://norman.walsh.name/2004/01/29/trainwreck#comment0004"/><id>http://norman.walsh.name/2010/09/25/oauth#comment0004</id><published>2004-06-18T14:35:34Z</published><updated>2004-06-18T14:35:34Z</updated><author><name>Jim Brosnan</name><foaf:mbox_sha1sum>da39a3ee5e6b4b0d3255bfef95601890afd80709</foaf:mbox_sha1sum></author><content type="xhtml"><div xmlns="http://www.w3.org/1999/xhtml">
    <p>As a newbie I developed a lot of applications using xml as a command language. I am particulary fond of things like:</p>
<p>&amp;lt;cmd type="delete" item-id="2342"/&amp;gt;
&amp;lt;cmd type="insert"/&amp;gt;
&amp;lt;cmd type="edit" item-id="2342"/&amp;gt;</p>
<p>Is this a difficult structure to document using xsd?</p>
<p>I can not figure it out, but this article seemed to be close to the topic of elements with the same name but with a differrentating "type" attribute....</p>
  </div></content></entry><entry><title>Comment 5 on /2004/01/29/trainwreck</title><link rel="alternate" type="text/html" href="http://norman.walsh.name/2004/01/29/trainwreck#comment0005"/><id>http://norman.walsh.name/2010/09/25/oauth#comment0005</id><published>2004-06-18T14:50:29Z</published><updated>2004-06-18T14:50:29Z</updated><author><name>Norman Walsh</name><foaf:mbox_sha1sum>da39a3ee5e6b4b0d3255bfef95601890afd80709</foaf:mbox_sha1sum></author><content type="xhtml"><div xmlns="http://www.w3.org/1999/xhtml">
    <p>It's difficult as in impossible to have an XSD with different content models for the different 'cmd' elements based on the value of the type attribute.</p>
<p>DTDs can't do it either, but RELAX NG can.</p>
  </div></content></entry></feed>

