File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Product and Other Certifications and the fly likes Need help with some sample questions... Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Certification » Product and Other Certifications
Bookmark "Need help with some sample questions..." Watch "Need help with some sample questions..." New topic
Author

Need help with some sample questions...

Neetha Kasuganti
Greenhorn

Joined: Oct 15, 2001
Posts: 24
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


Neetha<br />IBM certified developer - XML and related technologies<br />SCJP2
John Wetherbie
Rancher

Joined: Apr 05, 2000
Posts: 1441
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


The only reason for time is so that everything doesn't happen all at once.
- Buckaroo Banzai
Shashank Tanksali
Ranch Hand

Joined: Feb 21, 2001
Posts: 122
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 ]

<b><br /><a href="http://mailto:tanksali@hotmail.com" target="_blank" rel="nofollow">Shashank Tanksali</a><br /><i><br />SCJP2,SCJD2,SCWCD<br />IBM Certified Developer - XML and Related Technologies<br />PMI Certified Project Management Professional<br /></i><br /></b>
Rakesh Gudur
Ranch Hand

Joined: Apr 29, 2002
Posts: 79
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.
Dmitry Kachaev
Greenhorn

Joined: Feb 05, 2002
Posts: 5
>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 ]

best wishes <br />Dmitry Kachaev<p>MCP, MCP+I, MCSE, MCSD<br />Sun Certified Programmer for Java 2 Platform<br />IBM Certified Developer - XML and Related Technologies<br />Brainbench Master XML, Master XSLT (World Top)
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Need help with some sample questions...
 
Similar Threads
Qestion from ibm sample test
DTD
DTD question
IBM practice test question 16
content model question