[OCLUG-devel] Conditionally Included Sections in HTML Doc

Christopher Smith x at xman.org
Fri Aug 12 16:31:05 PDT 2005


Doug Jolley wrote:
> I have a rather large HTML document which which I'm going to call the
> master document and which includes a variety of sections.  Actually,
> this large document represents a composite of several smaller separate
> documents each of which are a derivitive of the master document
> drawing certain sections alternatively and choosing whether to include
> other sections conditionally.  The point is that all of the smaller
> documents can be built from the larger document by selecting and/or
> conditionally including sections from the mater document.  The reason
> I maintain the master document is that it is much easier to maintain
> the one master document and then develop the derivitive documents on
> the fly (i.e., programmatically) as needed.  I am trying to figure out
> how to best develop the derivitive documents programmatically from the
> master document.  PGP is an obvious solution.

I'm guessing you mean PHP. ;-)

> Using the here document
> feature of bash script seems appealing.  Using server-side includes
> seems a bit clumsey; but, could also be considered a possibility. 
> That's about the only 3 possibilities I recognize as being practical. 
> I'm wondering what I might be missing.  Suggestions?  Thanks for any
> input.

I should think the proper thing would be to have files for each of the
component parts, which are then assembled as externally parsed entities.
There's a good document on this stuff (and other stuff):

http://www.xml.org/xml/xslt_efficient_programming_techniques.pdf

--Chris


More information about the OCLUG-devel mailing list