entFormDefault=\"qualified\"> <!-- root element --> <xsd:element name=\"toolCata
ID: 3814488 • Letter: E
Question
entFormDefault="qualified">
<!-- root element -->
<xsd:element name="toolCatalog">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="toolPackage" type="toolPackageT" minOccurs="1" maxOccurs="unbounded"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:complexType name="toolPackageT">
<xsd:sequence>
<!-- type of tool, like spanners -->
<xsd:element name="type" type="xsd:string"/>
<!-- URL of picture of item -->
<xsd:element name="picLocation" type="xsd:anyURI"/>
<!-- weight of one package in ounces -->
<xsd:element name="weight">
<xsd:simpleType>
<xsd:restriction base="xsd:decimal">
<xsd:minInclusive value="1.0"/>
<xsd:maxInclusive value="160.0"/>
<xsd:fractionDigits value="1"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
<!-- price of one package in dollars and cents -->
<xsd:element name="price">
<xsd:simpleType>
<xsd:restriction base="xsd:decimal">
<xsd:minInclusive value="1.0"/>
<xsd:maxInclusive value="100.0"/>
<xsd:fractionDigits value="2"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
</xsd:sequence>
</xsd:complexType>
</xsd:schema>
Question-Read the schema to find out what XML elements are expected and what they contain. (Hint: The comments are your friend. If you've forgotten what the URLs for the tool pictures look like, they are lab 2.
Write an XML file containing information for at least three types of tools.
Example given below
Tools-Saw,Spanner,Hoe
Explanation / Answer
<?xml version="1.0" encoding="utf-8"?>
<toolCatalog xmlns="http://weblab.kennesaw.edu/toolSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://weblab.kennesaw.edu/toolSchema
http://weblab.kennesaw.edu/toolschema.xsd">
<toolPackage>
<!-- put the XML for the first kind of tool package here -->
<type>Saw</type>
<picLocation>http://weblab.kennesaw.edu/tools/saw.jpg</picLocation>
<weight>140.1</weight>
<price>99.02</price>
</toolPackage>
<toolPackage>
<!-- You need at least two more toolPackage elements with contents -->
<type>Spanner</type>
<picLocation>https://www.google.com/</picLocation>
<weight>129.1</weight>
<price>93.02</price>
</toolPackage>
<toolPackage>
<!-- You need at least two more toolPackage elements with contents -->
<type>Hoe</type>
<picLocation>https://www.hp.com/</picLocation>
<weight>121.1</weight>
<price>87.03</price>
</toolPackage>
</toolCatalog>
If want any specific uri for picLocation please let me know .
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.