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

static void xsltGetQNameProperty ( xsltStylesheetPtr  style,
xmlNodePtr  inst,
const xmlChar propName,
int  mandatory,
int hasProp,
const xmlChar **  nsName,
const xmlChar **  localName 
) [static]

Definition at line 1270 of file preproc.c.

Referenced by xsltApplyTemplatesComp(), xsltCallTemplateComp(), xsltParamComp(), xsltVariableComp(), and xsltWithParamComp().

{
    const xmlChar *prop;

    if (nsName)
    *nsName = NULL;
    if (localName)
    *localName = NULL;
    if (hasProp)
    *hasProp = 0;

    prop = xsltGetCNsProp(style, inst, propName, XSLT_NAMESPACE);
    if (prop == NULL) {
    if (mandatory) {
        xsltTransformError(NULL, style, inst,
        "The attribute '%s' is missing.\n", propName);
        style->errors++;
        return;
    }
    } else {
        const xmlChar *URI;

    if (xmlValidateQName(prop, 0)) {
        xsltTransformError(NULL, style, inst,
        "The value '%s' of the attribute "
        "'%s' is not a valid QName.\n", prop, propName);
        style->errors++;
        return;
    } else {
        /*
        * @prop will be in the string dict afterwards, @URI not.
        */
        URI = xsltGetQNameURI2(style, inst, &prop);
        if (prop == NULL) {
        style->errors++;
        } else {
        *localName = prop;
        if (hasProp)
            *hasProp = 1;
        if (URI != NULL) {
            /*
            * Fixes bug #308441: Put the ns-name in the dict
            * in order to pointer compare names during XPath's
            * variable lookup.
            */
            if (nsName)
            *nsName = xmlDictLookup(style->dict, URI, -1);
            /* comp->has_ns = 1; */
        }
        }
    }
    }
    return;
}

Generated on Sat May 26 2012 04:48:49 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.