Sorry for the delay, I've been a bit off colour for last week and
also, I'm quite confused %-)

Here is what I do:

void printNode(DFNode *n)
{
    if (n == NULL) return;
    printf("Tag = %d \t", n->tag);
    printf("seqNo = %zu \t", n->seqNo);
    printf("value = %s \t\t", n->value);
    if (n->tag > 2)
        printf("ODFKey = %s ", translateXMLEnumName[n->tag-10]);
    printf("\n");
}

where translateXMLEnumName is a homemade mapping that gives me the
enum name of the tag.

This is what I see:
Tag = 1485      seqNo = 2       value = (null)          ODFKey = OFFICE_SCRIPTS
Tag = 1475      seqNo = 3       value = (null)          ODFKey =
OFFICE_FONT_FACE_DECLS
Tag = 1600      seqNo = 4       value = (null)          ODFKey = STYLE_FONT_FACE
Tag = 1600      seqNo = 5       value = (null)          ODFKey = STYLE_FONT_FACE
Tag = 1600      seqNo = 6       value = (null)          ODFKey = STYLE_FONT_FACE
Tag = 1600      seqNo = 7       value = (null)          ODFKey = STYLE_FONT_FACE
Tag = 1600      seqNo = 8       value = (null)          ODFKey = STYLE_FONT_FACE
Tag = 1452      seqNo = 9       value = (null)          ODFKey =
OFFICE_AUTOMATIC_STYLES
Tag = 1736      seqNo = 10      value = (null)          ODFKey = STYLE_STYLE
Tag = 1767      seqNo = 11      value = (null)          ODFKey =
STYLE_TEXT_PROPERTIES
Tag = 1455      seqNo = 12      value = (null)          ODFKey = OFFICE_BODY
Tag = 1493      seqNo = 13      value = (null)          ODFKey = OFFICE_TEXT
Tag = 2294      seqNo = 14      value = (null)          ODFKey =
TEXT_SEQUENCE_DECLS
Tag = 2293      seqNo = 15      value = (null)          ODFKey =
TEXT_SEQUENCE_DECL
Tag = 2293      seqNo = 16      value = (null)          ODFKey =
TEXT_SEQUENCE_DECL
Tag = 2293      seqNo = 17      value = (null)          ODFKey =
TEXT_SEQUENCE_DECL
Tag = 2293      seqNo = 18      value = (null)          ODFKey =
TEXT_SEQUENCE_DECL
Tag = 2158      seqNo = 19      value = (null)          ODFKey = TEXT_H
Tag = 2         seqNo = 20      value = Headline One
Tag = 2241      seqNo = 21      value = (null)          ODFKey = TEXT_P
Tag = 2241      seqNo = 22      value = (null)          ODFKey = TEXT_P
Tag = 2         seqNo = 23      value = This is
Tag = 2270      seqNo = 24      value = (null)          ODFKey = TEXT_S
Tag = 2         seqNo = 25      value = paragraph one,
Tag = 2158      seqNo = 26      value = (null)          ODFKey = TEXT_H
Tag = 2         seqNo = 27      value = Headline Two
Tag = 2241      seqNo = 28      value = (null)          ODFKey = TEXT_P
Tag = 2241      seqNo = 29      value = (null)          ODFKey = TEXT_P
Tag = 2         seqNo = 30      value = This is a paragraph two,
Tag = 2158      seqNo = 31      value = (null)          ODFKey = TEXT_H
Tag = 2         seqNo = 32      value = Headline Three
.../etc etc
=====================================================

With these lines:

Tag = 2158      seqNo = 19      value = (null)          ODFKey = TEXT_H
Tag = 2         seqNo = 20      value = Headline One


I'm not too sure what to do with those --- 'Headline One' for example
should correspond to something like TEXT_H1 Since TEXT_H doesn't give
me the full story here --- I cannot seem to get ahold of the actual
value in the raw data in contents.xml, which would tell me that:

<text:h text:style-name="Heading_20_1" text:outline-level="1">Headline
One</text:h>

Trouble is, I just cannot see how to grab hold of either the markers:

text:style-name="Heading_20_1"  or   text:outline-level="1".

Which would make my life easy here.

The plan was to park all those markers in a neat little struct and
maybe also add function pointers to the rows, so I'd have { INCOMING,
..., function_name }, and then just can easily pick things off in the
traverseContent() function.

thanks for any hints!

G
-- 
Visit my Coding Diary: http://gabriela-gibson.blogspot.com/

Reply via email to