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: [docbook-apps] body.attributes


Hi Jeff,
I just wanted to let you know that I tried this example from about a month
ago
because I was going to cover body.attributes in my DocBook XSL book, but
I got some pretty crazy results.

When I used xsl:apply-imports in the customization layer, xsltproc went into
a
loop and started spewing all kinds of noise.  I tried it with an XSLT
debugger, and I found that apply-imports does not work with
named templates.  That is, it doesn't call the named template
body.attributes from
the original stylesheet.  Instead, it takes the current node and *applies*
templates that match from the original stylesheet.  At that point, the
context node
was still the document root node, so it started to process
<xsl:template match="*" mode="process.root"> again, basically starting
over again. This is why it went into the loop.

So I think to modify the body attributes, you have to replace the
body.attributes
template completely in the customization layer.  I don't think there is a
way to
call a named template from the imported stylesheet.

Bob Stayton
Sagehill Enterprises
bobs@sagehill.net




> From: Jeff Beal <jeff.beal@ansys.com>
> To: 'Kenneth Johansson' <ke-joh@sectra.se>,
> DOCBOOK-APPS <docbook-apps@lists.oasis-open.org>
> Date: Thu, 5 Jun 2003 12:14:01 -0400
> Subject: RE: [docbook-apps] body.attributes
>
> Use:
>
> <xsl:template name="body.attributes">
>  <xsl:attribute name="id">bodyID</xsl:attribute>
>  <xsl:apply-imports/>
> </xsl:template>
>
> The apply-imports element will call the same template in the imported
> stylesheets.
>
> You can replace 'bodyID' with <xsl:value-of select="@id"/> to pull the id
> from the element that is creating the HTML page.
>
> Jeff
>
> > -----Original Message-----
> > From: Kenneth Johansson [mailto:ke-joh@sectra.se]
> > Sent: Thursday, June 05, 2003 8:37 AM
> > To: DOCBOOK-APPS
> > Subject: [docbook-apps] body.attributes
> >
> >
> > From where does the XSL template body.attributes fetch the
> > attributes for the body tag?
> >
> > I'd like to insert a special attribute id="bodyID" in the
> > body tag without disrupting the attributes that always are
> > put in the body tag.
> >
> > best regards,
> >
> > /Kenneth
> >
> > --------------------------------------------------------
> > Kenneth Johansson Technical Documentation Manager
> > Sectra Imtec AB
> > Teknikringen 2 E-mail: ke-joh AT sectra DOT se
> > SE-583 30 Linköping Phone: +46 13 23 52 00
> > SWEDEN Web: http://www.sectra.se
>


---------------------------------------------------------------------
To unsubscribe, e-mail: docbook-apps-unsubscribe@lists.oasis-open.org
For additional commands, e-mail: docbook-apps-help@lists.oasis-open.org


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