Page 1 of 1

Getting started with XSpec

Posted: Tue Aug 20, 2013 1:42 pm
by EJB
Hi, I watched the recent Part 3 Webinar (http://www.youtube.com/watch?v=4O2DaFxE9qE) and looked at the help (http://www.oxygenxml.com/doc/ug-editorE ... xspec.html). They're both fine on how to set up a set of XSpec unit tests, and I am keen to get started, but they are both a bit vague about how you actually get the tests to run.

After creating my XSpec unit test using the wizard, if I click on the Apply Transformation Scenario(s) button, I am prompted to choose a transformation scenario. If I choose the one associated with the stylesheet under test, which is configured to apply the XSLT stylesheet to ${currentFileURL}, I get the following warning and nothing else happens:

"The source document is in namespace http://www.jenitennison.com/xslt/xspec, but all the template rules match elements in no namespace"

I think I'm missing a crucial step somewhere along the line, so I welcome any suggestions on how the transformation scenario should be set up. Cheers!

Re: Getting started with XSpec

Posted: Tue Aug 20, 2013 5:08 pm
by alex_jitianu
Hi Emma,

So the first step is to create the *.xspec file, which you did. Next, it must be open in an editor. Before running the transformation you should save it (if you've created using the New... then you have an untitled editor). Clicking on the Apply Transformation Scenario(s) (while being in the *.xspec editor) should run the test unit automatically, there should be no need for you to select a transformation scenario (there's a built-in scenario already created and associated).

From your description it looks like you tried to apply the XSL you want to test over the XSPEC file. Like I've said there is a specific XSPEC scenario named XSpec for XSLT that should be applied over the *.xspec file.

Best regards,
Alex

Re: Getting started with XSpec

Posted: Tue Aug 20, 2013 5:28 pm
by EJB
Hmm, I have disassociated my saved .xspec file from any transformation scenario, just as it was when I first created it, but when I click on Apply Transformation Scenario(s), the Transform with dialogue comes up, prompting me to choose an existing transformation scenario.

Looks as if I must be missing something?

Re: Getting started with XSpec

Posted: Tue Aug 20, 2013 5:38 pm
by EJB
Aha. Dodgy frameworks folder. I reset it to the default from the one it had picked up from a previous installation and now the Apply Transformation Scenario(s) button works as you described.

It would still be a good idea to make it explicit in the help how it is supposed to work, as without that information, I couldn't be sure whether I was doing something wrong or something was wrong. Once I knew what the correct behaviour was, it was much easier to troubleshoot!

Thanks!

Re: Getting started with XSpec

Posted: Wed Aug 21, 2013 9:22 am
by alex_jitianu
Hi,

Good to hear you found the culprit. I've already added an issue to review the documentation so hopefully this confusion will not rise again.

Thank you,
Alex