Re: [xml-bindings]Python bindings suggestions
- From: Daniel Veillard <veillard redhat com>
- To: Gary Benson <gary inauspicious org>
- Cc: xml-bindings gnome org
- Subject: Re: [xml-bindings]Python bindings suggestions
- Date: Tue, 5 Mar 2002 03:50:23 -0500
On Tue, Mar 05, 2002 at 01:56:34AM +0000, Gary Benson wrote:
>
> On Mon, 4 Mar 2002, Daniel Veillard wrote:
> Hmmm, I'd probably have to say no here. Probably the best thing to do
> would be to raise exceptions for errors (no ram, document not well formed,
> etc) and return an empty version of what you were expecting otherwise.
> For instance, xmlNode.prop() should return an empty string if the property
> is not present. Maybe.
Hum, actually this example ain't good. First string would not be in that
set, and second an empty string is a perfectly correct attribute value,
and returning None in case the attribute is not present is really the
right mapping.
> I expect you could debate this till the cows come home ;)
Yup,
> > "/photodb/film[ num=%s]" % film
> > would give
> > "/photodb/film[ num=022]"
> > and that may not work well, possibly
> > "/photodb/film[ num='%s']" % film
> > would give better results
>
> Ahhh. I've only used XPath in the context of XSL, and I think quotes get
> hidden from you there. That explains it, thanks :)
XPath is really not different from XSLT there, really the lack of
quoting would generate exactly the same effects. Well it should ...
Daniel
--
Daniel Veillard | Red Hat Network https://rhn.redhat.com/
veillard redhat com | libxml Gnome XML XSLT toolkit http://xmlsoft.org/
http://veillard.com/ | Rpmfind RPM search engine http://rpmfind.net/
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]