About using xs:unique on xsi:type in a sequence

前端 未结 2 1920
时光取名叫无心
时光取名叫无心 2021-01-23 17:49

It is possible to have a unique constraint on an element\'s type ?

Let\'s say I have a Noah\'s Ark where Animal/@name must be unique.

Below\'s an XML that do not

2条回答
  •  -上瘾入骨i
    2021-01-23 18:08

    Thanks for your response.

    Just for fun I made an attempt with Schematron ; however I couldn't make it work since the XPath expression I find out uses "current()" which is not available in oxygen or XMLSpy, so I can't test it :(

        
        
            
            
                
                    
                        name not unique !        
                    
                 
        
    

提交回复
热议问题