Logo Search packages:      
Sourcecode: inkscape version File versions  Download package

static gboolean id_add_sel_matches_node ( CRAdditionalSel a_add_sel,
CRNodeIface const *  a_node_iface,
CRXMLNodePtr  a_node 
) [static]

Returns:
TRUE if the additional attribute selector matches the current xml node given in argument, FALSE otherwise.
Parameters:
a_add_sel the additional attribute selector to consider.
a_node the xml node to consider.

Definition at line 269 of file cr-sel-eng.c.

References _CRAdditionalSel::content, and _CRAdditionalSel::type.

Referenced by additional_selector_matches_node().

{
        gboolean result = FALSE;
        char *id = NULL;

        g_return_val_if_fail (a_add_sel
                              && a_add_sel->type == ID_ADD_SELECTOR
                              && a_add_sel->content.id_name
                              && a_add_sel->content.id_name->stryng
                              && a_add_sel->content.id_name->stryng->str
                              && a_node, FALSE);
        g_return_val_if_fail (a_add_sel
                              && a_add_sel->type == ID_ADD_SELECTOR
                              && a_node, FALSE);

        id = a_node_iface->getProp (a_node, "id");
        if (id) {
                if (!strncmp (id, a_add_sel->content.id_name->stryng->str,
                              a_add_sel->content.id_name->stryng->len)) {
                        result = TRUE;
                }
                a_node_iface->freePropVal (id);
                id = NULL;
        }
        return result;
}


Generated by  Doxygen 1.6.0   Back to index