[Twisted-web] nevow's loaders.xmlfile returning XML
Abdul-Wahid Paterson
abdulwahid at gmail.com
Sat Jun 28 07:56:37 EDT 2008
>> I am a bit confused about loaders.xmlfile() method and what it is
>> donig to my XML templates. It seems to be HTMLifying my XML by doing
>> things like stripping the / out of <br />.
>
> Can you provide an example of this? That's not something xmlfile is
> supposed to do, nor something I've ever seen it do.
>
Actually, my mistake. It is not nevow doing this. It is firefox. When
I view source the /'s are there but when I save the source from file
save the /'s have disappeared. Strange.
Anyway, perhaps I am barking up the wrong tree. What I am trying to do
is put inline SVG into my XHTML. When I saved the source of the XHTML
I found there were XML errors. Some of those appear now to have been
introduced by firefox when I saved the source of the page.
However, there is something from nevow that I don't understand. I have
a template that says something like this at the top.
<html xmlns:nevow="http://nevow.com/ns/nevow/0.1">
<head>
<title>Firewall</title>
<link href="/css/main.css" type="text/css" rel="stylesheet" />
<script src="/js/core-functions.js" type="text/javascript"></script>
</head>
<body>
<div class="topbar">
<< CUT >>
The output XHTML is like this....
<html><head><title>Athuentication</title></head><body><html>
<head>
<title>Firewall</title>
<link href="/css/main.css" type="text/css" rel="stylesheet" />
<script src="/js/core-functions.js" type="text/javascript"></script>
</head>
<body>
<< CUT >>
Why it it putting the extra HTML tags in? How can I get the xmlns in
the <html> tag. Why is it putting <title> twice?
Bit confused about what this function is doing.
Thanks,
Abdul-Wahid
More information about the Twisted-web
mailing list