Skip to content
New issue

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

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

Already on GitHub? # to your account

Attempting to test a stylesheet that produces <xsl:text> failes #64

Open
GoogleCodeExporter opened this issue Jun 8, 2015 · 1 comment

Comments

@GoogleCodeExporter
Copy link

What steps will reproduce the problem?
1. Create a stylesheet & scenario where the expected output includes xsl:text eg
<x:scenario label="simple paragraph">
            <x:context>
                <p>Here is some content</p>
            </x:context>
            <x:expect label="Correctly formatted as an fo:block">
                <fo:block 
                    font-size="12pt"
                    font-family="Helvetica"
                    font-weight="normal"
                    color="#404040"
                    space-after="6pt"><xsl:text>Here is some content</xsl:text></fo:block>
            </x:expect>
        </x:scenario>
2. Run the xspec

What is the expected output? What do you see instead?
Expect: Spec should run
Actual output: Fails to run with messages:
     [xslt] Processing ../sample.xspec to ../xspec/resolveVariables.xsl
     [xslt] Loading stylesheet ../xspec/src/compiler/generate-xspec-tests-oxygen.xsl
     [xslt] ../xspec/src/compiler/generate-tests-helper.xsl:104: Fatal Error! Undeclared prefix in element name: o
     [xslt] Failed to process ../sample.xspec


What version of the product are you using? On what operating system?
Using the version of xspec bundled with Oxygen XML.

Please provide any additional information below.

Within generate-tests-helper-xsl, I think you need to change 'o' to '__x' in 
the following templates:

<xsl:template match="xsl:*" mode="test:create-xslt-generator">
  <xsl:element name="__x:{ local-name() }">
    <xsl:apply-templates select="@*|node()" mode="test:create-xslt-generator"/>
  </xsl:element>
</xsl:template>  

<xsl:template match="@xsl:*" mode="test:create-xslt-generator">
   <xsl:attribute name="__x:{ local-name() }" select="."/>
</xsl:template>

Original issue reported on code.google.com by daniel.s...@gmail.com on 1 Jan 2014 at 11:39

innovimax pushed a commit to innovimax/xspec that referenced this issue Jan 17, 2017
* remove output and set up and clean test environment  expath#57 expath#64

- remove directories containing output of XSpec unit tests
- add directories and files to .gitignore 
- set up and clean the bats testing environment
# for free to join this conversation on GitHub. Already have an account? # to comment
Projects
None yet
Development

No branches or pull requests

1 participant