[Yanel-dev] BasicXMLResource inconsistencies
Josias Thöny
josias.thoeny at wyona.com
Mon Jan 14 14:25:22 CET 2008
Evaldas Taroza wrote:
> Josias Thöny wrote:
>> Evaldas Taroza wrote:
>>> Hi,
>>> there are static properties in BasicXMLResource:
>>> SERIALIZER_OMIT_XML_DECLARATION = "serializer-omit-xml-declaration";
>>> SERIALIZER_DOCTYPE_PUBLIC = "serializer-doctype-public";
>>> SERIALIZER_DOCTYPE_SYSTEM = "serializer-doctype-system";
>>
>> I think those properties are obsolete and should be removed.
>> Thanks for pointing this out.
>>
>> The serializer can be overridden in the rc like so:
>>
>> <yanel:custom-config>
>> <views>
>> <view id="default">
>> <mime-type>text/html</mime-type>
>> <xslt>/xslt/global.xsl</xslt>
>> <serializer key="HTML_TRANSITIONAL">
>> <omit-xml-declaration>yes</omit-xml-declaration>
>> <doctype-public>-//W3C//DTD XHTML 1.0
>> Transitional//EN</doctype-public>
>>
>> <doctype-system>http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd</doctype-system>
>>
>> </serializer>
>> </view>
>> </views>
>> </yanel:custom-config>
>>
> The thing is that these properties
> <omit-xml-declaration>
> <doctype-public>
> <doctype-system>
>
> don't override serializer's behaviour... That needs to be implemented in
> BasicXMLResource.
Hm, it's implemented as follows (line 276):
// allow to override xml declaration and doctype:
Properties properties = viewDescriptor.getSerializerProperties();
if (properties != null) {
Enumeration propNames = properties.propertyNames();
while (propNames.hasMoreElements()) {
String name = (String)propNames.nextElement();
String value = properties.getProperty(name);
serializer.getOutputFormat().setProperty(name, value);
}
}
do you think it's not working?
josias
> Evaldas
> _______________________________________________
> Yanel-development mailing list
> Yanel-development at wyona.com
> http://lists.wyona.org/cgi-bin/mailman/listinfo/yanel-development
More information about the Yanel-development
mailing list