Seraching for words with the Author API
Posted: Thu Oct 02, 2014 10:38 am
Hi,
I currently work with the Oxygen SDK to provide additional functionality to the Oxygen Author mode. The goal is to create a number of Author operations, that enable users unfamiliar with XML to add tags to a TEI document without having to write actual markup.
I would like to provide the users with an operation, that allows them to highlight a certain part of the text, for exampe the name of a person or a place, and then automatically surround all matching occurences of the selected text in the document with the necessary tags.
Unfortunately there doesn't seem to be any method in the Author API in Java, that is able to search the text of a document for a String or Regular Expression an return the offset of it's occurences.
Am I missing something? Or is there another (indirect) way to achieve the functionality I need?
Regards,
Maximilian
I currently work with the Oxygen SDK to provide additional functionality to the Oxygen Author mode. The goal is to create a number of Author operations, that enable users unfamiliar with XML to add tags to a TEI document without having to write actual markup.
I would like to provide the users with an operation, that allows them to highlight a certain part of the text, for exampe the name of a person or a place, and then automatically surround all matching occurences of the selected text in the document with the necessary tags.
Unfortunately there doesn't seem to be any method in the Author API in Java, that is able to search the text of a document for a String or Regular Expression an return the offset of it's occurences.
Am I missing something? Or is there another (indirect) way to achieve the functionality I need?
Regards,
Maximilian