<?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>Manual Web &#187; xhtml</title>
	<atom:link href="http://www.manualweb.net/tag/xhtml/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.manualweb.net</link>
	<description>www.manualweb.net</description>
	<lastBuildDate>Tue, 27 Sep 2011 11:37:15 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Introducción a XSLT</title>
		<link>http://www.manualweb.net/xslt/introduccion-a-xslt/</link>
		<comments>http://www.manualweb.net/xslt/introduccion-a-xslt/#comments</comments>
		<pubDate>Fri, 28 May 2010 23:23:26 +0000</pubDate>
		<dc:creator>manualweb</dc:creator>
				<category><![CDATA[XSLT]]></category>
		<category><![CDATA[HTML]]></category>
		<category><![CDATA[svg]]></category>
		<category><![CDATA[table]]></category>
		<category><![CDATA[transformar]]></category>
		<category><![CDATA[vrml]]></category>
		<category><![CDATA[w3c]]></category>
		<category><![CDATA[xhtml]]></category>
		<category><![CDATA[xml]]></category>
		<category><![CDATA[xpath]]></category>

		<guid isPermaLink="false">http://www.manualweb.net/?p=280</guid>
		<description><![CDATA[Qué es XSLT HTML versus XML+XSLT Ejemplos de transformaciones XML original XML transformado en HTML XML transformado en SVG XML transformado en VRML Qué es XSLT XSLT o XSL Transformations es la parte más importante del lenguaje XSL (eXtensible StyleSheet Language). La función de XSLT es la de transformar documentos XML en documentos XHTML u [...]]]></description>
			<content:encoded><![CDATA[<div class="toc">
<ol>
<li><a href="http://www.manualweb.net/xslt/introduccion-a-xslt/#toc-qu-es-xslt">Qué es XSLT</a></li>
<li><a href="http://www.manualweb.net/xslt/introduccion-a-xslt/#toc-html-versus-xmlxslt">HTML versus XML+XSLT</a></li>
<li><a href="http://www.manualweb.net/xslt/introduccion-a-xslt/#toc-ejemplos-de-transformaciones">Ejemplos de transformaciones</a>
<ol>
<li><a href="http://www.manualweb.net/xslt/introduccion-a-xslt/#toc-xml-original">XML original</a></li>
<li><a href="http://www.manualweb.net/xslt/introduccion-a-xslt/#toc-xml-transformado-en-html">XML transformado en HTML</a></li>
<li><a href="http://www.manualweb.net/xslt/introduccion-a-xslt/#toc-xml-transformado-en-svg">XML transformado en SVG</a></li>
<li><a href="http://www.manualweb.net/xslt/introduccion-a-xslt/#toc-xml-transformado-en-vrml">XML transformado en VRML</a></li>
</ol>
</li>
</ol>
</div>
<h3 id="toc-qu-es-xslt">Qué es XSLT</h3>
<p><a title="XSLT" href="http://www.manualweb.net/tutorial-xslt/">XSLT</a> o <a title="XSLT" href="http://www.manualweb.net/tutorial-xslt/">XSL Transformations</a> es la parte más importante del lenguaje <a title="XSL" href="http://www.manualweb.net/tutorial-xsl/">XSL (eXtensible StyleSheet Language)</a>. La función de <a title="XSLT" href="http://www.manualweb.net/tutorial-xslt/">XSLT</a> es la de transformar documentos <a title="XML" href="http://www.manualweb.net/tutorial-xml/">XML</a> en documentos <a title="xhtml" href="http://www.manualweb.net/tutorial-xhtml/">XHTML</a> u otros documentos <a title="XML" href="http://www.manualweb.net/tutorial-xml/">XML</a>. El W3C es el encargado de la definición de especificación <a title="XSLT" href="http://www.manualweb.net/tutorial-xslt/">XSLT</a>.</p>
<p><a title="XSLT" href="http://www.manualweb.net/tutorial-xslt/">XSLT</a> se basa en XPath para realizar la búsqueda de información a través del documento <a title="XML" href="http://www.manualweb.net/tutorial-xml/">XML</a>. XPath son cadenas que son expresiones regulares, las cuales hacen referencia a alguna estructura dentro del documento <a title="XML" href="http://www.manualweb.net/tutorial-xml/">XML</a>.</p>
<p>El proceso de transformación se basa en plantillas. Dichas plantillas identifican una estructura a partir de la cual realizar la transformación (con XPath), así como las acciones a realizar con dicha estructura: recorrerla, obtener el dato de la etiqueta, el valor de alguno de sus atributos, contar cuantos elementos tiene la etiqueta anidados,...</p>
<p>Además, para poder aplicar las transformaciones, necesitaremos asociar el documento de transformación al documento <a title="XML" href="http://www.manualweb.net/tutorial-xml/">XML</a> receptor de la misma.</p>
<p>Antes de empezar a aprender más cosas sobre <a title="XSLT" href="http://www.manualweb.net/tutorial-xslt/">XSLT</a> sería recomendable que tuvieses algún conocimiento sobre <a title="XML" href="http://www.manualweb.net/tutorial-xml/">XML</a>.</p>
<h3 id="toc-html-versus-xmlxslt">HTML versus XML+XSLT</h3>
<p>A diferencia del lenguaje <a title="HTML" href="http://www.manualweb.net/tutorial-html/">HTML</a>, donde cada una de sus etiquetas lleva asociada una representación gráfica, el <a title="XML" href="http://www.manualweb.net/tutorial-xml/">XML</a> identifica datos, los cuales no tienen representación gráfica asociada.</p>
<p>Cuando definimos una tabla en <a title="HTML" href="http://www.manualweb.net/tutorial-html/">HTML</a> (la etiqueta <a title="Table" href="http://w3api.com/wiki/HTML:TABLE">table</a>), sabemos que las herramientas que interpreten el documento <a title="HTML" href="http://www.manualweb.net/tutorial-html/">HTML</a>, normalmente los navegadores web, pintarán la tabla. De una forma u otra visualizaremos la tabla en nuestra pantalla.</p>
<p>Si bien, si tenemos un documento <a title="XML" href="http://www.manualweb.net/tutorial-xml/">XML</a>, donde podemos tener definida la etiqueta &lt;libro&gt;, está no tendrá ninguna representación gráfica asociada. Es por ello que si visualizamos nuestro documento <a title="XML" href="http://www.manualweb.net/tutorial-xml/">XML</a> con alguna herramienta, esta, mostrará el contenido de la etiqueta, pero sin ninguna representación.</p>
<p>Es en este punto donde entra el lenguaje <a title="XSLT" href="http://www.manualweb.net/tutorial-xslt/">XSLT</a>. Y es que este lenguaje permite transformar el susodicho documento <a title="XML" href="http://www.manualweb.net/tutorial-xml/">XML</a> en otro formato, el resultado de la transformación será el que lleve la representación gráfica.</p>
<h3 id="toc-ejemplos-de-transformaciones">Ejemplos de transformaciones</h3>
<p>Así, podemos tener múltiples transformaciones del documento <a title="XML" href="http://www.manualweb.net/tutorial-xml/">XML</a> en otros documentos de distintos lenguajes: <a title="xhtml" href="http://www.manualweb.net/tutorial-xhtml/">XHTML</a>, <a title="svg" href="http://www.manualweb.net/tutorial-svg/">SVG</a>, <a title="VRML" href="http://www.manualweb.net/tutorial-vrml/">VRML</a>,... Por ejemplo, un documento <a title="XML" href="http://www.manualweb.net/tutorial-xml/">XML</a> que tuviese una lista de números podría ser transformado en: una tabla o lista de hitos con dicho listado en <a title="HTML" href="http://www.manualweb.net/tutorial-html/">HTML</a>, en un gráfico de líneas con <a title="svg" href="http://www.manualweb.net/tutorial-svg/">SVG</a> o podrían ser las alturas de figuras 3D con <a title="VRML" href="http://www.manualweb.net/tutorial-vrml/">VRML</a>.</p>
<p>Veamos cómo serían dichas transformaciones:</p>
<h4 id="toc-xml-original">XML original</h4>
<pre class="xml"> 2
 4
 6
 8</pre>
<h4 id="toc-xml-transformado-en-html">XML transformado en HTML</h4>
<pre class="html4strict">&nbsp;
<span style="color: #009900;"><a href="http://december.com/html/4/element/table.html"><span style="color: #000000; font-weight: bold;">&lt;table&gt;</span></a></span>
<span style="color: #009900;"><a href="http://december.com/html/4/element/tbody.html"><span style="color: #000000; font-weight: bold;">&lt;tbody&gt;</span></a></span>
<span style="color: #009900;"><a href="http://december.com/html/4/element/tr.html"><span style="color: #000000; font-weight: bold;">&lt;tr&gt;</span></a></span>
<span style="color: #009900;"><a href="http://december.com/html/4/element/th.html"><span style="color: #000000; font-weight: bold;">&lt;th&gt;</span></a></span>Datos<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/th&gt;</span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/tr&gt;</span></span>
<span style="color: #009900;"><a href="http://december.com/html/4/element/tr.html"><span style="color: #000000; font-weight: bold;">&lt;tr&gt;</span></a></span>
<span style="color: #009900;"><a href="http://december.com/html/4/element/td.html"><span style="color: #000000; font-weight: bold;">&lt;td&gt;</span></a></span>2<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/td&gt;</span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/tr&gt;</span></span>
<span style="color: #009900;"><a href="http://december.com/html/4/element/tr.html"><span style="color: #000000; font-weight: bold;">&lt;tr&gt;</span></a></span>
<span style="color: #009900;"><a href="http://december.com/html/4/element/td.html"><span style="color: #000000; font-weight: bold;">&lt;td&gt;</span></a></span>4<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/td&gt;</span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/tr&gt;</span></span>
<span style="color: #009900;"><a href="http://december.com/html/4/element/tr.html"><span style="color: #000000; font-weight: bold;">&lt;tr&gt;</span></a></span>
<span style="color: #009900;"><a href="http://december.com/html/4/element/td.html"><span style="color: #000000; font-weight: bold;">&lt;td&gt;</span></a></span>6<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/td&gt;</span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/tr&gt;</span></span>
<span style="color: #009900;"><a href="http://december.com/html/4/element/tr.html"><span style="color: #000000; font-weight: bold;">&lt;tr&gt;</span></a></span>
<span style="color: #009900;"><a href="http://december.com/html/4/element/td.html"><span style="color: #000000; font-weight: bold;">&lt;td&gt;</span></a></span>8<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/td&gt;</span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/tr&gt;</span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/tbody&gt;</span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/table&gt;</span></span>
&nbsp;</pre>
<h4 id="toc-xml-transformado-en-svg">XML transformado en SVG</h4>
<h4 id="toc-xml-transformado-en-vrml">XML transformado en VRML</h4>
<pre>#VRML V2.0 utf8
 Box {
  size 2 4 6
}</pre>
<p>En estos ejemplos, vemos que los datos de partida de un documento <a title="XML" href="http://www.manualweb.net/tutorial-xml/">XML</a> son utilizados como contenido de otros documentos que tienen representaciones gráficas y pasan a ser valores de los mismos. En el documento <a title="HTML" href="http://www.manualweb.net/tutorial-html/">HTML</a> son datos de una tabla, en el documento <a title="svg" href="http://www.manualweb.net/tutorial-svg/">SVG</a> son las coordenadas de una línea y en el documento <a title="VRML" href="http://www.manualweb.net/tutorial-vrml/">VRML</a> son las dimensiones de un cubo.</p>

<div class="sociable">
<div class="sociable_tagline">
<strong>Comparteme:</strong>
</div>
<ul>
	<li class="sociablefirst"><a rel="nofollow"  href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Fwww.manualweb.net%2Fxslt%2Fintroduccion-a-xslt%2F&amp;title=Introducci%C3%B3n%20a%20XSLT&amp;bodytext=%0AQu%C3%A9%20es%20XSLT%0AHTML%20versus%20XML%2BXSLT%0AEjemplos%20de%20transformaciones%0AXML%20original%0AXML%20transformado%20en%20HTML%0AXML%20transformado%20en%20SVG%0AXML%20transformado%20en%20VRML%0D%0AQu%C3%A9%20es%20XSLT%0D%0AXSLT%20o%20XSL%20Transformations%20es%20la%20parte%20m%C3%A1s%20importante%20del%20lenguaje%20XSL%20%28eXtensible%20" title="Digg"><img src="http://www.manualweb.net/wp-content/plugins/sociable/images/digg.png" title="Digg" alt="Digg" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  href="http://sphinn.com/index.php?c=post&amp;m=submit&amp;link=http%3A%2F%2Fwww.manualweb.net%2Fxslt%2Fintroduccion-a-xslt%2F" title="Sphinn"><img src="http://www.manualweb.net/wp-content/plugins/sociable/images/sphinn.png" title="Sphinn" alt="Sphinn" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  href="http://delicious.com/post?url=http%3A%2F%2Fwww.manualweb.net%2Fxslt%2Fintroduccion-a-xslt%2F&amp;title=Introducci%C3%B3n%20a%20XSLT&amp;notes=%0AQu%C3%A9%20es%20XSLT%0AHTML%20versus%20XML%2BXSLT%0AEjemplos%20de%20transformaciones%0AXML%20original%0AXML%20transformado%20en%20HTML%0AXML%20transformado%20en%20SVG%0AXML%20transformado%20en%20VRML%0D%0AQu%C3%A9%20es%20XSLT%0D%0AXSLT%20o%20XSL%20Transformations%20es%20la%20parte%20m%C3%A1s%20importante%20del%20lenguaje%20XSL%20%28eXtensible%20" title="del.icio.us"><img src="http://www.manualweb.net/wp-content/plugins/sociable/images/delicious.png" title="del.icio.us" alt="del.icio.us" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  href="http://www.facebook.com/share.php?u=http%3A%2F%2Fwww.manualweb.net%2Fxslt%2Fintroduccion-a-xslt%2F&amp;t=Introducci%C3%B3n%20a%20XSLT" title="Facebook"><img src="http://www.manualweb.net/wp-content/plugins/sociable/images/facebook.png" title="Facebook" alt="Facebook" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  href="http://www.mixx.com/submit?page_url=http%3A%2F%2Fwww.manualweb.net%2Fxslt%2Fintroduccion-a-xslt%2F&amp;title=Introducci%C3%B3n%20a%20XSLT" title="Mixx"><img src="http://www.manualweb.net/wp-content/plugins/sociable/images/mixx.png" title="Mixx" alt="Mixx" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  href="http://www.google.com/bookmarks/mark?op=edit&amp;bkmk=http%3A%2F%2Fwww.manualweb.net%2Fxslt%2Fintroduccion-a-xslt%2F&amp;title=Introducci%C3%B3n%20a%20XSLT&amp;annotation=%0AQu%C3%A9%20es%20XSLT%0AHTML%20versus%20XML%2BXSLT%0AEjemplos%20de%20transformaciones%0AXML%20original%0AXML%20transformado%20en%20HTML%0AXML%20transformado%20en%20SVG%0AXML%20transformado%20en%20VRML%0D%0AQu%C3%A9%20es%20XSLT%0D%0AXSLT%20o%20XSL%20Transformations%20es%20la%20parte%20m%C3%A1s%20importante%20del%20lenguaje%20XSL%20%28eXtensible%20" title="Google Bookmarks"><img src="http://www.manualweb.net/wp-content/plugins/sociable/images/googlebookmark.png" title="Google Bookmarks" alt="Google Bookmarks" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  href="https://favorites.live.com/quickadd.aspx?marklet=1&amp;url=http%3A%2F%2Fwww.manualweb.net%2Fxslt%2Fintroduccion-a-xslt%2F&amp;title=Introducci%C3%B3n%20a%20XSLT" title="Live"><img src="http://www.manualweb.net/wp-content/plugins/sociable/images/live.png" title="Live" alt="Live" class="sociable-hovers" /></a></li>
	<li class="sociablelast"><a rel="nofollow"  href="http://meneame.net/submit.php?url=http%3A%2F%2Fwww.manualweb.net%2Fxslt%2Fintroduccion-a-xslt%2F" title="Meneame"><img src="http://www.manualweb.net/wp-content/plugins/sociable/images/meneame.png" title="Meneame" alt="Meneame" class="sociable-hovers" /></a></li>
</ul>
</div>
]]></content:encoded>
			<wfw:commentRss>http://www.manualweb.net/xslt/introduccion-a-xslt/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

