please help me with xspec syntax. I want to compare the values in the test file with constant: Test file:
<?xml version='1.0' encoding='ISO-8859-5'?>
<List>
<M_INSDES>
<S_UNH>
<D_0062>3600</D_0062>
<C_S009>
<D_0065>INSDES</D_0065>
<D_0052>D</D_0052>
<D_0054>96A</D_0054>
<D_0051>UN</D_0051>
<D_0057>EAN001</D_0057>
</C_S009>
</S_UNH>
</M_INSDES>
</List>
Following scenario works as expected:
<x:scenario label="Scenario for testing an EDIFACT document type">
<x:context href="test.xml" select="/List/M_INSDES/S_UNH/C_S009/D_0065">
</x:context>
<x:expect label="The result of testing EDIFACT document type">INSDES</x:expect>
</x:scenario>
But scenario with multiply values fails:
<x:scenario label="Scenario for testing an EDIFACT document type for inbound file">
<x:context href="test.xml" select="/List/M_INSDES/S_UNH/C_S009">
</x:context>
<x:expect label="Message type identifier" test="D_0065 = 'INSDES'"></x:expect>
<x:expect label="Message type version number" test="D_0052 = 'D'"></x:expect>
<x:expect label="Message type release number" test="D_0054 = '96A'"></x:expect>
</x:scenario>
How can I check three values of the node C_S009 using <x:expect test = ""/>
?
UPD.: added the xsl stylesheet:
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:my="myfunctions"
exclude-result-prefixes="xs"
version="2.0">
<xsl:template match="/">
<xsl:copy-of select="."/>
</xsl:template>
</xsl:stylesheet>