[Yanel-dev] Configuring the mime-type of a view

Michael Wechner michael.wechner at wyona.com
Tue Oct 2 11:44:06 CEST 2007


Josias Thöny wrote:

> Michael Wechner wrote:
>
>> Hi
>>
>> Unfortunately Windows' IE has trouble within the XML declaration 
>> <?xml version="1.0"?> and as a workaround one can set the mime-type 
>> of the default view to text/html within the XML resource config 
>> instance.
>>
>> But the problem then is, that the introspection will also say that 
>> the mime-type is text/html
>>
>> https://127.0.0.1:8443/yanel/yanel-website/en/about.html?yanel.resource.usecase=introspection 
>>
>>
>> but which is not very good, because editors as for instance Yulup 
>> won't check on well-formedness etc.
>>
>> I would suggest to introduce a
>>
>> <yanel:property name="source-view-mime-type" value="..."/>
>>
>> for the XML resource which then would allow to set the correct 
>> mime-type also for the source view.
>
>
> As a quick fix I think this is ok.


done

>
>>
>> Of course one should think about a more general solution, because it 
>> concerns more than just the XML resource, but it would at least fix 
>> the issue of the XML resource.
>
>
> Maybe something like that:
>
> <views>
>   <view id="default" mime-type="text/html">
>     <xslt>/xslt/global.xsl</xslt>
>   </view>
>   <view id="source" mime-type="application/xhtml+xml"/>
> </views>
>
> The usecases currently use something simliar, e.g.:
>
> <yanel:custom-config>
>   <views>
>     <view id="default" type="jelly">
>       
> <template>/usecases/user-mgmt/templates/create-user.jelly</template>
>     </view>
>     <view id="done" type="jelly">
>       
> <template>/usecases/user-mgmt/templates/usecase-done.jelly</template>
>     </view>
>     <view id="cancel" type="jelly">
>
> <template>/usecases/user-mgmt/templates/usecase-cancel.jelly</template>
>     </view>
>   </views>
> </yanel:custom-config>
>
> Maybe all this could be somehow unified...


very much agreed. I think the only thing we need to be careful with is 
that view is an interface and not every resource will have implemented 
it, though it might be quite unlikely ;-)

Cheers

Michi

>
> josias
>
>
>
>>
>> WDYT?
>>
>> Cheers
>>
>> 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