[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Tranformation failed with Saxon for "Illegal HTML cha

Subject: 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)
sere0014
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

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.