You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Stephen Duncan <st...@gmail.com> on 2005/10/12 22:02:13 UTC

Re: Does maven work with characters like <> and &?

I don't think any of this is Maven specific; seems like general XML problems.

For what you want the correct format is most likely:

<j:set var="test" value="&lt;&gt;"/>

-Stephen


On 10/12/05, jan_bar <he...@yahoo.com> wrote:
> Some samples:
>
> <!-- error, value cannot contain '<' -->
> <j:set var="test" value="<>"/>
>
> however:
>
> <j:set var="test"><![CDATA[<>]]></j:set>
> <!-- outputs funny "test: &lt;&gt;>" -->
> <ant:echo>test: ${test}</ant:echo>
>
> <j:set var="test" value=">"/>
> <!-- outputs "test: >" -->
> <ant:echo>test: ${test}</ant:echo>
>
> When I set the variable in plugin.properties:
> test=<>
> <!-- outputs: "<>" -->
> <ant:echo>test: ${test}</ant:echo>
>
> However when I feed the test variable that was read from plugin.properties
> and not modified to Ant filter, it works as exptected:
> <!-- @mytoken@ will be replaced with "<>"
> <ant:filter token="mytoken" value="${test}" />
>
> The behaviour is inconsistent and I see no reason why <, > and & is
> converted to character entity.
>
> Jan
>
>
> > Can you be a bit more specific? What are you trying to do? Where do you
> > have variables with entities and which part of Maven converts them?
> >
> > -Lukas
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>


--
Stephen Duncan Jr
www.stephenduncanjr.com

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: Does maven work with characters like <> and &?

Posted by jan_bar <he...@yahoo.com>.
Thanks Stephen, but it doesn't help, I want to see the characters, not their
entity character counterparts.

Jan

"Stephen Duncan" <st...@gmail.com> wrote in message
news:b20ce4ed0510121302q220d99d9vc48f2e72dc6086fc@mail.gmail.com...
I don't think any of this is Maven specific; seems like general XML
problems.

For what you want the correct format is most likely:

<j:set var="test" value="&lt;&gt;"/>

-Stephen


On 10/12/05, jan_bar <he...@yahoo.com> wrote:
> Some samples:
>
> <!-- error, value cannot contain '<' -->
> <j:set var="test" value="<>"/>
>
> however:
>
> <j:set var="test"><![CDATA[<>]]></j:set>
> <!-- outputs funny "test: &lt;&gt;>" -->
> <ant:echo>test: ${test}</ant:echo>
>
> <j:set var="test" value=">"/>
> <!-- outputs "test: >" -->
> <ant:echo>test: ${test}</ant:echo>
>
> When I set the variable in plugin.properties:
> test=<>
> <!-- outputs: "<>" -->
> <ant:echo>test: ${test}</ant:echo>
>
> However when I feed the test variable that was read from plugin.properties
> and not modified to Ant filter, it works as exptected:
> <!-- @mytoken@ will be replaced with "<>"
> <ant:filter token="mytoken" value="${test}" />
>
> The behaviour is inconsistent and I see no reason why <, > and & is
> converted to character entity.
>
> Jan
>
>
> > Can you be a bit more specific? What are you trying to do? Where do you
> > have variables with entities and which part of Maven converts them?
> >
> > -Lukas
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>


--
Stephen Duncan Jr
www.stephenduncanjr.com




---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org