Page 219 - DCAP312_WEB_TECHNOLOGIES_II
P. 219
Unit 10: Web Services
typical reader of the menu format so you apply the Principle of core content and make it an Notes
attribute. The first attempt is:
<menu>
<menu-item portion= “250 mL”>
<name>Small soft drink</name>
</menu-item>
<menu-item portion= “500 g”>
<name>Sirloin steak</name>
</menu-item>
</menu>
Following the Principle of structured information you decide not to shoehorn the portion
measurement and units into a single attribute, but instead of using an element, you opt for:
<menu>
<menu-item portion-size= “250” portion-unit= “mL”>
<name>Small soft drink</name>
</menu-item>
<menu-item portion-size= “500” portion-unit= “g”>
<name>Sirloin steak</name>
</menu-item>
</menu>
The attribute portion-unit now modifies portion-size, which as mentioned is a bad idea. An
attribute on the element menu-item should modify that element, and nothing else. The solution
is to give in and use an element:
<menu>
<menu-item>
<portion unit= “mL”>250</portion>
<name>Small soft drink</name>
</menu-item>
<menu-item>
<portion unit= “g”>500</portion>
<name>Sirloin steak</name>
</menu-item>
</menu>
This is one of those cases that are less cut and dried, and other schemes might be as suitable as
mine. The solution also involves contradicting the original decision to put the portion size into
an attribute based on the Principle of core content. This illustrates that sometimes the principles
will lead to conflicting conclusions where you will have to use your own judgment to decide
on each specific matter.
Web Services Classification
Classification of XML Appliances
Although the term XML appliance is the most general term to describe these devices, most
vendors use alternative terminologies that describe more specific functionality of these devices.
LOVELY PROFESSIONAL UNIVERSITY 213