Re: Perl-XML Digest, Vol 22, Issue 7
by David Craig other posts by this author
Nov 19 2005 2:30PM messages near this date
view in the new Beta List Site
Re: LibXML, LibXSLT free(): invalid pointer error
|
Repeated RSS elements
& XSLT regarding:
> How do you expect the processor to guess the value of x ?
> Maybe because he's passing in the value?
I got an answer earlier (not sure if it hit the list)... I basically, I
was passing 'foo' instead of "'foo'", and the stylesheet thought foo was
search expression.
I'm not in fact expecting the processor to be psychic :)
perl-xml-request@[...].com wrote:
> Send Perl-XML mailing list submissions to
> perl-xml@[...].com
>
> To subscribe or unsubscribe via the World Wide Web, visit
> http://listserv.ActiveState.com/mailman/listinfo/perl-xml
> or, via email, send a message with subject or body 'help' to
> perl-xml-request@[...].com
>
> You can reach the person managing the list at
> perl-xml-owner@[...].com
>
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of Perl-XML digest..."
>
>
> Today's Topics:
>
> 1. XSLT question (passing parameters) (David Craig)
> 2. Re: XSLT question (passing parameters) (Stephane Roux (HAbeTT))
> 3. Re: XSLT question (passing parameters) (A. Pagaltzis)
>
>
> ----------------------------------------------------------------------
>
> Message: 1
> Date: Sat, 19 Nov 2005 04:27:36 -0800
> From: David Craig <david@[...].net>
> Subject: XSLT question (passing parameters)
> To: perl-xml@[...].com
> Message-ID: <437F1A38.4060009@[...].net>
> Content-Type: text/plain; charset=ISO-8859-1; format=flowed
>
> Hello all,
>
> I'm having a problem with passing in external parameters... I've tried
> several transformation engines (komodo built in, XML::LibXSLT) to no
> avail, so I think I'm making a mistake in the code. A really simple
> example is this:
>
> <?xml version="1.0" encoding="UTF-8"?>
> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
> version="1.0">
> <xsl:param name="x"/>
>
> <xsl:template match="/">
> <xsl:text>|</xsl:text><xsl:value-of select="$x"
> /><xsl:text>|</xsl:text>
> </xsl:template>
> </xsl:stylesheet>
>
> I would expect to get "|valueofx|" but instead I get "||"
>
> Am I being stupid?
>
> Thanks for your help!
>
> --David Craig
>
>
>
> ------------------------------
>
> Message: 2
> Date: Sat, 19 Nov 2005 14:48:42 +0100
> From: Stephane Roux (HAbeTT) <habett@[...].org>
> Subject: Re: XSLT question (passing parameters)
> To: perl-xml@[...].com
> Message-ID: <cd1447cc4d.habett@[...].org>
> Keywords: nihilism, random, chaos
> Content-Type: text/plain; charset=us-ascii
>
> In <437F1A38.4060009@[...].net>, David Craig wrote:
>
>
>
> ><?xml version="1.0" encoding="UTF-8"?>
> ><xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
> >version="1.0">
> ><xsl:param name="x"/>
> >
> ><xsl:template match="/">
> > <xsl:text>|</xsl:text><xsl:value-of select="$x"
> >/><xsl:text>|</xsl:text>
> > </xsl:template>
> ></xsl:stylesheet>
> >
> >I would expect to get "|valueofx|" but instead I get "||"
> >
> >
>
> How do you expect the processor to guess the value of x ?
>
> Try adding a select to your <xsl:param>
>
>
>
>
_______________________________________________
Perl-XML mailing list
Perl-XML@[...].com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
Thread:
David Craig
Juan Julian Merelo Guervos
David Holden
|