Questions tagged [xspec]

XSpec is a unit test and Behaviour Driven Development (BDD) framework for XSLT and XQuery.

The wiki for the XSpec project : https://github.com/expath/xspec/wiki

28 questions
5
votes
1 answer

How to to get the desired base URI when xsl is run from another file?

When my tests are run with XSpec, there is a glaring problem: the base URI of global variables is set to the xspec parent that's running my XSLT and not the XML input itself. Thus, when my XSL transformation is ran by itself against the XML,…
Vadim Peretokin
  • 2,221
  • 3
  • 29
  • 40
1
vote
1 answer

xspec: error while loading shared libraries: libXSPlot.so: cannot open shared object file: no such directory

I have this error message when trying to launch xspec on the virtual machine with ubuntu os. I found its location via locate libXSPlot.so…
1
vote
1 answer

Value error on loading a spectra using pyxspec

Trying to load a spectrum in a python notebook after importing the xspec module gives me the following error. PyCapsule_New called with null pointer What can be the possible mistake?
1
vote
3 answers

What is the cause of [ERROR] Cannot execute xsl:result-document while evaluating xsl:variable; (using XSpec)

We installed and ran XSpec and configured it to point to our stylesheet resulting in an error: [ERROR] Cannot execute xsl:result-document while evaluating xsl:variable; SystemID: file:/Users/a/xspec/ce.xslt; Line#: 76; Column#: 114…
1
vote
2 answers

Using in Xspec

please help me with xspec syntax. I want to compare the values in the test file with constant: Test file: 3600
Andrey Davydenko
  • 341
  • 2
  • 18
1
vote
1 answer

Cannot import xspec in Python

The tutorial that I am using is the following: https://heasarc.gsfc.nasa.gov/xanadu/xspec/python/html/buildinstall.html I have finished the installation till ..Once HEASOFT is finished building and installing, you should find PyXspec’s code files…
1
vote
1 answer

How to test for attribute completeness on a resulting document using XSpec?

I'm creating a test that uses an input XML and want to test the presence of an element and the right attributes of the said element. Having difficulty getting this to work right, however. This is what I've setup:
Vadim Peretokin
  • 2,221
  • 3
  • 29
  • 40
0
votes
1 answer

Xspec XSLT testing always return failing tests

I am trying to test my XSLT 3.0 stylesheet using xspec, but I'm running into a wall. XSLT: query-utils.xsl
hepabolu
  • 1,214
  • 4
  • 18
  • 29
0
votes
0 answers

Test failure because of adding of new line characters

I have a scenario where I need to test that nothing was changed. So I reference in context@select and expect@select to the same element.
o-sapov
  • 320
  • 2
  • 13
0
votes
0 answers

While using xspec, it is returning text() instead of elements()

Have tried to see xspec success test. Even I've used the same tagging and same xpath - it shows as failure. I've not given any conditions in Sampledemo.xsl as well. Comparing the same data but not getting success. Doubt is, why Result is coming as…
0
votes
1 answer

Error with PyXspec: Cannot read response file

I'm trying to load my first spectrum file with Xspec command within python, aka PyXspec. But PyXspec tell me that it cannot read the response file 'file.rmf'. My basic code is the follow: from xspec import…
0
votes
1 answer

Unable to unit test an XSLT template rule that generates an element with nested elements

I have an XSLT template that transforms this: N20340000 to this: 20 34 00 00 North I wrote an XSpec scenario to…
Roger Costello
  • 3,007
  • 1
  • 22
  • 43
0
votes
1 answer

Struggling to get the xspec-maven-plugin-1 to work

Maven newbie... I downloaded XSpec using git clone: git clone https://github.com/xspec/xspec.git I set the appropriate environment variables. XSpec seems to work fine. For the Maven plugin, I am using: xspec-maven-plugin-1 To create a Maven project…
Roger Costello
  • 3,007
  • 1
  • 22
  • 43
0
votes
2 answers

How to test XSLT having multiple mode with XSpec?

Need to write XSpec test case to test the XSLT, in which multiple modes are used for transformation. But with below test-case, the xspec only tests the output with default mode applied. I wonder if there is a way to test the final output of the…
sspsujit
  • 301
  • 4
  • 12
0
votes
0 answers

VS code not recognise a python module

I am testing VS code and I like it very much. But I have an issue with a Python module. The module is xspec (https://heasarc.gsfc.nasa.gov/docs/xanadu/xspec/python/html/index.html). The issue is that VS code does not recognize the module,…
Alessandro Peca
  • 873
  • 1
  • 15
  • 40
1
2