Subject: Re: some basic questions From: Chris Maden <crism@xxxxxxx> Date: Fri, 10 Apr 1998 13:10:55 -0400 |
[W. Eliot Kimber] > What Jade doesn't support is the query *feature* of the style > language, which means that you can't use query construction > rules. However, you can get around this by replacing the normal > construction rules with a single default rule that uses a COND > expression to apply queries to the current node, e.g.: > > (default > (cond > ((query-function-one (current-node)) > (make x)) > ((query-function-two (current-node)) > (make y)) > (else > (process-children))) > > It's ham fisted, but it works. I don't know how efficient it is > (probably not very). It's not very effective. That rule is a default element construction rule, and only applies to element nodes. Those can easily be handled by the regular element construction rules; indeed, if an applicable element construction rule exists, the default rule won't be called at all. The times I've wished for the query feature, it's been to match non- element nodes, like processing instructions and sdata entities. -Chris -- <!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 |
---|
|
<- Previous | Index | Next -> |
---|---|---|
RE: some basic questions, W. Eliot Kimber | Thread | RE: some basic questions, Reynolds, Gregg |
RE: some basic questions, W. Eliot Kimber | Date | RE: some basic questions, Reynolds, Gregg |
Month |