get line number using offset position thorough API
Oxygen general issues.
-
- Posts: 27
- Joined: Tue Nov 17, 2009 10:16 pm
get line number using offset position thorough API
Post by guna@ebscohost.com »
Hi,
Is there a way to get the line number of caret offset in oxygen author mode.
Is there a way to get the line number of caret offset in oxygen author mode.
Re: get line number using offset position thorough API
Hi Guna,
The text is presented in the Author page with all text normalized and with many of the line breaks removed. Only on serialization (on Save) the text is formatted and line breaks are added to it.
So while working in the Author mode there is no way to map the current offset to the original line in the XML document.
What exactly are you trying to accomplish? Maybe we can give you a workaround.
Regards,
Radu
The text is presented in the Author page with all text normalized and with many of the line breaks removed. Only on serialization (on Save) the text is formatted and line breaks are added to it.
So while working in the Author mode there is no way to map the current offset to the original line in the XML document.
What exactly are you trying to accomplish? Maybe we can give you a workaround.
Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
<oXygen/> XML Editor
http://www.oxygenxml.com
-
- Posts: 27
- Joined: Tue Nov 17, 2009 10:16 pm
Re: get line number using offset position thorough API
Post by guna@ebscohost.com »
hi,
we have external links(like links to yahoo,google,etc..) inside the xml document, we have provided an icon to validate all the links inside the xml document(the validate opration, would go an check where the url is active and correct).
while doing so, if there is an error url. we want to direct the user to fix the issue by showing them the line number, saying that link is borken.
we have external links(like links to yahoo,google,etc..) inside the xml document, we have provided an icon to validate all the links inside the xml document(the validate opration, would go an check where the url is active and correct).
while doing so, if there is an error url. we want to direct the user to fix the issue by showing them the line number, saying that link is borken.
Re: get line number using offset position thorough API
Hi,
Maybe you can present in a not modal dialog's list all the problems to the users.
For each problem you will keep the AuthorNode for which the problem had occurred.
Then the user can click the problem in the list and you will select the node in the Author page like:
In this way the user has instant feedback for each problem.
Regards,
Radu
Maybe you can present in a not modal dialog's list all the problems to the users.
For each problem you will keep the AuthorNode for which the problem had occurred.
Then the user can click the problem in the list and you will select the node in the Author page like:
Code: Select all
authorAccess.getEditorAccess().select(problemNode.getStartOffset(), problemNode.getEndOffset());
Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
<oXygen/> XML Editor
http://www.oxygenxml.com
Jump to
- Oxygen XML Editor/Author/Developer
- ↳ Feature Request
- ↳ Common Problems
- ↳ DITA (Editing and Publishing DITA Content)
- ↳ 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