Page 1 of 1

Understanding Numbering Style

PostPosted: Tue Dec 31, 2019 9:07 am
by NKR8
Hello,

Please consider below contents of a open office document.
Image

In this document, there are 4 headers with below style information:

Header 1:
1 Tags needed for other Reqtify-Tests :
Paragraph Style:
Image

Header 2:
First Requirement
Paragraph Style:
Image

Header 3:
1.1 Next chapter (should be 1.1)
Paragraph Style:
Image

Header 4:
Second Requirement
Paragraph Style:
Image

As you can see, there is no number assigned to Header 2 [First Requirement] and Header 4 [Second Requirement] even though it has outline level 9.
I suppose, this is because it has Numbering Style = None

So, coming to my question:
I want to find out the headers which has some outline level but also has Numbering Style = None
And I want to find this information from content.xml and/or styles.xml

However, I do not find such information in these two files.
I am attaching content.xml and styles.xml with this post.

Could you please point me the right way to identify such information from the content.xml and/or styles.xml?

Thank you in advance.

Re: Understanding Numbering Style

PostPosted: Tue Dec 31, 2019 9:29 am
by Zizi64
Please upload the whole ODF type sample file here.

Re: Understanding Numbering Style

PostPosted: Tue Dec 31, 2019 9:32 am
by NKR8
OK. I am attaching the sample file.

Re: Understanding Numbering Style

PostPosted: Tue Dec 31, 2019 1:08 pm
by jrkrideau
Woell, the reason that First and second requirements are not ne\umbered is that Style REQ_IDdoes not have Numbering turned on. See your screen shots and Numbering Style.

I cannot help with the rest

BTW why are you using manual formatting for the text such as Text Color [sic] Red

Re: Understanding Numbering Style

PostPosted: Tue Dec 31, 2019 1:18 pm
by NKR8
Hello jrkrideau,

Thank you for the reply.
I know that First Requirement and Second Requirement are not numbered from OpenOffice UI, because their Numbering Style is None.
But, I want to know this information from content.xml and/or styles.xml. This is my original question.

Re: Understanding Numbering Style

PostPosted: Tue Dec 31, 2019 1:44 pm
by RoryOF
Then _you_ need to investigate content.xml or styles.xml with an XML editor, which will PrettyPrint the file for you. That makes extraction of the relevant formatting information easier.

Re: Understanding Numbering Style

PostPosted: Tue Dec 31, 2019 1:53 pm
by NKR8
I think, you did not understand my first post.
I said that, I looked into the content.xml as well as styles.xml, but I do not find any style or property or such element which will tell me that First Requirement heading has numbering style with value None

What I see in content.xml and styles.xml for First Requirement is below:

Code: Select all   Expand viewCollapse view
<text:h text:style-name="REQ_5f_ID" text:outline-level="9">First Requirement</text:h>


Code: Select all   Expand viewCollapse view
<style:style style:name="REQ_5f_ID" style:display-name="REQ_ID" style:family="paragraph" style:parent-style-name="Text_20_body" style:next-style-name="REQ_5f_Info" style:default-outline-level="9" style:list-style-name="" style:class="text" style:master-page-name="">
<style:paragraph-properties fo:margin-top="0.1181in" fo:margin-bottom="0.0827in" style:page-number="auto" fo:keep-with-next="always"/>
<style:text-properties fo:color="#0047ff" fo:font-size="10.5pt" fo:font-weight="900"/>
</style:style>


Here, I do not find information about "Numbering Style = None"

There is a property style:list-style-name="" for <style:style> But, as per my understanding, this is not the indication of "Numbering Style = None"

I hope, you understood my question.

Re: Understanding Numbering Style

PostPosted: Tue Dec 31, 2019 2:33 pm
by Bill
NKR8 wrote:There is a property style:list-style-name="" for <style:style> But, as per my understanding, this is not the indication of "Numbering Style = None"

To me, it looks like it does mean "Numbering Style = None". Apply a numbering style to REQ_ID and see how that affects styles.xml. The numbering style name should appear between the quotation marks.

Re: Understanding Numbering Style

PostPosted: Tue Dec 31, 2019 4:09 pm
by RoryOF
I agree with Bill. The "" means no numbering style selected. If one modifies the style definition to apply a Numbering style, the"" is filled with the selected numbering style name.

Re: Understanding Numbering Style

PostPosted: Tue Dec 31, 2019 4:37 pm
by Lupp
If you (the OQ) want to understand documents to be stored to ODF file types on a level addressed by your question, and to be able to analyze the .xml elements wrapped into such files, you can not much rely on the user interface of AOO or of LibO or of any software claiming to be capable of using ODF, among them MS Word e.g. The UI versions they use are not standardized at all, and they may name items the way they choose.

You will rather need to study and to understand the ODF specification itself. I don't. But if i needed I would look into
http://docs.oasis-open.org/office/v1.2/ ... -part1.odt, and very rarely I actually did. It's not child's play, imo.