The DocumentEvent interface provides a mechanism by
which the user can create an Event of a type supported by the implementation.
It is expected that the DocumentEvent interface will be implemented
on the same object which implements the Document interface in an
implementation which supports the Event model.
The eventType parameter specifies the type of Event interface
to be created. If the Event interface specified is supported by the implementation
this method will return a new Event of the interface type requested. If the
Event is to be dispatched via the dispatchEvent method the
appropriate event init method must be called after creation in order to initialize
the Event's values. As an example, a user wishing to synthesize some kind of
UIEvent would call createEvent with the parameter "UIEvents". The
initUIEvent method could then be called on the newly created UIEvent
to set the specific type of UIEvent to be dispatched and set its context information.
The createEvent method is used in creating Events when it is either
inconvenient or unnecessary for the
user to create an Event themselves. In cases where the implementation provided
Event is insufficient, users may supply their own Event
implementations for use with the dispatchEvent method.
The newly created Event
NOT_SUPPORTED_ERR: Raised if the implementation does not support
the type of Event interface requested
The MouseEvent interface provides specific contextual
information associated with Mouse events.
The detail attribute inherited from UIEvent
indicates the number of times a mouse button has been pressed and
released over the same screen location during a user action. The
attribute value is 1 when the user begins this action and increments by 1
for each full sequence of pressing and releasing. If the user moves the
mouse between the mousedown and mouseup the value will be set to 0,
indicating that no click is occurring.
In the case of nested elements mouse events are always targeted at the
most deeply nested element. Ancestors of the targeted element may use
bubbling to obtain notification of mouse events which occur within its
descendent elements.
The horizontal coordinate at which the
event occurred relative to the origin of the screen coordinate
system.
The vertical coordinate at which the
event occurred relative to the origin of the screen coordinate
system.
The horizontal coordinate at which the
event occurred relative to the DOM implementation's client area.
The vertical coordinate at which the
event occurred relative to the DOM implementation's client area.
Used to indicate whether the 'ctrl' key was depressed
during the firing of the event.
Used to indicate whether the 'shift' key was depressed
during the firing of the event.
Used to indicate whether the 'alt' key was depressed
during the firing of the event. On some platforms this key may map to
an alternative key name.
Used to indicate whether the 'meta' key was depressed
during the firing of the event. On some platforms this key may map to
an alternative key name.
During mouse events caused by the depression or release of a mouse
button, button is used to indicate which mouse button
changed state. The values for button range from zero to indicate
the left button of the mouse, one to indicate the middle button if present, and
two to indicate the right button. For mice configured for left handed use in which
the button actions are reversed the values are instead read from right to left.
Used to identify a secondary EventTarget related
to a UI event. Currently this attribute is used with the mouseover event to indicate the
EventTarget which the pointing device exited and with the mouseout event to indicate the
EventTarget which the pointing device entered.
The initMouseEvent method is used to initialize the value of a MouseEvent created through
the DocumentEvent interface. This method may only be called before the MouseEvent has
been dispatched via the dispatchEvent method, though it may be called multiple times during that
phase if necessary. If called multiple times, the final invocation takes precedence.
Specifies the event type.
Specifies whether or not the event can bubble.
Specifies whether or not the event's default
action can be prevented.
Specifies the Event's
AbstractView.
Specifies the Event's mouse click count.
Specifies the Event's screen x coordinate
Specifies the Event's screen y coordinate
Specifies the Event's client x coordinate
Specifies the Event's client y coordinate
Specifies whether or not control key was depressed during
the Event.
Specifies whether or not alt key was depressed during the
Event.
Specifies whether or not shift key was depressed during the
Event.
Specifies whether or not meta key was depressed during the
Event.
The UIEvent interface provides specific contextual
information associated with User Interface events.
The view attribute identifies the
AbstractView from which the event was generated.
Specifies some detail information about the Event,
depending on the type of event.
The initUIEvent method is used to initialize the value of a UIEvent created through
the DocumentEvent interface. This method may only be called before the UIEvent has
been dispatched via the dispatchEvent method, though it may be called multiple times during that
phase if necessary. If called multiple times, the final invocation takes precedence.
Specifies the event type.
Specifies whether or not the event can bubble.
Specifies whether or not the event's default
action can be prevented.
Specifies the Event's
AbstractView.
Specifies the Event's detail.
gmetadom-0.2.6/xml/DOM/Events/CVS/ 0000777 0001750 0001750 00000000000 10704632062 013437 5 0000000 0000000 gmetadom-0.2.6/xml/DOM/Events/CVS/Root 0000644 0001750 0001750 00000000075 10704632062 014223 0000000 0000000 :ext:lpadovan@gmetadom.cvs.sourceforge.net:/cvsroot/gmetadom
gmetadom-0.2.6/xml/DOM/Events/CVS/Entries 0000644 0001750 0001750 00000000726 10704632062 014714 0000000 0000000 /DocumentEvent.xml/1.1.1.1/Mon Nov 26 22:34:22 2001//
/Event.xml/1.1.1.1/Mon Nov 26 22:34:22 2001//
/EventCapturer.xml/1.1.1.1/Mon Nov 26 22:34:23 2001//
/EventException.xml/1.1.1.1/Mon Nov 26 22:34:22 2001//
/EventListener.xml/1.1.1.1/Mon Nov 26 22:34:22 2001//
/EventTarget.xml/1.1.1.1/Mon Nov 26 22:34:22 2001//
/MouseEvent.xml/1.1.1.1/Mon Nov 26 22:34:22 2001//
/MutationEvent.xml/1.1.1.1/Mon Nov 26 22:34:23 2001//
/UIEvent.xml/1.1.1.1/Mon Nov 26 22:34:23 2001//
D
gmetadom-0.2.6/xml/DOM/Events/CVS/Repository 0000644 0001750 0001750 00000000030 10704632062 015446 0000000 0000000 gmetadom/xml/DOM/Events
gmetadom-0.2.6/xml/DOM/Events/EventTarget.xml 0000644 0001750 0001750 00000013275 07400541556 015710 0000000 0000000
The EventTarget interface is implemented by all
Nodes in an implementation which supports the DOM Event
Model. Therefore, this interface can be obtained by using
binding-specific casting methods on an instance of the Node
interface. The interface allows registration and removal of
EventListeners on an EventTarget and dispatch
of events to that EventTarget.
This method allows the registration of event listeners on the event target.
If an EventListener is added to an EventTarget while it is
processing an event, it will not be triggered by the current actions but may be
triggered during a later stage of event flow, such as the bubbling phase.
If multiple identical EventListeners are registered on the same
EventTarget with the same parameters the duplicate instances are discarded.
They do not cause the EventListener to be called twice and since they are
discarded they do not need to be removed with the removeEventListener method.
The event type for which the user is registering
The listener parameter takes an interface implemented by
the user which contains the methods to be called when the event occurs.
If true, useCapture indicates that the user wishes to initiate
capture. After initiating capture, all events of the specified type will be
dispatched to the registered EventListener before being dispatched to any
EventTargets beneath them in the tree. Events which are bubbling upward
through the tree will not trigger an EventListener designated to use
capture.
This method allows the removal of event listeners from the event target. If an
EventListener is removed from an EventTarget while it is
processing an event, it will not be triggered by the current actions. EventListeners
can never be invoked after being removed.
Calling removeEventListener with arguments which do not identify any
currently registered EventListener on the EventTarget
has no effect.
Specifies the event type of the EventListener being removed.
The EventListener parameter indicates the EventListener
to be removed.
Specifies whether the EventListener being removed was registered as a
capturing listener or not. If a listener was registered twice, one with capture and one
without, each must be removed separately. Removal of a capturing listener does not
affect a non-capturing version of the same listener, and vice versa.
This method allows the dispatch of events into the implementations event model. Events
dispatched in this manner will have the same capturing and bubbling behavior as events
dispatched directly by the implementation. The target of the event is the
EventTarget on which dispatchEvent is called.
Specifies the event type, behavior, and contextual information to be used
in processing the event.
The return value of dispatchEvent indicates whether any of
the listeners which handled the event called preventDefault. If
preventDefault was called the value is false, else the value is true.
UNSPECIFIED_EVENT_TYPE_ERR: Raised if the
Event's type was not specified by initializing the
event before dispatchEvent was called.
Specification of the Event's type as
null or an empty string will also trigger this
exception.
Event operations may throw an EventException as specified in
their method descriptions.
unsigned short
An integer indicating the type of error generated.
If the Event's type was not specified by initializing the
event before the method was called. Specification of the Event's type
as null or an empty string will also trigger this
exception.
The Event interface is used to provide contextual information about an event
to the handler processing the event. An object which implements the Event interface
is generally passed as the first parameter to an event handler. More specific
context information is passed to event handlers by deriving additional interfaces from
Event which contain information directly relating to the type of event
they accompany. These derived interfaces are also implemented by the object passed to the
event listener.
An integer indicating which phase of event flow is being processed.
The current event phase is the capturing phase.
The event is currently being evaluated at the target EventTarget.
The current event phase is the bubbling phase.
The name of the event (case-insensitive). The name must be an XML
name.
Used to indicate the EventTarget to which the event
was originally dispatched.
Used to indicate the EventTarget whose
EventListeners are currently being processed. This is particularly
useful during capturing and bubbling.
Used to indicate which phase of event flow is currently
being evaluated.
Used to indicate whether or not an event is a bubbling event.
If the event can bubble the value is true, else the value is false.
Used to indicate whether or not an event can have its default
action prevented. If the default action can be prevented the value is true, else the value is false.
Used to specify the time (in milliseconds relative
to the epoch) at which the event was created. Due to the fact that some
systems may not provide this information the value of
timeStamp may be not available for all events. When not
available, a value of 0 will be returned. Examples of epoch time are
the time of the system start or 0:0:0 UTC 1st January 1970.
The stopPropagation method is used prevent further propagation of an event during
event flow. If this method is called by any EventListener the event will cease
propagating through the tree. The event will complete dispatch to all listeners on the current
EventTarget before event flow stops. This method may be used during any stage of
event flow.
If an event is cancelable, the preventDefault method is used
to signify that the event is to be canceled, meaning any default action normally
taken by the implementation as a result of the event will not occur. If, during any stage of event flow,
the preventDefault method is called the event is canceled.
Any default action associated with the event will not occur. Calling this method
for a non-cancelable event has no effect. Once preventDefault has been
called it will remain in effect throughout the remainder of the event's propagation. This
method may be used during any stage of event flow.
The initEvent method is used to initialize the value of an Event created through
the DocumentEvent interface. This method may only be called before the Event has
been dispatched via the dispatchEvent method, though it may be called multiple times during that
phase if necessary. If called multiple times the final invocation takes precedence. If called from a
subclass of Event interface only the values specified in the initEvent method are
modified, all other attributes are left unchanged.
Specifies the event type. This type may be any event type currently
defined in this specification or a new event type.. The string must
be an XML name.
Any new event type must not begin with any upper, lower, or mixed case version
of the string "DOM". This prefix is reserved for future DOM event sets. It is also
strongly recommended that third parties adding their own events use their own prefix to avoid
confusion and lessen the probability of conflicts with other new events.
Specifies whether or not the event can bubble.
Specifies whether or not the event's default
action can be prevented.
The EventListener interface is the primary method for
handling events. Users implement the EventListener interface
and register their listener on an EventTarget using the
AddEventListener method. The users should also remove their
EventListener from its EventTarget after they
have completed using the listener.
When a Node is copied using the cloneNode method
the EventListeners attached to the source Node are
not attached to the copied Node. If the user wishes the same
EventListeners to be added to the newly created copy the user must add them manually.
This method is called whenever an event occurs of the type for which
the EventListener interface was registered.
The Event contains contextual information about the
event. It also contains the stopPropagation and
preventDefault methods which are used in determining the event's flow and default
action.
The EventCapturer interface is implemented by Node's which are
designated as being able to capture events.
This method is used when a capturing Node wishes to begin
capturing a particular type of event.
The name of the event to be captured
This method is used when a capturing Node wishes to cease
capturing a particular type of event.
The name of the event to be released
This method is called during the handling of an event by a capturing
Node to continue the event's flow to additional event handlers, or if none
are present, to the event's target.
The MutationEvent interface provides specific contextual
information associated with Mutation events.
An integer indicating in which way the Attr was changed.
The Attr was modified in place.
The Attr was just added.
The Attr was just removed.
relatedNode is used to identify a secondary node related to a mutation event.
For example, if a mutation event is dispatched to a node indicating that its parent
has changed, the relatedNode is the changed parent. If an event is instead
dispatched to a subtree indicating a node was changed within it, the relatedNode
is the changed node. In the case of the DOMAttrModified event it indicates the Attr
node which was modified, added, or removed.
prevValue indicates the previous value of the Attr node in
DOMAttrModified events, and of the CharacterData node in DOMCharDataModified events.
newValue indicates the new value of the Attr node in DOMAttrModified
events, and of the CharacterData node in DOMCharDataModified events.
attrName indicates the name of the changed Attr node in a
DOMAttrModified event.
attrChange indicates the type of change which triggered the DOMAttrModified event.
The values can be MODIFICATION, ADDITION, or REMOVAL.
The initMutationEvent method is used to initialize the value of a MutationEvent created through
the DocumentEvent interface. This method may only be called before the MutationEvent has
been dispatched via the dispatchEvent method, though it may be called multiple times during that
phase if necessary. If called multiple times, the final invocation takes precedence.
Specifies the event type.
Specifies whether or not the event can bubble.
Specifies whether or not the event's default
action can be prevented.
CDATA sections are used to escape blocks of text containing
characters that would otherwise be regarded as markup. The only
delimiter that is recognized in a CDATA section is the "]]>" string
that ends the CDATA section. CDATA sections cannot be
nested. Their primary purpose is for including
material such as XML fragments, without needing to escape all
the delimiters.
The DOMString attribute of the
Text node holds the text that is contained by the CDATA
section. Note that this may contain characters
that need to be escaped outside of CDATA sections and that, depending on
the character encoding ("charset") chosen for serialization, it may be
impossible to write out some characters as part of a CDATA section.
The CDATASection interface inherits from the
CharacterData interface through the Text
interface. Adjacent CDATASection nodes are not merged by
use of the normalize method of the Node
interface.
Because no markup is recognized within a CDATASection,
character numeric references cannot be used as an escape mechanism
when serializing. Therefore, action needs to be taken when serializing
a CDATASection with a character encoding where some of
the contained characters cannot be represented. Failure to do so would
not produce well-formed XML.
One potential solution in the serialization process is to end the
CDATA section before the character, output the character using a
character reference or entity reference, and open a new CDATA section
for any further characters in the text node. Note, however, that some
code conversion libraries at the time of writing do not return an
error or exception when a character is missing from the encoding,
making the task of ensuring that data is not corrupted on serialization
more difficult.
Each Document has a doctype attribute
whose value is either null or a DocumentType
object. The DocumentType interface in the DOM Core
provides an interface to the list of entities that are defined
for the document, and little else because the effect of
namespaces and the various XML schema efforts on DTD
representation are not clearly understood as of this writing.
The DOM Level 2 doesn't support editing DocumentType
nodes.
The name of DTD; i.e., the name immediately
following the DOCTYPE keyword.
A NamedNodeMap containing the general entities, both
external and internal, declared in the DTD. Parameter entities are not
contained. Duplicates are discarded.
For example in:
<!DOCTYPE ex SYSTEM "ex.dtd" [
<!ENTITY foo "foo">
<!ENTITY bar "bar">
<!ENTITY bar "bar2">
<!ENTITY % baz "baz">
]>
<ex/>
the interface provides access to foo and
the first declaration of bar but not the second declaration of
bar or baz. Every node in this map
also implements the Entity interface.
The DOM Level 2 does not support editing entities, therefore
entities cannot be altered in any way.
A NamedNodeMap containing the
notations declared in the DTD. Duplicates are discarded. Every node in
this map also implements the Notation interface.
The DOM Level 2 does not support editing notations, therefore
notations cannot be altered in any way.
The public identifier of the external subset.
The system identifier of the external subset.
The internal subset as a string.
The actual content returned depends on how much information is
available to the implementation. This may vary depending on various
parameters, including the XML processor used to build the
document.
The Attr interface represents an attribute in an Element object.
Typically the allowable values for the attribute are defined in a document
type definition.
Attr objects inherit the Node
interface, but since they are not actually child nodes of the element
they describe, the DOM does not consider them part of the document
tree. Thus, the Node attributes parentNode,
previousSibling, and nextSibling have a
null value for Attr objects. The DOM takes the
view that attributes are properties of elements rather than having a
separate identity from the elements they are associated with;
this should make it more efficient to implement
such features as default attributes associated with all elements of a
given type. Furthermore, Attr
nodes may not be immediate children of a DocumentFragment.
However, they can be associated with Element nodes contained within
a DocumentFragment.
In short, users and implementors of the DOM need to be aware that
Attr nodes have some things in
common with other objects inheriting the Node interface,
but they also are quite distinct.
The attribute's effective value is determined as follows: if this
attribute has been explicitly assigned any value, that value is the
attribute's effective value; otherwise, if there is a declaration for
this attribute, and that declaration includes a default value, then
that default value is the attribute's effective value; otherwise, the
attribute does not exist on this element in the structure model until
it has been explicitly added. Note that the nodeValue
attribute on the Attr instance can also be used to
retrieve the string version of the attribute's value(s).
In XML, where the value of an attribute can contain entity references,
the child nodes of the Attr node provide a representation in
which entity references are not expanded. These child nodes may be either
Text or EntityReference nodes. Because the
DOM Core is not aware of attribute types, it treats all attribute values
as simple strings, even if the DTD or schema declares them as having
tokenized types.
Returns the name of this attribute.
If this attribute was explicitly given a value in the original
document, this is true; otherwise, it is false.
Note that the implementation is in charge of this attribute, not the
user. If the user changes the value of the attribute (even if it ends up
having the same value as the default value) then the specified
flag is automatically flipped to true. To re-specify the
attribute as the default value from the DTD, the user must delete the
attribute. The implementation will then make a new attribute available
with specified set to false and the default value
(if one exists).
In summary:
If the attribute has an assigned value in the document then
specified is true, and the value is the
assigned value.
If the attribute has no assigned value in the document and has
a default value in the DTD, then specified is false,
and the value is the default value in the DTD.
If the attribute has no assigned value in the document and has
a value of #IMPLIED in the DTD, then the attribute does not appear
in the structure model of the document.
If the ownerElement attribute is
null (i.e. because it was just created or was set to
null by the various removal and cloning operations)
specified is true.
On retrieval, the value of the attribute is returned as a
string. Character and general entity references are replaced with their
values. See also the method getAttribute on the
Element interface.
On setting, this creates a Text node with the unparsed
contents of the string. I.e. any characters that an XML processor would
recognize as markup are instead treated as literal text.
See also the method setAttribute on the
Element interface.
NO_MODIFICATION_ALLOWED_ERR: Raised when the node is
readonly.
The Element node this attribute is attached to or
null if this attribute is not in use.
DOM operations only raise exceptions in "exceptional"
circumstances, i.e., when an operation is impossible
to perform (either for logical reasons, because data is lost, or
because the implementation has become unstable). In general, DOM methods
return specific error values in ordinary
processing situations, such as out-of-bound errors when using
NodeList.
Implementations may raise other exceptions under other circumstances.
For example, implementations may raise an implementation-dependent
exception if a null argument is passed.
Some languages and object systems do not support the concept of
exceptions. For such systems, error conditions may be indicated using
native error reporting mechanisms. For some bindings, for example, methods
may return error codes similar to those listed in the corresponding method
descriptions.
unsigned short
An integer indicating the type of error generated.
Other numeric codes are reserved for W3C for possible future
use.
If index or size is negative, or greater than the
allowed value
If the specified range of text does not fit into a
DOMString
If any node is inserted somewhere it doesn't belong
If a node is used in a different document than the one that
created it (that doesn't support it)
If an invalid or illegal character is specified, such as in a
name. See production 2
in the XML specification for the definition of a legal character, and
production 5
for the definition of a legal name character.
If data is specified for a node which does not support
data
If an attempt is made to modify an object where modifications are
not allowed
If an attempt is made to reference a node in a context where it
does not exist
If the implementation does not support the type of object
requested
If an attempt is made to add an attribute that is already in use
elsewhere
If an attempt is made to use an object that is not, or is no
longer, usable.
If an invalid or illegal string is specified.
If an attempt is made to modify the type of the underlying
object.
If an attempt is made to create or change an object in a way
which is incorrect with regard to namespaces.
If a parameter or an operation is not supported by the
underlying object.
The ProcessingInstruction interface
represents a "processing instruction", used in XML
as a way to keep processor-specific information in the text of the
document.
The target of this processing instruction. XML defines this as
being the first token following the
markup that begins the processing instruction.
The content of this processing instruction. This
is from the first non white space character after the target
to the character immediately preceding the ?>.
NO_MODIFICATION_ALLOWED_ERR: Raised when the node is
readonly.
This interface represents a notation declared in the DTD. A notation
either declares, by name, the format of an unparsed entity (see section 4.7
of the XML 1.0 specification ), or is used for formal
declaration of
processing instruction targets (see section 2.6 of the XML 1.0
specification ). The nodeName attribute
inherited from
Node is set to the declared name of the notation.
The DOM Level 1 does not support editing Notation
nodes; they are therefore
readonly.
A Notation node does not have any parent.
The public identifier of this notation. If the
public identifier was not specified, this is null.
The system identifier of this notation. If the
system identifier was not specified, this is null.
The Element interface represents an element in an HTML
or XML document. Elements may have attributes associated with them; since the
Element interface inherits from Node, the generic
Node interface attribute attributes may be used
to retrieve the set of all attributes for an element. There are methods on
the Element interface to retrieve either an Attr
object by name or an attribute value by name. In XML, where an attribute
value may contain entity references, an Attr object should be
retrieved to examine the possibly fairly complex sub-tree representing the
attribute value. On the other hand, in HTML, where all attributes have
simple string values, methods to directly access an attribute value can
safely be used as a convenience.
In DOM Level 2, the method normalize is
inherited from the Node interface where it was
moved.
The name of the element. For example, in:
<elementExample id="demo">
...
</elementExample> ,
tagName has the value
"elementExample". Note that this is
case-preserving in XML, as are all of the operations of the DOM.
The HTML DOM returns the tagName of an HTML element
in the canonical uppercase form, regardless of the case in the
source HTML document.
Retrieves an attribute value by name.
The name of the attribute to retrieve.
The Attr value as a string, or the empty string if
that attribute does not have a specified or default value.
Adds a new attribute. If an attribute with that name is already
present in the element, its value is changed to be that of the value
parameter. This value is a simple string; it is not parsed as it is being
set. So any markup (such as syntax to be recognized as an entity
reference) is treated as literal text, and needs to be appropriately
escaped by the implementation when it is written out. In order to assign
an attribute value that contains entity references, the user must create
an Attr node plus any Text and
EntityReference nodes, build the appropriate subtree, and
use setAttributeNode to assign it as the value of an
attribute.
To set an attribute with a qualified name and namespace URI, use
the setAttributeNS method.
The name of the attribute to create or alter.
Value to set in string form.
INVALID_CHARACTER_ERR: Raised if the specified name contains
an illegal character.
NO_MODIFICATION_ALLOWED_ERR: Raised if this node is readonly.
Removes an attribute by name. If the removed attribute is known
to have a default value, an attribute immediately appears containing
the default value as well as the corresponding namespace URI,
local name, and prefix when applicable.
To remove an attribute by local name and namespace URI, use
the removeAttributeNS method.
The name of the attribute to remove.
NO_MODIFICATION_ALLOWED_ERR: Raised if this node is
readonly.
Retrieves an attribute node by name.
To retrieve an attribute node by qualified name and namespace URI, use
the getAttributeNodeNS method.
The name (nodeName) of the attribute to
retrieve.
The Attr node with the specified
name (nodeName) or null if there is no such
attribute.
Adds a new attribute node. If an attribute with that name
(nodeName) is already present in the element, it is replaced
by the new one.
To add a new attribute node with a qualified name and namespace URI,
use the setAttributeNodeNS method.
The Attr node to add to the attribute
list.
If the newAttr attribute replaces
an existing attribute, the replaced Attr node is
returned, otherwise null is returned.
WRONG_DOCUMENT_ERR: Raised if newAttr was
created from a different document than the one that created the
element.
NO_MODIFICATION_ALLOWED_ERR: Raised if this node is readonly.
INUSE_ATTRIBUTE_ERR: Raised if newAttr is already
an attribute of another Element object. The
DOM user must explicitly clone Attr
nodes to re-use them in other elements.
Removes the specified attribute node. If the removed
Attr has a default value it is immediately
replaced. The replacing attribute has the same namespace URI
and local name, as well as the original prefix, when
applicable.
The Attr node to remove from the attribute
list.
The Attr node that was removed.
NO_MODIFICATION_ALLOWED_ERR: Raised if this node is
readonly.
NOT_FOUND_ERR: Raised if oldAttr is not an attribute of
the element.
Returns a NodeList of all descendantElements with a given tag name, in the order in which they
are encountered in a preorder traversal of this Element
tree.
The name of the tag to match on. The special value "*"
matches all tags.
A list of matching Element nodes.
Retrieves an attribute value by local name and namespace
URI. HTML-only DOM implementations do not need to implement this
method.
The namespace URI of
the attribute to retrieve.
The local name of the
attribute to retrieve.
The Attr value as a string, or the empty string if
that attribute does not have a specified or default value.
Adds a new attribute. If an attribute with the same local name
and namespace URI is already present on the element, its prefix is
changed to be the prefix part of the qualifiedName, and
its value is changed to be the value parameter. This value
is a simple string; it is not parsed as it is being set. So any markup
(such as syntax to be recognized as an entity reference) is treated as
literal text, and needs to be appropriately escaped by the
implementation when it is written out. In order to assign an attribute
value that contains entity references, the user must create an
Attr node plus any Text and
EntityReference nodes, build the appropriate subtree, and
use setAttributeNodeNS or setAttributeNode to
assign it as the value of an attribute.
HTML-only DOM implementations do not need to implement this
method.
The namespace URI of
the attribute to create or alter.
The qualified name
of the attribute to create or alter.
The value to set in string form.
INVALID_CHARACTER_ERR: Raised if the specified qualified name
contains an illegal character.
NO_MODIFICATION_ALLOWED_ERR: Raised if this node is readonly.
NAMESPACE_ERR: Raised if the qualifiedName is
malformed, if the qualifiedName has a prefix and
the namespaceURI is null, if the
qualifiedName has a prefix that is
"xml" and the namespaceURI is different from
"xml-ns;", or if the
qualifiedName is "xmlns" and the
namespaceURI is different from
"xmlns-ns;".
Removes an attribute by local name and namespace URI. If
the removed attribute has a default value it is immediately
replaced. The replacing attribute has the same namespace URI
and local name, as well as the original prefix.
HTML-only DOM implementations do not need to implement this
method.
The namespace URI of
the attribute to remove.
The local name of the
attribute to remove.
NO_MODIFICATION_ALLOWED_ERR: Raised if this node is
readonly.
Retrieves an Attr node by local name and namespace
URI. HTML-only DOM implementations do not need to implement this
method.
The namespace URI of
the attribute to retrieve.
The local name of the
attribute to retrieve.
The Attr node with the specified attribute local
name and namespace URI or null if there is no such
attribute.
Adds a new attribute. If an attribute with that local name and
that namespace URI is already present in the element, it is replaced by
the new one.
HTML-only DOM implementations do not need to implement this
method.
The Attr node to add to the attribute list.
If the newAttr attribute replaces an existing
attribute with the same local
name and namespace
URI, the replaced Attr node is
returned, otherwise null is returned.
WRONG_DOCUMENT_ERR: Raised if newAttr was
created from a different document than the one that created the
element.
NO_MODIFICATION_ALLOWED_ERR: Raised if this node is readonly.
INUSE_ATTRIBUTE_ERR: Raised if newAttr is already an
attribute of another Element object. The DOM user
must explicitly clone Attr nodes to re-use them in
other elements.
Returns a NodeList of all the descendantElements with a given local name and namespace URI in the
order in which they are encountered in a preorder traversal of this
Element tree.
HTML-only DOM implementations do not need to implement this
method.
The namespace URI of
the elements to match on. The special value "*" matches all
namespaces.
The local name of the
elements to match on. The special value "*" matches all local
names.
A new NodeList object containing all the matched
Elements.
Returns true when an attribute with a given name is
specified on this element or has a default value, false
otherwise.
The name of the attribute to look for.
true if an attribute with the given name is
specified on this element or has a default value, false
otherwise.
Returns true when an attribute with a given local
name and namespace URI is specified on this element or has a default
value, false otherwise. HTML-only DOM implementations do
not need to implement this method.
The namespace URI of
the attribute to look for.
The local name of the
attribute to look for.
true if an attribute with the given local name and
namespace URI is specified or has a default value on this element,
false otherwise.
This interface inherits from CharacterData and
represents the content of a comment, i.e., all the
characters between the starting '<!--' and
ending '-->'. Note that this is the definition
of a comment in XML, and, in practice, HTML, although some HTML
tools may implement the full SGML comment structure.
gmetadom-0.2.6/xml/DOM/Core/CVS/ 0000777 0001750 0001750 00000000000 10704632062 013063 5 0000000 0000000 gmetadom-0.2.6/xml/DOM/Core/CVS/Root 0000644 0001750 0001750 00000000075 10704632062 013647 0000000 0000000 :ext:lpadovan@gmetadom.cvs.sourceforge.net:/cvsroot/gmetadom
gmetadom-0.2.6/xml/DOM/Core/CVS/Entries 0000644 0001750 0001750 00000001636 10704632062 014341 0000000 0000000 /Attr.xml/1.1.1.1/Mon Nov 26 22:34:22 2001//
/CDATASection.xml/1.1.1.1/Mon Nov 26 22:34:22 2001//
/CharacterData.xml/1.1.1.1/Mon Nov 26 22:34:22 2001//
/Comment.xml/1.1.1.1/Mon Nov 26 22:34:21 2001//
/DOMException.xml/1.1.1.1/Mon Nov 26 22:34:22 2001//
/DOMImplementation.xml/1.1.1.1/Mon Nov 26 22:34:22 2001//
/Document.xml/1.1.1.1/Mon Nov 26 22:34:21 2001//
/DocumentFragment.xml/1.1.1.1/Mon Nov 26 22:34:22 2001//
/DocumentType.xml/1.1.1.1/Mon Nov 26 22:34:20 2001//
/Element.xml/1.1.1.1/Mon Nov 26 22:34:21 2001//
/Entity.xml/1.1.1.1/Mon Nov 26 22:34:21 2001//
/EntityReference.xml/1.1.1.1/Mon Nov 26 22:34:21 2001//
/NamedNodeMap.xml/1.1.1.1/Mon Nov 26 22:34:21 2001//
/Node.xml/1.1.1.1/Mon Nov 26 22:34:22 2001//
/NodeList.xml/1.1.1.1/Mon Nov 26 22:34:22 2001//
/Notation.xml/1.1.1.1/Mon Nov 26 22:34:21 2001//
/ProcessingInstruction.xml/1.1.1.1/Mon Nov 26 22:34:22 2001//
/Text.xml/1.1.1.1/Mon Nov 26 22:34:21 2001//
D
gmetadom-0.2.6/xml/DOM/Core/CVS/Repository 0000644 0001750 0001750 00000000026 10704632062 015077 0000000 0000000 gmetadom/xml/DOM/Core
gmetadom-0.2.6/xml/DOM/Core/Node.xml 0000644 0001750 0001750 00000053455 07400541556 013775 0000000 0000000
The Node interface is the primary datatype for the entire Document Object Model.
It represents a single node in the document tree. While all objects
implementing the Node interface expose methods for dealing with children, not all objects
implementing the Node interface may have children. For example, Text nodes may not have children, and adding children to such nodes results
in a DOMException being raised.
The attributes nodeName, nodeValue and attributes are included as a mechanism to get at node information without casting
down to the specific derived interface. In cases where there is no obvious
mapping of these attributes for a specific nodeType (e.g., nodeValue for an Element or attributes for a Comment), this returns null. Note that the specialized interfaces may contain additional and more
convenient mechanisms to get and set the relevant information.
An integer indicating which type of node this is.
Numeric codes up to 200 are reserved to W3C for possible future
use.
The node is an Element.
The node is an Attr.
The node is a Text node.
The node is a CDATASection.
The node is an EntityReference.
The node is an Entity.
The node is a ProcessingInstruction.
The node is a Comment.
The node is a Document.
The node is a DocumentType.
The node is a DocumentFragment.
The node is a Notation.
The values of nodeName, nodeValue, and attributes vary according to the node type as follows:
nodeName
nodeValue
attributes
Attr
name of attribute
value of attribute
null
CDATASection
#cdata-section
content of the CDATA Section
null
Comment
#comment
content of the comment
null
Document
#document
null
null
DocumentFragment
#document-fragment
null
null
DocumentType
document type name
null
null
Element
tag name
null
NamedNodeMap
Entity
entity name
null
null
EntityReference
name of entity referenced
null
null
Notation
notation name
null
null
ProcessingInstruction
target
entire content excluding the target
null
Text
#text
content of the text node
null
The name of this node, depending on its type; see the table above.
The value of this node, depending on its type; see the table above.
When it is defined to be null, setting it has no effect.
NO_MODIFICATION_ALLOWED_ERR: Raised when the node is readonly.
DOMSTRING_SIZE_ERR: Raised when it would return more characters
than fit in a DOMString variable on the implementation platform.
A code representing the type of the underlying object, as defined
above.
The parent of this node. All nodes,
except Attr, Document, DocumentFragment, Entity, and Notation may have a parent. However, if a node has just been created and not yet
added to the tree, or if it has been removed from the tree, this is null.
A NodeList that contains all children of this node. If there are no children, this
is a NodeList containing no nodes.
The first child of this node. If there is no such node, this returns null.
The last child of this node. If there is no such node, this returns null.
The node immediately preceding this node. If there is no such node,
this returns null.
The node immediately following this node. If there is no such node,
this returns null.
A NamedNodeMap containing the attributes of this node (if it is an Element) or null otherwise.
The Document object associated with this node. This is also the Document object used to create new nodes. When this node is a Document or a DocumentType which is not used with any Document yet, this is null.
Inserts the node newChild before the existing child node refChild. If refChild is null, insert newChild at the end of the list of children.
If newChild is a DocumentFragment object, all of its children are inserted, in the same order, before refChild. If the newChild is already in the tree, it is first removed.
The node to insert.
The reference node, i.e., the node before which the new node must
be inserted.
The node being inserted.
HIERARCHY_REQUEST_ERR: Raised if this node is of a type that does
not allow children of the type of the newChild node, or if the node to insert is one of this node's
ancestors.
WRONG_DOCUMENT_ERR: Raised if newChild was created from a different document than the one that created this
node.
NO_MODIFICATION_ALLOWED_ERR: Raised if this node is readonly or if
the parent of the node being inserted is readonly.
NOT_FOUND_ERR: Raised if refChild is not a child of this node.
Replaces the child node oldChild with newChild in the list of children, and returns the oldChild node.
If newChild is a DocumentFragment object, oldChild is replaced by all of the DocumentFragment children, which are inserted in the same order. If the newChild is already in the tree, it is first removed.
The new node to put in the child list.
The node being replaced in the list.
The node replaced.
HIERARCHY_REQUEST_ERR: Raised if this node is of a type that does
not allow children of the type of the newChild node, or if the node to put in is one of this node's
ancestors.
WRONG_DOCUMENT_ERR: Raised if newChild was created from a different document than the one that created this
node.
NO_MODIFICATION_ALLOWED_ERR: Raised if this node or the parent of
the new node is readonly.
NOT_FOUND_ERR: Raised if oldChild is not a child of this node.
Removes the child node indicated by oldChild from the list of children, and returns it.
The node being removed.
The node removed.
NO_MODIFICATION_ALLOWED_ERR: Raised if this node is readonly.
NOT_FOUND_ERR: Raised if oldChild is not a child of this node.
Adds the node newChild to the end of the list of children of this node. If the newChild is already in the tree, it is first removed.
The node to add.
If it is a DocumentFragment object, the entire contents of the document fragment are moved into the
child list of this node
The node added.
HIERARCHY_REQUEST_ERR: Raised if this node is of a type that does
not allow children of the type of the newChild node, or if the node to append is one of this node's
ancestors.
WRONG_DOCUMENT_ERR: Raised if newChild was created from a different document than the one that created this
node.
NO_MODIFICATION_ALLOWED_ERR: Raised if this node is readonly.
Returns whether this node has any children.
true if this node has any children, false otherwise.
Returns a duplicate of this node, i.e., serves as a generic copy
constructor for nodes. The duplicate node has no parent; (parentNode is null.).
Cloning an Element copies all attributes and their values, including those generated by
the XML processor to represent defaulted attributes, but this method does not
copy any text it contains unless it is a deep clone, since the text is
contained in a child Text node. Cloning an Attribute directly, as opposed to be cloned as part of an Element cloning operation, returns a specified attribute (specified is true). Cloning any other type of node simply returns a copy of this
node.
Note that cloning an immutable subtree results in a mutable copy, but
the children of an EntityReference clone are readonly. In
addition, clones of unspecified Attr nodes are specified. And, cloning Document, DocumentType, Entity, and Notation nodes is implementation dependent.
If true, recursively clone the subtree under the specified node; if false, clone only the node itself (and its attributes, if it is an Element).
The duplicate node.
Puts all Text nodes in the full depth of the sub-tree underneath this Node, including attribute nodes, into a "normal" form where only structure
(e.g., elements, comments, processing instructions, CDATA sections, and entity
references) separates Text nodes, i.e., there are neither adjacent Text nodes nor empty Text nodes. This can be used to ensure that the DOM view of a document is
the same as if it were saved and re-loaded, and is useful when operations (such
as XPointer lookups) that depend on a particular
document tree structure are to be used.
In cases where the document contains CDATASections, the normalize operation alone may not be sufficient, since XPointers
do not differentiate between Text nodes and CDATASection nodes.
Tests whether the DOM implementation implements a specific feature and
that feature is supported by this node.
The name of the feature to test. This is the same name which can
be passed to the method hasFeature on DOMImplementation.
This is the version number of the feature to test. In Level 2,
version 1, this is the string "2.0". If the version is not specified,
supporting any version of the feature will cause the method to return true.
Returns true if the specified feature is supported on this node, false otherwise.
The namespace URI of this
node, or null if it is unspecified.
This is not a computed value that is the result of a namespace lookup
based on an examination of the namespace declarations in scope. It is merely
the namespace URI given at creation time.
For nodes of any type other than ELEMENT_NODE and ATTRIBUTE_NODE and nodes created with a DOM Level 1 method, such as createElement from the Document interface, this is always null.
Per the Namespaces in XML Specification
an attribute does not inherit its namespace from the
element it is attached to. If an attribute is not explicitly given a namespace,
it simply has no namespace.
The namespace prefix of
this node, or null if it is unspecified.
Note that setting this attribute, when permitted, changes the nodeName attribute, which holds the qualified
name, as well as the tagName and name attributes of the Element and Attr interfaces, when applicable.
Note also that changing the prefix of an attribute that is known to
have a default value, does not make a new attribute with the default value and
the original prefix appear, since the namespaceURI and localName do not change.
For nodes of any type other than ELEMENT_NODE and ATTRIBUTE_NODE and nodes created with a DOM Level 1 method, such as createElement from the Document interface, this is always null.
INVALID_CHARACTER_ERR: Raised if the specified prefix contains an
illegal character.
NO_MODIFICATION_ALLOWED_ERR: Raised if this node is readonly.
NAMESPACE_ERR: Raised if the specified prefix is malformed, if the namespaceURI of this node is null, if the specified prefix is "xml" and the namespaceURI of this node is different from "xml-ns;",
if this node is an attribute and the specified prefix is "xmlns" and the namespaceURI of this node is different from "xmlns-ns;", or if this node is an attribute and the qualifiedName of this node is "xmlns" .
Returns the local part of the qualified name of this node.
For nodes of any type other than ELEMENT_NODE and ATTRIBUTE_NODE and nodes created with a DOM Level 1 method, such as createElement from the Document interface, this is always null.
Returns whether this node (if it is an element) has any
attributes.
true if this node has any attributes, false otherwise.
The Text interface inherits from CharacterData and represents the textual content (termed
character data in XML) of an Element or Attr. If there is no markup inside an element's content, the text is
contained in a single object implementing the Text interface that is the only child of the element. If there is markup, it
is parsed into the information items
(elements, comments, etc.) and Text nodes that form the list of children of the element.
When a document is first made available via the DOM, there is only one Text node for each block of text. Users may create adjacent Text nodes that represent the contents of a given element without any
intervening markup, but should be aware that there is no way to represent the
separations between these nodes in XML or HTML, so they will not (in general)
persist between DOM editing sessions. The normalize() method on Node merges any such adjacent Text objects into a single node for each block of text.
Breaks this node into two nodes at the specified offset, keeping both in the tree as siblings. After being split, this node will contain
all the content up to the offset point. A new node of the same type, which contains all the content at
and after the offset point, is returned. If the original node had a parent node, the new
node is inserted as the next sibling of the
original node. When the offset is equal to the length of this node, the new node has no data.
The 16-bit unit offset at
which to split, starting from 0.
The new node, of the same type as this node.
INDEX_SIZE_ERR: Raised if the specified offset is negative or
greater than the number of 16-bit units in data.
NO_MODIFICATION_ALLOWED_ERR: Raised if this node is readonly.
EntityReference objects may be inserted into the
structure model when an entity reference is in the source document, or
when the user wishes to insert an entity reference. Note that character
references and references to predefined entities are considered to be
expanded by the HTML or XML processor so that characters are represented
by their Unicode equivalent rather than by an entity reference. Moreover,
the XML processor may completely expand references to entities while
building the structure model, instead of providing
EntityReference objects. If it does provide such objects,
then for a given EntityReference node, it may be that there
is no Entity node representing the referenced entity. If
such an Entity exists, then the subtree of the
EntityReference node is in general a copy of the
Entity node subtree. However, this may not be true when an
entity contains an unbound namespace
prefix. In such a case, because the namespace prefix resolution
depends on where the entity reference is, the descendants of the
EntityReference node may be bound to different
namespace URIs.
As for Entity nodes, EntityReference nodes and
all their descendants are
readonly.
This interface represents an entity, either parsed or
unparsed, in an XML document. Note that this models the entity
itself not the entity declaration. Entity
declaration modeling has been left for a later Level of the DOM
specification.
The nodeName attribute that is inherited from
Node contains the name of the entity.
An XML processor may choose to completely expand entities before
the structure model is passed to the DOM; in this case there will
be no EntityReference nodes in the document tree.
XML does not mandate that a non-validating XML processor read
and process entity declarations made in the external subset or
declared in external parameter entities. This means
that parsed entities declared in the external subset
need not be expanded by some classes of applications, and that
the replacement value of the entity may not be available. When the
replacement value is available, the corresponding
Entity node's child list represents the structure of
that replacement text. Otherwise, the child list is empty.
The DOM Level 2 does not support editing Entity
nodes; if a user wants to make changes to the contents of an
Entity, every related EntityReference node
has to be replaced in the structure model by a clone of the
Entity's contents, and then the desired changes must be made
to each of those clones instead. Entity nodes and all their
descendants are readonly.
An Entity node does not have any parent.
If the entity contains an unbound namespace prefix, the
namespaceURI of the corresponding node in the
Entity node subtree is null. The same is
true for EntityReference nodes that refer to this entity,
when they are created using the createEntityReference
method of the Document interface. The DOM Level 2 does not
support any mechanism to resolve namespace prefixes.
The public identifier associated with the entity, if
specified. If the public identifier was not specified, this
is null.
The system identifier associated with the entity, if
specified. If the system identifier was not specified, this
is null.
For unparsed entities, the name of the notation for the
entity. For parsed entities, this is null.
The Document interface represents the entire
HTML or XML document. Conceptually, it is the root of the
document tree, and provides the primary access to the
document's data.
Since elements, text nodes, comments, processing instructions,
etc. cannot exist outside the context of a Document, the
Document interface also contains the factory methods needed
to create these objects. The Node objects created have a
ownerDocument attribute which associates them with the
Document within whose context they were created.
The Document Type Declaration (see DocumentType)
associated with this document. For HTML documents as well as XML
documents without a document type declaration this returns
null. The DOM Level 2 does not support editing the
Document Type Declaration. docType cannot be
altered in any way, including through the use of methods inherited from
the Node interface, such as insertNode or
removeNode.
The DOMImplementation object that handles this
document. A DOM application may use objects from multiple
implementations.
This is a convenience attribute that allows direct
access to the child node that is the root element of the
document. For HTML documents, this is the element with
the tagName "HTML".
Creates an element of the type specified. Note that the instance
returned implements the Element interface, so attributes
can be specified directly on the returned object.
In addition, if there are known attributes with default values,
Attr nodes representing them are automatically created and
attached to the element.
To create an element with a qualified name and namespace URI, use the
createElementNS method.
The name of the element type to
instantiate. For XML, this is case-sensitive. For HTML, the
tagName parameter may be provided in any case,
but it must be mapped to the canonical uppercase form by
the DOM implementation.
A new Element object with the
nodeName attribute set to tagName, and
localName, prefix, and
namespaceURI set to null.
INVALID_CHARACTER_ERR: Raised if the specified name contains
an illegal character.
Creates an empty DocumentFragment object.
A new DocumentFragment.
Creates a Text node given the specified
string.
The data for the node.
The new Text object.
Creates a Comment node given the specified
string.
The data for the node.
The new Comment object.
Creates a CDATASection node whose value is
the specified string.
The data for the CDATASection contents.
The new CDATASection object.
NOT_SUPPORTED_ERR: Raised if this document is an HTML
document.
Creates a ProcessingInstruction node given
the specified name and data strings.
The target part of the processing instruction.
The data for the node.
The new ProcessingInstruction object.
INVALID_CHARACTER_ERR: Raised if the specified target
contains an illegal character.
NOT_SUPPORTED_ERR: Raised if this document is an HTML document.
Creates an Attr of the given name.
Note that the Attr instance
can then be set on an Element using the
setAttributeNode method.
To create an attribute with a qualified name and namespace URI, use
the createAttributeNS method.
The name of the attribute.
A new Attr object with the nodeName
attribute set to name, and localName,
prefix, and namespaceURI set to
null. The value of the attribute is the empty
string.
INVALID_CHARACTER_ERR: Raised if the specified name contains
an illegal character.
Creates an EntityReference object. In addition, if
the referenced entity is known, the child list of the
EntityReference node is made the same as that of the
corresponding Entity node.
If any descendant of the Entity node has an
unbound namespace prefix,
the corresponding descendant of the created
EntityReference node is also unbound; (its
namespaceURI is null). The DOM Level 2 does
not support any mechanism to resolve namespace prefixes.
The name of the entity to reference.
The new EntityReference object.
INVALID_CHARACTER_ERR: Raised if the specified name contains
an illegal character.
NOT_SUPPORTED_ERR: Raised if this document is an HTML document.
Returns a NodeList of all the Elements
with a given tag name in the order in which they are encountered
in a preorder traversal of the Document tree.
The name of the tag to match on. The special value "*"
matches all tags.
A new NodeList object containing
all the matched Elements.
Imports a node from another document to this document. The returned
node has no parent; (parentNode is null). The
source node is not altered or removed from the original document; this
method creates a new copy of the source node.
For all nodes, importing a node creates a node object owned by the
importing document, with attribute values identical to the source
node's nodeName and nodeType, plus the
attributes related to namespaces (prefix,
localName, and namespaceURI). As in the
cloneNode operation on a Node, the source
node is not altered.
Additional information is copied as appropriate to the
nodeType, attempting to mirror the behavior expected if a
fragment of XML or HTML source was copied from one document to another,
recognizing that the two documents may have different DTDs in the XML
case. The following list describes the specifics for each type of
node.
The ownerElement attribute is set to
null and the specified flag is set to
true on the generated Attr. The
descendants of the source Attr are recursively
imported and the resulting nodes reassembled to form the
corresponding subtree.
Note that the deep parameter has no effect on
Attr nodes; they always carry their children with
them when imported.
If the deep option was set to
true, the descendants of the source element are
recursively imported and the resulting nodes reassembled to
form the corresponding subtree. Otherwise, this simply
generates an empty DocumentFragment.
Document nodes cannot be imported.
DocumentType nodes cannot be imported.
Specified attribute nodes of the source
element are imported, and the generated Attr nodes
are attached to the generated Element. Default
attributes are not copied, though if the document
being imported into defines default attributes for this element
name, those are assigned. If the importNodedeep parameter was set to true, the
descendants of the source element are recursively imported
and the resulting nodes reassembled to form the corresponding
subtree.
Entity nodes can be imported, however in the
current release of the DOM the DocumentType is
readonly. Ability to add these imported nodes to a
DocumentType will be considered for addition to a
future release of the DOM.
On import, the publicId, systemId,
and notationName attributes are copied. If a
deep import is requested, the descendants of the
the source Entity are recursively imported and the
resulting nodes reassembled to form the corresponding
subtree.
Only the EntityReference itself is copied,
even if a deep import is requested, since the
source and destination documents might have defined the entity
differently. If the document being imported into provides a
definition for this entity name, its value is assigned.
Notation nodes can be imported, however in the
current release of the DOM the DocumentType is
readonly. Ability to add these imported nodes to a
DocumentType will be considered for addition to a
future release of the DOM.
On import, the publicId and
systemId attributes are copied.
Note that the deep parameter has no effect on
Notation nodes since they never have any
children.
The imported node copies its target and
data values from those of the source node.
These three types of nodes inheriting from
CharacterData copy their data and
length attributes from those of the source
node.
The node to import.
If true, recursively import the subtree
under the specified node; if false, import only
the node itself, as explained above. This has no effect on
Attr, EntityReference, and
Notation nodes.
The imported node that belongs to this
Document.
NOT_SUPPORTED_ERR: Raised if the type of node being imported
is not supported.
Creates an element of the given qualified name and namespace
URI. HTML-only DOM implementations do not need to implement this
method.
The namespace URI of
the element to create.
The qualified name
of the element type to instantiate.
A new Element object with the following
attributes:
Attribute
Value
Node.nodeName
qualifiedName
Node.namespaceURI
namespaceURI
Node.prefix
prefix, extracted from
qualifiedName, or null if there is no
prefix
Node.localName
local name, extracted from
qualifiedName
Element.tagName
qualifiedName
INVALID_CHARACTER_ERR: Raised if the specified qualified name
contains an illegal character.
NAMESPACE_ERR: Raised if the qualifiedName is
malformed, if the qualifiedName has a prefix and
the namespaceURI is null, or if
the qualifiedName has a prefix that
is "xml" and the namespaceURI is different
from "xml-ns;" .
Creates an attribute of the given qualified name and namespace
URI. HTML-only DOM implementations do not need to implement this
method.
The namespace URI of
the attribute to create.
The qualified name
of the attribute to instantiate.
A new Attr object with the following
attributes:
Attribute
Value
Node.nodeName
qualifiedName
Node.namespaceURI
namespaceURI
Node.prefix
prefix, extracted from
qualifiedName, or null if there is no
prefix
Node.localName
local name, extracted from
qualifiedName
Attr.name
qualifiedName
Node.nodeValue
the empty string
INVALID_CHARACTER_ERR: Raised if the specified qualified name
contains an illegal character.
NAMESPACE_ERR: Raised if the qualifiedName is
malformed, if the qualifiedName has a prefix and
the namespaceURI is null, if the
qualifiedName has a prefix that is
"xml" and the namespaceURI is different from
"xml-ns;", or if the
qualifiedName is "xmlns" and the
namespaceURI is different from
"xmlns-ns;".
Returns a NodeList of all the Elements
with a given local name and
namespace URI in the order in which they are encountered in a
preorder traversal of the Document tree.
The namespace URI of
the elements to match on. The special value "*" matches all
namespaces.
The local name of the
elements to match on. The special value "*" matches all local
names.
A new NodeList object containing all the matched
Elements.
Returns the Element whose ID
is given by elementId. If no such element exists, returns
null. Behavior is not defined if more than one element has
this ID.
The DOM implementation must have information that says which
attributes are of type ID. Attributes with the name "ID" are not of type ID unless
so defined. Implementations that do not know whether attributes are of type
ID or not are expected to return null.
The CharacterData interface extends Node with a set of
attributes and methods for accessing character data in the DOM. For
clarity this set is defined here rather than on each object that uses
these attributes and methods. No DOM objects correspond directly to
CharacterData, though Text and others do
inherit the interface from it. All offsets in this
interface start from 0.
As explained in the DOMString interface, text strings
in the DOM are represented in UTF-16, i.e. as a sequence of 16-bit
units. In the following, the term 16-bit units is used whenever
necessary to indicate that indexing on CharacterData is done in
16-bit units.
The character data of the node
that implements this interface. The DOM implementation may not
put arbitrary limits on the amount of data that may be stored in a
CharacterData node. However, implementation limits may
mean that the entirety of a node's data may not fit into a single
DOMString. In such cases, the user may call
substringData to retrieve the data in appropriately sized
pieces.
NO_MODIFICATION_ALLOWED_ERR: Raised when the node is
readonly.
DOMSTRING_SIZE_ERR: Raised when it would return more
characters than fit in a DOMString variable on the
implementation platform.
The number of 16-bit
units that are available through data and the
substringData method below. This may have the value zero,
i.e., CharacterData nodes may be empty.
Extracts a range of data from the node.
Start offset of substring to extract.
The number of 16-bit units to extract.
The specified substring. If the sum of offset and
count exceeds the length, then all 16-bit
units to the end of the data are returned.
INDEX_SIZE_ERR: Raised if the specified offset
is negative or greater than the number of 16-bit units in
data, or if the specified count is
negative.
DOMSTRING_SIZE_ERR: Raised if the specified range of text does
not fit into a DOMString.
Append the string to the end of the character data of the node.
Upon success, data provides access to the concatenation of
data and the DOMString specified.
The DOMString to append.
NO_MODIFICATION_ALLOWED_ERR: Raised if this node is
readonly.
Insert a string at the specified 16-bit
unit offset.
The character offset at which to insert.
The DOMString to insert.
INDEX_SIZE_ERR: Raised if the specified offset
is negative or greater than the number of 16-bit units in
data.
NO_MODIFICATION_ALLOWED_ERR: Raised if this node is readonly.
Remove a range of 16-bit units
from the node. Upon success, data and length
reflect the change.
The offset from which to start removing.
The number of 16-bit units to delete. If the sum of
offset and count exceeds
length then all 16-bit units from offset
to the end of the data are deleted.
INDEX_SIZE_ERR: Raised if the specified offset
is negative or greater than the number of 16-bit units in
data, or if the specified count is
negative.
NO_MODIFICATION_ALLOWED_ERR: Raised if this node is readonly.
Replace the characters starting at the specified 16-bit unit offset with the specified
string.
The offset from which to start replacing.
The number of 16-bit units to replace. If the sum of
offset and count exceeds
length, then all 16-bit units to the end of the data
are replaced; (i.e., the effect is the same as a
remove method call with the same range, followed
by an append method invocation).
The DOMString with which the range must
be replaced.
INDEX_SIZE_ERR: Raised if the specified offset
is negative or greater than the number of 16-bit units in
data, or if the specified count is
negative.
NO_MODIFICATION_ALLOWED_ERR: Raised if this node is readonly.
DocumentFragment is a "lightweight" or "minimal"
Document object. It is very common to want to be able to
extract a portion of a document's tree or to create a new fragment of a
document. Imagine implementing a user command like cut or rearranging a
document by moving fragments around. It is desirable to have an object
which can hold such fragments and it is quite natural to use a Node for
this purpose. While it is true that a Document object could
fulfill this role, a Document object can potentially be a
heavyweight object, depending on the underlying implementation. What is
really needed for this is a very lightweight object.
DocumentFragment is such an object.
Furthermore, various operations -- such as inserting nodes as children
of another Node -- may take DocumentFragment
objects as arguments; this results in all the child nodes of the
DocumentFragment being moved to the child list of this
node.
The children of a DocumentFragment node are zero or more
nodes representing the tops of any sub-trees defining the structure of
the document. DocumentFragment nodes do not need to be
well-formed XML documents (although they do need to follow the rules
imposed upon well-formed XML parsed entities, which can have multiple top
nodes). For example, a DocumentFragment might have only one
child and that child node could be a Text node. Such a
structure model represents neither an HTML document nor a well-formed XML
document.
When a DocumentFragment is inserted into a
Document (or indeed any other Node that may
take children) the children of the DocumentFragment and not
the DocumentFragment itself are inserted into the
Node. This makes the DocumentFragment very
useful when the user wishes to create nodes that are siblings; the
DocumentFragment acts as the parent of these nodes so that
the user can use the standard methods from the Node
interface, such as insertBefore and
appendChild.
Objects implementing the NamedNodeMap interface are
used to represent collections of nodes that can be accessed by name. Note
that NamedNodeMap does not inherit from
NodeList; NamedNodeMaps are not maintained in
any particular order. Objects contained in an object implementing
NamedNodeMap may also be accessed by an ordinal index, but
this is simply to allow convenient enumeration of the contents of a
NamedNodeMap, and does not imply that the DOM specifies an
order to these Nodes.
NamedNodeMap objects in the DOM are live.
Retrieves a node specified by name.
The nodeName of a node to retrieve.
A Node (of any type) with the specified
nodeName, or null if it does not
identify any node in this map.
Adds a node using its nodeName attribute. If a node with
that name is already present in this map, it is replaced by the new
one.
As the nodeName attribute is used to
derive the name which the node must be stored under, multiple
nodes of certain types (those that have a "special" string
value) cannot be stored as the names would clash. This is seen
as preferable to allowing nodes to be aliased.
A node to store in this map. The node will later be
accessible using the value of its nodeName
attribute.
If the new Node replaces an existing node the
replaced Node is returned, otherwise null is
returned.
WRONG_DOCUMENT_ERR: Raised if arg was created
from a different document than the one that created this map.
NO_MODIFICATION_ALLOWED_ERR: Raised if this map is readonly.
INUSE_ATTRIBUTE_ERR: Raised if arg is an
Attr that is already an attribute of another
Element object. The DOM user must explicitly clone
Attr nodes to re-use them in other elements.
Removes a node specified by name. When this map contains the
attributes attached to an element, if the removed attribute is
known to have a default value, an attribute immediately appears
containing the default value as well as the corresponding namespace
URI, local name, and prefix when applicable.
The nodeName of the node to remove.
The node removed from this map if a node with such a name
exists.
NOT_FOUND_ERR: Raised if there is no node named
name in this map.
NO_MODIFICATION_ALLOWED_ERR: Raised if this map is readonly.
Returns the indexth item in the map.
If index is greater than or equal to the number
of nodes in this map, this returns null.
Index into this map.
The node at the indexth position in the map, or
null if that is not a valid index.
The number of nodes in this map. The range of valid child node
indices is 0 to length-1
inclusive.
Retrieves a node specified by local name and namespace
URI. HTML-only DOM implementations do not need to implement this
method.
The namespace URI of
the node to retrieve.
The local name of the
node to retrieve.
A Node (of any type) with the specified
local name and namespace URI, or null if they do not
identify any node in this map.
Adds a node using its namespaceURI and
localName. If a node with that namespace URI and that
local name is already present in this map, it is replaced by the new
one.
HTML-only DOM implementations do not need to implement this
method.
A node to store in this map. The node will later be
accessible using the value of its namespaceURI and
localName attributes.
If the new Node replaces an existing node the
replaced Node is returned, otherwise null
is returned.
WRONG_DOCUMENT_ERR: Raised if arg was created
from a different document than the one that created this map.
NO_MODIFICATION_ALLOWED_ERR: Raised if this map is readonly.
INUSE_ATTRIBUTE_ERR: Raised if arg is an
Attr that is already an attribute of another
Element object. The DOM user must explicitly clone
Attr nodes to re-use them in other elements.
Removes a node specified by local name and namespace URI. A
removed attribute may be known to have a default value when this map
contains the attributes attached to an element, as returned by the
attributes attribute of the Node interface. If so, an
attribute immediately appears containing the default value as well as
the corresponding namespace URI, local name, and prefix when
applicable.
HTML-only DOM implementations do not need to implement this
method.
The namespace URI of
the node to remove.
The local name of the
node to remove.
The node removed from this map if a node with such a local
name and namespace URI exists.
NOT_FOUND_ERR: Raised if there is no node with the specified
namespaceURI and localName in this
map.
NO_MODIFICATION_ALLOWED_ERR: Raised if this map is readonly.
The NodeList interface provides the abstraction of an
ordered collection of nodes, without defining or constraining how this
collection is implemented. NodeList objects in the DOM are
live.
The items in the NodeList are accessible via an
integral index, starting from 0.
Returns the indexth item in the collection.
If index is greater than or equal to the number
of nodes in the list, this returns null.
Index into the collection.
The node at the indexth position in the
NodeList, or null if that is not a
valid index.
The number of nodes in the list. The range of valid child node
indices is 0 to length-1 inclusive.
The DOMImplementation interface provides a
number of methods for performing operations that are independent
of any particular instance of the document object model.
Test if the DOM implementation implements a
specific feature.
The name of the feature to test (case-insensitive). The
values used by DOM features are defined throughout the DOM Level 2 specifications and listed in
the section. The name must be an
XML name. To avoid possible
conflicts, as a convention, names referring to features defined
outside the DOM specification should be made unique by reversing the name of
the Internet domain name of the person (or the organization that the
person belongs to) who defines the feature, component by component,
and using this as a prefix. For instance, the W3C SVG Working Group
defines the feature "org.w3c.dom.svg".
This is the version number of the feature to test. In Level
2, the string can be either "2.0" or "1.0". If the version is not
specified, supporting any version of the feature causes the method
to return true.
true if the feature is implemented in the
specified version, false otherwise.
Creates an empty DocumentType node. Entity
declarations and notations are not made available. Entity reference
expansions and default attribute additions do not occur. It is expected
that a future version of the DOM will provide a way for populating a
DocumentType.
HTML-only DOM implementations do not need to
implement this method.
The qualified name
of the document type to be created.
The external subset public identifier.
The external subset system identifier.
A new DocumentType node with
Node.ownerDocument set to null.
INVALID_CHARACTER_ERR: Raised if the specified qualified name
contains an illegal character.
NAMESPACE_ERR: Raised if the qualifiedName is
malformed.
Creates an XML Document object of the specified type
with its document element. HTML-only DOM implementations do not need to
implement this method.
The namespace URI of
the document element to create.
The qualified name
of the document element to be created.
The type of document to be created or null.
When doctype is not null, its
Node.ownerDocument attribute is set to the document
being created.
A new Document object.
INVALID_CHARACTER_ERR: Raised if the specified qualified name
contains an illegal character.
NAMESPACE_ERR: Raised if the qualifiedName is
malformed, if the qualifiedName has a prefix and
the namespaceURI is null, or if
the qualifiedName has a prefix that
is "xml" and the namespaceURI is different
from "xml-ns;" .
WRONG_DOCUMENT_ERR: Raised if doctype has already
been used with a different document or was created from a different
implementation.
gmetadom-0.2.6/libgdome2.spec.in 0000644 0001750 0001750 00000004315 07634537377 013412 0000000 0000000 #
# gmetadom RPM specification for libgdome2 packages
#
%define ver @VERSION@
%define RELEASE 2
%define rel %{?CUSTOM_RELEASE} %{!?CUSTOM_RELEASE:%RELEASE}
%define prefix /usr
Summary: C++ Wrapper for GDOME
Name: libgdome2
Version: %ver
Release: %rel
Group: System Environment/Libraries
Source: http://unc.dl.sourceforge.net/sourceforge/gmetadom/gmetadom-%{ver}.tar.gz
Copyright: LGPL
BuildRoot: /var/tmp/gmetadom-%{PACKAGE_VERSION}-root
Prefix: %{prefix}
Docdir: %{prefix}/doc
Prereq: /sbin/install-info
URL: http://gmetadom.sourceforge.net/
Requires: glib
Requires: gdome2
Requires: libxslt
%description
GMetaDOM is a collection of libraries, each library providing a
DOM implementation. Each DOM implementation is generated
automatically by means of XSLT stylesheets.
Each subpackage is a language specific binding to the library.
%prep
%setup -c gmetadom-%{ver}
pwd
%build
pwd
cd gmetadom-%{ver}
./configure --with-module=gdome_cpp_smart --prefix=%prefix
make
%install
rm -rf $RPM_BUILD_ROOT
mkdir -p $RPM_BUILD_ROOT%{prefix}
cd gmetadom-%{ver}
make prefix=$RPM_BUILD_ROOT%{prefix} install
strip $RPM_BUILD_ROOT%{prefix}/bin/* || :
%clean
rm -rf $RPM_BUILD_ROOT
# ==============================================================
# C++ Smart Pointer Library
# ==============================================================
%package -n libgdome2-cpp-smart
Provides: libgdome2-cpp-smart
Summary: C++ Binding with Smart Pointers
Group: System Environment/Libraries
%description -n libgdome2-cpp-smart
This package provides a C++ binding with smart pointers.
%files -n libgdome2-cpp-smart
%dir %{prefix}/include/gmetadom
%dir %{prefix}/include/gmetadom/gdome_cpp_smart
%{prefix}/include/gmetadom/gdome_cpp_smart/*.hh
%{prefix}/lib/libgmetadom_gdome_cpp_smart.so.%{ver}
%{prefix}/lib/libgmetadom_gdome_cpp_smart.la
%{prefix}/lib/libgmetadom_gdome_cpp_smart.a
%{prefix}/share/gmetadom/gdome_cpp_smart.conf
%{prefix}/bin/gmetadom-config
%changelog
* Wed Oct 2 2002 Joel Sherrill
- Changed name of package to reflect Debian packaging.
- Put some infrastructure in place so supporting other
language bindings as subpackages is possible.
* Tue Oct 1 2002 Joel Sherrill
- First attempt.
gmetadom-0.2.6/src/ 0000777 0001750 0001750 00000000000 10704633444 011115 5 0000000 0000000 gmetadom-0.2.6/src/shared/ 0000777 0001750 0001750 00000000000 10704633444 012363 5 0000000 0000000 gmetadom-0.2.6/src/shared/UTF8String.hh.in 0000644 0001750 0001750 00000002447 07562177475 015170 0000000 0000000 /* This file is part of GMetaDOM
* a generic bind package for the Document Object Model API.
* Copyright (C) 2001-2002 Luca Padovani
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
* For more information, please visit the project home page
* http://gmetadom.sourceforge.net
* or send an email to
*/
#ifndef __@DOM_NAMESPACE@UTF8String_hh__
#define __@DOM_NAMESPACE@UTF8String_hh__
#include
#include "@DOM_NAMESPACE@Char.hh"
namespace @DOM_NAMESPACE@ {
typedef std::basic_string UTF8String;
}
#endif // __@DOM_NAMESPACE@UTF8String_hh__
gmetadom-0.2.6/src/shared/DOMException.cc.in 0000644 0001750 0001750 00000002777 07531747665 015545 0000000 0000000 /* This file is part of MetaDOM
* a generic bind package for the Document Object Model API.
* Copyright (C) 2001 Luca Padovani
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
* For more information, please visit the author's home page
* http://www.cs.unibo.it/~lpadovan
* or send an email to
*/
#include
#include "@DOM_NAMESPACE@GdomeString.hh"
#include "@DOM_NAMESPACE@DOMException.hh"
namespace @DOM_NAMESPACE@ {
DOMException::DOMException(unsigned short c) : code(c) { }
DOMException::DOMException(unsigned short c, const GdomeString& s) : code(c), msg(s) { }
DOMException::DOMException(const DOMException& exc)
{
*this = exc;
}
DOMException& DOMException::operator=(const DOMException& exc)
{
code = exc.code;
msg = exc.msg;
return *this;
}
}
gmetadom-0.2.6/src/shared/UTF16String.hh.in 0000644 0001750 0001750 00000002454 07562177475 015245 0000000 0000000 /* This file is part of GMetaDOM
* a generic bind package for the Document Object Model API.
* Copyright (C) 2001-2002 Luca Padovani
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
* For more information, please visit the project home page
* http://gmetadom.sourceforge.net
* or send an email to
*/
#ifndef __@DOM_NAMESPACE@UTF16String_hh__
#define __@DOM_NAMESPACE@UTF16String_hh__
#include
#include "@DOM_NAMESPACE@Char.hh"
namespace @DOM_NAMESPACE@ {
typedef std::basic_string UTF16String;
}
#endif // __@DOM_NAMESPACE@UTF16String_hh__
gmetadom-0.2.6/src/shared/GdomeString.hh.in 0000644 0001750 0001750 00000005076 07740226624 015463 0000000 0000000 /* This file is part of GMetaDOM
* a generic bind package for the Document Object Model API.
* Copyright (C) 2001-2002 Luca Padovani
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
* For more information, please visit the project home page
* http://gmetadom.sourceforge.net
* or send an email to
*/
#ifndef __@DOM_NAMESPACE@GdomeString_hh__
#define __@DOM_NAMESPACE@GdomeString_hh__
#include
#include
#include
#include "@DOM_NAMESPACE@Char.hh"
#include "@DOM_NAMESPACE@UTF8String.hh"
#include "@DOM_NAMESPACE@UTF16String.hh"
#include "@DOM_NAMESPACE@UCS4String.hh"
#include "@DOM_NAMESPACE@DOMString.hh"
namespace @DOM_NAMESPACE@ {
class GdomeString
{
public:
GdomeString(void);
GdomeString(const char* s);
GdomeString(const GdomeString& s);
GdomeString(const UTF8String& s);
GdomeString(const UTF16String& s);
GdomeString(const UCS4String& s);
explicit GdomeString(GdomeDOMString* gdome_str);
explicit GdomeString(GdomeDOMString* gdome_str, bool) : str(gdome_str) { }
~GdomeString();
bool null(void) const { return str == 0; }
bool empty(void) const;
unsigned length(void) const;
bool operator==(const GdomeString& s) const;
bool operator!=(const GdomeString& s) const { return !(*this == s); }
GdomeString& operator=(const GdomeString& s);
GdomeString operator+(const GdomeString& s) const;
operator UTF8String() const;
operator UTF16String() const;
operator UCS4String() const;
GdomeDOMString* gdome_str(void) const;
operator GdomeDOMString*() const { return str; };
friend std::ostream& operator<<(std::ostream&, const GdomeString&);
class NullString { };
private:
GdomeDOMString* str;
};
}
#endif // __@DOM_NAMESPACE@GdomeString_hh__
gmetadom-0.2.6/src/shared/DOMException.hh.in 0000644 0001750 0001750 00000004043 07531747665 015543 0000000 0000000 /* This file is part of MetaDOM
* a generic bind package for the Document Object Model API.
* Copyright (C) 2001 Luca Padovani
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
* For more information, please visit the author's home page
* http://www.cs.unibo.it/~lpadovan
* or send an email to
*/
#ifndef __@DOM_NAMESPACE@DOMException_hh__
#define __@DOM_NAMESPACE@DOMException_hh__
#include "@DOM_NAMESPACE@GdomeString.hh"
namespace @DOM_NAMESPACE@ {
class DOMException {
public:
enum DOMExceptionCode {
INDEX_SIZE_ERR = 1,
DOMSTRING_SIZE_ERR = 2,
HIERARCHY_REQUEST_ERR = 3,
WRONG_DOCUMENT_ERR = 4,
INVALID_CHARACTER_ERR = 5,
NO_DATA_ALLOWED_ERR = 6,
NO_MODIFICATION_ALLOWED_ERR = 7,
NOT_FOUND_ERR = 8,
NOT_SUPPORTED_ERR = 9,
INUSE_ATTRIBUTE_ERR = 10,
INVALID_STATE_ERR = 11,
SYNTAX_ERR = 12,
INVALID_MODIFICATION_ERR = 13,
NAMESPACE_ERR = 14,
INVALID_ACCESS_ERR = 15
};
DOMException(unsigned short c);
DOMException(unsigned short c, const GdomeString& m);
DOMException(const DOMException&);
DOMException& operator=(const DOMException&);
unsigned short code;
GdomeString msg;
};
}
#endif // __@DOM_NAMESPACE@DOMException_hh__
gmetadom-0.2.6/src/shared/DOMTimeStamp.hh.in 0000644 0001750 0001750 00000002631 07400541553 015470 0000000 0000000 /* This file is part of MetaDOM
* a generic bind package for the Document Object Model API.
* Copyright (C) 2001 Luca Padovani
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
* For more information, please visit the author's home page
* http://www.cs.unibo.it/~lpadovan
* or send an email to
*/
#ifndef __@DOM_NAMESPACE@DOMTimeStamp_hh__
#define __@DOM_NAMESPACE@DOMTimeStamp_hh__
#ifdef HAVE_GLIB
#include
namespace @DOM_NAMESPACE@ {
typedef guint64 DOMTimeStamp;
}
#else
// FIXME: that the following does not assure that
// a DOMTimeStamp is 64 bits long!
typedef unsigned long long DOMTimeStamp;
#endif
#endif // __@DOM_NAMESPACE@DOMTimeStamp_hh__
gmetadom-0.2.6/src/shared/GdomeString.cc.in 0000644 0001750 0001750 00000022723 10610202074 015426 0000000 0000000 /* This file is part of GMetaDOM
* a generic bind package for the Document Object Model API.
* Copyright (C) 2001-2002 Luca Padovani
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
* For more information, please visit the project home page
* http://gmetadom.sourceforge.net
* or send an email to
*/
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include "@DOM_NAMESPACE@GdomeString.hh"
#include "@DOM_NAMESPACE@UTF8String.hh"
#include "@DOM_NAMESPACE@UTF16String.hh"
#include "@DOM_NAMESPACE@UCS4String.hh"
#if defined(WORDS_BIGENDIAN)
#define ICONV_UTF16 ICONV_UTF16BE
#else
#if !defined(ICONV_UTF16LE)
#define ICONV_UTF16 ICONV_UTF16BE
#define UTF16_BIGENDIAN
#else
#define ICONV_UTF16 ICONV_UTF16LE
#endif
#endif
#if defined(WORDS_BIGENDIAN)
#define ICONV_UCS4 ICONV_UCS4BE
#else
#if !defined(ICONV_UCS4LE)
#define ICONV_UCS4 ICONV_UCS4BE
#define UCS4_BIGENDIAN
#else
#define ICONV_UCS4 ICONV_UCS4LE
#endif
#endif
namespace @DOM_NAMESPACE@ {
static size_t
convertString(const void* source, size_t inBytesLeft, const char* sourceEnc,
void** dest, const char* destEnc)
{
assert(source != 0);
assert(sourceEnc != 0);
assert(dest != 0);
assert(destEnc != 0);
*dest = 0;
iconv_t cd = iconv_open(destEnc, sourceEnc);
if (cd == (iconv_t) -1) return 0;
static char buffer[128];
size_t outBytesLeft = sizeof(buffer);
#ifdef ICONV_CONST
const char* inbuf = reinterpret_cast(source);
#else
char* inbuf = new char[inBytesLeft];
assert(inbuf != NULL);
memcpy(inbuf, source, inBytesLeft);
char* inbuf0 = inbuf;
#endif // ICONV_CONST
char* outbuf = reinterpret_cast(buffer);
char* outbuf0 = buffer;
size_t nConv = 0;
char* res = NULL;
while (inBytesLeft > 0) {
//cout << "before: " << (void*) inbuf << " " << inBytesLeft << " " << (void*) outbuf << " " << outBytesLeft << endl;
size_t iconv_res = iconv(cd, &inbuf, &inBytesLeft, &outbuf, &outBytesLeft);
//cout << "after: " << (void*) inbuf << " " << inBytesLeft << " " << (void*) outbuf << " " << outBytesLeft << endl;
unsigned n = outbuf - outbuf0;
if (res == NULL) {
nConv = n;
res = new char[nConv];
assert(res != NULL);
memcpy(res, buffer, n);
} else {
char* newRes = new char[n + nConv];
assert(res != NULL);
memcpy(newRes, res, nConv);
memcpy(newRes + nConv, buffer, n);
delete [] res;
res = newRes;
nConv += n;
}
if (iconv_res == (size_t) -1) {
if (errno == E2BIG) {
outbuf = outbuf0;
outBytesLeft = sizeof(buffer);
} else {
perror("iconv: ");
break;
}
}
}
*dest = res;
#ifndef ICONV_CONST
delete [] inbuf0;
#endif // ICONV_CONST
iconv_close(cd);
return nConv;
}
static size_t
UCS4ofUTF8(const Char8* source, size_t size, Char32** dest)
{
assert(dest != 0);
size_t length = convertString(source, size * sizeof(Char8), ICONV_UTF8,
reinterpret_cast(dest), ICONV_UCS4);
length /= sizeof(Char32);
#if !defined(WORDS_BIGENDIAN) && defined(UCS4_BIGENDIAN)
for (unsigned i = 0; i < length; i++)
(*dest)[i] = GUINT32_SWAP_LE_BE((*dest)[i]);
#endif
return length;
}
static size_t
UTF8ofUCS4(const Char32* source, size_t size, Char8** dest)
{
assert(dest != 0);
#if !defined(WORDS_BIGENDIAN) && defined(UCS4_BIGENDIAN)
Char32* sourceBuffer = new Char32[size];
for (unsigned i = 0; i < size; i++)
sourceBuffer[i] = GUINT32_SWAP_LE_BE(source[i]);
#else
const Char32* sourceBuffer = source;
#endif
size_t length = convertString(sourceBuffer, size * sizeof(Char32), ICONV_UCS4,
reinterpret_cast(dest), ICONV_UTF8);
length /= sizeof(Char8);
#if !defined(WORDS_BIGENDIAN) && defined(UCS4_BIGENDIAN)
delete [] sourceBuffer;
#endif
return length;
}
static size_t
UTF16ofUTF8(const Char8* source, size_t size, Char16** dest)
{
assert(dest != 0);
size_t length = convertString(source, size * sizeof(Char8), ICONV_UTF8,
reinterpret_cast(dest), ICONV_UTF16);
length /= sizeof(Char16);
#if !defined(WORDS_BIGENDIAN) && defined(UTF16_BIGENDIAN)
for (unsigned i = 0; i < length; i++)
(*dest)[i] = GUINT16_SWAP_LE_BE((*dest)[i]);
#endif
return length;
}
static size_t
UTF8ofUTF16(const Char16* source, size_t size, Char8** dest)
{
assert(dest != 0);
#if !defined(WORDS_BIGENDIAN) && defined(UTF16_BIGENDIAN)
Char16* sourceBuffer = new Char16[size];
for (unsigned i = 0; i < size; i++)
sourceBuffer[i] = GUINT16_SWAP_LE_BE(source[i]);
#else
const Char16* sourceBuffer = source;
#endif
size_t length = convertString(sourceBuffer, size * sizeof(Char16), ICONV_UTF16,
reinterpret_cast(dest), ICONV_UTF8);
length /= sizeof(Char8);
#if !defined(WORDS_BIGENDIAN) && defined(UTF16_BIGENDIAN)
delete [] sourceBuffer;
#endif
return length;
}
GdomeString::GdomeString()
{
str = 0;
}
GdomeString::GdomeString(const char* s)
{
if (s == 0) str = 0;
else str = gdome_str_mkref_dup(s);
}
GdomeString::GdomeString(const UTF8String& s)
{
if (s.data() == 0) str = 0;
else
{
assert(sizeof(char) == sizeof(Char8));
char* buffer = reinterpret_cast(malloc((s.length() + 1) * sizeof(char)));
memcpy(buffer, s.data(), s.length());
buffer[s.length()] = '\0';
str = gdome_str_mkref_own(buffer);
}
}
GdomeString::GdomeString(const UTF16String& s)
{
if (s.data() == 0) str = 0;
else
{
assert(sizeof(char) == sizeof(Char8));
Char8* destBuffer;
size_t length = UTF8ofUTF16(s.data(), s.length(), &destBuffer);
char* buffer = reinterpret_cast(malloc((length + 1) * sizeof(char)));
memcpy(buffer, destBuffer, length);
buffer[length] = '\0';
delete [] destBuffer;
str = gdome_str_mkref_own(buffer);
}
}
GdomeString::GdomeString(const UCS4String& s)
{
if (s.data() == 0) str = 0;
else
{
assert(sizeof(char) == sizeof(Char8));
Char8* destBuffer;
size_t length = UTF8ofUCS4(s.data(), s.length(), &destBuffer);
char* buffer = reinterpret_cast(malloc((length + 1) * sizeof(char)));
memcpy(buffer, destBuffer, length);
buffer[length] = '\0';
delete [] destBuffer;
str = gdome_str_mkref_own(buffer);
}
}
GdomeString::GdomeString(GdomeDOMString* s)
{
str = s;
if (str != 0) gdome_str_ref(str);
}
GdomeString::GdomeString(const GdomeString& s)
{
str = s.str;
if (str != 0) gdome_str_ref(str);
}
GdomeString::~GdomeString()
{
if (str != 0)
{
gdome_str_unref(str);
str = 0;
}
}
bool
GdomeString::empty(void) const
{
if (str == 0) throw NullString();
else
{
unsigned length = gdome_str_length(str);
for (unsigned i = 0; i < length; i++)
if (!isspace(str->str[i])) return false;
return true;
}
}
bool
GdomeString::operator==(const GdomeString& s) const
{
if (str == 0) return (s.str == 0);
else if (s.str == 0) return false;
else return gdome_str_equal(str, s.str) ? true : false;
}
GdomeString&
GdomeString::operator=(const GdomeString& s)
{
if (this == &s) return *this;
if (s.str != 0) gdome_str_ref(s.str);
if (str != 0) gdome_str_unref(str);
str = s.str;
return *this;
}
GdomeString
GdomeString::operator+(const GdomeString& s) const
{
if (str == 0) return GdomeString(s.str);
else if (s.str == 0) return *this;
else return GdomeString(gdome_str_concat(str, s.str), false);
}
unsigned
GdomeString::length() const
{
if (str == 0) throw NullString();
else return gdome_str_length(str);
}
GdomeDOMString*
GdomeString::gdome_str() const
{
if (str != 0) gdome_str_ref(str);
return str;
}
GdomeString::operator UTF8String() const
{
if (str == 0) throw NullString();
return UTF8String(reinterpret_cast(str->str), this->length());
}
GdomeString::operator UTF16String() const
{
if (str == 0) throw NullString();
assert(sizeof(char) == sizeof(Char8));
Char16* destBuffer;
size_t length = UTF16ofUTF8(reinterpret_cast(str->str), this->length(), &destBuffer);
UTF16String res(destBuffer, length);
delete [] destBuffer;
return res;
}
GdomeString::operator UCS4String() const
{
if (str == 0) throw NullString();
assert(sizeof(char) == sizeof(Char8));
Char32* destBuffer;
size_t length = UCS4ofUTF8(reinterpret_cast(str->str), this->length(), &destBuffer);
UCS4String res(destBuffer, length);
delete [] destBuffer;
return res;
}
std::ostream&
operator<<(std::ostream& o, const GdomeString& str)
{
if (str.null()) o << "(null)";
else o << (char*) str.str->str;
return o;
}
}
gmetadom-0.2.6/src/shared/DOMString.hh.in 0000644 0001750 0001750 00000002410 07531747665 015047 0000000 0000000 /* This file is part of MetaDOM
* a generic bind package for the Document Object Model API.
* Copyright (C) 2001 Luca Padovani
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
* For more information, please visit the author's home page
* http://www.cs.unibo.it/~lpadovan
* or send an email to
*/
#ifndef __@DOM_NAMESPACE@DOMString_hh__
#define __@DOM_NAMESPACE@DOMString_hh__
#include "@DOM_NAMESPACE@UTF16String.hh"
namespace @DOM_NAMESPACE@ {
typedef UTF16String DOMString;
}
#endif // __@DOM_NAMESPACE@DOMString_hh__
gmetadom-0.2.6/src/shared/Makefile.am 0000644 0001750 0001750 00000000657 07610561733 014346 0000000 0000000
EXTRA_DIST = \
Traits.hh.in \
Char.hh.in.in \
DOMException.hh.in \
DOMException.cc.in \
GdomeString.hh.in \
GdomeString.cc.in \
UTF8String.hh.in \
UTF16String.hh.in \
UCS4String.hh.in \
DOMString.hh.in \
DOMString.hh.in \
DOMTimeStamp.hh.in
#Char.hh.in : $(srcdir)/Char.hh.top $(srcdir)/Char.hh.bot dump_types
# @cat $< >$@
# @$(top_builddir)/src/shared/dump_types >>$@
# @cat $(srcdir)/Char.hh.bot >>$@
gmetadom-0.2.6/src/shared/Traits.hh.in 0000644 0001750 0001750 00000006616 07610773603 014510 0000000 0000000 /* This file is part of GMetaDOM
* a generic bind package for the Document Object Model API.
* Copyright (C) 2001-2003 Luca Padovani
*
* The template specialization found in this file has been contributed
* by Benjamin Kosnik who has given permission for inclusion in this
* LGPL library.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
* For more information, please visit the project's home page
* http://gmetadom.sourceforge.net
* or send an email to
*/
#include
#include "@DOM_NAMESPACE@Char.hh"
namespace std {
template<>
struct char_traits<@DOM_NAMESPACE@::Char16>
{
typedef @DOM_NAMESPACE@::Char16 char_type;
typedef unsigned long int_type;
typedef streampos pos_type;
typedef streamoff off_type;
typedef mbstate_t state_type;
static void
assign(char_type& __c1, const char_type& __c2)
{ __c1 = __c2; }
static bool
eq(const char_type& __c1, const char_type& __c2)
{ return __c1 == __c2; }
static bool
lt(const char_type& __c1, const char_type& __c2)
{ return __c1 < __c2; }
static int
compare(const char_type* __s1, const char_type* __s2, size_t __n)
{
for (size_t __i = 0; __i < __n; ++__i)
if (!eq(__s1[__i], __s2[__i]))
return lt(__s1[__i], __s2[__i]) ? -1 : 1;
return 0;
}
static size_t
length(const char_type* __s)
{
const char_type* __p = __s;
while (*__p) ++__p;
return (__p - __s);
}
static const char_type*
find(const char_type* __s, size_t __n, const char_type& __a)
{
for (const char_type* __p = __s; size_t(__p - __s) < __n; ++__p)
if (*__p == __a) return __p;
return 0;
}
static char_type*
move(char_type* __s1, const char_type* __s2, size_t __n)
{ return (char_type*) memmove(__s1, __s2, __n * sizeof(char_type)); }
static char_type*
copy(char_type* __s1, const char_type* __s2, size_t __n)
{ return (char_type*) memcpy(__s1, __s2, __n * sizeof(char_type)); }
static char_type*
assign(char_type* __s, size_t __n, char_type __a)
{
for (char_type* __p = __s; __p < __s + __n; ++__p)
assign(*__p, __a);
return __s;
}
static char_type
to_char_type(const int_type& __c)
{
char_type __r = { __c };
return __r;
}
static int_type
to_int_type(const char_type& __c)
{ return int_type(__c); }
static bool
eq_int_type(const int_type& __c1, const int_type& __c2)
{ return __c1 == __c2; }
static int_type
eof() { return static_cast(-1); }
static int_type
not_eof(const int_type& __c)
{ return eq_int_type(__c, eof()) ? int_type(0) : __c; }
};
}
gmetadom-0.2.6/src/shared/UCS4String.hh.in 0000644 0001750 0001750 00000002450 07562177475 015152 0000000 0000000 /* This file is part of GMetaDOM
* a generic bind package for the Document Object Model API.
* Copyright (C) 2001-2002 Luca Padovani
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
* For more information, please visit the project home page
* http://gmetadom.sourceforge.net
* or send an email to
*/
#ifndef __@DOM_NAMESPACE@UCS4String_hh__
#define __@DOM_NAMESPACE@UCS4String_hh__
#include
#include "@DOM_NAMESPACE@Char.hh"
namespace @DOM_NAMESPACE@ {
typedef std::basic_string UCS4String;
}
#endif // __@DOM_NAMESPACE@UCS4String_hh__
gmetadom-0.2.6/src/shared/Makefile.in 0000644 0001750 0001750 00000024112 10704633025 014337 0000000 0000000 # Makefile.in generated by automake 1.9.6 from Makefile.am.
# @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
# 2003, 2004, 2005 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE.
@SET_MAKE@
srcdir = @srcdir@
top_srcdir = @top_srcdir@
VPATH = @srcdir@
pkgdatadir = $(datadir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
top_builddir = ../..
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
INSTALL = @INSTALL@
install_sh_DATA = $(install_sh) -c -m 644
install_sh_PROGRAM = $(install_sh) -c
install_sh_SCRIPT = $(install_sh) -c
INSTALL_HEADER = $(INSTALL_DATA)
transform = $(program_transform_name)
NORMAL_INSTALL = :
PRE_INSTALL = :
POST_INSTALL = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
build_triplet = @build@
host_triplet = @host@
subdir = src/shared
DIST_COMMON = $(srcdir)/Char.hh.in.in $(srcdir)/Makefile.am \
$(srcdir)/Makefile.in
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
mkinstalldirs = $(install_sh) -d
CONFIG_HEADER = $(top_builddir)/config.h
CONFIG_CLEAN_FILES = Char.hh.in
SOURCES =
DIST_SOURCES =
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@
ALL_TRAITS = @ALL_TRAITS@
AMDEP_FALSE = @AMDEP_FALSE@
AMDEP_TRUE = @AMDEP_TRUE@
AMTAR = @AMTAR@
AR = @AR@
AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
CHAR_UNSIGNED = @CHAR_UNSIGNED@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
CXX = @CXX@
CXXCPP = @CXXCPP@
CXXDEPMODE = @CXXDEPMODE@
CXXFLAGS = @CXXFLAGS@
CYGPATH_W = @CYGPATH_W@
DEFS = @DEFS@
DEPDIR = @DEPDIR@
ECHO = @ECHO@
ECHO_C = @ECHO_C@
ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
EGREP = @EGREP@
EXEEXT = @EXEEXT@
F77 = @F77@
FFLAGS = @FFLAGS@
GDOME_CFLAGS = @GDOME_CFLAGS@
GDOME_LIBS = @GDOME_LIBS@
GMETADOM_MODULES = @GMETADOM_MODULES@
GMETADOM_SIZEOF_CHAR = @GMETADOM_SIZEOF_CHAR@
GMETADOM_SIZEOF_INT = @GMETADOM_SIZEOF_INT@
GMETADOM_SIZEOF_LONG = @GMETADOM_SIZEOF_LONG@
GMETADOM_SIZEOF_LONG_LONG = @GMETADOM_SIZEOF_LONG_LONG@
GMETADOM_SIZEOF_SHORT = @GMETADOM_SIZEOF_SHORT@
GMETADOM_SIZEOF_WCHAR_T = @GMETADOM_SIZEOF_WCHAR_T@
GMETADOM_VERSION_INFO = @GMETADOM_VERSION_INFO@
GREP = @GREP@
HAVE_ICONV = @HAVE_ICONV@
HAVE_OCAMLC = @HAVE_OCAMLC@
HAVE_OCAMLDEP = @HAVE_OCAMLDEP@
HAVE_OCAMLFIND = @HAVE_OCAMLFIND@
HAVE_OCAMLOPT = @HAVE_OCAMLOPT@
HAVE_OCAMLOPT_COND_FALSE = @HAVE_OCAMLOPT_COND_FALSE@
HAVE_OCAMLOPT_COND_TRUE = @HAVE_OCAMLOPT_COND_TRUE@
HAVE_SED = @HAVE_SED@
HAVE_SED_COND_FALSE = @HAVE_SED_COND_FALSE@
HAVE_SED_COND_TRUE = @HAVE_SED_COND_TRUE@
HAVE_XSLTPROC = @HAVE_XSLTPROC@
HAVE_XSLTPROC_COND_FALSE = @HAVE_XSLTPROC_COND_FALSE@
HAVE_XSLTPROC_COND_TRUE = @HAVE_XSLTPROC_COND_TRUE@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
LDFLAGS = @LDFLAGS@
LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
LIBTOOL = @LIBTOOL@
LN_S = @LN_S@
LTLIBOBJS = @LTLIBOBJS@
MAKEINFO = @MAKEINFO@
OBJEXT = @OBJEXT@
OCAMLC = @OCAMLC@
OCAMLDEP = @OCAMLDEP@
OCAMLFIND = @OCAMLFIND@
OCAMLOPT = @OCAMLOPT@
OCAML_CFLAGS = @OCAML_CFLAGS@
OCAML_LIB_PREFIX = @OCAML_LIB_PREFIX@
PACKAGE = @PACKAGE@
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
PACKAGE_NAME = @PACKAGE_NAME@
PACKAGE_STRING = @PACKAGE_STRING@
PACKAGE_TARNAME = @PACKAGE_TARNAME@
PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@
PKG_CONFIG = @PKG_CONFIG@
RANLIB = @RANLIB@
SED = @SED@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
STD_TRAITS = @STD_TRAITS@
STRIP = @STRIP@
TRAIT_SPEC = @TRAIT_SPEC@
VERSION = @VERSION@
XSLTPROC = @XSLTPROC@
ac_ct_CC = @ac_ct_CC@
ac_ct_CXX = @ac_ct_CXX@
ac_ct_F77 = @ac_ct_F77@
am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@
am__include = @am__include@
am__leading_dot = @am__leading_dot@
am__quote = @am__quote@
am__tar = @am__tar@
am__untar = @am__untar@
bindir = @bindir@
build = @build@
build_alias = @build_alias@
build_cpu = @build_cpu@
build_os = @build_os@
build_vendor = @build_vendor@
datadir = @datadir@
datarootdir = @datarootdir@
docdir = @docdir@
dvidir = @dvidir@
exec_prefix = @exec_prefix@
host = @host@
host_alias = @host_alias@
host_cpu = @host_cpu@
host_os = @host_os@
host_vendor = @host_vendor@
htmldir = @htmldir@
includedir = @includedir@
infodir = @infodir@
install_sh = @install_sh@
libdir = @libdir@
libexecdir = @libexecdir@
localedir = @localedir@
localstatedir = @localstatedir@
mandir = @mandir@
mkdir_p = @mkdir_p@
oldincludedir = @oldincludedir@
pdfdir = @pdfdir@
prefix = @prefix@
program_transform_name = @program_transform_name@
psdir = @psdir@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
sysconfdir = @sysconfdir@
target_alias = @target_alias@
EXTRA_DIST = \
Traits.hh.in \
Char.hh.in.in \
DOMException.hh.in \
DOMException.cc.in \
GdomeString.hh.in \
GdomeString.cc.in \
UTF8String.hh.in \
UTF16String.hh.in \
UCS4String.hh.in \
DOMString.hh.in \
DOMString.hh.in \
DOMTimeStamp.hh.in
all: all-am
.SUFFIXES:
$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
@for dep in $?; do \
case '$(am__configure_deps)' in \
*$$dep*) \
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
&& exit 0; \
exit 1;; \
esac; \
done; \
echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/shared/Makefile'; \
cd $(top_srcdir) && \
$(AUTOMAKE) --gnu src/shared/Makefile
.PRECIOUS: Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
@case '$?' in \
*config.status*) \
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
*) \
echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
esac;
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(top_srcdir)/configure: $(am__configure_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(ACLOCAL_M4): $(am__aclocal_m4_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
Char.hh.in: $(top_builddir)/config.status $(srcdir)/Char.hh.in.in
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
mostlyclean-libtool:
-rm -f *.lo
clean-libtool:
-rm -rf .libs _libs
distclean-libtool:
-rm -f libtool
uninstall-info-am:
tags: TAGS
TAGS:
ctags: CTAGS
CTAGS:
distdir: $(DISTFILES)
@srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
list='$(DISTFILES)'; for file in $$list; do \
case $$file in \
$(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
$(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
esac; \
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
if test "$$dir" != "$$file" && test "$$dir" != "."; then \
dir="/$$dir"; \
$(mkdir_p) "$(distdir)$$dir"; \
else \
dir=''; \
fi; \
if test -d $$d/$$file; then \
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
fi; \
cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
else \
test -f $(distdir)/$$file \
|| cp -p $$d/$$file $(distdir)/$$file \
|| exit 1; \
fi; \
done
check-am: all-am
check: check-am
all-am: Makefile
installdirs:
install: install-am
install-exec: install-exec-am
install-data: install-data-am
uninstall: uninstall-am
install-am: all-am
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
installcheck: installcheck-am
install-strip:
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
`test -z '$(STRIP)' || \
echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
mostlyclean-generic:
clean-generic:
distclean-generic:
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
maintainer-clean-generic:
@echo "This command is intended for maintainers to use"
@echo "it deletes files that may require special tools to rebuild."
clean: clean-am
clean-am: clean-generic clean-libtool mostlyclean-am
distclean: distclean-am
-rm -f Makefile
distclean-am: clean-am distclean-generic distclean-libtool
dvi: dvi-am
dvi-am:
html: html-am
info: info-am
info-am:
install-data-am:
install-exec-am:
install-info: install-info-am
install-man:
installcheck-am:
maintainer-clean: maintainer-clean-am
-rm -f Makefile
maintainer-clean-am: distclean-am maintainer-clean-generic
mostlyclean: mostlyclean-am
mostlyclean-am: mostlyclean-generic mostlyclean-libtool
pdf: pdf-am
pdf-am:
ps: ps-am
ps-am:
uninstall-am: uninstall-info-am
.PHONY: all all-am check check-am clean clean-generic clean-libtool \
distclean distclean-generic distclean-libtool distdir dvi \
dvi-am html html-am info info-am install install-am \
install-data install-data-am install-exec install-exec-am \
install-info install-info-am install-man install-strip \
installcheck installcheck-am installdirs maintainer-clean \
maintainer-clean-generic mostlyclean mostlyclean-generic \
mostlyclean-libtool pdf pdf-am ps ps-am uninstall uninstall-am \
uninstall-info-am
#Char.hh.in : $(srcdir)/Char.hh.top $(srcdir)/Char.hh.bot dump_types
# @cat $< >$@
# @$(top_builddir)/src/shared/dump_types >>$@
# @cat $(srcdir)/Char.hh.bot >>$@
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:
gmetadom-0.2.6/src/shared/Char.hh.in.in 0000644 0001750 0001750 00000004436 07610561732 014520 0000000 0000000 /* This file is part of GMetaDOM
* a generic bind package for the Document Object Model API.
* Copyright (C) 2001-2002 Luca Padovani
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
* For more information, please visit the project's home page
* http://gmetadom.sourceforge.net
* or send an email to
*/
#ifndef __@DOM_NAMESPACE@Char_hh__
#define __@DOM_NAMESPACE@Char_hh__
namespace @DOM_NAMESPACE@ {
#if 1 == @CHAR_UNSIGNED@
#define GMETADOM_CHAR_UNSIGNED 1
#endif
#if 1 == @GMETADOM_SIZEOF_CHAR@
typedef char Char8;
#else
#error "could not define type Char8"
#endif
#if 2 == @GMETADOM_SIZEOF_CHAR@
typedef char Char16;
#elif 2 == @GMETADOM_SIZEOF_WCHAR_T@
typedef wchar_t Char16;
#elif 1 == @ALL_TRAITS@
#if 2 == @GMETADOM_SIZEOF_SHORT@
typedef unsigned short Char16;
#elif 2 == @GMETADOM_SIZEOF_INT@
typedef unsigned int Char16;
#elif 2 == @GMETADOM_SIZEOF_LONG@
typedef unsigned long Char16;
#else
#error "could not define type Char16"
#endif
#else
#error "could not define type Char16"
#endif
#if 4 == @GMETADOM_SIZEOF_CHAR@
typedef char Char32;
#elif 4 == @GMETADOM_SIZEOF_WCHAR_T@
typedef wchar_t Char32;
#elif 1 == @ALL_TRAITS@
#if 4 == @GMETADOM_SIZEOF_INT@
typedef unsigned int Char32;
#elif 4 == @GMETADOM_SIZEOF_LONG@
typedef unsigned long Char32;
#elif 4 == @GMETADOM_SIZEOF_LONG_LONG@
typedef unsigned long long Char32;
#else
#error "could not define type Char32"
#endif
#else
#error "could not define type Char32"
#endif
}
#if 1 == @TRAIT_SPEC@
#include "@DOM_NAMESPACE@Traits.hh"
#endif
#endif // __@DOM_NAMESPACE@Char_hh__
gmetadom-0.2.6/src/gdome_caml/ 0000777 0001750 0001750 00000000000 10704633453 013204 5 0000000 0000000 gmetadom-0.2.6/src/gdome_caml/ocaml/ 0000777 0001750 0001750 00000000000 10704633453 014277 5 0000000 0000000 gmetadom-0.2.6/src/gdome_caml/ocaml/gdomeCore.ml.suffix 0000644 0001750 0001750 00000000337 07430044041 017746 0000000 0000000
;;
(********** Core Module: hand-written pseudo-constructors **********)
let domString str = new domString (IDOMString.of_string str);;
let domImplementation () = new domImplementation (IDOMImplementation.create ());;
gmetadom-0.2.6/src/gdome_caml/ocaml/gdomeEvents.mli.suffix 0000755 0001750 0001750 00000000213 07426561162 020504 0000000 0000000
(********** Events Module: hand-written pseudo-constructors **********)
val eventListener : callback:(event -> unit) -> eventListener;;
gmetadom-0.2.6/src/gdome_caml/ocaml/gdomeEvents.mli.prefix 0000755 0001750 0001750 00000000450 07437223323 020474 0000000 0000000
(********** Events Module: hand-written class definitions **********)
and eventListener : TEventListener.t ->
object
(*** RESERVED METHODS, DO NOT USE IN USER CODE ***)
(*** required to implement bindings to other libraries ***)
method as_EventListener : TEventListener.t
end
gmetadom-0.2.6/src/gdome_caml/ocaml/gdomeEvents.ml.suffix 0000644 0001750 0001750 00000000360 07425103571 020326 0000000 0000000
(********** Events Module: hand-written pseudo-constructors **********)
let eventListener ~callback =
let callback' =
function event -> callback (new event event)
in
new eventListener (IEventListener.create ~callback:callback')
;;
gmetadom-0.2.6/src/gdome_caml/ocaml/gdome.ml 0000644 0001750 0001750 00000056634 10704632506 015654 0000000 0000000 (* This file is part of GMetaDOM
* a generic bind package for the Document Object Model API.
* Copyright (C) 2001-2002 Luca Padovani
* 2002 Claudio Sacerdoti Coen
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
* For more information, please visit the project home page
* http://gmetadom.sourceforge.net
* or send an email to
*)
(********** Core Module: hand-written class definitions **********)
class domString (obj : TDOMString.t) =
object (self)
method as_DOMString = (obj :> TDOMString.t)
method to_string = IDOMString.to_string obj
method equals (o2 : domString) = IDOMString.equals obj o2#as_DOMString
end
;;
let gdome_obj_eq o1 o2 = o1#equals o2;;
let (===) = gdome_obj_eq;;
class domImplementation obj =
object
method hasFeature ~feature ~version = IDOMImplementation.hasFeature ~this:obj ~feature:((feature : domString)#as_DOMString) ~version:((version : domString)#as_DOMString)
method createDocumentType ~qualifiedName ~publicId ~systemId = let obj = IDOMImplementation.createDocumentType ~this:obj ~qualifiedName:((qualifiedName : domString)#as_DOMString) ~publicId:((publicId : domString)#as_DOMString) ~systemId:((systemId : domString)#as_DOMString) in new documentType obj
method createDocument ~namespaceURI ~qualifiedName ~doctype:doctype = let obj = IDOMImplementation.createDocument ~this:obj ~namespaceURI:(match namespaceURI with None -> None | Some namespaceURI -> Some (namespaceURI : domString)#as_DOMString) ~qualifiedName:((qualifiedName : domString)#as_DOMString) ~doctype:(match doctype with None -> None | Some doctype -> Some ((doctype : documentType)#as_DocumentType)) in new document obj
method createDocumentFromURI ~uri ?validatingMode ?keepEntities () = let obj = IDOMImplementation.createDocumentFromURI ~this:obj ~uri ?validatingMode ?keepEntities () in new document obj
method createDocumentFromMemory ~doc ?validatingMode ?keepEntities () = new document (IDOMImplementation.createDocumentFromMemory ~this:obj ~doc:((doc : domString)#as_DOMString) ?validatingMode ?keepEntities ())
method saveDocumentToFile ~(doc : document) =
IDOMImplementation.saveDocumentToFile ~this:obj ~doc:((doc : document)#as_Document)
method saveDocumentToFileEnc ~(doc : document) =
IDOMImplementation.saveDocumentToFileEnc ~this:obj ~doc:((doc : document)#as_Document)
method saveDocumentToMemory ~(doc : document) =
IDOMImplementation.saveDocumentToMemory ~this:obj ~doc:((doc : document)#as_Document)
method saveDocumentToMemoryEnc ~(doc : document) =
IDOMImplementation.saveDocumentToMemoryEnc ~this:obj ~doc:((doc : document)#as_Document)
method enableEvent ~doc ~name = IDOMImplementation.enableEvent ~this:obj ~doc:((doc : document)#as_Document) ~name
method disableEvent ~doc ~name = IDOMImplementation.disableEvent ~this:obj ~doc:((doc : document)#as_Document) ~name
method eventIsEnabled ~doc ~name = IDOMImplementation.eventIsEnabled ~this:obj ~doc:((doc : document)#as_Document) ~name
end
(********** Events Module: generated class definitions **********)
and eventTarget (obj : TEventTarget.t) =
object
method as_EventTarget = obj
method addEventListener ~typ ~listener ~useCapture = IEventTarget.addEventListener ~this:obj ~typ:((typ : domString)#as_DOMString) ~listener:((listener : eventListener)#as_EventListener) ~useCapture
method removeEventListener ~typ ~listener ~useCapture = IEventTarget.removeEventListener ~this:obj ~typ:((typ : domString)#as_DOMString) ~listener:((listener : eventListener)#as_EventListener) ~useCapture
method dispatchEvent ~evt = IEventTarget.dispatchEvent ~this:obj ~evt:((evt : event)#as_Event)
end
and event (obj : TEvent.t) =
object
method as_Event = obj
method get_type = let obj = IEvent.get_type ~this:obj in new domString obj
method get_target = let obj = IEvent.get_target ~this:obj in new eventTarget obj
method get_currentTarget = let obj = IEvent.get_currentTarget ~this:obj in new eventTarget obj
method get_eventPhase = IEvent.get_eventPhase ~this:obj
method get_bubbles = IEvent.get_bubbles ~this:obj
method get_cancelable = IEvent.get_cancelable ~this:obj
method get_timeStamp = IEvent.get_timeStamp ~this:obj
method stopPropagation = IEvent.stopPropagation ~this:obj
method preventDefault = IEvent.preventDefault ~this:obj
method initEvent ~eventTypeArg ~canBubbleArg ~cancelableArg = IEvent.initEvent ~this:obj ~eventTypeArg:((eventTypeArg : domString)#as_DOMString) ~canBubbleArg ~cancelableArg
end
and mutationEvent (obj : TMutationEvent.t) =
object
inherit (event (obj :> TEvent.t))
method as_MutationEvent = obj
method get_relatedNode = let obj = IMutationEvent.get_relatedNode ~this:obj in match obj with None -> None | Some obj -> Some (new node obj)
method get_prevValue = let obj = IMutationEvent.get_prevValue ~this:obj in match obj with None -> None | Some obj -> Some (new domString obj)
method get_newValue = let obj = IMutationEvent.get_newValue ~this:obj in match obj with None -> None | Some obj -> Some (new domString obj)
method get_attrName = let obj = IMutationEvent.get_attrName ~this:obj in match obj with None -> None | Some obj -> Some (new domString obj)
method get_attrChange = IMutationEvent.get_attrChange ~this:obj
method initMutationEvent ~typeArg ~canBubbleArg ~cancelableArg ~relatedNodeArg ~prevValueArg ~newValueArg ~attrNameArg ~attrChangeArg = IMutationEvent.initMutationEvent ~this:obj ~typeArg:((typeArg : domString)#as_DOMString) ~canBubbleArg ~cancelableArg ~relatedNodeArg:(match relatedNodeArg with None -> None | Some relatedNodeArg -> Some (relatedNodeArg : node)#as_Node) ~prevValueArg:(match prevValueArg with None -> None | Some prevValueArg -> Some (prevValueArg : domString)#as_DOMString) ~newValueArg:(match newValueArg with None -> None | Some newValueArg -> Some (newValueArg : domString)#as_DOMString) ~attrNameArg:(match attrNameArg with None -> None | Some attrNameArg -> Some (attrNameArg : domString)#as_DOMString) ~attrChangeArg
end
(********** Events Module: hand-written class definitions **********)
and eventListener obj =
object
method as_EventListener = (obj :> TEventListener.t)
end
(********** Core Module: generated class definitions **********)
and node (obj : TNode.t) =
object
inherit (eventTarget (obj :> TEventTarget.t))
method as_Node = obj
method get_nodeName = let obj = INode.get_nodeName ~this:obj in new domString obj
method get_nodeValue = let obj = INode.get_nodeValue ~this:obj in match obj with None -> None | Some obj -> Some (new domString obj)
method set_nodeValue ~value = INode.set_nodeValue ~this:obj ~value:(match value with None -> None | Some value -> Some (value : domString)#as_DOMString)
method get_nodeType = INode.get_nodeType ~this:obj
method get_parentNode = let obj = INode.get_parentNode ~this:obj in match obj with None -> None | Some obj -> Some (new node obj)
method get_childNodes = let obj = INode.get_childNodes ~this:obj in new nodeList obj
method get_firstChild = let obj = INode.get_firstChild ~this:obj in match obj with None -> None | Some obj -> Some (new node obj)
method get_lastChild = let obj = INode.get_lastChild ~this:obj in match obj with None -> None | Some obj -> Some (new node obj)
method get_previousSibling = let obj = INode.get_previousSibling ~this:obj in match obj with None -> None | Some obj -> Some (new node obj)
method get_nextSibling = let obj = INode.get_nextSibling ~this:obj in match obj with None -> None | Some obj -> Some (new node obj)
method get_attributes = let obj = INode.get_attributes ~this:obj in match obj with None -> None | Some obj -> Some (new namedNodeMap obj)
method get_ownerDocument = let obj = INode.get_ownerDocument ~this:obj in match obj with None -> None | Some obj -> Some (new document obj)
method get_namespaceURI = let obj = INode.get_namespaceURI ~this:obj in match obj with None -> None | Some obj -> Some (new domString obj)
method get_prefix = let obj = INode.get_prefix ~this:obj in match obj with None -> None | Some obj -> Some (new domString obj)
method set_prefix ~value = INode.set_prefix ~this:obj ~value:(match value with None -> None | Some value -> Some (value : domString)#as_DOMString)
method get_localName = let obj = INode.get_localName ~this:obj in match obj with None -> None | Some obj -> Some (new domString obj)
method isSameNode other = INode.isSameNode ~this:obj ((other : node)#as_Node)
method equals other = INode.isSameNode ~this:obj ((other : node)#as_Node)
method insertBefore ~newChild ~refChild = let obj = INode.insertBefore ~this:obj ~newChild:((newChild : node)#as_Node) ~refChild:(match refChild with None -> None | Some refChild -> Some (refChild : node)#as_Node) in new node obj
method replaceChild ~newChild ~oldChild = let obj = INode.replaceChild ~this:obj ~newChild:((newChild : node)#as_Node) ~oldChild:((oldChild : node)#as_Node) in new node obj
method removeChild ~oldChild = let obj = INode.removeChild ~this:obj ~oldChild:((oldChild : node)#as_Node) in new node obj
method appendChild ~newChild = let obj = INode.appendChild ~this:obj ~newChild:((newChild : node)#as_Node) in new node obj
method hasChildNodes = INode.hasChildNodes ~this:obj
method cloneNode ~deep = let obj = INode.cloneNode ~this:obj ~deep in new node obj
method normalize = INode.normalize ~this:obj
method isSupported ~feature ~version = INode.isSupported ~this:obj ~feature:((feature : domString)#as_DOMString) ~version:((version : domString)#as_DOMString)
method hasAttributes = INode.hasAttributes ~this:obj
end
and nodeList (obj : TNodeList.t) =
object
method as_NodeList = obj
method get_length = INodeList.get_length ~this:obj
method item ~index = let obj = INodeList.item ~this:obj ~index in match obj with None -> None | Some obj -> Some (new node obj)
end
and namedNodeMap (obj : TNamedNodeMap.t) =
object
method as_NamedNodeMap = obj
method get_length = INamedNodeMap.get_length ~this:obj
method getNamedItem ~name = let obj = INamedNodeMap.getNamedItem ~this:obj ~name:((name : domString)#as_DOMString) in match obj with None -> None | Some obj -> Some (new node obj)
method setNamedItem ~arg = let obj = INamedNodeMap.setNamedItem ~this:obj ~arg:((arg : node)#as_Node) in match obj with None -> None | Some obj -> Some (new node obj)
method removeNamedItem ~name = let obj = INamedNodeMap.removeNamedItem ~this:obj ~name:((name : domString)#as_DOMString) in new node obj
method item ~index = let obj = INamedNodeMap.item ~this:obj ~index in match obj with None -> None | Some obj -> Some (new node obj)
method getNamedItemNS ~namespaceURI ~localName = let obj = INamedNodeMap.getNamedItemNS ~this:obj ~namespaceURI:((namespaceURI : domString)#as_DOMString) ~localName:((localName : domString)#as_DOMString) in match obj with None -> None | Some obj -> Some (new node obj)
method setNamedItemNS ~arg = let obj = INamedNodeMap.setNamedItemNS ~this:obj ~arg:((arg : node)#as_Node) in match obj with None -> None | Some obj -> Some (new node obj)
method removeNamedItemNS ~namespaceURI ~localName = let obj = INamedNodeMap.removeNamedItemNS ~this:obj ~namespaceURI:((namespaceURI : domString)#as_DOMString) ~localName:((localName : domString)#as_DOMString) in new node obj
end
and characterData (obj : TCharacterData.t) =
object
inherit (node (obj :> TNode.t))
method as_CharacterData = obj
method get_data = let obj = ICharacterData.get_data ~this:obj in new domString obj
method set_data ~value = ICharacterData.set_data ~this:obj ~value:((value : domString)#as_DOMString)
method get_length = ICharacterData.get_length ~this:obj
method substringData ~offset ~count = let obj = ICharacterData.substringData ~this:obj ~offset ~count in new domString obj
method appendData ~arg = ICharacterData.appendData ~this:obj ~arg:((arg : domString)#as_DOMString)
method insertData ~offset ~arg = ICharacterData.insertData ~this:obj ~offset ~arg:((arg : domString)#as_DOMString)
method deleteData ~offset ~count = ICharacterData.deleteData ~this:obj ~offset ~count
method replaceData ~offset ~count ~arg = ICharacterData.replaceData ~this:obj ~offset ~count ~arg:((arg : domString)#as_DOMString)
end
and attr (obj : TAttr.t) =
object
inherit (node (obj :> TNode.t))
method as_Attr = obj
method get_name = let obj = IAttr.get_name ~this:obj in new domString obj
method get_specified = IAttr.get_specified ~this:obj
method get_value = let obj = IAttr.get_value ~this:obj in new domString obj
method set_value ~value = IAttr.set_value ~this:obj ~value:((value : domString)#as_DOMString)
method get_ownerElement = let obj = IAttr.get_ownerElement ~this:obj in match obj with None -> None | Some obj -> Some (new element obj)
end
and element (obj : TElement.t) =
object
inherit (node (obj :> TNode.t))
method as_Element = obj
method get_tagName = let obj = IElement.get_tagName ~this:obj in new domString obj
method getAttribute ~name = let obj = IElement.getAttribute ~this:obj ~name:((name : domString)#as_DOMString) in new domString obj
method setAttribute ~name ~value = IElement.setAttribute ~this:obj ~name:((name : domString)#as_DOMString) ~value:((value : domString)#as_DOMString)
method removeAttribute ~name = IElement.removeAttribute ~this:obj ~name:((name : domString)#as_DOMString)
method getAttributeNode ~name = let obj = IElement.getAttributeNode ~this:obj ~name:((name : domString)#as_DOMString) in match obj with None -> None | Some obj -> Some (new attr obj)
method setAttributeNode ~newAttr = let obj = IElement.setAttributeNode ~this:obj ~newAttr:((newAttr : attr)#as_Attr) in new attr obj
method removeAttributeNode ~oldAttr = let obj = IElement.removeAttributeNode ~this:obj ~oldAttr:((oldAttr : attr)#as_Attr) in new attr obj
method getElementsByTagName ~name = let obj = IElement.getElementsByTagName ~this:obj ~name:((name : domString)#as_DOMString) in new nodeList obj
method getAttributeNS ~namespaceURI ~localName = let obj = IElement.getAttributeNS ~this:obj ~namespaceURI:((namespaceURI : domString)#as_DOMString) ~localName:((localName : domString)#as_DOMString) in new domString obj
method setAttributeNS ~namespaceURI ~qualifiedName ~value = IElement.setAttributeNS ~this:obj ~namespaceURI:(match namespaceURI with None -> None | Some namespaceURI -> Some (namespaceURI : domString)#as_DOMString) ~qualifiedName:((qualifiedName : domString)#as_DOMString) ~value:((value : domString)#as_DOMString)
method removeAttributeNS ~namespaceURI ~localName = IElement.removeAttributeNS ~this:obj ~namespaceURI:((namespaceURI : domString)#as_DOMString) ~localName:((localName : domString)#as_DOMString)
method getAttributeNodeNS ~namespaceURI ~localName = let obj = IElement.getAttributeNodeNS ~this:obj ~namespaceURI:((namespaceURI : domString)#as_DOMString) ~localName:((localName : domString)#as_DOMString) in match obj with None -> None | Some obj -> Some (new attr obj)
method setAttributeNodeNS ~newAttr = let obj = IElement.setAttributeNodeNS ~this:obj ~newAttr:((newAttr : attr)#as_Attr) in new attr obj
method getElementsByTagNameNS ~namespaceURI ~localName = let obj = IElement.getElementsByTagNameNS ~this:obj ~namespaceURI:((namespaceURI : domString)#as_DOMString) ~localName:((localName : domString)#as_DOMString) in new nodeList obj
method hasAttribute ~name = IElement.hasAttribute ~this:obj ~name:((name : domString)#as_DOMString)
method hasAttributeNS ~namespaceURI ~localName = IElement.hasAttributeNS ~this:obj ~namespaceURI:((namespaceURI : domString)#as_DOMString) ~localName:((localName : domString)#as_DOMString)
end
and text (obj : TText.t) =
object
inherit (characterData (obj :> TCharacterData.t))
method as_Text = obj
method splitText ~offset = let obj = IText.splitText ~this:obj ~offset in new text obj
end
and comment (obj : TComment.t) =
object
inherit (characterData (obj :> TCharacterData.t))
method as_Comment = obj
end
and cdataSection (obj : TCDATASection.t) =
object
inherit (text (obj :> TText.t))
method as_CDATASection = obj
end
and documentType (obj : TDocumentType.t) =
object
inherit (node (obj :> TNode.t))
method as_DocumentType = obj
method get_name = let obj = IDocumentType.get_name ~this:obj in new domString obj
method get_entities = let obj = IDocumentType.get_entities ~this:obj in new namedNodeMap obj
method get_notations = let obj = IDocumentType.get_notations ~this:obj in new namedNodeMap obj
method get_publicId = let obj = IDocumentType.get_publicId ~this:obj in new domString obj
method get_systemId = let obj = IDocumentType.get_systemId ~this:obj in new domString obj
method get_internalSubset = let obj = IDocumentType.get_internalSubset ~this:obj in new domString obj
end
and notation (obj : TNotation.t) =
object
inherit (node (obj :> TNode.t))
method as_Notation = obj
method get_publicId = let obj = INotation.get_publicId ~this:obj in match obj with None -> None | Some obj -> Some (new domString obj)
method get_systemId = let obj = INotation.get_systemId ~this:obj in match obj with None -> None | Some obj -> Some (new domString obj)
end
and entity (obj : TEntity.t) =
object
inherit (node (obj :> TNode.t))
method as_Entity = obj
method get_publicId = let obj = IEntity.get_publicId ~this:obj in match obj with None -> None | Some obj -> Some (new domString obj)
method get_systemId = let obj = IEntity.get_systemId ~this:obj in match obj with None -> None | Some obj -> Some (new domString obj)
method get_notationName = let obj = IEntity.get_notationName ~this:obj in match obj with None -> None | Some obj -> Some (new domString obj)
end
and entityReference (obj : TEntityReference.t) =
object
inherit (node (obj :> TNode.t))
method as_EntityReference = obj
end
and processingInstruction (obj : TProcessingInstruction.t) =
object
inherit (node (obj :> TNode.t))
method as_ProcessingInstruction = obj
method get_target = let obj = IProcessingInstruction.get_target ~this:obj in new domString obj
method get_data = let obj = IProcessingInstruction.get_data ~this:obj in new domString obj
method set_data ~value = IProcessingInstruction.set_data ~this:obj ~value:((value : domString)#as_DOMString)
end
and documentFragment (obj : TDocumentFragment.t) =
object
inherit (node (obj :> TNode.t))
method as_DocumentFragment = obj
end
and document (obj : TDocument.t) =
object
inherit (node (obj :> TNode.t))
method as_Document = obj
method get_doctype = let obj = IDocument.get_doctype ~this:obj in match obj with None -> None | Some obj -> Some (new documentType obj)
method get_implementation = let obj = IDocument.get_implementation ~this:obj in new domImplementation obj
method get_documentElement = let obj = IDocument.get_documentElement ~this:obj in new element obj
method createElement ~tagName = let obj = IDocument.createElement ~this:obj ~tagName:((tagName : domString)#as_DOMString) in new element obj
method createDocumentFragment = let obj = IDocument.createDocumentFragment ~this:obj in new documentFragment obj
method createTextNode ~data = let obj = IDocument.createTextNode ~this:obj ~data:((data : domString)#as_DOMString) in new text obj
method createComment ~data = let obj = IDocument.createComment ~this:obj ~data:((data : domString)#as_DOMString) in new comment obj
method createCDATASection ~data = let obj = IDocument.createCDATASection ~this:obj ~data:((data : domString)#as_DOMString) in new cdataSection obj
method createProcessingInstruction ~target ~data = let obj = IDocument.createProcessingInstruction ~this:obj ~target:((target : domString)#as_DOMString) ~data:((data : domString)#as_DOMString) in new processingInstruction obj
method createAttribute ~name = let obj = IDocument.createAttribute ~this:obj ~name:((name : domString)#as_DOMString) in new attr obj
method createEntityReference ~name = let obj = IDocument.createEntityReference ~this:obj ~name:((name : domString)#as_DOMString) in new entityReference obj
method getElementsByTagName ~tagname = let obj = IDocument.getElementsByTagName ~this:obj ~tagname:((tagname : domString)#as_DOMString) in new nodeList obj
method importNode ~importedNode ~deep = let obj = IDocument.importNode ~this:obj ~importedNode:((importedNode : node)#as_Node) ~deep in new node obj
method createElementNS ~namespaceURI ~qualifiedName = let obj = IDocument.createElementNS ~this:obj ~namespaceURI:(match namespaceURI with None -> None | Some namespaceURI -> Some (namespaceURI : domString)#as_DOMString) ~qualifiedName:((qualifiedName : domString)#as_DOMString) in new element obj
method createAttributeNS ~namespaceURI ~qualifiedName = let obj = IDocument.createAttributeNS ~this:obj ~namespaceURI:(match namespaceURI with None -> None | Some namespaceURI -> Some (namespaceURI : domString)#as_DOMString) ~qualifiedName:((qualifiedName : domString)#as_DOMString) in new attr obj
method getElementsByTagNameNS ~namespaceURI ~localName = let obj = IDocument.getElementsByTagNameNS ~this:obj ~namespaceURI:((namespaceURI : domString)#as_DOMString) ~localName:((localName : domString)#as_DOMString) in new nodeList obj
method getElementById ~elementId = let obj = IDocument.getElementById ~this:obj ~elementId:((elementId : domString)#as_DOMString) in match obj with None -> None | Some obj -> Some (new element obj)
end
;;
(********** Core Module: hand-written pseudo-constructors **********)
let domString str = new domString (IDOMString.of_string str);;
let domImplementation () = new domImplementation (IDOMImplementation.create ());;
(********** Events Module: hand-written pseudo-constructors **********)
let eventListener ~callback =
let callback' =
function event -> callback (new event event)
in
new eventListener (IEventListener.create ~callback:callback')
;;
(********** Events Module: generated dynamic down-casts **********)
class mutationEvent_of_event obj =
mutationEvent (IMutationEvent.of_Event obj#as_Event)
;;
(********** Core Module: generated dynamic down-casts **********)
class characterData_of_node obj =
characterData (ICharacterData.of_Node obj#as_Node)
;;
class attr_of_node obj =
attr (IAttr.of_Node obj#as_Node)
;;
class element_of_node obj =
element (IElement.of_Node obj#as_Node)
;;
class text_of_node obj =
text (IText.of_Node obj#as_Node)
;;
class comment_of_node obj =
comment (IComment.of_Node obj#as_Node)
;;
class cdataSection_of_node obj =
cdataSection (ICDATASection.of_Node obj#as_Node)
;;
class documentType_of_node obj =
documentType (IDocumentType.of_Node obj#as_Node)
;;
class notation_of_node obj =
notation (INotation.of_Node obj#as_Node)
;;
class entity_of_node obj =
entity (IEntity.of_Node obj#as_Node)
;;
class entityReference_of_node obj =
entityReference (IEntityReference.of_Node obj#as_Node)
;;
class processingInstruction_of_node obj =
processingInstruction (IProcessingInstruction.of_Node obj#as_Node)
;;
class documentFragment_of_node obj =
documentFragment (IDocumentFragment.of_Node obj#as_Node)
;;
class document_of_node obj =
document (IDocument.of_Node obj#as_Node)
;;
gmetadom-0.2.6/src/gdome_caml/ocaml/.depend 0000644 0001750 0001750 00000000054 07426561162 015456 0000000 0000000 gdome.cmo: gdome.cmi
gdome.cmx: gdome.cmi
gmetadom-0.2.6/src/gdome_caml/ocaml/gdomeEvents.ml.prefix 0000644 0001750 0001750 00000000245 07425103571 020321 0000000 0000000
(********** Events Module: hand-written class definitions **********)
and eventListener obj =
object
method as_EventListener = (obj :> TEventListener.t)
end
gmetadom-0.2.6/src/gdome_caml/ocaml/gdomeCore.mli.suffix 0000755 0001750 0001750 00000000250 07430044041 020114 0000000 0000000
;;
(********** Core Module: hand-written pseudo-constructors **********)
val domString : string -> domString;;
val domImplementation : unit -> domImplementation;;
gmetadom-0.2.6/src/gdome_caml/ocaml/Makefile.am 0000644 0001750 0001750 00000014711 10703700343 016243 0000000 0000000
OCAMLBUILDDIR = $(top_builddir)/src/gdome_caml
OCAMLINSTALLDIR = $(DESTDIR)$(OCAML_LIB_PREFIX)/gdome2
OCAMLFLAGS = \
-I $(OCAMLBUILDDIR) \
-I $(OCAMLBUILDDIR)/types \
-I $(OCAMLBUILDDIR)/basic \
-I $(OCAMLBUILDDIR)/core \
-I $(OCAMLBUILDDIR)/events
OCAMLC = @OCAMLC@ ${OCAMLFLAGS}
OCAMLOPT = @OCAMLOPT@ ${OCAMLFLAGS}
OCAMLDEP = @OCAMLDEP@
OCAML_CFLAGS = @OCAML_CFLAGS@
ARCHIVE = mlogdome
MODULES = \
Node \
NodeList \
NamedNodeMap \
CharacterData \
Attr \
Element \
Text \
Comment \
CDATASection \
DocumentType \
Notation \
Entity \
EntityReference \
ProcessingInstruction \
DocumentFragment \
Document
EVENTS_MODULES = \
EventTarget \
Event \
MutationEvent
O_AUTO_ML = \
gdome.ml
ALL_ML_SOURCES_ = $(O_AUTO_ML) $(O_AUTO_ML:%.ml=%.mli)
# OCaml objects
OCAML_OBJECTS = $(O_AUTO_ML:%.ml=%.cmo)
OCAMLOPT_OBJECTS = $(O_AUTO_ML:%.ml=%.cmx)
OCAML_INTERFACES = $(O_AUTO_ML:%.ml=%.cmi)
BUILT_SOURCES = $(O_AUTO_ML) $(O_AUTO_ML:%.ml=%.mli)
MAINTAINERCLEANFILES = \
$(O_AUTO_ML:%.ml=%.mli) \
$(O_AUTO_ML)
CLEANFILES = \
$(OCAML_INTERFACES) \
$(OCAML_OBJECTS) \
$(OCAMLOPT_OBJECTS) \
$(O_AUTO_ML:%.ml=%.o) \
$(ARCHIVE).cma $(ARCHIVE).cmxa $(ARCHIVE).a
EXTRA_DIST = \
$(ALL_ML_SOURCES_) \
gdomeCore.ml.prefix \
gdomeCore.ml.suffix \
gdomeEvents.ml.prefix \
gdomeEvents.ml.suffix \
gdomeCore.mli.prefix \
gdomeCore.mli.suffix \
gdomeEvents.mli.prefix \
gdomeEvents.mli.suffix \
.depend
XML2OML = $(srcdir)/../xsl/xml2oml.xsl
XML2OMLI = $(srcdir)/../xsl/xml2omli.xsl
XML2OMLCASTS = $(srcdir)/../xsl/xml2omlcasts.xsl
XML2OMLICASTS = $(srcdir)/../xsl/xml2omlicasts.xsl
XSLUTILS = $(srcdir)/../xsl/xslutils.xsl
XML2MLDOC = $(srcdir)/../xsl/xml2mldoc.xsl
if HAVE_OCAMLOPT_COND
noinst_DATA = $(ARCHIVE).cma $(ARCHIVE).cmxa $(ARCHIVE).a
else
noinst_DATA = $(ARCHIVE).cma
endif
$(ARCHIVE).cma : $(OCAML_OBJECTS)
$(OCAMLC) -o $@ -a $^
$(ARCHIVE).cmxa $(ARCHIVE).a : $(OCAMLOPT_OBJECTS)
$(OCAMLOPT) -o $@ -a $^
if HAVE_XSLTPROC_COND
gdome.ml : $(XML2OML) $(XSLUTILS) $(XML2OMLCASTS) \
$(MODULES:%=$(top_srcdir)/xml/DOM/Core/%.xml) \
$(MODULES:%=$(srcdir)/../xml/Core/%.xml) \
$(EVENTS_MODULES:%=$(top_srcdir)/xml/DOM/Events/%.xml) \
$(EVENTS_MODULES:%=$(srcdir)/../xml/Events/%.xml) \
gdomeCore.ml.prefix gdomeCore.ml.suffix \
gdomeEvents.ml.prefix gdomeEvents.ml.suffix
cp gdomeCore.ml.prefix $@
echo "(********** Events Module: generated class definitions **********)" >> $@
for i in $(EVENTS_MODULES) ; do $(XSLTPROC) --param uriprefix "'$(top_srcdir)/xml/DOM/Events'" --param annotations "'$(srcdir)/../xml/Events/$$i.xml'" --param module "'$$i'" $(XML2OML) $(top_srcdir)/xml/DOM/Events/$$i.xml >> $@ ; done
cat gdomeEvents.ml.prefix >> $@
echo "(********** Core Module: generated class definitions **********)" >> $@
for i in $(MODULES) ; do $(XSLTPROC) --param uriprefix "'$(top_srcdir)/xml/DOM/Core'" --param annotations "'$(srcdir)/../xml/Core/$$i.xml'" --param module "'$$i'" $(XML2OML) $(top_srcdir)/xml/DOM/Core/$$i.xml >> $@ ; done
cat gdomeCore.ml.suffix >> $@
cat gdomeEvents.ml.suffix >> $@
echo " " >> $@
echo "(********** Events Module: generated dynamic down-casts **********)" >> $@
for i in $(EVENTS_MODULES) ; do $(XSLTPROC) --param uriprefix "'$(top_srcdir)/xml/DOM/Events'" --param annotations "'$(srcdir)/../xml/Events/$$i.xml'" --param module "'$$i'" $(XML2OMLCASTS) $(top_srcdir)/xml/DOM/Events/$$i.xml >> $@ ; done
echo " " >> $@
echo "(********** Core Module: generated dynamic down-casts **********)" >> $@
for i in $(MODULES) ; do $(XSLTPROC) --param uriprefix "'$(top_srcdir)/xml/DOM/Core'" --param annotations "'$(srcdir)/../xml/Core/$$i.xml'" --param module "'$$i'" $(XML2OMLCASTS) $(top_srcdir)/xml/DOM/Core/$$i.xml >> $@ ; done
gdome.mli : $(XML2OMLI) $(XSLUTILS) $(XML2MLDOC) $(XML2OMLICASTS) \
$(MODULES:%=$(top_srcdir)/xml/DOM/Core/%.xml) \
$(MODULES:%=$(srcdir)/../xml/Core/%.xml) \
$(EVENTS_MODULES:%=$(top_srcdir)/xml/DOM/Events/%.xml) \
$(EVENTS_MODULES:%=$(srcdir)/../xml/Events/%.xml) \
gdomeCore.mli.prefix gdomeCore.mli.suffix \
gdomeEvents.mli.prefix gdomeEvents.mli.suffix
cp gdomeCore.mli.prefix $@
echo "(********** Events Module: generated class definitions **********)" >> $@
for i in $(EVENTS_MODULES) ; do $(XSLTPROC) --param uriprefix "'$(top_srcdir)/xml/DOM/Events'" --param annotations "'$(srcdir)/../xml/Events/$$i.xml'" --param module "'$$i'" $(XML2OMLI) $(top_srcdir)/xml/DOM/Events/$$i.xml >> $@ ; done
cat gdomeEvents.mli.prefix >> $@
echo "(********** Core Module: generated class definitions **********)" >> $@
for i in $(MODULES) ; do $(XSLTPROC) --param uriprefix "'$(top_srcdir)/xml/DOM/Core'" --param annotations "'$(srcdir)/../xml/Core/$$i.xml'" --param module "'$$i'" $(XML2OMLI) $(top_srcdir)/xml/DOM/Core/$$i.xml >> $@ ; done
cat gdomeCore.mli.suffix >> $@
cat gdomeEvents.mli.suffix >> $@
echo " " >> $@
echo "(********** Events Module: generated dynamic down-casts **********)" >> $@
for i in $(EVENTS_MODULES) ; do $(XSLTPROC) --param uriprefix "'$(top_srcdir)/xml/DOM/Events'" --param annotations "'$(srcdir)/../xml/Events/$$i.xml'" --param module "'$$i'" $(XML2OMLICASTS) $(top_srcdir)/xml/DOM/Events/$$i.xml >> $@ ; done
echo " " >> $@
echo "(********** Core Module: generated dynamic down-casts **********)" >> $@
for i in $(MODULES) ; do $(XSLTPROC) --param uriprefix "'$(top_srcdir)/xml/DOM/Core'" --param annotations "'$(srcdir)/../xml/Core/$$i.xml'" --param module "'$$i'" $(XML2OMLICASTS) $(top_srcdir)/xml/DOM/Core/$$i.xml >> $@ ; done
endif
if HAVE_OCAMLOPT_COND
install-data-local: $(OCAML_INTERFACES) gdome.mli $(ARCHIVE).cma $(ARCHIVE).cmxa $(ARCHIVE).a
else
install-data-local: $(OCAML_INTERFACES) gdome.mli $(ARCHIVE).cma
endif
$(mkinstalldirs) $(OCAMLINSTALLDIR)
for i in $^; do \
$(INSTALL_DATA) $$i $(OCAMLINSTALLDIR); \
done
for i in $(ALL_ML_SOURCES); do \
$(INSTALL_DATA) $(srcdir)/$$i $(OCAMLINSTALLDIR); \
done
#### OCaml only stuff from now on
DEPOBJS = $(ALL_ML_SOURCES)
depend:
$(OCAMLDEP) $(DEPOBJS) > .depend
%.cmi : $(srcdir)/%.mli
if test ! -e $(@:%.cmi=%.mli) -a "x$(srcdir)" != "x." ; then $(LN_S) $< . ; fi
$(OCAMLC) -c $(@:%.cmi=%.mli)
%.cmo : $(srcdir)/%.ml
if test ! -e $(@:%.cmo=%.ml) -a "x$(srcdir)" != "x." ; then $(LN_S) $< . ; fi
$(OCAMLC) -c $(@:%.cmo=%.ml)
%.cmx %.o : $(srcdir)/%.ml
if test ! -e $(@:%.cmx=%.ml) -a "x$(srcdir)" != "x." ; then $(LN_S) $< . ; fi
$(OCAMLOPT) -c $(@:%.cmx=%.ml)
include .depend
gmetadom-0.2.6/src/gdome_caml/ocaml/gdomeCore.ml.prefix 0000644 0001750 0001750 00000007260 10465324540 017750 0000000 0000000 (* This file is part of GMetaDOM
* a generic bind package for the Document Object Model API.
* Copyright (C) 2001-2002 Luca Padovani
* 2002 Claudio Sacerdoti Coen
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
* For more information, please visit the project home page
* http://gmetadom.sourceforge.net
* or send an email to
*)
(********** Core Module: hand-written class definitions **********)
class domString (obj : TDOMString.t) =
object (self)
method as_DOMString = (obj :> TDOMString.t)
method to_string = IDOMString.to_string obj
method equals (o2 : domString) = IDOMString.equals obj o2#as_DOMString
end
;;
let gdome_obj_eq o1 o2 = o1#equals o2;;
let (===) = gdome_obj_eq;;
class domImplementation obj =
object
method hasFeature ~feature ~version = IDOMImplementation.hasFeature ~this:obj ~feature:((feature : domString)#as_DOMString) ~version:((version : domString)#as_DOMString)
method createDocumentType ~qualifiedName ~publicId ~systemId = let obj = IDOMImplementation.createDocumentType ~this:obj ~qualifiedName:((qualifiedName : domString)#as_DOMString) ~publicId:((publicId : domString)#as_DOMString) ~systemId:((systemId : domString)#as_DOMString) in new documentType obj
method createDocument ~namespaceURI ~qualifiedName ~doctype:doctype = let obj = IDOMImplementation.createDocument ~this:obj ~namespaceURI:(match namespaceURI with None -> None | Some namespaceURI -> Some (namespaceURI : domString)#as_DOMString) ~qualifiedName:((qualifiedName : domString)#as_DOMString) ~doctype:(match doctype with None -> None | Some doctype -> Some ((doctype : documentType)#as_DocumentType)) in new document obj
method createDocumentFromURI ~uri ?validatingMode ?keepEntities () = let obj = IDOMImplementation.createDocumentFromURI ~this:obj ~uri ?validatingMode ?keepEntities () in new document obj
method createDocumentFromMemory ~doc ?validatingMode ?keepEntities () = new document (IDOMImplementation.createDocumentFromMemory ~this:obj ~doc:((doc : domString)#as_DOMString) ?validatingMode ?keepEntities ())
method saveDocumentToFile ~(doc : document) =
IDOMImplementation.saveDocumentToFile ~this:obj ~doc:((doc : document)#as_Document)
method saveDocumentToFileEnc ~(doc : document) =
IDOMImplementation.saveDocumentToFileEnc ~this:obj ~doc:((doc : document)#as_Document)
method saveDocumentToMemory ~(doc : document) =
IDOMImplementation.saveDocumentToMemory ~this:obj ~doc:((doc : document)#as_Document)
method saveDocumentToMemoryEnc ~(doc : document) =
IDOMImplementation.saveDocumentToMemoryEnc ~this:obj ~doc:((doc : document)#as_Document)
method enableEvent ~doc ~name = IDOMImplementation.enableEvent ~this:obj ~doc:((doc : document)#as_Document) ~name
method disableEvent ~doc ~name = IDOMImplementation.disableEvent ~this:obj ~doc:((doc : document)#as_Document) ~name
method eventIsEnabled ~doc ~name = IDOMImplementation.eventIsEnabled ~this:obj ~doc:((doc : document)#as_Document) ~name
end
gmetadom-0.2.6/src/gdome_caml/ocaml/Makefile.in 0000644 0001750 0001750 00000042512 10704633020 016252 0000000 0000000 # Makefile.in generated by automake 1.9.6 from Makefile.am.
# @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
# 2003, 2004, 2005 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE.
@SET_MAKE@
srcdir = @srcdir@
top_srcdir = @top_srcdir@
VPATH = @srcdir@
pkgdatadir = $(datadir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
top_builddir = ../../..
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
INSTALL = @INSTALL@
install_sh_DATA = $(install_sh) -c -m 644
install_sh_PROGRAM = $(install_sh) -c
install_sh_SCRIPT = $(install_sh) -c
INSTALL_HEADER = $(INSTALL_DATA)
transform = $(program_transform_name)
NORMAL_INSTALL = :
PRE_INSTALL = :
POST_INSTALL = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
build_triplet = @build@
host_triplet = @host@
DIST_COMMON = $(srcdir)/.depend $(srcdir)/Makefile.am \
$(srcdir)/Makefile.in
subdir = src/gdome_caml/ocaml
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
mkinstalldirs = $(install_sh) -d
CONFIG_HEADER = $(top_builddir)/config.h
CONFIG_CLEAN_FILES =
SOURCES =
DIST_SOURCES =
DATA = $(noinst_DATA)
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@
ALL_TRAITS = @ALL_TRAITS@
AMDEP_FALSE = @AMDEP_FALSE@
AMDEP_TRUE = @AMDEP_TRUE@
AMTAR = @AMTAR@
AR = @AR@
AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
CHAR_UNSIGNED = @CHAR_UNSIGNED@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
CXX = @CXX@
CXXCPP = @CXXCPP@
CXXDEPMODE = @CXXDEPMODE@
CXXFLAGS = @CXXFLAGS@
CYGPATH_W = @CYGPATH_W@
DEFS = @DEFS@
DEPDIR = @DEPDIR@
ECHO = @ECHO@
ECHO_C = @ECHO_C@
ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
EGREP = @EGREP@
EXEEXT = @EXEEXT@
F77 = @F77@
FFLAGS = @FFLAGS@
GDOME_CFLAGS = @GDOME_CFLAGS@
GDOME_LIBS = @GDOME_LIBS@
GMETADOM_MODULES = @GMETADOM_MODULES@
GMETADOM_SIZEOF_CHAR = @GMETADOM_SIZEOF_CHAR@
GMETADOM_SIZEOF_INT = @GMETADOM_SIZEOF_INT@
GMETADOM_SIZEOF_LONG = @GMETADOM_SIZEOF_LONG@
GMETADOM_SIZEOF_LONG_LONG = @GMETADOM_SIZEOF_LONG_LONG@
GMETADOM_SIZEOF_SHORT = @GMETADOM_SIZEOF_SHORT@
GMETADOM_SIZEOF_WCHAR_T = @GMETADOM_SIZEOF_WCHAR_T@
GMETADOM_VERSION_INFO = @GMETADOM_VERSION_INFO@
GREP = @GREP@
HAVE_ICONV = @HAVE_ICONV@
HAVE_OCAMLC = @HAVE_OCAMLC@
HAVE_OCAMLDEP = @HAVE_OCAMLDEP@
HAVE_OCAMLFIND = @HAVE_OCAMLFIND@
HAVE_OCAMLOPT = @HAVE_OCAMLOPT@
HAVE_OCAMLOPT_COND_FALSE = @HAVE_OCAMLOPT_COND_FALSE@
HAVE_OCAMLOPT_COND_TRUE = @HAVE_OCAMLOPT_COND_TRUE@
HAVE_SED = @HAVE_SED@
HAVE_SED_COND_FALSE = @HAVE_SED_COND_FALSE@
HAVE_SED_COND_TRUE = @HAVE_SED_COND_TRUE@
HAVE_XSLTPROC = @HAVE_XSLTPROC@
HAVE_XSLTPROC_COND_FALSE = @HAVE_XSLTPROC_COND_FALSE@
HAVE_XSLTPROC_COND_TRUE = @HAVE_XSLTPROC_COND_TRUE@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
LDFLAGS = @LDFLAGS@
LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
LIBTOOL = @LIBTOOL@
LN_S = @LN_S@
LTLIBOBJS = @LTLIBOBJS@
MAKEINFO = @MAKEINFO@
OBJEXT = @OBJEXT@
OCAMLC = @OCAMLC@ ${OCAMLFLAGS}
OCAMLDEP = @OCAMLDEP@
OCAMLFIND = @OCAMLFIND@
OCAMLOPT = @OCAMLOPT@ ${OCAMLFLAGS}
OCAML_CFLAGS = @OCAML_CFLAGS@
OCAML_LIB_PREFIX = @OCAML_LIB_PREFIX@
PACKAGE = @PACKAGE@
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
PACKAGE_NAME = @PACKAGE_NAME@
PACKAGE_STRING = @PACKAGE_STRING@
PACKAGE_TARNAME = @PACKAGE_TARNAME@
PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@
PKG_CONFIG = @PKG_CONFIG@
RANLIB = @RANLIB@
SED = @SED@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
STD_TRAITS = @STD_TRAITS@
STRIP = @STRIP@
TRAIT_SPEC = @TRAIT_SPEC@
VERSION = @VERSION@
XSLTPROC = @XSLTPROC@
ac_ct_CC = @ac_ct_CC@
ac_ct_CXX = @ac_ct_CXX@
ac_ct_F77 = @ac_ct_F77@
am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@
am__include = @am__include@
am__leading_dot = @am__leading_dot@
am__quote = @am__quote@
am__tar = @am__tar@
am__untar = @am__untar@
bindir = @bindir@
build = @build@
build_alias = @build_alias@
build_cpu = @build_cpu@
build_os = @build_os@
build_vendor = @build_vendor@
datadir = @datadir@
datarootdir = @datarootdir@
docdir = @docdir@
dvidir = @dvidir@
exec_prefix = @exec_prefix@
host = @host@
host_alias = @host_alias@
host_cpu = @host_cpu@
host_os = @host_os@
host_vendor = @host_vendor@
htmldir = @htmldir@
includedir = @includedir@
infodir = @infodir@
install_sh = @install_sh@
libdir = @libdir@
libexecdir = @libexecdir@
localedir = @localedir@
localstatedir = @localstatedir@
mandir = @mandir@
mkdir_p = @mkdir_p@
oldincludedir = @oldincludedir@
pdfdir = @pdfdir@
prefix = @prefix@
program_transform_name = @program_transform_name@
psdir = @psdir@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
sysconfdir = @sysconfdir@
target_alias = @target_alias@
OCAMLBUILDDIR = $(top_builddir)/src/gdome_caml
OCAMLINSTALLDIR = $(DESTDIR)$(OCAML_LIB_PREFIX)/gdome2
OCAMLFLAGS = \
-I $(OCAMLBUILDDIR) \
-I $(OCAMLBUILDDIR)/types \
-I $(OCAMLBUILDDIR)/basic \
-I $(OCAMLBUILDDIR)/core \
-I $(OCAMLBUILDDIR)/events
ARCHIVE = mlogdome
MODULES = \
Node \
NodeList \
NamedNodeMap \
CharacterData \
Attr \
Element \
Text \
Comment \
CDATASection \
DocumentType \
Notation \
Entity \
EntityReference \
ProcessingInstruction \
DocumentFragment \
Document
EVENTS_MODULES = \
EventTarget \
Event \
MutationEvent
O_AUTO_ML = \
gdome.ml
ALL_ML_SOURCES_ = $(O_AUTO_ML) $(O_AUTO_ML:%.ml=%.mli)
# OCaml objects
OCAML_OBJECTS = $(O_AUTO_ML:%.ml=%.cmo)
OCAMLOPT_OBJECTS = $(O_AUTO_ML:%.ml=%.cmx)
OCAML_INTERFACES = $(O_AUTO_ML:%.ml=%.cmi)
BUILT_SOURCES = $(O_AUTO_ML) $(O_AUTO_ML:%.ml=%.mli)
MAINTAINERCLEANFILES = \
$(O_AUTO_ML:%.ml=%.mli) \
$(O_AUTO_ML)
CLEANFILES = \
$(OCAML_INTERFACES) \
$(OCAML_OBJECTS) \
$(OCAMLOPT_OBJECTS) \
$(O_AUTO_ML:%.ml=%.o) \
$(ARCHIVE).cma $(ARCHIVE).cmxa $(ARCHIVE).a
EXTRA_DIST = \
$(ALL_ML_SOURCES_) \
gdomeCore.ml.prefix \
gdomeCore.ml.suffix \
gdomeEvents.ml.prefix \
gdomeEvents.ml.suffix \
gdomeCore.mli.prefix \
gdomeCore.mli.suffix \
gdomeEvents.mli.prefix \
gdomeEvents.mli.suffix \
.depend
XML2OML = $(srcdir)/../xsl/xml2oml.xsl
XML2OMLI = $(srcdir)/../xsl/xml2omli.xsl
XML2OMLCASTS = $(srcdir)/../xsl/xml2omlcasts.xsl
XML2OMLICASTS = $(srcdir)/../xsl/xml2omlicasts.xsl
XSLUTILS = $(srcdir)/../xsl/xslutils.xsl
XML2MLDOC = $(srcdir)/../xsl/xml2mldoc.xsl
@HAVE_OCAMLOPT_COND_FALSE@noinst_DATA = $(ARCHIVE).cma
@HAVE_OCAMLOPT_COND_TRUE@noinst_DATA = $(ARCHIVE).cma $(ARCHIVE).cmxa $(ARCHIVE).a
#### OCaml only stuff from now on
DEPOBJS = $(ALL_ML_SOURCES)
all: $(BUILT_SOURCES)
$(MAKE) $(AM_MAKEFLAGS) all-am
.SUFFIXES:
$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(srcdir)/.depend $(am__configure_deps)
@for dep in $?; do \
case '$(am__configure_deps)' in \
*$$dep*) \
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
&& exit 0; \
exit 1;; \
esac; \
done; \
echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/gdome_caml/ocaml/Makefile'; \
cd $(top_srcdir) && \
$(AUTOMAKE) --gnu src/gdome_caml/ocaml/Makefile
.PRECIOUS: Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
@case '$?' in \
*config.status*) \
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
*) \
echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
esac;
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(top_srcdir)/configure: $(am__configure_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(ACLOCAL_M4): $(am__aclocal_m4_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
mostlyclean-libtool:
-rm -f *.lo
clean-libtool:
-rm -rf .libs _libs
distclean-libtool:
-rm -f libtool
uninstall-info-am:
tags: TAGS
TAGS:
ctags: CTAGS
CTAGS:
distdir: $(DISTFILES)
@srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
list='$(DISTFILES)'; for file in $$list; do \
case $$file in \
$(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
$(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
esac; \
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
if test "$$dir" != "$$file" && test "$$dir" != "."; then \
dir="/$$dir"; \
$(mkdir_p) "$(distdir)$$dir"; \
else \
dir=''; \
fi; \
if test -d $$d/$$file; then \
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
fi; \
cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
else \
test -f $(distdir)/$$file \
|| cp -p $$d/$$file $(distdir)/$$file \
|| exit 1; \
fi; \
done
check-am: all-am
check: $(BUILT_SOURCES)
$(MAKE) $(AM_MAKEFLAGS) check-am
all-am: Makefile $(DATA)
installdirs:
install: $(BUILT_SOURCES)
$(MAKE) $(AM_MAKEFLAGS) install-am
install-exec: install-exec-am
install-data: install-data-am
uninstall: uninstall-am
install-am: all-am
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
installcheck: installcheck-am
install-strip:
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
`test -z '$(STRIP)' || \
echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
mostlyclean-generic:
clean-generic:
-test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
distclean-generic:
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
maintainer-clean-generic:
@echo "This command is intended for maintainers to use"
@echo "it deletes files that may require special tools to rebuild."
-test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES)
-test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES)
clean: clean-am
clean-am: clean-generic clean-libtool mostlyclean-am
distclean: distclean-am
-rm -f Makefile
distclean-am: clean-am distclean-generic distclean-libtool
dvi: dvi-am
dvi-am:
html: html-am
info: info-am
info-am:
install-data-am: install-data-local
install-exec-am:
install-info: install-info-am
install-man:
installcheck-am:
maintainer-clean: maintainer-clean-am
-rm -f Makefile
maintainer-clean-am: distclean-am maintainer-clean-generic
mostlyclean: mostlyclean-am
mostlyclean-am: mostlyclean-generic mostlyclean-libtool
pdf: pdf-am
pdf-am:
ps: ps-am
ps-am:
uninstall-am: uninstall-info-am
.PHONY: all all-am check check-am clean clean-generic clean-libtool \
distclean distclean-generic distclean-libtool distdir dvi \
dvi-am html html-am info info-am install install-am \
install-data install-data-am install-data-local install-exec \
install-exec-am install-info install-info-am install-man \
install-strip installcheck installcheck-am installdirs \
maintainer-clean maintainer-clean-generic mostlyclean \
mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
uninstall uninstall-am uninstall-info-am
$(ARCHIVE).cma : $(OCAML_OBJECTS)
$(OCAMLC) -o $@ -a $^
$(ARCHIVE).cmxa $(ARCHIVE).a : $(OCAMLOPT_OBJECTS)
$(OCAMLOPT) -o $@ -a $^
@HAVE_XSLTPROC_COND_TRUE@gdome.ml : $(XML2OML) $(XSLUTILS) $(XML2OMLCASTS) \
@HAVE_XSLTPROC_COND_TRUE@ $(MODULES:%=$(top_srcdir)/xml/DOM/Core/%.xml) \
@HAVE_XSLTPROC_COND_TRUE@ $(MODULES:%=$(srcdir)/../xml/Core/%.xml) \
@HAVE_XSLTPROC_COND_TRUE@ $(EVENTS_MODULES:%=$(top_srcdir)/xml/DOM/Events/%.xml) \
@HAVE_XSLTPROC_COND_TRUE@ $(EVENTS_MODULES:%=$(srcdir)/../xml/Events/%.xml) \
@HAVE_XSLTPROC_COND_TRUE@ gdomeCore.ml.prefix gdomeCore.ml.suffix \
@HAVE_XSLTPROC_COND_TRUE@ gdomeEvents.ml.prefix gdomeEvents.ml.suffix
@HAVE_XSLTPROC_COND_TRUE@ cp gdomeCore.ml.prefix $@
@HAVE_XSLTPROC_COND_TRUE@ echo "(********** Events Module: generated class definitions **********)" >> $@
@HAVE_XSLTPROC_COND_TRUE@ for i in $(EVENTS_MODULES) ; do $(XSLTPROC) --param uriprefix "'$(top_srcdir)/xml/DOM/Events'" --param annotations "'$(srcdir)/../xml/Events/$$i.xml'" --param module "'$$i'" $(XML2OML) $(top_srcdir)/xml/DOM/Events/$$i.xml >> $@ ; done
@HAVE_XSLTPROC_COND_TRUE@ cat gdomeEvents.ml.prefix >> $@
@HAVE_XSLTPROC_COND_TRUE@ echo "(********** Core Module: generated class definitions **********)" >> $@
@HAVE_XSLTPROC_COND_TRUE@ for i in $(MODULES) ; do $(XSLTPROC) --param uriprefix "'$(top_srcdir)/xml/DOM/Core'" --param annotations "'$(srcdir)/../xml/Core/$$i.xml'" --param module "'$$i'" $(XML2OML) $(top_srcdir)/xml/DOM/Core/$$i.xml >> $@ ; done
@HAVE_XSLTPROC_COND_TRUE@ cat gdomeCore.ml.suffix >> $@
@HAVE_XSLTPROC_COND_TRUE@ cat gdomeEvents.ml.suffix >> $@
@HAVE_XSLTPROC_COND_TRUE@ echo " " >> $@
@HAVE_XSLTPROC_COND_TRUE@ echo "(********** Events Module: generated dynamic down-casts **********)" >> $@
@HAVE_XSLTPROC_COND_TRUE@ for i in $(EVENTS_MODULES) ; do $(XSLTPROC) --param uriprefix "'$(top_srcdir)/xml/DOM/Events'" --param annotations "'$(srcdir)/../xml/Events/$$i.xml'" --param module "'$$i'" $(XML2OMLCASTS) $(top_srcdir)/xml/DOM/Events/$$i.xml >> $@ ; done
@HAVE_XSLTPROC_COND_TRUE@ echo " " >> $@
@HAVE_XSLTPROC_COND_TRUE@ echo "(********** Core Module: generated dynamic down-casts **********)" >> $@
@HAVE_XSLTPROC_COND_TRUE@ for i in $(MODULES) ; do $(XSLTPROC) --param uriprefix "'$(top_srcdir)/xml/DOM/Core'" --param annotations "'$(srcdir)/../xml/Core/$$i.xml'" --param module "'$$i'" $(XML2OMLCASTS) $(top_srcdir)/xml/DOM/Core/$$i.xml >> $@ ; done
@HAVE_XSLTPROC_COND_TRUE@gdome.mli : $(XML2OMLI) $(XSLUTILS) $(XML2MLDOC) $(XML2OMLICASTS) \
@HAVE_XSLTPROC_COND_TRUE@ $(MODULES:%=$(top_srcdir)/xml/DOM/Core/%.xml) \
@HAVE_XSLTPROC_COND_TRUE@ $(MODULES:%=$(srcdir)/../xml/Core/%.xml) \
@HAVE_XSLTPROC_COND_TRUE@ $(EVENTS_MODULES:%=$(top_srcdir)/xml/DOM/Events/%.xml) \
@HAVE_XSLTPROC_COND_TRUE@ $(EVENTS_MODULES:%=$(srcdir)/../xml/Events/%.xml) \
@HAVE_XSLTPROC_COND_TRUE@ gdomeCore.mli.prefix gdomeCore.mli.suffix \
@HAVE_XSLTPROC_COND_TRUE@ gdomeEvents.mli.prefix gdomeEvents.mli.suffix
@HAVE_XSLTPROC_COND_TRUE@ cp gdomeCore.mli.prefix $@
@HAVE_XSLTPROC_COND_TRUE@ echo "(********** Events Module: generated class definitions **********)" >> $@
@HAVE_XSLTPROC_COND_TRUE@ for i in $(EVENTS_MODULES) ; do $(XSLTPROC) --param uriprefix "'$(top_srcdir)/xml/DOM/Events'" --param annotations "'$(srcdir)/../xml/Events/$$i.xml'" --param module "'$$i'" $(XML2OMLI) $(top_srcdir)/xml/DOM/Events/$$i.xml >> $@ ; done
@HAVE_XSLTPROC_COND_TRUE@ cat gdomeEvents.mli.prefix >> $@
@HAVE_XSLTPROC_COND_TRUE@ echo "(********** Core Module: generated class definitions **********)" >> $@
@HAVE_XSLTPROC_COND_TRUE@ for i in $(MODULES) ; do $(XSLTPROC) --param uriprefix "'$(top_srcdir)/xml/DOM/Core'" --param annotations "'$(srcdir)/../xml/Core/$$i.xml'" --param module "'$$i'" $(XML2OMLI) $(top_srcdir)/xml/DOM/Core/$$i.xml >> $@ ; done
@HAVE_XSLTPROC_COND_TRUE@ cat gdomeCore.mli.suffix >> $@
@HAVE_XSLTPROC_COND_TRUE@ cat gdomeEvents.mli.suffix >> $@
@HAVE_XSLTPROC_COND_TRUE@ echo " " >> $@
@HAVE_XSLTPROC_COND_TRUE@ echo "(********** Events Module: generated dynamic down-casts **********)" >> $@
@HAVE_XSLTPROC_COND_TRUE@ for i in $(EVENTS_MODULES) ; do $(XSLTPROC) --param uriprefix "'$(top_srcdir)/xml/DOM/Events'" --param annotations "'$(srcdir)/../xml/Events/$$i.xml'" --param module "'$$i'" $(XML2OMLICASTS) $(top_srcdir)/xml/DOM/Events/$$i.xml >> $@ ; done
@HAVE_XSLTPROC_COND_TRUE@ echo " " >> $@
@HAVE_XSLTPROC_COND_TRUE@ echo "(********** Core Module: generated dynamic down-casts **********)" >> $@
@HAVE_XSLTPROC_COND_TRUE@ for i in $(MODULES) ; do $(XSLTPROC) --param uriprefix "'$(top_srcdir)/xml/DOM/Core'" --param annotations "'$(srcdir)/../xml/Core/$$i.xml'" --param module "'$$i'" $(XML2OMLICASTS) $(top_srcdir)/xml/DOM/Core/$$i.xml >> $@ ; done
@HAVE_OCAMLOPT_COND_TRUE@install-data-local: $(OCAML_INTERFACES) gdome.mli $(ARCHIVE).cma $(ARCHIVE).cmxa $(ARCHIVE).a
@HAVE_OCAMLOPT_COND_FALSE@install-data-local: $(OCAML_INTERFACES) gdome.mli $(ARCHIVE).cma
$(mkinstalldirs) $(OCAMLINSTALLDIR)
for i in $^; do \
$(INSTALL_DATA) $$i $(OCAMLINSTALLDIR); \
done
for i in $(ALL_ML_SOURCES); do \
$(INSTALL_DATA) $(srcdir)/$$i $(OCAMLINSTALLDIR); \
done
depend:
$(OCAMLDEP) $(DEPOBJS) > .depend
%.cmi : $(srcdir)/%.mli
if test ! -e $(@:%.cmi=%.mli) -a "x$(srcdir)" != "x." ; then $(LN_S) $< . ; fi
$(OCAMLC) -c $(@:%.cmi=%.mli)
%.cmo : $(srcdir)/%.ml
if test ! -e $(@:%.cmo=%.ml) -a "x$(srcdir)" != "x." ; then $(LN_S) $< . ; fi
$(OCAMLC) -c $(@:%.cmo=%.ml)
%.cmx %.o : $(srcdir)/%.ml
if test ! -e $(@:%.cmx=%.ml) -a "x$(srcdir)" != "x." ; then $(LN_S) $< . ; fi
$(OCAMLOPT) -c $(@:%.cmx=%.ml)
gdome.cmo: gdome.cmi
gdome.cmx: gdome.cmi
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:
gmetadom-0.2.6/src/gdome_caml/ocaml/gdomeCore.mli.prefix 0000755 0001750 0001750 00000033013 10465324540 020117 0000000 0000000 (* This file is part of GMetaDOM
* a generic bind package for the Document Object Model API.
* Copyright (C) 2001-2002 Luca Padovani
* 2002 Claudio Sacerdoti Coen
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
* For more information, please visit the project home page
* http://gmetadom.sourceforge.net
* or send an email to
*)
(********** Core Module: hand-written class definitions **********)
class domString :
TDOMString.t ->
(*** (new domString) IS A RESERVED CONSTRUCTOR ; DO NOT USE IN USER CODE ***)
object
(*** DOM METHODS ***)
method to_string : string
method equals : domString -> bool
(*** RESERVED METHODS, DO NOT USE IN USER CODE ***)
(*** required to implement bindings to other libraries ***)
method as_DOMString : TDOMString.t
end
;;
(* Comparison operator for objects with 'equals' method *)
val gdome_obj_eq : (< equals : 'a -> bool; .. > as 'a) -> 'a -> bool;;
val (===) : (< equals : 'a -> bool; .. > as 'a) -> 'a -> bool;;
(* The [domImplementation] interface provides a number of methods for *)
(* performing operations that are independent of any particular instance *)
(* of the document object model. *)
class domImplementation :
TDOMImplementation.t ->
(*** (new domImplementation) IS A RESERVED CONSTRUCTOR ; DO NOT USE IN USER CODE ***)
object
(* Test if the DOM implementation implements a specific feature. *)
(* Parameters: *)
(* feature: The name of the feature to test (case-insensitive). The *)
(* values used by DOM features are defined throughout the DOM Level 2 *)
(* specifications and listed in the ID-Compliance section. The name *)
(* must be an XML name. To avoid possible conflicts, as a convention, *)
(* names referring to features defined outside the DOM specification *)
(* should be made unique by reversing the name of the Internet domain *)
(* name of the person (or the organization that the person belongs to) *)
(* who defines the feature, component by component, and using this as *)
(* a prefix. For instance, the W3C SVG Working Group defines the *)
(* feature "org.w3c.dom.svg". *)
(* version: This is the version number of the feature to test. In Level *)
(* 2, the string can be either "2.0" or "1.0". If the version is *)
(* not specified, supporting any version of the feature causes the *)
(* method to return [true]. *)
(* Result: *)
(* [true] if the feature is implemented in the specified version, *)
(* [false] otherwise. *)
method hasFeature : feature:domString -> version:domString -> bool
(* Creates an empty [documentType] node. Entity declarations and *)
(* notations are not made available. Entity reference expansions and *)
(* default attribute additions do not occur. It is expected that a future *)
(* version of the DOM will provide a way for populating a [documentType]. *)
(* HTML-only DOM implementations do not need to implement this method. *)
(* Parameters: *)
(* qualifiedName: The qualified name of the document type to be created. *)
(* publicId: The external subset public identifier. *)
(* systemId: The external subset system identifier. *)
(* Result: *)
(* A new [DocumentType] node with [Node.ownerDocument] set to None. *)
(* Exceptions Raised: *)
(* DOMException: *)
(* INVALID_CHARACTER_ERR: Raised if the specified qualified name *)
(* contains an illegal character. *)
(* NAMESPACE_ERR: Raised if the [qualifiedName] is malformed. *)
method createDocumentType : qualifiedName:domString -> publicId:domString -> systemId:domString -> documentType
(* Creates an XML [document] object of the specified type with its *)
(* document element. HTML-only DOM implementations do not need to *)
(* implement this method. *)
(* Parameters: *)
(* namespaceURI: The namespace URI of the document element to create. *)
(* qualifiedName: The qualified name of the document element to be *)
(* created. *)
(* documentType: The type of document to be created or None. When *)
(* [doctype] is not None, its [Node.ownerDocument] attribute is set to *)
(* the document being created. *)
(* Result: *)
(* A new [Document] object. *)
(* Exceptions Raised: *)
(* DOMException: *)
(* INVALID_CHARACTER_ERR: Raised if the specified qualified name *)
(* contains an illegal character. *)
(* NAMESPACE_ERR: Raised if the [qualifiedName] is malformed, if the *)
(* [qualifiedName] has a prefix and the [namespaceURI] is None, or if *)
(* the [qualifiedName] has a prefix that is "xml" and the *)
(* [namespaceURI] is different from "xml-ns;". *)
(* WRONG_DOCUMENT_ERR: Raised if [doctype] has already been used with *)
(* a different document or was created from a different implementation.*)
method createDocument : namespaceURI:domString option -> qualifiedName:domString -> doctype:documentType option -> document
(* Creates an XML [document] object loading an XML document from the *)
(* specified URI. *)
(* Parameters: *)
(* uri: The URI of the XML document to be parsed. *)
(* validatingMode: Can be Parsing, Validating or Recovering; if not *)
(* specified, it defaults to Parsing. *)
(* keepEntities: if true [entityReference] nodes are explicitly *)
(* inserted in the DOM tree. Otherwise, they are substituted with *)
(* the entity expansion. The latest is the default. *)
(* Result: *)
(* A new [document] object. *)
(* Exceptions Raised: *)
(* DOMImplException: if an error occurs during parsing. *)
method createDocumentFromURI : uri:string -> ?validatingMode:IDOMImplementation.validatingMode -> ?keepEntities:bool -> unit -> document
(* Creates an XML [document] object parsing an XML document from the *)
(* specified buffer. *)
(* Parameters: *)
(* doc: A string buffer with the XML document to be parsed. *)
(* validatingMode: Can be Parsing, Validating or Recovering; if not *)
(* specified, it defaults to Parsing. *)
(* keepEntities: if true [entityReference] nodes are explicitly *)
(* inserted in the DOM tree. Otherwise, they are substituted with *)
(* the entity expansion. The latest is the default. *)
(* Result: *)
(* A new [document] object. *)
(* Exceptions Raised: *)
(* DOMImplException: if an error occurs during parsing. *)
method createDocumentFromMemory : doc:domString -> ?validatingMode:IDOMImplementation.validatingMode -> ?keepEntities:bool -> unit -> document
(* Saves an XML [document] to disk. *)
(* Parameters: *)
(* doc: The XML [document] to be saved. *)
(* name: The name of the destination file. *)
(* indent: if true, the document is pretty-printed indenting lines. *)
(* The default is to not indent the document. *)
(* Result: *)
(* [true] if the operation was succesful, [false] otherwise. *)
method saveDocumentToFile : doc:document -> name:string -> ?indent:bool -> unit -> bool
(* Saves an XML [document] to disk. *)
(* Parameters: *)
(* doc: The XML [document] to be saved. *)
(* name: The name of the destination file. *)
(* encoding: The name of the encoding. *)
(* indent: if true, the document is pretty-printed indenting lines. *)
(* The default is to not indent the document. *)
(* Result: *)
(* [true] if the operation was succesful, [false] otherwise. *)
method saveDocumentToFileEnc : doc:document -> name:string -> encoding:string -> ?indent:bool -> unit -> bool
(* Saves an XML [document] to a string. *)
(* Parameters: *)
(* doc: The XML [document] to be saved. *)
(* indent: if true, the document is pretty-printed indenting lines. *)
(* The default is to not indent the document. *)
(* Result: *)
(* A new [string] containing the document. *)
(* Exceptions Raised: *)
(* DOMImplException: if an error occurs during parsing. *)
method saveDocumentToMemory : doc:document -> ?indent:bool -> unit -> string
(* Saves an XML [document] to a string. *)
(* Parameters: *)
(* doc: The XML [document] to be saved. *)
(* encoding: The name of the encoding. *)
(* indent: if true, the document is pretty-printed indenting lines. *)
(* The default is to not indent the document. *)
(* Result: *)
(* A new [string] containing the document. *)
(* Exceptions Raised: *)
(* DOMImplException: if an error occurs during parsing. *)
method saveDocumentToMemoryEnc : doc:document -> encoding:string -> ?indent:bool -> unit -> string
(* Enables a DOM Event. *)
(* Parameters: *)
(* doc: The XML [document] *)
(* name: The name of the DOM Event to be enabled. "*" means all the *)
(* events. *)
method enableEvent : doc:document -> name:string -> unit
(* Disables a DOM Event. *)
(* Parameters: *)
(* doc: The XML [document] *)
(* name: The name of the DOM Event to be disabled. "*" means all the *)
(* events. *)
method disableEvent : doc:document -> name:string -> unit
(* Tests whether a DOM Event is enabled or disabled. *)
(* Parameters: *)
(* doc: The XML [document] *)
(* name: The name of the DOM Event to test. *)
method eventIsEnabled : doc:document -> name:string -> bool
end
gmetadom-0.2.6/src/gdome_caml/ocaml/gdome.mli 0000755 0001750 0001750 00000374046 10704632510 016023 0000000 0000000 (* This file is part of GMetaDOM
* a generic bind package for the Document Object Model API.
* Copyright (C) 2001-2002 Luca Padovani
* 2002 Claudio Sacerdoti Coen
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
* For more information, please visit the project home page
* http://gmetadom.sourceforge.net
* or send an email to
*)
(********** Core Module: hand-written class definitions **********)
class domString :
TDOMString.t ->
(*** (new domString) IS A RESERVED CONSTRUCTOR ; DO NOT USE IN USER CODE ***)
object
(*** DOM METHODS ***)
method to_string : string
method equals : domString -> bool
(*** RESERVED METHODS, DO NOT USE IN USER CODE ***)
(*** required to implement bindings to other libraries ***)
method as_DOMString : TDOMString.t
end
;;
(* Comparison operator for objects with 'equals' method *)
val gdome_obj_eq : (< equals : 'a -> bool; .. > as 'a) -> 'a -> bool;;
val (===) : (< equals : 'a -> bool; .. > as 'a) -> 'a -> bool;;
(* The [domImplementation] interface provides a number of methods for *)
(* performing operations that are independent of any particular instance *)
(* of the document object model. *)
class domImplementation :
TDOMImplementation.t ->
(*** (new domImplementation) IS A RESERVED CONSTRUCTOR ; DO NOT USE IN USER CODE ***)
object
(* Test if the DOM implementation implements a specific feature. *)
(* Parameters: *)
(* feature: The name of the feature to test (case-insensitive). The *)
(* values used by DOM features are defined throughout the DOM Level 2 *)
(* specifications and listed in the ID-Compliance section. The name *)
(* must be an XML name. To avoid possible conflicts, as a convention, *)
(* names referring to features defined outside the DOM specification *)
(* should be made unique by reversing the name of the Internet domain *)
(* name of the person (or the organization that the person belongs to) *)
(* who defines the feature, component by component, and using this as *)
(* a prefix. For instance, the W3C SVG Working Group defines the *)
(* feature "org.w3c.dom.svg". *)
(* version: This is the version number of the feature to test. In Level *)
(* 2, the string can be either "2.0" or "1.0". If the version is *)
(* not specified, supporting any version of the feature causes the *)
(* method to return [true]. *)
(* Result: *)
(* [true] if the feature is implemented in the specified version, *)
(* [false] otherwise. *)
method hasFeature : feature:domString -> version:domString -> bool
(* Creates an empty [documentType] node. Entity declarations and *)
(* notations are not made available. Entity reference expansions and *)
(* default attribute additions do not occur. It is expected that a future *)
(* version of the DOM will provide a way for populating a [documentType]. *)
(* HTML-only DOM implementations do not need to implement this method. *)
(* Parameters: *)
(* qualifiedName: The qualified name of the document type to be created. *)
(* publicId: The external subset public identifier. *)
(* systemId: The external subset system identifier. *)
(* Result: *)
(* A new [DocumentType] node with [Node.ownerDocument] set to None. *)
(* Exceptions Raised: *)
(* DOMException: *)
(* INVALID_CHARACTER_ERR: Raised if the specified qualified name *)
(* contains an illegal character. *)
(* NAMESPACE_ERR: Raised if the [qualifiedName] is malformed. *)
method createDocumentType : qualifiedName:domString -> publicId:domString -> systemId:domString -> documentType
(* Creates an XML [document] object of the specified type with its *)
(* document element. HTML-only DOM implementations do not need to *)
(* implement this method. *)
(* Parameters: *)
(* namespaceURI: The namespace URI of the document element to create. *)
(* qualifiedName: The qualified name of the document element to be *)
(* created. *)
(* documentType: The type of document to be created or None. When *)
(* [doctype] is not None, its [Node.ownerDocument] attribute is set to *)
(* the document being created. *)
(* Result: *)
(* A new [Document] object. *)
(* Exceptions Raised: *)
(* DOMException: *)
(* INVALID_CHARACTER_ERR: Raised if the specified qualified name *)
(* contains an illegal character. *)
(* NAMESPACE_ERR: Raised if the [qualifiedName] is malformed, if the *)
(* [qualifiedName] has a prefix and the [namespaceURI] is None, or if *)
(* the [qualifiedName] has a prefix that is "xml" and the *)
(* [namespaceURI] is different from "xml-ns;". *)
(* WRONG_DOCUMENT_ERR: Raised if [doctype] has already been used with *)
(* a different document or was created from a different implementation.*)
method createDocument : namespaceURI:domString option -> qualifiedName:domString -> doctype:documentType option -> document
(* Creates an XML [document] object loading an XML document from the *)
(* specified URI. *)
(* Parameters: *)
(* uri: The URI of the XML document to be parsed. *)
(* validatingMode: Can be Parsing, Validating or Recovering; if not *)
(* specified, it defaults to Parsing. *)
(* keepEntities: if true [entityReference] nodes are explicitly *)
(* inserted in the DOM tree. Otherwise, they are substituted with *)
(* the entity expansion. The latest is the default. *)
(* Result: *)
(* A new [document] object. *)
(* Exceptions Raised: *)
(* DOMImplException: if an error occurs during parsing. *)
method createDocumentFromURI : uri:string -> ?validatingMode:IDOMImplementation.validatingMode -> ?keepEntities:bool -> unit -> document
(* Creates an XML [document] object parsing an XML document from the *)
(* specified buffer. *)
(* Parameters: *)
(* doc: A string buffer with the XML document to be parsed. *)
(* validatingMode: Can be Parsing, Validating or Recovering; if not *)
(* specified, it defaults to Parsing. *)
(* keepEntities: if true [entityReference] nodes are explicitly *)
(* inserted in the DOM tree. Otherwise, they are substituted with *)
(* the entity expansion. The latest is the default. *)
(* Result: *)
(* A new [document] object. *)
(* Exceptions Raised: *)
(* DOMImplException: if an error occurs during parsing. *)
method createDocumentFromMemory : doc:domString -> ?validatingMode:IDOMImplementation.validatingMode -> ?keepEntities:bool -> unit -> document
(* Saves an XML [document] to disk. *)
(* Parameters: *)
(* doc: The XML [document] to be saved. *)
(* name: The name of the destination file. *)
(* indent: if true, the document is pretty-printed indenting lines. *)
(* The default is to not indent the document. *)
(* Result: *)
(* [true] if the operation was succesful, [false] otherwise. *)
method saveDocumentToFile : doc:document -> name:string -> ?indent:bool -> unit -> bool
(* Saves an XML [document] to disk. *)
(* Parameters: *)
(* doc: The XML [document] to be saved. *)
(* name: The name of the destination file. *)
(* encoding: The name of the encoding. *)
(* indent: if true, the document is pretty-printed indenting lines. *)
(* The default is to not indent the document. *)
(* Result: *)
(* [true] if the operation was succesful, [false] otherwise. *)
method saveDocumentToFileEnc : doc:document -> name:string -> encoding:string -> ?indent:bool -> unit -> bool
(* Saves an XML [document] to a string. *)
(* Parameters: *)
(* doc: The XML [document] to be saved. *)
(* indent: if true, the document is pretty-printed indenting lines. *)
(* The default is to not indent the document. *)
(* Result: *)
(* A new [string] containing the document. *)
(* Exceptions Raised: *)
(* DOMImplException: if an error occurs during parsing. *)
method saveDocumentToMemory : doc:document -> ?indent:bool -> unit -> string
(* Saves an XML [document] to a string. *)
(* Parameters: *)
(* doc: The XML [document] to be saved. *)
(* encoding: The name of the encoding. *)
(* indent: if true, the document is pretty-printed indenting lines. *)
(* The default is to not indent the document. *)
(* Result: *)
(* A new [string] containing the document. *)
(* Exceptions Raised: *)
(* DOMImplException: if an error occurs during parsing. *)
method saveDocumentToMemoryEnc : doc:document -> encoding:string -> ?indent:bool -> unit -> string
(* Enables a DOM Event. *)
(* Parameters: *)
(* doc: The XML [document] *)
(* name: The name of the DOM Event to be enabled. "*" means all the *)
(* events. *)
method enableEvent : doc:document -> name:string -> unit
(* Disables a DOM Event. *)
(* Parameters: *)
(* doc: The XML [document] *)
(* name: The name of the DOM Event to be disabled. "*" means all the *)
(* events. *)
method disableEvent : doc:document -> name:string -> unit
(* Tests whether a DOM Event is enabled or disabled. *)
(* Parameters: *)
(* doc: The XML [document] *)
(* name: The name of the DOM Event to test. *)
method eventIsEnabled : doc:document -> name:string -> bool
end
(********** Events Module: generated class definitions **********)
(* The [eventTarget] interface is implemented by all [nodes] in an *)
(* implementation which supports the DOM Event Model. Therefore, this *)
(* interface can be obtained by using binding-specific casting methods *)
(* on an instance of the [node] interface. The interface allows *)
(* registration and removal of [eventListeners] on an [eventTarget] and *)
(* dispatch of events to that [eventTarget]. *)
and eventTarget : TEventTarget.t ->
(*** (new eventTarget) IS A RESERVED CONSTRUCTOR ; DO NOT USE IN USER CODE ***)
object
(*** DOM METHODS ***)
(* This method allows the registration of event listeners on the event *)
(* target. If an [eventListener] is added to an [eventTarget] while it *)
(* is processing an event, it will not be triggered by the current *)
(* actions but may be triggered during a later stage of event flow, such *)
(* as the bubbling phase. If multiple identical [eventListener]s are *)
(* registered on the same [eventTarget] with the same parameters the *)
(* duplicate instances are discarded. They do not cause the *)
(* [eventListener] to be called twice and since they are discarded they *)
(* do not need to be removed with the [removeEventListener] method. *)
(* Parameters: *)
(* type: The event type for which the user is registering *)
(* listener: The [listener] parameter takes an interface implemented by *)
(* the user which contains the methods to be called when the event *)
(* occurs. *)
(* useCapture: If true, [useCapture] indicates that the user wishes to *)
(* initiate capture. After initiating capture, all events of the *)
(* specified type will be dispatched to the registered *)
(* [eventListener] before being dispatched to any [eventTargets] *)
(* beneath them in the tree. Events which are bubbling upward through *)
(* the tree will not trigger an [eventListener] designated to use *)
(* capture. *)
method addEventListener : typ:domString -> listener:eventListener -> useCapture:bool -> unit
(* This method allows the dispatch of events into the implementations *)
(* event model. Events dispatched in this manner will have the same *)
(* capturing and bubbling behavior as events dispatched directly by the *)
(* implementation. The target of the event is the [ EventTarget] on *)
(* which [dispatchEvent] is called. *)
(* Parameters: *)
(* evt: Specifies the event type, behavior, and contextual information *)
(* to be used in processing the event. *)
(* Result: *)
(* The return value of [dispatchEvent] indicates whether any of the *)
(* listeners which handled the event called [preventDefault]. If *)
(* [preventDefault] was called the value is false, else the value is *)
(* true. *)
(* Exceptions Raised: *)
(* EventException: *)
(* UNSPECIFIED_EVENT_TYPE_ERR: Raised if the [event]'s type was not *)
(* specified by initializing the event before [dispatchEvent] was *)
(* called. Specification of the [event]'s type as [None] or an empty *)
(* string will also trigger this exception. *)
method dispatchEvent : evt:event -> bool
(* This method allows the removal of event listeners from the event *)
(* target. If an [eventListener] is removed from an [eventTarget] while *)
(* it is processing an event, it will not be triggered by the current *)
(* actions. [eventListener]s can never be invoked after being removed. *)
(* Calling [removeEventListener] with arguments which do not identify *)
(* any currently registered [eventListener] on the [eventTarget] has no *)
(* effect. *)
(* Parameters: *)
(* type: Specifies the event type of the [eventListener] being removed. *)
(* listener: The [eventListener] parameter indicates the [eventListener *)
(* ] to be removed. *)
(* useCapture: Specifies whether the [eventListener] being removed was *)
(* registered as a capturing listener or not. If a listener was *)
(* registered twice, one with capture and one without, each must be *)
(* removed separately. Removal of a capturing listener does not *)
(* affect a non-capturing version of the same listener, and vice *)
(* versa. *)
method removeEventListener : typ:domString -> listener:eventListener -> useCapture:bool -> unit
(*** RESERVED METHODS, DO NOT USE IN USER CODE ***)
(*** required to implement bindings to other libraries ***)
method as_EventTarget : TEventTarget.t
end
(* The [event] interface is used to provide contextual information about *)
(* an event to the handler processing the event. An object which *)
(* implements the [event] interface is generally passed as the first *)
(* parameter to an event handler. More specific context information is *)
(* passed to event handlers by deriving additional interfaces from *)
(* [event] which contain information directly relating to the type of *)
(* event they accompany. These derived interfaces are also implemented *)
(* by the object passed to the event listener. *)
and event : TEvent.t ->
(*** (new event) IS A RESERVED CONSTRUCTOR ; DO NOT USE IN USER CODE ***)
object
(*** DOM ATTRIBUTES AS GET/SET METHODS ***)
(* Used to indicate whether or not an event is a bubbling event. If the *)
(* event can bubble the value is true, else the value is false. *)
method get_bubbles : bool
(* Used to indicate whether or not an event can have its default action *)
(* prevented. If the default action can be prevented the value is true, *)
(* else the value is false. *)
method get_cancelable : bool
(* Used to indicate the [eventTarget] whose [eventListeners] are *)
(* currently being processed. This is particularly useful during *)
(* capturing and bubbling. *)
method get_currentTarget : eventTarget
(* Used to indicate which phase of event flow is currently being *)
(* evaluated. *)
method get_eventPhase : int
(* Used to indicate the [eventTarget] to which the event was originally *)
(* dispatched. *)
method get_target : eventTarget
(* Used to specify the time (in milliseconds relative to the epoch) at *)
(* which the event was created. Due to the fact that some systems may *)
(* not provide this information the value of [timeStamp] may be not *)
(* available for all events. When not available, a value of 0 will be *)
(* returned. Examples of epoch time are the time of the system start or *)
(* 0:0:0 UTC 1st January 1970. *)
method get_timeStamp : TDOMTimeStamp.t
(* The name of the event (case-insensitive). The name must be an XML *)
(* name. *)
method get_type : domString
(*** DOM METHODS ***)
(* The [initEvent] method is used to initialize the value of an [event] *)
(* created through the [documentEvent] interface. This method may only *)
(* be called before the [event] has been dispatched via the *)
(* [dispatchEvent] method, though it may be called multiple times during *)
(* that phase if necessary. If called multiple times the final *)
(* invocation takes precedence. If called from a subclass of [event] *)
(* interface only the values specified in the [initEvent] method are *)
(* modified, all other attributes are left unchanged. *)
(* Parameters: *)
(* eventTypeArg: Specifies the event type. This type may be any event *)
(* type currently defined in this specification or a new event type.. *)
(* The string must be an XML name. Any new event type must not begin *)
(* with any upper, lower, or mixed case version of the string "DOM". *)
(* This prefix is reserved for future DOM event sets. It is also *)
(* strongly recommended that third parties adding their own events *)
(* use their own prefix to avoid confusion and lessen the probability *)
(* of conflicts with other new events. *)
(* canBubbleArg: Specifies whether or not the event can bubble. *)
(* cancelableArg: Specifies whether or not the event's default action *)
(* can be prevented. *)
method initEvent : eventTypeArg:domString -> canBubbleArg:bool -> cancelableArg:bool -> unit
(* If an event is cancelable, the [preventDefault] method is used to *)
(* signify that the event is to be canceled, meaning any default action *)
(* normally taken by the implementation as a result of the event will *)
(* not occur. If, during any stage of event flow, the [preventDefault] *)
(* method is called the event is canceled. Any default action associated *)
(* with the event will not occur. Calling this method for a *)
(* non-cancelable event has no effect. Once [preventDefault] has been *)
(* called it will remain in effect throughout the remainder of the *)
(* event's propagation. This method may be used during any stage of *)
(* event flow. *)
method preventDefault : unit
(* The [stopPropagation] method is used prevent further propagation of *)
(* an event during event flow. If this method is called by any *)
(* [eventListener] the event will cease propagating through the tree. *)
(* The event will complete dispatch to all listeners on the current *)
(* [eventTarget] before event flow stops. This method may be used during *)
(* any stage of event flow. *)
method stopPropagation : unit
(*** RESERVED METHODS, DO NOT USE IN USER CODE ***)
(*** required to implement bindings to other libraries ***)
method as_Event : TEvent.t
end
(* The [mutationEvent] interface provides specific contextual *)
(* information associated with Mutation events. *)
and mutationEvent : TMutationEvent.t ->
(*** (new mutationEvent) IS A RESERVED CONSTRUCTOR ; DO NOT USE IN USER CODE ***)
object
inherit event
(*** DOM ATTRIBUTES AS GET/SET METHODS ***)
(* [attrChange] indicates the type of change which triggered the *)
(* DOMAttrModified event. The values can be [mODIFICATION], [aDDITION], *)
(* or [rEMOVAL]. *)
method get_attrChange : int
(* [attrName] indicates the name of the changed [attr] node in a *)
(* DOMAttrModified event. *)
method get_attrName : domString option
(* [newValue] indicates the new value of the [attr] node in *)
(* DOMAttrModified events, and of the [characterData] node in *)
(* DOMCharDataModified events. *)
method get_newValue : domString option
(* [prevValue] indicates the previous value of the [attr] node in *)
(* DOMAttrModified events, and of the [characterData] node in *)
(* DOMCharDataModified events. *)
method get_prevValue : domString option
(* [relatedNode] is used to identify a secondary node related to a *)
(* mutation event. For example, if a mutation event is dispatched to a *)
(* node indicating that its parent has changed, the [relatedNode] is the *)
(* changed parent. If an event is instead dispatched to a subtree *)
(* indicating a node was changed within it, the [relatedNode] is the *)
(* changed node. In the case of the DOMAttrModified event it indicates *)
(* the [attr] node which was modified, added, or removed. *)
method get_relatedNode : node option
(*** DOM METHODS ***)
(* The [initMutationEvent] method is used to initialize the value of a *)
(* [mutationEvent] created through the [documentEvent] interface. This *)
(* method may only be called before the [mutationEvent] has been *)
(* dispatched via the [dispatchEvent] method, though it may be called *)
(* multiple times during that phase if necessary. If called multiple *)
(* times, the final invocation takes precedence. *)
(* Parameters: *)
(* typeArg: Specifies the event type. *)
(* canBubbleArg: Specifies whether or not the event can bubble. *)
(* cancelableArg: Specifies whether or not the event's default action *)
(* can be prevented. *)
(* relatedNodeArg: Specifies the [event]'s related Node *)
(* prevValueArg: Specifies the [event]'s [prevValue] attribute *)
(* newValueArg: Specifies the [event]'s [newValue] attribute *)
(* attrNameArg: Specifies the [event]'s [attrName] attribute *)
(* attrChangeArg: Specifies the [event]'s [attrName] attribute *)
method initMutationEvent : typeArg:domString -> canBubbleArg:bool -> cancelableArg:bool -> relatedNodeArg:node option -> prevValueArg:domString option -> newValueArg:domString option -> attrNameArg:domString option -> attrChangeArg:int option -> unit
(*** RESERVED METHODS, DO NOT USE IN USER CODE ***)
(*** required to implement bindings to other libraries ***)
method as_MutationEvent : TMutationEvent.t
end
(********** Events Module: hand-written class definitions **********)
and eventListener : TEventListener.t ->
object
(*** RESERVED METHODS, DO NOT USE IN USER CODE ***)
(*** required to implement bindings to other libraries ***)
method as_EventListener : TEventListener.t
end
(********** Core Module: generated class definitions **********)
(* The [node] interface is the primary datatype for the entire Document *)
(* Object Model. It represents a single node in the document tree. While *)
(* all objects implementing the [node] interface expose methods for *)
(* dealing with children, not all objects implementing the [node] *)
(* interface may have children. For example, [text] nodes may not have *)
(* children, and adding children to such nodes results in a *)
(* [domException] being raised. The attributes [nodeName], [nodeValue] *)
(* and [attributes] are included as a mechanism to get at node *)
(* information without casting down to the specific derived interface. *)
(* In cases where there is no obvious mapping of these attributes for a *)
(* specific [nodeType] (e.g., [nodeValue] for an [element] or *)
(* [attributes] for a [comment]), this returns [None]. Note that the *)
(* specialized interfaces may contain additional and more convenient *)
(* mechanisms to get and set the relevant information. *)
and node : TNode.t ->
(*** (new node) IS A RESERVED CONSTRUCTOR ; DO NOT USE IN USER CODE ***)
object
inherit eventTarget
(*** DOM ATTRIBUTES AS GET/SET METHODS ***)
(* A [namedNodeMap] containing the attributes of this node (if it is an *)
(* [element]) or [None] otherwise. *)
method get_attributes : namedNodeMap option
(* A [nodeList] that contains all children of this node. If there are no *)
(* children, this is a [nodeList] containing no nodes. *)
method get_childNodes : nodeList
(* The first child of this node. If there is no such node, this returns *)
(* [None]. *)
method get_firstChild : node option
(* The last child of this node. If there is no such node, this returns *)
(* [None]. *)
method get_lastChild : node option
(* Returns the local part of the qualified name of this node. For nodes *)
(* of any type other than [eLEMENT_NODE] and [aTTRIBUTE_NODE] and nodes *)
(* created with a DOM Level 1 method, such as [createElement] from the *)
(* [document] interface, this is always [None]. *)
method get_localName : domString option
(* The namespace URI of this node, or [None] if it is unspecified. This *)
(* is not a computed value that is the result of a namespace lookup *)
(* based on an examination of the namespace declarations in scope. It is *)
(* merely the namespace URI given at creation time. For nodes of any *)
(* type other than [eLEMENT_NODE] and [aTTRIBUTE_NODE] and nodes created *)
(* with a DOM Level 1 method, such as [createElement] from the *)
(* [document] interface, this is always [None]. *)
method get_namespaceURI : domString option
(* The node immediately following this node. If there is no such node, *)
(* this returns [None]. *)
method get_nextSibling : node option
(* The name of this node, depending on its type; see the table above. *)
method get_nodeName : domString
(* A code representing the type of the underlying object, as defined *)
(* above. *)
method get_nodeType : GdomeNodeTypeT.t
(* The value of this node, depending on its type; see the table above. *)
(* When it is defined to be [None], setting it has no effect. *)
(* Exceptions Raised: *)
(* DOMException: *)
(* DOMSTRING_SIZE_ERR: Raised when it would return more characters *)
(* than fit in a [domString] variable on the implementation platform. *)
method get_nodeValue : domString option
(* Exceptions Raised: *)
(* DOMException: *)
(* NO_MODIFICATION_ALLOWED_ERR: Raised when the node is readonly. *)
method set_nodeValue : value:domString option -> unit
(* The [document] object associated with this node. This is also the *)
(* [document] object used to create new nodes. When this node is a *)
(* [document] or a [documentType] which is not used with any [document] *)
(* yet, this is [None]. *)
method get_ownerDocument : document option
(* The parent of this node. All nodes, except [attr], [document], *)
(* [documentFragment], [entity], and [notation] may have a parent. *)
(* However, if a node has just been created and not yet added to the *)
(* tree, or if it has been removed from the tree, this is [None]. *)
method get_parentNode : node option
(* The namespace prefix of this node, or [None] if it is unspecified. *)
(* Note that setting this attribute, when permitted, changes the *)
(* [nodeName] attribute, which holds the qualified name, as well as the *)
(* [tagName] and [name] attributes of the [element] and [attr] *)
(* interfaces, when applicable. Note also that changing the prefix of an *)
(* attribute that is known to have a default value, does not make a new *)
(* attribute with the default value and the original prefix appear, *)
(* since the [namespaceURI] and [localName] do not change. For nodes of *)
(* any type other than [eLEMENT_NODE] and [aTTRIBUTE_NODE] and nodes *)
(* created with a DOM Level 1 method, such as [createElement] from the *)
(* [document] interface, this is always [None]. *)
method get_prefix : domString option
(* Exceptions Raised: *)
(* DOMException: *)
(* INVALID_CHARACTER_ERR: Raised if the specified prefix contains an *)
(* illegal character. NO_MODIFICATION_ALLOWED_ERR: Raised if this *)
(* node is readonly. NAMESPACE_ERR: Raised if the specified [prefix] *)
(* is malformed, if the [namespaceURI] of this node is [None], if the *)
(* specified prefix is "xml" and the [namespaceURI] of this node is *)
(* different from "xml-ns;", if this node is an attribute and the *)
(* specified prefix is "xmlns" and the [namespaceURI] of this node is *)
(* different from "xmlns-ns;", or if this node is an attribute and *)
(* the [qualifiedName] of this node is "xmlns" . *)
method set_prefix : value:domString option -> unit
(* The node immediately preceding this node. If there is no such node, *)
(* this returns [None]. *)
method get_previousSibling : node option
(*** DOM METHODS ***)
(*** Checks whether the argument is physically the same node as this node. ***)
method isSameNode : node -> bool
method equals : node -> bool
(* Adds the node [newChild] to the end of the list of children of this *)
(* node. If the [newChild] is already in the tree, it is first removed. *)
(* Parameters: *)
(* newChild: The node to add. If it is a [documentFragment] object, the *)
(* entire contents of the document fragment are moved into the child *)
(* list of this node *)
(* Result: *)
(* The node added. *)
(* Exceptions Raised: *)
(* DOMException: *)
(* HIERARCHY_REQUEST_ERR: Raised if this node is of a type that does *)
(* not allow children of the type of the [newChild] node, or if the *)
(* node to append is one of this node's ancestors. *)
(* WRONG_DOCUMENT_ERR: Raised if [newChild] was created from a *)
(* different document than the one that created this node. *)
(* NO_MODIFICATION_ALLOWED_ERR: Raised if this node is readonly. *)
method appendChild : newChild:node -> node
(* Returns a duplicate of this node, i.e., serves as a generic copy *)
(* constructor for nodes. The duplicate node has no parent; *)
(* ([parentNode] is [None].). Cloning an [element] copies all attributes *)
(* and their values, including those generated by the XML processor to *)
(* represent defaulted attributes, but this method does not copy any *)
(* text it contains unless it is a deep clone, since the text is *)
(* contained in a child [text] node. Cloning an [attribute] directly, as *)
(* opposed to be cloned as part of an [element] cloning operation, *)
(* returns a specified attribute ([specified] is [true]). Cloning any *)
(* other type of node simply returns a copy of this node. Note that *)
(* cloning an immutable subtree results in a mutable copy, but the *)
(* children of an [entityReference] clone are readonly. In addition, *)
(* clones of unspecified [attr] nodes are specified. And, cloning *)
(* [document], [documentType], [entity], and [notation] nodes is *)
(* implementation dependent. *)
(* Parameters: *)
(* deep: If [true], recursively clone the subtree under the specified *)
(* node; if [false], clone only the node itself (and its attributes, *)
(* if it is an [element]). *)
(* Result: *)
(* The duplicate node. *)
method cloneNode : deep:bool -> node
(* Returns whether this node (if it is an element) has any attributes. *)
(* Result: *)
(* [true] if this node has any attributes, [false] otherwise. *)
method hasAttributes : bool
(* Returns whether this node has any children. *)
(* Result: *)
(* [true] if this node has any children, [false] otherwise. *)
method hasChildNodes : bool
(* Inserts the node [newChild] before the existing child node *)
(* [refChild]. If [refChild] is [None], insert [newChild] at the end of *)
(* the list of children. If [newChild] is a [documentFragment] object, *)
(* all of its children are inserted, in the same order, before *)
(* [refChild]. If the [newChild] is already in the tree, it is first *)
(* removed. *)
(* Parameters: *)
(* newChild: The node to insert. *)
(* refChild: The reference node, i.e., the node before which the new *)
(* node must be inserted. *)
(* Result: *)
(* The node being inserted. *)
(* Exceptions Raised: *)
(* DOMException: *)
(* HIERARCHY_REQUEST_ERR: Raised if this node is of a type that does *)
(* not allow children of the type of the [newChild] node, or if the *)
(* node to insert is one of this node's ancestors. *)
(* WRONG_DOCUMENT_ERR: Raised if [newChild] was created from a *)
(* different document than the one that created this node. *)
(* NO_MODIFICATION_ALLOWED_ERR: Raised if this node is readonly or if *)
(* the parent of the node being inserted is readonly. NOT_FOUND_ERR: *)
(* Raised if [refChild] is not a child of this node. *)
method insertBefore : newChild:node -> refChild:node option -> node
(* Tests whether the DOM implementation implements a specific feature *)
(* and that feature is supported by this node. *)
(* Parameters: *)
(* feature: The name of the feature to test. This is the same name *)
(* which can be passed to the method [hasFeature] on *)
(* [domImplementation]. *)
(* version: This is the version number of the feature to test. In Level *)
(* 2, version 1, this is the string "2.0". If the version is not *)
(* specified, supporting any version of the feature will cause the *)
(* method to return [true]. *)
(* Result: *)
(* Returns [true] if the specified feature is supported on this node, *)
(* [false] otherwise. *)
method isSupported : feature:domString -> version:domString -> bool
(* Puts all [text] nodes in the full depth of the sub-tree underneath *)
(* this [node], including attribute nodes, into a "normal" form where *)
(* only structure (e.g., elements, comments, processing instructions, *)
(* CDATA sections, and entity references) separates [text] nodes, i.e., *)
(* there are neither adjacent [text] nodes nor empty [text] nodes. This *)
(* can be used to ensure that the DOM view of a document is the same as *)
(* if it were saved and re-loaded, and is useful when operations (such *)
(* as XPointer lookups) that depend on a particular document tree *)
(* structure are to be used. *)
method normalize : unit
(* Removes the child node indicated by [oldChild] from the list of *)
(* children, and returns it. *)
(* Parameters: *)
(* oldChild: The node being removed. *)
(* Result: *)
(* The node removed. *)
(* Exceptions Raised: *)
(* DOMException: *)
(* NO_MODIFICATION_ALLOWED_ERR: Raised if this node is readonly. *)
(* NOT_FOUND_ERR: Raised if [oldChild] is not a child of this node. *)
method removeChild : oldChild:node -> node
(* Replaces the child node [oldChild] with [newChild] in the list of *)
(* children, and returns the [oldChild] node. If [newChild] is a *)
(* [documentFragment] object, [oldChild] is replaced by all of the *)
(* [documentFragment] children, which are inserted in the same order. If *)
(* the [newChild] is already in the tree, it is first removed. *)
(* Parameters: *)
(* newChild: The new node to put in the child list. *)
(* oldChild: The node being replaced in the list. *)
(* Result: *)
(* The node replaced. *)
(* Exceptions Raised: *)
(* DOMException: *)
(* HIERARCHY_REQUEST_ERR: Raised if this node is of a type that does *)
(* not allow children of the type of the [newChild] node, or if the *)
(* node to put in is one of this node's ancestors. *)
(* WRONG_DOCUMENT_ERR: Raised if [newChild] was created from a *)
(* different document than the one that created this node. *)
(* NO_MODIFICATION_ALLOWED_ERR: Raised if this node or the parent of *)
(* the new node is readonly. NOT_FOUND_ERR: Raised if [oldChild] is *)
(* not a child of this node. *)
method replaceChild : newChild:node -> oldChild:node -> node
(*** RESERVED METHODS, DO NOT USE IN USER CODE ***)
(*** required to implement bindings to other libraries ***)
method as_Node : TNode.t
end
(* The [nodeList] interface provides the abstraction of an ordered *)
(* collection of nodes, without defining or constraining how this *)
(* collection is implemented. [nodeList] objects in the DOM are live. *)
(* The items in the [nodeList] are accessible via an integral index, *)
(* starting from 0. *)
and nodeList : TNodeList.t ->
(*** (new nodeList) IS A RESERVED CONSTRUCTOR ; DO NOT USE IN USER CODE ***)
object
(*** DOM ATTRIBUTES AS GET/SET METHODS ***)
(* The number of nodes in the list. The range of valid child node *)
(* indices is 0 to [length-1] inclusive. *)
method get_length : int
(*** DOM METHODS ***)
(* Returns the [index]th item in the collection. If [index] is greater *)
(* than or equal to the number of nodes in the list, this returns *)
(* [None]. *)
(* Parameters: *)
(* index: Index into the collection. *)
(* Result: *)
(* The node at the [index]th position in the [nodeList], or [None] if *)
(* that is not a valid index. *)
method item : index:int -> node option
(*** RESERVED METHODS, DO NOT USE IN USER CODE ***)
(*** required to implement bindings to other libraries ***)
method as_NodeList : TNodeList.t
end
(* Objects implementing the [namedNodeMap] interface are used to *)
(* represent collections of nodes that can be accessed by name. Note *)
(* that [namedNodeMap] does not inherit from [nodeList]; [namedNodeMaps] *)
(* are not maintained in any particular order. Objects contained in an *)
(* object implementing [namedNodeMap] may also be accessed by an ordinal *)
(* index, but this is simply to allow convenient enumeration of the *)
(* contents of a [namedNodeMap], and does not imply that the DOM *)
(* specifies an order to these Nodes. [namedNodeMap] objects in the DOM *)
(* are live. *)
and namedNodeMap : TNamedNodeMap.t ->
(*** (new namedNodeMap) IS A RESERVED CONSTRUCTOR ; DO NOT USE IN USER CODE ***)
object
(*** DOM ATTRIBUTES AS GET/SET METHODS ***)
(* The number of nodes in this map. The range of valid child node *)
(* indices is [0] to [length-1] inclusive. *)
method get_length : int
(*** DOM METHODS ***)
(* Retrieves a node specified by name. *)
(* Parameters: *)
(* name: The [nodeName] of a node to retrieve. *)
(* Result: *)
(* A [node] (of any type) with the specified [nodeName], or [None] if *)
(* it does not identify any node in this map. *)
method getNamedItem : name:domString -> node option
(* Retrieves a node specified by local name and namespace URI. HTML-only *)
(* DOM implementations do not need to implement this method. *)
(* Parameters: *)
(* namespaceURI: The namespace URI of the node to retrieve. *)
(* localName: The local name of the node to retrieve. *)
(* Result: *)
(* A [node] (of any type) with the specified local name and namespace *)
(* URI, or [None] if they do not identify any node in this map. *)
method getNamedItemNS : namespaceURI:domString -> localName:domString -> node option
(* Returns the [index]th item in the map. If [index] is greater than or *)
(* equal to the number of nodes in this map, this returns [None]. *)
(* Parameters: *)
(* index: Index into this map. *)
(* Result: *)
(* The node at the [index]th position in the map, or [None] if that is *)
(* not a valid index. *)
method item : index:int -> node option
(* Removes a node specified by name. When this map contains the *)
(* attributes attached to an element, if the removed attribute is known *)
(* to have a default value, an attribute immediately appears containing *)
(* the default value as well as the corresponding namespace URI, local *)
(* name, and prefix when applicable. *)
(* Parameters: *)
(* name: The [nodeName] of the node to remove. *)
(* Result: *)
(* The node removed from this map if a node with such a name exists. *)
(* Exceptions Raised: *)
(* DOMException: *)
(* NOT_FOUND_ERR: Raised if there is no node named [name] in this *)
(* map. NO_MODIFICATION_ALLOWED_ERR: Raised if this map is readonly. *)
method removeNamedItem : name:domString -> node
(* Removes a node specified by local name and namespace URI. A removed *)
(* attribute may be known to have a default value when this map contains *)
(* the attributes attached to an element, as returned by the attributes *)
(* attribute of the [node] interface. If so, an attribute immediately *)
(* appears containing the default value as well as the corresponding *)
(* namespace URI, local name, and prefix when applicable. HTML-only DOM *)
(* implementations do not need to implement this method. *)
(* Parameters: *)
(* namespaceURI: The namespace URI of the node to remove. *)
(* localName: The local name of the node to remove. *)
(* Result: *)
(* The node removed from this map if a node with such a local name and *)
(* namespace URI exists. *)
(* Exceptions Raised: *)
(* DOMException: *)
(* NOT_FOUND_ERR: Raised if there is no node with the specified *)
(* [namespaceURI] and [localName] in this map. *)
(* NO_MODIFICATION_ALLOWED_ERR: Raised if this map is readonly. *)
method removeNamedItemNS : namespaceURI:domString -> localName:domString -> node
(* Adds a node using its [nodeName] attribute. If a node with that name *)
(* is already present in this map, it is replaced by the new one. As the *)
(* [nodeName] attribute is used to derive the name which the node must *)
(* be stored under, multiple nodes of certain types (those that have a *)
(* "special" string value) cannot be stored as the names would clash. *)
(* This is seen as preferable to allowing nodes to be aliased. *)
(* Parameters: *)
(* arg: A node to store in this map. The node will later be accessible *)
(* using the value of its [nodeName] attribute. *)
(* Result: *)
(* If the new [node] replaces an existing node the replaced [node] is *)
(* returned, otherwise [None] is returned. *)
(* Exceptions Raised: *)
(* DOMException: *)
(* WRONG_DOCUMENT_ERR: Raised if [arg] was created from a different *)
(* document than the one that created this map. *)
(* NO_MODIFICATION_ALLOWED_ERR: Raised if this map is readonly. *)
(* INUSE_ATTRIBUTE_ERR: Raised if [arg] is an [attr] that is already *)
(* an attribute of another [element] object. The DOM user must *)
(* explicitly clone [attr] nodes to re-use them in other elements. *)
method setNamedItem : arg:node -> node option
(* Adds a node using its [namespaceURI] and [localName]. If a node with *)
(* that namespace URI and that local name is already present in this *)
(* map, it is replaced by the new one. HTML-only DOM implementations do *)
(* not need to implement this method. *)
(* Parameters: *)
(* arg: A node to store in this map. The node will later be accessible *)
(* using the value of its [namespaceURI] and [localName] attributes. *)
(* Result: *)
(* If the new [node] replaces an existing node the replaced [node] is *)
(* returned, otherwise [None] is returned. *)
(* Exceptions Raised: *)
(* DOMException: *)
(* WRONG_DOCUMENT_ERR: Raised if [arg] was created from a different *)
(* document than the one that created this map. *)
(* NO_MODIFICATION_ALLOWED_ERR: Raised if this map is readonly. *)
(* INUSE_ATTRIBUTE_ERR: Raised if [arg] is an [attr] that is already *)
(* an attribute of another [element] object. The DOM user must *)
(* explicitly clone [attr] nodes to re-use them in other elements. *)
method setNamedItemNS : arg:node -> node option
(*** RESERVED METHODS, DO NOT USE IN USER CODE ***)
(*** required to implement bindings to other libraries ***)
method as_NamedNodeMap : TNamedNodeMap.t
end
(* The [characterData] interface extends Node with a set of attributes *)
(* and methods for accessing character data in the DOM. For clarity this *)
(* set is defined here rather than on each object that uses these *)
(* attributes and methods. No DOM objects correspond directly to *)
(* [characterData], though [text] and others do inherit the interface *)
(* from it. All [offsets] in this interface start from [0]. As explained *)
(* in the [domString] interface, text strings in the DOM are represented *)
(* in UTF-16, i.e. as a sequence of 16-bit units. In the following, the *)
(* term 16-bit units is used whenever necessary to indicate that *)
(* indexing on CharacterData is done in 16-bit units. *)
and characterData : TCharacterData.t ->
(*** (new characterData) IS A RESERVED CONSTRUCTOR ; DO NOT USE IN USER CODE ***)
object
inherit node
(*** DOM ATTRIBUTES AS GET/SET METHODS ***)
(* The character data of the node that implements this interface. The *)
(* DOM implementation may not put arbitrary limits on the amount of data *)
(* that may be stored in a [characterData] node. However, implementation *)
(* limits may mean that the entirety of a node's data may not fit into a *)
(* single [domString]. In such cases, the user may call [substringData] *)
(* to retrieve the data in appropriately sized pieces. *)
(* Exceptions Raised: *)
(* DOMException: *)
(* DOMSTRING_SIZE_ERR: Raised when it would return more characters *)
(* than fit in a [domString] variable on the implementation platform. *)
method get_data : domString
(* Exceptions Raised: *)
(* DOMException: *)
(* NO_MODIFICATION_ALLOWED_ERR: Raised when the node is readonly. *)
method set_data : value:domString -> unit
(* The number of 16-bit units that are available through [data] and the *)
(* [substringData] method below. This may have the value zero, i.e., *)
(* [characterData] nodes may be empty. *)
method get_length : int
(*** DOM METHODS ***)
(* Append the string to the end of the character data of the node. Upon *)
(* success, [data] provides access to the concatenation of [data] and *)
(* the [domString] specified. *)
(* Parameters: *)
(* arg: The [domString] to append. *)
(* Exceptions Raised: *)
(* DOMException: *)
(* NO_MODIFICATION_ALLOWED_ERR: Raised if this node is readonly. *)
method appendData : arg:domString -> unit
(* Remove a range of 16-bit units from the node. Upon success, [data] *)
(* and [length] reflect the change. *)
(* Parameters: *)
(* offset: The offset from which to start removing. *)
(* count: The number of 16-bit units to delete. If the sum of [offset] *)
(* and [count] exceeds [length] then all 16-bit units from [offset] *)
(* to the end of the data are deleted. *)
(* Exceptions Raised: *)
(* DOMException: *)
(* INDEX_SIZE_ERR: Raised if the specified [offset] is negative or *)
(* greater than the number of 16-bit units in [data], or if the *)
(* specified [count] is negative. NO_MODIFICATION_ALLOWED_ERR: Raised *)
(* if this node is readonly. *)
method deleteData : offset:int -> count:int -> unit
(* Insert a string at the specified 16-bit unit offset. *)
(* Parameters: *)
(* offset: The character offset at which to insert. *)
(* arg: The [domString] to insert. *)
(* Exceptions Raised: *)
(* DOMException: *)
(* INDEX_SIZE_ERR: Raised if the specified [offset] is negative or *)
(* greater than the number of 16-bit units in [data]. *)
(* NO_MODIFICATION_ALLOWED_ERR: Raised if this node is readonly. *)
method insertData : offset:int -> arg:domString -> unit
(* Replace the characters starting at the specified 16-bit unit offset *)
(* with the specified string. *)
(* Parameters: *)
(* offset: The offset from which to start replacing. *)
(* count: The number of 16-bit units to replace. If the sum of [offset] *)
(* and [count] exceeds [length], then all 16-bit units to the end of *)
(* the data are replaced; (i.e., the effect is the same as a [remove] *)
(* method call with the same range, followed by an [append] method *)
(* invocation). *)
(* arg: The [domString] with which the range must be replaced. *)
(* Exceptions Raised: *)
(* DOMException: *)
(* INDEX_SIZE_ERR: Raised if the specified [offset] is negative or *)
(* greater than the number of 16-bit units in [data], or if the *)
(* specified [count] is negative. NO_MODIFICATION_ALLOWED_ERR: Raised *)
(* if this node is readonly. *)
method replaceData : offset:int -> count:int -> arg:domString -> unit
(* Extracts a range of data from the node. *)
(* Parameters: *)
(* offset: Start offset of substring to extract. *)
(* count: The number of 16-bit units to extract. *)
(* Result: *)
(* The specified substring. If the sum of [offset] and [count] exceeds *)
(* the [length], then all 16-bit units to the end of the data are *)
(* returned. *)
(* Exceptions Raised: *)
(* DOMException: *)
(* INDEX_SIZE_ERR: Raised if the specified [offset] is negative or *)
(* greater than the number of 16-bit units in [data], or if the *)
(* specified [count] is negative. DOMSTRING_SIZE_ERR: Raised if the *)
(* specified range of text does not fit into a [domString]. *)
method substringData : offset:int -> count:int -> domString
(*** RESERVED METHODS, DO NOT USE IN USER CODE ***)
(*** required to implement bindings to other libraries ***)
method as_CharacterData : TCharacterData.t
end
(* The [attr] interface represents an attribute in an [element] object. *)
(* Typically the allowable values for the attribute are defined in a *)
(* document type definition. [attr] objects inherit the [node] *)
(* interface, but since they are not actually child nodes of the element *)
(* they describe, the DOM does not consider them part of the document *)
(* tree. Thus, the [node] attributes [parentNode], [previousSibling], *)
(* and [nextSibling] have a [None] value for [attr] objects. The DOM *)
(* takes the view that attributes are properties of elements rather than *)
(* having a separate identity from the elements they are associated *)
(* with; this should make it more efficient to implement such features *)
(* as default attributes associated with all elements of a given type. *)
(* Furthermore, [attr] nodes may not be immediate children of a *)
(* [documentFragment]. However, they can be associated with [element] *)
(* nodes contained within a [documentFragment]. In short, users and *)
(* implementors of the DOM need to be aware that [attr] nodes have some *)
(* things in common with other objects inheriting the [node] interface, *)
(* but they also are quite distinct. The attribute's effective value is *)
(* determined as follows: if this attribute has been explicitly assigned *)
(* any value, that value is the attribute's effective value; otherwise, *)
(* if there is a declaration for this attribute, and that declaration *)
(* includes a default value, then that default value is the attribute's *)
(* effective value; otherwise, the attribute does not exist on this *)
(* element in the structure model until it has been explicitly added. *)
(* Note that the [nodeValue] attribute on the [attr] instance can also *)
(* be used to retrieve the string version of the attribute's value(s). *)
(* In XML, where the value of an attribute can contain entity *)
(* references, the child nodes of the [attr] node provide a *)
(* representation in which entity references are not expanded. These *)
(* child nodes may be either [text] or [entityReference] nodes. Because *)
(* the DOM Core is not aware of attribute types, it treats all attribute *)
(* values as simple strings, even if the DTD or schema declares them as *)
(* having tokenized types. *)
and attr : TAttr.t ->
(*** (new attr) IS A RESERVED CONSTRUCTOR ; DO NOT USE IN USER CODE ***)
object
inherit node
(*** DOM ATTRIBUTES AS GET/SET METHODS ***)
(* Returns the name of this attribute. *)
method get_name : domString
(* The [element] node this attribute is attached to or [None] if this *)
(* attribute is not in use. *)
method get_ownerElement : element option
(* If this attribute was explicitly given a value in the original *)
(* document, this is [true]; otherwise, it is [false]. Note that the *)
(* implementation is in charge of this attribute, not the user. If the *)
(* user changes the value of the attribute (even if it ends up having *)
(* the same value as the default value) then the [specified] flag is *)
(* automatically flipped to [true]. To re-specify the attribute as the *)
(* default value from the DTD, the user must delete the attribute. The *)
(* implementation will then make a new attribute available with *)
(* [specified] set to [false] and the default value (if one exists). In *)
(* summary: If the attribute has an assigned value in the document then *)
(* [specified] is [true], and the value is the assigned value. If the *)
(* attribute has no assigned value in the document and has a default *)
(* value in the DTD, then [specified] is [false], and the value is the *)
(* default value in the DTD. If the attribute has no assigned value in *)
(* the document and has a value of #IMPLIED in the DTD, then the *)
(* attribute does not appear in the structure model of the document. If *)
(* the [ownerElement] attribute is [None] (i.e. because it was just *)
(* created or was set to [None] by the various removal and cloning *)
(* operations) [specified] is [true]. *)
method get_specified : bool
(* On retrieval, the value of the attribute is returned as a string. *)
(* Character and general entity references are replaced with their *)
(* values. See also the method [getAttribute] on the [element] *)
(* interface. On setting, this creates a [text] node with the unparsed *)
(* contents of the string. I.e. any characters that an XML processor *)
(* would recognize as markup are instead treated as literal text. See *)
(* also the method [setAttribute] on the [element] interface. *)
method get_value : domString
(* Exceptions Raised: *)
(* DOMException: *)
(* NO_MODIFICATION_ALLOWED_ERR: Raised when the node is readonly. *)
method set_value : value:domString -> unit
(*** RESERVED METHODS, DO NOT USE IN USER CODE ***)
(*** required to implement bindings to other libraries ***)
method as_Attr : TAttr.t
end
(* The [element] interface represents an element in an HTML or XML *)
(* document. Elements may have attributes associated with them; since *)
(* the [element] interface inherits from [node], the generic [node] *)
(* interface attribute [attributes] may be used to retrieve the set of *)
(* all attributes for an element. There are methods on the [element] *)
(* interface to retrieve either an [attr] object by name or an attribute *)
(* value by name. In XML, where an attribute value may contain entity *)
(* references, an [attr] object should be retrieved to examine the *)
(* possibly fairly complex sub-tree representing the attribute value. On *)
(* the other hand, in HTML, where all attributes have simple string *)
(* values, methods to directly access an attribute value can safely be *)
(* used as a convenience. *)
and element : TElement.t ->
(*** (new element) IS A RESERVED CONSTRUCTOR ; DO NOT USE IN USER CODE ***)
object
inherit node
(*** DOM ATTRIBUTES AS GET/SET METHODS ***)
(* The name of the element. For example, in: *)
(* ... , [tagName] has the value ["elementExample"]. *)
(* Note that this is case-preserving in XML, as are all of the *)
(* operations of the DOM. The HTML DOM returns the [tagName] of an HTML *)
(* element in the canonical uppercase form, regardless of the case in *)
(* the source HTML document. *)
method get_tagName : domString
(*** DOM METHODS ***)
(* Retrieves an attribute value by name. *)
(* Parameters: *)
(* name: The name of the attribute to retrieve. *)
(* Result: *)
(* The [attr] value as a string, or the empty string if that attribute *)
(* does not have a specified or default value. *)
method getAttribute : name:domString -> domString
(* Retrieves an attribute value by local name and namespace URI. *)
(* HTML-only DOM implementations do not need to implement this method. *)
(* Parameters: *)
(* namespaceURI: The namespace URI of the attribute to retrieve. *)
(* localName: The local name of the attribute to retrieve. *)
(* Result: *)
(* The [attr] value as a string, or the empty string if that attribute *)
(* does not have a specified or default value. *)
method getAttributeNS : namespaceURI:domString -> localName:domString -> domString
(* Retrieves an attribute node by name. To retrieve an attribute node by *)
(* qualified name and namespace URI, use the [getAttributeNodeNS] *)
(* method. *)
(* Parameters: *)
(* name: The name ([nodeName]) of the attribute to retrieve. *)
(* Result: *)
(* The [attr] node with the specified name ([nodeName]) or [None] if *)
(* there is no such attribute. *)
method getAttributeNode : name:domString -> attr option
(* Retrieves an [attr] node by local name and namespace URI. HTML-only *)
(* DOM implementations do not need to implement this method. *)
(* Parameters: *)
(* namespaceURI: The namespace URI of the attribute to retrieve. *)
(* localName: The local name of the attribute to retrieve. *)
(* Result: *)
(* The [attr] node with the specified attribute local name and *)
(* namespace URI or [None] if there is no such attribute. *)
method getAttributeNodeNS : namespaceURI:domString -> localName:domString -> attr option
(* Returns a [nodeList] of all descendant [elements] with a given tag *)
(* name, in the order in which they are encountered in a preorder *)
(* traversal of this [element] tree. *)
(* Parameters: *)
(* name: The name of the tag to match on. The special value "*" matches *)
(* all tags. *)
(* Result: *)
(* A list of matching [element] nodes. *)
method getElementsByTagName : name:domString -> nodeList
(* Returns a [nodeList] of all the descendant [elements] with a given *)
(* local name and namespace URI in the order in which they are *)
(* encountered in a preorder traversal of this [element] tree. HTML-only *)
(* DOM implementations do not need to implement this method. *)
(* Parameters: *)
(* namespaceURI: The namespace URI of the elements to match on. The *)
(* special value "*" matches all namespaces. *)
(* localName: The local name of the elements to match on. The special *)
(* value "*" matches all local names. *)
(* Result: *)
(* A new [nodeList] object containing all the matched [elements]. *)
method getElementsByTagNameNS : namespaceURI:domString -> localName:domString -> nodeList
(* Returns [true] when an attribute with a given name is specified on *)
(* this element or has a default value, [false] otherwise. *)
(* Parameters: *)
(* name: The name of the attribute to look for. *)
(* Result: *)
(* [true] if an attribute with the given name is specified on this *)
(* element or has a default value, [false] otherwise. *)
method hasAttribute : name:domString -> bool
(* Returns [true] when an attribute with a given local name and *)
(* namespace URI is specified on this element or has a default value, *)
(* [false] otherwise. HTML-only DOM implementations do not need to *)
(* implement this method. *)
(* Parameters: *)
(* namespaceURI: The namespace URI of the attribute to look for. *)
(* localName: The local name of the attribute to look for. *)
(* Result: *)
(* [true] if an attribute with the given local name and namespace URI *)
(* is specified or has a default value on this element, [false] *)
(* otherwise. *)
method hasAttributeNS : namespaceURI:domString -> localName:domString -> bool
(* Removes an attribute by name. If the removed attribute is known to *)
(* have a default value, an attribute immediately appears containing the *)
(* default value as well as the corresponding namespace URI, local name, *)
(* and prefix when applicable. To remove an attribute by local name and *)
(* namespace URI, use the [removeAttributeNS] method. *)
(* Parameters: *)
(* name: The name of the attribute to remove. *)
(* Exceptions Raised: *)
(* DOMException: *)
(* NO_MODIFICATION_ALLOWED_ERR: Raised if this node is readonly. *)
method removeAttribute : name:domString -> unit
(* Removes an attribute by local name and namespace URI. If the removed *)
(* attribute has a default value it is immediately replaced. The *)
(* replacing attribute has the same namespace URI and local name, as *)
(* well as the original prefix. HTML-only DOM implementations do not *)
(* need to implement this method. *)
(* Parameters: *)
(* namespaceURI: The namespace URI of the attribute to remove. *)
(* localName: The local name of the attribute to remove. *)
(* Exceptions Raised: *)
(* DOMException: *)
(* NO_MODIFICATION_ALLOWED_ERR: Raised if this node is readonly. *)
method removeAttributeNS : namespaceURI:domString -> localName:domString -> unit
(* Removes the specified attribute node. If the removed [attr] has a *)
(* default value it is immediately replaced. The replacing attribute has *)
(* the same namespace URI and local name, as well as the original *)
(* prefix, when applicable. *)
(* Parameters: *)
(* oldAttr: The [attr] node to remove from the attribute list. *)
(* Result: *)
(* The [attr] node that was removed. *)
(* Exceptions Raised: *)
(* DOMException: *)
(* NO_MODIFICATION_ALLOWED_ERR: Raised if this node is readonly. *)
(* NOT_FOUND_ERR: Raised if [oldAttr] is not an attribute of the *)
(* element. *)
method removeAttributeNode : oldAttr:attr -> attr
(* Adds a new attribute. If an attribute with that name is already *)
(* present in the element, its value is changed to be that of the value *)
(* parameter. This value is a simple string; it is not parsed as it is *)
(* being set. So any markup (such as syntax to be recognized as an *)
(* entity reference) is treated as literal text, and needs to be *)
(* appropriately escaped by the implementation when it is written out. *)
(* In order to assign an attribute value that contains entity *)
(* references, the user must create an [attr] node plus any [text] and *)
(* [entityReference] nodes, build the appropriate subtree, and use *)
(* [setAttributeNode] to assign it as the value of an attribute. To set *)
(* an attribute with a qualified name and namespace URI, use the *)
(* [setAttributeNS] method. *)
(* Parameters: *)
(* name: The name of the attribute to create or alter. *)
(* value: Value to set in string form. *)
(* Exceptions Raised: *)
(* DOMException: *)
(* INVALID_CHARACTER_ERR: Raised if the specified name contains an *)
(* illegal character. NO_MODIFICATION_ALLOWED_ERR: Raised if this *)
(* node is readonly. *)
method setAttribute : name:domString -> value:domString -> unit
(* Adds a new attribute. If an attribute with the same local name and *)
(* namespace URI is already present on the element, its prefix is *)
(* changed to be the prefix part of the [qualifiedName], and its value *)
(* is changed to be the [value] parameter. This value is a simple *)
(* string; it is not parsed as it is being set. So any markup (such as *)
(* syntax to be recognized as an entity reference) is treated as literal *)
(* text, and needs to be appropriately escaped by the implementation *)
(* when it is written out. In order to assign an attribute value that *)
(* contains entity references, the user must create an [attr] node plus *)
(* any [text] and [entityReference] nodes, build the appropriate *)
(* subtree, and use [setAttributeNodeNS] or [setAttributeNode] to assign *)
(* it as the value of an attribute. HTML-only DOM implementations do not *)
(* need to implement this method. *)
(* Parameters: *)
(* namespaceURI: The namespace URI of the attribute to create or alter. *)
(* qualifiedName: The qualified name of the attribute to create or *)
(* alter. *)
(* value: The value to set in string form. *)
(* Exceptions Raised: *)
(* DOMException: *)
(* INVALID_CHARACTER_ERR: Raised if the specified qualified name *)
(* contains an illegal character. NO_MODIFICATION_ALLOWED_ERR: Raised *)
(* if this node is readonly. NAMESPACE_ERR: Raised if the *)
(* [qualifiedName] is malformed, if the [qualifiedName] has a prefix *)
(* and the [namespaceURI] is [None], if the [qualifiedName] has a *)
(* prefix that is "xml" and the [namespaceURI] is different from *)
(* "xml-ns;", or if the [qualifiedName] is "xmlns" and the *)
(* [namespaceURI] is different from "xmlns-ns;". *)
method setAttributeNS : namespaceURI:domString option -> qualifiedName:domString -> value:domString -> unit
(* Adds a new attribute node. If an attribute with that name *)
(* ([nodeName]) is already present in the element, it is replaced by the *)
(* new one. To add a new attribute node with a qualified name and *)
(* namespace URI, use the [setAttributeNodeNS] method. *)
(* Parameters: *)
(* newAttr: The [attr] node to add to the attribute list. *)
(* Result: *)
(* If the [newAttr] attribute replaces an existing attribute, the *)
(* replaced [attr] node is returned, otherwise [None] is returned. *)
(* Exceptions Raised: *)
(* DOMException: *)
(* WRONG_DOCUMENT_ERR: Raised if [newAttr] was created from a *)
(* different document than the one that created the element. *)
(* NO_MODIFICATION_ALLOWED_ERR: Raised if this node is readonly. *)
(* INUSE_ATTRIBUTE_ERR: Raised if [newAttr] is already an attribute *)
(* of another [element] object. The DOM user must explicitly clone *)
(* [attr] nodes to re-use them in other elements. *)
method setAttributeNode : newAttr:attr -> attr
(* Adds a new attribute. If an attribute with that local name and that *)
(* namespace URI is already present in the element, it is replaced by *)
(* the new one. HTML-only DOM implementations do not need to implement *)
(* this method. *)
(* Parameters: *)
(* newAttr: The [attr] node to add to the attribute list. *)
(* Result: *)
(* If the [newAttr] attribute replaces an existing attribute with the *)
(* same local name and namespace URI, the replaced [attr] node is *)
(* returned, otherwise [None] is returned. *)
(* Exceptions Raised: *)
(* DOMException: *)
(* WRONG_DOCUMENT_ERR: Raised if [newAttr] was created from a *)
(* different document than the one that created the element. *)
(* NO_MODIFICATION_ALLOWED_ERR: Raised if this node is readonly. *)
(* INUSE_ATTRIBUTE_ERR: Raised if [newAttr] is already an attribute *)
(* of another [element] object. The DOM user must explicitly clone *)
(* [attr] nodes to re-use them in other elements. *)
method setAttributeNodeNS : newAttr:attr -> attr
(*** RESERVED METHODS, DO NOT USE IN USER CODE ***)
(*** required to implement bindings to other libraries ***)
method as_Element : TElement.t
end
(* The [text] interface inherits from [characterData] and represents the *)
(* textual content (termed character data in XML) of an [element] or *)
(* [attr]. If there is no markup inside an element's content, the text *)
(* is contained in a single object implementing the [text] interface *)
(* that is the only child of the element. If there is markup, it is *)
(* parsed into the information items (elements, comments, etc.) and *)
(* [text] nodes that form the list of children of the element. When a *)
(* document is first made available via the DOM, there is only one *)
(* [text] node for each block of text. Users may create adjacent [text] *)
(* nodes that represent the contents of a given element without any *)
(* intervening markup, but should be aware that there is no way to *)
(* represent the separations between these nodes in XML or HTML, so they *)
(* will not (in general) persist between DOM editing sessions. The *)
(* [normalize()] method on [node] merges any such adjacent [text] *)
(* objects into a single node for each block of text. *)
and text : TText.t ->
(*** (new text) IS A RESERVED CONSTRUCTOR ; DO NOT USE IN USER CODE ***)
object
inherit characterData
(*** DOM METHODS ***)
(* Breaks this node into two nodes at the specified [offset], keeping *)
(* both in the tree as siblings. After being split, this node will *)
(* contain all the content up to the [offset] point. A new node of the *)
(* same type, which contains all the content at and after the [offset] *)
(* point, is returned. If the original node had a parent node, the new *)
(* node is inserted as the next sibling of the original node. When the *)
(* [offset] is equal to the length of this node, the new node has no *)
(* data. *)
(* Parameters: *)
(* offset: The 16-bit unit offset at which to split, starting from [0]. *)
(* Result: *)
(* The new node, of the same type as this node. *)
(* Exceptions Raised: *)
(* DOMException: *)
(* INDEX_SIZE_ERR: Raised if the specified offset is negative or *)
(* greater than the number of 16-bit units in [data]. *)
(* NO_MODIFICATION_ALLOWED_ERR: Raised if this node is readonly. *)
method splitText : offset:int -> text
(*** RESERVED METHODS, DO NOT USE IN USER CODE ***)
(*** required to implement bindings to other libraries ***)
method as_Text : TText.t
end
(* This interface inherits from [characterData] and represents the *)
(* content of a comment, i.e., all the characters between the starting *)
(* '[]'. Note that this is the definition of a *)
(* comment in XML, and, in practice, HTML, although some HTML tools may *)
(* implement the full SGML comment structure. *)
and comment : TComment.t ->
(*** (new comment) IS A RESERVED CONSTRUCTOR ; DO NOT USE IN USER CODE ***)
object
inherit characterData
(*** RESERVED METHODS, DO NOT USE IN USER CODE ***)
(*** required to implement bindings to other libraries ***)
method as_Comment : TComment.t
end
(* CDATA sections are used to escape blocks of text containing *)
(* characters that would otherwise be regarded as markup. The only *)
(* delimiter that is recognized in a CDATA section is the "]]>" string *)
(* that ends the CDATA section. CDATA sections cannot be nested. Their *)
(* primary purpose is for including material such as XML fragments, *)
(* without needing to escape all the delimiters. The [domString] *)
(* attribute of the [text] node holds the text that is contained by the *)
(* CDATA section. Note that this may contain characters that need to be *)
(* escaped outside of CDATA sections and that, depending on the *)
(* character encoding ("charset") chosen for serialization, it may be *)
(* impossible to write out some characters as part of a CDATA section. *)
(* The [cdataSection] interface inherits from the [characterData] *)
(* interface through the [text] interface. Adjacent [cdataSection] nodes *)
(* are not merged by use of the [normalize] method of the [node] *)
(* interface. *)
and cdataSection : TCDATASection.t ->
(*** (new cdataSection) IS A RESERVED CONSTRUCTOR ; DO NOT USE IN USER CODE ***)
object
inherit text
(*** RESERVED METHODS, DO NOT USE IN USER CODE ***)
(*** required to implement bindings to other libraries ***)
method as_CDATASection : TCDATASection.t
end
(* Each [document] has a [doctype] attribute whose value is either *)
(* [None] or a [documentType] object. The [documentType] interface in *)
(* the DOM Core provides an interface to the list of entities that are *)
(* defined for the document, and little else because the effect of *)
(* namespaces and the various XML schema efforts on DTD representation *)
(* are not clearly understood as of this writing. The DOM Level 2 *)
(* doesn't support editing [documentType] nodes. *)
and documentType : TDocumentType.t ->
(*** (new documentType) IS A RESERVED CONSTRUCTOR ; DO NOT USE IN USER CODE ***)
object
inherit node
(*** DOM ATTRIBUTES AS GET/SET METHODS ***)
(* A [namedNodeMap] containing the general entities, both external and *)
(* internal, declared in the DTD. Parameter entities are not contained. *)
(* Duplicates are discarded. For example in: ]> the interface provides access *)
(* to [foo] and the first declaration of [bar] but not the second *)
(* declaration of [bar] or [baz]. Every node in this map also implements *)
(* the [entity] interface. The DOM Level 2 does not support editing *)
(* entities, therefore [entities] cannot be altered in any way. *)
method get_entities : namedNodeMap
(* The internal subset as a string. *)
method get_internalSubset : domString
(* The name of DTD; i.e., the name immediately following the [dOCTYPE] *)
(* keyword. *)
method get_name : domString
(* A [namedNodeMap] containing the notations declared in the DTD. *)
(* Duplicates are discarded. Every node in this map also implements the *)
(* [notation] interface. The DOM Level 2 does not support editing *)
(* notations, therefore [notations] cannot be altered in any way. *)
method get_notations : namedNodeMap
(* The public identifier of the external subset. *)
method get_publicId : domString
(* The system identifier of the external subset. *)
method get_systemId : domString
(*** RESERVED METHODS, DO NOT USE IN USER CODE ***)
(*** required to implement bindings to other libraries ***)
method as_DocumentType : TDocumentType.t
end
(* This interface represents a notation declared in the DTD. A notation *)
(* either declares, by name, the format of an unparsed entity (see *)
(* section 4.7 of the XML 1.0 specification ), or is used for formal *)
(* declaration of processing instruction targets (see section 2.6 of the *)
(* XML 1.0 specification ). The [nodeName] attribute inherited from *)
(* [node] is set to the declared name of the notation. The DOM Level 1 *)
(* does not support editing [notation] nodes; they are therefore *)
(* readonly. A [notation] node does not have any parent. *)
and notation : TNotation.t ->
(*** (new notation) IS A RESERVED CONSTRUCTOR ; DO NOT USE IN USER CODE ***)
object
inherit node
(*** DOM ATTRIBUTES AS GET/SET METHODS ***)
(* The public identifier of this notation. If the public identifier was *)
(* not specified, this is [None]. *)
method get_publicId : domString option
(* The system identifier of this notation. If the system identifier was *)
(* not specified, this is [None]. *)
method get_systemId : domString option
(*** RESERVED METHODS, DO NOT USE IN USER CODE ***)
(*** required to implement bindings to other libraries ***)
method as_Notation : TNotation.t
end
(* This interface represents an entity, either parsed or unparsed, in an *)
(* XML document. Note that this models the entity itself not the entity *)
(* declaration. [entity] declaration modeling has been left for a later *)
(* Level of the DOM specification. The [nodeName] attribute that is *)
(* inherited from [node] contains the name of the entity. An XML *)
(* processor may choose to completely expand entities before the *)
(* structure model is passed to the DOM; in this case there will be no *)
(* [entityReference] nodes in the document tree. XML does not mandate *)
(* that a non-validating XML processor read and process entity *)
(* declarations made in the external subset or declared in external *)
(* parameter entities. This means that parsed entities declared in the *)
(* external subset need not be expanded by some classes of applications, *)
(* and that the replacement value of the entity may not be available. *)
(* When the replacement value is available, the corresponding [entity] *)
(* node's child list represents the structure of that replacement text. *)
(* Otherwise, the child list is empty. The DOM Level 2 does not support *)
(* editing [entity] nodes; if a user wants to make changes to the *)
(* contents of an [entity], every related [entityReference] node has to *)
(* be replaced in the structure model by a clone of the [entity]'s *)
(* contents, and then the desired changes must be made to each of those *)
(* clones instead. [entity] nodes and all their descendants are *)
(* readonly. An [entity] node does not have any parent. *)
and entity : TEntity.t ->
(*** (new entity) IS A RESERVED CONSTRUCTOR ; DO NOT USE IN USER CODE ***)
object
inherit node
(*** DOM ATTRIBUTES AS GET/SET METHODS ***)
(* For unparsed entities, the name of the notation for the entity. For *)
(* parsed entities, this is [None]. *)
method get_notationName : domString option
(* The public identifier associated with the entity, if specified. If *)
(* the public identifier was not specified, this is [None]. *)
method get_publicId : domString option
(* The system identifier associated with the entity, if specified. If *)
(* the system identifier was not specified, this is [None]. *)
method get_systemId : domString option
(*** RESERVED METHODS, DO NOT USE IN USER CODE ***)
(*** required to implement bindings to other libraries ***)
method as_Entity : TEntity.t
end
(* [entityReference] objects may be inserted into the structure model *)
(* when an entity reference is in the source document, or when the user *)
(* wishes to insert an entity reference. Note that character references *)
(* and references to predefined entities are considered to be expanded *)
(* by the HTML or XML processor so that characters are represented by *)
(* their Unicode equivalent rather than by an entity reference. *)
(* Moreover, the XML processor may completely expand references to *)
(* entities while building the structure model, instead of providing *)
(* [entityReference] objects. If it does provide such objects, then for *)
(* a given [entityReference] node, it may be that there is no [entity] *)
(* node representing the referenced entity. If such an [entity] exists, *)
(* then the subtree of the [entityReference] node is in general a copy *)
(* of the [entity] node subtree. However, this may not be true when an *)
(* entity contains an unbound namespace prefix. In such a case, because *)
(* the namespace prefix resolution depends on where the entity reference *)
(* is, the descendants of the [entityReference] node may be bound to *)
(* different namespace URIs. As for [entity] nodes, [entityReference] *)
(* nodes and all their descendants are readonly. *)
and entityReference : TEntityReference.t ->
(*** (new entityReference) IS A RESERVED CONSTRUCTOR ; DO NOT USE IN USER CODE ***)
object
inherit node
(*** RESERVED METHODS, DO NOT USE IN USER CODE ***)
(*** required to implement bindings to other libraries ***)
method as_EntityReference : TEntityReference.t
end
(* The [processingInstruction] interface represents a "processing *)
(* instruction", used in XML as a way to keep processor-specific *)
(* information in the text of the document. *)
and processingInstruction : TProcessingInstruction.t ->
(*** (new processingInstruction) IS A RESERVED CONSTRUCTOR ; DO NOT USE IN USER CODE ***)
object
inherit node
(*** DOM ATTRIBUTES AS GET/SET METHODS ***)
(* The content of this processing instruction. This is from the first *)
(* non white space character after the target to the character *)
(* immediately preceding the [?>]. *)
method get_data : domString
(* Exceptions Raised: *)
(* DOMException: *)
(* NO_MODIFICATION_ALLOWED_ERR: Raised when the node is readonly. *)
method set_data : value:domString -> unit
(* The target of this processing instruction. XML defines this as being *)
(* the first token following the markup that begins the processing *)
(* instruction. *)
method get_target : domString
(*** RESERVED METHODS, DO NOT USE IN USER CODE ***)
(*** required to implement bindings to other libraries ***)
method as_ProcessingInstruction : TProcessingInstruction.t
end
(* [documentFragment] is a "lightweight" or "minimal" [document] object. *)
(* It is very common to want to be able to extract a portion of a *)
(* document's tree or to create a new fragment of a document. Imagine *)
(* implementing a user command like cut or rearranging a document by *)
(* moving fragments around. It is desirable to have an object which can *)
(* hold such fragments and it is quite natural to use a Node for this *)
(* purpose. While it is true that a [document] object could fulfill this *)
(* role, a [document] object can potentially be a heavyweight object, *)
(* depending on the underlying implementation. What is really needed for *)
(* this is a very lightweight object. [documentFragment] is such an *)
(* object. Furthermore, various operations -- such as inserting nodes as *)
(* children of another [node] -- may take [documentFragment] objects as *)
(* arguments; this results in all the child nodes of the *)
(* [documentFragment] being moved to the child list of this node. The *)
(* children of a [documentFragment] node are zero or more nodes *)
(* representing the tops of any sub-trees defining the structure of the *)
(* document. [documentFragment] nodes do not need to be well-formed XML *)
(* documents (although they do need to follow the rules imposed upon *)
(* well-formed XML parsed entities, which can have multiple top nodes). *)
(* For example, a [documentFragment] might have only one child and that *)
(* child node could be a [text] node. Such a structure model represents *)
(* neither an HTML document nor a well-formed XML document. When a *)
(* [documentFragment] is inserted into a [document] (or indeed any other *)
(* [node] that may take children) the children of the [documentFragment] *)
(* and not the [documentFragment] itself are inserted into the [node]. *)
(* This makes the [documentFragment] very useful when the user wishes to *)
(* create nodes that are siblings; the [documentFragment] acts as the *)
(* parent of these nodes so that the user can use the standard methods *)
(* from the [node] interface, such as [insertBefore] and [appendChild]. *)
and documentFragment : TDocumentFragment.t ->
(*** (new documentFragment) IS A RESERVED CONSTRUCTOR ; DO NOT USE IN USER CODE ***)
object
inherit node
(*** RESERVED METHODS, DO NOT USE IN USER CODE ***)
(*** required to implement bindings to other libraries ***)
method as_DocumentFragment : TDocumentFragment.t
end
(* The [document] interface represents the entire HTML or XML document. *)
(* Conceptually, it is the root of the document tree, and provides the *)
(* primary access to the document's data. Since elements, text nodes, *)
(* comments, processing instructions, etc. cannot exist outside the *)
(* context of a [document], the [document] interface also contains the *)
(* factory methods needed to create these objects. The [node] objects *)
(* created have a [ownerDocument] attribute which associates them with *)
(* the [document] within whose context they were created. *)
and document : TDocument.t ->
(*** (new document) IS A RESERVED CONSTRUCTOR ; DO NOT USE IN USER CODE ***)
object
inherit node
(*** DOM ATTRIBUTES AS GET/SET METHODS ***)
(* The Document Type Declaration (see [documentType]) associated with *)
(* this document. For HTML documents as well as XML documents without a *)
(* document type declaration this returns [None]. The DOM Level 2 does *)
(* not support editing the Document Type Declaration. [docType] cannot *)
(* be altered in any way, including through the use of methods inherited *)
(* from the [node] interface, such as [insertNode] or [removeNode]. *)
method get_doctype : documentType option
(* This is a convenience attribute that allows direct access to the *)
(* child node that is the root element of the document. For HTML *)
(* documents, this is the element with the tagName "HTML". *)
method get_documentElement : element
(* The [domImplementation] object that handles this document. A DOM *)
(* application may use objects from multiple implementations. *)
method get_implementation : domImplementation
(*** DOM METHODS ***)
(* Creates an [attr] of the given name. Note that the [attr] instance *)
(* can then be set on an [element] using the [setAttributeNode] method. *)
(* To create an attribute with a qualified name and namespace URI, use *)
(* the [createAttributeNS] method. *)
(* Parameters: *)
(* name: The name of the attribute. *)
(* Result: *)
(* A new [attr] object with the [nodeName] attribute set to [name], and *)
(* [localName], [prefix], and [namespaceURI] set to [None]. The value *)
(* of the attribute is the empty string. *)
(* Exceptions Raised: *)
(* DOMException: *)
(* INVALID_CHARACTER_ERR: Raised if the specified name contains an *)
(* illegal character. *)
method createAttribute : name:domString -> attr
(* Creates an attribute of the given qualified name and namespace URI. *)
(* HTML-only DOM implementations do not need to implement this method. *)
(* Parameters: *)
(* namespaceURI: The namespace URI of the attribute to create. *)
(* qualifiedName: The qualified name of the attribute to instantiate. *)
(* Result: *)
(* A new [attr] object with the following attributes: *)
(* Exceptions Raised: *)
(* DOMException: *)
(* INVALID_CHARACTER_ERR: Raised if the specified qualified name *)
(* contains an illegal character. NAMESPACE_ERR: Raised if the *)
(* [qualifiedName] is malformed, if the [qualifiedName] has a prefix *)
(* and the [namespaceURI] is [None], if the [qualifiedName] has a *)
(* prefix that is "xml" and the [namespaceURI] is different from *)
(* "xml-ns;", or if the [qualifiedName] is "xmlns" and the *)
(* [namespaceURI] is different from "xmlns-ns;". *)
method createAttributeNS : namespaceURI:domString option -> qualifiedName:domString -> attr
(* Creates a [cdataSection] node whose value is the specified string. *)
(* Parameters: *)
(* data: The data for the [cdataSection] contents. *)
(* Result: *)
(* The new [cdataSection] object. *)
(* Exceptions Raised: *)
(* DOMException: *)
(* NOT_SUPPORTED_ERR: Raised if this document is an HTML document. *)
method createCDATASection : data:domString -> cdataSection
(* Creates a [comment] node given the specified string. *)
(* Parameters: *)
(* data: The data for the node. *)
(* Result: *)
(* The new [comment] object. *)
method createComment : data:domString -> comment
(* Creates an empty [documentFragment] object. *)
(* Result: *)
(* A new [documentFragment]. *)
method createDocumentFragment : documentFragment
(* Creates an element of the type specified. Note that the instance *)
(* returned implements the [element] interface, so attributes can be *)
(* specified directly on the returned object. In addition, if there are *)
(* known attributes with default values, [attr] nodes representing them *)
(* are automatically created and attached to the element. To create an *)
(* element with a qualified name and namespace URI, use the *)
(* [createElementNS] method. *)
(* Parameters: *)
(* tagName: The name of the element type to instantiate. For XML, this *)
(* is case-sensitive. For HTML, the [tagName] parameter may be *)
(* provided in any case, but it must be mapped to the canonical *)
(* uppercase form by the DOM implementation. *)
(* Result: *)
(* A new [element] object with the [nodeName] attribute set to *)
(* [tagName], and [localName], [prefix], and [namespaceURI] set to *)
(* [None]. *)
(* Exceptions Raised: *)
(* DOMException: *)
(* INVALID_CHARACTER_ERR: Raised if the specified name contains an *)
(* illegal character. *)
method createElement : tagName:domString -> element
(* Creates an element of the given qualified name and namespace URI. *)
(* HTML-only DOM implementations do not need to implement this method. *)
(* Parameters: *)
(* namespaceURI: The namespace URI of the element to create. *)
(* qualifiedName: The qualified name of the element type to *)
(* instantiate. *)
(* Result: *)
(* A new [element] object with the following attributes: *)
(* Exceptions Raised: *)
(* DOMException: *)
(* INVALID_CHARACTER_ERR: Raised if the specified qualified name *)
(* contains an illegal character. NAMESPACE_ERR: Raised if the *)
(* [qualifiedName] is malformed, if the [qualifiedName] has a prefix *)
(* and the [namespaceURI] is [None], or if the [qualifiedName] has a *)
(* prefix that is "xml" and the [namespaceURI] is different from *)
(* "xml-ns;" . *)
method createElementNS : namespaceURI:domString option -> qualifiedName:domString -> element
(* Creates an [entityReference] object. In addition, if the referenced *)
(* entity is known, the child list of the [entityReference] node is made *)
(* the same as that of the corresponding [entity] node. *)
(* Parameters: *)
(* name: The name of the entity to reference. *)
(* Result: *)
(* The new [entityReference] object. *)
(* Exceptions Raised: *)
(* DOMException: *)
(* INVALID_CHARACTER_ERR: Raised if the specified name contains an *)
(* illegal character. NOT_SUPPORTED_ERR: Raised if this document is *)
(* an HTML document. *)
method createEntityReference : name:domString -> entityReference
(* Creates a [processingInstruction] node given the specified name and *)
(* data strings. *)
(* Parameters: *)
(* target: The target part of the processing instruction. *)
(* data: The data for the node. *)
(* Result: *)
(* The new [processingInstruction] object. *)
(* Exceptions Raised: *)
(* DOMException: *)
(* INVALID_CHARACTER_ERR: Raised if the specified target contains an *)
(* illegal character. NOT_SUPPORTED_ERR: Raised if this document is *)
(* an HTML document. *)
method createProcessingInstruction : target:domString -> data:domString -> processingInstruction
(* Creates a [text] node given the specified string. *)
(* Parameters: *)
(* data: The data for the node. *)
(* Result: *)
(* The new [text] object. *)
method createTextNode : data:domString -> text
(* Returns the [element] whose [iD] is given by [elementId]. If no such *)
(* element exists, returns [None]. Behavior is not defined if more than *)
(* one element has this [iD]. The DOM implementation must have *)
(* information that says which attributes are of type ID. Attributes *)
(* with the name "ID" are not of type ID unless so defined. *)
(* Implementations that do not know whether attributes are of type ID or *)
(* not are expected to return [None]. *)
(* Parameters: *)
(* elementId: The unique [id] value for an element. *)
(* Result: *)
(* The matching element. *)
method getElementById : elementId:domString -> element option
(* Returns a [nodeList] of all the [elements] with a given tag name in *)
(* the order in which they are encountered in a preorder traversal of *)
(* the [document] tree. *)
(* Parameters: *)
(* tagname: The name of the tag to match on. The special value "*" *)
(* matches all tags. *)
(* Result: *)
(* A new [nodeList] object containing all the matched [elements]. *)
method getElementsByTagName : tagname:domString -> nodeList
(* Returns a [nodeList] of all the [elements] with a given local name *)
(* and namespace URI in the order in which they are encountered in a *)
(* preorder traversal of the [document] tree. *)
(* Parameters: *)
(* namespaceURI: The namespace URI of the elements to match on. The *)
(* special value "*" matches all namespaces. *)
(* localName: The local name of the elements to match on. The special *)
(* value "*" matches all local names. *)
(* Result: *)
(* A new [nodeList] object containing all the matched [elements]. *)
method getElementsByTagNameNS : namespaceURI:domString -> localName:domString -> nodeList
(* Imports a node from another document to this document. The returned *)
(* node has no parent; ([parentNode] is [None]). The source node is not *)
(* altered or removed from the original document; this method creates a *)
(* new copy of the source node. For all nodes, importing a node creates *)
(* a node object owned by the importing document, with attribute values *)
(* identical to the source node's [nodeName] and [nodeType], plus the *)
(* attributes related to namespaces ([prefix], [localName], and *)
(* [namespaceURI]). As in the [cloneNode] operation on a [node], the *)
(* source node is not altered. Additional information is copied as *)
(* appropriate to the [nodeType], attempting to mirror the behavior *)
(* expected if a fragment of XML or HTML source was copied from one *)
(* document to another, recognizing that the two documents may have *)
(* different DTDs in the XML case. The following list describes the *)
(* specifics for each type of node. ATTRIBUTE_NODE The [ownerElement] *)
(* attribute is set to [None] and the [specified] flag is set to [true] *)
(* on the generated [attr]. The descendants of the source [attr] are *)
(* recursively imported and the resulting nodes reassembled to form the *)
(* corresponding subtree. Note that the [deep] parameter has no effect *)
(* on [attr] nodes; they always carry their children with them when *)
(* imported. DOCUMENT_FRAGMENT_NODE If the [deep] option was set to *)
(* [true], the descendants of the source element are recursively *)
(* imported and the resulting nodes reassembled to form the *)
(* corresponding subtree. Otherwise, this simply generates an empty *)
(* [documentFragment]. DOCUMENT_NODE [document] nodes cannot be *)
(* imported. DOCUMENT_TYPE_NODE [documentType] nodes cannot be imported. *)
(* ELEMENT_NODE Specified attribute nodes of the source element are *)
(* imported, and the generated [attr] nodes are attached to the *)
(* generated [element]. Default attributes are not copied, though if the *)
(* document being imported into defines default attributes for this *)
(* element name, those are assigned. If the [importNode] [deep] *)
(* parameter was set to [true], the descendants of the source element *)
(* are recursively imported and the resulting nodes reassembled to form *)
(* the corresponding subtree. ENTITY_NODE [entity] nodes can be *)
(* imported, however in the current release of the DOM the *)
(* [documentType] is readonly. Ability to add these imported nodes to a *)
(* [documentType] will be considered for addition to a future release of *)
(* the DOM. On import, the [publicId], [systemId], and [notationName] *)
(* attributes are copied. If a [deep] import is requested, the *)
(* descendants of the the source [entity] are recursively imported and *)
(* the resulting nodes reassembled to form the corresponding subtree. *)
(* ENTITY_REFERENCE_NODE Only the [entityReference] itself is copied, *)
(* even if a [deep] import is requested, since the source and *)
(* destination documents might have defined the entity differently. If *)
(* the document being imported into provides a definition for this *)
(* entity name, its value is assigned. NOTATION_NODE [notation] nodes *)
(* can be imported, however in the current release of the DOM the *)
(* [documentType] is readonly. Ability to add these imported nodes to a *)
(* [documentType] will be considered for addition to a future release of *)
(* the DOM. On import, the [publicId] and [systemId] attributes are *)
(* copied. Note that the [deep] parameter has no effect on [notation] *)
(* nodes since they never have any children. PROCESSING_INSTRUCTION_NODE *)
(* The imported node copies its [target] and [data] values from those of *)
(* the source node. TEXT_NODE, CDATA_SECTION_NODE, COMMENT_NODE These *)
(* three types of nodes inheriting from [characterData] copy their *)
(* [data] and [length] attributes from those of the source node. *)
(* Parameters: *)
(* importedNode: The node to import. *)
(* deep: If [true], recursively import the subtree under the specified *)
(* node; if [false], import only the node itself, as explained above. *)
(* This has no effect on [attr], [entityReference], and [notation] *)
(* nodes. *)
(* Result: *)
(* The imported node that belongs to this [document]. *)
(* Exceptions Raised: *)
(* DOMException: *)
(* NOT_SUPPORTED_ERR: Raised if the type of node being imported is *)
(* not supported. *)
method importNode : importedNode:node -> deep:bool -> node
(*** RESERVED METHODS, DO NOT USE IN USER CODE ***)
(*** required to implement bindings to other libraries ***)
method as_Document : TDocument.t
end
;;
(********** Core Module: hand-written pseudo-constructors **********)
val domString : string -> domString;;
val domImplementation : unit -> domImplementation;;
(********** Events Module: hand-written pseudo-constructors **********)
val eventListener : callback:(event -> unit) -> eventListener;;
(********** Events Module: generated dynamic down-casts **********)
(* Dynamic cast: if the argument of the constructor is not an instance *)
(* of the [mutationEvent] class, a GdomeInit.DOMCastException is raised. *)
class mutationEvent_of_event :
< as_Event : [> `Event] GdomeT.t; .. > -> mutationEvent
;;
(********** Core Module: generated dynamic down-casts **********)
(* Dynamic cast: if the argument of the constructor is not an instance *)
(* of the [characterData] class, a GdomeInit.DOMCastException is raised. *)
class characterData_of_node :
< as_Node : [> `Node] GdomeT.t; .. > -> characterData
;;
(* Dynamic cast: if the argument of the constructor is not an instance *)
(* of the [attr] class, a GdomeInit.DOMCastException is raised. *)
class attr_of_node :
< as_Node : [> `Node] GdomeT.t; .. > -> attr
;;
(* Dynamic cast: if the argument of the constructor is not an instance *)
(* of the [element] class, a GdomeInit.DOMCastException is raised. *)
class element_of_node :
< as_Node : [> `Node] GdomeT.t; .. > -> element
;;
(* Dynamic cast: if the argument of the constructor is not an instance *)
(* of the [text] class, a GdomeInit.DOMCastException is raised. *)
class text_of_node :
< as_Node : [> `Node] GdomeT.t; .. > -> text
;;
(* Dynamic cast: if the argument of the constructor is not an instance *)
(* of the [comment] class, a GdomeInit.DOMCastException is raised. *)
class comment_of_node :
< as_Node : [> `Node] GdomeT.t; .. > -> comment
;;
(* Dynamic cast: if the argument of the constructor is not an instance *)
(* of the [cdataSection] class, a GdomeInit.DOMCastException is raised. *)
class cdataSection_of_node :
< as_Node : [> `Node] GdomeT.t; .. > -> cdataSection
;;
(* Dynamic cast: if the argument of the constructor is not an instance *)
(* of the [documentType] class, a GdomeInit.DOMCastException is raised. *)
class documentType_of_node :
< as_Node : [> `Node] GdomeT.t; .. > -> documentType
;;
(* Dynamic cast: if the argument of the constructor is not an instance *)
(* of the [notation] class, a GdomeInit.DOMCastException is raised. *)
class notation_of_node :
< as_Node : [> `Node] GdomeT.t; .. > -> notation
;;
(* Dynamic cast: if the argument of the constructor is not an instance *)
(* of the [entity] class, a GdomeInit.DOMCastException is raised. *)
class entity_of_node :
< as_Node : [> `Node] GdomeT.t; .. > -> entity
;;
(* Dynamic cast: if the argument of the constructor is not an instance *)
(* of the [entityReference] class, a GdomeInit.DOMCastException is *)
(* raised. *)
class entityReference_of_node :
< as_Node : [> `Node] GdomeT.t; .. > -> entityReference
;;
(* Dynamic cast: if the argument of the constructor is not an instance *)
(* of the [processingInstruction] class, a GdomeInit.DOMCastException is *)
(* raised. *)
class processingInstruction_of_node :
< as_Node : [> `Node] GdomeT.t; .. > -> processingInstruction
;;
(* Dynamic cast: if the argument of the constructor is not an instance *)
(* of the [documentFragment] class, a GdomeInit.DOMCastException is *)
(* raised. *)
class documentFragment_of_node :
< as_Node : [> `Node] GdomeT.t; .. > -> documentFragment
;;
(* Dynamic cast: if the argument of the constructor is not an instance *)
(* of the [document] class, a GdomeInit.DOMCastException is raised. *)
class document_of_node :
< as_Node : [> `Node] GdomeT.t; .. > -> document
;;
gmetadom-0.2.6/src/gdome_caml/xsl/ 0000777 0001750 0001750 00000000000 10704633447 014015 5 0000000 0000000 gmetadom-0.2.6/src/gdome_caml/xsl/xml2omli.xsl 0000755 0001750 0001750 00000016060 07730623122 016224 0000000 0000000
and : T.t ->
(*** (new ) IS A RESERVED CONSTRUCTOR ; DO NOT USE IN USER CODE ***)
object
inherit eventTarget
inherit
(*** DOM ATTRIBUTES AS GET/SET METHODS ***)
(*** DOM METHODS ***)
(*** Checks whether the argument is physically the same node as this node. ***)
method isSameNode : node -> bool
method equals : node -> bool
(*** RESERVED METHODS, DO NOT USE IN USER CODE ***)
(*** required to implement bindings to other libraries ***)
method as_ : T.t
end method get_ : GdomeNodeTypeT.t method set_ : value: -> unit
method : : -> typ
gmetadom-0.2.6/src/gdome_caml/xsl/xml2ann.xsl 0000644 0001750 0001750 00000004505 07420712672 016043 0000000 0000000
nonono
gmetadom-0.2.6/src/gdome_caml/xsl/xml2mldoc.xsl 0000644 0001750 0001750 00000017537 07450616351 016376 0000000 0000000
(* *)
(* *)
[None]:
gmetadom-0.2.6/src/gdome_caml/xsl/xml2omlcasts.xsl 0000755 0001750 0001750 00000006021 07430231170 017100 0000000 0000000
class _of_ obj =
(I.of_ obj#as_)
;;
gmetadom-0.2.6/src/gdome_caml/xsl/xslutils.xsl 0000644 0001750 0001750 00000012035 07426561164 016354 0000000 0000000
GdomeBooleanunsigned shortunsigned longGdomeDOMTimeStampGdome*didfdocnnlnnmcdaeltccdsdtnotenterpievntmevntevntlncdatadomboolintintunitTDOMTimeStamp.t option
gmetadom-0.2.6/src/gdome_caml/xsl/xml2oml.xsl 0000644 0001750 0001750 00000021415 10135743211 016043 0000000 0000000
and (obj : T.t) =
object
inherit (eventTarget (obj :> TEventTarget.t))
inherit ( (obj :> T.t))
method as_ = obj
method isSameNode other = INode.isSameNode ~this:obj ((other : node)#as_Node)
method equals other = INode.isSameNode ~this:obj ((other : node)#as_Node)
end method get_ = I.get_ ~this:obj method set_ ~value = I.set_ ~this:objlet obj = in match obj with None -> None | Some obj -> Some (new obj) method = I. ~this:obj ~ ~:(match with None -> None | Some -> Some ( : )#as_)typ
gmetadom-0.2.6/src/gdome_caml/xsl/xml2tmli.xsl 0000755 0001750 0001750 00000006324 07425103571 016235 0000000 0000000
(* This file is part of GMetaDOM
* a generic bind package for the Document Object Model API.
* Copyright (C) 2001-2002 Luca Padovani <luca.padovani@cs.unibo.it>
* 2002 Claudio Sacerdoti Coen <sacerdot@cs.unibo.it>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
* For more information, please visit the project home page
* http://gmetadom.sourceforge.net
* or send an email to <luca.padovani@cs.unibo.it>
*
* DO NOT EDIT: this file has been generated automatically by GMetaDOM
*)
type t = [] GdomeT.t
`EventTarget | | `
gmetadom-0.2.6/src/gdome_caml/xsl/Makefile.am 0000644 0001750 0001750 00000000303 07430477442 015764 0000000 0000000
EXTRA_DIST = \
xml2ann.xsl \
xml2c.xsl \
xml2html.xsl \
xml2mldoc.xsl \
xml2mli.xsl \
xml2oml.xsl \
xml2omlcasts.xsl \
xml2omli.xsl \
xml2omlicasts.xsl \
xml2tmli.xsl \
xslutils.xsl
gmetadom-0.2.6/src/gdome_caml/xsl/xml2html.xsl 0000644 0001750 0001750 00000022504 07423677350 016240 0000000 0000000
These methods can be used to cast an object to a given type.
If the downcasting would result into an unsafe operation, a DOMCastException exception is raised.
Attributes
Methods
This file has been generated automatically
on
as part of
GMetaDOM.
For more information see the home page of the project, or contact
the main author: luca.padovani@cs.unibo.it.
Note:
gmetadom-0.2.6/src/gdome_caml/xsl/xml2c.xsl 0000644 0001750 0001750 00000050552 07740632334 015515 0000000 0000000
/* This file is part of GMetaDOM
* a generic bind package for the Document Object Model API.
* Copyright (C) 2001-2002 Luca Padovani <luca.padovani@cs.unibo.it>
* 2002 Claudio Sacerdoti Coen <sacerdot@cs.unibo.it>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
* For more information, please visit the project home page
* http://gmetadom.sourceforge.net
* or send an email to <luca.padovani@cs.unibo.it>
*
* DO NOT EDIT: this file has been generated automatically by GMetaDOM
*/
#include <assert.h>
#include <gdome.h>
#include <gdome-events.h>
#include <caml/memory.h>
#include <caml/custom.h>
#include "mlgdomevalue.h"
static void
ml_gdome__finalize(value v)
{
GdomeException exc_ = 0;
Gdome* obj_ = _val(v);
g_assert(obj_ != NULL);
gdome__unref(obj_, &exc_);
assert(exc_ == 0);
}
static int
ml_gdome__compare(value v1, value v2)
{
CAMLparam2(v1,v2);
Gdome* obj1_ = _val(v1);
Gdome* obj2_ = _val(v2);
CAMLreturn((int) (obj1_ - obj2_));
}
Gdome*
_val(value v)
{
Gdome* res_ = *((Gdome**) Data_custom_val(v));
g_assert(res_ != NULL);
return res_;
}
value
Val_(Gdome* obj)
{
static struct custom_operations ops = {
"http://gmetadom.sourceforge.net/gdome_caml//",
ml_gdome__finalize,
ml_gdome__compare,
custom_hash_default,
custom_serialize_default,
custom_deserialize_default
};
value v = alloc_custom(&ops, sizeof(Gdome*), 0, 1);
g_assert(obj != NULL);
*((Gdome**) Data_custom_val(v)) = obj;
return v;
}
value
ml_gdome__isSameNode(value self, value p_other)
{
CAMLparam2(self, p_other);
Gdome* obj1_ = _val(self);
Gdome* obj2_ = _val(p_other);
CAMLreturn(Val_bool(obj1_ == obj2_));
}
value
ml_gdome__of_(value obj)
{
CAMLparam1(obj);
GdomeException exc_;
Gdome* obj_;
obj_ = gdome_cast_((GdomeNode*) _val(obj));
obj_ = gdome_cast_((GdomeEvent*) _val(obj));
#error
if (obj_ == 0) throw_cast_exception("");
gdome__ref(obj_, &exc_);
if (exc_ != 0) throw_exception(exc_, " casting from ");
CAMLreturn(Val_(obj_));
}
value
ml_gdome__get_(value self)
{
CAMLparam1(self);
GdomeException exc_;
res_;
value res__;
res_ = gdome__(_val(self), &exc_);
if (exc_ != 0) throw_exception(exc_, ".get_");
}
value
ml_gdome__set_(value self, value p_v)
{
CAMLparam2(self, p_v);
GdomeException exc_;
gdome__set_(_val(self), &exc_);
if (exc_ != 0) throw_exception(exc_, ".set_");
CAMLreturn(Val_unit);
}
value
ml_gdome__(value self)
{
GdomeException exc_;
res_;
value res__;
res_ = gdome__(_val(self), &exc_);
if (exc_ != 0) throw_exception(exc_, ".");
}
value
ml_gdome___bytecode(value *argv, int argn)
{
g_assert(argv != NULL);
return ml_gdome__(argv[0]);
}
CAMLparam1(self);CAMLparam2(self, p_);CAMLparam3(self, p_, p_);CAMLparam4(self, p_, p_, p_);CAMLparam5(self, p_, p_, p_, p_);
CAMLxparam4(p_, p_, p_, p_);
#error "this number of parameters is not currently supported"
, value p_, argv[]
GdomeDOMString* p__ = ptr_val_option(p_, DOMString_val);
GdomeDOMString* p__ = DOMString_val(p_);Bool_val(p_), Int_val(p_), Int_val(p_), Long_val(p_), p__, ptr_val_option(p_,_val), _val(p_), boolunsigned shortunsigned longunsigned longDOMTimeStampGdome*DOCUMENT_FRAGMENTDOCUMENTATTRIBUTEELEMENTTEXTCOMMENTCDATA_SECTIONDOCUMENT_TYPENOTATIONENTITYENTITY_REFERENCEPROCESSING_INSTRUCTIONtypeCAMLreturn(Val_unit);CAMLreturn(Val_bool(res_));CAMLreturn(Val_int(res_));CAMLreturn(Val_int(res_));CAMLreturn(Val_long(res_));CAMLreturn(Val_option_ptr(res_,Val_));g_assert(res_ != NULL);
CAMLreturn(Val_(res_));,
gmetadom-0.2.6/src/gdome_caml/xsl/xml2mli.xsl 0000644 0001750 0001750 00000024420 07613773717 016061 0000000 0000000
(* This file is part of GMetaDOM
* a generic bind package for the Document Object Model API.
* Copyright (C) 2001-2002 Luca Padovani <luca.padovani@cs.unibo.it>
* 2002 Claudio Sacerdoti Coen <sacerdot@cs.unibo.it>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
* For more information, please visit the project home page
* http://gmetadom.sourceforge.net
* or send an email to <luca.padovani@cs.unibo.it>
*
* DO NOT EDIT: this file has been generated automatically by GMetaDOM
*)
external isSameNode : this:[> `] GdomeT.t -> [> `Node] GdomeT.t -> bool = "ml_gdome__isSameNode"
external of_ : [> `] GdomeT.t -> T.t = "ml_gdome__of_"
external get_ : this:[> `] GdomeT.t -> GdomeNodeTypeT.t = "ml_gdome__get_"
external set_ : this:[> `] GdomeT.t -> value: -> unit = "ml_gdome__set_"
external : this:[> `] GdomeT.t -> = "ml_gdome__" "ml_gdome__" -> :typunitboolintintTDOMString.tTEventListener.tTDOMImplementation.tT.t[> `] GdomeT.t optionDOCUMENT_FRAGMENTDOCUMENTATTRIBUTEELEMENTTEXTCOMMENTCDATA_SECTIONDOCUMENT_TYPENOTATIONENTITYENTITY_REFERENCEPROCESSING_INSTRUCTIONtype
gmetadom-0.2.6/src/gdome_caml/xsl/Makefile.in 0000644 0001750 0001750 00000023324 10704633022 015767 0000000 0000000 # Makefile.in generated by automake 1.9.6 from Makefile.am.
# @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
# 2003, 2004, 2005 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE.
@SET_MAKE@
srcdir = @srcdir@
top_srcdir = @top_srcdir@
VPATH = @srcdir@
pkgdatadir = $(datadir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
top_builddir = ../../..
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
INSTALL = @INSTALL@
install_sh_DATA = $(install_sh) -c -m 644
install_sh_PROGRAM = $(install_sh) -c
install_sh_SCRIPT = $(install_sh) -c
INSTALL_HEADER = $(INSTALL_DATA)
transform = $(program_transform_name)
NORMAL_INSTALL = :
PRE_INSTALL = :
POST_INSTALL = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
build_triplet = @build@
host_triplet = @host@
subdir = src/gdome_caml/xsl
DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
mkinstalldirs = $(install_sh) -d
CONFIG_HEADER = $(top_builddir)/config.h
CONFIG_CLEAN_FILES =
SOURCES =
DIST_SOURCES =
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@
ALL_TRAITS = @ALL_TRAITS@
AMDEP_FALSE = @AMDEP_FALSE@
AMDEP_TRUE = @AMDEP_TRUE@
AMTAR = @AMTAR@
AR = @AR@
AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
CHAR_UNSIGNED = @CHAR_UNSIGNED@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
CXX = @CXX@
CXXCPP = @CXXCPP@
CXXDEPMODE = @CXXDEPMODE@
CXXFLAGS = @CXXFLAGS@
CYGPATH_W = @CYGPATH_W@
DEFS = @DEFS@
DEPDIR = @DEPDIR@
ECHO = @ECHO@
ECHO_C = @ECHO_C@
ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
EGREP = @EGREP@
EXEEXT = @EXEEXT@
F77 = @F77@
FFLAGS = @FFLAGS@
GDOME_CFLAGS = @GDOME_CFLAGS@
GDOME_LIBS = @GDOME_LIBS@
GMETADOM_MODULES = @GMETADOM_MODULES@
GMETADOM_SIZEOF_CHAR = @GMETADOM_SIZEOF_CHAR@
GMETADOM_SIZEOF_INT = @GMETADOM_SIZEOF_INT@
GMETADOM_SIZEOF_LONG = @GMETADOM_SIZEOF_LONG@
GMETADOM_SIZEOF_LONG_LONG = @GMETADOM_SIZEOF_LONG_LONG@
GMETADOM_SIZEOF_SHORT = @GMETADOM_SIZEOF_SHORT@
GMETADOM_SIZEOF_WCHAR_T = @GMETADOM_SIZEOF_WCHAR_T@
GMETADOM_VERSION_INFO = @GMETADOM_VERSION_INFO@
GREP = @GREP@
HAVE_ICONV = @HAVE_ICONV@
HAVE_OCAMLC = @HAVE_OCAMLC@
HAVE_OCAMLDEP = @HAVE_OCAMLDEP@
HAVE_OCAMLFIND = @HAVE_OCAMLFIND@
HAVE_OCAMLOPT = @HAVE_OCAMLOPT@
HAVE_OCAMLOPT_COND_FALSE = @HAVE_OCAMLOPT_COND_FALSE@
HAVE_OCAMLOPT_COND_TRUE = @HAVE_OCAMLOPT_COND_TRUE@
HAVE_SED = @HAVE_SED@
HAVE_SED_COND_FALSE = @HAVE_SED_COND_FALSE@
HAVE_SED_COND_TRUE = @HAVE_SED_COND_TRUE@
HAVE_XSLTPROC = @HAVE_XSLTPROC@
HAVE_XSLTPROC_COND_FALSE = @HAVE_XSLTPROC_COND_FALSE@
HAVE_XSLTPROC_COND_TRUE = @HAVE_XSLTPROC_COND_TRUE@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
LDFLAGS = @LDFLAGS@
LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
LIBTOOL = @LIBTOOL@
LN_S = @LN_S@
LTLIBOBJS = @LTLIBOBJS@
MAKEINFO = @MAKEINFO@
OBJEXT = @OBJEXT@
OCAMLC = @OCAMLC@
OCAMLDEP = @OCAMLDEP@
OCAMLFIND = @OCAMLFIND@
OCAMLOPT = @OCAMLOPT@
OCAML_CFLAGS = @OCAML_CFLAGS@
OCAML_LIB_PREFIX = @OCAML_LIB_PREFIX@
PACKAGE = @PACKAGE@
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
PACKAGE_NAME = @PACKAGE_NAME@
PACKAGE_STRING = @PACKAGE_STRING@
PACKAGE_TARNAME = @PACKAGE_TARNAME@
PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@
PKG_CONFIG = @PKG_CONFIG@
RANLIB = @RANLIB@
SED = @SED@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
STD_TRAITS = @STD_TRAITS@
STRIP = @STRIP@
TRAIT_SPEC = @TRAIT_SPEC@
VERSION = @VERSION@
XSLTPROC = @XSLTPROC@
ac_ct_CC = @ac_ct_CC@
ac_ct_CXX = @ac_ct_CXX@
ac_ct_F77 = @ac_ct_F77@
am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@
am__include = @am__include@
am__leading_dot = @am__leading_dot@
am__quote = @am__quote@
am__tar = @am__tar@
am__untar = @am__untar@
bindir = @bindir@
build = @build@
build_alias = @build_alias@
build_cpu = @build_cpu@
build_os = @build_os@
build_vendor = @build_vendor@
datadir = @datadir@
datarootdir = @datarootdir@
docdir = @docdir@
dvidir = @dvidir@
exec_prefix = @exec_prefix@
host = @host@
host_alias = @host_alias@
host_cpu = @host_cpu@
host_os = @host_os@
host_vendor = @host_vendor@
htmldir = @htmldir@
includedir = @includedir@
infodir = @infodir@
install_sh = @install_sh@
libdir = @libdir@
libexecdir = @libexecdir@
localedir = @localedir@
localstatedir = @localstatedir@
mandir = @mandir@
mkdir_p = @mkdir_p@
oldincludedir = @oldincludedir@
pdfdir = @pdfdir@
prefix = @prefix@
program_transform_name = @program_transform_name@
psdir = @psdir@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
sysconfdir = @sysconfdir@
target_alias = @target_alias@
EXTRA_DIST = \
xml2ann.xsl \
xml2c.xsl \
xml2html.xsl \
xml2mldoc.xsl \
xml2mli.xsl \
xml2oml.xsl \
xml2omlcasts.xsl \
xml2omli.xsl \
xml2omlicasts.xsl \
xml2tmli.xsl \
xslutils.xsl
all: all-am
.SUFFIXES:
$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
@for dep in $?; do \
case '$(am__configure_deps)' in \
*$$dep*) \
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
&& exit 0; \
exit 1;; \
esac; \
done; \
echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/gdome_caml/xsl/Makefile'; \
cd $(top_srcdir) && \
$(AUTOMAKE) --gnu src/gdome_caml/xsl/Makefile
.PRECIOUS: Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
@case '$?' in \
*config.status*) \
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
*) \
echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
esac;
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(top_srcdir)/configure: $(am__configure_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(ACLOCAL_M4): $(am__aclocal_m4_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
mostlyclean-libtool:
-rm -f *.lo
clean-libtool:
-rm -rf .libs _libs
distclean-libtool:
-rm -f libtool
uninstall-info-am:
tags: TAGS
TAGS:
ctags: CTAGS
CTAGS:
distdir: $(DISTFILES)
@srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
list='$(DISTFILES)'; for file in $$list; do \
case $$file in \
$(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
$(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
esac; \
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
if test "$$dir" != "$$file" && test "$$dir" != "."; then \
dir="/$$dir"; \
$(mkdir_p) "$(distdir)$$dir"; \
else \
dir=''; \
fi; \
if test -d $$d/$$file; then \
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
fi; \
cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
else \
test -f $(distdir)/$$file \
|| cp -p $$d/$$file $(distdir)/$$file \
|| exit 1; \
fi; \
done
check-am: all-am
check: check-am
all-am: Makefile
installdirs:
install: install-am
install-exec: install-exec-am
install-data: install-data-am
uninstall: uninstall-am
install-am: all-am
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
installcheck: installcheck-am
install-strip:
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
`test -z '$(STRIP)' || \
echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
mostlyclean-generic:
clean-generic:
distclean-generic:
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
maintainer-clean-generic:
@echo "This command is intended for maintainers to use"
@echo "it deletes files that may require special tools to rebuild."
clean: clean-am
clean-am: clean-generic clean-libtool mostlyclean-am
distclean: distclean-am
-rm -f Makefile
distclean-am: clean-am distclean-generic distclean-libtool
dvi: dvi-am
dvi-am:
html: html-am
info: info-am
info-am:
install-data-am:
install-exec-am:
install-info: install-info-am
install-man:
installcheck-am:
maintainer-clean: maintainer-clean-am
-rm -f Makefile
maintainer-clean-am: distclean-am maintainer-clean-generic
mostlyclean: mostlyclean-am
mostlyclean-am: mostlyclean-generic mostlyclean-libtool
pdf: pdf-am
pdf-am:
ps: ps-am
ps-am:
uninstall-am: uninstall-info-am
.PHONY: all all-am check check-am clean clean-generic clean-libtool \
distclean distclean-generic distclean-libtool distdir dvi \
dvi-am html html-am info info-am install install-am \
install-data install-data-am install-exec install-exec-am \
install-info install-info-am install-man install-strip \
installcheck installcheck-am installdirs maintainer-clean \
maintainer-clean-generic mostlyclean mostlyclean-generic \
mostlyclean-libtool pdf pdf-am ps ps-am uninstall uninstall-am \
uninstall-info-am
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:
gmetadom-0.2.6/src/gdome_caml/xsl/xml2omlicasts.xsl 0000755 0001750 0001750 00000006654 07430235071 017271 0000000 0000000
Dynamic cast: if the argument of the constructor is not an instance of the [] class, a GdomeInit.DOMCastException is raised.class _of_ :
< as_ : [> `] GdomeT.t; .. > ->
;;
gmetadom-0.2.6/src/gdome_caml/include/ 0000777 0001750 0001750 00000000000 10704633450 014624 5 0000000 0000000 gmetadom-0.2.6/src/gdome_caml/include/mlgdomevalue.h 0000644 0001750 0001750 00000007503 07634555127 017413 0000000 0000000 /* This file is part of GMetaDOM
* a generic bind package for the Document Object Model API.
* Copyright (C) 2001-2002 Luca Padovani
* 2002 Claudio Sacerdoti Coen
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
* For more information, please visit the project home page
* http://gmetadom.sourceforge.net
* or send an email to
*/
#ifndef __mlgdomevalue_h__
#define __mlgdomevalue_h__
#include
#define Val_option_ptr(p,f) (((p) == NULL) ? Val_unit : mlgdome_some(f(p)))
#define Val_unsigned_short(n) Val_int(n)
#define Val_unsigned_long(n) Val_int(n)
value Val_DOMString(GdomeDOMString*);
value Val_DOMImplementation(GdomeDOMImplementation*);
/* from the Core module */
value Val_Attr(GdomeAttr*);
value Val_CDATASection(GdomeCDATASection*);
value Val_CharacterData(GdomeCharacterData*);
value Val_Comment(GdomeComment*);
value Val_Document(GdomeDocument*);
value Val_DocumentFragment(GdomeDocumentFragment*);
value Val_DocumentType(GdomeDocumentType*);
value Val_Element(GdomeElement*);
value Val_Entity(GdomeEntity*);
value Val_EntityReference(GdomeEntityReference*);
value Val_NamedNodeMap(GdomeNamedNodeMap*);
value Val_Node(GdomeNode*);
value Val_NodeList(GdomeNodeList*);
value Val_Notation(GdomeNotation*);
value Val_ProcessingInstruction(GdomeProcessingInstruction*);
value Val_Text(GdomeText*);
/* from the Events module */
value Val_Event(GdomeEvent*);
value Val_MutationEvent(GdomeMutationEvent*);
value Val_EventTarget(GdomeEventTarget*);
/* from ml_misc.c */
value mlgdome_some(value v);
void throw_exception(int exc, const char* msg);
void throw_impl_exception(const char* msg);
void throw_cast_exception(const char* msg);
#define ptr_val_option(v,f) (((v) == Val_unit) ? NULL : f(Field(v,0)))
#define unsigned_short_val(v) Int_val(v)
#define unsigned_long_val(v) Int_val(v)
GdomeDOMString* DOMString_val(value);
GdomeDOMImplementation* DOMImplementation_val(value);
/* from the Core module */
GdomeAttr* Attr_val(value);
GdomeCDATASection* CDATASection_val(value);
GdomeCharacterData* CharacterData_val(value);
GdomeComment* Comment_val(value);
GdomeDocument* Document_val(value);
GdomeDocumentType* DocumentType_val(value);
GdomeDocumentFragment* DocumentFragment_val(value);
GdomeElement* Element_val(value);
GdomeEntity* Entity_val(value);
GdomeEntityReference* EntityReference_val(value);
GdomeNamedNodeMap* NamedNodeMap_val(value);
GdomeNode* Node_val(value);
GdomeNodeList* NodeList_val(value);
GdomeNotation* Notation_val(value);
GdomeProcessingInstruction* ProcessingInstruction_val(value);
GdomeText* Text_val(value);
/* from the Events module */
GdomeEvent* Event_val(value);
GdomeMutationEvent* MutationEvent_val(value);
GdomeEventTarget* EventTarget_val(value);
GdomeEventListener* EventListener_val(value);
#endif /* __mlgdomevalue_h__ */
gmetadom-0.2.6/src/gdome_caml/include/Makefile.am 0000644 0001750 0001750 00000000320 07533731570 016577 0000000 0000000
OCAMLINSTALLDIR = $(DESTDIR)$(OCAML_LIB_PREFIX)/gdome2
EXTRA_DIST = mlgdomevalue.h
install-data-local: mlgdomevalue.h
$(mkinstalldirs) $(OCAMLINSTALLDIR)
$(INSTALL_DATA) $(srcdir)/$< $(OCAMLINSTALLDIR);
gmetadom-0.2.6/src/gdome_caml/include/Makefile.in 0000644 0001750 0001750 00000023422 10704633017 016607 0000000 0000000 # Makefile.in generated by automake 1.9.6 from Makefile.am.
# @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
# 2003, 2004, 2005 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE.
@SET_MAKE@
srcdir = @srcdir@
top_srcdir = @top_srcdir@
VPATH = @srcdir@
pkgdatadir = $(datadir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
top_builddir = ../../..
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
INSTALL = @INSTALL@
install_sh_DATA = $(install_sh) -c -m 644
install_sh_PROGRAM = $(install_sh) -c
install_sh_SCRIPT = $(install_sh) -c
INSTALL_HEADER = $(INSTALL_DATA)
transform = $(program_transform_name)
NORMAL_INSTALL = :
PRE_INSTALL = :
POST_INSTALL = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
build_triplet = @build@
host_triplet = @host@
subdir = src/gdome_caml/include
DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
mkinstalldirs = $(install_sh) -d
CONFIG_HEADER = $(top_builddir)/config.h
CONFIG_CLEAN_FILES =
SOURCES =
DIST_SOURCES =
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@
ALL_TRAITS = @ALL_TRAITS@
AMDEP_FALSE = @AMDEP_FALSE@
AMDEP_TRUE = @AMDEP_TRUE@
AMTAR = @AMTAR@
AR = @AR@
AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
CHAR_UNSIGNED = @CHAR_UNSIGNED@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
CXX = @CXX@
CXXCPP = @CXXCPP@
CXXDEPMODE = @CXXDEPMODE@
CXXFLAGS = @CXXFLAGS@
CYGPATH_W = @CYGPATH_W@
DEFS = @DEFS@
DEPDIR = @DEPDIR@
ECHO = @ECHO@
ECHO_C = @ECHO_C@
ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
EGREP = @EGREP@
EXEEXT = @EXEEXT@
F77 = @F77@
FFLAGS = @FFLAGS@
GDOME_CFLAGS = @GDOME_CFLAGS@
GDOME_LIBS = @GDOME_LIBS@
GMETADOM_MODULES = @GMETADOM_MODULES@
GMETADOM_SIZEOF_CHAR = @GMETADOM_SIZEOF_CHAR@
GMETADOM_SIZEOF_INT = @GMETADOM_SIZEOF_INT@
GMETADOM_SIZEOF_LONG = @GMETADOM_SIZEOF_LONG@
GMETADOM_SIZEOF_LONG_LONG = @GMETADOM_SIZEOF_LONG_LONG@
GMETADOM_SIZEOF_SHORT = @GMETADOM_SIZEOF_SHORT@
GMETADOM_SIZEOF_WCHAR_T = @GMETADOM_SIZEOF_WCHAR_T@
GMETADOM_VERSION_INFO = @GMETADOM_VERSION_INFO@
GREP = @GREP@
HAVE_ICONV = @HAVE_ICONV@
HAVE_OCAMLC = @HAVE_OCAMLC@
HAVE_OCAMLDEP = @HAVE_OCAMLDEP@
HAVE_OCAMLFIND = @HAVE_OCAMLFIND@
HAVE_OCAMLOPT = @HAVE_OCAMLOPT@
HAVE_OCAMLOPT_COND_FALSE = @HAVE_OCAMLOPT_COND_FALSE@
HAVE_OCAMLOPT_COND_TRUE = @HAVE_OCAMLOPT_COND_TRUE@
HAVE_SED = @HAVE_SED@
HAVE_SED_COND_FALSE = @HAVE_SED_COND_FALSE@
HAVE_SED_COND_TRUE = @HAVE_SED_COND_TRUE@
HAVE_XSLTPROC = @HAVE_XSLTPROC@
HAVE_XSLTPROC_COND_FALSE = @HAVE_XSLTPROC_COND_FALSE@
HAVE_XSLTPROC_COND_TRUE = @HAVE_XSLTPROC_COND_TRUE@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
LDFLAGS = @LDFLAGS@
LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
LIBTOOL = @LIBTOOL@
LN_S = @LN_S@
LTLIBOBJS = @LTLIBOBJS@
MAKEINFO = @MAKEINFO@
OBJEXT = @OBJEXT@
OCAMLC = @OCAMLC@
OCAMLDEP = @OCAMLDEP@
OCAMLFIND = @OCAMLFIND@
OCAMLOPT = @OCAMLOPT@
OCAML_CFLAGS = @OCAML_CFLAGS@
OCAML_LIB_PREFIX = @OCAML_LIB_PREFIX@
PACKAGE = @PACKAGE@
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
PACKAGE_NAME = @PACKAGE_NAME@
PACKAGE_STRING = @PACKAGE_STRING@
PACKAGE_TARNAME = @PACKAGE_TARNAME@
PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@
PKG_CONFIG = @PKG_CONFIG@
RANLIB = @RANLIB@
SED = @SED@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
STD_TRAITS = @STD_TRAITS@
STRIP = @STRIP@
TRAIT_SPEC = @TRAIT_SPEC@
VERSION = @VERSION@
XSLTPROC = @XSLTPROC@
ac_ct_CC = @ac_ct_CC@
ac_ct_CXX = @ac_ct_CXX@
ac_ct_F77 = @ac_ct_F77@
am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@
am__include = @am__include@
am__leading_dot = @am__leading_dot@
am__quote = @am__quote@
am__tar = @am__tar@
am__untar = @am__untar@
bindir = @bindir@
build = @build@
build_alias = @build_alias@
build_cpu = @build_cpu@
build_os = @build_os@
build_vendor = @build_vendor@
datadir = @datadir@
datarootdir = @datarootdir@
docdir = @docdir@
dvidir = @dvidir@
exec_prefix = @exec_prefix@
host = @host@
host_alias = @host_alias@
host_cpu = @host_cpu@
host_os = @host_os@
host_vendor = @host_vendor@
htmldir = @htmldir@
includedir = @includedir@
infodir = @infodir@
install_sh = @install_sh@
libdir = @libdir@
libexecdir = @libexecdir@
localedir = @localedir@
localstatedir = @localstatedir@
mandir = @mandir@
mkdir_p = @mkdir_p@
oldincludedir = @oldincludedir@
pdfdir = @pdfdir@
prefix = @prefix@
program_transform_name = @program_transform_name@
psdir = @psdir@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
sysconfdir = @sysconfdir@
target_alias = @target_alias@
OCAMLINSTALLDIR = $(DESTDIR)$(OCAML_LIB_PREFIX)/gdome2
EXTRA_DIST = mlgdomevalue.h
all: all-am
.SUFFIXES:
$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
@for dep in $?; do \
case '$(am__configure_deps)' in \
*$$dep*) \
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
&& exit 0; \
exit 1;; \
esac; \
done; \
echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/gdome_caml/include/Makefile'; \
cd $(top_srcdir) && \
$(AUTOMAKE) --gnu src/gdome_caml/include/Makefile
.PRECIOUS: Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
@case '$?' in \
*config.status*) \
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
*) \
echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
esac;
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(top_srcdir)/configure: $(am__configure_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(ACLOCAL_M4): $(am__aclocal_m4_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
mostlyclean-libtool:
-rm -f *.lo
clean-libtool:
-rm -rf .libs _libs
distclean-libtool:
-rm -f libtool
uninstall-info-am:
tags: TAGS
TAGS:
ctags: CTAGS
CTAGS:
distdir: $(DISTFILES)
@srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
list='$(DISTFILES)'; for file in $$list; do \
case $$file in \
$(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
$(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
esac; \
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
if test "$$dir" != "$$file" && test "$$dir" != "."; then \
dir="/$$dir"; \
$(mkdir_p) "$(distdir)$$dir"; \
else \
dir=''; \
fi; \
if test -d $$d/$$file; then \
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
fi; \
cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
else \
test -f $(distdir)/$$file \
|| cp -p $$d/$$file $(distdir)/$$file \
|| exit 1; \
fi; \
done
check-am: all-am
check: check-am
all-am: Makefile
installdirs:
install: install-am
install-exec: install-exec-am
install-data: install-data-am
uninstall: uninstall-am
install-am: all-am
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
installcheck: installcheck-am
install-strip:
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
`test -z '$(STRIP)' || \
echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
mostlyclean-generic:
clean-generic:
distclean-generic:
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
maintainer-clean-generic:
@echo "This command is intended for maintainers to use"
@echo "it deletes files that may require special tools to rebuild."
clean: clean-am
clean-am: clean-generic clean-libtool mostlyclean-am
distclean: distclean-am
-rm -f Makefile
distclean-am: clean-am distclean-generic distclean-libtool
dvi: dvi-am
dvi-am:
html: html-am
info: info-am
info-am:
install-data-am: install-data-local
install-exec-am:
install-info: install-info-am
install-man:
installcheck-am:
maintainer-clean: maintainer-clean-am
-rm -f Makefile
maintainer-clean-am: distclean-am maintainer-clean-generic
mostlyclean: mostlyclean-am
mostlyclean-am: mostlyclean-generic mostlyclean-libtool
pdf: pdf-am
pdf-am:
ps: ps-am
ps-am:
uninstall-am: uninstall-info-am
.PHONY: all all-am check check-am clean clean-generic clean-libtool \
distclean distclean-generic distclean-libtool distdir dvi \
dvi-am html html-am info info-am install install-am \
install-data install-data-am install-data-local install-exec \
install-exec-am install-info install-info-am install-man \
install-strip installcheck installcheck-am installdirs \
maintainer-clean maintainer-clean-generic mostlyclean \
mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
uninstall uninstall-am uninstall-info-am
install-data-local: mlgdomevalue.h
$(mkinstalldirs) $(OCAMLINSTALLDIR)
$(INSTALL_DATA) $(srcdir)/$< $(OCAMLINSTALLDIR);
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:
gmetadom-0.2.6/src/gdome_caml/iDOMImplementation.mli 0000644 0001750 0001750 00000005663 10465324540 017331 0000000 0000000 (* This file is part of GMetaDOM
* a generic bind package for the Document Object Model API.
* Copyright (C) 2001-2002 Luca Padovani
* 2002 Claudio Sacerdoti Coen
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
* For more information, please visit the project home page
* http://gmetadom.sourceforge.net
* or send an email to
*)
external create : unit -> TDOMImplementation.t = "ml_gdome_di_create"
external hasFeature : this:TDOMImplementation.t -> feature:TDOMString.t -> version:TDOMString.t -> bool = "ml_gdome_di_hasFeature"
external createDocumentType : this:TDOMImplementation.t -> qualifiedName:TDOMString.t -> publicId:TDOMString.t -> systemId:TDOMString.t -> TDocumentType.t = "ml_gdome_di_createDocumentType"
external createDocument : this:TDOMImplementation.t -> namespaceURI:TDOMString.t option -> qualifiedName:TDOMString.t -> doctype:[> `DocumentType] GdomeT.t option -> TDocument.t = "ml_gdome_di_createDocument"
type validatingMode =
Parsing
| Validating
| Recovering
;;
val createDocumentFromURI :
?validatingMode:validatingMode ->
?keepEntities:bool ->
unit -> this:TDOMImplementation.t -> uri:string -> TDocument.t
val createDocumentFromMemory :
?validatingMode:validatingMode ->
?keepEntities:bool ->
unit -> this:TDOMImplementation.t -> doc:TDOMString.t -> TDocument.t
val saveDocumentToFile :
this:TDOMImplementation.t ->
doc:[> `Document] GdomeT.t -> name:string ->
?indent:bool -> unit -> bool
val saveDocumentToFileEnc :
this:TDOMImplementation.t ->
doc:[> `Document] GdomeT.t -> name:string -> encoding:string ->
?indent:bool -> unit -> bool
val saveDocumentToMemory :
this:TDOMImplementation.t ->
doc:[> `Document] GdomeT.t ->
?indent:bool -> unit -> string
val saveDocumentToMemoryEnc :
this:TDOMImplementation.t ->
doc:[> `Document] GdomeT.t -> encoding:string ->
?indent:bool -> unit -> string
val enableEvent :
this:TDOMImplementation.t ->
doc:[> `Document] GdomeT.t ->
name:string -> unit
val disableEvent :
this:TDOMImplementation.t ->
doc:[> `Document] GdomeT.t ->
name:string -> unit
val eventIsEnabled :
this:TDOMImplementation.t ->
doc:[> `Document] GdomeT.t ->
name:string -> bool
gmetadom-0.2.6/src/gdome_caml/doc/ 0000777 0001750 0001750 00000000000 10704633447 013754 5 0000000 0000000 gmetadom-0.2.6/src/gdome_caml/doc/index.html 0000644 0001750 0001750 00000000000 07443746352 015661 0000000 0000000 gmetadom-0.2.6/src/gdome_caml/.depend 0000644 0001750 0001750 00000000140 07442126410 014346 0000000 0000000 iDOMImplementation.cmo: iDOMImplementation.cmi
iDOMImplementation.cmx: iDOMImplementation.cmi
gmetadom-0.2.6/src/gdome_caml/test/ 0000777 0001750 0001750 00000000000 10704633453 014163 5 0000000 0000000 gmetadom-0.2.6/src/gdome_caml/test/test.ml 0000644 0001750 0001750 00000004306 07730623122 015410 0000000 0000000 open Gdome;;
let di = domImplementation ()
let doc = di#createDocumentFromURI ~uri:(Sys.argv.(1)) ()
(* let _ = di#disableEvent doc "*" *)
let root = doc#get_documentElement
let root' = doc#get_documentElement
let _ = Printf.printf "comparing roots: %s\n" (if root#isSameNode (root' :> Gdome.node) then "OK" else "NO!")
let _ = Printf.printf "comparing roots ===: %s\n" (if (root :> Gdome.node) === (root' :> Gdome.node) then "OK" else "NO!")
let s1 = domString "hello"
let s2 = domString "hello"
let _ = Printf.printf "comparing dom strings: %s\n" (if s1 === s2 then "OK" else "NO!")
let old = (root#getAttribute (domString "hello-spank"))
let listener = eventListener
(function e ->
Printf.printf "Event type: %s\n" (e#get_type#to_string) ;
let me = new mutationEvent_of_event e in
begin
match me#get_relatedNode with
None -> Printf.printf "no related node\n"
| Some n -> Printf.printf "related node: %s\n" n#get_nodeName#to_string
end ;
begin
match me#get_attrName, me#get_prevValue, me#get_newValue with
Some attrName, Some prevValue, Some newValue -> Printf.printf "attrName = %s prev = %s new = %s\n" attrName#to_string prevValue#to_string newValue#to_string
| _ -> ()
end ;
Printf.printf "hello " ; flush stdout)
let _ = root#addEventListener (domString "DOMAttrModified") listener false
let waste n =
let rec aux n s =
if Random.int 1000 = 0 then root#setAttribute (domString "value") (domString (string_of_int n)) ;
if n = 0 then s else aux (n-1) ("hello world!" :: s)
in
aux n []
let _ = Printf.printf "test 1\n" ; flush stdout
let _ = waste 5000000
let _ = Printf.printf "test 2\n" ; flush stdout
let _ =
root#setAttribute (domString "hello-spank")
(domString (old#to_string ^ " and Aika"))
;;
let _ = Printf.printf "test 3\n" ; flush stdout
let _ = waste 5000000
let _ = Printf.printf "test 4\n" ; flush stdout
let _ =
root#setAttribute (domString "hello-spank")
(domString (old#to_string ^ " and Luca"))
;;
let res_string = di#saveDocumentToMemory ~doc ~indent:true ();;
print_endline ("Result saveDocumentToMemory: **" ^ res_string ^ "**");;
let res = di#saveDocumentToFile ~doc ~name:"hi.xml" ~indent:true ()
let _ = Printf.printf "done!\n"
gmetadom-0.2.6/src/gdome_caml/test/Makefile.am 0000644 0001750 0001750 00000004221 10266227620 016130 0000000 0000000
OCAMLBUILDDIR = $(top_builddir)/src/gdome_caml
OCAML_FLAGS = \
-I $(OCAMLBUILDDIR) \
-I $(OCAMLBUILDDIR)/basic \
-I $(OCAMLBUILDDIR)/types \
-I $(OCAMLBUILDDIR)/core \
-I $(OCAMLBUILDDIR)/events \
-I $(OCAMLBUILDDIR)/ocaml
if HAVE_OCAMLOPT_COND
noinst_PROGRAMS = test test.opt
else
noinst_PROGRAMS = test
endif
#noinst_PROGRAMS = test bench bench-visit
test_SOURCES = test.ml
test_opt_SOURCES = test.ml
#bench_SOURCES = bench.ml
#bench_visit_SOURCES = bench-visit.ml
CLEANFILES = test.cmo test.cmi test.cmx test.o
C_LIBS = $(top_builddir)/src/gdome_caml/dllmlgdome.so
OCAML_LIBS = \
$(top_builddir)/src/gdome_caml/mlgdome.cma \
$(top_builddir)/src/gdome_caml/ocaml/mlogdome.cma
OCAMLOPT_LIBS = \
$(top_builddir)/src/gdome_caml/mlgdome.cmxa \
$(top_builddir)/src/gdome_caml/ocaml/mlogdome.cmxa
#bench$(EXEEXT) : $(srcdir)/bench.ml
# if test ! -e bench.cmo -a "x$(srcdir)" != "x." ; then $(LN_S) $< . ; fi
# $(OCAMLC) -o $@ $(OCAML_FLAGS) -cclib "$(GDOME_LIBS)" gdomeInit.cmo $(C_LIBS) $(OCAML_LIBS) bench.ml
#bench-visit$(EXEEXT) : $(srcdir)/bench-visit.ml
# if test ! -e bench-visit.cmo -a "x$(srcdir)" != "x." ; then $(LN_S) $< . ; fi
# $(OCAMLC) -o $@ $(OCAML_FLAGS) -cclib "$(GDOME_LIBS)" gdomeInit.cmo $(C_LIBS) $(OCAML_LIBS) bench-visit.ml
#bench-visit.opt$(EXEEXT) : $(srcdir)/bench-visit.ml
# if test ! -e bench-visit.cmo -a "x$(srcdir)" != "x." ; then $(LN_S) $< . ; fi
# $(OCAMLOPT) -o $@ $(OCAML_FLAGS) -cclib "$(GDOME_LIBS)" gdomeInit.cmx -cclib "$(C_LIBS)" $(OCAMLOPT_LIBS) bench-visit.ml
#bench.opt$(EXEEXT) : $(srcdir)/bench.ml
# if test ! -e bench.cmo -a "x$(srcdir)" != "x." ; then $(LN_S) $< . ; fi
# $(OCAMLOPT) -o $@ $(OCAML_FLAGS) -cclib "$(GDOME_LIBS)" gdomeInit.cmx -cclib "$(C_LIBS)" $(OCAMLOPT_LIBS) bench.ml
test$(EXEEXT) : $(srcdir)/test.ml
if test ! -e test.cmo -a "x$(srcdir)" != "x." ; then $(LN_S) $< . ; fi
$(OCAMLC) -o $@ $(OCAML_FLAGS) -cclib "$(GDOME_LIBS)" gdomeInit.cmo $(C_LIBS) $(OCAML_LIBS) test.ml
test.opt$(EXEEXT) : $(srcdir)/test.ml
if test ! -e test.cmo -a "x$(srcdir)" != "x." ; then $(LN_S) $< . ; fi
$(OCAMLOPT) -o $@ $(OCAML_FLAGS) -cclib "$(GDOME_LIBS)" gdomeInit.cmx -cclib "$(C_LIBS)" $(OCAMLOPT_LIBS) test.ml
gmetadom-0.2.6/src/gdome_caml/test/Makefile.in 0000644 0001750 0001750 00000031532 10704633020 016136 0000000 0000000 # Makefile.in generated by automake 1.9.6 from Makefile.am.
# @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
# 2003, 2004, 2005 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE.
@SET_MAKE@
srcdir = @srcdir@
top_srcdir = @top_srcdir@
VPATH = @srcdir@
pkgdatadir = $(datadir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
top_builddir = ../../..
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
INSTALL = @INSTALL@
install_sh_DATA = $(install_sh) -c -m 644
install_sh_PROGRAM = $(install_sh) -c
install_sh_SCRIPT = $(install_sh) -c
INSTALL_HEADER = $(INSTALL_DATA)
transform = $(program_transform_name)
NORMAL_INSTALL = :
PRE_INSTALL = :
POST_INSTALL = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
build_triplet = @build@
host_triplet = @host@
@HAVE_OCAMLOPT_COND_FALSE@noinst_PROGRAMS = test$(EXEEXT)
@HAVE_OCAMLOPT_COND_TRUE@noinst_PROGRAMS = test$(EXEEXT) \
@HAVE_OCAMLOPT_COND_TRUE@ test.opt$(EXEEXT)
subdir = src/gdome_caml/test
DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
mkinstalldirs = $(install_sh) -d
CONFIG_HEADER = $(top_builddir)/config.h
CONFIG_CLEAN_FILES =
PROGRAMS = $(noinst_PROGRAMS)
am_test_OBJECTS =
test_OBJECTS = $(am_test_OBJECTS)
test_LDADD = $(LDADD)
am_test_opt_OBJECTS =
test_opt_OBJECTS = $(am_test_opt_OBJECTS)
test_opt_LDADD = $(LDADD)
DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)
COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
LTCOMPILE = $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) \
$(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
$(AM_CFLAGS) $(CFLAGS)
CCLD = $(CC)
LINK = $(LIBTOOL) --tag=CC --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
$(AM_LDFLAGS) $(LDFLAGS) -o $@
SOURCES = $(test_SOURCES) $(test_opt_SOURCES)
DIST_SOURCES = $(test_SOURCES) $(test_opt_SOURCES)
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@
ALL_TRAITS = @ALL_TRAITS@
AMDEP_FALSE = @AMDEP_FALSE@
AMDEP_TRUE = @AMDEP_TRUE@
AMTAR = @AMTAR@
AR = @AR@
AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
CHAR_UNSIGNED = @CHAR_UNSIGNED@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
CXX = @CXX@
CXXCPP = @CXXCPP@
CXXDEPMODE = @CXXDEPMODE@
CXXFLAGS = @CXXFLAGS@
CYGPATH_W = @CYGPATH_W@
DEFS = @DEFS@
DEPDIR = @DEPDIR@
ECHO = @ECHO@
ECHO_C = @ECHO_C@
ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
EGREP = @EGREP@
EXEEXT = @EXEEXT@
F77 = @F77@
FFLAGS = @FFLAGS@
GDOME_CFLAGS = @GDOME_CFLAGS@
GDOME_LIBS = @GDOME_LIBS@
GMETADOM_MODULES = @GMETADOM_MODULES@
GMETADOM_SIZEOF_CHAR = @GMETADOM_SIZEOF_CHAR@
GMETADOM_SIZEOF_INT = @GMETADOM_SIZEOF_INT@
GMETADOM_SIZEOF_LONG = @GMETADOM_SIZEOF_LONG@
GMETADOM_SIZEOF_LONG_LONG = @GMETADOM_SIZEOF_LONG_LONG@
GMETADOM_SIZEOF_SHORT = @GMETADOM_SIZEOF_SHORT@
GMETADOM_SIZEOF_WCHAR_T = @GMETADOM_SIZEOF_WCHAR_T@
GMETADOM_VERSION_INFO = @GMETADOM_VERSION_INFO@
GREP = @GREP@
HAVE_ICONV = @HAVE_ICONV@
HAVE_OCAMLC = @HAVE_OCAMLC@
HAVE_OCAMLDEP = @HAVE_OCAMLDEP@
HAVE_OCAMLFIND = @HAVE_OCAMLFIND@
HAVE_OCAMLOPT = @HAVE_OCAMLOPT@
HAVE_OCAMLOPT_COND_FALSE = @HAVE_OCAMLOPT_COND_FALSE@
HAVE_OCAMLOPT_COND_TRUE = @HAVE_OCAMLOPT_COND_TRUE@
HAVE_SED = @HAVE_SED@
HAVE_SED_COND_FALSE = @HAVE_SED_COND_FALSE@
HAVE_SED_COND_TRUE = @HAVE_SED_COND_TRUE@
HAVE_XSLTPROC = @HAVE_XSLTPROC@
HAVE_XSLTPROC_COND_FALSE = @HAVE_XSLTPROC_COND_FALSE@
HAVE_XSLTPROC_COND_TRUE = @HAVE_XSLTPROC_COND_TRUE@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
LDFLAGS = @LDFLAGS@
LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
LIBTOOL = @LIBTOOL@
LN_S = @LN_S@
LTLIBOBJS = @LTLIBOBJS@
MAKEINFO = @MAKEINFO@
OBJEXT = @OBJEXT@
OCAMLC = @OCAMLC@
OCAMLDEP = @OCAMLDEP@
OCAMLFIND = @OCAMLFIND@
OCAMLOPT = @OCAMLOPT@
OCAML_CFLAGS = @OCAML_CFLAGS@
OCAML_LIB_PREFIX = @OCAML_LIB_PREFIX@
PACKAGE = @PACKAGE@
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
PACKAGE_NAME = @PACKAGE_NAME@
PACKAGE_STRING = @PACKAGE_STRING@
PACKAGE_TARNAME = @PACKAGE_TARNAME@
PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@
PKG_CONFIG = @PKG_CONFIG@
RANLIB = @RANLIB@
SED = @SED@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
STD_TRAITS = @STD_TRAITS@
STRIP = @STRIP@
TRAIT_SPEC = @TRAIT_SPEC@
VERSION = @VERSION@
XSLTPROC = @XSLTPROC@
ac_ct_CC = @ac_ct_CC@
ac_ct_CXX = @ac_ct_CXX@
ac_ct_F77 = @ac_ct_F77@
am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@
am__include = @am__include@
am__leading_dot = @am__leading_dot@
am__quote = @am__quote@
am__tar = @am__tar@
am__untar = @am__untar@
bindir = @bindir@
build = @build@
build_alias = @build_alias@
build_cpu = @build_cpu@
build_os = @build_os@
build_vendor = @build_vendor@
datadir = @datadir@
datarootdir = @datarootdir@
docdir = @docdir@
dvidir = @dvidir@
exec_prefix = @exec_prefix@
host = @host@
host_alias = @host_alias@
host_cpu = @host_cpu@
host_os = @host_os@
host_vendor = @host_vendor@
htmldir = @htmldir@
includedir = @includedir@
infodir = @infodir@
install_sh = @install_sh@
libdir = @libdir@
libexecdir = @libexecdir@
localedir = @localedir@
localstatedir = @localstatedir@
mandir = @mandir@
mkdir_p = @mkdir_p@
oldincludedir = @oldincludedir@
pdfdir = @pdfdir@
prefix = @prefix@
program_transform_name = @program_transform_name@
psdir = @psdir@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
sysconfdir = @sysconfdir@
target_alias = @target_alias@
OCAMLBUILDDIR = $(top_builddir)/src/gdome_caml
OCAML_FLAGS = \
-I $(OCAMLBUILDDIR) \
-I $(OCAMLBUILDDIR)/basic \
-I $(OCAMLBUILDDIR)/types \
-I $(OCAMLBUILDDIR)/core \
-I $(OCAMLBUILDDIR)/events \
-I $(OCAMLBUILDDIR)/ocaml
#noinst_PROGRAMS = test bench bench-visit
test_SOURCES = test.ml
test_opt_SOURCES = test.ml
#bench_SOURCES = bench.ml
#bench_visit_SOURCES = bench-visit.ml
CLEANFILES = test.cmo test.cmi test.cmx test.o
C_LIBS = $(top_builddir)/src/gdome_caml/dllmlgdome.so
OCAML_LIBS = \
$(top_builddir)/src/gdome_caml/mlgdome.cma \
$(top_builddir)/src/gdome_caml/ocaml/mlogdome.cma
OCAMLOPT_LIBS = \
$(top_builddir)/src/gdome_caml/mlgdome.cmxa \
$(top_builddir)/src/gdome_caml/ocaml/mlogdome.cmxa
all: all-am
.SUFFIXES:
$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
@for dep in $?; do \
case '$(am__configure_deps)' in \
*$$dep*) \
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
&& exit 0; \
exit 1;; \
esac; \
done; \
echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/gdome_caml/test/Makefile'; \
cd $(top_srcdir) && \
$(AUTOMAKE) --gnu src/gdome_caml/test/Makefile
.PRECIOUS: Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
@case '$?' in \
*config.status*) \
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
*) \
echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
esac;
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(top_srcdir)/configure: $(am__configure_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(ACLOCAL_M4): $(am__aclocal_m4_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
clean-noinstPROGRAMS:
@list='$(noinst_PROGRAMS)'; for p in $$list; do \
f=`echo $$p|sed 's/$(EXEEXT)$$//'`; \
echo " rm -f $$p $$f"; \
rm -f $$p $$f ; \
done
mostlyclean-compile:
-rm -f *.$(OBJEXT)
distclean-compile:
-rm -f *.tab.c
mostlyclean-libtool:
-rm -f *.lo
clean-libtool:
-rm -rf .libs _libs
distclean-libtool:
-rm -f libtool
uninstall-info-am:
tags: TAGS
TAGS:
ctags: CTAGS
CTAGS:
distdir: $(DISTFILES)
@srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
list='$(DISTFILES)'; for file in $$list; do \
case $$file in \
$(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
$(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
esac; \
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
if test "$$dir" != "$$file" && test "$$dir" != "."; then \
dir="/$$dir"; \
$(mkdir_p) "$(distdir)$$dir"; \
else \
dir=''; \
fi; \
if test -d $$d/$$file; then \
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
fi; \
cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
else \
test -f $(distdir)/$$file \
|| cp -p $$d/$$file $(distdir)/$$file \
|| exit 1; \
fi; \
done
check-am: all-am
check: check-am
all-am: Makefile $(PROGRAMS)
installdirs:
install: install-am
install-exec: install-exec-am
install-data: install-data-am
uninstall: uninstall-am
install-am: all-am
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
installcheck: installcheck-am
install-strip:
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
`test -z '$(STRIP)' || \
echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
mostlyclean-generic:
clean-generic:
-test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
distclean-generic:
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
maintainer-clean-generic:
@echo "This command is intended for maintainers to use"
@echo "it deletes files that may require special tools to rebuild."
clean: clean-am
clean-am: clean-generic clean-libtool clean-noinstPROGRAMS \
mostlyclean-am
distclean: distclean-am
-rm -f Makefile
distclean-am: clean-am distclean-compile distclean-generic \
distclean-libtool
dvi: dvi-am
dvi-am:
html: html-am
info: info-am
info-am:
install-data-am:
install-exec-am:
install-info: install-info-am
install-man:
installcheck-am:
maintainer-clean: maintainer-clean-am
-rm -f Makefile
maintainer-clean-am: distclean-am maintainer-clean-generic
mostlyclean: mostlyclean-am
mostlyclean-am: mostlyclean-compile mostlyclean-generic \
mostlyclean-libtool
pdf: pdf-am
pdf-am:
ps: ps-am
ps-am:
uninstall-am: uninstall-info-am
.PHONY: all all-am check check-am clean clean-generic clean-libtool \
clean-noinstPROGRAMS distclean distclean-compile \
distclean-generic distclean-libtool distdir dvi dvi-am html \
html-am info info-am install install-am install-data \
install-data-am install-exec install-exec-am install-info \
install-info-am install-man install-strip installcheck \
installcheck-am installdirs maintainer-clean \
maintainer-clean-generic mostlyclean mostlyclean-compile \
mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
uninstall uninstall-am uninstall-info-am
#bench$(EXEEXT) : $(srcdir)/bench.ml
# if test ! -e bench.cmo -a "x$(srcdir)" != "x." ; then $(LN_S) $< . ; fi
# $(OCAMLC) -o $@ $(OCAML_FLAGS) -cclib "$(GDOME_LIBS)" gdomeInit.cmo $(C_LIBS) $(OCAML_LIBS) bench.ml
#bench-visit$(EXEEXT) : $(srcdir)/bench-visit.ml
# if test ! -e bench-visit.cmo -a "x$(srcdir)" != "x." ; then $(LN_S) $< . ; fi
# $(OCAMLC) -o $@ $(OCAML_FLAGS) -cclib "$(GDOME_LIBS)" gdomeInit.cmo $(C_LIBS) $(OCAML_LIBS) bench-visit.ml
#bench-visit.opt$(EXEEXT) : $(srcdir)/bench-visit.ml
# if test ! -e bench-visit.cmo -a "x$(srcdir)" != "x." ; then $(LN_S) $< . ; fi
# $(OCAMLOPT) -o $@ $(OCAML_FLAGS) -cclib "$(GDOME_LIBS)" gdomeInit.cmx -cclib "$(C_LIBS)" $(OCAMLOPT_LIBS) bench-visit.ml
#bench.opt$(EXEEXT) : $(srcdir)/bench.ml
# if test ! -e bench.cmo -a "x$(srcdir)" != "x." ; then $(LN_S) $< . ; fi
# $(OCAMLOPT) -o $@ $(OCAML_FLAGS) -cclib "$(GDOME_LIBS)" gdomeInit.cmx -cclib "$(C_LIBS)" $(OCAMLOPT_LIBS) bench.ml
test$(EXEEXT) : $(srcdir)/test.ml
if test ! -e test.cmo -a "x$(srcdir)" != "x." ; then $(LN_S) $< . ; fi
$(OCAMLC) -o $@ $(OCAML_FLAGS) -cclib "$(GDOME_LIBS)" gdomeInit.cmo $(C_LIBS) $(OCAML_LIBS) test.ml
test.opt$(EXEEXT) : $(srcdir)/test.ml
if test ! -e test.cmo -a "x$(srcdir)" != "x." ; then $(LN_S) $< . ; fi
$(OCAMLOPT) -o $@ $(OCAML_FLAGS) -cclib "$(GDOME_LIBS)" gdomeInit.cmx -cclib "$(C_LIBS)" $(OCAMLOPT_LIBS) test.ml
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:
gmetadom-0.2.6/src/gdome_caml/META.in 0000644 0001750 0001750 00000000377 07575100055 014204 0000000 0000000 requires=""
version="@VERSION@"
archive(byte)="gdomeInit.cmo mlgdome.cma mlogdome.cma"
archive(native)="gdomeInit.cmx mlgdome.cmxa mlogdome.cmxa"
archive(byte,premethods)="gdomeInit.cmo mlgdome.cma"
archive(native,premethods)="gdomeInit.cmx mlgdome.cmxa"
gmetadom-0.2.6/src/gdome_caml/iDOMImplementation.ml 0000644 0001750 0001750 00000010440 10465324540 017145 0000000 0000000 (* This file is part of GMetaDOM
* a generic bind package for the Document Object Model API.
* Copyright (C) 2001-2002 Luca Padovani
* 2002 Claudio Sacerdoti Coen
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
* For more information, please visit the project home page
* http://gmetadom.sourceforge.net
* or send an email to
*)
external create : unit -> TDOMImplementation.t = "ml_gdome_di_create"
external hasFeature : this:TDOMImplementation.t -> feature:TDOMString.t -> version:TDOMString.t -> bool = "ml_gdome_di_hasFeature"
external createDocumentType : this:TDOMImplementation.t -> qualifiedName:TDOMString.t -> publicId:TDOMString.t -> systemId:TDOMString.t -> TDocumentType.t = "ml_gdome_di_createDocumentType"
external createDocument : this:TDOMImplementation.t -> namespaceURI:TDOMString.t option -> qualifiedName:TDOMString.t -> doctype:[> `DocumentType] GdomeT.t option -> TDocument.t = "ml_gdome_di_createDocument"
type validatingMode =
Parsing
| Validating
| Recovering
;;
let mode_of_validatingMode_and_keepEntities vm ke =
let n_vm =
match vm with
Parsing -> 0
| Validating -> 1
| Recovering -> 2
in
let n_ke =
if ke then 0 else 4
in
n_vm lor n_ke
;;
external raw_createDocumentFromURI : this:TDOMImplementation.t -> uri:string -> mode:int -> TDocument.t = "ml_gdome_di_createDocumentFromURI"
let createDocumentFromURI ?(validatingMode=Parsing) ?(keepEntities=false) () =
raw_createDocumentFromURI
~mode:(mode_of_validatingMode_and_keepEntities validatingMode keepEntities)
;;
external raw_createDocumentFromMemory : this:TDOMImplementation.t -> doc:TDOMString.t -> mode:int -> TDocument.t = "ml_gdome_di_createDocumentFromMemory"
let createDocumentFromMemory ?(validatingMode=Parsing) ?(keepEntities=false) ()=
raw_createDocumentFromMemory
~mode:(mode_of_validatingMode_and_keepEntities validatingMode keepEntities)
;;
external raw_saveDocumentToFile : this:TDOMImplementation.t -> doc:[> `Document] GdomeT.t -> name:string -> mode:int -> bool = "ml_gdome_di_saveDocumentToFile"
let saveDocumentToFile ~this ~doc ~name ?(indent=false) () =
raw_saveDocumentToFile ~this ~doc ~name ~mode:(if indent then 1 else 0)
;;
external raw_saveDocumentToFileEnc : this:TDOMImplementation.t -> doc:[> `Document] GdomeT.t -> name:string -> encoding:string -> mode:int -> bool = "ml_gdome_di_saveDocumentToFileEnc"
let saveDocumentToFileEnc ~this ~doc ~name ~encoding ?(indent=false) () =
raw_saveDocumentToFileEnc ~this ~doc ~name ~encoding ~mode:(if indent then 1 else 0)
;;
external raw_saveDocumentToMemory :
this:TDOMImplementation.t ->
doc:[> `Document] GdomeT.t ->
mode:int ->
string = "ml_gdome_di_saveDocumentToMemory"
let saveDocumentToMemory ~this ~doc ?(indent=false) () =
raw_saveDocumentToMemory ~this ~doc ~mode:(if indent then 1 else 0)
;;
external raw_saveDocumentToMemoryEnc :
this:TDOMImplementation.t ->
doc:[> `Document] GdomeT.t ->
encoding:string ->
mode:int ->
string = "ml_gdome_di_saveDocumentToMemoryEnc"
let saveDocumentToMemoryEnc ~this ~doc ~encoding ?(indent=false) () =
raw_saveDocumentToMemoryEnc ~this ~doc ~encoding ~mode:(if indent then 1 else 0)
;;
external enableEvent :
this:TDOMImplementation.t ->
doc:[> `Document] GdomeT.t ->
name:string ->
unit = "ml_gdome_di_enableEvent"
external disableEvent :
this:TDOMImplementation.t ->
doc:[> `Document] GdomeT.t ->
name:string ->
unit = "ml_gdome_di_disableEvent"
external eventIsEnabled :
this:TDOMImplementation.t ->
doc:[> `Document] GdomeT.t ->
name:string ->
bool = "ml_gdome_di_eventIsEnabled"
gmetadom-0.2.6/src/gdome_caml/events/ 0000777 0001750 0001750 00000000000 10704633452 014507 5 0000000 0000000 gmetadom-0.2.6/src/gdome_caml/events/iEvent.ml 0000644 0001750 0001750 00000004251 10704632505 016207 0000000 0000000
(* This file is part of GMetaDOM
* a generic bind package for the Document Object Model API.
* Copyright (C) 2001-2002 Luca Padovani
* 2002 Claudio Sacerdoti Coen
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
* For more information, please visit the project home page
* http://gmetadom.sourceforge.net
* or send an email to
*
* DO NOT EDIT: this file has been generated automatically by GMetaDOM
*)
external get_type : this:[> `Event] GdomeT.t -> TDOMString.t = "ml_gdome_evnt_get_type"
external get_target : this:[> `Event] GdomeT.t -> TEventTarget.t = "ml_gdome_evnt_get_target"
external get_currentTarget : this:[> `Event] GdomeT.t -> TEventTarget.t = "ml_gdome_evnt_get_currentTarget"
external get_eventPhase : this:[> `Event] GdomeT.t -> int = "ml_gdome_evnt_get_eventPhase"
external get_bubbles : this:[> `Event] GdomeT.t -> bool = "ml_gdome_evnt_get_bubbles"
external get_cancelable : this:[> `Event] GdomeT.t -> bool = "ml_gdome_evnt_get_cancelable"
external get_timeStamp : this:[> `Event] GdomeT.t -> TDOMTimeStamp.t = "ml_gdome_evnt_get_timeStamp"
external stopPropagation : this:[> `Event] GdomeT.t -> unit = "ml_gdome_evnt_stopPropagation"
external preventDefault : this:[> `Event] GdomeT.t -> unit = "ml_gdome_evnt_preventDefault"
external initEvent : this:[> `Event] GdomeT.t -> eventTypeArg:TDOMString.t -> canBubbleArg:bool -> cancelableArg:bool -> unit = "ml_gdome_evnt_initEvent" gmetadom-0.2.6/src/gdome_caml/events/iEventListener.ml 0000644 0001750 0001750 00000002305 07450042034 017707 0000000 0000000 (* This file is part of GMetaDOM
* a generic bind package for the Document Object Model API.
* Copyright (C) 2001-2002 Luca Padovani
* 2002 Claudio Sacerdoti Coen
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
* For more information, please visit the project home page
* http://gmetadom.sourceforge.net
* or send an email to
*)
external create : callback:(TEvent.t -> unit) -> TEventListener.t = "ml_gdome_evntl_create"
gmetadom-0.2.6/src/gdome_caml/events/.depend 0000644 0001750 0001750 00000000000 07421422006 015642 0000000 0000000 gmetadom-0.2.6/src/gdome_caml/events/ml_EventTarget.c 0000644 0001750 0001750 00000007035 10704632505 017512 0000000 0000000
/* This file is part of GMetaDOM
* a generic bind package for the Document Object Model API.
* Copyright (C) 2001-2002 Luca Padovani
* 2002 Claudio Sacerdoti Coen
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
* For more information, please visit the project home page
* http://gmetadom.sourceforge.net
* or send an email to
*
* DO NOT EDIT: this file has been generated automatically by GMetaDOM
*/
#include
#include
#include
#include
#include
#include "mlgdomevalue.h"
static void
ml_gdome_n_finalize(value v)
{
GdomeException exc_ = 0;
GdomeEventTarget* obj_ = EventTarget_val(v);
g_assert(obj_ != NULL);
gdome_n_unref(obj_, &exc_);
assert(exc_ == 0);
}
static int
ml_gdome_n_compare(value v1, value v2)
{
CAMLparam2(v1,v2);
GdomeEventTarget* obj1_ = EventTarget_val(v1);
GdomeEventTarget* obj2_ = EventTarget_val(v2);
CAMLreturn((int) (obj1_ - obj2_));
}
GdomeEventTarget*
EventTarget_val(value v)
{
GdomeEventTarget* res_ = *((GdomeEventTarget**) Data_custom_val(v));
g_assert(res_ != NULL);
return res_;
}
value
Val_EventTarget(GdomeEventTarget* obj)
{
static struct custom_operations ops = {
"http://gmetadom.sourceforge.net/gdome_caml/Events/EventTarget",
ml_gdome_n_finalize,
ml_gdome_n_compare,
custom_hash_default,
custom_serialize_default,
custom_deserialize_default
};
value v = alloc_custom(&ops, sizeof(GdomeEventTarget*), 0, 1);
g_assert(obj != NULL);
*((GdomeEventTarget**) Data_custom_val(v)) = obj;
return v;
}
value
ml_gdome_n_addEventListener(value self, value p_type, value p_listener, value p_useCapture)
{
CAMLparam4(self, p_type, p_listener, p_useCapture);
GdomeException exc_;
GdomeDOMString* p_type_ = DOMString_val(p_type);gdome_n_addEventListener(EventTarget_val(self), p_type_, EventListener_val(p_listener), Bool_val(p_useCapture), &exc_);
if (exc_ != 0) throw_exception(exc_, "EventTarget.addEventListener");
CAMLreturn(Val_unit);
}
value
ml_gdome_n_removeEventListener(value self, value p_type, value p_listener, value p_useCapture)
{
CAMLparam4(self, p_type, p_listener, p_useCapture);
GdomeException exc_;
GdomeDOMString* p_type_ = DOMString_val(p_type);gdome_n_removeEventListener(EventTarget_val(self), p_type_, EventListener_val(p_listener), Bool_val(p_useCapture), &exc_);
if (exc_ != 0) throw_exception(exc_, "EventTarget.removeEventListener");
CAMLreturn(Val_unit);
}
value
ml_gdome_n_dispatchEvent(value self, value p_evt)
{
CAMLparam2(self, p_evt);
GdomeException exc_;
GdomeBoolean res_;
res_ = gdome_n_dispatchEvent(EventTarget_val(self), Event_val(p_evt), &exc_);
if (exc_ != 0) throw_exception(exc_, "EventTarget.dispatchEvent");
CAMLreturn(Val_bool(res_));
}
gmetadom-0.2.6/src/gdome_caml/events/ml_MutationEvent.c 0000644 0001750 0001750 00000013057 10704632505 020065 0000000 0000000
/* This file is part of GMetaDOM
* a generic bind package for the Document Object Model API.
* Copyright (C) 2001-2002 Luca Padovani
* 2002 Claudio Sacerdoti Coen
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
* For more information, please visit the project home page
* http://gmetadom.sourceforge.net
* or send an email to
*
* DO NOT EDIT: this file has been generated automatically by GMetaDOM
*/
#include
#include
#include
#include
#include
#include "mlgdomevalue.h"
static void
ml_gdome_mevnt_finalize(value v)
{
GdomeException exc_ = 0;
GdomeMutationEvent* obj_ = MutationEvent_val(v);
g_assert(obj_ != NULL);
gdome_mevnt_unref(obj_, &exc_);
assert(exc_ == 0);
}
static int
ml_gdome_mevnt_compare(value v1, value v2)
{
CAMLparam2(v1,v2);
GdomeMutationEvent* obj1_ = MutationEvent_val(v1);
GdomeMutationEvent* obj2_ = MutationEvent_val(v2);
CAMLreturn((int) (obj1_ - obj2_));
}
GdomeMutationEvent*
MutationEvent_val(value v)
{
GdomeMutationEvent* res_ = *((GdomeMutationEvent**) Data_custom_val(v));
g_assert(res_ != NULL);
return res_;
}
value
Val_MutationEvent(GdomeMutationEvent* obj)
{
static struct custom_operations ops = {
"http://gmetadom.sourceforge.net/gdome_caml/Events/MutationEvent",
ml_gdome_mevnt_finalize,
ml_gdome_mevnt_compare,
custom_hash_default,
custom_serialize_default,
custom_deserialize_default
};
value v = alloc_custom(&ops, sizeof(GdomeMutationEvent*), 0, 1);
g_assert(obj != NULL);
*((GdomeMutationEvent**) Data_custom_val(v)) = obj;
return v;
}
value
ml_gdome_mevnt_of_evnt(value obj)
{
CAMLparam1(obj);
GdomeException exc_;
GdomeMutationEvent* obj_;
obj_ = gdome_cast_mevnt((GdomeEvent*) Event_val(obj));
if (obj_ == 0) throw_cast_exception("MutationEvent");
gdome_mevnt_ref(obj_, &exc_);
if (exc_ != 0) throw_exception(exc_, "MutationEvent casting from Event");
CAMLreturn(Val_MutationEvent(obj_));
}
value
ml_gdome_mevnt_get_relatedNode(value self)
{
CAMLparam1(self);
GdomeException exc_;
GdomeNode* res_;
res_ = gdome_mevnt_relatedNode(MutationEvent_val(self), &exc_);
if (exc_ != 0) throw_exception(exc_, "MutationEvent.get_relatedNode");
CAMLreturn(Val_option_ptr(res_,Val_Node));
}
value
ml_gdome_mevnt_get_prevValue(value self)
{
CAMLparam1(self);
GdomeException exc_;
GdomeDOMString* res_;
value res__;
res_ = gdome_mevnt_prevValue(MutationEvent_val(self), &exc_);
if (exc_ != 0) throw_exception(exc_, "MutationEvent.get_prevValue");
CAMLreturn(Val_option_ptr(res_,Val_DOMString));
}
value
ml_gdome_mevnt_get_newValue(value self)
{
CAMLparam1(self);
GdomeException exc_;
GdomeDOMString* res_;
value res__;
res_ = gdome_mevnt_newValue(MutationEvent_val(self), &exc_);
if (exc_ != 0) throw_exception(exc_, "MutationEvent.get_newValue");
CAMLreturn(Val_option_ptr(res_,Val_DOMString));
}
value
ml_gdome_mevnt_get_attrName(value self)
{
CAMLparam1(self);
GdomeException exc_;
GdomeDOMString* res_;
value res__;
res_ = gdome_mevnt_attrName(MutationEvent_val(self), &exc_);
if (exc_ != 0) throw_exception(exc_, "MutationEvent.get_attrName");
CAMLreturn(Val_option_ptr(res_,Val_DOMString));
}
value
ml_gdome_mevnt_get_attrChange(value self)
{
CAMLparam1(self);
GdomeException exc_;
unsigned short res_;
res_ = gdome_mevnt_attrChange(MutationEvent_val(self), &exc_);
if (exc_ != 0) throw_exception(exc_, "MutationEvent.get_attrChange");
CAMLreturn(Val_int(res_));
}
value
ml_gdome_mevnt_initMutationEvent(value self, value p_typeArg, value p_canBubbleArg, value p_cancelableArg, value p_relatedNodeArg, value p_prevValueArg, value p_newValueArg, value p_attrNameArg, value p_attrChangeArg)
{
CAMLparam5(self, p_typeArg, p_canBubbleArg, p_cancelableArg, p_relatedNodeArg);
CAMLxparam4(p_prevValueArg, p_newValueArg, p_attrNameArg, p_attrChangeArg);
GdomeException exc_;
GdomeDOMString* p_typeArg_ = DOMString_val(p_typeArg);
GdomeDOMString* p_prevValueArg_ = ptr_val_option(p_prevValueArg, DOMString_val);
GdomeDOMString* p_newValueArg_ = ptr_val_option(p_newValueArg, DOMString_val);
GdomeDOMString* p_attrNameArg_ = ptr_val_option(p_attrNameArg, DOMString_val);gdome_mevnt_initMutationEvent(MutationEvent_val(self), p_typeArg_, Bool_val(p_canBubbleArg), Bool_val(p_cancelableArg), ptr_val_option(p_relatedNodeArg,Node_val), p_prevValueArg_, p_newValueArg_, p_attrNameArg_, Int_val(p_attrChangeArg), &exc_);
if (exc_ != 0) throw_exception(exc_, "MutationEvent.initMutationEvent");
CAMLreturn(Val_unit);
}
value
ml_gdome_mevnt_initMutationEvent_bytecode(value *argv, int argn)
{
g_assert(argv != NULL);
return ml_gdome_mevnt_initMutationEvent(argv[0], argv[1], argv[2], argv[3], argv[4], argv[5], argv[6], argv[7], argv[8]);
}
gmetadom-0.2.6/src/gdome_caml/events/iEventTarget.ml 0000644 0001750 0001750 00000003177 10704632505 017364 0000000 0000000
(* This file is part of GMetaDOM
* a generic bind package for the Document Object Model API.
* Copyright (C) 2001-2002 Luca Padovani
* 2002 Claudio Sacerdoti Coen
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
* For more information, please visit the project home page
* http://gmetadom.sourceforge.net
* or send an email to
*
* DO NOT EDIT: this file has been generated automatically by GMetaDOM
*)
external addEventListener : this:[> `EventTarget] GdomeT.t -> typ:TDOMString.t -> listener:TEventListener.t -> useCapture:bool -> unit = "ml_gdome_n_addEventListener"
external removeEventListener : this:[> `EventTarget] GdomeT.t -> typ:TDOMString.t -> listener:TEventListener.t -> useCapture:bool -> unit = "ml_gdome_n_removeEventListener"
external dispatchEvent : this:[> `EventTarget] GdomeT.t -> evt:[> `Event] GdomeT.t -> bool = "ml_gdome_n_dispatchEvent" gmetadom-0.2.6/src/gdome_caml/events/Makefile.am 0000644 0001750 0001750 00000006227 10703700343 016457 0000000 0000000
OCAMLBUILDDIR = $(top_builddir)/src/gdome_caml
OCAMLINSTALLDIR = $(DESTDIR)$(OCAML_LIB_PREFIX)/gdome2
OCAMLFLAGS = -I $(OCAMLBUILDDIR)/types -I $(OCAMLBUILDDIR)/basic
OCAMLC = @OCAMLC@ ${OCAMLFLAGS}
OCAMLOPT = @OCAMLOPT@ ${OCAMLFLAGS}
OCAMLDEP = @OCAMLDEP@
OCAML_CFLAGS = @OCAML_CFLAGS@
AUTO_C = \
ml_EventTarget.c \
ml_Event.c \
ml_MutationEvent.c
I_AUTO_ML = \
iEventTarget.ml \
iEvent.ml \
iMutationEvent.ml
# OCaml objects
OCAML_OBJECTS = \
$(I_AUTO_ML:%.ml=%.cmo) \
$(I_AUTO_ML:%.ml=%.cmi) \
$(I_AUTO_ML:%.ml=%.cmx) \
$(I_AUTO_ML:%.ml=%.o)
BUILT_SOURCES = $(AUTO_C) $(I_AUTO_ML)
MAINTAINERCLEANFILES = \
$(AUTO_C) \
$(I_AUTO_ML)
CLEANFILES = \
$(OCAML_OBJECTS) \
iEventListener.cmi iEventListener.cmo iEventListener.cmx iEventListener.o
## CLEANFILES = \
## $(AUTO_C) \
## $(I_AUTO_ML) \
## $(OCAML_OBJECTS) \
## mlevents.cma mlevents.cmxa mlevents.a \
## iEventListener.cmi iEventListener.cmo iEventListener.cmx iEventListener.o
EXTRA_DIST = \
$(AUTO_C) \
$(I_AUTO_ML) \
iEventListener.ml \
.depend \
.linkorder
XML2C = $(srcdir)/../xsl/xml2c.xsl
XML2MLI = $(srcdir)/../xsl/xml2mli.xsl
## if HAVE_OCAMLOPT_COND
## noinst_DATA = mlevents.cma mlevents.cmxa mlevents.a
## else
## noinst_DATA = mlevents.cma
## endif
if HAVE_OCAMLOPT_COND
noinst_DATA = $(I_AUTO_ML:%.ml=%.cmo) $(I_AUTO_ML:%.ml=%.cmx) iEventListener.cmo iEventListener.cmx
else
noinst_DATA = $(I_AUTO_ML:%.ml=%.cmo) iEventListener.cmo
endif
## mlevents.cma : iEventListener.cmo $(I_AUTO_ML:%.ml=%.cmo)
## $(OCAMLC) -o $@ -a $^
##
## mlevents.cmxa mlevents.a : iEventListener.cmx $(I_AUTO_ML:%.ml=%.cmx)
## $(OCAMLOPT) -o $@ -a $^
noinst_LTLIBRARIES = libevents.la
libevents_la_SOURCES = \
$(AUTO_C) \
ml_EventListener.c
$(AUTO_C) : $(XML2C)
$(I_AUTO_ML) : $(XML2MLI)
if HAVE_XSLTPROC_COND
ml_%.c : $(top_srcdir)/xml/DOM/Events/%.xml
$(XSLTPROC) --param module "'Events'" --param uriprefix "'$(top_srcdir)/xml/DOM/Events'" --param annotations "'$(srcdir)/../xml/Events/$*.xml'" $(XML2C) $< >$@
i%.ml : $(top_srcdir)/xml/DOM/Events/%.xml $(srcdir)/../xml/Events/%.xml
$(XSLTPROC) --param module "'Events'" --param uriprefix "'$(top_srcdir)/xml/DOM/Events'" --param annotations "'$(srcdir)/../xml/Events/$*.xml'" $(XML2MLI) $< >$@
endif
INCLUDES = \
$(OCAML_CFLAGS) \
$(GDOME_CFLAGS) \
-I$(srcdir)/../include
install-data-local: $(I_AUTO_ML:%.ml=%.cmi)
$(mkinstalldirs) $(OCAMLINSTALLDIR)
for i in $^; do \
$(INSTALL_DATA) $$i $(OCAMLINSTALLDIR); \
done
for i in $(I_AUTO_ML); do \
$(INSTALL_DATA) $(srcdir)/$$i $(OCAMLINSTALLDIR); \
done
#### OCaml only stuff from now on
DEPOBJS = $(I_AUTO_ML)
LINKORDER = iEventListener iEventTarget iEvent iMutationEvent
depend:
$(OCAMLDEP) $(DEPOBJS) > .depend
echo "$(LINKORDER)" > .linkorder
%.cmi : $(srcdir)/%.mli
if test ! -e $(@:%.cmi=%.mli) -a "x$(srcdir)" != "x." ; then $(LN_S) $< . ; fi
$(OCAMLC) -c $(@:%.cmi=%.mli)
%.cmo : $(srcdir)/%.ml
if test ! -e $(@:%.cmo=%.ml) -a "x$(srcdir)" != "x." ; then $(LN_S) $< . ; fi
$(OCAMLC) -c $(@:%.cmo=%.ml)
%.cmx %.o : $(srcdir)/%.ml
if test ! -e $(@:%.cmx=%.ml) -a "x$(srcdir)" != "x." ; then $(LN_S) $< . ; fi
$(OCAMLOPT) -c $(@:%.cmx=%.ml)
include .depend
gmetadom-0.2.6/src/gdome_caml/events/iMutationEvent.ml 0000644 0001750 0001750 00000004302 10704632505 017725 0000000 0000000
(* This file is part of GMetaDOM
* a generic bind package for the Document Object Model API.
* Copyright (C) 2001-2002 Luca Padovani
* 2002 Claudio Sacerdoti Coen
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
* For more information, please visit the project home page
* http://gmetadom.sourceforge.net
* or send an email to
*
* DO NOT EDIT: this file has been generated automatically by GMetaDOM
*)
external of_Event : [> `Event] GdomeT.t -> TMutationEvent.t = "ml_gdome_mevnt_of_evnt"
external get_relatedNode : this:[> `MutationEvent] GdomeT.t -> TNode.t option = "ml_gdome_mevnt_get_relatedNode"
external get_prevValue : this:[> `MutationEvent] GdomeT.t -> TDOMString.t option = "ml_gdome_mevnt_get_prevValue"
external get_newValue : this:[> `MutationEvent] GdomeT.t -> TDOMString.t option = "ml_gdome_mevnt_get_newValue"
external get_attrName : this:[> `MutationEvent] GdomeT.t -> TDOMString.t option = "ml_gdome_mevnt_get_attrName"
external get_attrChange : this:[> `MutationEvent] GdomeT.t -> int = "ml_gdome_mevnt_get_attrChange"
external initMutationEvent : this:[> `MutationEvent] GdomeT.t -> typeArg:TDOMString.t -> canBubbleArg:bool -> cancelableArg:bool -> relatedNodeArg:[> `Node] GdomeT.t option -> prevValueArg:TDOMString.t option -> newValueArg:TDOMString.t option -> attrNameArg:TDOMString.t option -> attrChangeArg:int option -> unit = "ml_gdome_mevnt_initMutationEvent" "ml_gdome_mevnt_initMutationEvent" gmetadom-0.2.6/src/gdome_caml/events/ml_EventListener.c 0000644 0001750 0001750 00000006225 07634554646 020072 0000000 0000000 /* This file is part of GMetaDOM
* a generic bind package for the Document Object Model API.
* Copyright (C) 2001-2002 Luca Padovani
* 2002 Claudio Sacerdoti Coen
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
* For more information, please visit the project home page
* http://gmetadom.sourceforge.net
* or send an email to
*/
#include
#include
#include
#include
#include
#include
#include "mlgdomevalue.h"
static void
ml_gdome_evntl_callback(GdomeEventListener* self, GdomeEvent* event, GdomeException* exc)
{
GdomeException exc_ = 0;
value* cb;
g_return_if_fail(self != NULL);
g_return_if_fail(event != NULL);
g_return_if_fail(exc != NULL);
cb = gdome_evntl_get_priv(self);
g_return_if_fail(cb != NULL);
gdome_evnt_ref(event, &exc_);
g_assert(exc_ == 0);
/* we don't care about exception because the Ocaml mechanism
* is exactly what we want
*/
callback(*cb, Val_Event(event));
}
static void
ml_gdome_evntl_priv_callback(GdomeEventListener* self)
{
value* cb = gdome_evntl_get_priv(self);
g_assert(cb != NULL);
remove_global_root(cb);
g_free(cb);
}
static void
ml_gdome_evntl_finalize(value v)
{
value* cb;
GdomeException exc_;
GdomeEventListener* listener = EventListener_val(v);
g_assert(listener != NULL);
cb = gdome_evntl_get_priv(listener);
g_assert(cb != NULL);
gdome_evntl_unref(listener, &exc_);
g_assert(exc_ == 0);
}
value
ml_gdome_evntl_create(value callback)
{
CAMLparam1(callback);
static struct custom_operations ops = {
"http://gmetadom.sourceforge.net/gdome_caml/events/EventListener",
ml_gdome_evntl_finalize,
custom_compare_default,
custom_hash_default,
custom_serialize_default,
custom_deserialize_default
};
// the following version uses the deprecated priv field for storing
// the callback value !
value* cb = g_new(value, 1);
value v = alloc_custom(&ops, sizeof(GdomeEventListener*), 0, 1);
GdomeEventListener* listener = *((GdomeEventListener**) Data_custom_val(v)) = gdome_evntl_aux_mkref(ml_gdome_evntl_callback, cb,
ml_gdome_evntl_priv_callback);
*cb = callback;
register_global_root(cb);
CAMLreturn(v);
}
GdomeEventListener*
EventListener_val(value v)
{
GdomeEventListener* listener = *((GdomeEventListener**) Data_custom_val(v));
g_assert(listener != NULL);
return listener;
}
gmetadom-0.2.6/src/gdome_caml/events/.linkorder 0000644 0001750 0001750 00000000062 07574131677 016430 0000000 0000000 iEventListener iEventTarget iEvent iMutationEvent
gmetadom-0.2.6/src/gdome_caml/events/Makefile.in 0000644 0001750 0001750 00000042313 10704633017 016470 0000000 0000000 # Makefile.in generated by automake 1.9.6 from Makefile.am.
# @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
# 2003, 2004, 2005 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE.
@SET_MAKE@
srcdir = @srcdir@
top_srcdir = @top_srcdir@
VPATH = @srcdir@
pkgdatadir = $(datadir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
top_builddir = ../../..
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
INSTALL = @INSTALL@
install_sh_DATA = $(install_sh) -c -m 644
install_sh_PROGRAM = $(install_sh) -c
install_sh_SCRIPT = $(install_sh) -c
INSTALL_HEADER = $(INSTALL_DATA)
transform = $(program_transform_name)
NORMAL_INSTALL = :
PRE_INSTALL = :
POST_INSTALL = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
build_triplet = @build@
host_triplet = @host@
DIST_COMMON = $(srcdir)/.depend $(srcdir)/Makefile.am \
$(srcdir)/Makefile.in
subdir = src/gdome_caml/events
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
mkinstalldirs = $(install_sh) -d
CONFIG_HEADER = $(top_builddir)/config.h
CONFIG_CLEAN_FILES =
LTLIBRARIES = $(noinst_LTLIBRARIES)
libevents_la_LIBADD =
am__objects_1 = ml_EventTarget.lo ml_Event.lo ml_MutationEvent.lo
am_libevents_la_OBJECTS = $(am__objects_1) ml_EventListener.lo
libevents_la_OBJECTS = $(am_libevents_la_OBJECTS)
DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)
depcomp = $(SHELL) $(top_srcdir)/depcomp
am__depfiles_maybe = depfiles
COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
LTCOMPILE = $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) \
$(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
$(AM_CFLAGS) $(CFLAGS)
CCLD = $(CC)
LINK = $(LIBTOOL) --tag=CC --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
$(AM_LDFLAGS) $(LDFLAGS) -o $@
SOURCES = $(libevents_la_SOURCES)
DIST_SOURCES = $(libevents_la_SOURCES)
DATA = $(noinst_DATA)
ETAGS = etags
CTAGS = ctags
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@
ALL_TRAITS = @ALL_TRAITS@
AMDEP_FALSE = @AMDEP_FALSE@
AMDEP_TRUE = @AMDEP_TRUE@
AMTAR = @AMTAR@
AR = @AR@
AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
CHAR_UNSIGNED = @CHAR_UNSIGNED@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
CXX = @CXX@
CXXCPP = @CXXCPP@
CXXDEPMODE = @CXXDEPMODE@
CXXFLAGS = @CXXFLAGS@
CYGPATH_W = @CYGPATH_W@
DEFS = @DEFS@
DEPDIR = @DEPDIR@
ECHO = @ECHO@
ECHO_C = @ECHO_C@
ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
EGREP = @EGREP@
EXEEXT = @EXEEXT@
F77 = @F77@
FFLAGS = @FFLAGS@
GDOME_CFLAGS = @GDOME_CFLAGS@
GDOME_LIBS = @GDOME_LIBS@
GMETADOM_MODULES = @GMETADOM_MODULES@
GMETADOM_SIZEOF_CHAR = @GMETADOM_SIZEOF_CHAR@
GMETADOM_SIZEOF_INT = @GMETADOM_SIZEOF_INT@
GMETADOM_SIZEOF_LONG = @GMETADOM_SIZEOF_LONG@
GMETADOM_SIZEOF_LONG_LONG = @GMETADOM_SIZEOF_LONG_LONG@
GMETADOM_SIZEOF_SHORT = @GMETADOM_SIZEOF_SHORT@
GMETADOM_SIZEOF_WCHAR_T = @GMETADOM_SIZEOF_WCHAR_T@
GMETADOM_VERSION_INFO = @GMETADOM_VERSION_INFO@
GREP = @GREP@
HAVE_ICONV = @HAVE_ICONV@
HAVE_OCAMLC = @HAVE_OCAMLC@
HAVE_OCAMLDEP = @HAVE_OCAMLDEP@
HAVE_OCAMLFIND = @HAVE_OCAMLFIND@
HAVE_OCAMLOPT = @HAVE_OCAMLOPT@
HAVE_OCAMLOPT_COND_FALSE = @HAVE_OCAMLOPT_COND_FALSE@
HAVE_OCAMLOPT_COND_TRUE = @HAVE_OCAMLOPT_COND_TRUE@
HAVE_SED = @HAVE_SED@
HAVE_SED_COND_FALSE = @HAVE_SED_COND_FALSE@
HAVE_SED_COND_TRUE = @HAVE_SED_COND_TRUE@
HAVE_XSLTPROC = @HAVE_XSLTPROC@
HAVE_XSLTPROC_COND_FALSE = @HAVE_XSLTPROC_COND_FALSE@
HAVE_XSLTPROC_COND_TRUE = @HAVE_XSLTPROC_COND_TRUE@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
LDFLAGS = @LDFLAGS@
LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
LIBTOOL = @LIBTOOL@
LN_S = @LN_S@
LTLIBOBJS = @LTLIBOBJS@
MAKEINFO = @MAKEINFO@
OBJEXT = @OBJEXT@
OCAMLC = @OCAMLC@ ${OCAMLFLAGS}
OCAMLDEP = @OCAMLDEP@
OCAMLFIND = @OCAMLFIND@
OCAMLOPT = @OCAMLOPT@ ${OCAMLFLAGS}
OCAML_CFLAGS = @OCAML_CFLAGS@
OCAML_LIB_PREFIX = @OCAML_LIB_PREFIX@
PACKAGE = @PACKAGE@
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
PACKAGE_NAME = @PACKAGE_NAME@
PACKAGE_STRING = @PACKAGE_STRING@
PACKAGE_TARNAME = @PACKAGE_TARNAME@
PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@
PKG_CONFIG = @PKG_CONFIG@
RANLIB = @RANLIB@
SED = @SED@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
STD_TRAITS = @STD_TRAITS@
STRIP = @STRIP@
TRAIT_SPEC = @TRAIT_SPEC@
VERSION = @VERSION@
XSLTPROC = @XSLTPROC@
ac_ct_CC = @ac_ct_CC@
ac_ct_CXX = @ac_ct_CXX@
ac_ct_F77 = @ac_ct_F77@
am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@
am__include = @am__include@
am__leading_dot = @am__leading_dot@
am__quote = @am__quote@
am__tar = @am__tar@
am__untar = @am__untar@
bindir = @bindir@
build = @build@
build_alias = @build_alias@
build_cpu = @build_cpu@
build_os = @build_os@
build_vendor = @build_vendor@
datadir = @datadir@
datarootdir = @datarootdir@
docdir = @docdir@
dvidir = @dvidir@
exec_prefix = @exec_prefix@
host = @host@
host_alias = @host_alias@
host_cpu = @host_cpu@
host_os = @host_os@
host_vendor = @host_vendor@
htmldir = @htmldir@
includedir = @includedir@
infodir = @infodir@
install_sh = @install_sh@
libdir = @libdir@
libexecdir = @libexecdir@
localedir = @localedir@
localstatedir = @localstatedir@
mandir = @mandir@
mkdir_p = @mkdir_p@
oldincludedir = @oldincludedir@
pdfdir = @pdfdir@
prefix = @prefix@
program_transform_name = @program_transform_name@
psdir = @psdir@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
sysconfdir = @sysconfdir@
target_alias = @target_alias@
OCAMLBUILDDIR = $(top_builddir)/src/gdome_caml
OCAMLINSTALLDIR = $(DESTDIR)$(OCAML_LIB_PREFIX)/gdome2
OCAMLFLAGS = -I $(OCAMLBUILDDIR)/types -I $(OCAMLBUILDDIR)/basic
AUTO_C = \
ml_EventTarget.c \
ml_Event.c \
ml_MutationEvent.c
I_AUTO_ML = \
iEventTarget.ml \
iEvent.ml \
iMutationEvent.ml
# OCaml objects
OCAML_OBJECTS = \
$(I_AUTO_ML:%.ml=%.cmo) \
$(I_AUTO_ML:%.ml=%.cmi) \
$(I_AUTO_ML:%.ml=%.cmx) \
$(I_AUTO_ML:%.ml=%.o)
BUILT_SOURCES = $(AUTO_C) $(I_AUTO_ML)
MAINTAINERCLEANFILES = \
$(AUTO_C) \
$(I_AUTO_ML)
CLEANFILES = \
$(OCAML_OBJECTS) \
iEventListener.cmi iEventListener.cmo iEventListener.cmx iEventListener.o
EXTRA_DIST = \
$(AUTO_C) \
$(I_AUTO_ML) \
iEventListener.ml \
.depend \
.linkorder
XML2C = $(srcdir)/../xsl/xml2c.xsl
XML2MLI = $(srcdir)/../xsl/xml2mli.xsl
@HAVE_OCAMLOPT_COND_FALSE@noinst_DATA = $(I_AUTO_ML:%.ml=%.cmo) iEventListener.cmo
@HAVE_OCAMLOPT_COND_TRUE@noinst_DATA = $(I_AUTO_ML:%.ml=%.cmo) $(I_AUTO_ML:%.ml=%.cmx) iEventListener.cmo iEventListener.cmx
noinst_LTLIBRARIES = libevents.la
libevents_la_SOURCES = \
$(AUTO_C) \
ml_EventListener.c
INCLUDES = \
$(OCAML_CFLAGS) \
$(GDOME_CFLAGS) \
-I$(srcdir)/../include
#### OCaml only stuff from now on
DEPOBJS = $(I_AUTO_ML)
LINKORDER = iEventListener iEventTarget iEvent iMutationEvent
all: $(BUILT_SOURCES)
$(MAKE) $(AM_MAKEFLAGS) all-am
.SUFFIXES:
.SUFFIXES: .c .lo .o .obj
$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(srcdir)/.depend $(am__configure_deps)
@for dep in $?; do \
case '$(am__configure_deps)' in \
*$$dep*) \
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
&& exit 0; \
exit 1;; \
esac; \
done; \
echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/gdome_caml/events/Makefile'; \
cd $(top_srcdir) && \
$(AUTOMAKE) --gnu src/gdome_caml/events/Makefile
.PRECIOUS: Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
@case '$?' in \
*config.status*) \
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
*) \
echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
esac;
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(top_srcdir)/configure: $(am__configure_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(ACLOCAL_M4): $(am__aclocal_m4_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
clean-noinstLTLIBRARIES:
-test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES)
@list='$(noinst_LTLIBRARIES)'; for p in $$list; do \
dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \
test "$$dir" != "$$p" || dir=.; \
echo "rm -f \"$${dir}/so_locations\""; \
rm -f "$${dir}/so_locations"; \
done
libevents.la: $(libevents_la_OBJECTS) $(libevents_la_DEPENDENCIES)
$(LINK) $(libevents_la_LDFLAGS) $(libevents_la_OBJECTS) $(libevents_la_LIBADD) $(LIBS)
mostlyclean-compile:
-rm -f *.$(OBJEXT)
distclean-compile:
-rm -f *.tab.c
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ml_Event.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ml_EventListener.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ml_EventTarget.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ml_MutationEvent.Plo@am__quote@
.c.o:
@am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(COMPILE) -c $<
.c.obj:
@am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \
@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'`
.c.lo:
@am__fastdepCC_TRUE@ if $(LTCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Plo"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $<
mostlyclean-libtool:
-rm -f *.lo
clean-libtool:
-rm -rf .libs _libs
distclean-libtool:
-rm -f libtool
uninstall-info-am:
ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
$(AWK) ' { files[$$0] = 1; } \
END { for (i in files) print i; }'`; \
mkid -fID $$unique
tags: TAGS
TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
$(TAGS_FILES) $(LISP)
tags=; \
here=`pwd`; \
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
$(AWK) ' { files[$$0] = 1; } \
END { for (i in files) print i; }'`; \
if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
test -n "$$unique" || unique=$$empty_fix; \
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
$$tags $$unique; \
fi
ctags: CTAGS
CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
$(TAGS_FILES) $(LISP)
tags=; \
here=`pwd`; \
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
$(AWK) ' { files[$$0] = 1; } \
END { for (i in files) print i; }'`; \
test -z "$(CTAGS_ARGS)$$tags$$unique" \
|| $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
$$tags $$unique
GTAGS:
here=`$(am__cd) $(top_builddir) && pwd` \
&& cd $(top_srcdir) \
&& gtags -i $(GTAGS_ARGS) $$here
distclean-tags:
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
distdir: $(DISTFILES)
@srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
list='$(DISTFILES)'; for file in $$list; do \
case $$file in \
$(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
$(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
esac; \
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
if test "$$dir" != "$$file" && test "$$dir" != "."; then \
dir="/$$dir"; \
$(mkdir_p) "$(distdir)$$dir"; \
else \
dir=''; \
fi; \
if test -d $$d/$$file; then \
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
fi; \
cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
else \
test -f $(distdir)/$$file \
|| cp -p $$d/$$file $(distdir)/$$file \
|| exit 1; \
fi; \
done
check-am: all-am
check: $(BUILT_SOURCES)
$(MAKE) $(AM_MAKEFLAGS) check-am
all-am: Makefile $(LTLIBRARIES) $(DATA)
installdirs:
install: $(BUILT_SOURCES)
$(MAKE) $(AM_MAKEFLAGS) install-am
install-exec: install-exec-am
install-data: install-data-am
uninstall: uninstall-am
install-am: all-am
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
installcheck: installcheck-am
install-strip:
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
`test -z '$(STRIP)' || \
echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
mostlyclean-generic:
clean-generic:
-test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
distclean-generic:
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
maintainer-clean-generic:
@echo "This command is intended for maintainers to use"
@echo "it deletes files that may require special tools to rebuild."
-test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES)
-test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES)
clean: clean-am
clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \
mostlyclean-am
distclean: distclean-am
-rm -rf ./$(DEPDIR)
-rm -f Makefile
distclean-am: clean-am distclean-compile distclean-generic \
distclean-libtool distclean-tags
dvi: dvi-am
dvi-am:
html: html-am
info: info-am
info-am:
install-data-am: install-data-local
install-exec-am:
install-info: install-info-am
install-man:
installcheck-am:
maintainer-clean: maintainer-clean-am
-rm -rf ./$(DEPDIR)
-rm -f Makefile
maintainer-clean-am: distclean-am maintainer-clean-generic
mostlyclean: mostlyclean-am
mostlyclean-am: mostlyclean-compile mostlyclean-generic \
mostlyclean-libtool
pdf: pdf-am
pdf-am:
ps: ps-am
ps-am:
uninstall-am: uninstall-info-am
.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
clean-libtool clean-noinstLTLIBRARIES ctags distclean \
distclean-compile distclean-generic distclean-libtool \
distclean-tags distdir dvi dvi-am html html-am info info-am \
install install-am install-data install-data-am \
install-data-local install-exec install-exec-am install-info \
install-info-am install-man install-strip installcheck \
installcheck-am installdirs maintainer-clean \
maintainer-clean-generic mostlyclean mostlyclean-compile \
mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
tags uninstall uninstall-am uninstall-info-am
$(AUTO_C) : $(XML2C)
$(I_AUTO_ML) : $(XML2MLI)
@HAVE_XSLTPROC_COND_TRUE@ml_%.c : $(top_srcdir)/xml/DOM/Events/%.xml
@HAVE_XSLTPROC_COND_TRUE@ $(XSLTPROC) --param module "'Events'" --param uriprefix "'$(top_srcdir)/xml/DOM/Events'" --param annotations "'$(srcdir)/../xml/Events/$*.xml'" $(XML2C) $< >$@
@HAVE_XSLTPROC_COND_TRUE@i%.ml : $(top_srcdir)/xml/DOM/Events/%.xml $(srcdir)/../xml/Events/%.xml
@HAVE_XSLTPROC_COND_TRUE@ $(XSLTPROC) --param module "'Events'" --param uriprefix "'$(top_srcdir)/xml/DOM/Events'" --param annotations "'$(srcdir)/../xml/Events/$*.xml'" $(XML2MLI) $< >$@
install-data-local: $(I_AUTO_ML:%.ml=%.cmi)
$(mkinstalldirs) $(OCAMLINSTALLDIR)
for i in $^; do \
$(INSTALL_DATA) $$i $(OCAMLINSTALLDIR); \
done
for i in $(I_AUTO_ML); do \
$(INSTALL_DATA) $(srcdir)/$$i $(OCAMLINSTALLDIR); \
done
depend:
$(OCAMLDEP) $(DEPOBJS) > .depend
echo "$(LINKORDER)" > .linkorder
%.cmi : $(srcdir)/%.mli
if test ! -e $(@:%.cmi=%.mli) -a "x$(srcdir)" != "x." ; then $(LN_S) $< . ; fi
$(OCAMLC) -c $(@:%.cmi=%.mli)
%.cmo : $(srcdir)/%.ml
if test ! -e $(@:%.cmo=%.ml) -a "x$(srcdir)" != "x." ; then $(LN_S) $< . ; fi
$(OCAMLC) -c $(@:%.cmo=%.ml)
%.cmx %.o : $(srcdir)/%.ml
if test ! -e $(@:%.cmx=%.ml) -a "x$(srcdir)" != "x." ; then $(LN_S) $< . ; fi
$(OCAMLOPT) -c $(@:%.cmx=%.ml)
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:
gmetadom-0.2.6/src/gdome_caml/events/ml_Event.c 0000644 0001750 0001750 00000012214 10704632505 016336 0000000 0000000
/* This file is part of GMetaDOM
* a generic bind package for the Document Object Model API.
* Copyright (C) 2001-2002 Luca Padovani
* 2002 Claudio Sacerdoti Coen
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
* For more information, please visit the project home page
* http://gmetadom.sourceforge.net
* or send an email to
*
* DO NOT EDIT: this file has been generated automatically by GMetaDOM
*/
#include
#include
#include
#include
#include
#include "mlgdomevalue.h"
static void
ml_gdome_evnt_finalize(value v)
{
GdomeException exc_ = 0;
GdomeEvent* obj_ = Event_val(v);
g_assert(obj_ != NULL);
gdome_evnt_unref(obj_, &exc_);
assert(exc_ == 0);
}
static int
ml_gdome_evnt_compare(value v1, value v2)
{
CAMLparam2(v1,v2);
GdomeEvent* obj1_ = Event_val(v1);
GdomeEvent* obj2_ = Event_val(v2);
CAMLreturn((int) (obj1_ - obj2_));
}
GdomeEvent*
Event_val(value v)
{
GdomeEvent* res_ = *((GdomeEvent**) Data_custom_val(v));
g_assert(res_ != NULL);
return res_;
}
value
Val_Event(GdomeEvent* obj)
{
static struct custom_operations ops = {
"http://gmetadom.sourceforge.net/gdome_caml/Events/Event",
ml_gdome_evnt_finalize,
ml_gdome_evnt_compare,
custom_hash_default,
custom_serialize_default,
custom_deserialize_default
};
value v = alloc_custom(&ops, sizeof(GdomeEvent*), 0, 1);
g_assert(obj != NULL);
*((GdomeEvent**) Data_custom_val(v)) = obj;
return v;
}
value
ml_gdome_evnt_get_type(value self)
{
CAMLparam1(self);
GdomeException exc_;
GdomeDOMString* res_;
value res__;
res_ = gdome_evnt_type(Event_val(self), &exc_);
if (exc_ != 0) throw_exception(exc_, "Event.get_type");
g_assert(res_ != NULL);
CAMLreturn(Val_DOMString(res_));
}
value
ml_gdome_evnt_get_target(value self)
{
CAMLparam1(self);
GdomeException exc_;
GdomeEventTarget* res_;
res_ = gdome_evnt_target(Event_val(self), &exc_);
if (exc_ != 0) throw_exception(exc_, "Event.get_target");
g_assert(res_ != NULL);
CAMLreturn(Val_EventTarget(res_));
}
value
ml_gdome_evnt_get_currentTarget(value self)
{
CAMLparam1(self);
GdomeException exc_;
GdomeEventTarget* res_;
res_ = gdome_evnt_currentTarget(Event_val(self), &exc_);
if (exc_ != 0) throw_exception(exc_, "Event.get_currentTarget");
g_assert(res_ != NULL);
CAMLreturn(Val_EventTarget(res_));
}
value
ml_gdome_evnt_get_eventPhase(value self)
{
CAMLparam1(self);
GdomeException exc_;
unsigned short res_;
res_ = gdome_evnt_eventPhase(Event_val(self), &exc_);
if (exc_ != 0) throw_exception(exc_, "Event.get_eventPhase");
CAMLreturn(Val_int(res_));
}
value
ml_gdome_evnt_get_bubbles(value self)
{
CAMLparam1(self);
GdomeException exc_;
GdomeBoolean res_;
res_ = gdome_evnt_bubbles(Event_val(self), &exc_);
if (exc_ != 0) throw_exception(exc_, "Event.get_bubbles");
CAMLreturn(Val_bool(res_));
}
value
ml_gdome_evnt_get_cancelable(value self)
{
CAMLparam1(self);
GdomeException exc_;
GdomeBoolean res_;
res_ = gdome_evnt_cancelable(Event_val(self), &exc_);
if (exc_ != 0) throw_exception(exc_, "Event.get_cancelable");
CAMLreturn(Val_bool(res_));
}
value
ml_gdome_evnt_get_timeStamp(value self)
{
CAMLparam1(self);
GdomeException exc_;
GdomeDOMTimeStamp res_;
res_ = gdome_evnt_timeStamp(Event_val(self), &exc_);
if (exc_ != 0) throw_exception(exc_, "Event.get_timeStamp");
CAMLreturn(Val_long(res_));
}
value
ml_gdome_evnt_stopPropagation(value self)
{
CAMLparam1(self);
GdomeException exc_;
gdome_evnt_stopPropagation(Event_val(self), &exc_);
if (exc_ != 0) throw_exception(exc_, "Event.stopPropagation");
CAMLreturn(Val_unit);
}
value
ml_gdome_evnt_preventDefault(value self)
{
CAMLparam1(self);
GdomeException exc_;
gdome_evnt_preventDefault(Event_val(self), &exc_);
if (exc_ != 0) throw_exception(exc_, "Event.preventDefault");
CAMLreturn(Val_unit);
}
value
ml_gdome_evnt_initEvent(value self, value p_eventTypeArg, value p_canBubbleArg, value p_cancelableArg)
{
CAMLparam4(self, p_eventTypeArg, p_canBubbleArg, p_cancelableArg);
GdomeException exc_;
GdomeDOMString* p_eventTypeArg_ = DOMString_val(p_eventTypeArg);gdome_evnt_initEvent(Event_val(self), p_eventTypeArg_, Bool_val(p_canBubbleArg), Bool_val(p_cancelableArg), &exc_);
if (exc_ != 0) throw_exception(exc_, "Event.initEvent");
CAMLreturn(Val_unit);
}
gmetadom-0.2.6/src/gdome_caml/Makefile.am 0000644 0001750 0001750 00000007312 10465324540 015155 0000000 0000000
SUBDIRS = xsl xml include types basic core events . ocaml test
ARCHIVE = mlgdome
PKGNAME = gdome2
OCAMLBUILDDIR = $(top_builddir)/src/gdome_caml
OCAMLINSTALLDIR = $(DESTDIR)$(OCAML_LIB_PREFIX)/$(PKGNAME)
STUBSDIR = $(DESTDIR)$(OCAML_LIB_PREFIX)/stublibs
OCAMLFLAGS = \
-I $(OCAMLBUILDDIR)/types \
-I $(OCAMLBUILDDIR)/core \
-I $(OCAMLBUILDDIR)/basic
OCAMLC = @OCAMLC@ ${OCAMLFLAGS}
OCAMLOPT = @OCAMLOPT@ ${OCAMLFLAGS}
OCAMLDEP = @OCAMLDEP@
OCAML_CFLAGS = @OCAML_CFLAGS@
OCAMLFIND = @OCAMLFIND@
OCAMLMKLIB = ocamlmklib
DLL = dll$(ARCHIVE).so
CLEANFILES = \
$(ARCHIVE).cma $(ARCHIVE).cmxa $(ARCHIVE).a lib$(ARCHIVE).a \
iDOMImplementation.cmi iDOMImplementation.cmo \
iDOMImplementation.cmx iDOMImplementation.o \
$(DLL)
EXTRA_DIST = \
META.in iDOMImplementation.ml iDOMImplementation.mli \
.depend .linkorder \
examples/Makefile \
examples/test.ml \
examples/hi.xml \
doc/index.html
if HAVE_OCAMLOPT_COND
noinst_DATA = $(ARCHIVE).cma $(ARCHIVE).cmxa $(ARCHIVE).a $(DLL)
else
noinst_DATA = $(ARCHIVE).cma $(DLL)
endif
noinst_LTLIBRARIES = libmlgdome.la
libmlgdome_la_SOURCES = ml_DOMImplementation.c
LIB_DEPS = \
$(patsubst %, basic/%, $(shell cat $(srcdir)/basic/.linkorder)) \
$(patsubst %, core/%, $(shell cat $(srcdir)/core/.linkorder)) \
$(patsubst %, events/%, $(shell cat $(srcdir)/events/.linkorder)) \
$(shell cat $(srcdir)/.linkorder)
O_S = \
$(patsubst basic/%.c, basic/.libs/%.o, $(wildcard basic/ml_*.c)) \
$(patsubst core/%.c, core/.libs/%.o, $(wildcard core/ml_*.c)) \
$(patsubst events/%.c, events/.libs/%.o, $(wildcard events/ml_*.c)) \
$(patsubst %.c, .libs/%.o, $(wildcard ml_*.c))
LO_S = $(patsubst %.o, %.lo, $(O_S))
CMA_DEPS = $(LIB_DEPS:%=%.cmo)
CMXA_DEPS = $(LIB_DEPS:%=%.cmx)
$(ARCHIVE).cma: $(CMA_DEPS) iDOMImplementation.cmo
$(OCAMLMKLIB) -o $(ARCHIVE) $^ $(GDOME_LIBS)
$(ARCHIVE).cmxa: $(CMXA_DEPS) iDOMImplementation.cmx
$(OCAMLMKLIB) -o $(ARCHIVE) $^ $(GDOME_LIBS)
lib$(ARCHIVE).a $(DLL): $(O_S)
$(OCAMLMKLIB) -o $(ARCHIVE) $^ $(GDOME_LIBS)
INCLUDES = $(OCAML_CFLAGS) $(GDOME_CFLAGS) -I$(srcdir)/include
NULL =
BYTE_INST = iDOMImplementation.cmi iDOMImplementation.ml iDOMImplementation.mli $(ARCHIVE).cma lib$(ARCHIVE).a $(DLL)
OPT_INST = $(BYTE_INST) $(ARCHIVE).cmxa $(ARCHIVE).a
if HAVE_OCAMLOPT_COND
install-data-local: $(OPT_INST)
else
install-data-local: $(BYTE_INST)
endif
$(mkinstalldirs) $(OCAMLINSTALLDIR) $(STUBSDIR)
for i in $^; do \
if [ "$$i" != "$(DLL)" ]; then \
$(INSTALL_DATA) $$i $(OCAMLINSTALLDIR)/$$i; \
fi \
done
if [ "x$(OCAMLFIND)" != "x" ]; then \
mv $(OCAMLINSTALLDIR) $(OCAMLINSTALLDIR).saved && \
$(mkinstalldirs) $(DESTDIR)$(OCAML_LIB_PREFIX)/ && \
$(OCAMLFIND) install -destdir $(DESTDIR)$(OCAML_LIB_PREFIX)/ $(PKGNAME) META $(DLL) && \
$(INSTALL_DATA) $(OCAMLINSTALLDIR).saved/* $(OCAMLINSTALLDIR)/ && \
rm -rf $(OCAMLINSTALLDIR).saved/; \
else \
$(INSTALL_DATA) $(DLL) $(STUBSDIR); \
fi
uninstall-local:
if [ "x$(OCAMLFIND)" != "x" ]; then \
$(OCAMLFIND) remove -destdir $(DESTDIR)$(OCAML_LIB_PREFIX)/ $(PKGNAME); \
else \
rm -rf $(OCAMLINSTALLDIR); \
rm $(STUBSDIR)/$(DLL); \
fi
rm $(STUBSDIR)/lib$(ARCHIVE).so
#### OCaml only stuff from now on
DEPOBJS = iDOMImplementation.ml iDOMImplementation.mli
LINKORDER = iDOMImplementation
depend:
$(OCAMLDEP) $(DEPOBJS) > .depend
echo "$(LINKORDER)" > .linkorder
%.cmi : $(srcdir)/%.mli
if test ! -e $(@:%.cmi=%.mli) -a "x$(srcdir)" != "x." ; then $(LN_S) $< . ; fi
$(OCAMLC) -c $(@:%.cmi=%.mli)
%.cmo : $(srcdir)/%.ml
if test ! -e $(@:%.cmo=%.ml) -a "x$(srcdir)" != "x." ; then $(LN_S) $< . ; fi
$(OCAMLC) -c $(@:%.cmo=%.ml)
%.cmx %.o : $(srcdir)/%.ml
if test ! -e $(@:%.cmx=%.ml) -a "x$(srcdir)" != "x." ; then $(LN_S) $< . ; fi
$(OCAMLOPT) -c $(@:%.cmx=%.ml)
include .depend
gmetadom-0.2.6/src/gdome_caml/core/ 0000777 0001750 0001750 00000000000 10704633452 014133 5 0000000 0000000 gmetadom-0.2.6/src/gdome_caml/core/iCDATASection.ml 0000644 0001750 0001750 00000002406 10704632504 016712 0000000 0000000
(* This file is part of GMetaDOM
* a generic bind package for the Document Object Model API.
* Copyright (C) 2001-2002 Luca Padovani
* 2002 Claudio Sacerdoti Coen
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
* For more information, please visit the project home page
* http://gmetadom.sourceforge.net
* or send an email to
*
* DO NOT EDIT: this file has been generated automatically by GMetaDOM
*)
external of_Node : [> `Node] GdomeT.t -> TCDATASection.t = "ml_gdome_cds_of_n"
gmetadom-0.2.6/src/gdome_caml/core/iNodeList.ml 0000644 0001750 0001750 00000002551 10704632504 016273 0000000 0000000
(* This file is part of GMetaDOM
* a generic bind package for the Document Object Model API.
* Copyright (C) 2001-2002 Luca Padovani
* 2002 Claudio Sacerdoti Coen
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
* For more information, please visit the project home page
* http://gmetadom.sourceforge.net
* or send an email to
*
* DO NOT EDIT: this file has been generated automatically by GMetaDOM
*)
external get_length : this:[> `NodeList] GdomeT.t -> int = "ml_gdome_nl_get_length"
external item : this:[> `NodeList] GdomeT.t -> index:int -> TNode.t option = "ml_gdome_nl_item" gmetadom-0.2.6/src/gdome_caml/core/iAttr.ml 0000644 0001750 0001750 00000003322 10704632504 015461 0000000 0000000
(* This file is part of GMetaDOM
* a generic bind package for the Document Object Model API.
* Copyright (C) 2001-2002 Luca Padovani
* 2002 Claudio Sacerdoti Coen
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
* For more information, please visit the project home page
* http://gmetadom.sourceforge.net
* or send an email to
*
* DO NOT EDIT: this file has been generated automatically by GMetaDOM
*)
external of_Node : [> `Node] GdomeT.t -> TAttr.t = "ml_gdome_a_of_n"
external get_name : this:[> `Attr] GdomeT.t -> TDOMString.t = "ml_gdome_a_get_name"
external get_specified : this:[> `Attr] GdomeT.t -> bool = "ml_gdome_a_get_specified"
external get_value : this:[> `Attr] GdomeT.t -> TDOMString.t = "ml_gdome_a_get_value"
external set_value : this:[> `Attr] GdomeT.t -> value:TDOMString.t -> unit = "ml_gdome_a_set_value"
external get_ownerElement : this:[> `Attr] GdomeT.t -> TElement.t option = "ml_gdome_a_get_ownerElement"
gmetadom-0.2.6/src/gdome_caml/core/ml_EntityReference.c 0000644 0001750 0001750 00000005347 10704632504 020004 0000000 0000000
/* This file is part of GMetaDOM
* a generic bind package for the Document Object Model API.
* Copyright (C) 2001-2002 Luca Padovani
* 2002 Claudio Sacerdoti Coen
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
* For more information, please visit the project home page
* http://gmetadom.sourceforge.net
* or send an email to
*
* DO NOT EDIT: this file has been generated automatically by GMetaDOM
*/
#include
#include
#include
#include
#include "mlgdomevalue.h"
static void
ml_gdome_er_finalize(value v)
{
GdomeException exc_ = 0;
GdomeEntityReference* obj_ = EntityReference_val(v);
g_assert(obj_ != NULL);
gdome_er_unref(obj_, &exc_);
assert(exc_ == 0);
}
static int
ml_gdome_er_compare(value v1, value v2)
{
CAMLparam2(v1,v2);
GdomeEntityReference* obj1_ = EntityReference_val(v1);
GdomeEntityReference* obj2_ = EntityReference_val(v2);
CAMLreturn((int) (obj1_ - obj2_));
}
GdomeEntityReference*
EntityReference_val(value v)
{
GdomeEntityReference* res_ = *((GdomeEntityReference**) Data_custom_val(v));
g_assert(res_ != NULL);
return res_;
}
value
Val_EntityReference(GdomeEntityReference* obj)
{
static struct custom_operations ops = {
"http://gmetadom.sourceforge.net/gdome_caml/Core/EntityReference",
ml_gdome_er_finalize,
ml_gdome_er_compare,
custom_hash_default,
custom_serialize_default,
custom_deserialize_default
};
value v = alloc_custom(&ops, sizeof(GdomeEntityReference*), 0, 1);
g_assert(obj != NULL);
*((GdomeEntityReference**) Data_custom_val(v)) = obj;
return v;
}
value
ml_gdome_er_of_n(value obj)
{
CAMLparam1(obj);
GdomeException exc_;
GdomeEntityReference* obj_;
obj_ = gdome_cast_er((GdomeNode*) Node_val(obj));
if (obj_ == 0) throw_cast_exception("EntityReference");
gdome_er_ref(obj_, &exc_);
if (exc_ != 0) throw_exception(exc_, "EntityReference casting from Node");
CAMLreturn(Val_EntityReference(obj_));
}
gmetadom-0.2.6/src/gdome_caml/core/ml_Text.c 0000644 0001750 0001750 00000005521 10704632503 015626 0000000 0000000
/* This file is part of GMetaDOM
* a generic bind package for the Document Object Model API.
* Copyright (C) 2001-2002 Luca Padovani
* 2002 Claudio Sacerdoti Coen
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
* For more information, please visit the project home page
* http://gmetadom.sourceforge.net
* or send an email to
*
* DO NOT EDIT: this file has been generated automatically by GMetaDOM
*/
#include
#include
#include
#include
#include "mlgdomevalue.h"
static void
ml_gdome_t_finalize(value v)
{
GdomeException exc_ = 0;
GdomeText* obj_ = Text_val(v);
g_assert(obj_ != NULL);
gdome_t_unref(obj_, &exc_);
assert(exc_ == 0);
}
static int
ml_gdome_t_compare(value v1, value v2)
{
CAMLparam2(v1,v2);
GdomeText* obj1_ = Text_val(v1);
GdomeText* obj2_ = Text_val(v2);
CAMLreturn((int) (obj1_ - obj2_));
}
GdomeText*
Text_val(value v)
{
GdomeText* res_ = *((GdomeText**) Data_custom_val(v));
g_assert(res_ != NULL);
return res_;
}
value
Val_Text(GdomeText* obj)
{
static struct custom_operations ops = {
"http://gmetadom.sourceforge.net/gdome_caml/Core/Text",
ml_gdome_t_finalize,
ml_gdome_t_compare,
custom_hash_default,
custom_serialize_default,
custom_deserialize_default
};
value v = alloc_custom(&ops, sizeof(GdomeText*), 0, 1);
g_assert(obj != NULL);
*((GdomeText**) Data_custom_val(v)) = obj;
return v;
}
value
ml_gdome_t_of_n(value obj)
{
CAMLparam1(obj);
GdomeException exc_;
GdomeText* obj_;
obj_ = gdome_cast_t((GdomeNode*) Node_val(obj));
if (obj_ == 0) throw_cast_exception("Text");
gdome_t_ref(obj_, &exc_);
if (exc_ != 0) throw_exception(exc_, "Text casting from Node");
CAMLreturn(Val_Text(obj_));
}
value
ml_gdome_t_splitText(value self, value p_offset)
{
CAMLparam2(self, p_offset);
GdomeException exc_;
GdomeText* res_;
res_ = gdome_t_splitText(Text_val(self), Int_val(p_offset), &exc_);
if (exc_ != 0) throw_exception(exc_, "Text.splitText");
g_assert(res_ != NULL);
CAMLreturn(Val_Text(res_));
}
gmetadom-0.2.6/src/gdome_caml/core/iEntity.ml 0000644 0001750 0001750 00000003103 10704632504 016020 0000000 0000000
(* This file is part of GMetaDOM
* a generic bind package for the Document Object Model API.
* Copyright (C) 2001-2002 Luca Padovani
* 2002 Claudio Sacerdoti Coen
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
* For more information, please visit the project home page
* http://gmetadom.sourceforge.net
* or send an email to
*
* DO NOT EDIT: this file has been generated automatically by GMetaDOM
*)
external of_Node : [> `Node] GdomeT.t -> TEntity.t = "ml_gdome_ent_of_n"
external get_publicId : this:[> `Entity] GdomeT.t -> TDOMString.t option = "ml_gdome_ent_get_publicId"
external get_systemId : this:[> `Entity] GdomeT.t -> TDOMString.t option = "ml_gdome_ent_get_systemId"
external get_notationName : this:[> `Entity] GdomeT.t -> TDOMString.t option = "ml_gdome_ent_get_notationName"
gmetadom-0.2.6/src/gdome_caml/core/ml_Element.c 0000644 0001750 0001750 00000022513 10704632503 016273 0000000 0000000
/* This file is part of GMetaDOM
* a generic bind package for the Document Object Model API.
* Copyright (C) 2001-2002 Luca Padovani
* 2002 Claudio Sacerdoti Coen
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
* For more information, please visit the project home page
* http://gmetadom.sourceforge.net
* or send an email to
*
* DO NOT EDIT: this file has been generated automatically by GMetaDOM
*/
#include
#include
#include
#include
#include "mlgdomevalue.h"
static void
ml_gdome_el_finalize(value v)
{
GdomeException exc_ = 0;
GdomeElement* obj_ = Element_val(v);
g_assert(obj_ != NULL);
gdome_el_unref(obj_, &exc_);
assert(exc_ == 0);
}
static int
ml_gdome_el_compare(value v1, value v2)
{
CAMLparam2(v1,v2);
GdomeElement* obj1_ = Element_val(v1);
GdomeElement* obj2_ = Element_val(v2);
CAMLreturn((int) (obj1_ - obj2_));
}
GdomeElement*
Element_val(value v)
{
GdomeElement* res_ = *((GdomeElement**) Data_custom_val(v));
g_assert(res_ != NULL);
return res_;
}
value
Val_Element(GdomeElement* obj)
{
static struct custom_operations ops = {
"http://gmetadom.sourceforge.net/gdome_caml/Core/Element",
ml_gdome_el_finalize,
ml_gdome_el_compare,
custom_hash_default,
custom_serialize_default,
custom_deserialize_default
};
value v = alloc_custom(&ops, sizeof(GdomeElement*), 0, 1);
g_assert(obj != NULL);
*((GdomeElement**) Data_custom_val(v)) = obj;
return v;
}
value
ml_gdome_el_of_n(value obj)
{
CAMLparam1(obj);
GdomeException exc_;
GdomeElement* obj_;
obj_ = gdome_cast_el((GdomeNode*) Node_val(obj));
if (obj_ == 0) throw_cast_exception("Element");
gdome_el_ref(obj_, &exc_);
if (exc_ != 0) throw_exception(exc_, "Element casting from Node");
CAMLreturn(Val_Element(obj_));
}
value
ml_gdome_el_get_tagName(value self)
{
CAMLparam1(self);
GdomeException exc_;
GdomeDOMString* res_;
value res__;
res_ = gdome_el_tagName(Element_val(self), &exc_);
if (exc_ != 0) throw_exception(exc_, "Element.get_tagName");
g_assert(res_ != NULL);
CAMLreturn(Val_DOMString(res_));
}
value
ml_gdome_el_getAttribute(value self, value p_name)
{
CAMLparam2(self, p_name);
GdomeException exc_;
GdomeDOMString* res_;
GdomeDOMString* p_name_ = DOMString_val(p_name);
value res__;
res_ = gdome_el_getAttribute(Element_val(self), p_name_, &exc_);
if (exc_ != 0) throw_exception(exc_, "Element.getAttribute");
g_assert(res_ != NULL);
CAMLreturn(Val_DOMString(res_));
}
value
ml_gdome_el_setAttribute(value self, value p_name, value p_value)
{
CAMLparam3(self, p_name, p_value);
GdomeException exc_;
GdomeDOMString* p_name_ = DOMString_val(p_name);
GdomeDOMString* p_value_ = DOMString_val(p_value);gdome_el_setAttribute(Element_val(self), p_name_, p_value_, &exc_);
if (exc_ != 0) throw_exception(exc_, "Element.setAttribute");
CAMLreturn(Val_unit);
}
value
ml_gdome_el_removeAttribute(value self, value p_name)
{
CAMLparam2(self, p_name);
GdomeException exc_;
GdomeDOMString* p_name_ = DOMString_val(p_name);gdome_el_removeAttribute(Element_val(self), p_name_, &exc_);
if (exc_ != 0) throw_exception(exc_, "Element.removeAttribute");
CAMLreturn(Val_unit);
}
value
ml_gdome_el_getAttributeNode(value self, value p_name)
{
CAMLparam2(self, p_name);
GdomeException exc_;
GdomeAttr* res_;
GdomeDOMString* p_name_ = DOMString_val(p_name);res_ = gdome_el_getAttributeNode(Element_val(self), p_name_, &exc_);
if (exc_ != 0) throw_exception(exc_, "Element.getAttributeNode");
CAMLreturn(Val_option_ptr(res_,Val_Attr));
}
value
ml_gdome_el_setAttributeNode(value self, value p_newAttr)
{
CAMLparam2(self, p_newAttr);
GdomeException exc_;
GdomeAttr* res_;
res_ = gdome_el_setAttributeNode(Element_val(self), Attr_val(p_newAttr), &exc_);
if (exc_ != 0) throw_exception(exc_, "Element.setAttributeNode");
g_assert(res_ != NULL);
CAMLreturn(Val_Attr(res_));
}
value
ml_gdome_el_removeAttributeNode(value self, value p_oldAttr)
{
CAMLparam2(self, p_oldAttr);
GdomeException exc_;
GdomeAttr* res_;
res_ = gdome_el_removeAttributeNode(Element_val(self), Attr_val(p_oldAttr), &exc_);
if (exc_ != 0) throw_exception(exc_, "Element.removeAttributeNode");
g_assert(res_ != NULL);
CAMLreturn(Val_Attr(res_));
}
value
ml_gdome_el_getElementsByTagName(value self, value p_name)
{
CAMLparam2(self, p_name);
GdomeException exc_;
GdomeNodeList* res_;
GdomeDOMString* p_name_ = DOMString_val(p_name);res_ = gdome_el_getElementsByTagName(Element_val(self), p_name_, &exc_);
if (exc_ != 0) throw_exception(exc_, "Element.getElementsByTagName");
g_assert(res_ != NULL);
CAMLreturn(Val_NodeList(res_));
}
value
ml_gdome_el_getAttributeNS(value self, value p_namespaceURI, value p_localName)
{
CAMLparam3(self, p_namespaceURI, p_localName);
GdomeException exc_;
GdomeDOMString* res_;
GdomeDOMString* p_namespaceURI_ = DOMString_val(p_namespaceURI);
GdomeDOMString* p_localName_ = DOMString_val(p_localName);
value res__;
res_ = gdome_el_getAttributeNS(Element_val(self), p_namespaceURI_, p_localName_, &exc_);
if (exc_ != 0) throw_exception(exc_, "Element.getAttributeNS");
g_assert(res_ != NULL);
CAMLreturn(Val_DOMString(res_));
}
value
ml_gdome_el_setAttributeNS(value self, value p_namespaceURI, value p_qualifiedName, value p_value)
{
CAMLparam4(self, p_namespaceURI, p_qualifiedName, p_value);
GdomeException exc_;
GdomeDOMString* p_namespaceURI_ = ptr_val_option(p_namespaceURI, DOMString_val);
GdomeDOMString* p_qualifiedName_ = DOMString_val(p_qualifiedName);
GdomeDOMString* p_value_ = DOMString_val(p_value);gdome_el_setAttributeNS(Element_val(self), p_namespaceURI_, p_qualifiedName_, p_value_, &exc_);
if (exc_ != 0) throw_exception(exc_, "Element.setAttributeNS");
CAMLreturn(Val_unit);
}
value
ml_gdome_el_removeAttributeNS(value self, value p_namespaceURI, value p_localName)
{
CAMLparam3(self, p_namespaceURI, p_localName);
GdomeException exc_;
GdomeDOMString* p_namespaceURI_ = DOMString_val(p_namespaceURI);
GdomeDOMString* p_localName_ = DOMString_val(p_localName);gdome_el_removeAttributeNS(Element_val(self), p_namespaceURI_, p_localName_, &exc_);
if (exc_ != 0) throw_exception(exc_, "Element.removeAttributeNS");
CAMLreturn(Val_unit);
}
value
ml_gdome_el_getAttributeNodeNS(value self, value p_namespaceURI, value p_localName)
{
CAMLparam3(self, p_namespaceURI, p_localName);
GdomeException exc_;
GdomeAttr* res_;
GdomeDOMString* p_namespaceURI_ = DOMString_val(p_namespaceURI);
GdomeDOMString* p_localName_ = DOMString_val(p_localName);res_ = gdome_el_getAttributeNodeNS(Element_val(self), p_namespaceURI_, p_localName_, &exc_);
if (exc_ != 0) throw_exception(exc_, "Element.getAttributeNodeNS");
CAMLreturn(Val_option_ptr(res_,Val_Attr));
}
value
ml_gdome_el_setAttributeNodeNS(value self, value p_newAttr)
{
CAMLparam2(self, p_newAttr);
GdomeException exc_;
GdomeAttr* res_;
res_ = gdome_el_setAttributeNodeNS(Element_val(self), Attr_val(p_newAttr), &exc_);
if (exc_ != 0) throw_exception(exc_, "Element.setAttributeNodeNS");
g_assert(res_ != NULL);
CAMLreturn(Val_Attr(res_));
}
value
ml_gdome_el_getElementsByTagNameNS(value self, value p_namespaceURI, value p_localName)
{
CAMLparam3(self, p_namespaceURI, p_localName);
GdomeException exc_;
GdomeNodeList* res_;
GdomeDOMString* p_namespaceURI_ = DOMString_val(p_namespaceURI);
GdomeDOMString* p_localName_ = DOMString_val(p_localName);res_ = gdome_el_getElementsByTagNameNS(Element_val(self), p_namespaceURI_, p_localName_, &exc_);
if (exc_ != 0) throw_exception(exc_, "Element.getElementsByTagNameNS");
g_assert(res_ != NULL);
CAMLreturn(Val_NodeList(res_));
}
value
ml_gdome_el_hasAttribute(value self, value p_name)
{
CAMLparam2(self, p_name);
GdomeException exc_;
GdomeBoolean res_;
GdomeDOMString* p_name_ = DOMString_val(p_name);res_ = gdome_el_hasAttribute(Element_val(self), p_name_, &exc_);
if (exc_ != 0) throw_exception(exc_, "Element.hasAttribute");
CAMLreturn(Val_bool(res_));
}
value
ml_gdome_el_hasAttributeNS(value self, value p_namespaceURI, value p_localName)
{
CAMLparam3(self, p_namespaceURI, p_localName);
GdomeException exc_;
GdomeBoolean res_;
GdomeDOMString* p_namespaceURI_ = DOMString_val(p_namespaceURI);
GdomeDOMString* p_localName_ = DOMString_val(p_localName);res_ = gdome_el_hasAttributeNS(Element_val(self), p_namespaceURI_, p_localName_, &exc_);
if (exc_ != 0) throw_exception(exc_, "Element.hasAttributeNS");
CAMLreturn(Val_bool(res_));
}
gmetadom-0.2.6/src/gdome_caml/core/ml_Document.c 0000644 0001750 0001750 00000023245 10704632504 016464 0000000 0000000
/* This file is part of GMetaDOM
* a generic bind package for the Document Object Model API.
* Copyright (C) 2001-2002 Luca Padovani
* 2002 Claudio Sacerdoti Coen
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
* For more information, please visit the project home page
* http://gmetadom.sourceforge.net
* or send an email to
*
* DO NOT EDIT: this file has been generated automatically by GMetaDOM
*/
#include
#include
#include
#include
#include "mlgdomevalue.h"
static void
ml_gdome_doc_finalize(value v)
{
GdomeException exc_ = 0;
GdomeDocument* obj_ = Document_val(v);
g_assert(obj_ != NULL);
gdome_doc_unref(obj_, &exc_);
assert(exc_ == 0);
}
static int
ml_gdome_doc_compare(value v1, value v2)
{
CAMLparam2(v1,v2);
GdomeDocument* obj1_ = Document_val(v1);
GdomeDocument* obj2_ = Document_val(v2);
CAMLreturn((int) (obj1_ - obj2_));
}
GdomeDocument*
Document_val(value v)
{
GdomeDocument* res_ = *((GdomeDocument**) Data_custom_val(v));
g_assert(res_ != NULL);
return res_;
}
value
Val_Document(GdomeDocument* obj)
{
static struct custom_operations ops = {
"http://gmetadom.sourceforge.net/gdome_caml/Core/Document",
ml_gdome_doc_finalize,
ml_gdome_doc_compare,
custom_hash_default,
custom_serialize_default,
custom_deserialize_default
};
value v = alloc_custom(&ops, sizeof(GdomeDocument*), 0, 1);
g_assert(obj != NULL);
*((GdomeDocument**) Data_custom_val(v)) = obj;
return v;
}
value
ml_gdome_doc_of_n(value obj)
{
CAMLparam1(obj);
GdomeException exc_;
GdomeDocument* obj_;
obj_ = gdome_cast_doc((GdomeNode*) Node_val(obj));
if (obj_ == 0) throw_cast_exception("Document");
gdome_doc_ref(obj_, &exc_);
if (exc_ != 0) throw_exception(exc_, "Document casting from Node");
CAMLreturn(Val_Document(obj_));
}
value
ml_gdome_doc_get_doctype(value self)
{
CAMLparam1(self);
GdomeException exc_;
GdomeDocumentType* res_;
res_ = gdome_doc_doctype(Document_val(self), &exc_);
if (exc_ != 0) throw_exception(exc_, "Document.get_doctype");
CAMLreturn(Val_option_ptr(res_,Val_DocumentType));
}
value
ml_gdome_doc_get_implementation(value self)
{
CAMLparam1(self);
GdomeException exc_;
GdomeDOMImplementation* res_;
res_ = gdome_doc_implementation(Document_val(self), &exc_);
if (exc_ != 0) throw_exception(exc_, "Document.get_implementation");
g_assert(res_ != NULL);
CAMLreturn(Val_DOMImplementation(res_));
}
value
ml_gdome_doc_get_documentElement(value self)
{
CAMLparam1(self);
GdomeException exc_;
GdomeElement* res_;
res_ = gdome_doc_documentElement(Document_val(self), &exc_);
if (exc_ != 0) throw_exception(exc_, "Document.get_documentElement");
g_assert(res_ != NULL);
CAMLreturn(Val_Element(res_));
}
value
ml_gdome_doc_createElement(value self, value p_tagName)
{
CAMLparam2(self, p_tagName);
GdomeException exc_;
GdomeElement* res_;
GdomeDOMString* p_tagName_ = DOMString_val(p_tagName);res_ = gdome_doc_createElement(Document_val(self), p_tagName_, &exc_);
if (exc_ != 0) throw_exception(exc_, "Document.createElement");
g_assert(res_ != NULL);
CAMLreturn(Val_Element(res_));
}
value
ml_gdome_doc_createDocumentFragment(value self)
{
CAMLparam1(self);
GdomeException exc_;
GdomeDocumentFragment* res_;
res_ = gdome_doc_createDocumentFragment(Document_val(self), &exc_);
if (exc_ != 0) throw_exception(exc_, "Document.createDocumentFragment");
g_assert(res_ != NULL);
CAMLreturn(Val_DocumentFragment(res_));
}
value
ml_gdome_doc_createTextNode(value self, value p_data)
{
CAMLparam2(self, p_data);
GdomeException exc_;
GdomeText* res_;
GdomeDOMString* p_data_ = DOMString_val(p_data);res_ = gdome_doc_createTextNode(Document_val(self), p_data_, &exc_);
if (exc_ != 0) throw_exception(exc_, "Document.createTextNode");
g_assert(res_ != NULL);
CAMLreturn(Val_Text(res_));
}
value
ml_gdome_doc_createComment(value self, value p_data)
{
CAMLparam2(self, p_data);
GdomeException exc_;
GdomeComment* res_;
GdomeDOMString* p_data_ = DOMString_val(p_data);res_ = gdome_doc_createComment(Document_val(self), p_data_, &exc_);
if (exc_ != 0) throw_exception(exc_, "Document.createComment");
g_assert(res_ != NULL);
CAMLreturn(Val_Comment(res_));
}
value
ml_gdome_doc_createCDATASection(value self, value p_data)
{
CAMLparam2(self, p_data);
GdomeException exc_;
GdomeCDATASection* res_;
GdomeDOMString* p_data_ = DOMString_val(p_data);res_ = gdome_doc_createCDATASection(Document_val(self), p_data_, &exc_);
if (exc_ != 0) throw_exception(exc_, "Document.createCDATASection");
g_assert(res_ != NULL);
CAMLreturn(Val_CDATASection(res_));
}
value
ml_gdome_doc_createProcessingInstruction(value self, value p_target, value p_data)
{
CAMLparam3(self, p_target, p_data);
GdomeException exc_;
GdomeProcessingInstruction* res_;
GdomeDOMString* p_target_ = DOMString_val(p_target);
GdomeDOMString* p_data_ = DOMString_val(p_data);res_ = gdome_doc_createProcessingInstruction(Document_val(self), p_target_, p_data_, &exc_);
if (exc_ != 0) throw_exception(exc_, "Document.createProcessingInstruction");
g_assert(res_ != NULL);
CAMLreturn(Val_ProcessingInstruction(res_));
}
value
ml_gdome_doc_createAttribute(value self, value p_name)
{
CAMLparam2(self, p_name);
GdomeException exc_;
GdomeAttr* res_;
GdomeDOMString* p_name_ = DOMString_val(p_name);res_ = gdome_doc_createAttribute(Document_val(self), p_name_, &exc_);
if (exc_ != 0) throw_exception(exc_, "Document.createAttribute");
g_assert(res_ != NULL);
CAMLreturn(Val_Attr(res_));
}
value
ml_gdome_doc_createEntityReference(value self, value p_name)
{
CAMLparam2(self, p_name);
GdomeException exc_;
GdomeEntityReference* res_;
GdomeDOMString* p_name_ = DOMString_val(p_name);res_ = gdome_doc_createEntityReference(Document_val(self), p_name_, &exc_);
if (exc_ != 0) throw_exception(exc_, "Document.createEntityReference");
g_assert(res_ != NULL);
CAMLreturn(Val_EntityReference(res_));
}
value
ml_gdome_doc_getElementsByTagName(value self, value p_tagname)
{
CAMLparam2(self, p_tagname);
GdomeException exc_;
GdomeNodeList* res_;
GdomeDOMString* p_tagname_ = DOMString_val(p_tagname);res_ = gdome_doc_getElementsByTagName(Document_val(self), p_tagname_, &exc_);
if (exc_ != 0) throw_exception(exc_, "Document.getElementsByTagName");
g_assert(res_ != NULL);
CAMLreturn(Val_NodeList(res_));
}
value
ml_gdome_doc_importNode(value self, value p_importedNode, value p_deep)
{
CAMLparam3(self, p_importedNode, p_deep);
GdomeException exc_;
GdomeNode* res_;
res_ = gdome_doc_importNode(Document_val(self), Node_val(p_importedNode), Bool_val(p_deep), &exc_);
if (exc_ != 0) throw_exception(exc_, "Document.importNode");
g_assert(res_ != NULL);
CAMLreturn(Val_Node(res_));
}
value
ml_gdome_doc_createElementNS(value self, value p_namespaceURI, value p_qualifiedName)
{
CAMLparam3(self, p_namespaceURI, p_qualifiedName);
GdomeException exc_;
GdomeElement* res_;
GdomeDOMString* p_namespaceURI_ = ptr_val_option(p_namespaceURI, DOMString_val);
GdomeDOMString* p_qualifiedName_ = DOMString_val(p_qualifiedName);res_ = gdome_doc_createElementNS(Document_val(self), p_namespaceURI_, p_qualifiedName_, &exc_);
if (exc_ != 0) throw_exception(exc_, "Document.createElementNS");
g_assert(res_ != NULL);
CAMLreturn(Val_Element(res_));
}
value
ml_gdome_doc_createAttributeNS(value self, value p_namespaceURI, value p_qualifiedName)
{
CAMLparam3(self, p_namespaceURI, p_qualifiedName);
GdomeException exc_;
GdomeAttr* res_;
GdomeDOMString* p_namespaceURI_ = ptr_val_option(p_namespaceURI, DOMString_val);
GdomeDOMString* p_qualifiedName_ = DOMString_val(p_qualifiedName);res_ = gdome_doc_createAttributeNS(Document_val(self), p_namespaceURI_, p_qualifiedName_, &exc_);
if (exc_ != 0) throw_exception(exc_, "Document.createAttributeNS");
g_assert(res_ != NULL);
CAMLreturn(Val_Attr(res_));
}
value
ml_gdome_doc_getElementsByTagNameNS(value self, value p_namespaceURI, value p_localName)
{
CAMLparam3(self, p_namespaceURI, p_localName);
GdomeException exc_;
GdomeNodeList* res_;
GdomeDOMString* p_namespaceURI_ = DOMString_val(p_namespaceURI);
GdomeDOMString* p_localName_ = DOMString_val(p_localName);res_ = gdome_doc_getElementsByTagNameNS(Document_val(self), p_namespaceURI_, p_localName_, &exc_);
if (exc_ != 0) throw_exception(exc_, "Document.getElementsByTagNameNS");
g_assert(res_ != NULL);
CAMLreturn(Val_NodeList(res_));
}
value
ml_gdome_doc_getElementById(value self, value p_elementId)
{
CAMLparam2(self, p_elementId);
GdomeException exc_;
GdomeElement* res_;
GdomeDOMString* p_elementId_ = DOMString_val(p_elementId);res_ = gdome_doc_getElementById(Document_val(self), p_elementId_, &exc_);
if (exc_ != 0) throw_exception(exc_, "Document.getElementById");
CAMLreturn(Val_option_ptr(res_,Val_Element));
}
gmetadom-0.2.6/src/gdome_caml/core/iDocument.ml 0000644 0001750 0001750 00000007023 10704632504 016327 0000000 0000000
(* This file is part of GMetaDOM
* a generic bind package for the Document Object Model API.
* Copyright (C) 2001-2002 Luca Padovani
* 2002 Claudio Sacerdoti Coen
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
* For more information, please visit the project home page
* http://gmetadom.sourceforge.net
* or send an email to
*
* DO NOT EDIT: this file has been generated automatically by GMetaDOM
*)
external of_Node : [> `Node] GdomeT.t -> TDocument.t = "ml_gdome_doc_of_n"
external get_doctype : this:[> `Document] GdomeT.t -> TDocumentType.t option = "ml_gdome_doc_get_doctype"
external get_implementation : this:[> `Document] GdomeT.t -> TDOMImplementation.t = "ml_gdome_doc_get_implementation"
external get_documentElement : this:[> `Document] GdomeT.t -> TElement.t = "ml_gdome_doc_get_documentElement"
external createElement : this:[> `Document] GdomeT.t -> tagName:TDOMString.t -> TElement.t = "ml_gdome_doc_createElement"
external createDocumentFragment : this:[> `Document] GdomeT.t -> TDocumentFragment.t = "ml_gdome_doc_createDocumentFragment"
external createTextNode : this:[> `Document] GdomeT.t -> data:TDOMString.t -> TText.t = "ml_gdome_doc_createTextNode"
external createComment : this:[> `Document] GdomeT.t -> data:TDOMString.t -> TComment.t = "ml_gdome_doc_createComment"
external createCDATASection : this:[> `Document] GdomeT.t -> data:TDOMString.t -> TCDATASection.t = "ml_gdome_doc_createCDATASection"
external createProcessingInstruction : this:[> `Document] GdomeT.t -> target:TDOMString.t -> data:TDOMString.t -> TProcessingInstruction.t = "ml_gdome_doc_createProcessingInstruction"
external createAttribute : this:[> `Document] GdomeT.t -> name:TDOMString.t -> TAttr.t = "ml_gdome_doc_createAttribute"
external createEntityReference : this:[> `Document] GdomeT.t -> name:TDOMString.t -> TEntityReference.t = "ml_gdome_doc_createEntityReference"
external getElementsByTagName : this:[> `Document] GdomeT.t -> tagname:TDOMString.t -> TNodeList.t = "ml_gdome_doc_getElementsByTagName"
external importNode : this:[> `Document] GdomeT.t -> importedNode:[> `Node] GdomeT.t -> deep:bool -> TNode.t = "ml_gdome_doc_importNode"
external createElementNS : this:[> `Document] GdomeT.t -> namespaceURI:TDOMString.t option -> qualifiedName:TDOMString.t -> TElement.t = "ml_gdome_doc_createElementNS"
external createAttributeNS : this:[> `Document] GdomeT.t -> namespaceURI:TDOMString.t option -> qualifiedName:TDOMString.t -> TAttr.t = "ml_gdome_doc_createAttributeNS"
external getElementsByTagNameNS : this:[> `Document] GdomeT.t -> namespaceURI:TDOMString.t -> localName:TDOMString.t -> TNodeList.t = "ml_gdome_doc_getElementsByTagNameNS"
external getElementById : this:[> `Document] GdomeT.t -> elementId:TDOMString.t -> TElement.t option = "ml_gdome_doc_getElementById" gmetadom-0.2.6/src/gdome_caml/core/ml_DocumentFragment.c 0000644 0001750 0001750 00000005372 10704632504 020151 0000000 0000000
/* This file is part of GMetaDOM
* a generic bind package for the Document Object Model API.
* Copyright (C) 2001-2002 Luca Padovani
* 2002 Claudio Sacerdoti Coen
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
* For more information, please visit the project home page
* http://gmetadom.sourceforge.net
* or send an email to
*
* DO NOT EDIT: this file has been generated automatically by GMetaDOM
*/
#include
#include
#include
#include
#include "mlgdomevalue.h"
static void
ml_gdome_df_finalize(value v)
{
GdomeException exc_ = 0;
GdomeDocumentFragment* obj_ = DocumentFragment_val(v);
g_assert(obj_ != NULL);
gdome_df_unref(obj_, &exc_);
assert(exc_ == 0);
}
static int
ml_gdome_df_compare(value v1, value v2)
{
CAMLparam2(v1,v2);
GdomeDocumentFragment* obj1_ = DocumentFragment_val(v1);
GdomeDocumentFragment* obj2_ = DocumentFragment_val(v2);
CAMLreturn((int) (obj1_ - obj2_));
}
GdomeDocumentFragment*
DocumentFragment_val(value v)
{
GdomeDocumentFragment* res_ = *((GdomeDocumentFragment**) Data_custom_val(v));
g_assert(res_ != NULL);
return res_;
}
value
Val_DocumentFragment(GdomeDocumentFragment* obj)
{
static struct custom_operations ops = {
"http://gmetadom.sourceforge.net/gdome_caml/Core/DocumentFragment",
ml_gdome_df_finalize,
ml_gdome_df_compare,
custom_hash_default,
custom_serialize_default,
custom_deserialize_default
};
value v = alloc_custom(&ops, sizeof(GdomeDocumentFragment*), 0, 1);
g_assert(obj != NULL);
*((GdomeDocumentFragment**) Data_custom_val(v)) = obj;
return v;
}
value
ml_gdome_df_of_n(value obj)
{
CAMLparam1(obj);
GdomeException exc_;
GdomeDocumentFragment* obj_;
obj_ = gdome_cast_df((GdomeNode*) Node_val(obj));
if (obj_ == 0) throw_cast_exception("DocumentFragment");
gdome_df_ref(obj_, &exc_);
if (exc_ != 0) throw_exception(exc_, "DocumentFragment casting from Node");
CAMLreturn(Val_DocumentFragment(obj_));
}
gmetadom-0.2.6/src/gdome_caml/core/ml_NamedNodeMap.c 0000644 0001750 0001750 00000012554 10704632503 017176 0000000 0000000
/* This file is part of GMetaDOM
* a generic bind package for the Document Object Model API.
* Copyright (C) 2001-2002 Luca Padovani
* 2002 Claudio Sacerdoti Coen
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
* For more information, please visit the project home page
* http://gmetadom.sourceforge.net
* or send an email to
*
* DO NOT EDIT: this file has been generated automatically by GMetaDOM
*/
#include
#include
#include
#include
#include "mlgdomevalue.h"
static void
ml_gdome_nnm_finalize(value v)
{
GdomeException exc_ = 0;
GdomeNamedNodeMap* obj_ = NamedNodeMap_val(v);
g_assert(obj_ != NULL);
gdome_nnm_unref(obj_, &exc_);
assert(exc_ == 0);
}
static int
ml_gdome_nnm_compare(value v1, value v2)
{
CAMLparam2(v1,v2);
GdomeNamedNodeMap* obj1_ = NamedNodeMap_val(v1);
GdomeNamedNodeMap* obj2_ = NamedNodeMap_val(v2);
CAMLreturn((int) (obj1_ - obj2_));
}
GdomeNamedNodeMap*
NamedNodeMap_val(value v)
{
GdomeNamedNodeMap* res_ = *((GdomeNamedNodeMap**) Data_custom_val(v));
g_assert(res_ != NULL);
return res_;
}
value
Val_NamedNodeMap(GdomeNamedNodeMap* obj)
{
static struct custom_operations ops = {
"http://gmetadom.sourceforge.net/gdome_caml/Core/NamedNodeMap",
ml_gdome_nnm_finalize,
ml_gdome_nnm_compare,
custom_hash_default,
custom_serialize_default,
custom_deserialize_default
};
value v = alloc_custom(&ops, sizeof(GdomeNamedNodeMap*), 0, 1);
g_assert(obj != NULL);
*((GdomeNamedNodeMap**) Data_custom_val(v)) = obj;
return v;
}
value
ml_gdome_nnm_get_length(value self)
{
CAMLparam1(self);
GdomeException exc_;
unsigned long res_;
res_ = gdome_nnm_length(NamedNodeMap_val(self), &exc_);
if (exc_ != 0) throw_exception(exc_, "NamedNodeMap.get_length");
CAMLreturn(Val_int(res_));
}
value
ml_gdome_nnm_getNamedItem(value self, value p_name)
{
CAMLparam2(self, p_name);
GdomeException exc_;
GdomeNode* res_;
GdomeDOMString* p_name_ = DOMString_val(p_name);res_ = gdome_nnm_getNamedItem(NamedNodeMap_val(self), p_name_, &exc_);
if (exc_ != 0) throw_exception(exc_, "NamedNodeMap.getNamedItem");
CAMLreturn(Val_option_ptr(res_,Val_Node));
}
value
ml_gdome_nnm_setNamedItem(value self, value p_arg)
{
CAMLparam2(self, p_arg);
GdomeException exc_;
GdomeNode* res_;
res_ = gdome_nnm_setNamedItem(NamedNodeMap_val(self), Node_val(p_arg), &exc_);
if (exc_ != 0) throw_exception(exc_, "NamedNodeMap.setNamedItem");
CAMLreturn(Val_option_ptr(res_,Val_Node));
}
value
ml_gdome_nnm_removeNamedItem(value self, value p_name)
{
CAMLparam2(self, p_name);
GdomeException exc_;
GdomeNode* res_;
GdomeDOMString* p_name_ = DOMString_val(p_name);res_ = gdome_nnm_removeNamedItem(NamedNodeMap_val(self), p_name_, &exc_);
if (exc_ != 0) throw_exception(exc_, "NamedNodeMap.removeNamedItem");
g_assert(res_ != NULL);
CAMLreturn(Val_Node(res_));
}
value
ml_gdome_nnm_item(value self, value p_index)
{
CAMLparam2(self, p_index);
GdomeException exc_;
GdomeNode* res_;
res_ = gdome_nnm_item(NamedNodeMap_val(self), Int_val(p_index), &exc_);
if (exc_ != 0) throw_exception(exc_, "NamedNodeMap.item");
CAMLreturn(Val_option_ptr(res_,Val_Node));
}
value
ml_gdome_nnm_getNamedItemNS(value self, value p_namespaceURI, value p_localName)
{
CAMLparam3(self, p_namespaceURI, p_localName);
GdomeException exc_;
GdomeNode* res_;
GdomeDOMString* p_namespaceURI_ = DOMString_val(p_namespaceURI);
GdomeDOMString* p_localName_ = DOMString_val(p_localName);res_ = gdome_nnm_getNamedItemNS(NamedNodeMap_val(self), p_namespaceURI_, p_localName_, &exc_);
if (exc_ != 0) throw_exception(exc_, "NamedNodeMap.getNamedItemNS");
CAMLreturn(Val_option_ptr(res_,Val_Node));
}
value
ml_gdome_nnm_setNamedItemNS(value self, value p_arg)
{
CAMLparam2(self, p_arg);
GdomeException exc_;
GdomeNode* res_;
res_ = gdome_nnm_setNamedItemNS(NamedNodeMap_val(self), Node_val(p_arg), &exc_);
if (exc_ != 0) throw_exception(exc_, "NamedNodeMap.setNamedItemNS");
CAMLreturn(Val_option_ptr(res_,Val_Node));
}
value
ml_gdome_nnm_removeNamedItemNS(value self, value p_namespaceURI, value p_localName)
{
CAMLparam3(self, p_namespaceURI, p_localName);
GdomeException exc_;
GdomeNode* res_;
GdomeDOMString* p_namespaceURI_ = DOMString_val(p_namespaceURI);
GdomeDOMString* p_localName_ = DOMString_val(p_localName);res_ = gdome_nnm_removeNamedItemNS(NamedNodeMap_val(self), p_namespaceURI_, p_localName_, &exc_);
if (exc_ != 0) throw_exception(exc_, "NamedNodeMap.removeNamedItemNS");
g_assert(res_ != NULL);
CAMLreturn(Val_Node(res_));
}
gmetadom-0.2.6/src/gdome_caml/core/.depend 0000644 0001750 0001750 00000000000 07421614622 015275 0000000 0000000 gmetadom-0.2.6/src/gdome_caml/core/ml_Notation.c 0000644 0001750 0001750 00000006324 10704632503 016477 0000000 0000000
/* This file is part of GMetaDOM
* a generic bind package for the Document Object Model API.
* Copyright (C) 2001-2002 Luca Padovani
* 2002 Claudio Sacerdoti Coen
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
* For more information, please visit the project home page
* http://gmetadom.sourceforge.net
* or send an email to
*
* DO NOT EDIT: this file has been generated automatically by GMetaDOM
*/
#include
#include
#include
#include
#include "mlgdomevalue.h"
static void
ml_gdome_not_finalize(value v)
{
GdomeException exc_ = 0;
GdomeNotation* obj_ = Notation_val(v);
g_assert(obj_ != NULL);
gdome_not_unref(obj_, &exc_);
assert(exc_ == 0);
}
static int
ml_gdome_not_compare(value v1, value v2)
{
CAMLparam2(v1,v2);
GdomeNotation* obj1_ = Notation_val(v1);
GdomeNotation* obj2_ = Notation_val(v2);
CAMLreturn((int) (obj1_ - obj2_));
}
GdomeNotation*
Notation_val(value v)
{
GdomeNotation* res_ = *((GdomeNotation**) Data_custom_val(v));
g_assert(res_ != NULL);
return res_;
}
value
Val_Notation(GdomeNotation* obj)
{
static struct custom_operations ops = {
"http://gmetadom.sourceforge.net/gdome_caml/Core/Notation",
ml_gdome_not_finalize,
ml_gdome_not_compare,
custom_hash_default,
custom_serialize_default,
custom_deserialize_default
};
value v = alloc_custom(&ops, sizeof(GdomeNotation*), 0, 1);
g_assert(obj != NULL);
*((GdomeNotation**) Data_custom_val(v)) = obj;
return v;
}
value
ml_gdome_not_of_n(value obj)
{
CAMLparam1(obj);
GdomeException exc_;
GdomeNotation* obj_;
obj_ = gdome_cast_not((GdomeNode*) Node_val(obj));
if (obj_ == 0) throw_cast_exception("Notation");
gdome_not_ref(obj_, &exc_);
if (exc_ != 0) throw_exception(exc_, "Notation casting from Node");
CAMLreturn(Val_Notation(obj_));
}
value
ml_gdome_not_get_publicId(value self)
{
CAMLparam1(self);
GdomeException exc_;
GdomeDOMString* res_;
value res__;
res_ = gdome_not_publicId(Notation_val(self), &exc_);
if (exc_ != 0) throw_exception(exc_, "Notation.get_publicId");
CAMLreturn(Val_option_ptr(res_,Val_DOMString));
}
value
ml_gdome_not_get_systemId(value self)
{
CAMLparam1(self);
GdomeException exc_;
GdomeDOMString* res_;
value res__;
res_ = gdome_not_systemId(Notation_val(self), &exc_);
if (exc_ != 0) throw_exception(exc_, "Notation.get_systemId");
CAMLreturn(Val_option_ptr(res_,Val_DOMString));
}
gmetadom-0.2.6/src/gdome_caml/core/ml_CDATASection.c 0000644 0001750 0001750 00000005266 10704632503 017051 0000000 0000000
/* This file is part of GMetaDOM
* a generic bind package for the Document Object Model API.
* Copyright (C) 2001-2002 Luca Padovani
* 2002 Claudio Sacerdoti Coen
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
* For more information, please visit the project home page
* http://gmetadom.sourceforge.net
* or send an email to
*
* DO NOT EDIT: this file has been generated automatically by GMetaDOM
*/
#include
#include
#include
#include
#include "mlgdomevalue.h"
static void
ml_gdome_cds_finalize(value v)
{
GdomeException exc_ = 0;
GdomeCDATASection* obj_ = CDATASection_val(v);
g_assert(obj_ != NULL);
gdome_cds_unref(obj_, &exc_);
assert(exc_ == 0);
}
static int
ml_gdome_cds_compare(value v1, value v2)
{
CAMLparam2(v1,v2);
GdomeCDATASection* obj1_ = CDATASection_val(v1);
GdomeCDATASection* obj2_ = CDATASection_val(v2);
CAMLreturn((int) (obj1_ - obj2_));
}
GdomeCDATASection*
CDATASection_val(value v)
{
GdomeCDATASection* res_ = *((GdomeCDATASection**) Data_custom_val(v));
g_assert(res_ != NULL);
return res_;
}
value
Val_CDATASection(GdomeCDATASection* obj)
{
static struct custom_operations ops = {
"http://gmetadom.sourceforge.net/gdome_caml/Core/CDATASection",
ml_gdome_cds_finalize,
ml_gdome_cds_compare,
custom_hash_default,
custom_serialize_default,
custom_deserialize_default
};
value v = alloc_custom(&ops, sizeof(GdomeCDATASection*), 0, 1);
g_assert(obj != NULL);
*((GdomeCDATASection**) Data_custom_val(v)) = obj;
return v;
}
value
ml_gdome_cds_of_n(value obj)
{
CAMLparam1(obj);
GdomeException exc_;
GdomeCDATASection* obj_;
obj_ = gdome_cast_cds((GdomeNode*) Node_val(obj));
if (obj_ == 0) throw_cast_exception("CDATASection");
gdome_cds_ref(obj_, &exc_);
if (exc_ != 0) throw_exception(exc_, "CDATASection casting from Node");
CAMLreturn(Val_CDATASection(obj_));
}
gmetadom-0.2.6/src/gdome_caml/core/ml_CharacterData.c 0000644 0001750 0001750 00000012564 10704632503 017375 0000000 0000000
/* This file is part of GMetaDOM
* a generic bind package for the Document Object Model API.
* Copyright (C) 2001-2002 Luca Padovani
* 2002 Claudio Sacerdoti Coen
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
* For more information, please visit the project home page
* http://gmetadom.sourceforge.net
* or send an email to
*
* DO NOT EDIT: this file has been generated automatically by GMetaDOM
*/
#include
#include
#include
#include
#include "mlgdomevalue.h"
static void
ml_gdome_cd_finalize(value v)
{
GdomeException exc_ = 0;
GdomeCharacterData* obj_ = CharacterData_val(v);
g_assert(obj_ != NULL);
gdome_cd_unref(obj_, &exc_);
assert(exc_ == 0);
}
static int
ml_gdome_cd_compare(value v1, value v2)
{
CAMLparam2(v1,v2);
GdomeCharacterData* obj1_ = CharacterData_val(v1);
GdomeCharacterData* obj2_ = CharacterData_val(v2);
CAMLreturn((int) (obj1_ - obj2_));
}
GdomeCharacterData*
CharacterData_val(value v)
{
GdomeCharacterData* res_ = *((GdomeCharacterData**) Data_custom_val(v));
g_assert(res_ != NULL);
return res_;
}
value
Val_CharacterData(GdomeCharacterData* obj)
{
static struct custom_operations ops = {
"http://gmetadom.sourceforge.net/gdome_caml/Core/CharacterData",
ml_gdome_cd_finalize,
ml_gdome_cd_compare,
custom_hash_default,
custom_serialize_default,
custom_deserialize_default
};
value v = alloc_custom(&ops, sizeof(GdomeCharacterData*), 0, 1);
g_assert(obj != NULL);
*((GdomeCharacterData**) Data_custom_val(v)) = obj;
return v;
}
value
ml_gdome_cd_of_n(value obj)
{
CAMLparam1(obj);
GdomeException exc_;
GdomeCharacterData* obj_;
obj_ = gdome_cast_cd((GdomeNode*) Node_val(obj));
if (obj_ == 0) throw_cast_exception("CharacterData");
gdome_cd_ref(obj_, &exc_);
if (exc_ != 0) throw_exception(exc_, "CharacterData casting from Node");
CAMLreturn(Val_CharacterData(obj_));
}
value
ml_gdome_cd_get_data(value self)
{
CAMLparam1(self);
GdomeException exc_;
GdomeDOMString* res_;
value res__;
res_ = gdome_cd_data(CharacterData_val(self), &exc_);
if (exc_ != 0) throw_exception(exc_, "CharacterData.get_data");
g_assert(res_ != NULL);
CAMLreturn(Val_DOMString(res_));
}
value
ml_gdome_cd_set_data(value self, value p_v)
{
CAMLparam2(self, p_v);
GdomeException exc_;
GdomeDOMString* p_v_ = DOMString_val(p_v);
gdome_cd_set_data(CharacterData_val(self), p_v_, &exc_);
if (exc_ != 0) throw_exception(exc_, "CharacterData.set_data");
CAMLreturn(Val_unit);
}
value
ml_gdome_cd_get_length(value self)
{
CAMLparam1(self);
GdomeException exc_;
unsigned long res_;
res_ = gdome_cd_length(CharacterData_val(self), &exc_);
if (exc_ != 0) throw_exception(exc_, "CharacterData.get_length");
CAMLreturn(Val_int(res_));
}
value
ml_gdome_cd_substringData(value self, value p_offset, value p_count)
{
CAMLparam3(self, p_offset, p_count);
GdomeException exc_;
GdomeDOMString* res_;
value res__;
res_ = gdome_cd_substringData(CharacterData_val(self), Int_val(p_offset), Int_val(p_count), &exc_);
if (exc_ != 0) throw_exception(exc_, "CharacterData.substringData");
g_assert(res_ != NULL);
CAMLreturn(Val_DOMString(res_));
}
value
ml_gdome_cd_appendData(value self, value p_arg)
{
CAMLparam2(self, p_arg);
GdomeException exc_;
GdomeDOMString* p_arg_ = DOMString_val(p_arg);gdome_cd_appendData(CharacterData_val(self), p_arg_, &exc_);
if (exc_ != 0) throw_exception(exc_, "CharacterData.appendData");
CAMLreturn(Val_unit);
}
value
ml_gdome_cd_insertData(value self, value p_offset, value p_arg)
{
CAMLparam3(self, p_offset, p_arg);
GdomeException exc_;
GdomeDOMString* p_arg_ = DOMString_val(p_arg);gdome_cd_insertData(CharacterData_val(self), Int_val(p_offset), p_arg_, &exc_);
if (exc_ != 0) throw_exception(exc_, "CharacterData.insertData");
CAMLreturn(Val_unit);
}
value
ml_gdome_cd_deleteData(value self, value p_offset, value p_count)
{
CAMLparam3(self, p_offset, p_count);
GdomeException exc_;
gdome_cd_deleteData(CharacterData_val(self), Int_val(p_offset), Int_val(p_count), &exc_);
if (exc_ != 0) throw_exception(exc_, "CharacterData.deleteData");
CAMLreturn(Val_unit);
}
value
ml_gdome_cd_replaceData(value self, value p_offset, value p_count, value p_arg)
{
CAMLparam4(self, p_offset, p_count, p_arg);
GdomeException exc_;
GdomeDOMString* p_arg_ = DOMString_val(p_arg);gdome_cd_replaceData(CharacterData_val(self), Int_val(p_offset), Int_val(p_count), p_arg_, &exc_);
if (exc_ != 0) throw_exception(exc_, "CharacterData.replaceData");
CAMLreturn(Val_unit);
}
gmetadom-0.2.6/src/gdome_caml/core/ml_Entity.c 0000644 0001750 0001750 00000006743 10704632504 016166 0000000 0000000
/* This file is part of GMetaDOM
* a generic bind package for the Document Object Model API.
* Copyright (C) 2001-2002 Luca Padovani
* 2002 Claudio Sacerdoti Coen
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
* For more information, please visit the project home page
* http://gmetadom.sourceforge.net
* or send an email to
*
* DO NOT EDIT: this file has been generated automatically by GMetaDOM
*/
#include
#include
#include
#include
#include "mlgdomevalue.h"
static void
ml_gdome_ent_finalize(value v)
{
GdomeException exc_ = 0;
GdomeEntity* obj_ = Entity_val(v);
g_assert(obj_ != NULL);
gdome_ent_unref(obj_, &exc_);
assert(exc_ == 0);
}
static int
ml_gdome_ent_compare(value v1, value v2)
{
CAMLparam2(v1,v2);
GdomeEntity* obj1_ = Entity_val(v1);
GdomeEntity* obj2_ = Entity_val(v2);
CAMLreturn((int) (obj1_ - obj2_));
}
GdomeEntity*
Entity_val(value v)
{
GdomeEntity* res_ = *((GdomeEntity**) Data_custom_val(v));
g_assert(res_ != NULL);
return res_;
}
value
Val_Entity(GdomeEntity* obj)
{
static struct custom_operations ops = {
"http://gmetadom.sourceforge.net/gdome_caml/Core/Entity",
ml_gdome_ent_finalize,
ml_gdome_ent_compare,
custom_hash_default,
custom_serialize_default,
custom_deserialize_default
};
value v = alloc_custom(&ops, sizeof(GdomeEntity*), 0, 1);
g_assert(obj != NULL);
*((GdomeEntity**) Data_custom_val(v)) = obj;
return v;
}
value
ml_gdome_ent_of_n(value obj)
{
CAMLparam1(obj);
GdomeException exc_;
GdomeEntity* obj_;
obj_ = gdome_cast_ent((GdomeNode*) Node_val(obj));
if (obj_ == 0) throw_cast_exception("Entity");
gdome_ent_ref(obj_, &exc_);
if (exc_ != 0) throw_exception(exc_, "Entity casting from Node");
CAMLreturn(Val_Entity(obj_));
}
value
ml_gdome_ent_get_publicId(value self)
{
CAMLparam1(self);
GdomeException exc_;
GdomeDOMString* res_;
value res__;
res_ = gdome_ent_publicId(Entity_val(self), &exc_);
if (exc_ != 0) throw_exception(exc_, "Entity.get_publicId");
CAMLreturn(Val_option_ptr(res_,Val_DOMString));
}
value
ml_gdome_ent_get_systemId(value self)
{
CAMLparam1(self);
GdomeException exc_;
GdomeDOMString* res_;
value res__;
res_ = gdome_ent_systemId(Entity_val(self), &exc_);
if (exc_ != 0) throw_exception(exc_, "Entity.get_systemId");
CAMLreturn(Val_option_ptr(res_,Val_DOMString));
}
value
ml_gdome_ent_get_notationName(value self)
{
CAMLparam1(self);
GdomeException exc_;
GdomeDOMString* res_;
value res__;
res_ = gdome_ent_notationName(Entity_val(self), &exc_);
if (exc_ != 0) throw_exception(exc_, "Entity.get_notationName");
CAMLreturn(Val_option_ptr(res_,Val_DOMString));
}
gmetadom-0.2.6/src/gdome_caml/core/ml_DocumentType.c 0000644 0001750 0001750 00000011103 10704632503 017313 0000000 0000000
/* This file is part of GMetaDOM
* a generic bind package for the Document Object Model API.
* Copyright (C) 2001-2002 Luca Padovani
* 2002 Claudio Sacerdoti Coen
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
* For more information, please visit the project home page
* http://gmetadom.sourceforge.net
* or send an email to
*
* DO NOT EDIT: this file has been generated automatically by GMetaDOM
*/
#include
#include
#include
#include
#include "mlgdomevalue.h"
static void
ml_gdome_dt_finalize(value v)
{
GdomeException exc_ = 0;
GdomeDocumentType* obj_ = DocumentType_val(v);
g_assert(obj_ != NULL);
gdome_dt_unref(obj_, &exc_);
assert(exc_ == 0);
}
static int
ml_gdome_dt_compare(value v1, value v2)
{
CAMLparam2(v1,v2);
GdomeDocumentType* obj1_ = DocumentType_val(v1);
GdomeDocumentType* obj2_ = DocumentType_val(v2);
CAMLreturn((int) (obj1_ - obj2_));
}
GdomeDocumentType*
DocumentType_val(value v)
{
GdomeDocumentType* res_ = *((GdomeDocumentType**) Data_custom_val(v));
g_assert(res_ != NULL);
return res_;
}
value
Val_DocumentType(GdomeDocumentType* obj)
{
static struct custom_operations ops = {
"http://gmetadom.sourceforge.net/gdome_caml/Core/DocumentType",
ml_gdome_dt_finalize,
ml_gdome_dt_compare,
custom_hash_default,
custom_serialize_default,
custom_deserialize_default
};
value v = alloc_custom(&ops, sizeof(GdomeDocumentType*), 0, 1);
g_assert(obj != NULL);
*((GdomeDocumentType**) Data_custom_val(v)) = obj;
return v;
}
value
ml_gdome_dt_of_n(value obj)
{
CAMLparam1(obj);
GdomeException exc_;
GdomeDocumentType* obj_;
obj_ = gdome_cast_dt((GdomeNode*) Node_val(obj));
if (obj_ == 0) throw_cast_exception("DocumentType");
gdome_dt_ref(obj_, &exc_);
if (exc_ != 0) throw_exception(exc_, "DocumentType casting from Node");
CAMLreturn(Val_DocumentType(obj_));
}
value
ml_gdome_dt_get_name(value self)
{
CAMLparam1(self);
GdomeException exc_;
GdomeDOMString* res_;
value res__;
res_ = gdome_dt_name(DocumentType_val(self), &exc_);
if (exc_ != 0) throw_exception(exc_, "DocumentType.get_name");
g_assert(res_ != NULL);
CAMLreturn(Val_DOMString(res_));
}
value
ml_gdome_dt_get_entities(value self)
{
CAMLparam1(self);
GdomeException exc_;
GdomeNamedNodeMap* res_;
res_ = gdome_dt_entities(DocumentType_val(self), &exc_);
if (exc_ != 0) throw_exception(exc_, "DocumentType.get_entities");
g_assert(res_ != NULL);
CAMLreturn(Val_NamedNodeMap(res_));
}
value
ml_gdome_dt_get_notations(value self)
{
CAMLparam1(self);
GdomeException exc_;
GdomeNamedNodeMap* res_;
res_ = gdome_dt_notations(DocumentType_val(self), &exc_);
if (exc_ != 0) throw_exception(exc_, "DocumentType.get_notations");
g_assert(res_ != NULL);
CAMLreturn(Val_NamedNodeMap(res_));
}
value
ml_gdome_dt_get_publicId(value self)
{
CAMLparam1(self);
GdomeException exc_;
GdomeDOMString* res_;
value res__;
res_ = gdome_dt_publicId(DocumentType_val(self), &exc_);
if (exc_ != 0) throw_exception(exc_, "DocumentType.get_publicId");
g_assert(res_ != NULL);
CAMLreturn(Val_DOMString(res_));
}
value
ml_gdome_dt_get_systemId(value self)
{
CAMLparam1(self);
GdomeException exc_;
GdomeDOMString* res_;
value res__;
res_ = gdome_dt_systemId(DocumentType_val(self), &exc_);
if (exc_ != 0) throw_exception(exc_, "DocumentType.get_systemId");
g_assert(res_ != NULL);
CAMLreturn(Val_DOMString(res_));
}
value
ml_gdome_dt_get_internalSubset(value self)
{
CAMLparam1(self);
GdomeException exc_;
GdomeDOMString* res_;
value res__;
res_ = gdome_dt_internalSubset(DocumentType_val(self), &exc_);
if (exc_ != 0) throw_exception(exc_, "DocumentType.get_internalSubset");
g_assert(res_ != NULL);
CAMLreturn(Val_DOMString(res_));
}
gmetadom-0.2.6/src/gdome_caml/core/iText.ml 0000644 0001750 0001750 00000002533 10704632504 015476 0000000 0000000
(* This file is part of GMetaDOM
* a generic bind package for the Document Object Model API.
* Copyright (C) 2001-2002 Luca Padovani
* 2002 Claudio Sacerdoti Coen
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
* For more information, please visit the project home page
* http://gmetadom.sourceforge.net
* or send an email to
*
* DO NOT EDIT: this file has been generated automatically by GMetaDOM
*)
external of_Node : [> `Node] GdomeT.t -> TText.t = "ml_gdome_t_of_n"
external splitText : this:[> `Text] GdomeT.t -> offset:int -> TText.t = "ml_gdome_t_splitText" gmetadom-0.2.6/src/gdome_caml/core/ml_NodeList.c 0000644 0001750 0001750 00000005465 10704632503 016432 0000000 0000000
/* This file is part of GMetaDOM
* a generic bind package for the Document Object Model API.
* Copyright (C) 2001-2002 Luca Padovani
* 2002 Claudio Sacerdoti Coen
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
* For more information, please visit the project home page
* http://gmetadom.sourceforge.net
* or send an email to
*
* DO NOT EDIT: this file has been generated automatically by GMetaDOM
*/
#include
#include
#include
#include
#include "mlgdomevalue.h"
static void
ml_gdome_nl_finalize(value v)
{
GdomeException exc_ = 0;
GdomeNodeList* obj_ = NodeList_val(v);
g_assert(obj_ != NULL);
gdome_nl_unref(obj_, &exc_);
assert(exc_ == 0);
}
static int
ml_gdome_nl_compare(value v1, value v2)
{
CAMLparam2(v1,v2);
GdomeNodeList* obj1_ = NodeList_val(v1);
GdomeNodeList* obj2_ = NodeList_val(v2);
CAMLreturn((int) (obj1_ - obj2_));
}
GdomeNodeList*
NodeList_val(value v)
{
GdomeNodeList* res_ = *((GdomeNodeList**) Data_custom_val(v));
g_assert(res_ != NULL);
return res_;
}
value
Val_NodeList(GdomeNodeList* obj)
{
static struct custom_operations ops = {
"http://gmetadom.sourceforge.net/gdome_caml/Core/NodeList",
ml_gdome_nl_finalize,
ml_gdome_nl_compare,
custom_hash_default,
custom_serialize_default,
custom_deserialize_default
};
value v = alloc_custom(&ops, sizeof(GdomeNodeList*), 0, 1);
g_assert(obj != NULL);
*((GdomeNodeList**) Data_custom_val(v)) = obj;
return v;
}
value
ml_gdome_nl_get_length(value self)
{
CAMLparam1(self);
GdomeException exc_;
unsigned long res_;
res_ = gdome_nl_length(NodeList_val(self), &exc_);
if (exc_ != 0) throw_exception(exc_, "NodeList.get_length");
CAMLreturn(Val_int(res_));
}
value
ml_gdome_nl_item(value self, value p_index)
{
CAMLparam2(self, p_index);
GdomeException exc_;
GdomeNode* res_;
res_ = gdome_nl_item(NodeList_val(self), Int_val(p_index), &exc_);
if (exc_ != 0) throw_exception(exc_, "NodeList.item");
CAMLreturn(Val_option_ptr(res_,Val_Node));
}
gmetadom-0.2.6/src/gdome_caml/core/iDocumentFragment.ml 0000644 0001750 0001750 00000002411 10704632504 020007 0000000 0000000
(* This file is part of GMetaDOM
* a generic bind package for the Document Object Model API.
* Copyright (C) 2001-2002 Luca Padovani
* 2002 Claudio Sacerdoti Coen
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
* For more information, please visit the project home page
* http://gmetadom.sourceforge.net
* or send an email to
*
* DO NOT EDIT: this file has been generated automatically by GMetaDOM
*)
external of_Node : [> `Node] GdomeT.t -> TDocumentFragment.t = "ml_gdome_df_of_n"
gmetadom-0.2.6/src/gdome_caml/core/ml_ProcessingInstruction.c 0000644 0001750 0001750 00000007466 10704632504 021273 0000000 0000000
/* This file is part of GMetaDOM
* a generic bind package for the Document Object Model API.
* Copyright (C) 2001-2002 Luca Padovani
* 2002 Claudio Sacerdoti Coen
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
* For more information, please visit the project home page
* http://gmetadom.sourceforge.net
* or send an email to
*
* DO NOT EDIT: this file has been generated automatically by GMetaDOM
*/
#include
#include
#include
#include
#include "mlgdomevalue.h"
static void
ml_gdome_pi_finalize(value v)
{
GdomeException exc_ = 0;
GdomeProcessingInstruction* obj_ = ProcessingInstruction_val(v);
g_assert(obj_ != NULL);
gdome_pi_unref(obj_, &exc_);
assert(exc_ == 0);
}
static int
ml_gdome_pi_compare(value v1, value v2)
{
CAMLparam2(v1,v2);
GdomeProcessingInstruction* obj1_ = ProcessingInstruction_val(v1);
GdomeProcessingInstruction* obj2_ = ProcessingInstruction_val(v2);
CAMLreturn((int) (obj1_ - obj2_));
}
GdomeProcessingInstruction*
ProcessingInstruction_val(value v)
{
GdomeProcessingInstruction* res_ = *((GdomeProcessingInstruction**) Data_custom_val(v));
g_assert(res_ != NULL);
return res_;
}
value
Val_ProcessingInstruction(GdomeProcessingInstruction* obj)
{
static struct custom_operations ops = {
"http://gmetadom.sourceforge.net/gdome_caml/Core/ProcessingInstruction",
ml_gdome_pi_finalize,
ml_gdome_pi_compare,
custom_hash_default,
custom_serialize_default,
custom_deserialize_default
};
value v = alloc_custom(&ops, sizeof(GdomeProcessingInstruction*), 0, 1);
g_assert(obj != NULL);
*((GdomeProcessingInstruction**) Data_custom_val(v)) = obj;
return v;
}
value
ml_gdome_pi_of_n(value obj)
{
CAMLparam1(obj);
GdomeException exc_;
GdomeProcessingInstruction* obj_;
obj_ = gdome_cast_pi((GdomeNode*) Node_val(obj));
if (obj_ == 0) throw_cast_exception("ProcessingInstruction");
gdome_pi_ref(obj_, &exc_);
if (exc_ != 0) throw_exception(exc_, "ProcessingInstruction casting from Node");
CAMLreturn(Val_ProcessingInstruction(obj_));
}
value
ml_gdome_pi_get_target(value self)
{
CAMLparam1(self);
GdomeException exc_;
GdomeDOMString* res_;
value res__;
res_ = gdome_pi_target(ProcessingInstruction_val(self), &exc_);
if (exc_ != 0) throw_exception(exc_, "ProcessingInstruction.get_target");
g_assert(res_ != NULL);
CAMLreturn(Val_DOMString(res_));
}
value
ml_gdome_pi_get_data(value self)
{
CAMLparam1(self);
GdomeException exc_;
GdomeDOMString* res_;
value res__;
res_ = gdome_pi_data(ProcessingInstruction_val(self), &exc_);
if (exc_ != 0) throw_exception(exc_, "ProcessingInstruction.get_data");
g_assert(res_ != NULL);
CAMLreturn(Val_DOMString(res_));
}
value
ml_gdome_pi_set_data(value self, value p_v)
{
CAMLparam2(self, p_v);
GdomeException exc_;
GdomeDOMString* p_v_ = DOMString_val(p_v);
gdome_pi_set_data(ProcessingInstruction_val(self), p_v_, &exc_);
if (exc_ != 0) throw_exception(exc_, "ProcessingInstruction.set_data");
CAMLreturn(Val_unit);
}
gmetadom-0.2.6/src/gdome_caml/core/iNotation.ml 0000644 0001750 0001750 00000002730 10704632504 016344 0000000 0000000
(* This file is part of GMetaDOM
* a generic bind package for the Document Object Model API.
* Copyright (C) 2001-2002 Luca Padovani
* 2002 Claudio Sacerdoti Coen
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
* For more information, please visit the project home page
* http://gmetadom.sourceforge.net
* or send an email to
*
* DO NOT EDIT: this file has been generated automatically by GMetaDOM
*)
external of_Node : [> `Node] GdomeT.t -> TNotation.t = "ml_gdome_not_of_n"
external get_publicId : this:[> `Notation] GdomeT.t -> TDOMString.t option = "ml_gdome_not_get_publicId"
external get_systemId : this:[> `Notation] GdomeT.t -> TDOMString.t option = "ml_gdome_not_get_systemId"
gmetadom-0.2.6/src/gdome_caml/core/iElement.ml 0000644 0001750 0001750 00000006622 10704632504 016146 0000000 0000000
(* This file is part of GMetaDOM
* a generic bind package for the Document Object Model API.
* Copyright (C) 2001-2002 Luca Padovani
* 2002 Claudio Sacerdoti Coen
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
* For more information, please visit the project home page
* http://gmetadom.sourceforge.net
* or send an email to
*
* DO NOT EDIT: this file has been generated automatically by GMetaDOM
*)
external of_Node : [> `Node] GdomeT.t -> TElement.t = "ml_gdome_el_of_n"
external get_tagName : this:[> `Element] GdomeT.t -> TDOMString.t = "ml_gdome_el_get_tagName"
external getAttribute : this:[> `Element] GdomeT.t -> name:TDOMString.t -> TDOMString.t = "ml_gdome_el_getAttribute"
external setAttribute : this:[> `Element] GdomeT.t -> name:TDOMString.t -> value:TDOMString.t -> unit = "ml_gdome_el_setAttribute"
external removeAttribute : this:[> `Element] GdomeT.t -> name:TDOMString.t -> unit = "ml_gdome_el_removeAttribute"
external getAttributeNode : this:[> `Element] GdomeT.t -> name:TDOMString.t -> TAttr.t option = "ml_gdome_el_getAttributeNode"
external setAttributeNode : this:[> `Element] GdomeT.t -> newAttr:[> `Attr] GdomeT.t -> TAttr.t = "ml_gdome_el_setAttributeNode"
external removeAttributeNode : this:[> `Element] GdomeT.t -> oldAttr:[> `Attr] GdomeT.t -> TAttr.t = "ml_gdome_el_removeAttributeNode"
external getElementsByTagName : this:[> `Element] GdomeT.t -> name:TDOMString.t -> TNodeList.t = "ml_gdome_el_getElementsByTagName"
external getAttributeNS : this:[> `Element] GdomeT.t -> namespaceURI:TDOMString.t -> localName:TDOMString.t -> TDOMString.t = "ml_gdome_el_getAttributeNS"
external setAttributeNS : this:[> `Element] GdomeT.t -> namespaceURI:TDOMString.t option -> qualifiedName:TDOMString.t -> value:TDOMString.t -> unit = "ml_gdome_el_setAttributeNS"
external removeAttributeNS : this:[> `Element] GdomeT.t -> namespaceURI:TDOMString.t -> localName:TDOMString.t -> unit = "ml_gdome_el_removeAttributeNS"
external getAttributeNodeNS : this:[> `Element] GdomeT.t -> namespaceURI:TDOMString.t -> localName:TDOMString.t -> TAttr.t option = "ml_gdome_el_getAttributeNodeNS"
external setAttributeNodeNS : this:[> `Element] GdomeT.t -> newAttr:[> `Attr] GdomeT.t -> TAttr.t = "ml_gdome_el_setAttributeNodeNS"
external getElementsByTagNameNS : this:[> `Element] GdomeT.t -> namespaceURI:TDOMString.t -> localName:TDOMString.t -> TNodeList.t = "ml_gdome_el_getElementsByTagNameNS"
external hasAttribute : this:[> `Element] GdomeT.t -> name:TDOMString.t -> bool = "ml_gdome_el_hasAttribute"
external hasAttributeNS : this:[> `Element] GdomeT.t -> namespaceURI:TDOMString.t -> localName:TDOMString.t -> bool = "ml_gdome_el_hasAttributeNS" gmetadom-0.2.6/src/gdome_caml/core/Makefile.am 0000644 0001750 0001750 00000006044 10703700343 016100 0000000 0000000
OCAMLBUILDDIR = $(top_builddir)/src/gdome_caml
OCAMLINSTALLDIR = $(DESTDIR)$(OCAML_LIB_PREFIX)/gdome2
OCAMLFLAGS = -I $(OCAMLBUILDDIR)/types -I $(OCAMLBUILDDIR)/basic
OCAMLC = @OCAMLC@ ${OCAMLFLAGS}
OCAMLOPT = @OCAMLOPT@ ${OCAMLFLAGS}
OCAMLDEP = @OCAMLDEP@
OCAML_CFLAGS = @OCAML_CFLAGS@
AUTO_C = \
ml_Node.c \
ml_NodeList.c \
ml_NamedNodeMap.c \
ml_CharacterData.c \
ml_Attr.c \
ml_Element.c \
ml_Text.c \
ml_Comment.c \
ml_CDATASection.c \
ml_DocumentType.c \
ml_Notation.c \
ml_Entity.c \
ml_EntityReference.c \
ml_ProcessingInstruction.c \
ml_DocumentFragment.c \
ml_Document.c
I_AUTO_ML = \
iNode.ml \
iNodeList.ml \
iNamedNodeMap.ml \
iCharacterData.ml \
iAttr.ml \
iElement.ml \
iText.ml \
iComment.ml \
iCDATASection.ml \
iDocumentType.ml \
iNotation.ml \
iEntity.ml \
iEntityReference.ml \
iProcessingInstruction.ml \
iDocumentFragment.ml \
iDocument.ml
# OCaml objects
OCAML_OBJECTS = $(I_AUTO_ML:%.ml=%.cmo) \
$(I_AUTO_ML:%.ml=%.cmi) \
$(I_AUTO_ML:%.ml=%.cmx) \
$(I_AUTO_ML:%.ml=%.o)
BUILT_SOURCES = $(AUTO_C) $(I_AUTO_ML)
MAINTAINERCLEANFILES = \
$(AUTO_C) \
$(I_AUTO_ML)
CLEANFILES = \
$(OCAML_OBJECTS)
EXTRA_DIST = $(AUTO_C) $(I_AUTO_ML) .depend .linkorder
XML2C = $(srcdir)/../xsl/xml2c.xsl
XML2MLI = $(srcdir)/../xsl/xml2mli.xsl
if HAVE_OCAMLOPT_COND
noinst_DATA = $(I_AUTO_ML:%.ml=%.cmo) $(I_AUTO_ML:%.ml=%.cmx)
else
noinst_DATA = $(I_AUTO_ML:%.ml=%.cmo)
endif
noinst_LTLIBRARIES = libcore.la
libcore_la_SOURCES = $(AUTO_C)
$(AUTO_C) : $(XML2C)
$(I_AUTO_ML) : $(XML2MLI)
if HAVE_XSLTPROC_COND
ml_%.c : $(top_srcdir)/xml/DOM/Core/%.xml
$(XSLTPROC) --param uriprefix "'$(top_srcdir)/xml/DOM/Core'" --param annotations "'$(srcdir)/../xml/Core/$*.xml'" $(XML2C) $< >$@
i%.ml : $(top_srcdir)/xml/DOM/Core/%.xml $(srcdir)/../xml/Core/%.xml
$(XSLTPROC) --param uriprefix "'$(top_srcdir)/xml/DOM/Core'" --param annotations "'$(srcdir)/../xml/Core/$*.xml'" $(XML2MLI) $< >$@
endif
INCLUDES = \
$(OCAML_CFLAGS) \
$(GDOME_CFLAGS) \
-I$(srcdir)/../include
install-data-local: $(I_AUTO_ML:%.ml=%.cmi)
$(mkinstalldirs) $(OCAMLINSTALLDIR)
for i in $^; do \
$(INSTALL_DATA) $$i $(OCAMLINSTALLDIR); \
done
for i in $(I_AUTO_ML); do \
$(INSTALL_DATA) $(srcdir)/$$i $(OCAMLINSTALLDIR); \
done
#### OCaml only stuff from now on
DEPOBJS = $(I_AUTO_ML)
LINKORDER = iNode iNodeList iNamedNodeMap iCharacterData iAttr iElement iText iComment iCDATASection iDocumentType iNotation iEntity iEntityReference iProcessingInstruction iDocumentFragment iDocument
depend:
$(OCAMLDEP) $(DEPOBJS) > .depend
echo "$(LINKORDER)" > .linkorder
%.cmi : $(srcdir)/%.mli
if test ! -e $(@:%.cmi=%.mli) -a "x$(srcdir)" != "x." ; then $(LN_S) $< . ; fi
$(OCAMLC) -c $(@:%.cmi=%.mli)
%.cmo : $(srcdir)/%.ml
if test ! -e $(@:%.cmo=%.ml) -a "x$(srcdir)" != "x." ; then $(LN_S) $< . ; fi
$(OCAMLC) -c $(@:%.cmo=%.ml)
%.cmx %.o : $(srcdir)/%.ml
if test ! -e $(@:%.cmx=%.ml) -a "x$(srcdir)" != "x." ; then $(LN_S) $< . ; fi
$(OCAMLOPT) -c $(@:%.cmx=%.ml)
include .depend
gmetadom-0.2.6/src/gdome_caml/core/iNamedNodeMap.ml 0000644 0001750 0001750 00000004271 10704632504 017043 0000000 0000000
(* This file is part of GMetaDOM
* a generic bind package for the Document Object Model API.
* Copyright (C) 2001-2002 Luca Padovani
* 2002 Claudio Sacerdoti Coen
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
* For more information, please visit the project home page
* http://gmetadom.sourceforge.net
* or send an email to
*
* DO NOT EDIT: this file has been generated automatically by GMetaDOM
*)
external get_length : this:[> `NamedNodeMap] GdomeT.t -> int = "ml_gdome_nnm_get_length"
external getNamedItem : this:[> `NamedNodeMap] GdomeT.t -> name:TDOMString.t -> TNode.t option = "ml_gdome_nnm_getNamedItem"
external setNamedItem : this:[> `NamedNodeMap] GdomeT.t -> arg:[> `Node] GdomeT.t -> TNode.t option = "ml_gdome_nnm_setNamedItem"
external removeNamedItem : this:[> `NamedNodeMap] GdomeT.t -> name:TDOMString.t -> TNode.t = "ml_gdome_nnm_removeNamedItem"
external item : this:[> `NamedNodeMap] GdomeT.t -> index:int -> TNode.t option = "ml_gdome_nnm_item"
external getNamedItemNS : this:[> `NamedNodeMap] GdomeT.t -> namespaceURI:TDOMString.t -> localName:TDOMString.t -> TNode.t option = "ml_gdome_nnm_getNamedItemNS"
external setNamedItemNS : this:[> `NamedNodeMap] GdomeT.t -> arg:[> `Node] GdomeT.t -> TNode.t option = "ml_gdome_nnm_setNamedItemNS"
external removeNamedItemNS : this:[> `NamedNodeMap] GdomeT.t -> namespaceURI:TDOMString.t -> localName:TDOMString.t -> TNode.t = "ml_gdome_nnm_removeNamedItemNS" gmetadom-0.2.6/src/gdome_caml/core/iComment.ml 0000644 0001750 0001750 00000002377 10704632504 016162 0000000 0000000
(* This file is part of GMetaDOM
* a generic bind package for the Document Object Model API.
* Copyright (C) 2001-2002 Luca Padovani
* 2002 Claudio Sacerdoti Coen
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
* For more information, please visit the project home page
* http://gmetadom.sourceforge.net
* or send an email to
*
* DO NOT EDIT: this file has been generated automatically by GMetaDOM
*)
external of_Node : [> `Node] GdomeT.t -> TComment.t = "ml_gdome_c_of_n"
gmetadom-0.2.6/src/gdome_caml/core/iProcessingInstruction.ml 0000644 0001750 0001750 00000003127 10704632504 021130 0000000 0000000
(* This file is part of GMetaDOM
* a generic bind package for the Document Object Model API.
* Copyright (C) 2001-2002 Luca Padovani
* 2002 Claudio Sacerdoti Coen
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
* For more information, please visit the project home page
* http://gmetadom.sourceforge.net
* or send an email to
*
* DO NOT EDIT: this file has been generated automatically by GMetaDOM
*)
external of_Node : [> `Node] GdomeT.t -> TProcessingInstruction.t = "ml_gdome_pi_of_n"
external get_target : this:[> `ProcessingInstruction] GdomeT.t -> TDOMString.t = "ml_gdome_pi_get_target"
external get_data : this:[> `ProcessingInstruction] GdomeT.t -> TDOMString.t = "ml_gdome_pi_get_data"
external set_data : this:[> `ProcessingInstruction] GdomeT.t -> value:TDOMString.t -> unit = "ml_gdome_pi_set_data"
gmetadom-0.2.6/src/gdome_caml/core/ml_Node.c 0000644 0001750 0001750 00000023552 10704632503 015573 0000000 0000000
/* This file is part of GMetaDOM
* a generic bind package for the Document Object Model API.
* Copyright (C) 2001-2002 Luca Padovani
* 2002 Claudio Sacerdoti Coen
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
* For more information, please visit the project home page
* http://gmetadom.sourceforge.net
* or send an email to