CertCities.com -- The Ultimate Site for Certified IT Professionals
Visit CertCities.com Forums and Ost Your Mind Share share | bookmark | e-mail
  Microsoft®
  Cisco®
  Security
  Oracle®
  A+/Network+"
  Linux/Unix
  More Certs
  Newsletters
  Salary Surveys
  Forums
  News
  Exam Reviews
  Tips
  Columns
  Features
  PopQuiz
  RSS Feeds
  Press Releases
  Contributors
  About Us
  Search
 

Advanced Search
  Free Newsletter
  Sign-up for the #1 Weekly IT
Certification News
and Advice.
Subscribe to CertCities.com Free Weekly E-mail Newsletter
CertCities.com

See What's New on
Redmondmag.com!

Cover Story: IE8: Behind the 8 Ball

Tech-Ed: Let's (Third) Party!

A Secure Leap into the Cloud

Windows Mobile's New Moves

SQL Speed Secrets


CertCities.com
Let us know what you
think! E-mail us at:



 
 
...Home ... Editorial ... Pop Quiz ..Pop Quiz Article Friday: April 4, 2014


IBM Exam #141: XML and Related Technologies
15 questions. Answers and explanations can be found at the end of the quiz.


courtesy of   Whizlabs Software

Questions

1. Which of the following is (are) a valid XML name(s)?

a.________

b.:3:-3:5:-7

c.;123456

d.3:4;-7

2. Consider the Schema (named xlink.xsd) below:



xmlns="http://www.w3.org/1999/xlink"
targetNamespace="http://www.w3.org/1999/xlink"
attributeFormDefault="unqualified"
>
      
       
       
       
       


I want to import this Schema into another and use its declarations. Which of the following is valid?

a.

xmlns="http://ibiblio.org/xml/namespace/song"
xmlns:xlink="http://www.w3.org/1999/xlink"
targetNamespace="http://ibiblio.org/xml/namespace/song"
elementFormDefault="qualified"
attributeFormDefault="unqualified"
>
      
schemaLocation="xlink.xsd"/>
      
            
            
            
use="required"/>
            
            
            
            
      

b.

xmlns="http://ibiblio.org/xml/namespace/song"
xmlns:xlink="http://www.w3.org/1999/xlink"
targetNamespace="http://ibiblio.org/xml/namespace/song"
elementFormDefault="qualified"
attributeFormDefault="unqualified"
>
      
      
            
            
            
use="required"/>
            
            
            
            
      

c.

xmlns="http://ibiblio.org/xml/namespace/song"
targetNamespace="http://ibiblio.org/xml/namespace/song"
elementFormDefault="qualified"
attributeFormDefault="unqualified"
>
      
schemaLocation="xlink.xsd"/>
      
            
            
            
            
            
            
            
      

 

3. DOM 2 doesn't provide mechanism for interrogating and modifying the namespace for a document.

a. True

b. False

 

4. Which of the following comments are well formed?

a.

b.

c.

d.

 

5. Consider the following XML document and select the statements which hold true.

1.
2.
3.       
4.             Hey! How are you?
5.
6.
7.       Hey! How are you guys?
8.

a. The document is well-formed.

b. The document is not well-formed.

c. The document is well-formed and the element yourElement is an empty element.

d. The document is not well-formed because there can be one and only one root element, whereas in The above document there are two root elements viz. myElement and hisElement.

e. The document is not well-formed because the element yourElement is not closed properly and you can't have an empty element in the root element.

 

6. The DOM specification describes how strings are to be manipulated by the DOM by defining the datatype _______. It is encoded using _______ encoding scheme.

a. UNICODEString, Unicode

b. DOMString, UTF-8

c. String, Unicode

d. DOMString, UTF-16

e. DOMString, Unicode

 

7. Consider the following parameter entity definitions:


Which of the following statements are true?

a. The parameter entity definitions are correct.

b. The paramtere entities are invalid as they are using invalid names.

c. The paramtere entity replacement text violates well-formedness constraints.

d. A parameter entity contains circular reference to itself.

 

8. How can you declare in a DTD that the element a either contains both the elements x and y or none of them, the order doesn't matter?

a.

b.

c.

d.

 

9. An MNC receives at its headquarter from its subsidiaries, XML documents containing various reports of that subsidiary. These reports need to be displayed to the person responsible at the headquarter for that subsidiary in a user-friendly manner (allowing searches through the document) and the person is allowed to make any changes/comments that he/she desires. Once the user is done with all the changes/comments the information needs to be fed into the central database. Which of the following is MOST appropriate for processing these XML documents?

a. SAX

b. DOM

c. CSS

d. XSL

 

10. Considering the code below, what should be placed at /// your code /// to output "My Text"?

--------XML document-----------------




    My Text


--------XSL document-----------------



   
     
       


           /// your code ///
      

     
   

a.

b.

c.

d.

e.

 

11. What is the output of following XSL fragment?

MyDocument

a. MyLink=MyDocument

b.

c.

d. MyLink="MyDocument" `

e.

 

12. In SAX if the parser encounters a Fatal Error and doesn't find any error handler registered, it throws _______.

a. SAXParseException

b.SAXException

c.SAXFatalException

d.SAXFatalParseException

 

13. Provided that the file MyDTD.dtd has the following contents. Which of the xml files are valid?

MyDTD.dtd





a.


  
   text

b.


  Element can
  contain
  

c.


  Sample
    
      
      
    

d.

Sample
e.


   Example
   Beispiel

 

14. Which of the following is an XML-based service IDL that defines the service interface and its implementation characteristics.

a. UDDI

b. WSDL

c. SOAP

d. Path

 

15. An e-Learning company would like to develop a test authoring and delivery into XML format. In this system they want different authors to be able to send their tests in XML format to a central location, where an application will process these tests (XML documents) and update the central question database. Also in this system the test takers should have the facility to take the test either on the web or handheld device. Printouts and CD versions of the tests are also to be made available.

If the structure for the incoming XML documents is to kept flexible as their can be changes in the structure of the incoming XML documents. Which of the following should be included in the design of the system?

a. No validation as there is no defined structure.

b. The incoming documents should be checked for well-formedness only.

c. Mixed content model should be used to allow flexibility in the content model to allow for changes without breaking the previous documents.

d. Schema should be used instead of a DTD.

Answers

1. A and B are correct. Names in XML start with a letter, an underscore or a colon, the following characters can be letters, numeric characters, colon, underscore, dot or hyphen (minus). Names starting with "xml" (in any case) are reserved for W3C.

2. A and B are correct. The Schema xlink.xsd only declares attributes and no elements at all. It doesn't actually apply these attributes to any elements. Therefore, the Schema that does describe the PhotoType element needs to import xlink.xsd in order to reference these declarations. This is done with an xsd:import element. The xsd:import's schemaLocation attribute tells the processor where to find the Schema to import. The namespace attribute says which elements and attributes the Schema declares. In our case there are two declarations that need special attention:

(I) xmlns:xlink="http://www.w3.org/1999/xlink" in the xsd:schema element which attaches the prefix xlink with the namespace "http://www.w3.org/1999/xlink"

(II)

Which imports the xlink.xsd and sets the namespace and schemaLocation.

Only A and B have these declarations correct (the namespace attribute in (II) is not mandatory though schemaLocation attribute is). In C declaration (I) is missing. Hence only A and B are the correct choices.

3. B is correct. Though DOM 1 didn't provide this functionality but DOM 2 does provide you a mechanism for interrogating and modifying the namespace for a document.

4. A, B and C are correct. The basic syntax of an XML comment is:

Where the "...comment text..." portion can be any character string that doesn't include the "--" string literal (this restriction is for SGML compatibility). Furthermore, the "..." portion cannot end with a hyphen ("-") since this could cause misinterpretation of the closing delimiter.

5. B and D are correct. XML documents are allowed to have one and only one root element, hence only B and D are correct. E is nonsense as there is no such restriction on root element. It is perfectly fine for the root element to contain as many empty elements as it requires and also the element yourElement is perfectly fine.

6. D is correct. The DOM specification describes how strings are to be manipulated by the DOM by defining the datatype DOMString. It is defined as a double-type character set string, encoded using the UTF-16 encoding scheme.

7. D is correct. The parameter entity set refers the parameter entity lists and the entity lists refers the entity set. This is not allowed in XML.

8. B is correct. | indicates or, ? indicates zero or one, * indicates zero or more, + indicates one or more and comma indicates exactly once in that order. A says that the element a can contain either x or y but not both. C says that element a can contain any combination of x and y in any order or none of them. D says that element a can only contain x and y both in that order any number of times including zero. Only B says that the element a can contain either both of x and y or none of them, and when it contains both the order doesn't matter.

9. B is correct. CSS and XSL have nothing to do with the processing required for the above task. There are a number of advantages DOM has over SAX here. DOM parses the XML document and creates a logical representation of the information in a tree format so that our application can traverse the tree, find the relevant information and make the required changes. E.g. searching for a particular information is extremely easy in this tree structure whereas in SAX since the document is not in memory it is our responsibility to maintain data structures holding any context information we need to retain. Secondly DOM provides random access whereas in SAX we have to handle the data in the order it arrives, therefore it can be extremely difficult to provide navigation through the document. Thirdly DOM closely mirrors typical hierarchical and relational database structures. That is, the way in which the DOM represents the relationship between data elements is very similar to the way that this information is represented in modern hierarchical and relational databases. This makes it very easy to move information between a database and an XML file using the DOM.

10. D is correct. To select the value of an element we use the instruction . One thing to be noted here is that the element node is selected relative to the source node. The source node is the item matched by the template. In the code above the item matched by the template is the root node i.e. the document itself, hence we need to add two forward slashes to specify the element MyText, otherwise the processor will look for the element MyText as the root element and will return as MyText is not the root element. It is very similar to selecting a file from the subdirectory rather than the directory.

11. D is correct. xsl:attribute instruction is used to insert an attribute in the output document. In the example above only D has the correct syntax of an attribute.

12. A is correct. When the parser encounters a Fatal error, which usually means the XML, is not well formed. The parser will call the registered error handler if there is one; if not, it will throw a SAXParseException. In most cases a parser will stop after the first fatal error it finds.

13. A and C are correct. A DTD declrares all allowed elements and attributes in a valid XML file, so even though an element is declared with the contents ANY, it can contain only declared elements. The element y cannot contain the attribute xml:lang because this is not declared in the DTD.

14. B is correct. WSDL (Web Service Description Language) is the standard for how a web service is described. It is an XML-based service IDL that defines the service interface and its implementation characteristics. WSDL is referenced by UDDI (Universal Description, Discovery and Integration) entries and describes the SOAP messages that define a particular Web service.

15. C is correct. No validation can lead to serious problems while trying to manage all the data and creating tests from that, hence it is out of question. Thus A and B are incorrect. D is incorrect as DTD and Schema are two ways to represent the structure of XML documents and using Schema instead of DTD doesn't provide the flexibility we require. C is the correct answer as using a mixed content model allows flexibility in the content model such that new elements can be added without breaking the validity of previous documents. E.g. if the current DTD has the definition , we can safely add another element HisElement without breaking the validity of previous documents, i.e.
.

Questions and answers provided by Whizlabs Software. To order the full version of this exam simulation, click here.

For more CertCities.com pop quizzes, click here. To access our list of free, non-braindump practice exams from across the Web, click here.


More Pop Quiz:


There are 61 CertCities.com user Comments for “IBM Exam #141: XML and Related Technologies”
Page 1 of 7
3/21/03: ER from USA says: You need to use escape sequences to get some of the code to display properly. Question 4, 5, 8, 10, 13, for example. You can't just put the real code in an HTML page because browsers will not render it like a text editor does.
8/21/03: Anonymous says: The page does not display correct so the test is a waste.
4/13/04: Anonymous from Estonia says: Only way to see real questioins is to see source code of the current page.
5/23/05: murugharaj says: i like to subscribe for this b cos to know ther latest trend
7/18/05: Anonymous says: ass
4/27/11: Marnie from QohhlEVm says: That's the best asnwer of all time! JMHO
9/22/12: VPNÕ˺Šfrom [email protected] says: ÎÒÓÃÕâ¼Ò»¹²»´í http://www.35vpn.com/ http://www.35vpn.com/
12/28/12: backlink tool from [email protected] says: Wow! Thank you! I permanently wanted to write on my site something like that. Can I include a part of your post to my website? backlink tool http://www.gscraper.com/
1/10/13: Missy from HpHmxtqVsyspbN says: This is the ideal answer. Everyone soluhd read this
4/12/13: fxfwxhc from JnNmOQvV says: hmwxqqrf
First Page   Next Page   Last Page
Your comment about: “IBM Exam #141: XML and Related Technologies”
Name: (optional)
Location: (optional)
E-mail Address: (optional)
Comment:
   

-- advertisement (story continued below) --

top