Skip Headers

Oracle® XML API Reference 10g Release 1 (10.1) Part No. B10789-01 |
| Contents

## DOMImplRef Interface

Table 15-7 summarizes the methods of available through `DOMImplRef` interface.

Table 15-7 Summary of DOMImplRef Methods; Dom Package

Function | Summary
--- | ---
DOMImplRef | Constructor.
createDocument | Create document reference.
createDocumentType | Create DTD reference.
getImplementation | Get `DOMImplementation` object associated with the document.
getNoMod | Get the 'no modification allowed' flag value.
hasFeature | Determine if DOM feature is implemented.
setContext | Set another context to a node.
~DOMImplRef | Public default destructor.

### DOMImplRef

Class constructor.

Syntax | Description
--- | ---
    DOMImplRef(
       Context* ctx_ptr,
       DOMImplementation< Node>* impl_ptr);
| Creates reference object to `DOMImplementation` object in a given context. Returns reference to the implementation object.
    DOMImplRef(
       const DOMImplRef< Context, Node>& iref);
| It is needed to create other references to the implementation object; deletion flags are not copied.
    DOMImplRef(
       const DOMImplRef< Context, Node>& iref,
       Context* ctx_ptr);
| It is needed to create references to the implementation object in a different context; deletion flags are not copied.

Parameter | Description
--- | ---
    ctx_ptr
| context pointer
    impl_ptr
| implementation

Returns

`(DOMImplRef)` reference to the implementation object

### createDocument

Creates document reference

Syntax

    DocumentRef< Node>* createDocument(
       oratext* namespaceURI,
       oratext* qualifiedName,
       DocumentTypeRef< Node>& doctype)
    throw (DOMException);

Parameter | Description
--- | ---
    namespaceURI
| namespace URI of root element
    qualifiedName
| qualified name of root element
    doctype
| associated DTD node

Returns

`(DocumentRef< Node>*)` document reference

### createDocumentType

Creates DTD reference

Syntax

    DocumentTypeRef< Node>* createDocumentType(
       oratext* qualifiedName,
       oratext* publicId,
       oratext* systemId)
    throw (DOMException);

Parameter | Description
--- | ---
    qualifiedName
| qualified name
    publicId
| external subset public Id
    systemId
| external subset system Id

Returns

`(DocumentTypeRef< Node>*)` DTD reference

### getImplementation

Returns `DOMImplementation` object that was used to create this document. When the `DOMImplementation` object is destructed, all document trees associated with it are also destructed.

Syntax

    DOMImplementation< Node>* getImplementation() const;

Returns

`(DOMImplementation)` `DOMImplementation` reference object

### getNoMod

Get the 'no modification allowed' flag value. This is an Oracle extension.

Syntax

    boolean getNoMod() const;

Returns

`TRUE` if flag's value is `TRUE`, `FALSE` otherwise

### hasFeature

Determine if a DOM feature is implemented. Returns `TRUE` if the feature is implemented in the specified version, `FALSE` otherwise.

In level 1, the legal values for package are 'HTML' and 'XML' (case-insensitive), and the version is the string "1.0". If the version is not specified, supporting any version of the feature will cause the method to return `TRUE`.

DOM 1.0 features are "XML" and "HTML".

DOM 2.0 features are "Core", "XML", "HTML", "Views", "StyleSheets", "CSS", "CSS2", "Events", "UIEvents", "MouseEvents", "MutationEvents", "HTMLEvents", "Range", "Traversal"

Syntax

    boolean hasFeature(
       oratext* feature,
       oratext* version);

Parameter | Description
--- | ---
    feature
| package name of feature
    version
| version of package

Returns

`(boolean)` is feature implemented?

### setContext

It is needed to create node references in a different context

Syntax

    void setContext(
       NodeRef< Node>& nref,
       Context* ctx_ptr);

Parameter | Description
--- | ---
    nref
| reference node
    ctx_ptr
| context pointer

### ~DOMImplRef

This is the default destructor. It cleans the reference to the implementation object. It is usually called by the environment. But it can be called by the user directly if necessary.

Syntax

    ~DOMImplRef();