List Info

Thread: superscripts in page headers




superscripts in page headers
user name
2007-10-12 13:49:31

I am trying to use the contents of bookinfo/title in the page header.
This title contains the subelement: "<superscript>&reg;</superscript>".
I&#39;m specifying this with the following in my " header.content" template:

<xsl:when test=";$sequence = 'even&#39; and $position = 'left&#39;"&gt;  
&nbsp;   <xsl:value-of select=&quot;//bookinfo/title&quot;/>
&lt;/xsl:when>

The problem is that the "superscript&quot; is ignored and the "registered";
symbol is on the baseline and too large.

For the right header I use the following:

<xsl:when test=";$sequence = 'odd&#39; and $position = 'right'">
&nbsp; &nbsp; &nbsp; &nbsp; <xsl:apply-templates select=&quot;." mode=";object.title.markup&quot;/>
&lt;/xsl:when>

On the TOC pages this pulls in the bookinfo/title, but here the "&;reg;"
IS superscripted.

These are obviously taking different pathways through the templates,
but is there any way to get the superscripting to work in the first ?

My environment:
 &nbsp;  docbook-xsl-1.73.2 (but get the same results with 1.72.0)
  ;  FOP 0.94
 ;   Docbook 4.12
 ;   xalan-j_2_7_0
&nbsp;   Windows XP

Any help is appreciated.

Thanks.

Re: superscripts in page headers
user name
2007-10-16 17:00:27
The problem is in this line:
 
 &nbsp; &nbsp;<xsl:value-of select="//bookinfo/title"/>
 ;
When you take the value of an element, you are taking its string value, which ignores any element markup.
One way of processing just the text without involving the "title" template is to use:
&nbsp;
 <xsl:apply-template select="//bookinfo/title/node()"/>
 
Or you could just use:
 
 &nbsp; &nbsp; &nbsp;  <xsl:apply-templates select="//book" mode="object.title.markup"/>
 
 
Bob Stayton
Sagehill Enterprises
DocBook Consulting
sagehill.net">bobssagehill.net
&nbsp;
 
----- Original Message -----
Sent: Friday, October 12, 2007 11:49 AM
Subject: [docbook-apps] superscripts in page headers


I am trying to use the contents of bookinfo/title in the page header.
This title contains the subelement: "<superscript>&amp;reg;<;/superscript>".
I'm specifying this with the following in my " header.content" template:

<xsl:when test="$sequence = 'even' and $position = 'left'">;  
&nbsp;   <xsl:value-of select="//bookinfo/title"/>
&lt;/xsl:when>

The problem is that the "superscript" is ignored and the "registered"
symbol is on the baseline and too large.

For the right header I use the following:

<xsl:when test="$sequence = 'odd' and $position = 'right'"&gt;
 &nbsp; &nbsp; &nbsp;  <xsl:apply-templates select="." mode="object.title.markup"/>
</xsl:when>

On the TOC pages this pulls in the bookinfo/title, but here the "&reg;"
IS superscripted.

These are obviously taking different pathways through the templates,
but is there any way to get the superscripting to work in the first ?

My environment:
 &nbsp;  docbook-xsl-1.73.2 (but get the same results with 1.72.0)
&nbsp;   FOP 0.94
 ;   Docbook 4.12
 ;   xalan-j_2_7_0
&nbsp;   Windows XP

Any help is appreciated.

Thanks.

[1-2]

about | contact  Other archives ( Real Estate discussion Medical topics )