This class converts a CSS selector that has been previously tokenize with the help of the SelectorLexer class into a XPath 1.0 query
package |
Docxpresso |
---|---|
subpackage |
Parser |
__construct()
access |
public |
---|---|
_parseNumeric(string $numbers) : string
access |
private |
---|
string
string
_singleWordQuery(string $word) : array|NULL
access |
private |
---|
string
array|NULL
The first array element is a valid XPath 1.0 query The second array entry is the specificity of that word It returns NULL if the CSS selector can not be converted into XPath, i.e. selectors that contain pseudoclasses and/or pseudoelements that have no XPath counterpart like ':active', ':visited', etcetera
_xpathAttribute(string $operand, integer $pos, array $word) : string
access |
private |
---|
string
possible values are:'^', '$', '|', '!', '~', '*', '='
integer
array
string
generateXPathQuery(string $selector) : array|NULL
access |
public |
---|
string
array|NULL
a valid XPath 1.0 query The first array entry includes the full XPath query and the second the specificity of the corresponding selector It returns NULL if the CSS selector can not be converted into XPath, i.e. selectors that contain pseudoclasses and/or pseudoelements that have no XPath counterpart like ':active', ':visited', etcetera
_lexer : \Docxpresso\Parser\SelectorLexer