Technetium
Technetium

Reputation: 6158

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?

Upvotes: 1

Views: 224

Answers (1)

Technetium
Technetium

Reputation: 6158

Yep.

attribute myExample {
  xsd:string { maxLength = "25" }
}

Upvotes: 2

Related Questions