[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]
Subject: Re: DOCBOOK: sgml vs xml
On Fri, Mar 07, 2003 at 04:32:30PM +0100, Stephane Bortzmeyer wrote: > On Thu, Mar 06, 2003 at 05:28:58PM -0800, > Ben Hratshorne <docbook@green.hartshorne.net> wrote > a message of 43 lines which said: > > > I was wondering a while ago whether to start my docbook project stuff > > using dsssl or xml. > > They are not incompatible. Unless this is a typo, you compare apples > and oranges. > > XML or SGML are markup meta-languages. > > XSL or DSSSL are stylesheets languages. > > You can (I do) use DSSSL for XML documents. The choice of a markup > meta-language is partly independant of the choice of the stylesheet language. I was confused by this. Though I understood the difference between SGML/XML and DSSSL/XSL (you're right it was a typo), I thought that if you use SGML, you must use DSSSL, and if you use XML, you must use XSL. I was unaware you could use DSSSL with XML. Is the converse true - can you use XSL with SGML? I also could not find a good description of equivelancies between XML and SGML in terms of how to crunch documents, how to use entities, and so on. I learned by looking at examples from the linux documentation project. For example, I know that the first line (where you cite the DTD to which you are conforming) is different for XML vs. SGML, but that is about the extent of the documentation I could find for the difference. Can any of you suggest a web page that might have the same document in XML and SGML, and show differences in both the document and in how to compile it? (if any of you would like to forward specifics on tool tips to me, i'm using debian and docbook-utils v0.6.12-3. ;) > > > Lurking on this list for a bit it seems that 90% of the questions are > > answered with XML syntax. Is it the case that though nobody really > > seems to say so everyone actually uses XML? > > It is clear that SGML is slowly dying in favour of XML. For a new > project where there is no legacy, I believe there is no question: use > XML. ok. This confirms my impression, I will do so. But... at this point I have one (mostly) complete manual in SGML. Any tips on what I might need to change to switch it over, besides the first line? I think the only tricky part is that I have a couple of conditionally compiled sections: <!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook V3.1//EN" [ <!-- change INCLUDE below to IGNORE and none of the sections marked %internal / versoin2 will be included when you compile the document. --> <!entity % internal "INCLUDE"> <!entity % version2 "IGNORE"> ]> <book> ... ... <![%version2; [ <section id="installtunnel"> ... ... ]> I have also made a few changes to /usr/share/sgml/docbook/utils-0.6.12/docbook-utils.dsl. I didn't want to figure out how to create a proper customization layer so I just changed that one. (this is the .dsl that is used when I type 'docbook2{html,pdf} mydoc.docbook'.) Most of the changes are just switching variables from #t to #f, but a couple are more interesting, such as preferring pdf imagedata objects in print, and suppressing <p> tags within <ul> tags by redefining the (listitem para itemizedlist) element. Will those have to be completely redone in XSL? Though I conceptually understand the XML/XSL/DSSSL thing now, I'm still fuzzy on implementation details. Thanks for your comments so far! -ben -- Ben Hartshorne email: ben@hartshorne.net http://ben.hartshorne.net
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]