diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 2d27f5b..ebceb35 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -4,45 +4,8 @@ on: [push, pull_request] env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - DOCS_PATH: ${{ secrets.DOCS_PATH }} - DOCS_BRANCH: ${{ secrets.DOCS_BRANCH }} jobs: - can_document: - runs-on: ubuntu-latest - outputs: - value: ${{ steps.check_job.outputs.value }} - steps: - - name: Checks whether documentation can be built - id: check_job - run: | - echo "value: ${{ env.DOCS_PATH != null && github.ref == env.DOCS_BRANCH }}" - echo "::set-output name=value::${{ env.DOCS_PATH != null && github.ref == env.DOCS_BRANCH }}" - - documentation: - needs: [can_document] - runs-on: ubuntu-latest - if: needs.can_document.outputs.value == 'true' - - steps: - - uses: actions/checkout@v5 - - - name: Use Node.js - uses: actions/setup-node@v5 - with: - node-version: "20.x" - registry-url: 'https://registry.npmjs.org' - - - name: Install Dependencies - run: | - cd $DOCS_PATH - npm install - - - name: Deploy Doclet - run: | - cd $DOCS_PATH - npx pilet publish --fresh --url https://feed.piral.cloud/api/v1/pilet/anglesharp --api-key ${{ secrets.PIRAL_FEED_KEY }} - linux: runs-on: ubuntu-latest @@ -56,7 +19,7 @@ jobs: 10.0.x - name: Build - run: ./build.sh -AngleSharpVersion 1.9.0 + run: ./build.sh -AngleSharpVersion 1.11.0 windows: runs-on: windows-latest @@ -87,9 +50,9 @@ jobs: NUGET_API_KEY: ${{ steps.nuget_login.outputs.NUGET_API_KEY }} run: | if ($env:GITHUB_REF -eq "refs/heads/main") { - .\build.ps1 -Target Publish -AngleSharpVersion 1.9.0 + .\build.ps1 -Target Publish -AngleSharpVersion 1.11.0 } elseif ($env:GITHUB_REF -eq "refs/heads/devel") { - .\build.ps1 -Target PrePublish -AngleSharpVersion 1.9.0 + .\build.ps1 -Target PrePublish -AngleSharpVersion 1.11.0 } else { - .\build.ps1 -AngleSharpVersion 1.9.0 + .\build.ps1 -AngleSharpVersion 1.11.0 } diff --git a/CHANGELOG.md b/CHANGELOG.md index 6704e96..b7c6950 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,9 @@ +# 1.4.0 + +Released on Tuesday, November 24 2026. + +- Added `XmlDom.Register`, the DOM of this library declared for a scripting engine + # 1.3.2 Released on Monday, November 23 2026. diff --git a/docs/general/02-Capabilities.md b/docs/general/02-Capabilities.md index 9e68beb..e394d9f 100644 --- a/docs/general/02-Capabilities.md +++ b/docs/general/02-Capabilities.md @@ -24,6 +24,18 @@ AngleSharp.Xml extends the AngleSharp ecosystem with XML-native parsing and seri - Normalize and look up live `xml:id` values - Resolve inherited `xml:lang` values +## Scripting without reflection + +AngleSharp.Js finds the DOM of this library by reflecting over its DOM attributes by default. A trimmed or natively compiled (AoT) application can instead hand it the registration generated for this library at build time, `AngleSharp.Xml.XmlDom.Register` (a `DomRegistration` of AngleSharp). It declares the XML and SVG document types of the library: + +```cs +var config = Configuration.Default + .WithXml() + .WithJs(XmlDom.Register); +``` + +The registration describes the version of the library in use, so it never has to be kept in sync by hand. Several libraries are combined with `DomRegistrations.Combine`. + ## Namespace handling - Supports prefixed and default namespaces diff --git a/src/AngleSharp.Xml.Docs/docs.config.json b/src/AngleSharp.Xml.Docs/docs.config.json deleted file mode 100644 index bf38c50..0000000 --- a/src/AngleSharp.Xml.Docs/docs.config.json +++ /dev/null @@ -1,28 +0,0 @@ -{ - "name": "AngleSharp.Xml", - "author": "Florian Rappl", - "branch": "devel", - "repositoryUrl": "https://github.com/AngleSharp/AngleSharp.Xml", - "rootDir": "../../", - "outputDir": "./dist", - "sitemap": { - "general": { - "sections": [ - { - "generator": "markdown", - "segment": "xml", - "dir": "general" - } - ] - }, - "docs": { - "sections": [ - { - "generator": "markdown", - "segment": "xml", - "dir": "tutorials" - } - ] - } - } -} \ No newline at end of file diff --git a/src/AngleSharp.Xml.Docs/package.json b/src/AngleSharp.Xml.Docs/package.json deleted file mode 100644 index f071f73..0000000 --- a/src/AngleSharp.Xml.Docs/package.json +++ /dev/null @@ -1,58 +0,0 @@ -{ - "name": "@anglesharp/xml", - "version": "1.3.2", - "preview": true, - "description": "The doclet for the AngleSharp.Xml documentation.", - "keywords": [ - "pilet" - ], - "dependencies": {}, - "devDependencies": { - "@anglesharp/website": "1.0.0", - "@types/react": "^17.0.5", - "@types/react-dom": "^17.0.5", - "@types/react-router": "latest", - "@types/react-router-dom": "^5.1.7", - "@types/node": "^15.3.0", - "typescript": "^4.2.4", - "@dbeining/react-atom": "4.1.19", - "@libre/atom": "1.3.3", - "history": "4.10.1", - "react": "17.0.2", - "react-dom": "17.0.2", - "react-router": "5.2.0", - "react-router-dom": "5.2.0", - "tslib": "2.2.0", - "path-to-regexp": "1.8.0", - "piral-cli": "^0.13.3-pre.2480", - "piral-cli-parcel": "^0.13.3-pre.2480" - }, - "peerDependencies": { - "@dbeining/react-atom": "*", - "@libre/atom": "*", - "history": "*", - "react": "*", - "react-dom": "*", - "react-router": "*", - "react-router-dom": "*", - "tslib": "*", - "path-to-regexp": "*", - "@anglesharp/website": "*" - }, - "scripts": { - "start": "pilet debug", - "build": "pilet build", - "upgrade": "pilet upgrade" - }, - "main": "dist/index.js", - "files": [ - "dist" - ], - "piral": { - "comment": "Keep this section to use the Piral CLI.", - "name": "@anglesharp/website" - }, - "peerModules": [ - "piral-docs-tools/components" - ] -} diff --git a/src/AngleSharp.Xml.Docs/src/index.tsx b/src/AngleSharp.Xml.Docs/src/index.tsx deleted file mode 100644 index dc50b37..0000000 --- a/src/AngleSharp.Xml.Docs/src/index.tsx +++ /dev/null @@ -1,7 +0,0 @@ -import { PiletApi } from 'piral-docs-tools'; - -const createDoclet = require('piral-docs-tools/doclet'); - -export function setup(api: PiletApi) { - createDoclet(api); -} diff --git a/src/AngleSharp.Xml.Docs/tsconfig.json b/src/AngleSharp.Xml.Docs/tsconfig.json deleted file mode 100644 index 610060f..0000000 --- a/src/AngleSharp.Xml.Docs/tsconfig.json +++ /dev/null @@ -1,25 +0,0 @@ -{ - "compilerOptions": { - "declaration": true, - "noImplicitAny": false, - "removeComments": false, - "noLib": false, - "emitDecoratorMetadata": true, - "experimentalDecorators": true, - "target": "es6", - "sourceMap": true, - "outDir": "./dist", - "skipLibCheck": true, - "lib": ["dom", "es2018"], - "moduleResolution": "node", - "module": "esnext", - "jsx": "react", - "importHelpers": true - }, - "include": [ - "./src" - ], - "exclude": [ - "node_modules" - ] -} diff --git a/src/AngleSharp.Xml/AngleSharp.Xml.csproj b/src/AngleSharp.Xml/AngleSharp.Xml.csproj index 5330d46..8f2dc1d 100644 --- a/src/AngleSharp.Xml/AngleSharp.Xml.csproj +++ b/src/AngleSharp.Xml/AngleSharp.Xml.csproj @@ -39,15 +39,15 @@ true true snupkg - 1.9.0 + 1.11.0 + - @@ -60,6 +60,10 @@ <_Parameter1>false + + + <_Parameter1>AngleSharp.Xml.XmlDom + diff --git a/src/Directory.Build.props b/src/Directory.Build.props index 8197532..8448b53 100644 --- a/src/Directory.Build.props +++ b/src/Directory.Build.props @@ -2,7 +2,7 @@ Adds a powerful XML and DTD parser to AngleSharp. AngleSharp.Xml - 1.3.2 + 1.4.0 latest true true