[issue38174] Security vulnerability in bundled expat CVE-2019-15903 (fix available in expat 2.2.8)

2019-09-14 Thread Uche Ogbuji
New submission from Uche Ogbuji : cpython bundles expat in Modules/expat/ and needs to be updated to expat-2.2.8 to security vulnerability CVE-2019-15903. >From Sebastian Pipping on XML-DEV ML: Expat 2.2.8 [1] has been released yesterday. This release fixes a security issue — a heap buf

ANN: Amara XML Toolkit 1.2.0.2

2007-06-23 Thread Uche Ogbuji
. -- Uche Ogbuji http://uche.ogbuji.net Linked-in profile: http://www.linkedin.com/in/ucheogbuji Articles: http://uche.ogbuji.net/tech/publications/ -- http://mail.python.org/mailman/listinfo/python-announce-list Support the Python Software Foundation: http://www.python.org

ANN: Amara XML Toolkit 1.2.0.1

2007-01-06 Thread Uche Ogbuji
for you. If you prefer not to use easy_install, grab a 4Suite-XML package more recent than 1.0 and install that, then install the Amara package using the usual: python setup.py install Or a Windows installer, or other method. -- Uche Ogbuji Work: The Kadomo Group

ANN: 4Suite XML 1.0.2

2006-12-26 Thread Uche Ogbuji
the source and eggs. Windows installers come with documentation; no separate download needed. The 4Suite XML core manual is included in the documentation. It can be browsed online at http://4suite.org/docs/CoreManual.xml -- Uche Ogbuji Work: The Kadomo Group, Inc. http

ANN: 4Suite XML 1.0.1

2006-12-10 Thread Uche Ogbuji
be browsed online at http://4suite.org/docs/CoreManual.xml -- Uche Ogbuji Work: The Kadomo Group, Inc. http://uche.ogbuji.nethttp://kadomo.com http://copia.ogbuji.net Lead dev at http://4Suite.org Articles: http://uche.ogbuji.net

Re: lxml/ElementTree and .tail

2006-11-19 Thread Uche Ogbuji
Fredrik Lundh wrote: Uche Ogbuji wrote: I certainly have never liked the aspects of the ElementTree API under present discussion. But that's not as important as the fact that I think the above statement is misleading. There has always been a battle in XML between the people who think

Re: lxml/ElementTree and .tail

2006-11-19 Thread Uche Ogbuji
50% of the problem with namespace. QNames in content (which are of course an abuse of namespaces) are almost all of the other 50%. I call them hidden namespaces: http://copia.ogbuji.net/blog/2006-08-14/Some_thoug -- Uche Ogbuji Fourthought, Inc. http

Re: lxml/ElementTree and .tail

2006-11-17 Thread Uche Ogbuji
the preeminent *data model* of the XML world. That distinction goes to the XPath data model, which is quite different from the Infoset. -- Uche Ogbuji Fourthought, Inc. http://uche.ogbuji.nethttp://fourthought.com http://copia.ogbuji.net http

Re: newbie: minidom

2006-11-17 Thread Uche Ogbuji
Paul Watson wrote: Explicit [XML declaration] is better than implicit. Yes indeed. Always use an XML declaration http://www-128.ibm.com/developerworks/xml/library/x-tipdecl.html -- Uche Ogbuji Fourthought, Inc. http://uche.ogbuji.nethttp

ANN: 4Suite XML 1.0

2006-10-21 Thread Uche Ogbuji
in the documentation. It can be browsed online at http://4suite.org/docs/CoreManual.xml -- Uche Ogbuji Fourthought, Inc. http://uche.ogbuji.nethttp://fourthought.com http://copia.ogbuji.net http://4Suite.org Articles: http

Re: WSGI - How Does It Affect Me?

2006-10-10 Thread uche . ogbuji
the following article, by me, focusing on middleware: http://www.ibm.com/developerworks/library/wa-wsgi/ (cover Weblog entry: http://copia.ogbuji.net/blog/2006-08-23/_Mix_and_m ) -- Uche Ogbuji Fourthought, Inc. http://uche.ogbuji.nethttp

Re: PyXML not supported, what to use next?

2006-10-06 Thread uche . ogbuji
]. For many people these are now very easy to install. This is the case for some other third-party XML tools as well. [1] http://peak.telecommunity.com/DevCenter/EasyInstall [2] http://4suite.org/ [3] http://uche.ogbuji.net/tech/4suite/amara/ -- Uche Ogbuji Fourthought, Inc

Re: File I/O

2006-10-06 Thread uche . ogbuji
] top.xml_parent.xml_insert_before(top, doc.xml_create_element(u'Body2', content=u'abc')) top.xml(stream=open('test.xml', 'w')) Amara: http://uche.ogbuji.net/tech/4suite/amara/ -- Uche Ogbuji Fourthought, Inc. http://uche.ogbuji.nethttp

Re: Trying to find a elements Xpath and store it as a attribute

2006-10-06 Thread uche . ogbuji
worked on. For discussion see: http://www.xml.com/pub/a/2004/11/24/py-xml.html For an updated solution see abs_path in Amara domtools. In most cases you can safely call that on an Amara bindery node. -- Uche Ogbuji Fourthought, Inc. http://uche.ogbuji.net

Re: XSLT speed comparisons

2006-09-29 Thread uche . ogbuji
/developerworks/library/wa-wsgi/ -- Uche Ogbuji Fourthought, Inc. http://uche.ogbuji.nethttp://fourthought.com http://copia.ogbuji.net http://4Suite.org Articles: http://uche.ogbuji.net/tech/publications/ -- http://mail.python.org

Re: XSLT speed comparisons

2006-09-29 Thread uche . ogbuji
buildPage(): [SNIP] Added to: http://uche.ogbuji.net/tech/akara/nodes/2003-01-01/python-xslt -- Uche Ogbuji Fourthought, Inc. http://uche.ogbuji.nethttp://fourthought.com http://copia.ogbuji.net http://4Suite.org Articles: http

Re: XSLT speed comparisons

2006-09-29 Thread uche . ogbuji
the most recent versions of Safari). But regardless, with that coverage you can write apps using XSLT, support the entire spectrum of browsers (and mobile apps, spiders, etc.) and yet rarely ever require XSLT applied on the server side. -- Uche Ogbuji Fourthought, Inc

Re: ANN: Amara XML Toolkit 1.1.9

2006-09-19 Thread Uche Ogbuji
Apologies for the cross-post. I need to post a brief correction to the lists for the original announcement. Uche Ogbuji wrote: http://uche.ogbuji.net/tech/4suite/amara http://cheeseshop.python.org/pypi/Amara/ ftp://ftp.4suite.org/pub/Amara/ ... The original Windows installer EXEs posted

ANN: Amara XML Toolkit 1.1.9

2006-09-16 Thread Uche Ogbuji
the usual: python setup.py install Or a Windows installer, or other method. -- Uche Ogbuji Fourthought, Inc. http://uche.ogbuji.nethttp://fourthought.com http://copia.ogbuji.net http://4Suite.org Articles: http://uche.ogbuji.net

ANN: 4Suite XML 1.0rc4

2006-09-16 Thread Uche Ogbuji
of the form 4Suite-XML-docs-1.0rc4.* Release notes -- The current installation directory layout document tells where package files are installed: http://4suite.org/docs/installation-locations.xhtml -- Uche Ogbuji Fourthought, Inc. http://uche.ogbuji.net

Re: XML parsing and writing

2006-08-28 Thread uche . ogbuji
. http://uche.ogbuji.net/tech/4suite/amara/ http://4Suite.org -- Uche Ogbuji Fourthought, Inc. http://uche.ogbuji.nethttp://fourthought.com http://copia.ogbuji.net http://4Suite.org Articles: http://uche.ogbuji.net/tech/publications

Re: Need help in xml

2006-07-10 Thread uche . ogbuji
the right tool and such problems tend to become much simpler. http://www.logilab.org/projects/xmldiff -- Uche Ogbuji Fourthought, Inc. http://uche.ogbuji.nethttp://fourthought.com http://copia.ogbuji.net http://4Suite.org Articles: http

Re: Amara: Where's my attribute?

2006-07-07 Thread uche . ogbuji
. What version of Python is that? Any chance you can try with current CVS Amara (you can use easy_install)? This part of the discussion should perhaps move to the 4Suite mailing list. I only check this NG once a week. -- Uche Ogbuji Fourthought, Inc. http

Re: xpath question

2006-07-02 Thread uche . ogbuji
be something like: [re:match(@class, 'fo.*'] With the re prefix set as required by the EXSLT module. [1] http://4Suite.org [2] http://www.exslt.org/regexp/ -- Uche Ogbuji Fourthought, Inc. http://uche.ogbuji.nethttp://fourthought.com http

Re: beautifulsoup .vs tidy

2006-07-02 Thread uche . ogbuji
often seen it crash or hang on really bad HTML. TagSoup seems to be built like a tank. I've also never seen BeautifulSoup choke, but I don't use it as much as TagSoup. -- Uche Ogbuji Fourthought, Inc. http://uche.ogbuji.nethttp://fourthought.com

Re: Amara: Where's my attribute?

2006-07-02 Thread uche . ogbuji
will soon be 1.2, and I consider it more mature than 1.0 at this point. The API's also easier: import amara rwd = amara.parse('pq:test xmlns=http://example.com/namespace; xmlns:pq=http://pq.com/ns2/') -- Uche Ogbuji Fourthought, Inc. http://uche.ogbuji.net

Re: 10GB XML Blows out Memory, Suggestions?

2006-06-11 Thread uche . ogbuji
://uche.ogbuji.net/tech/4suite/amara/ -- Uche Ogbuji Fourthought, Inc. http://uche.ogbuji.nethttp://fourthought.com http://copia.ogbuji.net http://4Suite.org Articles: http://uche.ogbuji.net/tech/publications/ -- http://mail.python.org

Re: how to print newline in xml?

2006-06-04 Thread uche . ogbuji
doc.createTextNode. * You can always remove text nodes (or any other kind) by using .removeChild * It's much easier to navigate if you use XPath. PyXML has an xml.xpath module you can use. Good luck. [1] http://www-128.ibm.com/developerworks/xml/library/x-c14n/ -- Uche Ogbuji

Re: How to search XML? Are there special libs?

2006-03-17 Thread uche . ogbuji
, see [3]. [1] http://uche.ogbuji.net/tech/4Suite/amara/ [2] http://copia.ogbuji.net/blog/2005-06-12/Amara_equi [3] http://copia.ogbuji.net/blog/2005/Sep/20 [4] http://www.xml.com/pub/a/2004/12/08/py-xml.html -- Uche Ogbuji Fourthought, Inc. http://uche.ogbuji.net

Re: Announcing atomfeed.py, xmlelements.py, and feedutils.py

2006-03-17 Thread uche . ogbuji
atomixlib [1]. It's used in production to generate and manage PlanetAtom [2][3]. [1] http://trac.defuze.org/browser/oss/atomixlib [2] http://planetatom.net/ [3] http://copia.ogbuji.net/blog/2006-01-25/Planet_Ato -- Uche Ogbuji Fourthought, Inc. http://uche.ogbuji.net

Re: Python version of XMLUnit?

2006-03-07 Thread uche . ogbuji
could be used with, say 4Suite's 4XUpdate to apply a patch to another document. -- Uche Ogbuji Fourthought, Inc. http://uche.ogbuji.nethttp://fourthought.com http://copia.ogbuji.net http://4Suite.org Articles: http://uche.ogbuji.net

Re: XSLT and gettext?

2006-03-03 Thread uche . ogbuji
extensions. See: http://copia.ogbuji.net/blog/2005-06-14/i18n_for_X -- Uche Ogbuji Fourthought, Inc. http://uche.ogbuji.nethttp://fourthought.com http://copia.ogbuji.net http://4Suite.org Articles: http://uche.ogbuji.net/tech

Re: only a simple xml reader tag:idvalue/tag:id

2006-02-11 Thread uche . ogbuji
content print doc.response.result.msg.xml() #to get the XML source for that element print doc.response.resData.appData.name print doc.response.resData.appData.name.xml() [1] http://uche.ogbuji.net/tech/4Suite/amara/ -- Uche Ogbuji Fourthought, Inc. http://uche.ogbuji.net

Re: only a simple xml reader tag:idvalue/tag:id

2006-02-08 Thread uche . ogbuji
(title_namespace, 'id') -- Uche Ogbuji Fourthought, Inc. http://uche.ogbuji.nethttp://fourthought.com http://copia.ogbuji.net http://4Suite.org Articles: http://uche.ogbuji.net/tech/publications/ -- http://mail.python.org/mailman/listinfo

Re: XML SAX parser bug?

2006-02-07 Thread uche . ogbuji
event merging for you at C speed: http://4suite.org/docs/CoreManual.xml#saxlette -- Uche Ogbuji Fourthought, Inc. http://uche.ogbuji.nethttp://fourthought.com http://copia.ogbuji.net http://4Suite.org Articles: http://uche.ogbuji.net

Re: XML Writer in wxPython

2006-02-07 Thread uche . ogbuji
: http://www.xml.com/pub/a/2002/11/13/py-xml.html See also: http://www.ibm.com/developerworks/xml/library/x-think35.html -- Uche Ogbuji Fourthought, Inc. http://uche.ogbuji.nethttp://fourthought.com http://copia.ogbuji.net http

Re: XML Writer in wxPython

2006-02-07 Thread uche . ogbuji
: http://www.xml.com/pub/a/2002/11/13/py-xml.html See also: http://www.ibm.com/developerworks/xml/library/x-think35.html -- Uche Ogbuji Fourthought, Inc. http://uche.ogbuji.nethttp://fourthought.com http://copia.ogbuji.net http

Re: Fromatting an xml file

2006-02-07 Thread uche . ogbuji
http://4Suite.org -- Uche Ogbuji Fourthought, Inc. http://uche.ogbuji.nethttp://fourthought.com http://copia.ogbuji.net http://4Suite.org Articles: http://uche.ogbuji.net/tech/publications/ -- http://mail.python.org/mailman

Re: Amara (XML) problem on Solaris

2006-01-01 Thread uche . ogbuji
on both platforms? How did you install them? Thanks. -- Uche Ogbuji Fourthought, Inc. http://uche.ogbuji.nethttp://fourthought.com http://copia.ogbuji.net http://4Suite.org Articles: http://uche.ogbuji.net/tech/publications

Re: Rss/xml namespaces sgmllib, sax, minidom

2006-01-01 Thread uche . ogbuji
defined like domain names on some website? Based on this question, I tend to think you might want to leave the XML processing to someone else's code. How about using Pilgrim's feedparser? http://feedparser.org/ -- Uche Ogbuji Fourthought, Inc. http://uche.ogbuji.net

ANN: 4Suite XML 1.0b3

2005-12-15 Thread Uche Ogbuji
-- The current installation directory layout document tells where package filesare installed:http://4suite.org/docs/installation-locations.xhtml For insulation from Domlette implementation changes, developers shouldalways use the generic Ft.Xml.Domlette APIs (rather than, sayFt.Xml.cDomlette).-- Uche

Re: Help designing reading/writing a xml-fileformat

2005-12-13 Thread uche . ogbuji
the pickle module) How about an XML pickle? PyXML has such a module. WDDX, also in PyXML, is another option. -- Uche Ogbuji Fourthought, Inc. http://uche.ogbuji.nethttp://fourthought.com http://copia.ogbuji.net http://4Suite.org

Re: Using XML w/ Python...

2005-12-12 Thread uche . ogbuji
import amara print dir(amara) ['__builtins__', '__doc__', '__file__', '__name__', '__path__', '__version__', 'binderytools', 'os', 'parse'] So it's not able to load domtools. What do you get trying from amara import domtools print domtools.py -- Uche Ogbuji

Re: Using XML w/ Python...

2005-12-12 Thread uche . ogbuji
with? Thanks. -- Uche Ogbuji Fourthought, Inc. http://uche.ogbuji.nethttp://fourthought.com http://copia.ogbuji.net http://4Suite.org Articles: http://uche.ogbuji.net/tech/publications/ -- http://mail.python.org/mailman/listinfo

Re: Using XML w/ Python...

2005-12-12 Thread uche . ogbuji
.__file__ -- Uche Ogbuji Fourthought, Inc. http://uche.ogbuji.nethttp://fourthought.com http://copia.ogbuji.net http://4Suite.org Articles: http://uche.ogbuji.net/tech/publications/ -- http://mail.python.org/mailman/listinfo/python

Re: Using XML w/ Python...

2005-12-12 Thread uche . ogbuji
Rick, thanks. Based on your clue I checked, and it seems those Amara packages are not being built rightly. I'll look to get those packages fixed and updated tomorrow. -- Uche Ogbuji Fourthought, Inc. http://uche.ogbuji.nethttp://fourthought.com

Re: Creating referenceable objects from XML

2005-12-11 Thread uche . ogbuji
. -- Uche Ogbuji Fourthought, Inc. http://uche.ogbuji.nethttp://fourthought.com http://copia.ogbuji.net http://4Suite.org Articles: http://uche.ogbuji.net/tech/publications/ -- http://mail.python.org/mailman/listinfo/python-list

Re: Using XML w/ Python...

2005-12-11 Thread uche . ogbuji
] http://uche.ogbuji.net/uche.ogbuji.net/tech/4suite/amara/manual-dev -- Uche Ogbuji Fourthought, Inc. http://uche.ogbuji.nethttp://fourthought.com http://copia.ogbuji.net http://4Suite.org Articles: http://uche.ogbuji.net/tech

Re: Using XML w/ Python...

2005-12-11 Thread uche . ogbuji
://www.digg.com/rss/index.xml;) print rssDigg.rss.channel.item.title Video: Conan O'Brien iPod Ad Parody -- Uche Ogbuji Fourthought, Inc. http://uche.ogbuji.nethttp://fourthought.com http://copia.ogbuji.net http://4Suite.org

Re: Using XML w/ Python...

2005-12-11 Thread uche . ogbuji
for ActivePython. What is the output of python -c import sys; print sys.path Where you replace python abpve with whatever way you invoke ActivePython. -- Uche Ogbuji Fourthought, Inc. http://uche.ogbuji.nethttp://fourthought.com http

Re: Using XML w/ Python...

2005-12-11 Thread uche . ogbuji
', 'pyxml_standins', 'saxtools'] -- Uche Ogbuji Fourthought, Inc. http://uche.ogbuji.nethttp://fourthought.com http://copia.ogbuji.net http://4Suite.org Articles: http://uche.ogbuji.net/tech/publications/ -- http://mail.python.org/mailman

Re: XML and namespaces

2005-12-05 Thread uche . ogbuji
to emphasize heavily to users that minidom is broken with respect to Namespaces and serialization, and that they abandon it in favor of third-party tools. -- Uche Ogbuji Fourthought, Inc. http://uche.ogbuji.nethttp://fourthought.com http://copia.ogbuji.net

Re: XML and namespaces

2005-12-05 Thread uche . ogbuji
: element.setAttributeNS(xml.dom.XMLNS_NAMESPACE, None, DAV:) I'd love to hear how many actual minidom users would agree with you. Of course (FWIW) I meant element.setAttributeNS(xml.dom.XMLNS_NAMESPACE, xmlns, DAV:) -- Uche Ogbuji Fourthought, Inc. http

Re: XML and namespaces

2005-12-05 Thread uche . ogbuji
, they are confusing, but I have a good handle on all the nuances by now). Again, no skin off my back here: I write and use tools that are XML namespaces compliant. It doesn't hurt me that Minidom is not. I was hoping to help, but again I don't have time for ths argument. -- Uche Ogbuji

Re: XML and namespaces

2005-12-05 Thread uche . ogbuji
(there are others as well). Good luck. -- Uche Ogbuji Fourthought, Inc. http://uche.ogbuji.nethttp://fourthought.com http://copia.ogbuji.net http://4Suite.org Articles: http://uche.ogbuji.net/tech/publications/ -- http://mail.python.org

Re: XML and namespaces

2005-12-02 Thread uche . ogbuji
, output has to fix up namespaces in .namespaceURI properties as well as directly asserted xmlns attributes. It would be silly for DOM to produce malformed XML+XMLNS, and of course it is not meant to. The minidom behavior needs fixing, badly. -- Uche Ogbuji Fourthought, Inc

Re: XML and namespaces

2005-12-02 Thread uche . ogbuji
can to get to it tomorrow. If you help me with code review and maybe writing some tests, that would be a huge help. -- Uche Ogbuji Fourthought, Inc. http://uche.ogbuji.nethttp://fourthought.com http://copia.ogbuji.net http

Re: XML and namespaces

2005-11-30 Thread uche . ogbuji
of namespace ignorant code. Can anyone who's worked on minidom more recently let me know if I'm just blind to something? -- Uche Ogbuji Fourthought, Inc. http://uche.ogbuji.nethttp://fourthought.com http://copia.ogbuji.net http://4Suite.org

Re: BisonGen parser generator. Newbie question

2005-11-29 Thread uche . ogbuji
-CVS.tar.gz (.zip also available). Also, you might want to ask BGen questions on the 4Suite mailing list, where other BGen developers hang out. http://lists.fourthought.com/pipermail/4suite/ -- Uche Ogbuji Fourthought, Inc. http://uche.ogbuji.net

Re: Move xml.sax.saxutils.*?

2005-11-29 Thread uche . ogbuji
a replacement for the current import. -- Uche Ogbuji Fourthought, Inc. http://uche.ogbuji.nethttp://fourthought.com http://copia.ogbuji.net http://4Suite.org Articles: http://uche.ogbuji.net/tech/publications/ -- http://mail.python.org

Re: XMLSchema Parsing

2005-11-29 Thread uche . ogbuji
Good luck. -- Uche Ogbuji Fourthought, Inc. http://uche.ogbuji.nethttp://fourthought.com http://copia.ogbuji.net http://4Suite.org Articles: http://uche.ogbuji.net/tech/publications/ -- http://mail.python.org/mailman/listinfo

Re: xpath support in python 2.4

2005-11-29 Thread uche . ogbuji
And80: Is [the xml.xpath module] still part of the standard library? Alan Kennedy: No, it's not. Not sure if it ever was. It never was. -- Uche Ogbuji Fourthought, Inc. http://uche.ogbuji.nethttp://fourthought.com http://copia.ogbuji.net

Re: Writing big XML files where beginning depends on end.

2005-11-28 Thread uche . ogbuji
subtrees to the outer shell. MarkupWriter operates in streaming mode, so you would not be holding much XML in memory at all. http://www.xml.com/pub/a/2005/04/20/py-xml.html -- Uche Ogbuji Fourthought, Inc. http://uche.ogbuji.nethttp

Re: Recommendation please: forming an XML toolkit

2005-11-11 Thread uche . ogbuji
questions, do ask. If not, I would just take a chance on whatever your present leaning may be. -- Uche Ogbuji Fourthought, Inc. http://uche.ogbuji.nethttp://fourthought.com http://copia.ogbuji.net http://4Suite.org Articles: http

Re: XML DOM: XML/XHTML inside a text node

2005-11-04 Thread uche . ogbuji
-21/Dare_s_XLI excerpt: Adding a phone element as a child of the contact element' contacts.xml_append_fragment('phone%s/phone'%'206-555-0168' http://uche.ogbuji.net/tech/4suite/amara -- Uche Ogbuji Fourthought, Inc. http://uche.ogbuji.nethttp

Re: Add attribute using pyxml

2005-11-04 Thread uche . ogbuji
How do I add a new attribute to the existing xml Document tree??? what do you mean by using pyxml? There are several pyxml modules. Do you mean minidom? If so that comes with stock Python as well (hint: element_node.setAttributeNS(ns, qname)). -- Uche Ogbuji

Re: XML Tree Discovery (script, tool, __?)

2005-10-30 Thread uche . ogbuji
/dtdgen.html), though as the original it has several limitations on the accuracy of the inferred DTD. Ah. Cool. Got a link? -- Uche Ogbuji Fourthought, Inc. http://uche.ogbuji.nethttp://fourthought.com http://copia.ogbuji.net http

Re: XML Tree Discovery (script, tool, __?)

2005-10-28 Thread uche . ogbuji
Python, but the good news is that XSLT is easy to invoke from Python using tools such as 4Suite. http://uche.ogbuji.net/tech/akara/nodes/2003-01-01/python-xslt -- Uche Ogbuji Fourthought, Inc. http://uche.ogbuji.nethttp://fourthought.com http

Re: XML Tree Discovery (script, tool, __?)

2005-10-27 Thread uche . ogbuji
(u'ancestor::*')]) paths.add(u'/' + path) #Pretty-print output for name in elems: print name, '\n\t\t\t', '\n\t\t\t'.join(elems[name]) -- Uche Ogbuji Fourthought, Inc. http://uche.ogbuji.nethttp://fourthought.com http://copia.ogbuji.net

Re: XML Tree Discovery (script, tool, __?)

2005-10-26 Thread uche . ogbuji
: 1) whether the element was in a document 2) where to find it (the chain of parents) This is easy to do in SAX. For some hints, see page 2 of my article: http://www.xml.com/pub/a/2004/11/24/py-xml.html -- Uche Ogbuji Fourthought, Inc. http://uche.ogbuji.net

Re: XML Tree Discovery (script, tool, __?)

2005-10-24 Thread uche . ogbuji
to be more specific. What sort of output do you want from this discovery? -- Uche Ogbuji Fourthought, Inc. http://uche.ogbuji.nethttp://fourthought.com http://copia.ogbuji.net http://4Suite.org Articles: http://uche.ogbuji.net/tech

Re: xml2schema

2005-09-30 Thread uche . ogbuji
Er, do you mean to generate a Relax NG (or possibly a DTD in fact) from some XML file?? If you do mean this then just think of that how you could generate grammar from some paragraphs of English text... Sorta non-trivial, if possible at all, isn't it? :-) Very well put. However, for RELAX NG

Re: xml2schema

2005-09-23 Thread uche . ogbuji
Er, do you mean to generate a Relax NG (or possibly a DTD in fact) from some XML file?? If you do mean this then just think of that how you could generate grammar from some paragraphs of English text... Sorta non-trivial, if possible at all, isn't it? :-) Very well put. However, for RELAX NG

Re: What XML lib to use?

2005-09-13 Thread uche . ogbuji
I'm confused, I want to read/write XML files but I don't really understand what library to use. I've used DOM-based libraries in other languages, is PyXML the library to use? There are many options (some say too many): http://www.xml.com/pub/a/2004/10/13/py-xml.html Try out Amara Bindery, if

Re: Limited XML tidy

2005-08-25 Thread uche . ogbuji
The problem is that when the sax handler raises an exception, I can't see how to find out why. What I want to do is for DodgyErrorHandler to do something different depending on where we are in the course of parsing. Is there anyway to get that information back from xml.sax (or indeed from any

Re: PyXML and xml.dom

2005-08-17 Thread uche . ogbuji
Is PyXML now part of the Python distribution, or is it still an add-on? Parts of PyXML have been migrated into Python core since Python 2.0, but there is still also a standalone PyXML package.,. See: http://www.xml.com/pub/a/2002/09/25/py.html -- Uche http://copia.ogbuji.net --

ANN: Amara XML Toolkit 1.0

2005-08-10 Thread Uche Ogbuji
, grab the stand along Amara package. In either case, unpack to a convenient location and run: python setup.py install -- Uche Ogbuji Fourthought, Inc. http://uche.ogbuji.nethttp://fourthought.com http://copia.ogbuji.net http

Re: [XML-SIG] xml-object mapping

2005-07-30 Thread Uche Ogbuji
/browse_thread/thread/a63d0ad3fd23cb37/6ad0223c5b8f9946?lnk=stq=python+xmlrnum=3hl=en -- Uche Ogbuji Fourthought, Inc. http://uche.ogbuji.nethttp://fourthought.com http://copia.ogbuji.net http://4Suite.org Use CSS to display XML

Re: Suggestions for Python XML library which can search and insert

2005-07-29 Thread uche . ogbuji
I'm looking for a library that can search through an XML document tree, locate an element by attribute (ideally this can be done through XPath), and insert an element (as its child). Simple? Yes? ...but the code I've seen so far which does this uses 'nested for loops' for trees which are

Re: xml-object mapping

2005-07-29 Thread uche . ogbuji
I am looking for an xml-object mapping tool ('XML Data Binding-design time product') where I can define the mapping rules in 'binding files' and the parser is generated automatically. Similar to the solution of Dave Kuhlman (http://www.rexx.com/~dkuhlman/ generateDS.html) where the mapping is

Re: Differences between RDFlib - 4RDF and Redfoot - 4Suite?

2005-07-15 Thread uche . ogbuji
I was wondering about the differences with the referred libs and servers. Since the documentation isn't so thorough(and a bit because of my laziness), I thought I'd make request for usage accounts etc. stating the pros and cons of the aforementioned. Any notes would be appreciated. RDFLib is a

Re: formatted xml output from ElementTree inconsistency

2005-06-26 Thread uche . ogbuji
Patrick Maupin wrote: Dennis Bieber wrote: Off hand, I'd consider the non-binary nature to be because the internet protocols are mostly designed for text, not binary. A document at http://www.w3.org/TR/REC-xml/ lists the design goals for XML. One of the listed goals is XML documents should be

Re: ElementTree Namespace Prefixes

2005-06-18 Thread uche . ogbuji
Chris Spencer: Fredrik Lundh wrote: Chris Spencer wrote: If an XML parser reads in and then writes out a document without having altered it, then the new document should be the same as the original. says who? Good question. There is no One True Answer even within the XML standards. It

Re: Getting a DOM element's children by type (STUPID)

2005-06-10 Thread uche . ogbuji
: process_img(img) You access names directly as objects according to their element type name. [1] see, e.g., http://www.xml.com/pub/a/2003/01/08/py-xml.html [2] see http://www.xml.com/pub/a/2005/01/19/amara.html -- Uche Ogbuji Fourthought, Inc. http://uche.ogbuji.net

Re: Newbie Python XML

2005-06-04 Thread uche . ogbuji
-- Uche Ogbuji Fourthought, Inc. http://uche.ogbuji.nethttp://fourthought.com http://copia.ogbuji.net http://4Suite.org Use CSS to display XML, part 2 - http://www-128.ibm.com/developerworks/edu/x-dw-x-xmlcss2-i.html XML Output

Re: Elementtree and CDATA handling

2005-06-04 Thread uche . ogbuji
, you might want to just use a 'real' HTML serialiser. Amara does provide for this, e.g.: from amara.binderytools import bind_string doc = bind_string(text) print doc.xml(method=uhtml) Which automatically and transparently brings to bear the full power of the XSLT HTML output method. -- Uche

Re: Bug in Elementtree/Expat

2005-05-20 Thread uche . ogbuji
Most examples in the book do not include such a declaration and yet are properly rendered by Internet Explorer. Is it mandatory and why is it that Expat crashes on it? It's not mandatory but it's probably good practice to make the document self-contained. The xlink prefix is defined in the

Re: python modules in home dir

2005-04-23 Thread Uche Ogbuji
On Sat, 2005-04-16 at 08:12 -0600, Uche Ogbuji wrote: On Sat, 2005-04-09 at 14:09 -0700, dzieciou wrote: I'm new-comer in Python. I want to install few Python modules (4Suite, RDFLib, Twisted and Racoon) in my home directory, since Python installation is already installed in the system

Re: XML file parsing with SAX

2005-04-23 Thread Uche Ogbuji
But you're on pretty shaky ground in any XML 1.x toolkit using a bogus DTDecl in this way. Why go through the hassle? Why not use a catalog, or remove the DTDecl? -- Uche Ogbuji Fourthought, Inc. http://uche.ogbuji.nethttp://fourthought.com http

Re: XML file parsing with SAX

2005-04-23 Thread Uche Ogbuji
of it, is that I'm not sure you can specify an catalog in PySAX. You might instead have to override the method entityResolver in your handler (and be sure to ). See the example in listing 1 and and discussion here: http://www.xml.com/pub/a/2005/03/02/pyxml.html Good luck. -- Uche Ogbuji

ANN: Amara XML Toolkit 1.0b2

2005-04-21 Thread Uche Ogbuji
. Installation Amara requires Python 2.3 or more recent and 4Suite 1.0a4 or more recent. Make sure these are installed, unpack Amara to a convenient location and run python setup.py install -- Uche Ogbuji Fourthought, Inc. http://uche.ogbuji.net

ANN: 4Suite 1.0b1

2005-04-16 Thread Uche Ogbuji
(rather than, say Ft.Xml.cDomlette). -- Uche Ogbuji Fourthought, Inc. http://uche.ogbuji.nethttp://fourthought.com http://copia.ogbuji.net http://4Suite.org Use CSS to display XML, part 2 - http://www-128.ibm.com/developerworks

Re: python modules in home dir

2005-04-16 Thread Uche Ogbuji
binary python machine) - have no such big quota. Any idea how can I solve it? To install 4Suite in the home dir, use an incantation such as: ./setup.py config --prefix=$HOME/lib ./setup.py install Note: I expect you also installed Python in your home dir? -- Uche Ogbuji

Re: SAX: Help on processing qualified attribute values

2005-03-22 Thread Uche Ogbuji
for this purpose in Amara's saxtools: http://www.xml.com/pub/a/2005/01/19/amara.html http://cvs.4suite.org/viewcvs/Amara/lib/saxtools.py?rev=1.9view=markup In the latter link see class namespace_mixin, which you should be able to copy to your code if you don't want to install Amara). -- Uche

Re: SAX parsing problem

2005-03-22 Thread Uche Ogbuji
-March/011013.html -- Uche OgbujiFourthought, Inc. http://uche.ogbuji.nethttp://4Suite.orghttp://fourthought.com Use CSS to display XML, part 2 - http://www-128.ibm.com/developerworks/edu/x-dw-x-xmlcss2-i.html Introducing the Amara XML Toolkit - http

Re: Simple XML-to-Python conversion

2005-03-22 Thread Uche Ogbuji
far more diligently than c.l.py. -- Uche OgbujiFourthought, Inc. http://uche.ogbuji.nethttp://4Suite.orghttp://fourthought.com Use CSS to display XML, part 2 - http://www-128.ibm.com/developerworks/edu/x-dw-x-xmlcss2-i.html Introducing the Amara XML

Re: Simple XML-to-Python conversion

2005-03-22 Thread Uche Ogbuji
it anyway. Actually, as I mentioned in my last message, we do have some success reports re: 4Suite + py2exe. See the March archives of the 4Suite list. I think it took some work from those of the 4Suite developers who are Windows-savvy, it did the job. -- Uche Ogbuji

Re: how to use structured markup tools

2005-03-22 Thread Uche Ogbuji
tricks, but I leave that as an exercise for the perverse ;-) -- Uche OgbujiFourthought, Inc. http://uche.ogbuji.nethttp://4Suite.orghttp://fourthought.com Use CSS to display XML, part 2 - http://www-128.ibm.com/developerworks/edu/x-dw-x-xmlcss2-i.html

Re: get textual content of a Xml element using 4DOM

2005-03-04 Thread uche . ogbuji
I suggest using minidom or pxdom [1] rather than 4DOM. If you insist on using 4DOM, xml.dom.ext.Print(node) or xml.dom.ext.PrettyPrint(node) does what you want. --Uche -- http://mail.python.org/mailman/listinfo/python-list

Re: get textual content of a Xml element using 4DOM

2005-03-04 Thread uche . ogbuji
I suggest using minidom or pxdom [1] rather than 4DOM. If you insist on using 4DOM, xml.dom.ext.Print(node) or xml.dom.ext.PrettyPrint(node) does what you want. [1] http://www.doxdesk.com/software/py/pxdom.html --Uche -- http://mail.python.org/mailman/listinfo/python-list

  1   2   >