Download the PHP package miqwit/dedex without Composer
On this page you can find all versions of the php package miqwit/dedex. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package dedex
DeDEX
âšī¸ đ¨đĻ I will be at the 16-19 November Toronto, Canada 46th Plenary Meeting. Meet me there!
DeDEX is a DDEX XML file parser. DDEX is a standard used in the music industry to deliver rich media content. See more info at ddex.net. This covers only the ERN (Electronic Release Notification) standard, for the following versions.
Supported versions:
3.8.13.8.24.14.1.14.24.34.3.14.3.2
Simple Entities speak your language and will make you smoothly parse your first ERNs.
Rule (and Rules Set) contain the minimal consistent information YOU need in your system. XML may be valid, but inaccurate for your needs.
I created this DDEX ERN parser that is as convenient as I always hoped for.
âī¸ Contribute here if you feel like it. Make DeDEX the first repo you contribute to! đ
âī¸ If you find this work useful, please star the repository.
đ DeDEX on packagist.
Installation
â ī¸ Runtime: PHP 7.4+. As per composer configuration, development and test tools need 8.1+ to work. It is not maintained for 7.4+ versions.
Usage
Convert a DDEX file to a SimpleAlbum
Parse a file without XSD validation
Parse a file with XSD validation
XSD validation will load all XML and XSD in memory, making this library less efficient. Use with care. Is not adapted to gigantic files.
Parse a file with Rules
Read rule results
Each rule gives a result (passed, failed or skipped), and a failed rule gives one Violation per problem: what failed, about which element (getSubject(), like A9), and where it is in the XML (getPath()).
A path is relative to the root element of the message, with element local names separated by / and an optional 1-based position among same-named siblings, like ResourceList/SoundRecording[3]/SoundRecordingEdition/ResourceId. The equivalent XPath is /* followed by /*[local-name()='Segment'][n] for each segment.
Rules can also run on a message that is already parsed: RuleRunner::run($rules, $ern, $version).
Write a rule
Extend Rule, call fail() for each problem, and return whether the message passes:
A rule that only returns false (without calling fail()) still works: its message becomes its single violation.
Parser config
Here are handy function from the parser.
$parser=new ErnParserController();
Displays parsing logs. For debugging purpose mainly. (default: false)
Validates XML against XSD. (default: false because will load XSD and XML in memory)
Returns a formatted string (with new lines) of all the errors generated by the rule checking. To be called when parsing ended.
If one of the ERROR rules fail, the parser will throw an exception with these messages.
Returns one RuleResult per rule, in the order they were added, with its status and its violations (see Read rule results). Available after parsing, even when parse() threw.
With false, parse() does not throw when an ERROR rule fails: read the failures with getRuleResults() or getRuleMessages(). (default: true)
Will store a set of Rule (array). For example, each provider could be check with a specific rule set.
Standard updates
Official email in September 2024
From March 1, 2025, all the versions 3 as well as version 4.0 of the Electronic Release Notification standard, their respective profiles, and choreographies will no longer be supported. This means that from that date, no further updates, bug fixes, or AVS additions will be made to these versions of the ERN standard. Also, the XML schemas and all articles or implementation advice about ERN- 3 and ERN 4.0 will be removed from all DDEX websites. All schemas, standard texts, and supporting information about ERN -4.1, 4.2, and, of course, 4.3.1 will remain.
All versions of dedex with dependencies
ext-ctype Version *
ext-iconv Version *
ext-xml Version *