Creating subtitles on first page from ditamap
Post here questions and problems related to editing and publishing DITA content.
-
- Posts: 22
- Joined: Sun Aug 14, 2011 5:21 am
Creating subtitles on first page from ditamap
Post by Bob.Conlin »
Using a Bookmap with a <booktitlealt> I can create a subtitle on the title page of the PDF render, no problem. Now I want to the do the same thing from a ditamap. In front-matter_1.0.xsl I tried:
and
Searchtitle is just a starting point. I actually want to use prodinfo/prodname elements that will match the product attributes that I use for conditional profiling. I intend to model a fo:block similar to the previous section of front-matter_1.0.xsl for __frontmatter_title. I also need publisher information on the title page.
Code: Select all
<xsl:apply-templates select="//*[contains(@class,' map/map ')][1]/*[contains(@class,' map/topicmeta/searchtitle ')]/*[contains(@class,' topicmeta/searchtitle ')]"/>
Code: Select all
<xsl:value-of select="//*[contains(@class, ' map/map ')]/@topicmeta/searchtitle"/>
-
- Posts: 9434
- Joined: Fri Jul 09, 2004 5:18 pm
Re: Creating subtitles on first page from ditamap
Hi Bob,
The <searchtitle> has a DITA class like - map/searchtitle and in your example you are matching it using something like contains(@class,' topicmeta/searchtitle ' so this might be a problem.
So in the front-matter_1.0.xsl there is an apply templates like:
after it you can add the following code:
then add two more templates to the XSL:
Regards,
Radu
The <searchtitle> has a DITA class like - map/searchtitle and in your example you are matching it using something like contains(@class,' topicmeta/searchtitle ' so this might be a problem.
So in the front-matter_1.0.xsl there is an apply templates like:
Code: Select all
<fo:block xsl:use-attribute-sets="__frontmatter__owner">
<xsl:apply-templates select="$map//*[contains(@class,' bookmap/bookmeta ')]"/>
</fo:block>
Code: Select all
<fo:block xsl:use-attribute-sets="__frontmatter__owner">
<xsl:apply-templates select="$map/*[contains(@class,' map/topicmeta')]"/>
</fo:block>
Code: Select all
<xsl:template match="*[contains(@class, ' map/topicmeta ')]">
<fo:block-container xsl:use-attribute-sets="__frontmatter__owner__container">
<fo:block >
<xsl:apply-templates/>
</fo:block>
</fo:block-container>
</xsl:template>
<xsl:template match="*[contains(@class,' map/searchtitle ')]" priority="+2">
<fo:block xsl:use-attribute-sets="__frontmatter__subtitle">
<xsl:apply-templates/>
</fo:block>
</xsl:template>
Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
<oXygen/> XML Editor
http://www.oxygenxml.com
-
- Posts: 22
- Joined: Sun Aug 14, 2011 5:21 am
Re: Creating subtitles on first page from ditamap
Post by Bob.Conlin »
Thanks Radu,
I had one bit of trouble. In front-matter-attr.xsl in
<xsl:attribute-set name="__frontmatter__owner__container">
the top attribute was set to 210, effectively pushing the content off the page. I set it to 20 and there my content was. All better.
Bob
I had one bit of trouble. In front-matter-attr.xsl in
<xsl:attribute-set name="__frontmatter__owner__container">
the top attribute was set to 210, effectively pushing the content off the page. I set it to 20 and there my content was. All better.
Bob
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