Search completed in 1.61 seconds.
10 results for "local-name":
local-name - XPath
WebXPathFunctionslocal-name
xslt/xpath reference: xslt elements, exslt functions, xpath functions, xpath axes the local-name function returns a string representing the local name of the first node in a given node-set.
... syntax local-name( [node-set] ) arguments node-set (optional) the local name of the first node in this node-set will be returned.
Introduction to using XPath in JavaScript - XPath
WebXPathIntroduction to using XPath in JavaScript
while one can adapt the approach in the above section to test for namespaced elements regardless of the prefix chosen (using local-name() in combination with namespace-uri() instead of name()), a more challenging situation occurs, however, if one wishes to grab an element with a particular namespaced attribute in a predicate (given the absence of implementation-independent variables in xpath 1.0).
... for example, one might try (incorrectly) to grab an element with a namespaced attribute as follows: var xpathlink = someelements[local-name(@*)="href" and namespace-uri(@*)='http://www.w3.org/1999/xlink']; this could inadvertently grab some elements if one of its attributes existed that had a local name of "href", but it was a different attribute which had the targeted (xlink) namespace (instead of @href).
... in order to accurately grab elements with the xlink @href attribute (without also being confined to predefined prefixes in a namespace resolver), one could obtain them as follows: var xpathels = 'someelements[@*[local-name() = "href" and namespace-uri() = "http://www.w3.org/1999/xlink"]]'; // grabs elements with any single attribute that has both the local name 'href' and the xlink namespace var thislevel = xml.evaluate(xpathels, xml, null, xpathresult.any_type, null); var thisitemel = thislevel.iteratenext(); xpathresult defined constants result type defined constant value description any_type 0 a result set containing whatever type naturally results from the evaluation of the expression.
Using Recursive Templates - Archive of obsolete content
ArchiveMozillaXULTemplate GuideUsing Recursive Templates
the local-name function retrieves the tag of the element without the namespace prefix.
...<vbox datasources="people.xml" ref="*" querytype="xml"> <template> <query expr="*"> <assign var="?type" expr="local-name(.)"/> </query> <rule> <where subject="?type" rel="equals" value="group"/> <action> <groupbox uri="?"> <caption label="?name"/> </groupbox> </action> </rule> <rule> <action> <label uri="?" value="?name"/> </action> </rule> </template> </vbox> the first rule contains a where clause which matches only those results that have a type of group.
getAttributeNS - Archive of obsolete content
ArchiveAdd-onsCode snippetsgetAttributeNS
ns === 'http://www.w3.org/xml/1998/namespace') { // this is assumed so don't try to get an xmlns for the 'xml' prefix return thisitem.getattribute('xml:'+nsatt); // prefix must be 'xml' per the specs } var attrs2, result; var attrs = thisitem.attributes; var prefixatt = new regexp('^(.*):'+nsatt.replace(/\./g, '\\.')+'$'); // e.g., xlink:href // find any prefixes with the local-name being searched (escape period since only character (besides colon) allowed in an xml name which needs escaping) for (var j = 0; j < attrs.length; j++) { // thisitem's atts // e.g., abc:href, xlink:href while (((result = prefixatt.exec(attrs[j].nodename)) !== null) && thisitem.nodename !== '#document' && thisitem.nodename !== '#document-fragment') { var...
Document.getElementsByTagNameNS() - Web APIs
WebAPIDocumentgetElementsByTagNameNS
(to accommodate explorer, one could call an xpath wrapper instead of the xpath in the function below (as explorer supports xpath with a different api), such as this wrapper class.) function getelementsbytagnamenswrapper (ns, elname, doc, context) { if (!doc) { doc = document; } if (!context) { context = doc; } var result = doc.evaluate('//*[local-name()="'+elname+'" and namespace-uri() = "'+ns+'"]', context, null, xpathresult.ordered_node_snapshot_type, null); var a = []; for(var i = 0; i < result.snapshotlength; i++) { a[i] = result.snapshotitem(i); } return a; } specifications specification status comment domthe definition of 'document.getelementsbytagnamens' in that...
Functions - XPath
WebXPathFunctions
boolean() ceiling() choose() concat() contains() count() current() xslt-specific document() xslt-specific element-available() false() floor() format-number() xslt-specific function-available() generate-id() xslt-specific id() (partially supported) key() xslt-specific lang() last() local-name() name() namespace-uri() normalize-space() not() number() position() round() starts-with() string() string-length() substring() substring-after() substring-before() sum() system-property() xslt-specific translate() true() unparsed-entity-url() xslt-specific (not supported) ...
Index - XPath
WebXPathIndex
36 local-name xslt, xslt_reference the local-name function returns a string representing the local name of the first node in a given node-set.
PI Parameters - XSLT: Extensible Stylesheet Language Transformations
WebXSLTPI Parameters
xslt-param the xslt-param pi supports 4 attributes: name the local-name part of the parameter name.
The Netscape XSLT/XPath Reference - XSLT: Extensible Stylesheet Language Transformations
WebXSLTTransforming XML with XSLTThe Netscape XSLT XPath Reference
ng() (supported) concat() (supported) contains() (supported) count() (supported) current() (supported) document() (supported) element-available() (supported) false() (supported) floor() (supported) format-number() (supported) function-available() (supported) generate-id() (supported) id() (partially supported) key() (supported) lang() (supported) last() (supported) local-name() (supported) name() (supported) namespace-uri() (supported) normalize-space() (supported) not() (supported) number() (supported) position() (supported) round() (supported) starts-with() (supported) string() (supported) string-length() (supported) substring() (supported) substring-after() (supported) substring-before() (supported) sum() (supported) system-property() ...
Transforming XML with XSLT - XSLT: Extensible Stylesheet Language Transformations
WebXSLTTransforming XML with XSLT
upported) ceiling() (supported) concat() (supported) contains() (supported) count() (supported) current() (supported) document() (supported) element-available() (supported) false() (supported) floor() (supported) format-number() (supported) function-available() (supported) generate-id() (supported) id() (partially supported) key() (supported) lang() (supported) last() (supported) local-name() (supported) name() (supported) namespace-uri() (supported) normalize-space() (supported) not() (supported) number() (supported) position() (supported) round() (supported) starts-with() (supported) string() (supported) string-length() (supported) substring() (supported) substring-after() (supported) substring-before() (supported) sum() (supported) system-property() (supported) tr...