]>
Programming Interface for the Kino XML/CSS processor2.4.0Eckhart Köppen
The Kino XML/CSS processor is a tree/event-based XML parser which
is also capable of processing CSS style sheets. It consists of a
parser and a DOM interface.
DOM InterfaceThe DOM interface contains all functions necessary to
inspect and modify the DOM tree created by the parser. It follows
closely the DOM Level 1 specification.NodeNewCreates and initializes a new nodeNode *the created and initialized nodevoidElementNewCreates and initializes a new elementElement *voidDocumentNewCreates and initializes a new documentDocument *voidTextNewCreates and initializes a new text elementText *voidInsetNewCreates and initializes a new inset elementInset *voidCDATASectionNewCreates and initializes a new CDATA section
elementCDATASection *voidNodeDeleteRemoves a node from the DOM tree and frees it,
including child nodesvoidNode *the node to be freedNodeGetNodeType
Returns the type of the node (ELEMENT_NODE = 1, ATTRIBUTE_NODE
= 2, TEXT_NODE = 3, CDATA_SECTION_NODE = 4,
ENTITY_REFERENCE_NODE = 5, ENTITY_NODE = 6,
PROCESSING_INSTRUCTION_NODE = 7, COMMENT_NODE = 8,
DOCUMENT_NODE = 9, DOCUMENT_TYPE_NODE = 10,
DOCUMENT_FRAGMENT_NODE = 11, NOTATION_NODE = 12, INSET_NODE =
9000, LINEBREAK_NODE = 9001)
intNode *the current nodeNodeGetParentNodeReturns the parent NodeNode *Node *the current nodeNodeGetOwnerDocumentReturns the containing document of the
NodeDocument *Node *the current nodeNodeGetPreviousSiblingReturns the previous sibling (within the child list
of the parent node) of a nodeNode *Node *the current nodeNodeGetNextSiblingReturns the previous sibling (within the child list
of the parent node) of a nodeNode *Node *the current nodeNodeHasChildNodesreturns 1 if a node has child nodes, 0
otherwiseintNode *the current nodeNodeGetFirstChildReturns the first child node of a nodeNode*Node *the current nodeNodeGetLastChildReturns the last child node of a nodeNode*Node *the current nodeNodeAppendChildAppends a node at the end of the child list of a
given nodevoidNode *the node containing the child listNode *the node to be appendedNodeInsertBeforeInserts a node before a given node in the child
list of a parent nodevoidNode *the node containing the child listNode *NULL | Node *the node before the new node is to be inserted or
NULL if the new node is to be appended at the end of the
child listNode *the node to be insertedNodeReplaceChildReplaces a child node and returns the replaced
nodeNode *the replaced nodeNode *the node containing the child listNode *the node to be replacedNode *the new nodeNodeRemoveChildRemoves a node from the child list and returns the
removed nodeNode *the removed nodeNode *the node containing the child listNode *the node to be removedNodePrintPrints an internal representation of a node and its
childrenvoidNode *the node to be printedintthe indentiation levelNodeToTextReturns the XML source text for the given node and
its childrenchar *the textual representationNode *the node to be inspectedNodeParentLookupLooks for a node with a given attribute value in
the parent chain of a nodeNode *Node *the current nodechar *the attribute namechar *the attribute value to look forNodeChildLookupLooks for a node with a given attribute value among
the children of a nodeNode *Node *the current nodechar *the attribute namechar *the attribute value to look forNodeGetSuccessorReturns the next node in a depth-first
traversalNode *the following node in a depth-first
traversalNode *the current nodeTextGetDataReturns a reference to the value of a text
elementchar *a pointer to the textText *the current elementTextSetDataSets the value of a text element, releases memory
held by the old valuevoidText *the current elementchar *the new valueCDATASectionGetDataReturns a reference to the value of a CDATA section
elementchar *a pointer to the textCDATASection *the current elementCDATASectionSetDataSets the value of a CDATA section element, releases memory
held by the old valuevoidCDATASection *the current elementchar *the new valueDocumentGetElementsByTagNameReturns a list of sub-elements which have a given
tag name or all sub-elements if the given name is "*"NodeList *the list of sub-elementsDocument *the document where the search startschar *the tag name to look forElementGetTagNameReturns the tag name of an elementchar *Element *the current elementElementSetTagNameSets the tag name of an element, releases memory
held by old tag namevoidElement *the current elementchar *the new tag nameElementGetNSPrefixReturns the namespace prefix of an elementchar *Element *the current elementElementSetNSPrefixSets the namespace prefix of an element, releases memory
held by old prefixvoidElement *the current elementchar *the new namespace prefixElementGetAttributeReturns the value of a given attributechar *Element *the current elementchar *the attribute nameElementSetAttributeSets the value of an attribute, releases memory
held by old attribute valuevoidElement *the current elementchar *the attribute namechar *the new attribute valueElementSetContentsSets the textual contents of a Element. The contents
is stored in a single Text element. Any previous contents is
deletedvoidElement *the current elementchar *the new contentsElementGetContentsReturns the textual contents of a Element. Any
non-textual context is ignored. The result is a new
allocated string which has to be freed by the callerchar *Element *the current elementElementSetDefaultAttributesSets the default attribute values according to the
DTDvoidElement *the current elementElementSetInheritedCopies the inheritable CSS attributes from the
parent elementvoidElement *the current elementElementGetElementsByTagNameReturns a list of sub-elements which have a given
tag name or all sub-elements if the given name is "*"NodeList *the list of sub-elementsElement *the element where the search startschar *the tag name to look forNodeListNewCreates a new NodeListNodeList *the created NodeListvoidNodeListDeleteDeletes a NodeList (not its contents!)voidNodeList *the NodeList to be deletedNodeListAppendItemAppends a Node at the end of a NodeListintthe index of the appended NodeNodeList *the NodeList where the Node is appendedNode *the Node to be appendedNodeListGetLengthReturns the number of items in a NodeListintthe number of items in the listNodeList *the NodeListNodeListGetItemReturns the Node at the given positionNode *The Node or NULL if the position is out of
rangeNodeList *the NodeListintthe position (starting at zero)NodeListRemoveItemRemoves all occurences of a node from the listNode *the last of the removed nodeNodeList *the NodeListNode *the Node to be removedElementMatchMatches a given Element hierarchy against a pattern
hierarchyNodeList *the list of nodes that matched the pattern
nodes or NULL if the pattern did not matchElement *the given hierarchyElement *the pattern hierarchyParser InterfaceParserHolds state information of a parserParserNewCreates a new parser objectParser *The newly allocated parser objectParserDeleteDeletes a parser objectvoidParser *The parser object to be deletedParserSetStartElementSets the start element for a following parse
processvoidParser *Element *ParserSetDocumentSets the start document for the parsing
processvoidParser *Document *ParserSetURIvoidParser *char *ParserProcessDataProcess a piece of data after the parser has been
prepared with an initial document, URI and start
elementElement *The original element where the parse
process has bee startedParser *The parser to be used for parsingchar *the MIME type of the text to be parsed (possible
values are currently text/xml, text/html, text/css and
text/plain)char *the text to be parsedAHD InterfaceAHDRuntimeNewCreate a new instance of an AHD runtimeAHDRuntime *intport number of the internal AHD server or 0 if no
server is to be usedchar *NULL | char *root directory of the internal AHD server or NULL
if no server is to be usedAHDRuntimeDeleteDeletes a runtime objectvoidAHDRuntime *The object to be deletedAHDRuntimeAddScriptHandlerAdd a script handler to the runtimevoidAHDRuntime *The AHD runtimeHandlerProcPointer to the script handlervoid *Callback dataAHDRuntimeDocumentInitInitialize a document to be used with a
runtimevoidAHDRuntime *The AHD runtimeDocument *The document to be initializedAHDRuntimeLoadLoad a remote document referenced by a URIDocument *The loaded documentAHDRuntime *The AHD runtimechar *The document's URIAHDRuntimeUnloadRemoves a document from the runtimevoidAHDRuntime *The AHD runtimeDocument *The document to be unloadedAHDRuntimeSaveSaves a document under its original location (only
for runtime-local documents)voidAHDRuntime *The AHD runtimeDocument *The document to be savedAHDRuntimeStoreStores a document in a remote runtime and activates
it therevoidAHDRuntime *The AHD runtimeDocument *The document to be storedchar *the remote URLchar *the origin address for this documentAHDRuntimeCallCalls an AHD function within a document using
parent delegationchar *The result of the called functionAHDRuntime *The AHD runtimeNode *The current node where the call originateschar *The function namechar *The URL encoded parameters in name/value
pairsAHDRuntimeBroadcastCallBroadcast call of an AHD function within a
documentvoidAHDRuntime *The AHD runtimeNode *The current node where the call originateschar *The function namechar *The URL encoded parameters in name/value
pairsAHDRuntimeGetReturns the value of an AHD variable using parent
delegationchar *The value of the variableAHDRuntime *The AHD runtimeNode *The current node where the call originateschar *The variable nameAHDRuntimePutSets the value of an AHD variable using parent
delegationchar *Depending on the target of the requestAHDRuntime *The AHD runtimeNode *The current node where the call originateschar *The variable namechar *The value of the variableAHDRuntimeMatchMatches a given Element hierarchy against a pattern
hierarchy, triggering onmatch eventsNodeList *the list of nodes that matched the pattern
nodes or NULL if the pattern did not matchAHDRuntime *the runtime executing the onmatch eventsElement *the given hierarchyElement *the pattern hierarchyAHDRuntimeHereReturns the hostname and port number of the given
AHD runtimechar *the hostname and port number as
"hostname:port"AHDRuntime *the runtimeAHDRuntimeGetLoadedDocumentsReturns a list of the currently loaded documents in
the runtimeNodeList *the list of loaded documentsAHDRuntime *the runtimeAHDRuntimeGetOriginReturns the origin URL of a given documentchar *the origin URLAHDRuntime *the runtimeDocument *the documentWidget Related FunctionsHTMLInputElementNewCreates a new HTML FORM Input elementElement *Document *the owning documentHTMLTextareaElementNewCreates a new HTML FORM Textarea elementElement *Document *the owning documentHTMLButtonElementNewCreates a new HTML FORM Button elementElement *Document *the owning documentElementSetCSSPropertiesSets the values of all CSS property for an element
according to the current style sheetvoidElement *the elementElementSetCSSPropertySets the value of a CSS propertyvoidElement *the elementchar *the name of the propertychar *the value of the propertyElementGetCSSPropertyReturns the value of a CSS propertychar *the value of the propertychar *the name of the property
#include
#include
#include
#include
#include
#include
#include
#include
#include
#ifdef HAVE_LIBPTHREAD
#include
#endif
#include
#endif
#include
#include
#include
%}
%typemap(ret) char * ElementGetContents, char * NodeToText {
free ($source);
}
]]>
include
include
#########################################################################
void
KinoRelayout
in: Widget
void
KinoRefresh
in: Widget
void
KinoSetDocument
in: KinoWidget
in: NULL | Document *
void
KinoDocumentSetHandlers
in: Document *
in: KinoWidget
Document *
KinoGetDocument
in: KinoWidget
void
StyleSetBoxProperty
in: Element *
in: String
in: String
void
StyleSetBoxProperties
in: Element *
String
StyleGetBoxProperty
in: Element *
in: String
]]>