Retroceder   Foros del Web > Programación para sitios web > XML

Respuesta
 
Herramientas Desplegado
Antiguo 30-ene-2008, 06:58   #1 (permalink)
mc_quake ha deshabilitado el karma
 
Avatar de mc_quake
 
Fecha de Ingreso: enero-2006
Mensajes: 433
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
__________________
Mc_Quake

Para ayudar en lo que se pueda:Zzz:
mc_quake está desconectado   Responder Citando
Antiguo 30-ene-2008, 08:11   #2 (permalink)
$moderador{'Esteban'}
monoswim llegará a ser famoso muy prontomonoswim llegará a ser famoso muy pronto
 
Avatar de monoswim
 
Fecha de Ingreso: noviembre-2002
Ubicación: Buenos Aires - Argentina
Mensajes: 7.322
Enviar un mensaje por MSN a monoswim
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

__________________
MonoSwim

Antes era fanfarrón y canchero, ahora soy perfecto !!!!!!!
monoswim está desconectado   Responder Citando
Antiguo 30-ene-2008, 09:29   #3 (permalink)
mc_quake ha deshabilitado el karma
 
Avatar de mc_quake
 
Fecha de Ingreso: enero-2006
Mensajes: 433
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""?>")

'=================================================
__________________
Mc_Quake

Para ayudar en lo que se pueda:Zzz:
mc_quake está desconectado   Responder Citando
Antiguo 30-ene-2008, 10:22   #4 (permalink)
$moderador{'Esteban'}
monoswim llegará a ser famoso muy prontomonoswim llegará a ser famoso muy pronto
 
Avatar de monoswim
 
Fecha de Ingreso: noviembre-2002
Ubicación: Buenos Aires - Argentina
Mensajes: 7.322
Enviar un mensaje por MSN a monoswim
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
__________________
MonoSwim

Antes era fanfarrón y canchero, ahora soy perfecto !!!!!!!
monoswim está desconectado   Responder Citando
Respuesta
No hay votos aún.


Herramientas
Desplegado

Normas de Publicación
No puedes crear nuevos temas
No puedes responder temas
No puedes subir archivos adjuntos
No puedes editar tus mensajes

BB code is Activado
Caritas están Activado
[IMG] está Activado
Código HTML está Desactivado


La Zona horaria es GMT -6. Ahora son las 04:44.


Message Board Statistics

LinkBacks Enabled by vBSEO 3.1.0

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 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93