RE: [Zope] xmldocument
Do you have an example of the XML you are trying to use? File size, in bytes? Just curious, as I have had no problems with XMLDocument (in Zope 2.1.x and 2.2.x) working with newspaper stories from AP online in NITF XML... Sean -Original Message- From: Bak@kedai [mailto:[EMAIL PROTECTED]] Sent: Wednesday, January 10, 2001 1:34 AM To: Phil Harris; [EMAIL PROTECTED]; [EMAIL PROTECTED] Subject: Re: [Zope] xmldocument On Wednesday 10 January 2001 16:56, Phil Harris wrote: > Bak, > > I can't help you fix it but I can tell you what the problem is, the file is > too big for Zope to cope with in one transaction so it starts a > sub-transaction and there is a bug in the sub-transactioning engine. > > The same thing happens with a normal 'File' type as well. > > You should probably check the collector to see if this has been fixed or > even reported. > > Phil to say the file is big is an understatement. how can adding a news file be too big for zope to cope? unless the default XML Document is huge. i'll peek at the collector. thanks phil -- http://www.kedai.com.my/kk http://www.kedai.com.my/eZine I will follow you! ..Damage Inc ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev ) ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] xmldocument
On Wednesday 10 January 2001 17:55, Chris McDonough wrote: > I've never seen that failure mode.. It'd be nice to get a reproducible bug > out of it. > this is wierd. with new install of zope2.16, zope2.20, zope2.2.5 - XMLDocunebt add works great. no error. but with zope2.2.5 (with all other products used[1] added), i got the original error. i use a lot of SQL stuff, but not where i tried to add XML document steps taken- -create new folder -add XML Document -the addForm appeared. insert id -when i clicked add/add and edit, i got the commit error. if i were to follow your advice, where should i put the dummy commit_sub? [1] product list follows -8< AddressBookNavigator Refresh XMLDocument ZPyGreSQLDA BTreeFolder Feedback.tar.gz NewsHostRenderable XMLWidgets ZRTChat BookmarkFolder GUM NewsSyndicate SQLSession ZCalendarZSQLMethods Boring HiperDom Notes SimpleGb ZCallableZWiki CVS Hotfix_2000-10-02 OFSPSquishdot ZCatalog ZnolkSQLWizard CachePool LocalFS POPMailBase TinyTable ZCounter ZopeTutorial CalendarLoginManager PTKBase TodoFolder ZDBase __init__.py CalendarFolder MIMETools PTKDemo Transform.tar.gz ZDConfera__init__.pyc DemoPortal MailHost PersonalFolder TutorialPoll ZFormulator _pgmodule.so EventFolder MembershipPollTutorialPollExamples ZGadflyDAmkproduct ExternalMethod Minimal PythonMethodUserDb ZGb mkproduct-data FSDump MountedClientStorage RFC822Message Wizard ZMirror FeedbackMountedFileStorageRSSChannel Workspace ZPoPyDA -- http://www.kedai.com.my/kk http://www.kedai.com.my/eZine Just bring it! ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] xmldocument
I've never seen that failure mode.. It'd be nice to get a reproducible bug out of it. - Original Message - From: "Phil Harris" <[EMAIL PROTECTED]> To: "Chris McDonough" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: Wednesday, January 10, 2001 4:09 AM Subject: Re: [Zope] xmldocument > Chris, > > This occurs using the bog-standard ZODB as well, nothing to do with any > other storage facility. > > Phil > - Original Message - > From: "Chris McDonough" <[EMAIL PROTECTED]> > To: "Phil Harris" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>; > <[EMAIL PROTECTED]> > Sent: Wednesday, January 10, 2001 9:27 AM > Subject: Re: [Zope] xmldocument > > > > Relational database adapters (like ZOracleDA, etc.) are currently not > > compatible with subtransactions. I worked around this for a customer by > > adding dummy commit_sub and abort_sub methods to the database adapter's DB > > class, e.g. > > > > def commit_sub(*arg, **kw): pass > > def abort_sub(*arg, **kw): pass > > > > > > - Original Message - > > From: "Phil Harris" <[EMAIL PROTECTED]> > > To: <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> > > Sent: Wednesday, January 10, 2001 3:56 AM > > Subject: Re: [Zope] xmldocument > > > > > > > Bak, > > > > > > I can't help you fix it but I can tell you what the problem is, the file > > is > > > too big for Zope to cope with in one transaction so it starts a > > > sub-transaction and there is a bug in the sub-transactioning engine. > > > > > > The same thing happens with a normal 'File' type as well. > > > > > > You should probably check the collector to see if this has been fixed or > > > even reported. > > > > > > Phil > > > > > > - Original Message - > > > From: "Bak@kedai" <[EMAIL PROTECTED]> > > > To: <[EMAIL PROTECTED]> > > > Sent: Wednesday, January 10, 2001 4:40 AM > > > Subject: [Zope] xmldocument > > > > > > > > > > happy new year all > > > > i can't get xmldocument to work with zope2.2x i can install the > product > > > ok, > > > > but can;t add XML Document. > > > > > > > > i got attribute error. any insight into the error is appreciated. > > > > > > > > can anybody suggest ways of rendering xml documents in zope? > > > > > > > > thanks > > > > > > > > --8< > > > > AttributeError > > > > > > > > Sorry, a Zope error occurred. > > > > > > > > > > > > -- > > > > > > > > http://www.kedai.com.my/kk > > > > http://www.kedai.com.my/eZine > > > > > > > > We don't need no, no, no, no, no parental guidance here! > > > > > > > > > > > > ___ > > > > Zope maillist - [EMAIL PROTECTED] > > > > http://lists.zope.org/mailman/listinfo/zope > > > > ** No cross posts or HTML encoding! ** > > > > (Related lists - > > > > http://lists.zope.org/mailman/listinfo/zope-announce > > > > http://lists.zope.org/mailman/listinfo/zope-dev ) > > > > > > > > > ___ > > > Zope maillist - [EMAIL PROTECTED] > > > http://lists.zope.org/mailman/listinfo/zope > > > ** No cross posts or HTML encoding! ** > > > (Related lists - > > > http://lists.zope.org/mailman/listinfo/zope-announce > > > http://lists.zope.org/mailman/listinfo/zope-dev ) > > > > > > > > > ___ > Zope maillist - [EMAIL PROTECTED] > http://lists.zope.org/mailman/listinfo/zope > ** No cross posts or HTML encoding! ** > (Related lists - > http://lists.zope.org/mailman/listinfo/zope-announce > http://lists.zope.org/mailman/listinfo/zope-dev ) > > ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] xmldocument
On Wednesday 10 January 2001 16:56, Phil Harris wrote: > Bak, > > I can't help you fix it but I can tell you what the problem is, the file is > too big for Zope to cope with in one transaction so it starts a > sub-transaction and there is a bug in the sub-transactioning engine. > > The same thing happens with a normal 'File' type as well. > > You should probably check the collector to see if this has been fixed or > even reported. > > Phil to say the file is big is an understatement. how can adding a news file be too big for zope to cope? unless the default XML Document is huge. i'll peek at the collector. thanks phil -- http://www.kedai.com.my/kk http://www.kedai.com.my/eZine I will follow you! ..Damage Inc ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] xmldocument
Bak, I can't help you fix it but I can tell you what the problem is, the file is too big for Zope to cope with in one transaction so it starts a sub-transaction and there is a bug in the sub-transactioning engine. The same thing happens with a normal 'File' type as well. You should probably check the collector to see if this has been fixed or even reported. Phil - Original Message - From: "Bak@kedai" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Wednesday, January 10, 2001 4:40 AM Subject: [Zope] xmldocument > happy new year all > i can't get xmldocument to work with zope2.2x i can install the product ok, > but can;t add XML Document. > > i got attribute error. any insight into the error is appreciated. > > can anybody suggest ways of rendering xml documents in zope? > > thanks > > --8< > AttributeError > > Sorry, a Zope error occurred. > > > -- > > http://www.kedai.com.my/kk > http://www.kedai.com.my/eZine > > We don't need no, no, no, no, no parental guidance here! > > > ___ > Zope maillist - [EMAIL PROTECTED] > http://lists.zope.org/mailman/listinfo/zope > ** No cross posts or HTML encoding! ** > (Related lists - > http://lists.zope.org/mailman/listinfo/zope-announce > http://lists.zope.org/mailman/listinfo/zope-dev ) ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] xmldocument
Chris, This occurs using the bog-standard ZODB as well, nothing to do with any other storage facility. Phil - Original Message - From: "Chris McDonough" <[EMAIL PROTECTED]> To: "Phil Harris" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: Wednesday, January 10, 2001 9:27 AM Subject: Re: [Zope] xmldocument > Relational database adapters (like ZOracleDA, etc.) are currently not > compatible with subtransactions. I worked around this for a customer by > adding dummy commit_sub and abort_sub methods to the database adapter's DB > class, e.g. > > def commit_sub(*arg, **kw): pass > def abort_sub(*arg, **kw): pass > > > - Original Message - > From: "Phil Harris" <[EMAIL PROTECTED]> > To: <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> > Sent: Wednesday, January 10, 2001 3:56 AM > Subject: Re: [Zope] xmldocument > > > > Bak, > > > > I can't help you fix it but I can tell you what the problem is, the file > is > > too big for Zope to cope with in one transaction so it starts a > > sub-transaction and there is a bug in the sub-transactioning engine. > > > > The same thing happens with a normal 'File' type as well. > > > > You should probably check the collector to see if this has been fixed or > > even reported. > > > > Phil > > > > - Original Message - > > From: "Bak@kedai" <[EMAIL PROTECTED]> > > To: <[EMAIL PROTECTED]> > > Sent: Wednesday, January 10, 2001 4:40 AM > > Subject: [Zope] xmldocument > > > > > > > happy new year all > > > i can't get xmldocument to work with zope2.2x i can install the product > > ok, > > > but can;t add XML Document. > > > > > > i got attribute error. any insight into the error is appreciated. > > > > > > can anybody suggest ways of rendering xml documents in zope? > > > > > > thanks > > > > > > --8< > > > AttributeError > > > > > > Sorry, a Zope error occurred. > > > > > > > > > -- > > > > > > http://www.kedai.com.my/kk > > > http://www.kedai.com.my/eZine > > > > > > We don't need no, no, no, no, no parental guidance here! > > > > > > > > > ___ > > > Zope maillist - [EMAIL PROTECTED] > > > http://lists.zope.org/mailman/listinfo/zope > > > ** No cross posts or HTML encoding! ** > > > (Related lists - > > > http://lists.zope.org/mailman/listinfo/zope-announce > > > http://lists.zope.org/mailman/listinfo/zope-dev ) > > > > > > ___ > > Zope maillist - [EMAIL PROTECTED] > > http://lists.zope.org/mailman/listinfo/zope > > ** No cross posts or HTML encoding! ** > > (Related lists - > > http://lists.zope.org/mailman/listinfo/zope-announce > > http://lists.zope.org/mailman/listinfo/zope-dev ) > > > > ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] xmldocument
Relational database adapters (like ZOracleDA, etc.) are currently not compatible with subtransactions. I worked around this for a customer by adding dummy commit_sub and abort_sub methods to the database adapter's DB class, e.g. def commit_sub(*arg, **kw): pass def abort_sub(*arg, **kw): pass - Original Message - From: "Phil Harris" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: Wednesday, January 10, 2001 3:56 AM Subject: Re: [Zope] xmldocument > Bak, > > I can't help you fix it but I can tell you what the problem is, the file is > too big for Zope to cope with in one transaction so it starts a > sub-transaction and there is a bug in the sub-transactioning engine. > > The same thing happens with a normal 'File' type as well. > > You should probably check the collector to see if this has been fixed or > even reported. > > Phil > > - Original Message - > From: "Bak@kedai" <[EMAIL PROTECTED]> > To: <[EMAIL PROTECTED]> > Sent: Wednesday, January 10, 2001 4:40 AM > Subject: [Zope] xmldocument > > > > happy new year all > > i can't get xmldocument to work with zope2.2x i can install the product > ok, > > but can;t add XML Document. > > > > i got attribute error. any insight into the error is appreciated. > > > > can anybody suggest ways of rendering xml documents in zope? > > > > thanks > > > > --8< > > AttributeError > > > > Sorry, a Zope error occurred. > > > > > > -- > > > > http://www.kedai.com.my/kk > > http://www.kedai.com.my/eZine > > > > We don't need no, no, no, no, no parental guidance here! > > > > > > ___ > > Zope maillist - [EMAIL PROTECTED] > > http://lists.zope.org/mailman/listinfo/zope > > ** No cross posts or HTML encoding! ** > > (Related lists - > > http://lists.zope.org/mailman/listinfo/zope-announce > > http://lists.zope.org/mailman/listinfo/zope-dev ) > > > ___ > Zope maillist - [EMAIL PROTECTED] > http://lists.zope.org/mailman/listinfo/zope > ** No cross posts or HTML encoding! ** > (Related lists - > http://lists.zope.org/mailman/listinfo/zope-announce > http://lists.zope.org/mailman/listinfo/zope-dev ) > > ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
[Zope] xmldocument
happy new year all i can't get xmldocument to work with zope2.2x i can install the product ok, but can;t add XML Document. i got attribute error. any insight into the error is appreciated. can anybody suggest ways of rendering xml documents in zope? thanks --8< AttributeError Sorry, a Zope error occurred. -- http://www.kedai.com.my/kk http://www.kedai.com.my/eZine We don't need no, no, no, no, no parental guidance here! ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
[Zope] xmldocument and properties
Does anyone have a simple example of creating and setting the properties of a node within an xml document, using xmldocument and external methods. thanks Matt ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
[Zope] XMLDocument create attributes problem
Hi, I'm trying to make an external method create and set some attributes of nodes in an XML document. The following is a fragment of the code, and the error. I can't even get a valid attribute created, let alone set. Does anyone have some examples? Please could you reply to me as well as the list, regards Matt from Products.XMLDocument.XMLDocument import Document def add(self, id, title): ob=Document() ob.title=title ob.id=id id=self._setObject(id, ob) log_node = ob.createElement('log') an_at = ob.createAttribute('attribute1') Zope Error Zope has encountered an error while publishing this resource. Error Type: TypeError Error Value: too many arguments; expected 3, got 4 Traceback (innermost last): File /usr/local/zope/Zope-2.2.0-linux2-x86/lib/python/ZPublisher/Publish.py, line 222, in publish_module File /usr/local/zope/Zope-2.2.0-linux2-x86/lib/python/ZPublisher/Publish.py, line 187, in publish File /usr/local/zope/Zope-2.2.0-linux2-x86/lib/python/Zope/__init__.py, line 221, in zpublisher_exception_hook (Object: Traversable) File /usr/local/zope/Zope-2.2.0-linux2-x86/lib/python/ZPublisher/Publish.py, line 171, in publish File /usr/local/zope/Zope-2.2.0-linux2-x86/lib/python/ZPublisher/mapply.py, line 160, in mapply (Object: CreateNewsItem) File /usr/local/zope/Zope-2.2.0-linux2-x86/lib/python/ZPublisher/Publish.py, line 112, in call_object (Object: CreateNewsItem) File /usr/local/zope/Zope-2.2.0-linux2-x86/lib/python/OFS/DTMLMethod.py, line 172, in __call__ (Object: CreateNewsItem) File /usr/local/zope/Zope-2.2.0-linux2-x86/lib/python/DocumentTemplate/DT_String.py, line 528, in __call__ (Object: CreateNewsItem) File /usr/local/zope/Zope-2.2.0-linux2-x86/lib/python/DocumentTemplate/DT_Util.py, line 337, in eval (Object: addxmldoc('test', 'some_title_test')) (Info: addxmldoc) File , line 0, in ? File /usr/local/zope/Zope-2.2.0-linux2-x86/lib/python/Products/ExternalMethod/ExternalMethod.py, line 270, in __call__ (Object: addxmldoc) (Info: (('test', 'some_title_test'), {}, None)) File /usr/local/zope/Zope-2.2.0-linux2-x86/Extensions/addxmldoc.py, line 11, in add (Object: Traversable) File /usr/local/zope/Zope-2.2.0-linux2-x86/lib/python/Products/XMLDocument/XMLDocument.py, line 283, in createAttribute (Object: Manageable) TypeError: (see above) ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
[Zope] XMLDocument manage_edit from DTML
Hi, I am trying to create a new XMLDocument object and then stuff some data into it - all from DTML. I can create a new default XMLDocument with: After I create the new XMLDocument, I would like to do something like: The stumper is, this call doesn't throw any errors, but it also doesn't change the data! Any ideas? Pls respond directly to [EMAIL PROTECTED] as well as the list (I'm not on the list). Thanks, Eric. ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
[Zope] XMLDocument appendChild
Hi, I use XMLDocument the following dtml method (editUseCaseTitle): applied on an XML Node http://zion:8080/UseCases/cases/cases_lines/xml_db/e2914/e2964/editUseCaseTi tle where : - xml_db is my XML Document - editUseCaseTitle is in the 'cases' folder When running I have the following error : Zope Error Zope has encountered an error while publishing this resource. Unauthorized You are not authorized to access appendChild. Traceback (innermost last): File /usr/local/zope/lib/python/ZPublisher/Publish.py, line 214, in publish_module File /usr/local/zope/lib/python/ZPublisher/Publish.py, line 179, in publish File /usr/local/zope/lib/python/ZPublisher/Publish.py, line 165, in publish File /usr/local/zope/lib/python/ZPublisher/mapply.py, line 160, in mapply (Object: editUseCaseTitle) File /usr/local/zope/lib/python/ZPublisher/Publish.py, line 102, in call_object (Object: editUseCaseTitle) File /usr/local/zope/lib/python/OFS/DTMLMethod.py, line 150, in __call__ (Object: editUseCaseTitle) File /usr/local/zope/lib/python/DocumentTemplate/DT_String.py, line 502, in __call__ (Object: editUseCaseTitle) File /usr/local/zope/lib/python/DocumentTemplate/DT_Let.py, line 145, in render (Object: doc="getOwnerDocument()" title_node="doc.createElement('title')" title_text="doc.createTextNode(title)") File /usr/local/zope/lib/python/DocumentTemplate/DT_Util.py, line 335, in eval (Object: title_node.appendChild(title_text)) (Info: title_text) File , line 0, in ? File /usr/local/zope/lib/python/DocumentTemplate/DT_Util.py, line 140, in careful_getattr Unauthorized: (see above) Current user is manager for everything...(me !) I use Zope version: Zope 2.1.6 (source release, python 1.5.2, linux2) Python version: 1.5.2 (#2, May 18 2000, 10:00:10) [GCC 2.95.2 19991024 (release)] System Platform: freebsd4 XMLDocument (XML Document 1.0a6) What is wrong ? :( Regards, Olivier. ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )