PHPackages                             xparse/css-expression-translator - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. xparse/css-expression-translator

Abandoned → [xparse/element-finder](/?search=xparse%2Felement-finder)ArchivedLibrary

xparse/css-expression-translator
================================

Translate css to xpath

1.0.0(4y ago)334.4k3MITPHPPHP ^7.1 || ^8.0

Since Dec 2Pushed 2y ago2 watchersCompare

[ Source](https://github.com/xparse/CssExpressionTranslator)[ Packagist](https://packagist.org/packages/xparse/css-expression-translator)[ Docs](https://github.com/xparse/CssExpressionTranslator)[ RSS](/packages/xparse-css-expression-translator/feed)WikiDiscussions master Synced 2mo ago

READMEChangelog (2)Dependencies (3)Versions (9)Used By (0)

!!! Abandoned !!!
=================

[](#-abandoned-)

See [xparse/ElementFinder](https://github.com/xparse/ElementFinder/)

CssExpressionTranslator
=======================

[](#cssexpressiontranslator)

[![Packagist](https://camo.githubusercontent.com/e02eb41bed1bfcdf021539537a7e2e85eb9b281672989fa2eaed94b66ed86308/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f7870617273652f6373732d65787072657373696f6e2d7472616e736c61746f722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/xparse/css-expression-translator)[![Travis](https://camo.githubusercontent.com/5be228455e032be93bba4831eadb9148313edf8a74106f9ef20bdfbd2f0cb2e8/68747470733a2f2f696d672e736869656c64732e696f2f7472617669732f7870617273652f43737345787072657373696f6e5472616e736c61746f722f6d61737465722e7376673f7374796c653d666c61742d737175617265)](https://travis-ci.org/xparse/CssExpressionTranslator)[![Software License](https://camo.githubusercontent.com/55c0218c8f8009f06ad4ddae837ddd05301481fcf0dff8e0ed9dadda8780713e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265)](LICENSE.md)[![Coverage Status](https://camo.githubusercontent.com/2d504cb7593887d7902cff22e31aacdb913452d5cf05f5b3f6a4a87ec38c6fdc/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f636f7665726167652f672f7870617273652f43737345787072657373696f6e5472616e736c61746f722e7376673f7374796c653d666c61742d737175617265)](https://scrutinizer-ci.com/g/xparse/CssExpressionTranslator/code-structure)[![Quality Score](https://camo.githubusercontent.com/512e24fbe951c9a1eb3926686e832c41095b40c264445eaba7ac09234e7bc2af/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f672f7870617273652f43737345787072657373696f6e5472616e736c61746f722e7376673f7374796c653d666c61742d737175617265)](https://scrutinizer-ci.com/g/xparse/CssExpressionTranslator)[![Total Downloads](https://camo.githubusercontent.com/2590d5301bedbaf5e75c3ab8b8a5f63c4f5997fc110bc693e44af55af1cf5303/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f7870617273652f6373732d65787072657373696f6e2d7472616e736c61746f722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/xparse/css-expression-translator)

Translate css to xpath. Based on [symfony/css-selector](https://github.com/symfony/css-selector)

Install
-------

[](#install)

Via Composer

```
composer require xparse/css-expression-translator
```

Usage
-----

[](#usage)

```
$translator = new CssExpressionTranslator();
echo $translator->toXpath('a');
```

Testing
-------

[](#testing)

```
    ./vendor/bin/phpunit
```

Contributing
------------

[](#contributing)

Please see [CONTRIBUTING](https://github.com/Xparse/CssExpressionTranslator/blob/master/CONTRIBUTING.md) for details.

Credits
-------

[](#credits)

- [funivan](https://github.com/funivan)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

37

—

LowBetter than 83% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity27

Limited adoption so far

Community16

Small or concentrated contributor base

Maturity73

Established project with proven stability

 Bus Factor1

Top contributor holds 51.8% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~401 days

Recently: every ~502 days

Total

6

Last Release

1812d ago

Major Versions

0.4.0-alpha → 1.0.02021-05-31

PHP version history (4 changes)0.0.1PHP &gt;=5.5.0

0.2.0PHP ^7.0

0.3.0PHP ^7.1

0.4.0-alphaPHP ^7.1 || ^8.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/1ee14f8f97b3ead4c91823e410ea170293b55be64adf12a20d965f19008839a6?d=identicon)[funivan](/maintainers/funivan)

---

Top Contributors

[![funivan](https://avatars.githubusercontent.com/u/425208?v=4)](https://github.com/funivan "funivan (43 commits)")[![dependabot-preview[bot]](https://avatars.githubusercontent.com/in/2141?v=4)](https://github.com/dependabot-preview[bot] "dependabot-preview[bot] (27 commits)")[![saintdron](https://avatars.githubusercontent.com/u/23000680?v=4)](https://github.com/saintdron "saintdron (5 commits)")[![dependabot-support](https://avatars.githubusercontent.com/u/112581971?v=4)](https://github.com/dependabot-support "dependabot-support (3 commits)")[![maxKuk](https://avatars.githubusercontent.com/u/25341044?v=4)](https://github.com/maxKuk "maxKuk (3 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (1 commits)")[![ganchclub](https://avatars.githubusercontent.com/u/7393570?v=4)](https://github.com/ganchclub "ganchclub (1 commits)")

---

Tags

css-convertercss-selectorcss-selector-parsercss-to-xpathxpath

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/xparse-css-expression-translator/health.svg)

```
[![Health](https://phpackages.com/badges/xparse-css-expression-translator/health.svg)](https://phpackages.com/packages/xparse-css-expression-translator)
```

###  Alternatives

[craftcms/cms

Craft CMS

3.6k3.6M2.6k](/packages/craftcms-cms)[laravel/browser-kit-testing

Provides backwards compatibility for BrowserKit testing in the latest Laravel release.

5139.4M286](/packages/laravel-browser-kit-testing)[sulu/sulu

Core framework that implements the functionality of the Sulu content management system

1.3k1.3M152](/packages/sulu-sulu)[spatie/laravel-pjax

A pjax middleware for Laravel 5

513371.8k11](/packages/spatie-laravel-pjax)[scotteh/php-dom-wrapper

Simple DOM wrapper to select nodes using either CSS or XPath expressions and manipulate results quickly and easily.

1471.9M10](/packages/scotteh-php-dom-wrapper)[ec-cube/ec-cube

EC-CUBE EC open platform.

78527.0k1](/packages/ec-cube-ec-cube)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
