This is the mail archive of the
docbook-apps@lists.oasis-open.org
mailing list .
Re: Access to the root node in dsssl ?
- To: docbook-apps at lists dot oasis-open dot org
- Subject: Re: DOCBOOK-APPS: Access to the root node in dsssl ?
- From: Norman Walsh <ndw at nwalsh dot com>
- Date: Tue, 25 Sep 2001 11:27:29 -0400
- List-Id: <docbook-apps.lists.oasis-open.org>
- References: <20010925161308.A14932@kasba.alcove-fr>
/ Yann Dirson <ydirson@alcove.fr> was heard to say:
| I'm trying to have my dsssl transformation stylesheets guess the gi of
| the root element (article, book, table, ...), so that I can output the
| correct doctype line.
|
| Unfortunately in the following clause the call to (gi) returns #f.
| Anyone knows what the problem is ?
|
| (root
| (make sequence
| (make document-type
| name: (gi (current-root))
| public-id: "-//Norman Walsh//DTD DocBk XML V3.1.3//EN"
| system-id: "/usr/lib/sgml/dtd/docbook-xml/docbookx.dtd")
| (process-children)))
Yeah, the problem is that when the root template fires, there is no
current node (it's a little weird, but it's "above" the root, so to
speak). The trick is:
(node-property 'document-element (node-property 'grove-root grove-node)))
Which is the definition of (sgml-root-element) in dblib.dsl :-)
| to no avail. (children (current-root)) also returns an empty
| node-list in this context, which seems suspicious to me.
No current node, no children.
Be seeing you,
norm
--
Norman Walsh <ndw@nwalsh.com> | Everything the same; everything
http://www.oasis-open.org/docbook/ | distinct.
Chair, DocBook Technical Committee |
----------------------------------------------------------------
To subscribe or unsubscribe from this elist use the subscription
manager: <http://lists.oasis-open.org/ob/adm.pl>