javax.transform to DOM/SAX errors

138 views
Skip to first unread message

Eric Nichols

unread,
Sep 27, 2013, 2:37:11 AM9/27/13
to scale...@googlegroups.com
Greetings,

I am trying to transform scales-xml documents into DOM documents or SAX objects based on the example code here: 

The source only and roundtrip examples work fine, but the scales=>DOM code I wrote returns an empty document, and the scales=>SAX code raises the following exception:

ERROR:  'org.xml.sax.SAXException: setResult() must be called prior to startDocument().'

I have attached the test program I wrote and the full trace I got when running it in Scala 2.10.2 and SBT 0.13.

Is what I am trying to do supported? If so, what did I get wrong?

Thanks,

Eric
ScalesTransformTest.scala
errors.txt

Chris Twiner

unread,
Sep 30, 2013, 3:33:37 PM9/30/13
to scale...@googlegroups.com
Hi Eric,

For DOM + SAX transformations to work they need an xslt. I've also
answered on the so question
http://stackoverflow.com/questions/19044333/how-to-convert-scala-scales-xml-to-dom-sax

The error isn't helpful, but its from deep within the TrAX api.

Cheers,
Chris
> --
> You received this message because you are subscribed to the Google Groups
> "scales-xml" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to scales-xml+...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.

Eric Nichols

unread,
Oct 1, 2013, 6:32:00 AM10/1/13
to scale...@googlegroups.com
Chris,

Thanks for the prompt reply. Adding your example xslt got everything working for me. I'm looking forward to future Scales releases!

Eric
Reply all
Reply to author
Forward
0 new messages