Customising error messages
Oxygen general issues.
-
- Posts: 17
- Joined: Thu Sep 17, 2015 3:39 pm
Customising error messages
Hello!
I would like to customize the error message shown in the author mode.
At the moment it says "Error while parsing external reference".
How can I change this message?
Regards,
NissenJ
I would like to customize the error message shown in the author mode.
At the moment it says "Error while parsing external reference".
How can I change this message?
Regards,
NissenJ
-
- Posts: 1016
- Joined: Wed Nov 16, 2005 11:11 am
Re: Customising error messages
Post by alex_jitianu »
Hello,
The easiest way is from the CSS, like this:
Don't forget to decalre the oxygen namespace at the beginning of the CSS:
The downside of this approach is that you will replace all error messages, not just the one you mentioned. If this is indeed an inconvenience then you can use a StyleFilter java extension. From this extension you can also check the text from the error node and set the aforementioned styles only when you should. If you need to go this way please let me know and I can offer some additional hints.
Can you give me more details on why you want to change this message? Perhaps I can come up with a different solution.
Best regards,
Alex
The easiest way is from the CSS, like this:
Code: Select all
oxy|error {
visibility: -oxy-collapse-text;
}
oxy|error:after {
content: "My own message]" !important;
}
Code: Select all
@namespace oxy "http://www.oxygenxml.com/extensions/author";
Can you give me more details on why you want to change this message? Perhaps I can come up with a different solution.
Best regards,
Alex
-
- Posts: 17
- Joined: Thu Sep 17, 2015 3:39 pm
Re: Customising error messages
Hello,
Thank you for your help. Indeed I need different error messages.
We use our own reference resolver and the error messages should show the exact information about what went wrong depending on which exception was thrown in the java classes.
I would highly appreciate further hints on this topic, since I'm not that familiar with oxygen yet.
Thanks and regards,
NissenJ
Thank you for your help. Indeed I need different error messages.
We use our own reference resolver and the error messages should show the exact information about what went wrong depending on which exception was thrown in the java classes.
I would highly appreciate further hints on this topic, since I'm not that familiar with oxygen yet.
Thanks and regards,
NissenJ
-
- Posts: 1016
- Joined: Wed Nov 16, 2005 11:11 am
Re: Customising error messages
Post by alex_jitianu »
Hello,
If you have your own reference resolver then it means you have an implementation of an AuthorReferenceResolver. On AuthorReferenceResolver.resolveReference() you can identify the error situation and throw an ReferenceResolverException in which you will give the correct error message.
Best regards,
Alex
If you have your own reference resolver then it means you have an implementation of an AuthorReferenceResolver. On AuthorReferenceResolver.resolveReference() you can identify the error situation and throw an ReferenceResolverException in which you will give the correct error message.
Best regards,
Alex
-
- Posts: 17
- Joined: Thu Sep 17, 2015 3:39 pm
Re: Customising error messages
Hello,
Now the error message is shown at the bottom of the window, where the validation problems are. But I want it to be shown directly in the document, is that possible somehow? I can send you a screenshot via e-mail if you don't know what I mean.
Regards,
NissenJ
Now the error message is shown at the bottom of the window, where the validation problems are. But I want it to be shown directly in the document, is that possible somehow? I can send you a screenshot via e-mail if you don't know what I mean.
Regards,
NissenJ
-
- Posts: 1016
- Joined: Wed Nov 16, 2005 11:11 am
Re: Customising error messages
Post by alex_jitianu »
Hello,
Is it presented only in the results area at the bottom or both in the document and in the result area? The constructor of ReferenceResolverException has a showInResultsPanel boolean parameter. Please make sure its value is false.
Best regards,
Alex
Is it presented only in the results area at the bottom or both in the document and in the result area? The constructor of ReferenceResolverException has a showInResultsPanel boolean parameter. Please make sure its value is false.
Best regards,
Alex
-
- Posts: 17
- Joined: Thu Sep 17, 2015 3:39 pm
Re: Customising error messages
Hello,
it is presented only in the result area, not in the document. No matter what value the showInResultsPanel parameter has, the message is presented in the result area.
Regards,
NissenJ
it is presented only in the result area, not in the document. No matter what value the showInResultsPanel parameter has, the message is presented in the result area.
Regards,
NissenJ
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