Hot links in schematron error messages
Post here questions and problems related to oXygen frameworks/document types.
-
- Posts: 163
- Joined: Sat Aug 28, 2010 1:23 am
Hot links in schematron error messages
In my schematron message, I sometimes include hyperlinks to point the user to a source for more information about their problem:
Is there some markup I can add to make these links hot when they view the message in Oxygen?
Thanks,
David
Code: Select all
<sch:rule context="db:book|db:part|db:section|db:chapter|db:appendix|db:preface|db:table|db:figure|db:simplesect">
<sch:assert test="@xml:id">xml:id required on <xsl:value-of select="local-name(.)"/>. https://example.com/wiki/xmlid-attributes</sch:assert>
</sch:rule>
Thanks,
David
-
- Posts: 163
- Joined: Sat Aug 28, 2010 1:23 am
Re: Hot links in schematron error messages
Another, similar approach would be to support some kind of help content inside the framework, such that I could add something to map certain error to certain help, then Oxygen adds a help icon or link to the message opening the help content.
A hot link is fine too, especially if it's also hot in the Errors tab. I worry that many users won't know to do Show Message. Or perhaps double clicking on a message in the Errors tab should be the same as Right-Click->Show Message.
David
A hot link is fine too, especially if it's also hot in the Errors tab. I worry that many users won't know to do Show Message. Or perhaps double clicking on a message in the Errors tab should be the same as Right-Click->Show Message.
David
-
- Posts: 388
- Joined: Thu Jul 01, 2004 12:29 pm
Re: Hot links in schematron error messages
Hello David,
If you want to add link to the Schematrom message you must specify the link in the value of the @see attribute. The attribute can be added on the report/assert element or on the rule (as "xephon" said). The links are presented as a clickable icon, both on the tooltip that is presented when you hover over an error in editor, and in the results view. For your example the Schematron rule should look like this:
If you want to add some a help inside a framework you can use a catalog to redirect the links to the local help. For this you must create a catalog file, and add it to your framework using the Catalogs tab from the Document Type configuration dialog box.
For your example the catalog can look like the one below:
Redirects all the links to the "https://example.com/wiki", to your local "doc" folder.
You can read more about how to configure a catalog here:
https://www.oxygenxml.com/doc/versions/ ... alogs.html
https://www.oxygenxml.com/doc/versions/ ... alogs.html
Best Regards,
Octavian
If you want to add link to the Schematrom message you must specify the link in the value of the @see attribute. The attribute can be added on the report/assert element or on the rule (as "xephon" said). The links are presented as a clickable icon, both on the tooltip that is presented when you hover over an error in editor, and in the results view. For your example the Schematron rule should look like this:
Code: Select all
<sch:rule context="db:book|db:part|db:section|db:chapter|db:appendix|db:preface|db:table|db:figure|db:simplesect">
<sch:assert test="@xml:id" see="https://example.com/wiki/xmlid-attributes.html">
xml:id required on <xsl:value-of select="local-name(.)"/>.</sch:assert>
</sch:rule>
For your example the catalog can look like the one below:
Code: Select all
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE catalog PUBLIC "-//OASIS//DTD XML Catalogs V1.1//EN" "http://www.oasis-open.org/committees/entity/release/1.1/catalog.dtd">
<catalog xmlns="urn:oasis:names:tc:entity:xmlns:xml:catalog">
<rewriteURI uriStartString="https://example.com/wiki" rewritePrefix="doc/"/>
</catalog>
You can read more about how to configure a catalog here:
https://www.oxygenxml.com/doc/versions/ ... alogs.html
https://www.oxygenxml.com/doc/versions/ ... alogs.html
Best Regards,
Octavian
Octavian Nadolu
<oXygen/> XML Editor
http://www.oxygenxml.com
<oXygen/> XML Editor
http://www.oxygenxml.com
-
- Posts: 9
- Joined: Tue Mar 02, 2021 6:59 pm
Re: Hot links in schematron error messages
Thank you, I found this helpful. I was able to add a URL to a rule. The link appears as a small icon in the rule message. Is there a way to add link text to the rule so that the URL appears as text?
-
- Posts: 388
- Joined: Thu Jul 01, 2004 12:29 pm
Re: Hot links in schematron error messages
Hello,
Thanks for your feedback.
Unfortunately, you cannot add the text link in the message. We have an issue on our issue tracker to add this support in a future version. I added your comment on the issue and increased its priority. When the issue will be implemented we will update this thread.
Best Regards,
Octavian
Thanks for your feedback.
Unfortunately, you cannot add the text link in the message. We have an issue on our issue tracker to add this support in a future version. I added your comment on the issue and increased its priority. When the issue will be implemented we will update this thread.
Best Regards,
Octavian
Octavian Nadolu
<oXygen/> XML Editor
http://www.oxygenxml.com
<oXygen/> XML Editor
http://www.oxygenxml.com
-
- Posts: 9
- Joined: Tue Mar 02, 2021 6:59 pm
Re: Hot links in schematron error messages
Some background on our need for link text-- we're using Schematron to provide rules, but we also see potential in using Schematron to provide guidance. For rules on guidance, we need to link each rule message to more information so that the user can make an informed decision.
-
- Posts: 388
- Joined: Thu Jul 01, 2004 12:29 pm
Re: Hot links in schematron error messages
Thanks for you feedback.
We have a sample implementation of an intelligent integrated style guide, that works both in Oxygen XML Editor and Oxygen XML Web Author.
https://github.com/oxygenxml/integrated-styleguide
Best Regards,
Octavian
We have a sample implementation of an intelligent integrated style guide, that works both in Oxygen XML Editor and Oxygen XML Web Author.
https://github.com/oxygenxml/integrated-styleguide
Best Regards,
Octavian
Octavian Nadolu
<oXygen/> XML Editor
http://www.oxygenxml.com
<oXygen/> XML Editor
http://www.oxygenxml.com
-
- Posts: 9431
- Joined: Fri Jul 09, 2004 5:18 pm
Re: Hot links in schematron error messages
Hi,
We have not yet implemented this feature, I added your feedback to the opened issue and we'll update this forum thread if it gets implemented.
In the meantime the only way for this is to use the @see attribute on the pattern or the assert to provide a link to the documentation for the entire Schematron rule.
Regards,
Radu
We have not yet implemented this feature, I added your feedback to the opened issue and we'll update this forum thread if it gets implemented.
In the meantime the only way for this is to use the @see attribute on the pattern or the assert to provide a link to the documentation for the entire Schematron rule.
Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
<oXygen/> XML Editor
http://www.oxygenxml.com
-
- Posts: 9
- Joined: Tue Mar 02, 2021 6:59 pm
Re: Hot links in schematron error messages
Thanks Radu. Another question related to links: any link that I add to a Schematron message will default to Internet Explorer. I would like to have Chrome as the default browser. Is the default browser for links determined by Schematron or by the DITA authoring tool (we use Oxygen)?
Thanks again!
Dwight
Thanks again!
Dwight
-
- Posts: 388
- Joined: Thu Jul 01, 2004 12:29 pm
Re: Hot links in schematron error messages
Hello Dwight,
Oxygen opens the links in the system default browser. You can set a different browser from Options >Preferences->Global option page, by changing the "Default Internet browser" option.
https://www.oxygenxml.com/doc/versions/ ... qn_bgk_54b
Best Regards,
Octavian
Oxygen opens the links in the system default browser. You can set a different browser from Options >Preferences->Global option page, by changing the "Default Internet browser" option.
https://www.oxygenxml.com/doc/versions/ ... qn_bgk_54b
Best Regards,
Octavian
Octavian Nadolu
<oXygen/> XML Editor
http://www.oxygenxml.com
<oXygen/> XML Editor
http://www.oxygenxml.com
-
- Posts: 9
- Joined: Tue Mar 02, 2021 6:59 pm
Re: Hot links in schematron error messages
Hi Octavian,
Thank you for your quick reply. The menu options on the version of iXiasoft that I'm using are a little different. To reach an option for changing the default browser in Oxygen, the following route is available:
Window > Preferences > General > Web Browser
On the Web Browser panel, I have these options:
Use internal web browser
Use external web browser
Under "External browsers" are these options:
Default system web browser
Firefox
Internet Explorer
Chrome
Thanks again!
Dwight
Thank you for your quick reply. The menu options on the version of iXiasoft that I'm using are a little different. To reach an option for changing the default browser in Oxygen, the following route is available:
Window > Preferences > General > Web Browser
On the Web Browser panel, I have these options:
Use internal web browser
Use external web browser
Under "External browsers" are these options:
Default system web browser
Firefox
Internet Explorer
Chrome
- I have selected Chrome, chose Apply > Apply and Close. The link in the Schematron message opens in IE.
- I have done the same but restarted iXiasoft. Same result.
- I have set the default browser on my computer to Chrome, and in the options under External browsers chose Default system web browser. Same result.
Thanks again!
Dwight
-
- Posts: 388
- Joined: Thu Jul 01, 2004 12:29 pm
Re: Hot links in schematron error messages
Hi Dwight,
Yes, for the Eclipse plugin we do not have the "Default Internet browser" option, and it seems that in this case we do not use the Web Browser option from the Eclipse settings.
The solution that I see in this case is to make sure the Chrome is set as default browser on your system. If you open an html file from the from the file system what browser is used?
Best Regards,
Octavian
Yes, for the Eclipse plugin we do not have the "Default Internet browser" option, and it seems that in this case we do not use the Web Browser option from the Eclipse settings.
The solution that I see in this case is to make sure the Chrome is set as default browser on your system. If you open an html file from the from the file system what browser is used?
Best Regards,
Octavian
Octavian Nadolu
<oXygen/> XML Editor
http://www.oxygenxml.com
<oXygen/> XML Editor
http://www.oxygenxml.com
-
- Posts: 9
- Joined: Tue Mar 02, 2021 6:59 pm
Re: Hot links in schematron error messages
Hi Octavian,
The solution that I see in this case is to make sure the Chrome is set as default browser on your system. If you open an html file from the from the file system what browser is used?
Answer: Chrome. I've worked with our IT support team to set Chrome as the default browser on my system. Any link on my machine will open Chrome by default.
Is there a way to modify the Eclipse plugin to have it default to opening Chrome to run links?
Thanks!
Dwight
The solution that I see in this case is to make sure the Chrome is set as default browser on your system. If you open an html file from the from the file system what browser is used?
Answer: Chrome. I've worked with our IT support team to set Chrome as the default browser on my system. Any link on my machine will open Chrome by default.
Is there a way to modify the Eclipse plugin to have it default to opening Chrome to run links?
Thanks!
Dwight
-
- Posts: 2879
- Joined: Tue May 17, 2005 4:01 pm
Re: Hot links in schematron error messages
Hello,
What version of the Oxygen plugin for Eclipse are you using (Window > Preferences > Oxygen XML Editor) and what version of the Eclipse platform (Help > About, Eclipse Platform), if any is visible?
Please check the default system browser for the http and https protocols. Note that file associations (like .html) are not involved in this case.
Open a Command Prompt or Run box and type:
and
The Oxygen website will open in the default browser for the respective protocol. This is just to confirm the default browser.
Regards,
Adrian
What version of the Oxygen plugin for Eclipse are you using (Window > Preferences > Oxygen XML Editor) and what version of the Eclipse platform (Help > About, Eclipse Platform), if any is visible?
Please check the default system browser for the http and https protocols. Note that file associations (like .html) are not involved in this case.
Open a Command Prompt or Run box and type:
Code: Select all
start http://www.oxygenxml.com
Code: Select all
start https://www.oxygenxml.com
Regards,
Adrian
Adrian Buza
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com
-
- Posts: 9
- Joined: Tue Mar 02, 2021 6:59 pm
Re: Hot links in schematron error messages
Hi Adrian,
Thanks for your help.
>What version of the Oxygen plugin for Eclipse are you using (Window > Preferences > Oxygen XML Editor)...
XML Author 21.1, build 2019090904
>what version of the Eclipse platform (Help > About, Eclipse Platform)...
Version: Oxygen.3a (4.7.3a)
Build id: M20180330-0640
>Please check the default system browser for the http and https protocols. Open a Command Prompt or Run box and type:
>start http://www.oxygenxml.com
and
>start https://www.oxygenxml.com
From a Command Prompt in DOS, those commands open each protocol in Chrome.
Best regards,
Dwight
Thanks for your help.
>What version of the Oxygen plugin for Eclipse are you using (Window > Preferences > Oxygen XML Editor)...
XML Author 21.1, build 2019090904
>what version of the Eclipse platform (Help > About, Eclipse Platform)...
Version: Oxygen.3a (4.7.3a)
Build id: M20180330-0640
>Please check the default system browser for the http and https protocols. Open a Command Prompt or Run box and type:
>start http://www.oxygenxml.com
and
>start https://www.oxygenxml.com
From a Command Prompt in DOS, those commands open each protocol in Chrome.
Best regards,
Dwight
-
- Posts: 2879
- Joined: Tue May 17, 2005 4:01 pm
Re: Hot links in schematron error messages
Hello,
We have tested with your exact build, XML Author 21.1, build 2019090904 on two versions of Eclipse, Version: 2018-12 (4.10) Build id: I20181206-0815 and Version: Oxygen.3a Release (4.7.3a) Build id: 20180405-1200.
It behaves correctly on both, the default browser was opened.
These are the test files that I used:
sample.xml
sample.sch
I opened sample.xml and an error was highlighted on <a/>. Keeping the mouse pointer over <a/> showed a tooltip window with the message "Click the icon for more". Clicking on the book icon from that window, opened the default browser (Firefox in my case).
I even changed the default browser from Firefox to Edge and it opened in Edge.
If possible, please test with the same files.
Regards,
Adrian
We have tested with your exact build, XML Author 21.1, build 2019090904 on two versions of Eclipse, Version: 2018-12 (4.10) Build id: I20181206-0815 and Version: Oxygen.3a Release (4.7.3a) Build id: 20180405-1200.
It behaves correctly on both, the default browser was opened.
These are the test files that I used:
sample.xml
Code: Select all
<?xml-model href="sample.sch" type="application/xml" schematypens="http://purl.oclc.org/dsdl/schematron"?>
<a/>
Code: Select all
<?xml version="1.0" encoding="UTF-8"?>
<sch:schema xmlns:sch="http://purl.oclc.org/dsdl/schematron" queryBinding="xslt2"
xmlns:sqf="http://www.schematron-quickfix.com/validator/process">
<sch:pattern>
<sch:rule context="a">
<sch:assert test="false()" see="https://www.oxygenxml.com">Click the icon for more</sch:assert>
</sch:rule>
</sch:pattern>
</sch:schema>
I even changed the default browser from Firefox to Edge and it opened in Edge.
If possible, please test with the same files.
Regards,
Adrian
Adrian Buza
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com
-
- Posts: 9
- Joined: Tue Mar 02, 2021 6:59 pm
Re: Hot links in schematron error messages
<resolved>
Thank you for your help Adrian, Octavian, and Radu. The problem is solved-- Oxygen now resolves links according to the Default Browser settings. When I set the Chrome as the default browser, links are resolved in Chrome. When I change the Default Browser setting to "Firefox", links are resolved in Firefox. Now I just have to determine what exactly fixed the problem! Here's what I did::
Best,
Dwight
Thank you for your help Adrian, Octavian, and Radu. The problem is solved-- Oxygen now resolves links according to the Default Browser settings. When I set the Chrome as the default browser, links are resolved in Chrome. When I change the Default Browser setting to "Firefox", links are resolved in Firefox. Now I just have to determine what exactly fixed the problem! Here's what I did::
- Disabled Microsoft Bing. Bing seems to masquerade as IE. I had disabled IE as the default browser on my system and tested to ensure that links on my system would default to Chrome. It may be that Bing was opening by default, and not IE. .
After disabling Bing from my system, the Default Browser settings worked. However, I'm not sure if disabling Bing is what truly solved the issue.
- Ran tests using the sample code that you provided in this thread, thank you. This worked. However, after this success, I ran tests using the old SCH file I''d been using, and the issue was still resolved.
- Exited the Eclipse plug-in, restarted it, and then tested the links each time I changed a setting under Default Browser,. This worked and may in fact be the actual solution to the issue..
I was sure that I had tried that approach before. But without a solid QA plan to follow, I can't be 100% certain.
Best,
Dwight
Return to “SDK-API, Frameworks - Document Types”
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