[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [Elist Home]
Subject: Re: DOCBOOK-APPS: Customize (extend) DTD and XSL stylesheet
Thank you Stephane for your included examples, which are useful to better understand the matter. I will study these and expect to come back with more concrete follow-up questions later on. Terje Stephane Bortzmeyer wrote: >On Fri, Feb 21, 2003 at 12:41:05AM +0100, > Terje J. Hanssen <nteknikk@monet.no> wrote > a message of 21 lines which said: > > >>I have looked in chpt 4 and 5 of 'DocBook: The Definitive Guide', the >>article on xml.com and the DocBook XSL stylesheet docs. >> > >Yes, I find it quite clear. > > >>need some simple examples and/or advices to clarify, especially >>regarding extending the DTD with a few additonal XML elements and >>attributes. >> > >If you want examples, here is what I do: > >~/AFNIC/formation % more lib/afnic-docbook.inc > ><!ELEMENT rfc EMPTY> ><!ATTLIST rfc num CDATA #IMPLIED> > ><!-- Allow <rfc> in paragraphs --> ><!ENTITY % local.para.char.mix > "|rfc"> > >~/AFNIC/formation % more routage_long/ospf.db ><?xml version="1.0" encoding="iso-8859-1"?> ><!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN" > "dtd/xml/4.1.2/docbookx.dtd"[ ><!ENTITY % afnic_custom SYSTEM "../lib/afnic-docbook.inc"> >%afnic_custom; >]> ><article lang="fr"> >... >Voir le <rfc num="2740"/> >... > >~/AFNIC/formation % more lib/html.xsl ><?xml version='1.0'?> ><xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" > version='1.0'> ><xsl:import > href="/usr/share/sgml/docbook/stylesheet/xsl/nwalsh/html/docbook.xsl"/> > ><xsl:template match="rfc"> > <xsl:variable name="href"> > <xsl:text>http://www.ietf.org/rfc/rfc</xsl:text><xsl:value-of select="@num"/><xsl:text>.txt</xsl:text> > </xsl:variable> ><a href="{$href}"><xsl:text>RFC </xsl:text><xsl:value-of select="@num"/><xsl:text></xsl:text></a> ></xsl:template> > ></xsl:stylesheet> > > >
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [Elist Home]
Powered by eList eXpress LLC