Junior Member
Join Date: Jul 2006
Posts: 1
|
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. |
#1 |
Senior Member
Lone Wolf Staff
Join Date: May 2005
Posts: 8,232
|
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 "&". 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? & 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:
|
|
#2 |
|
|