[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: Variable construction: Afterthought...

Subject: Re: Variable construction: Afterthought...
From: David Carlisle <davidc@xxxxxxxxx>
Date: Wed, 21 Sep 2005 16:15:55 +0100
construction.af
> There is an existing document which I cannot change. In the document there
> is a line of code...

If it is an input document it's not code it's just text, as Michael
said, Yopu could leave it as ="{$helpUrl}" but it may as well be any
other string, it is not an XSLT variable reference if it is not in an
XSL file.


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

Not unless the file is an xslt file (I'm stil not sure from your
description whether it is or not)

> ..so I thought that
> 
> <xsl:variable name="helpUrl"
> select="http://info.uwe.ac.uk/myuwe/myMarks.asp"/>
> 
> ...would suffice.

that selects an element named myMarks.asp that is a child of an element
myuwe which is a child of an element info.uwe.ac.uk which is a
descendent of an element http: so it's a legal XPath butnot what you
intended, you need to put ' ' around a string.

then if your file containing href="{$helpUrl}"> is an xsl file that
you've imported it will expand teh variable reference automatically.

if it is an input file then you will need a template that  matches

match="a[@href='{$helpUrl}']" that generates whatever you need to
generate.

David

________________________________________________________________________
This e-mail has been scanned for all viruses by Star. The
service is powered by MessageLabs. For more information on a proactive
anti-virus service working around the clock, around the globe, visit:
http://www.star.net.uk
________________________________________________________________________

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.