 |
| XSLT General questions and answers about XSLT. For issues strictly specific to the book XSLT 1.1 Programmers Reference, please post to that forum instead. |
Welcome to the p2p.wrox.com Forums.
You are currently viewing the XSLT section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
|
|
|
|

September 4th, 2010, 12:24 AM
|
|
Registered User
|
|
Join Date: Sep 2010
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
XSLT or DocBook or something else?
Hey,
I'm dumb so I'm hoping someone can spoon feed me a little bit.
I'd like to write a book (several actually) and I'm trying to find a good way to do this. I've used LaTeX and I've decided I'm not really a fan (except for the fantastic math formulas). I'd like it to be something I can write using a text editor (i.e.: not a word processor).
Searching the web I found my to XSLT. Reading up on XSLT a little bit I found my way to DocBook. I'm trying to understand a few things and was hoping some of you here could help.
Firstly, is DocBook a subset of XSLT, a formalized instantiation of a more-generic XSLT, or something else altogether?
Secondly, am I barking up the right tree here? Would something like XSLT or DocBook be a recommended option to create a book that could later be converted to PDF or to a printed book of any of various sizes?
Thanks for any clarification and suggestions. :D
-evo
|
|

September 4th, 2010, 04:46 AM
|
 |
Friend of Wrox
|
|
Join Date: Aug 2007
Posts: 2,128
Thanks: 1
Thanked 189 Times in 188 Posts
|
|
I don't know much about DocBook, but from what I have read it is a XML schema for creating XML documents.
XSLT is a programming language for transforming XML documents.
So basically they are nothing alike at all - you couldn't write a book in XSLT.
It is possible you are confusing XSLT with XSL-FO, the formatting language. Again, I know very little about XSL-FO, and this forum doesn't really cover it I'm afraid.
|
|

September 4th, 2010, 06:35 AM
|
 |
Wrox Author
|
|
Join Date: Apr 2004
Posts: 4,962
Thanks: 0
Thanked 292 Times in 287 Posts
|
|
DocBook is an XML vocabulary for writing books. It's widely used for producing software manuals. You might also want to look at DITA, another similar vocabulary which is perhaps more widely used in other fields. Both come with collections of XSLT stylesheets that allow the XML to be rendered into a variety of formats such as HTML web pages, PDFs, e-books, etc.
I would definitely encourage you to author your book in XML, and DocBook may well be the most appropriate choice of vocabulary, though you may want to check, for example, whether its support for mathematics is good enough (if not, you can always extend it - that's what the "X" in "XML" is all about).
Having authored your book in XML, the XSLT language is almost certainly the vehicle by which your content will be translated into a format that your readership can make use of.
__________________
Michael Kay
http://www.saxonica.com/
Author, XSLT 2.0 and XPath 2.0 Programmer\'s Reference
|
|

September 4th, 2010, 01:53 PM
|
|
Registered User
|
|
Join Date: Sep 2010
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Thanks very much to both of you for replying! I think I have a clearer understanding of the big picture now.
If I can bother you two (or anyone else) with a a couple follow up questions:
If I was interested in attaining some level of proficiency using xml-based publishing I would start by learning DocBook or DITA, and then later move on to XSLT to allow for more dynamism, is that correct?
I read a little on the differences between DocBook and DITA. It seems that for smaller scale projects DocBook might be more appropriate and therefore more of what I'd be looking for. Would you mind weighing in on DocBook -vs- XSL-FO?
Thanks again :)
|
|

September 4th, 2010, 02:28 PM
|
 |
Wrox Author
|
|
Join Date: Apr 2004
Posts: 4,962
Thanks: 0
Thanked 292 Times in 287 Posts
|
|
Start by using DocBook to author your content, and use the standard XSLT stylesheets that come with DocBook to format it. Then if you want to customize the formatting, you can extend/modify the XSLT stylesheets to achieve your own effects.
XSL-FO is not something you would use directly for authoring. It's essentially an intermediate format between authoring vocabularies like DocBook, and final-page formats like PDF. The usual processing pipeline would be to author the content in DocBook, use XSLT to convert it to XSL-FO, and then use an XSL-FO formatting engine such as FOP to convert the XSL-FO to PDF.
__________________
Michael Kay
http://www.saxonica.com/
Author, XSLT 2.0 and XPath 2.0 Programmer\'s Reference
|
|

September 5th, 2010, 07:26 AM
|
|
Registered User
|
|
Join Date: Sep 2010
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Thanks mhkay, that pipeline comment was exactly what I needed. Now I've got a starting point and an understanding of where to go from there. :)
Cheers
|
|
 |