Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
45 changes: 4 additions & 41 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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
Expand Down Expand Up @@ -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
}
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
12 changes: 12 additions & 0 deletions docs/general/02-Capabilities.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
28 changes: 0 additions & 28 deletions src/AngleSharp.Xml.Docs/docs.config.json

This file was deleted.

58 changes: 0 additions & 58 deletions src/AngleSharp.Xml.Docs/package.json

This file was deleted.

7 changes: 0 additions & 7 deletions src/AngleSharp.Xml.Docs/src/index.tsx

This file was deleted.

25 changes: 0 additions & 25 deletions src/AngleSharp.Xml.Docs/tsconfig.json

This file was deleted.

8 changes: 6 additions & 2 deletions src/AngleSharp.Xml/AngleSharp.Xml.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -39,15 +39,15 @@
<EmbedUntrackedSources>true</EmbedUntrackedSources>
<IncludeSymbols>true</IncludeSymbols>
<SymbolPackageFormat>snupkg</SymbolPackageFormat>
<AngleSharpVersion Condition=" '$(AngleSharpVersion)' == '' ">1.9.0</AngleSharpVersion>
<AngleSharpVersion Condition=" '$(AngleSharpVersion)' == '' ">1.11.0</AngleSharpVersion>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="AngleSharp" Version="[$(AngleSharpVersion),2.0.0)" />
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.0.0" PrivateAssets="All"/>
</ItemGroup>

<ItemGroup>
<PackageReference Include="AngleSharp" Version="[$(AngleSharpVersion),2.0.0)" />
</ItemGroup>

<ItemGroup>
Expand All @@ -60,6 +60,10 @@
<AssemblyAttribute Include="System.Runtime.InteropServices.ComVisibleAttribute">
<_Parameter1>false</_Parameter1>
</AssemblyAttribute>
<!-- the DOM of this library for a scripting engine, without reflection: XmlDom.Register -->
<AssemblyAttribute Include="AngleSharp.Attributes.GenerateDomRegistrationAttribute">
<_Parameter1>AngleSharp.Xml.XmlDom</_Parameter1>
</AssemblyAttribute>
</ItemGroup>

<PropertyGroup Condition=" '$(OS)' == 'Windows_NT' ">
Expand Down
2 changes: 1 addition & 1 deletion src/Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<PropertyGroup>
<Description>Adds a powerful XML and DTD parser to AngleSharp.</Description>
<Product>AngleSharp.Xml</Product>
<Version>1.3.2</Version>
<Version>1.4.0</Version>
<LangVersion>latest</LangVersion>
<SignAssembly>true</SignAssembly>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
Expand Down