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.
In this month's "XML Certification Quizzer," we are going to review some interesting aspects of the syntax of XML and related technologies. You can learn more about the syntax of the language by running the sample code in the questions with an XML parser or an XSLT processor. The skills you'll learn here will prepare you for IBM Test 141 on XML and related technologies.
Question 1 (Information Modeling)
Which of the following XML documents is well-formed?
Select one answer.
Explanation: Choice A is the correct answer. The parameter entity reference %ent; is replaced with the element declaration for element b.
Choice B is not correct because in the internal subset of the document type declaration (the part delimited by [ and ]>), parameter entity references can occur only between markup declarations, not within markup declarations. Note that this well-formedness constraint is not applicable to parameter entity references in the external subset.
Choice C is not correct because parameter entity references can be referenced only in the DTD, not in the XML instance. The parser will treat %ent; as just a string, not an entity reference.
Question 2 (XML Processing)
Consider the following XML document:
Select one answer.
Explanation: Choice A is the correct answer. XML documents often contain white space to make them more readable. However, XML parsers must report all characters that are not markup to the application. A nonvalidating parser will report the white space and the line ends to the application with the characters() method.
Validating parsers report white space in element content using the ignorableWhiteSpace() method rather than the characters() method. Assume that the XML document has the following DTD:
xmlns:d CDATA #FIXED 'http://xdocs.org'>
Element a can only contain child elements b and c. A character inside element a (including white space characters) would make the document invalid. The white space before elements b and c would be called ignorable white space. If namespace processing is enabled by the parser, startPrefixMapping() and endPrefixMapping are used to report the start of the scope of a prefix-URI Namespace mapping and the end of the scope of a prefix-URI mapping, respectively.
Question 3 (Architecture)
The XML Encryption and Syntax Specification defines an EncryptedData element. Which of the following elements is a mandatory child element of EncryptedData?
A. EncryptionMethod
B. Ds:keyInfo
C. CipherData
D. EncryptionProperties
Select one answer.
Explanation: Choice C is the correct answer. EncryptedData is derived from the EncryptedType abstract type. The following is the complex type definition of the EncryptedType type:
The EncryptionMethod child element is optional and describes the encryption algorithm applied to the cipher data. The ds:KeyInfo child element is optional and contains information about the key used to encrypt the data. The CipherData child element is a mandatory element that contains the CipherValue or CipherReference. The CipherValue element contains the encrypted octet sequence as base64 encoded text. The CipherReference element provides a reference to an external location containing the encrypted octet. The EncryptionProperties child element is optional and contains additional information concerning the generation of the EncryptedData element.
The following is an example of an encrypted medical record in which the content of the IllnessInfo element is encrypted:
James Lambert
Name/>
xmlns='http://www.w3.org/2001/04/xmlenc#'
Type='http://www.w3.org/2001/04/xmlenc#Content'> A23B45C56
Question 4 (Testing and Tuning)
A complex type definition is specified in an external schema that has no target namespace. Which of the following XML Schema elements would you use to import the complex type into a schema, and extend the complex type by adding an attribute to its declaration?
A. import
B. redefine
C. include
D. redeclare
Select one answer.
Explanation: Choice B is the correct answer. The redefine element can be useful for schema authors who need a declarative mechanism for managing the evolution of their schema. Modifications to the schema can be described with the redefine element.
The redefined schema document must have the same targetNamespace as the redefining schema document, or no targetNamespace. If the redefined schema document has no targetNamespace, then it is converted to the redefining schema document's targetNamespace.
Within the redefine element, the base types in type definitions must be the types themselves. Attribute groups and model groups are defined as supersets or subsets of their definitions in the redefined schema.
Question 5 (XML Rendering)
Consider the following XML document:
aero corp
manufacturer> FC-7612 34
parts inc
manufacturer> B765-10 75
cat inc
manufacturer> JK766-6 56
Using XSL formatting objects, which XSLT stylesheet would you use to transform the XML document for printed output?
A.
xmlns:xsl="http://www.w3.org/1999/
XSL/Transform" version="1.0">
data-type="number"/>
B.
xmlns:xsl="http://www.w3.org/1999/
XSL/Transform" version="1.0"
xmlns:fo="http://www.w3.org/1999/XSL/Format">
C.
xmlns:xsl="http://www.w3.org/1999/
XSL/Transform" version="1.0"
xmlns:fo="http://www.w3.org/
1999/XSL/Format">
order="ascending" data-type="number"/>
Select one answer.
Explanation: Choice B is the correct answer.
Choice A is not correct because the XSL formatting object namespace is not declared. The element must have an "order" attribute, not a "sort-order" attribute.
Choice C is not correct because element names tr and td are not defined by the XSL specification.
Conclusion
To get the hands-on coding experience that you need in the real world, you should download some XML tools and try to run a few samples. It is also helpful to create small applications using real documents or data. You can obtain free open source XML software from http://xml.apache.org.
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.
Reader Feedback: Page 1 of 1
#1
cyril commented on 17 Sep 2003
Dear Joel,
First congratulations for your very good job. Your quizz is really interesting and it's woth doing it.
Just one thing: may you improve the presenttion of article 673 so that code may appear?
It would be very nice from you.
Thanks in advance,
Cyril.
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: