Using dashes and colons in directive parameter names

Eirik Lygre <[email protected]>
Newsgroups gmane.comp.web.freemarker.user
Message-ID <CAHJmSV_9hi=mzhr4ouk6sUeVwWHAKL1ppU8tnv4eVw7LvMhKZw@mail.gmail.com>
We have a user defined directive which can be called from freemarker as
shown below The directive will use some well-defined parameters (here
"name"), but will output all other directives directly, so that you can do
for example this:

   [@form.input name="task.dateFormat" /]
   [@form.input name="task.dateFormat" class="dateInput important required"
style="display:block" accesskey="D" /]

Now, we have seen the requirement to generate attributes with special
characters, such as with xml namespaces or html 5 custom data attributes.
For example:

   [@form.input name="task.dateFormat" xml:lang="no"
data-format="dd.mm.yyyy" /]

This fails during parse. I tried the obvious, quoting the parameter names,
but that did not work. (Now, using special names would probably not work
for macros, but our directives are implemented in java, and the parameters
are passed as a straight array, with no syntax constraints).

-> Is it possible (today) to use parameter names with special characters?
-> How about tomorrow-ish :-)

-- 
Eirik

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/

_______________________________________________
FreeMarker-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/freemarker-user
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.