You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@velocity.apache.org by "Nathan Bubna (JIRA)" <de...@velocity.apache.org> on 2008/08/21 02:10:44 UTC

[jira] Commented: (VELOCITY-391) Provide better syntax for converting XML entities

    [ https://issues.apache.org/jira/browse/VELOCITY-391?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12624203#action_12624203 ] 

Nathan Bubna commented on VELOCITY-391:
---------------------------------------

Personally, i don't think it's Velocity's concern to ever do this for general text.  That's a whole different can o' worms.  I think this should be resolved as fixed and be done.

> Provide better syntax for converting XML entities
> -------------------------------------------------
>
>                 Key: VELOCITY-391
>                 URL: https://issues.apache.org/jira/browse/VELOCITY-391
>             Project: Velocity
>          Issue Type: Improvement
>          Components: Engine
>    Affects Versions: 1.4
>         Environment: Operating System: All
> Platform: Other
>            Reporter: bob.tarling
>            Priority: Minor
>
> I'm using velocity to persist my applications data in XML format. The problem is
> with converting special XML characters to entities.
> I have read the developers guide here
> http://jakarta.apache.org/velocity/developer-guide.html#Velocity%20and%20XML
> I'm wondering if the developers would consider some addition to the velocity
> syntax to help with this instead. I can't help think that generation of XML must
> be a common requirement for velocity users and a shortcut syntax would help keep
> templates looking neater.
> How about the likes of the following to display a field with automatic
> conversion of XML characters to entities.
> <p>The clients name is $&clientName</p>
> So the client name John O'Connor becomes
> <p>The clients name is John O&apos;Connor</p>
> There are alternatives, such as having a specific file type.
> e.g. .xvm as opposed to .vm
> A secondary advantage to this is that syntax highlighters could be devised to
> recognise and highlight both the XML and the template code.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@velocity.apache.org
For additional commands, e-mail: dev-help@velocity.apache.org