Re: [libxml-devel] Installing libxml on windows

2013-10-14 Thread Charlie Savage
I am trying to install libxml on windows ruby from gem file [1], and though install output suggests install was successful with "1 gem installed", in the build.log it says "rake aborted! No Rakefile found (looking for: build.rake). Assuming install worked nonetheless, when I try to require 'li

[libxml-devel] Version 2.1.0 Released

2011-07-31 Thread Charlie Savage
Version 2.1.0 of the libxml bindings has been released. The changelog is: * Ruby 1.9.3 compatability (Charlie Savage). * Added XPath expression <-> Ruby value conversion methods (Jens Wille). * Extracted rxml_xpath_to_value from rxml_xpath_context_find (Jens Wille). * A

[libxml-devel] Version 2.0.7 Released

2011-06-24 Thread Charlie Savage
Version 2.0.7 has been released. It includes two changes: * Fix compile issue on Ruby 1.9.3 * Add in 2 new HTML Parser constants - NODEFDTD and NOIMPLIED. Thanks, Charlie ___ libxml-devel mailing list libxml-devel@rubyforge.org http://rubyforge.org/m

[libxml-devel] Version 2.0.6 Available

2011-05-23 Thread Charlie Savage
I just pushed up version 2.0.6. This release includes one change: * Fix segfault that sometimes occurred when looking up encodings on 1.9. In some cases the Ruby encoding infrastructure was not properly initialized (nkriege). Thanks, Charlie ___

[libxml-devel] Version 2.0.4 Released

2011-05-02 Thread Charlie Savage
I just pushed up the 2.0.4 release of libxml-ruby. This release includes a fix that allows the libxml-ruby bindings to once again be compiled against older versions of libxml2 (specifically earlier that 1.1.25). Thanks, Charlie ___ libxml-devel mai

[libxml-devel] Version 2.0.3 Released

2011-05-02 Thread Charlie Savage
in background threads in Ruby 1.9.x and higher would often cause segmentation faults. This has now been fixed (Charlie Savage). * Update Reader#expand so that returned node correctly remembers its encoding in Ruby 1.9.x (zerebubuth). * Add check to verify a node has not been deleted. This

Re: [libxml-devel] Release 2.0.1 At Long Last!

2011-04-18 Thread Charlie Savage
Just wanted to say a huge "thank you" for this release as it includes a fix for my problem of segfaults during exceptions thrown in SAX handler methods. This makes a huge difference in stability for my installed applications, and I can now remove the workarounds I'd had to put in place. Kud

[libxml-devel] Release 2.0.1 At Long Last!

2011-04-17 Thread Charlie Savage
Its been a long time coming, but we are happy to announce the release of libxml-ruby version 2.0.1. The big change in this release is full support for Ruby 1.9.2. Strings that are returned from libxml-ruby have their encodings set to the encoding of the underlying xml document. Ruby 1.8.* is

Re: [libxml-devel] gh-pages

2011-04-17 Thread Charlie Savage
Hi Anurag, I have published the modifications to the site as gh-pages[1], and made some small changes to make publishing site easier, and handle rdoc correctly. Publishing website as gh-pages is now super simple: $ rake rdoc; rake publish or just, $ rake publish_with_docs Yeah, I've been stru

Re: [libxml-devel] Ruby Libxml Code Example - Writing XML Documents

2011-04-17 Thread Charlie Savage
-the-Reader-API [2] https://github.com/xml4r/libxml-ruby/wiki/Writing-XML-Documents -- Charlie Savage http://cfis.savagexi.com ___ libxml-devel mailing list libxml-devel@rubyforge.org http://rubyforge.org/mailman/listinfo/libxml-devel

Re: [libxml-devel] Does the libxml ruby support ruby 1.9? or when will it support it?

2011-04-17 Thread Charlie Savage
hly appreciated :). -- Charlie Savage http://cfis.savagexi.com ___ libxml-devel mailing list libxml-devel@rubyforge.org http://rubyforge.org/mailman/listinfo/libxml-devel

Re: [libxml-devel] Ruby Libxml Code Example - Writing XML Documents

2011-04-17 Thread Charlie Savage
, IIT Kharagpur. +91-9775550642 -- Charlie Savage http://cfis.savagexi.com ___ libxml-devel mailing list libxml-devel@rubyforge.org http://rubyforge.org/mailman/listinfo/libxml-devel

Re: [libxml-devel] Moving to Github.

2010-06-27 Thread Charlie Savage
, IIT Kharagpur. +91-9775550642 -- Anurag Priyam, 2nd Year Undergraduate, Department of Mechanical Engineering, IIT Kharagpur. +91-9775550642 ___ libxml-devel mailing list libxml-devel@rubyforge.org http://ruby

Re: [libxml-devel] Status

2010-06-26 Thread Charlie Savage
I think we should wait for Charlie's approval. Go for it - sorry to delay things. FYI, my githu name is cfis if you can add me in. Charlie ___ libxml-devel mailing list libxml-devel@rubyforge.org http://rubyforge.org/mailman/listinfo/libxml-devel

Re: [libxml-devel] Status

2010-06-26 Thread Charlie Savage
Mechanical Engineering, IIT Kharagpur. +91-9775550642 -- Charlie Savage http://cfis.savagexi.com ___ libxml-devel mailing list libxml-devel@rubyforge.org http://rubyforge.org/mailman/listinfo/libxml-devel

Re: [libxml-devel] Status

2010-06-25 Thread Charlie Savage
Hi Anurag, On 6/25/2010 1:48 AM, Anurag Priyam wrote: Looks like Charlie is quite busy. I could act as a co-maintainer? As the initial steps I will create the libxml account add collaborators and clone the repositories. Well, I did setup a git repositories: http://github.com/cfis/libxml-ruby

Re: [libxml-devel] Status

2010-06-08 Thread Charlie Savage
21 PM, Charlie Savage mailto:c...@savagexi.com>> wrote: On 6/7/2010 2:43 AM, Trans wrote: On Jun 7, 1:52 am, Charlie Savagemailto:c...@savagexi.com>> wrote: On 6/6/2010 11:22 AM, cthulhu wrote: Maybe I could help, I'm pretty fa

Re: [libxml-devel] Status

2010-06-07 Thread Charlie Savage
On 6/7/2010 2:43 AM, Trans wrote: On Jun 7, 1:52 am, Charlie Savage wrote: On 6/6/2010 11:22 AM, cthulhu wrote: Maybe I could help, I'm pretty familiar with C. Besides, I use this lib in production so I'm pretty interested in fixing those crashes. Let me know when U'll pu

Re: [libxml-devel] Status

2010-06-07 Thread Charlie Savage
Since I have access to libxml's RubyForge page, I will update it to reflect the new github repository. This project Done. Great, thanks Anurag. Could you post a news item also mentioning the move? Thanks, Charlie ___ libxml-devel mailing l

Re: [libxml-devel] Status

2010-06-07 Thread Charlie Savage
istinfo/libxml-devel ___ libxml-devel mailing list libxml-devel@rubyforge.org http://rubyforge.org/mailman/listinfo/libxml-devel -- Charlie Savage http://cfis.savagexi.com ___ libxml-devel mailing list libxml-devel@rubyforge.org http://rubyforge.

Re: [libxml-devel] Raising ruby exceptions and crashing libxml?

2010-06-06 Thread Charlie Savage
ers, ast -- Andrew S. Townleyhttp://atownley.org ___ libxml-devel mailing list libxml-de...@rubyforge.orghttp://rubyforge.org/mailman/listinfo/libxml-devel -- Andrew S. Townley http://atownley.org ___ libxml-devel mai

Re: [libxml-devel] Status

2010-06-06 Thread Charlie Savage
bxml-devel@rubyforge.org http://rubyforge.org/mailman/listinfo/libxml-devel -- Charlie Savage http://cfis.savagexi.com ___ libxml-devel mailing list libxml-devel@rubyforge.org http://rubyforge.org/mailman/listinfo/libxml-devel

Re: [libxml-devel] Status

2010-06-06 Thread Charlie Savage
-- Charlie Savage http://cfis.savagexi.com ___ libxml-devel mailing list libxml-devel@rubyforge.org http://rubyforge.org/mailman/listinfo/libxml-devel

Re: [libxml-devel] Frequent crashes of libxml-ruby with Ruby 1.9.1

2009-05-03 Thread Charlie Savage
Rolf, Currently we're building a Rails application that uses libxml-ruby (1.1.3) to parse some documents and loop over its contents with xpath expressions. When running the application with Ruby 1.8.7-p72, everything works flawlessly. With Ruby 1.9.1-p0, however, we get frequent double-linke

Re: [libxml-devel] Updated libxslt-ruby for libxml-ruby > 1.0?

2009-04-21 Thread Charlie Savage
Hi Paul, Is anyone in the process of updating the libxslt-ruby bindings for the latest libxml? The current bindings are based on 0.9.x and segfault if passed a node from libxml-ruby > 1.0. I'm happy to hack up an update if no one else is working on it. Hmm, interesting, they work for me. Wh

Re: [libxml-devel] XML::Reader and segfauly in 1.1.2

2009-03-21 Thread Charlie Savage
Hi James, Thanks for the test case and report. require 'rubygems' gem "libxml-ruby", "1.1.2" require 'libxml' filename = File.join(File.dirname(__FILE__), "bookwise.xml") reader = LibXML::XML::Reader.string(File.read(filename)) while reader.read if reader.node_type == LibXML:

Re: [libxml-devel] Installation problem

2009-03-18 Thread Charlie Savage
Hi Hans, A large set of these kind of messages, but I assumed these concerned the ri documention Yes. Newer versions of rdoc fix them. Wrote a small test application and got the error messages Unimplemented block at /SourceCache/libxml2/libxml2-17.7.6/libxml2/xmlreader.c:1578 trying to re

Re: [libxml-devel] bus error cause by bad XML

2009-03-17 Thread Charlie Savage
hash[attr.name] = attr.value } With the access to attributes in C code. Since I can't reproduce on Linux or Windows, I'll have to go dig up an OS X box. Let me know if you have any luck generating a stack trace, that hopefully will clear up the mystery. Charlie -- Char

Re: [libxml-devel] validate against multiple xml schema

2009-03-17 Thread Charlie Savage
Hi Franco, validation question: given a schema that has an xsd:any element. Is there a way to specify multiple schemas to validate against the outer document and any inner documents? currently I only see the validate_schema method Good question. Do you know if libxml2 supports this? May

Re: [libxml-devel] bus error cause by bad XML

2009-03-17 Thread Charlie Savage
What can I do to get a stack trace? I'll let people more knowledgeable than I am on OS X anser. But at a minimum, compile the bindings with debug info (-g). And then maybe use this: http://developer.apple.com/DOCUMENTATION/Darwin/Reference/ManPages/man8/stackshot.8.html The other way is

Re: [libxml-devel] bus error cause by bad XML

2009-03-16 Thread Charlie Savage
Hi Stephen, Here's the result running on MacOS 10.5.6 $ ruby test_attack_xml_with_libxml.rb Loaded suite test_attack_xml Started /Library/Ruby/Gems/1.8/gems/libxml-ruby-1.1.2/lib/libxml/node.rb:100: [BUG] Bus Error ruby 1.8.6 (2008-03-03) [universal-darwin9.0] Abort trap Can you get a stac

Re: [libxml-devel] fyi: bug in libxml backend for Rails new xml_mini backend

2009-03-16 Thread Charlie Savage
changed from object to definition Charlie -- Charlie Savage http://cfis.savagexi.com smime.p7s Description: S/MIME Cryptographic Signature ___ libxml-devel mailing list libxml-devel@rubyforge.org http://rubyforge.org/mailman/listinfo/libxml-devel

Re: [libxml-devel] fyi: bug in libxml backend for Rails new xml_mini backend

2009-03-16 Thread Charlie Savage
On the first test, its a bug in the activesupport code: def to_hash(hash={}) if text? raise LibXML::XML::Error if content.length >= LIB_XML_LIMIT hash[CONTENT_ROOT] = content # ! INCORRECT ! else This is the xml: good hello everyone morning

Re: [libxml-devel] fyi: bug in libxml backend for Rails new xml_mini backend

2009-03-16 Thread Charlie Savage
/stepheneb/rails_hash_from_xml/tree/master ___ libxml-devel mailing list libxml-devel@rubyforge.org http://rubyforge.org/mailman/listinfo/libxml-devel -- Charlie Savage http://cfis.savagexi.com smime.p7s Description: S/MIME Cryptographic

Re: [libxml-devel] Announcing libxml-ruby 1.1.1

2009-03-14 Thread Charlie Savage
Changes: I think you meant 1.1.2 ;) Right. Oops. Charlie smime.p7s Description: S/MIME Cryptographic Signature ___ libxml-devel mailing list libxml-devel@rubyforge.org http://rubyforge.org/mailman/listinfo/libxml-devel

[libxml-devel] Announcing libxml-ruby 1.1.1

2009-03-14 Thread Charlie Savage
Changes: * Added XML::Node#inner_xml helper method. * Fixed segmentation that could occur when calling the mark function on a previously freed node Charlie smime.p7s Description: S/MIME Cryptographic Signature ___ libxml-devel mailing list libxml

[libxml-devel] libxml-ruby 1.x Released: Ruby Now A Serious XML Player

2009-03-11 Thread Charlie Savage
http://www.rubyinside.com/libxml-ruby-1x-released-ruby-now-a-serious-xml-player-1630.html Charlie Savage smime.p7s Description: S/MIME Cryptographic Signature ___ libxml-devel mailing list libxml-devel@rubyforge.org http://rubyforge.org/mailman

[libxml-devel] Mark libxml-ruby as 1.9.1 compatible

2009-03-10 Thread Charlie Savage
Hi everyone, The site http://isitruby19.com/ lists which gems are 1.9.1 compatible. Now that libxml-ruby is 1.9.1 compatible, can anyone who has experience with 1.9.1 go vote yes (and if you find any bugs then please submit them to ruby forge). Thanks, Charlie smime.p7s Description: S/MIM

[libxml-devel] Announcing libxml-ruby 1.1.1

2009-03-10 Thread Charlie Savage
A new version of libxml-ruby, version 1.1.1, is now available. It includes one minor change: * Fix - Only include extra html parser context methods for versions of libxml2 older than 2.6.27. Charlie smime.p7s Description: S/MIME Cryptographic Signature _

Re: [libxml-devel] Announcing libxml-ruby 1.1.0

2009-03-10 Thread Charlie Savage
Maybe I missed something, but doc.encoding takes/returns a number instead of an encoding string. not sure how that change from 0.8.x happens. They were all changed a few releases back to the libxml encoding constants defined here: http://xmlsoft.org/html/libxml-encoding.html Charlie smim

Re: [libxml-devel] libxml-ruby 1.0.0 fails to install with libxml 2.6.27

2009-03-09 Thread Charlie Savage
There is some code in ext/libxml/ruby_xml_html_parser_context.c that defines a couple of functions for older versions of libxml that are included in newer versions. Right, those were added for OS X compatibility, since it has version 2.6.16. They actually exist in older libxml versions, but a

Re: [libxml-devel] SEGV with libxml-ruby 1.0.0

2009-03-09 Thread Charlie Savage
What a shame. I think we should investigate alternatives, but high memory usage is better than crashing. :'( My thinking on this is go back through all the mark and free functions and see which other ones theoretically could have the problem. Then having done that review, give it anothe

[libxml-devel] Announcing libxml-ruby 1.1.0

2009-03-09 Thread Charlie Savage
Well, that didn't last quite as long as I had hoped. A new version of libxml-ruby, version 1.1.0, is now available. It includes two changes: * Fix bug caused by the mark function being called on partially initialized attributes. * Revert back to libxml2's internal memory manager. These c

Re: [libxml-devel] SEGV with libxml-ruby 1.0.0

2009-03-09 Thread Charlie Savage
#0 rxml_attr_mark (xattr=0x0) at ruby_xml_attr.c:41 #1 0xb7ed6a15 in gc_mark_children (ptr=3050895040, lev=1) at gc.c:945 #2 0xb7ed6c49 in mark_locations_array (x=0xbfc32f90, n=39) at gc.c:629 #3 0xb7ed6e17 in garbage_collect () at gc.c:1366 #4 0xb7ed79c5 in ruby_xmalloc (size=48) at gc.c:103

Re: [libxml-devel] SEGV with libxml-ruby 1.0.0

2009-03-09 Thread Charlie Savage
Hi Tom, Having upgraded to libxml-ruby 1.0.0 yesterday I am now seeing repeatable crashes in the garbage collection. The end of the trace looks like: #0 rxml_attr_mark (xattr=0x0) at ruby_xml_attr.c:41 #1 0xb7ed6a15 in gc_mark_children (ptr=3050895040, lev=1) at gc.c:945 #2 0xb7ed6c49 in m

[libxml-devel] Announcing libxml-ruby 1.0.0

2009-03-07 Thread Charlie Savage
arlie --- == 1.0.0 / 2009-03-05 Charlie Savage * OS X (Charlie Savage). Update bindings to support the default installed version of libxml2 (2.6.16) on OS X 10.5 and the latest version available via MacPorts. == 0.9.9 / 2009-03-05 Charlie Savage * Ruby 1.9.1 support (Charlie Savage). l

Re: [libxml-devel] libxml-ruby 0.9.9 with Ruby 1.9.1 support

2009-03-07 Thread Charlie Savage
Kevin, only thing I can think is to make sure that /opt/local/bin and / opt/local/sbin are exported as the first items in your PATH (as per the macports install guide) If libxml-ruby cannot find /opt/local/bin/xml2-config... then it may not work. For example, in my /etc/profile I have: export PAT

Re: [libxml-devel] libxml-ruby 0.9.9 with Ruby 1.9.1 support

2009-03-06 Thread Charlie Savage
Hi Kevin, Kevin Menard wrote: I finally finished the upgrade. Still the same problem. Looks like someone already reported it though, so sorry for the extra noise: http://rubyforge.org/tracker/index.php?func=detail&aid=24353&group_id=494&atid=1971

[libxml-devel] libxml-ruby 0.9.9 with Ruby 1.9.1 support

2009-03-05 Thread Charlie Savage
I'm happy to announce the release of libxml-ruby 0.9.9. This release is chock full of goodies: * Ruby 1.9.1 support (Charlie Savage) * Much reduced memory usage (Joe Khoobyar). * Better OS X 10.5 and MacPorts support (Joe Khoobyar). * Tons of bug fixes (see changelog) At this point, the l

Re: [libxml-devel] Enclosing class/module 'cXMLHtmlParser' for..

2009-03-04 Thread Charlie Savage
libxml-devel list, I posted a question over on rubyforge yesterday: http://rubyforge.org/forum/forum.php?thread_id=31903&forum_id=2129 Is it indicating a problem? It's not a complete sentence. I don't know what the author of this gem is trying to tell me. Its an older version of Rdoc compl

Re: [libxml-devel] Memory usage compared to REXML

2009-02-13 Thread Charlie Savage
Hi Ian, I just switched over a chunk of code to use libxml-ruby expecting to see improvements in performance and memory usage. While performance is drastically better, memory usage has increased quite significantly. With REXML parsing a 3.8mb document would consume 259mb, however with libxml-ru

Re: [libxml-devel] Improving memory usage in libxml-devel

2009-02-13 Thread Charlie Savage
The one thing I didn't include in the post is the output of "vmmap" on OS X prior to this change. It showed large amounts of memory both marked as "(freed)" and some not. That pattern reminded me of internal fragmentation in a malloc implementation, which is a standard problem to be overcom

Re: [libxml-devel] problem with version .98 on Mac OS X

2009-02-09 Thread Charlie Savage
Hey Robert, and everyone, So this seems to be a common problem on OS X. The switch to use htmlNewParserCtxt happened in the last release and was done: * To make the html parser api consistent with the xml parser api * Expose some of the more advanced features of libxml for developers that ne

Re: [libxml-devel] Improving memory usage in libxml-devel

2009-02-09 Thread Charlie Savage
Hey Joe, Revision 783 in subversion applies this change. With this change, test08.rb holds about 13 MB on a Mac, where it held over 120 MB before. Ah, interesting. It is amazing how much memory libxml seems to grab on simple test cases. We are simply using libxml2's memory management hook

Re: [libxml-devel] Odd Segmentation Faults

2009-02-08 Thread Charlie Savage
Hi Michael, %product; From that I get: ./app/models/queue_item.rb:44: [BUG] Segmentation fault Line 44 is: dtd = XML::Dtd.new(File.read(Rails.root + "/lib/dtds/" + dtd_filename)) where dtd_filename is definition.dtd Works fine here, but you didn't post lib/dtds/product.dtd, so the

Re: [libxml-devel] How to expand entities?

2009-02-06 Thread Charlie Savage
How can I expand the entities in a document using this library? Globally: XML.default_substitute_entities = true Per parse run (only for 0.9.8 and higher): parser = XML::Parser.string('...', :options => XML::Parser::Options::NOENT) doc = parser.parse See the rdocs for all the other parser

Re: [libxml-devel] Strange node being created from white space

2009-02-01 Thread Charlie Savage
Regarding the use of NOBLANKS, I am actually glad it is not required (and even discouraged). I nly tried it once the initial code did not function as I expected. I cannot think of a scenario where you do want a single "\n" to become a separate node, so I think it should be default behaviour b

Re: [libxml-devel] Strange node being created from white space

2009-02-01 Thread Charlie Savage
I am experiencing some problems when constructing a document piece by piece. I have boiled downed the problem to the following code: require 'rubygems' require 'xml/libxml' # Envelope XML xml_string = %{ http://schemas.xmlsoap.org/soap/envelope/"; xmlns:xsd="http://www.w3.org/2001/XMLSchema"

[libxml-devel] libxml-ruby-0.9.8 release

2009-01-24 Thread Charlie Savage
I'm happy to announce the release of libxml-ruby 0.9.8. This is an important release for a number of reasons: * It is hopefully the last release before 1.0 * It cleans up a number of warts in libxml-ruby's api and exposes most of libxml's functionality to Ruby * Its been driven by the libxml-

Re: [libxml-devel] Installation problem - ruby 1.9.0 on Ubuntu 8.10

2009-01-23 Thread Charlie Savage
Hi Bohdan, I have a problem installing libxml-ruby for ruby 1.9 on Ubuntu 8.10. Running : * gem1.9 install libxml-ruby * ..

Re: [libxml-devel] doc.to_hash, node.to_hash, xpath.to_hash

2009-01-20 Thread Charlie Savage
Hey Tim, Here is what I came up with. It mimics the rails method in that it does not deal with attributes. It also doesn't do anything with namespaces either. Frankly I don't quite know how I would deal those issues anyway. Cool. So I assume you want this to be a drop in replacement for what

Re: [libxml-devel] Why is digest the only way to join this list?

2009-01-18 Thread Charlie Savage
Google groups will not allow me to subscribe to individual emails. Is there a reason for that? You can subscribe to individual emails here: http://rubyforge.org/mailman/listinfo/libxml-devel Charlie smime.p7s Description: S/MIME Cryptographic Signature

Re: [libxml-devel] XmlNode Doc is not bound! (ruby_xml_node.c:58) on 0.9.7

2009-01-12 Thread Charlie Savage
y ruby, the node object will be also. Charlie best regards, Tor Erik ___ libxml-devel mailing list libxml-devel@rubyforge.org http://rubyforge.org/mailman/listinfo/libxml-devel -- Charlie Savage http://cfis.savagexi.com smime.

Re: [libxml-devel] doc.to_hash, node.to_hash, xpath.to_hash

2009-01-12 Thread Charlie Savage
Hey Tim, It would be very nice to have these methods in the respective objects. Rails has a Hash.from_xml method but it uses REXML and is slow. Would probably be pretty easy to see how Rails does it, and then just modify it as needed to use libxml. Patches always welcome :) Charlie

Re: [libxml-devel] error installing libxml-ruby v0.9.7 on Linux

2009-01-11 Thread Charlie Savage
Hi Stephen, extconf failure: need libm Well, is libm installed? Someone had a similar issue once upon a time: http://rubyforge.org/pipermail/libxml-devel/2008-January/000640.html Turned out to have nothing to do with libm, it was zlib instead (see thread). Charlie smime.p7s Descriptio

Re: [libxml-devel] problem with xmlNewCharEncodingHandler

2009-01-08 Thread Charlie Savage
I want to extern libxml encoding to GB2312 on linux. I found it that %outlen is just 45 and %inlen is 653 passed by xmlCharEncodingInputFunc(unsigned char * out, int * outlen, const unsigned char * in, int * inlen) when I use iconv to convert GB2312 to UTF-8. And iconv returned -1. Is %outlen s

Re: [libxml-devel] Memory leak with 0.9.6 and 0.9.7

2009-01-07 Thread Charlie Savage
Hey Aaron, Looks like the xmlOutputBufferPtr never gets freed. Yup, exactly right. I posted a fix to trunk and sent another email to the list, but somehow it never made it through. Index: ext/libxml/ruby_xml_node.c === --- ex

Re: [libxml-devel] Memory leak with 0.9.6 and 0.9.7

2009-01-07 Thread Charlie Savage
Looks like the problem is in to_s on Node 1.times do node = XML::Node.new 'node' node.to_s end Anyway, will have to look and see if there is anything obvious in the part of the bindings. And fixed in trunk. It was caused by the addition of encoding support in the last couple of

Re: [libxml-devel] Memory leak with 0.9.6 and 0.9.7

2009-01-07 Thread Charlie Savage
Hi Joseph, I'll see if I can put something together, we know it's in the to_solr_doc from acts_as_solr somewhere. Looks like the problem is in to_s on Node 1.times do node = XML::Node.new 'node' node.to_s end Nice work - that's a great test case. So if I I run this code: 1000.

Re: [libxml-devel] Namespace issue with validate_schema?

2009-01-07 Thread Charlie Savage
This is likely a PEBKAC issue rather than a bug. I hope I'm submitting to the right list. I'm getting different validation results from libxml in Ruby than I am from a command-line tool (xmllint). I'm using a schema definition from ASTM to validate the output, for what it cost me the schema sho

Re: [libxml-devel] Memory leak with 0.9.6 and 0.9.7

2009-01-07 Thread Charlie Savage
Hi Joseph, We are using some code that utilizes libxml and creates XML documents. Using 0.9.5 everything is fine. Using 0.9.6 or 0.9.7, the more we use this code, the higher our memory usage gets. Seems likely that a memory leak was introduced in 0.9.6. We are seeing this same behavior on O

Re: [libxml-devel] libxml installation problem

2008-12-23 Thread Charlie Savage
Merry Christmas to you also! Charlie -- Charlie Savage http://cfis.savagexi.com smime.p7s Description: S/MIME Cryptographic Signature ___ libxml-devel mailing list libxml-devel@rubyforge.org http://rubyforge.org/mailman/listinfo/libxml-devel

Re: [libxml-devel] libxml installation problem

2008-12-22 Thread Charlie Savage
Hi Ray, I have two versions of libxml, one is the default libxml, the other one is the latest one which install to my local path. I changed the --with-xml2-include, --with-xml2-dir, --with-xml2-lib to the latest one when I generate makefile, the error is same. I guess there's something wrong

Re: [libxml-devel] libxml installation problem

2008-12-20 Thread Charlie Savage
Hi RaySun, I met some problems during installation. I cannot find 'xmlErrorPtr' defined in the C headers. So I got the error:ruby_xml_error.h:11: error: expected ')' before 'xerror'. Does anybody know why this is happened? Or my settings goes wrong? Thanks a lot. What version of libxml2 do

Re: [libxml-devel] incorrect source code for Solaris native C

2008-12-16 Thread Charlie Savage
Hi Matthias, thanks a lot for including the fix. It works like a charm. You saved me from having to maintain that ugly workaround :-) No problem. Thanks for pointing out the issue. Charlie smime.p7s Description: S/MIME Cryptographic Signature __

Re: [libxml-devel] get string position of element

2008-12-13 Thread Charlie Savage
(*getColumnNumber)(void *ctx); }; There is one per-thread. So the one problem - the bindings don't currently expose this object. How are your c skills, want to put together a patch? Charlie Charlie Savage wrote: Hi Charlie, That's exactly what I mean. Is that possible? What I'

Re: [libxml-devel] get string position of element

2008-12-13 Thread Charlie Savage
Hi Charlie, That's exactly what I mean. Is that possible? What I'd like to do is, parse an xml file and store each node in a flat search index. I want to store the string start/end position with the stored item so when the search returns the item, I can load only that fragment of xml. Some of

Re: [libxml-devel] xml2-config?

2008-12-13 Thread Charlie Savage
Felipe Contreras wrote: 2008/12/13 Todd Fisher : I think it's best to check for both... something like this would be ideal if pkg_config('libxml-2.0') elsif find_executable('xml2-config') $CFLAGS << " #{`xml2-config --cflags`.strip}" $LIBS << " #{`xml2-config --libs`.strip}" elsif !have_libr

[libxml-devel] libxml 0.9.7 released

2008-12-12 Thread Charlie Savage
Hi everyone, I just pushed up a 0.9.7 release. Biggest change is revamp on the SAX handling and error handling. More specifically, include: * Added SAX2 support. SAX handlers now define two new callbacks, on_start_element_ns and on_end_element_ns methods. These new callbacks support name

Re: [libxml-devel] xml2-config?

2008-12-12 Thread Charlie Savage
David Helder wrote: It should just use the xml2-config that's in the path and the output just requires a chop: > xml2-config --cflags -I/opt/local/include/libxml2 > xml2-config --libs -L/opt/local/lib -lxml2 -lz -lpthread -liconv -lm I don't know mkmf that well, That makes two of us. but

Re: [libxml-devel] incorrect source code for Solaris native C

2008-12-12 Thread Charlie Savage
Hi Matthias, I ran into the same problem. Do you have any ETA when the patch will be released? Fix is checked in, will be in next release. Thanks for the report. Charlie smime.p7s Description: S/MIME Cryptographic Signature ___ libxml-devel mailin

Re: [libxml-devel] get string position of element

2008-12-12 Thread Charlie Savage
. What's the problem you are trying to solve that requires knowing the string position - maybe there is a different approach? Charlie -- Charlie Savage http://cfis.savagexi.com smime.p7s Description: S/MIME Cryptographic Signature ___ libxml-devel

Re: [libxml-devel] xml2-config?

2008-12-11 Thread Charlie Savage
Hi David, Would it be possible to use xml2-config in extconf.rb? I see there's a --with-xml2-dir option, but xml2-config already provides LIBS and CFLAGS values. That's an interesting idea. Two issues come to mind: * Finding xml2-config * Parsing its output Second should be easy, maybe th

Re: [libxml-devel] incorrect source code for Solaris native C

2008-12-11 Thread Charlie Savage
Matthias Marschall wrote: ok, found a way to installed a patched version. Just for the records: I had to manually install: SUNWgnu-libiconv (not installed by default in a zone) ln -s /usr/gnu/lib/libiconv.so.2 /usr/lib/libiconv.so.2 (needed as / usr/gnu/lib is not in libary load path) downlo

Re: [libxml-devel] incorrect source code for Solaris native C

2008-12-11 Thread Charlie Savage
Matthias Marschall wrote: Hi Charlie, I ran into the same problem. Do you have any ETA when the patch will be released? I was planning on doing this weekend - have a couple things need to finish up for tomorrow work wise. In the meantime: I'm struggling to patch it myself and install it.

Re: [libxml-devel] incorrect source code for Solaris native C

2008-12-08 Thread Charlie Savage
Hi Marek, > attached is 'diff -u old new' , its ugly hack but it made it work for > me. Great. So no \ and new lines. Amazing that's the only one. Will fix. Charlie Charlie Savage wrote: Hi Marek, libxml-ruby-0.9.6/ext/libxml/sax_parser_callbacks.inc lines

Re: [libxml-devel] incorrect source code for Solaris native C

2008-12-08 Thread Charlie Savage
Hi Marek, libxml-ruby-0.9.6/ext/libxml/sax_parser_callbacks.inc lines 139 through 157 need cleaning up for Solaris native C preprocessor, the relaxed programming attitude with GNU C makes life hell for cross-compiling and porting. for preprocessor the macro should stay without '\' and linebrea

Re: [libxml-devel] Heading towards a 1.0 release - testing requested

2008-12-08 Thread Charlie Savage
Hi Paul, Before 1.0 I think there is one item that needs a serious overhaul. Right now the default error handler is VERBOSE_HANDLER which just writes out error messages to STDERR. This makes it difficult to trap errors since I don't think it's always clear from the return value of method what

Re: [libxml-devel] Trying to parse a soap envelope.

2008-12-08 Thread Charlie Savage
Hi Tim, I finally got it going. Here were the issues I had to deal with, I hope this helps somebody. Thanks for posting your experiences. find_first returns a node object and find returns a xpath object. They are not the same (obviously). Right. I updated the Rdocs to make that a bit mo

[libxml-devel] Heading towards a 1.0 release - testing requested

2008-12-07 Thread Charlie Savage
grade to the latest 0.9.6 release and report back to the Ruby forge tracker (http://rubyforge.org/tracker/?group_id=494) any issues they run into? And thanks to everyone for reporting issues over the last month. Charlie -- Charlie Savage http://cfis.savagexi.com smime.p7s Description: S

Re: [libxml-devel] [PATCH] Support for Ruby 1.9

2008-12-04 Thread Charlie Savage
Hi Felipe, Ok, I've put it in the trac. Can you apply it now? http://rubyforge.org/tracker/index.php?func=detail&aid=23111&group_id=494&atid=1973 Will do. Sorry, I had forgotten about this... -- Charlie Savage http://cfis.savagexi.com smime.p7s Description: S/MIME Crypto

Re: [libxml-devel] Trying to parse a soap envelope.

2008-12-02 Thread Charlie Savage
then it looks like you've found a bug. So the usual questions. What version of libxml-ruby, libxml, what OS, etc? Charlie -- Charlie Savage http://cfis.savagexi.com smime.p7s Description: S/MIME Cryptographic Signature ___ libxml-devel mailing l

Re: [libxml-devel] Trying to parse a soap envelope.

2008-12-01 Thread Charlie Savage
Hi Tim, The easiest way is like this: data = <<-EOS <> EOS doc = XML::Document.string(data) nodes = doc.find('//ez:GetLatestSchedulesExResponse', 'ez' => 'http://www.ezitracker.com/eziTrackerData/') puts nodes.length nodes.each do |node| puts node end Since GetLatestSchedu

Re: [libxml-devel] [PATCH] Support for Ruby 1.9

2008-11-27 Thread Charlie Savage
Hi Felipe, Basically $SUBJECT. I tested this with Ruby 1.9.1-preview1. Applied except this part: -st_foreach(RHASH(nslist)->tbl, iterate_ns_hash, self); +st_foreach(RHASH_TBL(nslist), iterate_ns_hash, self); RHASH_TBL doesn't exist in Ruby 1.8.6 as far as I can see. Thanks for the p

Re: [libxml-devel] [PATCH] Support for Ruby 1.9

2008-11-24 Thread Charlie Savage
Thanks Felipe, Basically $SUBJECT. I tested this with Ruby 1.9.1-preview1. Patch looks mostly good to me. One question though, where is RB_CVAR_SET_4ARGS defined? Is this a Ruby 1.8 thing or 1.9? Charlie smime.p7s Description: S/MIME Cryptographic Signature _

Re: [libxml-devel] [ANN] nokogiri 1.0.0 Released

2008-11-19 Thread Charlie Savage
I prefer the separate project solution. I'm not sure what bits of our code overlaps. I think our underlying C bits are too different. I'm all for sharing, but I like the project I have set up now. Sure, no problem. When I get a chance I'll take a closer look at Nokogiri and see what you gu

Re: [libxml-devel] updated XML benchmarks

2008-11-19 Thread Charlie Savage
Hi Stephan, I've updated my simple ruby xml benchmark which measures the time to open a 98k XML document and count one type of leaf element (466 entries) 100 times. https://svn.concord.org/svn/projects/trunk/common/ruby/xml_benchmarks/ The summary is that for this one test using libxml in

[libxml-devel] Fancy new documentation

2008-11-19 Thread Charlie Savage
ly patches. Charlie -- Charlie Savage http://cfis.savagexi.com smime.p7s Description: S/MIME Cryptographic Signature ___ libxml-devel mailing list libxml-devel@rubyforge.org http://rubyforge.org/mailman/listinfo/libxml-devel

Re: [libxml-devel] XML Schema validation of multiple namespaces in a document

2008-11-19 Thread Charlie Savage
Hi avatar382, I'll ask the question in one sentence first, and then I'll explain what I am trying to do. Does libxml-ruby provide a way to validate a document against multiple XML Schemas such that any XML in different namespaces, with other XML Schemas mapped to the namespaces in an xsi:schema

Re: [libxml-devel] [ANN] nokogiri 1.0.0 Released

2008-11-19 Thread Charlie Savage
py to add you guys in as developers to libxml-ruby (so you don't have to wait around for me to do stuff). Let me know what you think! Charlie Savage http://cfis.savagexi.com smime.p7s Description: S/MIME Cryptographic Signature ___ libxml-devel ma

  1   2   3   >