• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Viktor answer for IBM 141 (question 20)

 
Ranch Hand
Posts: 118
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic