Re: Finding the root element

Subject: Re: Finding the root element
From: "G. Ken Holman" <gkholman@xxxxxxxxxxxxxx>
Date: Thu, 29 Oct 1998 10:30:10 -0500
At 98/10/29 08:37 -0500, Norman Walsh wrote:
>Yes, but in (root ...) there's no (current-node), so how do I get 'node'?

Actually, for (root) there is a current node ... see below.

...... Ken


T:\dsssl>type test.sgm
<!DOCTYPE doc [
<!ELEMENT doc - O ( this )>
<!ELEMENT this - O ( that )>
<!ELEMENT that - O ( #pcdata )>
]><doc>
<this>
<that>that stuff
</doc>

T:\dsssl>type test.dsl
<!DOCTYPE style-sheet PUBLIC "-//James Clark//DTD DSSSL Style Sheet//EN">

(root
    (process-node-list
        (select-elements
            (children                       ;the children of
                (children                   ;the children of
                    (node-property          ;the document element
                        'docelem
                        (current-node))))
            "THAT")))
                    
(element that
    (process-children))

(element doc            ;avoid default behaviour looking correct
    (empty-sosofo))
    
;end of file

T:\dsssl>jade -c p:\jade\jadecurr\catalog test.sgm

T:\dsssl>type test.fot
<?xml version="1.0"?>
<fot>
<a name="2"/>
<text>that stuff</text>
</fot>

T:\dsssl>



--
G. Ken Holman               mailto:gkholman@xxxxxxxxxxxxxx
Crane Softwrights Ltd.  http://www.CraneSoftwrights.com/d/
Box 266,                                V: +1(613)489-0999
Kars, Ontario CANADA K0A-2E0            F: +1(613)489-0995
Training:   http://www.CraneSoftwrights.com/d/schedule.htm
Resources: http://www.CraneSoftwrights.com/d/resources.htm
Shareware: http://www.CraneSoftwrights.com/d/shareware.htm


 DSSSList info and archive:  http://www.mulberrytech.com/dsssl/dssslist


Current Thread