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

"java.lang.Exception: s4s-elt-character: Non-whitespac

Subject: "java.lang.Exception: s4s-elt-character: Non-whitespace characters...."
From: Oswald Campesato <ocampesato@xxxxxxxxx>
Date: Mon, 25 Oct 2004 12:31:26 -0700 (PDT)
s4s elt character
Hello, everyone:

I'm getting an error when validating an XML document
from a file that was saved to the file system using
OutputFormat, whereas no error occurs when it's saved
with a transformation.  

Here's the full text of the error message:
------------------------------------------
java.lang.Exception: s4s-elt-character: Non-whitespace
characters are not allowed in schema elements other
than 'xs:appinfo' and 'xs:documentation'. Saw '>'.


The XML document was saved with this code:
------------------------------------------
OutputFormat format = new OutputFormat(doc);
XMLSerializer serializer = new XMLSerializer(out,
format);
serializer.setNamespaces(true);
serializer.serialize(doc);        


However, when the XML document is saved with the
following code, the document validates successfully:
--------------------------------------------
StreamResult result = new StreamResult(xml);
TransformerFactory tFactory =
TransformerFactory.newInstance();        
Transformer transformer = tFactory.newTransformer();
transformer.transform(new DOMSource(doc), result);

btw:  The XML document was originally generated via 
an XSL stylesheet that contains the following: 
disable-output-escaping="yes"

Has anyone else has encountered this type of error?
Suggestions welcome...

Regards,

Oswald

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.