XSL - Cargar un swf desde XSL

 
Vista:

Cargar un swf desde XSL

Publicado por Roberto (1 intervención) el 22/03/2006 17:33:33
Buenas... He intentado tropecientas veces cargar un SWF desde XSL y me ha sido imposible. He intentado cargarlo haciendo una llamada a un HTML y nada.... posteo en concreto el código donde debería ir insertada la carga del SWF (Donde pone AQUIIIIII)

<!-- edited with XML Spy v2.5 NT - http://www.xmlspy.com -->
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:s="uuid:BDC6E3F0-6DA3-11d1-A2A3-00AA00C14882" xmlns:dt="uuid:C2F41010-65B3-11d1-A29F-00AA00C14882" xmlns:rs="urn:schemas-microsoft-com:rowset" xmlns:z="#RowsetSchema" xmlns:fo="http://www.w3.org/1999/XSL/Format">
<xsl:output method="html" version="1.0" encoding="windows-1252" indent="yes"/>
<xsl:template match="/">
<head>
<script language="javascript">
function go(form) {
codart=form.name;
var donde=window.location.href;
var s=donde.lastIndexOf('/');
var loc=donde.substring(0,s);
cantidad=form.cantidad.value
nrandom=Math.floor(Math.random( ) *65535)
loc+='/carro.asp?codart='+codart+"&cantidad="+cantidad+"&rnd"+nrandom
window.open(loc,'carro')
}
function goart(form) {
codart=form.name
var donde=window.location.href;
cantidad=form.cantidad.value
nrandom=Math.floor(Math.random( ) *65535)
var z=escape(donde);
loc='articulo_ficha.asp?codart='+codart+'&desde='+z+'&rnd'+nrandom
whan=window.open(loc,'articulos')
whan.focus()
}
</script>
<link rel="stylesheet" type="text/css" href="img104/css/estilos.css"/>
<!-- tros nou -->
<meta http-equiv="Content-Type" content="text/html; charset=windows-1152"/>
</head>
<body class="amarillo" topmargin="0" leftmargin="0" link="#FFFFFF" vlink="#FFFFFF" alink="#FFFFFF">
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr>
<td width="100%" align="center">
<p style="margin-top: 10" align="center"/>
<h4>OFERTAS ESPECIALES EN EQUIPOS MONTADOS - RPM -</h4>
<h4>- - - - - - - - - - - - - - - - - - - - - - - -</h4>
AQUIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIII
<h4>- - - - - - - - - - - - - - - - - - - - - - - -</h4>
<h4>OFERTAS ESPECIALES EN EQUIPOS MONTADOS - RPM -</h4>
</td>
</tr>
</table>
</body>
</xsl:template>
</xsl:stylesheet>

Muchísimas Gracias
Valora esta pregunta
Me gusta: Está pregunta es útil y esta claraNo me gusta: Está pregunta no esta clara o no es útil
0
Responder
Imágen de perfil de Alejandro

Insertar un archivo SWF en un documento HTML generado desde XSL

Publicado por Alejandro (227 intervenciones) el 05/07/2023 20:27:17
Buenas, Roberto.

El código XSL que has compartido no incluye una forma directa de cargar un archivo SWF. Sin embargo, puedes intentar utilizar el elemento HTML `<embed>` u `<object>` para insertar el archivo SWF en tu página HTML generada a partir del XSL.

Aquí tienes un ejemplo de cómo podrías hacerlo:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
<xsl:template match="/">
  <html>
    <head>
      <!-- Encabezado del documento -->
    </head>
    <body>
      <table>
        <!-- Contenido de la tabla y otras secciones -->
      </table>
      <div>
        <!-- Código adicional antes de la carga del SWF -->
      </div>
      <div>
        <embed src="ruta/al/archivo.swf" type="application/x-shockwave-flash"></embed>
        <!-- O utiliza el elemento <object> en su lugar -->
        <!--<object data="ruta/al/archivo.swf" type="application/x-shockwave-flash"></object>-->
      </div>
      <div>
        <!-- Código adicional después de la carga del SWF -->
      </div>
    </body>
  </html>
</xsl:template>

En este ejemplo, se utiliza el elemento `<embed>` u `<object>` para cargar el archivo SWF. Asegúrate de proporcionar la ruta correcta al archivo SWF en el atributo `src` o `data` del elemento correspondiente.

Ten en cuenta que este ejemplo es una guía básica y deberás ajustarlo según tus necesidades y la estructura específica de tu XSL y HTML.

Espero que esta solución te ayude a cargar un archivo SWF utilizando XSL. ¡Buena suerte!
Valora esta respuesta
Me gusta: Está respuesta es útil y esta claraNo me gusta: Está respuesta no esta clara o no es útil
0
Comentar