From tpassin@idsonline.com Wed Mar 1 02:10:42 2000 From: tpassin@idsonline.com (THOMAS PASSIN) Date: Tue, 29 Feb 2000 21:10:42 -0500 Subject: [XML-SIG] SAX 2.0 names References: <14523.58937.766784.166817@weyr.cnri.reston.va.us><14523.62567.356663.65659@weyr.cnri.reston.va.us><001801bf82f5$bba340e0$4d15b0cf@idsonline.com> <14524.14187.795572.189167@weyr.cnri.reston.va.us> Message-ID: <003201bf8323$597691a0$4d15b0cf@idsonline.com> Fred L. Drake, Jr. wrote- > > THOMAS PASSIN writes: > > In earlier posts I suggested tuples. Fred and Lars' posts seem to be saying > > that tuples shouldn't cause a bug performance hit, and that could possibly > > be finessed anyway. Have I summarized what you have said correctly, Fred > > and Lars? > > That's my interpretation. > > > Then I think we should go with tuples, because > > 1) They are easy for a non-expert Python programmer to understand and work > > with, > > 2) they capitalize on a Python strength (nice data structures), > > 3) an expert can make them perform even better with extension modules, and > > 4) as Fred said, if the extension module were not available one could fall > > back to a 100% Python implementation with practically no changes to existing > > code. > > The "object" I imagine has three attributes: namespace URI, > localpart, and prefix. It would unpack to two values: URI & > localpart, and comparisons would only operate on those two as well. This sounds much like my original proposal for a nested tuple. Perhaps ((localname,uri),prefix). Lars pointed out that the java SAX2 people seem to want the raw name - I'm not convinced since you need the namespace to confirm what the localname is supposed to mean, not the rawname. Comparisons are very easy. Will a nested tuple drag down performance a lot more than a plain tuple? Again, I think that say, a one or two percent decrease in real-life usage is nothing to worry about. > The advantage is that we get the prefix for those who want it, > single object comparisons, and no extraneous parameters to the call. > I don't think *this* is available using the non-object approaches. > Whether the objects are extension types or classes is irrelevant to > this. > > Regards, Tom Passin From larsga@garshol.priv.no Wed Mar 1 10:00:03 2000 From: larsga@garshol.priv.no (Lars Marius Garshol) Date: 01 Mar 2000 11:00:03 +0100 Subject: [XML-SIG] SAX 2.0 names In-Reply-To: <001801bf82f5$bba340e0$4d15b0cf@idsonline.com> References: <14523.58937.766784.166817@weyr.cnri.reston.va.us> <14523.62567.356663.65659@weyr.cnri.reston.va.us> <001801bf82f5$bba340e0$4d15b0cf@idsonline.com> Message-ID: * THOMAS PASSIN | | In earlier posts I suggested tuples. Fred and Lars' posts seem to | be saying that tuples shouldn't cause a bug performance hit, and | that could possibly be finessed anyway. Have I summarized what you | have said correctly, Fred and Lars? As far as I can see, yes. | Then I think we should go with tuples, [...] These are all good points, but I'm still undecided. --Lars M. From larsga@garshol.priv.no Wed Mar 1 10:02:07 2000 From: larsga@garshol.priv.no (Lars Marius Garshol) Date: 01 Mar 2000 11:02:07 +0100 Subject: [XML-SIG] SAX 2.0 names In-Reply-To: <14524.14187.795572.189167@weyr.cnri.reston.va.us> References: <14523.58937.766784.166817@weyr.cnri.reston.va.us> <14523.62567.356663.65659@weyr.cnri.reston.va.us> <001801bf82f5$bba340e0$4d15b0cf@idsonline.com> <14524.14187.795572.189167@weyr.cnri.reston.va.us> Message-ID: * Fred L. Drake, Jr. | | The "object" I imagine has three attributes: namespace URI, | localpart, and prefix. It would unpack to two values: URI & | localpart, and comparisons would only operate on those two as well. This is how I envision it too. (Except that Java SAX now uses the rawname instead of the prefix, and so we probably should too.) | The advantage is that we get the prefix for those who want it, | single object comparisons, and no extraneous parameters to the call. | I don't think *this* is available using the non-object approaches. It isn't, and so objects also seem like a good alternative to me. --Lars M. From larsga@garshol.priv.no Wed Mar 1 10:04:38 2000 From: larsga@garshol.priv.no (Lars Marius Garshol) Date: 01 Mar 2000 11:04:38 +0100 Subject: [XML-SIG] SAX 2.0 names In-Reply-To: <003201bf8323$597691a0$4d15b0cf@idsonline.com> References: <14523.58937.766784.166817@weyr.cnri.reston.va.us><14523.62567.356663.65659@weyr.cnri.reston.va.us><001801bf82f5$bba340e0$4d15b0cf@idsonline.com> <14524.14187.795572.189167@weyr.cnri.reston.va.us> <003201bf8323$597691a0$4d15b0cf@idsonline.com> Message-ID: * THOMAS PASSIN | | This sounds much like my original proposal for a nested | tuple. Perhaps ((localname,uri),prefix). Lars pointed out that the | java SAX2 people seem to want the raw name - I'm not convinced since | you need the namespace to confirm what the localname is supposed to | mean, not the rawname. Comparisons are very easy. Not easy enough, I think. With a pair or an object you can do name1 == name2 but with nested tuples it becomes name1[0] == name2[0] which is both slower and more awkward. So I don't like this solution, mainly because it's more awkward, and also because it bugs me that names, in this representation, cannot be compared with == directly. --Lars M. From larsga@garshol.priv.no Wed Mar 1 10:09:57 2000 From: larsga@garshol.priv.no (Lars Marius Garshol) Date: 01 Mar 2000 11:09:57 +0100 Subject: [XML-SIG] SAX 2.0 names In-Reply-To: References: Message-ID: * Greg Stein | | I'm all for using tuples. If somebody wants extended capabilities | through the use of objects, then they can use them on top of | tuples. If you start with objects, then you've set a minimum. This is a very good point. I've also been thinking that instead of mandating tuples, perhaps we should say that you have to use something that behaves like tuples with respect to indexing, comparison, decomposition and indexing, but can also offer more. That way one can use more than | The reason they seem small is because the "benchmark" is bogus. You | have a HUGE constant factor. Just look at the thing: hundreds of | lines. Classes here and there, function calls over that way, etc. It's definitely bogus in the sense that as a comparison of the efficiency of tuples versus strings the difference is lost in the noise. However, in another sense it isn't bogus at all because it indicates that the performance difference between strings/tuples is so small compared to the overheads of parsing and the application itself that it doesn't really matter what we choose. | If you want to truly benchmark the varieties, then initialize a | number of sample objects and time their *usage*. Alternatively, you | can time their *construction* from some fake data. We could do this as well, but that would really be a benchmark with a different goal. | And besides... performance isn't everything. The use of tuples is | clean and straight-forward. That counts for quite a lot. The fact | that it appears they are more efficient (based on your rough test) | is just another wonderful boon for them. Agreed. --Lars M. From gstein@lyra.org Wed Mar 1 10:18:23 2000 From: gstein@lyra.org (Greg Stein) Date: Wed, 1 Mar 2000 02:18:23 -0800 (PST) Subject: [XML-SIG] SAX 2.0 names In-Reply-To: Message-ID: On 1 Mar 2000, Lars Marius Garshol wrote: > * THOMAS PASSIN > | > | This sounds much like my original proposal for a nested > | tuple. Perhaps ((localname,uri),prefix). Lars pointed out that the > | java SAX2 people seem to want the raw name - I'm not convinced since > | you need the namespace to confirm what the localname is supposed to > | mean, not the rawname. Comparisons are very easy. > > Not easy enough, I think. With a pair or an object you can do > > name1 == name2 > > but with nested tuples it becomes > > name1[0] == name2[0] > > which is both slower and more awkward. So I don't like this solution, > mainly because it's more awkward, and also because it bugs me that > names, in this representation, cannot be compared with == directly. Dunno where the nested tuple idea comes from, but... bleck. Just use (localname, uri, prefix). Why make it more difficult? -g -- Greg Stein, http://www.lyra.org/ From larsga@garshol.priv.no Wed Mar 1 11:09:28 2000 From: larsga@garshol.priv.no (Lars Marius Garshol) Date: 01 Mar 2000 12:09:28 +0100 Subject: [XML-SIG] SAX 2.0 names In-Reply-To: References: Message-ID: * Greg Stein | | Dunno where the nested tuple idea comes from, but... bleck. | | Just use (localname, uri, prefix). Why make it more difficult? Because then you have to do name1[0] == name2[0] and name1[1] == name2[1] to be able to compare names at all. But in any case, I don't like either of these solutions. --Lars M. From tpassin@idsonline.com Wed Mar 1 13:33:47 2000 From: tpassin@idsonline.com (THOMAS PASSIN) Date: Wed, 1 Mar 2000 08:33:47 -0500 Subject: [XML-SIG] SAX 2.0 names References: Message-ID: <001f01bf8382$ce330320$422a08d1@idsonline.com> ----- Original Message ----- From: Greg Stein To: Sent: Wednesday, March 01, 2000 5:18 AM Subject: Re: [XML-SIG] SAX 2.0 names > On 1 Mar 2000, Lars Marius Garshol wrote: > > * THOMAS PASSIN > > | > > | This sounds much like my original proposal for a nested > > | tuple. Perhaps ((localname,uri),prefix). Lars pointed out that the > > | java SAX2 people seem to want the raw name - I'm not convinced since > > | you need the namespace to confirm what the localname is supposed to > > | mean, not the rawname. Comparisons are very easy. > > > > Not easy enough, I think. With a pair or an object you can do > > > > name1 == name2 > > > > but with nested tuples it becomes > > > > name1[0] == name2[0] > > > > which is both slower and more awkward. Yes, but maybe it's slower bit only in the "noise" range. If so, not to worry. Yes, it's a little awkward, but somehow you have to 1) keep the prefix (or rawname), and 2) make comparisons using the uri,not the prefix. Of course, with the object approach I guess you could overload the comparison test, maybe that would be better. >> So I don't like this solution, > > mainly because it's more awkward, and also because it bugs me that > > names, in this representation, cannot be compared with == directly. > > Dunno where the nested tuple idea comes from, but... bleck. > > Just use (localname, uri, prefix). Why make it more difficult? > Because you can compare (uri1,localname1)==(uri2,localname2) even if a different prefix were in use for the same namespace. This is because namespace equality depends on the uri, not the exact value of the prefix. From larsga@garshol.priv.no Wed Mar 1 13:55:47 2000 From: larsga@garshol.priv.no (Lars Marius Garshol) Date: 01 Mar 2000 14:55:47 +0100 Subject: [XML-SIG] SAX 2.0 names In-Reply-To: <001f01bf8382$ce330320$422a08d1@idsonline.com> References: <001f01bf8382$ce330320$422a08d1@idsonline.com> Message-ID: * Lars Marius Garshol | | Not easy enough, I think. With a pair or an object you can do | | name1 == name2 | | but with nested tuples it becomes | | name1[0] == name2[0] | | which is both slower and more awkward. * THOMAS PASSIN | | Yes, but maybe it's slower bit only in the "noise" range. It probably is. | Yes, it's a little awkward, but somehow you have to 1) keep the | prefix (or rawname), I think we should do that either by using objects or through a separate parameter. | and 2) make comparisons using the uri,not the prefix. Using pairs or objects fix that problem. --Lars M. From ken@bitsko.slc.ut.us Wed Mar 1 18:28:17 2000 From: ken@bitsko.slc.ut.us (Ken MacLeod) Date: 01 Mar 2000 12:28:17 -0600 Subject: [XML-SIG] SAX 2.0 names In-Reply-To: THOMAS PASSIN's message of "Tue, 29 Feb 2000 15:44:09 -0500" References: <14523.58937.766784.166817@weyr.cnri.reston.va.us> <14523.62567.356663.65659@weyr.cnri.reston.va.us> <001801bf82f5$bba340e0$4d15b0cf@idsonline.com> Message-ID: Can someone step back a second and refresh me (us) on where the name tuples will be used? * SAX2 defines URI, localname, and rawname as parameters for elements. * SAX2 `Attributes' class has seperate attributes for them. * DOM has seperate attributes in Element and Attr (Node, actually). * My proposal for merging DOM and SAX has them as seperate attributes on elements and attributes. The only place I see the need for a tuple is as an index into an `Attr' dictionary (as a shortcut for DOM's Attr accessors). Once you've delved into the `Attr' dictionary, the attribute itself already includes the rawname/prefix. Since the prefix/rawname is available in the Attr, I see no need at all to include the prefix in the tuple that is used in the dictionary shortcut for accessing attributes. Where am I missing something? The biggest thing I see is the disconnect between SAX2's `rawname' and DOM's `prefix'. -- Ken From larsga@garshol.priv.no Thu Mar 2 08:45:39 2000 From: larsga@garshol.priv.no (Lars Marius Garshol) Date: 02 Mar 2000 09:45:39 +0100 Subject: [XML-SIG] SAX 2.0 names In-Reply-To: References: <14523.58937.766784.166817@weyr.cnri.reston.va.us> <14523.62567.356663.65659@weyr.cnri.reston.va.us> <001801bf82f5$bba340e0$4d15b0cf@idsonline.com> Message-ID: * Ken MacLeod | Can someone step back a second and refresh me (us) on where the name | tuples will be used? | | * SAX2 defines URI, localname, and rawname as parameters for elements. Java SAX2 does this. We're thinking about making Python SAX2 use a pair tuple for the name parameter and have the rawname in a separate parameter. (Or possibly use an object that keeps all three.) | * SAX2 `Attributes' class has seperate attributes for them. Again, we're thinking about making Python SAX2 differ by merging uri and localname into a pair tuple. | * DOM has seperate attributes in Element and Attr (Node, actually). I haven't looked at this yet, but ideally SAX2 and the DOM should fit nicely together. Can anyone comment on this? | * My proposal for merging DOM and SAX has them as seperate attributes | on elements and attributes. Sorry, I haven't had time to look at this yet. Will do as soon as possible. | The biggest thing I see is the disconnect between SAX2's `rawname' | and DOM's `prefix'. That's a decision made for Java SAX2, and I don't really know what I think about it. For SAX2 it makes sense, but like you say it's not the way the DOM does it. --Lars M. From larsga@garshol.priv.no Thu Mar 2 09:24:11 2000 From: larsga@garshol.priv.no (Lars Marius Garshol) Date: 02 Mar 2000 10:24:11 +0100 Subject: [XML-SIG] A first attempt at a SAX 2.0 draft Message-ID: This is only the raw source of the class definitions, and so may not be fully comprehensible unless you resort to the SAX 2 home page for details. Hopefully this gives people a starting point for providing feedback. I'm working on an initial driver for xmlproc, but if anyone else wants to get some experience by writing drivers (for anything at all) that would be great. """ This module contains the core classes of version 2.0 of SAX for Python. This file provides only default classes with absolutely minimum functionality, from which drivers and applications can be subclassed. Many of these classes are empty and are included only as documentation of the interfaces. $Id: saxlib.py,v 1.9 2000/03/01 18:38:25 larsga Exp $ """ #============================================================================ # # MAIN INTERFACES # #============================================================================ # ===== XMLREADER ===== class XMLReader: def __init__(self): self._cont_handler = None self._dtd_handler = None self._ent_handler = None self._err_handler = None def parse(self, source): "Parse an XML document from a system identifier or an InputSource." def getContentHandler(self): "Returns the current ContentHandler." return self._cont_handler def setContentHandler(self, handler): "Registers a new object to receive document content events." self._cont_handler = handler def getDTDHandler(self): "Returns the current DTD handler." return self._dtd_handler def setDTDHandler(self, handler): "Register an object to receive basic DTD-related events." self._dtd_handler = handler def getEntityResolver(self): "Returns the current EntityResolver." return self._ent_handler def setEntityResolver(self, resolver): "Register an object to resolve external entities." self._ent_handler = resolver def getErrorHandler(self): "Returns the current ErrorHandler." return self._err_handler def setErrorHandler(self, handler): "Register an object to receive error-message events." self._err_handler = handler def setLocale(self, locale): """Allow an application to set the locale for errors and warnings. SAX parsers are not required to provide localisation for errors and warnings; if they cannot support the requested locale, however, they must throw a SAX exception. Applications may request a locale change in the middle of a parse.""" raise SAXNotSupportedException("Locale support not implemented") def getFeature(self, name): "Looks up and returns the state of a SAX2 feature." raise SAXNotRecognizedException("Feature '%s' not recognized" % name) def setFeature(self, name, state): "Sets the state of a SAX2 feature." raise SAXNotRecognizedException("Feature '%s' not recognized" % name) def getProperty(self, name): "Looks up and returns the value of a SAX2 property." raise SAXNotRecognizedException("Property '%s' not recognized" % name) def setProperty(self, name, value): "Sets the value of a SAX2 property." raise SAXNotRecognizedException("Property '%s' not recognized" % name) # ===== INPUTSOURCE ===== class InputSource: """Encapsulation of the information needed by the XMLReader to read entities. This class may include information about the public identifier, system identifier, byte stream (possibly with character encoding information) and/or the character stream of an entity. Applications will create objects of this class for use in the XMLReader.parse method and for returning from EntityResolver.resolveEntity. An InputSource belongs to the application, the XMLReader is not allowed to modify InputSource objects passed to it from the application, although it may make copies and modify those.""" def __init__(self, system_id = None): self.__system_id = system_id self.__public_id = None self.__encoding = None self.__bytefile = None self.__charfile = None def setPublicId(self, public_id): "Sets the public identifier of this InputSource." self.__public_id = public_id def getPublicId(self): "Returns the public identifier of this InputSource." return self.__public_id def setSystemId(self, system_id): "Sets the system identifier of this InputSource." self.__system_id = system_id def getSystemId(self): "Returns the system identifier of this InputSource." return self.__system_id def setEncoding(self, encoding): """Sets the character encoding of this InputSource. The encoding must be a string acceptable for an XML encoding declaration (see section 4.3.3 of the XML recommendation). The encoding attribute of the InputSource is ignored if the InputSource also contains a character stream.""" self.__encoding = encoding def getEncoding(self): "Get the character encoding of this InputSource." return self.__encoding def setByteStream(self, bytefile): """Set the byte stream (a Python file-like object which does not perform byte-to-character conversion) for this input source. The SAX parser will ignore this if there is also a character stream specified, but it will use a byte stream in preference to opening a URI connection itself. If the application knows the character encoding of the byte stream, it should set it with the setEncoding method.""" self.__bytefile = bytefile def getByteStream(self): """Get the byte stream for this input source. The getEncoding method will return the character encoding for this byte stream, or None if unknown.""" return self.__bytefile def setCharacterStream(self, charfile): """Set the character stream for this input source. (The stream must be a Python 1.6 Unicode-wrapped file-like that performs conversion to Unicode strings.) If there is a character stream specified, the SAX parser will ignore any byte stream and will not attempt to open a URI connection to the system identifier.""" self.__charfile = charfile def getCharacterStream(self): "Get the character stream for this input source." return self.__charfile # ===== LOCATOR ===== class Locator: """Interface for associating a SAX event with a document location. A locator object will return valid results only during calls to DocumentHandler methods; at any other time, the results are unpredictable.""" def getColumnNumber(self): "Return the column number where the current event ends." return -1 def getLineNumber(self): "Return the line number where the current event ends." return -1 def getPublicId(self): "Return the public identifier for the current event." return "" def getSystemId(self): "Return the system identifier for the current event." return "" # ===== ErrorHandler ===== class ErrorHandler: """Basic interface for SAX error handlers. If you create an object that implements this interface, then register the object with your Parser, the parser will call the methods in your object to report all warnings and errors. There are three levels of errors available: warnings, (possibly) recoverable errors, and unrecoverable errors. All methods take a SAXParseException as the only parameter.""" def error(self, exception): "Handle a recoverable error." pass def fatalError(self, exception): "Handle a non-recoverable error." pass def warning(self, exception): "Handle a warning." pass # ===== XMLFILTER ===== class XMLFilter(XMLReader): """Interface for a SAX2 parser filter. A parser filter is an XMLReader that gets its events from another XMLReader (which may in turn also be a filter) rather than from a primary source like a document or other non-SAX data source. Filters can modify a stream of events before passing it on to its handlers.""" def __init__(self, parent = None): """Creates a filter instance, allowing applications to set the parent on instantiation.""" self._parent = parent def setParent(self, parent): """Sets the parent XMLReader of this filter. The argument may not be None.""" self._parent = parent def getParent(self): "Returns the parent of this filter." return self._parent # ===== ATTRIBUTES ===== class Attributes: """Interface for a list of XML attributes. Contains a list of XML attributes, accessible by name.""" def getLength(self): "Returns the number of attributes in the list." def getType(self, name): "Returns the type of the attribute with the given name." def getValue(self, name): "Returns the value of the attribute with the given name." def getRawname(self, name): "Returns the value of the attribute with the given (cooked) name." def __len__(self): "Alias for getLength." def __getitem__(self, name): "Alias for getValue." def keys(self): "Returns a list of the attribute names in the list." def has_key(self, name): "True if the attribute is in the list, false otherwise." def get(self, name, alternative=None): """Return the value associated with attribute name; if it is not available, then return the alternative.""" def copy(self): "Return a copy of the Attributes object." def items(self): "Return a list of (attribute_name, value) pairs." def values(self): "Return a list of all attribute values." #============================================================================ # # EXCEPTIONS # #============================================================================ import sys if sys.platform[:4] == "java": from java.lang import Exception # ===== SAXEXCEPTION ===== class SAXException(Exception): """Encapsulate an XML error or warning. This class can contain basic error or warning information from either the XML parser or the application: you can subclass it to provide additional functionality, or to add localization. Note that although you will receive a SAXException as the argument to the handlers in the ErrorHandler interface, you are not actually required to throw the exception; instead, you can simply read the information in it.""" def __init__(self, msg, exception = None): """Creates an exception. The message is required, but the exception is optional.""" self._msg = msg self._exception = exception def getMessage(self): "Return a message for this exception." return self._msg def getException(self): "Return the embedded exception, or None if there was none." return self._exception def __str__(self): "Create a string representation of the exception." return self._msg def __getitem__(self, ix): """Avoids weird error messages if someone does exception[ix] by mistake, since Exception has __getitem__ defined.""" raise NameError("__getitem__") # ===== SAXPARSEEXCEPTION ===== class SAXParseException(SAXException): """Encapsulate an XML parse error or warning. This exception will include information for locating the error in the original XML document. Note that although the application will receive a SAXParseException as the argument to the handlers in the ErrorHandler interface, the application is not actually required to throw the exception; instead, it can simply read the information in it and take a different action. Since this exception is a subclass of SAXException, it inherits the ability to wrap another exception.""" def __init__(self, msg, exception, locator): "Creates the exception. The exception parameter is allowed to be None." SAXException.__init__(self, msg, exception) self._locator = locator def getColumnNumber(self): """The column number of the end of the text where the exception occurred.""" return self._locator.getColumnNumber() def getLineNumber(self): "The line number of the end of the text where the exception occurred." return self._locator.getLineNumber() def getPublicId(self): "Get the public identifier of the entity where the exception occurred." return self._locator.getPublicId() def getSystemId(self): "Get the system identifier of the entity where the exception occurred." return self._locator.getSystemId() def __str__(self): "Create a string representation of the exception." return "%s at %s:%d:%d" % (self.msg, self.getSystemId(), self.getLineNumber(), self.getColumnNumber()) # ===== SAXNOTRECOGNIZEDEXCEPTION ===== class SAXNotRecognizedException(SAXException): """Exception class for an unrecognized identifier. An XMLReader will raise this exception when it is confronted with an unrecognized feature or property. SAX applications and extensions may use this class for similar purposes.""" # ===== SAXNOTSUPPORTEDEXCEPTION ===== class SAXNotSupportedException(SAXException): """Exception class for an unsupported operation. An XMLReader will raise this exception when a service it cannot perform is requested (specifically setting a state or value). SAX applications and extensions may use this class for similar purposes.""" #============================================================================ # # HANDLER INTERFACES # #============================================================================ # ===== CONTENTHANDLER ===== class ContentHandler: """Interface for receiving logical document content events. This is the main callback interface in SAX, and the one most important to applications. The order of events in this interface mirrors the order of the information in the document.""" def __init__(self): self._locator = locator def setDocumentLocator(self, locator): """Called by the parser to give the application a locator for locating the origin of document events. SAX parsers are strongly encouraged (though not absolutely required) to supply a locator: if it does so, it must supply the locator to the application by invoking this method before invoking any of the other methods in the DocumentHandler interface. The locator allows the application to determine the end position of any document-related event, even if the parser is not reporting an error. Typically, the application will use this information for reporting its own errors (such as character content that does not match an application's business rules). The information returned by the locator is probably not sufficient for use with a search engine. Note that the locator will return correct information only during the invocation of the events in this interface. The application should not attempt to use it at any other time.""" self._locator = locator def startDocument(self): """Receive notification of the beginning of a document. The SAX parser will invoke this method only once, before any other methods in this interface or in DTDHandler (except for setDocumentLocator).""" def endDocument(self): """Receive notification of the end of a document. The SAX parser will invoke this method only once, and it will be the last method invoked during the parse. The parser shall not invoke this method until it has either abandoned parsing (because of an unrecoverable error) or reached the end of input.""" def startPrefixMapping(self, prefix, uri): """Begin the scope of a prefix-URI Namespace mapping. The information from this event is not necessary for normal Namespace processing: the SAX XML reader will automatically replace prefixes for element and attribute names when the http://xml.org/sax/features/namespaces feature is true (the default). There are cases, however, when applications need to use prefixes in character data or in attribute values, where they cannot safely be expanded automatically; the start/endPrefixMapping event supplies the information to the application to expand prefixes in those contexts itself, if necessary. Note that start/endPrefixMapping events are not guaranteed to be properly nested relative to each-other: all startPrefixMapping events will occur before the corresponding startElement event, and all endPrefixMapping events will occur after the corresponding endElement event, but their order is not guaranteed.""" def endPrefixMapping(self, prefix): """End the scope of a prefix-URI mapping. See startPrefixMapping for details. This event will always occur after the corresponding endElement event, but the order of endPrefixMapping events is not otherwise guaranteed.""" def startElement(self, name, rawname, attrs): """Signals the start of an element. The name parameter contains the name of the element type as a *whatever*, the rawname parameter the raw XML 1.0 name used in the source document, and the attrs parameter holds an instance of the Attributes class containing the attributes of the element.""" def endElement(self, name): """Signals the end of an element. The name parameter contains the name of the element type, just as with the startElement event.""" def characters(self, content): """Receive notification of character data. The Parser will call this method to report each chunk of character data. SAX parsers may return all contiguous character data in a single chunk, or they may split it into several chunks; however, all of the characters in any single event must come from the same external entity so that the Locator provides useful information.""" def ignorableWhitespace(self, chars, start, end): """Receive notification of ignorable whitespace in element content. Validating Parsers must use this method to report each chunk of ignorable whitespace (see the W3C XML 1.0 recommendation, section 2.10): non-validating parsers may also use this method if they are capable of parsing and using content models. SAX parsers may return all contiguous whitespace in a single chunk, or they may split it into several chunks; however, all of the characters in any single event must come from the same external entity, so that the Locator provides useful information. The application must not attempt to read from the array outside of the specified range.""" def processingInstruction(self, target, data): """Receive notification of a processing instruction. The Parser will invoke this method once for each processing instruction found: note that processing instructions may occur before or after the main document element. A SAX parser should never report an XML declaration (XML 1.0, section 2.8) or a text declaration (XML 1.0, section 4.3.1) using this method.""" def skippedEntity(self, name): """Receive notification of a skipped entity. The Parser will invoke this method once for each entity skipped. Non-validating processors may skip entities if they have not seen the declarations (because, for example, the entity was declared in an external DTD subset). All processors may skip external entities, depending on the values of the http://xml.org/sax/features/external-general-entities and the http://xml.org/sax/features/external-parameter-entities properties.""" # ===== DECLHANDLER ===== class DeclHandler: """Optional SAX2 handler for DTD declaration events. Note that some DTD declarations are already reported through the DTDHandler interface. All events reported to this handler will occur between the startDTD and endDTD events of the LexicalHandler. To se the DeclHandler for an XMLReader, use the setProperty method with the identifier http://xml.org/sax/handlers/DeclHandler.""" def attributeDecl(self, elem_name, attr_name, type, value_def, value): """Report an attribute type declaration. Only the first declaration will be reported. The type will be one of the strings "CDATA", "ID", "IDREF", "IDREFS", "NMTOKEN", "NMTOKENS", "ENTITY", "ENTITIES", or "NOTATION", or a parenthesized token group with the separator "|" and all whitespace removed. elem_name is the element type name, attr_name the attribute type name, type a string representing the attribute type, value_def a string representing the default declaration ('#IMPLIED', '#REQUIRED', '#FIXED' or None). value is a string representing the attribute's default value, or None if there is none.""" def elementDecl(self, elem_name, content_model): """Report an element type declaration. Only the first declaration will be reported. content_model is the string 'EMPTY', the string 'ANY' or what?""" def internalEntityDecl(self, name, value): """Report an internal entity declaration. Only the first declaration of an entity will be reported. name is the name of the entity. If it is a parameter entity, the name will begin with '%'. value is the replacement text of the entity.""" def externalEntityDecl(self, name, public_id, system_id): """Report a parsed entity declaration. (Unparsed entities are reported to the DTDHandler. Only the first declaration for each entity will be reported. name is the name of the entity. If it is a parameter entity, the name will begin with '%'. public_id and system_id are the public and system identifiers of the entity. public_id will be None if none were declared.""" # ===== DTDHandler ===== class DTDHandler: """Handle DTD events. This interface specifies only those DTD events required for basic parsing (unparsed entities and attributes). If you do not want to implement the entire interface, you can extend HandlerBase, which implements the default behaviour.""" def notationDecl(self, name, publicId, systemId): "Handle a notation declaration event." def unparsedEntityDecl(self, name, publicId, systemId, ndata): "Handle an unparsed entity declaration event." # ===== ENTITYRESOLVER ===== class EntityResolver: """Basic interface for resolving entities. If you create an object implementing this interface, then register the object with your Parser, the parser will call the method in your object to resolve all external entities. Note that HandlerBase implements this interface with the default behaviour.""" def resolveEntity(self, publicId, systemId): "Resolve the system identifier of an entity." return systemId #FIXME!! # ===== LEXICALHANDLER ===== class LexicalHandler: """Optional SAX2 handler for lexical events. This handler is used to obtain lexical information about an XML document, that is, information about how the document was encoded (as opposed to what it contains, which is reported to the ContentHandler), such as comments and CDATA marked section boundaries. To set the LexicalHandler of an XMLReader, use the setProperty method with the property identifier 'http://xml.org/sax/handlers/LexicalHandler'. There is no guarantee that the XMLReader will support or recognize this property.""" def comment(self, content): """Reports a comment anywhere in the document (including the DTD and outside the document element). content is a string that holds the contents of the comment.""" def startDTD(self, name, public_id, system_id): """Report the start of the DTD declarations, if the document has an associated DTD. A startEntity event will be reported before declaration events from the external DTD subset are reported, and this can be used to infer from which subset DTD declarations derive. name is the name of the document element type, public_id the public identifier of the DTD (or None if none were supplied) and system_id the system identfier of the external subset (or None if none were supplied).""" def endDTD(self): "Signals the end of DTD declarations." def startEntity(self, name): """Report the beginning of an entity. The start and end of the document entity is not reported. The start and end of the external DTD subset is reported with the pseudo-name '[dtd]'. Skipped entities will be reported through the skippedEntity event of the ContentHandler rather than through this event. name is the name of the entity. If it is a parameter entity, the name will begin with '%'.""" def endEntity(self, name): """Reports the end of an entity. name is the name of the entity, and follows the same conventions as for startEntity.""" def startCDATA(self): """Reports the beginning of a CDATA marked section. The contents of the CDATA marked section will be reported through the characters event.""" def endCDATA(self): "Reports the end of a CDATA marked section." #============================================================================ # # SAX 1.0 COMPATIBILITY CLASSES # Note that these are all deprecated. # #============================================================================ # ===== ATTRIBUTELIST ===== class AttributeList: """Interface for an attribute list. This interface provides information about a list of attributes for an element (only specified or defaulted attributes will be reported). Note that the information returned by this object will be valid only during the scope of the DocumentHandler.startElement callback, and the attributes will not necessarily be provided in the order declared or specified.""" def getLength(self): "Return the number of attributes in list." def getName(self, i): "Return the name of an attribute in the list." def getType(self, i): """Return the type of an attribute in the list. (Parameter can be either integer index or attribute name.)""" def getValue(self, i): """Return the value of an attribute in the list. (Parameter can be either integer index or attribute name.)""" def __len__(self): "Alias for getLength." def __getitem__(self, key): "Alias for getName (if key is an integer) and getValue (if string)." def keys(self): "Returns a list of the attribute names." def has_key(self, key): "True if the attribute is in the list, false otherwise." def get(self, key, alternative=None): """Return the value associated with attribute name; if it is not available, then return the alternative.""" def copy(self): "Return a copy of the AttributeList." def items(self): "Return a list of (attribute_name,value) pairs." def values(self): "Return a list of all attribute values." # ===== DOCUMENTHANDLER ===== class DocumentHandler: """Handle general document events. This is the main client interface for SAX: it contains callbacks for the most important document events, such as the start and end of elements. You need to create an object that implements this interface, and then register it with the Parser. If you do not want to implement the entire interface, you can derive a class from HandlerBase, which implements the default functionality. You can find the location of any document event using the Locator interface supplied by setDocumentLocator().""" def characters(self, ch, start, length): "Handle a character data event." def endDocument(self): "Handle an event for the end of a document." def endElement(self, name): "Handle an event for the end of an element." def ignorableWhitespace(self, ch, start, length): "Handle an event for ignorable whitespace in element content." def processingInstruction(self, target, data): "Handle a processing instruction event." def setDocumentLocator(self, locator): "Receive an object for locating the origin of SAX document events." def startDocument(self): "Handle an event for the beginning of a document." def startElement(self, name, atts): "Handle an event for the beginning of an element." # ===== HANDLERBASE ===== class HandlerBase(EntityResolver, DTDHandler, DocumentHandler,\ ErrorHandler): """Default base class for handlers. This class implements the default behaviour for four SAX interfaces: EntityResolver, DTDHandler, DocumentHandler, and ErrorHandler: rather than implementing those full interfaces, you may simply extend this class and override the methods that you need. Note that the use of this class is optional (you are free to implement the interfaces directly if you wish).""" # ===== PARSER ===== class Parser: """Basic interface for SAX (Simple API for XML) parsers. All SAX parsers must implement this basic interface: it allows users to register handlers for different types of events and to initiate a parse from a URI, a character stream, or a byte stream. SAX parsers should also implement a zero-argument constructor.""" def __init__(self): self.doc_handler = DocumentHandler() self.dtd_handler = DTDHandler() self.ent_handler = EntityResolver() self.err_handler = ErrorHandler() def parse(self, systemId): "Parse an XML document from a system identifier." def parseFile(self, fileobj): "Parse an XML document from a file-like object." def setDocumentHandler(self, handler): "Register an object to receive basic document-related events." self.doc_handler=handler def setDTDHandler(self, handler): "Register an object to receive basic DTD-related events." self.dtd_handler=handler def setEntityResolver(self, resolver): "Register an object to resolve external entities." self.ent_handler=resolver def setErrorHandler(self, handler): "Register an object to receive error-message events." self.err_handler=handler def setLocale(self, locale): """Allow an application to set the locale for errors and warnings. SAX parsers are not required to provide localisation for errors and warnings; if they cannot support the requested locale, however, they must throw a SAX exception. Applications may request a locale change in the middle of a parse.""" raise SAXNotSupportedException("Locale support not implemented") #============================================================================ # # CORE FEATURES # #============================================================================ feature_namespaces = "http://xml.org/sax/features/namespaces" # true: Perform Namespace processing. # false: Optionally do not perform Namespace processing # (implies namespace-prefixes). # access: (parsing) read-only; (not parsing) read/write feature_namespace_prefixes = "http://xml.org/sax/features/namespace-prefixes" # true: Report the original prefixed names and attributes used for Namespace # declarations. # false: Do not report attributes used for Namespace declarations, and # optionally do not report original prefixed names. # access: (parsing) read-only; (not parsing) read/write feature_string_interning = "http://xml.org/sax/features/string-interning" # true: All element names, prefixes, attribute names, Namespace URIs, and # local names are interned using the built-in intern function. # false: Names are not necessarily interned. # access: (parsing) read-only; (not parsing) read/write feature_validation = "http://xml.org/sax/features/validation" # true: Report all validation errors (implies external-general-entities and # external-parameter-entities). # false: Do not report validation errors. # access: (parsing) read-only; (not parsing) read/write feature_external_ges = "http://xml.org/sax/features/external-general-entities" # true: Include all external general (text) entities. # false: Do not include external general entities. # access: (parsing) read-only; (not parsing) read/write feature_external_pes = "http://xml.org/sax/features/external-parameter-entities" # true: Include all external parameter entities, including the external # DTD subset. # false: Do not include any external parameter entities, even the external # DTD subset. # access: (parsing) read-only; (not parsing) read/write all_features = [feature_namespaces, feature_namespace_prefixes, feature_string_interning, feature_validation, feature_external_ges, feature_external_pes] #============================================================================ # # CORE PROPERTIES # #============================================================================ property_lexical_handler = "http://xml.org/sax/properties/lexical-handler" # data type: xml.sax.sax2lib.LexicalHandler # description: An optional extension handler for lexical events like comments. # access: read/write property_declaration_handler = "http://xml.org/sax/properties/declaration-handler" # data type: xml.sax.sax2lib.DeclHandler # description: An optional extension handler for DTD-related events other # than notations and unparsed entities. # access: read/write property_dom_node = "http://xml.org/sax/properties/dom-node" # data type: org.w3c.dom.Node # description: When parsing, the current DOM node being visited if this is # a DOM iterator; when not parsing, the root DOM node for # iteration. # access: (parsing) read-only; (not parsing) read/write property_xml_string = "http://xml.org/sax/properties/xml-string" # data type: String # description: The literal string of characters that was the source for # the current event. # access: read-only all_properties = [property_lexical_handler, property_dom_node, property_declaration_handler, property_xml_string] From ken@bitsko.slc.ut.us Thu Mar 2 21:09:50 2000 From: ken@bitsko.slc.ut.us (Ken MacLeod) Date: 02 Mar 2000 15:09:50 -0600 Subject: [XML-SIG] SAX 2.0 names In-Reply-To: Lars Marius Garshol's message of "02 Mar 2000 09:45:39 +0100" References: <14523.58937.766784.166817@weyr.cnri.reston.va.us> <14523.62567.356663.65659@weyr.cnri.reston.va.us> <001801bf82f5$bba340e0$4d15b0cf@idsonline.com> Message-ID: Lars Marius Garshol writes: > * Ken MacLeod > | Can someone step back a second and refresh me (us) on where the name > | tuples will be used? > | > > [Lars describes that name tuples will replace seperate namespaceURI > and localname attributes in SAX parameters and DOM nodes.] Ah, got it. In that case, I don't see a need for a three-part tuple or a tuple-in-a-tuple containing the rawname/prefix as long as that info itself is contained in a seperate parameter or attribute. I.e. the rawname/prefix is available for applications that need it, but it doesn't clutter the real namespace and name. -- Ken From tpassin@idsonline.com Thu Mar 2 21:23:25 2000 From: tpassin@idsonline.com (THOMAS PASSIN) Date: Thu, 2 Mar 2000 16:23:25 -0500 Subject: [XML-SIG] SAX 2.0 names References: <14523.58937.766784.166817@weyr.cnri.reston.va.us> <14523.62567.356663.65659@weyr.cnri.reston.va.us> <001801bf82f5$bba340e0$4d15b0cf@idsonline.com> Message-ID: <002b01bf848d$8dfa27a0$f22a08d1@idsonline.com> Ken MacLeod wrote: > Lars Marius Garshol writes: > > > * Ken MacLeod > > | Can someone step back a second and refresh me (us) on where the name > > | tuples will be used? > > | > > > > [Lars describes that name tuples will replace seperate namespaceURI > > and localname attributes in SAX parameters and DOM nodes.] > > Ah, got it. In that case, I don't see a need for a three-part tuple > or a tuple-in-a-tuple containing the rawname/prefix as long as that > info itself is contained in a seperate parameter or attribute. I.e. > the rawname/prefix is available for applications that need it, but it > doesn't clutter the real namespace and name. > Me, too, as long as there is some easy way to attach the prefix or rawname somewhere that it can be gotten. Tom Passin From ken@bitsko.slc.ut.us Thu Mar 2 21:52:32 2000 From: ken@bitsko.slc.ut.us (Ken MacLeod) Date: 02 Mar 2000 15:52:32 -0600 Subject: [XML-SIG] A first attempt at a SAX 2.0 draft In-Reply-To: Lars Marius Garshol's message of "02 Mar 2000 10:24:11 +0100" References: Message-ID: Lars Marius Garshol writes: > # ===== PARSER ===== > > class Parser: > """Basic interface for SAX (Simple API for XML) parsers. All SAX > parsers must implement this basic interface: it allows users to > register handlers for different types of events and to initiate a > parse from a URI, a character stream, or a byte stream. SAX > parsers should also implement a zero-argument constructor.""" > def parse(self, systemId): > "Parse an XML document from a system identifier." > > def parseFile(self, fileobj): > "Parse an XML document from a file-like object." This should probably also have a parseCharacterStream() for upcoming support of Unicode. -- Ken From fdrake@acm.org Thu Mar 2 21:56:23 2000 From: fdrake@acm.org (Fred L. Drake, Jr.) Date: Thu, 2 Mar 2000 16:56:23 -0500 (EST) Subject: [XML-SIG] A first attempt at a SAX 2.0 draft In-Reply-To: References: Message-ID: <14526.58247.367006.401434@weyr.cnri.reston.va.us> Ken MacLeod writes: > This should probably also have a parseCharacterStream() for upcoming > support of Unicode. Ken, I think using a file-like object is sufficient. I haven't looked at the implementation in it's current form, but we should be able to view a stream of unicode text as a file with read() and readline() methods that do the right thing. -Fred -- Fred L. Drake, Jr. Corporation for National Research Initiatives From larsga@garshol.priv.no Fri Mar 3 07:45:18 2000 From: larsga@garshol.priv.no (Lars Marius Garshol) Date: 03 Mar 2000 08:45:18 +0100 Subject: [XML-SIG] A first attempt at a SAX 2.0 draft In-Reply-To: References: Message-ID: * Lars Marius Garshol | | # ===== PARSER ===== | | class Parser: | """Basic interface for SAX (Simple API for XML) parsers. All SAX | parsers must implement this basic interface: it allows users to | register handlers for different types of events and to initiate a | parse from a URI, a character stream, or a byte stream. SAX | parsers should also implement a zero-argument constructor.""" | | def parse(self, systemId): | "Parse an XML document from a system identifier." | | def parseFile(self, fileobj): | "Parse an XML document from a file-like object." * Ken MacLeod | | This should probably also have a parseCharacterStream() for upcoming | support of Unicode. XMLReader (the SAX 2.0 replacement for Parser) does this by accepting an InputSource object. Parser is obsolete now, but I've kept it for backwards compatibility (adapter classes will appear later, like in Java SAX). The question is whether we should extend it to accept an InputSource as the argument of 'parse'. --Lars M. From larsga@garshol.priv.no Fri Mar 3 07:48:26 2000 From: larsga@garshol.priv.no (Lars Marius Garshol) Date: 03 Mar 2000 08:48:26 +0100 Subject: [XML-SIG] A first attempt at a SAX 2.0 draft In-Reply-To: <14526.58247.367006.401434@weyr.cnri.reston.va.us> References: <14526.58247.367006.401434@weyr.cnri.reston.va.us> Message-ID: * Fred L. Drake, Jr. | | I think using a file-like object is sufficient. I haven't looked at | the implementation in it's current form, but we should be able to | view a stream of unicode text as a file with read() and readline() | methods that do the right thing. This is how I interpret the current version of Marc-André Lemburg's proposal as well, and so this is what the InputSource object does. It does maintain a distinction, though. --Lars M. From fdrake@acm.org Fri Mar 3 14:49:10 2000 From: fdrake@acm.org (Fred L. Drake, Jr.) Date: Fri, 3 Mar 2000 09:49:10 -0500 (EST) Subject: [XML-SIG] A first attempt at a SAX 2.0 draft In-Reply-To: References: <14526.58247.367006.401434@weyr.cnri.reston.va.us> Message-ID: <14527.53478.57361.725217@weyr.cnri.reston.va.us> I wrote: > I think using a file-like object is sufficient. I haven't looked at= > the implementation in it's current form, but we should be able to > view a stream of unicode text as a file with read() and readline() > methods that do the right thing. Lars Marius Garshol responds: > This is how I interpret the current version of Marc-Andr=E9 Lemburg'= s > proposal as well, and so this is what the InputSource object does. I= t > does maintain a distinction, though. Lars, This is good enough for me. As long as I can take something sufficiently file-like and parse it, I don't really care if I have to wrap it in an InputSource. The biggest issue is determining just how file-like something has to be. ;) Is read() sufficient? -Fred -- Fred L. Drake, Jr.=09 Corporation for National Research Initiatives From larsga@garshol.priv.no Fri Mar 3 15:14:18 2000 From: larsga@garshol.priv.no (Lars Marius Garshol) Date: 03 Mar 2000 16:14:18 +0100 Subject: [XML-SIG] A first attempt at a SAX 2.0 draft In-Reply-To: <14527.53478.57361.725217@weyr.cnri.reston.va.us> References: <14526.58247.367006.401434@weyr.cnri.reston.va.us> <14527.53478.57361.725217@weyr.cnri.reston.va.us> Message-ID: * Fred L. Drake, Jr. | | This is good enough for me. As long as I can take something | sufficiently file-like and parse it, I don't really care if I have | to wrap it in an InputSource. The biggest issue is determining just | how file-like something has to be. ;) Is read() sufficient? It is for xmlproc, and xmllib/pyexpat doesn't use the object directly, so in that case it is up to the driver. sgmlop is probably the same. In the Java SAX case one would have to do some trickery, but read() should be sufficient in that case as well. In general I think it should be sufficient, and we probably should specify it to be. Any dissenters? --Lars M. From paul@prescod.net Fri Mar 3 05:49:15 2000 From: paul@prescod.net (Paul Prescod) Date: Thu, 02 Mar 2000 21:49:15 -0800 Subject: [XML-SIG] Re: XML DTD for Python source? References: Message-ID: <38BF525B.6BEE9661@prescod.net> I'm going to approach your problem philosophically because technically the issue is pretty easy to solve using Neel's algorithm. Summary, having an XML encoding cannot hurt but IMHO it is mostly a hack to get around flaws in various tools that in a perfect world would be more directly addressed. Greg Wilson wrote: > > ... > > I'm interested in exploring what would happen if I could > do with > programs what I do with hypertext: > > - apply a DTD to switch between Scheme-style parenthesizing, Python-style > indentation, or C-style bracing I think you mean "apply a stylesheet". But you could easily write a Python program that walks the AST and generates different styles. So the first question is, what benefit do you get from using a stylesheet language instead of Python? Second question: what makes Python not a stylesheet language? Third question: Why can't your stylesheet language walk a Python AST? Python's object-within-object data model is pretty universal in the computing world. http://www.prescod.net/groves/shorttut See section 2.4 > - embed arbitrary information (images, optimization hints for the compiler, > etc.) in Sounds like structured comments to me. > a way that third-party browsers and processors can handle > (specially-formatted > comments are *not* the answer) Third party browsers and processors can handle a Python AST if you give them a plug-in. And what is an XSLT stylesheet if not a plug-in in a funny syntax? :) Anyhow, if you are really interested in third-party browsers, the best thing would be to convert into colorized *HTML*. > I realize that human beings would not want to type: > > if (i < 10): > > instead of: > > if (i < 10): > > but that's what editors are for. Dozens of people have tried and given up on programming in XML. Let's start with the problem of verbosity. Your if statement above is not even close to what a semantic "Python DTD" would require. It would be more like: That's pretty trick to read. So what we really need is for the editor to compress it to something more readable -- like the original notation. So now the editor needs detailed understanding of Python (perhaps as a plugin or configuration file). Given this, why don't you use a Python-smart *text* editor? Seriously, I get paid to customize XMetaL and its ilk for document types. It's hard enough making them usable for the document-world they were designed for. Making them good programming environments would be more work than adding multimedia hooks to Emacs pymode (IMHO). > Yes, but not one that's easily accessible to (for example) XMetal, or the > next > generation of XML-aware 'diff' tools. Why not look at the problem the other way? Trees are common in many endeavors. What if the diff tools allowed plugins to adapt them to Python syntax trees? Better that tools bend-over backwards to accomodate the data than vice versa. > One of the big motivations for my interest is that I don't expect kids my > niece's > age to put up with glass typewriters as a programming environment. They're > already building web pages with images, their choices of color, etc. > Existing IDEs > mostly just put lipstick on this particular toad... Maybe prograph?? http://www.pictorius.com/PrographWindows.html > ...and then define a standard for specially-formatted comments that contain > URLs > and other enriched information, and turn the little parser into a browser > plug-in so > that it can translate .py files on the fly, and... That might be the only > way forward, > but I am interested in exploring what happens if we finally do to our > programs what > we're done to everyone else's documents :-). The reason we need XML for documents is because document types multiple like bunnies and writing parsers for all of them gets out of hand quickly. Programming languages multiply more slowly and readability of the source is of paramount importance. If it were possible to "plug in" grammars for arbitrary notations and it was easy to write the grammars (e.g. no rules against left recursion etc.) then XML would not exist. Instead, parser writing is a major pain in the ass, so XML allows us to avoid it. Blame Noam Chomsky (or, more appropriately, the prime mover, Noam is just the weatherman). -- Paul Prescod - ISOGEN Consulting Engineer speaking for himself "We still do not know why mathematics is true and whether it is certain. But we know what we do not know in an immeasurably richer way than we did. And learning this has been a remarkable achievement, among the greatest and least known of the modern era." - from "Advent of the Algorithm" David Berlinski http://www.opengroup.com/mabooks/015/0151003386.shtml From gvwilson@nevex.com Fri Mar 3 18:36:46 2000 From: gvwilson@nevex.com (gvwilson@nevex.com) Date: Fri, 3 Mar 2000 13:36:46 -0500 (EST) Subject: [XML-SIG] Re: XML DTD for Python source? In-Reply-To: <38BF525B.6BEE9661@prescod.net> Message-ID: > > Greg Wilson: > > I'm interested in exploring what would happen if I could > > do with programs what I do with hypertext: > > > > - apply a DTD to switch between Scheme-style parenthesizing, Python-style > > indentation, or C-style bracing > > > > - embed arbitrary information (images, optimization hints for the compiler, > > etc.) in > > On Thu, 2 Mar 2000, Paul Prescod wrote: > Sounds like structured comments to me. Structured comments sound to me like an after-the-fact rationalization of an out-of-date infatuation with flat ASCII... :-) > > a way that third-party browsers and processors can handle > > (specially-formatted comments are *not* the answer) > > Third party browsers and processors can handle a Python AST if you > give them a plug-in. I thought the whole point of having a standard (like XML) was to free you from plug-ins... > Anyhow, if you are really interested in third-party browsers, the best > thing would be to convert into colorized *HTML*. What is your metric for claiming that this is "best"? > Dozens of people have tried and given up on programming in XML. If you mean "using XML syntax directly as a programming language", then yes, it's a bad idea. If you mean "using XML under the hood to store programs", then I'd be grateful for references. > Let's start with the problem of verbosity. Your if statement above is > not even close to what a semantic "Python DTD" would require. It would > be more like: > > > > That's pretty trick to read. So what we really need is for the editor > to compress it to something more readable -- like the original > notation... ...or curly braces, or Scheme-style parentheses, or maybe pretty little icons decorating the control structure for my 8-year-old nephew, or... > Seriously, I get paid to customize XMetaL and its ilk for document > types. It's hard enough making them usable for the document-world they > were designed for. Making them good programming environments would be > more work than adding multimedia hooks to Emacs pymode (IMHO). Which is easier to teach to 8-year-olds? Thanks, Greg From paul@prescod.net Fri Mar 3 20:33:38 2000 From: paul@prescod.net (Paul Prescod) Date: Fri, 03 Mar 2000 12:33:38 -0800 Subject: [XML-SIG] Re: XML DTD for Python source? References: Message-ID: <38C021A2.1CD93631@prescod.net> gvwilson@nevex.com wrote: > > ... > > Structured comments sound to me like an after-the-fact rationalization of > an out-of-date infatuation with flat ASCII... :-) Python is no more "flat" than XML. XML's tree happens to be very well-hyped. I will go this far: Python could use better ways of attaching structured content to methods, classes and other declared objects. It seems that structured docstrings will be the mechanism. As long as there is a single structured docstring syntax (or at least meta-syntax) I think that that solution is reasonable but you are right that in a perfect world Python would have anticipated structured annotations in the beginning (does any language??). > > Third party browsers and processors can handle a Python AST if you > > give them a plug-in. > > I thought the whole point of having a standard (like XML) was to free you > from plug-ins... Like I said, a stylesheet is a plugin. XML frees you from having your plugin do text parsing because you can depend on the XML parser for that. But for behavior or display you still need the plugin. Of course avoiding the parsing is a big deal...that's why XML is popular. > > Anyhow, if you are really interested in third-party browsers, the best > > thing would be to convert into colorized *HTML*. > > What is your metric for claiming that this is "best"? Ubiquity of the browsers. > > Dozens of people have tried and given up on programming in XML. > > If you mean "using XML syntax directly as a programming language", then > yes, it's a bad idea. If you mean "using XML under the hood to store > programs", then I'd be grateful for references. Well nobody ever proposes the idea without claiming that the ugliness will be hidden behind an editor interface...it was also based on this argument that we allowed XML to get so verbose. I argued then and now that the text mode always comes to be the mode that people use for editing because the effort of customizing XML editors is just too high. It's like creating an Emacs mode. But your success criterion (8 year old nephew loves it) is a lot higher. > > That's pretty trick to read. So what we really need is for the editor > > to compress it to something more readable -- like the original > > notation... > > ...or curly braces, or Scheme-style parentheses, or maybe pretty little > icons decorating the control structure for my 8-year-old nephew, or... Okay, I like the last idea, but not the first two. I think that icons are great as annotative extensions to the textual syntax. I also think that Emacs could be taught to do them. I don't like the ideas that *replace* syntax with other syntax becuase what happens when your nephew tries to join comp.lang.python. What about when he's discussing Python programming on a white-board with his buddies. What about scribbling on paper? Shared notations are useful. Using someone else's emacs environment is hard enough. :) > > Seriously, I get paid to customize XMetaL and its ilk for document > > types. It's hard enough making them usable for the document-world they > > were designed for. Making them good programming environments would be > > more work than adding multimedia hooks to Emacs pymode (IMHO). > > Which is easier to teach to 8-year-olds? Emacs and XMetaL are both editing environment frameworks. I think that either one can be taught to be friendly. Neither is inherently so. The effort required to make them friendly is proportional to the distance between the default behavior and the required behavior. Emacs at least has a "pymode". Maybe five years from now XMetaL will be so much more customizable that I would be more optimistic about using it for programming. But XMetaL's has been under development for 10 years now so I am starting to lose hope of any massive usability breakthroughs. Here's another point: in my opinion, from a user interface point of view, every major XML editor has made a big mistake. When I make a syntax error in Microsoft's software development environment, it flags it but gives me the freedom to do what I want. That's right. XML editors tend to require you to go into a "don't tell me about my mistakes" mode to do anything weird. That's wrong. The little squiggly line under misspelled words or programming language typos is, in my opinion, brilliant. After all, the path from syntactically incorrect to correct could be arbitrarily weird. It isn't just about "incomplete programs". Sometimes I make radically incorrect programs on purpose. e.g. I might type the end-quotes of a triple quoted string before the start quotes because I just happen to be in that part of the program. Another aside: Note that I am not an Emacs user because I hate so many of the default bindings (they make my hands hurt) and the "binding portability problem" stops me from just defining my own... hmmmm....what if Emacs had a feature to fetch configuration files from a URL (simply, through a menu item...without lots of pre-startup hacking). That would go a fair way to making it more useful to me. Another aside: You may well agree with me on this but my opinion is that the number one thing you can do to make programming languages fun for 9 year old boys is hook them up with cool libraries like 3d turtles and programmable dungeon environments. Ideally, they would learn how to do something in a GUI, and then evolve to a command line in order to "store" actions and then to a programming language to store lists of actions with control flow. If you design the perfect, customizable Python programming environment, it will not matter whether the underlying syntax is XML or Python text or even pickled ASTs. -- Paul Prescod - ISOGEN Consulting Engineer speaking for himself "We still do not know why mathematics is true and whether it is certain. But we know what we do not know in an immeasurably richer way than we did. And learning this has been a remarkable achievement, among the greatest and least known of the modern era." - from "Advent of the Algorithm" David Berlinski http://www.opengroup.com/mabooks/015/0151003386.shtml From gvwilson@nevex.com Fri Mar 3 22:14:26 2000 From: gvwilson@nevex.com (gvwilson@nevex.com) Date: Fri, 3 Mar 2000 17:14:26 -0500 (EST) Subject: [XML-SIG] Re: XML DTD for Python source? In-Reply-To: <38C021A2.1CD93631@prescod.net> Message-ID: > Paul Prescod wrote: > > Python is no more "flat" than XML. XML's tree happens to be very > well-hyped. > > I will go this far: Python could use better ways of attaching > structured content to methods, classes and other declared objects. It > seems that structured docstrings will be the mechanism. As long as > there is a single structured docstring syntax (or at least > meta-syntax) I think that that solution is reasonable but you are > right that in a perfect world Python would have anticipated structured > annotations in the beginning (does any language??). Greg Wilson writes: I'm not actually asking for any changes in Python's syntax (or Scheme's, or C's, or...). I'm asking for a change in the way program source is stored on a disk. I earnestly hope that the XML tags in the program source aren't visible, any more than they would be with any other decent WYSIWYG environment. So, once again: I'm interested in exploring what would happen if we (programmers) used the same structured, extensible representation that other people are moving toward, rather than building lots of pre- and post-processing engines to handle less uniform (and certainly less extensible) structured representations of our own. If anyone has already done this, I'd be grateful for pointers. Thanks, Greg From tpassin@idsonline.com Fri Mar 3 22:31:18 2000 From: tpassin@idsonline.com (THOMAS PASSIN) Date: Fri, 3 Mar 2000 17:31:18 -0500 Subject: [XML-SIG] Re: XML DTD for Python source? References: Message-ID: <002701bf8560$351b4f00$3e2a08d1@idsonline.com> > So, once again: I'm interested in exploring what would happen if we > (programmers) used the same structured, extensible representation that > other people are moving toward, rather than building lots of pre- and > post-processing engines to handle less uniform (and certainly less > extensible) structured representations of our own. If anyone has already > done this, I'd be grateful for pointers. > Well, for one thing it would make it easier to make a "folding" editor. If you haven't sampled one yet, try FTE or one of the demos in wxWindows (or, better, its Python version wxPython - alldunn.com/wxPython). A folding editor can collapse or expand text blocks, something like an outliner, so you can hide detail you may not want to see at the moment. It should be possible to do this more intelligently if you understand the structure of your document than if you don't. Still, once you start creating your program this way, it's going to be bloody hard to to edit it by hand any more. You'd be locked into using the one or two enviroments that support your special format. Maybe that's OK if they could export to text format. Tom Passin From gvwilson@nevex.com Fri Mar 3 22:40:05 2000 From: gvwilson@nevex.com (gvwilson@nevex.com) Date: Fri, 3 Mar 2000 17:40:05 -0500 (EST) Subject: [XML-SIG] Re: XML DTD for Python source? In-Reply-To: <002701bf8560$351b4f00$3e2a08d1@idsonline.com> Message-ID: > Thomas Passin wrote: > > Well, for one thing it [using XML to store program source] would make > it easier to make a "folding" editor. Yup. I used the folding editor that came with occam for a couple of years; it was the only thing about the system I liked :-). > Still, once you start creating your program this way, it's going to be > bloody hard to to edit it by hand any more. Do you feel that you're "editing by hand" when you use Microsoft Word on a .doc file? Or Frame on a .frm file? If not, why not? (Parenthetical note: I realize you can't 'grep' a Word document, or run 'sed' on it, etc. I don't think that's because it has rich structure, but rather because that structure is proprietary. I'd hope that XML's openness would make this much less of an issue.) Thanks, Greg From brk@jenkon.com Fri Mar 3 23:46:17 2000 From: brk@jenkon.com (brk@jenkon.com) Date: Fri, 3 Mar 2000 15:46:17 -0800 Subject: [XML-SIG] Silly question Message-ID: I know I must have just overlooked it somewhere, but does anyone know of a function that will take plain text and make it safe for XML? That is, given a string like 'This is an of unusable text", convert it to 'This is an <example> of unusable text'? Thanks. Bryn Keller Senior Software Engineer Jenkon International brk@jenkon.com From tpassin@idsonline.com Fri Mar 3 23:53:44 2000 From: tpassin@idsonline.com (THOMAS PASSIN) Date: Fri, 3 Mar 2000 18:53:44 -0500 Subject: [XML-SIG] Re: XML DTD for Python source? References: Message-ID: <001501bf856b$b82831a0$3e2a08d1@idsonline.com> Greg Wilson wrote > > Thomas Passin wrote: > > > > Well, for one thing it [using XML to store program source] would make > > it easier to make a "folding" editor. > > Yup. I used the folding editor that came with occam for a couple of > years; it was the only thing about the system I liked :-). > > > Still, once you start creating your program this way, it's going to be > > bloody hard to to edit it by hand any more. > > Do you feel that you're "editing by hand" when you use Microsoft Word on a > .doc file? Or Frame on a .frm file? If not, why not? > It depends... I usually turn off as many of the automatic things as I can, like automatic numbered lists. In this respect, I think that if I type a character or move a line, and the visual appearance responds as I think it would if I were using a typewriter (modulo word wrap, I guess), then I think of it as being "by hand". If my source code looked radically different because it was saved as XML, say, then "editing by hand" to me means to find all the right places in the raw character strings, which would be hard and distracting. I realize that Word, for example, uses a very complex internal structure, not really like what you see on the screen. But that's really what I was alluding to - once you edit a .doc file in word, you can't really tinker with it "by hand" using some other product/editor. So you are restricted to using Word from then on. This would be quite a change for a lot of programmers, seems to me. But if the new environment had a lot of really good features, that might be worth it, yes? Like I ***CAN*** use any text editor for Python files, but I **USUALLY** use Idle (the new 0.5 version is really an advance over the old one, which was pretty nice already). Do I hear "literate programming" in the wings? Tom Passin From wunder@infoseek.com Sat Mar 4 01:10:28 2000 From: wunder@infoseek.com (Walter Underwood) Date: Fri, 03 Mar 2000 17:10:28 -0800 Subject: [XML-SIG] Silly question In-Reply-To: Message-ID: <4.3.1.20000303170347.00e77ce0@corp.infoseek.com> At 03:46 PM 3/3/00 -0800, brk@jenkon.com wrote: >I know I must have just overlooked it somewhere, but does anyone know of a >function that will take plain text and make it safe for XML? That is, given >a string like 'This is an of unusable text", convert it to 'This >is an <example> of unusable text'? We moved the code to C, since we already had some char-by-char modules there (HTML-quoting, URL-quoting, ...). But before that, I did have some Python to do it. The code is lost, or rather marooned in ClearCase, but here is a very rough outline: check to see if any special characters exist in the string. if not, return the string unchanged. use the re package to match [<>&'] in the match routine, replace the character with its entity I called it "entify". wunder -- Walter R. Underwood Senior Staff Engineer Infoseek Software GO Network, part of The Walt Disney Company wunder@infoseek.com http://software.infoseek.com/cce/ (my product) http://www.best.com/~wunder/ 1-408-543-6946 From uche.ogbuji@fourthought.com Mon Mar 6 05:31:31 2000 From: uche.ogbuji@fourthought.com (uche.ogbuji@fourthought.com) Date: Sun, 05 Mar 2000 22:31:31 -0700 Subject: [XML-SIG] A first attempt at a SAX 2.0 draft In-Reply-To: Your message of "03 Mar 2000 16:14:18 +0100." Message-ID: <200003060531.WAA13604@localhost.localdomain> > > * Fred L. Drake, Jr. > | > | This is good enough for me. As long as I can take something > | sufficiently file-like and parse it, I don't really care if I have > | to wrap it in an InputSource. The biggest issue is determining just > | how file-like something has to be. ;) Is read() sufficient? > > It is for xmlproc, and xmllib/pyexpat doesn't use the object directly, > so in that case it is up to the driver. sgmlop is probably the same. > In the Java SAX case one would have to do some trickery, but read() > should be sufficient in that case as well. > > In general I think it should be sufficient, and we probably should > specify it to be. Any dissenters? Agreed, as long as we mean 'read' precisely as in the Python standard library. The ability to read in chunks as well as the whole thing at a go should cover the functional needs. -- Uche Ogbuji Fourthought, Inc., IT Consultants uche.ogbuji@fourthought.com (970)481-0805 Software-engineering, project-management, knowledge-management http://Fourthought.com http://OpenTechnology.org From larsga@garshol.priv.no Mon Mar 6 07:35:41 2000 From: larsga@garshol.priv.no (Lars Marius Garshol) Date: 06 Mar 2000 08:35:41 +0100 Subject: [XML-SIG] Silly question In-Reply-To: References: Message-ID: * brk@jenkon.com | | I know I must have just overlooked it somewhere, but does anyone | know of a function that will take plain text and make it safe for | XML? That is, given a string like 'This is an of unusable | text", convert it to 'This is an <example> of unusable text'? The function escape in xml.utils will do this for you. Look at the doco string for documentation. --Lars M. From Mikael.Lexen@emw.ericsson.se Mon Mar 6 07:43:25 2000 From: Mikael.Lexen@emw.ericsson.se (=?iso-8859-1?Q?Mikael_Lex=E9n_=28EMW=29?=) Date: Mon, 6 Mar 2000 08:43:25 +0100 Subject: [XML-SIG] Re: XML DTD for Python source? Message-ID: <9BE4301455E0D211966C0008C75D692B8B50CB@esemont031.gbg.edt.ericsson.se> [Snip] >=20 > Do I hear "literate programming" in the wings? Is this something in the right direction? ftp://www.excosoft.se/pub/seminars/litprog.pdf /Miakel Lex=E9n ---------------------------------------------------------------------- Mikael Lex=E9n, M.Sc.E.E =20 Radar Software Develeopment, Support Unit Ericsson Microwave Systems AB Telephone : +46 31 7470000 Airborne Radar Division Direct: +46 31 7473368 SE-431 84 M=D6LNDAL Telefax : +46 31 7473087 SWEDEN mailto:mikael.lexen@ericsson.com ----------------------------------------------------------------------=20 From aa8vb@yahoo.com Mon Mar 6 11:47:07 2000 From: aa8vb@yahoo.com (Randall Hopper) Date: Mon, 6 Mar 2000 06:47:07 -0500 Subject: [XML-SIG] Re: XML DTD for Python source? In-Reply-To: References: <002701bf8560$351b4f00$3e2a08d1@idsonline.com> Message-ID: <20000306064707.A2115@vislab.epa.gov> gvwilson@nevex.com: |> Thomas Passin wrote: |> |> Well, for one thing it [using XML to store program source] would make |> it easier to make a "folding" editor. | |Yup. I used the folding editor that came with occam for a couple of |years; it was the only thing about the system I liked :-). I definitely agree that foldering source editing is useful. That's why I use Ken Manheimer's outdent.el for Emacs (http://www.python.org/emacs/). Collapsable Python blocks, block skips, etc. -- Randall Hopper aa8vb@yahoo.com From fdrake@acm.org Mon Mar 6 16:28:11 2000 From: fdrake@acm.org (Fred L. Drake, Jr.) Date: Mon, 6 Mar 2000 11:28:11 -0500 (EST) Subject: [XML-SIG] A first attempt at a SAX 2.0 draft In-Reply-To: <200003060531.WAA13604@localhost.localdomain> References: <200003060531.WAA13604@localhost.localdomain> Message-ID: <14531.56475.60886.653659@weyr.cnri.reston.va.us> uche.ogbuji@fourthought.com writes: > Agreed, as long as we mean 'read' precisely as in the Python standard library. > The ability to read in chunks as well as the whole thing at a go should cover > the functional needs. That was my intention; I'd be more interested in chunked reading than read-all-at-once; it makes more sense on connections that are really sockets. ;) Besides, read-it-all can easily be implemented on top if needed. -Fred -- Fred L. Drake, Jr. Corporation for National Research Initiatives From Juergen Hermann" --_=_=_=IMA.BOUNDARY.FR1ZBS138764=_=_=_ Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Hi! Norman says on his XBEL page (http://www.nwalsh.com/bookmarks/) that he works on a XSL stylesheet. I did a simple one you'll find included. It's written for and tested on Apache Cocoon using Norman's SGML/XML bookmarks, you may want to remove the for other environments. Any comments or improvements are appreciated. Ciao, J=FCrgen -- J=FCrgen Hermann (jhe@webde-ag.de) WEB.DE AG, Amalienbadstr.41, D-76227 Karlsruhe Tel.: 0721/94329-0, Fax: 0721/94329-22 --_=_=_=IMA.BOUNDARY.FR1ZBS138764=_=_=_ Content-Type: text/xml; name="xbel-1.0.xsl" Content-Transfer-Encoding: base64 PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iSVNPLTg4NTktMSI/Pgo8eHNsOnN0eWxlc2hl ZXQgdmVyc2lvbj0iMS4wIgogICAgICAgICAgICAgICAgeG1sbnM6eHNsPSJodHRwOi8vd3d3Lncz Lm9yZy8xOTk5L1hTTC9UcmFuc2Zvcm0iCiAgICAgICAgICAgICAgICB4bWxucz0iaHR0cDovL3d3 dy53My5vcmcvVFIveGh0bWwxL3N0cmljdCI+CgogIDx4c2w6dmFyaWFibGUgbmFtZT0ibm9kZXMt bWl4IiBzZWxlY3Q9Iidib29rbWFya3xmb2xkZXJ8YWxpYXN8c2VwYXJhdG9yJyIvPgoKICA8eHNs Om91dHB1dCBtZXRob2Q9Imh0bWwiIGluZGVudD0ieWVzIiBkb2N0eXBlLXB1YmxpYz0iLS8vVzND Ly9EVEQgSFRNTCA0LjAgVHJhbnNpdGlvbmFsLy9FTiIvPgoKICA8IS0tIFhCRUwgPT09PT09PT09 PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0tLT4KICA8eHNs OnRlbXBsYXRlIG1hdGNoPSJ4YmVsIj4KICAgIDx4c2w6cHJvY2Vzc2luZy1pbnN0cnVjdGlvbiBu YW1lPSJjb2Nvb24tZm9ybWF0Ij50eXBlPSJ0ZXh0L2h0bWwiPC94c2w6cHJvY2Vzc2luZy1pbnN0 cnVjdGlvbj4KICAgIDxodG1sPgogICAgICA8aGVhZD4KICAgICAgICA8bWV0YSBodHRwLWVxdWl2 PSJDb250ZW50LVR5cGUiIGNvbnRlbnQ9InRleHQvaHRtbDsgY2hhcnNldD1pc28tODg1OS0xIi8+ CiAgICAgICAgPG1ldGEgaHR0cC1lcXVpdj0iUHJhZ21hIiBjb250ZW50PSJuby1jYWNoZSIvPgog ICAgICAgIDxtZXRhIGh0dHAtZXF1aXY9IkV4cGlyZXMiIGNvbnRlbnQ9IjAiLz4KICAgICAgICA8 IS0tICEhISB4YmVsL3RpdGxlIGlzIG9wdGlvbmFsLCBzaG91bGQgaGFuZGxlIHRoaXMgLS0+CiAg ICAgICAgPHRpdGxlPjx4c2w6dmFsdWUtb2Ygc2VsZWN0PSJ0aXRsZSIvPjwvdGl0bGU+CiAgICAg IDwvaGVhZD4KICAgICAgPGJvZHk+CiAgICAgICAgPHhzbDphcHBseS10ZW1wbGF0ZXMvPgogICAg ICA8L2JvZHk+CiAgICA8L2h0bWw+CiAgPC94c2w6dGVtcGxhdGU+CgogIDwhLS0gVElUTEUgPT09 PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PS0tPgog IDx4c2w6dGVtcGxhdGUgbWF0Y2g9InhiZWwvdGl0bGUiPgogICAgPGgxPgogICAgICAgIDx4c2w6 dmFsdWUtb2Ygc2VsZWN0PSIuIi8+CiAgICAgICAgPCEtLSAhISEgaGFuZGxlIHhiZWwvQGlkLCB4 YmVsL0BhZGRlZD8gLS0+CiAgICA8L2gxPgogIDwveHNsOnRlbXBsYXRlPgoKICA8eHNsOnRlbXBs YXRlIG1hdGNoPSJ0aXRsZSI+CiAgICA8IS0tICEhISB1c2UgZGlmZmVyZW50IHRhZ3MgYWNjb3Jk aW5nIHRvIGRlcHRoIGluc3RlYWQgb2YgaDMgLS0+CiAgICA8aDM+CiAgICAgICAgPHhzbDp2YWx1 ZS1vZiBzZWxlY3Q9Ii4iLz4KICAgIDwvaDM+CiAgPC94c2w6dGVtcGxhdGU+CgogIDwhLS0gSU5G TyA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09 PS0tPgogIDx4c2w6dGVtcGxhdGUgbWF0Y2g9ImluZm8iPgogICAgPGRpdj4KICAgICAgPHhzbDph cHBseS10ZW1wbGF0ZXMvPgogICAgPC9kaXY+CiAgPC94c2w6dGVtcGxhdGU+CgogIDwhLS0gSU5G Ty9NRVRBREFUQSA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09 PS0tPgogIDx4c2w6dGVtcGxhdGUgbWF0Y2g9ImluZm8vbWV0YWRhdGEiPgogICAgPGVtPjx4c2w6 dmFsdWUtb2Ygc2VsZWN0PSJAb3duZXIiLz48L2VtPjxici8+CiAgPC94c2w6dGVtcGxhdGU+Cgog IDwhLS0gREVTQyA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09 PT09PT09PT09PS0tPgogIDx4c2w6dGVtcGxhdGUgbWF0Y2g9ImRlc2MiPgogICAgPGRpdj4KICAg ICAgPHNtYWxsPgogICAgICAgIDx4c2w6dmFsdWUtb2Ygc2VsZWN0PSIuIi8+CiAgICAgIDwvc21h bGw+CiAgICA8L2Rpdj4KICA8L3hzbDp0ZW1wbGF0ZT4KCiAgPCEtLSBGT0xERVIgPT09PT09PT09 PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09LS0+CiAgPHhzbDp0 ZW1wbGF0ZSBtYXRjaD0iZm9sZGVyIj4KICAgIDwhLS0gISEhIGhhbmRsZSBAaWQsIEBhZGRlZD8g LS0+CiAgICA8ZGw+CiAgICAgIDx4c2w6YXBwbHktdGVtcGxhdGVzLz4KICAgIDwvZGw+CiAgPC94 c2w6dGVtcGxhdGU+CgogIDwhLS0gQk9PS01BUksgPT09PT09PT09PT09PT09PT09PT09PT09PT09 PT09PT09PT09PT09PT09PT09PT09PT09PS0tPgogIDx4c2w6dGVtcGxhdGUgbWF0Y2g9ImJvb2tt YXJrIj4KICAgIDwhLS0gISEhIHdlIGlnbm9yZSBpbmZvLCBhbmQgZXhwZWN0IGEgdGl0bGUhIC0t PgogICAgPGR0PgogICAgICA8YSBocmVmPSJAaHJlZiI+CiAgICAgICAgPHhzbDp2YWx1ZS1vZiBz ZWxlY3Q9InRpdGxlIi8+CiAgICAgIDwvYT4KICAgIDwvZHQ+CiAgICA8eHNsOmFwcGx5LXRlbXBs YXRlcyBzZWxlY3Q9ImRlc2MiLz4KICA8L3hzbDp0ZW1wbGF0ZT4KCiAgPHhzbDp0ZW1wbGF0ZSBt YXRjaD0iYm9va21hcmsvZGVzYyI+CiAgICA8ZGQ+CiAgICAgIDx4c2w6dmFsdWUtb2Ygc2VsZWN0 PSIuIi8+CiAgICA8L2RkPgogIDwveHNsOnRlbXBsYXRlPgoKICA8IS0tIEFMSUFTID09PT09PT09 PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0tLT4KICA8eHNs OnRlbXBsYXRlIG1hdGNoPSJhbGlhcyI+CiAgICA8Yj4hISEgYWxpYXMgbm90IHN1cHBvcnRlZCAh ISE8L2I+PGJyLz4KICA8L3hzbDp0ZW1wbGF0ZT4KCiAgPCEtLSBTRVBBUkFUT1IgPT09PT09PT09 PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09LS0+CiAgPHhzbDp0ZW1w bGF0ZSBtYXRjaD0ic2VwYXJhdG9yIj4KICAgIDxociBzaXplPSIxIi8+CiAgPC94c2w6dGVtcGxh dGU+Cgo8L3hzbDpzdHlsZXNoZWV0Pgo= --_=_=_=IMA.BOUNDARY.FR1ZBS138764=_=_=_-- From Juergen Hermann" --_=_=_=IMA.BOUNDARY.FR21I6138764=_=_=_ Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Hi! Had a rather annoying bug in the first version, namely missing {} around the @href with unpleasant consequences. So much for testing. :) While I was at it, I added support for bookmarks that have no title. Sorry for any inconvenience. Ciao, J=FCrgen -- J=FCrgen Hermann (jhe@webde-ag.de) WEB.DE AG, Amalienbadstr.41, D-76227 Karlsruhe Tel.: 0721/94329-0, Fax: 0721/94329-22 --_=_=_=IMA.BOUNDARY.FR21I6138764=_=_=_ Content-Type: text/xml; name="xbel-1.0.xsl" Content-Transfer-Encoding: base64 PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iSVNPLTg4NTktMSI/Pg0KDQo8IS0tICRJZDog eGJlbC0xLjAueHNsLHYgMS4yIDIwMDAvMDMvMDcgMTI6NTU6MjkgamhlIEV4cCAkIC0tPg0KDQo8 eHNsOnN0eWxlc2hlZXQgdmVyc2lvbj0iMS4wIg0KICAgICAgICAgICAgICAgIHhtbG5zOnhzbD0i aHR0cDovL3d3dy53My5vcmcvMTk5OS9YU0wvVHJhbnNmb3JtIg0KICAgICAgICAgICAgICAgIHht bG5zPSJodHRwOi8vd3d3LnczLm9yZy9UUi94aHRtbDEvc3RyaWN0Ij4NCg0KICA8eHNsOnZhcmlh YmxlIG5hbWU9Im5vZGVzLW1peCIgc2VsZWN0PSInYm9va21hcmt8Zm9sZGVyfGFsaWFzfHNlcGFy YXRvciciLz4NCg0KICA8eHNsOm91dHB1dCBtZXRob2Q9Imh0bWwiIGluZGVudD0ieWVzIiBkb2N0 eXBlLXB1YmxpYz0iLS8vVzNDLy9EVEQgSFRNTCA0LjAgVHJhbnNpdGlvbmFsLy9FTiIvPg0KDQog IDwhLS0gWEJFTCA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09 PT09PT09PT09PS0tPg0KICA8eHNsOnRlbXBsYXRlIG1hdGNoPSJ4YmVsIj4NCiAgICA8eHNsOnBy b2Nlc3NpbmctaW5zdHJ1Y3Rpb24gbmFtZT0iY29jb29uLWZvcm1hdCI+dHlwZT0idGV4dC9odG1s IjwveHNsOnByb2Nlc3NpbmctaW5zdHJ1Y3Rpb24+DQogICAgPGh0bWw+DQogICAgICA8aGVhZD4N CiAgICAgICAgPG1ldGEgaHR0cC1lcXVpdj0iQ29udGVudC1UeXBlIiBjb250ZW50PSJ0ZXh0L2h0 bWw7IGNoYXJzZXQ9aXNvLTg4NTktMSIvPg0KICAgICAgICA8bWV0YSBodHRwLWVxdWl2PSJQcmFn bWEiIGNvbnRlbnQ9Im5vLWNhY2hlIi8+DQogICAgICAgIDxtZXRhIGh0dHAtZXF1aXY9IkV4cGly ZXMiIGNvbnRlbnQ9IjAiLz4NCiAgICAgICAgPCEtLSAhISEgeGJlbC90aXRsZSBpcyBvcHRpb25h bCwgc2hvdWxkIGhhbmRsZSB0aGlzIC0tPg0KICAgICAgICA8dGl0bGU+PHhzbDp2YWx1ZS1vZiBz ZWxlY3Q9InRpdGxlIi8+PC90aXRsZT4NCiAgICAgIDwvaGVhZD4NCiAgICAgIDxib2R5Pg0KICAg ICAgICA8eHNsOmFwcGx5LXRlbXBsYXRlcy8+DQogICAgICA8L2JvZHk+DQogICAgPC9odG1sPg0K ICA8L3hzbDp0ZW1wbGF0ZT4NCg0KICA8IS0tIFRJVExFID09PT09PT09PT09PT09PT09PT09PT09 PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0tLT4NCiAgPHhzbDp0ZW1wbGF0ZSBtYXRj aD0ieGJlbC90aXRsZSI+DQogICAgPGgxPg0KICAgICAgICA8eHNsOnZhbHVlLW9mIHNlbGVjdD0i LiIvPg0KICAgICAgICA8IS0tICEhISBoYW5kbGUgeGJlbC9AaWQsIHhiZWwvQGFkZGVkPyAtLT4N CiAgICA8L2gxPg0KICA8L3hzbDp0ZW1wbGF0ZT4NCg0KICA8eHNsOnRlbXBsYXRlIG1hdGNoPSJ0 aXRsZSI+DQogICAgPCEtLSAhISEgdXNlIGRpZmZlcmVudCB0YWdzIGFjY29yZGluZyB0byBkZXB0 aCBpbnN0ZWFkIG9mIGgzIC0tPg0KICAgIDxoMz4NCiAgICAgICAgPHhzbDp2YWx1ZS1vZiBzZWxl Y3Q9Ii4iLz4NCiAgICA8L2gzPg0KICA8L3hzbDp0ZW1wbGF0ZT4NCg0KICA8IS0tIElORk8gPT09 PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0tLT4N CiAgPHhzbDp0ZW1wbGF0ZSBtYXRjaD0iaW5mbyI+DQogICAgPGRpdj4NCiAgICAgIDx4c2w6YXBw bHktdGVtcGxhdGVzLz4NCiAgICA8L2Rpdj4NCiAgPC94c2w6dGVtcGxhdGU+DQoNCiAgPCEtLSBJ TkZPL01FVEFEQVRBID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09 PT09LS0+DQogIDx4c2w6dGVtcGxhdGUgbWF0Y2g9ImluZm8vbWV0YWRhdGEiPg0KICAgIDxlbT48 eHNsOnZhbHVlLW9mIHNlbGVjdD0iQG93bmVyIi8+PC9lbT48YnIvPg0KICA8L3hzbDp0ZW1wbGF0 ZT4NCg0KICA8IS0tIERFU0MgPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09 PT09PT09PT09PT09PT09PT0tLT4NCiAgPHhzbDp0ZW1wbGF0ZSBtYXRjaD0iZGVzYyI+DQogICAg PGRpdj4NCiAgICAgIDxzbWFsbD4NCiAgICAgICAgPHhzbDp2YWx1ZS1vZiBzZWxlY3Q9Ii4iLz4N CiAgICAgIDwvc21hbGw+DQogICAgPC9kaXY+DQogIDwveHNsOnRlbXBsYXRlPg0KDQogIDwhLS0g Rk9MREVSID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09 PT09PS0tPg0KICA8eHNsOnRlbXBsYXRlIG1hdGNoPSJmb2xkZXIiPg0KICAgIDwhLS0gISEhIGhh bmRsZSBAaWQsIEBhZGRlZD8gLS0+DQogICAgPGRsPg0KICAgICAgPHhzbDphcHBseS10ZW1wbGF0 ZXMvPg0KICAgIDwvZGw+DQogIDwveHNsOnRlbXBsYXRlPg0KDQogIDwhLS0gQk9PS01BUksgPT09 PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PS0tPg0KICA8 eHNsOnRlbXBsYXRlIG1hdGNoPSJib29rbWFyayI+DQogICAgPCEtLSAhISEgd2UgaWdub3JlIGlu Zm8sIGFuZCBleHBlY3QgYSB0aXRsZSEgLS0+DQogICAgPGR0Pg0KICAgICAgPGEgaHJlZj0ie0Bo cmVmfSIgdGFyZ2V0PSJfYm9va21hcmsiPg0KICAgICAgICA8eHNsOmNob29zZT4NCiAgICAgICAg ICA8eHNsOndoZW4gdGVzdD0ic3RyaW5nKHRpdGxlKSAhPSAnJyI+DQogICAgICAgICAgICA8eHNs OnZhbHVlLW9mIHNlbGVjdD0idGl0bGUiLz4NCiAgICAgICAgICA8L3hzbDp3aGVuPg0KICAgICAg ICAgIDx4c2w6b3RoZXJ3aXNlPg0KICAgICAgICAgICAgPHhzbDp2YWx1ZS1vZiBzZWxlY3Q9IkBo cmVmIi8+DQogICAgICAgICAgPC94c2w6b3RoZXJ3aXNlPg0KICAgICAgICA8L3hzbDpjaG9vc2U+ DQogICAgICA8L2E+DQogICAgPC9kdD4NCiAgICA8eHNsOmFwcGx5LXRlbXBsYXRlcyBzZWxlY3Q9 ImRlc2MiLz4NCiAgPC94c2w6dGVtcGxhdGU+DQoNCiAgPHhzbDp0ZW1wbGF0ZSBtYXRjaD0iYm9v a21hcmsvZGVzYyI+DQogICAgPGRkPg0KICAgICAgPHhzbDp2YWx1ZS1vZiBzZWxlY3Q9Ii4iLz4N CiAgICA8L2RkPg0KICA8L3hzbDp0ZW1wbGF0ZT4NCg0KICA8IS0tIEFMSUFTID09PT09PT09PT09 PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0tLT4NCiAgPHhzbDp0 ZW1wbGF0ZSBtYXRjaD0iYWxpYXMiPg0KICAgIDxiPiEhISBhbGlhcyBub3Qgc3VwcG9ydGVkICEh ITwvYj48YnIvPg0KICA8L3hzbDp0ZW1wbGF0ZT4NCg0KICA8IS0tIFNFUEFSQVRPUiA9PT09PT09 PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0tLT4NCiAgPHhzbDp0 ZW1wbGF0ZSBtYXRjaD0ic2VwYXJhdG9yIj4NCiAgICA8aHIgc2l6ZT0iMSIvPg0KICA8L3hzbDp0 ZW1wbGF0ZT4NCg0KPC94c2w6c3R5bGVzaGVldD4NCg== --_=_=_=IMA.BOUNDARY.FR21I6138764=_=_=_-- From ken@bitsko.slc.ut.us Tue Mar 7 23:59:38 2000 From: ken@bitsko.slc.ut.us (Ken MacLeod) Date: 07 Mar 2000 17:59:38 -0600 Subject: [XML-SIG] FYI: Perl SAX 2.0 binding draft Message-ID: Following up on an earlier thread: I've finished a draft of a SAX 2.0 binding for Perl that includes the feature I proposed here, of passing DOM nodes as the argument for event handlers rather than positional arguments. The primary benefit of this is that it allows the parser, event generator, or filter to add additional properties to events as they are created or processed (if the underlying DOM implementation allows it, of course). -- Ken From Donegalinc@aol.com Wed Mar 8 04:50:51 2000 From: Donegalinc@aol.com (Donegalinc@aol.com) Date: Tue, 7 Mar 2000 23:50:51 EST Subject: [XML-SIG] New Golf/Internet Start Up-Vienna Message-ID: <65.23e9198.25f7362b@aol.com> Hi! My name is John Gallagher and I am contacting you about an new, pre-ipo, internet start-up headquartered out of Vienna, VA. clubessential, inc. is ready to take the golfing and internet community by storm! Exciting employment opportunities listed below. clubessential, inc. provides web-based software products to enable interactive communications within existing golf and social clubs. The company's private label products allow club communities to extend their events and activities to the internet. Such online services include news, interactive calendars, tee times, event sign up, etc.through their own hosted website. Ultimately, clubessential will aggregate all club members into a private national network, catering to members of the club community and its specific needs. clubessential's web software product was launched for charter customers on December 28, 1999. Charter clubs include Doral in Miami, FL, PGA WEST in Palm Springs Desert, CA, La Quinta Resort & Club in Palm Springs Desert, CA, Grand Traverse in Traverse City, MI, and Grand Wailea in Maui, HI. Formal product launch will be February 20, 2000. Investors in the company include KSL Recreation Corporation - one of the largest owners and operators of distinctive resorts and clubs, principals of the investment firm Kohlberg Kravis Roberts, and principals of the investment firm Wit Capital. clubessential is currently seeking internet and technology professionals to join our world-class team. Current openings include: Chief Technology Officer Reporting to the President, has primary responsibility for management of the IT function. Drive use of technology to support business objectives in an entrepreneurial environment. Drive projects to close while providing leadership for new technology, ventures and acquisitions. Provide strategic vision for delivering the Internet solution while deploying and maintaining on a 24 x 7 basis. Build a world-class team that will deliver best in class solutions. Web Director Reports to CTO, responsible for design and implementation of application solutions. Web site development a team management experience. Knowledge of internet technologies, database utilities, graphic programs and internet utilities. Proficient in dynamic page generation, site design, navigation and overall feel. Technical Architect Planning and design of overall system architecture to support application and infrastructure requirements. Establish company standards for future development. Experience in client-server development, application design, project management, network design, database and system configuration and tuning. C, C++, HTML, VB, ActiveX, XML, and Java. Operating system experience (NT, Unix, Sun) and knowledge of security design, web servers, encryption firewalls, TCP/IP and proxy servers. Application Developer (Multiple Levels) Development and implementation of various web and Internet software products. Experience in Java, JavaScript, XML, HTML, Oracle and Unix. Experience in structured development techniques. FutureTense IPS and Netscape Application Server experience would be useful. User Interface Developer (Multiple Levels) Creative development position focused on developing graphical front ends. Must have strong XML and HTML programming skills. Other experience in Java, JavaScript, C++, and Graphics experience. FutureTense IPS and Netscape Application Server experience would also be useful. (PhotoShop, Illustrator, Microsoft FrontPage). Test Engineer Ensures that all solutions are working properly and meet client needs. Review requirement and system design documents, create software and system test plans,, define systems and architecture requirements for testing. Opportunity to learn new software tools. Solid understanding of internet technology. Should have some HTML or Java knowledge or experience. Oracle Database Administrator (Senior and Junior) Manage the design and development of databases and related master files. Maintain system capacity for existing and future requirements. Recommend new technology, SW/HW, optimizing database performance, supporting developers, configuring database servers and migration of data between databases. Solid data management skills and knowledge of data modeling techniques. SQL Design and tuning, relational modeling, and E-R diagramming a must. Graphics Artist Produce design artwork for sales, advertising, and PR materials. Develop web interfaces, creating project guides, sales sheets, catalogues, and graphic tools for trade shows. Maintain business graphics and coordinate with outside production agencies as needed. Web design experience: Photoshop, Illustrator, Microsoft FrontPage, Macromedia Dreamweaver, Freehand, HTML and JavaScript. Provide portfolio and/or URLs for viewing. All positions include competitive compensation and benefit packages including stock options! I appreciate your time and look forward to speaking with you soon. Sincerely, John Gallagher Director of Recruiting clubessential, inc. 610-917-3530 donegalinc@aol.com www.clubessential.com From riachtchenko@docutec.de Wed Mar 8 09:08:57 2000 From: riachtchenko@docutec.de (Alexander Riachtchenko) Date: Wed, 08 Mar 2000 10:08:57 +0100 Subject: [XML-SIG] Installation_problems_on_NT4.0_germanSp4 Message-ID: <38C618A9.E5A17758@docutec.de> Hi all, after successfully installing distutils got on_NT4.0_germanSp4(python 1.5.2 installed in c:\Program Files) --------------------------------------- $setup.py build running build running build_py not copying xml\_checkversion.py (output up-to-date) not copying xml\__init__.py (output up-to-date) not copying xml\dom\builder.py (output up-to-date) not copying xml\dom\core.py (output up-to-date) not copying xml\dom\esis_builder.py (output up-to-date) not copying xml\dom\html_builder.py (output up-to-date) not copying xml\dom\sax_builder.py (output up-to-date) not copying xml\dom\transform.py (output up-to-date) not copying xml\dom\transformer.py (output up-to-date) not copying xml\dom\utils.py (output up-to-date) not copying xml\dom\walker.py (output up-to-date) not copying xml\dom\writer.py (output up-to-date) not copying xml\dom\__init__.py (output up-to-date) not copying xml\marshal\generic.py (output up-to-date) not copying xml\marshal\wddx.py (output up-to-date) not copying xml\marshal\xmlrpc.py (output up-to-date) not copying xml\marshal\__init__.py (output up-to-date) not copying xml\parsers\sgmllib.py (output up-to-date) not copying xml\parsers\xmllib.py (output up-to-date) not copying xml\parsers\__init__.py (output up-to-date) warning: build_py: package init file 'xml\parsers\xmlproc\__init__.py' not found (or not a regular file) not copying xml\parsers\xmlproc\catalog.py (output up-to-date) not copying xml\parsers\xmlproc\charconv.py (output up-to-date) not copying xml\parsers\xmlproc\dtdparser.py (output up-to-date) not copying xml\parsers\xmlproc\errors.py (output up-to-date) not copying xml\parsers\xmlproc\namespace.py (output up-to-date) not copying xml\parsers\xmlproc\xcatalog.py (output up-to-date) not copying xml\parsers\xmlproc\xmlapp.py (output up-to-date) not copying xml\parsers\xmlproc\xmldtd.py (output up-to-date) not copying xml\parsers\xmlproc\xmlproc.py (output up-to-date) not copying xml\parsers\xmlproc\xmlutils.py (output up-to-date) not copying xml\parsers\xmlproc\xmlval.py (output up-to-date) not copying xml\sax\saxexts.py (output up-to-date) not copying xml\sax\saxlib.py (output up-to-date) not copying xml\sax\saxutils.py (output up-to-date) not copying xml\sax\writer.py (output up-to-date) not copying xml\sax\__init__.py (output up-to-date) not copying xml\sax\drivers\drv_htmllib.py (output up-to-date) not copying xml\sax\drivers\drv_ltdriver.py (output up-to-date) not copying xml\sax\drivers\drv_ltdriver_val.py (output up-to-date) not copying xml\sax\drivers\drv_pyexpat.py (output up-to-date) not copying xml\sax\drivers\drv_sgmllib.py (output up-to-date) not copying xml\sax\drivers\drv_sgmlop.py (output up-to-date) not copying xml\sax\drivers\drv_xmldc.py (output up-to-date) not copying xml\sax\drivers\drv_xmllib.py (output up-to-date) not copying xml\sax\drivers\drv_xmlproc.py (output up-to-date) not copying xml\sax\drivers\drv_xmlproc_val.py (output up-to-date) not copying xml\sax\drivers\drv_xmltoolkit.py (output up-to-date) not copying xml\sax\drivers\pylibs.py (output up-to-date) not copying xml\sax\drivers\__init__.py (output up-to-date) not copying xml\unicode\iso8859.py (output up-to-date) not copying xml\unicode\wstremul.py (output up-to-date) not copying xml\unicode\wstring.py (output up-to-date) not copying xml\unicode\__init__.py (output up-to-date) not copying xml\utils\iso8601.py (output up-to-date) not copying xml\utils\__init__.py (output up-to-date) running build_ext C:\Programme\Microsoft Visual Studio\VC98\bin\cl.exe /nologo /Ox /MD -IC:\Program Files\Python\include\python1.5 -IC:\Program Files\Python\include /c /Foextensi ons/sgmlop.obj /Tcextensions/sgmlop.c Command line warning D4024 : unrecognized source file type 'Files\Python\include\python1.5', object file assumed Command line warning D4027 : source file 'Files\Python\include\python1.5' ignored Command line warning D4024 : unrecognized source file type 'Files\Python\include', object file assumed Command line warning D4027 : source file 'Files\Python\include' ignored sgmlop.c extensions/sgmlop.c(50) : fatal error C1083: Cannot open include file: 'Python.h': No such file or directory Traceback (innermost last): File "C:\PROGRA~2\Python\PYXML-~1.3\setup.py", line 39, in ? ext_modules = [('sgmlop', { 'sources' : ['extensions/sgmlop.c'] }), File "C:\Program Files\Python\distutils\core.py", line 97, in setup dist.run_commands () File "C:\Program Files\Python\distutils\core.py", line 526, in run_commands self.run_command (cmd) File "C:\Program Files\Python\distutils\core.py", line 575, in run_command cmd_obj.run () File "C:\Program Files\Python\distutils\command\build.py", line 54, in run self.run_peer ('build_ext') File "C:\Program Files\Python\distutils\core.py", line 886, in run_peer self.distribution.run_command (command) File "C:\Program Files\Python\distutils\core.py", line 575, in run_command cmd_obj.run () File "C:\Program Files\Python\distutils\command\build_ext.py", line 150, in run self.build_extensions (self.extensions) File "C:\Program Files\Python\distutils\command\build_ext.py", line 213, in build_extensions include_dirs=include_dirs) File "C:\Program Files\Python\distutils\msvccompiler.py", line 103, in compile self.spawn ([self.cc] + cc_args) File "C:\Program Files\Python\distutils\ccompiler.py", line 431, in spawn spawn (cmd, verbose=self.verbose, dry_run=self.dry_run) File "C:\Program Files\Python\distutils\spawn.py", line 37, in spawn _spawn_nt (cmd, search_path, verbose, dry_run) File "C:\Program Files\Python\distutils\spawn.py", line 74, in _spawn_nt raise DistutilsExecError, \ distutils.errors.DistutilsExecError: command 'cl.exe' failed with exit status 2 _--------------------------------------------------------- With regards Alex. From larsga@garshol.priv.no Thu Mar 9 08:40:14 2000 From: larsga@garshol.priv.no (Lars Marius Garshol) Date: 09 Mar 2000 09:40:14 +0100 Subject: [XML-SIG] Proposal: Marrying SAX2 and DOM In-Reply-To: References: Message-ID: * Ken MacLeod | | What I would like to propose is that the Python SAX2 binding pass | objects, specifically DOM-conformant objects, as a single parameter | rather than using both positional parameters and callbacks. Ken, I've been thinking about this, and while this sounds like a good idea, I'm beginning to think that this is something better built on top of SAX than done as part of it. The reason I think so is that I would like to enable SAX to be the lowest common denominator XML representation used for parser output, XML generation, application-to-application communication etc And if SAX is to play this role it has to be both simple and lightweight. Also, ideally I would like to see several alternatives for easy XML application building on top of SAX (easySAX, Pyxie, saxdom?, ...), thus giving developers more than one alternative, and also making it more likely that what we end up with is the best (or at least most popular) variant. Any other opinions on this? --Lars M. From Juergen Hermann" Hi! Environment: Windows NT4 SP6 Visual C++ 5 Python 1.5.2 I had to make the following changes to get PyXML 0.5.3 to run, due to this error: c:\programme\devstudio\vc\bin\cl.exe /nologo /Ox /MD -ID:\PROGRAMME\PYTHON\include\python1.5 -ID:\PROGRAMME\PYTHON\include /c= /Foextensions/wstrop.obj /Tcextensions/wstrop.c extensions/wstrop.c(1150) : error C2099: initializer is not a constant --- wstrop.c.bak Thu Mar 09 12:46:52 2000 +++ wstrop.c Thu Mar 09 12:47:25 2000 @@ -1147,7 +1147,8 @@ statichere PyTypeObject PyWString_Type =3D { - PyObject_HEAD_INIT(&PyType_Type) +/* PyObject_HEAD_INIT(&PyType_Type) */ + PyObject_HEAD_INIT(0) 0, /*ob_size*/ "wstring", /*tp_name*/ sizeof(PyWString), /*tp_size*/ @@ -1185,6 +1186,9 @@ initwstrop() { PyObject *m,*d,*s; + + PyWString_Type.ob_type =3D &PyType_Type; + m=3DPy_InitModule4("wstrop",PyWStrop_Methods,PyWStrop_Doc, 0,PYTHON_API_VERSION); d =3D PyModule_GetDict(m); Ciao, J=FCrgen -- J=FCrgen Hermann (jhe@webde-ag.de) WEB.DE AG, Amalienbadstr.41, D-76227 Karlsruhe Tel.: 0721/94329-0, Fax: 0721/94329-22 From fdrake@acm.org Thu Mar 9 14:45:20 2000 From: fdrake@acm.org (Fred L. Drake, Jr.) Date: Thu, 9 Mar 2000 09:45:20 -0500 (EST) Subject: [XML-SIG] (no subject) In-Reply-To: <200003091406.PAA16594@statistik.cinetic.de> References: <200003091406.PAA16594@statistik.cinetic.de> Message-ID: <14535.47360.44811.859605@weyr.cnri.reston.va.us> Juergen Hermann writes: > I had to make the following changes to get PyXML 0.5.3 to run, > due to this error: Ah, a classic error! There's even a warning in the "Extending & Embedding" manual about this, I guess Martin wrote the initial code before the comment was in that manual. I've fixed this in the CVS repository; it will be reflected in the next release. Thanks for the report and patch! -Fred -- Fred L. Drake, Jr. Corporation for National Research Initiatives From ken@bitsko.slc.ut.us Thu Mar 9 20:36:10 2000 From: ken@bitsko.slc.ut.us (Ken MacLeod) Date: 09 Mar 2000 14:36:10 -0600 Subject: [XML-SIG] Req: reading multiple XML instances from a stream Message-ID: It would be very useful if all parsers were able to support (by request) the common convention of reading an XML stream until an indicator is found (commonly a form-feed or a MIME seperator on a line by itself). This would save application code from having to build a possibly huge string in memory before starting a parse. This might be a feature that can be formalized for SAX2 parsers. Thanks, -- Ken From kens@sightreader.com Fri Mar 10 19:24:13 2000 From: kens@sightreader.com (Ken Seehof) Date: Fri, 10 Mar 2000 11:24:13 -0800 Subject: [XML-SIG] Hello. Newbie questions Message-ID: <38C94BDD.815CBEE6@sightreader.com> Hi, I just joined this group. 1. I already have a parser (based on xmllib) that reads an xml file into a simple python tree structure. I'm using it for my own xml format, though it seems to work fine on any xml file. Is there any reason for me to upgrade to the new xml stuff if I'm not into rich text document processing and existing xml formats? 2. I'm too lazy to build stuff. Where's the Windows binaries? - Ken From akuchlin@mems-exchange.org Fri Mar 10 19:17:43 2000 From: akuchlin@mems-exchange.org (Andrew M. Kuchling) Date: Fri, 10 Mar 2000 14:17:43 -0500 (EST) Subject: [XML-SIG] Re: PyXML and iso-latin-1 In-Reply-To: <7F5B84E604F7D111AC6900609451FCD2058D6DC1@elba.int.westgroup.com> References: <7F5B84E604F7D111AC6900609451FCD2058D6DC1@elba.int.westgroup.com> Message-ID: <14537.19031.760013.213816@amarok.cnri.reston.va.us> Naulleau, Elie writes: >Whenever I load this data in the DOM tree, it reappears with messy accents >and diacritics, >although the header is declared as followed : > If you wind up using the PyExpat parser, through SAX or directly, it'll always produce UTF-8 output, which needs to be translated to Latin1. The current CVS tree includes a wide-string module to handle this; for Python 1.6, it'll use the built-in Unicode support (once it's finished). For now, do something like this (untested): import wstring s = '... UTF-8 output from Expat ...' # Build a Unicode string unicode_str = wstring.from_utf8(s) # Convert to Latin1 latin1 = unicode_str.encode('LATIN1') ... do something with the output string ... -- A.M. Kuchling http://starship.python.net/crew/amk/ "I remember the Hieromancer. I met him, when I was here before. He was a sweet old guy. Kind of like my grandfather. What happened to him?" "He's dead. I expect that he's dead. If he's *lucky* he's dead." -- Barbie and Wilkinson, in SANDMAN #35: "Beginning to See the Light" From ken@bitsko.slc.ut.us Sat Mar 11 02:22:45 2000 From: ken@bitsko.slc.ut.us (Ken MacLeod) Date: 10 Mar 2000 20:22:45 -0600 Subject: [XML-SIG] minimal Python SOAP implementation Message-ID: For the most brave souls, I have a minimal Python SOAP implementation available in CVS. For those less brave, I should have a downloadable snapshot sometime this weekend depending on how crazy my birthday gets! :-) CVSROOT=:pserver:anonymous@casbah.org:/usr/local/Casbah/src/cvsroot password: anonymous This module is derived in part from Andrew Kuchling's xml.marshal code. It implements the SOAP "section 8" serialization using the same API as pickle.py (dump/load), and implements SOAP envelopes with encode_call(), encode_response(), encode_fault(), and decode(). -- Ken From xml-sig@teleo.net Sun Mar 12 03:04:48 2000 From: xml-sig@teleo.net (Patrick Phalen) Date: Sat, 11 Mar 2000 19:04:48 -0800 Subject: [XML-SIG] 4Suite Docs? Message-ID: <00031119084600.01811@quadra.teleo.net> I've fooled around a bit with 4DOM, but have felt hampered due to the lack of any documentation -- at least any that I'm able to discover. Am I missing a treasure trove of docs somewhere? With something like 140 source files in 4Suite, reading the source isn't really an option for getting started. thanks From Donegalinc@aol.com Sun Mar 12 19:13:14 2000 From: Donegalinc@aol.com (Donegalinc@aol.com) Date: Sun, 12 Mar 2000 14:13:14 EST Subject: [XML-SIG] Golf/Internet Start Up-Northern, VA Message-ID: <46.2a0f94b.25fd464a@aol.com> Hi! My name is John Gallagher and I am contacting you about an new, pre-ipo, internet start-up headquartered out of Vienna, VA. clubessential, inc. is ready to take the golfing and internet community by storm! Exciting employment opportunities listed below. clubessential, inc. provides web-based software products to enable interactive communications within existing golf and social clubs. The company's private label products allow club communities to extend their events and activities to the internet. Such online services include news, interactive calendars, tee times, event sign up, etc.through their own hosted website. Ultimately, clubessential will aggregate all club members into a private national network, catering to members of the club community and its specific needs. clubessential's web software product was launched for charter customers on December 28, 1999. Charter clubs include Doral in Miami, FL, PGA WEST in Palm Springs Desert, CA, La Quinta Resort & Club in Palm Springs Desert, CA, Grand Traverse in Traverse City, MI, and Grand Wailea in Maui, HI. Formal product launch will be February 20, 2000. Investors in the company include KSL Recreation Corporation - one of the largest owners and operators of distinctive resorts and clubs, principals of the investment firm Kohlberg Kravis Roberts, and principals of the investment firm Wit Capital. clubessential is currently seeking internet and technology professionals to join our world-class team. Current openings include: Chief Technology Officer Reporting to the President, has primary responsibility for management of the IT function. Drive use of technology to support business objectives in an entrepreneurial environment. Drive projects to close while providing leadership for new technology, ventures and acquisitions. Provide strategic vision for delivering the Internet solution while deploying and maintaining on a 24 x 7 basis. Build a world-class team that will deliver best in class solutions. Web Director Reports to CTO, responsible for design and implementation of application solutions. Web site development a team management experience. Knowledge of internet technologies, database utilities, graphic programs and internet utilities. Proficient in dynamic page generation, site design, navigation and overall feel. Technical Architect Planning and design of overall system architecture to support application and infrastructure requirements. Establish company standards for future development. Experience in client-server development, application design, project management, network design, database and system configuration and tuning. C, C++, HTML, VB, ActiveX, XML, and Java. Operating system experience (NT, Unix, Sun) and knowledge of security design, web servers, encryption firewalls, TCP/IP and proxy servers. Application Developer (Multiple Levels) Development and implementation of various web and Internet software products. Experience in Java, JavaScript, XML, HTML, Oracle and Unix. Experience in structured development techniques. FutureTense IPS and Netscape Application Server experience would be useful. User Interface Developer (Multiple Levels) Creative development position focused on developing graphical front ends. Must have strong XML and HTML programming skills. Other experience in Java, JavaScript, C++, and Graphics experience. FutureTense IPS and Netscape Application Server experience would also be useful. (PhotoShop, Illustrator, Microsoft FrontPage). Test Engineer Ensures that all solutions are working properly and meet client needs. Review requirement and system design documents, create software and system test plans,, define systems and architecture requirements for testing. Opportunity to learn new software tools. Solid understanding of internet technology. Should have some HTML or Java knowledge or experience. Oracle Database Administrator (Senior and Junior) Manage the design and development of databases and related master files. Maintain system capacity for existing and future requirements. Recommend new technology, SW/HW, optimizing database performance, supporting developers, configuring database servers and migration of data between databases. Solid data management skills and knowledge of data modeling techniques. SQL Design and tuning, relational modeling, and E-R diagramming a must. Graphics Artist Produce design artwork for sales, advertising, and PR materials. Develop web interfaces, creating project guides, sales sheets, catalogues, and graphic tools for trade shows. Maintain business graphics and coordinate with outside production agencies as needed. Web design experience: Photoshop, Illustrator, Microsoft FrontPage, Macromedia Dreamweaver, Freehand, HTML and JavaScript. Provide portfolio and/or URLs for viewing. All positions include competitive compensation and benefit packages including stock options! I appreciate your time and look forward to speaking with you soon. Sincerely, John Gallagher Director of Recruiting clubessential, inc. 610-917-3530 donegalinc@aol.com www.clubessential.com From yusufg@outblaze.com Mon Mar 13 06:22:57 2000 From: yusufg@outblaze.com (Yusuf Goolamabbas) Date: 13 Mar 2000 06:22:57 -0000 Subject: [XML-SIG] Trying to get Metaparser code segment working Message-ID: <20000313062257.7810.qmail@yusufg.portal2.com> hi, My apologies if this question is not relevant to this SIG. I am a hobbyist Python programmer and wanted to see what the state of XML processing in python was. I read various websites and downloaded PyXML and got it working with Python 1.5.2. I came across Fourthoughts presentation on XML/Python and was quite intrigued by the Metaparser usage of XML http://fourthought.com/Presentations/oreilly-1999-08-22/page2-4.html I wrote a simple program combing this with the previous example but keep on getting exception errors. I read through Learning Python but wasn't sure if exec can call functions. Would appreciate any pointers to where I goofed up Thanks, Yusuf -- Yusuf Goolamabbas yusufg@outblaze.com #!/usr/bin/python import sys from xml.sax import saxlib, saxexts class MetaMagicParser(saxlib.HandlerBase): """ MetaMagicParser handler class""" def __init__(self): self.print_flag = 0 # Constructor def startElement(self, name, attribs): exec('start_' + name + '(' + "self" + ',' + "attribs" + ')') def start_ADDRBOOK(self, attribs): sys.stdout.write('Addrbook: ') def start_ENTRY(self, attribs): sys.stdout.write('Entry: ') def start_NAME(self, attribs): sys.stdout.write('Name: ') def start_ADDRESS(self, attribs): sys.stdout.write('Address: ') def start_EMAIL(self, attribs): sys.stdout.write('Email: ') def start_PHONENUM(self, attribs): sys.stdout.write('Phonenum: ') p = saxexts.XMLValParserFactory.make_parser() p.setDocumentHandler(MetaMagicParser()) xml_file = open(sys.argv[1], 'r') p.parseFile(xml_file) xml_file.close() Error I am getting is Traceback (innermost last): File "./metaparser.py", line 41, in ? p.parseFile(xml_file) File "/usr/lib/python1.5/site-packages/xml/sax/drivers/drv_xmlproc.py", line 28, in parseFile self.parser.read_from(file) File "/usr/lib/python1.5/site-packages/xml/parsers/xmlproc/xmlval.py", line 98, in read_from self.parser.read_from(file) File "/usr/lib/python1.5/site-packages/xml/parsers/xmlproc/xmlutils.py", line 138, in read_from self.feed(buf) File "/usr/lib/python1.5/site-packages/xml/parsers/xmlproc/xmlutils.py", line 183, in feed self.do_parse() File "/usr/lib/python1.5/site-packages/xml/parsers/xmlproc/xmlproc.py", line 83, in do_parse self.parse_start_tag() File "/usr/lib/python1.5/site-packages/xml/parsers/xmlproc/xmlproc.py", line 185, in parse_start_tag self.app.handle_start_tag(name,attrs) File "/usr/lib/python1.5/site-packages/xml/parsers/xmlproc/xmlval.py", line 160, in handle_start_tag self.realapp.handle_start_tag(name,attrs) File "/usr/lib/python1.5/site-packages/xml/sax/drivers/drv_xmlproc_val.py", line 31, in handle_start_tag self.doc_handler.startElement(name,XPAttributes(attrs,None)) File "./metaparser.py", line 17, in startElement exec('start_' + name + '(self, attribs)') File "", line 1, in ? NameError: start_ADDRBOOK From larsga@garshol.priv.no Mon Mar 13 07:09:26 2000 From: larsga@garshol.priv.no (Lars Marius Garshol) Date: 13 Mar 2000 08:09:26 +0100 Subject: [XML-SIG] Trying to get Metaparser code segment working In-Reply-To: <20000313062257.7810.qmail@yusufg.portal2.com> References: <20000313062257.7810.qmail@yusufg.portal2.com> Message-ID: * Yusuf Goolamabbas | | My apologies if this question is not relevant to this SIG. No problem. :-) | def startElement(self, name, attribs): | exec('start_' + name + '(' + "self" + ',' + "attribs" + ')') You probably mean exec('self.start_' + name + '(' + "attribs" + ')') but I'm not sure if that will work either, since attribs probably won't be repr-ed and reparsed correctly. You could put it in as a literal, but then I think you'd get scoping problems. My suggestion is that you do as xmlllib: method = getattr('self.start_' + name) method(attribs) --Lars M. From larsga@garshol.priv.no Mon Mar 13 07:29:58 2000 From: larsga@garshol.priv.no (Lars Marius Garshol) Date: 13 Mar 2000 08:29:58 +0100 Subject: [XML-SIG] Book reviewers wanted Message-ID: I am currently writing a book on XML application devevlopment for Prentice-Hall (the Charles Goldfarb series), which uses Python as the example language. The book assumes that you are already familiar with the basics of XML and goes on to talk about XML application development in general, the various parser APIs, using SAX, using the DOM and will also cover other stuff, but that hasn't been written yet. If you think this sounds interesting and would like to review an early draft of this book and send me comments on it, please send me an email telling me what your level of XML and Python knowledge is (so that I know when I get your comments later). --Lars M. From larsga@garshol.priv.no Mon Mar 13 07:31:49 2000 From: larsga@garshol.priv.no (Lars Marius Garshol) Date: 13 Mar 2000 08:31:49 +0100 Subject: [XML-SIG] javadom.py Message-ID: While working on the DOM description in the book mentioned in the previous email it occurred to me that perhaps the XML-SIG package should include a module for using a Java DOM through a 4DOM/PyDOM-like interface under JPython. I've started working on something along those lines. Is there any interest in it? Should it go into the XML-SIG package? If you think so I can check it in. (Where? xml/dom/javadom.py?) --Lars M. From tpassin@idsonline.com Mon Mar 13 13:45:38 2000 From: tpassin@idsonline.com (THOMAS PASSIN) Date: Mon, 13 Mar 2000 08:45:38 -0500 Subject: [XML-SIG] javadom.py References: Message-ID: <002601bf8cf2$6eaa6be0$8215b0cf@idsonline.com> Lars Marius Garshol wrote: > > While working on the DOM description in the book mentioned in the > previous email it occurred to me that perhaps the XML-SIG package > should include a module for using a Java DOM through a 4DOM/PyDOM-like > interface under JPython. > Great idea, Lars. I keep telling people that one additional benefit of Python is that you can use JPython with a lot of existing java code. Some real working examples would be very useful. > I've started working on something along those lines. Is there any > interest in it? Should it go into the XML-SIG package? If you think so > I can check it in. (Where? xml/dom/javadom.py?) > Makes sense to me. I'd call the path xml/java/dom/... though. Then xml/java/ could be a home for non-dom java stuff like utilities, too. Regards, Tom Passin From riachtchenko@docutec.de Mon Mar 13 15:20:33 2000 From: riachtchenko@docutec.de (Alexander Riachtchenko) Date: Mon, 13 Mar 2000 16:20:33 +0100 Subject: [XML-SIG] install_fails_on_NT4.0 Message-ID: <38CD0741.CD0C37A0@docutec.de> Hi all, after setup.py build got --------------------------- D:\Program_Files\Microsoft_Visual_Studio\VC98\bin\cl.exe /nologo /Ox /MD -ID:\Program_Files\Python\i nclude\python1.5 -ID:\Program_Files\Python\include -Iextensions/expat/xmltok -Iextensions/expat/xmlp arse /c /Foextensions/expat/xmlwf/unixfilemap.obj /Tcextensions/expat/xmlwf/unixfilemap.c unixfilemap.c extensions/expat/xmlwf/unixfilemap.c(32) : fatal error C1083: Cannot open include file: 'sys/mman.h' : No such file or directory Traceback (innermost last): File "D:\Program_Files\py_opt\PyXML-0.5.3\setup.py", line 39, in ? ext_modules = [('sgmlop', { 'sources' : ['extensions/sgmlop.c'] }), File "D:\Program_Files\Python\distutils\core.py", line 97, in setup dist.run_commands () File "D:\Program_Files\Python\distutils\core.py", line 526, in run_commands self.run_command (cmd) File "D:\Program_Files\Python\distutils\core.py", line 575, in run_command cmd_obj.run () File "D:\Program_Files\Python\distutils\command\build.py", line 54, in run self.run_peer ('build_ext') File "D:\Program_Files\Python\distutils\core.py", line 886, in run_peer self.distribution.run_command (command) File "D:\Program_Files\Python\distutils\core.py", line 575, in run_command cmd_obj.run () File "D:\Program_Files\Python\distutils\command\build_ext.py", line 150, in run self.build_extensions (self.extensions) File "D:\Program_Files\Python\distutils\command\build_ext.py", line 213, in build_extensions include_dirs=include_dirs) File "D:\Program_Files\Python\distutils\msvccompiler.py", line 103, in compile self.spawn ([self.cc] + cc_args) File "D:\Program_Files\Python\distutils\ccompiler.py", line 431, in spawn spawn (cmd, verbose=self.verbose, dry_run=self.dry_run) File "D:\Program_Files\Python\distutils\spawn.py", line 37, in spawn _spawn_nt (cmd, search_path, verbose, dry_run) File "D:\Program_Files\Python\distutils\spawn.py", line 74, in _spawn_nt raise DistutilsExecError, \ distutils.errors.DistutilsExecError: command 'cl.exe' failed with exit status 2 D|)$ ------------ Could it be some help? Thanks Alex. From fdrake@acm.org Mon Mar 13 16:05:02 2000 From: fdrake@acm.org (Fred L. Drake, Jr.) Date: Mon, 13 Mar 2000 11:05:02 -0500 (EST) Subject: [XML-SIG] javadom.py In-Reply-To: References: Message-ID: <14541.4526.702348.399958@weyr.cnri.reston.va.us> Lars Marius Garshol writes: > I've started working on something along those lines. Is there any > interest in it? Should it go into the XML-SIG package? If you think so > I can check it in. (Where? xml/dom/javadom.py?) I think this is an excellent idea! The name is good, too. I presume it could wrap around any of the available Java DOM implementations. -Fred -- Fred L. Drake, Jr. Corporation for National Research Initiatives From paul@prescod.net Mon Mar 13 19:45:15 2000 From: paul@prescod.net (Paul Prescod) Date: Mon, 13 Mar 2000 11:45:15 -0800 Subject: [XML-SIG] Proposal: Marrying SAX2 and DOM References: Message-ID: <38CD454B.ABC02240@prescod.net> Lars Marius Garshol wrote: > > ... > > Also, ideally I would like to see several alternatives for easy XML > application building on top of SAX (easySAX, Pyxie, saxdom?, ...), > thus giving developers more than one alternative, and also making it > more likely that what we end up with is the best (or at least most > popular) variant. I agree that higher level APIs should be built on top of SAX. I think we should only have multiple higher level APIs if we determine that there is a reason for bifurcation. The benefit of competition is choice and evolution. The cost is confusion. We will also need to consider what should go into the Python library itself. There was some concern that SAX is not Pythonic (esp. easy enough) to replace xmllib (which is not sophisticated enough). I have prototyped my stab at a sort of "unification API" and I just need two free days (hard to come by!) to finish the implementation and documentation. I think it is pretty cool. I don't remember whether I stole the DOM node idea from Ken or independently invented it (long, sleepless nights...memory is fuzzy). I definately stole ideas from Pyxie and what we had spoken about for easySAX. I've been working on it for about two months but wanted a more deterministic end date before I announced. I expect my "free days" to be available in early April. (right now I am working on a very hectic on-site project!) I would really appreciate it if other people could look at it and give me opinions. Here are the basic ideas: * handlers pass DOM nodes. (a la "Marrying" and Pyxie) * all parent nodes are available (not really that expensive usually) * peer and child nodes are not typically available * callbacks are labelled with *full XPaths* (a la XSLT) * abuses "docstrings" (a la "spark") def start_spam( self, textNode ): "figure/title/text()" print "Figure title:"+`textNode` print "tagname:"+textNode.parentNode.tagName * you can ask for an event to be handed to you as a tree def start_applets(self,elementNode): "object/applet as tree" for node in elementNode.childNodes: print node * if you do, then child nodes are available * the tree disappears after the end event * handles namespaces Here are slides of what I'm doing: http://www.prescod.net/python/eventdom/ Opinions are solicited. -- Paul Prescod - ISOGEN Consulting Engineer speaking for himself Out of timber so crooked as that which man is made nothing entirely straight can be built. - Immanuel Kant From jsydik@virtualparadigm.com Tue Mar 14 04:31:30 2000 From: jsydik@virtualparadigm.com (Jeremy J. Sydik) Date: Mon, 13 Mar 2000 22:31:30 -0600 Subject: [XML-SIG] Likely Newbie Problem Message-ID: <38CDC0A2.9A9EED40@virtualparadigm.com> I'm trying to write the handler for an tag to simplify a process at work. I'm sure there's something in the standard or the dom tools that i'm forgetting/missing/never got. When I use: def doInclude(node): type = node.get_nodeType() if type == DOCUMENT_NODE: child=node.get_documentElement() doInclude(child) if type == ELEMENT_NODE: includeParent=node.get_parentNode() if node.name=="include": subreader=FileReader(node.getAttribute('obj')+'.xml') subdoc=subreader.document collapse_whitespace(subdoc) strip_whitespace(subdoc) for all in subdoc.get_documentElement().get_childNodes(): includeParent.insertBefore(all,node) includeParent.removeChild(node) else: for child in node.get_childNodes(): doInclude(child) I get the following: Traceback (innermost last): File "./test.cgi", line 64, in ? doInclude(doc) File "./test.cgi", line 35, in doInclude doInclude(child) File "./test.cgi", line 48, in doInclude doInclude(child) File "./test.cgi", line 48, in doInclude doInclude(child) File "./test.cgi", line 44, in doInclude includeParent.insertBefore(all,node) File "/usr/lib/python1.5/xml/dom/core.py", line 456, in insertBefore raise WrongDocumentException("newChild %s created from a " xml.dom.core.WrongDocumentException: newChild created from a di fferent document The problem is, I KNOW i'm pulling part of another tree, but the second contains information to pull into the first Any thoughts what i'm doing wrong? Thanks --Jeremy J. Sydik (jsydik@virtualparadigm.com) From larsga@garshol.priv.no Tue Mar 14 08:41:09 2000 From: larsga@garshol.priv.no (Lars Marius Garshol) Date: 14 Mar 2000 09:41:09 +0100 Subject: [XML-SIG] javadom.py In-Reply-To: <002601bf8cf2$6eaa6be0$8215b0cf@idsonline.com> References: <002601bf8cf2$6eaa6be0$8215b0cf@idsonline.com> Message-ID: * THOMAS PASSIN | | Great idea, Lars. I keep telling people that one additional benefit | of Python is that you can use JPython with a lot of existing java | code. Yup. The thought was that this would make it easier to port code and in general interoperate between CPython and JPython. * Lars Marius Garshol | | I've started working on something along those lines. Is there any | interest in it? Should it go into the XML-SIG package? If you think | so I can check it in. (Where? xml/dom/javadom.py?) * THOMAS PASSIN | | Makes sense to me. I'd call the path xml/java/dom/... though. Then | xml/java/ could be a home for non-dom java stuff like utilities, | too. Hmmm, that might be an idea. --Lars M. From larsga@garshol.priv.no Tue Mar 14 08:42:57 2000 From: larsga@garshol.priv.no (Lars Marius Garshol) Date: 14 Mar 2000 09:42:57 +0100 Subject: [XML-SIG] javadom.py In-Reply-To: <14541.4526.702348.399958@weyr.cnri.reston.va.us> References: <14541.4526.702348.399958@weyr.cnri.reston.va.us> Message-ID: * Lars Marius Garshol | | I've started working on something along those lines. Is there any | interest in it? Should it go into the XML-SIG package? If you think | so I can check it in. (Where? xml/dom/javadom.py?) * Fred L. Drake, Jr. | | I think this is an excellent idea! The name is good, too. I | presume it could wrap around any of the available Java DOM | implementations. That was the intention. I'm working with the Sun implementation only at the moment, since it's the only one I've got at home, but ideally it should work with any Java DOM. --Lars M. From ken@bitsko.slc.ut.us Tue Mar 14 17:36:54 2000 From: ken@bitsko.slc.ut.us (Ken MacLeod) Date: 14 Mar 2000 11:36:54 -0600 Subject: [XML-SIG] Proposal: Marrying SAX2 and DOM In-Reply-To: Paul Prescod's message of "Mon, 13 Mar 2000 11:45:15 -0800" References: <38CD454B.ABC02240@prescod.net> Message-ID: [I'm replying seperately to "marrying SAX2 and DOM" and "full XPath callbacks". This message is about "marrying SAX2 and DOM".] Paul Prescod writes: > Here are the basic ideas: > > * handlers pass DOM nodes. (a la "Marrying" and Pyxie) > * all parent nodes are available (not really that expensive usually) > * peer and child nodes are not typically available > * handles namespaces One reason for marrying SAX and DOM right in the SAX binding, rather than pushing it up to a "higher level" (into a downstream SAX filter, for example) is that then _all_ SAX modules are working at the same level, better sharing of code and network effect. To have some set of modules work with DOM nodes and other sets of modules work with positional parameters would involve inserting filter/converters between each different kind in a SAX chain. The worst of which is that you'd probably lose any attachment to the DOM nodes generated at the head of the stream (especially a DOM-walker). OTOH, note that this will be _required_ to work with Java-based SAX classes unless we can convince _them_ to marry SAX and DOM (which, with one dip of the toe in that water, doesn't seem likely before SAX3). One could use a Java SAX parser/generator to generate events, and then filter into a DOM-node builder, and then use DOM-nodes in subsequent handlers, but if you wanted to use Java SAX filters or handlers you'd still need to insert converters. One hope that I have is that marrying DOM and SAX in Perl, and still hopefully, in Python, will show that this is actually the best thing for SAX overall (SAX3). The strongest argument against DOM in SAX is "heavyweight" DOM (in Java). Where's Java's equivalent of "mini-DOM" or a lightweight DOM? -- Ken From ken@bitsko.slc.ut.us Tue Mar 14 17:37:04 2000 From: ken@bitsko.slc.ut.us (Ken MacLeod) Date: 14 Mar 2000 11:37:04 -0600 Subject: SAX XPath callbacks (was Re: [XML-SIG] Proposal: Marrying SAX2 and DOM) In-Reply-To: Paul Prescod's message of "Mon, 13 Mar 2000 11:45:15 -0800" References: <38CD454B.ABC02240@prescod.net> Message-ID: [I'm replying seperately to "marrying SAX2 and DOM" and "full XPath callbacks". This message is about "full XPath callbacks".] Paul Prescod writes: > Here are the basic ideas: > * callbacks are labelled with *full XPaths* (a la XSLT) > * abuses "docstrings" (a la "spark") > > def start_spam( self, textNode ): > "figure/title/text()" > print "Figure title:"+`textNode` > print "tagname:"+textNode.parentNode.tagName > > * you can ask for an event to be handed to you as a tree > > def start_applets(self,elementNode): > "object/applet as tree" > for node in elementNode.childNodes: > print node > > * if you do, then child nodes are available > * the tree disappears after the end event XPath callbacks are awesome! Does this need to be in the stream head (parser or generator) and be part of the SAX binding or is it better implemented as a base class for handlers and filters? I would think the latter. If it's implemented in parsers and generators, then it's going to be the same code for all event generators, including parsers and filters. This seems odd because they, themselves don't generally "use" this feature, their downstream event receivers do. Implemented as a base class then only those filters and handlers that use these callbacks need to be derived from the XPath base module. Does that make sense? -- Ken P.S. Probably too much detail for one message, but it might also be beneficial to seperate XPath callbacks and partial-DOM tree support into seperate base classes as well. From case@appliedtheory.com Tue Mar 14 17:49:27 2000 From: case@appliedtheory.com (Benjamin Saller Bender) Date: Tue, 14 Mar 2000 12:49:27 -0500 (EST) Subject: [XML-SIG] Proposal: Marrying SAX2 and DOM In-Reply-To: Message-ID: Today, Ken MacLeod wrote: The strongest argument against DOM in SAX is "heavyweight" DOM (in Java). Where's Java's equivalent of "mini-DOM" or a lightweight DOM? You might look at something like the apache-xml project which has /org/apache/xalan/xpath/dtm/DTM.java as a kind of light-weight DOM. -- Benjamin Saller Bender Technical Strategist AppliedTheory Where tire hits pavement on the Information super-highway, that's where my head is... From paul@prescod.net Tue Mar 14 18:26:43 2000 From: paul@prescod.net (Paul Prescod) Date: Tue, 14 Mar 2000 10:26:43 -0800 Subject: [XML-SIG] Divorcing SAX2 and DOM References: <38CD454B.ABC02240@prescod.net> Message-ID: <38CE8463.2AD41A75@prescod.net> When discussing SAX, a crucial priority in everyone's mind has been performance, performance, performance. In most languages, creating objects has a higher cost than passing information as parameters. So, for instance, creating a "text node" is more expensive than passing the string and offsets. SAX is good for high performance and small machines (e.g. XML B2B EDI on WinCE HPCs). In many cases parsers could support both the high level and low level APIs directly and in others the high level API could be layered on top of the low level one with a standard adapter. In both Perl and Python there will be a particular parser that is considered "standard" -- Expat. It makes sense to hook up EventDOM (or whatever it is called) and Expat directly. > The strongest argument against DOM in SAX is "heavyweight" DOM (in > Java). Where's Java's equivalent of "mini-DOM" or a lightweight DOM? I think the biggest cost is creating the DOM nodes and the "heaviness" or "lightness" of the nodes is not as important. Anyhow, this may interest you: http://xml.apache.org/xalan/dtm.html -- Paul Prescod - ISOGEN Consulting Engineer speaking for himself If all you want is sleep, go to bed. But if you want to dream, go to Barbados. - Timothy Findley, "Barbados: The Very Pineapple of Perfection" From paul@prescod.net Tue Mar 14 19:00:35 2000 From: paul@prescod.net (Paul Prescod) Date: Tue, 14 Mar 2000 11:00:35 -0800 Subject: SAX XPath callbacks (was Re: [XML-SIG] Proposal: Marrying SAX2 and DOM) References: <38CD454B.ABC02240@prescod.net> Message-ID: <38CE8C53.5A1F8D91@prescod.net> Ken MacLeod wrote: > > Does this need to be in the stream head (parser or generator) and be > part of the SAX binding or is it better implemented as a base class > for handlers and filters? I would think the latter. It was slightly easier to implement it as a filter than as a base class for the first cut but I will probably try to make it a base class eventually. > P.S. Probably too much detail for one message, but it might also be > beneficial to seperate XPath callbacks and partial-DOM tree support > into seperate base classes as well. Here are the current classes: DOM but not XPath aware: ======================== DOMHandlerBase -- a base class for event handlers that expect DOM nodes instead of SAX events DOMHandlerAdapter -- a filter that converts SAX events to DOM events for the DOMHandlerBase (various Minidom classes) -- a small Miniature DOM implementation Depend on XPath: ================ XPathDispatcher extends DOMHandlerBase -- implements XPath dispatching. Works as a filter today -- perhaps could be a base class instead. DOMBuilder -- a trivial application of the above that generates a whole DOM and returns it MiniDOMFactory -- an adapter that makes minidom compatible with the PyXPath package. Initialization ============== Admittedly, calling it is right now a little ugly because of the layers of factories: myhandler = MyXpathHandler() xpathdispatcher = XPathDispatcher( myhandler ) sax2domhandler = minidom.DOMHandlerAdapter( xpathdispatcher ) p.setDocumentHandler( sax2domhandler ) As long as no method names conflict, we could probably do this all through inheritance instead of filters. The SAX2DOM base class would intercept SAX calls and dispatch them to itself as DOM events. A DOM 2 XPath layer would interpret the DOM nodes and dispatch them on itself. In fact, I think that only a few lines of code need to change. Where I dispatch to "self.handler" I would just dispatch to "self". The only uncomfortable part is that subclasses must be very careful to not mess up the base class' initialization because otherwise it won't have a chance to collect the list of handlers. There are three ways around this: * have each handler check that the class is properly initialized (ugly) * use metaclasses and hope that they don't go away in a future Python (unsafe) * trust the programmer and answer questions on xml-sig This would be by no means the only inheritable class that really depends upon proper base class initialization so I guess I should just stop worrying and learn to trust the programmer. -- Paul Prescod - ISOGEN Consulting Engineer speaking for himself If all you want is sleep, go to bed. But if you want to dream, go to Barbados. - Timothy Findley, "Barbados: The Very Pineapple of Perfection" From paul@prescod.net Tue Mar 14 19:45:27 2000 From: paul@prescod.net (Paul Prescod) Date: Tue, 14 Mar 2000 11:45:27 -0800 Subject: SAX XPath callbacks (was Re: [XML-SIG] Proposal: Marrying SAX2 and DOM) References: <38CD454B.ABC02240@prescod.net> Message-ID: <38CE96D7.6F9A951B@prescod.net> Insofar as there is interest from Perl, Java and Python people, perhaps EventDOM needs its own mailing list. -- Paul Prescod - ISOGEN Consulting Engineer speaking for himself If all you want is sleep, go to bed. But if you want to dream, go to Barbados. - Timothy Findley, "Barbados: The Very Pineapple of Perfection" From gward@python.net Wed Mar 15 02:29:06 2000 From: gward@python.net (Greg Ward) Date: Tue, 14 Mar 2000 21:29:06 -0500 Subject: [XML-SIG] Re: Install_problems_on_NT4.0_Sp4_VC6.0_sp_3 In-Reply-To: <38CCB0F8.E7F52C29@docutec.de>; from Alexander Riachtchenko on Mon, Mar 13, 2000 at 10:12:24AM +0100 References: <38CCB0F8.E7F52C29@docutec.de> Message-ID: <20000314212906.B460@beelzebub> [cc'd to xml-sig@python.org, since this might be a PyXML problem rather than a Distutils problem] On 13 March 2000, Alexander Riachtchenko said: > after successfully installing distributils > and trying to install PyXML got > ----------------------------------------- > D:\Program_Files\Microsoft_Visual_Studio\VC98\bin\cl.exe /nologo /Ox /MD > -ID:\Program_Files\Python\i > nclude\python1.5 -ID:\Program_Files\Python\include > -Iextensions/expat/xmltok -Iextensions/expat/xmlp > arse /c /Foextensions/expat/xmlwf/unixfilemap.obj > /Tcextensions/expat/xmlwf/unixfilemap.c > unixfilemap.c > extensions/expat/xmlwf/unixfilemap.c(32) : fatal error C1083: Cannot > open include file: 'sys/mman.h' > : No such file or directory [...big hairy traceback...] > distutils.errors.DistutilsExecError: command 'cl.exe' failed with exit > status 2 > ----------------------- > or may be, I should ask by py-xml-users about it? > (i'm using py1.5.2 distutils 0.1.3. pyxml 0.5.3) Yeah, I think this might be a PyXML problem: it seems to be expecting a header file that's either not installed on your system, or not in any of the directories that VC++ is looking in. (It might be a Distutils problem, since Distutils tells VC++ where to look for header files. Not sure. XML-SIG, what's up here?) The big hairy traceback is my fault though -- Distutils should suppress those. I started fixing that the other night and got distracted... sigh... Greg -- Greg Ward - Linux geek gward@python.net http://starship.python.net/~gward/ I feel partially hydrogenated! From riachtchenko@docutec.de Wed Mar 15 09:36:16 2000 From: riachtchenko@docutec.de (Alexander Riachtchenko) Date: Wed, 15 Mar 2000 10:36:16 +0100 Subject: [XML-SIG] import xml.parsers.* multiple failure Message-ID: <38CF5990.2394CC07@docutec.de> Hi al,l after sucessfully building and installing PyXML 0.5.3 on nt4.0 (Danke Juergen!) got: ---------------------- D|)$python Python 1.5.2 (#0, Apr 13 1999, 10:51:12) [MSC 32 bit (Intel)] on win32 Copyright 1991-1995 Stichting Mathematisch Centrum, Amsterdam >>> import xml.parsers.xmlproc Traceback (innermost last): File "", line 1, in ? ImportError: No module named xmlproc >>> ---------------------- although ------------------------ D|)$set PYTHONPATH PYTHONPATH=.;c:\iluwin\lib;D:\Program_Files\py_opt\4_Suite;D:\Program_Files\py_opt\omniORB_280\src\li b\omniORBpy\python\omniORB;D:\Program_Files\Python ---------------------- and ---------------------- D|)$dir D:\Program_Files\Python\xml\parsers\xmlproc Datenträger in Laufwerk D: ist Datec_2 Datenträgernummer: B048-6E6E Verzeichnis von D:\Program_Files\Python\xml\parsers\ 15.03.00 08:34 . 15.03.00 08:34 .. 16.08.99 01:53 9.352 catalog.py 15.03.00 08:34 16.173 catalog.pyc 10.02.99 02:46 6.111 charconv.py 15.03.00 08:34 7.597 charconv.pyc 16.08.99 01:53 23.378 dtdparser.py 15.03.00 08:34 24.820 dtdparser.pyc 22.04.99 03:38 12.399 errors.py 15.03.00 08:34 11.846 errors.pyc 22.04.99 03:38 4.814 namespace.py 15.03.00 08:34 7.322 namespace.pyc 22.04.99 03:38 2.090 xcatalog.py 15.03.00 08:34 3.547 xcatalog.pyc 16.08.99 01:53 7.623 xmlapp.py 15.03.00 08:34 12.874 xmlapp.pyc 16.08.99 01:53 26.387 xmldtd.py 15.03.00 08:34 37.387 xmldtd.pyc 16.08.99 01:53 18.603 xmlproc.py 15.03.00 08:34 17.874 xmlproc.pyc 16.08.99 01:53 24.697 xmlutils.py 15.03.00 08:34 30.373 xmlutils.pyc 16.08.99 01:53 12.766 xmlval.py 15.03.00 08:34 18.589 xmlval.pyc 24 Datei(en) 336.622 Bytes 10.516.615.168 Bytes frei ------------------------------ ? Thanks, Alex From riachtchenko@docutec.de Wed Mar 15 10:03:55 2000 From: riachtchenko@docutec.de (Alexander Riachtchenko) Date: Wed, 15 Mar 2000 11:03:55 +0100 Subject: [XML-SIG] repeat_mail___xml_build_errors_on nt4.0_germ_sp4_vc6.0_sp3 Message-ID: <38CF600B.5C95AF12@docutec.de> Hi all, appolozies for not checking the build output thoroughly; there are the following error mesages here: $setup.py build .... not copying xml\parsers\__init__.py (output up-to-date) warning: build_py: package init file 'xml\parsers\xmlproc\__init__.py' not found (or not a regular f ile) .... sgmlop.c warning: build_ext: file 'extensions\sgmlop.def' not found: might have problems building DLL .... wstrop.c warning: build_ext: file 'extensions\wstrop.def' not found: might have problems building DLL ... readfilemap.c warning: build_ext: file 'extensions\pyexpat.def' not found: might have problems building DLL --------------- D|)$attrib /s \wstrop*.def Datei \wstrop*.def nicht gefunden D|)$attrib /s \pyexpat*.def Datei \pyexpat*.def nicht gefunden D|)$attrib /s \sgmlop*.def Datei \sgmlop*.def nicht gefunden ------------------ Thanks Alex. From larsga@garshol.priv.no Wed Mar 15 10:32:20 2000 From: larsga@garshol.priv.no (Lars Marius Garshol) Date: 15 Mar 2000 11:32:20 +0100 Subject: [XML-SIG] Likely Newbie Problem In-Reply-To: <38CDC0A2.9A9EED40@virtualparadigm.com> References: <38CDC0A2.9A9EED40@virtualparadigm.com> Message-ID: * Jeremy J. Sydik | | The problem is, I KNOW i'm pulling part of another tree, but the | second contains information to pull into the first The problem is that the DOM L1 doesn't have any standardized way of doing this (as far as I can see). DOM L2 does, through Document.importNode, but PyDOM doesn't support that. Possible solutions: - make a function that creates a copy of the node with a different owner document (something like copy_to(document, node)) - do a direct assignment to node._document (ouch!) - implement Document.importNode yourself from the information in and post a patch here - use 4DOM? --Lars M. From larsga@garshol.priv.no Wed Mar 15 10:25:00 2000 From: larsga@garshol.priv.no (Lars Marius Garshol) Date: 15 Mar 2000 11:25:00 +0100 Subject: [XML-SIG] Proposal: Marrying SAX2 and DOM In-Reply-To: <38CD454B.ABC02240@prescod.net> References: <38CD454B.ABC02240@prescod.net> Message-ID: * Paul Prescod | | Here are the basic ideas: | | * handlers pass DOM nodes. (a la "Marrying" and Pyxie) | * all parent nodes are available (not really that expensive usually) | * peer and child nodes are not typically available | * callbacks are labelled with *full XPaths* (a la XSLT) | * abuses "docstrings" (a la "spark") This sounds absolutely brilliant. I was inspired by Spark myself, but hadn't thought of combining this with passing DOM nodes. I'm definitely behind this, and don't think I'll continue with my own ezsax, since this sounds so much better. Once we get a closer look at the thing it will probably be possible to provide more detailed comments, but for now I can just say that I think this is exactly what we need. --Lars M. From jsydik@virtualparadigm.com Wed Mar 15 11:08:14 2000 From: jsydik@virtualparadigm.com (Jeremy J. Sydik) Date: Wed, 15 Mar 2000 05:08:14 -0600 Subject: [XML-SIG] PyDOM and 4DOM Message-ID: <38CF6F1E.636E1F4F@virtualparadigm.com> I'm in the early phases of a project (Still at a point where I can decide between similar libraries ;) and have been wondering which DOM implemenation is the officially blessed. It seems to be 4DOM, but the distro/xml-sig deliverables seem to be PyDOM based. Is this just lack of time to update somewhere down the line or is there a disagreement in xml-sig? Thanks Jeremy J. Sydik From akuchlin@mems-exchange.org Wed Mar 15 14:57:01 2000 From: akuchlin@mems-exchange.org (Andrew M. Kuchling) Date: Wed, 15 Mar 2000 09:57:01 -0500 (EST) Subject: [XML-SIG] PyDOM and 4DOM In-Reply-To: <38CF6F1E.636E1F4F@virtualparadigm.com> References: <38CF6F1E.636E1F4F@virtualparadigm.com> Message-ID: <14543.42173.606112.16467@amarok.cnri.reston.va.us> Jeremy J. Sydik writes: >implemenation is the officially blessed. It seems to be 4DOM, but the >distro/xml-sig deliverables seem to be PyDOM based. Is this just lack >of time to update somewhere down the line or is there a disagreement in >xml-sig? The decision was made at the last Python conference to replace PyDOM with 4DOM in the XML-SIG's deliverable; it just hasn't been done yet. -- A.M. Kuchling http://starship.python.net/crew/amk/ We can't go on living on a planet that's two-thirds slum -- not with safety. -- Arnold Smith From akuchlin@mems-exchange.org Wed Mar 15 15:05:03 2000 From: akuchlin@mems-exchange.org (Andrew M. Kuchling) Date: Wed, 15 Mar 2000 10:05:03 -0500 (EST) Subject: [XML-SIG] Re: Install_problems_on_NT4.0_Sp4_VC6.0_sp_3 In-Reply-To: <20000314212906.B460@beelzebub> References: <38CCB0F8.E7F52C29@docutec.de> <20000314212906.B460@beelzebub> Message-ID: <14543.42655.707665.188670@amarok.cnri.reston.va.us> Greg Ward writes: >> extensions/expat/xmlwf/unixfilemap.c(32) : fatal error C1083: Cannot >> open include file: 'sys/mman.h' >> : No such file or directory >[...big hairy traceback...] >> distutils.errors.DistutilsExecError: command 'cl.exe' failed with exit >> status 2 Try editing setup.py and changing the definition of FILEMAP_SRC from 'extensions/expat/xmlwf/unixfilemap.c' to 'extensions/expat/xmlwf/readfilemap.c', so it doesn't try to use the Unix-specific mmap() system call to read files. (Presumably this change is also needed for pre-version-10 MacOS.) I'll check in a patch that checks sys.platform and picks the correct value. -- A.M. Kuchling http://starship.python.net/crew/amk/ "You're developing into a theologian, Dunny." "A diabologian, rather. It's a fairly clear field, these days." -- Robertson Davies, _World Of Wonders_ (1975) From larsga@garshol.priv.no Wed Mar 15 15:12:30 2000 From: larsga@garshol.priv.no (Lars Marius Garshol) Date: 15 Mar 2000 16:12:30 +0100 Subject: [XML-SIG] PyDOM and 4DOM In-Reply-To: <14543.42173.606112.16467@amarok.cnri.reston.va.us> References: <38CF6F1E.636E1F4F@virtualparadigm.com> <14543.42173.606112.16467@amarok.cnri.reston.va.us> Message-ID: * Andrew M. Kuchling | | The decision was made at the last Python conference to replace PyDOM | with 4DOM in the XML-SIG's deliverable; it just hasn't been done | yet. Has any thought been given to the fate of PyDOM? Will it be effectively discontinued? Do we think it would be good if someone were to take it over and continue work on it? Or would we prefer there to be only one DOM implementation for Python? --Lars M. From Mike.Olson@FourThought.com Wed Mar 15 16:22:41 2000 From: Mike.Olson@FourThought.com (Mike Olson) Date: Wed, 15 Mar 2000 09:22:41 -0700 Subject: [XML-SIG] PyDOM and 4DOM References: <38CF6F1E.636E1F4F@virtualparadigm.com> Message-ID: <38CFB8D1.48A69933@FourThought.com> Jeremy, It is lack of time. We are currently working on porting 4DOM so that it fits into the XML-SIG distro. It should be done shortly. It will not change 4DOM from a users point of view too much. All that should change is where you import stuff from. BTW we hope to have this done and ready in a couple of weeks. Mike "Jeremy J. Sydik" wrote: > I'm in the early phases of a project (Still at a point where I can > decide between similar libraries ;) and have been wondering which DOM > implemenation is the officially blessed. It seems to be 4DOM, but the > distro/xml-sig deliverables seem to be PyDOM based. Is this just lack > of time to update somewhere down the line or is there a disagreement in > xml-sig? > > Thanks > Jeremy J. Sydik > > _______________________________________________ > XML-SIG maillist - XML-SIG@python.org > http://www.python.org/mailman/listinfo/xml-sig -- ---------------- Mike Olson Consulting Member Fourthought, Inc http://www.fourthought.com http://opentechnology.org From akuchlin@mems-exchange.org Wed Mar 15 22:39:10 2000 From: akuchlin@mems-exchange.org (Andrew M. Kuchling) Date: Wed, 15 Mar 2000 17:39:10 -0500 (EST) Subject: [XML-SIG] PyDOM and 4DOM In-Reply-To: References: <38CF6F1E.636E1F4F@virtualparadigm.com> <14543.42173.606112.16467@amarok.cnri.reston.va.us> Message-ID: <14544.4366.822957.831011@amarok.cnri.reston.va.us> Lars Marius Garshol writes: >Has any thought been given to the fate of PyDOM? Will it be >effectively discontinued? Do we think it would be good if someone >were to take it over and continue work on it? Or would we prefer >there to be only one DOM implementation for Python? It's a lot of work to maintain a DOM implementation, and that job will only get harder as more levels of DOM Recommendations get added. It seemed pointless for me to keep maintaining PyDOM when the 4DOM people are maintaining an implementation, too; why not focus development effort on one project instead of two? If someone wants to maintain PyDOM, or to write their own Python DOM implementation (which would be the 4th), they're perfectly free to do so, of course! -- A.M. Kuchling http://starship.python.net/crew/amk/ "You know, when we heard you'd debunked Neola, we were afraid you'd gone over to the other side." "Nah -- the hours stink but the pay's good." -- Frohike and Mulder, in X-FILES #3 From gstein@lyra.org Thu Mar 16 09:50:54 2000 From: gstein@lyra.org (Greg Stein) Date: Thu, 16 Mar 2000 01:50:54 -0800 (PST) Subject: [XML-SIG] Expat and layering (was: Divorcing SAX2 and DOM) In-Reply-To: <38CE8463.2AD41A75@prescod.net> Message-ID: On Tue, 14 Mar 2000, Paul Prescod wrote: >... > In many cases parsers could support both the high level and low level > APIs directly and in others the high level API could be layered on top > of the low level one with a standard adapter. > > In both Perl and Python there will be a particular parser that is > considered "standard" -- Expat. It makes sense to hook up EventDOM (or > whatever it is called) and Expat directly. I'm not sure if it is being considered, but anything beyond a small shim over Expat would be Bothersome(tm). SAX drivers, DOMs, etc "should" be in layers over the top of that. As Paul states, performance is a big issue, and I'd like to see as direct access to Expat as possible. Cheers, -g -- Greg Stein, http://www.lyra.org/ From larsga@garshol.priv.no Thu Mar 16 10:42:05 2000 From: larsga@garshol.priv.no (Lars Marius Garshol) Date: 16 Mar 2000 11:42:05 +0100 Subject: [XML-SIG] Expat and layering (was: Divorcing SAX2 and DOM) In-Reply-To: References: Message-ID: * Paul Prescod | | In both Perl and Python there will be a particular parser that is | considered "standard" -- Expat. It makes sense to hook up EventDOM | (or whatever it is called) and Expat directly. * Greg Stein | | I'm not sure if it is being considered, but anything beyond a small | shim over Expat would be Bothersome(tm). SAX drivers, DOMs, etc | "should" be in layers over the top of that. The way I picture it we would have Pyexpat (for direct access to expat), a SAX driver for Pyexpat (perhaps made direct later) and SAX input to EventDOM (also direct access to expat or Pyexpat). That would give us maximum flexibility with minimum performance cost. I don't know if this is what everyone else is thinking, though. --Lars M. From chris@kla-inc.com Thu Mar 16 13:26:31 2000 From: chris@kla-inc.com (Chris Shoulet) Date: Thu, 16 Mar 2000 09:26:31 -0400 Subject: [XML-SIG] Re: XML-SIG digest, Vol 1 #465 - 2 msgs In-Reply-To: <20000225170016.206331CDCA@dinsdale.python.org> References: <20000225170016.206331CDCA@dinsdale.python.org> Message-ID: Can I post a job in the DC area on your distribution group? >Send XML-SIG mailing list submissions to > xml-sig@python.org > >To subscribe or unsubscribe via the World Wide Web, visit > http://www.python.org/mailman/listinfo/xml-sig >or, via email, send a message with subject or body 'help' to > xml-sig-request@python.org > >You can reach the person managing the list at > xml-sig-admin@python.org > >When replying, please edit your Subject line so it is more specific >than "Re: Contents of XML-SIG digest..." > > >Today's Topics: > > 1. Returning data from DocumentHandler (Bradley Marshall) > 2. Re: Returning data from DocumentHandler (Andrew M. Kuchling) > >--__--__-- > >Message: 1 >Date: Thu, 24 Feb 2000 13:54:40 -0800 (PST) >From: Bradley Marshall >To: xml-sig@python.org >Subject: [XML-SIG] Returning data from DocumentHandler > > >Hey guys, > >How do I return data from a ducumentHandler? I am >using sax to build a data structure from xml files. I >want to do something like : > >class DocHandler(DocumentHandler): >.... > > def endDocument(self): > return self.data > >Then I'm calling it like: > >dh = docHandler() >p = parser() >p.setDocumentHandler(dh) >data = p.parseFile(file) >p.close() > >but if I do : > >print data > >I get: >None > >If I do all my manipulations in endDocument(), it's >fine, but I'd like to seperate those functionalities. > >Thanks a lot, >Brad Marshall > >__________________________________________________ >Do You Yahoo!? >Talk to your friends online with Yahoo! Messenger. >http://im.yahoo.com > > >--__--__-- > >Message: 2 >From: "Andrew M. Kuchling" >Date: Thu, 24 Feb 2000 17:19:50 -0500 (EST) >To: xml-sig@python.org >Subject: Re: [XML-SIG] Returning data from DocumentHandler > >Bradley Marshall writes: > >class DocHandler(DocumentHandler): > >.... > > def endDocument(self): > > return self.data > > > >dh = docHandler() > >p = parser() > >p.setDocumentHandler(dh) > >data = p.parseFile(file) > >p.close() > >The parseFile() method doesn't return anything, so it'll always be >None. In the Java version of SAX, the parse() method is declared as >void, in other words. Why not just access the attribute .data of your >DocHandler class? You can also add an accessor method, >.getWhateverData(), to your class, if you prefer accessor methods to >attributes. > >-- >A.M. Kuchling http://starship.python.net/crew/amk/ >Perhaps God made cats so that man might have the pleasure of fondling the >tiger... > -- Robertson Davies, _The Diary of Samuel Marchbanks_ > > > > > >End of XML-SIG Digest_______________________________________________ >XML-SIG maillist - XML-SIG@python.org >http://www.python.org/mailman/listinfo/xml-sig Chris Shoulet Ken Leiner Associates, Inc. Voice: (800) 989-8803 or (301) 933-8800x141 Fax: (301) 933-8808 Email: chris@kla-inc.com Nationwide recruiting for the computer industry... ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ To subscribe to the monthly newsletter please send a blank email to the appropriate (case sensitive) address: WHOLE US ITSEARCH-subscribe@listbot.com WESTERN US ITWEST-subscribe@listbot.com MOUNTAIN US ITMOUNTAIN-subscribe@listbot.com CENTRAL US ITCENTRAL-subscribe@listbot.com EASTERN US ITEASTERN-subscribe@listbot.com DC METRO AREA ITDC-subscribe@listbot.com ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ***If forwarding over material please send as a word attachment*** From gstein@lyra.org Thu Mar 16 17:23:48 2000 From: gstein@lyra.org (Greg Stein) Date: Thu, 16 Mar 2000 09:23:48 -0800 (PST) Subject: [XML-SIG] posting jobs (was: XML-SIG digest, Vol 1 #465 - 2 msgs) In-Reply-To: Message-ID: That is generally frowned upon. Instead, http://www.python.org/Jobs.html would be a great place/resource for you. Cheers, -g On Thu, 16 Mar 2000, Chris Shoulet wrote: > Can I post a job in the DC area on your distribution group? > > > >Send XML-SIG mailing list submissions to > > xml-sig@python.org > > > >To subscribe or unsubscribe via the World Wide Web, visit > > http://www.python.org/mailman/listinfo/xml-sig > >or, via email, send a message with subject or body 'help' to > > xml-sig-request@python.org > > > >You can reach the person managing the list at > > xml-sig-admin@python.org > > > >When replying, please edit your Subject line so it is more specific > >than "Re: Contents of XML-SIG digest..." > > > > > >Today's Topics: > > > > 1. Returning data from DocumentHandler (Bradley Marshall) > > 2. Re: Returning data from DocumentHandler (Andrew M. Kuchling) > > > >--__--__-- > > > >Message: 1 > >Date: Thu, 24 Feb 2000 13:54:40 -0800 (PST) > >From: Bradley Marshall > >To: xml-sig@python.org > >Subject: [XML-SIG] Returning data from DocumentHandler > > > > > >Hey guys, > > > >How do I return data from a ducumentHandler? I am > >using sax to build a data structure from xml files. I > >want to do something like : > > > >class DocHandler(DocumentHandler): > >.... > > > > def endDocument(self): > > return self.data > > > >Then I'm calling it like: > > > >dh = docHandler() > >p = parser() > >p.setDocumentHandler(dh) > >data = p.parseFile(file) > >p.close() > > > >but if I do : > > > >print data > > > >I get: > >None > > > >If I do all my manipulations in endDocument(), it's > >fine, but I'd like to seperate those functionalities. > > > >Thanks a lot, > >Brad Marshall > > > >__________________________________________________ > >Do You Yahoo!? > >Talk to your friends online with Yahoo! Messenger. > >http://im.yahoo.com > > > > > >--__--__-- > > > >Message: 2 > >From: "Andrew M. Kuchling" > >Date: Thu, 24 Feb 2000 17:19:50 -0500 (EST) > >To: xml-sig@python.org > >Subject: Re: [XML-SIG] Returning data from DocumentHandler > > > >Bradley Marshall writes: > > >class DocHandler(DocumentHandler): > > >.... > > > def endDocument(self): > > > return self.data > > > > > >dh = docHandler() > > >p = parser() > > >p.setDocumentHandler(dh) > > >data = p.parseFile(file) > > >p.close() > > > >The parseFile() method doesn't return anything, so it'll always be > >None. In the Java version of SAX, the parse() method is declared as > >void, in other words. Why not just access the attribute .data of your > >DocHandler class? You can also add an accessor method, > >.getWhateverData(), to your class, if you prefer accessor methods to > >attributes. > > > >-- > >A.M. Kuchling http://starship.python.net/crew/amk/ > >Perhaps God made cats so that man might have the pleasure of fondling the > >tiger... > > -- Robertson Davies, _The Diary of Samuel Marchbanks_ > > > > > > > > > > > >End of XML-SIG Digest_______________________________________________ > >XML-SIG maillist - XML-SIG@python.org > >http://www.python.org/mailman/listinfo/xml-sig > > Chris Shoulet > Ken Leiner Associates, Inc. > Voice: (800) 989-8803 or (301) 933-8800x141 > Fax: (301) 933-8808 > Email: chris@kla-inc.com > > Nationwide recruiting for the computer industry... > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > To subscribe to the monthly newsletter please send a blank email to > the appropriate (case sensitive) address: > WHOLE US ITSEARCH-subscribe@listbot.com > WESTERN US ITWEST-subscribe@listbot.com > MOUNTAIN US ITMOUNTAIN-subscribe@listbot.com > CENTRAL US ITCENTRAL-subscribe@listbot.com > EASTERN US ITEASTERN-subscribe@listbot.com > DC METRO AREA ITDC-subscribe@listbot.com > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > ***If forwarding over material please send as a word attachment*** > > _______________________________________________ > XML-SIG maillist - XML-SIG@python.org > http://www.python.org/mailman/listinfo/xml-sig > -- Greg Stein, http://www.lyra.org/ From irmen@bigfoot.com Thu Mar 16 21:32:23 2000 From: irmen@bigfoot.com (Irmen de Jong) Date: Thu, 16 Mar 2000 22:32:23 +0100 Subject: [XML-SIG] Problems with PyXML 0.5.3 + suggestions Message-ID: <001301bf8f8f$6b93b200$6300a8c0@home.nl> Hello I've recently jumped in the XML train and I like it! That's why I tried the PyXML package, version 0.5.3, for my favorite language. (tried it on Linux 2.2 and Windows NT 4). However, I've got some problems with it: 1. the xml/parsers/xmlproc/__init__.py file is 0 bytes in size and some untar tools under Windows apparently don't like this and they skip the file. This renders the xmlproc package unusable because Python doesn't see it as a package anymore. Suggestion: just add one line "# make this a package"... Note: the zero length file works fine under Linux. 2. The prebuilt extensions for Windows are not installed. I had to copy them by hand (after a trial-and-error search for the folder to place them in). Note: works fine under Linux (they are compiled from the source and installed in the right folders). 3. The prebuilt PYEXPAT driver (extension DLL) is useless under Windows. Why? It gobbles up ALL exceptions, including Python runtime errors! I made a little error in my code and no exception was raised, my program just went on and produced unexpected (and wrong) output. Switching to the xmllib parser solved it all because now the SyntaxError occured in my code, and I saw I made a typo! Note: pyexpat seems to work fine under Linux. 4. Linux: sgmlop.so is copied in a wrong directory. It's placed in site-packages/ and it should be in site-packages/xml/parsers (or shouldn't it? The test scripts and driver code seem to want it there because they import xml.parsers.sgmlop...) 5. The new xmllib.py and sgmllib.py modules remain unused, PyXML just uses the old and slow modules from the standard lib. xmllib.py and sgmllib.py aren't copied over the old versions. 6. xmllib.py is missing a version="0.x" statement. I fixed some things myself and got it al working (except the pyexpat parser under Windows) but I felt that I had to report these troubles. I hope things are fixed in a future release. Keep up the good work. Cheers -- Irmen de Jong -- irmen @ bigfoot.com From uche.ogbuji@fourthought.com Fri Mar 17 05:13:54 2000 From: uche.ogbuji@fourthought.com (Uche Ogbuji) Date: Thu, 16 Mar 2000 22:13:54 -0700 Subject: [XML-SIG] ANN: 4DOM 0.9.3 Message-ID: <38D1BF12.50C5A43E@fourthought.com> Fourthought, Inc. (http://Fourthought.com) announces the release of 4DOM 0.9.3 ----------------------- An XML/HTML Python library using the Document Object Model interface 4DOM is a Python library for XML and HTML processing and manipulation using the W3C's Document Object Model for interface. 4DOM implements DOM Core level 2, HTML level 2 and Level 2 Document Traversal. 4DOM should work on all platforms supported by Python. If you have any problems with a particular platform, please e-mail the authors. 4DOM is designed to allow developers rapidly design applications that read, write or manipulate HTML and XML. News ---- - Better UTF-8 handling in printing - Clean up printer whitespace - Fix nasty bug in Sax2 attribute namespace defaulting - Other bug-fixes More info and Obtaining 4DOM ---------------------------- Please see http://Fourthought.com/4Suite/4DOM Or you can download 4DOM from ftp://Fourthought.com/pub/4Suite/4DOM There are Linux RPMs available at ftp://Fourthought.com/pub/mirrors/python4linux/redhat/ 4DOM is distributed under a license similar to that of Python. -- Uche Ogbuji Fourthought, Inc., IT Consultants uche.ogbuji@fourthought.com (970)481-0805 Software-engineering, project-management, knowledge-management http://Fourthought.com http://OpenTechnology.org From uche.ogbuji@fourthought.com Fri Mar 17 05:21:44 2000 From: uche.ogbuji@fourthought.com (Uche Ogbuji) Date: Thu, 16 Mar 2000 22:21:44 -0700 Subject: [XML-SIG] ANN: 4XPath 0.8.3 and 4XSLT 0.8.3 Message-ID: <38D1C0E8.DFCBBF93@fourthought.com> Fourthought, Inc. (http://Fourthought.com) announces the release of 4XSLT and 4XPath 0.8.3 ---------------------- A python implementation of the W3C's XSLT language 4XSLT is an XML transformation processor based on the W3C's specification for the XSLT transform language. 4XPath implements the W3C XPath language for indicating and selecting XML document components. http://www.w3.org/TR/xslt 4XPath implements the full 4XPath recommendation except for the 'lang' core function. Currently, 4XSLT supports a sub-set of the XSLT recommendation including the following: Full expression support and attribute-value template expansion xsl:include xsl:import xsl:template xsl:apply-imports xsl:apply-templates xsl:copy xsl:call-template xsl:if xsl:for-each xsl:choose xsl:element xsl:when xsl:attribute xsl:otherwise xsl:text xsl:message xsl:value-of xsl:variable xsl:processing-instruction xsl:param xsl:comment xsl:with-param xsl:strip-space xsl:key xsl:preserve-space xsl:copy-of xsl:sort xsl:namespace-alias xsl:output xsl:number and, of course, xsl:stylesheet, xsl:transform, literal elements and text Using the xml output method, 4XSLT produces the result tree by throwing events from the emerging SAX 2 standard to a handler, so it can be easily modified to supply results to any SAX 2 consumer. For the 'html' and 'text' output methods special SAX consumers produce HTML DOM nodes and plain text respectively. Note: 4XSLT and 4XPath cannot work with JPython. News ---- Changes in 0.8.3 ---------------- - _Major_ performance improvement (by indexing for document order) - Add XPath API for document-indexing optimization - Implemented xsl:number - Properly wrap exceptions and fix pseudo-i18n - Plug memory leak with RTF variables and params - Fixed document() function - Fixed bugs in apply-templates - A profusion of bug-fixes More info and Obtaining 4XPath and 4XSLT ---------------------------------------- Please see http://Fourthought.com/4Suite/4XPath http://Fourthought.com/4Suite/4XSLT Or you can download 4XSLT from ftp://Fourthought.com/pub/4Suite/4XPath ftp://Fourthought.com/pub/4Suite/4XSLT There are Linux RPMs available at ftp://Fourthought.com/pub/mirrors/python4linux/redhat/ 4XPath and 4XSLT are distributed under a license similar to that of Python. -- Uche Ogbuji Fourthought, Inc., IT Consultants uche.ogbuji@fourthought.com (970)481-0805 Software-engineering, project-management, knowledge-management http://Fourthought.com http://OpenTechnology.org From Juergen Hermann" Hi! If anyone is interested, I wrote an XBEL URL checking script, that brows= es all http: URLs in it and generates a duplicate XBEL document that reflects t= he status of the URLs. This can then be used by an XSLT stylesheet to rende= r a matching HTML representation. See http://cscene.org/~jh/xml/bookmarks/ for the script and example docu= ment and XSLT stylesheets. Ciao, J=FCrgen -- J=FCrgen Hermann (jhe@webde-ag.de) WEB.DE AG, Amalienbadstr.41, D-76227 Karlsruhe Tel.: 0721/94329-0, Fax: 0721/94329-22 From fdrake@acm.org Fri Mar 17 16:06:07 2000 From: fdrake@acm.org (Fred L. Drake, Jr.) Date: Fri, 17 Mar 2000 11:06:07 -0500 (EST) Subject: [XML-SIG] XBEL Checking In-Reply-To: <200003171402.PAA18894@statistik.cinetic.de> References: <200003171402.PAA18894@statistik.cinetic.de> Message-ID: <14546.22511.140214.516127@weyr.cnri.reston.va.us> Juergen Hermann writes: > If anyone is interested, I wrote an XBEL URL checking script, that > browses all http: URLs in it and generates a duplicate XBEL > document that reflects the status of the URLs. This can then be > used by an XSLT stylesheet to render a matching HTML > representation. J=FCrgen, Cool! I still have the stylesheet you announced a month or two (don't recall) ago; has that one changed, and should I still check it into CVS for the XML-SIG package? I know of three XSL stylesheets for XBEL=20= at this point, so I'll probably add a directory with those and a README to the package as long as everything is still ok with the style=20= sheet authors. I think I have some patches pending to the XBEL parsers & stuff that=20= are in the package as well, but I'm not familiar with that code (I just used Grail with XBEL). -Fred -- Fred L. Drake, Jr.=09 Corporation for National Research Initiatives From Juergen Hermann" On Fri, 17 Mar 2000 11:06:07 -0500 (EST), Fred L. Drake, Jr. wrote: > Cool! Yes, it's a thing I planned for several years, but never came around to.= So I now chose it as a project for my first Python script. :) > I still have the stylesheet you announced a month or two (don't >recall) ago; has that one changed, and should I still check it into >CVS for the XML-SIG package? It has changed. Also let me add some commentary to the script, and fix u= p the design a little, and I'll send you a ZIP or tarball, probably start of n= ext week. > I know of three XSL stylesheets for XBEL=3D20=3D >at this point, so I'll probably add a directory with those and a >README to the package as long as everything is still ok with the style=3D= 20=3D >sheet authors. I think we schould find proper names for the different stylesheets, or d= irectory names (if nothing fits, using the author name or initials) and put the s= tuff in seperate dirs. I'd name the base dir "XBEL/XSLT". I have written a second stylesheet th= at checks for dupes (yes, XSLT does the job ;), that could go in "XBEL/XSLT/dupecheck". Ciao, J=FCrgen -- J=FCrgen Hermann (jhe@webde-ag.de) WEB.DE AG, Amalienbadstr.41, D-76227 Karlsruhe Tel.: 0721/94329-0, Fax: 0721/94329-22 From jday@csihq.com Fri Mar 17 17:12:12 2000 From: jday@csihq.com (John Day) Date: Fri, 17 Mar 2000 12:12:12 -0500 Subject: [XML-SIG] VVML? Message-ID: <4.3.0.20000317114926.00bab650@mail.csihq.com> Has anyone thought of using XML for software V&V? Seems like it would be a great way to define test cases, markup expected outputs, cross-reference requirements. . VVML ("Validation and Verification Markup Language"?) would provide a framework for validation and regression testing, bug tracking etc I know Python already has a built-in test facility. VVML would extend this beyond merely comparing expected outputs etc. Comments? John Day From amused@webamused.com Fri Mar 17 22:10:30 2000 From: amused@webamused.com (Joshua Macy) Date: Fri, 17 Mar 2000 14:10:30 -0800 Subject: [XML-SIG] Problem building XML package v0.5.2 Message-ID: <38D2AD56.37112547@webamused.com> I get the following error when running python setup.py build on my Linux system: make[1]: *** No rule to make target `/usr/lib/python1.5/config/Makefile', needed by `sedscript'. Stop. make: *** [boot] Error 2 make: *** No targets. Stop. Traceback (innermost last): File "setup.py", line 170, in ? func() File "setup.py", line 140, in build_unix shutil.copy('extensions/' + filename, 'build/xml/parsers/') File "/usr/lib/python1.5/shutil.py", line 51, in copy File "/usr/lib/python1.5/shutil.py", line 16, in copyfile IOError: (2, 'No such file or directory') I'm using Caldera OpenLinux 2.2 (kernel 2.2.5), Python 1.5.1 Thanks, Joshua From cloder@acm.org Sat Mar 18 00:44:53 2000 From: cloder@acm.org (Chad Loder) Date: Fri, 17 Mar 2000 19:44:53 -0500 (EST) Subject: [XML-SIG] New XBEL tool for Windows users: xbelie Message-ID: Hi. I have written a native Win32 freeware program to convert Internet Explorer favorites into an XBEL file. This will be useful to people who don't have Python on their system (like me), and hopefuly will encourage more people to use XBEL. It has no GUI (runs from the command line), so it's useful for automation/batch files. The program name is xbelie and you can download it from: http://www.ccs.neu.edu/home/cloder/freeware/xbelie.html It's freeware. Here is the command-line usage: Usage: xbelie [-o ] [-f ] [-p ] - The default output goes to stdout (the screen) instead of a file. - Your default favorites path is \Profiles\\Favorites - There is no prolog file by default. If you specify a prolog file, it will be copied to the beginning of the output. This is useful if you want to customize the output (by adding a stylesheet or entity declaration). If anyone has questions, bug reports, or feature requests, you can either send them to me or to the mailing list. Thanks, Chad Loder ---------------------------------------------------- | Chad Loder - Somerville, MA, USA | | EMail: cloder@acm.org | | Home Page: http://www.ccs.neu.edu/home/cloder | ---------------------------------------------------- From johnd@myanmars.net Sun Mar 19 21:36:33 2000 From: johnd@myanmars.net (johnd@myanmars.net) Date: Sun, 19 Mar 2000 21:36:33 Subject: [XML-SIG] Expose your business to the Internet Message-ID: <20000320141933.0E1461CD0A@dinsdale.python.org> PUT EMAIL MARKETING TO WORK FOR YOU... Call NOW and receive 50,000 FREE emails with your order! WE HAVE OPT-IN LISTS!!!! see below for removal. Special Ends Friday March 21, 2000 MLM'ers, We can build your downline. Imagine having a product or idea and selling it for only $10. Now imagine sending an ad for your product or idea to 25 million people! If you only get a 1/10 of 1% response you have just made $250,000!! You hear about people getting rich off the Internet everyday on TV, now is the perfect time for you to jump in on all the action. FACT. With the introduction of the Internet, one primary KEY to conducting your business successfully is creating massive exposure in a cost effective manner. FACT. The experts agree that email marketing is one of the most cost effective forms of promotion in existence today. Electronic mail has overtaken the telephone as the primary means of business communication.(American Management Association) Of online users 41 percent check their email daily. "A gold mine for those who can take advantage of bulk email programs"- The New York Times "Email is an incredible lead generation tool" -Crains Magazine "Blows away traditional Mailing"-Advertising Age "It's truly arrived. Email is the killer app so far in the online world"-Kate Delhagen, Forrester Research Analyst Why not let a professional company handle your direct email marketing efforts for you? *We will assist you in developing your entire campaign! *We can even create your ad or annoucement for you! *No responses? We resend at no cost! For More Information CALL NOW-702-248-1043 For removal see below. SPECIAL RATES SPECIAL ENDS Friday March 21, 2000 Targeted Rates Upon Request. BONUS!!! Call In and receive 50,000 Extra Emails at No Cost! Call NOW - 702-248-1043 ++++++++++++++++++++++++++++++++++++++++++++++++++ We are terribly sorry if you received this message in error. If you wish to be removed. Please, type "REMOVE" in the subject line: brianf@excite.ca ++++++++++++++++++++++++++++++++++++++++++++++++++ From Steve.Hestness@westgroup.com Mon Mar 20 22:06:42 2000 From: Steve.Hestness@westgroup.com (Hestness, Steve) Date: Mon, 20 Mar 2000 16:06:42 -0600 Subject: [XML-SIG] PyXML Installation on IBM AIX Message-ID: <9DDF5FF45501D211BC22006094238FB002F91655@elfie.int.westgroup.com> I am attempting to install PyXML on IBM AIX 4.2. I've installed distutils. Here is the last part of the output from the "python setup.py build" command: What is ./ld_so_aix? .. .. .. running build_ext skipping extensions/sgmlop.c (sgmlop.o up-to-date) ./ld_so_aix cc sgmlop.o -o build/platlib/sgmlop.so unable to execute ./ld_so_aix: No such file or directory Traceback (innermost last): File "setup.py", line 39, in ? ext_modules = [('sgmlop', { 'sources' : ['extensions/sgmlop.c'] }), File "/usr/local/lib/python1.5/site-packages/distutils/core.py", line 97, in setup dist.run_commands () File "/usr/local/lib/python1.5/site-packages/distutils/core.py", line 526, in run_commands self.run_command (cmd) File "/usr/local/lib/python1.5/site-packages/distutils/core.py", line 575, in run_command cmd_obj.run () File "/usr/local/lib/python1.5/site-packages/distutils/command/build.py", line 54, in run self.run_peer ('build_ext') File "/usr/local/lib/python1.5/site-packages/distutils/core.py", line 886, in run_peer self.distribution.run_command (command) File "/usr/local/lib/python1.5/site-packages/distutils/core.py", line 575, in run_command cmd_obj.run () File "/usr/local/lib/python1.5/site-packages/distutils/command/build_ext.py", line 150, in run self.build_extensions (self.extensions) File "/usr/local/lib/python1.5/site-packages/distutils/command/build_ext.py", line 247, in build_extensions extra_postargs=extra_args) File "/usr/local/lib/python1.5/site-packages/distutils/unixccompiler.py", line 293, in link_shared_object self.spawn ([self.ld_shared] + ld_args) File "/usr/local/lib/python1.5/site-packages/distutils/ccompiler.py", line 431, in spawn spawn (cmd, verbose=self.verbose, dry_run=self.dry_run) File "/usr/local/lib/python1.5/site-packages/distutils/spawn.py", line 35, in spawn _spawn_posix (cmd, search_path, verbose, dry_run) File "/usr/local/lib/python1.5/site-packages/distutils/spawn.py", line 121, in _spawn_posix raise DistutilsExecError, \ distutils.errors.DistutilsExecError: command './ld_so_aix' failed with exit status 1 From akuchlin@mems-exchange.org Tue Mar 21 15:54:34 2000 From: akuchlin@mems-exchange.org (Andrew M. Kuchling) Date: Tue, 21 Mar 2000 10:54:34 -0500 (EST) Subject: [XML-SIG] PyXML Installation on IBM AIX In-Reply-To: <9DDF5FF45501D211BC22006094238FB002F91655@elfie.int.westgroup.com> References: <9DDF5FF45501D211BC22006094238FB002F91655@elfie.int.westgroup.com> Message-ID: <14551.39738.230790.623964@amarok.cnri.reston.va.us> Hestness, Steve writes: >I am attempting to install PyXML on IBM AIX 4.2. I've installed distutils. >Here is the last part of the output from the "python setup.py build" >command: What is ./ld_so_aix? It's a script that comes with Python (included in the Modules/ subdirectory of the Python source), because AIX requires some magical compiler incantations to compile shared libraries. This looks like a bug in Python itself, not in the XML code or the Distutils code; it seems that LDSHARED is set to './ld_so_aix', when it should be /usr/local/lib/python1.5/config/ld_so_aix, or something similar. As a workaround, you could simply copy ld_so_aix to the XML tree from your Python source tree. Or, put a copy of the script in /usr/local/lib/python1.5/config/, and hack the makesetup script to use the full path name. (Distutils parses makesetup to get the paths and compiler invocations for a system.) -- A.M. Kuchling http://starship.python.net/crew/amk/ Good job, there, O'Grady. Always kick 'em when they're down. You might just make a detective yet. -- Lt. Burke, in SANDMAN MYSTERY THEATRE: "The Cannon", act IV From cloder@acm.org Thu Mar 23 08:13:11 2000 From: cloder@acm.org (Chad Loder) Date: Thu, 23 Mar 2000 03:13:11 -0500 (EST) Subject: [XML-SIG] XBEL metadata question Message-ID: Hi. I wrote a tool to annotate XBEL files with metadata from the referenced page. This metadata is not really specific to any tool, because it was authored by whoever generated the page and is meant to be understood by a wide variety of browsers. What should the owner be of the metadata tags I create? Should it be my program? For example, an HTML page may have: Thanks, Chad ---------------------------------------------------- | Chad Loder - Somerville, MA, USA | | EMail: cloder@acm.org | | Home Page: http://www.ccs.neu.edu/home/cloder | ---------------------------------------------------- From Juergen Hermann" On Thu, 23 Mar 2000 03:13:11 -0500 (EST), Chad Loder wrote: >Hi. I wrote a tool to annotate XBEL files with metadata from the >referenced page. When you already do that, could you extend it to grab the from t= he page and insert it into the <bookmark> if that bookmark has no or an empty ti= tle element? >What should the owner be of the metadata tags I create? Should it >be my program? > >For example, an HTML page may have: > ><META NAME=3D"description" CONTENT=3D"This is the description"> I'd do it this way: <!DOCTYPE .... [ <!ATTLIST metadata http-name CDATA #IMPLIED http-content CDATA #IMPLIED > ]> ... <meta owner=3D"http" http-name=3D"description" ...> Ciao, J=FCrgen -- J=FCrgen Hermann (jhe@webde-ag.de) WEB.DE AG, Amalienbadstr.41, D-76227 Karlsruhe Tel.: 0721/94329-0, Fax: 0721/94329-22 From larsga@garshol.priv.no Thu Mar 23 17:14:05 2000 From: larsga@garshol.priv.no (Lars Marius Garshol) Date: 23 Mar 2000 18:14:05 +0100 Subject: [XML-SIG] javadom.py Message-ID: <m366udehia.fsf@lambda.garshol.priv.no> Here is my first attempt at javadom.py. If I get permission to do so I will check it into CVS, but for the moment I'm only posting it here. Note that it's still pretty rough and hasn't seen all that much testing. One unsettled question (for me) is where to put the various DOM constants and how to name the get/set methods. I've mimicked PyDOM, but have since seen that 4DOM does it differently. Has it been decided which interface 4DOM will have when it's integrated into the XML-SIG package? # An adapter for Java DOM implementations that makes it possible to # access them through the same interface as the Python DOM # implementation. # For now based on Sun's Java Project X. # Todo: # - implement remaining Python parts of NodeList and NamedNodeMap # - more 4DOM-like interface? support _get_* ? # - make a test suite # - support more DOM implementations # - find a scheme for doing this # - support level 2 # - get rid of FIXMEs import string def filetourl(file): # A Python port of James Clark's fileToURL from XMLTest.java. from java.io import File from java.net import URL from java.lang import System file = File(file).getAbsolutePath() sep = System.getProperty("file.separator") if sep != None and len(sep) == 1: file = file.replace(sep[0], '/') if len(file) > 0 and file[0] != '/': file = '/' + file return URL('file', None, file).toString() def createDocument(): from com.sun.xml.tree import XmlDocument return Document(XmlDocument()) def buildDocumentString(string): from com.sun.xml.tree import XmlDocumentBuilder return Document(XmlDocumentBuilder.createXmlDocument(string)) def buildDocumentUrl(url): from com.sun.xml.tree import XmlDocument return Document(XmlDocument.createXmlDocument(url)) def buildDocumentFile(filename): return buildDocumentUrl(filetourl(filename)) # ===== Utilities def _wrap_node(node): if node == None: return None return NODE_CLASS_MAP[node.getNodeType()] (node) # ===== Constants ELEMENT_NODE = 1 ATTRIBUTE_NODE = 2 TEXT_NODE = 3 CDATA_SECTION_NODE = 4 ENTITY_REFERENCE_NODE = 5 ENTITY_NODE = 6 PROCESSING_INSTRUCTION_NODE = 7 COMMENT_NODE = 8 DOCUMENT_NODE = 9 DOCUMENT_TYPE_NODE = 10 DOCUMENT_FRAGMENT_NODE = 11 NOTATION_NODE = 12 # ===== DOMImplementation class DOMImplementation: def __init__(self, impl): self._impl = impl def hasFeature(self, feature, version): if version == None or version == "1.0": return string.lower(feature) == "xml" and \ self._impl.hasFeature(feature, version) else: return 0 def __repr__(self): return "<DOMImplementation javadom.py, using '%s'>" % self._impl # ===== Node class Node: def __init__(self, impl): self._impl = impl # attributes def get_nodeName(self): return self._impl.getNodeName() def get_nodeValue(self): return self._impl.getNodeValue() def get_nodeType(self): return self._impl.getNodeType() def get_parentNode(self): return _wrap_node(self._impl.getParentNode()) def get_childNodes(self): children = self._impl.getChildNodes() if children is None: return children else: return NodeList(children) def get_firstChild(self): return _wrap_node(self._impl.getFirstChild()) def get_lastChild(self): return _wrap_node(self._impl.getLastChild()) def get_previousSibling(self): return _wrap_node(self._impl.getPreviousSibling()) def get_nextSibling(self): return _wrap_node(self._impl.getNextSibling()) def get_ownerDocument(self): return _wrap_node(self._impl.getOwnerDocument()) def get_attributes(self): atts = self._impl.getAttributes() if atts is None: return None else: return NamedNodeMap(atts) # methods def insertBefore(self, new, neighbour): self._impl.insertBefore(new._impl, neighbour._impl) def replaceChild(self, new, old): self._impl.replaceChild(new._impl, old._impl) return old def removeChild(self, old): self._impl.removeChild(old._impl) return old def appendChild(self, new): self._impl.appendChild(new._impl) def hasChildNodes(self): return self._impl.hasChildNodes() def cloneNode(self): return _wrap_node(self._impl.cloneNode()) # attribute access def __getattr__(self, name): if name[ :4] != "get_" and hasattr(self, "get_" + name): return getattr(self, "get_" + name) () else: raise AttributeError(name) def __setattr__(self, name, value): if name[ :4] != "set_" and hasattr(self, "set_" + name): getattr(self, "set_" + name) (value) else: raise AttributeError(name) # ===== Document class Document(Node): # methods def createTextNode(self, data): return Text(self._impl.createTextNode(data)) def createEntityReference(self, ): return EntityReference(self._impl.createEntityReference()) def createElement(self, name): return Element(self._impl.createElement(name)) def createDocumentFragment(self): return DocumentFragment(self._impl.createDocumentFragment()) def createComment(self, data): return Comment(self._impl.createComment(data)) def createCDATASection(self, data): return CDATASection(self._impl.createCDATASection(data)) def createProcessingInstruction(self, target, data): return ProcessingInstruction(self._impl.createProcessingInstruction(target, data)) def createAttribute(self, name): return Attr(self._impl.createAttribute(name)) def getElementsByTagName(self, name): return NodeList(self._impl.getElementsByTagName(name)) # attributes def get_doctype(self): return self._impl.getDoctype() def get_implementation(self): return DOMImplementation(self._impl.getImplementation()) def get_documentElement(self): return _wrap_node(self._impl.getDocumentElement()) def __repr__(self): docelm = self._impl.getDocumentElement() if docelm: return "<Document with root '%s'>" % docelm.getTagName() else: return "<Document with no root>" # ===== Element class Element(Node): def __init__(self, impl): Node.__init__(self, impl) self.get_tagName = self._impl.getTagName self.getAttribute = self._impl.getAttribute self.setAttribute = self._impl.setAttribute self.removeAttribute = self._impl.removeAttribute self.normalize = self._impl.normalize def getAttributeNode(self, name): return Attr(self._impl.getAttributeNode(name)) def setAttributeNode(self, attr): self._impl.setAttributeNode(attr._impl) def removeAttributeNode(self, attr): self._impl.removeAttributeNode(attr._impl) def getElementsByTagName(self, name): return NodeList(self._impl.getElementsByTagName(name)) def __repr__(self): return "<Element '%s' with %d attributes and %d children>" % \ (self._impl.getTagName(), self._impl.getAttributes().getLength(), self._impl.getChildNodes().getLength()) # ===== CharacterData class CharacterData(Node): def __init__(self, impl): Node.__init__(self, impl) self.get_data = self._impl.getData self.set_data = self._impl.setData self.get_length = self._impl.getLength self.substringData = self._impl.substringData self.appendData = self._impl.appendData self.insertData = self._impl.insertData self.deleteData = self._impl.deleteData self.replaceData = self._impl.replaceData # ===== Comment class Comment(CharacterData): def __repr__(self): return "<Comment of length %d>" % self.getLength() # ===== ProcessingInstruction class ProcessingInstruction(Node): def __init__(self, impl): Node.__init__(self, impl) self.get_target = self._impl.getTarget self.get_data = self._impl.getData self.set_data = self._impl.setData def __repr__(self): return "<PI with target '%s'>" % self._impl.getTarget() # ===== Text class Text(CharacterData): def splitText(self, offset): return Text(self._impl.splitText(offset)) def __repr__(self): return "<Text of length %d>" % self._impl.getLength() # ===== CDATASection class CDATASection(Text): def __repr__(self): return "<CDATA section of length %d>" % self._impl.getLength() # ===== Attr class Attr(Node): def __init__(self, impl): Node.__init__(self, impl) self.get_name = self._impl.getName self.get_specified = self._impl.getSpecified self.get_value = self._impl.setValue self.set_value = self._impl.setValue def __repr__(self): return "<Attr '%s'>" % self._impl.getName() # ===== EntityReference class EntityReference(Node): def __repr__(self): return "<EntityReference '%s'>" % self.getNodeName() # ===== DocumentType class DocumentType(Node): def __init__(self, impl): Node.__init__(self, impl) self.get_name = self._impl.getName def get_entities(self): return NamedNodeMap(self._impl.getEntities()) def get_notations(self): return NamedNodeMap(self._impl.getNotations()) def __repr__(self): return "<DocumentType '%s'>" % self._impl.getNodeName() # ===== Notation class Notation(Node): def __init__(self, impl): Node.__init__(self, impl) self.get_publicId = self._impl.getPublicId self.get_systemId = self._impl.getSystemId def __repr__(self): return "<Notation '%s'>" % self._impl.getNodeName() # ===== Entity class Entity(Node): def __init__(self, impl): Node.__init__(self, impl) self.get_publicId = self._impl.getPublicId self.get_systemId = self._impl.getSystemId self.get_notationName = self._impl.getNotationName def __repr__(self): return "<Entity '%s'>" % self._impl.getNodeName() # ===== DocumentFragment class DocumentFragment(Node): def __repr__(self): return "<DocumentFragment>" # ===== NodeList class NodeList: def __init__(self, impl): self._impl = impl self.__len__ = self._impl.getLength self.get_length = self._impl.getLength self.item = self._impl.item # Python list methods def __getitem__(self, ix): node = self._impl.item(ix) if node is None: raise IndexError else: return _wrap_node(node) def __setitem__(self, ix, item): raise TypeError, "NodeList instances don't support item assignment" def __delitem__(self, ix, item): raise TypeError, "NodeList instances don't support item deletion" def __setslice__(self, i, j, list): raise TypeError, "NodeList instances don't support slice assignment" def __delslice__(self, i, j): raise TypeError, "NodeList instances don't support slice deletion" def append(self, item): raise TypeError, "NodeList instances don't support .append()" def insert(self, i, item): raise TypeError, "NodeList instances don't support .insert()" def pop(self, i=-1): raise TypeError, "NodeList instances don't support .pop()" def remove(self, item): raise TypeError, "NodeList instances don't support .remove()" def reverse(self): raise TypeError, "NodeList instances don't support .reverse()" def sort(self, *args): raise TypeError, "NodeList instances don't support .sort()" def __repr__(self): return "<NodeList [ %s ]>" % string.join(map(repr, self), ", ") # FIXME: getslice, add, radd, mul, rmul, count, index # ===== NamedNodeMap class NamedNodeMap: def __init__(self, impl): self._impl = impl self.get_length = self._impl.getLength self.__len__ = self._impl.getLength def getNamedItem(self, name): return _wrap_node(self._impl.getNamedItem(name)) def setNamedItem(self, node): return _wrap_node(self._impl.setNamedItem(node._impl)) def removedNamedItem(self, name): return _wrap_node(self._impl.removedNamedItem(name)) def item(self, index): return _wrap_node(self._impl.item(index)) # Python dictionary methods def __getitem__(self, key): node = self._impl.getNamedItem(name) if node is None: raise KeyError, key else: return _wrap_node(node) def get(self, key, alternative = None): node = self._impl.getNamedItem(name) if node is None: return alternative else: return _wrap_node(node) def has_key(self, key): return self._impl.getNamedItem(name) != None def items(self): list = [] for ix in range(self._impl.getLength()): node = self._impl.item(ix) list.append((node.getNodeName(), _wrap_node(node))) return list def keys(self): list = [] for ix in range(self._impl.getLength()): list.append(self._impl.item(ix).getNodeName()) return list def values(self): list = [] for ix in range(self._impl.getLength()): list.append(_wrap_node(self._impl.item(ix))) return list def __repr__(self): pairs = [] for pair in self.items(): pairs.append("'%s' : %s" % pair) return "<NamedNodeMap { %s }>" % string.join(pairs, ", ") # FIXME! setitem, update # ===== Various stuff NODE_CLASS_MAP = { ELEMENT_NODE : Element, ATTRIBUTE_NODE : Attr, TEXT_NODE : Text, CDATA_SECTION_NODE : CDATASection, ENTITY_REFERENCE_NODE : EntityReference, ENTITY_NODE : Entity, PROCESSING_INSTRUCTION_NODE : ProcessingInstruction, COMMENT_NODE : Comment, DOCUMENT_NODE : Document, DOCUMENT_TYPE_NODE : DocumentType, DOCUMENT_FRAGMENT_NODE : DocumentFragment, NOTATION_NODE : Notation } # ===== Self-test if __name__ == "__main__": doc2 = createDocument() print doc2 print doc2.get_implementation() root = doc2.createElement("doc") print root doc2.appendChild(root) txt = doc2.createTextNode("This is a simple sample \n") print txt root.appendChild(txt) print root.get_childNodes()[0] print root.get_childNodes() root.setAttribute("huba", "haba") print root print root.get_attributes() --Lars M. From cloder@acm.org Thu Mar 23 18:15:02 2000 From: cloder@acm.org (Chad Loder) Date: Thu, 23 Mar 2000 13:15:02 -0500 (EST) Subject: [XML-SIG] XBEL metadata question In-Reply-To: <200003230937.KAA14058@statistik.cinetic.de> Message-ID: <Pine.GSO.4.21.0003231302380.24198-100000@denali.ccs.neu.edu> On Thu, 23 Mar 2000, Juergen Hermann wrote: > On Thu, 23 Mar 2000 03:13:11 -0500 (EST), Chad Loder wrote: >=20 > >Hi. I wrote a tool to annotate XBEL files with metadata from the > >referenced page. >=20 > When you already do that, could you extend it to grab the <TITLE> from th= e > page and insert it into the <bookmark> if that bookmark has no or an empt= y > title element? Yes, it already does that. It basically works like this: For each bookmark =09If title or desc is empty/missing, visit the page =09If 404 not found, set bookmark folded=3D"yes", add note about 404 =09If 301 moved, add note about old URL and change href (and check =09new href) =09Else if succesful, get title and description from page. If =09bookmark title was missing, set title. If bookmark description =09was missing, set description. Also set lastVisited date. I could also use the HTTP header Last-Modified to set the lastModified date. It's just a matter of writing some code to convert HTTP (GMT) style datetimes into ISO8601 datetimes. I also wrote a tool which publishes an XBEL file into a web site looking much like Yahoo or Open Directory. You can see a sample at: =09http://www.ccs.neu.edu/home/cloder/ie_favorites What would be nice is a folder metadata called dmozCategory which maps each folder onto its closest Open Directory category (www.dmoz.org). This would allow separate collections to be merged together automatically. =09c >=20 > >What should the owner be of the metadata tags I create? Should it > >be my program? > > > >For example, an HTML page may have: > > > ><META NAME=3D"description" CONTENT=3D"This is the description"> >=20 > I'd do it this way: >=20 > <!DOCTYPE .... [ > <!ATTLIST metadata > http-name =09CDATA #IMPLIED > http-content=09CDATA #IMPLIED > > > ]> >=20 > ... > <meta owner=3D"http" http-name=3D"description" ...> >=20 >=20 >=20 > Ciao, J=FCrgen >=20 > -- > J=FCrgen Hermann (jhe@webde-ag.de) > WEB.DE AG, Amalienbadstr.41, D-76227 Karlsruhe > Tel.: 0721/94329-0, Fax: 0721/94329-22 >=20 >=20 >=20 > _______________________________________________ > XML-SIG maillist - XML-SIG@python.org > http://www.python.org/mailman/listinfo/xml-sig >=20 ---------------------------------------------------- | Chad Loder - Somerville, MA, USA | | EMail: cloder@acm.org | | Home Page: http://www.ccs.neu.edu/home/cloder | ---------------------------------------------------- From fdrake@acm.org Thu Mar 23 18:32:14 2000 From: fdrake@acm.org (Fred L. Drake, Jr.) Date: Thu, 23 Mar 2000 13:32:14 -0500 (EST) Subject: [XML-SIG] XBEL metadata question In-Reply-To: <Pine.GSO.4.21.0003231302380.24198-100000@denali.ccs.neu.edu> References: <200003230937.KAA14058@statistik.cinetic.de> <Pine.GSO.4.21.0003231302380.24198-100000@denali.ccs.neu.edu> Message-ID: <14554.25390.694138.816603@weyr.cnri.reston.va.us> Regarding the question about where to put page-embedded metadata, I think a recommendation for a specific application name can be made in the XBEL documentation. The recommendation should probably include a way to state the last date the data was modified and that, if modified, all old data should be removed (even if an updated value isn't available; say a metadata field is removed from the document). Another possibility is a DTD change that gives specific structure: <docmeta> (or whatever) could allow (meta | link)+, where <meta> and <link> are defined as for HTML 4.0/XHTML ?.?. The biggest problem I'd have with this is that software would have to be updated to deal with it, and I don't currently have time to update & re-release Grail (which I'd consider a requirement, at for myself). Is anyone actually using Grail with XBEL, or is everyone doing things independently of the browser? Chad Loder writes: > If 301 moved, add note about old URL and change href (and check > new href) I thought about adding this kind of update into Grail when encountering a permanent move of a page in Grail, if the original was bookmarked, but never got around to it. > Else if succesful, get title and description from page. If > bookmark title was missing, set title. If bookmark description > was missing, set description. Also set lastVisited date. Do you really want to set lastVisited? Setting lastModified is useful since it tells the user it changed since the last time they visited it, but if lastVisited gets modified as well, they can't tell. I see lastVisited as a user-centered bit of data. See the XBEL documentation: http://www.python.org/topics/xml/xbel/docs/html/top-level.html#SECTION000451000000000000000 > I could also use the HTTP header Last-Modified to set the lastModified > date. It's just a matter of writing some code to convert HTTP (GMT) > style datetimes into ISO8601 datetimes. There's code to parse the HTTP Last-Modified the Grail source: http://grail.python.org/ > I also wrote a tool which publishes an XBEL file into a web site looking > much like Yahoo or Open Directory. You can see a sample at: > > http://www.ccs.neu.edu/home/cloder/ie_favorites > > What would be nice is a folder metadata called dmozCategory which maps > each folder onto its closest Open Directory category (www.dmoz.org). This > would allow separate collections to be merged together automatically. This would be cool! -Fred -- Fred L. Drake, Jr. <fdrake at acm.org> Corporation for National Research Initiatives From fdrake@acm.org Thu Mar 23 18:36:59 2000 From: fdrake@acm.org (Fred L. Drake, Jr.) Date: Thu, 23 Mar 2000 13:36:59 -0500 (EST) Subject: [XML-SIG] XBEL metadata question In-Reply-To: <Pine.GSO.4.21.0003230311030.12455-100000@denali.ccs.neu.edu> References: <Pine.GSO.4.21.0003230311030.12455-100000@denali.ccs.neu.edu> Message-ID: <14554.25675.862036.530868@weyr.cnri.reston.va.us> Chad Loder writes: > What should the owner be of the metadata tags I create? Should it > be my program? I should clarify a little more; I don't think of "application" in the "name of program" sense, but it can be either a single program or a larger suite of tools that may be extended in some way. It is intended to fairly well identify what the stuff is for, not the specific program(s). There should be a *single* "application" that represents page-embedded metadata instead of everyone keeping their own copy in separate <metadata> elements. An (informal) registry of application names under http://www.python.org/topics/xml/xbel/ would be appropriate if we were actually concerned about name clashes. ;) -Fred -- Fred L. Drake, Jr. <fdrake at acm.org> Corporation for National Research Initiatives From cloder@acm.org Thu Mar 23 19:06:32 2000 From: cloder@acm.org (Chad Loder) Date: Thu, 23 Mar 2000 14:06:32 -0500 (EST) Subject: [XML-SIG] XBEL metadata question Message-ID: <Pine.GSO.4.21.0003231406150.24926-100000@denali.ccs.neu.edu> Fred, Yeah, I'm not advocating a DTD change. I should be able to get by with the existing metadata structure. What do you think about setting the owner URI to the href of the page itself? Wouldn't that kinda make sense? On Thu, 23 Mar 2000, Fred L. Drake, Jr. wrote: > Regarding the question about where to put page-embedded metadata, I > think a recommendation for a specific application name can be made in > the XBEL documentation. The recommendation should probably include a > way to state the last date the data was modified and that, if > modified, all old data should be removed (even if an updated value > isn't available; say a metadata field is removed from the document). > Another possibility is a DTD change that gives specific structure: > <docmeta> (or whatever) could allow (meta | link)+, where <meta> and > <link> are defined as for HTML 4.0/XHTML ?.?. The biggest problem I'd > have with this is that software would have to be updated to deal with > it, and I don't currently have time to update & re-release Grail > (which I'd consider a requirement, at for myself). > Is anyone actually using Grail with XBEL, or is everyone doing > things independently of the browser? I am not using Grail or even Python for that matter. I wrote all this stuff in Java. I feel like a heretic, but I don't have the energy to learn another language just now. :) > > If 301 moved, add note about old URL and change href (and check > > new href) > > I thought about adding this kind of update into Grail when > encountering a permanent move of a page in Grail, if the original was > bookmarked, but never got around to it. Yeah, it's not so hard. Just gotta look at the Location header. I suppose the difficulty is at a higher level, keeping track of when the user clicks on a bookmark and feeding the HTTP information back up the call stack so that the bookmark can be updated. :) > > Else if succesful, get title and description from page. If > > bookmark title was missing, set title. If bookmark description > > was missing, set description. Also set lastVisited date. > > Do you really want to set lastVisited? Setting lastModified is > useful since it tells the user it changed since the last time they > visited it, but if lastVisited gets modified as well, they can't > tell. I see lastVisited as a user-centered bit of data. See the XBEL > documentation: Ah, good point. I will do it that way. > > I could also use the HTTP header Last-Modified to set the lastModified > > date. It's just a matter of writing some code to convert HTTP (GMT) > > style datetimes into ISO8601 datetimes. > > There's code to parse the HTTP Last-Modified the Grail source: > > http://grail.python.org/ I will take a look, but I don't want to use any of your code until I am sure I can open source my stuff. > > What would be nice is a folder metadata called dmozCategory which maps > > each folder onto its closest Open Directory category (www.dmoz.org). This > > would allow separate collections to be merged together automatically. > > This would be cool! I can release all this stuff, but I don't know if I'll be able to release all the source code because I'm using some Java HTTP classes I developed for a product at my real job. :) But it's a small amount of stuff I would need to rewrite, and then I could GPL the source. An example of the DMOZ categories is listed (in RDF format) at http://dmoz.org/rdf/structure.example.txt. How about something like this: <folder id="1234"> <title>Artificial Intelligence It should be easy to create a dmoz.org URL out of the metadata, so that automatic conversion tools can create a "See Also" link directly to the category on the dmoz website. What do you think? c ---------------------------------------------------- | Chad Loder - Somerville, MA, USA | | EMail: cloder@acm.org | | Home Page: http://www.ccs.neu.edu/home/cloder | ---------------------------------------------------- From cloder@acm.org Thu Mar 23 19:12:54 2000 From: cloder@acm.org (Chad Loder) Date: Thu, 23 Mar 2000 14:12:54 -0500 (EST) Subject: [XML-SIG] XBEL metadata question In-Reply-To: <14554.25675.862036.530868@weyr.cnri.reston.va.us> Message-ID: In that case, we could just do what Juergen Hermann suggested, making the owner be "http-meta" or some such thing. I have been thinking of other page metadata we could use: Probably the charset and language are important, and maybe even the PICS content rating. Also, in my estimation, only 1 out of 10 pages has decent metadata in it, so maybe some search-engine style heuristics to take an abstract of the page (the first paragraph maybe) and store it in an "abstract" metadata or somesuch. c On Thu, 23 Mar 2000, Fred L. Drake, Jr. wrote: > > Chad Loder writes: > > What should the owner be of the metadata tags I create? Should it > > be my program? > > I should clarify a little more; I don't think of "application" in > the "name of program" sense, but it can be either a single program or > a larger suite of tools that may be extended in some way. It is > intended to fairly well identify what the stuff is for, not the > specific program(s). > There should be a *single* "application" that represents > page-embedded metadata instead of everyone keeping their own copy in > separate elements. An (informal) registry of application > names under http://www.python.org/topics/xml/xbel/ would be > appropriate if we were actually concerned about name clashes. ;) > > > -Fred > > -- > Fred L. Drake, Jr. > Corporation for National Research Initiatives > ---------------------------------------------------- | Chad Loder - Somerville, MA, USA | | EMail: cloder@acm.org | | Home Page: http://www.ccs.neu.edu/home/cloder | ---------------------------------------------------- From akuchlin@mems-exchange.org Fri Mar 24 02:15:31 2000 From: akuchlin@mems-exchange.org (A.M. Kuchling) Date: Thu, 23 Mar 2000 21:15:31 -0500 Subject: [XML-SIG] Noisier PyExpat error handling? Message-ID: <200003240215.VAA05537@mira.erols.com> I'm going over the PyExpat module to be sure it's ready for inclusion in the Python CVS tree. One point about its error handling is disquieting; it hews very closely to the C Expat interface, so that a parser error returns a 0, while success returns a 1. You then need to call pyexpat.ErrorString( p.ErrorCode ) to find out what went wrong. Pythonic principle #10 is "Errors should never pass silently"; should the module be changed to raise an exception on a parse error? (Best to break compatibility now, while we still can...) -- A.M. Kuchling http://starship.python.net/crew/amk/ "That's kind of my uh sort of a joke." "That's right, George. It differs from the usual kind of joke only in the vast gulf between it and any kind of a sense of humor." -- George's face and Wanda, in SANDMAN #36: "Over the Sea to Sky" From akuchlin@mems-exchange.org Fri Mar 24 02:11:18 2000 From: akuchlin@mems-exchange.org (A.M. Kuchling) Date: Thu, 23 Mar 2000 21:11:18 -0500 Subject: [XML-SIG] Expat Unicode parsing mystery Message-ID: <200003240211.VAA05530@mira.erols.com> I wanted to check that the PyExpat module works with the Unicode support that's currently in the Python CVS tree, and found something that I don't understand. Consider the test program appended below. It creates a little ASCII XML file that claims to use a specified encoding. The ASCII string is then converted to a Unicode object, and then into the specified encoding. All 3 strings are then parsed, and the results printed. With the encoding set to utf-16, this is the output: [amk@mira extensions]$ ./python t.py Parsing ASCII data encoding specified in XML declaration is incorrect # OK; Expat notices this is ASCII, and that the encoding is lying Parsing Unicode string ('root', {}) # Huh? Why does this work? Python doesn't use UTF-16 internally! Parsing UTF-16 encoded string ('root', {}) # OK; this should obviously work. I have a feeling I'm missing something here. Can anyone explain why the second case doesn't fail? -- A.M. Kuchling http://starship.python.net/crew/amk/ And Herakles was full of it. He just got dead drunk for a couple of weeks in Phrygia and told everyone he'd been to the land of the dead. -- Death, in SANDMAN: "The Song of Orpheus" from xml.parsers import pyexpat encoding = 'utf-16' asc_str = '' % encoding u_str = unicode( asc_str ) encoded = u_str.encode(encoding) def f(*args): print args print 'Parsing ASCII data' p = pyexpat.ParserCreate() ; p.StartElementHandler = f res=p.Parse(asc_str, 1) if not res: print pyexpat.ErrorString( p.ErrorCode ) print 'Parsing Unicode string' p = pyexpat.ParserCreate() ; p.StartElementHandler = f res=p.Parse(u_str, 1) if not res: print pyexpat.ErrorString( p.ErrorCode ) print 'Parsing UTF-16 encoded string' p = pyexpat.ParserCreate() ; p.StartElementHandler = f res=p.Parse(encoded, 1) if not res: print pyexpat.ErrorString( p.ErrorCode ) From gstein@lyra.org Fri Mar 24 02:33:23 2000 From: gstein@lyra.org (Greg Stein) Date: Thu, 23 Mar 2000 18:33:23 -0800 (PST) Subject: [XML-SIG] Noisier PyExpat error handling? In-Reply-To: <200003240215.VAA05537@mira.erols.com> Message-ID: On Thu, 23 Mar 2000, A.M. Kuchling wrote: > I'm going over the PyExpat module to be sure it's ready for inclusion > in the Python CVS tree. One point about its error handling is > disquieting; it hews very closely to the C Expat interface, so that a > parser error returns a 0, while success returns a 1. You then need to > call pyexpat.ErrorString( p.ErrorCode ) to find out what went wrong. > > Pythonic principle #10 is "Errors should never pass silently"; should > the module be changed to raise an exception on a parse error? (Best > to break compatibility now, while we still can...) +1 Raise the exception, I say! :-) Cheers, -g -- Greg Stein, http://www.lyra.org/ From tpassin@idsonline.com Fri Mar 24 02:53:29 2000 From: tpassin@idsonline.com (THOMAS PASSIN) Date: Thu, 23 Mar 2000 21:53:29 -0500 Subject: [XML-SIG] Noisier PyExpat error handling? References: Message-ID: <002101bf953c$25357520$672a08d1@idsonline.com> Greg Stein wrote- > > Pythonic principle #10 is "Errors should never pass silently"; should > > the module be changed to raise an exception on a parse error? (Best > > to break compatibility now, while we still can...) > > +1 > > Raise the exception, I say! :-) > +1 I second that. Tom Passin From paul@prescod.net Fri Mar 24 04:06:37 2000 From: paul@prescod.net (Paul Prescod) Date: Thu, 23 Mar 2000 20:06:37 -0800 Subject: [XML-SIG] Noisier error handling all 'round? References: <200003240215.VAA05537@mira.erols.com> Message-ID: <38DAE9CD.159CFAA5@prescod.net> It doesn't matter much one way or the other because the SAX interface should be more often used. The speed freaks who code directly to Expat (it may not buy much at all, actually...) can read the documentation or sample code or whatever. But that begs the question of what saxlib does and it does NOT, by default raise an exception. It should. For all parsers the driver should set it up so that the "default error handler" raises an exception. Paul Prescod "A.M. Kuchling" wrote: > > I'm going over the PyExpat module to be sure it's ready for inclusion > in the Python CVS tree. One point about its error handling is > disquieting; it hews very closely to the C Expat interface, so that a > parser error returns a 0, while success returns a 1. You then need to > call pyexpat.ErrorString( p.ErrorCode ) to find out what went wrong. > > Pythonic principle #10 is "Errors should never pass silently"; should > the module be changed to raise an exception on a parse error? (Best > to break compatibility now, while we still can...) > > -- > A.M. Kuchling http://starship.python.net/crew/amk/ > "That's kind of my uh sort of a joke." > "That's right, George. It differs from the usual kind of joke only in the > vast gulf between it and any kind of a sense of humor." > -- George's face and Wanda, in SANDMAN #36: "Over the Sea to Sky" > > _______________________________________________ > XML-SIG maillist - XML-SIG@python.org > http://www.python.org/mailman/listinfo/xml-sig -- Paul Prescod - ISOGEN Consulting Engineer speaking for himself "I and my companions suffer from a disease of the heart that can only be cured with gold", Hernan Cortes From kens@sightreader.com Fri Mar 24 05:52:13 2000 From: kens@sightreader.com (Ken Seehof) Date: Thu, 23 Mar 2000 21:52:13 -0800 Subject: [XML-SIG] xml parsers Message-ID: <38DB028D.30788C20@sightreader.com> I want to use XML as an application data format, not for printable/displayable documents. I don't want DOM (way overkill; I just want to go directly to my data structures). I don't plan to have a !DOCTYPE section. Reading the whole file at once is okay. Basically I wan't to use XML as a simple tagged file format, nothing else. What is the easiest, most convenient parser solution for me? - Ken Seehof From gstein@lyra.org Fri Mar 24 07:16:31 2000 From: gstein@lyra.org (Greg Stein) Date: Thu, 23 Mar 2000 23:16:31 -0800 (PST) Subject: [XML-SIG] xml parsers In-Reply-To: <38DB028D.30788C20@sightreader.com> Message-ID: Check out qp_xml in the CVS repository (in the utils directory). If you don't want to grab it from there, you can also pick it up from my web pages at: http://www.lyra.org/greg/python/ It uses PyExpat (and Expat) to quickly parse XML into some *very* lightweight data structures that your application can use. Quick, easy, and simple. qp_xml works very well for data management. Document handling, translation, and processing is also fine, but the DOM may be more appropriate in those situations. I use qp_xml for the XML parsing in my WebDAV client library. Cheers, -g On Thu, 23 Mar 2000, Ken Seehof wrote: > I want to use XML as an application data format, not for > printable/displayable documents. > I don't want DOM (way overkill; I just want to go directly to my data > structures). > I don't plan to have a !DOCTYPE section. > Reading the whole file at once is okay. > Basically I wan't to use XML as a simple tagged file format, nothing > else. > > What is the easiest, most convenient parser solution for me? > > - Ken Seehof -- Greg Stein, http://www.lyra.org/ From larsga@garshol.priv.no Fri Mar 24 08:00:15 2000 From: larsga@garshol.priv.no (Lars Marius Garshol) Date: 24 Mar 2000 09:00:15 +0100 Subject: [XML-SIG] xml parsers In-Reply-To: <38DB028D.30788C20@sightreader.com> References: <38DB028D.30788C20@sightreader.com> Message-ID: * Ken Seehof | | I don't plan to have a !DOCTYPE section. | Reading the whole file at once is okay. | Basically I wan't to use XML as a simple tagged file format, nothing | else. | | What is the easiest, most convenient parser solution for me? Probably the xmllib module that comes with the interpreter. Just look in the module index in the library reference documentation. --Lars M. From larsga@garshol.priv.no Fri Mar 24 08:03:37 2000 From: larsga@garshol.priv.no (Lars Marius Garshol) Date: 24 Mar 2000 09:03:37 +0100 Subject: [XML-SIG] Noisier error handling all 'round? In-Reply-To: <38DAE9CD.159CFAA5@prescod.net> References: <200003240215.VAA05537@mira.erols.com> <38DAE9CD.159CFAA5@prescod.net> Message-ID: * Paul Prescod | | But that begs the question of what saxlib does and it does NOT, by | default raise an exception. It should. For all parsers the driver | should set it up so that the "default error handler" raises an | exception. I agree and will fix this in SAX 2.0. --Lars M. From fdrake@acm.org Fri Mar 24 15:02:45 2000 From: fdrake@acm.org (Fred L. Drake, Jr.) Date: Fri, 24 Mar 2000 10:02:45 -0500 (EST) Subject: [XML-SIG] Noisier PyExpat error handling? In-Reply-To: <002101bf953c$25357520$672a08d1@idsonline.com> References: <002101bf953c$25357520$672a08d1@idsonline.com> Message-ID: <14555.33685.332234.850251@weyr.cnri.reston.va.us> THOMAS PASSIN writes: > Greg Stein wrote- > > +1 > > > > Raise the exception, I say! :-) > > > > +1 > > I second that. +1 here as well. -Fred -- Fred L. Drake, Jr. Corporation for National Research Initiatives From fdrake@acm.org Fri Mar 24 15:07:06 2000 From: fdrake@acm.org (Fred L. Drake, Jr.) Date: Fri, 24 Mar 2000 10:07:06 -0500 (EST) Subject: [XML-SIG] Noisier error handling all 'round? In-Reply-To: <38DAE9CD.159CFAA5@prescod.net> References: <200003240215.VAA05537@mira.erols.com> <38DAE9CD.159CFAA5@prescod.net> Message-ID: <14555.33946.423697.614856@weyr.cnri.reston.va.us> Paul Prescod writes: > But that begs the question of what saxlib does and it does NOT, by > default raise an exception. It should. For all parsers the driver should > set it up so that the "default error handler" raises an exception. I agree. I seem to recall the rationalization of the time was that traditional SGML parsers (sgmls, nsgmls, ...) reported the error on stderr and kept going as long as they could recover. (I don't recall just who made that argument, though; I don't *think* it was me!) If someone wants an nsgmls clone in Python they can write the appropriate error handler and install it, since error handling policies really are part of the application's domain. -Fred -- Fred L. Drake, Jr. Corporation for National Research Initiatives From ken@bitsko.slc.ut.us Fri Mar 24 18:47:44 2000 From: ken@bitsko.slc.ut.us (Ken MacLeod) Date: 24 Mar 2000 12:47:44 -0600 Subject: [XML-SIG] xml parsers In-Reply-To: Ken Seehof's message of "Thu, 23 Mar 2000 21:52:13 -0800" References: <38DB028D.30788C20@sightreader.com> Message-ID: Ken Seehof writes: > I want to use XML as an application data format, not for > printable/displayable documents. I don't want DOM (way overkill; I > just want to go directly to my data structures). I don't plan to > have a !DOCTYPE section. Reading the whole file at once is okay. > Basically I wan't to use XML as a simple tagged file format, nothing > else. > > What is the easiest, most convenient parser solution for me? If you are working with your own data structures, you are probably looking for a module that can de/serialize your data structures as XML. I don't recall any modules available in standard distributions, but there are several available in various stages of development or support. In the Python XML CVS archive are a generic, XML-RPC, and WDDX serializers. In the Scarab CVS archive are an LDO and SOAP serializer. The XML-RPC implementation at PythonWare is the most mature implementation of XML-RPC. -- in the xml/xml/marshal directory -- in the Scarab/python directory -- in the xmlrpc ZIP download I would keep an eye on upcoming SOAP implementations, they will be the most likely ones to provide broad support for application data structures. I'm not sure I can give a specific recommendation. The PythonWare XML-RPC implementation is very mature, but XML-RPC is not the best format for serializing typical Python structures. SOAP should do better eventually, but the SOAP implementation in Scarab is not mature. I've heard rumor of other SOAP implementations being worked on, but none have been announced. -- Ken P.S. to SOAP implementors: I'm not tied to the Scarab implementation and would be happy to use someone else's implementation. My two requests: 1) support Pickle's dump/load interface, 2) also support some type of encode_call(), encode_response(), encode_fault(), and decode() interface (depending on how those get revised in upcoming versions of the SOAP spec). From joe45@asiansonly.net Fri Mar 24 22:23:13 2000 From: joe45@asiansonly.net (joe45@asiansonly.net) Date: Fri, 24 Mar 2000 22:23:13 Subject: [XML-SIG] Expose your business to the Internet Message-ID: PUT EMAIL MARKETING TO WORK FOR YOU... Call NOW and receive 50,000 FREE emails with your order! WE HAVE OPT-IN LISTS!!!! see below for removal. Special Ends Friday March 31, 2000 MLM'ers, We can build your downline. Imagine having a product or idea and selling it for only $10. Now imagine sending an ad for your product or idea to 25 million people! If you only get a 1/10 of 1% response you have just made $250,000!! You hear about people getting rich off the Internet everyday on TV, now is the perfect time for you to jump in on all the action. FACT. With the introduction of the Internet, one primary KEY to conducting your business successfully is creating massive exposure in a cost effective manner. FACT. The experts agree that email marketing is one of the most cost effective forms of promotion in existence today. Electronic mail has overtaken the telephone as the primary means of business communication.(American Management Association) Of online users 41 percent check their email daily. "A gold mine for those who can take advantage of bulk email programs"- The New York Times "Email is an incredible lead generation tool" -Crains Magazine "Blows away traditional Mailing"-Advertising Age "It's truly arrived. Email is the killer app so far in the online world"-Kate Delhagen, Forrester Research Analyst Why not let a professional company handle your direct email marketing efforts for you? *We will assist you in developing your entire campaign! *We can even create your ad or annoucement for you! *No responses? We resend at no cost! For More Information CALL NOW-702-248-1043 For removal see below. SPECIAL RATES SPECIAL ENDS Friday March 31, 2000 Targeted Rates Upon Request. BONUS!!! Call In and receive 50,000 Extra Emails at No Cost! Call NOW - 702-248-1043 ++++++++++++++++++++++++++++++++++++++++++++++++++ We are terribly sorry if you received this message in error. If you wish to be removed. Please, type "REMOVE" in the subject line: outnow@fiberia.com ++++++++++++++++++++++++++++++++++++++++++++++++++ From prcom@fiz-chemie.de Mon Mar 27 11:49:27 2000 From: prcom@fiz-chemie.de (prcom@fiz-chemie.de) Date: Mon, 27 Mar 2000 13:49:27 +0200 Subject: [XML-SIG] New Internet Search Engines Message-ID: <200003271150.NAA00770@oops.fiz-chemie.de> Hi: We have found your address in one of our ChemGuide Systems! What are "ChemGuides"? These are a specific type of Internet database/information system which is specialised in locating chemistry-relevant Web sites. Try our ChemGuides and their extremely powerful search options. Why don't you just check to see where we have found you and at the same time test the systems' performance? The ChemGuides are accessible via our Web Site: http://www.chemistry.de/ or directly at http://www.chemistry.de/en/datenbanken/chemguide/ And when you are already logged on, perhaps you might also like to try our free "PublishersGuide - Science and Technology", which covers the Internet pages of scientific publishers and is also available via our Web site. http://www.fiz-chemie.de/en/datenbanken/publishersguide/ ========================================================================= We would like to inform you about further developments in our ChemGuides and in other products available from FIZ CHEMIE BERLIN at irregular intervals by email. If you do not want to receive any messages, please follow the link below and we will remove you from our mailing list. http://www.chemistry.de/en/sqlgate/mailer.perl?id=2a40d2c9a8766595f104006ca31a8409&action=remove From carrie.neptune@eudoramail.com Mon Mar 27 18:40:29 2000 From: carrie.neptune@eudoramail.com (carrie.neptune@eudoramail.com) Date: Mon, 27 Mar 2000 18:40:29 Subject: [XML-SIG] Expose your business to the Internet References: 0CB205086 Message-ID: PUT EMAIL MARKETING TO WORK FOR YOU... Call NOW and receive 50,000 additional emails with your order for only $100. Thats 40,000 FREE emails!!! WE HAVE OPT-IN LISTS!!!! see below for removal. Special Ends Friday March 31, 2000 MLM'ers, We can build your downline. Imagine having a product or idea and selling it for only $10. Now imagine sending an ad for your product or idea to 25 million people! If you only get a 1/10 of 1% response you have just made $250,000!! You hear about people getting rich off the Internet everyday on TV, now is the perfect time for you to jump in on all the action. FACT. With the introduction of the Internet, one primary KEY to conducting your business successfully is creating massive exposure in a cost effective manner. FACT. The experts agree that email marketing is one of the most cost effective forms of promotion in existence today. Electronic mail has overtaken the telephone as the primary means of business communication.(American Management Association) Of online users 41 percent check their email daily. "A gold mine for those who can take advantage of bulk email programs"- The New York Times "Email is an incredible lead generation tool" -Crains Magazine "Blows away traditional Mailing"-Advertising Age "It's truly arrived. Email is the killer app so far in the online world"-Kate Delhagen, Forrester Research Analyst Why not let a professional company handle your direct email marketing efforts for you? *We will assist you in developing your entire campaign! *We can even create your ad or annoucement for you! *No responses? We resend at no cost! For More Information CALL NOW-702-248-1043 For removal see below. SPECIAL RATES SPECIAL ENDS Friday March 31, 2000 Targeted Rates Upon Request. BONUS!!! Call In and receive 50,000 Extra Emails at No Cost! Call NOW - 702-248-1043 ++++++++++++++++++++++++++++++++++++++++++++++++++ We are terribly sorry if you received this message in error. If you wish to be removed. Please, type "REMOVE" in the subject line: outnow@fiberia.com ++++++++++++++++++++++++++++++++++++++++++++++++++ From gary@egenetics.com Tue Mar 28 07:54:20 2000 From: gary@egenetics.com (Gary Greyling) Date: Tue, 28 Mar 2000 09:54:20 +0200 Subject: [XML-SIG] Is this a discussion group In-Reply-To: References: <38AD6B1B.C57AD16B@prescod.net> <38ADAD92.BE9948FB@prescod.net> Message-ID: <0003280955400A.28634@morphius.sanbi.ac.za> or an Advertising list ? -- Gary Greyling Electric Genetics From tony.mcdonald@ncl.ac.uk Tue Mar 28 07:57:42 2000 From: tony.mcdonald@ncl.ac.uk (Tony McDonald) Date: Tue, 28 Mar 2000 08:57:42 +0100 Subject: [XML-SIG] Is this a discussion group In-Reply-To: <0003280955400A.28634@morphius.sanbi.ac.za> References: <38AD6B1B.C57AD16B@prescod.net> <38ADAD92.BE9948FB@prescod.net> <0003280955400A.28634@morphius.sanbi.ac.za> Message-ID: At 9:54 am +0200 28/3/00, Gary Greyling wrote: >or an Advertising list ? >-- >Gary Greyling I think we've just been unfortunate enough to get a spammer hit us. I just delete the messages. tone ------ Dr Tony McDonald, FMCC, Networked Learning Environments Project http://nle.ncl.ac.uk/ The Medical School, Newcastle University Tel: +44 191 222 5888 Fingerprint: 3450 876D FA41 B926 D3DD F8C3 F2D0 C3B9 8B38 18A2 From tony.mcdonald@ncl.ac.uk Tue Mar 28 08:00:27 2000 From: tony.mcdonald@ncl.ac.uk (Tony McDonald) Date: Tue, 28 Mar 2000 09:00:27 +0100 Subject: [XML-SIG] Working with RTF Message-ID: Hi all, Can I use the SGML parsers to manipulate RTF? I've looked at sgmllib and it says; The parser is hardcoded to recognize the following constructs: Opening and closing tags of the form "" and "", respectively. anyone have any ideas? tia tone. ------ Dr Tony McDonald, FMCC, Networked Learning Environments Project http://nle.ncl.ac.uk/ The Medical School, Newcastle University Tel: +44 191 222 5888 Fingerprint: 3450 876D FA41 B926 D3DD F8C3 F2D0 C3B9 8B38 18A2 From larsga@garshol.priv.no Tue Mar 28 11:24:50 2000 From: larsga@garshol.priv.no (Lars Marius Garshol) Date: 28 Mar 2000 13:24:50 +0200 Subject: [XML-SIG] Working with RTF In-Reply-To: References: Message-ID: * Tony McDonald | | Can I use the SGML parsers to manipulate RTF? Why would you expect to be able to? Microsoft Rich Text Format is not an SGML application, so no SGML parser can read it. Some SGML scripting environments like OmniMark and Balise have additional features that allow this (effectively separate parsers), but this isn't part of their SGML parsers. --Lars M. From tony.mcdonald@ncl.ac.uk Tue Mar 28 12:40:35 2000 From: tony.mcdonald@ncl.ac.uk (Tony McDonald) Date: Tue, 28 Mar 2000 13:40:35 +0100 Subject: [XML-SIG] Working with RTF In-Reply-To: References: Message-ID: At 1:24 pm +0200 28/3/00, Lars Marius Garshol wrote: >* Tony McDonald >| >| Can I use the SGML parsers to manipulate RTF? > >Why would you expect to be able to? Microsoft Rich Text Format is not >an SGML application, so no SGML parser can read it. Some SGML >scripting environments like OmniMark and Balise have additional >features that allow this (effectively separate parsers), but this >isn't part of their SGML parsers. Ah, good point. I've used the Omnimark system and the rtf2xml Omnimark program a lot, and I suppose my mind put 2 and 2 together and got something at right angles to reality. I'm using Omnimark to do the initial rtf2xml and from there to another XML form, where Python takes over to put the data in an SQL database. Thing is, at a later stage, I want to *go back* to the original RTF and insert some Python generated content into certain places in the RTF itself. I thought I'd be able to use sgmlop or its cousins to locate those places easily and do the replacement (I could use Omnimark again, but my scripts are all Python after the initial Omnimark parses). cheers tone. ------ Dr Tony McDonald, FMCC, Networked Learning Environments Project http://nle.ncl.ac.uk/ The Medical School, Newcastle University Tel: +44 191 222 5888 Fingerprint: 3450 876D FA41 B926 D3DD F8C3 F2D0 C3B9 8B38 18A2 From uche.ogbuji@fourthought.com Tue Mar 28 16:58:41 2000 From: uche.ogbuji@fourthought.com (uche.ogbuji@fourthought.com) Date: Tue, 28 Mar 2000 09:58:41 -0700 Subject: [XML-SIG] Revised XBEL XSL Stylesheet In-Reply-To: Your message of "Tue, 07 Mar 2000 13:58:54." <200003071259.NAA16151@statistik.cinetic.de> Message-ID: <200003281658.JAA03157@localhost.localdomain> Just noting that this is a pretty nice stylesheet. Also works just fine with 4XSLT 0.9.3. -- Uche Ogbuji Fourthought, Inc., IT Consultants uche.ogbuji@fourthought.com (970)481-0805 Software-engineering, project-management, knowledge-management http://Fourthought.com http://OpenTechnology.org From uche.ogbuji@fourthought.com Tue Mar 28 18:06:50 2000 From: uche.ogbuji@fourthought.com (uche.ogbuji@fourthought.com) Date: Tue, 28 Mar 2000 11:06:50 -0700 Subject: [XML-SIG] 4Suite Docs? In-Reply-To: Your message of "Sat, 11 Mar 2000 19:04:48 PST." <00031119084600.01811@quadra.teleo.net> Message-ID: <200003281806.LAA03326@localhost.localdomain> > I've fooled around a bit with 4DOM, but have felt hampered due to the > lack of any documentation -- at least any that I'm able to discover. > > Am I missing a treasure trove of docs somewhere? > > With something like 140 source files in 4Suite, reading the source > isn't really an option for getting started. I'm sorry for just getting to this. There isn't much particular documentation for 4Suite. Since we try to stay close to the official specs in all cases, this is, unfortunately, for now the documentation we recommend. For 4DOM, see http://www.w3.org/DOM/ and specifically http://www.w3.org/TR/DOM-Level-2/ For 4XPath see http://www.w3.org/TR/xpath For 4XSLT see http://www.w3.org/TR/xslt The good news is that we just added a few people to the team who can help catch us up in all the areas we're lagging: Windows binaries, cleaner build and packaging, better documentation and examples, etc. -- Uche Ogbuji Fourthought, Inc., IT Consultants uche.ogbuji@fourthought.com (970)481-0805 Software-engineering, project-management, knowledge-management http://Fourthought.com http://OpenTechnology.org From uche.ogbuji@fourthought.com Tue Mar 28 18:46:45 2000 From: uche.ogbuji@fourthought.com (uche.ogbuji@fourthought.com) Date: Tue, 28 Mar 2000 11:46:45 -0700 Subject: [XML-SIG] javadom.py In-Reply-To: Your message of "23 Mar 2000 18:14:05 +0100." Message-ID: <200003281846.LAA03525@localhost.localdomain> > Here is my first attempt at javadom.py. If I get permission to do so > I will check it into CVS, but for the moment I'm only posting it here. > Note that it's still pretty rough and hasn't seen all that much testing. > > One unsettled question (for me) is where to put the various DOM > constants and how to name the get/set methods. I've mimicked PyDOM, > but have since seen that 4DOM does it differently. Has it been > decided which interface 4DOM will have when it's integrated into the > XML-SIG package? Hmm. I think you'll find yourself between Scylla and Charybdis on this one. It was decided on this list that the get_parentNode convention as well as straight attribute access would be The Python Way and we changed 4DOM to match this. I think the only reason PyDOM doesn't yet is lack of time. (Comments, Andrew?) But of course the Java binding to the DOM cuts across all but Java convention with the GetParentNode approach. This is how 4DOM used to be, but it was the least favorite approach when we discussed the matter. However if you don't go with the Java convention you might find it confusing. I guess the determinig factor might be a subtle description of the targeted users: Java users trying to hook into Python goodies or Python users trying to hook into Java goodies? -- Uche Ogbuji Fourthought, Inc., IT Consultants uche.ogbuji@fourthought.com (970)481-0805 Software-engineering, project-management, knowledge-management http://Fourthought.com http://OpenTechnology.org From uche.ogbuji@fourthought.com Tue Mar 28 19:21:52 2000 From: uche.ogbuji@fourthought.com (uche.ogbuji@fourthought.com) Date: Tue, 28 Mar 2000 12:21:52 -0700 Subject: [XML-SIG] XBEL Checking In-Reply-To: Your message of "Fri, 17 Mar 2000 15:01:44 +0100." <200003171402.PAA18894@statistik.cinetic.de> Message-ID: <200003281921.MAA03638@localhost.localdomain> Re: http://cscene.org/%7ejh/xml/bookmarks/checkurls.py I noticed you use the TranslateCDATA and TranslateText methods from the 4DOM printer (thanks for respecting our copyright, BTW). The versions you are using are old and we have fixed several bugs WRT UTF-8 and proper escaping in 4DOM 0.9.3. You might want to use these versions instead. Nice program, BTW. I might continue the exchange and steal some juicy bits (with attributions, of course) for our XBEL/Bookmark manager demo in 4ODS. -- Uche Ogbuji Fourthought, Inc., IT Consultants uche.ogbuji@fourthought.com (970)481-0805 Software-engineering, project-management, knowledge-management http://Fourthought.com http://OpenTechnology.org From akuchlin@mems-exchange.org Tue Mar 28 19:30:13 2000 From: akuchlin@mems-exchange.org (Andrew M. Kuchling) Date: Tue, 28 Mar 2000 14:30:13 -0500 (EST) Subject: [XML-SIG] javadom.py In-Reply-To: <200003281846.LAA03525@localhost.localdomain> References: <200003281846.LAA03525@localhost.localdomain> Message-ID: <14561.2117.764976.175099@amarok.cnri.reston.va.us> uche.ogbuji@fourthought.com writes: >Hmm. I think you'll find yourself between Scylla and Charybdis on this one. >It was decided on this list that the get_parentNode convention as well as >straight attribute access would be The Python Way and we changed 4DOM to match >this. I think the only reason PyDOM doesn't yet is lack of time. (Comments, >Andrew?) IIRC, the SIG decided to use the mapping that emerges from the Python CORBA mapping, which would be ._get_parentNode(). Or was this decision changed later? See the SIG's archives for November 1999 for the relevant threads. PyDOM hasn't been updated because it seems pointless, since it'll be dropped in favor of 4DOM. (BTW, send me an e-mail about that; we should resume discussing how to do the switchover.) -- A.M. Kuchling http://starship.python.net/crew/amk/ Look, they're carrying the corpses away, ho hum. -- Opening line of ENIGMA #5: "Lizards and Ghosts" From akuchlin@mems-exchange.org Tue Mar 28 20:50:32 2000 From: akuchlin@mems-exchange.org (Andrew M. Kuchling) Date: Tue, 28 Mar 2000 15:50:32 -0500 (EST) Subject: [XML-SIG] Expat module landing in CVS tree Message-ID: <200003282050.PAA14504@amarok.cnri.reston.va.us> It's time to add the Expat module to the Python 1.5.2+ CVS tree. In January we decided: * PyExpat's interface will be changed to be SAX-like, and we'll lobby Guido to add PyExpat to 1.6, along with Expat itself. It will be renamed, preferably to something with SAX in the name. (expat_sax? pysax? pyxml? whatever...) It'll be updated to support all the features in current versions of Expat; Jim Fulton has an updated version of PyExpat inside Zope that will probably be used. (From IPC8 DevDay summary, archived at http://www.python.org/pipermail/xml-sig/2000-January/003501.html ) Paul Prescod wound up rewriting the module to support all of Expat's features, but the interface is still basically the same, and not very SAXish. I think in subsequent follow-ups it was decided to leave the Expat module as it was, and add SAX in Python code on top of the C extension. Q. Does the module need to be renamed from 'pyexpat', since its interface wasn't really changed? Q. Where should 1.6 install it? As a new top-level module? Or in an xml.parsers? (The latter poses tricky installation problems; does the XML distribution now install itself on top of an xml/parsers/ directory created by Python? Ick...) We'll worry about SAX later. -- A.M. Kuchling http://starship.python.net/crew/amk/ UN-altered REPRODUCTION and DISSEMINATION of this IMPORTANT Information is ENCOURAGED. -- Robert E. McElwaine From gherman@darwin.in-berlin.de Wed Mar 29 06:20:10 2000 From: gherman@darwin.in-berlin.de (Dinu C. Gherman) Date: Wed, 29 Mar 2000 08:20:10 +0200 Subject: [XML-SIG] XML language for source code/UML? Message-ID: <38E1A09A.CC20B8DF@darwin.in-berlin.de> Hello, does something like a more or less established language exist for describing object-oriented languages (source code) in XML? I'm interested in something able to say this is a class C, it has methods m1, m2, with signatures s1, s2, and so on, something like an UML model in XML format. Could anybody point me to such a thing if it does exist, or let me know if it might not exist, yet? Thanks and regards, Dinu -- Dinu C. Gherman ................................................................ "The thing about Linux or open software in general is that it actually tries to move software from being witchcraft to being a science," [...] "A lot of the programs you see today are actually put together by shamans, and you just take it and if the computer crashes you walk around it three times... and maybe it's OK." (Linus Thorvalds, LinuxWorld 2000, NYC) From cloder@acm.org Wed Mar 29 06:34:15 2000 From: cloder@acm.org (Chad Loder) Date: Wed, 29 Mar 2000 01:34:15 -0500 (EST) Subject: [XML-SIG] XML language for source code/UML? In-Reply-To: <38E1A09A.CC20B8DF@darwin.in-berlin.de> Message-ID: Yes, there are two similar and competing standards, OIM and XMI. OIM: http://www.mdcinfo.org XMI: http://www.oasis-open.org c On Wed, 29 Mar 2000, Dinu C. Gherman wrote: > Hello, > > does something like a more or less established language > exist for describing object-oriented languages (source > code) in XML? > > I'm interested in something able to say this is a class C, > it has methods m1, m2, with signatures s1, s2, and so on, > something like an UML model in XML format. > > Could anybody point me to such a thing if it does exist, > or let me know if it might not exist, yet? > > Thanks and regards, > > Dinu > > -- > Dinu C. Gherman > ................................................................ > "The thing about Linux or open software in general is that > it actually tries to move software from being witchcraft to > being a science," [...] "A lot of the programs you see today > are actually put together by shamans, and you just take it and > if the computer crashes you walk around it three times... and > maybe it's OK." (Linus Thorvalds, LinuxWorld 2000, NYC) > > _______________________________________________ > XML-SIG maillist - XML-SIG@python.org > http://www.python.org/mailman/listinfo/xml-sig > ---------------------------------------------------- | Chad Loder - Somerville, MA, USA | | EMail: cloder@acm.org | | Home Page: http://www.ccs.neu.edu/home/cloder | ---------------------------------------------------- From gherman@darwin.in-berlin.de Wed Mar 29 08:38:38 2000 From: gherman@darwin.in-berlin.de (Dinu C. Gherman) Date: Wed, 29 Mar 2000 10:38:38 +0200 Subject: [XML-SIG] XML language for source code/UML? In-Reply-To: References: Message-ID: <954319118.38e1c10edd887@webmail.in-berlin.de> Chad Loder : > Yes, there are two similar and competing standards, OIM and XMI. > > OIM: http://www.mdcinfo.org > XMI: http://www.oasis-open.org Thanks! It seems are some problems with the sites and/or their content, but I found something else on XMI here: http://www-4.ibm.com/software/ad/features/xmi.html And, to my surprise, some "grassroots" version of that called UXF mentions Uche Ogbuji of FourThought having written an UXF generator in Python. Question: is that so? Where is it, if it is available at all? http://www.yy.cs.keio.ac.jp/~suzuki/project/uxf/ Thanks, Dinu From Juergen Hermann" On Tue, 28 Mar 2000 12:21:52 -0700, uche.ogbuji@fourthought.com wrote: >Re: http://cscene.org/%7ejh/xml/bookmarks/checkurls.py > >I noticed you use the TranslateCDATA and TranslateText methods from the= 4DOM >printer (thanks for respecting our copyright, BTW). Updated. Thanks for the info. >Nice program, BTW. Thanks. It's my first Python one. Ciao, J=FCrgen -- J=FCrgen Hermann (jhe@webde-ag.de) WEB.DE AG, Amalienbadstr.41, D-76227 Karlsruhe Tel.: 0721/94329-0, Fax: 0721/94329-22 From rob@hooft.net Wed Mar 29 14:04:05 2000 From: rob@hooft.net (Rob W. W. Hooft) Date: Wed, 29 Mar 2000 16:04:05 +0200 (MZT) Subject: [XML-SIG] Buglet in xmlproc? Message-ID: <14562.3413.512505.184289@schol.chem.uu.nl> This looks like a buglet in xmlproc. Does the CVS have a newer version than I have? Regards, Rob Hooft. devel[299]dtd%% cat crash.xml ]> devel[300]dtd%% python xvcmd.py crash.xml xmlproc version 0.62 Parsing 'crash.xml' Traceback (innermost last): File "xvcmd.py", line 124, in ? p.parse_resource(sysid) File "/usr/local/nonius/lib/python1.5/site-packages/xml/parsers/xmlproc/xmlval.py", line 32, in parse_resource self.parser.parse_resource(sysid) File "/usr/local/nonius/lib/python1.5/site-packages/xml/parsers/xmlproc/xmlutils.py", line 78, in parse_resource self.read_from(infile,bufsize) File "/usr/local/nonius/lib/python1.5/site-packages/xml/parsers/xmlproc/xmlutils.py", line 138, in read_from self.feed(buf) File "/usr/local/nonius/lib/python1.5/site-packages/xml/parsers/xmlproc/xmlutils.py", line 183, in feed self.do_parse() File "/usr/local/nonius/lib/python1.5/site-packages/xml/parsers/xmlproc/xmlproc.py", line 83, in do_parse self.parse_start_tag() File "/usr/local/nonius/lib/python1.5/site-packages/xml/parsers/xmlproc/xmlproc.py", line 185, in parse_start_tag self.app.handle_start_tag(name,attrs) File "/usr/local/nonius/lib/python1.5/site-packages/xml/parsers/xmlproc/xmlval.py", line 142, in handle_start_tag next=self.cur_elem.next_state(self.cur_state,name) File "/usr/local/nonius/lib/python1.5/site-packages/xml/parsers/xmlproc/xmldtd.py", line 292, in next_state return self.content_model[state][elem_name] TypeError: sequence index must be integer -- ===== rob@hooft.net http://www.xs4all.nl/~hooft/rob/ ===== ===== R&D, Nonius BV, Delft http://www.nonius.nl/ ===== ===== PGPid 0xFA19277D ========================== Use Linux! ========= From larsga@garshol.priv.no Wed Mar 29 16:07:08 2000 From: larsga@garshol.priv.no (Lars Marius Garshol) Date: 29 Mar 2000 18:07:08 +0200 Subject: [XML-SIG] Buglet in xmlproc? In-Reply-To: <14562.3413.512505.184289@schol.chem.uu.nl> References: <14562.3413.512505.184289@schol.chem.uu.nl> Message-ID: * Rob W. W. Hooft | | This looks like a buglet in xmlproc. Does the CVS have a newer | version than I have? It does now, since I checked in a fix for this 2 minutes ago. :-) (Thanks for the bug report, by the way.) The development version (unreleased) did not have this problem at all. The problem was caused by the code that generated content models for empty content models. It inserted a list where there should have been a dictionary, thus causing this problem when validating empty elements with content. --Lars M. From xml-sig@teleo.net Wed Mar 29 16:45:02 2000 From: xml-sig@teleo.net (Patrick Phalen) Date: Wed, 29 Mar 2000 08:45:02 -0800 Subject: [XML-SIG] XML language for source code/UML? In-Reply-To: <954319118.38e1c10edd887@webmail.in-berlin.de> References: <954319118.38e1c10edd887@webmail.in-berlin.de> Message-ID: <00032908470700.02829@quadra.teleo.net> [Dinu C. Gherman, on Wed, 29 Mar 2000] :: Thanks! It seems are some problems with the sites and/or :: their content, but I found something else on XMI here: :: :: http://www-4.ibm.com/software/ad/features/xmi.html Also try http://www.oasis-open.org/cover/xmi.html From uche.ogbuji@fourthought.com Wed Mar 29 21:10:34 2000 From: uche.ogbuji@fourthought.com (uche.ogbuji@fourthought.com) Date: Wed, 29 Mar 2000 14:10:34 -0700 Subject: [XML-SIG] XML language for source code/UML? In-Reply-To: Your message of "Wed, 29 Mar 2000 10:38:38 +0200." <954319118.38e1c10edd887@webmail.in-berlin.de> Message-ID: <200003292110.OAA01621@localhost.localdomain> > Chad Loder : > > > Yes, there are two similar and competing standards, OIM and XMI. > > > > OIM: http://www.mdcinfo.org > > XMI: http://www.oasis-open.org > > Thanks! It seems are some problems with the sites and/or > their content, but I found something else on XMI here: > > http://www-4.ibm.com/software/ad/features/xmi.html > > And, to my surprise, some "grassroots" version of that called > UXF mentions Uche Ogbuji of FourThought having written an UXF > generator in Python. Question: is that so? Where is it, if it > is available at all? > > http://www.yy.cs.keio.ac.jp/~suzuki/project/uxf/ I never got it finished. I did send an alpha to the openCASE group, but I very swiftly ran out of time, which is _very_ unfortunate because I _really_ like UxF: especially compared to the monster known as XMI. I think I'll tack "finish UxF/Python project" to my to-do list somewhere and see if it manages to bob to the top. -- Uche Ogbuji Fourthought, Inc., IT Consultants uche.ogbuji@fourthought.com (970)481-0805 Software-engineering, project-management, knowledge-management http://Fourthought.com http://OpenTechnology.org From ken@bitsko.slc.ut.us Wed Mar 29 21:27:12 2000 From: ken@bitsko.slc.ut.us (Ken MacLeod) Date: 29 Mar 2000 15:27:12 -0600 Subject: [XML-SIG] Expat module landing in CVS tree In-Reply-To: "Andrew M. Kuchling"'s message of "Tue, 28 Mar 2000 15:50:32 -0500 (EST)" References: <200003282050.PAA14504@amarok.cnri.reston.va.us> Message-ID: "Andrew M. Kuchling" writes: > Paul Prescod wound up rewriting the module to support all of Expat's > features, but the interface is still basically the same, and not > very SAXish. I think in subsequent follow-ups it was decided to > leave the Expat module as it was, and add SAX in Python code on top > of the C extension. Just a minor note: someone may still want to come back later and implement the SAX layer/wrapper in C, just for performance. Expat's "native" API will probably still be faster because it's "tuned" that way. -- Ken From Diane.Johnson@argoc.com Thu Mar 30 02:17:50 2000 From: Diane.Johnson@argoc.com (Diane Johnson) Date: Wed, 29 Mar 2000 20:17:50 -0600 Subject: [XML-SIG] B2B e-Commerce Solution for the Chemicals Community Message-ID: To be removed from this list, send a reply to mailto:Diane.Johnson@Argoc.com?subject=RemoveFrom7428 ************************************* Dear Colleague, Argosy Omnimedia, Inc. ("Argosy") has launched an exciting new Business to Business (B2B) e-Commerce product called e-Site1 (http://www.argoc.com/esite1/esite1.asp ). Argosy understands the business and technology requirements of the production chemicals community. Argosy has launched a managed application service for emerging to mid-sized companies who need a rapidly deployable Internet solution in order to establish a B2B presence on the Internet. e-Site1 is a hosted solution that was developed and is managed by Argosy in cooperation with PSINet and DataReturn. If your company has a need to; o promote your product catalog through a searchable online interface o interact online with trading partners o provide authenticated access to a company knowledgebase for your existing clients o automate your sales organization's selling activities online e-Site1 provides a cost effective solution for a secured, rapidly deployable B2B site. Within 4 to 6 weeks, your database driven site can be online generating sales and helping you to retain existing customers through a quality Internet site, customized with your company's branding. If you are interesting in learning more about e-Site1, download the e-Site1 technical description from the web site (http://www.argoc.com/esite1/esite1.asp) or send a request for more information to my attention at mailto:Diane.Johnson@Argoc.com?subject=RequestFrom7428 . I will be happy to send you more information on how to implement an e-Site1 solution for your company. Thank you for your time and consideration. Regards, Diane Johnson Product Marketing Argosy Omnimedia, Inc. ************************************* From cloder@acm.org Thu Mar 30 01:41:02 2000 From: cloder@acm.org (Chad Loder) Date: Wed, 29 Mar 2000 20:41:02 -0500 (EST) Subject: [XML-SIG] B2B e-Commerce Solution for the Chemicals Community In-Reply-To: Message-ID: I can't handle all this spam! The list should be set up to only allow email from subscribers. Chad On Wed, 29 Mar 2000, Diane Johnson wrote: > To be removed from this list, send a reply to > mailto:Diane.Johnson@Argoc.com?subject=RemoveFrom7428 > ************************************* > spam spam spam spam > > _______________________________________________ > XML-SIG maillist - XML-SIG@python.org > http://www.python.org/mailman/listinfo/xml-sig > ---------------------------------------------------- | Chad Loder - Somerville, MA, USA | | EMail: cloder@acm.org | | Home Page: http://www.ccs.neu.edu/home/cloder | ---------------------------------------------------- From gstein@lyra.org Thu Mar 30 10:28:14 2000 From: gstein@lyra.org (Greg Stein) Date: Thu, 30 Mar 2000 02:28:14 -0800 (PST) Subject: [XML-SIG] B2B e-Commerce Solution for the Chemicals Community In-Reply-To: Message-ID: Get real. 1) learn to use the 'd' key to delete messages. it is very easy. 2) restricting posts to subscribers means that it becomes very difficult for somebody to just post a question to the list. this is especially true for newbies -- by definition, they are not subscribed 3) your complains about the spam to the list are simply *increasing* the amount of crap on this list. if you had an issue with it, then send it to xml-sig-admin, NOT the whole list. Why am I posting? To hopefully head off other, similar complaints. Learn to delete messages. It really is quite easy. 90% of the time, you can even tell from the subject line, before even opening the damn message... Cheers, -g On Wed, 29 Mar 2000, Chad Loder wrote: > I can't handle all this spam! The list should be set up to only allow > email from subscribers. > > Chad > > On Wed, 29 Mar 2000, Diane Johnson wrote: > > > To be removed from this list, send a reply to > > mailto:Diane.Johnson@Argoc.com?subject=RemoveFrom7428 > > ************************************* > > spam spam spam spam > > > > _______________________________________________ > > XML-SIG maillist - XML-SIG@python.org > > http://www.python.org/mailman/listinfo/xml-sig > > > > ---------------------------------------------------- > | Chad Loder - Somerville, MA, USA | > | EMail: cloder@acm.org | > | Home Page: http://www.ccs.neu.edu/home/cloder | > ---------------------------------------------------- > > > > > _______________________________________________ > XML-SIG maillist - XML-SIG@python.org > http://www.python.org/mailman/listinfo/xml-sig > -- Greg Stein, http://www.lyra.org/ From ludvig.svenonius@excosoft.se Thu Mar 30 10:54:44 2000 From: ludvig.svenonius@excosoft.se (Ludvig Svenonius) Date: Thu, 30 Mar 2000 12:54:44 +0200 Subject: [XML-SIG] Win32 and 4DOM In-Reply-To: <20000329170025.820741CD7D@dinsdale.python.org> Message-ID: I'm having a hassle getting 4DOM to work under Windows. I'm getting tragic stack traces of different kinds depending on whether i try to run it in IDLE or at the command line. In IDLE: >>> from Ft.Dom import Ext >>> from Ft.Dom.Ext.Reader import Sax >>> dom = Sax.FromXmlFile("Ft\\Dom\\demo\\addr_book1.xml") Exception in Tkinter callback Traceback (innermost last): File "C:\Program Files\Python\Lib\lib-tk\Tkinter.py", line 764, in __call__ return apply(self.func, args) File "C:\PROGRA~1\Python\Tools\idle\PyShell.py", line 552, in enter_callback self.runit() File "C:\PROGRA~1\Python\Tools\idle\PyShell.py", line 571, in runit more = self.interp.runsource(line) File "C:\PROGRA~1\Python\Tools\idle\PyShell.py", line 165, in runsource return InteractiveInterpreter.runsource(self, source, filename) File "C:\Program Files\Python\Lib\code.py", line 71, in runsource self.runcode(code) File "C:\PROGRA~1\Python\Tools\idle\PyShell.py", line 254, in runcode self.showtraceback() File "C:\PROGRA~1\Python\Tools\idle\PyShell.py", line 216, in showtraceback InteractiveInterpreter.showtraceback(self) File "C:\Program Files\Python\Lib\code.py", line 144, in showtraceback list[len(list):] = traceback.format_exception_only(type, value) File "C:\Program Files\Python\Lib\traceback.py", line 126, in format_exception_only list.append('%s: %s\n' % (str(stype), str(value))) File "C:\Program Files\Python\Lib\exceptions.py", line 69, in __str__ if not self.args: AttributeError: args At the command prompt: C:\Program Files\Python\Ft\Dom\demo>python dom_from_xml_file.py addr_book1.xml SAXException caught: No parsers found Traceback (innermost last): File "dom_from_xml_file.py", line 20, in ? read_xml_from_file(sys.argv[1]) File "dom_from_xml_file.py", line 13, in read_xml_from_file Ext.Print(xml_dom_object) NameError: xml_dom_object In the command-line Python interpreter: >>> from Ft.Dom import Ext >>> from Ft.Dom.Ext.Reader import Sax >>> dom = Sax.FromXmlFile("Ft\\dom\\demo\\addr_book1.xml") Traceback (innermost last): File "", line 1, in ? File "Ft\Dom\Ext\Reader\Sax.py", line 155, in FromXmlFile rv = FromXmlStream(fp,ownerDocument,validate,keepAllWs,catName,saxHandlerClass) File "Ft\Dom\Ext\Reader\Sax.py", line 135, in FromXmlStream parser.parseFile(stream) File "C:\Program Files\Python\xml\sax\drivers\pylibs.py", line 32, in parseFile self.feed(buf) File "C:\Program Files\Python\xml\sax\drivers\drv_xmllib.py", line 68, in feed xmllib.XMLParser.feed(self,data) File "C:\Program Files\Python\Lib\xmllib.py", line 149, in feed self.goahead(0) File "C:\Program Files\Python\Lib\xmllib.py", line 240, in goahead k = self.parse_starttag(i) File "C:\Program Files\Python\Lib\xmllib.py", line 609, in parse_starttag self.finish_starttag(nstag, attrdict, method) File "C:\Program Files\Python\Lib\xmllib.py", line 646, in finish_starttag self.unknown_starttag(tagname, attrdict) File "C:\Program Files\Python\xml\sax\drivers\drv_xmllib.py", line 24, in unknown_starttag self.doc_handler.startElement(tag,saxutils.AttributeMap(attributes)) File "Ft\Dom\Ext\Reader\Sax.py", line 71, in startElement self.__completeTextNode() File "Ft\Dom\Ext\Reader\Sax.py", line 51, in __completeTextNode self.__nodeStack[-1].appendChild(new_text) File "Ft\Dom\Document.py", line 223, in appendChild return Node.appendChild(self,newChild) File "Ft\Dom\Node.py", line 225, in appendChild self._4dom_validateNode(newChild) File "Ft\Dom\Node.py", line 300, in _4dom_validateNode raise DOMException(HIERARCHY_REQUEST_ERR) Ft.Dom.DOMException What is it I'm doing wrong? I'm using Python 1.5.2 and 4DOM 0.9.3. Thankful for any suggestions, Ludvig Svenonius From larsga@garshol.priv.no Thu Mar 30 14:28:41 2000 From: larsga@garshol.priv.no (Lars Marius Garshol) Date: 30 Mar 2000 16:28:41 +0200 Subject: [XML-SIG] Win32 and 4DOM In-Reply-To: References: Message-ID: * Ludvig Svenonius | | At the command prompt: | C:\Program Files\Python\Ft\Dom\demo>python dom_from_xml_file.py | addr_book1.xml | SAXException caught: No parsers found | Traceback (innermost last): | File "dom_from_xml_file.py", line 20, in ? | read_xml_from_file(sys.argv[1]) | File "dom_from_xml_file.py", line 13, in read_xml_from_file | Ext.Print(xml_dom_object) | NameError: xml_dom_object This one is easy, at least: Python can't find your SAX parsers. If you either install the saxlib from my pages (and an XML parser; xmllib will do) or the XML-SIG package 0.5.3 this problem will go away. Whether this is the cause of the other problems as well I can't really tell. --Lars M. From akuchlin@mems-exchange.org Thu Mar 30 15:34:27 2000 From: akuchlin@mems-exchange.org (Andrew M. Kuchling) Date: Thu, 30 Mar 2000 10:34:27 -0500 (EST) Subject: [XML-SIG] B2B e-Commerce Solution for the Chemicals Community In-Reply-To: <38E35B02.223B82ED@eatel.net> References: <38E35B02.223B82ED@eatel.net> Message-ID: <14563.29699.322333.911070@amarok.cnri.reston.va.us> python.org mailing lists have been getting hit with more spam recently. For example, this most recent spam sidesteps Mailman's spam checking because it actually listed xml-sig@python.org in the To: header. It was sent through an open relay in Japan (IP address 210.136.121.2), though not one currently listed in the ORBS or RBL. In any case, the fix is to improve the spam detection, whether in Mailman or on python.org, and I'll talk to Barry about it. Closing off the list is not a solution, particularly since we have contributors who use several different e-mail addresses; I'm not going to resort to that just yet. -- A.M. Kuchling http://starship.python.net/crew/amk/ What on earth is less likely than *two* committees to produce a seamless web of anything but intrigue and deficit? Who said "three committees"? -- Stan Kelly-Bootle, _The Computer Contradictionary_ From uche.ogbuji@fourthought.com Thu Mar 30 18:34:37 2000 From: uche.ogbuji@fourthought.com (uche.ogbuji@fourthought.com) Date: Thu, 30 Mar 2000 11:34:37 -0700 Subject: [XML-SIG] Win32 and 4DOM In-Reply-To: Your message of "Thu, 30 Mar 2000 12:54:44 +0200." Message-ID: <200003301834.LAA02233@localhost.localdomain> To elaborate on Lars's explanation, you seem to have neither PyExpat or xmlproc XML parsers in your PYTHONPATH. It's falling back to xmllib which is getting confused. I'll add a to-do list item to wrap a better exception in such cases. --Uche > At the command prompt: > C:\Program Files\Python\Ft\Dom\demo>python dom_from_xml_file.py > addr_book1.xml > SAXException caught: No parsers found > Traceback (innermost last): > File "dom_from_xml_file.py", line 20, in ? > read_xml_from_file(sys.argv[1]) > File "dom_from_xml_file.py", line 13, in read_xml_from_file > Ext.Print(xml_dom_object) > NameError: xml_dom_object > > In the command-line Python interpreter: > >>> from Ft.Dom import Ext > >>> from Ft.Dom.Ext.Reader import Sax > >>> dom = Sax.FromXmlFile("Ft\\dom\\demo\\addr_book1.xml") > Traceback (innermost last): > File "", line 1, in ? > File "Ft\Dom\Ext\Reader\Sax.py", line 155, in FromXmlFile > rv = > FromXmlStream(fp,ownerDocument,validate,keepAllWs,catName,saxHandlerClass) > File "Ft\Dom\Ext\Reader\Sax.py", line 135, in FromXmlStream > parser.parseFile(stream) > File "C:\Program Files\Python\xml\sax\drivers\pylibs.py", line 32, in > parseFile > self.feed(buf) > File "C:\Program Files\Python\xml\sax\drivers\drv_xmllib.py", line 68, in > feed > xmllib.XMLParser.feed(self,data) > File "C:\Program Files\Python\Lib\xmllib.py", line 149, in feed > self.goahead(0) > File "C:\Program Files\Python\Lib\xmllib.py", line 240, in goahead > k = self.parse_starttag(i) > File "C:\Program Files\Python\Lib\xmllib.py", line 609, in parse_starttag > self.finish_starttag(nstag, attrdict, method) > File "C:\Program Files\Python\Lib\xmllib.py", line 646, in finish_starttag > self.unknown_starttag(tagname, attrdict) > File "C:\Program Files\Python\xml\sax\drivers\drv_xmllib.py", line 24, in > unknown_starttag > self.doc_handler.startElement(tag,saxutils.AttributeMap(attributes)) > File "Ft\Dom\Ext\Reader\Sax.py", line 71, in startElement > self.__completeTextNode() > File "Ft\Dom\Ext\Reader\Sax.py", line 51, in __completeTextNode > self.__nodeStack[-1].appendChild(new_text) > File "Ft\Dom\Document.py", line 223, in appendChild > return Node.appendChild(self,newChild) > File "Ft\Dom\Node.py", line 225, in appendChild > self._4dom_validateNode(newChild) > File "Ft\Dom\Node.py", line 300, in _4dom_validateNode > raise DOMException(HIERARCHY_REQUEST_ERR) > Ft.Dom.DOMException > > What is it I'm doing wrong? I'm using Python 1.5.2 and 4DOM 0.9.3. > > Thankful for any suggestions, > > Ludvig Svenonius > > > _______________________________________________ > XML-SIG maillist - XML-SIG@python.org > http://www.python.org/mailman/listinfo/xml-sig > From ludvig.svenonius@excosoft.se Fri Mar 31 09:36:27 2000 From: ludvig.svenonius@excosoft.se (Ludvig Svenonius) Date: Fri, 31 Mar 2000 11:36:27 +0200 Subject: [XML-SIG] Weirdness in 4DOM on Win32 In-Reply-To: <20000330170017.045691CEA6@dinsdale.python.org> Message-ID: I've looked into the problems I had with 4DOM on the Win32 platform at somewhat greater depth. One thing I found odd is that the list of available parser drivers in the PyXML ParserFactory seems to only have one driver registered: drv_xmlproc_val, even though I have PyExpat and xmllib also installed on my pythonpath and fully available (I've tested them both). Is this due to a bug in the parser factory or have I not initialized it properly? Also, the reason that the 4DOM test app couldn't locate the xmlproc parser (which was the only one registered) I tracked down to a missing __init__ file in the xml.parsers.xmlproc package. After adding an empty __init__ file to this dir, I finally got it working. Are these bugs in PyXML 0.5.3 or am I missing something? -- Ludvig Svenonius From larsga@garshol.priv.no Fri Mar 31 10:54:25 2000 From: larsga@garshol.priv.no (Lars Marius Garshol) Date: 31 Mar 2000 12:54:25 +0200 Subject: [XML-SIG] Weirdness in 4DOM on Win32 In-Reply-To: References: Message-ID: * Ludvig Svenonius | | One thing I found odd is that the list of available parser drivers | in the PyXML ParserFactory seems to only have one driver registered: | drv_xmlproc_val, even though I have PyExpat and xmllib also | installed on my pythonpath and fully available (I've tested them | both). Is this due to a bug in the parser factory or have I not | initialized it properly? The factory settings shouldn't require any initialization. But the XMLValParserFactory should have only drv_xmlproc_val listed, since that's the only validating parser we have at the moment (RXP will be added in SAX 2.0). To verify your settings, you can do this: [larsga@lambda tmp]$ python Python 1.5.1 (#1, May 6 1998, 01:48:27) [GCC 2.7.2.3] on linux-i386 Copyright 1991-1995 Stichting Mathematisch Centrum, Amsterdam >>> from xml.sax import saxexts >>> saxexts.XMLParserFactory.parsers ['xml.sax.drivers.drv_pyexpat', 'xml.sax.drivers.drv_xmltok', 'xml.sax.drivers.drv_xmlproc', 'xml.sax.drivers.drv_xmltoolkit', 'xml.sax.drivers.drv_xmllib', 'xml.sax.drivers.drv_xmldc', 'xml.sax.drivers.drv_sgmlop'] | Also, the reason that the 4DOM test app couldn't locate the xmlproc | parser (which was the only one registered) I tracked down to a | missing __init__ file in the xml.parsers.xmlproc package. After | adding an empty __init__ file to this dir, I finally got it working. | | Are these bugs in PyXML 0.5.3 or am I missing something? They are probably really bugs in your WinZip software, but we should work around this in the XML-SIG package by inserting __init__.py with dummy contents. --Lars M. From akuchlin@mems-exchange.org Fri Mar 31 16:23:29 2000 From: akuchlin@mems-exchange.org (Andrew M. Kuchling) Date: Fri, 31 Mar 2000 11:23:29 -0500 (EST) Subject: [XML-SIG] pyexpat checked in Message-ID: <200003311623.LAA25456@amarok.cnri.reston.va.us> The pyexpat module has now been checked in to the Python CVS tree, and a little test suite that exercises most (I hope all) of the handlers has been added. There's still one more change I'd like to make: the TypeError you get if an INT_HANDLER function (like NotStandalone and ExternalEntityRef) returns the wrong thing is very unclear. Anyway, could those of you who follow the Python CVS tree please try it out and report any problems? Thanks... With the release of 1.6alpha1 impending, I'm not sure what course to follow with the XML-SIG. Currently I'm leaning toward making a 0.5.4 release that's compatible with 1.5.2, and then starting a 0.6 branch that can use 1.6-only features. (Mostly this is because I don't want to drag wstrop around, given that 1.6a1 has different Unicode support.) -- A.M. Kuchling http://starship.python.net/crew/amk/ If you have a browser from CERN's WWW project (World-Wide Web, a distributed hypertext system) you can browse a WWW hypertext version of the manual... -- Guido van Rossum, 19 Nov 1992 [First mention of the Web on python-list.] From fwang2@yahoo.com Fri Mar 31 17:58:37 2000 From: fwang2@yahoo.com (oliver) Date: Fri, 31 Mar 2000 12:58:37 -0500 (EST) Subject: [XML-SIG] need a bit clarification Message-ID: hi, I just begin to look at the Python XML package, there seems different routes for the same task, and please help me clarify: - From XML-howto, it seems xmllib.py can do both DOM/SAX parsing, is it true? and this module does come with python 1.52 distribution, so does it mean the "official entry" I should take? - New distribution on XML-SIG homepage include a interface of Expad parser, the primary advantage is the performance side, is this understanding correct? - xmlproc is said written in python and implement only SAX, my guess is it has better integration. Does it have plan for DOM? My other questions is: what the focus of current development effort, if I were to start a project doing processing (simple parse and action), would it be sufficient to just stay with xmllib? Any long term concerns? thanks for your help oliver From fdrake@acm.org Fri Mar 31 18:18:42 2000 From: fdrake@acm.org (Fred L. Drake, Jr.) Date: Fri, 31 Mar 2000 13:18:42 -0500 (EST) Subject: [XML-SIG] need a bit clarification In-Reply-To: References: Message-ID: <14564.60418.472212.632969@seahag.cnri.reston.va.us> oliver writes: > - From XML-howto, it seems xmllib.py can do both DOM/SAX parsing, is it > true? and this module does come with python 1.52 distribution, so does > it mean the "official entry" I should take? xmllib is "SAX-like"; there isn't anything DOM-like about it. It will be deprecated in future releases of Python. The interface does not lend itself to full support for XML, and it is not a compliant parser. There is no intention to maintain it further. > - New distribution on XML-SIG homepage include a interface of Expad > parser, the primary advantage is the performance side, is this > understanding correct? This will become the standard parser as of Python 1.6. Both SAX and DOM will be offered with this parser, and SAX using Expat will be part of the standard library in Python 1.6. > - xmlproc is said written in python and implement only SAX, my guess is it > has better integration. Does it have plan for DOM? A DOM object can be built from the SAX event stream, so the DOM will be available with any SAX-supporting parser. > My other questions is: what the focus of current development effort, if I > were to start a project doing processing (simple parse and action), would > it be sufficient to just stay with xmllib? Any long term concerns? Perhaps the best approach would be to require the PyXML package now and use the SAX interface. The additional package requirement will disappear with Python 1.6 if you restrict yourself to SAX. -Fred -- Fred L. Drake, Jr. Corporation for National Research Initiatives