Hi,
I'm trying to write a RESTful web service in Rails. Before processing
each POST request, I want to validate the XML against an XSD schema.
It does not make sense to re-read the schema each time a request is
processed. Therefore, I tried loading the schema once in a global
variable ($schema) at
I have a long running RESTful web service that needs to read XML
documents from HTTP content bodies. I've noticed lots of instances
where it has randomly crashed due to an error in libxml.
I came across the following post while digging for some clues:
http://rubyforge.org/pipermail/libxml-devel/2
> Do you have crashes that can break out of a begin block? What does that
> content
> look like?
I didn't quite understand your question. The code snippet in the
original posting is not placed inside a begin-rescue block. The
incoming XML can also be an illegal XML (something which doesn't
parse)
> Well, we might have different opinions on what libxml should do with bad input
> (I agree that segfaulting isn't very nice). That said, I can't imagine parsing
> bytes in the wild as "xml" and not doing a lot of error handling.
Will putting the code snippet in a begin-rescue block help? I'll do
No inputs from anyone on this? Any help would be appreciated.
Saurabh.
--
http://nandz.blogspot.com
http://foodieforlife.blogspot.com
___
libxml-devel mailing list
libxml-devel@rubyforge.org
http://rubyforge.org/mailman/listinfo/libxml-devel
Why does the following code always cause a segfault on the last
statement, when simply trying to refer to 'doc'? The answer to this
could probably give me some pointers to my previous queries.
require 'xml/libxml'
x=XML::Parser.string("something")
doc=x.parse
x.parse
puts '-- about to print refer
> Are you sure it is the doc reference and not the GC finalizers
> running? Put a print statement after it and see what happens.
Probably what you're saying is right. I don't fully understand what
effect the GC finalizers have, but I've tried the following script
(same script without the doc refer
> C sure is lovely, isn't it. I will try to reproduce this. If you would
> not mind, please post this as a bug so I can track it at:
>
> http://rubyforge.org/tracker/?atid=1971&group_id=494&func=browse
Done -
http://rubyforge.org/tracker/index.php?func=detail&aid=17885&group_id=494&atid=1971
Wer
Hi,
I've posted earlier about such crashes but have not been able to
resolve my problem. Using libxml validation is extremely critical for
my application. I might have to rewrite my XSDs as RelaxNG schemas and
use REXML for validation -- and take the accompanying performance hit.
I don't want to d
Trans,
Thanks for replying. Although your answer doesn't help solve my
problem with libxml-ruby it does give me a sense that it's going to
take long to get this fixed.
At least I can start rewriting my schemas in Relax NG now, so that I
can meet my application production rollout deadline.
Saurab
> 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
___
libxml-devel mailing list
libxml-devel@rubyf
I shifted out of libxml to the (much) slower REXML and an ad-hoc
over-the-network Java based XSD validation system. I would love to get
libxml-ruby working again. A lot of my projects will depend on it.
Dan, how can other people help? Is there someone who can coordinate
other people's efforts in t
12 matches
Mail list logo