[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]
Subject: Re: [docbook] Newbie: create named data items?
On Fri, Jun 27, 2003 at 11:34:09PM +0100, Thomas Nichols wrote: > Hi, > > I'm just starting to use DocBook XML in earnest, I'm trying to (ab?)use the > DTD to store "meta" information about the text. Am I approaching this aright? > > Problem: a <book> has <section>s for a number of minerals. For each, I have > a Name, a "History" section, a "Geology" section, etc. I want to create a > valid DocBook doc, so that I can publish the entire book, but I want to add > markup to allow me to print, say, just Name and Geology sections. A > different stylesheet might extract just Name and History sections. > > I'm effectively trying to use the doc as generic and processable XML data, > within the confines of DocBook. Is this a terrible approach? Would I be > best writing in "uber-DocBook", my own markup which allows > <geology>p>blah...</p></geology> > and then transforming this into valid DocBook by either evaporating or > excluding the spurious "geology" tags. > > I'd like to get to the point where the user says "show me the Name, > Abundance in Earth's Crust and History" and the appropriate sections will > be emitted. What other approaches can anyone suggest? Any feedback would be > very welcome. Take a look at the profiling features included with the DocBook XSL stylesheet distribution. Profiling is the term used in DocBook to describe conditional text. Conditional text means you can create a single XML document with some elements marked as conditional. When you process such a document, you can specify which conditions apply for that version of output, and the stylesheet will include or exclude the marked text to satisfy the conditions. See http://www.sagehill.net/docbookxsl/Profiling.html for more information. -- Bob Stayton 400 Encinal Street Publications Architect Santa Cruz, CA 95060 Technical Publications voice: (831) 427-7796 The SCO Group fax: (831) 429-1887 email: bobs@sco.com
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]