You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@xalan.apache.org by dm...@locus.apache.org on 2000/12/17 22:20:07 UTC
cvs commit: xml-xalan/test/tests/conf/attribset inclattset38t.xsl attribset01.xsl attribset02.xml attribset02.xsl attribset03.xml attribset03.xsl attribset04.xml attribset04.xsl attribset05.xml attribset05.xsl attribset06.xml attribset06.xsl attribset07.xml attribset07.xsl attribset08.xml attribset08.xsl attribset09.xml attribset09.xsl attribset10.xml attribset10.xsl attribset11.xml attribset11.xsl attribset12.xml attribset12.xsl attribset13.xml attribset13.xsl attribset14.xml attribset14.xsl attribset15.xml attribset15.xsl attribset16.xml attribset16.xsl attribset17.xml attribset17.xsl attribset18.xml attribset18.xsl attribset19.xml attribset19.xsl attribset20.xml attribset20.xsl attribset22.xml attribset22.xsl attribset23.xml attribset23.xsl attribset24.xml attribset24.xsl attribset25.xml attribset25.xsl attribset28.xml attribset28.xsl attribset32.xml attribset32.xsl attribset35.xml attribset35.xsl attribset36.xml attribset36.xsl attribset37.xml attribset37.xsl attribset38.xml attribset38.xsl impattset37a.xsl impattset37t.xsl inclattset38a.xsl attribset01.xml
dmarston 00/12/17 13:20:06
Added: test/tests/conf/attribset inclattset38t.xsl attribset01.xsl
attribset02.xml attribset02.xsl attribset03.xml
attribset03.xsl attribset04.xml attribset04.xsl
attribset05.xml attribset05.xsl attribset06.xml
attribset06.xsl attribset07.xml attribset07.xsl
attribset08.xml attribset08.xsl attribset09.xml
attribset09.xsl attribset10.xml attribset10.xsl
attribset11.xml attribset11.xsl attribset12.xml
attribset12.xsl attribset13.xml attribset13.xsl
attribset14.xml attribset14.xsl attribset15.xml
attribset15.xsl attribset16.xml attribset16.xsl
attribset17.xml attribset17.xsl attribset18.xml
attribset18.xsl attribset19.xml attribset19.xsl
attribset20.xml attribset20.xsl attribset22.xml
attribset22.xsl attribset23.xml attribset23.xsl
attribset24.xml attribset24.xsl attribset25.xml
attribset25.xsl attribset28.xml attribset28.xsl
attribset32.xml attribset32.xsl attribset35.xml
attribset35.xsl attribset36.xml attribset36.xsl
attribset37.xml attribset37.xsl attribset38.xml
attribset38.xsl impattset37a.xsl impattset37t.xsl
inclattset38a.xsl attribset01.xml
Log:
Copy of tests in Lotus/IBM repository
Revision Changes Path
1.1 xml-xalan/test/tests/conf/attribset/inclattset38t.xsl
Index: inclattset38t.xsl
===================================================================
<?xml version="1.0"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<!-- FileName: InclAttSet38t -->
<!-- Purpose: Holds template and attribute-set definition to be included. -->
<xsl:template match="doc">
<xsl:apply-templates/>
</xsl:template>
<xsl:template match="foo">
<xsl:element name="foocopy" use-attribute-sets="colorset decoset fontset">
<xsl:value-of select="."/>
</xsl:element>
</xsl:template>
<xsl:attribute-set name="fontset">
<xsl:attribute name="font-size">14pt</xsl:attribute>
</xsl:attribute-set>
</xsl:stylesheet>
1.1 xml-xalan/test/tests/conf/attribset/attribset01.xsl
Index: attribset01.xsl
===================================================================
<?xml version="1.0"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<!-- FileName: attribset01 -->
<!-- Document: http://www.w3.org/TR/xslt -->
<!-- DocVersion: 19991116 -->
<!-- Section: 7.1.4 Named Attribute Sets -->
<!-- Creator: Paul Dick -->
<!-- Purpose: Set attribute of a LRE from single attribute set. -->
<xsl:attribute-set name="set1">
<xsl:attribute name="color">black</xsl:attribute>
</xsl:attribute-set>
<xsl:template match="/">
<out>
<test1 xsl:use-attribute-sets="set1"></test1>
</out>
</xsl:template>
</xsl:stylesheet>
1.1 xml-xalan/test/tests/conf/attribset/attribset02.xml
Index: attribset02.xml
===================================================================
<?xml version="1.0"?>
<doc>
<foo>a</foo>
</doc>
1.1 xml-xalan/test/tests/conf/attribset/attribset02.xsl
Index: attribset02.xsl
===================================================================
<?xml version="1.0"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<!-- FileName: attribset02 -->
<!-- Document: http://www.w3.org/TR/xslt -->
<!-- DocVersion: 19991116 -->
<!-- Section: 7.1.4 Named Attribute Sets -->
<!-- Creator: Paul Dick -->
<!-- Purpose: Set attributes of a LRE from multiple attribute sets. -->
<xsl:template match="/">
<out>
<test1 xsl:use-attribute-sets="set1 set2"></test1>
</out>
</xsl:template>
<xsl:attribute-set name="set2">
<xsl:attribute name="text-decoration">underline</xsl:attribute>
</xsl:attribute-set>
<xsl:attribute-set name="set1">
<xsl:attribute name="color">black</xsl:attribute>
</xsl:attribute-set>
</xsl:stylesheet>
1.1 xml-xalan/test/tests/conf/attribset/attribset03.xml
Index: attribset03.xml
===================================================================
<?xml version="1.0"?>
<doc>
<foo>a</foo>
</doc>
1.1 xml-xalan/test/tests/conf/attribset/attribset03.xsl
Index: attribset03.xsl
===================================================================
<?xml version="1.0"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<!-- FileName: attribset03 -->
<!-- Document: http://www.w3.org/TR/xslt -->
<!-- DocVersion: 19991116 -->
<!-- Section: 7.1.4 -->
<!-- Creator: Paul Dick -->
<!-- Purpose: Use xsl:element with multiple attribute sets. -->
<xsl:template match="/">
<out>
<xsl:element name="test" use-attribute-sets="set1 set2"/>
</out>
</xsl:template>
<xsl:attribute-set name="set2">
<xsl:attribute name="text-decoration">underline</xsl:attribute>
</xsl:attribute-set>
<xsl:attribute-set name="set1">
<xsl:attribute name="color">black</xsl:attribute>
</xsl:attribute-set>
</xsl:stylesheet>
1.1 xml-xalan/test/tests/conf/attribset/attribset04.xml
Index: attribset04.xml
===================================================================
<?xml version="1.0"?>
<doc>
<foo>a</foo>
</doc>
1.1 xml-xalan/test/tests/conf/attribset/attribset04.xsl
Index: attribset04.xsl
===================================================================
<?xml version="1.0"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<!-- FileName: attribset04 -->
<!-- Document: http://www.w3.org/TR/xslt -->
<!-- DocVersion: 19991116 -->
<!-- Section: 7.1.4 -->
<!-- Creator: Paul Dick -->
<!-- Purpose: Use xsl:copy with multiple attribute sets, no conflicts. -->
<xsl:template match="foo">
<out>
<xsl:copy use-attribute-sets="set1 set2"/>
</out>
</xsl:template>
<xsl:attribute-set name="set2">
<xsl:attribute name="text-decoration">underline</xsl:attribute>
</xsl:attribute-set>
<xsl:attribute-set name="set1">
<xsl:attribute name="color">black</xsl:attribute>
</xsl:attribute-set>
</xsl:stylesheet>
1.1 xml-xalan/test/tests/conf/attribset/attribset05.xml
Index: attribset05.xml
===================================================================
<?xml version="1.0"?>
<doc>
<foo>a</foo>
</doc>
1.1 xml-xalan/test/tests/conf/attribset/attribset05.xsl
Index: attribset05.xsl
===================================================================
<?xml version="1.0"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<!-- FileName: attribset05 -->
<!-- Document: http://www.w3.org/TR/xslt -->
<!-- DocVersion: 19991116 -->
<!-- Section: 7.1.4 Named Attribute Sets -->
<!-- Creator: Paul Dick -->
<!-- Purpose: Set attributes of a LRE using attribute sets that inherit. -->
<xsl:template match="/">
<out>
<test1 xsl:use-attribute-sets="set1"></test1>
</out>
</xsl:template>
<xsl:attribute-set name="set2" use-attribute-sets="set3">
<xsl:attribute name="text-decoration">underline</xsl:attribute>
</xsl:attribute-set>
<xsl:attribute-set name="set1" use-attribute-sets="set2">
<xsl:attribute name="color">black</xsl:attribute>
</xsl:attribute-set>
<xsl:attribute-set name="set3">
<xsl:attribute name="font-size">14pt</xsl:attribute>
</xsl:attribute-set>
</xsl:stylesheet>
1.1 xml-xalan/test/tests/conf/attribset/attribset06.xml
Index: attribset06.xml
===================================================================
<?xml version="1.0"?>
<doc>
<foo>a</foo>
</doc>
1.1 xml-xalan/test/tests/conf/attribset/attribset06.xsl
Index: attribset06.xsl
===================================================================
<?xml version="1.0"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<!-- FileName: attribset06 -->
<!-- Document: http://www.w3.org/TR/xslt -->
<!-- DocVersion: 19991116 -->
<!-- Section: 7.1.4 Named Attribute Sets -->
<!-- Creator: Paul Dick -->
<!-- Purpose: Set attributes of a LRE using attribute sets that
inherit, plus add overlapping attribute with xsl:attribute. -->
<xsl:template match="/">
<out>
<test1 xsl:use-attribute-sets="set1">
<xsl:attribute name="text-decoration">none</xsl:attribute>
</test1>
</out>
</xsl:template>
<xsl:attribute-set name="set2" use-attribute-sets="set3">
<xsl:attribute name="text-decoration">underline</xsl:attribute>
</xsl:attribute-set>
<xsl:attribute-set name="set1" use-attribute-sets="set2">
<xsl:attribute name="color">black</xsl:attribute>
</xsl:attribute-set>
<xsl:attribute-set name="set3">
<xsl:attribute name="font-size">14pt</xsl:attribute>
</xsl:attribute-set>
</xsl:stylesheet>
1.1 xml-xalan/test/tests/conf/attribset/attribset07.xml
Index: attribset07.xml
===================================================================
<?xml version="1.0"?>
<doc>
<foo>a</foo>
</doc>
1.1 xml-xalan/test/tests/conf/attribset/attribset07.xsl
Index: attribset07.xsl
===================================================================
<?xml version="1.0"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<!-- FileName: attribset07 -->
<!-- Document: http://www.w3.org/TR/xslt -->
<!-- DocVersion: 19991116 -->
<!-- Section: 7.1.4 Named Attribute Sets -->
<!-- Paragraph: 3 -->
<!-- Creator: Paul Dick -->
<!-- Purpose: Set attributes of a LRE using attribute sets that
inherit, but have overlapping attributes. -->
<xsl:template match="/">
<out>
<test1 xsl:use-attribute-sets="set1">
</test1>
</out>
</xsl:template>
<xsl:attribute-set name="set2" use-attribute-sets="set3">
<xsl:attribute name="color">blue</xsl:attribute>
</xsl:attribute-set>
<xsl:attribute-set name="set1" use-attribute-sets="set2">
<xsl:attribute name="color">black</xsl:attribute>
</xsl:attribute-set>
<xsl:attribute-set name="set3">
<xsl:attribute name="color">green</xsl:attribute>
</xsl:attribute-set>
</xsl:stylesheet>
1.1 xml-xalan/test/tests/conf/attribset/attribset08.xml
Index: attribset08.xml
===================================================================
<?xml version="1.0"?>
<doc>
<foo>a</foo>
</doc>
1.1 xml-xalan/test/tests/conf/attribset/attribset08.xsl
Index: attribset08.xsl
===================================================================
<?xml version="1.0"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<!-- FileName: attribset08 -->
<!-- Document: http://www.w3.org/TR/xslt -->
<!-- DocVersion: 19991116 -->
<!-- Section: 7.1.4 -->
<!-- Creator: Paul Dick -->
<!-- Purpose: Use xsl:element with attribute sets that inherit, plus add overlapping attribute with xsl:attribute. -->
<xsl:template match="/">
<out>
<xsl:element name="test" use-attribute-sets="set1">
<xsl:attribute name="text-decoration">none</xsl:attribute>
</xsl:element>
</out>
</xsl:template>
<xsl:attribute-set name="set1" use-attribute-sets="set2">
<xsl:attribute name="color">black</xsl:attribute>
</xsl:attribute-set>
<xsl:attribute-set name="set2" use-attribute-sets="set3">
<xsl:attribute name="text-decoration">underline</xsl:attribute>
</xsl:attribute-set>
<xsl:attribute-set name="set3">
<xsl:attribute name="font-size">14pt</xsl:attribute>
</xsl:attribute-set>
</xsl:stylesheet>
1.1 xml-xalan/test/tests/conf/attribset/attribset09.xml
Index: attribset09.xml
===================================================================
<?xml version="1.0"?>
<doc>
<foo>a</foo>
</doc>
1.1 xml-xalan/test/tests/conf/attribset/attribset09.xsl
Index: attribset09.xsl
===================================================================
<?xml version="1.0"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<!-- FileName: attribset09 -->
<!-- Document: http://www.w3.org/TR/xslt -->
<!-- DocVersion: 19991116 -->
<!-- Section: 7.1.4 -->
<!-- Creator: Paul Dick -->
<!-- Purpose: Use xsl:copy with attribute sets that inherit, plus add overlapping attribute with xsl:attribute. -->
<xsl:template match="foo">
<out>
<xsl:copy use-attribute-sets="set1">
<xsl:attribute name="text-decoration">none</xsl:attribute>
</xsl:copy>
</out>
</xsl:template>
<xsl:attribute-set name="set2" use-attribute-sets="set3">
<xsl:attribute name="text-decoration">underline</xsl:attribute>
</xsl:attribute-set>
<xsl:attribute-set name="set1" use-attribute-sets="set2">
<xsl:attribute name="color">black</xsl:attribute>
</xsl:attribute-set>
<xsl:attribute-set name="set3">
<xsl:attribute name="font-size">14pt</xsl:attribute>
</xsl:attribute-set>
</xsl:stylesheet>
1.1 xml-xalan/test/tests/conf/attribset/attribset10.xml
Index: attribset10.xml
===================================================================
<?xml version="1.0"?>
<doc>
<foo>a</foo>
</doc>
1.1 xml-xalan/test/tests/conf/attribset/attribset10.xsl
Index: attribset10.xsl
===================================================================
<?xml version="1.0"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<!-- FileName: attribset10 -->
<!-- Document: http://www.w3.org/TR/xslt -->
<!-- DocVersion: 19991116 -->
<!-- Section: 7.1.4 Named Attribute Sets -->
<!-- Creator: Paul Dick -->
<!-- Purpose: Set attributes of an LRE, using attribute sets whose
names overlap, plus add overlapping attribute with xsl:attribute. -->
<xsl:template match="/">
<out>
<test xsl:use-attribute-sets="set1">
<xsl:attribute name="text-decoration">none</xsl:attribute>
</test>
</out>
</xsl:template>
<xsl:attribute-set name="set1">
<xsl:attribute name="text-decoration">underline</xsl:attribute>
</xsl:attribute-set>
<xsl:attribute-set name="set1">
<xsl:attribute name="color">black</xsl:attribute>
</xsl:attribute-set>
<xsl:attribute-set name="set1">
<xsl:attribute name="font-size">14pt</xsl:attribute>
</xsl:attribute-set>
</xsl:stylesheet>
1.1 xml-xalan/test/tests/conf/attribset/attribset11.xml
Index: attribset11.xml
===================================================================
<?xml version="1.0"?>
<doc>
<foo>a</foo>
</doc>
1.1 xml-xalan/test/tests/conf/attribset/attribset11.xsl
Index: attribset11.xsl
===================================================================
<?xml version="1.0"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<!-- FileName: attribset11 -->
<!-- Document: http://www.w3.org/TR/xslt -->
<!-- DocVersion: 19991116 -->
<!-- SECTION: 7.1.4 Named Attribute Sets -->
<!-- Creator: Paul Dick -->
<!-- PURPOSE: Set attributes of an LRE, using one attribute set with
multiple attributes, and one overriding LRE attribute. -->
<xsl:attribute-set name="set1">
<xsl:attribute name="color">black</xsl:attribute>
<xsl:attribute name="font-size">14pt</xsl:attribute>
<xsl:attribute name="font-weight">bold</xsl:attribute>
</xsl:attribute-set>
<xsl:template match="/">
<out>
<test1 xsl:use-attribute-sets="set1" font-size="10pt"></test1>
</out>
</xsl:template>
</xsl:stylesheet>
1.1 xml-xalan/test/tests/conf/attribset/attribset12.xml
Index: attribset12.xml
===================================================================
<?xml version="1.0"?>
<doc>
<foo>a</foo>
</doc>
1.1 xml-xalan/test/tests/conf/attribset/attribset12.xsl
Index: attribset12.xsl
===================================================================
<?xml version="1.0"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<!-- FileName: attribset12 -->
<!-- Document: http://www.w3.org/TR/xslt -->
<!-- DocVersion: 19991116 -->
<!-- Section: 7.1.4 Named Attribute Sets -->
<!-- Paragraph: 3 -->
<!-- Creator: Paul Dick -->
<!-- Purpose: Set attributes of an LRE, using one attribute set with
multiple attributes, and one overriding LRE attribute, and one
overriding xsl:attribute attribute. -->
<xsl:attribute-set name="set1">
<xsl:attribute name="color">black</xsl:attribute>
<xsl:attribute name="font-size">14pt</xsl:attribute>
<xsl:attribute name="font-weight">bold</xsl:attribute>
</xsl:attribute-set>
<xsl:template match="/">
<out>
<test1 xsl:use-attribute-sets="set1" font-size="10pt">
<xsl:attribute name="font-size">24pt</xsl:attribute>
</test1>
</out>
</xsl:template>
</xsl:stylesheet>
1.1 xml-xalan/test/tests/conf/attribset/attribset13.xml
Index: attribset13.xml
===================================================================
<?xml version="1.0"?>
<doc/>
1.1 xml-xalan/test/tests/conf/attribset/attribset13.xsl
Index: attribset13.xsl
===================================================================
<?xml version="1.0"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
xmlns:ped="http://ped.test.com">
<!-- FileName: attribset13 -->
<!-- Document: http://www.w3.org/TR/xslt -->
<!-- DocVersion: 19991116 -->
<!-- Section: 7.1.3 Creating Attributes -->
<!-- Creator: Paul Dick -->
<!-- Purpose: Creating attribute for Literal Result Element. The expanded-name of
the attribute to be created is specified by a required name attribute and an
optional namespace attribute -->
<xsl:template match="doc">
<out>
<xsl:attribute name="test1">LRE Attribute</xsl:attribute>
<xsl:attribute name="test2" namespace="http://ped.test.com">LRE Attribute</xsl:attribute>
</out>
</xsl:template>
</xsl:stylesheet>
1.1 xml-xalan/test/tests/conf/attribset/attribset14.xml
Index: attribset14.xml
===================================================================
<?xml version="1.0"?>
<doc/>
1.1 xml-xalan/test/tests/conf/attribset/attribset14.xsl
Index: attribset14.xsl
===================================================================
<?xml version="1.0"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
xmlns:ped="http://ped.test.com">
<!-- FileName: attribset14 -->
<!-- Document: http://www.w3.org/TR/xslt -->
<!-- DocVersion: 19991116 -->
<!-- Section: 7.1.3 Creating Attributes -->
<!-- Creator: Paul Dick -->
<!-- Purpose: Use xsl:element with attribute having a namespace. The expanded-name of
the attribute to be created is specified by a required name attribute and an
optional namespace attribute -->
<xsl:template match="doc">
<xsl:element name="ped:Out">
<xsl:attribute name="test1">xsl:element Attribute</xsl:attribute>
<xsl:attribute name="test2" namespace="http://ped.test.com">xsl:element Attribute</xsl:attribute>
</xsl:element>
</xsl:template>
</xsl:stylesheet>
1.1 xml-xalan/test/tests/conf/attribset/attribset15.xml
Index: attribset15.xml
===================================================================
<?xml version="1.0"?>
<doc>
<First at="Att1"/>
<Second at="ped:Att2"/>
<Third at="xyz:Att3"/>
<Fourth at="xmlns"/>
</doc>
1.1 xml-xalan/test/tests/conf/attribset/attribset15.xsl
Index: attribset15.xsl
===================================================================
<?xml version="1.0"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
xmlns:ped="http://ped.test.com">
<!-- FileName: attribset15 -->
<!-- Document: http://www.w3.org/TR/xslt -->
<!-- DocVersion: 19991116 -->
<!-- Section: 7.1.3 Creating Attributes -->
<!-- Creator: Paul Dick -->
<!-- Purpose: The name attribute is interpreted as an attribute value template.
It is an error if the value of the AVT is not a QNAME or the string "xmlns".
(Last two xsl:attributes test this) -->
<xsl:template match="/">
<out xmlns:this="http://www.this.com">
<xsl:attribute name="{doc/First/@at}">First</xsl:attribute>
<xsl:attribute name="{doc/Second/@at}">Second</xsl:attribute>
<xsl:attribute name="{doc/Third/@at}">Third</xsl:attribute>
<xsl:attribute name="xmlns">xmlns</xsl:attribute>
</out>
</xsl:template>
</xsl:stylesheet>
1.1 xml-xalan/test/tests/conf/attribset/attribset16.xml
Index: attribset16.xml
===================================================================
<?xml version="1.0"?>
<docs>
<a href="http://www.ns0.com">Attr0</a>
<b href="">Attr1</b>
</docs>
1.1 xml-xalan/test/tests/conf/attribset/attribset16.xsl
Index: attribset16.xsl
===================================================================
<?xml version="1.0"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
xmlns:ped="http://ped.test.com">
<!-- FileName: attribset16 -->
<!-- Document: http://www.w3.org/TR/xslt -->
<!-- DocVersion: 19991116 -->
<!-- Section: 7.1.3 Creating Attributes -->
<!-- Creator: Paul Dick -->
<!-- Purpose: The namespace attribute is interpreted as an attribute value template. -->
<xsl:template match="/">
<root><xsl:text> </xsl:text>
<Out>
<xsl:attribute name="{docs/a}" namespace="{docs/a/@href}">Hello</xsl:attribute>
<xsl:attribute name="{docs/b}" namespace="{docs/b/@href}">Whatsup</xsl:attribute>
<xsl:attribute name="Attr2" namespace="http://ped.test.com">Goodbye</xsl:attribute>
</Out>
</root>
</xsl:template>
</xsl:stylesheet>
1.1 xml-xalan/test/tests/conf/attribset/attribset17.xml
Index: attribset17.xml
===================================================================
<?xml version="1.0"?>
<ticket>
<input>
<zoneone checked="1">Zoneone
</zoneone>
</input>
</ticket>
1.1 xml-xalan/test/tests/conf/attribset/attribset17.xsl
Index: attribset17.xsl
===================================================================
<?xml version="1.0"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<xsl:output method="html"/>
<!-- FileName: attribset17 -->
<!-- Document: http://www.w3.org/TR/xslt -->
<!-- DocVersion: 19991116 -->
<!-- Section: 7.1.3 Creating Attributes -->
<!-- Creator: Paul Dick -->
<!-- Purpose: Verify that 'checked' attribute of HTML element input is correctly set. -->
<xsl:template match="ticket/input">
<HTML>
<Form>
<xsl:value-of select="zoneone"/>
<Input Type="checkbox" Name="zoneone">
<xsl:if test="zoneone/@checked='1'">
<xsl:attribute name="CHECKED">1</xsl:attribute>
</xsl:if>
</Input>
</Form>
</HTML>
</xsl:template>
</xsl:stylesheet>
1.1 xml-xalan/test/tests/conf/attribset/attribset18.xml
Index: attribset18.xml
===================================================================
<?xml version="1.0"?>
<doc>
</doc>
1.1 xml-xalan/test/tests/conf/attribset/attribset18.xsl
Index: attribset18.xsl
===================================================================
<?xml version="1.0"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
xmlns:ped="http://www.ped.com"
xmlns:bdd="http://www.bdd.com">
<!-- FileName: attribset18 -->
<!-- Document: http://www.w3.org/TR/xslt -->
<!-- DocVersion: 19991116 -->
<!-- Section: 7.1.3 Creating Attributes -->
<!-- Creator: Paul Dick -->
<!-- Purpose: Verify adding an attribute to an element replaces any
existing attribute of that element with the same expanded name. -->
<xsl:template match="/">
<root><xsl:text> </xsl:text>
<Out>
<xsl:attribute name="attr1">Wrong</xsl:attribute>
<xsl:attribute name="ped:attr1">Wrong</xsl:attribute>
<xsl:attribute name="bdd:attr1">Wrong</xsl:attribute>
<xsl:attribute name="attr2">Wrong</xsl:attribute>
<xsl:attribute name="bdd:attr1">Test1-OK</xsl:attribute>
<xsl:attribute name="ped:attr1">Test2-OK</xsl:attribute>
<xsl:attribute name="attr1">Hello</xsl:attribute>
<xsl:attribute name="attr2">Test2</xsl:attribute>
<xsl:attribute name="attr2">Goodbye</xsl:attribute>
</Out>
</root>
</xsl:template>
</xsl:stylesheet>
1.1 xml-xalan/test/tests/conf/attribset/attribset19.xml
Index: attribset19.xml
===================================================================
<?xml version="1.0"?>
<doc>
</doc>
1.1 xml-xalan/test/tests/conf/attribset/attribset19.xsl
Index: attribset19.xsl
===================================================================
<?xml version="1.0"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<!-- FileName: attribset19 -->
<!-- Document: http://www.w3.org/TR/xslt -->
<!-- DocVersion: 19991116 -->
<!-- Section: 7.1.3 Creating Attributes -->
<!-- Creator: Paul Dick -->
<!-- Purpose: Verify adding an attribute to an element after children
have been added to it is an error. The attributes can be ignored.-->
<xsl:template match="doc">
<Out>
<xsl:element name="Element1">
<xsl:attribute name="Att1">OK</xsl:attribute>
</xsl:element>
<xsl:attribute name="Att1">Wrong</xsl:attribute>
<xsl:attribute name="Att1">Still-Wrong</xsl:attribute>
</Out>
</xsl:template>
</xsl:stylesheet>
1.1 xml-xalan/test/tests/conf/attribset/attribset20.xml
Index: attribset20.xml
===================================================================
<?xml version="1.0"?>
<docs>
<doc xmlns:ped="http://www.ped.com">
<foo ped:att1="a"/>
<outer xml:att1="b"/>
</doc>
<doc xmlns:ped="http://www.ped.com">
<inner ped:att1="c"/>
<foo xml:att1="d"/>
</doc>
</docs>
1.1 xml-xalan/test/tests/conf/attribset/attribset20.xsl
Index: attribset20.xsl
===================================================================
<?xml version="1.0"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
xmlns:ped="http://www.ped.com"
exclude-result-prefixes="ped">
<!-- FileName: attribset20 -->
<!-- Document: http://www.w3.org/TR/xpath -->
<!-- DocVersion: 19991116 -->
<!-- Section: 2.2 -->
<!-- Creator: Paul Dick -->
<!-- Purpose: Test for selecting attributes with xml namespace prefix. -->
<xsl:template match="/docs">
<out>
<xsl:for-each select="doc">
<xsl:apply-templates/>
</xsl:for-each>
</out>
</xsl:template>
<xsl:template match="*">
<xsl:value-of select="@ped:att1"/>
<xsl:value-of select="@xml:att1"/>
</xsl:template>
</xsl:stylesheet>
1.1 xml-xalan/test/tests/conf/attribset/attribset22.xml
Index: attribset22.xml
===================================================================
<?xml version="1.0"?>
<docs>
<doc1>
<a level="1">A1</a>
<b level="1">B2</b>
<c level="1">C3</c>
</doc1>
<doc2>
<a level="2">A1</a>
<b level="2">B2</b>
<c level="2">C3</c>
<doc3>
<a level="Out1">A1</a>
<bat level="3">Out2</bat>
<cat level="3">C33</cat>
</doc3>
</doc2>
</docs>
1.1 xml-xalan/test/tests/conf/attribset/attribset22.xsl
Index: attribset22.xsl
===================================================================
<?xml version="1.0"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<!-- FileName: attribset22 -->
<!-- Document: http://www.w3.org/TR/xslt -->
<!-- DocVersion: 19991116 -->
<!-- Section: 7.1.3 Creating Attributes -->
<!-- Creator: Paul Dick -->
<!-- Purpose: Verify that attributes that contain text nodes with
a newline, the output must contain a character reference. -->
<xsl:template match="/">
<Out>
<xsl:attribute name="attr1">x
y</xsl:attribute>
</Out>
</xsl:template>
</xsl:stylesheet>
1.1 xml-xalan/test/tests/conf/attribset/attribset23.xml
Index: attribset23.xml
===================================================================
<?xml version="1.0"?>
<doc>
</doc>
1.1 xml-xalan/test/tests/conf/attribset/attribset23.xsl
Index: attribset23.xsl
===================================================================
<?xml version="1.0"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<!-- FileName: attribset23 -->
<!-- Document: http://www.w3.org/TR/xslt -->
<!-- DocVersion: 19991116 -->
<!-- Section: 7.1.3 Creating Attributes -->
<!-- Creator: Paul Dick -->
<!-- Purpose: XSLT processors may make use of the prefix of the QNAME specified
in the name attribute ... however they are not required to do so and, if
the prefix is xmlns, they must not do so ... this will not result in a
namespace declaration being output. -->
<xsl:template match="/">
<root>
<Out>
<xsl:attribute name="xmlns:xsl" namespace="whatever">http://www.w3.org/1999/XSL/Transform</xsl:attribute>
</Out>
</root>
</xsl:template>
</xsl:stylesheet>
1.1 xml-xalan/test/tests/conf/attribset/attribset24.xml
Index: attribset24.xml
===================================================================
<?xml version="1.0"?>
<docs>
<a>xyz:Attr1</a>
<b>bdd:Attr2</b>
</docs>
1.1 xml-xalan/test/tests/conf/attribset/attribset24.xsl
Index: attribset24.xsl
===================================================================
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
xmlns:ped="http://ped.test.com"
xmlns:bdd="http://bdd.test.com">
<xsl:output indent="yes"/>
<!-- FileName: attribset24 -->
<!-- Document: http://www.w3.org/TR/xslt -->
<!-- DocVersion: 19991116 -->
<!-- Section: 7.1.3 Creating Attributes -->
<!-- Creator: Paul Dick -->
<!-- Purpose: The namespace attribute is interpreted as an attribute value template. -->
<xsl:template match="/">
<root>
<Out>
<xsl:attribute name="{docs/a}" namespace="http://ped.test.com">YoBaby</xsl:attribute>
<xsl:attribute name="{docs/b}" namespace="http://ped.test.com">jaminben</xsl:attribute>
</Out>
</root>
</xsl:template>
</xsl:stylesheet>
1.1 xml-xalan/test/tests/conf/attribset/attribset25.xml
Index: attribset25.xml
===================================================================
<?xml version="1.0"?>
<docs>
<doc/>
<a>X</a>
<a>Y</a>
<a>Z</a>
</docs>
1.1 xml-xalan/test/tests/conf/attribset/attribset25.xsl
Index: attribset25.xsl
===================================================================
<?xml version="1.0"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<!-- FileName: attribset25 -->
<!-- Document: http://www.w3.org/TR/xslt -->
<!-- DocVersion: 19991116 -->
<!-- Section: 7.1.3 Creating Attributes -->
<!-- Creator: David Marston -->
<!-- Purpose: Use xsl:element with for-each inside xsl:attribute -->
<xsl:template match="docs">
<xsl:element name="out">
<xsl:attribute name="test1">
<xsl:for-each select="a">
<xsl:value-of select="."/>
</xsl:for-each>
</xsl:attribute>
</xsl:element>
</xsl:template>
</xsl:stylesheet>
1.1 xml-xalan/test/tests/conf/attribset/attribset28.xml
Index: attribset28.xml
===================================================================
<?xml version="1.0"?>
<doc>
<foo>a</foo>
</doc>
1.1 xml-xalan/test/tests/conf/attribset/attribset28.xsl
Index: attribset28.xsl
===================================================================
<?xml version="1.0"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<!-- FileName: attribset28 -->
<!-- Document: http://www.w3.org/TR/xslt -->
<!-- DocVersion: 19991116 -->
<!-- Section: 7.1.4 Named Attribute Sets -->
<!-- Paragraph: 3 -->
<!-- Purpose: Use xsl:copy with multiple attribute sets in a list that have conflicts. -->
<!-- Author: David Marston -->
<xsl:template match="/">
<out>
<xsl:apply-templates/>
</out>
</xsl:template>
<xsl:template match="doc">
<xsl:copy use-attribute-sets="set1 set2 set3"/>
</xsl:template>
<xsl:attribute-set name="set1">
<xsl:attribute name="color">black</xsl:attribute>
</xsl:attribute-set>
<xsl:attribute-set name="set2">
<xsl:attribute name="color">blue</xsl:attribute>
</xsl:attribute-set>
<xsl:attribute-set name="set3">
<xsl:attribute name="color">green</xsl:attribute>
</xsl:attribute-set>
</xsl:stylesheet>
1.1 xml-xalan/test/tests/conf/attribset/attribset32.xml
Index: attribset32.xml
===================================================================
<?xml version="1.0"?>
<doc>
<foo>a</foo>
</doc>
1.1 xml-xalan/test/tests/conf/attribset/attribset32.xsl
Index: attribset32.xsl
===================================================================
<?xml version="1.0"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<!-- FileName: attribset32 -->
<!-- Document: http://www.w3.org/TR/xslt -->
<!-- DocVersion: 19991116 -->
<!-- Section: 7.1.4 Named Attribute Sets -->
<!-- Purpose: Use xsl:element with multiple attribute sets with conflicting set names. -->
<!-- Author: David Marston -->
<xsl:template match="/">
<out>
<xsl:element name="element1" use-attribute-sets="set1"/>
</out>
</xsl:template>
<xsl:attribute-set name="set1">
<xsl:attribute name="text-decoration">underline</xsl:attribute>
</xsl:attribute-set>
<xsl:attribute-set name="set1">
<xsl:attribute name="color">black</xsl:attribute>
</xsl:attribute-set>
<xsl:attribute-set name="set1">
<xsl:attribute name="font-size">14pt</xsl:attribute>
</xsl:attribute-set>
</xsl:stylesheet>
1.1 xml-xalan/test/tests/conf/attribset/attribset35.xml
Index: attribset35.xml
===================================================================
<?xml version="1.0"?>
<doc>
</doc>
1.1 xml-xalan/test/tests/conf/attribset/attribset35.xsl
Index: attribset35.xsl
===================================================================
<?xml version="1.0"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<!-- FileName: attribset35 -->
<!-- Document: http://www.w3.org/TR/xslt -->
<!-- DocVersion: 19991116 -->
<!-- Section: 7.1.3 Creating Attributes -->
<!-- Creator: David Marston -->
<!-- Purpose: Verify adding an attribute to an element after a PI has
been added to it is an error. The attributes can be ignored.
The spec doesn't explicitly say this is disallowed, as it does
for child elements, but it makes sense to have the same treatment. -->
<xsl:template match="doc">
<Out>
<xsl:element name="Element1">
<xsl:attribute name="Att1">OK</xsl:attribute>
<xsl:processing-instruction name="my-pi">type="text/css"</xsl:processing-instruction>
<xsl:attribute name="AttX">Wrong</xsl:attribute>
<xsl:element name="Element2"/>
</xsl:element>
</Out>
</xsl:template>
</xsl:stylesheet>
1.1 xml-xalan/test/tests/conf/attribset/attribset36.xml
Index: attribset36.xml
===================================================================
<?xml version="1.0"?>
<doc>
</doc>
1.1 xml-xalan/test/tests/conf/attribset/attribset36.xsl
Index: attribset36.xsl
===================================================================
<?xml version="1.0"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<!-- FileName: attribset36 -->
<!-- Document: http://www.w3.org/TR/xslt -->
<!-- DocVersion: 19991116 -->
<!-- Section: 7.1.3 Creating Attributes -->
<!-- Creator: David Marston -->
<!-- Purpose: Verify adding an attribute to an element after a comment has
been added to it is an error. The attributes can be ignored.
The spec doesn't explicitly say this is disallowed, as it does
for child elements, but it makes sense to have the same treatment. -->
<xsl:template match="doc">
<Out>
<xsl:element name="Element1">
<xsl:attribute name="Att1">OK</xsl:attribute>
<xsl:comment>Should not break</xsl:comment>
<xsl:attribute name="AttX">Wrong</xsl:attribute>
<xsl:element name="Element2"/>
</xsl:element>
</Out>
</xsl:template>
</xsl:stylesheet>
1.1 xml-xalan/test/tests/conf/attribset/attribset37.xml
Index: attribset37.xml
===================================================================
<?xml version="1.0"?>
<doc>
<foo>a</foo>
</doc>
1.1 xml-xalan/test/tests/conf/attribset/attribset37.xsl
Index: attribset37.xsl
===================================================================
<?xml version="1.0"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<!-- FileName: AttribSet37 -->
<!-- Document: http://www.w3.org/TR/xslt -->
<!-- DocVersion: 19991116 -->
<!-- Section: 7.1.4 -->
<!-- Purpose: Set some attributes from an imported definition. -->
<!-- Creator: David Marston -->
<xsl:import href="impattset37a.xsl"/><!-- defines colorset -->
<xsl:import href="impattset37t.xsl"/>
<xsl:template match="/">
<out>
<xsl:element name="test" use-attribute-sets="colorset decoset"/>
<xsl:apply-templates/>
</out>
</xsl:template>
<xsl:attribute-set name="decoset">
<xsl:attribute name="text-decoration">underline</xsl:attribute>
</xsl:attribute-set>
</xsl:stylesheet>
1.1 xml-xalan/test/tests/conf/attribset/attribset38.xml
Index: attribset38.xml
===================================================================
<?xml version="1.0"?>
<doc>
<foo>a</foo>
</doc>
1.1 xml-xalan/test/tests/conf/attribset/attribset38.xsl
Index: attribset38.xsl
===================================================================
<?xml version="1.0"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<!-- FileName: AttribSet38 -->
<!-- Document: http://www.w3.org/TR/xslt -->
<!-- DocVersion: 19991116 -->
<!-- Section: 7.1.4 -->
<!-- Purpose: Set some attributes from an imported definition. -->
<!-- Creator: David Marston -->
<xsl:import href="inclattset38a.xsl"/><!-- defines colorset -->
<xsl:import href="inclattset38t.xsl"/>
<xsl:template match="/">
<out>
<xsl:element name="test" use-attribute-sets="colorset decoset"/>
<xsl:apply-templates/>
</out>
</xsl:template>
<xsl:attribute-set name="decoset">
<xsl:attribute name="text-decoration">underline</xsl:attribute>
</xsl:attribute-set>
</xsl:stylesheet>
1.1 xml-xalan/test/tests/conf/attribset/impattset37a.xsl
Index: impattset37a.xsl
===================================================================
<?xml version="1.0"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<!-- FileName: ImpAttSet37a -->
<!-- Purpose: Holds attribute-set definition to be imported. -->
<xsl:attribute-set name="colorset">
<xsl:attribute name="color">green</xsl:attribute>
</xsl:attribute-set>
</xsl:stylesheet>
1.1 xml-xalan/test/tests/conf/attribset/impattset37t.xsl
Index: impattset37t.xsl
===================================================================
<?xml version="1.0"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<!-- FileName: ImpAttSet37t -->
<!-- Purpose: Holds template and attribute-set definition to be imported. -->
<xsl:template match="doc">
<xsl:apply-templates/>
</xsl:template>
<xsl:template match="foo">
<xsl:element name="foocopy" use-attribute-sets="colorset decoset fontset">
<xsl:value-of select="."/>
</xsl:element>
</xsl:template>
<xsl:attribute-set name="fontset">
<xsl:attribute name="font-size">14pt</xsl:attribute>
</xsl:attribute-set>
</xsl:stylesheet>
1.1 xml-xalan/test/tests/conf/attribset/inclattset38a.xsl
Index: inclattset38a.xsl
===================================================================
<?xml version="1.0"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<!-- FileName: InclAttSet38a -->
<!-- Purpose: Holds attribute-set definition to be included. -->
<xsl:attribute-set name="colorset">
<xsl:attribute name="color">green</xsl:attribute>
</xsl:attribute-set>
</xsl:stylesheet>
1.1 xml-xalan/test/tests/conf/attribset/attribset01.xml
Index: attribset01.xml
===================================================================
<?xml version="1.0"?>
<doc>
<section index="section1" index2="atr2val">
<section index="subSection1.1">
<p>Hello</p>
<p>Hello again.</p>
</section>
</section>
<section index="section2">
<p>Hello2</p>
<section index="subSection2.1">
<p>Hello</p>
<p>Hello again.</p>
</section>
<section index="subSection2.2">
<p>Hello</p>
<p>Hello again.</p>
</section>
<p>Hello2 again.</p>
<section index="subSection2.3">
<p>Hello</p>
<p>Hello again.</p>
</section>
</section>
</doc>