How to do Unit Testing of SmartPaste override
Posted: Thu Mar 27, 2014 6:34 pm
Hi,
We have a custom doctype, and have customized the SmartPaste feature by taking a copy of the Docbook XSLT files in our ${framework}/resources folder and we have updated them to adapt the conversion to our DTD. In Oxygen Author, I can now copy a section, table or list from MS Word and paste it as a valid XML fragment in my document. So far, so good...
Now, I would like to do some Unit Testing of the XSLT stylesheets in my Eclipse project.
I tried to use Juxy, but when my test case is loading the XSLT it crashes with an exception
Note that I have some simple test cases, based on Juxy and using a rather modest XSLT, that work OK.
Therefore, my interpretation of the error is that the SmartPaste XSLT requires some function which is available only in Saxon EE and this version of Saxon is embedded in the Oxygen Auhor, which explain why it runs with no error in the editor; but is not included in the SDK, which causes the exception when running my unit test.
Is this correct ?
If yes, shouldn't you provide Saxon EE also in the SDK ?
Or is there another way to do unit testing of the XHTML2zzz.xsl stylesheet ?
Thanks for your help,
Pascale
We have a custom doctype, and have customized the SmartPaste feature by taking a copy of the Docbook XSLT files in our ${framework}/resources folder and we have updated them to adapt the conversion to our DTD. In Oxygen Author, I can now copy a section, table or list from MS Word and paste it as a valid XML fragment in my document. So far, so good...
Now, I would like to do some Unit Testing of the XSLT stylesheets in my Eclipse project.
I tried to use Juxy, but when my test case is loading the XSLT it crashes with an exception
Code: Select all
java.lang.NoClassDefFoundError: com/saxonica/bytecode/ExpressionCompiler
at net.sf.saxon.style.XSLMessage.compile(XSLMessage.java:130)
...
at org.tigris.juxy.JuxyTestCase.applyTemplates(JuxyTestCase.java:82)
...
Caused by: java.lang.ClassNotFoundException: com.saxonica.bytecode.ExpressionCompiler
...
Therefore, my interpretation of the error is that the SmartPaste XSLT requires some function which is available only in Saxon EE and this version of Saxon is embedded in the Oxygen Auhor, which explain why it runs with no error in the editor; but is not included in the SDK, which causes the exception when running my unit test.
Is this correct ?
If yes, shouldn't you provide Saxon EE also in the SDK ?
Or is there another way to do unit testing of the XHTML2zzz.xsl stylesheet ?
Thanks for your help,
Pascale