Hi Kriangkrai,

> Because with (@ attr1 val1 ...), you can retrive the attributes by
> just using (assoc '@ sxml).
> Is there any advantage of using your syntax @attr1 val1 ...?

advantage is that you don't have to put the attributes in a list
manually, your 'with-xml' function can do that for you;-)

>> Also, if you don't manage to hook your error handler to define the
>> tag functions "on-the-fly", you can always traverse the tree
>> argument of 'with-xml' and replace (or define) the tag symbols with
>> your generic tag function and then eval the whole tree.
> Good idea. Thanks :-)

On the other hand, 'with-xml' will then waste lot's of time traversing
all those trees (unless you get somehow clever, memoize the "replaced"
tree) so I would recommend to use @lib/xhtml.l if you use 'built-in'
html components or @lib/xml.l if your xml tags can be anything.  With
your original approach, there is still danger Henrik emphasized, that
you can "overshadow" existing functions.  The libraries above do not
have this problem.


UNSUBSCRIBE: mailto:picol...@software-lab.de?subject=unsubscribe

Reply via email to