This week's book giveaway is in the Agile and Other Processes forum.
We're giving away four copies of Real-World Software Development: A Project-Driven Guide to Fundamentals in Java and have Dr. Raoul-Gabriel Urma & Richard Warburton on-line!
See this thread for details.
Win a copy of Real-World Software Development: A Project-Driven Guide to Fundamentals in Java this week in the Agile and Other Processes forum!
  • 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Bear Bibeault
  • Liutauras Vilda
  • Devaka Cooray
Sheriffs:
  • Knute Snortum
  • Junilu Lacar
  • Henry Wong
Saloon Keepers:
  • Ron McLeod
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
  • Tim Holloway
Bartenders:
  • salvin francis
  • Frits Walraven
  • Piet Souris

Qestion from ibm sample test

 
Ranch Hand
Posts: 84
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Please refer to the following question which is from the ibm sample test.
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 given answer is b whereas I am able to validate(f7) it in xml spy.
Comments please.
Sanjay
 
Leverager of our synergies
Posts: 10065
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I believe it has something to do with ambiguity problem. Should be described here: http://www.xml.com/axml/target.html#determinism
But for some reason I cannot load the whole document Sanjay, can you read it?

[This message has been edited by Mapraputa Is (edited May 16, 2001).]
 
Ranch Hand
Posts: 569
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Quote from the link shown by Map. Self explanatory. Why xmlspy validates it? don't know
<Quote>
SGML requires deterministic content models (it calls them "unambiguous"); XML processors built using SGML systems may flag non-deterministic content models as errors.
For example, the content model ((b, c) | (b, d)) is non-deterministic, because given an initial b the parser cannot know which b in the model is being matched without looking ahead to see which element follows the b. In this case, the two references to b can be collapsed into a single reference, making the model read (b, (c | d)). An initial b now clearly matches only a single name in the content model. The parser doesn't need to look ahead to see what follows; either c or d would be accepted.

<unquote>
 
Sanjay Mishra
Ranch Hand
Posts: 84
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I checked the link. It is quite useful and cleared my doubt.
Thanks Map and Menon.
Sanjay
 
Ranch Hand
Posts: 142
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It's kind of weak that's it's hard to test for. MSXML4 also allows it. Has anyone tried it with Xerces?
------------------
David Roberts - SCJP2,MCP
 
crispy bacon. crispy tiny ad:
Java file APIs (DOC, XLS, PDF, and many more)
https://products.aspose.com/total/java
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!