You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cocoon.apache.org by Henry Orlando Canastero <ho...@unal.edu.co> on 2004/09/24 18:30:55 UTC

Problem using xscript, encoding.

Hi all,

We are using Cocoon 2.1.5 for develop the Site of the Academic
Information System of the Universidad Nacional de Colombia, and are
using the xscript logicsheet.

When we use the next code:

<xscript:variable name="soap-result">
	<test>nuñez</test>
</xscript:variable>

<xscript:variable name="stylesheet">
	<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
	<xsl:template match="test">
		<xsl:copy-of select="."/>
	</xsl:template>
	</xsl:stylesheet>
</xscript:variable> 

<xscript:transform name="soap-result" stylesheet=" stylesheet "/>

And we obtain the next exception:

Caused by: java.io.UTFDataFormatException: Invalid byte 2 of 4-byte
UTF-8 sequence.
at org.apache.xerces.impl.io.UTF8Reader.invalidByte(Unknown Source)
at org.apache.xerces.impl.io.UTF8Reader.read(Unknown Source)
at org.apache.xerces.impl.XMLEntityScanner.load(Unknown Source)
at org.apache.xerces.impl.XMLEntityScanner.scanLiteral(Unknown Source)
at org.apache.xerces.impl.XMLScanner.scanAttributeValue(Unknown Source)
at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanAttribute(Unknown
Source)
at
org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanStartElement(Unknown
Source)
at
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDis
patcher.dispatch(Unknown Source)
at
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unkno
wn Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
at org.apache.excalibur.xml.impl.JaxpParser.parse(JaxpParser.java:318)
at
org.apache.excalibur.xmlizer.DefaultXMLizer.toSAX(DefaultXMLizer.java:16
2)
at
org.apache.excalibur.xml.xslt.XSLTProcessorImpl.sourceToSAX(XSLTProcesso
rImpl.java:401)
at
org.apache.excalibur.xml.xslt.XSLTProcessorImpl.transform(XSLTProcessorI
mpl.java:433)
... 42 more

How we change the configuration encoding to ISO-8859-1 in the xscript
transform, for it can support the "ñ" and others Spanish characters ?

Thanks for you help.

Cordialy,
Henry Canastero Prieto
Develop Group
Academic Information System
Universidad Nacional de Colombia
Ciudad Universitaria
Centro de computo [2° piso] 
http://www.sia.unal.edu.co 
mailto:hocanasteropr@unal.edu.co 
tel. 57-1-3165000 ext. 12043