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
60bc730a
Commit
60bc730a
authored
Jan 30, 2001
by
Guido van Rossum
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Take care of XML namespace for element tag
parent
c6594026
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
16 additions
and
14 deletions
+16
-14
lib/python/TAL/CopyingDOMVisitor.py
lib/python/TAL/CopyingDOMVisitor.py
+4
-2
lib/python/TAL/test/out2.xml
lib/python/TAL/test/out2.xml
+4
-4
lib/python/TAL/test/test2.xml
lib/python/TAL/test/test2.xml
+2
-2
lib/python/TAL/tests/out2.xml
lib/python/TAL/tests/out2.xml
+4
-4
lib/python/TAL/tests/test2.xml
lib/python/TAL/tests/test2.xml
+2
-2
No files found.
lib/python/TAL/CopyingDOMVisitor.py
View file @
60bc730a
...
...
@@ -111,14 +111,16 @@ class CopyingDOMVisitor(DOMVisitor):
self
.
curNode
=
self
.
curNode
.
parentNode
def
copyElement
(
self
,
node
):
namespaceURI
=
node
.
namespaceURI
if
self
.
newDocument
is
None
:
# This must be the documentElement node. Create the
# document now; this also creates the documentElement node
self
.
newDocument
=
self
.
documentFactory
.
createDocument
(
None
,
node
.
nodeName
,
None
)
namespaceURI
,
node
.
nodeName
,
None
)
newNode
=
self
.
newDocument
.
documentElement
else
:
newNode
=
self
.
newDocument
.
createElement
(
node
.
nodeName
)
newNode
=
self
.
newDocument
.
createElementNS
(
namespaceURI
,
node
.
nodeName
)
self
.
curNode
.
appendChild
(
newNode
)
self
.
curNode
=
newNode
...
...
lib/python/TAL/test/out2.xml
View file @
60bc730a
<?xml version="1.0" ?>
<biztalk_1>
<biztalk_1
xmlns=
"urn:schemas-biztalk-org:biztalk:biztalk_1"
>
<
header
plain=
"guido"
quote=
'"'
apostrophe=
"'"
both=
""'"
lt=
"<"
gt=
">"
amp=
"&"
foo=
""
>
<
foo:header
xmlns:foo=
"whomping-willow"
plain=
"guido"
quote=
'"'
apostrophe=
"'"
both=
""'"
lt=
"<"
gt=
">"
amp=
"&"
foo=
""
>
<manifest>
<document>
<name>
sample1
</name>
<description>
a simple invoice
</description>
</document>
</manifest>
</header>
</
foo:
header>
<body>
<!-- sample1.xml is an example of a simple invoice for a small restaurant supplies order -->
<Invoice>
<Invoice
xmlns=
"urn:http://schemas.biztalk.org/united_rest_com/yw7sg15x.xml"
>
<Header>
<InvoiceNumber>
01786
</InvoiceNumber>
<InvoiceDate>
2000-03-17
</InvoiceDate>
<!-- March 17th, 2000 -->
...
...
lib/python/TAL/test/test2.xml
View file @
60bc730a
<?xml version="1.0" ?>
<biztalk_1
xmlns=
"urn:schemas-biztalk-org:biztalk:biztalk_1"
>
<
header
plain=
"guido"
quote=
'"'
apostrophe=
"'"
both=
""'"
lt=
"<"
gt=
">"
amp=
"&"
foo=
""
>
<
foo:header
xmlns:foo=
"whomping-willow"
plain=
"guido"
quote=
'"'
apostrophe=
"'"
both=
""'"
lt=
"<"
gt=
">"
amp=
"&"
foo=
""
>
<manifest>
<document>
<name>
sample1
</name>
<description>
a simple invoice
</description>
</document>
</manifest>
</header>
</
foo:
header>
<body>
...
...
lib/python/TAL/tests/out2.xml
View file @
60bc730a
<?xml version="1.0" ?>
<biztalk_1>
<biztalk_1
xmlns=
"urn:schemas-biztalk-org:biztalk:biztalk_1"
>
<
header
plain=
"guido"
quote=
'"'
apostrophe=
"'"
both=
""'"
lt=
"<"
gt=
">"
amp=
"&"
foo=
""
>
<
foo:header
xmlns:foo=
"whomping-willow"
plain=
"guido"
quote=
'"'
apostrophe=
"'"
both=
""'"
lt=
"<"
gt=
">"
amp=
"&"
foo=
""
>
<manifest>
<document>
<name>
sample1
</name>
<description>
a simple invoice
</description>
</document>
</manifest>
</header>
</
foo:
header>
<body>
<!-- sample1.xml is an example of a simple invoice for a small restaurant supplies order -->
<Invoice>
<Invoice
xmlns=
"urn:http://schemas.biztalk.org/united_rest_com/yw7sg15x.xml"
>
<Header>
<InvoiceNumber>
01786
</InvoiceNumber>
<InvoiceDate>
2000-03-17
</InvoiceDate>
<!-- March 17th, 2000 -->
...
...
lib/python/TAL/tests/test2.xml
View file @
60bc730a
<?xml version="1.0" ?>
<biztalk_1
xmlns=
"urn:schemas-biztalk-org:biztalk:biztalk_1"
>
<
header
plain=
"guido"
quote=
'"'
apostrophe=
"'"
both=
""'"
lt=
"<"
gt=
">"
amp=
"&"
foo=
""
>
<
foo:header
xmlns:foo=
"whomping-willow"
plain=
"guido"
quote=
'"'
apostrophe=
"'"
both=
""'"
lt=
"<"
gt=
">"
amp=
"&"
foo=
""
>
<manifest>
<document>
<name>
sample1
</name>
<description>
a simple invoice
</description>
</document>
</manifest>
</header>
</
foo:
header>
<body>
...
...
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