Subject: Re: Global Variables and JADE vs OMNIMARK From: "W. Eliot Kimber" <eliot@xxxxxxxxxxxxxx> Date: Mon, 07 Dec 1998 18:43:20 -0600 |
At 03:31 PM 12/7/98 -0700, Mike Sosteric wrote: >(element (PUBLISHER NAME) > (make paragraph > (get-publisher-name (current-node)) > (process-children) > ) >if this is correct, are there other repacements for (current-node) Yes. Anything that returns a node will work, as long as it's in the same grove as the one you want to get the publisher name from. All the nodes in a grove have the same root, so it doesn't matter what node you give the function, because the node-property function with a value of 'grove-root will always return the same node (the root of the grove that contains the node you passed in). >and also, in the above you say ;do navigation magic but I don't understand what >that is supposed to mean. Is that a necessary part of the function Insert whatever functions will get you to the thing you want by walking around in the grove. It's important to remember that you always have the entire grove available and can use combinations of different functions (children, ancestor, select-element, node-property, etc.) to walk around in it. Thus, no matter where you are when processing a particular rule, you can get anywhere else in the grove. This is one reason you don't need global variables: anything you need to know can be calculated when you need it--there's no need to pre-calculate things and then store them. > W> output. It should be pretty obvious how to use it, but if not, > W> there are lots of examples. Typical element rules might be: > >Where are these examples located? For a fairly complex example, try <http://www.ornl.gov/sgml/wg8/docs/n1920/dsssl/hyt2html.dsl>. This is the DSSSL spec I wrote to convert the SGML source of the HyTime standard into HTML. Cheers, E. -- <Address HyTime=bibloc> W. Eliot Kimber, Senior Consulting SGML Engineer ISOGEN International Corp. 2200 N. Lamar St., Suite 230, Dallas, TX 75202. 214.953.0004 www.isogen.com </Address> DSSSList info and archive: http://www.mulberrytech.com/dsssl/dssslist
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: Global Variables and JADE vs OM, Mike Sosteric | Thread | Re: Global Variables and JADE vs OM, Mike Sosteric |
Re: Global Variables and JADE vs OM, Mike Sosteric | Date | Re: Global Variables and JADE vs OM, Mike Sosteric |
Month |