Menu

#3 Allowing XVCL commands to span accross multiple lines

open
Cao Yang
None
5
2004-01-13
2004-01-13
No

<h1>1. Problem description </h1>
--------------------------------
Situations often arise when multi-value variables are
much longer than a normal line, and whenever this is the
case, this causes readability problems when using most
development editors (which don't normally wrap long
lines).

<h1>2. Proposed feature description</h1>
--------------------------------------
The proposed change is to facilitate input of "null data"
(white spaces) and comments winthin the attributes of
XVCL commands. It should be noted that the syntax in
the solution for introducing the feature described here is
not a specific proposal, and may be replaced by some
other syntax (as proposed by the Change Control Board).

The solution is to provide the open and close delimiters
for writing comments as well as "null data" (white
spaces) inside the attributes of XVCL commands and
make those delimiters configurable through the XVCL
processor's config file.

Chosen open delimiter: /*
Chosen close delimiter: */

Definition: Any character including whitespaces
(linefeed, space, tab etc.) written between "/*"
and "*/" inside ANY attributes of ANY XVCL commands
shall be treated as the comments and will not regard as
part of the attribute's value.

Examples: All of the examples below shall be valid

&lt;set-multi var="l_mod_all_mv_xvclModulesPart2"
value=",courseinstance,/* testing the space
and line feed
*/tutorial,/* hey i can
write my comments here.
*/assignment,/*
*/exam,/*
*/lecture"/&gt;
&lt;adapt x-frame= "myx-frame.xvcl /* I am adapting
this x-frame because I want to */"/&gt;
&lt;value-of expr="?@/*this variable for
*/myvariable@/* get the value and concate with
previous*/myvariable2?/&gt;

<h1>3. Justification </h1>
--------------------------
Without this new feature, the example (demonstrates a
current "nasty" workaround solution):

&lt;set-multi var="xvclModulesPart1"
value="module1,module2,module3,module4,module5" /&gt
;
&lt;set-multi var="xvclModulesPart2"
value=",module6,module7,module8,module9,module10" /&
gt;
&lt;set-multi var="xvclModulesPart" value="?
@xvclModulesPart1??@xvclModulesPart2?"/&gt;

&lt;set-multi var="mv_modAssociatedModules"
value="faculty"/&gt;

As seen, the solution above can address the problem
with too-long lines, but the solution is not scalable, and
in addition, the solution created additional problems by
introducing "local variables" that if overwritten can
cause unexpected problems.

Discussion


Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.