problem related to bibliography (bookmap/bibliolist)
Post here questions and problems related to editing and publishing DITA content.
-
- Posts: 47
- Joined: Tue Feb 21, 2012 10:17 pm
problem related to bibliography (bookmap/bibliolist)
Post by surangamas »
Hi Radu:
I created a separate file called "bibliography.dita" that contains a list of cited works or books, and in my ditamap (bookmap), I added "bibliolist" to the backmatter, and use bibliolist's href attribute to link to "bibliography.dita". Although the bibliography page was generated successfully in PDF, it seems however, that the header style of the bibliography page is identical to the style I set for the first page header (which I set in the "insertBodyFirstHeader" template in "custom.xsl").
To put it simply, I have a logo displayed on top of every first page header, and the header of the bibliography page seems to be styled the same way. I tried to set a condition in the "insertBodyFirstHeader" template like this:
But it didn't work, the logo still shows in the header of the bibliography page, what could be done differently to make this work?
What I want is to not have anything in the header for the bibliography page, any help from you would be appreciated, thank you.
I created a separate file called "bibliography.dita" that contains a list of cited works or books, and in my ditamap (bookmap), I added "bibliolist" to the backmatter, and use bibliolist's href attribute to link to "bibliography.dita". Although the bibliography page was generated successfully in PDF, it seems however, that the header style of the bibliography page is identical to the style I set for the first page header (which I set in the "insertBodyFirstHeader" template in "custom.xsl").
To put it simply, I have a logo displayed on top of every first page header, and the header of the bibliography page seems to be styled the same way. I tried to set a condition in the "insertBodyFirstHeader" template like this:
Code: Select all
<xsl:template name="insertBodyFirstHeader">
<fo:static-content flow-name="first-body-header" text-align="left">
<xsl:choose>
<xsl:when test="*[contains(@class, ' bookmap/bibliolist ')]" />
<xsl:otherwise>
<fo:block xsl:use-attribute-sets="__body__first__header">
<fo:inline>
<fo:external-graphic src="url(Customization/OpenTopic/common/artwork/vmturbo_logo_big.jpg)" />
</fo:inline>
</fo:block>
</xsl:otherwise>
</xsl:choose>
</fo:static-content>
</xsl:template>
What I want is to not have anything in the header for the bibliography page, any help from you would be appreciated, thank you.
-
- Posts: 404
- Joined: Thu Aug 21, 2003 11:36 am
- Location: Craiova
- Contact:
Re: problem related to bibliography (bookmap/bibliolist)
Post by radu_pisoi »
Hi,
Did you analyse the 'stage1.xml' file which is the input of the XSLT stylesheet you want to develop?
This temporary file is generated by the DITA-OT transformation and it is the input to the stylesheets that produce XSL-FO file. Usually,
the temporary folder is cleaned when the transformation finished but you can avoid this by setting the 'clean.temp' parameter to 'no'.
Inspecting this file, you will see that 'bibliography.dita' is expanded in the content of 'stage1.xml' as a normal topic, with 'topic/topic' class.
If you want to inspect the class of the element used in the DITA map you can use the 'map-id' key and the @id of the topic you are processing.
So, for you case I think you should modify the 'xsl:when' clause to something like that:
Did you analyse the 'stage1.xml' file which is the input of the XSLT stylesheet you want to develop?
This temporary file is generated by the DITA-OT transformation and it is the input to the stylesheets that produce XSL-FO file. Usually,
the temporary folder is cleaned when the transformation finished but you can avoid this by setting the 'clean.temp' parameter to 'no'.
Inspecting this file, you will see that 'bibliography.dita' is expanded in the content of 'stage1.xml' as a normal topic, with 'topic/topic' class.
If you want to inspect the class of the element used in the DITA map you can use the 'map-id' key and the @id of the topic you are processing.
So, for you case I think you should modify the 'xsl:when' clause to something like that:
Code: Select all
<xsl:when test="*[contains(key('map-id', @id)[1]/@class, ' bookmap/bibliolist ')]" />
Radu Pisoi
<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: 47
- Joined: Tue Feb 21, 2012 10:17 pm
Re: problem related to bibliography (bookmap/bibliolist)
Post by surangamas »
Hi Radu:
Thank you for the reply, I followed your instruction and replace <xsl:when> with your code:, the entire code looks like this:
But the resulting PDF was still produced the same way: the header logo appears on the bibliography page as on each chapter's first page, I checked stage1.xml, and yes "bibliography.dita" was still treated as a regular topic (type="topic"), do you think that might have something to do with the fact that "bibliography.dita" was created using a DITA topic template?
I can send you files offline if you are interested in having a look, thanks again!
Thank you for the reply, I followed your instruction and replace <xsl:when> with your code:
Code: Select all
<xsl:when test="*[contains(key('map-id', @id)[1]/@class, ' bookmap/bibliolist ')]" />
Code: Select all
<xsl:template name="insertBodyFirstHeader">
<fo:static-content flow-name="first-body-header" text-align="left">
<fo:block xsl:use-attribute-sets="__body__first__header">
<xsl:choose>
<xsl:when test="*[contains(key('map-id', @id)[1]/@class, ' bookmap/bibliolist ')]" />
<xsl:otherwise>
<fo:block>
<fo:inline>
<fo:external-graphic src="url(Customization/OpenTopic/common/artwork/xxx.jpg)" />
</fo:inline>
</fo:block>
</xsl:otherwise>
</xsl:choose>
</fo:block>
</fo:static-content>
</xsl:template>
I can send you files offline if you are interested in having a look, thanks again!
-
- Posts: 47
- Joined: Tue Feb 21, 2012 10:17 pm
Re: problem related to bibliography (bookmap/bibliolist)
Post by surangamas »
Hi Radu:
One thing I didn't quite understand from your reply is this : "If you want to inspect the class of the element used in the DITA map you can use the 'map-id' key and the @id of the topic you are processing."
Exactly what do I have to do to my DITA map? Thanks.
One thing I didn't quite understand from your reply is this : "If you want to inspect the class of the element used in the DITA map you can use the 'map-id' key and the @id of the topic you are processing."
Exactly what do I have to do to my DITA map? Thanks.
-
- Posts: 404
- Joined: Thu Aug 21, 2003 11:36 am
- Location: Craiova
- Contact:
Re: problem related to bibliography (bookmap/bibliolist)
Post by radu_pisoi »
Hi,
The XPath expression that I have suggested you is wrong. The correct one is:
The XPath expression that I have suggested you is wrong. The correct one is:
Code: Select all
<xsl:when test="contains(key('map-id', @id)[1]/@class, ' bookmap/bibliolist ')">
You should not modify anything in your DITA map. What I've wanted to say is when you have problems to customize the PDF plugin, a stating point could be to inspect the temporary 'stage1.xml' file that is the input of the XSLT transformation.One thing I didn't quite understand from your reply is this : "If you want to inspect the class of the element used in the DITA map you can use the 'map-id' key and the @id of the topic you are processing."
Exactly what do I have to do to my DITA map? Thanks.
Radu Pisoi
<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: 47
- Joined: Tue Feb 21, 2012 10:17 pm
Re: problem related to bibliography (bookmap/bibliolist)
Post by surangamas »
Hi Radu:
Thanks for the help, although your XPath was good, but it didn't resolve my problem: I still see the logo on the header of the bibliography page.
I checked "stage1.xml", the Bibliography page was still treated like any other topic, so I guess that was why the parser treated it as the first-page header, and output a logo to it.
How were the figurelist page or the index page designed? Since they are also parts of the backmatter, I would say that the bibliography page should also be treated the same as, say a figurelist page, right? But it wasn't.
What would the solution be? Thank you.
Thanks for the help, although your XPath was good, but it didn't resolve my problem: I still see the logo on the header of the bibliography page.
I checked "stage1.xml", the Bibliography page was still treated like any other topic, so I guess that was why the parser treated it as the first-page header, and output a logo to it.
How were the figurelist page or the index page designed? Since they are also parts of the backmatter, I would say that the bibliography page should also be treated the same as, say a figurelist page, right? But it wasn't.
What would the solution be? Thank you.
-
- Posts: 47
- Joined: Tue Feb 21, 2012 10:17 pm
Re: problem related to bibliography (bookmap/bibliolist)
Post by surangamas »
I guess the ultimate resolution is to let the parser know that the bibliography page should be treated just like an index or figure list page, instead of a regular topic.
-
- Posts: 404
- Joined: Thu Aug 21, 2003 11:36 am
- Location: Craiova
- Contact:
Re: problem related to bibliography (bookmap/bibliolist)
Post by radu_pisoi »
I have added an issue to the DITA-OT project for this improvement: Use for 'bibliolist' the same styling as for 'figurelist or 'indexlist' in the PDF output.surangamas wrote:I guess the ultimate resolution is to let the parser know that the bibliography page should be treated just like an index or figure list page, instead of a regular topic.
Radu Pisoi
<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: 47
- Joined: Tue Feb 21, 2012 10:17 pm
Re: problem related to bibliography (bookmap/bibliolist)
Post by surangamas »
Great, thank you! Please keep us posted of this update.
-
- Posts: 1
- Joined: Sun Jan 08, 2017 3:57 am
Re: problem related to bibliography (bookmap/bibliolist)
write sample "bibliography.dita". Thank
surangamas wrote:Hi Radu:
I created a separate file called "bibliography.dita" that contains a list of cited works or books, and in my ditamap (bookmap), I added "bibliolist" to the backmatter, and use bibliolist's href attribute to link to "bibliography.dita". Although the bibliography page was generated successfully in PDF, it seems however, that the header style of the bibliography page is identical to the style I set for the first page header (which I set in the "insertBodyFirstHeader" template in "custom.xsl").
To put it simply, I have a logo displayed on top of every first page header, and the header of the bibliography page seems to be styled the same way. I tried to set a condition in the "insertBodyFirstHeader" template like this:But it didn't work, the logo still shows in the header of the bibliography page, what could be done differently to make this work?Code: Select all
<xsl:template name="insertBodyFirstHeader">
<fo:static-content flow-name="first-body-header" text-align="left">
<xsl:choose>
<xsl:when test="*[contains(@class, ' bookmap/bibliolist ')]" />
<xsl:otherwise>
<fo:block xsl:use-attribute-sets="__body__first__header">
<fo:inline>
<fo:external-graphic src="url(Customization/OpenTopic/common/artwork/vmturbo_logo_big.jpg)" />
</fo:inline>
</fo:block>
</xsl:otherwise>
</xsl:choose>
</fo:static-content>
</xsl:template>
What I want is to not have anything in the header for the bibliography page, any help from you would be appreciated, thank you.
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)
- ↳ 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