[Yanel-dev] Another namespace problem with the XML resource
Michael Wechner
michael.wechner at wyona.com
Wed Aug 15 11:54:27 CEST 2007
Josias Thöny wrote:
> Michael Wechner wrote:
>
>> Hi
>>
>> Is it possible that if no XSLT is being applied when using the XML
>> resource, that all namespaces are being stripped off, e.g.
>>
>> the original
>>
>> <service xmlns="http://www.w3.org/2007/app"
>> xmlns:atom="http://www.w3.org/2005/Atom">
>> <workspace title="Yulup Website">
>> <atom:title type="text">Yulup Website</atom:title>
>> <collection title="Releases"
>> href="release-atom-entries/?yanel.resource.viewid=atom">
>> <atom:title type="text">Releases</atom:title>
>> </collection>
>> <collection title="News"
>> href="../news-entries/?yanel.resource.viewid=atom">
>> <atom:title type="text">News</atom:title>
>> </collection>
>> </workspace>
>> </service>
>>
>> is being delivered as
>>
>> <service>
>> <workspace title="Yulup Website">
>> <atom:title type="text">Yulup Website</atom:title>
>> <collection title="Releases"
>> href="release-atom-entries/?yanel.resource.viewid=atom">
>> <atom:title type="text">Releases</atom:title>
>> </collection>
>> <collection title="News"
>> href="../news-entries/?yanel.resource.viewid=atom">
>> <atom:title type="text">News</atom:title>
>> </collection>
>> </workspace>
>> </service>
>>
>>
>> Any idea what might be wrong?
>
>
> I'm able to reproduce the problem, and I found this workaround:
>
> add this line to BasicXMLResource.java at line 119:
>
> xmlReader.setFeature("http://xml.org/sax/features/namespace-prefixes",
> true);
that seems to work, thanks very much.
>
> However I'm not sure if this is a good solution.
why not?
> I guess the "correct" solution would be to implement namespace
> normalization in the XMLSerializer. But that might be a lot of work...
have we a bug/task entry for this already?
Cheers
Michi
>
> Josias
>
>
>
>>
>> Thanks
>>
>> Michi
>>
>
> _______________________________________________
> Yanel-development mailing list
> Yanel-development at wyona.com
> http://lists.wyona.org/cgi-bin/mailman/listinfo/yanel-development
--
Michael Wechner
Wyona - Open Source Content Management - Yanel, Yulup
http://www.wyona.com
michael.wechner at wyona.com, michi at apache.org
+41 44 272 91 61
More information about the Yanel-development
mailing list