What is an xs:NCName type and when should it be used?

后端 未结 4 1852
萌比男神i
萌比男神i 2020-12-02 16:32

I ran one of my xml files through a schema generator and everything generated was what was expected, with the exception of one node:



        
4条回答
  •  一个人的身影
    2020-12-02 16:51

    http://books.xmlschemata.org/relaxng/ch19-77215.html

    No spaces or colons. Allows "_" and "-".

    You would use this instead of string so that you can validate that the value is limited to what is allowed. It maps well to certain conventions for name/identifier like django's concept of "slug", for instance.

    I upvote the person who [\i-[:]][\c-[:]]* translates into English for us.

提交回复
热议问题