ReactOS Fundraising Campaign 2012
 
€ 4,410 / € 30,000

Information | Donate

Home | Info | Community | Development | myReactOS | Contact Us

  1. Home
  2. Community
  3. Development
  4. myReactOS
  5. Fundraiser 2012

  1. Main Page
  2. Alphabetical List
  3. Data Structures
  4. Directories
  5. File List
  6. Data Fields
  7. Globals
  8. Related Pages

ReactOS Development > Doxygen

xmlNodeSetPtr xsltGetKey ( xsltTransformContextPtr  ctxt,
const xmlChar name,
const xmlChar nameURI,
const xmlChar value 
)

Definition at line 411 of file keys.c.

Referenced by xsltKeyFunction(), and xsltTestCompMatch().

                                                     {
    xmlNodeSetPtr ret;
    xsltKeyTablePtr table;
    int init_table = 0;

    if ((ctxt == NULL) || (name == NULL) || (value == NULL) ||
    (ctxt->document == NULL))
    return(NULL);

#ifdef WITH_XSLT_DEBUG_KEYS
    xsltGenericDebug(xsltGenericDebugContext,
    "Get key %s, value %s\n", name, value);
#endif

    /*
     * keys are computed only on-demand on first key access for a document
     */
    if ((ctxt->document->nbKeysComputed < ctxt->nbKeys) &&
        (ctxt->keyInitLevel == 0)) {
        /*
     * If non-recursive behaviour, just try to initialize all keys
     */
    if (xsltInitAllDocKeys(ctxt))
        return(NULL);
    }

retry:
    table = (xsltKeyTablePtr) ctxt->document->keys;
    while (table != NULL) {
    if (((nameURI != NULL) == (table->nameURI != NULL)) &&
        xmlStrEqual(table->name, name) &&
        xmlStrEqual(table->nameURI, nameURI))
    {
        ret = (xmlNodeSetPtr)xmlHashLookup(table->keys, value);
        return(ret);
    }
    table = table->next;
    }

    if ((ctxt->keyInitLevel != 0) && (init_table == 0)) {
        /*
     * Apparently one key is recursive and this one is needed,
     * initialize just it, that time and retry
     */
        xsltInitDocKeyTable(ctxt, name, nameURI);
    init_table = 1;
    goto retry;
    }

    return(NULL);
}

Generated on Sun May 27 2012 04:49:48 for ReactOS by doxygen 1.7.6.1

ReactOS is a registered trademark or a trademark of ReactOS Foundation in the United States and other countries.