Win a copy of Succeeding with AI 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
  • Paul Clapham
  • Ron McLeod
  • Liutauras Vilda
  • Junilu Lacar
Sheriffs:
  • Tim Cooke
  • Jeanne Boyarsky
  • Knute Snortum
Saloon Keepers:
  • Stephan van Hulst
  • Tim Moores
  • Tim Holloway
  • Carey Brown
  • Piet Souris
Bartenders:
  • salvin francis
  • fred rosenberger
  • Frits Walraven

Viktor answer for IBM 141 (question 20)

 
Ranch Hand
Posts: 118
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello Ranchers,
from Viktor page. For me, the correct shoud be a) and not c). Could someone comment this question?
Thanks,
Adrian


20. Consider the following example:
<xsd:element name="Price">
<xsd:complexType>
<xsd:attribute name="currency" type="xsd:string"/>
</xsd:complexType>
</xsd:element>
The "currency" attribute declaration is equivalent to which of the following DTD declarations?
Single Select - Please select the best answer (one and only one choice must be selected).
a) <!ATTLIST Price currency CDATA #REQUIRED>
No, no use="required"
b) <!ATTLIST Price currency CDATA #FIXED>
No, must provide value if fixed
c) <!ATTLIST Price currency CDATA #IMPLIED>
Sounds logical for the Schema example
d) <!ATTLIST Price currency PCDATA #IMPLIED>
No need for parsed data

 
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
When declaring attributes in XML Schema, if the "use" is not defined, then the attribute defaults to optional (Professional XML - page 210). So I think the correct answer is c.
 
Adrian Ferreira
Ranch Hand
Posts: 118
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Razi,
That is correct, and I was confused. For Elements the default for maxOccurs and minOccurs is 1, but for attibutes is like you have pointed.
Thanks for your reply,
Adrian
 
A wop bop a lu bob a womp bam boom. Tutti frutti ad:
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