[ http://issues.apache.org/jira/browse/VELOCITY-391?page=all ]
Nathan Bubna updated VELOCITY-391: ---------------------------------- Bugzilla Id: (was: 35658) Component: Source (was: Tools) Fix Version: 1.5 Description: 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'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. was: 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'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. Environment: Operating System: All Platform: Other was: Operating System: All Platform: Other Assign To: (was: Velocity Developers Mailing List) Will has added support for escaping markup in references to the core. > Provide better syntax for converting XML entities > ------------------------------------------------- > > Key: VELOCITY-391 > URL: http://issues.apache.org/jira/browse/VELOCITY-391 > Project: Velocity > Type: Improvement > Components: Source > Versions: 1.4 > Environment: Operating System: All > Platform: Other > Reporter: bob.tarling > Priority: Minor > Fix For: 1.5 > > 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'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. - If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]