linkedin-skill-assessments-quizzes

XML

Q1. You are working with this XML code snippet from the XML document cars.xml. You need to return the information about the cars built after the year 2000. What does your XQuery look like?

<cars>
    <car><make>Cadillac</make><model>Escalade</model><year>2007</year></car>
    <car><make>Cadillac</make><model>Escalade</model><year>2011</year></car>
    <car><make>Ford</make><model>Mustang</model><year>1968</year></car>
    <car><make>Ford</make><model>Mustang</model><year>1998</year></car>
    <car><make>Mercedes</make><model>C-Class</model><year>1999</year></car>
    <car><make>Mercedes</make><model>C-Class</model><year>2009</year></car>
</cars>

Q2. You are working with the following XSD fragment. What does it say about the <car> element?

<xs:element name="car">
    <xs:complexType>
        <xs:sequence>
            <xs:element name="make" type="xs:string"/>
            <xs:element name="model" type="xs:string"/>
            <xs:element name="year" type="xs:string"/>
        </xs:sequence>
        <xs:anyAttribute/>
    </xs:complexType>
</xs:element>

Q3. You are converting your HTML file into XHTML Strict. Which code snippet will validate without errors?

<html xmlns="http://www.w3.org/1999/xhtml">
    <head><title>XHTML Example</title></head>
    <body bgcolor="#FFFFFF" >
        <p>Content goes here ...</p>
    </body>
</html>
<html xmlns="http://www.w3.org/1999/xhtml">
    <head><title>XHTML Example</title></head>
    <body name="bodySection">
        <p><b>Content goes here ...</b></p>
    </body>
</html>
<html xmlns="http://www.w3.org/1999/xhtml">
    <head><title>XHTML Example</title></head>
    <body color="#333333">
        <p><i>Content goes here ...</i></p>
    </body>
</html>
<html xmlns="http://www.w3.org/1999/xhtml">
    <head><title>XHTML Example</title></head>
    <body id="bodySelection">
        <p><strong>Content goes here ...</strong></p>
    </body>
</html>

Q4. When working with Ajax applications, which is faster, XML or JSON?

Q5. Asynchronous Javascript and XML (Ajax) is technique for creating better, faster, and more interactive web applications. In addition to JavaScript and XML on the back end, which technologies are commonly used to craft AJAX experiences on the front end?

Q6. What is this code an example of?

<x/>

Q7. Which XHTML syntax rule does NOT apply to XML?

Q8. Which Ajax method is used to exchange data with a server, using a modern browser?

Q9. A markup language is a _-readable language that _ text so that the computer can _ that text.

Q10. What is this code an example of?

<x a="x" a="y"></x>

Q11. XML provides a framework for specifying markup languages, while HTML is a predefined markup language. What is applicable to XML and not HTML?

Q12. What is the last step in extending XHTML modules?

Q13. In an XML DTD ATTLIST declaration, which default value is used to indicate that the attribute does not have to be included?

Q14. How does the XML DOM present an XML document?

Q15. You are working with an XML document that uses an XML schema. How do you specify that an element can appear multiple times inside its parent element?

Q16. The <xsl:with-param> element defines the value of a parameter to be passed into a template. It can be used within which elements?

Q17. You are checking someone else’s XML document for errors. You notice that the prolog does not have a closing tag. What do you do?

Q18. Which statement is not true about XML?

Q19. In an XML DTD ATTLIST declaration, which tokenized attribute type is used to specify multiple ID values?

Q20. You want to convert a large XML file into CSV format. You did not create the XML file, so you are not familiar with all of the syntax. What will help you get the best insight into the file contents?

Q21. In an XML DTD, attributes are declared with an ATTLIST declaration. You need to validate the color attribute for element <car> against a fixed list of values. Which is the correct declaration?

Q22. The main ways to control the display of XML documents are with Cascading Style Sheets (CSS) and Extensible Styles Language (XSL). What is an advantage of CSS over XSL?

Q23. Which type of DTD declaration is this code an example of? <!DOCTYPE abc SYSTEM "file/file.dtd">

Q24. The purpose of an XML schema is to define the building blocks of an XML document. Which option best describes the building blocks of an XML document?

reference link:

Q25. An XHTML document type definition (DTD) describes the allowed syntax and grammar of XHTML markup. Which is not one of the formal DTDs used in XHTML 1.0?

Q26. You are working with the following XML code snippet. You have this line in your XSLT code xsl:value-of-select="//car/make"/>. What does it display?

<cars>
    <car>
        <make>Cadillac
            <model>Escalade</model>
            <price year="2007">$20,000</price>
        </make>
    </car>
</cars>

Q27. You need to display the list of cars in the code snippet below in a column format, with a counter column for each row. Which XPath function do you use for the counter?

<cars>
    <car><make>Cadillac</make> <model>Escalade</model> <year>2007</year></car>
    <car><make>Ford</make> <model>Mustang</model> <year>1968</year></car>
    <car><make>Mercedes</make> <model>C-Class</model> <year>1999</year></car>
</cars>

reference link:

Q28. You are working with this XML code snippet from the XML document cars.xml. You need to return the information about the cars built after the year 2000, as an ordered list, starting with the most recent. What does your XQuery look like?

<cars>
    <car><make>Cadillac</make> <model>Escalade</model ><year>2007</year></car>
    <car><make>Cadillac</make> <model>Escalade</model> <year>2011</year></car>
    <car><make>Ford</make> <model>Mustang</model> <year>1968</year></car>
    <car><make>Ford</make> <model>Mustang</model> <year>1998</year></car>
    <car><make>Mercedes</make> <model>C-Class</model> <year>1999</year></car>
    <car><make>Mercedes</make> <model>C-Class</model> <year>2009</year></car>
</cars>
<ul>
{
    for $x in doc("cars.xml")/cars/car
    where $x/year>2000
    order by $x/year descending
    return <li>{$x}</li>
}
</ul>
<ol>
{
    for $x in doc("cars.xml")/cars/car
    where $x/year>2000
    order by $x/year desc
    return <li>{data($x)}</li>
}
</ol>
<ul>
{
    for $x in doc("cars.xml")/cars/car
    where $x/year>2000
    order by $x/year
    return <li>{$x}</li>
}
</ul>
<ol>
{
    for $x in doc("cars.xml")/cars/car
    where $x/year>2000
    order by $x/year descending
    return <li>{data($x)}</li>
}
</ol>

reference link:

Q29. The readyState property holds the status of the XMLHttpRequest. Which is NOT a valid status?

reference link:

Q30. You are working with an XML document that uses an XML schema. How can you extend the document with elements NOT specified by the schema?

reference link:

Q31. You are working with the following XML code snippet. Which XPath expression produces C-Class?

<cars>
    <car><make>Cadillac</make><model>Escalade</model>
        <price year="2007">20000</price></car>
    <car><make>Ford</make><model>Mustang</model>
        <price year="2008">17000</price></car>
    <car><make>Mercedes</make><model>C-Class</model>
        <price year="2009">24000</price></car>
</cars>

Q32. You are working with an XML document that uses an XML schema. How do you ensure that an attribute must be specified for its corresponding element?

Q33. You are working with the following XML code snippet. What do you need to include in your XSLT code to display Mercedes, Cadillac, Ford?

<cars>
    <car><make>Cadillac</make><model>Escalade</model>
        <price year="2007">20000</price></car>
    <car><make>Ford</make><model>Mustang</model>
        <price year="2008">17000</price></car>
    <car><make>Mercedes</make><model>C-Class</model>
        <price year="2009">24000</price></car>
</cars>

Q34. What is the correct syntax for comments in XQuery?

Q35. Which DOM node type may NOT have the EntityReference node type as one of its child nodes?

reference link:

Q36. XHTML modules can be extended by adding elements, attributes, modifying content models, or some combination of these. What does a proper implementation of an XHTML module require?

Q37. The <xsl:namespace-alias> element is used to replace a namespace in the style sheet with a different namespace in the output. Which XSLT element needs to be its parent node?

reference link:

Q38. XML is a markup language, not a programming language. What makes XML not qualify to be a programming language?