[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]
Subject: Re: [docbook] Handling placeholders for certain texts..
Rajal Shah <rajal@meshsoftware.com> writes: > We have a bunch of text - where the actual information is provided much > much later in the process.. These texts are inserted at numerous places in > all the XML books and we need to insert placeholder for them. What is the > best way to handle them in docbook? Is there a way to define placeholders > for them and then assign the final/actual value for them to be replaced > with? > > Almost all the placeholders are determined at authoring time by the actual > writer himself.. For example: we announce a bunch of release information > with URLS for the software and documentation details. The URLs are not > known to us up front but we include that information in tons of places in > our docset. (much like Text entities with DTDs). > > We use Docbook schemas. One way is to use PIs as pseduo-entities, like this: For more information, see <?e main-doc-url ?>. Then, write an "identity transform" XSL stylesheet with templates to transform those PIs into whatever you want to replace them with. For example: <xsl:template match="processing-instruction('e')[normalize-space() = 'main-doc-url']"> <ulink url="http://foo.com/docs">the latest documentation set</ulink> </xsl:template> Then, pre-process your DocBook XML source with that stylesheet before doing final validation and processing them for final output. Not the prettiest way to do it, but it works. --Mike -- Michael Smith http://logopoeia.com/ http://www.oreillynet.com/pub/au/890
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]