mirror of
https://github.com/jezhiggins/arabica
synced 2025-01-17 18:12:04 +01:00
initial commit of XSLT test harness and OASIS test data
This commit is contained in:
parent
13a0c3c3c2
commit
30ea01876e
8903 changed files with 443672 additions and 0 deletions
37
test/XSLT/Makefile.am
Executable file
37
test/XSLT/Makefile.am
Executable file
|
@ -0,0 +1,37 @@
|
|||
|
||||
noinst_PROGRAMS = xslt_test
|
||||
|
||||
AM_CPPFLAGS = -I$(top_srcdir)/include @PARSER_HEADERS@ @BOOST_CPPFLAGS@
|
||||
LIBARABICA = $(top_builddir)/src/libarabica.la
|
||||
|
||||
cppunit_sources = ../CppUnit/framework/CppUnitException.h \
|
||||
../CppUnit/framework/estring.h \
|
||||
../CppUnit/framework/Guards.h \
|
||||
../CppUnit/framework/Test.h \
|
||||
../CppUnit/framework/TestCaller.h \
|
||||
../CppUnit/framework/TestCase.cpp \
|
||||
../CppUnit/framework/TestCase.h \
|
||||
../CppUnit/framework/TestFailure.cpp \
|
||||
../CppUnit/framework/TestFailure.h \
|
||||
../CppUnit/framework/TestResult.cpp \
|
||||
../CppUnit/framework/TestResult.h \
|
||||
../CppUnit/framework/TestSuite.cpp \
|
||||
../CppUnit/framework/TestSuite.h \
|
||||
../CppUnit/TestRunner.cpp \
|
||||
../CppUnit/TestRunner.hpp \
|
||||
../CppUnit/textui/TextTestResult.cpp \
|
||||
../CppUnit/textui/TextTestResult.h
|
||||
|
||||
|
||||
test_sources = scope_test.hpp
|
||||
|
||||
xslt_test_SOURCES = main.cpp $(cppunit_sources) $(test_sources)
|
||||
xslt_test_LDADD = $(LIBARABICA)
|
||||
xslt_test_DEPENDENCIES = $(LIBARABICA)
|
||||
|
||||
test: $(noinst_PROGRAMS)
|
||||
@for p in $(noinst_PROGRAMS); do \
|
||||
echo Running $$p; \
|
||||
./$$p -q; \
|
||||
done
|
||||
|
68
test/XSLT/main.cpp
Executable file
68
test/XSLT/main.cpp
Executable file
|
@ -0,0 +1,68 @@
|
|||
|
||||
#pragma warning(disable : 4250)
|
||||
|
||||
#include <iostream>
|
||||
#include <string>
|
||||
#include <sstream>
|
||||
|
||||
#include <SAX/InputSource.h>
|
||||
#include <DOM/SAX2DOM/SAX2DOM.h>
|
||||
#include <XSLT/XSLT.hpp>
|
||||
|
||||
///////////////////////////////////////////////
|
||||
#include "../CppUnit/TestRunner.hpp"
|
||||
#include "../CppUnit/framework/Test.h"
|
||||
#include "../CppUnit/framework/TestCase.h"
|
||||
#include "../CppUnit/framework/TestSuite.h"
|
||||
|
||||
// #include "scope_test.hpp"
|
||||
#include "xslt_test.hpp"
|
||||
|
||||
typedef std::string string_type;
|
||||
typedef Arabica::default_string_adaptor<std::string> string_adaptor;
|
||||
|
||||
int main(int argc, const char* argv[])
|
||||
{
|
||||
TestRunner runner;
|
||||
|
||||
// runner.addTest("ScopeTest", ScopeTest_suite<string_type, string_adaptor>());
|
||||
|
||||
//runner.addTest("attribset", XSLTTest_suite("attribset"));
|
||||
runner.addTest("attribvaltemplate", XSLTTest_suite("attribvaltemplate"));
|
||||
runner.addTest("axes", XSLTTest_suite("axes"));
|
||||
runner.addTest("boolean", XSLTTest_suite("boolean"));
|
||||
runner.addTest("conditional", XSLTTest_suite("conditional"));
|
||||
runner.addTest("conflictres", XSLTTest_suite("conflictres"));
|
||||
runner.addTest("copy", XSLTTest_suite("copy"));
|
||||
runner.addTest("dflt", XSLTTest_suite("dflt"));
|
||||
runner.addTest("expression", XSLTTest_suite("expression"));
|
||||
runner.addTest("extend", XSLTTest_suite("extend"));
|
||||
//runner.addTest("idkey", XSLTTest_suite("idkey"));
|
||||
runner.addTest("impincl", XSLTTest_suite("impincl"));
|
||||
runner.addTest("lre", XSLTTest_suite("lre"));
|
||||
runner.addTest("match", XSLTTest_suite("match"));
|
||||
runner.addTest("math", XSLTTest_suite("math"));
|
||||
runner.addTest("mdocs", XSLTTest_suite("mdocs"));
|
||||
runner.addTest("message", XSLTTest_suite("message"));
|
||||
runner.addTest("modes", XSLTTest_suite("modes"));
|
||||
runner.addTest("namedtemplate", XSLTTest_suite("namedtemplate"));
|
||||
runner.addTest("namespace", XSLTTest_suite("namespace"));
|
||||
runner.addTest("node", XSLTTest_suite("node"));
|
||||
//runner.addTest("numberformat", XSLTTest_suite("numberformat"));
|
||||
//runner.addTest("numbering", XSLTTest_suite("numbering"));
|
||||
runner.addTest("output", XSLTTest_suite("output"));
|
||||
runner.addTest("position", XSLTTest_suite("position"));
|
||||
runner.addTest("predicate", XSLTTest_suite("predicate"));
|
||||
runner.addTest("processorinfo", XSLTTest_suite("processorinfo"));
|
||||
runner.addTest("reluri", XSLTTest_suite("reluri"));
|
||||
runner.addTest("select", XSLTTest_suite("select"));
|
||||
runner.addTest("sort", XSLTTest_suite("sort"));
|
||||
runner.addTest("string", XSLTTest_suite("string"));
|
||||
runner.addTest("variable", XSLTTest_suite("variable"));
|
||||
runner.addTest("ver", XSLTTest_suite("ver"));
|
||||
runner.addTest("whitespace", XSLTTest_suite("whitespace"));
|
||||
|
||||
runner.run(argc, argv);
|
||||
|
||||
return 0;
|
||||
} // test_suite
|
137
test/XSLT/scope_test.hpp
Executable file
137
test/XSLT/scope_test.hpp
Executable file
|
@ -0,0 +1,137 @@
|
|||
#ifndef MANGLE_SCOPE_TEST_HPP
|
||||
#define MANGLE_SCOPE_TEST_HPP
|
||||
|
||||
using namespace Arabica::XPath;
|
||||
|
||||
template<class string_type, class string_adaptor>
|
||||
class ScopeTest : public TestCase
|
||||
{
|
||||
typedef XPathValuePtr<string_type> ValuePtr;
|
||||
|
||||
public:
|
||||
ScopeTest(std::string name) : TestCase(name)
|
||||
{
|
||||
} // ScopeTest
|
||||
|
||||
void test1()
|
||||
{
|
||||
VariableStack stack;
|
||||
|
||||
assertTrue(dontResolve(stack, "nothing"));
|
||||
assertTrue(dontResolve(stack, "charlie"));
|
||||
} // test1
|
||||
|
||||
void test2()
|
||||
{
|
||||
VariableStack stack;
|
||||
|
||||
stack.declareVariable("name", stringValue("value"));
|
||||
|
||||
assertTrue(getString(stack, "name", "value"));
|
||||
assertTrue(dontResolve(stack, "charlie"));
|
||||
} // test2
|
||||
|
||||
void test3()
|
||||
{
|
||||
VariableStack stack;
|
||||
|
||||
stack.declareVariable("name", stringValue("value"));
|
||||
stack.pushScope();
|
||||
stack.pushScope();
|
||||
|
||||
assertTrue(getString(stack, "name", "value"));
|
||||
assertTrue(dontResolve(stack, "charlie"));
|
||||
|
||||
stack.popScope();
|
||||
|
||||
assertTrue(getString(stack, "name", "value"));
|
||||
assertTrue(dontResolve(stack, "charlie"));
|
||||
|
||||
stack.popScope();
|
||||
|
||||
assertTrue(getString(stack, "name", "value"));
|
||||
} // test3
|
||||
|
||||
void test4()
|
||||
{
|
||||
VariableStack stack;
|
||||
|
||||
stack.declareVariable("name", stringValue("value"));
|
||||
stack.pushScope();
|
||||
stack.declareVariable("charlie", stringValue("charlie"));
|
||||
|
||||
assertTrue(getString(stack, "name", "value"));
|
||||
assertTrue(getString(stack, "charlie", "charlie"));
|
||||
|
||||
stack.popScope();
|
||||
|
||||
dontResolve(stack, "charlie");
|
||||
} // test4
|
||||
|
||||
void test5()
|
||||
{
|
||||
VariableStack stack;
|
||||
|
||||
dontResolve(stack, "charlie");
|
||||
|
||||
stack.declareVariable("charlie", stringValue("charlie"));
|
||||
assertTrue(getString(stack, "charlie", "charlie"));
|
||||
|
||||
stack.pushScope();
|
||||
stack.declareVariable("charlie", stringValue("charli"));
|
||||
assertTrue(getString(stack, "charlie", "charli"));
|
||||
|
||||
stack.pushScope();
|
||||
stack.declareVariable("charlie", stringValue("charl"));
|
||||
assertTrue(getString(stack, "charlie", "charl"));
|
||||
|
||||
stack.popScope();
|
||||
assertTrue(getString(stack, "charlie", "charli"));
|
||||
|
||||
stack.popScope();
|
||||
assertTrue(getString(stack, "charlie", "charlie"));
|
||||
} // test5
|
||||
|
||||
private:
|
||||
ValuePtr stringValue(const char* val)
|
||||
{
|
||||
return ValuePtr(new StringValue<string_type, string_adaptor>(val));
|
||||
} // stringValue
|
||||
|
||||
bool getString(const VariableStack& stack, const std::string& name, const std::string& value)
|
||||
{
|
||||
ValuePtr v = stack.resolveVariable(name);
|
||||
assertTrue(v->type() == STRING);
|
||||
assertTrue(v->asString() == value);
|
||||
return true;
|
||||
} // getString
|
||||
|
||||
bool dontResolve(const VariableStack& stack, const std::string& name)
|
||||
{
|
||||
try
|
||||
{
|
||||
stack.resolveVariable(name);
|
||||
}
|
||||
catch(Arabica::XPath::UnboundVariableException&)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
} // dontResolve
|
||||
}; // class ScopeTest
|
||||
|
||||
template<class string_type, class string_adaptor>
|
||||
TestSuite* ScopeTest_suite()
|
||||
{
|
||||
TestSuite *suiteOfTests = new TestSuite;
|
||||
|
||||
suiteOfTests->addTest(new TestCaller<ScopeTest<string_type, string_adaptor> >("test1", &ScopeTest<string_type, string_adaptor>::test1));
|
||||
suiteOfTests->addTest(new TestCaller<ScopeTest<string_type, string_adaptor> >("test2", &ScopeTest<string_type, string_adaptor>::test2));
|
||||
suiteOfTests->addTest(new TestCaller<ScopeTest<string_type, string_adaptor> >("test3", &ScopeTest<string_type, string_adaptor>::test3));
|
||||
suiteOfTests->addTest(new TestCaller<ScopeTest<string_type, string_adaptor> >("test4", &ScopeTest<string_type, string_adaptor>::test4));
|
||||
suiteOfTests->addTest(new TestCaller<ScopeTest<string_type, string_adaptor> >("test5", &ScopeTest<string_type, string_adaptor>::test5));
|
||||
|
||||
return suiteOfTests;
|
||||
} // ScopeTest_suite
|
||||
|
||||
#endif
|
31
test/XSLT/testsuite/DOCS/Background/README.txt
Normal file
31
test/XSLT/testsuite/DOCS/Background/README.txt
Normal file
|
@ -0,0 +1,31 @@
|
|||
The files in the DOCS/Background directory provide additional
|
||||
information about the XSLT/XPath Test Regime, taken as one instance
|
||||
of the type of test regimes that can be built using the OASIS
|
||||
generic test case management system. You do not need to read these
|
||||
files to run the test suite.
|
||||
|
||||
====================================================================
|
||||
Copyright (C) The Organization for the Advancement of
|
||||
Structured Information Standards [OASIS] (2005). All Rights Reserved.
|
||||
|
||||
This document and translations of it may be copied and furnished to
|
||||
others, and derivative works that comment on or otherwise explain it or
|
||||
assist in its implementation may be prepared, copied, published and
|
||||
distributed, in whole or in part, without restriction of any kind,
|
||||
provided that the above copyright notice and this paragraph are included
|
||||
on all such copies and derivative works. However, this document itself
|
||||
may not be modified in any way, such as by removing the copyright notice
|
||||
or references to OASIS, except as needed for the purpose of developing
|
||||
OASIS specifications, in which case the procedures for copyrights
|
||||
defined in the OASIS Intellectual Property Rights document must be
|
||||
followed, or as required to translate it into languages
|
||||
other than English.
|
||||
|
||||
The limited permissions granted above are perpetual and
|
||||
will not be revoked by OASIS or its successors or assigns.
|
||||
|
||||
This document and the information contained herein is provided on an
|
||||
"AS IS" basis and OASIS DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED,
|
||||
INCLUDING BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE INFORMATION
|
||||
HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED WARRANTIES OF
|
||||
MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
|
256
test/XSLT/testsuite/DOCS/Background/cfg2htm.xsl
Normal file
256
test/XSLT/testsuite/DOCS/Background/cfg2htm.xsl
Normal file
|
@ -0,0 +1,256 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
|
||||
version="1.0">
|
||||
|
||||
<!--
|
||||
Copyright (C) The Organization for the Advancement of
|
||||
Structured Information Standards [OASIS] (2001). All Rights
|
||||
Reserved.
|
||||
|
||||
This document and translations of it may be copied and
|
||||
furnished to others, and derivative works that comment on
|
||||
or otherwise explain it or assist in its implementation may
|
||||
be prepared, copied, published and distributed, in whole
|
||||
or in part, without restriction of any kind, provided that the
|
||||
above copyright notice and this paragraph are included on
|
||||
all such copies and derivative works. However, this
|
||||
document itself may not be modified in any way, such as by
|
||||
removing the copyright notice or references to OASIS,
|
||||
except as needed for the purpose of developing OASIS
|
||||
specifications, in which case the procedures for copyrights
|
||||
defined in the OASIS Intellectual Property Rights document
|
||||
must be followed, or as required to translate it into
|
||||
languages other than English.
|
||||
|
||||
The limited permissions granted above are perpetual and
|
||||
will not be revoked by OASIS or its successors or assigns.
|
||||
|
||||
This document and the information contained herein is
|
||||
provided on an "AS IS" basis and OASIS DISCLAIMS ALL
|
||||
WARRANTIES, EXPRESS OR IMPLIED, INCLUDING
|
||||
BUT NOT LIMITED TO ANY WARRANTY THAT THE USE
|
||||
OF THE INFORMATION HEREIN WILL NOT INFRINGE
|
||||
ANY RIGHTS OR ANY IMPLIED WARRANTIES OF
|
||||
MERCHANTABILITY OR FITNESS FOR A PARTICULAR
|
||||
PURPOSE.
|
||||
-->
|
||||
<xsl:output doctype-public="-//W3C//DTD HTML 4.0 Transitional//EN"/>
|
||||
|
||||
<xsl:template match="/">
|
||||
<html>
|
||||
<head>
|
||||
<title>
|
||||
<xsl:text>Test regime for </xsl:text>
|
||||
<xsl:value-of select="/suite/info/committee"/>
|
||||
</title>
|
||||
</head>
|
||||
<body>
|
||||
<h1>
|
||||
<xsl:text>Test regime for </xsl:text>
|
||||
<xsl:value-of select="/suite/info/committee"/>
|
||||
</h1>
|
||||
<h2>1. Introduction</h2>
|
||||
<xsl:copy-of select="/suite/info/desc/node()"/>
|
||||
<h2>2. Status values allowed for discretionary items</h2>
|
||||
<xsl:call-template name="document-section">
|
||||
<xsl:with-param name="index" select="2"/>
|
||||
<xsl:with-param name="heading" select="'h3'"/>
|
||||
<xsl:with-param name="section" select="/suite/discretion-statuses"/>
|
||||
<xsl:with-param name="element" select="'item'"/>
|
||||
<xsl:with-param name="attribute" select="'status'"/>
|
||||
</xsl:call-template>
|
||||
<h2>3. Test case categories</h2>
|
||||
<xsl:call-template name="document-section">
|
||||
<xsl:with-param name="index" select="3"/>
|
||||
<xsl:with-param name="heading" select="'h3'"/>
|
||||
<xsl:with-param name="section" select="/suite/categories"/>
|
||||
<xsl:with-param name="element" select="'test-case'"/>
|
||||
<xsl:with-param name="attribute" select="'category'"/>
|
||||
</xsl:call-template>
|
||||
<h2>4. Citations into Recommendation documents</h2>
|
||||
<xsl:copy-of select="/suite/citations/desc/node()"/>
|
||||
<h3>4.1 Citation types</h3>
|
||||
<xsl:call-template name="document-section">
|
||||
<xsl:with-param name="index" select="4.1"/>
|
||||
<xsl:with-param name="heading" select="'h4'"/>
|
||||
<xsl:with-param name="section"
|
||||
select="/suite/citations/citation-types"/>
|
||||
<xsl:with-param name="element" select="'spec-citation'"/>
|
||||
<xsl:with-param name="attribute" select="'type'"/>
|
||||
</xsl:call-template>
|
||||
<h3>4.2 Citation specifications</h3>
|
||||
<xsl:call-template name="document-citations">
|
||||
<xsl:with-param name="index" select="4.2"/>
|
||||
<xsl:with-param name="heading" select="'h4'"/>
|
||||
<xsl:with-param name="section"
|
||||
select="/suite/citations/citation-specifications"/>
|
||||
</xsl:call-template>
|
||||
<h2>5. Gray areas</h2>
|
||||
<xsl:copy-of select="/suite/gray-areas/desc/node()"/>
|
||||
<xsl:call-template name="document-gray">
|
||||
<xsl:with-param name="index" select="5"/>
|
||||
<xsl:with-param name="heading" select="'h3'"/>
|
||||
<xsl:with-param name="section"
|
||||
select="/suite/gray-areas"/>
|
||||
</xsl:call-template>
|
||||
<h2>6. Scenarios</h2>
|
||||
<xsl:copy-of select="/suite/scenarios/desc/node()"/>
|
||||
<h3>6.1 Operations</h3>
|
||||
<xsl:call-template name="document-section">
|
||||
<xsl:with-param name="index" select="6.1"/>
|
||||
<xsl:with-param name="heading" select="'h4'"/>
|
||||
<xsl:with-param name="section"
|
||||
select="/suite/scenarios/operations"/>
|
||||
<xsl:with-param name="element" select="'scenario'"/>
|
||||
<xsl:with-param name="attribute" select="'operation'"/>
|
||||
</xsl:call-template>
|
||||
<h3>6.2 Roles for input and output files</h3>
|
||||
<xsl:call-template name="document-section">
|
||||
<xsl:with-param name="index" select="6.2"/>
|
||||
<xsl:with-param name="heading" select="'h4'"/>
|
||||
<xsl:with-param name="section"
|
||||
select="/suite/scenarios/roles"/>
|
||||
<xsl:with-param name="element" select="'input-file/output-file'"/>
|
||||
<xsl:with-param name="attribute" select="'role'"/>
|
||||
</xsl:call-template>
|
||||
<h3>6.3 Comparison types for output files</h3>
|
||||
<xsl:call-template name="document-section">
|
||||
<xsl:with-param name="index" select="6.3"/>
|
||||
<xsl:with-param name="heading" select="'h4'"/>
|
||||
<xsl:with-param name="section"
|
||||
select="/suite/scenarios/comparisons"/>
|
||||
<xsl:with-param name="element" select="'output-file'"/>
|
||||
<xsl:with-param name="attribute" select="'compare'"/>
|
||||
</xsl:call-template>
|
||||
<h3>6.4 Parameter types during invocation</h3>
|
||||
<xsl:call-template name="document-section">
|
||||
<xsl:with-param name="index" select="6.4"/>
|
||||
<xsl:with-param name="heading" select="'h4'"/>
|
||||
<xsl:with-param name="section"
|
||||
select="/suite/scenarios/parameter-types"/>
|
||||
<xsl:with-param name="element" select="'param-set'"/>
|
||||
<xsl:with-param name="attribute" select="'type'"/>
|
||||
</xsl:call-template>
|
||||
<small><strong><xsl:value-of select="suite/@date"/></strong></small>
|
||||
</body>
|
||||
</html>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template name="document-section">
|
||||
<xsl:param name="index"/>
|
||||
<xsl:param name="heading"/>
|
||||
<xsl:param name="section"/>
|
||||
<xsl:param name="element"/>
|
||||
<xsl:param name="attribute"/>
|
||||
|
||||
<xsl:copy-of select="$section/desc/node()"/>
|
||||
<xsl:for-each select="$section/*[@id]">
|
||||
<xsl:element name="{$heading}">
|
||||
<xsl:value-of select="$index"/>.<xsl:value-of select="position()"/>
|
||||
<xsl:text> </xsl:text>
|
||||
<samp>
|
||||
<xsl:text><</xsl:text>
|
||||
<xsl:value-of select="$element"/>
|
||||
<xsl:text> </xsl:text>
|
||||
<xsl:value-of select="$attribute"/>
|
||||
<xsl:text>="</xsl:text>
|
||||
<xsl:value-of select="@id"/>
|
||||
<xsl:text>"></xsl:text>
|
||||
</samp>
|
||||
</xsl:element>
|
||||
<xsl:copy-of select="node()"/>
|
||||
</xsl:for-each>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template name="document-citations">
|
||||
<xsl:param name="index"/>
|
||||
<xsl:param name="heading"/>
|
||||
<xsl:param name="section"/>
|
||||
|
||||
<xsl:copy-of select="$section/desc/node()"/>
|
||||
<xsl:for-each select="$section/cite-spec">
|
||||
<xsl:for-each select="version-spec">
|
||||
<xsl:for-each select="spec">
|
||||
<xsl:element name="{$heading}">
|
||||
<xsl:value-of select="$index"/>.<xsl:text/>
|
||||
<xsl:number count="spec" level="any"
|
||||
from="citation-specifications"/>
|
||||
<xsl:text> </xsl:text>
|
||||
<samp>
|
||||
<xsl:text><spec-citation spec="</xsl:text>
|
||||
<xsl:value-of select="../../@id"/>
|
||||
<xsl:text>" version="</xsl:text>
|
||||
<xsl:value-of select="../@version"/>
|
||||
<xsl:text>" type="</xsl:text>
|
||||
<xsl:value-of select="@type"/>
|
||||
<xsl:text>"></xsl:text>
|
||||
</samp>
|
||||
</xsl:element>
|
||||
<xsl:copy-of select="../../desc/node()"/>
|
||||
<xsl:copy-of select="../desc/node()"/>
|
||||
<xsl:copy-of select="node()"/>
|
||||
</xsl:for-each>
|
||||
</xsl:for-each>
|
||||
</xsl:for-each>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template name="document-gray">
|
||||
<xsl:param name="index"/>
|
||||
<xsl:param name="heading"/>
|
||||
<xsl:param name="section"/>
|
||||
<xsl:for-each select="$section/gray-area">
|
||||
<xsl:element name="{$heading}">
|
||||
<xsl:value-of select="$index"/>.<xsl:text/>
|
||||
<xsl:value-of select="position()"/>
|
||||
<xsl:text> </xsl:text>
|
||||
<samp>
|
||||
<xsl:text><gray-area-choice name="</xsl:text>
|
||||
<xsl:value-of select="@id"/>
|
||||
<xsl:text>"></xsl:text>
|
||||
</samp>
|
||||
</xsl:element>
|
||||
<ul>
|
||||
<xsl:for-each select="choices/choice">
|
||||
<li><samp>behavior="<xsl:value-of select="@value"/>"</samp></li>
|
||||
</xsl:for-each>
|
||||
</ul>
|
||||
<xsl:copy-of select="desc/node()"/>
|
||||
<xsl:for-each select="spec-citation">
|
||||
<xsl:variable name="spec" select="@spec"/>
|
||||
<xsl:variable name="version" select="@version"/>
|
||||
<xsl:variable name="type" select="@type"/>
|
||||
<xsl:variable name="place" select="@place"/>
|
||||
<xsl:if test="id(string($type))/@method='human'">
|
||||
<xsl:for-each select="id(string($spec))/
|
||||
version-spec[@version=$version]/
|
||||
spec[@type=$type]">
|
||||
<li>
|
||||
<xsl:value-of select="@prefix"/>
|
||||
<xsl:choose>
|
||||
<xsl:when test="@ref-linkable='yes'">
|
||||
<a href="{@ref}"><xsl:value-of select="@ref"/></a>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<xsl:value-of select="@ref"/>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
<xsl:value-of select="concat(@infix,$place,@suffix)"/>
|
||||
</li>
|
||||
</xsl:for-each>
|
||||
</xsl:if>
|
||||
<xsl:if test="id(string($type))/@method='machine'">
|
||||
<xsl:for-each select="id(string($spec))/
|
||||
version-spec[@version=$version]/
|
||||
spec[@type=$type]">
|
||||
<xsl:variable name="ref"
|
||||
select="concat(@prefix,@ref,@infix,$place,@suffix)"/>
|
||||
<li>
|
||||
<a href="{$ref}"><xsl:value-of select="$ref"/></a>
|
||||
</li>
|
||||
</xsl:for-each>
|
||||
</xsl:if>
|
||||
</xsl:for-each>
|
||||
</xsl:for-each>
|
||||
</xsl:template>
|
||||
|
||||
</xsl:stylesheet>
|
101
test/XSLT/testsuite/DOCS/Background/citation.dtd
Normal file
101
test/XSLT/testsuite/DOCS/Background/citation.dtd
Normal file
|
@ -0,0 +1,101 @@
|
|||
<!--Citations to specifications or Recommendations-->
|
||||
<!--$Date: 2001/09/24 21:39:02 $(UTC) -->
|
||||
<!--
|
||||
Copyright (C) The Organization for the Advancement of
|
||||
Structured Information Standards [OASIS] (2001). All Rights Reserved.
|
||||
|
||||
This document and translations of it may be copied and furnished to
|
||||
others, and derivative works that comment on or otherwise explain it or
|
||||
assist in its implementation may be prepared, copied, published and
|
||||
distributed, in whole or in part, without restriction of any kind,
|
||||
provided that the above copyright notice and this paragraph are included
|
||||
on all such copies and derivative works. However, this document itself
|
||||
may not be modified in any way, such as by removing the copyright notice
|
||||
or references to OASIS, except as needed for the purpose of developing
|
||||
OASIS specifications, in which case the procedures for copyrights
|
||||
defined in the OASIS Intellectual Property Rights document must be
|
||||
followed, or as required to translate it into languages
|
||||
other than English.
|
||||
|
||||
The limited permissions granted above are perpetual and
|
||||
will not be revoked by OASIS or its successors or assigns.
|
||||
|
||||
This document and the information contained herein is provided on an
|
||||
"AS IS" basis and OASIS DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED,
|
||||
INCLUDING BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE INFORMATION
|
||||
HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED WARRANTIES OF
|
||||
MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
|
||||
-->
|
||||
|
||||
<!--===== Overview =========================================================
|
||||
|
||||
This DTD fragment defines the model of specification citations and is used
|
||||
by other DTDs in the system. The configuration XML-instance document for a
|
||||
test regime lists all the specs that can be cited and specifies the "types"
|
||||
of citations that apply to each. It also contains the URIs for all the
|
||||
versions of all the specs. As a aid to generating reports and indexes,
|
||||
citation-types can be characterized as either "human" or "machine" to
|
||||
indicate how they trade off readability for precision. (When a citation-type
|
||||
may be considered to be both, choose "machine" to denote that it has enough
|
||||
precision for indexing purposes.) The format of the "place" attribute below
|
||||
depends on the citation-type.
|
||||
|
||||
Each pertinent standard should be cited by version number, but
|
||||
also flagged as to its errata status when relevant. The version values
|
||||
mentioned above are numeric so that inequality tests may be applied. The
|
||||
main spec version should always be present, and should be set to a default
|
||||
if the test is really about some other associated spec. In other words,
|
||||
when dealing with two or more specifications, any test that is essentially
|
||||
a pure test of one specification should assume the base version of the
|
||||
others. Any test that is essentially about a newer spec, should specify
|
||||
the lowest practical level of the other specifications, which may have to
|
||||
be higher than the base level if modifications are necessary for the newer
|
||||
facility to work at all.
|
||||
|
||||
The version-drop allows intermixing of tests that become obsolete for
|
||||
newer versions of a standard. It indicates that the test case is no longer
|
||||
pertinent as of that version.
|
||||
|
||||
Errata are independent of newer spec versions, and multiple errata could be
|
||||
issued per version. Our flexible approach is to have a spec-citation
|
||||
attribute named "errata-add" that contains a date or numeric value (0 for
|
||||
the base document) (like the E-number in the XSLT errata); "errata-drop" is
|
||||
numerically larger and indicates that the test case is no longer pertinent
|
||||
as of that errata version. Not all Working Groups are numbering their
|
||||
errata, so there is some safety in using dates. Date is a required
|
||||
attribute and should be in ISO-8601 format, which will sort numerically.
|
||||
The add and drop levels allow a test case to be marked as being
|
||||
relevant for errata that later get further clarified. The errata-drop must
|
||||
always be numerically greater than errata-add, and likewise for the dates.
|
||||
Errata parameters need only be specified where the test applies to a
|
||||
specific erratum, or the base document only, because they are used for
|
||||
filtering. In other words, a test case that should not have any errata
|
||||
designations unless there is at least one erratum that could make the
|
||||
test excludable for processors that came either before or after that
|
||||
erratum.
|
||||
|
||||
-->
|
||||
|
||||
<!--Constraints:
|
||||
|
||||
spec= -> configuration <cite-spec id=>
|
||||
version= -> configuration <version-spec Version=>
|
||||
type= -> configuration <spec type=>
|
||||
version-drop, if specified, must be strictly greater (later) than Version
|
||||
errata-drop, if specified, must be strictly greater (later) than errata-add
|
||||
errata-add-date and errata-drop-date should be rendered as dates with best
|
||||
practice of ISO 8601, yyyy-mm-dd
|
||||
-->
|
||||
|
||||
<!ELEMENT spec-citation EMPTY >
|
||||
<!ATTLIST spec-citation spec NMTOKEN #REQUIRED
|
||||
version CDATA #REQUIRED
|
||||
type NMTOKEN #REQUIRED
|
||||
version-drop NMTOKEN #IMPLIED
|
||||
errata-add NMTOKEN #IMPLIED
|
||||
errata-add-date CDATA #IMPLIED
|
||||
errata-drop NMTOKEN #IMPLIED
|
||||
errata-drop-date CDATA #IMPLIED
|
||||
place CDATA #REQUIRED>
|
||||
|
||||
<!--end of file-->
|
82
test/XSLT/testsuite/DOCS/Background/citation.htm
Normal file
82
test/XSLT/testsuite/DOCS/Background/citation.htm
Normal file
|
@ -0,0 +1,82 @@
|
|||
<!DOCTYPE html
|
||||
PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
||||
<!--
|
||||
Copyright (C) The Organization for the Advancement of
|
||||
Structured Information Standards [OASIS] (2001). All Rights Reserved.
|
||||
|
||||
This document and translations of it may be copied and furnished to
|
||||
others, and derivative works that comment on or otherwise explain it or
|
||||
assist in its implementation may be prepared, copied, published and
|
||||
distributed, in whole or in part, without restriction of any kind,
|
||||
provided that the above copyright notice and this paragraph are included
|
||||
on all such copies and derivative works. However, this document itself
|
||||
may not be modified in any way, such as by removing the copyright notice
|
||||
or references to OASIS, except as needed for the purpose of developing
|
||||
OASIS specifications, in which case the procedures for copyrights
|
||||
defined in the OASIS Intellectual Property Rights document must be
|
||||
followed, or as required to translate it into languages
|
||||
other than English.
|
||||
|
||||
The limited permissions granted above are perpetual and
|
||||
will not be revoked by OASIS or its successors or assigns.
|
||||
|
||||
This document and the information contained herein is provided on an
|
||||
"AS IS" basis and OASIS DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED,
|
||||
INCLUDING BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE INFORMATION
|
||||
HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED WARRANTIES OF
|
||||
MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
|
||||
-->
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||
|
||||
<title>Techniques for Citing Recommendations in Test Cases</title>
|
||||
</head>
|
||||
<body>
|
||||
<h1>OASIS Generic Testing Framework</h1>
|
||||
The citation.dtd file defines the model of specification citations and is used
|
||||
by other DTDs in the system. The configuration XML-instance document for a
|
||||
test regime lists all the specs that can be cited and specifies the "types"
|
||||
of citations that apply to each. It also contains the URIs for all the
|
||||
versions of all the specs. As a aid to generating reports and indexes,
|
||||
citation-types can be characterized as either "human" or "machine" to
|
||||
indicate how they trade off readability for precision. (When a citation-type
|
||||
may be considered to be both, choose "machine" to denote that it has enough
|
||||
precision for indexing purposes.) The format of the "place" attribute below
|
||||
depends on the citation-type.
|
||||
<p>
|
||||
Each pertinent standard should be cited by version number, but
|
||||
also flagged as to its errata status when relevant. The version values
|
||||
mentioned above are numeric so that inequality tests may be applied. The
|
||||
main spec version should always be present, and should be set to a default
|
||||
if the test is really about some other associated spec. In other words,
|
||||
when dealing with two or more specifications, any test that is essentially
|
||||
a pure test of one specification should assume the base version of the
|
||||
others. Any test that is essentially about a newer spec, should specify
|
||||
the lowest practical level of the other specifications, which may have to
|
||||
be higher than the base level if modifications are necessary for the newer
|
||||
facility to work at all.
|
||||
<p>
|
||||
The version-drop allows intermixing of tests that become obsolete for
|
||||
newer versions of a standard. It indicates that the test case is no longer
|
||||
pertinent as of that version.
|
||||
<p>
|
||||
Errata are independent of newer spec versions, and multiple errata could be
|
||||
issued per version. Our flexible approach is to have a spec-citation
|
||||
attribute named "errata-add" that contains a date or numeric value (0 for
|
||||
the base document) like the E-number in the XSLT errata; "errata-drop" is
|
||||
numerically larger and indicates that the test case is no longer pertinent
|
||||
as of that errata version. Not all Working Groups are numbering their
|
||||
errata, so there is some safety in using dates. Date
|
||||
attributes should be in ISO-8601 format, which will sort numerically.
|
||||
The add and drop levels allow a test case to be marked as being
|
||||
relevant for errata that later get further clarified. The errata-drop must
|
||||
always be numerically greater than errata-add, and likewise for the dates.
|
||||
Errata parameters need only be specified where the test applies to a
|
||||
specific erratum, or the base document only, because they are used for
|
||||
filtering. In other words, a test case should not have any errata
|
||||
designations unless there is at least one erratum that could make the
|
||||
test excludable for processors that came either before or after that
|
||||
erratum.
|
||||
</body>
|
||||
</html>
|
340
test/XSLT/testsuite/DOCS/Background/collcat.dtd
Normal file
340
test/XSLT/testsuite/DOCS/Background/collcat.dtd
Normal file
|
@ -0,0 +1,340 @@
|
|||
<!--Document model for test-suite collection catalog submission-->
|
||||
<!--$Date: 2001/09/25 01:46:03 $(UTC)-->
|
||||
<!--
|
||||
Copyright (C) The Organization for the Advancement of
|
||||
Structured Information Standards [OASIS] (2001). All Rights Reserved.
|
||||
|
||||
This document and translations of it may be copied and furnished to
|
||||
others, and derivative works that comment on or otherwise explain it or
|
||||
assist in its implementation may be prepared, copied, published and
|
||||
distributed, in whole or in part, without restriction of any kind,
|
||||
provided that the above copyright notice and this paragraph are included
|
||||
on all such copies and derivative works. However, this document itself
|
||||
may not be modified in any way, such as by removing the copyright notice
|
||||
or references to OASIS, except as needed for the purpose of developing
|
||||
OASIS specifications, in which case the procedures for copyrights
|
||||
defined in the OASIS Intellectual Property Rights document must be
|
||||
followed, or as required to translate it into languages
|
||||
other than English.
|
||||
|
||||
The limited permissions granted above are perpetual and
|
||||
will not be revoked by OASIS or its successors or assigns.
|
||||
|
||||
This document and the information contained herein is provided on an
|
||||
"AS IS" basis and OASIS DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED,
|
||||
INCLUDING BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE INFORMATION
|
||||
HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED WARRANTIES OF
|
||||
MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
|
||||
-->
|
||||
|
||||
<!--===== Overview =========================================================
|
||||
|
||||
Typical use: <!DOCTYPE test-suite SYSTEM "collcat.dtd">
|
||||
|
||||
Purpose: To collect test cases for submission to the production process, to
|
||||
maintain collections of test cases during the production process,
|
||||
and to publish the final suite of test cases.
|
||||
|
||||
This DTD has 3 main areas:
|
||||
|
||||
1. Test case identification
|
||||
|
||||
- identifying and categorizing a test case within a catalogue within
|
||||
a suite of catalogues
|
||||
|
||||
2. Test case documentation
|
||||
|
||||
- documenting a test case and how it is relevant
|
||||
- for some cases, providing data that allows the test to be applied
|
||||
only against those processors that behave the way it anticipates
|
||||
|
||||
3. Operational parameters
|
||||
|
||||
- identifying the file path of the base location from which the test is
|
||||
executed
|
||||
- identifying the inputs
|
||||
- specifying names for outputs
|
||||
- specifying (abstractly) the style of invocation
|
||||
- specifying (abstractly) how actual and reference outputs are compared
|
||||
|
||||
External DTD fragments:
|
||||
|
||||
1. Citations to the Recommendations
|
||||
|
||||
- methods by which Recommendations are cited
|
||||
- this is a reference to a shared DTD fragment: citation.dtd
|
||||
|
||||
2. Prose documentation elements
|
||||
|
||||
- the vocabulary by which prose documentation is captured for a test case
|
||||
(could allow some formatting of text, such as emphasis tags)
|
||||
- this is a reference to a shared DTD fragment: prose.dtd
|
||||
|
||||
Notes:
|
||||
|
||||
i) References in the documentation to "the production process" refer to the
|
||||
manipulation of test cases after having been received from the submitter. Any
|
||||
production-oriented information items authored by the submitter will be
|
||||
ignored and are not considered in error. (In particular the "submitter"
|
||||
attribute on test-catalog here serves a much more demanding purpose than the
|
||||
"submitter" attribute on "submission" in the DTD used by an individual
|
||||
submitter.)
|
||||
|
||||
ii) Enumerations of "constraints" refer to the element type name of those
|
||||
constructs in the test regime configuration instance with the ID values
|
||||
being the name token used as the attribute in the catalogue instance
|
||||
|
||||
iii) Certain information items are inspired by the Dublin Core ("DC") names
|
||||
for similar concepts, though no attempt is made to preserve the case of
|
||||
letters used in any names described therein.
|
||||
ref: http://purl.org/DC/documents/rec-dces-19990702.htm
|
||||
|
||||
iv) Most values will be interpreted as strings. Values can be interpreted
|
||||
numerically, specifically in inequality relations, when they refer to versions
|
||||
and dates.
|
||||
-->
|
||||
<!--===== External document model fragments ================================-->
|
||||
|
||||
<!--citations to the Recommendations-->
|
||||
<!ENTITY % citation-dtd SYSTEM "citation.dtd">
|
||||
%citation-dtd;
|
||||
|
||||
<!--prose-oriented constructs-->
|
||||
<!ENTITY % prose-dtd SYSTEM "prose.dtd">
|
||||
%prose-dtd;
|
||||
|
||||
<!--===== Test case identification =========================================-->
|
||||
|
||||
<!--the document element: a collection of catalogues-->
|
||||
<!ELEMENT test-suite ( test-catalog+ )>
|
||||
|
||||
<!--a catalogue: a collection of test cases-->
|
||||
<!--note: the submitter attribute is assigned by the production process-->
|
||||
<!--Constraint: submitter must be valid as a directory name. It will be part of
|
||||
file-paths for the full suite of tests. -->
|
||||
|
||||
<!ELEMENT test-catalog ( creator, date?, test-case* )>
|
||||
<!ATTLIST test-catalog submitter ID #IMPLIED>
|
||||
|
||||
<!--a test case: an individual test in the catalogue-->
|
||||
<!--Note: as a supplement to the case being uniquely identified by the id=
|
||||
attribute, documentation for a case will typically include a
|
||||
file specification to the principal output file.
|
||||
This way, no particular name of an input object is required to
|
||||
lend its name to either the name of the output nor to a logging
|
||||
entry, though the design of a particular regime may choose to
|
||||
impose such a tie-in. -->
|
||||
<!ELEMENT test-case ( file-path , creator* , date? , purpose , elaboration? ,
|
||||
spec-citation+ , discretionary? , gray-area?, scenario )>
|
||||
<!ATTLIST test-case
|
||||
id ID #REQUIRED
|
||||
category NMTOKEN #REQUIRED>
|
||||
<!--Constraints: category -> configuration <category>
|
||||
-->
|
||||
|
||||
<!--===== Test case documentation ==========================================-->
|
||||
<!--
|
||||
The <file-path> element is used to convey the separation of tests into various
|
||||
directories, but is also used operationally. Further discussion is under
|
||||
"operational parameters" below.
|
||||
|
||||
Submitters may use the <creator> element to name contributors at the
|
||||
individual-person level. They may also wish to use an element called <date>
|
||||
to record their date stamp on the test case.
|
||||
Alternatively,the submitter may encode the creator element with some
|
||||
abstract value they can use internally but is opaque to readers (though
|
||||
readers may find this confusing when published).
|
||||
These values allow the submitter to match cases with their own source
|
||||
code management systems, and will likely aid in future updates, either due
|
||||
to submitter enhancements or W3C changes. OASIS will track the date
|
||||
received in the date attribute of the test-catalog element.
|
||||
-->
|
||||
|
||||
<!--who created the test case and when it was created-->
|
||||
<!--note: this will be published verbatim; should a submitter wish to maintain
|
||||
this internally but not have its content published, it must be
|
||||
removed from the catalogue submitted to the production process-->
|
||||
<!ELEMENT creator ( #PCDATA )>
|
||||
<!--DC/ISO-8601 Date for the date of submission (from creator's viewpoint) -->
|
||||
<!--note: this field is either yyyymmdd or yyyy-mm-dd or yyyy/mm/dd;
|
||||
production processes will remove the "-" characters to make a
|
||||
numeric value for relative comparisons-->
|
||||
<!ELEMENT date ( #PCDATA )>
|
||||
|
||||
<!--Two ways to describe the test: the <purpose> element is used as a label
|
||||
without rich markup; the <elaboration> element is used for prose.
|
||||
The <purpose> is expected to appear in tables of test cases. Other
|
||||
source-file comments are useful for reviewers, but will not be extracted
|
||||
by the test system.
|
||||
-->
|
||||
<!ELEMENT purpose ( #PCDATA )>
|
||||
<!--Constraint: max 255 characters, no new-lines -->
|
||||
<!ELEMENT elaboration %prose;>
|
||||
<!--Constraint: the production processes will pass this content verbatim to
|
||||
publishing processes for interpretation-->
|
||||
|
||||
<!-- The <spec-citation> elements, defined in another DTD, should point to
|
||||
parts of Recommendations that a person examining the test would want to
|
||||
consult to check the <purpose> statement. -->
|
||||
|
||||
<!--
|
||||
The discretionary choices document in the regime definition enumerates
|
||||
named choices which act as excluders when a test suite is assembled. By serving
|
||||
as excluders, the need to specify all of them in every test case is eliminated;
|
||||
if a discretionary item is not mentioned, the test case doesn't care
|
||||
about that item and should be included for any choice made on that item.
|
||||
The value can be expressed as a keyword from a set of keywords designated
|
||||
by the Committee and encoded in and validated against the discretionary
|
||||
document.
|
||||
|
||||
For example, in XSLT the attribute-name-not-QName discretionary item
|
||||
contains a choice element of either "raise-error" or "ignore" to
|
||||
show that the case should be excluded when the processor under test
|
||||
made the other choice on this item. Depending on the choice, there could
|
||||
be parallel tests (differently named), with distinct parallel "correct
|
||||
output" files, for different values of the choice, and only one would be
|
||||
selected in any assembly of a test suite.
|
||||
|
||||
The questionnaire to developers about discretionary choices may allow "moot" as
|
||||
a response in some situations, but one cannot use "moot" as a behavior
|
||||
value in the test case catalog because, as stated above, moot items are
|
||||
just omitted from the "discretionary" element.
|
||||
-->
|
||||
<!ELEMENT discretionary ( discretionary-choice )+ >
|
||||
<!ELEMENT discretionary-choice EMPTY>
|
||||
<!ATTLIST discretionary-choice
|
||||
name NMTOKEN #REQUIRED
|
||||
behavior NMTOKEN #REQUIRED>
|
||||
<!--Constraints: name -> <item> within discretionary description
|
||||
behavior -> <choice> within description
|
||||
-->
|
||||
|
||||
<!--
|
||||
Vague areas in the spec are handled in the same manner as the
|
||||
discretionary items above, with <gray-area> substituting for the
|
||||
<discretionary> and the names chosen from the regime configuration document.
|
||||
This is where the errata level is likely to come in to play, since errata
|
||||
should clear up some vague areas. The tester must ask the developer about
|
||||
their design decisions or discern them by early-stage testing, and the answers
|
||||
should be encoded using keywords which can then be matched to the <gray-area>
|
||||
elements. One test case could serve as both a gray-area for one choice and
|
||||
as the lone case for errata-add, when that gray-area choice is the one that
|
||||
the errata later chose.
|
||||
-->
|
||||
<!ELEMENT gray-area ( gray-area-choice )+>
|
||||
<!ELEMENT gray-area-choice EMPTY>
|
||||
<!ATTLIST gray-area-choice
|
||||
name NMTOKEN #REQUIRED
|
||||
behavior NMTOKEN #REQUIRED>
|
||||
<!--Constraints: name -> <item> within gray-area description
|
||||
behavior -> <choice> within description
|
||||
-->
|
||||
|
||||
<!--===== Operational parameters ===========================================-->
|
||||
|
||||
<!--
|
||||
The <file-path> element allows the submitter to have a full tree structure for
|
||||
input files to the test cases, and it is also used to generate file-paths for
|
||||
output and command lines to execute the processor under test. This string may
|
||||
contain internal directory separators for a multi-level directory structure.
|
||||
The first name in the string must be the name of a directory found in the
|
||||
base directory of a submission. The last name in the string must be the name of
|
||||
a directory in which the input-file of a designated principal role (see test
|
||||
regime specs) is located. If the submission consists of a small number of tests
|
||||
that are directly in the submitter's base directory, the file-path should be
|
||||
the null string. Diagrammatically, the full file structure is:
|
||||
suite/submitter/file-path/principal-input-file(s)
|
||||
where only file-path may have a multi-level structure. In the test lab, the
|
||||
submitter/file-path combination is always used to specify file paths that
|
||||
are unique across the whole suite. (Specifically, conflicts among output files
|
||||
can only be avoided by using the directory structure defined by the combined
|
||||
submitter/file-path strings.)
|
||||
|
||||
Each test regime must specify the directory within which the test is assumed to
|
||||
be executed, which is important for relative file path dereferencing. The
|
||||
production processes translate any "\" to "/" and ensure the first and last
|
||||
characters of the file path are not slashes.
|
||||
|
||||
The actual name of particular files used are defined in the input-file and
|
||||
output-file elements. The file-path must not contain assumptions regarding
|
||||
any ancestral subdirectories "above" the base directory of the submitter's
|
||||
collection, except where the Testing Committee has designated standardized input
|
||||
data with a path. Note that the submitted test collection may contain directories
|
||||
that have no test cases, only utility or supplemental files.
|
||||
|
||||
Note: The regime may have one or more required files for every test, which
|
||||
is encoded in the role definition of the regime and confirmed in
|
||||
validation.
|
||||
|
||||
Example: For XSLT at least one output-file must be specified as the
|
||||
principal output file (per that configuration document),
|
||||
and it must be unique from every other output file name for
|
||||
the given file-path value. This is true even if no output is
|
||||
expected (in which case the compare value is typically 'ignore'),
|
||||
because the generation of output would indicate inappropriate
|
||||
behaviour by the processor.
|
||||
|
||||
XSLT can transform the catalog data into a variety of scripts that can be used
|
||||
in the test lab for setup, test running, output comparison, cleanup, etc.
|
||||
|
||||
Though the test suite is delivered with all inputs as files, it can be used to
|
||||
test processors that take input in more dynamic formats. The test lab will need
|
||||
to set up the methods that extract the file content and provide the input in a
|
||||
dynamic format such as a byte stream.
|
||||
-->
|
||||
<!ELEMENT file-path ( #PCDATA )>
|
||||
|
||||
<!--
|
||||
The <scenario> element gathers parameters needed to run the test.
|
||||
The "operation" attribute describes how to run the test, while "error"
|
||||
and "message" may be used to describe side effects that aren't
|
||||
channeled into outputs.
|
||||
Use "message" to contain an exact string that should be found in the console
|
||||
output. Use the presence of the <console> element to signify that console
|
||||
output should be captured as the test is run.
|
||||
-->
|
||||
|
||||
<!ELEMENT scenario ( input-file* , output-file* , param-set* , console? )>
|
||||
<!ATTLIST scenario operation NMTOKEN #REQUIRED
|
||||
message ( message ) #IMPLIED
|
||||
error ( error ) #IMPLIED>
|
||||
<!--Constraints: operation -> configuration <operation>
|
||||
-->
|
||||
|
||||
<!ELEMENT input-file ( #PCDATA ) >
|
||||
<!ATTLIST input-file
|
||||
role NMTOKEN #REQUIRED>
|
||||
<!--Constraint: role -> configuration <role>
|
||||
Some roles may only apply to input-files.
|
||||
-->
|
||||
|
||||
<!ELEMENT output-file ( #PCDATA ) >
|
||||
<!ATTLIST output-file
|
||||
role NMTOKEN #REQUIRED
|
||||
compare NMTOKEN #REQUIRED>
|
||||
<!--Constraint: role-> configuration <role>
|
||||
Some roles may only apply to output-files.
|
||||
compare -> configuration <comparison>
|
||||
-->
|
||||
|
||||
<!--
|
||||
In addition to inputs, some processors may use command-line parameters,
|
||||
or parameters of their APIs. The <param-set> element allows specification
|
||||
of those parameters in the catalog.
|
||||
-->
|
||||
<!ELEMENT param-set EMPTY>
|
||||
<!ATTLIST param-set
|
||||
name NMTOKEN #REQUIRED
|
||||
type NMTOKEN #REQUIRED
|
||||
value CDATA #REQUIRED>
|
||||
<!--Constraint: type -> configuration <parameter-type>
|
||||
-->
|
||||
|
||||
<!--
|
||||
A description of the anticipated result on a console or ancilliary output
|
||||
device separate from any principal or supplemental expected outputs.
|
||||
This item may be used to describe the essence of an error message.
|
||||
-->
|
||||
<!ELEMENT console %prose; >
|
||||
|
||||
<!--end of file-->
|
114
test/XSLT/testsuite/DOCS/Background/config.dtd
Normal file
114
test/XSLT/testsuite/DOCS/Background/config.dtd
Normal file
|
@ -0,0 +1,114 @@
|
|||
<!--Configuration of parameters of a test regime-->
|
||||
<!--$Date: 2001/11/29 17:30:52 $(UTC)-->
|
||||
<!--
|
||||
Copyright (C) The Organization for the Advancement of
|
||||
Structured Information Standards [OASIS] (2001). All Rights Reserved.
|
||||
|
||||
This document and translations of it may be copied and furnished to
|
||||
others, and derivative works that comment on or otherwise explain it or
|
||||
assist in its implementation may be prepared, copied, published and
|
||||
distributed, in whole or in part, without restriction of any kind,
|
||||
provided that the above copyright notice and this paragraph are included
|
||||
on all such copies and derivative works. However, this document itself
|
||||
may not be modified in any way, such as by removing the copyright notice
|
||||
or references to OASIS, except as needed for the purpose of developing
|
||||
OASIS specifications, in which case the procedures for copyrights
|
||||
defined in the OASIS Intellectual Property Rights document must be
|
||||
followed, or as required to translate it into languages
|
||||
other than English.
|
||||
|
||||
The limited permissions granted above are perpetual and
|
||||
will not be revoked by OASIS or its successors or assigns.
|
||||
|
||||
This document and the information contained herein is provided on an
|
||||
"AS IS" basis and OASIS DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED,
|
||||
INCLUDING BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE INFORMATION
|
||||
HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED WARRANTIES OF
|
||||
MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
|
||||
-->
|
||||
|
||||
<!--===== Overview =========================================================
|
||||
|
||||
Typical use: <!DOCTYPE suite SYSTEM "config.dtd">
|
||||
|
||||
An instance of this document model configures the validation of a suite of
|
||||
test cases against a test regime.
|
||||
|
||||
-->
|
||||
<!--===== External document model fragments ================================-->
|
||||
|
||||
<!--citations to the Recommendations-->
|
||||
<!ENTITY % citation-dtd SYSTEM "citation.dtd">
|
||||
%citation-dtd;
|
||||
|
||||
<!--prose-oriented constructs-->
|
||||
<!ENTITY % prose-dtd SYSTEM "prose.dtd">
|
||||
%prose-dtd;
|
||||
|
||||
<!ELEMENT suite ( info, discretion-statuses, categories, citations,
|
||||
gray-areas?, scenarios )>
|
||||
<!ATTLIST suite date CDATA #REQUIRED
|
||||
resource-types
|
||||
( fully-provided | partly-provided | fully-derived ) #REQUIRED>
|
||||
<!--
|
||||
fully-provided - all resources used must be itemized in catalog
|
||||
partly-derived - some resources used or generated aren't listed;
|
||||
names are derived from catalog data
|
||||
fully-derived - resources used aren't itemized;
|
||||
names are derived from catalog data
|
||||
-->
|
||||
|
||||
<!ELEMENT info ( committee, desc )>
|
||||
<!ELEMENT desc %prose;>
|
||||
<!ELEMENT committee ( #PCDATA )>
|
||||
|
||||
<!ELEMENT discretion-statuses ( desc?, discretion-status+ )>
|
||||
<!ELEMENT discretion-status %prose;>
|
||||
<!ATTLIST discretion-status id ID #REQUIRED>
|
||||
|
||||
<!ELEMENT categories ( desc?, category+ )>
|
||||
<!ELEMENT category %prose;>
|
||||
<!ATTLIST category id ID #REQUIRED>
|
||||
|
||||
<!ELEMENT citations ( desc?, citation-types, citation-specifications )>
|
||||
<!ELEMENT citation-types ( desc?, cite-type+ )>
|
||||
<!ELEMENT cite-type %prose;>
|
||||
<!ATTLIST cite-type id ID #REQUIRED
|
||||
method ( human | machine ) #REQUIRED>
|
||||
<!ELEMENT citation-specifications ( desc?, cite-spec+ )>
|
||||
<!ELEMENT cite-spec ( desc?, version-spec+ )>
|
||||
<!ATTLIST cite-spec id ID #REQUIRED>
|
||||
<!ELEMENT version-spec ( desc?, spec+ )>
|
||||
<!ATTLIST version-spec version NMTOKEN #REQUIRED>
|
||||
<!ELEMENT spec %prose;>
|
||||
<!ATTLIST spec type IDREF #REQUIRED
|
||||
ref CDATA #REQUIRED
|
||||
ref-linkable ( yes | no ) "yes"
|
||||
prefix CDATA #IMPLIED
|
||||
infix CDATA #IMPLIED
|
||||
suffix CDATA #IMPLIED>
|
||||
|
||||
<!ELEMENT gray-areas ( desc?, gray-area+ )>
|
||||
<!ELEMENT gray-area ( spec-citation+, choices?, desc )>
|
||||
<!ATTLIST gray-area id ID #REQUIRED>
|
||||
<!ELEMENT choices ( desc?, choice+ )>
|
||||
<!ELEMENT choice %prose;>
|
||||
<!ATTLIST choice value NMTOKEN #REQUIRED>
|
||||
|
||||
<!ELEMENT scenarios ( desc?, operations, roles?,
|
||||
comparisons?, parameter-types? )>
|
||||
<!ELEMENT operations ( desc?, operation+ )>
|
||||
<!ELEMENT operation %prose;>
|
||||
<!ATTLIST operation id ID #REQUIRED>
|
||||
<!ELEMENT roles ( desc?, role+ )>
|
||||
<!ELEMENT role %prose;>
|
||||
<!ATTLIST role id ID #REQUIRED
|
||||
required ( input-file | output-file ) #IMPLIED>
|
||||
<!ELEMENT comparisons ( desc?, comparison+ )>
|
||||
<!ELEMENT comparison %prose;>
|
||||
<!ATTLIST comparison id ID #REQUIRED>
|
||||
<!ELEMENT parameter-types ( desc?, parameter-type+ )>
|
||||
<!ELEMENT parameter-type %prose;>
|
||||
<!ATTLIST parameter-type id ID #REQUIRED>
|
||||
|
||||
<!--end of file-->
|
113
test/XSLT/testsuite/DOCS/Background/disc.dtd
Normal file
113
test/XSLT/testsuite/DOCS/Background/disc.dtd
Normal file
|
@ -0,0 +1,113 @@
|
|||
<!--Configurable Test Suite Discretionary items-->
|
||||
<!--$Id: disc.dtd,v 1.6 2001/12/07 15:56:29 Administrator Exp $-->
|
||||
<!--
|
||||
Catalogue of discretionary items in a specification.
|
||||
This catalog may be used to generate:
|
||||
1. A narrative document about discretionary items
|
||||
2. A questionnaire for developers about choices they made
|
||||
3. Validation data for an associated test-case catalog
|
||||
-->
|
||||
<!--
|
||||
Copyright (C) The Organization for the Advancement of
|
||||
Structured Information Standards [OASIS] (2001). All Rights Reserved.
|
||||
|
||||
This document and translations of it may be copied and furnished to
|
||||
others, and derivative works that comment on or otherwise explain it or
|
||||
assist in its implementation may be prepared, copied, published and
|
||||
distributed, in whole or in part, without restriction of any kind,
|
||||
provided that the above copyright notice and this paragraph are included
|
||||
on all such copies and derivative works. However, this document itself
|
||||
may not be modified in any way, such as by removing the copyright notice
|
||||
or references to OASIS, except as needed for the purpose of developing
|
||||
OASIS specifications, in which case the procedures for copyrights
|
||||
defined in the OASIS Intellectual Property Rights document must be
|
||||
followed, or as required to translate it into languages
|
||||
other than English.
|
||||
|
||||
The limited permissions granted above are perpetual and
|
||||
will not be revoked by OASIS or its successors or assigns.
|
||||
|
||||
This document and the information contained herein is provided on an
|
||||
"AS IS" basis and OASIS DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED,
|
||||
INCLUDING BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE INFORMATION
|
||||
HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED WARRANTIES OF
|
||||
MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
|
||||
-->
|
||||
|
||||
<!--common fragments-->
|
||||
|
||||
<!ENTITY % prose "#PCDATA | em | strong | span">
|
||||
<!ENTITY % citations SYSTEM "citation.dtd">
|
||||
%citations;
|
||||
|
||||
<!--========================================================================-->
|
||||
<!--high-level constructs-->
|
||||
<!ELEMENT doc (verbiage, items, interlocks, changes)>
|
||||
<!ATTLIST doc date CDATA #REQUIRED
|
||||
configuration-href CDATA #REQUIRED>
|
||||
<!ELEMENT items ( item )*>
|
||||
<!ELEMENT interlocks ( interlock* )>
|
||||
<!ELEMENT changes ( change* )>
|
||||
|
||||
<!-- verbiage is used in the narrative document
|
||||
items contains all <item> elements, regardless of attributes
|
||||
interlocks is the means of associating items that are interdependent
|
||||
changes is for internal logging and the long-form human-readable document -->
|
||||
|
||||
<!--========================================================================-->
|
||||
<!--mid-level constructs-->
|
||||
|
||||
<!ELEMENT title ( %prose; )*>
|
||||
<!ELEMENT intro ( p | ul )*>
|
||||
<!ELEMENT verbiage ( title, intro, group-intro*, question-intro )>
|
||||
<!ELEMENT group-intro ( p | ul )*>
|
||||
<!ATTLIST group-intro status ID #REQUIRED>
|
||||
<!ELEMENT question-intro ( p | ul )*>
|
||||
<!ELEMENT item ( spec-citation+, choices?, excerpt, question*, elaborator? )>
|
||||
<!ATTLIST item id ID #REQUIRED
|
||||
expandable CDATA #IMPLIED
|
||||
status IDREF #REQUIRED>
|
||||
<!ELEMENT choices ( choice+ )>
|
||||
<!ATTLIST choices mootable (yes | no) #IMPLIED>
|
||||
<!ELEMENT excerpt ( p | ul )*>
|
||||
|
||||
<!ELEMENT interlock ( p | ul )*>
|
||||
<!ELEMENT change ( p | ul )*>
|
||||
|
||||
<!--========================================================================-->
|
||||
<!--low-level constructs-->
|
||||
|
||||
<!ELEMENT p ( %prose; | party | all-choices )*>
|
||||
<!ATTLIST p style CDATA #IMPLIED>
|
||||
<!ELEMENT strong ( %prose; )*>
|
||||
<!ELEMENT em ( %prose; )*>
|
||||
<!ELEMENT span ( %prose; )*>
|
||||
<!ATTLIST span style CDATA #REQUIRED>
|
||||
<!ELEMENT ul ( li* )>
|
||||
<!ELEMENT li ( %prose; | party )*>
|
||||
<!ELEMENT question ( %prose; )*>
|
||||
<!ATTLIST question scope ( Filter | Configuration | Prototype ) #IMPLIED>
|
||||
<!-- A question of the "Filter" type should be expressed so that test cases can be
|
||||
included/excluded based on the answers; it would typically be used if the
|
||||
"status" of the item is not Configuration or Recognized.
|
||||
For Configuration, question should elicit information useful to the Test Lab.
|
||||
A Prototype question is a general example, which will be instantiated as a
|
||||
Filter question for each language/locale represented in the test suite.
|
||||
"Recognized" items probably don't warrant a question, hence it's optional. -->
|
||||
<!ELEMENT choice EMPTY>
|
||||
<!ATTLIST choice value CDATA #REQUIRED>
|
||||
<!-- Don't validate values here, because the function of a document conforming to
|
||||
this DTD is to *define* the values. Note, however that the use of "yes" and "no"
|
||||
is discouraged for Filter questions (for readability). -->
|
||||
<!ELEMENT elaborator ( %prose; )*>
|
||||
<!ATTLIST elaborator choice CDATA #REQUIRED>
|
||||
<!ATTLIST change date CDATA #REQUIRED>
|
||||
|
||||
<!--========================================================================-->
|
||||
<!--specialist low-level constructs-->
|
||||
|
||||
<!ELEMENT party EMPTY>
|
||||
<!ATTLIST party idref IDREF #REQUIRED>
|
||||
<!ELEMENT all-choices EMPTY>
|
||||
|
||||
<!--end of file-->
|
309
test/XSLT/testsuite/DOCS/Background/disc2htm.xsl
Normal file
309
test/XSLT/testsuite/DOCS/Background/disc2htm.xsl
Normal file
|
@ -0,0 +1,309 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--$Id: disc2htm.xsl,v 1.7 2001/11/17 22:31:12 Administrator Exp $-->
|
||||
<!DOCTYPE xsl:stylesheet [
|
||||
<!ENTITY nbsp " ">
|
||||
]>
|
||||
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
|
||||
xmlns:data="dummy"
|
||||
exclude-result-prefixes="data"
|
||||
version="1.0">
|
||||
|
||||
<!--
|
||||
Copyright (C) The Organization for the Advancement of
|
||||
Structured Information Standards [OASIS] (2001). All Rights
|
||||
Reserved.
|
||||
|
||||
This document and translations of it may be copied and
|
||||
furnished to others, and derivative works that comment on
|
||||
or otherwise explain it or assist in its implementation may
|
||||
be prepared, copied, published and distributed, in whole
|
||||
or in part, without restriction of any kind, provided that the
|
||||
above copyright notice and this paragraph are included on
|
||||
all such copies and derivative works. However, this
|
||||
document itself may not be modified in any way, such as by
|
||||
removing the copyright notice or references to OASIS,
|
||||
except as needed for the purpose of developing OASIS
|
||||
specifications, in which case the procedures for copyrights
|
||||
defined in the OASIS Intellectual Property Rights document
|
||||
must be followed, or as required to translate it into
|
||||
languages other than English.
|
||||
|
||||
The limited permissions granted above are perpetual and
|
||||
will not be revoked by OASIS or its successors or assigns.
|
||||
|
||||
This document and the information contained herein is
|
||||
provided on an "AS IS" basis and OASIS DISCLAIMS ALL
|
||||
WARRANTIES, EXPRESS OR IMPLIED, INCLUDING
|
||||
BUT NOT LIMITED TO ANY WARRANTY THAT THE USE
|
||||
OF THE INFORMATION HEREIN WILL NOT INFRINGE
|
||||
ANY RIGHTS OR ANY IMPLIED WARRANTIES OF
|
||||
MERCHANTABILITY OR FITNESS FOR A PARTICULAR
|
||||
PURPOSE.
|
||||
-->
|
||||
<xsl:output doctype-public="-//W3C//DTD HTML 4.0 Transitional//EN"/>
|
||||
|
||||
<xsl:variable name="configuration"
|
||||
select="document(/doc/@configuration-href,
|
||||
/doc/@configuration-href)"/>
|
||||
|
||||
<xsl:template match="doc"> <!--main body of the report-->
|
||||
<xsl:if test="not($configuration)">
|
||||
<xsl:variable name="err">
|
||||
<xsl:text>Configuration file '</xsl:text>
|
||||
<xsl:value-of select="/doc/@configuration-href"/>
|
||||
<xsl:text>' not found.</xsl:text>
|
||||
</xsl:variable>
|
||||
<xsl:message terminate="yes"><xsl:copy-of select="$err"/></xsl:message>
|
||||
</xsl:if>
|
||||
<html><head><title><xsl:value-of select="verbiage/title"/></title></head>
|
||||
<body>
|
||||
<xsl:apply-templates select="verbiage/title"/>
|
||||
<a href="#introduction">1. Introduction</a><br/>
|
||||
<a href="#statuses">2. Status</a><br/>
|
||||
<xsl:for-each select="verbiage/group-intro">
|
||||
<a href="#{@status}">
|
||||
<xsl:text/>2.<xsl:number/>
|
||||
<xsl:text> </xsl:text>
|
||||
<xsl:value-of select="@status"/></a><br/>
|
||||
</xsl:for-each>
|
||||
<a href="#tocs">3. Tables of Content</a><br/>
|
||||
<a href="#history">4. Change History</a><br/>
|
||||
<xsl:apply-templates select="verbiage"/>
|
||||
<hr/>
|
||||
<h1><a name="statuses">2. Status</a></h1>
|
||||
<xsl:apply-templates select="verbiage/group-intro"/>
|
||||
<xsl:call-template name="tocs"/>
|
||||
<xsl:apply-templates select="changes"/>
|
||||
<hr/>
|
||||
<small><strong><xsl:value-of select="@date"/></strong></small>
|
||||
</body>
|
||||
</html>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="verbiage/title"> <!--title and TOC of report-->
|
||||
<h1><xsl:copy-of select="node()"/></h1>
|
||||
<p>Revised: <xsl:value-of select="/doc/@date"/></p>
|
||||
</xsl:template>
|
||||
|
||||
<!--========================================================================-->
|
||||
<!--each section of the report-->
|
||||
|
||||
<xsl:template match="verbiage">
|
||||
<hr/>
|
||||
<h1><a name="introduction">1. Introduction</a></h1>
|
||||
<xsl:apply-templates select="intro" mode="specialist"/>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="group-intro">
|
||||
<h2><a name="{@status}">2.<xsl:number/><xsl:text> </xsl:text>
|
||||
<xsl:value-of select="@status"/></a></h2>
|
||||
<xsl:copy-of select="node()"/>
|
||||
<xsl:for-each select="/doc/items/item[@status=current()/@status]">
|
||||
<xsl:variable name="item" select="."/>
|
||||
<hr/>
|
||||
<h2><a name="{@id}"><xsl:call-template name="item-ref"/>
|
||||
<xsl:text> </xsl:text>
|
||||
<xsl:value-of select="@id"/></a></h2>
|
||||
<xsl:if test="@expandable">
|
||||
<p><em>Expandable: </em>
|
||||
<strong><xsl:value-of select="@expandable"/></strong></p>
|
||||
</xsl:if>
|
||||
<xsl:copy-of select="excerpt/node()"/>
|
||||
<xsl:if test="question">
|
||||
<p><em>Question<xsl:if test="count(question)>1">s</xsl:if>: </em></p>
|
||||
<xsl:for-each select="question">
|
||||
<p>
|
||||
<xsl:number/>.
|
||||
<xsl:if test="@scope">(<xsl:value-of select="@scope"/>) </xsl:if>
|
||||
<xsl:copy-of select="node()"/>
|
||||
</p>
|
||||
</xsl:for-each>
|
||||
</xsl:if>
|
||||
<xsl:choose>
|
||||
<xsl:when test="choices">
|
||||
<p><em>Valid choices: </em>
|
||||
<xsl:for-each select="choices/choice">
|
||||
<xsl:if test="position()!=1">, </xsl:if>
|
||||
<xsl:value-of select="@value"/>
|
||||
</xsl:for-each>
|
||||
</p>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<p><strong><em>No choices available.</em></strong></p>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
<xsl:for-each select="/doc/interlocks/interlock
|
||||
[.//party/@idref=current()/@id]">
|
||||
<p><em>Interlock: </em><!--put first element in para only if is a para-->
|
||||
<xsl:apply-templates mode="specialist" select="*[1][self::p]/node()">
|
||||
<xsl:with-param name="item" select="$item"/>
|
||||
</xsl:apply-templates>
|
||||
</p> <!--follow with rest of documentation-->
|
||||
<xsl:apply-templates mode="specialist" select="*[1][not(self::p)] |
|
||||
*[position()>1]">
|
||||
<xsl:with-param name="item" select="$item"/>
|
||||
</xsl:apply-templates>
|
||||
</xsl:for-each>
|
||||
|
||||
<xsl:variable name="citations" select="spec-citation"/>
|
||||
<p><em>Specification citations (manual): </em></p>
|
||||
<ul>
|
||||
<xsl:for-each select="$citations">
|
||||
<xsl:variable name="spec" select="@spec"/>
|
||||
<xsl:variable name="version" select="@version"/>
|
||||
<xsl:variable name="type" select="@type"/>
|
||||
<xsl:variable name="place" select="@place"/>
|
||||
<xsl:for-each select="$configuration">
|
||||
<xsl:if test="id(string($type))/@method='human'">
|
||||
<xsl:for-each select="id(string($spec))/
|
||||
version-spec[@version=$version]/
|
||||
spec[@type=$type]">
|
||||
<li>
|
||||
<xsl:value-of select="@prefix"/>
|
||||
<xsl:choose>
|
||||
<xsl:when test="@ref-linkable='yes'">
|
||||
<a href="{@ref}"><xsl:value-of select="@ref"/></a>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<xsl:value-of select="@ref"/>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
<xsl:value-of select="concat(@infix,$place,@suffix)"/>
|
||||
</li>
|
||||
</xsl:for-each>
|
||||
</xsl:if>
|
||||
</xsl:for-each>
|
||||
</xsl:for-each>
|
||||
</ul>
|
||||
<p><em>Specification citations (machine): </em></p>
|
||||
<ul>
|
||||
<xsl:for-each select="$citations">
|
||||
<xsl:variable name="spec" select="@spec"/>
|
||||
<xsl:variable name="version" select="@version"/>
|
||||
<xsl:variable name="type" select="@type"/>
|
||||
<xsl:variable name="place" select="@place"/>
|
||||
<xsl:for-each select="$configuration">
|
||||
<xsl:if test="id(string($type))/@method='machine'">
|
||||
<xsl:for-each select="id(string($spec))/
|
||||
version-spec[@version=$version]/
|
||||
spec[@type=$type]">
|
||||
<xsl:variable name="ref"
|
||||
select="concat(@prefix,@ref,@infix,$place,@suffix)"/>
|
||||
<li>
|
||||
<a href="{$ref}"><xsl:value-of select="$ref"/></a>
|
||||
</li>
|
||||
</xsl:for-each>
|
||||
</xsl:if>
|
||||
</xsl:for-each>
|
||||
</xsl:for-each>
|
||||
</ul>
|
||||
</xsl:for-each>
|
||||
<hr/>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="items"/> <!--already handled in group-intro-->
|
||||
|
||||
<!--========================================================================-->
|
||||
<!--specialist element handling-->
|
||||
|
||||
<xsl:template mode="specialist" match="party">
|
||||
<xsl:param name="item" select="/.."/>
|
||||
<xsl:text/>'<a>
|
||||
<xsl:if test="$item/@id!=@idref">
|
||||
<xsl:attribute name="href">
|
||||
<xsl:text/>#<xsl:value-of select="@idref"/>
|
||||
</xsl:attribute>
|
||||
</xsl:if>
|
||||
<xsl:value-of select="@idref"/>
|
||||
</a>'<xsl:text/>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:key name="choices" match="choice/@value" use="."/>
|
||||
|
||||
<xsl:template mode="specialist" match="all-choices">
|
||||
<xsl:for-each select="//choice/@value
|
||||
[generate-id(.)=generate-id(key('choices',.))]">
|
||||
<xsl:sort/>
|
||||
<xsl:if test="position()!=1">, </xsl:if>
|
||||
<strong><xsl:value-of select="."/></strong>
|
||||
</xsl:for-each>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template mode="specialist" match="*">
|
||||
<xsl:param name="item" select="/.."/>
|
||||
<xsl:copy>
|
||||
<xsl:copy-of select="@*"/>
|
||||
<xsl:apply-templates mode="specialist">
|
||||
<xsl:with-param name="item" select="$item"/>
|
||||
</xsl:apply-templates>
|
||||
</xsl:copy>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="interlocks"/> <!--interlocks handled individually-->
|
||||
|
||||
<!--========================================================================-->
|
||||
<!--tables of content-->
|
||||
|
||||
<xsl:template name="tocs">
|
||||
<xsl:variable name="section" select="'3'"/>
|
||||
<h1><a name="tocs">
|
||||
<xsl:value-of select="$section"/>. Tables of Content</a></h1>
|
||||
<h2><a name="toc-alpha">
|
||||
<xsl:value-of select="$section"/>.1 Alphabetical by item identifier</a></h2>
|
||||
<ul>
|
||||
<xsl:for-each select="//item">
|
||||
<xsl:sort select="@id"/>
|
||||
<li>
|
||||
<a href="#{@id}"><xsl:value-of select="@id"/></a>
|
||||
<xsl:text/> (<xsl:call-template name="item-ref"/>)<xsl:text/>
|
||||
</li>
|
||||
</xsl:for-each>
|
||||
</ul>
|
||||
<h2><a name="toc-interlocks">
|
||||
<xsl:value-of select="$section"/>.2 Interlock summary</a></h2>
|
||||
<ol>
|
||||
<xsl:for-each select="//interlock">
|
||||
<li>
|
||||
<xsl:for-each select=".//party">
|
||||
<xsl:sort select="@idref"/>
|
||||
<xsl:if test="position()>1">, </xsl:if>
|
||||
<a href="#{@idref}"><xsl:value-of select="@idref"/></a>
|
||||
<xsl:for-each select="id(@idref)">
|
||||
<xsl:text/> (<xsl:call-template name="item-ref"/>)<xsl:text/>
|
||||
</xsl:for-each>
|
||||
</xsl:for-each>
|
||||
</li>
|
||||
</xsl:for-each>
|
||||
</ol>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template name="item-ref"> <!--the formatting of an item's ref in report-->
|
||||
<xsl:text>2.</xsl:text>
|
||||
<xsl:value-of select="count(id(@status)/preceding-sibling::group-intro)+1"/>
|
||||
<xsl:text>.</xsl:text>
|
||||
<xsl:value-of select="count(preceding-sibling::*
|
||||
[@status=current()/@status]) + 1"/>
|
||||
</xsl:template>
|
||||
|
||||
<!--========================================================================-->
|
||||
<!--change history-->
|
||||
|
||||
<xsl:template match="changes">
|
||||
<h1>4. Change History</h1>
|
||||
<xsl:for-each select="change">
|
||||
<hr/>
|
||||
<p><strong><xsl:value-of select="@date"/>: </strong></p>
|
||||
<xsl:copy-of select="node()"/>
|
||||
</xsl:for-each>
|
||||
</xsl:template>
|
||||
|
||||
<!--========================================================================-->
|
||||
<!--default behaviours-->
|
||||
|
||||
<xsl:template match="*">
|
||||
<xsl:message>
|
||||
<xsl:text/>Element <xsl:value-of select="name(.)"/> not handled.<xsl:text/>
|
||||
</xsl:message>
|
||||
</xsl:template>
|
||||
|
||||
</xsl:stylesheet>
|
87
test/XSLT/testsuite/DOCS/Background/disc2q.xsl
Normal file
87
test/XSLT/testsuite/DOCS/Background/disc2q.xsl
Normal file
|
@ -0,0 +1,87 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--Sample extraction of questionnare information-->
|
||||
<!--$Date: 2001/12/07 21:00:12 $(UTC)-->
|
||||
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
|
||||
version="1.0">
|
||||
|
||||
<!--
|
||||
Copyright (C) The Organization for the Advancement of
|
||||
Structured Information Standards [OASIS] (2001). All Rights
|
||||
Reserved.
|
||||
|
||||
This document and translations of it may be copied and
|
||||
furnished to others, and derivative works that comment on
|
||||
or otherwise explain it or assist in its implementation may
|
||||
be prepared, copied, published and distributed, in whole
|
||||
or in part, without restriction of any kind, provided that the
|
||||
above copyright notice and this paragraph are included on
|
||||
all such copies and derivative works. However, this
|
||||
document itself may not be modified in any way, such as by
|
||||
removing the copyright notice or references to OASIS,
|
||||
except as needed for the purpose of developing OASIS
|
||||
specifications, in which case the procedures for copyrights
|
||||
defined in the OASIS Intellectual Property Rights document
|
||||
must be followed, or as required to translate it into
|
||||
languages other than English.
|
||||
|
||||
The limited permissions granted above are perpetual and
|
||||
will not be revoked by OASIS or its successors or assigns.
|
||||
|
||||
This document and the information contained herein is
|
||||
provided on an "AS IS" basis and OASIS DISCLAIMS ALL
|
||||
WARRANTIES, EXPRESS OR IMPLIED, INCLUDING
|
||||
BUT NOT LIMITED TO ANY WARRANTY THAT THE USE
|
||||
OF THE INFORMATION HEREIN WILL NOT INFRINGE
|
||||
ANY RIGHTS OR ANY IMPLIED WARRANTIES OF
|
||||
MERCHANTABILITY OR FITNESS FOR A PARTICULAR
|
||||
PURPOSE.
|
||||
-->
|
||||
<xsl:output doctype-public="-//W3C//DTD HTML 4.0 Transitional//EN"
|
||||
method="html" encoding="UTF-8"/>
|
||||
|
||||
<xsl:template match="/">
|
||||
<html><head><title>OASIS Developer Questionnaire</title></head>
|
||||
<body>
|
||||
<xsl:copy-of select="doc/verbiage/title"/><br/>
|
||||
<xsl:copy-of select="doc/verbiage/question-intro"/>
|
||||
<ul>
|
||||
<xsl:for-each select="doc/items/item[question]">
|
||||
<xsl:for-each select="question">
|
||||
<xsl:text>
|
||||
</xsl:text>
|
||||
<li>
|
||||
<xsl:if test="@scope='Prototype'">
|
||||
<xsl:text>(Pattern for questions) </xsl:text>
|
||||
</xsl:if>
|
||||
<xsl:value-of select="."/>
|
||||
<xsl:if test="spec-citation[@type='section']">
|
||||
<xsl:text>See section </xsl:text>
|
||||
<xsl:value-of select="spec-citation[@type='section']"/>
|
||||
<xsl:text> for context.</xsl:text>
|
||||
</xsl:if>
|
||||
<xsl:if test="../choices and (@scope='Filter' or @scope='Configuration')">
|
||||
<xsl:text>
|
||||
(choices: </xsl:text>
|
||||
<xsl:for-each select="../choices/choice">
|
||||
<xsl:if test="position()!=1">, </xsl:if>
|
||||
<xsl:value-of select="@value"/>
|
||||
</xsl:for-each>
|
||||
<xsl:text>)</xsl:text>
|
||||
<xsl:if test="../elaborator">
|
||||
<xsl:text>
|
||||
If </xsl:text>
|
||||
<xsl:value-of select="../elaborator/@choice" />
|
||||
<xsl:text>: </xsl:text>
|
||||
<xsl:value-of select="../elaborator" />
|
||||
<xsl:text>
|
||||
</xsl:text>
|
||||
</xsl:if>
|
||||
</xsl:if>
|
||||
</li>
|
||||
</xsl:for-each>
|
||||
</xsl:for-each>
|
||||
</ul>
|
||||
</body></html>
|
||||
</xsl:template>
|
||||
|
||||
</xsl:stylesheet>
|
48
test/XSLT/testsuite/DOCS/Background/prose.dtd
Normal file
48
test/XSLT/testsuite/DOCS/Background/prose.dtd
Normal file
|
@ -0,0 +1,48 @@
|
|||
<!--Prose constructs-->
|
||||
<!--$Date: 2001/11/29 17:30:53 $(UTC)-->
|
||||
<!--
|
||||
Copyright (C) The Organization for the Advancement of
|
||||
Structured Information Standards [OASIS] (2001). All Rights Reserved.
|
||||
|
||||
This document and translations of it may be copied and furnished to
|
||||
others, and derivative works that comment on or otherwise explain it or
|
||||
assist in its implementation may be prepared, copied, published and
|
||||
distributed, in whole or in part, without restriction of any kind,
|
||||
provided that the above copyright notice and this paragraph are included
|
||||
on all such copies and derivative works. However, this document itself
|
||||
may not be modified in any way, such as by removing the copyright notice
|
||||
or references to OASIS, except as needed for the purpose of developing
|
||||
OASIS specifications, in which case the procedures for copyrights
|
||||
defined in the OASIS Intellectual Property Rights document must be
|
||||
followed, or as required to translate it into languages
|
||||
other than English.
|
||||
|
||||
The limited permissions granted above are perpetual and
|
||||
will not be revoked by OASIS or its successors or assigns.
|
||||
|
||||
This document and the information contained herein is provided on an
|
||||
"AS IS" basis and OASIS DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED,
|
||||
INCLUDING BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE INFORMATION
|
||||
HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED WARRANTIES OF
|
||||
MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
|
||||
-->
|
||||
|
||||
<!--===== Overview =========================================================
|
||||
|
||||
The %prose; parameter entity is used by other DTDs in the system to
|
||||
describe prose-oriented constructs.
|
||||
|
||||
This particular set of constructs mimics HTML 4.0 but any collection of
|
||||
prose-oriented constructs may be chosen for the DTDs of a regime.
|
||||
-->
|
||||
|
||||
<!ENTITY % prose "( p | em | strong )*">
|
||||
|
||||
<!ELEMENT p ( #PCDATA | em | strong )*>
|
||||
<!ATTLIST p style CDATA #IMPLIED>
|
||||
<!ELEMENT em ( #PCDATA | strong )*>
|
||||
<!ATTLIST em style CDATA #IMPLIED>
|
||||
<!ELEMENT strong ( #PCDATA | em )*>
|
||||
<!ATTLIST strong style CDATA #IMPLIED>
|
||||
|
||||
<!--end of file-->
|
47
test/XSLT/testsuite/DOCS/Background/submits.dtd
Normal file
47
test/XSLT/testsuite/DOCS/Background/submits.dtd
Normal file
|
@ -0,0 +1,47 @@
|
|||
<!--document model for collection of submissions-->
|
||||
<!--$Date: 2001/09/24 19:20:44 $(UTC)-->
|
||||
<!--
|
||||
Copyright (C) The Organization for the Advancement of
|
||||
Structured Information Standards [OASIS] (2001). All Rights Reserved.
|
||||
|
||||
This document and translations of it may be copied and furnished to
|
||||
others, and derivative works that comment on or otherwise explain it or
|
||||
assist in its implementation may be prepared, copied, published and
|
||||
distributed, in whole or in part, without restriction of any kind,
|
||||
provided that the above copyright notice and this paragraph are included
|
||||
on all such copies and derivative works. However, this document itself
|
||||
may not be modified in any way, such as by removing the copyright notice
|
||||
or references to OASIS, except as needed for the purpose of developing
|
||||
OASIS specifications, in which case the procedures for copyrights
|
||||
defined in the OASIS Intellectual Property Rights document must be
|
||||
followed, or as required to translate it into languages
|
||||
other than English.
|
||||
|
||||
The limited permissions granted above are perpetual and
|
||||
will not be revoked by OASIS or its successors or assigns.
|
||||
|
||||
This document and the information contained herein is provided on an
|
||||
"AS IS" basis and OASIS DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED,
|
||||
INCLUDING BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE INFORMATION
|
||||
HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED WARRANTIES OF
|
||||
MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
|
||||
-->
|
||||
|
||||
<!ELEMENT submissions ( submission+ )>
|
||||
<!ATTLIST submissions configuration-href CDATA #REQUIRED
|
||||
discretionary-href CDATA #IMPLIED>
|
||||
|
||||
<!-- The above HREFs refer to data used by OASIS to form specific test regimes
|
||||
from its generic testing framework. -->
|
||||
|
||||
<!ELEMENT submission EMPTY>
|
||||
<!ATTLIST submission href CDATA #REQUIRED
|
||||
submitter NMTOKEN #REQUIRED
|
||||
date CDATA #REQUIRED>
|
||||
<!-- Attributes:
|
||||
href - points to file containing the catalog of one submission as XML data
|
||||
submitter - Organization name, contact person name, phone and/or email for person
|
||||
date - date submitted, in yyyy-mm-dd format (ISO-8601)
|
||||
-->
|
||||
|
||||
<!--end of file-->
|
247
test/XSLT/testsuite/DOCS/Background/valcat.xsl
Normal file
247
test/XSLT/testsuite/DOCS/Background/valcat.xsl
Normal file
|
@ -0,0 +1,247 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--Script to validate catalogues against test suite configuration-->
|
||||
<!--$Date: 2001/11/17 22:31:12 $(UTC)-->
|
||||
|
||||
<!--not documented yet-->
|
||||
<!--
|
||||
Copyright (C) The Organization for the Advancement of
|
||||
Structured Information Standards [OASIS] (2001). All Rights
|
||||
Reserved.
|
||||
|
||||
This document and translations of it may be copied and
|
||||
furnished to others, and derivative works that comment on
|
||||
or otherwise explain it or assist in its implementation may
|
||||
be prepared, copied, published and distributed, in whole
|
||||
or in part, without restriction of any kind, provided that the
|
||||
above copyright notice and this paragraph are included on
|
||||
all such copies and derivative works. However, this
|
||||
document itself may not be modified in any way, such as by
|
||||
removing the copyright notice or references to OASIS,
|
||||
except as needed for the purpose of developing OASIS
|
||||
specifications, in which case the procedures for copyrights
|
||||
defined in the OASIS Intellectual Property Rights document
|
||||
must be followed, or as required to translate it into
|
||||
languages other than English.
|
||||
|
||||
The limited permissions granted above are perpetual and
|
||||
will not be revoked by OASIS or its successors or assigns.
|
||||
|
||||
This document and the information contained herein is
|
||||
provided on an "AS IS" basis and OASIS DISCLAIMS ALL
|
||||
WARRANTIES, EXPRESS OR IMPLIED, INCLUDING
|
||||
BUT NOT LIMITED TO ANY WARRANTY THAT THE USE
|
||||
OF THE INFORMATION HEREIN WILL NOT INFRINGE
|
||||
ANY RIGHTS OR ANY IMPLIED WARRANTIES OF
|
||||
MERCHANTABILITY OR FITNESS FOR A PARTICULAR
|
||||
PURPOSE.
|
||||
-->
|
||||
|
||||
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
|
||||
version="1.0">
|
||||
|
||||
<xsl:variable name="configuration"
|
||||
select="document(/submissions/@configuration-href,
|
||||
/submissions/@configuration-href)"/>
|
||||
<xsl:variable name="discretionary"
|
||||
select="document(/submissions/@discretionary-href,
|
||||
/submissions/@discretionary-href)"/>
|
||||
|
||||
<xsl:output indent="yes"/>
|
||||
|
||||
<xsl:template match="/">
|
||||
<problems>
|
||||
<xsl:if test="not($configuration)">
|
||||
<xsl:variable name="err">
|
||||
<xsl:text>Configuration file '</xsl:text>
|
||||
<xsl:value-of select="/submissions/@configuration-href"/>
|
||||
<xsl:text>' not found.</xsl:text>
|
||||
</xsl:variable>
|
||||
<problem><xsl:copy-of select="$err"/></problem>
|
||||
<xsl:message terminate="yes"><xsl:copy-of select="$err"/></xsl:message>
|
||||
</xsl:if>
|
||||
<xsl:if test="not($discretionary)">
|
||||
<xsl:variable name="err">
|
||||
<xsl:text>Discretionary file '</xsl:text>
|
||||
<xsl:value-of select="/submissions/@discretionary-href"/>
|
||||
<xsl:text>' not found.</xsl:text>
|
||||
</xsl:variable>
|
||||
<problem><xsl:copy-of select="$err"/></problem>
|
||||
<xsl:message terminate="yes"><xsl:copy-of select="$err"/></xsl:message>
|
||||
</xsl:if>
|
||||
<xsl:variable name="discretionary-configuration-href"
|
||||
select="$discretionary/doc/@configuration-href"/>
|
||||
<xsl:if test="$discretionary">
|
||||
<xsl:if test="generate-id(document($discretionary-configuration-href,
|
||||
$discretionary-configuration-href))
|
||||
!=generate-id($configuration)">
|
||||
<problem>Configuration file supplied (<xsl:text/>
|
||||
<xsl:value-of select="/submissions/@configuration-href"/>
|
||||
<xsl:text>) is not pointing to same file as the </xsl:text>
|
||||
<xsl:text>discretionary document's configuration file (</xsl:text>
|
||||
<xsl:value-of select="$discretionary-configuration-href"/>
|
||||
<xsl:text>)</xsl:text>
|
||||
</problem>
|
||||
</xsl:if>
|
||||
</xsl:if>
|
||||
<xsl:for-each select="/submissions/submission">
|
||||
<xsl:apply-templates select="document(@href,@href)/
|
||||
test-suite/test-catalog">
|
||||
<xsl:with-param name="submitter" select="@submitter"/>
|
||||
<xsl:with-param name="sub-date" select="@date"/>
|
||||
</xsl:apply-templates>
|
||||
</xsl:for-each>
|
||||
</problems>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="test-catalog">
|
||||
<xsl:param name="submitter"/> <!--used for uniqueness of each submission;
|
||||
assumed to not include "_" character-->
|
||||
<xsl:param name="sub-date"/>
|
||||
<catalog submitter="{$submitter}" date="{$sub-date}">
|
||||
<xsl:for-each select="test-case">
|
||||
<xsl:variable name="id" select="normalize-space(@id)"/>
|
||||
<xsl:call-template name="validate-date">
|
||||
<xsl:with-param name="node" select="date"/>
|
||||
<xsl:with-param name="id" select="$id"/>
|
||||
</xsl:call-template>
|
||||
|
||||
<!--those singleton items validated against the suite configuration-->
|
||||
<xsl:variable name="category" select="@category"/>
|
||||
<xsl:variable name="operation" select="scenario/@operation"/>
|
||||
|
||||
<xsl:for-each select="$configuration">
|
||||
<xsl:if test="name(id(string($category))) != 'category'">
|
||||
<problem prob-id="{$id}" value="{$category}"
|
||||
>bad test case category value</problem>
|
||||
</xsl:if>
|
||||
<xsl:if test="name(id(string($operation))) != 'operation'">
|
||||
<problem prob-id="{$id}" value="{$operation}"
|
||||
>bad scenario operation value</problem>
|
||||
</xsl:if>
|
||||
</xsl:for-each>
|
||||
|
||||
<!--those multiple items validated against the suite configuration-->
|
||||
<xsl:for-each select="spec-citation">
|
||||
<xsl:variable name="spec" select="@spec"/>
|
||||
<xsl:variable name="type" select="@type"/>
|
||||
<xsl:variable name="place" select="@place"/>
|
||||
<xsl:for-each select="$configuration">
|
||||
<xsl:if test="name(id(string($spec))) != 'cite-spec'">
|
||||
<problem prob-id="{$id}" value="{$spec}"
|
||||
>bad citation spec value</problem>
|
||||
</xsl:if>
|
||||
<xsl:if test="name(id(string($type))) != 'cite-type'">
|
||||
<problem prob-id="{$id}" value="{$type}"
|
||||
>bad citation type value</problem>
|
||||
</xsl:if>
|
||||
<xsl:if test="not(normalize-space($place))">
|
||||
<problem prob-id="{$id}">missing citation place</problem>
|
||||
</xsl:if>
|
||||
</xsl:for-each>
|
||||
<xsl:call-template name="validate-date">
|
||||
<xsl:with-param name="node" select="@errata-add-date"/>
|
||||
</xsl:call-template>
|
||||
<xsl:call-template name="validate-date">
|
||||
<xsl:with-param name="node" select="@errata-drop-date"/>
|
||||
</xsl:call-template>
|
||||
</xsl:for-each>
|
||||
<xsl:for-each select="scenario/output-file">
|
||||
<xsl:variable name="compare" select="@compare"/>
|
||||
<xsl:for-each select="$configuration">
|
||||
<xsl:if test="name(id(string($compare))) != 'comparison'">
|
||||
<problem prob-id="{$id}" value="{$compare}"
|
||||
>bad output comparison value</problem>
|
||||
</xsl:if>
|
||||
</xsl:for-each>
|
||||
</xsl:for-each>
|
||||
<xsl:for-each select="scenario/output-file/@role |
|
||||
scenario/input-file/@role">
|
||||
<xsl:variable name="role" select="."/>
|
||||
<xsl:for-each select="$configuration">
|
||||
<xsl:if test="name(id(string($role))) != 'role'">
|
||||
<problem prob-id="{$id}" value="{$role}"
|
||||
>bad file role comparison value</problem>
|
||||
</xsl:if>
|
||||
<xsl:if test="not(string($role/..))">
|
||||
<problem prob-id="{$id}" value="{$role}"
|
||||
>empty file name specification</problem>
|
||||
</xsl:if>
|
||||
</xsl:for-each>
|
||||
</xsl:for-each>
|
||||
<xsl:variable name="files"
|
||||
select="scenario/output-file | scenario/input-file"/>
|
||||
<xsl:for-each select="$configuration/suite/scenarios/roles/
|
||||
role[@required]">
|
||||
<xsl:if test="not($files[local-name()=current()/@required]
|
||||
[@role=current()/@id])">
|
||||
<problem prob-id="{$id}" value="{@id}"
|
||||
>required role not included</problem>
|
||||
</xsl:if>
|
||||
</xsl:for-each>
|
||||
<xsl:for-each select="scenario/param-set/@type">
|
||||
<xsl:variable name="type" select="."/>
|
||||
<xsl:for-each select="$configuration">
|
||||
<xsl:if test="name(id(string($type))) != 'parameter-type'">
|
||||
<problem prob-id="{$id}" value="{$type}"
|
||||
>bad parameter type</problem>
|
||||
</xsl:if>
|
||||
</xsl:for-each>
|
||||
</xsl:for-each>
|
||||
|
||||
<!--those items that are validated against the discretionary items-->
|
||||
<xsl:for-each select="discretionary/discretionary-choice">
|
||||
<xsl:variable name="name" select="@name"/>
|
||||
<xsl:variable name="behavior" select="@behavior"/>
|
||||
<xsl:for-each select="$discretionary">
|
||||
<xsl:choose>
|
||||
<xsl:when test="name(id(string($name))) != 'item'">
|
||||
<problem prob-id="{$id}" value="{$name}"
|
||||
>bad discretionary choice value</problem>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<xsl:if test="not(id(string($name))/choices/
|
||||
choice[@value=$behavior])">
|
||||
<problem prob-id="{$id}" value="{$behavior}"
|
||||
>bad behaviour for given discretionary choice</problem>
|
||||
</xsl:if>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:for-each>
|
||||
</xsl:for-each>
|
||||
|
||||
<!--those items that are validated against gray areas-->
|
||||
<xsl:for-each select="gray-area/gray-area-choice">
|
||||
<xsl:variable name="name" select="@name"/>
|
||||
<xsl:variable name="behavior" select="@behavior"/>
|
||||
<xsl:for-each select="$configuration">
|
||||
<xsl:choose>
|
||||
<xsl:when test="name(id(string($name))) != 'gray-area'">
|
||||
<problem prob-id="{$id}" value="{$name}"
|
||||
>bad gray-area choice value</problem>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<xsl:if test="not(id(string($name))/choices/
|
||||
choice[@value=$behavior])">
|
||||
<problem prob-id="{$id}" value="{$behavior}"
|
||||
>bad behaviour for given gray-area choice</problem>
|
||||
</xsl:if>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:for-each>
|
||||
</xsl:for-each>
|
||||
</xsl:for-each>
|
||||
</catalog>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template name="validate-date">
|
||||
<xsl:param name="node"/>
|
||||
<xsl:param name="id"/>
|
||||
<xsl:variable name="date" select="normalize-space(node)"/>
|
||||
|
||||
<xsl:if test="node and ( string-length(translate($date,'/-',''))!=8 or
|
||||
translate($date,'0123456789/-','') )">
|
||||
<problem prob-id="{$id}" value="{$date}">bad date format</problem>
|
||||
</xsl:if>
|
||||
</xsl:template>
|
||||
|
||||
</xsl:stylesheet>
|
91
test/XSLT/testsuite/DOCS/Background/valcfg.xsl
Normal file
91
test/XSLT/testsuite/DOCS/Background/valcfg.xsl
Normal file
|
@ -0,0 +1,91 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--Script to validate discretion documents against test suite configuration-->
|
||||
<!--$Date: 2001/12/05 20:24:02 $(UTC)-->
|
||||
|
||||
<!--not documented yet-->
|
||||
<!--
|
||||
Copyright (C) The Organization for the Advancement of
|
||||
Structured Information Standards [OASIS] (2001). All Rights
|
||||
Reserved.
|
||||
|
||||
This document and translations of it may be copied and
|
||||
furnished to others, and derivative works that comment on
|
||||
or otherwise explain it or assist in its implementation may
|
||||
be prepared, copied, published and distributed, in whole
|
||||
or in part, without restriction of any kind, provided that the
|
||||
above copyright notice and this paragraph are included on
|
||||
all such copies and derivative works. However, this
|
||||
document itself may not be modified in any way, such as by
|
||||
removing the copyright notice or references to OASIS,
|
||||
except as needed for the purpose of developing OASIS
|
||||
specifications, in which case the procedures for copyrights
|
||||
defined in the OASIS Intellectual Property Rights document
|
||||
must be followed, or as required to translate it into
|
||||
languages other than English.
|
||||
|
||||
The limited permissions granted above are perpetual and
|
||||
will not be revoked by OASIS or its successors or assigns.
|
||||
|
||||
This document and the information contained herein is
|
||||
provided on an "AS IS" basis and OASIS DISCLAIMS ALL
|
||||
WARRANTIES, EXPRESS OR IMPLIED, INCLUDING
|
||||
BUT NOT LIMITED TO ANY WARRANTY THAT THE USE
|
||||
OF THE INFORMATION HEREIN WILL NOT INFRINGE
|
||||
ANY RIGHTS OR ANY IMPLIED WARRANTIES OF
|
||||
MERCHANTABILITY OR FITNESS FOR A PARTICULAR
|
||||
PURPOSE.
|
||||
-->
|
||||
|
||||
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
|
||||
version="1.0">
|
||||
|
||||
<xsl:output indent="yes"/>
|
||||
|
||||
<xsl:template match="/">
|
||||
<problems>
|
||||
<xsl:for-each select="/suite/citations/citation-specifications/
|
||||
cite-spec/version-spec/spec">
|
||||
<xsl:variable name="type" select="@type"/>
|
||||
<xsl:if test="name(id(string($type))) != 'cite-type'">
|
||||
<problem value="{$type}">bad citation type value</problem>
|
||||
</xsl:if>
|
||||
</xsl:for-each>
|
||||
<xsl:if test="not(
|
||||
/suite/citations/citation-types/cite-type/@method='human'
|
||||
and /suite/citations/citation-types/cite-type/@method='machine')">
|
||||
<problem>must have at least one citation type for each of <xsl:text/>
|
||||
<xsl:text/>the human and machine methods.</problem>
|
||||
</xsl:if>
|
||||
<xsl:for-each select="/suite/gray-areas/gray-area">
|
||||
<xsl:variable name="citation-types" select="spec-citation/@type"/>
|
||||
<xsl:if test="not(id($citation-types)/@method='human'
|
||||
and id($citation-types)/@method='machine')">
|
||||
<problem value="{$citation-types/ancestor::item/@id}">
|
||||
<xsl:text>each gray area must have at least one human </xsl:text>
|
||||
<xsl:text>and one machine citation</xsl:text>
|
||||
</problem>
|
||||
</xsl:if>
|
||||
</xsl:for-each>
|
||||
<xsl:for-each select="//spec-citation">
|
||||
<xsl:variable name="spec" select="id(string(@spec))"/>
|
||||
<xsl:choose>
|
||||
<xsl:when test="not(name($spec)='cite-spec')">
|
||||
<problem value="{@spec}">
|
||||
<xsl:text>Specification citation is not to a </xsl:text>
|
||||
<xsl:text>specification description.</xsl:text>
|
||||
</problem>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<xsl:if test="not($spec/version-spec[@version=current()/@version])">
|
||||
<problem value="{@version}">
|
||||
<xsl:text>Given version not found for specification </xsl:text>
|
||||
<xsl:text/>id="<xsl:value-of select="@spec"/>"<xsl:text/>
|
||||
</problem>
|
||||
</xsl:if>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:for-each>
|
||||
</problems>
|
||||
</xsl:template>
|
||||
|
||||
</xsl:stylesheet>
|
98
test/XSLT/testsuite/DOCS/Background/valdisc.xsl
Normal file
98
test/XSLT/testsuite/DOCS/Background/valdisc.xsl
Normal file
|
@ -0,0 +1,98 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--Script to validate discretion documents against test suite configuration-->
|
||||
<!--$Date: 2001/11/16 17:46:40 $(UTC)-->
|
||||
|
||||
<!--not documented yet-->
|
||||
<!--
|
||||
Copyright (C) The Organization for the Advancement of
|
||||
Structured Information Standards [OASIS] (2001). All Rights
|
||||
Reserved.
|
||||
|
||||
This document and translations of it may be copied and
|
||||
furnished to others, and derivative works that comment on
|
||||
or otherwise explain it or assist in its implementation may
|
||||
be prepared, copied, published and distributed, in whole
|
||||
or in part, without restriction of any kind, provided that the
|
||||
above copyright notice and this paragraph are included on
|
||||
all such copies and derivative works. However, this
|
||||
document itself may not be modified in any way, such as by
|
||||
removing the copyright notice or references to OASIS,
|
||||
except as needed for the purpose of developing OASIS
|
||||
specifications, in which case the procedures for copyrights
|
||||
defined in the OASIS Intellectual Property Rights document
|
||||
must be followed, or as required to translate it into
|
||||
languages other than English.
|
||||
|
||||
The limited permissions granted above are perpetual and
|
||||
will not be revoked by OASIS or its successors or assigns.
|
||||
|
||||
This document and the information contained herein is
|
||||
provided on an "AS IS" basis and OASIS DISCLAIMS ALL
|
||||
WARRANTIES, EXPRESS OR IMPLIED, INCLUDING
|
||||
BUT NOT LIMITED TO ANY WARRANTY THAT THE USE
|
||||
OF THE INFORMATION HEREIN WILL NOT INFRINGE
|
||||
ANY RIGHTS OR ANY IMPLIED WARRANTIES OF
|
||||
MERCHANTABILITY OR FITNESS FOR A PARTICULAR
|
||||
PURPOSE.
|
||||
-->
|
||||
|
||||
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
|
||||
version="1.0">
|
||||
|
||||
<xsl:variable name="configuration"
|
||||
select="document(doc/@configuration-href,doc/@configuration-href)"/>
|
||||
<xsl:variable name="doc" select="/doc"/>
|
||||
|
||||
<xsl:output indent="yes"/>
|
||||
|
||||
<xsl:template match="/">
|
||||
<problems>
|
||||
<xsl:if test="not($configuration)">
|
||||
<xsl:variable name="err">
|
||||
<xsl:text>Configuration file '</xsl:text>
|
||||
<xsl:value-of select="/doc/@configuration-href"/>
|
||||
<xsl:text>' not found.</xsl:text>
|
||||
</xsl:variable>
|
||||
<problem><xsl:copy-of select="$err"/></problem>
|
||||
<xsl:message terminate="yes"><xsl:copy-of select="$err"/></xsl:message>
|
||||
</xsl:if>
|
||||
<xsl:for-each select="/doc/verbiage/group-intro">
|
||||
<xsl:variable name="status" select="@status"/>
|
||||
<xsl:for-each select="$configuration">
|
||||
<xsl:if test="name(id(string($status))) != 'discretion-status'">
|
||||
<problem value="{$status}">bad discretion status value</problem>
|
||||
</xsl:if>
|
||||
</xsl:for-each>
|
||||
</xsl:for-each>
|
||||
<xsl:for-each select="$configuration/suite/
|
||||
discretion-statuses/discretion-status/@id">
|
||||
<xsl:if test="not($doc/verbiage/group-intro/@status=.)">
|
||||
<problem value="{.}">missing group-intro definition <xsl:text/>
|
||||
<xsl:text/>for status value</problem>
|
||||
</xsl:if>
|
||||
</xsl:for-each>
|
||||
<xsl:for-each select="/doc/items/item">
|
||||
<xsl:variable name="citation-types" select="spec-citation/@type"/>
|
||||
<xsl:for-each select="$configuration">
|
||||
<xsl:if test="not(id($citation-types)/@method='human'
|
||||
and id($citation-types)/@method='machine')">
|
||||
<problem value="{$citation-types/ancestor::item/@id}">
|
||||
<xsl:text>each item must have at least one human </xsl:text>
|
||||
<xsl:text>and one machine citation</xsl:text>
|
||||
</problem>
|
||||
</xsl:if>
|
||||
</xsl:for-each>
|
||||
</xsl:for-each>
|
||||
<xsl:for-each select="/doc/items/item/spec-citation">
|
||||
<xsl:variable name="spec" select="@spec"/>
|
||||
<xsl:for-each select="$configuration">
|
||||
|
||||
<xsl:if test="name(id(string($spec))) != 'cite-spec'">
|
||||
<problem value="{$spec}">unexpected specification cited</problem>
|
||||
</xsl:if>
|
||||
</xsl:for-each>
|
||||
</xsl:for-each>
|
||||
</problems>
|
||||
</xsl:template>
|
||||
|
||||
</xsl:stylesheet>
|
1439
test/XSLT/testsuite/DOCS/Background/xsltdisc.xml
Normal file
1439
test/XSLT/testsuite/DOCS/Background/xsltdisc.xml
Normal file
File diff suppressed because it is too large
Load diff
82
test/XSLT/testsuite/DOCS/Background/xsltreg.htm
Normal file
82
test/XSLT/testsuite/DOCS/Background/xsltreg.htm
Normal file
|
@ -0,0 +1,82 @@
|
|||
<!DOCTYPE html
|
||||
PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
||||
<!--
|
||||
Copyright (C) The Organization for the Advancement of
|
||||
Structured Information Standards [OASIS] (2001). All Rights Reserved.
|
||||
|
||||
This document and translations of it may be copied and furnished to
|
||||
others, and derivative works that comment on or otherwise explain it or
|
||||
assist in its implementation may be prepared, copied, published and
|
||||
distributed, in whole or in part, without restriction of any kind,
|
||||
provided that the above copyright notice and this paragraph are included
|
||||
on all such copies and derivative works. However, this document itself
|
||||
may not be modified in any way, such as by removing the copyright notice
|
||||
or references to OASIS, except as needed for the purpose of developing
|
||||
OASIS specifications, in which case the procedures for copyrights
|
||||
defined in the OASIS Intellectual Property Rights document must be
|
||||
followed, or as required to translate it into languages
|
||||
other than English.
|
||||
|
||||
The limited permissions granted above are perpetual and
|
||||
will not be revoked by OASIS or its successors or assigns.
|
||||
|
||||
This document and the information contained herein is provided on an
|
||||
"AS IS" basis and OASIS DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED,
|
||||
INCLUDING BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE INFORMATION
|
||||
HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED WARRANTIES OF
|
||||
MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
|
||||
-->
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||
|
||||
<title>Test regime for OASIS XSLT/XPath Conformance</title>
|
||||
</head>
|
||||
<body>
|
||||
<h1>Test regime for OASIS XSLT/XPath Conformance</h1>
|
||||
A "test regime" is an instance of the OASIS Generic Testing System.
|
||||
The system is driven by XML data. Most of the configuration is divided
|
||||
between two DTDs: collcat.dtd defines the generic aspects of the test
|
||||
data, and (in this instance) xsltcfg.xml contains the data specific to
|
||||
the XSLT/XPath conformance suite.
|
||||
<p>
|
||||
Test case data has 3 main areas:
|
||||
<p>
|
||||
1. Test case identification
|
||||
<p>
|
||||
- identifying and categorizing a test case within a catalogue within
|
||||
a suite of catalogues
|
||||
<p>
|
||||
2. Test case documentation
|
||||
<p>
|
||||
- documenting a test case and how it is relevant
|
||||
- for some cases, providing data that allows the test to be applied
|
||||
only against those processors that behave the way it anticipates
|
||||
<p>
|
||||
3. Operational parameters
|
||||
<p>
|
||||
- identifying the file path of the base location from which the test is
|
||||
executed
|
||||
- identifying the inputs
|
||||
- specifying names for outputs
|
||||
- specifying (abstractly) the style of invocation
|
||||
- specifying (abstractly) how actual and reference outputs are compared
|
||||
|
||||
<h1>Notes:</h1>
|
||||
|
||||
i) Enumerations of "constraints" refer to the element type name of those
|
||||
constructs in the test regime configuration instance (xsltcfg.xml for XSLT)
|
||||
with the ID values being the name token used as the attribute in the catalogue
|
||||
instance. (A sample of a catalogue instance is supplied in
|
||||
validate/XampleCo/testgood.xml.)
|
||||
<p>
|
||||
ii) Certain information items are inspired by the Dublin Core names
|
||||
for similar concepts, though no attempt is made to preserve the case of
|
||||
letters used in any names described therein.
|
||||
ref: http://purl.org/DC/documents/rec-dces-19990702.htm
|
||||
<p>
|
||||
iii) Most values will be interpreted as strings. Values can be interpreted
|
||||
numerically, specifically in inequality relations, when they refer to versions
|
||||
and dates.
|
||||
</body>
|
||||
</html>
|
117
test/XSLT/testsuite/DOCS/README.txt
Normal file
117
test/XSLT/testsuite/DOCS/README.txt
Normal file
|
@ -0,0 +1,117 @@
|
|||
Prototype XSLT/XPath 1.0 Conformance Test Suite
|
||||
|
||||
I. Introduction
|
||||
|
||||
This package is the complete test suite created by the OASIS
|
||||
XSLT / XPath Conformance Technical Committee. Its purpose is to
|
||||
provide tests and tools from which to build a test harness for a
|
||||
specific XSLT processor, running on a particular platform. Note
|
||||
that we have not provided a complete test harness here.
|
||||
|
||||
This test suite covers all of XSLT 1.0 and XPath 1.0, and consists
|
||||
of 3173 tests.
|
||||
|
||||
II. Package Contents
|
||||
|
||||
There are 3 top-level directories -- DOCS, TESTS and TOOLS.
|
||||
|
||||
DOCS: -- documentation
|
||||
README.txt -- this document
|
||||
HowToSub.htm -- details about the catalog format (long)
|
||||
LabGuide.htm -- partly-completed document about using the test
|
||||
suite, which can be examined for ideas and suggestions
|
||||
xsltcfg.htm -- definition of all scenarios, compares, and other
|
||||
values that may occur in the catalog
|
||||
xsltcfg.xml -- raw configuration data
|
||||
xsltDevQ.htm -- questionnaire for XSLT implementer to provide
|
||||
data about what they chose for each discretionary item
|
||||
xsltdisc.htm -- master list of discretionary items in XSLT/XPath
|
||||
(explains <discretionary> elements in catalog)
|
||||
DOCS/Background contains additional information about the XSLT/XPath
|
||||
Test Regime, for those who want to know more about it.
|
||||
|
||||
TESTS: -- contains all test subdirectories
|
||||
MSFT_Conformance_Tests
|
||||
Xalan_Conformance_Tests
|
||||
The catalog.xml and doubts.xml files are explained below.
|
||||
|
||||
TOOLS: -- tools and scripts
|
||||
README.txt -- tools documentation
|
||||
infoset.xsl -- stylesheet to convert output to standard form
|
||||
mkfinder.xsl -- stylesheet to exercise the XSLT processor you
|
||||
use to transform the catalog.xml and doubts.xml in your lab
|
||||
|
||||
III. How to Use the Tests
|
||||
|
||||
A. Creating a test script
|
||||
|
||||
You will run the tests using a test harness (if you have one), or with a test
|
||||
script. You can use the catalog file, catalog.xml, in the TESTS directory.
|
||||
Use it as sources of filenames to create the script, or to create a control file
|
||||
for the test harness. The format of the catalog files is simple, and you can
|
||||
use a stylesheet, or your favorite scripting language, to process it. See the
|
||||
mkfinder.xsl stylesheet (provided in TOOLS) for an example of a stylesheet that
|
||||
transforms catalog.xml into a script. If each test-case element is a "line item"
|
||||
in your script, then the scenario element identifies the syntax needed for that
|
||||
line item. The "standard" scenario is where a stylesheet is invoked against an
|
||||
XML document and is expected to succeed and produce output.
|
||||
|
||||
B. Running the tests
|
||||
|
||||
To run the script, you need to decide where the output from the test will be
|
||||
stored. The two usual choices are to put them in amongst the tests themselves,
|
||||
or to create a separate output subdirectory. One other issue to be careful
|
||||
about is to make sure your XSLT processor is executing in the proper directory
|
||||
for each test. The file-path element in the catalog can be used to create
|
||||
output subdirectories, in addition to being used to locate the test inputs.
|
||||
|
||||
C. Checking your output
|
||||
|
||||
XML Documents may be logically equivalent without being physically identical.
|
||||
(See Canonical XML 1.0, http://www.w3.org/TR/2001/REC- xml-c14n-20010315, and
|
||||
its errata, http://www.w3.org/2001/03/C14N-errata for more details.) We
|
||||
have provided reference output files in the REF_OUT subdirectories. In order
|
||||
to check that test output matches the reference files, it will be necessary to
|
||||
convert both your output and the reference files to a standard form. We have
|
||||
provided a simple stylesheet, infoset.xsl, which produces standardized (very
|
||||
expanded) output. There are also publicly available tools that create
|
||||
canonical XML. You must use one of these tools in order to do meaningful
|
||||
output comparisons. See README.txt in the TOOLS subdirectory for one source
|
||||
of freely available XML and HTML canonicalizers.
|
||||
|
||||
IV. Issues
|
||||
|
||||
The tests provided by this testsuite have been used extensively by various
|
||||
organizations, and are believed to be accurate. All doubts and issues that
|
||||
were brought to our attention through April 2005 are cataloged in doubts.xml,
|
||||
which can be combined with catalog.xml for additional filtering. We suggest
|
||||
that you make a working copy of doubts.xml and add any additional issues or
|
||||
annotations you need.
|
||||
|
||||
====================================================================
|
||||
Copyright (C) The Organization for the Advancement of
|
||||
Structured Information Standards [OASIS] (2001). All Rights Reserved.
|
||||
|
||||
This document and translations of it may be copied and furnished to
|
||||
others, and derivative works that comment on or otherwise explain it or
|
||||
assist in its implementation may be prepared, copied, published and
|
||||
distributed, in whole or in part, without restriction of any kind,
|
||||
provided that the above copyright notice and this paragraph are included
|
||||
on all such copies and derivative works. However, this document itself
|
||||
may not be modified in any way, such as by removing the copyright notice
|
||||
or references to OASIS, except as needed for the purpose of developing
|
||||
OASIS specifications, in which case the procedures for copyrights
|
||||
defined in the OASIS Intellectual Property Rights document must be
|
||||
followed, or as required to translate it into languages
|
||||
other than English.
|
||||
|
||||
The limited permissions granted above are perpetual and
|
||||
will not be revoked by OASIS or its successors or assigns.
|
||||
|
||||
This document and the information contained herein is provided on an
|
||||
"AS IS" basis and OASIS DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED,
|
||||
INCLUDING BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE INFORMATION
|
||||
HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED WARRANTIES OF
|
||||
MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
|
||||
|
||||
|
2766
test/XSLT/testsuite/DOCS/howtosub.htm
Normal file
2766
test/XSLT/testsuite/DOCS/howtosub.htm
Normal file
File diff suppressed because it is too large
Load diff
191
test/XSLT/testsuite/DOCS/labguide.htm
Normal file
191
test/XSLT/testsuite/DOCS/labguide.htm
Normal file
|
@ -0,0 +1,191 @@
|
|||
<!DOCTYPE html
|
||||
PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
||||
<!--
|
||||
Copyright (C) The Organization for the Advancement of
|
||||
Structured Information Standards [OASIS] (2005). All Rights Reserved.
|
||||
|
||||
This document and translations of it may be copied and furnished to
|
||||
others, and derivative works that comment on or otherwise explain it or
|
||||
assist in its implementation may be prepared, copied, published and
|
||||
distributed, in whole or in part, without restriction of any kind,
|
||||
provided that the above copyright notice and this paragraph are included
|
||||
on all such copies and derivative works. However, this document itself
|
||||
may not be modified in any way, such as by removing the copyright notice
|
||||
or references to OASIS, except as needed for the purpose of developing
|
||||
OASIS specifications, in which case the procedures for copyrights
|
||||
defined in the OASIS Intellectual Property Rights document must be
|
||||
followed, or as required to translate it into languages
|
||||
other than English.
|
||||
|
||||
The limited permissions granted above are perpetual and
|
||||
will not be revoked by OASIS or its successors or assigns.
|
||||
|
||||
This document and the information contained herein is provided on an
|
||||
"AS IS" basis and OASIS DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED,
|
||||
INCLUDING BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE INFORMATION
|
||||
HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED WARRANTIES OF
|
||||
MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
|
||||
-->
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||
|
||||
<title>OASIS XSLT/XPath Conformance Committee</title>
|
||||
</head>
|
||||
<body>
|
||||
<h1>Test Lab Guidelines - DRAFT 0.45</h1>
|
||||
|
||||
<h2>I. General Information</h2>
|
||||
A. This package includes test cases, reference output for comparison, and catalog data that you can use to generate various scripts. The catalog data is in XML, and the scripts can be generated via XSLT. We include a standalone sufficiency test (MkFinder.xsl) so you can determine whether your XSLT processor can generate the anticipated scripts.
|
||||
<br><br>
|
||||
B. The expected "reference" results from the submitters will be XML, HTML or text format, as will the user's actual results. These raw results will be converted to an XML document with an indirect representation of the content in InfoSet-style markup, always in UTF-8 encoding. The XSLT/XPath Conformance Committee will supply the user with the "reference" results and the user will apply an Information Set Analysis mechanism to produce the Users Results Description of the actual test results run on a particular processor. The XML results can be canonicalized and the user can perform a byte-wise or text comparison. For example, if the result is an XML document, the user can apply an XSLT stylesheet supplied in the XSLT/XPath Conformance Testing package and use the processor being tested or another processor to produce an XML InfoSet representation of that result. Processing the information set result using Canonical XML or any consistent serializer with both the committee-supplied expected results and actual results allows for easy comparison. Direct XML or HTML comparitors can be used, if available.
|
||||
<br><br>
|
||||
C. This document is currently more of an outline than a complete explanation. It is being included with the test suite because it contains numerous suggestions and ideas that enable optimum use of the suite.
|
||||
|
||||
<h2>II. Unpacking and setting up the test system</h2>
|
||||
A. This document explains
|
||||
<ul>
|
||||
<li>1. Instructions for installing the test suite</li>
|
||||
<li>2. Instructions for rendering the suite for a particular test run</li>
|
||||
<li>3. Instructions for canonicalizing and comparing output</li>
|
||||
<li>4. Instructions particular to each "operation" scenario</li>
|
||||
<li>5. Guidance on running single test cases that check the setup</li>
|
||||
<li>6. Guidance on the uses of individual data items in the catalog</li>
|
||||
<li>7. Guidance on the directory structure (e.g., read-only parts)</li>
|
||||
</ul>
|
||||
A'. Other documents explain
|
||||
<ul>
|
||||
<li>1. Information about discretionary items and the questionnaire</li>
|
||||
<li>2. Information on the W3C specs and errata we deal with</li>
|
||||
<li>3. How to submit test cases</li>
|
||||
<li>4. The OASIS generic testing framework and this package as an instance of it</li>
|
||||
</ul>
|
||||
B. Planning your file system layout
|
||||
<ul>
|
||||
<li>1. File tree of test cases (read-only)</li>
|
||||
<li>2. Documents in top-level DOCS directory</li>
|
||||
<li>3. Utility stylesheets in TOOLS</li>
|
||||
<li>4. Reference output in two trees, raw and InfoSet (read-only); will need 3rd for canonical</li>
|
||||
<li>5. Generate the canonical version of the reference output (one-time process on your system)</li>
|
||||
<ul><li>a. Known conformant canonical processor available at http://www.elcel.com/products/xmlcanon.html</li>
|
||||
<li>b. Checking that it ran correctly</li></ul>
|
||||
<li>6. Suggestion: directory trees for each processor being tested</li>
|
||||
<li>7. May need extra trees for different invocation options, run dates, etc.</li>
|
||||
<li>8. Remarks about relative paths</li>
|
||||
</ul>
|
||||
C. Planning your test operations
|
||||
<ul>
|
||||
<li>1. You will need to know how to invoke each processor (see next section)</li>
|
||||
<li>2. Operating environment: command shell? JRE? other?</li>
|
||||
<li>3. Do you want to create output in its storage place or move it when done?</li>
|
||||
<li>4. Master script that runs all test cases, invoking single-test script</li>
|
||||
<li>5. Byte-wise file comparison tool</li>
|
||||
<li>6. Capturing console output</li>
|
||||
<li>7. Lack of generated output, planned vs. unplanned</li>
|
||||
<li>8. If multiple processors under test, need to render suite for each to account for discretionary items</li>
|
||||
<li>9. If a processor "compiles" the stylesheet first, plan for storage of compiled versions</li>
|
||||
</ul>
|
||||
|
||||
<h2>III. Getting an XSLT processor ready for testing</h2>
|
||||
A. The Test Lab needs to get the following information from the processor developer(s)
|
||||
<ul>
|
||||
<li>1. Specifications of the necessary operating system (or JRE)</li>
|
||||
<li>2. Specifications of other software needed to run the processor</li>
|
||||
<li>3. Instructions for installing the processor</li>
|
||||
<li>4. Command-line and/or API arguments; invocation sequence</li>
|
||||
<li>5. Information about how errors and xsl:message are handled</li>
|
||||
<li>6. Their answers to our questionnaire about discretionary items (xsltDevQ.htm)</li>
|
||||
<li>7. Information about languages and locales supported</li>
|
||||
<li>8. (For later use) How to set parameters "externally"</li>
|
||||
</ul>
|
||||
B. Ensure that the processor works
|
||||
<ul>
|
||||
<li>1. Vendor's setup tests</li>
|
||||
<li>2. Try a couple tests from this suite</li>
|
||||
<li>3. Devise a single-case script, batch file, or invocation program</li>
|
||||
<li>4. Try pertinent invocation options</li>
|
||||
</ul>
|
||||
C. Using XSLT as part of the installation
|
||||
<ul>
|
||||
<li>1. The sufficiency test (MkFinder.xsl) is also an example</li>
|
||||
<li>2. Trial generation of a master script for running tests</li>
|
||||
<li>3. How you can manipulate fixed strings and name parts to make other scripts</li>
|
||||
</ul>
|
||||
|
||||
<h2>IV. Running the tests and evaluating a processor</h2>
|
||||
A. Setup and planning
|
||||
<ul>
|
||||
<li>1.Script to check that all the input files needed by a test case exist in the correct directories</li>
|
||||
<ul><li>a. The "cd issue" arises because the principal stylesheet can refer to files in other roles</li>
|
||||
<li>1) supplemental-data: document('filename')</li>
|
||||
<li>2) supplemental-stylesheet: xsl:import or xsl:include files</li>
|
||||
<li>b. Supplemental files may have relative paths, not just names.</li>
|
||||
<li>c. The current directory should be the one containing the stylesheet.</li>
|
||||
<li>d. The supplemental inputs can be tested for existence relative to that directory.</li></ul>
|
||||
<li>2. The test lab uses catalog data to generate a script with all the necessary "cd" (or equivalent) commands intermixed among the commands to invoke the tests.</li>
|
||||
<li>3. The following naming parts are supplied to the test lab</li>
|
||||
<ul><li>a. test-catalog/@submitter names the directory for one submission</li>
|
||||
<li>b. file-path gives the intermediary directories to locate a case</li>
|
||||
<li>c. test-case/@id is the name of a case for display purposes</li>
|
||||
<li>d. input-file and output-file elements contain names of all files used in a test case</li>
|
||||
<li>e. Note that (a) and (b) are only separate for Committee purposes, and that all the test lab uses need to use the concatenation of the two (with a / or appropriate separator between).</li></ul>
|
||||
<li>4. Using the above name parts plus naming conventions suggested by the testing guide, a test lab should be able to create all the following in an automated way. In these items, "script" means a batch file, shell script, or whatever. These would be generated off the catalog data by an XSLT transformation with text-method output</li>
|
||||
<ul><li>a. Script to canonicalize all InfoSetized reference output</li>
|
||||
<li>b. Script that wraps the process of rendering the test suite for a given processor and errata level</li>
|
||||
<li>c. Script to check that all the input files needed by a test case exist in the correct directories (MkFinder.xsl does this)</li>
|
||||
<li>d. Line in a script to run a test from the command line, feeding in the name of the principal output file, and ensure that the output is either generated in or moved to the correct directory</li>
|
||||
<li>e. Variation of (d) where console output must be captured and moved to an appropriate directory.</li>
|
||||
<li>f. Script to run all tests using a mixture of (d) and (e), and also make a log file that names the cases being run (could also display "purpose" strings or spec-citations if desired)</li>
|
||||
<li>g. Programs similar to (d) and (e) that use API calls</li>
|
||||
<li>h. Scripts to InfoSetize and then canonicalize the output from the test run, using different directory trees for each</li>
|
||||
<li>i. Script to compare all canonicalized test-run outputs against the corresponding reference outputs</li>
|
||||
<li>j. Script to delete files no longer needed after a successful run</li>
|
||||
<li>k. HREF-clean version of fully-qualified name (change / to _)</li></ul>
|
||||
<li>5. Each "operation" has its own details of invocation</li>
|
||||
<ul><li>a. standard: provide both XML and stylesheet as arguments</li>
|
||||
<li>b. embedded: provide XML as only input</li>
|
||||
<li>c. external-param [TBD later]</li>
|
||||
<li>d. execution-error: need to capture console, transformation output is a mistake</li>
|
||||
<li>e. result-analysis: human review of results needed</li>
|
||||
<li>f. (should xsl:message have its own, combining a and d?)</li></ul>
|
||||
<li>6. Certain "compare" values require special attention</li>
|
||||
<ul><li>a. ignore: presence of this file is a mistake</li>
|
||||
<li>b. manual/generate-id: look at generated IDs, ensure that they are in correct format</li>
|
||||
<li>c. manual/system-property: look at actual values, ensure they are accurate</li></ul>
|
||||
</ul>
|
||||
B. Rendering the test suite for a given processor and errata level
|
||||
<ul>
|
||||
<li>1. Gray areas and discretionary items filter out cases - need data in XML</li>
|
||||
<li>2. Specify the errata level</li>
|
||||
<li>3. Rendering the processor-specific suite to exclude inapplicable test cases creates a trimmed catalog</li>
|
||||
</ul>
|
||||
C. Running the applicable test cases through the processor
|
||||
<ul>
|
||||
<li>1. The XSLT/XPath Conformance Committee will supply the test lab with the expected results and the test lab will apply an Information Set Analysis mechanism to produce the Users Results Description of the actual test results run on a particular processor.</li>
|
||||
<li>2. The XML results can be serialized in canonical or other proprietary consistent way and then compared byte wise.</li>
|
||||
<li>3. Alternatively, HTML or XML can be compared directly if a suitable comparitor exists</li>
|
||||
<li>4. The raw results from XSLT Stylesheet (Test Case) can be XML, HTML or text format.</li>
|
||||
<li>5. The user's actual results after running the test can be XML, HTML or text format.</li>
|
||||
</ul>
|
||||
D. Comparing the results of this run against the reference output
|
||||
<ul>
|
||||
<li>1. XML Output</li>
|
||||
<ul><li>a. The XML results will be converted to an XML document using a subset of the XML InfoSet</li>
|
||||
<li>b. Canonical XML or any consistent serialization can be used for byte-wise comparison</li></ul>
|
||||
<li>2. Text Output</li>
|
||||
<ul><li>a. If the results are text, the test lab or user can be supplied with a form of the text coded in an XML InfoSet document.</li>
|
||||
<li>1) Encoded in UTF-8</li>
|
||||
<li>2) Separate text node for each line</li>
|
||||
<li>3) Actual encoding specified as an attribute of the root</li>
|
||||
<li>b. An alternate approach is supplying the output as the combination of all text nodes from XML output in document order.</li></ul>
|
||||
<li>3. HTML Output - This one is hard due to:</li>
|
||||
<ul><li>1) Different treatment for tags and attributes between HTML and XML</li>
|
||||
<li>a. HTML allows attributes without values. Ex: INPUT disabled /</li>
|
||||
<li>2) Different treatment of white spaces between HTML and XML</li>
|
||||
<li>b. Tools to solve:</li>
|
||||
<li>1) W3C Tidy tool to solve 1st problem</li>
|
||||
<li>2) Tool that produce consistent output regarding whitespace (IE libraries has one)</li>
|
||||
<li>3) If you have money: HTML Match? DiffDoc? CS-HTMLdiff? HTML Compare? more?</li></ul>
|
||||
</ul>
|
||||
</body>
|
||||
</html>
|
319
test/XSLT/testsuite/DOCS/xsltDevQ.htm
Normal file
319
test/XSLT/testsuite/DOCS/xsltDevQ.htm
Normal file
|
@ -0,0 +1,319 @@
|
|||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
||||
<!--
|
||||
Copyright (C) The Organization for the Advancement of
|
||||
Structured Information Standards [OASIS] (2001). All Rights Reserved.
|
||||
|
||||
This document and translations of it may be copied and furnished to
|
||||
others, and derivative works that comment on or otherwise explain it or
|
||||
assist in its implementation may be prepared, copied, published and
|
||||
distributed, in whole or in part, without restriction of any kind,
|
||||
provided that the above copyright notice and this paragraph are included
|
||||
on all such copies and derivative works. However, this document itself
|
||||
may not be modified in any way, such as by removing the copyright notice
|
||||
or references to OASIS, except as needed for the purpose of developing
|
||||
OASIS specifications, in which case the procedures for copyrights
|
||||
defined in the OASIS Intellectual Property Rights document must be
|
||||
followed, or as required to translate it into languages
|
||||
other than English.
|
||||
|
||||
The limited permissions granted above are perpetual and
|
||||
will not be revoked by OASIS or its successors or assigns.
|
||||
|
||||
This document and the information contained herein is provided on an
|
||||
"AS IS" basis and OASIS DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED,
|
||||
INCLUDING BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE INFORMATION
|
||||
HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED WARRANTIES OF
|
||||
MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
|
||||
-->
|
||||
<html>
|
||||
<head>
|
||||
<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||
<title>OASIS Developer Questionnaire</title>
|
||||
</head>
|
||||
<body>
|
||||
<title>Discretionary behavior in '<strong>XSL
|
||||
Transformations (XSLT)</strong>' and '<strong>XPath</strong>'</title>
|
||||
<br>
|
||||
<question-intro>
|
||||
|
||||
<p>Questionnaire for XSLT processor developers</p>
|
||||
|
||||
<p>The XSLT and XPath Recommendations were written in hopes that XML
|
||||
data could be transformed as needed by the products of many vendors.
|
||||
Builders of Web sites should be able to use tools to create XSLT
|
||||
stylesheets regardless of the XSLT processor that will ultimately
|
||||
execute the styling. The OASIS XSLT/XPath test suite is the most
|
||||
comprehensive measure of the necessary interoperability.</p>
|
||||
|
||||
<p>As a developer trying to meet the W3C Recommendations, you know how
|
||||
the verbiage of the Recommendations contains precisely-stated
|
||||
provisions that interlock in complex and sometimes surprising ways.
|
||||
There are also cases where you have leeway to choose one of two
|
||||
allowable behaviors or decide output details. Below is our
|
||||
questionnaire about the choices. We want you to specify the choices
|
||||
you made when creating your XSLT processor. You are encouraged to
|
||||
post the answers on your own Web site as well as sending them to us.
|
||||
When you prepare to use our test suite, an XML document containing
|
||||
your answers is used to filter out test cases that assume the other
|
||||
choice, leaving a rendition that is custom-fit to your processor
|
||||
insofar as allowed by the Recommendations.</p>
|
||||
|
||||
<p>Conformance to the Recommendations is tested by running thousands
|
||||
of small test cases, each with processor inputs and an expected
|
||||
output. Comparison of actual and expected output neutralizes all
|
||||
details that have been defined as irrelevant by the XML, InfoSet,
|
||||
Namespaces, and XSLT Recommendations. There is no reason to think
|
||||
that all tests have equal weight, hence we discourage talk of
|
||||
percentages of conformance and the like. If you have some tests
|
||||
that you would like to be included in a later edition of our
|
||||
suite, see howtosub.htm for submission instructions.</p>
|
||||
|
||||
</question-intro>
|
||||
<ul>
|
||||
|
||||
<li>What happens when there is an
|
||||
unresolved conflict between matches to xsl:strip-space and
|
||||
xsl:preserve-space elements?
|
||||
(choices: choose-last, raise-error)</li>
|
||||
|
||||
<li>What happens when there is an
|
||||
unresolved conflict between matches to xsl:template elements?
|
||||
(choices: choose-last, raise-error)</li>
|
||||
|
||||
<li>What happens when a namespace URI is
|
||||
declared to be an alias for multiple different namespace URIs and
|
||||
the declarations share the highest import precedence?
|
||||
(choices: choose-last, raise-error)</li>
|
||||
|
||||
<li>What happens when the result of
|
||||
instantiating the name attribute of the xsl:element element is not
|
||||
a QName?
|
||||
(choices: pass-through, raise-error)</li>
|
||||
|
||||
<li>What happens when the result of
|
||||
instantiating the name attribute of the xsl:attribute element is
|
||||
not a QName?
|
||||
(choices: ignore, raise-error)</li>
|
||||
|
||||
<li>What happens when an attribute is
|
||||
added to an element after children have been added to it?
|
||||
(choices: ignore, raise-error)</li>
|
||||
|
||||
<li>What happens when an attribute is
|
||||
added to a node that is not an element?
|
||||
(choices: ignore, raise-error)</li>
|
||||
|
||||
<li>What happens when nodes other than
|
||||
text nodes are created when instantiating the content of the
|
||||
xsl:attribute element?
|
||||
(choices: ignore, raise-error)</li>
|
||||
|
||||
<li>What happens when two attribute sets
|
||||
that have the same expanded name and share the highest import
|
||||
precedence both contain the same attribute?
|
||||
(choices: choose-last, raise-error)</li>
|
||||
|
||||
<li>What happens when the result of
|
||||
instantiating the name attribute of the xsl:processing-instruction
|
||||
element is not an NCName and a PITarget?
|
||||
(choices: ignore, raise-error)</li>
|
||||
|
||||
<li>What happens when nodes other than
|
||||
text nodes are created when instantiating the content of the
|
||||
xsl:processing-instruction element?
|
||||
(choices: ignore, raise-error)</li>
|
||||
|
||||
<li>What happens when the result of
|
||||
instantiating the content of the xsl:processing-instruction element
|
||||
contains the string ?>?
|
||||
(choices: add-space, raise-error)</li>
|
||||
|
||||
<li>What happens when nodes other than text nodes are created when instantiating the content of the
|
||||
xsl:comment element?
|
||||
(choices: ignore, raise-error)</li>
|
||||
|
||||
<li>What happens when the result of
|
||||
instantiating the content of the xsl:comment element contains the
|
||||
string -- or ends with -?
|
||||
(choices: add-space, raise-error)</li>
|
||||
|
||||
<li>What happens when instantiating a
|
||||
variable-binding element adds an attribute node or namespace node
|
||||
as a child of the root of the result tree fragment?
|
||||
(choices: ignore, raise-error)</li>
|
||||
|
||||
<li>What happens when a namespace is
|
||||
copied to a node that is not an element?
|
||||
(choices: ignore, raise-error)</li>
|
||||
|
||||
<li>What happens when a namespace is
|
||||
copied to an element after children have been added to it?
|
||||
(choices: ignore, raise-error)</li>
|
||||
|
||||
<li>What happens when xsl:number is given
|
||||
NaN, Infinity, or a non-positive number?
|
||||
(choices: pass-through, raise-error)</li>
|
||||
|
||||
<li>What happens when there is an error
|
||||
retreiving the resouce identified by a URI in an argument to the
|
||||
document function?
|
||||
(choices: return-empty, raise-error)</li>
|
||||
|
||||
<li>What-happens when there is an error
|
||||
processing the fragment identifier in a URI in an argument to the
|
||||
document function?
|
||||
(choices: return-empty, raise-error)</li>
|
||||
|
||||
<li>What happens when the two arguments
|
||||
to the document() function do not enable resolution of a relative
|
||||
URI reference?
|
||||
(choices: return-empty, raise-error)</li>
|
||||
|
||||
<li>What happens when there is more than
|
||||
one instantiation of the same attribute on multiple xsl:output
|
||||
elements that share the highest import precedence?
|
||||
(choices: choose-last, raise-error)</li>
|
||||
|
||||
<li>Is an error raised when the encoding
|
||||
attribute of the xsl:output element specifies an unsupported
|
||||
encoding?
|
||||
(choices: yes, no)</li>
|
||||
|
||||
<li>Is UTF-8 encoding always used when
|
||||
the encoding attribute of the xsl:output element specifies an
|
||||
unsupported encoding?
|
||||
(choices: yes, no)</li>
|
||||
|
||||
<li>Is UTF-16 encoding always used when
|
||||
the encoding attribute of the xsl:output element specifies an
|
||||
unsupported encoding?
|
||||
(choices: yes, no)</li>
|
||||
|
||||
<li>Is UTF-8 encoding used by
|
||||
default?
|
||||
(choices: yes, no)</li>
|
||||
|
||||
<li>Is UTF-16 encoding used by
|
||||
default?
|
||||
(choices: yes, no)</li>
|
||||
|
||||
<li>Does the processor support disabling
|
||||
output escaping?
|
||||
(choices: yes, no)</li>
|
||||
|
||||
<li>What happens when disabling output
|
||||
escaping of an xsl:value-of or xsl:text element is specified but
|
||||
disabling of output escaping is unsupported?
|
||||
(choices: ignore, raise-error, moot)</li>
|
||||
|
||||
<li>What happens when output escaping is
|
||||
disabled for a text node that is used for something other than a
|
||||
text node in the result tree?
|
||||
(choices: ignore, raise-error, moot)</li>
|
||||
|
||||
<li>What happens when output escaping is
|
||||
disabled for a character that is not representable in the encoding
|
||||
used for output?
|
||||
(choices: ignore, raise-error, moot)</li>
|
||||
|
||||
<li>Is the public identifier of an
|
||||
unparsed entity, when present, used to generate the URI for the
|
||||
entity instead of the URI specified in the system identifier?
|
||||
(choices: yes, no)</li>
|
||||
|
||||
<li>Is the English language supported for xsl:number?
|
||||
(choices: yes, no)</li>
|
||||
|
||||
<li>(Pattern for questions) For each language in test suite: Is _____ language supported for xsl:number?
|
||||
</li>
|
||||
|
||||
<li>(Pattern for questions) For some specific languages:
|
||||
ELABORATE: which number conversion basis is chosen?
|
||||
</li>
|
||||
|
||||
<li>Is the English language supported for xsl:sort?
|
||||
(choices: yes, no)</li>
|
||||
|
||||
<li>(Pattern for questions) For each language in test suite:
|
||||
Is _____ language supported for xsl:sort?
|
||||
</li>
|
||||
|
||||
<li>(Pattern for questions) For some specific languages:
|
||||
ELABORATE: which sorting algorithm is chosen?
|
||||
</li>
|
||||
|
||||
<li>Is it possible to pass parameters to the stylesheet?
|
||||
(choices: yes, no)
|
||||
If yes: What is the API?
|
||||
What is the command-line syntax?
|
||||
</li>
|
||||
|
||||
<li>Is the result tree able to be output as a sequence of bytes?
|
||||
(choices: yes, no)</li>
|
||||
|
||||
<li>Is the result tree always output as specified by the xsl:output element?
|
||||
(choices: yes, no, moot)
|
||||
If no: What deviations do you implement?
|
||||
</li>
|
||||
|
||||
<li>What happens when output escaping is
|
||||
disabled for a text node that is placed into a result tree fragment
|
||||
(RTF), and the RTF is later converted to a number or string?
|
||||
(choices: ignore, raise-error, moot)</li>
|
||||
|
||||
<li>Are there any non-terminating loops that can be detected?
|
||||
(choices: yes, no)
|
||||
If yes: What loops can be detected?
|
||||
</li>
|
||||
|
||||
<li>Is the prefix of the QName specified
|
||||
in the name attribute of xsl:element used as the prefix of the
|
||||
created element, when no conflicting use is in scope?
|
||||
(choices: yes, no)</li>
|
||||
|
||||
<li>Is the prefix of the QName specified
|
||||
in the name attribute of xsl:attribute used as the prefix of the
|
||||
created attribute, when no conflicting use is in scope?
|
||||
(choices: yes, no)</li>
|
||||
|
||||
<li>Is the relative document order of two
|
||||
nodes in different documents formed by taking all elements in the
|
||||
first document before any in the second, and so on?
|
||||
(choices: yes, no)
|
||||
If no: How is the ordering determined?
|
||||
</li>
|
||||
|
||||
<li>Is there a reproducible pattern for
|
||||
the string generated by the generate-id function?
|
||||
(choices: yes, no)
|
||||
If yes: What is the pattern?
|
||||
</li>
|
||||
|
||||
<li>Does the XML output ever contain
|
||||
namespace nodes that were not present in the result tree?
|
||||
(choices: yes, no)
|
||||
If yes: Under what circumstances are additional namespace nodes generated?
|
||||
</li>
|
||||
|
||||
<li>Does the html output method output a
|
||||
character using a character entity reference, if one is defined for
|
||||
it in the version of HTML that the output method is using?
|
||||
(choices: yes, no)</li>
|
||||
|
||||
<li>ELABORATE: What form of error
|
||||
recovery is performed after any errors are signaled?</li>
|
||||
|
||||
<li>Are limits imposed on processing
|
||||
resources consumed by the processing of a stylesheet?
|
||||
(choices: yes, no)
|
||||
If yes: What limits might be reached in lab testing?
|
||||
</li>
|
||||
|
||||
<li>Does the XSLT processor support any
|
||||
extra data-type for sort?
|
||||
(choices: yes, no)
|
||||
If yes: What additional data types are supported?
|
||||
</li>
|
||||
</ul>
|
||||
</body>
|
||||
</html>
|
243
test/XSLT/testsuite/DOCS/xsltcfg.htm
Normal file
243
test/XSLT/testsuite/DOCS/xsltcfg.htm
Normal file
|
@ -0,0 +1,243 @@
|
|||
|
||||
<!DOCTYPE html
|
||||
PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
||||
<!--
|
||||
Copyright (C) The Organization for the Advancement of
|
||||
Structured Information Standards [OASIS] (2001). All Rights Reserved.
|
||||
|
||||
This document and translations of it may be copied and furnished to
|
||||
others, and derivative works that comment on or otherwise explain it or
|
||||
assist in its implementation may be prepared, copied, published and
|
||||
distributed, in whole or in part, without restriction of any kind,
|
||||
provided that the above copyright notice and this paragraph are included
|
||||
on all such copies and derivative works. However, this document itself
|
||||
may not be modified in any way, such as by removing the copyright notice
|
||||
or references to OASIS, except as needed for the purpose of developing
|
||||
OASIS specifications, in which case the procedures for copyrights
|
||||
defined in the OASIS Intellectual Property Rights document must be
|
||||
followed, or as required to translate it into languages
|
||||
other than English.
|
||||
|
||||
The limited permissions granted above are perpetual and
|
||||
will not be revoked by OASIS or its successors or assigns.
|
||||
|
||||
This document and the information contained herein is provided on an
|
||||
"AS IS" basis and OASIS DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED,
|
||||
INCLUDING BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE INFORMATION
|
||||
HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED WARRANTIES OF
|
||||
MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
|
||||
-->
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||
|
||||
<title>Test regime for OASIS XSLT/XPath Conformance</title>
|
||||
</head>
|
||||
<body>
|
||||
<h1>Test regime for OASIS XSLT/XPath Conformance</h1>
|
||||
<h2>1. Introduction</h2>
|
||||
|
||||
<p>OASIS has produced a test system for XSLT processors. Since XSLT depends so heavily on XPath, it also
|
||||
serves to test XPath expressions.
|
||||
</p>
|
||||
|
||||
<p>This test suite has been developed as an instance of a test regime within the OASIS generic test framework.</p>
|
||||
|
||||
<h2>2. Status values allowed for discretionary items</h2>
|
||||
|
||||
<p>The XSLT discretionary items in the summary are grouped by their status accoding the values listed here.</p>
|
||||
|
||||
<h3>2.1 <samp><item status="Implemented"></samp></h3>
|
||||
<p>controlling test selection in the current version</p>
|
||||
<h3>2.2 <samp><item status="Active"></samp></h3>
|
||||
<p>proposed for testing in the next deliverable version</p>
|
||||
<h3>2.3 <samp><item status="Postponed"></samp></h3>
|
||||
<p>proposed to postpone</p>
|
||||
<h3>2.4 <samp><item status="Configuration"></samp></h3>
|
||||
<p>acknowledged as discretionary but considered not testable</p>
|
||||
<h3>2.5 <samp><item status="Recognized"></samp></h3>
|
||||
<p>out of scope for conformance testing</p>
|
||||
<h2>3. Test case categories</h2>
|
||||
|
||||
<p>Each XSLT test case must be categorized as to the nature of the test according to the categories listed here.</p>
|
||||
|
||||
<p>This allows users of the test cases to only address a subset of the tests by their nature.</p>
|
||||
|
||||
<h3>3.1 <samp><test-case category="XSLT-Structure"></samp></h3>
|
||||
<p>stylesheet/transform, namespaces, import, include</p>
|
||||
<h3>3.2 <samp><test-case category="XSLT-Data-Model"></samp></h3>
|
||||
<p>treatment of source XML, text + whitespace, entities</p>
|
||||
<h3>3.3 <samp><test-case category="XSLT-Template"></samp></h3>
|
||||
<p>matching, call named, priority</p>
|
||||
<h3>3.4 <samp><test-case category="XSLT-Result-Tree"></samp></h3>
|
||||
<p>creation of nodes in result</p>
|
||||
<h3>3.5 <samp><test-case category="XSLT-Data-Manipulation"></samp></h3>
|
||||
<p>sort, for-each, conditionals, variables, keys</p>
|
||||
<h3>3.6 <samp><test-case category="XSLT-Extendability"></samp></h3>
|
||||
<p>functions and instructions related to extendability</p>
|
||||
<h3>3.7 <samp><test-case category="XSLT-Output"></samp></h3>
|
||||
<p>output, message</p>
|
||||
<h3>3.8 <samp><test-case category="XPath-Location-Path"></samp></h3>
|
||||
<p>axes, node tests, predicates</p>
|
||||
<h3>3.9 <samp><test-case category="XPath-Expression"></samp></h3>
|
||||
<p>operators, type conversion</p>
|
||||
<h3>3.10 <samp><test-case category="XPath-Core-Function"></samp></h3>
|
||||
<p>all XPath functions</p>
|
||||
<h3>3.11 <samp><test-case category="XPath-Data-Model"></samp></h3>
|
||||
<p>all other XPath not covered above</p>
|
||||
<h3>3.12 <samp><test-case category="Mixed"></samp></h3>
|
||||
<p>would fit into more than one category</p>
|
||||
<h2>4. Citations into Recommendation documents</h2>
|
||||
|
||||
<p>Both the discretionary and test case documents make citations into Recommendations.</p>
|
||||
|
||||
<h3>4.1 Citation types</h3>
|
||||
<p>These are the allowed methods of citing specifications as configured for the regime.</p>
|
||||
<h4>4.1.1 <samp><spec-citation type="section"></samp></h4>
|
||||
<p>section heading in rendered Rec, must have number at start</p>
|
||||
<h4>4.1.2 <samp><spec-citation type="anchor"></samp></h4>
|
||||
<p>HTML-style anchor</p>
|
||||
<h4>4.1.3 <samp><spec-citation type="XPointer"></samp></h4>
|
||||
<p>id from document, optionally followed by XPath to qualify further</p>
|
||||
<h3>4.2 Citation specifications</h3>
|
||||
<p>These are the allowed Recommendations to be cited by the descretionary document or test cases.</p>
|
||||
<h4>4.2.1 <samp><spec-citation spec="XSLT" version="1.0" type="section"></samp></h4>
|
||||
<p>numbered chapter/section/subsection</p>
|
||||
<h4>4.2.2 <samp><spec-citation spec="XSLT" version="1.0" type="XPointer"></samp></h4>
|
||||
<p>from available id</p>
|
||||
<h4>4.2.3 <samp><spec-citation spec="XSLT" version="1.0" type="anchor"></samp></h4>
|
||||
<p>available anchors</p>
|
||||
<h4>4.2.4 <samp><spec-citation spec="XPath" version="1.0" type="section"></samp></h4>
|
||||
<p>numbered chapter/section</p>
|
||||
<h4>4.2.5 <samp><spec-citation spec="XPath" version="1.0" type="XPointer"></samp></h4>
|
||||
<p>from available id</p>
|
||||
<h4>4.2.6 <samp><spec-citation spec="XPath" version="1.0" type="anchor"></samp></h4>
|
||||
<p>available anchors</p>
|
||||
<h4>4.2.7 <samp><spec-citation spec="XML-stylesheet" version="1.0" type="section"></samp></h4>
|
||||
<p>numbered chapter</p>
|
||||
<h4>4.2.8 <samp><spec-citation spec="XML-stylesheet" version="1.0" type="XPointer"></samp></h4>
|
||||
<p>from available id</p>
|
||||
<h4>4.2.9 <samp><spec-citation spec="XML-stylesheet" version="1.0" type="anchor"></samp></h4>
|
||||
<p>available anchors</p>
|
||||
<h4>4.2.10 <samp><spec-citation spec="XSLT-Errata" version="1.0" type="section"></samp></h4>
|
||||
<p>It is assumed that multiple editions of XSLT errata are cumulative, thus later editions subsume the errata of earlier editions.
|
||||
|
||||
</p>
|
||||
<p>These are the "Known errors as of [date]" sections</p>
|
||||
<h4>4.2.11 <samp><spec-citation spec="XSLT-Errata" version="1.0" type="anchor"></samp></h4>
|
||||
<p>It is assumed that multiple editions of XSLT errata are cumulative, thus later editions subsume the errata of earlier editions.
|
||||
|
||||
</p>
|
||||
<p>Erratum are numbered, starting with E1, and matching anchors exist for each.</p>
|
||||
<h4>4.2.12 <samp><spec-citation spec="XPath-Errata" version="1.0" type="section"></samp></h4>
|
||||
<p>It is assumed that multiple editions of XPath errata are cumulative, thus later editions subsume the errata of earlier editions.
|
||||
|
||||
</p>
|
||||
<p>Has sections parallel to sections of base document.</p>
|
||||
<h4>4.2.13 <samp><spec-citation spec="XPath-Errata" version="1.0" type="anchor"></samp></h4>
|
||||
<p>It is assumed that multiple editions of XPath errata are cumulative, thus later editions subsume the errata of earlier editions.
|
||||
|
||||
</p>
|
||||
<p>Whatever anchors we can find....</p>
|
||||
<h2>5. Gray areas</h2>
|
||||
<p>Areas that are not discretionary but may be cited by a test case as being vague.</p>
|
||||
<h3>5.1 <samp><gray-area-choice name="number-max-roman-numeral"></samp></h3>
|
||||
<ul>
|
||||
<li><samp>behavior="1999"</samp></li>
|
||||
<li><samp>behavior="4999"</samp></li>
|
||||
<li><samp>behavior="9999"</samp></li>
|
||||
</ul>
|
||||
<p>The largest number that a test case may safely assume can be formatted as a Roman numeral by xsl:number.</p>
|
||||
<li>Doc: http://www.w3.org/TR/1999/REC-xslt-19991116 Section: 7.7.1</li>
|
||||
<li><a href="http://www.w3.org/TR/1999/REC-xslt-19991116.xml#xpointer(id(convert)/ulist[1]/item[5]/p[1]/text()[1])">http://www.w3.org/TR/1999/REC-xslt-19991116.xml#xpointer(id(convert)/ulist[1]/item[5]/p[1]/text()[1])</a></li>
|
||||
<h3>5.2 <samp><gray-area-choice name="number-NaN-handling"></samp></h3>
|
||||
<ul>
|
||||
<li><samp>behavior="pass-through"</samp></li>
|
||||
<li><samp>behavior="raise-error"</samp></li>
|
||||
</ul>
|
||||
<p>The erratum turned this into a discretionary item: It is an error if the number is NaN, infinite or less than 0.5; an XSLT
|
||||
processor may signal the error; if it does not signal the error, it must
|
||||
recover by converting the number to a string as if by a call to the string function and inserting the resulting string
|
||||
into the result tree.
|
||||
</p>
|
||||
<h3>5.3 <samp><gray-area-choice name="number-any-no-nodes"></samp></h3>
|
||||
<ul>
|
||||
<li><samp>behavior="return-empty"</samp></li>
|
||||
<li><samp>behavior="raise-error"</samp></li>
|
||||
</ul>
|
||||
<p>Prior to the erratum, there was no specification for how xsl:number level="any" should deal with an empty node-set.</p>
|
||||
|
||||
<p>The erratum made this similar to level="single" by saying: If there are no matching nodes, it constructs an empty list.</p>
|
||||
|
||||
<p>If the test makes this empty-list choice, it may also be marked for an errata-add of 2000-12-12 on XSLT Version 1.0.</p>
|
||||
<h2>6. Scenarios</h2>
|
||||
|
||||
<p>Both the discretionary and test case documents make citations into Recommendations.</p>
|
||||
|
||||
<h3>6.1 Operations</h3>
|
||||
<h4>6.1.1 <samp><scenario operation="standard"></samp></h4>
|
||||
<p>2 principal inputs, one principal output</p>
|
||||
|
||||
<p>specify both a principal-data and principal-stylesheet type of input-file</p>
|
||||
<h4>6.1.2 <samp><scenario operation="embedded"></samp></h4>
|
||||
<p>input is XML data with embedded styling (principal-data only)</p>
|
||||
<h4>6.1.3 <samp><scenario operation="external-param"></samp></h4>
|
||||
<p>like standard but also has parameters passed in</p>
|
||||
<h4>6.1.4 <samp><scenario operation="execution-error"></samp></h4>
|
||||
<p>2 principal inputs, but NOT expected to generate output</p>
|
||||
<h4>6.1.5 <samp><scenario operation="result-analysis"></samp></h4>
|
||||
<p>like standard but something interactive happens</p>
|
||||
|
||||
<p>Use this classification when human examination of console or output is needed.</p>
|
||||
<h3>6.2 Roles for input and output files</h3>
|
||||
|
||||
<p>Principal files must be name only (with filetype extension/tag included), not a path.</p>
|
||||
|
||||
<p>Supplemental files may have relative paths with / separators</p>
|
||||
|
||||
<p>Constraint: names for output-files, both principal and supplemental, must be designed so that all test cases sharing a submitter/file-path
|
||||
directory may be run in one batch with no naming conflicts.
|
||||
</p>
|
||||
|
||||
<h4>6.2.1 <samp><input-file/output-file role="principal-data"></samp></h4>
|
||||
<p>the XML data to be processed, generally called the "source tree" in the Recommendation, specified as an argument when invoking
|
||||
the XSLT processor
|
||||
</p>
|
||||
<h4>6.2.2 <samp><input-file/output-file role="principal-stylesheet"></samp></h4>
|
||||
<p>the stylesheet to be specified as an argument when invoking the XSLT processor</p>
|
||||
<h4>6.2.3 <samp><input-file/output-file role="principal"></samp></h4>
|
||||
<p>for output only: transformation result named at invocation</p>
|
||||
<h4>6.2.4 <samp><input-file/output-file role="supplemental-data"></samp></h4>
|
||||
<p>for input only: extra file read by document() or similar</p>
|
||||
<h4>6.2.5 <samp><input-file/output-file role="supplemental-stylesheet"></samp></h4>
|
||||
<p>for input only: extra stylesheet read by xsl:import or similar</p>
|
||||
<h4>6.2.6 <samp><input-file/output-file role="supplemental-params"></samp></h4>
|
||||
<p>for input only: file specifying how to set external parameters</p>
|
||||
<h4>6.2.7 <samp><input-file/output-file role="supplemental"></samp></h4>
|
||||
<p>for output only: extra file from console log, xsl:document, etc.</p>
|
||||
<h3>6.3 Comparison types for output files</h3>
|
||||
<p>Most output files can be compared mechanically, but the 'manual' is provided when this is not possible.</p>
|
||||
<h4>6.3.1 <samp><output-file compare="XML"></samp></h4>
|
||||
<p>XML in a file</p>
|
||||
<h4>6.3.2 <samp><output-file compare="HTML"></samp></h4>
|
||||
<p>HTML in a file</p>
|
||||
<h4>6.3.3 <samp><output-file compare="Text"></samp></h4>
|
||||
<p>text in a file</p>
|
||||
<h4>6.3.4 <samp><output-file compare="manual"></samp></h4>
|
||||
<p>the output cannot be automatically verified</p>
|
||||
|
||||
<p>Use this for generate-id when a human must verify that the generated id meets constraints, and for all the vendor-specific
|
||||
strings returned by system-property.
|
||||
</p>
|
||||
|
||||
<h4>6.3.5 <samp><output-file compare="ignore"></samp></h4>
|
||||
<p>the output should not have been generated</p>
|
||||
<h3>6.4 Parameter types during invocation</h3>
|
||||
<p>Not all XSLT processors support all data types for parameters</p>
|
||||
<h4>6.4.1 <samp><param-set type="string"></samp></h4>
|
||||
<p>XPath string data type</p>
|
||||
<h4>6.4.2 <samp><param-set type="number"></samp></h4>
|
||||
<p>XPath number data type</p>
|
||||
<h4>6.4.3 <samp><param-set type="boolean"></samp></h4>
|
||||
<p>XPath boolean data type</p><small><strong>$Date: 2005/04/06 20:55:17 $(UTC)</strong></small></body>
|
||||
</html>
|
325
test/XSLT/testsuite/DOCS/xsltcfg.xml
Normal file
325
test/XSLT/testsuite/DOCS/xsltcfg.xml
Normal file
|
@ -0,0 +1,325 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!DOCTYPE suite SYSTEM "background/config.dtd">
|
||||
<!--
|
||||
Copyright (C) The Organization for the Advancement of
|
||||
Structured Information Standards [OASIS] (2001). All Rights
|
||||
Reserved.
|
||||
|
||||
This document and translations of it may be copied and
|
||||
furnished to others, and derivative works that comment on
|
||||
or otherwise explain it or assist in its implementation may
|
||||
be prepared, copied, published and distributed, in whole
|
||||
or in part, without restriction of any kind, provided that the
|
||||
above copyright notice and this paragraph are included on
|
||||
all such copies and derivative works. However, this
|
||||
document itself may not be modified in any way, such as by
|
||||
removing the copyright notice or references to OASIS,
|
||||
except as needed for the purpose of developing OASIS
|
||||
specifications, in which case the procedures for copyrights
|
||||
defined in the OASIS Intellectual Property Rights document
|
||||
must be followed, or as required to translate it into
|
||||
languages other than English.
|
||||
|
||||
The limited permissions granted above are perpetual and
|
||||
will not be revoked by OASIS or its successors or assigns.
|
||||
|
||||
This document and the information contained herein is
|
||||
provided on an "AS IS" basis and OASIS DISCLAIMS ALL
|
||||
WARRANTIES, EXPRESS OR IMPLIED, INCLUDING
|
||||
BUT NOT LIMITED TO ANY WARRANTY THAT THE USE
|
||||
OF THE INFORMATION HEREIN WILL NOT INFRINGE
|
||||
ANY RIGHTS OR ANY IMPLIED WARRANTIES OF
|
||||
MERCHANTABILITY OR FITNESS FOR A PARTICULAR
|
||||
PURPOSE.
|
||||
-->
|
||||
<suite date="$Date: 2001/12/07 18:39:49 $(UTC)" resource-types="fully-provided">
|
||||
<info>
|
||||
<committee>OASIS XSLT/XPath Conformance</committee>
|
||||
<desc>
|
||||
<p>OASIS has produced a test system for XSLT processors. Since XSLT depends so heavily on XPath, it also
|
||||
serves to test XPath expressions.</p>
|
||||
<p>This test suite has been developed as an instance of a test regime within the OASIS generic test framework.</p>
|
||||
</desc>
|
||||
</info>
|
||||
<discretion-statuses>
|
||||
<desc>
|
||||
<p>The XSLT discretionary items in the summary are grouped by their status accoding the values listed here.</p>
|
||||
</desc>
|
||||
<discretion-status id="Implemented">
|
||||
<p>controlling test selection in the current version</p>
|
||||
</discretion-status>
|
||||
<discretion-status id="Active">
|
||||
<p>proposed for testing in the next deliverable version</p>
|
||||
</discretion-status>
|
||||
<discretion-status id="Postponed">
|
||||
<p>proposed to postpone</p>
|
||||
</discretion-status>
|
||||
<discretion-status id="Configuration">
|
||||
<p>acknowledged as discretionary but considered not testable</p>
|
||||
</discretion-status>
|
||||
<discretion-status id="Recognized">
|
||||
<p>out of scope for conformance testing</p>
|
||||
</discretion-status>
|
||||
</discretion-statuses>
|
||||
<categories>
|
||||
<desc>
|
||||
<p>Each XSLT test case must be categorized as to the nature of the test according to the categories listed here.</p>
|
||||
<p>This allows users of the test cases to only address a subset of the tests by their nature.</p>
|
||||
</desc>
|
||||
<category id="XSLT-Structure">
|
||||
<p>stylesheet/transform, namespaces, import, include</p>
|
||||
</category>
|
||||
<category id="XSLT-Data-Model">
|
||||
<p>treatment of source XML, text + whitespace, entities</p>
|
||||
</category>
|
||||
<category id="XSLT-Template">
|
||||
<p>matching, call named, priority</p>
|
||||
</category>
|
||||
<category id="XSLT-Result-Tree">
|
||||
<p>creation of nodes in result</p>
|
||||
</category>
|
||||
<category id="XSLT-Data-Manipulation">
|
||||
<p>sort, for-each, conditionals, variables, keys</p>
|
||||
</category>
|
||||
<category id="XSLT-Extendability">
|
||||
<p>functions and instructions related to extendability</p>
|
||||
</category>
|
||||
<category id="XSLT-Output">
|
||||
<p>output, message</p>
|
||||
</category>
|
||||
<category id="XPath-Location-Path">
|
||||
<p>axes, node tests, predicates</p>
|
||||
</category>
|
||||
<category id="XPath-Expression">
|
||||
<p>operators, type conversion</p>
|
||||
</category>
|
||||
<category id="XPath-Core-Function">
|
||||
<p>all XPath functions</p>
|
||||
</category>
|
||||
<category id="XPath-Data-Model">
|
||||
<p>all other XPath not covered above</p>
|
||||
</category>
|
||||
<category id="Mixed">
|
||||
<p>would fit into more than one category</p>
|
||||
</category>
|
||||
</categories>
|
||||
<citations>
|
||||
<desc>
|
||||
<p>Both the discretionary and test case documents make citations into Recommendations.</p>
|
||||
</desc>
|
||||
<citation-types>
|
||||
<desc>
|
||||
<p>These are the allowed methods of citing specifications as configured for the regime.</p>
|
||||
</desc>
|
||||
<cite-type id="section" method="human">
|
||||
<p>section heading in rendered Rec, must have number at start</p>
|
||||
</cite-type>
|
||||
<cite-type id="anchor" method="machine">
|
||||
<p>HTML-style anchor</p>
|
||||
</cite-type>
|
||||
<cite-type id="XPointer" method="machine">
|
||||
<p>id from document, optionally followed by XPath to qualify further</p>
|
||||
</cite-type>
|
||||
</citation-types>
|
||||
<citation-specifications>
|
||||
<desc>
|
||||
<p>These are the allowed Recommendations to be cited by the descretionary document or test cases.</p>
|
||||
</desc>
|
||||
<cite-spec id="XSLT">
|
||||
<version-spec version="1.0">
|
||||
<spec type="section" prefix="Doc: " ref="http://www.w3.org/TR/1999/REC-xslt-19991116" infix=" Section: " ref-linkable="no">
|
||||
<p>numbered chapter/section/subsection</p>
|
||||
</spec>
|
||||
<spec type="XPointer" ref="http://www.w3.org/TR/1999/REC-xslt-19991116.xml" infix="#xpointer(" suffix=")" ref-linkable="yes">
|
||||
<p>from available id</p>
|
||||
</spec>
|
||||
<spec type="anchor" ref="http://www.w3.org/TR/1999/REC-xslt-19991116" infix="#" ref-linkable="yes">
|
||||
<p>available anchors</p>
|
||||
</spec>
|
||||
</version-spec>
|
||||
</cite-spec>
|
||||
<cite-spec id="XPath">
|
||||
<version-spec version="1.0">
|
||||
<spec type="section" prefix="Doc: " ref="http://www.w3.org/TR/1999/REC-xpath-19991116" infix=" Section: " ref-linkable="no">
|
||||
<p>numbered chapter/section</p>
|
||||
</spec>
|
||||
<spec type="XPointer" ref="http://www.w3.org/TR/1999/REC-xpath-19991116.xml" infix="#xpointer(" suffix=")" ref-linkable="yes">
|
||||
<p>from available id</p>
|
||||
</spec>
|
||||
<spec type="anchor" ref="http://www.w3.org/TR/1999/REC-xpath-19991116" infix="#" ref-linkable="yes">
|
||||
<p>available anchors</p>
|
||||
</spec>
|
||||
</version-spec>
|
||||
</cite-spec>
|
||||
<cite-spec id="XML-stylesheet">
|
||||
<version-spec version="1.0">
|
||||
<spec type="section" prefix="Doc: " ref="http://www.w3.org/TR/xml-stylesheet" infix=" Section: " ref-linkable="no">
|
||||
<p>numbered chapter</p>
|
||||
</spec>
|
||||
<spec type="XPointer" ref="http://www.w3.org/TR/xml-stylesheet.xml" infix="#xpointer(" suffix=")" ref-linkable="yes">
|
||||
<p>from available id</p>
|
||||
</spec>
|
||||
<spec type="anchor" ref="http://www.w3.org/TR/xml-stylesheet" infix="#" ref-linkable="yes">
|
||||
<p>available anchors</p>
|
||||
</spec>
|
||||
</version-spec>
|
||||
</cite-spec>
|
||||
<cite-spec id="XSLT-Errata">
|
||||
<desc>
|
||||
<p>It is assumed that multiple editions of XSLT errata are cumulative, thus later editions subsume the errata of earlier editions. </p>
|
||||
</desc>
|
||||
<version-spec version="2000-12-12">
|
||||
<spec type="section" prefix="Doc: " ref="http://www.w3.org/1999/11/REC-xslt-19991116-errata" infix=" Section: " ref-linkable="no">
|
||||
<p>These are the "Known errors as of [date]" sections</p>
|
||||
</spec>
|
||||
<spec type="anchor" ref="http://www.w3.org/1999/11/REC-xslt-19991116-errata" infix="#" ref-linkable="yes">
|
||||
<p>Erratum are numbered, starting with E1, and matching anchors exist for each.</p>
|
||||
</spec>
|
||||
</version-spec>
|
||||
</cite-spec>
|
||||
<cite-spec id="XPath-Errata">
|
||||
<desc>
|
||||
<p>It is assumed that multiple editions of XPath errata are cumulative, thus later editions subsume the errata of earlier editions. </p>
|
||||
</desc>
|
||||
<version-spec version="2000-12-12">
|
||||
<!-- PROBLEM: there can be multiple editions. Assume they're cumulative? -->
|
||||
<spec type="section" prefix="Doc: " ref="http://www.w3.org/1999/11/REC-xpath-19991116-errata" infix=" Section: " ref-linkable="no">
|
||||
<p>Has sections parallel to sections of base document.</p>
|
||||
</spec>
|
||||
<spec type="anchor" ref="http://www.w3.org/1999/11/REC-xslt-19991116-errata" infix="#" ref-linkable="yes">
|
||||
<p>Whatever anchors we can find....</p>
|
||||
</spec>
|
||||
</version-spec>
|
||||
</cite-spec>
|
||||
</citation-specifications>
|
||||
</citations>
|
||||
<gray-areas>
|
||||
<desc>
|
||||
<p>Areas that are not discretionary but may be cited by a test case as being vague.</p>
|
||||
</desc>
|
||||
<gray-area id="number-max-roman-numeral">
|
||||
<spec-citation spec="XSLT" version="1.0" type="section" place="7.7.1"/>
|
||||
<spec-citation spec="XSLT" version="1.0" type="XPointer" place="id(convert)/ulist[1]/item[5]/p[1]/text()[1]"/>
|
||||
<choices>
|
||||
<choice value="1999"/>
|
||||
<choice value="4999"/>
|
||||
<choice value="9999"/>
|
||||
</choices>
|
||||
<desc>
|
||||
<p>The largest number that a test case may safely assume can be formatted as a Roman numeral by xsl:number.</p>
|
||||
</desc>
|
||||
</gray-area>
|
||||
<gray-area id="number-NaN-handling">
|
||||
<spec-citation spec="XSLT-Errata" version="2000-12-12" type="section" place="E24"/>
|
||||
<spec-citation spec="XSLT-Errata" version="2000-12-12" type="anchor" place="E24"/>
|
||||
<choices>
|
||||
<choice value="pass-through"/>
|
||||
<choice value="raise-error"/>
|
||||
</choices>
|
||||
<desc>
|
||||
<p>The erratum turned this into a discretionary item: It is an error if the number is NaN, infinite or less than 0.5; an XSLT processor may signal the error; if it does not signal the error, it must
|
||||
recover by converting the number to a string as if by a call to the string function and inserting the resulting string into the result tree.</p>
|
||||
</desc>
|
||||
</gray-area>
|
||||
<gray-area id="number-any-no-nodes">
|
||||
<spec-citation spec="XSLT-Errata" version="2000-12-12" type="section" place="E23"/>
|
||||
<spec-citation spec="XSLT-Errata" version="2000-12-12" type="anchor" place="E23"/>
|
||||
<choices>
|
||||
<choice value="return-empty"/>
|
||||
<choice value="raise-error"/>
|
||||
</choices>
|
||||
<desc>
|
||||
<p>Prior to the erratum, there was no specification for how xsl:number level="any" should deal with an empty node-set.</p>
|
||||
<p>The erratum made this similar to level="single" by saying: If there are no matching nodes, it constructs an empty list.</p>
|
||||
<p>If the test makes this empty-list choice, it may also be marked for an errata-add of 2000-12-12 on XSLT Version 1.0.</p>
|
||||
</desc>
|
||||
</gray-area>
|
||||
</gray-areas>
|
||||
<scenarios>
|
||||
<desc>
|
||||
<p>The scenarios describe the testing methodologies (operations) possibile for a single test. Every test must point to one of the operations described.</p>
|
||||
</desc>
|
||||
<operations>
|
||||
<operation id="standard">
|
||||
<p>2 principal inputs, one principal output</p>
|
||||
<p>specify both a principal-data and principal-stylesheet type of input-file</p>
|
||||
</operation>
|
||||
<operation id="embedded">
|
||||
<p>input is XML data with embedded styling (principal-data only)</p>
|
||||
</operation>
|
||||
<operation id="external-param">
|
||||
<p>like standard but also has parameters passed in</p>
|
||||
</operation>
|
||||
<operation id="execution-error">
|
||||
<p>2 principal inputs, but NOT expected to generate output</p>
|
||||
</operation>
|
||||
<operation id="result-analysis">
|
||||
<p>like standard but something interactive happens</p>
|
||||
<p>Use this classification when human examination of console or output is needed.</p>
|
||||
</operation>
|
||||
</operations>
|
||||
<roles>
|
||||
<desc>
|
||||
<p>Principal files must be name only (with filetype extension/tag included), not a path.</p>
|
||||
<p>Supplemental files may have relative paths with / separators</p>
|
||||
<p>Constraint: names for output-files, both principal and supplemental, must be designed so that all test cases sharing a submitter/file-path directory may be run in one batch with no naming conflicts.</p>
|
||||
</desc>
|
||||
<role id="principal-data">
|
||||
<p>the XML data to be processed, generally called the "source tree" in the Recommendation, specified as an argument when invoking the XSLT processor</p>
|
||||
</role>
|
||||
<role id="principal-stylesheet">
|
||||
<p>the stylesheet to be specified as an argument when invoking the XSLT processor</p>
|
||||
</role>
|
||||
<role id="principal" required="output-file">
|
||||
<p>for output only: transformation result named at invocation</p>
|
||||
</role>
|
||||
<role id="supplemental-data">
|
||||
<p>for input only: extra file read by document() or similar</p>
|
||||
</role>
|
||||
<role id="supplemental-stylesheet">
|
||||
<p>for input only: extra stylesheet read by xsl:import or similar</p>
|
||||
</role>
|
||||
<role id="supplemental-params">
|
||||
<p>for input only: file specifying how to set external parameters</p>
|
||||
</role>
|
||||
<role id="supplemental">
|
||||
<p>for output only: extra file from console log, xsl:document, etc.</p>
|
||||
</role>
|
||||
</roles>
|
||||
<comparisons>
|
||||
<desc>
|
||||
<p>Most output files can be compared mechanically, but the 'manual' is provided when this is not possible.</p>
|
||||
</desc>
|
||||
<comparison id="XML">
|
||||
<p>XML in a file</p>
|
||||
</comparison>
|
||||
<comparison id="HTML">
|
||||
<p>HTML in a file</p>
|
||||
</comparison>
|
||||
<comparison id="Text">
|
||||
<p>text in a file</p>
|
||||
</comparison>
|
||||
<comparison id="manual">
|
||||
<p>the output cannot be automatically verified</p>
|
||||
<p>Use this for generate-id when a human must verify that the generated id meets constraints, and for all the vendor-specific strings returned by system-property.</p>
|
||||
</comparison>
|
||||
<comparison id="ignore">
|
||||
<p>the output should not have been generated</p>
|
||||
</comparison>
|
||||
</comparisons>
|
||||
<parameter-types>
|
||||
<desc>
|
||||
<p>Not all XSLT processors support all data types for parameters</p>
|
||||
</desc>
|
||||
<parameter-type id="string">
|
||||
<p>XPath string data type</p>
|
||||
</parameter-type>
|
||||
<parameter-type id="number">
|
||||
<p>XPath number data type</p>
|
||||
</parameter-type>
|
||||
<parameter-type id="boolean">
|
||||
<p>XPath boolean data type</p>
|
||||
</parameter-type>
|
||||
</parameter-types>
|
||||
</scenarios>
|
||||
</suite>
|
1767
test/XSLT/testsuite/DOCS/xsltdisc.htm
Normal file
1767
test/XSLT/testsuite/DOCS/xsltdisc.htm
Normal file
File diff suppressed because it is too large
Load diff
2070
test/XSLT/testsuite/TESTS/MSFT_Conformance_Tests/AVTs/64K.xml
Normal file
2070
test/XSLT/testsuite/TESTS/MSFT_Conformance_Tests/AVTs/64K.xml
Normal file
File diff suppressed because it is too large
Load diff
|
@ -0,0 +1,9 @@
|
|||
<?xml version='1.0'?>
|
||||
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"><xsl:output method="xml" omit-xml-declaration="yes" indent="yes"/>
|
||||
<xsl:template match="/">
|
||||
<xsl:for-each select="//book">
|
||||
<xsl:element name="{@foobar}"><xsl:value-of select="."/>
|
||||
</xsl:element>
|
||||
</xsl:for-each>
|
||||
</xsl:template>
|
||||
</xsl:stylesheet>
|
214
test/XSLT/testsuite/TESTS/MSFT_Conformance_Tests/AVTs/AVTs.xml
Normal file
214
test/XSLT/testsuite/TESTS/MSFT_Conformance_Tests/AVTs/AVTs.xml
Normal file
|
@ -0,0 +1,214 @@
|
|||
<!--XSLT 1.0 Tests-->
|
||||
<!--Copyright 2002 Microsoft Corporation. All Rights Reserved.-->
|
||||
<testcase name="AVTs" description="" outpath="out">
|
||||
<variation name="_77531">
|
||||
<description>XSLT17000: xsl: attribute value Template, Base Spec Case - every place an Attribute Value Template is allowed</description>
|
||||
<data>
|
||||
<xml>books.xml</xml>
|
||||
<xsl>XSLT17000.xsl</xsl>
|
||||
</data>
|
||||
<result expected="valid">77531.txt</result>
|
||||
</variation>
|
||||
<variation name="_77536">
|
||||
<description>XSLT17001: xsl : attribute value Template : Expr includes Variable and Expr (Case in xslt spec)</description>
|
||||
<data>
|
||||
<xml>XSLT17001.xml</xml>
|
||||
<xsl>XSLT17001.xsl</xsl>
|
||||
</data>
|
||||
<result expected="valid">77536.txt</result>
|
||||
</variation>
|
||||
<variation name="_77558">
|
||||
<description>XSLT17002: xsl : attribute value Template, test attribute as attribute Value Template {@size}</description>
|
||||
<data>
|
||||
<xml>books.xml</xml>
|
||||
<xsl>XSLT17002.xsl</xsl>
|
||||
</data>
|
||||
<result expected="valid">77558.txt</result>
|
||||
</variation>
|
||||
<variation name="_77562">
|
||||
<description>XSLT bug: xsl : attribute value Template, xsl:element with name="" should be error {@foobar} (Reg bug#88996)</description>
|
||||
<data>
|
||||
<xml>books.xml</xml>
|
||||
<xsl>77562.xsl</xsl>
|
||||
</data>
|
||||
<result expected="invalid">
|
||||
</result>
|
||||
</variation>
|
||||
<variation name="_77564">
|
||||
<description>XSLT17003: xsl : attribute value Template, add type number result to type boolean inside expression (Reg #42626)</description>
|
||||
<data>
|
||||
<xml>books.xml</xml>
|
||||
<xsl>XSLT17003.xsl</xsl>
|
||||
</data>
|
||||
<result expected="valid">77564.txt</result>
|
||||
</variation>
|
||||
<variation name="_77570">
|
||||
<description>XSLT17004: Attribute Value Template: concatenate expressions: foo bar=#{@ref}+#{@ref}</description>
|
||||
<data>
|
||||
<xml>books.xml</xml>
|
||||
<xsl>XSLT17004.xsl</xsl>
|
||||
</data>
|
||||
<result expected="valid">77570_output.txt</result>
|
||||
</variation>
|
||||
<variation name="_77571">
|
||||
<description>XSLT17005: Attribute Value Template: XML text contains {}/"@$</description>
|
||||
<data>
|
||||
<xml>XSLT17005.xml</xml>
|
||||
<xsl>XSLT17005.xsl</xsl>
|
||||
</data>
|
||||
<result expected="valid">77571.txt</result>
|
||||
</variation>
|
||||
<variation name="_77574">
|
||||
<description>XSLT17007: Attribute Value Template: result of type XML object should convert to string ( string of document node = text of document Element) (REG #42622)</description>
|
||||
<data>
|
||||
<xml>books.xml</xml>
|
||||
<xsl>XSLT17007.xsl</xsl>
|
||||
</data>
|
||||
<result expected="valid">77574.txt</result>
|
||||
</variation>
|
||||
<variation name="_77575">
|
||||
<description>XSLT17008: Attribute Value Template: result of type node should convert to string</description>
|
||||
<data>
|
||||
<xml>books.xml</xml>
|
||||
<xsl>XSLT17008.xsl</xsl>
|
||||
</data>
|
||||
<result expected="valid">77575_output.txt</result>
|
||||
</variation>
|
||||
<variation name="_77576">
|
||||
<description>XSLT17009: Attribute Value Template: add number results in expression before converting to string</description>
|
||||
<data>
|
||||
<xml>XSLT17009.xml</xml>
|
||||
<xsl>XSLT17009.xsl</xsl>
|
||||
</data>
|
||||
<result expected="valid">77576.txt</result>
|
||||
</variation>
|
||||
<variation name="_77577">
|
||||
<description>XSLT17010: Attribute Value Template: <span name="#{{@name + {./text()}"/></description>
|
||||
<data>
|
||||
<xml>XSLT17010.xml</xml>
|
||||
<xsl>XSLT17010.xsl</xsl>
|
||||
</data>
|
||||
<result expected="valid">77577.txt</result>
|
||||
</variation>
|
||||
<variation name="_77579">
|
||||
<description>XSLT17011: Attribute Value Template: <a href="{{{(@name)}"/> - extraneous } at beginning - will be replaced by one {</description>
|
||||
<data>
|
||||
<xml>XSLT17010.xml</xml>
|
||||
<xsl>XSLT17011.xsl</xsl>
|
||||
</data>
|
||||
<result expected="valid">77579.txt</result>
|
||||
</variation>
|
||||
<variation name="_77580">
|
||||
<description>XSLT17012: Attribute Value Template: <a href="{(@name)}}}"/> - extraneous } at end - will be replaced by one }</description>
|
||||
<data>
|
||||
<xml>XSLT17010.xml</xml>
|
||||
<xsl>XSLT17012.xsl</xsl>
|
||||
</data>
|
||||
<result expected="valid">77580.txt</result>
|
||||
</variation>
|
||||
<variation name="_77582">
|
||||
<description>XSLT17014: Attribute Value Template: right curly brace in literal result expression (should not prematurely brake)</description>
|
||||
<data>
|
||||
<xml>XSLT17014.xml</xml>
|
||||
<xsl>XSLT17014.xsl</xsl>
|
||||
</data>
|
||||
<result expected="valid">77582.txt</result>
|
||||
</variation>
|
||||
<variation name="_77588">
|
||||
<description>XSLT17015: Attribute Value Template: {exp} - ERROR? Or recursive resolution of {{</description>
|
||||
<data>
|
||||
<xml>XSLT17014.xml</xml>
|
||||
<xsl>XSLT17015.xsl</xsl>
|
||||
</data>
|
||||
<result expected="invalid">
|
||||
</result>
|
||||
</variation>
|
||||
<variation name="_77589">
|
||||
<description>XSLT17016: Attribute Value Template: {{exp} - ERROR? Or recursive resolution of {{</description>
|
||||
<data>
|
||||
<xml>XSLT17014.xml</xml>
|
||||
<xsl>XSLT17016.xsl</xsl>
|
||||
</data>
|
||||
<result expected="invalid">
|
||||
</result>
|
||||
</variation>
|
||||
<variation name="_77591">
|
||||
<description>XSLT17017: Attribute Value Template: buffer case. (64k.xml as string into { string } )</description>
|
||||
<data>
|
||||
<xml>64K.xml</xml>
|
||||
<xsl>XSLT17017.xsl</xsl>
|
||||
</data>
|
||||
<result expected="valid">77591_output.txt</result>
|
||||
</variation>
|
||||
<variation name="_77592">
|
||||
<description>XSLT17100: Attribute Value Template: {} (is not an error case {} = return nothing. ) (Reg for bug #42630)</description>
|
||||
<data>
|
||||
<xml>books.xml</xml>
|
||||
<xsl>XSLT17100.xsl</xsl>
|
||||
</data>
|
||||
<result expected="invalid">
|
||||
</result>
|
||||
</variation>
|
||||
<variation name="_77593">
|
||||
<description>XSLT17101: Attribute Value Template: <xsl:template match="{@ref}"/> (error case)</description>
|
||||
<data>
|
||||
<xml>books.xml</xml>
|
||||
<xsl>XSLT17101.xsl</xsl>
|
||||
</data>
|
||||
<result expected="invalid">
|
||||
</result>
|
||||
</variation>
|
||||
<variation name="_77594">
|
||||
<description>XSLT17102: Attribute Value Template: <xsl:variable name="x" select="{@ref}"/> (error case)</description>
|
||||
<data>
|
||||
<xml>books.xml</xml>
|
||||
<xsl>XSLT17102.xsl</xsl>
|
||||
</data>
|
||||
<result expected="invalid">
|
||||
</result>
|
||||
</variation>
|
||||
<variation name="_77595">
|
||||
<description>XSLT17103: Attribute Value Template: <a href="(id(@ref)/title}"> - missing { at beginning (error case)</description>
|
||||
<data>
|
||||
<xml>books.xml</xml>
|
||||
<xsl>XSLT17103.xsl</xsl>
|
||||
</data>
|
||||
<result expected="invalid">
|
||||
</result>
|
||||
</variation>
|
||||
<variation name="_77596">
|
||||
<description>XSLT17104: Attribute Value Template: <a href="{id(@ref)/title"> - missing } at end (error case)</description>
|
||||
<data>
|
||||
<xml>books.xml</xml>
|
||||
<xsl>XSLT17104.xsl</xsl>
|
||||
</data>
|
||||
<result expected="invalid">
|
||||
</result>
|
||||
</variation>
|
||||
<variation name="_77597">
|
||||
<description>XSLT17105: Attribute Value Template: <xsl:variable name="{@ref}"/> (error case)</description>
|
||||
<data>
|
||||
<xml>books.xml</xml>
|
||||
<xsl>XSLT17105.xsl</xsl>
|
||||
</data>
|
||||
<result expected="invalid">
|
||||
</result>
|
||||
</variation>
|
||||
<variation name="_77598">
|
||||
<description>XSLT17106: Attribute Value Template: attribute of a top level element [attributes of top-level elements (child of xsl:stylesheet node) are not interpreted as attribute value templates, they are ignored ] (error case)</description>
|
||||
<data>
|
||||
<xml>XSLT17106.xml</xml>
|
||||
<xsl>XSLT17106.xsl</xsl>
|
||||
</data>
|
||||
<result expected="invalid">
|
||||
</result>
|
||||
</variation>
|
||||
<variation name="_77599">
|
||||
<description>XSLT17107: Attribute Value Template: xmlns attributes [ are not interpreted as attribute value templates ] (error case)</description>
|
||||
<data>
|
||||
<xml>books.xml</xml>
|
||||
<xsl>XSLT17107.xsl</xsl>
|
||||
</data>
|
||||
<result expected="valid">77599.txt</result>
|
||||
</variation>
|
||||
</testcase>
|
|
@ -0,0 +1,11 @@
|
|||
<?xml version='1.0'?>
|
||||
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"><xsl:output method="xml" omit-xml-declaration="yes" indent="yes"/>
|
||||
<xsl:template match="/">
|
||||
|
||||
<xsl:for-each select="bookstore/magazine">
|
||||
<xsl:value-of select="./title"/>
|
||||
<xslTITLE name="{title}"></xslTITLE>
|
||||
</xsl:for-each>
|
||||
|
||||
</xsl:template>
|
||||
</xsl:stylesheet>
|
|
@ -0,0 +1,4 @@
|
|||
<photograph>
|
||||
<href>headquarters.jpg</href>
|
||||
<size width="300"/>
|
||||
</photograph>
|
|
@ -0,0 +1,7 @@
|
|||
<?xml version='1.0'?>
|
||||
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"><xsl:output method="xml" omit-xml-declaration="yes" indent="yes"/>
|
||||
<xsl:variable name="image-dir">/images</xsl:variable>
|
||||
<xsl:template match="photograph">
|
||||
<img src="{$image-dir}/{href}" width="{size/@width}"/>
|
||||
</xsl:template>
|
||||
</xsl:stylesheet>
|
|
@ -0,0 +1,9 @@
|
|||
<?xml version='1.0'?>
|
||||
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"><xsl:output method="xml" omit-xml-declaration="yes" indent="yes"/>
|
||||
<xsl:template match="/">
|
||||
<xsl:for-each select="//book">
|
||||
<xsl:element name="{@style}"><xsl:value-of select="."/>
|
||||
</xsl:element>
|
||||
</xsl:for-each>
|
||||
</xsl:template>
|
||||
</xsl:stylesheet>
|
|
@ -0,0 +1,9 @@
|
|||
<?xml version='1.0'?>
|
||||
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"><xsl:output method="xml" omit-xml-declaration="yes" indent="yes"/>
|
||||
<xsl:template match="/">
|
||||
<xsl:for-each select="//book">
|
||||
<author firstName="{.//first-name[text()='Mary']}" lastName="{.//last-name='Bob'}"><xsl:value-of select=".//publication"/>
|
||||
</author>
|
||||
</xsl:for-each>
|
||||
</xsl:template>
|
||||
</xsl:stylesheet>
|
|
@ -0,0 +1,8 @@
|
|||
<?xml version='1.0'?>
|
||||
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
|
||||
<xsl:template match="/">
|
||||
<xsl:for-each select="//book">
|
||||
<foo bar="{title}, written by: {.//first-name[text()]}{.//last-name}, style:{./@style}"></foo>
|
||||
</xsl:for-each>
|
||||
</xsl:template>
|
||||
</xsl:stylesheet>
|
|
@ -0,0 +1,4 @@
|
|||
<?xml version="1.0"?>
|
||||
<xslTutorial>
|
||||
<text size="@H1">@<>$$/"'{}[[{{{}}}</text>
|
||||
</xslTutorial>
|
|
@ -0,0 +1,9 @@
|
|||
<?xml version='1.0'?>
|
||||
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
|
||||
<xsl:output method="xml" omit-xml-declaration="yes"/>
|
||||
<xsl:template match="/">
|
||||
<xsl:for-each select="//text">
|
||||
<foo bar="{@size}{./* | ./text()}"></foo>
|
||||
</xsl:for-each>
|
||||
</xsl:template>
|
||||
</xsl:stylesheet>
|
|
@ -0,0 +1,9 @@
|
|||
<?xml version='1.0'?>
|
||||
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
|
||||
<xsl:output method="xml" omit-xml-declaration="yes"/>
|
||||
<xsl:template match="/">
|
||||
<xsl:for-each select="/bookstore">
|
||||
<author firstName="{.}"></author>
|
||||
</xsl:for-each>
|
||||
</xsl:template>
|
||||
</xsl:stylesheet>
|
|
@ -0,0 +1,8 @@
|
|||
<?xml version='1.0'?>
|
||||
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
|
||||
<xsl:template match="/">
|
||||
<xsl:for-each select="//book[@style='textbook']">
|
||||
<author firstName="{*}"></author>
|
||||
</xsl:for-each>
|
||||
</xsl:template>
|
||||
</xsl:stylesheet>
|
|
@ -0,0 +1,8 @@
|
|||
<?xml version="1.0"?>
|
||||
<xslTutorial>
|
||||
<text name="a" size="1"> j </text>
|
||||
<text name="b" size="2"> k </text>
|
||||
<text name="c" size="3"> l </text>
|
||||
<text name="d" size="4"> m </text>
|
||||
<text name="e" size="5"> n </text>
|
||||
</xslTutorial>
|
|
@ -0,0 +1,9 @@
|
|||
<?xml version='1.0'?>
|
||||
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"><xsl:output method="xml" omit-xml-declaration="yes" indent="yes"/>
|
||||
<xsl:template match="/">
|
||||
<xsl:for-each select="//text">
|
||||
<author firstName="{(@size + 1)} + {@size div 2}">
|
||||
</author>
|
||||
</xsl:for-each>
|
||||
</xsl:template>
|
||||
</xsl:stylesheet>
|
|
@ -0,0 +1,8 @@
|
|||
<?xml version="1.0"?>
|
||||
<xslTutorial>
|
||||
<text name="a" size="1"> j </text>
|
||||
<text name="b" size="2"> k </text>
|
||||
<text name="c" size="3"> l </text>
|
||||
<text name="d" size="4"> m </text>
|
||||
<text name="e" size="5"> n </text>
|
||||
</xslTutorial>
|
|
@ -0,0 +1,8 @@
|
|||
<?xml version='1.0'?>
|
||||
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"><xsl:output method="xml" omit-xml-declaration="yes" indent="yes"/>
|
||||
<xsl:template match="/">
|
||||
<xsl:for-each select="//text">
|
||||
<span name="#{{@name + {./text()}"/>
|
||||
</xsl:for-each>
|
||||
</xsl:template>
|
||||
</xsl:stylesheet>
|
|
@ -0,0 +1,8 @@
|
|||
<?xml version='1.0'?>
|
||||
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"><xsl:output method="xml" omit-xml-declaration="yes" indent="yes"/>
|
||||
<xsl:template match="/">
|
||||
<xsl:for-each select="//text">
|
||||
<a href="{{{(@name)}"/>
|
||||
</xsl:for-each>
|
||||
</xsl:template>
|
||||
</xsl:stylesheet>
|
|
@ -0,0 +1,8 @@
|
|||
<?xml version='1.0'?>
|
||||
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"><xsl:output method="xml" omit-xml-declaration="yes" indent="yes"/>
|
||||
<xsl:template match="/">
|
||||
<xsl:for-each select="//text">
|
||||
<a href="{(@name)}}}"/>
|
||||
</xsl:for-each>
|
||||
</xsl:template>
|
||||
</xsl:stylesheet>
|
|
@ -0,0 +1,5 @@
|
|||
<?xml version="1.0"?>
|
||||
<xslTutorial>
|
||||
<text name="a{" size="1}"> {{} </text>
|
||||
<text name="b}" size="{"> { </text>
|
||||
</xslTutorial>
|
|
@ -0,0 +1,8 @@
|
|||
<?xml version='1.0'?>
|
||||
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"><xsl:output method="xml" omit-xml-declaration="yes" indent="yes"/>
|
||||
<xsl:template match="/">
|
||||
<xsl:for-each select="//text">
|
||||
<a href="{@name}{@size}{text()}"/>
|
||||
</xsl:for-each>
|
||||
</xsl:template>
|
||||
</xsl:stylesheet>
|
|
@ -0,0 +1,8 @@
|
|||
<?xml version='1.0'?>
|
||||
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"><xsl:output method="xml" omit-xml-declaration="yes" indent="yes"/>
|
||||
<xsl:template match="/">
|
||||
<xsl:for-each select="//text">
|
||||
<a href="{{node()}"/>
|
||||
</xsl:for-each>
|
||||
</xsl:template>
|
||||
</xsl:stylesheet>
|
|
@ -0,0 +1,8 @@
|
|||
<?xml version='1.0'?>
|
||||
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"><xsl:output method="xml" omit-xml-declaration="yes" indent="yes"/>
|
||||
<xsl:template match="/">
|
||||
<xsl:for-each select="//*">
|
||||
<a href="{node()}}"/>
|
||||
</xsl:for-each>
|
||||
</xsl:template>
|
||||
</xsl:stylesheet>
|
|
@ -0,0 +1,5 @@
|
|||
<?xml version="1.0"?>
|
||||
<xslTutorial>
|
||||
<text name="Bob" size="34}"> Teacher </text>
|
||||
<text name="Cathy" size="23"> Nurse </text>
|
||||
</xslTutorial>
|
|
@ -0,0 +1,8 @@
|
|||
<?xml version='1.0'?>
|
||||
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
|
||||
<xsl:template match="/">
|
||||
<xsl:for-each select="//XML">
|
||||
<a href="{.}"></a>
|
||||
</xsl:for-each>
|
||||
</xsl:template>
|
||||
</xsl:stylesheet>
|
|
@ -0,0 +1,8 @@
|
|||
<?xml version='1.0'?>
|
||||
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"><xsl:output method="xml" omit-xml-declaration="yes" indent="yes"/>
|
||||
<xsl:template match="/">
|
||||
<xsl:for-each select="//*">
|
||||
<a href="{}"/>
|
||||
</xsl:for-each>
|
||||
</xsl:template>
|
||||
</xsl:stylesheet>
|
|
@ -0,0 +1,8 @@
|
|||
<?xml version='1.0'?>
|
||||
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"><xsl:output method="xml" omit-xml-declaration="yes" indent="yes"/>
|
||||
<xsl:template match="{/}">
|
||||
<xsl:for-each select="//*">
|
||||
<a href="nothing"/>
|
||||
</xsl:for-each>
|
||||
</xsl:template>
|
||||
</xsl:stylesheet>
|
|
@ -0,0 +1,8 @@
|
|||
<?xml version='1.0'?>
|
||||
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"><xsl:output method="xml" omit-xml-declaration="yes" indent="yes"/>
|
||||
<xsl:template match="/">
|
||||
<xsl:for-each select="{//*}">
|
||||
<a href="nothing"/>
|
||||
</xsl:for-each>
|
||||
</xsl:template>
|
||||
</xsl:stylesheet>
|
|
@ -0,0 +1,8 @@
|
|||
<?xml version='1.0'?>
|
||||
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"><xsl:output method="xml" omit-xml-declaration="yes" indent="yes"/>
|
||||
<xsl:template match="/">
|
||||
<xsl:for-each select="//book">
|
||||
<a href="@style}"/>
|
||||
</xsl:for-each>
|
||||
</xsl:template>
|
||||
</xsl:stylesheet>
|
|
@ -0,0 +1,8 @@
|
|||
<?xml version='1.0'?>
|
||||
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"><xsl:output method="xml" omit-xml-declaration="yes" indent="yes"/>
|
||||
<xsl:template match="/">
|
||||
<xsl:for-each select="//book">
|
||||
<a href="{@style"/>
|
||||
</xsl:for-each>
|
||||
</xsl:template>
|
||||
</xsl:stylesheet>
|
|
@ -0,0 +1,7 @@
|
|||
<?xml version='1.0'?>
|
||||
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"><xsl:output method="xml" omit-xml-declaration="yes" indent="yes"/>
|
||||
<xsl:template match="//book">
|
||||
<xsl:variable name="{node()}"> foo </xsl:variable>
|
||||
<a href="foo"/>
|
||||
</xsl:template>
|
||||
</xsl:stylesheet>
|
|
@ -0,0 +1,7 @@
|
|||
<?xml version="1.0" standalone="yes" ?>
|
||||
<?pi TOP LEVEL NODE?>
|
||||
<xslTutorial att="123">
|
||||
<text name="Bob" size="34}"> Teacher </text>
|
||||
<text name="Cathy" size="23"> Nurse </text>
|
||||
<?pi target?>
|
||||
</xslTutorial>
|
|
@ -0,0 +1,9 @@
|
|||
<?xml version='1.0'?>
|
||||
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"><xsl:output method="xml" omit-xml-declaration="yes" indent="yes"/>
|
||||
<foo bar="{blar}"/>
|
||||
<xsl:template match="/" foo="{blar}">
|
||||
<xsl:for-each select="child::processing-instruction()">
|
||||
<a href="attribute value template at top level elementi are ignored, should not cause error"/>
|
||||
</xsl:for-each>
|
||||
</xsl:template>
|
||||
</xsl:stylesheet>
|
|
@ -0,0 +1,13 @@
|
|||
<?xml version='1.0'?>
|
||||
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
|
||||
xmlns:x="urn:foo"
|
||||
>
|
||||
<xsl:output method="xml" omit-xml-declaration="yes" indent="yes"/>
|
||||
<xsl:template match="//bookstore">
|
||||
<xsl:for-each select="book">
|
||||
<a xmlns="{@style}"/>
|
||||
<a xmlns:x="{@style}"/>
|
||||
<a x:xmlns="{@style}"/>
|
||||
</xsl:for-each>
|
||||
</xsl:template>
|
||||
</xsl:stylesheet>
|
160
test/XSLT/testsuite/TESTS/MSFT_Conformance_Tests/AVTs/books.xml
Normal file
160
test/XSLT/testsuite/TESTS/MSFT_Conformance_Tests/AVTs/books.xml
Normal file
|
@ -0,0 +1,160 @@
|
|||
<?xml version='1.0'?>
|
||||
<!-- This file represents a fragment of a book store inventory database -->
|
||||
<bookstore specialty="novel" xmlns:dt="urn:uuid:C2F41010-65B3-11d1-A29F-00AA00C14882/" xmlns:my="urn:http//www.placeholder-name-here.com/schema/">
|
||||
<book style="autobiography">
|
||||
<title>Seven Years in Trenton</title>
|
||||
<author>
|
||||
<first-name>Joe</first-name>
|
||||
<last-name>Bob</last-name>
|
||||
<award>Trenton Literary Review Honorable Mention</award>
|
||||
<my:country>USA</my:country>
|
||||
</author>
|
||||
<price>12</price>
|
||||
</book>
|
||||
<book style="textbook">
|
||||
<title>History of Trenton</title>
|
||||
<author>
|
||||
<first-name>Mary</first-name>
|
||||
<last-name>Bob</last-name>
|
||||
<publication>
|
||||
Selected Short Stories of
|
||||
<first-name>JoeBob</first-name>
|
||||
<last-name>Loser</last-name>
|
||||
<country>US</country>
|
||||
</publication>
|
||||
</author>
|
||||
<price>55</price>
|
||||
</book>
|
||||
<book style="storybook">
|
||||
<title>XQL The Golden Years</title>
|
||||
<author>
|
||||
<first.name>Mike</first.name>
|
||||
<last.name>Hyman</last.name>
|
||||
<publication>
|
||||
XQL For Dummies
|
||||
<first.name>Jonathan</first.name>
|
||||
<last.name>Marsh</last.name>
|
||||
</publication>
|
||||
</author>
|
||||
<price dt:dt="fixed.14.4">55.95</price>
|
||||
</book>
|
||||
<magazine style="glossy" frequency="monthly">
|
||||
<title>Road and Track</title>
|
||||
<price>3.50</price>
|
||||
<subscription price="24" per="year"/>
|
||||
<special_edition per_year="1">Yes</special_edition>
|
||||
</magazine>
|
||||
<magazine style="glossy" frequency="weekly">
|
||||
<title>PC Week</title>
|
||||
<price>free</price>
|
||||
<publisher>Ziff Davis</publisher>
|
||||
</magazine>
|
||||
<magazine style="glossy" frequency="bi-monthly">
|
||||
<title>PC Magazine</title>
|
||||
<price dt:dt="fiXed.14.4">3.95</price>
|
||||
<publisher>Ziff Davis</publisher>
|
||||
<articles>
|
||||
<story1>Create a dream PC
|
||||
<details>Create a list of needed hardware</details>
|
||||
</story1>
|
||||
<story2>The future of the web
|
||||
<details>Can Netscape stay alive with Microsoft eating up its browser share?</details>
|
||||
<stock>MSFT 99.30</stock>
|
||||
<date dt:dt="date">1998-06-23</date>
|
||||
</story2>
|
||||
<story3>Visual Basic 5.0 - Will it stand the test of time?
|
||||
</story3>
|
||||
</articles>
|
||||
</magazine>
|
||||
<magazine style="glossy" frequency="monthly">
|
||||
<articles>
|
||||
<story1>Sport Cars - Can you really dream?
|
||||
</story1>
|
||||
</articles>
|
||||
</magazine>
|
||||
<magazine style="glossy" frequency="monthly">
|
||||
<award>PC Magazine Best Product of 1997</award>
|
||||
</magazine>
|
||||
<book style="textbook">
|
||||
<title>History of Trenton 2</title>
|
||||
<author>
|
||||
<first.name>Mary F</first.name>
|
||||
<last-name>Robinson</last-name>
|
||||
<publication>
|
||||
Selected Short Stories of
|
||||
<first.name>Mary F</first.name>
|
||||
<last-name>Robinson</last-name>
|
||||
</publication>
|
||||
</author>
|
||||
<price>55</price>
|
||||
</book>
|
||||
<book style="textbook">
|
||||
<title>History of Trenton Vol 3</title>
|
||||
<author>
|
||||
<first-name>Mary F</first-name>
|
||||
<last-name>Robinson</last-name>
|
||||
<first-name>Frank</first-name>
|
||||
<last-name>Anderson</last-name>
|
||||
<award>Pulizer</award>
|
||||
<publication>
|
||||
Selected Short Stories of
|
||||
<first-name>Mary F</first-name>
|
||||
<last-name>Robinson</last-name>
|
||||
</publication>
|
||||
</author>
|
||||
<price>10</price>
|
||||
</book>
|
||||
<book style="textbook">
|
||||
<title>How To Fix Computers</title>
|
||||
<author>
|
||||
<first-name>Hack</first-name>
|
||||
<last-name>er</last-name>
|
||||
<degree from="Harvard">Ph.D.</degree>
|
||||
</author>
|
||||
<price>08</price>
|
||||
</book>
|
||||
<magazine style="glossy" frequency="monthly">
|
||||
<title>Tracking Trenton</title>
|
||||
<price>2.50</price>
|
||||
<subscription price="24" per="year"/>
|
||||
</magazine>
|
||||
<my:magazine style="flat" frequency="monthly">
|
||||
<title>Tracking Trenton Stocks</title>
|
||||
<price>0.98</price>
|
||||
<subscription price="10.75" per="year"/>
|
||||
</my:magazine>
|
||||
<book style="novel" id="myfave">
|
||||
<title>Trenton Today, Trenton Tomorrow</title>
|
||||
<author>
|
||||
<first-name>Toni</first-name>
|
||||
<last-name>Bob</last-name>
|
||||
<degree from="Trenton U">B.A.</degree>
|
||||
<degree from="Harvard">Ph.D.</degree>
|
||||
<award>Pulizer</award>
|
||||
<publication>Still in Trenton</publication>
|
||||
<publication>Trenton Forever</publication>
|
||||
</author>
|
||||
<price intl="canada" exchange="0.7">6.50</price>
|
||||
<excerpt>
|
||||
<p>It was a dark and stormy night.</p>
|
||||
<p>But then all nights in Trenton seem dark and
|
||||
stormy to someone who has gone through what
|
||||
<emph>I</emph> have.
|
||||
</p>
|
||||
<definition-list>
|
||||
<term>Trenton</term>
|
||||
<definition>misery</definition>
|
||||
</definition-list>
|
||||
</excerpt>
|
||||
</book>
|
||||
<my:book style="leather" price="29.50">
|
||||
<my:title>Who's Who in Trenton</my:title>
|
||||
<my:author>Robert Bob</my:author>
|
||||
</my:book>
|
||||
<my:book style="hard back" price="99.95">
|
||||
<my:title>Where is Trenton?</my:title>
|
||||
</my:book>
|
||||
<my:book dt:style="string" style="hard back" price="19.99">
|
||||
<my:title>Where in the world is Trenton?</my:title>
|
||||
</my:book>
|
||||
</bookstore>
|
|
@ -0,0 +1,17 @@
|
|||
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
|
||||
<xsl:output method="xml" encoding="UTF-16" omit-xml-declaration="yes" indent="yes"/>
|
||||
|
||||
<xsl:attribute-set name="simple">
|
||||
<xsl:attribute name="attr">simple</xsl:attribute>
|
||||
</xsl:attribute-set>
|
||||
|
||||
<xsl:template match="/">
|
||||
<xsl:element namespace="urn:foo" name="foo:elem" use-attribute-sets="simple" xsl:use-attribute-set="should be ignored" />
|
||||
<xsl:element name="complex" use-attribute-sets="complex"/>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:attribute-set name="complex">
|
||||
<xsl:attribute name="att1">complex1</xsl:attribute>
|
||||
<xsl:attribute name="att2">complex2</xsl:attribute>
|
||||
</xsl:attribute-set>
|
||||
</xsl:stylesheet>
|
|
@ -0,0 +1,24 @@
|
|||
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
|
||||
<xsl:output encoding="UTF-16" omit-xml-declaration="yes" indent="yes"/>
|
||||
|
||||
<xsl:attribute-set name="simple">
|
||||
<xsl:attribute name="attr">simple</xsl:attribute>
|
||||
</xsl:attribute-set>
|
||||
|
||||
<xsl:template match="/" priority="1" >
|
||||
<xsl:for-each select="//magazine">
|
||||
<xsl:copy xsl:use-attribute-sets="should be ignored" foo="ignored" use-attribute-sets="simple"/>
|
||||
<xsl:copy use-attribute-sets="complex">
|
||||
<xsl:copy use-attribute-sets="complex simple"/>
|
||||
</xsl:copy>
|
||||
<xsl:copy use-attribute-sets="simple complex"/>
|
||||
</xsl:for-each>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:attribute-set name="complex">
|
||||
<xsl:attribute name="att1">complex1</xsl:attribute>
|
||||
<xsl:attribute name="{$x}">complex2</xsl:attribute>
|
||||
</xsl:attribute-set>
|
||||
|
||||
<xsl:param name="x">param-att</xsl:param>
|
||||
</xsl:stylesheet>
|
|
@ -0,0 +1,23 @@
|
|||
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
|
||||
<xsl:output method="xml" encoding="UTF-16" omit-xml-declaration="yes" indent="yes"/>
|
||||
|
||||
<xsl:attribute-set name="foo">
|
||||
<xsl:attribute name="attr">simple</xsl:attribute>
|
||||
</xsl:attribute-set>
|
||||
|
||||
<xsl:attribute-set name="simple" use-attribute-sets="complex">
|
||||
<xsl:attribute name="attr">simple1</xsl:attribute>
|
||||
</xsl:attribute-set>
|
||||
|
||||
<xsl:template match="bookstore">
|
||||
<foo xsl:use-attribute-sets="simple foo" use-attribute-sets="display as specified"/>
|
||||
<foo xsl:use-attribute-sets="foo simple" use-attribute-sets="display as specified"/>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:attribute-set name="complex">
|
||||
<xsl:attribute name="att1">complex1</xsl:attribute>
|
||||
<xsl:attribute name="{$x}">complex2</xsl:attribute>
|
||||
</xsl:attribute-set>
|
||||
|
||||
<xsl:param name="x">param-att</xsl:param>
|
||||
</xsl:stylesheet>
|
|
@ -0,0 +1,26 @@
|
|||
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
|
||||
<xsl:output method="xml" encoding="UTF-16" omit-xml-declaration="yes" indent="yes"/>
|
||||
|
||||
<xsl:attribute-set name="foo">
|
||||
<xsl:attribute name="attr">simple</xsl:attribute>
|
||||
</xsl:attribute-set>
|
||||
|
||||
<xsl:attribute-set name="simple" use-attribute-sets="complex" xsl:use-attribute-sets="should be ignored">
|
||||
<xsl:attribute name="attr">simple1</xsl:attribute>
|
||||
</xsl:attribute-set>
|
||||
|
||||
<xsl:template match="bookstore">
|
||||
<foo xsl:use-attribute-sets="simple foo" use-attribute-sets="display as specified"/>
|
||||
<foo xsl:use-attribute-sets="foo simple" />
|
||||
<foo xsl:use-attribute-sets="" literalAttribute="bar"/>
|
||||
<bar xsl:use-attribute-sets="foo simple" >
|
||||
</bar>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:attribute-set name="complex">
|
||||
<xsl:attribute name="att1">complex1</xsl:attribute>
|
||||
<xsl:attribute name="{$x}">complex2</xsl:attribute>
|
||||
</xsl:attribute-set>
|
||||
|
||||
<xsl:variable name="x">param-att</xsl:variable>
|
||||
</xsl:stylesheet>
|
|
@ -0,0 +1,43 @@
|
|||
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
|
||||
<xsl:variable name="var1">var1</xsl:variable>
|
||||
<xsl:output encoding="UTF-16" omit-xml-declaration="yes" indent="yes"/>
|
||||
|
||||
<xsl:attribute-set name="empty"/>
|
||||
|
||||
<xsl:attribute-set name="simple">
|
||||
<xsl:attribute name="attr">simple</xsl:attribute>
|
||||
</xsl:attribute-set>
|
||||
|
||||
<xsl:attribute-set name="foo">
|
||||
<xsl:attribute name="att-{$foo}">foo</xsl:attribute>
|
||||
</xsl:attribute-set>
|
||||
|
||||
<xsl:attribute-set name="bar">
|
||||
<xsl:attribute name="{$var1}{$param1}">bar</xsl:attribute>
|
||||
</xsl:attribute-set>
|
||||
|
||||
<xsl:attribute-set name="use-simple" use-attribute-sets="simple">
|
||||
<xsl:attribute name="us-attr">use-simple1</xsl:attribute>
|
||||
<!-- <xsl:attribute name="xmlns:my">xmlns:my</xsl:attribute> -->
|
||||
</xsl:attribute-set>
|
||||
|
||||
<xsl:template match="/*">
|
||||
<Testing>
|
||||
<xsl:apply-templates/>
|
||||
<l0 xsl:use-attribute-sets="bar">
|
||||
<l1 xsl:use-attribute-sets="">
|
||||
<l2 xsl:use-attribute-sets="foo">
|
||||
<l3>
|
||||
<l4 xsl:use-attribute-sets="bar">
|
||||
<l5>
|
||||
<l6>
|
||||
<l7 xsl:use-attribute-sets="foo">
|
||||
</l7> </l6> </l5> </l4> </l3> </l2> </l1> </l0>
|
||||
</Testing>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="node()"/>
|
||||
|
||||
<xsl:param name="param1">param1</xsl:param>
|
||||
<xsl:variable name="foo">foo</xsl:variable>
|
||||
</xsl:stylesheet>
|
|
@ -0,0 +1,27 @@
|
|||
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
|
||||
<xsl:variable name="var1">var1</xsl:variable>
|
||||
<xsl:output encoding="UTF-16" omit-xml-declaration="yes" indent="yes"/>
|
||||
|
||||
<xsl:attribute-set name="foobar">
|
||||
<xsl:attribute name="foobar">simple</xsl:attribute>
|
||||
</xsl:attribute-set>
|
||||
|
||||
<xsl:attribute-set name="trick">
|
||||
<xsl:attribute name="foobar"> ERROR </xsl:attribute>
|
||||
</xsl:attribute-set>
|
||||
|
||||
<xsl:attribute-set name="use-foobar" use-attribute-sets="foobar">
|
||||
<xsl:attribute name="us-attr">use-foobar</xsl:attribute>
|
||||
<!-- <xsl:attribute name="xmlns:my">xmlns:my</xsl:attribute> -->
|
||||
</xsl:attribute-set>
|
||||
|
||||
<xsl:template match="/*">
|
||||
<Testing>
|
||||
<xsl:apply-templates/>
|
||||
<l1 xsl:use-attribute-sets="foobar"/>
|
||||
</Testing>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="node()"/>
|
||||
|
||||
</xsl:stylesheet>
|
|
@ -0,0 +1,14 @@
|
|||
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
|
||||
<xsl:output encoding="UTF-16" omit-xml-declaration="yes" indent="yes"/>
|
||||
|
||||
<xsl:attribute-set name="empty"/>
|
||||
<xsl:template match="/">
|
||||
<elem xsl:use-attribute-sets="empty">
|
||||
<elem xsl:use-attribute-sets="empty"/>
|
||||
<elem xsl:use-attribute-sets="empty"/>
|
||||
<elem xsl:use-attribute-sets="empty"/>
|
||||
<elem xsl:use-attribute-sets="empty"/>
|
||||
</elem>
|
||||
</xsl:template>
|
||||
|
||||
</xsl:stylesheet>
|
File diff suppressed because one or more lines are too long
|
@ -0,0 +1,21 @@
|
|||
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
|
||||
<xsl:output method="xml" encoding="UTF-16" omit-xml-declaration="yes" indent="yes"/>
|
||||
|
||||
<xsl:attribute-set name="foo">
|
||||
<!-- abc should override 123 -->
|
||||
<xsl:attribute name="attr">123</xsl:attribute>
|
||||
<xsl:attribute name="attr" >abc</xsl:attribute>
|
||||
</xsl:attribute-set>
|
||||
|
||||
<xsl:template match="/">
|
||||
<foo xsl:use-attribute-sets="foo"/>
|
||||
<xsl:element name="elem" use-attribute-sets="simple"/>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:attribute-set name="simple" use-attribute-sets="complex">
|
||||
</xsl:attribute-set>
|
||||
|
||||
<xsl:attribute-set name="complex" use-attribute-sets="foo">
|
||||
</xsl:attribute-set>
|
||||
|
||||
</xsl:stylesheet>
|
|
@ -0,0 +1,15 @@
|
|||
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
|
||||
<xsl:output method="xml" encoding="UTF-16" omit-xml-declaration="yes" indent="yes"/>
|
||||
|
||||
<xsl:attribute-set name="foo">
|
||||
<!--
|
||||
<xsl:attribute name="attr" use-attribute-sets="notDeclared">123</xsl:attribute>
|
||||
-->
|
||||
<xsl:attribute name="attr" >123</xsl:attribute>
|
||||
</xsl:attribute-set>
|
||||
|
||||
<xsl:template match="/">
|
||||
<foo xsl:use-attribute-sets="foo"/>
|
||||
</xsl:template>
|
||||
|
||||
</xsl:stylesheet>
|
|
@ -0,0 +1,19 @@
|
|||
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
|
||||
<xsl:output method="xml" encoding="UTF-16" omit-xml-declaration="yes" indent="yes"/>
|
||||
|
||||
<xsl:attribute-set name="foo">
|
||||
<xsl:attribute name="att"></xsl:attribute>
|
||||
<xsl:attribute name="att2">2</xsl:attribute>
|
||||
<xsl:attribute name="att2">2</xsl:attribute>
|
||||
</xsl:attribute-set>
|
||||
|
||||
<xsl:template match="/">
|
||||
<!-- attribute specified in the literal element will override what is in the attribute set -->
|
||||
<foo name="foo" att="abc" elem1="value1" xsl:use-attribute-sets="foo" elem2="value2" att1="def"/>
|
||||
|
||||
<xsl:element name="foo" xsl:use-attribute-sets="foo" >
|
||||
<xsl:attribute name="bar">bar</xsl:attribute>
|
||||
</xsl:element>
|
||||
</xsl:template>
|
||||
|
||||
</xsl:stylesheet>
|
|
@ -0,0 +1,61 @@
|
|||
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
|
||||
<xsl:output encoding="UTF-16" omit-xml-declaration="yes" indent="yes"/>
|
||||
|
||||
<xsl:attribute-set name="foo">
|
||||
<xsl:attribute name="att"></xsl:attribute>
|
||||
<xsl:attribute name="att1">1</xsl:attribute>
|
||||
<xsl:attribute name="att2">2</xsl:attribute>
|
||||
</xsl:attribute-set>
|
||||
|
||||
<xsl:template match="/">
|
||||
<!-- attribute specified in the literal element will override what is in the attribute set -->
|
||||
<foo xsl:use-attribute-set="foo" name="foo" att="abc" elem1="value1" elem2="value2" att1="def">
|
||||
<xsl:attribute name="name">blar</xsl:attribute>
|
||||
<xsl:attribute name="att1"> </xsl:attribute>
|
||||
<xsl:attribute name="att2">testing</xsl:attribute>
|
||||
</foo>
|
||||
|
||||
<xsl:element name="foo" xsl:use-attribute-sets="foo" >
|
||||
<xsl:attribute name="bar">bar</xsl:attribute>
|
||||
</xsl:element>
|
||||
|
||||
<!-- xsl:copy-of should not allow use-attribute-sets according to spec -->
|
||||
<xsl:copy-of select="//price[text()='08']">
|
||||
</xsl:copy-of>
|
||||
|
||||
<!-- this a-tp call the xsl:template below to process copy -->
|
||||
<xsl:apply-templates/>
|
||||
</xsl:template>
|
||||
|
||||
|
||||
<!-- only copy node and attibute (shallow clone) both book and title should have the foo attriburte sets -->
|
||||
<xsl:template match="//book | title | @*">
|
||||
<!-- xsl:copy don't take any specified attribute, thus att='asdf' is ignored -->
|
||||
<xsl:copy use-attribute-sets="foo" >
|
||||
<xsl:attribute name="att">value of att</xsl:attribute>
|
||||
<xsl:apply-templates select="node() | @* "/>
|
||||
</xsl:copy>
|
||||
</xsl:template>
|
||||
|
||||
<!-- author should not have any attribute on it -->
|
||||
<xsl:template match="author">
|
||||
<xsl:copy>
|
||||
<xsl:apply-templates/>
|
||||
</xsl:copy>
|
||||
</xsl:template>
|
||||
|
||||
<!-- first-name should have koko attribute set on it -->
|
||||
<xsl:template match="first-name">
|
||||
<xsl:copy use-attribute-sets="foo">
|
||||
<xsl:attribute name="koko">koko</xsl:attribute>
|
||||
<xsl:attribute name="att">koko</xsl:attribute>
|
||||
</xsl:copy>
|
||||
</xsl:template>
|
||||
|
||||
<!-- need this to write off text -->
|
||||
<xsl:template match="text()">
|
||||
</xsl:template>
|
||||
|
||||
|
||||
|
||||
</xsl:stylesheet>
|
|
@ -0,0 +1,56 @@
|
|||
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
|
||||
<xsl:output method="xml" encoding="UTF-16" omit-xml-declaration="yes" indent="yes"/>
|
||||
|
||||
<xsl:attribute-set name="foo">
|
||||
<xsl:attribute name="att"></xsl:attribute>
|
||||
<xsl:attribute name="att1">1</xsl:attribute>
|
||||
<xsl:attribute name="att2">2</xsl:attribute>
|
||||
</xsl:attribute-set>
|
||||
|
||||
<xsl:template match="/">
|
||||
<!-- test that specified att override attset -->
|
||||
<foo xsl:use-attribute-set="foo" att="literal">
|
||||
</foo>
|
||||
|
||||
<!-- test that xslatt override specified att -->
|
||||
<foo xsl:use-attribute-set="foo" att="literal">
|
||||
<xsl:attribute name="att">xslattribute</xsl:attribute>
|
||||
</foo>
|
||||
|
||||
<!-- test that xslatt override specified att -->
|
||||
<foo xsl:use-attribute-set="foo" att="literal">
|
||||
<xsl:attribute name="att">xslattribute</xsl:attribute>
|
||||
</foo>
|
||||
|
||||
<!-- test that xslatt override specified att -->
|
||||
<xsl:element name="foo" xsl:use-attribute-sets="foo" >
|
||||
<xsl:attribute name="bar">bar</xsl:attribute>
|
||||
</xsl:element>
|
||||
|
||||
<xsl:copy-of select="//price[text()='08']" >
|
||||
</xsl:copy-of>
|
||||
|
||||
<xsl:apply-templates/>
|
||||
</xsl:template>
|
||||
|
||||
|
||||
<!-- only copy node and attibute (shallow clone) both book and title should have the foo attriburte sets -->
|
||||
<xsl:template match="//book | title | @*">
|
||||
<xsl:apply-templates select="node() | @* "/>
|
||||
</xsl:template>
|
||||
|
||||
<!-- first-name should have koko attribute set on it -->
|
||||
<xsl:template match="first-name">
|
||||
<xsl:copy use-attribute-sets="foo">
|
||||
<xsl:attribute name="koko">koko</xsl:attribute>
|
||||
<xsl:attribute name="att">koko</xsl:attribute>
|
||||
</xsl:copy>
|
||||
</xsl:template>
|
||||
|
||||
<!-- need this to write off text -->
|
||||
<xsl:template match="text()">
|
||||
</xsl:template>
|
||||
|
||||
|
||||
|
||||
</xsl:stylesheet>
|
|
@ -0,0 +1,20 @@
|
|||
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
|
||||
<xsl:output method="xml" encoding="UTF-16" omit-xml-declaration="yes" indent="yes"/>
|
||||
|
||||
<xsl:attribute-set name="foo">
|
||||
<xsl:attribute name="att"></xsl:attribute>
|
||||
<xsl:attribute name="att1">1</xsl:attribute>
|
||||
<xsl:attribute name="att2">2</xsl:attribute>
|
||||
</xsl:attribute-set>
|
||||
|
||||
<xsl:attribute-set name="empty"/>
|
||||
|
||||
<xsl:template match="/">
|
||||
<!-- test that xslatt override specified att -->
|
||||
<xsl:element name="elem" use-attribute-sets="foo empty">
|
||||
<xsl:attribute name="att2">elem</xsl:attribute>
|
||||
<xsl:attribute name="att1">elem</xsl:attribute>
|
||||
</xsl:element>
|
||||
</xsl:template>
|
||||
|
||||
</xsl:stylesheet>
|
|
@ -0,0 +1,23 @@
|
|||
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
|
||||
<xsl:output method="xml" encoding="UTF-16" omit-xml-declaration="yes" indent="yes"/>
|
||||
|
||||
<xsl:attribute-set name="foo">
|
||||
<xsl:attribute name="{$x}att"></xsl:attribute>
|
||||
<xsl:attribute name="{$y}att">yyy</xsl:attribute>
|
||||
<xsl:attribute name="{$x}att">value1</xsl:attribute>
|
||||
</xsl:attribute-set>
|
||||
|
||||
<xsl:attribute-set name="empty"/>
|
||||
|
||||
<xsl:template match="/">
|
||||
<!-- test that xslatt override specified att -->
|
||||
<xsl:element name="elem" use-attribute-sets="foo empty">
|
||||
<xsl:attribute name="att2">elem</xsl:attribute>
|
||||
<xsl:attribute name="{$y}att">elemyyy</xsl:attribute>
|
||||
</xsl:element>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:param name="x">x</xsl:param>
|
||||
<xsl:variable name="y">x</xsl:variable>
|
||||
|
||||
</xsl:stylesheet>
|
|
@ -0,0 +1,13 @@
|
|||
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
|
||||
<xsl:import href="91091a.xsl"/>
|
||||
<xsl:output encoding="UTF-16" omit-xml-declaration="yes" indent="yes"/>
|
||||
|
||||
<xsl:attribute-set name="foo"/>
|
||||
|
||||
<xsl:template match="/">
|
||||
<xsl:element name="elem" use-attribute-sets="foo empty">
|
||||
<xsl:attribute name="att">elem</xsl:attribute>
|
||||
</xsl:element>
|
||||
</xsl:template>
|
||||
</xsl:stylesheet>
|
||||
|
|
@ -0,0 +1,7 @@
|
|||
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
|
||||
<xsl:output encoding="UTF-16" omit-xml-declaration="yes" indent="yes"/>
|
||||
|
||||
<xsl:attribute-set name=""/>
|
||||
|
||||
</xsl:stylesheet>
|
||||
|
|
@ -0,0 +1,13 @@
|
|||
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
|
||||
<xsl:output encoding="UTF-16" omit-xml-declaration="yes" indent="yes"/>
|
||||
|
||||
<xsl:attribute-set name="foo">
|
||||
<xsl:attribute name="foo">foo</xsl:attribute>
|
||||
text is not allowed
|
||||
</xsl:attribute-set>
|
||||
|
||||
<xsl:template match="/">
|
||||
<literal xsl:use-attribute-sets="foo"/>
|
||||
</xsl:template>
|
||||
</xsl:stylesheet>
|
||||
|
|
@ -0,0 +1,16 @@
|
|||
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
|
||||
<xsl:output encoding="UTF-16" omit-xml-declaration="yes" indent="yes"/>
|
||||
|
||||
<xsl:attribute-set name="foo" >
|
||||
<xsl:processing-instruction name="pi">foo</xsl:processing-instruction>
|
||||
</xsl:attribute-set>
|
||||
|
||||
<xsl:template match="/">
|
||||
<literal xsl:use-attribute-sets="foo"/>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:attribute-set name="bar">
|
||||
<xsl:processing-instruction name="pi">foo</xsl:processing-instruction>
|
||||
</xsl:attribute-set>
|
||||
</xsl:stylesheet>
|
||||
|
|
@ -0,0 +1,18 @@
|
|||
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
|
||||
<xsl:output encoding="UTF-16" omit-xml-declaration="yes" indent="yes"/>
|
||||
|
||||
<xsl:attribute-set name="foo">
|
||||
</xsl:attribute-set>
|
||||
|
||||
<xsl:template match="/">
|
||||
<literal xsl:use-attribute-sets="foo"/>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:attribute-set name="bar">
|
||||
</xsl:attribute-set>
|
||||
|
||||
<xsl:attribute-set name="blar" >
|
||||
<xsl:comment>comment is not allow here </xsl:comment>
|
||||
</xsl:attribute-set >
|
||||
</xsl:stylesheet>
|
||||
|
|
@ -0,0 +1,18 @@
|
|||
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
|
||||
<xsl:output encoding="UTF-16" omit-xml-declaration="yes" indent="yes"/>
|
||||
|
||||
<xsl:attribute-set name="foo" >
|
||||
<a> is not allowed </a>
|
||||
</xsl:attribute-set>
|
||||
|
||||
<xsl:template match="/">
|
||||
<literal xsl:use-attribute-sets="foo"/>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:attribute-set name="bar" >
|
||||
</xsl:attribute-set>
|
||||
|
||||
<xsl:attribute-set name="blar" >
|
||||
</xsl:attribute-set >
|
||||
</xsl:stylesheet>
|
||||
|
|
@ -0,0 +1,18 @@
|
|||
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
|
||||
<xsl:output encoding="UTF-16" omit-xml-declaration="yes" indent="yes"/>
|
||||
|
||||
<xsl:attribute-set name="foo" >
|
||||
</xsl:attribute-set>
|
||||
|
||||
<xsl:template match="/">
|
||||
<literal xsl:use-attribute-sets="foo"/>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:attribute-set name="bar" >
|
||||
<xsl:element name="foo">foo</xsl:element>
|
||||
</xsl:attribute-set>
|
||||
|
||||
<xsl:attribute-set name="blar" >
|
||||
</xsl:attribute-set >
|
||||
</xsl:stylesheet>
|
||||
|
|
@ -0,0 +1,22 @@
|
|||
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
|
||||
<xsl:output encoding="UTF-16" omit-xml-declaration="yes" indent="yes"/>
|
||||
|
||||
<xsl:attribute-set name="bar">
|
||||
<xsl:attribute name="foo">foo</xsl:attribute>
|
||||
</xsl:attribute-set>
|
||||
|
||||
<xsl:template match="bookstore" xsl:use-attribute-sets="foo">
|
||||
<xsl:text xsl:use-attribute-sets="foo" >text</xsl:text>
|
||||
<!-- bug#50251 case 91099.xsl
|
||||
<xsl:comment xsl:use-attribute-set="foo" use-attribute-sets="foo">text</xsl:comment>
|
||||
-->
|
||||
<xsl:for-each select="book" xsl:use-attribute-sets="foo">
|
||||
<xsl:copy xsl:use-attribute-sets="foo"/>
|
||||
<xsl:value-of xsl:use-attribute-sets="foo" select="bar"/>
|
||||
</xsl:for-each>
|
||||
<xsl:apply-templates xsl:use-attribute-sets="foo" select="bar"/>
|
||||
</xsl:template>
|
||||
|
||||
|
||||
</xsl:stylesheet>
|
||||
|
|
@ -0,0 +1,9 @@
|
|||
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
|
||||
<xsl:output encoding="UTF-16" omit-xml-declaration="yes" indent="yes"/>
|
||||
|
||||
<xsl:template match="bookstore">
|
||||
<xsl:comment use-attribute-sets="foo">text</xsl:comment>
|
||||
</xsl:template>
|
||||
|
||||
</xsl:stylesheet>
|
||||
|
|
@ -0,0 +1,67 @@
|
|||
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" > <!-- why is the method property overidden by the included or imported stylesheet? -->
|
||||
<xsl:import href="91100a.xsl" xsl:use-attribute-sets="foo" />
|
||||
<xsl:output method="xml" encoding="UTF-16" omit-xml-declaration="yes" indent="yes"/>
|
||||
|
||||
<xsl:attribute-set name="bar" xsl:use-attribute-sets="foo">
|
||||
<!-- bug
|
||||
<xsl:attribute name="foo" use-attribute-sets="foo">foo</xsl:attribute>
|
||||
-->
|
||||
</xsl:attribute-set>
|
||||
|
||||
<xsl:template match="bookstore" xsl:use-attribute-sets="foo">
|
||||
<xsl:text xsl:use-attribute-sets="foo" >text</xsl:text>
|
||||
<!-- bug#50251 case 91099.xsl
|
||||
<xsl:comment xsl:use-attribute-set="foo" use-attribute-sets="foo">text</xsl:comment>
|
||||
-->
|
||||
<xsl:for-each select="book" xsl:use-attribute-sets="foo">
|
||||
<xsl:copy xsl:use-attribute-sets="foo"/>
|
||||
<xsl:value-of xsl:use-attribute-sets="foo" select="bar"/>
|
||||
</xsl:for-each>
|
||||
<xsl:apply-templates xsl:use-attribute-sets="foo" select="bar"/>
|
||||
<!-- ask ANDY??? why is no error? there is no imported xsl
|
||||
<xsl:apply-imports />
|
||||
-->
|
||||
<xsl:call-template name="foo" xsl:use-attribute-sets="foo" >
|
||||
<xsl:with-param name="y" xsl:use-attribute-sets="foo" >x</xsl:with-param>
|
||||
</xsl:call-template>
|
||||
<xsl:copy-of xsl:use-attribute-sets="foo" select="not-exist"/>
|
||||
<xsl:if test="'a'='a'" xsl:use-attribute-sets="foo" > IFifIF </xsl:if>
|
||||
<xsl:number xsl:use-attribute-sets="foo" value="123" level="single" grouping-size="2"/>
|
||||
|
||||
<xsl:choose xsl:use-attribute-sets="foo">
|
||||
<xsl:when test='1=2' xsl:use-attribute-sets="foo" >
|
||||
<xsl:number format="i"/>
|
||||
</xsl:when>
|
||||
<xsl:otherwise xsl:use-attribute-sets="foo">
|
||||
<xsl:number xsl:use-attribute-sets="foo" format="9" value="9"/>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
|
||||
<xsl:value-of select="@*"/>
|
||||
<xsl:value-of select="'VALUE-OF'"/>
|
||||
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template name="foo" match="notExist"/>
|
||||
<!-- ask Andy??? is this supported?
|
||||
<xsl:decimal-format name="a" percent="abc" />
|
||||
<xsl:fallback use-attribute-sets="foo"/>
|
||||
<xsl:message terminate="yes"/>
|
||||
<xsl:sort select="book" use-attribute-sets="foo" xsl:use-attribute-sets="foo" value="123" level="single" grouping-size="2"/>
|
||||
-->
|
||||
<!-- ask Andy??? Why is this over take the output of the template??
|
||||
<xsl:import href="http://webxtest/testcases/simple.xml"/>
|
||||
<xsl:include href="http://webxtest/testcases/simple.xml"/>
|
||||
<xsl:key name="key" match="/" use="*"/>
|
||||
<xsl:namespace-alias stylesheet-precid="#decault" result-prefix="#default"/>
|
||||
<xsl:transform is="a1"/>
|
||||
-->
|
||||
<xsl:include href="91100a.xsl" xsl:use-attribute-sets="foo" />
|
||||
<xsl:preserve-space elements="a" xsl:use-attribute-sets="foo" />
|
||||
<xsl:strip-space elements="a" xsl:use-attribute-sets="foo"/>
|
||||
|
||||
<xsl:variable name="x" >x</xsl:variable>
|
||||
<xsl:param name="y" >x</xsl:param>
|
||||
|
||||
</xsl:stylesheet>
|
||||
|
|
@ -0,0 +1,9 @@
|
|||
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
|
||||
<xsl:output method="xml" encoding="UTF-16" omit-xml-declaration="yes" indent="yes"/>
|
||||
|
||||
<xsl:template match="/">
|
||||
FROM SIMPLE . XSL
|
||||
<xsl:apply-templates/>
|
||||
</xsl:template>
|
||||
|
||||
</xsl:stylesheet>
|
|
@ -0,0 +1,17 @@
|
|||
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xsl:use-attribute-sets="foo">
|
||||
<xsl:output method="xml" encoding="UTF-16" omit-xml-declaration="yes" indent="yes"/>
|
||||
|
||||
<xsl:attribute-set name="foo" >
|
||||
<xsl:attribute name="foo">foo</xsl:attribute>
|
||||
</xsl:attribute-set>
|
||||
|
||||
<xsl:template match="bookstore">
|
||||
<xsl:element name="elem" use-attribute-sets="foo bar">element</xsl:element>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:attribute-set name="bar" >
|
||||
<xsl:attribute name="bar">bar</xsl:attribute>
|
||||
</xsl:attribute-set>
|
||||
|
||||
</xsl:stylesheet>
|
||||
|
|
@ -0,0 +1,16 @@
|
|||
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
|
||||
<xsl:output method="xml" encoding="UTF-16" omit-xml-declaration="yes" indent="yes"/>
|
||||
|
||||
<xsl:attribute-set name="foo" >
|
||||
<xsl:attribute name="foo" >
|
||||
<xsl:copy /> <!-- this xsl:copy is causing the inpartial output -->
|
||||
<xsl:element name="abc"/>
|
||||
<xsl:value-of select="'testing'"/>
|
||||
</xsl:attribute>
|
||||
</xsl:attribute-set>
|
||||
|
||||
<xsl:template match="bookstore">
|
||||
<xsl:element name="elem" use-attribute-sets="foo">element</xsl:element>
|
||||
</xsl:template>
|
||||
|
||||
</xsl:stylesheet>
|
|
@ -0,0 +1,22 @@
|
|||
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" >
|
||||
<xsl:output method="xml" encoding="UTF-16" omit-xml-declaration="yes" indent="yes"/>
|
||||
|
||||
<xsl:attribute-set name="foo" >
|
||||
<xsl:attribute name="foo">
|
||||
<xsl:copy use-attribute-sets="foo" />
|
||||
<xsl:value-of select="'testing'"/>
|
||||
</xsl:attribute>
|
||||
</xsl:attribute-set>
|
||||
|
||||
<xsl:template match="bookstore">
|
||||
<xsl:element name="elem" use-attribute-sets="foo">element</xsl:element>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:attribute-set name="bar" use-attribute-sets="foo">
|
||||
<xsl:attribute name="bar">bar</xsl:attribute>
|
||||
</xsl:attribute-set>
|
||||
|
||||
<xsl:attribute-set name="foo" use-attribute-sets="bar">
|
||||
</xsl:attribute-set>
|
||||
|
||||
</xsl:stylesheet>
|
|
@ -0,0 +1,17 @@
|
|||
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
|
||||
<xsl:output encoding="UTF-16" omit-xml-declaration="no" indent="yes"/>
|
||||
|
||||
<xsl:attribute-set name="foo">
|
||||
<xsl:attribute name="attr">123</xsl:attribute>
|
||||
</xsl:attribute-set>
|
||||
|
||||
|
||||
<xsl:attribute-set name="foo" >
|
||||
<xsl:attribute name="{$x}">XYZ</xsl:attribute>
|
||||
</xsl:attribute-set>
|
||||
|
||||
<xsl:template match="/">
|
||||
<foo xsl:use-attribute-sets="foo"/>
|
||||
<xsl:variable name="x">xxx</xsl:variable>
|
||||
</xsl:template>
|
||||
</xsl:stylesheet>
|
|
@ -0,0 +1,21 @@
|
|||
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
|
||||
<xsl:import href="http://webxtest/testcases/91140a.xsl"/>
|
||||
<xsl:output encoding="UTF-16" omit-xml-declaration="no" indent="yes"/>
|
||||
|
||||
<xsl:attribute-set name="foo" use-attribute-sets="bar">
|
||||
<xsl:attribute name="attr">123</xsl:attribute>
|
||||
</xsl:attribute-set>
|
||||
|
||||
<xsl:template match="/">
|
||||
<foo xsl:use-attribute-sets="foo"/>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:attribute-set name="foo" >
|
||||
<xsl:attribute name="attr">abc</xsl:attribute>
|
||||
</xsl:attribute-set>
|
||||
|
||||
<xsl:attribute-set name="foo" >
|
||||
<xsl:attribute name="attr">XYZ</xsl:attribute>
|
||||
</xsl:attribute-set>
|
||||
|
||||
</xsl:stylesheet>
|
|
@ -0,0 +1,15 @@
|
|||
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
|
||||
<xsl:import href="http://webxtest/testcases/91141a.xsl"/>
|
||||
<xsl:import href="http://webxtest/testcases/91141b.xsl"/>
|
||||
<xsl:output encoding="UTF-16" omit-xml-declaration="no" indent="yes"/>
|
||||
|
||||
<xsl:attribute-set name="foo" use-attribute-sets="bar boo">
|
||||
<xsl:attribute name="attr">123</xsl:attribute>
|
||||
</xsl:attribute-set>
|
||||
|
||||
<xsl:template match="/">
|
||||
<foo xsl:use-attribute-sets="foo"/>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:include href="91141c.xsl"/>
|
||||
</xsl:stylesheet>
|
|
@ -0,0 +1,4 @@
|
|||
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
|
||||
|
||||
<xsl:attribute-set name="bar" use-attribute-sets="boo"/>
|
||||
</xsl:stylesheet>
|
|
@ -0,0 +1,4 @@
|
|||
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
|
||||
|
||||
<xsl:attribute-set name="boo" use-attribute-sets="include_foo"/>
|
||||
</xsl:stylesheet>
|
|
@ -0,0 +1,4 @@
|
|||
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
|
||||
|
||||
<xsl:attribute-set name="include_foo" use-attribute-sets="foo"/>
|
||||
</xsl:stylesheet>
|
|
@ -0,0 +1,24 @@
|
|||
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
|
||||
<xsl:output encoding="UTF-16" omit-xml-declaration="no" indent="yes"/>
|
||||
|
||||
<xsl:attribute-set name="foo" use-attribute-sets="bar" >
|
||||
<xsl:attribute name="attr">123</xsl:attribute>
|
||||
</xsl:attribute-set>
|
||||
|
||||
<xsl:template match="/">
|
||||
<foo xsl:use-attribute-sets="foo bar"/>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:attribute-set name="bar" use-attribute-sets="blue">
|
||||
<xsl:attribute name="attrbar">abc</xsl:attribute>
|
||||
</xsl:attribute-set>
|
||||
|
||||
<xsl:attribute-set name="blue" use-attribute-sets="gee">
|
||||
<xsl:attribute name="attrbar">abc</xsl:attribute>
|
||||
</xsl:attribute-set>
|
||||
|
||||
<xsl:attribute-set name="gee" use-attribute-sets="foo">
|
||||
<xsl:attribute name="attrbar">abc</xsl:attribute>
|
||||
</xsl:attribute-set>
|
||||
|
||||
</xsl:stylesheet>
|
|
@ -0,0 +1,314 @@
|
|||
<!--XSLT 1.0 Tests-->
|
||||
<!--Copyright 2002 Microsoft Corporation. All Rights Reserved.-->
|
||||
<testcase name="AttributeSets" description="" outpath="out">
|
||||
<variation name="_91035">
|
||||
<description>NamedAttributeSets:Use-attribute-sets on xsl:element</description>
|
||||
<data>
|
||||
<xml>books.xml</xml>
|
||||
<xsl>91035.xsl</xsl>
|
||||
</data>
|
||||
<result expected="valid">91035.txt</result>
|
||||
</variation>
|
||||
<variation name="_91036">
|
||||
<description>NamedAttributeSets: Use-attribute-sets on xsl:copy</description>
|
||||
<data>
|
||||
<xml>books.xml</xml>
|
||||
<xsl>91036.xsl</xsl>
|
||||
</data>
|
||||
<result expected="invalid">
|
||||
</result>
|
||||
</variation>
|
||||
<variation name="_91037">
|
||||
<description>NamedAttributeSets: Use-attribute-sets on xsl:attribute-set</description>
|
||||
<data>
|
||||
<xml>books.xml</xml>
|
||||
<xsl>91037.xsl</xsl>
|
||||
</data>
|
||||
<result expected="valid">91037.txt</result>
|
||||
</variation>
|
||||
<variation name="_91038">
|
||||
<description>NamedAttributeSets: Xsl:use-attribute-sets on literal result element</description>
|
||||
<data>
|
||||
<xml>books.xml</xml>
|
||||
<xsl>91038.xsl</xsl>
|
||||
</data>
|
||||
<result expected="valid">91038.txt</result>
|
||||
</variation>
|
||||
<variation name="_91042">
|
||||
<description>NamedAttributeSets: xsl:variable, xsl:param declared in top level element, should be picked up in xsl:attribute-set</description>
|
||||
<data>
|
||||
<xml>books.xml</xml>
|
||||
<xsl>91042.xsl</xsl>
|
||||
</data>
|
||||
<result expected="valid">91042_output.txt</result>
|
||||
</variation>
|
||||
<variation name="_91043">
|
||||
<description>NamedAttributeSets: Set-attribute-sets name='foobar' while there is <xsl:attribute name='foobar'/> also exist under the attribute set.</description>
|
||||
<data>
|
||||
<xml>books.xml</xml>
|
||||
<xsl>91043.xsl</xsl>
|
||||
</data>
|
||||
<result expected="valid">91043_output.txt</result>
|
||||
</variation>
|
||||
<variation name="_91045">
|
||||
<description>NamedAttributeSets: Xsl:attribute-set with no xsl:attribute element</description>
|
||||
<data>
|
||||
<xml>books.xml</xml>
|
||||
<xsl>91045.xsl</xsl>
|
||||
</data>
|
||||
<result expected="valid">91045.txt</result>
|
||||
</variation>
|
||||
<variation name="_91046">
|
||||
<description>NamedAttributeSets: Xsl:attribute-set with thousand of xsl:attribute element (may take 30 seconds to finish loading)</description>
|
||||
<data>
|
||||
<xml>books.xml</xml>
|
||||
<xsl>91046.xsl</xsl>
|
||||
</data>
|
||||
<result expected="valid">91046.txt</result>
|
||||
</variation>
|
||||
<variation name="_91077">
|
||||
<description>NamedAttributeSets: Xsl:attribute-set contain same xsl:attribute node</description>
|
||||
<data>
|
||||
<xml>books.xml</xml>
|
||||
<xsl>91077.xsl</xsl>
|
||||
</data>
|
||||
<result expected="valid">91077.txt</result>
|
||||
</variation>
|
||||
<variation name="_91078">
|
||||
<description>NamedAttributeSets: regress for bug #50244 should not cause error on use-attribute-sets on xsl:attribute (regress for bug #50244)</description>
|
||||
<data>
|
||||
<xml>books.xml</xml>
|
||||
<xsl>91078.xsl</xsl>
|
||||
</data>
|
||||
<result expected="valid">91078.txt</result>
|
||||
</variation>
|
||||
<variation name="_91080">
|
||||
<description>NamedAttributeSets: Xsl:use-attribuet-sets on literal element which has some attributes</description>
|
||||
<data>
|
||||
<xml>books.xml</xml>
|
||||
<xsl>91080.xsl</xsl>
|
||||
</data>
|
||||
<result expected="valid">91080.txt</result>
|
||||
</variation>
|
||||
<variation name="_91081">
|
||||
<description>NamedAttributeSets: Xsl:use-attribuet-sets on literal element which has some attributes, and individual xsl:attribute nodes</description>
|
||||
<data>
|
||||
<xml>books.xml</xml>
|
||||
<xsl>91081.xsl</xsl>
|
||||
</data>
|
||||
<result expected="valid">91081.txt</result>
|
||||
</variation>
|
||||
<variation name="_91083">
|
||||
<description>NamedAttributeSets: Test that attributes in the specified attributes can be overridden by xsl:attribute (xsl:copy)</description>
|
||||
<data>
|
||||
<xml>books.xml</xml>
|
||||
<xsl>91083.xsl</xsl>
|
||||
</data>
|
||||
<result expected="valid">91083.txt</result>
|
||||
</variation>
|
||||
<variation name="_91084">
|
||||
<description>NamedAttributeSets: Test that specified attributes can be overridden by attributes from xsl:attribute (xsl:element)</description>
|
||||
<data>
|
||||
<xml>books.xml</xml>
|
||||
<xsl>91084.xsl</xsl>
|
||||
</data>
|
||||
<result expected="valid">91084.txt</result>
|
||||
</variation>
|
||||
<variation name="_91085">
|
||||
<description>NamedAttributeSets: xsl:param used in xsl:attribute-set, but pass in an object to change the value of xsl:param, the new value should be picked up in the xsl:attribute-set</description>
|
||||
<data>
|
||||
<xml>books.xml</xml>
|
||||
<xsl>91085.xsl</xsl>
|
||||
</data>
|
||||
<result expected="valid">91085.txt</result>
|
||||
</variation>
|
||||
<variation name="_91091">
|
||||
<description>NamedAttributeSets: Xsl: attribute-sets with no name attribute</description>
|
||||
<data>
|
||||
<xml>books.xml</xml>
|
||||
<xsl>91091.xsl</xsl>
|
||||
</data>
|
||||
<result expected="invalid">
|
||||
</result>
|
||||
</variation>
|
||||
<variation name="_91093">
|
||||
<description>NamedAttributeSets: Xsl:attribute-set within it declare non xsl:attribute node(text)</description>
|
||||
<data>
|
||||
<xml>books.xml</xml>
|
||||
<xsl>91093.xsl</xsl>
|
||||
</data>
|
||||
<result expected="invalid">
|
||||
</result>
|
||||
</variation>
|
||||
<variation name="_91094">
|
||||
<description>NamedAttributeSets: Xsl:attribute-set within it declare non xsl:attribute node(pi)</description>
|
||||
<data>
|
||||
<xml>books.xml</xml>
|
||||
<xsl>91094.xsl</xsl>
|
||||
</data>
|
||||
<result expected="invalid">
|
||||
</result>
|
||||
</variation>
|
||||
<variation name="_91095">
|
||||
<description>NamedAttributeSets: Xsl:attribute-set within it declare non xsl:attribute node(comment)</description>
|
||||
<data>
|
||||
<xml>books.xml</xml>
|
||||
<xsl>91095.xsl</xsl>
|
||||
</data>
|
||||
<result expected="invalid">
|
||||
</result>
|
||||
</variation>
|
||||
<variation name="_91096">
|
||||
<description>NamedAttributeSets: Xsl:attribute-set within it declare non xsl:attribute node(literal element)</description>
|
||||
<data>
|
||||
<xml>books.xml</xml>
|
||||
<xsl>91096.xsl</xsl>
|
||||
</data>
|
||||
<result expected="invalid">
|
||||
</result>
|
||||
</variation>
|
||||
<variation name="_91097">
|
||||
<description>NamedAttributeSets: Xsl:attribute-set within it declare non xsl:attribute node( xsl:element)</description>
|
||||
<data>
|
||||
<xml>books.xml</xml>
|
||||
<xsl>91097.xsl</xsl>
|
||||
</data>
|
||||
<result expected="invalid">
|
||||
</result>
|
||||
</variation>
|
||||
<variation name="_91098">
|
||||
<description>NamedAttributeSets: use-attribute-sets used in xsl:text, cdata, apply-templates, for-each, value-of and all other xsl: nodes</description>
|
||||
<data>
|
||||
<xml>books.xml</xml>
|
||||
<xsl>91098.xsl</xsl>
|
||||
</data>
|
||||
<result expected="valid">91098.txt</result>
|
||||
</variation>
|
||||
<variation name="_91099">
|
||||
<description>NamedAttributeSets: use-attribute-sets used in xsl:comment (regress for bug #50251)</description>
|
||||
<data>
|
||||
<xml>books.xml</xml>
|
||||
<xsl>91099.xsl</xsl>
|
||||
</data>
|
||||
<result expected="invalid">
|
||||
</result>
|
||||
</variation>
|
||||
<variation name="_91100">
|
||||
<description>NamedAttributeSets: use-attribute-sets used in xsl:text, comment, cdata, apply-templates, for-each, value-of (with import)</description>
|
||||
<data>
|
||||
<xml>books.xml</xml>
|
||||
<xsl>91100.xsl</xsl>
|
||||
</data>
|
||||
<result expected="valid">91100.txt</result>
|
||||
</variation>
|
||||
<variation name="_91101">
|
||||
<description>NamedAttributeSets: Use-attribute-sets attributes on xsl:attribute-set elements causes an attribute to directly use itself (cycle1)</description>
|
||||
<data>
|
||||
<xml>books.xml</xml>
|
||||
<xsl>91101.xsl</xsl>
|
||||
</data>
|
||||
<result expected="invalid"></result>
|
||||
</variation>
|
||||
<variation name="_91119">
|
||||
<description>NamedAttributeSets: Use-attribute-sets attributes on xsl:attribute-set elements causes an attribute to indirectly use itself (cycle2)</description>
|
||||
<data>
|
||||
<xml>books.xml</xml>
|
||||
<xsl>91119.xsl</xsl>
|
||||
</data>
|
||||
<result expected="valid">91119.txt</result>
|
||||
</variation>
|
||||
<variation name="_91120">
|
||||
<description>NamedAttributeSets: Use-attribute-sets attributes on xsl:attribute-set elements causes an attribute to indirectly use itself (cycle2-circular referencing) (Regress for Bug#50268)</description>
|
||||
<data>
|
||||
<xml>books.xml</xml>
|
||||
<xsl>91120.xsl</xsl>
|
||||
</data>
|
||||
<result expected="invalid">
|
||||
</result>
|
||||
</variation>
|
||||
<variation name="_91139">
|
||||
<description>NamedAttributeSets: xsl:variable, xsl:param declared in non-top level element should not be picked up in xsl:attribute-set</description>
|
||||
<data>
|
||||
<xml>books.xml</xml>
|
||||
<xsl>91139.xsl</xsl>
|
||||
</data>
|
||||
<result expected="invalid">
|
||||
</result>
|
||||
</variation>
|
||||
<variation name="_91140">
|
||||
<description>NamedAttributeSets: Use-attribute-sets attributes on xsl:attribute-set elements causes an attribute to indirectly use itself (cycle from xsl:import,</description>
|
||||
<data>
|
||||
<xml>books.xml</xml>
|
||||
<xsl>91140.xsl</xsl>
|
||||
</data>
|
||||
<result expected="invalid">
|
||||
</result>
|
||||
</variation>
|
||||
<variation name="_91141">
|
||||
<description>NamedAttributeSets: Use-attribute-sets attributes on xsl:attribute-set elements causes an attribute to indirectly use itself (cycle from xsl:copy, xsl:include</description>
|
||||
<data>
|
||||
<xml>books.xml</xml>
|
||||
<xsl>91141.xsl</xsl>
|
||||
</data>
|
||||
<result expected="invalid">
|
||||
</result>
|
||||
</variation>
|
||||
<variation name="_91142">
|
||||
<description>NamedAttributeSets: Use-attribute-sets attributes on xsl:attribute-set elements causes an attribute to indirectly use itself (3 sets to loop back)</description>
|
||||
<data>
|
||||
<xml>books.xml</xml>
|
||||
<xsl>91142.xsl</xsl>
|
||||
</data>
|
||||
<result expected="invalid">
|
||||
</result>
|
||||
</variation>
|
||||
<variation name="AttributeSets_EmptyAttribSet">
|
||||
<description>NamedAttributeSets: Use of an empty attribute set should not throw an error. [Bug 70879]</description>
|
||||
<data>
|
||||
<xml>xslt_attributeset_empty.xml</xml>
|
||||
<xsl>xslt_attributeset_empty.xsl</xsl>
|
||||
</data>
|
||||
<result expected="valid">xslt_attributeset_empty.txt</result>
|
||||
</variation>
|
||||
<variation name="AttributeSets_ImportAttributeSetOfSameName">
|
||||
<description>Use an attribute set that imports an attribute-set that uses the same name. Same values should be respected by import precedence. Different/New values should be merged. [Bug 65665]</description>
|
||||
<data>
|
||||
<xml>xslt_attributeset_ImportSameName.xml</xml>
|
||||
<xsl>xslt_attributeset_ImportSameName.xsl</xsl>
|
||||
</data>
|
||||
<result expected="valid">xslt_attributeset_ImportSameName_result.txt</result>
|
||||
</variation>
|
||||
<variation name="AttributeSets_IncludeAttributeSetOfSamePrecedence">
|
||||
<description>Use an attribute set that has the same name as an included import set (a couple of the same attributes). The attributes in the result document that have the same import precedence, should be chosen based on the last attribute specified in the stylesheet (according to the spec). [Bug 65665]</description>
|
||||
<data>
|
||||
<xml>xslt_attributeset_ImportSamePrec.xml</xml>
|
||||
<xsl>xslt_attributeset_ImportSamePrec.xsl</xsl>
|
||||
</data>
|
||||
<result expected="valid">xslt_attributeset_ImportSamePrec_result.txt</result>
|
||||
</variation>
|
||||
<variation name="AttributeSets_WithPI">
|
||||
<description>NamedAttributeSets: Should not get a compile error when using a PI within attribute-set content. [Bug 70882]</description>
|
||||
<data>
|
||||
<xml>xslt_attributeset_with_pi.xml</xml>
|
||||
<xsl>xslt_attributeset_with_pi.xsl</xsl>
|
||||
</data>
|
||||
<result expected="valid">xslt_attributeset_with_pi.txt</result>
|
||||
</variation>
|
||||
<variation name="DoeInAttributeWithinAttributeSet">
|
||||
<description>Use xsl:text within in an attribute that is within an attributeset. The xsl:text element has a disable-output-escaping attribute equal to yes. The doe attribute should be ignored. [Bug 53329]</description>
|
||||
<data>
|
||||
<xml>DoeWithAttributeSets.xml</xml>
|
||||
<xsl>DoeWithAttributeSets.xsl</xsl>
|
||||
</data>
|
||||
<result expected="valid">DoeWithAttributeSets_Result.txt</result>
|
||||
</variation>
|
||||
<variation name="RefToUndefinedAttributeSet">
|
||||
<description>NamedAttributeSets: Should get a compile error when use-attribute-sets contains a reference to an undefined attribute-set. [Bug 71236]</description>
|
||||
<data>
|
||||
<xml>foo.xml</xml>
|
||||
<xsl>xslt_attributeset_undefined_ref.xsl</xsl>
|
||||
</data>
|
||||
<result expected="invalid">
|
||||
</result>
|
||||
</variation>
|
||||
</testcase>
|
|
@ -0,0 +1,4 @@
|
|||
<?xml version="1.0"?>
|
||||
<root>
|
||||
<text>blah</text>
|
||||
</root>
|
|
@ -0,0 +1,29 @@
|
|||
<?xml version="1.0" ?>
|
||||
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
|
||||
|
||||
<!-- Test for DCR 53329. -->
|
||||
|
||||
<xsl:output method="xml" omit-xml-declaration="no" indent="no" encoding='utf-8' />
|
||||
|
||||
<xsl:template match="/">
|
||||
<bareroot>
|
||||
<litresult xsl:use-attribute-sets='foo'>foobar</litresult>
|
||||
</bareroot>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:attribute-set name='foo'>
|
||||
<xsl:attribute name='green-lantern'>
|
||||
<xsl:text disable-output-escaping='no'><lantern</xsl:text>
|
||||
</xsl:attribute>
|
||||
|
||||
<xsl:attribute name='silver-surfer'>
|
||||
<xsl:text disable-output-escaping='yes'>"silver" < > '</xsl:text>
|
||||
</xsl:attribute>
|
||||
|
||||
<xsl:attribute name='green-arrow'>
|
||||
<xsl:text>green < &</xsl:text>
|
||||
</xsl:attribute>
|
||||
|
||||
</xsl:attribute-set>
|
||||
|
||||
</xsl:stylesheet>
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue