This is the mail archive of the
docbook@lists.oasis-open.org
mailing list for the DocBook project.
Re: DocBook-XML and conditional sections
- To: Stephane Bortzmeyer <bortzmeyer at pasteur dot fr>
- Subject: Re: DOCBOOK: DocBook-XML and conditional sections
- From: Norman Walsh <ndw at nwalsh dot com>
- Date: Tue, 28 Sep 1999 09:43:47 -0400
- Cc: docbook at lists dot oasis-open dot org
- References: <199909281155.NAA17380@ezili.sis.pasteur.fr>
- Reply-To: docbook at lists dot oasis-open dot org
/ Stephane Bortzmeyer <bortzmeyer@pasteur.fr> was heard to say:
| On Tuesday 28 September 1999, at 7 h 5, the keyboard of Norman Walsh
| <ndw@nwalsh.com> wrote:
|
| > Or you could use an SGML solution :-), as opposed to an XML
| > solution, and use conditional sections.
|
| I would like to be able to use purely-XML tools in the future (and may be
| XSL). Of course, I can always normalize and get rid of unwanted sections
| before, but it becomes complicated.
Yes, I understand.
| > There are already about five attributes for this purpose. You might get
| > away with using one of them: Arch, Conformance, OS, UserLevel, and Vendor.
|
| I don't see which one to use for a revision level ("Revision" refers to the
| level of the document, not the level of the software we document.) May be
| using "OS"?
Oh, the semantics of effectivity attributes are all a bit loose. If you're
documenting different versions of Linux or something similar, I think
OS makes sense.
| > I think your best bet for XML is to use the effectivity
| > attributes, although it's a far from perfect solution,
| > clearly.
|
| I will have to modify the stylesheet I use (your DocBook
| Modular Stylesheets, DSSSL version), to ignore or include
| elements, based on the attributes' value. Any idea on the best
| way to do it? I don't see anything in the DocBook Modular
| Stylesheets' documentation and it doesn't seem obvious: the
| common attributes can be in all elements.
It would be fairly easy in XSL, but I don't think it can be done
easily in DSSSL (as implemented in Jade, anyway). If you know that
you'll only put the effectivity attributes on a few elements, you
can special case those.
From a purely practical point of view, I suggest the following:
1. Since you're using XML, you've got lots of parser choices.
Implement a two-pass solution, using Java or Perl or something else
to produce the appropriately profiled document then publish that.
2. Run your documents through the XSL stylesheets and tell Norm all
the things that don't work right, the things that prevent you from
switching to the XSL versions of the stylesheets. I have reason to
believe that he'd be very receptive to such comments :-)
Cheers,
norm
--
Norman Walsh <ndw@nwalsh.com> | In science, "fact" can only mean
http://www.oasis-open.org/docbook/ | "confirmed to such a degree that
Member, DocBook Editorial Board | it would be perverse to withhold
| provisional assent." I suppose
| that apples might start to rise
| tomorrow, but the possibility does
| not merit equal time in physics
| classrooms.--Stephen J. Gould