[xsl] "java.lang.Exception: s4s-elt-character: Non-whitespace characters...."

Subject: [xsl] "java.lang.Exception: s4s-elt-character: Non-whitespace characters...."
From: Oswald Campesato <ocampesato@xxxxxxxxx>
Date: Mon, 25 Oct 2004 12:31:26 -0700 (PDT)
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,

However, when the XML document is saved with the
following code, the document validates successfully:
StreamResult result = new StreamResult(xml);
TransformerFactory tFactory =
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: 

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



Current Thread