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

Subject: Re: [xsl] Variable construction: Afterthought...
From: Aaron Johnson <Aaron2.Johnson@xxxxxxxxx>
Date: Wed, 21 Sep 2005 15:52:22 +0100
There is an existing document which I cannot change. In the document there
is a line of code...

.....If you have any queries, please contact your <a target="_blank"
 href="{$helpUrl}">Faculty Office</a> without delay....

...which outputs a line of text with a url in it.

I understand that the {$helpUrl} is a variable.

The document that contains this variable, another .xsl,  can be changed and
is as follows:

<xsl:param name="helpFac"/>
  <xsl:variable name="helpUrl">
    <xsl:choose>
      <xsl:when test="$helpFac !=
''">http://info.uwe.ac.uk/myuwe/targettedHelp/default.asp?helpArea=<xsl:valu
e-of select="$helpFac"/></xsl:when>
      
<xsl:otherwise>http://info.uwe.ac.uk/myuwe/targettedHelp/default.asp</xsl:ot
herwise>
    </xsl:choose>
  </xsl:variable>

I want to get rid of the "helpFac" parameter as well as the choose statement
and replace the whole thing with a single url.

...so I thought that

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

...would suffice. I can't test it because I don't have any xml to run
against it....sounds stupid I know but I'm still fairly new to xsl...I'm
trying to think logically.

Aaron

..................................................................

Aaron Johnson
GUI / XSLT development
Academic Technologies Group [ATG]
University of the West of England
0117 3281051 [ext: 81051]
atg.uwe.ac.uk/aaron

SECURITY POLICY:

Please note that ATG will only accept
e-mail attachments in the following
formats: 

.asp,.bin,.doc,.gif,.html,.jpg,.mdb,.png,
.psd,.shtml,.sdf,.sit,.xls,.xml,.xsd,.xsl,.zip,

..................................................................

This communication is intended solely
for the use of the individual(s) to whom
it is addressed. Any opinions presented
are those of the author and do not
necessarily represent the University of
the West of England, Bristol.
..................................................................


> From: Aaron Johnson <Aaron2.Johnson@xxxxxxxxx>
> Reply-To: "xsl-list@xxxxxxxxxxxxxxxxxxxxxx" <xsl-list@xxxxxxxxxxxxxxxxxxxxxx>
> Date: Wed, 21 Sep 2005 15:00:00 +0100
> To: "xsl-list@xxxxxxxxxxxxxxxxxxxxxx" <xsl-list@xxxxxxxxxxxxxxxxxxxxxx>
> Subject: [xsl] Variable construction: Afterthought...
> 
> 
> Hello again...
> 
> Would it be better to do it this way:
> 
> <xsl:variable name="helpUrl"
> select="http://info.uwe.ac.uk/myuwe/myMarks.asp"/>
> 
> .....If you have any queries, please contact your <a target="_blank"
> href="{$helpUrl}">Faculty Office</a> without delay....
> 
> Thanks for your help!!
> 
> Aaron
> 
> ..................................................................
> 
> Aaron Johnson
> GUI / XSLT development
> Academic Technologies Group [ATG]
> University of the West of England
> 0117 3281051 [ext: 81051]
> atg.uwe.ac.uk/aaron
> 
> SECURITY POLICY:
> 
> Please note that ATG will only accept
> e-mail attachments in the following
> formats: 
> 
> .asp,.bin,.doc,.gif,.html,.jpg,.mdb,.png,
> .psd,.shtml,.sdf,.sit,.xls,.xml,.xsd,.xsl,.zip,
> 
> ..................................................................
> 
> This communication is intended solely
> for the use of the individual(s) to whom
> it is addressed. Any opinions presented
> are those of the author and do not
> necessarily represent the University of
> the West of England, Bristol.
> ..................................................................
> 
> 
> 
> This email has been independently scanned for viruses and any virus software
> has been removed using McAfee anti-virus software
> 
> 
> 
> This incoming email to UWE has been independently scanned for viruses and any
> virus detected has been removed using McAfee anti-virus software



This email has been independently scanned for viruses and any virus software has been removed using McAfee anti-virus software

Current Thread