From cstrong at arielpartners.com Fri Nov 16 14:36:14 2001 From: cstrong at arielpartners.com (Craeg K. Strong) Date: Sat Aug 26 17:54:15 2006 Subject: [exslt] [PROPOSE] new exslt function: "evaluate" Message-ID: <3BF586CE.7040604@arielpartners.com> Hello: The SAXON XSLT processor has an extremely useful proprietary extension "saxon:evaluate(string)" Here is the doc: The supplied string must contain an XPath expression. The result of the function is the result of evaluating the XPath expression. This is useful where an expression needs to be constructed at run-time or passed to the stylesheet as a parameter, for example where the sort key is determined dynamically. The context for the expression (e.g. which variables and namespaces are available) is exactly the same as if the expression were written explicitly at this point in the stylesheet. The function saxon:evaluate(string) is shorthand for saxon:eval(saxon:expression(string)). If there were an EXSLT evaluate function, I could code my XSLT transformer to use it, and then simply "roll my own" when using a processor that did not support it natively. I am actually coding up the implementation for this function for 4Suite 4XSLT now. How does one go about proposing new exslt functions? TIA, --Craeg From jeni at jenitennison.com Mon Nov 19 05:44:11 2001 From: jeni at jenitennison.com (Jeni Tennison) Date: Sat Aug 26 17:54:15 2006 Subject: [exslt] Updates Message-ID: <15212090685.20011119124411@jenitennison.com> Hi, Over the weekend, I finally got round to doing some updates that have been sitting around for ages: - changed the definition of str:tokenize() so that if the second argument is an empty string it returns a node set of token elements each containing a single character from the string. Changed the XSLT implementations to match. - fixed the XSLT template and function implementations of str:replace(). Also changed the definition slightly to bring it into line with str:tokenize() (as above) such that an empty search string leads to the replace string being inserted between each character. - changed the definition of str:padding() so that if the second argument (the padding string) is an empty string, it returns an empty string. Changed the XSLT implementations to match. - added a str:split() function as suggested by Kipp Howard. These are currently being uploaded. Cheers, Jeni --- Jeni Tennison http://www.jenitennison.com/ From uche.ogbuji at fourthought.com Mon Nov 19 07:48:54 2001 From: uche.ogbuji at fourthought.com (Uche Ogbuji) Date: Sat Aug 26 17:54:15 2006 Subject: [exslt] [PROPOSE] new exslt function: "evaluate" In-Reply-To: Message from "Craeg K. Strong" of "Fri, 16 Nov 2001 16:36:14 EST." <3BF586CE.7040604@arielpartners.com> Message-ID: <200111191448.fAJEmsv15180@localhost.localdomain> > Hello: > > The SAXON XSLT processor has an extremely useful proprietary extension > "saxon:evaluate(string)" I agree with your proposal. Actually, it's merely a part of a whole dynamic module I'd proposed and planned to write up before things got quite hectic for me, time-management wise. > If there were an EXSLT evaluate function, I could code my XSLT > transformer to use it, and then simply > "roll my own" when using a processor that did not support it natively. > > I am actually coding up the implementation for this function for 4Suite > 4XSLT now. Why? There is already a built-in ft:evaluate extension. See http://4suite.org/4Suite.org/documents/4Suite/4XPath-Extensions -- Uche Ogbuji Principal Consultant uche.ogbuji@fourthought.com +1 303 583 9900 x 101 Fourthought, Inc. http://Fourthought.com 4735 East Walnut St, Boulder, CO 80301-2537, USA XML strategy, XML tools (http://4Suite.org), knowledge management From khoward at courtlink.com Mon Nov 19 08:48:05 2001 From: khoward at courtlink.com (Kipp Howard) Date: Sat Aug 26 17:54:15 2006 Subject: [exslt] Updates Message-ID: <588DDEA4CC3AD411AE5200508BC5D2110A0578@hqmsx01.internal.courtlink.com> Jeni Tennison [mailto:jeni@jenitennison.com] wrote: > Over the weekend, I finally got round to doing some updates that have > been sitting around for ages: > - added a str:split() function as suggested by Kipp Howard. Thanks for adding this. I have been meaning to get around to submitting an official proposal but work has been _very_ busy for the last couple of months. Thanks again. -- Kipp E. Howard - Sr. Software Engineer @ CourtLink kipp.howard@courtlink.com (425) 372-1837 or (800) 774-7317 ext 1837 From jeni at jenitennison.com Mon Nov 19 10:35:12 2001 From: jeni at jenitennison.com (Jeni Tennison) Date: Sat Aug 26 17:54:15 2006 Subject: [exslt] [PROPOSE] new exslt function: "evaluate" In-Reply-To: <200111191448.fAJEmsv15180@localhost.localdomain> References: <200111191448.fAJEmsv15180@localhost.localdomain> Message-ID: <19912877276.20011119173512@jenitennison.com> Uche wrote: >> The SAXON XSLT processor has an extremely useful proprietary >> extension "saxon:evaluate(string)" > > I agree with your proposal. Actually, it's merely a part of a whole > dynamic module I'd proposed and planned to write up before things > got quite hectic for me, time-management wise. I think it's time we got this back on its feet again. We discussed various dynamic functions back in May (!) including: - evaluate() - min() and max() - closure() - distinct() There were three main issues, I think: 1 should the expression be an expression object (ala Saxon) or a string? 2 what limits should there be on the content of the expression? 3 are the higher-order functions like min() and max() distinct from their standard counterparts - should they be in a different module? I think the answer to #1 is that it should be a string, and that the answer to #3 is that they should be in their own module. We had a bit of discussion on #2 which is mainly difficult because of wanting it to be possible to have third-party (i.e. non-built-in) implementations of the functions, for example using func:function in XSLT. I think, though, that as long as evaluate() is supported, you could write an XSLT function for the rest. For usability, I think it would be best if evaluate() worked *exactly* as if its string argument had been used as an expression in its place. In other words: gave exactly the same result as: This requires all the usual context information (variables, namespace declarations, extension functions, context node, size, and position, and current node) to be available within the function, which I think is feasible? Cheers, Jeni --- Jeni Tennison http://www.jenitennison.com/ From cstrong at arielpartners.com Mon Nov 19 10:46:51 2001 From: cstrong at arielpartners.com (Craeg K. Strong) Date: Sat Aug 26 17:54:15 2006 Subject: [exslt] [PROPOSE] new exslt function: "evaluate" References: <200111191448.fAJEmsv15180@localhost.localdomain> Message-ID: <3BF9458B.4080605@arielpartners.com> Uche Ogbuji wrote: >>Hello: >> >>The SAXON XSLT processor has an extremely useful proprietary extension >>"saxon:evaluate(string)" >> > >I agree with your proposal. Actually, it's merely a part of a whole dynamic >module I'd proposed and planned to write up before things got quite hectic for >me, time-management wise. > Excellent! Looking forward to it. >>If there were an EXSLT evaluate function, I could code my XSLT >>transformer to use it, and then simply >>"roll my own" when using a processor that did not support it natively. >> >>I am actually coding up the implementation for this function for 4Suite >>4XSLT now. >> >Why? There is already a built-in ft:evaluate extension. > >See > >http://4suite.org/4Suite.org/documents/4Suite/4XPath-Extensions > Thanks for pointing that out. I am using it now, but had to make a fix: lines 172-174 in _xmlplus/xpath/BuiltInExtFunctions.py read: def Evaluate(context, expr): import xml.xpath return xml.xpath.Evaluate(Conversions.StringValue(st), context=context) It should read: def Evaluate(context, expr): import xml.xpath return xml.xpath.Evaluate(Conversions.StringValue(expr), context=context) looks like a simple case of cut-and-paste-itus. Is this maybe already fixed in your CVS? Thanks! --Craeg From uche.ogbuji at fourthought.com Mon Nov 19 21:11:20 2001 From: uche.ogbuji at fourthought.com (Uche Ogbuji) Date: Sat Aug 26 17:54:15 2006 Subject: [exslt] [PROPOSE] new exslt function: "evaluate" In-Reply-To: Message from Jeni Tennison of "Mon, 19 Nov 2001 17:35:12 GMT." <19912877276.20011119173512@jenitennison.com> Message-ID: <200111200411.fAK4BLH16588@localhost.localdomain> > Uche wrote: > >> The SAXON XSLT processor has an extremely useful proprietary > >> extension "saxon:evaluate(string)" > > > > I agree with your proposal. Actually, it's merely a part of a whole > > dynamic module I'd proposed and planned to write up before things > > got quite hectic for me, time-management wise. > > I think it's time we got this back on its feet again. We discussed > various dynamic functions back in May (!) including: > > - evaluate() > - min() and max() > - closure() Just to recap, since I think most of the discussion was on the xsl-list, what were the precise semantics we were seeking for the closure() function again? Unfortunately, each programming language seems to have a slightly variant concept of closures. > - distinct() > > There were three main issues, I think: > > 1 should the expression be an expression object (ala Saxon) or a > string? string > 2 what limits should there be on the content of the expression? I think none. If one implements module dyn, then they are prepared to make all the context available. If they object to this, as the gentleman from Microsoft did (quite reasonably) on performance grounds, or others, they can just decline to implement it. I'd rather not cripple the module with arbitrary limitations. > 3 are the higher-order functions like min() and max() distinct from > their standard counterparts - should they be in a different module? Yep. They should be in a different module. > I think the answer to #1 is that it should be a string, and that the > answer to #3 is that they should be in their own module. > > We had a bit of discussion on #2 which is mainly difficult because of > wanting it to be possible to have third-party (i.e. non-built-in) > implementations of the functions, for example using func:function in > XSLT. I think, though, that as long as evaluate() is supported, you > could write an XSLT function for the rest. > > For usability, I think it would be best if evaluate() worked *exactly* > as if its string argument had been used as an expression in its place. > In other words: > > > > gave exactly the same result as: > > > > This requires all the usual context information (variables, namespace > declarations, extension functions, context node, size, and position, > and current node) to be available within the function, which I think > is feasible? Agreed. Let's discuss this all a bit to be sure we're clear on the semantics we're seeking. I'd be grateful to anyone who can post pointers to appropriate threads on the mammoth XSL List ( a cursory examination didn't help me). -- Uche Ogbuji Principal Consultant uche.ogbuji@fourthought.com +1 303 583 9900 x 101 Fourthought, Inc. http://Fourthought.com 4735 East Walnut St, Boulder, CO 80301-2537, USA XML strategy, XML tools (http://4Suite.org), knowledge management From jeni at jenitennison.com Tue Nov 20 02:22:42 2001 From: jeni at jenitennison.com (Jeni Tennison) Date: Sat Aug 26 17:54:15 2006 Subject: [exslt] [PROPOSE] new exslt function: "evaluate" In-Reply-To: <200111200411.fAK4BLH16588@localhost.localdomain> References: <200111200411.fAK4BLH16588@localhost.localdomain> Message-ID: <152698664.20011120092242@jenitennison.com> Hi Uche, > Just to recap, since I think most of the discussion was on the > xsl-list, what were the precise semantics we were seeking for the > closure() function again? Unfortunately, each programming language > seems to have a slightly variant concept of closures. This was the function proposed by Christian Nantwich, and which has been implemented in Saxon (saxon:closure()). The syntax is: closure(node-set, expression) The expression is evaluated for the node set in the first argument, and the resulting nodes are added to the result node set. Then the expression is evaluated for the result node set, and the results of that added to the result node set. And this process continues until no more nodes are added. It allows you to do things like, when you have a flat structure describing a hierarchy: closure(child, "key('parents', @parentID)") to get all the 'ancestors' of a node (the parent, the parent's parent and so on). Cheers, Jeni --- Jeni Tennison http://www.jenitennison.com/ From uche.ogbuji at fourthought.com Tue Nov 20 06:57:12 2001 From: uche.ogbuji at fourthought.com (Uche Ogbuji) Date: Sat Aug 26 17:54:15 2006 Subject: [exslt] [PROPOSE] new exslt function: "evaluate" In-Reply-To: Message from Jeni Tennison of "Tue, 20 Nov 2001 09:22:42 GMT." <152698664.20011120092242@jenitennison.com> Message-ID: <200111201357.fAKDvDO17967@localhost.localdomain> > Hi Uche, > > > Just to recap, since I think most of the discussion was on the > > xsl-list, what were the precise semantics we were seeking for the > > closure() function again? Unfortunately, each programming language > > seems to have a slightly variant concept of closures. > > This was the function proposed by Christian Nantwich, and which has > been implemented in Saxon (saxon:closure()). The syntax is: > > closure(node-set, expression) > > The expression is evaluated for the node set in the first argument, > and the resulting nodes are added to the result node set. Then the > expression is evaluated for the result node set, and the results of > that added to the result node set. And this process continues until no > more nodes are added. Sounds good to me. I would like to add the following: map(node-set, expression) Which is basically a "flat" closure, i.e. it returns a node set which is a result of applying the expression to each node in the given node set. filter(node-set, expression) Which returns a node set that returns a node set of nodes from the given node set which, when applied against the expression, return boolean 1 or a value that can be coerced thereto. Also, I would like to support expression results in all these cases that are non-node-set. I think this should be done by returning result tree nodes in that case. They can all come from a common RTF, and they can be of the form 2.3 spam eggs If not, we would either have to ban expressions that return other than node set, or we'd have to create a custom list object. -- Uche Ogbuji Principal Consultant uche.ogbuji@fourthought.com +1 303 583 9900 x 101 Fourthought, Inc. http://Fourthought.com 4735 East Walnut St, Boulder, CO 80301-2537, USA XML strategy, XML tools (http://4Suite.org), knowledge management From DPawson at rnib.org.uk Tue Nov 20 07:12:21 2001 From: DPawson at rnib.org.uk (DPawson@rnib.org.uk) Date: Sat Aug 26 17:54:15 2006 Subject: [exslt] [PROPOSE] new exslt function: "evaluate" Message-ID: <9B66BBD37D5DD411B8CE00508B69700FE7A7A9@pborolocal.rnib.org.uk> > If not, we would either have to ban expressions that return > other than node > set, or we'd have to create a custom list object. Pity James Clark isn't on this list, I'm sure he'd be chuckling. If true lisp like lists were available, we might as well revert to Scheme, one of the reasons given for the non adoption of DSSSL. If map is on the horizon, or being considered, a similar list based one I miss is member (nd, node-list) returning boolean. Regards DaveP - NOTICE: The information contained in this email and any attachments is confidential and may be legally privileged. If you are not the intended recipient you are hereby notified that you must not use, disclose, distribute, copy, print or rely on this email's content. If you are not the intended recipient, please notify the sender immediately and then delete the email and any attachments from your system. RNIB has made strenuous efforts to ensure that emails and any attachments generated by its staff are free from viruses. However, it cannot accept any responsibility for any viruses which are transmitted. We therefore recommend you scan all attachments. Please note that the statements and views expressed in this email and any attachments are those of the author and do not necessarily represent those of RNIB. RNIB Registered Charity Number: 226227 Website: http://www.rnib.org.uk From c.nentwich at cs.ucl.ac.uk Tue Nov 20 12:37:10 2001 From: c.nentwich at cs.ucl.ac.uk (Christian Nentwich) Date: Sat Aug 26 17:54:15 2006 Subject: [exslt] [PROPOSE] new exslt function: "evaluate" In-Reply-To: <200111201357.fAKDvDO17967@localhost.localdomain> References: <200111201357.fAKDvDO17967@localhost.localdomain> Message-ID: <1006285031.1201.5.camel@wasabi.cs.ucl.ac.uk> > > This was the function proposed by Christian Nantwich, and which has > > been implemented in Saxon (saxon:closure()). The syntax is: > > > > closure(node-set, expression) > map(node-set, expression) > filter(node-set, expression) > And remember, what we were left with was that all of these require the evaluation function to be put in place and defined properly. In particular, it must be clear what current() returns in the case of such an expression (this is important for the transitive closure, where "current" should refer to the working set, so that new things can be added by comparison to the working set). (Oh, and it has been implemented for Xalan too, but only Xalan 1 :) Christian From jeni at jenitennison.com Tue Nov 20 08:21:59 2001 From: jeni at jenitennison.com (Jeni Tennison) Date: Sat Aug 26 17:54:15 2006 Subject: [exslt] [PROPOSE] new exslt function: "evaluate" In-Reply-To: <200111201357.fAKDvDO17967@localhost.localdomain> References: <200111201357.fAKDvDO17967@localhost.localdomain> Message-ID: <1046874304.20011120152159@jenitennison.com> Hi Uche, > Sounds good to me. I would like to add the following: > > map(node-set, expression) > > Which is basically a "flat" closure, i.e. it returns a node set > which is a result of applying the expression to each node in the > given node set. Cool, yes. > filter(node-set, expression) > > Which returns a node set that returns a node set of nodes from the > given node set which, when applied against the expression, return > boolean 1 or a value that can be coerced thereto. Is there any difference between that and: node-set[dyn:evaluate(expression)] If not, does having it as a separate function gain us anything? > Also, I would like to support expression results in all these cases > that are non-node-set. I think this should be done by returning > result tree nodes in that case. They can all come from a common RTF, > and they can be of the form > > 2.3 > spam eggs > > If not, we would either have to ban expressions that return other > than node set, or we'd have to create a custom list object. Sounds good to me. (So they always return a node set, but sometimes the items in that node set are elements in the http://exslt.org/dyn namespace, right?) Are you happy for map() to return a node set of different length to the first argument node set? For example, if foo elements have multiple bar element children then: map(foo, 'bar') would return a node set of more bar elements than there were foo elements. Also if you use something weird like: map(foo, 'following::bar') then you'd get one of each bar element. I'd also assume that with map(), if the results are simple values then the nodes in the resulting node set should have a document order corresponding to the document order of the nodes that generated those values as passed by the first argument. However, if the expression resolves to a node set, the document order of the nodes returned doesn't necessarily comply with the order of the nodes in the first argument. An alternative, which would mean that expressions returning nodes were treated roughly the same as those returning simple values would be to have something like: where the id attribute is the generated ID of the node. This would allow you to have ordering and so on of the resulting node 'set'. But it would make it a lot harder to deal with the results of the map() function. My vote, for usability, would be for node sets being treated differently from simple values, despite the fact that it means map() doesn't do what you might expect map() to do in those cases. BTW, we should use this in things like str:tokenize() and str:split() - return string elements in some particular namespace. So that we can reuse this method of returning sequences of simple values, perhaps the namespace should be http://exslt.org/common. Cheers, Jeni --- Jeni Tennison http://www.jenitennison.com/ From uche.ogbuji at fourthought.com Tue Nov 20 22:31:06 2001 From: uche.ogbuji at fourthought.com (Uche Ogbuji) Date: Sat Aug 26 17:54:15 2006 Subject: [exslt] [PROPOSE] new exslt function: "evaluate" In-Reply-To: Message from DPawson@rnib.org.uk of "Tue, 20 Nov 2001 14:12:21 GMT." <9B66BBD37D5DD411B8CE00508B69700FE7A7A9@pborolocal.rnib.org.uk> Message-ID: <200111210531.fAL5V6r20198@localhost.localdomain> > > If not, we would either have to ban expressions that return > > other than node > > set, or we'd have to create a custom list object. > > Pity James Clark isn't on this list, I'm sure he'd be chuckling. > If true lisp like lists were available, we might as well > revert to Scheme, one of the reasons given for the non > adoption of DSSSL. Ha! Ho! I use lists, list comprehensions, and other higher-order functions daily without needing to swim in functional arcana. It's this great programming language called Python... ;-) > If map is on the horizon, or being considered, a similar list > based one I miss is member (nd, node-list) returning boolean. This is pretty close to the semantics of the simple = operator used on node sets. Can you elaborate on what member would do differently? -- Uche Ogbuji Principal Consultant uche.ogbuji@fourthought.com +1 303 583 9900 x 101 Fourthought, Inc. http://Fourthought.com 4735 East Walnut St, Boulder, CO 80301-2537, USA XML strategy, XML tools (http://4Suite.org), knowledge management From uche.ogbuji at fourthought.com Tue Nov 20 22:36:06 2001 From: uche.ogbuji at fourthought.com (Uche Ogbuji) Date: Sat Aug 26 17:54:15 2006 Subject: [exslt] [PROPOSE] new exslt function: "evaluate" In-Reply-To: Message from Christian Nentwich of "20 Nov 2001 14:37:10 EST." <1006285031.1201.5.camel@wasabi.cs.ucl.ac.uk> Message-ID: <200111210536.fAL5a6r20216@localhost.localdomain> > > > > This was the function proposed by Christian Nantwich, and which has > > > been implemented in Saxon (saxon:closure()). The syntax is: > > > > > > closure(node-set, expression) > > map(node-set, expression) > > filter(node-set, expression) > > > > And remember, what we were left with was that all of these require the > evaluation function to be put in place and defined properly. Well, let's merrily hash out all that needs be hashed out. > In particular, it must be clear what current() returns in the case of > such an expression (this is important for the transitive closure, where > "current" should refer to the working set, so that new things can be > added by comparison to the working set). Hmm, but though current() returns a node set, it has only one member in XSLT. Should we be dodging this restriction in case of dynamic expressions? I'd rather just define a dyn:working-set() -- Uche Ogbuji Principal Consultant uche.ogbuji@fourthought.com +1 303 583 9900 x 101 Fourthought, Inc. http://Fourthought.com 4735 East Walnut St, Boulder, CO 80301-2537, USA XML strategy, XML tools (http://4Suite.org), knowledge management From uche.ogbuji at fourthought.com Tue Nov 20 23:11:17 2001 From: uche.ogbuji at fourthought.com (Uche Ogbuji) Date: Sat Aug 26 17:54:15 2006 Subject: [exslt] [PROPOSE] new exslt function: "evaluate" In-Reply-To: Message from Jeni Tennison of "Tue, 20 Nov 2001 15:21:59 GMT." <1046874304.20011120152159@jenitennison.com> Message-ID: <200111210611.fAL6BHS20246@localhost.localdomain> > Hi Uche, > > > Sounds good to me. I would like to add the following: > > > > map(node-set, expression) > > > > Which is basically a "flat" closure, i.e. it returns a node set > > which is a result of applying the expression to each node in the > > given node set. > > Cool, yes. > > > filter(node-set, expression) > > > > Which returns a node set that returns a node set of nodes from the > > given node set which, when applied against the expression, return > > boolean 1 or a value that can be coerced thereto. > > Is there any difference between that and: > > node-set[dyn:evaluate(expression)] > > If not, does having it as a separate function gain us anything? True enough. Let's ditch that one. > > Also, I would like to support expression results in all these cases > > that are non-node-set. I think this should be done by returning > > result tree nodes in that case. They can all come from a common RTF, > > and they can be of the form > > > > 2.3 > > spam eggs > > > > If not, we would either have to ban expressions that return other > > than node set, or we'd have to create a custom list object. > > Sounds good to me. (So they always return a node set, but sometimes > the items in that node set are elements in the http://exslt.org/dyn > namespace, right?) Yup, and in particular, these nodes are sometimes result tree nodes. > Are you happy for map() to return a node set of different length to > the first argument node set? For example, if foo elements have > multiple bar element children then: > > map(foo, 'bar') > > would return a node set of more bar elements than there were foo > elements. Sigh. I guess. I so often do with XSLT had first-class heterogeneous list objects. > Also if you use something weird like: > > map(foo, 'following::bar') > > then you'd get one of each bar element. Yes. > I'd also assume that with map(), if the results are simple values then > the nodes in the resulting node set should have a document order > corresponding to the document order of the nodes that generated those > values as passed by the first argument. However, if the expression > resolves to a node set, the document order of the nodes returned > doesn't necessarily comply with the order of the nodes in the first > argument. Makes sense as well. Thanks for spelling out all these design details. > An alternative, which would mean that expressions returning nodes > were treated roughly the same as those returning simple values would > be to have something like: > > > > > > where the id attribute is the generated ID of the node. This would > allow you to have ordering and so on of the resulting node 'set'. But > it would make it a lot harder to deal with the results of the map() > function. This is similar to what 4XSLT does in the dump-vars extension: $ cat dv.xslt yolk $ 4xslt dv.xslt dv.xslt yolk 1.2spam > My vote, for usability, would be for node sets being treated > differently from simple values, despite the fact that it means map() > doesn't do what you might expect map() to do in those cases. Agreed. This makes sense for dump-vars, and I'm sure in other cases, but not for map(), IMO. > BTW, we should use this in things like str:tokenize() and str:split() > - return string elements in some particular namespace. So that we can > reuse this method of returning sequences of simple values, perhaps the > namespace should be http://exslt.org/common. Agreed. -- Uche Ogbuji Principal Consultant uche.ogbuji@fourthought.com +1 303 583 9900 x 101 Fourthought, Inc. http://Fourthought.com 4735 East Walnut St, Boulder, CO 80301-2537, USA XML strategy, XML tools (http://4Suite.org), knowledge management From baixf at ustc.edu.cn Wed Nov 21 17:45:23 2001 From: baixf at ustc.edu.cn (=?gb2312?B?sNfRqbfJ?=) Date: Sat Aug 26 17:54:15 2006 Subject: [exslt] About set:distinct template Message-ID: <000801c172ee$f876e950$324326ca@CCICBaixf> How to get a node-set to use by set:distinct template? Thanks! -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.fourthought.com/pipermail/exslt/attachments/20011122/6835c206/attachment.html From jeni at jenitennison.com Thu Nov 22 02:50:06 2001 From: jeni at jenitennison.com (Jeni Tennison) Date: Sat Aug 26 17:54:15 2006 Subject: [exslt] About set:distinct template In-Reply-To: <000801c172ee$f876e950$324326ca@CCICBaixf> References: <000801c172ee$f876e950$324326ca@CCICBaixf> Message-ID: <10961714751.20011122095006@jenitennison.com> Hi, > How to get a node-set to use by set:distinct template? Templates can't result in node-sets, so what the set:distinct template does (and other similar templates do) is apply templates to the nodes in that node set in a specific 'set:distinct' mode. You can write a template in 'set:distinct' mode that then handles the nodes that it's found, so something like:
  • Another possible design for the templates is to return a result tree fragment that contains copies of the nodes, but this way is usually better because it maintains the identity of the nodes. If you have an example of where you're trying to use it, do send it along and we'll try to show how to do so. Cheers, Jeni --- Jeni Tennison http://www.jenitennison.com/ From baixf at ustc.edu.cn Thu Nov 22 04:43:36 2001 From: baixf at ustc.edu.cn (Bai Xuefei) Date: Sat Aug 26 17:54:15 2006 Subject: [exslt] About set:distinct template References: <000801c172ee$f876e950$324326ca@CCICBaixf> <10961714751.20011122095006@jenitennison.com> Message-ID: <000201c1734b$1bcce9c0$324326ca@CCICBaixf> Thank you very much! > Hi, > > > How to get a node-set to use by set:distinct template? > > Templates can't result in node-sets, so what the set:distinct template > does (and other similar templates do) is apply templates to the nodes > in that node set in a specific 'set:distinct' mode. > > You can write a template in 'set:distinct' mode that then handles the > nodes that it's found, so something like: > > >
  • >
    > > Another possible design for the templates is to return a result tree > fragment that contains copies of the nodes, but this way is usually > better because it maintains the identity of the nodes. > > If you have an example of where you're trying to use it, do send it > along and we'll try to show how to do so. > For example, There is the xml source code as: I hope to get the result as: France: Paris, Lyon, Calais Spain: Madrid, Barcelona Austria: Vienna, Salzburg Germany: Bonn, Hannover, Berlin I do not know how to use the result of set:distinct template to do so. Can you help me? :) > Cheers, > > Jeni > > --- > Jeni Tennison > http://www.jenitennison.com/ > > > From jeni at jenitennison.com Thu Nov 22 05:27:39 2001 From: jeni at jenitennison.com (Jeni Tennison) Date: Sat Aug 26 17:54:15 2006 Subject: [exslt] About set:distinct template In-Reply-To: <000201c1734b$1bcce9c0$324326ca@CCICBaixf> References: <000801c172ee$f876e950$324326ca@CCICBaixf> <10961714751.20011122095006@jenitennison.com> <000201c1734b$1bcce9c0$324326ca@CCICBaixf> Message-ID: <15471168895.20011122122739@jenitennison.com> Hi, > There is the xml source code as: > > country="France" /> > country="Spain" /> > country="Austria" /> > country="Spain" /> > country="Austria" /> > country="Germany" /> > country="France" /> > country="Germany" /> > country="France" /> > country="Germany" /> > > > I hope to get the result as: > > France: > Paris, Lyon, Calais > Spain: > Madrid, Barcelona > Austria: > Vienna, Salzburg > Germany: > Bonn, Hannover, Berlin > > I do not know how to use the result of set:distinct template to do so. Create a key that indexes each city based on its country: That allows you to quickly get at all the cities from a particular country using: key('cities', $country) Now use the set:distinct template to get the unique @country attributes in the document: Then create a template that matches the country attributes in set:distinct mode. In there, give the value of that country attribute, a colon, a new line, and then iterate over the cities that you retrieve using the key, as follows: : , The countries come out in a slightly different order from the one you're expecting, but hopefully that isn't a problem. I hope that helps, Jeni --- Jeni Tennison http://www.jenitennison.com/ From dandiebolt at yahoo.com Thu Nov 22 06:48:29 2001 From: dandiebolt at yahoo.com (Dan Diebolt) Date: Sat Aug 26 17:54:15 2006 Subject: [exslt] Milliseconds since 1970-01-01T00:00:00Z ? Message-ID: <20011122134829.96036.qmail@web12607.mail.yahoo.com> I need to convert between an integer number of milliseconds since 1970-01-01T00:00:00Z and a formatted date string. I searched archive and date-time library and can't quite see exactly what I am looking for. There was only one comment by Jeni in the archives addressing this: "JavaScript's Date.getTime(), Java's Date.getTime() and Java's GregorianCalendar.getTimeinMillis all return the number of milliseconds since 1970-01-01T00:00:00Z. Perhaps there should be a separate date:unix-time() or something function to give that kind of functionality?" Can someone clear me up if this is possible with the existing library? I probably could settle for seconds to date conversion but I need to go in both directions: CCYY-MM-DDThh:mm:ss -> intMilliseconds intMilliseconds -> CCYY-MM-DDThh:mm:ss Thanks in advance. __________________________________________________ Do You Yahoo!? Yahoo! GeoCities - quick and easy web site hosting, just $8.95/month. http://geocities.yahoo.com/ps/info1 From jeni at jenitennison.com Thu Nov 22 07:08:57 2001 From: jeni at jenitennison.com (Jeni Tennison) Date: Sat Aug 26 17:54:15 2006 Subject: [exslt] Milliseconds since 1970-01-01T00:00:00Z ? In-Reply-To: <20011122134829.96036.qmail@web12607.mail.yahoo.com> References: <20011122134829.96036.qmail@web12607.mail.yahoo.com> Message-ID: <1977246845.20011122140857@jenitennison.com> Hi Dan, > I need to convert between an integer number of milliseconds since > 1970-01-01T00:00:00Z and a formatted date string. I searched archive > and date-time library and can't quite see exactly what I am looking > for. There was only one comment by Jeni in the archives addressing > this: > > "JavaScript's Date.getTime(), Java's Date.getTime() and Java's > GregorianCalendar.getTimeinMillis all return the number of > milliseconds since 1970-01-01T00:00:00Z. Perhaps there should be a > separate date:unix-time() or something function to give that kind of > functionality?" > > Can someone clear me up if this is possible with the existing > library? I probably could settle for seconds to date conversion but > I need to go in both directions: > > CCYY-MM-DDThh:mm:ss -> intMilliseconds > intMilliseconds -> CCYY-MM-DDThh:mm:ss The quote, I think, was in response to Mike suggesting that date:seconds() return seconds since some other epoch rather than 1970-01-01T00:00:00Z, but as it stands we haven't changed date:seconds(). You should be able to use: date:seconds($dateTimeString) * 1000 to get milliseconds. There's a JavaScript version of this function. I've almost completed an XSLT function/template version, but there are still a few things to sort out with it. For milliseconds *to* a dateTime, you can convert the milliseconds into a duration with date:duration() and then add that duration to 1970-01-01T00:00:00Z with date:add(): date:add('1970-01-01T00:00:00Z', date:duration($milliseconds div 1000)) Again, there are JavaScript versions of both these functions, courtesy of Chris. There are also XSLT template/functions for them. Cheers, Jeni --- Jeni Tennison http://www.jenitennison.com/ From jeni at jenitennison.com Thu Nov 22 12:30:35 2001 From: jeni at jenitennison.com (Jeni Tennison) Date: Sat Aug 26 17:54:15 2006 Subject: [exslt] which xslt processor?? In-Reply-To: References: Message-ID: <18896543682.20011122193035@jenitennison.com> Hi Andy, > I read a post from Jenni saying XT doesnt support user defined > functions, and her recommendation was to use one that did...... > however, no indication of an alternative was posted. I am interested > in knowing of a processor that will support UDFunctions, can be used > on windows commandline (batch process) and can work with system > variables (well, it needs to know system time when the batch runs, > thats it so far) Any help appreciated. Most up-to-date XSLT processors have some way of defining your own functions. And most are runnable from the command line. A few processors support func:function, which allows you to define your own functions using XSLT. These are currently: - 4XSLT - Saxon - libxslt (though that's not runnable from the command line, as far as I know) A couple of processors support xsl:script from XSLT 1.1, which enables you to define your own functions in java or javascript. Saxon and jd.xslt both support Java extensions, I think, but not javascript (correct me if I'm wrong Mike & Johannes). You could access the standard Java objects for getting the current date with them, I think. Other processors support their own extension mechanisms as well. MSXML supports , and Xalan , both of which you can use to define your own extension functions in JavaScript (as well as other languages). Most of the EXSLT functions have JavaScript implementations that are usable in MSXML, thanks to Chris Bayes. To get the system time, you need date:date-time() (or roll your own - just create a new Date() object). You can run MSXML from the command line using msxsl.exe, which you can get from msdn.microsoft.com. Saxon also supports date:date-time() natively. So your choices are (in alphabetical order): - 4XSLT (Python - http://4suite.org/) - jd.xslt (Java - http://www.aztecrider.com/xslt/) - MSXML (C++ - http://msdn.microsoft.com/xml) - Saxon (Java - http://saxon.sourceforge.net/) - Xalan (Java - http://xml.apache.org/xalan-j/) Cheers, Jeni --- Jeni Tennison http://www.jenitennison.com/ From jeni at jenitennison.com Fri Nov 23 02:54:53 2001 From: jeni at jenitennison.com (Jeni Tennison) Date: Sat Aug 26 17:54:15 2006 Subject: [exslt] which xslt processor?? In-Reply-To: <18896543682.20011122193035@jenitennison.com> References: <18896543682.20011122193035@jenitennison.com> Message-ID: <66148402000.20011123095453@jenitennison.com> I wrote: > A few processors support func:function, which allows you to define > your own functions using XSLT. These are currently: [snip] > - libxslt (though that's not runnable from the command line, as far > as I know) My mistake (and thanks to Thomas Broyer for pointing it out) - you can use libxslt using the command line xsltproc.exe and get the Windows binaries from http://www.fh-frankfurt.de/~igor/projects/libxml/index.html. So add that as another one on the list of XSLT processors supporting user-defined extension functions that can be run from the command line: - 4XSLT (Python - http://4suite.org/) - jd.xslt (Java - http://www.aztecrider.com/xslt/) - libxslt (C++ - http://xmlsoft.org/XSLT/) - MSXML (C++ - http://msdn.microsoft.com/xml) - Saxon (Java - http://saxon.sourceforge.net/) - Xalan (Java - http://xml.apache.org/xalan-j/) Cheers, Jeni --- Jeni Tennison http://www.jenitennison.com/ From cutlass at secure0.com Fri Nov 23 03:54:34 2001 From: cutlass at secure0.com (cutlass) Date: Sat Aug 26 17:54:15 2006 Subject: [exslt] which xslt processor?? References: <18896543682.20011122193035@jenitennison.com> Message-ID: <004101c1740d$3d0d4040$9e01a8c0@ROSEBUD> > - libxslt (though that's not runnable from the command line, as far > as I know) xsltproc i believe is the cmd line for libxslt j From ndw at nwalsh.com Fri Nov 23 15:13:12 2001 From: ndw at nwalsh.com (Norman Walsh) Date: Sat Aug 26 17:54:15 2006 Subject: [exslt] which xslt processor?? In-Reply-To: <004101c1740d$3d0d4040$9e01a8c0@ROSEBUD> References: <18896543682.20011122193035@jenitennison.com> <004101c1740d$3d0d4040$9e01a8c0@ROSEBUD> Message-ID: <87g0755e6f.fsf@nwalsh.com> / "cutlass" was heard to say: | > - libxslt (though that's not runnable from the command line, as far | > as I know) | | xsltproc i believe is the cmd line for libxslt That's right. Be seeing you, norm -- Norman Walsh | Wink at small faults; for thou has http://nwalsh.com/ | great ones.--Thomas Fuller (II) From baixf at ustc.edu.cn Sun Nov 25 02:14:27 2001 From: baixf at ustc.edu.cn (Bai Xuefei) Date: Sat Aug 26 17:54:15 2006 Subject: [exslt] About set:distinct template References: <000801c172ee$f876e950$324326ca@CCICBaixf> <10961714751.20011122095006@jenitennison.com> <000201c1734b$1bcce9c0$324326ca@CCICBaixf> <15471168895.20011122122739@jenitennison.com> Message-ID: <000b01c17591$993ec520$324326ca@CCICBaixf> > Hi, > > > There is the xml source code as: > > > > > country="France" /> > > > country="Spain" /> > > > country="Austria" /> > > > country="Spain" /> > > > country="Austria" /> > > > country="Germany" /> > > > country="France" /> > > > country="Germany" /> > > > country="France" /> > > > country="Germany" /> > > > > > > I hope to get the result as: > > > > France: > > Paris, Lyon, Calais > > Spain: > > Madrid, Barcelona > > Austria: > > Vienna, Salzburg > > Germany: > > Bonn, Hannover, Berlin > > > > I do not know how to use the result of set:distinct template to do so. > > Create a key that indexes each city based on its country: > > > > That allows you to quickly get at all the cities from a particular > country using: > > key('cities', $country) > > Now use the set:distinct template to get the unique @country > attributes in the document: > > > > > > Then create a template that matches the country attributes in > set:distinct mode. In there, give the value of that country attribute, > a colon, a new line, and then iterate over the cities that you > retrieve using the key, as follows: > > > > > : > > > , > > > > The countries come out in a slightly different order from the one > you're expecting, but hopefully that isn't a problem. > > I hope that helps, Thanks, it works very well. In fact, if I re-sort the city elements by the @country attribute in the xml source, the output is as same as I want. And sorting the city element by one of its attributes is easy to do using some software, e.g., XML Spy. > > Jeni > > --- > Jeni Tennison > http://www.jenitennison.com/ > > > From jeni at jenitennison.com Sun Nov 25 07:53:23 2001 From: jeni at jenitennison.com (Jeni Tennison) Date: Sat Aug 26 17:54:15 2006 Subject: [exslt] Dynamic module Message-ID: <2518632121.20011125145323@jenitennison.com> Hi, Following our discussions over the past week or so, I've put together some descriptions of functions for the dynamic module at: http://www.exslt.org/dynamic The functions listed there are: - dyn:evaluate() - dyn:max() - dyn:min() - dyn:sum() - dyn:map() - dyn:closure() Have a look and post any comments about their definitions here. Cheers, Jeni --- Jeni Tennison http://www.jenitennison.com/ From uche.ogbuji at fourthought.com Tue Nov 27 08:16:05 2001 From: uche.ogbuji at fourthought.com (Uche Ogbuji) Date: Sat Aug 26 17:54:15 2006 Subject: [exslt] Dynamic module In-Reply-To: Message from Jeni Tennison of "Sun, 25 Nov 2001 14:53:23 GMT." <2518632121.20011125145323@jenitennison.com> Message-ID: <200111271516.fARFG5N18199@localhost.localdomain> > Hi, > > Following our discussions over the past week or so, I've put together > some descriptions of functions for the dynamic module at: > > http://www.exslt.org/dynamic Gives me a 404. -- Uche Ogbuji Principal Consultant uche.ogbuji@fourthought.com +1 303 583 9900 x 101 Fourthought, Inc. http://Fourthought.com 4735 East Walnut St, Boulder, CO 80301-2537, USA XML strategy, XML tools (http://4Suite.org), knowledge management From uche.ogbuji at fourthought.com Tue Nov 27 10:38:34 2001 From: uche.ogbuji at fourthought.com (Uche Ogbuji) Date: Sat Aug 26 17:54:15 2006 Subject: [exslt] Dynamic module In-Reply-To: Message from Jeni Tennison of "Sun, 25 Nov 2001 14:53:23 GMT." <2518632121.20011125145323@jenitennison.com> Message-ID: <200111271738.fARHcYc18639@localhost.localdomain> > Hi, > > Following our discussions over the past week or so, I've put together > some descriptions of functions for the dynamic module at: Again, I'm very grateful for your efforts. > http://www.exslt.org/dynamic With Jim's help, I found them at http://www.exslt.org/dyn/index.html > The functions listed there are: > > - dyn:evaluate() > - dyn:max() > - dyn:min() > - dyn:sum() All hunky dory. > - dyn:map() "The string value of each exsl:number element is the same as the result of converting the number resulting from evaluating the expression to a string as with the number function, with the exception that Infinity results in an exsl:number holding the highest number the implementation can store, and -Infinity results in an exsl:number holding the lowest number the implementation can store. " I really think we should return the strings "Infinity" and "-Infinity" in this case. Besides the matter of compatibility and readibility, Inf and the highest number that can be stored are not really the same things, and behave differently in certain situations. > - dyn:closure() "the context position is the position of the node within the node set passed as the first argument to the dyn:closure function, arranged in document order" Is this the case even with nodes that are generated by the closure that do not happen to be in the original set? Also, in the language above, I think that your saying "The expression is thus evaluated several times, each with a different node set acting as the context of the expression." promotes a common confusion among newbies between node sets and context node lists. I would say, rather "The expression is thus evaluated several times; each time with a different list of nodes used in the context of the expression." Also, there should be a clarification of the potential infinite recursion trap: dyn:closure(., 'parent::node()|child::node()') I assume implementations must not evaluate the expression against a node more than once, otherwise the above would recurse infinitely in most situations. Or at least we should warn the user of this potential problem. -- Uche Ogbuji Principal Consultant uche.ogbuji@fourthought.com +1 303 583 9900 x 101 Fourthought, Inc. http://Fourthought.com 4735 East Walnut St, Boulder, CO 80301-2537, USA XML strategy, XML tools (http://4Suite.org), knowledge management From Peter.Broschwitz at gmx.net Tue Nov 27 11:24:33 2001 From: Peter.Broschwitz at gmx.net (Peter Broschwitz) Date: Sat Aug 26 17:54:15 2006 Subject: [exslt] replace template rule Message-ID: <1006885483.18832.143.camel@localhost.localdomain> Hi, may you give me an example for how to use the template rule of the string-replace module? I didn't manage to get it to work. What I want to do is to replace all strings like >>ae<<, >>oe<< and so on with their character entities for german umlaute. Or in other words, german umlaute have to be converted from their ascii representation into character entities. Futhermore am i looking for a solution that works processor independent. At least it should work with xalan an msxml3. Maybe you can give some hint what I'm doing wrong here - or still tell me that it is not possible what I want to do. I tried the following with Xalan Java 2 (version .2.1.0): --------------------------------------------------------------------- ä ö ü Ä Ö Ü ß --------------------------------------------------------------------- Xalan then complains about "Can not convert #RTREEFRAG to a NodeList!". So I tried the xalan nodeset-extension, the processor works fine but the result is not as expected: --------------------------------------------------------------------- Hä ö ü Ä Ö Ü ... and so on ... --------------------------------------------------------------------- But even if this would be a solution, I wouldn't know how to do this with des msxml3-processor. Thank you in advance Peter From jeni at jenitennison.com Tue Nov 27 11:03:53 2001 From: jeni at jenitennison.com (Jeni Tennison) Date: Sat Aug 26 17:54:15 2006 Subject: [exslt] Dynamic module In-Reply-To: <200111271738.fARHcYc18639@localhost.localdomain> References: <200111271738.fARHcYc18639@localhost.localdomain> Message-ID: <10171495918.20011127180353@jenitennison.com> Hi Uche, > "The string value of each exsl:number element is the same as the > result of converting the number resulting from evaluating the > expression to a string as with the number function, with the > exception that Infinity results in an exsl:number holding the > highest number the implementation can store, and -Infinity results > in an exsl:number holding the lowest number the implementation can > store. " > > I really think we should return the strings "Infinity" and > "-Infinity" in this case. Besides the matter of compatibility and > readibility, Inf and the highest number that can be stored are not > really the same things, and behave differently in certain > situations. OK. The reason that I specified it like that was that I was worried that not doing so would lead to the annoying thing where: number(dyn:map(., '1 div 0')) => NaN because dyn:map(., '1 div 0') results in: Infinity and when you convert the string value of exsl:number ('Infinity') into a number you'd get NaN. I'm happy to make that the case and put a note in about it. > "the context position is the position of the node within the node > set passed as the first argument to the dyn:closure function, > arranged in document order" > > Is this the case even with nodes that are generated by the closure > that do not happen to be in the original set? No, that's a copy and paste error. Good catch. > Also, in the language above, I think that your saying > > "The expression is thus evaluated several times, each with a > different node set acting as the context of the expression." > > promotes a common confusion among newbies between node sets and > context node lists. I would say, rather > > "The expression is thus evaluated several times; each time with a > different list of nodes used in the context of the expression." But there's no such thing as 'lists of nodes' [roll on XPath 2.0] :) I don't particularly care, though, so I'll make the change. > Also, there should be a clarification of the potential infinite > recursion trap: > > dyn:closure(., 'parent::node()|child::node()') > > I assume implementations must not evaluate the expression against a > node more than once, otherwise the above would recurse infinitely in > most situations. > > Or at least we should warn the user of this potential problem. The latter is what the description of saxon:closure() does. I think the former is more helpful; I'll add it. Thanks for the comments, Jeni --- Jeni Tennison http://www.jenitennison.com/ From uche.ogbuji at fourthought.com Tue Nov 27 12:06:01 2001 From: uche.ogbuji at fourthought.com (Uche Ogbuji) Date: Sat Aug 26 17:54:15 2006 Subject: [exslt] Dynamic module In-Reply-To: Message from Jeni Tennison of "Tue, 27 Nov 2001 18:03:53 GMT." <10171495918.20011127180353@jenitennison.com> Message-ID: <200111271906.fARJ61P19214@localhost.localdomain> > > Also, in the language above, I think that your saying > > > > "The expression is thus evaluated several times, each with a > > different node set acting as the context of the expression." > > > > promotes a common confusion among newbies between node sets and > > context node lists. I would say, rather > > > > "The expression is thus evaluated several times; each time with a > > different list of nodes used in the context of the expression." > > But there's no such thing as 'lists of nodes' [roll on XPath 2.0] :) Not explicitly, but I find this the only coherent way to way to think of (and in some cases implement) the following from the spec: The context consists of: * a node (the context node) * a pair of non-zero positive integers (the context position and the context size) [snip] However, since I'm the one complaining about confusing people, I'll instead suggest "The expression is thus evaluated several times; each time with a different context node, position and size for the expression. The first time the expression is evaluated, the expression is evaluated once for each node in the node set originally passed to the dyn:closure function, with the context position and size determined with respect to this node set. In other words, the resulting node set from each node is calculated by evaluating the XPath..." etc. Well, I guess I can't necessarily claim this is less confusing, but it is probably more accurate. -- Uche Ogbuji Principal Consultant uche.ogbuji@fourthought.com +1 303 583 9900 x 101 Fourthought, Inc. http://Fourthought.com 4735 East Walnut St, Boulder, CO 80301-2537, USA XML strategy, XML tools (http://4Suite.org), knowledge management From jeni at jenitennison.com Tue Nov 27 12:12:51 2001 From: jeni at jenitennison.com (Jeni Tennison) Date: Sat Aug 26 17:54:15 2006 Subject: [exslt] replace template rule In-Reply-To: <1006885483.18832.143.camel@localhost.localdomain> References: <1006885483.18832.143.camel@localhost.localdomain> Message-ID: <53175634619.20011127191251@jenitennison.com> Hi Peter, > may you give me an example for how to use the template rule of the > string-replace module? I didn't manage to get it to work. First, you seem to be using str:_replace (which is a helper template) rather than str:replace (which is the main template). You'd probably be better off using str:replace because that doesn't force you to use a particular syntax to represent the replacements that you want to make. However... > Futhermore am i looking for a solution that works processor > independent. At least it should work with xalan an msxml3. The str:replace template is reliant on the exsl:node-set() extension function to convert a result tree fragment to a node set (which is what you're getting an error about in your attempt to use the str:_replace template). Neither Xalan nor MSXML3 support the exsl:node-set() function - instead they have their own versions (xalan:nodeSet() and msxsl:node-set()). To get it to work with Xalan and MSXML, you should amend the str:replace template so that it looks as given at the end of this email. This contains three separate clauses for when you're using Xalan, MSXML or a processor that supports exsl:node-set() (i.e. Saxon, 4XSLT, jd.xslt or libxml). To call the str:replace template, you have to pass it three parameters - the string that you want to replace, a node set of nodes holding the search strings and a node set of nodes holding the replace strings or nodes. Usually I'd put these in a different file, for example replacements.xml: --- ä ö ü Ä Ö Ü ß --- You can get the content of the replacements.xml document using the document() function. So an example call to the str:replace template would look like: If you prefer to call the str:_replace helper directly, you can do so and that will avoid the requirement for support for exsl:node-set(). You need to pass in a node set of the replacement elements as the value of the $replacements variable, as follows: Cheers, Jeni --- ERROR: template implementation of str:replace relies on exsl:node-set(), xalan:nodeSet() or msxsl:node-set(). --- Jeni Tennison http://www.jenitennison.com/ From jeni at jenitennison.com Tue Nov 27 12:37:38 2001 From: jeni at jenitennison.com (Jeni Tennison) Date: Sat Aug 26 17:54:15 2006 Subject: [exslt] Dynamic module In-Reply-To: <200111271906.fARJ61P19214@localhost.localdomain> References: <200111271906.fARJ61P19214@localhost.localdomain> Message-ID: <38177120796.20011127193738@jenitennison.com> Hi Uche, > However, since I'm the one complaining about confusing people, I'll > instead suggest > > "The expression is thus evaluated several times; each time with a > different context node, position and size for the expression. The > first time the expression is evaluated, the expression is evaluated > once for each node in the node set originally passed to the > dyn:closure function, with the context position and size determined > with respect to this node set. In other words, the resulting node > set from each node is calculated by evaluating the XPath..." > > etc. > > Well, I guess I can't necessarily claim this is less confusing, but > it is probably more accurate. :) Looks good to me. Jeni --- Jeni Tennison http://www.jenitennison.com/ From anvv_sharma at yahoo.com Wed Nov 28 05:04:07 2001 From: anvv_sharma at yahoo.com (=?iso-8859-1?q?anvv=20sharma?=) Date: Sat Aug 26 17:54:15 2006 Subject: [exslt] help...urgent Message-ID: <20011128120407.55196.qmail@web12705.mail.yahoo.com> hello, all the exslt eg., given are not working in my system as iam using msxml3 parse.. is any other parser should be used.. what are required... to run properly.. From cutlass at secure0.com Wed Nov 28 06:15:28 2001 From: cutlass at secure0.com (cutlass) Date: Sat Aug 26 17:54:15 2006 Subject: Fw: [exslt] help...urgent Message-ID: <011601c1780e$bfd0c510$9e01a8c0@ROSEBUD> Hello anvv, EXSLT is not supported by msxml but there are XSLT implementations of certain functions within EXSLT for example the str:align function http://www.exslt.org/str/functions/align/index.html has 4 implementations EXSLT,XSLT,JAVASCRIPT,MSXSL wherever a function has either a MSXSL or XSLT you can use it within IE. another tip, i would import or include the specific template that you require instead of a whole module or entire exslt library. good luck, jim fuller > > ----- Original Message ----- > From: "anvv sharma" > To: > Sent: Wednesday, November 28, 2001 12:04 PM > Subject: [exslt] help...urgent > > > > hello, > > > > all the exslt eg., given are not working in my > > system as iam using msxml3 parse.. > > is any other parser should be used.. > > what are required... to run properly.. > > > > > > _______________________________________________ > > exslt mailing list > > list@exslt.org > > http://www.exslt.org/list > From reply at seekercenter.net Fri Nov 30 08:03:56 2001 From: reply at seekercenter.net (Vanessa Lintner) Date: Sat Aug 26 17:54:15 2006 Subject: [exslt] I have visited WWW.EXSLT.ORG and noticed that ... Message-ID: An HTML attachment was scrubbed... URL: http://lists.fourthought.com/pipermail/exslt/attachments/20011130/aad7874b/attachment.htm