This is the mail archive of the docbook-apps@lists.oasis-open.org mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Aliases?


On Tue, Jan 21, 2003 at 11:08:09PM +0100, Olivier Chapuis wrote:
> Hello,
> 
> I think that some inline tags are too long. I would like to
> use aliases. For example I would like to be able to use
> <f> in the place of <filename>.
> 
> At the style-sheet level I can add
> 
> <xsl:template match="f">
>   <xsl:call-template name="inline.monoseq"/>
> </xsl:template>
> 
> but of course this solution is bad. Is there a more generic
> solution? Something that look like "#define f filename".
 
Nothing so simple exists in XML or XSL syntax.  Rather than
mess with the Docbook stylesheets (which are quite
complex), you could create a separate prefilter stylesheet
that copies everything while mapping your element names to
docbook names. Then you feed the the result to the stock
docbook stylesheets.  Of course, your original documents
won't validate against the DocBook DTD until you do that
step.  Unless you create a customized DocBook DTD with
your replacement names.

> I need also to extand the DocBook DTD. Again it is easy to found
> a bad solution: cut-and-paste the definition of the filename
> element. Again, Is there a more generic solution?

Chapter 5 of "DocBook - The Definitive Guide" at
http://docbook.org/tdg/en/html/ch05.html provides
guidance for extending the DTD.

-- 

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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]