Bugs item #24833, was opened at 2009-03-24 16:54
You can respond by visiting: 
http://rubyforge.org/tracker/?func=detail&atid=1971&aid=24833&group_id=494

Category: General
Group: None
>Status: Closed
>Resolution: Accepted
Priority: 3
Submitted By: Nobody (None)
>Assigned to: Charlie Savage (cfis)
Summary: Docs for LibXML::XML::Document.validate_schema claim that it takes an 
optional block; it does not.

Initial Comment:
Summary is descriptigve; this is a bug in the docs.

----------------------------------------------------------------------

>Comment By: Charlie Savage (cfis)
Date: 2011-04-22 22:54

Message:
Thanks for the report.

Documentation has been updated:

* Removed reference to block
* Updated docs to say that on errors an exception is raised.  This is done to 
pass error information back to the client before it is lost.

Thanks - Charlie

----------------------------------------------------------------------

Comment By: Xavier Holt (xavierholt)
Date: 2010-04-08 01:33

Message:
Another vote for this bug!  I would be using the feature as we speak if only it 
worked (hopefully the fix will involve bringing the code around to match the 
documentation and not the other way around)...

I find that the documentation for LibXML::XML::Document.validate_schema is 
wrong in two places:

1) As noted by the original reporter, the "error handler" block passed is 
ignored.

2) The function is claimed to return true on a successful validation, and false 
if errors were found.  While it does return true on success, it raises the last 
error as an exception on failure (line 815 in my ruby_xml_document.c file) 
before returning false (line 816), rendering the return statement irrelevant.

Many thanks in advance to whoever fixes this!
 - XH

libxml-ruby    1.1.3
libxml2        2.7.6-1.fc12 (x86_64)
libxml2-devel  2.7.6-1.fc12 (x86_64)

----------------------------------------------------------------------

You can respond by visiting: 
http://rubyforge.org/tracker/?func=detail&atid=1971&aid=24833&group_id=494
_______________________________________________
libxml-devel mailing list
libxml-devel@rubyforge.org
http://rubyforge.org/mailman/listinfo/libxml-devel

Reply via email to