Gnome XML Library Reference Manual
<<< Previous Page | Home | Up | Next Page >>>

# xpointer

## Name

xpointer --

## Synopsis

    struct      xmlLocationSet;
    typedef     xmlLocationSetPtr;
    xmlLocationSetPtr xmlXPtrLocationSetCreate  (xmlXPathObjectPtr val);
    void        xmlXPtrFreeLocationSet          (xmlLocationSetPtr obj);
    xmlLocationSetPtr xmlXPtrLocationSetMerge   (xmlLocationSetPtr val1,
                                                 xmlLocationSetPtr val2);
    xmlXPathObjectPtr xmlXPtrNewRange           (xmlNodePtr start,
                                                 int startindex,
                                                 xmlNodePtr end,
                                                 int endindex);
    xmlXPathObjectPtr xmlXPtrNewRangePoints     (xmlXPathObjectPtr start,
                                                 xmlXPathObjectPtr end);
    xmlXPathObjectPtr xmlXPtrNewRangeNodePoint  (xmlNodePtr start,
                                                 xmlXPathObjectPtr end);
    xmlXPathObjectPtr xmlXPtrNewRangePointNode  (xmlXPathObjectPtr start,
                                                 xmlNodePtr end);
    xmlXPathObjectPtr xmlXPtrNewRangeNodes      (xmlNodePtr start,
                                                 xmlNodePtr end);
    xmlXPathObjectPtr xmlXPtrNewLocationSetNodes
                                                (xmlNodePtr start,
                                                 xmlNodePtr end);
    xmlXPathObjectPtr xmlXPtrNewLocationSetNodeSet
                                                (xmlNodeSetPtr set);
    xmlXPathObjectPtr xmlXPtrNewRangeNodeObject (xmlNodePtr start,
                                                 xmlXPathObjectPtr end);
    xmlXPathObjectPtr xmlXPtrNewCollapsedRange  (xmlNodePtr start);
    void        xmlXPtrLocationSetAdd           (xmlLocationSetPtr cur,
                                                 xmlXPathObjectPtr val);
    xmlXPathObjectPtr xmlXPtrWrapLocationSet    (xmlLocationSetPtr val);
    void        xmlXPtrLocationSetDel           (xmlLocationSetPtr cur,
                                                 xmlXPathObjectPtr val);
    void        xmlXPtrLocationSetRemove        (xmlLocationSetPtr cur,
                                                 int val);
    xmlXPathContextPtr xmlXPtrNewContext        (xmlDocPtr doc,
                                                 xmlNodePtr here,
                                                 xmlNodePtr origin);
    xmlXPathObjectPtr xmlXPtrEval               (const xmlChar *str,
                                                 xmlXPathContextPtr ctx);
    void        xmlXPtrRangeToFunction          (xmlXPathParserContextPtr ctxt,
                                                 int nargs);
    xmlNodePtr  xmlXPtrBuildNodeList            (xmlXPathObjectPtr obj);
    void        xmlXPtrEvalRangePredicate       (xmlXPathParserContextPtr ctxt);

## Description

## Details

### struct xmlLocationSet

    struct xmlLocationSet {
        int locNr;		      /* number of locations in the set */
        int locMax;		      /* size of the array as allocated */
        xmlXPathObjectPtr *locTab;/* array of locations */
    };

### xmlLocationSetPtr

### xmlXPtrLocationSetCreate ()

    xmlLocationSetPtr xmlXPtrLocationSetCreate  (xmlXPathObjectPtr val);

Create a new xmlLocationSetPtr of type double and of value `val`

`val` : |
Returns : |

### xmlXPtrFreeLocationSet ()

    void        xmlXPtrFreeLocationSet          (xmlLocationSetPtr obj);

Free the LocationSet compound (not the actual ranges !).

`obj` : |

### xmlXPtrLocationSetMerge ()

    xmlLocationSetPtr xmlXPtrLocationSetMerge   (xmlLocationSetPtr val1,
                                                 xmlLocationSetPtr val2);

Merges two rangesets, all ranges from `val2` are added to `val1`

`val1` : |
`val2` : |
Returns : |

### xmlXPtrNewRange ()

    xmlXPathObjectPtr xmlXPtrNewRange           (xmlNodePtr start,
                                                 int startindex,
                                                 xmlNodePtr end,
                                                 int endindex);

Create a new xmlXPathObjectPtr of type range

`start` : |
`startindex` : |
`end` : |
`endindex` : |
Returns : |

### xmlXPtrNewRangePoints ()

    xmlXPathObjectPtr xmlXPtrNewRangePoints     (xmlXPathObjectPtr start,
                                                 xmlXPathObjectPtr end);

Create a new xmlXPathObjectPtr of type range using 2 Points

`start` : |
`end` : |
Returns : |

### xmlXPtrNewRangeNodePoint ()

    xmlXPathObjectPtr xmlXPtrNewRangeNodePoint  (xmlNodePtr start,
                                                 xmlXPathObjectPtr end);

Create a new xmlXPathObjectPtr of type range from a node to a point

`start` : |
`end` : |
Returns : |

### xmlXPtrNewRangePointNode ()

    xmlXPathObjectPtr xmlXPtrNewRangePointNode  (xmlXPathObjectPtr start,
                                                 xmlNodePtr end);

Create a new xmlXPathObjectPtr of type range from a point to a node

`start` : |
`end` : |
Returns : |

### xmlXPtrNewRangeNodes ()

    xmlXPathObjectPtr xmlXPtrNewRangeNodes      (xmlNodePtr start,
                                                 xmlNodePtr end);

Create a new xmlXPathObjectPtr of type range using 2 nodes

`start` : |
`end` : |
Returns : |

### xmlXPtrNewLocationSetNodes ()

    xmlXPathObjectPtr xmlXPtrNewLocationSetNodes
                                                (xmlNodePtr start,
                                                 xmlNodePtr end);

Create a new xmlXPathObjectPtr of type LocationSet and initialize it with the single range made of the two nodes `start` and `end`

`start` : |
`end` : |
Returns : |

### xmlXPtrNewLocationSetNodeSet ()

    xmlXPathObjectPtr xmlXPtrNewLocationSetNodeSet
                                                (xmlNodeSetPtr set);

Create a new xmlXPathObjectPtr of type LocationSet and initialize it with all the nodes from `set`

`set` : |
Returns : |

### xmlXPtrNewRangeNodeObject ()

    xmlXPathObjectPtr xmlXPtrNewRangeNodeObject (xmlNodePtr start,
                                                 xmlXPathObjectPtr end);

Create a new xmlXPathObjectPtr of type range from a not to an object

`start` : |
`end` : |
Returns : |

### xmlXPtrNewCollapsedRange ()

    xmlXPathObjectPtr xmlXPtrNewCollapsedRange  (xmlNodePtr start);

Create a new xmlXPathObjectPtr of type range using a single nodes

`start` : |
Returns : |

### xmlXPtrLocationSetAdd ()

    void        xmlXPtrLocationSetAdd           (xmlLocationSetPtr cur,
                                                 xmlXPathObjectPtr val);

add a new xmlXPathObjectPtr to an existing LocationSet If the location already exist in the set `val` is freed.

`cur` : |
`val` : |

### xmlXPtrWrapLocationSet ()

    xmlXPathObjectPtr xmlXPtrWrapLocationSet    (xmlLocationSetPtr val);

Wrap the LocationSet `val` in a new xmlXPathObjectPtr

`val` : |
Returns : |

### xmlXPtrLocationSetDel ()

    void        xmlXPtrLocationSetDel           (xmlLocationSetPtr cur,
                                                 xmlXPathObjectPtr val);

Removes an xmlXPathObjectPtr from an existing LocationSet

`cur` : |
`val` : |

### xmlXPtrLocationSetRemove ()

    void        xmlXPtrLocationSetRemove        (xmlLocationSetPtr cur,
                                                 int val);

Removes an entry from an existing LocationSet list.

`cur` : |
`val` : |

### xmlXPtrNewContext ()

    xmlXPathContextPtr xmlXPtrNewContext        (xmlDocPtr doc,
                                                 xmlNodePtr here,
                                                 xmlNodePtr origin);

Create a new XPointer context

`doc` : |
`here` : |
`origin` : |
Returns : |

### xmlXPtrEval ()

    xmlXPathObjectPtr xmlXPtrEval               (const xmlChar *str,
                                                 xmlXPathContextPtr ctx);

Evaluate the XPath Location Path in the given context.

`str` : |
`ctx` : |
Returns : |

### xmlXPtrRangeToFunction ()

    void        xmlXPtrRangeToFunction          (xmlXPathParserContextPtr ctxt,
                                                 int nargs);

Implement the range-to() XPointer function

`ctxt` : |
`nargs` : |

### xmlXPtrBuildNodeList ()

    xmlNodePtr  xmlXPtrBuildNodeList            (xmlXPathObjectPtr obj);

Build a node list tree copy of the XPointer result. This will drop Attributes and Namespace declarations.

`obj` : |
Returns : |

### xmlXPtrEvalRangePredicate ()

    void        xmlXPtrEvalRangePredicate       (xmlXPathParserContextPtr ctxt);

[8] Predicate ::= '[' PredicateExpr ']' [9] PredicateExpr ::= Expr

Evaluate a predicate as in xmlXPathEvalPredicate() but for a Location Set instead of a node set

`ctxt` : |

<<< Previous Page | Home | Up | Next Page >>>
xpathInternals | xinclude