/// <summary> /// Compile a schema document, located at an <c>XdmNode</c>. This may be a document node whose /// child is an <c>xs:schema</c> element, or it may be /// the <c>xs:schema</c> element itself. The resulting schema components are added /// to the cache. /// </summary> /// <param name="node">The document node or the outermost element node of a schema document.</param> public void Compile(XdmNode node) { if (reporter == null) { reporter = new ErrorReporter(new List <XmlProcessingError>()); } try { config.readInlineSchema((JNodeInfo)node.value, null, reporter); } catch (JSchemaException e) { throw new StaticError(e); } }
/// <summary> /// Compile a schema document, located at an XdmNode. This may be a document node whose /// child is an <c>xs:schema</c> element, or it may be /// the <c>xs:schema</c> element itself. The resulting schema components are added /// to the cache. /// </summary> /// <param name="node">The document node or the outermost element node of a schema document.</param> public void Compile(XdmNode node) { ErrorGatherer eg = null; if (errorList != null) { eg = new ErrorGatherer(errorList); } try { config.readInlineSchema((JNodeInfo)node.value, null, eg); } catch (JSchemaException e) { throw new StaticError(e); } }