Re: Jade for HTML

Subject: Re: Jade for HTML
From: David Megginson <dmeggins@xxxxxxxxxx>
Date: Tue, 22 Apr 1997 10:29:56 -0400
Taranov Alexander writes:

 > Could somebody give me a simplistic example of using 'node-property' ?

;; Test whether an element should have an end tag
(if (node-property 'must-omit-end-tag? (current-node))
  [action #1]
  [action #2])

;; Take actions based on a node's class
(let ((class (node-property 'class-name (current-node))))
  (cond ((equal? class 'element) [action #1])
        ((equal? class 'data-char) [action #1])
        ((equal? class 'sdata) [action #3])

;; Get the root of a grove (class-name is 'sgml-document)
(let ((root (node-property 'grove-root (current-node))))

For a (possibly buggy) list of supported node classes and properties,

All the best,


David Megginson                 ak117@xxxxxxxxxxxxxxxxxxx
Microstar Software Ltd.         dmeggins@xxxxxxxxxxxxx
University of Ottawa            dmeggins@xxxxxxxxxx

Current Thread