0

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 /text() and Expected Result coming as element()? Is there any mistake?

I used following-sibling becoz, wanted to take that specify element comes following to list

enter image description here

XSPEC

`

<?xml version="1.0" encoding="UTF-8"?>

<x:description xmlns:x="http://www.jenitennison.com/xslt/xspec"
               xmlns:functx="http://www.functx.com"
               stylesheet="Sampledemo.xsl">
<x:scenario label="Following sibblings of list as equation">
        <x:context href="Raw.xml" select="//list/following-sibling::p[disp-formula]" />
        <x:expect label="Following sibblings of list as equation" href="Final.xml" select="//list/following-sibling::p[disp-formula]" />
</x:scenario>
</x:description>

`

Raw.xml

`

<list list-type="bullet">
<list-item>
<p>Test</p>
</list-item>
</list>
<p>
<disp-formula>
<mml:math>
<mml:mi>t</mml:mi>
<mml:mi>e</mml:mi>
<mml:mi>s</mml:mi>
<mml:mi>t</mml:mi>
</mml:math>
</disp-formula>
</p>

Final xml

`

<list list-type="bullet">
<list-item>
<p>Test</p>
</list-item>
</list>
<p>
<disp-formula>
<mml:math>
<mml:mi>t</mml:mi>
<mml:mi>e</mml:mi>
<mml:mi>s</mml:mi>
<mml:mi>t</mml:mi>
</mml:math>
</disp-formula>
</p>

To avoid errors, I even tried to compare the same data. But not helping.

  • What are you trying to test, the result of a function call, the result of a named template call, the result of `apply-templates`? How does the XSLT look? – Martin Honnen Nov 20 '22 at 09:45

0 Answers0