Here's a quick sketch of what you're looking for: http://gist.github.com/185988
This example just uses inspect on each element of scope.vals, but JS
array formatting is a straightforward expansion. Nesting elements
works as you'd expect - I figured out how to do it while writing this
mail.
The scope variables should likely be named better, although they do
have the useful property that nested set-scoped shadow previous calls
rather than overriding them.
--Matt Jones
>
> I just checked the DRYML docs again. Also the set-scoped. Didn't
> realize how I could use it for my situation. Any ideas?
>
> Basically it comes down to this:
>
> <container>
> <a/>
> <b x="1/>
> <c>
> </container>
>
> should generate: [a, b:1, c]
>
> <container>
> <a/>
> </container>
>
> should generate: {a}
> ---
>
> I think I have a need for a DRYML internal extension to allow for tags
> within a tag to be joined with a string. Sort of like:
>
> <def tag="tagname" attrs="..." join=",">
>
> OR even
>
> How to behave if no tags inside
> <def tag="tagname" attrs="..." wrap-for="empty">
>
> How to behave if single tag inside
> <def tag="tagname" attrs="..." wrap-for="one">
>
> How to behave if multiple tags inside
> <def tag="tagname" attrs="..." join="," wrap-for="multiple">
>
> Now THAT would be really nice!
>
> -Kris
> >
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Hobo
Users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/hobousers?hl=en
-~----------~----~----~----~------~----~------~--~---