Hi,
 
I do not currently customize other than param.xsl and fop.xconf, and have never 
created a customization layer. So I currently have no xsl:import of docbook.xsl 
other than where it would occur in the non-customized DocBook 5.1. Is this URL 
the correct information for the customization layer in the case of needing to 
import highlighting? I've not seen any xsl:import used in the context of this 
chapter so I may be completely wrong to look here:
http://tdg.docbook.org/tdg/5.1/ch05.html
 
Currently I assemble one large monolithic XML file via xmllint and xinclude 
(individual files are chapters, appendices, so on, in a <book>). This is passed 
to jing for testing against docbook.rng. This is turned into an fo file via:
/usr/bin/java \   
-Dxslthl.config=file://${XSLTHL}/highlighters/xslthl-config.xml \   
com.icl.saxon.StyleSheet \   -o ${OBJ}/${TITLE}_monolithic.fo \   
${OBJ}/${TITLE}_monolithic.xml \   ${XSLT}/fo/docbook.xsl \   use.extensions=1
 
The resulting fo file is turned into PDF format through fop (and hopefully 
later other formats).
 
Would I be replacing fo/docbook.xsl in the above Java command with a custom xsl 
file which does nothing but import docbook.xsl and then fo/highlight.xsl? I ask 
because the chapter on customization seems to be more about writing individual 
lines of RNG code for new definitions or editing definitions without ever 
showing any xsl:import...I'm thinking I'm looking at the wrong customization if 
I use chapter 5 of guide.
 
Thanks!
 
----- Original Message -----From: Bob Stayton <[email protected]>To: 
[email protected], Docbook <[email protected]>Sent: Wed, 15 
Feb 2017 16:43:03 -0000 (UTC)Subject: Re: [docbook-apps] <programlisting 
linenumbering="numbered"> does not number...

Hi,No, it does not need to be specific to each language. The imports should 
look something like this in your customization layer, putting it after the 
import of the main docbook.xsl:

<xsl:import href="some/path/to/docbook-xsl/fo/docbook.xsl"/><xsl:import 
href="some/path/to/docbook-xsl/fo/highlight.xsl"/>

Bob StaytonSagehill [email protected]

On 2/15/2017 6:08 AM, [email protected] wrote:> Hi,>> I see by default in 
fo/highlighting.xsl (I'm using fo):> <xsl:import 
href="../highlighting/common.xsl"/>>> My XSL knowledge is minimal, but if for 
example I'm using bourne as the> language, do I need to import something 
specific to bourne? The README> has a note about importing, but it isn't clear 
what the intended import> file is.>> Thanks!>> ----- Original Message -----> 
From: Bob Stayton <[email protected]>> To: [email protected], Docbook 
<[email protected]>> Sent: Wed, 15 Feb 2017 00:08:07 -0000 
(UTC)> Subject: Re: [docbook-apps] <programlisting linenumbering="numbered">> 
does not number...> I followed the instructions in my book for syntax 
highlighting, and it> did not work. I know it worked when I wrote it, because I 
tested> everything before I included it.> It turns out that my book documents 
the 1.73.1 version of the> stylesheets, and the highlighting was changed in 
version 1.74.3. Now> your customization layer needs to use xsl:import on the 
appropriate> highlight.xsl file, such fo/highlight.xsl. When I added that, 
syntax> highlighting worked for me.> The highlighting/README file in the 
distribution provided that crucial> bit of information. I'm currently updating 
my book and will include> this change.> Bob Stayton> Sagehill Enterprises> 
[email protected]> On 2/11/2017 12:42 PM, [email protected] wrote:>> Hi,>>>> 
From the link on Saxon plus other information I put together the>> simplest 
test case (which sort of works). The command is essentially>> this (other 
commands validate the XML with jing and xmllint before>> calling Saxon):>> 
CLASSPATH=${CLASSPATH};\>> java \>> 
-Dxslthl.config=${XSLTHL}/highlighters/xslthl-config.xml \>> 
com.icl.saxon.StyleSheet \>> -o ${OBJ}/${TITLE}_monolithic.fo \>> 
${OBJ}/${TITLE}_monolithic.xml \>> ${XSLT}/fo/docbook.xsl \>> 
use.extensions=1>>>> This does enable line numbering in programlisting tags, 
and options>> related to numbering do as expected. However, in attempting to 
get the>> syntax highlighting to work (see>> 
http://www.sagehill.net/docbookxsl/SyntaxHighlighting.html) nothing I've>> 
tried has any effect (test cases were with "bourne" and "ini" files).>>>> The 
CLASSPATH contains the following files, and no error occurs (for the>> sake of 
brevity I'm showing only the relative paths, but the full path>> is used 
without error in the actual Makefile):>>> 
docbook-xsl-ns-1.79.1/tools/lib/*saxon.jar*:docbook5/stylesheet/docbook-xsl-ns-1.79.1/extensions/*saxon65.jar*:xml/xslthl-2.1.3/*xslthl-2.1.3.jar*>>>>
 Since I get no errors, and because the Saxon processing is otherwise>> 
working, is there any additional requirement to keep syntax highlighting>> from 
failing as if the option did not exist? Is syntax highlighting>> something 
which maybe requires the Xalan parser? Is there perhaps>> something from 
param.xsl which needs to change and not mentioned in the>> above URL on syntax 
highlighting?>>>> Thanks!>>>> ----- Original Message ----->> From: Richard 
Hamilton <[email protected]>>> To: [email protected]>> Cc: Docbook 
<[email protected]>>> Sent: Sat, 11 Feb 2017 00:50:21 -0000 
(UTC)>> Subject: Re: [docbook-apps] <programlisting linenumbering="numbered">>> 
does not number...>> Hi,>> Here is the link to the part of Bob&rsquo;s book 
that covers the Saxon> processor:>> 
http://sagehill.net/docbookxsl/InstallingAProcessor.html#InstallSaxon>> I think 
you can keep the xmllint processing as is (I use it for XInclude>> processing, 
too), and just swap in saxon for xsltproc, using Bob&rsquo;s>> instructions.>> 
I don&rsquo;t bother swapping in Xerces (I don&rsquo;t use any of the features 
that>> go beyond what Saxon supports).>> Best regards,>> Dick>> ------->> XML 
Press>> XML for Technical Communicators>> http://xmlpress.net>> 
[email protected]>>> On Feb 10, 2017, at 12:26, [email protected] 
wrote:>>>>>> Hi,>>>>>> I was going by this reference as to requirements, and 
have not read>> the whole book (thus I did not yet see the Java 
requirement):>>> http://tdg.docbook.org/tdg/5.1/programlisting.html>>>>>> 
Admittedly I'm trying to do something quicker than I should and not>> reading 
everything (I've been through a lot of material, but it's just a>> drop in the 
bucket for everything needed when I really just need to sit>> down and write 
content). I've had some frustrations getting the>> Java-based processors 
working and have tried to stick to the>> xmllint/jing/xsltproc family for that 
single reason. The Java-based>> processing answer likely also answers my 
earlier syntax highlighting>> question about whether to abandon my current 
approach with xmllint.>>>>>> To use Saxon or Xalan I would have to change the 
current build scheme,>> which I've never succeeded at:>>> xmllint --output 
"${OBJ}/${TITLE}_monolithic.xml" --nonet --noent>> -xinclude 
"${CONTENT}/${TITLE}.xml">>> xsltproc --output ${OBJ}/${TITLE}_monolithic.fo 
${XSLT}/docbook.xsl>> ${OBJ}/${TITLE}_monolithic.xml>>> fop -c 
${PREFIX}/fop.xconf -fo ${OBJ}/${TITLE}_monolithic.fo -pdf>> 
${OUT}/${TITLE}.pdf>>>>>> I realize I'm probably asking a lot, but is there any 
advice I can get>> on editing that chain of commands to instead work with Saxon 
or Xalan?>> Getting past the tools on the command line (for a hand written 
Makefile)>> is just getting frustrating and is why the current chain of 
commands>> have never evolved to anything Java-based.>>>>>> I do plan on 
reading more (I'm not resisting reading), but there are>> other requirements 
which tend to require at least a draft to be>> available sooner rather than 
later.>>>>>> Thanks!>>>>>> ----- Original Message ----->>> From: Bob Stayton 
<[email protected]>>>> To: [email protected], Docbook 
<[email protected]>>>> Sent: Fri, 10 Feb 2017 19:09:00 -0000 
(UTC)>>> Subject: Re: [docbook-apps] <programlisting 
linenumbering="numbered">>> does not number...>>> Hi,>>> Did you read this 
section in my online book about line numbering? It>>> only works with 
Java-based processors.>>> Bob Stayton>>> Sagehill Enterprises>>> 
[email protected]>>> On 2/10/2017 11:01 AM, [email protected] wrote:>>> > 
Hi,>>> >>>> > Under DocBook 5.1 I've been able to list programs, but line 
numbering>>> > has no effect (and there is no error under xmllint or jing). Is 
there>>> > some ENTITY or other precondition required for line numbering under> 
5.1?>>> >>>> > Thanks!

---------------------------------------------------------------------To 
unsubscribe, e-mail: [email protected] 
additional commands, e-mail: [email protected]

Reply via email to