Skip to content

XMLSchema

do- edited this page May 14, 2022 · 7 revisions

XMLSchema is a class representing a set of XML Schema objects belonging to a single target namespace.

Unlike XMLSchemata, it's an internal class not intended for direct use in application code.

Basically, it'a Map of names to plain objects representing simple/complex types and so on. Those objects are produced by XMLNode's detach method and then completed with the targetNamespace field, e. g.:

{
  localName: 'complexType',
  namespaceURI: 'http://www.w3.org/2001/XMLSchema',
  attributes: { name: 'AttachmentType' },
  children: [
    {
      localName: 'sequence',
      namespaceURI: 'http://www.w3.org/2001/XMLSchema',
      attributes: {},
      children: [/*...*/],
      targetNamespace: 'urn:dom.gosuslugi.ru/debt-responses/1.0.0'
    }
  ],
  targetNamespace: 'urn:dom.gosuslugi.ru/debt-responses/1.0.0'
}