Required attributes for text:numbered-paragraph
Jos van den Oever
jos at vandenoever.info
Sun May 20 12:13:54 BST 2012
On Saturday 19 May 2012 20:02:09 PM Gopalakrishna Bhat wrote:
> Hi,
>
> When trying to validate the document attached to
> https://bugs.kde.org/show_bug.cgi?id=299639 , the schema validator
> throws the following error
>
> error: element "text:numbered-paragraph" missing required attributes
> "text:continue-numbering" and "text:start-value"
>
> The ODF spec says that text:continue-numbering attribute has been
> depricated for text:numbered-paragraph. Shouldn't this attribute be
> optional in the schema?
Yes, that would make sense.
> Also for text:start-value, I think this too should be optional, since
> I might not want to give start value for each numbered paragraph.
>
> BTW the related section in the schema says
>
> <optional>
> <attribute name="text:style-name">
> <ref name="styleNameRef"/>
> </attribute>
> <attribute name="text:continue-numbering">
> <ref name="boolean"/>
> </attribute>
> <attribute name="text:start-value">
> <ref name="nonNegativeInteger"/>
> </attribute>
> </optional>
>
> OR Is this the problem with our validator then?
The group of attributes is optional. This means that if you specify
text:continue-numbering, you also need to provide text:start-value and
text:style-name. If a numbered paragraph is not a continuation, the value can
be derived from the preceding paragraph.
So the error message is correct given this schema, but the text:continue-
numbering should indeed be optional in the schema.
Cheers,
Jos
More information about the calligra-devel
mailing list