summaryrefslogtreecommitdiff
path: root/src/zope/tal/tests/input
diff options
context:
space:
mode:
authorChristian Theune <ct@gocept.com>2007-05-03 22:34:23 +0000
committerChristian Theune <ct@gocept.com>2007-05-03 22:34:23 +0000
commit18627546bad8adef9fbd4f2a18ecededcfdb9352 (patch)
tree04d593b2bcc8afe058840f4a1667cdb23f7b8f46 /src/zope/tal/tests/input
parent32cc0013e39049938adcf919a34f13c6d5f45ab0 (diff)
parentae8fd91d9ee289f31a30cc7a435fd077dface481 (diff)
downloadzope-tal-18627546bad8adef9fbd4f2a18ecededcfdb9352.tar.gz
Moving code to satellite.
Diffstat (limited to 'src/zope/tal/tests/input')
-rw-r--r--src/zope/tal/tests/input/__init__.py2
-rw-r--r--src/zope/tal/tests/input/acme_template.pt15
-rw-r--r--src/zope/tal/tests/input/document_list.pt21
-rw-r--r--src/zope/tal/tests/input/pnome_template.pt23
-rw-r--r--src/zope/tal/tests/input/test01.html56
-rw-r--r--src/zope/tal/tests/input/test01.xml57
-rw-r--r--src/zope/tal/tests/input/test02.html118
-rw-r--r--src/zope/tal/tests/input/test02.xml119
-rw-r--r--src/zope/tal/tests/input/test03.html9
-rw-r--r--src/zope/tal/tests/input/test03.xml10
-rw-r--r--src/zope/tal/tests/input/test04.html26
-rw-r--r--src/zope/tal/tests/input/test04.xml27
-rw-r--r--src/zope/tal/tests/input/test05.html9
-rw-r--r--src/zope/tal/tests/input/test05.xml10
-rw-r--r--src/zope/tal/tests/input/test06.html6
-rw-r--r--src/zope/tal/tests/input/test06.xml7
-rw-r--r--src/zope/tal/tests/input/test07.html11
-rw-r--r--src/zope/tal/tests/input/test07.xml12
-rw-r--r--src/zope/tal/tests/input/test08.html44
-rw-r--r--src/zope/tal/tests/input/test08.xml45
-rw-r--r--src/zope/tal/tests/input/test09.html30
-rw-r--r--src/zope/tal/tests/input/test09.xml30
-rw-r--r--src/zope/tal/tests/input/test10.html48
-rw-r--r--src/zope/tal/tests/input/test11.html19
-rw-r--r--src/zope/tal/tests/input/test11.xml14
-rw-r--r--src/zope/tal/tests/input/test12.html24
-rw-r--r--src/zope/tal/tests/input/test13.html7
-rw-r--r--src/zope/tal/tests/input/test14.html10
-rw-r--r--src/zope/tal/tests/input/test14.xml15
-rw-r--r--src/zope/tal/tests/input/test15.html26
-rw-r--r--src/zope/tal/tests/input/test16.html2
-rw-r--r--src/zope/tal/tests/input/test16.xml7
-rw-r--r--src/zope/tal/tests/input/test17.html6
-rw-r--r--src/zope/tal/tests/input/test17.xml10
-rw-r--r--src/zope/tal/tests/input/test18.html16
-rw-r--r--src/zope/tal/tests/input/test18.xml20
-rw-r--r--src/zope/tal/tests/input/test19.html5
-rw-r--r--src/zope/tal/tests/input/test19.xml8
-rw-r--r--src/zope/tal/tests/input/test20.html1
-rw-r--r--src/zope/tal/tests/input/test20.xml6
-rw-r--r--src/zope/tal/tests/input/test21.html4
-rw-r--r--src/zope/tal/tests/input/test21.xml9
-rw-r--r--src/zope/tal/tests/input/test22.html4
-rw-r--r--src/zope/tal/tests/input/test22.xml6
-rw-r--r--src/zope/tal/tests/input/test23.html2
-rw-r--r--src/zope/tal/tests/input/test24.html12
-rw-r--r--src/zope/tal/tests/input/test25.html1
-rw-r--r--src/zope/tal/tests/input/test26.html3
-rw-r--r--src/zope/tal/tests/input/test27.html5
-rw-r--r--src/zope/tal/tests/input/test28.html5
-rw-r--r--src/zope/tal/tests/input/test29.html4
-rw-r--r--src/zope/tal/tests/input/test30.html6
-rw-r--r--src/zope/tal/tests/input/test31.html7
-rw-r--r--src/zope/tal/tests/input/test32.html4
-rw-r--r--src/zope/tal/tests/input/test33.html1
-rw-r--r--src/zope/tal/tests/input/test34.html11
-rw-r--r--src/zope/tal/tests/input/test35.html7
-rw-r--r--src/zope/tal/tests/input/test36.html6
-rw-r--r--src/zope/tal/tests/input/test_domain.html7
-rw-r--r--src/zope/tal/tests/input/test_failed_attr_translation.html2
-rw-r--r--src/zope/tal/tests/input/test_metal1.html61
-rw-r--r--src/zope/tal/tests/input/test_metal2.html7
-rw-r--r--src/zope/tal/tests/input/test_metal3.html1
-rw-r--r--src/zope/tal/tests/input/test_metal4.html4
-rw-r--r--src/zope/tal/tests/input/test_metal5.html4
-rw-r--r--src/zope/tal/tests/input/test_metal6.html5
-rw-r--r--src/zope/tal/tests/input/test_metal7.html6
-rw-r--r--src/zope/tal/tests/input/test_metal8.html15
-rw-r--r--src/zope/tal/tests/input/test_metal9.html23
-rw-r--r--src/zope/tal/tests/input/test_sa1.html6
-rw-r--r--src/zope/tal/tests/input/test_sa1.xml7
-rw-r--r--src/zope/tal/tests/input/test_sa2.html9
-rw-r--r--src/zope/tal/tests/input/test_sa2.xml10
-rw-r--r--src/zope/tal/tests/input/test_sa3.html15
-rw-r--r--src/zope/tal/tests/input/test_sa3.xml16
-rw-r--r--src/zope/tal/tests/input/test_sa4.html11
76 files changed, 1237 insertions, 0 deletions
diff --git a/src/zope/tal/tests/input/__init__.py b/src/zope/tal/tests/input/__init__.py
new file mode 100644
index 0000000..b711d36
--- /dev/null
+++ b/src/zope/tal/tests/input/__init__.py
@@ -0,0 +1,2 @@
+#
+# This file is necessary to make this directory a package.
diff --git a/src/zope/tal/tests/input/acme_template.pt b/src/zope/tal/tests/input/acme_template.pt
new file mode 100644
index 0000000..0af01ba
--- /dev/null
+++ b/src/zope/tal/tests/input/acme_template.pt
@@ -0,0 +1,15 @@
+<!-- This is ACME's generic look and feel, which is based on
+PNOME's look and feel. -->
+<html metal:extend-macro="pnome_macros_page" metal:define-macro="page">
+<head>
+<title metal:fill-slot="title">ACME Look and Feel</title>
+</head>
+<body>
+<div metal:fill-slot="page-footer">
+Copyright 2004 Acme Inc.
+<div metal:define-slot="disclaimer">
+Standard disclaimers apply.
+</div>
+</div>
+</body>
+</html>
diff --git a/src/zope/tal/tests/input/document_list.pt b/src/zope/tal/tests/input/document_list.pt
new file mode 100644
index 0000000..8226be1
--- /dev/null
+++ b/src/zope/tal/tests/input/document_list.pt
@@ -0,0 +1,21 @@
+<!-- ACME's document_list uses the ACME look and feel -->
+<html metal:use-macro="acme_macros_page">
+<head>
+<title metal:fill-slot="title">Acme Document List</title>
+<style metal:fill-slot="local-styles" type="text/css">
+ body { background-color: white; }
+</style>
+</head>
+<body>
+<div metal:fill-slot="content">
+<h1>Documents</h1>
+<ul>
+<li>Rocket Science for Dummies</li>
+<li>Birds for the Gourmet Chef</li>
+</ul>
+</div>
+<div metal:fill-slot="disclaimer">
+This document list is classified.
+</div>
+</body>
+</html>
diff --git a/src/zope/tal/tests/input/pnome_template.pt b/src/zope/tal/tests/input/pnome_template.pt
new file mode 100644
index 0000000..f4d1c66
--- /dev/null
+++ b/src/zope/tal/tests/input/pnome_template.pt
@@ -0,0 +1,23 @@
+<!-- fakeplone is a fictional user interface created by a large,
+well-focused team of graphics designers -->
+<html metal:define-macro="page">
+<head>
+<title metal:define-slot="title">Title here</title>
+<metal:block define-slot="local-styles">
+</metal:block>
+</head>
+<body>
+<div>
+ <div metal:define-slot="annoying-quote">
+ "The early bird gets the worm, but the second mouse gets the cheese."
+ </div>
+ <a href="#">Preferences...</a>
+</div>
+<div metal:define-slot="content">
+ Content here
+</div>
+<div metal:define-slot="page-footer">
+ page footer
+</div>
+</body>
+</html>
diff --git a/src/zope/tal/tests/input/test01.html b/src/zope/tal/tests/input/test01.html
new file mode 100644
index 0000000..e2ae0c4
--- /dev/null
+++ b/src/zope/tal/tests/input/test01.html
@@ -0,0 +1,56 @@
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+ "DTD/xhtml1-transitional.dtd">
+<html>
+
+ <head>dadada</head>
+
+ <body xmlns:z="http://xml.zope.org/namespaces/tal" z:define="foo python:1">
+<h1 z:condition="python:0">This title is not displayed</h1>
+ <h1 z:condition="python:1" z:content="str:This
+Is
+The
+Replaced
+Title">Title</h1>
+
+ <!-- test entity references -->
+ &nbsp;&HarryPotter;
+
+ <!-- examples adapted from TemplateAttributeLanguageSyntax -->
+
+ <span z:content="str:here/id"/>
+
+ <p z:define="x str:template/title; global five python:2+3;" z:content="text var:five"/>
+
+ <p z:repeat="car python:['honda', 'subaru', 'acura']">
+ <span z:replace="var:car"/>
+ </p>
+
+ <p xml:foo="bar">foo bar</p>
+
+ <!-- more examples -->
+
+ <ul>
+ <span z:repeat="car python:['honda', 'subaru', 'acura']">
+ <li z:content="var:car">Car Name</li>
+ </span>
+ </ul>
+
+ <!-- test attribute expansion -->
+
+ <a href="foo" z:attributes="href python:'http://python.org' ">python</a>
+ <a z:attributes="href python:'http://python.org' ">python</a>
+
+ <!-- test insert/replace structure -->
+ <span z:content="structure python:None" />
+ <span z:replace="structure python:None" />
+
+ <span z:define="global x str:&lt;h3&gt;Header Level 3&lt;/h3&gt;" />
+ <span z:define="global x python:'&amp;' + 'nbsp;;' + x" />
+
+ <span z:replace="structure x" />
+ <span z:content="structure x" />
+
+ </body>
+
+</html>
diff --git a/src/zope/tal/tests/input/test01.xml b/src/zope/tal/tests/input/test01.xml
new file mode 100644
index 0000000..82038e9
--- /dev/null
+++ b/src/zope/tal/tests/input/test01.xml
@@ -0,0 +1,57 @@
+<?xml version="1.0" ?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+ "DTD/xhtml1-transitional.dtd">
+<html>
+
+ <head>dadada</head>
+
+ <body xmlns:z="http://xml.zope.org/namespaces/tal" z:define="foo python:1">
+<h1 z:condition="python:0">This title is not displayed</h1>
+ <h1 z:condition="python:1" z:content="str:This
+Is
+The
+Replaced
+Title">Title</h1>
+
+ <!-- test entity references -->
+ &nbsp;&HarryPotter;
+
+ <!-- examples adapted from TemplateAttributeLanguageSyntax -->
+
+ <span z:content="str:here/id"/>
+
+ <p z:define="x str:template/title; global five python:2+3;" z:content="text var:five"/>
+
+ <p z:repeat="car python:['honda', 'subaru', 'acura']">
+ <span z:replace="var:car"/>
+ </p>
+
+ <p xml:foo="bar">foo bar</p>
+
+ <!-- more examples -->
+
+ <ul>
+ <span z:repeat="car python:['honda', 'subaru', 'acura']">
+ <li z:content="var:car">Car Name</li>
+ </span>
+ </ul>
+
+ <!-- test attribute expansion -->
+
+ <a href="foo" z:attributes="href python:'http://python.org' ">python</a>
+ <a z:attributes="href python:'http://python.org' ">python</a>
+
+ <!-- test insert/replace structure -->
+ <span z:content="structure python:None" />
+ <span z:replace="structure python:None" />
+
+ <span z:define="global x str:&lt;h3&gt;Header Level 3&lt;/h3&gt;" />
+ <span z:define="global x python:'&amp;' + 'nbsp;;' + x" />
+
+ <span z:replace="structure x" />
+ <span z:content="structure x" />
+
+ </body>
+
+</html>
diff --git a/src/zope/tal/tests/input/test02.html b/src/zope/tal/tests/input/test02.html
new file mode 100644
index 0000000..df2fb18
--- /dev/null
+++ b/src/zope/tal/tests/input/test02.html
@@ -0,0 +1,118 @@
+<biztalk_1 xmlns="urn:schemas-biztalk-org:biztalk:biztalk_1">
+
+<foo:header xmlns:foo="whomping-willow" plain="guido" quote='"' apostrophe="'" both="&quot;'" lt="&lt;" gt="&gt;" amp="&amp;" foo="">
+ <manifest>
+ <document>
+ <name>sample1</name>
+ <description>a simple invoice</description>
+ </document>
+ </manifest>
+</foo:header>
+
+<body>
+
+<!-- sample1.xml is an example of a simple invoice for a small restaurant supplies order -->
+
+<Invoice xmlns="urn:http://schemas.biztalk.org/united_rest_com/yw7sg15x.xml">
+ <Header>
+ <InvoiceNumber>01786</InvoiceNumber>
+ <InvoiceDate>2000-03-17</InvoiceDate> <!-- March 17th, 2000 -->
+ <OrderNo>55377</OrderNo>
+ <OrderDate>2000-03-15</OrderDate> <!-- March 15th, 2000 -->
+ <CustomerPO>GJ03405</CustomerPO>
+ <ShipMethod>DAVE 1</ShipMethod>
+ <ShipDate>2000-03-17</ShipDate> <!-- March 17th, 2000 -->
+ <CustomerID>K5211(34)</CustomerID>
+ <SalesPersonCode>23</SalesPersonCode>
+ <TaxID>23</TaxID>
+ </Header>
+ <InvoiceTo>
+ <Name>SHIPWRIGHT RESTAURANTS LIMITED</Name>
+ <AddressLine>125 NORTH SERVICE ROAD W</AddressLine>
+ <AddressLine>WESTLAKE ACCESS</AddressLine>
+ <City>NORTH BAY</City>
+ <PostCode>L8B1O5</PostCode>
+ <State>ONTARIO</State>
+ <Country>CANADA</Country>
+ </InvoiceTo>
+ <ShipTo>
+ <Name/>
+ <AddressLine>ATTN: PAULINE DEGRASSI</AddressLine>
+ <City/>
+ <PostCode/>
+ <State/>
+ <Country/>
+ </ShipTo>
+ <DetailLines>
+ <DetailLine>
+ <QuantityShipped>1</QuantityShipped>
+ <UnitOfMeasure>CS</UnitOfMeasure>
+ <PartNumber>DM 5309</PartNumber>
+ <PartDescription>#1013 12 OZ.MUNICH STEIN</PartDescription>
+ <UnitPrice>37.72</UnitPrice>
+ <LineTotal>37.72</LineTotal>
+ </DetailLine>
+ <DetailLine>
+ <QuantityShipped>6</QuantityShipped>
+ <UnitOfMeasure>DZ</UnitOfMeasure>
+ <PartNumber>ON 6420</PartNumber>
+ <PartDescription>PROVINCIAL DINNER FORK</PartDescription>
+ <UnitPrice>17.98</UnitPrice>
+ <LineTotal>107.88</LineTotal>
+ </DetailLine>
+ <DetailLine>
+ <QuantityShipped>72</QuantityShipped>
+ <UnitOfMeasure>EA</UnitOfMeasure>
+ <PartNumber>JR20643</PartNumber>
+ <PartDescription>PLASTIC HANDLED STEAK KNIFE</PartDescription>
+ <UnitPrice>.81</UnitPrice>
+ <LineTotal>58.32</LineTotal>
+ </DetailLine>
+ <DetailLine>
+ <QuantityShipped>6</QuantityShipped>
+ <UnitOfMeasure>DZ</UnitOfMeasure>
+ <PartNumber>ON 6410</PartNumber>
+ <PartDescription>PROVINCIAL TEASPOONS</PartDescription>
+ <UnitPrice>12.16</UnitPrice>
+ <LineTotal>72.96</LineTotal>
+ </DetailLine>
+ <DetailLine>
+ <QuantityShipped>0</QuantityShipped>
+ <UnitOfMeasure>DZ</UnitOfMeasure>
+ <PartNumber>ON 6411</PartNumber>
+ <PartDescription>PROVINCIAL RD BOWL SPOON</PartDescription>
+ <QuantityBackOrdered>6</QuantityBackOrdered>
+ <UnitPrice>17.98</UnitPrice>
+ <LineTotal>0.00</LineTotal>
+ </DetailLine>
+ <DetailLine>
+ <QuantityShipped>1</QuantityShipped>
+ <UnitOfMeasure>EA</UnitOfMeasure>
+ <PartNumber>DO 3218</PartNumber>
+ <PartDescription>34 OZ DUAL DIAL SCALE AM3218</PartDescription>
+ <UnitPrice>70.00</UnitPrice>
+ <DiscountPercentage>5.0</DiscountPercentage>
+ <LineTotal>66.50</LineTotal>
+ </DetailLine>
+ <DetailLine>
+ <QuantityShipped>1</QuantityShipped>
+ <UnitOfMeasure>CS</UnitOfMeasure>
+ <PartNumber>DM 195</PartNumber>
+ <PartDescription>20 OZ.BEER PUB GLASS</PartDescription>
+ <UnitPrice>55.90</UnitPrice>
+ <LineTotal>55.90</LineTotal>
+ </DetailLine>
+ </DetailLines>
+ <Totals>
+ <SubTotal>399.28</SubTotal>
+ <DiscountTotal>3.50</DiscountTotal>
+ <FreightTotal>23.75</FreightTotal>
+ <GSTTotal>29.61</GSTTotal>
+ <ProvTaxTotal>33.84</ProvTaxTotal>
+ <OtherTotal>33.84</OtherTotal>
+ <InvoiceTotal>486.48</InvoiceTotal>
+ </Totals>
+</Invoice>
+
+</body>
+</biztalk_1>
diff --git a/src/zope/tal/tests/input/test02.xml b/src/zope/tal/tests/input/test02.xml
new file mode 100644
index 0000000..69567ea
--- /dev/null
+++ b/src/zope/tal/tests/input/test02.xml
@@ -0,0 +1,119 @@
+<?xml version="1.0" ?>
+<biztalk_1 xmlns="urn:schemas-biztalk-org:biztalk:biztalk_1">
+
+<foo:header xmlns:foo="whomping-willow" plain="guido" quote='"' apostrophe="'" both="&quot;'" lt="&lt;" gt="&gt;" amp="&amp;" foo="">
+ <manifest>
+ <document>
+ <name>sample1</name>
+ <description>a simple invoice</description>
+ </document>
+ </manifest>
+</foo:header>
+
+<body>
+
+<!-- sample1.xml is an example of a simple invoice for a small restaurant supplies order -->
+
+<Invoice xmlns="urn:http://schemas.biztalk.org/united_rest_com/yw7sg15x.xml">
+ <Header>
+ <InvoiceNumber>01786</InvoiceNumber>
+ <InvoiceDate>2000-03-17</InvoiceDate> <!-- March 17th, 2000 -->
+ <OrderNo>55377</OrderNo>
+ <OrderDate>2000-03-15</OrderDate> <!-- March 15th, 2000 -->
+ <CustomerPO>GJ03405</CustomerPO>
+ <ShipMethod>DAVE 1</ShipMethod>
+ <ShipDate>2000-03-17</ShipDate> <!-- March 17th, 2000 -->
+ <CustomerID>K5211(34)</CustomerID>
+ <SalesPersonCode>23</SalesPersonCode>
+ <TaxID>23</TaxID>
+ </Header>
+ <InvoiceTo>
+ <Name>SHIPWRIGHT RESTAURANTS LIMITED</Name>
+ <AddressLine>125 NORTH SERVICE ROAD W</AddressLine>
+ <AddressLine>WESTLAKE ACCESS</AddressLine>
+ <City>NORTH BAY</City>
+ <PostCode>L8B1O5</PostCode>
+ <State>ONTARIO</State>
+ <Country>CANADA</Country>
+ </InvoiceTo>
+ <ShipTo>
+ <Name/>
+ <AddressLine>ATTN: PAULINE DEGRASSI</AddressLine>
+ <City/>
+ <PostCode/>
+ <State/>
+ <Country/>
+ </ShipTo>
+ <DetailLines>
+ <DetailLine>
+ <QuantityShipped>1</QuantityShipped>
+ <UnitOfMeasure>CS</UnitOfMeasure>
+ <PartNumber>DM 5309</PartNumber>
+ <PartDescription>#1013 12 OZ.MUNICH STEIN</PartDescription>
+ <UnitPrice>37.72</UnitPrice>
+ <LineTotal>37.72</LineTotal>
+ </DetailLine>
+ <DetailLine>
+ <QuantityShipped>6</QuantityShipped>
+ <UnitOfMeasure>DZ</UnitOfMeasure>
+ <PartNumber>ON 6420</PartNumber>
+ <PartDescription>PROVINCIAL DINNER FORK</PartDescription>
+ <UnitPrice>17.98</UnitPrice>
+ <LineTotal>107.88</LineTotal>
+ </DetailLine>
+ <DetailLine>
+ <QuantityShipped>72</QuantityShipped>
+ <UnitOfMeasure>EA</UnitOfMeasure>
+ <PartNumber>JR20643</PartNumber>
+ <PartDescription>PLASTIC HANDLED STEAK KNIFE</PartDescription>
+ <UnitPrice>.81</UnitPrice>
+ <LineTotal>58.32</LineTotal>
+ </DetailLine>
+ <DetailLine>
+ <QuantityShipped>6</QuantityShipped>
+ <UnitOfMeasure>DZ</UnitOfMeasure>
+ <PartNumber>ON 6410</PartNumber>
+ <PartDescription>PROVINCIAL TEASPOONS</PartDescription>
+ <UnitPrice>12.16</UnitPrice>
+ <LineTotal>72.96</LineTotal>
+ </DetailLine>
+ <DetailLine>
+ <QuantityShipped>0</QuantityShipped>
+ <UnitOfMeasure>DZ</UnitOfMeasure>
+ <PartNumber>ON 6411</PartNumber>
+ <PartDescription>PROVINCIAL RD BOWL SPOON</PartDescription>
+ <QuantityBackOrdered>6</QuantityBackOrdered>
+ <UnitPrice>17.98</UnitPrice>
+ <LineTotal>0.00</LineTotal>
+ </DetailLine>
+ <DetailLine>
+ <QuantityShipped>1</QuantityShipped>
+ <UnitOfMeasure>EA</UnitOfMeasure>
+ <PartNumber>DO 3218</PartNumber>
+ <PartDescription>34 OZ DUAL DIAL SCALE AM3218</PartDescription>
+ <UnitPrice>70.00</UnitPrice>
+ <DiscountPercentage>5.0</DiscountPercentage>
+ <LineTotal>66.50</LineTotal>
+ </DetailLine>
+ <DetailLine>
+ <QuantityShipped>1</QuantityShipped>
+ <UnitOfMeasure>CS</UnitOfMeasure>
+ <PartNumber>DM 195</PartNumber>
+ <PartDescription>20 OZ.BEER PUB GLASS</PartDescription>
+ <UnitPrice>55.90</UnitPrice>
+ <LineTotal>55.90</LineTotal>
+ </DetailLine>
+ </DetailLines>
+ <Totals>
+ <SubTotal>399.28</SubTotal>
+ <DiscountTotal>3.50</DiscountTotal>
+ <FreightTotal>23.75</FreightTotal>
+ <GSTTotal>29.61</GSTTotal>
+ <ProvTaxTotal>33.84</ProvTaxTotal>
+ <OtherTotal>33.84</OtherTotal>
+ <InvoiceTotal>486.48</InvoiceTotal>
+ </Totals>
+</Invoice>
+
+</body>
+</biztalk_1>
diff --git a/src/zope/tal/tests/input/test03.html b/src/zope/tal/tests/input/test03.html
new file mode 100644
index 0000000..a0230e1
--- /dev/null
+++ b/src/zope/tal/tests/input/test03.html
@@ -0,0 +1,9 @@
+<p xmlns:z="http://xml.zope.org/namespaces/tal">
+ <span z:define="local x str:hello brave new world">
+ <span z:content="text local:x">outer variable x, first appearance</span>
+ <span z:define="local x str:goodbye cruel world">
+ <span z:content="text local:x">inner variable x</span>
+ </span>
+ <span z:content="text local:x">outer variable x, second appearance</span>
+ </span>
+</p>
diff --git a/src/zope/tal/tests/input/test03.xml b/src/zope/tal/tests/input/test03.xml
new file mode 100644
index 0000000..830149d
--- /dev/null
+++ b/src/zope/tal/tests/input/test03.xml
@@ -0,0 +1,10 @@
+<?xml version="1.0" ?>
+<p xmlns:z="http://xml.zope.org/namespaces/tal">
+ <span z:define="local x str:hello brave new world">
+ <span z:content="text local:x">outer variable x, first appearance</span>
+ <span z:define="local x str:goodbye cruel world">
+ <span z:content="text local:x">inner variable x</span>
+ </span>
+ <span z:content="text local:x">outer variable x, second appearance</span>
+ </span>
+</p>
diff --git a/src/zope/tal/tests/input/test04.html b/src/zope/tal/tests/input/test04.html
new file mode 100644
index 0000000..bdaad39
--- /dev/null
+++ b/src/zope/tal/tests/input/test04.html
@@ -0,0 +1,26 @@
+<html>
+
+ <body xmlns:m="http://xml.zope.org/namespaces/metal" xmlns:z="http://xml.zope.org/namespaces/tal" m:define-macro="body" z:define="global count python:0">
+
+ <ul m:define-macro="whoops">
+ <li z:repeat="item python:range(count)">
+ <span z:replace="item">1</span>
+ <span z:replace="global:message"/>
+ </li>
+ </ul>
+
+ <span z:define="global count python:2; global message str:hello world"/>
+
+ <p m:use-macro="whoops">use-macro
+ <span m:fill-slot="whoops">fill-slot</span>
+ </p>
+
+ <span z:define="global message str:goodbye cruel world"/>
+
+ <p m:use-macro="whoops">use-macro</p>
+
+ <p m:define-slot="whoops">define-slot</p>
+
+ </body>
+
+</html>
diff --git a/src/zope/tal/tests/input/test04.xml b/src/zope/tal/tests/input/test04.xml
new file mode 100644
index 0000000..bde6cef
--- /dev/null
+++ b/src/zope/tal/tests/input/test04.xml
@@ -0,0 +1,27 @@
+<?xml version="1.0" ?>
+<html>
+
+ <body xmlns:m="http://xml.zope.org/namespaces/metal" xmlns:z="http://xml.zope.org/namespaces/tal" m:define-macro="body" z:define="global count python:0">
+
+ <ul m:define-macro="whoops">
+ <li z:repeat="item python:range(count)">
+ <span z:replace="item">1</span>
+ <span z:replace="global:message"/>
+ </li>
+ </ul>
+
+ <span z:define="global count python:2; global message str:hello world"/>
+
+ <p m:use-macro="whoops">use-macro
+ <span m:fill-slot="whoops">fill-slot</span>
+ </p>
+
+ <span z:define="global message str:goodbye cruel world"/>
+
+ <p m:use-macro="whoops">use-macro</p>
+
+ <p m:define-slot="whoops">define-slot</p>
+
+ </body>
+
+</html>
diff --git a/src/zope/tal/tests/input/test05.html b/src/zope/tal/tests/input/test05.html
new file mode 100644
index 0000000..21f6b68
--- /dev/null
+++ b/src/zope/tal/tests/input/test05.html
@@ -0,0 +1,9 @@
+<html>
+
+ <body xmlns:m="http://xml.zope.org/namespaces/metal" m:define-macro="body">
+
+ <h1>This is the body of test5</h1>
+
+ </body>
+
+</html>
diff --git a/src/zope/tal/tests/input/test05.xml b/src/zope/tal/tests/input/test05.xml
new file mode 100644
index 0000000..fcaaf6b
--- /dev/null
+++ b/src/zope/tal/tests/input/test05.xml
@@ -0,0 +1,10 @@
+<?xml version="1.0" ?>
+<html>
+
+ <body xmlns:m="http://xml.zope.org/namespaces/metal" m:define-macro="body">
+
+ <h1>This is the body of test5</h1>
+
+ </body>
+
+</html>
diff --git a/src/zope/tal/tests/input/test06.html b/src/zope/tal/tests/input/test06.html
new file mode 100644
index 0000000..ac1264d
--- /dev/null
+++ b/src/zope/tal/tests/input/test06.html
@@ -0,0 +1,6 @@
+<html>
+ <body xmlns:m="http://xml.zope.org/namespaces/metal"
+ m:use-macro="tests/input/test05.html/body">
+ dummy body in test6
+ </body>
+</html>
diff --git a/src/zope/tal/tests/input/test06.xml b/src/zope/tal/tests/input/test06.xml
new file mode 100644
index 0000000..b32bd0f
--- /dev/null
+++ b/src/zope/tal/tests/input/test06.xml
@@ -0,0 +1,7 @@
+<?xml version="1.0" ?>
+<html>
+ <body xmlns:m="http://xml.zope.org/namespaces/metal"
+ m:use-macro="tests/input/test05.xml/body">
+ dummy body in test6
+ </body>
+</html>
diff --git a/src/zope/tal/tests/input/test07.html b/src/zope/tal/tests/input/test07.html
new file mode 100644
index 0000000..bff98f0
--- /dev/null
+++ b/src/zope/tal/tests/input/test07.html
@@ -0,0 +1,11 @@
+<table xmlns:m="http://xml.zope.org/namespaces/metal" m:define-macro="myTable">
+<!-- macro definition with slots -->
+ <tr>
+ <td>Top Left</td>
+ <td>Top Right</td>
+ </tr>
+ <tr>
+ <td>Bottom left</td>
+ <td><span m:define-slot="bottomRight">Bottom Right</span></td>
+ </tr>
+</table>
diff --git a/src/zope/tal/tests/input/test07.xml b/src/zope/tal/tests/input/test07.xml
new file mode 100644
index 0000000..e5c520a
--- /dev/null
+++ b/src/zope/tal/tests/input/test07.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0" ?>
+<table xmlns:m="http://xml.zope.org/namespaces/metal" m:define-macro="myTable">
+<!-- macro definition with slots -->
+ <tr>
+ <td>Top Left</td>
+ <td>Top Right</td>
+ </tr>
+ <tr>
+ <td>Bottom left</td>
+ <td><span m:define-slot="bottomRight">Bottom Right</span></td>
+ </tr>
+</table>
diff --git a/src/zope/tal/tests/input/test08.html b/src/zope/tal/tests/input/test08.html
new file mode 100644
index 0000000..1e4915b
--- /dev/null
+++ b/src/zope/tal/tests/input/test08.html
@@ -0,0 +1,44 @@
+<table xmlns:m="http://xml.zope.org/namespaces/metal" m:use-macro="tests/input/test07.html/myTable">
+<!-- macro use with slots -->
+ <tr>
+ <td>
+ <span m:fill-slot="bottomRight">
+ <h1>Some headline</h1>
+ <p>This is the real contents of the bottom right slot.</p>
+ <p>It is supposed to contain a lot of text. Blah, blah, blab.
+ Blabber, blabber, blah. Baah, baah, barb. Blah, blah, blab.
+ Blabber, blabber, blah. Baah, baah, barb. Blah, blah, blab.
+ Blabber, blabber, blah. Baah, baah, barb. Blah, blah, blab.
+ Blabber, blabber, blah. Baah, baah, barb. Blah, blah, blab.
+ Blabber, blabber, blah. Baah, baah, barb. Blah, blah, blab.
+ Blabber, blabber, blah. Baah, baah, barb. Blah, blah, blab.
+ Blabber, blabber, blah. Baah, baah, barb. Blah, blah, blab.
+ Blabber, blabber, blah. Baah, baah, barb. Blah, blah, blab.
+ Blabber, blabber, blah. Baah, baah, barb. Blah, blah, blab.
+ Blabber, blabber, blah. Baah, baah, barb.</p>
+ <p>It is supposed to contain a lot of text. Blah, blah, blab.
+ Blabber, blabber, blah. Baah, baah, barb. Blah, blah, blab.
+ Blabber, blabber, blah. Baah, baah, barb. Blah, blah, blab.
+ Blabber, blabber, blah. Baah, baah, barb. Blah, blah, blab.
+ Blabber, blabber, blah. Baah, baah, barb. Blah, blah, blab.
+ Blabber, blabber, blah. Baah, baah, barb. Blah, blah, blab.
+ Blabber, blabber, blah. Baah, baah, barb. Blah, blah, blab.
+ Blabber, blabber, blah. Baah, baah, barb. Blah, blah, blab.
+ Blabber, blabber, blah. Baah, baah, barb. Blah, blah, blab.
+ Blabber, blabber, blah. Baah, baah, barb. Blah, blah, blab.
+ Blabber, blabber, blah. Baah, baah, barb.</p>
+ <p>It is supposed to contain a lot of text. Blah, blah, blab.
+ Blabber, blabber, blah. Baah, baah, barb. Blah, blah, blab.
+ Blabber, blabber, blah. Baah, baah, barb. Blah, blah, blab.
+ Blabber, blabber, blah. Baah, baah, barb. Blah, blah, blab.
+ Blabber, blabber, blah. Baah, baah, barb. Blah, blah, blab.
+ Blabber, blabber, blah. Baah, baah, barb. Blah, blah, blab.
+ Blabber, blabber, blah. Baah, baah, barb. Blah, blah, blab.
+ Blabber, blabber, blah. Baah, baah, barb. Blah, blah, blab.
+ Blabber, blabber, blah. Baah, baah, barb. Blah, blah, blab.
+ Blabber, blabber, blah. Baah, baah, barb. Blah, blah, blab.
+ Blabber, blabber, blah. Baah, baah, barb.</p>
+ </span>
+ </td>
+ </tr>
+</table>
diff --git a/src/zope/tal/tests/input/test08.xml b/src/zope/tal/tests/input/test08.xml
new file mode 100644
index 0000000..b0360fa
--- /dev/null
+++ b/src/zope/tal/tests/input/test08.xml
@@ -0,0 +1,45 @@
+<?xml version="1.0" ?>
+<table xmlns:m="http://xml.zope.org/namespaces/metal" m:use-macro="tests/input/test07.xml/myTable">
+<!-- macro use with slots -->
+ <tr>
+ <td>
+ <span m:fill-slot="bottomRight">
+ <h1>Some headline</h1>
+ <p>This is the real contents of the bottom right slot.</p>
+ <p>It is supposed to contain a lot of text. Blah, blah, blab.
+ Blabber, blabber, blah. Baah, baah, barb. Blah, blah, blab.
+ Blabber, blabber, blah. Baah, baah, barb. Blah, blah, blab.
+ Blabber, blabber, blah. Baah, baah, barb. Blah, blah, blab.
+ Blabber, blabber, blah. Baah, baah, barb. Blah, blah, blab.
+ Blabber, blabber, blah. Baah, baah, barb. Blah, blah, blab.
+ Blabber, blabber, blah. Baah, baah, barb. Blah, blah, blab.
+ Blabber, blabber, blah. Baah, baah, barb. Blah, blah, blab.
+ Blabber, blabber, blah. Baah, baah, barb. Blah, blah, blab.
+ Blabber, blabber, blah. Baah, baah, barb. Blah, blah, blab.
+ Blabber, blabber, blah. Baah, baah, barb.</p>
+ <p>It is supposed to contain a lot of text. Blah, blah, blab.
+ Blabber, blabber, blah. Baah, baah, barb. Blah, blah, blab.
+ Blabber, blabber, blah. Baah, baah, barb. Blah, blah, blab.
+ Blabber, blabber, blah. Baah, baah, barb. Blah, blah, blab.
+ Blabber, blabber, blah. Baah, baah, barb. Blah, blah, blab.
+ Blabber, blabber, blah. Baah, baah, barb. Blah, blah, blab.
+ Blabber, blabber, blah. Baah, baah, barb. Blah, blah, blab.
+ Blabber, blabber, blah. Baah, baah, barb. Blah, blah, blab.
+ Blabber, blabber, blah. Baah, baah, barb. Blah, blah, blab.
+ Blabber, blabber, blah. Baah, baah, barb. Blah, blah, blab.
+ Blabber, blabber, blah. Baah, baah, barb.</p>
+ <p>It is supposed to contain a lot of text. Blah, blah, blab.
+ Blabber, blabber, blah. Baah, baah, barb. Blah, blah, blab.
+ Blabber, blabber, blah. Baah, baah, barb. Blah, blah, blab.
+ Blabber, blabber, blah. Baah, baah, barb. Blah, blah, blab.
+ Blabber, blabber, blah. Baah, baah, barb. Blah, blah, blab.
+ Blabber, blabber, blah. Baah, baah, barb. Blah, blah, blab.
+ Blabber, blabber, blah. Baah, baah, barb. Blah, blah, blab.
+ Blabber, blabber, blah. Baah, baah, barb. Blah, blah, blab.
+ Blabber, blabber, blah. Baah, baah, barb. Blah, blah, blab.
+ Blabber, blabber, blah. Baah, baah, barb. Blah, blah, blab.
+ Blabber, blabber, blah. Baah, baah, barb.</p>
+ </span>
+ </td>
+ </tr>
+</table>
diff --git a/src/zope/tal/tests/input/test09.html b/src/zope/tal/tests/input/test09.html
new file mode 100644
index 0000000..35f481a
--- /dev/null
+++ b/src/zope/tal/tests/input/test09.html
@@ -0,0 +1,30 @@
+<html>
+<body>
+<p>
+ Just a bunch of text.
+<p>more text...
+<ul>
+ <li>first item
+ <li>second item
+
+ <ol>
+ <li>second list, first item
+ <li>second list, second item
+ <dl compact>
+ <dt>term 1
+ <dt>term 2
+ <dd>definition
+ </dl>
+ </ol>
+
+ <li>Now let's have a paragraph...
+ <p>My Paragraph
+ </li>
+
+ <li>And a table in a list item:
+ <table>
+ </table>
+</ul>
+
+</body>
+</html>
diff --git a/src/zope/tal/tests/input/test09.xml b/src/zope/tal/tests/input/test09.xml
new file mode 100644
index 0000000..c3d10d7
--- /dev/null
+++ b/src/zope/tal/tests/input/test09.xml
@@ -0,0 +1,30 @@
+<html>
+<body>
+<p>
+ Just a bunch of text.</p>
+<p>more text...</p>
+<ul>
+ <li>first item</li>
+ <li>second item
+
+ <ol>
+ <li>second list, first item</li>
+ <li>second list, second item
+ <dl compact="">
+ <dt>term 1</dt>
+ <dt>term 2</dt>
+ <dd>definition</dd>
+ </dl></li>
+ </ol></li>
+
+ <li>Now let's have a paragraph...
+ <p>My Paragraph</p>
+ </li>
+
+ <li>And a table in a list item:
+ <table>
+ </table></li>
+</ul>
+
+</body>
+</html>
diff --git a/src/zope/tal/tests/input/test10.html b/src/zope/tal/tests/input/test10.html
new file mode 100644
index 0000000..6ecca4c
--- /dev/null
+++ b/src/zope/tal/tests/input/test10.html
@@ -0,0 +1,48 @@
+<html><body>
+<table xmlns:m="http://xml.zope.org/namespaces/metal" m:use-macro="tests/input/test07.html/myTable">
+<!-- macro use with slots -->
+ <tr>
+ <td>
+ <span m:fill-slot="bottomRight">
+ <h1>Some headline</h1>
+ <p>This is the real contents of the bottom right slot.</p>
+ <hr>
+ <p>It is supposed to contain a lot of text. Blah, blah, blab.
+ Blabber, blabber, blah. Baah, baah, barb. Blah, blah, blab.
+ Blabber, blabber, blah. Baah, baah, barb. Blah, blah, blab.
+ Blabber, blabber, blah. Baah, baah, barb. Blah, blah, blab.
+ Blabber, blabber, blah. Baah, baah, barb. Blah, blah, blab.
+ Blabber, blabber, blah. Baah, baah, barb. Blah, blah, blab.
+ Blabber, blabber, blah. Baah, baah, barb. Blah, blah, blab.
+ Blabber, blabber, blah. Baah, baah, barb. Blah, blah, blab.
+ Blabber, blabber, blah. Baah, baah, barb. Blah, blah, blab.
+ Blabber, blabber, blah. Baah, baah, barb. Blah, blah, blab.
+ Blabber, blabber, blah. Baah, baah, barb.</p>
+ <p>It is supposed to contain a lot of text. Blah, blah, blab.
+ Blabber, blabber, blah. Baah, baah, barb. Blah, blah, blab.
+ Blabber, blabber, blah. Baah, baah, barb. Blah, blah, blab.
+ Blabber, blabber, blah. Baah, baah, barb. Blah, blah, blab.
+ Blabber, blabber, blah. Baah, baah, barb. Blah, blah, blab.
+ Blabber, blabber, blah. Baah, baah, barb. Blah, blah, blab.
+ Blabber, blabber, blah. Baah, baah, barb. Blah, blah, blab.
+ Blabber, blabber, blah. Baah, baah, barb. Blah, blah, blab.
+ Blabber, blabber, blah. Baah, baah, barb. Blah, blah, blab.
+ Blabber, blabber, blah. Baah, baah, barb. Blah, blah, blab.
+ Blabber, blabber, blah. Baah, baah, barb.</p>
+ <p>It is supposed to contain a lot of text. Blah, blah, blab.
+ Blabber, blabber, blah. Baah, baah, barb. Blah, blah, blab.
+ Blabber, blabber, blah. Baah, baah, barb. Blah, blah, blab.
+ Blabber, blabber, blah. Baah, baah, barb. Blah, blah, blab.
+ Blabber, blabber, blah. Baah, baah, barb. Blah, blah, blab.
+ Blabber, blabber, blah. Baah, baah, barb. Blah, blah, blab.
+ Blabber, blabber, blah. Baah, baah, barb. Blah, blah, blab.
+ Blabber, blabber, blah. Baah, baah, barb. Blah, blah, blab.
+ Blabber, blabber, blah. Baah, baah, barb. Blah, blah, blab.
+ Blabber, blabber, blah. Baah, baah, barb. Blah, blah, blab.
+ Blabber, blabber, blah. Baah, baah, barb.</p>
+ <br><br>
+ </span>
+ </td>
+ </tr>
+</table>
+</body></html>
diff --git a/src/zope/tal/tests/input/test11.html b/src/zope/tal/tests/input/test11.html
new file mode 100644
index 0000000..89f7563
--- /dev/null
+++ b/src/zope/tal/tests/input/test11.html
@@ -0,0 +1,19 @@
+<html xmlns:tal="http://xml.zope.org/namespaces/tal">
+ <p tal:replace="structure string:&lt;a&gt;bar&lt;/a&gt;"
+ tal:attributes="href string:http://www.python.org">dummy text</p>
+ <p tal:define="x python:1" tal:on-error="string:bad boy!">
+ <span tal:define="x python:2">
+ <span tal:define="x python:3">
+ <span tal:content="python:1/0"/>
+ </span>
+ </span>
+ </p>
+ <p tal:on-error="string:x undefined">
+ <span tal:content="x"/>
+ </p>
+ <tal:block on-error="string:x undefined" replace="x" />
+ <tal:block on-error="string:x undefined">
+ <p tal:content="x">p</p>
+ </tal:block>
+ <div tal:replace="structure string:&lt;hr /&gt;">rule</div>
+</html>
diff --git a/src/zope/tal/tests/input/test11.xml b/src/zope/tal/tests/input/test11.xml
new file mode 100644
index 0000000..435f95c
--- /dev/null
+++ b/src/zope/tal/tests/input/test11.xml
@@ -0,0 +1,14 @@
+<html xmlns:tal="http://xml.zope.org/namespaces/tal">
+ <p tal:replace="structure string:&lt;a&gt;bar&lt;/a&gt;"
+ tal:attributes="href string:http://www.python.org">dummy text</p>
+ <p tal:define="x python:1" tal:on-error="string:bad boy!">
+ <span tal:define="x python:2">
+ <span tal:define="x python:3">
+ <span tal:content="python:1/0"/>
+ </span>
+ </span>
+ </p>
+ <p tal:on-error="string:x undefined">
+ <span tal:content="x"/>
+ </p>
+</html>
diff --git a/src/zope/tal/tests/input/test12.html b/src/zope/tal/tests/input/test12.html
new file mode 100644
index 0000000..94d9a66
--- /dev/null
+++ b/src/zope/tal/tests/input/test12.html
@@ -0,0 +1,24 @@
+<span tal:define="global true python:1; global false python:0" />
+
+<img ismap>
+<img ismap=ismap>
+<img ismap="ismap">
+<img ismap="foo">
+
+<img ismap tal:attributes="ismap true">
+<img ismap tal:attributes="ismap false">
+<img ismap tal:attributes="ismap nothing">
+
+<img ismap="foo" tal:attributes="ismap true">
+<img ismap="foo" tal:attributes="ismap false">
+<img ismap="foo" tal:attributes="ismap nothing">
+
+<img tal:attributes="ismap true">
+<img tal:attributes="ismap false">
+<img tal:attributes="ismap nothing">
+
+<span tal:define="global x string:x.gif" />
+
+<img src="foo">
+<img src="foo" tal:attributes="src x">
+<img src="foo" tal:attributes="src nothing">
diff --git a/src/zope/tal/tests/input/test13.html b/src/zope/tal/tests/input/test13.html
new file mode 100644
index 0000000..d68e0ce
--- /dev/null
+++ b/src/zope/tal/tests/input/test13.html
@@ -0,0 +1,7 @@
+Here's a stray greater than: >
+
+<script>
+ <!-- no comment -->
+ <notag>
+ &noentity;
+</script>
diff --git a/src/zope/tal/tests/input/test14.html b/src/zope/tal/tests/input/test14.html
new file mode 100644
index 0000000..0aaa751
--- /dev/null
+++ b/src/zope/tal/tests/input/test14.html
@@ -0,0 +1,10 @@
+<table>
+ <tr>
+ <td tal:repeat="x python:['car', 'bike', 'broomstick']" tal:content="x">
+ </td>
+ </tr>
+</table>
+
+<p>
+ <span tal:repeat="x python:['Harry', 'Ron', 'Hermione']" tal:replace="x" />
+</p>
diff --git a/src/zope/tal/tests/input/test14.xml b/src/zope/tal/tests/input/test14.xml
new file mode 100644
index 0000000..c596135
--- /dev/null
+++ b/src/zope/tal/tests/input/test14.xml
@@ -0,0 +1,15 @@
+<?xml version="1.0" ?>
+<html xmlns:tal="http://xml.zope.org/namespaces/tal">
+
+<table>
+ <tr>
+ <td tal:repeat="x python:['car', 'bike', 'broomstick']" tal:content="x">
+ </td>
+ </tr>
+</table>
+
+<p>
+ <span tal:repeat="x python:['Harry', 'Ron', 'Hermione']" tal:replace="x" />
+</p>
+
+</html>
diff --git a/src/zope/tal/tests/input/test15.html b/src/zope/tal/tests/input/test15.html
new file mode 100644
index 0000000..0cd456e
--- /dev/null
+++ b/src/zope/tal/tests/input/test15.html
@@ -0,0 +1,26 @@
+<span metal:define-macro="INNER">
+ <span metal:define-slot="INNERSLOT">INNERSLOT</span>
+</span>
+
+<xxx metal:use-macro="INNER">
+ <xxx metal:fill-slot="INNERSLOT">inner-argument</xxx>
+</xxx>
+
+<div metal:define-macro="OUTER">
+<div metal:use-macro="INNER">
+ <xxx metal:define-slot="OUTERSLOT" metal:fill-slot="INNERSLOT">
+ OUTERSLOT
+ </xxx>
+</div>
+</div>
+
+<div metal:use-macro="OUTER">
+<span>
+ <xxx>
+ <div metal:fill-slot="OUTERSLOT">outer-argument</div>
+ </xxx>
+</span>
+</div>
+
+<div metal:use-macro="OUTER">
+</div>
diff --git a/src/zope/tal/tests/input/test16.html b/src/zope/tal/tests/input/test16.html
new file mode 100644
index 0000000..1414f45
--- /dev/null
+++ b/src/zope/tal/tests/input/test16.html
@@ -0,0 +1,2 @@
+<a href="valid/link.html"
+ tal:attributes="href python:'/base/' + attrs['href']">blah, blah</a>
diff --git a/src/zope/tal/tests/input/test16.xml b/src/zope/tal/tests/input/test16.xml
new file mode 100644
index 0000000..2efb2ab
--- /dev/null
+++ b/src/zope/tal/tests/input/test16.xml
@@ -0,0 +1,7 @@
+<?xml version="1.0"?>
+<body xmlns:tal="http://xml.zope.org/namespaces/tal">
+
+<ImG href="foo" Alt="bar"
+ tal:attributes="Href string:about:foo;alT string:baz" />
+
+</body>
diff --git a/src/zope/tal/tests/input/test17.html b/src/zope/tal/tests/input/test17.html
new file mode 100644
index 0000000..5a5ebb3
--- /dev/null
+++ b/src/zope/tal/tests/input/test17.html
@@ -0,0 +1,6 @@
+<tal:block tal:content="string:Yes">No</tal:block>
+<tal:block content="string:Yes">No</tal:block>
+<tal:block>Yes</tal:block>
+
+<metal:block tal:content="string:Yes">No</metal:block>
+<metal:block>Yes</metal:block>
diff --git a/src/zope/tal/tests/input/test17.xml b/src/zope/tal/tests/input/test17.xml
new file mode 100644
index 0000000..ecb617a
--- /dev/null
+++ b/src/zope/tal/tests/input/test17.xml
@@ -0,0 +1,10 @@
+<?xml version="1.0"?>
+<body xmlns:z="http://xml.zope.org/namespaces/tal"
+ xmlns:z2="http://xml.zope.org/namespaces/metal">
+<z:block z:content="string:Yes">No</z:block>
+<z:block content="string:Yes">No</z:block>
+<z:block>Yes</z:block>
+
+<z2:block z:content="string:Yes">No</z2:block>
+<z2:block>Yes</z2:block>
+</body>
diff --git a/src/zope/tal/tests/input/test18.html b/src/zope/tal/tests/input/test18.html
new file mode 100644
index 0000000..c3a5c26
--- /dev/null
+++ b/src/zope/tal/tests/input/test18.html
@@ -0,0 +1,16 @@
+<p tal:omit-tag="">Content</p>
+<p tal:omit-tag=""></p>
+<img tal:omit-tag="">
+
+<p tal:omit-tag="string:Yes">Content</p>
+<p tal:omit-tag="string:Yes"></p>
+<img tal:omit-tag="string:Yes">
+
+<p tal:omit-tag="nothing">Content</p>
+<p tal:omit-tag="nothing"></p>
+<img tal:omit-tag="nothing">
+
+<p tal:define="txt string:Yes" tal:omit-tag="" tal:content="txt">No</p>
+<p tal:define="txt string:Yes" tal:omit-tag="" tal:replace="txt">No</p>
+<p tal:omit-tag="" tal:content="default">Yes</p>
+<p tal:omit-tag="" tal:replace="default">Yes</p>
diff --git a/src/zope/tal/tests/input/test18.xml b/src/zope/tal/tests/input/test18.xml
new file mode 100644
index 0000000..5a0cca4
--- /dev/null
+++ b/src/zope/tal/tests/input/test18.xml
@@ -0,0 +1,20 @@
+<?xml version="1.0"?>
+<body xmlns:tal="http://xml.zope.org/namespaces/tal"
+ xmlns:metal="http://xml.zope.org/namespaces/metal">
+<p tal:omit-tag="">Content</p>
+<p tal:omit-tag=""></p>
+<img tal:omit-tag=""/>
+
+<p tal:omit-tag="string:Yes">Content</p>
+<p tal:omit-tag="string:Yes"></p>
+<img tal:omit-tag="string:Yes"/>
+
+<p tal:omit-tag="nothing">Content</p>
+<p tal:omit-tag="nothing"></p>
+<img tal:omit-tag="nothing" />
+
+<p tal:define="txt string:Yes" tal:omit-tag="" tal:content="txt">No</p>
+<p tal:define="txt string:Yes" tal:omit-tag="" tal:replace="txt">No</p>
+<p tal:omit-tag="" tal:content="default">Yes</p>
+<p tal:omit-tag="" tal:replace="default">Yes</p>
+</body>
diff --git a/src/zope/tal/tests/input/test19.html b/src/zope/tal/tests/input/test19.html
new file mode 100644
index 0000000..a56632a
--- /dev/null
+++ b/src/zope/tal/tests/input/test19.html
@@ -0,0 +1,5 @@
+<span i18n:translate="">Replace this</span>
+<span i18n:translate="msgid">This is a
+translated string</span>
+<span i18n:translate="">And another
+translated string</span>
diff --git a/src/zope/tal/tests/input/test19.xml b/src/zope/tal/tests/input/test19.xml
new file mode 100644
index 0000000..fe4bf79
--- /dev/null
+++ b/src/zope/tal/tests/input/test19.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0"?>
+<body xmlns:i18n="http://xml.zope.org/namespaces/i18n">
+<span i18n:translate="">Replace this</span>
+<span i18n:translate="msgid">This is a
+translated string</span>
+<span i18n:translate="">And another
+translated string</span>
+</body>
diff --git a/src/zope/tal/tests/input/test20.html b/src/zope/tal/tests/input/test20.html
new file mode 100644
index 0000000..f302213
--- /dev/null
+++ b/src/zope/tal/tests/input/test20.html
@@ -0,0 +1 @@
+<span i18n:translate="">replaceable <p tal:replace="str:here">content</p></span>
diff --git a/src/zope/tal/tests/input/test20.xml b/src/zope/tal/tests/input/test20.xml
new file mode 100644
index 0000000..5050883
--- /dev/null
+++ b/src/zope/tal/tests/input/test20.xml
@@ -0,0 +1,6 @@
+<?xml version="1.0"?>
+<body xmlns:tal="http://xml.zope.org/namespaces/tal"
+ xmlns:metal="http://xml.zope.org/namespaces/metal"
+ xmlns:i18n="http://xml.zope.org/namespaces/i18n">
+<span i18n:translate="">replaceable <p tal:replace="str:here">content</p></span>
+</body>
diff --git a/src/zope/tal/tests/input/test21.html b/src/zope/tal/tests/input/test21.html
new file mode 100644
index 0000000..95f925e
--- /dev/null
+++ b/src/zope/tal/tests/input/test21.html
@@ -0,0 +1,4 @@
+<span i18n:translate="">
+ <span tal:replace="str:Lomax" i18n:name="name" /> was born in
+ <span tal:replace="str:Antarctica" i18n:name="country" />.
+</span>
diff --git a/src/zope/tal/tests/input/test21.xml b/src/zope/tal/tests/input/test21.xml
new file mode 100644
index 0000000..eea370b
--- /dev/null
+++ b/src/zope/tal/tests/input/test21.xml
@@ -0,0 +1,9 @@
+<?xml version="1.0"?>
+<body xmlns:tal="http://xml.zope.org/namespaces/tal"
+ xmlns:metal="http://xml.zope.org/namespaces/metal"
+ xmlns:i18n="http://xml.zope.org/namespaces/i18n">
+<span i18n:translate="">
+ <span tal:replace="str:Lomax" i18n:name="name" /> was born in
+ <span tal:replace="str:Antarctica" i18n:name="country" />.
+</span>
+</body>
diff --git a/src/zope/tal/tests/input/test22.html b/src/zope/tal/tests/input/test22.html
new file mode 100644
index 0000000..a4a7e93
--- /dev/null
+++ b/src/zope/tal/tests/input/test22.html
@@ -0,0 +1,4 @@
+<span i18n:translate="">
+ <span tal:omit-tag="" i18n:name="name"><b>Jim</b></span> was born in
+ <span tal:omit-tag="" i18n:name="country">the USA</span>.
+</span>
diff --git a/src/zope/tal/tests/input/test22.xml b/src/zope/tal/tests/input/test22.xml
new file mode 100644
index 0000000..54b57d8
--- /dev/null
+++ b/src/zope/tal/tests/input/test22.xml
@@ -0,0 +1,6 @@
+<?xml version="1.0"?>
+<body xmlns:tal="http://xml.zope.org/namespaces/tal">
+ <span tal:content="default">content</span>
+ <span tal:omit-tag="" tal:content="default">omit</span>
+ <span tal:replace="default">replace</span>
+</body>
diff --git a/src/zope/tal/tests/input/test23.html b/src/zope/tal/tests/input/test23.html
new file mode 100644
index 0000000..bfe6665
--- /dev/null
+++ b/src/zope/tal/tests/input/test23.html
@@ -0,0 +1,2 @@
+<span i18n:data="here/currentTime"
+ i18n:translate="timefmt">2:32 pm</span>
diff --git a/src/zope/tal/tests/input/test24.html b/src/zope/tal/tests/input/test24.html
new file mode 100644
index 0000000..6d53984
--- /dev/null
+++ b/src/zope/tal/tests/input/test24.html
@@ -0,0 +1,12 @@
+<input name="Delete"
+ tal:attributes="name string:delete_button"
+ i18n:attributes="name">
+
+<input name="Delete"
+ i18n:attributes="name message-id">
+
+<input i18n:attributes=" name message-id;
+ attr input-attr ">
+
+<input i18n:attributes=" name message-id;
+ attr input-attr;">
diff --git a/src/zope/tal/tests/input/test25.html b/src/zope/tal/tests/input/test25.html
new file mode 100644
index 0000000..25a99cf
--- /dev/null
+++ b/src/zope/tal/tests/input/test25.html
@@ -0,0 +1 @@
+<input name="Delete" i18n:attributes="name">
diff --git a/src/zope/tal/tests/input/test26.html b/src/zope/tal/tests/input/test26.html
new file mode 100644
index 0000000..fa5a99d
--- /dev/null
+++ b/src/zope/tal/tests/input/test26.html
@@ -0,0 +1,3 @@
+<span i18n:translate="jobnum">
+ Job #<span tal:replace="context/@@object_name"
+ i18n:name="jobnum">NN</span></span>
diff --git a/src/zope/tal/tests/input/test27.html b/src/zope/tal/tests/input/test27.html
new file mode 100644
index 0000000..b9c16cb
--- /dev/null
+++ b/src/zope/tal/tests/input/test27.html
@@ -0,0 +1,5 @@
+<p i18n:translate="verify">Your contact email address is recorded as
+ <a href="mailto:user@example.com"
+ tal:content="request/submitter"
+ i18n:name="email">user@host.com</a>
+</p>
diff --git a/src/zope/tal/tests/input/test28.html b/src/zope/tal/tests/input/test28.html
new file mode 100644
index 0000000..0364663
--- /dev/null
+++ b/src/zope/tal/tests/input/test28.html
@@ -0,0 +1,5 @@
+<p i18n:translate="verify">Your contact email address is recorded as
+ <span tal:omit-tag="" i18n:name="email">
+ <a href="mailto:user@example.com"
+ tal:content="request/submitter">user@host.com</a></span>
+</p>
diff --git a/src/zope/tal/tests/input/test29.html b/src/zope/tal/tests/input/test29.html
new file mode 100644
index 0000000..e2f1e82
--- /dev/null
+++ b/src/zope/tal/tests/input/test29.html
@@ -0,0 +1,4 @@
+<div i18n:translate="">At the tone the time will be
+<span i18n:data="here/currentTime"
+ i18n:translate="timefmt"
+ i18n:name="time">2:32 pm</span>... beep!</div>
diff --git a/src/zope/tal/tests/input/test30.html b/src/zope/tal/tests/input/test30.html
new file mode 100644
index 0000000..6f8c6ef
--- /dev/null
+++ b/src/zope/tal/tests/input/test30.html
@@ -0,0 +1,6 @@
+<p i18n:translate="verify">Your contact email address is recorded as
+<a href="user@host.com"
+ tal:attributes="href string:mailto:${request/submitter}"
+ tal:content="request/submitter"
+ i18n:name="email">user@host.com</a>
+</p>
diff --git a/src/zope/tal/tests/input/test31.html b/src/zope/tal/tests/input/test31.html
new file mode 100644
index 0000000..c927f42
--- /dev/null
+++ b/src/zope/tal/tests/input/test31.html
@@ -0,0 +1,7 @@
+<p i18n:translate="verify">Your contact email address is recorded as
+<span tal:omit-tag="" i18n:name="email">
+<a href="user@host.com"
+ tal:attributes="href string:mailto:${request/submitter}"
+ tal:content="request/submitter">
+ user@host.com</a></span>
+</p>
diff --git a/src/zope/tal/tests/input/test32.html b/src/zope/tal/tests/input/test32.html
new file mode 100644
index 0000000..3b09bad
--- /dev/null
+++ b/src/zope/tal/tests/input/test32.html
@@ -0,0 +1,4 @@
+<span i18n:translate="origin">
+ <span tal:content="str:Lomax" i18n:name="name" /> was born in
+ <span tal:content="str:Antarctica" i18n:name="country" />.
+</span>
diff --git a/src/zope/tal/tests/input/test33.html b/src/zope/tal/tests/input/test33.html
new file mode 100644
index 0000000..f5dcf58
--- /dev/null
+++ b/src/zope/tal/tests/input/test33.html
@@ -0,0 +1 @@
+<span i18n:translate="">don't translate me</span>
diff --git a/src/zope/tal/tests/input/test34.html b/src/zope/tal/tests/input/test34.html
new file mode 100644
index 0000000..4cd6ff0
--- /dev/null
+++ b/src/zope/tal/tests/input/test34.html
@@ -0,0 +1,11 @@
+<span i18n:translate="don't translate me">
+ stuff
+ <span tal:replace="string:foobar" i18n:name="longname" />
+ more stuff
+</span>
+
+<span i18n:translate="">
+ stuff
+ <span tal:replace="string:foobar" i18n:name="longname" />
+ more stuff
+</span>
diff --git a/src/zope/tal/tests/input/test35.html b/src/zope/tal/tests/input/test35.html
new file mode 100644
index 0000000..7964e9f
--- /dev/null
+++ b/src/zope/tal/tests/input/test35.html
@@ -0,0 +1,7 @@
+<span metal:define-macro="page" tal:omit-tag="">
+ <h1 metal:define-slot="name" tal:omit-tag="" />
+</span>
+
+<span metal:use-macro="page">
+ <h1 metal:fill-slot="name" tal:content="macroname">name</h1>
+</span> \ No newline at end of file
diff --git a/src/zope/tal/tests/input/test36.html b/src/zope/tal/tests/input/test36.html
new file mode 100644
index 0000000..bf4932a
--- /dev/null
+++ b/src/zope/tal/tests/input/test36.html
@@ -0,0 +1,6 @@
+<span tal:replace="string:<foo>" />
+<span i18n:translate="">
+ <span tal:replace="string:<foo>" i18n:name="name1" />
+ <span tal:replace="structure string:<bar />" i18n:name="name2" />
+ <span tal:omit-tag="" i18n:name="name3"><b>some</b> <i>text</i></span>
+</span>
diff --git a/src/zope/tal/tests/input/test_domain.html b/src/zope/tal/tests/input/test_domain.html
new file mode 100644
index 0000000..95d40a2
--- /dev/null
+++ b/src/zope/tal/tests/input/test_domain.html
@@ -0,0 +1,7 @@
+<div i18n:domain="lower">
+<span i18n:translate="">Replace this</span>
+<span i18n:translate="msgid">This is a
+translated string</span>
+<span i18n:translate="">And another
+translated string</span>
+</div>
diff --git a/src/zope/tal/tests/input/test_failed_attr_translation.html b/src/zope/tal/tests/input/test_failed_attr_translation.html
new file mode 100644
index 0000000..1c395c7
--- /dev/null
+++ b/src/zope/tal/tests/input/test_failed_attr_translation.html
@@ -0,0 +1,2 @@
+<input value="don't translate me"
+ i18n:attributes="value">
diff --git a/src/zope/tal/tests/input/test_metal1.html b/src/zope/tal/tests/input/test_metal1.html
new file mode 100644
index 0000000..a5371ce
--- /dev/null
+++ b/src/zope/tal/tests/input/test_metal1.html
@@ -0,0 +1,61 @@
+<span metal:define-macro="OUTER">
+ AAA
+ <span metal:define-macro="INNER">INNER</span>
+ BBB
+</span>
+
+<xxx metal:use-macro="OUTER">
+</xxx>
+
+<xxx metal:use-macro="INNER">
+</xxx>
+
+<span metal:define-macro="OUTER2">
+ AAA
+ <xxx metal:define-slot="OUTERSLOT">
+ <span metal:define-macro="INNER2">INNER</span>
+ </xxx>
+ BBB
+</span>
+
+<xxx metal:use-macro="OUTER2">
+</xxx>
+
+<xxx metal:use-macro="INNER2">
+</xxx>
+
+<xxx metal:use-macro="OUTER2">
+ <yyy metal:fill-slot="OUTERSLOT">OUTERSLOT</yyy>
+</xxx>
+
+<span metal:define-macro="OUTER3">
+ AAA
+ <xxx metal:define-slot="OUTERSLOT">
+ <span metal:define-macro="INNER3">INNER
+ <xxx metal:define-slot="INNERSLOT">INNERSLOT</xxx>
+ </span>
+ </xxx>
+ BBB
+</span>
+
+<xxx metal:use-macro="OUTER3">
+</xxx>
+
+<xxx metal:use-macro="OUTER3">
+ <yyy metal:fill-slot="OUTERSLOT">OUTERSLOT</yyy>
+</xxx>
+
+<xxx metal:use-macro="INNER3">
+</xxx>
+
+<xxx metal:use-macro="INNER3">
+ <yyy metal:fill-slot="INNERSLOT">INNERSLOT</yyy>
+</xxx>
+
+<xxx metal:use-macro="INNER3">
+ <yyy metal:fill-slot="INNERSLOT">
+ <zzz metal:define-macro="INSLOT">INSLOT</zzz>
+ </yyy>
+</xxx>
+
+<xxx metal:use-macro="INSLOT"></xxx>
diff --git a/src/zope/tal/tests/input/test_metal2.html b/src/zope/tal/tests/input/test_metal2.html
new file mode 100644
index 0000000..425508a
--- /dev/null
+++ b/src/zope/tal/tests/input/test_metal2.html
@@ -0,0 +1,7 @@
+<div metal:define-macro="OUTER">
+ OUTER
+ <span metal:define-macro="INNER">INNER</span>
+ OUTER
+</div>
+
+<div metal:use-macro="OUTER"/>
diff --git a/src/zope/tal/tests/input/test_metal3.html b/src/zope/tal/tests/input/test_metal3.html
new file mode 100644
index 0000000..b0af907
--- /dev/null
+++ b/src/zope/tal/tests/input/test_metal3.html
@@ -0,0 +1 @@
+<span tal:attributes="class string:foo">Should not get attr in metal</span>
diff --git a/src/zope/tal/tests/input/test_metal4.html b/src/zope/tal/tests/input/test_metal4.html
new file mode 100644
index 0000000..dc774d3
--- /dev/null
+++ b/src/zope/tal/tests/input/test_metal4.html
@@ -0,0 +1,4 @@
+<!-- the outer element *must* be tal:something or metal:something -->
+<metal:block define-macro="page" i18n:domain="zope">
+ <title metal:define-slot="title">Z3 UI</title>
+</metal:block>
diff --git a/src/zope/tal/tests/input/test_metal5.html b/src/zope/tal/tests/input/test_metal5.html
new file mode 100644
index 0000000..8bae3d8
--- /dev/null
+++ b/src/zope/tal/tests/input/test_metal5.html
@@ -0,0 +1,4 @@
+<!-- the outer element *must* include tal:omit-tag='' -->
+<x tal:omit-tag="" metal:define-macro="page" i18n:domain="zope">
+ <title metal:define-slot="title">Z3 UI</title>
+</x>
diff --git a/src/zope/tal/tests/input/test_metal6.html b/src/zope/tal/tests/input/test_metal6.html
new file mode 100644
index 0000000..ce243f2
--- /dev/null
+++ b/src/zope/tal/tests/input/test_metal6.html
@@ -0,0 +1,5 @@
+<metal:block define-macro="page">
+ <html i18:domain="zope">
+ <metal:block define-slot="title">Z3 UI</metal:block>
+ </html>
+</metal:block>
diff --git a/src/zope/tal/tests/input/test_metal7.html b/src/zope/tal/tests/input/test_metal7.html
new file mode 100644
index 0000000..75ec511
--- /dev/null
+++ b/src/zope/tal/tests/input/test_metal7.html
@@ -0,0 +1,6 @@
+<html metal:define-macro="page" i18n:domain="zope">
+ <x metal:define-slot="title" />
+</html>
+<html metal:use-macro="page">
+ <x metal:fill-slot="title" />
+</html>
diff --git a/src/zope/tal/tests/input/test_metal8.html b/src/zope/tal/tests/input/test_metal8.html
new file mode 100644
index 0000000..40d8a43
--- /dev/null
+++ b/src/zope/tal/tests/input/test_metal8.html
@@ -0,0 +1,15 @@
+<html metal:define-macro="page" i18n:domain="zope">
+<body>
+<div metal:define-macro="workspace">
+<div metal:define-slot="body">
+Default body
+</div>
+</div>
+</body>
+</html>
+
+<html metal:use-macro="page">
+<div metal:fill-slot="body">
+Filled-in body
+</div>
+</html>
diff --git a/src/zope/tal/tests/input/test_metal9.html b/src/zope/tal/tests/input/test_metal9.html
new file mode 100644
index 0000000..46b1b45
--- /dev/null
+++ b/src/zope/tal/tests/input/test_metal9.html
@@ -0,0 +1,23 @@
+<div metal:define-macro="macro1" i18n:domain="zope">
+<span metal:define-slot="slot1">
+Default for macro1
+</span>
+</div>
+
+<div metal:define-macro="macro2" metal:extend-macro="macro1" i18n:domain="zope">
+<span metal:fill-slot="slot1">
+Macro 2's slot 1 decoration
+<span metal:define-slot="slot1">
+Default for macro2
+</span>
+</span>
+</div>
+
+<div metal:use-macro="macro2">
+</div>
+
+<div metal:use-macro="macro2">
+<span metal:fill-slot="slot1">
+Custom slot1
+</span>
+</div>
diff --git a/src/zope/tal/tests/input/test_sa1.html b/src/zope/tal/tests/input/test_sa1.html
new file mode 100644
index 0000000..8879865
--- /dev/null
+++ b/src/zope/tal/tests/input/test_sa1.html
@@ -0,0 +1,6 @@
+<html>
+<title>Simple test of source annotations</title>
+<body>
+<p>Foo!</p>
+</body>
+</html>
diff --git a/src/zope/tal/tests/input/test_sa1.xml b/src/zope/tal/tests/input/test_sa1.xml
new file mode 100644
index 0000000..d00a46d
--- /dev/null
+++ b/src/zope/tal/tests/input/test_sa1.xml
@@ -0,0 +1,7 @@
+<?xml version="1.0" ?>
+<html>
+<title>Simple test of source annotations</title>
+<body>
+<p>Foo!</p>
+</body>
+</html>
diff --git a/src/zope/tal/tests/input/test_sa2.html b/src/zope/tal/tests/input/test_sa2.html
new file mode 100644
index 0000000..1c4e06b
--- /dev/null
+++ b/src/zope/tal/tests/input/test_sa2.html
@@ -0,0 +1,9 @@
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+ "DTD/xhtml1-transitional.dtd">
+<html>
+<title>Simple test of source annotations</title>
+<body>
+<p>Foo!</p>
+</body>
+</html>
diff --git a/src/zope/tal/tests/input/test_sa2.xml b/src/zope/tal/tests/input/test_sa2.xml
new file mode 100644
index 0000000..b54d6a1
--- /dev/null
+++ b/src/zope/tal/tests/input/test_sa2.xml
@@ -0,0 +1,10 @@
+<?xml version="1.0" ?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+ "DTD/xhtml1-transitional.dtd">
+<html>
+<title>Simple test of source annotations</title>
+<body>
+<p>Foo!</p>
+</body>
+</html>
diff --git a/src/zope/tal/tests/input/test_sa3.html b/src/zope/tal/tests/input/test_sa3.html
new file mode 100644
index 0000000..675805d
--- /dev/null
+++ b/src/zope/tal/tests/input/test_sa3.html
@@ -0,0 +1,15 @@
+<html>
+<body>
+ <div metal:define-macro="macro1">This is macro1 on sa3 line 3.
+ <span metal:define-slot="slot1">This is slot1 on sa3 line 4.</span>
+ This is the end of macro1 on sa3 line 5.
+ </div>
+ <p>Some text on sa3 line 7.</p>
+ <p metal:use-macro="macro1">
+ This text on sa3 line 9 will disappear.
+ <b metal:fill-slot="slot1">Text from sa3 line 10 is filled into slot1.</b>
+ This text on sa3 line 11 will disappear.
+ </p>
+ <p>This is some text on sa3 line 13.</p>
+</body>
+</html>
diff --git a/src/zope/tal/tests/input/test_sa3.xml b/src/zope/tal/tests/input/test_sa3.xml
new file mode 100644
index 0000000..79e3251
--- /dev/null
+++ b/src/zope/tal/tests/input/test_sa3.xml
@@ -0,0 +1,16 @@
+<?xml version="1.0" ?>
+<html>
+<body xmlns:metal="http://xml.zope.org/namespaces/metal">
+ <div metal:define-macro="macro1">This is macro1 on sa3 line 4.
+ <span metal:define-slot="slot1">This is slot1 on sa3 line 5.</span>
+ This is the end of macro1 on sa3 line 6.
+ </div>
+ <p>Some text on sa3 line 8.</p>
+ <p metal:use-macro="macro1">
+ This text on sa3 line 10 will disappear.
+ <b metal:fill-slot="slot1">Text from sa3 line 11 is filled into slot1.</b>
+ This text on sa3 line 12 will disappear.
+ </p>
+ <p>This is some text on sa3 line 14.</p>
+</body>
+</html>
diff --git a/src/zope/tal/tests/input/test_sa4.html b/src/zope/tal/tests/input/test_sa4.html
new file mode 100644
index 0000000..97596f6
--- /dev/null
+++ b/src/zope/tal/tests/input/test_sa4.html
@@ -0,0 +1,11 @@
+<html>
+<body>
+ <p>Some text on sa4 line 3.</p>
+ <p metal:use-macro="tests/input/test_sa3.html/macro1">
+ This text on sa4 line 5 will disappear.
+ <b metal:fill-slot="slot1">Text from sa4 line 6 is filled into slot1.</b>
+ This text on sa4 line 7 will disappear.
+ </p>
+ <p>This is some text on sa4 line 9.</p>
+</body>
+</html>