schema

package
v0.0.9 Latest Latest
Warning

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

Go to latest
Published: Sep 10, 2026 License: Unlicense Imports: 6 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package schema 提供内置 OFD XSD 模式的加载和查询能力。

Index

Constants

This section is empty.

Variables

View Source
var Files embed.FS

Files 保存校验器使用的 OFD XSD 集合。文件名和相对路径保持不变, 因为这些模式文件通过 xs:include 相互引用。

Functions

This section is empty.

Types

type Set

type Set struct {
	// contains filtered or unexported fields
}

Set 是按根元素索引的已编译模式集合。

func Default

func Default() (*Set, error)

Default 返回内置且已编译的 OFD 模式。由于 xsd.Schema 加载后不可变且可安全共享, 因此只编译一次。

func (*Set) Schema

func (s *Set) Schema(root string) (*xsd.Schema, bool)

Schema 返回指定 OFD XML 根元素对应的模式。

Jump to

Keyboard shortcuts

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