Win a copy of Transfer Learning for Natural Language Processing (MEAP) this week in the Artificial Intelligence and Machine Learning 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
  • Tim Cooke
  • Paul Clapham
  • Devaka Cooray
  • Bear Bibeault
Sheriffs:
  • Junilu Lacar
  • Knute Snortum
  • Liutauras Vilda
Saloon Keepers:
  • Ron McLeod
  • Stephan van Hulst
  • Tim Moores
  • Tim Holloway
  • Piet Souris
Bartenders:
  • salvin francis
  • Carey Brown
  • Frits Walraven

correct answer

 
Ranch Hand
Posts: 97
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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>
 
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
10 digit telephone PLUS 2 "-" characters
gets a length of 12.
So the second is the correct one.
Cheers
 
Ranch Hand
Posts: 58
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Ranch Hand
Posts: 1953
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The third one is wrong because xsd:integer does not has a facet length.
 
Rancher
Posts: 1449
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Plus the integer probably wouldn't like the dashes.
Looks like #2 to me.
 
mary morris
Ranch Hand
Posts: 97
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yeh, Thanks guys
 
Do you want ants? Because that's how you get ants. And a tiny ads:
Two software engineers solve most of the world's problems in one K&R sized book
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
    Bookmark Topic Watch Topic
  • New Topic