> From: Diana Shannon [mailto:[EMAIL PROTECTED]] > > Q. > What are the similarities and differences of xinclude and cinclude? > > A. > > Similarities > - Both provides mechanisms to include content from other documents > - Both support cocoon:/ protocol (i.e. they both use Cocoon's resolver). > > xinclude transformer > - implements the W3C XInclude spec. > - allows you to include text or xml content (via parse="text|xml" ) > - allows you to use xpointer syntax(via '#' or xpointer() syntax) within > href attribute > - does *not* support Cocoon's caching mechanism
There are two implementations of cinclude: - CIncludeTransformer (used in samples) - CachingCIncludeTransformer (not used!) xinclude has only one implementation. Hence, better statement would be: Cinclude does have cacheable implementation (see CachingCIncludeTransformer), while xinclude has only non-cacheable. > cinclude transformer > - helps you serve documents with inclusions and tags in xinclude > namespace. Thus, you can create document > with xinclude *and* cinclude tags, process it through cinclude, and > xinclude tags will remain intact. > - allows you to specify the wrapper element of the included content, > i.e. element="wrapper", - allows you to (optionally) specify namespace and prefix for the wrapper element: ns="wrapper_ns" prefix="wrapper_prefix" - Has cacheable implementation. PS In some future, we should have one IncludeTransformer with support of both cinclude and xinclude, and configurable namespace. Vadim > Please cross check. Did I overlook any important points? > > -- Diana --------------------------------------------------------------------- Please check that your question has not already been answered in the FAQ before posting. <http://xml.apache.org/cocoon/faq/index.html> To unsubscribe, e-mail: <[EMAIL PROTECTED]> For additional commands, e-mail: <[EMAIL PROTECTED]>