Change URI to IRI after finding validation pattern

This commit is contained in:
2024-10-16 17:33:25 +02:00
parent b76e529ca3
commit 082e71a698
10 changed files with 41 additions and 32 deletions

View File

@@ -10,7 +10,7 @@ type Category struct {
*CommonAttributes
Content Content `xml:"content"` // undefinedContent in RFC4287
Term string `xml:"term,attr"`
Scheme URI `xml:"scheme,attr,omitempty"`
Scheme IRI `xml:"scheme,attr,omitempty"`
Label string `xml:"label,attr,omitempty"`
}
@@ -33,7 +33,7 @@ func (c *Category) Check() error {
}
if c.Scheme != "" {
if !isValidURI(c.Scheme) {
if !isValidIRI(c.Scheme) {
return fmt.Errorf("scheme attribute %v of category not correctly formatted", c.Scheme)
}
}