Ikke's Blog

Post details: New articles page

Feb 7
New articles page

Just finished (well, almost) the articles section on my website.
As you can see, the articles are available as PDF now too, although the PDFs aren't formatted very well sometimes (links aren't rendered as real links :-(), need to look into this.
I also need an info page with an explanation of the license, and some copyright information.
The article titles should get the same look as the section links on my homepage, but I cant get them to behave correctly :'(

I'm going to write a PHP script that generates the HTML code you see there from an XML file listing all available articles, too. Will make things much easier for me :-)

I've read some of the GStreamer API docs today, it's a wonderful framework. Prepare for some tutorial ;-)
Next one should be about local (UNIX Domain) sockets, but I think I'll Docbookize the Makefiles tutorial first.


Comment from: Peter [Member] Email
Can't you just associate some CSS to your xml-docbook files? I think you don't need php-code to make them look good in a browser. It's the same way gentoo.org is builded: the documentation is in xml and they associate a css for the website and parse it tot pdf with some other css.
PermalinkPermalink 02/07/05 @ 16:49
Comment from: JD [Visitor] · http://www.davidpashley.com/cgi/pyblosxom.cgi
Do you convert to PS first? What toolchain are you using to generate your pdfs?

Peter: AIUI, css only applies to [x]html. You still need xslt to convert the docbook to xhtml. You would then use css to make the resulting xhtml look nice. In the case of PDF, you would use xslt to convert to fo and from fo to pdf using something like fop.
PermalinkPermalink 02/07/05 @ 17:05
Comment from: Peter [Member] Email
Indeed, xslt is the key instead of css. With most browsers, you don't need any convert to xhtml/css then?
PermalinkPermalink 02/07/05 @ 17:33
Comment from: Ikke [Member] · http://www.eikke.com
David, Peter:
- Gentoo uses XSLT to transform the GuideXML XML files into XHTML files, then using CSS to format it.
- You don't really need XSLT stylesheets and transforms to make Docbook documents look OK in a browser: CSS2 defines a standard to layout plain XML documents using CSS, not using any transformation, if your browser supports it (Mozilla/Firefox does). Check http://www.badgers-in-foil.co.uk/projects/docbook-css/

David: to get PDF's out of Docbook documents, I use xmlto with some special config options to generate a FO document, then I use FOP to generate a PDF out of the FO file. I'll describe this process in here later ;-)
PermalinkPermalink 02/07/05 @ 17:38
Comment from: Ikke [Member] · http://www.eikke.com
Oh, forgot this: I do need a PHP script to generate the page: I only want a link to the HTML/Docbook/PDF version to appear if the file actually exists, so I need to check that. It's not possible to do this using XSLT directly, so I need PHP or some other scripting language.

Actually I could do this using bash too quite easily, using some ini-style file as input then ("article title-!-filename" or something, then some cutting etc and sed)
PermalinkPermalink 02/07/05 @ 17:42
Comment from: David Pashley [Visitor] · http://www.davidpashley.com/cgi/pyblosxom.cgi
You should be able to make links work using xmlto if you convert directly to pdf. pdflatex will produce the links, but latex won't. I think dvi is capable of showing links. I would need to check.

I actually found that using the jade based toolchain produced better output than the xmlto based toolchain. Unfortunately I couldn't get fop to work correctly on Debian recently otherwise I would use xsltproc and fop.
PermalinkPermalink 02/08/05 @ 09:10
Comment from: Ikke [Member] · http://www.eikke.com
I cannot use xmlto to pdf, because that requires PassiveTex, and I don't have enough diskspace to install Tetex.
Using the Jade toolchain doesn't really help: docbooktex generated files that produces errors on every line of the output file when processing it with pdflatex on a server where the Tetex suite is installed (the students server of my university).
Could you tell me how to do it using xsltproc? I got FOP working fine here (Blackdown JDK from Gentoo portage, and the binary version of FOP from the Apache project), but I have no idea how to generate FO files from my Docbook documents using xsltproc, I only know about xmlto.

PermalinkPermalink 02/08/05 @ 10:27

Leave a comment:

Your email address will not be displayed on this site.
Your URL will be displayed.

Allowed XHTML tags: <p, ul, ol, li, dl, dt, dd, address, blockquote, ins, del, span, bdo, br, em, strong, dfn, code, samp, kdb, var, cite, abbr, acronym, q, sub, sup, tt, i, b, big, small>
(Line breaks become <br />)
(Set cookies for name, email and url)
(Allow users to contact you through a message form (your email will NOT be displayed.))


Who's Online?

  • Guest Users: 478


XML Feeds

What is RSS?