Variables : not case-sensitive

This forum is for all Flare related Tips and Tricks.
Have a tip or trick you use while working in Flare? Share it here.
Post Reply
MC Hammer
Sr. Propeller Head
Posts: 225
Joined: Wed Aug 08, 2007 3:04 am
Location: In a galaxy far, far away

Variables : not case-sensitive

Post by MC Hammer »

Hello everyone
I am having a slight issue with variables :x . For a few variables, I have created "duplicates" to accomodate for when the variable is at the start of a sentence and needs to start with a capital letter, i.e.

Variable name Definition
model catchment (variable used in most cases)
Model Catchment (used when the variable is at the beginning of a sentence)

However, the capitalisation does not seem to work in the output (HTML file). Is this known behaviour and how should I go about this?
Thank you in advance for any help.
Marie-Claire
Flare 2019 r2 - Windows 10 Pro - HTML5 help / "clean" XHTML output
Nita Beck
Senior Propellus Maximus
Posts: 3672
Joined: Thu Feb 02, 2006 9:57 am
Location: Pittsford, NY

Re: Variables : not case-sensitive

Post by Nita Beck »

Variable name Definition
model catchment (variable used in most cases)
Model Catchment (used when the variable is at the beginning of a sentence)
I can't say for sure, but I would guess that the non-case-sensitive limitation is not Flare's limitation.

Why not just use a name for the second variable that is different from the first variable in more than its capitalization, such as "Model Catchment cap"? That would give them the distinctiveness they need to achieve your results.

Hope this helps.

Nita
Nita
Image
RETIRED, but still fond of all the Flare friends I've made. See you around now and then!
KevinDAmery
Propellus Maximus
Posts: 1985
Joined: Tue Jan 23, 2007 8:18 am
Location: Darn, I knew I was around here somewhere...

Re: Variables : not case-sensitive

Post by KevinDAmery »

Flare won't autodetect where the variable is in a sentence. Are you manually putting a different variable in for the capitalized one, or are you using the same variable with two possible outputs? The first method will work (I use it for singular / plural forms) but second unfortunately will not.
Until next time....
Image
Kevin Amery
Certified MAD for Flare
doc_guy
Propellus Maximus
Posts: 1979
Joined: Tue Nov 28, 2006 11:18 am
Location: Crossroads of the West
Contact:

Re: Variables : not case-sensitive

Post by doc_guy »

Yeah, use a different name. Don't just use caps to differentiate the two variables.
Paul Pehrson
My Blog

Image
MC Hammer
Sr. Propeller Head
Posts: 225
Joined: Wed Aug 08, 2007 3:04 am
Location: In a galaxy far, far away

Re: Variables : not case-sensitive

Post by MC Hammer »

Hi all
Thanks for your replies. I have named the variables all differently and to answer Kevin's question, I am putting manually a different variable depending on plural and capitalisation. However, I am still experiencing issues with capitalisation, which is probably what you were trying to tell me was normal behaviour (sorry, am a bit thick today :wink: ), but I would like to know if there would be a workaround as it does not look good.

Lets say I have names my variables A, B, C and D (see below). The screenshot shows that the variable (A) in the topic heading looks exactly the same as the variable (C) used in the first sentence. I would like the variable in the heading to have capital letters.

A Definition: "Master Database" with capital letters, singular
B Definition: "Master Databases" with capital letters, plural
C Definition: "master database" with small letters, singular
D Definition: "master databases" with small letters, plural
Capitalisation.jpg
You do not have the required permissions to view the files attached to this post.
Marie-Claire
Flare 2019 r2 - Windows 10 Pro - HTML5 help / "clean" XHTML output
KevinDAmery
Propellus Maximus
Posts: 1985
Joined: Tue Jan 23, 2007 8:18 am
Location: Darn, I knew I was around here somewhere...

Re: Variables : not case-sensitive

Post by KevinDAmery »

Hm, want to show us the code for that section?

If it really is calling two distinct variables, that could be a bug.
Until next time....
Image
Kevin Amery
Certified MAD for Flare
Andrew
Propellus Maximus
Posts: 1237
Joined: Fri Feb 10, 2006 5:37 am

Re: Variables : not case-sensitive

Post by Andrew »

doc_guy wrote:Yeah, use a different name. Don't just use caps to differentiate the two variables.
You can most certainly use the same letters with different capitalization, if you choose. XML is case-sensitive, and I tested this a few moments ago and it works.

On the other hand....
MC Hammer wrote:Hi all
Thanks for your replies. I have named the variables all differently and to answer Kevin's question, I am putting manually a different variable depending on plural and capitalisation. However, I am still experiencing issues with capitalisation, which is probably what you were trying to tell me was normal behaviour (sorry, am a bit thick today :wink: ), but I would like to know if there would be a workaround as it does not look good.

Lets say I have names my variables A, B, C and D (see below). The screenshot shows that the variable (A) in the topic heading looks exactly the same as the variable (C) used in the first sentence. I would like the variable in the heading to have capital letters.

A Definition: "Master Database" with capital letters, singular
B Definition: "Master Databases" with capital letters, plural
C Definition: "master database" with small letters, singular
D Definition: "master databases" with small letters, plural
Capitalisation.jpg
I cannot duplicate this issue. If I use separate variable names (even if the variable names are different only in case) with variable values that are only different in case, everything works properly in my output. I'd bet that, if you look at the source code, the same underlying variable is being used in both cases. Why that is, I can't say.
Flare v6.1 | Capture 4.0.0
MC Hammer
Sr. Propeller Head
Posts: 225
Joined: Wed Aug 08, 2007 3:04 am
Location: In a galaxy far, far away

Re: Variables : not case-sensitive

Post by MC Hammer »

Kevin, the code shows variable A for the heading and variable C for the first sentence.

ok guys, I think I have solved it. For some reason, the edits I was making in my Variable set (replacing the old variables with new variables that have completely different names) were not being taken into account as I discovered that the old variables were still in the flvar file when I opened it in TextPad (In Flare, the flvar file was definitely NOT showing these old variables) so I think the software got its knickers in a twist. Once I amended the Variable set in Textpad, saved the file, cleaned the output folder and rebuilt the output, it all worked fine.

As Andrew said, I probably should have kept my variables with the same word(s) but different capitalisation but now that my variables work, I think I am going to stick to what I have got. It was just one of those days I am afraid...
Marie-Claire
Flare 2019 r2 - Windows 10 Pro - HTML5 help / "clean" XHTML output
Andrew
Propellus Maximus
Posts: 1237
Joined: Fri Feb 10, 2006 5:37 am

Re: Variables : not case-sensitive

Post by Andrew »

MC Hammer wrote:As Andrew said, I probably should have kept my variables with the same word(s) but different capitalisation but now that my variables work, I think I am going to stick to what I have got. It was just one of those days I am afraid...
Just for the sake of anyone else who might read this, I wasn't suggesting that was the optimal method -- I've never really considered caps for my variables (they are all initial caps because they are all proper nouns of some kind). I merely wanted to point out that Flare did not have a problem differentiating by case (as one would expect from an XML tool).
Flare v6.1 | Capture 4.0.0
MC Hammer
Sr. Propeller Head
Posts: 225
Joined: Wed Aug 08, 2007 3:04 am
Location: In a galaxy far, far away

Re: Variables : not case-sensitive

Post by MC Hammer »

Andrew wrote: Just for the sake of anyone else who might read this, I wasn't suggesting that was the optimal method -- I've never really considered caps for my variables (they are all initial caps because they are all proper nouns of some kind). I merely wanted to point out that Flare did not have a problem differentiating by case (as one would expect from an XML tool).
Yes Andrew, sorry if it was how you understood what I said :shock: . I was just saying that I could probably have kept my original variables. I was very surprised to see that Flare seemed to not be able to differentiate cases.
Marie-Claire
Flare 2019 r2 - Windows 10 Pro - HTML5 help / "clean" XHTML output
LTinker68
Master Propellus Maximus
Posts: 7247
Joined: Thu Feb 16, 2006 9:38 pm

Re: Variables : not case-sensitive

Post by LTinker68 »

Just to point out, too, that you can override the values for your variables from within the target. For instance, I have a variable called "productName" whose value as specified in the variable set is "Administrator's Guide". But I have two outputs. One target is for generating the Administrator's Guide and uses the variable set as it's defined in the project. The other target is for generating a field operator's guide, and in the target, I have overridden the default value of productName and replaced it with "Field Operator's Guide". As I write content, I'll always see productName displayed as "Administrator's Guide" -- it's only when I build the output that I'll see the change in value.

I just wanted to point out that your variable set could look correct and the content in your topics could look correct, but the output could look different if you're overridden the variables in the target. So that's another place to look if you have a similar problem.
Image

Lisa
Eagles may soar, but weasels aren't sucked into jet engines.
Warning! Loose nut behind the keyboard.
Post Reply