-
-
Notifications
You must be signed in to change notification settings - Fork 70
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
'com.fasterxml.aalto.impl.StreamExceptionBase: Can not output XML declaration, after other output has already been done.' when trying to transform XML using XSLT #7
Comments
An additional note, when I comment the indenter.newTransformer().transform() and replace it with the line below (ie. a pass through transformer), I get the following exception: ERREUR : 'com.fasterxml.aalto.impl.StreamExceptionBase: Trying to declare prefix xmlns (illegal as per NS 1.1 #4)' |
Whoops I forgot to show the stacktrace for the first exception ERREUR : 'com.fasterxml.aalto.impl.StreamExceptionBase: Can not output XML declaration, after other output has already been done.' I would be happen to attach the indenter.xsl XSLT stylesheet, but I can't seem to paste it here. Note however that it works fine using the standard XML input and output factories. |
Hmmh. I suspect that indentation calls are what cause problems (since writing output for indentation could be taken as output preceding xml declaration). I'll see if I can figure out what gives... |
Can not reproduce without an example. |
Hello,
I wanted to test out the performances of aalto so I wrote this simple test program where I indent some XML using an XSLT stylesheet and use StaXSources and StaXResults as the input and output of the Transformer respectively.
Here is my test code:
And I get the exception visible in the title. Any help would be suggested.
Nicolas
The text was updated successfully, but these errors were encountered: