How to remove the href attribute of glossary terms in HTML output?
Post here questions and problems related to editing and publishing DITA content.
-
- Posts: 40
- Joined: Tue Oct 30, 2018 10:49 am
How to remove the href attribute of glossary terms in HTML output?
Hi all,
I am wondering if it is possible to remove the href attribute for glossary terms from the HTML output. I would like to keep the hover link text as is in the default output, but not have the possibility to click it. I don't think that this is possible by customization the CSS, and in the list of XSLT extension I don't see an extension point specific for glossary terms.
https://www.oxygenxml.com/doc/versions/ ... mport.html
Is it even possible to do that? And if yes, could you point me in the direction of what needs to done? I am using Oxygen XML Editor version 24.1.
Thanks and best regards,
Tanja
I am wondering if it is possible to remove the href attribute for glossary terms from the HTML output. I would like to keep the hover link text as is in the default output, but not have the possibility to click it. I don't think that this is possible by customization the CSS, and in the list of XSLT extension I don't see an extension point specific for glossary terms.
https://www.oxygenxml.com/doc/versions/ ... mport.html
Is it even possible to do that? And if yes, could you point me in the direction of what needs to done? I am using Oxygen XML Editor version 24.1.
Thanks and best regards,
Tanja
-
- Posts: 665
- Joined: Wed Oct 16, 2019 3:47 pm
Re: How to remove the href attribute of glossary terms in HTML output?
Post by julien_lacour »
Hello Tanja,
Actually it is possible to disable links in a CSS stylesheet by using the pointer-events property.
Is it enough for your use-case?
Regards,
Julien
Actually it is possible to disable links in a CSS stylesheet by using the pointer-events property.
Is it enough for your use-case?
Regards,
Julien
-
- Posts: 40
- Joined: Tue Oct 30, 2018 10:49 am
Re: How to remove the href attribute of glossary terms in HTML output?
Hello Julien,
I am not sure to be honest. Setting the property for dfn has no effect as the href is part of the parent a tag.
I also tried enclosing the dfn in an outputclass called 'tanjaterm'. This works in that pointer-events 'none' is applied, but this also hides the hover text generated from the title attribute.
Do you have any ideas how to proceed here?
Thanks and best regards, Tanja
I am not sure to be honest. Setting the property for dfn has no effect as the href is part of the parent a tag.
Code: Select all
dfn {
pointer-events: none;
}
Code: Select all
div > .tanjaterm {
pointer-events: none !important;
}
Thanks and best regards, Tanja
-
- Posts: 665
- Joined: Wed Oct 16, 2019 3:47 pm
Re: How to remove the href attribute of glossary terms in HTML output?
Post by julien_lacour »
Hi Tanja,
In this case you need to use a custom XSLT stylesheet that will remove the @href attribute as you suggested at the beginning, I already did the template you need to use in order to obtain what you want:
If you have problems using publishing templates, you can check the Working with Publishing Templates chapter in the user-manual.
Regards,
Julien
In this case you need to use a custom XSLT stylesheet that will remove the @href attribute as you suggested at the beginning, I already did the template you need to use in order to obtain what you want:
template.zip
Just download the file, then in the Configure Transformation Scenario dialog, create a custom DITA Map WebHelp Responsive scenario and inside the scenario in the Templates tab, choose the custom template (you can directly select the zip but if you further customize it, unzip it and replace the path from zip to opt file).If you have problems using publishing templates, you can check the Working with Publishing Templates chapter in the user-manual.
Regards,
Julien
You do not have the required permissions to view the files attached to this post.
-
- Posts: 40
- Joined: Tue Oct 30, 2018 10:49 am
Re: How to remove the href attribute of glossary terms in HTML output?
Hi Julilen,
Thanks so much for the template! I tested it, following the steps you describe but, unfortunately, the href attribute is still there in my HTML output. Please find attached a screenshot with the result.
For the test, I set up a test map (attached) with a glossary submap as described in your documentation under https://www.oxygenxml.com/doc/versions/ ... ssary.html and used your template to generate HTML output.
I also tried adding your xsl file to my customized template, with the same result.
Would you be so kind and have a look again?
Thanks so much for the template! I tested it, following the steps you describe but, unfortunately, the href attribute is still there in my HTML output. Please find attached a screenshot with the result.
For the test, I set up a test map (attached) with a glossary submap as described in your documentation under https://www.oxygenxml.com/doc/versions/ ... ssary.html and used your template to generate HTML output.
I also tried adding your xsl file to my customized template, with the same result.
Would you be so kind and have a look again?
href_attribute_dfn_html_output.png
Thanks and best regards, Tanjatestmap.zip
You do not have the required permissions to view the files attached to this post.
-
- Posts: 665
- Joined: Wed Oct 16, 2019 3:47 pm
Re: How to remove the href attribute of glossary terms in HTML output?
Post by julien_lacour »
Hello Tanja,
You're right, my stylesheet doesn't cover all the use-cases, this one should:
Julien
You're right, my stylesheet doesn't cover all the use-cases, this one should:
template.zip
Regards,Julien
You do not have the required permissions to view the files attached to this post.
Return to “DITA (Editing and Publishing DITA Content)”
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