Bugs item #1154339, was opened at 2005-03-01 10:19
Message generated for change (Comment added) made by johnwebbcole
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=402868&aid=1154339&group_id=31650

Category: Core
Group: None
Status: Closed
Resolution: Invalid
Priority: 5
Submitted By: John Cole (johnwebbcole)
Assigned to: Gert Driesen (drieseng)
Summary: less than sign not allowed in ${} 

Initial Comment:
The < sign fails with the following error when inside
${} braces:

Error loading buildfile.
    '<', hexadecimal value 0x3C, is an invalid
attribute character. Line 12, position 17.


This would not be that odd, except that the greater
than sign (>) does work.

Here is an example build script:

<project name="foo" default="bar">
        <target name="bar">
                <if test="${2 &gt; 1} ">        <!-- works -->
                        <echo message="ok" />
                </if>
                <if test="${1 &lt; 2} ">        <!-- works -->
                        <echo message="ok" />
                </if>
                <if test="${2 > 1} ">   <!-- works -->
                        <echo message="ok" />
                </if>
                <if test="${1 < 2} ">   <!-- fails -->
                        <echo message="ok" />
                </if>
        </target>
</project>

Shouldn't both < and > work or not work similarly?


----------------------------------------------------------------------

>Comment By: John Cole (johnwebbcole)
Date: 2005-03-02 09:11

Message:
Logged In: YES 
user_id=892481

Ok, I went to the xml spec and found my misconception.  I
was under the impression that both < and > were not allowed
in xml attributes (with specific exceptions).

Only the < sign is not allowed and MUST be escaped as &lt;
while the > sign MAY be escaped with &gt; unless it appears
in "]]>" when it is not ending a CDATA block.

I was wondering how NAnt was allowing the > sign in the
first place :-)

----------------------------------------------------------------------

Comment By: Gert Driesen (drieseng)
Date: 2005-03-02 07:43

Message:
Logged In: YES 
user_id=707851

The XML error says it all:  the less than character is not 
allowed in attributes.

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=402868&aid=1154339&group_id=31650


-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
_______________________________________________
nant-developers mailing list
nant-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nant-developers

Reply via email to