John Brown | 1 Aug 2008 03:00
Picon
Favicon

Re: Xref Numbering

Dr. Laurence Leff <D-Leff <at> wiu.edu> writes:

> 
> I need my xref in my docbook for class notes
> to have page numbers in my PDF generated file.  
> 
> I follow the instructions in Bob Stayton's DocBook XSL,
> The Cmplete Guide, on page 183, Chapter 13 of Cross References.
> It is generating in the fo file, "the section called ..." and the title
> rather than picking up the page number.

Instead of customising, if you set insert.xref.page.number = yes,
you will get:

the section called “AA AA” [1] abc def ghi abc def ghi

Is that good enough?
PC Thoms | 2 Aug 2008 18:41
Picon

docbook v5 css with xlink

Can anyone provide a link to docbook v5 examples using css.

Version 4 examples can be found at:
http://www.badgers-in-foil.co.uk/projects/docbook-css/tests/links.xml

The link, as I have it, in the attached file doesn't work, css also included.

Any help would be gratefully appreciated
Paul
Attachment (docbook_link.xml): text/xml, 633 bytes
Attachment (docbook_pct.css): text/css, 3884 bytes
---------------------------------------------------------------------
To unsubscribe, e-mail: docbook-apps-unsubscribe <at> lists.oasis-open.org
For additional commands, e-mail: docbook-apps-help <at> lists.oasis-open.org
Jirka Kosek | 2 Aug 2008 19:47
Picon
Favicon
Gravatar

Re: docbook v5 css with xlink

PC Thoms wrote:
> Can anyone provide a link to docbook v5 examples using css.
> 
> Version 4 examples can be found at:
> http://www.badgers-in-foil.co.uk/projects/docbook-css/tests/links.xml
> 
> The link, as I have it, in the attached file doesn't work, css also included.

DocBook V5 has element in namespace, so your CSS selectors should match 
namespaced element. You can achieve this very simply, just add the 
following line at the start of your CSS file:

 <at> namespace "http://docbook.org/ns/docbook";

--

-- 
------------------------------------------------------------------
   Jirka Kosek      e-mail: jirka <at> kosek.cz      http://xmlguru.cz
------------------------------------------------------------------
        Professional XML consulting and training services
   DocBook customization, custom XSLT/XSL-FO document processing
------------------------------------------------------------------
  OASIS DocBook TC member, W3C Invited Expert, ISO JTC1/SC34 member
------------------------------------------------------------------

Richard Rosenberg | 3 Aug 2008 02:33
Picon
Favicon

client side transformation using docbook-xsl

Hello:

I am having some trouble with client-side transformation using docbook-xsl via  
debian etch and apache 2.x. It works great with IE7, but firefox 2.x and 3.0 
both display only the text (stripped of xml tags). Firefox also gives 
numerous messages about localization issues. I understand this may be a no-go 
with firefox for at least two reasons:

1. A mime-type error when fetching the VERSION file from docbook.xsl - FF 
complains about a missing file extension (this is supposed to be security?)

2. document() function in l10n.xsl, right at the top:

	<xsl:param name="l10n.xml" select="document('../common/l10n.xml')"/>
	<xsl:param name="local.l10n.xml" select="document('')"/>
	...

Apparently FF has problems with fetching l10n.xml and this is giving rise to 
numerous issues. . .

Problem number 1 seems solvable. 

My question is this: Is it possible to do client-side transformations using 
firefox and docbook-xsl at all? Problem number two seems like it may be 
related to a bug/feature of FF and not solvable, or is related to my apache 
setup and may require more work to find the problem. Before I proceed any 
further, it would be great to know if any one has had success doing 
client-side transformations with firefox and apache.

Thanks,
(Continue reading)

Dr. Laurence Leff | 3 Aug 2008 19:01
Favicon

Xref Numbering Thanks and Follow Up

Thanks, Dr. Catterall, for the very quick response to my request for help
with the problem getting Docbook to include page numbers for my Xref
files.  Unfortunately, it still is not working.
I changed my docbook customization layer as indicated below.
Note, I included only the template for "section" in the xref-number-and-title
context. That is the only thing to which I am or will be linking.
Unfortunately, it still does not display the page number.

I also tried setting the parameter to true and that worked.  I could have
sworn I tried that before, but I don't remember it working.

I did also find a work-around, I simply changed the style sheet, xref.xsl, 
to always put the page number by removing the if statement around
the check for insert.xref.page.number.  However, I don't see where to change
it to write the word "page" in addition to the number.  
In my situation, I can live with simply
hard coding the style sheet to always display Page nnn for an xref, but don't 
see where to do this.

<?xml version='1.0'?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<xsl:import href="./titlepage.xsl"/>
<xsl:import href="/opt/docbook/DOCBOOK/docbook-xsl-1.65.1/fo/docbook.xsl"/>
<xsl:attribute-set name="formal.object.properties">
  <xsl:attribute name="keep-together.within-column">auto</xsl:attribute>
</xsl:attribute-set>
<xsl:param name="local.l10n.xml" select="document('')"/>
<l:i18n xmlns:l="http://docbook.sourceforge/xmlns/l10n/1.0">
<l:l10n language="en">
<l:context name="xref-number-and-title">
(Continue reading)

Vittorio Muth | 4 Aug 2008 09:21
Picon
Favicon

Antw: client side transformation using docbook-xsl

Dear Richard,

A similar behaviour occoures in FireFox when the XSL stylesheet is in a parent folder of the XML file.

<?xml-stylesheet type="text/xsl" href="../../../styles/myStyleSheet.xsl" ?>

I moved the XSL into folder "folder_A" so the line in the XML file changed to

<?xml-stylesheet type="text/xsl" href="myStyleSheet.xsl" ?>

and FireFox was able to visualise the XML with styleing. I had this problem not only in Apache, but also local
( file:///C:... )
Maybe this helps a bit.

regards,
Vittorio

>>> Richard Rosenberg <richrosenberg <at> earthlink.net> schrieb am 03.08.2008 um 02:33
in Nachricht <200808021733.19530.richrosenberg <at> earthlink.net>:
> Hello:
> 
> I am having some trouble with client-side transformation using docbook-xsl 
> via  
> debian etch and apache 2.x. It works great with IE7, but firefox 2.x and 3.0 
> 
> both display only the text (stripped of xml tags). Firefox also gives 
> numerous messages about localization issues. I understand this may be a 
> no-go 
> with firefox for at least two reasons:
> 
(Continue reading)

Mimil Mimil | 4 Aug 2008 17:39
Picon

Maven (java) repository

Hello,

Could you tell me who is deploying maven artifacts (http://www.mvnrepository.com/artifact/org.docbook) because as I could see it is not that much up-to-date (xml and xslt) and if you want I would like to participate to stay it up-to-date.
I am also working on a nice docbook maven plugin (http://code.google.com/p/docbkx-tools/) so having them synchronized could be nice.

Regards,
Mimil,

Keith Fahlgren | 4 Aug 2008 18:06
Picon
Gravatar

Re: Maven (java) repository

On Mon, Aug 4, 2008 at 8:39 AM, Mimil Mimil <mimilowns <at> gmail.com> wrote:
> Could you tell me who is deploying maven artifacts
> (http://www.mvnrepository.com/artifact/org.docbook) because as I could see
> it is not that much up-to-date (xml and xslt) and if you want I would like
> to participate to stay it up-to-date.

As you've probably already discovered, the POM files[1] have no
developers listed. 1.72.0 was released in January of 2007, so I'd say
do whatever you need to do to preempt this abandoned project.

HTH,
Keith

1. http://mirrors.ibiblio.org/pub/mirrors/maven2/org/docbook/docbook-xsl/1.72.0/docbook-xsl-1.72.0.pom
Bob Stayton | 4 Aug 2008 18:39

Re: Xref Numbering

Hi,
I noticed a couple of things about your customization that are preventing it 
from working.  Since you don't have section numbering turned on, the gentext 
contexts with name="xref-number" and name="xref-number-and-title" are not 
used.  Rather, the context with name="xref" is used.  If you change your 
first instance in your customization to name="xref", then you should get the 
"II%p" version working.

Also, you have several <l:l10n> elements, but only one of them has the 
language attribute.  The language attribute is key to finding a match, so 
you should either add that attribute to all of the l:l10n elements, or 
combine all of the l:context elements into one l:l10n element with that 
attribute.

Lastly, there is no context="xref-number-and-style" in the stylesheets.

Anyway, the name="xref" change should get it working for you.

I also noticed that you are referencing version 1.65 of the stylesheets, 
which dates back to 2004.  I would highly recommending upgrading to a newer 
version.

Bob Stayton
Sagehill Enterprises
bobs <at> sagehill.net

----- Original Message ----- 
From: "Dr. Laurence Leff" <D-Leff <at> wiu.edu>
To: <docbook-apps <at> lists.oasis-open.org>
Sent: Thursday, July 31, 2008 9:45 AM
Subject: [docbook-apps] Xref Numbering

>I need my xref in my docbook for class notes
> to have page numbers in my PDF generated file.
>
> I follow the instructions in Bob Stayton's DocBook XSL,
> The Cmplete Guide, on page 183, Chapter 13 of Cross References.
> It is generating in the fo file, "the section called ..." and the title
> rather than picking up the page number.
>
> Here is my customization layer in st.xsl
>
>
> <?xml version='1.0'?>
> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" 
> version="1.0">
> <xsl:import href="./titlepage.xsl"/>
> <xsl:import 
> href="/opt/docbook/DOCBOOK/docbook-xsl-1.65.1/fo/docbook.xsl"/>
> <xsl:attribute-set name="formal.object.properties">
>  <xsl:attribute name="keep-together.within-column">auto</xsl:attribute>
> </xsl:attribute-set>
> <xsl:param name="local.l10n.xml" select="document('')"/>
> <l:i18n xmlns:l="http://docbook.sourceforge.net/xmlns/l10n/1.0">
> <l:l10n language="en">
> <l:context name="xref-number-and-title">
> <l:template name="section" text="II%p, %t"/>
> </l:context>
> </l:l10n>
> <l:l10n>
> <l:context name="xref-number">
> <l:template name="section" text="JJ%p, %t"/>
> </l:context>
> </l:l10n>
> <l:l10n>
> <l:context name="xref-number-and-style">
> <l:template name="section" text="KK%p, %t"/>
> </l:context>
> </l:l10n>
> </l:i18n>
> </xsl:stylesheet>
>
> (Note, I added the II, JJ, KK so I could easily see the cross reference
> generated if it picked it up my stylesheet.  It did not.)
>
> Here is where I invoke docbook:
>
> #!/bin/sh
>
> # This script encapsulates a standard SAXON call.
> #   This Script example borrowed from another application
>
> #JAVA_HOME=/usr/java/jdk1.5.0_04/jre
> JAVA_HOME=/usr
>
> SAXON_HOME=/opt/docbook/XEP/lib
>
> STYLESHEETS_HOME=/opt/docbook/XEP/doc/docbook/stylesheets
>
> CP=$JAVA_HOME/lib/tools.jar:$SAXON_HOME/saxon.jar:/opt/docbook/DOCBOOK/docbook-xsl-1.65.1/extensions/saxon653.jar:/opt/docbook/xerces-2_6_0/xercesImpl.jar
>
> NEW_LIB_HOME=/opt/docbook/DOCBOOK/FOP/fop-0.20.5/lib
>
> /usr/bin/java
-Xbootclasspath/p:$NEW_LIB_HOME/xalan-2.4.1.jar:$NEW_LIB_HOME/xercesImpl-2.2.1.jar:$NEW_LIB_HOME/xml-apis.jar 
>  -classpath $CP com.icl.saxon.StyleSheet \
>   -o $1.fo $1 \
>   st.xsl \
>   use.extensions=0 default.table.width=auto title.margin.left=0pc 
> insert.xref.apage.number=yes
>
>
> And lastly, here is the input file:
>
>
> <section><title>tit</title>
> <para>
> <xref linkend="A"/>
> abc def ghi
> abc def ghi
> </para>
> <para>
> abc def ghi
> abc def ghi
> </para>
> <para>
> abc def ghi
> abc def ghi
> </para>
> <para>
> abc def ghi
> abc def ghi
> </para>
> <section id="A"><title id="A.title">AA AA</title>
> <para>
> abc def ghi
> abc def ghi
> abc def ghi
> </para>
> </section>
> </section>
>
> (I included  some additonal dummy text in the para that I added so the 
> section
> entitled "AA AA" would be on a separate page.
>
> Here is what was generated for the cross reference line in the .fo
> output:
>
>
> <fo:basic-link internal-destination="A">the section called â?oAA 
> AA�</fo:basic-link>
>
> Thanks for any help that any one can provide.
>
> I also tried the select: option but that did not work either.
>
> Dr. Laurence Leff  Western Illinois University, Macomb IL 61455 ||(309) 
> 298-1315
> Stipes 447 Assoc. Prof. of Computer Sci. Pager: 309-367-0787 FAX: 
> 309-298-2302
> Secretary: eContracts Technical Committee OASIS Legal XML Member Section
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: docbook-apps-unsubscribe <at> lists.oasis-open.org
> For additional commands, e-mail: docbook-apps-help <at> lists.oasis-open.org
>
>
> 
Bob Stayton | 4 Aug 2008 18:43

Re: A simple question - Not working

Are you using DocBook 5?  If so, then element names in the XSL need to have 
a namespace prefix.

If you aren't using  DocBook 5, is the bibliography inside an article or 
section element?

Bob Stayton
Sagehill Enterprises
bobs <at> sagehill.net

----- Original Message ----- 
From: "Pedro Pastor" <pps <at> dlsi.ua.es>
To: "Bob Stayton" <bobs <at> sagehill.net>
Cc: <docbook-apps <at> lists.oasis-open.org>; <pps <at> ua.es>
Sent: Thursday, July 31, 2008 8:10 AM
Subject: Re: [docbook-apps] A simple question - Not working

Sorry Bob for pestering you but I sent my previous reply before testing
your code (which I was sure was going to work).

I have included your code "as it is" in my customization XSL and I have
obtained exactly the same result as before (before inserting your code):
no page brake before <bibliography> element.

Any suggestion?

Regards,
Pedro

Bob Stayton escribió:
> I presume you mean a bibliography inside an article or section, as a 
> bibliography inside a book or part has its own page-sequence and so 
> automatically starts on a new page.
>
> This template added to a customization layer will work for bibliography:
>
> <xsl:template match="article/bibliography | section/bibliography">
>  <fo:block break-after="page"/>
>  <xsl:apply-imports/>
> </xsl:template>
>
> It inserts a page break block, and then applies the stock template for 
> processing the bibliography using xsl:apply-imports.
>
> Bob Stayton
> Sagehill Enterprises
> bobs <at> sagehill.net
>
>
> ----- Original Message ----- From: "Pedro Pastor" <pps <at> dlsi.ua.es>
> To: <docbook-apps <at> lists.oasis-open.org>; <pps <at> ua.es>
> Sent: Friday, July 25, 2008 5:37 PM
> Subject: [docbook-apps] A simple question
>
>
> Sorry if this a naïve question, but I've been looking up at Bob's book
> and I couldn't find the answer.
>
> How could I control to print the "special" sections like Bibliogrphy,
> TOC... and the like in a new page. I mean, I'd like to have and
> automatic "page-brake" before those "blocks". I've found the way to do
> it for the different "section" levels but not for the former mentioned 
> ones.
>
> Regards,
> Pedro
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: docbook-apps-unsubscribe <at> lists.oasis-open.org
> For additional commands, e-mail: docbook-apps-help <at> lists.oasis-open.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: docbook-apps-unsubscribe <at> lists.oasis-open.org
For additional commands, e-mail: docbook-apps-help <at> lists.oasis-open.org

Gmane