Re: [Xsltforms-support] Strange error in submission with method=get & replace=all
Brought to you by:
alain-couthures
From: Javier D. <jd...@ge...> - 2010-04-05 18:01:23
|
COUTHURES Alain escribió: > Hello Javier, >> I have an strange javascript error in firefox, when in a xml of >> xsltforms I am submitting using method=get and replace=all to a >> second xsltforms page. It seems to work ok, but the javascript error >> worries me. >> >> I have seen in >> http://www.agencexml.com/xforms-tests/testsuite/XForms1.1/Edition1/Chapt11/11.9/11.9.b.xhtml >> a test case that works exactly as my xmls, when pressing "Get Data" >> button, all seems to work ok, but in firefox error console I get: >> >> Error: mal formado >> Archivo de origen: >> http://www.agencexml.com/xforms-tests/xsltforms/echo.php?carOwner=Henry&make=Acura&color=White >> >> Línea: 17, columna: 33 >> Código fuente: >> QUERY_STRING=carOwner=Henry&make=Acura&color=White >> >> It seems all problems are related with characters as &, <, >, that >> makes the resulting xml bad formed, because when I get the resulting >> xml from this request and validate with an xml parser I get: >> >> >> $ xmllint --noout test.xml >> test.xml:17: parser error : EntityRef: expecting ';' >> QUERY_STRING=carOwner=Henry&make=Acura&color=White >> ^ >> test.xml:17: parser error : EntityRef: expecting ';' >> QUERY_STRING=carOwner=Henry&make=Acura&color=White >> ^ >> test.xml:19: parser error : EntityRef: expecting ';' >> REDIRECT_QUERY_STRING=carOwner=Henry&make=Acura&color=White >> ^ >> test.xml:19: parser error : EntityRef: expecting ';' >> REDIRECT_QUERY_STRING=carOwner=Henry&make=Acura&color=White >> ^ >> test.xml:29: parser error : EntityRef: expecting ';' >> REQUEST_URI=/xforms-tests/xsltforms/echo.php?carOwner=Henry&make=Acura&color=Whi >> >> ^ >> test.xml:29: parser error : EntityRef: expecting ';' >> REQUEST_URI=/xforms-tests/xsltforms/echo.php?carOwner=Henry&make=Acura&color=Whi >> >> >> The error is thrown in line 1910 os xsltforms.js, "req.send(null)", >> when getting the data to the browser with XMLHttpRequest. >> > Sorry, I can't reproduce this in my test environment but I have > detected a problem with FireFox about replace="all" when in XHTML mode. > > This is not fixed yet... XHTML mode is better for SVG rendering but > HTML mode is required for some other Javascript framework integration. > To switch mode, just modify xslt output method: "html" for HTML or > "xml" for XHTML. > > Did you test in XHTML ou in HTML mode ? I'm using r362, we will not update to last version for some weeks to avoid bugs of new features. In my xsl we have "html": <xsl:output method="html" encoding="iso-8859-1" omit-xml-declaration="no" indent="no" doctype-public="-//W3C//DTD XHTML 1.0 Transitional//EN" doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"/> > > Thanks! > > -Alain |