Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Viktor answer for IBM 141 (question 20)

 
Adrian Ferreira
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
 
Razi Abbas
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
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic