How to remove the href attribute of glossary terms in HTML output?
Post here questions and problems related to editing and publishing DITA content.
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: 498
- 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
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: 498
- 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:
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
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
- (1.08 KiB) Downloaded 104 times
If you have problems using publishing templates, you can check the Working with Publishing Templates chapter in the user-manual.
Regards,
Julien
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 and best regards, Tanja
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 (39.54 KiB) Viewed 797 times
- testmap.zip
- (1.6 KiB) Downloaded 112 times
-
- Posts: 498
- 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:
Regards,
Julien
You're right, my stylesheet doesn't cover all the use-cases, this one should:
- template.zip
- (1.16 KiB) Downloaded 140 times
Julien
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