Blame os400/libxmlrpg/xlink.rpgle

Packit 423ecb
      * Summary: unfinished XLink detection module
Packit 423ecb
      * Description: unfinished XLink detection module
Packit 423ecb
      *
Packit 423ecb
      * Copy: See Copyright for the status of this software.
Packit 423ecb
      *
Packit 423ecb
      * Author: Patrick Monnerat <pm@datasphere.ch>, DATASPHERE S.A.
Packit 423ecb
Packit 423ecb
      /if not defined(XML_XLINK_H__)
Packit 423ecb
      /define XML_XLINK_H__
Packit 423ecb
Packit 423ecb
      /include "libxmlrpg/xmlversion"
Packit 423ecb
Packit 423ecb
      /if defined(LIBXML_XPTR_ENABLED)
Packit 423ecb
Packit 423ecb
      /include "libxmlrpg/xmlTypesC"
Packit 423ecb
      /include "libxmlrpg/tree"
Packit 423ecb
Packit 423ecb
      * Various defines for the various Link properties.
Packit 423ecb
      *
Packit 423ecb
      * NOTE: the link detection layer will try to resolve QName expansion
Packit 423ecb
      *       of namespaces. If "foo" is the prefix for "http://foo.com/"
Packit 423ecb
      *       then the link detection layer will expand role="foo:myrole"
Packit 423ecb
      *       to "http://foo.com/:myrole".
Packit 423ecb
      * NOTE: the link detection layer will expand URI-Refences found on
Packit 423ecb
      *       href attributes by using the base mechanism if found.
Packit 423ecb
Packit 423ecb
     d xlinkRef        s               *   based(######typedef######)           xmlChar *
Packit 423ecb
     d xlinkRole       s               *   based(######typedef######)           xmlChar *
Packit 423ecb
     d xlinkTitle      s               *   based(######typedef######)           xmlChar *
Packit 423ecb
Packit 423ecb
     d xlinkType       s                   based(######typedef######)
Packit 423ecb
     d                                     like(xmlCenum)
Packit 423ecb
     d  XLINK_TYPE_NONE...
Packit 423ecb
     d                 c                   0
Packit 423ecb
     d  XLINK_TYPE_SIMPLE...
Packit 423ecb
     d                 c                   1
Packit 423ecb
     d  XLINK_TYPE_EXTENDED...
Packit 423ecb
     d                 c                   2
Packit 423ecb
     d  XLINK_TYPE_EXTENDED_SET...
Packit 423ecb
     d                 c                   3
Packit 423ecb
Packit 423ecb
     d xlinkShow       s                   based(######typedef######)
Packit 423ecb
     d                                     like(xmlCenum)
Packit 423ecb
     d  XLINK_SHOW_NONE...
Packit 423ecb
     d                 c                   0
Packit 423ecb
     d  XLINK_SHOW_NEW...
Packit 423ecb
     d                 c                   1
Packit 423ecb
     d  XLINK_SHOW_EMBED...
Packit 423ecb
     d                 c                   2
Packit 423ecb
     d  XLINK_SHOW_REPLACE...
Packit 423ecb
     d                 c                   3
Packit 423ecb
Packit 423ecb
     d xlinkActuate    s                   based(######typedef######)
Packit 423ecb
     d                                     like(xmlCenum)
Packit 423ecb
     d  XLINK_ACTUATE_NONE...
Packit 423ecb
     d                 c                   0
Packit 423ecb
     d  XLINK_ACTUATE_AUTO...
Packit 423ecb
     d                 c                   1
Packit 423ecb
     d  XLINK_ACTUATE_ONREQUEST...
Packit 423ecb
     d                 c                   2
Packit 423ecb
Packit 423ecb
      * xlinkNodeDetectFunc:
Packit 423ecb
      * @ctx:  user data pointer
Packit 423ecb
      * @node:  the node to check
Packit 423ecb
      *
Packit 423ecb
      * This is the prototype for the link detection routine.
Packit 423ecb
      * It calls the default link detection callbacks upon link detection.
Packit 423ecb
Packit 423ecb
     d xlinkNodeDetectFunc...
Packit 423ecb
     d                 s               *   based(######typedef######)
Packit 423ecb
     d                                     procptr
Packit 423ecb
Packit 423ecb
      * The link detection module interact with the upper layers using
Packit 423ecb
      * a set of callback registered at parsing time.
Packit 423ecb
Packit 423ecb
      * xlinkSimpleLinkFunk:
Packit 423ecb
      * @ctx:  user data pointer
Packit 423ecb
      * @node:  the node carrying the link
Packit 423ecb
      * @href:  the target of the link
Packit 423ecb
      * @role:  the role string
Packit 423ecb
      * @title:  the link title
Packit 423ecb
      *
Packit 423ecb
      * This is the prototype for a simple link detection callback.
Packit 423ecb
Packit 423ecb
     d xlinkSimpleLinkFunk...
Packit 423ecb
     d                 s               *   based(######typedef######)
Packit 423ecb
     d                                     procptr
Packit 423ecb
Packit 423ecb
      * xlinkExtendedLinkFunk:
Packit 423ecb
      * @ctx:  user data pointer
Packit 423ecb
      * @node:  the node carrying the link
Packit 423ecb
      * @nbLocators: the number of locators detected on the link
Packit 423ecb
      * @hrefs:  pointer to the array of locator hrefs
Packit 423ecb
      * @roles:  pointer to the array of locator roles
Packit 423ecb
      * @nbArcs: the number of arcs detected on the link
Packit 423ecb
      * @from:  pointer to the array of source roles found on the arcs
Packit 423ecb
      * @to:  pointer to the array of target roles found on the arcs
Packit 423ecb
      * @show:  array of values for the show attributes found on the arcs
Packit 423ecb
      * @actuate:  array of values for the actuate attributes found on the arcs
Packit 423ecb
      * @nbTitles: the number of titles detected on the link
Packit 423ecb
      * @title:  array of titles detected on the link
Packit 423ecb
      * @langs:  array of xml:lang values for the titles
Packit 423ecb
      *
Packit 423ecb
      * This is the prototype for a extended link detection callback.
Packit 423ecb
Packit 423ecb
     d xlinkExtendedLinkFunk...
Packit 423ecb
     d                 s               *   based(######typedef######)
Packit 423ecb
     d                                     procptr
Packit 423ecb
Packit 423ecb
      * xlinkExtendedLinkSetFunk:
Packit 423ecb
      * @ctx:  user data pointer
Packit 423ecb
      * @node:  the node carrying the link
Packit 423ecb
      * @nbLocators: the number of locators detected on the link
Packit 423ecb
      * @hrefs:  pointer to the array of locator hrefs
Packit 423ecb
      * @roles:  pointer to the array of locator roles
Packit 423ecb
      * @nbTitles: the number of titles detected on the link
Packit 423ecb
      * @title:  array of titles detected on the link
Packit 423ecb
      * @langs:  array of xml:lang values for the titles
Packit 423ecb
      *
Packit 423ecb
      * This is the prototype for a extended link set detection callback.
Packit 423ecb
Packit 423ecb
     d xlinkExtendedLinkSetFunk...
Packit 423ecb
     d                 s               *   based(######typedef######)
Packit 423ecb
     d                                     procptr
Packit 423ecb
Packit 423ecb
      * This is the structure containing a set of Links detection callbacks.
Packit 423ecb
      *
Packit 423ecb
      * There is no default xlink callbacks, if one want to get link
Packit 423ecb
      * recognition activated, those call backs must be provided before parsing.
Packit 423ecb
Packit 423ecb
     d xlinkHandlerPtr...
Packit 423ecb
     d                 s               *   based(######typedef######)           xmlChar *
Packit 423ecb
Packit 423ecb
     d xlinkHandler    ds                  based(xlinkHandlerPtr)
Packit 423ecb
     d                                     align qualified
Packit 423ecb
     d  simple                             like(xlinkSimpleLinkFunk)
Packit 423ecb
     d  extended                           like(xlinkExtendedLinkFunk)
Packit 423ecb
     d  set                                like(xlinkExtendedLinkSetFunk)
Packit 423ecb
Packit 423ecb
      * The default detection routine, can be overridden, they call the default
Packit 423ecb
      * detection callbacks.
Packit 423ecb
Packit 423ecb
     d xlinkGetDefaultDetect...
Packit 423ecb
     d                 pr                  extproc('xlinkGetDefaultDetect')
Packit 423ecb
     d                                     like(xlinkNodeDetectFunc)
Packit 423ecb
Packit 423ecb
     d xlinkSetDefaultDetect...
Packit 423ecb
     d                 pr                  extproc('xlinkSetDefaultDetect')
Packit 423ecb
     d  func                               value like(xlinkNodeDetectFunc)
Packit 423ecb
Packit 423ecb
      * Routines to set/get the default handlers.
Packit 423ecb
Packit 423ecb
     d xlinkGetDefaultHandler...
Packit 423ecb
     d                 pr                  extproc('xlinkGetDefaultHandler')
Packit 423ecb
     d                                     like(xlinkHandlerPtr)
Packit 423ecb
Packit 423ecb
     d xlinkSetDefaultHandler...
Packit 423ecb
     d                 pr                  extproc('xlinkSetDefaultHandler')
Packit 423ecb
     d  handler                            value like(xlinkHandlerPtr)
Packit 423ecb
Packit 423ecb
      * Link detection module itself.
Packit 423ecb
Packit 423ecb
     d xlinkIsLink     pr                  extproc('xlinkIsLink')
Packit 423ecb
     d                                     like(xlinkType)
Packit 423ecb
     d  doc                                value like(xmlDocPtr)
Packit 423ecb
     d  node                               value like(xmlNodePtr)
Packit 423ecb
Packit 423ecb
      /endif                                                                    LIBXML_XPTR_ENABLED
Packit 423ecb
      /endif                                                                    XML_XLINK_H__