Re: [xsl] Variable construction: Afterthought...

Subject: Re: [xsl] Variable construction: Afterthought...
From: Jon Gorman <jonathan.gorman@xxxxxxxxx>
Date: Wed, 21 Sep 2005 09:24:41 -0500
I don't see why you needed to change the subject for this.  Ah well,
I'm just picky about that I guess.


Of course, I also am not sure where you are even having difficulty.

You mentioned it's in an external document.  Are you having trouble
getting the url from the other document?  See docuemnt().  But despite
that comment your approach looks like  you are just directly putting
the text into the variable.  Not sure why you're having problems with
this.

> Would it be better to do it this way:
>
> <xsl:variable name="helpUrl"
> select="http://info.uwe.ac.uk/myuwe/myMarks.asp"/>

Why ask?  It seems simple enough to just try.  What happens?

It'll fail most likely since you're giving xpath a raw text string
which it will try to proces.
Instead try

<xsl:variable name="helpUrl"
select="'http://info.uwe.ac.uk/myuwe/myMarks.asp'"/>

(there is an extra set of qutoation marks).

or even

<xsl:variable
name="helpUrl">http://info.uwe.ac.uk/myuwe/myMarks.asp</xsl:variable>

Is there something I'm missing?


Jon Gorman

Current Thread