<?xml version="1.0" encoding="UTF-8"?><!-- generator="wordpress.com" -->
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	>

<channel>
	<title>dtd &amp;laquo; WordPress.com Tag Feed</title>
	<link>http://wordpress.com/tag/dtd/</link>
	<description>Feed of posts on WordPress.com tagged "dtd"</description>
	<pubDate>Mon, 07 Jul 2008 06:17:59 +0000</pubDate>

	<generator>http://wordpress.com/tags/</generator>
	<language>en</language>

<item>
<title><![CDATA[DTD Tutorial]]></title>
<link>http://sadi02.wordpress.com/?p=60</link>
<pubDate>Sun, 06 Jul 2008 11:34:00 +0000</pubDate>
<dc:creator>sadi02</dc:creator>
<guid>http://sadi02.wordpress.com/?p=60</guid>
<description><![CDATA[The purpose of a DTD is to define the legal building blocks of an XML document. It defines the docum]]></description>
<content:encoded><![CDATA[<p style="line-height:15.9pt;"><span style="font-size:11pt;color:#000000;">The purpose of a DTD is to define the legal building blocks of an XML document. It defines the document structure with a list of legal elements. A DTD can be declared inline in your XML document, or as an external reference.</span></p>
<div class="MsoNormal" style="line-height:15.9pt;text-align:center;margin:0 0 10pt;"><span style="color:#000000;"><br />
<hr size="2" noshade="65535" /></span></div>
<h2 style="line-height:15.9pt;margin:10pt 0 0;"><span style="font-size:11pt;color:#cc0000;">Why use a DTD? </span></h2>
<p style="line-height:15.9pt;"><span style="font-size:11pt;color:#000000;">XML provides an application independent way of sharing data. With a DTD, independent groups of people can agree to use a common DTD for interchanging data. Your application can use a standard DTD to verify that data that you receive from the outside world is valid. You can also use a DTD to verify your own data. </span></p>
<div class="MsoNormal" style="line-height:15.9pt;text-align:center;margin:0 0 10pt;"><span style="color:#000000;"><br />
<hr size="2" noshade="65535" /></span></div>
<p class="MsoNormal" style="line-height:15.9pt;margin:0 0 10pt;"><span style="font-size:small;"><span style="font-family:Calibri;"><span style="color:#000000;">There are two type of DTD</span></span></span></p>
<ol type="1">
<li class="MsoNormal"><span><span style="font-size:small;">Intenal DTD</span></span></li>
<li class="MsoNormal"><span><span style="font-size:small;">External DTD</span></span></li>
</ol>
<h2 style="line-height:15.9pt;margin:10pt 0 0;"><span style="font-size:11pt;color:#cc0000;">Internal DTD</span></h2>
<p style="line-height:15.9pt;"><span style="font-size:11pt;color:#000000;">This is an XML document with a Document Type Definition: </span></p>
<table class="MsoNormalTable" style="background:#efe7d6;" border="1" cellpadding="0">
<tbody>
<tr>
<td style="background:none transparent scroll repeat 0 0;border:#f0f0f0;padding:0.75pt;">
<pre style="margin:0 13.4pt;"><span style="font-size:11pt;">&#60;?xml version="1.0"?&#62;</span></pre>
<pre style="margin:0 13.4pt;"><span style="font-size:11pt;">&#60;!DOCTYPE note [</span></pre>
<pre style="margin:0 13.4pt;"><span style="font-size:11pt;"><span>  </span>&#60;!ELEMENT note<span>    </span>(to,from,heading,body)&#62;</span></pre>
<pre style="margin:0 13.4pt;"><span style="font-size:11pt;"><span>  </span>&#60;!ELEMENT to<span>      </span>(#PCDATA)&#62;</span></pre>
<pre style="margin:0 13.4pt;"><span style="font-size:11pt;"><span>  </span>&#60;!ELEMENT from<span>    </span>(#PCDATA)&#62;</span></pre>
<pre style="margin:0 13.4pt;"><span style="font-size:11pt;"><span>  </span>&#60;!ELEMENT heading (#PCDATA)&#62;</span></pre>
<pre style="margin:0 13.4pt;"><span style="font-size:11pt;"><span>  </span>&#60;!ELEMENT body<span>    </span>(#PCDATA)&#62;</span></pre>
<pre style="margin:0 13.4pt;"><span style="font-size:11pt;">]&#62;</span></pre>
<pre style="margin:0 13.4pt;"><span style="font-size:11pt;">&#60;note&#62;</span></pre>
<pre style="margin:0 13.4pt;"><span style="font-size:11pt;">&#60;to&#62;Tove&#60;/to&#62;</span></pre>
<pre style="margin:0 13.4pt;"><span style="font-size:11pt;">&#60;from&#62;Jani&#60;/from&#62;</span></pre>
<pre style="margin:0 13.4pt;"><span style="font-size:11pt;">&#60;heading&#62;Reminder&#60;/heading&#62;</span></pre>
<pre style="margin:0 13.4pt;"><span style="font-size:11pt;">&#60;body&#62;Don't forget me this weekend!&#60;/body&#62;</span></pre>
<pre style="margin:0 13.4pt;"><span style="font-size:11pt;">&#60;/note&#62; </span></pre>
</td>
</tr>
</tbody>
</table>
<p style="line-height:15.9pt;"><span style="font-size:11pt;color:#000000;">The DTD is interpreted like this:<br />
<strong>!ELEMENT note</strong> (in line 2) defines the element "note" as having four elements: "to,from,heading,body".<br />
<strong>!ELEMENT to</strong> (in line 3) defines the "to" element  to be of the type "CDATA".<br />
<strong>!ELEMENT from</strong> (in line 4) defines the "from" element to be of the type "CDATA"<br />
and so on.....</span></p>
<div class="MsoNormal" style="line-height:15.9pt;text-align:center;margin:0 0 10pt;"><span style="color:#000000;"><br />
<hr size="2" noshade="65535" /></span></div>
<h2 style="line-height:15.9pt;margin:10pt 0 0;"><span style="font-size:11pt;color:#cc0000;">External DTD</span></h2>
<p style="line-height:15.9pt;"><span style="font-size:11pt;color:#000000;">This is the same XML document with an external DTD: </span></p>
<table class="MsoNormalTable" style="background:#efe7d6;" border="1" cellpadding="0">
<tbody>
<tr>
<td style="background:none transparent scroll repeat 0 0;border:#f0f0f0;padding:0.75pt;">
<pre style="margin:0 13.4pt;"><span style="font-size:11pt;">&#60;?xml version="1.0"?&#62;</span></pre>
<pre style="margin:0 13.4pt;"><span style="font-size:11pt;">&#60;!DOCTYPE note SYSTEM "note.dtd"&#62;</span></pre>
<pre style="margin:0 13.4pt;"><span style="font-size:11pt;">&#60;note&#62;</span></pre>
<pre style="margin:0 13.4pt;"><span style="font-size:11pt;">&#60;to&#62;Tove&#60;/to&#62;</span></pre>
<pre style="margin:0 13.4pt;"><span style="font-size:11pt;">&#60;from&#62;Jani&#60;/from&#62;</span></pre>
<pre style="margin:0 13.4pt;"><span style="font-size:11pt;">&#60;heading&#62;Reminder&#60;/heading&#62;</span></pre>
<pre style="margin:0 13.4pt;"><span style="font-size:11pt;">&#60;body&#62;Don't forget me this weekend!&#60;/body&#62;</span></pre>
<pre style="margin:0 13.4pt;"><span style="font-size:11pt;">&#60;/note&#62; </span></pre>
</td>
</tr>
</tbody>
</table>
<p style="line-height:15.9pt;"><span style="font-size:11pt;color:#000000;">This is a copy of the file "note.dtd" containing the Document Type Definition:</span></p>
<table class="MsoNormalTable" style="background:#efe7d6;" border="1" cellpadding="0">
<tbody>
<tr>
<td style="background:none transparent scroll repeat 0 0;border:#f0f0f0;padding:0.75pt;">
<pre style="margin:0 13.4pt;"><span style="font-size:11pt;">&#60;?xml version="1.0"?&#62;</span></pre>
<pre style="margin:0 13.4pt;"><span style="font-size:11pt;">&#60;!ELEMENT note (to,from,heading,body)&#62;</span></pre>
<pre style="margin:0 13.4pt;"><span style="font-size:11pt;">&#60;!ELEMENT to (#PCDATA)&#62;</span></pre>
<pre style="margin:0 13.4pt;"><span style="font-size:11pt;">&#60;!ELEMENT from (#PCDATA)&#62;</span></pre>
<pre style="margin:0 13.4pt;"><span style="font-size:11pt;">&#60;!ELEMENT heading (#PCDATA)&#62;</span></pre>
<pre style="margin:0 13.4pt;"><span style="font-size:11pt;">&#60;!ELEMENT body (#PCDATA)&#62;</span></pre>
</td>
</tr>
</tbody>
</table>
<p class="MsoNormal" style="line-height:15.9pt;margin:0 0 10pt;"><span style="font-size:small;"><span style="font-family:Calibri;"><span style="color:#000000;"> </span></span></span></p>
<div class="MsoNormal" style="line-height:15.9pt;text-align:center;margin:0 0 10pt;"><span style="color:#000000;"><span style="font-size:small;font-family:Calibri;"><br />
<hr size="2" noshade="65535" /></span></span></div>
<h2 style="margin:10pt 0 0;"><span style="font-size:11pt;line-height:115%;"><span style="color:#4f81bd;">Declaring Attributes</span></span></h2>
<p><span style="font-size:11pt;color:#000000;">In the DTD, XML element attributes are declared with an ATTLIST declaration. An attribute declaration has the following syntax:</span></p>
<table class="MsoNormalTable" style="background:#efe7d6;" border="1" cellpadding="0">
<tbody>
<tr>
<td style="border:medium none #f0f0f0;width:100%;background-color:transparent;padding:0.75pt;" width="100%">
<pre><span style="font-size:11pt;">&#60;!ATTLIST element-name attribute-name attribute-type default-value&#62;</span></pre>
</td>
</tr>
</tbody>
</table>
<p class="MsoNormal" style="margin:0 0 10pt;"><span style="color:#000000;"><br />
<span style="font-size:small;">As you can see from the syntax above, the ATTLIST declaration defines the element which can have the attribute, the name of the attribute, the type of the attribute, and the default attribute value. </span></span></p>
<p><span style="font-size:11pt;color:#000000;">The <strong>attribute-type</strong> can have the following values:</span></p>
<table class="MsoNormalTable" style="background:#efe7d6;" border="1" cellpadding="0">
<tbody>
<tr>
<td style="border:medium none #f0f0f0;width:25%;background-color:transparent;padding:0.75pt;" width="25%">
<p class="MsoNormal" style="margin:0 0 10pt;"><strong><span><span style="font-size:small;">Value</span></span></strong></p>
</td>
<td style="border:medium none #f0f0f0;width:75%;background-color:transparent;padding:0.75pt;" width="75%">
<p class="MsoNormal" style="margin:0 0 10pt;"><strong><span><span style="font-size:small;">Explanation</span></span></strong></p>
</td>
</tr>
<tr>
<td style="background-color:transparent;border:#f0f0f0;padding:0.75pt;">
<pre><span style="font-size:11pt;">CDATA</span></pre>
</td>
<td style="background-color:transparent;border:#f0f0f0;padding:0.75pt;">
<pre><span style="font-size:11pt;">The value is character data</span></pre>
</td>
</tr>
<tr>
<td style="background-color:transparent;border:#f0f0f0;padding:0.75pt;">
<pre><span style="font-size:11pt;">(eval&#124;eval&#124;..)</span></pre>
</td>
<td style="background-color:transparent;border:#f0f0f0;padding:0.75pt;">
<pre><span style="font-size:11pt;">The value must be an enumerated value</span></pre>
</td>
</tr>
<tr>
<td style="background-color:transparent;border:#f0f0f0;padding:0.75pt;">
<pre><span style="font-size:11pt;">ID</span></pre>
</td>
<td style="background-color:transparent;border:#f0f0f0;padding:0.75pt;">
<pre><span style="font-size:11pt;">The value is an unique id </span></pre>
</td>
</tr>
<tr>
<td style="background-color:transparent;border:#f0f0f0;padding:0.75pt;">
<pre><span style="font-size:11pt;">IDREF</span></pre>
</td>
<td style="background-color:transparent;border:#f0f0f0;padding:0.75pt;">
<pre><span style="font-size:11pt;">The value is the id of another element</span></pre>
</td>
</tr>
<tr>
<td style="background-color:transparent;border:#f0f0f0;padding:0.75pt;">
<pre><span style="font-size:11pt;">IDREFS</span></pre>
</td>
<td style="background-color:transparent;border:#f0f0f0;padding:0.75pt;">
<pre><span style="font-size:11pt;">The value is a list of other ids</span></pre>
</td>
</tr>
<tr>
<td style="background-color:transparent;border:#f0f0f0;padding:0.75pt;">
<pre><span style="font-size:11pt;">NMTOKEN</span></pre>
</td>
<td style="background-color:transparent;border:#f0f0f0;padding:0.75pt;">
<pre><span style="font-size:11pt;">The value is a valid XML name</span></pre>
</td>
</tr>
<tr>
<td style="background-color:transparent;border:#f0f0f0;padding:0.75pt;">
<pre><span style="font-size:11pt;">NMTOKENS</span></pre>
</td>
<td style="background-color:transparent;border:#f0f0f0;padding:0.75pt;">
<pre><span style="font-size:11pt;">The value is a list of valid XML names</span></pre>
</td>
</tr>
<tr>
<td style="background-color:transparent;border:#f0f0f0;padding:0.75pt;">
<pre><span style="font-size:11pt;">ENTITY</span></pre>
</td>
<td style="background-color:transparent;border:#f0f0f0;padding:0.75pt;">
<pre><span style="font-size:11pt;">The value is an entity </span></pre>
</td>
</tr>
<tr>
<td style="background-color:transparent;border:#f0f0f0;padding:0.75pt;">
<pre><span style="font-size:11pt;">ENTITIES</span></pre>
</td>
<td style="background-color:transparent;border:#f0f0f0;padding:0.75pt;">
<pre><span style="font-size:11pt;">The value is a list of entities</span></pre>
</td>
</tr>
<tr>
<td style="background-color:transparent;border:#f0f0f0;padding:0.75pt;">
<pre><span style="font-size:11pt;">NOTATION</span></pre>
</td>
<td style="background-color:transparent;border:#f0f0f0;padding:0.75pt;">
<pre><span style="font-size:11pt;">The value is a name of a notation</span></pre>
</td>
</tr>
<tr>
<td style="background-color:transparent;border:#f0f0f0;padding:0.75pt;">
<pre><span style="font-size:11pt;">xml:</span></pre>
</td>
<td style="background-color:transparent;border:#f0f0f0;padding:0.75pt;">
<pre><span style="font-size:11pt;">The value is predefined</span></pre>
</td>
</tr>
</tbody>
</table>
<p><span style="font-size:11pt;color:#000000;">The <strong>attribute-default-value</strong> can have the following values:</span></p>
<table class="MsoNormalTable" style="background:#efe7d6;" border="1" cellpadding="0">
<tbody>
<tr>
<td style="border:medium none #f0f0f0;width:25%;background-color:transparent;padding:0.75pt;" width="25%">
<p class="MsoNormal" style="margin:0 0 10pt;"><strong><span><span style="font-size:small;">Value</span></span></strong></p>
</td>
<td style="border:medium none #f0f0f0;width:75%;background-color:transparent;padding:0.75pt;" width="75%">
<p class="MsoNormal" style="margin:0 0 10pt;"><strong><span><span style="font-size:small;">Explanation</span></span></strong></p>
</td>
</tr>
<tr>
<td style="background-color:transparent;border:#f0f0f0;padding:0.75pt;">
<pre><span style="font-size:11pt;">#DEFAULT value</span></pre>
</td>
<td style="background-color:transparent;border:#f0f0f0;padding:0.75pt;">
<pre><span style="font-size:11pt;">The attribute has a default value</span></pre>
</td>
</tr>
<tr>
<td style="background-color:transparent;border:#f0f0f0;padding:0.75pt;">
<pre><span style="font-size:11pt;">#REQUIRED</span></pre>
</td>
<td style="background-color:transparent;border:#f0f0f0;padding:0.75pt;">
<pre><span style="font-size:11pt;">The attribute value must be included in the element</span></pre>
</td>
</tr>
<tr>
<td style="background-color:transparent;border:#f0f0f0;padding:0.75pt;">
<pre><span style="font-size:11pt;">#IMPLIED</span></pre>
</td>
<td style="background-color:transparent;border:#f0f0f0;padding:0.75pt;">
<pre><span style="font-size:11pt;">The attribute does not have to be included</span></pre>
</td>
</tr>
<tr>
<td style="background-color:transparent;border:#f0f0f0;padding:0.75pt;">
<pre><span style="font-size:11pt;">#FIXED value</span></pre>
</td>
<td style="background-color:transparent;border:#f0f0f0;padding:0.75pt;">
<pre><span style="font-size:11pt;">The attribute value is fixed</span></pre>
</td>
</tr>
</tbody>
</table>
<p class="MsoNormal" style="margin:0 0 10pt;"><span style="color:#000000;"><span style="font-size:small;"> </span></span></p>
<div class="MsoNormal" style="text-align:center;margin:0 0 10pt;"><span style="color:#000000;"><span style="font-size:small;"><br />
<hr size="2" noshade="65535" /></span></span></div>
<h2 style="margin:10pt 0 0;"><span style="font-size:11pt;line-height:115%;"><span style="color:#4f81bd;">Declaring an Element</span></span></h2>
<p><span style="font-size:11pt;color:#000000;">In the DTD, XML elements are declared with an element declaration. An element declaration has the following syntax:</span></p>
<table class="MsoNormalTable" style="background:#efe7d6;" border="1" cellpadding="0">
<tbody>
<tr>
<td style="border:medium none #f0f0f0;width:100%;background-color:transparent;padding:0.75pt;" width="100%">
<pre><span style="font-size:11pt;">&#60;!ELEMENT element-name (element-content)&#62;</span></pre>
</td>
</tr>
</tbody>
</table>
<p class="MsoNormal" style="margin:0 0 10pt;"><span style="color:#000000;"><span style="font-size:small;"> </span></span></p>
<div class="MsoNormal" style="text-align:center;margin:0 0 10pt;"><span style="color:#000000;"><span style="font-size:small;"><br />
<hr size="2" noshade="65535" /></span></span></div>
<h2 style="margin:10pt 0 0;"><span style="font-size:11pt;line-height:115%;"><span style="color:#4f81bd;">Empty elements</span></span></h2>
<p><span style="font-size:11pt;color:#000000;">Empty elements are declared with the keyword EMPTY inside the parentheses:</span></p>
<table class="MsoNormalTable" style="background:#efe7d6;" border="1" cellpadding="0">
<tbody>
<tr>
<td style="border:medium none #f0f0f0;width:100%;background-color:transparent;padding:0.75pt;" width="100%">
<pre><span style="font-size:11pt;">&#60;!ELEMENT element-name (EMPTY)&#62;</span>
<span style="font-size:11pt;"> </span>
<span style="font-size:11pt;">example:</span>
<span style="font-size:11pt;">&#60;!ELEMENT img (EMPTY)&#62;</span></pre>
</td>
</tr>
</tbody>
</table>
<p class="MsoNormal" style="margin:0 0 10pt;"><span style="color:#000000;"><span style="font-size:small;"> </span></span></p>
<div class="MsoNormal" style="text-align:center;margin:0 0 10pt;"><span style="color:#000000;"><span style="font-size:small;"><br />
<hr size="2" noshade="65535" /></span></span></div>
<h2 style="margin:10pt 0 0;"><span style="font-size:11pt;line-height:115%;"><span style="color:#4f81bd;">Elements with data</span></span></h2>
<p><span style="font-size:11pt;color:#000000;">Elements with data are declared with the data type inside parentheses:</span></p>
<table class="MsoNormalTable" style="background:#efe7d6;" border="1" cellpadding="0">
<tbody>
<tr>
<td style="border:medium none #f0f0f0;width:100%;background-color:transparent;padding:0.75pt;" width="100%">
<pre><span style="font-size:11pt;">&#60;!ELEMENT element-name (#CDATA)&#62;</span>
<span style="font-size:11pt;">or</span>
<span style="font-size:11pt;">&#60;!ELEMENT element-name (#PCDATA)&#62;</span>
<span style="font-size:11pt;">or</span>
<span style="font-size:11pt;">&#60;!ELEMENT element-name (ANY)&#62;</span>
<span style="font-size:11pt;">example:</span>
<span style="font-size:11pt;">&#60;!ELEMENT note (#PCDATA)&#62;</span></pre>
</td>
</tr>
</tbody>
</table>
<p class="MsoNormal" style="margin:0 0 10pt;"><span style="color:#000000;"><br />
<span style="font-size:small;">#CDATA means the element contains character data that is not supposed to be parsed by a parser.<br />
#PCDATA means that the element contains data that IS going to be parsed by a parser.<br />
The keyword ANY declares an element with any content. </span></span></p>
<p><span style="font-size:11pt;color:#000000;">If a #PCDATA section contains elements, these elements must also be declared.</span></p>
<div class="MsoNormal" style="text-align:center;margin:0 0 10pt;"><span style="color:#000000;"><br />
<hr size="2" noshade="65535" /></span></div>
<h2 style="margin:10pt 0 0;"><span style="font-size:11pt;line-height:115%;"><span style="color:#4f81bd;">Elements with children (sequences)</span></span></h2>
<p><span style="font-size:11pt;color:#000000;">Elements with one or more children are defined with the name of the children elements inside the parentheses:</span></p>
<table class="MsoNormalTable" style="background:#efe7d6;" border="1" cellpadding="0">
<tbody>
<tr>
<td style="border:medium none #f0f0f0;width:100%;background-color:transparent;padding:0.75pt;" width="100%">
<pre><span style="font-size:11pt;">&#60;!ELEMENT element-name (child-element-name)&#62;</span>
<span style="font-size:11pt;">or</span>
<span style="font-size:11pt;">&#60;!ELEMENT element-name (child-element-name,child-element-name,.....)&#62;</span>
<span style="font-size:11pt;">example:</span>
<span style="font-size:11pt;">&#60;!ELEMENT note (to,from,heading,body)&#62;</span></pre>
</td>
</tr>
</tbody>
</table>
<p class="MsoNormal" style="margin:0 0 10pt;"><span style="color:#000000;"><br />
<span style="font-size:small;">When children are declared in a sequence separated by commas, the children must appear in the same sequence in the document. In a full declaration, the children must also be declared, and the children can also have children. The full declaration of the note document will be:</span></span></p>
<table class="MsoNormalTable" style="background:#efe7d6;" border="1" cellpadding="0">
<tbody>
<tr>
<td style="border:medium none #f0f0f0;width:100%;background-color:transparent;padding:0.75pt;" width="100%">
<pre><span style="font-size:11pt;">&#60;!ELEMENT note (to,from,heading,body)&#62;</span>
<span style="font-size:11pt;">&#60;!ELEMENT to<span>      </span>(#CDATA)&#62;</span>
<span style="font-size:11pt;">&#60;!ELEMENT from<span>    </span>(#CDATA)&#62;</span>
<span style="font-size:11pt;">&#60;!ELEMENT heading (#CDATA)&#62;</span>
<span style="font-size:11pt;">&#60;!ELEMENT body<span>    </span>(#CDATA)&#62;</span></pre>
</td>
</tr>
</tbody>
</table>
<p class="MsoNormal" style="margin:0 0 10pt;"><span style="color:#000000;"><span style="font-size:small;"> </span></span></p>
<div class="MsoNormal" style="text-align:center;margin:0 0 10pt;"><span style="color:#000000;"><span style="font-size:small;"><br />
<hr size="2" noshade="65535" /></span></span></div>
<h2 style="margin:10pt 0 0;"><span style="font-size:11pt;line-height:115%;"><span style="color:#4f81bd;">Wrapping</span></span></h2>
<p><span style="font-size:11pt;color:#000000;">If the DTD is to be included in your XML source file, it should be wrapped in a DOCTYPE definition with the following syntax:</span></p>
<table class="MsoNormalTable" style="background:#efe7d6;" border="1" cellpadding="0">
<tbody>
<tr>
<td style="border:medium none #f0f0f0;width:100%;background-color:transparent;padding:0.75pt;" width="100%">
<pre><span style="font-size:11pt;">&#60;!DOCTYPE root-element [element-declarations]&#62;</span>
<span style="font-size:11pt;">example: </span>
<span style="font-size:11pt;">&#60;?xml version="1.0"?&#62;</span>
<span style="font-size:11pt;">&#60;!DOCTYPE note [</span>
<span style="font-size:11pt;"><span>  </span>&#60;!ELEMENT note (to,from,heading,body)&#62;</span>
<span style="font-size:11pt;"><span>  </span>&#60;!ELEMENT to<span>      </span>(#CDATA)&#62;</span>
<span style="font-size:11pt;"><span>  </span>&#60;!ELEMENT from<span>    </span>(#CDATA)&#62;</span>
<span style="font-size:11pt;"><span>  </span>&#60;!ELEMENT heading (#CDATA)&#62;</span>
<span style="font-size:11pt;"><span>  </span>&#60;!ELEMENT body<span>    </span>(#CDATA)&#62;</span>
<span style="font-size:11pt;">]&#62;</span>
<span style="font-size:11pt;">&#60;note&#62;</span>
<span style="font-size:11pt;"><span>  </span>&#60;to&#62;Tove&#60;/to&#62;</span>
<span style="font-size:11pt;"><span>  </span>&#60;from&#62;Jani&#60;/from&#62;</span>
<span style="font-size:11pt;"><span>  </span>&#60;heading&#62;Reminder&#60;/heading&#62;</span>
<span style="font-size:11pt;"><span>  </span>&#60;body&#62;Don't forget me this weekend&#60;/body&#62;</span>
<span style="font-size:11pt;">&#60;/note&#62;</span></pre>
</td>
</tr>
</tbody>
</table>
<p class="MsoNormal" style="margin:0 0 10pt;"><span style="color:#000000;"><span style="font-size:small;"> </span></span></p>
<div class="MsoNormal" style="text-align:center;margin:0 0 10pt;"><span style="color:#000000;"><span style="font-size:small;"><br />
<hr size="2" noshade="65535" /></span></span></div>
<h2 style="margin:10pt 0 0;"><span style="font-size:11pt;line-height:115%;"><span style="color:#4f81bd;">Declaring only one occurrence of the same element </span></span></h2>
<table class="MsoNormalTable" style="background:#efe7d6;" border="1" cellpadding="0">
<tbody>
<tr>
<td style="border:medium none #f0f0f0;width:100%;background-color:transparent;padding:0.75pt;" width="100%">
<pre><span style="font-size:11pt;">&#60;!ELEMENT element-name (child-name)&#62;</span>
<span style="font-size:11pt;">example</span>
<span style="font-size:11pt;">&#60;!ELEMENT note (message)&#62;</span></pre>
</td>
</tr>
</tbody>
</table>
<p><span style="font-size:11pt;color:#000000;">The example declaration above declares that the child element message can only occur one time inside the note element.</span></p>
<div class="MsoNormal" style="text-align:center;margin:0 0 10pt;"><span style="color:#000000;"><br />
<hr size="2" noshade="65535" /></span></div>
<h2 style="margin:10pt 0 0;"><span style="font-size:11pt;line-height:115%;"><span style="color:#4f81bd;">Declaring minimum one occurrence of the same element</span></span></h2>
<table class="MsoNormalTable" style="background:#efe7d6;" border="1" cellpadding="0">
<tbody>
<tr>
<td style="border:medium none #f0f0f0;width:100%;background-color:transparent;padding:0.75pt;" width="100%">
<pre><span style="font-size:11pt;">&#60;!ELEMENT element-name (child-name+)&#62;</span>
<span style="font-size:11pt;">example</span>
<span style="font-size:11pt;">&#60;!ELEMENT note (message+)&#62;</span></pre>
</td>
</tr>
</tbody>
</table>
<p><span style="font-size:11pt;color:#000000;">The + sign in the example above declares that the child element message must occur one or more times inside the note element.</span></p>
<div class="MsoNormal" style="text-align:center;margin:0 0 10pt;"><span style="color:#000000;"><br />
<hr size="2" noshade="65535" /></span></div>
<h2 style="margin:10pt 0 0;"><span style="font-size:11pt;line-height:115%;"><span style="color:#4f81bd;">Declaring zero or more occurrences of the same element </span></span></h2>
<table class="MsoNormalTable" style="background:#efe7d6;" border="1" cellpadding="0">
<tbody>
<tr>
<td style="border:medium none #f0f0f0;width:100%;background-color:transparent;padding:0.75pt;" width="100%">
<pre><span style="font-size:11pt;">&#60;!ELEMENT element-name (child-name*)&#62;</span>
<span style="font-size:11pt;">example</span>
<span style="font-size:11pt;">&#60;!ELEMENT note (message*)&#62;</span></pre>
</td>
</tr>
</tbody>
</table>
<p><span style="font-size:11pt;color:#000000;">The * sign in the example above declares that the child element message can occur zero or more times inside the note element.</span></p>
<div class="MsoNormal" style="text-align:center;margin:0 0 10pt;"><span style="color:#000000;"><br />
<hr size="2" noshade="65535" /></span></div>
<h2 style="margin:10pt 0 0;"><span style="font-size:11pt;line-height:115%;"><span style="color:#4f81bd;">Declaring zero or one occurrences of the same element </span></span></h2>
<table class="MsoNormalTable" style="background:#efe7d6;" border="1" cellpadding="0">
<tbody>
<tr>
<td style="border:medium none #f0f0f0;width:100%;background-color:transparent;padding:0.75pt;" width="100%">
<pre><span style="font-size:11pt;">&#60;!ELEMENT element-name (child-name?)&#62;</span>
<span style="font-size:11pt;">example</span>
<span style="font-size:11pt;">&#60;!ELEMENT note (message?)&#62;</span></pre>
</td>
</tr>
</tbody>
</table>
<p><span style="font-size:11pt;color:#000000;">The ? sign in the example above declares that the child element message can occur zero or one times inside the note element.</span></p>
<div class="MsoNormal" style="text-align:center;margin:0 0 10pt;"><span style="color:#000000;"><br />
<hr size="2" noshade="65535" /></span></div>
<h2 style="margin:10pt 0 0;"><span style="font-size:11pt;line-height:115%;"><span style="color:#4f81bd;">Declaring mixed content</span></span></h2>
<table class="MsoNormalTable" style="background:#efe7d6;" border="1" cellpadding="0">
<tbody>
<tr>
<td style="border:medium none #f0f0f0;width:100%;background-color:transparent;padding:0.75pt;" width="100%">
<pre><span style="font-size:11pt;">example</span>
<span style="font-size:11pt;">&#60;!ELEMENT note (to+,from,header,message*,#PCDATA)&#62;</span></pre>
</td>
</tr>
</tbody>
</table>
<p><span style="font-size:11pt;color:#000000;">The example above declares that the element note must contain at least one <strong>to</strong> child element, exactly one <strong>from</strong> child element, exactly one <strong>header</strong>, zero or more <strong>message</strong>, and some other parsed <strong>character data</strong> as well. Puh!</span></p>
<h2 style="margin:10pt 0 0;"><span style="font-size:11pt;line-height:115%;"><span style="color:#4f81bd;">Attribute declaration example</span></span></h2>
<table class="MsoNormalTable" style="background:#efe7d6;" border="1" cellpadding="0">
<tbody>
<tr>
<td style="border:medium none #f0f0f0;width:100%;background-color:transparent;padding:0.75pt;" width="100%">
<pre><span style="font-size:11pt;">DTD example:</span>
<span style="font-size:11pt;">&#60;!ELEMENT square EMPTY&#62;</span>
<span style="font-size:11pt;"><span>  </span>&#60;!ATTLIST square width CDATA "0"&#62;</span>
<span style="font-size:11pt;"> </span>
<span style="font-size:11pt;">XML example:</span>
<span style="font-size:11pt;">&#60;square width="100"&#62;&#60;/square&#62;</span></pre>
</td>
</tr>
</tbody>
</table>
<p class="MsoNormal" style="margin:0 0 10pt;"><span style="color:#000000;"><br />
<span style="font-size:small;">In the above example the element square is defined to be an empty element with the attributes width of type CDATA. The width attribute has a default value of 0. </span></span></p>
<div class="MsoNormal" style="text-align:center;margin:0 0 10pt;"><span style="color:#000000;"><span style="font-size:small;"><br />
<hr size="2" noshade="65535" /></span></span></div>
<h2 style="margin:10pt 0 0;"><span style="font-size:11pt;line-height:115%;"><span style="color:#4f81bd;">Default attribute value</span></span></h2>
<table class="MsoNormalTable" style="background:#efe7d6;" border="1" cellpadding="0">
<tbody>
<tr>
<td style="border:medium none #f0f0f0;width:100%;background-color:transparent;padding:0.75pt;" width="100%">
<pre><span style="font-size:11pt;">Syntax:</span>
<span style="font-size:11pt;">&#60;!ATTLIST element-name attribute-name CDATA "default-value"&#62;</span>
<span style="font-size:11pt;"> </span>
<span style="font-size:11pt;">DTD example:</span>
<span style="font-size:11pt;">&#60;!ATTLIST payment type CDATA "check"&#62;</span>
<span style="font-size:11pt;"> </span>
<span style="font-size:11pt;">XML example:</span>
<span style="font-size:11pt;">&#60;payment type="check"&#62;</span></pre>
</td>
</tr>
</tbody>
</table>
<p class="MsoNormal" style="margin:0 0 10pt;"><span style="color:#000000;"><br />
<span style="font-size:small;">Specifying a default value for an attribute, assures that the attribute will get a value even if the author of the XML document didn't include it. </span></span></p>
<div class="MsoNormal" style="text-align:center;margin:0 0 10pt;"><span style="color:#000000;"><span style="font-size:small;"><br />
<hr size="2" noshade="65535" /></span></span></div>
<h2 style="margin:10pt 0 0;"><span style="font-size:11pt;line-height:115%;"><span style="color:#4f81bd;">Implied attribute</span></span></h2>
<table class="MsoNormalTable" style="background:#efe7d6;" border="1" cellpadding="0">
<tbody>
<tr>
<td style="border:medium none #f0f0f0;width:100%;background-color:transparent;padding:0.75pt;" width="100%">
<pre><span style="font-size:11pt;">Syntax:</span>
<span style="font-size:11pt;">&#60;!ATTLIST element-name attribute-name attribute-type #IMPLIED&#62;</span>
<span style="font-size:11pt;">DTD example:</span>
<span style="font-size:11pt;">&#60;!ATTLIST contact fax CDATA #IMPLIED&#62;</span>
<span style="font-size:11pt;"> </span>
<span style="font-size:11pt;">XML example:</span>
<span style="font-size:11pt;">&#60;contact fax="555-667788"&#62;</span></pre>
</td>
</tr>
</tbody>
</table>
<p class="MsoNormal" style="margin:0 0 10pt;"><span style="color:#000000;"><br />
<span style="font-size:small;">Use an implied attribute if you don't want to force the author to include an attribute and you don't have an option for a default value either. </span></span></p>
<div class="MsoNormal" style="text-align:center;margin:0 0 10pt;"><span style="color:#000000;"><span style="font-size:small;"><br />
<hr size="2" noshade="65535" /></span></span></div>
<h2 style="margin:10pt 0 0;"><span style="font-size:11pt;line-height:115%;"><span style="color:#4f81bd;">Required attribute</span></span></h2>
<table class="MsoNormalTable" style="background:#efe7d6;" border="1" cellpadding="0">
<tbody>
<tr>
<td style="border:medium none #f0f0f0;width:100%;background-color:transparent;padding:0.75pt;" width="100%">
<pre><span style="font-size:11pt;">Syntax:</span>
<span style="font-size:11pt;">&#60;!ATTLIST element-name attribute_name attribute-type #REQUIRED&#62;</span>
<span style="font-size:11pt;">DTD example:</span>
<span style="font-size:11pt;">&#60;!ATTLIST person number CDATA #REQUIRED&#62;</span>
<span style="font-size:11pt;"> </span>
<span style="font-size:11pt;">XML example:</span>
<span style="font-size:11pt;">&#60;person number="5677"&#62;</span></pre>
</td>
</tr>
</tbody>
</table>
<p class="MsoNormal" style="margin:0 0 10pt;"><span style="color:#000000;"><br />
<span style="font-size:small;">Use a required attribute if you don't have an option for a default value, but still want to force the attribute to be present. </span></span></p>
<div class="MsoNormal" style="text-align:center;margin:0 0 10pt;"><span style="color:#000000;"><span style="font-size:small;"><br />
<hr size="2" noshade="65535" /></span></span></div>
<h2 style="margin:10pt 0 0;"><span style="font-size:11pt;line-height:115%;"><span style="color:#4f81bd;">Fixed attribute value</span></span></h2>
<table class="MsoNormalTable" style="background:#efe7d6;" border="1" cellpadding="0">
<tbody>
<tr>
<td style="border:medium none #f0f0f0;width:100%;background-color:transparent;padding:0.75pt;" width="100%">
<pre><span style="font-size:11pt;">Syntax:</span>
<span style="font-size:11pt;">&#60;!ATTLIST element-name attribute-name attribute-type #FIXED "value"&#62;</span>
<span style="font-size:11pt;">DTD example:</span>
<span style="font-size:11pt;">&#60;!ATTLIST sender company CDATA #FIXED "Microsoft"&#62;</span>
<span style="font-size:11pt;"> </span>
<span style="font-size:11pt;"> </span>
<span style="font-size:11pt;">XML example:</span>
<span style="font-size:11pt;">&#60;sender company="Microsoft"&#62;</span></pre>
</td>
</tr>
</tbody>
</table>
<p class="MsoNormal" style="margin:0 0 10pt;"><span style="color:#000000;"><br />
<span style="font-size:small;">Use a fixed attribute value when you want an attribute to have a fixed value without allowing the author to change it. If an author includes another value, the XML parser will return an error. </span></span></p>
<div class="MsoNormal" style="text-align:center;margin:0 0 10pt;"><span style="color:#000000;"><span style="font-size:small;"><br />
<hr size="2" noshade="65535" /></span></span></div>
<h2 style="margin:10pt 0 0;"><span style="font-size:11pt;line-height:115%;"><span style="color:#4f81bd;">Enumerated attribute values</span></span></h2>
<table class="MsoNormalTable" style="background:#efe7d6;" border="1" cellpadding="0">
<tbody>
<tr>
<td style="border:medium none #f0f0f0;width:100%;background-color:transparent;padding:0.75pt;" width="100%">
<pre><span style="font-size:11pt;">Syntax:</span>
<span style="font-size:11pt;">&#60;!ATTLIST element-name attribute-name (eval&#124;eval&#124;..) default-value&#62;</span>
<span style="font-size:11pt;">DTD example:</span>
<span style="font-size:11pt;">&#60;!ATTLIST payment type (check&#124;cash) "cash"&#62;</span>
<span style="font-size:11pt;"> </span>
<span style="font-size:11pt;">XML example:</span>
<span style="font-size:11pt;">&#60;payment type="check"&#62;</span>
<span style="font-size:11pt;">or</span>
<span style="font-size:11pt;">&#60;payment type="cash"&#62;</span></pre>
</td>
</tr>
</tbody>
</table>
<p class="MsoNormal" style="margin:0 0 10pt;"><span style="color:#000000;"><br />
<span style="font-size:small;">Use enumerated attribute values when you want the attribute values to be one of a fixed set of legal values.</span></span></p>
<p class="MsoNormal" style="margin:0 0 10pt;"><span style="color:#000000;"><span style="font-size:small;"> </span></span></p>
<h2 style="margin:10pt 0 0;"><span style="font-size:11pt;line-height:115%;"><span style="color:#4f81bd;">Validating with the XML Parser </span></span></h2>
<p><span style="font-size:11pt;color:#000000;">If you try to open an XML document, the XML Parser might generate an error. By accessing the parseError object, the exact error code, the error text, and even the line that caused the error can be retrieved: </span></p>
<table class="MsoNormalTable" style="background:#efe7d6;" border="1" cellpadding="0">
<tbody>
<tr>
<td style="background-color:transparent;border:#f0f0f0;padding:0.75pt;">
<pre><span style="font-size:11pt;">var xmlDoc = new ActiveXObject("Microsoft.XMLDOM")</span>
<span style="font-size:11pt;">xmlDoc.async="false"</span>
<span style="font-size:11pt;">xmlDoc.validateOnParse="true"</span>
<span style="font-size:11pt;">xmlDoc.load("note_dtd_error.xml")</span>
<span style="font-size:11pt;"> </span>
<span style="font-size:11pt;" lang="PT-BR">document.write("&#60;br&#62;Error Code: ")</span>
<span style="font-size:11pt;" lang="PT-BR">document.write(xmlDoc.parseError.errorCode)</span>
<span style="font-size:11pt;">document.write("&#60;br&#62;Error Reason: ")</span>
<span style="font-size:11pt;">document.write(xmlDoc.parseError.reason)</span>
<span style="font-size:11pt;">document.write("&#60;br&#62;Error Line: ")</span>
<span style="font-size:11pt;">document.write(xmlDoc.parseError.line)</span></pre>
</td>
</tr>
</tbody>
</table>
<p><span style="font-size:11pt;color:#000000;"><a href="http://www.xmlfiles.com/examples/tryit.asp?filename=note_error_three"><span><span style="color:#0000ff;">Try it Yourself</span></span></a> or or just <a href="http://www.xmlfiles.com/examples/note_dtd_error.xml"><span><span style="color:#0000ff;">look at the XML file</span></span></a></span></p>
<div class="MsoNormal" style="text-align:center;margin:0 0 10pt;"><span style="color:#000000;"><span style="color:#0000ff;"><br />
<hr size="2" noshade="65535" /></span></span></div>
<h2 style="margin:10pt 0 0;"><span style="font-size:11pt;line-height:115%;"><span style="color:#4f81bd;">Turning Validation off </span></span></h2>
<p><span style="font-size:11pt;color:#000000;">Validation can be turned off by setting the XML parser's validateOnParse="false". </span></p>
<table class="MsoNormalTable" style="background:#efe7d6;" border="1" cellpadding="0">
<tbody>
<tr>
<td style="background-color:transparent;border:#f0f0f0;padding:0.75pt;">
<pre><span style="font-size:11pt;">var xmlDoc = new ActiveXObject("Microsoft.XMLDOM")</span>
<span style="font-size:11pt;">xmlDoc.async="false"</span>
<span style="font-size:11pt;">xmlDoc.validateOnParse="false"</span>
<span style="font-size:11pt;">xmlDoc.load("note_dtd_error.xml")</span>
<span style="font-size:11pt;"> </span>
<span style="font-size:11pt;" lang="PT-BR">document.write("&#60;br&#62;Error Code: ")</span>
<span style="font-size:11pt;" lang="PT-BR">document.write(xmlDoc.parseError.errorCode)</span>
<span style="font-size:11pt;">document.write("&#60;br&#62;Error Reason: ")</span>
<span style="font-size:11pt;">document.write(xmlDoc.parseError.reason)</span>
<span style="font-size:11pt;">document.write("&#60;br&#62;Error Line: ")</span>
<span style="font-size:11pt;">document.write(xmlDoc.parseError.line)</span></pre>
</td>
</tr>
</tbody>
</table>
<p class="MsoNormal" style="line-height:15.9pt;margin:0 0 10pt;"><span style="color:#000000;"><span style="font-size:small;"> </span></span></p>
]]></content:encoded>
</item>
<item>
<title><![CDATA[DTD manipulation]]></title>
<link>http://mauriziostorani.wordpress.com/?p=103</link>
<pubDate>Thu, 26 Jun 2008 18:28:52 +0000</pubDate>
<dc:creator>Maurizio Storani</dc:creator>
<guid>http://mauriziostorani.wordpress.com/?p=103</guid>
<description><![CDATA[Document Type Definition (DTD) is one of several SGML and XML schema languages, and is also the term]]></description>
<content:encoded><![CDATA[<p><img class="alignleft" style="border:2px solid #E58712;float:left;margin-left:3px;margin-right:3px;padding:2px;" src="http://www.gutenberg.eu.org/publications/autres/FAQXML/xml.gif" alt="" />Document Type Definition (DTD) is one of several <span class="mw-redirect">SGML</span> and XML schema languages, and is also the term used to describe a document or portion thereof that is authored in the DTD language. A DTD is primarily used for the expression of a schema via a set of declarations that conform to a particular markup syntax and that describe a class, or <em>type</em>, of document, in terms of constraints on the structure of that document. A DTD may also declare constructs that are not always required to establish document structure, but that may affect the interpretation of some documents. XML documents are described using a subset of DTD which imposes a number of restrictions on the document's structure, as required per the XML standard (XML is in itself an application of SGML optimized for automated parsing).</p>
<p>DTD is native to the SGML and XML specifications, and since its introduction other specification languages such as XML Schema and RELAX NG have been released with additional functionality.</p>
<p>As an expression of a schema, a DTD specifies, in effect, the syntax of an "application" of SGML or XML, such as the derivative language <span class="mw-redirect">HTML</span> or <span class="mw-redirect">XHTML</span>. This syntax is usually a less general form of the syntax of SGML or XML.</p>
<p>In a DTD, the structure of a class of documents is described via element and attribute-list declarations. Element declarations name the allowable set of elements within the document, and specify whether and how declared elements and runs of character data may be contained within each element. Attribute-list declarations name the allowable set of attributes for each declared element, including the type of each attribute value, if not an explicit set of valid value(s).</p>
<h2>Converts a DTD to an XML Schema with <a title="http://www.lumrix.net/dtd2xs/" rel="nofollow" href="http://www.lumrix.net/dtd2xs/" target="_blank">dtd2xs</a></h2>
<p>Dtd2Xs allows to <span class="kwLink">convert</span> complex, modularized <span class="kwLink">XML DTDs</span> and DTDs with<br />
namespaces to XML Schemas. As an example of Dtd2Xs conversion check<br />
out DocBook <span class="kwLink">XML Schema</span> <span class="kwLink">generated from XML DocBook DTD</span> V4.2, and <span class="kwLink">XSL-FO</span><br />
Schema <span class="kwLink">generated from XSL</span>-FO DTD.</p>
<p>Platforms:<br />
Win32, Linux</p>
<p>License:<br />
Free for non-profit activities</p>
<h3>dtd2xs example</h3>
<h4>Using <tt>dtd2xs</tt> to Convert DTD's with Namespaces</h4>
<p>To correctly handle namespaces, <tt>dtd2xs</tt> must be provided with namespace mapping and target namespace prefix information from command-line (it is not possible to deduce it from DTD itself). Default behavior of <tt>dtd2xs</tt> is to ignore elements with unmapped prefixes.</p>
<p>In the following examples we will use XSL Formatting Objects (XSL-FO) DTD as an example. The DTD file, fo.dtd, contains definition of a standard XSL-FO plus extensions for RenderX XSL-FO renderer. Standard elements and attributes are defined with <tt>fo</tt> prefix; RenderX extensions use different namespace and have <tt>rx</tt> prefix.</p>
<p>To make 'pure' XSL-FO Schema, use:</p>
<pre>dtd2xs -t fo -m fo:http://www.w3.org/1999/XSL/Format fo.dtd</pre>
<p>Note that <tt>-t</tt> option is used to specify target namespace prefix (<tt>fo</tt>), and <tt>-m</tt> option is used to map this prefix into namespace URI.</p>
<p>To make 'full' Schema, which defines both standard XSL-FO constructs and RenderX extensions, use:</p>
<pre>dtd2xs -t fo -m fo:http://www.w3.org/1999/XSL/Format -m rx:http://www.renderx.com/XSL/Extensions -i rx:rx.xsd <a href="http://www.syntext.com/products/dtd2xs/doc/fo.dtd" target="_top">fo.dtd</a> <a href="http://www.syntext.com/products/dtd2xs/doc/fo+rx.xsd" target="_top">fo+rx.xsd</a> dtd2xs -t rx -m rx:http://www.renderx.com/XSL/Extensions <a href="http://www.syntext.com/products/dtd2xs/doc/fo.dtd" target="_top">fo.dtd</a> <a href="http://www.syntext.com/products/dtd2xs/doc/rx.xsd" target="_top">rx.xsd</a></pre>
<p>We actually need two commands here. First one defines mappings for two namespace prefixes (<tt>fo</tt> and <tt>rx</tt>). <tt>fo</tt> is used as a target namespace prefix and additional option <tt>-i rx:rx.xsd</tt> means "import components with <tt>rx</tt> prefix from schemaLocation <tt>rx.xsd</tt>). In the second command, we extract RenderX extensions into the separate schema file rx.xsd, which will be used (imported) by first Schema file fo+rx.xsd. It may look cumbersome, but W3C XML Schema standard does not allow definition of elements for different namespaces in the single Schema file.</p>
<p>Another caveat is handling attributes for which element namespace is different from attribute namespace. Since a validator must be able to reference definitions of such attributes from an imported schema, <tt>dtd2xs</tt> generates definitions of such attributes at the top level of the schema.</p>
<div class="note" style="margin-left:0.5in;margin-right:0.5in;">
<h4>Note</h4>
<p>You <span class="emphasis"><em>must</em></span> specify target prefix and prefix mappings if your DTD contains namespaces. Without this, <tt>dtd2xs</tt> will probably generate incorrect Schema.</div>
<h2>Converts a DTD to an <span class="mw-redirect">POJO</span> objects with <a title="http://sourceforge.net/projects/plainxml/" rel="nofollow" href="http://sourceforge.net/projects/plainxml/" target="_blank">PlainXML</a></h2>
<p>PlainXML represents a pure Java library which includes various lightweight <span class="caps">XML</span> processing tools.</p>
<p><strong>Major features are:</strong></p>
<ul>
<li>Generation of <span class="caps">POJO</span> by <span class="caps">DTD</span>;</li>
<li>Using typed <span class="caps">POJO</span> for manipulation for <span class="caps">XML</span> documents in Java;</li>
<li><span class="caps">XML</span>-POJO mapping using either Java5 annotations or <span class="caps">DTD</span> with processing instructions;</li>
<li>Ability to access and modify <span class="caps">XML</span> document using <span class="caps">POJO</span> instead of <span class="caps">SAX</span> or <span class="caps">DOM</span>;</li>
<li>Custom preprocessing of <span class="caps">XML</span> documents using expression language;</li>
<li>Support of “binary” <span class="caps">XML</span> format;</li>
<li><span class="caps">RMI</span> friendly <span class="caps">XML</span> marshalling;</li>
<li>Export JavaBeans tree to <span class="caps">JSON</span>;</li>
</ul>
<h3>PlainXML Examples follow <a href="http://www.soft-amis.com/index.html?return=http://www.soft-amis.com/plainxml/examples.html" target="_blank">this</a></h3>
<h2>Others DTD Tools:</h2>
<h3><a title="DTD Editor" href="http://www.stylusstudio.com/dtd_editor.html" target="_blank">Visual DTD Editor</a></h3>
<p>Design DTDs easily and intuitively with a built-in DTD Editor! The DTD Editor lets you work with text and tree views to review and modify DTD elements, attributes, and properties.</p>
<h3><a title="DTD Validator and Parser" href="http://www.stylusstudio.com/dtd_validator.html" target="_blank">DTD Validator</a></h3>
<p>Validate XML using any DTD processor (MSXML, Microsoft .NET, Xerces, and others)! DTD is easily associated — internally or externally — with any XML document, making DTD validation and syntax-checking a snap.</p>
<h3><a title="XML DTD generator" href="http://www.stylusstudio.com/dtd_generator.html" target="_blank">DTD Generator</a></h3>
<p>Auto-generate DTDs from any XML document using the Stylus Studio DTD generator. DTDs can be automatically inserted using the !DOCTYPE declaration, or you can generate external DTDs for validating multiple XML documents.</p>
<h3><a title="DTD to XML Schema" href="http://www.stylusstudio.com/dtd/convert_dtd_to_schema.html" target="_blank">Convert DTD to Schema</a></h3>
<p>Convert your legacy DTD data models to the official W3C XML Schema format using built-in DTD to XSD conversion tools. Converting DTD to XML Schema provides support for both built-in and custom data types.</p>
<h3><a title="Generating XML from a DTD" href="http://www.stylusstudio.com/dtd/dtd_to_xml.html" target="_blank">DTD to XML</a></h3>
<p>Use a DTD to create XML documents! A simple DTD-to-XML document wizard gives you a leg-up on even the most complex XML.</p>
<h3><a title="SAX DTD" href="http://www.stylusstudio.com/dtd/dtd_parser.html" target="_blank">DTD Parsers</a></h3>
<p>DTD parsers supported in Stylus Studio include both <a title="Document Object Model" href="http://www.stylusstudio.com/dom.html">DOM</a> and <a title="SAX Specification" href="http://www.stylusstudio.com/sax.html">SAX-based</a> XML DTD Parsing components. An internal DTD parser helps you quickly validate XML documents, or select from one of several supported DTD validation parsers for XML like MSXML, .NET, and Xerces.</p>
<h3><a title="Java Validate XML DTD" href="http://www.stylusstudio.com/dtd/dtd_java.html" target="_blank">Using DTD in Java</a></h3>
<p>Use the DTDs that you develop in Stylus Studio inside your Java applications. Using Xerces-J, you can easily parse DTDs as part of your XML validation.</p>
<h3><a title=".NET DTD Parser" href="http://www.stylusstudio.com/dtd/dtd_microsoft.html" target="_blank">Using DTD in Microsoft .NET</a></h3>
<p>The DTDs that you develop in Stylus Studio can be used inside both traditional Microsoft COM-based applications, as well as newer Microsoft .NET applications. DTD parsing can be implemented in .NET, C#, and visual basic.</p>
<h3>References:</h3>
<h5>[http://www.lumrix.net/]</h5>
<h5>[http://www.soft-amis.com]</h5>
<h5>[wikipedia.org]</h5>
<h5>[http://www.stylusstudio.com/]</h5>
]]></content:encoded>
</item>
<item>
<title><![CDATA[Mashuper's reality]]></title>
<link>http://usingit.wordpress.com/?p=141</link>
<pubDate>Fri, 30 May 2008 17:28:41 +0000</pubDate>
<dc:creator>Keren Dagan</dc:creator>
<guid>http://usingit.wordpress.com/?p=141</guid>
<description><![CDATA[In his post &#8220;Could Someone Explain Technorati&#8221; Chris Brogan wonders about the consistenc]]></description>
<content:encoded><![CDATA[<p>In his post <a href="http://www.chrisbrogan.com/could-someone-explain-technorati/" target="_blank">"Could Someone Explain Technorati"</a> Chris Brogan wonders about the consistency, accuracy and reliability of <a href="http://technorati.com/">Technorati</a> service. I can't explain the behavior of the system over there but I can share some of my experience dealing with different challenges using online APIs (web services) and data. The objective here is to help other mashupers to better prepare for future integrations effort across multiple web services. Since it appears that the <a href="http://www.programmableweb.com/mashups">mashupers community</a> is growing faster than the <a href="http://www.programmableweb.com/apis/directory">web service provider</a> I'm sure that more fellow API consumers can share some stories of their own. I will be happy to hear about.</p>
<p>I see three participants perspectives in this "love triangle": the web site visitor, the mashuper (the API consumer) and the service provider.</p>
<h3>My visitor experience:</h3>
<p>Chris Brogan talks about his experience from the user perspective in his post. I have nothing to add here but I would say that as a service provider, this should be my top concern satisfying my loyal community. Maybe the way to deal with this in the case from Chris's post is by monitoring for exceptions (drastic rise or fall in the rank/authority).</p>
<h3>My mashup experience:</h3>
<p>As I mentioned in some of my earlier posts (<a href="http://usingit.wordpress.com/2008/02/14/blog-rank-monitoring-prototype/">here</a>, <a href="http://usingit.wordpress.com/2008/02/19/t2t-technorati-to-twitter-blog-monitoring/">here</a> and <a href="http://usingit.wordpress.com/2008/04/29/finding-obscure-great-bloggers-and-mashup/">here</a>) I'm working on a small project for finding productive bloggers by monitoring for consistent improvements in their Technorati rank. So on a frequent basis I monitor the rank for over 800 bloggers now. I plot some of the result to a designated Twitter account: <a href="http://twitter.com/blogmon">blogmon</a>.<br />
<strong>The first set of challenge is dealing with volatile data:</strong></p>
<ul>
<li>Some times I see no authority in the results (inboundblogs).</li>
<li>Some times there is no valid last update date in the results: &#60;lastupdate&#62;1970-01-01 00:00:00 GMT&#60;/lastupdate&#62;</li>
<li>Most time there is no author (the user did not add it)</li>
<li>Some time there are no tags (the user did not add it)</li>
<li>Some time as Chris mentioned the rank is off for a short period of time</li>
</ul>
<p>For example see <a href="http://sethgodin.typepad.com/">Seth Godin's Blog</a> rank history:</p>
<p>last update    rank    authority   <br />
2/12/2008    19    8599   <br />
2/25/2008    18    8697   <br />
3/17/2008    19    8658   <br />
3/22/2008    16    8827   <br />
4/10/2008    15    8946   <br />
4/19/2008    16    8882   <br />
4/23/2008     17    8819   <br />
<strong>5/1/2008    243</strong>       <br />
5/12/2008     17    8828   <br />
5/14/2008     16    8863   <br />
5/20/2008    15    8890   </p>
<p>These are the details that a consumer of online volatile data must plan and look for ways to compensate for.</p>
<p><strong>Some suggestions:</strong></p>
<ul>
<li>Check the validity of the date</li>
<li>Don't just count on the last result i.e. search for the last valid result and monitor over time.</li>
<li>Be prepare to plot partial results (e.g. no top tags or author).</li>
<li>Most important: guard your data i.e. protect what that you take from the service  and store in your records.</li>
</ul>
<p> <br />
<strong>The next set of challenge has to do with the web service behavior:</strong></p>
<ul>
<li>I get the fowling error once or twice: Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host.</li>
<li>Some API requests come back with:</li>
</ul>
<blockquote><p>&#60;HTML&#62;<br />
     &#60;HEAD&#62;<br />
          &#60;META HTTP-EQUIV="REFRESH" CONTENT="2; URL=<a href="http://api.technorati.com/bloginfo?url=****&#38;key=****&#38;version=0.9&#38;start=1&#38;limit=30&#38;claim=0&#38;highlight=0">http://api.technorati.com/bloginfo?url=****&#38;key=****&#38;version=0.9&#38;start=1&#38;limit=30&#38;claim=0&#38;highlight=0"</a>&#62;<br />
      &#60;TITLE&#62;****&#60;/TITLE&#62;<br />
      &#60;/HEAD&#62;<br />
      &#60;BODY&#62;<br />
           &#60;CENTER&#62;<br />
               &#60;IMG SRC="<a href="http://198.80.6.3:3111/usg/splash">***"</a>&#62;<br />
               &#60;BR&#62;<br />
           &#60;/CENTER&#62;<br />
     &#60;/BODY&#62;<br />
&#60;/HTML&#62;</p></blockquote>
<p>**I intentionally masked the URL, title, image and my developer Key with ****</p>
<p><strong>This result can crash your system if not handled.</strong></p>
<ul>
<li>Finally: and I get this one a lot:)</li>
</ul>
<blockquote><p>&#60;?xml ... "<a href="http://api.technorati.com/dtd/tapi-002.xml">http://api.technorati.com/dtd/tapi-002.xml"</a>&#62;<br />
&#60;tapi version="1.0"&#62;<br />
    &#60;document&#62;<br />
        &#60;result&#62;<br />
            &#60;error&#62;You have used up your daily allotment of Technorati API queries.&#60;/error&#62;<br />
        &#60;/result&#62;<br />
    &#60;/document&#62;<br />
&#60;/tapi&#62;</p></blockquote>
<p> <strong>Some suggestions:</strong></p>
<ul>
<li>I can't picture my dev world without <a href="http://en.wikipedia.org/wiki/Exception_handling">Exception Handling</a> - this is the ultimate protection against web service unexpected behavior in this specific case. So guard any call, loading XML result and data parsing by wrapping them with a try and catch block.</li>
<li>Logging - log expected and unexpected behavior for later analysis and recovery.</li>
<li>Build the system so exceptions are caught, logged but the execution can move on to the next task.</li>
<li>This is something that I learned from a smart Army office: "If there is a doubt there is no doubt" basically saying that it is better to not report at all than to report inaccurate data.</li>
<li>Find ways to minimize the API calls  - e.g. I ask for tags only when I find a blog worth reporting on</li>
<li>A thought: I'm not an expert in XML and DTD but could it be that using DTD slows down the web service. If you know more about it please share with me/us. Is this really necessary on a read only calls?</li>
</ul>
<p>    </p>
<p>                               <a href="http://usingit.files.wordpress.com/2008/05/technoratilookingforthemonster.jpg"><img style="border-right:0;border-top:0;border-left:0;border-bottom:0;" src="http://usingit.files.wordpress.com/2008/05/technoratilookingforthemonster-thumb.jpg" border="0" alt="TechnoratiLookingForTheMonster" width="297" height="157" /></a></p>
<h3>About the service:</h3>
<p>I can't talk much about what that a web service provider feels or experience (I'm sure that <a href="www.arachna.com/roller/page/spidaman">Ian Kallen</a> from Technorati has a lot to share about this subject) but I want to say few things:</p>
<ul>
<li>Please don't get this post wrong I'm a fan of Technorati - I use it and deeply  appreciate their service and thankful for having the option using the APIs . As I said earlier the intention is to share from experience and to allow you to better prepare for such effort.</li>
<li>I guess that it is hard to estimate the load on the system with such growth in the number of mashupers out there. So my heart is with them.</li>
<li>There are two more threats that the web service provider needs to protect itself from and I'm sure that those consume some energy:  protecting the hard gather data and its environments from abuse and malicious attacks.</li>
</ul>
<p> </p>
<p>One last comment: ironically I had none problems with Twitter so far:)  but I'm aware of the pain that some of the Twitter API user suffer occasionally.</p>
]]></content:encoded>
</item>
<item>
<title><![CDATA[Mashuper's reality]]></title>
<link>http://usingit.wordpress.com/?p=141</link>
<pubDate>Fri, 30 May 2008 17:28:41 +0000</pubDate>
<dc:creator>Keren Dagan</dc:creator>
<guid>http://usingit.wordpress.com/?p=141</guid>
<description><![CDATA[In his post &#8220;Could Someone Explain Technorati&#8221; Chris Brogan wonders about the consistenc]]></description>
<content:encoded><![CDATA[<p>In his post <a href="http://www.chrisbrogan.com/could-someone-explain-technorati/" target="_blank">"Could Someone Explain Technorati"</a> Chris Brogan wonders about the consistency, accuracy and reliability of <a href="http://technorati.com/">Technorati</a> service. I can't explain the behavior of the system over there but I can share some of my experience dealing with different challenges using online APIs (web services) and data. The objective here is to help other mashupers to better prepare for future integrations effort across multiple web services. Since it appears that the <a href="http://www.programmableweb.com/mashups">mashupers community</a> is growing faster than the <a href="http://www.programmableweb.com/apis/directory">web service provider</a> I'm sure that more fellow API consumers can share some stories of their own. I will be happy to hear about.</p>
<p>I see three participants perspectives in this "love triangle": the web site visitor, the mashuper (the API consumer) and the service provider.</p>
<h3>My visitor experience:</h3>
<p>Chris Brogan talks about his experience from the user perspective in his post. I have nothing to add here but I would say that as a service provider, this should be my top concern satisfying my loyal community. Maybe the way to deal with this in the case from Chris's post is by monitoring for exceptions (drastic rise or fall in the rank/authority).</p>
<h3>My mashup experience:</h3>
<p>As I mentioned in some of my earlier posts (<a href="http://usingit.wordpress.com/2008/02/14/blog-rank-monitoring-prototype/">here</a>, <a href="http://usingit.wordpress.com/2008/02/19/t2t-technorati-to-twitter-blog-monitoring/">here</a> and <a href="http://usingit.wordpress.com/2008/04/29/finding-obscure-great-bloggers-and-mashup/">here</a>) I'm working on a small project for finding productive bloggers by monitoring for consistent improvements in their Technorati rank. So on a frequent basis I monitor the rank for over 800 bloggers now. I plot some of the result to a designated Twitter account: <a href="http://twitter.com/blogmon">blogmon</a>.<br />
<strong>The first set of challenge is dealing with volatile data:</strong></p>
<ul>
<li>Some times I see no authority in the results (inboundblogs).</li>
<li>Some times there is no valid last update date in the results: &#60;lastupdate&#62;1970-01-01 00:00:00 GMT&#60;/lastupdate&#62;</li>
<li>Most time there is no author (the user did not add it)</li>
<li>Some time there are no tags (the user did not add it)</li>
<li>Some time as Chris mentioned the rank is off for a short period of time</li>
</ul>
<p>For example see <a href="http://sethgodin.typepad.com/">Seth Godin's Blog</a> rank history:</p>
<p>last update    rank    authority   <br />
2/12/2008    19    8599   <br />
2/25/2008    18    8697   <br />
3/17/2008    19    8658   <br />
3/22/2008    16    8827   <br />
4/10/2008    15    8946   <br />
4/19/2008    16    8882   <br />
4/23/2008     17    8819   <br />
<strong>5/1/2008    243</strong>       <br />
5/12/2008     17    8828   <br />
5/14/2008     16    8863   <br />
5/20/2008    15    8890   </p>
<p>These are the details that a consumer of online volatile data must plan and look for ways to compensate for.</p>
<p><strong>Some suggestions:</strong></p>
<ul>
<li>Check the validity of the date</li>
<li>Don't just count on the last result i.e. search for the last valid result and monitor over time.</li>
<li>Be prepare to plot partial results (e.g. no top tags or author).</li>
<li>Most important: guard your data i.e. protect what that you take from the service  and store in your records.</li>
</ul>
<p> <br />
<strong>The next set of challenge has to do with the web service behavior:</strong></p>
<ul>
<li>I get the fowling error once or twice: Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host.</li>
<li>Some API requests come back with:</li>
</ul>
<blockquote><p>&#60;HTML&#62;<br />
     &#60;HEAD&#62;<br />
          &#60;META HTTP-EQUIV="REFRESH" CONTENT="2; URL=<a href="http://api.technorati.com/bloginfo?url=****&#38;key=****&#38;version=0.9&#38;start=1&#38;limit=30&#38;claim=0&#38;highlight=0">http://api.technorati.com/bloginfo?url=****&#38;key=****&#38;version=0.9&#38;start=1&#38;limit=30&#38;claim=0&#38;highlight=0"</a>&#62;<br />
      &#60;TITLE&#62;****&#60;/TITLE&#62;<br />
      &#60;/HEAD&#62;<br />
      &#60;BODY&#62;<br />
           &#60;CENTER&#62;<br />
               &#60;IMG SRC="<a href="http://198.80.6.3:3111/usg/splash">***"</a>&#62;<br />
               &#60;BR&#62;<br />
           &#60;/CENTER&#62;<br />
     &#60;/BODY&#62;<br />
&#60;/HTML&#62;</p></blockquote>
<p>**I intentionally masked the URL, title, image and my developer Key with ****</p>
<p><strong>This result can crash your system if not handled.</strong></p>
<ul>
<li>Finally: and I get this one a lot:)</li>
</ul>
<blockquote><p>&#60;?xml ... "<a href="http://api.technorati.com/dtd/tapi-002.xml">http://api.technorati.com/dtd/tapi-002.xml"</a>&#62;<br />
&#60;tapi version="1.0"&#62;<br />
    &#60;document&#62;<br />
        &#60;result&#62;<br />
            &#60;error&#62;You have used up your daily allotment of Technorati API queries.&#60;/error&#62;<br />
        &#60;/result&#62;<br />
    &#60;/document&#62;<br />
&#60;/tapi&#62;</p></blockquote>
<p> <strong>Some suggestions:</strong></p>
<ul>
<li>I can't picture my dev world without <a href="http://en.wikipedia.org/wiki/Exception_handling">Exception Handling</a> - this is the ultimate protection against web service unexpected behavior in this specific case. So guard any call, loading XML result and data parsing by wrapping them with a try and catch block.</li>
<li>Logging - log expected and unexpected behavior for later analysis and recovery.</li>
<li>Build the system so exceptions are caught, logged but the execution can move on to the next task.</li>
<li>This is something that I learned from a smart Army office: "If there is a doubt there is no doubt" basically saying that it is better to not report at all than to report inaccurate data.</li>
<li>Find ways to minimize the API calls  - e.g. I ask for tags only when I find a blog worth reporting on</li>
<li>A thought: I'm not an expert in XML and DTD but could it be that using DTD slows down the web service. If you know more about it please share with me/us. Is this really necessary on a read only calls?</li>
</ul>
<p>    </p>
<p>                               <a href="http://usingit.files.wordpress.com/2008/05/technoratilookingforthemonster.jpg"><img style="border-right:0;border-top:0;border-left:0;border-bottom:0;" src="http://usingit.files.wordpress.com/2008/05/technoratilookingforthemonster-thumb.jpg" border="0" alt="TechnoratiLookingForTheMonster" width="297" height="157" /></a></p>
<h3>About the service:</h3>
<p>I can't talk much about what that a web service provider feels or experience (I'm sure that <a href="www.arachna.com/roller/page/spidaman">Ian Kallen</a> from Technorati has a lot to share about this subject) but I want to say few things:</p>
<ul>
<li>Please don't get this post wrong I'm a fan of Technorati - I use it and deeply  appreciate their service and thankful for having the option using the APIs . As I said earlier the intention is to share from experience and to allow you to better prepare for such effort.</li>
<li>I guess that it is hard to estimate the load on the system with such growth in the number of mashupers out there. So my heart is with them.</li>
<li>There are two more threats that the web service provider needs to protect itself from and I'm sure that those consume some energy:  protecting the hard gather data and its environments from abuse and malicious attacks.</li>
</ul>
<p> </p>
<p>One last comment: ironically I had none problems with Twitter so far:)  but I'm aware of the pain that some of the Twitter API user suffer occasionally.</p>
]]></content:encoded>
</item>
<item>
<title><![CDATA[DTD nedir ?]]></title>
<link>http://geyik.wordpress.com/?p=27</link>
<pubDate>Sun, 11 May 2008 11:07:54 +0000</pubDate>
<dc:creator>geyik</dc:creator>
<guid>http://geyik.wordpress.com/?p=27</guid>
<description><![CDATA[DTD nedir?
DTD bir web sayfasının tipini SGML (Standard Generalized Markup Language) dili  ile bel]]></description>
<content:encoded><![CDATA[<p><strong>DTD nedir?</strong><br />
DTD bir web sayfasının tipini SGML (Standard Generalized Markup Language) dili  ile belirler.<br />
DTD, HTML gibi SGML uygulamaları tarafından kullanılır. Amacı sayfa için geçerli  olan markup sitilini belirtmektir. XHTML SGML döküman tipinde tanımlanmıştır.  Bir XHTML DTD dökümanı sayfada uyulması gereken kuralları, bilgisayarın  anlayabileceği bir dille belirtir.</p>
<p>Yazdığınız XHTML dökümanlarının hangi standartlara uyduğunu DTD belirtir ve  sayfada ilk satır olarak yer almalıdır. Sayfalarınızın standarda uygunluğu  testlerini W3C’nin doğrulama araçları ile yapabilirsiniz.  http://validator.w3.org adresinden bu araçlara ulaşabilirsiniz.</p>
<p>Örütbağı üzerinde bir kaç kaynak adresi de işinize yarayacaktır.<br />
W3C XHTML Anasayfa- <a href="http://www.w3c.org/MarkUp/"> http://www.w3c.org/MarkUp/</a><br />
W3C standart bildirgesi - <a href="http://www.w3.org/TR/2000/REC-xhtml-basic-20001219/"> http://www.w3.org/TR/2000/REC-xhtml-basic-20001219/</a><br />
W3Schools XHTML sayfaları - <a href="http://www.w3schools.com/xhtml"> http://www.w3schools.com/xhtml</a><br />
Web tasarımcılarının sanal kütüphanesi (WDVL) XHTML sayfaları - <a href="http://www.wdvl.com/Authoring/Languages/XML/XHTML/"> http://www.wdvl.com/Authoring/Languages/XML/XHTML/</a><br />
Webmonkey XHTML Genel Bakış -  <a href="http://hotwired.lycos.com/webmonkey/00/50/index2a.html"> http://hotwired.lycos.com/webmonkey/00/50/index2a.html</a><br />
XHTML tartışmaları -  <a href="http://www.webreview.com/tag/2000/09_01_00.shtml"> http://www.webreview.com/tag/2000/09_01_00.shtml</a></p>
]]></content:encoded>
</item>
<item>
<title><![CDATA[SGML, HTML and XML (Video tutorial)]]></title>
<link>http://acoder.wordpress.com/?p=8</link>
<pubDate>Fri, 09 May 2008 22:27:20 +0000</pubDate>
<dc:creator>adi11235</dc:creator>
<guid>http://acoder.wordpress.com/?p=8</guid>
<description><![CDATA[This old guy does a good job explaining things.
Part 1

Part 2

]]></description>
<content:encoded><![CDATA[<p>This old guy does a good job explaining things.</p>
<p>Part 1</p>
<p><span style='text-align:center; display: block;'><object width='425' height='350'><param name='movie' value='http://www.youtube.com/v/Zdj11zoqwsE'></param><param name='wmode' value='transparent'></param><embed src='http://www.youtube.com/v/Zdj11zoqwsE&rel=0' type='application/x-shockwave-flash' wmode='transparent' width='425' height='350'></embed></object></span></p>
<p>Part 2</p>
<p><span style='text-align:center; display: block;'><object width='425' height='350'><param name='movie' value='http://www.youtube.com/v/MQWap_ugQ_s'></param><param name='wmode' value='transparent'></param><embed src='http://www.youtube.com/v/MQWap_ugQ_s&rel=0' type='application/x-shockwave-flash' wmode='transparent' width='425' height='350'></embed></object></span></p>
]]></content:encoded>
</item>
<item>
<title><![CDATA[Validando un XML contra un DTD]]></title>
<link>http://penyaskitodice.wordpress.com/?p=319</link>
<pubDate>Sat, 19 Apr 2008 01:46:27 +0000</pubDate>
<dc:creator>Christian López Espínola</dc:creator>
<guid>http://penyaskitodice.wordpress.com/?p=319</guid>
<description><![CDATA[Para validar un archivo XML contra un DTD desde un sistema con libxml instalado:
$ xmllint --valid -]]></description>
<content:encoded><![CDATA[<p>Para validar un archivo XML contra un DTD desde un sistema con libxml instalado:</p>
<p><code>$ xmllint --valid --noout test.xmi --dtdvalid 99-10-05.dtd</code></p>
]]></content:encoded>
</item>
<item>
<title><![CDATA[Cómo agregar archivos DTD (.ini) en TagEditor]]></title>
<link>http://iflang.wordpress.com/?p=10</link>
<pubDate>Mon, 07 Apr 2008 15:57:14 +0000</pubDate>
<dc:creator>Gabo</dc:creator>
<guid>http://iflang.wordpress.com/?p=10</guid>
<description><![CDATA[Este video explica como agregar los archivos DTD en TagEditor. Se trata de los archivos .ini que sue]]></description>
<content:encoded><![CDATA[<p>Este video explica como agregar los archivos DTD en TagEditor. Se trata de los archivos .ini que suele acompañar a los archivos ttx para traducir en <a href="http://iflang.wordpress.com/2008/04/03/%c2%bfque-es-tageditor-de-trados/">TagEditor</a>.</p>
<p>En caso de no poder abrir un archivo ttx porque el software solicita DTD settings, deben pedir el archivo .ini al Project Manager.</p>
<p><span style='text-align:center; display: block;'><object width='425' height='350'><param name='movie' value='http://www.youtube.com/v/WDkyDo3OQlk'></param><param name='wmode' value='transparent'></param><embed src='http://www.youtube.com/v/WDkyDo3OQlk&rel=0' type='application/x-shockwave-flash' wmode='transparent' width='425' height='350'></embed></object></span></p>
]]></content:encoded>
</item>
<item>
<title><![CDATA[A Look Under the Hood of the Hybrid]]></title>
<link>http://pubtech.wordpress.com/?p=63</link>
<pubDate>Fri, 04 Apr 2008 06:02:06 +0000</pubDate>
<dc:creator>mvrankin</dc:creator>
<guid>http://pubtech.wordpress.com/?p=63</guid>
<description><![CDATA[Got such a good response with the hybrid InCopy-XML workflow, I felt like it was worth revisiting to]]></description>
<content:encoded><![CDATA[<p>Got such a good response with the hybrid InCopy-XML workflow, I felt like it was worth revisiting to go into some details. Let's look at the task of creating a new Schema file with XMLSpy.</p>
<p><strong>In The Grand Schema of Things</strong></p>
<p>The whole reason I start with a Schema and not a DTD is that XMLSpy lets you graphically create Schema. It is a heck of a lot easier for a non-programer to do than writing the code from scratch. But I won’t lie to you. You still need to learn something about XML in general and Schema (with a captial "S") in particular. It’s not quite as easy as just drawing a diagram of your content model.</p>
<p>Well, you can draw pretty much whatever you want, but if you don't know the pitfalls, you’ll get validation errors. And without a valid Schema, you can’t create a that user-friendly authoring template that you need to sell your editors on this whole XML workflow thing.</p>
<p><strong>Help!</strong></p>
<p>Learning XMLSpy can be frustrating for someone who’s used to working with programs like Word and the Creative Suite. The rules for making valid code are strict, the error messages and other jargon might as well be written in another language. Which, actually it is. And the Help won’t teach you anything about XML you didn’t already know. It barely teaches you about XMLSpy. It assumes you know all the rules for coding, and just tells you which buttons perform which functions.</p>
<p>You could buy a printed copy of the manual on E-Bay for $108 (Altova doesn't sell 'em). But instead I would recommend you do the tutorial and then keep something like the O’Reilly book <em>XML in a Nutshell</em> within reach at all times, to serve as a <em>de facto</em> manual. That way you can use that $70 for beer and stand just about the same odds of making a useable Schema.</p>
<p><strong>Namespaces</strong></p>
<p>You need to learn about namespaces right off the bat and make them part of your Schema design so you can use InDesign’s feature of mapping XML attributes to paragraph and character styles. This is necessary since not every paragraph is going to look the same in your layout, but they are still all just paragraphs. I'm not going to get deep into namespaces here since I could devote a few posts to nothing <em>but</em> namespace issues I've had.</p>
<p>OK, now that I made it sound hard, let’s make it look easy.</p>
<p><strong>Diagramming a Content Model</strong></p>
<p>We’ll create a basic Schema for a Major League Baseball team, in honor of the World Series Champeen Red Sox. In XMLSpy, choose File &#62; New and pick W3C XSD from the list of file formats.</p>
<p>Enter the name of your root element in our case, <strong>baseball_team</strong>, and an optional description of it.</p>
<p><img src="http://pubtech.wordpress.com/files/2008/04/plish010-bluetree.jpg" alt="plish010-bluetree.jpg" /></p>
<p>At any time you can choose Text view to see or edit the code. That’s when you’re really glad you don’t need to ever see or edit the code. It's like opening up the washing machine while it's running. You just take a peek, maybe throw a pair of socks in there, and close the lid.</p>
<p><img src="http://pubtech.wordpress.com/files/2008/04/plish010-code.jpg" alt="plish010-code.jpg" /></p>
<p>Then click the little blue tree icon to show the Schema diagram. This is where the fun begins.</p>
<p>You now have a wide open field in which to draw out all the children of the root element.</p>
<p>Everything is connected automatically, so you won’t have any loose floating pieces. Now you apply all that stuff you learned in your planning meetings, the elements, the attributes, restrictions and relationships they have. You drag out a connector from the <strong>baseball_team</strong> element, and choose what kind of child it has.</p>
<p><img src="http://pubtech.wordpress.com/files/2008/04/plish010-addchild.jpg" alt="plish010-addchild.jpg" /></p>
<p>In this case, it’s a sequence (indicated by the line of dots) of two elements, <strong>players</strong> and <strong>coaching_staff</strong>.</p>
<p><img src="http://pubtech.wordpress.com/files/2008/04/plish010-playercoach.jpg" alt="plish010-playercoach.jpg" /></p>
<p><strong>players</strong> is a sequence of <strong>position_players</strong> and <strong>pitchers</strong>. <strong>position_players</strong> is a sequence of <strong>infielders</strong>, <strong>outfielders</strong>, and <strong>bench</strong>, all with an attribute describing the <strong>postion</strong> they play. You keep going in this manner till you've finished diagramming your content model.</p>
<p><img src="http://pubtech.wordpress.com/files/2008/04/plish010-wholeschema.jpg" alt="plish010-wholeschema.jpg" /></p>
<p>Regarding attributes, if you want to give your editors a pop-up list of values to choose from, enter the legal attribute names in the facets &#62; enumerations tab.</p>
<p><img src="http://pubtech.wordpress.com/files/2008/04/plish010-enumeration.jpg" alt="plish010-enumeration.jpg" /></p>
<p>You can also assign minimum and maximum occurrence values to restrict how many of a certain element you’ll allow. In our example, you have to have at least 3 outfielders on your roster to field a team (and pass a validation test). If no number is shown under an element the schema calls for exactly one of that element. Or you can make an element optional by setting the minimum occurrence to zero, like I did with the <strong>assistant_manager</strong> and the box outline becomes dashed.</p>
<p>Once you are done, you can convert the Schema to a DTD for importing into InDesign, or showing your friends in the bleacher seats.</p>
<p><img src="http://pubtech.wordpress.com/files/2008/04/plish010-dtd.jpg" alt="plish010-dtd.jpg" /></p>
<p>On second thought, don't show your DTD in the bleacher seats. That conversation probably won't end well.</p>
<p>Of course the devil's in the details, and there are plenty more details, but let's leave it there for now. That wasn't too painful, was it? We made the engine of the hybrid InCopy-XML workflow, a real live W3C XML Schema, without hand coding it.</p>
]]></content:encoded>
</item>
<item>
<title><![CDATA[Test Drive A Hybrid Workflow ]]></title>
<link>http://pubtech.wordpress.com/?p=58</link>
<pubDate>Wed, 02 Apr 2008 06:25:55 +0000</pubDate>
<dc:creator>mvrankin</dc:creator>
<guid>http://pubtech.wordpress.com/?p=58</guid>
<description><![CDATA[You never know where inspiration will come from. Yesterday it came to me in the form of a traffic ja]]></description>
<content:encoded><![CDATA[<p>You never know where inspiration will come from. Yesterday it came to me in the form of a traffic jam slowing my ride to work. Sitting on the commuter bus, mired in “bumpa-ta-bumpa”, I stared out the window. Life on pause. I imagined the lake of gasoline that was fueling all these cars, puffing out their tailpipes, melting Greenland. Then a shiny red Toyta Prius rolled by. It had a good vibe, like a forward-thinking, best alternative in an otherwise unworkable situation. A hybrid.</p>
<p>This was definitely a sign from the cosmos that it was time to talk about the hybrid XML-InCopy workflow I’d been playing with since last year. I had planned to finish off the cookbook project tonight, but this idea overtook it in my brain. I offer it up now in case any of you out there is stuck in a traffic jam of a publishing workflow, with a line of products and file formats in each other’s way, slowly crawling ahead while the clock ticks ticks ticks.</p>
<p>The point of a hybrid workflow is to combine the virtues of XML and InCopy to give you speed and efficiency that is otherwise impossible. Single-source authoring means multiple print and/or Web products derive and arrive simultaneously from the same set of keystrokes. You author and edit in XML, transform when necessary, and use InCopy to preview your print layouts, where space is finite and styling matters, as you go.</p>
<p>I know there are people out there who have written amazing scripts, or developed plug-ins or workflow systems that can accomplish what I’m going to show you better, faster, with more goodies. But as always, I write about what can you do with the off-the-shelf tools and garden variety skills. Or if you don’t currently possess those skills, you can come by them without completely re-wiring your brain. Perhaps someday Adobe will release the equivalent of an electric car, XML authoring as part of the Creative Suite, and we’ll all be merrily speeding down the Cross-Media Expressway. What follows is my idea of how to do today. And it works. So hop in the hybrid and take it for a spin.</p>
<p><strong>The Pitch</strong></p>
<p>With a <a title="W3c Schema" href="http://www.w3schools.com/schema/default.asp">W3C XML Schema</a> as the foundation of your workflow, you can develop multiple print and online products simultaneously, and achieve efficiency and savings through content re-use with off-the-shelf tools.</p>
<p><strong>The Tools</strong></p>
<p>To do this you’re going to need InDesign CS3, InCopy CS3, and the <a title="Altova Mission Kit" href="http://www.altova.com/products/missionkit/xml_tools.html">Altova MissionKit For XML Developers</a>. The MissionKit is an XML Developer’s equivalent of the Adobe Creative Suite. It’s three applications that work in concert to for the creation and transformation of XML files: XMLSpy, StyleVision, and MapForce. This is a Windows-only package. There is no Mac version, so if you kneel at the altar of Jobs like I do, you need emulation software like <a title="Parallels" href="http://www.parallels.com/">Parallels</a>. Syncrosoft’s <a title="Oxygen" href="http://www.oxygenxml.com/">oXygen</a> is an alternative that runs on the Mac, but only if you don’t need a lot of help writing XSLT. I do. MapForce gives you <em>graphical</em> creation of XSLT, or as I call it, XSLTW (XSL with Training Wheels). I’m not trying to do a commercial for Altova, but their stuff is the only stuff that I know works for everything we’re trying to do.</p>
<p><strong>Step 1: Planning</strong></p>
<p>This is the big one. Map out all your content. Depending on the complexity of your content, this can be a tough job, so you only want to do it once. Spend enough time to get it right, since everything flows downhill from here. Every screw-up or oversight at this stage will echo throughout the workflow in some combination of time, aggravation, or cost. And everyone needs to know that once this is done, there’s no changing the structure, at least not for anyone who wishes to remain with the company.</p>
<p>Your map should show every piece and where it fits into the overall scheme of your project. Map every recombination, and every dependency. Leave no stone unturned. This part can be a real eye opener. If you survive with your sanity intact, you will understand your content better than ever before and maybe discover new ways of using it.</p>
<p>Reverse engineer your own content. Cut up books and move the pieces around as they would move in the digital realm. Follow the life of a lowly paragraph as it appears throughout your product line. Once you grasp the details, you can answer the first key question. What kind of schema best suits your needs: a custom built-from-scratch schema or a generic format? Do you have the time and money to make the former? Do you have the flexibility for the latter? A bad fit might cost you more in the long run. Investigate <a title="DocBook" href="http://docbook.org/">DocBook</a> and <a title="DITA" href="http://dita.xml.org/">DITA</a>. <em>If you go generic, skip to step 3.<br />
</em></p>
<p><strong>Step 2: Build the Schema File</strong></p>
<p>With the understanding that you gained by mapping your content, you can now build an XML Schema that will guide your authoring, transformation, and output. Why a Schema? Why not a <a title="DTD Info" href="http://www.w3schools.com/dtd/default.asp">DTD</a>? I have nothing against DTDs. In fact, they are more appropriate for describing book-like things. Schema excel at describing data more than documents. In fact, I love DTDs so much, the other day on the highway I was passed by someone with the license plate 736 DTD, and I thought “hey, that’s cool.” Then I felt the urge to slap myself for being such a geek.</p>
<p>I say use Schema purely because the Altova tools support Schema in ways that they don’t support DTDs. Namely, you can graphically create a Schema in XMLSpy. I feel a little hypocritical because this is the same tool-based thinking I dissed in a previous post. But facts is facts, and until I find another tool that can do this workflow end-to-end with a DTD, I’m sticking to my story. Actually, if you must have a DTD, there is a workaround: build a Schema, then use XMLSpy to convert the Schema to a DTD.</p>
<p><strong>Step 3: Create Authoring Templates</strong></p>
<p>Using StyleVision you take your Schema and apply styling to it to make a user-friendly authoring template. This is something the oXygen can do too. You choose from CSS properties to apply fonts, spacing, and position to your elements. You can make pop-up menus for standardizing choices, and clickable links to insert required elements.</p>
<p><strong>Step 4: Develop Layout Templates </strong></p>
<p>Import sample XML files into InDesign, structure and style it. Set up styles to tags mapping. Make use of the Story Editor to be sure your tagging remains intact and whitespace characters are where they belong.</p>
<p><strong>Step 5: Distribute Authoring Template</strong></p>
<p>Let the writers have at it.</p>
<p><strong>Step 6: Import XML Files into InDesign<br />
</strong></p>
<p>And when you do, be sure to maintain the live link, so the XML file appears in the Links panel.</p>
<p><strong>Step 7:</strong> <strong>Export to InCopy</strong></p>
<p>BUT tell everyone that the InCopy files are untouchable! Hide them. Instead, InCopy users drop the InDesign file onto InCopy to open it directly.</p>
<p><strong>Step 8: Editors Do the InCopy Two Step</strong></p>
<p>Check out the appropriate stories from the InDesign layout. Show the Links panel to see the XML file. Edit in the XML file, save it. Go back to the Links panel and update the link to the XML file. Magic! You have your cake (XML) and eat (publish) it too.</p>
<p>The fact that this works at all is a complete accident--the unintended consequence of 3 InCopy capabilities: access to the links palette (intended for the management of placed images), the ability to use an InDesign layout for preview (so one story can be simultaneously linked to both an XML file <em>and</em> a .incx file), and the ability to maintain a live link to to text files (meant for Word and spreadsheets). Sometimes things just fall into place.</p>
<p>Editors can do some work, like styling, and working with boilerplate (untagged) content in the layout file. But they must understand the fundamental truth that anything they do between the tags in the layout will be wiped out the next time the XML file is saved. Stuff outside the tags, in whitespace elements, remains.</p>
<p>At the end of the day, when all is said and done, you still have intact XML files, with the most up-to-date content, ready to be flowed into whatever template or media you need.</p>
<p><strong>Bonus Points<br />
</strong></p>
<p>At any point in this workflow you can use MapForce to create XSLT to transform your content, making it fit another purpose. You don’t need automated workflow systems or scripts to make that transformation happen now that InDesign supports XSLT. Examples of what  you can do with XSLT: Making HTML for Web presentation, making PDF, making alternative print products by gathering or sorting content according to attributes, making <a title="NIMAS" href="http://nimas.cast.org/">NIMAS</a> files.</p>
<p style="font-weight:bold;">Math Doesn’t Add Up</p>
<p>All this is great, but it will not work for you if you need MathML. The only ways to get MathML in and out of InDesign involve scripted solutions, or customized versions of 3rd party plug-ins like <a title="MathMagic" href="http://www.mathmagic.com/">MathMagic</a>. I hope that some day <a title="i.t.i.p." href="http://itip-gmbh.eu/">InMath</a>, which has always been my favorite equation editor for InDesign, will add MathML support. Design Science’s <a title="MathType" href="http://www.dessci.com/en/products/mathtype_mac/default.htm">MathType</a> speaks fluent MathML, and you can place those equations (in EPS format) into an InDesign layout. <a title="PowerMath" href="http://www.phsoftware.com/pages/powermath_indesign.html">PowerMath</a> also exists for InDesign but I haven’t tried it out. Note to self: I should do a future post comparing all the different ways to do math in InDesign.</p>
<p><strong>Next Steps</strong></p>
<p>My next project (if ever stop spending all my free time blogging) is to experiment with <a title="Office Open XML" href="http://msdn2.microsoft.com/en-us/library/aa338205.aspx">Office Open XML</a>. Since the new version of Office has XML underlying every file format, why not exploit that, and author in Word, transform OOML to your Schema, then import in InDesign, Web, etc. It should work like a charm, and it’ll probably have authors and editors breathing a sigh of joyful relief that the XML authoring tool they have to use is Word. It may not be the electric car, but it’s pretty close to one of those that runs on old french fry oil. Mmmm, I could go for some fries right now.</p>
]]></content:encoded>
</item>
<item>
<title><![CDATA[I'm addicted to: Desktop Tower Defense]]></title>
<link>http://thelittleblogthatcould.wordpress.com/?p=122</link>
<pubDate>Mon, 24 Mar 2008 18:09:13 +0000</pubDate>
<dc:creator>Lau</dc:creator>
<guid>http://thelittleblogthatcould.wordpress.com/?p=122</guid>
<description><![CDATA[This one came to me from a co-worker.  We were talking about video games and he mentioned he played ]]></description>
<content:encoded><![CDATA[<p>This one came to me from a co-worker.  We were talking about video games and he mentioned he played Desktop Tower Defense (DTD) and asked if we ever played it.</p>
<p>Well, I hadn't, so <a href="http://www.handdrawngames.com/DesktopTD/game.asp" target="_blank">I checked it out</a>.  It is <span style="text-decoration:underline;"><strong>awesome</strong></span>!!</p>
<div style="text-align:center;"><img src="http://thelittleblogthatcould.wordpress.com/files/2008/03/dtd.jpg" alt="DTD" /></div>
<p>I've been playing for a few weeks and have to admit that I spend too much of my regular work time on it.</p>
<p>So go check it out and have fun!!</p>
]]></content:encoded>
</item>
<item>
<title><![CDATA[On why HTML and XML have succeeded, and the lessons therein]]></title>
<link>http://maxtempleton.wordpress.com/?p=13</link>
<pubDate>Thu, 20 Mar 2008 05:21:01 +0000</pubDate>
<dc:creator>Max</dc:creator>
<guid>http://maxtempleton.wordpress.com/?p=13</guid>
<description><![CDATA[Why have HTML and XML succeeded?  I believe it is a combination of four things:
Accessibility
There ]]></description>
<content:encoded><![CDATA[<p>Why have HTML and XML succeeded?  I believe it is a combination of four things:</p>
<p><b>Accessibility</b></p>
<p>There is almost no barrier to entry.  Notepad and IE and you're in business.</p>
<p><b>Resiliance</b></p>
<p>Tolerance for error. Most mistakes you can make in HTML won't prevent your page from displaying. Unlike most programming languages, HTML will let you be and remain imperfect and continue to make progress. XML is tolerant in a different way. The syntax is more rigorous, but also very, very simple and regular, so XML is tolerant of conceptual errors, which, again, don't prevent you from making progress.</p>
<p><b>Broad tiers of utility at different skill levels</b></p>
<p>You can do a lot of HTML and know nothing of cascading style sheets. But once you know them, there is a rich set of new things you can do. You can learn a small set of things, and get a lot of mileage from the knowledge. With each tier, each quantum of skill, there is a broad new plateau that opens.</p>
<p><b>You can go deep</b></p>
<p>This is a corollary of the previous point. From HTML there are cascading style sheets, and Javascript, and you can move to the server and find Linux Apache MySQL and PHP, and there is almost no end to how deep. From basic XML there Data Type Definitions and then Schemas, there are XSLTs and XPath and again, a long path with almost no end. And again, for each step, there is a broad range of new function that is available.</p>
<p>So what is the lesson?  Keys to success for a new development technology:</p>
<ul>
<li>    Give users a low barrier to entry using tools with which they are already skilled.</li>
<li>    Give them a broad range of utility with the first step in skill.</li>
<li>    Give them visible success depite their errors.</li>
<li>    Give them a new plateau of function with each stepwise gain in skill.</li>
<li>    Give them a path to go deep.</li>
</ul>
]]></content:encoded>
</item>
<item>
<title><![CDATA[Na? Was ist Pi?]]></title>
<link>http://kenny1987.wordpress.com/?p=70</link>
<pubDate>Mon, 17 Mar 2008 07:54:09 +0000</pubDate>
<dc:creator>kenny1987</dc:creator>
<guid>http://kenny1987.wordpress.com/?p=70</guid>
<description><![CDATA[Nicht 3.14&#8230; , nicht 3 und auch nicht 42. Sondern 12 :

zumindest in den SGML-Klassen von Java6]]></description>
<content:encoded><![CDATA[<p>Nicht 3.14... , nicht 3 und auch nicht <a href="http://de.wikipedia.org/wiki/42_(Antwort)">42</a>. Sondern 12 :</p>
<p><img src="http://img.thedailywtf.com/images/200803/pi.png" height="301" width="382" /></p>
<p>zumindest in den <a href="http://en.wikipedia.org/wiki/SGML">SGML</a>-<a href="http://java.sun.com/javase/6/docs/api/javax/swing/text/html/parser/DTDConstants.html#PI">Klassen</a> von <a href="http://en.wikipedia.org/wiki/Java_6">Java6</a>. Dort meint PI allerdings etwas anderes als die Zahl, nämlich eine Document <i>P</i>rocessing <i>I</i>nstruction. Trotzdem lustig :)</p>
]]></content:encoded>
</item>
<item>
<title><![CDATA[Happy Birthday Desktop Tower Defense!]]></title>
<link>http://novelconcepts.wordpress.com/?p=51</link>
<pubDate>Tue, 11 Mar 2008 20:11:20 +0000</pubDate>
<dc:creator>Paul</dc:creator>
<guid>http://novelconcepts.wordpress.com/?p=51</guid>
<description><![CDATA[DTD is one year old this week! In this post I talk about how the game came to be, how it grew, how m]]></description>
<content:encoded><![CDATA[<p>DTD is one year old this week! In this post I talk about how the game came to be, how it grew, how many plays it has and how much money it has earned...  <!--more--></p>
<p>DTD was 'launched' by uploading the link to <a href="http://www.stumbleupon.com/urlarchive/30/www.handdrawngames.com/DesktopTD/" target="_blank">StumbleUpon.com </a>on the 5th March 07. I was at a <a href="http://www.lanse.co.uk/" target="_blank">LAN </a>party at the time and looking back at it now I really should have noticed that perhaps DTD was a little bit special because a lot of the gamers were playing it rather than blowing holes in each other at Counterstrike. Unfortunately they were still shouting and cursing but this time at the audacity of the flying creeps avoiding their mazes. :o)</p>
<p>At the time I was working for a small software company as a Visual Basic developer. I had watched my good friend Dave Scott code <a href="http://www.novelconcepts.co.uk/FlashElementTD/" target="_blank">Flash Element TD</a> during December and the massive popularity of it's launch in January spurred me on to create my own TD. I spent February learning Flash 8 and, with a little help from Dave, coding DTD 1.0. The original name for game was actually going to be Paper TD. I had quickly decided on a hand drawn look for the towers and situating the game on paper or a notepad seemed a logical choice.</p>
<p><a href="http://novelconcepts.wordpress.com/files/2008/03/screeny1.png" title="Early prototype for DTD"></a></p>
<div style="text-align:center;"><img src="http://novelconcepts.wordpress.com/files/2008/03/dtd01.png" alt="DTD01" border="1" /></div>
<p>But I felt the game seemed quite flat so I decided to try a view that gave more depth:</p>
<div style="text-align:center;"><img src="http://novelconcepts.wordpress.com/files/2008/03/dtd02.png" alt="DTD02" /></div>
<p>Yuck. But fortunately serendipity stepped in and the next attempt produced not only the new background but also a new name, Desktop Tower Defense!</p>
<div style="text-align:center;"><img src="http://novelconcepts.wordpress.com/files/2008/03/dtd03.png" alt="DTD03" /></div>
<p>To complete the launch I created a simple website to provide instructions and scoreboards. It was later expanded to include a forum and group scoreboards. I launched DTD in the same way that Dave had which was to simply post the link up to StumbleUpon.com. That produced some small steady traffic over the first few hours but then a Scandinavian website linked to it (very quick to catch new games those guys) and by the end of the first day it had received 30,000 hits. At the time, it was an amazing thing and I remember spending most of the day (and then the week) F5'ing my stat pages! After a few days the site was dugg on Digg.com (killed the server) and was up to 40,000 hits per day. All the activity made it difficult to not improve the game so I started rolling out updates.</p>
<p>Version 1.02 was launched two weeks later which incorporated some new modes and started to fix holes that were being used for hacked/exploited scores. It was dugg again, and pushed above 60K per day.</p>
<p>Version 1.2 was launched two weeks after that and things went crazy for a while. I had upgraded my server from a celeron to a Pentium 4 HT (ooooh) but the 3rd digg killed it yet again, (Probably my poor database code) and the site peaked at over 200,000 pages per day. If you are interested in the stats for the year here they are:</p>
<p><img src="http://novelconcepts.wordpress.com/files/2008/03/dtd04b.png" alt="DTD06b" /></p>
<p>At this point I started to get more serious about earning some money! I already had MochiAds running on the game so I added AdSense ads and a donation box. I tried an affliate program from a t-shirt website but it didn't work out. Over the next couple of months I put out some more bug fixes and added the group &#38; challenge scoreboards to the site. DTD remained at version 1.2. I expected the popularity of DTD to drop off but, after a pause, it carried on going up. It was mentioned on a few popular blogs/sites such as TechCrunch and GigaOm. I did an interview on how much the game was making (which was quoted wildly inaccurately by most other sites) and my work place found out about it. Oops. To cut a short story even shorter I looked at how much DTD was earning, thought 'yeah I can mostly live on that' and decided to quit.</p>
<p>All the activity around DTD spurred me on again to create a new version. Which, as I was depending on the earnings from the game and a games developer (chortle) full time, I thought I should make it look more professional. Version 1.5 was released at the end of June and was much faster, prettier and better all round. Unfortunately the keen DTD'ers <i>hated</i> it! For a month I received hundreds of mails and forum posts complaining about how I had ruined the game. They hated the new design, the new creeps, the new towers and the new modes. Even TechCrunch didn't like it. Bah. In the end I made both the old and the new versions available to keep everybody happy. Most players are now playing 1.5 (and agree its the better version :o).<i><br />
</i></p>
<p>I had also agreed a sponsorship deal with Kongregate.com for 1.5 which brought in some welcome extra money. The revenue I received from DTD varied quite dramatically through out the year and has proven to be the most frustrating part of the whole experience. This is a graph showing how much was earned <i>per load</i> during the course of the year:</p>
<p><a href="http://novelconcepts.wordpress.com/files/2008/03/dtd05.png" title="DTD05"><img src="http://novelconcepts.wordpress.com/files/2008/03/dtd05b.png" alt="DTD5b" /></a></p>
<p>Aah yes half a cent per load, those were the good ol' days. Those of you who run websites will probably have worked out that the current earnings of 0.2 cents per load is equivalent to a CPM of $2. Which I don't think is bad for a single flash game. Imagine if I had two!</p>
<p>My total earnings from DTD for the year from <a href="http://www.MochiAds.com" target="_blank">MochiAds</a>, on-site advertising, sponsorship and donations has amounted to just over $100K from 40M loads. Which is nice.</p>
<p>In part 2 I will talk about my dealings with game publishers, licensing headaches, going to the GDC and what is in store for 2008.</p>
]]></content:encoded>
</item>
<item>
<title><![CDATA[I am going acronym crazy, Implementing Adage ATF files using XML]]></title>
<link>http://mellerbeck.wordpress.com/?p=83</link>
<pubDate>Tue, 12 Feb 2008 22:09:47 +0000</pubDate>
<dc:creator>mellerbeck</dc:creator>
<guid>http://mellerbeck.wordpress.com/?p=83</guid>
<description><![CDATA[So our ERP can accept XML files. So I am trying to figure out how to get the X12 doc into the proper]]></description>
<content:encoded><![CDATA[<p>So our ERP can accept XML files. So I am trying to figure out how to get the X12 doc into the proper XML form. Luckily I have altova mapforce, and I recently just downloaded the trial of Altova XML Spy... I'll probably end buying it as well, I wonder if they will let me take advantage of their package pricing even though I already bought a single version of Mapforce by itself? Anyways since the ERP provided a DTD (Document Type Definition) I found out that you can use XMLSpy to convert a DTD into an XSD which MapForce can use as an XML structure definition. And right now while typing I just realized that MapForce can also accept DTD file so I will just skip that step.</p>
<p>So now I just need to drag my EDI over to the DTD and tada the import will be complete!</p>
<p>Altova Mapforce is the best!</p>
]]></content:encoded>
</item>
<item>
<title><![CDATA["W3C Gets Excessive DTD Traffic"...]]></title>
<link>http://rejex.wordpress.com/2008/02/09/w3c-gets-excessive-dtd-traffic/</link>
<pubDate>Sat, 09 Feb 2008 12:02:46 +0000</pubDate>
<dc:creator>jp</dc:creator>
<guid>http://rejex.wordpress.com/2008/02/09/w3c-gets-excessive-dtd-traffic/</guid>
<description><![CDATA[Sul solito Slashdot è apparso un post a tratti esilarante&#8230;
Intitolato &#8220;W3C Gets Excessi]]></description>
<content:encoded><![CDATA[<p>Sul solito <a href="http://slashdot.org/">Slashdot</a> è apparso un post a tratti esilarante...</p>
<p>Intitolato "<a href="http://developers.slashdot.org/developers/08/02/08/2238228.shtml">W3C Gets Excessive DTD Traffic</a>", rimanda ad una <a href="http://www.w3.org/blog/systeam/2008/02/08/w3c_s_excessive_dtd_traffic">pagina</a> "ufficiale" sul sito del <a href="http://it.wikipedia.org/wiki/W3C">W3C</a> in cui si parla di un certo "problemino"...</p>
<p>A quanto pare il W3C viene letteralmente sommerso di verifiche di <a href="http://it.wikipedia.org/wiki/Document_Type_Definition">DTD</a>.</p>
<p>Cerchiamo di capirci...</p>
<p>Chi "mastica" codice-con-i-tag tutti i giorni ben saprà che, ad esempio, ogni file <a href="http://it.wikipedia.org/wiki/XHTML">XHTML</a> che ben si rispetti inizia con qualcosa tipo:</p>
<p><font face='Courier New, Courier, mono' color='#003366'>&#60;!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"<br />
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"&#62;<br />
</font></p>
<p>In parole povere, quel file XHTML verrà controllato, verificando se rispetta uno schema apposito (DTD) che si trova a quell'indirizzo del W3C.</p>
<p>Leggendo sempre sul sito W3C, appare questa frase, che francamente mi ha fatto veramente ridere:</p>
<p><em>Note that these are not <a href="http://it.wikipedia.org/wiki/Hyperlink">hyperlinks</a>; these <a href="http://it.wikipedia.org/wiki/Uniform_Resource_Identifier">URI</a>s are used for identification. This is a machine-readable way to say "this is <a href="http://it.wikipedia.org/wiki/HTML">HTML</a>".</em></p>
<p>Trascuriamo la sottigliezza per cui un <a href="http://it.wikipedia.org/wiki/Uniform_Resource_Locator">URL</a> (usato guarda caso per gli hyperlink) sia una sottocategoria di URI... Sorvoliamo anche sul fatto che poi uno "non ci debba sempre e per forza cliccare sopra" (sto semplificando, ovviamente) ogni volta che lo vede...</p>
<p>Cioè, fammi capire, ... imponi che chi scrive un file XHTML standard "citi" il tuo indirizzo di casa e poi ti lamenti se tanta (troppa) gente viene da te a controllare se rispetta o meno quello che tu hai imposto?</p>
<p>Ringrazia piuttosto la maggior parte dei <a href="http://it.wikipedia.org/wiki/Browser">browser</a>, che mantiene in <a href="http://it.wikipedia.org/wiki/Cache">cache</a> quel DTD e ti risparmia già moltissime (inutili) richieste!</p>
<p>Ce n'è di gente che sta male... :P</p>
<p><em><font color='#993333'><strong>PS</strong></font>: leggere l'<a href="//www.w3.org/blog/systeam/2008/02/08/w3c_s_excessive_dtd_traffic">articolo</a> sul sito del W3C mi ha fatto davvero ridere, tuttavia ne consiglio un'attenta lettura a tutti i <a href="http://it.wikipedia.org/wiki/Webmaster">Webmaster</a>. Contiene diversi suggerimenti interessanti. Buona lettura! :P</em></p>
]]></content:encoded>
</item>
<item>
<title><![CDATA[Instalación y Configuración de Apache Tomcat 6.0 en Windows XP]]></title>
<link>http://jcalderon.wordpress.com/2008/01/04/instalacion-y-configuracion-de-apache-tomcat-60-en-windows-xp/</link>
<pubDate>Fri, 04 Jan 2008 09:20:35 +0000</pubDate>
<dc:creator>jcalderon</dc:creator>
<guid>http://jcalderon.wordpress.com/2008/01/04/instalacion-y-configuracion-de-apache-tomcat-60-en-windows-xp/</guid>
<description><![CDATA[En este post tratare algunos aspectos importantes en la instalaciòn y configuración Apache Tomcat ]]></description>
<content:encoded><![CDATA[<p>En este post tratare algunos aspectos importantes en la instalaciòn y configuración Apache Tomcat versión6.0:</p>
<p><a HREF="http://jcalderon.wordpress.com/files/2008/01/apache1.jpg" TITLE="apache1.jpg"></p>
<div STYLE="text-align: center"><img SRC="http://jcalderon.wordpress.com/files/2008/01/apache1.jpg" ALT="apache1.jpg" /></div>
<p></a></p>
<p>Es un servidor web (http) y funciona como un contenedor de servlets. Es la implementación de referencia de las especificaciones de servlets 2.5 y de Java Serves Pages (JSP) 2.1, especificaciones para Java Community Process, usado como servidor web autónomo en entornos con alto nivel de tráfico y alta disponibilidad.</p>
<p>Dado que Apache Tomcat fue escrito en Java, funciona en cualquier sistema operativo que disponga de la máquina virtual Java.</p>
<p>Download:<br />
<a TARGET="_blank" HREF="http://java.sun.com/javase/downloads/index.jsp">Java Platform, Standard Edition 6 Development Kit (JDK 6)</a>. Debe instalarse previo a la instalación de apache-tomcat.<br />
<a TARGET="_blank" HREF="http://tomcat.apache.org/download-60.cgi">Apache-tomcat-6.0.14</a>. No descargar la versión que lo instala como un servicio de Windows si se va a usar para desarrollar. Recomiendo Descargar la versión que se instala manualmente descomprimiendo un zip (Windows) o un tar.gz (Linux).</p>
<p><a TITLE="apache2.jpg" HREF="http://jcalderon.wordpress.com/files/2008/01/apache2.jpg"></p>
<div STYLE="text-align: center"><img ALT="apache2.jpg" SRC="http://jcalderon.wordpress.com/files/2008/01/apache2.jpg" /></div>
<p></a></p>
<ul>
<li>Descomprimir el archivo apache-tomcat. Ejemplo:</li>
</ul>
<p><a TITLE="apache3.jpg" HREF="http://jcalderon.wordpress.com/files/2008/01/apache3.jpg"></p>
<div STYLE="text-align: center"><img ALT="apache3.jpg" SRC="http://jcalderon.wordpress.com/files/2008/01/apache3.jpg" /></div>
<p></a></p>
<ul>
<li>Acceder al directorio donde se a descomprimido. Ejemplo:</li>
</ul>
<p><a TITLE="apache4.jpg" HREF="http://jcalderon.wordpress.com/files/2008/01/apache4.jpg"></p>
<div STYLE="text-align: center"><img ALT="apache4.jpg" SRC="http://jcalderon.wordpress.com/files/2008/01/apache4.jpg" /></div>
<p></a></p>
<p>$CATALINA_HOME = Representa la raiz donde se ha instalado apache-tpmcat.<br />
Cada uno de los directorios de la imagen 4 tienen su respectivo significado:</p>
<p><strong>/bin</strong> - arranque, cierre, y otros scripts y ejecutables<br />
<strong>/temp </strong>– archivos temporales<br />
<strong>/conf </strong>– archivos XML y los correspondientes DTD para la configuración de apache-tomcat el mas importante es server.xml.<br />
<strong>/logs</strong> – archivos de registro (log) de apache-tomcat.<br />
<strong>/webapps</strong> - directorio que contiene las aplicaciones web<br />
<strong>/work</strong> - almacenamiento temporal de ficheros y directorios</p>
<ul>
<li>El siguiente paso quizás es uno de los mas importantes y es la creación de la variable de entorno JAVA_HOME. Ejemplo:</li>
</ul>
<p>JAVA_HOME = directorio del JDK.</p>
<p><a TITLE="apache5.jpg" HREF="http://jcalderon.wordpress.com/files/2008/01/apache5.jpg"></p>
<div STYLE="text-align: center"><img ALT="apache5.jpg" SRC="http://jcalderon.wordpress.com/files/2008/01/apache5.jpg" /></div>
<p></a></p>
<p>Para acceder a la creación de la variable de entorno: Windows+Pausa&#62;Opciones Avanzadas&#62;Variables de Entorno&#62;Nueva</p>
<ul>
<li> Existen dos archivos sumamente importantes los cuales nos permitirán iniciar y parar apache-tomcat se encuentra en el siguiente directorio.</li>
</ul>
<p>$CATALINA_HOME/bin/startup = para iniciar o arrancar<br />
$CATALINA_HOME/bin/shutdown = para parar o detener<a TITLE="apache6.jpg" HREF="http://jcalderon.wordpress.com/files/2008/01/apache6.jpg"></p>
<div STYLE="text-align: center"><img ALT="apache6.jpg" SRC="http://jcalderon.wordpress.com/files/2008/01/apache6.jpg" /></div>
<p></a></p>
<ul>
<li>Seguidamente abrimos un navegador web y escribimos en el URL.</li>
</ul>
<p>http://{host}:{port}/ = donde {host}{port} representa el hostname y el puerto donde corre apache-tomcat, entonces quedaría http://localhost:8080/ y aparecerá la pagina de bienvenida de apache-tomcat.<a TITLE="apache7.jpg" HREF="http://jcalderon.wordpress.com/files/2008/01/apache7.jpg"></p>
<div STYLE="text-align: center"><img ALT="apache7.jpg" SRC="http://jcalderon.wordpress.com/files/2008/01/apache7.thumbnail.jpg" /></div>
<p></a></p>
<p>Nota: Recuerda iniciar apache-tomcat o de lo contrario se producirá un ERROR.</p>
<ul>
<li>Para poder acceder a las aplicaciones de gestión y administración de apache-tomcat es necesario crear un usuario accediendo al siguiente directorio.</li>
</ul>
<p>$CATALINA_HOME/conf/tomcat-users.xml = este archive permite crear un username, password and roles</p>
<p><a TITLE="apache8.jpg" HREF="http://jcalderon.wordpress.com/files/2008/01/apache8.jpg"></p>
<div STYLE="text-align: center"><img ALT="apache8.jpg" SRC="http://jcalderon.wordpress.com/files/2008/01/apache8.jpg" /></div>
<p></a></p>
<ul>
<li>Entre la etiqueta tenemos que agregar la linea que permitirá crear un usuario. Ejemplo:</li>
</ul>
<p><a TITLE="apache9.jpg" HREF="http://jcalderon.wordpress.com/files/2008/01/apache9.jpg"></p>
<div STYLE="text-align: center"><img ALT="apache9.jpg" SRC="http://jcalderon.wordpress.com/files/2008/01/apache9.jpg" /></div>
<p></a></p>
<ul>
<li>Procedemos a parar e iniciar apache-tomcat &#62; http://localhost:8080/ en el navegador &#62; clic en Tomcat Manager &#62; debemos ingresar el username and password anteriormente creado en el archivo tomcat-users.xml.</li>
</ul>
<p><a TITLE="apache10.jpg" HREF="http://jcalderon.wordpress.com/files/2008/01/apache10.jpg"></p>
<div STYLE="text-align: center"><img ALT="apache10.jpg" SRC="http://jcalderon.wordpress.com/files/2008/01/apache10.jpg" /></div>
<p></a></p>
<p ALIGN="center">Quedaría algo así. Ejemplo:</p>
<p><a TITLE="apache11.jpg" HREF="http://jcalderon.wordpress.com/files/2008/01/apache11.jpg"></p>
<div STYLE="text-align: center"><img ALT="apache11.jpg" SRC="http://jcalderon.wordpress.com/files/2008/01/apache11.thumbnail.jpg" /></div>
<p></a></p>
<p ALIGN="center">Finalmente pongo la Referencia en donde me he basado para este post</p>
<p ALIGN="center">{<a TARGET="_blank" HREF="http://tomcat.apache.org/">http://tomcat.apache.org/</a>}</p>
]]></content:encoded>
</item>
<item>
<title><![CDATA[Xml validation with Schematron without a hassle]]></title>
<link>http://codemate.wordpress.com/2007/12/06/xml-validation-with-schematron-without-a-hassle/</link>
<pubDate>Thu, 06 Dec 2007 08:29:10 +0000</pubDate>
<dc:creator>Danil Glinenko</dc:creator>
<guid>http://codemate.wordpress.com/2007/12/06/xml-validation-with-schematron-without-a-hassle/</guid>
<description><![CDATA[Recently I&#8217;ve been looking for XML validation solution. Yes, there are many out of there. But ]]></description>
<content:encoded><![CDATA[<p>Recently I've been looking for XML validation solution. Yes, there are many out of there. But I've been looking for the best one.This is what's drawn my attention:
<ol>
<li>Document Type Definition (DTD) - XML's built-in schema language
<ul>
<li>Pros and cons:
<ul>
<li>Not easy for interpreting by humans;</li>
<li>Doesn't provide data validation, provides only structure validation;</li>
<li>Non-XML syntax;</li>
<li>Doesn't have good support of namespaces.</li>
</ul>
</li>
</ul>
</li>
<li><a href="http://www.w3.org/XML/Schema">W3C XML Schema (WXS)</a> - an obect-oriented XML schema language. WXS also provides a type system for constraining the character data of an XML document. WXS is maintained by the World Wide Web Consortium (W3C) and is a W3C Recommendation (that is, a ratified W3C standard specification)
<ul>
<li> Pros and cons:
<ul>
<li>Xml based syntax;</li>
<li>Has data validation;</li>
<li>Too restrictive, precise, verbose;</li>
<li>Provides very weak support for unordered content;</li>
<li>Too long learning curve;</li>
<li>It's not easy to write.</li>
</ul>
</li>
</ul>
</li>
<li><a href="http://relaxng.org/">RELAX NG (RNG)</a> - a pattern-based, user-friendly XML schema language. RNG schemas may also use types to constrain XML character data. RNG is maintained by the Organization for the Advancement of Structured Information Standards (OASIS) and is both an OASIS and an ISO (International Organization for Standardization) standard.
<ul>
<li>Pros and cons:
<ul>
<li>Still grammar based;</li>
<li>Uses XML syntax to represent schemas;</li>
<li>Supports data-typing;</li>
<li>Integrates attributes into content models;</li>
<li>Supports XML namespaces;</li>
<li>Supports unordered content;</li>
<li>Supports context-sensitive content models;</li>
<li>Simple syntax and relatively easy for reading by humans;</li>
<li>Data types are not part of RELAX NG, but can be specified in a modular fashion.</li>
</ul>
</li>
</ul>
</li>
<li><a href="http://www.ascc.sinica.edu.tw/xml/resource/schematron/Schematron2000.html">Schematron</a> - a rules-based XML schema language. Whereas DTD, WXS, and RNG are designed to express the structure of a content model, Schematron is designed to enforce individual rules that are difficult or impossible to express with other schema languages. Schematron is intended to supplement a schema written in structural schema language such as the aforementioned. Schematron is in the process of becoming an ISO standard.
<ul>
<li> Pros and cons:
<ul>
<li>Allows directly expressing rules w/o creating a whole grammar;</li>
<li>Very flexible;</li>
<li>More expressive even than RELAX NG;</li>
<li>Relies almost entirely on XPath query patterns for defining rules and checks;</li>
<li>Assertion based;</li>
<li>Short learning curve;</li>
<li>Trivial to implement on top of XSLT.</li>
</ul>
</li>
</ul>
</li>
</ol>
<p><!--more-->Considering all pros and cons I really was between RELAX NG and Schematron. WXS is too restrictive and verbose for my needs and I wasn't going to map XML structures to any data objects. DTD isn't worth at all. I needed something simple and flexible with short learning curve and easy to use. The more I'm looking at Schematron the more I like it. It's not grammar-based like RELAX or WXS. It based on XPATH, assertion and rules.Writing Schematron schema to me is like writing unit-tests. You make assumptions about the structure of your XML and check them with assertion. It's very flexible approach you can check only those thing you actually care about. It requires a little different view on XML validation process and you'll need to get used to it. But hey! it's cool. So, try it.This is example from an tutorial on <a href="http://www.ibm.com/developerworks/edu/x-dw-xschematron-i.html">Developer works</a>.
<pre>&#60;?xml version="1.0" encoding="UTF-8"?&#62;
&#60;schema xmlns="http://www.ascc.net/xml/schematron"&#62;
  &#60;title&#62;Technical document schema&#60;/title&#62;
    &#60;pattern id="rightdoc" name="Document root"&#62;
      &#60;!-- Validates that ROOT element named as "doc" --&#62;
      &#60;rule context="/"&#62;
        &#60;assert test="doc"&#62;Root element must be "doc".&#60;/assert&#62;
      &#60;/rule&#62;
    &#60;/pattern&#62;
    &#60;pattern id="extradoc" name="Extraneous docs"&#62;
      &#60;rule context="doc"&#62;
      &#60;!-- Validates that "doc" element is only allowed at the ROOT --&#62;
        &#60;assert test="not(ancestor::*)"&#62;
        The "doc" element is only allowed at the document root.
        &#60;/assert&#62;
      &#60;/rule&#62;
    &#60;/pattern&#62;
    &#60;pattern id="majelements" name="Major elements"&#62;
      &#60;rule context="doc"&#62;
        &#60;assert test="prologue"&#62;
        &#60;name/&#62; must have a "prologue" child.
        &#60;/assert&#62;
        &#60;assert test="section"&#62;
        &#60;name/&#62; must have at least one "section" child.
        &#60;/assert&#62;
      &#60;/rule&#62;
    &#60;/pattern&#62;
    &#60;!-- Validating for a certain number of elements --&#62;
    &#60;pattern name="Minimum keywords"&#62;
      &#60;rule context="prologue"&#62;
        &#60;assert test="count(keyword) &#62; 2"&#62;
          At least three keywords are required.
        &#60;/assert&#62;
      &#60;/rule&#62;
    &#60;/pattern&#62;
	&#60;!-- Validating a sequence of elements. following-sibling::*[1], selects the element immediately following the context (title).
The next step, self::subtitle, ensures that this element is a subtitle.--&#62;
    &#60;pattern name="Title with subtitle"&#62;
      &#60;rule context="title"&#62;
        &#60;assert test="following-sibling::*[1]/self::subtitle"&#62;
          A "title" must be immediately followed by a "subtitle".
        &#60;/assert&#62;
      &#60;/rule&#62;
    &#60;/pattern&#62;
&#60;/schema&#62;</pre>
<p> Isn't this cool?</p>
]]></content:encoded>
</item>
<item>
<title><![CDATA[Estructura del html y primeros pasos del css]]></title>
<link>http://donestandares.wordpress.com/2007/12/05/estructura-del-html-y-primeros-pasos-del-css/</link>
<pubDate>Wed, 05 Dec 2007 19:29:46 +0000</pubDate>
<dc:creator>donestandares</dc:creator>
<guid>http://donestandares.wordpress.com/2007/12/05/estructura-del-html-y-primeros-pasos-del-css/</guid>
<description><![CDATA[
Hi!, Ahora vamos a comenzar con todo el cuento de la creación de paginas web con css, lo primero e]]></description>
<content:encoded><![CDATA[<p><img src="http://donestandares.wordpress.com/files/2007/12/dreamweaver.jpg" alt="Dreamweaver" /></p>
<p>Hi!, Ahora vamos a comenzar con todo el cuento de la creación de paginas web con css, lo primero es lo primero. crear un documento en dreamweaver... ó si usas archivos de texto pues creas un<strong> index.html</strong></p>
<p>Ahora, como sabes... todo tiene un orden, las etquetas html también, todo html inicia con algo llamado DOCTYPE, son algunas indicaciones como el documento y unos estandares que se manejan para el html, generalmente... para todo html se maneja la siguiente etiqueta:</p>
<p>&#60;!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transición//EN" "<a href="http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd</a>"&#62;</p>
<p>La anterior etiqueta SIEMPRE va al comienzo de todo documento html, Ahora hay un dato importante. Recuerdas el xml, del que tanto hablan, pues para los que noconosen el xml es un estandar y este maneja etiquetas a la hora de escribirse, por ejemplo los RSS estan basados en xml, entonces digamos en un documento xml tenemos que insertar NOMBRE, APELLIDOS, según las especificaciones el xml debería ir así, con etiquetas según la info que vamos a escribir: &#60;nombre&#62;Andrés&#60;/nombre&#62;&#60;apellido&#62;Lara&#60;/apellido&#62;, si analizamos la etiqueta cuando quiero terminar el contenido la cierro con una etiqueta similar, pero precedida con un / , esto nos indica que la etiqueta termino, ejemplo: &#60;comentario&#62;"Hola pedrito como vas?"&#60;/comentario&#62;, ahí el comentario termina con &#60;/comentario&#62;, así se puede entender donde comienza las cosas y donde terminan, entonces estos genios... del html comenzaron a trabajar en el html y descubrieron que el html podía ser un xml... ósea si yo comienso una etiqueta la cierro con un &#60;/, y todo se dio para que crearan algo llamado xhtml, que quiere decir... un html muy parecido al xml.</p>
<p>Volviendo al tema :P la siguiente etiqueta es la <strong>html</strong>, que es la que me dice si el documento html que estoy haciendo es HTML ó es XHTML, como nosotros vamos a la delantera, y queremos descrestar a todos, vamos a usar el xhtml que es le mas estandar, el que todos usan, así que si en la calle te dicen "OYE TRABAJAS CON HTML, no! eso es del pasado yo trabajo con xhtml!", entonces seguimos, la etiqueta <strong>html </strong>va con esta estructura:</p>
<p>&#60;html xmlns="<a href="http://www.w3.org/1999/xhtml">http://www.w3.org/1999/xhtml</a>" xml:lang="es-ES" lang="es-ES"&#62;</p>
<p>Recuerda que esta etiqueta <strong>HTML</strong> esta abierta hasta el final, solo se cierra en el ultimo punto, a continuación vemos una etiqueta llamada <strong>HEAD</strong> y esta etiqueta maneja como su nombre lo dice en español <strong>CABEZA </strong>en español, esta etiqueta hasta donde se cierra maneja todo lo relacionado con titulos... iconos y otras vainas que a continuación vamos a ver, la estructura del head es simple solo abrimos la etiqueta:</p>
<p>&#60;head&#62;</p>
<p>Ahora vamos con las etiquetas <strong>META</strong>, son etiquetas que sirve para dar algunos detalles del documento <strong>XHTML </strong>por ejemplo con la etiqueta <strong>META</strong> podemos manejar las palabras claves... el autor... y la descripción del sitio, por que no me puedo demorar mucho en la explicación les dejo dos enlaces relacionados con <strong>HEAD</strong> y con <strong>META</strong></p>
<p><a href="http://gfc.edu.co/estudiantes/anuario/2001/sistemas/sergio/principal.html" title="Etiqueta head">Etiqueta head</a></p>
<p><a href="http://es.tldp.org/Manuales-LuCAS/doc-curso-html/doc-curso-html/x3606.html">Etiquetas meta</a></p>
<p>Y la estructura de las etiquetas meta viene siendo así:</p>
<p>&#60;meta name="author"<br />
CONTENT="WebMaster de Los Alpes"&#62;</p>
<p>&#60;meta name="keywords"<br />
CONTENT="viajes, ofertas, Los Alpes, Orlando, Nueva Zelanda"&#62;</p>
<p>&#60;meta name="description"<br />
CONTENT="La agencia de viajes Los Alpes tiene un gran prestigio en el mundo de las empresas y combina una gran calidad con unos excelentes<br />
precios."&#62;</p>
<p>Ahora si vamos con una etiqueta importante, la etiqueta <strong>TITLE </strong>, etiqueta fundamental si queremos hablar del titulo del documento <strong>XHTML </strong>, ¿Si han visto en las paginas web que aparece el titulo del sitio en la ventana del navegador?, esto lo podemos hacer mediante la eqitueta <strong>TITLE </strong>, su estructura es la siguiente:</p>
<p>&#60;title&#62;La empresa de mi papa.com&#60;/title&#62;</p>
<p>Ahora seguimos con algo que es muy importante entender... por eso es necesario que antes de continuar, creemos una nueva carpeta en donde estamos alojando el <strong>index.html</strong>, la carpeta deve llamarse "css", sin comillas, en esta carpeta vamos a guardar los archivos css necesarios a lo largo de toooooodo el blog.</p>
<p>dentro de la carpeta css, crea un archivo llamado: "principal.css", sin comillas, y a continuación dentro del archivo inserta el siguiente código:</p>
<p>@charset "utf-8";<br />
/* CSS Document */</p>
<p>Esa porción de código SIEMPRE deve ir SIEMPRE, ahora que creamos el archivo .css continuamos en <strong>index.html</strong>, ahora para llamar al archivo css que acabamos de crear, utilizamos una instrucción muy simple:</p>
<p>&#60;style type="text/css" media="screen"&#62;<br />
  &#60;!-- @import url(css/principal.css);--&#62;<br />
&#60;/style&#62;</p>
<p>Con esta instrucción, estamosagregando el archivo css, con esto permitimos que el archivo css quede en el caché, como algunas imagenes.</p>
<p>Ahora el paso ultimo seria cerrar la etiqueta &#60;/head&#62;, para indicar que hasta ahí va todo.</p>
<p>A continuación abrimos una etiqueta llamada <strong>BODY</strong>, y el código seria así:</p>
<p>&#60;body&#62;</p>
<p>Repasemos hasta ahora como tenemos el código aproximadamente:</p>
<p>&#60;!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "<a href="http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd</a>"&#62;<br />
&#60;html xmlns="<a href="http://www.w3.org/1999/xhtml">http://www.w3.org/1999/xhtml</a>" xml:lang="es-ES" lang="es-ES"&#62;<br />
&#60;head&#62;<br />
&#60;meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /&#62;<br />
&#60;meta name="author"<br />
CONTENT="WebMaster de Los Alpes"&#62;<br />
&#60;meta name="keywords" CONTENT="viajes, ofertas, Los Alpes, Orlando, Nueva Zelanda"&#62;<br />
&#60;meta name="description" CONTENT="La agencia de viajes Los Alpes tiene un gran prestigio en el mundo de las empresas y combina una gran calidad con unos excelentes precios."&#62;<br />
&#60;link rel="shortcut icon" href="img/favicon.ico" mce_href="img/favicon.ico" type="image/x-icon" /&#62;<br />
&#60;title&#62;La empresa de mi papa&#60;/title&#62;</p>
<p>&#60;style type="text/css" media="screen"&#62;<br />
  &#60;!-- @import url(css/basico.css);--&#62;<br />
  &#60;/style&#62;<br />
&#60;/head&#62;<br />
&#60;body&#62;</p>
<p>Ahora dentro del body va el contenido del xhtml, desde tablas hasta imagenes, todo lo que vayamos a trabajar, lo anteriormente colocado es esencial para poder laborar con estos documentos ya que se hace gura que aya compatibilidad entre navegadores y entre dispositivos anteriormente comentados.</p>
<p>Para cerrar solo quedaría colocar las etiquetas finales que seria finalizar la etiqueta <strong>BODY</strong> y <strong>HTML:</strong></p>
<p>&#60;/body&#62;<br />
&#60;/html&#62;</p>
<p>y pues el código quedaría algo así:</p>
<p>&#60;!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "<a href="http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd</a>"&#62;<br />
&#60;html xmlns="<a href="http://www.w3.org/1999/xhtml">http://www.w3.org/1999/xhtml</a>" xml:lang="es-ES" lang="es-ES"&#62;<br />
&#60;head&#62;<br />
&#60;meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /&#62;<br />
&#60;meta name="author"<br />
CONTENT="WebMaster de Los Alpes"&#62;<br />
&#60;meta name="keywords" CONTENT="viajes, ofertas, Los Alpes, Orlando, Nueva Zelanda"&#62;<br />
&#60;meta name="description" CONTENT="La agencia de viajes Los Alpes tiene un gran prestigio en el mundo de las empresas y combina una gran calidad con unos excelentes precios."&#62;<br />
&#60;title&#62;La empresa de mi papa&#60;/title&#62;<br />
  &#60;style type="text/css" media="screen"&#62;<br />
  &#60;!-- @import url(css/principal.css);--&#62;<br />
  &#60;/style&#62;<br />
&#60;/head&#62;<br />
&#60;body&#62;</p>
<p>&#60;/body&#62;<br />
&#60;/html&#62;</p>
<p>Espero que les aya servido para comenzar, APENAS ES LO BASICO, mas adelante iremos con mas, mañana comenzamos ya completamente con las clases :P chau!.</p>
]]></content:encoded>
</item>
<item>
<title><![CDATA[Qu'est-ce que XML Schema ?]]></title>
<link>http://formatrice.wordpress.com/2007/11/28/quest-ce-que-xml-schema/</link>
<pubDate>Wed, 28 Nov 2007 16:54:07 +0000</pubDate>
<dc:creator>Sarah Haïm-Lubczanski</dc:creator>
<guid>http://formatrice.wordpress.com/2007/11/28/quest-ce-que-xml-schema/</guid>
<description><![CDATA[Il s&#8217;agit en fait d&#8217;une initiative du W3C, visant à décrire l&#8217;ordonnance des bal]]></description>
<content:encoded><![CDATA[<p>Il s'agit en fait d'une initiative du W3C, visant à décrire l'ordonnance des balises possibles dans un fichier XML, directement en XML. En fait, il s'agit d'une DTD en XML.</p>
]]></content:encoded>
</item>
<item>
<title><![CDATA[XML]]></title>
<link>http://carlossantos.wordpress.com/2007/11/12/xml/</link>
<pubDate>Mon, 12 Nov 2007 16:05:24 +0000</pubDate>
<dc:creator>Carlos Marcelo Santos</dc:creator>
<guid>http://carlossantos.wordpress.com/2007/11/12/xml/</guid>
<description><![CDATA[Hace unos años escribí esta serie de artículos introductorios a la tecnología XML. Quien necesit]]></description>
<content:encoded><![CDATA[<p><span><font face="Times New Roman">Hace unos años escribí esta serie de artículos introductorios a la tecnología XML. Quien necesite puede iniciarse en los siguientes aspectos:</font></span></p>
<p style="margin:0 0 0 0.5in;" class="MsoNormal"><fon