[xml] using xmlTextWriterStartAttributeNS causing infinite loop

2005-02-21 Thread Rob Richards
When using xmlTextWriterStartAttributeNS, I am running into a stack overflow as I end up in an infinite loop. Reduced code down to smallest example and using xmlTextWriterEndAttribute makes no difference. writer = xmlNewTextWriterFilename ("testwriter.xml", 0); xmlTextWriterStartElement (writer,

Re: [xml] using xmlTextWriterStartAttributeNS causing infinite loop

2005-02-21 Thread Rob Richards
Daniel Veillard wrote: Applied , doesn't seems to break, but next time ptovide patches as attachments :-) Thanks and I just noticed I accidentally sent it as a unified diff :( Sorry. Rob ___ xml mailing list, project page http://xmlsoft.org/ xml@gnom

Re: [xml] xmlwriter, invalid StartElement

2005-02-23 Thread Rob Richards
I will give it a try later. I asked some php people around (I'm helping Rob Richards with his xmlWriter php extension), seems like getting an error (-1) is what they all expect. Index: xmlwriter.c === RCS file: /cvs/gnome/gnome

Re: [xml] windows multi-threading

2005-02-24 Thread Rob Richards
Just tried it and it breaks my build (confirmed that patch was applied correctly). Using VC++ 6 with default args other than debug=yes mem_debug=yes ..\threads.c(112) : error C2061: syntax error : identifier 'int32' ..\threads.c(114) : error C2059: syntax error : '}' ..\threads.c(701) : error C2

Re: [xml] windows multi-threading

2005-02-24 Thread Rob Richards
That one does compile. Get a warning now: ..\threads.c(702) : warning C4020: 'InterlockedIncrement' : too many actual parameters Shouldn't it be: if (InterlockedIncrement(&run_once.control) == 1) removed the second parameter and test == 1 (otherwise go into a nice forever loop calling Sleep(0))

Re: [xml] windows multi-threading

2005-02-24 Thread Rob Richards
Here's the revised patch. Rob Rich Salz wrote: Both fixes are correct. (I thought II returned the old value) Can you post a revised patch so Daniel can commit it? thanks for debugging my code. :) Index: threads.c === RCS file: /cvs

[xml] xmlTextReaderNext skipping nodes

2005-03-07 Thread Rob Richards
Ran into an issue when positioned at the end of an element, calling xmlTextReaderNext does not return the next node. This seems to only happen if the previous node had children and were traversed. I am not exactly sure of the states, but it looks like within xmlTextReaderNext, the XML_TEXTREADE

Re: [xml] xmlTextReaderNext skipping nodes

2005-03-10 Thread Rob Richards
Attached is a patch for this. Testing for the XML_TEXTREADER_BACKTRACK state is correct. Rob Rob Richards wrote: Ran into an issue when positioned at the end of an element, calling xmlTextReaderNext does not return the next node. This seems to only happen if the previous node had children and

Re: [xml] xmlTextReaderNext skipping nodes

2005-03-10 Thread Rob Richards
After a crash course in Pthon - its been a very long time - I threw together this test based on some of the other pyton reader tests. Rob Daniel Veillard wrote: On Thu, Mar 10, 2005 at 07:13:05AM -0500, Rob Richards wrote: Attached is a patch for this. Testing for the XML_TEXTREADER_BACKTRACK

Re: [xml] Questions about xml:id

2005-03-21 Thread Rob Richards
Funny this topic came up as I just recently was looking at the id stuff for the PHP DOM extension. Have a few questions/comments as well as a few issues regarding this. Daniel Veillard wrote: It seems that libxml2 only gives an attribute that magic ID-ness if the attribute's local-name is "xml:i

Re: [xml] Questions about xml:id

2005-03-22 Thread Rob Richards
Daniel Veillard wrote: need to be extremely cautious about that part of the code because it affects streaming DTD validation for ID/REF(S) checks, even when the node have been removed. But in general the code need fixing for correct ID/xml:id support when mutating trees. Not sure I will have tim

Re: [xml] Questions about xml:id

2005-03-22 Thread Rob Richards
Daniel Veillard wrote: if you modify a subtree grabbed from the reader you're very likely in anyway to crash the parser or library, people should not do this ! Should/shouldn't - people will try anyways :) using atype might work, yes. I see the idea but the patch looks far from complete as is

[xml] function consolidation

2005-03-25 Thread Rob Richards
While going through the ID stuff found that the same code needed to be added in many spots as code is duplicated all over the place. Is there any reason it is done this way or just never cleaned up? Here's a patch around some of the Prop functions. Added an internal xmlNewPropInternal function wh

Re: [xml] function consolidation

2005-03-25 Thread Rob Richards
Daniel Veillard wrote: I still think we should xmlFree() the name parameter. The underlying reason is that it's an API refinement and I prefer an immediate crash immediately identified in case someone expected a different behaviour than a slow memory leak which may only be tracked painfully months

Re: [xml] function consolidation

2005-03-27 Thread Rob Richards
Daniel Veillard wrote: good :-) Then send the CVs diff to be sure we came to the same conclusion :-) Here's the latest. Added the xmlFree(name) to xmlNewNodeEatName as well when it fails. Rob Index: tree.c === RCS file: /cvs/gnom

[xml] windows build failure

2005-04-05 Thread Rob Richards
Trying to build 2.6.19 using VC 6++ failed due to the errors: ..\nanoftp.c(1375) : error C2065: 'XML_SOCKLEN_T' : undeclared identifier ..\nanoftp.c(1375) : error C2146: syntax error : missing ';' before identifier 'dataAddrLen' ..\nanoftp.c(1375) : error C2065: 'dataAddrLen' : undeclared identifi

Re: [xml] new PARSER_NO_DISK_ACCESS constant

2005-05-08 Thread Rob Richards
Nuno Lopes wrote: I thought in a PARSER_NO_DISK_ACCESS constant that could do the same as PARSER_NO_NET, that is, disable disk access. This means that I could load a file, but libxml couldn't access the filesystem to check for DTDs, etc... But it could access the internet (if NO_NET wasn't set.

Re: [xml] new PARSER_NO_DISK_ACCESS constant

2005-05-08 Thread Rob Richards
Nuno Lopes wrote: the functions registered as callback in xmlRegisterInputCallbacks() could be extended.. I don't know anything about libxml internals, so I can't really help in deciding where and how to implement those features. xmlRegisterInputCallbacks is the wrong place for this imo and why

Re: [xml] redicting parts of trees

2005-05-16 Thread Rob Richards
Daniel Veillard wrote: instead of recreating all the namespace declaration used in the subtree at the insertion point, then reuse the declaration already in scope at that insertion point. Example if {"dbk", "http://docbook.org"} is in scope at the insertion point due to an ancestor holding the dec

Re: [xml] redicting parts of trees

2005-05-16 Thread Rob Richards
Daniel Veillard wrote: okay, thanks for the informations! I assume you will follow this thread and check that the outcome could be used for your implementation within PHP, right ? Of course. I dont mind helping out on it either, just havent had time lately to say I'd take ownership of it. Wou

Re: [xml] redicting parts of trees

2005-05-19 Thread Rob Richards
es we could anchor the ns-decls on the fragment-node itself. However, we could add an option to let it work as you describe; although I don't see the point in writing an adopt function that does not support single attribute nodes. Maybe Rob Richards and Martijn Faassen could give some feedback abo

Re: [xml] redicting parts of trees

2005-05-19 Thread Rob Richards
Kasimier Buchcik wrote: Re-creating ns-declarations for every stale reference, yes. As far as I understood it well, Daniel wanted to have the reconciliation being performed on-the-fly. If we decide to go xmlReconciliateNs's way, then we can get rid of that code part and call xmlReconciliateNs; alth

Re: [xml] redicting parts of trees

2005-05-19 Thread Rob Richards
Kasimier Buchcik wrote: On the other side, if the missing declaration xmlns:b="urn:test:foo" was stored internally _somewhere_ instead, we would get: - adopt some nodes with: @node == , with b bound to "urn:test:foo" - for every @node we will get: and a xmlns:b="urn:test:foo" stor

Re: [xml] redicting parts of trees

2005-05-20 Thread Rob Richards
Kasimier Buchcik wrote: I noticed that xmlReconciliateNs will break ns-wellformedness in the following case: if attached to: we get: The prefix "bar" is shadowed by a2, so it will be bound to "urn:test:OTHER" if serialized. This is due to: I dont get the results yo

Re: [xml] redicting parts of trees

2005-05-22 Thread Rob Richards
[EMAIL PROTECTED] wrote: Yeah, sorry, my example makes no sense; the error was in the first branch, which should look like this: with foo bound to "urn:test:mine" initially. I can see where you get that now. (Note that your closing tag is wrong - should be ). I had implemented m

[xml] xml:space and xml:lang problem

2005-06-08 Thread Rob Richards
Looks like xml:space is broken as of 2.6.0 with sax2 Running xmllint --noblanks on the following: ignores the preserve while it doesn't in 2.5.x (different function call) xml:lang has the same issue Attached is the patch I'm using for it - moved some things around as

Re: [xml] xml:space and xml:lang problem

2005-06-08 Thread Rob Richards
seAttribute, which does only check lang if pedantic is used. The change was just to get the checks to actually kick in as they would never be true in xmlParseAttribute2. Rob Daniel Veillard wrote: On Wed, Jun 08, 2005 at 02:41:36PM -0400, Rob Richards wrote: Looks like xml:space is b

Re: [xml] xml:space and xml:lang problem

2005-06-08 Thread Rob Richards
One thing to note about the patch however is that the the value for xml:space will be enforced again. Currently, its value could be anything since the checks are bypassed, but with the patch, the behavior reverts back to how it was in 2.5.x where only "default" or "preserve" are allowed. Everyt

Re: [xml] xml:space and xml:lang problem

2005-06-08 Thread Rob Richards
Added XML_WAR_SPACE_VALUE to xmlParserErrors enum, changed to warning in both functions and using pointer comparison now. Rob Daniel Veillard wrote: On Wed, Jun 08, 2005 at 04:53:02PM -0400, Rob Richards wrote: One thing to note about the patch however is that the the value for xml:space

[xml] relaxng and xml schema problem (leak/crash)

2005-06-11 Thread Rob Richards
Just synched up with cvs and getting a crash with the following relaxng. Not all familiar with relaxng and schema code, so debugging taking a while. I am guessing that the crash is from changes to schematypes for streaming support (leaks I see are related to changes made for specific basic types

Re: [xml] relaxng and xml schema problem (leak/crash)

2005-06-11 Thread Rob Richards
Daniel Veillard wrote: I looked quickly at Rob's bug. It's a problem in relaxng and while I'm surprized it ain't caught by the existing regression tests, seems fairly contained. I though I had a patch ready but I was wrong. I need a bit of testing but it should be fixeable easilly. I don't thin

Re: [xml] redicting parts of trees

2005-06-16 Thread Rob Richards
Kasimier Buchcik wrote: There's also an open question related to it: http://mail.gnome.org/archives/xml/2005-May/msg00210.html Sorry, had forgotten about that question. I think what you proposed will be fine (including the change #3). Rob ___ xml

[xml] attribute id handling part I

2005-06-16 Thread Rob Richards
The attribute ID stuff is taking me a bit, mainly due to time, so I broke it up a bit. Here's is the beginning which handles removing IDs. Figure its safe for this functionality to live without the ID addition portion. FreeProp - changed to just check atype flag so xml:id when not defined in a

Re: [xml] redicting parts of trees

2005-06-27 Thread Rob Richards
Ok, just changing my response now as I just noticed it was committed 2 hours ago. Personally with an imminent release would have liked to wait until after the release for the code to be added especially since a discussion was held off. My little free time right now has been spent testing the

Re: [xml] redicting parts of trees

2005-06-27 Thread Rob Richards
27, 2005 at 09:23:43AM -0400, Rob Richards wrote: I am the one who suggested to Kasimier to push to CVs precisely to get testing, but labelling it as experimental. I think we can grow the structure fairly reasilly in the future. Are you afraid of PHP-5.2 compiled against a vertion of libxml2

Re: [xml] redicting parts of trees

2005-06-27 Thread Rob Richards
Kasimier Buchcik wrote: The context has just an initial "void * _private" field, to be able to extend it. Adding fields to it, at the end, won't break ABI compatibility. How do you not break compatibility? For example, A new field is added, which if not NULL would cause the execution of som

Re: [xml] redicting parts of trees

2005-06-27 Thread Rob Richards
Kasimier Buchcik wrote: OK, committed xmlDOMWrapNewCtxt() and xmlDOMWrapFreeCtxt(). Thanks, that should work and along the lines of how I was thinking (backwards no less, but eh one of those days). Rob ___ xml mailing list, project page http://

Re: [xml] preserveWhiteSpace bug

2005-07-06 Thread Rob Richards
The bug report I wrote up on this is http://bugzilla.gnome.org/show_bug.cgi?id=166777 It has some additional info on the problem as well as the non-wondows inssues. Rob Daniel Veillard wrote: This could be related to a filed Libxml2 bug at: http://bugzilla.gnome.org/show_bug.cgi?id=169838

Re: [xml] DOM modifying XML without permission

2005-07-18 Thread Rob Richards
Question should have gone to the php general list. To answer the question though, resolveExternals property is also adding the default attributes into the tree. This property is not part of specs and behavior as is for those coming from domxml in PHP 4. In PHP 5.1 (libxml2 2.6.0+ required), yo

Re: [xml] DOM modifying XML without permission

2005-07-18 Thread Rob Richards
DOM: http://www.php.net/manual/en/function.dom-domdocument-load.php Prototype shows parameter, but looks like docs need updating here Parser Options: http://www.php.net/manual/en/ref.libxml.php You would probably just want to use LIBXML_DTDLOAD More relevant to PHP lists as its realted to how I

Re: [xml] Problem with calling conventions on windows

2005-07-20 Thread Rob Richards
Daniel Veillard wrote: Okay emphasis is mine on this problem, I cannot test this ! I don't have Windows and Marcus patches seems to be okay from my non-Windows aware point of view. So if you are on Windows, you'd better test those because I'm tempted to apply them and well this won't break fo

Re: [xml] Problem with calling conventions on windows

2005-07-21 Thread Rob Richards
I don't see any problems with committing the patch now. Early testing here seems fine (libxml alone as well as with libxslt) and anything that may come up next week would be easily fixable imo. Rob Marcus Boerger wrote: I think rob and me can take care of that as soon as rob has more time f

[xml] xmlSetTreeDoc and dictionaries

2005-07-24 Thread Rob Richards
I just noticed debug messages about element names not being from dictionary. It's due to the fact that I was creating nodes without a document and appending them to a tree. Saw that the append functions are calling xmlSetTreeDoc so never really thought about it until now. Here is something I w

Re: [xml] xmlSetTreeDoc and dictionaries

2005-07-27 Thread Rob Richards
Its enabled whenever libxml is built with --with-mem-debug as it defines LIBXML_DEBUG_RUNTIME that kicks off all the checking. Wasn't sure how serious this message was as all the debug messages tend to be raised only when there is something wrong with the XML. Rob Daniel Veillard wrote: yes

Re: [xml] xmlSetTreeDoc and dictionaries

2005-07-28 Thread Rob Richards
I have to say its much more useful than just maintainers work. Using valgrind works well for debugging an application, but enabling mem-debug along with it can speed up debugging memleaks at least another 50%. For complex apps and larger documents being able to find the exact points of the docu

[xml] updated win build

2005-07-31 Thread Rob Richards
Attached is patch to fix windows MS VC build added schematron option to configure and makefile Index: configure.js === RCS file: /cvs/gnome/gnome-xml/win32/configure.js,v retrieving revision 1.32 diff -c -r1.32 configure.js *** config

[xml] patch: allow disable modules in win build

2005-08-02 Thread Rob Richards
Patch fixes using modules=no for win build. Bug 304071 Rob Index: configure.js === RCS file: /cvs/gnome/gnome-xml/win32/configure.js,v retrieving revision 1.33 diff -u -r1.33 configure.js --- configure.js31 Jul 2005 14:05:18

Re: [xml] How to detect at run-time whether libxml2 was compiled with enabled mutlithreading support?

2005-08-03 Thread Rob Richards
Daniel Veillard wrote: On Wed, Aug 03, 2005 at 08:01:44PM +0300, Andrew W. Nosenko wrote: Sometimes, the FreeBSD ports are looks very strange indeed... :-( But "vanilla" libxml2 port from the FreeBSD-5.4 compiled w/o threads support by default. Hum, annoying ! We must know why, this

Re: [xml] spaces in uri, again

2005-08-07 Thread Rob Richards
Paweł Pałucha wrote: > The problem is that this string taken in isolation doesn't mean much > even if you think it's is an URI. The only one who knows what is a good representation of particular URI is the application. So, perhaps, the reasonable thing to do is: - if URI looks ok, try to loa

Re: [xml] spaces in uri, again

2005-08-07 Thread Rob Richards
Daniel Veillard wrote: This is extracted from runtest.c urip_testURLs and urip_rcvsURLs. It think this check basic right behaviour for a number of cases we were usually breaking :-\ . In the process I also fixed #306861 , but I didn't changed the Win32 specific part of xmlCanonicPath() at the

[xml] patch: xmlTextReaderGetAttribute

2005-08-07 Thread Rob Richards
attached is patch for xmlTextReaderGetAttribute. Using the following document http://www.example.com/namespace-a";> calling xmlTextReaderGetAttribute('id') when positioned on section element returns the value "about" instead of "2". It takes a qualified name as a parameter so should not grab

[xml] patch: xmlTextReaderGetAttribute and xmlns support

2005-08-16 Thread Rob Richards
Patch adds support to retrieve value of namesapce delcarations in xmlTextReaderGetAttribute Any objections to adding xmlns support to xmlTextReaderGetAttributeNs and xmlTextReaderMoveToAttributeNs? Lastly is there any standard used on code indenting? I've noticed that sometimes spaces are us

Re: [xml] patch: xmlTextReaderGetAttribute and xmlns support

2005-08-16 Thread Rob Richards
Daniel Veillard wrote: On Tue, Aug 16, 2005 at 07:43:19AM -0400, Rob Richards wrote: Patch adds support to retrieve value of namesapce delcarations in xmlTextReaderGetAttribute What does the C# implementation do ? The behaviour should stay the same as much as possible. Will have

Re: [xml] patch: xmlTextReaderGetAttribute and xmlns support

2005-08-16 Thread Rob Richards
C# allows access to namespace decl using all the functions metioned here. Rob Daniel Veillard wrote: What does the C# implementation do ? The behaviour should stay the same as much as possible. Any objections to adding xmlns support to xmlTextReaderGetAttributeNs and xmlTextReaderMoveToA

Re: [xml] patch: xmlTextReaderGetAttribute and xmlns support

2005-08-16 Thread Rob Richards
Nope that one is fine. Havent implemented the xxAttributeNS functions yet. Daniel Veillard wrote: On Tue, Aug 16, 2005 at 03:50:51PM -0400, Rob Richards wrote: C# allows access to namespace decl using all the functions metioned here. Okidoc, do we need any change to the original

[xml] memory usage question

2005-08-17 Thread Rob Richards
After some testing to get an approximation on memory usage I was wondering if anyone could answer this question. I created a document about 12.5MB in size that looks like the following: 11 22 ... There are 40,000 book elements. Building a Tree I get vastly differing memory usage under w

Re: [xml] memory usage question

2005-08-17 Thread Rob Richards
Daniel Veillard wrote: Ho ho ... if it's really the same document on both side there is something fishy, I can't think of anything leading to this, seems it's twice the size on Linux, and I really can't see why. I would be very interested in feedback on this, it may be a stupid accounting error

Re: [xml] memory usage question

2005-08-17 Thread Rob Richards
Stefan Kost wrote: Does xmlParseDocument(ctxt) use the dictionary. If looked over the sources, but found no easy answer. Wow, lot of activity on this thread all due to a bone head move on my part :) I use the same call creating documents. Make sure you call xmlCtxtUseOptions as this will se

Re: [xml] patch: xmlTextReaderGetAttribute and xmlns support

2005-08-20 Thread Rob Richards
Daniel Veillard wrote: On Tue, Aug 16, 2005 at 05:55:32PM -0400, Rob Richards wrote: Nope that one is fine. Havent implemented the xxAttributeNS functions yet. okidoc, applied and commited, Here's the patch for xmlTextReaderGetAttributeNs and xmlTextReaderMoveToAttributeNs

[xml] XHTML Doc serialization and meta element

2005-08-24 Thread Rob Richards
I ran into a situation on a double free on a node and tracked down the issue to serializing an XHTML document. xmlDocContentDumpOutput calls htmlSetMetaEncoding for XHTML documents which ends up altering the internal document by freeing the meta element and adding its own. Same thing happens wit

Re: [xml] XHTML Doc serialization and meta element

2005-08-24 Thread Rob Richards
Daniel Veillard wrote: Just trying to follow the best practices outlined by XHTML1 W3C spec http://www.w3.org/TR/xhtml1/#C_9 Modifying the document is not ideal I agree, but it's simpler than trying to get all user application fixed ! "Problem with this is if a meta element already exists

Re: [xml] XHTML Doc serialization and meta element

2005-08-24 Thread Rob Richards
Daniel Veillard wrote: You keep an handle to the meta element while it was already inserted in the tree ? Yup Another way would be to make libxml2 not touch anything if it detects any http-equiv meta tag, and if it doesn't detect one try to put the tag serialization in the output buffe

Re: [xml] XHTML Doc serialization and meta element

2005-08-24 Thread Rob Richards
Daniel Veillard wrote: Another way would be to make libxml2 not touch anything if it detects any http-equiv meta tag, and if it doesn't detect one try to put the tag serialization in the output buffer, but not in the tree itself. This would requires some tweaking of the serialization code but s

Re: [xml] XHTML Doc serialization and meta element

2005-08-25 Thread Rob Richards
Daniel Veillard wrote: Okay I read the patch, this is basically the way I would prefer to see this implemented. Of course there might be some details to get right, I would expect for example the serialization to be the same to the old code in the majority of the cases (i.e. running the test su

[xml] CVS updates and changelog

2005-08-28 Thread Rob Richards
Does the changelog need to be manually edited or does it get automatically updated when files are commited? Thanks, Rob ___ xml mailing list, project page http://xmlsoft.org/ xml@gnome.org http://mail.gnome.org/mailman/listinfo/xml

Re: [xml] CVS updates and changelog

2005-08-30 Thread Rob Richards
Thanks, Have gotten so used to it being auto-generated when commiting to cvs that I thought had some wrong setting for my client. Rob Daniel Veillard wrote: On Sun, Aug 28, 2005 at 02:04:57PM -0400, Rob Richards wrote: Does the changelog need to be manually edited or does it get

Re: [xml] XHTML Doc serialization and meta element

2005-09-03 Thread Rob Richards
Daniel Veillard wrote: yes the call from the HTML serializer will have to go too for basically the same reason but one step at a time is fine :-) Can someone try out this patch and run the regressions on it (HTMLtests in particular)?: http://www.ctindustries.net/patches/meta.diff.txt For

Re: [xml] XHTML Doc serialization and meta element

2005-09-04 Thread Rob Richards
just when htmlSaveFileFormat is called, the output is handled via UTF8toUTF8 and not UTF8toHTML so the entity refs are not re-created. This has the potential of breaking a lot of apps not expecting this change in encoding. Rob Rob Richards wrote: Can someone try out this patch and run the

Re: [xml] set tag value when parsing XHTML (CDATA problem)

2005-10-19 Thread Rob Richards
Petr wrote: but it seems the libxml library is automatically adding CDATA section, when it sees script tag (he knows it's CDATA from DTD). Anyone has idea how to solve this problem? Answered your post on the PHP list as your problem is relevant to how you are using its DOM API and not the C

Re: [xml] problem reading attributes in XML with DTD

2005-10-19 Thread Rob Richards
[EMAIL PROTECTED] wrote: I am trying to read the attributes in an XML with a DTD (http://www.breaken.de/temp/output.xml) and for soem reason I don't get the attributes with the node with xmlGetProp(). I read in the manual, that it does look for the #FIXED or default declarations unless DTD va

[xml] modifying tree and attributes

2005-10-23 Thread Rob Richards
I was looking at bug 319108 (which I agree with assement and additional function needed) and was adding in some additional fixes from code I use. i.e. - dont unlink or free if XML_ATTRIBUTE_DECL returned from xmlHasXXXProp - dont add attr if #FIXED in DTD These changes affect xmlAddNextSiblin

Re: [xml] modifying tree and attributes

2005-10-23 Thread Rob Richards
Daniel Veillard wrote: On Sun, Oct 23, 2005 at 08:16:31AM -0400, Rob Richards wrote: Where is the line drawn on what is expected the caller to handle and what the lib handles? I would say the library should be made as resilient as possible. Looking at the bug, xmlAddChild() code and

Re: [xml] modifying tree and attributes

2005-10-27 Thread Rob Richards
Daniel Veillard wrote: I would say the library should be made as resilient as possible. I'm just a little puzzled so wanted to get some clarification. Getting a patch together - so far it stands as (and yes all applicable tests pass for both libs) : http://www.ctindustries.net/libxml/tre

Re: [xml] modifying tree and attributes

2005-10-28 Thread Rob Richards
Daniel Veillard wrote: Maybe addchild should be fixed too. We have hopefully reasonably complete reconciliate routines for people doing cut and past of tree fragments between document and locations, being more resilient and pointing users with potential trouble to that routine sounds the right

Re: [xml] PATCH: implement xmlSaveToBuffer()

2005-11-06 Thread Rob Richards
Geert Jansen wrote: See the attached patch. I took your original suggestion and used the original prototype for xmlSaveToBuffer(). I now create an xmlOutputBuffer from the xmlBuffer. This is done by a new function in xmlIO.c: xmlOutputBufferCreateBuffer(). It uses xmlAllocOutputBuffer() to cre

[xml] crash in xmlSchemaFormatNodeForError when node is document

2005-11-07 Thread Rob Richards
When validating with a schema against an empty document, xmlSchemaFormatNodeForError crashes because the document node, passed in from xmlSchemaValidateDoc, does not have node->ns and passes the if (node->ns != NULL) test resulting in a crash when node->ns->href is accessed for the error messag

Re: [xml] PATCH: implement xmlSaveToBuffer()

2005-11-09 Thread Rob Richards
Daniel Veillard wrote: XMLPUBFUN xmlOutputBufferPtr XMLCALL xmlOutputBufferCreateBuffer (xmlBufferPtr buffer, xmlCharEncodingHandlerPtr encoder); A new API but it's not a bad idea, making the link between normal sources and xmlOutputBu

Re: WG: [xml] PATCH: implement xmlSaveToBuffer()

2005-11-09 Thread Rob Richards
Mickautsch, Alfred wrote: You are right, I forgot to check the result of xmlBufferAdd :-(. Thanks for the answer. Just wanted to make sure it wasn't done on purpose. Rob ___ xml mailing list, project page http://xmlsoft.org/ xml@gnome.org http

Re: [xml] Installing libxml - new mail

2005-11-23 Thread Rob Richards
Todd Siegel wrote: 'configure', 'make' and 'make install' report no errors for libxml, but when I try to compile php with the --with-xsl option 'make' fails with the following error: ext/dom/document.lo(.text+0x24f3): In function `zif_dom_document_validate': /root/php-5.0.5/ext/dom/document.c:17

Re: [xml] libxml2 and default namespaces

2005-12-10 Thread Rob Richards
Daniel Veillard wrote: DOM is irrelevant, what matters is XML. Libxml2 does not implement DOM. If you're discussing about whether an API allows somthings in a memory tree, then that's not XML, it's irrelevant. If you are discussing about how an instance looks like, then XML is a normative prose

Re: [xml] libxml2 and default namespaces

2005-12-10 Thread Rob Richards
Paul Boddie wrote: Perhaps the real issue is whether a namespace set on an element whose qualified name is unprefixed can be discarded in the serialisation. That I may have declared the namespace, but since no prefix is specified I haven't (according to some interpretations) actually used it, a

Re: [xml] 3 pb with the xmlTextReader APi from Python

2006-01-18 Thread Rob Richards
Sorry for the late post, but finally getting back to coding again. Daniel Veillard wrote: On Thu, Jan 12, 2006 at 03:46:03PM +0100, Meunier, Jean-Luc wrote: Pb 1 - how to process the XML declaration , e.g. You can't. It's not made available by the API initially coming from Microsof

Re: [xml] thanks a lot ---some more help ---

2006-01-18 Thread Rob Richards
Kasimier Buchcik wrote: There's no "make tests" equivalent for the win side. If you look at the makefile for win, you'll see only two test-sections defined there. What exactly is the difference between the "make tests" and the runtest/runsuite? I had started on building out the tests in the w

Re: [xml] 3 pb with the xmlTextReader APi from Python

2006-01-18 Thread Rob Richards
Daniel Veillard wrote: libxml2 keeps all the informations from the XMLDecl. They are available from an xmlDocPtr (which wou can retrieve from the Reader). So if an xmlReader should expose them we can expose them, the problem is the API for it, which I did not see ! And that's exactly the con

Re: [xml] thanks a lot ---some more help ---

2006-01-18 Thread Rob Richards
Daniel Veillard wrote: On Wed, Jan 18, 2006 at 05:49:38AM -0500, Rob Richards wrote: Kasimier Buchcik wrote: There's no "make tests" equivalent for the win side. If you look at the makefile for win, you'll see only two test-sections defined there.

Re: [xml] thanks a lot ---some more help ---

2006-01-18 Thread Rob Richards
Daniel Veillard wrote: Well may depend on your CVS client. I would say checkout on a sane platform and just export the code to Windows from there. Also allows to make CVS diffs without end of line brokeness, and in general to trust the tools. Finally found what caused this (was bugging me si

Re: [xml] adding Microsoft Visual Studio 2005 project files to CVS

2006-01-28 Thread Rob Richards
Sergey Scobich wrote: I have a proposal to add VS.2005 project files to CVS in order to easy compilation for Win32 users. Personally I would like to see the win build be contained using the current build system and think any compatibility issues building with 2005 should be addressed there.

Re: [xml] adding Microsoft Visual Studio 2005 project files to CVS

2006-01-28 Thread Rob Richards
Not my call if it gets added, but I just don't see the purpose of having yet another build system in CVS that would need to be maintained (probably the reason the dsp files were dropped in the first place). If VS project files are what you are looking for, you can always use the bakefile syste

Re: [xml] Running tests on Windows

2006-02-01 Thread Rob Richards
Daniel Veillard wrote: On Tue, Jan 31, 2006 at 01:36:02PM -0800, Manish Marathe wrote:Libxml experts everywhere, Of all tests the URL passing test is failing: "failed the URL passing test for /path/to/a b.html## Schemas regression tests" , I just wanted to know if this is known to fail.

Re: [xml] Potential wrong usage of xmlIsID() in tree.c

2006-02-03 Thread Rob Richards
Kasimier Buchcik wrote: Hi, On Fri, 2006-02-03 at 11:34 -0500, Daniel Veillard wrote: On Fri, Feb 03, 2006 at 05:24:30PM +0100, Kasimier Buchcik wrote: Hi, On Fri, 2006-02-03 at 11:13 -0500, Daniel Veillard wrote: On Fri, Feb 03, 2006 at 03:52:46PM +0100, Kasimier Buchcik wrot

Re: [xml] Problem when building libxml2 with Borland C++ 6

2006-02-08 Thread Rob Richards
[EMAIL PROTECTED] wrote: Hi, I have recently learned that the libxml2 does not build with BCB6. The problem is the result of the inclusion of the Windows header file ws2tcpip.h by wsockcompat.h. The ws2tcpip.h header file (apparently supplied to Borland by Microsoft) uses a macro, WS2TCPIP_INLIN

Re: [xml] Push-parsing Unicode with LibXML2

2006-02-15 Thread Rob Richards
After reading this thread and the comments in the bug report I have a few questions/comments. Kasimier Buchcik wrote: To me the most logical would be to do surgery on your input stream you are modifying it by changing its encoding, you should then also change or remove the encoding declarati

Re: [xml] Push-parsing Unicode with LibXML2

2006-02-15 Thread Rob Richards
Kasimier Buchcik wrote: really dont agree with overriding encoding and haven't heard any complaints yet. Then PHP doesn't use (hasn't implemented) the LS module. Correct and probably never will implement it (at least I have no plans on it), as it just over complicates things in a langu

Re: [xml] Potential wrong usage of xmlIsID() in tree.c

2006-02-19 Thread Rob Richards
Kasimier Buchcik wrote: Hi, Bugzilla: http://bugzilla.gnome.org/show_bug.cgi?id=331273 Regards, Kasimier Kasimier, To give you an idea of how I think the IDs should be modified, take a look at this diff: http://www.ctindustries.net/libxml/tree.c.diff.txt It's still a work in progress,

Re: [xml] Potential wrong usage of xmlIsID() in tree.c

2006-02-21 Thread Rob Richards
Kasimier Buchcik wrote: As far as copy/import/adopt goes. I have found a couple of conflicting opinions for this. One is that the importing doc should determine if an attribute is added as an ID. The other (which is also how it is implemented in Xerces) is that an attribute should be copied/imp

Re: [xml] Potential wrong usage of xmlIsID() in tree.c

2006-02-21 Thread Rob Richards
Hi Kasimier, Won't be able to go over some of the things you brought up in detail until tomorrow, so here's an abbreviated response on some of the issues. Kasimier Buchcik wrote: It never even crossed my mind that someone might be building a list of attributes without a corresponding eleme

Re: [xml] Potential wrong usage of xmlIsID() in tree.c

2006-02-22 Thread Rob Richards
Kasimier Buchcik wrote: Hi, On Tue, 2006-02-21 at 16:06 +0100, Kasimier Buchcik wrote: Hi, On Tue, 2006-02-21 at 08:56 -0500, Rob Richards wrote: Kasimier Buchcik wrote: As far as copy/import/adopt goes. I have found a couple of conflicting opinions for this. One is that the

Re: [xml] Potential wrong usage of xmlIsID() in tree.c

2006-02-23 Thread Rob Richards
Kasimier Buchcik wrote: Hi On Wed, 2006-02-22 at 19:39 -0500, Rob Richards wrote: How do you figure (or are you referring to the case of a document not parsed in validating mode)? A DTD doesn't allow a redefinition of an element and an element can have only a single ID defined, s

Re: [xml] Potential wrong usage of xmlIsID() in tree.c

2006-02-23 Thread Rob Richards
Daniel Veillard wrote: On Thu, Feb 23, 2006 at 04:05:21PM +0100, Kasimier Buchcik wrote: Daniel, could we have that flag field on xmlDoc? Explain clearly the semantic of it. A priori I'm not too fond of it if we start having different data structure based on what is using the libr

Re: [xml] Newbie help

2006-02-23 Thread Rob Richards
This is a question for one of the PHP mailing lists (general/windows or installation). Anyways, I assume you mean PHP 5 in which case libxml2 is already built statically into PHP for the windows build. Rob Laura Broughton wrote: Hi there I am a complete newbie so just humour me if i say anyt

  1   2   3   >