[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] RE: NEED good information on alternative for dyn:eval
Unfortunately I haven't worked in Classic ASP/MSXML for so long that I don't know of any workarounds myself (there is and EXSLT extension for .NET if you have the luxury to utilize ASP.NET?). But I'm confident that there is somebody on this list that does have a solution for Classic ASP and MSXML4 or at very least will be able to tell you that at present time there isn't such a solution. Anybody? In the mean time I will keep this in the back of my head as I go about my development today and if I can think of a possible solution I will let you know. I apologize that I can't be more help right now but hopefully somebody else has the answer that will be helpful. Best regards, <M:D/> > -----Original Message----- > From: Steve Brown [mailto:stevebrown@xxxxxxxxx] > Sent: Thursday, May 27, 2004 1:43 PM > To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx > Subject: Re: NEED good information on alternative for dyn:evaluate() > for MSXML > > The variety of possibilities is numberous. > I said 20-30 different fields and include the possiblities of > contains, not contains, =, != and maybe > and <. > But it will always be in the form (select="//person[contains(FName,'a') > and > LName='Brown' ... additional conditions...]") > I would like to be able to just evaluate the string as XPath like the > way EXLST extents just about everything except MSXML. > Do you know if any work arounds for this? > Thanks, > ~Steve > > On Thu, 27 May 2004 11:35:16 -0600, M. David Peterson > <m.david@xxxxxxxxxx> wrote: > > > > Ah, yes, a much different situation for sure :) > > > > Let me ask you this... Is there going to be a large variety of > > possibilities as far as the actual XPath is concerned or will it pretty > > much be a select number of XPath statements with different values to > > match to FName and LName? > > > > > > > -----Original Message----- > > > From: Steve Brown [mailto:stevebrown@xxxxxxxxx] > > > Sent: Thursday, May 27, 2004 11:05 AM > > > To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx > > > Subject: Re: NEED good information on alternative for > > dyn:evaluate() > > > for MSXML > > > > > > M:D, > > > I understand your confusion, because your point is valid. > > > But, the catch is this I am going to be passing a new a probably > > > different pre-generated XPath expession to the param each time the > > > stylesheet is called. > > > So, instead of hard coding the param into the select it needs to > > variable. > > > Hope that helps. > > > Thanks, > > > ~Steve > > > > > > On Thu, 27 May 2004 10:53:42 -0600, M. David Peterson > > > <m.david@xxxxxxxxxx> wrote: > > > > > > > > Hey Steve, > > > > > > > > Im confused... What part of $filter, or better > > > > "//person[contains(FName,'a') and LName='Brown']" yet from a string > > to > > > > XPath? It is already XPath. > > > > > > > > When I run this code as such... > > > > > > > > <?xml version="1.0"?> > > > > <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" > > > > version="1.0"> > > > > > > > > <xsl:param name="filter" select="//person[contains(FName,'a') and > > > > LName='Brown']"/> > > > > > > > > <xsl:template match="/"> > > > > <xsl:apply-templates select="$filter"/> > > > > </xsl:template> > > > > <xsl:template match="person"> > > > > <xsl:value-of select="LName"/>, <xsl:value-of select="FName"/> > > > > </xsl:template> > > > > </xsl:stylesheet> > > > > > > > > I get the expected output of: > > > > > > > > Brown, Allan > > > > > > > > Can you clarify a bit further? > > > > > > > > Thanks! > > > > > > > > <M:D/> > > > > > > > > > > > > > > > > > -----Original Message----- > > > > > From: Steve Brown [mailto:stevebrown@xxxxxxxxx] > > > > > Sent: Thursday, May 27, 2004 10:43 AM > > > > > To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx > > > > > Subject: Re: NEED good information on alternative for > > > > dyn:evaluate() > > > > > for MSXML > > > > > > > > > > M:D, > > > > > Thanks for the link. > > > > > There is plenty to learn from it, but the string I am looking to > > > > > evaluate is a bit more complex... > > > > > Here are some code snippets for reference. > > > > > > > > > > XSL: > > > > > <xsl:param name="filter" select="//person[contains(FName,'a') and > > > > > LName='Brown']"/> > > > > > > > > > > <xsl:template match="/"> > > > > > <xsl:apply-templates select="$filter"/> (this is what does > > not > > > > > work, > > > > > some parsers offer a evaluate function to convert a string to > > XPath > > > > > but not MSXML) > > > > > </xsl:template> > > > > > > > > > > XML: > > > > > <person> > > > > > <FName>Allan</FName> > > > > > <LName>Brown</LName> > > > > > .... > > > > > </person> > > > > > > > > > > Thanks again, > > > > > ~Steve > > > > > > > > > > > > > > > On Thu, 27 May 2004 10:17:20 -0600, M. David Peterson > > > > > <m.david@xxxxxxxxxx> wrote: > > > > > > > > > > > > Hey Steve, > > > > > > > > > > > > Without a code sample I can't tell you if this particular > > solution > > > > will > > > > > > give you what you want. But my Yahoo! style directory post from > > a > > > > few > > > > > > weeks ago may contain the solution to your problem. > > > > > > > > > > > > Heres the link to that posting... > > > > > > > > > > > > > > http://www.biglist.com/lists/xsl-list/archives/200405/msg00288.html > > > > > > > > > > > > To save you from having to mull through the code and > > documentation > > > > the > > > > > > code takes this string parameter... > > > > > > > > > > > > <xsl:param name="dirPath" select="'Main/Computers/WWW'"/> > > > > > > > > > > > > Breaks it down into its individual parts and then compares each > > part > > > > to > > > > > > the source XML, outputting the children of the final node as a > > > > Yahoo! > > > > > > style directory... > > > > > > > > > > > > Let me know if this doesn't get you to where you need to go and > > I > > > > will > > > > > > try and help you further... > > > > > > > > > > > > Best regards, > > > > > > > > > > > > <M:D/> > > > > > > > > > > > > > > > > > > > > > > > > > -----Original Message----- > > > > > > > From: Steve Brown [mailto:stevebrown@xxxxxxxxx] > > > > > > > Sent: Thursday, May 27, 2004 9:16 AM > > > > > > > To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx > > > > > > > Subject: NEED good information on alternative for > > > > dyn:evaluate() > > > > > > for > > > > > > > MSXML > > > > > > > > > > > > > > I'm sure this question is probably an FAQ, but I've been > > digging > > > > > > > around the web for a couple of days trying to find a work > > around > > > > for > > > > > > > converting a string to XPath for MSXML4 and haven't been able > > to > > > > find > > > > > > > the right place. > > > > > > > The way I understand it is you have to write an extension, but > > I'm > > > > not > > > > > > > clear on how to do that. Plus, I have a feeling that someone > > else > > > > has > > > > > > > invented that wheel. > > > > > > > I'm not apposed to switching XSL parsers, but I if I do it > > needs > > > > work > > > > > > with > > > > > > > ASP. > > > > > > > Thanks, > > > > > > > ~Steve
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|