The Modular DocBook Stylesheets
PrevDSSSL LibraryNext

sgml-root-element

Name

sgml-root-element — Returns the node that is the root element of the current document

Synopsis

(sgml-root-element)

Description

Return the root element of the document by walking up from wherever we are. (Isn't this built-in to DSSSL somehow???)

Author

Norman Walsh, <norm@berkshire.net>

Source Code

(define (sgml-root-element)
  ;; Returns the node that is the root element of the current document
  (let loop ((root (current-node)))
    (if (node-list-empty? (parent root))
	root
	(loop (parent root)))))

PrevHomeNext
repl-substring?Upsiblings