Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var BaseDatatypes []byte
BaseDatatypes is the XML Schema definition from https://www.w3.org/2001/XMLSchema.xsd
Functions ¶
func GetTargetNamespace ¶
GetTargetNamespace gets the target namespace from the schema document
func InheritNamespaces ¶
InheritNamespaces adds namespace prefixes to the schema if they are missing traversing up the parent nodes until the root
func SplitQName ¶
SplitQName splits a qualified name into namespace and local part
Types ¶
type Schema ¶
type Schema struct {
TargetNamespace string
// FilePath is the local path of the schema
FilePath string
}
Schema represents an XSD schema
type SchemaSystem ¶
type SchemaSystem interface {
// GetSchemas returns a map of schema URLs to schema metadata
GetSchemas() map[string]Schema
// GetSchemasWithTargetNamespace returns a slice of schemas with the given target namespace
GetSchemasWithTargetNamespace(targetNamespace string) []Schema
// ResolveElement resolves an element by QName
ResolveElement(qname string) (*xml.Name, error)
// ResolveType resolves a type by QName
ResolveType(qname string) (*xml.Name, error)
// ImportSchema imports a schema into the schema system
ImportSchema(wsdlDir string, uniqueSchemaFilename string, schemaContent []byte) error
}
SchemaSystem is an interface for resolving schema elements and types
func ExtractSchemas ¶
func ExtractSchemas(wsdlPath string, wsdlDoc *xmlquery.Node) (SchemaSystem, error)
ExtractSchemas extracts schemas from a WSDL document and returns a schema system
Click to show internal directories.
Click to hide internal directories.