• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Need help with some sample questions...

 
Greenhorn
Posts: 24
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
16. Which one of the following XML content models is NOT allowed?
A. <!element Customer (Name, Ship-to-address?, Bill-to-address?)>
B. <!element Customer ((Name, Ship-to-address) | (Name, Bill-to-address))>
C. <!element Customer (Name, (Ship-to-address | Bill-to-address)?)>
D. <!element Customer (Name, (Ship-to-address, Bill-to-address)?)>
The answer is B. Someone please explain why it is B?
9. Which of the following is LEAST useful in identifying structural relationships in documents?
A. Font size and style
B. Indentation
C. Contentv
D. Numbering
Can anyone tell what contentv is?
Thanks
 
Rancher
Posts: 1449
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I believe the answer is B because Name appears on both sides of the or (|). DOn't think this is allowed.
Not sure what contentv is either. Maybe it was a typo?
John
 
Ranch Hand
Posts: 122
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
All the content models are wrong !!!
element has to be ELEMENT in the model.
I am not sure if the question is from Whiz.
Like this there are a lot of other errors and typos in the Whiz tool.
Even assuming that element is actually ELEMENT, B is a valid model. I even verified this with xerces.
For example in XML Whiz,
Which of the following is a protocol for initiating conversations with UDDI service...
The answer given is SOAP and the explanation is
SOAP (Simple Object Access Protocol) is a protocol for initiating conversations with a UDDI service.
The above explanation is wrong. SOAP is NOT a protocol. SOAP can be used with any protocol like http or smtp and is itself not a protocol.

Another answer which is wrong is
How many elements will be output when the following XSL sheet is applied to the following XML document?
--------------------XSL Document-------------------------
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:template match="/">
<xsl:element name='Root'>
<xsl:call-template name="v3"/>
</xsl:element>
</xsl:template>
<xsl:template name="v3">
<xsl:variable name="v3List" select="//a[not(following::x=.)]|//x[not(preceding::a=.)] "/>
<xsl:for-each select="$v3List">
<a><xsl:value-of select="."/></a>
</xsl:for-each>
</xsl:template>
</xsl:stylesheet>
--------------------XML Document-------------------------
<Root>
<B>
<a>1</a>
<a>2</a>
<a>1</a>
<x>3</x>
<x>4</x>
<x>2</x>

</B>
<B>
<a>3</a>
<a>1</a>
<a>2</a>
<a>3</a>
<x>5</x>
<x>4</x>
<x>1</x>
</B>
</Root>

(A) 7
(B) 8
(C) 3
(D) 5
(E) error

The given answer is 7, but the correct answer is 8.
The question just asks about the number of elements output, not just <a> elements. That means that the <Root> element must be included.
Somehow the Whiz guys assumed that the question referred only to number of <a> elements
I would frankly avoid using any test simulators, which are neither tested for correctness nor accuracy.
Also the Whiz tool has questions where you will find questions like the one below where entity and ENTITY mean the same

<!entity % set "elements | attributes | %lists;">
<!entity % lists "entities | processing_instructions | %set;">
Good luck,
Shashank
[ April 20, 2002: Message edited by: Shashank Tanksali ]
 
Ranch Hand
Posts: 79
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Neetha,
The correct answer is B. Because <Name> can have either Ship-to-address or Bill-to-address. So, Name is a root element and it can't be repeated in the DTD. It is against the DTD syntax.
And regarding your second Q, I think it could be a typo. It should be content.
Rakesh.
 
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
>16. Which one of the following XML content >models is NOT allowed?
>B. <!element Customer ((Name, Ship-to-address) | (Name, Bill-to-address))>
>The answer is B. Someone please explain why it is B?
Because it's non deterministic content model (ambiguous) look at http://www.w3.org/TR/2000/REC-xml-20001006#determinism
>9. Which of the following is LEAST useful in identifying structural relationships in documents?
>A. Font size and style
>B. Indentation
>C. Contentv
>D. Numbering
>Can anyone tell what contentv is?
"contentv" is for "content", i think it just mistyping. So, BTW, right answer is A. because, Indentation and Numbering "always" set structural relationship. Font size and style is just mark up for rendering, and may haven't any sense.
[ April 30, 2002: Message edited by: Dmitry Kachaev ]
[ April 30, 2002: Message edited by: Dmitry Kachaev ]
[ April 30, 2002: Message edited by: Dmitry Kachaev ]
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic