Subject: RE: XSL equivalent sought. From: "Didier PH Martin" <martind@xxxxxxxxxxxxx> Date: Sat, 2 Oct 1999 12:22:28 -0400 |
Hi Peter, Peter said: But wouldn't it be possible to implement this as a function in terms of the existing SDQL? I don't know XPath very well, but to me it seems possible, since we can parse strings using the EL and SDQL gives us the whole grove. IMO this should be tried before the real work on DSSSL-2 starts. Didier says: The construct already showed are SDQL constructs. see below > > DSSSL1 expression: (example 1) > (process-node-list (select-elements > (descendants (current-root)) > '(FRONTMATTER DATE))) > DSSSL1 expression: (example 2) > (sgml-root-element) or something similar, defined as: > > (define (sgml-root-element #!optional (grove-node (current-node))) > (node-property 'document-element (node-property 'grove-root grove-node))) > In this case the equivalent of an absolute positioning to the root expressed > by XPath by "/". > Now compare this to: > XPath expression: > "/frontmatter/date"/> However, if anyone can create a SDQL construct which is as economical, terse and relatively easy to learn (this last attribute, is, however, very subjective), I am all ears and eyes. So, let's see if we can have a SDQL construct as economical as : "/frontmatter/date" I'll remain silent and let the others do the exercise. I already invested so many hours on this issue. So the goal is: find the most economical SDQL construct for "from the root, go to the element date which is itself child of frontmatter". The result of the query is an element node. With a string based expression like XPath (I do not sell XPath here, let's just have a thread of reflection about the pros and cons of string based expressions for GROVE querying). As an example, with XPath you would have "/frontmatter/date". So with SDQL you would have? (I won't answer. I already did the exercise). But be cautious, With this exercise, your expression has to be SDQL compliant (in accordance with Hytime and DSSSL1 specs). However, you are allowed in this exercise to propose SDQL improvements (the beginning of some improvements - - Hint: James created an alternative language which is scheme based but is not SDQL, see the DSSSL2 option, you'll find there the XPath ancestor, you may consider James proposal as a SDQL alternative). And now compare. Other question: What are the different ways to reach a GROVE's element (list different GROVE access languages). OK, back to the cavern and go back work :-) Have a good day Didier PH Martin mailto:martind@xxxxxxxxxxxxx http://www.netfolder.com DSSSList info and archive: http://www.mulberrytech.com/dsssl/dssslist
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
RE: XSL equivalent sought., Peter Nilsson | Thread | Re: XSL equivalent sought., Matthias Clasen |
RE: DOM an xsl, Didier PH Martin | Date | Re: XSL equivalent sought., Matthias Clasen |
Month |