8fold/php-html-spec
最新稳定版本:0.0.5
Composer 安装命令:
composer require 8fold/php-html-spec
包简介
The HTML and ARIA-HTML specifications as structured data
README 文档
README
The mission here is to present the Living HTML Specification as structured, and interconnected data.
The structured data is placed in a folder for the type of structured data used (json, for example). It's important to note that everything withing the folder for the structured data is automatically generated; therefore, no guarantee is provided regarding the accuracy and correcting the issue may require correcting an issue in the specification itself.
The information architecture of the html directory matches the URL of the documentation provided in w3c/elements-of-html.
Installation
composer require 8fold/html-spec-structured
Usage
Raw data
The compiled data from the writer scripts is stored in the /json directory, giving users direct access to the raw data using whatever interface they deem suitable.
PHP Reader classes
The reader classes provide an API and lightweight ORM solution for retrieving data and are regularly refined to improve and ensure performance.
HtmlIndex::all()->elementNamed("h1");
PHP Writer classes
Because the data are collected across multiple documents, in multiple repositories, across multiple organizations, the writing scripts are very utilitarian and considered "throw away." They are minimally optimized for querying the documents and saving the subsequent data to files. Further, they inherit from the reader classes and are, therefore, completely decoupled from the user-oriented capabilties.
Details
Project data structure
html.json: Index of HTML elements.html-attributes.json: Index of defined attributes, events, and ARIA attributes.html-aria-roles.json: Index of defined role attribute values. Debating.
Data collection
- The list of HTML elements is pulled from the w3c Elements of HTML repositiory. Note: If the element is not listed here, will not be listed anywhere else, even if referenced in other resources.
- The list of non-ARIA HTML attributes and element details are pulled from the WHATWG HTML Living Standard.
- Note:
roleis not considered an attribute in that it is not listed in the attributes table; therefore, it is injected as a global attribute after the initial set is complete.
- Note:
- The list of ARIA attributes and HTML element roles is pulled from the w3c HTML ARIA documentation.
- The ATRIA attribute categories are pulled from a local copy of the w3c HTML ARIA 1.1 recommendation available in the local folder of this repository.
ARIA seems to be the least consolidated and most volatile from a format perspective; however, it may become easier to aggregate and compile as time progresses.
Other
Versioning
As this package relays on time-sensitive, not functionality-sensitive details, versioning is time based using an ISO standard; therefore, semantic versioning [major].[minor].[patch] becomes [year].[month].[day].
- year: represents the four-digit year the compiling scripts were run.
- month: representing the two-digit month the compiling scripts were run.
- day: represents the two-digit day the compiling scripts were run.
8fold/php-html-spec 适用场景与选型建议
8fold/php-html-spec 是一款 基于 HTML 开发的 Composer 扩展包,目前已累计 330 次下载、GitHub Stars 达 0, 最近一次更新时间为 2020 年 09 月 04 日, 在 PHP 生态内属于活跃度较高的组件。
我们在过去多个企业项目中使用过 8fold/php-html-spec 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 8fold/php-html-spec 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
统计信息
- 总下载量: 330
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 19
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2020-09-04