Error al abrir xsl desde xml
Publicado por Alonso (1 intervención) el 02/06/2020 15:02:42
Buenas tardes. Llevo dos días intentando transformar un xml usando un xsl pero siempre me sale:
Error al cargar la hoja de estilo: El procesamiento de una hoja de estilo XSLT ha fallado.
No encuentro el error por ninguna parte, ¿podríais ayudarme?
Código xml:
Código xsl:
Lo estoy haciendo en XML-Copy-Editor.
Gracias por vuestra ayuda.
Error al cargar la hoja de estilo: El procesamiento de una hoja de estilo XSLT ha fallado.
No encuentro el error por ninguna parte, ¿podríais ayudarme?
Código xml:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" href="vehiculos.xsl"?>
<?xml-stylesheet type="text/css" href="vehiculos.css"?>
<Vehiculos
xmlns="http://www.alonso.org"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.alonso.org vehiculos.xsd">
<Vehiculo año="1996" marca="Land Rover" modelo="Discovery">
<Kilometraje>36500</Kilometraje>
<Color>Negro</Color>
<Precio>22100</Precio>
</Vehiculo>
</Vehiculos>
Código xsl:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet
xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
xmlns="http://www.alonso.org">
<xsl:template match="/">
<html>
<head>
<title>Vehículos Usados</title>
</head>
<body>
<h1>VEHÍCULOS USADOS</h1>
<table align="center" border="2">
<tr>
<th>Año</th>
<th>Marca</th>
<th>Modelo</th>
<th>Kilometraje</th>
<th>Color</th>
<th>Precio</th>
</tr>
<xsl:for-each order-by="Precio" select="Vehiculos/Vehiculo">
<tr>
<td><xsl:value-of select="@año"/></td>
<td><xsl:value-of select="@marca"/></td>
<td><xsl:value-of select="@modelo"/></td>
<td><xsl:value-of select="Kilometraje"/></td>
<td><xsl:value-of select="Color"/></td>
<td><xsl:value-of select="Precio"/></td>
</tr>
</xsl:for-each>
</table>
</body>
</html>
</xsl:template>
</xsl:stylesheet>
Lo estoy haciendo en XML-Copy-Editor.
Gracias por vuestra ayuda.
Valora esta pregunta


0