Foros del Web

Foros del Web (http://www.forosdelweb.com/)
-   Programación General (http://www.forosdelweb.com/f14/)
-   -   Este fichero XML no parece tener ninguna información de estilo asociada. Se (http://www.forosdelweb.com/f14/este-fichero-xml-no-parece-tener-ninguna-informacion-estilo-asociada-552860/)

mc_quake 30/01/2008 07:58

Este fichero XML no parece tener ninguna información de estilo asociada. Se
 
Este es el error que me da

Cita:

Este fichero XML no parece tener ninguna información de estilo asociada. Se muestra debajo el árbol del documento.

<document>

<Consignment>
<ConsignmentNumber>160783926</ConsignmentNumber>
<OriginDepotName>Santiago</OriginDepotName>
<CustomerReference/>
<CollectionDate>21 Jan 2008</CollectionDate>
<DeliveryTown>SEATTLE</DeliveryTown>
<DeliveryDate>23 Jan 2008</DeliveryDate>
<DeliveryTime>10:49</DeliveryTime>
<Signatory>A MICKO</Signatory>
<SummaryCode>Delivered</SummaryCode>
<Cou-Id-Dest>United States</Cou-Id-Dest>
<Cou-Id-Orig>Chile</Cou-Id-Orig>
<SearchType>C</SearchType>
<SearchKey>160783926</SearchKey>
<TOPaccountNo>12256</TOPaccountNo>
<TOPaccountCouID>Chile</TOPaccountCouID>
<SenderaccountNo>12256</SenderaccountNo>
<SenderCouID>Chile</SenderCouID>

<StatusData>
<Status>DELIVERED</Status>
<LocalEventDate>23 Jan 2008</LocalEventDate>
<LocalEventTime>10:49</LocalEventTime>
<Depot>Usa Others</Depot>
</StatusData>

<StatusData>
<Status>OUT FOR DELIVERY</Status>
<LocalEventDate>23 Jan 2008</LocalEventDate>
<LocalEventTime>07:22</LocalEventTime>
<Depot>Usa Others</Depot>
</StatusData>

<StatusData>
<Status>OUT FOR DELIVERY</Status>
<LocalEventDate>23 Jan 2008</LocalEventDate>
<LocalEventTime>05:47</LocalEventTime>
<Depot>Usa Others</Depot>
</StatusData>

<StatusData>
<Status>OUT FOR DELIVERY</Status>
<LocalEventDate>23 Jan 2008</LocalEventDate>
<LocalEventTime>02:56</LocalEventTime>
<Depot>Usa Others</Depot>
</StatusData>


<PackagesSummary>
<NumberOfPieces>00001</NumberOfPieces>
<Weight>00000.100</Weight>
<PackageDescription>BOX</PackageDescription>
<GoodsDescription>DOCUMENT</GoodsDescription>
<InvoiceAmount>00000000000.00</InvoiceAmount>
<InvoiceCurrency/>
</PackagesSummary>
</Consignment>
</document>......................................... .....
:................................................. ..

esta son las paginas que crean el xml

estracto
Cita:

nota ----- crear objeto de conexión de seguridad
dim httpOb
set httpOb = Server.CreateObject("Microsoft.XMLHTTP")

'nota ----- abrir conexión para una dirección IP y un archivo de entrada dados
httpOb.Open "POST","http://xxxxxxx:81/VBGxxxxxxxx.asp", false, "", ""

If Err Then
Response.Redirect("tracking.asp?msg=error")
Else
'nota ----- si logra conectarse, establecer encabezado y enviar el XML
httpOb.setRequestHeader "Content-Type","application/x-www-form-urlencoded"
httpOb.Send "xml_in="&xml_in

'nota ----- guardar XML devuelto
xml_out = httpOb.responseText

End If
'nota ------- liberar la cola
set httpOb = nothing

'================================================= ==================
' Agrego aqui la opcion para que se muestre en el template

xml_out = Replace(xml_out,"<?xml version='1.0' encoding=""ISO-8859-1"" standalone='yes'?>","<?xml version=""1.0"" encoding=""ISO-8859-1"" standalone=""no""?><?xml-stylesheet href=""template.xsl"" type=""text/xsl""?>")

'================================================= ==================
' Aqui creo el xml de respuesta

Response.ContentType = "text/xml"
Response.Write(xml_out)
%>
template xls
Cita:

<?xml version="1.0" encoding="iso-8859-1"?>
<!-- DWXMLSource="156018124.xml" -->
<!DOCTYPE xsl:stylesheet [
<!ENTITY nbsp "*">
<!ENTITY copy "©">
<!ENTITY reg "®">
<!ENTITY trade "™">
<!ENTITY mdash "—">
<!ENTITY ldquo "“">
<!ENTITY rdquo "”">
<!ENTITY pound "£">
<!ENTITY yen "¥">
<!ENTITY euro "€">
]>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="html" encoding="iso-8859-1" doctype-public="-//W3C//DTD XHTML 1.0 Transitional//EN" doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"/>
<xsl:template match="/">
<html xmlns="http://www.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"/>
<title>OCS Overseas Courier Services Chile</title>
<link href="_xxxxxx/xxxxxx.css" rel="stylesheet" type="text/css" />
</head>
<body>
<table border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td height="90" colspan="3"><img src="_xxxxxx/xxxxxx.jpg" width="882" height="90" hspace="0" vspace="0" border="0"/></td>
</tr>
<tr valign="top">
<td width="160" style="padding:9px 0 0 32px;"><table width="100%" border="0" cellspacing="0" cellpadding="3" style="font-size:9px;">
<tr>
<td style="padding-left:20px;">&nbsp;</td>
</tr>
<tr>
<td style="padding-top:30px;"><img src="_imag/_pix.gif"></img></td>
</tr><tr>
<td height="26" style="padding-left:20px;border-top:1px solid #99B8D8;"><a href="xxxxxx.asp" onMouseOver="window.status='HOME'; return true;" style="color:#10152E;">HOME</a></td>
</tr><tr>
<td height="26" style="padding-left:20px;border-top:1px solid #99B8D8;"><a href="xxxxxx.asp?idq=77" onMouseOver="window.status='LA COMPAÑIA'; return true;" style="color:#10152E;">LA COMPAÑIA</a></td>
</tr><tr>
<td height="26" style="padding-left:20px;border-top:1px solid #99B8D8;"><a href="xxxxxx.asp?idq=78" onMouseOver="window.status='HISTORIA'; return true;" style="color:#10152E;">HISTORIA</a></td>

</tr><tr>
<td height="26" style="padding-left:20px;border-top:1px solid #99B8D8;"><a href="xxxxxx.asp?idq=79" onMouseOver="window.status='FACTURA PROFORMA'; return true;" style="color:#10152E;">FACTURA PROFORMA</a></td>
</tr>
<tr>
<td style="border-top:1px solid #99B8D8;">&nbsp;</td>
</tr>
</table>
<img src="_xxxxxx/xxxxxx.gif" width="160" height="138"></img></td>
<td width="530" style="padding-top:12px;">
<table border="0" align="center" cellpadding="0" cellspacing="0" style="font-size:9px;">
<tr>

<td align="center" style="padding:0 20px 0 20px;border-right:1px solid #2D6BAA;"><a href="xxxxxx.asp?idq=80" onMouseOver="window.status='SERVICIOS'; return true;">SERVICIOS</a></td>

<td align="center" style="padding:0 20px 0 20px;border-right:1px solid #2D6BAA;"><a href="xxxxxx.asp?idq=81" onMouseOver="window.status='SERVICIOS ESPECIALES'; return true;">SERVICIOS ESPECIALES</a></td>

<td align="center" style="padding:0 20px 0 20px;border-right:1px solid #2D6BAA;"><a href="xxxxxx.asp?idq=82" onMouseOver="window.status='OFICINAS Y AGENTES'; return true;">OFICINAS Y AGENTES</a></td>

<td align="center" style="padding:0 20px 0 20px;"><a href="xxxxxx.asp" onMouseOver="window.status='CONTACTO'; return true;">CONTACTO</a></td>

</tr>
<tr>
<td align="center"></td>
<td align="center"></td>
<td align="center"></td>
<td align="center"><img src="_imag/_pix.gif" width="10" height="3" vspace="5"></img></td>
</tr>
</table>
<div style="padding:20px 40px 20px 40px;">
<h1>Tracking: Respuesta a su consulta...</h1>

<xsl:if test="document/Consignment/CustomerReference = 'NotFound'">
<h2>No Encontrado</h2>
</xsl:if>

<xsl:if test="document/Consignment/CustomerReference != 'NotFound'">
<h3>Información del Envio</h3>
<img src="_imag/line.jpg" width="450" height="9" />
<table width="100%" border="0" cellspacing="0" cellpadding="3">

<tr>
<td>Ciudad de Destino:</td>
<td><xsl:value-of select="document/Consignment/DeliveryTown"/></td>
<td>País de Destino:</td>
<td><xsl:value-of select="document/Consignment/Cou-Id-Dest"/></td>
</tr>
<tr>
<td>Ciudad de Origen:</td>
<td><xsl:value-of select="document/Consignment/OriginDepotName"/></td>
<td>País de Origen:</td>
<td><xsl:value-of select="document/Consignment/Cou-Id-Orig"/></td>
</tr>
<tr>
<td>Producto:</td>
<td><xsl:value-of select="document/Consignment/PackagesSummary/GoodsDescription"/></td>
<td>Peso:</td>
<td><xsl:value-of select="format-number(document/Consignment/PackagesSummary/Weight,'#0.00')"/></td>
</tr>
<tr>
<td>Estado:</td>
<td><xsl:value-of select="document/Consignment/StatusData/Status"/></td>
<td>Fecha Entrega:</td>
<td><xsl:value-of select="document/Consignment/DeliveryDate"/></td>
</tr>
<tr>
<td>Firma</td>
<td><xsl:value-of select="document/Consignment/Signatory"/></td>
<td>Hora Entrega: </td>
<td><xsl:value-of select="document/Consignment/DeliveryTime"/></td>
</tr>
</table>
<br />

<h3>Información de Tracking</h3>
<img src="_imag/line.jpg" width="450" height="9" />
<table width="100%" border="0" cellspacing="0" cellpadding="3">
<tr bgcolor="#CEE3F3">
<td>Fecha</td>
<td>Hora</td>
<td>Lugar</td>
<td>Estado</td>
</tr>
<xsl:for-each select="document/Consignment/StatusData">
<tr>
<td><xsl:value-of select="LocalEventDate"/></td>
<td><xsl:value-of select="LocalEventTime"/></td>
<td><xsl:value-of select="Depot"/></td>
<td><xsl:value-of select="Status"/></td>
</tr>
</xsl:for-each>
</table>
</xsl:if>
<br>
</br><br></br>

alguna idea de como solucionarlo

monoswim 30/01/2008 09:11

Re: Este fichero XML no parece tener ninguna información de estilo asociada. Se
 
en el XML debes colocar la referencia al XSL

http://www.daniel.prado.name/Program...LT.asp?art=133

:adios:

mc_quake 30/01/2008 10:29

Re: Este fichero XML no parece tener ninguna información de estilo asociada. Se
 
si la tengo puesta
==================
' Agrego aqui la opcion para que se muestre en el template

xml_out = Replace(xml_out,"<?xml version='1.0' encoding=""ISO-8859-1"" standalone='yes'?>","<?xml version=""1.0"" encoding=""ISO-8859-1"" standalone=""no""?><?xml-stylesheet href=""template.xsl"" type=""text/xsl""?>")

'=================================================

monoswim 30/01/2008 11:22

Re: Este fichero XML no parece tener ninguna información de estilo asociada. Se
 
Cita:

este fichero XML no parece tener ninguna información de estilo asociada. Se muestra debajo el árbol del documento.
Eso no es un error, es un mensaje que simplemente dice que no hay ningún archivo de estilo...

hacé botón derecho del mouse en el archivo y mirá el código fuente...porque en el que colocaste no está la línea <?xml-stylesheet href=""template.xsl"" type=""text/xsl""?> que c0olocas en tu ¿ PHP ?

Espero que te sirva

Saludos


La zona horaria es GMT -6. Ahora son las 11:47.

Desarrollado por vBulletin® Versión 3.8.7
Derechos de Autor ©2000 - 2026, Jelsoft Enterprises Ltd.