473,409 Members | 1,934 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,409 software developers and data experts.

a global variable sure would come in handy

I need to control how I process <fooelements based on how I'm
generating my HTML (separate files vs. a single large file). What can
I use as a switch in my foo stylesheet to control how it's processed?
Note that the output style is determined by which xsl file (which
'include' the foo stylesheet) I process rather than being represented
in the xml data.

As the foo stylesheet uses the 'match' attribute, I don't know how to
make the output style detectable within the stylesheet. If I was
coding in other languages, I'd be tempted to use a global variable.

TIA,
David
Mar 7 '08 #1
1 1471
David Schwartz wrote:
I need to control how I process <fooelements based on how I'm
generating my HTML (separate files vs. a single large file). What can
I use as a switch in my foo stylesheet to control how it's processed?
Note that the output style is determined by which xsl file (which
'include' the foo stylesheet) I process rather than being represented
in the xml data.

As the foo stylesheet uses the 'match' attribute, I don't know how to
make the output style detectable within the stylesheet. If I was
coding in other languages, I'd be tempted to use a global variable.
Well XSLT knows both global variables and global parameters and with
XSLT 2.0 you can even use them in match patterns:
<xsl:stylesheet
xmlns:xsl="http://wwww.w3.org/1999/XSL/Transform"
version="2.0">

<xsl:param name="multiple" select="true()"/>

<xsl:template match="foo[$multiple]">
...
</xsl:template>

--

Martin Honnen
http://JavaScript.FAQTs.com/
Mar 7 '08 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

44
by: Mohanasundaram | last post by:
int i = 10; int main() { int i = 20; return 0; } Hi All, I want to access the global variable i inside the main. Is there
7
by: Method Man | last post by:
Can someone explain the scope/linkage differences between the following 4 global declarations and when one should be used (theoretically) over the rest? sample.h --------- #ifndef SAMPLE_H...
35
by: whisper | last post by:
My question is whether it is better to use a global variable to hold a dynamically malloced multidim array or pass around pointers to it. The details are below (forgive the long winded explanation)...
8
by: Thomas Coleman | last post by:
Ok, I've obviously discovered that Global.aspx has been completely changed in ..NET 2.0. However, I haven't figured out how to declare a constant that's available to any page in my application...
9
by: vivekian | last post by:
Have a couple of global variables of a class type which i have declared and defined in the application. 1. Not sure where should the global variables be placed ? 2. Would i need to forward...
3
by: ojorus | last post by:
Hi! Just two short questions..: 1) In a function I want to get the value of a global variable declared outside the function. Should I use "global $variable" or $GLOBALS? Are there any...
1
weaknessforcats
by: weaknessforcats | last post by:
C++: The Case Against Global Variables Summary This article explores the negative ramifications of using global variables. The use of global variables is such a problem that C++ architects have...
112
by: istillshine | last post by:
When I control if I print messages, I usually use a global variable "int silent". When I set "-silent" flag in my command line parameters, I set silent = 1 in my main.c. I have many functions...
20
by: teddysnips | last post by:
Weird. I have taken over responsibility for a legacy application, Access 2k3, split FE/BE. The client has reported a problem and I'm investigating. I didn't write the application. The...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.