Blame doc/devhelp/libxml2-xlink.html

Packit 423ecb
Packit 423ecb
<html>
Packit 423ecb
  <head>
Packit 423ecb
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
Packit 423ecb
    <title>xlink: unfinished XLink detection module</title>
Packit 423ecb
    <meta name="generator" content="Libxml2 devhelp stylesheet"/>
Packit 423ecb
    <link rel="start" href="index.html" title="libxml2 Reference Manual"/>
Packit 423ecb
    <link rel="up" href="general.html" title="API"/>
Packit 423ecb
    <link rel="stylesheet" href="style.css" type="text/css"/>
Packit 423ecb
    <link rel="chapter" href="general.html" title="API"/>
Packit 423ecb
  </head>
Packit 423ecb
  <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
Packit 423ecb
    
Packit 423ecb
      
Packit 423ecb
        
Packit 423ecb
          
Packit 423ecb
            Prev
Packit 423ecb
          
Packit 423ecb
        
Packit 423ecb
        
Packit 423ecb
          
Packit 423ecb
            Up
Packit 423ecb
          
Packit 423ecb
        
Packit 423ecb
        
Packit 423ecb
          
Packit 423ecb
            Home
Packit 423ecb
          
Packit 423ecb
        
Packit 423ecb
        
Packit 423ecb
          
Packit 423ecb
            Next
Packit 423ecb
          
Packit 423ecb
        
Packit 423ecb
        libxml2 Reference Manual
Packit 423ecb
      
Packit 423ecb
    
Packit 423ecb
    

Packit 423ecb
      xlink
Packit 423ecb
    
Packit 423ecb
    

xlink - unfinished XLink detection module

Packit 423ecb
    

unfinished XLink detection module

Packit 423ecb
    

Author(s): Daniel Veillard

Packit 423ecb
    
Packit 423ecb
      

Synopsis

Packit 423ecb
      
typedef xmlChar * xlinkTitle;
Packit 423ecb
typedef enum xlinkShow;
Packit 423ecb
typedef xmlChar * xlinkHRef;
Packit 423ecb
typedef enum xlinkActuate;
Packit 423ecb
typedef struct _xlinkHandler xlinkHandler;
Packit 423ecb
typedef xmlChar * xlinkRole;
Packit 423ecb
typedef xlinkHandler * xlinkHandlerPtr;
Packit 423ecb
typedef enum xlinkType;
Packit 423ecb
void	xlinkSetDefaultDetect		(xlinkNodeDetectFunc func);
Packit 423ecb
void	xlinkSetDefaultHandler		(xlinkHandlerPtr handler);
Packit 423ecb
typedef void xlinkExtendedLinkFunk		(void * ctx, 
xmlNodePtr node,
int nbLocators,
const xlinkHRef * hrefs,
const xlinkRole * roles,
int nbArcs,
const xlinkRole * from,
const xlinkRole * to,
xlinkShow * show,
xlinkActuate * actuate,
int nbTitles,
const xlinkTitle * titles,
const xmlChar ** langs);
Packit 423ecb
typedef void xlinkExtendedLinkSetFunk	(void * ctx, 
xmlNodePtr node,
int nbLocators,
const xlinkHRef * hrefs,
const xlinkRole * roles,
int nbTitles,
const xlinkTitle * titles,
const xmlChar ** langs);
Packit 423ecb
typedef void xlinkSimpleLinkFunk		(void * ctx, 
xmlNodePtr node,
const xlinkHRef href,
const xlinkRole role,
const xlinkTitle title);
Packit 423ecb
typedef void xlinkNodeDetectFunc		(void * ctx, 
xmlNodePtr node);
Packit 423ecb
xlinkHandlerPtr	xlinkGetDefaultHandler	(void);
Packit 423ecb
xlinkType	xlinkIsLink		(xmlDocPtr doc, 
xmlNodePtr node);
Packit 423ecb
xlinkNodeDetectFunc	xlinkGetDefaultDetect	(void);
Packit 423ecb
Packit 423ecb
    
Packit 423ecb
    
Packit 423ecb
      

Description

Packit 423ecb
    
Packit 423ecb
    
Packit 423ecb
      

Details

Packit 423ecb
      
Packit 423ecb
        

Enum xlinkActuate

enum xlinkActuate {
Packit 423ecb
    XLINK_ACTUATE_NONE = 0
Packit 423ecb
    XLINK_ACTUATE_AUTO = 1
Packit 423ecb
    XLINK_ACTUATE_ONREQUEST = 2
Packit 423ecb
};
Packit 423ecb

Packit 423ecb
Packit 423ecb
        
Packit 423ecb
        

Typedef xlinkHRef

xmlChar * xlinkHRef;
Packit 423ecb

Packit 423ecb
Packit 423ecb
        
Packit 423ecb
        

Structure xlinkHandler

struct _xlinkHandler {
Packit 423ecb
    xlinkSimpleLinkFunk	simple
Packit 423ecb
    xlinkExtendedLinkFunk	extended
Packit 423ecb
    xlinkExtendedLinkSetFunk	set
Packit 423ecb
} xlinkHandler;
Packit 423ecb

Packit 423ecb
Packit 423ecb
        
Packit 423ecb
        

Typedef xlinkHandlerPtr

xlinkHandler * xlinkHandlerPtr;
Packit 423ecb

Packit 423ecb
Packit 423ecb
        
Packit 423ecb
        

Typedef xlinkRole

xmlChar * xlinkRole;
Packit 423ecb

Packit 423ecb
Packit 423ecb
        
Packit 423ecb
        

Enum xlinkShow

enum xlinkShow {
Packit 423ecb
    XLINK_SHOW_NONE = 0
Packit 423ecb
    XLINK_SHOW_NEW = 1
Packit 423ecb
    XLINK_SHOW_EMBED = 2
Packit 423ecb
    XLINK_SHOW_REPLACE = 3
Packit 423ecb
};
Packit 423ecb

Packit 423ecb
Packit 423ecb
        
Packit 423ecb
        

Typedef xlinkTitle

xmlChar * xlinkTitle;
Packit 423ecb

Packit 423ecb
Packit 423ecb
        
Packit 423ecb
        

Enum xlinkType

enum xlinkType {
Packit 423ecb
    XLINK_TYPE_NONE = 0
Packit 423ecb
    XLINK_TYPE_SIMPLE = 1
Packit 423ecb
    XLINK_TYPE_EXTENDED = 2
Packit 423ecb
    XLINK_TYPE_EXTENDED_SET = 3
Packit 423ecb
};
Packit 423ecb

Packit 423ecb
Packit 423ecb
        
Packit 423ecb
        

Function type xlinkExtendedLinkFunk

void	xlinkExtendedLinkFunk		(void * ctx, 
xmlNodePtr node,
int nbLocators,
const xlinkHRef * hrefs,
const xlinkRole * roles,
int nbArcs,
const xlinkRole * from,
const xlinkRole * to,
xlinkShow * show,
xlinkActuate * actuate,
int nbTitles,
const xlinkTitle * titles,
const xmlChar ** langs)
Packit 423ecb

This is the prototype for a extended link detection callback.

Packit 423ecb
<tt>ctx</tt>:user data pointer
<tt>node</tt>:the node carrying the link
<tt>nbLocators</tt>:the number of locators detected on the link
<tt>hrefs</tt>:pointer to the array of locator hrefs
<tt>roles</tt>:pointer to the array of locator roles
<tt>nbArcs</tt>:the number of arcs detected on the link
<tt>from</tt>:pointer to the array of source roles found on the arcs
<tt>to</tt>:pointer to the array of target roles found on the arcs
<tt>show</tt>:array of values for the show attributes found on the arcs
<tt>actuate</tt>:array of values for the actuate attributes found on the arcs
<tt>nbTitles</tt>:the number of titles detected on the link
<tt>titles</tt>:
<tt>langs</tt>:array of xml:lang values for the titles
Packit 423ecb
        
Packit 423ecb
        

Function type xlinkExtendedLinkSetFunk

void	xlinkExtendedLinkSetFunk	(void * ctx, 
xmlNodePtr node,
int nbLocators,
const xlinkHRef * hrefs,
const xlinkRole * roles,
int nbTitles,
const xlinkTitle * titles,
const xmlChar ** langs)
Packit 423ecb

This is the prototype for a extended link set detection callback.

Packit 423ecb
<tt>ctx</tt>:user data pointer
<tt>node</tt>:the node carrying the link
<tt>nbLocators</tt>:the number of locators detected on the link
<tt>hrefs</tt>:pointer to the array of locator hrefs
<tt>roles</tt>:pointer to the array of locator roles
<tt>nbTitles</tt>:the number of titles detected on the link
<tt>titles</tt>:
<tt>langs</tt>:array of xml:lang values for the titles
Packit 423ecb
        
Packit 423ecb
        
Packit 423ecb

This is the prototype for the link detection routine. It calls the default link detection callbacks upon link detection.

Packit 423ecb
<tt>ctx</tt>:user data pointer
<tt>node</tt>:the node to check
Packit 423ecb
        
Packit 423ecb
        
Packit 423ecb

This is the prototype for a simple link detection callback.

Packit 423ecb
<tt>ctx</tt>:user data pointer
<tt>node</tt>:the node carrying the link
<tt>href</tt>:the target of the link
<tt>role</tt>:the role string
<tt>title</tt>:the link title
Packit 423ecb
        
Packit 423ecb
        

xlinkGetDefaultDetect ()

xlinkNodeDetectFunc	xlinkGetDefaultDetect	(void)
Packit 423ecb

Get the default xlink detection routine

Packit 423ecb
<tt>Returns</tt>:the current function or NULL;
Packit 423ecb
        
Packit 423ecb
        

xlinkGetDefaultHandler ()

xlinkHandlerPtr	xlinkGetDefaultHandler	(void)
Packit 423ecb

Get the default xlink handler.

Packit 423ecb
<tt>Returns</tt>:the current xlinkHandlerPtr value.
Packit 423ecb
        
Packit 423ecb
        
Packit 423ecb

Check whether the given node carries the attributes needed to be a link element (or is one of the linking elements issued from the (X)HTML DtDs). This routine don't try to do full checking of the link validity but tries to detect and return the appropriate link type.

Packit 423ecb
<tt>doc</tt>:the document containing the node
<tt>node</tt>:the node pointer itself
<tt>Returns</tt>:the xlinkType of the node (XLINK_TYPE_NONE if there is no link detected.
Packit 423ecb
        
Packit 423ecb
        
Packit 423ecb

Set the default xlink detection routine

Packit 423ecb
<tt>func</tt>:pointer to the new detection routine.
Packit 423ecb
        
Packit 423ecb
        
Packit 423ecb

Set the default xlink handlers

Packit 423ecb
<tt>handler</tt>:the new value for the xlink handler block
Packit 423ecb
        
Packit 423ecb
      
Packit 423ecb
    
Packit 423ecb
  </body>
Packit 423ecb
</html>