Middle way between XSD all and XSD sequence

后端 未结 7 1925
故里飘歌
故里飘歌 2020-11-30 05:03

I\'m defining a user element with XSD. For this example, a user has a name, email and one or more nationalities. I\'ve tried:


  

        
7条回答
  •  一向
    一向 (楼主)
    2020-11-30 05:20

    I think what you're looking for would go against the intent of XML. It would seems strange to have a valid XML fragment like this:

    
      
      
      
      
      
    
    

    It sounds like you're asking for something like what marc_s proposed:

    
      
      
      
      
      
    
    

    which needs to get pushed into:

    
      
      
      
         
         
         
      
    
    

提交回复
热议问题