Sorting a glossary alphabetically
Post here questions and problems related to editing and publishing DITA content.
-
- Posts: 159
- Joined: Mon Nov 24, 2014 1:49 pm
- Location: Greven/Germany
Sorting a glossary alphabetically
Hi,
it seems to me, that the DITA-OT cannot sort glossary entries (based on the map attribute xml:lang). Am I right?
I crawled the OT instance of Oxygen and it seems to me, that the glossaryProcessing.xsl of the net.sourceforge.dita4publishers.common.mapdriven plugin does what I need. Am I right?
If yes, I dunno understand, why this mechanism is not part of the basic XSLT set of the OT.
Best regards,
Stefan
it seems to me, that the DITA-OT cannot sort glossary entries (based on the map attribute xml:lang). Am I right?

I crawled the OT instance of Oxygen and it seems to me, that the glossaryProcessing.xsl of the net.sourceforge.dita4publishers.common.mapdriven plugin does what I need. Am I right?

If yes, I dunno understand, why this mechanism is not part of the basic XSLT set of the OT.

Best regards,
Stefan
stefan-jung.org – Your DITA/DITA-OT XML consultant
-
- Posts: 9434
- Joined: Fri Jul 09, 2004 5:18 pm
Re: Sorting a glossary alphabetically
Hi Stefan,
I'm not sure. How exactly are you referring the gloss entries in the DITA Map? Maybe I could take a look at the XSLT code.
You could also ask about this on the DITA Users List.
Regards,
Radu
I'm not sure. How exactly are you referring the gloss entries in the DITA Map? Maybe I could take a look at the XSLT code.
You could also ask about this on the DITA Users List.
Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
<oXygen/> XML Editor
http://www.oxygenxml.com
-
- Posts: 159
- Joined: Mon Nov 24, 2014 1:49 pm
- Location: Greven/Germany
Re: Sorting a glossary alphabetically
Hi Radu,
the conversation 34193 of the mailing list elped me. Eliot clearly explained how to write a sorting mechanism. I'll write a XSLT and test it, maybe write a howto about it.
Best regards,
Stefan
the conversation 34193 of the mailing list elped me. Eliot clearly explained how to write a sorting mechanism. I'll write a XSLT and test it, maybe write a howto about it.
Best regards,
Stefan
stefan-jung.org – Your DITA/DITA-OT XML consultant
-
- Posts: 22
- Joined: Tue May 17, 2016 4:58 pm
Re: Sorting a glossary alphabetically
Hi in the proposed solution by Eliot Kimber he says:
As i try this <sort-as> is not accepted within a <glossterm>:
Does this mean the glossary sort-as option is still not a part of the DITA OT? I'm using oXygen 17.1
Note also that for DITA 1.3 we will be adding the general <sort-as>
element to the utilities domain, which specializes from <data> and can
therefore go pretty much anywhere. The <sort-as> element contains (or
specifies in @value) text to be prepended to the base sort phase for the
element that contains it in order to construct the effective sort phrase.
For example:
Code: Select all
<glossentry id="topicid">
<glossterm>Ɗv<sort-as>delta-v</sort-as></glossterm>
<glossdef>Change in velocity, e.g., the result of acceleration
applied for a given period of time.</glossdef>
</glossentry>
Code: Select all
Unexpected element "sort-as". The content of the parent element type must match "(boolean|keyword|apiname|option|parmname|cmdname|msgnum|varname|wintitle|ph|b|i|sup|sub|tt|u|codeph|synph|filepath|msgph|systemoutput|userinput|menucascade|uicontrol|q|term|abbreviated-form|tm|state|data|data-about|foreign|unknown|image)".
-
- Posts: 9434
- Joined: Fri Jul 09, 2004 5:18 pm
Re: Sorting a glossary alphabetically
Hi,
Oxygen 17.1 comes with both DITA Open Toolkit 1.8 and DITA Open Toolkit 2.x bundled with it.
In order to use DITA 1.3 validation you will need to also use DITA OT 2.x for publishing, in the Oxygen Preferences->"DITA" page you can change the default used DITA OT to be DITA OT 2.x.
After this your sample glossentry should be valid. This does not mean that the output will take it into account, DITA OT 2.x does not yet implement the entire DITA 1.3 specs.
Regards,
Radu
Oxygen 17.1 comes with both DITA Open Toolkit 1.8 and DITA Open Toolkit 2.x bundled with it.
In order to use DITA 1.3 validation you will need to also use DITA OT 2.x for publishing, in the Oxygen Preferences->"DITA" page you can change the default used DITA OT to be DITA OT 2.x.
After this your sample glossentry should be valid. This does not mean that the output will take it into account, DITA OT 2.x does not yet implement the entire DITA 1.3 specs.
Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
<oXygen/> XML Editor
http://www.oxygenxml.com
-
- Posts: 22
- Joined: Tue May 17, 2016 4:58 pm
Re: Sorting a glossary alphabetically
Hi,
thank you, I can sort-out the output to pdf later. When i do set the preferences to DITA OT 2x my transformation comes back with a lot of errors.
I've done a lot of customization, including my own commons.xsl. Still after setting the preferences I receive an error
Why does it refer to the standard commons file when i have created a customized file and have included this in the custom.xsl
Can I solve these issues by moving to oXygen 18?
thank you, I can sort-out the output to pdf later. When i do set the preferences to DITA OT 2x my transformation comes back with a lot of errors.
I've done a lot of customization, including my own commons.xsl. Still after setting the preferences I receive an error
Code: Select all
Description Cannot compare xs:integer to xs:untypedAtomic
Severity Fatal
System ID C:\Program Files\Oxygen XML Editor 17\frameworks\dita\DITA-OT2.x\plugins\org.dita.pdf2\xsl\fo\commons.xsl
Scenario Custom Dita to PDF
Input file Z:\en-US\Test_Map.ditamap
Engine name DITA-OT
Start location line: 1218, column: 69
Code: Select all
<?xml version='1.0'?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:fo="http://www.w3.org/1999/XSL/Format" version="2.0">
<xsl:import href="../layout-masters.xsl"/>
<xsl:import href="commons.xsl"/>
<xsl:import href="root-processing.xsl"/>
<xsl:import href="root-processing_axf.xsl"/>
<xsl:import href="root-processing_fop.xsl"/>
<xsl:import href="root-processing_xep.xsl"/>
<xsl:import href="static-content.xsl"/>
<xsl:import href="front-matter.xsl"/>
<xsl:import href="tables.xsl"/>
<xsl:import href="task-elements.xsl"/>
<xsl:import href="toc.xsl"/>
<xsl:import href="glossary.xsl"/>
<!--table title below-->
<xsl:template match="*[contains(@class,'topic/table')]/*[contains(@class,'topic/title')]"/>
<!--remove glosbody from pdf output-->
<xsl:template match="*[contains(@class, ' glossentry/glossBody ')]"/>
</xsl:stylesheet>
-
- Posts: 9434
- Joined: Fri Jul 09, 2004 5:18 pm
Re: Sorting a glossary alphabetically
Hi,
This means that the customizations you made for DITA OT 1.8 are no longer compatible with DITA OT 2.x.
Usually a migration involves comparing all the templates you have overwritten with the ones in DITA OT 2.x and update them.
About this particular problem you are obtaining, please read this issue report and the suggested fix:
https://github.com/dita-ot/dita-ot/issues/2238
Regards,
Radu
This means that the customizations you made for DITA OT 1.8 are no longer compatible with DITA OT 2.x.
Usually a migration involves comparing all the templates you have overwritten with the ones in DITA OT 2.x and update them.
About this particular problem you are obtaining, please read this issue report and the suggested fix:
https://github.com/dita-ot/dita-ot/issues/2238
Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
<oXygen/> XML Editor
http://www.oxygenxml.com
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