schema

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Sep 15, 2026 License: Unlicense Imports: 6 Imported by: 0

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