Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
PUBLIC CLOUD
PRIVATE CLOUD
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Web CMS (TeamSite)
Components: XSL vs $MODEL
Binettoid
Hit I'm pretty new to TeamSite and I just recently worked out that you can query your DCR using $MODEL tokens in basic HTML to get your "dynamic" components working.
THe documentation cites that HTML is faster than XSL - is this what it is referring to?
Also, is it possible to use this in conjunciton with in-context-edit fields?
I've tried and get only errors.
Any tips appreciated.
Find more posts tagged with
Comments
AlexC
$MODEL is a faster way to extract data from the XML model used to render the component. XSL is quite expensive but offers the ability to iterate over the data and do conditionals, while HTML components are static with values inserted using $MODEL, $CONTEXT, etc.
Page tokens (such as $MODEL, $CONTEXT, etc) are evaluated after the output is generated and right before the content is streamed to the browser.
What errors are you getting and what are you trying to do?
Migrateduser
Hey Alex,
Do you have a sequence diagram or similar that shows the whole lifecycle in context. I think I have a pretty good sense of the order and was going to put something like that together over the next few weeks, but if there is one already done, it sure would make my life easier.
Thanks,
Rob
AlexC
There should be one in the 7.x dev guide.
Roughly:
Site pre-controllers
Page pre-controllers
Components
- build XML model (load DCRs, etc)
- call rules engine (cache result of values call) (if applicable)
- component controller
- prefix calls
- external
- load XSL stylesheet/HTML skin (cache if not cached already)
- Render output using XSL if not HTML
- if NOT AJAX call: Tokenize (call preRender() on page tokens) and cache (if applicable)
- if AJAX call: optionally call AJAX output handler if specified, default is XML output (this allows custom output such as JSON, plain text, HTML, whatever).
Page post-controllers
Site post-controllers
Render page using XSL
Tokenize (call preRender() on page tokens) and cache
Render and stream out the tokenized page and all contained components while expanding page tokens, this is when the render() method is called on page tokens.
That's about a rough flow of how a page is generated.
Binettoid
Thanks Alex, I got mine working after all.
The trick is to have perfectly formed datacapture.cfg for whatever yyou want to ICE. I appreciate your posts tho and the processing info.
Cheers