当前位置: 动力学知识库 > 问答 > 编程问答 >

Is there a way to restrict an XML attribute's string length in the Relax NG Compact syntax?

问题描述:

I have an attribute I want to restrict to a maximum length of 25 characters. The XML schema is defined in Relax NG Compact syntax. Is there a way to specify this?

网友答案:

Yep.

attribute myExample {
  xsd:string { maxLength = "25" }
}
分享给朋友:
您可能感兴趣的文章:
随机阅读: