Tema: Enlace XML
Ver Mensaje Individual
  #4 (permalink)  
Antiguo 10/06/2006, 09:14
iuav
 
Fecha de Ingreso: abril-2004
Ubicación: Juli - Puno - Perú
Mensajes: 51
Antigüedad: 20 años, 9 meses
Puntos: 0
Enlace XML

Holas,

Veo que andan sufriendo con este tema de enlaces XML, pues es algo simple.
Pues tengo algo así en mi XML

<?xml version="1.0" encoding="ISO-8859-1" ?>
<listado xmlns:dt="urn:schemas-microsoft-com:datatypes"
xmlns:xlink="http://www.w3.org/1999/xlink">
...
<url xlink:href="http://www.google.com/" xlink:type="simple"
xlink:show="new">http://www.google.com/</url>
...

Y mi XSL tengo definido de esta forma.

<?xml version="1.0" encoding="ISO-8859-1" ?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999
/XSL/Transform" xmlns:xlink="http://www.w3.org/1999/xlink">
...

<xsl:template match="*[@xlink:type = 'simple' and @xlink:href]">
<a href="{@xlink:href}" target="{@xlink:show}">
<xsl:apply-templates />
</a>
</xsl:template>
<xsl:template match="*[@xlink:type = 'simple' and @xlink:name]">
<a name="{@xlink:name}" />
</xsl:template>

Suerte.

Saludos


Iuav
__________________
Juli - La Pequeña Roma Aymara