You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-users@xmlgraphics.apache.org by nancy_b <na...@yahoo.com> on 2008/10/05 00:27:33 UTC

Adding an icon before a chapter/section title

Hi guys,

Using Docbook XML/XSL and FOP 0.94 on Linux Debian.

Has any of you tried to add an icon before a chapter/section title? Asked
the same question on the Docbook forum, but no answer.


Thank you all in advance!
Nancy
-- 
View this message in context: http://www.nabble.com/Adding-an-icon-before-a-chapter-section-title-tp19818478p19818478.html
Sent from the FOP - Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org


Re: Multiple ID error without there being multiple IDs

Posted by Chris Bowditch <bo...@hotmail.com>.
Eckel, George wrote:

> Hi folks,
> 
> Using Docbook 5.0 and FOP 0.95.
> 
> I'm getting a    warning: "Multiple IDs"    error. BUT there is only one instance of the cited ID value. To check, I substituted "XXXX" for the (offending) ID value. Now, I'm SURE there's only one XXXX ID value. But I still get the same Multiple ID error citing XXXX as the offender.

Where are you checking? Its no good checking the XML or XSL, you have to 
check the XSL-FO generated as a result of the docbook stylesheet being 
applied to your XML. The following link explains how to generate XSL-FO 
from XSL (docbook stylesheet) and XML files:

http://xmlgraphics.apache.org/fop/0.95/running.html#check-input

Regards,

Chris



---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org


RE: Multiple ID error without there being multiple IDs

Posted by "Eckel, George" <ge...@amazon.com>.
Thanks, Chris!

Turns out I was including a file with the offending ID in multiple places in the same book. Obviously that doesn't work unless, perhaps, you use entities. Learned something.

Thanks!

George..






-----Original Message-----
From: Chris Bowditch [mailto:bowditch_chris@hotmail.com] 
Sent: Thursday, October 09, 2008 12:53 AM
To: fop-users@xmlgraphics.apache.org
Subject: Re: Multiple ID error without there being multiple IDs

Eckel, George wrote:

> Hi folks,
> 
> Using Docbook 5.0 and FOP 0.95.
> 
> I'm getting a    warning: "Multiple IDs"    error. BUT there is only one instance of the cited ID value. To check, I substituted "XXXX" for the (offending) ID value. Now, I'm SURE there's only one XXXX ID value. But I still get the same Multiple ID error citing XXXX as the offender.

Where are you checking? Its no good checking the XML or XSL, you have to 
check the XSL-FO generated as a result of the docbook stylesheet being 
applied to your XML. The following link explains how to generate XSL-FO 
from XSL (docbook stylesheet) and XML files:

http://xmlgraphics.apache.org/fop/0.95/running.html#check-input

Regards,

Chris



---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org


Multiple ID error without there being multiple IDs

Posted by "Eckel, George" <ge...@amazon.com>.
Hi folks,

Using Docbook 5.0 and FOP 0.95.

I'm getting a    warning: "Multiple IDs"    error. BUT there is only one instance of the cited ID value. To check, I substituted "XXXX" for the (offending) ID value. Now, I'm SURE there's only one XXXX ID value. But I still get the same Multiple ID error citing XXXX as the offender.

Any tips?

Thanks,

George..

---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org


Re: Adding an icon before a chapter/section title

Posted by nancy_b <na...@yahoo.com>.
what I am actually trying to do is the following:

<!-- Setting chapter title to separate number and label -->
<xsl:template name="chaptitle.title">
  <xsl:param name="node" select="."/>
  <xsl:variable name="id">
    <xsl:call-template name="object.id">
      <xsl:with-param name="object" select="$node"/>
    </xsl:call-template>
    </xsl:variable>


  <fo:block xsl:use-attribute-sets="chap.label.properties">
    <xsl:apply-templates select="$node" mode="label.markup"/>
  </fo:block>

  <fo:block xsl:use-attribute-sets="chap.title.properties">

    <fo:list-block provisional-distance-between-starts="1cm + 8pt"
                    provisional-label-separation="8pt">
      <fo:list-item>
          <fo:list-item-label end-indent="label-end()">
            <fo:block>
              <fo:external-graphic>
	        <xsl:attribute name="src">
	<xsl:call-template name="fo-external-image">
	  <xsl:with-param name="filename" select=concat('images', @icon, '.png'/>
	</xsl:call-template>
      </xsl:attribute>
              </fo:external-graphic>
            </fo:block>
          </fo:list-item-label>
          <fo:list-item-body start-indent="body-start()">
              <fo:block>
                <xsl:apply-templates select="$node" mode="title.markup"/>
              </fo:block>
          </fo:list-item-body>
      </fo:list-item>
    </fo:list-block>
  </fo:block>
</xsl:template>

An then in the xml file itself I set:

<chapter icon="advanced">
<title>Advanced Settings</title>
....
where "advanced" is the name of the PNG file in the 'images' folder. The
question is how I can pass the variable icon value (in this case "advanced")
to  my chapter template.

Thanks in advance!
Nancy


nancy_b wrote:
> 
> Hi guys,
> 
> Using Docbook XML/XSL and FOP 0.94 on Linux Debian.
> 
> Has any of you tried to add an icon before a chapter/section title? Asked
> the same question on the Docbook forum, but no answer.
> 
> 
> Thank you all in advance!
> Nancy
> 

-- 
View this message in context: http://www.nabble.com/Adding-an-icon-before-a-chapter-section-title-tp19818478p19833843.html
Sent from the FOP - Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org