Re: [Qt-qml] XML patterns and Namespace prefix

2010-11-23 Thread Adrian Hornsby
Hi Bea, 

Thanks for the tips, it go it to fix my problems. 
have a nice day!

adrian


On Nov 23, 2010, at 8:24 AM,  wrote:

> Hi Adrian,
> 
> On 22/11/2010, at 5:40 PM, ext adrian hornsby wrote:
> 
>> Hi all,
>> 
>> I am trying to parse an activity-stream:
>> 
>> 
>> tag:photopanic.example.com,2008:photo01
>> My Cat
>> 2008-11-02T15:29:00Z
>> > href="/geraldine/photos/1" />
>> 
>> tag:atomactivity.example.com,2008:photo
>> 
>> 
>> 
>> 
>> with QML XMLlistmodel and XMLrole as follows:
>> 
>> query: "/wall/entry"
>> XmlRole { name: "title"; query: "title/string()" }
>> XmlRole { name: "published"; query: "published/string()" }
>> XmlRole { name: "link"; query: "link/@href/string()" }
>> 
>> 
>> but get this error:
>> Error FODC0002 in
>> tag:trolltech.com,2007:QtXmlPatterns:QIODeviceVariable:src, at line 9,
>> column 25: Namespace prefix 'activity' not declared
> 
> 
> It looks like the XML feed does not have a namespace declared for the 
> 'activity' prefix. The root 'wall' element should look something like this:
> 
> http://www.someurl.com/something";>
> 
> This xmlns attribute is probably missing from your XML and so it cannot be 
> parsed correctly.
> 
> 
> Note that if you need to use the data within  for a 
> role, you'll need to declare the activity namespace using 
> XmlListModel::namespaceDeclarations. For example,
> 
> 
>XmlListModel {
>source: ...
>query: "/wall/entry"
>namespaceDeclarations: "declare namespace activity = 
> 'http://www.someurl.com/something';"
>XmlRole { name: "objectType"; query: "activity:object-type/string()" }
>}
> 
> 
> 
> regards,
> 
> Bea
> 
> 


___
Qt-qml mailing list
Qt-qml@trolltech.com
http://lists.trolltech.com/mailman/listinfo/qt-qml


[Qt-qml] XML patterns and Namespace prefix

2010-11-21 Thread adrian hornsby
Hi all,

I am trying to parse an activity-stream:


tag:photopanic.example.com,2008:photo01
My Cat
2008-11-02T15:29:00Z


tag:atomactivity.example.com,2008:photo




 with QML XMLlistmodel and XMLrole as follows:

query: "/wall/entry"
XmlRole { name: "title"; query: "title/string()" }
XmlRole { name: "published"; query: "published/string()" }
XmlRole { name: "link"; query: "link/@href/string()" }


but get this error:
Error FODC0002 in
tag:trolltech.com,2007:QtXmlPatterns:QIODeviceVariable:src, at line 9,
column 25: Namespace prefix 'activity' not declared


any idea how to solve that. All work well if I use very simple XML docs.

thanks,

Adrian
___
Qt-qml mailing list
Qt-qml@trolltech.com
http://lists.trolltech.com/mailman/listinfo/qt-qml