Altova Mailing List Archives>Archive Index >microsoft.public.xsl Archive Home >Recent entries >Thread Prev - Re: Passing Parameter from >Thread Next - Re: Passing Parameter from From: EdwardH@-----------.---------.--- To: NULL Date: 10/5/2006 2:05:00 AM
Forgive my ignorance but what makes a parameter global?
"Oleg Tkachenko [MVP]" wrote:
> EdwardH wrote:
> > Am trying to pass parameter to xslt via xml control from <a href:
> >
> > Private Sub Page_Load(ByVal sender As System.Object, ByVal e As
> > System.EventArgs) Handles MyBase.Load
> > theatre = Request.QueryString("theatre")
> > Xml1.TransformSource = Server.MapPath("SingleWE.xslt")
> > Dim doc As System.Xml.XmlDocument = New System.Xml.XmlDocument
> > Dim xsla As XsltArgumentList = New XsltArgumentList
> > Dim trans As System.Xml.Xsl.XslTransform = New
> > System.Xml.Xsl.XslTransform
> > doc.Load(Server.MapPath("WestEnd.xml"))
> > xsla.AddParam(theatre, "", "")
> > trans.Load(Server.MapPath("SingleWE.xslt"))
> > Xml1.Document = doc
> > Xml1.TransformArgumentList = xsla
> > Xml1.Transform = trans
> >
> > using in xslt:
> > <xsl:param name="theatre"/>
> > <xsl:apply-templates select="Data/Item[Theatre = $theatre]"/>
> > <xsl:value-of select="$theatre"/>
> >
> > does not find string. What have I done wrong?
>
> You can only pass a value to a global parameter. Make your xsl:param to
> be a children of xsl:stylesheet.
>
> --
> Oleg Tkachenko [XML MVP, MCPD]
> http://blog.tkachenko.com | http://www.XmlLab.Net | http://www.XLinq.Net
>
| ||||||
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | Mobile | Full Site | |||
|
