Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for sections in Wordprocessing namespace #41

Closed
Nautigsam opened this issue May 21, 2015 · 2 comments
Closed

Add support for sections in Wordprocessing namespace #41

Nautigsam opened this issue May 21, 2015 · 2 comments

Comments

@Nautigsam
Copy link

I think it would be great to add the support of sections, it should be possible to:

  • identify a section as a class in the same way we can identify a Paragraph
  • get the paragraphs that compose the section
  • test if the section is a final section or not (as defined in the reference §17.6.17)
  • many other possibilities...

I'm ready to implement it if you think it's a good idea.

@ThomasBarnekow
Copy link
Collaborator

@Nautigsam and @EricWhiteDev I'd say it's a good idea.

What exactly do you mean with your first point ("identify a section as a class ...")? The SectionProperties class represents a section. However, it certainly doesn't identify a section like the Paragraph class identifies a paragraph, because a SectionProperties instance does not contain the elements of a section. The w:sectPr element represented by a SectionProperties instance just marks the end of a section. Thus, "getting the paragraphs that compose a section" would add value.

Testing "if the section is a final section or not" is very straightforward. If it is contained in a w:pPr element (ParagraphProperties instance), it's not a final section. The final section is represented by a w:sectPr element the parent of which is the w:body element (Body instance).

@EricWhiteDev
Copy link
Contributor

Have you seen the functionality, SplitOnSections in DocumentBuilder.cs? You pass it an open WordprocessingDocument, and it returns N documents, each document containing one section from the source document.

From a philosophical point of view, we are going to be very careful before adding markup specific functionality into the SDK. Markup specific functionality might be better put in Open-Xml-PowerTools. (git repo coming soon). We're thinking of what to add to the SDK, but right now we have more than enough work getting some core issues addressed that apply to all of Open XML as a whole.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants