Lone Wolf Development Forums  

Go Back   Lone Wolf Development Forums > Card Vault Forums > Card Vault

Notices

Reply
 
Thread Tools Display Modes
paul.timm
Junior Member
 
Join Date: Jul 2006
Posts: 1

Old July 9th, 2006, 11:40 AM
I'm an art guy so please pardon me if this is a really obvious thing.

I'm working on stats and need to run a text to find all Character cards with a Cost Type of E and average the number in the associate cost group.

<stat id="charavge" name="Avg E cost Char" scope="deck1" visibility="always">
<test> type.Char? & CostType.E </test>
<calc> avg:cost.? </calc>
</stat>

I keep running into an "unrecognized special token" error based on the &, but I can't see any other way to do it.
paul.timm is offline   #1 Reply With Quote
rob
Senior Member
Lone Wolf Staff
 
Join Date: May 2005
Posts: 8,265

Old July 12th, 2006, 05:45 PM
This is an XML syntax issue. The '&' character is reserved as a special character within XML, so you can't use it directly. There are two ways to solve this. The first approach is to use the "escape code" for the '&', which is the string "&amp;". The second is to put the entire contents of the "<test>" element within a "CDATA" block.

With the first approach, the element would become:
<test> type.Char? &amp; CostType.E </test>

With the second approach, the element would become:
<test><![CDATA[ type.Char? & CostType.E ]]></test>

Both of these approaches are identified in the "Fundamentals" chapter of the Authoring Kit documentation if you want further details. You'll find an indepth discussion of these approaches in any reference on XML itself.

Hope this helps,
Rob


At 12:40 PM 7/9/2006, you wrote:

Quote:
I'm an art guy so please pardon me if this is a really obvious thing.

I'm working on stats and need to run a text to find all Character cards with a cost type of E and average that cost.

<stat id="charavge" name="Avg E cost Char" scope="deck1" visibility="always">
<test> type.Char? & CostType.E </test>
<calc> avg:cost.? </calc>
</stat>

I keep running into errors based on the &, but I can't see any other way to do it.
rob is offline   #2 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 12:07 AM.


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