RE: re: DOM Exposed to DTML
"Damien Connolly" <[email protected]> Mon, 4 Nov 2002 11:21:55 +1300
| Newsgroups | gmane.comp.web.zope.parsed-xml |
|---|---|
| Message-ID | <[email protected]> |
>What version are you using? Make sure you are using ParsedXML 1.3. It
uses
>expat from PyXML!
I just checked and it is 1.3 ....=20
I completely reinstalled my copy of Zope and then the ParsedXML. Now the
previous error appears to=20
have gone away but I get a new one.=20
I don't seem to be able to format out the data from my xml content as
structured text.=20
This error occurs both in the slides demo and in my own little test
example that I have built
below.=20
I try to format the text out of an xml document using 'fmt=3Dstructured'
parameter and it gives me ..=20
Error Type: AttributeError
Error Value: meta_type
Here is my Dtml and Xml .. .
<!-- dtml -->
<dtml-with "test.childNodes[0]" >
<dtml-in "getElementsByTagName('test_left')" >
<dtml-var "firstChild.data" fmt=3Dstructured-text>
</dtml-in>
</dtml-with>
<?xml version=3D"1.0" ?>
<test>
<test_left>
blah
=20
blah
</test_left>
</test>
___________________________=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