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
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>
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:firstname.lastname@example.org" 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>
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.
>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’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link: http://aspose.com