Expected result not matched

73 views
Skip to first unread message

Anil Kumar Gupta

unread,
Jun 23, 2020, 11:21:57 AM6/23/20
to XSpec
Hi Team,

When i have transform input.html through monolythic.xsl result is perfect but when i have try do that through xspec result output is different.

I have attached the all files for your reference.

Kindly check and suggest how to fix that issue.

Regards,
Anil Prasad  
input.zip

AirQuick

unread,
Jun 23, 2020, 1:41:30 PM6/23/20
to xspec...@googlegroups.com
<x:context> in xspec.xspec does not have @mode. The default mode in consequence is applied to the context <p>, and that's what you see in the test report.

On the other hand, transforming input.html fully through monolythic.xsl first applies the default mode and then the "bodytext" mode.


--
You received this message because you are subscribed to the Google Groups "XSpec" group.
To unsubscribe from this group and stop receiving emails from it, send an email to xspec-users...@googlegroups.com.


Attachments:
  • input.zip

Anil Kumar Gupta

unread,
Jun 24, 2020, 1:36:24 AM6/24/20
to XSpec
Thanks for quick reply

AirQuick please elaborate how to resolve that issue..


On Tuesday, 23 June 2020 23:11:30 UTC+5:30, AirQuick wrote:
<x:context> in xspec.xspec does not have @mode. The default mode in consequence is applied to the context <p>, and that's what you see in the test report.

On the other hand, transforming input.html fully through monolythic.xsl first applies the default mode and then the "bodytext" mode.


----- Original message -----
From: Anil Kumar Gupta <anilk...@gmail.com>
Subject: Expected result not matched
Date: Wednesday, June 24, 2020 00:21

Hi Team,

When i have transform input.html through monolythic.xsl result is perfect but when i have try do that through xspec result output is different.

I have attached the all files for your reference.

Kindly check and suggest how to fix that issue.

Regards,
Anil Prasad  


--
You received this message because you are subscribed to the Google Groups "XSpec" group.
To unsubscribe from this group and stop receiving emails from it, send an email to xspec...@googlegroups.com.

AirQuick

unread,
Jun 24, 2020, 12:22:07 PM6/24/20
to xspec...@googlegroups.com
If you like to run the full transformation and inspect a portion of its transformation result, apply all these 4 changes.

1. Use the latest master branch of XSpec.

2. Add @run-as="external" to /x:description. (This is a new experimental feature available only on the recent master branch.)
   i.e. <x:description ... stylesheet="monolythic.xsl" run-as="external">

3. Set the context on the input document node by removing @select from x:context.
   i.e. <x:context href="input.html" />

4. Inspect the <Title> in the transformation result by setting x:expect/@test.
   i.e. <x:expect label="Testing 'CASEDOC' in '/'" test="/body/div[1]/Title[1]">

And then the test will succeed.

(IMHO, however, XSpec is better suited for smaller granularity tests.)
To unsubscribe from this group and stop receiving emails from it, send an email to xspec-users...@googlegroups.com.

Anil Kumar Gupta

unread,
Jun 25, 2020, 8:57:40 AM6/25/20
to XSpec
Thanks,

AirQuick in real scenario we are use some xpath to fetch data from input files. then we are getting errors i have attached the updated xsl and error log for your reference.

Regards,
Anil Prasad 
MicrosoftTeams-image.png
monolythic.xsl

AirQuick

unread,
Jun 25, 2020, 9:28:24 AM6/25/20
to xspec...@googlegroups.com
- Make sure you applied *all* the 4 changes I suggested.

- Saxon 9.4 is way too old. See https://github.com/xspec/xspec/wiki/Requirements .
  (Note that the latest master branch of XSpec is v2.0 which requires Saxon 9.8 or later.)
To unsubscribe from this group and stop receiving emails from it, send an email to xspec-users...@googlegroups.com.


Attachments:
  • MicrosoftTeams-image.png
  • monolythic.xsl

Anil Kumar Gupta

unread,
Jun 26, 2020, 7:36:43 AM6/26/20
to XSpec
Hi AirQuick,

I'm follows all steps you have to suggest for me, but yet now facing some error in my xspec. I have attached the error log screen shot for your reference. if you have check inside the xsl file we have to use variable and fetching values are input file, but you are suggest me use alternative method

No interlink input file in xSpec file.

So please suggest me how to fixed that issue.


Attachments:
  • MicrosoftTeams-image.png
  • monolythic.xsl

MicrosoftTeams-image (1).png

AirQuick

unread,
Jun 26, 2020, 11:12:14 AM6/26/20
to xspec...@googlegroups.com
The screenshot suggests that you're using XSpec v1.4.0 or older.
Make sure to use the latest master branch of XSpec. At the time of this writing, its archive file is https://github.com/xspec/xspec/archive/c8d37d1b7c3f46d53546f03ca74b7fc802107e35.zip
To unsubscribe from this group and stop receiving emails from it, send an email to xspec-users...@googlegroups.com.


Attachments:
  • MicrosoftTeams-image (1).png

Reply all
Reply to author
Forward
0 new messages