[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] RE: Modeling question: node structure
Title: RE: Modeling question: node structure I have modelled your situation like this before, though I am still reliant on some processing within the application to ensure that the levels are controlled correctly. At least you do get a true hierarchy without duplication. Hope it is of use. Jon <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" attributeFormDefault="unqualified"> <xs:element name="MerchandiseManagementGroup" type="MerchandisingGroupType"/>
-----Original Message-----
Is there a "standard" way for modeling a node structure that can be constrained up to a specific depth whereby all nodes are the same type? For example, the concept is a dimension which could be any hierarchical concept such as geography, or product, and is constrained to a maximum depth of 15. In addition, the number of dimensions is constrained to a maximum of 50. One approach to the metadata definition for geography is straightforward since I can define a dimension generically such that: <xs:element name="Dimension">
Note that the hierarchy can be defined using either a sequence number attribute of by assuming that the sequence itself defines the hierarchy. The problem with this implementation is the duplication of element data and there will be thousands of "rows". <GEOGRAPHY>
What I would like is a more generic way for defining dimensions such that I can model the hierarchy and avoid duplication. <GEOGRAPHY>
Since the maximum node depth is known I also took the following approach but it seems like there has to be a better way. <xs:element name="DimensionData">
<xs:complexType>
<xs:sequence>
<xs:complexType>
Is the answer to use the anyType or something else? Thanks in advance. Paul ************************************************************************ DISCLAIMER The information contained in this e-mail is confidential and is intended for the recipient only. If you have received it in error, please notify us immediately by reply e-mail and then delete it from your system. Please do not copy it or use it for any other purposes, or disclose the content of the e-mail to any other person or store or copy the information in any medium. The views contained in this e-mail are those of the author and not necessarily those of Admenta UK Group. ************************************************************************
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|