OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

docbook-apps message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]


Subject: Re: [docbook-apps] Abbreviation or aliases


Hi Chris,

On Fri, May 06, 2005 at 09:56:11AM -0700, Chris Johnson wrote:

> This seems like a sensible way to go, but what if you have more than
> 200 or so entities? I'm working on a document that uses at least
> this many, and they are re-generated from a database extract (along
> with the entity driver files)... I have been happy with this
> approach to date but now I'm working in a .NET environment, and I'll
> have to move from DTD to schema and/or schema + internal DTD
> subset...

I use a variation of Michael's PI-based pseudo-entity approach, and
just build the entity-relpacement stylesheet as needed.  The source
for the mapping of entities to replacements is an XML file using a
voabulary I invented for the purpose.

<entities>
  <entity name="foo"
          description="Company name">
    <orgname class="corporation">Foo Corp</orgname>
  </entity>

[...]
</entities>

I use an XSLT stylesheet to transform that source into the kind of
XSLT that Michael described to do the actual PI replacement.

There's probably no good reason the source for the mappings needs to
be expressed in XML.  If your entities come from the output of some
database, maybe you could use Perl to generate the XSLT that does the
replacement.

> Any other thoughts on this? 

My final thoughts are pretty much the same as Michael's.  I find this
to be a pretty verbose workaround for what is really just a macro
expansion problem.  But it's all-XML (for whatever that's worth) and
it works.  :-)  (Maybe I should just add m4 to my toolchain...)


-- 
Paul.

w  http://logicsquad.net/
h  http://paul.hoadley.name/

PGP signature



[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]