<?xml version="1.0" encoding="UTF-8"?>
<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/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Barriblog &#187; html2xhtml</title>
	<atom:link href="http://www.barriblog.com/index.php/tag/html2xhtml/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.barriblog.com</link>
	<description>Buscando barrios de blogs</description>
	<lastBuildDate>Mon, 30 Jan 2012 16:57:16 +0000</lastBuildDate>
	<language>es</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>Explorando el camino del XHTML</title>
		<link>http://www.barriblog.com/index.php/2009/07/17/explorando-el-camino-del-xhtml/</link>
		<comments>http://www.barriblog.com/index.php/2009/07/17/explorando-el-camino-del-xhtml/#comments</comments>
		<pubDate>Fri, 17 Jul 2009 10:22:37 +0000</pubDate>
		<dc:creator>M.Luz Congosto</dc:creator>
				<category><![CDATA[Entorno de desarrollo]]></category>
		<category><![CDATA[arquitectura]]></category>
		<category><![CDATA[HTML]]></category>
		<category><![CDATA[html2xhtml]]></category>
		<category><![CDATA[tidy]]></category>
		<category><![CDATA[XHTML]]></category>

		<guid isPermaLink="false">http://www.barriblog.com/?p=250</guid>
		<description><![CDATA[0 Los errores sintácticos han sido uno de los problemas que me he encontrado al analizar el código HTML de los blogs con el programa  Lestat, como ya  escribí  hace tiempo en el post titulado  El diablo cojuelo.  Hace unas semanas  Norberto Fernández,  profesor de mi Departamento  me sugirió  que convirtiese el HTML de los [...]]]></description>
			<content:encoded><![CDATA[<div class='dd_post_share'><div class='dd_buttons'><div class='dd_button'><div class='dd-google1-ajax-load dd-google1-250'></div><g:plusone size='medium' href='http://www.barriblog.com/index.php/2009/07/17/explorando-el-camino-del-xhtml/'></g:plusone></div><div class='dd_button'><div class='dd-linkedin-ajax-load dd-linkedin-250'></div><script type='in/share' data-url='http://www.barriblog.com/index.php/2009/07/17/explorando-el-camino-del-xhtml/' data-counter='right'></script></div><div class='dd_button'><div class='dd-twitter-ajax-load dd-twitter-250'></div><a href="http://twitter.com/share" class="twitter-share-button" data-url="http://www.barriblog.com/index.php/2009/07/17/explorando-el-camino-del-xhtml/" data-count="horizontal" data-text="Explorando el camino del XHTML" data-via="" ></a></div><div class='dd_button'><div class='dd-fbshare-ajax-load dd-fbshare-250'></div><a class='DD_FBSHARE_AJAX_250' name='fb_share' type='button_count' share_url='http://www.barriblog.com/index.php/2009/07/17/explorando-el-camino-del-xhtml/' href='http://www.facebook.com/sharer.php'></a></div><div class='dd_button'><div class='dd_delicious_compact_image dd_delicious'><a class='dd_delicious_compact_image' href='http://delicious.com/save' onclick="window.open('http://delicious.com/save?v=5&amp;noui&amp;jump=close&amp;url='+encodeURIComponent('http://www.barriblog.com/index.php/2009/07/17/explorando-el-camino-del-xhtml/')+'&amp;title='+encodeURIComponent('Explorando el camino del XHTML'),'delicious', 'toolbar=no,width=550,height=550'); return false;"><span id='DD_DELICIOUS_AJAX_POST_ID'><div style='padding-top:3px'>0</div></span></a></div></div></div><div style='clear:both'></div></div><div style='clear:both'></div><p><img class="alignnone size-full wp-image-254" title="xhtml_logo_medium" src="http://www.barriblog.com/wp-content/uploads/2009/07/xhtml_logo_medium.png" alt="xhtml_logo_medium" width="200" height="180" /></p>
<p>Los errores sintácticos han sido uno de los problemas que me he encontrado al analizar el código <a href="http://en.wikipedia.org/wiki/HTML">HTML</a> de los blogs con el programa  <strong>Lestat</strong>, como ya  escribí  hace tiempo en el post titulado  <a href="../index.php/2008/01/11/el-diablo-cojuelo/">El diablo cojuelo</a>.  Hace unas semanas  <a href="http://www.it.uc3m.es/~berto/es.html">Norberto Fernández</a>,  profesor de mi Departamento  me sugirió  que convirtiese el HTML de los blogs a <a href="http://en.wikipedia.org/wiki/XHTML">XHTML</a> y me indicó dos herramientas para hacerlo: <strong><a href="http://tidy.sourceforge.net/">tidy</a></strong> y <strong><a href="http://www.it.uc3m.es/jaf/html2xhtml/">html2xhtml</a></strong>.</p>
<p>Estas herramientas son capaces de convertir <strong>HTML</strong> en <strong>XHTML</strong>, ordenando, limpiando y corrigiendo los errores de markup.  Las ventajas de trabajar con <strong>XHTML</strong> son múltiples:  es un lenguaje de marcas bien estructurado, permite de recorrer el documento  con <a href="http://en.wikipedia.org/wiki/XPath">XPATH</a> o con <a href="http://en.wikipedia.org/wiki/XSL_Transformations">XSLT</a>.</p>
<p>La herramienta <strong><a href="http://tidy.sourceforge.net/">tidy</a></strong>, disponible en <a href="http://en.wikipedia.org/wiki/C_(programming_language)">lenguaje c</a> y <a href="http://en.wikipedia.org/wiki/Java_%28programming_language%29">java</a>, fue desarrollada por <a href="http://www.w3.org/People/Raggett/">Dave Raggett </a>y como dice su autor:</p>
<blockquote><p><em>Is an open source utility for tidying up HTML. Tidy is composed from an HTML parser and an HTML pretty printer. The parser goes to considerable lengths to correct common markup errors. It also provides advice on how to make your pages more accessible to people with disabilities, and can be used to convert HTML content into XML as XHTML. Tidy is W3C open source and available free. It has been successfully compiled on a large number of platforms, and is being integrated into many HTML authoring tools. Recently the maintenance of Tidy has been taken over by a group of dedicated volunteers on SourceForge</em></p></blockquote>
<p>La herramienta   <strong><a href="http://www.it.uc3m.es/jaf/html2xhtml/">html2xhtml</a></strong> se ofrece como servicio web y su código fuente está  disponible en <a href="http://en.wikipedia.org/wiki/C_(programming_language)">lenguaje c</a> que funciona tanto en plataformas <a href="http://en.wikipedia.org/wiki/GNU/Linux">GNU/Linux</a> como Windows, aunque en su versión compilada sólo se ofrece para Windows, siendo necesario en otras plataformas compilarlo a partir de su código fuente.  Ha sido desarrollada por <a href="http://www.it.uc3m.es/jaf/index.html">Jesús Arias Fisteus</a>, profesor de la <a href="http://www.uc3m.es/">Universidad Carlos III</a> y como dice su autor:</p>
<blockquote><p><em>Is an open-source converter from HTML to XHTML. it converts HTML files into XHTML. It can fix many common errors in HTML files (e.g. missing end tags, elements with incorrect content model, non-standard elements or attributes, etc.) The output document type can be selected among several XHTML DTDs (1.0, 1.1, Basic, etc.).</em></p></blockquote>
<p>He realizado una prueba  de estas dos herramientas <strong>sobre 100 blogs</strong> de la tesis de <a href="http://tiscar.com/">Tíscar Lara</a></p>
<table style="border: medium none; border-collapse: collapse;" border="1" cellspacing="0" cellpadding="0">
<tbody>
<tr style="page-break-inside: avoid;">
<td style="border: 1pt solid windowtext; padding: 0cm 5.4pt; background: #ffff99 none repeat scroll 0% 0%; width: 400.2pt;" width="400" valign="top">Escenario de la prueba:</p>
<ul>
<li> Entorno de ejecución <strong><a href="http://www.cygwin.com/">cygwin</a></strong> bajo Windows</li>
<li> Versión de <strong>tidy</strong> 25 de marzo de 2009</li>
<li> Invocación tidy -asxhtml -numeric &lt; origen.html &gt; destino.xhtml</li>
<li> versión de <strong>html2xhtml</strong> 7 de julio de 2009</li>
<li> Invocación html2xhtml origen.html -o destino.xhtml</li>
<li> Los tiempos de ejecución están medidos realizando la <strong>conversión desde fichero</strong>.</li>
</ul>
<p>Estos han sido los resultados:</p>
<p>La herramienta <strong>tidy</strong> ha podido convertir <strong>88 de los 100</strong> blogs analizados(1) mientras que la herramienta <strong>html2xhtml</strong> ha conseguido   convertir <strong>99 sobre 100 blogs</strong>.  Las herramientas muestran un buen   comportamiento, sobre todo <strong>html2xhtml</strong>, dado que  los errores de sintaxis del   código HTML de los blogs son muy frecuentes.    Esto abre la posibilidad de poder analizar el contenido de los blogs   por otros medios a demás de los clásicos <a href="http://en.wikipedia.org/wiki/Parsing">parsers</a>. Respecto al tiempo de ejecución la herramienta <strong>html2xhtml</strong> ha utilizado<strong> 0 min  48 seg</strong>(2)  mientras que <strong>tidy</strong> ha tardado <strong>3 min 6.629 seg</strong>(3).</td>
</tr>
</tbody>
</table>
<p>Después de esta prueba  se me abren nuevos caminos para continuar el desarrollo de <strong>lestat</strong>. Pero como decía <a href="http://en.wikipedia.org/wiki/Scarlett_O%27Hara">Scarlett O’Hara</a>, &#8220;eso lo pensaré mañana&#8221;.</p>
<p>&#8212;&#8212;&#8211;</p>
<div>(1) Utilizando algunas opciones en <strong>tidy</strong> es posible mejorar este porcentaje, pero para realizar la comparación de herramientas se ha invocado el comando de la manera más elemental</div>
<div>(1)  <strong>html2xhtml</strong> real 0 min  48 seg, user, 0 min 16 seg, sys 0 min 10,685 seg<br />
(2) <strong>tidy</strong> real 3 min 6,629 seg, user 0 min 36,049 seg,  sys 0 min 59,186 seg</div>
<script type="text/javascript"> jQuery(document).ready(function($) { window.setTimeout('loadGoogle1_250()',1000);window.setTimeout('loadLinkedin_250()',1000);window.setTimeout('loadTwitter_250()',1000);window.setTimeout('loadFBShare_250()',1000); }); </script><script type="text/javascript"> function loadGoogle1_250(){ jQuery(document).ready(function($) { $('.dd-google1-250').remove();$.getScript('https://apis.google.com/js/plusone.js'); }); } function loadLinkedin_250(){ jQuery(document).ready(function($) { $('.dd-linkedin-250').remove();$.getScript('http://platform.linkedin.com/in.js'); }); } function loadTwitter_250(){ jQuery(document).ready(function($) { $('.dd-twitter-250').remove();$.getScript('http://platform.twitter.com/widgets.js'); }); } function loadFBShare_250(){ jQuery(document).ready(function($) { $('.dd-fbshare-250').remove(); $.getScript('http://static.ak.fbcdn.net/connect.php/js/FB.Share'); }); }</script><!-- Social Buttons Generated by Digg Digg plugin v4.5.3.4, 
    Author : Yong Mook Kim
    Website : http://www.diggdigg2u.com -->]]></content:encoded>
			<wfw:commentRss>http://www.barriblog.com/index.php/2009/07/17/explorando-el-camino-del-xhtml/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

