Re: [docbook-apps] Xsltproc with XInclude (Docbook 5)

2016-05-02 Thread Shaun McCance
On Mon, 2016-05-02 at 00:43 +, stim...@comcast.net wrote:
> Hi,
>  
> I am trying to find a suitable combination of tools under Linux
> (currently Fedora 23) for validating and publishing from Docbook 5 to
> PDF, PostScript, RTF, and some variant of HTML (preferably xhtml
> strict, but most any variant will work). Some of my testing "almost"
> works via xsltproc using the sourceforge download for docbook.xsl, but
> apparently what I need is the "xi" version, docbookxi.xsl, which I
> have not been able to find. If I give up dividing into multiple files
> vi XInclude, and instead use a DTD and entities, or else create one
> large monolithic file, things work...however, this is very difficult
> to work with...I'd end up going back to less desirable less flexible
> tools.
>  
> For use of Docbook 5 under Linux and xsltproc, where would I find a
> suitable XInclude stylesheet (docbook.xsl)? Or is there some other
> recommended route for processing Docbook 5 books while splitting into
> separate files for each chapter?
>  

No need for special XSLT. xsltproc will process XInclude on your input
documents if you pass it the --xinclude option.

--
Shaun




-
To unsubscribe, e-mail: docbook-apps-unsubscr...@lists.oasis-open.org
For additional commands, e-mail: docbook-apps-h...@lists.oasis-open.org



Re: [docbook-apps] Xsltproc with XInclude (Docbook 5)

2016-05-02 Thread Niels Müller

Let me share my Makefile with you

  1 html:
  2 rm -rf site
  3 mkdir site
  4 cp css/* site
  5 xmllint --noent --xinclude \
  6 module.xml > 
/tmp/docbresolved.xml \

  7 2>./errloglint
  8 xsltproc \
  9 --output site/ \
 10 docbook.xsl \
 11 /tmp/docbresolved.xml \
 12 2>./errlogxslt && \
 13 tar czf site.tgz site/*
 14 echo "site.tgz ready for deployment"
 15
 16 pdf:
 17 xmllint --noent --xinclude \
 18 module.xml > 
/tmp/docbresolved.xml \

 19 2>./errloglint
 20 xsltproc \
 21 --xinclude \
 22 --output /tmp/docbfo.fo \
 23 docbook.fo.xsl \
 24 /tmp/docbresolved.xml \
 25 2>./errlogxslt && \
 26 fop -fo /tmp/docbfo.fo \
 27 module.pdf \
 28 2>./errlogfop
 29 rm /tmp/docbfo.fo
 30 echo "module.pdf ready for deployment"

I only create html or pdf, not the other output formats.
I use xmllint to process the includes. I use includes extensively

An example of the top level document



%uvmatent;
]>
http://docbook.org/ns/docbook;
xmlns:xi="http://www.w3.org/2001/XInclude;
xml:lang="da">

Akademiuddannelsens it-speciale




Grundlæggende programmering













The chapters are built from sections, also includes.
Coding examples (these are programming lessons) are also
includes with live code:

href="../codej/lesson4/src/CprTestObject.java" 
parse="text"/>


The includes provide maximum flexibility. Couldn't do it without them.

Hope you find this useful.

Niels Muller Larsen, MSc
Programmer, Assoc Professor

Ring around the collar.

On 05/02/16 08:36, Dave Pawson wrote:

Also on Fedora 23, 64bit

On 2 May 2016 at 01:43,   wrote:

Hi,

I am trying to find a suitable combination of tools under Linux (currently
Fedora 23) for validating and publishing from Docbook 5 to PDF, PostScript,
RTF, and some variant of HTML (preferably xhtml strict, but most any variant
will work).


Edit: Emacs.
Validate: Jing
to  PDF: One of the two commercial XSL-FO tools, Antenna House  or XEP
RTF: Steve? I can't find it (GIYF)
PS: Don't know.
HTML: Standard Docbook transforms.


 Some of my testing "almost" works via xsltproc using the

sourceforge download for docbook.xsl, but apparently what I need is the "xi"
version, docbookxi.xsl, which I have not been able to find. If I give up
dividing into multiple files vi XInclude, and instead use a DTD and
entities, or else create one large monolithic file, things work...however,
this is very difficult to work with...I'd end up going back to less
desirable less flexible tools.


You might want to shift from the DTD's to relax ng, then use the namespaced
version.

xsltproc might work, but I have bash shell scripts for all my conversions.




For use of Docbook 5 under Linux and xsltproc, where would I find a suitable
XInclude stylesheet (docbook.xsl)? Or is there some other recommended route
for processing Docbook 5 books while splitting into separate files for each
chapter?


I expand my includes using the resolver.jar file?

ava   -cp /sgml:/myjava/saxon655.jar:/myjava/xercesImpl.jar:/myjava/resolver.jar
 
-Djavax.xml.parsers.DocumentBuilderFactory=org.apache.xerces.jaxp.DocumentBuilderFactoryImpl

-Djavax.xml.parsers.SAXParserFactory=org.apache.xerces.jaxp.SAXParserFactoryImpl

-Dorg.apache.xerces.xni.parser.XMLParserConfiguration=org.apache.xerces.parsers.XIncludeParserConfiguration
com.icl.saxon.StyleSheet   -o op.html   -w1 .xml
docbook.html.xsl  "saxon.extensions=1"  $4 $5 $6

HTH





-
To unsubscribe, e-mail: docbook-apps-unsubscr...@lists.oasis-open.org
For additional commands, e-mail: docbook-apps-h...@lists.oasis-open.org



Re: [docbook-apps] Xsltproc with XInclude (Docbook 5)

2016-05-02 Thread Martin Doucha
Dne 2.5.2016 v 08:36 Dave Pawson napsal(a):
> Edit: Emacs.
> Validate: Jing
> to  PDF: One of the two commercial XSL-FO tools, Antenna House  or
> XEP
> RTF: Steve? I can't find it (GIYF)
> PS: Don't know.
> HTML: Standard Docbook transforms.

Apache FOP supports conversion from XSL-FO to PDF, PS, RTF and several
other formats as well. But some XSL-FO features are not implemented in
it yet.

http://xmlgraphics.apache.org/fop/

Regards,
Martin Doucha



signature.asc
Description: OpenPGP digital signature


Re: [docbook-apps] Xsltproc with XInclude (Docbook 5)

2016-05-02 Thread Dave Pawson
Also on Fedora 23, 64bit

On 2 May 2016 at 01:43,   wrote:
> Hi,
>
> I am trying to find a suitable combination of tools under Linux (currently
> Fedora 23) for validating and publishing from Docbook 5 to PDF, PostScript,
> RTF, and some variant of HTML (preferably xhtml strict, but most any variant
> will work).

Edit: Emacs.
Validate: Jing
to  PDF: One of the two commercial XSL-FO tools, Antenna House  or XEP
RTF: Steve? I can't find it (GIYF)
PS: Don't know.
HTML: Standard Docbook transforms.


 Some of my testing "almost" works via xsltproc using the
> sourceforge download for docbook.xsl, but apparently what I need is the "xi"
> version, docbookxi.xsl, which I have not been able to find. If I give up
> dividing into multiple files vi XInclude, and instead use a DTD and
> entities, or else create one large monolithic file, things work...however,
> this is very difficult to work with...I'd end up going back to less
> desirable less flexible tools.

You might want to shift from the DTD's to relax ng, then use the namespaced
version.

xsltproc might work, but I have bash shell scripts for all my conversions.


>
> For use of Docbook 5 under Linux and xsltproc, where would I find a suitable
> XInclude stylesheet (docbook.xsl)? Or is there some other recommended route
> for processing Docbook 5 books while splitting into separate files for each
> chapter?

I expand my includes using the resolver.jar file?

ava   -cp /sgml:/myjava/saxon655.jar:/myjava/xercesImpl.jar:/myjava/resolver.jar
 
-Djavax.xml.parsers.DocumentBuilderFactory=org.apache.xerces.jaxp.DocumentBuilderFactoryImpl

-Djavax.xml.parsers.SAXParserFactory=org.apache.xerces.jaxp.SAXParserFactoryImpl

-Dorg.apache.xerces.xni.parser.XMLParserConfiguration=org.apache.xerces.parsers.XIncludeParserConfiguration
com.icl.saxon.StyleSheet   -o op.html   -w1 .xml
docbook.html.xsl  "saxon.extensions=1"  $4 $5 $6

HTH



-- 
Dave Pawson
XSLT XSL-FO FAQ.
Docbook FAQ.
http://www.dpawson.co.uk

-
To unsubscribe, e-mail: docbook-apps-unsubscr...@lists.oasis-open.org
For additional commands, e-mail: docbook-apps-h...@lists.oasis-open.org