Hi,

I am actually trying to generate a remote Mozilla XUL. The code is as simple as it gets but for some reason, I see a blank browser. Here is the code:

#####################
from WebKit.Page import Page
class HelloXUL(Page):
def __init__(self):
Page.__init__(self)
def writeDocType(self):
pass
def writeHead(self):
pass
def htBodyArgs(self):
pass
def writeHTML(self):
self.writeContent()
def sleep(self,transaction):
Page.sleep(self,transaction)
def writeContent(self):
self.writeln('''<?xml version="1.0"?>
<style type="application/vnd.mozilla.xul+xml">background: yellow</style>
<!DOCTYPE window>
<window
id = "remote"
xmlns = "http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul";
title = "Hello XUL" style = "min-width:640px; min-height:480px;">
<description value="Hello XUL!">
</window>
''')
#####################


I have added "application/vnd.mozilla.xul+xml" to mimetypes.py. As you can see, I had to override many methods to prevent HTML from being injected into the generated page. Here is the output I get:

#####################
<?xml version="1.0"?>
<style type="application/vnd.mozilla.xul+xml">background: yellow</style>
<!DOCTYPE window>
<window
id =" remote"
xmlns =" http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul";
title =" Hello XUL" style =" min-width:640px; min-height:480px;">
<description value="Hello XUL!">
</window>
#####################


I am basing this on a PHP based example at <http://books.mozdev.org/html/mozilla-chp-12-sect-4.html>. I suspect something is wrong with the style tag. I can display a remote XUL file fine if I do not have Webware involved, i.e. if I just put a .xul file in a directory that Apache can serve. In that case, I do not have to use the style tag to specify the mime type since the "xul" extension is a registered mime type for Apache. Has anyone ever managed to generate XUL with Webware? It looks like it should be quite doable. Another interesting piece of the puzzle may be MozPython <http://www.thomas-schilz.de/MozPython/>.

Regards,

Clifford Ilkay
Dinamis Corporation
3266 Yonge Street, Suite 1419
Toronto, Ontario
Canada M4N 3P6

Tel: 416-410-3326



-------------------------------------------------------
This SF.Net email sponsored by Black Hat Briefings & Training.
Attend Black Hat Briefings & Training, Las Vegas July 24-29 - digital self defense, top technical experts, no vendor pitches, unmatched networking opportunities. Visit www.blackhat.com
_______________________________________________
Webware-discuss mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/webware-discuss

Reply via email to