From: Alejandro Forero Cuervo (bachue@bachue.com)
Date: Tue Jan 23 2001 - 00:44:46 EST
I am not sure this is the valid place to report bugs and make
suggestions for libxml. If it isn't, I apologize for wasting your
time and kindly ask you to please let me know.
I have been working on a Gnome lightweight presentation program
(gRecVis) with a friend (Ugo Enrico Albarello) and we are using libxml
for persistency (we are currently using libxml, planning to move to
libxml2).
When we call xmlParseFile and pass a directory as the filename, libxml
opens the directory and attempts to read from it. We consider this a
bug and would rather have it notice it was told to read XML from a
directory and consider this an error.
We can make those checks right before calling xmlParseFile, but it
doesn't feel right: we believe it should be done inside
xmlParserInputBufferCreateFilename (or other appropiate functions in
libxml) and xmlFdOpen, xmlFileOpen and xmlGzfileOpen (or other
appropiate functions in libxml2).
Making those checks will be as simple as calling stat(2) on the
filename and using the S_ISDIR macro.
What do you guys think about this? Sure, if one attempts to open a
directory it's no big deal, all you get (at least in libxml) is a some
warnings and errors telling you how the directory isn't a valid XML
file. However, a message telling you that you tried to read XML from
a directory would be more intuitive. And we don't think there will
ever be a circunstance where a user will want to read XML from a
directory.
Where should we send patches with this simple changes so, if
considered worthy, they are incorporated into the next releases?
Thanks.
Alejo.
http://bachue.com/alejo
-- The mere formulation of a problem is far more essential than its solution. -- Albert Einstein.$0='!/sfldbi!yjoV0msfQ!sfiupob!utvK'x44;print map{("\e[7m \e[0m",chr ord (chop$0)-1)[$_].("\n")[++$i%77]}split//,unpack'B*',pack'H*',($F='F'x19). "F0F3E0607879CC1E0F0F339F3FF399C666733333CCF87F99E6133999999E67CFFCCF3". "219CC1CCC033E7E660198CCE4E66798303873CCE60F3387$F"#Don't you love Perl? ---- Message from the list xml@rpmfind.net Archived at : http://xmlsoft.org/messages/ to unsubscribe: echo "unsubscribe xml" | mail majordomo@rpmfind.net
This archive was generated by hypermail 2b29 : Tue Jan 23 2001 - 04:46:13 EST