Issue 15602 - PATCH: Docbook does not support Emphasis Bold
Summary: PATCH: Docbook does not support Emphasis Bold
Status: CLOSED FIXED
Alias: None
Product: xml
Classification: Code
Component: external filters (show other issues)
Version: current
Hardware: All All
: P3 Trivial (vote)
Target Milestone: ---
Assignee: kfowlks
QA Contact: issues@xml
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-06-13 19:08 UTC by kfowlks
Modified: 2005-04-14 13:14 UTC (History)
1 user (show)

See Also:
Issue Type: PATCH
Latest Confirmation in: ---
Developer Difficulty: ---


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description kfowlks 2003-06-13 19:08:22 UTC
The current XSLT filters listed below, do not support the Emphasis tag 
with the role assignment to bold. 
e.g.

sofftodocbookheadings_article.xsl
docbooktosoffheadings.xsl

<emphasis role="bold">
Just some Text
</emphasis>

The following tells the docbook style sheet to change the default presentation
of the <emphasis> tag to bold instead italic.

The following code adds this feature

Should be added within the “<xsl:template match="text:span">“ section of the XSLT.
Add to file document: sofftodocbookheadings_article.xsl

<!-- Change Made By Kevin Fowlks (fowlks@msu.edu) June 4th, 2003 -->
	<xsl:when test="@text:style-name='Emphasis Bold'">
		<xsl:element name="emphasis">
			<xsl:attribute name = "role" >
				<xsl:text >bold</xsl:text>
			</xsl:attribute>
			<xsl:value-of select="."/>	
		</xsl:element>
	</xsl:when>


Add to file: docbooktosoffheadings.xsl

<xsl:template match="emphasis">
	<!-- Change Made By Kevin Fowlks (fowlks@msu.edu) June 4th, 2003 -->
	<xsl:element name="text:span">
		<xsl:choose>
			<xsl:when test="@role">
				<xsl:attribute name="text:style-name">Emphasis Bold</xsl:attribute>
				<xsl:apply-templates/>
			</xsl:when>
		  
			<xsl:otherwise>
				<xsl:attribute name="text:style-name">Emphasis</xsl:attribute>
				<xsl:apply-templates/>	
			</xsl:otherwise>
		</xsl:choose>
		
</xsl:element>	
</xsl:template>
Comment 1 aidan.butler 2003-06-16 09:29:45 UTC
Aidan: Applied patch to sofftodocbookheadings_article.xsl
sofftodocbookheadings_chapter.xsl and docbooktosoffheadings.xsl. Also
added 'Emphasis Bold' style to xml/www/xmerge/download/DocBookTemplate.stw
Comment 2 kfowlks 2003-06-16 21:13:52 UTC
Issue has ben resolved.. Thanks
Comment 3 jogi 2005-04-14 13:13:50 UTC
.
Comment 4 jogi 2005-04-14 13:14:08 UTC
.