[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]
Subject: Re: [opendocument-users] table:table required elements
Svante, Welcome back :) And thank you so much for your precious comments. > On Feb 3, 2020, at 19:10, Svante Schubert <svante.schubert@gmail.com> wrote: > > Hello Jean, > > I have been over the weekend at the FOSDEM so I am just now stumbled over the emails. > > 1) First of all, you might use XSLT directly on the zipped XML by using the ODF XSLT Runner: > https://tdf.github.io/odftoolkit/docs/xsltrunner/ODFXSLTRunner.html > You will then use relative references to the styles.xml and meta.xml file. That will be useful when I test my xslt on a "real" file. > 2) I am afraid you are right, the narrative description of the elements in the ODF specification > http://docs.oasis-open.org/office/v1.2/os/OpenDocument-v1.2-os-part1.html#element-table_table > do not cover the semantics of the XML grammar: http://docs.oasis-open.org/office/v1.2/os/OpenDocument-v1.2-os-schema.rng > (You might want to browse the folder to see all documentation: http://docs.oasis-open.org/office/v1.2/os/) > You will find no "optional", "choice" nor "sequence" covered by it. > > But when looking on the XML grammar file providing this information, you will find out it is relatively hard to read. > You need to search for "define name="table-table" to see the definition of <table:table> > and look at "table-columns-and-groups", take a look at "table-columns-no-group", "table-columns"... > > <define name="table-columns-and-groups"> > <oneOrMore> > <choice> > <ref name="table-table-column-group"/> > <ref name="table-columns-no-group"/> > </choice> > </oneOrMore> > </define> > <define name="table-columns-no-group"> > <choice> > <group> > <ref name="table-columns"/> Indeed, it was there... > > The text file has over 18.000 lines, therefore questions such as: "Do a valid ODF document exist, where an <text:p> element can be nested within another <text:p> element?" are quite hard to answer. Therefore I have loaded the XML grammar into a Graph to answer such questions and create better documentation and source code. > Unfortunately, the work is not finished, but opensource as part of the ODF Toolkit. > The graph is so big with about 600 elements and 1600 attributes. > <2020-02-03_1057.png> > Therefore I split it into a graph for each XML element just big enough to see the child elements: > <2020-02-03_1059.png> Very interesting. > You may find the GraphML snippets as part of the ODF Toolkit 1.0.0 branch. > I visualized the GraphML using Gephi. > > See more details on the slides of my last LibreOffice conference talk. > Or in general at the slides of https://github.com/tdf/odftoolkit/blob/master/docs/docs/presentations/ Thank you. > Hope you are at the start of a great week! > Svante > > PS: We had once somewhere an ODF grammar file, where the user was reading not an ODF RelaxNG text file, but HTML file, which was providing links & references. > By this, you could at least jump quickly around through the grammar. We should indeed provide this at least. :-) Yes. Because with just some basic knowledge of xml any developer can understand what is required and what is not. Thank you again. I'll be able to move on now. Jean-Christophe
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]