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

RE: Parameter problem

Subject: RE: Parameter problem
From: "Hellstern, Manny" <manny.hellstern@xxxxxxxxxxxxxx>
Date: Wed, 13 Mar 2002 12:16:33 -0600
RE:  Parameter problem
In the application I'm trying to complete, I'm trying to introduce a
"configurable" aspect to the application by giving the client control over
the XML file.  On the other hand, I want to maintain control over the XSL
template.  This being the case, the client will be able to control the
content of the Introduction Message by controlling the content of
<INTROMSG/>.

The "disable-output-escaping" was an attempt at self education.


-----Original Message-----
From: Michael Kay [mailto:michael.h.kay@xxxxxxxxxxxx]
Sent: Wednesday, March 13, 2002 12:07 PM
To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
Subject: RE:  Parameter problem


> I'm having trouble with my XSL style sheet. Here is what I am doing:
>
> I have an XML file with the following:
>
> 	<INTROMSG>
> 		Please click on the <img id="imgAlert"
> src="{$urlNextTabImg}" />  in order to continue.
> 	</INTROMSG>

Putting attribute value templates, or any other kind of XPath expression, in
your source document will do you no good at all: they belong in the
stylesheet.

What I would do would be to put
      <intromsg/>
in the source document, and

<xsl:template match="intromsg">
	<p id="pInstructions">Please click on the
      <img id="imgAlert" src="{$urlNextTabImg}" />
      in order to continue.</p>
</xsl:template>

in the stylesheet.
>
> And then within my style sheet I have:
> 	<p id="pInstructions"><xsl:value-of select="//*/INTROMSG"
> disable-output-escaping="yes" /></p>
>
Using disable-output-escaping="yes" almost invariably means that you haven't
understood what XSLT is for. Unless you're an expert, of course, in which
case you will use it very occasionally when you need to generate
non-standard output formats.

And "//*/INTROMSG" is a pretty strange (and inefficient!) path expression to
use here!

Michael Kay
Software AG
home: Michael.H.Kay@xxxxxxxxxxxx
work: Michael.Kay@xxxxxxxxxxxxxx


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list

 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


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.