View Single Post
Old 04-16-2019, 01:46 PM   #5
plznot
Junior Member
plznot began at the beginning.
 
Posts: 3
Karma: 10
Join Date: Apr 2019
Device: Kindle Paperwhite 2018
Quote:
Originally Posted by theducks View Post
Code:
//*[name()='h1' or name()='h2']
So I would have to manually change 1.1, 2.1, 3.1, ... to h2? I don't object, but I am not sure whether or not it's possible for an ODT document in LibreOffice. (at least I couldn't find how)

Is there a way to to a exclude something from an XPath match?
In Regex I would match
Code:
Chapter \d*(?!.)|Chapter \d*\.(?!1)\d*
and thus exclude the subchapters I don't want to have a page break on.
From what I can see XPath is too limited in features to do that though.
plznot is offline   Reply With Quote