[Date Index][Thread Index]
[Date Prev][Date Next][Thread Prev][Thread Next]

Attributes / variables delimiters


What could I use to delimit tag attributes when the content of those
attributes is rather complicated and already contain spaces, double
quotes, equal signs, language slices...? 

So far I am using double quotes (<MYTAG attr1="stuff" attr2="other
stuff">), but I think it would make things easier if I could switch to
some character not used elsewhere. I have a page using a tag with rather
complicated attributes and nested stuff which does not compile,
certainly because some attributes don't go through set-var correctly.

I tried using <attributes-quote %attributes> to keep the double quotes
around, but that does not work within set-var:

  <define-tag not-quoted>
  $attributes: %attributes
  <set-var %attributes>
  $foo1: <get-var foo1>
  $bar1: <get-var bar1>
  <define-tag quoted>
  $attributes-quote: <attributes-quote %attributes>
  <set-var <attributes-quote %attributes>>
  $foo2: <get-var foo2>
  $bar2: <get-var bar2>

$attributes: foo1=foo bar1=bar
$foo1: foo
$bar1: bar
$attributes-quote: foo2="foo" bar2="bar"
$foo2: "foo" bar2="bar"

The foo2 and bar2 variables don't get defined correctly.


Ghislaine Labouret, Network security consultant
Hervé Schauer Consultants (HSC) - http://www.hsc.fr/
Phone (+33)-141-409-700 - Fax (+33)-141-409-709
Website META Language (WML)                www.engelschall.com/sw/wml/
Official Support Mailing List                   sw-wml@engelschall.com
Automated List Manager                       majordomo@engelschall.com