[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [Elist Home]
Subject: Re: DOCBOOK-APPS: designing an XSL stylesheet for "pidgin" docbook
On Tue, Feb 18, 2003 at 11:41:32AM -0500, Robert P. J. Day wrote: > > i'm following the advice of one of the posters here and designing > an XSL stylesheet that will allow me to write in what i'm calling > "pidgin" docbook, with shortcuts for all of the elements i use, > like <p> for <para>, <em> for <emphasis>, and so on. > > what i'm not clear on is how to write a template for an > element that contains mixed content. this is what markus > spath posted to help me out: > > > <xsl:template match="@* | node()"> > > <xsl:copy><xsl:apply-templates select="@* | node()" /></xsl:copy> > > </xsl:template> > > > > <xsl:template match="li"> > > <listitem><para><xsl:apply-templates /></para></listitem> > > </xsl:template> > > obviously, in the case of the "li" element, i want to apply templates > to all of the content, including just copying the text over untouched. > is that what that first template definition is specifying? that > any non-element content is just copied? Yes, node() matches element, text, pi, and comments nodes. All but attribute nodes, which is why you also need @*. -- 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
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [Elist Home]
Powered by eList eXpress LLC