Search completed in 1.20 seconds.
Introduction to using XPath in JavaScript - XPath
this document describes the interface for using
xpath in javascript internally, in extensions, and from websites.
... mozilla implements a fair amount of the dom 3
xpath, which means that
xpath expressions can be run against both html and xml documents.
... the main interface to using
xpath is the evaluate function of the document object.
...And 49 more matches
XPath snippets - XPath
this article provides some
xpath code snippets—simple examples of how to a few simple utility functions based on standard interfaces from the dom level 3
xpath specification that expose
xpath functionality to javascript code.
... node-specific evaluator function the following custom utility function can be used to evaluate
xpath expressions on given xml nodes.
... the first argument is a dom node or document object, while the second is a string defining an
xpath expression.
...And 15 more matches
Comparison of CSS Selectors and XPath - XPath
xslt/
xpath reference: xslt elements, exslt functions,
xpath functions,
xpath axes this article seeks to document the difference between css selectors and
xpath for web developers to be able to better choose the right tool for the right job.
...
xpath feature css equivalent ancestor, parent or preceding-sibling axis :has() selector attribute axis attribute selectors child axis child combinator descendant axis descendant combinator following-sibling axis general sibling combinator or adjacent sibling combinator self axis :scope or :host selector ...
Index - XPath
found 57 pages: # page tags and summary 1
xpath css selectors, dom, jxon, landing, path, xml,
xpath, xslt
xpath stands for xml path language.
... 2 axes transforming_xml_with_xslt,
xpath,
xpath_reference, xslt, xslt_reference for further information on using
xpath expressions, please see the for further reading section at the end of transforming xml with xslt document.
... also see the 'axes' section in the
xpath spec.
...And 19 more matches
nsIDOMXPathEvaluator
dom/interfaces/
xpath/nsidom
xpathevaluator.idlscriptable this interface is used to evaluate
xpath expressions against a dom node.
... inherits from: nsisupports last changed in gecko 1.7 implemented by: @mozilla.org/dom/
xpath-evaluator;1.
... to create an instance, use: var dom
xpathevaluator = components.classes["@mozilla.org/dom/
xpath-evaluator;1"] .createinstance(components.interfaces.nsidom
xpathevaluator); method overview nsidom
xpathexpression createexpression(in domstring expression, in nsidom
xpathnsresolver resolver) nsidom
xpathnsresolver creatensresolver(in nsidomnode noderesolver); nsisupports evaluate(in domstring expression, in nsidomnode contextnode, in nsidom
xpathnsresolver resolver, in unsigned short type, in nsisupports result) methods createexpression() creates an nsidom
xpathexpression which can then be used for (repeated) evaluations.
...And 14 more matches
XPath
xslt/
xpath reference: xslt elements, exslt functions,
xpath functions,
xpath axes
xpath stands for xml path language.
...
xpath is mainly used in xslt, but can also be used as a much more powerful way of navigating through the dom of any xml-like language document using
xpathexpression, such as html and svg, instead of relying on the document.getelementbyid() or parentnode.queryselectorall() methods, the node.childnodes properties, and other dom core features.
...
xpath uses a path notation (as in urls) for navigating through the hierarchical structure of an xml document.
...And 13 more matches
XPathResult - Web APIs
the
xpathresult interface represents the results generated by evaluating an
xpath expression within the context of a given node.
... since
xpath expressions can result in a variety of result types, this interface makes it possible to determine and handle the type and value of the result.
... properties
xpathresult.booleanvalueread only a boolean representing the value of the result if resulttype is boolean_type.
...And 11 more matches
XPathEvaluator.evaluate() - Web APIs
the evaluate() method of the
xpathevaluator interface executes an
xpath expression on the given node or document and returns an
xpathresult.
... syntax
xpathresult
xpathevaluator.evaluate(expression, contextnode, resolver, type, result); parameters expression a domstring representing the
xpath expression to be parsed and evaluated.
... resolver optional permits translation of all prefixes, including the xml namespace prefix, within the
xpath expression into appropriate namespace uris.
...And 8 more matches
XPathExpression.evaluate() - Web APIs
the evaluate() method of the
xpathexpression interface executes an
xpath expression on the given node or document and returns an
xpathresult.
... syntax
xpathresult node.evaluate(contextnode, type, result); parameters contextnode a node representing the context to use for evaluating the expression.
...this must be one of the
xpathresult.constants.
...And 7 more matches
nsIDOMXPathExpression
dom/interfaces/
xpath/nsidom
xpathexpression.idlscriptable represents a compiled
xpath query returned from nsidom
xpathevaluator.createexpression or document.createexpression inherits from: nsisupports last changed in gecko 1.7 method overview nsisupports evaluate(in nsidomnode contextnode, in unsigned short type, in nsisupports result) methods evaluate() evaluate the
xpath expression.
... nsisupports evaluate( in nsidomnode contextnode, in unsigned short type, in nsisupports result ); parameters contextnode a dom node to evaluate the
xpath expression against.
... type a number that corresponds to one of the type constants of nsidom
xpathresult.
...And 4 more matches
XPathEvaluator.createExpression() - Web APIs
this method compiles an
xpathexpression which can then be used for (repeated) evaluations of the
xpath expression.
... syntax
xpathexpression
xpathevaluator.createexpression(expression, resolver); parameters expression a domstring representing representing the
xpath expression to be created.
... resolver optional permits translation of all prefixes, including the xml namespace prefix, within the
xpath expression into appropriate namespace uris.
...And 4 more matches
XPathEvaluator - Web APIs
the
xpathevaluator interface allows to compile and evaluate
xpath expressions.
... methods
xpathevaluator.createexpression() creates a parsed
xpath expression with resolved namespaces.
...
xpathevaluator.creatensresolver() adapts any dom node to resolve namespaces allowing the
xpath expression to be evaluated relative to the context of the node where it appeared within the document.
...And 3 more matches
XPathExpression - Web APIs
this interface is a compiled
xpath expression that can be evaluated on a document or specific node to return information from its dom tree.
... objects of this type are created by calling
xpathevaluator.createexpression().
... methods
xpathexpression.evaluate() evaluates the
xpath expression on the given node or document.
...And 2 more matches
XPathResult.iterateNext() - Web APIs
the iteratenext() method of the
xpathresult interface iterates over a node set result and returns the next node from it or null if there are no more nodes.
... syntax var node = result.iteratenext(); return value the next node within the node set of the
xpathresult.
... exceptions type_err in case
xpathresult.resulttype is not unordered_node_iterator_type or ordered_node_iterator_type, an
xpathexception of type type_err is thrown.
...And 2 more matches
XPathResult.resultType - Web APIs
the read-only resulttype property of the
xpathresult interface represents the type of the result, as defined by the type constants.
...this is useful for example, in an
xpath expression using the count() function.
...this is useful for example, in an
xpath expression using the not() function.
...And 2 more matches
child - XPath
if an
xpath expression does not specify an axis, the child axis is understood by default.
... specifications specification status comment
xpath 3.1the definition of 'child' in that specification.
... recommendation
xpath 3.0the definition of 'child' in that specification.
...And 2 more matches
nsIDOMXPathResult
dom/interfaces/
xpath/nsidom
xpathresult.idlscriptable this interface describes an
xpath result returned by nsidom
xpathevaluator or document.evaluate inherits from: nsisupports last changed in gecko 1.7 method overview nsidomnode iteratenext(); nsidomnode snapshotitem(in unsigned long index); attributes attribute type description booleanvalue boolean if resulttype is boolean_type, the boolean value.
... numbervalue double if resulttype is number_type, the numeric value of the
xpath value.
... constants type constants constant value description any_type 0 used when evaluating an
xpath expression; the evaluator will return the most appropriate type.
...see also introduction to using
xpath in javascript document object model (dom) level 3
xpath specification nsidom
xpathevaluator document.evaluate nsidom
xpathexception ...
XPathEvaluator.createNSResolver() - Web APIs
this method adapts any dom node to resolve namespaces so that an
xpath expression can be easily evaluated relative to the context of the node where it appeared within the document.
... syntax
xpathnsresolver
xpathevaluator.creatensresolver(noderesolver); parameters noderesolver a node to be used as a context for namespace resolution.
... return value an
xpathnsresolver object which resolves namespaces with respect to the definitions in scope for a specified node.
... specifications specification status comment document object model (dom) level 3
xpath specificationthe definition of '
xpathevaluator.creatensresolver()' in that specification.
XPathException - Web APIs
in the dom
xpath api the
xpathexception interface represents exception conditions that can be encountered while performing
xpath operations.
... properties
xpathexception.code read only returns a short that contains one of the error code constants.
... constants constant value description invalid_expression_err 51 if the expression has a syntax error or otherwise is not a legal expression according to the rules of the specific
xpathevaluator or contains specialized extension functions or variables not supported by this implementation.
... specifications specification status comment document object model (dom) level 3
xpath specificationthe definition of '
xpathexception' in that specification.
XPathNSResolver - Web APIs
the
xpathnsresolver interface permits prefix strings in an
xpath expression to be properly bound to namespace uri strings.
... the
xpathevaluator interface can construct an implementation of
xpathnsresolver from a node, or the interface may be implemented by any application.
... methods
xpathnsresolver.lookupnamespaceuri() looks up the namespace uri associated to the given namespace prefix.
... specifications specification status comment document object model (dom) level 3
xpath specificationthe definition of '
xpathnsresolver' in that specification.
XPathResult.booleanValue - Web APIs
the read-only booleanvalue property of the
xpathresult interface returns the boolean value of a result with
xpathresult.resulttype being boolean_type.
... syntax var value = result.booleanvalue; return value the return value is the boolean value of the
xpathresult returned by document.evaluate().
... exceptions type_err in case
xpathresult.resulttype is not boolean_type, an
xpathexception of type type_err is thrown.
... html <div>
xpath example</div> <p>text is '
xpath example': <output></output></p> javascript var
xpath = "//div/text() = '
xpath example'"; var result = document.evaluate(
xpath, document, null,
xpathresult.boolean_type, null); document.queryselector("output").textcontent = result.booleanvalue; result specifications specification status comment document object model (dom) level 3
xpath specificationthe definition of '
xpathresult.booleanvalue' in that specification.
XPathResult.invalidIteratorState - Web APIs
the read-only invaliditeratorstate property of the
xpathresult interface signifies that the iterator has become invalid.
... it is true if
xpathresult.resulttype is unordered_node_iterator_type or ordered_node_iterator_type and the document has been modified since this result was returned.
... html <div>
xpath example</div> <p>iterator state: <output></output></p> javascript var
xpath = "//div"; var result = document.evaluate(
xpath, document, null,
xpathresult.any_type, null); // invalidates the iterator state document.queryselector("div").remove(); document.queryselector("output").textcontent = result.invaliditeratorstate ?
... "invalid" : "valid"; result specifications specification status comment document object model (dom) level 3
xpath specificationthe definition of '
xpathresult.invaliditeratorstate' in that specification.
XPathResult.numberValue - Web APIs
the read-only numbervalue property of the
xpathresult interface returns the numeric value of a result with
xpathresult.resulttype being number_type.
... syntax var value = result.numbervalue; return value the return value is the numeric value of the
xpathresult returned by document.evaluate().
... exceptions type_err in case
xpathresult.resulttype is not number_type, an
xpathexception of type type_err is thrown.
... html <div>
xpath example</div> <div>number of <div>s: <output></output></div> javascript var
xpath = "count(//div)"; var result = document.evaluate(
xpath, document, null,
xpathresult.number_type, null); document.queryselector("output").textcontent = result.numbervalue; result specifications specification status comment document object model (dom) level 3
xpath specificationthe definition of '
xpathresult.numbervalue' in that specification.
XPathResult.singleNodeValue - Web APIs
the read-only singlenodevalue property of the
xpathresult interface returns a node value or null in case no node was matched of a result with
xpathresult.resulttype being any_unordered_node_type or first_ordered_node_type.
... syntax var value = result.singlenodevalue; return value the return value is the node value of the
xpathresult returned by document.evaluate().
... exceptions type_err in case
xpathresult.resulttype is not any_unordered_node_type or first_ordered_node_type, an
xpathexception of type type_err is thrown.
... html <div>
xpath example</div> <div>tag name of the element having the text content '
xpath example': <output></output></div> javascript var
xpath = "//*[text()='
xpath example']"; var result = document.evaluate(
xpath, document, null,
xpathresult.first_ordered_node_type, null); document.queryselector("output").textcontent = result.singlenodevalue.localname; result specifications specification status comment document object model (dom) level 3
xpath specificationthe definition of '
xpathresult.singlenodevalue' in that specification.
XPathResult.snapshotItem() - Web APIs
the snapshotitem() method of the
xpathresult interface returns an item of the snapshot collection or null in case the index is not within the range of nodes.
... syntax var node = result.snapshotitem(i); return value the node at the given index within the node set of the
xpathresult.
... exceptions type_err in case
xpathresult.resulttype is not unordered_node_snapshot_type or ordered_node_snapshot_type, an
xpathexception of type type_err is thrown.
... html <div>
xpath example</div> <div>tag names of the matched nodes: <output></output></div> javascript var
xpath = "//div"; var result = document.evaluate(
xpath, document, null,
xpathresult.ordered_node_snapshot_type, null); var node = null; var tagnames = []; for(var i = 0; i < result.snapshotlength; i++) { var node = result.snapshotitem(i); tagnames.push(node.localname); } document.queryselector("output").textcontent = tagnames.join(", "); result specifications specification status comment document object model (dom) level 3
xpath specificationthe definition of '
xpathresult.snapshotitem()' in that specification.
XPathResult.stringValue - Web APIs
the read-only stringvalue property of the
xpathresult interface returns the string value of a result with
xpathresult.resulttype being string_type.
... syntax var value = result.stringvalue; return value the return value is the string value of the
xpathresult returned by document.evaluate().
... exceptions type_err in case
xpathresult.resulttype is not string_type, an
xpathexception of type type_err is thrown.
... html <div>
xpath example</div> <div>text content of the <div> above: <output></output></div> javascript var
xpath = "//div/text()"; var result = document.evaluate(
xpath, document, null,
xpathresult.string_type, null); document.queryselector("output").textcontent = result.stringvalue; result specifications specification status comment document object model (dom) level 3
xpath specificationthe definition of '
xpathresult.stringvalue' in that specification.
self - XPath
specifications specification status comment
xpath 3.1the definition of 'self' in that specification.
... recommendation
xpath 3.0the definition of 'self' in that specification.
... recommendation
xpath 2.0the definition of 'self' in that specification.
... recommendation
xpath 1.0the definition of 'self' in that specification.
Axes - XPath
xslt/
xpath reference: xslt elements, exslt functions,
xpath functions,
xpath axes there are thirteen different axes in the
xpath specification.
... for further information on using
xpath expressions, please see the for further reading section at the end of transforming xml with xslt document.
... also see the 'axes' section in the
xpath spec.
...if an
xpath expression does not specify an axis, this is understood by default.
translate - XPath
xslt/
xpath reference: xslt elements, exslt functions,
xpath functions,
xpath axes the translate function evaluates a string and a set of characters to translate and returns the translated string.
... notes
xpath notes that the translate function is not a sufficient solution for case conversion in all languages.
... a future version of
xpath may provide additional functions for case conversion.
... defined
xpath 1.0 4.2 gecko support supported.
nsIDOMXPathException
dom/interfaces/
xpath/nsidom
xpathexception.idlscriptable describes an exception resulting from
xpath operations.
... constants error codes constant value description invalid_expression_err 51 an invalid
xpath expression was used.
... see also introduction to using
xpath in javascript document object model (dom) level 3
xpath specification nsidom
xpathevaluator document.evaluate nsidom
xpathresult ...
XPathNSResolver.lookupNamespaceURI() - Web APIs
the lookupnamespaceuri method looks up the namespace uri associated to the given namespace prefix within an
xpath expression evaluated by the
xpathevaluator interface.
... syntax domstring
xpathnsresolver.lookupnamespaceuri(prefix); parameters prefix a domstring representing the prefix to look for.
... specifications specification status comment document object model (dom) level 3
xpath specificationthe definition of '
xpathnsresolver.lookupnamespaceuri()' in that specification.
XPathResult.snapshotLength - Web APIs
the read-only snapshotlength property of the
xpathresult interface represents the number of nodes in the result snapshot.
... exceptions type_err in case
xpathresult.resulttype is not unordered_node_snapshot_type or ordered_node_snapshot_type, an
xpathexception of type type_err is thrown.
... html <div>
xpath example</div> <div>number of matched nodes: <output></output></div> javascript var
xpath = "//div"; var result = document.evaluate(
xpath, document, null,
xpathresult.ordered_node_snapshot_type, null); document.queryselector("output").textcontent = result.snapshotlength; result specifications specification status comment document object model (dom) level 3
xpath specificationthe definition of '
xpathresult.snapshotlength' in that specification.
current - XPath
xslt/
xpath reference: xslt elements, exslt functions,
xpath functions,
xpath axes the current function can be used to get the context node in an xslt instruction.
... notes this function is an xslt-specific addition to
xpath.
... it is not a part of the core
xpath function library.
document - XPath
xslt/
xpath reference: xslt elements, exslt functions,
xpath functions,
xpath axes the document finds a node-set in an external document, or multiple external documents, and returns the resulting node-set.
... this function is an xslt-specific addition to
xpath.
... it is not a part of the core
xpath function library.
format-number - XPath
xslt/
xpath reference: xslt elements, exslt functions,
xpath functions,
xpath axes the format-number function evaluates a number and returns a string representing the number in a given format.
... notes this function is an xslt-specific addition to
xpath.
... it is not a part of the core
xpath function library.
generate-id - XPath
xslt/
xpath reference: xslt elements, exslt functions,
xpath functions,
xpath axes the generate-id function generates a unique id for the first node in a given node-set and returns a string containing that id.
... this function is an xslt-specific addition to
xpath.
... it is not a part of the core
xpath function library.
key - XPath
xslt/
xpath reference: xslt elements, exslt functions,
xpath functions,
xpath axes the key function returns a node-set of nodes that have the given value for the given key.
... this function is an xslt-specific addition to
xpath.
... it is not a part of the core
xpath function library.
substring - XPath
xslt/
xpath reference: xslt elements, exslt functions,
xpath functions,
xpath axes the substring function returns a part of a given string.
... notes as in other
xpath functions, the position is not zero-based.
... defined
xpath 1.0 4.2 gecko support supported.
XPath - Archive of obsolete content
notes and sample code for
xpath and ajax (the following was moved from document.evaluate) obj.evaluate(
xpathexpression,contextnode,namespaceresolver,resulttype,result); //obj and contextnode should be the same object, if context is a ajax xml object (example: returnedxml) this should be used as : returnedxml.evaluate(
xpathexpression,returnedxml,namespaceresolver,returntype,result); //contextnode should be used in the one in which it was created //add by mooring 2008-11-15 16:00 china var xhr = new ajax('post','demo.xml',parsexml,'xml'); //ajax is a class written by javascript which return responsexml object to parsexml function function parsexml(obj)//obj is the returnxml object now { if(!obj.documentelement) { alert("your browser does't support this script!"); return; ...
... } var fields = [];//store the results if(window.activexobject) { var tobj = obj.documentelement.selectnodes("/root/field/item"); for(var i=0;i<tobj.length; i++) { fields.push(tobj[i].text); } } else { var tobj = obj.evaluate("/root/field/item",obj.documentelement,null,
xpathresult.any_type, null); var tmp = tobj.iteratenext(); while(tmp) { fields.push(tmp.textcontent); tmp = tobj.iteratenext(); } } alert(fields); } //here is the demo xml file for
xpath <?xml version="1.0"?> <root> <field> <item>art_id</item> <item>psection</item> <item>qkind</item> <item>qtitle</item> <item>question</item> <item>pic</item> <item>answer1</item> <item>answer2</item> <item>answer3</item> <item>answer4</item> </field> </root> //add by mooring 2008-1...
XPathException.code - Web APIs
the code read-only property of the
xpathexception interface returns a short that contains one of the error code constants.
... specifications specification status comment document object model (dom) level 3
xpath specificationthe definition of '
xpathexception' in that specification.
boolean - XPath
xslt/
xpath reference: xslt elements, exslt functions,
xpath functions,
xpath axes the boolean function evaluates an expression and returns true or false.
... defined
xpath 1.0 4.3 gecko support supported.
ceiling - XPath
xslt/
xpath reference: xslt elements, exslt functions,
xpath functions,
xpath axes the ceiling function evaluates a decimal number and returns the smallest integer greater than or equal to the decimal number.
... for example: ceiling (5.2) = 6 ceiling (-5.2) = -5 defined
xpath 1.0 4.4 gecko support supported.
concat - XPath
xslt/
xpath reference: xslt elements, exslt functions,
xpath functions,
xpath axes the concat function concatenates two or more strings and returns the resulting string.
... defined
xpath 1.0 4.2 gecko support supported.
contains - XPath
xslt/
xpath reference: xslt elements, exslt functions,
xpath functions,
xpath axes the contains function determines whether the first argument string contains the second argument string and returns boolean true or false.
... defined
xpath 1.0 4.2 gecko support supported.
count - XPath
xslt/
xpath reference: xslt elements, exslt functions,
xpath functions,
xpath axes the count function counts the number of nodes in a node-set and returns an integer.
... defined
xpath 1.0 4.1 gecko support supported.
false - XPath
xslt/
xpath reference: xslt elements, exslt functions,
xpath functions,
xpath axes the false function returns boolean false.
... notes this function is useful part of a comparison: <xsl:if test="boolean((1 > 2) = false())"> the expression evaluates as true </xsl:if> defined
xpath 1.0 4.3 gecko support supported.
floor - XPath
xslt/
xpath reference: xslt elements, exslt functions,
xpath functions,
xpath axes the floor function evaluates a decimal number and returns the largest integer less than or equal to the decimal number.
... defined
xpath 1.0 4.4 gecko support supported.
function-available - XPath
xslt/
xpath reference: xslt elements, exslt functions,
xpath functions,
xpath axes the function-available function determines if a given function is available and returns boolean true or false.
... defined
xpath 1.0 15 gecko support supported.
id - XPath
xslt/
xpath reference: xslt elements, exslt functions,
xpath functions,
xpath axes the id function finds nodes matching the given ids and returns a node-set containing the identified nodes.
...see
xpath 1.0 5.2.1 defined
xpath 1.0 4.1 gecko support partially supported.
lang - XPath
xslt/
xpath reference: xslt elements, exslt functions,
xpath functions,
xpath axes the lang function determines whether the context node matches the given language and returns boolean true or false.
...lang="en">i went up a floor.</p> <p xml:lang="en-gb">i took the lift.</p> <p xml:lang="en-us">i rode the elevator.</p> and this part of an xsl template: <xsl:value-of select="count(//p[lang('en')])" /> <xsl:value-of select="count(//p[lang('en-gb')])" /> <xsl:value-of select="count(//p[lang('en-us')])" /> <xsl:value-of select="count(//p[lang('de')])" /> the output might be: 3 1 1 0 defined
xpath 1.0 4.3 gecko support supported.
last - XPath
xslt/
xpath reference: xslt elements, exslt functions,
xpath functions,
xpath axes the last function returns a number equal to the context size from the expression evaluation context.
... defined
xpath 1.0 4.1 gecko support supported.
local-name - XPath
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.
... defined
xpath 1.0 4.1 gecko support supported.
name - XPath
xslt/
xpath reference: xslt elements, exslt functions,
xpath functions,
xpath axes the name function returns a string representing the qname of the first node in a given node-set.
... defined
xpath 1.0 4.1 gecko support supported.
namespace-uri - XPath
xslt/
xpath reference: xslt elements, exslt functions,
xpath functions,
xpath axes the namespace-uri function returns a string representing the namespace uri of the first node in a given node-set.
... defined
xpath 1.0 4.1 gecko support supported.
normalize-space - XPath
xslt/
xpath reference: xslt elements, exslt functions,
xpath functions,
xpath axes the normalize-space function strips leading and trailing white-space from a string, replaces sequences of whitespace characters by a single space, and returns the resulting string.
... defined
xpath 1.0 4.2 gecko support supported.
not - XPath
xslt/
xpath reference: xslt elements, exslt functions,
xpath functions,
xpath axes the not function evaluates a boolean expression and returns the opposite value.
...--> </xsl:template> defined
xpath 1.0 4.3 gecko support supported.
number - XPath
xslt/
xpath reference: xslt elements, exslt functions,
xpath functions,
xpath axes the number function converts an object to a number and returns the number.
... defined
xpath 1.0 4.4 gecko support supported.
position - XPath
xslt/
xpath reference: xslt elements, exslt functions,
xpath functions,
xpath axes the position function returns a number equal to the context position from the expression evaluation context.
...--> </xsl:template> <xsl:template match="//div[@class='foo']/bar[position() = 1]"> <!-- this template matches the first bar element that is a child of a div element with a class attribute equal to "foo" --> </xsl:template> defined
xpath 1.0 4.1 gecko support supported.
round - XPath
xslt/
xpath reference: xslt elements, exslt functions,
xpath functions,
xpath axes the round function returns a number that is the nearest integer to the given number.
... defined
xpath 1.0 4.4 gecko support supported.
starts-with - XPath
xslt/
xpath reference: xslt elements, exslt functions,
xpath functions,
xpath axes the starts-with checks whether the first string starts with the second string and returns true or false.
... defined
xpath 1.0 4.2 gecko support supported.
string-length - XPath
xslt/
xpath reference: xslt elements, exslt functions,
xpath functions,
xpath axes the string-length function returns a number equal to the number of characters in a given string.
... defined
xpath 1.0 4.2 gecko support supported.
string - XPath
xslt/
xpath reference: xslt elements, exslt functions,
xpath functions,
xpath axes the string function converts the given argument to a string.
... defined
xpath 1.0 4.2 gecko support supported.
substring-after - XPath
xslt/
xpath reference: xslt elements, exslt functions,
xpath functions,
xpath axes the substring-after function returns a string that is the rest of a given string after a given substring.
... examples
xpath example output substring-after('aa-bb','-') bb substring-after('aa-bb','a') a-bb substring-after('aa-bb','b') b substring-after('aa-bb','q') (empty string) defined
xpath 1.0 4.2 gecko support supported.
substring-before - XPath
xslt/
xpath reference: xslt elements, exslt functions,
xpath functions,
xpath axes the substring-before function returns a string that is the part of a given string before a given substring.
... examples
xpath example output substring-before('aa-bb','-') aa substring-before('aa-bb','a') (empty string) substring-before('aa-bb','b') aa- substring-before('aa-bb','q') (empty string) defined
xpath 1.0 4.2 gecko support supported.
sum - XPath
xslt/
xpath reference: xslt elements, exslt functions,
xpath functions,
xpath axes the sum function returns a number that is the sum of the numeric values of each node in a given node-set.
... notes (none) defined
xpath 1.0 4.3 gecko support supported.
true - XPath
xslt/
xpath reference: xslt elements, exslt functions,
xpath functions,
xpath axes the true function returns a boolean value of true.
... defined
xpath 1.0 4.3 gecko support supported.
Functions - XPath
xslt/
xpath reference: xslt elements, exslt functions,
xpath functions,
xpath axes the following is an annotated list of core
xpath functions and xslt-specific additions to
xpath, including a description, syntax, a list of arguments, result-type, source in the appropriate w3c recommendation, and degree of present gecko support.
... for further information on using
xpath/xslt functions, please see the for further reading page.
choose - XPath
xslt/
xpath reference: xslt elements, exslt functions,
xpath functions,
xpath axes the choose function returns one of the specified objects based on a boolean parameter.
element-available - XPath
xslt/
xpath reference: xslt elements, exslt functions,
xpath functions,
xpath axes the element-available function determines if an element is available and returns true or false.
system-property - XPath
xslt/
xpath reference: xslt elements, exslt functions,
xpath functions,
xpath axes the system-property function returns an object representing the given system-property.
unparsed-entity-url - XPath
xslt/
xpath reference: xslt elements, exslt functions,
xpath functions,
xpath axes the unparsed-entity-url() function returns the uri of the unparsed entity with the given name.
Index - Web APIs
886 document.createexpression() api, dom, method, reference,
xpath, createexpression this method compiles an
xpathexpression which can then be used for (repeated) evaluations.
... 887 document.creatensresolver() api, dom, dom reference, method, reference creates an
xpathnsresolver which resolves namespaces with respect to the definitions in scope for a specified node.
... 907 document.evaluate() api, dom, method, reference,
xpath returns an
xpathresult based on an
xpath expression and other given parameters.
...And 21 more matches
Document.evaluate() - Web APIs
returns an
xpathresult based on an
xpath expression and other given parameters.
... syntax var
xpathresult = document.evaluate(
xpathexpression, contextnode, namespaceresolver, resulttype, result );
xpathexpression is a string representing the
xpath to be evaluated.
... contextnode specifies the context node for the query (see the
xpath specification).
...And 15 more matches
Creating a Microsummary - Archive of obsolete content
mplate> <transform xmlns="http://www.w3.org/1999/xsl/transform" version="1.0"> <output method="text"/> <template match="/"> </template> </transform> </template> </generator> including the download count to include the download count in the output of the xslt transform sheet, we need to add an xslt <value-of> element to the template whose select attribute contains an
xpath expression that points to the node containing the count.
...
xpath is a language for identifying nodes in html/xml documents.
...the easiest way to get an
xpath expression that points to the node in question is to use the
xpath checker extension.
...And 4 more matches
XML Templates - Archive of obsolete content
an xml document will be loaded and
xpath expressions may be used to take portions of the xml document and generate content from these.
...just place an expr attribute on the query element containing an
xpath expression returns the set of results to output.
... here is an example: <listbox datasources="people.xml" ref="*" querytype="xml"> <template> <query expr="person"/> <action> <listitem uri="?" label="?name"/> </action> </template> </listbox> the expr attribute is a very simple
xpath expression which simply retrieves the person elements from within the datasource.
...And 4 more matches
Document.createNSResolver() - Web APIs
creates an
xpathnsresolver which resolves namespaces with respect to the definitions in scope for a specified node.
... return value nsresolver is an
xpathnsresolver object.
... notes adapts any dom node to resolve namespaces so that an
xpath expression can be easily evaluated relative to the context of the node where it appeared within the document.
...And 4 more matches
Connecting to Remote Content - Archive of obsolete content
there are a couple of tools you can use to process these documents more efficiently: using
xpath xpath stands for xml path language, it uses a non-xml syntax that provides a flexible way of addressing (pointing to) different parts of an xml document.
... taken from the
xpath page.
... you can use
xpath to quickly access specific nodes in an xml or html document with a simple query mechanism.
...And 3 more matches
Index - Archive of obsolete content
221
xpath no summary!
...for an xml datasource, generated content will be output in the order corresponding to the results of the
xpath query expression.
...an xml document will be loaded and
xpath expressions may be used to take portions of the xml document and generate content from these.
...And 3 more matches
An Overview - XSLT: Extensible Stylesheet Language Transformations
locations on the tree are specified using
xpath, another w3c recommendation.
...to facilitate this, the w3c decided to use a separate language,
xpath, which also has uses outside the xslt context.
... as its name implies,
xpath defines a "path" the processor must take through the tree to arrive at the desired node.
...And 3 more matches
Document - Web APIs
the document interface is extended with the
xpathevaluator interface: document.createexpression() compiles an
xpathexpression which can then be used for (repeated) evaluations.
... document.creatensresolver() creates an
xpathnsresolver object.
... document.evaluate() evaluates an
xpath expression.
...And 2 more matches
Microsummary XML grammar reference - Archive of obsolete content
child elements: <condition> (optional) an
xpath boolean expression along with a conditional interval of time, in minutes, that must elapse between updates if the expression evaluates to true.
...for each one, firefox evaluates the element's
xpath boolean expression against the page being summarized.
... the <condition> element the optional <condition> element specifies an
xpath boolean expression along with a conditional interval of time, in minutes, that must elapse between updates if the expression evaluates to true when evaluated against the page being summarized.
...attributes: expression (required) an
xpath boolean expression to be evaluated against the page being summarized.
XML in Mozilla - Archive of obsolete content
xpointer framework obsolete since gecko 1.9.1 w3c recommendation xpointer element() scheme obsolete since gecko 1.9.1 w3c recommendation xpointer xmlns() scheme obsolete since gecko 1.9.1 w3c recommendation xpointer fixptr() scheme obsolete since gecko 1.9.1 this scheme is simply a wrapper for fixptr xpointer
xpath1() scheme obsolete since gecko 1.9.1 internet-draft document.load(), document.async part of dom level 3 load & save module, a w3c working draft xhtml we have reasonable xhtml support, most things should work.
...since 1.4alpha, mozilla also supports xpointer framework, xpointer element() scheme, xpointer xmlns() scheme, xpointer fixptr() scheme and xpointer
xpath1() scheme.
...the
xpath1() scheme was implemented using this extensible mechanism.
...outside supported xml w3c recommendations specification or technology documentation mozilla project xslt w3c recommendation xslt
xpath w3c recommendation xslt xmlhttprequest w3c recommendation xml extras request api (no longer supported) mozilla add-on sdk domparser and xmlserializer mozilla xml extras sax sax soap (no longer supported) w3c note web services xml...
XML Assignments - Archive of obsolete content
xpath provides syntax to retrieve this using the built-in string-length method.
...this element allows the use of additional
xpath expressions to get more data from the xml data.
...the expr attribute specifies the
xpath expression and the var attribute specifies the variable to assign to.
... note that while the query expression uses the root node (or reference node) as the
xpath context, the expressions for the assign element are evaluated using each result node as the context.
Index
to get this interface, use: 527 nsidom
xpathevaluator dom, interfaces, interfaces:scriptable, xpcom api reference, xpcom interface reference,
xpath implemented by: @mozilla.org/dom/
xpath-evaluator;1.
... to create an instance, use: 528 nsidom
xpathexception dom, interfaces, interfaces:scriptable, xpcom, xpcom interface reference,
xpath no summary!
... 529 nsidom
xpathexpression dom, interfaces, interfaces:scriptable, xpcom, xpcom interface reference,
xpath evaluate the
xpath expression.
... 530 nsidom
xpathresult dom, interfaces, interfaces:scriptable, xpcom, xpcom interface reference,
xpath iterates through the available nodes of an unordered_node_iterator_type or ordered_node_iterator_type result.
Migrating from Firebug - Firefox Developer Tools
copy html and related information firebug's html panel allows to copy the inner and outer html of an element as well as the css and
xpath to it via the context menu of an element.
... the page inspector provides the same functionality except copying
xpaths.
... search for elements via css selectors or
xpaths firebug allows to search for elements within the html panel via css selectors or
xpaths.
...searching by
xpaths is not supported though (see bug 963933.
Examine and edit HTML - Firefox Developer Tools
there are three types of searches that are performed automatically depending on what you enter, a full text search, a css selector search, and an
xpath search.
...that allows you to find css selectors and
xpath expressions occurring within the text.
...
xpath search it is also possible to search via
xpaths.
... subtree modification attribute modification node removal use in console show dom properties show accessibility properties change pseudo-class hover active focus focus-within visited screenshot node scroll into view copy inner html outer html css selector css path
xpath image data-url attribute paste inner html outer html before after as first child as last child expand all collapse all open link in new tab * open file in debugger * open file in style-editor * copy link address * * these options only appear in certain contexts, for example the "open file in style-editor" option only appears when you context-click ove...
Document.createExpression() - Web APIs
this method compiles an
xpathexpression which can then be used for (repeated) evaluations.
... syntax
xpathexpr = document.createexpression(
xpathtext, namespaceurlmapper); parameters
xpathtext is a string which is the
xpath expression to be compiled.
... firefox 3 note prior to firefox 3, you could call this method on documents other than the one you planned to run the
xpath against.
... return value
xpathexpression ...
<xsl:stylesheet> - XSLT: Extensible Stylesheet Language Transformations
xslt/
xpath reference: xslt elements, exslt functions,
xpath functions,
xpath axes the <xsl:stylesheet> element (or the equivalent <xsl:transform> element) is the outermost element of a stylesheet.
... default-collation specifies the default collation used by all
xpath expressions appearing in attributes or text value templates that have the element as an ancestor, unless overridden by another default-collation attribute on an inner element.
...
xpath-default-namespace specifies the namespace that will be used if the element name is unprefixed or an unprefixed type name within an
xpath expression.
... xslt 2.0 added the attributes
xpath-default-namespace, default-validation, default-collation, and input-type-annotations and made all attributes except version optional.
XSLT: Extensible Stylesheet Language Transformations
xslt/
xpath reference: xslt elements, exslt functions,
xpath functions,
xpath axes extensible stylesheet language transformations (xslt) is an xml-based language used, in conjunction with specialized processing software, for the transformation of xml documents.
... xslt &
xpath tutorial the topxml xslt tutorial introduces you to the basics of xslt concepts, syntax, and programming.
... this extensive introduction to xslt and
xpath assumes no prior knowledge of the technologies and guides the reader through background, context, structure, concepts and introductory terminology.
... mailing list newsgroup rss feed related topics xml,
xpath, xquery ...
Install script template - Archive of obsolete content
errorcode="+myregstatus); return myregstatus; } ///////////////////////////////// // write the subkey suffixes // /////////////////////////////// var suffi
xpath = mymozillapluginpath+"\\suffixes"; // write the suffix of the mimetype myregstatus = winreg.createkey(suffi
xpath, ""); if (myregstatus != 0) { logcomment("moz registerplid: could not create the suffix key, "+suffi
xpath+", as expected.
... errorcode="+myregstatus); return myregstatus; } // write the suffix (extension), (one value-key with no value) myregstatus = winreg.setvaluestring(suffi
xpath, suffix, "\0"); if (myregstatus != 0) { logcomment("moz registerplid: could not create the suffix value.
... regpath="+suffi
xpath+", value="+suffix+", as expected.
Template Logging - Archive of obsolete content
xpath expression in query could not be parsed for xml datasources, a query attribute has an
xpath expression that is not valid.
...
xpath expression in <assign> could not be parsed </assign> for xml datasources, an <assign> element has an
xpath expression that is not valid.
...
xpath expression in <binding> could not be parsed for xml datasources, a <binding> element has an
xpath expression that is not valid.
Error codes returned by Mozilla APIs
ns_error_xpc_has_been_shutdown (0x80570033) ns_error_xpc_cant_modify_prop_on_wn (0x80570034) ns_error_xpc_bad_convert_js_zero_isnot_null (0x80570035) ns_error_xpc_com_unknown (0x80570036) ns_error_xpc_com_error (0x80570037) ns_error_xpc_com_invalid_class_id (0x80570038) ns_error_xpc_com_create_failed (0x80570039) ns_error_xpc_idispatch_not_enabled (0x8057003a)
xpath errors errors that can occur when using
xpath expressions.
... ns_error_
xpath_parse_failure (0x80600002) ns_error_
xpath_unknown_function (0x80600005) ns_error_
xpath_bad_argument_count (0x8060000d) ns_error_
xpath_bad_extension_function (0x8060000e) ns_error_
xpath_paren_expected (0x8060000f) ns_error_
xpath_invalid_axis (0x80600010) ns_error_
xpath_no_node_type_test (0x80600011) ns_error_
xpath_bracket_expected (0x80600012) ns_error_
xpath_invalid_var_name (0x80600013) ns_error_
xpath_unexpected_end (0x80600014) ns_error_
xpath_operator_expected (0x80600015) ns_error_
xpath_unclosed_literal (0x80600016) ns_error_
xpath_bad_colon (0x80600017) ns_error_
xpath_bad_bang (0x80600018) ns_error_
xpath_illegal_char (0x80600019) ns_error_
xpath_binary_expected (0x8060001a) ns_error_
xpath_invalid_expression_eval...
...uated (0x8060001c) ns_error_
xpath_unbalanced_curly_brace (0x8060001d) xslt errors errors that can occur when using xslt.
XSLT elements reference - XSLT: Extensible Stylesheet Language Transformations
xslt/
xpath reference: xslt elements, exslt functions,
xpath functions,
xpath axes there are two types of elements discussed here: top-level elements and instructions.
...an attribute value template is simply a string that includes an embedded
xpath expression which is used to specify the value of an attribute.
... at run-time the expression is evaluated and the result of the evaluation is substituted for the
xpath expression.
Index - XSLT: Extensible Stylesheet Language Transformations
xslt/
xpath reference: xslt elements, exslt functions,
xpath functions,
xpath axes found 54 pages: # page tags and summary 1 xslt: extensible stylesheet language transformations landing, web, xslt extensible stylesheet language transformations (xslt) is an xml-based language used, in conjunction with specialized processing software, for the transformation of xml documents.
... 17 the netscape xslt/
xpath reference netscape, reference, xslt, axes no summary!
... 51 <xsl:value-of> element, reference, xslt, value-of the <xsl:value-of> element evaluates an
xpath expression, converts it to a string, and writes that string to the result tree.
jspage - Archive of obsolete content
ch($type(c)){case"object":b={};for(var e in c){b[e]=$unlink(c[e]); }break;case"hash":b=new hash(c);break;case"array":b=[];for(var d=0,a=c.length;d<a;d++){b[d]=$unlink(c[d]);}break;default:return c;}return b;}var browser=$merge({engine:{name:"unknown",version:0},platform:{name:(window.orientation!=undefined)?"ipod":(navigator.platform.match(/mac|win|linux/i)||["other"])[0].tolowercase()},features:{
xpath:!!(document.evaluate),air:!!(window.runtime),query:!!(document.queryselector)},plugins:{},engines:{presto:function(){return(!window.opera)?false:((arguments.callee.caller)?960:((document.getelementsbyclassname)?950:925)); },trident:function(){return(!window.activexobject)?false:((window.xmlhttprequest)?((document.queryselectorall)?6:5):4);},webkit:function(){return(navigator.taintenabled)?false:(...
...(browser.features.
xpath)?((browser.features.query)?525:420):419); },gecko:function(){return(!document.getboxobjectfor&&window.mozinnerscreenx==null)?false:((document.getelementsbyclassname)?19:18);}}},browser||{});browser.platform[browser.platform.name]=true; browser.detect=function(){for(var b in this.engines){var a=this.engines[b]();if(a){this.engine={name:b,version:a};this.engine[b]=this.engine[b+a]=true; break;}}return{name:b,version:a};};browser.detect();browser.request=function(){return $try(function(){return new xmlhttprequest();},function(){return new activexobject("msxml2.xmlhttp"); },function(){return new activexobject("microsoft.xmlhttp");});};browser.features.xhr=!!(browser.request());browser.plugins.flash=(function(){var a=($try(function(){return navigator.plugins["shockwave flash"...
Migrate apps from Internet Explorer to Mozilla - Archive of obsolete content
ascade style sheets (css): css level 1, css level 2.1 and parts of css level 3 document object model (dom): dom level 1, dom level 2 and parts of dom level 3 mathematical markup language: mathml version 2.0 extensible markup language (xml): xml 1.0, namespaces in xml, associating style sheets with xml documents 1.0, fragment identifier for xml xsl transformations: xslt 1.0 xml path language:
xpath 1.0 resource description framework: rdf simple object access protocol: soap 1.1 ecma-262, revision 3 (javascript 1.5): ecma-262 general cross-browser coding tips even though web standards do exist, different browsers behave differently (in fact, the same browser may behave differently depending on the platform).
...it also allows javascript to perform xslt transformations and allows running
xpath on a document.
Index - Archive of obsolete content
for an xml datasource, generated content will be output in the order corresponding to the results of the
xpath query expression.
...an xml document will be loaded and
xpath expressions may be used to take portions of the xml document and generate content from these.
Using Recursive Templates - Archive of obsolete content
<groupbox type="menu" datasources="people.xml" ref="*" querytype="xml"> <template> <query expr="*"/> <action> <vbox uri="?" class="indent"> <label value="?name"/> </vbox> </action> </template> </groupbox> in this simplified example, the
xpath expression just gets the list of child elements of the reference node.
...in an
xpath expression, the period refers to the context node.
Mozilla XForms User Interface - Archive of obsolete content
they can be bound to instance nodes to define context for the xforms controls that they contain, should any of their child nodes happen to use relative
xpath expressions.
...that node will serve as the context node for any relative
xpath expressions in that set of repeated markup.
XForms - Archive of obsolete content
drawing on other w3c standards like xml schema,
xpath, and xml events, xforms tried to address some of the limitations of the current html forms model.
... tools xforms validator xforms buddy related topics extensions, html, xhtml, xml,
xpath ...
XInclude - MDN Web Docs Glossary: Definitions of Web-related terms
return false; break; } request.send(null); if((request.status === 200 || request.status === 0) && request[responsetype] !== null) { response = request[responsetype]; if (responsetype === 'responsexml') { // apply xpointer (only
xpath1() subset is supported) var responsenodes; if (xpointer) { var
xpathresult = response.evaluate( xpointer, response, ...
...null,
xpathresult.ordered_node_snapshot_type, null ); var a = []; for(var k = 0; k <
xpathresult.snapshotlength; k++) { a[k] =
xpathresult.snapshotitem(k); } responsenodes = a; } else { // otherwise, the response must be a single well-formed document response responsenodes = [response.documentelement]; // put in array so can be treated the same way as the above ...
Web Console Helpers - Firefox Developer Tools
$x(
xpath, element, resulttype) evaluates the
xpath xpath expression in the context of element and returns an array of matching nodes.
...the resulttype parameter specifies the type of result to return; it can be an
xpathresult constant, or a corresponding string: "number", "string", "bool", "node", or "nodes"; if not provided, any_type is used.
The JavaScript input interpreter - Firefox Developer Tools
$x(
xpath, element, resulttype) evaluates the
xpath xpath expression in the context of element and returns an array of matching nodes.
...the resulttype parameter specifies the type of result to return; it can be an
xpathresult constant, or a corresponding string: "number", "string", "bool", "node", or "nodes"; if not provided, any_type is used.
Document.getElementsByTagNameNS() - Web APIs
>some outer text</p> <button onclick="getallparaelems();"> show all p elements in document</button><br /> <button onclick="div1paraelems();"> show all p elements in div1 element</button><br /> <button onclick="div2paraelems();"> show all p elements in div2 element</button> </body> </html> potential workaround for other browsers which do not support if the desired browser did not support
xpath, another approach (such as traversing the dom through all its children, identifying all @xmlns instances, etc.) would be necessary to find all tags with the desired local name and namespace, but
xpath is much faster.
... (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 specification.
Introduction - Web APIs
xsl (extensible stylesheet language) transformations are composed of two parts: xsl elements, which allow the transformation of an xml tree into another markup tree and
xpath, a selection language for trees.
...each template matches (using
xpath) a certain fragment of the input xml document and then applies the substitution part on that fragment to create the new resulting document.
<xsl:apply-templates> - XSLT: Extensible Stylesheet Language Transformations
xslt/
xpath reference: xslt elements, exslt functions,
xpath functions,
xpath axes the <xsl:apply-templates> element selects a set of nodes in the input tree and instructs the processor to apply the proper templates to them.
... optional attributes select uses an
xpath expression that specifies the nodes to be processed.
<xsl:copy-of> - XSLT: Extensible Stylesheet Language Transformations
xslt/
xpath reference: xslt elements, exslt functions,
xpath functions,
xpath axes the <xsl:copy-of> element makes a deep copy (including descendant nodes) of whatever the select attribute specifies to the output document.
... syntax <xsl:copy-of select=expression /> required attributes select uses an
xpath expression that specifies what is to be copied.
<xsl:for-each> - XSLT: Extensible Stylesheet Language Transformations
xslt/
xpath reference: xslt elements, exslt functions,
xpath functions,
xpath axes the <xsl:for-each> element selects a set of nodes and processes each of them in the same way.
... syntax <xsl:for-each select=expression> <xsl:sort> [optional] template </xsl:for-each> required attributes select uses an
xpath expression to select nodes to be processed.
<xsl:if> - XSLT: Extensible Stylesheet Language Transformations
xslt/
xpath reference: xslt elements, exslt functions,
xpath functions,
xpath axes the <xsl:if> element contains a test attribute and a template.
... syntax <xsl:if test=expression> template </xsl:if> required attributes test contains an
xpath expression that can be evaluated (using the rules defined for boolean( ) if necessary) to a boolean value.
<xsl:key> - XSLT: Extensible Stylesheet Language Transformations
xslt/
xpath reference: xslt elements, exslt functions,
xpath functions,
xpath axes the <xsl:key> element declares a named key which can be used elsewhere in the stylesheet with the key( ) function.
... use specifies an
xpath expression that will be used to determine the value of the key for each of the applicable nodes.
<xsl:param> - XSLT: Extensible Stylesheet Language Transformations
xslt/
xpath reference: xslt elements, exslt functions,
xpath functions,
xpath axes the <xsl:param> element establishes a parameter by name and, optionally, a default value for that parameter.
... optional attributes select uses an
xpath expression to provide a default value if none is specified.
<xsl:sort> - XSLT: Extensible Stylesheet Language Transformations
xslt/
xpath reference: xslt elements, exslt functions,
xpath functions,
xpath axes the <xsl:sort> element defines a sort key for nodes selected by <xsl:apply-templates> or <xsl:for-each> and determines the order in which they are processed.
... optional attributes select uses an
xpath expression to specify the nodes to be sorted.
<xsl:value-of> - XSLT: Extensible Stylesheet Language Transformations
xslt/
xpath reference: xslt elements, exslt functions,
xpath functions,
xpath axes the <xsl:value-of> element evaluates an
xpath expression, converts it to a string, and writes that string to the result tree.
... syntax <xsl:value-of select=expression disable-output-escaping="yes" | "no" /> required attributes select specifies the
xpath expression to be evaluated and written to the output tree.
<xsl:variable> - XSLT: Extensible Stylesheet Language Transformations
xslt/
xpath reference: xslt elements, exslt functions,
xpath functions,
xpath axes the <xsl:variable> element declares a global or local variable in a stylesheet and gives it a value.
... optional attributes select defines the value of the variable through an
xpath expression.
Transforming XML with XSLT - XSLT: Extensible Stylesheet Language Transformations
xslt/
xpath reference: xslt elements, exslt functions,
xpath functions,
xpath axes an overview the separation of content and presentation is a key design feature of xml.
... xslt/
xpath reference elements xsl:apply-imports (supported) xsl:apply-templates (supported) xsl:attribute (supported) xsl:attribute-set (supported) xsl:call-template (supported) xsl:choose (supported) xsl:comment (supported) xsl:copy (supported) xsl:copy-of (supported) xsl:decimal-format (supported) xsl:element (supported) xsl:fallback (not supported) xsl:for-each (supported) xsl:if (suppor...
HTML to DOM - Archive of obsolete content
let's take a look at the donkeyfire.donkeybrowser_onpageload() handler: donkeybrowser_onpageload: function(aevent) { var doc = aevent.originaltarget; var url = doc.location.href; if (aevent.originaltarget.nodename == "#document") { // ok, it's a real page, let's do our magic dump("[df] url = "+url+"\n"); var text = doc.evaluate("/html/body/h1",doc,null,
xpathresult.string_type,null).stringvalue; dump("[df] text in /html/body/h1 = "+text+"\n"); } }, as you can see, we obtain full access to the dom of the page we loaded in background, and we can even evaluate
xpath expressions.
XML-related code snippets - Archive of obsolete content
how to create a dom tree using xmlhttprequest parsing and serializing xml using
xpath jxon (lossless javascript xml object notation) xsl transforms xlink xinclude xml:id xml:base support in old browsers xpointer svg namespaces, or why http://www.mozilla.org/keymaster/gat...re.is.only.xul is at the top of every xul document.
Index of archived content - Archive of obsolete content
svg animation svg general scrollbar sidebar stringview tabbox toolbar tree uri parsing view source for xul applications windows xml-related code snippets xml:base support in old browsers
xpath getattributens common pitfalls communication between html and your extension creating custom firefox extensions with the mozilla build system custom about: urls default preferences deploying a plugin as an extension developing add-ons displaying web content in an extension without se...
JXON - Archive of obsolete content
note: if you are interested to address only some parts of an xml document (and are not starting in javascript/json for templating purposes), use
xpath instead of converting the whole document into json.
Mozilla Application Framework in Detail - Archive of obsolete content
ss) performinstall(); else { alert("error detected: "+getlasterror()); cancelinstall(); } other features a resource description framework (rdf) parser with support for creating rdf graphs programmatically or by parsing files, compositing multiple sources into a single rdf graph, querying and manipulating graphs, and populating xul widgets (trees, menus, etc.) with graph data; an xslt/
xpath processor; scalable vector graphics (svg) rendering with support for a usable subset of the standard including all basic shapes, beziers, stroking and filling with opacity, and much of the dom; mathml rendering; an ecma-262 edition 3-compliant javascript engine; java integration with a bridge to xpcom, a java dom api, the open jvm integration (oji) facility, a java webclient api, and java plu...
Multiple Rules - Archive of obsolete content
in this simple example with one rule though, it would likely be simpler and faster to just filter these out using the query
xpath expression rather than generating the results then using a condition to filter them.
assign - Archive of obsolete content
for more information, see xml_assignments attributes expr, var examples (example needed) attributes expr type: string for xml queries, an
xpath expression which returns results.
Implementation Status - Archive of obsolete content
xpath expressions in xforms section title status notes bugs 7.1
xpath datatypes supported 7.2 evaluation context partial 7.3 references, dependencies, and dynamic dependencies partial we probably already do most of it due to our 1.0 work, but w...
RFE to the XForms API - Archive of obsolete content
ability to get nsixformsaccessors for instance node we need the ability to get to the nsixformsaccessors interface on a node by specifying the node via an
xpath expression or by specifying the instance node directly (see bug 312956).
XForms Output Element - Archive of obsolete content
attributes ui common appearance - the value of this attribute gives a hint to the xforms processor as to which type of widget(s) to use to represent this control accesskey - used to specify the keyboard shortcut for focusing this control single-node binding special value -
xpath expression whose evaluation result is used as the output's value.
XQuery - Archive of obsolete content
it offers powerful and yet intuitive searching based on
xpath, has sql-like syntax for the query portion, and has scripting features such as function and variable definitions, xml-inclusion, etc.
Archive of obsolete content
it offers powerful and yet intuitive searching based on
xpath, has sql-like syntax for the query portion, and has scripting features such as function and variable definitions, xml-inclusion, etc.
MDN Web Docs Glossary: Definitions of Web-related terms
s webassembly webdav webextensions webgl webidl webkit webm webp webrtc websockets webvtt whatwg whitespace world wide web wrapper x xforms xhr (xmlhttprequest) xhtml xinclude xlink xml
xpath xquery xslt other 404 502 alpn at-rule attack byte-order mark character set client cryptosystem debug digital signature execution flex-direction glsl interface library memory management routers ...
Mozilla DOM Hacking Guide
the part about componentregistrar is designed to allow external modules (in this case
xpath) to be included in domclassinfo and as such benefit from the javascript benefits it provides.
XPCOM Interface Reference
entnsidomnshtmldocumentnsidomnavigatordesktopnotificationnsidomnodensidomofflineresourcelistnsidomorientationeventnsidomparsernsidomprogresseventnsidomserializernsidomsimplegestureeventnsidomstoragensidomstorage2nsidomstorageeventobsoletensidomstorageitemnsidomstoragelistnsidomstoragemanagernsidomstoragewindownsidomuserdatahandlernsidomwindownsidomwindow2nsidomwindowinternalnsidomwindowutilsnsidom
xpathevaluatornsidom
xpathexceptionnsidom
xpathexpressionnsidom
xpathresultnsidomxulcontrolelementnsidomxulelementnsidomxullabeledcontrolelementnsidomxulselectcontrolelementnsidomxulselectcontrolitemelementnsidatasignatureverifiernsidebugnsidebug2nsidevicemotionnsidevicemotiondatansidevicemotionlistenernsidialogcreatornsidialogparamblocknsidictionarynsidirindexnsidirindexlistenernsidirindexparsernsidirect...
XPCOM Interface Reference by grouping
nsiaccessiblestates nsiaccessibletable nsiaccessibletext nsiaccessibletreecache nsiaccessiblevalue nsiaccessnode nsisyncmessagesender script nsiscriptableunescapehtml nsiscriptableunicodeconverter nsiscripterror nsiscripterror2 stylesheet nsistylesheetservice url nsiuri nsiurl util nsidomserializer nsidom
xpathevaluator nsidom
xpathexception nsidom
xpathexpression nsidom
xpathresult xslt nsixsltexception nsixsltprocessor download nsidownload nsidownloadmanager nsidownloadprogresslistener element internal nsiworker nsiworkerglobalscope nsiworkermessageevent nsiworkermessageport nsiworkerscope tree nsitreeboxobject ...
How to create a DOM tree - Web APIs
dom trees can be queried using
xpath expressions, converted to strings or written to a local or remote files using xmlserializer (without having to first convert to a string), posted to a web server (via xmlhttprequest), transformed using xslt, xlink, converted to a javascript object through a jxon algorithm, etc.
Resources - Web APIs
at ibm developerworks xslt tutorial at zvon.org
xpath tutorial at zvon.org using the mozilla javascript interface to do xsl transformations at mozilla.org mozilla.org's xslt project page, which includes a frequently encountered issues section.
Web APIs
rmlocation webglvertexarrayobject webkitcssmatrix websocket wheelevent window windowclient windoweventhandlers windoworworkerglobalscope worker workerglobalscope workerlocation workernavigator worklet writablestream writablestreamdefaultcontroller writablestreamdefaultwriter x xdomainrequest xmldocument xmlhttprequest xmlhttprequesteventtarget xmlhttprequestresponsetype xmlserializer
xpathevaluator
xpathexception
xpathexpression
xpathnsresolver
xpathresult xrboundedreferencespace xrenvironmentblendmode xreye xrframe xrframerequestcallback xrhandedness xrinputsource xrinputsourcearray xrinputsourceevent xrinputsourceeventinit xrinputsourceschangeevent xrinputsourceschangeeventinit xrpermissiondescriptor xrpermissionstatus xrpose xrreferencespace xrreferencespaceevent xrreferencesp...
exsl:node-set() - EXSLT
xslt/
xpath reference: xslt elements, exslt functions,
xpath functions,
xpath axes exsl:node-set() returns a node-set from a result tree fragment, which is what you get when you look at the xsl:variable instead of its select attribute to fetch a variable's value.
exsl:object-type() - EXSLT
xslt/
xpath reference: xslt elements, exslt functions,
xpath functions,
xpath axes exsl:object-type() returns a string that indicates the type of the specified object.
Common (exsl) - EXSLT
xslt/
xpath reference: xslt elements, exslt functions,
xpath functions,
xpath axes the exslt common package provides basic functions that expand upon the capabilities of xslt.
math:highest() - EXSLT
xslt/
xpath reference: xslt elements, exslt functions,
xpath functions,
xpath axes math:highest() returns the node in the specified node-set with the highest value (where the highest value calculated using math:max()).
math:lowest() - EXSLT
xslt/
xpath reference: xslt elements, exslt functions,
xpath functions,
xpath axes math:lowest() returns the node in the specified node-set with the lowest value (where the lowest value calculated using math:min()).
math:max() - EXSLT
xslt/
xpath reference: xslt elements, exslt functions,
xpath functions,
xpath axes math:max() returns the maximum value of a node-set.
math:min() - EXSLT
xslt/
xpath reference: xslt elements, exslt functions,
xpath functions,
xpath axes math:min() returns the minimum value of a node-set.
Math (math) - EXSLT
xslt/
xpath reference: xslt elements, exslt functions,
xpath functions,
xpath axes the exslt math package provides functions for working with numeric values and comparing nodes.
regexp:match() - EXSLT
xslt/
xpath reference: xslt elements, exslt functions,
xpath functions,
xpath axes regexp:match() performs regular expression matching on a string, returning the submatches found as a result.
regexp:replace() - EXSLT
xslt/
xpath reference: xslt elements, exslt functions,
xpath functions,
xpath axes regexp:replace() replaces the portions of a string that match a given regular expression with the contents of another string.
regexp:test() - EXSLT
xslt/
xpath reference: xslt elements, exslt functions,
xpath functions,
xpath axes regexp:test() tests to see whether a string matches a specified regular expression.
Regular expressions (regexp) - EXSLT
xslt/
xpath reference: xslt elements, exslt functions,
xpath functions,
xpath axes the exslt regular expressions package provides functions that allow testing, matching, and replacing text using javascript style regular expressions.
set:difference() - EXSLT
xslt/
xpath reference: xslt elements, exslt functions,
xpath functions,
xpath axes set:difference() returns the difference between two node-sets.
set:distinct() - EXSLT
xslt/
xpath reference: xslt elements, exslt functions,
xpath functions,
xpath axes set:distinct() returns a subset of the nodes in the specified node-set, returning only nodes with unique string values.
set:has-same-node() - EXSLT
xslt/
xpath reference: xslt elements, exslt functions,
xpath functions,
xpath axes set:has-same-node() determines whether two node-sets have any nodes in common.
set:intersection() - EXSLT
xslt/
xpath reference: xslt elements, exslt functions,
xpath functions,
xpath axes set:intersection() returns the intersection of two node-sets.
set:leading() - EXSLT
xslt/
xpath reference: xslt elements, exslt functions,
xpath functions,
xpath axes set:leading() returns the nodes in one node-set that come before the first node in the other node-set.
set:trailing() - EXSLT
xslt/
xpath reference: xslt elements, exslt functions,
xpath functions,
xpath axes set:trailing() returns the nodes in one node-set that come after the first node in the other node-set.
Sets (set) - EXSLT
xslt/
xpath reference: xslt elements, exslt functions,
xpath functions,
xpath axes the exslt sets package offers functions that let you perform set manipulation.
str:concat() - EXSLT
xslt/
xpath reference: xslt elements, exslt functions,
xpath functions,
xpath axes str:concat() returns a string containing all the string values in a node-set concatenated together.
str:split() - EXSLT
xslt/
xpath reference: xslt elements, exslt functions,
xpath functions,
xpath axes str:split() splits a string using a pattern string to determine where the splits should occur, returning a node-set containing the resulting strings.
str:tokenize() - EXSLT
xslt/
xpath reference: xslt elements, exslt functions,
xpath functions,
xpath axes str:tokenize() splits a string using a set of characters as delimiters that determine where the splits should occur, returning a node-set containing the resulting strings.
Strings (str) - EXSLT
xslt/
xpath reference: xslt elements, exslt functions,
xpath functions,
xpath axes the exslt strings package provides functions that allow the manipulation of strings.
EXSLT
xslt/
xpath reference: xslt elements, exslt functions,
xpath functions,
xpath axes exslt is a set of extensions to xslt.
Ajax - Developer guides
xpath xpath stands for xml path language, it uses a non-xml syntax that provides a flexible way of addressing (pointing to) different parts of an xml document.
eval() - JavaScript
pass data instead of code for example, an extension designed to scrape contents of web-pages could have the scraping rules defined in
xpath instead of javascript code.
For Further Reading - XSLT: Extensible Stylesheet Language Transformations
http://www.amazon.com/gp/product/0596004206 digital websites world wide web consortium the w3c homepage: http://www.w3.org/ the main xsl page: http://www.w3.org/style/xsl/ the version 1.0 recommendation for xslt: http://www.w3.org/tr/xslt archive of public style (css and xslt) discussions: http://lists.w3.org/archives/public/www-style/ the version 1.0 recommendation for
xpath: http://www.w3.org/tr/
xpath the world wide web consortium is the body that publishes recommendations for a number of web-based technologies, many of which become the de-facto standard.
Web technology for developers
demos of open web technologiesdeveloper guidesexsltevent referencehtml: hypertext markup languagehttpjavascriptmathmlopensearch description formatprivacy, permissions, and information securityprogressive web apps (pwas)svg: scalable vector graphicstutorialsweb apisweb componentsweb performanceweb app manifestsweb media technologiesweb securityweb technology referencexml: extensible markup language
xpathxslt: extensible stylesheet language transformations ...