[XML-SIG] XBEL questions

A.M. Kuchling akuchlin@cnri.reston.va.us
Wed, 21 Apr 1999 22:28:50 -0400


Tim Lavoie writes:
 > I've just started tinkering with the XBEL package and its sample
 > scripts, converting from Netscape (4.5) to XBEL format. The script
 > needed tags converted to upper-case to recognize what Communicator had 
 > written, no big deal. What did puzzle me was the output; the DTD lists 
 > tags in lower case, but the bookmark.py script generated everything in 
 > upper case. Since XML is case-sensitive, isn't this wrong?

	How were you running it?  bookmark.py doesn't have a block of
code that runs if __name__ == '__main__', so you can't run bookmark.py
directly; you must have been running ns_parse.py, and that seems to
produce lower-case output as it should.  I also don't understand the
requirement for uppercase input, because in ns_parse.py the
startElement() and endElement() both convert the element name to
lowercase.  Can you provide the exact command you ran, and perhaps a
sample bookmark file as well? (Privately to me is fine.)

 > message pointing to the second "=" character. This character follows
 > the second parameter name, which as in all HTML is preceded by a "&"
 > character. Could the problem be that tag contents need to be encoded
 > first? The tag looks like:

	Good catch; one of the dump_xbel() methods should have read
escape(href) instead of just href.  I've fixed this in the CVS tree;
thanks!

-- 
A.M. Kuchling			http://starship.python.net/crew/amk/
Been there, Remiel. Done that, wore the tee-shirt, ate the burger, bought the
original cast album, choreographed the legions of the damned and orchestrated
the screaming...
    -- Lucifer, in SANDMAN #60: "The Kindly Ones:4"