Skip to content

[XSG] Inline StyleSheet with CDATA sections not parsed correctly #33867

@StephaneDelcroix

Description

@StephaneDelcroix

Description

XAML Source Generator (XSG) does not correctly parse inline <StyleSheet> elements containing CSS in CDATA sections.

Reproduction

<ContentPage.Resources>
    <StyleSheet>
        <![CDATA[
stacklayout {
    -maui-spacing: 15;
}
entry {
    background-color: red;
}
        ]]>
    </StyleSheet>
</ContentPage.Resources>

Affected File

src/Controls/samples/Controls.Sample/Pages/Others/StyleSheetsPage.xaml

Workaround

Use Inflator="Runtime" for the affected XAML file.

Context

Discovered while enabling XSG on more projects in #33524.

Metadata

Metadata

Labels

s/triagedIssue has been revieweds/verifiedVerified / Reproducible Issue ready for Engineering TriagexsgXaml sourceGen

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions