{"id":48652640,"url":"https://github.com/ateeducacion/elpx-validator","last_synced_at":"2026-04-10T08:53:21.164Z","repository":{"id":322065594,"uuid":"1072782425","full_name":"ateeducacion/elpx-validator","owner":"ateeducacion","description":"eXeLearning Package Validator","archived":false,"fork":false,"pushed_at":"2026-04-09T20:04:09.000Z","size":179,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-04-10T08:53:19.360Z","etag":null,"topics":["elp","exelearning","validator"],"latest_commit_sha":null,"homepage":"https://ateeducacion.github.io/elpx-validator/","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"agpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ateeducacion.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-10-09T07:53:11.000Z","updated_at":"2026-04-09T20:04:12.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/ateeducacion/elpx-validator","commit_stats":null,"previous_names":["ateeducacion/elp-validator","ateeducacion/elpx-validator"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/ateeducacion/elpx-validator","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ateeducacion%2Felpx-validator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ateeducacion%2Felpx-validator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ateeducacion%2Felpx-validator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ateeducacion%2Felpx-validator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ateeducacion","download_url":"https://codeload.github.com/ateeducacion/elpx-validator/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ateeducacion%2Felpx-validator/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31635969,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-10T07:40:12.752Z","status":"ssl_error","status_checked_at":"2026-04-10T07:40:11.664Z","response_time":98,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["elp","exelearning","validator"],"created_at":"2026-04-10T08:53:20.278Z","updated_at":"2026-04-10T08:53:21.128Z","avatar_url":"https://github.com/ateeducacion.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# eXeLearning Package Validator\n\nA client-side inspector, validator, asset explorer, and preview tool for **eXeLearning** packages (`.elpx` and legacy `.elp`).\n\nAll processing happens entirely in the browser — no files are uploaded to any server.\n\n\u003e **Live demo:** [https://ateeducacion.github.io/elpx-validator/](https://ateeducacion.github.io/elpx-validator/)\n\n---\n\n## Features\n\n### Supported Formats\n| Format | Manifest | Description |\n|--------|----------|-------------|\n| **Modern `.elpx`** | `content.xml` (ODE 2.0) | Full validation with deep structural and semantic checks |\n| **Legacy `.elp`** | `contentv3.xml` | Basic metadata extraction with format-appropriate pipeline |\n\nThe validator auto-detects the format and applies the correct validation pipeline. A badge (`Modern ELPX` / `Legacy ELP`) is shown in the results.\n\n### Validation Scope\n\nThe validator performs **layered validation** organized into categories:\n\n#### 1. Package / ZIP layer (`PKG*`)\n- Presence of required files: `content.xml`, `content.dtd`, `index.html`\n- Recommended directories: `html/`, `content/resources/`, `theme/`, `libs/`, `idevices/`\n- Path traversal detection (`../`)\n- Absolute path detection\n- Suspicious files (`.DS_Store`, `Thumbs.db`, executables)\n- Duplicate normalized paths (casing conflicts)\n\n#### 2. XML / Schema layer (`XML*`)\n- XML well-formedness\n- Root element is `\u003code\u003e`\n- Namespace validation (`http://www.intef.es/xsd/ode`)\n- `version` attribute presence\n- `DOCTYPE ode SYSTEM \"content.dtd\"` detection\n- Expected root child ordering: `userPreferences?`, `odeResources?`, `odeProperties?`, `odeNavStructures`\n- Unknown root child elements\n\n#### 3. Navigation / Structure layer (`NAV*`)\n- Page, block, and component ID presence and uniqueness\n- Parent page reference validation (dangling references)\n- Page hierarchy cycle detection\n- Sibling ordering consistency\n- Component containment validation (page/block ID matches)\n- Order field numeric validation\n\n#### 4. Metadata layer (`META*`)\n- `odeId` and `odeVersionId` format validation (14-digit timestamp + 6 uppercase alphanumeric)\n- `eXeVersion` presence\n- Project title (`pp_title`) presence\n\n#### 5. iDevice layer (`IDEV*`)\n- Type recognition against a registry of **18 known iDevice types** from the ELPX specification\n- `jsonProperties` parseability\n- `htmlView` content check\n- Type-specific validation:\n  - Image iDevices (`image-gallery`, `magnifier`): image asset references\n  - URL iDevices (`external-website`): URL presence\n  - Download iDevices (`download-source-file`): `isDownload` flag consistency\n\n#### 6. Asset layer (`ASSET*`)\n- Complete asset inventory from the ZIP\n- Reference extraction from `htmlView`, `jsonProperties`, and exported HTML\n- `{{context_path}}` template variable normalization\n- Missing asset detection (referenced but not present)\n- Orphaned asset detection (present but never referenced)\n- Casing mismatch detection\n- Path traversal in references\n\n### Known iDevice Types\n\nThe registry includes these documented types, classified by validation depth:\n\n| Type | Group | Validation |\n|------|-------|-----------|\n| `text` | Content | Deep |\n| `image-gallery` | Media | Deep |\n| `magnifier` | Media | Deep |\n| `external-website` | Embed | Deep |\n| `download-source-file` | System | Deep |\n| `form`, `matching`, `sort`, `classify`, `guess`, `checklist`, `crossword` | Activity | Shallow |\n| `casestudy`, `rubric` | Content | Shallow |\n| `trueorfalse`, `quick-questions`, `quick-questions-multiple-choice` | Quiz | Shallow |\n| `complete` | Activity | Shallow |\n\nUnknown/custom iDevice types are reported as informational findings, not errors.\n\n### Asset Explorer\n\nThe Assets tab provides:\n- Full inventory of all files in the package with MIME type, extension, and preview capability\n- Filtering: All / Referenced / Orphaned / Missing\n- Summary counts: total, referenced, missing, orphaned\n\n### Preview System\n\nThe Preview tab provides:\n- Sandboxed `\u003ciframe\u003e` preview of `index.html` and pages under `html/`\n- Asset references rewritten to Blob URLs for offline rendering\n- Page selector dropdown\n\n### User Interface\n\nThe redesigned UI is organized as a **navigable inspector**:\n\n| Tab | Content |\n|-----|---------|\n| **Overview** | Legacy checklist, package metadata, file size |\n| **Findings** | All validation findings with severity/category filtering |\n| **Pages** | Hierarchical page tree with blocks and components |\n| **iDevices** | Type summary, counts, known/unknown classification |\n| **Assets** | Full asset inventory with filtering |\n| **Preview** | Sandboxed page preview |\n\nEach finding includes:\n- **Rule code** (e.g., `PKG001`, `XML004`, `NAV012`, `IDEV007`, `ASSET015`)\n- **Severity**: error / warning / info\n- **Category**: package / xml / navigation / metadata / idevice / asset / compatibility\n- **Detailed explanation**\n- **Location** (page, block, iDevice)\n- **Evidence** (raw data supporting the finding)\n- **Repair suggestion**\n\n---\n\n## Validation Rule Catalog\n\n| Code Range | Category | Examples |\n|-----------|----------|----------|\n| `PKG001`–`PKG014` | Package | Missing files, path traversal, suspicious names |\n| `XML001`–`XML008` | XML/Schema | Malformed XML, wrong root, namespace, ordering |\n| `NAV001`–`NAV022` | Navigation | Missing IDs, duplicates, cycles, containment |\n| `META001`–`META006` | Metadata | Missing/invalid odeId, odeVersionId, title |\n| `IDEV001`–`IDEV006` | iDevice | Unknown types, parse errors, missing assets/URLs |\n| `ASSET001`–`ASSET005` | Asset | Missing, orphaned, path traversal, casing |\n| `COMPAT001`–`COMPAT002` | Compatibility | Legacy/modern format detection |\n\n---\n\n## Getting Started\n\n1. Open `index.html` in a modern browser. No build step is required.\n2. Drop an `.elp`, `.elpx`, or `.zip` file onto the drop zone or click it to choose a file.\n3. Review the validation results across the different tabs.\n\n---\n\n## Architecture\n\nThe codebase follows a modular architecture:\n\n```\nindex.html                    # Application shell\nstyles.css                    # Styling for the UI\njs/\n├── core/\n│   ├── rules.js              # Rule catalog and finding factory\n│   └── model.js              # Normalized project model builder\n├── registries/\n│   └── idevice-types.js      # Known iDevice type registry\n├── validators/\n│   ├── package-rules.js      # ZIP/package structure validation\n│   ├── xml-rules.js          # XML schema validation\n│   ├── nav-rules.js          # Navigation/ID/reference validation\n│   ├── idevice-rules.js      # iDevice type validation\n│   └── asset-rules.js        # Asset inventory and validation\n├── preview/\n│   └── virtual-fs.js         # Blob URL virtual filesystem\n├── validator.js              # Main orchestrator (new + legacy API)\n└── app.js                    # UI layer\ntests/                        # Jest unit tests\n```\n\nAll validation rules return structured finding objects:\n\n```js\n{\n  code: 'IDEV001',\n  severity: 'info',\n  category: 'idevice',\n  message: 'Unknown iDevice type',\n  details: 'The component uses an iDevice type not in the known registry.',\n  location: { pageId: '...', blockId: '...', ideviceId: '...' },\n  evidence: { odeIdeviceTypeName: '...' },\n  suggestion: 'Verify whether this is a custom iDevice or a typo.'\n}\n```\n\n---\n\n## Development\n\n### Requirements\n\n- A modern browser (Chrome, Firefox, Safari, Edge)\n- Node.js (for running tests)\n\n### Running locally\n\nOpen `index.html` in a browser, or start a local HTTP server:\n\n```bash\nnpm run start\n```\n\nBy default it listens on `http://localhost:8081`.\n\n### Running tests\n\n```bash\nnpm install\nnpm test\n```\n\nThe test suite includes **102 tests** covering:\n- Rule catalog and finding factory\n- Project model builder\n- iDevice type registry\n- Package-level validation (path traversal, suspicious files, duplicates)\n- XML/schema validation (namespace, version, DOCTYPE, ordering)\n- Navigation validation (ID uniqueness, cycles, cross-references, ordering)\n- iDevice validation (type recognition, JSON parsing, type-specific checks)\n- Asset validation (inventory, references, orphans, missing, casing)\n- Legacy API backward compatibility\n\n---\n\n## Known Limitations\n\n- **DTD validation**: True DTD validation is not feasible in the browser. The tool checks for the DOCTYPE declaration and `content.dtd` presence but does not validate XML against the DTD.\n- **Legacy `.elp`**: Limited to metadata extraction. Deep structural validation requires the modern `content.xml` format.\n- **Preview fidelity**: HTML preview uses Blob URLs for assets, which may not perfectly replicate server-side behavior for all resource types.\n- **iDevice depth**: Only a subset of iDevice types have deep validation. Custom iDevices are flagged as informational only.\n- **Cross-check**: XML vs. exported HTML cross-checking is reference-based only; full structural comparison is a future enhancement.\n\n---\n\n## Credits\n\nBuilt by the [Área de Tecnología Educativa](https://www3.gobiernodecanarias.org/medusa/ecoescuela/ate) – Gobierno de Canarias.\n\nReferences:\n- [eXeLearning](https://github.com/exelearning/exelearning)\n- [ELPX Format Specification](https://github.com/exelearning/exelearning/blob/main/doc/elpx-format.md)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fateeducacion%2Felpx-validator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fateeducacion%2Felpx-validator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fateeducacion%2Felpx-validator/lists"}