26
1 <?xml version="1.0" encoding="ISO-8859-1"?> <?xml-stylesheet type="text/xsl" href="ejemplo07_02.xsl"?> <Texto> <P>La especificación <B>XML</B> (<I>Extensible Markup Language</I>, lenguaje de marcas extensible) está regulada por el <B>World Wide Web Consortium</B> o <B>W3C</B> (<I>Consorcio W3</I>), disponible en cualquiera de las direcciones:<BR/> <U>www.w3c.org</U><BR/><U>www.w3.org</U></P> </Texto> texto07_01.xm l

<?xml version="1.0" encoding="ISO-8859-1"?>

  • Upload
    sorcha

  • View
    44

  • Download
    0

Embed Size (px)

DESCRIPTION

texto07_01.xml. La especificación XML (Extensible Markup Language, lenguaje de marcas extensible) está regulada por el World Wide Web Consortium - PowerPoint PPT Presentation

Citation preview

Page 1: <?xml version="1.0" encoding="ISO-8859-1"?>

1

<?xml version="1.0" encoding="ISO-8859-1"?><?xml-stylesheet type="text/xsl" href="ejemplo07_02.xsl"?><Texto><P>La especificación <B>XML</B> (<I>Extensible Markup Language</I>, lenguaje de marcas extensible) está regulada por el <B>World Wide Web Consortium</B> o <B>W3C</B> (<I>Consorcio W3</I>), disponible en cualquiera de las direcciones:<BR/><U>www.w3c.org</U><BR/><U>www.w3.org</U></P></Texto>

texto07_01.xml

Page 2: <?xml version="1.0" encoding="ISO-8859-1"?>

2

<?xml version="1.0" encoding="ISO-8859-1"?><xsl:stylesheet xmlns:xsl="http://www.w3.org/TR/WD-xsl"><xsl:template> <xsl:copy> <xsl:apply-templates /> </xsl:copy></xsl:template></xsl:stylesheet>

ejemplo07_02.xsl

Page 3: <?xml version="1.0" encoding="ISO-8859-1"?>

3

<?xml version="1.0" encoding="ISO-8859-1"?><?xml-stylesheet type="text/xsl" href="ejemplo07_04.xsl"?><Texto><P>La especificación <B>XML</B> (<I>Extensible Markup Language</I>, lenguaje de marcas extensible) está regulada por el <B>World Wide Web Consortium</B> o <B>W3C</B> (<I>Consorcio W3</I>), disponible en cualquiera de las direcciones:<BR/><U>www.w3c.org</U><BR/><U>www.w3.org</U></P></Texto>

texto07_03.xml

Page 4: <?xml version="1.0" encoding="ISO-8859-1"?>

4

<?xml version="1.0" encoding="ISO-8859-1"?><xsl:stylesheet xmlns:xsl="http://www.w3.org/TR/WD-xsl"><xsl:template> <xsl:value-of /></xsl:template></xsl:stylesheet>

ejemplo07_04.xsl

Page 5: <?xml version="1.0" encoding="ISO-8859-1"?>

5

<?xml version="1.0" encoding="ISO-8859-1"?><?xml-stylesheet type="text/xsl" href="ejemplo07_06.xsl"?><catálogo> <libro> <Título>C++</Título> <Editorial>Osborne</Editorial> <autores> <Autor>Luis Joyanes</Autor> <Autor>Héctor Castán</Autor> </autores> <ISBN>8448123638</ISBN> <Páginas>367</Páginas> <Precio moneda="Pta">3.995</Precio> <Precio moneda="Euro">24,01</Precio> </libro> <libro> <Título>XML in Action</Título> <Editorial>Microsoft Press</Editorial> <autores> <Autor>William J. Pardi</Autor> </autores> <ISBN>0735605629</ISBN> <Páginas>354</Páginas> <Precio moneda="Pta">11.000</Precio> <Precio moneda="Euro">66,11</Precio> </libro>

catalogo07_05.xml

Sigue

Page 6: <?xml version="1.0" encoding="ISO-8859-1"?>

6

<libro> <Título>Sistemas informáticos multiusuario y en red</Título> <Editorial>McGrawHill</Editorial> <autores> <Autor>Purificación Cerrato</Autor> <Autor>Pedro Jarillo</Autor> <Autor>Eugenio Lázaro</Autor> <Autor>María Dolores Jarillo</Autor> </autores> <ISBN>8448105540</ISBN> <Páginas>192</Páginas> <Precio moneda="Pta">2.465</Precio> <Precio moneda="Euro">14,81</Precio> </libro></catálogo>

Page 7: <?xml version="1.0" encoding="ISO-8859-1"?>

7

<?xml version="1.0" encoding="ISO-8859-1"?><xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/TR/WD-xsl"xmlns="http://www.w3.org/TR/REC-html40"result-ns="">

<xsl:template match="/"><HTML><HEAD><TITLE>Catálogo de libros</TITLE></HEAD><BODY><link rel="stylesheet" type="text/css" href="catalogo.css" /><H1>CATÁLOGO DE LIBROS</H1><P>Relación de editoriales:</P><xsl:for-each select="//Editorial"><xsl:value-of /><BR/></xsl:for-each><P>Lista de títulos:</P><xsl:for-each select="//Título"><xsl:value-of /><BR/></xsl:for-each><P>Listado de autores:</P><xsl:for-each select="//Autor"><xsl:value-of /><BR/></xsl:for-each></BODY></HTML></xsl:template>

</xsl:stylesheet>

ejemplo07_06.xsl

Page 8: <?xml version="1.0" encoding="ISO-8859-1"?>

8

BODY {font-family:Verdana,sans-serif}H1 {color:red;font-family:Comic Sans MS,fantasy;font-size:18pt;font-weight:bolder;text-align:center}H2 {color:#993366;font-family:Verdana,sans-serif;font-size:16pt;font-weight:bold;text-align:left}P {color:navy;font-family:Verdana,sans-serif;font-size:12pt}

catalogo.css

Page 9: <?xml version="1.0" encoding="ISO-8859-1"?>

9

<?xml version="1.0" encoding="ISO-8859-1"?><xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/TR/WD-xsl"xmlns="http://www.w3.org/TR/REC-html40"result-ns="">

<xsl:template match="/"><HTML><HEAD><TITLE>Catálogo de libros</TITLE></HEAD><BODY><link rel="stylesheet" type="text/css" href="catalogo.css" /><H1>CATÁLOGO DE LIBROS</H1><P>Información de libros:</P><xsl:for-each select="//libro">Título: <xsl:value-of select="Título" /><BR/>Editorial: <xsl:value-of select="Editorial" /><BR/>ISBN: <xsl:value-of select="ISBN" /><BR/>Número de páginas: <xsl:value-of select="Páginas" /><BR/>Precio: <xsl:value-of select="Precio[@moneda='Pta']" /> pesetas<BR/>Precio: <xsl:value-of select="Precio[@moneda='Euro']" /> euros<BR/><BR/></xsl:for-each></BODY></HTML></xsl:template>

</xsl:stylesheet>

ejemplo07_08.xsl

Page 10: <?xml version="1.0" encoding="ISO-8859-1"?>

10

<?xml version="1.0" encoding="ISO-8859-1"?><xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/TR/WD-xsl"xmlns="http://www.w3.org/TR/REC-html40"result-ns=""><xsl:template match="/"><HTML><HEAD><TITLE>Catálogo de libros</TITLE></HEAD><BODY><link rel="stylesheet" type="text/css" href="catalogo.css" /><H1>CATÁLOGO DE LIBROS</H1><P>Editoriales ordenadas por orden alfabético:</P><xsl:for-each select="//libro" order-by="+Editorial"><B><xsl:value-of select="Editorial" /></B><BR/></xsl:for-each><P>Títulos de libros ordenados por orden alfabético de sus editoriales:</P><xsl:for-each select="//libro" order-by="+Editorial"><B><xsl:value-of select="Título" /></B> (<xsl:value-of select="Editorial" />)<BR/></xsl:for-each><P>Títulos de libros ordenados por sus ISBN (de mayor a menor):</P><xsl:for-each select="//libro" order-by="-ISBN"><B><xsl:value-of select="Título" /></B> (<xsl:value-of select="ISBN" />)<BR/></xsl:for-each><P>Títulos de libros ordenados por sus páginas (de menor a mayor):</P><xsl:for-each select="//libro" order-by="+Páginas"><B><xsl:value-of select="Título" /></B> (<xsl:value-of select="Páginas" />)<BR/></xsl:for-each></BODY></HTML></xsl:template></xsl:stylesheet>

ejemplo07_10.xsl

Page 11: <?xml version="1.0" encoding="ISO-8859-1"?>

11

<?xml version="1.0" encoding="ISO-8859-1"?><xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/TR/WD-xsl"xmlns="http://www.w3.org/TR/REC-html40"result-ns=""><xsl:template match="/"><HTML><HEAD><TITLE>Catálogo de libros</TITLE></HEAD><BODY><link rel="stylesheet" type="text/css" href="catalogo.css" /><H1>CATÁLOGO DE LIBROS</H1><P>Editoriales ordenadas por orden alfabético:</P><xsl:for-each select="//libro" order-by="+Editorial"><B><xsl:value-of select="Editorial" /></B><BR/></xsl:for-each><P>Títulos de libros ordenados por orden alfabético de sus editoriales:</P><xsl:for-each select="//libro" order-by="+Editorial;+Título"><B><xsl:value-of select="Título" /></B> (<xsl:value-of select="Editorial" />)<BR/></xsl:for-each><P>Títulos de libros ordenados por sus ISBN (de mayor a menor):</P><xsl:for-each select="//libro" order-by="-ISBN"><B><xsl:value-of select="Título" /></B> (<xsl:value-of select="ISBN" />)<BR/></xsl:for-each><P>Títulos de libros ordenados por sus páginas (de menor a mayor):</P><xsl:for-each select="//libro" order-by="+Páginas"><B><xsl:value-of select="Título" /></B> (<xsl:value-of select="Páginas" />)<BR/></xsl:for-each></BODY></HTML></xsl:template></xsl:stylesheet>

ejemplo07_12.xsl

Page 12: <?xml version="1.0" encoding="ISO-8859-1"?>

12

<?xml version="1.0" encoding="ISO-8859-1"?><xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/TR/WD-xsl"xmlns="http://www.w3.org/TR/REC-html40"result-ns="">

<xsl:template match="/"><HTML><HEAD><TITLE>Catálogo de libros</TITLE></HEAD><BODY><link rel="stylesheet" type="text/css" href="catalogo.css" /><H1>CATÁLOGO DE LIBROS</H1><P>Títulos de libros ordenados por su precio en pesetas (de menor a mayor):</P><xsl:for-each select="//libro" order-by="+Precio[@moneda='Pta']"><xsl:value-of select="Título" /> - <xsl:value-of select="Precio[@moneda='Pta']" /> pesetas.<BR/></xsl:for-each><P>Títulos de libros ordenados por su precio en euros (de mayor a menor):</P><xsl:for-each select="//libro" order-by="-Precio[@moneda='Euro']"><xsl:value-of select="Título" /> - <xsl:value-of select="Precio[@moneda='Euro']" /> euros.<BR/></xsl:for-each></BODY></HTML></xsl:template></xsl:stylesheet>

ejemplo07_14.xsl

Page 13: <?xml version="1.0" encoding="ISO-8859-1"?>

13

<?xml version="1.0" encoding="ISO-8859-1"?><xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/TR/WD-xsl"xmlns="http://www.w3.org/TR/REC-html40"result-ns=""><xsl:template match="/"><HTML><HEAD><TITLE>Catálogo de libros</TITLE></HEAD><BODY><link rel="stylesheet" type="text/css" href="catalogo.css" /><H1>CATÁLOGO DE LIBROS</H1><P>Títulos de libros ordenados por su precio en pesetas (de menor a mayor):</P><xsl:for-each select="//libro" order-by="+Precio[@moneda='Pta']"><xsl:value-of select="Título" /> - <xsl:value-of select="Precio[@moneda='Pta']" /> pesetas.<BR/></xsl:for-each><P>Títulos de libros ordenados por su precio en euros (de mayor a menor):</P><xsl:for-each select="//libro" order-by="-precio[@moneda='Euro']"><xsl:value-of select="Título" /> - <xsl:value-of select="Precio[@moneda='Euro']" /> euros.<BR/></xsl:for-each></BODY></HTML></xsl:template></xsl:stylesheet>

ejemplo07_14.xsl

Page 14: <?xml version="1.0" encoding="ISO-8859-1"?>

14

<?xml version="1.0" encoding="ISO-8859-1"?><xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/TR/WD-xsl"xmlns="http://www.w3.org/TR/REC-html40"result-ns=""><xsl:template match="/"><HTML><HEAD><TITLE>Catálogo de libros</TITLE></HEAD><BODY><link rel="stylesheet" type="text/css" href="catalogo.css" /><H1>CATÁLOGO DE LIBROS</H1><P>Títulos de libros con anotaciones:</P><xsl:for-each select="//libro"><xsl:value-of select="Título" /><xsl:if match="//libro[ISBN='0735605629']"> (este libro no está en español)</xsl:if><xsl:if match="//libro[Precio$lt$'03000']"> (oferta, precio: <xsl:value-of select="Precio[@moneda='Pta']" /> pesetas)</xsl:if><BR/></xsl:for-each><P>Títulos de libros con notas sobre sus páginas:</P><xsl:for-each select="//libro"><xsl:value-of select="Título" /><xsl:if match="//libro[Páginas$lt$'200']"> (tamaño pequeño)</xsl:if><xsl:if match="//libro[Páginas$gt$'200'$and$Páginas$lt$'300']"> (tamaño medio)</xsl:if><xsl:if match="//libro[Páginas$gt$'300']"> (tamaño grande)</xsl:if><BR/></xsl:for-each></BODY></HTML></xsl:template></xsl:stylesheet>

ejemplo07_16.xsl

Page 15: <?xml version="1.0" encoding="ISO-8859-1"?>

15

?xml version="1.0" encoding="ISO-8859-1"?><xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/TR/WD-xsl"xmlns="http://www.w3.org/TR/REC-html40"result-ns="">

<xsl:template match="/"><HTML><HEAD><TITLE>Catálogo de libros</TITLE></HEAD><BODY><link rel="stylesheet" type="text/css" href="catalogo.css" /><H1>CATÁLOGO DE LIBROS</H1><P>Títulos de libros en español:</P><xsl:for-each select="//libro"><xsl:if match="//libro[$not$ISBN='0735605629']"><xsl:value-of select="Título" /><BR/></xsl:if></xsl:for-each></BODY></HTML></xsl:template>

</xsl:stylesheet>

ejemplo07_18.xsl

Page 16: <?xml version="1.0" encoding="ISO-8859-1"?>

16

<?xml version="1.0" encoding="ISO-8859-1"?><xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/TR/WD-xsl"xmlns="http://www.w3.org/TR/REC-html40"result-ns="">

<xsl:template match="/"><HTML><HEAD><TITLE>Catálogo de libros</TITLE></HEAD><BODY><link rel="stylesheet" type="text/css" href="catalogo.css" /><H1>CATÁLOGO DE LIBROS</H1><P>Listado de títulos de libros:</P><xsl:for-each select="//libro"><xsl:if match="//libro[end()]">y por último, </xsl:if>"<xsl:value-of select="Título" />"<xsl:if match="//libro[$not$end()]">, </xsl:if></xsl:for-each></BODY></HTML></xsl:template>

</xsl:stylesheet>

ejemplo07_20.xsl

Page 17: <?xml version="1.0" encoding="ISO-8859-1"?>

17

<?xml version="1.0" encoding="ISO-8859-1"?><xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/TR/WD-xsl"xmlns="http://www.w3.org/TR/REC-html40"result-ns=""><xsl:template match="/"><HTML><HEAD><TITLE>Catálogo de libros</TITLE></HEAD><BODY><link rel="stylesheet" type="text/css" href="catalogo.css" /><H1>CATÁLOGO DE LIBROS</H1><P>Listado de títulos de libros:</P><xsl:for-each select="//libro"><xsl:value-of select="Título" /><xsl:choose><xsl:when match=".[Páginas$gt$'300']"> (libro de tamaño grande)<BR/></xsl:when><xsl:when match=".[Páginas$gt$'200']"> (libro de tamaño mediano)<BR/></xsl:when><xsl:when match=".[Páginas$gt$'100']"> (libro de tamaño pequeño)<BR/></xsl:when><xsl:otherwise> (demasiado pequeño para ser un libro)<BR/></xsl:otherwise></xsl:choose></xsl:for-each></BODY></HTML></xsl:template></xsl:stylesheet>

ejemplo07_22.xsl

Page 18: <?xml version="1.0" encoding="ISO-8859-1"?>

18

<?xml version="1.0" encoding="ISO-8859-1"?><xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/TR/WD-xsl"xmlns="http://www.w3.org/TR/REC-html40"result-ns=""><xsl:template match="/"><HTML><HEAD><TITLE>Catálogo de libros</TITLE></HEAD><BODY><link rel="stylesheet" type="text/css" href="catalogo.css" /><H1>CATÁLOGO DE LIBROS</H1><H2>Listado de los primeros autores de libros:</H2><xsl:for-each select="//libro"><xsl:choose><xsl:when match=".[autores[0]]">1.- <xsl:value-of select="autores/Autor" /> (<xsl:value-of select="Título" />)<BR/></xsl:when></xsl:choose></xsl:for-each><H2>Listado de los primeros autores de libros españoles:</H2><xsl:for-each select="//libro"><xsl:choose><xsl:when match=".[ISBN$lt$8448100000]"></xsl:when><xsl:when match=".[autores[0]]">1.- <xsl:value-of select="autores/Autor" /> (<xsl:value-of select="Título" />)<BR/></xsl:when></xsl:choose></xsl:for-each></BODY></HTML></xsl:template></xsl:stylesheet>

ejemplo07_24.xsl

Page 19: <?xml version="1.0" encoding="ISO-8859-1"?>

19

<?xml version="1.0" encoding="ISO-8859-1"?><xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/TR/WD-xsl"xmlns="http://www.w3.org/TR/REC-html40"result-ns=""><xsl:template match="/"><HTML><HEAD><TITLE>Catálogo de libros</TITLE></HEAD><BODY><link rel="stylesheet" type="text/css" href="catalogo.css" /><H1>CATÁLOGO DE LIBROS</H1><H2>Listado de títulos:</H2><P>Libros de la editorial McGraw-Hill:</P><xsl:for-each select="//libro" order-by="+Título"><xsl:choose><xsl:when match=".[Editorial='McGrawHill']"><xsl:value-of select="Título" /><BR/></xsl:when><xsl:otherwise></xsl:otherwise></xsl:choose></xsl:for-each><P>Libros de diferentes editoriales a McGraw-Hill:</P><xsl:for-each select="//libro" order-by="+Título"><xsl:choose><xsl:when match=".[Editorial='McGrawHill']"></xsl:when><xsl:otherwise><xsl:value-of select="Título" /> (Editorial: <xsl:value-of select="Editorial" />)<BR/></xsl:otherwise></xsl:choose></xsl:for-each></BODY></HTML></xsl:template></xsl:stylesheet>

ejemplo07_26.xsl

Page 20: <?xml version="1.0" encoding="ISO-8859-1"?>

20

<?xml version="1.0" encoding="ISO-8859-1"?><xsl:stylesheet xmlns:xsl="http://www.w3.org/TR/WD-xsl">

<xsl:template match="/"><xsl:for-each select="//">Nombre de nodo/etiqueta: <xsl:node-name /></xsl:for-each></xsl:template>

</xsl:stylesheet>

ejemplo07_28.xsl

Page 21: <?xml version="1.0" encoding="ISO-8859-1"?>

21

<?xml version="1.0" encoding="ISO-8859-1"?><xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/TR/WD-xsl"xmlns="http://www.w3.org/TR/REC-html40"result-ns="">

<xsl:template match="/"><HTML><HEAD><TITLE>Catálogo de libros</TITLE></HEAD><BODY><link rel="stylesheet" type="text/css" href="catalogo.css" /><H1>CATÁLOGO DE LIBROS</H1><H2>Listado de datos:</H2>==================================<BR/><xsl:for-each select="//libro/*"><xsl:node-name />: <xsl:choose><xsl:when match="Precio[@moneda='Pta']"><B><xsl:value-of /></B> pesetas</xsl:when><xsl:when match="Precio[@moneda='Euro']"><B><xsl:value-of /></B> euros<BR/>==================================</xsl:when><xsl:when match="autores"><xsl:for-each select="./Autor">"<xsl:value-of />" </xsl:for-each></xsl:when><xsl:otherwise><B><xsl:value-of /></B></xsl:otherwise></xsl:choose><BR/></xsl:for-each></BODY></HTML></xsl:template>

</xsl:stylesheet>

ejemplo07_30.xsl

Page 22: <?xml version="1.0" encoding="ISO-8859-1"?>

22

<?xml version="1.0" encoding="ISO-8859-1"?><?xml-stylesheet type="text/xsl" href="ejemplo07_32.xsl"?><agenda> <Contenido>Lista de direcciones web</Contenido> <recurso> <Nombre>EDUARDO.COM</Nombre> <Enlace>http://www.ugr.es</Enlace> <Figura>figs/logo_ra.jpg</Figura> <Descripción>Recursos de diseño</Descripción>

<Correoe>[email protected]</Correoe> </recurso> <recurso> <Nombre>ACTA</Nombre> <Enlace>http://www.acta.es</Enlace> <Figura>figs/logo_ac.gif</Figura> <Descripción>Asociación de autores</Descripción>

<Correoe>[email protected]</Correoe> </recurso> <recurso> <Nombre>McGraw-Hill</Nombre> <Enlace>http://www.mcgrawhill.es</Enlace> <Figura>figs/logo_mc.gif</Figura> <Descripción>Editorial técnica</Descripción>

<Correoe>[email protected]</Correoe> </recurso></agenda>

agenda07_31.xml

Page 23: <?xml version="1.0" encoding="ISO-8859-1"?>

23

<?xml version="1.0" encoding="ISO-8859-1"?><xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/TR/WD-xsl"xmlns="http://www.w3.org/TR/REC-html40"result-ns="">

<xsl:template match="/"><xsl:element name="HTML" /><xsl:element name="HEAD" /><xsl:element name="TITLE"><xsl:value-of select="//Contenido" /></xsl:element><xsl:element name="/HEAD" /><xsl:element name="BODY" /><LINK rel="stylesheet" type="text/css" href="agenda.css" /><xsl:comment><xsl:value-of select="//Contenido" /></xsl:comment><H1><xsl:value-of select="//Contenido" /></H1><xsl:for-each select="//recurso"><P>El recurso<B><xsl:value-of select="Nombre" /></B>contiene información sobre<I><xsl:value-of select="Descripción" /></I>y se localiza en la dirección web<xsl:apply-templates select="Enlace" />.<BR/> Logotipo de identificación: <xsl:apply-templates select="Figura" /></P><BR/></xsl:for-each>

Sigue

ejemplo07_32.xsl

Page 24: <?xml version="1.0" encoding="ISO-8859-1"?>

24

<xsl:element name="/BODY" /><xsl:element name="/HTML" /></xsl:template>

<xsl:template match="Enlace"><A><xsl:attribute name="href"><xsl:value-of /></xsl:attribute><xsl:value-of /></A></xsl:template>

<xsl:template match="Figura"><IMG><xsl:attribute name="src"><xsl:value-of /></xsl:attribute></IMG></xsl:template>

</xsl:stylesheet>

Page 25: <?xml version="1.0" encoding="ISO-8859-1"?>

25

<?xml version="1.0" encoding="ISO-8859-1"?><xsl:stylesheet version="1.0" language="VBScript" xmlns:xsl="http://www.w3.org/TR/WD-xsl"xmlns="http://www.w3.org/TR/REC-html40"result-ns="">

<xsl:template match="/"><HTML><HEAD><TITLE><xsl:value-of select="//Contenido" /></TITLE></HEAD><BODY><LINK rel="stylesheet" type="text/css" href="agenda.css" /><H1><xsl:value-of select="//Contenido" /></H1><xsl:for-each select="//recurso"><P>El recurso<B><xsl:value-of select="Nombre" /></B>contiene información sobre<I><xsl:value-of select="Descripción" /></I>.</P> <P>La dirección de correo electrónico es <xsl:apply-templates select="Correoe" /></P><BR/></xsl:for-each><H2>NOTAS:</H2><P>Día y fecha actual:<B><xsl:eval>FechaHora()</xsl:eval></B></P><P>Mi monitor tiene 19 pulgadas, o sea, la diagonal de su pantalla mide <B><xsl:eval>PulgadasACm(19)</xsl:eval> cm</B>.</P></BODY></HTML></xsl:template> Sigue

ejemplo07_34.xsl

Page 26: <?xml version="1.0" encoding="ISO-8859-1"?>

26

<xsl:script>Function FechaHora()FechaHora=Now()End Function</xsl:script>

<xsl:script>Function PulgadasACm(pulg)PulgadasACm=pulg*2.54End Function</xsl:script>

<xsl:template match="Correoe"><A><xsl:attribute name="href"><xsl:eval>"mailto:"</xsl:eval><xsl:value-of /></xsl:attribute><xsl:value-of /></A></xsl:template>

</xsl:stylesheet>