XML, XSLT and e-commerce



Similar documents
XML: extensible Markup Language. Anabel Fraga

DTD Tutorial. About the tutorial. Tutorial

Semistructured data and XML. Institutt for Informatikk INF Ahmet Soylu

XSLT Mapping in SAP PI 7.1

Standard Recommended Practice extensible Markup Language (XML) for the Interchange of Document Images and Related Metadata

Structured vs. unstructured data. Motivation for self describing data. Enter semistructured data. Databases are highly structured

Data Integration through XML/XSLT. Presenter: Xin Gu

VIRTUAL LABORATORY: MULTI-STYLE CODE EDITOR

Extensible Markup Language (XML): Essentials for Climatologists

Web Services Technologies

XML. Document Type Definitions XML Schema

Agents and Web Services

XML WEB TECHNOLOGIES

Xtreeme Search Engine Studio Help Xtreeme

Introduction to XML Applications

Short notes on webpage programming languages

An XML Based Data Exchange Model for Power System Studies

10CS73:Web Programming

WWW. World Wide Web Aka The Internet. dr. C. P. J. Koymans. Informatics Institute Universiteit van Amsterdam. November 30, 2007

Multimedia Applications. Mono-media Document Example: Hypertext. Multimedia Documents

XML Schema Definition Language (XSDL)

Introduction to Ingeniux Forms Builder. 90 minute Course CMSFB-V6 P

Last Week. XML (extensible Markup Language) HTML Deficiencies. XML Advantages. Syntax of XML DHTML. Applets. Modifying DOM Event bubbling

We automatically generate the HTML for this as seen below. Provide the above components for the teaser.txt file.

XML and Data Management

Course Information Course Number: IWT 1229 Course Name: Web Development and Design Foundation

Exchanger XML Editor - Canonicalization and XML Digital Signatures

RUT developers handbook 9.51 Introduction to XML and DOM, with applications in Matlab v. 2.0

Developers Guide. Designs and Layouts HOW TO IMPLEMENT WEBSITE DESIGNS IN DYNAMICWEB. Version: English

Interactive Data Visualization for the Web Scott Murray

Madison Area Technical College. MATC Web Style Guide

Chapter 3: XML Namespaces

Taleo Enterprise. Career Section Branding Definition. Version 7.5

Managing XML Documents Versions and Upgrades with XSLT

Internationalization Tag Set 1.0 A New Standard for Internationalization and Localization of XML

XML. CIS-3152, Spring 2013 Peter C. Chapin

How To Use Xml In A Web Browser (For A Web User)

XML Processing and Web Services. Chapter 17

Rule-Based Generation of XML DTDs from UML Class Diagrams

IT6503 WEB PROGRAMMING. Unit-I

Quiz! Database Indexes. Index. Quiz! Disc and main memory. Quiz! How costly is this operation (naive solution)?

XML- New meta language in e-business

LabVIEW Internet Toolkit User Guide

Internet Technologies_1. Doc. Ing. František Huňka, CSc.

II. PREVIOUS RELATED WORK

About XML in InDesign

Structured vs. unstructured data. Semistructured data, XML, DTDs. Motivation for self-describing data

Web Development I & II*

Core Components Data Type Catalogue Version October 2011

Terms and Definitions for CMS Administrators, Architects, and Developers

Lesson Review Answers

CSET 3100 Advanced Website Design (3 semester credit hours) IT Required

JobScheduler Web Services Executing JobScheduler commands

Overview of DatadiagramML

David RR Webber Chair OASIS CAM TC (Content Assembly Mechanism)

Portals and Hosted Files

Design and Development of Website Validator using XHTML 1.0 Strict Standard

JavaScript: Introduction to Scripting Pearson Education, Inc. All rights reserved.

Chapter 1 Programming Languages for Web Applications

T XML in 2 lessons! %! " #$& $ "#& ) ' */,: -.,0+(. ". "'- (. 1

The document may be freely distributed in its entirety, either digitally or in printed format, to all EPiServer Mail users.

WEB DEVELOPMENT IA & IB (893 & 894)

metaengine DataConnect For SharePoint 2007 Configuration Guide

HTML, CSS, XML, and XSL

Chapter 19: XML. Working with XML. About XML

Software documentation systems

The Web Web page Links 16-3

My IC Customizer: Descriptors of Skins and Webapps for third party User Guide

PHP Integration Kit. Version User Guide

Markup Languages and Semistructured Data - SS 02

Using Database Metadata and its Semantics to Generate Automatic and Dynamic Web Entry Forms

Representation of E-documents in AIDA Project

Comparison of SGML and XML

Fast track to HTML & CSS 101 (Web Design)

06 XML-based Technologies

CMServer An Object-Oriented Framework for Website Development and Content Management

Extending the Linked Data API with RDFa

Introduction to Web Services

IBM Operational Decision Manager Version 8 Release 5. Getting Started with Business Rules

ART 379 Web Design. HTML, XHTML & CSS: Introduction, 1-2

Command-Line Tool for View Manager View Manager 4.0

JavaScript By: A. Mousavi & P. Broomhead SERG, School of Engineering Design, Brunel University, UK

Chapter 2: Designing XML DTDs

Transcription:

XML, XSLT and e-commerce F. Dignum Utrecht University

Contents XML as central formatting tool XSLT for conversions Business processes in e-commerce ebxml: XML for business processes

XML

XML order Product data Integrate in XML Supplier data

Compose document in XML XML document Parsing path XML Declaration Prolog Document Type Declaration External subset Internal subset Text + Markup

Prolog Concise XML Syntax Example.xml <?XML version= 1.0 encoding= UTF-8 standalone= no?> <!DOCTYPE example SYSTEM Example.dtd [ <!ENTITY XML extensble Markup Language > <!ENTITY history SYSTEM History.XML > <!ENTITY wheelchair SYSTEM c:/wheelchair.tif > <!ENTITY % figs INCLUDE > Internal subset ]> <example> <par>the &XML; format is a very important move to bringing the benefits of structured markup to the masses.</par> &history; <par>the following figure shows a wheelchair:</par> <fig filename= wheelchair /> <par>the tags <![CDATA[<example>, <par> and <fig../> are used in this document]].</par> </example> With thanks to Neil Bradley: The XML Companion, Addison Wesley Longman, 2nd ed., ISBN 0-201-342855 XML Declaration Document Type Declaration History.xml <par>superficially it looks like HTML because the tags have the same delimiters, < and > </par> <par xml:space= preserve xml:lang= en.gb > --- XML --- SGML HTML </par> Example.dtd External subset c:/wheelchair.tif <!-- The example DTD --> <!NOTATION TIFF SYSTEM Showtiff.exe > <!ENTITY % figs IGNORE > <![%figs[<!entity %ExampleContent par fig >]]> <!ENTITY % ExampleContent par > <!element example (%ExampleContent;)+> <!element par (#PCDATA)> <!element fig EMPTY> <!attlist fig filename ENTITY #REQUIRED>

Syntax: Entities Replacement for DTD: <!ENTITY % nwc note warning caution > for DOC: <!ENTITY XML Extensible Markup Language > Keyword Entity name

Entities Entity references are requests for data to be imbedded at the point of reference In a Document: Internal text entities: simple text replacement External text entities: inclusion of an external document Binary entities: reference to multimedia files Character defining entities: for characters outside the default characterset Built-in entities: for characters used in markup Character entities: the number of a character in the default characterset In a DTD: Parameter entities: simple text replacement

Internal text entities Purpose: simple text replacement; text stored in entity DTD: <!ENTITY gca "Graphics Communications Association" > DOC:... the &gca; sponsor meetings... ==>... the Graphics Communications Association sponsor meetings...

External text entities Purpose: inclusion of an external document; reference stored in entity DTD: <!ENTITY ch1 SYSTEM "http://www.../ch1.xml"> DOC: <book>a book about xml &ch1;... more content... </book>

Binary entities Purpose: reference to multimedia files ( Non-XML data ) Syntax in DTD: <!NOTATION Name PUBLIC Datatype> <!ENTITY Name SYSTEM URL NDATA Datatype> DTD <!NOTATION EPS PUBLIC "+//ISBN 0-7923-1::Graphic Notation//NOTATION Adobe Systems Encapsulated Postscript//EN"> <!ENTITY figure1 SYSTEM "c:\graphics\figure1.pic" NDATA EPS> <!ELEMENT graphics EMPTY> <!ATTLIST graphics filename ENTITY #IMPLIED> <!ELEMENT p (#PCDATA graphics)+ > DOC <p>as is shown in the following diagram: <graphics filename= figure1"/></p> wrong: <p> As is shown in the following diagram: &figure1;</p>

Parameter entities Purpose: simple text replacement in a DTD DTD: <!ENTITY % subelems "(para list table note)" > DTD: <!ELEMENT body (things, %subelems;) > ==> DTD: <!ELEMENT body (things, (para list table note)) > Purpose: to keep text literally DOC: <!ENTITY % subelems "(para list table note)" >

ATTRIBUTE DECLARATION Why: to associate information with an Element: metadata, hypertext, multimedia, layout (!?),... Syntax: DTD: <!ELEMENT el_name (...) > <!ATTLIST el_name att_name1 type1 default1 att_name2 type2 default2 > Element name Attribute name Type of attribute Spelling of attribute name: as an XML name (~ element name) Allowed: more than one <!ATTLIST for an element Default value

Type: TYPES FOR ATTRIBUTE DECLARED VALUES Attribute value is: CDATA ENTIT(Y)(IES) ID IDREF(S) NMTOKEN(S) NOTATION Name group SGML character data ( list of) subdocument(s) entity name(s) Unique identifier for element (list of) (a) reference(s) to a previously ID (list of) name token(s) member of a list ot notations one of a finite set

DTD: ATTRIBUTE DECLARATION, declared values 1/3 attribute name type default value <!ELEMENT memo ( idinfo, body ) > <!ATTLIST memo [any character]+ rev CDATA #REQUIRED [ letter 0..9 -. _ :]+ size NMTOKEN #REQUIRED projects NMTOKENS #REQUIRED NMTOKEN, [" ", NMTOKEN]* DOC: <memo rev="27/1/96-3.2a" size=.17-.19" projects="2-a 3-b" >... </memo>

ATTRIBUTE DECLARATION, declared values 2/3 DTD: <!NOTATION tex PUBLIC "-//local//notation TeX Formula//EN c:\programs\show_tex > <!ENTITY pic1 SYSTEM "c:\proj3\file12" NDATA tex > <!ENTITY pic2 SYSTEM "c:\proj4\file15" NDATA tex > <!ELEMENT fig empty > <!ELEMENT figr empty > <!ELEMENT figrs empty > <!ATTLIST fig <!ATTLIST figr <!ATTLIST figrs id file refid refids ID ENTITY IDREF #REQUIRED #REQUIRED #REQUIRED > IDREFS #REQUIRED > DOC: <fig id="oor" file="pic1" > <fig id="neus" file="pic2 > <figr refid="neus"> <figrs refids="neus oor">

DTD: ATTRIBUTE DECLARATION, declared values 3/3 <!NOTATION eqn SYSTEM "c:\eqn.exe > <!NOTATION tex SYSTEM "c:\tex.exe > <!ELEMENT memo ( idinfo, body ) > <!ELEMENT formula CDATA > <!ATTLIST memo security ( ts sec unc ) #REQUIRED > <!ATTLIST formula data NOTATION #REQUIRED > DOC: <memo security="sec">...</memo> <formula data="eqn"> 3 over 4 </formula>

DEFAULT VALUES FOR ATTRIBUTE DECLARATIONS Reserved Words: FIXED REQUIRED IMPLIED - used for attributes with constant values - demands a user-entered value (always the case when there is no DTD - value supplied by application if not entered explicitly Example default value in DOC: <!ATTLIST memo security ( ts sec unc ) unc >

An order message in XML order

The use of XSLT XML XML XML XSLT XSLT XSLT HTML XSLT XSLT XML XML XSLT XML

XSLT operation Stylesheet XSLT/XSL XML Source XML Source Node Tree (Templates) Source Node Tree Instruction Execution XSLT Engine Result Node Tree XSL Formatting Objects XSL Formatting Objects Result XML XML Non- XML

XSLT Transformation in Server or in Browser Transformation script XSLT Web Host XML Browser XSLT Process Display Source document XML Transformation script XSLT XSLT Process HTML Browser Display

XSL-FO: Multilingual document

XSL-FO : With stylesheet for Japanese reader

XSL-FO : With stylesheet for English reader

XSL-FO features 1/2 an XSL stylesheet defines the presentation of an XML document a style sheet can control the look and feel of a single document or a whole website incorporates XSLT: rule-based translation of XML documents into other type of documents, like HTML incorporates the ECMAScript language (standardized JavaScript) for data manipulation, allowing the translation of XML objects into any desired output

XSL-FO features 2/2 Different and personalized style sheets can be applied to the same XML document for different purposes and different output media, such as display, print, handheld devices, etc. completely internationalized -left-to-right, right-to-left, and top-to-bottom scripts can occur mixed in the same document equipped with professional page layout facilities such as multiple column sets, rotated text areas, float zones, etc. history: subset of DSSSL with alternative syntax, plus key concepts from CSS

XSLT stylesheet XSLT Stylesheet actually: Transformationsheet Is itself an XML document Standard XML heading Standard XSLT heading Rules ( templates ) Geared towards a tree structure

Template rule <xsl:template match= paragraph > <p> <xsl:apply-templates/> </p> </xsl:template> <xsl:template match= / > <html><body> <xsl:apply-templates/> </body></html> </xsl:template>

Xpath Sub language, a.o. used within XSLT Xpath expression: Identification of document parts Boolean conditions Numerical calculations String manipulation

Nodes in an XML tree Root node Element node Text node Attribute node Comment node Processing instruction node Namespace node

Memo as Document Tree / Components Root node Attribute node reference = GvdS/19991108/3 memo status="draft Element node idinfo body to to from date subject para para Peter Baars Connie Gaiser Gert van der Steen November 8 1999 Text node Personal holiday All personnel are entitled to one personal day per calendar year. If you have any question s, please forward them to my office.

Transformation methods 1/2 Recursive treatment of document ( recursive descent ) For each element a template rule Each element produces desired output Each element contains <xsl:apply-templates> call Output data have more or less the same structure and order as the input Also called push processing

Example Push Processing (XML->XML) XML in: <employee> <name>j. Smith</name> <number>123</number> </employee> XML out: <PERSON><NUM>123</NUM> <NM>J. Smith</NM></PERSON> XSLT: <xsl:template match= employee > <PERSON> <NUM><xsl:apply-templates select= number /></NUM> <NM><xsl:apply-templates select= name /></NM> </PERSON> </xsl:template>

XSLT examples Look at the webpage under the link Literature on XSLT etc. It leads to a webpage with some tutorial material and a zip file with a number of examples. You can open the examples using XMLSpy (opening the *.spp projects is sufficient): Booklist.(spp, xml, xsl) This example illustrates the genration of an HTML table from an XML-list. Brief.(spp, xml, xsl) This example illustrates the presentation of an XML document in HTML.

ebxml scenario

ebxml: An example scenario 1. Company A decides to trade electronically. 2. Company A then implements an ebxml compliant application. 3. Company A submits, to an ebxml registry, their business profile information which describes their new ebxml related functionality 4. ebxml compliant Company B discovers company A, who is also ebxml compliant, and also identifies the business scenarios supported by company A 5. Company B then sends a request to company A requesting that they engage in a business scenario using ebxml and submits a proposed business arrangement. Upon negotiation of this proposal, a collaboration agreement is made between company A and B which forms part of the trading partner agreement 6. Company A and B are now ready to engage in ebusiness using an ebxml conformant messaging

ebxml business model

Business and Info in XML

Business transactions

Transactions in XML/DTD <!ELEMENT EbXmlProcessSpecification ((package include documentation)*)> <!ATTLIST EbXmlProcessSpecification name CDATA #REQUIRED uuid CDATA #IMPLIED version CDATA #IMPLIED >... <!ELEMENT business-transaction (documentation?, request, response*)> <!ATTLIST business-transaction name CDATA #REQUIRED isnonrepudiationreceiptrequired (true false) #IMPLIED isintelligiblecheckrequired (true false) #IMPLIED isauthorizationrequired(true false) #IMPLIED issecuretransportrequired (true false) #IMPLIED isreliabletransportrequired (true false) #IMPLIED isnonrepudiationrequired (true false) #IMPLIED isnonrepudiationreceiptrequired (true false) #IMPLIED timetoacknowledge CDATA #IMPLIED