Lone Wolf Development Forums  

Go Back   Lone Wolf Development Forums > Hero Lab Forums > Hero Lab Discussion

Notices

Reply
 
Thread Tools Display Modes
AncientOne
Senior Member
 
Join Date: Sep 2011
Location: Alpharetta, GA
Posts: 213

Old July 31st, 2012, 03:49 AM
(Full Disclosure... I'm reporting this problem after examining files sent to me by users of my custom sheet who are using the Mac version of Hero Lab. I will install the Mac version myself later this week, but felt that this was important enough to go ahead and get to you.)

It looks like the XSLT transformation done by the Mac version of Hero Lab has a serious problem for custom sheet developers. I'm going to describe it here -- if it would help, I could also put together a simple "test" stylesheet to demonstrate the problem.

I suspect that this can be fixed by simply changing an option on whatever XSLT engine the Mac version is using.

Problem: Every <xsl:value-of> produces a new-line and indentation spaces
Code:
Assume the player is named Bob.  Then this line:
   "<xsl:value-of select="@playername"/>"

Should get transformed to:
   "Bob"

But instead it gets tranformed to:
   "Bob
   "
As you can see, a new-line has been inserted immediately after output, and then spaces have been added to indent the following line.

Because of the way HTML handles whitespace, this wouldn't be a problem for anything placed inside a simple HTML element. However, it breaks any output that has to be inside a string literal, which includes all HTML attributes as well as JavaScript strings.

My guess is that the XSLT engine you're using has an option to enable/disable output formatting, and this problem may be solved by disabling that formatting.
AncientOne is offline   #1 Reply With Quote
redward
Junior Member
 
Join Date: Feb 2012
Posts: 22

Old August 3rd, 2012, 01:56 PM
Bumping in the hopes of a fix. Would very much like to use the new version of AncientOne's sheet and I'm on Mac only.
redward is offline   #2 Reply With Quote
AncientOne
Senior Member
 
Join Date: Sep 2011
Location: Alpharetta, GA
Posts: 213

Old August 6th, 2012, 03:41 PM
FYI... I've since confirmed this problem myself with the Mac version of Hero Lab.

I thought I might be able to change this behavior by specifying indent="no", like this:

Code:
<xsl:output method="html" indent="no"/>
... but no joy.

Last edited by AncientOne; August 6th, 2012 at 03:59 PM.
AncientOne is offline   #3 Reply With Quote
AncientOne
Senior Member
 
Join Date: Sep 2011
Location: Alpharetta, GA
Posts: 213

Old August 9th, 2012, 03:01 PM
Another FYI...

I've just released a version of my custom sheet that works with the Mac version of Hero Lab, but wanted to be clear that I didn't solve the defect this thread refers to. Instead, I rewrote a critical part of the sheet so that it no longer "exercises" this defect.

In other words, this defect is no longer a problem for me but it could still be a problem for other custom sheet authors in the future.
AncientOne is offline   #4 Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -8. The time now is 02:47 AM.


Powered by vBulletin® - Copyright ©2000 - 2024, vBulletin Solutions, Inc.
wolflair.com copyright ©1998-2016 Lone Wolf Development, Inc. View our Privacy Policy here.