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

 


Help: OASIS Mailing Lists Help | MarkMail Help

opendocument-users message

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


Subject: Re: [opendocument-users] table:table required elements


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



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