Http://cam.swiki.net Parsing Solutions & OASIS Content Assembly Mechanism (CAM) XMLWG 2004, Wash DC,...
-
Upload
kristian-michael-johns -
Category
Documents
-
view
218 -
download
0
Transcript of Http://cam.swiki.net Parsing Solutions & OASIS Content Assembly Mechanism (CAM) XMLWG 2004, Wash DC,...
http://cam.swiki.net
Parsing Solutions &
OASIS Content Assembly Mechanism (CAM)
XMLWG 2004, Wash DC, Jan 21st.
David RR Webber
Chair OASIS CAM TC
http://drrw.net
OASIS – All rights reserved, Copyright ©, 2003
eBusiness XML parsing needs today
• Interoperability
• Opening up business integration rules
• Handling local context drivers
• Validating content
• How does W3C XSD schema help?
• What does OASIS CAM provide?
OASIS – All rights reserved, Copyright ©, 2003
W3C Schema in a nutshell
• XML formatted syntax that describes the structure
layout of a given XML instance
• Is a 90% solution – cannot describe every well formed
XML instance perfectly (e.g. interleaved process and content – xhtml + SMIL)
• Designed for use by programmers
• Has mechanisms for datatyping and content checking
• Has a model for creating objects of content and using
object techniques
OASIS – All rights reserved, Copyright ©, 2003
OASIS CAM in a nutshell
• CAM syntax - tool for business users to express the information exchange semantics and context of their business process steps as XML-based templates.
• library of CAM templates – provides discovery and re-use of common transaction details and sharing of domain context along with consistent referencing to shared nouns and verbs.
• CAM processing engine – component to provide consistent information exchanges at three levels – pre-checking content, runtime content assembly, post-receipt integration.
OASIS – All rights reserved, Copyright ©, 2003
Agenda
• Problem Understanding• What are we trying to solve and for whom?
• What does XSD schema offer?• How does CAM augment schema?
• Using CAM• Approach
• Building templates• Leveraging schema
• Next Steps• Roadmap for 2004
http://cam.swiki.net
What are we trying to solve and for whom?
Understanding the Problem
OASIS – All rights reserved, Copyright ©, 2003
• Define business ideas and needs• Capture steps and workflow
• Then describe the business processing• Top layer – rules and context• Middle layer – industry/application integration• Implementation layer – physical application systems and
content delivery / exchange• Consistent information integration mechanisms for use in
Service Oriented Architecture (SOA)
Building e-Business Orchestration
OASIS – All rights reserved, Copyright ©, 2003
• Reduce complexity of managing large numbers of
transaction formats - document the differences
• Want to speed adoption by formalizing business rules
• Want context-driven transaction generation
• Empowers business users to build interchange details
• Need to define in a neutral format: works with variety of
structures, not just XML
• Augment current standards and industry specifications
• Provide multi-step process support
Business Layers - Objectives
OASIS – All rights reserved, Copyright ©, 2003
Business Challenges for XML
• Totally static transaction formats do not work – need configurable structures
• How to apply business context assertions to a information structure?
• How to derive a consistent way of specifying the interchange parameters to a partner?
• How to enable business domain users to implement the exchanges?
Key: Context is Everywhere
The ability to create re-usable information components is driven by the ability to enable context
OASIS – All rights reserved, Copyright ©, 2003
• XML, by itself, does not solve interoperability
problems yet it is an important tool for doing so.
• XML does not provide instant semantics.
• XML by itself is not the magic bullet.
• What we need are clear policies and vision of how
electronic information enables interoperability
XML by itself is not enough
OASIS – All rights reserved, Copyright ©, 2003
XML Schema?
• Why not just use XML Schema?• OAGI did this for BODs V8.0 – but required
supplementing schema with XSLT and XPath to capture business rules• Had to make all elements optional• No ability to enable business context of
combinations of use – i.e. use patterns { if (condition) required | optional | optional }
• Limited constructs of structure – example no “interleave” of child elements
OASIS – All rights reserved, Copyright ©, 2003
Lessons learned: Which XML Method(s)?
• We need business collaboration on elements syntax:
• Global complexType definition? • Global element definition?• Create industry dictionaries?
• Reuse
• Reference global element in external namespace?• Define local element as substitutionGroup of global
element (bring into local namespace)?• Define local element using external Namespace
complexType (bring into local namespace)?• Derive by extension, local element can have
additional sub-elements added to it?
OASIS – All rights reserved, Copyright ©, 2003
XML Schema - SWOT
Strengths Weaknesses
Widely implemented in major XML parsers
Defines structural layouts for XML content
Graphical editors available
Small footprint works well for embedded applications (web browser)
Basic set of data types work well
Tools can inspect schema and generate rendering for given XML content
Integration with XSLT
Schema instance self-contained
Supports familiar “bottom-up” implementation
Cannot define all possible structural combinations (e.g. scripts - SMIL)
Syntax about syntax (legal Latin v legal English)
Editing tools / parsers not necessarily compatible
Complex syntax, difficult to hand-code
Business context mechanism support
Only works for XML structures
Versioning of elements and attributes
Including structural components
External type library support
Metadata registry referencing
Validation to external code-lists
Compliance level and specification support
Opportunities Threats
Replace column mechanisms in DBMS tables
Support simple validation in data entry systems
Work well with programmer IDE environments
Initial momentum in marketplace stagnates as e-business requirements expose weaknesses
Reduced to role in embedded local point systems
OASIS – All rights reserved, Copyright ©, 2003
Leveraging XSD and CAM
• Can build default
CAM components
from XSD
• Can build XML
examples from XSD
• Can use CAM
functionality to fill in
the gaps in XSD
OASIS – All rights reserved, Copyright ©, 2003
How does CAM augment schema?
• Can have multiple structure instances selected by context• Can include structure from sub-assembly of components• Enhanced element semantics beyond simply datatyping• Full code lists functionality beyond NMTOKEN• Ability to leverage semantics at attribute level consistently
with elements• Ability to version content model components• Link to industry dictionaries• Link to web service components for external checks • Ability to assemble transaction instances• Can handle non-XML formats
OASIS – All rights reserved, Copyright ©, 2003
Technology Positioning
• We can use W3C Schema to show basic typing and structural permutations for XML transaction content models.
• To provide automation of the business logic at-point-of-use requires OASIS CAM to supplement the Schema.
• Use models – • simple one-off structures – XSD schema is adequate• significant information exchange for e-Business –
CAM required• available open source CAM processor
• Need - leverage today’s in-place XML technology; provide enhanced functionality for next generation.
http://cam.swiki.net
Using CAM
Anatomy and Approach
OASIS – All rights reserved, Copyright ©, 2003
Basic Components of CAM
XMLinstance
structure(s)
+Business context rules
+Content Reference rules
+Data Validation rules
+External Mapping rules
can have more than one structure layout
can add inline rules directly into structure
makeOptional()excludeTree()
item type="noun" name="Agency/@AgencyID" UIDReference="ukt000910"
<conditional expression="'//SupplierID' and lookup(value,'SGIRWSDL:supplierID_check')"<MapRule output="type" input="Sales/Company/Year/Qtr/Product@type"/>
Simple Declarative Statements
Combined with
OASIS – All rights reserved, Copyright ©, 2003
Results forgiven context andaction
Context Statements
How Context is applied
CAM Template
+
CAM gets passed context frombusiness use
Generates actual XML
instancedefinition to be used
XML transaction
contentprocess
and compare
1
23
4
5
OASIS – All rights reserved, Copyright ©, 2003
Integrating CAM into eBusiness stack
Business agreement
Drives documentexchanges
OASIS – All rights reserved, Copyright ©, 2003
Business Context Mechanism
• Link between messaging layer, business process layer and assembly layer.<ebContext UIDref='SDIR03400' interchangeID='123456789' BPMref='ABC123456:01‘ CPAref='ABC012345‘ xmlns:as="http://www.oasis-open.org/committees/cam"> <header> <description>An example context instance</description> <version>1.0</version> <language refcode='eng' codelist='ISO639-2' name='English'/> <usage>CAM</usage> <usage>BPM</usage> </header>
<conditions> <condition name="Country" value="USA" as:member="USA,CA,MX"/> <condition name="Catalogue" value="A2003-Q1" as:setLength="8" as:setMask="XNNNN-QN" as:UIDreference="SGIR:030451"/> <condition name="itemType" value="nonperishable" label="Item type:“ as:member="nonperishable,perishable,refridgerated,fragile"/> </conditions></ebContext>
OASIS – All rights reserved, Copyright ©, 2003
CAM template XML structure
• A,B,C,D,E!• Assembly Structure• Business Context Rules• Content Referencing• Data Validations• External Application Mapping
• Many examples available from http://cam.swiki.net
<CAM><Header><ContextStatements>
<AssemblyStructure/> <BusinessUseContext/> <ContentReference/> <DataValidations/> <ExternalMapping/></CAM> Example
OASIS – All rights reserved, Copyright ©, 2003
Technology Foundation
• Simple XML V1.0• XPath• Neutral approach to
structure content• Assertion predicates
excludeAttribute()excludeElement()excludeTree()makeOptional()makeMandatory()makeRepeatable()setRequired()setChoice()setId()setLength()setLimit()setMask()setValue()restrictValues()restrictValuesByUID()useAttribute()useChoice()useElement()useTree()useAttributeByID()useChoiceByID()useElementByID()useTreeByID()lookup()startBlock(), endBlock()
OASIS – All rights reserved, Copyright ©, 2003
StructureChoices
StructureChoices
ContextValues
ContextValues
RequiredContent
Structure
RequiredContent
Structure
ProcessEngine
ProcessEngine Content
ReferencesContent
References
1
Payload / RenderingPayload / Rendering
2
CAM AssemblyStructure
CAM AssemblyStructure
Payload AssemblyPayload
Assembly
3
ApplicationDatabase
ApplicationDatabase
RegistryComponents
RegistryComponents Conceptual
Logical
Physical
Integration with Registry Dictionary
Vocabulary nouns,and
Industry Dictionaries
Vocabulary nouns,and
Industry Dictionaries
Re-usable Business Information
components
Re-usable Business Information
components
OASIS – All rights reserved, Copyright ©, 2003
External Mapping and Merge Feature
<ExternalMapping> <ContentAssociation> <Description>Product List</Description> <InputSource/> <OutputStore type=”SQL” location=”product_table”/> <RulesSet> <MapRule output="Products_List" input="@STARTGRP()"/> <MapRule output="type" input="Sales/Company/Year/Qtr/Product@type"/> <MapRule output="name" input="@trim(Sales/Company/Year/Qtr/Product/Item@name)"/> <MapRule output="manufacturer" input="Sales/Company/Year/Qtr/Product/Item@manufacturer"/> <MapRule output="value" input="Sales/Company/Year/Qtr/Product/Item@value"/> <MapRule output="sold" input="Sales/Company/Year/Qtr/Product/Item@sold"/> <MapRule output="Products_List" input="@ENDGRP()"/> </RulesSet> </ContentAssociation></ExternalMapping>
OASIS – All rights reserved, Copyright ©, 2003
Available Components
• Specifications and examples from the SWIKI• http://cam.swiki.net
• jCAM component• http://jcam.org.uk
• VisualScript editor for CAM templates• http://www.visualscript.com
• OASIS CAM TC• http://www.oasis-open.org
OASIS – All rights reserved, Copyright ©, 2003
Next Steps
• Work in progress: • Completion of Specification• Enhancement of CAM processor• Library of CAM templates by industry• Integration with OASIS Registry assembly
OASIS – All rights reserved, Copyright ©, 2003
Summary: The Holy Grail of e-Business
• Automatic information integration has been the Holy Grail of e-Business systems since before XML was conceived.
• Lesson learned - three needs are paramount: • the ability to design transactions consistently, • the ability to document their usage in a clear way and then
• the ability to drive software that can apply rules and test
information content to ensure correct compliance. • CAM approach provides these three critical abilities:
• documentation of business interchange transactions, • design-time assembly support with verification,
• and runtime checking of information content.
OASIS – All rights reserved, Copyright ©, 2003
Additional Information
• OASIS CAM (assembly) Technical Committee• http://oasis-open.org/committees/cam/
• OASIS ebXML Registry Technical Committee• http://oasis-open.org/committees/regrep/
• ebXML.org• http://www.ebxml.org/• http:ebxmlbook.com
http://cam.swiki.net
OASIS – Content Assembly Mechanism (CAM TC)
January 2004http://cam.swiki.net
Thank YouThank You
www.oasis-open.org
xml.coverpages.org
www.xml.org
www.ebxml.org