0

I am XSLT developer and now a days I got an error on written test case using XSpec. This is the test case I wrote

<x:scenario label="Test Line Break">
    <x:context select="//name-list/name/surname/ini">
        <name-list>
            <name>
                <surname>
                    test line break
                 </surname>
                 <ini>test initials</ini>
            </name>
        </name-list>
    </x:context>

    <x:expect>
        <surname type="...">test line break <ini>test initials</ini></surname>
    </x:expect>
</x:scenario>

This test case is for removing line break of the elements before <ini> tag,but when I ran the test case it is said that <ini> tag is not processed. How can I resolve this?Please help.. Thanks..

potame
  • 7,597
  • 4
  • 26
  • 33
user2490093
  • 69
  • 10
  • I am not familiar with XSpec but the path `//name-list/name/surname/ini` selects a child element named `ini` of a `surname` element while in the XML sample inside of the `x:Context` element the `ini` element is a sibling of the `surname` element and not a child. – Martin Honnen Feb 15 '16 at 18:36
  • Really I did not identify that before.As I wrote my xslt template for name-list/name/surname I context path it to and tried again..now not processing error was resolved unlukily test case it failed..Thanks for your guidance I am trying to resolve this. – user2490093 Feb 16 '16 at 11:32

0 Answers0