Re: Can't fill in forms when parsing xml for second time
Martin Honnen <[email protected]>
| Newsgroups | gmane.comp.mozilla.devel.layout.xslt |
|---|---|
| Organization | Liberty Development |
| Message-ID | <[email protected]> |
Jim McNeill wrote:
> I'm having an odd error while trying to fill in a form in Firefox
> (Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.5)
> Gecko/20041107 Firefox/1.0). I'm producing some xml with a processing
> instruction using mod_python in Apache. The first time I fill in the
> form I have no problems. When I return it to the browser again
> however, I can't fill in the fields any more! (Needless to say it
> works fine in IE6).
>
> The xml is:
> <?xml version="1.0" ?>
> <?xml-stylesheet type="text/xsl" href="htpasswd.xsl"?>
> <response stage="thisstage"/>
>
> xsl is:
> <?xml version="1.0"?>
> <xsl:stylesheet version="1.1"
^^^
Why version 1.1 and not 1.0 for XSLT?
> xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
> <xsl:output method="html"
> version="1.0"
> encoding="utf-8"
> doctype-public="-//W3C//DTD XHTML 1.0 Strict//EN"
> doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"
> indent="yes"/>
Are you transforming with XSLT on the server or on the client?
I think if you want html output then you shouldn't use XHTML elements
with a namespace but HTML elements in no namespace e.g.
> <xsl:template match="/">
> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<html lang="en">
> <input type="hidden" id="stage" name="stage"><xsl:value-of
> select="/response/@stage" /></input>
What is that good for, don't you need
<input type="hidden" id="stage" name="stage"
value="{/response/@stage}" />
? An (X)HTML input element doesn't have any content.
It is not quite clear to me what you are doing and what goes wrong,
could you post a URL where the problem occurs?
I have tried an example here
<http://www34.brinkster.com/libertydevelop/db/test2005030302.xml>
that works flawlessly with Netscape 7.2/Mozilla 1.7, the XML is
transformed on the client to HTML and data submitted is added to the XML
by an ASP page which then redirects to the XML.
--
Martin Honnen
http://JavaScript.FAQTs.com/