Thread View: chile.comp.programacion
2 messages
2 total messages
Started by sigfridelunico
Tue, 18 Jul 2006 21:40
Duda con XSLT
Author: sigfridelunico
Date: Tue, 18 Jul 2006 21:40
Date: Tue, 18 Jul 2006 21:40
35 lines
2064 bytes
2064 bytes
Tengo el siguiente problema:
Input:
<response>
<RecordSet>
</RecordSet>
</response>
Xslt:
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output indent="yes" encoding="ISO-8859-1"/>
<xsl:template match="/">
<response>
<xsl:for-each select="response/RecordSet">
<RecordSet>
<xsl:copy-of select="Record"/>
</RecordSet>
</xsl:for-each>
</response>
</xsl:template>
</xsl:stylesheet>
Output:
<?xml version="1.0" encoding="UTF-16"?>
<response>
<RecordSet>
</RecordSet>
</response>
**********************************
Si se fijan en el encabezado xml de la salida, figura como
codificación "UTF-16" y no "ISO-8859-1" como le indico a la salida en
el Xslt. Estoy utilizando MSXML 4.0, a través de Delphi ¿alguien ha
tenido este problemilla y lo ha solucionado? agradecido de vuestras
respuestas, gracias.
Re: Duda con XSLT
Author: Osvaldo
Date: Thu, 20 Jul 2006 22:49
Date: Thu, 20 Jul 2006 22:49
34 lines
1978 bytes
1978 bytes
sigfridelunico@yahoo.com wrote: > Output: > <?xml version="1.0" encoding="UTF-16"?> > <response> > <RecordSet> > </RecordSet> > </response> > ********************************** > Ojala te sirva: A mi me sucedio algo similar cuando hacia esto: strXML = oDoc.transformNode(oLayout) y de ahi Response.write strXML Que quiero decir? que probablemente la data ya venga con un charset utf-16 y que por mas que cambies la cabecera (con createProcessingInstruction por ejemplo) no servira de mucho. La solucion (si este es el problema), es que cuando te generen el XML no lo pasen por variables string, ya estas usan un charset utf-16 : oRs.Save Response, adPersistXML ' stream hacia stream Prueba tambien haciendo el transform hacia un stream y no hacia un string. Suerte, -o
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads