OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

office message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]


Subject: [OASIS Issue Tracker] (OFFICE-3995) Allow native SVG instead of <office:binary-data> for images


     [ https://issues.oasis-open.org/browse/OFFICE-3995?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Regina Henschel updated OFFICE-3995:
------------------------------------
    Proposal: 
xy.z {{<svg:svg>}}

An {{<svg:svg>}} element contains a Conforming XML-Compatible SVG Markup Fragment as described in 2.4.3 in [https://www.w3.org/TR/2016/CR-SVG2-20160915/conform.html|https://www.w3.org/TR/2016/CR-SVG2-20160915/conform.html]
 In the context of an OpenDocument document the {{<svg:svg>}} element shall have an {{xmlns}} attribute.

The {{<svg:svg>}} element is usable as child element of a {{<draw:fill-image>}} element, a {{<draw:image>}} element, a {{<style:background-image>}} element and a {{<text:list-level-style-image>}} element. If a {{<svg:svg>}} element is present, an {{xlink:href}} attribute in its parent element shall be ignored.

16.40.6 {{<draw:fill-image>}}
 The {{<draw:fill-image>}} element specifies either a link to a bitmap resource or contains an image in either a {{<office:binary-data>}} or a {{<svg:svg>}} child element. Producers shall not write the {{<office:binary-data>}} or {{<svg:svg>}} child element in case the document is represented as a package.

10.4.4 {{<draw:image>}}
 Add before "Note"
 The {{<draw:image>}} element shall have at most one of {{<office:binary-data>}} element and {{<svg:svg>}} element.

17.3 {{<style:background-image>}}
 The {{<style:background-image>}} element specifies an image as a background. It specifies either a link to a bitmap resource or contains an image in either a {{<office:binary-data>}} or a {{<svg:svg>}} child element. Producers shall not write the {{<office:binary-data>}} or {{<svg:svg>}} child element in case the document is represented as a package.

16.33 {{<text:list-level-style-image>}}
 A {{<text:list-level-style-image>}} specifies a list style where list items are preceded by images. This element can only be contained in list style elements. It specifies either a link to a bitmap resource or contains an image in either a {{<office:binary-data>}} or a {{<svg:svg>}} child element. Producers shall not write the {{<office:binary-data>}} or {{<svg:svg>}} child element in case the document is represented as a package.
{code:xml}
--- OpenDocument-schema-v1.3-wd06-with-fixes.rng	2018-07-19 17:55:01.575521400 +0200
+++ OpenDocument-schema-v1.3-wd06-with-SVG.rng	2018-07-19 18:33:59.091028700 +0200
@@ -4990,10 +4990,11 @@
         <rng:group>
           <rng:ref name="common-draw-data-attlist"/>
           <rng:empty/>
         </rng:group>
         <rng:ref name="office-binary-data"/>
+        <rng:ref name="svg-svg"/>
       </rng:choice>
       <!-- https://issues.oasis-open.org/browse/OFFICE-3933 -->
     </rng:element>
   </rng:define>
   <rng:define name="draw-fill-image-attlist">
@@ -5307,10 +5308,11 @@
     <rng:element name="draw:image">
       <rng:ref name="draw-image-attlist"/>
       <rng:choice>
         <rng:ref name="common-draw-data-attlist"/>
         <rng:ref name="office-binary-data"/>
+        <rng:ref name="svg-svg"/>
       </rng:choice>
       <rng:ref name="draw-text"/>
     </rng:element>
   </rng:define>
   <rng:define name="draw-image-attlist">
@@ -9640,10 +9642,11 @@
       <rng:element name="style:background-image">
         <rng:ref name="style-background-image-attlist"/>
         <rng:choice>
           <rng:ref name="common-draw-data-attlist"/>
           <rng:ref name="office-binary-data"/>
+          <rng:ref name="svg-svg"/>
           <rng:empty/>
         </rng:choice>
       </rng:element>
     </rng:optional>
   </rng:define>
@@ -13814,15 +13817,35 @@
           <rng:ref name="double"/>
         </rng:attribute>
       </rng:optional>
     </rng:element>
   </rng:define>
+  <rng:define name="svg-svg">
+    <rng:element name="svg:svg">
+      <rng:ref name="svgMarkup"/>
+    </rng:element>
+  </rng:define>
   <rng:define name="svg-title">
     <rng:element name="svg:title">
       <rng:text/>
     </rng:element>
   </rng:define>
+  <rng:define name="svgMarkup">
+    <dc:description>To avoid inclusion of the complete SVG schemata, anything is allowed in the schema within a svg:svg top-level element. Restrictions are contained in the specifcation text.</dc:description>
+    <rng:zeroOrMore>
+      <rng:choice>
+        <rng:attribute>
+          <rng:anyName/>
+        </rng:attribute>
+        <rng:text/>
+        <rng:element>
+          <rng:anyName/>
+          <rng:ref name="svgMarkup"/>
+        </rng:element>
+      </rng:choice>
+    </rng:zeroOrMore>
+  </rng:define>
   <rng:define name="tab-cycles">
     <rng:choice>
       <rng:value>records</rng:value>
       <rng:value>current</rng:value>
       <rng:value>page</rng:value>
@@ -17317,10 +17340,11 @@
   </rng:define>
   <rng:define name="text-list-level-style-image-attr">
     <rng:choice>
       <rng:ref name="common-draw-data-attlist"/>
       <rng:ref name="office-binary-data"/>
+      <rng:ref name="svg-svg"/>
     </rng:choice>
   </rng:define>
   <rng:define name="text-list-level-style-number-attr">
     <rng:interleave>
       <rng:optional>
{code}
Â

  was:
xy.z {{<svg:svg>}}

An {{<svg:svg>}} element contains a Conforming XML-Compatible SVG Markup Fragment as described in 2.4.3 in [https://www.w3.org/TR/2016/CR-SVG2-20160915/conform.html|https://www.w3.org/TR/2016/CR-SVG2-20160915/conform.htm]
 In the context of an OpenDocument document the {{<svg:svg>}} element shall have an {{xmlns}} attribute.

The {{<svg:svg>}} element is usable as child element of a {{<draw:fill-image>}} element, a {{<draw:image>}} element, a {{<style:background-image>}} element and a {{<text:list-level-style-image>}} element. If a {{<svg:svg>}} element is present, an {{xlink:href}} attribute in its parent element shall be ignored.

16.40.6 {{<draw:fill-image>}}
 The {{<draw:fill-image>}} element specifies either a link to a bitmap resource or contains an image in either a {{<office:binary-data>}} or a {{<svg:svg>}} child element. Producers shall not write the {{<office:binary-data>}} or {{<svg:svg>}} child element in case the document is represented as a package.

10.4.4 {{<draw:image>}}
 Add before "Note"
 The {{<draw:image>}} element shall have at most one of {{<office:binary-data>}} element and {{<svg:svg>}} element.

17.3 {{<style:background-image>}}
 The {{<style:background-image>}} element specifies an image as a background. It specifies either a link to a bitmap resource or contains an image in either a {{<office:binary-data>}} or a {{<svg:svg>}} child element. Producers shall not write the {{<office:binary-data>}} or {{<svg:svg>}} child element in case the document is represented as a package.

16.33 {{<text:list-level-style-image>}}
 A {{<text:list-level-style-image>}} specifies a list style where list items are preceded by images. This element can only be contained in list style elements. It specifies either a link to a bitmap resource or contains an image in either a {{<office:binary-data>}} or a {{<svg:svg>}} child element. Producers shall not write the {{<office:binary-data>}} or {{<svg:svg>}} child element in case the document is represented as a package.
{code:xml}
--- OpenDocument-schema-v1.3-wd06-with-fixes.rng	2018-07-19 17:55:01.575521400 +0200
+++ OpenDocument-schema-v1.3-wd06-with-SVG.rng	2018-07-19 18:33:59.091028700 +0200
@@ -4990,10 +4990,11 @@
         <rng:group>
           <rng:ref name="common-draw-data-attlist"/>
           <rng:empty/>
         </rng:group>
         <rng:ref name="office-binary-data"/>
+        <rng:ref name="svg-svg"/>
       </rng:choice>
       <!-- https://issues.oasis-open.org/browse/OFFICE-3933 -->
     </rng:element>
   </rng:define>
   <rng:define name="draw-fill-image-attlist">
@@ -5307,10 +5308,11 @@
     <rng:element name="draw:image">
       <rng:ref name="draw-image-attlist"/>
       <rng:choice>
         <rng:ref name="common-draw-data-attlist"/>
         <rng:ref name="office-binary-data"/>
+        <rng:ref name="svg-svg"/>
       </rng:choice>
       <rng:ref name="draw-text"/>
     </rng:element>
   </rng:define>
   <rng:define name="draw-image-attlist">
@@ -9640,10 +9642,11 @@
       <rng:element name="style:background-image">
         <rng:ref name="style-background-image-attlist"/>
         <rng:choice>
           <rng:ref name="common-draw-data-attlist"/>
           <rng:ref name="office-binary-data"/>
+          <rng:ref name="svg-svg"/>
           <rng:empty/>
         </rng:choice>
       </rng:element>
     </rng:optional>
   </rng:define>
@@ -13814,15 +13817,35 @@
           <rng:ref name="double"/>
         </rng:attribute>
       </rng:optional>
     </rng:element>
   </rng:define>
+  <rng:define name="svg-svg">
+    <rng:element name="svg:svg">
+      <rng:ref name="svgMarkup"/>
+    </rng:element>
+  </rng:define>
   <rng:define name="svg-title">
     <rng:element name="svg:title">
       <rng:text/>
     </rng:element>
   </rng:define>
+  <rng:define name="svgMarkup">
+    <dc:description>To avoid inclusion of the complete SVG schemata, anything is allowed in the schema within a svg:svg top-level element. Restrictions are contained in the specifcation text.</dc:description>
+    <rng:zeroOrMore>
+      <rng:choice>
+        <rng:attribute>
+          <rng:anyName/>
+        </rng:attribute>
+        <rng:text/>
+        <rng:element>
+          <rng:anyName/>
+          <rng:ref name="svgMarkup"/>
+        </rng:element>
+      </rng:choice>
+    </rng:zeroOrMore>
+  </rng:define>
   <rng:define name="tab-cycles">
     <rng:choice>
       <rng:value>records</rng:value>
       <rng:value>current</rng:value>
       <rng:value>page</rng:value>
@@ -17317,10 +17340,11 @@
   </rng:define>
   <rng:define name="text-list-level-style-image-attr">
     <rng:choice>
       <rng:ref name="common-draw-data-attlist"/>
       <rng:ref name="office-binary-data"/>
+      <rng:ref name="svg-svg"/>
     </rng:choice>
   </rng:define>
   <rng:define name="text-list-level-style-number-attr">
     <rng:interleave>
       <rng:optional>
{code}
Â


> Allow native SVG instead of <office:binary-data> for images
> -----------------------------------------------------------
>
>                 Key: OFFICE-3995
>                 URL: https://issues.oasis-open.org/browse/OFFICE-3995
>             Project: OASIS Open Document Format for Office Applications (OpenDocument) TC
>          Issue Type: New Feature
>            Reporter: Regina Henschel
>            Priority: Major
>             Fix For: ODF 1.4
>
>
> Currently applications need to use the <office:binary-data> element to store an embedded SVG-image, in case they will save to a single XML file (flat ODF). That means that the SVG-image has to be encoded to BASE64. But an SVG-image is an XML-document and therefore it would be possible to use it directly, similar as done with MathML objects. The proposal has the changes that allow use of native SVG for images where now <office:binary-data> is needed.
> Remarks to the proposal:
> The namespace attribute in element <svg:svg> is needed, because OpenDocument producer bind the prefix "svg" to the namespace "urn:oasis:names:tc:opendocument:xmlns:svg-compatible:1.0".
> The referenced document is a Candidate Recommendation. In case it will be released until the release of ODF 1.4, the URL has to be adapted.
> I'm not sure, whether the restriction "at most one" is correctly described by the schema.
> My proposal is not, to use <svg:svg> instead of the <draw:image>, because then the useful attributes draw:mime-type and draw:filter-name, and using <text:p> element for e.g. a caption would not be possible. And the proposal is not about adding an <svg:svg> element as drawing object on same level as e.g. <draw:rect>.
> Defining svg-svg follows the way it is done for math-math.
> I'm not sure, whether to force xlink in case of package format. That needs discussion.



--
This message was sent by Atlassian Jira
(v8.3.3#803004)


[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]