[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]
Subject: Re: [opendocument-users] table:table required elements
Regina, Also, the reference has: file:///Users/suzume/Downloads/OpenDocument-v1.2-os/OpenDocument-v1.2-os-part1.html#element-table_table-column The <table:table-column> element is *usable* within the following elements: <table:table> 9.1.2, <table:table-column-group>9.1.10, <table:table-columns> 9.1.12 and <table:table-header-columns> 9.1.11. (emphasis mine) and to me *useable* is not synonymous with "required" or a similar term that would indicate a required element. That's also where I found the information lacking in the reference. Jean-Christophe > On Feb 2, 2020, at 10:13, Jean-Christophe Helary <jean.christophe.helary@traduction-libre.org> wrote: > > Regina, > > Thank you so much for your detailed explanations. That is exactly what I was looking for. I'm more used to the DTD syntax so I was not sure what to make of that rnc file. > > I think though that the spec reference hosted at Oasis should contain such information by using standard markers (?/+/etc.) that would be very helpful. > > Regarding the file included in emacs I found that: > > table-table = > element table:table { > table-table-attlist, > table-title?, > table-desc?, > table-table-source?, > office-dde-source?, > table-scenario?, > office-forms?, > table-shapes?, > table-columns-and-groups, > table-rows-and-groups, > table-named-expressions? > } > > I guess there is the way the namespaces are written that also confused me but I could not find relevant information related to table:table-column (or table-table-column ?) > > Anyway, I found the compact relax ng syntax tutorial so I'll check it too so that this kind of thing does not happen again. > > Now that I know what's wrong with my file, I can proceed with the xslt :) I'll probably have a few questions then, especially regarding relevant tag attributes! > > Jean-Christophe > >> On Feb 2, 2020, at 4:17, Regina Henschel <rb.henschel@t-online.de> wrote: >> >> Hi Jean-Christophe, >> >> Jean-Christophe Helary schrieb am 01-Feb-20 um 17:32: >>> Regina, >>> Thank you very much for your reply. >>>> It seems to me, that a "table:table-column" element is missing in your file. It is allowed, that it is empty; but it is not optional. >>> I am not so skilled as to be able to parse the relax schema and the OpenDocument-v1.2-os-part1.html document does not seem to give that information. >>> Would you be able to tell my what I am missing in the references in my possession that is actually telling me that table:table-column is a requirement? >> >> Using the schema manually you get: >> "table:table" refers "table-columns-and-groups" >> Unfortunately a ref has not indication, whether it is optional or not. So you need to follow it. >> "table-columns-and-groups" has _<oneOrMore>_ of either "table-table-column-group" or "table-columns-no-group". >> >> "table-table-column-group" is element "table:table-column-group". Because emacs misses contents, we can ignore the attlist and need only follow the ref "table-columns-and-groups". That is recursive, see above. >> >> "table-columns-no-group" has some <optional> parts, which we can ignore here. But we need to follow the ref. That is either "table-columns" or "table-table-header-columns". >> >> "table-table-header-columns" is element "table:table-header-columns", which has _<oneOrMore>_ of ref "table-table-column". >> >> "table-columns" has either a ref to "table-table-columns" or _<oneOrMore>_ "table-table-column" >> >> "table-table-columns" is element "table:table-Columns", which has _<oneOrMore>_ ref "table-table-column". >> >> So on each way we get that <oneOrMore> of "table-table-column" is needed. >> >> >> And finally >> <define name="table-table-column"> >> <element name="table:table-column"> >> <ref name="table-table-column-attlist"/> >> <empty/> >> </element> >> </define> >> >> That is an empty element, which has some Attributes. >> >> >> If you use the file Emacs.app/Contents/Resources/etc/schema/od-schema-v1.2-os.rnc, you will find, that it has a different syntax, but the same information. >> In that notation <optional> has the syntax "?" and <oneOrMore> has the syntax "+". >> >> >> There exists some tools to validate a file against a schema. A search should give you some, which are available for your operating system. Perhaps one of them is more verbose than emacs and tells you, which element is actually missing. >> >> >> A very different way might be to use ODFDOM of the odftoolkit https://odftoolkit.org/. It moved recently from 'Apache' to 'The Document Foundation'. The project has a mailing list, where you can ask, whether it is suitable for your purpose. >> >> Kind regards >> Regina > > --------------------------------------------------------------------- > To unsubscribe, e-mail: opendocument-users-unsubscribe@lists.oasis-open.org > For additional commands, e-mail: opendocument-users-help@lists.oasis-open.org > Jean-Christophe Helary ----------------------------------------------- http://mac4translators.blogspot.com @brandelune
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]