cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Robin Wyles <...@robinwyles.com>
Subject Re: XML binding in the default namespace
Date Mon, 19 May 2008 14:12:09 GMT
Hi Suzan,

Thanks for your reply... Reading over the issues in Jira is seems  
that enabling NSPrefixes on the SAXParser should fix the problem, and  
it does to a certain degree... but not in the case of using a default  
namespace.

Do you have a set of patches against C2.2 that I could try?

Thanks,

Robin


On 19 May 2008, at 13:01, Suzan Foster wrote:

> I do, but have to maintain my own patches as there is little  
> traction to get the issues resolved which have been reported in Jira.
>
> Robin Wyles schreef:
>> Has no one managed to use CForms XML binding with documents that  
>> declare a default namespace? I can't believe this can be the case!
>>
>> If anyone can point me in the right direction I'd appreciate it...
>>
>> Thanks,
>>
>> Robin
>>
>>
>> On 14 May 2008, at 14:38, Robin Wyles wrote:
>>
>>> Hi All,
>>>
>>> I'm having trouble binding to a XML document with a declared  
>>> default namespace on C2.2. I've read back over the many posts on  
>>> the subject on this list, and have enabled NSPrefixes for the  
>>> SAXParser as suggested, but am still having problems. Here is the  
>>> document to which I am binding:
>>>
>>> <entry xmlns="http://www.w3.org/2005/Atom">
>>>     <title>test</title>
>>> </entry>
>>>
>>> ... and the binding file:
>>>
>>> <fb:context xmlns:fb="http://apache.org/cocoon/forms/1.0#binding"
>>>     xmlns:fd="http://apache.org/cocoon/forms/1.0#definition"
>>>     xmlns="http://www.w3.org/2005/Atom"
>>>     path="/" >
>>>     <fb:value id="title" path="title"/>
>>> </fb:context>
>>>
>>> This doesn't seem to work, no value is loaded for the <title/>  
>>> element. I've also tried the following binding file, which still  
>>> doesn't work:
>>>
>>> <fb:context xmlns:fb="http://apache.org/cocoon/forms/1.0#binding"
>>>     xmlns:fd="http://apache.org/cocoon/forms/1.0#definition"
>>>     xmlns:atom="http://www.w3.org/2005/Atom"
>>>     path="/" >
>>>     <fb:value id="title" path="atom:title"/>
>>> </fb:context>
>>>
>>> I can get it to work using  the following document and binding file:
>>>
>>> <atom:entry xmlns:atom="http://www.w3.org/2005/Atom">
>>>     <atom:title>test</atom:title>
>>> </atom:entry>
>>>
>>> <fb:context xmlns:fb="http://apache.org/cocoon/forms/1.0#binding"
>>>     xmlns:fd="http://apache.org/cocoon/forms/1.0#definition"
>>>     path="/" >
>>>     <fb:value id="title" path="atom:title"/>
>>> </fb:context>
>>>
>>> However, I am not really able to declare the namespace prefixes  
>>> in the source document like that - they really need to be  
>>> specified in the defined default namespace. Am I missing  
>>> something here, or are there really still issues with this?
>>>
>>> If anyone could help I'd really appreciate it!
>>>
>>> Thanks,
>>>
>>> Robin
>>>
>>>
>>>
>>>
>>>
>>>
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
> For additional commands, e-mail: users-help@cocoon.apache.org
>


Mime
View raw message