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
a684eccb
Commit
a684eccb
authored
Nov 26, 2004
by
Tres Seaver
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Merge fix for issue #1219 (fix XML export).
parent
cac3d5bf
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
20 additions
and
4 deletions
+20
-4
doc/CHANGES.txt
doc/CHANGES.txt
+2
-0
lib/python/Shared/DC/xml/ppml.py
lib/python/Shared/DC/xml/ppml.py
+18
-4
No files found.
doc/CHANGES.txt
View file @
a684eccb
...
@@ -55,6 +55,8 @@ Zope Changes
...
@@ -55,6 +55,8 @@ Zope Changes
so that options with characters that needs shell quoting
so that options with characters that needs shell quoting
doesn't break the command.
doesn't break the command.
- Collector #1219: Make XML export sane again.
- Collector #945: Allow adding empty PythonScript instances
- Collector #945: Allow adding empty PythonScript instances
programmatically.
programmatically.
...
...
lib/python/Shared/DC/xml/ppml.py
View file @
a684eccb
...
@@ -167,7 +167,10 @@ class Wrapper:
...
@@ -167,7 +167,10 @@ class Wrapper:
if
isinstance
(
v
,
Scalar
):
if
isinstance
(
v
,
Scalar
):
return
'%s<%s%s> %s </%s>
\
n
'
%
(
i
,
name
,
id
,
str
(
v
)[:
-
1
],
name
)
return
'%s<%s%s> %s </%s>
\
n
'
%
(
i
,
name
,
id
,
str
(
v
)[:
-
1
],
name
)
else
:
else
:
v
=
v
.
__str__
(
indent
+
2
)
try
:
v
=
v
.
__str__
(
indent
+
2
)
except
TypeError
:
v
=
v
.
__str__
()
return
'%s<%s%s>
\
n
%s%s</%s>
\
n
'
%
(
i
,
name
,
id
,
v
,
i
,
name
)
return
'%s<%s%s>
\
n
%s%s</%s>
\
n
'
%
(
i
,
name
,
id
,
v
,
i
,
name
)
class
Collection
:
class
Collection
:
...
@@ -215,10 +218,17 @@ class Sequence(Collection):
...
@@ -215,10 +218,17 @@ class Sequence(Collection):
def
__len__
(
self
):
return
len
(
self
.
_subs
)
def
__len__
(
self
):
return
len
(
self
.
_subs
)
def
append
(
self
,
v
):
self
.
_subs
.
append
(
v
)
def
append
(
self
,
v
):
self
.
_subs
.
append
(
v
)
def
extend
(
self
,
v
):
self
.
_subs
.
extend
(
v
)
def
_stringify
(
self
,
v
,
indent
):
try
:
return
v
.
__str__
(
indent
+
2
)
except
TypeError
:
return
v
.
__str__
()
def
value
(
self
,
indent
):
def
value
(
self
,
indent
):
return
string
.
join
(
map
(
return
string
.
join
(
map
(
lambda
v
,
indent
=
indent
:
v
.
__str__
(
indent
),
lambda
v
,
indent
=
indent
:
self
.
_stringify
(
v
,
indent
),
self
.
_subs
),
''
)
self
.
_subs
),
''
)
class
List
(
Sequence
):
pass
class
List
(
Sequence
):
pass
...
@@ -403,12 +413,16 @@ class ToXMLUnpickler(Unpickler):
...
@@ -403,12 +413,16 @@ class ToXMLUnpickler(Unpickler):
def
load_binput
(
self
):
def
load_binput
(
self
):
i
=
mloads
(
'i'
+
self
.
read
(
1
)
+
'
\
000
\
000
\
000
'
)
i
=
mloads
(
'i'
+
self
.
read
(
1
)
+
'
\
000
\
000
\
000
'
)
self
.
stack
[
-
1
].
id
=
self
.
idprefix
+
`i`
last
=
self
.
stack
[
-
1
]
if
getattr
(
last
,
'id'
,
last
)
is
not
last
:
last
.
id
=
self
.
idprefix
+
`i`
dispatch
[
BINPUT
]
=
load_binput
dispatch
[
BINPUT
]
=
load_binput
def
load_long_binput
(
self
):
def
load_long_binput
(
self
):
i
=
mloads
(
'i'
+
self
.
read
(
4
))
i
=
mloads
(
'i'
+
self
.
read
(
4
))
self
.
stack
[
-
1
].
id
=
self
.
idprefix
+
`i`
last
=
self
.
stack
[
-
1
]
if
getattr
(
last
,
'id'
,
last
)
is
not
last
:
last
.
id
=
self
.
idprefix
+
`i`
dispatch
[
LONG_BINPUT
]
=
load_long_binput
dispatch
[
LONG_BINPUT
]
=
load_long_binput
...
...
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