RE: re: DOM Exposed to DTML
"Damien Connolly" <[email protected]> Mon, 4 Nov 2002 11:43:27 +1300
| Newsgroups | gmane.comp.web.zope.parsed-xml |
|---|---|
| Message-ID | <[email protected]> |
Here is the trace back for the Slides demo ..=20
<!--
Traceback (innermost last):
File
/home/shared/misc/zope/Zope-2.5.1-linux2-x86/lib/python/ZPublisher/Publi
sh.py, line 150, in publish_module
File
/home/shared/misc/zope/Zope-2.5.1-linux2-x86/lib/python/ZPublisher/Publi
sh.py, line 114, in publish
File
/home/shared/misc/zope/Zope-2.5.1-linux2-x86/lib/python/Zope/__init__.py
, line 159, in zpublisher_exception_hook
File
/home/shared/misc/zope/Zope-2.5.1-linux2-x86/lib/python/ZPublisher/Publi
sh.py, line 98, in publish
File
/home/shared/misc/zope/Zope-2.5.1-linux2-x86/lib/python/ZPublisher/mappl
y.py, line 88, in mapply
(Object: viewSlide)
File
/home/shared/misc/zope/Zope-2.5.1-linux2-x86/lib/python/ZPublisher/Publi
sh.py, line 39, in call_object
(Object: viewSlide)
File
/home/shared/misc/zope/Zope-2.5.1-linux2-x86/lib/python/OFS/DTMLMethod.p
y, line 127, in __call__
(Object: viewSlide)
File
/home/shared/misc/zope/Zope-2.5.1-linux2-x86/lib/python/DocumentTemplate
/DT_String.py, line 473, in __call__
(Object: viewSlide)
File
/home/shared/misc/zope/Zope-2.5.1-linux2-x86/lib/python/DocumentTemplate
/DT_Let.py, line 76, in render
(Object: color=3D"'red'")
File
/home/shared/misc/zope/Zope-2.5.1-linux2-x86/lib/python/DocumentTemplate
/DT_In.py, line 695, in renderwob
(Object: childNodes)
File
/home/shared/misc/zope/Zope-2.5.1-linux2-x86/lib/python/DocumentTemplate
/DT_Var.py, line 250, in render
(Object: firstChild.data)
(Info: ('firstChild.data', u'\n This is the second slide\n\n
aere are some points,\n that I want to make:\n\n 1. one
thing\n\n 2. another thing\n\n 3. final point\n ', {'fmt':
'structured-text', '': '"firstChild.data"'}))
File
/home/shared/misc/zope/Zope-2.5.1-linux2-x86/lib/python/DocumentTemplate
/DT_Var.py, line 355, in structured_text
AttributeError: (see above)
-->
___________________________=20
Damien Connolly=20
Development Engineer=20
Right Hemisphere=20
www.righthemisphere.com=20
NZ Ph: +64.9.523.4670=20
NZ Fax: +64.9.523.4671
___________________________=20
-----Original Message-----
From: [email protected] [mailto:[email protected]]
Sent: Saturday, 2 November 2002 6:01 a.m.
To: Damien Connolly; [email protected]
Subject: RE: [Parsed-XML-Dev] re: DOM Exposed to DTML
What version are you using? Make sure you are using ParsedXML 1.3. It
uses
expat from PyXML!
Sean
-----Original Message-----
From: Damien Connolly [mailto:[email protected]]
Sent: Thursday, October 31, 2002 7:20 PM
To: [email protected]; [email protected]
Subject: RE: [Parsed-XML-Dev] re: DOM Exposed to DTML
Hmmmm well I've imported the examples and all appeared well.
However I just tried to alter=20
some of the XML in the slide demo and I get the error ....=20
Error Type: AttributeError
Error Value: value=20
Which seems weird because all I did was open the XML and then
click Save Changes.=20
I am thinking this may have happened because I had to make some
changes to my=20
pyexpat.c in order to get ParsedXML to build.
I used the Python that came with Zope.
I renamed the directory to ParsedXML=20
I put it under Products.=20
When I did my install It gave me ...=20
../pyexpat.c: In function 'call_with_frame':
././pyeexpat.c:365 too many arguments to function 'PyFrame_New'
make: *** [pyexpat.o] Error 1
To fix this I changed line 365 removing the extra arguments ;)=20
But I am wondering if that was the right thing to do.
I imagine it it was why I can't save XML ... ;o=20
___________________________=20
Damien Connolly=20
Development Engineer=20
Right Hemisphere=20
www.righthemisphere.com=20
NZ Ph: +64.9.523.4670=20
NZ Fax: +64.9.523.4671
___________________________=20
-----Original Message-----
From: [email protected] [mailto:[email protected]]
Sent: Friday, 1 November 2002 1:45 p.m.
To: Damien Connolly; [email protected]
Subject: RE: [Parsed-XML-Dev] re: DOM Exposed to DTML
Yes, it is.
Suppose you have a parsedXML doc with the following structure:
<foo><bar/></foo>
Try this:
<dtml-with "xmldoc.childNodes[0]">
<dtml-in "getElementsByTagName('bar')">
<dtml-var tagName>
</dtml-in>
</dtml-with>
Honestly, though, I think page templates and Python Scripts do the job
much
better (you could certainly use Page template in a role parallel to
XSLT),
and write special purpose node-traversal mechanisms in Python Scripts.
Sean
-----Original Message-----
From: Damien Connolly [mailto:[email protected]]
Sent: Thursday, October 31, 2002 4:29 PM
To: [email protected]
Subject: [Parsed-XML-Dev] re: DOM Exposed to DTML
Is the XML Dom exposed so that I can access it via dtml. If so
how ? :)=20
___________________________=20
Damien Connolly=20
Development Engineer=20
Right Hemisphere=20
www.righthemisphere.com=20
NZ Ph: +64.9.523.4670=20
NZ Fax: +64.9.523.4671
___________________________=20
_______________________________________________
Parsed-XML-Dev mailing list
[email protected]
http://lists.zope.org/mailman/listinfo/parsed-xml-dev