Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


Re: Need how-to help...

From: "nontoxic" <nontoxic_m@---.-->
To: NULL
Date: 8/1/2006 7:55:00 AM

Hello Mark,

> <items>
>    <item>
>        <PlantNo>1001</PlantNo>
>        <ItemID>xx123</ItemID>
>    </item>
>    <item><PlantNo>1001</PlantNo><ItemID>xy132</ItemID></Item>
>    <item><PlantNo>1012</PlantNo><ItemID>xz321</ItemID></Item>
>    ...
> </items>
> <things>
>    <thing>
>        <PlantNo>1001</PlantNo>
>        <thingID>123</thingID>
>    </thing>
>    <thing><PlantNo>1001</PlantNo><thingID>234</thingID></thing>
>    <thing><PlantNo>1001</PlantNo><thingID>345</thingID></thing>
>    <thing><PlantNo>1001</PlantNo><thingID>456</thingID></thing>
>    <thing><PlantNo>1012</PlantNo><thingID>233</thingID></thing>
>    <thing><PlantNo>1012</PlantNo><thingID>334</thingID></thing>
>    ...
> </things>

in my opinion there are two problems with that structure:
1) You have to do a kind of mixed stepping through your structure. Because 
you want to have displayed
PLANT 1001 Items: xx123, xy132 Things: 123, 234, 345, 456
you first need to step through the item nodes and than step through the 
thing nodes while finding the appropriate PlantNo. This seems quite 
difficult.
2) You said the rule is that PlantNos are identical for things and items. 
But I think that this may not be REALLY guaranteed. So if there is some 
PlantNo missing either in the items or in the things node because of any 
reason, you would get a totally false and mixed display of items and things 
that don't belong together or wrong assignments of items/things to a plant.

As a whole I suggest to use another structure, which is much more easier to 
be stepped through.
It looks like as follows:

<plant no="1001">
 <items>
  <item id="xx123"></item>
  <item id="xy132"></item>
 </items>
 <things>
  <thing id="123"></thing>
  <thing id="234"></thing>
  <thing id="345"></thing>
  <thing id="456"></thing>
 </things>
</plant>
<plant no="1012">
 <items>
  <item id="xz321"></item>
 </items>
 <things>
  <thing id="233"></thing>
  <thing id="334"></thing>
 </things>
</plant>

The question is, if your application can supply you with that structure 
alternatively. In that structure each PlantNo only exist once so that any 
mixtures of inappropriate items and things and wrong assignments of 
items/things to a plant is impossible. Here you can step through each plant 
one after another and first list all items and second all things.

Hope this helps you.

Nice greetings from
nontoxic




transparent
Print
Mail
Digg
delicious
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