Selftest XML Basics TRAINING & CONSULTING. Document: E1006Test.fm 30/04/2010. ABIS Training & Consulting P.O. Box 220 B-3000 Leuven Belgium

Similar documents
XML and Tools. Muhammad Khalid Sohail Khan Mat #: University of Duisburg Essen Germany

Filen ex_e.xml. Her kommer koderne Det der står skrevet med fed er ændret af grp <?xml version="1.0"?>

Introduction to XML. Data Integration. Structure in Data Representation. Yanlei Diao UMass Amherst Nov 15, 2007

XML and Data Management

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

Java and XML parsing. EH2745 Lecture #8 Spring

04 XML Schemas. Software Technology 2. MSc in Communication Sciences Program in Technologies for Human Communication Davide Eynard

Markup Sprachen und semi-strukturierte Daten

COM_2006_023_02.xsd <?xml version="1.0" encoding="utf-8"?> <xs:schema xmlns:xs=" elementformdefault="qualified">

<xs:complextype name="trescdokumentu_typ">

Comparison of Fully Software and Hardware Accelerated XML Processing

+ <xs:element name="productsubtype" type="xs:string" minoccurs="0"/>

WTP-101 Developing Web Applications with Standards. using W3C org standard technologies such as, HTML, CSS, XML, XSD and XSL

XSL - Introduction and guided tour

Languages for Data Integration of Semi- Structured Data II XML Schema, Dom/SAX. Recuperación de Información 2007 Lecture 3.

Schema XSD opisująca typy dokumentów obsługiwane w Systemie invooclip

Modernize your NonStop COBOL Applications with XML Thunder September 29, 2009 Mike Bonham, TIC Software John Russell, Canam Software

Security for industrial automation and control systems: Patch compatibility information

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

Effective Management and Exploration of Scientific Data on the Web. Lena Strömbäck Linköping University

Appendix 1 Technical Requirements

<xs:restriction base="xs:string">

DocuSign Connect Guide

Electronic Bank Account Management - EBAM

XSL Elements. xsl:copy-of

BACHELOR S THESIS. Roman Betík XML Data Visualization

keyon Luna SA Monitor Service Administration Guide 1 P a g e Version Autor Date Comment

IMPLEMENTING AN XML COURSE IN THE COLLEGE OF BUSINESS

[MS-DVRD]: Device Registration Discovery Protocol. Intellectual Property Rights Notice for Open Specifications Documentation

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

XML WEB TECHNOLOGIES

Archivio Sp. z o.o. Schema XSD opisująca typy dokumentów obsługiwane w Systemie Invo24

Gplus Adapter 8.0. for Siebel CRM. Developer s Guide

PHP Oracle Web Development Data Processing, Security, Caching, XML, Web Services and AJAX

Introduction. Web Data Management and Distribution. Serge Abiteboul Ioana Manolescu Philippe Rigaux Marie-Christine Rousset Pierre Senellart

DTD Tutorial. About the tutorial. Tutorial

CA ERwin Data Modeler

User manual for e-line DNB: the XML import file. User manual for e-line DNB: the XML import file

Advanced PDF workflows with ColdFusion

<!--=========================================--> <!--=========================================-->

No Trade Secrets. Microsoft does not claim any trade secret rights in this documentation.

XML. Document Type Definitions XML Schema

[MS-FSDAP]: Forms Services Design and Activation Web Service Protocol

Data Integration Hub for a Hybrid Paper Search

Web Content Management System based on XML Native Database

Tecnologie per XML. Sara Comai Politecnico di Milano. Tecnologie legate a XML

Exercises: XSD, XPath Basi di da4 2

<Namespaces> Core XML Technologies. Why Namespaces? Namespaces - based on unique prefixes. Namespaces. </Person>

XML for RPG Programmers: An Introduction

Visualization of GML data using XSLT.

Service Description: NIH GovTrip - NBS Web Service

HETEROGENEOUS DATABASE INTEGRATION FOR WEB APPLICATIONS

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

XIII. Service Oriented Computing. Laurea Triennale in Informatica Corso di Ingegneria del Software I A.A. 2006/2007 Andrea Polini

How To Write A Contract Versioning In Wsdl 2.2.2

XML and Data Integration

MATHM Structured Documents

Balisage: The Markup Conference

XML. Dott. Nicole NOVIELLI XML: extensible Markup Language

Part 5 Overview. Conceptual Design. Conceptual Design Activities. Purpose. Verteilte Web-basierte Systeme. Part V. Chapter://1

DRAFT. Standard Definition. Extensible Event Stream. Christian W. Günther Fluxicon Process Laboratories

The Direct Project. Implementation Guide for Direct Project Trust Bundle Distribution. Version March 2013

XML in programming. Patryk Czarnik. XML and Modern Techniques of Content Management 2012/13

XML An Introduction. Eric Scharff. Center for LifeLong Learning and Design (L3D)

Model-driven Rule-based Mediation in XML Data Exchange

Designing the Service Contract

Extensible Markup Language (XML): Essentials for Climatologists

EFSOC Framework Overview and Infrastructure Services

By Nabil ADOUI, member of the 4D Technical Support team

Oracle Java CAPS Message Library for EDIFACT User's Guide

Chapter 3: XML Namespaces

EHR-IIS Interoperability Enhancement Project. Transport Layer Protocol Recommendation Formal Specification. Version 1.

PEPPOL Deliverable D1.1 Requirements for Use of Signatures in Public Procurement Processes Part 5: XKMS v2 Interface Specification

Design and Implementation of a Feedback Systems Web Laboratory Prototype

technische universität dortmund Prof. Dr. Ramin Yahyapour

XML Databases 13. Systems

XSLT Mapping in SAP PI 7.1

BCS THE CHARTERED INSTITUTE FOR IT. BCS HIGHER EDUCATION QUALIFICATIONS BCS Level 6 Professional Graduate Diploma in IT WEB ENGINEERING

Et tu, XML? Philip Wadler, Avaya Labs

Introduction to XML Applications

Course: Introduction to XML

Connecting to WebSphere ESB and WebSphere Process Server

Summary. Griglie e Sistemi di Elaborazione Ubiqui. Corso di Laurea Specialistica in Ingegneria informatica. Lucidi delle Esercitazioni

CHAPTER 9: DATAPORT AND XMLPORT CHANGES

QUT Digital Repository:

6. SQL/XML. 6.1 Introduction. 6.1 Introduction. 6.1 Introduction. 6.1 Introduction. XML Databases 6. SQL/XML. Creating XML documents from a database

INTRO TO XMLSPY (IXS)

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

Integrating CRM into IBM WebSphere Portal with Digital Data Connector

Can I Make XML Go Faster?

Agency to System Infrastructure Provider Interface Specification

XML Databases 6. SQL/XML

XEP-0135: File Sharing

Parallels Operations Automation 5.4

Semistructured data and XML. Institutt for Informatikk INF Ahmet Soylu

GeoSciML Cookbook. How to serve a GeoSciML version 2 Web Feature Service (WFS) using Open Source Software. Version

MedBiquitous Web Services Design Guidelines

An Empirical Study on XML Schema Idiosyncrasies in Big Data Processing

Compliance Modeling. Formal Descriptors and Tools. , Falko Kötter 2. Report 2014/02 March 28, 2014

2 Problem description

Transcription:

Selftest XML Basics Document: E1006Test.fm 30/04/2010 ABIS Training & Consulting P.. Box 220 B-3000 Leuven Belgium TRAINING & CNSULTING

INTRDUCTIN SELFTEST XML BASICS To get an idea of the required prerequisites for the courses XSLF and XMLJAVA, we have composed this set of questions. They are based on the contents of the course XML Basics. This test consists of 20 multiple choice questions. For most questions, there is only one answer possible. If multiple answers are possible, this will be clearly indicated. The question is answered correctly, if and only if all correct answers are given. This test will take you about ten minutes. You will find the answers and guidelines for the evaluation at the end of this document. 30/04/2010 Selftest XML Basics 2

QUESTINS SELFTEST XML BASICS 1. Given the following xml document. <Question subject= Math > <Remark>please, read <b> the question </b> carefully </Remark> <Calculation> <Number>2</Number> <perator>plus</perator> <Number>3</Number> </Calculation> <Result>5 is the right answer</result> </Question> Which element has a mixed content? (a) Remark. (b) Result. (c) Calculation. (d) Question. 2. Which node is considered a text node by the parser? (a) <PCDATA>1 > 2</PCDATA> (b) <![CDATA[ 1 > 2]]> (c) <CDATA>1 > 2</CDATA> (d) <!CDATA[ 1 > 2 ]> 3. Which xml elements are correct? [2 answers] [_] [a] [_] [b] [_] [c] <Calc>1 > 2</Calc> <Calc>2 < 3</Calc> <Calc>2 > 3</Calc> [_] [d] <Calc><!CDATA[ 1 > 2 ]> 30/04/2010 Selftest XML Basics 3

4. Given the following xml element. <name> <firstname>john</firstname> <lastname>lennon</lastname> </name> What is a correct DTD description for it? (a) <!ELEMENT name (firstname, lastname)+> <!ELEMENT firstname (#CDATA)> <!ELEMENT lastname (#CDATA)> (b) <!ELEMENT name (firstname lastname)> <!ELEMENT firstname (#CDATA)> <!ELEMENT lastname (#CDATA)> (c) <!ELEMENT name (lastname firstname)+> <!ELEMENT firstname (#PCDATA)> <!ELEMENT lastname (#PCDATA)> (d) <!ELEMENT name (firstname lastname)> <!ELEMENT firstname (#PCDATA)> <!ELEMENT lastname (#PCDATA)> 5. Which is a correct DTD way to specify attributes nr and lang for element Article? (a) <!ATTLIST Article nr #CDATA REQUIRED lang #CDATA PTINAL> (b) <!ATTRIBUTES Article nr #PCDATA lang #PCDATA> (c) <!ELEMENT Article <!ATTRIBUTES nr #REQUIRED lang #REQUIRED>> (d) <!ATTLIST Article lang CDATA #IMPLIED nr CDATA #REQUIRED> 30/04/2010 Selftest XML Basics 4

6. Given the following xml document. <name> <firstname>john</firstname><lastname>lennon</lastname> </name> What is a correct schema structure for it? (a) <xs:schema xmlns:xs="http://www.w3.org/2001/xmlschema" > <xs:element name="firstname" type="xs:string"/> <xs:element name="lastname" type="xs:string"/> <xs:element name="name"> <xs:complextype> <xs:sequence> <xs:element ref="firstname"/> <xs:element ref="lastname"/> </xs:sequence> </xs:complextype> </xs:element> </xs:schema> (b) <xsd:schema xmlns:xsd="http://www.w3.org/2001/xmlschema" > <xsd:element name="name"> <xsd:complextype> <xsd:sequence> <xsd:element name="firstname" type="xsd:string"/> <xsd:element name="lastname" type="xsd:string"/> </xsd:sequence> </xsd:complextype> </xsd:element> </xsd:schema> (c) <xs:schema xmlns:xs="http://www.w3.org/2001/xmlschema" > <xs:element name="firstname" type="xs:string"/> <xs:element name="lastname" type="xs:string"/> <xs:element name="name" type="nametype"/> <xs:complextype type="nametype"> <xs:sequence> <xs:element ref="firstname"/> <xs:element ref="lastname"/> </xs:sequence> </xs:complextype> </xs:schema> (d) <xs:schema xmlns:xsd="http://www.w3.org/2001/xmlschema" > <xs:element name="name"> <xs:complextype> <xs:sequence> <xs:element ref="firstname" /> <xs:element ref="lastname" /> </xs:sequence> </xs:complextype> </xs:element> </xs:schema> 30/04/2010 Selftest XML Basics 5

7. Which element may not be used as child of <xs:simpletype>? (a) <xs:extension> (b) <xs:restriction> (c) <xs:list> (d) <xs:annotation> 8. Which attribute for the root element xs:schema is necessary if you want to place the elements in a namespace? (a) elementformdefault (b) targetnamespace (c) defaultnamespace (d) attributeformdefault 9. Which XML documents are well-formed? [2 answers] [_] [a] [_] [b] [_] [c] [_] [d] <?xml version="1.0" encoding="utf-8"?> <x xmlns="http://www.abis.be" xmlns:abis="www.abis.be" xmlns:a="http://www.abis.be"> <y a:a="1" abis:a="2"></y> </x> <?xml version="1.0" encoding="utf-8"?> <x xmlns="www.abis.be" xmlns:abis="www.abis.be" > <y a="1" abis:a="2"></y> </x> <?xml version="1.0" encoding="utf-8"?> <x xmlns="www.abis.be"> <y a="1" a="2"></y> </x> <?xml version="1.0" encoding="utf-8"?> <x xmlns="www.abis.be" xmlns:abis="www.abis.be" xmlns:a="www.abis.be"> <y a:a="1" abis:a="2"></y> </x> 30/04/2010 Selftest XML Basics 6

10. Which is a valid node-type in XPath? (a) entity (b) cdata (c) processing-instruction (d) document-fragment 11. Which axis is a reverse axis? (a) descendant (b) ancestor (c) following (d) attribute 12. Given the following xml and xsl. What is the result? <Company> <Name>Abis</Name> <City>Leuven</City> <Telephone>016/245610</Telephone> </Company> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/xsl/transform"> <xsl:template match="/"> <xsl:apply-templates select="company/telephone"/> </xsl:template> <xsl:template match="telephone"> <xsl:apply-templates select="preceding-sibling::*"/> </xsl:template> </xsl:stylesheet> (a) AbisLeuven (b) LeuvenAbis (c) LeuvenAbis016/245610 (d) none of the above 13. With which nodetype test can a CDATA section be selected? [2 answers] [_] [a] [_] [b] [_] [c] [_] [d] child::text() child::cdata() child::processing-instruction() child::node() 30/04/2010 Selftest XML Basics 7

14. How can an empty element PartNumber be created in XSL? (a) <xsl:element name="partnumber"> </xsl:element> (b) <xsl:element name="partnumber" type="empty"/> (c) <xsl:text disable-output-escaping="yes"><partnumber/></xsl:text> (d) <PartNumber> </PartNumber> 15. Which xsl element cannot have a select attribute? (a) xsl:copy (b) xsl:apply-template (c) xsl:value-of (d) xsl:for-each 16. Which output method prints only text nodes? (a) string (b) text (c) html (d) xml 17. Which Xpath expression selects a Person Element having the same parent as the context node, and being the closest to the context node? (a) /descendant-or-self::person (b) preceding-sibling::person (c) preceding-sibling::person[1] (d) parent::*/person[1] 30/04/2010 Selftest XML Basics 8

18. If I want to print a space between the firstname and the lastname, what should my xsl look like? (a) <xsl:value-of select="firstname"/> <xsl:text> </xsl:text> <xsl:value-of select="lastname"/> (b) <xsl:value-of select="firstname"/> <xsl:value-of select="lastname"/> (c) <xsl:value-of select="firstname"/> <xsl:value-of select="lastname"/> (d) <xsl:preserve-space> <xsl:value-of select="firstname"/> <xsl:value-of select="lastname"/> </xsl:preserve-space> 19. What is a correct way to call this template? <xsl:template name="test"> <xsl:param name="abc"/> <xsl:template> (a) <xsl:call-template name="test"> <xsl:param name="abc" select="firstname"/> </xsl:call-template> (b) <xsl:apply-template select="test"/> (c) <xsl:call-template name="test"/> 20. Which node types can be selected in XPath with *? [2 answers] [_] [a] [_] [b] [_] [c] [_] [d] Comment nodes Attributes Element nodes Text nodes 30/04/2010 Selftest XML Basics 9

EVALUATIN. Here are the correct answers to all questions: 1. a 2. b 3. a c 4. c 5. d 6. b 7. a 8. b 9. a b 10. c 11. b 12. a 13. a d 14. c 15. a 16. b 17. c 18. a 19. c 20. b c Give yourself 1 point for each correctly answered question; for multiple answer questions, all answers should be correct. When your score is less than 50%, you will certainly learn a lot in the course XML basics. But be sure that your background on XML concepts is sufficient: fill out the corresponding selftest (see PDF file) to verify this. When your score is between 50% and 75%, following the course XML basics will probably improve your XML knowledge. With a score of more than 75%, you won t learn much new things in this course. In this case you could consider following one of the follow-up courses. 30/04/2010 Selftest XML Basics 10