Class CMXSDContentModelProvider

java.lang.Object
org.eclipse.lemminx.extensions.xsd.contentmodel.CMXSDContentModelProvider
All Implemented Interfaces:
ContentModelProvider

public class CMXSDContentModelProvider extends Object implements ContentModelProvider
XSD content model provider.
  • Field Details

  • Constructor Details

  • Method Details

    • adaptFor

      public boolean adaptFor(DOMDocument document, boolean internal)
      Description copied from interface: ContentModelProvider
      Returns the content model provider by using standard association (xsi:schemaLocation, xsi:noNamespaceSchemaLocation, doctype) and null otherwise.
      Specified by:
      adaptFor in interface ContentModelProvider
      Parameters:
      document - the DOM document.
      internal - true if it is an internal content model (ex : DOCCTYPE subset) and false otherwise.
      Returns:
      the content model provider by using standard association (xsi:schemaLocation, xsi:noNamespaceSchemaLocation, doctype) and null otherwise.
    • adaptFor

      public boolean adaptFor(String uri)
      Description copied from interface: ContentModelProvider
      Returns true if the given resource uri can be adapted for this content model and false otherwise. o@param uri the resource Uri.
      Specified by:
      adaptFor in interface ContentModelProvider
      Returns:
      true if the given resource uri can be adapted for this content model and false otherwise.
    • getIdentifiers

      public Collection<ContentModelProvider.Identifier> getIdentifiers(DOMDocument xmlDocument, String namespaceURI)
      Description copied from interface: ContentModelProvider
      Returns the identifiers list from the given document and namespace.
      Specified by:
      getIdentifiers in interface ContentModelProvider
      Parameters:
      xmlDocument - the DOM document.
      namespaceURI - the namespace.
      Returns:
      the identifiers list from the given document and namespace.
    • createCMDocument

      public CMDocument createCMDocument(String key, boolean resolveExternalEntities)
      Description copied from interface: ContentModelProvider
      Create content model document (XSD, DTD, etc) from the given resource key and null otherwise.
      Specified by:
      createCMDocument in interface ContentModelProvider
      Parameters:
      key - the resource key.
      resolveExternalEntities - true if external entities can be resolved and false otherwise.
      Returns:
      the content model document (XSD, DTD, etc) from the given resource key and null otherwise.
    • createInternalCMDocument

      public CMDocument createInternalCMDocument(DOMDocument xmlDocument, boolean resolveExternalEntities)
      Description copied from interface: ContentModelProvider
      Create the internal content model (for DOCTYPE subset) from the given DOM document.
      Specified by:
      createInternalCMDocument in interface ContentModelProvider
      Parameters:
      xmlDocument - the DOM document.
      resolveExternalEntities - true if external entities can be resolved and false otherwise.
      Returns:
      the internal content model (for DOCTYPE subset) from the given DOM document.
    • getLoader

      public org.apache.xerces.impl.xs.XSLoaderImpl getLoader()