[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]
Subject: Re: DOCBOOK-APPS: qnaentry in div, not html wrapper
On Tue, Mar 11, 2003 at 07:48:20PM +0000, Dave Pawson wrote: > At 10:55 11/03/2003 -0800, Bob Stayton wrote: > >On Tue, Mar 11, 2003 at 04:34:43PM +0000, Dave Pawson wrote: > > > I'm playing with docbook via a servlet, > > > with queries into mySQL database. > > > That means I may get n results. > > > Each row would refer to a single qnaentry. > > > > > > I'd like to wrap them all in a single html document, > > > each entry in some wrapper. > > > > > > Has anyone looked at this class of customisation please? > > > >I'm not completely clear on what you are trying to do. > >Is your servlet converting the data to DocBook elements? > > 1. Take a keyword from a user > 2. Use that to look up in MySQL. > 3. Returns the filename (xml docbook) > 4. Use XSLT and Norms stylesheets to convert to html > 5. Present that at the servlet as the 'result'. > > > > > >Couldn't you create a DocBook document with > >root element <qandaset> and each entry in > >a <qandaentry>? If you give it a title and > >turn on the qandaset toc, then you wouldn't need any > >stylesheet customization. > > Each 'answer' will be one qandaentry, > and since I may want to display n of them, > I need one html wrapper, > then n 'divs' or something, one per qandaentry. > > > > > >If you want each entry (both Q and A) in a <div> wrapper, > >then something like this should work: > > > ><xsl:template match="qandaentry"> > > <div class="qandaentry"> > > <xsl:apply-templates/> > > </div> > ></xsl:template> > > So...... > Provide my own template for the outer, > then xsl:include ... what Bob? > > Surely not docbook.xsl? > 1. Take a keyword from a user > 2. Use that to look up in MySQL. > 3. Returns the filename (xml docbook) > 4. Use XSLT and Norms stylesheets to convert to html > 5. Present that at the servlet as the 'result'. Doesn't "Surely not docbook.xsl" contradict #4? Why not docbook.xsl? Anyway, what I was suggesting is that the servlet do this: 3.1 Create a DocBook wrapper document: <?xml version="1.0"?> <!DOCTYPE qandaset PUBLIC blah balh> <qandaset> <?dbhtml toc="1" ?> <title>Answers to your question</title> <xi:include href="first.xml"/> <xi:include href="second.xml"/> <xi:include href="third.xml"/> </qandaset> Then step 4 processes that to html using xsltproc with the --xinclude option and docbook.xsl. Why not docbook.xsl? Too big, too slow? -- 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]