~ubuntu-branches/ubuntu/natty/libxslt/natty-updates

« back to all changes in this revision

Viewing changes to libxslt/extensions.c

  • Committer: Bazaar Package Importer
  • Author(s): Sebastien Bacher
  • Date: 2008-06-23 15:25:14 UTC
  • mfrom: (1.1.7 upstream)
  • Revision ID: james.westby@ubuntu.com-20080623152514-nf37q9fm3drv69ps
Tags: 1.1.24-1ubuntu1
* merge from debian, remaining ubuntu changes:
  - build a python-libxslt1-dbg package.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1115
1115
/**
1116
1116
 * xsltCheckExtPrefix:
1117
1117
 * @style: the stylesheet
1118
 
 * @URI: the namespace URI (possibly NULL)
 
1118
 * @URI: the namespace prefix (possibly NULL)
1119
1119
 *
1120
1120
 * Check if the given prefix is one of the declared extensions.
1121
1121
 * This is intended to be called only at compile-time.
1173
1173
}
1174
1174
 
1175
1175
/**
 
1176
 * xsltCheckExtURI:
 
1177
 * @style: the stylesheet
 
1178
 * @URI: the namespace URI (possibly NULL)
 
1179
 *
 
1180
 * Check if the given prefix is one of the declared extensions.
 
1181
 * This is intended to be called only at compile-time.
 
1182
 * Called by:
 
1183
 *  xsltPrecomputeStylesheet() (xslt.c)
 
1184
 *  xsltParseTemplateContent (xslt.c)
 
1185
 *
 
1186
 * Returns 1 if this is an extension, 0 otherwise
 
1187
 */
 
1188
int
 
1189
xsltCheckExtURI(xsltStylesheetPtr style, const xmlChar * URI)
 
1190
{
 
1191
    xsltExtDefPtr cur;
 
1192
 
 
1193
    if ((style == NULL) || (style->nsDefs == NULL))
 
1194
        return (0);
 
1195
    if (URI == NULL)
 
1196
        return (0);
 
1197
    cur = (xsltExtDefPtr) style->nsDefs;
 
1198
    while (cur != NULL) {
 
1199
        if (xmlStrEqual(URI, cur->URI))
 
1200
            return (1);
 
1201
        cur = cur->next;
 
1202
    }
 
1203
    return (0);
 
1204
}
 
1205
 
 
1206
/**
1176
1207
 * xsltRegisterExtModuleFull:
1177
1208
 * @URI:  URI associated to this module
1178
1209
 * @initFunc:  the module initialization function
1951
1982
        xsltGenericDebug(xsltGenericErrorContext,
1952
1983
                         "xsltExtInitTest: not initialized,"
1953
1984
                         " calling xsltStyleGetExtData\n");
1954
 
        xsltStyleGetExtData(ctxt->style, URI);
 
1985
        testStyleData = xsltStyleGetExtData(ctxt->style, URI);
1955
1986
        if (testStyleData == NULL) {
1956
1987
            xsltTransformError(ctxt, NULL, NULL,
1957
1988
                               "xsltExtInitTest: not initialized\n");