UBL Naming and Design Rules SC

RE: [ubl-ndrsc] Rule: 115 and 116 Containers

  • 1.  RE: [ubl-ndrsc] Rule: 115 and 116 Containers

    Posted 07-17-2003 23:06
    Your counterexample, Eduardo, is double-bogus since in the first place your
    two docs carry different content, and in the second, your second doc won't
    validate under any scheme I've heard proposed in UBL, since the (repeated)
    Fruit elements have elements stuck between 'em.
    
    Would this pair have made my example stronger:
    
    <?xml version="1.0" encoding="UTF-8"?>
     <Groceries>
    	<SuperfluousFruitContainer>
    		<Fruit>Apple</Fruit>
    		<Fruit>Orange</Fruit>
    		<Fruit>Banana</Fruit>
    	</SuperfluousFruitContainer>
          <SuperfluousVegetableContainer>
                <Vegetable>Celery</Vegetable>
                <Vegetable>Lettuce</Vegetable>
          </SuperfluousVegetableContainer>
     </Groceries>
    
    <?xml version="1.0" encoding="UTF-8"?>
     <Groceries>
    	<Fruit>Apple</Fruit>
    	<Fruit>Orange</Fruit>
    	<Fruit>Banana</Fruit>
          <Vegetable>Celery</Vegetable>
          <Vegetable>Lettuce</Vegetable>
     </Groceries>
    
    All my previous arguments hold equally for these two as well.
    
    And you may be right -- that the first stylesheet could be cut in half.  And
    I suspect that if you found such a transformation, you could pretty much
    apply it to the second stylesheet and cut it in half too.  There just isn't
    much difference between the two approaches when it comes to XSLT.