Hello,
Did anyone already had this error message when displaying an XForms into the browser: "XML Parsing Error: duplicate attribute" Where the message comes from this double declaration on the HTML form element generated by Orbeon Forms: xmlns:_0="http://www.w3.org/1999/xhtml" xmlns="http://www.w3.org/1999/xhtml " What strikes me is that if I add the following lines (XForms inspector) just before </body>, everything works fine: <span class="inspector-widget-class"> <widget:xforms-instance-inspector xmlns:widget="http://orbeon.org/oxf/xml/widget "/> </span> Have you got any cue ? I put an example of a faulty test.xhtml file below, I tried with different XForms files and sometimes I got the error above, sometimes not... I must say also that I have this error with a epilogue-servlet.xpl slighlty modified by a colleague, however I hope somebody can explain me the origin of the " xmlns:_0" generated namespace, that could help me find the bug in the epilogue-servlet.xpl, Regards, Stéphane S. --- PS: here is a faulty file example <?xml version="1.0"?> <html xmlns="http://www.w3.org/1999/xhtml" xmlns:xf="http://www.w3.org/2002/xforms "> <head> <title>MD 2009 XForms examples</title> <model xmlns="http://www.w3.org/2002/xforms" id="order-model"> <instance> <doughnuts xmlns=""> <quantity/> </doughnuts> </instance> </model> </head> <body> <h1>Order Doughnuts</h1> <xf:input ref="quantity" incremental="true"> <xf:label>Quantity</xf:label> </xf:input> </body> </html> -- You receive this message as a subscriber of the [hidden email] mailing list. To unsubscribe: mailto:[hidden email] For general help: mailto:[hidden email]?subject=help OW2 mailing lists service home page: http://www.ow2.org/wws |
Strange,
I just copied your example and everything works fine... Am 13.05.2009 um 20:57 schrieb Stéphane S.: > Hello, > > Did anyone already had this error message when displaying an XForms > into the browser: > > "XML Parsing Error: duplicate attribute" > > Where the message comes from this double declaration on the HTML > form element generated by Orbeon Forms: > > xmlns:_0="http://www.w3.org/1999/xhtml" xmlns="http://www.w3.org/1999/xhtml > " > > What strikes me is that if I add the following lines (XForms > inspector) just before </body>, everything works fine: > > <span class="inspector-widget-class"> > <widget:xforms-instance-inspector xmlns:widget="http://orbeon.org/oxf/xml/widget > "/> > </span> > > Have you got any cue ? I put an example of a faulty test.xhtml file > below, I tried with different XForms files and sometimes I got the > error above, sometimes not... > > I must say also that I have this error with a epilogue-servlet.xpl > slighlty modified by a colleague, however I hope somebody can > explain me the origin of the " xmlns:_0" generated namespace, that > could help me find the bug in the epilogue-servlet.xpl, > > Regards, > > Stéphane S. > --- > > PS: here is a faulty file example > > <?xml version="1.0"?> > <html xmlns="http://www.w3.org/1999/xhtml" xmlns:xf="http://www.w3.org/2002/xforms > "> > <head> > <title>MD 2009 XForms examples</title> > <model xmlns="http://www.w3.org/2002/xforms" id="order-model"> > <instance> > <doughnuts xmlns=""> > <quantity/> > </doughnuts> > </instance> > </model> > </head> > <body> > <h1>Order Doughnuts</h1> > <xf:input ref="quantity" incremental="true"> > <xf:label>Quantity</xf:label> > </xf:input> > </body> > </html> > > > -- > You receive this message as a subscriber of the [hidden email] > mailing list. > To unsubscribe: mailto:[hidden email] > For general help: mailto:[hidden email]?subject=help > OW2 mailing lists service home page: http://www.ow2.org/wws -- You receive this message as a subscriber of the [hidden email] mailing list. To unsubscribe: mailto:[hidden email] For general help: mailto:[hidden email]?subject=help OW2 mailing lists service home page: http://www.ow2.org/wws |
On May 13, 2009, at 9:39 PM, MJ wrote:
> I just copied your example and everything works fine... Thanks for your help. Now I have dug the problem a bit and I know better what happens. It occurs that: 1/ I am using Orbeon 3.6.0 2/ My colleague had changed the file "config/epilogue-servlet.xpl", in particular the final rendering of the page uses the following path (he has uncommented it from the Orbeon 3.6.0 original epilogue-servlet.xpl): <!-- Use this choose block if you want to send XHTML to browsers that support it. --> <!-- BEGIN ASSUME SOME XHTML CLIENTS --> <p:choose href="#request"> <p:when test="contains(/request/headers/header[name = 'accept'], 'application/xhtml+xml')"> <p:processor name="oxf:qname-converter"> <p:input name="config"> <config> <match> <uri>http://www.w3.org/1999/ xhtml</uri> </match> <replace> <prefix></prefix> </replace> </config> </p:input> <p:input name="data" href="#rewritten-data"/> <p:output name="data" id="xhtml-data"/> </p:processor> <p:processor name="oxf:xml-converter"> <p:input name="config"> <config> <method>xhtml</method> <public-doctype>-//W3C//DTD XHTML 1.0 Transitional//EN</public-doctype> <system-doctype>http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd </system-doctype> <encoding>utf-8</encoding> <content-type>application/xhtml+xml</ content-type> <indent>false</indent> <indent-amount>0</indent-amount> </config> </p:input> <p:input name="data" href="#xhtml-data"/> <p:output name="data" id="converted"/> </p:processor> </p:when> I did check and this is the cause of the problem: when this path is called, the converted output is XHTML and it contains the double namespace declaration xmlns:_0="http://www.w3.org/1999/xhtml" xmlns="http://www.w3.org/1999/xhtml " ! If you comment it and use the standard path that generates some HTML output (as per default in Orbeon 3.6.0), then this is okay. Is anybody aware of a bug in Orbeon 3.6.0 in the XHTML output generation path that would explain why the standard 3.6.0 distribution has commented it out ? Is there a bug in the "oxf:qname-converter", by the way is this processor isn't documented at http://www.orbeon.com/ops/doc/processors-converters ? I didn't find anything in the known issues (http://tinyurl.com/kycl3) Thanks in advance, Stéphane S. --- PS: It seems that in Orbeon 3.7.0 these files are no longer in the config folder, but they are in jar file: jar -tvf .../apache-tomcat-6.0.18/webapps/orbeon37\ /WEB-INF/lib/ orbeon-resources-private.jar | grep epilogue 6581 Mon Aug 11 15:48:22 CEST 2008 config/epilogue-portlet.xpl 17747 Thu Aug 07 15:05:40 CEST 2008 config/epilogue-servlet.xpl 3807 Mon Aug 11 15:48:22 CEST 2008 config/epilogue.xpl 5000 Mon Aug 11 15:48:26 CEST 2008 ops/pfc/xforms-epilogue.xpl And it seems that the XHTML output path is also enabled (it is no longer commented and there is a property 'oxf.epilogue.output-xhtml' that seems to control its application), see this extract of "config/ epilogue-servlet.xpl" <!-- Choose between XHTML output and HTML output --> <p:choose href="#request"> <p:when test="p:property('oxf.epilogue.output-xhtml')"> <!-- Produce XHTML output --> <p:choose href="#request"> <p:when test="contains(/request/headers/ header[name = 'accept'], 'application/xhtml+xml')"> <p:processor name="oxf:qname-converter"> <p:input name="config"> -- You receive this message as a subscriber of the [hidden email] mailing list. To unsubscribe: mailto:[hidden email] For general help: mailto:[hidden email]?subject=help OW2 mailing lists service home page: http://www.ow2.org/wws |
Administrator
|
Stéphane,
I don't know about 3.6, but can you try with a recent nightly? As you noticed, with more recent builds XHTML output is configured through properties. I can't rule out that this is still a bug, but you will have to confirm with the nightly. -Erik On May 14, 2009, at 5:09 AM, Stéphane S. wrote: > On May 13, 2009, at 9:39 PM, MJ wrote: >> I just copied your example and everything works fine... > > Thanks for your help. Now I have dug the problem a bit and I know > better what happens. It occurs that: > > 1/ I am using Orbeon 3.6.0 > 2/ My colleague had changed the file "config/epilogue-servlet.xpl", > in particular the final rendering of the page uses the following > path (he has uncommented it from the Orbeon 3.6.0 original epilogue- > servlet.xpl): > > <!-- Use this choose block if you want to send XHTML to > browsers that support it. --> > <!-- BEGIN ASSUME SOME XHTML CLIENTS --> > <p:choose href="#request"> > <p:when test="contains(/request/headers/header[name = > 'accept'], 'application/xhtml+xml')"> > <p:processor name="oxf:qname-converter"> > <p:input name="config"> > <config> > <match> > <uri>http://www.w3.org/1999/ > xhtml</uri> > </match> > <replace> > <prefix></prefix> > </replace> > </config> > </p:input> > <p:input name="data" href="#rewritten-data"/> > <p:output name="data" id="xhtml-data"/> > </p:processor> > <p:processor name="oxf:xml-converter"> > <p:input name="config"> > <config> > <method>xhtml</method> > <public-doctype>-//W3C//DTD XHTML 1.0 > Transitional//EN</public-doctype> > <system-doctype>http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd > </system-doctype> > <encoding>utf-8</encoding> > <content-type>application/xhtml+xml</ > content-type> > <indent>false</indent> > <indent-amount>0</indent-amount> > </config> > </p:input> > <p:input name="data" href="#xhtml-data"/> > <p:output name="data" id="converted"/> > </p:processor> > </p:when> > > I did check and this is the cause of the problem: when this path is > called, the converted output is XHTML and it contains the double > namespace declaration xmlns:_0="http://www.w3.org/1999/xhtml" > xmlns="http://www.w3.org/1999/xhtml" ! > > If you comment it and use the standard path that generates some HTML > output (as per default in Orbeon 3.6.0), then this is okay. > > Is anybody aware of a bug in Orbeon 3.6.0 in the XHTML output > generation path that would explain why the standard 3.6.0 > distribution has commented it out ? Is there a bug in the "oxf:qname- > converter", by the way is this processor isn't documented at http://www.orbeon.com/ops/doc/processors-converters > ? > > I didn't find anything in the known issues (http://tinyurl.com/kycl3) > > Thanks in advance, > > Stéphane S. > --- > > PS: It seems that in Orbeon 3.7.0 these files are no longer in the > config folder, but they are in jar file: > > jar -tvf .../apache-tomcat-6.0.18/webapps/orbeon37\ /WEB-INF/lib/ > orbeon-resources-private.jar | grep epilogue > 6581 Mon Aug 11 15:48:22 CEST 2008 config/epilogue-portlet.xpl > 17747 Thu Aug 07 15:05:40 CEST 2008 config/epilogue-servlet.xpl > 3807 Mon Aug 11 15:48:22 CEST 2008 config/epilogue.xpl > 5000 Mon Aug 11 15:48:26 CEST 2008 ops/pfc/xforms-epilogue.xpl > > And it seems that the XHTML output path is also enabled (it is no > longer commented and there is a property 'oxf.epilogue.output-xhtml' > that seems to control its application), see this extract of "config/ > epilogue-servlet.xpl" > > <!-- Choose between XHTML output and HTML output --> > <p:choose href="#request"> > <p:when test="p:property('oxf.epilogue.output-xhtml')"> > <!-- Produce XHTML output --> > <p:choose href="#request"> > <p:when test="contains(/request/headers/ > header[name = 'accept'], 'application/xhtml+xml')"> > <p:processor name="oxf:qname-converter"> > <p:input name="config"> > > > -- > You receive this message as a subscriber of the [hidden email] > mailing list. > To unsubscribe: mailto:[hidden email] > For general help: mailto:[hidden email]?subject=help > OW2 mailing lists service home page: http://www.ow2.org/wws Orbeon Forms - Web Forms for the Enterprise Done the Right Way http://www.orbeon.com/ -- You receive this message as a subscriber of the [hidden email] mailing list. To unsubscribe: mailto:[hidden email] For general help: mailto:[hidden email]?subject=help OW2 mailing lists service home page: http://www.ow2.org/wws |
Hello,
I have just done a new test with the nightly (Orbeon Forms dev-3.7.1.200905200252) setting : <property as="xs:boolean" name="oxf.epilogue.output- xhtml" value="false"/> to true in properties-base.xml And it now works fine, I mean I can have an XForms file without the data instance inspector and without the duplicate namespace declaration error, and it is served as application/xhtml+xml, see 1st snapshot below. Just to convince me I tried again with a fresh Orbeon 3.6: I manually edited epilogue-servlet.xhtml: a/ I uncommented the lines between <!-- BEGIN ASSUME SOME XHTML CLIENTS --> and <!-- END ASSUME SOME XHTML CLIENTS --> b/ I commented the following lines between <!-- BEGIN NO ASSUME XHTML CLIENTS --> and <!-- END ASSUME NO XHTML CLIENTS --> And once again I had the error, as you can see on the second snapshot below. (and once again it did work if I included the inspector in the file: <span class="inspector-widget-class"> <widget:xforms-instance-inspector xmlns:widget="http://orbeon.org/oxf/xml/widget "/> </span> and that time it worked, see 3rd snapshot below) So I really think there is a bug in Orbeon 3.6 when generating XHTML output (and not HTML as per default). Unless I did it wrong with the epilogue-servlet.xpl, but I couldn't find documentation about setting up "terminal" XHTML output into the browser. But as it seem to be corrected in Orbeon 3.7, I guess this is not an issue. In fact I need to configure "terminal" XHTML output (and not HTML), because I use Orbeon 3.6 for a course on multimedia documents here at EPFL, and that's the only way I found to allow embedded SVG, in fact if the document is identified as HTML, then (at least Safari and Firefox) do not display <svg> elements. So next year we will take Orbeon 3.7 for our course on multimedia documents... Regards and thanks for your fantastic work, Stéphane S. --- On May 14, 2009, at 7:51 PM, Erik Bruchez wrote: > Stéphane, > > I don't know about 3.6, but can you try with a recent nightly? > > As you noticed, with more recent builds XHTML output is configured > through properties. > > I can't rule out that this is still a bug, but you will have to > confirm with the nightly. > > -Erik PS: 1st image, Orbeon 3.7 nightly build with XHTML output : everything is okay 2nd image, Orbeon 3.6 with XHTML output : problem in namespace generation 3rd image, Orbeon 3.6 with XHTML output, with inspector : no problem ! -- You receive this message as a subscriber of the [hidden email] mailing list. To unsubscribe: mailto:[hidden email] For general help: mailto:[hidden email]?subject=help OW2 mailing lists service home page: http://www.ow2.org/wws output-xhtml-true.png (173K) Download Attachment output-3.6-force-xhtml.png (170K) Download Attachment output-36-xhtml-inspector.png (212K) Download Attachment |
Administrator
|
Stéphane,
Thanks for confirming this! I am glad that this is working with more recent builds. -Erik On May 20, 2009, at 7:01 AM, Stéphane S. wrote: > Hello, > > I have just done a new test with the nightly (Orbeon Forms > dev-3.7.1.200905200252) setting : > > <property as="xs:boolean" name="oxf.epilogue.output- > xhtml" value="false"/> > > to true in properties-base.xml > > And it now works fine, I mean I can have an XForms file without the > data instance inspector and without the duplicate namespace > declaration error, and it is served as application/xhtml+xml, see > 1st snapshot below. > > Just to convince me I tried again with a fresh Orbeon 3.6: I > manually edited epilogue-servlet.xhtml: > > a/ I uncommented the lines between > <!-- BEGIN ASSUME SOME XHTML CLIENTS --> > and > <!-- END ASSUME SOME XHTML CLIENTS --> > b/ I commented the following lines between > <!-- BEGIN NO ASSUME XHTML CLIENTS --> > and > <!-- END ASSUME NO XHTML CLIENTS --> > > And once again I had the error, as you can see on the second > snapshot below. (and once again it did work if I included the > inspector in the file: > <span class="inspector-widget-class"> > <widget:xforms-instance-inspector xmlns:widget="http://orbeon.org/oxf/xml/widget > "/> > </span> and that time it worked, see 3rd snapshot below) > > So I really think there is a bug in Orbeon 3.6 when generating XHTML > output (and not HTML as per default). Unless I did it wrong with the > epilogue-servlet.xpl, but I couldn't find documentation about > setting up "terminal" XHTML output into the browser. But as it seem > to be corrected in Orbeon 3.7, I guess this is not an issue. > > In fact I need to configure "terminal" XHTML output (and not HTML), > because I use Orbeon 3.6 for a course on multimedia documents here > at EPFL, and that's the only way I found to allow embedded SVG, in > fact if the document is identified as HTML, then (at least Safari > and Firefox) do not display <svg> elements. So next year we will > take Orbeon 3.7 for our course on multimedia documents... > > Regards and thanks for your fantastic work, > > Stéphane S. > --- > > On May 14, 2009, at 7:51 PM, Erik Bruchez wrote: > >> Stéphane, >> >> I don't know about 3.6, but can you try with a recent nightly? >> >> As you noticed, with more recent builds XHTML output is configured >> through properties. >> >> I can't rule out that this is still a bug, but you will have to >> confirm with the nightly. >> >> -Erik > > > PS: > > 1st image, Orbeon 3.7 nightly build with XHTML output : everything > is okay > 2nd image, Orbeon 3.6 with XHTML output : problem in namespace > generation > 3rd image, Orbeon 3.6 with XHTML output, with inspector : no > problem ! > <output-xhtml-true.png> > > <output-3.6-force-xhtml.png> > > <output-36-xhtml-inspector.png> > > > > > -- > You receive this message as a subscriber of the [hidden email] > mailing list. > To unsubscribe: mailto:[hidden email] > For general help: mailto:[hidden email]?subject=help > OW2 mailing lists service home page: http://www.ow2.org/wws Orbeon Forms - Web Forms for the Enterprise Done the Right Way http://www.orbeon.com/ -- You receive this message as a subscriber of the [hidden email] mailing list. To unsubscribe: mailto:[hidden email] For general help: mailto:[hidden email]?subject=help OW2 mailing lists service home page: http://www.ow2.org/wws |
Free forum by Nabble | Edit this page |