File: query-root.dsl

package info (click to toggle)
openjade 1.4devel1-8
  • links: PTS
  • area: main
  • in suites: woody
  • size: 4,776 kB
  • ctags: 11,092
  • sloc: cpp: 72,706; sh: 7,501; ansic: 2,365; lisp: 894; perl: 518; makefile: 461; sed: 93
file content (26 lines) | stat: -rw-r--r-- 722 bytes parent folder | download | duplicates (9)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
<!DOCTYPE style-sheet PUBLIC "-//James Clark//DTD DSSSL Style Sheet//EN" >

(root (make simple-page-sequence (process-children)))

(element A
  (with-mode test-mode
    (make sequence
      (process-node-list (q-element 'sub (sgml-parse "query-root2.sgml")))
      (process-children))))

(define (describe-match s)
  (make paragraph 
    (literal "test-mode " s " matching " (gi (current-node))
             " in " (gi (parent (current-node))))))
 
(mode test-mode

;; this should match sub elements in the grove being processed, but
;; not in node-lists created via sgml-parse
(query (q-element 'sub (current-root))
  (describe-match "query rule"))

(default 
  (describe-match "default rule"))
  
) ;; end of test-mode