Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


Re: [xml-dev] RE: [Summary #2] Should Subject Matter Experts Determine XML Data Implementations?

From: "Kurt Cagle" <kurt.cagle@-----.--->
To: xml-dev@-----.---.---
Date: 10/15/2008 3:35:00 AM
Roger,

I'd also agree that this is a case of inadequately determining requirements, but I'd also argue that this is one of those situations where a difference in design in the first place may have been more appropriate. Consider the original example:


<Payment>

       <Method>Paypal</Method>

       <Method>money order</Method>

       <Method>cashier's check</Method>

   </Payment>


In this particular case, the use of an alternate envelope doesn't make a lot of sense here - it makes it more difficult to write queries against it, it makes it more difficult to build interfaces around it, and so forth. To me, this is one of those cases where you'd be better of going with an attribute, especially once the model has been produced:


<Payment>


       <Method monetized="true">Paypal</Method>


       <Method monetized="false">money order</Method>


       <Method monetized="false">cashier's check</Method>


   </Payment>



and of course, you can set a default on the attribute in at least XSD, if this is getting verbose:

<Payment>


       <Method monetized="true">Paypal</Method>


       <Method>money order</Method>


       <Method>cashier's check</Method>


   </Payment>



The advantage here is that your enumerations remain simple, as an XQuery that populates a list option might illustrate

let $payment := $myObj//Payment[1]
let $selectBox := <select>
    {for $method in $payment return 

         <option value="{string($method)}" 
                     selected="{if ($method/@monetized='true') then 'selected' else ''}">{string($method)}</option>

    }
</select>

The point I'm trying to make here though is that in general, when designing a schema that's already in active use, design such that structure remains backward compatible and that properties changes that manifest are either additions to the existing scheme (with an informal agreement to deprecate the use of a given element that is no longer in use) or are attributes that determine the characteristics of the object so being modeled.


Schemas evolved, and sometimes you do have to go in and redesign from the ground up ... but this should definitely be a major version type of change with the understanding that less significant changes should augment rather than rearrange structure until such time as the schema requires major rework.


-- Kurt


On Tue, Oct 14, 2008 at 4:45 PM, Costello, Roger L. <costello@m...> wrote:



Hi Folks,



Below is an example of a business interest influencing an XML data

design.





QUESTIONS:



1. Do you agree with my example? Would you revise it in any way?



2. Can you think of another simple, compelling example of a business

interest influencing an XML data design?





EXAMPLE OF BUSINESS INTERESTS INFLUENCING XML DATA DESIGN



A SME specifies, "There are three methods of payment: Paypal, money

order, or cashier's check."



Here is an XML data design which expresses the SME's specification:



   <Payment>

       <Method>Paypal</Method>

       <Method>money order</Method>

       <Method>cashier's check</Method>

   </Payment>



Then, a business person announces, "Our business has a partnership with

Paypal. We earn money each time a customer pays using Paypal. While we

do accept the other payment methods, we earn no money with them. So, be

sure to design the data so that Paypal is accentuated and the others

are de-emphasized."



To de-emphasize the two other payment methods, the above XML data

design is modified so that they are put lower in the data hierarchy:



   <Payment>

       <Method>Paypal</Method>

       <Alternate>

           <Method>money order</Method>

           <Method>cashier's check</Method>

       </Alternate>

   </Payment>



Thus we see an example of the influence of business interests on XML

data design.



/Roger





_______________________________________________________________________



XML-DEV is a publicly archived, unmoderated list hosted by OASIS

to support XML implementation and development. To minimize

spam in the archives, you must subscribe before posting.



[Un]Subscribe/change address: http://www.oasis-open.org/mlmanage/

Or unsubscribe: xml-dev-unsubscribe@l...

subscribe: xml-dev-subscribe@l...

List archive: http://lists.xml.org/archives/xml-dev/

List Guidelines: http://www.oasis-open.org/maillists/guidelines.php





-- 
Kurt Cagle
Managing Editor, xml.com
O'Reilly
kurt@o...


transparent
Print
Mail
Like It
Disclaimer
.

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.

.
.

transparent

transparent