Uploaded image for project: 'OASIS Open Document Format for Office Applications (OpenDocument) TC'
  1. OASIS Open Document Format for Office Applications (OpenDocument) TC
  2. OFFICE-3943

Allow attribute draw:mime-type in <draw:image> element

    XMLWordPrintable

    Details

    • Proposal:
      Hide

      In 19.191 draw:mime-type
      change
      The draw:mime-type attribute specifies the MIME type of the media-type which a plugin processes.
      to
      The draw:mime-type attribute specifies the MIME type of the media-type which a plugin processes, or the MIME type of the image given by a <draw:image> element.

      The change in the reference part from
      The draw:mime-type attribute is usable with the following element: <draw:plugin> 10.4.8.
      to
      The draw:mime-type attribute is usable with the following element: <draw:plugin> 10.4.8. and <draw:image> 10.4.4.
      should be done automatically with the proposed schema change.

      Schema change:

      --- OpenDocument-v1.2-os-schema.rng	2017-12-12 14:00:28.034141600 +0100
      +++ OpenDocument-v1.2-os-schema_new.rng	2017-12-12 20:02:49.578097700 +0100
      @@ -6770,15 +6770,23 @@
       			<optional>
       				<attribute name="draw:filter-name">
       					<ref name="string"/>
       				</attribute>
       			</optional>
      +            <ref name="common-draw-mime-type-attlist"/>
       			<optional>
       				<ref name="xml-id"/>
       			</optional>
       		</interleave>
       	</define>
      +    <define name="common-draw-mime-type-attlist">
      +        <optional>
      +            <attribute name="draw:mime-type">
      +                <ref name="string"/>
      +            </attribute>
      +        </optional>    
      +    </define>
       	<define name="draw-object">
       		<element name="draw:object">
       			<ref name="draw-object-attlist"/>
       			<choice>
       				<ref name="common-draw-data-attlist"/>
      @@ -6870,15 +6878,11 @@
       			</zeroOrMore>
       		</element>
       	</define>
       	<define name="draw-plugin-attlist">
       		<interleave>
      -			<optional>
      -				<attribute name="draw:mime-type">
      -					<ref name="string"/>
      -				</attribute>
      -			</optional>
      +            <ref name="common-draw-mime-type-attlist"/>
       			<optional>
       				<ref name="xml-id"/>
       			</optional>
       		</interleave>
       	</define>
      
      
      Show
      In 19.191 draw:mime-type change The draw:mime-type attribute specifies the MIME type of the media-type which a plugin processes. to The draw:mime-type attribute specifies the MIME type of the media-type which a plugin processes, or the MIME type of the image given by a <draw:image> element. The change in the reference part from The draw:mime-type attribute is usable with the following element: <draw:plugin> 10.4.8. to The draw:mime-type attribute is usable with the following element: <draw:plugin> 10.4.8. and <draw:image> 10.4.4. should be done automatically with the proposed schema change. Schema change: --- OpenDocument-v1.2-os-schema.rng 2017-12-12 14:00:28.034141600 +0100 +++ OpenDocument-v1.2-os-schema_new.rng 2017-12-12 20:02:49.578097700 +0100 @@ -6770,15 +6770,23 @@ <optional> <attribute name="draw:filter-name"> <ref name="string"/> </attribute> </optional> + <ref name="common-draw-mime-type-attlist"/> <optional> <ref name="xml-id"/> </optional> </interleave> </define> + <define name="common-draw-mime-type-attlist"> + <optional> + <attribute name="draw:mime-type"> + <ref name="string"/> + </attribute> + </optional> + </define> <define name="draw-object"> <element name="draw:object"> <ref name="draw-object-attlist"/> <choice> <ref name="common-draw-data-attlist"/> @@ -6870,15 +6878,11 @@ </zeroOrMore> </element> </define> <define name="draw-plugin-attlist"> <interleave> - <optional> - <attribute name="draw:mime-type"> - <ref name="string"/> - </attribute> - </optional> + <ref name="common-draw-mime-type-attlist"/> <optional> <ref name="xml-id"/> </optional> </interleave> </define>

      Description

      ODF allows to give several representation of the same content, so that a consumer can decide, which fits best to its capabilities. You can give an image as svg-graphic and in addition as png-graphic, for example. But currently there is no easy way to detect the type of the image. Consumers have to read all content and inspect it. Such is not even possible, if you use an XSLT to transform a flat ODF file to e.g. XHTML. Therefore I suggest to add the draw:mime-type attribute to the <draw:image> element.
      The MIME type is a standardized identifier. Therefore it is preferable over the implementation-dependent filter name.

      This attribute would be useful for <draw:object-ole> and <draw:object> as well, but that is not in this issue. However, I have separated the attribute in the schema, so that such addition is easily possible.

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              regina.henschel Regina Henschel
            • Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: