From isak.hansen at gmail.com Tue Apr 1 06:15:06 2008 From: isak.hansen at gmail.com (Isak Hansen) Date: Tue, 1 Apr 2008 12:15:06 +0200 Subject: [libxml-devel] Creating a node with multiple name spaces Message-ID: <6b9e1eb20804010315x21f7c66buadf9436244e170df@mail.gmail.com> I'm having trouble defining multiple name spaces for a node, e.g.: [...] I have the following code, which adds a default name space, but can't figure out from the api docs how to create additional prefixed name spaces: require 'rubygems' require 'xml/libxml' doc = XML::Document.new doc.root = XML::Node.new('Invoice') root = doc.root root.namespace = 'urn:oasis:names:specification:ubl:schema:xsd:Invoice-2' # TODO; add prefixed name spaces to root: # xmlns:udt="urn:un:unece:uncefact:data:draft:UnqualifiedDataTypesSchemaModule:2" # xmlns:qdt="urn:oasis:names:specification:ubl:schema:xsd:QualifiedDatatypes-2" # print document puts doc.to_s I could parse a dummy xml document and use that as a skeleton, but would like to build it using a dom-ish approach if possible. Just adding "xmlns:udt" and "xmlns:qdt" as attributes to root doesn't seem to do the proper thing. Someone able to lend a hand? Regards, Isak From noreply at rubyforge.org Tue Apr 1 17:54:30 2008 From: noreply at rubyforge.org (noreply at rubyforge.org) Date: Tue, 1 Apr 2008 17:54:30 -0400 (EDT) Subject: [libxml-devel] [ libxml-Bugs-19242 ] xpath causes GC crash Message-ID: <20080401215430.D0E9918586E7@rubyforge.org> Bugs item #19242, was opened at 2008-04-01 17:54 You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=1971&aid=19242&group_id=494 Category: memory Group: None Status: Open Resolution: None Priority: 3 Submitted By: Nobody (None) Assigned to: Nobody (None) Summary: xpath causes GC crash Initial Comment: Well, I debugged this one, but I don't know how to fix it right. The problem is this: in order to free an xpath object, the nodes it references need to be available. But ruby will happily free the document before freeing the xpath objects. I think some kind of refcount might work, where the last xpath object calls xmlFreeDoc... ---------------------------------------------------------------------- You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=1971&aid=19242&group_id=494 From noreply at rubyforge.org Wed Apr 2 00:14:19 2008 From: noreply at rubyforge.org (noreply at rubyforge.org) Date: Wed, 2 Apr 2008 00:14:19 -0400 (EDT) Subject: [libxml-devel] [ libxml-Bugs-19242 ] xpath causes GC crash Message-ID: <20080402041419.F30DF18585F7@rubyforge.org> Bugs item #19242, was opened at 2008-04-01 17:54 You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=1971&aid=19242&group_id=494 Category: memory Group: None Status: Open Resolution: None Priority: 3 Submitted By: Nobody (None) Assigned to: Nobody (None) Summary: xpath causes GC crash Initial Comment: Well, I debugged this one, but I don't know how to fix it right. The problem is this: in order to free an xpath object, the nodes it references need to be available. But ruby will happily free the document before freeing the xpath objects. I think some kind of refcount might work, where the last xpath object calls xmlFreeDoc... ---------------------------------------------------------------------- Comment By: Joe Khoobyar (walltndr) Date: 2008-04-02 00:14 Message: I have a patch for this that is working fine on both OS X (Leopard) and 64-bit Linux. See patch #1952 ---------------------------------------------------------------------- You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=1971&aid=19242&group_id=494 From noreply at rubyforge.org Wed Apr 2 00:16:52 2008 From: noreply at rubyforge.org (noreply at rubyforge.org) Date: Wed, 2 Apr 2008 00:16:52 -0400 (EDT) Subject: [libxml-devel] [ libxml-Bugs-19242 ] xpath causes GC crash Message-ID: <20080402041652.76F2218585F7@rubyforge.org> Bugs item #19242, was opened at 2008-04-01 17:54 You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=1971&aid=19242&group_id=494 Category: memory Group: None Status: Open Resolution: None Priority: 3 Submitted By: Nobody (None) Assigned to: Nobody (None) Summary: xpath causes GC crash Initial Comment: Well, I debugged this one, but I don't know how to fix it right. The problem is this: in order to free an xpath object, the nodes it references need to be available. But ruby will happily free the document before freeing the xpath objects. I think some kind of refcount might work, where the last xpath object calls xmlFreeDoc... ---------------------------------------------------------------------- Comment By: Joe Khoobyar (walltndr) Date: 2008-04-02 00:16 Message: Oops. :) I meant patch #19252 ---------------------------------------------------------------------- Comment By: Joe Khoobyar (walltndr) Date: 2008-04-02 00:14 Message: I have a patch for this that is working fine on both OS X (Leopard) and 64-bit Linux. See patch #1952 ---------------------------------------------------------------------- You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=1971&aid=19242&group_id=494 From noreply at rubyforge.org Wed Apr 2 02:32:16 2008 From: noreply at rubyforge.org (noreply at rubyforge.org) Date: Wed, 2 Apr 2008 02:32:16 -0400 (EDT) Subject: [libxml-devel] [ libxml-Bugs-19258 ] Attribute nodes can be freed() twice. Message-ID: <20080402063216.E045F185869B@rubyforge.org> Bugs item #19258, was opened at 2008-04-02 02:32 You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=1971&aid=19258&group_id=494 Category: None Group: None Status: Open Resolution: None Priority: 3 Submitted By: Joe Khoobyar (walltndr) Assigned to: Nobody (None) Summary: Attribute nodes can be freed() twice. Initial Comment: If an attribute node is already wrapped, and then is removed from the parent (i.e., by setting it to nil via the []= method), it will eventually get freed twice. This is because xmlRemoveProp() always frees the node memory. In these cases xmlUnlinkNode() must be called instead. See patch 19256 for details, and the addition of a remove! method to XML::Attr ---------------------------------------------------------------------- You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=1971&aid=19258&group_id=494 From noreply at rubyforge.org Wed Apr 2 02:33:43 2008 From: noreply at rubyforge.org (noreply at rubyforge.org) Date: Wed, 2 Apr 2008 02:33:43 -0400 (EDT) Subject: [libxml-devel] [ libxml-Bugs-19259 ] Calling remove! on a node causes memory leaks. Message-ID: <20080402063343.42C951858664@rubyforge.org> Bugs item #19259, was opened at 2008-04-02 02:33 You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=1971&aid=19259&group_id=494 Category: None Group: None Status: Open Resolution: None Priority: 3 Submitted By: Joe Khoobyar (walltndr) Assigned to: Nobody (None) Summary: Calling remove! on a node causes memory leaks. Initial Comment: Nodes w/o a parent (i.e., due to calling remove!) will never be garbage collected because of a (typo?) mistaken && instead of || when checking the parent and the doc for NULL. Calling remove! never sets the doc to NULL. In fact, you'd be hard pressed to find anywhere in libxml2 or libxml-ruby where the doc pointer is explicitly set to NULL. See patch #19257 for the easy solution. ---------------------------------------------------------------------- You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=1971&aid=19259&group_id=494 From transfire at gmail.com Wed Apr 2 12:18:00 2008 From: transfire at gmail.com (Trans) Date: Wed, 2 Apr 2008 09:18:00 -0700 (PDT) Subject: [libxml-devel] [ libxml-Bugs-19022 ] 0.5.3 Gem fails on Macintosh with "LoadError: no such file to load -- libxml_so" In-Reply-To: <20080321230319.E46DB18586B3@rubyforge.org> References: <20080321230319.E46DB18586B3@rubyforge.org> Message-ID: <0a219628-d9c8-4218-b6fa-b5781c447ff3@c65g2000hsa.googlegroups.com> On Mar 21, 7:03 pm, wrote: > Bugs item #19022, was opened at 2008-03-21 16:03 > You can respond by visiting:http://rubyforge.org/tracker/?func=detail&atid=1971&aid=19022&group_i... > > Category: General > Group: v0.5 > Status: Open > Resolution: None > Priority: 3 > Submitted By: Paul Legato (plegato) > Assigned to: Nobody (None) > Summary: 0.5.3 Gem fails on Macintosh with "LoadError: no such file to load -- libxml_so" > > Initial Comment: > Attempting to load gem version 0.5.3 fails on my Mac with the following: > > LoadError: no such file to load -- libxml_so > from /opt/local/lib/ruby/vendor_ruby/1.8/rubygems/custom_require.rb:27:in `gem_original_require' > from /opt/local/lib/ruby/vendor_ruby/1.8/rubygems/custom_require.rb:27:in `require' > from /opt/local/lib/ruby/gems/1.8/gems/libxml-ruby-0.5.3/lib/libxml.rb:4 > from /opt/local/lib/ruby/vendor_ruby/1.8/rubygems/custom_require.rb:32:in `gem_original_require' > from /opt/local/lib/ruby/vendor_ruby/1.8/rubygems/custom_require.rb:32:in `require' > from /opt/local/lib/ruby/gems/1.8/gems/libxml-ruby-0.5.3/lib/xml/libxml.rb:4 > > (Mac OS doesn't use .so files.) Hi Paul, The file ought not be a .so actually, it's just named libxml_so. {dlext} (note the underscore) to differentiate it from the ruby file libxml.rb. I guess we should change the name to avoid confusion. Maybe libxmlc. Since I don't have a Mac, would you mind working with me to resolve this issue? T. From rubys at intertwingly.net Wed Apr 2 19:45:28 2008 From: rubys at intertwingly.net (Sam Ruby) Date: Wed, 02 Apr 2008 19:45:28 -0400 Subject: [libxml-devel] libxml2 on Ruby 1.9 In-Reply-To: References: <479F7792.20406@intertwingly.net> <378860ba-408c-4434-9485-28c4f12c98cf@v4g2000hsf.googlegroups.com> <47A1E593.4030109@intertwingly.net> <47A1E5FB.90807@intertwingly.net> <1AE830AB-2974-4FE5-87A3-819E93E9A0B2@3skel.com> <47A1ED3D.1080405@intertwingly.net> <47ADE85D.80503@intertwingly.net> Message-ID: <47F41A98.1070104@intertwingly.net> Dan Janowski wrote: > Have not yet. Looking for time. I appreciate your checking. Me again. :-) No pressure, but in July I hope to be telling a largish audience that they can expect libxml2 to work with Ruby 1.9: http://en.oreilly.com/oscon2008/public/schedule/detail/2969 - Sam Ruby > Dan > > On Feb 9, 2008, at 12:52, Sam Ruby wrote: > >> Sam Ruby wrote: >>> Dan Janowski wrote: >>>> Hi Sam, >>>> >>>> Thank you for tracking these changes. In the interest of tracking >>>> all >>>> changes so they may be properly applied, please submit this to the >>>> patch tracker at this location: >>>> >>>> http://rubyforge.org/tracker/?func=add&group_id=494&atid=1973 >>>> >>>> Dan >>> Done: >>> >>> http://rubyforge.org/tracker/index.php?func=detail&aid=17666&group_id=494&atid=1973 >> Has anybody had a chance to look into this? Is there any more >> information I need to provide? >> >> - Sam Ruby >> _______________________________________________ >> libxml-devel mailing list >> libxml-devel at rubyforge.org >> http://rubyforge.org/mailman/listinfo/libxml-devel > > _______________________________________________ > libxml-devel mailing list > libxml-devel at rubyforge.org > http://rubyforge.org/mailman/listinfo/libxml-devel > > From transfire at gmail.com Sun Apr 6 18:51:40 2008 From: transfire at gmail.com (Trans) Date: Sun, 6 Apr 2008 15:51:40 -0700 (PDT) Subject: [libxml-devel] Some changes for consideration Message-ID: <58e854fd-522d-474f-a5d2-247440b276e7@s50g2000hsb.googlegroups.com> Hi, I'm going to make a new release with the minor fixes I mentioned earlier. I would also like us to consider these changes: 1) Rename 'libxml_so' to 'libxmlc'. 2) Rename the package from 'libxml-ruby' to 'libxml'. Any objections to moving forward with these? Also I would like to ask about the namespace we are using. It seems to me rather overbearing to be using the whole of the XML:: namespace. Wouldn't it be more appropriate ise LibXML:: ? I realize it would be a major interface change, but it seems like the right thing to do. And if we do go ahead with changing the package name, maybe it's a good time to make this transition too. T. From saurabhnanda at gmail.com Mon Apr 7 02:08:07 2008 From: saurabhnanda at gmail.com (Saurabh Nanda) Date: Mon, 7 Apr 2008 11:38:07 +0530 Subject: [libxml-devel] Some changes for consideration In-Reply-To: <58e854fd-522d-474f-a5d2-247440b276e7@s50g2000hsb.googlegroups.com> References: <58e854fd-522d-474f-a5d2-247440b276e7@s50g2000hsb.googlegroups.com> Message-ID: <794f042d0804062308r50643151w9c2dbcc9ac69f106@mail.gmail.com> > 2) Rename the package from 'libxml-ruby' to 'libxml'. Why would you want to do that? Isn't having the -ruby suffix a good thing? Saurabh. -- http://nandz.blogspot.com http://foodieforlife.blogspot.com From noreply at rubyforge.org Sun Apr 6 18:38:32 2008 From: noreply at rubyforge.org (noreply at rubyforge.org) Date: Sun, 6 Apr 2008 18:38:32 -0400 (EDT) Subject: [libxml-devel] [ libxml-Bugs-19022 ] 0.5.3 Gem fails on Macintosh with "LoadError: no such file to load -- libxml_so" Message-ID: <20080406223832.54D12185862E@rubyforge.org> Bugs item #19022, was opened at 2008-03-21 18:03 You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=1971&aid=19022&group_id=494 Category: General Group: v0.5 Status: Open Resolution: None Priority: 3 Submitted By: Paul Legato (plegato) Assigned to: Nobody (None) >Summary: 0.5.3 Gem fails on Macintosh with "LoadError: no such file to load -- libxml_so" Initial Comment: Attempting to load gem version 0.5.3 fails on my Mac with the following: LoadError: no such file to load -- libxml_so from /opt/local/lib/ruby/vendor_ruby/1.8/rubygems/custom_require.rb:27:in `gem_original_require' from /opt/local/lib/ruby/vendor_ruby/1.8/rubygems/custom_require.rb:27:in `require' from /opt/local/lib/ruby/gems/1.8/gems/libxml-ruby-0.5.3/lib/libxml.rb:4 from /opt/local/lib/ruby/vendor_ruby/1.8/rubygems/custom_require.rb:32:in `gem_original_require' from /opt/local/lib/ruby/vendor_ruby/1.8/rubygems/custom_require.rb:32:in `require' from /opt/local/lib/ruby/gems/1.8/gems/libxml-ruby-0.5.3/lib/xml/libxml.rb:4 (Mac OS doesn't use .so files.) It works fine if I uninstall the 0.5.3 gem and force-revert to 0.5.2.0. ---------------------------------------------------------------------- >Comment By: 7rans (transami) Date: 2008-04-06 17:38 Message: Please see the mailing list: http://groups.google.com/group/libxml-devel/browse_thread/thread/9c1b4b2dfb2c83e9?hl=en# ---------------------------------------------------------------------- You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=1971&aid=19022&group_id=494 From danj at 3skel.com Mon Apr 7 14:01:05 2008 From: danj at 3skel.com (Dan Janowski) Date: Mon, 7 Apr 2008 14:01:05 -0400 Subject: [libxml-devel] Some changes for consideration In-Reply-To: <58e854fd-522d-474f-a5d2-247440b276e7@s50g2000hsb.googlegroups.com> References: <58e854fd-522d-474f-a5d2-247440b276e7@s50g2000hsb.googlegroups.com> Message-ID: <20080407140105.6a88aaf8@Nokia-N810-51-3> On Sun, 6 Apr 2008 15:51:40 -0700 (PDT) Trans wrote: > Hi, > > I'm going to make a new release with the minor fixes I mentioned > earlier. > > I would also like us to consider these changes: > > 1) Rename 'libxml_so' to 'libxmlc'. > > 2) Rename the package from 'libxml-ruby' to 'libxml'. > > Any objections to moving forward with these? > > Also I would like to ask about the namespace we are using. It seems to > me rather overbearing to be using the whole of the XML:: namespace. > Wouldn't it be more appropriate ise LibXML:: ? I realize it would be > a major interface change, but it seems like the right thing to do. And > if we do go ahead with changing the package name, maybe it's a good > time to make this transition too. > > T. > _______________________________________________ > libxml-devel mailing list > libxml-devel at rubyforge.org > http://rubyforge.org/mailman/listinfo/libxml-devel renaming libxml_so to libxmlc serves some purpose in eliminating confusion. The simplification of removing the really redundant -ruby is excellent. Of course it will break continuity with the gem history. Should we be using the 2 in libxml2 to mirror the tie more literally? As for the XML namespace, that can be done easily and compatibly by offering an include that equates the XML const with the LibXML const. We can also fix the location of version consts as well. Dan From transfire at gmail.com Mon Apr 7 14:07:40 2008 From: transfire at gmail.com (Trans) Date: Mon, 7 Apr 2008 11:07:40 -0700 (PDT) Subject: [libxml-devel] Some changes for consideration In-Reply-To: <794f042d0804062308r50643151w9c2dbcc9ac69f106@mail.gmail.com> References: <58e854fd-522d-474f-a5d2-247440b276e7@s50g2000hsb.googlegroups.com> <794f042d0804062308r50643151w9c2dbcc9ac69f106@mail.gmail.com> Message-ID: <4351c234-ba86-4a52-81d6-890a53fdd88e@b1g2000hsg.googlegroups.com> Hi-- On Apr 7, 2:08 am, "Saurabh Nanda" wrote: > > 2) Rename the package from 'libxml-ruby' to 'libxml'. > > Why would you want to do that? Isn't having the -ruby suffix a good thing? I can understand why one would think so. But it's not necessary because it is a "Ruby World" library. Ruby libs are installed into ruby-specific location(s), so no naming issues arise. Package maintainers for various distributions will add a "ruby" as needed according to their own practices (eg. Debian). We do not need to do so ourselves. Simple case in point, just consider all the other Ruby packages out there, they do not suffix their package names with "- ruby" either. On the "why we should" front... For Ruby projects, the general/good practice is to name the package, the site location and the toplevel namespace all the same thing. I believe in this practice, and that it should only be deviated from under special circumstance. Currently all three differ for us: libxml-ruby.gem require 'libxml' XML:: The "proper" names would be: libxml.gem require 'libxml' LibXML:: And I would like to see us follow this practice. T. From keith at oreilly.com Mon Apr 7 15:09:58 2008 From: keith at oreilly.com (Keith Fahlgren) Date: Mon, 07 Apr 2008 12:09:58 -0700 Subject: [libxml-devel] Some changes for consideration In-Reply-To: <4351c234-ba86-4a52-81d6-890a53fdd88e@b1g2000hsg.googlegroups.com> References: <58e854fd-522d-474f-a5d2-247440b276e7@s50g2000hsb.googlegroups.com> <794f042d0804062308r50643151w9c2dbcc9ac69f106@mail.gmail.com> <4351c234-ba86-4a52-81d6-890a53fdd88e@b1g2000hsg.googlegroups.com> Message-ID: <47FA7186.5060602@oreilly.com> On 4/7/08 11:07 AM, Trans wrote: > The "proper" names would be: > > libxml.gem > require 'libxml' > LibXML:: > > And I would like to see us follow this practice. +1 Keith From deckard1 at gmail.com Mon Apr 7 15:27:48 2008 From: deckard1 at gmail.com (Ben Lam) Date: Mon, 7 Apr 2008 21:27:48 +0200 Subject: [libxml-devel] Some changes for consideration In-Reply-To: <47FA7186.5060602@oreilly.com> References: <58e854fd-522d-474f-a5d2-247440b276e7@s50g2000hsb.googlegroups.com> <794f042d0804062308r50643151w9c2dbcc9ac69f106@mail.gmail.com> <4351c234-ba86-4a52-81d6-890a53fdd88e@b1g2000hsg.googlegroups.com> <47FA7186.5060602@oreilly.com> Message-ID: <6be2e9980804071227s4988d1d7xce2004e7891fd4c5@mail.gmail.com> Having worked in the department of redundancy department, I'd say the proposed changes are solid. Ben On Mon, Apr 7, 2008 at 9:09 PM, Keith Fahlgren wrote: > On 4/7/08 11:07 AM, Trans wrote: > > > The "proper" names would be: > > > > libxml.gem > > require 'libxml' > > LibXML:: > > > > And I would like to see us follow this practice. > > +1 > > Keith > > > _______________________________________________ > libxml-devel mailing list > libxml-devel at rubyforge.org > http://rubyforge.org/mailman/listinfo/libxml-devel > -- http://zbookclub.com http://zmovieclub.com From nolan at thewordnerd.info Tue Apr 15 17:01:54 2008 From: nolan at thewordnerd.info (Nolan Darilek) Date: Tue, 15 Apr 2008 16:01:54 -0500 Subject: [libxml-devel] Counting bytes parsed with SAX Message-ID: Hello, apologies if this is documented somewhere and I'm just not finding it. Could be a matter of me just not knowing relevant terminology to grep for. I'm using a library that's parsing XML using the SAX stream parser. I'm trying to incorporate some sort of parsing progress bar into my application, meaning that unless I'm missing something, it is essential to know how many bytes the stream parser has processed in all events. In looking at both the library and the libxml SAX stream parser, though, I'm not seeing any way of getting at how many bytes have been parsed. Most ideal would be a general-purpose callback called whenever any valid chunk of XML is parsed, with some means of getting at the amount of data processed. Less ideal but still valid would be some means of getting at the raw data that generated any given event so I can increment some sort of internal counter on the callback. Does anything like this currently exist in either the bindings or libxml itself? If the latter and not the former, how difficult would it be to add this to the bindings? Failing that, is there some other means of implementing this sort of functionality? One suggestion was to handle progress based on objects in the file, not bytes parsed. Not sure I like this as much, as it both introduces a second pass to the processing and doesn't seem as precise. Thanks a bunch. From noreply at rubyforge.org Wed Apr 16 14:06:51 2008 From: noreply at rubyforge.org (noreply at rubyforge.org) Date: Wed, 16 Apr 2008 14:06:51 -0400 (EDT) Subject: [libxml-devel] [ libxml-Bugs-19589 ] node.find_first() returns a node, but find() on the returned node searches parent node Message-ID: <20080416180651.99F1E1858629@rubyforge.org> Bugs item #19589, was opened at 2008-04-16 14:06 You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=1971&aid=19589&group_id=494 Category: General Group: v0.5 Status: Open Resolution: None Priority: 3 Submitted By: Jamie Orchard-Hays (jamieorc) Assigned to: Nobody (None) Summary: node.find_first() returns a node, but find() on the returned node searches parent node Initial Comment: Here's an example: meta = root.find_first('//meta') correct_hits = root.find('//meta//hit') => yields just the meta hit too_many_hits = meta.find('//hit') => yields all 3 hits I expect meta.find() to search the context of the meta node, but it does not. here's the XML for the example a meta hit a non-meta hit another non-meta hit ---------------------------------------------------------------------- You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=1971&aid=19589&group_id=494 From noreply at rubyforge.org Wed Apr 16 19:06:13 2008 From: noreply at rubyforge.org (noreply at rubyforge.org) Date: Wed, 16 Apr 2008 19:06:13 -0400 (EDT) Subject: [libxml-devel] [ libxml-Bugs-19589 ] node.find_first() returns a node, but find() on the returned node searches parent node Message-ID: <20080416230614.19BAF18585BC@rubyforge.org> Bugs item #19589, was opened at 2008-04-16 14:06 You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=1971&aid=19589&group_id=494 Category: General Group: v0.5 Status: Open Resolution: None Priority: 3 Submitted By: Jamie Orchard-Hays (jamieorc) Assigned to: Nobody (None) Summary: node.find_first() returns a node, but find() on the returned node searches parent node Initial Comment: Here's an example: meta = root.find_first('//meta') correct_hits = root.find('//meta//hit') => yields just the meta hit too_many_hits = meta.find('//hit') => yields all 3 hits I expect meta.find() to search the context of the meta node, but it does not. here's the XML for the example a meta hit a non-meta hit another non-meta hit ---------------------------------------------------------------------- Comment By: Mark Thomas (markthomas) Date: 2008-04-16 19:06 Message: Not a bug. The XPath spec treats a *leading* // as an absolute path from the root. Try meta.find('.//hit') to see if it makes a difference. ---------------------------------------------------------------------- You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=1971&aid=19589&group_id=494 From noreply at rubyforge.org Sat Apr 19 12:42:49 2008 From: noreply at rubyforge.org (noreply at rubyforge.org) Date: Sat, 19 Apr 2008 12:42:49 -0400 (EDT) Subject: [libxml-devel] [ libxml-Bugs-19648 ] rake install DESTDIR fails Message-ID: <20080419164249.9B3961858695@rubyforge.org> Bugs item #19648, was opened at 2008-04-19 16:42 You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=1971&aid=19648&group_id=494 Category: None Group: None Status: Open Resolution: None Priority: 3 Submitted By: Benjamin Reed (rangerrick) Assigned to: Nobody (None) Summary: rake install DESTDIR fails Initial Comment: I'm the maintainer for libxml-ruby in Fink (http://www.finkproject.org/) -- I was trying to update it to the latest version and it is failing on rake install: Sin:libxml-ruby-0.5.4 root# rake install DESTDIR=/sw/src/fink.build/root-libxml2-rb18-0.5.4-1 --trace (in /sw/src/fink.build/libxml2-rb18-0.5.4-1/libxml-ruby-0.5.4) ** Invoke install (first_time) ** Execute install rake aborted! uninitialized constant Setup::Installer::RBCONFIG /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/rake.rb:2028:in `const_missing' /sw/src/fink.build/libxml2-rb18-0.5.4-1/libxml-ruby-0.5.4/setup.rb:864:in `dllext' /sw/src/fink.build/libxml2-rb18-0.5.4-1/libxml-ruby-0.5.4/setup.rb:856:in `rubyextentions' /sw/src/fink.build/libxml2-rb18-0.5.4-1/libxml-ruby-0.5.4/setup.rb:821:in `install_dir_ext' /sw/src/fink.build/libxml2-rb18-0.5.4-1/libxml-ruby-0.5.4/setup.rb:1021:in `__send__' /sw/src/fink.build/libxml2-rb18-0.5.4-1/libxml-ruby-0.5.4/setup.rb:1021:in `traverse' /sw/src/fink.build/libxml2-rb18-0.5.4-1/libxml-ruby-0.5.4/setup.rb:1038:in `dive_into' /sw/src/fink.build/libxml2-rb18-0.5.4-1/libxml-ruby-0.5.4/setup.rb:1019:in `traverse' /sw/src/fink.build/libxml2-rb18-0.5.4-1/libxml-ruby-0.5.4/setup.rb:1023:in `traverse' /sw/src/fink.build/libxml2-rb18-0.5.4-1/libxml-ruby-0.5.4/setup.rb:1022:in `each' /sw/src/fink.build/libxml2-rb18-0.5.4-1/libxml-ruby-0.5.4/setup.rb:1022:in `traverse' /sw/src/fink.build/libxml2-rb18-0.5.4-1/libxml-ruby-0.5.4/setup.rb:1038:in `dive_into' /sw/src/fink.build/libxml2-rb18-0.5.4-1/libxml-ruby-0.5.4/setup.rb:1019:in `traverse' /sw/src/fink.build/libxml2-rb18-0.5.4-1/libxml-ruby-0.5.4/setup.rb:1013:in `exec_task_traverse' /sw/src/fink.build/libxml2-rb18-0.5.4-1/libxml-ruby-0.5.4/setup.rb:1008:in `each' /sw/src/fink.build/libxml2-rb18-0.5.4-1/libxml-ruby-0.5.4/setup.rb:1008:in `exec_task_traverse' /sw/src/fink.build/libxml2-rb18-0.5.4-1/libxml-ruby-0.5.4/setup.rb:808:in `exec_install' /sw/src/fink.build/libxml2-rb18-0.5.4-1/libxml-ruby-0.5.4/setup.rb:457:in `rake_define' /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/rake.rb:392:in `call' /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/rake.rb:392:in `execute' /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/rake.rb:392:in `each' /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/rake.rb:392:in `execute' /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/rake.rb:362:in `invoke' /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/rake.rb:355:in `synchronize' /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/rake.rb:355:in `invoke' /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/rake.rb:1739:in `top_level' /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/rake.rb:1739:in `each' /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/rake.rb:1739:in `top_level' /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/rake.rb:1761:in `standard_exception_handling' /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/rake.rb:1733:in `top_level' /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/rake.rb:1711:in `run' /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/rake.rb:1761:in `standard_exception_handling' /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/rake.rb:1708:in `run' /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/gems/1.8/gems/rake-0.7.3/bin/rake:7 /usr/bin/rake:16:in `load' /usr/bin/rake:16 ---------------------------------------------------------------------- You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=1971&aid=19648&group_id=494 From abdulrahman at advany.com Wed Apr 23 13:14:58 2008 From: abdulrahman at advany.com (Abdul-Rahman Advany) Date: Wed, 23 Apr 2008 19:14:58 +0200 Subject: [libxml-devel] Can't seem to get node with xpath Message-ID: <54899e710804231014l6b64a64dje27bf6c1040d7550@mail.gmail.com> Hi guys, I am getting xml from jabber (send by twitter), and I am trying to parse it, but somehow it won't parse. http://pastie.caboo.se/185558 (code can be found here) I just keep seeing nil as output Greets, -- Abdul-Rahman Advany IM: abdulrahman at advany.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/libxml-devel/attachments/20080423/9d0e34f3/attachment.html From dwtwilight at gmail.com Tue Apr 22 06:06:13 2008 From: dwtwilight at gmail.com (dwTwiLighT a.k.a. dwCyMpaK) Date: Tue, 22 Apr 2008 16:06:13 +0600 Subject: [libxml-devel] Validating xml in a string Message-ID: Greetings. I want to check if xml received by my application (made with RoR and libxml-ruby) via POST request is well-formed. This is the source code of that part: p = XML::Parser.new p.string = params[:xml] if p.context.well_formed? doc = p.parse surely that is wrong, because I get the following message: "NoMethodError: undefined method `context' for #" I have no idea about what am I doing wrong and what should I do to make it work. Can you help me with this problem? From noreply at rubyforge.org Wed Apr 23 20:01:40 2008 From: noreply at rubyforge.org (noreply at rubyforge.org) Date: Wed, 23 Apr 2008 20:01:40 -0400 (EDT) Subject: [libxml-devel] [ libxml-Bugs-19738 ] malloc errors in libxml Message-ID: <20080424000140.A7378185864A@rubyforge.org> Bugs item #19738, was opened at 2008-04-23 20:01 You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=1971&aid=19738&group_id=494 Category: None Group: None Status: Open Resolution: None Priority: 3 Submitted By: Nobody (None) Assigned to: Nobody (None) Summary: malloc errors in libxml Initial Comment: I'm sure you folks already know about this, but I'm getting errors like this when using the current version of LibXML: ruby(309) malloc: *** error for object 0x4fcf30: incorrect checksum for freed object - object was probably modified after being freed, break at szone_error to debug ruby(309) malloc: *** set a breakpoint in szone_error to debug ruby(309) malloc: *** error for object 0x4bb5d0: incorrect checksum for freed object - object was probably modified after being freed, break at szone_error to debug ruby(309) malloc: *** set a breakpoint in szone_error to debug I have not noticed that this is causing any incorrect output, however... ---------------------------------------------------------------------- You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=1971&aid=19738&group_id=494 From chris at octopod.info Thu Apr 24 04:03:11 2008 From: chris at octopod.info (Chris McGrath) Date: Thu, 24 Apr 2008 09:03:11 +0100 Subject: [libxml-devel] Validating xml in a string In-Reply-To: References: Message-ID: I've been playing around with XML::Parser recently, and during my irbing I discovered you need to do p.parse before the context is created. Chris On 22 Apr 2008, at 11:06, dwTwiLighT a.k.a. dwCyMpaK wrote: > Greetings. > I want to check if xml received by my application (made with RoR and > libxml-ruby) via POST request is well-formed. > This is the source code of that part: > > p = XML::Parser.new > p.string = params[:xml] > if p.context.well_formed? > doc = p.parse > > surely that is wrong, because I get the following message: > "NoMethodError: undefined method `context' for # 0xb779c838>" > > I have no idea about what am I doing wrong and what should I do to > make it work. Can you help me with this problem? > _______________________________________________ > libxml-devel mailing list > libxml-devel at rubyforge.org > http://rubyforge.org/mailman/listinfo/libxml-devel From abdulrahman at advany.com Mon Apr 28 06:36:27 2008 From: abdulrahman at advany.com (Abdul-Rahman Advany) Date: Mon, 28 Apr 2008 12:36:27 +0200 Subject: [libxml-devel] Can't seem to get node with xpath In-Reply-To: <54899e710804231014l6b64a64dje27bf6c1040d7550@mail.gmail.com> References: <54899e710804231014l6b64a64dje27bf6c1040d7550@mail.gmail.com> Message-ID: <54899e710804280336o27ea65f9ha5861b6c19114eaf@mail.gmail.com> Anyone? On Wed, Apr 23, 2008 at 7:14 PM, Abdul-Rahman Advany wrote: > Hi guys, > > I am getting xml from jabber (send by twitter), and I am trying to parse > it, but somehow it won't parse. > > http://pastie.caboo.se/185558 (code can be found here) > > I just keep seeing nil as output > > Greets, > > -- > Abdul-Rahman Advany > > IM: abdulrahman at advany.com -- Abdul-Rahman Advany IM: abdulrahman at advany.com -------------- next part -------------- An HTML attachment was scrubbed... URL: