This is the mail archive of the docbook@lists.oasis-open.org mailing list for the DocBook project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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

---------------------------------------------------------------------
To unsubscribe, e-mail: docbook-unsubscribe@lists.oasis-open.org
For additional commands, e-mail: docbook-help@lists.oasis-open.org


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]