Ken Beesley | 1 Sep 11:47 2005
Picon

Corrected list of packages handling XML 1.1

My apologies to Fredrik Lundh of Pythonware for the omission of 
ElementType+sgmlop in my recent listing of Python-XML packages that 
handle XML 1.1. The list (that I'm aware of) currently includes: 1. 
pxdom by Andrew Clover (http://www.doxdesk.com/software/py/pxdom.html, 
http://www.doxdesk.com/file/software/py/pxdom.py) 2. pyLTXML from the 
Univ. of Edinburgh (http://www.ltg.ed.ac.uk/software/xml, 
http://www.ltg.ed.ac.uk/software/gpl_xml.html, 
http://www.ltg.ed.ac.uk/software/xml/xmldoc/xmldoc.html) 3. elementtree 
library from Pythonware (http://effbot.org/zone/element.htm, 
http://effbot.org/zone/element-index.htm) If I've forgotten anyone, 
please help me complete the list. I'm still a Python-XML beginner, and 
any omissions are unintentional. Thanks again to all those who have 
provided such tools. Ken Fredrik Lundh <fredrik <at> pythonware.com> wrote

fwiw, as the following snippet illustrates, ET+sgmlop can read files with
1.1-style character references, but the ET serializer doesn't encode such
characters on the way out. this script

from elementtree import ElementTree, SgmlopXMLTreeBuilder
from StringIO import StringIO

file = StringIO("<test>this is a backspace: &#x0008;</test>")

doc = ElementTree.parse(file, SgmlopXMLTreeBuilder.TreeBuilder())

root = doc.getroot()

print repr(root.text)
print repr(ElementTree.tostring(root))

(Continue reading)

Walter Dörwald | 1 Sep 12:50 2005
Picon

Re: Corrected list of packages handling XML 1.1

Ken Beesley wrote:

> My apologies to Fredrik Lundh of Pythonware for the omission of 
> ElementType+sgmlop in my recent listing of Python-XML packages that 
> handle XML 1.1. The list (that I'm aware of) currently includes: 1. 
> pxdom by Andrew Clover (http://www.doxdesk.com/software/py/pxdom.html, 
> http://www.doxdesk.com/file/software/py/pxdom.py) 2. pyLTXML from the 
> Univ. of Edinburgh (http://www.ltg.ed.ac.uk/software/xml, 
> http://www.ltg.ed.ac.uk/software/gpl_xml.html, 
> http://www.ltg.ed.ac.uk/software/xml/xmldoc/xmldoc.html) 3. elementtree 
> library from Pythonware (http://effbot.org/zone/element.htm, 
> http://effbot.org/zone/element-index.htm) If I've forgotten anyone, 
> please help me complete the list.
 > [...]

XIST (http://www.livinglogic.de/Python/xist) handles XML 1.1 charrefs 
when a parser is used that does it. (XIST uses sgmlop by default, so it 
works by default). When serializing XML those charrefs are always 
supported. See the following snippet:

 >>> from ll.xist import parsers, presenters
 >>> from ll.xist.ns import html
 >>> e = parsers.parseString("<body>this is a backspace: &#x0008;</body>")
 >>> print e.asrepr(presenters.CodePresenter())
ll.xist.xsc.Frag(
    ll.xist.ns.html.body(
       'this is a backspace: \x08'
    )
)
 >>> print e.asBytes()
(Continue reading)

Uche Ogbuji | 1 Sep 19:59 2005

Re: Corrected list of packages handling XML 1.1

On Thu, 2005-09-01 at 12:50 +0200, Walter Dörwald wrote:
> Ken Beesley wrote:
> 
> > My apologies to Fredrik Lundh of Pythonware for the omission of 
> > ElementType+sgmlop in my recent listing of Python-XML packages that 
> > handle XML 1.1. The list (that I'm aware of) currently includes: 1. 
> > pxdom by Andrew Clover (http://www.doxdesk.com/software/py/pxdom.html, 
> > http://www.doxdesk.com/file/software/py/pxdom.py) 2. pyLTXML from the 
> > Univ. of Edinburgh (http://www.ltg.ed.ac.uk/software/xml, 
> > http://www.ltg.ed.ac.uk/software/gpl_xml.html, 
> > http://www.ltg.ed.ac.uk/software/xml/xmldoc/xmldoc.html) 3. elementtree 
> > library from Pythonware (http://effbot.org/zone/element.htm, 
> > http://effbot.org/zone/element-index.htm) If I've forgotten anyone, 
> > please help me complete the list.
>  > [...]
> 
> XIST (http://www.livinglogic.de/Python/xist) handles XML 1.1 charrefs 
> when a parser is used that does it. (XIST uses sgmlop by default, so it 
> works by default). When serializing XML those charrefs are always 
> supported. See the following snippet:
> 
>  >>> from ll.xist import parsers, presenters
>  >>> from ll.xist.ns import html
>  >>> e = parsers.parseString("<body>this is a backspace: &#x0008;</body>")
>  >>> print e.asrepr(presenters.CodePresenter())
> ll.xist.xsc.Frag(
>     ll.xist.ns.html.body(
>        'this is a backspace: \x08'
>     )
> )
(Continue reading)

Ken Beesley | 2 Sep 17:54 2005
Picon

Re: Corrected list of packages handling XML 1.1


Uche Ogbuji wrote

>------------------------------
>
>Message: 2
>Date: Thu, 01 Sep 2005 11:59:09 -0600
>From: Uche Ogbuji <Uche.Ogbuji <at> fourthought.com>
>Subject: Re: [XML-SIG] Corrected list of packages handling XML 1.1
>To: Walter D?rwald <walter <at> livinglogic.de>
>Cc: xml-sig <at> python.org, Ken Beesley <ken.beesley <at> xrce.xerox.com>
>Message-ID: <1125597549.14255.347.camel <at> borgia>
>Content-Type: text/plain; charset=ISO-8859-15
>
>On Thu, 2005-09-01 at 12:50 +0200, Walter D?rwald wrote:
>  
>
>>Ken Beesley wrote:
>>
>>    
>>
>>>My apologies to Fredrik Lundh of Pythonware for the omission of 
>>>ElementType+sgmlop in my recent listing of Python-XML packages that 
>>>handle XML 1.1. The list (that I'm aware of) currently includes: 1. 
>>>pxdom by Andrew Clover (http://www.doxdesk.com/software/py/pxdom.html, 
>>>http://www.doxdesk.com/file/software/py/pxdom.py) 2. pyLTXML from the 
>>>Univ. of Edinburgh (http://www.ltg.ed.ac.uk/software/xml, 
>>>http://www.ltg.ed.ac.uk/software/gpl_xml.html, 
>>>http://www.ltg.ed.ac.uk/software/xml/xmldoc/xmldoc.html) 3. elementtree 
>>>library from Pythonware (http://effbot.org/zone/element.htm, 
(Continue reading)

Uche Ogbuji | 5 Sep 02:34 2005

Re: Corrected list of packages handling XML 1.1

On Fri, 2005-09-02 at 17:54 +0200, Ken Beesley wrote:
> Uche Ogbuji wrote
> 
> >------------------------------
> >
> >Message: 2
> >Date: Thu, 01 Sep 2005 11:59:09 -0600
> >From: Uche Ogbuji <Uche.Ogbuji <at> fourthought.com>
> >Subject: Re: [XML-SIG] Corrected list of packages handling XML 1.1
> >To: Walter D?rwald <walter <at> livinglogic.de>
> >Cc: xml-sig <at> python.org, Ken Beesley <ken.beesley <at> xrce.xerox.com>
> >Message-ID: <1125597549.14255.347.camel <at> borgia>
> >Content-Type: text/plain; charset=ISO-8859-15
> >
> >On Thu, 2005-09-01 at 12:50 +0200, Walter D?rwald wrote:
> >  
> >
> >>Ken Beesley wrote:
> >>
> >>    
> >>
> >>>My apologies to Fredrik Lundh of Pythonware for the omission of 
> >>>ElementType+sgmlop in my recent listing of Python-XML packages that 
> >>>handle XML 1.1. The list (that I'm aware of) currently includes: 1. 
> >>>pxdom by Andrew Clover (http://www.doxdesk.com/software/py/pxdom.html, 
> >>>http://www.doxdesk.com/file/software/py/pxdom.py) 2. pyLTXML from the 
> >>>Univ. of Edinburgh (http://www.ltg.ed.ac.uk/software/xml, 
> >>>http://www.ltg.ed.ac.uk/software/gpl_xml.html, 
> >>>http://www.ltg.ed.ac.uk/software/xml/xmldoc/xmldoc.html) 3. elementtree 
> >>>library from Pythonware (http://effbot.org/zone/element.htm, 
(Continue reading)

Fredrik Lundh | 5 Sep 11:48 2005

Re: Corrected list of packages handling XML 1.1

Uche Ogbuji wrote:

> Think I'm giving you a hard time?  You should probably hope that no one
> in the W3C decides to take your list too seriously.

as everyone should have noticed by now, XML is all about lording your
XMLiness over others.  that's not very Pythonic, of course, and, like or
not, this is a Python list.

</F> 

_______________________________________________
XML-SIG maillist  -  XML-SIG <at> python.org
http://mail.python.org/mailman/listinfo/xml-sig

SourceForge.net | 11 Sep 08:01 2005
Picon
Picon

[ pyxml-Patches-1287451 ] xmlproc utf-8 parse fix

Patches item #1287451, was opened at 2005-09-11 02:01
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=306473&aid=1287451&group_id=6473

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: xmlproc
Group: None
Status: Open
Resolution: None
Priority: 5
Submitted By: jlabath (jlabath)
Assigned to: Lars Marius Garshol (larsga)
Summary: xmlproc utf-8 parse fix

Initial Comment:
xmlproc will fail with error message:
"Character data not allowed outside root element" when
parsing utf-8.

This will only happen if the utf-8 document actually
contains any multibyte characters.

 After some research i realized that
xmlproc/xmlutils.py never changes the length of
self.datasize after reencoding the input data. 

I beleive this patch should solve this problem and
(Continue reading)

Veronika V. Nefedova | 14 Sep 19:35 2005

problems with installation

Hi,

I am trying to install the pyXML package and it seems to have so problems 
(I use python 2.4.1). Could you please let me know what I am missing here ? 
I am building it on linux-debian_3.1-ia32 architecture.

[64] wiggum /sandbox/nefedova/pyXML/PyXML-0.8.4 > python2.4 setup.py build -v
'import site' failed; use -v for traceback
Traceback (most recent call last):
   File "setup.py", line 7, in ?
     import sys, os, string
ImportError: No module named os

Thank you very much,

Veronika

_______________________________________________
XML-SIG maillist  -  XML-SIG <at> python.org
http://mail.python.org/mailman/listinfo/xml-sig

Fredrik Lundh | 14 Sep 20:17 2005

Re: problems with installation

Veronika V. Nefedova wrote:

> I am trying to install the pyXML package and it seems to have so problems
> (I use python 2.4.1). Could you please let me know what I am missing here ?
> I am building it on linux-debian_3.1-ia32 architecture.
>
> [64] wiggum /sandbox/nefedova/pyXML/PyXML-0.8.4 > python2.4 setup.py build -v
> 'import site' failed; use -v for traceback
> Traceback (most recent call last):
>   File "setup.py", line 7, in ?
>     import sys, os, string
> ImportError: No module named os

"import site failed" followed by more import failures means that your
Python installation is seriously broken.

what happens if you just start the interpreter?

    $ python2.4

</F> 

_______________________________________________
XML-SIG maillist  -  XML-SIG <at> python.org
http://mail.python.org/mailman/listinfo/xml-sig

Tom Howard | 18 Sep 05:17 2005

Install error

When installing PyXML-0.8.4 from the Terminal window I get an error at the end:

error: /System/Library/Frameworks/Python.framework/Versions/2.3/bin/xmlproc_parse: Permission denied

I’m not sure how to get around this or how to add my username/password to the install command. Any help is greatly appreciated!
Thanks!
Tom Howard
_______________________________________________
XML-SIG maillist  -  XML-SIG <at> python.org
http://mail.python.org/mailman/listinfo/xml-sig

Gmane