occurspolicy

package
v0.0.27 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 13, 2026 License: MIT Imports: 1 Imported by: 0

Documentation

Overview

Package occurspolicy validates occurrence constraints and all-group bounds.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsAllGroupChildMaxValid

func IsAllGroupChildMaxValid(maxOccurs occurs.Occurs) bool

IsAllGroupChildMaxValid reports whether an xs:all child maxOccurs is within the XSD 1.0 limit.

Types

type AllGroupIssue

type AllGroupIssue uint8

AllGroupIssue enumerates all group issue values.

const (
	AllGroupOK AllGroupIssue = iota
	AllGroupMinNotZeroOrOne
	AllGroupMaxNotOne
)

func CheckAllGroupBounds

func CheckAllGroupBounds(minOccurs, maxOccurs occurs.Occurs) AllGroupIssue

CheckAllGroupBounds validates minOccurs/maxOccurs constraints for xs:all particles.

type BoundsIssue

type BoundsIssue uint8

BoundsIssue enumerates bounds issue values.

const (
	BoundsOK BoundsIssue = iota
	BoundsOverflow
	BoundsMaxZeroWithMinNonZero
	BoundsMinGreaterThanMax
)

func CheckBounds

func CheckBounds(minOccurs, maxOccurs occurs.Occurs) BoundsIssue

CheckBounds validates general minOccurs/maxOccurs consistency.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL