Skip to content

Instantly share code, notes, and snippets.

@atebitftw
Created November 23, 2012 22:24
Show Gist options
  • Save atebitftw/4137566 to your computer and use it in GitHub Desktop.
Save atebitftw/4137566 to your computer and use it in GitHub Desktop.
Using namespaces in deferred template scenarios.
<!-- here is what an CollectionPresenter might look like before namespaces -->
<stack>
<textblock text='Here is that list of fruit you ordered.' />
<collectionpresenter collection='{data fruit}'>
<itemstemplate>
<textblock text='{data}' fontsize='20' foreground='Green' />
</itemstemplate>
</collectionpresenter>
</stack>
<!-- Now with namespaces, it will look like this -->
<template xmlns='http://buckshotui.org/platforms/html'>
<stack>
<textblock text='Here is that list of fruit you ordered.' />
<collectionpresenter collection='{data fruit}'>
<itemstemplate>
<template xmlns='http://buckshotui.org/platforms/html'>
<textblock text='{data}' fontsize='20' foreground='Green' />
</template>
</itemstemplate>
</collectionpresenter>
</stack>
</template>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment