This example was probably intended to be run under MS Internet
Explorer. The xml-stylesheet directive tells the parser that this XML
doc should be transformed using the XSL doc indicated (note that XSL
transforms one XML document into a different XML document - it doesn't
simply 'style' it. In this case, it is probably transforming plain
XML into docbook format). If you are running the XML through a parser
that doesn't recognise the xml-stylesheet directive, they you won't
get the transformation. I suggest that you do the transformation
manually for each example. There are tons of tools around that will
allow you to do it from the command line.
Tom <tom @ abwaerts . be> wrote in message news:<8846578.Jl1bF0PiBf@zukunft.mine.nu>...[color=blue]
> Hey all,
>
> I've been planning to get myself started with DocBook for quite some
> time now, so when I unexpectedly encountered a task for which DocBook
> might actually be very useful, I thought I'd no longer wait.
>
> Some Googling pointed me to several beginner tutorials, and I chose to
> get myself going with the guide at
>
>
http://rzserv2.fhnon.de/%7Elg002556/docbuch/
>
> However, as soon as I hit the very first example, my enthusiasm quickly
> faded away, since I can't get it to work properly, "as advertised", so
> to say. The tutorial is in German, but that doesn't matter: at 1.2, the
> reader is shown a really basic xml file, referring to some docbook.xls
> file for it's styling. A screenshot shows what the result should look
> like in a browser.
>
> The author puts this in his xml file
>
> <?xml-stylesheet type="text/xsl"
> href="file://C:/x/docbookxsl/docbook-xsl-1.55.0/xhtml/docbook.xsl" ?>
>
> I don't run Windows, so on my machine, the path to that xsl file
> is /usr/share/xml/docbook/stylesheet/nwalsh/xthml/docbook.xsl. I've
> tried every possible way to link to it from the xml file (file:///,
> just /usr/..., climbing up the tree like ../../../....., in the end I
> even put the whole docbook tree next to the file), but nothing works
> (and yes, the file is readable by regular users). All I get is plain
> tags. I fiddled around with the mimetype too (text/xml, text/xsl,
> application/xml, application/xml+xsl) and tried serving it with apache,
> all too no avail. On IRC, some kind people pointed me to some more
> general, i.e. not specificly DocBook-related tutorials, which I
> definitely plan to go through.
>
> But still, I was wondering if I've got this straight: the data one
> describes using XML, dictated by a DocBook DTD, should be *styled* by
> an xsl file, right? Why, then, doesn't the above example, used in a
> DocBook tutorial from someone who seems to know a lot about it, seem to
> work? Wouldn't it be obvious what purposes a file called "docbook.xsl",
> inside a directory called "xhtml", that is somewhere in a tree
> underneath "stylesheets", could possible serve?
>
> I'm a little confused, and since no-one on IRC could give me any direct
> clue about it, I'm hoping the question is not *that* superfluous. I
> apologize sincerely if it was.
>
> Greets,
> Tom
>
> --
> "Mongolian drivers do not care much about pedestrians."[/color]