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])
        [etc]))

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


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

  http://www.uottawa.ca/~dmeggins/grove.html


All the best,


David

-- 
David Megginson                 ak117@xxxxxxxxxxxxxxxxxxx
Microstar Software Ltd.         dmeggins@xxxxxxxxxxxxx
University of Ottawa            dmeggins@xxxxxxxxxx
        http://www.uottawa.ca/~dmeggins


Current Thread