Re: Root of a not-yet-parsed document?

Subject: Re: Root of a not-yet-parsed document?
From: Chris Maden <crism@xxxxxxx>
Date: Fri, 1 May 1998 00:56:52 -0400 (EDT)
[Paul Prescod]
> Chris Maden wrote:
> > The problem is that I need this function to define some parameters
> > (lists of element type names, for instance), where there isn't yet
> > any (current-node).
> 
> Can't you call the function from where ever you need the string
> after the tree walk has started?

Duh.  Of course I can.

There is a small drawback in performance from evaluating the list
every time it's called (which is pretty often), but given the
heinousness already perpetrated by my stylesheets, that won't be a big
deal.  (My sysadmins love me.  Can you say "98% CPU usage, boys and
girls?")

So that's the practical answer.  The more interesting, but not
immediately useful, theoretical question is: What if I couldn't?  What
if I needed to access some property of the root node of the document
outside of an node context?  What would I do?

-Chris

(Thanks, Paul.)
-- 
<!NOTATION SGML.Geek PUBLIC "-//Anonymous//NOTATION SGML Geek//EN">
<!ENTITY crism PUBLIC "-//O'Reilly//NONSGML Christopher R. Maden//EN"
"<URL>http://www.oreilly.com/people/staff/crism/ <TEL>+1.617.499.7487
<USMAIL>90 Sherman Street, Cambridge, MA 02140 USA" NDATA SGML.Geek>


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


Current Thread
  • Re: Root of a not-yet-parsed document?
    • Chris Maden - from mail1.ability.netby web4-1.ability.net (8.8.5/8.6.12) with ESMTP id BAA07936Fri, 1 May 1998 01:03:53 -0400 (EDT) <=
      • James Clark - from mail1.ability.netby web4-1.ability.net (8.8.5/8.6.12) with ESMTP id HAA16576Fri, 1 May 1998 07:38:28 -0400 (EDT)
      • Paul Prescod - from mail1.ability.netby web4-1.ability.net (8.8.5/8.6.12) with ESMTP id AAA05592Sat, 2 May 1998 00:24:37 -0400 (EDT)