|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Declaring Attirbute for an element within a sequence
I'm having trouble declaring an attribute for an element within a sequence. Does anyone know how this can be done?
Thanks! My XML Document: <?xml version="1.0" encoding="utf-8"?> <catalog xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="productJF.xsd"> <item item_no="AA10183"> <product_desc>Aquatic Pod Suite: A Hammacher Schlemmer catalog exclusive, this is the world's only aquatic pod suite that offers panoramic views simultaneously above and below the surface of the water. Circular, with a 'flying saucer' aspect, the suite rests directly on the water, the lower portion submerged approximately five feet. Perfect as a getaway at a favorite lagoon, beach, lake or river, the suite offers spectacular 300 views of the environment. Beam lights illuminate the depths for viewing the aquatic surroundings after dark. With a 150 square-foot interior, the self-contained, circular suite has all the furnishings for two people to enjoy on-the-water living. The interior has a central air conditioning system, desalination unit, mini-bar, audio-video system with Bose stereo, king-size bed, toilet and shower. Outside, a floating terrace circumscribes the unit, providing a 6.6-foot-wide surface for sun bathing or enjoying breezes off the water.</product_desc> <image>http://hammacher.com/publish/10183.asp</image> <price price_curr="US">$91,100.00</price> </item> <item item_no="AA68296"> <product_desc>Air Hockey Game with Overhead Scoring: With a detailed rink sized just right for children, this lightning-fast air hockey game builds hand-eye coordination and provides hours of non-stop, two-player competitive action. An easy-to-read electronic overhead scoreboard with digital readout keeps the game moving and interjects authentic sound effects for playing excitement. The tables built-in fan blows air upward to create the ice-fast playing surface, which is enhanced with face-off circles and sure-catch goals. The game comes with two pucks and two soft-slide LED hand paddles that light up when they hit the puck. Also includes additional manual scoring feature at each end, convenient puck return and adjustable feet for level game surface. Scoreboard can operate with 6-foot 5-inch power cord or 4 AA batteries included. Simple assembly. Plastic. Ages 6 and up. </product_desc> <image>http://www.hammacher.com/publish/68296.asp</image> <price price_curr="US">$259.95</price> </item> <item item_no="AA10326"> <product_desc>Two-Person Home Sauna: Unlike most home saunas, this unit fits into small spaces, and can be set up in a few hours without the inconvenience of extensive home remodeling. Made from kiln-dried red cedar and stainless steel hardware, the sauna is large enough to seat two people, and can be set up in a bathroom, bedroom, recreation room, garage, or an outdoor location such as a backyard or by a pool. This centuries-old Scandinavian custom helps improve circulation, relax muscles, burn calories, relieve arthritic pain, cleanse skin, and relieve stress. Like all true saunas, this model uses hot rocks to create heat. Relative humidity levels are controlled by the bather sprinkling water on the hot rocks a gentle method of heat radiation that prevents the uncomfortable electric toaster feel of electrically heated saunas. Breathable, solid wood construction ensures the interior surface temperature is kept low, while delivering penetrating heat that soothes and relaxes. Free air flow design uses natural convection to bring fresh air into the heater from below and to disperse it inside the sauna, promoting quick warm-up time and energy efficiency. Includes internal thermometer (sauna maximum temperature is 200F), and wall light. Do not place on carpeted surfaces. Some asssembly required. Plugs into a dedicated 230V-30A circuit. 84" H x 54" Diameter. (530 lbs.) (Please add $300.00 to regular shipping and handling) Please allow 4-6 weeks for delivery. Premium and Express Delivery not available. Driver will r equire customer assistance on delivery. A day time phone number is required for delivery. </product_desc> <image>http://www.hammacher.com/publish/10326.asp</image> <price price_curr="US">$2,999.95 </price> </item> </catalog> My Schema: <?xml version="1.0"?> <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"> <xsd:element name="catalog"> <xsd:complexType> <xsd:sequence> <xsd:element name="item" minOccurs="1" maxOccurs="unbounded"> <xsd:complexType> <xsd:sequence> <xsd:element name="product_desc" type="xsd:string"/> <xsd:element name="image" type="xsd:string"/> <xsd:element name="price" type="xsd:string"/> </xsd:sequence> <xsd:attribute name="item_no" type="xsd:ID"/> </xsd:complexType> <xsd:simpleType name="pricetype"> <xsd:restriction base="xsd:string"> <xsd:attribute name="price_curr"/> </xsd:restriction> </xsd:simpleType> </xsd:element> </xsd:sequence> </xsd:complexType> </xsd:element> </xsd:schema> |
![]() |
| Viewing: Dev Shed Forums > Programming Languages - More > XML Programming > Declaring Attirbute for an element within a sequence |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|