Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: odfdom-0.8.6
    • Fix Version/s: odfdom-0.8.7
    • Component/s: java
    • Labels:
      None
    • Environment:
      Operating System: Windows
      Platform: PC

      Description

      Now the templete files which used to generated file in ODFDOM lack a namspace - xmlns:of="urn:oasis:names:tc:opendocument:xmlns:of:1.2" declaration, which lead to I can't realaize the list validation function for my customer.
      This namespace is defined in ODF Spec, see: http://docs.oasis-open.org/office/v1.2/cd05/OpenDocument-v1.2-cd05-part1.html#a_1_5_Namespaces, we should support.
      Patch will be sumbitted later.

      Devin

        Issue Links

          Activity

          devin created issue -
          Hide
          devin added a comment -

          Created an attachment (id=352)
          ODFTOOLKIT-154 patch

          Hi, Svante
          I have added namespace xmlns:of="urn:oasis:names:tc:opendocument:xmlns:of:1.2" declaration in OdfChartDocument.odc, OdfGraphicsDocument.odg, OdfPresentationDocument.odp, OdfSpreadsheetDocument.ods and OdfTextDocument.odt, as "of" is needed for element "table:content-validation ", while ODF Spec said this element is usable with the following elements: <office:chart>, <office:drawing>, <office:presentation>, <office:spreadsheet> and <office:text>.

          Pls review, thanks.
          PS:don't forget your work - define "of:" in dom class

          Devin

          Show
          devin added a comment - Created an attachment (id=352) ODFTOOLKIT-154 patch Hi, Svante I have added namespace xmlns:of="urn:oasis:names:tc:opendocument:xmlns:of:1.2" declaration in OdfChartDocument.odc, OdfGraphicsDocument.odg, OdfPresentationDocument.odp, OdfSpreadsheetDocument.ods and OdfTextDocument.odt, as "of" is needed for element "table:content-validation ", while ODF Spec said this element is usable with the following elements: <office:chart>, <office:drawing>, <office:presentation>, <office:spreadsheet> and <office:text>. Pls review, thanks. PS:don't forget your work - define "of:" in dom class Devin
          Hide
          Svante Schubert added a comment -

          Did you validated all templates, I will not do it if you say you did.
          Could you add a test case for adding a cell with formular attribute via ODFDOM API? Not for the templates, but to test general usage?

          I will push the change after your answer..

          Regards,
          Svante

          Show
          Svante Schubert added a comment - Did you validated all templates, I will not do it if you say you did. Could you add a test case for adding a cell with formular attribute via ODFDOM API? Not for the templates, but to test general usage? I will push the change after your answer.. Regards, Svante
          Hide
          devin added a comment -

          Hi, Svante

          Yes, I have validated all templates and all of them are valid.
          About the test case, you can reference the method testGetSetFormula of TableCellTest in package org.odftoolkit.odfdom.doc.table which has been existed in master repository. This method will create a documnet with
          <table:table-cell table:formula="of:=[.I2]*4" /> , a formula attribute is included.

          Devin

          > Did you validated all templates, I will not do it if you say you did.
          > Could you add a test case for adding a cell with formular attribute via ODFDOM
          > API? Not for the templates, but to test general usage?
          >
          > I will push the change after your answer..
          >
          > Regards,
          > Svant

          Show
          devin added a comment - Hi, Svante Yes, I have validated all templates and all of them are valid. About the test case, you can reference the method testGetSetFormula of TableCellTest in package org.odftoolkit.odfdom.doc.table which has been existed in master repository. This method will create a documnet with <table:table-cell table:formula="of:= [.I2] *4" /> , a formula attribute is included. Devin > Did you validated all templates, I will not do it if you say you did. > Could you add a test case for adding a cell with formular attribute via ODFDOM > API? Not for the templates, but to test general usage? > > I will push the change after your answer.. > > Regards, > Svant
          Hide
          Svante Schubert added a comment -

          I fear we still got a general problem here..

          The specification writes
          "D.3)If the namespace prefix of a style:condition, table:condition, table:expression, table:formula or text:formula attribute is associated with the "urn:oasis:names:tc:opendocument:xmlns:of:1.2" namespace, or if a namespace prefix is omitted for any of these attributes, the syntax of any formula which is contained in the values of these attributes shall conform to part 2 of this specification."

          http://docs.oasis-open.org/office/v1.2/cd05/OpenDocument-v1.2-cd05-part1.html#OpenDocument_Document

          http://docs.oasis-open.org/office/v1.2/cd05/OpenDocument-v1.2-cd05-part1.html#attribute-table_formula

          Looking at our test case adding the formula:
          If the original document does not already have the formula ODFDOM will not add it.

          Adding it to our templates will not fix the problem, as a user might open his own file and add a formula or even would like to add a formula of his choice with a different namespace.

          The question remains:
          How can we make it possible to add another namespace prefix and namespace URL toegether with the attibute?

          I will add the given patch, but I keep this issue open as it does not solve the general problem.

          We need to be able to give the user the capability to add a custom namespace for the prefix of the values of style:condition, table:condition, table:expression, table:formula or text:formula attributes.

          PS: I suggest that make the tests of OdfTableCellTest independent/orthogonal to each other reading a fresh ODS and writing its own ODS output. Currently all are reloading the same test file.

          If you remove the of namespace URL from the ODF input file it will not be added by ODFDOM.

          Svante

          Show
          Svante Schubert added a comment - I fear we still got a general problem here.. The specification writes "D.3)If the namespace prefix of a style:condition, table:condition, table:expression, table:formula or text:formula attribute is associated with the "urn:oasis:names:tc:opendocument:xmlns:of:1.2" namespace, or if a namespace prefix is omitted for any of these attributes, the syntax of any formula which is contained in the values of these attributes shall conform to part 2 of this specification." http://docs.oasis-open.org/office/v1.2/cd05/OpenDocument-v1.2-cd05-part1.html#OpenDocument_Document http://docs.oasis-open.org/office/v1.2/cd05/OpenDocument-v1.2-cd05-part1.html#attribute-table_formula Looking at our test case adding the formula: If the original document does not already have the formula ODFDOM will not add it. Adding it to our templates will not fix the problem, as a user might open his own file and add a formula or even would like to add a formula of his choice with a different namespace. The question remains: How can we make it possible to add another namespace prefix and namespace URL toegether with the attibute? I will add the given patch, but I keep this issue open as it does not solve the general problem. We need to be able to give the user the capability to add a custom namespace for the prefix of the values of style:condition, table:condition, table:expression, table:formula or text:formula attributes. PS: I suggest that make the tests of OdfTableCellTest independent/orthogonal to each other reading a fresh ODS and writing its own ODS output. Currently all are reloading the same test file. If you remove the of namespace URL from the ODF input file it will not be added by ODFDOM. Svante
          Hide
          Svante Schubert added a comment -

          I have continued my work on the XPath 179.
          After 179 integration this issue should be able to be fixed in a satisfying way.

          Show
          Svante Schubert added a comment - I have continued my work on the XPath 179. After 179 integration this issue should be able to be fixed in a satisfying way.
          Hide
          Svante Schubert added a comment -

          Devin,

          is this still a problem?

          • Svante
          Show
          Svante Schubert added a comment - Devin, is this still a problem? Svante
          Hide
          devin added a comment -

          (In reply to comment #6)
          > Devin,
          >
          > is this still a problem?
          >
          > - Svante

          Hi Svante,

          I check this issue use my test case, it works now.

          Thanks & Regards

          Devin

          Show
          devin added a comment - (In reply to comment #6) > Devin, > > is this still a problem? > > - Svante Hi Svante, I check this issue use my test case, it works now. Thanks & Regards Devin
          Hide
          devin added a comment -

          close this issue

          Show
          devin added a comment - close this issue
          Mark Thomas made changes -
          Field Original Value New Value
          issue.field.bugzillaimportkey 225 12524083
          made changes -
          Link This issue depends on ODFTOOLKIT-110 [ ODFTOOLKIT-110 ]
          Mark Thomas made changes -
          Workflow jira [ 12634098 ] Default workflow, editable Closed status [ 12634324 ]
          Mark Thomas made changes -
          Workflow Default workflow, editable Closed status [ 12634324 ] jira [ 12634776 ]
          Gavin made changes -
          Link This issue depends on ODFTOOLKIT-110 [ ODFTOOLKIT-110 ]
          Gavin made changes -
          Link This issue depends upon ODFTOOLKIT-110 [ ODFTOOLKIT-110 ]

            People

            • Assignee:
              Svante Schubert
              Reporter:
              devin
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development