RE: [xsl] NEED good information on alternative for dyn:evaluate() for MSXML

Subject: RE: [xsl] NEED good information on alternative for dyn:evaluate() for MSXML
From: "M. David Peterson" <m.david@xxxxxxxxxx>
Date: Thu, 27 May 2004 11:35:16 -0600
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: [xsl] 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: [xsl] 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: [xsl] 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

Current Thread