OASIS Open Document Format for Office Applications (OpenDocument) TC

 View Only

Re: Oasis Open Formula Document Metadata

  • 1.  Re: Oasis Open Formula Document Metadata

    Posted 12-13-2021 19:08
      |   view attached
    Hello Martin, Michael returned today from vacation and suggested that you might as well reuse part of the LibreOffice documentation (as from an implementing ODF) application, e.g. https://help.libreoffice.org/7.2/en-US/text/scalc/01/04060120.html For instance, the sources for the URL above can be found in the following LibreOffice Git repository: https://git.libreoffice.org/help/ Especially, for this example in the GIT repo at ./source/text/scalc/01/04060120.xhp To answer your question: The content.xml is one of the two mandatory XML files in every ODF document. All ODF files contain at least a content.xml and styles.xml (see ODF conformance 2.2.1-A2 ). In a nutshell, the ODF documents like ODS for the spreadsheet are zipped XML files and whatever the users like to bundle as images, videos, macros, etc. Yes, it reminds me we should have some "ODF primer" like other standards have, to offer an answer to the same basic questions which arises by developers for all ODF applications, like our ODF Toolkit (Michael and I are co-maintaining) - https://tdf.github.io/odftoolkit/ Within the content.xml you may find some (XML) patterns like the one I described earlier in the previous email, which might assist you to generate the data set you like to have from: http://docs.oasis-open.org/office/OpenDocument/v1.3/os/part4-formula/OpenDocument-v1.3-os-part4-formula.odt If you like, just send me an email and let us have a remote-JITIS-Tea-break about this? :-) Hope I could be of help to your quest! Svante Am Mi., 8. Dez. 2021 um 13:38 Uhr schrieb martin dawson < u1356770@gmail.com >: > First of all, there is a simple HTML reference to each function Thanks for the links. Unfortunately this html link isn't separated out into a separate page. so we can't do an API request to it because it would contain the other function data below it. Google sheets separates into separate pages like so: https://support.google.com/docs/answer/3093669?hl=en-GB This allows them to do API requests to each function page and display it in their sidebar for google sheets like so: However, we would still need a machine readable format (XML or JSON etc) because we also need to generate the helper below each cell like this: Which we cannot do with just API calls to a web page. > When I look into the content.xml of the ODT, I do not see any RDF metadata, but some tagging by ODF style names like Value_20_Type, see below Sorry I cannot find this `content.xml` file. Could you please send me the link for it? But yes I can absolutely generate JSON from XML if the data is there in the XML. > What do others use as separated function documentations? Could you share some links? I think Microsoft Excel & Google Sheets generate the documentation from their built in functions into a JSON file: https://docs.microsoft.com/en-us/office/dev/add-ins/excel/custom-functions-json-autogeneration https://developers.google.com/apps-script/guides/sheets/functions Not sure about other spreadsheets. On Wed, Dec 8, 2021 at 12:08 PM Svante Schubert < svante.schubert@gmail.com > wrote: Hello Martin, the best place to state such a question would be the office-comment list , but as you have already written us and I do like your idea and others might have the same problem, I put the ODF TC list on CC (and fixed two outdated emails). There will be an ODF TC editors call later today, where I bring this topic up, to see what we have. First of all, there is a simple HTML reference to each function: https://docs.oasis-open.org/office/OpenDocument/v1.3/os/part4-formula/OpenDocument-v1.3-os-part4-formula.html#BITXOR When I look into the content.xml of the ODT, I do not see any RDF metadata, but some tagging by ODF style names like Value_20_Type, see below < text:p text:style-name = "Text_20_body" >< text:span text:style-name = "Label" > Returns: </ text:span >< text:span text:style-name = "Value_20_Type" > Number </ text:span ></ text:p > Perhaps some JSON might be generated from this? If you like to give it a try, you might base your work on ODFDOM of the ODF Toolkit: https://tdf.github.io/odftoolkit/ What do others use as separated function documentations? Could you share some links? (You might not write to the official ODF TC list, but my reply would be seen there). Hope I could be of help, Svante Am Mi., 8. Dez. 2021 um 12:54 Uhr schrieb martin dawson < u1356770@gmail.com >: Hello, Sorry to tag multiple people in this email but I am reading this Oasis document here about the specifications for formulas: https://docs.oasis-open.org/office/OpenDocument/v1.3/OpenDocument-v1.3-part4-formula Is it possible to get each of the separate documented functions such as `SUM()` in a machine readable format such as an XML or JSON file that contains the Summary, Syntax, Notes etc? I'm looking to add documentation to my spreadsheet formulas on my website (like Excel & Google Sheets has) and would like to use the same descriptions as in this document. I found this link which is for XML files: https://docs.oasis-open.org/office/OpenDocument/v1.3/os/schemas/ But I can't seem to find any functions documentation metadata in here. Also, I think the copyright allows me to do this as long as I credit Open Oasis with the copyright notice for each function documentation? Thanks