Searching for topics that are missing the target
Oxygen general issues.
-
- Posts: 93
- Joined: Tue Oct 30, 2018 9:47 pm
Searching for topics that are missing the target
Is there a way to search for all the topics that are missing something particular? For example, all topics that don't have a shortdesc element, or that don't include a particular piece of text.
Thanks!
Thanks!
-
- Posts: 922
- Joined: Thu May 02, 2019 2:32 pm
Re: Searching for topics that are missing the target
Post by chrispitude »
Hi jmorales,
You could use XPath/XQuery Builder to search your .dita files for a particular XQuery expression.
For example, to find all top-level topics that have a <body> but not a <shortdesc> element, you could search for:
This identifies topics by elements that have a <body> element.
To find all topics that don't contain a certain phrase (case-insensitive),
This identifies topics by element name.
If you have other specific queries you'd like to perform, feel free to ask!
You could use XPath/XQuery Builder to search your .dita files for a particular XQuery expression.
For example, to find all top-level topics that have a <body> but not a <shortdesc> element, you could search for:
Code: Select all
/*[body][not(shortdesc)]
To find all topics that don't contain a certain phrase (case-insensitive),
Code: Select all
/(topic|concept|task|reference)[not(.//text()[matches(., 'some phrase', 'i')])]
If you have other specific queries you'd like to perform, feel free to ask!
-
- Posts: 93
- Joined: Tue Oct 30, 2018 9:47 pm
Re: Searching for topics that are missing the target
Thanks, chrispitude! That's very helpful. I'd already done some experimenting, but Xpath is not my strong point, so originally I wasn't able to come up with anything workable. However, your examples work very well.
Jump to
- Oxygen XML Editor/Author/Developer
- ↳ Feature Request
- ↳ Common Problems
- ↳ DITA (Editing and Publishing DITA Content)
- ↳ Artificial Intelligence (AI Positron Assistant add-on)
- ↳ SDK-API, Frameworks - Document Types
- ↳ DocBook
- ↳ TEI
- ↳ XHTML
- ↳ Other Issues
- Oxygen XML Web Author
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Content Fusion
- ↳ Feature Request
- ↳ Common Problems
- Oxygen JSON Editor
- ↳ Feature Request
- ↳ Common Problems
- Oxygen PDF Chemistry
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Feedback
- ↳ Feature Request
- ↳ Common Problems
- Oxygen XML WebHelp
- ↳ Feature Request
- ↳ Common Problems
- XML
- ↳ General XML Questions
- ↳ XSLT and FOP
- ↳ XML Schemas
- ↳ XQuery
- NVDL
- ↳ General NVDL Issues
- ↳ oNVDL Related Issues
- XML Services Market
- ↳ Offer a Service