NOTE: This wiki is provided by the OASIS standards consortium as a collaborative tool for members of the OASIS CAM Technical Committee, who are permited to post to these pages. As this is an official workspace of the TC, the OASIS IPR Policy and other OASIS rules apply to its use. To learn more about the work of the TC, send a comment, or join this effort, visit the OASIS CAM TC homepage.

Wiki pages are transient documents, so intermediate edits may not be saved. TC members should move all permanent work and stable artifacts to the TC's document repository, where the archival work product of the TC also can be viewed by the public.

OASIS Content Assembly Mechanism (CAM) TC Wiki

This site is a resource site for users and developers of CAM templates and CAM processors.

A tool for creating sharable templates of XML content exchanges and validations


The OASIS CAM template approach is based on a WYSIWYG approach to XML content handling and validation that allows businesses to create common interchange models for their discreet exchanges in XML. CAM templates support context based rules, codelists and crossfield validations that cannot be implemented in XSD schema alone.

Business implementers require a way to quickly define and share the patterns and models that they need to use in their own exchanges. While an XSD schema may define all possible permutations for all possible XML instances, XSD schema fails to share the dependencies and content models which are critical to successful interchange definition for consistent interoperability.

CAM templates differ in basic concept from other schema languages in that they are not based on complex grammars but instead on simple matching of XML structure patterns in the parsed document. This declarative approach makes it quick to build any interchange model, without requiring knowledge of the complexities of today's extended XML and schema syntax nuances.

The CAM approach also integrates seamlessly with codelists providing a powerful value lookup function. OASIS Genericode codelists, or any ISO, ANSI or EDI code table can be quickly integrated into CAM template validations.

CAM provides extended reporting options that allow HTML style documentation to be produced of the exchange definition including all the content handling rules in a format that business analysts can readily absorb and verify.

CAM templates can be edited with any simple text editor or XML editor and are designed to be directly readable by XML practitioners. If you know XPath and basic XML, you can use the extended features in CAM templates immediately.

CAM has a reference open source implementation available - jCAM - implemented in Java using widely supported XML open source libraries and tools such as Xerces parser, Saxon xslt, Jaxen XPath and Maven linker.

The jCAM tool provides an Eclipse based desktop editor that allows users familiar with XML to quickly create templates and rules to match their exchange model. Then the jCAM runtime engine can be integrated into solution environments via a selection of interface options including Java API, DOM pointer, command line or web service integrations.

The OASIS CAM approach can also be used in conjunction with grammar-based structure-validation languages such as DTDs, XML Schemas, RELAX-NG, TREX, as needed, but does not require these.

Error reporting in CAM templates includes both full errors and first error modes with user-centric error descriptions. Validation can be combined with transformation, with both on-succeed and on-exception transformations. This greatly diminishes the need for double or triple exchange transaction handling as CAM can perform the complete process in one pass.

Also as an OASIS standard the CAM templates work with a variety of other standards from OASIS and sample CAM templates are available for a variety of those.

As an open public standard OASIS CAM templates can be freely created and shared without restriction to facilitate the creating of consistent XML exchanges.

Top 5 reasons for using CAM over a traditional approach

Assuming that a traditional approach here is simply W3C schema XSD validation checking combined with backend application logic written in Java, VB, or similar compiled code, or XSD with xslt script logic, then comparing and contrasting these.

  1. CAM templates provide next generation Service Oriented Architecture (SOA) feature support. Implementing exchanges using CAM patterns positions adoptors to move beyond the limitations of traditional tools. Particularly CAM has specific features that support business processing technologies such as BPEL, BPSS (ebBP) processors and BPMN modelling tools. Then partner contracts, roles and context definitions can be explicitly supported in the CAM template syntax. Generating XML test cases and exchange verification profiles are also supported. Completing the SOA picture CAM has extension mechanisms that can be used to support semantic registry referencing (such as ebXML-regrep) and metadata definitions (such as CCTS and OWL) external to the templates that are key to next generation SOA exchanges.
  2. Validation in XSD alone cannot cope with contextual handling of rules and structure components, so by default implementers make everything in XSD optional! The result is very poor interoperability across implementations because it is not clear when to do what, how and why. CAM templates fix this by allowing explicit use patterns to be quickly tailored to exact exchange requirements and then shared freely. There is now a "CAM kit" of XSLT tools that let you automatically ingest existing XSD schema directly into a CAM template.
  3. Documenting and verifying your rule sets. In traditional XSD and compiled code systems it is very challenging for the business analysts and test teams to see and know if the exchange content rules are correctly being applied. Rules definitions are scattered between a brittle combination of Word documents, spreadsheets, XSD schema, and source code objects. Keeping track of changes and test cases is labor intensive. Publishing them to external partners doubly so. With CAM templates you have a single XML declarative representation that automatically produces clear documentation in readable HTML table formats for the business analysts while simultaneously being the exact XML rule set that is applied to the actual exchanges by the programmers as well.
  4. Codelist lookups and versioning. Managing codelists across a community is a core need for XML exchanges. CAM provides rich and powerful tools for selecting, including and sharing codelists. Critically the equivalent enumerated list values in XSD schema are static and cannot be made context aware with rules. This often causes interoperability problems and exchange validation failures. In CAM you can easily apply selected codelists, subsets and versions to accommodate localization needs. The CAM codelist approach is fully compatible with standard code list sets such as OASIS Genericode and then ISO and EDI lists.
  5. Save time, effort and money by simplifying your deployment environment. Instead of having to deploy complex interdependent sets of XSD and compiled program components adding new features, transactions or upgrades is consolidated into simple agile and cohesive XML template files that can be shared and published externally as well as used internally. Test teams can immediately identify changes and create test cases by comparing the CAM templates and documentation. Making interim releases is fast, verifiable and easy, just deploy the updated CAM templates. Comparatively supplementing XSD schema with coding in xslt requires specialized knowledge and skills and again requires implementers to juggle between what rules are implemented where and how to document them. CAM templates by contrast are in simple XML format that uses clear declarative assertions in standard syntax that is self-documenting. Create automated test suites to run validatations and even share validation web services with your partners to reduce their work in interoperating with your solutions.

Advanced Uses

While creating simple CAM templates is designed to be very straightforward from any sample XML exchange instance, CAM templates also permit extensions.

Work is proceeding on developing metadata semantic and ontology linking through the use of REST interfacing to a semantic registry. These features are envisioned for the next version specification of OASIS CAM. This feature will allow automated integration to a domain vocabulary and its definitions. More on this work is available from the ebXML Registry TC site.

CAM templates existing extension mechanisms today can also be used to easily extend CAM to include additional rule engine parsers such as JRules.

CAM also supports an includes mechanism so that CAM templates can import pre-defined structure and rule components that are common across a set of exchange models. Examples include name, address, product detail and other commonly repeated data constructs.

In the jCAM implementation you can combine XSLT with CAM to transform results. The jCAM output format includes special markup to make XSLT integration straightforward for xslt practitioners.

This feature is used by the jCAM interactive documentation (iDoc) feature. This uses a xslt transform to build a wiki interactive documentation package from any CAM template - instantly from inside the Eclipse desktop editor tool. Such iDocs can form the basis for collaborative documentation across a community of interest (CoI) when deployed to a wiki site that has HTML parsing enabled (also tiddly wiki compatible).


Site Contents

News, Blogs




Web Sites

CAM templates provide a rendering that is much more concise and easier to interpret than Schematron. You can see for yourself by reviewing this side-by-side comparison.



iDocs - interactive documentation

Libraries - example


Specifications Last modified: 2008-02-19 21:29:39

FrontPage (last edited 2010-05-13 15:15:02 by Gnosis1)