Is there a way to restrict an XML attribute's string length in the Relax NG Compact syntax?
-
01-07-2021 - |
Question
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?
Solution
Yep.
attribute myExample {
xsd:string { maxLength = "25" }
}
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow