Diferència entre revisions de la pàgina «Llenguatge de marques i fulls d’estil XSL»
Salta a la navegació
Salta a la cerca
(Es crea la pàgina amb «'''volver a''' M04 Lenguajes de marcas y sistemas de gestión de información =Material de teoria i soporte= En estas webs encontraréis el material de soporte par...».) |
|||
Línia 7: | Línia 7: | ||
=Ejercicios= | =Ejercicios= | ||
<ol> | <ol> | ||
− | <li></li> | + | <li>Dado el siguiente XML: |
+ | <pre> | ||
+ | <?xml version="1.0" encoding="ISO-8859-1"?> | ||
+ | <catalog xmlns:foo="http://www.foo.org/" xmlns:bar="http://www.bar.org"> | ||
+ | <foo:cd> | ||
+ | <title>Empire Burlesque</title> | ||
+ | <artist>Bob Dylan</artist> | ||
+ | <country>USA</country> | ||
+ | <company>Columbia</company> | ||
+ | <price>10.90</price> | ||
+ | <bar:year>1985</bar:year> | ||
+ | </foo:cd> | ||
+ | <foo:cd> | ||
+ | <title>Hide your heart</title> | ||
+ | <artist>Bonnie Tyler</artist> | ||
+ | <country>UK</country> | ||
+ | <company>CBS Records</company> | ||
+ | <price>9.90</price> | ||
+ | <bar:year>1988</bar:year> | ||
+ | </foo:cd> | ||
+ | <foo:cd> | ||
+ | <title>Greatest Hits</title> | ||
+ | <artist>Dolly Parton</artist> | ||
+ | <country>USA</country> | ||
+ | <company>RCA</company> | ||
+ | <price>9.90</price> | ||
+ | <bar:year>1982</bar:year> | ||
+ | </foo:cd> | ||
+ | </catalog> | ||
+ | </pre> | ||
+ | Aplica XSL para obtener el XML: | ||
+ | <pre> | ||
+ | <cantates> | ||
+ | <cantante>Bob Dylan</cantante> | ||
+ | <cantante>Bonnie Tyler</cantante> | ||
+ | <cantante>Dolly Parton</cantante> | ||
+ | </cantantes> | ||
+ | </pre> | ||
+ | </li> | ||
</ol> | </ol> |
Revisió del 10:55, 26 nov 2019
volver a M04 Lenguajes de marcas y sistemas de gestión de información
Material de teoria i soporte
En estas webs encontraréis el material de soporte para este apartado:
- Tutorial de XSLT ->
- Ejemplos para trabajar online
- Editor Online XML - XSL
Ejercicios
- Dado el siguiente XML:
<?xml version="1.0" encoding="ISO-8859-1"?> <catalog xmlns:foo="http://www.foo.org/" xmlns:bar="http://www.bar.org"> <foo:cd> <title>Empire Burlesque</title> <artist>Bob Dylan</artist> <country>USA</country> <company>Columbia</company> <price>10.90</price> <bar:year>1985</bar:year> </foo:cd> <foo:cd> <title>Hide your heart</title> <artist>Bonnie Tyler</artist> <country>UK</country> <company>CBS Records</company> <price>9.90</price> <bar:year>1988</bar:year> </foo:cd> <foo:cd> <title>Greatest Hits</title> <artist>Dolly Parton</artist> <country>USA</country> <company>RCA</company> <price>9.90</price> <bar:year>1982</bar:year> </foo:cd> </catalog>
Aplica XSL para obtener el XML:
<cantates> <cantante>Bob Dylan</cantante> <cantante>Bonnie Tyler</cantante> <cantante>Dolly Parton</cantante> </cantantes>