PhoenixmlDb.XQuery

XsdSchemaProvider

implementation backed by . Provides full XSD validation, type annotations, and schema-element/attribute matching.

#XsdSchemaProvider

Namespace: PhoenixmlDb.XQuery

implementation backed by . Provides full XSD validation, type annotations, and schema-element/attribute matching.

#Constructors

##ctor

Creates an empty schema provider. Use or to load schemas.

##ctor(String[])

Creates a schema provider with one or more XSD files pre-loaded.

#Methods

#Add(String,IO.TextReader)

Loads an XSD schema from a .

#Add(String)

Loads an XSD schema from a file path.

#AddFromString(String,String)

Loads an XSD schema from an inline string.

#RememberNamespaceId(String)

Records the (NamespaceId → URI) mapping for a URI a caller has just registered with the provider. The id is computed using the same hash scheme that SchemaFeatureChecker uses, so subsequent lookups against XdmQNames built by that checker round-trip correctly. Built-in XSD/XML/XSI URIs are pre-registered and not re-hashed.

#ValidateAndAnnotate(String,PhoenixmlDb.XQuery.INodeBuilder,PhoenixmlDb.XQuery.ValidationMode,String,String)

Validates against the loaded schemas and returns a freshly built XDM tree whose elements/attributes carry TypeAnnotation values from SchemaInfo.SchemaType. Throws (XQDY0027) on validation failure.

#Fields

Name Description
_namespaceUriById Maps NamespaceId values seen in inbound XdmQName parameters back to namespace URIs. Populated as schemas are loaded (built-in XSD/XML/XSI ids registered up-front, and any arbitrary URI's hash-based id added on first encounter via ). Solves the lossy NamespaceId-from-URI hashing problem for the QName-based lookup methods — the URI-string overloads sidestep this entirely and should be preferred where possible.