[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]
Subject: Re: [docbook-apps] Hard page break in DocBook 4 document with namespace-aware DocBook XSL stylesheets
Hi, This turns out to be a deficiency in the handling of non-namespaced documents by the namespace stylesheets. The same thing occurs when processing a namespaced document with the non-namespace stylesheets. In order for the namespace stylesheets to handle a non-namespaced document, it first preprocesses the document to generate an internal copy of the document with the namespace added to all elements. Then the stylesheet processes that copy, using its templates that match elements in the namespace. However, the process of generating the copy currently omits processing instructions and comments from the copy. That's a bug. If you wouldn't mind, could you please file a bug report on the SourceForge site? Thanks. Bob Stayton Sagehill Enterprises bobs@sagehill.net ----- Original Message ----- From: "Sorin Ristache" <sorin@oxygenxml.com> To: <docbook-apps@lists.oasis-open.org> Sent: Thursday, June 12, 2008 9:10 AM Subject: [docbook-apps] Hard page break in DocBook 4 document with namespace-aware DocBook XSL stylesheets > Hello, > > I want to insert a hard page break in the XSL-FO document obtained from a > simple DocBook XML 4 document containing the processing instruction > > <?hard-pagebreak?> > > and transformed with the following customization layer: > > <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" > version="1.0" xmlns:fo="http://www.w3.org/1999/XSL/Format"> > <xsl:import > href="file:///E:/kit/Docbook/docbook-xsl-ns-1.74.0/fo/docbook.xsl"/> > > <xsl:template match="processing-instruction('hard-pagebreak')"> > <fo:block break-after='page'/> > </xsl:template> > </xsl:stylesheet> > > With the namespace aware version of DocBook XSL my template that matches > on the 'hard-pagebreak' processing instruction is never fired so the hard > page break is not inserted. With the no namespace version of DocBook XSL > the template is fired by the xsl:apply-templates element on line 350 of > docbook/xsl/fo/sections.xsl. This difference between the namespace aware > and no namespace versions is in both DocBook XSL 1.73.2 and DocBook XSL > 1.74.0. Can anyone figure out why there is this difference between the > namespace aware and no namespace versions or how I could fix/work around > it so that I can insert a hard page break with the namespace aware > version? > > A sample DocBook 4 document for reproducing the problem (the > xsl:apply-templates on line 350 of sections.xsl is inside a template that > matches on sect1 elements): > > > <!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN" > "http://www.docbook.org/xml/4.4/docbookx.dtd"> > <article> > <title>Article Title</title> > <sect1> > <title>Preface</title> > <para>Testing hard page break</para> > </sect1> > <sect1> > <title>Chapter 1</title> > <para>There is some text in the first paragraph.</para> > <?hard-pagebreak?> > <sect2> > <title>Subchapter 1.1</title> > <para>I want this this subchapter on a new page.</para> > </sect2> > </sect1> > </article> > > > Thank you, > Sorin > > http://www.oxygenxml.com > > --------------------------------------------------------------------- > To unsubscribe, e-mail: docbook-apps-unsubscribe@lists.oasis-open.org > For additional commands, e-mail: docbook-apps-help@lists.oasis-open.org > > >
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]