Numbering nested concepts
Oxygen general issues.
-
- Posts: 68
- Joined: Tue Jun 09, 2015 6:26 pm
- Location: Canada
Numbering nested concepts
Post by BogdanM777 »
Hi guys,
I managed with the help of Octavian to have my issue with the page break sorted out, thank you very much, and I encountered another issue that I have to overcome.
Before I was having for everything that was having a title a topic, even if it was a title-topic, and I was having everything numbered properly. However, because our developer team suggested to have less files, I opted for nested concepts architecture in order to reduce the number of files, and to keep the formatting of titles inside the document.
The issue right now is that the main concept, the one containing children concepts nested, is numbered properly, however the nested concepts (I have only one level of nesting) are not numbered at all, and I would like to have them as it was before, if it is not too much work around.
I managed to find a formatting for my common.xsl file, from ...cfg/fo/xsl that was doing the job properly with the old architecture, however with the new architecture, it does not number everything, so I guess it needs some adjustments.
The part I inserted in the xsl file is:
<xsl:template match="*" mode="getTitle">
<xsl:variable name="topic" select="ancestor-or-self::*[contains(@class, ' topic/topic ')][1]" />
<xsl:variable name="id" select="$topic/@id" />
<xsl:variable name="mapTopics" select="key('map-id', $id)" />
<fo:inline>
<xsl:apply-templates select="$mapTopics[1]" mode="topicTitleNumber"/>
</fo:inline>
<xsl:text> </xsl:text>
<xsl:apply-templates />
</xsl:template>
<xsl:template match="*[contains(@class, ' bookmap/chapter ')] |
*[contains(@class, ' map/topicref ')]
[not(ancestor-or-self::*[contains(@class,' bookmap/frontmatter ')])]"
mode="topicTitleNumber">
<xsl:number format="1. "
count="*[contains(@class, ' map/topicref ')]
[not(ancestor-or-self::*[contains(@class,' bookmap/frontmatter ')])]
| *[contains(@class, ' bookmap/chapter ')]" level="multiple"/>
</xsl:template>
<xsl:template match="*[contains(@class, ' bookmap/chapter ')] |
*[contains(@class, ' map/topicref ')]
[not(ancestor-or-self::*[contains(@class,' bookmap/frontmatter ')])]"
mode="topicTitleNumber">
<xsl:number format="1. "
count="*[contains(@class, ' map/topicref ')]
[not(ancestor-or-self::*[contains(@class,' bookmap/frontmatter ')])]
| *[contains(@class, ' bookmap/chapter ')]" level="multiple"/>
</xsl:template>
<xsl:template match="*[contains(@class, ' bookmap/chapter ')] |
*[contains(@class, ' bookmap/bookmap ')]/opentopic:map/
*[contains(@class, ' map/topicref
I would highly appreciate if somebody would help me change this or make another one in order to have the nested concepts also numbered.
Thank you very much.
I managed with the help of Octavian to have my issue with the page break sorted out, thank you very much, and I encountered another issue that I have to overcome.
Before I was having for everything that was having a title a topic, even if it was a title-topic, and I was having everything numbered properly. However, because our developer team suggested to have less files, I opted for nested concepts architecture in order to reduce the number of files, and to keep the formatting of titles inside the document.
The issue right now is that the main concept, the one containing children concepts nested, is numbered properly, however the nested concepts (I have only one level of nesting) are not numbered at all, and I would like to have them as it was before, if it is not too much work around.
I managed to find a formatting for my common.xsl file, from ...cfg/fo/xsl that was doing the job properly with the old architecture, however with the new architecture, it does not number everything, so I guess it needs some adjustments.
The part I inserted in the xsl file is:
<xsl:template match="*" mode="getTitle">
<xsl:variable name="topic" select="ancestor-or-self::*[contains(@class, ' topic/topic ')][1]" />
<xsl:variable name="id" select="$topic/@id" />
<xsl:variable name="mapTopics" select="key('map-id', $id)" />
<fo:inline>
<xsl:apply-templates select="$mapTopics[1]" mode="topicTitleNumber"/>
</fo:inline>
<xsl:text> </xsl:text>
<xsl:apply-templates />
</xsl:template>
<xsl:template match="*[contains(@class, ' bookmap/chapter ')] |
*[contains(@class, ' map/topicref ')]
[not(ancestor-or-self::*[contains(@class,' bookmap/frontmatter ')])]"
mode="topicTitleNumber">
<xsl:number format="1. "
count="*[contains(@class, ' map/topicref ')]
[not(ancestor-or-self::*[contains(@class,' bookmap/frontmatter ')])]
| *[contains(@class, ' bookmap/chapter ')]" level="multiple"/>
</xsl:template>
<xsl:template match="*[contains(@class, ' bookmap/chapter ')] |
*[contains(@class, ' map/topicref ')]
[not(ancestor-or-self::*[contains(@class,' bookmap/frontmatter ')])]"
mode="topicTitleNumber">
<xsl:number format="1. "
count="*[contains(@class, ' map/topicref ')]
[not(ancestor-or-self::*[contains(@class,' bookmap/frontmatter ')])]
| *[contains(@class, ' bookmap/chapter ')]" level="multiple"/>
</xsl:template>
<xsl:template match="*[contains(@class, ' bookmap/chapter ')] |
*[contains(@class, ' bookmap/bookmap ')]/opentopic:map/
*[contains(@class, ' map/topicref
I would highly appreciate if somebody would help me change this or make another one in order to have the nested concepts also numbered.
Thank you very much.
-
- Posts: 68
- Joined: Tue Jun 09, 2015 6:26 pm
- Location: Canada
Re: Numbering nested concepts
Post by BogdanM777 »
I forgot to check the Notify me when a reply is posted.
Sorry about that.
Sorry about that.
-
- Posts: 389
- Joined: Thu Jul 01, 2004 12:29 pm
Re: Numbering nested concepts
Hello,
The problem is that your customization is based on the topics referred from the map, you use the "key('map-id', $id)" to determine the topics from the map. Based on the references from the map you add the numbering. Because now you use nested topics you don't have reference in the map, so the customization will not work.
You need to change your customization in order to look also at the topics from the current file, and based on this to make the numbering.
Best Regards,
Octavian
The problem is that your customization is based on the topics referred from the map, you use the "key('map-id', $id)" to determine the topics from the map. Based on the references from the map you add the numbering. Because now you use nested topics you don't have reference in the map, so the customization will not work.
You need to change your customization in order to look also at the topics from the current file, and based on this to make the numbering.
Best Regards,
Octavian
Octavian Nadolu
<oXygen/> XML Editor
http://www.oxygenxml.com
<oXygen/> XML Editor
http://www.oxygenxml.com
-
- Posts: 68
- Joined: Tue Jun 09, 2015 6:26 pm
- Location: Canada
Re: Numbering nested concepts
Post by BogdanM777 »
Thank you very much for your fast response Octavian.
I understand very well what you are saying, however, unfortunately for me, I lack the knowledge of customizing xsl files in order to get the results I want. Therefore I am relying a lot on what I find as "ready to use" on the net or from you guys.
I am learning a lot in the process, and I am studying privately the functionalities of DITA, however sometimes I need results pretty fast, and I do not have the luxury of time available till I make the customization myself.
If you would have a "ready to use" solution, I would highly appreciate your help. Otherwise, my guys will have to wait until I am "ripe" in DITA.
Thank you very much for your support.
I understand very well what you are saying, however, unfortunately for me, I lack the knowledge of customizing xsl files in order to get the results I want. Therefore I am relying a lot on what I find as "ready to use" on the net or from you guys.
I am learning a lot in the process, and I am studying privately the functionalities of DITA, however sometimes I need results pretty fast, and I do not have the luxury of time available till I make the customization myself.
If you would have a "ready to use" solution, I would highly appreciate your help. Otherwise, my guys will have to wait until I am "ripe" in DITA.
Thank you very much for your support.
-
- Posts: 389
- Joined: Thu Jul 01, 2004 12:29 pm
Re: Numbering nested concepts
Hello Bogdan,
This is a DITA customization question, so I think that this type of questions it is better to be addressed on the DITA user list http://tech.groups.yahoo.com/group/dita-users/. We also monitor this list and we contribute with solutions there, but you will get more answers.
I notice that you already added you question there and you got some good answers:
https://groups.yahoo.com/neo/groups/dit ... pics/37951
Best Regards,
Octavian
This is a DITA customization question, so I think that this type of questions it is better to be addressed on the DITA user list http://tech.groups.yahoo.com/group/dita-users/. We also monitor this list and we contribute with solutions there, but you will get more answers.
I notice that you already added you question there and you got some good answers:
https://groups.yahoo.com/neo/groups/dit ... pics/37951
Best Regards,
Octavian
Octavian Nadolu
<oXygen/> XML Editor
http://www.oxygenxml.com
<oXygen/> XML Editor
http://www.oxygenxml.com
-
- Posts: 68
- Joined: Tue Jun 09, 2015 6:26 pm
- Location: Canada
Jump to
- Oxygen XML Editor/Author/Developer
- ↳ Feature Request
- ↳ Common Problems
- ↳ DITA (Editing and Publishing DITA Content)
- ↳ Artificial Intelligence (AI Positron Assistant add-on)
- ↳ 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