XSD key/keyref beginner question

前端 未结 2 1971
灰色年华
灰色年华 2021-01-11 21:27

I\'m trying to implement a very simple XML schema constraint.

The idref attribute on elements of type should only be

2条回答
  •  生来不讨喜
    2021-01-11 21:59

    Even with an assigned schema location this will not work in all parsers.

    
    
        
        
         
         
    
    

    This will validate as well, because the key is not referencing the target namespace.

    Changes that need to be made in the XSD are

    
    

    And

    
        
        
    
    
    
        
        
    
    

    For a discussion regarding this behaviour see #1545101

提交回复
热议问题