Skip to main content
100%

Management XQuery Exercise

✓ Published0🌍 Public
CCliffordAnderson
Last edited Jul 31, 2015
Created on Jul 31, 2015

This example shows how XQuery 3.1 can structure and filter flat HTML documents, specifically extracting sections from a management report. It uses `fn:collection()` to load source documents, `fn:index-of()` and positional predicates to locate and slice a section between “ITEM 1A” and “ITEM 1B,” and text-matching (`contains text`) to filter paragraphs for keywords like “refinery.” The final query, `return-items-filtered.xqy`, cleans results by removing empty paragraphs, spans, and break tags, then wraps the output in a custom `<section>` element with an `item` attribute.

AI-generated description

Similar vizzes