[fpc-devel] XML / SAX - Removing redundancies

2014-03-12 Thread Daniel Gaspary
I have uploaded a patch[1] to remove the TSaxInputSource, it is redundant with TXmlInputSource from XmlReader unit. I believe the TSAXXMLReader.Parse method have almost the same functionality of xmltextreader.TXMLTextReader. I would like to know if and how it can be modified. The base class,

Re: [fpc-devel] XML / SAX - Removing redundancies

2014-03-12 Thread Michael Van Canneyt
On Tue, 11 Mar 2014, Daniel Gaspary wrote: I have uploaded a patch[1] to remove the TSaxInputSource, it is redundant with TXmlInputSource from XmlReader unit. I believe the TSAXXMLReader.Parse method have almost the same functionality of xmltextreader.TXMLTextReader. I would like to know if

Re: [fpc-devel] XML / SAX - Removing redundancies

2014-03-12 Thread Sergei Gorelkin
12.03.2014 1:32, Daniel Gaspary пишет: I have uploaded a patch[1] to remove the TSaxInputSource, it is redundant with TXmlInputSource from XmlReader unit. I believe the TSAXXMLReader.Parse method have almost the same functionality of xmltextreader.TXMLTextReader. I would like to know if and

Re: [fpc-devel] XML / SAX - Removing redundancies

2014-03-12 Thread Daniel Gaspary
On Wed, Mar 12, 2014 at 8:06 AM, Sergei Gorelkin sergei_gorel...@mail.ru wrote: OTOH, if we go for breaking user's code, then it is much better to drop SAX altogether and switch over to TXMLTextReader. From these points of view the best way is probably to document TXMLTextReader, deprecate SAX

Re: [fpc-devel] XML / SAX - Removing redundancies

2014-03-12 Thread Daniel Gaspary
On Wed, Mar 12, 2014 at 11:04 AM, Daniel Gaspary dgasp...@gmail.com wrote: On other topic, a new StaX[1] class, using TXMLTextReader, I mean, *classes*. Creating the writer part too. ___ fpc-devel maillist - fpc-devel@lists.freepascal.org

Re: [fpc-devel] XML / SAX - Removing redundancies

2014-03-12 Thread Sergei Gorelkin
12.03.2014 18:10, Daniel Gaspary пишет: On Wed, Mar 12, 2014 at 11:04 AM, Daniel Gaspary dgasp...@gmail.com wrote: On other topic, a new StaX[1] class, using TXMLTextReader, I mean, *classes*. Creating the writer part too. Why would you want to use S[t]AX approach in the first place? The

Re: [fpc-devel] XML / SAX - Removing redundancies

2014-03-12 Thread Daniel Gaspary
On Wed, Mar 12, 2014 at 11:42 AM, Sergei Gorelkin sergei_gorel...@mail.ru wrote: Why would you want to use S[t]AX approach in the first place? No special reason at the moment. I didn't examine TXmlTextReader so much yet. The interface of .net-based XML[Text]Reader and XMLWriter is IMHO much

Re: [fpc-devel] XML / SAX - Removing redundancies

2014-03-12 Thread Sergei Gorelkin
12.03.2014 18:58, Daniel Gaspary пишет: On Wed, Mar 12, 2014 at 11:42 AM, Sergei Gorelkin sergei_gorel...@mail.ru wrote: Why would you want to use S[t]AX approach in the first place? No special reason at the moment. I didn't examine TXmlTextReader so much yet. The interface of .net-based

Re: [fpc-devel] XML / SAX - Removing redundancies

2014-03-12 Thread Daniel Gaspary
On Wed, Mar 12, 2014 at 12:18 PM, Sergei Gorelkin sergei_gorel...@mail.ru wrote: Here I fully agree, and in the meantime I've already committed some initial changes to TXMLWriter to make it function like .net XMLTextWriter. Are these changes at trunk? Fcl or LazUtils? About DOM independence...

Re: [fpc-devel] XML / SAX - Removing redundancies

2014-03-12 Thread Michael Van Canneyt
On Wed, 12 Mar 2014, Daniel Gaspary wrote: On Wed, Mar 12, 2014 at 12:18 PM, Sergei Gorelkin sergei_gorel...@mail.ru wrote: Here I fully agree, and in the meantime I've already committed some initial changes to TXMLWriter to make it function like .net XMLTextWriter. Are these changes at

Re: [fpc-devel] XML / SAX - Removing redundancies

2014-03-12 Thread Daniel Gaspary
On Wed, Mar 12, 2014 at 2:23 PM, Michael Van Canneyt mich...@freepascal.org wrote: Curious: How can XPath become dom independent ? I thought the result of XPath was a series of DOM nodes ? Yes, it is. But I'm thinking about using the XPath expressions in other classes. Maybe a TXmlTextReader

Re: [fpc-devel] XML / SAX - Removing redundancies

2014-03-12 Thread Michael Van Canneyt
On Wed, 12 Mar 2014, Daniel Gaspary wrote: On Wed, Mar 12, 2014 at 2:23 PM, Michael Van Canneyt mich...@freepascal.org wrote: Curious: How can XPath become dom independent ? I thought the result of XPath was a series of DOM nodes ? Yes, it is. But I'm thinking about using the XPath

Re: [fpc-devel] XML / SAX - Removing redundancies

2014-03-12 Thread Daniel Gaspary
On Wed, Mar 12, 2014 at 2:36 PM, Michael Van Canneyt mich...@freepascal.org wrote: What can be achieved at the most seems to be the parsing of the expression and the resulting parse tree. Is exactly what I'm trying to say(my lack of English grammar skills doesn't help). :) I seriously doubt

Re: [fpc-devel] XML / SAX - Removing redundancies

2014-03-12 Thread Daniel Gaspary
On Wed, Mar 12, 2014 at 3:23 PM, Sergei Gorelkin sergei_gorel...@mail.ru wrote: A certain subset of expressions (forward iteration only) can be handled that way, yes. But in general, XPath requires a source with non-sequential access. Beyond this use case, could be useful to other

Re: [fpc-devel] XML / SAX - Removing redundancies

2014-03-12 Thread Sergei Gorelkin
12.03.2014 21:46, Daniel Gaspary пишет: On Wed, Mar 12, 2014 at 2:36 PM, Michael Van Canneyt mich...@freepascal.org wrote: What can be achieved at the most seems to be the parsing of the expression and the resulting parse tree. Is exactly what I'm trying to say(my lack of English grammar