Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Z
Zope
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
Zope
Commits
ae9f0014
Commit
ae9f0014
authored
Mar 27, 2001
by
Evan Simpson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Change to on-error handling, added test10.html
parent
c1486ff9
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
213 additions
and
5 deletions
+213
-5
lib/python/TAL/DummyEngine.py
lib/python/TAL/DummyEngine.py
+3
-0
lib/python/TAL/TALInterpreter.py
lib/python/TAL/TALInterpreter.py
+9
-2
lib/python/TAL/setpath.py
lib/python/TAL/setpath.py
+3
-3
lib/python/TAL/test/input/test10.html
lib/python/TAL/test/input/test10.html
+48
-0
lib/python/TAL/test/output/test10.html
lib/python/TAL/test/output/test10.html
+51
-0
lib/python/TAL/tests/input/test10.html
lib/python/TAL/tests/input/test10.html
+48
-0
lib/python/TAL/tests/output/test10.html
lib/python/TAL/tests/output/test10.html
+51
-0
No files found.
lib/python/TAL/DummyEngine.py
View file @
ae9f0014
...
...
@@ -218,6 +218,9 @@ class DummyEngine:
seq = self.evaluateSequence(expr)
return Iterator(name, seq, self)
def getTALESError(self):
return TALESError
class Iterator:
def __init__(self, name, seq, engine):
...
...
lib/python/TAL/TALInterpreter.py
View file @
ae9f0014
...
...
@@ -96,7 +96,7 @@ try:
except
ImportError
:
from
StringIO
import
StringIO
from
TALDefs
import
TALError
,
TALESError
,
quote
,
TAL_VERSION
from
TALDefs
import
TALError
,
quote
,
TAL_VERSION
from
TALGenerator
import
TALGenerator
BOOLEAN_HTML_ATTRS
=
[
...
...
@@ -154,6 +154,7 @@ class TALInterpreter:
self
.
program
=
program
self
.
macros
=
macros
self
.
engine
=
engine
self
.
TALESError
=
engine
.
getTALESError
()
self
.
stream
=
stream
or
sys
.
stdout
self
.
debug
=
debug
self
.
wrap
=
wrap
...
...
@@ -385,9 +386,15 @@ class TALInterpreter:
self
.
stream
=
stream
=
StringIO
()
try
:
self
.
interpret
(
block
)
except
TALESError
,
err
:
except
self
.
TALESError
,
err
:
self
.
restoreState
(
state
)
engine
=
self
.
engine
engine
.
beginScope
()
err
.
lineno
=
self
.
position
[
0
]
err
.
offset
=
self
.
position
[
1
]
engine
.
setLocal
(
'error'
,
err
)
self
.
interpret
(
handler
)
engine
.
endScope
()
else
:
self
.
restoreOutputState
(
state
)
self
.
stream_write
(
stream
.
getvalue
())
...
...
lib/python/TAL/setpath.py
View file @
ae9f0014
...
...
@@ -5,9 +5,9 @@ import os
import
sys
home
=
os
.
path
.
expanduser
(
"~"
)
projects
=
os
.
path
.
join
(
home
,
'projects
'
)
zope2
=
os
.
path
.
join
(
projects
,
'Zope2
'
)
libPython
=
os
.
path
.
join
(
zope2
,
'lib'
,
'python'
)
Zopes
=
os
.
path
.
join
(
home
,
'Zope
'
)
pt
=
os
.
path
.
join
(
Zopes
,
'pt
'
)
libPython
=
os
.
path
.
join
(
pt
,
'lib'
,
'python'
)
sys
.
path
.
append
(
libPython
)
...
...
lib/python/TAL/test/input/test10.html
0 → 100644
View file @
ae9f0014
<html><body>
<table
xmlns:m=
"http://xml.zope.org/namespaces/metal"
m:use-macro=
"test/input/test7.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>
<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>
lib/python/TAL/test/output/test10.html
0 → 100644
View file @
ae9f0014
<html><body>
<table
xmlns:m=
"http://xml.zope.org/namespaces/metal"
m:use-macro=
"test/input/test7.xml/myTable"
>
<!-- macro definition with slots -->
<tr>
<td>
Top Left
</td>
<td>
Top Right
</td>
</tr>
<tr>
<td>
Bottom left
</td>
<td><span
m:fill-slot=
"bottomRight"
>
<h1>
Some headline
</h1>
<hr>
<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>
<br><br>
</span></td>
</tr>
</table>
</body></html>
lib/python/TAL/tests/input/test10.html
0 → 100644
View file @
ae9f0014
<html><body>
<table
xmlns:m=
"http://xml.zope.org/namespaces/metal"
m:use-macro=
"test/input/test7.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>
<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>
lib/python/TAL/tests/output/test10.html
0 → 100644
View file @
ae9f0014
<html><body>
<table
xmlns:m=
"http://xml.zope.org/namespaces/metal"
m:use-macro=
"test/input/test7.xml/myTable"
>
<!-- macro definition with slots -->
<tr>
<td>
Top Left
</td>
<td>
Top Right
</td>
</tr>
<tr>
<td>
Bottom left
</td>
<td><span
m:fill-slot=
"bottomRight"
>
<h1>
Some headline
</h1>
<hr>
<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>
<br><br>
</span></td>
</tr>
</table>
</body></html>
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment