|
[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
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
|

Cart








