From m_mariappanX@trillium.com Sat Dec 1 12:09:09 2001 From: m_mariappanX@trillium.com (Mariappan, MaharajanX) Date: Sat, 1 Dec 2001 04:09:09 -0800 Subject: [XML-SIG] xml-schema parsing using minidom. Message-ID: <53A7943A5BD8D411B6930002A5073155013F60D7@bgsmsx90.iind.intel.com> This message is in MIME format. Since your mail reader does not understand this format, some or all of this message may not be legible. ------_=_NextPart_000_01C17A60.FB272420 Content-Type: text/plain; charset="ISO-8859-1" Hi Folks, I tried to parse a xml schema file which contains, .... .......... I tried to parse using minidom and getting error Traceback (most recent call last): File "C:\Project\samples\proto-type\demo.py", line 7, in ? master_config = xml.dom.minidom.parse("c:\\Project\\build.xsd") File "C:\Project\Python20\_xmlplus\dom\minidom.py", line 908, in parse return _doparse(pulldom.parse, args, kwargs) File "C:\Project\Python20\_xmlplus\dom\minidom.py", line 900, in _doparse toktype, rootNode = events.getEvent() File "C:\Project\Python20\_xmlplus\dom\pulldom.py", line 251, in getEvent self.parser.feed(buf) File "C:\Project\Python20\_xmlplus\sax\expatreader.py", line 87, in feed self._parser.Parse(data, isFinal) File "C:\Project\Python20\_xmlplus\sax\expatreader.py", line 178, in start_ele ment_ns AttributesNSImpl(newattrs, {})) File "C:\Project\Python20\_xmlplus\dom\pulldom.py", line 97, in startElementNS prefix = self._current_context[a_uri] KeyError: http://www.w3.org/XML/1998/namespace Then tried pyExpat but no valid response. <> Maharajan ------_=_NextPart_000_01C17A60.FB272420 Content-Type: application/octet-stream; name="demo.ZIP" Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="demo.ZIP" UEsDBBQAAAAIACqMgSuMxP3gCAIAAEUFAAAHAAAAZGVtby5weZ1U0aqbQBB9VvAfFi+Xayj4AYE8 3LYp9CUNxZY+BJaNjmHb3VV210vy953RNRrTplAlhsycOXPOjBup28Z6dtYqrxqda2kkfidxbRt9 jcLZ5xZEBZbJAb+/bM+t8Avcrqngk1R+wk2Re8orlwXvL3srDfIlcefA8rIxtTyxzVJY3grrIEvL 9eGwt81PKP3hcOykqnJEpqsk1sL5/yRwFRE8Baeb0WT+tQ9klFuyD9icrH2z8hEt3a4VJWBVytIk rqBmJ/AFTiIzOCYlnV+tk5jhZUtCpcOPurGMAEwaNgIDji5Z99GcHsWlRf7NECi2Pwq++/JxOwNf yfHxboBVwovQFXxnDaZIa5CHZqqu9C7D2Y3q2hBDGpooorYKNBjv3l8KcdoJjQMOhWR9NBHqyMdI ERijlrbP0meHs3kes8T86r2Vx84jI/EOkwzaXt+EFEcF34WVwkwaR7bPxskKcIqRw1dNgcfpPBaN u1oPWJokNYtI+FRO2mdk1GzSTtKn5EK9CeqjCBf2DxStMB1dpX2TCEynwQovG0Mebhn+YmVeM/Tu 7VCYjMzTQ5NbL5Rf6HsTqgs28JPE6IVzEs05iX7hXAtpOH8hvvnrMzvV/Qqfos4oaX5lNyeKjths sR8a3UoF1j1E7ZXwaEvfo+iOZp3z0HM1iLt7f5b1UTjeFhQIB/Rn9scevwFQSwECFAsUAAAACAAq jIErjMT94AgCAABFBQAABwAAAAAAAAABACAAAAAAAAAAZGVtby5weVBLBQYAAAAAAQABADUAAAAt AgAAAAA= ------_=_NextPart_000_01C17A60.FB272420-- From martin@v.loewis.de Sun Dec 2 10:27:04 2001 From: martin@v.loewis.de (Martin v. Loewis) Date: Sun, 2 Dec 2001 11:27:04 +0100 Subject: [XML-SIG] dom 2 sax events In-Reply-To: (message from Sylvain Thenault on Wed, 28 Nov 2001 09:35:15 +0100 (CET)) References: Message-ID: <200112021027.fB2AR4p01751@mira.informatik.hu-berlin.de> > > Excellent! Would like to commit it, or, Sylvain, would you like to get > > PyXML write access (in which case I'd need you SF account name)? > > That's fine for me, my new SF user-id is 387525 (syt) Hi Sylvain, I just added you to the list of developers; feel free to commit your changes any time. Welcome to the project, Martin From martin@v.loewis.de Sun Dec 2 10:33:27 2001 From: martin@v.loewis.de (Martin v. Loewis) Date: Sun, 2 Dec 2001 11:33:27 +0100 Subject: [XML-SIG] xml-schema parsing using minidom. In-Reply-To: <53A7943A5BD8D411B6930002A5073155013F60D7@bgsmsx90.iind.intel.com> (m_mariappanX@trillium.com) References: <53A7943A5BD8D411B6930002A5073155013F60D7@bgsmsx90.iind.intel.com> Message-ID: <200112021033.fB2AXRr01785@mira.informatik.hu-berlin.de> > I tried to parse a xml schema file which contains, Can you please provide a complete example (including the XML files)? Can you also provide information on the software you are using (Python version, PyXML version, etc)? I cannot reproduce the problem. minidom parses your snippet just fine. Regards, Martin From m_mariappanX@trillium.com Mon Dec 3 03:54:32 2001 From: m_mariappanX@trillium.com (Mariappan, MaharajanX) Date: Sun, 2 Dec 2001 19:54:32 -0800 Subject: [XML-SIG] xml-schema parsing using minidom. Message-ID: <53A7943A5BD8D411B6930002A5073155013F60D8@bgsmsx90.iind.intel.com> This message is in MIME format. Since your mail reader does not understand this format, some or all of this message may not be legible. ------_=_NextPart_000_01C17BAE.376A8BE0 Content-Type: text/plain; charset="iso-8859-1" Hi Martin, I'm using pyXml-0.6.6 with Python 2.0 I've attached the full xml and xsd file. Can you provide feedback on my second approach using pyExpat module TIA, Maharajan. -----Original Message----- From: Martin v. Loewis [mailto:martin@v.loewis.de] Sent: Sunday, December 02, 2001 4:03 PM To: m_mariappanX@trillium.com Cc: xml-sig@python.org Subject: Re: [XML-SIG] xml-schema parsing using minidom. > I tried to parse a xml schema file which contains, Can you please provide a complete example (including the XML files)? Can you also provide information on the software you are using (Python version, PyXML version, etc)? I cannot reproduce the problem. minidom parses your snippet just fine. Regards, Martin ------_=_NextPart_000_01C17BAE.376A8BE0 Content-Type: application/octet-stream; name="build.ZIP" Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="build.ZIP" UEsDBBQAAAAIACN3gStLOm3nOgMAABoNAAAJAAAAYnVpbGQueG1s1ZdRb5swEMefW2nfwfJ7Q9M+ VKtIq5S0WrSkQYVV2xNywEmsGYxsZwnffjaYBEhoiaZqW6RI+Hx3/O74+0js+21MwS/MBWHJAPZ7 l/D+7tO57XIWrUMpgNpOxAC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AAYQMAAAAA ------_=_NextPart_000_01C17BAE.376A8BE0 Content-Type: application/octet-stream; name="build.ZIP" Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="build.ZIP" UEsDBBQAAAAIAPiNgStw/RI1jwoAAGRGAAAJAAAAYnVpbGQueHNk7Vxbb9vGEn5WAP+HrZ5aNLYc BzhBg9qBIju1cXSDpeQ058VYUSuJpxSpkkvb+vdn9soluUtStuI4TYw8iOTMcOeb684S+f3d/TpA tyRO/Cg8bb86Om6/Ozt48ft9Mn+beCuyxggIwuQt3DhtryjdvO107u7uju5eH0XxsnNyfPyq8+eg P+G07YMXrRbF8ZLQIV6TZIM9kuNKkjeHfkjJMsYUXshEcB7+jkaUJCBrEtIPUbw+JwucBvS0/XeK A3/hk3kbli4Xj8MwopwV7iH443fnkZcydv6AafY2wOHytE1CxtpqvU/9YI6k4osoRnRF0GTyBqml kDnaxNE89WgixXZKchl+ndIa4OZPh4fojyCa4QDNiRfgmD1K0OGhQlwqh0IA77TNIGwjut3Ab24P Gvvhst2xU5+TxIv9DRPpYLKy9aL1xg/I1F+TDwFeJu0zBEBwQg8eBeR+CrI4OMIpyN8pCT1xp1Uv sI3WfjjyvDQG+76CK3yvrtJwFqXhXJitpaQV38ruA3DqZ3kN9mWAc/ihhk9cMZkcCcHUscnixmi1 mGmVYEwBw1lKSb1dstUUmerNU8Vr6mJhE6qUkBO3JS4yDGx629iLvNJ9B9Gc8HUkyMMhmhEULdB8 QTsrjCBc9A8vCm+BEbQFZ88cPPHZO9grpGpMHrtM2maYxoQp6PEgneEkr7Qk1MQkhNATWQLd4iBl gH2YXnY5OnWUjQl7o+Gni+H0ajTs9hsxdIefNZ0A09BKA5wBkmE89xcLEjNXvsWxj0OaoE2UJP4s IFVQfpLEe0WyO5z8dtJQ38lv/2pE2bu8GnYfjY0n8kzcDJyeot4rOp7XSOFlQzrv118fDcsmwBQK 17oZLGNFvVdYkghqm5800jnww/S+EeWdH0K38UCAuspfePKC8ssyqkphZL2hW/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7KqNktOLz6z759ch8fj 0fUUMlHFOOuVPqa2hrgR/EWk+d7VOMJro04NR246Iov6igQbcTxGVz4bj3qxSGbVovTG0FgAnt9i gEM2/kIlm4FRqSNosfdwMztwnExuBtOnQfErg8iPGUMc1IHYckL49JEiv075QDBN43Ly2zFmJuPe 6GlM/a0EjNvWTghveK/+XaD4mIhxQ/jf8dOg95XB+2Iu2B9cDaevnwbDb9kDa+J4evJ9QPjF/HAy /F4gfLwXNuwcjE+rjdOINOAnH5iKzkF+089PxefsK4hIf8Ar9K04EcrmNmd7PA7SBwl1hPo0gRN1 Cu/WsNgOg74cJtlgap+Y6AOYOsLc6clzwiWbvn0VXKznMbVM+SOm5wRnfiq5T0gbh5/lyOo5IVQc vX4VjJ5lisoNln/Aost+bmr+AxeFi3Eq8AOUvLPkzyi+IXTq8CmWy0dhVRT2j0OrcND0KLCsh1bf EFZcmrETUWqVP005O9j1Y30XQ4OvCa184tu+0UMYZzEYc4zpysFn3dFJP7oYnkMCurwYdKUjCBz5 /6ICl/8HUEsBAhQLFAAAAAgA+I2BK3D9EjWPCgAAZEYAAAkAAAAAAAAAAQAgAAAAAAAAAGJ1aWxk LnhzZFBLBQYAAAAAAQABADcAAAC2CgAAAAA= ------_=_NextPart_000_01C17BAE.376A8BE0-- From tpassin@home.com Mon Dec 3 05:26:33 2001 From: tpassin@home.com (Thomas B. Passin) Date: Mon, 3 Dec 2001 00:26:33 -0500 Subject: [XML-SIG] xml-schema parsing using minidom. References: <53A7943A5BD8D411B6930002A5073155013F60D8@bgsmsx90.iind.intel.com> Message-ID: <005001c17bbb$12636850$7cac1218@cj64132b> Here's the problem. The build.xsd file uses xml:lang, but the namespace is not declared. minidom looks for the correct namepspace for the "xml" prefix (it is a reserved prefix). If you add the declaration, minidom parses it OK: >>> xml.dom.minidom.parse("c:\\temp\\build.xsd") Here's the start tag with the right namespace: Now, I'm not clear what a parser is supposed to do with the prefix in xml:lang, but rxp, XML Cooktop, and XML Spy all accept the xsd file without the xml namespace having to be declared. If it weren't reserved, it should be declared. But do namespaces have to be declared at all for a document to be well-formed? Not so far as I can see. The Namespaces Rec says: "The prefix xml is by definition bound to the namespace name http://www.w3.org/XML/1998/namespace. " It is not clear to me whether this means that it does not have to be declared (the declaration could be hardwired into the processor). In any event, add the xml namespace declaration and minidom will work. I tested it on Python 1.5.2, Win 2000, PyXML 0.6.6. Cheers, Tom P [Mariappan, MaharajanX] > I'm using pyXml-0.6.6 with Python 2.0 > > I've attached the full xml and xsd file. > > Can you provide feedback on my second approach using pyExpat module > From martin@v.loewis.de Mon Dec 3 06:49:43 2001 From: martin@v.loewis.de (Martin v. Loewis) Date: Mon, 3 Dec 2001 07:49:43 +0100 Subject: [XML-SIG] xml-schema parsing using minidom. In-Reply-To: <53A7943A5BD8D411B6930002A5073155013F60D8@bgsmsx90.iind.intel.com> (m_mariappanX@trillium.com) References: <53A7943A5BD8D411B6930002A5073155013F60D8@bgsmsx90.iind.intel.com> Message-ID: <200112030649.fB36nhn01915@mira.informatik.hu-berlin.de> > I've attached the full xml and xsd file. Thanks, it turns out this is a bug in pulldom. Please apply the patch below. > Can you provide feedback on my second approach using pyExpat module You said "but no valid response." Can you please qualify? One problem here is that FromUri expects an URI. You are passing "c:\\Project\\build.xsd", which, if it was an URI, would use the "c" scheme, which is not defined. However, as a work-around, FromUri will open that resource if it is a local file. If I change the file name so that it works on my Unix system, the PyExpat.Reader will parse the document just fine; I can see no problems. Regards, Martin Index: pulldom.py =================================================================== RCS file: /cvsroot/pyxml/xml/xml/dom/pulldom.py,v retrieving revision 1.17 diff -u -r1.17 pulldom.py --- pulldom.py 2001/11/21 09:57:35 1.17 +++ pulldom.py 2001/12/03 06:39:18 @@ -21,6 +21,7 @@ document = None def __init__(self, documentFactory=None): + from xml.dom import XML_NAMESPACE self.documentFactory = documentFactory self.firstEvent = [None, None] self.lastEvent = self.firstEvent @@ -31,7 +32,7 @@ except AttributeError: # use class' pop instead pass - self._ns_contexts = [{}] # contains uri -> prefix dicts + self._ns_contexts = [{XML_NAMESPACE:'xml'}] # contains uri -> prefix dicts self._current_context = self._ns_contexts[-1] self.pending_events = [] From martin@v.loewis.de Mon Dec 3 06:50:31 2001 From: martin@v.loewis.de (Martin v. Loewis) Date: Mon, 3 Dec 2001 07:50:31 +0100 Subject: [XML-SIG] xml-schema parsing using minidom. In-Reply-To: <005001c17bbb$12636850$7cac1218@cj64132b> (tpassin@home.com) References: <53A7943A5BD8D411B6930002A5073155013F60D8@bgsmsx90.iind.intel.com> <005001c17bbb$12636850$7cac1218@cj64132b> Message-ID: <200112030650.fB36oVx01918@mira.informatik.hu-berlin.de> > Here's the problem. The build.xsd file uses xml:lang, but the > namespace is not declared. minidom looks for the correct namepspace > for the "xml" prefix (it is a reserved prefix). That shouldn't be necessary, right? xmlns:xml does not need to be declared, it is available implicitly. Regards, Martin From m_mariappanX@trillium.com Mon Dec 3 07:14:18 2001 From: m_mariappanX@trillium.com (Mariappan, MaharajanX) Date: Sun, 2 Dec 2001 23:14:18 -0800 Subject: [XML-SIG] xml-schema parsing using minidom. Message-ID: <53A7943A5BD8D411B6930002A5073155013F60DD@bgsmsx90.iind.intel.com> Hi Martin, 1) Thanks for your timely valid response. I've a quick question on applying the patch you have provided. I'm using win200. So tried to change two lines in ...Lib/xml/dom/pulldom.py But contents is different to version 1.6. class PullDOM(xml.sax.ContentHandler): def __init__(self): self.firstEvent = [None, None] self.lastEvent = self.firstEvent self._ns_contexts = [{}] # contains uri -> prefix dicts self._current_context = self._ns_contexts[-1] 2) My aim of using PyExpat is not only parsing the schema file but also to print the variants enum value. It is not giving any parse error. But the function "getAvailableVariants()" is not working as we expect to print enums. It is not even printing available simpleTypes. TIA, Maharajan -----Original Message----- From: Martin v. Loewis [mailto:martin@v.loewis.de] Sent: Monday, December 03, 2001 12:20 PM To: m_mariappanX@trillium.com Cc: m_mariappanX@trillium.com; xml-sig@python.org Subject: Re: [XML-SIG] xml-schema parsing using minidom. > I've attached the full xml and xsd file. Thanks, it turns out this is a bug in pulldom. Please apply the patch below. > Can you provide feedback on my second approach using pyExpat module You said "but no valid response." Can you please qualify? One problem here is that FromUri expects an URI. You are passing "c:\\Project\\build.xsd", which, if it was an URI, would use the "c" scheme, which is not defined. However, as a work-around, FromUri will open that resource if it is a local file. If I change the file name so that it works on my Unix system, the PyExpat.Reader will parse the document just fine; I can see no problems. Regards, Martin Index: pulldom.py =================================================================== RCS file: /cvsroot/pyxml/xml/xml/dom/pulldom.py,v retrieving revision 1.17 diff -u -r1.17 pulldom.py --- pulldom.py 2001/11/21 09:57:35 1.17 +++ pulldom.py 2001/12/03 06:39:18 @@ -21,6 +21,7 @@ document = None def __init__(self, documentFactory=None): + from xml.dom import XML_NAMESPACE self.documentFactory = documentFactory self.firstEvent = [None, None] self.lastEvent = self.firstEvent @@ -31,7 +32,7 @@ except AttributeError: # use class' pop instead pass - self._ns_contexts = [{}] # contains uri -> prefix dicts + self._ns_contexts = [{XML_NAMESPACE:'xml'}] # contains uri -> prefix dicts self._current_context = self._ns_contexts[-1] self.pending_events = [] From martin@v.loewis.de Mon Dec 3 07:48:31 2001 From: martin@v.loewis.de (Martin v. Loewis) Date: Mon, 3 Dec 2001 08:48:31 +0100 Subject: [XML-SIG] xml-schema parsing using minidom. In-Reply-To: <53A7943A5BD8D411B6930002A5073155013F60DD@bgsmsx90.iind.intel.com> (m_mariappanX@trillium.com) References: <53A7943A5BD8D411B6930002A5073155013F60DD@bgsmsx90.iind.intel.com> Message-ID: <200112030748.fB37mVH03339@mira.informatik.hu-berlin.de> > But contents is different to version 1.6. > > class PullDOM(xml.sax.ContentHandler): > def __init__(self): > self.firstEvent = [None, None] > self.lastEvent = self.firstEvent > self._ns_contexts = [{}] # contains uri -> prefix dicts > self._current_context = self._ns_contexts[-1] It should then read class PullDOM(xml.sax.ContentHandler): def __init__(self): from xml.dom import XML_NAMESPACE self.firstEvent = [None, None] self.lastEvent = self.firstEvent self._ns_contexts = [{XML_NAMESPACE:'xml'}] # contains uri -> prefix dicts self._current_context = self._ns_contexts[-1] > 2) My aim of using PyExpat is not only parsing the schema file but > also to print the variants enum value. > > It is not giving any parse error. But the function "getAvailableVariants()" > is not working as we expect to print enums. > > It is not even printing available simpleTypes. Since you are parsing in a namespace-aware mode, you also need to use the namespace API. So replace simpletypes = dom.getElementsByTagName("xsd:simpleType") with simpletypes = dom.getElementsByTagNameNS(XSD,"simpleType") where XSD="http://www.w3.org/2001/XMLSchema" HTH, Martin From Sylvain.Thenault@logilab.fr Mon Dec 3 08:30:39 2001 From: Sylvain.Thenault@logilab.fr (Sylvain Thenault) Date: Mon, 3 Dec 2001 09:30:39 +0100 (CET) Subject: [XML-SIG] dom 2 sax events In-Reply-To: <200112021027.fB2AR4p01751@mira.informatik.hu-berlin.de> Message-ID: On Sun, 2 Dec 2001, Martin v. Loewis wrote: > > > Excellent! Would like to commit it, or, Sylvain, would you like to get > > > PyXML write access (in which case I'd need you SF account name)? > > > > That's fine for me, my new SF user-id is 387525 (syt) > > Hi Sylvain, > > I just added you to the list of developers; feel free to commit your > changes any time. > > Welcome to the project, > thanks ! I'll commit my dom2sax parser as soon as I have the time. As proposed Alexandre, I should put it in xml/dom/ext/ ? regards -- Sylvain Thenault LOGILAB http://www.logilab.org From tpassin@home.com Mon Dec 3 13:46:37 2001 From: tpassin@home.com (Thomas B. Passin) Date: Mon, 3 Dec 2001 08:46:37 -0500 Subject: [XML-SIG] xml-schema parsing using minidom. References: <53A7943A5BD8D411B6930002A5073155013F60D8@bgsmsx90.iind.intel.com> <005001c17bbb$12636850$7cac1218@cj64132b> <200112030650.fB36oVx01918@mira.informatik.hu-berlin.de> Message-ID: <001601c17c01$f92d6d80$7cac1218@cj64132b> [Martin v. Loewis] > > Here's the problem. The build.xsd file uses xml:lang, but the > > namespace is not declared. minidom looks for the correct namepspace > > for the "xml" prefix (it is a reserved prefix). > > That shouldn't be necessary, right? xmlns:xml does not need to be > declared, it is available implicitly. > That's what I think too, but the minidom code actually checks for the declaration and only accepts the correct namespace for it. Should this code be removed? Tom P From Sylvain.Thenault@logilab.fr Mon Dec 3 15:38:05 2001 From: Sylvain.Thenault@logilab.fr (Sylvain Thenault) Date: Mon, 3 Dec 2001 16:38:05 +0100 (CET) Subject: [XML-SIG] xmlproc, Lexical handler and CDATA Message-ID: This message is in MIME format. The first part should be readable text, while the remaining parts are likely unreadable without MIME-aware tools. Send mail to mime@docserver.cac.washington.edu for more info. ---1463794175-1862256613-1007393885=:11611 Content-Type: TEXT/PLAIN; charset=US-ASCII here is a patch which fix the bug in xmlproc with the lexical_handler enabled. It just call startCDATA and endCDATA on the lexical handler before and after calling characters on the content handlers. I can commit this but I would like to have Lars opinion -- Sylvain Thenault LOGILAB http://www.logilab.org ---1463794175-1862256613-1007393885=:11611 Content-Type: TEXT/PLAIN; charset=US-ASCII; name="pyxml-xmlproc.patch" Content-Transfer-Encoding: BASE64 Content-ID: Content-Description: Content-Disposition: attachment; filename="pyxml-xmlproc.patch" LS0tIC9ob21lL3N5dC94bWwveG1sL3NheC9kcml2ZXJzMi9kcnZfeG1scHJv Yy5weQlNb24gRGVjICAzIDE2OjE2OjE4IDIwMDENCisrKyBzYXgvZHJpdmVy czIvZHJ2X3htbHByb2MucHkJTW9uIERlYyAgMyAxNjoyODo1NyAyMDAxDQpA QCAtMTk2LDYgKzE5NiwxMSBAQA0KICAgICANCiAgICAgZGVmIGhhbmRsZV9k YXRhKHNlbGYsIGRhdGEsIHN0YXJ0LCBlbmQpOg0KICAgICAgICAgc2VsZi5f Y29udF9oYW5kbGVyLmNoYXJhY3RlcnMoZGF0YVtzdGFydDplbmRdKQ0KKw0K KyAgICBkZWYgaGFuZGxlX2NkYXRhKHNlbGYsZGF0YSxzdGFydCxlbmQpOg0K KyAgICAgICAgc2VsZi5fbGV4X2hhbmRsZXIuc3RhcnRDREFUQSgpDQorICAg ICAgICBzZWxmLl9jb250X2hhbmRsZXIuY2hhcmFjdGVycyhkYXRhW3N0YXJ0 OmVuZF0pDQorICAgICAgICBzZWxmLl9sZXh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ogCW5ld19wb3M9c2VsZi5n ZXRfaW5kZXgoIl1dPiIpDQogCWlmIHNlbGYuc3RhY2s9PVtdOg0KIAkgICAg c2VsZi5yZXBvcnRfZXJyb3IoMzAyOSkNCi0Jc2VsZi5hcHAuaGFuZGxlX2Rh dGEoc2VsZi5kYXRhLHNlbGYucG9zLG5ld19wb3MpDQorCXNlbGYuYXBwLmhh bmRsZV9jZGF0YShzZWxmLmRhdGEsc2VsZi5wb3MsbmV3X3BvcykNCiAJc2Vs Zi5wb3M9bmV3X3BvcyszDQogDQogICAgIGRlZiBwYXJzZV9lbnRfcmVmKHNl bGYpOg0K ---1463794175-1862256613-1007393885=:11611-- From noreply@sourceforge.net Mon Dec 3 16:27:56 2001 From: noreply@sourceforge.net (noreply@sourceforge.net) Date: Mon, 03 Dec 2001 08:27:56 -0800 Subject: [XML-SIG] [ pyxml-Patches-488466 ] xmlproc / property_lexical_handler Message-ID: Patches item #488466, was opened at 2001-12-03 08:27 You can respond by visiting: http://sourceforge.net/tracker/?func=detail&atid=306473&aid=488466&group_id=6473 Category: xmlproc Group: None Status: Open Resolution: None Priority: 5 Submitted By: Thenault Sylvain (syt) Assigned to: Lars Marius Garshol (larsga) Summary: xmlproc / property_lexical_handler Initial Comment: It just call "startCDATA" and "endCDATA" on the lexical handler before and after calling "characters" on the content handlers. ---------------------------------------------------------------------- You can respond by visiting: http://sourceforge.net/tracker/?func=detail&atid=306473&aid=488466&group_id=6473 From martin@v.loewis.de Mon Dec 3 18:00:06 2001 From: martin@v.loewis.de (Martin v. Loewis) Date: Mon, 3 Dec 2001 19:00:06 +0100 Subject: [XML-SIG] dom 2 sax events In-Reply-To: (message from Sylvain Thenault on Mon, 3 Dec 2001 09:30:39 +0100 (CET)) References: Message-ID: <200112031800.fB3I06x01342@mira.informatik.hu-berlin.de> > I'll commit my dom2sax parser as soon as I have the time. As proposed > Alexandre, I should put it in xml/dom/ext/ ? Sounds reasonable. Historically, xml.dom.ext is 4DOM territory, but I think it would fit there, as well (actually, pulldom should have gone into xml.dom.ext probably, as well). Regards, Martin From martin@v.loewis.de Mon Dec 3 18:11:16 2001 From: martin@v.loewis.de (Martin v. Loewis) Date: Mon, 3 Dec 2001 19:11:16 +0100 Subject: [XML-SIG] xml-schema parsing using minidom. In-Reply-To: <001601c17c01$f92d6d80$7cac1218@cj64132b> (tpassin@home.com) References: <53A7943A5BD8D411B6930002A5073155013F60D8@bgsmsx90.iind.intel.com> <005001c17bbb$12636850$7cac1218@cj64132b> <200112030650.fB36oVx01918@mira.informatik.hu-berlin.de> <001601c17c01$f92d6d80$7cac1218@cj64132b> Message-ID: <200112031811.fB3IBGc01371@mira.informatik.hu-berlin.de> > > That shouldn't be necessary, right? xmlns:xml does not need to be > > declared, it is available implicitly. > > > That's what I think too, but the minidom code actually checks for the > declaration and only accepts the correct namespace for it. Should this code > be removed? Can you please elaborate? I'm not sure what you are referring to: What code in minidom checks for what condition? Regards, Martin From tpassin@home.com Tue Dec 4 00:25:05 2001 From: tpassin@home.com (Thomas B. Passin) Date: Mon, 3 Dec 2001 19:25:05 -0500 Subject: [XML-SIG] xml-schema parsing using minidom. References: <53A7943A5BD8D411B6930002A5073155013F60D8@bgsmsx90.iind.intel.com> <005001c17bbb$12636850$7cac1218@cj64132b> <200112030650.fB36oVx01918@mira.informatik.hu-berlin.de> <001601c17c01$f92d6d80$7cac1218@cj64132b> <200112031811.fB3IBGc01371@mira.informatik.hu-berlin.de> Message-ID: <001901c17c5a$1fc32c70$7cac1218@cj64132b> [Martin v. Loewis] > > > That shouldn't be necessary, right? xmlns:xml does not need to be > > > declared, it is available implicitly. > > > > > That's what I think too, but the minidom code actually checks for the > > declaration and only accepts the correct namespace for it. Should this code > > be removed? > > Can you please elaborate? I'm not sure what you are referring to: What > code in minidom checks for what condition? > In minidom.py, class DomImplementation, the following code appears in my copy: prefix, localname = _nssplit(qualifiedName) if prefix == "xml" \ and namespaceURI != "http://www.w3.org/XML/1998/namespace": raise xml.dom.NamespaceErr("illegal use of 'xml' prefix") if prefix and not namespaceURI: raise xml.dom.NamespaceErr( "illegal use of prefix without namespaces") This explicitly checks for the right xml: namespace uri and raises an exception if it isn't found. The minidom parser() method doesn't handle the exception, which is what prevented Maharajan's .xsd file from getting parsed by minidom (at least, when I added the namespace declaration, minidom.parse() completed successfully). Should this code be removed? Cheers, Tom P From tpassin@home.com Tue Dec 4 00:48:21 2001 From: tpassin@home.com (Thomas B. Passin) Date: Mon, 3 Dec 2001 19:48:21 -0500 Subject: [XML-SIG] xml-schema parsing using minidom. References: <53A7943A5BD8D411B6930002A5073155013F60D8@bgsmsx90.iind.intel.com> <005001c17bbb$12636850$7cac1218@cj64132b> <200112030650.fB36oVx01918@mira.informatik.hu-berlin.de> <001601c17c01$f92d6d80$7cac1218@cj64132b> <200112031811.fB3IBGc01371@mira.informatik.hu-berlin.de> <001901c17c5a$1fc32c70$7cac1218@cj64132b> Message-ID: <003401c17c5d$5fa50ea0$7cac1218@cj64132b> I wrote - > > > > In minidom.py, class DomImplementation, the following code appears in my > copy: > > prefix, localname = _nssplit(qualifiedName) > if prefix == "xml" \ > and namespaceURI != "http://www.w3.org/XML/1998/namespace": > raise xml.dom.NamespaceErr("illegal use of 'xml' prefix") > if prefix and not namespaceURI: > raise xml.dom.NamespaceErr( > "illegal use of prefix without namespaces") > > This explicitly checks for the right xml: namespace uri and raises an > exception if it isn't found. The minidom parser() method... I meant, of course, minidom.parse(). Sorry for the type. Tom P From m_mariappanX@trillium.com Tue Dec 4 06:43:28 2001 From: m_mariappanX@trillium.com (Mariappan, MaharajanX) Date: Mon, 3 Dec 2001 22:43:28 -0800 Subject: [XML-SIG] xml-schema parsing using minidom. Message-ID: <53A7943A5BD8D411B6930002A5073155013F60E3@bgsmsx90.iind.intel.com> Hi Martin 1) I'm getting the same error when I've modified 2 lines in PullDOM class constructor. When I tried Thomas's approach[Declare Namespace for xml], parsing is going through fine. 2) There is another question on created list from return value of getAttribute() method. See below function, which will collect all the enumeration values defined within specified simpleType element and return that result list. def getSimpleTypeValues(dom,simpletypeName): enums = [] simpletypes = dom.getElementsByTagName("xsd:simpleType") for simpletype in simpletypes: #print "%s" % simpletype.getAttribute("name") if simpletype.getAttribute("name") == simpletypeName: enumerations = simpletype.getElementsByTagName("xsd:enumeration") for enum in enumerations: enums.append(enum.getAttribute("value")) return enums When I print using print "%s" % enums, It is printing like [u'enum1', u'enum2'] Any reason for that why print with u' ' aling with list elements? -----Original Message----- From: Martin v. Loewis [mailto:martin@v.loewis.de] Sent: Monday, December 03, 2001 1:19 PM To: m_mariappanX@trillium.com Cc: m_mariappanX@trillium.com; m_mariappanX@trillium.com; xml-sig@python.org Subject: Re: [XML-SIG] xml-schema parsing using minidom. > But contents is different to version 1.6. > > class PullDOM(xml.sax.ContentHandler): > def __init__(self): > self.firstEvent = [None, None] > self.lastEvent = self.firstEvent > self._ns_contexts = [{}] # contains uri -> prefix dicts > self._current_context = self._ns_contexts[-1] It should then read class PullDOM(xml.sax.ContentHandler): def __init__(self): from xml.dom import XML_NAMESPACE self.firstEvent = [None, None] self.lastEvent = self.firstEvent self._ns_contexts = [{XML_NAMESPACE:'xml'}] # contains uri -> prefix dicts self._current_context = self._ns_contexts[-1] > 2) My aim of using PyExpat is not only parsing the schema file but > also to print the variants enum value. > > It is not giving any parse error. But the function "getAvailableVariants()" > is not working as we expect to print enums. > > It is not even printing available simpleTypes. Since you are parsing in a namespace-aware mode, you also need to use the namespace API. So replace simpletypes = dom.getElementsByTagName("xsd:simpleType") with simpletypes = dom.getElementsByTagNameNS(XSD,"simpleType") where XSD="http://www.w3.org/2001/XMLSchema" HTH, Martin From Sylvain.Thenault@logilab.fr Tue Dec 4 08:31:19 2001 From: Sylvain.Thenault@logilab.fr (Sylvain Thenault) Date: Tue, 4 Dec 2001 09:31:19 +0100 (CET) Subject: [XML-SIG] xml-schema parsing using minidom. In-Reply-To: <53A7943A5BD8D411B6930002A5073155013F60E3@bgsmsx90.iind.intel.com> Message-ID: On Mon, 3 Dec 2001, Mariappan, MaharajanX wrote: > 2) There is another question on created list from return value of > getAttribute() method. > > See below function, which will collect all the enumeration values defined > within specified simpleType element and return that result list. > > def getSimpleTypeValues(dom,simpletypeName): > enums = [] > simpletypes = dom.getElementsByTagName("xsd:simpleType") > for simpletype in simpletypes: > #print "%s" % simpletype.getAttribute("name") > if simpletype.getAttribute("name") == simpletypeName: > enumerations = > simpletype.getElementsByTagName("xsd:enumeration") > for enum in enumerations: > enums.append(enum.getAttribute("value")) > return enums > > When I print using print "%s" % enums, It is printing like > [u'enum1', u'enum2'] > > Any reason for that why print with u' ' aling with list elements? this means that it's an Unicode string (try "type(u'')" vs "type('')" in the python interpreter). Another thing: when you use DOM with namespaces, you should use the NS interface of DOM, i.e. replace getAttribute("value") with getAttributeNS(NO_NS, "value" where NO_NS is None or empty string, depending on the dom implementation you are using (This have been fixed in the CVS, now the empty namespace is None, independantly from the dom implementation). regards -- Sylvain Thenault LOGILAB http://www.logilab.org From martin@v.loewis.de Tue Dec 4 08:48:39 2001 From: martin@v.loewis.de (Martin v. Loewis) Date: Tue, 4 Dec 2001 09:48:39 +0100 Subject: [XML-SIG] xml-schema parsing using minidom. In-Reply-To: <001901c17c5a$1fc32c70$7cac1218@cj64132b> (tpassin@home.com) References: <53A7943A5BD8D411B6930002A5073155013F60D8@bgsmsx90.iind.intel.com> <005001c17bbb$12636850$7cac1218@cj64132b> <200112030650.fB36oVx01918@mira.informatik.hu-berlin.de> <001601c17c01$f92d6d80$7cac1218@cj64132b> <200112031811.fB3IBGc01371@mira.informatik.hu-berlin.de> <001901c17c5a$1fc32c70$7cac1218@cj64132b> Message-ID: <200112040848.fB48mdk01308@mira.informatik.hu-berlin.de> > This explicitly checks for the right xml: namespace uri and raises an > exception if it isn't found. You are looking at createDocument. That check is in place only for the document element, and it doesn't "look" for namespace uri - it just expects that the uri argument and the qualified name match. > The minidom parser() method doesn't handle the exception, which is > what prevented Maharajan's .xsd file from getting parsed by minidom > (at least, when I added the namespace declaration, minidom.parse() > completed successfully). No. The exception in Maharajan's code came from a different place, namely from elif a_uri: prefix = self._current_context[a_uri] in pulldom. At that point, the createDocument call is old history. > Should this code be removed? No. Regards, Martin From martin@v.loewis.de Tue Dec 4 09:05:43 2001 From: martin@v.loewis.de (Martin v. Loewis) Date: Tue, 4 Dec 2001 10:05:43 +0100 Subject: [XML-SIG] xml-schema parsing using minidom. In-Reply-To: <53A7943A5BD8D411B6930002A5073155013F60E3@bgsmsx90.iind.intel.com> (m_mariappanX@trillium.com) References: <53A7943A5BD8D411B6930002A5073155013F60E3@bgsmsx90.iind.intel.com> Message-ID: <200112040905.fB495hM01370@mira.informatik.hu-berlin.de> > I'm getting the same error when I've modified 2 lines in PullDOM class > constructor. That's very hard to believe. Are you sure you are using the file where you have applied the patch? Can you please re-report what "the same error" is? Regards, Martin From m_mariappanX@trillium.com Tue Dec 4 11:57:47 2001 From: m_mariappanX@trillium.com (Mariappan, MaharajanX) Date: Tue, 4 Dec 2001 03:57:47 -0800 Subject: [XML-SIG] xml-schema parsing using minidom. Message-ID: <53A7943A5BD8D411B6930002A5073155013F60EB@bgsmsx90.iind.intel.com> Hi Martin. I've changed in pulldom.py which is in wrong location. Now it is working fine. Thanks a lot for your help. Maharajan -----Original Message----- From: Martin v. Loewis [mailto:martin@v.loewis.de] Sent: Tuesday, December 04, 2001 2:36 PM To: m_mariappanX@trillium.com Cc: xml-sig@python.org Subject: Re: [XML-SIG] xml-schema parsing using minidom. > I'm getting the same error when I've modified 2 lines in PullDOM class > constructor. That's very hard to believe. Are you sure you are using the file where you have applied the patch? Can you please re-report what "the same error" is? Regards, Martin From m_mariappanX@trillium.com Tue Dec 4 13:53:53 2001 From: m_mariappanX@trillium.com (Mariappan, MaharajanX) Date: Tue, 4 Dec 2001 05:53:53 -0800 Subject: [XML-SIG] xml-schema parsing using minidom. Message-ID: <53A7943A5BD8D411B6930002A5073155013F60EE@bgsmsx90.iind.intel.com> -----Original Message----- From: Sylvain Thenault [mailto:Sylvain.Thenault@logilab.fr] Sent: Tuesday, December 04, 2001 2:01 PM To: Mariappan, MaharajanX Cc: 'Martin v. Loewis'; xml-sig@python.org Subject: RE: [XML-SIG] xml-schema parsing using minidom. On Mon, 3 Dec 2001, Mariappan, MaharajanX wrote: > 2) There is another question on created list from return value of > getAttribute() method. > > See below function, which will collect all the enumeration values defined > within specified simpleType element and return that result list. > > def getSimpleTypeValues(dom,simpletypeName): > enums = [] > simpletypes = dom.getElementsByTagName("xsd:simpleType") > for simpletype in simpletypes: > #print "%s" % simpletype.getAttribute("name") > if simpletype.getAttribute("name") == simpletypeName: > enumerations = > simpletype.getElementsByTagName("xsd:enumeration") > for enum in enumerations: > enums.append(enum.getAttribute("value")) > return enums > > When I print using print "%s" % enums, It is printing like > [u'enum1', u'enum2'] > > Any reason for that why print with u' ' aling with list elements? this means that it's an Unicode string (try "type(u'')" vs "type('')" in the python interpreter). Another thing: when you use DOM with namespaces, you should use the NS interface of DOM, i.e. replace getAttribute("value") with getAttributeNS(NO_NS, "value" where NO_NS is None or empty string, depending on the dom implementation you are using (This have been fixed in the CVS, now the empty namespace is None, independantly from the dom implementation). regards Hi, When I try getAttributeNS(None,"value") It is returning null sting. I thing I've to apply the corresponding patch. Do you the correct patch. Or wait for next offcial release of pyXml? TIA, Maharajan -- Sylvain Thenault LOGILAB http://www.logilab.org From Sylvain.Thenault@logilab.fr Tue Dec 4 14:08:06 2001 From: Sylvain.Thenault@logilab.fr (Sylvain Thenault) Date: Tue, 4 Dec 2001 15:08:06 +0100 (CET) Subject: [XML-SIG] xml-schema parsing using minidom. In-Reply-To: <53A7943A5BD8D411B6930002A5073155013F60EE@bgsmsx90.iind.intel.com> Message-ID: On Tue, 4 Dec 2001, Mariappan, MaharajanX wrote: > Hi, > > When I try getAttributeNS(None,"value") It is returning null sting. > I thing I've to apply the corresponding patch. Do you the correct patch. > Or wait for next offcial release of pyXml? I don't think a patch have been generated to this the empty namespaces problem. pyxml 0.6.7, which fixes this problem, should be released soon ;) You can for the moment retreive your attribute by replacing None with '' i.e. getAttributeNS('', 'value') -- Sylvain Thenault LOGILAB http://www.logilab.org From rsalz@zolera.com Wed Dec 5 03:41:39 2001 From: rsalz@zolera.com (Rich Salz) Date: Tue, 04 Dec 2001 22:41:39 -0500 Subject: [XML-SIG] Differences between 4DOM and cDomlette Message-ID: <3C0D9773.B677FB0D@zolera.com> For speed reasons, I'm looking at using cDomlette. So far, the only difference I've noticed is cDomlette stores attributes as a dictionary, while 4DOM (pyxml dom) stores them as a list of attribute nodes. So I ahve to do if using_domlette: attrs = lambda E: E.attributes.values() else: attrs = lambda E: E.attributes Any other things I need to be aware of? Is childNodes handled the same way? /r$ -- Zolera Systems, Securing web services (XML, SOAP, Signatures, Encryption) http://www.zolera.com From Mike.Olson@fourthought.com Wed Dec 5 17:21:05 2001 From: Mike.Olson@fourthought.com (Mike Olson) Date: 05 Dec 2001 10:21:05 -0700 Subject: [XML-SIG] Differences between 4DOM and cDomlette In-Reply-To: <3C0D9773.B677FB0D@zolera.com> References: <3C0D9773.B677FB0D@zolera.com> Message-ID: <1007572865.3072.39.camel@penny.fourthought.com> On Tue, 2001-12-04 at 20:41, Rich Salz wrote: > For speed reasons, I'm looking at using cDomlette. So far, the only > difference I've noticed is cDomlette stores attributes as a dictionary, > while 4DOM (pyxml dom) stores them as a list of attribute nodes. So I > ahve to do > if using_domlette: > attrs = lambda E: E.attributes.values() > else: > attrs = lambda E: E.attributes I thought 4DOM's NamedNodeMap support the dictionary interfaces. > > Any other things I need to be aware of? Is childNodes handled the same > way? Shouldn't be. > /r$ > > -- > Zolera Systems, Securing web services (XML, SOAP, Signatures, > Encryption) > http://www.zolera.com > > _______________________________________________ > XML-SIG maillist - XML-SIG@python.org > http://mail.python.org/mailman/listinfo/xml-sig -- Mike Olson Principal Consultant mike.olson@fourthought.com +1 303 583 9900 x 102 Fourthought, Inc. http://Fourthought.com 4735 East Walnut St, http://4Suite.org Boulder, CO 80301-2537, USA XML strategy, XML tools, knowledge management From rsalz@zolera.com Wed Dec 5 20:36:59 2001 From: rsalz@zolera.com (Rich Salz) Date: Wed, 05 Dec 2001 15:36:59 -0500 Subject: [XML-SIG] Writing DOM-neutral code Message-ID: <3C0E856B.25D25735@zolera.com> I know that on the face of it that's a silly question -- it's the whole point of having a standard (albeit crappy:) API. If I have an element, e, then Using pyxml (4dom) dom, e.attributes is a list Using cDomlette, e.attributes is a dictionary; e.attributes.values() is what is needed Within PyXML I have xml/dom/ext/c14n.py, and I also have ZSI (pywebsvcs.sf.net), and I want to support both the full rich dom and the lean and mean fast one. Anyone have any general approaches to this? Right now, I'm about to check this change into c14n.py: +def _attrs(E): + '''Get the sequence of attribute nodes, even if the DOM uses a + dictionary.''' + + a = E.attributes + if not a: return [] + if type(a) == type({}): return a.values() + return a + ? /r$ -- Zolera Systems, Your Key to Online Integrity Securing Web services: XML, SOAP, Dig-sig, Encryption http://www.zolera.com From Juergen Hermann" Message-ID: On Wed, 05 Dec 2001 15:36:59 -0500, Rich Salz wrote: >+ if type(a) =3D=3D type({}): return a.values() Totally unrelated: don't do this any more, use isinstance(a, type({})). Ciao, J=FCrgen From fdrake@acm.org Wed Dec 5 22:41:13 2001 From: fdrake@acm.org (Fred L. Drake, Jr.) Date: Wed, 5 Dec 2001 17:41:13 -0500 Subject: [XML-SIG] Writing DOM-neutral code In-Reply-To: References: <3C0E856B.25D25735@zolera.com> Message-ID: <15374.41609.221351.261271@grendel.zope.com> Juergen Hermann writes: > On Wed, 05 Dec 2001 15:36:59 -0500, Rich Salz wrote: > > >+ if type(a) == type({}): return a.values() > > Totally unrelated: don't do this any more, use isinstance(a, type({})). Type objects should never be compared using ==; use "is" if you must compare type objects. Juergen's formula for testing the type of an object is preferred to checking that an object has a specific type. If you can tolerate a Python 2.2-ism, it can be spelled more simply in the case of a dictionary: isinstance(a, dict) -Fred -- Fred L. Drake, Jr. PythonLabs at Zope Corporation From rsalz@zolera.com Wed Dec 5 21:53:08 2001 From: rsalz@zolera.com (Rich Salz) Date: Wed, 05 Dec 2001 16:53:08 -0500 Subject: [XML-SIG] Writing DOM-neutral code References: <3C0E856B.25D25735@zolera.com> <15374.41609.221351.261271@grendel.zope.com> Message-ID: <3C0E9744.485FEE48@zolera.com> Hm, use "is" instead of "==" for type objects? Because it's slightly faster? Or does there exist a case such that "is" succeeds where "==" fails. I am not ready to require python 2.2 yet. /r$ -- Zolera Systems, Your Key to Online Integrity Securing Web services: XML, SOAP, Dig-sig, Encryption http://www.zolera.com From fdrake@acm.org Wed Dec 5 22:47:14 2001 From: fdrake@acm.org (Fred L. Drake, Jr.) Date: Wed, 5 Dec 2001 17:47:14 -0500 Subject: [XML-SIG] Writing DOM-neutral code In-Reply-To: <3C0E9744.485FEE48@zolera.com> References: <3C0E856B.25D25735@zolera.com> <15374.41609.221351.261271@grendel.zope.com> <3C0E9744.485FEE48@zolera.com> Message-ID: <15374.41970.944630.384001@grendel.zope.com> Rich Salz writes: > Hm, use "is" instead of "==" for type objects? Because it's slightly > faster? Or does there exist a case such that "is" succeeds where "==" > fails. There is no meaning to equality-without-identity for type objects, and the two will always yield the same result. > I am not ready to require python 2.2 yet. > /r$ That's fine too. -Fred -- Fred L. Drake, Jr. PythonLabs at Zope Corporation From martin@v.loewis.de Wed Dec 5 22:19:24 2001 From: martin@v.loewis.de (Martin v. Loewis) Date: Wed, 5 Dec 2001 23:19:24 +0100 Subject: [XML-SIG] Writing DOM-neutral code In-Reply-To: (jh@web.de) References: Message-ID: <200112052219.fB5MJOw02517@mira.informatik.hu-berlin.de> > On Wed, 05 Dec 2001 15:36:59 -0500, Rich Salz wrote: > > >+ if type(a) == type({}): return a.values() > > Totally unrelated: don't do this any more, use isinstance(a, type({})). Furthermore, don't use type({}), use types.DictType. Regards, Martin From martin@v.loewis.de Wed Dec 5 22:35:17 2001 From: martin@v.loewis.de (Martin v. Loewis) Date: Wed, 5 Dec 2001 23:35:17 +0100 Subject: [XML-SIG] Writing DOM-neutral code In-Reply-To: <3C0E856B.25D25735@zolera.com> (message from Rich Salz on Wed, 05 Dec 2001 15:36:59 -0500) References: <3C0E856B.25D25735@zolera.com> Message-ID: <200112052235.fB5MZHX02558@mira.informatik.hu-berlin.de> > If I have an element, e, then > Using pyxml (4dom) dom, e.attributes is a list No, it is not. It is an NamedNodeMap, just as specified in http://www.w3.org/TR/DOM-Level-2-Core/core.html#ID-1780488922 It is also a NamedNodeMap in minidom. So formally, you ought to use .length and .item(index) (all other accessors are DOM level 2). > Using cDomlette, e.attributes is a dictionary; > e.attributes.values() is what is needed Indeed. Notice that the Python DOM permits dictionary access to the attributes through the dictionary interface, see http://www.python.org/doc/current/lib/dom-attributelist-objects.html Both minidom and 4DOM support this as well. 4DOM, in addition, supports a sequence interface on .attributes. > Anyone have any general approaches to this? Use the dictionary interface. Regards, Martin From Juergen Hermann" Message-ID: On Wed, 05 Dec 2001 16:53:08 -0500, Rich Salz wrote: >Hm, use "is" instead of "=3D=3D" for type objects? Because it's slight= ly >faster? Or does there exist a case such that "is" succeeds where "=3D=3D= " >fails. > >I am not ready to require python 2.2 yet. The isinstance check does not require python 2.x (works with 1.5.2), but also _supports_ python 2.2, i.e. is the best you can do. Ciao, J=FCrgen From fdrake@acm.org Thu Dec 6 01:48:58 2001 From: fdrake@acm.org (Fred L. Drake, Jr.) Date: Wed, 5 Dec 2001 20:48:58 -0500 Subject: [XML-SIG] Writing DOM-neutral code In-Reply-To: References: <3C0E9744.485FEE48@zolera.com> Message-ID: <15374.52874.673227.582659@grendel.zope.com> On Wed, 05 Dec 2001 16:53:08 -0500, Rich Salz wrote: > I am not ready to require python 2.2 yet. Juergen Hermann writes: > The isinstance check does not require python 2.x (works with 1.5.2), > but also _supports_ python 2.2, i.e. is the best you can do. Ah, but my extension of it used dict as a synonym for type({}), and that is 2.2-specific. Your use of isinstance() is indeed portable to older versions of Python. -Fred -- Fred L. Drake, Jr. PythonLabs at Zope Corporation From Mike.Olson@fourthought.com Thu Dec 6 01:40:43 2001 From: Mike.Olson@fourthought.com (Mike Olson) Date: 05 Dec 2001 18:40:43 -0700 Subject: [XML-SIG] Writing DOM-neutral code In-Reply-To: <3C0E856B.25D25735@zolera.com> References: <3C0E856B.25D25735@zolera.com> Message-ID: <1007602843.3072.47.camel@penny.fourthought.com> On Wed, 2001-12-05 at 13:36, Rich Salz wrote: > I know that on the face of it that's a silly question -- it's the whole > point of having a standard (albeit crappy:) API. > > If I have an element, e, then > Using pyxml (4dom) dom, e.attributes is a list > Using cDomlette, e.attributes is a dictionary; > e.attributes.values() is what is needed Here is the class definition I have for a NamedNodeMap in 4DOM. Has someone changed it recently? class NamedNodeMap(UserDict.UserDict): def __init__(self, ownerDoc=None): UserDict.UserDict.__init__(self) > > Within PyXML I have xml/dom/ext/c14n.py, and I also have ZSI > (pywebsvcs.sf.net), and I want to support both the full rich dom and the > lean and mean fast one. It should work. 4XPath, 4xslt, 4XLink, 4XPointer, 4RDF, etc all support 4DOM, pDomlette, cDomlette and to some extent minidom. Mike > > Anyone have any general approaches to this? Right now, I'm about to > check this change into c14n.py: > > +def _attrs(E): > + '''Get the sequence of attribute nodes, even if the DOM uses a > + dictionary.''' > + > + a = E.attributes > + if not a: return [] > + if type(a) == type({}): return a.values() > + return a > + > > ? > /r$ > > -- > Zolera Systems, Your Key to Online Integrity > Securing Web services: XML, SOAP, Dig-sig, Encryption > http://www.zolera.com > > _______________________________________________ > XML-SIG maillist - XML-SIG@python.org > http://mail.python.org/mailman/listinfo/xml-sig -- Mike Olson Principal Consultant mike.olson@fourthought.com +1 303 583 9900 x 102 Fourthought, Inc. http://Fourthought.com 4735 East Walnut St, http://4Suite.org Boulder, CO 80301-2537, USA XML strategy, XML tools, knowledge management From Mike.Olson@fourthought.com Thu Dec 6 02:40:12 2001 From: Mike.Olson@fourthought.com (Mike Olson) Date: 05 Dec 2001 19:40:12 -0700 Subject: [XML-SIG] Writing DOM-neutral code In-Reply-To: <200112052235.fB5MZHX02558@mira.informatik.hu-berlin.de> References: <3C0E856B.25D25735@zolera.com> <200112052235.fB5MZHX02558@mira.informatik.hu-berlin.de> Message-ID: <1007606412.3134.51.camel@penny.fourthought.com> On Wed, 2001-12-05 at 15:35, Martin v. Loewis wrote: > > If I have an element, e, then > > Using pyxml (4dom) dom, e.attributes is a list > > No, it is not. It is an NamedNodeMap, just as specified in > > http://www.w3.org/TR/DOM-Level-2-Core/core.html#ID-1780488922 > > It is also a NamedNodeMap in minidom. So formally, you ought to use > .length and .item(index) (all other accessors are DOM level 2). cDomlette won't support these though. I guess I could add them in if people want. It does however support the dictionary interface. This is what I recomment to use. Mike > > _______________________________________________ > XML-SIG maillist - XML-SIG@python.org > http://mail.python.org/mailman/listinfo/xml-sig -- Mike Olson Principal Consultant mike.olson@fourthought.com +1 303 583 9900 x 102 Fourthought, Inc. http://Fourthought.com 4735 East Walnut St, http://4Suite.org Boulder, CO 80301-2537, USA XML strategy, XML tools, knowledge management From rsalz@zolera.com Thu Dec 6 02:58:16 2001 From: rsalz@zolera.com (Rich Salz) Date: Wed, 05 Dec 2001 21:58:16 -0500 Subject: [XML-SIG] Writing DOM-neutral code References: <3C0E856B.25D25735@zolera.com> <200112052235.fB5MZHX02558@mira.informatik.hu-berlin.de> Message-ID: <3C0EDEC8.AF4EDE01@zolera.com> > Use the dictionary interface. Okay. So the following seems to be correct: _attrs = lambda E: (E.attributes and E.attributes.values()) or [] So my code can continue to do for n in _attrs(elt): ... for example. Thanks everyone. /r$ -- Zolera Systems, Securing web services (XML, SOAP, Signatures, Encryption) http://www.zolera.com From rsalz@zolera.com Thu Dec 6 03:00:40 2001 From: rsalz@zolera.com (Rich Salz) Date: Wed, 05 Dec 2001 22:00:40 -0500 Subject: [XML-SIG] Writing DOM-neutral code References: <3C0E856B.25D25735@zolera.com> <200112052235.fB5MZHX02558@mira.informatik.hu-berlin.de> <1007606412.3134.51.camel@penny.fourthought.com> Message-ID: <3C0EDF58.444F7A8B@zolera.com> > cDomlette won't support these though. I guess I could add them in if > people want. It does however support the dictionary interface. This is > what I recomment to use. Don't do it on my behalf. I'll be a good boy and use the dictionary interface. :) BTW, the speed of cDomlette is awe-inspiring. I look forward to the day when it comes with PyXML. :) /r$ -- Zolera Systems, Securing web services (XML, SOAP, Signatures, Encryption) http://www.zolera.com From xml@opikanoba.org Thu Dec 6 08:12:37 2001 From: xml@opikanoba.org (=?ISO-8859-1?Q?Fr=E9d=E9ric?= Laurent) Date: Thu, 06 Dec 2001 09:12:37 +0100 Subject: [XML-SIG] installation of PyXML Message-ID: <3C0F2875.2080003@opikanoba.org> Hi I'am using Python 2.2 wich came from python.org. The windows installer don't proceed the second window and I can make an "python setup.py build" because the cl.exe compiler is not installed on my system. (I've got a cygwin environnemnt) So... what is the solution ? I tried the patch for cygwin (from http://www.deadlybloodyserious.com/python/bdist/cygwin/) but the python21.dll can't be found wich installation of python must be done to make it work ? thanks -- Frédéric Laurent http://www.opikanoba.org From Mike.Olson@fourthought.com Thu Dec 6 08:55:39 2001 From: Mike.Olson@fourthought.com (Mike Olson) Date: 06 Dec 2001 01:55:39 -0700 Subject: [XML-SIG] Writing DOM-neutral code In-Reply-To: <3C0EDF58.444F7A8B@zolera.com> References: <3C0E856B.25D25735@zolera.com> <200112052235.fB5MZHX02558@mira.informatik.hu-berlin.de> <1007606412.3134.51.camel@penny.fourthought.com> <3C0EDF58.444F7A8B@zolera.com> Message-ID: <1007628961.5780.0.camel@penny.fourthought.com> On Wed, 2001-12-05 at 20:00, Rich Salz wrote: > > cDomlette won't support these though. I guess I could add them in if > > people want. It does however support the dictionary interface. This is > > what I recomment to use. > > Don't do it on my behalf. I'll be a good boy and use the dictionary > interface. :) > > BTW, the speed of cDomlette is awe-inspiring. I look forward to the day > when it comes with PyXML. :) If I can ever get it to stop core dumping it may :) On the subject of cores, has any one heard of a problem with Mandrake and gdb? I cannot seem to use it anymore since I upgraded. I've seen a little mention of it, but cannot seem to get it going. I sucks debugging cores with printf :). If you have, let me know off line. Thanks mike > /r$ > -- > Zolera Systems, Securing web services (XML, SOAP, Signatures, > Encryption) > http://www.zolera.com -- Mike Olson Principal Consultant mike.olson@fourthought.com +1 303 583 9900 x 102 Fourthought, Inc. http://Fourthought.com 4735 East Walnut St, http://4Suite.org Boulder, CO 80301-2537, USA XML strategy, XML tools, knowledge management From Sylvain.Thenault@logilab.fr Thu Dec 6 15:26:41 2001 From: Sylvain.Thenault@logilab.fr (Sylvain Thenault) Date: Thu, 6 Dec 2001 16:26:41 +0100 (CET) Subject: [XML-SIG] empty prefix Message-ID: One more problem with None vs '' for namespaces prefix: it appears when using pDomlette with default namespaces (xmlns='...'), the prefix of elements in default namespaces is '' instead of None. As consequence, if you PrettyPrint the domtree, the default namespaces attributes will appears twice... This can easily be fixed by replacing '' with None in xlm.dom.ext.SplitQName -- Sylvain Thenault LOGILAB http://www.logilab.org From Nicolas.Chauvat@logilab.fr Thu Dec 6 16:22:06 2001 From: Nicolas.Chauvat@logilab.fr (Nicolas Chauvat) Date: Thu, 6 Dec 2001 17:22:06 +0100 (CET) Subject: [XML-SIG] XSLT magic Message-ID: Hi Lists, Context: Logilab has an xmldiff tool[1] that can output the diff of two documents as a set of xupdate elements. With that xupdate and the original revision of the document as inputs, I want to ouput a modified document that reflects the changes and can be turned into HTML then styled to highlight the changes (red = removed, yellow = changed, green = added), very much alike diffmk[2]. My problem is that I am not sure how to write the XSLT that will transform my original document into the revision-tagged one. So far, I chose to transform the former into the latter passing the xupdate filename as an argument to the processor. The idea is to copy over every node from the first document, adding @revisionflag attributes on nodes removed/changed/added. But how do I know that a node was added/changed/removed? What I have on the xupdate nodes are string attributes that represent xpaths and I do not know how to figure out wether the current node is matched by the xpath of a particular node. Example :
My Title my text other text
and would output
My Title my text other text
tentative algorithm in the stylesheet would be match any node copy current node if current node is pointed to by the xpath of one of the xupdate nodes : add an attribute revisionflag whose value depends on the node name of the above xupdate node My current problem is with "current node is pointed to by the xpath"... Any ideas will be welcome. References: 1: http://www.logilab.org/xmldiff 2: http://www.sun.com/xml/developers/diffmk/ -- Nicolas Chauvat http://www.logilab.com - "Mais où est donc Ornicar ?" - LOGILAB, Paris (France) From Alexandre.Fayolle@logilab.fr Thu Dec 6 16:55:58 2001 From: Alexandre.Fayolle@logilab.fr (Alexandre Fayolle) Date: Thu, 6 Dec 2001 17:55:58 +0100 (CET) Subject: [XML-SIG] empty prefix In-Reply-To: Message-ID: On Thu, 6 Dec 2001, Sylvain Thenault wrote: > This can easily be fixed by replacing '' with None in > xlm.dom.ext.SplitQName Ahem well. I was pretty sure that SplitQName was returning None, so I didn't even bothered to check when I changed this in the DOMs... Sorry. Alexandre Fayolle -- LOGILAB, Paris (France). http://www.logilab.com http://www.logilab.fr http://www.logilab.org Narval, the first software agent available as free software (GPL). From Sylvain.Thenault@logilab.fr Thu Dec 6 17:10:32 2001 From: Sylvain.Thenault@logilab.fr (Sylvain Thenault) Date: Thu, 6 Dec 2001 18:10:32 +0100 (CET) Subject: [XML-SIG] empty prefix In-Reply-To: Message-ID: On Thu, 6 Dec 2001, Alexandre Fayolle wrote: > On Thu, 6 Dec 2001, Sylvain Thenault wrote: > > > This can easily be fixed by replacing '' with None in > > xlm.dom.ext.SplitQName > > Ahem well. I was pretty sure that SplitQName was returning None, so I > didn't even bothered to check when I changed this in the DOMs... This is in fact the case in the current CVS tree ;) -- Sylvain Thenault LOGILAB http://www.logilab.org From Nicolas.Chauvat@logilab.fr Thu Dec 6 17:41:15 2001 From: Nicolas.Chauvat@logilab.fr (Nicolas Chauvat) Date: Thu, 6 Dec 2001 18:41:15 +0100 (CET) Subject: [XML-SIG] XSLT magic Message-ID: I overlooked the exslt.org dynamic module... it looks like dyn:evaluate might very well be what I am looking for... I'll check. -- Nicolas Chauvat http://www.logilab.com - "Mais où est donc Ornicar ?" - LOGILAB, Paris (France) From Olivier.Cayrol@logilab.fr Thu Dec 6 18:45:28 2001 From: Olivier.Cayrol@logilab.fr (Olivier CAYROL (Logilab)) Date: Thu, 6 Dec 2001 19:45:28 +0100 (CET) Subject: [XML-SIG] Re: [4suite] XSLT magic In-Reply-To: Message-ID: On Thu, 6 Dec 2001, Nicolas Chauvat wrote: > tentative algorithm in the stylesheet would be >=20 > match any node > =09copy current node > =09if current node is pointed to by the xpath of one of the xupdate > =09 nodes : > =09=09add an attribute revisionflag whose value depends on the > =09=09=09node name of the above xupdate node >=20 > My current problem is with "current node is pointed to by the xpath"... Actually, what you want to do is using a string expression extracted from your XML input as an XPath inside your XSLT code to select nodes inside another XML input. This is not possible with standard XSLT instructions and XPath functions. Nevertheless, you can use an extension function to do this : - in exslt: dyn:evaluate(string) (see following address for details: http://www.exslt.org/dyn/functions/evaluate/index.html ). But, the problem could be that your favorite XSL processor doesn't implement this function. - if your favorite processor is 4xslt, you can use 4Suite extension function called ft:evaluate(string) (see following address for details: http://www.4suite.org/4Suite.org/documents/4Suite/4XPath-Extensions#evaluat= e ). Hoping this will help, O. CAYROL. _________________________________________________________________________ Olivier CAYROL LOGILAB - Paris (France) http://www.logilab.com/ Change your millenium, try NARVAL the Intelligent Personal Assistant. Changez de mill=E9naire, essayez NARVAL l'Assistant Personnel Intelligent. _________________________________________________________________________ From Juergen Hermann" Message-ID: On Thu, 6 Dec 2001 17:22:06 +0100 (CET), Nicolas Chauvat wrote: > >
> My Title > my text > other text >
> >and > > > >would output > >
> My Title > my text > other text >
Use the schematron idea, i.e. doc.xml --------------------------\ \ changes.xml ---> diffgen.xsl ---> diff.xsl ---> docdiffs.xml Ciao, J=FCrgen From uche.ogbuji@fourthought.com Thu Dec 6 20:41:04 2001 From: uche.ogbuji@fourthought.com (Uche Ogbuji) Date: Thu, 06 Dec 2001 13:41:04 -0700 Subject: [XML-SIG] Re: [4suite] XSLT magic References: Message-ID: <3C0FD7E0.E74A3E2A@fourthought.com> Nicolas Chauvat wrote: > > I overlooked the exslt.org dynamic module... it looks like dyn:evaluate > might very well be what I am looking for... I'll check. There is already ft:evaluate, though dyn will soon be available in 4suite. -- Uche Ogbuji Principal Consultant uche.ogbuji@fourthought.com +1 303 583 9900 x 101 Fourthought, Inc. http://Fourthought.com 4735 East Walnut St, Boulder, CO 80301-2537, USA XML strategy, XML tools (http://4Suite.org), knowledge management From ndw@nwalsh.com Thu Dec 6 22:22:52 2001 From: ndw@nwalsh.com (Norman Walsh) Date: 06 Dec 2001 14:22:52 -0800 Subject: [XML-SIG] Re: [4suite] XSLT magic In-Reply-To: References: Message-ID: <87r8q8ouo3.fsf@nwalsh.com> / "Olivier CAYROL (Logilab)" was heard to say: | Actually, what you want to do is using a string expression extracted | from your XML input as an XPath inside your XSLT code to select nodes | inside another XML input. | | This is not possible with standard XSLT instructions and XPath | functions. Nevertheless, you can use an extension function to do this : If you want to avoid using an extension, you might consider writing a stylesheet that reads the xupdate document and produces a stylesheet that performs the changes that you want to make. Be seeing you, norm -- Norman Walsh | Next to knowing when to seize an http://nwalsh.com/ | opportunity, the most important thing | in life is to know when to forego an | advantage.--Benjamin Disraeli From noreply@sourceforge.net Thu Dec 6 23:37:45 2001 From: noreply@sourceforge.net (noreply@sourceforge.net) Date: Thu, 06 Dec 2001 15:37:45 -0800 Subject: [XML-SIG] [ pyxml-Patches-490069 ] A catalog resolver Message-ID: Patches item #490069, was opened at 2001-12-06 15:37 You can respond by visiting: http://sourceforge.net/tracker/?func=detail&atid=306473&aid=490069&group_id=6473 Category: SAX Group: None Status: Open Resolution: None Priority: 5 Submitted By: Tarn Weisner Burton (twburton) Assigned to: Nobody/Anonymous (nobody) Summary: A catalog resolver Initial Comment: Attached is a catalog resolver that includes an implementation of OASIS XML Catalogs and OASIS TR9401 Catalogs. It implements the SAX EntityResolver and also includes the ability to do URI resolution. The main class is "Catalog" which will parse a file if a URI is passed to it. Also included is "read_catalogs" which will read a list of catalogs from an environment variable. The script can be tested from command line in which case it uses "read_catalogs" to get a catalog list. Specifically, the resolver has complete support for urn:oasis:names:tc:entity:xmlns:xml:catalog but does not include the extended support for the additional entries of urn:oasis:names:tc:entity:xmlns:tr9401:catalog ---------------------------------------------------------------------- You can respond by visiting: http://sourceforge.net/tracker/?func=detail&atid=306473&aid=490069&group_id=6473 From martin@v.loewis.de Fri Dec 7 00:21:36 2001 From: martin@v.loewis.de (Martin v. Loewis) Date: Fri, 7 Dec 2001 01:21:36 +0100 Subject: [XML-SIG] installation of PyXML In-Reply-To: <3C0F2875.2080003@opikanoba.org> (message from =?ISO-8859-1?Q?Fr=E9d=E9ric?= Laurent on Thu, 06 Dec 2001 09:12:37 +0100) References: <3C0F2875.2080003@opikanoba.org> Message-ID: <200112070021.fB70Lax01672@mira.informatik.hu-berlin.de> > wich installation of python must be done to make it work ? Currently, you need Visual C++ to build PyXML for Python 2.2b2 from source. If you want to use a pre-built binary, I recommend to use Python 2.1; notice that 2.2 is not released yet. Regards, Martin From Nicolas.Chauvat@logilab.fr Fri Dec 7 08:52:36 2001 From: Nicolas.Chauvat@logilab.fr (Nicolas Chauvat) Date: Fri, 7 Dec 2001 09:52:36 +0100 (CET) Subject: [XML-SIG] Re: [4suite] XSLT magic In-Reply-To: <87r8q8ouo3.fsf@nwalsh.com> Message-ID: On 6 Dec 2001, Norman Walsh wrote: > If you want to avoid using an extension, you might consider writing a > stylesheet that reads the xupdate document and produces a stylesheet > that performs the changes that you want to make. Code that outputs code. I advocate that as often as I can and did not even think about it. Shame on me. Thanks to both of you Norman and Juergen, that should be a breeze now. -- Nicolas Chauvat http://www.logilab.com - "Mais où est donc Ornicar ?" - LOGILAB, Paris (France) From xml@opikanoba.org Fri Dec 7 13:58:15 2001 From: xml@opikanoba.org (=?ISO-8859-1?Q?Fr=E9d=E9ric?= Laurent) Date: Fri, 07 Dec 2001 14:58:15 +0100 Subject: [XML-SIG] installation of PyXML References: <3C0F2875.2080003@opikanoba.org> <200112070021.fB70Lax01672@mira.informatik.hu-berlin.de> Message-ID: <3C10CAF7.4030300@opikanoba.org> Martin v. Loewis wrote: >>wich installation of python must be done to make it work ? >> > > Currently, you need Visual C++ to build PyXML for Python 2.2b2 from > source. If you want to use a pre-built binary, I recommend to use > Python 2.1; notice that 2.2 is not released yet. ok, i will download the version 2.1 but from where ? 2.1.1 from python.org, exe or tarball? MSI from activePython ? thanks in advance, -- Frédéric Laurent http://www.opikanoba.org From adadcom3@yahoo.co.kr Sat Dec 8 05:36:31 2001 From: adadcom3@yahoo.co.kr (BRITAX) Date: Sat, 08 Dec 2001 05:36:31 Subject: [XML-SIG] [BRITAX] ÃÖ°íÀÇ ¾ö¸¶°¡ ¼±ÅÃÇÏ´Â ÃÖ°íÀÇ À¯¾Æ¾ÈÀü½ÃÆ®! Message-ID: <20191.54_adadcom3@yahoo.co.kr>




Omega TF
»ýÈÄ(2.5kg)-5¼¼°æ(18kg¹Ì¸¸),½ÅÀå : 105cm ¹Ì¸¸
º£À̺ñ Æ÷Áö¼Ç Æ÷ÇÔ
¼ÒºñÀÚ °¡°Ý : \ 440,000
¼îÇθô °¡°Ý : \ 396,000
Omega AN
»ýÈÄ(2.5kg) - 5¼¼°æ(18kg
¹Ì¸¸),½ÅÀå : 105cm ¹Ì¸¸

º£À̺ñ Æ÷Áö¼Ç Æ÷ÇÔ
¼ÒºñÀÚ °¡°Ý : \ 440,000
¼îÇθô °¡°Ý : \ 396,000
Royale HD
»ýÈÄ(2.5kg) - 5¼¼°æ(18kg
¹Ì¸¸),½ÅÀå : 105cm ¹Ì¸¸

º£À̺ñ Æ÷Áö¼Ç Æ÷ÇÔ
¼ÒºñÀÚ °¡°Ý : \ 550,000
¼îÇθô °¡°Ý : \ 495,000
Royale KN
»ýÈÄ(2.5kg) - 5¼¼°æ(18kg
¹Ì¸¸),½ÅÀå : 105cm ¹Ì¸¸

º£À̺ñ Æ÷Áö¼Ç Æ÷ÇÔ
¼ÒºñÀÚ °¡°Ý : \ 550,000
¼îÇθô °¡°Ý : \ 495,000

 

*À¯¾Æ¾ÈÀü ½ÃÆ®ÀÇ ¼¼°è¸íÇ° ºê¶óÀÌÅýº

- ¿µ±¹º»»ç¸¦ µÐ ¼¼°èÀûTOP ºê·£µå!!
Àü¼¼°èÀÇ ¾à 20%ÀÌ»óÀÇ Market Share¸¦ ÀÚ¶ûÇÏ´Â 30³â ±â¼ú know-how¸¦ ÃàÀûÇÑ À¯¾Æ¾ÈÀü½ÃÆ® ºÐ¾ßÀÇ No.1ºê·£µåÀÔ´Ï´Ù.

À̳ʽÃÆ®(Çìµå·¹½ºÆ®)

¿ø»êÁö: Kidsline(¹Ì±¹)
¾ÈÀü½ÃÆ®,À¯¸ðÂ÷ °â¿ë
½Å»ýÀ̺ÎÅÍ Ã¹µ¹±îÁö
¶¡Èí¼ö°¡ ÁÁÀº ¼ø¸éÁ¦Ç°. û°á À§»ý°ú µ¿½Ã¿¡ ¸ñºÎºÐ Èçµé¸² ¹æÁö

ÆǸŰ¡°Ý : \33,000


Copyright(c)2000 LIFE
DIGM All rights reserved

 

¡Ø ¿øÄ¡ ¾ÊÀº Á¤º¸¿´´Ù¸é Á¤ÁßÈ÷ »ç°úµå¸®¸ç, ¼ö½Å °ÅºÎ¸¦ ÇØÁÖ½Ã¸é ´ÙÀ½ºÎÅÍ´Â ¸ÞÀÏÀÌ ¹ß¼ÛµÇÁö ¾ÊÀ» °ÍÀÔ´Ï´Ù.
¼ö½Å °ÅºÎ

From martin@v.loewis.de Sat Dec 8 01:56:11 2001 From: martin@v.loewis.de (Martin v. Loewis) Date: Sat, 8 Dec 2001 02:56:11 +0100 Subject: [XML-SIG] installation of PyXML In-Reply-To: <3C10CAF7.4030300@opikanoba.org> (message from =?ISO-8859-1?Q?Fr=E9d=E9ric?= Laurent on Fri, 07 Dec 2001 14:58:15 +0100) References: <3C0F2875.2080003@opikanoba.org> <200112070021.fB70Lax01672@mira.informatik.hu-berlin.de> <3C10CAF7.4030300@opikanoba.org> Message-ID: <200112080156.fB81uBZ01548@mira.informatik.hu-berlin.de> > ok, i will download the version 2.1 but from where ? > 2.1.1 from python.org, exe or tarball? Unless you want to compile the Python source, you should get the exe. > MSI from activePython ? Either is fine for PyXML. Regards, Martin From uche.ogbuji@fourthought.com Sat Dec 8 16:51:58 2001 From: uche.ogbuji@fourthought.com (Uche Ogbuji) Date: Sat, 08 Dec 2001 09:51:58 -0700 Subject: [XML-SIG] parsing xml schema In-Reply-To: Message from Alan Kennedy of "Fri, 23 Nov 2001 17:00:31 GMT." <3BFE80AF.9F8205A4@xhaus.com> Message-ID: <200112081651.fB8GpwT25111@localhost.localdomain> Playing e-mail catch-up again... > Uche Ogbuji wrote: > > > Don't hesitate to ask if yo need help with this task. In fact, if you were > > able to write up what you did to use PyTREX as a validator I would love to > > make this available to others. > > OK, here is how I see it. > > Basically, I need to do validation of XML data files. These may either be from > textual xml data that is submitted to the application, or on DOM structures that > have been retrieved from some storage(content repos, pickled DOM in RDBMS?). The > DOM structures are very likely to be either pDomlette, or 4Suite 0.12 R/W > cDomlettes (he said hopefully ;-) Mutable cDomlette is already in CVS, though we're working on a few lingering stability problems. > Another, perhaps more esoteric, case is where the TREX pattern is stored in a DOM, > having perhaps been generated from an XSLT transform, although off-hand I can't > picture any use cases for such a scenario? > > It is very likely to be the case that I will need a persistable "compiled" version > of the trex pattern, since I will have a set of 10 to 100 handwritten trex > patterns that will be used continually, and I don't want to parse them each time. > It is quite likely I could just pickle the pattern after parsing, but that remains > to be verified. The trick here, of course, is to pickle to the internal format of the TREX processor, but I'm not very familiar with PyTREX guts. > Validating textual XML is simple. Just create pyTrex instances from the textual > XML, using the "parse_Instance" function, create a trex instance from the textual > trex file, using the "parse_Trex" function. And then use the "validate" function > to match the former against the latter. > > However, it is more complex when it comes to DOMs, mainly because pyTrex uses > non-SAX/DOM interfaces in order to speed things up as much as possible. > Efficiently integrating with [cp]Domlette is non-trivial, for the following > reasons. > > 1. pyTrex uses the pyExpat (non-SAX) callback interfaces directly, presumably to > increase speed. Probably inevitable: The SAX layer adds an unfortunate amount of overhead right now. -- Uche Ogbuji Principal Consultant uche.ogbuji@fourthought.com +1 303 583 9900 x 101 Fourthought, Inc. http://Fourthought.com 4735 East Walnut St, Boulder, CO 80301-2537, USA XML strategy, XML tools (http://4Suite.org), knowledge management From uche.ogbuji@fourthought.com Sat Dec 8 17:29:20 2001 From: uche.ogbuji@fourthought.com (Uche Ogbuji) Date: Sat, 08 Dec 2001 10:29:20 -0700 Subject: [XML-SIG] parsing xml schema In-Reply-To: Message from ht@cogsci.ed.ac.uk (Henry S. Thompson) of "24 Nov 2001 10:19:11 GMT." Message-ID: <200112081729.fB8HTL125137@localhost.localdomain> > Rich Salz writes: > > > > Parsing it is no problem; any Python parser will do. Validating it is > > > currently not supported in PyXML; you may want to try XSV - see the > > > PyXML "other software" page for a reference. > > > > Unless it's changed a lot in the past two months, I'd avoid XSV -- just > > building it was an adventure. :( You should also check out PyTrex, a > > tree-oriented validation language. > > Sorry you had difficulties -- I'd be happy to receive feedback on how > things didn't go well for you. Without such feedback, I'm handicapped > in trying to improve things. I must say that my first reaction to Rich's post was strong agreement. I honestly simply gave up trying to install it on Linux and used Xerces instead. As a developer of 4Suite, I know that others sometimes have the same experience with our software, so we're always looking for ways to make it easier to set up. In the case of XSV, perhaps we've been a bit unfair in not directing our problems to you, who is best placed to fix them. I think the most important step would be for you to move to using distutils for the installation of XSV. This will help improve your cross-platform usability, for one thing, since you can make a Windows installer using distutils, and it becomes a simple "python setup.py install" for UNIX users. Thanks so much for XSV. I'll try again upon the next release. -- Uche Ogbuji Principal Consultant uche.ogbuji@fourthought.com +1 303 583 9900 x 101 Fourthought, Inc. http://Fourthought.com 4735 East Walnut St, Boulder, CO 80301-2537, USA XML strategy, XML tools (http://4Suite.org), knowledge management From faassen@vet.uu.nl Sat Dec 8 19:00:43 2001 From: faassen@vet.uu.nl (Martijn Faassen) Date: Sat, 8 Dec 2001 20:00:43 +0100 Subject: [XML-SIG] Writing DOM-neutral code In-Reply-To: <3C0E856B.25D25735@zolera.com> References: <3C0E856B.25D25735@zolera.com> Message-ID: <20011208200043.A28026@vet.uu.nl> Rich Salz wrote: > I know that on the face of it that's a silly question -- it's the whole > point of having a standard (albeit crappy:) API. > > If I have an element, e, then > Using pyxml (4dom) dom, e.attributes is a list > Using cDomlette, e.attributes is a dictionary; > e.attributes.values() is what is needed ParsedXML's DOM implementation comes with this giant set of unit tests for compliance. Not even ParsedXML's DOM completely complies yet :), but that is I think in part due to a bug in the unit tests themselves. What needs to be done, and what I started doing but got side-tracked, is check in this set of tests into PyXML so that we can validate other DOMs against it. It ought to work with at least 4DOM as well (currently it doesn't; it causes many failures and even some *hangs* if you run these tests against 4DOM). Eventually for the lightweight DOMs we might want to create a stripped down set of minimal tests to ensure they're compatible as well. Finally, I'm interested in read-only DOMs, as they should be usable in many cases (such as XPath and XSLT). Creating a test suite for only the read-only parts of the DOM is more difficult, but I think well worth it. I guess I should just check in the test suite as it is now. Are some people interested in helping with hunting and fixing errors in it, and 4DOM, as they are found? Regards, Martijn From faassen@vet.uu.nl Sat Dec 8 19:05:49 2001 From: faassen@vet.uu.nl (Martijn Faassen) Date: Sat, 8 Dec 2001 20:05:49 +0100 Subject: [XML-SIG] license questions Message-ID: <20011208200549.A28050@vet.uu.nl> Hi there, The unit tests coming from ParsedXML currently come with the ZPL. I don't want to introduce another license into PyXML without some permission. Opinions? I can probably get the license of the ParsedXML suite upgraded to ZPL 2 pretty easily, though I haven't actually seen ZPL 2 myself yet. It should offer better GPL compatibility though. Alternatively I could ask Zope Corporation about relicensing. If this is preferred, which license would be the one we want to use? Thanks, Martijn From Juergen Hermann" Message-ID: On Sat, 8 Dec 2001 20:00:43 +0100, Martijn Faassen wrote: >I guess I should just check in the test suite as it is now. Are some pe= ople >interested in helping with hunting and fixing errors in it, and 4DOM, a= s they >are found? +1 for checking in what you have, and as soon as I'll start to add DOM t= o PIRXX, this will be very useful to me and I'll help fixing any problems I hit. Ciao, J=FCrgen From martin@v.loewis.de Sat Dec 8 20:15:19 2001 From: martin@v.loewis.de (Martin v. Loewis) Date: Sat, 8 Dec 2001 21:15:19 +0100 Subject: [XML-SIG] license questions In-Reply-To: <20011208200549.A28050@vet.uu.nl> (message from Martijn Faassen on Sat, 8 Dec 2001 20:05:49 +0100) References: <20011208200549.A28050@vet.uu.nl> Message-ID: <200112082015.fB8KFJ001851@mira.informatik.hu-berlin.de> > The unit tests coming from ParsedXML currently come with the ZPL. I > don't want to introduce another license into PyXML without some permission. > Opinions? You have permission. Just integrate the license text into LICENCE. If it is a longer text, integrate it referring to the file name. > Alternatively I could ask Zope Corporation about relicensing. If this is > preferred, which license would be the one we want to use? Licensing under the expat license seems simplest. That is the license text Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. Regards, Martin From rsalz@zolera.com Sat Dec 8 22:09:48 2001 From: rsalz@zolera.com (Rich Salz) Date: Sat, 08 Dec 2001 17:09:48 -0500 Subject: [XML-SIG] Writing DOM-neutral code References: <3C0E856B.25D25735@zolera.com> <20011208200043.A28026@vet.uu.nl> Message-ID: <3C128FAC.2666A928@zolera.com> I'm also interested in a read-only DOM, and might have some time to help debug cDomlette. Any chance your tests are written with pyunix? /r$ -- Zolera Systems, Securing web services (XML, SOAP, Signatures, Encryption) http://www.zolera.com From Mike.Olson@fourthought.com Sun Dec 9 01:19:13 2001 From: Mike.Olson@fourthought.com (Mike Olson) Date: 08 Dec 2001 18:19:13 -0700 Subject: [XML-SIG] Writing DOM-neutral code In-Reply-To: <3C128FAC.2666A928@zolera.com> References: <3C0E856B.25D25735@zolera.com> <20011208200043.A28026@vet.uu.nl> <3C128FAC.2666A928@zolera.com> Message-ID: <1007860754.10285.2.camel@penny.fourthought.com> On Sat, 2001-12-08 at 15:09, Rich Salz wrote: > I'm also interested in a read-only DOM, and might have some time to help > debug cDomlette. Note, its not read only any more. It was before I started all of this work. > > Any chance your tests are written with pyunix? Nope, haven;t proted to that yet. Not sure when we will get to that. If you wanna help, check out our cvs on the CDOMLETTE_2_GOLD branch. It is pretty stable. Only thing is when you beat the heck out of a DOM it eventually cores. Sadly, it cores in a completly irrelavent place so it could take some time to track down. Though, if you are using the DOM for 1-2 tasks then getting rid of it it works fine. Some where in there there is an extra DECREF.... Mike > /r$ > > -- > Zolera Systems, Securing web services (XML, SOAP, Signatures, > Encryption) > http://www.zolera.com > > _______________________________________________ > XML-SIG maillist - XML-SIG@python.org > http://mail.python.org/mailman/listinfo/xml-sig -- Mike Olson Principal Consultant mike.olson@fourthought.com +1 303 583 9900 x 102 Fourthought, Inc. http://Fourthought.com 4735 East Walnut St, http://4Suite.org Boulder, CO 80301-2537, USA XML strategy, XML tools, knowledge management From horst@freedict.de Sun Dec 9 18:09:18 2001 From: horst@freedict.de (horst@freedict.de) Date: Sun, 9 Dec 2001 19:09:18 +0100 (CET) Subject: [XML-SIG] Why do I have twice the same attribute? or is it encoding? Message-ID: <200112091809.fB9I9Li25684@eaglesnest.mceggman> Hello, I am a bit stuck here. - I tried to find some documenation on it, but did not find very much on DOM (attribute) handling anyway. My problem is, that I read in the given XML, and wish to query the attributes from "entry", and depending on the value modify it, and store the modified XML into a string. However, when doing this, I receive two attributes ("author"), with diffent values. I even tried to delete it first, but that did not work. Can anyone help me? Is my problem related to some internal representation of the data? - I did not find much information on the topic on the net. - is there a book to reccomend? Thanks in advance, Horst #!/usr/bin/env python from xml.dom import ext from xml.dom.ext.reader import Sax2 from xml.dom import Node, Comment from xml import xpath from xml.xpath import Util from Ft.Lib.pDomlette import PyExpatReader from StringIO import StringIO content = """
Aalbeer2 Allbeere
wartees1 zwarte
""" DOM1 = Sax2.FromXml(content) Root1 = DOM1.documentElement Entry1 = DOM1.getElementsByTagName('entry[1]') if Root1.getAttribute('author'): print "delete it" Root1.removeAttribute("author") Root1.setAttribute("author", "HEY") version = Root1.getAttributeNode("author") for at in Root1.attributes: print at.name print from StringIO import StringIO stream = StringIO() ext.PrettyPrint(Root1, stream=stream) Definition = stream.getvalue() stream.close() print Definition
-- Horst@freedict.de Horst Eyermann Germany You need a dictionary? - visit http://www.freedict.de for free (GPL) dictionaries (unix; windows work in progress) For windows, visit http://www.freedict.de/wbuch A article (in German) about dictionary efforts on the net http://www.heise.de/tp/deutsch/inhalt/on/5927/1.html From mal@lemburg.com Sun Dec 9 22:47:26 2001 From: mal@lemburg.com (M.-A. Lemburg) Date: Sun, 09 Dec 2001 23:47:26 +0100 Subject: [XML-SIG] license questions References: <20011208200549.A28050@vet.uu.nl> Message-ID: <3C13E9FE.29330653@lemburg.com> Martijn Faassen wrote: > > Hi there, > > The unit tests coming from ParsedXML currently come with the ZPL. I > don't want to introduce another license into PyXML without some permission. > Opinions? > > I can probably get the license of the ParsedXML suite upgraded to > ZPL 2 pretty easily, though I haven't actually seen ZPL 2 myself yet. It > should offer better GPL compatibility though. > > Alternatively I could ask Zope Corporation about relicensing. If this is > preferred, which license would be the one we want to use? The Python License :-) -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Consulting & Company: http://www.egenix.com/ Python Software: http://www.lemburg.com/python/ From tpassin@home.com Sun Dec 9 23:11:39 2001 From: tpassin@home.com (Thomas B. Passin) Date: Sun, 9 Dec 2001 18:11:39 -0500 Subject: [XML-SIG] Why do I have twice the same attribute? or is it encoding? References: <200112091809.fB9I9Li25684@eaglesnest.mceggman> Message-ID: <001001c18106$dbc82b40$7cac1218@cj64132b> [] To: Sent: Sunday, December 09, 2001 1:09 PM Subject: [XML-SIG] Why do I have twice the same attribute? or is it encoding? > Hello, > > I am a bit stuck here. - I tried to find some documenation on it, but > did not find very much on DOM (attribute) handling anyway. > > My problem is, that I read in the given XML, and wish to query the > attributes from "entry", and depending on the value modify it, and store > the modified XML into a string. However, when doing this, I receive two > attributes ("author"), with diffent values. I even tried to delete it > first, but that did not work. > > Can anyone help me? > > Is my problem related to some internal representation of the data? > > This has disclosed quite several inconsistencies to me. Some of them have been changed in the CVS, I think, but some may not have been. This immediate solution to your problem, using pyxml version 0.6.6, is to use the "namespace" (i.e., SAX2) methods. This achieves what you want: if Root1.getAttributeNS('','author'): Roo11.removeAttributeNS('',"author") In other words, with the default namespace feature in play - which it is since you didn't change it -, you need the "NS" version, and since there is no namespace you use '' (that should be changed by now in the CVS to use None instead of ''). With getAttribute(), the attribute is not found so it is not removed. Since you went to the trouble to retrieve Entry1, Root1 in the above should be replaced by Entry1 (after you adjust it as shown below), although Root1 happens to work here because this particular element is the root element. Also, you really should use Entry1 = DOM1.getElementsByTagName('entry')[0] or even Entry1 = list(DOM1.getElementsByTagName('entry'))[0] instead of what you had. But here are some of the things I noticed, and I hope someone who knows the DOM better can answer them: 1) Why does getElementsByTagName() work when getAttribute() does not? Seems like either you should need the NS version for both or you shouldn't need it for both. 2) When is documentElement supposed to be a namespace version node, and when is it not? Is this tied to the namespace feature? 3) Does this code build non-namespaced element nodes but namespaced attribute nodes? If so, it needs to be fixed. Cheers, Tom P From a23594@mailclub.net Sun Dec 9 23:21:01 2001 From: a23594@mailclub.net (a23594@mailclub.net) Date: Sun, 09 Dec 2001 18:21:01 -0500 Subject: [XML-SIG] Lead Generation 28083 Message-ID: <0000038f58f5$000027b7$00006db3@slomusic.net> Untitled Document I noticed your email address on a list serve related to technology and web= development.

Our company has developed a simple, risk-free and cost effective method= of generating leads and creating awareness for your
Company through targeted email marketing. With your permission we would = like to send you more information on our services.
To fill out our request for information form, click here.

Cordially,

Gary Michaels


From noreply@sourceforge.net Mon Dec 10 16:11:31 2001 From: noreply@sourceforge.net (noreply@sourceforge.net) Date: Mon, 10 Dec 2001 08:11:31 -0800 Subject: [XML-SIG] [ pyxml-Patches-491173 ] Xslt and empty prefixes Message-ID: Patches item #491173, was opened at 2001-12-10 08:11 You can respond by visiting: http://sourceforge.net/tracker/?func=detail&atid=306473&aid=491173&group_id=6473 Category: 4Suite Group: None Status: Open Resolution: None Priority: 5 Submitted By: Thenault Sylvain (syt) Assigned to: Uche Ogbuji (uche) Summary: Xslt and empty prefixes Initial Comment: This patch corrects some problems with XSLT and empty prefixes (None vs '' battle). It uses a constant EMPTY_NAMESPACE defined in xml.dom.__init__ (and Ft.__init__) to easily maintains the code. ---------------------------------------------------------------------- You can respond by visiting: http://sourceforge.net/tracker/?func=detail&atid=306473&aid=491173&group_id=6473 From matt@clondiag.com Tue Dec 11 16:28:55 2001 From: matt@clondiag.com (Matthias Kirst) Date: Tue, 11 Dec 2001 17:28:55 +0100 Subject: [XML-SIG] Preserving Whitespace Message-ID: <001f01c18260$eea497c0$3701a8c0@silberpfeil> This is a multi-part message in MIME format. ------=_NextPart_000_001C_01C18269.4EEF7F20 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable I'm using xml.minidom for parsing XML-Documents. Is it possible to preserve the whitespaces (tabs ....) in the = attributes of an element? I tried the xml:space =3D "preserve" attribute but I got a KeyError: = "Mapping key not found" from the parser. I'm using Python 2.1.1, PyXML 0.6.5. The parser used is the standard = parser (pyexpat I think). If somebody came along this problem, please help. Thanks, Matthias( matt@clondiag.com ) =20 ------=_NextPart_000_001C_01C18269.4EEF7F20 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable
I'm using xml.minidom for parsing=20 XML-Documents.
Is it possible to preserve the = whitespaces=20 (tabs  ....) in the attributes of an element?
I tried the xml:space =3D "preserve" = attribute but I=20 got a KeyError: "Mapping key not found" from the = parser.
I'm using Python 2.1.1, PyXML 0.6.5. = The=20 parser used is the standard parser (pyexpat I = think).
 
If somebody came along this problem, = please=20 help.
 
Thanks,
Matthias( matt@clondiag.com )
 
------=_NextPart_000_001C_01C18269.4EEF7F20-- From Juergen Hermann" Message-ID: --_=_=_=IMA.BOUNDARY.HTML_4924592=_=_=_ Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Whitespace in attribute values is normalized. Always. --Original Message Text--- From: Matthias Kirst Date: Tue, 11 Dec 2001 17:28:55 +0100 I'm using xml.minidom for parsing XML-Documents. Is it possible to preserve the whitespaces (tabs ....) in the attribute= s of an element? I tried the xml:space =3D "preserve" attribute but I got a KeyError: "Ma= pping key not found" from the parser. I'm using Python 2.1.1, PyXML 0.6.5. The parser used is the standard par= ser (pyexpat I think). If somebody came along this problem, please help. Thanks, Matthias( matt@clondiag.com ) Ciao, J=FCrgen -- J=FCrgen Hermann, Developer (jhe@webde-ag.de) WEB.DE AG, http://webde-ag.de/ --_=_=_=IMA.BOUNDARY.HTML_4924592=_=_=_ Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Whitespace in attribute values is normalized. = Always.

--Original Message Text---
From: Matthias Kirst
Date: Tue, 11 Dec 2001 17:28:55 +0100

I'm using xml.minidom for parsing XML-Documents.
Is it possible to preserve the whitespaces (tabs .= ...) in the attributes of an element?
I tried the xml:space =3D "preserve" attribute but = I got a KeyError: "Mapping key not found" from the parser.
I'm using Python 2.1.1, PyXML 0.6.5. The parser use= d is the standard parser (pyexpat I think).

If somebody came along this problem, please help.

Thanks,
Matthias( matt@clondiag.com= )




Ciao, J=FCrgen

--
J=FCrgen Hermann, Developer (jhe@webde-ag.de)
WEB.DE AG, http://webde-ag.de/ --_=_=_=IMA.BOUNDARY.HTML_4924592=_=_=_-- From haering_python@gmx.de Wed Dec 12 00:41:15 2001 From: haering_python@gmx.de (Gerhard =?iso-8859-1?Q?H=E4ring?=) Date: Wed, 12 Dec 2001 01:41:15 +0100 Subject: [XML-SIG] Simple DOM question (writing DOM) Message-ID: <20011212004114.GA8425@lilith.hqd-internal> I'm quite new to actually using XML and I'm confused. Parsing a XML document and building a data structure went fine, but now I want to give my data structure a toxml() method that creates an Element again. How would I create an element? With the createElement method of the Document interface? Now, the problem is that I don't have a Document yet. And if I want to create one, I wouldn't even know how to create an empty one. Or is there an example of writing a DOM tree somewhere and I've missed it? TIA Gerhard -- mail: gerhard bigfoot de registered Linux user #64239 web: http://www.cs.fhm.edu/~ifw00065/ OpenPGP public key id 86AB43C0 public key fingerprint: DEC1 1D02 5743 1159 CD20 A4B6 7B22 6575 86AB 43C0 reduce(lambda x,y:x+y,map(lambda x:chr(ord(x)^42),tuple('zS^BED\nX_FOY\x0b'))) From haering_python@gmx.de Wed Dec 12 01:56:16 2001 From: haering_python@gmx.de (Gerhard =?iso-8859-1?Q?H=E4ring?=) Date: Wed, 12 Dec 2001 02:56:16 +0100 Subject: [XML-SIG] Simple DOM question (writing DOM) In-Reply-To: <20011212004114.GA8425@lilith.hqd-internal> References: <20011212004114.GA8425@lilith.hqd-internal> Message-ID: <20011212015615.GA9140@lilith.hqd-internal> Le 12/12/01 à 01:41, Gerhard Häring écrivit: > [about creating an empty Document] Ok, I found it: from xml.dom.DOMImplementation import implementation doc = implementation.createDocument(None, None, None) Now I'm having a strange problem: I can only add one element to a document (using appendChild). For any further calls, I get an exception about an invalid parent/child relationship!? Gerhard -- mail: gerhard bigfoot de registered Linux user #64239 web: http://www.cs.fhm.edu/~ifw00065/ OpenPGP public key id 86AB43C0 public key fingerprint: DEC1 1D02 5743 1159 CD20 A4B6 7B22 6575 86AB 43C0 reduce(lambda x,y:x+y,map(lambda x:chr(ord(x)^42),tuple('zS^BED\nX_FOY\x0b'))) From brian@sweetapp.com Wed Dec 12 03:45:49 2001 From: brian@sweetapp.com (Brian Quinlan) Date: Tue, 11 Dec 2001 19:45:49 -0800 Subject: [XML-SIG] Pyana 0.2.0 released Message-ID: <003c01c182bf$7d7ad190$445d4540@Dell2> Pyana is an interface between the Apache Project's Xalan XSLT engine and Python. See http://pyana.sourceforge.net for complete information. Also recommended is: http://pyana.sourceforge.net/examples/ Changes: o Made the API easier to use o Build works with Xalan 1.2 (binaries generated with Xalan 1.2) o Added support for output to a "writer" object o Memory leak fixes o DOM output (DOM only partially implemented) o Experimental support for NodeSets in XPath extensions Cheers, Brian From martin@v.loewis.de Wed Dec 12 06:13:52 2001 From: martin@v.loewis.de (Martin v. Loewis) Date: Wed, 12 Dec 2001 07:13:52 +0100 Subject: [XML-SIG] Simple DOM question (writing DOM) In-Reply-To: <20011212004114.GA8425@lilith.hqd-internal> (message from Gerhard =?ISO-8859-1?Q?H=E4ring?= on Wed, 12 Dec 2001 01:41:15 +0100) References: <20011212004114.GA8425@lilith.hqd-internal> Message-ID: <200112120613.fBC6Dqr01689@mira.informatik.hu-berlin.de> > I'm quite new to actually using XML and I'm confused. Parsing a XML > document and building a data structure went fine, but now I want to give > my data structure a toxml() method that creates an Element again. Is that a custom data structure, or a DOM tree? By "create an Element", do you mean you want to create some data structure, or an XML file (i.e. a sequence of bytes in a stream, or on disk)? > How would I create an element? With the createElement method of the > Document interface? Now, the problem is that I don't have a Document > yet. And if I want to create one, I wouldn't even know how to create an > empty one. It sounds like you want to serialize your data structure into XML. The best approach to do that is print/write: print "%s" % data > Or is there an example of writing a DOM tree somewhere and I've missed > it? If you do have a DOM tree already, you also should have a Document object - minidom.parse returns one. Calling .toxml() on it will return a byte string. HTH, Martin From martin@v.loewis.de Wed Dec 12 06:15:33 2001 From: martin@v.loewis.de (Martin v. Loewis) Date: Wed, 12 Dec 2001 07:15:33 +0100 Subject: [XML-SIG] Simple DOM question (writing DOM) In-Reply-To: <20011212015615.GA9140@lilith.hqd-internal> (message from Gerhard =?ISO-8859-1?Q?H=E4ring?= on Wed, 12 Dec 2001 02:56:16 +0100) References: <20011212004114.GA8425@lilith.hqd-internal> <20011212015615.GA9140@lilith.hqd-internal> Message-ID: <200112120615.fBC6FXe01714@mira.informatik.hu-berlin.de> > Now I'm having a strange problem: I can only add one element to a > document (using appendChild). For any further calls, I get an exception > about an invalid parent/child relationship!? Indeed. In XML, a document contains only a single element; it is an error if a document has two or more elements. Regards, Martin From haering_python@gmx.de Wed Dec 12 08:12:01 2001 From: haering_python@gmx.de (Gerhard =?iso-8859-1?Q?H=E4ring?=) Date: Wed, 12 Dec 2001 09:12:01 +0100 Subject: [XML-SIG] Simple DOM question (writing DOM) In-Reply-To: <200112120615.fBC6FXe01714@mira.informatik.hu-berlin.de> References: <20011212004114.GA8425@lilith.hqd-internal> <20011212015615.GA9140@lilith.hqd-internal> <200112120615.fBC6FXe01714@mira.informatik.hu-berlin.de> Message-ID: <20011212081158.GA1756@lilith.hqd-internal> Le 12/12/01 à 07:15, Martin v. Loewis écrivit: > > Now I'm having a strange problem: I can only add one element to a > > document (using appendChild). For any further calls, I get an exception > > about an invalid parent/child relationship!? > > Indeed. In XML, a document contains only a single element; it is an > error if a document has two or more elements. Thanks, that got me on the right track. My XML stuff now works how I wanted it. Gerhard -- mail: gerhard bigfoot de registered Linux user #64239 web: http://www.cs.fhm.edu/~ifw00065/ OpenPGP public key id 86AB43C0 public key fingerprint: DEC1 1D02 5743 1159 CD20 A4B6 7B22 6575 86AB 43C0 reduce(lambda x,y:x+y,map(lambda x:chr(ord(x)^42),tuple('zS^BED\nX_FOY\x0b'))) From haering_python@gmx.de Wed Dec 12 08:20:20 2001 From: haering_python@gmx.de (Gerhard =?iso-8859-1?Q?H=E4ring?=) Date: Wed, 12 Dec 2001 09:20:20 +0100 Subject: [XML-SIG] Simple DOM question (writing DOM) In-Reply-To: <200112120613.fBC6Dqr01689@mira.informatik.hu-berlin.de> References: <20011212004114.GA8425@lilith.hqd-internal> <200112120613.fBC6Dqr01689@mira.informatik.hu-berlin.de> Message-ID: <20011212082019.GB1756@lilith.hqd-internal> Le 12/12/01 à 07:13, Martin v. Loewis écrivit: > > I'm quite new to actually using XML and I'm confused. Parsing a XML > > document and building a data structure went fine, but now I want to give > > my data structure a toxml() method that creates an Element again. > > Is that a custom data structure, or a DOM tree? By "create an > Element", do you mean you want to create some data structure, or an > XML file (i.e. a sequence of bytes in a stream, or on disk)? I want my classes to be able to represent itself as a DOM element node as well as reconstruct themselves from such an element node. > > How would I create an element? With the createElement method of the > > Document interface? Now, the problem is that I don't have a Document > > yet. And if I want to create one, I wouldn't even know how to create an > > empty one. > > It sounds like you want to serialize your data structure into XML. Yes! > The best approach to do that is print/write: If I had proposed that at my former job, I guess I would have been killed. Seriously? Or is it just that I did my little XML work in Java and the Java culture shows? This sounds a little bit too unstructured to me. Btw. I've meanwhile got the transformation from/to XML working. I'm quite happy with it and it's not too much work in comparison with print/write. Any comments? So, here is it: # file: xmlconstants.py AddressBook = "AddressBook" Groups = "Groups" Contacts = "Contacts" Contact = "Contact" contactAttributes = ["Uid", "Title" "FirstName", "MiddleName" "LastName", "Suffix" "FileAs", "Categories" "DefaultEmail", "Emails" "HomeStreet", "HomeCity" "HomeState", "HomeZip" "HomeCountry", "HomePhone" "HomeFax", "HomeMobile" "HomeWebPage", "Company" "BusinessStreet", "BusinessCity" "BusinessState", "BusinessZip" "BusinessCountry", "BusinessWebPage" "JobTitle", "Department" "Office", "BusinessPhone" "BusinessFax", "BusinessMobile" "BusinessPager", "Profession" "Assistant", "Manager" "Spouse", "Children" "Gender", "Birthday" "Anniversary", "Nickname" "Notes", "action" "actionrow"] # end file xmlconstants.py # file: addressbook.py #!/usr/bin/env python from xml.dom import Document from xml.dom.ext.reader.Sax import FromXmlStream from xml.dom.DOMImplementation import implementation from xml.dom.ext import PrettyPrint import sys import xml.dom.minidom import xmlconstants class Contacts: """A container for contacts. Will get methods for managing/searching contacts.""" def __init__(self): self.contacts = [] def add(self, contact): self.contacts.append(contact) def fromxml(self, contactsNode): for contactNode in contactsNode.getElementsByTagName(xmlconstants.Contact): contact = Contact() contact.fromxml(contactNode) self.add(contact) def toxml(self, doc): """Returns: an Element Node.""" contactsNode = doc.createElement(xmlconstants.Contacts) for contact in self.contacts: contactsNode.appendChild(contact.toxml(doc)) return contactsNode class Contact: """Pretty stupid structure that has attributes serialized from/to XML *attributes* in a Contact element.""" def __init__(self): for attr in xmlconstants.contactAttributes: self.__dict__[attr] = None def fromxml(self, node): for k in node.attributes.keys(): attr = node.attributes[k] val = attr.nodeValue.encode("utf-8") self.__dict__[attr.nodeName] = val def toxml(self, doc): contactNode = doc.createElement(xmlconstants.Contact) for key, value in self.__dict__.items(): if value != None: contactNode.setAttribute(key, value) return contactNode # Creating DOM and creating data structure from DOM doc = FromXmlStream(sys.stdin) docElement = doc.documentElement contacts = Contacts() contactElement = docElement.getElementsByTagName(xmlconstants.Contacts)[0] contacts.fromxml(contactElement) # Creating and writing DOM from data structure doc = implementation.createDocument(None, None, None) #dom = xml.dom.minidom addressbook = doc.createElement(xmlconstants.AddressBook) doc.appendChild(addressbook) c = contacts.toxml(doc) addressbook.appendChild(c) PrettyPrint(doc) # end file addressbook.py Gerhard -- mail: gerhard bigfoot de registered Linux user #64239 web: http://www.cs.fhm.edu/~ifw00065/ OpenPGP public key id 86AB43C0 public key fingerprint: DEC1 1D02 5743 1159 CD20 A4B6 7B22 6575 86AB 43C0 reduce(lambda x,y:x+y,map(lambda x:chr(ord(x)^42),tuple('zS^BED\nX_FOY\x0b'))) From stephane.bidoul@softwareag.com Wed Dec 12 16:01:58 2001 From: stephane.bidoul@softwareag.com (=?iso-8859-1?Q?St=E9phane_Bidoul?=) Date: Wed, 12 Dec 2001 17:01:58 +0100 Subject: [XML-SIG] xmlns='' and DOM regression? Message-ID: <000c01c18326$58d6e9c0$69a679c1@softwareag.com> Hi! It seems to me that the latest commits to=20 dom/ext/reader/sax2.py introduced a slight regression=20 in the handling of xmlns=3D''. Here's the script: import xml.dom.ext.reader.Sax2 xmls =3D "data" doc =3D xml.dom.ext.reader.Sax2.FromXml(xmls) And the stack trace Traceback (most recent call last): File "sbi.py", line 3, in ? doc =3D xml.dom.ext.reader.Sax2.FromXml(xmls) File "c:\soft\python21\_xmlplus\dom\ext\reader\Sax2.py", line 389, in = FromXml saxHandlerClass, parser) File "c:\soft\python21\_xmlplus\dom\ext\reader\Sax2.py", line 382, in = FromXmlStream return reader.fromStream(stream, ownerDocument) File "c:\soft\python21\_xmlplus\dom\ext\reader\Sax2.py", line 368, in = fromStream self.parser.parse(s) File "c:\soft\python21\_xmlplus\sax\expatreader.py", line 58, in parse xmlreader.IncrementalParser.parse(self, source) File "c:\soft\python21\_xmlplus\sax\xmlreader.py", line 123, in parse self.feed(buffer) File "c:\soft\python21\_xmlplus\sax\expatreader.py", line 143, in feed self._parser.Parse(data, isFinal) File "c:\soft\python21\_xmlplus\sax\expatreader.py", line 217, in = start_element self._cont_handler.startElement(name, AttributesImpl(attrs)) File "c:\soft\python21\_xmlplus\dom\ext\reader\Sax2.py", line 64, in = startElement local + ':' + prefix) TypeError: cannot add type "None" to string After a quick look at the code I'd suggest the following patch (but the real problem may be elsewhere). Index: Sax2.py =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D RCS file: /cvsroot/pyxml/xml/xml/dom/ext/reader/Sax2.py,v retrieving revision 1.19 diff -c -5 -r1.19 Sax2.py *** Sax2.py 2001/12/06 16:02:44 1.19 --- Sax2.py 2001/12/12 15:58:39 *************** *** 59,69 **** for curr_attrib_key,curr_attrib_value in attribs.items(): (prefix, local) =3D SplitQName(curr_attrib_key) if local =3D=3D 'xmlns': namespace =3D XMLNS_NAMESPACE attr =3D self._ownerDoc.createAttributeNS(namespace, ! local + ':' + = prefix) else: namespace =3D prefix and self._namespaces.get(prefix, = None) or None attr =3D self._ownerDoc.createAttributeNS(namespace, (prefix and = prefix + ':' + local) or local) attr.value =3D curr_attrib_value --- 59,69 ---- for curr_attrib_key,curr_attrib_value in attribs.items(): (prefix, local) =3D SplitQName(curr_attrib_key) if local =3D=3D 'xmlns': namespace =3D XMLNS_NAMESPACE attr =3D self._ownerDoc.createAttributeNS(namespace, ! (prefix and = local + ':' + prefix) or local) else: namespace =3D prefix and self._namespaces.get(prefix, = None) or None attr =3D self._ownerDoc.createAttributeNS(namespace, (prefix and = prefix + ':' + local) or local) attr.value =3D curr_attrib_value Can someone have a quick look at this? Or, if the issue is more difficult to solve,=20 I can post this as a bug on SF . -Stephane From Sylvain.Thenault@logilab.fr Wed Dec 12 16:10:54 2001 From: Sylvain.Thenault@logilab.fr (Sylvain Thenault) Date: Wed, 12 Dec 2001 17:10:54 +0100 (CET) Subject: [XML-SIG] xmlns='' and DOM regression? In-Reply-To: <000c01c18326$58d6e9c0$69a679c1@softwareag.com> Message-ID: On Wed, 12 Dec 2001, St=E9phane Bidoul wrote: > Hi! >=20 > It seems to me that the latest commits to=20 > dom/ext/reader/sax2.py introduced a slight regression=20 > in the handling of xmlns=3D''. >=20 > Here's the script: >=20 > import xml.dom.ext.reader.Sax2 > xmls =3D "data" > doc =3D xml.dom.ext.reader.Sax2.FromXml(xmls) >=20 > And the stack trace > [snip]=20 >=20 > After a quick look at the code I'd suggest the following patch > (but the real problem may be elsewhere). I think the problem is right there. Each DOM reader in python should handle correctly empty namespaces and empty prefix which equals None (EMPTY_NAMESPACE and EMPTY_PREFIX, defined in xml.dom.__init__). It'll take a litle time to correct all the actual code which use None _and_ empty string, but it 'll be so easier after that ;) --=20 Sylvain Thenault LOGILAB http://www.logilab.org From alex@upful.org Wed Dec 12 16:55:59 2001 From: alex@upful.org (Alexander Anderson) Date: Wed, 12 Dec 2001 11:55:59 -0500 Subject: [XML-SIG] online XBEL bookmark manager Message-ID: <20011212115559.A61443@dusty.upful.org> Greetings, Several months ago I started a project on SourceForge to create an online XBEL bookmark manager. The project[1], called BES, is still in its alpha stage, but I personally find it useful. Those who want to look at my bookmarks[2] can do so. It's written in Java though, not in Python. Do people have a need for a good bookmark manager? There was a discussion[3] on Half-Empty on topic of "Bookmark Managers or lack there of." I would like to find out more on this topic from people who deal with XBEL more closely. To clarify what a good bookmark manager is for me: it must be distributed, easy to use, and integrate well with different browsers. So is there future for XBEL in this area? [1] http://bes.sourceforge.net/ [2] http://www.upful.org/bes/ [2] http://www.half-empty.org/ideas/6e/dc/52/6b/73/default_index.html From martin@v.loewis.de Wed Dec 12 20:27:03 2001 From: martin@v.loewis.de (Martin v. Loewis) Date: Wed, 12 Dec 2001 21:27:03 +0100 Subject: [XML-SIG] Simple DOM question (writing DOM) In-Reply-To: <20011212082019.GB1756@lilith.hqd-internal> (message from Gerhard =?ISO-8859-1?Q?H=E4ring?= on Wed, 12 Dec 2001 09:20:20 +0100) References: <20011212004114.GA8425@lilith.hqd-internal> <200112120613.fBC6Dqr01689@mira.informatik.hu-berlin.de> <20011212082019.GB1756@lilith.hqd-internal> Message-ID: <200112122027.fBCKR3C01578@mira.informatik.hu-berlin.de> > > Is that a custom data structure, or a DOM tree? By "create an > > Element", do you mean you want to create some data structure, or an > > XML file (i.e. a sequence of bytes in a stream, or on disk)? > > I want my classes to be able to represent itself as a DOM element node > as well as reconstruct themselves from such an element node. That is quite a challenge, if you want your classes to support all of the DOM operations. I recommend you inherit from the classes of a DOM implementation of your choice, and override the factory methods to create instances of your classes appropriately. Actually, I recommend that you drop the idea of having your classes represent themselves as DOM elements, and instead try to merely initialize your data structure from a DOM tree. If you think you absolutely need it, you may want to provide the reverse operation as well, but I doubt this will ever be necessary. > > The best approach to do that is print/write: > > If I had proposed that at my former job, I guess I would have been > killed. Seriously? Definitely. If you have a data structure that you want to serialize into XML, provide a traversal procedure (using the visitor pattern, if you want to make it sound good :-) where each node contributes his portion to the output. A StringIO object might be appropriate. XML got its reputation because it is easy to process. People who actually deal with it find out that there is a pitfall: Parsing XML is not that easy. So all the libraries for XML parsing got designed. However, there is no reason to give up the simplicity of producing XML - you only have to make sure that no undesired markup occurs in the output. > Or is it just that I did my little XML work in Java and the Java > culture shows? Dunno. People tend to over-design things. I doubt that the "Java culture" really tells you that you must not System.out.print to produce XML. > This sounds a little bit too unstructured to me. Btw. I've meanwhile > got the transformation from/to XML working. I'm quite happy with it > and it's not too much work in comparison with print/write. Any > comments? Two of them: 1. Sometimes, people have specific ideas of how the XML should look like on a lexical level (what encoding to use, where to insert whitespace, etc). Producing a DOM tree and invoking .xml() does not give you that flexibility. It may not be needed in your application, so this might not be an issue. 2. Keep Unicode strings as long as you can. I see that you use .encode("utf-8") in fromxml, and put back the UTF-8 strings in toxml. Strictly speaking, this is breaking the DOM contract: All strings in DOM are Unicode; byte strings are only accepted for backwards compatibility. You should really carry over the Unicode objects, and keep them until you need to print them into a byte stream. Regards, Martin From tpassin@home.com Thu Dec 13 01:55:54 2001 From: tpassin@home.com (Thomas B. Passin) Date: Wed, 12 Dec 2001 20:55:54 -0500 Subject: [XML-SIG] Simple DOM question (writing DOM) References: <20011212004114.GA8425@lilith.hqd-internal> <200112120613.fBC6Dqr01689@mira.informatik.hu-berlin.de> <20011212082019.GB1756@lilith.hqd-internal> <200112122027.fBCKR3C01578@mira.informatik.hu-berlin.de> Message-ID: <001201c18379$4d5aead0$7cac1218@cj64132b> [Martin v. Loewis] >... > > > This sounds a little bit too unstructured to me. Btw. I've meanwhile > > got the transformation from/to XML working. I'm quite happy with it > > and it's not too much work in comparison with print/write. Any > > comments? > > Two of them: > > 1. Sometimes, people have specific ideas of how the XML should look > like on a lexical level (what encoding to use, where to insert > whitespace, etc). Producing a DOM tree and invoking .xml() does not > give you that flexibility. It may not be needed in your > application, so this might not be an issue. > > 2. Keep Unicode strings as long as you can. I see that you use > .encode("utf-8") in fromxml, and put back the UTF-8 strings in > toxml. Strictly speaking, this is breaking the DOM contract: All > strings in DOM are Unicode; byte strings are only accepted for > backwards compatibility. You should really carry over the Unicode > objects, and keep them until you need to print them into a byte > stream. > Remember, if you produce output strings, don't use str=str+data to build up really long strings - because it gets very slow (see a thread on this a month or so ago). Either output short strings as you go, or put the string pieces into a list then join the list, or use StringIO - that will be MUCH faster. Cheers, Tom P From martin@v.loewis.de Thu Dec 13 06:09:56 2001 From: martin@v.loewis.de (Martin v. Loewis) Date: Thu, 13 Dec 2001 07:09:56 +0100 Subject: [XML-SIG] xmlns='' and DOM regression? In-Reply-To: <000c01c18326$58d6e9c0$69a679c1@softwareag.com> (message from =?ISO-8859-1?Q?St=E9phane?= Bidoul on Wed, 12 Dec 2001 17:01:58 +0100) References: <000c01c18326$58d6e9c0$69a679c1@softwareag.com> Message-ID: <200112130609.fBD69uA01311@mira.informatik.hu-berlin.de> > After a quick look at the code I'd suggest the following patch > (but the real problem may be elsewhere). Your patch sounds good to me, so I have installed it. Thanks, Martin From martin@v.loewis.de Thu Dec 13 06:13:32 2001 From: martin@v.loewis.de (Martin v. Loewis) Date: Thu, 13 Dec 2001 07:13:32 +0100 Subject: [XML-SIG] Pyana 0.2.0 released In-Reply-To: <003c01c182bf$7d7ad190$445d4540@Dell2> (brian@sweetapp.com) References: <003c01c182bf$7d7ad190$445d4540@Dell2> Message-ID: <200112130613.fBD6DW801317@mira.informatik.hu-berlin.de> > Pyana is an interface between the Apache Project's Xalan XSLT engine and > Python. Hi Brian, How does that compare to PIRXX? Regards, Martin From brian@sweetapp.com Thu Dec 13 06:43:10 2001 From: brian@sweetapp.com (Brian Quinlan) Date: Wed, 12 Dec 2001 22:43:10 -0800 Subject: [XML-SIG] Pyana 0.2.0 released In-Reply-To: <200112130613.fBD6DW801317@mira.informatik.hu-berlin.de> Message-ID: <006101c183a1$71bd9df0$445d4540@Dell2> Hi Martin, > How does that [Pyana] compare to PIRXX? The stated goals of the two projects (to provide Python interfaces to the Apache group's Xalan & Xerces products) are pretty similar and J=FCrgen Hermann and I are going to coordinate to make sure that they interoperate. But the current statuses of the two projects are very different.=20 Right now, Pyana development is focused on providing XSLT services to Python. There are functions to do XSLT transformations from various sources (strings, files, URIs and reader objects). Output can be directed to strings, files, writer objects or to a (only partially complete) DOM. It is also possible to extend XPath with Python functions. For a useful example script that demonstrates many of Pyana features, take a look at: http://pyana.sourceforge.net/examples/check_links.py PIRXX is focused on providing Xerces XML services to Python. The current release of PIRXX provides SAX2 interfaces but I believe that J=FCrgen is working on DOM support. So, right now, Pyana is probably your best bet for high-performance XSLT processing in Python while PIRXX offers Xerces SAX2 interfaces. Sorry me the long answer; let me know if I missed the point completely :-) Cheers, Brian From horst@freedict.de Thu Dec 13 14:39:05 2001 From: horst@freedict.de (horst@freedict.de) Date: Thu, 13 Dec 2001 15:39:05 +0100 (CET) Subject: [XML-SIG] (no subject) Message-ID: <200112131439.fBDEd8K04631@eaglesnest.mceggman> Hello, since I did not receive a answer why my test program for accessing attributes with DOM failed, I tried to research why. I realised, that in PyXML 0.7.0 (from CVS) failed with an installed Python 2.1.0 installed. ( I deleted all directories first to make sure, that nothing from a previous install is around). Any hints, what is going wrong? - Help would be much appreciated. horst > ./regrtest.py test_c14n Warning: can't open ./output/test_c14n Doing 1, \n\n\n \n ... Created out2.xml Doing 3, Traceback (most recent call last): File "test_c14n.py", line 162, in builtin dom = r.fromString(eg) File "/usr/local/lib/python2.1/site-packages/_xmlplus/dom/ext/reader/__init__.py", line 63, in fromString return self.fromStream(stream, ownerDoc) File "/usr/local/lib/python2.1/site-packages/_xmlplus/dom/ext/reader/PyExpat.py", line 65, in fromStream success = self.parser.ParseFile(stream) File "/usr/local/lib/python2.1/site-packages/_xmlplus/dom/ext/reader/PyExpat.py", line 153, in startElement local + ':' + prefix) TypeError: cannot add type "None" to string Doing 4, This is a test

Don't panic

Maybe it will work.

We can handle it

Yes we can

Or maybe not

End of test.
test test_dom failed -- Writing: '\n', expected: '<' test_domu test test_domu skipped -- an optional feature could not be imported test_encodings test_howto test_htmlb test test_htmlb crashed -- exceptions.NameError : global name 'tagname' is not defined test_javadom Warning: can't open ./output/test_javadom test_marshal test test_marshal skipped -- an optional feature could not be imported test_minidom test_pyexpat test test_pyexpat failed -- Writing: "u'attr2': u'value2\\\\u1f40',", expected: "u'attr2': u'value2\\\\\\u1f40'" test_sax test_sax2 test_sax2_xmlproc Warning: can't open ./output/test_sax2_xmlproc test_sax_xmlproc test_saxdrivers test test_saxdrivers failed -- Writing: 'xml.sax.drivers2.drv_pyexpat', expected: 'xml.sax.drivers.drv_pyexpat ' test_utils 9 tests OK. 5 tests failed: test_c14n test_dom test_htmlb test_pyexpat test_saxdrivers 2 tests skipped: test_domu test_marshal > ./regrtest.py test_c14n Warning: can't open ./output/test_c14n Doing 1, \n\n\n \n ... Created out2.xml Doing 3, Traceback (most recent call last): File "test_c14n.py", line 162, in builtin dom = r.fromString(eg) File "/usr/local/lib/python2.1/site-packages/_xmlplus/dom/ext/reader/__init__.py", line 63, in fromString return self.fromStream(stream, ownerDoc) File "/usr/local/lib/python2.1/site-packages/_xmlplus/dom/ext/reader/PyExpat.py", line 65, in fromStream success = self.parser.ParseFile(stream) File "/usr/local/lib/python2.1/site-packages/_xmlplus/dom/ext/reader/PyExpat.py", line 153, in startElement local + ':' + prefix) TypeError: cannot add type "None" to string Doing 4, This is a test

Don't panic

Maybe it will work.

We can handle it

Yes we can

Or maybe not

End of test.
test test_dom failed -- Writing: '\n', expected: '<' test_domu test test_domu skipped -- an optional feature could not be imported test_encodings test_howto test_htmlb test test_htmlb crashed -- exceptions.NameError : global name 'tagname' is not defined test_javadom Warning: can't open ./output/test_javadom test_marshal test test_marshal skipped -- an optional feature could not be imported test_minidom test_pyexpat test test_pyexpat failed -- Writing: "u'attr2': u'value2\\\\u1f40',", expected: "u'attr2': u'value2\\\\\\u1f40'" test_sax test_sax2 test_sax2_xmlproc Warning: can't open ./output/test_sax2_xmlproc test_sax_xmlproc test_saxdrivers test test_saxdrivers failed -- Writing: 'xml.sax.drivers2.drv_pyexpat', expected: 'xml.sax.drivers.drv_pyexpat ' test_utils 9 tests OK. 5 tests failed: test_c14n test_dom test_htmlb test_pyexpat test_saxdrivers 2 tests skipped: test_domu test_marshal -- Horst@freedict.de Horst Eyermann Germany You need a dictionary? - visit http://www.freedict.de for free (GPL) dictionaries (unix; windows work in progress) For windows, visit http://www.freedict.de/wbuch A article (in German) about dictionary efforts on the net http://www.heise.de/tp/deutsch/inhalt/on/5927/1.html From rsalz@zolera.com Thu Dec 13 17:23:44 2001 From: rsalz@zolera.com (Rich Salz) Date: Thu, 13 Dec 2001 12:23:44 -0500 Subject: [XML-SIG] Default namespace ''/None still in progress? Message-ID: <3C18E420.D2EEB5FD@zolera.com> >>> from xml.dom.ext.reader import PyExpat >>> PyExpat.Reader().fromString('b') Traceback (most recent call last): File "", line 1, in ? File "/usr/lib/python2.1/site-packages/_xmlplus/dom/ext/reader/__init__.py", line 63, in fromString return self.fromStream(stream, ownerDoc) File "/usr/lib/python2.1/site-packages/_xmlplus/dom/ext/reader/PyExpat.py", line 65, in fromStream success = self.parser.ParseFile(stream) File "/usr/lib/python2.1/site-packages/_xmlplus/dom/ext/reader/PyExpat.py", line 153, in startElement local + ':' + prefix) TypeError: cannot add type "None" to string I don't know how the "default namespace node" is being handled nowadays ... -- Zolera Systems, Your Key to Online Integrity Securing Web services: XML, SOAP, Dig-sig, Encryption http://www.zolera.com From ol1@v10a.com Thu Dec 13 17:42:01 2001 From: ol1@v10a.com (o polite) Date: Thu, 13 Dec 2001 18:42:01 +0100 Subject: [XML-SIG] Standard methods for turning and object into an xml document. Message-ID: <200112131742.fBDHg4F20244@relay.wineasy.se> Hi. I've been using python for a couple of years but I'm quite new to XML. I've read the python xml howto, and some other stuff on the web. There's a lot of talk about moving from xml document to a DOM object. And even about putting a DOM object back on file as an xml document. But I haven't found much on moving from some arbitrary python object (made up of mostly string attributes) to an xml document. Of course I could start adding homegrown xmlwriter methods to my classes, but I have a feeling that someone already made a nice framework for this. What are your favorite techniques? -- o polite From pobrien@orbtech.com Thu Dec 13 17:59:38 2001 From: pobrien@orbtech.com (Patrick K. O'Brien) Date: Thu, 13 Dec 2001 11:59:38 -0600 Subject: [XML-SIG] Standard methods for turning and object into an xml document. In-Reply-To: <200112131742.fBDHg4F20244@relay.wineasy.se> Message-ID: David Mertz has published a couple of articles on this topic: http://www-106.ibm.com/developerworks/xml/library/xml-matters1/index.html http://www-106.ibm.com/developerworks/xml/library/xml-matters2/index.html http://www-106.ibm.com/developerworks/xml/library/x-matters11.html --- Patrick K. O'Brien Orbtech.com - Your Source For Python Development Services Phone: 314-963-3206 > -----Original Message----- > From: xml-sig-admin@python.org [mailto:xml-sig-admin@python.org]On > Behalf Of o polite > Sent: Thursday, December 13, 2001 11:42 AM > To: xml-sig@python.org > Subject: [XML-SIG] Standard methods for turning and object into an xml > document. > > > Hi. I've been using python for a couple of years but I'm quite new to XML. > > I've read the python xml howto, and some other stuff on the web. > There's a > lot of talk about moving from xml document to a DOM object. And > even about > putting a DOM object back on file as an xml document. > > But I haven't found much on moving from some arbitrary python > object (made up > of mostly string attributes) to an xml document. Of course I could start > adding homegrown xmlwriter methods to my classes, but I have a > feeling that > someone already made a nice framework for this. > > What are your favorite techniques? > > -- > o polite > > _______________________________________________ > XML-SIG maillist - XML-SIG@python.org > http://mail.python.org/mailman/listinfo/xml-sig From rsalz@zolera.com Thu Dec 13 18:08:22 2001 From: rsalz@zolera.com (Rich Salz) Date: Thu, 13 Dec 2001 13:08:22 -0500 Subject: [XML-SIG] Standard methods for turning and object into an xml document. References: <200112131742.fBDHg4F20244@relay.wineasy.se> Message-ID: <3C18EE96.658F1CDD@zolera.com> ZSI comes close: class Foo: pass class Bar: pass af = Foo() af.z = "z attr" af.x = 12 af.quux = (1,2,"34", u'skiddoo') from ZSI import * import sys sw = SoapWriter(sys.stdout, envelope=0) sw.serialize(af, TC.Any("your-name-here")) print '- ' * 30 bf = Bar() bf.my_a = af bf.more = 'less' bf.d = { 'k1': 'v1' } sw.serialize(bf, TC.Any("your-other-name-here")) gets you this. It's close; finding the errors is left as an exercise. :) z attr 12 1 2 34 skiddoo - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - less v1 12 1 2 -- Zolera Systems, Your Key to Online Integrity Securing Web services: XML, SOAP, Dig-sig, Encryption http://www.zolera.com From horst@freedict.de Thu Dec 13 18:12:54 2001 From: horst@freedict.de (horst@freedict.de) Date: Thu, 13 Dec 2001 19:12:54 +0100 (CET) Subject: [XML-SIG] DOM handling with parsed element Message-ID: <200112131812.fBDICv816848@eaglesnest.mceggman> I asked this before, but I did not receive any answer, so I am asking it again, in a different way. I would appreciate answers VERY much. I am running linux, and reinstalled Python 2.0.1 and PyXML0.6.6 I modified the dom test program to: from xml.dom import Node # MUST be first from xml.dom import implementation, DOMException from xml.dom import HIERARCHY_REQUEST_ERR, NOT_FOUND_ERR from xml.dom import INDEX_SIZE_ERR, INVALID_CHARACTER_ERR, SYNTAX_ERR from xml.dom.ext.reader.Sax2 import FromXml from xml.dom.ext import PrettyPrint test_text = """ This is a test

Don't panic

Maybe it will work.

We can handle it

Yes we can

Or maybe not

End of test.
""" doc = FromXml(test_text) # Detailed test suite for the DOM from xml.dom import Document e = doc.getElementsByTagName('title') print "e:", e[0] print "attribute:", e[0].getAttribute("test") for attrib in e[0].attributes: print "attrib:", attrib.name
the result is however: > python test_mydom.py e: attribute: attrib: test Where I expected to retrive: "attribute: test", as the title element has the attribute test. Where are things going wrong? Thanks for your answers Horst -- Horst@freedict.de Horst Eyermann Germany You need a dictionary? - visit http://www.freedict.de for free (GPL) dictionaries (unix; windows work in progress) For windows, visit http://www.freedict.de/wbuch A article (in German) about dictionary efforts on the net http://www.heise.de/tp/deutsch/inhalt/on/5927/1.html From tpassin@home.com Thu Dec 13 22:31:34 2001 From: tpassin@home.com (Thomas B. Passin) Date: Thu, 13 Dec 2001 17:31:34 -0500 Subject: [XML-SIG] DOM handling with parsed element References: <200112131812.fBDICv816848@eaglesnest.mceggman> Message-ID: <001e01c18425$ebf123b0$7cac1218@cj64132b> As I wrote last week, by default one needs the "NS" versions of the DOM methods, although there seems to be some inconsistency about when that is required. In Horst's example, the value of the "test" attribute is retrieved by using print "attribute:", e[0].getAttributeNS('',"test") This prints the value "1" rather than "test" as Horst expected, because "1" is in fact the value of the "test" attribute. I still don't know why getElementsByTagName() doesn't have to be getElementsByTagNameNS() - it's a bug, isn't it? Presumably in the next release of pyxml, all these NS functions will require None instead of '' for a missing namespace. Cheers, Tom P [] > I modified the dom test program to: > > > > from xml.dom import Node # MUST be first > from xml.dom import implementation, DOMException > from xml.dom import HIERARCHY_REQUEST_ERR, NOT_FOUND_ERR > from xml.dom import INDEX_SIZE_ERR, INVALID_CHARACTER_ERR, SYNTAX_ERR > from xml.dom.ext.reader.Sax2 import FromXml > from xml.dom.ext import PrettyPrint > > > test_text = """ > > This is a test >

Don't panic

>

Maybe it will work.

>

We can handle it

>

Yes we can

>

Or maybe not

> End of test. >
> """ > > doc = FromXml(test_text) > > # Detailed test suite for the DOM > from xml.dom import Document > e = doc.getElementsByTagName('title') > print "e:", e[0] > print "attribute:", e[0].getAttribute("test") > > for attrib in e[0].attributes: > print "attrib:", attrib.name > > >
> > > the result is however: > > > python test_mydom.py > e: > attribute: > attrib: test > > Where I expected to retrive: "attribute: test", as the title element has > the attribute test. > > Where are things going wrong? From martin@v.loewis.de Fri Dec 14 07:27:20 2001 From: martin@v.loewis.de (Martin v. Loewis) Date: Fri, 14 Dec 2001 08:27:20 +0100 Subject: [XML-SIG] Default namespace ''/None still in progress? In-Reply-To: <3C18E420.D2EEB5FD@zolera.com> (message from Rich Salz on Thu, 13 Dec 2001 12:23:44 -0500) References: <3C18E420.D2EEB5FD@zolera.com> Message-ID: <200112140727.fBE7RKY01280@mira.informatik.hu-berlin.de> > I don't know how the "default namespace node" is being handled nowadays Please try again fro CVS, I've applied the Sax2 fix to PyExpat as well. Martin From Alexandre.Fayolle@logilab.fr Fri Dec 14 08:37:24 2001 From: Alexandre.Fayolle@logilab.fr (Alexandre Fayolle) Date: Fri, 14 Dec 2001 09:37:24 +0100 (CET) Subject: [XML-SIG] DOM handling with parsed element In-Reply-To: <001e01c18425$ebf123b0$7cac1218@cj64132b> Message-ID: On Thu, 13 Dec 2001, Thomas B. Passin wrote: > Presumably in the next release of pyxml, all these NS functions will require > None instead of '' for a missing namespace. 2 things : * in the next release of PyXML, the non NS methods of 4DOM will delegate the call to the NS methods with None as the namespace uri, so this should be the end of the nightmare. * right now, a good way of writing code that won't require any changes when upgrading to PyXML-0.7 is try: from xml.dom import EMPTY_NAMESPACE except: EMPTY_NAMESPACE = '' and then use elt.getAttributeNS(EMPTY_NAMESPACE,'foo') This supposes that pyexpat has been used to build the DOM, which is the default. With validation enabled, you have to set EMPTY_NAMESPACE to None. In 0.7 everyone will be using None., and things will be much cleaner. Alexandre Fayolle -- LOGILAB, Paris (France). http://www.logilab.com http://www.logilab.fr http://www.logilab.org Narval, the first software agent available as free software (GPL). From martin@v.loewis.de Fri Dec 14 09:43:01 2001 From: martin@v.loewis.de (Martin v. Loewis) Date: Fri, 14 Dec 2001 10:43:01 +0100 Subject: [XML-SIG] (no subject) In-Reply-To: <200112131439.fBDEd8K04631@eaglesnest.mceggman> (horst@freedict.de) References: <200112131439.fBDEd8K04631@eaglesnest.mceggman> Message-ID: <200112140943.fBE9h1s02085@mira.informatik.hu-berlin.de> > Any hints, what is going wrong? - Help would be much appreciated. Please try again; it should be fixed now. Regards, Martin From Sylvain.Thenault@logilab.fr Fri Dec 14 11:04:02 2001 From: Sylvain.Thenault@logilab.fr (Sylvain Thenault) Date: Fri, 14 Dec 2001 12:04:02 +0100 (CET) Subject: [XML-SIG] sax/drivers2/drv_sgmlop.py Message-ID: with the current Sax2 SGMLOP drivers, an exception is raised when you call parse(file) because self.prepareParser() is not an attribute of the parser. Puts this line in comment seems to be enough to fix the problem. I can commit this but I'm not sure I'm not missing something ... regards -- Sylvain Thenault LOGILAB http://www.logilab.org From rsalz@zolera.com Fri Dec 14 14:29:35 2001 From: rsalz@zolera.com (Rich Salz) Date: Fri, 14 Dec 2001 09:29:35 -0500 Subject: [XML-SIG] Reconsidering NamespaceErr on '' and None Message-ID: <3C1A0CCF.587CF006@zolera.com> I have an opensource SOAP toolkit that runs on several DOM's: PyXML 0.6, the planned 0.7, and the FourThought 4dom and cDomlette. I wrote my own accessors, like this: _find_attr = lambda E, attr: \ E.getAttributeNS(None, attr) or E.getAttributeNS("", attr) This now breaks, raising File "/usr/lib/python2.1/site-packages/_xmlplus/dom/NamedNodeMap.py", line 81, in getNamedItemNS raise NamespaceErr("Use None instead of '' for empty namespace") I think this is a mistake as it makes it difficult to write portable code. Instead, I think we should treat [NONE, '', xml.dom.EMPTY_NAMESPACE] as equivalent for one release, and in 0.8 use an exception. For now, I'm doing this: try: from xml.dom import EMPTY_NAMESPACE _find_attr = lambda E, attr: \ E.getAttributeNS(EMPTY_NAMESPACE, attr) except: # the definition from above -- Zolera Systems, Your Key to Online Integrity Securing Web services: XML, SOAP, Dig-sig, Encryption http://www.zolera.com From martin@v.loewis.de Fri Dec 14 14:39:59 2001 From: martin@v.loewis.de (Martin v. Loewis) Date: Fri, 14 Dec 2001 15:39:59 +0100 Subject: [XML-SIG] sax/drivers2/drv_sgmlop.py In-Reply-To: (message from Sylvain Thenault on Fri, 14 Dec 2001 12:04:02 +0100 (CET)) References: Message-ID: <200112141439.fBEEdxh01294@mira.informatik.hu-berlin.de> > with the current Sax2 SGMLOP drivers, an exception is raised when you call > parse(file) because self.prepareParser() is not an attribute of the > parser. > > Puts this line in comment seems to be enough to fix the problem. > > I can commit this but I'm not sure I'm not missing something ... prepareParser is something every reader must implement, so I implemented it empty. Regards, Martin From tpassin@home.com Fri Dec 14 15:08:38 2001 From: tpassin@home.com (Thomas B. Passin) Date: Fri, 14 Dec 2001 10:08:38 -0500 Subject: [XML-SIG] DOM handling with parsed element References: Message-ID: <000401c184b1$3610c0f0$7cac1218@cj64132b> [Alexandre Fayolle] > On Thu, 13 Dec 2001, Thomas B. Passin wrote: > > > Presumably in the next release of pyxml, all these NS functions will require > > None instead of '' for a missing namespace. > > 2 things : > * in the next release of PyXML, the non NS methods of 4DOM will delegate > the call to the NS methods with None as the namespace uri, so this should > be the end of the nightmare. A most excellent move! > * right now, a good way of writing code that won't require any changes > when upgrading to PyXML-0.7 is > > try: > from xml.dom import EMPTY_NAMESPACE > except: > EMPTY_NAMESPACE = '' > > and then use > elt.getAttributeNS(EMPTY_NAMESPACE,'foo') > > This supposes that pyexpat has been used to build the DOM, which is the > default. With validation enabled, you have to set EMPTY_NAMESPACE to None. > What if someone wants to use a different parser? What's the situation there? Cheers, Tom P From Alexandre.Fayolle@logilab.fr Fri Dec 14 15:49:31 2001 From: Alexandre.Fayolle@logilab.fr (Alexandre Fayolle) Date: Fri, 14 Dec 2001 16:49:31 +0100 (CET) Subject: [XML-SIG] Reconsidering NamespaceErr on '' and None In-Reply-To: <3C1A0CCF.587CF006@zolera.com> Message-ID: On Fri, 14 Dec 2001, Rich Salz wrote: > I have an opensource SOAP toolkit that runs on several DOM's: PyXML 0.6, > the planned 0.7, and the FourThought 4dom and cDomlette. I wrote my own > accessors, like this: > _find_attr = lambda E, attr: \ > E.getAttributeNS(None, attr) or E.getAttributeNS("", attr) > > This now breaks, raising > File "/usr/lib/python2.1/site-packages/_xmlplus/dom/NamedNodeMap.py", > line 81, in getNamedItemNS > raise NamespaceErr("Use None instead of '' for empty namespace") > > I think this is a mistake as it makes it difficult to write portable > code. A better way is to use a symbolic constant for empty namespace. If xml.dom.EMPTY_NAMESPACE exists, you can use it safely, if not, you can define it to '' However, if the general opinion on the list is that raising an exception in 0.7 is too early, I'll remove raise statement and silently convert the '' to None. However, adding the exception in 0.8 will break things in exactly the same way as it did until now. A better way ofr handling the migration would be using warnings, but this won't work with python < 2.1, I think. Alexandre Fayolle -- LOGILAB, Paris (France). http://www.logilab.com http://www.logilab.fr http://www.logilab.org Narval, the first software agent available as free software (GPL). From Alexandre.Fayolle@logilab.fr Fri Dec 14 15:53:51 2001 From: Alexandre.Fayolle@logilab.fr (Alexandre Fayolle) Date: Fri, 14 Dec 2001 16:53:51 +0100 (CET) Subject: [XML-SIG] DOM handling with parsed element In-Reply-To: <000401c184b1$3610c0f0$7cac1218@cj64132b> Message-ID: On Fri, 14 Dec 2001, Thomas B. Passin wrote: > > This supposes that pyexpat has been used to build the DOM, which is the > > default. With validation enabled, you have to set EMPTY_NAMESPACE to None. > > > > What if someone wants to use a different parser? What's the situation > there? I'm afraid you'll have to check manually, as of 0.6.6. After 0.7, all parsers should behave consistently and use None, but for now it's pretty much the wild west in there. :o( Alexandre Fayolle -- LOGILAB, Paris (France). http://www.logilab.com http://www.logilab.fr http://www.logilab.org Narval, the first software agent available as free software (GPL). From rsalz@zolera.com Fri Dec 14 15:58:41 2001 From: rsalz@zolera.com (Rich Salz) Date: Fri, 14 Dec 2001 10:58:41 -0500 Subject: [XML-SIG] Reconsidering NamespaceErr on '' and None References: Message-ID: <3C1A21B1.73BAD938@zolera.com> > A better way is to use a symbolic constant for empty namespace. If > xml.dom.EMPTY_NAMESPACE exists, you can use it safely, if not, you can > define it to '' I thought the problem was that sometimes '' was used, and sometimes None was used, so that I had to write my test to check for both. If I'm wrong, and we're now converting EVERYONE from '' to None, then it is less important. If, however, any of the DOMs before 0.7 used '' and some used None, then I think we should allow a migration path for one release. /r$ -- Zolera Systems, Your Key to Online Integrity Securing Web services: XML, SOAP, Dig-sig, Encryption http://www.zolera.com From martin@v.loewis.de Fri Dec 14 16:06:14 2001 From: martin@v.loewis.de (Martin v. Loewis) Date: Fri, 14 Dec 2001 17:06:14 +0100 Subject: [XML-SIG] DOM test failures Message-ID: <200112141606.fBEG6Eu01900@mira.informatik.hu-berlin.de> With the changes to 4DOM a few weeks ago, a number of dom test cases stopped working now. I've corrected some occurrences of empty namespaces, but some of the remaining errors indicate genuine bugs in the implementation. For example, in test_node, the following sequence is executed p = doc.createElement('PARENT') if p.localName != None: tester.error('Error getting localName') This test now fails, as localName is "PARENT". That appears to be in clear violation of DOM level 2, which says createElement ... Return Value Element A new Element object with the nodeName attribute set to tagName, and localName, prefix, and namespaceURI set to null. So it seems to me that the test is right and the code is wrong. Comments? Regards, Martin P.S. To run the DOM test suite, invoke "python test.py" in the dom directory. From Sylvain.Thenault@logilab.fr Fri Dec 14 16:17:45 2001 From: Sylvain.Thenault@logilab.fr (Sylvain Thenault) Date: Fri, 14 Dec 2001 17:17:45 +0100 (CET) Subject: [XML-SIG] DOM test failures In-Reply-To: <200112141606.fBEG6Eu01900@mira.informatik.hu-berlin.de> Message-ID: On Fri, 14 Dec 2001, Martin v. Loewis wrote: > With the changes to 4DOM a few weeks ago, a number of dom test cases > stopped working now. I've corrected some occurrences of empty > namespaces, but some of the remaining errors indicate genuine bugs in > the implementation. > > For example, in test_node, the following sequence is executed > > p = doc.createElement('PARENT') > if p.localName != None: > tester.error('Error getting localName') > > This test now fails, as localName is "PARENT". That appears to be in > clear violation of DOM level 2, which says > > createElement > ... > > Return Value > > Element A new Element object with the nodeName attribute > set to tagName, and localName, prefix, and namespaceURI > set to null. > > So it seems to me that the test is right and the code is wrong. You are right, in the sense that the code violate the DOM2 spec, but I think the code have the _big_ advantage to allow dom tree manipulations without knowing if the dom tree have been created using the NS interface or not. (who said that DOM was wrong ? ;) -- Sylvain Thenault LOGILAB http://www.logilab.org From rsalz@zolera.com Fri Dec 14 16:20:52 2001 From: rsalz@zolera.com (Rich Salz) Date: Fri, 14 Dec 2001 11:20:52 -0500 Subject: [XML-SIG] Reconsidering NamespaceErr on '' and None References: <3C1A21B1.73BAD938@zolera.com> Message-ID: <3C1A26E4.230620F3@zolera.com> I will answer my own question. cDomlette uses empty string for the no namespace I have to call getAttributeNS('', 'id') ZSI supports run-time DOM selection, so now my DOM-portable code looks like this: try: from xml.dom import EMPTY_NAMESPACE _empty_nsuri_list = [ EMPTY_NAMESPACE ] if '' not in _empty_nsuri_list: __empty_nsuri_list.append('') if None not in _empty_nsuri_list: __empty_nsuri_list.append(None) except: _empty_nsuri_list = [ None, '' ] def _find_attr(E, attr): for nsuri in _empty_nsuri_list: try: v = E.getAttributeNS(nsuri, attr) if v: return v except: pass return None that's pretty horrible. If PyXML 0.7 silently converts '' to None, then I can go back to _find_attr = lambda E, attr: E.getAttributeNS(None, attr) or \ E.getAttributeNS('', attr) which has a performance hit if the attribute is not found. I am not sure which is better. -- Zolera Systems, Your Key to Online Integrity Securing Web services: XML, SOAP, Dig-sig, Encryption http://www.zolera.com From fdrake@acm.org Fri Dec 14 16:28:42 2001 From: fdrake@acm.org (Fred L. Drake, Jr.) Date: Fri, 14 Dec 2001 11:28:42 -0500 Subject: [XML-SIG] Reconsidering NamespaceErr on '' and None In-Reply-To: <3C1A26E4.230620F3@zolera.com> References: <3C1A21B1.73BAD938@zolera.com> <3C1A26E4.230620F3@zolera.com> Message-ID: <15386.10426.375149.478804@grendel.zope.com> Rich Salz writes: > If PyXML 0.7 silently converts '' to None, then I can go back to > _find_attr = lambda E, attr: E.getAttributeNS(None, attr) or \ > E.getAttributeNS('', attr) > which has a performance hit if the attribute is not found. Here's an idea: the exception should be raised when attempting to set an attribute with a namespace URI of '', but queries could allow either: def getAttributeNS(self, namespaceURI, localName): namespaceURI = namespaceURI or None ... This isn't perfect, but would probably avoid most problems with client code that uses ''. -Fred -- Fred L. Drake, Jr. PythonLabs at Zope Corporation From Sylvain.Thenault@logilab.fr Fri Dec 14 16:30:39 2001 From: Sylvain.Thenault@logilab.fr (Sylvain Thenault) Date: Fri, 14 Dec 2001 17:30:39 +0100 (CET) Subject: [XML-SIG] RE: sax/drivers2/drv_sgmlop.py Message-ID: change prepareParser(self) with prepareParser(self, source) and it works. Sorry if I can't commit this, but I have a problem with sourceforge: I can login to the web site but as soon as I try to use the CVS, I just obtain the following message: Could not chdir to home directory /home/users/s/sy/syt: No such file or directory Anybody has an idea for this pb ? -- Sylvain Thenault LOGILAB http://www.logilab.org From fdrake@acm.org Fri Dec 14 16:33:07 2001 From: fdrake@acm.org (Fred L. Drake, Jr.) Date: Fri, 14 Dec 2001 11:33:07 -0500 Subject: [XML-SIG] RE: sax/drivers2/drv_sgmlop.py In-Reply-To: References: Message-ID: <15386.10691.966085.759798@grendel.zope.com> Sylvain Thenault writes: > Sorry if I can't commit this, but I have a problem with sourceforge: > I can login to the web site but as soon as I try to use the CVS, I just > obtain the following message: > > Could not chdir to home directory /home/users/s/sy/syt: No such file or > directory I've seen this several times, but it's usually pretty transient. -Fred -- Fred L. Drake, Jr. PythonLabs at Zope Corporation From Sylvain.Thenault@logilab.fr Fri Dec 14 16:35:42 2001 From: Sylvain.Thenault@logilab.fr (Sylvain Thenault) Date: Fri, 14 Dec 2001 17:35:42 +0100 (CET) Subject: [XML-SIG] RE: sax/drivers2/drv_sgmlop.py In-Reply-To: Message-ID: On Fri, 14 Dec 2001, Sylvain Thenault wrote: > Sorry if I can't commit this, but I have a problem with sourceforge: > I can login to the web site but as soon as I try to use the CVS, I just > obtain the following message: > > Could not chdir to home directory /home/users/s/sy/syt: No such file or > directory > > Anybody has an idea for this pb ? This is fixed, I didn't know that I had have to ssh cvs.sourceforge.net to create my cvs account. This is now done, I 'll commit the fix in drv_gmlop if anybody did it -- Sylvain Thenault LOGILAB http://www.logilab.org From Sylvain.Thenault@logilab.fr Fri Dec 14 16:37:01 2001 From: Sylvain.Thenault@logilab.fr (Sylvain Thenault) Date: Fri, 14 Dec 2001 17:37:01 +0100 (CET) Subject: [XML-SIG] Reconsidering NamespaceErr on '' and None In-Reply-To: <15386.10426.375149.478804@grendel.zope.com> Message-ID: On Fri, 14 Dec 2001, Fred L. Drake, Jr. wrote: > > Rich Salz writes: > > If PyXML 0.7 silently converts '' to None, then I can go back to > > _find_attr = lambda E, attr: E.getAttributeNS(None, attr) or \ > > E.getAttributeNS('', attr) > > which has a performance hit if the attribute is not found. > > Here's an idea: the exception should be raised when attempting to > set an attribute with a namespace URI of '', but queries could allow > either: > > def getAttributeNS(self, namespaceURI, localName): > namespaceURI = namespaceURI or None > ... > > This isn't perfect, but would probably avoid most problems with > client code that uses ''. that sounds good to me regards -- Sylvain Thenault LOGILAB http://www.logilab.org From tpassin@home.com Fri Dec 14 16:55:49 2001 From: tpassin@home.com (Thomas B. Passin) Date: Fri, 14 Dec 2001 11:55:49 -0500 Subject: [XML-SIG] DOM test failures References: <200112141606.fBEG6Eu01900@mira.informatik.hu-berlin.de> Message-ID: <004501c184c0$2f5a2a30$7cac1218@cj64132b> [Martin v. Loewis] > With the changes to 4DOM a few weeks ago, a number of dom test cases > stopped working now. I've corrected some occurrences of empty > namespaces, but some of the remaining errors indicate genuine bugs in > the implementation. > > For example, in test_node, the following sequence is executed > > p = doc.createElement('PARENT') > if p.localName != None: > tester.error('Error getting localName') > > This test now fails, as localName is "PARENT". That appears to be in > clear violation of DOM level 2, which says > I agree with the other comments about this, and I was thinking that this construction is said to be better (wouldn't really affect anything here, but for future reference): if p.localName is not None: Thoughts? Cheers, Tom P From rsalz@zolera.com Fri Dec 14 16:59:15 2001 From: rsalz@zolera.com (Rich Salz) Date: Fri, 14 Dec 2001 11:59:15 -0500 Subject: [XML-SIG] Reconsidering NamespaceErr on '' and None References: <3C1A21B1.73BAD938@zolera.com> <3C1A26E4.230620F3@zolera.com> <15386.10426.375149.478804@grendel.zope.com> Message-ID: <3C1A2FE3.8598DA61@zolera.com> +1 ! > Here's an idea: the exception should be raised when attempting to > set an attribute with a namespace URI of '', but queries could allow > either: > > def getAttributeNS(self, namespaceURI, localName): > namespaceURI = namespaceURI or None -- Zolera Systems, Your Key to Online Integrity Securing Web services: XML, SOAP, Dig-sig, Encryption http://www.zolera.com From martin@v.loewis.de Fri Dec 14 17:01:04 2001 From: martin@v.loewis.de (Martin v. Loewis) Date: Fri, 14 Dec 2001 18:01:04 +0100 Subject: [XML-SIG] DOM test failures In-Reply-To: (message from Sylvain Thenault on Fri, 14 Dec 2001 17:17:45 +0100 (CET)) References: Message-ID: <200112141701.fBEH14Q02286@mira.informatik.hu-berlin.de> > You are right, in the sense that the code violate the DOM2 spec, but I > think the code have the _big_ advantage to allow dom tree manipulations > without knowing if the dom tree have been created using the NS interface = > or not. I think we must distinguish a number of use cases here: - the DOM tree is created through an XML parser, through xml.dom.ext.reader. I definitely agree that the user should be able to use both NS and non-NS API afterwards. I also don't think this would violate the DOM spec, since everything that the reader does is out of scope of the spec, anyway. - the application has created nodes explicitly through the DOM API. In this case, the DOM mandates that .nodeName, .name are synchronized with .localName and .prefix. The big advantage that you see is mandated by the DOM. - the application creates nodes through the level 1 API. The DOM mandates that the level 2 attributes are all null, yet you claim that they ought to be synchronized. In what way? And why is this a big advantage?=20 Just notice that the current CVS also gets it wrong: >>> import xml.dom.ext.reader.Sax2 >>> d=3Dxml.dom.ext.reader.Sax2.FromXml("") >>> d.createElement("my:foo") Traceback (most recent call last): File "", line 1, in ? File "/usr/local/lib/python2.2/site-packages/_xmlplus/dom/Document.py", l= ine 88, in createElement return self.createElementNS(EMPTY_NAMESPACE,tagname) File "/usr/local/lib/python2.2/site-packages/_xmlplus/dom/Document.py", l= ine 165, in createElementNS raise NamespaceErr() xml.dom.NamespaceErr: Ung=FCltige oder unerlaubte Namespace-Operation. Using the non-NS API, it should be possible to create an element whose name has a colon in it, yet the implementation refuses that. Regards, Martin From Alexandre.Fayolle@logilab.fr Fri Dec 14 17:01:44 2001 From: Alexandre.Fayolle@logilab.fr (Alexandre Fayolle) Date: Fri, 14 Dec 2001 18:01:44 +0100 (CET) Subject: [XML-SIG] Re: DOM test failures In-Reply-To: <200112141606.fBEG6Eu01900@mira.informatik.hu-berlin.de> Message-ID: At first sight I'd say you're right, and that I was a bit quick when delegating the calls of the non NS methods to the NS methods in 4DOM. I don't have time to look into this right now, but I'll do so on monday. Alexandre From Juergen Hermann" Message-ID: On Fri, 14 Dec 2001 11:59:15 -0500, Rich Salz wrote: +2 ;) >+1 ! >> Here's an idea: the exception should be raised when attempting to >> set an attribute with a namespace URI of '', but queries could allow >> either: >> >> def getAttributeNS(self, namespaceURI, localName): >> namespaceURI =3D namespaceURI or None > >-- >Zolera Systems, Your Key to Online Integrity >Securing Web services: XML, SOAP, Dig-sig, Encryption >http://www.zolera.com > >_______________________________________________ >XML-SIG maillist - XML-SIG@python.org >http://mail.python.org/mailman/listinfo/xml-sig Ciao, J=FCrgen From Alexandre.Fayolle@logilab.fr Fri Dec 14 17:04:00 2001 From: Alexandre.Fayolle@logilab.fr (Alexandre Fayolle) Date: Fri, 14 Dec 2001 18:04:00 +0100 (CET) Subject: [XML-SIG] Reconsidering NamespaceErr on '' and None In-Reply-To: <3C1A26E4.230620F3@zolera.com> Message-ID: On Fri, 14 Dec 2001, Rich Salz wrote: > I will answer my own question. > > cDomlette uses empty string for the no namespace > > I have to call getAttributeNS('', 'id') I think the 4Suite team plans to have cDomlette use None in the next release of 4Suite. I'm not sure what the status of the current cvs version is. Alexandre Fayolle -- LOGILAB, Paris (France). http://www.logilab.com http://www.logilab.fr http://www.logilab.org Narval, the first software agent available as free software (GPL). From martin@v.loewis.de Fri Dec 14 17:04:52 2001 From: martin@v.loewis.de (Martin v. Loewis) Date: Fri, 14 Dec 2001 18:04:52 +0100 Subject: [XML-SIG] RE: sax/drivers2/drv_sgmlop.py In-Reply-To: (message from Sylvain Thenault on Fri, 14 Dec 2001 17:30:39 +0100 (CET)) References: Message-ID: <200112141704.fBEH4qm02316@mira.informatik.hu-berlin.de> > Sorry if I can't commit this, but I have a problem with sourceforge: > I can login to the web site but as soon as I try to use the CVS, I just > obtain the following message: > > Could not chdir to home directory /home/users/s/sy/syt: No such file or > directory > > Anybody has an idea for this pb ? I see you found a solution for it; thanks for fixing my buglet. Regards, Martin From martin@v.loewis.de Fri Dec 14 17:12:00 2001 From: martin@v.loewis.de (Martin v. Loewis) Date: Fri, 14 Dec 2001 18:12:00 +0100 Subject: [XML-SIG] DOM test failures In-Reply-To: <004501c184c0$2f5a2a30$7cac1218@cj64132b> (tpassin@home.com) References: <200112141606.fBEG6Eu01900@mira.informatik.hu-berlin.de> <004501c184c0$2f5a2a30$7cac1218@cj64132b> Message-ID: <200112141712.fBEHC0Z02349@mira.informatik.hu-berlin.de> > I agree with the other comments about this, and I was thinking that this > construction is said to be better (wouldn't really affect anything here, but > for future reference): > > if p.localName is not None: > > Thoughts? Well, the test still fails with that change, doesn't it? Regards, Martin From Sylvain.Thenault@logilab.fr Fri Dec 14 17:23:57 2001 From: Sylvain.Thenault@logilab.fr (Sylvain Thenault) Date: Fri, 14 Dec 2001 18:23:57 +0100 (CET) Subject: [XML-SIG] DOM test failures In-Reply-To: <200112141701.fBEH14Q02286@mira.informatik.hu-berlin.de> Message-ID: On Fri, 14 Dec 2001, Martin v. Loewis wrote: > > You are right, in the sense that the code violate the DOM2 spec, but I > > think the code have the _big_ advantage to allow dom tree manipulations > > without knowing if the dom tree have been created using the NS interface > > or not. > > I think we must distinguish a number of use cases here: > > - the DOM tree is created through an XML parser, through > xml.dom.ext.reader. I definitely agree that the user should be able > to use both NS and non-NS API afterwards. I also don't think this > would violate the DOM spec, since everything that the reader does > is out of scope of the spec, anyway. > > - the application has created nodes explicitly through the DOM API. > In this case, the DOM mandates that .nodeName, .name are > synchronized with .localName and .prefix. The big advantage that > you see is mandated by the DOM. > > - the application creates nodes through the level 1 API. The DOM > mandates that the level 2 attributes are all null, yet you claim > that they ought to be synchronized. In what way? And why is this > a big advantage? I think that having localName=nodeName and prefix=None when the application creates nodes through the level 1 API is easier to handle for applications which take DOM tree as input, without knowing how it have been created or if it uses xmlns or not. This is only my opinion about this pb, I won't claim this is what we have to do ! (I also think that 'specification' is stronger than 'opinion' ;) regards -- Sylvain Thenault LOGILAB http://www.logilab.org From rsalz@zolera.com Fri Dec 14 17:34:56 2001 From: rsalz@zolera.com (Rich Salz) Date: Fri, 14 Dec 2001 12:34:56 -0500 Subject: [XML-SIG] DOM test failures References: Message-ID: <3C1A3840.7D798207@zolera.com> Someone COULD use DOM Level 1 API to create a namespace-correct DOM e = createElement("foo:elt", ...) e.createAttribute("xmlns:foo", "http://example.com") but that seems highly unlikely. I'd follow Fred's suggestion and raise an error if trying to create something with a colon in the name, otherwise fall through to the Level2 routines with EMPTY_NAMESPACE. -- Zolera Systems, Your Key to Online Integrity Securing Web services: XML, SOAP, Dig-sig, Encryption http://www.zolera.com From fdrake@acm.org Fri Dec 14 17:41:37 2001 From: fdrake@acm.org (Fred L. Drake, Jr.) Date: Fri, 14 Dec 2001 12:41:37 -0500 Subject: [XML-SIG] DOM test failures In-Reply-To: <3C1A3840.7D798207@zolera.com> References: <3C1A3840.7D798207@zolera.com> Message-ID: <15386.14801.92040.721837@grendel.zope.com> Rich Salz writes: > Someone COULD use DOM Level 1 API to create a namespace-correct DOM > e = createElement("foo:elt", ...) > e.createAttribute("xmlns:foo", "http://example.com") > but that seems highly unlikely. I'd follow Fred's suggestion and raise > an error if trying to create something with a colon in the name, > otherwise fall through to the Level2 routines with EMPTY_NAMESPACE. Huh? I thought my suggestion was to raise NamespaceErr if someone tried to create a node using a *NS method with '' for the namespace URI. Creating a node with a colon in the name must be allowed for the level 1 methods. -Fred -- Fred L. Drake, Jr. PythonLabs at Zope Corporation From rsalz@zolera.com Fri Dec 14 17:46:54 2001 From: rsalz@zolera.com (Rich Salz) Date: Fri, 14 Dec 2001 12:46:54 -0500 Subject: [XML-SIG] DOM test failures References: <3C1A3840.7D798207@zolera.com> <15386.14801.92040.721837@grendel.zope.com> Message-ID: <3C1A3B0E.73659FA3@zolera.com> If it must be allowed, so be it. I was following your concept, not your literal suggestion. :) -- Zolera Systems, Your Key to Online Integrity Securing Web services: XML, SOAP, Dig-sig, Encryption http://www.zolera.com From fdrake@acm.org Fri Dec 14 17:51:10 2001 From: fdrake@acm.org (Fred L. Drake, Jr.) Date: Fri, 14 Dec 2001 12:51:10 -0500 Subject: [XML-SIG] DOM test failures In-Reply-To: References: <200112141701.fBEH14Q02286@mira.informatik.hu-berlin.de> Message-ID: <15386.15374.948162.281667@grendel.zope.com> Sylvain Thenault writes: > I think that having localName=nodeName and prefix=None when the > application creates nodes through the level 1 API is easier to handle for > applications which take DOM tree as input, without knowing how it have > been created or if it uses xmlns or not. Yeah, its easy to convince oneself of this. ;-) And this is exactly the kind of thing that makes me think that the DOM for documents processed with namespaces and DOM for docs without namespaces are simply two different beasts (possibly with a shared base). Which brings back the idea that what we need is something new. How many of us are going to be at Python 10? (Martin? Lars?) Would a BoF or DevDay session be useful? -Fred -- Fred L. Drake, Jr. PythonLabs at Zope Corporation From fdrake@acm.org Fri Dec 14 17:58:18 2001 From: fdrake@acm.org (Fred L. Drake, Jr.) Date: Fri, 14 Dec 2001 12:58:18 -0500 Subject: [XML-SIG] DOM test failures In-Reply-To: <3C1A3B0E.73659FA3@zolera.com> References: <3C1A3840.7D798207@zolera.com> <15386.14801.92040.721837@grendel.zope.com> <3C1A3B0E.73659FA3@zolera.com> Message-ID: <15386.15802.340261.980471@grendel.zope.com> Rich Salz writes: > If it must be allowed, so be it. > I was following your concept, not your literal suggestion. :) I'll say! I was quite shocked when I saw your message; it took a minute to figure out what you were referring to! Now, were there a way to distinguish between DOM's built with and without namespaces, it might be a good idea to raise an exception if a colon would appear in a localName for a namespace-mode DOM. (Hmm... doc.documentElement.localName should be true in namespace mode, and false otherwise, but I'm not sure that's how all the DOM implementations actually work.) -Fred -- Fred L. Drake, Jr. PythonLabs at Zope Corporation From martin@v.loewis.de Fri Dec 14 18:21:40 2001 From: martin@v.loewis.de (Martin v. Loewis) Date: Fri, 14 Dec 2001 19:21:40 +0100 Subject: [XML-SIG] DOM test failures In-Reply-To: <15386.15374.948162.281667@grendel.zope.com> (fdrake@acm.org) References: <200112141701.fBEH14Q02286@mira.informatik.hu-berlin.de> <15386.15374.948162.281667@grendel.zope.com> Message-ID: <200112141821.fBEILeL02569@mira.informatik.hu-berlin.de> > Which brings back the idea that what we need is something new. How > many of us are going to be at Python 10? (Martin? Lars?) Would a > BoF or DevDay session be useful? I'm not convinced that we need something new (although Lars seems to think so). Something new would have all the disadvantages of the DOM, plus - it would come with no documentation whatsoever (not even a spec to refer to), - it would have buggy implementations, and people would change it forth and back, - people would complain that something they want to do with it cannot be done (like: knowing where exactly the entity references where in the original text) - if it is changed to do these things, others will complain that it is too complicated to use. - after a while, it would become unmaintained, and - nobody new to Python and XML could relate to it. [Please understand that I'm not talking about some specific library already in existence - this is idle speculation, and about the future :-] I think PyXML has seen a number of such libraries in its life, the last one that is still incorporated is qp_xml (is anybody using that?). I'll be at Python 10, and I'd certainly go to a BoF seession on the new Python/XML object API. Maybe we can produce a requirements list. Regards, Martin From uche.ogbuji@fourthought.com Sun Dec 16 21:05:40 2001 From: uche.ogbuji@fourthought.com (Uche Ogbuji) Date: Sun, 16 Dec 2001 14:05:40 -0700 Subject: [XML-SIG] New 4Suite project on SourceForge Message-ID: <3C1D0CA4.74CB0658@fourthought.com> Mike Brown set us up on SourceForge: https://sourceforge.net/projects/foursuite/ The project name is "4Suite", though we were not allowed to use that as the directory name. Please use the bug tracker there from now on rather than PyXML's. Thanks. -- Uche Ogbuji Principal Consultant uche.ogbuji@fourthought.com +1 303 583 9900 x 101 Fourthought, Inc. http://Fourthought.com 4735 East Walnut St, Boulder, CO 80301-2537, USA XML strategy, XML tools (http://4Suite.org), knowledge management From horst@freedict.de Mon Dec 17 07:15:56 2001 From: horst@freedict.de (horst@freedict.de) Date: Mon, 17 Dec 2001 08:15:56 +0100 (CET) Subject: [XML-SIG] Speeding up DOM reading Message-ID: <200112170716.fBH7FxM18290@eaglesnest.mceggman> Hello, I finally figured out how to get / set attributes - use name spaces. But things work fine, and I was able to turn on validation, which turns out to be fairly slow (The DTD is large (TEI)). Reading the documentation, it appreas that there are differnt modules around for reading in (and validate) XML, but I never found a hint on how to do it. What should I do instead of: from xml.dom import Node, Comment # Node must be imported first from xml.dom import ext from xml.dom.ext.reader import Sax2 from xml import xpath from xml.xpath import Util from Ft.Lib.pDomlette import PyExpatReader from StringIO import StringIO DOM1 = Sax2.FromXmlStream(xmlfile, validate = 1, catName= "/var/lib/sgml/freedict/public.soc") thanks, Horst -- Horst@freedict.de Horst Eyermann Germany You need a dictionary? - visit http://www.freedict.de for free (GPL) dictionaries (unix; windows work in progress) For windows, visit http://www.freedict.de/wbuch A article (in German) about dictionary efforts on the net http://www.heise.de/tp/deutsch/inhalt/on/5927/1.html From whw@njtnc.com Mon Dec 17 14:15:52 2001 From: whw@njtnc.com (whw@njtnc.com) Date: Mon, 17 Dec 2001 09:15:52 -0500 Subject: [XML-SIG] Indole Message-ID: This is a multi-part message in MIME format. --Z_MULTI_PART_MAIL_BOUNDAEY_S Content-Type: text/plain Content-Transfer-Encoding: base64 RGVhciBNYW5hZ2VyOg0KDQogVGhhbmtzIGluIGFkdmFuY2UgZm9yIHlvdXIgaW50ZXJlc3Qs DQoNCiBXZSBtYWlubHkgcHJvZHVjZXMgYXJlIEluZG9sZSBzZXJpZXMgKGluZG9sZSwgIDMs MyctTWV0aHlsZW5lYmlzaW5kb2xlICAsDQo1LW1ldGhveHkgaW5kb2xlKQ0KDQogSW5kb2xl ICAgID45OSUgICAgICANCiAgIFBPV0RFUiAgICBsb3NzIG9uIGRyeWluZzogMSUgICANCiAg ICAgICAgICAgICB3aGl0ZSBzbGlnaHQgeWVsbG93IGNyeXN0YWxsaW5lIHBvd2Rlcg0KDQog ICBDUllTVEFMICAgbWVsdGluZyBwb2ludDogNTEtNTMNCiAgICAgICAgICAgICBsb3NzIG9u IGRyeWluZzogMC41JSANCiAgICAgICAgICAgICB3aGl0ZSBzaGVldGZvcm0gY3J5c3RhbA0K DQoNCiAzLDMnLU1ldGh5bGVuZWJpc2luZG9sZQ0KICAgTWVsdGluZyBwb2ludDogMTY1oeZ+ MTY2oeYNCiAgIEFwcGVhcmFuY2U6IEJlIHNpbWlsYXIgdG8gd2hpdGUgY3J5c3RhbGxpbmUg cG93ZGVyDQogICBDb250ZW50OiCh3SA5OSUNCiAgIExvc3Mgb24gZHJ5aW5nOiCh3DEuMCUN Cg0KDQogSWYgeW91IGFyZSBpbnRlcmVzdGVkIGluIHRoaXMgcGxlYXNlIGNvbWUgbXkgV2Vi DQooaHR0cDovL25qcmVkbGluZS50b3AyNjMubmV0KSBvciBtYWlsIHVzLg0KDQoNCk5hbmpp bmcgUmVkbGluZSBDby4sIEx0ZC4NClRlbDogKzg2LTI1LTMyNjAwMTkgTXIuIFd1DQpGYXg6 ICs4Ni0yNS0zMzA1NTc3DQpFLW1haWw6ICB3aHdAbmp0bmMuY29tIA0KaHR0cDovL25qcmVk bGluZS50b3AyNjMubmV0DQoNCgkJCQlyZWRsaW5lICAgICAgICA= --Z_MULTI_PART_MAIL_BOUNDAEY_S-- From Alexandre.Fayolle@logilab.fr Mon Dec 17 14:25:28 2001 From: Alexandre.Fayolle@logilab.fr (Alexandre Fayolle) Date: Mon, 17 Dec 2001 15:25:28 +0100 (CET) Subject: [XML-SIG] Speeding up DOM reading In-Reply-To: <200112170716.fBH7FxM18290@eaglesnest.mceggman> Message-ID: On Mon, 17 Dec 2001 horst@freedict.de wrote: > Hello, > > I finally figured out how to get / set attributes - use name spaces. But > things work fine, and I was able to turn on validation, which turns out > to be fairly slow (The DTD is large (TEI)). > > Reading the documentation, it appreas that there are differnt modules > around for reading in (and validate) XML, but I never found a hint on > how to do it. What should I do instead of: Well you have a lot of unrequired imports in the sample. The only one you need is from "xml.dom.ext.reader import Sax2" However, il you need speed and can trade it for a somehow less dom compliant implementation, you may want to try (since you seem to have 4Suite installed): from Ft.Lib.pDomlette import pDomletteReader doc = pDomletteReader.PyExpatReader().fromStream(xmlfile, validate = 1, catName= "/var/lib/sgml/freedict/public.soc") Alexandre Fayolle -- LOGILAB, Paris (France). http://www.logilab.com http://www.logilab.fr http://www.logilab.org Narval, the first software agent available as free software (GPL). From larsga@garshol.priv.no Mon Dec 17 15:16:58 2001 From: larsga@garshol.priv.no (Lars Marius Garshol) Date: 17 Dec 2001 16:16:58 +0100 Subject: [XML-SIG] xmlproc, Lexical handler and CDATA In-Reply-To: References: Message-ID: (Sorry about the late response. I've been two weeks in Florida, in connection with XML 2001.) * Sylvain Thenault | | here is a patch which fix the bug in xmlproc with the | lexical_handler enabled. Actually, it's not a bug, it's a missing feature, and one that was left out on purpose. | It just call startCDATA and endCDATA on the lexical handler before | and after calling characters on the content handlers. | | I can commit this but I would like to have Lars opinion I'm not very keen on this, to be honest. It slows xmlproc down, and the only thing we achieve by doing so is to provide people with information for which they hardly ever have any appropriate use anyway. If the consensus is that we should have this I can apply the patch, but personally I think we're better off without this "feature". (BTW, I don't think there's anything wrong with your code, Sylvain, it's just that I don't think this will do anyone much good.) --Lars M. From Sylvain.Thenault@logilab.fr Mon Dec 17 15:48:50 2001 From: Sylvain.Thenault@logilab.fr (Sylvain Thenault) Date: Mon, 17 Dec 2001 16:48:50 +0100 (CET) Subject: [XML-SIG] xmlproc, Lexical handler and CDATA In-Reply-To: Message-ID: On 17 Dec 2001, Lars Marius Garshol wrote: > > (Sorry about the late response. I've been two weeks in Florida, in > connection with XML 2001.) > > * Sylvain Thenault > | > | here is a patch which fix the bug in xmlproc with the > | lexical_handler enabled. > > Actually, it's not a bug, it's a missing feature, and one that was > left out on purpose. In my opinion it's a bug since xmlproc implements the LexicalHandler property which should call startCDATA and endCDATA. So when you enable this feature and no exception is raised, you are waiting for a "well-known" behaviour. > | It just call startCDATA and endCDATA on the lexical handler before > | and after calling characters on the content handlers. > | > | I can commit this but I would like to have Lars opinion > > I'm not very keen on this, to be honest. It slows xmlproc down, and > the only thing we achieve by doing so is to provide people with > information for which they hardly ever have any appropriate use > anyway. How important is the slow down ? (if you don't know, I can do a little benchmark) For instance, I have recently written a python program which colorize XML files by formatting them using HTML or DOCBOOK. This kind of stuff _need_ this callback. > If the consensus is that we should have this I can apply the patch, > but personally I think we're better off without this "feature". That's true that only a few applications care about this callback, but if the speed down is not too much important, I believe we should have it in xmlproc which is one of the most complete parser in pyxml (in term of SAX callbacks handled) regards -- Sylvain Thenault LOGILAB http://www.logilab.org From bogus@does.not.exist.com Mon Dec 17 23:28:57 2001 From: bogus@does.not.exist.com (Andrew Kuchling) Date: Mon, 17 Dec 2001 18:28:57 -0500 Subject: [XML-SIG] Taking over the xml-sig mailing list Message-ID: I no longer have time to do much (er... any) Python XML hacking, and so running the XML-SIG list has become a time-consuming chore with no benefit. Does anyone want to take over responsibility for the list and SIG? (There's not a lot of work involved: deleting the odd spam is the bulk of it, and very rarely an actual user needs help with the list.) --amk From martin@v.loewis.de Mon Dec 17 08:48:39 2001 From: martin@v.loewis.de (Martin v. Loewis) Date: Mon, 17 Dec 2001 09:48:39 +0100 Subject: [XML-SIG] Speeding up DOM reading In-Reply-To: <200112170716.fBH7FxM18290@eaglesnest.mceggman> (horst@freedict.de) References: <200112170716.fBH7FxM18290@eaglesnest.mceggman> Message-ID: <200112170848.fBH8mdh01432@mira.informatik.hu-berlin.de> > Reading the documentation, it appreas that there are differnt modules > around for reading in (and validate) XML, but I never found a hint on > how to do it. What should I do instead of: Why do you want to do something different? You have a choice of different DOM implementations: - 4DOM (which you use currently, pure-Python, full-featured, fairly slow) - minidom (pure-Python, somewhat faster than 4DOM) - pDomlette (if you have 4Suite installed, pure-Python, similar to minidom) - cDomlette (4Suite, C, fairly fast, read-only) and you have a choice of different XML parsers - xmlproc (validating, pure Python, fairly slow) - expat (non-validating, C, fairly fast) - sgmlop (quite fast, restricted support for XML only) and you have a choice of XML parser APIs - native parser interface (fairly fast, requires special support) - SAX (slower, allows to implement driver-independent readers) Pick one of each group, and we can tell you - whether this combination is supported - how to build a DOM tree using this combination (if supported) If you want a super-fast validating XML parser with a super-fast complete Level 2 DOM implementation: that is not supported in PyXML. You'll have to compromise, that's why there are so many options. HTH, Martin From uche.ogbuji@fourthought.com Tue Dec 18 00:53:36 2001 From: uche.ogbuji@fourthought.com (Uche Ogbuji) Date: Mon, 17 Dec 2001 17:53:36 -0700 Subject: [XML-SIG] Pyana 0.2.0 released In-Reply-To: Message from "Brian Quinlan" of "Wed, 12 Dec 2001 22:43:10 PST." <006101c183a1$71bd9df0$445d4540@Dell2> Message-ID: <200112180053.fBI0raf31725@localhost.localdomain> > PIRXX is focused on providing Xerces XML services to Python. The curren= t > release of PIRXX provides SAX2 interfaces but I believe that J=FCrgen i= s > working on DOM support. > = > So, right now, Pyana is probably your best bet for high-performance XSL= T > processing in Python while PIRXX offers Xerces SAX2 interfaces. Are you basing this on actual benchmarks? In particular, I'd be surprise= d if = Pyana was faster overall than current CVS of 4XSLT, Since Xalan isn't, as= I = measure it. -- = Uche Ogbuji Principal Consultant uche.ogbuji@fourthought.com +1 303 583 9900 x 101 Fourthought, Inc. http://Fourthought.com = 4735 East Walnut St, Boulder, CO 80301-2537, USA XML strategy, XML tools (http://4Suite.org), knowledge management From rsalz@zolera.com Tue Dec 18 01:21:37 2001 From: rsalz@zolera.com (Rich Salz) Date: Mon, 17 Dec 2001 20:21:37 -0500 Subject: [XML-SIG] Taking over the xml-sig mailing list References: Message-ID: <3C1E9A21.D6C487F@zolera.com> I'm happy to do it. /r$ -- Zolera Systems, Securing web services (XML, SOAP, Signatures, Encryption) http://www.zolera.com From brian@sweetapp.com Tue Dec 18 02:41:10 2001 From: brian@sweetapp.com (Brian Quinlan) Date: Mon, 17 Dec 2001 18:41:10 -0800 Subject: [XML-SIG] Pyana 0.2.0 released In-Reply-To: <200112180053.fBI0raf31725@localhost.localdomain> Message-ID: <003501c1876d$746c1570$445d4540@Dell2> This is a multi-part message in MIME format. ------=_NextPart_000_0036_01C1872A.6648D570 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Uche Ogbuji wrote: > > PIRXX is focused on providing Xerces XML services to Python. The current > > release of PIRXX provides SAX2 interfaces but I believe that = J=FCrgen is > > working on DOM support. > > > > So, right now, Pyana is probably your best bet for high-performance XSLT > > processing in Python while PIRXX offers Xerces SAX2 interfaces. >=20 > Are you basing this on actual benchmarks? In particular, I'd be surprised > if Pyana was faster overall than current CVS of 4XSLT, Since Xalan isn't, > as I measure it. I am basing this on the timings of largish transformations that I was doing around 2 months ago. Since then I haven't really compared them and I have never run any formal benchmarks.=20 Note that one of the big problems with timing Xalan from the command line is that it is very slow to load, especially on windows. I just timed "import Pyana" on my PIV 1.7GHz and it took 0.74s. But the beauty of using Pyana instead of something like "popen('xalan ..." is that the load time becomes a one-time cost for the application. For fun, I just downloaded: http://www.datapower.com/XSLTMark/download/XSLTMark_2_1_0.zip And wrote the attached script. I did this without expending any effort trying to understand the benchmark suite; I just test each .xml/.xsl pair. Notice that all of the source/stylesheet documents are small so the advantage should go to 4suite. I don't want to get 4suite from CVS so why don't you get Pyana: http://prdownloads.sourceforge.net/pyana/Pyana-0.2.0.win32-py2.1.exe (very easy Windows installer for Python 2.1 [you can probably figure out how to transform that URL for Python 2.0 ;-)]) Then you can run this script against Pyana and (with a few tweeks) against 4suite. Here are Pyana's results on my machine: C:\Dev\Me\Pyana\pyana\Test>python benchmark.py time to import Pyana: 0.0785s # Cached by Windows? time to execute axis: 0.0080s (675 bytes of output) time to execute bottles: 0.0145s (12075 bytes of output) time to execute brutal: 0.0156s (4191 bytes of output) time to execute chart: 0.0110s (3837 bytes of output) time to execute current: 0.0060s (320 bytes of output) time to execute game: 0.0080s (457 bytes of output) time to execute html: 0.0066s (504 bytes of output) time to execute identity: 0.0043s (218 bytes of output) time to execute inventory: 0.0088s (2070 bytes of output) time to execute metric: 0.0132s (640 bytes of output) time to execute number: 0.0074s (788 bytes of output) time to execute oddtemplate: 0.0071s (173 bytes of output) time to execute priority: 0.0083s (587 bytes of output) time to execute products: 0.0085s (439 bytes of output) time to execute queens: 0.0900s (1772 bytes of output) time to execute tower: 0.1555s (70729 bytes of output) time to execute trend: 0.0513s (8382 bytes of output) time to execute union: 0.0058s (128 bytes of output) time to execute xpath: 0.0062s (225 bytes of output) time to execute xslbench1: 0.0204s (7011 bytes of output) Cheers, Brian ------=_NextPart_000_0036_01C1872A.6648D570 Content-Type: text/plain; name="benchmark.py" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="benchmark.py" import time import os # Find all .xsl/.xml pairs testcase_directory =3D r'C:\Dev\Me\Pyana\xsltmark\testcases' testcase_files =3D os.listdir(testcase_directory) testcase_files.sort() last_name =3D None tests =3D [] for file in testcase_files: name, ext =3D os.path.splitext(file) if ext =3D=3D '.xsl': if last_name =3D=3D name: tests.append(name) last_name =3D None elif ext =3D=3D '.xml': last_name =3D name else: last_name =3D None print 'time to import Pyana:', startTime =3D time.clock() import Pyana print "%0.4fs" % (time.clock() - startTime) for test in tests: print 'time to execute %s:' % test, startTime =3D time.clock() length =3D len(Pyana.transformToString(source =3D = Pyana.URI(os.path.join(testcase_directory, test + '.xml')), style =3D = Pyana.URI(os.path.join(testcase_directory, test + '.xsl')))) print "%0.4fs (%d bytes of output)" % (time.clock() - startTime, = length) ------=_NextPart_000_0036_01C1872A.6648D570-- From astar@spamcop.net Tue Dec 18 06:20:21 2001 From: astar@spamcop.net (Max M. Stalnaker) Date: Mon, 17 Dec 2001 22:20:21 -0800 Subject: [XML-SIG] possible bug in DOM Message-ID: Problem summary: DOM hangs on large document Consider a set of src files of code to be transformed into xml docs and manipulated, then written out again. My initial attempt is to break src files into statements. The statements become RawText attributes of the Statement children of ProgramName. This seems to actually work on one small file, but not on one large file. A large file is a half-meg of text. The pecularity that seems to indicate a bug in system software is that varying the amount of free memory, as by closing other program, cause slight variation in the location in the src file on which my code hangs. I am using pyxml 0.6.6 and python 2.1.1. I am running on win2k box with 256M memory. Memory usage is 190 to 230meg on failure. Please advise as to what procedure to follow to transform this into a usefully reported bug. From martin@v.loewis.de Tue Dec 18 07:07:02 2001 From: martin@v.loewis.de (Martin v. Loewis) Date: Tue, 18 Dec 2001 08:07:02 +0100 Subject: [XML-SIG] possible bug in DOM In-Reply-To: References: Message-ID: <200112180707.fBI772501298@mira.informatik.hu-berlin.de> > Please advise as to what procedure to follow to transform this into a > usefully reported bug. I'd say it is rather unlikely that the DOM implementation "hangs". There is a slight chance that you run into an expensive algorithm, so I'd propose to let it sit for a day or so to support the theory that it hangs. It may also be that it is running out of memory, and that Windows starts thrashing. If you can, it would be quite useful if you could attach with a C debugger to a debug build of Python, to see what it does when it appears to hang. If that is not possible, pressing Ctrl-C when Python runs in a cmd.exe might give a useful backtrace if you manage to interrupt Python that way. Regards, Martin From akuchlin@mems-exchange.org Tue Dec 18 16:54:12 2001 From: akuchlin@mems-exchange.org (Andrew Kuchling) Date: Tue, 18 Dec 2001 11:54:12 -0500 Subject: [XML-SIG] Taking over the xml-sig mailing list In-Reply-To: <3C1E9A21.D6C487F@zolera.com> References: <3C1E9A21.D6C487F@zolera.com> Message-ID: <20011218165412.GB16553@ute.mems-exchange.org> On Mon, Dec 17, 2001 at 08:21:37PM -0500, Rich Salz wrote: >I'm happy to do it. Accepted; thanks! --amk From market@now.net.cn Tue Dec 18 15:43:40 2001 From: market@now.net.cn (Today's Network) Date: 18 Dec 2001 15:43:40 -0000 Subject: [XML-SIG] ×¢²áÓòÃû¡¢ÐéÄâÖ÷»ú´óÓŻݣ¡Ëʹμ¶ÓòÃû£¬ËÍÉÌÓÃÓÊÏ䣬Ãâ·ÑÊÔÓÃ15 Message-ID: <20011218154340.22392.qmail@localhost.localdomain> ×𾴵Ŀͻ§£º ÄúºÃ£¡ ÍøÂçʱ´ú(http://www.now.net.cn)ÏòÄúÌṩ´óÓŻݣº×¢²áÓòÃû¡¢×âÓÃÖ÷»ú£¬Ëʹμ¶ÓòÃû£¬ËÍÉÌÓÃÓÊÏ䣬Ãâ·ÑÊÔÓÃ150M¿Õ¼ä£¡£¡ (¿Õ¼ä¿Éʵʱ¿ªÍ¨Ãâ·ÑÊÔÓÃ15Ìì!) ¡îÓòÃû×¢²á ´øVDNSµÄ¹ú¼ÊÓòÃûÖ»Ðè100Ôª/Ä꣬ÇÒËÍÈý¸ö´Î¼¶ÓòÃû! Ò»¸öÓòÃû¶à¸öÍøÕ¾£¬¿Õ¼äËæÒâÖ¸Ïò¡¢ËæÒâ´æ·Å£¬Ê¹Äú³ÉΪÕâ¸öÓòµÄÕæÕýÓµÓÐÕß¡£ ¼ÓÒ»¸ö´Î¼¶ÓòÃû½öÒ»´ÎÐÔÊÕ·Ñ15Ôª£¬Ò»¸öÓòÃû½¨¶àÉÙ¸öÍøÕ¾¶¼¿ÉÒÔ! ¡îÐéÄâÖ÷»ú£º ¡¡¡¡È«ÃæÖ§³ÖASP¡¢PHP ¡¢JSP¡¢PERL¡¢CGI£¬ÍøÉÏÉÌÎñÓÉ´Ë¿ªÊ¼£¡´Ó300ÔªÆ𣬶àÖÖ¿Õ¼äÈÎÄúÑ¡Ôñ£¬È«²¿ËÍÄãÓòÃûϵÄPOPÉÌÓÃÓʼþÕʺš£ ¡îÏà¹ØÒµÎñ£ºÓòÃû×¢²á¡¢¿Õ¼äÉêÇë¡¢Ö÷»úÍйܡ¢Óʼþϵͳ¡¢ÍøÕ¾½¨ÉèµÈ¡£ ¡î¡î¡î¡î³ÏÕ÷´úÀí¡î¡î¡î¡î. »¶Ó­Äú·ÃÎÊhttp://www.now.net.cn ÎÒÃÇÒ»Ö±ÒÔרҵ¡¢ÓÅÖÊ¡¢ÁìÏÈΪ×ÚÖ¼£¬ÈȳÏΪÄú·þÎñ! Ö麣Ì컥¿Æ¼¼ÓÐÏÞ¹«Ë¾ 0756--2125583 2125593 2125523 2252872 0756--2236575 2125594 2216376 ´«Õ棺 0756--2229669 °´ÕÕ¹ú¼Ê¹ßÀý£¬Ö»Òª±¾Óʼþ°üÀ¨¡°ÁªÏµÐÅÏ¢¡±ºÍ¡°ÒƳýÐÅÏ¢¡±£¬¾Í²»Ó¦±»¿´×öÀ¬»øÐżþ¡£Èç¹ûÄúÏëÎÒÃÇ´ÓÓʼþÁбíÖÐÒƳýÄúµÄÓʼþµØÖ·£¬ÇëÓÃÄúÏëÒƳýµÄÐÅÏäµã´Ë·¢ÐÅ:webmaster@now.net.cn£¬ÐżþÖ÷Ì⣺¡°Remove"£¬Èç¹û±¾Óʼþ¸øÄú´øÀ´Á˲»±ã£¬ÎÒÃÇÉî±íǸÒâ¡£ From uche.ogbuji@fourthought.com Tue Dec 18 19:27:29 2001 From: uche.ogbuji@fourthought.com (Uche Ogbuji) Date: Tue, 18 Dec 2001 12:27:29 -0700 Subject: [XML-SIG] Pyana 0.2.0 released In-Reply-To: Message from "Brian Quinlan" of "Mon, 17 Dec 2001 18:41:10 PST." <003501c1876d$746c1570$445d4540@Dell2> Message-ID: <200112181927.fBIJRTZ02513@localhost.localdomain> > This is a multi-part message in MIME format. > > ------=_NextPart_000_0036_01C1872A.6648D570 > Content-Type: text/plain; > charset="iso-8859-1" > Content-Transfer-Encoding: quoted-printable > > Uche Ogbuji wrote: > > > > PIRXX is focused on providing Xerces XML services to Python. The > current > > > release of PIRXX provides SAX2 interfaces but I believe that = > J=FCrgen > is > > > working on DOM support. > > > > > > So, right now, Pyana is probably your best bet for high-performance > XSLT > > > processing in Python while PIRXX offers Xerces SAX2 interfaces. > >=20 > > Are you basing this on actual benchmarks? In particular, I'd be > surprised > > if Pyana was faster overall than current CVS of 4XSLT, Since Xalan > isn't, > > as I measure it. > > I am basing this on the timings of largish transformations that I was > doing around 2 months ago. Since then I haven't really compared them and > I have never run any formal benchmarks.=20 > > Note that one of the big problems with timing Xalan from the command > line is that it is very slow to load, especially on windows. I just > timed "import Pyana" on my PIV 1.7GHz and it took 0.74s. But the beauty > of using Pyana instead of something like "popen('xalan ..." is that the > load time becomes a one-time cost for the application. > > For fun, I just downloaded: > http://www.datapower.com/XSLTMark/download/XSLTMark_2_1_0.zip > > And wrote the attached script. I did this without expending any effort > trying to understand the benchmark suite; I just test each .xml/.xsl > pair. Notice that all of the source/stylesheet documents are small so > the advantage should go to 4suite. > > I don't want to get 4suite from CVS so why don't you get Pyana: No. I'm no more interested in running a benchmark between the two than you are. I have much better things to do, like actually working to improve 4suite. Therefore, I know better than to make such unsubstantiated comments as "foo is your best bet for high-performance XSLT processing". I'm sure we can all just get along: multiple XSLT implementations for Python is a Good Thing. -- Uche Ogbuji Principal Consultant uche.ogbuji@fourthought.com +1 303 583 9900 x 101 Fourthought, Inc. http://Fourthought.com 4735 East Walnut St, Boulder, CO 80301-2537, USA XML strategy, XML tools (http://4Suite.org), knowledge management From rsalz@zolera.com Tue Dec 18 20:18:29 2001 From: rsalz@zolera.com (Rich Salz) Date: Tue, 18 Dec 2001 15:18:29 -0500 Subject: [XML-SIG] Thanks! Message-ID: <3C1FA495.309D2F3E@zolera.com> Thanks to Andrew Kuchling for all his time and effort in helping the XML SIG to date. Web pages, documentation, etc. /r$ -- Zolera Systems, Your Key to Online Integrity Securing Web services: XML, SOAP, Dig-sig, Encryption http://www.zolera.com From Juergen Hermann" Message-ID: On Tue, 18 Dec 2001 12:27:29 -0700, Uche Ogbuji wrote: >No. I'm no more interested in running a benchmark between the two than= you >are. Well, _I_ am and will probably run such a benchmark in Q1/2002, then dis= s you both. ;) Ciao, J=FCrgen From brian@sweetapp.com Tue Dec 18 21:04:16 2001 From: brian@sweetapp.com (Brian Quinlan) Date: Tue, 18 Dec 2001 13:04:16 -0800 Subject: [XML-SIG] Pyana 0.2.0 released In-Reply-To: <200112181927.fBIJRTZ02513@localhost.localdomain> Message-ID: <005901c18807$8e67f210$445d4540@Dell2> Uche Ogbuji wrote: > -----Original Message----- > From: uogbuji@fourthought.com [mailto:uogbuji@fourthought.com] On Behalf > Of Uche Ogbuji > Sent: Tuesday, December 18, 2001 11:27 AM > To: brian@sweetapp.com > Cc: 'Martin v. Loewis'; xml-sig@python.org; python-list@python.org > Subject: Re: [XML-SIG] Pyana 0.2.0 released > > > This is a multi-part message in MIME format. > > > > ------=_NextPart_000_0036_01C1872A.6648D570 > > Content-Type: text/plain; > > charset="iso-8859-1" > > Content-Transfer-Encoding: quoted-printable > > > > Uche Ogbuji wrote: > > > > > > PIRXX is focused on providing Xerces XML services to Python. The > > current > > > > release of PIRXX provides SAX2 interfaces but I believe that = > > J=FCrgen > > is > > > > working on DOM support. > > > > > > > > So, right now, Pyana is probably your best bet for high-performance > > XSLT > > > > processing in Python while PIRXX offers Xerces SAX2 interfaces. > > >=20 > > > Are you basing this on actual benchmarks? In particular, I'd be > > surprised > > > if Pyana was faster overall than current CVS of 4XSLT, Since Xalan > > isn't, > > > as I measure it. > > > > I am basing this on the timings of largish transformations that I was > > doing around 2 months ago. Since then I haven't really compared them and > > I have never run any formal benchmarks.=20 > > > > Note that one of the big problems with timing Xalan from the command > > line is that it is very slow to load, especially on windows. I just > > timed "import Pyana" on my PIV 1.7GHz and it took 0.74s. But the beauty > > of using Pyana instead of something like "popen('xalan ..." is that the > > load time becomes a one-time cost for the application. > > > > For fun, I just downloaded: > > http://www.datapower.com/XSLTMark/download/XSLTMark_2_1_0.zip > > > > And wrote the attached script. I did this without expending any effort > > trying to understand the benchmark suite; I just test each .xml/.xsl > > pair. Notice that all of the source/stylesheet documents are small so > > the advantage should go to 4suite. > > > > I don't want to get 4suite from CVS so why don't you get Pyana: > > No. I'm no more interested in running a benchmark between the two than > you are. I have much better things to do, like actually working to > improve 4suite. Therefore, I know better than to make such > unsubstantiated comments as "foo is your best bet for high-performance > XSLT processing". My substantiation was my personal experience a few months ago. I also have several user testimonials stating that they are using Pyana instead of 4suite for performance reasons. One actually sent me their timings, which [at that time] demonstrated a 41x performance edge for Pyana. But, since you are being so picky, I tested the latest Pyana release (0.2.0) against the latest 4suite release (0.11.1), using the test script that I attached in the previous e-mail*: time to import Pyana (probably cached or something): 0.0916s time to import 4suite (already byte-compiled): 0.9955s Pyana: time to execute axis: 0.0093s 4suite: time to execute axis: 0.1088s Pyana: time to execute bottles: 0.0165s 4suite: time to execute bottles: 0.2519s Pyana: time to execute brutal: 0.0139s 4suite: time to execute brutal: 0.1658s Pyana: time to execute chart: 0.0122s 4suite: time to execute chart: 0.1397s Pyana: time to execute current: 0.0067s 4suite: time to execute current: 0.0520s Pyana: time to execute game: 0.0095s 4suite: time to execute game: 0.1022s Pyana: time to execute html: 0.0065s 4suite: time to execute html: 0.0491s Pyana: time to execute identity: 0.0061s 4suite: time to execute identity: 0.0121s Pyana: time to execute inventory: 0.0091s 4suite: time to execute inventory: 0.1493s Pyana: time to execute metric: 0.0114s 4suite: time to execute metric: failed! Pyana: time to execute number: 0.0089s 4suite: time to execute number: failed! Pyana: time to execute oddtemplate: 0.0099s 4suite: time to execute oddtemplate: 0.0851s Pyana: time to execute priority: 0.0095s 4suite: time to execute priority: 0.0810s Pyana: time to execute products: 0.0107s 4suite: time to execute products: 0.3034s Pyana: time to execute queens: 0.0855s 4suite: time to execute queens: 2.3471s Pyana: time to execute tower: 0.1664s 4suite: time to execute tower: 6.7971s Pyana: time to execute trend: 0.0518s 4suite: time to execute trend: 2.6534s Pyana: time to execute union: 0.0056s 4suite: time to execute union: 0.0382s Pyana: time to execute xpath: 0.0067s 4suite: time to execute xpath: 0.1720s Pyana: time to execute xslbench1: 0.0158s 4suite: time to execute xslbench1: 0.1960s Pyana total: 0.4720s 4suite total: 14.0028s The first 4suite failure was caused by this XPath: " . * 1000" The second was caused by a element. The exception says: XsltException: Illegal Element "decimal-format" in XSLT Namespace (see XSLT Spec: 2.1). I looked it up in the XSLT spec and the context seems to be appropriate. > I'm sure we can all just get along: multiple XSLT implementations for > Python is a Good Thing. Agreed Cheers, Brian Here is the 4suite code [please let me know if it can be optimized]: processor = Processor() processor.appendStylesheetUri(styleFile) processor.runUri(sourceFile) From uche.ogbuji@fourthought.com Tue Dec 18 21:26:08 2001 From: uche.ogbuji@fourthought.com (Uche Ogbuji) Date: Tue, 18 Dec 2001 14:26:08 -0700 Subject: [XML-SIG] Pyana 0.2.0 released In-Reply-To: Message from "Brian Quinlan" of "Tue, 18 Dec 2001 13:04:16 PST." <005901c18807$8e67f210$445d4540@Dell2> Message-ID: <200112182126.fBILQ8A03097@localhost.localdomain> > > > I don't want to get 4suite from CVS so why don't you get Pyana: > > > > No. I'm no more interested in running a benchmark between the two > than > > you are. I have much better things to do, like actually working to > > improve 4suite. Therefore, I know better than to make such > > unsubstantiated comments as "foo is your best bet for high-performance > > XSLT processing". > > My substantiation was my personal experience a few months ago. I also > have several user testimonials stating that they are using Pyana instead > of 4suite for performance reasons. One actually sent me their timings, > which [at that time] demonstrated a 41x performance edge for Pyana. > > But, since you are being so picky, I tested the latest Pyana release > (0.2.0) against the latest 4suite release (0.11.1), using the test > script that I attached in the previous e-mail*: Hey, reading is not such a black art, you know. I specifically said 4Suite in current CVS. We got 4XSLT to the point when it was about as fast as Saxon and Xalan before, back in the 0.10.x series, but subsequent features and changes added up significant performance hits, cuminating in the 0.11.1 release. We went back to optimizing for the next release, and have restored it to its prior snappiness. The CVS version of 4Suite is even easier to install than 0.11.1, so you must just not want to follow my challenge... -- Uche Ogbuji Principal Consultant uche.ogbuji@fourthought.com +1 303 583 9900 x 101 Fourthought, Inc. http://Fourthought.com 4735 East Walnut St, Boulder, CO 80301-2537, USA XML strategy, XML tools (http://4Suite.org), knowledge management From mal@lemburg.com Tue Dec 18 22:06:14 2001 From: mal@lemburg.com (M.-A. Lemburg) Date: Tue, 18 Dec 2001 23:06:14 +0100 Subject: [XML-SIG] Pyana 0.2.0 released References: Message-ID: <3C1FBDD6.541CDC8B@lemburg.com> Juergen Hermann wrote: > > On Tue, 18 Dec 2001 12:27:29 -0700, Uche Ogbuji wrote: > > >No. I'm no more interested in running a benchmark between the two than you > >are. > > Well, _I_ am and will probably run such a benchmark in Q1/2002, then diss > you both. ;) I love these competitions :-) In the end everybody wins because of the insights gained during the benchmark setups. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From feria@mac21.com Tue Dec 18 22:07:14 2001 From: feria@mac21.com (MAC21 Art Fair) Date: Tue, 18 Dec 2001 23:07:14 +0100 Subject: [XML-SIG] MAC21 Art Fair, Marbella 2002 Message-ID: <1808733-220011221822714750@mac21.com> This is a multi-part message in MIME format. ------=_NextPart_94915C5ABAF209EF376268C8 Content-Type: multipart/alternative; boundary="----=_NextPart_84815C5ABAF209EF376268C8" ------=_NextPart_84815C5ABAF209EF376268C8 Content-type: text/plain; charset="windows-1250" ===================================================== M A C 2 1 - 2002 International Contemporary Art Fair Feria Internacional de Arte Contemporáneo ===================================================== Contenido: 1 ................. ENGLISH TEXT 2 ................. TEXTO EN ESPAÑOL ===================================================== ___________________________________________________________ 1 ................. ENGLISH TEXT ___________________________________________________________ You can visit MAC21 - International Contemporary Art Fair www.mac21.com with complete information of 5 Edition that will take place in the Fairs and Congresses Center of Marbella (Spain), from 24 to 28 July, 2002. Galleries, conditions, application,... feria@mac21.com Moreover, information of the 4 Edition of: Art-e-mail - International Exhibition of E-mails of Artists. art-e-mail@feriadearte.com MAC21 ___________________________________________________________ 2 ................. TEXTO ESPAÑOL ___________________________________________________________ Ya puedes visitar MAC21 - Feria Internacional de Arte Contemporaneo www.mac21.com con toda la información de la 5 edicion que se celebrara en el Palacio de Ferias y Congresos de Marbella (España), del 24 al 28 de julio de 2002. Galerías, condiciones, inscripcion,... feria@mac21.com Además, información de la 4 Edición de Art-e-mail - Exposición Internacional de E-mails de Artistas. art-e-mail@feriadearte.com MAC21 |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||| Para ser borrado de futuros correos pulse el siguiente link: mailto:remove@mac21.com?subject=BORRAR y envie. Esto le removerá en forma permanente de futuros e-mails de MAC21. |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||| To be removed from future mailings simply click on this link: mailto:remove@mac21.com?subject=REMOVE and send, this will permanently remove you from all future e-mailings MAC21. |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||| ------=_NextPart_84815C5ABAF209EF376268C8 Content-Type: text/html; charset="windows-1250" Content-Transfer-Encoding: quoted-printable COMUNICADO =20 =20 =20 =20 =20 =20 =20 =20
=20
=20 = MAC21=
In= ternational=20 Contemporary Art Fair
= <= /strong>Feria=20 Internacional de Arte Contempor=E1neo <= b><= /font>
=20

Contenido:=

=20

1 = =2E ENGLISH=20 TEXT

2 =2E= TEXTO EN=20 ESPANOL

=20
1=20 =2E ENGLISH TEXT
=20

You can visit


=20 M A C 2 1
3DMAC21
International Contemporary Art Fair

with complete information of 5 Edition= that=20 will take place in the
Fairs and Congresses Center of Marbella (Spain),
from 24 to 28 July, 2002=2E

Galleries, conditions, application,=2E=2E=2E

feria@mac21=2Ecom

Moreover, information of the 4 Edition of:

Art-e-mail
International Exhibition of E-mails of Artists=2E
<= /p>

art-e-mail@mac21=2Ecom

MA= C21

2=20 =2E TEXTO ESPANOL
=20

Ya= puedes=20 visitar

3DMAC21
M=20= A C 2 1
 3DMAC21
Feria Internacional de Arte Contemporaneo

co= n toda la=20 informaci=F3n de la 5 edicion que se celebrara en el Palacio de Ferias=20 y Congresos de Marbella (Espana),
del 24 al 28 de julio de 2002=2E

Galer=EDas,=20 condiciones, inscripcion,=2E=2E=2E

feria@mac21=2Ecom

Ade= m=E1s, informaci=F3n=20 de la 4 Edici=F3n de

Art-e-mail
Exposici=F3n Internacional de E-mails de Artistas=2E

art-e-mail@mac21=2Ec= om

MA= C21= =20

=20

Para=20 ser borrado de futuros correos pulse el siguiente link:
BORRAR
y envie=2E Esto le remover=E1 en forma permanente de futuros e-mai= ls de MAC21=2E

=20

=20

To be removed from future mailings simply click on this link: REMOVE
and send, this will permanently remove you from all future e-ma= ilings=20 MAC21=2E

------=_NextPart_84815C5ABAF209EF376268C8-- ------=_NextPart_94915C5ABAF209EF376268C8 Content-Type: application/octet-stream; name="feria_palacio.jpg" Content-Transfer-Encoding: base64 Content-Description: feria_palacio.jpg Content-Id: <301780-22001122182154445709@mac21.com> /9j/4AAQSkZJRgABAgEASABIAAD/2wCEAAwICAgJCAwJCQwRCwoLERUPDAwPFRgTExUTExgRDAwM DAwMEQwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwBDQsLDQ4NEA4OEBQODg4UFA4ODg4UEQwM DAwMEREMDAwMDAwRDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDP/AABEIAF4AjgMBIgACEQED EQH/3QAEAAn/xAE/AAABBQEBAQEBAQAAAAAAAAADAAECBAUGBwgJCgsBAAEFAQEBAQEBAAAAAAAA AAEAAgMEBQYHCAkKCxAAAQQBAwIE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Bux9kACrXj/NXQVOxSwe myB+b8PvTOrs9RrhaBUAZYGsgn+U76ar+9K74I7/ALpTxZOHbTyf/9k= ------=_NextPart_94915C5ABAF209EF376268C8 Content-Type: application/octet-stream; name="feria_5.jpg" Content-Transfer-Encoding: base64 Content-Description: feria_5.jpg Content-Id: <169331-220011221821544457010@mac21.com> /9j/4AAQSkZJRgABAgEASABIAAD/2wCEAAwICAgJCAwJCQwRCwoLERUPDAwPFRgTExUTExgRDAwM DAwMEQwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwBDQsLDQ4NEA4OEBQODg4UFA4ODg4UEQwM DAwMEREMDAwMDAwRDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDP/AABEIAF4AjgMBIgACEQED EQH/3QAEAAn/xAE/AAABBQEBAQEBAQAAAAAAAAADAAECBAUGBwgJCgsBAAEFAQEBAQEBAAAAAAAA AAEAAgMEBQYHCAkKCxAAAQQBAwIEAgUHBggFAwwzAQACEQMEIRIxBUFRYRMicYEyBhSRobFCIyQV UsFiMzRygtFDByWSU/Dh8WNzNRaisoMmRJNUZEXCo3Q2F9JV4mXys4TD03Xj80YnlKSFtJXE1OT0 pbXF1eX1VmZ2hpamtsbW5vY3R1dnd4eXp7fH1+f3EQACAgECBAQDBAUGBwcGBTUBAAIRAyExEgRB UWFxIhMFMoGRFKGxQiPBUtHwMyRi4XKCkkNTFWNzNPElBhaisoMHJjXC0kSTVKMXZEVVNnRl4vKz hMPTdePzRpSkhbSVxNTk9KW1xdXl9VZmdoaWprbG1ub2JzdHV2d3h5ent8f/2gAMAwEAAhEDEQA/ AOPwMU5Ly57iGyS53/fWruOhfVTq1lVfUG2UMrYQ6ivKY7a9o13v2+301W+qH1SHVZyLnupwatGw 4AvcP3d7Xt9Nn+EVv6yfWTL/AEvSsTLNuOz2WWFjGzGnpsdV9Kr+yq4A+eW36IZif0Y7o+u/WnrO RWen5Ipcyp0WW4pJbYRx9L/Bt/kLlcvqLQSAD6nZp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_94915C5ABAF209EF376268C8 Content-Type: application/octet-stream; name="feria_1.jpg" Content-Transfer-Encoding: base64 Content-Description: feria_1.jpg Content-Id: <314062-220011221821544463011@mac21.com> /9j/4AAQSkZJRgABAgEASABIAAD/2wCEAAwICAgJCAwJCQwRCwoLERUPDAwPFRgTExUTExgRDAwM DAwMEQwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwBDQsLDQ4NEA4OEBQODg4UFA4ODg4UEQwM DAwMEREMDAwMDAwRDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDP/AABEIAF4AjgMBIgACEQED EQH/3QAEAAn/xAE/AAABBQEBAQEBAQAAAAAAAAADAAECBAUGBwgJCgsBAAEFAQEBAQEBAAAAAAAA AAEAAgMEBQYHCAkKCxAAAQQBAwIEAgUHBggFAwwzAQACEQMEIRIxBUFRYRMicYEyBhSRobFCIyQV UsFiMzRygtFDByWSU/Dh8WNzNRaisoMmRJNUZEXCo3Q2F9JV4mXys4TD03Xj80YnlKSFtJXE1OT0 pbXF1eX1VmZ2hpamtsbW5vY3R1dnd4eXp7fH1+f3EQACAgECBAQDBAUGBwcGBTUBAAIRAyExEgRB UWFxIhMFMoGRFKGxQiPBUtHwMyRi4XKCkkNTFWNzNPElBhaisoMHJjXC0kSTVKMXZEVVNnRl4vKz hMPTdePzRpSkhbSVxNTk9KW1xdXl9VZmdoaWprbG1ub2JzdHV2d3h5ent8f/2gAMAwEAAhEDEQA/ ACtYCIRQwKLTwitKzy21Bp0UbgNpkIocIQrniOPIIJTdHLfStY4bmkwZ85VfN6FhWguomu3TUkuB j96f+qROn2FrXw06kKV17h5FOjulwch7sVxpuZDO5Gv9ofvNQg+pxI2wPzT2K0c2l+WzY1he8aja JP4IVeNZ6IbbjuY6v95pEtP5sED6KnFUt4i57ra3VwWwWSOIn7kGo0BxfskEGWOkB0y3f7StfGpx Bm1nJrDsZ52WA6QHaOLXD3Ncz6SsM6L07G62cXO/S4eQIoyGu2lm7SuyR7d7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JzqGt2C0B/gNT/0VnnrFjZaWgu13eAJ7wsxl5pIe1suHAPj4pA7nGTLhqSnCKKbN3ULr gQ5+hGgGgQWzLgTB2QPPUINkx5pmve7cOzG/lLQjSfB//9TE+rvrjNstex4rsqgPcCNQ7Ruq38hn 2vEsxp2+o3buiYWKyzrrrWF1YYze3c0Fn0Z/SfnOd9FA6/8AtDfSaPV9KHeqK923+QX7FEy22b+j dGxrA/NyhujiQ3/ot9ysYvWehYezFxnFrHkku2kMGmrnucuVeXAcbh3jQz/5FWfq9X0s22u6vY5r WNmljQ73zO9rnbHNa1iJA6lQZfWDJyH5tzqXh+K4teI4Mta9nu/so+DbguoFrzutI0ZxqNFT6xa9 wFdVNbaRtLbWEeoW7f0bS1r3fo/T/kKpizuEcd0Cy4wCL28HbuuFz90bQwD6PgFHplkgzY4tc/6b u38kKzjCkVElwdpqGjUKjSzbQ/3l9kt2Bohuz3T4e76KI2Ub4g7BzMfFba3+ddaza0nQgoWNY1nT TY55r3Pc0AzqYb9Hb/KWZ7iRu0RqC0WAkTDhuHiJSAVIDTu1gba6zTucGSXFskalWcoPGG0h2ga0 OBPI7Rp5oeeWnIcWAtbHB1ULQTUd5IZAieOPanaraGld2l63onfMGdD4FHFjrz6rzue7k8Sq1n0B 8fxRq5gJLilLJAPmnrhpJ7nlRl+kCfBKoA/zh2mfNFamDDaZAOzxV49NZWwAOk3Nlxjgt90fgjNI GNoAR245VPdmel9F2/d3/d/koWUP/9k= ------=_NextPart_94915C5ABAF209EF376268C8 Content-Type: application/octet-stream; name="feria_3.jpg" Content-Transfer-Encoding: base64 Content-Description: feria_3.jpg Content-Id: <280433-220011221821544463012@mac21.com> /9j/4AAQSkZJRgABAgEASABIAAD/2wCEAAwICAgJCAwJCQwRCwoLERUPDAwPFRgTExUTExgRDAwM DAwMEQwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwBDQsLDQ4NEA4OEBQODg4UFA4ODg4UEQwM DAwMEREMDAwMDAwRDAwMDAw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W8AfS/NWU76z Wn6uM6WKWikVlhtJJcRu3bg381ZXULg25rjxtePvbtQtx+x7J/NUxneOMNKDCMQ4ju//1PRPrA25 /Rsv0HuqtbWXMsbyC33yP81eO5oycrNtORYbbnmHWP5dH723a1ep59/1hdi3b8ZjKtjt0OYfbHu5 sXmVkfa2btHdx56p2w7+S6ABJvTzS4fVc3p7PQxqq27JBeWBzjPOpQHAuq2nTdyiWbvVd4T2SMwO /imknqGxCMdaLUawBwjsVb9I3u+AmVFjap0cJ8wr2F6QJBg+aaSezJCEesg1mUGr3GCHCAAosYGz prMytXJ9P0oEc8qoBXHKZZ7MohHpIIW47iwOiWTB/KnrNQsJLXN029iOFouFZx27SBA181ScK55/ KkSeyRGOlEW1smt73APJMatB80qmPZ7eQdIPEEq27bDd/Ec94QyG7266/mpAmtlpjG9xfmgzMRp2 taAwBzhp2EoFWK9oscBIc2GnzBV2zfOpMSZ+PdJkenpwnXKlsowu7DQebvUaGmC1sE9p5SqzHF2x 2pmJRH/zpgydFWYG/aBr3KcD3YCKTZNddurtCBA+aDHt2eUKWSbJhg08VW/S7u6d0W6W/wD/2Q== ------=_NextPart_94915C5ABAF209EF376268C8-- From martin@v.loewis.de Tue Dec 18 22:31:54 2001 From: martin@v.loewis.de (Martin v. Loewis) Date: Tue, 18 Dec 2001 23:31:54 +0100 Subject: [XML-SIG] Thanks! In-Reply-To: <3C1FA495.309D2F3E@zolera.com> (message from Rich Salz on Tue, 18 Dec 2001 15:18:29 -0500) References: <3C1FA495.309D2F3E@zolera.com> Message-ID: <200112182231.fBIMVst01418@mira.informatik.hu-berlin.de> > Thanks to Andrew Kuchling for all his time and effort in helping the > XML SIG to date. Web pages, documentation, etc. Indeed, and good luck and thanks for your own efforts! Martin From rsalz@zolera.com Tue Dec 18 23:05:47 2001 From: rsalz@zolera.com (Rich Salz) Date: Tue, 18 Dec 2001 18:05:47 -0500 Subject: [XML-SIG] Thanks! References: <3C1FA495.309D2F3E@zolera.com> <200112182231.fBIMVst01418@mira.informatik.hu-berlin.de> Message-ID: <3C1FCBCB.B3917B0F@zolera.com> >... good luck and thanks for your own efforts! Hardly. :) BTW, in my first exercise of raw power, I changed the list so only members can post or see the list of members.... -- Zolera Systems, Securing web services (XML, SOAP, Signatures, Encryption) http://www.zolera.com From tpassin@home.com Tue Dec 18 23:08:43 2001 From: tpassin@home.com (Thomas B. Passin) Date: Tue, 18 Dec 2001 18:08:43 -0500 Subject: [XML-SIG] Thanks! References: <3C1FA495.309D2F3E@zolera.com> Message-ID: <000e01c18818$f1132180$7cac1218@cj64132b> [Rich Salz] > Thanks to Andrew Kuchling for all his time and effort in helping the XML > SIG to date. Web pages, documentation, etc. A hearty second from this corner! Tom P From uche.ogbuji@fourthought.com Tue Dec 18 22:52:29 2001 From: uche.ogbuji@fourthought.com (Uche Ogbuji) Date: Tue, 18 Dec 2001 15:52:29 -0700 Subject: [XML-SIG] Reconsidering NamespaceErr on '' and None In-Reply-To: Message from Rich Salz of "Fri, 14 Dec 2001 11:20:52 EST." <3C1A26E4.230620F3@zolera.com> Message-ID: <200112182252.fBIMqTa03819@localhost.localdomain> > I will answer my own question. > > cDomlette uses empty string for the no namespace > > I have to call getAttributeNS('', 'id') Not any more. We've changed this to use None in CVS. -- Uche Ogbuji Principal Consultant uche.ogbuji@fourthought.com +1 303 583 9900 x 101 Fourthought, Inc. http://Fourthought.com 4735 East Walnut St, Boulder, CO 80301-2537, USA XML strategy, XML tools (http://4Suite.org), knowledge management From uche.ogbuji@fourthought.com Tue Dec 18 22:55:21 2001 From: uche.ogbuji@fourthought.com (Uche Ogbuji) Date: Tue, 18 Dec 2001 15:55:21 -0700 Subject: [XML-SIG] DOM test failures In-Reply-To: Message from "Fred L. Drake, Jr." of "Fri, 14 Dec 2001 12:51:10 EST." <15386.15374.948162.281667@grendel.zope.com> Message-ID: <200112182255.fBIMtLc03871@localhost.localdomain> > > Sylvain Thenault writes: > > I think that having localName=nodeName and prefix=None when the > > application creates nodes through the level 1 API is easier to handle for > > applications which take DOM tree as input, without knowing how it have > > been created or if it uses xmlns or not. > > Yeah, its easy to convince oneself of this. ;-) > And this is exactly the kind of thing that makes me think that the > DOM for documents processed with namespaces and DOM for docs without > namespaces are simply two different beasts (possibly with a shared > base). > Which brings back the idea that what we need is something new. How > many of us are going to be at Python 10? (Martin? Lars?) Would a > BoF or DevDay session be useful? I'll be there. I think we should try to have a few BOFS/sessions: * Yet ANother Future of PyXML/Plans for 1.0 BOF (maybe this is just a bunch of us dining, as it was last time) * DOM alternative BOF * Web services BOF -- Uche Ogbuji Principal Consultant uche.ogbuji@fourthought.com +1 303 583 9900 x 101 Fourthought, Inc. http://Fourthought.com 4735 East Walnut St, Boulder, CO 80301-2537, USA XML strategy, XML tools (http://4Suite.org), knowledge management From rsalz@zolera.com Wed Dec 19 00:23:19 2001 From: rsalz@zolera.com (Rich Salz) Date: Tue, 18 Dec 2001 19:23:19 -0500 Subject: [XML-SIG] Reconsidering NamespaceErr on '' and None References: <200112182252.fBIMqTa03819@localhost.localdomain> Message-ID: <3C1FDDF7.E83050E3@zolera.com> > Not any more. We've changed this to use None in CVS. Yes, I know, that's great, but existing installations don't. I want ZSI to run on top of Python 2, Pyxml 0.6, PyXML recent snaphots, and recent releases of 4suite. That means I have to do the games I wrote about earlier. /r$ -- Zolera Systems, Securing web services (XML, SOAP, Signatures, Encryption) http://www.zolera.com From brian@sweetapp.com Wed Dec 19 01:07:03 2001 From: brian@sweetapp.com (Brian Quinlan) Date: Tue, 18 Dec 2001 17:07:03 -0800 Subject: [XML-SIG] Pyana 0.2.0 released In-Reply-To: <200112182126.fBILQ8A03097@localhost.localdomain> Message-ID: <006601c18829$789ff4b0$445d4540@Dell2> Uche wrote: > > But, since you are being so picky, I tested the latest Pyana release > > (0.2.0) against the latest 4suite release (0.11.1), using the test > > script that I attached in the previous e-mail*: >=20 > Hey, reading is not such a black art, you know. I specifically said > 4Suite in current CVS. Sorry, I think that the argument is slowly shifting and I'm not doing a very good job of keeping up :-) My understanding was that you took issue with my unsubstantiated claim that: "So, right now, Pyana is probably your best bet for high-performance XSLT processing in Python while PIRXX offers Xerces SAX2 interfaces." I don't think that I am being disingenuous by only comparing the latest release version of my product to the latest release version of yours. I do not encourage end users to use the CVS version of Pyana or Xalan but perhaps your CVS tree is more stable and you do. In which case I am sorry for comparing apples to oranges. Also note that I did say "right now" because I knew that both 4suite optimizations were in the works and that J=FCrgen would eventually get around to doing XSLT bindings in = PIRXX. > The CVS version of 4Suite is even easier to install than 0.11.1, so you > must just not want to follow my challenge... I tried to install it but I got a lot of compilation errors in "Ft/Xml/src/domlette/xmlcharhelp.h" (I can send you the error log if you'd like). But I notice that you archive your CVS tree. Could you point me to a shapshot that includes your optimizations but compiles cleanly on Windows? Also, if there is a more optimal code fragment to execute the 4suite test, please send that as well. Thanks a lot! Brian=20 From brian@sweetapp.com Wed Dec 19 01:19:47 2001 From: brian@sweetapp.com (Brian Quinlan) Date: Tue, 18 Dec 2001 17:19:47 -0800 Subject: [XML-SIG] Pyana 0.2.0 released In-Reply-To: Message-ID: <006701c1882b$3fb607f0$445d4540@Dell2> J=FCrgen wrote: > Well, _I_ am and will probably run such a benchmark in Q1/2002, then diss > you both. ;) J=FCrgen, we will both be using Xalan and I doubt that I am doing things so poorly that you will be able to eek out significant performance improvements :-) One thing that I did note is that you assume that the various Xalan/Xerces characters (e.g. XMLCh) are equivalent to Py_UNICODE characters. While this is not definitely correct (XMLCh arrays are considered to be UTF-16 while Py_UNICODE arrays are considered to be UCS-2 or UCS-4), it may result in a performance increase because it saves you having to go through the UTF-16 encoding/decoder all the time. Cheers, Brian From noreply@sourceforge.net Wed Dec 19 04:41:28 2001 From: noreply@sourceforge.net (noreply@sourceforge.net) Date: Tue, 18 Dec 2001 20:41:28 -0800 Subject: [XML-SIG] [ pyxml-Patches-494903 ] xml.sax.writer.XMLWriter.handle_cdata() Message-ID: Patches item #494903, was opened at 2001-12-18 20:41 You can respond by visiting: http://sourceforge.net/tracker/?func=detail&atid=306473&aid=494903&group_id=6473 Category: SAX Group: None Status: Open Resolution: None Priority: 5 Submitted By: Frank J. Tobin (ftobin) Assigned to: Nobody/Anonymous (nobody) Summary: xml.sax.writer.XMLWriter.handle_cdata() Initial Comment: There is a small but fatal typo in xml.sax.writer.XMLWriter.handle_cdata() Attached is fix. ---------------------------------------------------------------------- You can respond by visiting: http://sourceforge.net/tracker/?func=detail&atid=306473&aid=494903&group_id=6473 From uche.ogbuji@fourthought.com Wed Dec 19 07:48:44 2001 From: uche.ogbuji@fourthought.com (Uche Ogbuji) Date: Wed, 19 Dec 2001 00:48:44 -0700 Subject: [XML-SIG] Pyana 0.2.0 released References: <006601c18829$789ff4b0$445d4540@Dell2> Message-ID: <3C20465C.AC888ECC@fourthought.com> Brian Quinlan wrote: > I tried to install it but I got a lot of compilation errors in > "Ft/Xml/src/domlette/xmlcharhelp.h" (I can send you the error log if > you'd like). Please do. What platform are you running? > But I notice that you archive your CVS tree. Could you point me to a > shapshot that includes your optimizations but compiles cleanly on > Windows? Also, if there is a more optimal code fragment to execute the > 4suite test, please send that as well. Jeremy is on this list, I'm not sure about Roxane. Are either of you able to compile 4Suite on Windows? I know Roxane was able to a few weeks ago, but this was before the merges from the branches that had most of the optimization work (cDomlette completion from Mike and me, XSLT engine core optimizations from Jeremy). Also, Mike Brown has made recent conformance fixes. Our current goal/hope is to have a prerelease out tomorrow, and a final package on Friday. -- Uche Ogbuji Principal Consultant uche.ogbuji@fourthought.com +1 303 583 9900 x 101 Fourthought, Inc. http://Fourthought.com 4735 East Walnut St, Boulder, CO 80301-2537, USA XML strategy, XML tools (http://4Suite.org), knowledge management From uche.ogbuji@fourthought.com Wed Dec 19 15:10:25 2001 From: uche.ogbuji@fourthought.com (Uche Ogbuji) Date: Wed, 19 Dec 2001 08:10:25 -0700 Subject: [XML-SIG] Re: [4suite] External entities question References: <8AFA9B0A-F45C-11D5-B0F4-00039344BB54@isb-sib.ch> Message-ID: <3C20ADE1.6CD56BA9@fourthought.com> S=E9bastien Pierre wrote: >=20 > Hi folks, I guess you are quite busy with the december release, but... >=20 > I have a two questions regarding 4DOM and 4XSLT, the first one > being simple, the second one slightly more complicated ;) >=20 > Here is the first one: > How can I set entity resolvers in DOM builders and > is there any xmlproc-like catalog files support? Hmm. The framework Dieter Maurer added to pDomlette for this never seems to have been ported to 4DOM. Let me try to get a chance to port it and I'll let you know. > And the slightly more complicated one: > I have an XML input file that has entities that I want to > be expanded in a different way depending on the XSLT stylesheet. > This means that entities expansion should be done not while > parsing the input, but actually made by the XSLT processor using > entity definitions found in the XSLT stylesheet. I have put so > far the entities inside a DOCTYPE stylesheet declaration, which > may not be a wise choice. Hmm. I'm a bit fuzzy on this. Is the main need to parse the input once, and then apply different entity defs to the DOM for different processing runs? This would be very difficult. If so, have you considered using XInclude and driving the include resulution from the stylesheet rather than the parser? If all you mean is that you'd like to register a different entity resolver for parsing input documents, then this should be easy using cDomlette or pDomlette. Unfortunately, it wasn't until just now because I forgot to add a hook to change the cDomlette entity resolver. Now it conforms to Dieter's interface for pDomlette. You can create a cDomlette reader as follows: rdr =3D cDomlette.RawExpatReader(resolveEntity=3Dfoo) where foo is a callable object that takes base, pubid and sysid and returns a resolved URI. --=20 Uche Ogbuji Principal Consultant uche.ogbuji@fourthought.com +1 303 583 9900 x 101 Fourthought, Inc. http://Fourthought.com=20 4735 East Walnut St, Boulder, CO 80301-2537, USA XML strategy, XML tools (http://4Suite.org), knowledge management From t.c.jones@att.net Wed Dec 19 16:52:52 2001 From: t.c.jones@att.net (t.c.jones@att.net) Date: Wed, 19 Dec 2001 16:52:52 +0000 Subject: [XML-SIG] utf-16 versus UCS-2 Message-ID: <20011219165252.ZBDN15547.mtiwmhc25.worldnet.att.net@webmail.worldnet.att.net> I noted in the earlier thread the distiction between UTF- 16 and double byte unicode. Does this really mean that utf-8 is just put, byte x byte, into a short integer, as opposed to conversion to unicode for ucs-2? what converts directly from utf-8 to unicode and does that require a change to the header? thx ..tom From Alexandre.Fayolle@logilab.fr Wed Dec 19 17:45:49 2001 From: Alexandre.Fayolle@logilab.fr (Alexandre Fayolle) Date: Wed, 19 Dec 2001 18:45:49 +0100 (CET) Subject: [XML-SIG] DOM test failures In-Reply-To: <200112141701.fBEH14Q02286@mira.informatik.hu-berlin.de> Message-ID: Sorry for my lack of responsiveness. I'm currently kept busy by some paying customers. Let me sum up things, first: There is a problem with the changes I made in 4DOM because some people might actually want to use the DOM L1 API to create documents with namespaces, and the DOM TR requires that this be possible. I suggest reverting the changes I made (that is removing the delegation of all calls to non NS aware methods to the NS aware ones, using EMPTY_NAMESPACE as the namespace). The main goal was to enable the query of the NS attributes on calls to getAttribute and getAttributeNS. The same effect could be achieved by having getAttribute and getAttributeNode call getAttributeNS(EMPTY_NAMESPACE,name) (resp. getAttributeNodeNS) if the lookup using the DOM L1 procedure gives nothing. This would not penalize the default DOM L2 calls, and should reduce the number problems faced by newcomers. If it is thought that this solution would do the trick, I'll try to find the time to implement it and commit it tomorrow evening. Alexandre Fayolle -- LOGILAB, Paris (France). http://www.logilab.com http://www.logilab.fr http://www.logilab.org Narval, the first software agent available as free software (GPL). From fg@nuxeo.com Wed Dec 19 17:35:32 2001 From: fg@nuxeo.com (Florent Guillaume) Date: 19 Dec 2001 17:35:32 GMT Subject: [XML-SIG] utf-16 versus UCS-2 References: <20011219165252.ZBDN15547.mtiwmhc25.worldnet.att.net@webmail.worldnet.att.net> Message-ID: <9vqj54$f3a$1@dev.in.nuxeo.com> wrote: > I noted in the earlier thread the distiction between UTF- > 16 and double byte unicode. Does this really mean that > utf-8 is just put, byte x byte, into a short integer, as > opposed to conversion to unicode for ucs-2? Non. UTF-8 is a variable-length byte encoding. See http://www.ietf.org/rfc/rfc2279.txt for details. Florent -- Florent Guillaume, Nuxeo (Paris, France) +33 1 40 33 79 10 http://nuxeo.com mailto:fg@nuxeo.com From Francois-regis.Chalaoux@sanofi-synthelabo.com Wed Dec 19 16:04:39 2001 From: Francois-regis.Chalaoux@sanofi-synthelabo.com (Francois-regis Chalaoux) Date: Wed, 19 Dec 2001 17:04:39 +0100 Subject: [XML-SIG] bug : XmlprocDriver instance has no attribute 'feed' ???? Message-ID: <"011219182149Z.WT04615. 12*/PN=Francois-regis.Chalaoux/O=RESEARCH/PRMD=SANOFI/ADMD=ATLAS/C=FR/"@MHS> Hi, I parse a xml file with xml_objectify.py module. It is a very nice module transforming a xml file in python objects. You need to install PyXML to use the minidom module. Everything is ok on NT with python console or with an Apache server. But now, with a Sun machine, I only can run the same program on the console **but not through the Apache server** !!! For both OS I have PyXML-0.6.6 and Python 2.1.1 installed. On Sun got this error : Traceback (most recent call last): File "/usr/Micromass/GlobalServer/V1.1/WebServer/Apache/cgi-bin/masse/sgxml/test_xml.py", line 49, in ? py_obj = XML_Objectify(file).make_instance() File "../../lib/xml_objectify.py", line 218, in __init__ self._dom = minidom.parseString(self._fh.read()) File "/home/fr15903/lib/python2.1/site-packages/_xmlplus/dom/minidom.py", line 913, in parseString return _doparse(pulldom.parseString, args, kwargs) File "/home/fr15903/lib/python2.1/site-packages/_xmlplus/dom/minidom.py", line 900, in _doparse toktype, rootNode = events.getEvent() File "/home/fr15903/lib/python2.1/site-packages/_xmlplus/dom/pulldom.py", line 251, in getEvent self.parser.feed(buf) AttributeError: XmlprocDriver instance has no attribute 'feed' Any idea, FR. From Sylvain.Thenault@logilab.fr Thu Dec 20 08:39:55 2001 From: Sylvain.Thenault@logilab.fr (Sylvain Thenault) Date: Thu, 20 Dec 2001 09:39:55 +0100 (CET) Subject: [XML-SIG] Re: [Python-Fr]bug : XmlprocDriver instance has no attribute 'feed' ???? In-Reply-To: <"011219183924Z.WT14529. 38*/PN=Francois-regis.Chalaoux/O=RESEARCH/PRMD=SANOFI/ADMD=ATLAS/C=FR/"@MHS> Message-ID: On Wed, 19 Dec 2001, Francois-regis Chalaoux wrote: Hi, I've just forwarded your message to the xml-sig mailing list, which handle pyxml cheers Sylvain > Hi, > I parse a xml file with xml_objectify.py module. It is a very nice module transforming a xml file in python objects. > You need to install PyXML to use the minidom module. > > Everything is ok on NT with python console or with an Apache server. But now, with a Sun machine, I only can run the same program on the console **but not through the Apache server** !!! > > For both OS I have PyXML-0.6.6 and Python 2.1.1 installed. > > On Sun got this error : > > Traceback (most recent call last): > File "/usr/Micromass/GlobalServer/V1.1/WebServer/Apache/cgi-bin/masse/sgxml/test_xml.py", line 49, in ? > py_obj = XML_Objectify(file).make_instance() > File "../../lib/xml_objectify.py", line 218, in __init__ > self._dom = minidom.parseString(self._fh.read()) > File "/home/fr15903/lib/python2.1/site-packages/_xmlplus/dom/minidom.py", line 913, in parseString > return _doparse(pulldom.parseString, args, kwargs) > File "/home/fr15903/lib/python2.1/site-packages/_xmlplus/dom/minidom.py", line 900, in _doparse > toktype, rootNode = events.getEvent() > File "/home/fr15903/lib/python2.1/site-packages/_xmlplus/dom/pulldom.py", line 251, in getEvent > self.parser.feed(buf) > AttributeError: XmlprocDriver instance has no attribute 'feed' > > > Any idea, FR. > > _______________________________________________ > Liste de diffusion Python - Python@aful.org > http://www.aful.org/mailman/listinfo/python > -- Sylvain Thenault LOGILAB http://www.logilab.org From martin@v.loewis.de Wed Dec 19 21:45:40 2001 From: martin@v.loewis.de (Martin v. Loewis) Date: Wed, 19 Dec 2001 22:45:40 +0100 Subject: [XML-SIG] utf-16 versus UCS-2 In-Reply-To: <20011219165252.ZBDN15547.mtiwmhc25.worldnet.att.net@webmail.worldnet.att.net> (t.c.jones@att.net) References: <20011219165252.ZBDN15547.mtiwmhc25.worldnet.att.net@webmail.worldnet.att.net> Message-ID: <200112192145.fBJLjes01915@mira.informatik.hu-berlin.de> > I noted in the earlier thread the distiction between UTF- > 16 and double byte unicode. What earlier thread? > what converts directly from utf-8 to unicode and does > that require a change to the header? What header? Regards, Martin From ians@etrials.com Thu Dec 20 16:02:39 2001 From: ians@etrials.com (Ian Sparks) Date: Thu, 20 Dec 2001 11:02:39 -0500 Subject: [XML-SIG] Node as Element? Message-ID: <3758A5EAF91DD411AF3600B0D02188DD83AC93@mail.etrials.com> This is so simple but it has me stumped. If I do : from xml.dom.ext.reader.Sax2 import Reader ...setting up document & y here.... for x in y.childNodes: if x.getAttributeNS('','attribute_name') == 'foo': do_something... I get an error. childNodes returns a Nodelist, x is therefore a node but I know its an Element so how can I cast it to an Element? This is where my Python knowledge is weak, I want to do : if (x as Element).getAttributeNS('type') == 'foo': dosomething... but I'm afraid that just shows my Delphi roots....What's the Python solution? - Ian Sparks. From rsalz@zolera.com Thu Dec 20 16:26:54 2001 From: rsalz@zolera.com (Rich Salz) Date: Thu, 20 Dec 2001 11:26:54 -0500 Subject: [XML-SIG] Node as Element? References: <3758A5EAF91DD411AF3600B0D02188DD83AC93@mail.etrials.com> Message-ID: <3C22114E.20F7965A@zolera.com> what is the exact error you get? The code looks okay. /r$ -- Zolera Systems, Your Key to Online Integrity Securing Web services: XML, SOAP, Dig-sig, Encryption http://www.zolera.com From fdrake@acm.org Thu Dec 20 16:28:10 2001 From: fdrake@acm.org (Fred L. Drake, Jr.) Date: Thu, 20 Dec 2001 11:28:10 -0500 (EST) Subject: [XML-SIG] Node as Element? In-Reply-To: <3758A5EAF91DD411AF3600B0D02188DD83AC93@mail.etrials.com> References: <3758A5EAF91DD411AF3600B0D02188DD83AC93@mail.etrials.com> Message-ID: <15394.4506.745174.87428@cj42289-a.reston1.va.home.com> Ian Sparks writes: > for x in y.childNodes: > if x.getAttributeNS('','attribute_name') == 'foo': > do_something... > > I get an error. I'm going to guess that you're getting an AttributeError, and that x is *not* an Element node, but a Text node that contains whitespace from between elements. You should be able to use this: for x in y.childNodes: if (x.nodeType == Node.ELEMENT_NODE and x.getAttributeNS('','attribute_name') == 'foo'): do_something... If you're not getting an AttributeError, then you'll need to tell us more about the error you're getting. > This is where my Python knowledge is weak, I want to do : > > if (x as Element).getAttributeNS('type') == 'foo': > dosomething... > > but I'm afraid that just shows my Delphi roots....What's the Python > solution? If x really is an Element, you don't need to do anything. If it isn't an element, you probably want to know about it, and the test I added above should do the trick. -Fred -- Fred L. Drake, Jr. PythonLabs at Zope Corporation From Alexandre.Fayolle@logilab.fr Thu Dec 20 17:31:51 2001 From: Alexandre.Fayolle@logilab.fr (Alexandre Fayolle) Date: Thu, 20 Dec 2001 18:31:51 +0100 (CET) Subject: [XML-SIG] Node as Element? In-Reply-To: <3758A5EAF91DD411AF3600B0D02188DD83AC93@mail.etrials.com> Message-ID: On Thu, 20 Dec 2001, Ian Sparks wrote: > > This is so simple but it has me stumped. > > If I do : > > from xml.dom.ext.reader.Sax2 import Reader > > ...setting up document & y here.... > > for x in y.childNodes: > if x.getAttributeNS('','attribute_name') == 'foo': > do_something... > > I get an error. try this: from xml.dom import Node for x in y.childNodes: if x.nodeType == Node.ELEMENT_NODE: if x.getAttributeNS('','attribute_name') == 'foo': # do stuff > This is where my Python knowledge is weak, I want to do : > > if (x as Element).getAttributeNS('type') == 'foo': > dosomething... > > but I'm afraid that just shows my Delphi roots....What's the Python > solution? There is no need to cast in Python. The DOM way of looking at the type of a Node is by using the nodeType attribute. Alexandre Fayolle -- LOGILAB, Paris (France). http://www.logilab.com http://www.logilab.fr http://www.logilab.org Narval, the first software agent available as free software (GPL). From ians@etrials.com Thu Dec 20 16:52:08 2001 From: ians@etrials.com (Ian Sparks) Date: Thu, 20 Dec 2001 11:52:08 -0500 Subject: [XML-SIG] Node as Element? Message-ID: <3758A5EAF91DD411AF3600B0D02188DD83AC97@mail.etrials.com> You were correct (thanks also to Rich and Alexandre). Pesky WhiteSpace! I think there's a setting for the DOM to filter this out when it is parsed into the DOM? Thanks. - Ian Sparks. -----Original Message----- From: Fred L. Drake, Jr. [mailto:fdrake@acm.org] Sent: Thursday, December 20, 2001 11:28 AM To: Ian Sparks Cc: 'xml-sig@python.org' Subject: Re: [XML-SIG] Node as Element? Ian Sparks writes: > for x in y.childNodes: > if x.getAttributeNS('','attribute_name') == 'foo': > do_something... > > I get an error. I'm going to guess that you're getting an AttributeError, and that x is *not* an Element node, but a Text node that contains whitespace from between elements. You should be able to use this: for x in y.childNodes: if (x.nodeType == Node.ELEMENT_NODE and x.getAttributeNS('','attribute_name') == 'foo'): do_something... ....snipped... From Alexandre.Fayolle@logilab.fr Thu Dec 20 17:08:54 2001 From: Alexandre.Fayolle@logilab.fr (Alexandre Fayolle) Date: Thu, 20 Dec 2001 18:08:54 +0100 (CET) Subject: [XML-SIG] Node as Element? In-Reply-To: <3758A5EAF91DD411AF3600B0D02188DD83AC97@mail.etrials.com> Message-ID: On Thu, 20 Dec 2001, Ian Sparks wrote: > You were correct (thanks also to Rich and Alexandre). > > Pesky WhiteSpace! > > I think there's a setting for the DOM to filter this out when it is parsed > into the DOM? Yes : you can build your dom tree with validation (which means you need a DTD to validate against), or you can use xml.dom.ext.StripXml(document) to remove whitespace after parsing. You'll also have to take care of Comment nodes, and maybe of ProcessingInstructions. I don't use the latter, but comments can be a real pain sometimes. You can also use the DOM Traversal API to iterate through the tree. This API enables you to filter out some nodes, so you'd be able to forget get only Elements reported during the traversal. Finally, you could use XPath, which gives you random access to any point of the tree, without bothering about iteration. Alexandre Fayolle -- LOGILAB, Paris (France). http://www.logilab.com http://www.logilab.fr http://www.logilab.org Narval, the first software agent available as free software (GPL). From rsalz@zolera.com Thu Dec 20 17:09:53 2001 From: rsalz@zolera.com (Rich Salz) Date: Thu, 20 Dec 2001 12:09:53 -0500 Subject: [XML-SIG] Node as Element? References: <3758A5EAF91DD411AF3600B0D02188DD83AC97@mail.etrials.com> Message-ID: <3C221B61.80607@zolera.com> > I think there's a setting for the DOM to filter this out when it is parsed > into the DOM? I don't know about that, but I use the following (Python 2.x list comprehension) _child_elements = lambda E: [ n for n in E.childNodes if n.nodeType == Node.ELEMENT_NODE ] and write things as for y in _child_elements(y): pass /r$ -- Zolera Systems, Your Key to Online Integrity Securing Web services: XML, SOAP, Dig-sig, Encryption http://www.zolera.com From Francois-regis.Chalaoux@sanofi-synthelabo.com Thu Dec 20 18:21:46 2001 From: Francois-regis.Chalaoux@sanofi-synthelabo.com (Francois-regis Chalaoux) Date: Thu, 20 Dec 2001 19:21:46 +0100 Subject: [XML-SIG] The right PyXML-0.x.x/Python-2.x.x ? for Unix Message-ID: <"011220185056Z.WT12719. 79*/PN=Francois-regis.Chalaoux/O=RESEARCH/PRMD=SANOFI/ADMD=ATLAS/C=FR/"@MHS> Hi, Is PyXML-0.6.6 compatible with Python 2.1.1 for Unix ? If is not, what is the right couple to choose (PyXML-0.x.x/Python-2.x.x) ? I had now problem on NT with PyXML-0.6.6/Python-2.1.1. But on Sun, it does not work !!! FR From martin@v.loewis.de Thu Dec 20 20:21:18 2001 From: martin@v.loewis.de (Martin v. Loewis) Date: Thu, 20 Dec 2001 21:21:18 +0100 Subject: [XML-SIG] The right PyXML-0.x.x/Python-2.x.x ? for Unix In-Reply-To: <"011220185056Z.WT12719. 79*/PN=Francois-regis.Chalaoux/O=RESEARCH/PRMD=SANOFI/ADMD=ATLAS/C=FR/"@MHS> (message from Francois-regis Chalaoux on Thu, 20 Dec 2001 19:21:46 +0100) References: <"011220185056Z.WT12719. 79*/PN=Francois-regis.Chalaoux/O=RESEARCH/PRMD=SANOFI/ADMD=ATLAS/C=FR/"@MHS> Message-ID: <200112202021.fBKKLIF05580@mira.informatik.hu-berlin.de> > Is PyXML-0.6.6 compatible with Python 2.1.1 for Unix ? Certainly. > I had now problem on NT with PyXML-0.6.6/Python-2.1.1. no problem ??? > But on Sun, it does not work !!! What exactly is it that does not work? Regards, Martin From marklists@mceahern.com Fri Dec 21 03:18:58 2001 From: marklists@mceahern.com (Mark McEahern) Date: Thu, 20 Dec 2001 19:18:58 -0800 Subject: [XML-SIG] roundtripping bug? In-Reply-To: Message-ID: Hi, the following demonstrates what happens when you try to roundtrip a string into minidom--is this a bug? $ python Python 2.1.1 (#2, Sep 26 2001, 09:32:53) [GCC 2.95.3-5 (cygwin special)] on cygwin Type "copyright", "credits" or "license" for more information. >>> import xml.dom.minidom as minidom >>> s = "" >>> doc = minidom.parseString(s) >>> docXml = doc.toxml() >>> doc2 = minidom.parseString(docXml) Traceback (most recent call last): File "", line 1, in ? File "/usr/lib/python2.1/site-packages/_xmlplus/dom/minidom.py", line 844, in parseString return _doparse(pulldom.parseString, args, kwargs) File "/usr/lib/python2.1/site-packages/_xmlplus/dom/minidom.py", line 830, in _doparse events = apply(func, args, kwargs) File "/usr/lib/python2.1/site-packages/_xmlplus/dom/pulldom.py", line 298, in parseString buf = StringIO(string) TypeError: expected string, unicode found Thanks, // mark From faassen@vet.uu.nl Fri Dec 21 03:43:18 2001 From: faassen@vet.uu.nl (Martijn Faassen) Date: Fri, 21 Dec 2001 04:43:18 +0100 Subject: [XML-SIG] added ParsedXML DOM test suite Message-ID: <20011221044318.A11842@vet.uu.nl> Hi there, I've just added the ParsedXML DOM unit test suite to PyXML; to run them (and discover the nice hangs and errors) run xml/test/test_pyxmldom.py, which in turn runs the various tests in xml/test/domapi. Please do run them if you feel interested; this could help us in quite a few ways: * we fix bugs in the DOM implementation * we fix bugs in the test suite * we can move to make the various DOM implementations (PyXML's, 4DOM, and others) more compatible so that we can be more sure that things that depend on them don't fail in odd ways. We may also be in for a nice piece of wrangling if the suite interprets aspects of the DOM spec differently than 4DOM does. :) Regards, Martijn From faassen@vet.uu.nl Fri Dec 21 03:52:51 2001 From: faassen@vet.uu.nl (Martijn Faassen) Date: Fri, 21 Dec 2001 04:52:51 +0100 Subject: [XML-SIG] XPathGrammar question Message-ID: <20011221045251.B11842@vet.uu.nl> Hi there, I'm currently exploring various XML query techniques and am looking into doing an XPath implementation that takes advantage of them. Though I'd have to write a parser myself and was already looking at Yapps, when I discovered there was already a parser (made with Yapps no less) right there in the pyxml distribution. So now I'm trying to use it. Late last year Martin posted an IDL description of a pluggable parser system, and I can also find a new IDL description adding some interfaces to support XSLT. Looking at the sources however I think the interfaces have evolved a bit since then; is there a more up to date IDL somewhere? I also discovered something that looks like a bug, though since I'm so new to it I'm not sure. I've implemented a simple ExprFactory class with the interfaces gleaned from the IDL and sources that basically just prints out stuff so I can see what's going on. However, when I try to parse the expression: //foo I get the following output: createAxisSpecifier 4 createNameTest None foo createStep 4 (None, 'foo') [] createAbbreviatedAbsoluteLocationPath (4, (None, 'foo'), []) i.e. createAxisSpecifier() gets as its 'name' argument the number 4, which indicates the CHILD axis. // should get me the DESCENDANT_OR_SELF (6) axis however. Placing // in the middle such as with foo//bar still seems to get me child. Using non-abbreviated spelling does get me a 6: createAxisSpecifier 6 createNameTest None foo createStep 6 (None, 'foo') [] createAbsoluteLocationPath (6, (None, 'foo'), []) Shouldn't I be getting the same in both cases? Is this a bug or am I missing something? Regards, Martijn From marklists@mceahern.com Fri Dec 21 04:15:10 2001 From: marklists@mceahern.com (Mark McEahern) Date: Thu, 20 Dec 2001 20:15:10 -0800 Subject: [XML-SIG] roundtripping bug? In-Reply-To: Message-ID: Sorry, this is a known bug: http://sourceforge.net/tracker/index.php?func=detail&aid=216388&group_id=547 0&atid=105470 at least wrt cStringIO. I haven't had time to check whether this was fixed in 2.2--presumably, the tracker would show that. :( // mark > -----Original Message----- > From: xml-sig-admin@python.org [mailto:xml-sig-admin@python.org]On > Behalf Of Mark McEahern > Sent: Thursday, December 20, 2001 7:19 PM > To: xml-sig@python.org > Subject: [XML-SIG] roundtripping bug? > > > Hi, the following demonstrates what happens when you try to roundtrip a > string into minidom--is this a bug? > > $ python > Python 2.1.1 (#2, Sep 26 2001, 09:32:53) > [GCC 2.95.3-5 (cygwin special)] on cygwin > Type "copyright", "credits" or "license" for more information. > >>> import xml.dom.minidom as minidom > >>> s = "" > >>> doc = minidom.parseString(s) > >>> docXml = doc.toxml() > >>> doc2 = minidom.parseString(docXml) > Traceback (most recent call last): > File "", line 1, in ? > File > "/usr/lib/python2.1/site-packages/_xmlplus/dom/minidom.py", line 844, > in > parseString > return _doparse(pulldom.parseString, args, kwargs) > File > "/usr/lib/python2.1/site-packages/_xmlplus/dom/minidom.py", line 830, > in > _doparse > events = apply(func, args, kwargs) > File > "/usr/lib/python2.1/site-packages/_xmlplus/dom/pulldom.py", line 298, > in > parseString > buf = StringIO(string) > TypeError: expected string, unicode found > > Thanks, > > // mark > > > _______________________________________________ > XML-SIG maillist - XML-SIG@python.org > http://mail.python.org/mailman/listinfo/xml-sig > > From Sylvain.Thenault@logilab.fr Fri Dec 21 08:39:36 2001 From: Sylvain.Thenault@logilab.fr (Sylvain Thenault) Date: Fri, 21 Dec 2001 09:39:36 +0100 (CET) Subject: [XML-SIG] XmlDomGenerator Message-ID: This message is in MIME format. The first part should be readable text, while the remaining parts are likely unreadable without MIME-aware tools. Send mail to mime@docserver.cac.washington.edu for more info. ---1463794175-25966004-1008923976=:10489 Content-Type: TEXT/PLAIN; charset=US-ASCII Hello, I've written the joined patch which allow to optionaly give to the XmlDomGenerator constructor a DOMImplementation as argument. Opinion about this change ? Should I commit it ? PS: I can't access the sourceforge cvs from command line since this morning , while it works with the web interface. Does someone have the same problem ? -- Sylvain Thenault LOGILAB http://www.logilab.org ---1463794175-25966004-1008923976=:10489 Content-Type: TEXT/PLAIN; charset=US-ASCII; name="Sax2.patch" Content-Transfer-Encoding: BASE64 Content-ID: Content-Description: Content-Disposition: attachment; filename="Sax2.patch" LS0tIFNheDIucHkub3JpZwlGcmkgRGVjIDE0IDEwOjE5OjMxIDIwMDENCisr KyBTYXgyLnB5CUZyaSBEZWMgMjEgMDk6Mjg6MDAgMjAwMQ0KQEAgLTkyLDgg KzkyLDkgQEANCiBjbGFzcyBYbWxEb21HZW5lcmF0b3IoTnNIYW5kbGVyLCBz YXh1dGlscy5EZWZhdWx0SGFuZGxlciwNCiAgICAgICAgICAgICAgICAgICAg ICAgc2F4bGliLkxleGljYWxIYW5kbGVyLA0KICAgICAgICAgICAgICAgICAg ICAgICBzYXhsaWIuRGVjbEhhbmRsZXIpOg0KLSAgICBkZWYgX19pbml0X18o c2VsZiwga2VlcEFsbFdzPTApOg0KKyAgICBkZWYgX19pbml0X18oc2VsZiwg a2VlcEFsbFdzPTAsIGltcGxlbWVudGF0aW9uPWltcGxlbWVudGF0aW9uKToN CiAgICAgICAgIHNlbGYuX2tlZXBBbGxXcyA9IGtlZXBBbGxXcw0KKyAgICAg ICAgc2VsZi5faW1wbCA9IGltcGxlbWVudGF0aW9uDQogICAgICAgICByZXR1 cm4NCiANCiAgICAgZGVmIGluaXRTdGF0ZShzZWxmLCBvd25lckRvYz1Ob25l KToNCkBAIC0xMTgsOCArMTE5LDggQEANCiANCiAgICAgZGVmIF9pbml0Um9v dE5vZGUoc2VsZiwgZG9jRWxlbWVudFVyaSwgZG9jRWxlbWVudE5hbWUpOg0K ICAgICAgICAgaWYgbm90IHNlbGYuX2R0Og0KLSAgICAgICAgICAgIHNlbGYu X2R0ID0gaW1wbGVtZW50YXRpb24uY3JlYXRlRG9jdW1lbnRUeXBlKGRvY0Vs ZW1lbnROYW1lLCBOb25lLCAnJykNCi0gICAgICAgIHNlbGYuX293bmVyRG9j ID0gaW1wbGVtZW50YXRpb24uY3JlYXRlRG9jdW1lbnQoZG9jRWxlbWVudFVy aSwgZG9jRWxlbWVudE5hbWUsIHNlbGYuX2R0KQ0KKyAgICAgICAgICAgIHNl bGYuX2R0ID0gc2VsZi5faW1wbC5jcmVhdGVEb2N1bWVudFR5cGUoZG9jRWxl bWVudE5hbWUsICcnLCAnJykNCisgICAgICAgIHNlbGYuX293bmVyRG9jID0g c2VsZi5faW1wbC5jcmVhdGVEb2N1bWVudChkb2NFbGVtZW50VXJpLCBkb2NF bGVtZW50TmFtZSwgc2VsZi5fZHQpDQogICAgICAgICBpZiBzZWxmLl94bWxE ZWNsOg0KICAgICAgICAgICAgIGRlY2xfZGF0YSA9ICd2ZXJzaW9uPSIlcyIn ICUgKA0KICAgICAgICAgICAgICAgICAgICAgc2VsZi5feG1sRGVjbFsndmVy c2lvbiddDQpAQCAtMjg3LDcgKzI4OCw3IEBADQogICAgICAgICByZXR1cm4N CiANCiAgICAgZGVmIHN0YXJ0RFREKHNlbGYsIGRvY3R5cGUsIHB1YmxpY0lE LCBzeXN0ZW1JRCk6DQotICAgICAgICBzZWxmLl9kdCA9IGltcGxlbWVudGF0 aW9uLmNyZWF0ZURvY3VtZW50VHlwZShkb2N0eXBlLCBwdWJsaWNJRCwgc3lz dGVtSUQpDQorICAgICAgICBzZWxmLl9kdCA9IHNlbGYuX2ltcGwuY3JlYXRl RG9jdW1lbnRUeXBlKGRvY3R5cGUsIHB1YmxpY0lELCBzeXN0ZW1JRCkNCiAg ICAgICAgIGlmIG5vdCBzZWxmLl9yb290Tm9kZToNCiAgICAgICAgICAgICBz ZWxmLl9vcnBoYW5lZE5vZGVzLmFwcGVuZCgoJ2RvY3R5cGUnLCkpDQogICAg ICAgICAjZWxzZToNCg== ---1463794175-25966004-1008923976=:10489-- From haering_python@gmx.de Fri Dec 21 09:18:50 2001 From: haering_python@gmx.de (Gerhard =?iso-8859-1?Q?H=E4ring?=) Date: Fri, 21 Dec 2001 10:18:50 +0100 Subject: [XML-SIG] [ANN] XBEL XSLT stylesheet Message-ID: <20011221091847.GA7026@lilith.hqd-internal> Only after I started playing with XBEL (XML Bookmark Exchange Language) have I noticed that it is hosted on the Python-XML SIG. As the existing XSLT stylesheets all either didn't work in my browsers, I made a new one and learnt more about XSLT in the process: http://www.cs.fhm.edu/~ifw00065/bookmarks/index.html It works fine with Mozilla and IE6, Konqueror in KDE 2.2.2 doesn't do the folding correctly. The resulting HTML can be viewed in other browsers (even Lynx) as well, but won't look as good and it needs a decent DOM implementation for the folding to work. I'll most probably still fine-tune it, but you're free to use it for whatever you want. It would of course be nice if you'd send me your improvements. Gerhard -- mail: gerhard bigfoot de registered Linux user #64239 web: http://www.cs.fhm.edu/~ifw00065/ OpenPGP public key id 86AB43C0 public key fingerprint: DEC1 1D02 5743 1159 CD20 A4B6 7B22 6575 86AB 43C0 reduce(lambda x,y:x+y,map(lambda x:chr(ord(x)^42),tuple('zS^BED\nX_FOY\x0b'))) From martin@v.loewis.de Fri Dec 21 09:37:52 2001 From: martin@v.loewis.de (Martin v. Loewis) Date: Fri, 21 Dec 2001 10:37:52 +0100 Subject: [XML-SIG] roundtripping bug? In-Reply-To: References: Message-ID: <200112210937.fBL9bqD01779@mira.informatik.hu-berlin.de> > http://sourceforge.net/tracker/index.php?func=detail&aid=216388&group_id=547 > 0&atid=105470 > > at least wrt cStringIO. I haven't had time to check whether this was fixed > in 2.2--presumably, the tracker would show that. :( There are two problems. One is that toxml() returns a Unicode object, this is fixed in Python 2.2 and PyXML 0.7. The other is that you can't minidom.parseString a Unicode object; I do not consider this a bug. Regards, Martin From martin@v.loewis.de Fri Dec 21 09:49:29 2001 From: martin@v.loewis.de (Martin v. Loewis) Date: Fri, 21 Dec 2001 10:49:29 +0100 Subject: [XML-SIG] XmlDomGenerator In-Reply-To: (message from Sylvain Thenault on Fri, 21 Dec 2001 09:39:36 +0100 (CET)) References: Message-ID: <200112210949.fBL9nTr01850@mira.informatik.hu-berlin.de> > I've written the joined patch which allow to optionaly give to the > XmlDomGenerator constructor a DOMImplementation as argument. > > Opinion about this change ? Should I commit it ? Sounds good to me. It may or may not go into 0.7 (depending on when exactly I package the tar file). > PS: I can't access the sourceforge cvs from command line since this > morning , while it works with the web interface. Does someone have the > same problem ? Works fine for me, both with anonymous and ssh access. A recent source of confusion is that SF now also supports the version 2 protocol of SSH, which requires a different set of keys. Regards, Martin From martin@v.loewis.de Fri Dec 21 10:03:25 2001 From: martin@v.loewis.de (Martin v. Loewis) Date: Fri, 21 Dec 2001 11:03:25 +0100 Subject: [XML-SIG] XPathGrammar question In-Reply-To: <20011221045251.B11842@vet.uu.nl> (message from Martijn Faassen on Fri, 21 Dec 2001 04:52:51 +0100) References: <20011221045251.B11842@vet.uu.nl> Message-ID: <200112211003.fBLA3PF01884@mira.informatik.hu-berlin.de> > So now I'm trying to use it. Late last year Martin posted an IDL > description of a pluggable parser system, and I can also find a new > IDL description adding some interfaces to support XSLT. Looking at the > sources however I think the interfaces have evolved a bit since then; > is there a more up to date IDL somewhere? I'm only aware of a single change that I made a few days ago. Since nobody was interested in this IDL, I lost interest as well. If you want to use it, feel free to contribute patches. If somebody else besides me uses it, I'm willing to stick to it even if the underlying 4XPath implementation changes. In any case, the most recent revision of the IDL file carries the version number 1.8. > However, when I try to parse the expression: > > //foo > > I get the following output: Notice that this is short for /descendant-or-self::node()/child::foo > createAxisSpecifier 4 > createNameTest None foo > createStep 4 (None, 'foo') [] > createAbbreviatedAbsoluteLocationPath (4, (None, 'foo'), []) > > i.e. createAxisSpecifier() gets as its 'name' argument the number 4, which > indicates the CHILD axis. // should get me the DESCENDANT_OR_SELF (6) axis > however. The first step created is the child::foo step, which is then used to create the abbreviated location path. createAbbreviatedAbsoluteLocationPath has only a single argument, so I'm uncertain why you list it with four arguments. > Placing // in the middle such as with foo//bar still seems to > get me child. Certainly, for the same reason. You should get a abbreviated relative location step in this case, though. > Shouldn't I be getting the same in both cases? Is this a bug or am I > missing something? I think you are missing something. This is difficult matter, though, so I may as well. Regards, Martin From martin@v.loewis.de Fri Dec 21 10:04:28 2001 From: martin@v.loewis.de (Martin v. Loewis) Date: Fri, 21 Dec 2001 11:04:28 +0100 Subject: [XML-SIG] added ParsedXML DOM test suite In-Reply-To: <20011221044318.A11842@vet.uu.nl> (message from Martijn Faassen on Fri, 21 Dec 2001 04:43:18 +0100) References: <20011221044318.A11842@vet.uu.nl> Message-ID: <200112211004.fBLA4Sp01887@mira.informatik.hu-berlin.de> > I've just added the ParsedXML DOM unit test suite to PyXML; to run them > (and discover the nice hangs and errors) run xml/test/test_pyxmldom.py, > which in turn runs the various tests in xml/test/domapi. Thanks! I'll included in PyXML 0.7, although I won't take much effort to let it pass in some way. Regards, Martin From Sylvain.Thenault@logilab.fr Fri Dec 21 10:06:02 2001 From: Sylvain.Thenault@logilab.fr (Sylvain Thenault) Date: Fri, 21 Dec 2001 11:06:02 +0100 (CET) Subject: [XML-SIG] XmlDomGenerator In-Reply-To: <200112210949.fBL9nTr01850@mira.informatik.hu-berlin.de> Message-ID: On Fri, 21 Dec 2001, Martin v. Loewis wrote: > > I've written the joined patch which allow to optionaly give to the > > XmlDomGenerator constructor a DOMImplementation as argument. > > > > Opinion about this change ? Should I commit it ? > > Sounds good to me. It may or may not go into 0.7 (depending on when > exactly I package the tar file). when do you plan to release pyxml 0.7 ? If everybody's OK, I'll commit this this afternoon (Christmas holidays after that ;) > > PS: I can't access the sourceforge cvs from command line since this > > morning , while it works with the web interface. Does someone have the > > same problem ? > > Works fine for me, both with anonymous and ssh access. A recent source > of confusion is that SF now also supports the version 2 protocol of > SSH, which requires a different set of keys. It was effectivly a ssh pb, it works fine now. regards -- Sylvain Thenault LOGILAB http://www.logilab.org From faassen@vet.uu.nl Fri Dec 21 15:12:34 2001 From: faassen@vet.uu.nl (Martijn Faassen) Date: Fri, 21 Dec 2001 16:12:34 +0100 Subject: [XML-SIG] XPathGrammar question In-Reply-To: <200112211003.fBLA3PF01884@mira.informatik.hu-berlin.de> References: <20011221045251.B11842@vet.uu.nl> <200112211003.fBLA3PF01884@mira.informatik.hu-berlin.de> Message-ID: <20011221161233.A13254@vet.uu.nl> Martin v. Loewis wrote: > > So now I'm trying to use it. Late last year Martin posted an IDL > > description of a pluggable parser system, and I can also find a new > > IDL description adding some interfaces to support XSLT. Looking at the > > sources however I think the interfaces have evolved a bit since then; > > is there a more up to date IDL somewhere? > > I'm only aware of a single change that I made a few days ago. Since > nobody was interested in this IDL, I lost interest as well. I'm interested in it; it would've taken me a long time to get to where I am now with an XPath parser, which leaves me to concentrate on the actual semantics instead of the parsing. So, finding your IDL in the archives made me happy. :) > If you > want to use it, feel free to contribute patches. If somebody else > besides me uses it, I'm willing to stick to it even if the underlying > 4XPath implementation changes. > > In any case, the most recent revision of the IDL file carries the > version number 1.8. Is it in CVS somewhere? > > However, when I try to parse the expression: > > > > //foo > > > > I get the following output: > > Notice that this is short for > > /descendant-or-self::node()/child::foo Okay, but feeding that into the parser gets me: createAxisSpecifier 6 createNodeTest 4 createStep 6 4 [] createAxisSpecifier 4 createNameTest None foo createStep 4 (None, 'foo') [] createRelativeLocationPath (6, 4, []) (4, (None, 'foo'), []) createAbsoluteLocationPath ((6, 4, []), (4, (None, 'foo'), [])) I.e. whatever is the case, this still gives me an axis specifier of 6. It looks quite different from the other case.. > > createAxisSpecifier 4 > > createNameTest None foo > > createStep 4 (None, 'foo') [] > > createAbbreviatedAbsoluteLocationPath (4, (None, 'foo'), []) > > > > i.e. createAxisSpecifier() gets as its 'name' argument the number 4, which > > indicates the CHILD axis. // should get me the DESCENDANT_OR_SELF (6) axis > > however. > > The first step created is the child::foo step, which is then used to > create the abbreviated location path. > createAbbreviatedAbsoluteLocationPath has only a single argument, so > I'm uncertain why you list it with four arguments. That's a tuple; I let my simple factory return all its arguments as a tuple all the time, and the parser passes them in again. I wanted to see what the parser did with these, and as I'm exploring what's new territory for me that seemed like a good idea. :) > > Placing // in the middle such as with foo//bar still seems to > > get me child. > > Certainly, for the same reason. You should get a abbreviated relative > location step in this case, though. Well, but foo//bar gets me this: createAxisSpecifier 4 createNameTest None foo createStep 4 (None, 'foo') [] createAxisSpecifier 4 createNameTest None bar createStep 4 (None, 'bar') [] createAbbreviatedRelativeLocationPath (4, (None, 'foo'), []) (4, (None, 'bar'), []) And foo/descendant-or-self::node()/child::bar gets me this: createAxisSpecifier 4 createNameTest None foo createStep 4 (None, 'foo') [] createAxisSpecifier 6 createNodeTest 4 createStep 6 4 [] createRelativeLocationPath (4, (None, 'foo'), []) (6, 4, []) createAxisSpecifier 4 createNameTest None bar createStep 4 (None, 'bar') [] createRelativeLocationPath ((4, (None, 'foo'), []), (6, 4, [])) (4, (None, 'bar'), []) It would seem to me that whatever happens the former should get a descendant-or-self step somewhere in there, so I still don't get it. > > Shouldn't I be getting the same in both cases? Is this a bug or am I > > missing something? > > I think you are missing something. This is difficult matter, though, > so I may as well. I was definitely missing something, but something odd still seems to be going on. Thanks, Martijn From martin@v.loewis.de Fri Dec 21 15:59:00 2001 From: martin@v.loewis.de (Martin v. Loewis) Date: Fri, 21 Dec 2001 16:59:00 +0100 Subject: [XML-SIG] PyXML 0.7 released Message-ID: <200112211559.fBLFwxf01334@mira.informatik.hu-berlin.de> Version 0.7 of the Python/XML distribution is now available. It should be considered a beta release, and can be downloaded from the following URLs: http://prdownloads.sourceforge.net/pyxml/PyXML-0.7.tar.gz http://prdownloads.sourceforge.net/pyxml/PyXML-0.7.win32-py1.5.exe http://prdownloads.sourceforge.net/pyxml/PyXML-0.7.win32-py2.0.exe http://prdownloads.sourceforge.net/pyxml/PyXML-0.7.win32-py2.1.exe http://prdownloads.sourceforge.net/pyxml/PyXML-0.7-1.5.2.i386.rpm http://prdownloads.sourceforge.net/pyxml/PyXML-0.7-2.1.i386.rpm Changes in this version, compared to 0.6.6: * Expat 1.95.2 has been integrated. * James Tauber has contributed an implementation of TREX, in the xml.schema.trex module. * xmlproc has been updated to produce Unicode strings in Python 2.x using the Python codecs to convert the input. * 4XPath and 4XSLT from the 4Suite package have been integrated as xml.xpath and xml.xslt. Both packages are a few releases behind 4Suite. In case of conflicts with a 4Suite installation, passing --without-{xpath,xslt} to setup.py is recommended. * XBEL has been updated to revision 1.1. * The C14N code in xml.dom.ext.c14n was completely rewritten. * Swedish and French messages have been added to xmlproc. * New SAX2 drivers have been added for htmllib, sgmllib, sgmlop, and sgmlop_html. The Python/XML distribution contains the basic tools required for processing XML data using the Python programming language, assembled into one easy-to-install package. The distribution includes parsers and standard interfaces such as SAX and DOM, along with various other useful modules. =20 The package currently contains: * XML parsers: Pyexpat (Jack Jansen), xmlproc (Lars Marius Garshol), sgmlop (Fredrik Lundh). * SAX interface (Lars Marius Garshol) * minidom DOM implementation (Paul Prescod) * 4DOM and 4XPath from Fourthought (Uche Ogbuji, Mike Olson) * Schema implementations: TREX (James Tauber) * Various utility modules and functions (various people) * Documentation and example programs (various people) The code is being developed bazaar-style by contributors from the Python XML Special Interest Group, so please send comments, questions, or bug reports to . For more information about Python and XML, see: http://www.python.org/topics/xml/ --=20 Martin v. L=F6wis http://www.informatik.hu-berlin.de/~loewis From akuchlin@mems-exchange.org Fri Dec 21 16:04:48 2001 From: akuchlin@mems-exchange.org (akuchlin@mems-exchange.org) Date: Fri, 21 Dec 2001 11:04:48 -0500 Subject: [XML-SIG] PyXML 0.7 released In-Reply-To: <200112211559.fBLFwxf01334@mira.informatik.hu-berlin.de>; from martin@v.loewis.de on Fri, Dec 21, 2001 at 04:59:00PM +0100 References: <200112211559.fBLFwxf01334@mira.informatik.hu-berlin.de> Message-ID: <20011221110448.A20022@mozart.mems-exchange.org> On Fri, Dec 21, 2001 at 04:59:00PM +0100, Martin v. Loewis wrote: > * James Tauber has contributed an implementation of TREX, > in the xml.schema.trex module. James (or anyone), any plans to implement RELAX NG support, whether in Python or as an interface to a third-party library? --amk From martin@v.loewis.de Fri Dec 21 16:17:23 2001 From: martin@v.loewis.de (Martin v. Loewis) Date: Fri, 21 Dec 2001 17:17:23 +0100 Subject: [XML-SIG] XPathGrammar question In-Reply-To: <20011221161233.A13254@vet.uu.nl> (message from Martijn Faassen on Fri, 21 Dec 2001 16:12:34 +0100) References: <20011221045251.B11842@vet.uu.nl> <200112211003.fBLA3PF01884@mira.informatik.hu-berlin.de> <20011221161233.A13254@vet.uu.nl> Message-ID: <200112211617.fBLGHNl01428@mira.informatik.hu-berlin.de> > Is it in CVS somewhere? Yes, on my local disk :-) I'll attach another copy now, and perhaps put it into PyXML later. > > /descendant-or-self::node()/child::foo > > Okay, but feeding that into the parser gets me: > > createAxisSpecifier 6 > createNodeTest 4 > createStep 6 4 [] > createAxisSpecifier 4 > createNameTest None foo > createStep 4 (None, 'foo') [] > createRelativeLocationPath (6, 4, []) (4, (None, 'foo'), []) > createAbsoluteLocationPath ((6, 4, []), (4, (None, 'foo'), [])) > > I.e. whatever is the case, this still gives me an axis specifier of 6. > It looks quite different from the other case.. It creates two axis specifiers: from left to right, it first creates one for 6 (DESCENDANT_OR_SELF_AXIS), and then for 4 (CHILD_AXIS). The interesting part is how those are combined to steps and location paths. In this case, you get two steps. > > > > createAxisSpecifier 4 > > > createNameTest None foo > > > createStep 4 (None, 'foo') [] > > > createAbbreviatedAbsoluteLocationPath (4, (None, 'foo'), []) In this case, you get only one step (for child::foo). The other step is "hidden" in the abbreviation; this is the one that you expect to be DESCENDANT_OR_SELF_AXIS. There is no step in the (literal, unexpanded) input, so the parser does not create one. It might be appropriate for you to expand the abbreviation in the implementation of createAbbreviatedAbsoluteLocationPath. Alternatively, you could return some representation that allows you faster evaluation of the abbreviation; that is up to the factory. > That's a tuple; I let my simple factory return all its arguments as a > tuple all the time, and the parser passes them in again. I wanted to > see what the parser did with these, and as I'm exploring what's > new territory for me that seemed like a good idea. :) Sounds reasonable; that is how I first 'implemented' the Spark-based parser. > Well, but foo//bar gets me this: > > createAxisSpecifier 4 > createNameTest None foo > createStep 4 (None, 'foo') [] > createAxisSpecifier 4 > createNameTest None bar > createStep 4 (None, 'bar') [] > createAbbreviatedRelativeLocationPath (4, (None, 'foo'), []) (4, (None, 'bar'), []) What did you expect instead? The syntax for this is Step '//' Step So it creates two steps, then the abbreviated location path. Notice that there are only two steps in this syntax, one before the short-hand, and one after the short-hand //. > It would seem to me that whatever happens the former should get a > descendant-or-self step somewhere in there, so I still don't get it. In the abbreviation? No, it does not contain a step - it is an abbreviation. The fact that it is an abbreviation is communicated by calling createAbbreviatedRelativeLocationPath (for the relative case). Regards, Martin From martin@v.loewis.de Fri Dec 21 16:18:07 2001 From: martin@v.loewis.de (Martin v. Loewis) Date: Fri, 21 Dec 2001 17:18:07 +0100 Subject: [XML-SIG] XPath IDL Message-ID: <200112211618.fBLGI7R01431@mira.informatik.hu-berlin.de> For those looking for the latest copy: see below Regards, Martin // $Revision: 1.8 $ module XPath{ typedef wstring DOMString; const unsigned short ABSOLUTE_LOCATION_PATH = 1; const unsigned short ABBREVIATED_ABSOLUTE_LOCATION_PATH = 2; const unsigned short RELATIVE_LOCATION_PATH = 3; const unsigned short ABBREVIATED_RELATIVE_LOCATION_PATH = 4; const unsigned short STEP_EXPR = 5; // STEP would conflict with Step in case const unsigned short NODE_TEST = 6; const unsigned short NAME_TEST = 7; const unsigned short BOOLEAN_EXPR = 8; const unsigned short NUMERIC_EXPR = 9; const unsigned short PATH_EXPR = 10; const unsigned short ABBREVIATED_PATH_EXPR = 11; // filter '//' path const unsigned short FILTER_EXPR = 12; const unsigned short VARIABLE_REFERENCE = 13; const unsigned short LITERAL_EXPR = 14; const unsigned short NUMBER_EXPR = 15; const unsigned short FUNCTION_CALL = 16; // XSLT const unsigned short PATTERN = 17; const unsigned short LOCATION_PATTERN = 18; const unsigned short RELATIVE_PATH_PATTERN = 19; const unsigned short STEP_PATTERN = 20; Interface Expr{ readonly attribute unsigned short exprType; DOMString pprint(); }; interface AbsoluteLocationPath; interface AbbreviatedAbsoluteLocationPath; interface RelativeLocationPath; interface Step; interface AxisSpecifier; interface NodeTest; typedef sequence PredicateList, ExprList; interface NameTest; interface NumericExpr; interface UnaryExpr; interface UnionExpr; interface PathExpr; interface FilterExpr; interface VariableReference; interface Literal; interface Number; interface FunctionCall; interface ExprFactory{ AbsoluteLocationPath createAbsoluteLocationPath(in RelativeLocationPath p); AbsoluteLocationPath createAbbreviatedAbsoluteLocationPath(in RelativeLocationPath p); RelativeLocationPath createRelativeLocationPath(in RelativeLocationPath left, in Step right); RelativeLocationPath createAbbreviatedRelativeLocationPath(in RelativeLocationPath left, in Step right); Step createStep(in AxisSpecifier axis, in NodeTest test, in PredicateList predicates); // . is represented as self::node(); .. as parent::node() Step createAbbreviatedStep(in boolean dotdot); // false for .; true for .. // An omitted axisname is created as CHILD; @ is created as ATTRIBUTE AxisSpecifier createAxisSpecifier(in unsigned short name); NodeTest createNodeTest(in unsigned short type); NameTest createNameTest(in DOMString prefix, in DOMString localName); NumericExpr createNumericExpr(in unsigned short operator, in Expr left, in Expr right); UnaryExpr createBooleanExpr(in unsigned short operator, in Expr left, in Expr right); PathExpr createPathExpr(in Expr filter, in Expr path); // filter '//' path PathExpr createAbbreviatedPathExpr(in Expr filter, in Expr path); FilterExpr createFilterExpr(in Expr filter, in Expr predicate); // the name must not contain the leading $ VariableReference createVariableReference(in DOMString prefix, in DOMString localName); Literal createLiteral(in DOMString literal); Number createNumber(in DOMString value); FunctionCall createFunctionCall(in DOMString prefix, in DOMString localName, in ExprList args); }; interface Parser{ Expr parseExpr(in DOMString path); }; interface AbsoluteLocationPath:Expr{ /* '/' relative-opt, or '//' relative */ readonly attribute Expr relative; // step or relative path, or null }; interface RelativeLocationPath:Expr{ readonly attribute Expr left; // step or relative path readonly attribute Step right; }; interface Step:Expr{ readonly attribute AxisSpecifier axis; readonly attribute NodeTest test; readonly attribute PredicateList predicates; }; const unsigned short ANCESTOR_AXIS = 1; const unsigned short ANCESTOR_OR_SELF_AXIS = 2; const unsigned short ATTRIBUTE_AXIS = 3; // attribute is a keyword const unsigned short CHILD_AXIS = 4; const unsigned short DESCENDANT_AXIS = 5; const unsigned short DESCENDANT_OR_SELF_AXIS = 6; const unsigned short FOLLOWING_AXIS = 7; const unsigned short FOLLOWING_SIBLING_AXIS = 8; const unsigned short NAMESPACE_AXIS = 9; const unsigned short PARENT_AXIS = 10; const unsigned short PRECEDING_AXIS = 11; const unsigned short PRECEDING_SIBLING_AXIS = 12; const unsigned short SELF_AXIS = 13; interface AxisSpecifier:Expr{ readonly attribute unsigned short axisType; }; const unsigned short COMMENT = 1; const unsigned short TEXT = 2; const unsigned short PROCESSING_INSTRUCTION = 3; const unsigned short NODE = 4; interface NodeTest:Expr{ readonly attribute unsigned short testType; readonly attribute DOMString literal; // only for PROCESSING_INSTRUCTION }; interface NameTest:Expr{ readonly attribute DOMString prefix; // may be null readonly attribute DOMString localName; // may be "*" }; // objects implement either NumericExpr or BooleanExpr interface BinaryExpr:Expr{ readonly attribute unsigned short operator; readonly attribute Expr left,right; }; const unsigned short OR_OPERATOR = 1; const unsigned short AND_OPERATOR = 2; const unsigned short EQ_OPERATOR = 3; const unsigned short NEQ_OPERATOR = 4; const unsigned short LT_OPERATOR = 5; const unsigned short GT_OPERATOR = 6; const unsigned short LE_OPERATOR = 7; const unsigned short GE_OPERATOR = 8; interface BooleanExpr:BinaryExpr{ }; const unsigned short PLUS_OPERATOR = 9; const unsigned short MINUS_OPERATOR = 10; const unsigned short TIMES_OPERATOR = 11; const unsigned short DIV_OPERATOR = 12; const unsigned short MOD_OPERATOR = 13; const unsigned short UNION_OPERATOR = 14; interface NumericExpr:BinaryExpr{ }; interface PathExpr:Expr{ readonly attribute Expr filter; readonly attribute Expr path; }; interface FilterExpr:Expr{ readonly attribute Expr filter; readonly attribute Expr predicate; }; interface VariableReference:Expr{ readonly attribute DOMString name; }; interface Literal:Expr{ readonly attribute DOMString value; }; interface Number:Expr{ readonly attribute double value; }; interface FunctionCall:Expr{ readonly attribute DOMString name; readonly attribute ExprList args; }; // XSLT interface Pattern; interface LocationPathPattern; interface RelativePathPattern; interface StepPattern; interface PatternFactory:ExprFactory{ Pattern createPattern(in LocationPathPattern first); // If idkey is not null, it represents IdKeyPattern // if parent is true, it is '/', else '//' // rel may be null LocationPathPattern createLocationPathPattern(in FunctionCall idkey, boolean parent, in RelativePathPattern rel); // if parent is true, it is /, else // RelativePathPattern createRelativePathPattern(in RelativePathPattern rel, boolean parent, in StepPattern step); StepPattern createStepPattern(in AxisSpecifier axis, in NodeTest test, in PredicateList predicates); }; typedef sequence LocationPathPatterns; interface Pattern:Expr{ readonly attribute LocationPathPatterns patterns; void append(in LocationPathPattern pattern); }; interface LocationPathPattern:Expr{ readonly attribute FunctionCall idkey; readonly attribute boolean parent; readonly attribute RelativePathPattern relative_pattern; }; interface RelativePathPattern:Expr{ readonly attribute RelativePathPattern relative; readonly attribute boolean parent; readonly attribute StepPattern step; }; interface StepPattern:Expr{ readonly attribute AxisSpecifier axis; readonly attribute NodeTest test; readonly attribute PredicateList predicates; }; interface XSLTParser:Parser{ Pattern parsePattern(in DOMString pattern); }; }; From martin@v.loewis.de Fri Dec 21 16:26:12 2001 From: martin@v.loewis.de (Martin v. Loewis) Date: Fri, 21 Dec 2001 17:26:12 +0100 Subject: [XML-SIG] DOM test failures In-Reply-To: (message from Alexandre Fayolle on Wed, 19 Dec 2001 18:45:49 +0100 (CET)) References: Message-ID: <200112211626.fBLGQCO01484@mira.informatik.hu-berlin.de> > I suggest reverting the changes I made (that is removing the delegation of > all calls to non NS aware methods to the NS aware ones, using > EMPTY_NAMESPACE as the namespace). The main goal was to enable the query > of the NS attributes on calls to getAttribute and getAttributeNS. The same > effect could be achieved by having getAttribute and getAttributeNode call > getAttributeNS(EMPTY_NAMESPACE,name) (resp. getAttributeNodeNS) if the > lookup using the DOM L1 procedure gives nothing. This is what I ended up doing (although in NamedNodeMap only, since everything else seems to delegate there). It would be good if you could take another look - I only changed things so far that the test suite works, again; I may have missed some places. There is no need to hurry, though, since 0.7.1 will be released next year. Regards, Martin From webmaster@greencn.com Mon Dec 24 09:50:17 2001 From: webmaster@greencn.com (ÂÌÉ«Öлª) Date: 24 Dec 2001 09:50:17 -0000 Subject: [XML-SIG] ÖÂÈ«¹úÅ©ÒµÐÐÒµ¹¤×÷Õߣ¡ (È«¹úÂÌÉ«ÆóÒµ´óÈ«) Message-ID: <20011224095017.32667.qmail@int.now.net.cn> ÖÂÈ«¹úÅ©ÒµÐÐÒµ¹¤×÷Õߣ¡ (È«¹úÂÌÉ«ÆóÒµ´óÈ«) ÔÚ¼ÓÈëWTOÖ®¼Ê£¬Öйú×÷ΪÊÀ½çÅ©Òµ´ó¹úÖ®Ò»£¬Òò´ËÎÒÃÇÃæ¶ÔµÄ¾ºÕùÓë»úÓö¶¼ÊǾ޴óµÄ¡£ ÔÚÐÅÏ¢ÈÕÒæÅòÕ͵ĽñÌ죬µç×ÓÉÌÎñ×÷ΪһÖÖÄÜÍ»ÆÆÏÖÓз¢Õ¹¿Õ¼äµÄ×îÏȽøµÄÐÅÏ¢¼¼Êõ£¬ ½«ÄÜΪũҵ´øÀ´ÎÞÇîµÄ»îÁ¦ÓëÉÌ»ú¡£ ÂÌÉ«ÖлªÍøhttp://GreenCN.com×Ô³ÉÁ¢ÒÔÀ´Ò»Ö±ÒÔ´Ù½øÈ«¹úµÄÅ©Òµ²úÆ·¡¢¼¼ÊõΪ×ÚÖ¼ ÏÖÍƳöÃâ·ÑµÇ¼ÇÆóÒµ×ÊÁÏ£¬·¢²¼Å©ÒµÐÅÏ¢,ÈÃÖйúµÄÂÌÉ«Æóҵƾ½è»¥ÁªÍøÕâһǿ´óµÄÐÅÏ¢ ½»Á÷¹¤¾ß°ïÖúÆóÒµ¸üºÃµØÍƹãÄúµÄвúÆ·£¬´Ù½øÈ«¹úÅ©²úÆ·µÄÓÐЧ½»Á÷¡£ ÏÖÍƳö"È«¹úÂÌÉ«ÆóÒµ´óÈ«" ¡îÆóÒµÃâ·ÑµÇ¼Ç¡ª¡ªÃâ·ÑµÇ¼ÇÆóÒµ×ÊÁÏ¡¢²úÆ·ÐÅÏ¢¡¢ÒµÎñÁªÏµ¡¢ÍøÕ¾·¢²¼ ÆóÒµÀà±ð·Ç³£¾ßÌåÍêÉÆ£¬±ãÓÚ¿Í»§Ñ°ÕÒÄãµÄÆóÒµÐÅÏ¢£¬ÎÞÏÞÉÌ»ú£¬ÓÉ´Ë¿ªÊ¼£¡ Á¢¼´µÇ¼ÇÄãµÄÆóÒµ£¬Çë½øÈëhttp://www.greencn.com Òª·¢²¼Å©¡¢ÁÖ¡¢ÄÁ¡¢Óæ¡¢ÄñÒµµÄ²úÆ·ÐÅÏ¢£¬µÇ¼ÇÆóÒµ²úÆ·×ÊÁÏ£¬ ¾ÍÇëµ½http://sites.greencn.com ÂÌÉ«ÖлªÀ´°É£¡ ´óÐÍÅ©ÒµÉÌÎñÍø¡ª¡ªÂÌÉ«Öлª http://www.greencn.comÏÖÔÚ¿ªÉèµÄÀ¸Ä¿ÓУº ¡î²úÆ·½»Ò׹㳡¡ª¡ªÅ©×÷Îï²úÆ·¹©ÇóÐÅÏ¢·¢²¼ÖÐÐÄ£¬ÏÂÉ裺 ¸÷ÀàÂÌÉ«²úÆ·½»Ò×Çø Å©²úÆ·½»Ò×Çø ÁÖÒµ¡¢Ë®¹û²úÆ·½»Ò×Çø Ïà¹Ø»úе²úÆ·½»Ò×Çø ÐóÄÁ¡¢ÓæÒµ½»Ò×Çø ¡îÆóÒµ×ÔÖú½¨Õ¾¡ª¡ªÃâ·ÑʹÓÃ15Ì죡ÇáËɹ¹½¨ÆóÒµÍøÉÏÉÌÆÌ£¬ÎÞÐè·±ËöµÄÍøÒ³ÖÆ×÷֪ʶ£¡×ÔÖú·¢²¼ ²úÆ·ÐÅÏ¢£¬×ÔÖú¸üвúÆ·ÐÅÏ¢£¬ÍêȫʵÏÖÔÚÏßµç×ÓÉÌÎñ£¡ ¡î¡î¡îÔÚ2001.1.1Ç°Íê³É½»·ÑµÄÓû§¿ÉÏíÊÜ380Ôª/Äê µÄ³¬µÍ¼Û¸ñ£¡ 1¡¢ ÍøÕ¾½¨Éèר¼Ò£¬×Ô¶¯½¨Éèϵͳ£¬ÎÞÐ趮µÃÖÆ×÷ÍøÒ³µÄÓïÑÔ£¬ÄúÖ»ÐèÒª×÷µÄ¾ÍÊÇ£¬ ×÷³ö¼òµ¥µÄÑ¡Ôñ£¬ÍøÕ¾¾ÍÇáËÉ¡¢¿ì½ÝµÄ½¨³ÉÁË£¡ 2¡¢ Í걸µÄºǫ́¹ÜÀíϵͳ£¬°ïÖúÄúÓÐЧµØ¸üйÜÀíÄúµÄÍøÕ¾ 3¡¢ ±¾¹«Ë¾ÌṩÃâ·ÑÊÔÓÃÒ»¸öÔ£¨ÆóÒµÐÍË͹ú¼ÊÓòÃû£© 4¡¢ È«Êý¾Ý¿âÇý¶¯,×ÔÓÉ·ÖÀà,ÖÇÄܲúÆ·¹ÜÀí£¡Ç¿´ó¡¢Áé»î 5¡¢ ¶ÀÁ¢ÍøÖ·¡¢ÈÃÄúºÍ¿Í»§¸ü½Ó½ü ÏÖÔھͽ¨Á¢ÄãµÄÔÚÏßÉÌÆÌ£ºhttp://sites.greencn.com/ From fdrake@acm.org Wed Dec 26 21:17:09 2001 From: fdrake@acm.org (Fred L. Drake, Jr.) Date: Wed, 26 Dec 2001 16:17:09 -0500 (EST) Subject: [XML-SIG] DOM test failures In-Reply-To: <200112182255.fBIMtLc03871@localhost.localdomain> References: <15386.15374.948162.281667@grendel.zope.com> <200112182255.fBIMtLc03871@localhost.localdomain> Message-ID: <15402.15957.536943.539330@cj42289-a.reston1.va.home.com> Uche Ogbuji writes: > I'll be there. I think we should try to have a few BOFS/sessions: I'm the BoFs chair. Guidelines for requesting a BoF are posted at: http://www.python10.org/p10-callBoFs.html -Fred -- Fred L. Drake, Jr. PythonLabs at Zope Corporation From Jacco.van.Ossenbruggen@cwi.nl Thu Dec 27 15:06:55 2001 From: Jacco.van.Ossenbruggen@cwi.nl (J.R. van Ossenbruggen) Date: Thu, 27 Dec 2001 16:06:55 +0100 Subject: [XML-SIG] printing Unicode xml to StringIO Message-ID: <200112271506.fBRF6uF26242@spinaker.ins.cwi.nl> I'm using xml.dom.ext.Print() to print a dom node to a StringIO object, which fails when the data cannot be interpreted as ASCII. After a lot of XML hacking, I think it is not in the XML code, but in the StringIO: Python 2.2+ (#4, Dec 27 2001, 12:46:04) [GCC 2.96 20000731 (Red Hat Linux 7.1 2.96-81)] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> import StringIO >>> s=StringIO.StringIO() >>> u=u'\xc9' >>> s.write(u) Traceback (most recent call last): File "", line 1, in ? File "/usr/local/lib/python2.2/StringIO.py", line 139, in write s = str(s) UnicodeError: ASCII encoding error: ordinal not in range(128) What is going wrong here? According to the manual, StringIO should be able to handle utf-8 strings... Also note that the different versions of python on my system all seem to behave differently on the code above. For example, in 2.1, the write succeeds but the latin-1 encode seems to go wrong: Python 2.1.1 (#1, Aug 13 2001, 19:37:40) [GCC 2.96 20000731 (Red Hat Linux 7.1 2.96-96)] on linux2 Type "copyright", "credits" or "license" for more information. >>> import StringIO >>> s=StringIO.StringIO() >>> u=u'\xc9' >>> s.write(u) >>> s.getvalue().encode('latin-1')" # Expected 'É' here: '\xc9' >>> s.getvalue() # Still it claims to be unicode: u'\xc9' Any help would be appreciated, Jacco From martin@v.loewis.de Thu Dec 27 17:36:50 2001 From: martin@v.loewis.de (Martin v. Loewis) Date: Thu, 27 Dec 2001 18:36:50 +0100 Subject: [XML-SIG] printing Unicode xml to StringIO In-Reply-To: <200112271506.fBRF6uF26242@spinaker.ins.cwi.nl> (Jacco.van.Ossenbruggen@cwi.nl) References: <200112271506.fBRF6uF26242@spinaker.ins.cwi.nl> Message-ID: <200112271736.fBRHaom02848@mira.informatik.hu-berlin.de> > What is going wrong here? According to the manual, StringIO should be able > to handle utf-8 strings... That's a bug in Python, introduced with rev 1.19 of StringIO.py, as part of patch #462596. Please submit a bug report on SF. Regards, Martin P.S. "unicode string" != "utf-8 string" From mal@lemburg.com Fri Dec 28 08:57:42 2001 From: mal@lemburg.com (M.-A. Lemburg) Date: Fri, 28 Dec 2001 09:57:42 +0100 Subject: [XML-SIG] printing Unicode xml to StringIO References: <200112271506.fBRF6uF26242@spinaker.ins.cwi.nl> <200112271736.fBRHaom02848@mira.informatik.hu-berlin.de> Message-ID: <3C2C3406.CB6D49DB@lemburg.com> "Martin v. Loewis" wrote: > > > What is going wrong here? According to the manual, StringIO should be able > > to handle utf-8 strings... > > That's a bug in Python, introduced with rev 1.19 of StringIO.py, as > part of patch #462596. Please submit a bug report on SF. Actually, I think that this is a bug in the documentation, not the code. StringIO and cStringIO were never meant to work on anything but strings and memory buffers. The note that Fred added to the docs about StringIO's capability of storing Unicode in it's buffer list is simply an artifact of the implementation. Please use the .encode() method on Unicode objects before writing them to a StringIO object. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From Jacco.van.Ossenbruggen@cwi.nl Fri Dec 28 10:50:34 2001 From: Jacco.van.Ossenbruggen@cwi.nl (J.R. van Ossenbruggen) Date: Fri, 28 Dec 2001 11:50:34 +0100 (CET) Subject: [XML-SIG] printing Unicode xml to StringIO In-Reply-To: <3C2C3406.CB6D49DB@lemburg.com> from "M.-A. Lemburg" at Dec 28, 2001 09:57:42 AM Message-ID: <200112281050.fBSAoYE21042@spinaker.ins.cwi.nl> Marc-Andre Lemburg wrote: > Actually, I think that this is a bug in the documentation, not the > code. StringIO and cStringIO were never meant to work on anything but > strings and memory buffers. > > The note that Fred added to the docs about > StringIO's capability of storing Unicode in it's buffer list is > simply an artifact of the implementation. > > Please use the .encode() method on Unicode objects before writing > them to a StringIO object. I still think the change in StringIO behavior from 2.1 to 2.2 is a bit weird. But you are right about the ability of StringIO to handle encoded Unicode. In fact, the code in xml.dom.ext.Print seems to do the right encoding before writing to the stream. Martin v. Loewis wrote: > P.S. "unicode string" != "utf-8 string" That was, actually, the error in my head that messed everything up. I was printing to StringIO using "utf-8" encoding, expecting to get a "unicode string" back. Doing a decode('utf-8') on the value returned by StringIO.getvalue() (this decode _does_ give me the unicode string back, right?) seems to solve my problems. Thanks for pointing this out guys, it would have kept me busy for a quite while otherwise! Jacco PS: Martin, also thanks for taking this to python-dev. I'm not sure whether it still makes sense to file a bug report at SF? From martin@v.loewis.de Fri Dec 28 11:15:43 2001 From: martin@v.loewis.de (Martin v. Loewis) Date: Fri, 28 Dec 2001 12:15:43 +0100 Subject: [XML-SIG] printing Unicode xml to StringIO In-Reply-To: <200112281050.fBSAoYE21042@spinaker.ins.cwi.nl> (Jacco.van.Ossenbruggen@cwi.nl) References: <200112281050.fBSAoYE21042@spinaker.ins.cwi.nl> Message-ID: <200112281115.fBSBFh602382@mira.informatik.hu-berlin.de> > PS: Martin, also thanks for taking this to python-dev. I'm not sure > whether it still makes sense to file a bug report at SF? If you still think there is a bug, please do. If MAL's point-of-view has convinced you, there's no need - we'd just wait for the next time somebody runs into the problem, to get a better understanding of whether the change is acceptable to users or not. Regards, Martin From noreply@sourceforge.net Fri Dec 28 13:47:17 2001 From: noreply@sourceforge.net (noreply@sourceforge.net) Date: Fri, 28 Dec 2001 05:47:17 -0800 Subject: [XML-SIG] [ pyxml-Bugs-497322 ] sgmlop and unicode charrefs Message-ID: Bugs item #497322, was opened at 2001-12-28 05:47 You can respond by visiting: http://sourceforge.net/tracker/?func=detail&atid=106473&aid=497322&group_id=6473 Category: None Group: None Status: Open Resolution: None Priority: 5 Submitted By: Walter Dörwald (doerwalter) Assigned to: Nobody/Anonymous (nobody) Summary: sgmlop and unicode charrefs Initial Comment: sgmlop has a problem with unicode character references when the handler doesn't implement handle_charref (and sgmlop forwards the call to handle_data). The following test script shows the problem: ---- from xml.parsers import sgmlop class Handler: def handle_data(self, data): print "handle_data", repr(data) class Handler2(Handler): def handle_charref(self, data): print "handle_charref", repr(data) p = sgmlop.XMLParser() p.register(Handler()) p.parse("€") p.register(Handler2()) p.parse("€") ---- The output is the following: ---- handle_data '\xac' handle_charref '8364' ---- i.e. parsing works with Handler2, but not with Handler. To fix this bug sgmlop has to return unicode objects. (There's already a patch for that, see #412237 "sgmlop returns Unicode") ---------------------------------------------------------------------- You can respond by visiting: http://sourceforge.net/tracker/?func=detail&atid=106473&aid=497322&group_id=6473 From jmarant@free.fr Sat Dec 29 11:47:35 2001 From: jmarant@free.fr (=?iso-8859-1?q?J=E9r=F4me?= Marant) Date: 29 Dec 2001 12:47:35 +0100 Subject: [XML-SIG] fix for setup.py Message-ID: <87n102z1rc.fsf@marant.org> Hi, Here is a fix allowing --without-xslt to be considered. I think that did not test that. Cheers, --- setup.py.orig Sat Dec 29 12:36:17 2001 +++ setup.py Sat Dec 29 12:44:03 2001 @@ -50,7 +50,7 @@ with_xpath = 0 sys.argv.remove(arg) elif arg == '--without-xslt': - without_xslt = 0 + with_xslt = 0 sys.argv.remove(arg) if with_xpath: -- Jérôme Marant http://marant.org From martin@v.loewis.de Sun Dec 30 10:36:30 2001 From: martin@v.loewis.de (Martin v. Loewis) Date: Sun, 30 Dec 2001 11:36:30 +0100 Subject: [XML-SIG] fix for setup.py In-Reply-To: <87n102z1rc.fsf@marant.org> (jmarant@free.fr) References: <87n102z1rc.fsf@marant.org> Message-ID: <200112301036.fBUAaU202464@mira.informatik.hu-berlin.de> > Here is a fix allowing --without-xslt to be considered. > I think that did not test that. Oops. Thanks for the patch; I've just applied it. Regards, Martin From info@mjais.de Mon Dec 31 13:07:15 2001 From: info@mjais.de (Markus Jais) Date: Mon, 31 Dec 2001 14:07:15 +0100 Subject: [XML-SIG] install question for PyXML-0.7 Message-ID: hello I just wanted to intall PyXML without xslt and xpath, because according to the ANNOUNCE file, this are older packages as those which come with 4Suite. because I wanted the newest I tried the following as suggested in the ANNOUNCE file. python setup.py --without-{xpath,xslt} build and I also tried python setup.py build --without-{xpath,xslt} but when I go to /usr/local/lib/python2.2/site-packages/_xmlplus and type $ ls I still see a directory called "xpath" and one called "xslt". can you tell me, how to exclude xpath and xslt from PyXML so I can use those which come with 4Suite ?????? thanks a lot markus -- Markus Jais http://www.mjais.de info@mjais.de The road goes ever on and on - Bilbo Baggins From martin@v.loewis.de Mon Dec 31 13:34:58 2001 From: martin@v.loewis.de (Martin v. Loewis) Date: Mon, 31 Dec 2001 14:34:58 +0100 Subject: [XML-SIG] install question for PyXML-0.7 In-Reply-To: (message from Markus Jais on Mon, 31 Dec 2001 14:07:15 +0100) References: Message-ID: <200112311334.fBVDYwW02376@mira.informatik.hu-berlin.de> > python setup.py build --without-{xpath,xslt} > > but when I go to > /usr/local/lib/python2.2/site-packages/_xmlplus > and type > $ ls > I still see a directory called "xpath" and one called "xslt". I'm surprised you see a xpath directory, this is not supposed to happen. As for xslt; this is a bug in setup.py. Replace the assignment without_xslt = 0 with the line with_xslt = 0 > can you tell me, how to exclude xpath and xslt from PyXML so > I can use those which come with 4Suite ?????? Just delete the resulting xpath and xslt directories. Regards, Martin From info@mjais.de Mon Dec 31 15:14:45 2001 From: info@mjais.de (Markus Jais) Date: Mon, 31 Dec 2001 16:14:45 +0100 Subject: [XML-SIG] install question for PyXML-0.7 In-Reply-To: <200112311334.fBVDYwW02376@mira.informatik.hu-berlin.de> References: <200112311334.fBVDYwW02376@mira.informatik.hu-berlin.de> Message-ID: On Monday 31 December 2001 14:34, you wrote: > > python setup.py build --without-{xpath,xslt} > > > > but when I go to > > /usr/local/lib/python2.2/site-packages/_xmlplus > > and type > > $ ls > > I still see a directory called "xpath" and one called "xslt". > > I'm surprised you see a xpath directory, this is not supposed to > happen. As for xslt; this is a bug in setup.py. Replace the assignment thanks for your mail. it works now. I changed with_xslt = 1 with_xpath = 1 in the setup.py script in line 34 and 35 there was a xpath derictory when I intalled it the first time: $ ls /usr/local/lib/python2.2/site-packages/_xmlplus/ outputs: FtCore.py __init__.py _checkversion.py dom ns.py parsers schema utils xslt FtCore.pyc __init__.pyc _checkversion.pyc marshal ns.pyc sax unicode xpath after I had changed the setup.py everything was fine. thanks. markus > > without_xslt = 0 > > with the line > > with_xslt = 0 > > > can you tell me, how to exclude xpath and xslt from PyXML so > > I can use those which come with 4Suite ?????? > > Just delete the resulting xpath and xslt directories. > > Regards, > Martin -- Markus Jais http://www.mjais.de info@mjais.de The road goes ever on and on - Bilbo Baggins From info@mjais.de Mon Dec 31 15:17:55 2001 From: info@mjais.de (Markus Jais) Date: Mon, 31 Dec 2001 16:17:55 +0100 Subject: [XML-SIG] install question for PyXML-0.7 In-Reply-To: References: <200112311334.fBVDYwW02376@mira.informatik.hu-berlin.de> Message-ID: On Monday 31 December 2001 16:14, Markus Jais wrote: > On Monday 31 December 2001 14:34, you wrote: > > > python setup.py build --without-{xpath,xslt} > > > > > > but when I go to > > > /usr/local/lib/python2.2/site-packages/_xmlplus > > > and type > > > $ ls > > > I still see a directory called "xpath" and one called "xslt". > > > > I'm surprised you see a xpath directory, this is not supposed to > > happen. As for xslt; this is a bug in setup.py. Replace the assignment > > thanks for your mail. it works now. > I changed > with_xslt = 1 > with_xpath = 1 nonsense! of cource I changed them to with_xslt = 0 with_xpath = 0 markus > in the setup.py script in line 34 and 35 > > there was a xpath derictory when I intalled it the first time: > > $ ls /usr/local/lib/python2.2/site-packages/_xmlplus/ > outputs: > FtCore.py __init__.py _checkversion.py dom ns.py parsers > schema utils xslt > FtCore.pyc __init__.pyc _checkversion.pyc marshal ns.pyc sax > unicode xpath > > after I had changed the setup.py everything was fine. > > thanks. > markus > > > without_xslt = 0 > > > > with the line > > > > with_xslt = 0 > > > > > can you tell me, how to exclude xpath and xslt from PyXML so > > > I can use those which come with 4Suite ?????? > > > > Just delete the resulting xpath and xslt directories. > > > > Regards, > > Martin -- Markus Jais http://www.mjais.de info@mjais.de The road goes ever on and on - Bilbo Baggins