[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]
Subject: Re: [docbook-apps] Alternative to internal entities?
[I am reviving this thread to describe what I eventually did.] On Fri, May 07, 2004 at 05:43:10PM +0900, Michael Smith wrote: > Just came across this today: > > Entity Definition Markup Language > > http://www.talsever.org/xml/edml.html That is certainly interesting. (However, in Section 4, "Usage", they do seem to acknowledge that every implementation idea would be either impossible, difficult or ill-advised. :-) In the interests of getting something working now (well, three months after the date-stamp on Michael's quote above, anyway!), I went with (ab)using a processing instruction: <?entity?>. My completely minimalist solution is as follows: 1. I have a tiny schema for describing sets of entities. I write an XML instance describing my entities and their macro-like replacement values (text or XML fragments). 2. I run an XSL transformation over the entity description file, the output of which is an XSL stylesheet. 3. The XSL stylesheet produced in step 2 is for pre-processing the source document containing these entity PIs. It has a template to recognise the PIs, and then substitute the replacement. Otherwise it is an identity transform, so if the input is DocBook, the output is DocBook. So it adds one transform step to the processing of a document. It does not implement any of Michael's clever suggestions like fetching the entities from a URL, but it works. If anyone wants to see the code, I can put it up somewhere and post the URL to the list. -- Paul. w http://logicsquad.net/ h http://paul.hoadley.name/
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]