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.

Cannot test a named template with a particular context #66

Description

@GoogleCodeExporter
The source XSLT: 

<xsl:template name="copy-content">
  <xsl:copy-of select="."/>
</xsl:template>

The scenario: 

<x:scenario>
  <x:context select="//p">
    <sec>
      <p>text</p>
    </sec>
  </x:context>

  <x:call template="copy-content"/>

  <x:expect>
    <p>text</p>
  </x:expect>
</x:scenario>

The expected output is: 
<p>text</p>

But the error with the following message is thrown: "Variable $context has not 
been declared". When I look at the generated XSLT I find that the $context 
variable is generated in the default namespace, while it should be 
$impl:context:

<xsl:variable name="impl:context" select="$impl:context-doc/(//p)"/>

<xsl:for-each select="$context">
  <xsl:call-template name="copy-content"/>
</xsl:for-each>

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

Original issue reported on code.google.com by sha...@intelliarts.com on 28 Feb 2014 at 12:56

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