XML I10-001 Exam - Topic 7 Question 118 Discussion
Select which of the following correctly presents a combination of an XML Schema restriction and a related definition. Assume the Schema namespace prefix is "xs".
A) When placing the following restriction, the TotalPrice element may have a value of 125. 55, but may not have a value of 170.
<xs:simpleType name='PriceType'>
<xs:restriction base='xs:float'>
<xs:minExclusive value='100' />
<xs:maxExclusive value='150' />
</xs:restriction>
</xs:simpleType>
<xs:element name='TotalPrice' type='PriceType'/> and C) When placing the following restriction, the ProductCode element may have a value of 'PFG-TF3/SP', but may not have a value of 'PFG-TF3'.
<xs:simpleType name='ProductType'>
<xs:restriction base='xs:string'>
<xs:enumeration value='PFG-SRX' />
<xs:enumeration value='PFG-V507' />
<xs:enumeration value='PFG-TF3/SP' />
</xs:restriction>
</xs:simpleType>
<xs:element name='ProductCode' type='ProductType'/>
B) When placing the following restriction, the TotalPrice element may have a value of 15000. 127.
<xs:simpleType name='PriceType'>
<xs:restriction base='xs:decimal'>
<xs:fractionDigits value='2' />
</xs:restriction>
</xs:simpleType>
<xs:element name='TotalPrice' type='PriceType'/>
D) When placing the following restriction, the ProductCode element may have a value of 'PFG-TF3/SP', but may not have a value of 'PFG-TF3'.
<xs:simpleType name='ProductType'>
<xs:restriction base='xs:string'>
<xs:minLength value='7' />
</xs:restriction>
</xs:simpleType>
<xs:element name='ProductCode' type='ProductType'/>W Courier Newlr Z
Currently there are no comments in this discussion, be the first to comment!