Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
THRUST SERVICES & TOOLS
CLOUD EDITIONS
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Web CMS (TeamSite)
Exception when using com.interwoven.cssdk.transform.XSLTransformer.tran sform function
erud
I keep getting this error.
[Fatal Error] :1:45: The processing instruction target matching "[xX][mM][lL]" is not allowed.
SystemId Unknown; Line #1; Column #45; org.xml.sax.SAXParseException: The processing instruction target matching "[xX][mM][lL]" is not allowed.
I'm able to generate the page without any problem using same DCR and XSLT but keep getting this error when trying to use CSSDK.
I even tried using ByteArrayInputStream for both XSLT and the DCR. Is there an issue with this API?
com.interwoven.cssdk.transform.XSLTransformer.transform(new StreamSource(srcByteArray), new StreamSource(xsltByteArray), new StreamResult(outputStreamResult));
Find more posts tagged with
Comments
Rick Poulin
There's no issue with that call, but there is an issue with the CSSDK's handling of inputstreams. CSSimpleFile.getInputStream() reads in the UTF8 BOM as characters, not as an encoding marker, so your XML parser chokes on it.
To fix, your file must either be saved in UTF8 without the BOM, or you need to change your Java to read the input stream as a string, regex out the BOM, and then send it to the parser/transformer.