Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Expecting a sequence of mixed content #56

Open
GoogleCodeExporter opened this issue Jun 8, 2015 · 0 comments
Open

Expecting a sequence of mixed content #56

GoogleCodeExporter opened this issue Jun 8, 2015 · 0 comments

Comments

@GoogleCodeExporter
Copy link

In my case I had to test a result of a function that returned a sequence 
containing both xs:string and nodes.

My XSLT file contains:

    <xsl:variable name="test" as="item()+">
        <xsl:variable name="t" as="element()">
            <c:expected/>
        </xsl:variable>

        <xsl:sequence select="'sdfs', $t"/>
    </xsl:variable>


    <xsl:function name="t:test" as="item()+">
        <xsl:variable name="t" as="element()">
            <c:actual/>
        </xsl:variable>

        <xsl:sequence select="'sdfs', $t"/>
    </xsl:function>


And the XSPEC file:

    <scenario label="Test">
        <call function="t:test"/>

        <expect select="$test"/>
    </scenario>


Executing this test results in:

   <x:scenario>
      <x:label>Test</x:label>
      <x:call function="t:test"/>
      <x:result select="('sdfs', xs:anyAtomicType(''))"/>
      <x:test successful="false">
         <x:label/>
         <x:result select="('sdfs', xs:anyAtomicType(''))"/>
         <x:expect select="('sdfs', xs:anyAtomicType(''))"/>
      </x:test>
   </x:scenario>

which doesn't give a hint of what's wrong.

The attached file contains a fixed "test:report-value" template based on 
xspec-0.4.0rc1.

Original issue reported on code.google.com by [email protected] on 7 Mar 2013 at 3:29

Attachments:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant