The i-Technology Media!
Register | Log in
   
 
.NET  ·  AJAX  ·  CLOUD  ·  ECLIPSE  ·  FLEX  ·  OPEN WEB  ·  iPHONE  ·  JAVA  ·  LINUX  ·  OPEN SOURCE  ·  ORACLE  ·  PBDJ  ·  SEARCH  ·  SILVERLIGHT  ·  SOA  ·  VIRTUALIZATION  ·  WEB 2.0  ·  WIRELESS  ·  XML
Comments
Drool, Britannia? Is the UK Failing the Cloud?
By Roger Strukhoff
Richard Davies wrote: The UK has a good crop of technology pioneers in cloud computing - for example ElasticHosts, FlexiScale, Flexiant, OnApp - and also some strong government initiatives such as G-Cloud. We will have to see whether this kind of technical leadership converts into swift mass-market adoption or not.
Jan. 8, 2012 11:38 AM EST
read more & respond »
Cloud Expo on Google News
Did you read today's front page stories & breaking news?

Cloud Expo & Virtualization 2011 West
Keynotes
Oracle
Opening Keynote | An Enterprise Cloud for Business-Critical Applications
Abiquo
Day 2 Keynote | The Enterprise Cloud Tightrope - Balancing for Success
Akamai
Day 3 Keynote | The DNA of an Enterprise Cloud
DIAMOND SPONSOR:
Oracle
Many Clouds, Many Choices'Cloud
PLATINUM PLUS SPONSORS:
Abiquo
Enterprise Cloud Best Practices - Town Hall - Join the discussion…
PLATINUM SPONSORS:
Intel
Progressing Toward the Federated, Automated and Client-Aware Cloud
New Relic
How to build an app with Twitter-like throughput
Rackspace
Computing in the Cloud Era
GOLD SPONSORS:
Gale Technologies
Practical Cloud Migration
IBM
Re-think IT. Re-inventing Business.
Intel/McAfee
Identity Driven Security in the Cloud
PerspecSys
Hackers Hackers Everywhere, Is My Public Cloud That Safe?
Red Hat
Unlock the Value of the Cloud
SHI
Mission Critical Applications and the Cloud - Myth or Reality?
SoftLayer
Not Your Grandpa's Cloud
Terremark
Integrating Enterprise Clouds
VMware
Upgrade to a vCloud
POWER PANELS:
Cloud Expo Silicon Valley: CTO Power Panel
Cloud Expo Silicon Valley: CEO Power Panel
Cloud Expo Silicon Valley: Cloud SuperStars Panel
Cloud Expo Silicon Valley: CloudNOW Panel
Click For 2010 West
Event Webcasts
Cloud Expo & Virtualization 2011 East
DIAMOND SPONSOR:
Dell
Dell & VMware Deliver the Enterprise Hybrid Cloud
PLATINUM PLUS SPONSORS:
Abiquo
Are Financial Services Organizations Risking Security by Avoiding Cloud Computing?
Oracle
From Consolidation to Enterprise Private PaaS
PLATINUM SPONSORS:
Intel
Driving the Transformation to Next Generation Cloud Data Centers
Rackspace
The Inevitability of an Open Cloud
GOLD SPONSORS:
CA Technologies
Follow YOUR path to Cloud Computing
Interxion
Who Keeps the Cloud in the Air?
Microsoft
Patterns for Cloud Computing
PerspecSys
War in the Clouds: Are you ready?
ServiceMesh
The Big Win: Stop Playing Small-Ball with Your Cloud Strategy
Terremark
Evaluating Enterprise Clouds
Xiotech
Cloud Storage: Myths and Realities
POWER PANELS:
Cloud Expo New York: CTO Power Panel
Cloud Expo New York: CEO Power Panel
Cloud Expo New York: CMO Power Panel
Cloud Expo New York: Wrap-Up Power Panel
Click For 2010 West
Event Webcasts
Live Google News by SYS-CON!
Top Three Links You Must Click On


Feature
XML Certification Quizzer
XML Certification Quizzer

By: Joel Amoussou
May. 22, 2003 12:00 AM

Last month's column introduced you to the exam objectives for IBM Test 141 on XML and Related Technologies. This installment will present five more questions from the five different exam objectives. It can be used as a learning tool for people who are new to XML. If you are preparing for the exam, the article will help you review key concepts.

Question 1 (XML Processing)
Which of the following XSLT elements sets the value of a variable x to the literal string value "a"?

A. <xsl:variable name='x' select='a'/>
B. <xsl:variable name="x" value="a"/>
C. <xsl:variable name='x' select="'a'"/>
D. <xsl:variable select='"a"' value="x" />

Select one answer.
Explanation: Choice C is the correct answer. There are three methods for specifying the value of a variable:
1.   Use an empty xsl:variable element with a select attribute. The value of the variable is the object that results from evaluating the expression in the select attribute.
2.   Use a nonempty xsl:variable element with no select attribute. In this case, the xsl:variable has one or more child nodes, which form a template. The template is instantiated to produce a result tree fragment, which is the value of the variable. The root node of the result tree fragment contains a sequence of child nodes generated by instantiating the template.
3.   Set the value of the variable to an empty string by using an empty xsl:variable element with no select attribute.

In order to assign a literal string value to a variable, the value must be delimited with quotes. These quotes must be placed within the quotes used to delimit the value of the select attribute. The following will set the value of a variable x to the literal string value "a":

<xsl:variable name='x' select="'a'"/>
<xsl:variable select='"a"' name="x"/>

Note that in XML, the ordering of attributes is not important and attribute values can be delimited either by a pair of single quotes or a pair of double quotes.

Choice A is not correct, because it sets the value of the variable x to a node set containing all the elements <a>, children of the context node. The XSLT stylesheet may not generate an error, but will certainly produce an output that is different from the expected result.

Choices B and D are not correct because XSLT does not specify the value attribute on the xsl:variable element.

Question 2 (Information Modeling)
Consider the following DTD declarations:

<!ELEMENT CrossReference (#PCDATA)>
<!ATTLIST CrossReference
Linkend IDREF #REQUIRED>

Which of the following XML Schema declarations is the best translation of the DTD declarations above? A.

<xsd:element name = "CrossReference">
<xsd:complexType>
<xsd:simpleContent>
<xsd:extension base =
"xsd:string">
<xsd:attribute name = "Linkend"
use = "required" type = "xsd:IDREF"/>
</xsd:extension>
</xsd:simpleContent>
</xsd:complexType>
</xsd:element>

B.

<xsd:element name = "CrossReference"
type="xsd:string">
<xsd:attribute name = "Linkend" use =
"required" type = "xsd:IDREF"/>
</xsd:element>

C.

<xsd:element name = "CrossReference">
<xsd:complexContent>
<xsd:extension base = "xsd:string">
<xsd:attribute name = "Linkend"
use = "required"
type = "xsd:IDREF"/>
</xsd:extension>
</xsd:complexContent>
</xsd:element>

Select one answer.
Explanation: Choice A is the correct answer. The CrossReference element has an attribute. Simple types cannot have attributes. Therefore, the declaration of the CrossReference element must contain a complex type definition.

The content model of CrossReference contains only character data and no child elements. The simpleContent element is used inside the complexType to indicate that CrossReference is an extension of the simple type xsd:string. Since the simple type xsd:string is extended by adding a Linkend attribute, we use an extension element inside simpleContent.

Choice B is not correct. The element declaration does not specify whether CrossReference is a simple type or a complex type.

Choice C is not correct. The complexContent element is used to restrict or extend the content model of a complex type.

Question 3 (XML Rendering)
Which of the following XSL-FO fragments will display the content of pages in two columns?

A.

<fo:simple-page-master master-name="one"
page-height="11in"
page-width="8.5in"
margin-top="1in"
margin-bottom="1in"
margin-left="0.75in"
margin-right="0.75in">
<fo:column
margin-top="1in" margin-bottom="1in"
column-count="2" column-gap="0.25in"/>
<fo:region-before extent="1in" />
<fo:region-after extent="1in" />
</fo:simple-page-master>

B.

<fo:simple-page-master master-name="one"
page-height="11in"
page-width="8.5in"
margin-top="1in"
margin-bottom="1in"
margin-left="0.75in"
margin-right="0.75in">
<fo:region-body
margin-top="1in" margin-bottom="1in"
column-count="2" column-gap="0.25in"/>
<fo:region-before extent="1in" />
<fo:region-after extent="1in" />
</fo:simple-page-master>

C.

<fo:page-sequence master-name="one"
page-height="11in"
page-width="8.5in"
margin-top="1in"
margin-bottom="1in"
margin-left="0.75in"
margin-right="0.75in">
<fo:region-body
margin-top="1in" margin-bottom="1in"
column-count="2" column-
gap="0.25in"/>
<fo:region-before extent="1in" />
<fo:region-after extent="1in" />
</fo:page-sequence >

Select one answer.
Explanation: Choice B is the correct answer. The fo:simple-page-master is used to specify the dimensions of the page (page-height and page-width) and margin properties, including margin-top, margin-bottom, margin-left, and margin-right. In addition, the fo:simple-page-master specifies the five regions of the page: region-body, region-before, region-after, region-start, and region-end.

If the page is subdivided in multiple columns, a column-count attribute is attached to the fo:region-body element to provide multiple columns. The column-gap attribute specifies the width of the separation between adjacent columns.

The fo:page-sequence formatting object specifies a sequence or sub-sequence of pages within a document. Its fo:flow and fo:static-content flow objects child elements specify the content of these pages.

Choice A is not correct because there is no fo:column formatting object defined in XSL.

Choice C is not correct because the allowed content of fo:page-sequence is the following: (title?,static-content*, flow).

Question 4 (Testing & Tuning)
Consider the following complex type definitions:

<xsd:schema
xmlns:xsd="http://www.w3.org/2001/ XMLSchema"
xmlns:di="http://www.xdrugs.com/di"
targetNamespace="http://www.xdrugs.com/di">

<xsd:complexType name="PatientInfo">
<xsd:sequence>
<xsd:element name="patientid"
type="xsd:string"/>
<xsd:element name="name"
type="xsd:string"/>
<xsd:element name="illness"
type="xsd:string"/>
</xsd:sequence>
</xsd:complexType>

<xsd:complexType name="DrugInfo">
<xsd:sequence>
<xsd:element name="id"
type="xsd:string"/>
<xsd:element name="dosage"
type="xsd:string"/>
<xsd:element name="consumer"
type="xsd:string"/>
</xsd:sequence>
</xsd:complexType>
......
</xsd:schema>

A prescriptions element must be defined in the schema. Prescriptions elements must contain one or more patient elements of type PatientInfo followed by one or more drug elements of type DrugInfo. Inside a prescriptions element, the patientid child of patient must be unique, and each consumer child of drug must have a corresponding patientid.

Which of the following is the BEST method for modeling the content of the prescriptions element?

A.

<xsd:element name="prescriptions">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="patient" type="di:
PatientInfo"
minOccurs="1" maxOccurs="unbounded"
type="xsd:ID"/>
<xsd:element name="drug" type=
"di:DrugInfo" minOccurs="1"
maxOccurs="unbounded"
type="xsd:IDREF"/>
</xsd:sequence>
</xsd:complexType>

B.

<xsd:element name="prescriptions">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="patient" type="di:
PatientInfo"
minOccurs="1" maxOccurs="unbounded"/>
<xsd:element name="drug" type="di:
DrugInfo" minOccurs="1" maxOccurs="
unbounded"/>
</xsd:sequence>
</xsd:complexType>

<xsd:ID name='PatientKey'>
<xsd:selector xpath='patient'/>
<xsd:field xpath='patientid'/>
</xsd:ID>

<xs:IDREF name='DrugKeyRef' refer="di:
PatientKey">
<xsd:selector xpath='drug'/>
<xsd:field xpath='consumer'/>
</xsd:IDREF>
</xsd:element>

C.

<xsd:element name="prescriptions">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="patient" type="di:
PatientInfo"
minOccurs="1" maxOccurs="unbounded"/>
<xsd:element name="drug" type="di:Drug
Info" minOccurs="1"maxOccurs=
"unbounded"/>
</xsd:sequence>
</xsd:complexType>

<xsd:key name='PatientKey'>
<xsd:selector xpath='patient'/>
<xsd:field xpath='patientid'/>
</xsd:key>

<xs:keyref name='DrugKeyRef'
refer="di:PatientKey">
<xsd:selector xpath='drug'/>
<xsd:field xpath='consumer'/>

</xsd:keyref>
</xsd:element>

Select one answer.
Explanation: Choice C is the correct answer. The key element applies to the content of patientid elements that are children of the patient element. This means that the value of patientid must be unique and is not nillable. The key can be referenced from elsewhere with its name, PatientKey. To ensure that consumer children of the drug elements have a corresponding value in the patientid elements identified by the key, we use the keyref element.

Choice A and Choice B are not correct. For compatibility with XML1.0, ID and IDREF should be used only on attributes.

Question 5 (Architecture)
An international industry group of airlines, aircraft manufacturers, and parts suppliers decides to adopt Web services for the parts ordering process. Airlines must be able to query thousands of manufacturer and supplier parts catalogs and place orders based on availability, price, quantity, quality, and shipping costs. The industry group forms a Web Services Working Group to provide technical recommendations on the adoption of Web services by its members.

Which of the following is least likely to be part of the recommendations of the Working Group?

A.   The industry group must define a WSDL service interface definition, and register it as a tModel in a UDDI registry.
B.   SOAP request and response messages must be exchanged over HTTP.
C.   The industry group must create an XML Schema to describe the messages used to search aircraft parts catalogs, place orders, and track orders.
D.   Each aircraft manufacturer or part supplier must define its own specific WSDL service interface definition, and put a copy of the WSDL file on its Web server.

Select one answer.
Explanation: Choice D is the correct answer. If each aircraft manufacturer or part supplier defines its own specific WSDL service interface definition, an airline must know the service provider in advance before it can obtain the WSDL definition. Since there are thousands of manufacturers and suppliers, that solution will not bring significant efficiency gains.

Once an industry standard WSDL service interface definition is registered as a tModel in a UDDI registry, programmers at airlines can retrieve the WSDL document by following the overviewDoc link in the tModel.

The network address of each service access point is encoded in the accessPoint element of a bindingTemplate. Client applications will query the UDDI registry for the access points of all registered Web services that implement the industry standard WSDL.

Conclusion
When preparing for IBM XML Certification, it is important to understand how various XML-related specifications are used together to design a solution, and the role of each specification in the architecture.

Published May. 22, 2003— Reads 8,478
Copyright © 2003 SYS-CON Media, Inc. — All Rights Reserved.
Syndicated stories and blog feeds, all rights reserved by the author.
About Joel Amoussou
Joel Amoussou is founder and chief learning architect of XMLMentor.net, where he develops blended learning solutions for building and assessing XML skills. Joel is the author of an XML exam simulator and teaches live e-learning courses on XML certification.

Add Your Feedback

In order to post a comment you need to be registered and logged in.

Register | Sign-in

Reader Feedback: Page 1 of 1

Subscribe to the World's Most Powerful Newsletters
Subscribe to Our Rss Feeds & Get Your SYS-CON News Live!
Click to Add our RSS Feeds to the Service of Your Choice:
Google Reader or Homepage Add to My Yahoo! Subscribe with Bloglines Subscribe in NewsGator Online
myFeedster Add to My AOL Subscribe in Rojo Add 'Hugg' to Newsburst from CNET News.com Kinja Digest View Additional SYS-CON Feeds
Publish Your Article! Please send it to editorial(at)sys-con.com!

Advertise on this site! Contact advertising(at)sys-con.com! 201 802-3021

SYS-CON Featured Whitepapers

ADS BY GOOGLE

Breaking Java News
Harmonic Energy Inc. Appoints Engineering Expert Hiroyasu Tanaka to the Board of Directors
Teck Announces Redemption of US$1.051 Billion Principal Amount of Notes
Gerawan Farming Completes Historic Agricultural Conservation Easement
Shin-Etsu Chemical Develops New Generation of Low Refractive Index Silicone Encapsulating Material That Considerably Improves the Reliability of High Brightness LEDs
Grupo Elektra Announces 50% EBITDA Growth to Historical Maximum of Ps.2,556 Million in 4Q11
Allied Motion Announces Record Profit for the Quarter and Year Ended December 31, 2011
Parents Are Giving The Enclave by William Lyon Homes High Marks
Maxthon Mobile Adds 'Quick and Easy' Screenshot Capture to Easily Save, Send and Share Full Screengrabs and Pictures

ADVERTISE   |   MAGAZINE SUBSCRIPTIONS   |   FREE BREAKING-NEWSLETTERS!   |   SYS-CON.TV   |   BLOG-N-PLAY!   |   WEBCAST   |   EDUCATION   |   RESEARCH

.NET Developer's Journal - .NETDJ   |   ColdFusion Developer's Journal - CFDJ   |   Eclipse Developer's Journal - EDJ   |   Enterprise Open Source Magazine - EOS
Open Web Developer's Journal - OPENWEB   |   iPhone Developer's Journal - iPHONE   |   Virtualization - Virtualization   |   Java Developer's Journal - JDJ   |   Linux.SYS-CON.com
PowerBuilder Developer's Journal - PBDJ   |   SEO / SEM Journal - SJ   |   SOAWorld Magazine - SOAWM   |   IT Solutions Guide - ITSG   |   Symbian Developer's Journal - SDJ
WebLogic Developer's Journal - WLDJ   |   WebSphere Journal - WJ   |   Wireless Business & Technology - WBT   |   XML-Journal - XMLJ   |   Internet Video - iTV
Flex Developer's Journal - Flex   |   AJAXWorld Magazine - AWM   |   Silverlight Developer's Journal - SLDJ   |   PHP.SYS-CON.com   |   Web 2.0 Journal - WEB2
Apache   |   CMS   |   CRM   |   HP   |   Oracle Journal   |   Perl   |   Python   |   Red Hat   |   Ruby on Rails   |   SAP   |   SaaS

SYS-CON MEDIA:   ABOUT US   |   CONTACT US   |   COMPANY NEWS   |   CAREERS   |   SITE MAP
SYS-CON EVENTS:   |  AJAXWorld Conference & Expo  |  iPhone Developer Summit  |  Cloud Computing Conference & Expo  |  SOA World Conference & Expo  |  Virtualization Conference & Expo
INTERNATIONAL SITES:   India  |  U.K.  |  Canada  |  Germany  |  France  |  Australia  |  Italy  |  Spain  |  Netherlands  |  Brazil  |  Belgium
 Terms of Use & Our Privacy Statement     About Newsfeeds / Video Feeds
Copyright ©1994-2008 SYS-CON Publications, Inc. All Rights Reserved. All marks are trademarks of SYS-CON Media.
Reproduction in whole or in part in any form or medium without express written permission of SYS-CON Publications, Inc. is prohibited.
 
close this window