Hi Suzan,

Suzan Foster wrote:
> Hi Peter,
> 
> To get namespaces to bind in 2.1.8 i found you need to set
> namespace-prefixes to true for the xml-parser in your cocoon.xconf file.
> 2.1.8 also has some bugs in the repeater binding which prevents the
> propagation of namespaces in the binding file.
> See : http://issues.apache.org/jira/browse/COCOON-1671

Thanks, I did set namespace-prefixes to true as you suggested but when I try to
load the form I get the following exception now:

Caused by: org.apache.avalon.framework.CascadingException: Could not parse form
definition from
file:/home/pak/sandbox/midas_cocoon218/tomcat/webapps/midas/content/ovo/policyedit/forms/newPolicy_model.xml
        at
org.apache.cocoon.forms.DefaultFormManager.getFormDefinition(DefaultFormManager.java:162)
        at
org.apache.cocoon.forms.DefaultFormManager.createForm(DefaultFormManager.java:109)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:585)
        at 
org.mozilla.javascript.NativeJavaMethod.call(NativeJavaMethod.java:230)
        at org.mozilla.javascript.ScriptRuntime.call(ScriptRuntime.java:1244)
        at
org.mozilla.javascript.continuations.ContinuationInterpreter.interpret(ContinuationInterpreter.java:1134)
        at
org.mozilla.javascript.continuations.ContinuationInterpreter.interpret(ContinuationInterpreter.java:190)
        at
org.mozilla.javascript.continuations.ContinuationInterpreter.interpret(ContinuationInterpreter.java:138)
        at
org.mozilla.javascript.continuations.InterpretedFunctionImpl.call(InterpretedFunctionImpl.java:121)
        at org.mozilla.javascript.ScriptRuntime.call(ScriptRuntime.java:1244)
        at
org.apache.cocoon.components.flow.javascript.fom.FOM_JavaScriptInterpreter.callFunction(FOM_JavaScriptInterpreter.java:758)
        ... 103 more
Caused by: org.w3c.dom.DOMException: NAMESPACE_ERR: An attempt is made to create
or change an object in a way which is incorrect with regard to namespaces.
        at org.apache.xml.utils.DOMBuilder.startElement(DOMBuilder.java:354)
        at
org.apache.xalan.transformer.TransformerIdentityImpl.startElement(TransformerIdentityImpl.java:1042)
        at 
org.apache.cocoon.xml.AbstractXMLPipe.startElement(AbstractXMLPipe.java:94)
        at
org.apache.cocoon.util.location.LocationAttributes$Pipe.startElement(LocationAttributes.java:318)
        at org.apache.xerces.parsers.AbstractSAXParser.startElement(Unknown 
Source)
        at 
org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanStartElement(Unknown Source)
        at
org.apache.xerces.impl.XMLNSDocumentScannerImpl$NSContentDispatcher.scanRootElementHook(Unknown
Source)
        at
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown
Source)
        at 
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown
Source)
        at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
        at org.apache.xerces.parsers.DTDConfiguration.parse(Unknown Source)
        at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
        at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
        at org.apache.excalibur.xml.impl.JaxpParser.parse(JaxpParser.java:315)
        at org.apache.excalibur.xml.impl.JaxpParser.parse(JaxpParser.java:334)
        at org.apache.cocoon.forms.util.DomHelper.parse(DomHelper.java:308)
        at
org.apache.cocoon.forms.DefaultFormManager.getFormDefinition(DefaultFormManager.java:160)
        ... 116 more
Caused by: org.w3c.dom.DOMException: NAMESPACE_ERR: An attempt is made to create
or change an object in a way which is incorrect with regard to namespaces.
        at org.apache.xerces.dom.CoreDocumentImpl.checkDOMNSErr(Unknown Source)
        at org.apache.xerces.dom.AttrNSImpl.setName(Unknown Source)
        at org.apache.xerces.dom.AttrNSImpl.<init>(Unknown Source)
        at org.apache.xerces.dom.CoreDocumentImpl.createAttributeNS(Unknown 
Source)
        at org.apache.xerces.dom.ElementImpl.setAttributeNS(Unknown Source)
        at org.apache.xml.utils.DOMBuilder.startElement(DOMBuilder.java:339)
        ... 132 more

I cannot see a problem with namespaces in the mentioned form model though:

<fd:form
  xmlns:fd="http://apache.org/cocoon/forms/1.0#definition";
  xmlns:i18n="http://apache.org/cocoon/i18n/2.1";>

  <fd:widgets>
...

I must admit that I do not understand the problem really as I usually do not use
this lowlevel DOM but JDOM instead. I know that DOM v1 has problem with
namespaces but that should be done with DOM 2, shouldn't it?


Peter

begin:vcard
fn:Peter Klotz
n:Klotz;Peter
org:blue elephant systems GmbH
adr:;;Wollgrasweg 49;Stuttgart;;70599;Germany
email;internet:[EMAIL PROTECTED]
title:Chief Architect
tel;work:+49 711 451017-570
tel;fax:+49 711 451017-573
tel;cell:+49 170 9380410
x-mozilla-html:FALSE
url:http://www.blue-elephant-systems.com
version:2.1
end:vcard


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to