| Subject: [xsl] Tranformation failed with Saxon for "Illegal HTML  character" From: "Gian Luca Paloni" <gianluca.paloni@xxxxxxxxxxxx> Date: Fri, 28 Jul 2006 18:12:00 +0200 (CEST) | 
Hi all,
i use Saxon ver. 8.7.3 as engine to make xslt transformations.
Heres a sample code:
public static void exampleFromStream(String sourceID, String xslID)
          throws TransformerException, TransformerConfigurationException,
                 FileNotFoundException {
      // Create a transform factory instance.
      TransformerFactory tfactory  = TransformerFactory.newInstance();
new Boolean(false));
      InputStream        xslIS     =
          new BufferedInputStream(new FileInputStream(xslID));
      StreamSource       xslSource = new StreamSource(xslIS);
      // The following line would be necessary if the stylesheet contained
      // an xsl:include or xsl:import with a relative URL
      // xslSource.setSystemId(xslID);
      // Create a transformer for the stylesheet.
      Transformer  transformer = tfactory.newTransformer(xslSource);
      InputStream  xmlIS       =
          new BufferedInputStream(new FileInputStream(sourceID));
      StreamSource xmlSource   = new StreamSource(xmlIS);
      // The following line would be necessary if the source document
contained
      // a call on the document() function using a relative URL
      // xmlSource.setSystemId(sourceID);
      // Transform the source XML to System.out.
      transformer.transform(xmlSource, new StreamResult(new
PrintWriter(new FileOutputStream("c://test.html"))));
  }
If I apply the transformation to an XML file which include the  (euro
symbol, decimal 128) I got an error message saying that:
ERROR AT ELEMENT CONSTRUCTOR <SPAN> ON LINE 69 OF :
  SERE0014: ILLEGAL HTML CHARACTER: DECIMAL 128
; SYSTEMID: ; LINE#: 69; COLUMN#: -1
NET.SF.SAXON.TRANS.DYNAMICERROR: ILLEGAL HTML CHARACTER: DECIMAL 128
	AT NET.SF.SAXON.EVENT.HTMLEMITTER.WRITEESCAPE(HTMLEMITTER.JAVA:321) .
Anyone can help me?
Is there a way to tell the transformer just to let unchanged and not
interpret those special chars??
Thanks in advance to all,
Bye
Gian
-- 
La presente comunicazione potrebbe contenere informazioni riservate e/o protette
da segreto professionale ed e' indirizzata esclusivamente ai destinatari della
medesima qui indicati. Se avete ricevuto per errore la presente comunicazione,
siete invitati a segnalarcelo, rispondendo a questo stesso indirizzo di e-mail,
e a cancellare il presente messaggio dal Vostro sistema. E' strettamente proibito
e potrebbe essere fonte di violazione di legge qualsiasi uso, comunicazione, copia
o diffusione dei contenuti di questa comunicazione da parte di chi la abbia
ricevuta per errore o in violazione degli scopi della presente.
Il messaggio e' stato analizzato alla ricerca di virus o contenuti pericolosi
ed e' risultato NON infetto.
| Current Thread | 
|---|
| 
 | 
| <- Previous | Index | Next -> | 
|---|---|---|
| RE: [xsl] producing month list in x, Michael Kay | Thread | Re: [xsl] Tranformation failed with, David Carlisle | 
| Re: [xsl] Tranformation failed with, David Carlisle | Date | Re: [xsl] Tranformation failed with, David Carlisle | 
| Month |