1

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:

<x:scenario label="Scenarios for testing Choice handling">
    <x:context href="input.xml"></x:context>
    <x:scenario label="Choices with DataElements">
        <x:expect label="Abstract class in the uml:Model with an isAbstract attribute" test="/xmi:XMI/uml:Model/packagedElement/packagedElement[@name = 'AdditionalExposureDetail']">
            <packagedElement xmi:type="uml:Class" xmi:id="..." name="AdditionalExposureDetail" visibility="public" isAbstract="true">...</packagedElement>
        </x:expect>

The idea is that the output transformation will contain an element at /xmi:XMI/uml:Model/packagedElement/packagedElement[@name = 'AdditionalExposureDetail'] (it does) and the element will have the right attribute signature. After many, many iterations however I cannot get it to work - the latest one gives an empty node-set as the result, even though running the transformation manually, the XPath is correct!

What am I doing wrong?

potame
  • 7,597
  • 4
  • 26
  • 33
Vadim Peretokin
  • 2,221
  • 3
  • 29
  • 40
  • Could you share the XSLT that you have so far? – FrankPl Aug 12 '13 at 18:41
  • The XSLT transform or the XSpec? I don't think I can share the transform yet :( – Vadim Peretokin Aug 12 '13 at 21:54
  • I think the issue is that Saxon-EE is being used by oXygen and that seems to be causing some issues for my document (unfortunately the output is not visible). I've been running my transformation with -PE and -HE with good success until now. So I'll try and run XSpec with -HE and see what happens then - that could be the root of the problem. – Vadim Peretokin Aug 12 '13 at 23:10

1 Answers1

0

After much more prodding, it came down to XSPec running the transformation somehow quite wrong and the resulting document not looking right at all - hence testing against it was failing. I've reported the issue here, we'll see what happens then...

Vadim Peretokin
  • 2,221
  • 3
  • 29
  • 40