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: FAQ: XML solution for conditonal sections


On Fri, Dec 21, 2001 at 10:28:04AM -0800, Bernd Kreimeier wrote:
> 
> Question:
> Is there a canonical way to implement an equivalent to SGML marked
> sections in DocBook XML. I have prowled list archives a bit, and
> followed up on past proposals like XCond. My assumption right now is
> that this is best done by introducing a common attribute, and then
> attempting to modify the XSLT process to omit all content contained
> in an element without the desired attributes? If this is an FAQ and 
> there are examples for the taking, I appreciate pointers.

Indeed, this is a FAQ:

http://www.dpawson.co.uk/docbook/styling/profiling.html

It's called "profiling" in the FAQ, and it's done with
XML attributes and a XSLT preprocessor stylesheet.

> Some more comments:
> A preprocessor solution as frequently suggested does not seem to work,
> as introducing a non-XML element in XML source will break XML-aware
> editing tools.

> While SGML INCLUDE/IGNORE entities aren't the most flexible or elegant
> solution, they do the job in a straightforward way.
> 
> The DocBook guide seems to lack a "Adding an attribute" example?

See Example 5.1 in
http://www.docbook.org/tdg/en/html/ch05.html#ch05-write

-- 

Bob Stayton                                 400 Encinal Street
Publications Architect                      Santa Cruz, CA  95060
Technical Publications                      voice: (831) 427-7796
Caldera International, Inc.                 fax:   (831) 429-1887
                                            email: bobs@caldera.com


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