This feature has been defined in a way which ignores the existence of current browsers other than Internet Explorer. What about Firefox What about Safari What about Opera None of these can be set as target browsers. This section requires that “all settings which are not compatible with the target web browser shall be disabled.” But what if a user wants his application to produce standards-compliant output So yes to PNG, no to VML, yes to MathML and SVG Where can we specify this.
Ecma should rethink the entire optimizeForBrowser subclause. It looks very much like it is mapping directly to the arbitrary choices of a single vendor’s application. This clause should be rewritten to express this feature in an application and platform neutral way.
- Part 4, Section 2.15.2.32
te
Proposed Disposition of DIS 29500 Comment PT-0014 (Modified: 2008-01-13) Agreed; the following changes will be made to Part 4, §2.15.2.32, pages 1,3371,338: 2.15.2.32 optimizeForBrowser (Disable Features Not Supported by Target Web Browser) This element specifies whether applications should attempt to detect customize the output the target web browser for any web page produced from this document based on the target web browser , for example, and subsequently disable all user interface and by blocking any output which is not supported by that target web browser. The target browser is identified by the contents of the pubBrowser attribute. The target web browser can be determined by the state of the following elements: allowPNG doNotRelyOnCSS relyOnVML doNotSaveWebPagesAsSingleFile The following table determines how this determination is made: Settings Target Browser allowPNG is off doNotRelyOnCSS is on relyOnVML is off doNotSaveWebPagesAsSingleFile is on Microsoft Internet Explorer 3.0 or later Netscape Navigator 3.0 or later allowPNG is off doNotRelyOnCSS is off relyOnVML is off doNotSaveWebPagesAsSingleFile is on Netscape Navigator 4.0 or later allowPNG is off doNotRelyOnCSS is off relyOnVML is off doNotSaveWebPagesAsSingleFile is off Microsoft Internet Explorer 4.0 or later allowPNG is off doNotRelyOnCSS is off relyOnVML is on Microsoft Internet Explorer 5.0 or later Settings Target Browser doNotSaveWebPagesAsSingleFile is off allowPNG is on doNotRelyOnCSS is off relyOnVML is on doNotSaveWebPagesAsSingleFile is off Microsoft Internet Explorer 6.0 or later If this element is omitted, then no user interface or output which is not supported by that target web browser shall be disabled. [Example: Consider a document whose web settings part contains the following WordprocessingML: <w:webSettings> … <w:optimizeForBrowser w:pubBrowser="W3C XHTML+CSS" /> <w:allowPNG w:val="on"/> <w:relyOnVML w:val="on"/> </w:webSettings> The optimizeForBrowser element specifies that all settings which are not compatible with the target web browser shall be disabled the output should be optimized for a specific output target . Since the settings of the four element value of the pubBrowser attribute described above match specifies a target browser of Microsoft Internet Explorer 6.0, features not supported by Microsoft Internet Explorer 6.0 shall be disabled W3C XHTML 1.0 output using CSS, any HTML generated should fall within that profile . end example] Parent Elements webSettings (§2.15.2.44) Attributes Description pubBrower (Target Browser Environment) Specifies the web browser or environment which should be targeted by the output of any web page produced by this document. [Note: The following sample values and their targets are listed below: Value Target Firefox 1 Firefox 1.x Firefox 2 Firefox 2.x Internet Explorer 6 Internet Explorer 6.x Internet Explorer 7 Internet Explorer 7.x Attributes Description Opera 9 Opera 9.x Safari 2 Safari 2.x Safari 3 Safari 3.x W3C XHTML+CSS W3C XHTML 1.0 + CSS W3C HTML4+CSS W3C HTML 4.01 + CSS end note] [Example: For example, consider the following web publishing settings: <w:optimizeForBrowser w:pubBrowser="Safari 2"/> The pubBrowser attribute explicitly declares that any web page generated from this document should target the Safari 2 web browser. end example] The possible values for this attribute are defined by the ST_String simple type (§2.18.89). val (On/Off Value) Specifies a binary value for the property defined by the parent XML element. A value of on , 1 , or true specifies that the property shall be explicitly applied. This is the default value for this attribute, and is implied when the parent element is present, but this attribute is omitted. A value of off , 0 , or false specifies that the property shall be explicitly turned off. [Example: For example, consider the following on/off property: <w:… w:val="off"/> The val attribute explicitly declares that the property is turned off . end example] The possible values for this attribute are defined by the ST_OnOff simple type (§2.18.67). The following XML Schema fragment defines the contents of this element: <complexType name="CT_ OnOff OptimizeForBrowser "> <attribute name="pubBrowser" type="ST_String"/> <attribute name="val" type="ST_OnOff"/> </complexType> To wml.xsd: A new complex type, CT_OptimizeForBrowser , will be created, as defined above The optimizeForBrowser element will use the new complex type Similar Comments: BR-0007 , CA-0019 , CL-0093 , CO-0102 , CZ-0013 , DE-0101 , DK-0118 , DK-0159 , FR-0193 , GB-0226 , GH- 0010 , GR-0025 , IN-0021 , IN-0027 , IR-0017 , KE-0023 , KR-0002 , KR-0004 , NZ-0049 , US-0058 , UY-0015 , VE-0019
