XSD: how to restrict number of characters in string type attribute?

后端 未结 5 1913
别跟我提以往
别跟我提以往 2020-12-08 07:08

I have a question regarding adding restriction in my xml schema(xsd). I have a complex-type like:


   

        
5条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2020-12-08 07:26

    The answer by marc_s would require you to define a new type for every possible string length you might use. Instead you can define the restriction directly on the attribute itself.

      
        
          
            
              
            
          
        
      
    

提交回复
热议问题