Repository navigation
[TIKA-4943] add tika table and list handling - #3277
Conversation
Generated-by: Glean Tau <various models> Signed-off-by: Henry Lindeman <henry.lindeman@glean.com>
Generated-by: Glean Tau <various models> Signed-off-by: Henry Lindeman <henry.lindeman@glean.com>
|
Let me know what you think of this from my 🤖 |
…tables-lists Signed-off-by: Henry Lindeman <henry.lindeman@glean.com>
Generated-by: Glean Tau <various models> Signed-off-by: Henry Lindeman <henry.lindeman@glean.com>
…deman-glean/tika into TIKA-4943-onenote-tables-lists Signed-off-by: Henry Lindeman <henry.lindeman@glean.com>
|
Just some 🤖 nits. Some look reasonable. |
There was a problem hiding this comment.
Warning
Copilot couldn't run its full agentic review because it didn't start before the timeout. Make sure your repository has a runner available, or add a copilot-code-review.yml file specifying one with the runs-on attribute. See the docs for more details.
Copilot review overview
5 open findings
walkRootObjectcan be invoked withobject == nullfromwalkObjectGroupRoots` (it iterates raw… · New walkTree()clearsdepthSkippedObjects, but the newly added caches (numberListInfoCache` and… · New This unit test allocates multiple 1MB arrays and builds 2001 list items; in constrained CI… · New This test depends on private method names/signatures and even the binary name of a nested type… · New This test reaches into a private field by name, which tightly couples it to an implementation… · New
What changed in this PR
Adds XHTML structure preservation for OneNote (FSSHTTPB) table and list content, and documents the enhancement for the upcoming release.
Changes:
- Emit
<table>/<tr>/<td>and<ol>/<ul>/<li>markup based on OneNote JCID structure and list metadata during tree walking. - Add list-style parsing, grouping, and caching to keep sibling list items within shared containers.
- Add extensive unit tests for tables/lists, fallback traversal, depth limits, and list-style edge cases; update release notes.
| File | Description |
|---|---|
.../MSOneStorePackage.java |
Adds table/list XHTML emission, list-style parsing/grouping, and depth-skip fallback behavior. |
.../OneNoteStructureJcid.java |
Introduces JCID index constants for structure nodes used by the walker. |
.../MSOneStorePackageTest.java |
Adds new tests covering table/list structure and fallback traversal behavior. |
CHANGES.txt |
Documents the new OneNote table/list structure preservation feature (TIKA-4943). |
🧠 Review effort: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
| if (!canWalkObject(object, visited, 0)) { | ||
| walkObject(object, objectsById, visited, authorRole, options, metadata, xhtml, 0, resourceInfo); | ||
| return; | ||
| } |
There was a problem hiding this comment.
here's the first three lines of walkObject:
private void walkObject(RevisionStoreObject object,
Map<ExGuid, RevisionStoreObject> objectsById, Set<ExGuid> visited,
AuthorRole authorRole, OneNoteTreeWalkerOptions options,
Metadata metadata, XHTMLContentHandler xhtml, int depth,
EmbeddedResourceInfo inheritedResourceInfo)
throws SAXException, TikaException, IOException {
if (object == null) {
return;
}Generated-by: Glean Tau <various models> Signed-off-by: Henry Lindeman <henry.lindeman@glean.com>
|
I was getting stackoverflow with jacoco. I moved the limit to something smaller, but still huge compared with what we'd expect in a real file. |
|
Will merge once green. Thank you! |



Thanks for your contribution to Apache Tika! Your help is appreciated!
Before opening the pull request, please verify that
TIKA-XXXX)[TIKA-XXXX] Issue or pull request title)./mvnw clean install(clean testalone cannot resolve the pipes plugin zips)Generated-by: <tool>in the commit message), and consider running the pre-flight in.skills/devs/pr-review/SKILL.md— fix what it finds; don't paste its report heremainbranch. If there are conflicts, please try to rebase the pull request branch on top of a freshly pulledmainbranchtika-bom/pom.xml.We will be able to faster integrate your pull request if these conditions are met. If you have any questions how to fix your problem or about using Tika in general, please sign up for the Tika mailing list. Thanks!