Skip to content
This repository was archived by the owner on Mar 24, 2026. It is now read-only.
This repository was archived by the owner on Mar 24, 2026. It is now read-only.

Test execution fails due to a naming collision of result files #67

Description

@GoogleCodeExporter
What steps will reproduce the problem?

1. Write a function which reads a document containing more than 1000 nodes (a 
sample file is attached). 

<xsl:function name="f:read-document" as="document-node()?">
  <xsl:sequence select="doc('../data/document.xml')"/>
</xsl:function>

2. Write two identical scenarios calling the written function:

<x:scenario label="scenario 1">
  <x:call function="f:read-document"/>

  <x:expect>...</x:expect>
</x:scenario>

<x:scenario label="scenario 2">
  <x:call function="f:read-document"/>

  <x:expect>...</x:expect>
</x:scenario>

3. Evaluate the suite. A transformation error "XTDE1490: Cannot write more than 
one result document to the same URI" will be fired. 


The issue is caused by the generate-id() function used to evaluate a file name 
in generate-test-utils.xsl:
<xsl:variable name="href" as="xs:string" select="concat(generate-id($value[1]), 
'.xml')" />


The version of the product is: XSpec 0.4.0 Release Candidate 1.
The issue is not environment-dependent.

Possible fixes: 
- Append a unique stamp to each resulting file. 
- Make a copy of the resulting $value and pass the new variable to the 
generate-id() function. 

Original issue reported on code.google.com by sha...@intelliarts.com on 3 Mar 2014 at 1:03

Attachments:

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions