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 correct answer Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Certification » Product and Other Certifications
Bookmark "correct answer " Watch "correct answer " New topic
Author

correct answer

mary morris
Ranch Hand

Joined: Mar 16, 2002
Posts: 97
These examples are from witscale.
There seems to be a little bug - in that on the output it says I got it wrong but doesn't give answer or explanation. I thought the first one was correct.
XML Schema documents needs to define new data type to hold 10 digit telephone
number. It is required that the telephone number should be able to hold '-' as the
separators.
<xsd:simpleType name="TelephoneNumber">
<xsd:restriction base="xsd:string">
<xsd:length value="10>
<xsd attern value="\d{3}-\d{3}-\d{4}"/>
</xsd:restriction>
</xsd:simpleType>
<xsd:simpleType name="TelephoneNumber">
<xsd:restriction base="xsd:string">
<xsd:length value="12>
<xsd attern value="\d{3}-\d{3}-\d{4}"/>
</xsd:restriction>
</xsd:simpleType>
<xsd:simpleType name="TelephoneNumber">
<xsd:restriction base="xsd:integer">
<xsd:length value="12>
<xsd attern value="\d{3}-\d{3}-\d{4}"/>
</xsd:restriction>
</xsd:simpleType>
Kenneth Tsuei
Greenhorn

Joined: Jan 26, 2003
Posts: 9
10 digit telephone PLUS 2 "-" characters
gets a length of 12.
So the second is the correct one.
Cheers


-----------------------------------<br />-- Learning is a never-ending story: the more u learn, the less u found u've known
Vivek Saxena
Ranch Hand

Joined: Apr 24, 2002
Posts: 58
I would say '2nd' is correct answer.
10 (data type to hold 10 digit telephone
number) + 2( to hold '-' as the separators) = 12

Please feel free to correct me.
Thanks
Roseanne Zhang
Ranch Hand

Joined: Nov 14, 2000
Posts: 1953
The third one is wrong because xsd:integer does not has a facet length.
John Wetherbie
Rancher

Joined: Apr 05, 2000
Posts: 1449
Plus the integer probably wouldn't like the dashes.
Looks like #2 to me.


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

Joined: Mar 16, 2002
Posts: 97
Yeh, Thanks guys
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: correct answer