SlideShare a Scribd company logo
An Architecture for an XML-Template
Engine enabling Safe Authoring
Falk Hartmann
Research Associate, SAP AG
Agenda
Motivating Example
Definitions
Goals
Requirements
Proposed Architecture
Solution Elements
Related Work
Conclusion & Open Issues

© SAP AG 2006, An Architecture for an XML-Template Engine… / Falk Hartmann / 2

2/25
3/25

Motivating Example
Author

Template
(JSP)

Servlet Container

JSP Engine

Page
(XHTML)

Browser
User

Data
Data Tier

Safe Authoring:
Ensure, that the instantiated template conforms to
the target language by inspecting the template!
© SAP AG 2006, An Architecture for an XML-Template Engine… / Falk Hartmann / 3
4/25

Definitions

Binding Language
JSP <%= table.date() %>

= Slot Markup Language + Term Language
<%=

© SAP AG 2006, An Architecture for an XML-Template Engine… / Falk Hartmann / 4

%>

table.date()
Goals
Safe Authoring
All errors detectable upfront are indeed detected upfront
Structural errors like incorrectly nested elements, missing attributes

Separation of Concerns
Templates are a mean for separation of concerns
Concerns depend on use case, e.g., between web designer and developer

Adequate Error Handling
Errors are clearly and understandably signaled to the user
Both for errors detectable upfront and at runtime

Broad applicability
Restriction on target language: XML
No restrictions on the instantiation data (esp. its addressing)

© SAP AG 2006, An Architecture for an XML-Template Engine… / Falk Hartmann / 5

5/25
Requirement 1: Preservation

6/25

Goals: Safe Authoring
A template engine and language must preserve all constraints that
are valid in the target language also in the template language.

© SAP AG 2006, An Architecture for an XML-Template Engine… / Falk Hartmann / 6
Requirement 2: Coverage

7/25

Goals: Broad Applicability, Separation of Concerns
The template language should cover the target language by allowing
to produce every target language document from a template, no
matter which parts of the target language document are created
from the instantiation data.

© SAP AG 2006, An Architecture for an XML-Template Engine… / Falk Hartmann / 7
Requirement 3: Inferibility

8/25

Goals: Safe Authoring, Broad Applicability
It must be possible to automatically infer the schema the template
must comply to from the schema defined for the target language.

© SAP AG 2006, An Architecture for an XML-Template Engine… / Falk Hartmann / 8
Requirement 4: Control
Goals: Separation of Concerns
The binding language must support control statements for
conditional and repeated inclusion of template fragments.

© SAP AG 2006, An Architecture for an XML-Template Engine… / Falk Hartmann / 9

9/25
Requirement 5: Type safety

10/25

Goals: Adequate Error Handling
In order to assert, that the instantiated template complies to the
target language schema the types of the instantiation data must be
correct.

© SAP AG 2006, An Architecture for an XML-Template Engine… / Falk Hartmann / 10
Requirement 6: Independence

11/25

Goals: Broad Applicability
The architecture should be independent of the data source and the
way data in it is addressed.

© SAP AG 2006, An Architecture for an XML-Template Engine… / Falk Hartmann / 11
Proposed Architecture

© SAP AG 2006, An Architecture for an XML-Template Engine… / Falk Hartmann / 12

12/25
Solution Element 1: Binding Language Design

13/25

Requirements: Coverage, Control, Independence
General:
 Independence makes reasoning about instantiation data impossible
⇒ No switch statements which allows multiple branches
 Coverage and control imply the necessity for conditional and repeated
content

XML Specific:
 Leverage namespaces as concept for slot markup language
⇒ No extra markup, existing tools can be reused
 XTL = XML Template Language
 Prototypical approach: XTL is embedded into target language
 Elements: xtl:text, xtl:attribute, xtl:if, xtl:for-each
 Decision against xtl:element
© SAP AG 2006, An Architecture for an XML-Template Engine… / Falk Hartmann / 13
…Prototypical vs. Transformational Approach

14/25

Prototypical Approach:
Target language syntax is "top-level" syntax
Binding language syntax is embedded
JSP:

<html>…<%= name %>…</html>

+ target language syntax checkable (with limitations ⇒ improvable)
+ easier to learn

Transformational Approach:
Binding language syntax is "top-level" syntax
Target language fragments are embedded
XSLT:

<xslt:transform>…<html>…</html>…</xslt:transform>

+ binding language syntax checkable
© SAP AG 2006, An Architecture for an XML-Template Engine… / Falk Hartmann / 14
Solution Element 2: Grammar Transformer

15/25

Requirements: Preservation, Inferibility
General:
 Separation of constraints: upfront checkable and instantiation data

XML Specific:
 Target language grammar (input): XML Schema
 Template language grammar (output): not expressible in XML Schema
→ enhancement of XML Schema with OCL constraints (CXSD)
 Schema without constraints should not declare valid templates invalid
 Instantiation data constraints: XML Schema Types
 Enabling xtl:attribute for all elements with attributes
 Enabling xtl:if/xtl:for-each around elements with appr. multiplicity
 Forcing ID to be replaced by xtl:attribute in xtl:for-each

© SAP AG 2006, An Architecture for an XML-Template Engine… / Falk Hartmann / 15
… Enabling xtl:attribute

16/25

<element
Problem: name="external-graphic">
<annotation>
- Attribute might be substituted by xtl:attribute
<appinfo source="…">
- Change of content model and attribute model
<cxsd:inv>
let count : Integer =
Current Approach:
self->select(xtl:attribute[@name='src'])->size()
in
<element name="external-graphic">
if @src->isEmpty()
<complexType> count = 1 else count = 0 endif
then
<attribute name="src" type="string" use="required"/>
<sequence>
</cxsd:inv>
</complexType>
<element
</appinfo> ref="xtl:attribute"/>
</element>
</sequence>
</annotation>
<attribute
<complexType>name="src" type="string" use="optional"/>
</complexType>
<sequence>
</element>
<element ref="xtl:attribute"/>
</sequence>
<attribute name="src" type="string" use="optional"/>
</complexType>
</element>
© SAP AG 2006, An Architecture for an XML-Template Engine… / Falk Hartmann / 16
… Enabling xtl:if/xtl:for-each

17/25

Problem:
- Modeling as attribute vs. as element
- Definition of xtl:if/xtl:for-each with wildcard (lax
processing)
- Problem: asserting local validity

Current Approach:
<element name="label" type="string" minOccurs="0"/>
<element ref="xtl:if">
<annotation>
<appinfo source="http://research.sap.com/cxsd/1.0">
<cxsd:element name="label" type="string"/>
</appinfo>
</annotation>
</element>

© SAP AG 2006, An Architecture for an XML-Template Engine… / Falk Hartmann / 17
… Forcing ID to be replaced

18/25

Problem:
-Attributes and elements with type 'ID' must be instantiation data
inside xtl:for-each
-Treatment of IDREF unsolved (conversion to string?)

Current Approach:
<cxsd:inv>
let count : Integer =
self->select(ancestor::xtl:for-each->size())
in
count > 0 implies count(@id-attribute) = 0
</cxsd:inv>

© SAP AG 2006, An Architecture for an XML-Template Engine… / Falk Hartmann / 18
Solution Element 3: Template Validator
Requirements: Preservation
General:
 Grammar checking tool
 Depending on template language grammar used

XML Specific:
 XML Schema with OCL constraints
 OCL navigation expressions replaced by XPath
 Implementation via XMLBeans and Dresden OCL Toolkit

© SAP AG 2006, An Architecture for an XML-Template Engine… / Falk Hartmann / 19

19/25
Solution Element 4: Template Engine

20/25

Requirements: Control, Independence
General:
 Enable independence using plug-in architecture

XML Specific:
 Efficient (memory, time) implementation not straight-forward
 SAX implementation hard due to necessary look-ahead
 StAX allowed an efficient implementation based on a two-stream
machine
 Linear Memory and Time Complexity

© SAP AG 2006, An Architecture for an XML-Template Engine… / Falk Hartmann / 20
Solution Element 5: Term Evaluator

21/25

Requirements: Independence
General:
 Term evaluation outsourced from template engine

XML Specific:
 Implementation of XPath plug-in makes XTL comparable to XSL-T
 XTL

cannot be translated directly to XSL-T as this would require dynamic
evaluation of XPath (however, with this feature or with a two-stage XSL-T it is
possible)

 Implementation of OCL plug-in planned
 OCL

plug-in would enable efficient generation of XML documents from UML
models (XMI, XML Schema using the corresponding profile)

© SAP AG 2006, An Architecture for an XML-Template Engine… / Falk Hartmann / 21
Solution Element 6: Inst. Data Validator

22/25

Requirements: Type Safety
General:
 Enables exact error messages in case of mismatching instantiation data
types

XML Specific:
 Only simple types
 Straight-forward, check using XMLBeans

© SAP AG 2006, An Architecture for an XML-Template Engine… / Falk Hartmann / 22
Related Work

23/25

• T. J. Parr:
Enforcing strict model-view separation in template engines.
WWW’04
• S. Maneth, A. Berlea, T. Perst, and H. Seidl:
XML type checking with macro tree transducers.
PODS’05
• M. Murata, D. Lee and M. Mani:
Taxonomy of XML Schema Languages using Formal Language
Theory.
Extreme Markup Languages 2001
• V. Wallentine, S. Zhou:
Validating XML Document Content with the Object Constraint
Language.
Documents in Computing and Information Science 2002

© SAP AG 2006, An Architecture for an XML-Template Engine… / Falk Hartmann / 23
Conclusions & Open Issues
Conclusions:
- Safe authoring can be supported with this architecture
- XML Schema wildcards lack expressive power
- XML Schema transformations are hard to implement

Open Issues:
- Search existing XML Schema transformation engines
- Alternative schema languages
- Define white space handling
- Treatment of identity constraints

© SAP AG 2006, An Architecture for an XML-Template Engine… / Falk Hartmann / 24

24/25
25/25

Questions

Thank you very much!

Questions…?

© SAP AG 2006, An Architecture for an XML-Template Engine… / Falk Hartmann / 25

More Related Content

PPT
D3ML Session
PDF
Pooling optimization problem
PPT
Olap introduction
PPT
Reports 6i
PDF
Abap interview questions and answers
PDF
Matlab overview
PPT
Object Relational Mapping In Real World Applications
PDF
RGiampaoli.DynamicIntegrations
D3ML Session
Pooling optimization problem
Olap introduction
Reports 6i
Abap interview questions and answers
Matlab overview
Object Relational Mapping In Real World Applications
RGiampaoli.DynamicIntegrations

What's hot (8)

PPTX
Object-Relational Mapping and Dependency Injection
PDF
Productionizing Spark ML Pipelines with the Portable Format for Analytics wit...
PDF
Using Machine Learning & Artificial Intelligence to Create Impactful Customer...
PPTX
Predictive Analytics 3.1 – Adding a Dataset & Visualization
PPT
Programming in UML: An Introduction to fUML 1.3 and Alf 1.1
PDF
Revolutionise your Machine Learning Workflow using Scikit-Learn Pipelines
PDF
BSSML16 L10. Summary Day 2 Sessions
PDF
Matlab (Presentation on MATLAB)
Object-Relational Mapping and Dependency Injection
Productionizing Spark ML Pipelines with the Portable Format for Analytics wit...
Using Machine Learning & Artificial Intelligence to Create Impactful Customer...
Predictive Analytics 3.1 – Adding a Dataset & Visualization
Programming in UML: An Introduction to fUML 1.3 and Alf 1.1
Revolutionise your Machine Learning Workflow using Scikit-Learn Pipelines
BSSML16 L10. Summary Day 2 Sessions
Matlab (Presentation on MATLAB)
Ad

Similar to An Architecture for an XML-Template Engine enabling Safe Authoring (20)

PPT
Mazda Use of Third Generation Xml Tools
PPT
Inroduction to XSLT with PHP4
PPTX
Integrating Performance Modeling in Industrial Automation through AutomationM...
PPT
PMML - Predictive Model Markup Language
PPT
XML, XML Databases and MPEG-7
PDF
Dax Declarative Api For Xml
PPT
Implementing the Genetic Algorithm in XSLT: PoC
DOC
2014 IEEE JAVA DATA MINING PROJECT Xs path navigation on xml schemas made easy
DOC
IEEE 2014 JAVA DATA MINING PROJECTS Xs path navigation on xml schemas made easy
PDF
Choose'10: Ralf Laemmel - Dealing Confortably with the Confusion of Tongues
PDF
XML Introduction
PDF
Apache Big Data Europe 2016
ODP
Developing web apps using Erlang-Web
PPT
Building a Scalable XML-based Dynamic Delivery Architecture: Standards and Be...
PPT
ITU - MDD – Model-to-Model Transformations
DOCX
Mca5010 web technologies
PPTX
Xml Validation Test Suite With Camv
DOCX
Mca5010 web technologies
PPT
XRX Presentation to Minnesota OTUG
Mazda Use of Third Generation Xml Tools
Inroduction to XSLT with PHP4
Integrating Performance Modeling in Industrial Automation through AutomationM...
PMML - Predictive Model Markup Language
XML, XML Databases and MPEG-7
Dax Declarative Api For Xml
Implementing the Genetic Algorithm in XSLT: PoC
2014 IEEE JAVA DATA MINING PROJECT Xs path navigation on xml schemas made easy
IEEE 2014 JAVA DATA MINING PROJECTS Xs path navigation on xml schemas made easy
Choose'10: Ralf Laemmel - Dealing Confortably with the Confusion of Tongues
XML Introduction
Apache Big Data Europe 2016
Developing web apps using Erlang-Web
Building a Scalable XML-based Dynamic Delivery Architecture: Standards and Be...
ITU - MDD – Model-to-Model Transformations
Mca5010 web technologies
Xml Validation Test Suite With Camv
Mca5010 web technologies
XRX Presentation to Minnesota OTUG
Ad

More from Falk Hartmann (8)

PDF
Risikomanagement in der Softwareentwicklung
PDF
An Introduction to AngularJS
PDF
Risiko Management in der Softwareentwicklung
PPT
A Distributed Staged Architecture for Multimodal Applications
PDF
Drahtwanderung: Wir machen den NeXTen Schritt
PPTX
Technologieraum übergreifende Programmierung
PPTX
Sichere templategestützte Verarbeitung von XML-Dokumenten
PPTX
Protocol Engineering: Beschreibung und Entwicklung von Kommunikationsprotokollen
Risikomanagement in der Softwareentwicklung
An Introduction to AngularJS
Risiko Management in der Softwareentwicklung
A Distributed Staged Architecture for Multimodal Applications
Drahtwanderung: Wir machen den NeXTen Schritt
Technologieraum übergreifende Programmierung
Sichere templategestützte Verarbeitung von XML-Dokumenten
Protocol Engineering: Beschreibung und Entwicklung von Kommunikationsprotokollen

Recently uploaded (20)

PDF
Modernizing your data center with Dell and AMD
PPTX
Digital-Transformation-Roadmap-for-Companies.pptx
PDF
Building Integrated photovoltaic BIPV_UPV.pdf
PDF
NewMind AI Weekly Chronicles - August'25 Week I
PDF
Reach Out and Touch Someone: Haptics and Empathic Computing
PDF
Encapsulation theory and applications.pdf
PPTX
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
PDF
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
PPT
Teaching material agriculture food technology
PDF
Chapter 3 Spatial Domain Image Processing.pdf
PDF
Unlocking AI with Model Context Protocol (MCP)
PPTX
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
PDF
Encapsulation_ Review paper, used for researhc scholars
PDF
Approach and Philosophy of On baking technology
PDF
The Rise and Fall of 3GPP – Time for a Sabbatical?
PDF
Agricultural_Statistics_at_a_Glance_2022_0.pdf
PDF
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
PPTX
Understanding_Digital_Forensics_Presentation.pptx
PDF
Diabetes mellitus diagnosis method based random forest with bat algorithm
PDF
KodekX | Application Modernization Development
Modernizing your data center with Dell and AMD
Digital-Transformation-Roadmap-for-Companies.pptx
Building Integrated photovoltaic BIPV_UPV.pdf
NewMind AI Weekly Chronicles - August'25 Week I
Reach Out and Touch Someone: Haptics and Empathic Computing
Encapsulation theory and applications.pdf
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
Teaching material agriculture food technology
Chapter 3 Spatial Domain Image Processing.pdf
Unlocking AI with Model Context Protocol (MCP)
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
Encapsulation_ Review paper, used for researhc scholars
Approach and Philosophy of On baking technology
The Rise and Fall of 3GPP – Time for a Sabbatical?
Agricultural_Statistics_at_a_Glance_2022_0.pdf
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
Understanding_Digital_Forensics_Presentation.pptx
Diabetes mellitus diagnosis method based random forest with bat algorithm
KodekX | Application Modernization Development

An Architecture for an XML-Template Engine enabling Safe Authoring

  • 1. An Architecture for an XML-Template Engine enabling Safe Authoring Falk Hartmann Research Associate, SAP AG
  • 2. Agenda Motivating Example Definitions Goals Requirements Proposed Architecture Solution Elements Related Work Conclusion & Open Issues © SAP AG 2006, An Architecture for an XML-Template Engine… / Falk Hartmann / 2 2/25
  • 3. 3/25 Motivating Example Author Template (JSP) Servlet Container JSP Engine Page (XHTML) Browser User Data Data Tier Safe Authoring: Ensure, that the instantiated template conforms to the target language by inspecting the template! © SAP AG 2006, An Architecture for an XML-Template Engine… / Falk Hartmann / 3
  • 4. 4/25 Definitions Binding Language JSP <%= table.date() %> = Slot Markup Language + Term Language <%= © SAP AG 2006, An Architecture for an XML-Template Engine… / Falk Hartmann / 4 %> table.date()
  • 5. Goals Safe Authoring All errors detectable upfront are indeed detected upfront Structural errors like incorrectly nested elements, missing attributes Separation of Concerns Templates are a mean for separation of concerns Concerns depend on use case, e.g., between web designer and developer Adequate Error Handling Errors are clearly and understandably signaled to the user Both for errors detectable upfront and at runtime Broad applicability Restriction on target language: XML No restrictions on the instantiation data (esp. its addressing) © SAP AG 2006, An Architecture for an XML-Template Engine… / Falk Hartmann / 5 5/25
  • 6. Requirement 1: Preservation 6/25 Goals: Safe Authoring A template engine and language must preserve all constraints that are valid in the target language also in the template language. © SAP AG 2006, An Architecture for an XML-Template Engine… / Falk Hartmann / 6
  • 7. Requirement 2: Coverage 7/25 Goals: Broad Applicability, Separation of Concerns The template language should cover the target language by allowing to produce every target language document from a template, no matter which parts of the target language document are created from the instantiation data. © SAP AG 2006, An Architecture for an XML-Template Engine… / Falk Hartmann / 7
  • 8. Requirement 3: Inferibility 8/25 Goals: Safe Authoring, Broad Applicability It must be possible to automatically infer the schema the template must comply to from the schema defined for the target language. © SAP AG 2006, An Architecture for an XML-Template Engine… / Falk Hartmann / 8
  • 9. Requirement 4: Control Goals: Separation of Concerns The binding language must support control statements for conditional and repeated inclusion of template fragments. © SAP AG 2006, An Architecture for an XML-Template Engine… / Falk Hartmann / 9 9/25
  • 10. Requirement 5: Type safety 10/25 Goals: Adequate Error Handling In order to assert, that the instantiated template complies to the target language schema the types of the instantiation data must be correct. © SAP AG 2006, An Architecture for an XML-Template Engine… / Falk Hartmann / 10
  • 11. Requirement 6: Independence 11/25 Goals: Broad Applicability The architecture should be independent of the data source and the way data in it is addressed. © SAP AG 2006, An Architecture for an XML-Template Engine… / Falk Hartmann / 11
  • 12. Proposed Architecture © SAP AG 2006, An Architecture for an XML-Template Engine… / Falk Hartmann / 12 12/25
  • 13. Solution Element 1: Binding Language Design 13/25 Requirements: Coverage, Control, Independence General:  Independence makes reasoning about instantiation data impossible ⇒ No switch statements which allows multiple branches  Coverage and control imply the necessity for conditional and repeated content XML Specific:  Leverage namespaces as concept for slot markup language ⇒ No extra markup, existing tools can be reused  XTL = XML Template Language  Prototypical approach: XTL is embedded into target language  Elements: xtl:text, xtl:attribute, xtl:if, xtl:for-each  Decision against xtl:element © SAP AG 2006, An Architecture for an XML-Template Engine… / Falk Hartmann / 13
  • 14. …Prototypical vs. Transformational Approach 14/25 Prototypical Approach: Target language syntax is "top-level" syntax Binding language syntax is embedded JSP: <html>…<%= name %>…</html> + target language syntax checkable (with limitations ⇒ improvable) + easier to learn Transformational Approach: Binding language syntax is "top-level" syntax Target language fragments are embedded XSLT: <xslt:transform>…<html>…</html>…</xslt:transform> + binding language syntax checkable © SAP AG 2006, An Architecture for an XML-Template Engine… / Falk Hartmann / 14
  • 15. Solution Element 2: Grammar Transformer 15/25 Requirements: Preservation, Inferibility General:  Separation of constraints: upfront checkable and instantiation data XML Specific:  Target language grammar (input): XML Schema  Template language grammar (output): not expressible in XML Schema → enhancement of XML Schema with OCL constraints (CXSD)  Schema without constraints should not declare valid templates invalid  Instantiation data constraints: XML Schema Types  Enabling xtl:attribute for all elements with attributes  Enabling xtl:if/xtl:for-each around elements with appr. multiplicity  Forcing ID to be replaced by xtl:attribute in xtl:for-each © SAP AG 2006, An Architecture for an XML-Template Engine… / Falk Hartmann / 15
  • 16. … Enabling xtl:attribute 16/25 <element Problem: name="external-graphic"> <annotation> - Attribute might be substituted by xtl:attribute <appinfo source="…"> - Change of content model and attribute model <cxsd:inv> let count : Integer = Current Approach: self->select(xtl:attribute[@name='src'])->size() in <element name="external-graphic"> if @src->isEmpty() <complexType> count = 1 else count = 0 endif then <attribute name="src" type="string" use="required"/> <sequence> </cxsd:inv> </complexType> <element </appinfo> ref="xtl:attribute"/> </element> </sequence> </annotation> <attribute <complexType>name="src" type="string" use="optional"/> </complexType> <sequence> </element> <element ref="xtl:attribute"/> </sequence> <attribute name="src" type="string" use="optional"/> </complexType> </element> © SAP AG 2006, An Architecture for an XML-Template Engine… / Falk Hartmann / 16
  • 17. … Enabling xtl:if/xtl:for-each 17/25 Problem: - Modeling as attribute vs. as element - Definition of xtl:if/xtl:for-each with wildcard (lax processing) - Problem: asserting local validity Current Approach: <element name="label" type="string" minOccurs="0"/> <element ref="xtl:if"> <annotation> <appinfo source="http://research.sap.com/cxsd/1.0"> <cxsd:element name="label" type="string"/> </appinfo> </annotation> </element> © SAP AG 2006, An Architecture for an XML-Template Engine… / Falk Hartmann / 17
  • 18. … Forcing ID to be replaced 18/25 Problem: -Attributes and elements with type 'ID' must be instantiation data inside xtl:for-each -Treatment of IDREF unsolved (conversion to string?) Current Approach: <cxsd:inv> let count : Integer = self->select(ancestor::xtl:for-each->size()) in count > 0 implies count(@id-attribute) = 0 </cxsd:inv> © SAP AG 2006, An Architecture for an XML-Template Engine… / Falk Hartmann / 18
  • 19. Solution Element 3: Template Validator Requirements: Preservation General:  Grammar checking tool  Depending on template language grammar used XML Specific:  XML Schema with OCL constraints  OCL navigation expressions replaced by XPath  Implementation via XMLBeans and Dresden OCL Toolkit © SAP AG 2006, An Architecture for an XML-Template Engine… / Falk Hartmann / 19 19/25
  • 20. Solution Element 4: Template Engine 20/25 Requirements: Control, Independence General:  Enable independence using plug-in architecture XML Specific:  Efficient (memory, time) implementation not straight-forward  SAX implementation hard due to necessary look-ahead  StAX allowed an efficient implementation based on a two-stream machine  Linear Memory and Time Complexity © SAP AG 2006, An Architecture for an XML-Template Engine… / Falk Hartmann / 20
  • 21. Solution Element 5: Term Evaluator 21/25 Requirements: Independence General:  Term evaluation outsourced from template engine XML Specific:  Implementation of XPath plug-in makes XTL comparable to XSL-T  XTL cannot be translated directly to XSL-T as this would require dynamic evaluation of XPath (however, with this feature or with a two-stage XSL-T it is possible)  Implementation of OCL plug-in planned  OCL plug-in would enable efficient generation of XML documents from UML models (XMI, XML Schema using the corresponding profile) © SAP AG 2006, An Architecture for an XML-Template Engine… / Falk Hartmann / 21
  • 22. Solution Element 6: Inst. Data Validator 22/25 Requirements: Type Safety General:  Enables exact error messages in case of mismatching instantiation data types XML Specific:  Only simple types  Straight-forward, check using XMLBeans © SAP AG 2006, An Architecture for an XML-Template Engine… / Falk Hartmann / 22
  • 23. Related Work 23/25 • T. J. Parr: Enforcing strict model-view separation in template engines. WWW’04 • S. Maneth, A. Berlea, T. Perst, and H. Seidl: XML type checking with macro tree transducers. PODS’05 • M. Murata, D. Lee and M. Mani: Taxonomy of XML Schema Languages using Formal Language Theory. Extreme Markup Languages 2001 • V. Wallentine, S. Zhou: Validating XML Document Content with the Object Constraint Language. Documents in Computing and Information Science 2002 © SAP AG 2006, An Architecture for an XML-Template Engine… / Falk Hartmann / 23
  • 24. Conclusions & Open Issues Conclusions: - Safe authoring can be supported with this architecture - XML Schema wildcards lack expressive power - XML Schema transformations are hard to implement Open Issues: - Search existing XML Schema transformation engines - Alternative schema languages - Define white space handling - Treatment of identity constraints © SAP AG 2006, An Architecture for an XML-Template Engine… / Falk Hartmann / 24 24/25
  • 25. 25/25 Questions Thank you very much! Questions…? © SAP AG 2006, An Architecture for an XML-Template Engine… / Falk Hartmann / 25

Editor's Notes

  • #3: Goals: Classification was important to make clear, what are the preconditions for Safe Authoring
  • #4: This is the only slide repeated from my previous colloqium. One more thing to note: XTL = XML Template Language! Safe Authoring! Two main application areas: Generating Code (MDA) or generating markup languages (for Web front ends)
  • #6: Erste Definition: Abgrenzung zu Aspekten unmöglich. Zweite Definition: Was ist ein Literal? Abgrenzung zu XSL-T unmöglich.
  • #7: If an error should be detected upfront, the constraint that prevents it in the target language must be preserved in the template language.
  • #11: Fehler: Shli
  • #15: more classifications: placeholder – opaque, semantically meaningful, undefined deployment (all-in-one, frames…)
  • #16: Prepares slides with the constraints for the three cases
  • #21: Operational semantic of XTL Engine: Picture
  • #22: Make a slide here? Two stage/dynamic Xpath evaluating XSL-T
  • #23: Reidentification of XTL language element by sequence number