Hi Wadmin,
I tried the following here:
<fb:context xmlns:fb="http://apache.org/cocoon/forms/1.0#binding"
xmlns:fd="http://apache.org/cocoon/forms/1.0#definition"
path="/ProgrammeDescription"
xmlns:i18n="http://apache.org/cocoon/i18n/2.1"
xmlns:xi="http://www.w3.org/2001/XInclude">
<fb:value id="ProgrammeCode" path="ProgrammeCode"></fb:value>
<fb:value id="ProgrammeCodeAttr" path="ProgrammeCode/@id"></fb:value>
<fb:context path="xi:include">
<fb:javascript id="ProgrammeCode" path="@href">
<fb:save-form>
var formValue = "cocoon:/"+widget.getValue()+".xml";
jxpathPointer.setValue(formValue);
</fb:save-form>
</fb:javascript>
</fb:context>
<fb:insert-node>
<test>
<xi:include />
</test>
</fb:insert-node>
</fb:context>
and I get the following with the correct namespace
<ProgrammeDescription>
<ProgrammeCode id="a">a</ProgrammeCode>
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
href="cocoon:/a.xml" />
<test>
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" />
</test>
</ProgrammeDescription>
I am not sure if this can have an impact here but I have another patch
for cocoon forms in the cocoon version (2.1.9) I use.
http://issues.apache.org/jira/browse/COCOON-1686
It some time ago I looked into the details of the patch so I am not sure
if it makes a difference here.
Fabian
Wadim Kruse wrote, On 06.09.2006 20:47:
Hi Fabian,
thanks for your reply!
another namespace with the same prefix doesn't work,
the same namespace with another prefix doesn't work,
in both cases: xmlns:xi="<<unknown namespace>>"
The (simplest) binding document:
<?xml version="1.0"?>
<fb:context xmlns:fb="http://apache.org/cocoon/forms/1.0#binding"
xmlns:fd="http://apache.org/cocoon/forms/1.0#definition"
path="/ProgrammeDescription"
xmlns:i18n="http://apache.org/cocoon/i18n/2.1"
xmlns:xi="http://www.w3.org/2001/XInclude">
<fb:value id="ProgrammeCode" path="ProgrammeCode"></fb:value>
<fb:value id="ProgrammeCodeAttr" path="ProgrammeCode/@id"></fb:value>
<fb:context path="xi:include">
<fb:javascript id="ProgrammeCode" path="@href">
<fb:save-form>
var formValue =
"cocoon:/"+widget.getValue()+".xml";
jxpathPointer.setValue(formValue);
</fb:save-form>
</fb:javascript>
</fb:context>
<fb:insert-node>
<test>
<xi:include />
</test>
</fb:insert-node>
</fb:context>
The result document:
<?xml version="1.0" encoding="UTF-8"?>
<ProgrammeDescription>
<ProgrammeCode id="code">PROG1</ProgrammeCode>
<xi:include xmlns:xi="<<unknown namespace>>"
href="cocoon:/PROG1.xml"/>
<test>
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude"/>
</test>
</ProgrammeDescription>
-----------------------------------------------------------
The fb:insert-node works...
Best regards,
Wadim
Fabian Linz wrote:
Hi!
Have you already tried the following:
Is another namespace working with the same prefix?
Is the same namespace working with another prefix?
Can you provide the whole binding document?
Fabian
Wadim Kruse wrote, On 06.09.2006 14:06:
Well, there is no error anymore while saving the document, but
the namespace declaration looks like this:
xmlns:xi="<<unknown namespace>>"
In the binding document I have the following declarations:
xmlns:xi="http://www.w3.org/2001/XInclude"
xmlns:i18n="http://apache.org/cocoon/i18n/2.1"
No problems with i18n namespace.
Someone any ideas?
Best regards,
Wadim
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]